@grackle-ai/web 0.28.0 → 0.29.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.
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import{r as ux,a as S,j as h,v as dx,b as fx,t as jr,i as hx,f as mx,M as df,c as ff}from"./markdown-gcy1Jmzi.js";import{r as px,d as qg,H as Yg,P as Kg,i as gx,B as vx,a as yx,C as bx,M as Sx}from"./dagview-EHk2VaeR.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function l(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(c){if(c.ep)return;c.ep=!0;const d=l(c);fetch(c.href,d)}})();var pd={exports:{}},Ol={},gd={exports:{}},vd={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* scheduler.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Zg;function xx(){return Zg||(Zg=1,(function(n){function s(U,K){var V=U.length;U.push(K);e:for(;0<V;){var pe=V-1>>>1,ie=U[pe];if(0<c(ie,K))U[pe]=K,U[V]=ie,V=pe;else break e}}function l(U){return U.length===0?null:U[0]}function o(U){if(U.length===0)return null;var K=U[0],V=U.pop();if(V!==K){U[0]=V;e:for(var pe=0,ie=U.length,Ae=ie>>>1;pe<Ae;){var Se=2*(pe+1)-1,me=U[Se],we=Se+1,Q=U[we];if(0>c(me,V))we<ie&&0>c(Q,me)?(U[pe]=Q,U[we]=V,pe=we):(U[pe]=me,U[Se]=V,pe=Se);else if(we<ie&&0>c(Q,V))U[pe]=Q,U[we]=V,pe=we;else break e}}return K}function c(U,K){var V=U.sortIndex-K.sortIndex;return V!==0?V:U.id-K.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var f=Date,m=f.now();n.unstable_now=function(){return f.now()-m}}var p=[],v=[],y=1,b=null,_=3,T=!1,N=!1,D=!1,w=!1,C=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function F(U){for(var K=l(v);K!==null;){if(K.callback===null)o(v);else if(K.startTime<=U)o(v),K.sortIndex=K.expirationTime,s(p,K);else break;K=l(v)}}function G(U){if(D=!1,F(U),!N)if(l(p)!==null)N=!0,W||(W=!0,be());else{var K=l(v);K!==null&&P(G,K.startTime-U)}}var W=!1,ee=-1,$=5,ae=-1;function _e(){return w?!0:!(n.unstable_now()-ae<$)}function L(){if(w=!1,W){var U=n.unstable_now();ae=U;var K=!0;try{e:{N=!1,D&&(D=!1,H(ee),ee=-1),T=!0;var V=_;try{t:{for(F(U),b=l(p);b!==null&&!(b.expirationTime>U&&_e());){var pe=b.callback;if(typeof pe=="function"){b.callback=null,_=b.priorityLevel;var ie=pe(b.expirationTime<=U);if(U=n.unstable_now(),typeof ie=="function"){b.callback=ie,F(U),K=!0;break t}b===l(p)&&o(p),F(U)}else o(p);b=l(p)}if(b!==null)K=!0;else{var Ae=l(v);Ae!==null&&P(G,Ae.startTime-U),K=!1}}break e}finally{b=null,_=V,T=!1}K=void 0}}finally{K?be():W=!1}}}var be;if(typeof O=="function")be=function(){O(L)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,Be=te.port2;te.port1.onmessage=L,be=function(){Be.postMessage(null)}}else be=function(){C(L,0)};function P(U,K){ee=C(function(){U(n.unstable_now())},K)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(U){switch(_){case 1:case 2:case 3:var K=3;break;default:K=_}var V=_;_=K;try{return U()}finally{_=V}},n.unstable_requestPaint=function(){w=!0},n.unstable_runWithPriority=function(U,K){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var V=_;_=U;try{return K()}finally{_=V}},n.unstable_scheduleCallback=function(U,K,V){var pe=n.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?pe+V:pe):V=pe,U){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=V+ie,U={id:y++,callback:K,priorityLevel:U,startTime:V,expirationTime:ie,sortIndex:-1},V>pe?(U.sortIndex=V,s(v,U),l(p)===null&&U===l(v)&&(D?(H(ee),ee=-1):D=!0,P(G,V-pe))):(U.sortIndex=ie,s(p,U),N||T||(N=!0,W||(W=!0,be()))),U},n.unstable_shouldYield=_e,n.unstable_wrapCallback=function(U){var K=_;return function(){var V=_;_=K;try{return U.apply(this,arguments)}finally{_=V}}}})(vd)),vd}var Xg;function _x(){return Xg||(Xg=1,gd.exports=xx()),gd.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-dom-client.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var $g;function Tx(){if($g)return Ol;$g=1;var n=_x(),s=ux(),l=px();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(d(e)!==e)throw Error(o(188))}function v(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,i=t;;){var r=a.return;if(r===null)break;var u=r.alternate;if(u===null){if(i=r.return,i!==null){a=i;continue}break}if(r.child===u.child){for(u=r.child;u;){if(u===a)return p(r),e;if(u===i)return p(r),t;u=u.sibling}throw Error(o(188))}if(a.return!==i.return)a=r,i=u;else{for(var g=!1,x=r.child;x;){if(x===a){g=!0,a=r,i=u;break}if(x===i){g=!0,i=r,a=u;break}x=x.sibling}if(!g){for(x=u.child;x;){if(x===a){g=!0,a=u,i=r;break}if(x===i){g=!0,i=u,a=r;break}x=x.sibling}if(!g)throw Error(o(189))}}if(a.alternate!==i)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,_=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),O=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),_e=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function be(e){return e===null||typeof e!="object"?null:(e=L&&e[L]||e["@@iterator"],typeof e=="function"?e:null)}var te=Symbol.for("react.client.reference");function Be(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case D:return"Fragment";case C:return"Profiler";case w:return"StrictMode";case G:return"Suspense";case W:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case O:return e.displayName||"Context";case H:return(e._context.displayName||"Context")+".Consumer";case F:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return t=e.displayName||null,t!==null?t:Be(e.type)||"Memo";case $:t=e._payload,e=e._init;try{return Be(e(t))}catch{}}return null}var P=Array.isArray,U=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},pe=[],ie=-1;function Ae(e){return{current:e}}function Se(e){0>ie||(e.current=pe[ie],pe[ie]=null,ie--)}function me(e,t){ie++,pe[ie]=e.current,e.current=t}var we=Ae(null),Q=Ae(null),ue=Ae(null),Pe=Ae(null);function J(e,t){switch(me(ue,t),me(Q,e),me(we,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?hg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=hg(t),e=mg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Se(we),me(we,e)}function sn(){Se(we),Se(Q),Se(ue)}function Qn(e){e.memoizedState!==null&&me(Pe,e);var t=we.current,a=mg(t,e.type);t!==a&&(me(Q,e),me(we,a))}function ln(e){Q.current===e&&(Se(we),Se(Q)),Pe.current===e&&(Se(Pe),Dl._currentValue=V)}var jn,dt;function Jt(e){if(jn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);jn=t&&t[1]||"",dt=-1<a.stack.indexOf(`
|
|
18
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
+
`+jn+e+dt}var Hn=!1;function Gn(e,t){if(!e||Hn)return"";Hn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){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 B=z}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(z){B=z}e.call(Z.prototype)}}else{try{throw Error()}catch(z){B=z}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(z){if(z&&B&&typeof z.stack=="string")return[z.stack,B.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=i.DetermineComponentFrameRoot(),g=u[0],x=u[1];if(g&&x){var E=g.split(`
|
|
20
|
+
`),M=x.split(`
|
|
21
|
+
`);for(r=i=0;i<E.length&&!E[i].includes("DetermineComponentFrameRoot");)i++;for(;r<M.length&&!M[r].includes("DetermineComponentFrameRoot");)r++;if(i===E.length||r===M.length)for(i=E.length-1,r=M.length-1;1<=i&&0<=r&&E[i]!==M[r];)r--;for(;1<=i&&0<=r;i--,r--)if(E[i]!==M[r]){if(i!==1||r!==1)do if(i--,r--,0>r||E[i]!==M[r]){var I=`
|
|
22
|
+
`+E[i].replace(" at new "," at ");return e.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",e.displayName)),I}while(1<=i&&0<=r);break}}}finally{Hn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Jt(a):""}function mn(e,t){switch(e.tag){case 26:case 27:case 5:return Jt(e.type);case 16:return Jt("Lazy");case 13:return e.child!==t&&t!==null?Jt("Suspense Fallback"):Jt("Suspense");case 19:return Jt("SuspenseList");case 0:case 15:return Gn(e.type,!1);case 11:return Gn(e.type.render,!1);case 1:return Gn(e.type,!0);case 31:return Jt("Activity");default:return""}}function In(e){try{var t="",a=null;do t+=mn(e,a),a=e,e=e.return;while(e);return t}catch(i){return`
|
|
23
|
+
Error generating stack: `+i.message+`
|
|
24
|
+
`+i.stack}}var Yt=Object.prototype.hasOwnProperty,Pn=n.unstable_scheduleCallback,X=n.unstable_cancelCallback,se=n.unstable_shouldYield,re=n.unstable_requestPaint,de=n.unstable_now,Ee=n.unstable_getCurrentPriorityLevel,je=n.unstable_ImmediatePriority,Xe=n.unstable_UserBlockingPriority,Me=n.unstable_NormalPriority,nt=n.unstable_LowPriority,xt=n.unstable_IdlePriority,pt=n.log,At=n.unstable_setDisableYieldValue,at=null,gt=null;function Wt(e){if(typeof pt=="function"&&At(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(at,e)}catch{}}var ft=Math.clz32?Math.clz32:us,Lt=Math.log,Ut=Math.LN2;function us(e){return e>>>=0,e===0?32:31-(Lt(e)/Ut|0)|0}var qn=256,ne=262144,ve=4194304;function oe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ce(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var r=0,u=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var x=i&134217727;return x!==0?(i=x&~u,i!==0?r=oe(i):(g&=x,g!==0?r=oe(g):a||(a=x&~e,a!==0&&(r=oe(a))))):(x=i&~u,x!==0?r=oe(x):g!==0?r=oe(g):a||(a=i&~e,a!==0&&(r=oe(a)))),r===0?0:t!==0&&t!==r&&(t&u)===0&&(u=r&-r,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:r}function q(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function on(){var e=ve;return ve<<=1,(ve&62914560)===0&&(ve=4194304),e}function Hs(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ra(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function co(e,t,a,i,r,u){var g=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var x=e.entanglements,E=e.expirationTimes,M=e.hiddenUpdates;for(a=g&~a;0<a;){var I=31-ft(a),Z=1<<I;x[I]=0,E[I]=-1;var B=M[I];if(B!==null)for(M[I]=null,I=0;I<B.length;I++){var z=B[I];z!==null&&(z.lane&=-536870913)}a&=~Z}i!==0&&Ii(e,i,0),u!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=u&~(g&~t))}function Ii(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-ft(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function Pi(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-ft(a),r=1<<i;r&t|e[i]&t&&(e[i]|=t),a&=~r}}function qi(e,t){var a=t&-t;return a=(a&42)!==0?1:Gs(a),(a&(e.suspendedLanes|t))!==0?0:a}function Gs(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Is(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Yi(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:Ug(e.type))}function Ki(e,t){var a=K.p;try{return K.p=e,t()}finally{K.p=a}}var Yn=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Yn,Vt="__reactProps$"+Yn,ra="__reactContainer$"+Yn,Ps="__reactEvents$"+Yn,uo="__reactListeners$"+Yn,fo="__reactHandles$"+Yn,le="__reactResources$"+Yn,Le="__reactMarker$"+Yn;function Oe(e){delete e[Nt],delete e[Vt],delete e[Ps],delete e[uo],delete e[fo]}function Re(e){var t=e[Nt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ra]||a[Nt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=xg(e);e!==null;){if(a=e[Nt])return a;e=xg(e)}return t}e=a,a=e.parentNode}return null}function Kt(e){if(e=e[Nt]||e[ra]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Zt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function rt(e){var t=e[le];return t||(t=e[le]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ve(e){e[Le]=!0}var Ma=new Set,nh={};function ds(e,t){qs(e,t),qs(e+"Capture",t)}function qs(e,t){for(nh[e]=t,e=0;e<t.length;e++)Ma.add(t[e])}var tS=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]*$"),ah={},sh={};function nS(e){return Yt.call(sh,e)?!0:Yt.call(ah,e)?!1:tS.test(e)?sh[e]=!0:(ah[e]=!0,!1)}function ho(e,t,a){if(nS(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function mo(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function ca(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}function Cn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ih(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function aS(e,t,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var r=i.get,u=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(g){a=""+g,u.call(this,g)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function rc(e){if(!e._valueTracker){var t=ih(e)?"checked":"value";e._valueTracker=aS(e,t,""+e[t])}}function lh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=ih(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function po(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var sS=/[\n"\\]/g;function An(e){return e.replace(sS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function cc(e,t,a,i,r,u,g,x){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Cn(t)):e.value!==""+Cn(t)&&(e.value=""+Cn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?uc(e,g,Cn(t)):a!=null?uc(e,g,Cn(a)):i!=null&&e.removeAttribute("value"),r==null&&u!=null&&(e.defaultChecked=!!u),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Cn(x):e.removeAttribute("name")}function oh(e,t,a,i,r,u,g,x){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){rc(e);return}a=a!=null?""+Cn(a):"",t=t!=null?""+Cn(t):a,x||t===e.value||(e.value=t),e.defaultValue=t}i=i??r,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=x?e.checked:!!i,e.defaultChecked=!!i,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),rc(e)}function uc(e,t,a){t==="number"&&po(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Ys(e,t,a,i){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&i&&(e[a].defaultSelected=!0)}else{for(a=""+Cn(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,i&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function rh(e,t,a){if(t!=null&&(t=""+Cn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Cn(a):""}function ch(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(o(92));if(P(i)){if(1<i.length)throw Error(o(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=Cn(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),rc(e)}function Ks(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var iS=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 uh(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||iS.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function dh(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var r in t)i=t[r],t.hasOwnProperty(r)&&a[r]!==i&&uh(e,r,i)}else for(var u in t)t.hasOwnProperty(u)&&uh(e,u,t[u])}function dc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lS=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"]]),oS=/^[\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 go(e){return oS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ua(){}var fc=null;function hc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zs=null,Xs=null;function fh(e){var t=Kt(e);if(t&&(e=t.stateNode)){var a=e[Vt]||null;e:switch(e=t.stateNode,t.type){case"input":if(cc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+An(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var r=i[Vt]||null;if(!r)throw Error(o(90));cc(i,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&lh(i)}break e;case"textarea":rh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Ys(e,!!a.multiple,t,!1)}}}var mc=!1;function hh(e,t,a){if(mc)return e(t,a);mc=!0;try{var i=e(t);return i}finally{if(mc=!1,(Zs!==null||Xs!==null)&&(ar(),Zs&&(t=Zs,e=Xs,Xs=Zs=null,fh(t),e)))for(t=0;t<e.length;t++)fh(e[t])}}function Zi(e,t){var a=e.stateNode;if(a===null)return null;var i=a[Vt]||null;if(i===null)return null;a=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pc=!1;if(da)try{var Xi={};Object.defineProperty(Xi,"passive",{get:function(){pc=!0}}),window.addEventListener("test",Xi,Xi),window.removeEventListener("test",Xi,Xi)}catch{pc=!1}var Oa=null,gc=null,vo=null;function mh(){if(vo)return vo;var e,t=gc,a=t.length,i,r="value"in Oa?Oa.value:Oa.textContent,u=r.length;for(e=0;e<a&&t[e]===r[e];e++);var g=a-e;for(i=1;i<=g&&t[a-i]===r[u-i];i++);return vo=r.slice(e,1<i?1-i:void 0)}function yo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function bo(){return!0}function ph(){return!1}function rn(e){function t(a,i,r,u,g){this._reactName=a,this._targetInst=r,this.type=i,this.nativeEvent=u,this.target=g,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(a=e[x],this[x]=a?a(u):u[x]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?bo:ph,this.isPropagationStopped=ph,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=bo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=bo)},persist:function(){},isPersistent:bo}),t}var fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},So=rn(fs),$i=b({},fs,{view:0,detail:0}),rS=rn($i),vc,yc,Fi,xo=b({},$i,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Fi&&(Fi&&e.type==="mousemove"?(vc=e.screenX-Fi.screenX,yc=e.screenY-Fi.screenY):yc=vc=0,Fi=e),vc)},movementY:function(e){return"movementY"in e?e.movementY:yc}}),gh=rn(xo),cS=b({},xo,{dataTransfer:0}),uS=rn(cS),dS=b({},$i,{relatedTarget:0}),bc=rn(dS),fS=b({},fs,{animationName:0,elapsedTime:0,pseudoElement:0}),hS=rn(fS),mS=b({},fs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pS=rn(mS),gS=b({},fs,{data:0}),vh=rn(gS),vS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yS={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"},bS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bS[e])?!!t[e]:!1}function Sc(){return SS}var xS=b({},$i,{key:function(e){if(e.key){var t=vS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=yo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sc,charCode:function(e){return e.type==="keypress"?yo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_S=rn(xS),TS=b({},xo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yh=rn(TS),ES=b({},$i,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sc}),jS=rn(ES),CS=b({},fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),AS=rn(CS),NS=b({},xo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),wS=rn(NS),DS=b({},fs,{newState:0,oldState:0}),kS=rn(DS),RS=[9,13,27,32],xc=da&&"CompositionEvent"in window,Qi=null;da&&"documentMode"in document&&(Qi=document.documentMode);var MS=da&&"TextEvent"in window&&!Qi,bh=da&&(!xc||Qi&&8<Qi&&11>=Qi),Sh=" ",xh=!1;function _h(e,t){switch(e){case"keyup":return RS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Th(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $s=!1;function OS(e,t){switch(e){case"compositionend":return Th(t);case"keypress":return t.which!==32?null:(xh=!0,Sh);case"textInput":return e=t.data,e===Sh&&xh?null:e;default:return null}}function BS(e,t){if($s)return e==="compositionend"||!xc&&_h(e,t)?(e=mh(),vo=gc=Oa=null,$s=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return bh&&t.locale!=="ko"?null:t.data;default:return null}}var LS={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 Eh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!LS[e.type]:t==="textarea"}function jh(e,t,a,i){Zs?Xs?Xs.push(i):Xs=[i]:Zs=i,t=ur(t,"onChange"),0<t.length&&(a=new So("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var Ji=null,Wi=null;function US(e){og(e,0)}function _o(e){var t=Zt(e);if(lh(t))return e}function Ch(e,t){if(e==="change")return t}var Ah=!1;if(da){var _c;if(da){var Tc="oninput"in document;if(!Tc){var Nh=document.createElement("div");Nh.setAttribute("oninput","return;"),Tc=typeof Nh.oninput=="function"}_c=Tc}else _c=!1;Ah=_c&&(!document.documentMode||9<document.documentMode)}function wh(){Ji&&(Ji.detachEvent("onpropertychange",Dh),Wi=Ji=null)}function Dh(e){if(e.propertyName==="value"&&_o(Wi)){var t=[];jh(t,Wi,e,hc(e)),hh(US,t)}}function zS(e,t,a){e==="focusin"?(wh(),Ji=t,Wi=a,Ji.attachEvent("onpropertychange",Dh)):e==="focusout"&&wh()}function VS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _o(Wi)}function HS(e,t){if(e==="click")return _o(t)}function GS(e,t){if(e==="input"||e==="change")return _o(t)}function IS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pn=typeof Object.is=="function"?Object.is:IS;function el(e,t){if(pn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var r=a[i];if(!Yt.call(t,r)||!pn(e[r],t[r]))return!1}return!0}function kh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rh(e,t){var a=kh(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=kh(a)}}function Mh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Oh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=po(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=po(e.document)}return t}function Ec(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var PS=da&&"documentMode"in document&&11>=document.documentMode,Fs=null,jc=null,tl=null,Cc=!1;function Bh(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Cc||Fs==null||Fs!==po(i)||(i=Fs,"selectionStart"in i&&Ec(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),tl&&el(tl,i)||(tl=i,i=ur(jc,"onSelect"),0<i.length&&(t=new So("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=Fs)))}function hs(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Qs={animationend:hs("Animation","AnimationEnd"),animationiteration:hs("Animation","AnimationIteration"),animationstart:hs("Animation","AnimationStart"),transitionrun:hs("Transition","TransitionRun"),transitionstart:hs("Transition","TransitionStart"),transitioncancel:hs("Transition","TransitionCancel"),transitionend:hs("Transition","TransitionEnd")},Ac={},Lh={};da&&(Lh=document.createElement("div").style,"AnimationEvent"in window||(delete Qs.animationend.animation,delete Qs.animationiteration.animation,delete Qs.animationstart.animation),"TransitionEvent"in window||delete Qs.transitionend.transition);function ms(e){if(Ac[e])return Ac[e];if(!Qs[e])return e;var t=Qs[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Lh)return Ac[e]=t[a];return e}var Uh=ms("animationend"),zh=ms("animationiteration"),Vh=ms("animationstart"),qS=ms("transitionrun"),YS=ms("transitionstart"),KS=ms("transitioncancel"),Hh=ms("transitionend"),Gh=new Map,Nc="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(" ");Nc.push("scrollEnd");function Kn(e,t){Gh.set(e,t),ds(t,[e])}var To=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Nn=[],Js=0,wc=0;function Eo(){for(var e=Js,t=wc=Js=0;t<e;){var a=Nn[t];Nn[t++]=null;var i=Nn[t];Nn[t++]=null;var r=Nn[t];Nn[t++]=null;var u=Nn[t];if(Nn[t++]=null,i!==null&&r!==null){var g=i.pending;g===null?r.next=r:(r.next=g.next,g.next=r),i.pending=r}u!==0&&Ih(a,r,u)}}function jo(e,t,a,i){Nn[Js++]=e,Nn[Js++]=t,Nn[Js++]=a,Nn[Js++]=i,wc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Dc(e,t,a,i){return jo(e,t,a,i),Co(e)}function ps(e,t){return jo(e,null,null,t),Co(e)}function Ih(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var r=!1,u=e.return;u!==null;)u.childLanes|=a,i=u.alternate,i!==null&&(i.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(r=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,r&&t!==null&&(r=31-ft(a),e=u.hiddenUpdates,i=e[r],i===null?e[r]=[t]:i.push(t),t.lane=a|536870912),u):null}function Co(e){if(50<Tl)throw Tl=0,Vu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ws={};function ZS(e,t,a,i){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gn(e,t,a,i){return new ZS(e,t,a,i)}function kc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fa(e,t){var a=e.alternate;return a===null?(a=gn(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Ph(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ao(e,t,a,i,r,u){var g=0;if(i=e,typeof e=="function")kc(e)&&(g=1);else if(typeof e=="string")g=J1(e,a,we.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=gn(31,a,t,r),e.elementType=ae,e.lanes=u,e;case D:return gs(a.children,r,u,t);case w:g=8,r|=24;break;case C:return e=gn(12,a,t,r|2),e.elementType=C,e.lanes=u,e;case G:return e=gn(13,a,t,r),e.elementType=G,e.lanes=u,e;case W:return e=gn(19,a,t,r),e.elementType=W,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O:g=10;break e;case H:g=9;break e;case F:g=11;break e;case ee:g=14;break e;case $:g=16,i=null;break e}g=29,a=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=gn(g,a,t,r),t.elementType=e,t.type=i,t.lanes=u,t}function gs(e,t,a,i){return e=gn(7,e,i,t),e.lanes=a,e}function Rc(e,t,a){return e=gn(6,e,null,t),e.lanes=a,e}function qh(e){var t=gn(18,null,null,0);return t.stateNode=e,t}function Mc(e,t,a){return t=gn(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Yh=new WeakMap;function wn(e,t){if(typeof e=="object"&&e!==null){var a=Yh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:In(t)},Yh.set(e,t),t)}return{value:e,source:t,stack:In(t)}}var ei=[],ti=0,No=null,nl=0,Dn=[],kn=0,Ba=null,Jn=1,Wn="";function ha(e,t){ei[ti++]=nl,ei[ti++]=No,No=e,nl=t}function Kh(e,t,a){Dn[kn++]=Jn,Dn[kn++]=Wn,Dn[kn++]=Ba,Ba=e;var i=Jn;e=Wn;var r=32-ft(i)-1;i&=~(1<<r),a+=1;var u=32-ft(t)+r;if(30<u){var g=r-r%5;u=(i&(1<<g)-1).toString(32),i>>=g,r-=g,Jn=1<<32-ft(t)+r|a<<r|i,Wn=u+e}else Jn=1<<u|a<<r|i,Wn=e}function Oc(e){e.return!==null&&(ha(e,1),Kh(e,1,0))}function Bc(e){for(;e===No;)No=ei[--ti],ei[ti]=null,nl=ei[--ti],ei[ti]=null;for(;e===Ba;)Ba=Dn[--kn],Dn[kn]=null,Wn=Dn[--kn],Dn[kn]=null,Jn=Dn[--kn],Dn[kn]=null}function Zh(e,t){Dn[kn++]=Jn,Dn[kn++]=Wn,Dn[kn++]=Ba,Jn=t.id,Wn=t.overflow,Ba=e}var Ht=null,st=null,Ie=!1,La=null,Rn=!1,Lc=Error(o(519));function Ua(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw al(wn(t,e)),Lc}function Xh(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[Nt]=e,t[Vt]=i,a){case"dialog":ze("cancel",t),ze("close",t);break;case"iframe":case"object":case"embed":ze("load",t);break;case"video":case"audio":for(a=0;a<jl.length;a++)ze(jl[a],t);break;case"source":ze("error",t);break;case"img":case"image":case"link":ze("error",t),ze("load",t);break;case"details":ze("toggle",t);break;case"input":ze("invalid",t),oh(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":ze("invalid",t);break;case"textarea":ze("invalid",t),ch(t,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||dg(t.textContent,a)?(i.popover!=null&&(ze("beforetoggle",t),ze("toggle",t)),i.onScroll!=null&&ze("scroll",t),i.onScrollEnd!=null&&ze("scrollend",t),i.onClick!=null&&(t.onclick=ua),t=!0):t=!1,t||Ua(e,!0)}function $h(e){for(Ht=e.return;Ht;)switch(Ht.tag){case 5:case 31:case 13:Rn=!1;return;case 27:case 3:Rn=!0;return;default:Ht=Ht.return}}function ni(e){if(e!==Ht)return!1;if(!Ie)return $h(e),Ie=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||ed(e.type,e.memoizedProps)),a=!a),a&&st&&Ua(e),$h(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));st=Sg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));st=Sg(e)}else t===27?(t=st,Qa(e.type)?(e=id,id=null,st=e):st=t):st=Ht?On(e.stateNode.nextSibling):null;return!0}function vs(){st=Ht=null,Ie=!1}function Uc(){var e=La;return e!==null&&(fn===null?fn=e:fn.push.apply(fn,e),La=null),e}function al(e){La===null?La=[e]:La.push(e)}var zc=Ae(null),ys=null,ma=null;function za(e,t,a){me(zc,t._currentValue),t._currentValue=a}function pa(e){e._currentValue=zc.current,Se(zc)}function Vc(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function Hc(e,t,a,i){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var u=r.dependencies;if(u!==null){var g=r.child;u=u.firstContext;e:for(;u!==null;){var x=u;u=r;for(var E=0;E<t.length;E++)if(x.context===t[E]){u.lanes|=a,x=u.alternate,x!==null&&(x.lanes|=a),Vc(u.return,a,e),i||(g=null);break e}u=x.next}}else if(r.tag===18){if(g=r.return,g===null)throw Error(o(341));g.lanes|=a,u=g.alternate,u!==null&&(u.lanes|=a),Vc(g,a,e),g=null}else g=r.child;if(g!==null)g.return=r;else for(g=r;g!==null;){if(g===e){g=null;break}if(r=g.sibling,r!==null){r.return=g.return,g=r;break}g=g.return}r=g}}function ai(e,t,a,i){e=null;for(var r=t,u=!1;r!==null;){if(!u){if((r.flags&524288)!==0)u=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var g=r.alternate;if(g===null)throw Error(o(387));if(g=g.memoizedProps,g!==null){var x=r.type;pn(r.pendingProps.value,g.value)||(e!==null?e.push(x):e=[x])}}else if(r===Pe.current){if(g=r.alternate,g===null)throw Error(o(387));g.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Dl):e=[Dl])}r=r.return}e!==null&&Hc(t,e,a,i),t.flags|=262144}function wo(e){for(e=e.firstContext;e!==null;){if(!pn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function bs(e){ys=e,ma=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Gt(e){return Fh(ys,e)}function Do(e,t){return ys===null&&bs(e),Fh(e,t)}function Fh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ma===null){if(e===null)throw Error(o(308));ma=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ma=ma.next=t;return a}var XS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},$S=n.unstable_scheduleCallback,FS=n.unstable_NormalPriority,wt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Gc(){return{controller:new XS,data:new Map,refCount:0}}function sl(e){e.refCount--,e.refCount===0&&$S(FS,function(){e.controller.abort()})}var il=null,Ic=0,si=0,ii=null;function QS(e,t){if(il===null){var a=il=[];Ic=0,si=Yu(),ii={status:"pending",value:void 0,then:function(i){a.push(i)}}}return Ic++,t.then(Qh,Qh),t}function Qh(){if(--Ic===0&&il!==null){ii!==null&&(ii.status="fulfilled");var e=il;il=null,si=0,ii=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function JS(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(i.status="rejected",i.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),i}var Jh=U.S;U.S=function(e,t){Bp=de(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&QS(e,t),Jh!==null&&Jh(e,t)};var Ss=Ae(null);function Pc(){var e=Ss.current;return e!==null?e:tt.pooledCache}function ko(e,t){t===null?me(Ss,Ss.current):me(Ss,t.pool)}function Wh(){var e=Pc();return e===null?null:{parent:wt._currentValue,pool:e}}var li=Error(o(460)),qc=Error(o(474)),Ro=Error(o(542)),Mo={then:function(){}};function em(e){return e=e.status,e==="fulfilled"||e==="rejected"}function tm(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(ua,ua),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,am(e),e;default:if(typeof t.status=="string")t.then(ua,ua);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=i}},function(i){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,am(e),e}throw _s=t,li}}function xs(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(_s=a,li):a}}var _s=null;function nm(){if(_s===null)throw Error(o(459));var e=_s;return _s=null,e}function am(e){if(e===li||e===Ro)throw Error(o(483))}var oi=null,ll=0;function Oo(e){var t=ll;return ll+=1,oi===null&&(oi=[]),tm(oi,e,t)}function ol(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Bo(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function sm(e){function t(k,j){if(e){var R=k.deletions;R===null?(k.deletions=[j],k.flags|=16):R.push(j)}}function a(k,j){if(!e)return null;for(;j!==null;)t(k,j),j=j.sibling;return null}function i(k){for(var j=new Map;k!==null;)k.key!==null?j.set(k.key,k):j.set(k.index,k),k=k.sibling;return j}function r(k,j){return k=fa(k,j),k.index=0,k.sibling=null,k}function u(k,j,R){return k.index=R,e?(R=k.alternate,R!==null?(R=R.index,R<j?(k.flags|=67108866,j):R):(k.flags|=67108866,j)):(k.flags|=1048576,j)}function g(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function x(k,j,R,Y){return j===null||j.tag!==6?(j=Rc(R,k.mode,Y),j.return=k,j):(j=r(j,R),j.return=k,j)}function E(k,j,R,Y){var ye=R.type;return ye===D?I(k,j,R.props.children,Y,R.key):j!==null&&(j.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===$&&xs(ye)===j.type)?(j=r(j,R.props),ol(j,R),j.return=k,j):(j=Ao(R.type,R.key,R.props,null,k.mode,Y),ol(j,R),j.return=k,j)}function M(k,j,R,Y){return j===null||j.tag!==4||j.stateNode.containerInfo!==R.containerInfo||j.stateNode.implementation!==R.implementation?(j=Mc(R,k.mode,Y),j.return=k,j):(j=r(j,R.children||[]),j.return=k,j)}function I(k,j,R,Y,ye){return j===null||j.tag!==7?(j=gs(R,k.mode,Y,ye),j.return=k,j):(j=r(j,R),j.return=k,j)}function Z(k,j,R){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Rc(""+j,k.mode,R),j.return=k,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case T:return R=Ao(j.type,j.key,j.props,null,k.mode,R),ol(R,j),R.return=k,R;case N:return j=Mc(j,k.mode,R),j.return=k,j;case $:return j=xs(j),Z(k,j,R)}if(P(j)||be(j))return j=gs(j,k.mode,R,null),j.return=k,j;if(typeof j.then=="function")return Z(k,Oo(j),R);if(j.$$typeof===O)return Z(k,Do(k,j),R);Bo(k,j)}return null}function B(k,j,R,Y){var ye=j!==null?j.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return ye!==null?null:x(k,j,""+R,Y);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case T:return R.key===ye?E(k,j,R,Y):null;case N:return R.key===ye?M(k,j,R,Y):null;case $:return R=xs(R),B(k,j,R,Y)}if(P(R)||be(R))return ye!==null?null:I(k,j,R,Y,null);if(typeof R.then=="function")return B(k,j,Oo(R),Y);if(R.$$typeof===O)return B(k,j,Do(k,R),Y);Bo(k,R)}return null}function z(k,j,R,Y,ye){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return k=k.get(R)||null,x(j,k,""+Y,ye);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case T:return k=k.get(Y.key===null?R:Y.key)||null,E(j,k,Y,ye);case N:return k=k.get(Y.key===null?R:Y.key)||null,M(j,k,Y,ye);case $:return Y=xs(Y),z(k,j,R,Y,ye)}if(P(Y)||be(Y))return k=k.get(R)||null,I(j,k,Y,ye,null);if(typeof Y.then=="function")return z(k,j,R,Oo(Y),ye);if(Y.$$typeof===O)return z(k,j,R,Do(j,Y),ye);Bo(j,Y)}return null}function ce(k,j,R,Y){for(var ye=null,qe=null,ge=j,ke=j=0,Ge=null;ge!==null&&ke<R.length;ke++){ge.index>ke?(Ge=ge,ge=null):Ge=ge.sibling;var Ye=B(k,ge,R[ke],Y);if(Ye===null){ge===null&&(ge=Ge);break}e&&ge&&Ye.alternate===null&&t(k,ge),j=u(Ye,j,ke),qe===null?ye=Ye:qe.sibling=Ye,qe=Ye,ge=Ge}if(ke===R.length)return a(k,ge),Ie&&ha(k,ke),ye;if(ge===null){for(;ke<R.length;ke++)ge=Z(k,R[ke],Y),ge!==null&&(j=u(ge,j,ke),qe===null?ye=ge:qe.sibling=ge,qe=ge);return Ie&&ha(k,ke),ye}for(ge=i(ge);ke<R.length;ke++)Ge=z(ge,k,ke,R[ke],Y),Ge!==null&&(e&&Ge.alternate!==null&&ge.delete(Ge.key===null?ke:Ge.key),j=u(Ge,j,ke),qe===null?ye=Ge:qe.sibling=Ge,qe=Ge);return e&&ge.forEach(function(ns){return t(k,ns)}),Ie&&ha(k,ke),ye}function xe(k,j,R,Y){if(R==null)throw Error(o(151));for(var ye=null,qe=null,ge=j,ke=j=0,Ge=null,Ye=R.next();ge!==null&&!Ye.done;ke++,Ye=R.next()){ge.index>ke?(Ge=ge,ge=null):Ge=ge.sibling;var ns=B(k,ge,Ye.value,Y);if(ns===null){ge===null&&(ge=Ge);break}e&&ge&&ns.alternate===null&&t(k,ge),j=u(ns,j,ke),qe===null?ye=ns:qe.sibling=ns,qe=ns,ge=Ge}if(Ye.done)return a(k,ge),Ie&&ha(k,ke),ye;if(ge===null){for(;!Ye.done;ke++,Ye=R.next())Ye=Z(k,Ye.value,Y),Ye!==null&&(j=u(Ye,j,ke),qe===null?ye=Ye:qe.sibling=Ye,qe=Ye);return Ie&&ha(k,ke),ye}for(ge=i(ge);!Ye.done;ke++,Ye=R.next())Ye=z(ge,k,ke,Ye.value,Y),Ye!==null&&(e&&Ye.alternate!==null&&ge.delete(Ye.key===null?ke:Ye.key),j=u(Ye,j,ke),qe===null?ye=Ye:qe.sibling=Ye,qe=Ye);return e&&ge.forEach(function(cx){return t(k,cx)}),Ie&&ha(k,ke),ye}function et(k,j,R,Y){if(typeof R=="object"&&R!==null&&R.type===D&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case T:e:{for(var ye=R.key;j!==null;){if(j.key===ye){if(ye=R.type,ye===D){if(j.tag===7){a(k,j.sibling),Y=r(j,R.props.children),Y.return=k,k=Y;break e}}else if(j.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===$&&xs(ye)===j.type){a(k,j.sibling),Y=r(j,R.props),ol(Y,R),Y.return=k,k=Y;break e}a(k,j);break}else t(k,j);j=j.sibling}R.type===D?(Y=gs(R.props.children,k.mode,Y,R.key),Y.return=k,k=Y):(Y=Ao(R.type,R.key,R.props,null,k.mode,Y),ol(Y,R),Y.return=k,k=Y)}return g(k);case N:e:{for(ye=R.key;j!==null;){if(j.key===ye)if(j.tag===4&&j.stateNode.containerInfo===R.containerInfo&&j.stateNode.implementation===R.implementation){a(k,j.sibling),Y=r(j,R.children||[]),Y.return=k,k=Y;break e}else{a(k,j);break}else t(k,j);j=j.sibling}Y=Mc(R,k.mode,Y),Y.return=k,k=Y}return g(k);case $:return R=xs(R),et(k,j,R,Y)}if(P(R))return ce(k,j,R,Y);if(be(R)){if(ye=be(R),typeof ye!="function")throw Error(o(150));return R=ye.call(R),xe(k,j,R,Y)}if(typeof R.then=="function")return et(k,j,Oo(R),Y);if(R.$$typeof===O)return et(k,j,Do(k,R),Y);Bo(k,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,j!==null&&j.tag===6?(a(k,j.sibling),Y=r(j,R),Y.return=k,k=Y):(a(k,j),Y=Rc(R,k.mode,Y),Y.return=k,k=Y),g(k)):a(k,j)}return function(k,j,R,Y){try{ll=0;var ye=et(k,j,R,Y);return oi=null,ye}catch(ge){if(ge===li||ge===Ro)throw ge;var qe=gn(29,ge,null,k.mode);return qe.lanes=Y,qe.return=k,qe}finally{}}}var Ts=sm(!0),im=sm(!1),Va=!1;function Yc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Kc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Ke&2)!==0){var r=i.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),i.pending=t,t=Co(e),Ih(e,null,a),t}return jo(e,i,t,a),Co(e)}function rl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Pi(e,a)}}function Zc(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var r=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?r=u=g:u=u.next=g,a=a.next}while(a!==null);u===null?r=u=t:u=u.next=t}else r=u=t;a={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:u,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Xc=!1;function cl(){if(Xc){var e=ii;if(e!==null)throw e}}function ul(e,t,a,i){Xc=!1;var r=e.updateQueue;Va=!1;var u=r.firstBaseUpdate,g=r.lastBaseUpdate,x=r.shared.pending;if(x!==null){r.shared.pending=null;var E=x,M=E.next;E.next=null,g===null?u=M:g.next=M,g=E;var I=e.alternate;I!==null&&(I=I.updateQueue,x=I.lastBaseUpdate,x!==g&&(x===null?I.firstBaseUpdate=M:x.next=M,I.lastBaseUpdate=E))}if(u!==null){var Z=r.baseState;g=0,I=M=E=null,x=u;do{var B=x.lane&-536870913,z=B!==x.lane;if(z?(He&B)===B:(i&B)===B){B!==0&&B===si&&(Xc=!0),I!==null&&(I=I.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ce=e,xe=x;B=t;var et=a;switch(xe.tag){case 1:if(ce=xe.payload,typeof ce=="function"){Z=ce.call(et,Z,B);break e}Z=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=xe.payload,B=typeof ce=="function"?ce.call(et,Z,B):ce,B==null)break e;Z=b({},Z,B);break e;case 2:Va=!0}}B=x.callback,B!==null&&(e.flags|=64,z&&(e.flags|=8192),z=r.callbacks,z===null?r.callbacks=[B]:z.push(B))}else z={lane:B,tag:x.tag,payload:x.payload,callback:x.callback,next:null},I===null?(M=I=z,E=Z):I=I.next=z,g|=B;if(x=x.next,x===null){if(x=r.shared.pending,x===null)break;z=x,x=z.next,z.next=null,r.lastBaseUpdate=z,r.shared.pending=null}}while(!0);I===null&&(E=Z),r.baseState=E,r.firstBaseUpdate=M,r.lastBaseUpdate=I,u===null&&(r.shared.lanes=0),Ka|=g,e.lanes=g,e.memoizedState=Z}}function lm(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function om(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)lm(a[e],t)}var ri=Ae(null),Lo=Ae(0);function rm(e,t){e=Ea,me(Lo,e),me(ri,t),Ea=e|t.baseLanes}function $c(){me(Lo,Ea),me(ri,ri.current)}function Fc(){Ea=Lo.current,Se(ri),Se(Lo)}var vn=Ae(null),Mn=null;function Ia(e){var t=e.alternate;me(_t,_t.current&1),me(vn,e),Mn===null&&(t===null||ri.current!==null||t.memoizedState!==null)&&(Mn=e)}function Qc(e){me(_t,_t.current),me(vn,e),Mn===null&&(Mn=e)}function cm(e){e.tag===22?(me(_t,_t.current),me(vn,e),Mn===null&&(Mn=e)):Pa()}function Pa(){me(_t,_t.current),me(vn,vn.current)}function yn(e){Se(vn),Mn===e&&(Mn=null),Se(_t)}var _t=Ae(0);function Uo(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||ad(a)||sd(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ga=0,De=null,Je=null,Dt=null,zo=!1,ci=!1,Es=!1,Vo=0,dl=0,ui=null,WS=0;function vt(){throw Error(o(321))}function Jc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!pn(e[a],t[a]))return!1;return!0}function Wc(e,t,a,i,r,u){return ga=u,De=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Km:mu,Es=!1,u=a(i,r),Es=!1,ci&&(u=dm(t,a,i,r)),um(e),u}function um(e){U.H=ml;var t=Je!==null&&Je.next!==null;if(ga=0,Dt=Je=De=null,zo=!1,dl=0,ui=null,t)throw Error(o(300));e===null||kt||(e=e.dependencies,e!==null&&wo(e)&&(kt=!0))}function dm(e,t,a,i){De=e;var r=0;do{if(ci&&(ui=null),dl=0,ci=!1,25<=r)throw Error(o(301));if(r+=1,Dt=Je=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}U.H=Zm,u=t(a,i)}while(ci);return u}function e1(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?fl(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(De.flags|=1024),t}function eu(){var e=Vo!==0;return Vo=0,e}function tu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function nu(e){if(zo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}zo=!1}ga=0,Dt=Je=De=null,ci=!1,dl=Vo=0,ui=null}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?De.memoizedState=Dt=e:Dt=Dt.next=e,Dt}function Tt(){if(Je===null){var e=De.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=Dt===null?De.memoizedState:Dt.next;if(t!==null)Dt=t,Je=e;else{if(e===null)throw De.alternate===null?Error(o(467)):Error(o(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},Dt===null?De.memoizedState=Dt=e:Dt=Dt.next=e}return Dt}function Ho(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fl(e){var t=dl;return dl+=1,ui===null&&(ui=[]),e=tm(ui,e,t),t=De,(Dt===null?t.memoizedState:Dt.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Km:mu),e}function Go(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return fl(e);if(e.$$typeof===O)return Gt(e)}throw Error(o(438,String(e)))}function au(e){var t=null,a=De.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=De.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ho(),De.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=_e;return t.index++,a}function va(e,t){return typeof t=="function"?t(e):t}function Io(e){var t=Tt();return su(t,Je,e)}function su(e,t,a){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=a;var r=e.baseQueue,u=i.pending;if(u!==null){if(r!==null){var g=r.next;r.next=u.next,u.next=g}t.baseQueue=r=u,i.pending=null}if(u=e.baseState,r===null)e.memoizedState=u;else{t=r.next;var x=g=null,E=null,M=t,I=!1;do{var Z=M.lane&-536870913;if(Z!==M.lane?(He&Z)===Z:(ga&Z)===Z){var B=M.revertLane;if(B===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),Z===si&&(I=!0);else if((ga&B)===B){M=M.next,B===si&&(I=!0);continue}else Z={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},E===null?(x=E=Z,g=u):E=E.next=Z,De.lanes|=B,Ka|=B;Z=M.action,Es&&a(u,Z),u=M.hasEagerState?M.eagerState:a(u,Z)}else B={lane:Z,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},E===null?(x=E=B,g=u):E=E.next=B,De.lanes|=Z,Ka|=Z;M=M.next}while(M!==null&&M!==t);if(E===null?g=u:E.next=x,!pn(u,e.memoizedState)&&(kt=!0,I&&(a=ii,a!==null)))throw a;e.memoizedState=u,e.baseState=g,e.baseQueue=E,i.lastRenderedState=u}return r===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function iu(e){var t=Tt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var i=a.dispatch,r=a.pending,u=t.memoizedState;if(r!==null){a.pending=null;var g=r=r.next;do u=e(u,g.action),g=g.next;while(g!==r);pn(u,t.memoizedState)||(kt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,i]}function fm(e,t,a){var i=De,r=Tt(),u=Ie;if(u){if(a===void 0)throw Error(o(407));a=a()}else a=t();var g=!pn((Je||r).memoizedState,a);if(g&&(r.memoizedState=a,kt=!0),r=r.queue,ru(pm.bind(null,i,r,e),[e]),r.getSnapshot!==t||g||Dt!==null&&Dt.memoizedState.tag&1){if(i.flags|=2048,di(9,{destroy:void 0},mm.bind(null,i,r,a,t),null),tt===null)throw Error(o(349));u||(ga&127)!==0||hm(i,t,a)}return a}function hm(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=De.updateQueue,t===null?(t=Ho(),De.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function mm(e,t,a,i){t.value=a,t.getSnapshot=i,gm(t)&&vm(e)}function pm(e,t,a){return a(function(){gm(t)&&vm(e)})}function gm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!pn(e,a)}catch{return!0}}function vm(e){var t=ps(e,2);t!==null&&hn(t,e,2)}function lu(e){var t=en();if(typeof e=="function"){var a=e;if(e=a(),Es){Wt(!0);try{a()}finally{Wt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:e},t}function ym(e,t,a,i){return e.baseState=a,su(e,Je,typeof i=="function"?i:va)}function t1(e,t,a,i,r){if(Yo(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){u.listeners.push(g)}};U.T!==null?a(!0):u.isTransition=!1,i(u),a=t.pending,a===null?(u.next=t.pending=u,bm(t,u)):(u.next=a.next,t.pending=a.next=u)}}function bm(e,t){var a=t.action,i=t.payload,r=e.state;if(t.isTransition){var u=U.T,g={};U.T=g;try{var x=a(r,i),E=U.S;E!==null&&E(g,x),Sm(e,t,x)}catch(M){ou(e,t,M)}finally{u!==null&&g.types!==null&&(u.types=g.types),U.T=u}}else try{u=a(r,i),Sm(e,t,u)}catch(M){ou(e,t,M)}}function Sm(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){xm(e,t,i)},function(i){return ou(e,t,i)}):xm(e,t,a)}function xm(e,t,a){t.status="fulfilled",t.value=a,_m(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,bm(e,a)))}function ou(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,_m(t),t=t.next;while(t!==i)}e.action=null}function _m(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Tm(e,t){return t}function Em(e,t){if(Ie){var a=tt.formState;if(a!==null){e:{var i=De;if(Ie){if(st){t:{for(var r=st,u=Rn;r.nodeType!==8;){if(!u){r=null;break t}if(r=On(r.nextSibling),r===null){r=null;break t}}u=r.data,r=u==="F!"||u==="F"?r:null}if(r){st=On(r.nextSibling),i=r.data==="F!";break e}}Ua(i)}i=!1}i&&(t=a[0])}}return a=en(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tm,lastRenderedState:t},a.queue=i,a=Pm.bind(null,De,i),i.dispatch=a,i=lu(!1),u=hu.bind(null,De,!1,i.queue),i=en(),r={state:t,dispatch:null,action:e,pending:null},i.queue=r,a=t1.bind(null,De,r,u,a),r.dispatch=a,i.memoizedState=e,[t,a,!1]}function jm(e){var t=Tt();return Cm(t,Je,e)}function Cm(e,t,a){if(t=su(e,t,Tm)[0],e=Io(va)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=fl(t)}catch(g){throw g===li?Ro:g}else i=t;t=Tt();var r=t.queue,u=r.dispatch;return a!==t.memoizedState&&(De.flags|=2048,di(9,{destroy:void 0},n1.bind(null,r,a),null)),[i,u,e]}function n1(e,t){e.action=t}function Am(e){var t=Tt(),a=Je;if(a!==null)return Cm(t,a,e);Tt(),t=t.memoizedState,a=Tt();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function di(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=De.updateQueue,t===null&&(t=Ho(),De.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function Nm(){return Tt().memoizedState}function Po(e,t,a,i){var r=en();De.flags|=e,r.memoizedState=di(1|t,{destroy:void 0},a,i===void 0?null:i)}function qo(e,t,a,i){var r=Tt();i=i===void 0?null:i;var u=r.memoizedState.inst;Je!==null&&i!==null&&Jc(i,Je.memoizedState.deps)?r.memoizedState=di(t,u,a,i):(De.flags|=e,r.memoizedState=di(1|t,u,a,i))}function wm(e,t){Po(8390656,8,e,t)}function ru(e,t){qo(2048,8,e,t)}function a1(e){De.flags|=4;var t=De.updateQueue;if(t===null)t=Ho(),De.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Dm(e){var t=Tt().memoizedState;return a1({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function km(e,t){return qo(4,2,e,t)}function Rm(e,t){return qo(4,4,e,t)}function Mm(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Om(e,t,a){a=a!=null?a.concat([e]):null,qo(4,4,Mm.bind(null,t,e),a)}function cu(){}function Bm(e,t){var a=Tt();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&Jc(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function Lm(e,t){var a=Tt();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&Jc(t,i[1]))return i[0];if(i=e(),Es){Wt(!0);try{e()}finally{Wt(!1)}}return a.memoizedState=[i,t],i}function uu(e,t,a){return a===void 0||(ga&1073741824)!==0&&(He&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Up(),De.lanes|=e,Ka|=e,a)}function Um(e,t,a,i){return pn(a,t)?a:ri.current!==null?(e=uu(e,a,i),pn(e,t)||(kt=!0),e):(ga&42)===0||(ga&1073741824)!==0&&(He&261930)===0?(kt=!0,e.memoizedState=a):(e=Up(),De.lanes|=e,Ka|=e,t)}function zm(e,t,a,i,r){var u=K.p;K.p=u!==0&&8>u?u:8;var g=U.T,x={};U.T=x,hu(e,!1,t,a);try{var E=r(),M=U.S;if(M!==null&&M(x,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var I=JS(E,i);hl(e,t,I,xn(e))}else hl(e,t,i,xn(e))}catch(Z){hl(e,t,{then:function(){},status:"rejected",reason:Z},xn())}finally{K.p=u,g!==null&&x.types!==null&&(g.types=x.types),U.T=g}}function s1(){}function du(e,t,a,i){if(e.tag!==5)throw Error(o(476));var r=Vm(e).queue;zm(e,r,t,V,a===null?s1:function(){return Hm(e),a(i)})}function Vm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:V},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hm(e){var t=Vm(e);t.next===null&&(t=e.alternate.memoizedState),hl(e,t.next.queue,{},xn())}function fu(){return Gt(Dl)}function Gm(){return Tt().memoizedState}function Im(){return Tt().memoizedState}function i1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=xn();e=Ha(a);var i=Ga(t,e,a);i!==null&&(hn(i,t,a),rl(i,t,a)),t={cache:Gc()},e.payload=t;return}t=t.return}}function l1(e,t,a){var i=xn();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Yo(e)?qm(t,a):(a=Dc(e,t,a,i),a!==null&&(hn(a,e,i),Ym(a,t,i)))}function Pm(e,t,a){var i=xn();hl(e,t,a,i)}function hl(e,t,a,i){var r={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Yo(e))qm(t,r);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var g=t.lastRenderedState,x=u(g,a);if(r.hasEagerState=!0,r.eagerState=x,pn(x,g))return jo(e,t,r,0),tt===null&&Eo(),!1}catch{}finally{}if(a=Dc(e,t,r,i),a!==null)return hn(a,e,i),Ym(a,t,i),!0}return!1}function hu(e,t,a,i){if(i={lane:2,revertLane:Yu(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Yo(e)){if(t)throw Error(o(479))}else t=Dc(e,a,i,2),t!==null&&hn(t,e,2)}function Yo(e){var t=e.alternate;return e===De||t!==null&&t===De}function qm(e,t){ci=zo=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Ym(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Pi(e,a)}}var ml={readContext:Gt,use:Go,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useLayoutEffect:vt,useInsertionEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useSyncExternalStore:vt,useId:vt,useHostTransitionStatus:vt,useFormState:vt,useActionState:vt,useOptimistic:vt,useMemoCache:vt,useCacheRefresh:vt};ml.useEffectEvent=vt;var Km={readContext:Gt,use:Go,useCallback:function(e,t){return en().memoizedState=[e,t===void 0?null:t],e},useContext:Gt,useEffect:wm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Po(4194308,4,Mm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Po(4194308,4,e,t)},useInsertionEffect:function(e,t){Po(4,2,e,t)},useMemo:function(e,t){var a=en();t=t===void 0?null:t;var i=e();if(Es){Wt(!0);try{e()}finally{Wt(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=en();if(a!==void 0){var r=a(t);if(Es){Wt(!0);try{a(t)}finally{Wt(!1)}}}else r=t;return i.memoizedState=i.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},i.queue=e,e=e.dispatch=l1.bind(null,De,e),[i.memoizedState,e]},useRef:function(e){var t=en();return e={current:e},t.memoizedState=e},useState:function(e){e=lu(e);var t=e.queue,a=Pm.bind(null,De,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:cu,useDeferredValue:function(e,t){var a=en();return uu(a,e,t)},useTransition:function(){var e=lu(!1);return e=zm.bind(null,De,e.queue,!0,!1),en().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=De,r=en();if(Ie){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),tt===null)throw Error(o(349));(He&127)!==0||hm(i,t,a)}r.memoizedState=a;var u={value:a,getSnapshot:t};return r.queue=u,wm(pm.bind(null,i,u,e),[e]),i.flags|=2048,di(9,{destroy:void 0},mm.bind(null,i,u,a,t),null),a},useId:function(){var e=en(),t=tt.identifierPrefix;if(Ie){var a=Wn,i=Jn;a=(i&~(1<<32-ft(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Vo++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=WS++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:fu,useFormState:Em,useActionState:Em,useOptimistic:function(e){var t=en();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=hu.bind(null,De,!0,a),a.dispatch=t,[e,t]},useMemoCache:au,useCacheRefresh:function(){return en().memoizedState=i1.bind(null,De)},useEffectEvent:function(e){var t=en(),a={impl:e};return t.memoizedState=a,function(){if((Ke&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},mu={readContext:Gt,use:Go,useCallback:Bm,useContext:Gt,useEffect:ru,useImperativeHandle:Om,useInsertionEffect:km,useLayoutEffect:Rm,useMemo:Lm,useReducer:Io,useRef:Nm,useState:function(){return Io(va)},useDebugValue:cu,useDeferredValue:function(e,t){var a=Tt();return Um(a,Je.memoizedState,e,t)},useTransition:function(){var e=Io(va)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:fl(e),t]},useSyncExternalStore:fm,useId:Gm,useHostTransitionStatus:fu,useFormState:jm,useActionState:jm,useOptimistic:function(e,t){var a=Tt();return ym(a,Je,e,t)},useMemoCache:au,useCacheRefresh:Im};mu.useEffectEvent=Dm;var Zm={readContext:Gt,use:Go,useCallback:Bm,useContext:Gt,useEffect:ru,useImperativeHandle:Om,useInsertionEffect:km,useLayoutEffect:Rm,useMemo:Lm,useReducer:iu,useRef:Nm,useState:function(){return iu(va)},useDebugValue:cu,useDeferredValue:function(e,t){var a=Tt();return Je===null?uu(a,e,t):Um(a,Je.memoizedState,e,t)},useTransition:function(){var e=iu(va)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:fl(e),t]},useSyncExternalStore:fm,useId:Gm,useHostTransitionStatus:fu,useFormState:Am,useActionState:Am,useOptimistic:function(e,t){var a=Tt();return Je!==null?ym(a,Je,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:au,useCacheRefresh:Im};Zm.useEffectEvent=Dm;function pu(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:b({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var gu={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=xn(),r=Ha(i);r.payload=t,a!=null&&(r.callback=a),t=Ga(e,r,i),t!==null&&(hn(t,e,i),rl(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=xn(),r=Ha(i);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=Ga(e,r,i),t!==null&&(hn(t,e,i),rl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=xn(),i=Ha(a);i.tag=2,t!=null&&(i.callback=t),t=Ga(e,i,a),t!==null&&(hn(t,e,a),rl(t,e,a))}};function Xm(e,t,a,i,r,u,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,u,g):t.prototype&&t.prototype.isPureReactComponent?!el(a,i)||!el(r,u):!0}function $m(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&gu.enqueueReplaceState(t,t.state,null)}function js(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=b({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function Fm(e){To(e)}function Qm(e){console.error(e)}function Jm(e){To(e)}function Ko(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Wm(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function vu(e,t,a){return a=Ha(a),a.tag=3,a.payload={element:null},a.callback=function(){Ko(e,t)},a}function ep(e){return e=Ha(e),e.tag=3,e}function tp(e,t,a,i){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var u=i.value;e.payload=function(){return r(u)},e.callback=function(){Wm(t,a,i)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Wm(t,a,i),typeof r!="function"&&(Za===null?Za=new Set([this]):Za.add(this));var x=i.stack;this.componentDidCatch(i.value,{componentStack:x!==null?x:""})})}function o1(e,t,a,i,r){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&ai(t,a,r,!0),a=vn.current,a!==null){switch(a.tag){case 31:case 13:return Mn===null?sr():a.alternate===null&&yt===0&&(yt=3),a.flags&=-257,a.flags|=65536,a.lanes=r,i===Mo?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),Iu(e,i,r)),!1;case 22:return a.flags|=65536,i===Mo?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),Iu(e,i,r)),!1}throw Error(o(435,a.tag))}return Iu(e,i,r),sr(),!1}if(Ie)return t=vn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,i!==Lc&&(e=Error(o(422),{cause:i}),al(wn(e,a)))):(i!==Lc&&(t=Error(o(423),{cause:i}),al(wn(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,i=wn(i,a),r=vu(e.stateNode,i,r),Zc(e,r),yt!==4&&(yt=2)),!1;var u=Error(o(520),{cause:i});if(u=wn(u,a),_l===null?_l=[u]:_l.push(u),yt!==4&&(yt=2),t===null)return!0;i=wn(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=vu(a.stateNode,i,e),Zc(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Za===null||!Za.has(u))))return a.flags|=65536,r&=-r,a.lanes|=r,r=ep(r),tp(r,e,a,i),Zc(a,r),!1}a=a.return}while(a!==null);return!1}var yu=Error(o(461)),kt=!1;function It(e,t,a,i){t.child=e===null?im(t,null,a,i):Ts(t,e.child,a,i)}function np(e,t,a,i,r){a=a.render;var u=t.ref;if("ref"in i){var g={};for(var x in i)x!=="ref"&&(g[x]=i[x])}else g=i;return bs(t),i=Wc(e,t,a,g,u,r),x=eu(),e!==null&&!kt?(tu(e,t,r),ya(e,t,r)):(Ie&&x&&Oc(t),t.flags|=1,It(e,t,i,r),t.child)}function ap(e,t,a,i,r){if(e===null){var u=a.type;return typeof u=="function"&&!kc(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,sp(e,t,u,i,r)):(e=Ao(a.type,null,i,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Cu(e,r)){var g=u.memoizedProps;if(a=a.compare,a=a!==null?a:el,a(g,i)&&e.ref===t.ref)return ya(e,t,r)}return t.flags|=1,e=fa(u,i),e.ref=t.ref,e.return=t,t.child=e}function sp(e,t,a,i,r){if(e!==null){var u=e.memoizedProps;if(el(u,i)&&e.ref===t.ref)if(kt=!1,t.pendingProps=i=u,Cu(e,r))(e.flags&131072)!==0&&(kt=!0);else return t.lanes=e.lanes,ya(e,t,r)}return bu(e,t,a,i,r)}function ip(e,t,a,i){var r=i.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(i=t.child=e.child,r=0;i!==null;)r=r|i.lanes|i.childLanes,i=i.sibling;i=r&~u}else i=0,t.child=null;return lp(e,t,u,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ko(t,u!==null?u.cachePool:null),u!==null?rm(t,u):$c(),cm(t);else return i=t.lanes=536870912,lp(e,t,u!==null?u.baseLanes|a:a,a,i)}else u!==null?(ko(t,u.cachePool),rm(t,u),Pa(),t.memoizedState=null):(e!==null&&ko(t,null),$c(),Pa());return It(e,t,r,a),t.child}function pl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lp(e,t,a,i,r){var u=Pc();return u=u===null?null:{parent:wt._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&ko(t,null),$c(),cm(t),e!==null&&ai(e,t,i,!0),t.childLanes=r,null}function Zo(e,t){return t=$o({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function op(e,t,a){return Ts(t,e.child,null,a),e=Zo(t,t.pendingProps),e.flags|=2,yn(t),t.memoizedState=null,e}function r1(e,t,a){var i=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ie){if(i.mode==="hidden")return e=Zo(t,i),t.lanes=536870912,pl(null,e);if(Qc(t),(e=st)?(e=bg(e,Rn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ba!==null?{id:Jn,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},a=qh(e),a.return=t,t.child=a,Ht=t,st=null)):e=null,e===null)throw Ua(t);return t.lanes=536870912,null}return Zo(t,i)}var u=e.memoizedState;if(u!==null){var g=u.dehydrated;if(Qc(t),r)if(t.flags&256)t.flags&=-257,t=op(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(kt||ai(e,t,a,!1),r=(a&e.childLanes)!==0,kt||r){if(i=tt,i!==null&&(g=qi(i,a),g!==0&&g!==u.retryLane))throw u.retryLane=g,ps(e,g),hn(i,e,g),yu;sr(),t=op(e,t,a)}else e=u.treeContext,st=On(g.nextSibling),Ht=t,Ie=!0,La=null,Rn=!1,e!==null&&Zh(t,e),t=Zo(t,i),t.flags|=4096;return t}return e=fa(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Xo(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function bu(e,t,a,i,r){return bs(t),a=Wc(e,t,a,i,void 0,r),i=eu(),e!==null&&!kt?(tu(e,t,r),ya(e,t,r)):(Ie&&i&&Oc(t),t.flags|=1,It(e,t,a,r),t.child)}function rp(e,t,a,i,r,u){return bs(t),t.updateQueue=null,a=dm(t,i,a,r),um(e),i=eu(),e!==null&&!kt?(tu(e,t,u),ya(e,t,u)):(Ie&&i&&Oc(t),t.flags|=1,It(e,t,a,u),t.child)}function cp(e,t,a,i,r){if(bs(t),t.stateNode===null){var u=Ws,g=a.contextType;typeof g=="object"&&g!==null&&(u=Gt(g)),u=new a(i,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=gu,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=i,u.state=t.memoizedState,u.refs={},Yc(t),g=a.contextType,u.context=typeof g=="object"&&g!==null?Gt(g):Ws,u.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(pu(t,a,g,i),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(g=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),g!==u.state&&gu.enqueueReplaceState(u,u.state,null),ul(t,i,u,r),cl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){u=t.stateNode;var x=t.memoizedProps,E=js(a,x);u.props=E;var M=u.context,I=a.contextType;g=Ws,typeof I=="object"&&I!==null&&(g=Gt(I));var Z=a.getDerivedStateFromProps;I=typeof Z=="function"||typeof u.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,I||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(x||M!==g)&&$m(t,u,i,g),Va=!1;var B=t.memoizedState;u.state=B,ul(t,i,u,r),cl(),M=t.memoizedState,x||B!==M||Va?(typeof Z=="function"&&(pu(t,a,Z,i),M=t.memoizedState),(E=Va||Xm(t,a,E,i,B,M,g))?(I||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=M),u.props=i,u.state=M,u.context=g,i=E):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{u=t.stateNode,Kc(e,t),g=t.memoizedProps,I=js(a,g),u.props=I,Z=t.pendingProps,B=u.context,M=a.contextType,E=Ws,typeof M=="object"&&M!==null&&(E=Gt(M)),x=a.getDerivedStateFromProps,(M=typeof x=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(g!==Z||B!==E)&&$m(t,u,i,E),Va=!1,B=t.memoizedState,u.state=B,ul(t,i,u,r),cl();var z=t.memoizedState;g!==Z||B!==z||Va||e!==null&&e.dependencies!==null&&wo(e.dependencies)?(typeof x=="function"&&(pu(t,a,x,i),z=t.memoizedState),(I=Va||Xm(t,a,I,i,B,z,E)||e!==null&&e.dependencies!==null&&wo(e.dependencies))?(M||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(i,z,E),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(i,z,E)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=z),u.props=i,u.state=z,u.context=E,i=I):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),i=!1)}return u=i,Xo(e,t),i=(t.flags&128)!==0,u||i?(u=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&i?(t.child=Ts(t,e.child,null,r),t.child=Ts(t,null,a,r)):It(e,t,a,r),t.memoizedState=u.state,e=t.child):e=ya(e,t,r),e}function up(e,t,a,i){return vs(),t.flags|=256,It(e,t,a,i),t.child}var Su={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xu(e){return{baseLanes:e,cachePool:Wh()}}function _u(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Sn),e}function dp(e,t,a){var i=t.pendingProps,r=!1,u=(t.flags&128)!==0,g;if((g=u)||(g=e!==null&&e.memoizedState===null?!1:(_t.current&2)!==0),g&&(r=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ie){if(r?Ia(t):Pa(),(e=st)?(e=bg(e,Rn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ba!==null?{id:Jn,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},a=qh(e),a.return=t,t.child=a,Ht=t,st=null)):e=null,e===null)throw Ua(t);return sd(e)?t.lanes=32:t.lanes=536870912,null}var x=i.children;return i=i.fallback,r?(Pa(),r=t.mode,x=$o({mode:"hidden",children:x},r),i=gs(i,r,a,null),x.return=t,i.return=t,x.sibling=i,t.child=x,i=t.child,i.memoizedState=xu(a),i.childLanes=_u(e,g,a),t.memoizedState=Su,pl(null,i)):(Ia(t),Tu(t,x))}var E=e.memoizedState;if(E!==null&&(x=E.dehydrated,x!==null)){if(u)t.flags&256?(Ia(t),t.flags&=-257,t=Eu(e,t,a)):t.memoizedState!==null?(Pa(),t.child=e.child,t.flags|=128,t=null):(Pa(),x=i.fallback,r=t.mode,i=$o({mode:"visible",children:i.children},r),x=gs(x,r,a,null),x.flags|=2,i.return=t,x.return=t,i.sibling=x,t.child=i,Ts(t,e.child,null,a),i=t.child,i.memoizedState=xu(a),i.childLanes=_u(e,g,a),t.memoizedState=Su,t=pl(null,i));else if(Ia(t),sd(x)){if(g=x.nextSibling&&x.nextSibling.dataset,g)var M=g.dgst;g=M,i=Error(o(419)),i.stack="",i.digest=g,al({value:i,source:null,stack:null}),t=Eu(e,t,a)}else if(kt||ai(e,t,a,!1),g=(a&e.childLanes)!==0,kt||g){if(g=tt,g!==null&&(i=qi(g,a),i!==0&&i!==E.retryLane))throw E.retryLane=i,ps(e,i),hn(g,e,i),yu;ad(x)||sr(),t=Eu(e,t,a)}else ad(x)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,st=On(x.nextSibling),Ht=t,Ie=!0,La=null,Rn=!1,e!==null&&Zh(t,e),t=Tu(t,i.children),t.flags|=4096);return t}return r?(Pa(),x=i.fallback,r=t.mode,E=e.child,M=E.sibling,i=fa(E,{mode:"hidden",children:i.children}),i.subtreeFlags=E.subtreeFlags&65011712,M!==null?x=fa(M,x):(x=gs(x,r,a,null),x.flags|=2),x.return=t,i.return=t,i.sibling=x,t.child=i,pl(null,i),i=t.child,x=e.child.memoizedState,x===null?x=xu(a):(r=x.cachePool,r!==null?(E=wt._currentValue,r=r.parent!==E?{parent:E,pool:E}:r):r=Wh(),x={baseLanes:x.baseLanes|a,cachePool:r}),i.memoizedState=x,i.childLanes=_u(e,g,a),t.memoizedState=Su,pl(e.child,i)):(Ia(t),a=e.child,e=a.sibling,a=fa(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function Tu(e,t){return t=$o({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function $o(e,t){return e=gn(22,e,null,t),e.lanes=0,e}function Eu(e,t,a){return Ts(t,e.child,null,a),e=Tu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fp(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Vc(e.return,t,a)}function ju(e,t,a,i,r,u){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:r,treeForkCount:u}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=i,g.tail=a,g.tailMode=r,g.treeForkCount=u)}function hp(e,t,a){var i=t.pendingProps,r=i.revealOrder,u=i.tail;i=i.children;var g=_t.current,x=(g&2)!==0;if(x?(g=g&1|2,t.flags|=128):g&=1,me(_t,g),It(e,t,i,a),i=Ie?nl:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&fp(e,a,t);else if(e.tag===19)fp(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&Uo(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),ju(t,!1,r,a,u,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Uo(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}ju(t,!0,a,null,u,i);break;case"together":ju(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function ya(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ka|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(ai(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=fa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=fa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Cu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&wo(e)))}function c1(e,t,a){switch(t.tag){case 3:J(t,t.stateNode.containerInfo),za(t,wt,e.memoizedState.cache),vs();break;case 27:case 5:Qn(t);break;case 4:J(t,t.stateNode.containerInfo);break;case 10:za(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Ia(t),t.flags|=128,null):(a&t.child.childLanes)!==0?dp(e,t,a):(Ia(t),e=ya(e,t,a),e!==null?e.sibling:null);Ia(t);break;case 19:var r=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(ai(e,t,a,!1),i=(a&t.childLanes)!==0),r){if(i)return hp(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),me(_t,_t.current),i)break;return null;case 22:return t.lanes=0,ip(e,t,a,t.pendingProps);case 24:za(t,wt,e.memoizedState.cache)}return ya(e,t,a)}function mp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)kt=!0;else{if(!Cu(e,a)&&(t.flags&128)===0)return kt=!1,c1(e,t,a);kt=(e.flags&131072)!==0}else kt=!1,Ie&&(t.flags&1048576)!==0&&Kh(t,nl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=xs(t.elementType),t.type=e,typeof e=="function")kc(e)?(i=js(e,i),t.tag=1,t=cp(null,t,e,i,a)):(t.tag=0,t=bu(null,t,e,i,a));else{if(e!=null){var r=e.$$typeof;if(r===F){t.tag=11,t=np(null,t,e,i,a);break e}else if(r===ee){t.tag=14,t=ap(null,t,e,i,a);break e}}throw t=Be(e)||e,Error(o(306,t,""))}}return t;case 0:return bu(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,r=js(i,t.pendingProps),cp(e,t,i,r,a);case 3:e:{if(J(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var u=t.memoizedState;r=u.element,Kc(e,t),ul(t,i,null,a);var g=t.memoizedState;if(i=g.cache,za(t,wt,i),i!==u.cache&&Hc(t,[wt],a,!0),cl(),i=g.element,u.isDehydrated)if(u={element:i,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=up(e,t,i,a);break e}else if(i!==r){r=wn(Error(o(424)),t),al(r),t=up(e,t,i,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(st=On(e.firstChild),Ht=t,Ie=!0,La=null,Rn=!0,a=im(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(vs(),i===r){t=ya(e,t,a);break e}It(e,t,i,a)}t=t.child}return t;case 26:return Xo(e,t),e===null?(a=jg(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ie||(a=t.type,e=t.pendingProps,i=dr(ue.current).createElement(a),i[Nt]=t,i[Vt]=e,Pt(i,a,e),Ve(i),t.stateNode=i):t.memoizedState=jg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Qn(t),e===null&&Ie&&(i=t.stateNode=_g(t.type,t.pendingProps,ue.current),Ht=t,Rn=!0,r=st,Qa(t.type)?(id=r,st=On(i.firstChild)):st=r),It(e,t,t.pendingProps.children,a),Xo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ie&&((r=i=st)&&(i=V1(i,t.type,t.pendingProps,Rn),i!==null?(t.stateNode=i,Ht=t,st=On(i.firstChild),Rn=!1,r=!0):r=!1),r||Ua(t)),Qn(t),r=t.type,u=t.pendingProps,g=e!==null?e.memoizedProps:null,i=u.children,ed(r,u)?i=null:g!==null&&ed(r,g)&&(t.flags|=32),t.memoizedState!==null&&(r=Wc(e,t,e1,null,null,a),Dl._currentValue=r),Xo(e,t),It(e,t,i,a),t.child;case 6:return e===null&&Ie&&((e=a=st)&&(a=H1(a,t.pendingProps,Rn),a!==null?(t.stateNode=a,Ht=t,st=null,e=!0):e=!1),e||Ua(t)),null;case 13:return dp(e,t,a);case 4:return J(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ts(t,null,i,a):It(e,t,i,a),t.child;case 11:return np(e,t,t.type,t.pendingProps,a);case 7:return It(e,t,t.pendingProps,a),t.child;case 8:return It(e,t,t.pendingProps.children,a),t.child;case 12:return It(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,za(t,t.type,i.value),It(e,t,i.children,a),t.child;case 9:return r=t.type._context,i=t.pendingProps.children,bs(t),r=Gt(r),i=i(r),t.flags|=1,It(e,t,i,a),t.child;case 14:return ap(e,t,t.type,t.pendingProps,a);case 15:return sp(e,t,t.type,t.pendingProps,a);case 19:return hp(e,t,a);case 31:return r1(e,t,a);case 22:return ip(e,t,a,t.pendingProps);case 24:return bs(t),i=Gt(wt),e===null?(r=Pc(),r===null&&(r=tt,u=Gc(),r.pooledCache=u,u.refCount++,u!==null&&(r.pooledCacheLanes|=a),r=u),t.memoizedState={parent:i,cache:r},Yc(t),za(t,wt,r)):((e.lanes&a)!==0&&(Kc(e,t),ul(t,null,null,a),cl()),r=e.memoizedState,u=t.memoizedState,r.parent!==i?(r={parent:i,cache:i},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),za(t,wt,i)):(i=u.cache,za(t,wt,i),i!==r.cache&&Hc(t,[wt],a,!0))),It(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function ba(e){e.flags|=4}function Au(e,t,a,i,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Gp())e.flags|=8192;else throw _s=Mo,qc}else e.flags&=-16777217}function pp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Dg(t))if(Gp())e.flags|=8192;else throw _s=Mo,qc}function Fo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?on():536870912,e.lanes|=t,pi|=t)}function gl(e,t){if(!Ie)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function it(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,i|=r.subtreeFlags&65011712,i|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function u1(e,t,a){var i=t.pendingProps;switch(Bc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(t),null;case 1:return it(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),pa(wt),sn(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(ni(t)?ba(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Uc())),it(t),null;case 26:var r=t.type,u=t.memoizedState;return e===null?(ba(t),u!==null?(it(t),pp(t,u)):(it(t),Au(t,r,null,i,a))):u?u!==e.memoizedState?(ba(t),it(t),pp(t,u)):(it(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&ba(t),it(t),Au(t,r,e,i,a)),null;case 27:if(ln(t),a=ue.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ba(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return it(t),null}e=we.current,ni(t)?Xh(t):(e=_g(r,i,a),t.stateNode=e,ba(t))}return it(t),null;case 5:if(ln(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ba(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return it(t),null}if(u=we.current,ni(t))Xh(t);else{var g=dr(ue.current);switch(u){case 1:u=g.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:u=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":u=g.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":u=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":u=g.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof i.is=="string"?g.createElement("select",{is:i.is}):g.createElement("select"),i.multiple?u.multiple=!0:i.size&&(u.size=i.size);break;default:u=typeof i.is=="string"?g.createElement(r,{is:i.is}):g.createElement(r)}}u[Nt]=t,u[Vt]=i;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)u.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=u;e:switch(Pt(u,r,i),r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&ba(t)}}return it(t),Au(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&ba(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=ue.current,ni(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,r=Ht,r!==null)switch(r.tag){case 27:case 5:i=r.memoizedProps}e[Nt]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||dg(e.nodeValue,a)),e||Ua(t,!0)}else e=dr(e).createTextNode(i),e[Nt]=t,t.stateNode=e}return it(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=ni(t),a!==null){if(e===null){if(!i)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Nt]=t}else vs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),e=!1}else a=Uc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(yn(t),t):(yn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return it(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=ni(t),i!==null&&i.dehydrated!==null){if(e===null){if(!r)throw Error(o(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[Nt]=t}else vs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),r=!1}else r=Uc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(yn(t),t):(yn(t),null)}return yn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,r=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(r=i.alternate.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==r&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Fo(t,t.updateQueue),it(t),null);case 4:return sn(),e===null&&$u(t.stateNode.containerInfo),it(t),null;case 10:return pa(t.type),it(t),null;case 19:if(Se(_t),i=t.memoizedState,i===null)return it(t),null;if(r=(t.flags&128)!==0,u=i.rendering,u===null)if(r)gl(i,!1);else{if(yt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Uo(e),u!==null){for(t.flags|=128,gl(i,!1),e=u.updateQueue,t.updateQueue=e,Fo(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Ph(a,e),a=a.sibling;return me(_t,_t.current&1|2),Ie&&ha(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&de()>tr&&(t.flags|=128,r=!0,gl(i,!1),t.lanes=4194304)}else{if(!r)if(e=Uo(u),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Fo(t,e),gl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!u.alternate&&!Ie)return it(t),null}else 2*de()-i.renderingStartTime>tr&&a!==536870912&&(t.flags|=128,r=!0,gl(i,!1),t.lanes=4194304);i.isBackwards?(u.sibling=t.child,t.child=u):(e=i.last,e!==null?e.sibling=u:t.child=u,i.last=u)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=de(),e.sibling=null,a=_t.current,me(_t,r?a&1|2:a&1),Ie&&ha(t,i.treeForkCount),e):(it(t),null);case 22:case 23:return yn(t),Fc(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(it(t),t.subtreeFlags&6&&(t.flags|=8192)):it(t),a=t.updateQueue,a!==null&&Fo(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&Se(Ss),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),pa(wt),it(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function d1(e,t){switch(Bc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pa(wt),sn(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ln(t),null;case 31:if(t.memoizedState!==null){if(yn(t),t.alternate===null)throw Error(o(340));vs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(yn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));vs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(_t),null;case 4:return sn(),null;case 10:return pa(t.type),null;case 22:case 23:return yn(t),Fc(),e!==null&&Se(Ss),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pa(wt),null;case 25:return null;default:return null}}function gp(e,t){switch(Bc(t),t.tag){case 3:pa(wt),sn();break;case 26:case 27:case 5:ln(t);break;case 4:sn();break;case 31:t.memoizedState!==null&&yn(t);break;case 13:yn(t);break;case 19:Se(_t);break;case 10:pa(t.type);break;case 22:case 23:yn(t),Fc(),e!==null&&Se(Ss);break;case 24:pa(wt)}}function vl(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var r=i.next;a=r;do{if((a.tag&e)===e){i=void 0;var u=a.create,g=a.inst;i=u(),g.destroy=i}a=a.next}while(a!==r)}}catch(x){Fe(t,t.return,x)}}function qa(e,t,a){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var u=r.next;i=u;do{if((i.tag&e)===e){var g=i.inst,x=g.destroy;if(x!==void 0){g.destroy=void 0,r=t;var E=a,M=x;try{M()}catch(I){Fe(r,E,I)}}}i=i.next}while(i!==u)}}catch(I){Fe(t,t.return,I)}}function vp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{om(t,a)}catch(i){Fe(e,e.return,i)}}}function yp(e,t,a){a.props=js(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){Fe(e,t,i)}}function yl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(r){Fe(e,t,r)}}function ea(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(r){Fe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Fe(e,t,r)}else a.current=null}function bp(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(r){Fe(e,e.return,r)}}function Nu(e,t,a){try{var i=e.stateNode;M1(i,e.type,a,t),i[Vt]=t}catch(r){Fe(e,e.return,r)}}function Sp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qa(e.type)||e.tag===4}function wu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Qa(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Du(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=ua));else if(i!==4&&(i===27&&Qa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Du(e,t,a),e=e.sibling;e!==null;)Du(e,t,a),e=e.sibling}function Qo(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&Qa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Qo(e,t,a),e=e.sibling;e!==null;)Qo(e,t,a),e=e.sibling}function xp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Pt(t,i,a),t[Nt]=e,t[Vt]=a}catch(u){Fe(e,e.return,u)}}var Sa=!1,Rt=!1,ku=!1,_p=typeof WeakSet=="function"?WeakSet:Set,zt=null;function f1(e,t){if(e=e.containerInfo,Ju=yr,e=Oh(e),Ec(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var r=i.anchorOffset,u=i.focusNode;i=i.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var g=0,x=-1,E=-1,M=0,I=0,Z=e,B=null;t:for(;;){for(var z;Z!==a||r!==0&&Z.nodeType!==3||(x=g+r),Z!==u||i!==0&&Z.nodeType!==3||(E=g+i),Z.nodeType===3&&(g+=Z.nodeValue.length),(z=Z.firstChild)!==null;)B=Z,Z=z;for(;;){if(Z===e)break t;if(B===a&&++M===r&&(x=g),B===u&&++I===i&&(E=g),(z=Z.nextSibling)!==null)break;Z=B,B=Z.parentNode}Z=z}a=x===-1||E===-1?null:{start:x,end:E}}else a=null}a=a||{start:0,end:0}}else a=null;for(Wu={focusedElem:e,selectionRange:a},yr=!1,zt=t;zt!==null;)if(t=zt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,zt=e;else for(;zt!==null;){switch(t=zt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,r=u.memoizedProps,u=u.memoizedState,i=a.stateNode;try{var ce=js(a.type,r);e=i.getSnapshotBeforeUpdate(ce,u),i.__reactInternalSnapshotBeforeUpdate=e}catch(xe){Fe(a,a.return,xe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)nd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":nd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,zt=e;break}zt=t.return}}function Tp(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:_a(e,a),i&4&&vl(5,a);break;case 1:if(_a(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){Fe(a,a.return,g)}else{var r=js(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Fe(a,a.return,g)}}i&64&&vp(a),i&512&&yl(a,a.return);break;case 3:if(_a(e,a),i&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{om(e,t)}catch(g){Fe(a,a.return,g)}}break;case 27:t===null&&i&4&&xp(a);case 26:case 5:_a(e,a),t===null&&i&4&&bp(a),i&512&&yl(a,a.return);break;case 12:_a(e,a);break;case 31:_a(e,a),i&4&&Cp(e,a);break;case 13:_a(e,a),i&4&&Ap(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=x1.bind(null,a),G1(e,a))));break;case 22:if(i=a.memoizedState!==null||Sa,!i){t=t!==null&&t.memoizedState!==null||Rt,r=Sa;var u=Rt;Sa=i,(Rt=t)&&!u?Ta(e,a,(a.subtreeFlags&8772)!==0):_a(e,a),Sa=r,Rt=u}break;case 30:break;default:_a(e,a)}}function Ep(e){var t=e.alternate;t!==null&&(e.alternate=null,Ep(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Oe(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ct=null,cn=!1;function xa(e,t,a){for(a=a.child;a!==null;)jp(e,t,a),a=a.sibling}function jp(e,t,a){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(at,a)}catch{}switch(a.tag){case 26:Rt||ea(a,t),xa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Rt||ea(a,t);var i=ct,r=cn;Qa(a.type)&&(ct=a.stateNode,cn=!1),xa(e,t,a),Al(a.stateNode),ct=i,cn=r;break;case 5:Rt||ea(a,t);case 6:if(i=ct,r=cn,ct=null,xa(e,t,a),ct=i,cn=r,ct!==null)if(cn)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(a.stateNode)}catch(u){Fe(a,t,u)}else try{ct.removeChild(a.stateNode)}catch(u){Fe(a,t,u)}break;case 18:ct!==null&&(cn?(e=ct,vg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ti(e)):vg(ct,a.stateNode));break;case 4:i=ct,r=cn,ct=a.stateNode.containerInfo,cn=!0,xa(e,t,a),ct=i,cn=r;break;case 0:case 11:case 14:case 15:qa(2,a,t),Rt||qa(4,a,t),xa(e,t,a);break;case 1:Rt||(ea(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&yp(a,t,i)),xa(e,t,a);break;case 21:xa(e,t,a);break;case 22:Rt=(i=Rt)||a.memoizedState!==null,xa(e,t,a),Rt=i;break;default:xa(e,t,a)}}function Cp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ti(e)}catch(a){Fe(t,t.return,a)}}}function Ap(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ti(e)}catch(a){Fe(t,t.return,a)}}function h1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _p),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _p),t;default:throw Error(o(435,e.tag))}}function Jo(e,t){var a=h1(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var r=_1.bind(null,e,i);i.then(r,r)}})}function un(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var r=a[i],u=e,g=t,x=g;e:for(;x!==null;){switch(x.tag){case 27:if(Qa(x.type)){ct=x.stateNode,cn=!1;break e}break;case 5:ct=x.stateNode,cn=!1;break e;case 3:case 4:ct=x.stateNode.containerInfo,cn=!0;break e}x=x.return}if(ct===null)throw Error(o(160));jp(u,g,r),ct=null,cn=!1,u=r.alternate,u!==null&&(u.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Np(t,e),t=t.sibling}var Zn=null;function Np(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:un(t,e),dn(e),i&4&&(qa(3,e,e.return),vl(3,e),qa(5,e,e.return));break;case 1:un(t,e),dn(e),i&512&&(Rt||a===null||ea(a,a.return)),i&64&&Sa&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var r=Zn;if(un(t,e),dn(e),i&512&&(Rt||a===null||ea(a,a.return)),i&4){var u=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(i){case"title":u=r.getElementsByTagName("title")[0],(!u||u[Le]||u[Nt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=r.createElement(i),r.head.insertBefore(u,r.querySelector("head > title"))),Pt(u,i,a),u[Nt]=e,Ve(u),i=u;break e;case"link":var g=Ng("link","href",r).get(i+(a.href||""));if(g){for(var x=0;x<g.length;x++)if(u=g[x],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(x,1);break t}}u=r.createElement(i),Pt(u,i,a),r.head.appendChild(u);break;case"meta":if(g=Ng("meta","content",r).get(i+(a.content||""))){for(x=0;x<g.length;x++)if(u=g[x],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(x,1);break t}}u=r.createElement(i),Pt(u,i,a),r.head.appendChild(u);break;default:throw Error(o(468,i))}u[Nt]=e,Ve(u),i=u}e.stateNode=i}else wg(r,e.type,e.stateNode);else e.stateNode=Ag(r,i,e.memoizedProps);else u!==i?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,i===null?wg(r,e.type,e.stateNode):Ag(r,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Nu(e,e.memoizedProps,a.memoizedProps)}break;case 27:un(t,e),dn(e),i&512&&(Rt||a===null||ea(a,a.return)),a!==null&&i&4&&Nu(e,e.memoizedProps,a.memoizedProps);break;case 5:if(un(t,e),dn(e),i&512&&(Rt||a===null||ea(a,a.return)),e.flags&32){r=e.stateNode;try{Ks(r,"")}catch(ce){Fe(e,e.return,ce)}}i&4&&e.stateNode!=null&&(r=e.memoizedProps,Nu(e,r,a!==null?a.memoizedProps:r)),i&1024&&(ku=!0);break;case 6:if(un(t,e),dn(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(ce){Fe(e,e.return,ce)}}break;case 3:if(mr=null,r=Zn,Zn=fr(t.containerInfo),un(t,e),Zn=r,dn(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{Ti(t.containerInfo)}catch(ce){Fe(e,e.return,ce)}ku&&(ku=!1,wp(e));break;case 4:i=Zn,Zn=fr(e.stateNode.containerInfo),un(t,e),dn(e),Zn=i;break;case 12:un(t,e),dn(e);break;case 31:un(t,e),dn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Jo(e,i)));break;case 13:un(t,e),dn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(er=de()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Jo(e,i)));break;case 22:r=e.memoizedState!==null;var E=a!==null&&a.memoizedState!==null,M=Sa,I=Rt;if(Sa=M||r,Rt=I||E,un(t,e),Rt=I,Sa=M,dn(e),i&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||E||Sa||Rt||Cs(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){E=a=t;try{if(u=E.stateNode,r)g=u.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{x=E.stateNode;var Z=E.memoizedProps.style,B=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;x.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(ce){Fe(E,E.return,ce)}}}else if(t.tag===6){if(a===null){E=t;try{E.stateNode.nodeValue=r?"":E.memoizedProps}catch(ce){Fe(E,E.return,ce)}}}else if(t.tag===18){if(a===null){E=t;try{var z=E.stateNode;r?yg(z,!0):yg(E.stateNode,!1)}catch(ce){Fe(E,E.return,ce)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,Jo(e,a))));break;case 19:un(t,e),dn(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Jo(e,i)));break;case 30:break;case 21:break;default:un(t,e),dn(e)}}function dn(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(Sp(i)){a=i;break}i=i.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var r=a.stateNode,u=wu(e);Qo(e,u,r);break;case 5:var g=a.stateNode;a.flags&32&&(Ks(g,""),a.flags&=-33);var x=wu(e);Qo(e,x,g);break;case 3:case 4:var E=a.stateNode.containerInfo,M=wu(e);Du(e,M,E);break;default:throw Error(o(161))}}catch(I){Fe(e,e.return,I)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;wp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _a(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Tp(e,t.alternate,t),t=t.sibling}function Cs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qa(4,t,t.return),Cs(t);break;case 1:ea(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&yp(t,t.return,a),Cs(t);break;case 27:Al(t.stateNode);case 26:case 5:ea(t,t.return),Cs(t);break;case 22:t.memoizedState===null&&Cs(t);break;case 30:Cs(t);break;default:Cs(t)}e=e.sibling}}function Ta(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,r=e,u=t,g=u.flags;switch(u.tag){case 0:case 11:case 15:Ta(r,u,a),vl(4,u);break;case 1:if(Ta(r,u,a),i=u,r=i.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(M){Fe(i,i.return,M)}if(i=u,r=i.updateQueue,r!==null){var x=i.stateNode;try{var E=r.shared.hiddenCallbacks;if(E!==null)for(r.shared.hiddenCallbacks=null,r=0;r<E.length;r++)lm(E[r],x)}catch(M){Fe(i,i.return,M)}}a&&g&64&&vp(u),yl(u,u.return);break;case 27:xp(u);case 26:case 5:Ta(r,u,a),a&&i===null&&g&4&&bp(u),yl(u,u.return);break;case 12:Ta(r,u,a);break;case 31:Ta(r,u,a),a&&g&4&&Cp(r,u);break;case 13:Ta(r,u,a),a&&g&4&&Ap(r,u);break;case 22:u.memoizedState===null&&Ta(r,u,a),yl(u,u.return);break;case 30:break;default:Ta(r,u,a)}t=t.sibling}}function Ru(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&sl(a))}function Mu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sl(e))}function Xn(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dp(e,t,a,i),t=t.sibling}function Dp(e,t,a,i){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Xn(e,t,a,i),r&2048&&vl(9,t);break;case 1:Xn(e,t,a,i);break;case 3:Xn(e,t,a,i),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sl(e)));break;case 12:if(r&2048){Xn(e,t,a,i),e=t.stateNode;try{var u=t.memoizedProps,g=u.id,x=u.onPostCommit;typeof x=="function"&&x(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){Fe(t,t.return,E)}}else Xn(e,t,a,i);break;case 31:Xn(e,t,a,i);break;case 13:Xn(e,t,a,i);break;case 23:break;case 22:u=t.stateNode,g=t.alternate,t.memoizedState!==null?u._visibility&2?Xn(e,t,a,i):bl(e,t):u._visibility&2?Xn(e,t,a,i):(u._visibility|=2,fi(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Ru(g,t);break;case 24:Xn(e,t,a,i),r&2048&&Mu(t.alternate,t);break;default:Xn(e,t,a,i)}}function fi(e,t,a,i,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,g=t,x=a,E=i,M=g.flags;switch(g.tag){case 0:case 11:case 15:fi(u,g,x,E,r),vl(8,g);break;case 23:break;case 22:var I=g.stateNode;g.memoizedState!==null?I._visibility&2?fi(u,g,x,E,r):bl(u,g):(I._visibility|=2,fi(u,g,x,E,r)),r&&M&2048&&Ru(g.alternate,g);break;case 24:fi(u,g,x,E,r),r&&M&2048&&Mu(g.alternate,g);break;default:fi(u,g,x,E,r)}t=t.sibling}}function bl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,r=i.flags;switch(i.tag){case 22:bl(a,i),r&2048&&Ru(i.alternate,i);break;case 24:bl(a,i),r&2048&&Mu(i.alternate,i);break;default:bl(a,i)}t=t.sibling}}var Sl=8192;function hi(e,t,a){if(e.subtreeFlags&Sl)for(e=e.child;e!==null;)kp(e,t,a),e=e.sibling}function kp(e,t,a){switch(e.tag){case 26:hi(e,t,a),e.flags&Sl&&e.memoizedState!==null&&W1(a,Zn,e.memoizedState,e.memoizedProps);break;case 5:hi(e,t,a);break;case 3:case 4:var i=Zn;Zn=fr(e.stateNode.containerInfo),hi(e,t,a),Zn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=Sl,Sl=16777216,hi(e,t,a),Sl=i):hi(e,t,a));break;default:hi(e,t,a)}}function Rp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function xl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];zt=i,Op(i,e)}Rp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Mp(e),e=e.sibling}function Mp(e){switch(e.tag){case 0:case 11:case 15:xl(e),e.flags&2048&&qa(9,e,e.return);break;case 3:xl(e);break;case 12:xl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wo(e)):xl(e);break;default:xl(e)}}function Wo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];zt=i,Op(i,e)}Rp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qa(8,t,t.return),Wo(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Wo(t));break;default:Wo(t)}e=e.sibling}}function Op(e,t){for(;zt!==null;){var a=zt;switch(a.tag){case 0:case 11:case 15:qa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:sl(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,zt=i;else e:for(a=e;zt!==null;){i=zt;var r=i.sibling,u=i.return;if(Ep(i),i===a){zt=null;break e}if(r!==null){r.return=u,zt=r;break e}zt=u}}}var m1={getCacheForType:function(e){var t=Gt(wt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Gt(wt).controller.signal}},p1=typeof WeakMap=="function"?WeakMap:Map,Ke=0,tt=null,Ue=null,He=0,$e=0,bn=null,Ya=!1,mi=!1,Ou=!1,Ea=0,yt=0,Ka=0,As=0,Bu=0,Sn=0,pi=0,_l=null,fn=null,Lu=!1,er=0,Bp=0,tr=1/0,nr=null,Za=null,Ot=0,Xa=null,gi=null,ja=0,Uu=0,zu=null,Lp=null,Tl=0,Vu=null;function xn(){return(Ke&2)!==0&&He!==0?He&-He:U.T!==null?Yu():Yi()}function Up(){if(Sn===0)if((He&536870912)===0||Ie){var e=ne;ne<<=1,(ne&3932160)===0&&(ne=262144),Sn=e}else Sn=536870912;return e=vn.current,e!==null&&(e.flags|=32),Sn}function hn(e,t,a){(e===tt&&($e===2||$e===9)||e.cancelPendingCommit!==null)&&(vi(e,0),$a(e,He,Sn,!1)),Ra(e,a),((Ke&2)===0||e!==tt)&&(e===tt&&((Ke&2)===0&&(As|=a),yt===4&&$a(e,He,Sn,!1)),ta(e))}function zp(e,t,a){if((Ke&6)!==0)throw Error(o(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||q(e,t),r=i?y1(e,t):Gu(e,t,!0),u=i;do{if(r===0){mi&&!i&&$a(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!g1(a)){r=Gu(e,t,!1),u=!1;continue}if(r===2){if(u=t,e.errorRecoveryDisabledLanes&u)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var x=e;r=_l;var E=x.current.memoizedState.isDehydrated;if(E&&(vi(x,g).flags|=256),g=Gu(x,g,!1),g!==2){if(Ou&&!E){x.errorRecoveryDisabledLanes|=u,As|=u,r=4;break e}u=fn,fn=r,u!==null&&(fn===null?fn=u:fn.push.apply(fn,u))}r=g}if(u=!1,r!==2)continue}}if(r===1){vi(e,0),$a(e,t,0,!0);break}e:{switch(i=e,u=r,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:$a(i,t,Sn,!Ya);break e;case 2:fn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(r=er+300-de(),10<r)){if($a(i,t,Sn,!Ya),Ce(i,0,!0)!==0)break e;ja=t,i.timeoutHandle=pg(Vp.bind(null,i,a,fn,nr,Lu,t,Sn,As,pi,Ya,u,"Throttled",-0,0),r);break e}Vp(i,a,fn,nr,Lu,t,Sn,As,pi,Ya,u,null,-0,0)}}break}while(!0);ta(e)}function Vp(e,t,a,i,r,u,g,x,E,M,I,Z,B,z){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ua},kp(t,u,Z);var ce=(u&62914560)===u?er-de():(u&4194048)===u?Bp-de():0;if(ce=ex(Z,ce),ce!==null){ja=u,e.cancelPendingCommit=ce(Zp.bind(null,e,t,u,a,i,r,g,x,E,I,Z,null,B,z)),$a(e,u,g,!M);return}}Zp(e,t,u,a,i,r,g,x,E)}function g1(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var i=0;i<a.length;i++){var r=a[i],u=r.getSnapshot;r=r.value;try{if(!pn(u(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function $a(e,t,a,i){t&=~Bu,t&=~As,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var r=t;0<r;){var u=31-ft(r),g=1<<u;i[u]=-1,r&=~g}a!==0&&Ii(e,a,t)}function ar(){return(Ke&6)===0?(El(0),!1):!0}function Hu(){if(Ue!==null){if($e===0)var e=Ue.return;else e=Ue,ma=ys=null,nu(e),oi=null,ll=0,e=Ue;for(;e!==null;)gp(e.alternate,e),e=e.return;Ue=null}}function vi(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,L1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ja=0,Hu(),tt=e,Ue=a=fa(e.current,null),He=t,$e=0,bn=null,Ya=!1,mi=q(e,t),Ou=!1,pi=Sn=Bu=As=Ka=yt=0,fn=_l=null,Lu=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var r=31-ft(i),u=1<<r;t|=e[r],i&=~u}return Ea=t,Eo(),a}function Hp(e,t){De=null,U.H=ml,t===li||t===Ro?(t=nm(),$e=3):t===qc?(t=nm(),$e=4):$e=t===yu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,bn=t,Ue===null&&(yt=1,Ko(e,wn(t,e.current)))}function Gp(){var e=vn.current;return e===null?!0:(He&4194048)===He?Mn===null:(He&62914560)===He||(He&536870912)!==0?e===Mn:!1}function Ip(){var e=U.H;return U.H=ml,e===null?ml:e}function Pp(){var e=U.A;return U.A=m1,e}function sr(){yt=4,Ya||(He&4194048)!==He&&vn.current!==null||(mi=!0),(Ka&134217727)===0&&(As&134217727)===0||tt===null||$a(tt,He,Sn,!1)}function Gu(e,t,a){var i=Ke;Ke|=2;var r=Ip(),u=Pp();(tt!==e||He!==t)&&(nr=null,vi(e,t)),t=!1;var g=yt;e:do try{if($e!==0&&Ue!==null){var x=Ue,E=bn;switch($e){case 8:Hu(),g=6;break e;case 3:case 2:case 9:case 6:vn.current===null&&(t=!0);var M=$e;if($e=0,bn=null,yi(e,x,E,M),a&&mi){g=0;break e}break;default:M=$e,$e=0,bn=null,yi(e,x,E,M)}}v1(),g=yt;break}catch(I){Hp(e,I)}while(!0);return t&&e.shellSuspendCounter++,ma=ys=null,Ke=i,U.H=r,U.A=u,Ue===null&&(tt=null,He=0,Eo()),g}function v1(){for(;Ue!==null;)qp(Ue)}function y1(e,t){var a=Ke;Ke|=2;var i=Ip(),r=Pp();tt!==e||He!==t?(nr=null,tr=de()+500,vi(e,t)):mi=q(e,t);e:do try{if($e!==0&&Ue!==null){t=Ue;var u=bn;t:switch($e){case 1:$e=0,bn=null,yi(e,t,u,1);break;case 2:case 9:if(em(u)){$e=0,bn=null,Yp(t);break}t=function(){$e!==2&&$e!==9||tt!==e||($e=7),ta(e)},u.then(t,t);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:em(u)?($e=0,bn=null,Yp(t)):($e=0,bn=null,yi(e,t,u,7));break;case 5:var g=null;switch(Ue.tag){case 26:g=Ue.memoizedState;case 5:case 27:var x=Ue;if(g?Dg(g):x.stateNode.complete){$e=0,bn=null;var E=x.sibling;if(E!==null)Ue=E;else{var M=x.return;M!==null?(Ue=M,ir(M)):Ue=null}break t}}$e=0,bn=null,yi(e,t,u,5);break;case 6:$e=0,bn=null,yi(e,t,u,6);break;case 8:Hu(),yt=6;break e;default:throw Error(o(462))}}b1();break}catch(I){Hp(e,I)}while(!0);return ma=ys=null,U.H=i,U.A=r,Ke=a,Ue!==null?0:(tt=null,He=0,Eo(),yt)}function b1(){for(;Ue!==null&&!se();)qp(Ue)}function qp(e){var t=mp(e.alternate,e,Ea);e.memoizedProps=e.pendingProps,t===null?ir(e):Ue=t}function Yp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=rp(a,t,t.pendingProps,t.type,void 0,He);break;case 11:t=rp(a,t,t.pendingProps,t.type.render,t.ref,He);break;case 5:nu(t);default:gp(a,t),t=Ue=Ph(t,Ea),t=mp(a,t,Ea)}e.memoizedProps=e.pendingProps,t===null?ir(e):Ue=t}function yi(e,t,a,i){ma=ys=null,nu(t),oi=null,ll=0;var r=t.return;try{if(o1(e,r,t,a,He)){yt=1,Ko(e,wn(a,e.current)),Ue=null;return}}catch(u){if(r!==null)throw Ue=r,u;yt=1,Ko(e,wn(a,e.current)),Ue=null;return}t.flags&32768?(Ie||i===1?e=!0:mi||(He&536870912)!==0?e=!1:(Ya=e=!0,(i===2||i===9||i===3||i===6)&&(i=vn.current,i!==null&&i.tag===13&&(i.flags|=16384))),Kp(t,e)):ir(t)}function ir(e){var t=e;do{if((t.flags&32768)!==0){Kp(t,Ya);return}e=t.return;var a=u1(t.alternate,t,Ea);if(a!==null){Ue=a;return}if(t=t.sibling,t!==null){Ue=t;return}Ue=t=e}while(t!==null);yt===0&&(yt=5)}function Kp(e,t){do{var a=d1(e.alternate,e);if(a!==null){a.flags&=32767,Ue=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ue=e;return}Ue=e=a}while(e!==null);yt=6,Ue=null}function Zp(e,t,a,i,r,u,g,x,E){e.cancelPendingCommit=null;do lr();while(Ot!==0);if((Ke&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=wc,co(e,a,u,g,x,E),e===tt&&(Ue=tt=null,He=0),gi=t,Xa=e,ja=a,Uu=u,zu=r,Lp=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,T1(Me,function(){return Jp(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=U.T,U.T=null,r=K.p,K.p=2,g=Ke,Ke|=4;try{f1(e,t,a)}finally{Ke=g,K.p=r,U.T=i}}Ot=1,Xp(),$p(),Fp()}}function Xp(){if(Ot===1){Ot=0;var e=Xa,t=gi,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var i=K.p;K.p=2;var r=Ke;Ke|=4;try{Np(t,e);var u=Wu,g=Oh(e.containerInfo),x=u.focusedElem,E=u.selectionRange;if(g!==x&&x&&x.ownerDocument&&Mh(x.ownerDocument.documentElement,x)){if(E!==null&&Ec(x)){var M=E.start,I=E.end;if(I===void 0&&(I=M),"selectionStart"in x)x.selectionStart=M,x.selectionEnd=Math.min(I,x.value.length);else{var Z=x.ownerDocument||document,B=Z&&Z.defaultView||window;if(B.getSelection){var z=B.getSelection(),ce=x.textContent.length,xe=Math.min(E.start,ce),et=E.end===void 0?xe:Math.min(E.end,ce);!z.extend&&xe>et&&(g=et,et=xe,xe=g);var k=Rh(x,xe),j=Rh(x,et);if(k&&j&&(z.rangeCount!==1||z.anchorNode!==k.node||z.anchorOffset!==k.offset||z.focusNode!==j.node||z.focusOffset!==j.offset)){var R=Z.createRange();R.setStart(k.node,k.offset),z.removeAllRanges(),xe>et?(z.addRange(R),z.extend(j.node,j.offset)):(R.setEnd(j.node,j.offset),z.addRange(R))}}}}for(Z=[],z=x;z=z.parentNode;)z.nodeType===1&&Z.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<Z.length;x++){var Y=Z[x];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}yr=!!Ju,Wu=Ju=null}finally{Ke=r,K.p=i,U.T=a}}e.current=t,Ot=2}}function $p(){if(Ot===2){Ot=0;var e=Xa,t=gi,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var i=K.p;K.p=2;var r=Ke;Ke|=4;try{Tp(e,t.alternate,t)}finally{Ke=r,K.p=i,U.T=a}}Ot=3}}function Fp(){if(Ot===4||Ot===3){Ot=0,re();var e=Xa,t=gi,a=ja,i=Lp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ot=5:(Ot=0,gi=Xa=null,Qp(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Za=null),Is(a),t=t.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(at,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=U.T,r=K.p,K.p=2,U.T=null;try{for(var u=e.onRecoverableError,g=0;g<i.length;g++){var x=i[g];u(x.value,{componentStack:x.stack})}}finally{U.T=t,K.p=r}}(ja&3)!==0&&lr(),ta(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===Vu?Tl++:(Tl=0,Vu=e):Tl=0,El(0)}}function Qp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sl(t)))}function lr(){return Xp(),$p(),Fp(),Jp()}function Jp(){if(Ot!==5)return!1;var e=Xa,t=Uu;Uu=0;var a=Is(ja),i=U.T,r=K.p;try{K.p=32>a?32:a,U.T=null,a=zu,zu=null;var u=Xa,g=ja;if(Ot=0,gi=Xa=null,ja=0,(Ke&6)!==0)throw Error(o(331));var x=Ke;if(Ke|=4,Mp(u.current),Dp(u,u.current,g,a),Ke=x,El(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(at,u)}catch{}return!0}finally{K.p=r,U.T=i,Qp(e,t)}}function Wp(e,t,a){t=wn(a,t),t=vu(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(Ra(e,2),ta(e))}function Fe(e,t,a){if(e.tag===3)Wp(e,e,a);else for(;t!==null;){if(t.tag===3){Wp(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Za===null||!Za.has(i))){e=wn(a,e),a=ep(2),i=Ga(t,a,2),i!==null&&(tp(a,i,t,e),Ra(i,2),ta(i));break}}t=t.return}}function Iu(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new p1;var r=new Set;i.set(t,r)}else r=i.get(t),r===void 0&&(r=new Set,i.set(t,r));r.has(a)||(Ou=!0,r.add(a),e=S1.bind(null,e,t,a),t.then(e,e))}function S1(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,tt===e&&(He&a)===a&&(yt===4||yt===3&&(He&62914560)===He&&300>de()-er?(Ke&2)===0&&vi(e,0):Bu|=a,pi===He&&(pi=0)),ta(e)}function eg(e,t){t===0&&(t=on()),e=ps(e,t),e!==null&&(Ra(e,t),ta(e))}function x1(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),eg(e,a)}function _1(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(t),eg(e,a)}function T1(e,t){return Pn(e,t)}var or=null,bi=null,Pu=!1,rr=!1,qu=!1,Fa=0;function ta(e){e!==bi&&e.next===null&&(bi===null?or=bi=e:bi=bi.next=e),rr=!0,Pu||(Pu=!0,j1())}function El(e,t){if(!qu&&rr){qu=!0;do for(var a=!1,i=or;i!==null;){if(e!==0){var r=i.pendingLanes;if(r===0)var u=0;else{var g=i.suspendedLanes,x=i.pingedLanes;u=(1<<31-ft(42|e)+1)-1,u&=r&~(g&~x),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,sg(i,u))}else u=He,u=Ce(i,i===tt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(u&3)===0||q(i,u)||(a=!0,sg(i,u));i=i.next}while(a);qu=!1}}function E1(){tg()}function tg(){rr=Pu=!1;var e=0;Fa!==0&&B1()&&(e=Fa);for(var t=de(),a=null,i=or;i!==null;){var r=i.next,u=ng(i,t);u===0?(i.next=null,a===null?or=r:a.next=r,r===null&&(bi=a)):(a=i,(e!==0||(u&3)!==0)&&(rr=!0)),i=r}Ot!==0&&Ot!==5||El(e),Fa!==0&&(Fa=0)}function ng(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var g=31-ft(u),x=1<<g,E=r[g];E===-1?((x&a)===0||(x&i)!==0)&&(r[g]=Qe(x,t)):E<=t&&(e.expiredLanes|=x),u&=~x}if(t=tt,a=He,a=Ce(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&($e===2||$e===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&X(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||q(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&X(i),Is(a)){case 2:case 8:a=Xe;break;case 32:a=Me;break;case 268435456:a=xt;break;default:a=Me}return i=ag.bind(null,e),a=Pn(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&X(i),e.callbackPriority=2,e.callbackNode=null,2}function ag(e,t){if(Ot!==0&&Ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(lr()&&e.callbackNode!==a)return null;var i=He;return i=Ce(e,e===tt?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(zp(e,i,t),ng(e,de()),e.callbackNode!=null&&e.callbackNode===a?ag.bind(null,e):null)}function sg(e,t){if(lr())return null;zp(e,t,!0)}function j1(){U1(function(){(Ke&6)!==0?Pn(je,E1):tg()})}function Yu(){if(Fa===0){var e=si;e===0&&(e=qn,qn<<=1,(qn&261888)===0&&(qn=256)),Fa=e}return Fa}function ig(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:go(""+e)}function lg(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function C1(e,t,a,i,r){if(t==="submit"&&a&&a.stateNode===r){var u=ig((r[Vt]||null).action),g=i.submitter;g&&(t=(t=g[Vt]||null)?ig(t.formAction):g.getAttribute("formAction"),t!==null&&(u=t,g=null));var x=new So("action","action",null,i,r);e.push({event:x,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Fa!==0){var E=g?lg(r,g):new FormData(r);du(a,{pending:!0,data:E,method:r.method,action:u},null,E)}}else typeof u=="function"&&(x.preventDefault(),E=g?lg(r,g):new FormData(r),du(a,{pending:!0,data:E,method:r.method,action:u},u,E))},currentTarget:r}]})}}for(var Ku=0;Ku<Nc.length;Ku++){var Zu=Nc[Ku],A1=Zu.toLowerCase(),N1=Zu[0].toUpperCase()+Zu.slice(1);Kn(A1,"on"+N1)}Kn(Uh,"onAnimationEnd"),Kn(zh,"onAnimationIteration"),Kn(Vh,"onAnimationStart"),Kn("dblclick","onDoubleClick"),Kn("focusin","onFocus"),Kn("focusout","onBlur"),Kn(qS,"onTransitionRun"),Kn(YS,"onTransitionStart"),Kn(KS,"onTransitionCancel"),Kn(Hh,"onTransitionEnd"),qs("onMouseEnter",["mouseout","mouseover"]),qs("onMouseLeave",["mouseout","mouseover"]),qs("onPointerEnter",["pointerout","pointerover"]),qs("onPointerLeave",["pointerout","pointerover"]),ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ds("onBeforeInput",["compositionend","keypress","textInput","paste"]),ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jl="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(" "),w1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(jl));function og(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],r=i.event;i=i.listeners;e:{var u=void 0;if(t)for(var g=i.length-1;0<=g;g--){var x=i[g],E=x.instance,M=x.currentTarget;if(x=x.listener,E!==u&&r.isPropagationStopped())break e;u=x,r.currentTarget=M;try{u(r)}catch(I){To(I)}r.currentTarget=null,u=E}else for(g=0;g<i.length;g++){if(x=i[g],E=x.instance,M=x.currentTarget,x=x.listener,E!==u&&r.isPropagationStopped())break e;u=x,r.currentTarget=M;try{u(r)}catch(I){To(I)}r.currentTarget=null,u=E}}}}function ze(e,t){var a=t[Ps];a===void 0&&(a=t[Ps]=new Set);var i=e+"__bubble";a.has(i)||(rg(t,e,2,!1),a.add(i))}function Xu(e,t,a){var i=0;t&&(i|=4),rg(a,e,i,t)}var cr="_reactListening"+Math.random().toString(36).slice(2);function $u(e){if(!e[cr]){e[cr]=!0,Ma.forEach(function(a){a!=="selectionchange"&&(w1.has(a)||Xu(a,!1,e),Xu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cr]||(t[cr]=!0,Xu("selectionchange",!1,t))}}function rg(e,t,a,i){switch(Ug(t)){case 2:var r=ax;break;case 8:r=sx;break;default:r=ud}a=r.bind(null,t,a,e),r=void 0,!pc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),i?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function Fu(e,t,a,i,r){var u=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var g=i.tag;if(g===3||g===4){var x=i.stateNode.containerInfo;if(x===r)break;if(g===4)for(g=i.return;g!==null;){var E=g.tag;if((E===3||E===4)&&g.stateNode.containerInfo===r)return;g=g.return}for(;x!==null;){if(g=Re(x),g===null)return;if(E=g.tag,E===5||E===6||E===26||E===27){i=u=g;continue e}x=x.parentNode}}i=i.return}hh(function(){var M=u,I=hc(a),Z=[];e:{var B=Gh.get(e);if(B!==void 0){var z=So,ce=e;switch(e){case"keypress":if(yo(a)===0)break e;case"keydown":case"keyup":z=_S;break;case"focusin":ce="focus",z=bc;break;case"focusout":ce="blur",z=bc;break;case"beforeblur":case"afterblur":z=bc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=gh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=uS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=jS;break;case Uh:case zh:case Vh:z=hS;break;case Hh:z=AS;break;case"scroll":case"scrollend":z=rS;break;case"wheel":z=wS;break;case"copy":case"cut":case"paste":z=pS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=yh;break;case"toggle":case"beforetoggle":z=kS}var xe=(t&4)!==0,et=!xe&&(e==="scroll"||e==="scrollend"),k=xe?B!==null?B+"Capture":null:B;xe=[];for(var j=M,R;j!==null;){var Y=j;if(R=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||R===null||k===null||(Y=Zi(j,k),Y!=null&&xe.push(Cl(j,Y,R))),et)break;j=j.return}0<xe.length&&(B=new z(B,ce,null,a,I),Z.push({event:B,listeners:xe}))}}if((t&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",B&&a!==fc&&(ce=a.relatedTarget||a.fromElement)&&(Re(ce)||ce[ra]))break e;if((z||B)&&(B=I.window===I?I:(B=I.ownerDocument)?B.defaultView||B.parentWindow:window,z?(ce=a.relatedTarget||a.toElement,z=M,ce=ce?Re(ce):null,ce!==null&&(et=d(ce),xe=ce.tag,ce!==et||xe!==5&&xe!==27&&xe!==6)&&(ce=null)):(z=null,ce=M),z!==ce)){if(xe=gh,Y="onMouseLeave",k="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(xe=yh,Y="onPointerLeave",k="onPointerEnter",j="pointer"),et=z==null?B:Zt(z),R=ce==null?B:Zt(ce),B=new xe(Y,j+"leave",z,a,I),B.target=et,B.relatedTarget=R,Y=null,Re(I)===M&&(xe=new xe(k,j+"enter",ce,a,I),xe.target=R,xe.relatedTarget=et,Y=xe),et=Y,z&&ce)t:{for(xe=D1,k=z,j=ce,R=0,Y=k;Y;Y=xe(Y))R++;Y=0;for(var ye=j;ye;ye=xe(ye))Y++;for(;0<R-Y;)k=xe(k),R--;for(;0<Y-R;)j=xe(j),Y--;for(;R--;){if(k===j||j!==null&&k===j.alternate){xe=k;break t}k=xe(k),j=xe(j)}xe=null}else xe=null;z!==null&&cg(Z,B,z,xe,!1),ce!==null&&et!==null&&cg(Z,et,ce,xe,!0)}}e:{if(B=M?Zt(M):window,z=B.nodeName&&B.nodeName.toLowerCase(),z==="select"||z==="input"&&B.type==="file")var qe=Ch;else if(Eh(B))if(Ah)qe=GS;else{qe=VS;var ge=zS}else z=B.nodeName,!z||z.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?M&&dc(M.elementType)&&(qe=Ch):qe=HS;if(qe&&(qe=qe(e,M))){jh(Z,qe,a,I);break e}ge&&ge(e,B,M),e==="focusout"&&M&&B.type==="number"&&M.memoizedProps.value!=null&&uc(B,"number",B.value)}switch(ge=M?Zt(M):window,e){case"focusin":(Eh(ge)||ge.contentEditable==="true")&&(Fs=ge,jc=M,tl=null);break;case"focusout":tl=jc=Fs=null;break;case"mousedown":Cc=!0;break;case"contextmenu":case"mouseup":case"dragend":Cc=!1,Bh(Z,a,I);break;case"selectionchange":if(PS)break;case"keydown":case"keyup":Bh(Z,a,I)}var ke;if(xc)e:{switch(e){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else $s?_h(e,a)&&(Ge="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ge="onCompositionStart");Ge&&(bh&&a.locale!=="ko"&&($s||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&$s&&(ke=mh()):(Oa=I,gc="value"in Oa?Oa.value:Oa.textContent,$s=!0)),ge=ur(M,Ge),0<ge.length&&(Ge=new vh(Ge,e,null,a,I),Z.push({event:Ge,listeners:ge}),ke?Ge.data=ke:(ke=Th(a),ke!==null&&(Ge.data=ke)))),(ke=MS?OS(e,a):BS(e,a))&&(Ge=ur(M,"onBeforeInput"),0<Ge.length&&(ge=new vh("onBeforeInput","beforeinput",null,a,I),Z.push({event:ge,listeners:Ge}),ge.data=ke)),C1(Z,e,M,a,I)}og(Z,t)})}function Cl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function ur(e,t){for(var a=t+"Capture",i=[];e!==null;){var r=e,u=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||u===null||(r=Zi(e,a),r!=null&&i.unshift(Cl(e,r,u)),r=Zi(e,t),r!=null&&i.push(Cl(e,r,u))),e.tag===3)return i;e=e.return}return[]}function D1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function cg(e,t,a,i,r){for(var u=t._reactName,g=[];a!==null&&a!==i;){var x=a,E=x.alternate,M=x.stateNode;if(x=x.tag,E!==null&&E===i)break;x!==5&&x!==26&&x!==27||M===null||(E=M,r?(M=Zi(a,u),M!=null&&g.unshift(Cl(a,M,E))):r||(M=Zi(a,u),M!=null&&g.push(Cl(a,M,E)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var k1=/\r\n?/g,R1=/\u0000|\uFFFD/g;function ug(e){return(typeof e=="string"?e:""+e).replace(k1,`
|
|
25
|
+
`).replace(R1,"")}function dg(e,t){return t=ug(t),ug(e)===t}function We(e,t,a,i,r,u){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Ks(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Ks(e,""+i);break;case"className":mo(e,"class",i);break;case"tabIndex":mo(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":mo(e,a,i);break;case"style":dh(e,i,u);break;case"data":if(t!=="object"){mo(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=go(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(a==="formAction"?(t!=="input"&&We(e,t,"name",r.name,r,null),We(e,t,"formEncType",r.formEncType,r,null),We(e,t,"formMethod",r.formMethod,r,null),We(e,t,"formTarget",r.formTarget,r,null)):(We(e,t,"encType",r.encType,r,null),We(e,t,"method",r.method,r,null),We(e,t,"target",r.target,r,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=go(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=ua);break;case"onScroll":i!=null&&ze("scroll",e);break;case"onScrollEnd":i!=null&&ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=go(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):e.removeAttribute(a);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":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":ze("beforetoggle",e),ze("toggle",e),ho(e,"popover",i);break;case"xlinkActuate":ca(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":ca(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":ca(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":ca(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":ca(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":ca(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":ca(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":ca(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":ca(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":ho(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=lS.get(a)||a,ho(e,a,i))}}function Qu(e,t,a,i,r,u){switch(a){case"style":dh(e,i,u);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof i=="string"?Ks(e,i):(typeof i=="number"||typeof i=="bigint")&&Ks(e,""+i);break;case"onScroll":i!=null&&ze("scroll",e);break;case"onScrollEnd":i!=null&&ze("scrollend",e);break;case"onClick":i!=null&&(e.onclick=ua);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!nh.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),u=e[Vt]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,r),typeof i=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,r);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):ho(e,a,i)}}}function Pt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",e),ze("load",e);var i=!1,r=!1,u;for(u in a)if(a.hasOwnProperty(u)){var g=a[u];if(g!=null)switch(u){case"src":i=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:We(e,t,u,g,a,null)}}r&&We(e,t,"srcSet",a.srcSet,a,null),i&&We(e,t,"src",a.src,a,null);return;case"input":ze("invalid",e);var x=u=g=r=null,E=null,M=null;for(i in a)if(a.hasOwnProperty(i)){var I=a[i];if(I!=null)switch(i){case"name":r=I;break;case"type":g=I;break;case"checked":E=I;break;case"defaultChecked":M=I;break;case"value":u=I;break;case"defaultValue":x=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(o(137,t));break;default:We(e,t,i,I,a,null)}}oh(e,u,x,E,M,g,r,!1);return;case"select":ze("invalid",e),i=g=u=null;for(r in a)if(a.hasOwnProperty(r)&&(x=a[r],x!=null))switch(r){case"value":u=x;break;case"defaultValue":g=x;break;case"multiple":i=x;default:We(e,t,r,x,a,null)}t=u,a=g,e.multiple=!!i,t!=null?Ys(e,!!i,t,!1):a!=null&&Ys(e,!!i,a,!0);return;case"textarea":ze("invalid",e),u=r=i=null;for(g in a)if(a.hasOwnProperty(g)&&(x=a[g],x!=null))switch(g){case"value":i=x;break;case"defaultValue":r=x;break;case"children":u=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(o(91));break;default:We(e,t,g,x,a,null)}ch(e,i,r,u);return;case"option":for(E in a)if(a.hasOwnProperty(E)&&(i=a[E],i!=null))switch(E){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:We(e,t,E,i,a,null)}return;case"dialog":ze("beforetoggle",e),ze("toggle",e),ze("cancel",e),ze("close",e);break;case"iframe":case"object":ze("load",e);break;case"video":case"audio":for(i=0;i<jl.length;i++)ze(jl[i],e);break;case"image":ze("error",e),ze("load",e);break;case"details":ze("toggle",e);break;case"embed":case"source":case"link":ze("error",e),ze("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(M in a)if(a.hasOwnProperty(M)&&(i=a[M],i!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:We(e,t,M,i,a,null)}return;default:if(dc(t)){for(I in a)a.hasOwnProperty(I)&&(i=a[I],i!==void 0&&Qu(e,t,I,i,a,void 0));return}}for(x in a)a.hasOwnProperty(x)&&(i=a[x],i!=null&&We(e,t,x,i,a,null))}function M1(e,t,a,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,u=null,g=null,x=null,E=null,M=null,I=null;for(z in a){var Z=a[z];if(a.hasOwnProperty(z)&&Z!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":E=Z;default:i.hasOwnProperty(z)||We(e,t,z,null,i,Z)}}for(var B in i){var z=i[B];if(Z=a[B],i.hasOwnProperty(B)&&(z!=null||Z!=null))switch(B){case"type":u=z;break;case"name":r=z;break;case"checked":M=z;break;case"defaultChecked":I=z;break;case"value":g=z;break;case"defaultValue":x=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,t));break;default:z!==Z&&We(e,t,B,z,i,Z)}}cc(e,g,x,E,M,I,u,r);return;case"select":z=g=x=B=null;for(u in a)if(E=a[u],a.hasOwnProperty(u)&&E!=null)switch(u){case"value":break;case"multiple":z=E;default:i.hasOwnProperty(u)||We(e,t,u,null,i,E)}for(r in i)if(u=i[r],E=a[r],i.hasOwnProperty(r)&&(u!=null||E!=null))switch(r){case"value":B=u;break;case"defaultValue":x=u;break;case"multiple":g=u;default:u!==E&&We(e,t,r,u,i,E)}t=x,a=g,i=z,B!=null?Ys(e,!!a,B,!1):!!i!=!!a&&(t!=null?Ys(e,!!a,t,!0):Ys(e,!!a,a?[]:"",!1));return;case"textarea":z=B=null;for(x in a)if(r=a[x],a.hasOwnProperty(x)&&r!=null&&!i.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:We(e,t,x,null,i,r)}for(g in i)if(r=i[g],u=a[g],i.hasOwnProperty(g)&&(r!=null||u!=null))switch(g){case"value":B=r;break;case"defaultValue":z=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==u&&We(e,t,g,r,i,u)}rh(e,B,z);return;case"option":for(var ce in a)if(B=a[ce],a.hasOwnProperty(ce)&&B!=null&&!i.hasOwnProperty(ce))switch(ce){case"selected":e.selected=!1;break;default:We(e,t,ce,null,i,B)}for(E in i)if(B=i[E],z=a[E],i.hasOwnProperty(E)&&B!==z&&(B!=null||z!=null))switch(E){case"selected":e.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:We(e,t,E,B,i,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 xe in a)B=a[xe],a.hasOwnProperty(xe)&&B!=null&&!i.hasOwnProperty(xe)&&We(e,t,xe,null,i,B);for(M in i)if(B=i[M],z=a[M],i.hasOwnProperty(M)&&B!==z&&(B!=null||z!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o(137,t));break;default:We(e,t,M,B,i,z)}return;default:if(dc(t)){for(var et in a)B=a[et],a.hasOwnProperty(et)&&B!==void 0&&!i.hasOwnProperty(et)&&Qu(e,t,et,void 0,i,B);for(I in i)B=i[I],z=a[I],!i.hasOwnProperty(I)||B===z||B===void 0&&z===void 0||Qu(e,t,I,B,i,z);return}}for(var k in a)B=a[k],a.hasOwnProperty(k)&&B!=null&&!i.hasOwnProperty(k)&&We(e,t,k,null,i,B);for(Z in i)B=i[Z],z=a[Z],!i.hasOwnProperty(Z)||B===z||B==null&&z==null||We(e,t,Z,B,i,z)}function fg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function O1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var r=a[i],u=r.transferSize,g=r.initiatorType,x=r.duration;if(u&&x&&fg(g)){for(g=0,x=r.responseEnd,i+=1;i<a.length;i++){var E=a[i],M=E.startTime;if(M>x)break;var I=E.transferSize,Z=E.initiatorType;I&&fg(Z)&&(E=E.responseEnd,g+=I*(E<x?1:(x-M)/(E-M)))}if(--i,t+=8*(u+g)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Ju=null,Wu=null;function dr(e){return e.nodeType===9?e:e.ownerDocument}function hg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function mg(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function ed(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var td=null;function B1(){var e=window.event;return e&&e.type==="popstate"?e===td?!1:(td=e,!0):(td=null,!1)}var pg=typeof setTimeout=="function"?setTimeout:void 0,L1=typeof clearTimeout=="function"?clearTimeout:void 0,gg=typeof Promise=="function"?Promise:void 0,U1=typeof queueMicrotask=="function"?queueMicrotask:typeof gg<"u"?function(e){return gg.resolve(null).then(e).catch(z1)}:pg;function z1(e){setTimeout(function(){throw e})}function Qa(e){return e==="head"}function vg(e,t){var a=t,i=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(r),Ti(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")Al(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Al(a);for(var u=a.firstChild;u;){var g=u.nextSibling,x=u.nodeName;u[Le]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=g}}else a==="body"&&Al(e.ownerDocument.body);a=r}while(a);Ti(t)}function yg(e,t){var a=e;e=0;do{var i=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function nd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":nd(a),Oe(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function V1(e,t,a,i){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Le])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=On(e.nextSibling),e===null)break}return null}function H1(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=On(e.nextSibling),e===null))return null;return e}function bg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=On(e.nextSibling),e===null))return null;return e}function ad(e){return e.data==="$?"||e.data==="$~"}function sd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function G1(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function On(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var id=null;function Sg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return On(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function xg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function _g(e,t,a){switch(t=dr(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Al(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Oe(e)}var Bn=new Map,Tg=new Set;function fr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ca=K.d;K.d={f:I1,r:P1,D:q1,C:Y1,L:K1,m:Z1,X:$1,S:X1,M:F1};function I1(){var e=Ca.f(),t=ar();return e||t}function P1(e){var t=Kt(e);t!==null&&t.tag===5&&t.type==="form"?Hm(t):Ca.r(e)}var Si=typeof document>"u"?null:document;function Eg(e,t,a){var i=Si;if(i&&typeof t=="string"&&t){var r=An(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),Tg.has(r)||(Tg.add(r),e={rel:e,crossOrigin:a,href:t},i.querySelector(r)===null&&(t=i.createElement("link"),Pt(t,"link",e),Ve(t),i.head.appendChild(t)))}}function q1(e){Ca.D(e),Eg("dns-prefetch",e,null)}function Y1(e,t){Ca.C(e,t),Eg("preconnect",e,t)}function K1(e,t,a){Ca.L(e,t,a);var i=Si;if(i&&e&&t){var r='link[rel="preload"][as="'+An(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+An(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+An(a.imageSizes)+'"]')):r+='[href="'+An(e)+'"]';var u=r;switch(t){case"style":u=xi(e);break;case"script":u=_i(e)}Bn.has(u)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Bn.set(u,e),i.querySelector(r)!==null||t==="style"&&i.querySelector(Nl(u))||t==="script"&&i.querySelector(wl(u))||(t=i.createElement("link"),Pt(t,"link",e),Ve(t),i.head.appendChild(t)))}}function Z1(e,t){Ca.m(e,t);var a=Si;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+An(i)+'"][href="'+An(e)+'"]',u=r;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=_i(e)}if(!Bn.has(u)&&(e=b({rel:"modulepreload",href:e},t),Bn.set(u,e),a.querySelector(r)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(wl(u)))return}i=a.createElement("link"),Pt(i,"link",e),Ve(i),a.head.appendChild(i)}}}function X1(e,t,a){Ca.S(e,t,a);var i=Si;if(i&&e){var r=rt(i).hoistableStyles,u=xi(e);t=t||"default";var g=r.get(u);if(!g){var x={loading:0,preload:null};if(g=i.querySelector(Nl(u)))x.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Bn.get(u))&&ld(e,a);var E=g=i.createElement("link");Ve(E),Pt(E,"link",e),E._p=new Promise(function(M,I){E.onload=M,E.onerror=I}),E.addEventListener("load",function(){x.loading|=1}),E.addEventListener("error",function(){x.loading|=2}),x.loading|=4,hr(g,t,i)}g={type:"stylesheet",instance:g,count:1,state:x},r.set(u,g)}}}function $1(e,t){Ca.X(e,t);var a=Si;if(a&&e){var i=rt(a).hoistableScripts,r=_i(e),u=i.get(r);u||(u=a.querySelector(wl(r)),u||(e=b({src:e,async:!0},t),(t=Bn.get(r))&&od(e,t),u=a.createElement("script"),Ve(u),Pt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},i.set(r,u))}}function F1(e,t){Ca.M(e,t);var a=Si;if(a&&e){var i=rt(a).hoistableScripts,r=_i(e),u=i.get(r);u||(u=a.querySelector(wl(r)),u||(e=b({src:e,async:!0,type:"module"},t),(t=Bn.get(r))&&od(e,t),u=a.createElement("script"),Ve(u),Pt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},i.set(r,u))}}function jg(e,t,a,i){var r=(r=ue.current)?fr(r):null;if(!r)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=xi(a.href),a=rt(r).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=xi(a.href);var u=rt(r).hoistableStyles,g=u.get(e);if(g||(r=r.ownerDocument||r,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,g),(u=r.querySelector(Nl(e)))&&!u._p&&(g.instance=u,g.state.loading=5),Bn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Bn.set(e,a),u||Q1(r,e,a,g.state))),t&&i===null)throw Error(o(528,""));return g}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=_i(a),a=rt(r).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function xi(e){return'href="'+An(e)+'"'}function Nl(e){return'link[rel="stylesheet"]['+e+"]"}function Cg(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function Q1(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Pt(t,"link",a),Ve(t),e.head.appendChild(t))}function _i(e){return'[src="'+An(e)+'"]'}function wl(e){return"script[async]"+e}function Ag(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+An(a.href)+'"]');if(i)return t.instance=i,Ve(i),i;var r=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ve(i),Pt(i,"style",r),hr(i,a.precedence,e),t.instance=i;case"stylesheet":r=xi(a.href);var u=e.querySelector(Nl(r));if(u)return t.state.loading|=4,t.instance=u,Ve(u),u;i=Cg(a),(r=Bn.get(r))&&ld(i,r),u=(e.ownerDocument||e).createElement("link"),Ve(u);var g=u;return g._p=new Promise(function(x,E){g.onload=x,g.onerror=E}),Pt(u,"link",i),t.state.loading|=4,hr(u,a.precedence,e),t.instance=u;case"script":return u=_i(a.src),(r=e.querySelector(wl(u)))?(t.instance=r,Ve(r),r):(i=a,(r=Bn.get(u))&&(i=b({},a),od(i,r)),e=e.ownerDocument||e,r=e.createElement("script"),Ve(r),Pt(r,"link",i),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,hr(i,a.precedence,e));return t.instance}function hr(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=i.length?i[i.length-1]:null,u=r,g=0;g<i.length;g++){var x=i[g];if(x.dataset.precedence===t)u=x;else if(u!==r)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function ld(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function od(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var mr=null;function Ng(e,t,a){if(mr===null){var i=new Map,r=mr=new Map;r.set(a,i)}else r=mr,i=r.get(a),i||(i=new Map,r.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var u=a[r];if(!(u[Le]||u[Nt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var g=u.getAttribute(t)||"";g=e+g;var x=i.get(g);x?x.push(u):i.set(g,[u])}}return i}function wg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function J1(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Dg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function W1(e,t,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=xi(i.href),u=t.querySelector(Nl(r));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=pr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,Ve(u);return}u=t.ownerDocument||t,i=Cg(i),(r=Bn.get(r))&&ld(i,r),u=u.createElement("link"),Ve(u);var g=u;g._p=new Promise(function(x,E){g.onload=x,g.onerror=E}),Pt(u,"link",i),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=pr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var rd=0;function ex(e,t){return e.stylesheets&&e.count===0&&vr(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&vr(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&rd===0&&(rd=62500*O1());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&vr(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>rd?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(r)}}:null}function pr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)vr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var gr=null;function vr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,gr=new Map,t.forEach(tx,e),gr=null,pr.call(e))}function tx(e,t){if(!(t.state.loading&4)){var a=gr.get(e);if(a)var i=a.get(null);else{a=new Map,gr.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<r.length;u++){var g=r[u];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),i=g)}i&&a.set(null,i)}r=t.instance,g=r.getAttribute("data-precedence"),u=a.get(g)||i,u===i&&a.set(null,r),a.set(g,r),this.count++,i=pr.bind(this),r.addEventListener("load",i),r.addEventListener("error",i),u?u.parentNode.insertBefore(r,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Dl={$$typeof:O,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function nx(e,t,a,i,r,u,g,x,E){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Hs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hs(0),this.hiddenUpdates=Hs(null),this.identifierPrefix=i,this.onUncaughtError=r,this.onCaughtError=u,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function kg(e,t,a,i,r,u,g,x,E,M,I,Z){return e=new nx(e,t,a,g,E,M,I,Z,x),t=1,u===!0&&(t|=24),u=gn(3,null,null,t),e.current=u,u.stateNode=e,t=Gc(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:i,isDehydrated:a,cache:t},Yc(u),e}function Rg(e){return e?(e=Ws,e):Ws}function Mg(e,t,a,i,r,u){r=Rg(r),i.context===null?i.context=r:i.pendingContext=r,i=Ha(t),i.payload={element:a},u=u===void 0?null:u,u!==null&&(i.callback=u),a=Ga(e,i,t),a!==null&&(hn(a,e,t),rl(a,e,t))}function Og(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function cd(e,t){Og(e,t),(e=e.alternate)&&Og(e,t)}function Bg(e){if(e.tag===13||e.tag===31){var t=ps(e,67108864);t!==null&&hn(t,e,67108864),cd(e,67108864)}}function Lg(e){if(e.tag===13||e.tag===31){var t=xn();t=Gs(t);var a=ps(e,t);a!==null&&hn(a,e,t),cd(e,t)}}var yr=!0;function ax(e,t,a,i){var r=U.T;U.T=null;var u=K.p;try{K.p=2,ud(e,t,a,i)}finally{K.p=u,U.T=r}}function sx(e,t,a,i){var r=U.T;U.T=null;var u=K.p;try{K.p=8,ud(e,t,a,i)}finally{K.p=u,U.T=r}}function ud(e,t,a,i){if(yr){var r=dd(i);if(r===null)Fu(e,t,i,br,a),zg(e,i);else if(lx(r,e,t,a,i))i.stopPropagation();else if(zg(e,i),t&4&&-1<ix.indexOf(e)){for(;r!==null;){var u=Kt(r);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var g=oe(u.pendingLanes);if(g!==0){var x=u;for(x.pendingLanes|=2,x.entangledLanes|=2;g;){var E=1<<31-ft(g);x.entanglements[1]|=E,g&=~E}ta(u),(Ke&6)===0&&(tr=de()+500,El(0))}}break;case 31:case 13:x=ps(u,2),x!==null&&hn(x,u,2),ar(),cd(u,2)}if(u=dd(i),u===null&&Fu(e,t,i,br,a),u===r)break;r=u}r!==null&&i.stopPropagation()}else Fu(e,t,i,null,a)}}function dd(e){return e=hc(e),fd(e)}var br=null;function fd(e){if(br=null,e=Re(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=f(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return br=e,null}function Ug(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ee()){case je:return 2;case Xe:return 8;case Me:case nt:return 32;case xt:return 268435456;default:return 32}default:return 32}}var hd=!1,Ja=null,Wa=null,es=null,kl=new Map,Rl=new Map,ts=[],ix="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 zg(e,t){switch(e){case"focusin":case"focusout":Ja=null;break;case"dragenter":case"dragleave":Wa=null;break;case"mouseover":case"mouseout":es=null;break;case"pointerover":case"pointerout":kl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rl.delete(t.pointerId)}}function Ml(e,t,a,i,r,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:u,targetContainers:[r]},t!==null&&(t=Kt(t),t!==null&&Bg(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function lx(e,t,a,i,r){switch(t){case"focusin":return Ja=Ml(Ja,e,t,a,i,r),!0;case"dragenter":return Wa=Ml(Wa,e,t,a,i,r),!0;case"mouseover":return es=Ml(es,e,t,a,i,r),!0;case"pointerover":var u=r.pointerId;return kl.set(u,Ml(kl.get(u)||null,e,t,a,i,r)),!0;case"gotpointercapture":return u=r.pointerId,Rl.set(u,Ml(Rl.get(u)||null,e,t,a,i,r)),!0}return!1}function Vg(e){var t=Re(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=f(a),t!==null){e.blockedOn=t,Ki(e.priority,function(){Lg(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,Ki(e.priority,function(){Lg(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Sr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=dd(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);fc=i,a.target.dispatchEvent(i),fc=null}else return t=Kt(a),t!==null&&Bg(t),e.blockedOn=a,!1;t.shift()}return!0}function Hg(e,t,a){Sr(e)&&a.delete(t)}function ox(){hd=!1,Ja!==null&&Sr(Ja)&&(Ja=null),Wa!==null&&Sr(Wa)&&(Wa=null),es!==null&&Sr(es)&&(es=null),kl.forEach(Hg),Rl.forEach(Hg)}function xr(e,t){e.blockedOn===t&&(e.blockedOn=null,hd||(hd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,ox)))}var _r=null;function Gg(e){_r!==e&&(_r=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){_r===e&&(_r=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],r=e[t+2];if(typeof i!="function"){if(fd(i||a)===null)continue;break}var u=Kt(a);u!==null&&(e.splice(t,3),t-=3,du(u,{pending:!0,data:r,method:a.method,action:i},i,r))}}))}function Ti(e){function t(E){return xr(E,e)}Ja!==null&&xr(Ja,e),Wa!==null&&xr(Wa,e),es!==null&&xr(es,e),kl.forEach(t),Rl.forEach(t);for(var a=0;a<ts.length;a++){var i=ts[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<ts.length&&(a=ts[0],a.blockedOn===null);)Vg(a),a.blockedOn===null&&ts.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var r=a[i],u=a[i+1],g=r[Vt]||null;if(typeof u=="function")g||Gg(a);else if(g){var x=null;if(u&&u.hasAttribute("formAction")){if(r=u,g=u[Vt]||null)x=g.formAction;else if(fd(r)!==null)continue}else x=g.action;typeof x=="function"?a[i+1]=x:(a.splice(i,3),i-=3),Gg(a)}}}function Ig(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(g){return r=g})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),i||setTimeout(a,20)}function a(){if(!i&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function md(e){this._internalRoot=e}Tr.prototype.render=md.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,i=xn();Mg(a,i,e,t,null,null)},Tr.prototype.unmount=md.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Mg(e.current,2,null,e,null,null),ar(),t[ra]=null}};function Tr(e){this._internalRoot=e}Tr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yi();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ts.length&&t!==0&&t<ts[a].priority;a++);ts.splice(a,0,e),a===0&&Vg(e)}};var Pg=s.version;if(Pg!=="19.2.4")throw Error(o(527,Pg,"19.2.4"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=v(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var rx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Er=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Er.isDisabled&&Er.supportsFiber)try{at=Er.inject(rx),gt=Er}catch{}}return Ol.createRoot=function(e,t){if(!c(e))throw Error(o(299));var a=!1,i="",r=Fm,u=Qm,g=Jm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=kg(e,1,!1,null,null,a,i,null,r,u,g,Ig),e[ra]=t.current,$u(e),new md(t)},Ol.hydrateRoot=function(e,t,a){if(!c(e))throw Error(o(299));var i=!1,r="",u=Fm,g=Qm,x=Jm,E=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError),a.formState!==void 0&&(E=a.formState)),t=kg(e,1,!0,t,a??null,i,r,E,u,g,x,Ig),t.context=Rg(null),a=t.current,i=xn(),i=Gs(i),r=Ha(i),r.callback=null,Ga(a,r,i),a=i,t.current.lanes=a,Ra(t,a),ta(t),e[ra]=t.current,$u(e),new Tr(t)},Ol.version="19.2.4",Ol}var Fg;function Ex(){if(Fg)return pd.exports;Fg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),pd.exports=Tx(),pd.exports}var jx=Ex();function Ft(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Il(n,s){return console.warn(`[ws] Malformed "${n}" message: ${s}`),!1}function Cx(n){return Ft(n)&&typeof n.id=="string"&&typeof n.displayName=="string"&&typeof n.adapterType=="string"&&typeof n.defaultRuntime=="string"&&typeof n.status=="string"&&typeof n.bootstrapped=="boolean"}function Qg(n){return Ft(n)&&typeof n.id=="string"&&typeof n.environmentId=="string"&&typeof n.runtime=="string"&&typeof n.status=="string"&&typeof n.prompt=="string"&&typeof n.startedAt=="string"&&(n.endedAt===void 0||typeof n.endedAt=="string")&&(n.error===void 0||typeof n.error=="string")}function Jg(n){return Ft(n)&&typeof n.sessionId=="string"&&typeof n.eventType=="string"&&typeof n.timestamp=="string"&&typeof n.content=="string"&&(n.raw===void 0||typeof n.raw=="string")}function Ax(n){return Ft(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.repoUrl=="string"&&typeof n.defaultEnvironmentId=="string"&&typeof n.status=="string"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function Nx(n){return Ft(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.title=="string"&&typeof n.status=="string"&&typeof n.branch=="string"&&typeof n.sortOrder=="number"&&typeof n.depth=="number"&&Array.isArray(n.dependsOn)&&Array.isArray(n.childTaskIds)}function wx(n){return Ft(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.taskId=="string"&&typeof n.sessionId=="string"&&typeof n.category=="string"&&typeof n.title=="string"&&typeof n.content=="string"&&Array.isArray(n.tags)&&typeof n.createdAt=="string"}function Dx(n){return Ft(n)&&typeof n.name=="string"&&typeof n.tokenType=="string"&&typeof n.envVar=="string"&&typeof n.filePath=="string"&&typeof n.expiresAt=="string"}const kx=new Set(["off","subscription","api_key"]),yd=new Set(["off","on"]);function Rx(n){return Ft(n)&&kx.has(n.claude)&&yd.has(n.github)&&yd.has(n.copilot)&&yd.has(n.codex)}function Mx(n){return Ft(n)&&typeof n.environmentId=="string"&&typeof n.stage=="string"&&typeof n.message=="string"&&typeof n.progress=="number"}function Ox(n){return Ft(n)&&typeof n.name=="string"&&typeof n.repository=="string"&&typeof n.state=="string"&&typeof n.gitStatus=="string"}function Bx(n){return Ft(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.systemPrompt=="string"&&typeof n.toolConfig=="string"&&typeof n.runtime=="string"&&typeof n.model=="string"&&typeof n.maxTurns=="number"&&typeof n.mcpServers=="string"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function na(n,s,l,o){return Array.isArray(n)?n.filter((c,d)=>s(c)?!0:(Il(l,`item at index ${d} in "${o}" has unexpected shape`),!1)):(Il(l,`expected "${o}" to be an array, got ${typeof n}`),[])}function Lx(n){let s;try{s=JSON.parse(n)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!Ft(s)||typeof s.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",s);return}return{type:s.type,payload:Ft(s.payload)?s.payload:void 0}}function Ux(n){switch(n){case"waiting_input":return"idle";case"killed":return"interrupted";default:return n}}const zx=3e3,Ei=5e3;function Vx(n){const s=typeof window<"u"&&window.__GRACKLE_API_KEY__||"",l=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}?token=${encodeURIComponent(s)}`:"ws://localhost:3000",o=S.useRef(void 0),[c,d]=S.useState(!1),[f,m]=S.useState([]),[p,v]=S.useState([]),[y,b]=S.useState([]),[_,T]=S.useState(0),[N,D]=S.useState(void 0),[w,C]=S.useState([]),[H,O]=S.useState([]),[F,G]=S.useState([]),[W,ee]=S.useState([]),[$,ae]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[_e,L]=S.useState({}),[be,te]=S.useState([]),[Be,P]=S.useState(""),[U,K]=S.useState(""),[V,pe]=S.useState(!1),[ie,Ae]=S.useState([]),[Se,me]=S.useState({}),[we,Q]=S.useState(!1),[ue,Pe]=S.useState(void 0),J=S.useCallback(ne=>{var ve;((ve=o.current)==null?void 0:ve.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(ne))},[]);S.useEffect(()=>{let ne,ve;function oe(){ne=new WebSocket(l),o.current=ne,ne.onopen=()=>{d(!0),J({type:"list_environments"}),J({type:"list_sessions"}),J({type:"list_projects"}),J({type:"list_tokens"}),J({type:"get_credential_providers"}),J({type:"list_personas"}),J({type:"subscribe_all"})},ne.onmessage=Ce=>{var Qe,on,Hs,Ra,co,Ii,Pi,qi,Gs,Is,Yi,Ki,Yn,Nt,Vt,ra,Ps,uo,fo;if(typeof Ce.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const q=Lx(Ce.data);if(q)switch(q.type){case"environments":m(na((Qe=q.payload)==null?void 0:Qe.environments,Cx,"environments","environments"));break;case"sessions":v(le=>{var Zt;const Le=na((Zt=q.payload)==null?void 0:Zt.sessions,Qg,"sessions","sessions"),Oe=new Map(le.map(rt=>[rt.id,rt.status])),Re=new Set(["pending","running","idle"]),Kt=new Set(["completed","failed","interrupted"]);return Le.map(rt=>{const Ve=Oe.get(rt.id);if(!Ve||Ve===rt.status)return rt;if(Kt.has(Ve)&&Re.has(rt.status))return{...rt,status:Ve};if(Re.has(Ve)&&Re.has(rt.status)){const Ma=["pending","running","idle"];if(Ma.indexOf(Ve)>Ma.indexOf(rt.status))return{...rt,status:Ve}}return rt})});break;case"session_event":{if(!Jg(q.payload)){Il("session_event","payload is not a valid SessionEvent");break}const le=q.payload;let Le=0;if(b(Oe=>{const Re=[...Oe,le];return Re.length>Ei?(Le=Re.length-Ei,Re.slice(-Ei)):Re}),Le>0&&T(Oe=>Oe+Le),le.eventType==="status"){const Oe=Ux(le.content);v(Re=>Re.some(Zt=>Zt.id===le.sessionId)?Re.map(Zt=>Zt.id===le.sessionId?{...Zt,status:Oe}:Zt):[...Re,{id:le.sessionId,environmentId:"",runtime:"",status:Oe,prompt:"",startedAt:le.timestamp}])}break}case"session_events":{const le=na((on=q.payload)==null?void 0:on.events,Jg,"session_events","events"),Le=(Hs=q.payload)==null?void 0:Hs.sessionId;if(typeof Le!="string"){Il("session_events","missing or non-string sessionId");break}if(le.length>0){let Oe=0;b(Re=>{const Kt=new Set;for(const Ve of Re)Ve.sessionId===Le&&Kt.add(`${Ve.timestamp}|${Ve.eventType}`);const Zt=le.filter(Ve=>!Kt.has(`${Ve.timestamp}|${Ve.eventType}`)),rt=[...Re,...Zt].sort((Ve,Ma)=>Ve.sessionId!==Ma.sessionId?0:Ve.timestamp.localeCompare(Ma.timestamp));return rt.length>Ei?(Oe=rt.length-Ei,rt.slice(-Ei)):rt}),Oe>0&&T(Re=>Re+Oe)}break}case"spawned":{const le=(Ra=q.payload)==null?void 0:Ra.sessionId;typeof le=="string"&&le&&D(le),J({type:"list_sessions"});break}case"projects":C(na((co=q.payload)==null?void 0:co.projects,Ax,"projects","projects"));break;case"project_created":Q(!1),J({type:"list_projects"});break;case"project_archived":J({type:"list_projects"});break;case"project_updated":J({type:"list_projects"});break;case"tasks":{const le=na((Ii=q.payload)==null?void 0:Ii.tasks,Nx,"tasks","tasks"),Le=(typeof((Pi=q.payload)==null?void 0:Pi.projectId)=="string"?q.payload.projectId:"")||(le.length>0?le[0].projectId:"");if(!Le){O(le);break}O(Oe=>[...Oe.filter(Re=>Re.projectId!==Le),...le]);break}case"task_created":{const le=(qi=q.payload)==null?void 0:qi.task;if(Ft(le)){const Le=typeof le.project_id=="string"?le.project_id:typeof le.projectId=="string"?le.projectId:"";Le&&J({type:"list_tasks",payload:{projectId:Le}})}break}case"task_started":{const le=q.payload;if(!Ft(le))break;Pe(Oe=>le.taskId&&Oe===le.taskId?void 0:Oe),le.sessionId&&(J({type:"list_sessions"}),typeof le.taskId=="string"&&typeof le.sessionId=="string"&&O(Oe=>Oe.map(Re=>Re.id===le.taskId?{...Re,latestSessionId:le.sessionId}:Re)));const Le=typeof le.projectId=="string"?le.projectId:void 0;Le?J({type:"list_tasks",payload:{projectId:Le}}):le.taskId&&O(Oe=>{const Re=Oe.find(Kt=>Kt.id===le.taskId);return Re&&J({type:"list_tasks",payload:{projectId:Re.projectId}}),Oe});break}case"task_completed":case"task_deleted":case"task_updated":{const le=q.payload;if(!Ft(le))break;const Le=typeof le.projectId=="string"?le.projectId:void 0;Le?J({type:"list_tasks",payload:{projectId:Le}}):le.taskId&&O(Oe=>{const Re=Oe.find(Kt=>Kt.id===le.taskId);return Re&&J({type:"list_tasks",payload:{projectId:Re.projectId}}),Oe});break}case"findings":G(na((Gs=q.payload)==null?void 0:Gs.findings,wx,"findings","findings"));break;case"finding_posted":typeof((Is=q.payload)==null?void 0:Is.projectId)=="string"&&J({type:"list_findings",payload:{projectId:q.payload.projectId}});break;case"tokens":ee(na((Yi=q.payload)==null?void 0:Yi.tokens,Dx,"tokens","tokens"));break;case"token_changed":J({type:"list_tokens"});break;case"credential_providers":Rx(q.payload)&&ae(q.payload);break;case"provision_progress":{if(!Mx(q.payload)){Il("provision_progress","payload is not a valid ProvisionStatus with environmentId");break}const le=q.payload;L(Le=>({...Le,[le.environmentId]:{stage:le.stage,message:le.message,progress:le.progress}})),le.stage==="ready"&&setTimeout(()=>{L(Oe=>{const Re={...Oe};return delete Re[le.environmentId],Re})},5e3);break}case"environment_added":break;case"environment_removed":if(typeof((Ki=q.payload)==null?void 0:Ki.environmentId)=="string"){const le=q.payload.environmentId;m(Le=>Le.filter(Oe=>Oe.id!==le)),L(Le=>{const Oe={...Le};return delete Oe[le],Oe})}J({type:"list_sessions"});break;case"codespaces_list":{const le=na((Yn=q.payload)==null?void 0:Yn.codespaces,Ox,"codespaces_list","codespaces"),Le=typeof((Nt=q.payload)==null?void 0:Nt.error)=="string"?q.payload.error:"";te(le),K(Le);break}case"codespace_created":{pe(!1),J({type:"list_codespaces"});break}case"codespace_create_error":{pe(!1);const le=typeof((Vt=q.payload)==null?void 0:Vt.message)=="string"?q.payload.message:"Failed to create codespace";P(le);break}case"personas":{const le=na((ra=q.payload)==null?void 0:ra.personas,Bx,"personas","personas");Ae(le);break}case"persona_created":case"persona_updated":case"persona_deleted":J({type:"list_personas"});break;case"task_sessions":{const le=(Ps=q.payload)==null?void 0:Ps.taskId;if(typeof le!="string"||!le)break;const Le=na((uo=q.payload)==null?void 0:uo.sessions,Qg,"task_sessions","sessions");me(Oe=>({...Oe,[le]:Le}));break}case"error":console.error("[ws]",(fo=q.payload)==null?void 0:fo.message);break}},ne.onclose=()=>{d(!1),o.current=void 0,Q(!1),Pe(void 0),clearTimeout(ve),ve=setTimeout(oe,zx)},ne.onerror=()=>{ne.close()}}return oe(),()=>{clearTimeout(ve),ne==null||ne.close()}},[l,J]);const sn=S.useCallback((ne,ve,oe,Ce,q,Qe)=>{J({type:"spawn",payload:{environmentId:ne,prompt:ve,model:oe||"",runtime:Ce||"",personaId:q||"",worktreeBasePath:Qe||""}})},[J]),Qn=S.useCallback((ne,ve)=>{J({type:"send_input",payload:{sessionId:ne,text:ve}})},[J]),ln=S.useCallback(ne=>{J({type:"kill",payload:{sessionId:ne}})},[J]),jn=S.useCallback(()=>{J({type:"list_environments"}),J({type:"list_sessions"}),J({type:"list_projects"}),J({type:"list_tokens"})},[J]),dt=S.useCallback(ne=>{J({type:"get_session_events",payload:{sessionId:ne}})},[J]),Jt=S.useCallback(()=>{b([]),T(0)},[]),Hn=S.useCallback((ne,ve,oe,Ce)=>{Q(!0),J({type:"create_project",payload:{name:ne,description:ve||"",repoUrl:oe||"",defaultEnvironmentId:Ce||""}})},[J]),Gn=S.useCallback(ne=>{J({type:"archive_project",payload:{projectId:ne}})},[J]),mn=S.useCallback((ne,ve)=>{J({type:"update_project",payload:{projectId:ne,...ve}})},[J]),In=S.useCallback(ne=>{J({type:"list_tasks",payload:{projectId:ne}})},[J]),Yt=S.useCallback((ne,ve,oe,Ce,q)=>{J({type:"create_task",payload:{projectId:ne,title:ve,description:oe||"",dependsOn:Ce||[],parentTaskId:q||""}})},[J]),Pn=S.useCallback((ne,ve,oe,Ce,q,Qe)=>{Pe(ne),J({type:"start_task",payload:{taskId:ne,runtime:ve||"",model:oe||"",personaId:Ce||"",environmentId:q||"",notes:Qe||""}})},[J]),X=S.useCallback(ne=>{J({type:"complete_task",payload:{taskId:ne}})},[J]),se=S.useCallback(ne=>{J({type:"resume_task",payload:{taskId:ne}})},[J]),re=S.useCallback((ne,ve,oe,Ce)=>{J({type:"update_task",payload:{taskId:ne,title:ve,description:oe,dependsOn:Ce}})},[J]),de=S.useCallback(ne=>{J({type:"delete_task",payload:{taskId:ne}})},[J]),Ee=S.useCallback(ne=>{J({type:"list_findings",payload:{projectId:ne}})},[J]),je=S.useCallback((ne,ve,oe,Ce,q)=>{J({type:"post_finding",payload:{projectId:ne,title:ve,content:oe,category:Ce||"general",tags:q||[]}})},[J]),Xe=S.useCallback(()=>{J({type:"list_tokens"})},[J]),Me=S.useCallback((ne,ve,oe,Ce,q)=>{J({type:"set_token",payload:{name:ne,value:ve,tokenType:oe,envVar:Ce,filePath:q}})},[J]),nt=S.useCallback(ne=>{J({type:"delete_token",payload:{name:ne}})},[J]),xt=S.useCallback(ne=>{J({type:"set_credential_providers",payload:ne})},[J]),pt=S.useCallback((ne,ve,oe,Ce)=>{const q={displayName:ne,adapterType:ve,adapterConfig:oe||{}};Ce&&(q.defaultRuntime=Ce),J({type:"add_environment",payload:q})},[J]),At=S.useCallback(ne=>{J({type:"provision_environment",payload:{environmentId:ne}})},[J]),at=S.useCallback(ne=>{J({type:"stop_environment",payload:{environmentId:ne}})},[J]),gt=S.useCallback(ne=>{J({type:"remove_environment",payload:{environmentId:ne}})},[J]),Wt=S.useCallback(()=>{J({type:"list_codespaces"})},[J]),ft=S.useCallback((ne,ve)=>{if(!c){P("Not connected to server. Please try again once the connection is restored.");return}pe(!0),P("");const oe={repo:ne};ve&&(oe.machine=ve),J({type:"create_codespace",payload:oe})},[J,c]),Lt=S.useCallback((ne,ve,oe,Ce,q,Qe)=>{J({type:"create_persona",payload:{name:ne,description:ve,systemPrompt:oe,runtime:Ce||"",model:q||"",maxTurns:Qe||0}})},[J]),Ut=S.useCallback((ne,ve,oe,Ce,q,Qe,on)=>{J({type:"update_persona",payload:{personaId:ne,name:ve||"",description:oe||"",systemPrompt:Ce||"",runtime:q||"",model:Qe||"",maxTurns:on||0}})},[J]),us=S.useCallback(ne=>{J({type:"delete_persona",payload:{personaId:ne}})},[J]),qn=S.useCallback(ne=>{J({type:"get_task_sessions",payload:{taskId:ne}})},[J]);return{connected:c,environments:f,sessions:p,events:y,eventsDropped:_,lastSpawnedId:N,projects:w,tasks:H,findings:F,tokens:W,spawn:sn,sendInput:Qn,kill:ln,refresh:jn,loadSessionEvents:dt,clearEvents:Jt,createProject:Hn,archiveProject:Gn,updateProject:mn,loadTasks:In,createTask:Yt,startTask:Pn,completeTask:X,resumeTask:se,updateTask:re,deleteTask:de,loadFindings:Ee,postFinding:je,addEnvironment:pt,loadTokens:Xe,setToken:Me,deleteToken:nt,credentialProviders:$,updateCredentialProviders:xt,provisionStatus:_e,provisionEnvironment:At,stopEnvironment:at,removeEnvironment:gt,codespaces:be,codespaceError:Be,codespaceListError:U,codespaceCreating:V,listCodespaces:Wt,createCodespace:ft,projectCreating:we,taskStartingId:ue,personas:ie,createPersona:Lt,updatePersona:Ut,deletePersona:us,taskSessions:Se,loadTaskSessions:qn}}const hf=S.createContext(void 0);function Hx({children:n}){const s=Vx();return h.jsx(hf.Provider,{value:s,children:n})}function Qt(){const n=S.useContext(hf);if(!n)throw new Error("useGrackle must be used within GrackleProvider");return n}const Gx=[{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}],Ix=[{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"}],Px=[{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
|
+
- src/middleware/auth.ts
|
|
27
|
+
- src/routes/login.ts
|
|
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:
|
|
29
|
+
\`\`\`typescript
|
|
30
|
+
import jwt from "jsonwebtoken";
|
|
31
|
+
import type { Request, Response, NextFunction } from "express";
|
|
32
|
+
|
|
33
|
+
const JWT_SECRET = process.env.JWT_SECRET || "change-me";
|
|
34
|
+
|
|
35
|
+
export function verifyToken(req: Request, res: Response, next: NextFunction): void {
|
|
36
|
+
const header = req.headers.authorization;
|
|
37
|
+
if (!header?.startsWith("Bearer ")) {
|
|
38
|
+
res.status(401).json({ error: "Missing token" });
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
try {
|
|
42
|
+
const decoded = jwt.verify(header.slice(7), JWT_SECRET);
|
|
43
|
+
req.user = decoded;
|
|
44
|
+
next();
|
|
45
|
+
} catch {
|
|
46
|
+
res.status(403).json({ error: "Invalid token" });
|
|
47
|
+
}
|
|
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"}],qx=[{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",worktreeBasePath:"",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",worktreeBasePath:"",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",worktreeBasePath:"",createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],Yx=[{id:"task-001",projectId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"working",branch:"feat/jwt-auth",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0},{id:"task-001a",projectId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"complete",branch:"feat/jwt-auth/design-token-schema",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-001b",projectId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"working",branch:"feat/jwt-auth/implement-auth-middleware",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{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:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-002",projectId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-003",projectId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"paused",branch:"feat/openapi-docs",latestSessionId:"sess-002",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-004",projectId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"complete",branch:"feat/db-pool",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{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:"not_started",branch:"fix/user-list-n1",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{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:"working",branch:"feat/parquet-export",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0},{id:"task-006a",projectId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"complete",branch:"feat/parquet-export/define-parquet-schema-mapping",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006b",projectId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"complete",branch:"feat/parquet-export/implement-row-group-writer",latestSessionId:"",dependsOn:["task-006a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006c",projectId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"working",branch:"feat/parquet-export/add-compression-options",latestSessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{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:"not_started",branch:"",latestSessionId:"",dependsOn:["task-006c"],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-007",projectId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"working",branch:"feat/incremental",latestSessionId:"sess-004",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0},{id:"task-007a",projectId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"complete",branch:"feat/incremental/design-watermark-storage",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1},{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",latestSessionId:"",dependsOn:["task-007a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-008",projectId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"paused",branch:"feat/monitoring",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1}],Wg=[{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"}],Kx=[{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:""}],Zx=[{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"}],Xx={"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 Bt(n){return new Date(Date.now()+n).toISOString()}const ev=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Bt(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:Bt(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:Bt(1600),content:`Found 5 endpoints that need refactoring:
|
|
50
|
+
- GET /api/users
|
|
51
|
+
- POST /api/users
|
|
52
|
+
- GET /api/users/:id
|
|
53
|
+
- PUT /api/users/:id
|
|
54
|
+
- DELETE /api/users/:id`}},{delayMs:2800,event:{eventType:"output",timestamp:Bt(2800),content:"Refactoring to use Express Router with middleware chain...\n```typescript\nconst router = Router();\nrouter.use(authenticate);\nrouter.use(validateBody);\n```"}},{delayMs:4e3,event:{eventType:"output",timestamp:Bt(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:Bt(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:Bt(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:Bt(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:Bt(1400),content:`Found tables to modify:
|
|
55
|
+
- users (add column: last_login_at)
|
|
56
|
+
- sessions (add index on expires_at)
|
|
57
|
+
- audit_log (new table)`}},{delayMs:2200,event:{eventType:"output",timestamp:Bt(2200),content:`⚠ This migration will add a NOT NULL column to the users table.
|
|
58
|
+
The table has 50,000+ rows — this may lock the table briefly.
|
|
59
|
+
|
|
60
|
+
Please confirm to proceed.`}}],resumeSteps:[{delayMs:500,event:{eventType:"output",timestamp:Bt(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:Bt(1e3),content:`Migration 001_add_last_login.sql applied successfully.
|
|
61
|
+
Migration 002_sessions_index.sql applied successfully.
|
|
62
|
+
Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventType:"output",timestamp:Bt(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:Bt(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Bt(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:Bt(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:Bt(1800),content:`Writing test cases:
|
|
63
|
+
- should calculate monthly total
|
|
64
|
+
- should apply discount codes
|
|
65
|
+
- should handle currency conversion
|
|
66
|
+
- should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:Bt(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:Bt(3500),content:"failed"}}]}],tv=400;function $x({children:n}){const[s,l]=S.useState(Ix),[o,c]=S.useState(Px),[d,f]=S.useState(void 0),[m,p]=S.useState(qx),[v,y]=S.useState(Yx),[b,_]=S.useState(Wg),[T,N]=S.useState(Kx),[D,w]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[C,H]=S.useState(Zx),[O]=S.useState(Xx),F=S.useRef(0),G=S.useRef(0),W=S.useRef(new Set),ee=S.useRef(new Map),$=S.useRef(v);$.current=v;const ae=S.useRef(new Map),_e=S.useRef(new Map),L=S.useCallback(X=>(F.current+=1,`mock-${X}-${String(F.current).padStart(3,"0")}`),[]),be=S.useCallback(()=>{const X=ev[G.current%ev.length];return G.current+=1,X},[]),te=S.useCallback((X,se,re)=>{const de=setTimeout(()=>{var Ee;W.current.delete(de),re&&((Ee=ee.current.get(re))==null||Ee.delete(de)),X()},se);W.current.add(de),re&&(ee.current.has(re)||ee.current.set(re,new Set),ee.current.get(re).add(de))},[]),Be=S.useCallback(X=>{const se=ee.current.get(X);se&&(se.forEach(re=>{clearTimeout(re),W.current.delete(re)}),ee.current.delete(X))},[]),P=S.useCallback((X,se)=>{l(re=>re.map(de=>de.id===X?{...de,status:se}:de))},[]),U=S.useCallback(X=>{c(se=>[...se,X])},[]),K=S.useCallback((X,se,re)=>{se.forEach((de,Ee)=>{te(()=>{const je={sessionId:X,...de.event,timestamp:new Date().toISOString()};U(je),de.event.eventType==="status"&&P(X,de.event.content),Ee===se.length-1&&re&&re()},de.delayMs,X)})},[te,U,P]),V=S.useCallback((X,se,re,de)=>{console.log("[MockGrackle] spawn",{environmentId:X,prompt:se,runtime:de});const Ee=L("sess"),je={id:Ee,environmentId:X,runtime:de||"claude-code",status:"running",prompt:se,startedAt:new Date().toISOString()};l(Me=>[...Me,je]),f(Ee);const Xe=be();if(console.log(`[MockGrackle] Playing scenario: ${Xe.label}`),Xe.pauseForInput){const Me=Xe.pauseAfterStep??Xe.steps.length-1,nt=Xe.steps.slice(0,Me+1),xt=nt.length>0?nt[nt.length-1].delayMs:0;K(Ee,nt),te(()=>{P(Ee,"idle"),U({sessionId:Ee,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},xt+tv,Ee),Xe.resumeSteps&&ae.current.set(Ee,Xe.resumeSteps)}else K(Ee,Xe.steps)},[L,be,K,te,P,U]),pe=S.useCallback(X=>{console.log("[MockGrackle] kill",X),Be(X),ae.current.delete(X),P(X,"interrupted"),U({sessionId:X,eventType:"status",timestamp:new Date().toISOString(),content:"interrupted"}),y(se=>se.map(re=>re.latestSessionId===X&&re.status==="working"?{...re,status:"not_started"}:re))},[Be,P,U]),ie=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),Ae=S.useCallback(X=>{console.log("[MockGrackle] loadSessionEvents",X)},[]),Se=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),c([])},[]),me=S.useCallback((X,se,re,de)=>{console.log("[MockGrackle] createProject",{name:X,description:se});const Ee={id:L("proj"),name:X,description:se||"",repoUrl:re||"",defaultEnvironmentId:de||"",status:"active",worktreeBasePath:"",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};p(je=>[...je,Ee])},[L]),we=S.useCallback(X=>{console.log("[MockGrackle] archiveProject",X),p(se=>se.map(re=>re.id===X?{...re,status:"archived"}:re))},[]),Q=S.useCallback(X=>{console.log("[MockGrackle] loadTasks",X)},[]),ue=S.useCallback((X,se,re,de,Ee)=>{console.log("[MockGrackle] createTask",{projectId:X,title:se,parentTaskId:Ee}),y(je=>{const Me=je.filter(At=>At.projectId===X).reduce((At,at)=>Math.max(At,at.sortOrder),0),nt=Ee?je.find(At=>At.id===Ee):void 0;if(Ee&&!nt)return console.warn("[MockGrackle] Parent task not found:",Ee),je;if(nt&&!nt.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",Ee),je;const xt=nt?nt.depth+1:0,pt={id:L("task"),projectId:X,title:se,description:re||"",status:"not_started",branch:"",latestSessionId:"",dependsOn:de||[],reviewNotes:void 0,sortOrder:Me+1,createdAt:new Date().toISOString(),parentTaskId:Ee||"",depth:xt,childTaskIds:[],canDecompose:!Ee};return[...je,pt]})},[L]),Pe=S.useCallback((X,se,re)=>{var nt;console.log("[MockGrackle] startTask",{taskId:X,runtime:se});const de=$.current.find(xt=>xt.id===X),Ee=(de==null?void 0:de.title)??"",je=L("sess"),Xe={id:je,environmentId:"env-local-01",runtime:se||"claude-code",status:"running",prompt:Ee||X,startedAt:new Date().toISOString()};l(xt=>[...xt,Xe]),y(xt=>xt.map(pt=>pt.id===X?{...pt,status:"working",latestSessionId:je,branch:`mock/${X.slice(0,8)}`}:pt));const Me=be();if(console.log(`[MockGrackle] Playing task scenario: ${Me.label}`),Me.pauseForInput){const xt=Me.pauseAfterStep??Me.steps.length-1,pt=Me.steps.slice(0,xt+1),At=pt.length>0?pt[pt.length-1].delayMs:0;if(K(je,pt),te(()=>{P(je,"idle"),U({sessionId:je,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},At+tv,je),Me.resumeSteps){const at=[...Me.resumeSteps];ae.current.set(je,at);const gt=at.reduce((Wt,ft)=>Math.max(Wt,ft.delayMs),0);_e.current.set(je,{taskId:X,delayAfterResume:gt+200})}}else{const xt=Me.steps.length>0?Me.steps[Me.steps.length-1].delayMs:0;K(je,Me.steps);const pt=(nt=Me.steps[Me.steps.length-1])==null?void 0:nt.event.content;te(()=>{pt==="completed"?y(At=>At.map(at=>at.id===X&&at.status==="working"?{...at,status:"paused"}:at)):pt==="failed"&&y(At=>At.map(at=>at.id===X&&at.status==="working"?{...at,status:"failed"}:at))},xt+100,je)}},[L,be,K,te,P,U]),J=S.useCallback((X,se)=>{console.log("[MockGrackle] sendInput",{sessionId:X,text:se}),U({sessionId:X,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${se}`}),P(X,"running"),U({sessionId:X,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const re=ae.current.get(X);if(re)ae.current.delete(X),K(X,re);else{const Ee=[{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"}}];K(X,Ee)}const de=_e.current.get(X);de&&(_e.current.delete(X),te(()=>{y(Ee=>Ee.map(je=>je.id===de.taskId&&je.status==="working"?{...je,status:"paused"}:je))},de.delayAfterResume,X))},[U,P,K,te]),sn=S.useCallback(X=>{console.log("[MockGrackle] completeTask",X),y(se=>se.map(re=>re.id===X?{...re,status:"complete"}:re))},[]),Qn=S.useCallback(X=>{console.log("[MockGrackle] resumeTask",X)},[]),ln=S.useCallback((X,se,re,de)=>{console.log("[MockGrackle] updateTask",{taskId:X,title:se}),y(Ee=>Ee.map(je=>je.id===X?{...je,title:se.trim()||je.title,description:re,dependsOn:de}:je))},[]),jn=S.useCallback(X=>{console.log("[MockGrackle] deleteTask",X),y(se=>se.filter(re=>re.id!==X))},[]),dt=S.useCallback(X=>{console.log("[MockGrackle] loadFindings",X),_(Wg.filter(se=>se.projectId===X))},[]),Jt=S.useCallback((X,se,re,de,Ee)=>{console.log("[MockGrackle] postFinding",{projectId:X,title:se});const je={id:L("find"),projectId:X,taskId:"",sessionId:"",category:de||"general",title:se,content:re,tags:Ee||[],createdAt:new Date().toISOString()};_(Xe=>[...Xe,je])},[L]),Hn=S.useCallback((X,se,re,de)=>{console.log("[MockGrackle] addEnvironment",{displayName:X,adapterType:se,adapterConfig:re,defaultRuntime:de})},[]),Gn=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),mn=S.useCallback((X,se,re,de,Ee)=>{console.log("[MockGrackle] setToken",{name:X,tokenType:re}),N(je=>[...je.filter(Me=>Me.name!==X),{name:X,tokenType:re,envVar:de,filePath:Ee,expiresAt:""}])},[]),In=S.useCallback(X=>{console.log("[MockGrackle] deleteToken",X),N(se=>se.filter(re=>re.name!==X))},[]),Yt=S.useCallback(X=>{console.log("[MockGrackle] updateCredentialProviders",X),w(X)},[]);S.useEffect(()=>()=>{W.current.forEach(clearTimeout),W.current.clear()},[]);const Pn=S.useMemo(()=>({connected:!0,environments:Gx,sessions:s,events:o,eventsDropped:0,lastSpawnedId:d,projects:m,tasks:v,findings:b,tokens:T,credentialProviders:D,spawn:V,sendInput:J,kill:pe,refresh:ie,loadSessionEvents:Ae,clearEvents:Se,createProject:me,archiveProject:we,updateProject:(X,se)=>{console.log("[MockGrackle] updateProject",{projectId:X,...se}),p(re=>re.map(de=>de.id!==X?de:{...de,...se.name!==void 0?{name:se.name}:{},...se.description!==void 0?{description:se.description}:{},...se.repoUrl!==void 0?{repoUrl:se.repoUrl}:{},...se.defaultEnvironmentId!==void 0?{defaultEnvironmentId:se.defaultEnvironmentId}:{},updatedAt:new Date().toISOString()}))},loadTasks:Q,createTask:ue,startTask:Pe,completeTask:sn,resumeTask:Qn,updateTask:ln,deleteTask:jn,loadFindings:dt,postFinding:Jt,addEnvironment:Hn,loadTokens:Gn,setToken:mn,deleteToken:In,updateCredentialProviders:Yt,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceListError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:C,createPersona:(X,se,re,de,Ee,je)=>{console.log("[MockGrackle] createPersona",{name:X});const Xe={id:`mock-persona-${Date.now()}`,name:X,description:se,systemPrompt:re,toolConfig:"{}",runtime:de??"claude-code",model:Ee||"",maxTurns:je||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};H(Me=>[...Me,Xe])},updatePersona:(X,se,re,de,Ee,je,Xe)=>{console.log("[MockGrackle] updatePersona",{personaId:X,name:se}),H(Me=>Me.map(nt=>nt.id!==X?nt:{...nt,...se!==void 0?{name:se}:{},...re!==void 0?{description:re}:{},...de!==void 0?{systemPrompt:de}:{},...Ee!==void 0?{runtime:Ee}:{},...je!==void 0?{model:je}:{},...Xe!==void 0?{maxTurns:Xe}:{},updatedAt:new Date().toISOString()}))},deletePersona:X=>{console.log("[MockGrackle] deletePersona",X),H(se=>se.filter(re=>re.id!==X))},taskSessions:O,loadTaskSessions:X=>{console.log("[MockGrackle] loadTaskSessions",X)}}),[s,o,d,m,v,b,T,D,C,O,V,J,pe,ie,Ae,Se,me,we,Q,ue,Pe,sn,Qn,ln,jn,dt,Jt,Hn,Gn,mn,In,Yt]);return h.jsx(hf.Provider,{value:Pn,children:n})}const Iy=S.createContext(void 0),Fx=4e3;function Qx({children:n}){const[s,l]=S.useState([]),o=S.useRef(0),c=S.useCallback(f=>{l(m=>m.filter(p=>p.id!==f))},[]),d=S.useCallback((f,m="info",p=Fx)=>{const v=`toast-${++o.current}`;l(y=>[...y,{id:v,message:f,variant:m,duration:p}])},[]);return h.jsx(Iy.Provider,{value:{toasts:s,showToast:d,dismissToast:c},children:n})}function no(){const n=S.useContext(Iy);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const $r=[{id:"grackle",label:"Grackle",description:"The default Grackle theme — iridescent purple on clean dark.",swatches:["#0e1218","#8b5cf6","#60a5fa","#e5e7eb","#34d399"],variantLightId:"grackle-light",variantDarkId:"grackle-dark"},{id:"grackle-light",label:"Grackle Light",description:"Light Grackle variant.",hidden:!0},{id:"grackle-dark",label:"Grackle Dark",description:"Dark Grackle variant.",hidden:!0},{id:"glass",label:"Glassmorphism",description:"Dark frosted-glass aesthetic with backdrop blur effects.",swatches:["#0a0c14","#4ecca3","#70a1ff","#e2e8f0","#a855f7"]},{id:"matrix",label:"Matrix",description:"Phosphor-green CRT terminal with scanlines and glow.",swatches:["#050505","#00ff41","#00bfff","#33ff77","#ffb000"]},{id:"brutalist",label:"Neubrutalism",description:"Thick borders, raw colors, bold type — ugly on purpose.",swatches:["#f5f0e8","#ff5757","#5ce1e6","#1a1a1a","#ffde59"],variantLightId:"brutalist-light",variantDarkId:"brutalist-dark"},{id:"brutalist-light",label:"Neubrutalism Light",description:"Light neubrutalism variant.",hidden:!0},{id:"brutalist-dark",label:"Neubrutalism Dark",description:"Dark neubrutalism variant.",hidden:!0},{id:"monokai",label:"Monokai",description:"Classic warm editor palette — pink, green, and purple.",swatches:["#272822","#f92672","#a6e22e","#f8f8f2","#ae81ff"],variantLightId:"monokai-light",variantDarkId:"monokai-dark"},{id:"monokai-dark",label:"Monokai Dark",description:"Dark Monokai variant.",hidden:!0},{id:"monokai-light",label:"Monokai Light",description:"Light Monokai variant.",hidden:!0},{id:"ubuntu",label:"Ubuntu",description:"Aubergine terminal with the GNOME Tango palette.",swatches:["#300a24","#8ae234","#ef2929","#eeeeec","#fce94f"]},{id:"sandstone",label:"Sandstone",description:"Warm terracotta accent on dark brown, in the style of Claude Code.",swatches:["#1a1815","#C15F3C","#6b8afd","#e8e6e3","#a78bfa"]},{id:"verdigris",label:"Verdigris",description:"Teal accent on charcoal, in the style of ChatGPT.",swatches:["#141414","#00a67e","#3b82f6","#ececec","#ab68ff"]},{id:"primer",label:"Primer",description:"Blue accent on ink-dark grey, in the style of GitHub.",swatches:["#0d1117","#58a6ff","#3fb950","#c9d1d9","#bc8cff"]}],Py=new Set($r.map(n=>n.id)),nv="grackle";function Hd(n){return $r.find(s=>s.id===n)}const Gd="grackle-theme",qy="grackle-prefer-system",Yy="(prefers-color-scheme: dark)";let zl=[],Mr;function bd(){Mr=void 0;for(const n of zl)n()}function Id(){return typeof window>"u"?!1:window.matchMedia(Yy).matches}function Pl(){if(typeof localStorage>"u")return nv;try{const n=localStorage.getItem(Gd);if(n!==null&&Py.has(n))return n}catch{}return nv}function Hr(){if(typeof localStorage>"u")return!1;try{return localStorage.getItem(qy)==="true"}catch{return!1}}function Pd(n){return $r.find(s=>s.variantLightId===n||s.variantDarkId===n)}function Ky(n,s){const l=Hd(n);if(l!=null&&l.variantDarkId)return s&&l.variantLightId?Id()?l.variantDarkId:l.variantLightId:l.variantDarkId;if(l!=null&&l.hidden&&s){const o=Pd(n);if(o!=null&&o.variantLightId&&o.variantDarkId)return Id()?o.variantDarkId:o.variantLightId}return n}function Ci(n,s,l=!1){l&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=Ky(n,s),l&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&Ci(Pl(),Hr());function Jx(){return Mr===void 0&&(Mr={themeId:Pl(),systemDark:Id(),preferSystem:Hr()}),Mr}function Wx(n){return zl=[...zl,n],()=>{zl=zl.filter(s=>s!==n)}}function e_(){const n=S.useSyncExternalStore(Wx,Jx),{themeId:s,preferSystem:l}=n,o=Ky(s,l),c=S.useCallback(f=>{if(Py.has(f)){try{localStorage.setItem(Gd,f)}catch{}Ci(f,Hr(),!0),bd()}},[]),d=S.useCallback(f=>{try{localStorage.setItem(qy,f?"true":"false")}catch{}if(f){const m=Pl(),p=Hd(m);if(p!=null&&p.hidden){const v=Pd(m);if(v)try{localStorage.setItem(Gd,v.id)}catch{}}}Ci(Pl(),f,!0),bd()},[]);return S.useEffect(()=>{Ci(s,l)},[s,l]),S.useEffect(()=>{if(typeof window>"u")return;const f=window.matchMedia(Yy),m=()=>{const p=Pl(),v=Hr();if(v){const y=Hd(p);if(y!=null&&y.variantDarkId&&y.variantLightId&&Ci(p,v),y!=null&&y.hidden){const b=Pd(p);b!=null&&b.variantDarkId&&b.variantLightId&&Ci(p,v)}}bd()};return f.addEventListener("change",m),()=>{f.removeEventListener("change",m)}},[]),{themeId:s,setTheme:c,resolvedThemeId:o,preferSystem:l,setPreferSystem:d}}const Zy=S.createContext(void 0);function t_({children:n}){const s=e_();return h.jsx(Zy.Provider,{value:s,children:n})}function Xy(){const n=S.useContext(Zy);if(!n)throw new Error("useThemeContext must be used within ThemeProvider");return n}/**
|
|
68
|
+
* react-router v7.13.1
|
|
69
|
+
*
|
|
70
|
+
* Copyright (c) Remix Software Inc.
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the MIT license found in the
|
|
73
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
74
|
+
*
|
|
75
|
+
* @license MIT
|
|
76
|
+
*/var av="popstate";function sv(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function n_(n={}){function s(o,c){var v;let d=(v=c.state)==null?void 0:v.masked,{pathname:f,search:m,hash:p}=d||o.location;return qd("",{pathname:f,search:m,hash:p},c.state&&c.state.usr||null,c.state&&c.state.key||"default",d?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function l(o,c){return typeof c=="string"?c:Xl(c)}return s_(s,l,null,n)}function lt(n,s){if(n===!1||n===null||typeof n>"u")throw new Error(s)}function zn(n,s){if(!n){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function a_(){return Math.random().toString(36).substring(2,10)}function iv(n,s){return{usr:n.state,key:n.key,idx:s,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function qd(n,s,l=null,o,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof s=="string"?Ui(s):s,state:l,key:s&&s.key||o||a_(),unstable_mask:c}}function Xl({pathname:n="/",search:s="",hash:l=""}){return s&&s!=="?"&&(n+=s.charAt(0)==="?"?s:"?"+s),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function Ui(n){let s={};if(n){let l=n.indexOf("#");l>=0&&(s.hash=n.substring(l),n=n.substring(0,l));let o=n.indexOf("?");o>=0&&(s.search=n.substring(o),n=n.substring(0,o)),n&&(s.pathname=n)}return s}function s_(n,s,l,o={}){let{window:c=document.defaultView,v5Compat:d=!1}=o,f=c.history,m="POP",p=null,v=y();v==null&&(v=0,f.replaceState({...f.state,idx:v},""));function y(){return(f.state||{idx:null}).idx}function b(){m="POP";let w=y(),C=w==null?null:w-v;v=w,p&&p({action:m,location:D.location,delta:C})}function _(w,C){m="PUSH";let H=sv(w)?w:qd(D.location,w,C);v=y()+1;let O=iv(H,v),F=D.createHref(H.unstable_mask||H);try{f.pushState(O,"",F)}catch(G){if(G instanceof DOMException&&G.name==="DataCloneError")throw G;c.location.assign(F)}d&&p&&p({action:m,location:D.location,delta:1})}function T(w,C){m="REPLACE";let H=sv(w)?w:qd(D.location,w,C);v=y();let O=iv(H,v),F=D.createHref(H.unstable_mask||H);f.replaceState(O,"",F),d&&p&&p({action:m,location:D.location,delta:0})}function N(w){return i_(w)}let D={get action(){return m},get location(){return n(c,f)},listen(w){if(p)throw new Error("A history only accepts one active listener");return c.addEventListener(av,b),p=w,()=>{c.removeEventListener(av,b),p=null}},createHref(w){return s(c,w)},createURL:N,encodeLocation(w){let C=N(w);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:_,replace:T,go(w){return f.go(w)}};return D}function i_(n,s=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),lt(l,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:Xl(n);return o=o.replace(/ $/,"%20"),!s&&o.startsWith("//")&&(o=l+o),new URL(o,l)}function $y(n,s,l="/"){return l_(n,s,l,!1)}function l_(n,s,l,o){let c=typeof s=="string"?Ui(s):s,d=Da(c.pathname||"/",l);if(d==null)return null;let f=Fy(n);o_(f);let m=null;for(let p=0;m==null&&p<f.length;++p){let v=Jy(d);m=g_(f[p],v,o)}return m}function Fy(n,s=[],l=[],o="",c=!1){let d=(f,m,p=c,v)=>{let y={relativePath:v===void 0?f.path||"":v,caseSensitive:f.caseSensitive===!0,childrenIndex:m,route:f};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&p)return;lt(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let b=sa([o,y.relativePath]),_=l.concat(y);f.children&&f.children.length>0&&(lt(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),Fy(f.children,s,_,b,p)),!(f.path==null&&!f.index)&&s.push({path:b,score:m_(b,f.index),routesMeta:_})};return n.forEach((f,m)=>{var p;if(f.path===""||!((p=f.path)!=null&&p.includes("?")))d(f,m);else for(let v of Qy(f.path))d(f,m,!0,v)}),s}function Qy(n){let s=n.split("/");if(s.length===0)return[];let[l,...o]=s,c=l.endsWith("?"),d=l.replace(/\?$/,"");if(o.length===0)return c?[d,""]:[d];let f=Qy(o.join("/")),m=[];return m.push(...f.map(p=>p===""?d:[d,p].join("/"))),c&&m.push(...f),m.map(p=>n.startsWith("/")&&p===""?"/":p)}function o_(n){n.sort((s,l)=>s.score!==l.score?l.score-s.score:p_(s.routesMeta.map(o=>o.childrenIndex),l.routesMeta.map(o=>o.childrenIndex)))}var r_=/^:[\w-]+$/,c_=3,u_=2,d_=1,f_=10,h_=-2,lv=n=>n==="*";function m_(n,s){let l=n.split("/"),o=l.length;return l.some(lv)&&(o+=h_),s&&(o+=u_),l.filter(c=>!lv(c)).reduce((c,d)=>c+(r_.test(d)?c_:d===""?d_:f_),o)}function p_(n,s){return n.length===s.length&&n.slice(0,-1).every((o,c)=>o===s[c])?n[n.length-1]-s[s.length-1]:0}function g_(n,s,l=!1){let{routesMeta:o}=n,c={},d="/",f=[];for(let m=0;m<o.length;++m){let p=o[m],v=m===o.length-1,y=d==="/"?s:s.slice(d.length)||"/",b=$l({path:p.relativePath,caseSensitive:p.caseSensitive,end:v},y),_=p.route;if(!b&&v&&l&&!o[o.length-1].route.index&&(b=$l({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!b)return null;Object.assign(c,b.params),f.push({params:c,pathname:sa([d,b.pathname]),pathnameBase:x_(sa([d,b.pathnameBase])),route:_}),b.pathnameBase!=="/"&&(d=sa([d,b.pathnameBase]))}return f}function $l(n,s){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,o]=v_(n.path,n.caseSensitive,n.end),c=s.match(l);if(!c)return null;let d=c[0],f=d.replace(/(.)\/+$/,"$1"),m=c.slice(1);return{params:o.reduce((v,{paramName:y,isOptional:b},_)=>{if(y==="*"){let N=m[_]||"";f=d.slice(0,d.length-N.length).replace(/(.)\/+$/,"$1")}const T=m[_];return b&&!T?v[y]=void 0:v[y]=(T||"").replace(/%2F/g,"/"),v},{}),pathname:d,pathnameBase:f,pattern:n}}function v_(n,s=!1,l=!0){zn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,m,p,v,y)=>{if(o.push({paramName:m,isOptional:p!=null}),p){let b=y.charAt(v+f.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,s?void 0:"i"),o]}function Jy(n){try{return n.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return zn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${s}).`),n}}function Da(n,s){if(s==="/")return n;if(!n.toLowerCase().startsWith(s.toLowerCase()))return null;let l=s.endsWith("/")?s.length-1:s.length,o=n.charAt(l);return o&&o!=="/"?null:n.slice(l)||"/"}var y_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function b_(n,s="/"){let{pathname:l,search:o="",hash:c=""}=typeof n=="string"?Ui(n):n,d;return l?(l=l.replace(/\/\/+/g,"/"),l.startsWith("/")?d=ov(l.substring(1),"/"):d=ov(l,s)):d=s,{pathname:d,search:__(o),hash:T_(c)}}function ov(n,s){let l=s.replace(/\/+$/,"").split("/");return n.split("/").forEach(c=>{c===".."?l.length>1&&l.pop():c!=="."&&l.push(c)}),l.length>1?l.join("/"):"/"}function Sd(n,s,l,o){return`Cannot include a '${n}' character in a manually specified \`to.${s}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function S_(n){return n.filter((s,l)=>l===0||s.route.path&&s.route.path.length>0)}function mf(n){let s=S_(n);return s.map((l,o)=>o===s.length-1?l.pathname:l.pathnameBase)}function Fr(n,s,l,o=!1){let c;typeof n=="string"?c=Ui(n):(c={...n},lt(!c.pathname||!c.pathname.includes("?"),Sd("?","pathname","search",c)),lt(!c.pathname||!c.pathname.includes("#"),Sd("#","pathname","hash",c)),lt(!c.search||!c.search.includes("#"),Sd("#","search","hash",c)));let d=n===""||c.pathname==="",f=d?"/":c.pathname,m;if(f==null)m=l;else{let b=s.length-1;if(!o&&f.startsWith("..")){let _=f.split("/");for(;_[0]==="..";)_.shift(),b-=1;c.pathname=_.join("/")}m=b>=0?s[b]:"/"}let p=b_(c,m),v=f&&f!=="/"&&f.endsWith("/"),y=(d||f===".")&&l.endsWith("/");return!p.pathname.endsWith("/")&&(v||y)&&(p.pathname+="/"),p}var sa=n=>n.join("/").replace(/\/\/+/g,"/"),x_=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),__=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,T_=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,E_=class{constructor(n,s,l,o=!1){this.status=n,this.statusText=s||"",this.internal=o,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function j_(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function C_(n){return n.map(s=>s.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Wy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function e0(n,s){let l=n;if(typeof l!="string"||!y_.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let o=l,c=!1;if(Wy)try{let d=new URL(window.location.href),f=l.startsWith("//")?new URL(d.protocol+l):new URL(l),m=Da(f.pathname,s);f.origin===d.origin&&m!=null?l=m+f.search+f.hash:c=!0}catch{zn(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:c,to:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var t0=["POST","PUT","PATCH","DELETE"];new Set(t0);var A_=["GET",...t0];new Set(A_);var zi=S.createContext(null);zi.displayName="DataRouter";var Qr=S.createContext(null);Qr.displayName="DataRouterState";var N_=S.createContext(!1),n0=S.createContext({isTransitioning:!1});n0.displayName="ViewTransition";var w_=S.createContext(new Map);w_.displayName="Fetchers";var D_=S.createContext(null);D_.displayName="Await";var En=S.createContext(null);En.displayName="Navigation";var ao=S.createContext(null);ao.displayName="Location";var Vn=S.createContext({outlet:null,matches:[],isDataRoute:!1});Vn.displayName="Route";var pf=S.createContext(null);pf.displayName="RouteError";var a0="REACT_ROUTER_ERROR",k_="REDIRECT",R_="ROUTE_ERROR_RESPONSE";function M_(n){if(n.startsWith(`${a0}:${k_}:{`))try{let s=JSON.parse(n.slice(28));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.location=="string"&&typeof s.reloadDocument=="boolean"&&typeof s.replace=="boolean")return s}catch{}}function O_(n){if(n.startsWith(`${a0}:${R_}:{`))try{let s=JSON.parse(n.slice(40));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string")return new E_(s.status,s.statusText,s.data)}catch{}}function B_(n,{relative:s}={}){lt(Us(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:o}=S.useContext(En),{hash:c,pathname:d,search:f}=so(n,{relative:s}),m=d;return l!=="/"&&(m=d==="/"?l:sa([l,d])),o.createHref({pathname:m,search:f,hash:c})}function Us(){return S.useContext(ao)!=null}function an(){return lt(Us(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(ao).location}function tn(n){lt(Us(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:s}=an();return S.useMemo(()=>$l(n,Jy(s)),[s,n])}var s0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function i0(n){S.useContext(En).static||S.useLayoutEffect(n)}function Jr(){let{isDataRoute:n}=S.useContext(Vn);return n?F_():L_()}function L_(){lt(Us(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(zi),{basename:s,navigator:l}=S.useContext(En),{matches:o}=S.useContext(Vn),{pathname:c}=an(),d=JSON.stringify(mf(o)),f=S.useRef(!1);return i0(()=>{f.current=!0}),S.useCallback((p,v={})=>{if(zn(f.current,s0),!f.current)return;if(typeof p=="number"){l.go(p);return}let y=Fr(p,JSON.parse(d),c,v.relative==="path");n==null&&s!=="/"&&(y.pathname=y.pathname==="/"?s:sa([s,y.pathname])),(v.replace?l.replace:l.push)(y,v.state,v)},[s,l,d,c,n])}var U_=S.createContext(null);function z_(n){let s=S.useContext(Vn).outlet;return S.useMemo(()=>s&&S.createElement(U_.Provider,{value:n},s),[s,n])}function Wr(){let{matches:n}=S.useContext(Vn),s=n[n.length-1];return s?s.params:{}}function so(n,{relative:s}={}){let{matches:l}=S.useContext(Vn),{pathname:o}=an(),c=JSON.stringify(mf(l));return S.useMemo(()=>Fr(n,JSON.parse(c),o,s==="path"),[n,c,o,s])}function V_(n,s){return l0(n,s)}function l0(n,s,l){var w;lt(Us(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(En),{matches:c}=S.useContext(Vn),d=c[c.length-1],f=d?d.params:{},m=d?d.pathname:"/",p=d?d.pathnameBase:"/",v=d&&d.route;{let C=v&&v.path||"";r0(m,!v||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
77
|
+
|
|
78
|
+
Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let y=an(),b;if(s){let C=typeof s=="string"?Ui(s):s;lt(p==="/"||((w=C.pathname)==null?void 0:w.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${C.pathname}" was given in the \`location\` prop.`),b=C}else b=y;let _=b.pathname||"/",T=_;if(p!=="/"){let C=p.replace(/^\//,"").split("/");T="/"+_.replace(/^\//,"").split("/").slice(C.length).join("/")}let N=$y(n,{pathname:T});zn(v||N!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),zn(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let D=q_(N&&N.map(C=>Object.assign({},C,{params:Object.assign({},f,C.params),pathname:sa([p,o.encodeLocation?o.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?p:sa([p,o.encodeLocation?o.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),c,l);return s&&D?S.createElement(ao.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},D):D}function H_(){let n=$_(),s=j_(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),l=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:o},d={padding:"2px 4px",backgroundColor:o},f=null;return console.error("Error handled by React Router default ErrorBoundary:",n),f=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:d},"ErrorBoundary")," or"," ",S.createElement("code",{style:d},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},s),l?S.createElement("pre",{style:c},l):null,f)}var G_=S.createElement(H_,null),o0=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,s){return s.location!==n.location||s.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:s.error,location:s.location,revalidation:n.revalidation||s.revalidation}}componentDidCatch(n,s){this.props.onError?this.props.onError(n,s):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const l=O_(n.digest);l&&(n=l)}let s=n!==void 0?S.createElement(Vn.Provider,{value:this.props.routeContext},S.createElement(pf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(I_,{error:n},s):s}};o0.contextType=N_;var xd=new WeakMap;function I_({children:n,error:s}){let{basename:l}=S.useContext(En);if(typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){let o=M_(s.digest);if(o){let c=xd.get(s);if(c)throw c;let d=e0(o.location,l);if(Wy&&!xd.get(s))if(d.isExternal||o.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:o.replace}));throw xd.set(s,f),f}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function P_({routeContext:n,match:s,children:l}){let o=S.useContext(zi);return o&&o.static&&o.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=s.route.id),S.createElement(Vn.Provider,{value:n},l)}function q_(n,s=[],l){let o=l==null?void 0:l.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(s.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let c=n,d=o==null?void 0:o.errors;if(d!=null){let y=c.findIndex(b=>b.route.id&&(d==null?void 0:d[b.route.id])!==void 0);lt(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,y+1))}let f=!1,m=-1;if(l&&o){f=o.renderFallback;for(let y=0;y<c.length;y++){let b=c[y];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(m=y),b.route.id){let{loaderData:_,errors:T}=o,N=b.route.loader&&!_.hasOwnProperty(b.route.id)&&(!T||T[b.route.id]===void 0);if(b.route.lazy||N){l.isStatic&&(f=!0),m>=0?c=c.slice(0,m+1):c=[c[0]];break}}}}let p=l==null?void 0:l.onError,v=o&&p?(y,b)=>{var _,T;p(y,{location:o.location,params:((T=(_=o.matches)==null?void 0:_[0])==null?void 0:T.params)??{},unstable_pattern:C_(o.matches),errorInfo:b})}:void 0;return c.reduceRight((y,b,_)=>{let T,N=!1,D=null,w=null;o&&(T=d&&b.route.id?d[b.route.id]:void 0,D=b.route.errorElement||G_,f&&(m<0&&_===0?(r0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,w=null):m===_&&(N=!0,w=b.route.hydrateFallbackElement||null)));let C=s.concat(c.slice(0,_+1)),H=()=>{let O;return T?O=D:N?O=w:b.route.Component?O=S.createElement(b.route.Component,null):b.route.element?O=b.route.element:O=y,S.createElement(P_,{match:b,routeContext:{outlet:y,matches:C,isDataRoute:o!=null},children:O})};return o&&(b.route.ErrorBoundary||b.route.errorElement||_===0)?S.createElement(o0,{location:o.location,revalidation:o.revalidation,component:D,error:T,children:H(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:v}):H()},null)}function gf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Y_(n){let s=S.useContext(zi);return lt(s,gf(n)),s}function K_(n){let s=S.useContext(Qr);return lt(s,gf(n)),s}function Z_(n){let s=S.useContext(Vn);return lt(s,gf(n)),s}function vf(n){let s=Z_(n),l=s.matches[s.matches.length-1];return lt(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function X_(){return vf("useRouteId")}function $_(){var o;let n=S.useContext(pf),s=K_("useRouteError"),l=vf("useRouteError");return n!==void 0?n:(o=s.errors)==null?void 0:o[l]}function F_(){let{router:n}=Y_("useNavigate"),s=vf("useNavigate"),l=S.useRef(!1);return i0(()=>{l.current=!0}),S.useCallback(async(c,d={})=>{zn(l.current,s0),l.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:s,...d}))},[n,s])}var rv={};function r0(n,s,l){!s&&!rv[n]&&(rv[n]=!0,zn(!1,l))}S.memo(Q_);function Q_({routes:n,future:s,state:l,isStatic:o,onError:c}){return l0(n,void 0,{state:l,isStatic:o,onError:c})}function Or({to:n,replace:s,state:l,relative:o}){lt(Us(),"<Navigate> may be used only in the context of a <Router> component.");let{static:c}=S.useContext(En);zn(!c,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:d}=S.useContext(Vn),{pathname:f}=an(),m=Jr(),p=Fr(n,mf(d),f,o==="path"),v=JSON.stringify(p);return S.useEffect(()=>{m(JSON.parse(v),{replace:s,state:l,relative:o})},[m,v,o,s,l]),null}function c0(n){return z_(n.context)}function jt(n){lt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function J_({basename:n="/",children:s=null,location:l,navigationType:o="POP",navigator:c,static:d=!1,unstable_useTransitions:f}){lt(!Us(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),p=S.useMemo(()=>({basename:m,navigator:c,static:d,unstable_useTransitions:f,future:{}}),[m,c,d,f]);typeof l=="string"&&(l=Ui(l));let{pathname:v="/",search:y="",hash:b="",state:_=null,key:T="default",unstable_mask:N}=l,D=S.useMemo(()=>{let w=Da(v,m);return w==null?null:{location:{pathname:w,search:y,hash:b,state:_,key:T,unstable_mask:N},navigationType:o}},[m,v,y,b,_,T,o,N]);return zn(D!=null,`<Router basename="${m}"> is not able to match the URL "${v}${y}${b}" because it does not start with the basename, so the <Router> won't render anything.`),D==null?null:S.createElement(En.Provider,{value:p},S.createElement(ao.Provider,{children:s,value:D}))}function W_({children:n,location:s}){return V_(Yd(n),s)}function Yd(n,s=[]){let l=[];return S.Children.forEach(n,(o,c)=>{if(!S.isValidElement(o))return;let d=[...s,c];if(o.type===S.Fragment){l.push.apply(l,Yd(o.props.children,d));return}lt(o.type===jt,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),lt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let f={id:o.props.id||d.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(f.children=Yd(o.props.children,d)),l.push(f)}),l}var Br="get",Lr="application/x-www-form-urlencoded";function ec(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function eT(n){return ec(n)&&n.tagName.toLowerCase()==="button"}function tT(n){return ec(n)&&n.tagName.toLowerCase()==="form"}function nT(n){return ec(n)&&n.tagName.toLowerCase()==="input"}function aT(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function sT(n,s){return n.button===0&&(!s||s==="_self")&&!aT(n)}function Kd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((s,l)=>{let o=n[l];return s.concat(Array.isArray(o)?o.map(c=>[l,c]):[[l,o]])},[]))}function iT(n,s){let l=Kd(n);return s&&s.forEach((o,c)=>{l.has(c)||s.getAll(c).forEach(d=>{l.append(c,d)})}),l}var Cr=null;function lT(){if(Cr===null)try{new FormData(document.createElement("form"),0),Cr=!1}catch{Cr=!0}return Cr}var oT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function _d(n){return n!=null&&!oT.has(n)?(zn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Lr}"`),null):n}function rT(n,s){let l,o,c,d,f;if(tT(n)){let m=n.getAttribute("action");o=m?Da(m,s):null,l=n.getAttribute("method")||Br,c=_d(n.getAttribute("enctype"))||Lr,d=new FormData(n)}else if(eT(n)||nT(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||m.getAttribute("action");if(o=p?Da(p,s):null,l=n.getAttribute("formmethod")||m.getAttribute("method")||Br,c=_d(n.getAttribute("formenctype"))||_d(m.getAttribute("enctype"))||Lr,d=new FormData(m,n),!lT()){let{name:v,type:y,value:b}=n;if(y==="image"){let _=v?`${v}.`:"";d.append(`${_}x`,"0"),d.append(`${_}y`,"0")}else v&&d.append(v,b)}}else{if(ec(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=Br,o=null,c=Lr,f=n}return d&&c==="text/plain"&&(f=d,d=void 0),{action:o,method:l.toLowerCase(),encType:c,formData:d,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function yf(n,s){if(n===!1||n===null||typeof n>"u")throw new Error(s)}function cT(n,s,l,o){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return l?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${o}`:c.pathname=`${c.pathname}.${o}`:c.pathname==="/"?c.pathname=`_root.${o}`:s&&Da(c.pathname,s)==="/"?c.pathname=`${s.replace(/\/$/,"")}/_root.${o}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${o}`,c}async function uT(n,s){if(n.id in s)return s[n.id];try{let l=await import(n.module);return s[n.id]=l,l}catch(l){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function dT(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function fT(n,s,l){let o=await Promise.all(n.map(async c=>{let d=s.routes[c.route.id];if(d){let f=await uT(d,l);return f.links?f.links():[]}return[]}));return gT(o.flat(1).filter(dT).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function cv(n,s,l,o,c,d){let f=(p,v)=>l[v]?p.route.id!==l[v].route.id:!0,m=(p,v)=>{var y;return l[v].pathname!==p.pathname||((y=l[v].route.path)==null?void 0:y.endsWith("*"))&&l[v].params["*"]!==p.params["*"]};return d==="assets"?s.filter((p,v)=>f(p,v)||m(p,v)):d==="data"?s.filter((p,v)=>{var b;let y=o.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(f(p,v)||m(p,v))return!0;if(p.route.shouldRevalidate){let _=p.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:((b=l[0])==null?void 0:b.params)||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function hT(n,s,{includeHydrateFallback:l}={}){return mT(n.map(o=>{let c=s.routes[o.route.id];if(!c)return[];let d=[c.module];return c.clientActionModule&&(d=d.concat(c.clientActionModule)),c.clientLoaderModule&&(d=d.concat(c.clientLoaderModule)),l&&c.hydrateFallbackModule&&(d=d.concat(c.hydrateFallbackModule)),c.imports&&(d=d.concat(c.imports)),d}).flat(1))}function mT(n){return[...new Set(n)]}function pT(n){let s={},l=Object.keys(n).sort();for(let o of l)s[o]=n[o];return s}function gT(n,s){let l=new Set;return new Set(s),n.reduce((o,c)=>{let d=JSON.stringify(pT(c));return l.has(d)||(l.add(d),o.push({key:d,link:c})),o},[])}function u0(){let n=S.useContext(zi);return yf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function vT(){let n=S.useContext(Qr);return yf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var bf=S.createContext(void 0);bf.displayName="FrameworkContext";function d0(){let n=S.useContext(bf);return yf(n,"You must render this element inside a <HydratedRouter> element"),n}function yT(n,s){let l=S.useContext(bf),[o,c]=S.useState(!1),[d,f]=S.useState(!1),{onFocus:m,onBlur:p,onMouseEnter:v,onMouseLeave:y,onTouchStart:b}=s,_=S.useRef(null);S.useEffect(()=>{if(n==="render"&&f(!0),n==="viewport"){let D=C=>{C.forEach(H=>{f(H.isIntersecting)})},w=new IntersectionObserver(D,{threshold:.5});return _.current&&w.observe(_.current),()=>{w.disconnect()}}},[n]),S.useEffect(()=>{if(o){let D=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(D)}}},[o]);let T=()=>{c(!0)},N=()=>{c(!1),f(!1)};return l?n!=="intent"?[d,_,{}]:[d,_,{onFocus:Bl(m,T),onBlur:Bl(p,N),onMouseEnter:Bl(v,T),onMouseLeave:Bl(y,N),onTouchStart:Bl(b,T)}]:[!1,_,{}]}function Bl(n,s){return l=>{n&&n(l),l.defaultPrevented||s(l)}}function bT({page:n,...s}){let{router:l}=u0(),o=S.useMemo(()=>$y(l.routes,n,l.basename),[l.routes,n,l.basename]);return o?S.createElement(xT,{page:n,matches:o,...s}):null}function ST(n){let{manifest:s,routeModules:l}=d0(),[o,c]=S.useState([]);return S.useEffect(()=>{let d=!1;return fT(n,s,l).then(f=>{d||c(f)}),()=>{d=!0}},[n,s,l]),o}function xT({page:n,matches:s,...l}){let o=an(),{future:c,manifest:d,routeModules:f}=d0(),{basename:m}=u0(),{loaderData:p,matches:v}=vT(),y=S.useMemo(()=>cv(n,s,v,d,o,"data"),[n,s,v,d,o]),b=S.useMemo(()=>cv(n,s,v,d,o,"assets"),[n,s,v,d,o]),_=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let D=new Set,w=!1;if(s.forEach(H=>{var F;let O=d.routes[H.route.id];!O||!O.hasLoader||(!y.some(G=>G.route.id===H.route.id)&&H.route.id in p&&((F=f[H.route.id])!=null&&F.shouldRevalidate)||O.hasClientLoader?w=!0:D.add(H.route.id))}),D.size===0)return[];let C=cT(n,m,c.unstable_trailingSlashAwareDataRequests,"data");return w&&D.size>0&&C.searchParams.set("_routes",s.filter(H=>D.has(H.route.id)).map(H=>H.route.id).join(",")),[C.pathname+C.search]},[m,c.unstable_trailingSlashAwareDataRequests,p,o,d,y,s,n,f]),T=S.useMemo(()=>hT(b,d),[b,d]),N=ST(b);return S.createElement(S.Fragment,null,_.map(D=>S.createElement("link",{key:D,rel:"prefetch",as:"fetch",href:D,...l})),T.map(D=>S.createElement("link",{key:D,rel:"modulepreload",href:D,...l})),N.map(({key:D,link:w})=>S.createElement("link",{key:D,nonce:l.nonce,...w,crossOrigin:w.crossOrigin??l.crossOrigin})))}function _T(...n){return s=>{n.forEach(l=>{typeof l=="function"?l(s):l!=null&&(l.current=s)})}}var TT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{TT&&(window.__reactRouterVersion="7.13.1")}catch{}function ET({basename:n,children:s,unstable_useTransitions:l,window:o}){let c=S.useRef();c.current==null&&(c.current=n_({window:o,v5Compat:!0}));let d=c.current,[f,m]=S.useState({action:d.action,location:d.location}),p=S.useCallback(v=>{l===!1?m(v):S.startTransition(()=>m(v))},[l]);return S.useLayoutEffect(()=>d.listen(p),[d,p]),S.createElement(J_,{basename:n,children:s,location:f.location,navigationType:f.action,navigator:d,unstable_useTransitions:l})}var f0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sf=S.forwardRef(function({onClick:s,discover:l="render",prefetch:o="none",relative:c,reloadDocument:d,replace:f,unstable_mask:m,state:p,target:v,to:y,preventScrollReset:b,viewTransition:_,unstable_defaultShouldRevalidate:T,...N},D){let{basename:w,navigator:C,unstable_useTransitions:H}=S.useContext(En),O=typeof y=="string"&&f0.test(y),F=e0(y,w);y=F.to;let G=B_(y,{relative:c}),W=an(),ee=null;if(m){let P=Fr(m,[],W.unstable_mask?W.unstable_mask.pathname:"/",!0);w!=="/"&&(P.pathname=P.pathname==="/"?w:sa([w,P.pathname])),ee=C.createHref(P)}let[$,ae,_e]=yT(o,N),L=NT(y,{replace:f,unstable_mask:m,state:p,target:v,preventScrollReset:b,relative:c,viewTransition:_,unstable_defaultShouldRevalidate:T,unstable_useTransitions:H});function be(P){s&&s(P),P.defaultPrevented||L(P)}let te=!(F.isExternal||d),Be=S.createElement("a",{...N,..._e,href:(te?ee:void 0)||F.absoluteURL||G,onClick:te?be:s,ref:_T(D,ae),target:v,"data-discover":!O&&l==="render"?"true":void 0});return $&&!O?S.createElement(S.Fragment,null,Be,S.createElement(bT,{page:G})):Be});Sf.displayName="Link";var jT=S.forwardRef(function({"aria-current":s="page",caseSensitive:l=!1,className:o="",end:c=!1,style:d,to:f,viewTransition:m,children:p,...v},y){let b=so(f,{relative:v.relative}),_=an(),T=S.useContext(Qr),{navigator:N,basename:D}=S.useContext(En),w=T!=null&&MT(b)&&m===!0,C=N.encodeLocation?N.encodeLocation(b).pathname:b.pathname,H=_.pathname,O=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;l||(H=H.toLowerCase(),O=O?O.toLowerCase():null,C=C.toLowerCase()),O&&D&&(O=Da(O,D)||O);const F=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let G=H===C||!c&&H.startsWith(C)&&H.charAt(F)==="/",W=O!=null&&(O===C||!c&&O.startsWith(C)&&O.charAt(C.length)==="/"),ee={isActive:G,isPending:W,isTransitioning:w},$=G?s:void 0,ae;typeof o=="function"?ae=o(ee):ae=[o,G?"active":null,W?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let _e=typeof d=="function"?d(ee):d;return S.createElement(Sf,{...v,"aria-current":$,className:ae,ref:y,style:_e,to:f,viewTransition:m},typeof p=="function"?p(ee):p)});jT.displayName="NavLink";var CT=S.forwardRef(({discover:n="render",fetcherKey:s,navigate:l,reloadDocument:o,replace:c,state:d,method:f=Br,action:m,onSubmit:p,relative:v,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:_,...T},N)=>{let{unstable_useTransitions:D}=S.useContext(En),w=kT(),C=RT(m,{relative:v}),H=f.toLowerCase()==="get"?"get":"post",O=typeof m=="string"&&f0.test(m),F=G=>{if(p&&p(G),G.defaultPrevented)return;G.preventDefault();let W=G.nativeEvent.submitter,ee=(W==null?void 0:W.getAttribute("formmethod"))||f,$=()=>w(W||G.currentTarget,{fetcherKey:s,method:ee,navigate:l,replace:c,state:d,relative:v,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:_});D&&l!==!1?S.startTransition(()=>$()):$()};return S.createElement("form",{ref:N,method:H,action:C,onSubmit:o?p:F,...T,"data-discover":!O&&n==="render"?"true":void 0})});CT.displayName="Form";function AT(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function h0(n){let s=S.useContext(zi);return lt(s,AT(n)),s}function NT(n,{target:s,replace:l,unstable_mask:o,state:c,preventScrollReset:d,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:p,unstable_useTransitions:v}={}){let y=Jr(),b=an(),_=so(n,{relative:f});return S.useCallback(T=>{if(sT(T,s)){T.preventDefault();let N=l!==void 0?l:Xl(b)===Xl(_),D=()=>y(n,{replace:N,unstable_mask:o,state:c,preventScrollReset:d,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:p});v?S.startTransition(()=>D()):D()}},[b,y,_,l,o,c,s,n,d,f,m,p,v])}function xf(n){zn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let s=S.useRef(Kd(n)),l=S.useRef(!1),o=an(),c=S.useMemo(()=>iT(o.search,l.current?null:s.current),[o.search]),d=Jr(),f=S.useCallback((m,p)=>{const v=Kd(typeof m=="function"?m(new URLSearchParams(c)):m);l.current=!0,d("?"+v,p)},[d,c]);return[c,f]}var wT=0,DT=()=>`__${String(++wT)}__`;function kT(){let{router:n}=h0("useSubmit"),{basename:s}=S.useContext(En),l=X_(),o=n.fetch,c=n.navigate;return S.useCallback(async(d,f={})=>{let{action:m,method:p,encType:v,formData:y,body:b}=rT(d,s);if(f.navigate===!1){let _=f.fetcherKey||DT();await o(_,l,f.action||m,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:y,body:b,formMethod:f.method||p,formEncType:f.encType||v,flushSync:f.flushSync})}else await c(f.action||m,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:y,body:b,formMethod:f.method||p,formEncType:f.encType||v,replace:f.replace,state:f.state,fromRouteId:l,flushSync:f.flushSync,viewTransition:f.viewTransition})},[o,c,s,l])}function RT(n,{relative:s}={}){let{basename:l}=S.useContext(En),o=S.useContext(Vn);lt(o,"useFormAction must be used inside a RouteContext");let[c]=o.matches.slice(-1),d={...so(n||".",{relative:s})},f=an();if(n==null){d.search=f.search;let m=new URLSearchParams(d.search),p=m.getAll("index");if(p.some(y=>y==="")){m.delete("index"),p.filter(b=>b).forEach(b=>m.append("index",b));let y=m.toString();d.search=y?`?${y}`:""}}return(!n||n===".")&&c.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(d.pathname=d.pathname==="/"?l:sa([l,d.pathname])),Xl(d)}function MT(n,{relative:s}={}){let l=S.useContext(n0);lt(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=h0("useViewTransitionState"),c=so(n,{relative:s});if(!l.isTransitioning)return!1;let d=Da(l.currentLocation.pathname,o)||l.currentLocation.pathname,f=Da(l.nextLocation.pathname,o)||l.nextLocation.pathname;return $l(c.pathname,f)!=null||$l(c.pathname,d)!=null}function oa(){const n=Jr();return S.useCallback((s,l)=>{typeof s=="number"?n(s):n(s,l)},[n])}function m0(n){return`/sessions/${encodeURIComponent(n)}`}function Fl(n){return`/projects/${encodeURIComponent(n)}`}function Bs(n,s){const l=`/tasks/${encodeURIComponent(n)}`;return s?`${l}/${s}`:l}function OT(n){return`/tasks/${encodeURIComponent(n)}/edit`}function Mi(n,s){const l=new URLSearchParams({project:n});return s&&l.set("parent",s),`/tasks/new?${l.toString()}`}function p0(n,s){return`/sessions/new?${new URLSearchParams({env:n,runtime:s}).toString()}`}const uv="/environments/new",Ri="/settings",BT="_container_1he30_1",LT="_brand_1he30_27",UT="_info_1he30_43",zT="_connectionDot_1he30_51",VT="_connected_1he30_54",HT="_disconnected_1he30_58",GT="_settingsButton_1he30_62",Ns={container:BT,brand:LT,info:UT,connectionDot:zT,connected:VT,disconnected:HT,settingsButton:GT};function IT(){const{connected:n,environments:s,sessions:l}=Qt(),o=oa(),c=s.length,d=s.filter(m=>m.status==="connected").length,f=l.filter(m=>["running","idle"].includes(m.status)).length;return h.jsxs("div",{className:Ns.container,children:[h.jsx("button",{type:"button",className:Ns.brand,onClick:()=>o("/"),title:"Home",children:"Grackle"}),h.jsxs("div",{className:Ns.info,children:[h.jsxs("span",{children:[h.jsx("span",{className:`${Ns.connectionDot} ${n?Ns.connected:Ns.disconnected}`,children:"●"})," ",n?"Connected":"Disconnected"]}),h.jsxs("span",{children:[d,"/",c," env",c!==1?"s":""]}),h.jsxs("span",{children:[f," active"]}),h.jsx("button",{className:Ns.settingsButton,onClick:()=>o(Ri),title:"Settings",children:"⚙"})]})]})}const _f=S.createContext({});function Tf(n){const s=S.useRef(null);return s.current===null&&(s.current=n()),s.current}const tc=S.createContext(null),Ef=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class PT extends S.Component{getSnapshotBeforeUpdate(s){const l=this.props.childRef.current;if(l&&s.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 qT({children:n,isPresent:s}){const l=S.useId(),o=S.useRef(null),c=S.useRef({width:0,height:0,top:0,left:0}),{nonce:d}=S.useContext(Ef);return S.useInsertionEffect(()=>{const{width:f,height:m,top:p,left:v}=c.current;if(s||!o.current||!f||!m)return;o.current.dataset.motionPopId=l;const y=document.createElement("style");return d&&(y.nonce=d),document.head.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
79
|
+
[data-motion-pop-id="${l}"] {
|
|
80
|
+
position: absolute !important;
|
|
81
|
+
width: ${f}px !important;
|
|
82
|
+
height: ${m}px !important;
|
|
83
|
+
top: ${p}px !important;
|
|
84
|
+
left: ${v}px !important;
|
|
85
|
+
}
|
|
86
|
+
`),()=>{document.head.removeChild(y)}},[s]),h.jsx(PT,{isPresent:s,childRef:o,sizeRef:c,children:S.cloneElement(n,{ref:o})})}const YT=({children:n,initial:s,isPresent:l,onExitComplete:o,custom:c,presenceAffectsLayout:d,mode:f})=>{const m=Tf(KT),p=S.useId(),v=S.useCallback(b=>{m.set(b,!0);for(const _ of m.values())if(!_)return;o&&o()},[m,o]),y=S.useMemo(()=>({id:p,initial:s,isPresent:l,custom:c,onExitComplete:v,register:b=>(m.set(b,!1),()=>m.delete(b))}),d?[Math.random(),v]:[l,v]);return S.useMemo(()=>{m.forEach((b,_)=>m.set(_,!1))},[l]),S.useEffect(()=>{!l&&!m.size&&o&&o()},[l]),f==="popLayout"&&(n=h.jsx(qT,{isPresent:l,children:n})),h.jsx(tc.Provider,{value:y,children:n})};function KT(){return new Map}function g0(n=!0){const s=S.useContext(tc);if(s===null)return[!0,null];const{isPresent:l,onExitComplete:o,register:c}=s,d=S.useId();S.useEffect(()=>{n&&c(d)},[n]);const f=S.useCallback(()=>n&&o&&o(d),[d,o,n]);return!l&&o?[!1,f]:[!0]}const Ar=n=>n.key||"";function dv(n){const s=[];return S.Children.forEach(n,l=>{S.isValidElement(l)&&s.push(l)}),s}const jf=typeof window<"u",v0=jf?S.useLayoutEffect:S.useEffect,zs=({children:n,custom:s,initial:l=!0,onExitComplete:o,presenceAffectsLayout:c=!0,mode:d="sync",propagate:f=!1})=>{const[m,p]=g0(f),v=S.useMemo(()=>dv(n),[n]),y=f&&!m?[]:v.map(Ar),b=S.useRef(!0),_=S.useRef(v),T=Tf(()=>new Map),[N,D]=S.useState(v),[w,C]=S.useState(v);v0(()=>{b.current=!1,_.current=v;for(let F=0;F<w.length;F++){const G=Ar(w[F]);y.includes(G)?T.delete(G):T.get(G)!==!0&&T.set(G,!1)}},[w,y.length,y.join("-")]);const H=[];if(v!==N){let F=[...v];for(let G=0;G<w.length;G++){const W=w[G],ee=Ar(W);y.includes(ee)||(F.splice(G,0,W),H.push(W))}d==="wait"&&H.length&&(F=H),C(dv(F)),D(v);return}const{forceRender:O}=S.useContext(_f);return h.jsx(h.Fragment,{children:w.map(F=>{const G=Ar(F),W=f&&!m?!1:v===w||y.includes(G),ee=()=>{if(T.has(G))T.set(G,!0);else return;let $=!0;T.forEach(ae=>{ae||($=!1)}),$&&(O==null||O(),C(_.current),f&&(p==null||p()),o&&o())};return h.jsx(YT,{isPresent:W,initial:!b.current||l?void 0:!1,custom:W?void 0:s,presenceAffectsLayout:c,mode:d,onExitComplete:W?void 0:ee,children:F},G)})})},_n=n=>n;let y0=_n;const ZT={useManualTiming:!1};function XT(n){let s=new Set,l=new Set,o=!1,c=!1;const d=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function m(v){d.has(v)&&(p.schedule(v),n()),v(f)}const p={schedule:(v,y=!1,b=!1)=>{const T=b&&o?s:l;return y&&d.add(v),T.has(v)||T.add(v),v},cancel:v=>{l.delete(v),d.delete(v)},process:v=>{if(f=v,o){c=!0;return}o=!0,[s,l]=[l,s],s.forEach(m),s.clear(),o=!1,c&&(c=!1,p.process(v))}};return p}const Nr=["read","resolveKeyframes","update","preRender","render","postRender"],$T=40;function b0(n,s){let l=!1,o=!0;const c={delta:0,timestamp:0,isProcessing:!1},d=()=>l=!0,f=Nr.reduce((C,H)=>(C[H]=XT(d),C),{}),{read:m,resolveKeyframes:p,update:v,preRender:y,render:b,postRender:_}=f,T=()=>{const C=performance.now();l=!1,c.delta=o?1e3/60:Math.max(Math.min(C-c.timestamp,$T),1),c.timestamp=C,c.isProcessing=!0,m.process(c),p.process(c),v.process(c),y.process(c),b.process(c),_.process(c),c.isProcessing=!1,l&&s&&(o=!1,n(T))},N=()=>{l=!0,o=!0,c.isProcessing||n(T)};return{schedule:Nr.reduce((C,H)=>{const O=f[H];return C[H]=(F,G=!1,W=!1)=>(l||N(),O.schedule(F,G,W)),C},{}),cancel:C=>{for(let H=0;H<Nr.length;H++)f[Nr[H]].cancel(C)},state:c,steps:f}}const{schedule:ot,cancel:os,state:qt,steps:Td}=b0(typeof requestAnimationFrame<"u"?requestAnimationFrame:_n,!0),S0=S.createContext({strict:!1}),fv={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"]},Oi={};for(const n in fv)Oi[n]={isEnabled:s=>fv[n].some(l=>!!s[l])};function FT(n){for(const s in n)Oi[s]={...Oi[s],...n[s]}}const QT=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 Gr(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||QT.has(n)}let x0=n=>!Gr(n);function JT(n){n&&(x0=s=>s.startsWith("on")?!Gr(s):n(s))}try{JT(require("@emotion/is-prop-valid").default)}catch{}function WT(n,s,l){const o={};for(const c in n)c==="values"&&typeof n.values=="object"||(x0(c)||l===!0&&Gr(c)||!s&&!Gr(c)||n.draggable&&c.startsWith("onDrag"))&&(o[c]=n[c]);return o}function eE(n){if(typeof Proxy>"u")return n;const s=new Map,l=(...o)=>n(...o);return new Proxy(l,{get:(o,c)=>c==="create"?n:(s.has(c)||s.set(c,n(c)),s.get(c))})}const nc=S.createContext({});function Ql(n){return typeof n=="string"||Array.isArray(n)}function ac(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const Cf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Af=["initial",...Cf];function sc(n){return ac(n.animate)||Af.some(s=>Ql(n[s]))}function _0(n){return!!(sc(n)||n.variants)}function tE(n,s){if(sc(n)){const{initial:l,animate:o}=n;return{initial:l===!1||Ql(l)?l:void 0,animate:Ql(o)?o:void 0}}return n.inherit!==!1?s:{}}function nE(n){const{initial:s,animate:l}=tE(n,S.useContext(nc));return S.useMemo(()=>({initial:s,animate:l}),[hv(s),hv(l)])}function hv(n){return Array.isArray(n)?n.join(" "):n}const aE=Symbol.for("motionComponentSymbol");function Ai(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function sE(n,s,l){return S.useCallback(o=>{o&&n.onMount&&n.onMount(o),s&&(o?s.mount(o):s.unmount()),l&&(typeof l=="function"?l(o):Ai(l)&&(l.current=o))},[s])}const Nf=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),iE="framerAppearId",T0="data-"+Nf(iE),{schedule:wf}=b0(queueMicrotask,!1),E0=S.createContext({});function lE(n,s,l,o,c){var d,f;const{visualElement:m}=S.useContext(nc),p=S.useContext(S0),v=S.useContext(tc),y=S.useContext(Ef).reducedMotion,b=S.useRef(null);o=o||p.renderer,!b.current&&o&&(b.current=o(n,{visualState:s,parent:m,props:l,presenceContext:v,blockInitialAnimation:v?v.initial===!1:!1,reducedMotionConfig:y}));const _=b.current,T=S.useContext(E0);_&&!_.projection&&c&&(_.type==="html"||_.type==="svg")&&oE(b.current,l,c,T);const N=S.useRef(!1);S.useInsertionEffect(()=>{_&&N.current&&_.update(l,v)});const D=l[T0],w=S.useRef(!!D&&!(!((d=window.MotionHandoffIsComplete)===null||d===void 0)&&d.call(window,D))&&((f=window.MotionHasOptimisedAnimation)===null||f===void 0?void 0:f.call(window,D)));return v0(()=>{_&&(N.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),wf.render(_.render),w.current&&_.animationState&&_.animationState.animateChanges())}),S.useEffect(()=>{_&&(!w.current&&_.animationState&&_.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)===null||C===void 0||C.call(window,D)}),w.current=!1))}),_}function oE(n,s,l,o){const{layoutId:c,layout:d,drag:f,dragConstraints:m,layoutScroll:p,layoutRoot:v}=s;n.projection=new l(n.latestValues,s["data-framer-portal-id"]?void 0:j0(n.parent)),n.projection.setOptions({layoutId:c,layout:d,alwaysMeasureLayout:!!f||m&&Ai(m),visualElement:n,animationType:typeof d=="string"?d:"both",initialPromotionConfig:o,layoutScroll:p,layoutRoot:v})}function j0(n){if(n)return n.options.allowProjection!==!1?n.projection:j0(n.parent)}function rE({preloadedFeatures:n,createVisualElement:s,useRender:l,useVisualState:o,Component:c}){var d,f;n&&FT(n);function m(v,y){let b;const _={...S.useContext(Ef),...v,layoutId:cE(v)},{isStatic:T}=_,N=nE(v),D=o(v,T);if(!T&&jf){uE();const w=dE(_);b=w.MeasureLayout,N.visualElement=lE(c,D,_,s,w.ProjectionNode)}return h.jsxs(nc.Provider,{value:N,children:[b&&N.visualElement?h.jsx(b,{visualElement:N.visualElement,..._}):null,l(c,v,sE(D,N.visualElement,y),D,T,N.visualElement)]})}m.displayName=`motion.${typeof c=="string"?c:`create(${(f=(d=c.displayName)!==null&&d!==void 0?d:c.name)!==null&&f!==void 0?f:""})`}`;const p=S.forwardRef(m);return p[aE]=c,p}function cE({layoutId:n}){const s=S.useContext(_f).id;return s&&n!==void 0?s+"-"+n:n}function uE(n,s){S.useContext(S0).strict}function dE(n){const{drag:s,layout:l}=Oi;if(!s&&!l)return{};const o={...s,...l};return{MeasureLayout:s!=null&&s.isEnabled(n)||l!=null&&l.isEnabled(n)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const fE=["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 Df(n){return typeof n!="string"||n.includes("-")?!1:!!(fE.indexOf(n)>-1||/[A-Z]/u.test(n))}function mv(n){const s=[{},{}];return n==null||n.values.forEach((l,o)=>{s[0][o]=l.get(),s[1][o]=l.getVelocity()}),s}function kf(n,s,l,o){if(typeof s=="function"){const[c,d]=mv(o);s=s(l!==void 0?l:n.custom,c,d)}if(typeof s=="string"&&(s=n.variants&&n.variants[s]),typeof s=="function"){const[c,d]=mv(o);s=s(l!==void 0?l:n.custom,c,d)}return s}const Zd=n=>Array.isArray(n),hE=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),mE=n=>Zd(n)?n[n.length-1]||0:n,$t=n=>!!(n&&n.getVelocity);function Ur(n){const s=$t(n)?n.get():n;return hE(s)?s.toValue():s}function pE({scrapeMotionValuesFromProps:n,createRenderState:s,onUpdate:l},o,c,d){const f={latestValues:gE(o,c,d,n),renderState:s()};return l&&(f.onMount=m=>l({props:o,current:m,...f}),f.onUpdate=m=>l(m)),f}const C0=n=>(s,l)=>{const o=S.useContext(nc),c=S.useContext(tc),d=()=>pE(n,s,o,c);return l?d():Tf(d)};function gE(n,s,l,o){const c={},d=o(n,{});for(const _ in d)c[_]=Ur(d[_]);let{initial:f,animate:m}=n;const p=sc(n),v=_0(n);s&&v&&!p&&n.inherit!==!1&&(f===void 0&&(f=s.initial),m===void 0&&(m=s.animate));let y=l?l.initial===!1:!1;y=y||f===!1;const b=y?m:f;if(b&&typeof b!="boolean"&&!ac(b)){const _=Array.isArray(b)?b:[b];for(let T=0;T<_.length;T++){const N=kf(n,_[T]);if(N){const{transitionEnd:D,transition:w,...C}=N;for(const H in C){let O=C[H];if(Array.isArray(O)){const F=y?O.length-1:0;O=O[F]}O!==null&&(c[H]=O)}for(const H in D)c[H]=D[H]}}}return c}const Vi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vs=new Set(Vi),A0=n=>s=>typeof s=="string"&&s.startsWith(n),N0=A0("--"),vE=A0("var(--"),Rf=n=>vE(n)?yE.test(n.split("/*")[0].trim()):!1,yE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,w0=(n,s)=>s&&typeof n=="number"?s.transform(n):n,ka=(n,s,l)=>l>s?s:l<n?n:l,Hi={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Jl={...Hi,transform:n=>ka(0,1,n)},wr={...Hi,default:1},io=n=>({test:s=>typeof s=="string"&&s.endsWith(n)&&s.split(" ").length===1,parse:parseFloat,transform:s=>`${s}${n}`}),as=io("deg"),ia=io("%"),Te=io("px"),bE=io("vh"),SE=io("vw"),pv={...ia,parse:n=>ia.parse(n)/100,transform:n=>ia.transform(n*100)},xE={borderWidth:Te,borderTopWidth:Te,borderRightWidth:Te,borderBottomWidth:Te,borderLeftWidth:Te,borderRadius:Te,radius:Te,borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomRightRadius:Te,borderBottomLeftRadius:Te,width:Te,maxWidth:Te,height:Te,maxHeight:Te,top:Te,right:Te,bottom:Te,left:Te,padding:Te,paddingTop:Te,paddingRight:Te,paddingBottom:Te,paddingLeft:Te,margin:Te,marginTop:Te,marginRight:Te,marginBottom:Te,marginLeft:Te,backgroundPositionX:Te,backgroundPositionY:Te},_E={rotate:as,rotateX:as,rotateY:as,rotateZ:as,scale:wr,scaleX:wr,scaleY:wr,scaleZ:wr,skew:as,skewX:as,skewY:as,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:Jl,originX:pv,originY:pv,originZ:Te},gv={...Hi,transform:Math.round},Mf={...xE,..._E,zIndex:gv,size:Te,fillOpacity:Jl,strokeOpacity:Jl,numOctaves:gv},TE={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},EE=Vi.length;function jE(n,s,l){let o="",c=!0;for(let d=0;d<EE;d++){const f=Vi[d],m=n[f];if(m===void 0)continue;let p=!0;if(typeof m=="number"?p=m===(f.startsWith("scale")?1:0):p=parseFloat(m)===0,!p||l){const v=w0(m,Mf[f]);if(!p){c=!1;const y=TE[f]||f;o+=`${y}(${v}) `}l&&(s[f]=v)}}return o=o.trim(),l?o=l(s,c?"":o):c&&(o="none"),o}function Of(n,s,l){const{style:o,vars:c,transformOrigin:d}=n;let f=!1,m=!1;for(const p in s){const v=s[p];if(Vs.has(p)){f=!0;continue}else if(N0(p)){c[p]=v;continue}else{const y=w0(v,Mf[p]);p.startsWith("origin")?(m=!0,d[p]=y):o[p]=y}}if(s.transform||(f||l?o.transform=jE(s,n.transform,l):o.transform&&(o.transform="none")),m){const{originX:p="50%",originY:v="50%",originZ:y=0}=d;o.transformOrigin=`${p} ${v} ${y}`}}const CE={offset:"stroke-dashoffset",array:"stroke-dasharray"},AE={offset:"strokeDashoffset",array:"strokeDasharray"};function NE(n,s,l=1,o=0,c=!0){n.pathLength=1;const d=c?CE:AE;n[d.offset]=Te.transform(-o);const f=Te.transform(s),m=Te.transform(l);n[d.array]=`${f} ${m}`}function vv(n,s,l){return typeof n=="string"?n:Te.transform(s+l*n)}function wE(n,s,l){const o=vv(s,n.x,n.width),c=vv(l,n.y,n.height);return`${o} ${c}`}function Bf(n,{attrX:s,attrY:l,attrScale:o,originX:c,originY:d,pathLength:f,pathSpacing:m=1,pathOffset:p=0,...v},y,b){if(Of(n,v,b),y){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:_,style:T,dimensions:N}=n;_.transform&&(N&&(T.transform=_.transform),delete _.transform),N&&(c!==void 0||d!==void 0||T.transform)&&(T.transformOrigin=wE(N,c!==void 0?c:.5,d!==void 0?d:.5)),s!==void 0&&(_.x=s),l!==void 0&&(_.y=l),o!==void 0&&(_.scale=o),f!==void 0&&NE(_,f,m,p,!1)}const Lf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),D0=()=>({...Lf(),attrs:{}}),Uf=n=>typeof n=="string"&&n.toLowerCase()==="svg";function k0(n,{style:s,vars:l},o,c){Object.assign(n.style,s,c&&c.getProjectionStyles(o));for(const d in l)n.style.setProperty(d,l[d])}const R0=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 M0(n,s,l,o){k0(n,s,void 0,o);for(const c in s.attrs)n.setAttribute(R0.has(c)?c:Nf(c),s.attrs[c])}const Ir={};function DE(n){Object.assign(Ir,n)}function O0(n,{layout:s,layoutId:l}){return Vs.has(n)||n.startsWith("origin")||(s||l!==void 0)&&(!!Ir[n]||n==="opacity")}function zf(n,s,l){var o;const{style:c}=n,d={};for(const f in c)($t(c[f])||s.style&&$t(s.style[f])||O0(f,n)||((o=l==null?void 0:l.getValue(f))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(d[f]=c[f]);return d}function B0(n,s,l){const o=zf(n,s,l);for(const c in n)if($t(n[c])||$t(s[c])){const d=Vi.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;o[d]=n[c]}return o}function kE(n,s){try{s.dimensions=typeof n.getBBox=="function"?n.getBBox():n.getBoundingClientRect()}catch{s.dimensions={x:0,y:0,width:0,height:0}}}const yv=["x","y","width","height","cx","cy","r"],RE={useVisualState:C0({scrapeMotionValuesFromProps:B0,createRenderState:D0,onUpdate:({props:n,prevProps:s,current:l,renderState:o,latestValues:c})=>{if(!l)return;let d=!!n.drag;if(!d){for(const m in c)if(Vs.has(m)){d=!0;break}}if(!d)return;let f=!s;if(s)for(let m=0;m<yv.length;m++){const p=yv[m];n[p]!==s[p]&&(f=!0)}f&&ot.read(()=>{kE(l,o),ot.render(()=>{Bf(o,c,Uf(l.tagName),n.transformTemplate),M0(l,o)})})}})},ME={useVisualState:C0({scrapeMotionValuesFromProps:zf,createRenderState:Lf})};function L0(n,s,l){for(const o in s)!$t(s[o])&&!O0(o,l)&&(n[o]=s[o])}function OE({transformTemplate:n},s){return S.useMemo(()=>{const l=Lf();return Of(l,s,n),Object.assign({},l.vars,l.style)},[s])}function BE(n,s){const l=n.style||{},o={};return L0(o,l,n),Object.assign(o,OE(n,s)),o}function LE(n,s){const l={},o=BE(n,s);return n.drag&&n.dragListener!==!1&&(l.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(l.tabIndex=0),l.style=o,l}function UE(n,s,l,o){const c=S.useMemo(()=>{const d=D0();return Bf(d,s,Uf(o),n.transformTemplate),{...d.attrs,style:{...d.style}}},[s]);if(n.style){const d={};L0(d,n.style,n),c.style={...d,...c.style}}return c}function zE(n=!1){return(l,o,c,{latestValues:d},f)=>{const p=(Df(l)?UE:LE)(o,d,f,l),v=WT(o,typeof l=="string",n),y=l!==S.Fragment?{...v,...p,ref:c}:{},{children:b}=o,_=S.useMemo(()=>$t(b)?b.get():b,[b]);return S.createElement(l,{...y,children:_})}}function VE(n,s){return function(o,{forwardMotionProps:c}={forwardMotionProps:!1}){const f={...Df(o)?RE:ME,preloadedFeatures:n,useRender:zE(c),createVisualElement:s,Component:o};return rE(f)}}function U0(n,s){if(!Array.isArray(s))return!1;const l=s.length;if(l!==n.length)return!1;for(let o=0;o<l;o++)if(s[o]!==n[o])return!1;return!0}function ic(n,s,l){const o=n.getProps();return kf(o,s,l!==void 0?l:o.custom,n)}function Vf(n,s){return n?n[s]||n.default||n:void 0}const z0=new Set(["width","height","top","left","right","bottom",...Vi]);let zr;function HE(){zr=void 0}const la={now:()=>(zr===void 0&&la.set(qt.isProcessing||ZT.useManualTiming?qt.timestamp:performance.now()),zr),set:n=>{zr=n,queueMicrotask(HE)}};function Hf(n,s){n.indexOf(s)===-1&&n.push(s)}function Gf(n,s){const l=n.indexOf(s);l>-1&&n.splice(l,1)}class If{constructor(){this.subscriptions=[]}add(s){return Hf(this.subscriptions,s),()=>Gf(this.subscriptions,s)}notify(s,l,o){const c=this.subscriptions.length;if(c)if(c===1)this.subscriptions[0](s,l,o);else for(let d=0;d<c;d++){const f=this.subscriptions[d];f&&f(s,l,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function V0(n,s){return s?n*(1e3/s):0}const bv=30,GE=n=>!isNaN(parseFloat(n));class IE{constructor(s,l={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,c=!0)=>{const d=la.now();this.updatedAt!==d&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),c&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(s),this.owner=l.owner}setCurrent(s){this.current=s,this.updatedAt=la.now(),this.canTrackVelocity===null&&s!==void 0&&(this.canTrackVelocity=GE(this.current))}setPrevFrameValue(s=this.current){this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt}onChange(s){return this.on("change",s)}on(s,l){this.events[s]||(this.events[s]=new If);const o=this.events[s].add(l);return s==="change"?()=>{o(),ot.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const s in this.events)this.events[s].clear()}attach(s,l){this.passiveEffect=s,this.stopPassiveEffect=l}set(s,l=!0){!l||!this.passiveEffect?this.updateAndNotify(s,l):this.passiveEffect(s,this.updateAndNotify)}setWithVelocity(s,l,o){this.set(l),this.prev=void 0,this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt-o}jump(s,l=!0){this.updateAndNotify(s),this.prev=s,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const s=la.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||s-this.updatedAt>bv)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,bv);return V0(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(s){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=s(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 Wl(n,s){return new IE(n,s)}function PE(n,s,l){n.hasValue(s)?n.getValue(s).set(l):n.addValue(s,Wl(l))}function qE(n,s){const l=ic(n,s);let{transitionEnd:o={},transition:c={},...d}=l||{};d={...d,...o};for(const f in d){const m=mE(d[f]);PE(n,f,m)}}function YE(n){return!!($t(n)&&n.add)}function Xd(n,s){const l=n.getValue("willChange");if(YE(l))return l.add(s)}function H0(n){return n.props[T0]}function Pf(n){let s;return()=>(s===void 0&&(s=n()),s)}const KE=Pf(()=>window.ScrollTimeline!==void 0);class ZE{constructor(s){this.stop=()=>this.runAll("stop"),this.animations=s.filter(Boolean)}get finished(){return Promise.all(this.animations.map(s=>"finished"in s?s.finished:s))}getAll(s){return this.animations[0][s]}setAll(s,l){for(let o=0;o<this.animations.length;o++)this.animations[o][s]=l}attachTimeline(s,l){const o=this.animations.map(c=>{if(KE()&&c.attachTimeline)return c.attachTimeline(s);if(typeof l=="function")return l(c)});return()=>{o.forEach((c,d)=>{c&&c(),this.animations[d].stop()})}}get time(){return this.getAll("time")}set time(s){this.setAll("time",s)}get speed(){return this.getAll("speed")}set speed(s){this.setAll("speed",s)}get startTime(){return this.getAll("startTime")}get duration(){let s=0;for(let l=0;l<this.animations.length;l++)s=Math.max(s,this.animations[l].duration);return s}runAll(s){this.animations.forEach(l=>l[s]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class XE extends ZE{then(s,l){return Promise.all(this.animations).then(s).catch(l)}}const Na=n=>n*1e3,wa=n=>n/1e3;function qf(n){return typeof n=="function"}function Sv(n,s){n.timeline=s,n.onfinish=null}const Yf=n=>Array.isArray(n)&&typeof n[0]=="number",$E={linearEasing:void 0};function FE(n,s){const l=Pf(n);return()=>{var o;return(o=$E[s])!==null&&o!==void 0?o:l()}}const Pr=FE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Bi=(n,s,l)=>{const o=s-n;return o===0?1:(l-n)/o},G0=(n,s,l=10)=>{let o="";const c=Math.max(Math.round(s/l),2);for(let d=0;d<c;d++)o+=n(Bi(0,c-1,d))+", ";return`linear(${o.substring(0,o.length-2)})`};function I0(n){return!!(typeof n=="function"&&Pr()||!n||typeof n=="string"&&(n in $d||Pr())||Yf(n)||Array.isArray(n)&&n.every(I0))}const Vl=([n,s,l,o])=>`cubic-bezier(${n}, ${s}, ${l}, ${o})`,$d={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Vl([0,.65,.55,1]),circOut:Vl([.55,0,1,.45]),backIn:Vl([.31,.01,.66,-.59]),backOut:Vl([.33,1.53,.69,.99])};function P0(n,s){if(n)return typeof n=="function"&&Pr()?G0(n,s):Yf(n)?Vl(n):Array.isArray(n)?n.map(l=>P0(l,s)||$d.easeOut):$d[n]}const q0=(n,s,l)=>(((1-3*l+3*s)*n+(3*l-6*s))*n+3*s)*n,QE=1e-7,JE=12;function WE(n,s,l,o,c){let d,f,m=0;do f=s+(l-s)/2,d=q0(f,o,c)-n,d>0?l=f:s=f;while(Math.abs(d)>QE&&++m<JE);return f}function lo(n,s,l,o){if(n===s&&l===o)return _n;const c=d=>WE(d,0,1,n,l);return d=>d===0||d===1?d:q0(c(d),s,o)}const Y0=n=>s=>s<=.5?n(2*s)/2:(2-n(2*(1-s)))/2,K0=n=>s=>1-n(1-s),Z0=lo(.33,1.53,.69,.99),Kf=K0(Z0),X0=Y0(Kf),$0=n=>(n*=2)<1?.5*Kf(n):.5*(2-Math.pow(2,-10*(n-1))),Zf=n=>1-Math.sin(Math.acos(n)),F0=K0(Zf),Q0=Y0(Zf),J0=n=>/^0[^.\s]+$/u.test(n);function e2(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||J0(n):!0}const ql=n=>Math.round(n*1e5)/1e5,Xf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function t2(n){return n==null}const n2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,$f=(n,s)=>l=>!!(typeof l=="string"&&n2.test(l)&&l.startsWith(n)||s&&!t2(l)&&Object.prototype.hasOwnProperty.call(l,s)),W0=(n,s,l)=>o=>{if(typeof o!="string")return o;const[c,d,f,m]=o.match(Xf);return{[n]:parseFloat(c),[s]:parseFloat(d),[l]:parseFloat(f),alpha:m!==void 0?parseFloat(m):1}},a2=n=>ka(0,255,n),Ed={...Hi,transform:n=>Math.round(a2(n))},Ms={test:$f("rgb","red"),parse:W0("red","green","blue"),transform:({red:n,green:s,blue:l,alpha:o=1})=>"rgba("+Ed.transform(n)+", "+Ed.transform(s)+", "+Ed.transform(l)+", "+ql(Jl.transform(o))+")"};function s2(n){let s="",l="",o="",c="";return n.length>5?(s=n.substring(1,3),l=n.substring(3,5),o=n.substring(5,7),c=n.substring(7,9)):(s=n.substring(1,2),l=n.substring(2,3),o=n.substring(3,4),c=n.substring(4,5),s+=s,l+=l,o+=o,c+=c),{red:parseInt(s,16),green:parseInt(l,16),blue:parseInt(o,16),alpha:c?parseInt(c,16)/255:1}}const Fd={test:$f("#"),parse:s2,transform:Ms.transform},Ni={test:$f("hsl","hue"),parse:W0("hue","saturation","lightness"),transform:({hue:n,saturation:s,lightness:l,alpha:o=1})=>"hsla("+Math.round(n)+", "+ia.transform(ql(s))+", "+ia.transform(ql(l))+", "+ql(Jl.transform(o))+")"},Xt={test:n=>Ms.test(n)||Fd.test(n)||Ni.test(n),parse:n=>Ms.test(n)?Ms.parse(n):Ni.test(n)?Ni.parse(n):Fd.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Ms.transform(n):Ni.transform(n)},i2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function l2(n){var s,l;return isNaN(n)&&typeof n=="string"&&(((s=n.match(Xf))===null||s===void 0?void 0:s.length)||0)+(((l=n.match(i2))===null||l===void 0?void 0:l.length)||0)>0}const eb="number",tb="color",o2="var",r2="var(",xv="${}",c2=/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 eo(n){const s=n.toString(),l=[],o={color:[],number:[],var:[]},c=[];let d=0;const m=s.replace(c2,p=>(Xt.test(p)?(o.color.push(d),c.push(tb),l.push(Xt.parse(p))):p.startsWith(r2)?(o.var.push(d),c.push(o2),l.push(p)):(o.number.push(d),c.push(eb),l.push(parseFloat(p))),++d,xv)).split(xv);return{values:l,split:m,indexes:o,types:c}}function nb(n){return eo(n).values}function ab(n){const{split:s,types:l}=eo(n),o=s.length;return c=>{let d="";for(let f=0;f<o;f++)if(d+=s[f],c[f]!==void 0){const m=l[f];m===eb?d+=ql(c[f]):m===tb?d+=Xt.transform(c[f]):d+=c[f]}return d}}const u2=n=>typeof n=="number"?0:n;function d2(n){const s=nb(n);return ab(n)(s.map(u2))}const rs={test:l2,parse:nb,createTransformer:ab,getAnimatableNone:d2},f2=new Set(["brightness","contrast","saturate","opacity"]);function h2(n){const[s,l]=n.slice(0,-1).split("(");if(s==="drop-shadow")return n;const[o]=l.match(Xf)||[];if(!o)return n;const c=l.replace(o,"");let d=f2.has(s)?1:0;return o!==l&&(d*=100),s+"("+d+c+")"}const m2=/\b([a-z-]*)\(.*?\)/gu,Qd={...rs,getAnimatableNone:n=>{const s=n.match(m2);return s?s.map(h2).join(" "):n}},p2={...Mf,color:Xt,backgroundColor:Xt,outlineColor:Xt,fill:Xt,stroke:Xt,borderColor:Xt,borderTopColor:Xt,borderRightColor:Xt,borderBottomColor:Xt,borderLeftColor:Xt,filter:Qd,WebkitFilter:Qd},Ff=n=>p2[n];function sb(n,s){let l=Ff(n);return l!==Qd&&(l=rs),l.getAnimatableNone?l.getAnimatableNone(s):void 0}const g2=new Set(["auto","none","0"]);function v2(n,s,l){let o=0,c;for(;o<n.length&&!c;){const d=n[o];typeof d=="string"&&!g2.has(d)&&eo(d).values.length&&(c=n[o]),o++}if(c&&l)for(const d of s)n[d]=sb(l,c)}const _v=n=>n===Hi||n===Te,Tv=(n,s)=>parseFloat(n.split(", ")[s]),Ev=(n,s)=>(l,{transform:o})=>{if(o==="none"||!o)return 0;const c=o.match(/^matrix3d\((.+)\)$/u);if(c)return Tv(c[1],s);{const d=o.match(/^matrix\((.+)\)$/u);return d?Tv(d[1],n):0}},y2=new Set(["x","y","z"]),b2=Vi.filter(n=>!y2.has(n));function S2(n){const s=[];return b2.forEach(l=>{const o=n.getValue(l);o!==void 0&&(s.push([l,o.get()]),o.set(l.startsWith("scale")?1:0))}),s}const Li={width:({x:n},{paddingLeft:s="0",paddingRight:l="0"})=>n.max-n.min-parseFloat(s)-parseFloat(l),height:({y:n},{paddingTop:s="0",paddingBottom:l="0"})=>n.max-n.min-parseFloat(s)-parseFloat(l),top:(n,{top:s})=>parseFloat(s),left:(n,{left:s})=>parseFloat(s),bottom:({y:n},{top:s})=>parseFloat(s)+(n.max-n.min),right:({x:n},{left:s})=>parseFloat(s)+(n.max-n.min),x:Ev(4,13),y:Ev(5,14)};Li.translateX=Li.x;Li.translateY=Li.y;const Os=new Set;let Jd=!1,Wd=!1;function ib(){if(Wd){const n=Array.from(Os).filter(o=>o.needsMeasurement),s=new Set(n.map(o=>o.element)),l=new Map;s.forEach(o=>{const c=S2(o);c.length&&(l.set(o,c),o.render())}),n.forEach(o=>o.measureInitialState()),s.forEach(o=>{o.render();const c=l.get(o);c&&c.forEach(([d,f])=>{var m;(m=o.getValue(d))===null||m===void 0||m.set(f)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Wd=!1,Jd=!1,Os.forEach(n=>n.complete()),Os.clear()}function lb(){Os.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(Wd=!0)})}function x2(){lb(),ib()}class Qf{constructor(s,l,o,c,d,f=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...s],this.onComplete=l,this.name=o,this.motionValue=c,this.element=d,this.isAsync=f}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Os.add(this),Jd||(Jd=!0,ot.read(lb),ot.resolveKeyframes(ib))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:s,name:l,element:o,motionValue:c}=this;for(let d=0;d<s.length;d++)if(s[d]===null)if(d===0){const f=c==null?void 0:c.get(),m=s[s.length-1];if(f!==void 0)s[0]=f;else if(o&&l){const p=o.readValue(l,m);p!=null&&(s[0]=p)}s[0]===void 0&&(s[0]=m),c&&f===void 0&&c.set(s[0])}else s[d]=s[d-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Os.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Os.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ob=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),_2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function T2(n){const s=_2.exec(n);if(!s)return[,];const[,l,o,c]=s;return[`--${l??o}`,c]}function rb(n,s,l=1){const[o,c]=T2(n);if(!o)return;const d=window.getComputedStyle(s).getPropertyValue(o);if(d){const f=d.trim();return ob(f)?parseFloat(f):f}return Rf(c)?rb(c,s,l+1):c}const cb=n=>s=>s.test(n),E2={test:n=>n==="auto",parse:n=>n},ub=[Hi,Te,ia,as,SE,bE,E2],jv=n=>ub.find(cb(n));class db extends Qf{constructor(s,l,o,c,d){super(s,l,o,c,d,!0)}readKeyframes(){const{unresolvedKeyframes:s,element:l,name:o}=this;if(!l||!l.current)return;super.readKeyframes();for(let p=0;p<s.length;p++){let v=s[p];if(typeof v=="string"&&(v=v.trim(),Rf(v))){const y=rb(v,l.current);y!==void 0&&(s[p]=y),p===s.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!z0.has(o)||s.length!==2)return;const[c,d]=s,f=jv(c),m=jv(d);if(f!==m)if(_v(f)&&_v(m))for(let p=0;p<s.length;p++){const v=s[p];typeof v=="string"&&(s[p]=parseFloat(v))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:s,name:l}=this,o=[];for(let c=0;c<s.length;c++)e2(s[c])&&o.push(c);o.length&&v2(s,o,l)}measureInitialState(){const{element:s,unresolvedKeyframes:l,name:o}=this;if(!s||!s.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Li[o](s.measureViewportBox(),window.getComputedStyle(s.current)),l[0]=this.measuredOrigin;const c=l[l.length-1];c!==void 0&&s.getValue(o,c).jump(c,!1)}measureEndState(){var s;const{element:l,name:o,unresolvedKeyframes:c}=this;if(!l||!l.current)return;const d=l.getValue(o);d&&d.jump(this.measuredOrigin,!1);const f=c.length-1,m=c[f];c[f]=Li[o](l.measureViewportBox(),window.getComputedStyle(l.current)),m!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=m),!((s=this.removedTransforms)===null||s===void 0)&&s.length&&this.removedTransforms.forEach(([p,v])=>{l.getValue(p).set(v)}),this.resolveNoneKeyframes()}}const Cv=(n,s)=>s==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(rs.test(n)||n==="0")&&!n.startsWith("url("));function j2(n){const s=n[0];if(n.length===1)return!0;for(let l=0;l<n.length;l++)if(n[l]!==s)return!0}function C2(n,s,l,o){const c=n[0];if(c===null)return!1;if(s==="display"||s==="visibility")return!0;const d=n[n.length-1],f=Cv(c,s),m=Cv(d,s);return!f||!m?!1:j2(n)||(l==="spring"||qf(l))&&o}const A2=n=>n!==null;function lc(n,{repeat:s,repeatType:l="loop"},o){const c=n.filter(A2),d=s&&l!=="loop"&&s%2===1?0:c.length-1;return!d||o===void 0?c[d]:o}const N2=40;class fb{constructor({autoplay:s=!0,delay:l=0,type:o="keyframes",repeat:c=0,repeatDelay:d=0,repeatType:f="loop",...m}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=la.now(),this.options={autoplay:s,delay:l,type:o,repeat:c,repeatDelay:d,repeatType:f,...m},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>N2?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&x2(),this._resolved}onKeyframesResolved(s,l){this.resolvedAt=la.now(),this.hasAttemptedResolve=!0;const{name:o,type:c,velocity:d,delay:f,onComplete:m,onUpdate:p,isGenerator:v}=this.options;if(!v&&!C2(s,o,c,d))if(f)this.options.duration=0;else{p&&p(lc(s,this.options,l)),m&&m(),this.resolveFinishedPromise();return}const y=this.initPlayback(s,l);y!==!1&&(this._resolved={keyframes:s,finalKeyframe:l,...y},this.onPostResolved())}onPostResolved(){}then(s,l){return this.currentFinishedPromise.then(s,l)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(s=>{this.resolveFinishedPromise=s})}}const ef=2e4;function hb(n){let s=0;const l=50;let o=n.next(s);for(;!o.done&&s<ef;)s+=l,o=n.next(s);return s>=ef?1/0:s}const mt=(n,s,l)=>n+(s-n)*l;function jd(n,s,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?n+(s-n)*6*l:l<1/2?s:l<2/3?n+(s-n)*(2/3-l)*6:n}function w2({hue:n,saturation:s,lightness:l,alpha:o}){n/=360,s/=100,l/=100;let c=0,d=0,f=0;if(!s)c=d=f=l;else{const m=l<.5?l*(1+s):l+s-l*s,p=2*l-m;c=jd(p,m,n+1/3),d=jd(p,m,n),f=jd(p,m,n-1/3)}return{red:Math.round(c*255),green:Math.round(d*255),blue:Math.round(f*255),alpha:o}}function qr(n,s){return l=>l>0?s:n}const Cd=(n,s,l)=>{const o=n*n,c=l*(s*s-o)+o;return c<0?0:Math.sqrt(c)},D2=[Fd,Ms,Ni],k2=n=>D2.find(s=>s.test(n));function Av(n){const s=k2(n);if(!s)return!1;let l=s.parse(n);return s===Ni&&(l=w2(l)),l}const Nv=(n,s)=>{const l=Av(n),o=Av(s);if(!l||!o)return qr(n,s);const c={...l};return d=>(c.red=Cd(l.red,o.red,d),c.green=Cd(l.green,o.green,d),c.blue=Cd(l.blue,o.blue,d),c.alpha=mt(l.alpha,o.alpha,d),Ms.transform(c))},R2=(n,s)=>l=>s(n(l)),oo=(...n)=>n.reduce(R2),tf=new Set(["none","hidden"]);function M2(n,s){return tf.has(n)?l=>l<=0?n:s:l=>l>=1?s:n}function O2(n,s){return l=>mt(n,s,l)}function Jf(n){return typeof n=="number"?O2:typeof n=="string"?Rf(n)?qr:Xt.test(n)?Nv:U2:Array.isArray(n)?mb:typeof n=="object"?Xt.test(n)?Nv:B2:qr}function mb(n,s){const l=[...n],o=l.length,c=n.map((d,f)=>Jf(d)(d,s[f]));return d=>{for(let f=0;f<o;f++)l[f]=c[f](d);return l}}function B2(n,s){const l={...n,...s},o={};for(const c in l)n[c]!==void 0&&s[c]!==void 0&&(o[c]=Jf(n[c])(n[c],s[c]));return c=>{for(const d in o)l[d]=o[d](c);return l}}function L2(n,s){var l;const o=[],c={color:0,var:0,number:0};for(let d=0;d<s.values.length;d++){const f=s.types[d],m=n.indexes[f][c[f]],p=(l=n.values[m])!==null&&l!==void 0?l:0;o[d]=p,c[f]++}return o}const U2=(n,s)=>{const l=rs.createTransformer(s),o=eo(n),c=eo(s);return o.indexes.var.length===c.indexes.var.length&&o.indexes.color.length===c.indexes.color.length&&o.indexes.number.length>=c.indexes.number.length?tf.has(n)&&!c.values.length||tf.has(s)&&!o.values.length?M2(n,s):oo(mb(L2(o,c),c.values),l):qr(n,s)};function pb(n,s,l){return typeof n=="number"&&typeof s=="number"&&typeof l=="number"?mt(n,s,l):Jf(n)(n,s)}const z2=5;function gb(n,s,l){const o=Math.max(s-z2,0);return V0(l-n(o),s-o)}const bt={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},Ad=.001;function V2({duration:n=bt.duration,bounce:s=bt.bounce,velocity:l=bt.velocity,mass:o=bt.mass}){let c,d,f=1-s;f=ka(bt.minDamping,bt.maxDamping,f),n=ka(bt.minDuration,bt.maxDuration,wa(n)),f<1?(c=v=>{const y=v*f,b=y*n,_=y-l,T=nf(v,f),N=Math.exp(-b);return Ad-_/T*N},d=v=>{const b=v*f*n,_=b*l+l,T=Math.pow(f,2)*Math.pow(v,2)*n,N=Math.exp(-b),D=nf(Math.pow(v,2),f);return(-c(v)+Ad>0?-1:1)*((_-T)*N)/D}):(c=v=>{const y=Math.exp(-v*n),b=(v-l)*n+1;return-Ad+y*b},d=v=>{const y=Math.exp(-v*n),b=(l-v)*(n*n);return y*b});const m=5/n,p=G2(c,d,m);if(n=Na(n),isNaN(p))return{stiffness:bt.stiffness,damping:bt.damping,duration:n};{const v=Math.pow(p,2)*o;return{stiffness:v,damping:f*2*Math.sqrt(o*v),duration:n}}}const H2=12;function G2(n,s,l){let o=l;for(let c=1;c<H2;c++)o=o-n(o)/s(o);return o}function nf(n,s){return n*Math.sqrt(1-s*s)}const I2=["duration","bounce"],P2=["stiffness","damping","mass"];function wv(n,s){return s.some(l=>n[l]!==void 0)}function q2(n){let s={velocity:bt.velocity,stiffness:bt.stiffness,damping:bt.damping,mass:bt.mass,isResolvedFromDuration:!1,...n};if(!wv(n,P2)&&wv(n,I2))if(n.visualDuration){const l=n.visualDuration,o=2*Math.PI/(l*1.2),c=o*o,d=2*ka(.05,1,1-(n.bounce||0))*Math.sqrt(c);s={...s,mass:bt.mass,stiffness:c,damping:d}}else{const l=V2(n);s={...s,...l,mass:bt.mass},s.isResolvedFromDuration=!0}return s}function vb(n=bt.visualDuration,s=bt.bounce){const l=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:s}:n;let{restSpeed:o,restDelta:c}=l;const d=l.keyframes[0],f=l.keyframes[l.keyframes.length-1],m={done:!1,value:d},{stiffness:p,damping:v,mass:y,duration:b,velocity:_,isResolvedFromDuration:T}=q2({...l,velocity:-wa(l.velocity||0)}),N=_||0,D=v/(2*Math.sqrt(p*y)),w=f-d,C=wa(Math.sqrt(p/y)),H=Math.abs(w)<5;o||(o=H?bt.restSpeed.granular:bt.restSpeed.default),c||(c=H?bt.restDelta.granular:bt.restDelta.default);let O;if(D<1){const G=nf(C,D);O=W=>{const ee=Math.exp(-D*C*W);return f-ee*((N+D*C*w)/G*Math.sin(G*W)+w*Math.cos(G*W))}}else if(D===1)O=G=>f-Math.exp(-C*G)*(w+(N+C*w)*G);else{const G=C*Math.sqrt(D*D-1);O=W=>{const ee=Math.exp(-D*C*W),$=Math.min(G*W,300);return f-ee*((N+D*C*w)*Math.sinh($)+G*w*Math.cosh($))/G}}const F={calculatedDuration:T&&b||null,next:G=>{const W=O(G);if(T)m.done=G>=b;else{let ee=0;D<1&&(ee=G===0?Na(N):gb(O,G,W));const $=Math.abs(ee)<=o,ae=Math.abs(f-W)<=c;m.done=$&&ae}return m.value=m.done?f:W,m},toString:()=>{const G=Math.min(hb(F),ef),W=G0(ee=>F.next(G*ee).value,G,30);return G+"ms "+W}};return F}function Dv({keyframes:n,velocity:s=0,power:l=.8,timeConstant:o=325,bounceDamping:c=10,bounceStiffness:d=500,modifyTarget:f,min:m,max:p,restDelta:v=.5,restSpeed:y}){const b=n[0],_={done:!1,value:b},T=$=>m!==void 0&&$<m||p!==void 0&&$>p,N=$=>m===void 0?p:p===void 0||Math.abs(m-$)<Math.abs(p-$)?m:p;let D=l*s;const w=b+D,C=f===void 0?w:f(w);C!==w&&(D=C-b);const H=$=>-D*Math.exp(-$/o),O=$=>C+H($),F=$=>{const ae=H($),_e=O($);_.done=Math.abs(ae)<=v,_.value=_.done?C:_e};let G,W;const ee=$=>{T(_.value)&&(G=$,W=vb({keyframes:[_.value,N(_.value)],velocity:gb(O,$,_.value),damping:c,stiffness:d,restDelta:v,restSpeed:y}))};return ee(0),{calculatedDuration:null,next:$=>{let ae=!1;return!W&&G===void 0&&(ae=!0,F($),ee($)),G!==void 0&&$>=G?W.next($-G):(!ae&&F($),_)}}}const Y2=lo(.42,0,1,1),K2=lo(0,0,.58,1),yb=lo(.42,0,.58,1),Z2=n=>Array.isArray(n)&&typeof n[0]!="number",X2={linear:_n,easeIn:Y2,easeInOut:yb,easeOut:K2,circIn:Zf,circInOut:Q0,circOut:F0,backIn:Kf,backInOut:X0,backOut:Z0,anticipate:$0},kv=n=>{if(Yf(n)){y0(n.length===4);const[s,l,o,c]=n;return lo(s,l,o,c)}else if(typeof n=="string")return X2[n];return n};function $2(n,s,l){const o=[],c=l||pb,d=n.length-1;for(let f=0;f<d;f++){let m=c(n[f],n[f+1]);if(s){const p=Array.isArray(s)?s[f]||_n:s;m=oo(p,m)}o.push(m)}return o}function F2(n,s,{clamp:l=!0,ease:o,mixer:c}={}){const d=n.length;if(y0(d===s.length),d===1)return()=>s[0];if(d===2&&s[0]===s[1])return()=>s[1];const f=n[0]===n[1];n[0]>n[d-1]&&(n=[...n].reverse(),s=[...s].reverse());const m=$2(s,o,c),p=m.length,v=y=>{if(f&&y<n[0])return s[0];let b=0;if(p>1)for(;b<n.length-2&&!(y<n[b+1]);b++);const _=Bi(n[b],n[b+1],y);return m[b](_)};return l?y=>v(ka(n[0],n[d-1],y)):v}function Q2(n,s){const l=n[n.length-1];for(let o=1;o<=s;o++){const c=Bi(0,s,o);n.push(mt(l,1,c))}}function J2(n){const s=[0];return Q2(s,n.length-1),s}function W2(n,s){return n.map(l=>l*s)}function ej(n,s){return n.map(()=>s||yb).splice(0,n.length-1)}function Yr({duration:n=300,keyframes:s,times:l,ease:o="easeInOut"}){const c=Z2(o)?o.map(kv):kv(o),d={done:!1,value:s[0]},f=W2(l&&l.length===s.length?l:J2(s),n),m=F2(f,s,{ease:Array.isArray(c)?c:ej(s,c)});return{calculatedDuration:n,next:p=>(d.value=m(p),d.done=p>=n,d)}}const tj=n=>{const s=({timestamp:l})=>n(l);return{start:()=>ot.update(s,!0),stop:()=>os(s),now:()=>qt.isProcessing?qt.timestamp:la.now()}},nj={decay:Dv,inertia:Dv,tween:Yr,keyframes:Yr,spring:vb},aj=n=>n/100;class Wf extends fb{constructor(s){super(s),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:p}=this.options;p&&p()};const{name:l,motionValue:o,element:c,keyframes:d}=this.options,f=(c==null?void 0:c.KeyframeResolver)||Qf,m=(p,v)=>this.onKeyframesResolved(p,v);this.resolver=new f(d,m,l,o,c),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(s){const{type:l="keyframes",repeat:o=0,repeatDelay:c=0,repeatType:d,velocity:f=0}=this.options,m=qf(l)?l:nj[l]||Yr;let p,v;m!==Yr&&typeof s[0]!="number"&&(p=oo(aj,pb(s[0],s[1])),s=[0,100]);const y=m({...this.options,keyframes:s});d==="mirror"&&(v=m({...this.options,keyframes:[...s].reverse(),velocity:-f})),y.calculatedDuration===null&&(y.calculatedDuration=hb(y));const{calculatedDuration:b}=y,_=b+c,T=_*(o+1)-c;return{generator:y,mirroredGenerator:v,mapPercentToKeyframes:p,calculatedDuration:b,resolvedDuration:_,totalDuration:T}}onPostResolved(){const{autoplay:s=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!s?this.pause():this.state=this.pendingPlayState}tick(s,l=!1){const{resolved:o}=this;if(!o){const{keyframes:$}=this.options;return{done:!0,value:$[$.length-1]}}const{finalKeyframe:c,generator:d,mirroredGenerator:f,mapPercentToKeyframes:m,keyframes:p,calculatedDuration:v,totalDuration:y,resolvedDuration:b}=o;if(this.startTime===null)return d.next(0);const{delay:_,repeat:T,repeatType:N,repeatDelay:D,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,s):this.speed<0&&(this.startTime=Math.min(s-y/this.speed,this.startTime)),l?this.currentTime=s:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(s-this.startTime)*this.speed;const C=this.currentTime-_*(this.speed>=0?1:-1),H=this.speed>=0?C<0:C>y;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=y);let O=this.currentTime,F=d;if(T){const $=Math.min(this.currentTime,y)/b;let ae=Math.floor($),_e=$%1;!_e&&$>=1&&(_e=1),_e===1&&ae--,ae=Math.min(ae,T+1),!!(ae%2)&&(N==="reverse"?(_e=1-_e,D&&(_e-=D/b)):N==="mirror"&&(F=f)),O=ka(0,1,_e)*b}const G=H?{done:!1,value:p[0]}:F.next(O);m&&(G.value=m(G.value));let{done:W}=G;!H&&v!==null&&(W=this.speed>=0?this.currentTime>=y:this.currentTime<=0);const ee=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&W);return ee&&c!==void 0&&(G.value=lc(p,this.options,c)),w&&w(G.value),ee&&this.finish(),G}get duration(){const{resolved:s}=this;return s?wa(s.calculatedDuration):0}get time(){return wa(this.currentTime)}set time(s){s=Na(s),this.currentTime=s,this.holdTime!==null||this.speed===0?this.holdTime=s:this.driver&&(this.startTime=this.driver.now()-s/this.speed)}get speed(){return this.playbackSpeed}set speed(s){const l=this.playbackSpeed!==s;this.playbackSpeed=s,l&&(this.time=wa(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:s=tj,onPlay:l,startTime:o}=this.options;this.driver||(this.driver=s(d=>this.tick(d))),l&&l();const c=this.driver.now();this.holdTime!==null?this.startTime=c-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=c):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 s;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(s=this.currentTime)!==null&&s!==void 0?s:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:s}=this.options;s&&s()}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(s){return this.startTime=0,this.tick(s,!0)}}const sj=new Set(["opacity","clipPath","filter","transform"]);function ij(n,s,l,{delay:o=0,duration:c=300,repeat:d=0,repeatType:f="loop",ease:m="easeInOut",times:p}={}){const v={[s]:l};p&&(v.offset=p);const y=P0(m,c);return Array.isArray(y)&&(v.easing=y),n.animate(v,{delay:o,duration:c,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:d+1,direction:f==="reverse"?"alternate":"normal"})}const lj=Pf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Kr=10,oj=2e4;function rj(n){return qf(n.type)||n.type==="spring"||!I0(n.ease)}function cj(n,s){const l=new Wf({...s,keyframes:n,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:n[0]};const c=[];let d=0;for(;!o.done&&d<oj;)o=l.sample(d),c.push(o.value),d+=Kr;return{times:void 0,keyframes:c,duration:d-Kr,ease:"linear"}}const bb={anticipate:$0,backInOut:X0,circInOut:Q0};function uj(n){return n in bb}class Rv extends fb{constructor(s){super(s);const{name:l,motionValue:o,element:c,keyframes:d}=this.options;this.resolver=new db(d,(f,m)=>this.onKeyframesResolved(f,m),l,o,c),this.resolver.scheduleResolve()}initPlayback(s,l){let{duration:o=300,times:c,ease:d,type:f,motionValue:m,name:p,startTime:v}=this.options;if(!m.owner||!m.owner.current)return!1;if(typeof d=="string"&&Pr()&&uj(d)&&(d=bb[d]),rj(this.options)){const{onComplete:b,onUpdate:_,motionValue:T,element:N,...D}=this.options,w=cj(s,D);s=w.keyframes,s.length===1&&(s[1]=s[0]),o=w.duration,c=w.times,d=w.ease,f="keyframes"}const y=ij(m.owner.current,p,s,{...this.options,duration:o,times:c,ease:d});return y.startTime=v??this.calcStartTime(),this.pendingTimeline?(Sv(y,this.pendingTimeline),this.pendingTimeline=void 0):y.onfinish=()=>{const{onComplete:b}=this.options;m.set(lc(s,this.options,l)),b&&b(),this.cancel(),this.resolveFinishedPromise()},{animation:y,duration:o,times:c,type:f,ease:d,keyframes:s}}get duration(){const{resolved:s}=this;if(!s)return 0;const{duration:l}=s;return wa(l)}get time(){const{resolved:s}=this;if(!s)return 0;const{animation:l}=s;return wa(l.currentTime||0)}set time(s){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.currentTime=Na(s)}get speed(){const{resolved:s}=this;if(!s)return 1;const{animation:l}=s;return l.playbackRate}set speed(s){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.playbackRate=s}get state(){const{resolved:s}=this;if(!s)return"idle";const{animation:l}=s;return l.playState}get startTime(){const{resolved:s}=this;if(!s)return null;const{animation:l}=s;return l.startTime}attachTimeline(s){if(!this._resolved)this.pendingTimeline=s;else{const{resolved:l}=this;if(!l)return _n;const{animation:o}=l;Sv(o,s)}return _n}play(){if(this.isStopped)return;const{resolved:s}=this;if(!s)return;const{animation:l}=s;l.playState==="finished"&&this.updateFinishedPromise(),l.play()}pause(){const{resolved:s}=this;if(!s)return;const{animation:l}=s;l.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:s}=this;if(!s)return;const{animation:l,keyframes:o,duration:c,type:d,ease:f,times:m}=s;if(l.playState==="idle"||l.playState==="finished")return;if(this.time){const{motionValue:v,onUpdate:y,onComplete:b,element:_,...T}=this.options,N=new Wf({...T,keyframes:o,duration:c,type:d,ease:f,times:m,isGenerator:!0}),D=Na(this.time);v.setWithVelocity(N.sample(D-Kr).value,N.sample(D).value,Kr)}const{onStop:p}=this.options;p&&p(),this.cancel()}complete(){const{resolved:s}=this;s&&s.animation.finish()}cancel(){const{resolved:s}=this;s&&s.animation.cancel()}static supports(s){const{motionValue:l,name:o,repeatDelay:c,repeatType:d,damping:f,type:m}=s;if(!l||!l.owner||!(l.owner.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:v}=l.owner.getProps();return lj()&&o&&sj.has(o)&&!p&&!v&&!c&&d!=="mirror"&&f!==0&&m!=="inertia"}}const dj={type:"spring",stiffness:500,damping:25,restSpeed:10},fj=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),hj={type:"keyframes",duration:.8},mj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pj=(n,{keyframes:s})=>s.length>2?hj:Vs.has(n)?n.startsWith("scale")?fj(s[1]):dj:mj;function gj({when:n,delay:s,delayChildren:l,staggerChildren:o,staggerDirection:c,repeat:d,repeatType:f,repeatDelay:m,from:p,elapsed:v,...y}){return!!Object.keys(y).length}const eh=(n,s,l,o={},c,d)=>f=>{const m=Vf(o,n)||{},p=m.delay||o.delay||0;let{elapsed:v=0}=o;v=v-Na(p);let y={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:s.getVelocity(),...m,delay:-v,onUpdate:_=>{s.set(_),m.onUpdate&&m.onUpdate(_)},onComplete:()=>{f(),m.onComplete&&m.onComplete()},name:n,motionValue:s,element:d?void 0:c};gj(m)||(y={...y,...pj(n,y)}),y.duration&&(y.duration=Na(y.duration)),y.repeatDelay&&(y.repeatDelay=Na(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let b=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(y.duration=0,y.delay===0&&(b=!0)),b&&!d&&s.get()!==void 0){const _=lc(y.keyframes,m);if(_!==void 0)return ot.update(()=>{y.onUpdate(_),y.onComplete()}),new XE([])}return!d&&Rv.supports(y)?new Rv(y):new Wf(y)};function vj({protectedKeys:n,needsAnimating:s},l){const o=n.hasOwnProperty(l)&&s[l]!==!0;return s[l]=!1,o}function Sb(n,s,{delay:l=0,transitionOverride:o,type:c}={}){var d;let{transition:f=n.getDefaultTransition(),transitionEnd:m,...p}=s;o&&(f=o);const v=[],y=c&&n.animationState&&n.animationState.getState()[c];for(const b in p){const _=n.getValue(b,(d=n.latestValues[b])!==null&&d!==void 0?d:null),T=p[b];if(T===void 0||y&&vj(y,b))continue;const N={delay:l,...Vf(f||{},b)};let D=!1;if(window.MotionHandoffAnimation){const C=H0(n);if(C){const H=window.MotionHandoffAnimation(C,b,ot);H!==null&&(N.startTime=H,D=!0)}}Xd(n,b),_.start(eh(b,_,T,n.shouldReduceMotion&&z0.has(b)?{type:!1}:N,n,D));const w=_.animation;w&&v.push(w)}return m&&Promise.all(v).then(()=>{ot.update(()=>{m&&qE(n,m)})}),v}function af(n,s,l={}){var o;const c=ic(n,s,l.type==="exit"?(o=n.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:d=n.getDefaultTransition()||{}}=c||{};l.transitionOverride&&(d=l.transitionOverride);const f=c?()=>Promise.all(Sb(n,c,l)):()=>Promise.resolve(),m=n.variantChildren&&n.variantChildren.size?(v=0)=>{const{delayChildren:y=0,staggerChildren:b,staggerDirection:_}=d;return yj(n,s,y+v,b,_,l)}:()=>Promise.resolve(),{when:p}=d;if(p){const[v,y]=p==="beforeChildren"?[f,m]:[m,f];return v().then(()=>y())}else return Promise.all([f(),m(l.delay)])}function yj(n,s,l=0,o=0,c=1,d){const f=[],m=(n.variantChildren.size-1)*o,p=c===1?(v=0)=>v*o:(v=0)=>m-v*o;return Array.from(n.variantChildren).sort(bj).forEach((v,y)=>{v.notify("AnimationStart",s),f.push(af(v,s,{...d,delay:l+p(y)}).then(()=>v.notify("AnimationComplete",s)))}),Promise.all(f)}function bj(n,s){return n.sortNodePosition(s)}function Sj(n,s,l={}){n.notify("AnimationStart",s);let o;if(Array.isArray(s)){const c=s.map(d=>af(n,d,l));o=Promise.all(c)}else if(typeof s=="string")o=af(n,s,l);else{const c=typeof s=="function"?ic(n,s,l.custom):s;o=Promise.all(Sb(n,c,l))}return o.then(()=>{n.notify("AnimationComplete",s)})}const xj=Af.length;function xb(n){if(!n)return;if(!n.isControllingVariants){const l=n.parent?xb(n.parent)||{}:{};return n.props.initial!==void 0&&(l.initial=n.props.initial),l}const s={};for(let l=0;l<xj;l++){const o=Af[l],c=n.props[o];(Ql(c)||c===!1)&&(s[o]=c)}return s}const _j=[...Cf].reverse(),Tj=Cf.length;function Ej(n){return s=>Promise.all(s.map(({animation:l,options:o})=>Sj(n,l,o)))}function jj(n){let s=Ej(n),l=Mv(),o=!0;const c=p=>(v,y)=>{var b;const _=ic(n,y,p==="exit"?(b=n.presenceContext)===null||b===void 0?void 0:b.custom:void 0);if(_){const{transition:T,transitionEnd:N,...D}=_;v={...v,...D,...N}}return v};function d(p){s=p(n)}function f(p){const{props:v}=n,y=xb(n.parent)||{},b=[],_=new Set;let T={},N=1/0;for(let w=0;w<Tj;w++){const C=_j[w],H=l[C],O=v[C]!==void 0?v[C]:y[C],F=Ql(O),G=C===p?H.isActive:null;G===!1&&(N=w);let W=O===y[C]&&O!==v[C]&&F;if(W&&o&&n.manuallyAnimateOnMount&&(W=!1),H.protectedKeys={...T},!H.isActive&&G===null||!O&&!H.prevProp||ac(O)||typeof O=="boolean")continue;const ee=Cj(H.prevProp,O);let $=ee||C===p&&H.isActive&&!W&&F||w>N&&F,ae=!1;const _e=Array.isArray(O)?O:[O];let L=_e.reduce(c(C),{});G===!1&&(L={});const{prevResolvedValues:be={}}=H,te={...be,...L},Be=K=>{$=!0,_.has(K)&&(ae=!0,_.delete(K)),H.needsAnimating[K]=!0;const V=n.getValue(K);V&&(V.liveStyle=!1)};for(const K in te){const V=L[K],pe=be[K];if(T.hasOwnProperty(K))continue;let ie=!1;Zd(V)&&Zd(pe)?ie=!U0(V,pe):ie=V!==pe,ie?V!=null?Be(K):_.add(K):V!==void 0&&_.has(K)?Be(K):H.protectedKeys[K]=!0}H.prevProp=O,H.prevResolvedValues=L,H.isActive&&(T={...T,...L}),o&&n.blockInitialAnimation&&($=!1),$&&(!(W&&ee)||ae)&&b.push(..._e.map(K=>({animation:K,options:{type:C}})))}if(_.size){const w={};_.forEach(C=>{const H=n.getBaseTarget(C),O=n.getValue(C);O&&(O.liveStyle=!0),w[C]=H??null}),b.push({animation:w})}let D=!!b.length;return o&&(v.initial===!1||v.initial===v.animate)&&!n.manuallyAnimateOnMount&&(D=!1),o=!1,D?s(b):Promise.resolve()}function m(p,v){var y;if(l[p].isActive===v)return Promise.resolve();(y=n.variantChildren)===null||y===void 0||y.forEach(_=>{var T;return(T=_.animationState)===null||T===void 0?void 0:T.setActive(p,v)}),l[p].isActive=v;const b=f(p);for(const _ in l)l[_].protectedKeys={};return b}return{animateChanges:f,setActive:m,setAnimateFunction:d,getState:()=>l,reset:()=>{l=Mv(),o=!0}}}function Cj(n,s){return typeof s=="string"?s!==n:Array.isArray(s)?!U0(s,n):!1}function ws(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mv(){return{animate:ws(!0),whileInView:ws(),whileHover:ws(),whileTap:ws(),whileDrag:ws(),whileFocus:ws(),exit:ws()}}class cs{constructor(s){this.isMounted=!1,this.node=s}update(){}}class Aj extends cs{constructor(s){super(s),s.animationState||(s.animationState=jj(s))}updateAnimationControlsSubscription(){const{animate:s}=this.node.getProps();ac(s)&&(this.unmountControls=s.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:s}=this.node.getProps(),{animate:l}=this.node.prevProps||{};s!==l&&this.updateAnimationControlsSubscription()}unmount(){var s;this.node.animationState.reset(),(s=this.unmountControls)===null||s===void 0||s.call(this)}}let Nj=0;class wj extends cs{constructor(){super(...arguments),this.id=Nj++}update(){if(!this.node.presenceContext)return;const{isPresent:s,onExitComplete:l}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||s===o)return;const c=this.node.animationState.setActive("exit",!s);l&&!s&&c.then(()=>l(this.id))}mount(){const{register:s}=this.node.presenceContext||{};s&&(this.unmount=s(this.id))}unmount(){}}const Dj={animation:{Feature:Aj},exit:{Feature:wj}},$n={x:!1,y:!1};function _b(){return $n.x||$n.y}function kj(n){return n==="x"||n==="y"?$n[n]?null:($n[n]=!0,()=>{$n[n]=!1}):$n.x||$n.y?null:($n.x=$n.y=!0,()=>{$n.x=$n.y=!1})}const th=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function to(n,s,l,o={passive:!0}){return n.addEventListener(s,l,o),()=>n.removeEventListener(s,l)}function ro(n){return{point:{x:n.pageX,y:n.pageY}}}const Rj=n=>s=>th(s)&&n(s,ro(s));function Yl(n,s,l,o){return to(n,s,Rj(l),o)}const Ov=(n,s)=>Math.abs(n-s);function Mj(n,s){const l=Ov(n.x,s.x),o=Ov(n.y,s.y);return Math.sqrt(l**2+o**2)}class Tb{constructor(s,l,{transformPagePoint:o,contextWindow:c,dragSnapToOrigin:d=!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 b=wd(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,T=Mj(b.offset,{x:0,y:0})>=3;if(!_&&!T)return;const{point:N}=b,{timestamp:D}=qt;this.history.push({...N,timestamp:D});const{onStart:w,onMove:C}=this.handlers;_||(w&&w(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,b)},this.handlePointerMove=(b,_)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Nd(_,this.transformPagePoint),ot.update(this.updatePoint,!0)},this.handlePointerUp=(b,_)=>{this.end();const{onEnd:T,onSessionEnd:N,resumeAnimation:D}=this.handlers;if(this.dragSnapToOrigin&&D&&D(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=wd(b.type==="pointercancel"?this.lastMoveEventInfo:Nd(_,this.transformPagePoint),this.history);this.startEvent&&T&&T(b,w),N&&N(b,w)},!th(s))return;this.dragSnapToOrigin=d,this.handlers=l,this.transformPagePoint=o,this.contextWindow=c||window;const f=ro(s),m=Nd(f,this.transformPagePoint),{point:p}=m,{timestamp:v}=qt;this.history=[{...p,timestamp:v}];const{onSessionStart:y}=l;y&&y(s,wd(m,this.history)),this.removeListeners=oo(Yl(this.contextWindow,"pointermove",this.handlePointerMove),Yl(this.contextWindow,"pointerup",this.handlePointerUp),Yl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(s){this.handlers=s}end(){this.removeListeners&&this.removeListeners(),os(this.updatePoint)}}function Nd(n,s){return s?{point:s(n.point)}:n}function Bv(n,s){return{x:n.x-s.x,y:n.y-s.y}}function wd({point:n},s){return{point:n,delta:Bv(n,Eb(s)),offset:Bv(n,Oj(s)),velocity:Bj(s,.1)}}function Oj(n){return n[0]}function Eb(n){return n[n.length-1]}function Bj(n,s){if(n.length<2)return{x:0,y:0};let l=n.length-1,o=null;const c=Eb(n);for(;l>=0&&(o=n[l],!(c.timestamp-o.timestamp>Na(s)));)l--;if(!o)return{x:0,y:0};const d=wa(c.timestamp-o.timestamp);if(d===0)return{x:0,y:0};const f={x:(c.x-o.x)/d,y:(c.y-o.y)/d};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}const jb=1e-4,Lj=1-jb,Uj=1+jb,Cb=.01,zj=0-Cb,Vj=0+Cb;function Tn(n){return n.max-n.min}function Hj(n,s,l){return Math.abs(n-s)<=l}function Lv(n,s,l,o=.5){n.origin=o,n.originPoint=mt(s.min,s.max,n.origin),n.scale=Tn(l)/Tn(s),n.translate=mt(l.min,l.max,n.origin)-n.originPoint,(n.scale>=Lj&&n.scale<=Uj||isNaN(n.scale))&&(n.scale=1),(n.translate>=zj&&n.translate<=Vj||isNaN(n.translate))&&(n.translate=0)}function Kl(n,s,l,o){Lv(n.x,s.x,l.x,o?o.originX:void 0),Lv(n.y,s.y,l.y,o?o.originY:void 0)}function Uv(n,s,l){n.min=l.min+s.min,n.max=n.min+Tn(s)}function Gj(n,s,l){Uv(n.x,s.x,l.x),Uv(n.y,s.y,l.y)}function zv(n,s,l){n.min=s.min-l.min,n.max=n.min+Tn(s)}function Zl(n,s,l){zv(n.x,s.x,l.x),zv(n.y,s.y,l.y)}function Ij(n,{min:s,max:l},o){return s!==void 0&&n<s?n=o?mt(s,n,o.min):Math.max(n,s):l!==void 0&&n>l&&(n=o?mt(l,n,o.max):Math.min(n,l)),n}function Vv(n,s,l){return{min:s!==void 0?n.min+s:void 0,max:l!==void 0?n.max+l-(n.max-n.min):void 0}}function Pj(n,{top:s,left:l,bottom:o,right:c}){return{x:Vv(n.x,l,c),y:Vv(n.y,s,o)}}function Hv(n,s){let l=s.min-n.min,o=s.max-n.max;return s.max-s.min<n.max-n.min&&([l,o]=[o,l]),{min:l,max:o}}function qj(n,s){return{x:Hv(n.x,s.x),y:Hv(n.y,s.y)}}function Yj(n,s){let l=.5;const o=Tn(n),c=Tn(s);return c>o?l=Bi(s.min,s.max-o,n.min):o>c&&(l=Bi(n.min,n.max-c,s.min)),ka(0,1,l)}function Kj(n,s){const l={};return s.min!==void 0&&(l.min=s.min-n.min),s.max!==void 0&&(l.max=s.max-n.min),l}const sf=.35;function Zj(n=sf){return n===!1?n=0:n===!0&&(n=sf),{x:Gv(n,"left","right"),y:Gv(n,"top","bottom")}}function Gv(n,s,l){return{min:Iv(n,s),max:Iv(n,l)}}function Iv(n,s){return typeof n=="number"?n:n[s]||0}const Pv=()=>({translate:0,scale:1,origin:0,originPoint:0}),wi=()=>({x:Pv(),y:Pv()}),qv=()=>({min:0,max:0}),Ct=()=>({x:qv(),y:qv()});function Un(n){return[n("x"),n("y")]}function Ab({top:n,left:s,right:l,bottom:o}){return{x:{min:s,max:l},y:{min:n,max:o}}}function Xj({x:n,y:s}){return{top:s.min,right:n.max,bottom:s.max,left:n.min}}function $j(n,s){if(!s)return n;const l=s({x:n.left,y:n.top}),o=s({x:n.right,y:n.bottom});return{top:l.y,left:l.x,bottom:o.y,right:o.x}}function Dd(n){return n===void 0||n===1}function lf({scale:n,scaleX:s,scaleY:l}){return!Dd(n)||!Dd(s)||!Dd(l)}function ks(n){return lf(n)||Nb(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function Nb(n){return Yv(n.x)||Yv(n.y)}function Yv(n){return n&&n!=="0%"}function Zr(n,s,l){const o=n-l,c=s*o;return l+c}function Kv(n,s,l,o,c){return c!==void 0&&(n=Zr(n,c,o)),Zr(n,l,o)+s}function of(n,s=0,l=1,o,c){n.min=Kv(n.min,s,l,o,c),n.max=Kv(n.max,s,l,o,c)}function wb(n,{x:s,y:l}){of(n.x,s.translate,s.scale,s.originPoint),of(n.y,l.translate,l.scale,l.originPoint)}const Zv=.999999999999,Xv=1.0000000000001;function Fj(n,s,l,o=!1){const c=l.length;if(!c)return;s.x=s.y=1;let d,f;for(let m=0;m<c;m++){d=l[m],f=d.projectionDelta;const{visualElement:p}=d.options;p&&p.props.style&&p.props.style.display==="contents"||(o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&ki(n,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),f&&(s.x*=f.x.scale,s.y*=f.y.scale,wb(n,f)),o&&ks(d.latestValues)&&ki(n,d.latestValues))}s.x<Xv&&s.x>Zv&&(s.x=1),s.y<Xv&&s.y>Zv&&(s.y=1)}function Di(n,s){n.min=n.min+s,n.max=n.max+s}function $v(n,s,l,o,c=.5){const d=mt(n.min,n.max,c);of(n,s,l,d,o)}function ki(n,s){$v(n.x,s.x,s.scaleX,s.scale,s.originX),$v(n.y,s.y,s.scaleY,s.scale,s.originY)}function Db(n,s){return Ab($j(n.getBoundingClientRect(),s))}function Qj(n,s,l){const o=Db(n,l),{scroll:c}=s;return c&&(Di(o.x,c.offset.x),Di(o.y,c.offset.y)),o}const kb=({current:n})=>n?n.ownerDocument.defaultView:null,Jj=new WeakMap;class Wj{constructor(s){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ct(),this.visualElement=s}start(s,{snapToCursor:l=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const c=y=>{const{dragSnapToOrigin:b}=this.getProps();b?this.pauseAnimation():this.stopAnimation(),l&&this.snapToCursor(ro(y).point)},d=(y,b)=>{const{drag:_,dragPropagation:T,onDragStart:N}=this.getProps();if(_&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=kj(_),!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),Un(w=>{let C=this.getAxisMotionValue(w).get()||0;if(ia.test(C)){const{projection:H}=this.visualElement;if(H&&H.layout){const O=H.layout.layoutBox[w];O&&(C=Tn(O)*(parseFloat(C)/100))}}this.originPoint[w]=C}),N&&ot.postRender(()=>N(y,b)),Xd(this.visualElement,"transform");const{animationState:D}=this.visualElement;D&&D.setActive("whileDrag",!0)},f=(y,b)=>{const{dragPropagation:_,dragDirectionLock:T,onDirectionLock:N,onDrag:D}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:w}=b;if(T&&this.currentDirection===null){this.currentDirection=eC(w),this.currentDirection!==null&&N&&N(this.currentDirection);return}this.updateAxis("x",b.point,w),this.updateAxis("y",b.point,w),this.visualElement.render(),D&&D(y,b)},m=(y,b)=>this.stop(y,b),p=()=>Un(y=>{var b;return this.getAnimationState(y)==="paused"&&((b=this.getAxisMotionValue(y).animation)===null||b===void 0?void 0:b.play())}),{dragSnapToOrigin:v}=this.getProps();this.panSession=new Tb(s,{onSessionStart:c,onStart:d,onMove:f,onSessionEnd:m,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:v,contextWindow:kb(this.visualElement)})}stop(s,l){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:c}=l;this.startAnimation(c);const{onDragEnd:d}=this.getProps();d&&ot.postRender(()=>d(s,l))}cancel(){this.isDragging=!1;const{projection:s,animationState:l}=this.visualElement;s&&(s.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(s,l,o){const{drag:c}=this.getProps();if(!o||!Dr(s,c,this.currentDirection))return;const d=this.getAxisMotionValue(s);let f=this.originPoint[s]+o[s];this.constraints&&this.constraints[s]&&(f=Ij(f,this.constraints[s],this.elastic[s])),d.set(f)}resolveConstraints(){var s;const{dragConstraints:l,dragElastic:o}=this.getProps(),c=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)===null||s===void 0?void 0:s.layout,d=this.constraints;l&&Ai(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&c?this.constraints=Pj(c.layoutBox,l):this.constraints=!1,this.elastic=Zj(o),d!==this.constraints&&c&&this.constraints&&!this.hasMutatedConstraints&&Un(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=Kj(c.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:s,onMeasureDragConstraints:l}=this.getProps();if(!s||!Ai(s))return!1;const o=s.current,{projection:c}=this.visualElement;if(!c||!c.layout)return!1;const d=Qj(o,c.root,this.visualElement.getTransformPagePoint());let f=qj(c.layout.layoutBox,d);if(l){const m=l(Xj(f));this.hasMutatedConstraints=!!m,m&&(f=Ab(m))}return f}startAnimation(s){const{drag:l,dragMomentum:o,dragElastic:c,dragTransition:d,dragSnapToOrigin:f,onDragTransitionEnd:m}=this.getProps(),p=this.constraints||{},v=Un(y=>{if(!Dr(y,l,this.currentDirection))return;let b=p&&p[y]||{};f&&(b={min:0,max:0});const _=c?200:1e6,T=c?40:1e7,N={type:"inertia",velocity:o?s[y]:0,bounceStiffness:_,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...d,...b};return this.startAxisValueAnimation(y,N)});return Promise.all(v).then(m)}startAxisValueAnimation(s,l){const o=this.getAxisMotionValue(s);return Xd(this.visualElement,s),o.start(eh(s,o,0,l,this.visualElement,!1))}stopAnimation(){Un(s=>this.getAxisMotionValue(s).stop())}pauseAnimation(){Un(s=>{var l;return(l=this.getAxisMotionValue(s).animation)===null||l===void 0?void 0:l.pause()})}getAnimationState(s){var l;return(l=this.getAxisMotionValue(s).animation)===null||l===void 0?void 0:l.state}getAxisMotionValue(s){const l=`_drag${s.toUpperCase()}`,o=this.visualElement.getProps(),c=o[l];return c||this.visualElement.getValue(s,(o.initial?o.initial[s]:void 0)||0)}snapToCursor(s){Un(l=>{const{drag:o}=this.getProps();if(!Dr(l,o,this.currentDirection))return;const{projection:c}=this.visualElement,d=this.getAxisMotionValue(l);if(c&&c.layout){const{min:f,max:m}=c.layout.layoutBox[l];d.set(s[l]-mt(f,m,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:s,dragConstraints:l}=this.getProps(),{projection:o}=this.visualElement;if(!Ai(l)||!o||!this.constraints)return;this.stopAnimation();const c={x:0,y:0};Un(f=>{const m=this.getAxisMotionValue(f);if(m&&this.constraints!==!1){const p=m.get();c[f]=Yj({min:p,max:p},this.constraints[f])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Un(f=>{if(!Dr(f,s,null))return;const m=this.getAxisMotionValue(f),{min:p,max:v}=this.constraints[f];m.set(mt(p,v,c[f]))})}addListeners(){if(!this.visualElement.current)return;Jj.set(this.visualElement,this);const s=this.visualElement.current,l=Yl(s,"pointerdown",p=>{const{drag:v,dragListener:y=!0}=this.getProps();v&&y&&this.start(p)}),o=()=>{const{dragConstraints:p}=this.getProps();Ai(p)&&p.current&&(this.constraints=this.resolveRefConstraints())},{projection:c}=this.visualElement,d=c.addEventListener("measure",o);c&&!c.layout&&(c.root&&c.root.updateScroll(),c.updateLayout()),ot.read(o);const f=to(window,"resize",()=>this.scalePositionWithinConstraints()),m=c.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:v})=>{this.isDragging&&v&&(Un(y=>{const b=this.getAxisMotionValue(y);b&&(this.originPoint[y]+=p[y].translate,b.set(b.get()+p[y].translate))}),this.visualElement.render())}));return()=>{f(),l(),d(),m&&m()}}getProps(){const s=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:o=!1,dragPropagation:c=!1,dragConstraints:d=!1,dragElastic:f=sf,dragMomentum:m=!0}=s;return{...s,drag:l,dragDirectionLock:o,dragPropagation:c,dragConstraints:d,dragElastic:f,dragMomentum:m}}}function Dr(n,s,l){return(s===!0||s===n)&&(l===null||l===n)}function eC(n,s=10){let l=null;return Math.abs(n.y)>s?l="y":Math.abs(n.x)>s&&(l="x"),l}class tC extends cs{constructor(s){super(s),this.removeGroupControls=_n,this.removeListeners=_n,this.controls=new Wj(s)}mount(){const{dragControls:s}=this.node.getProps();s&&(this.removeGroupControls=s.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_n}unmount(){this.removeGroupControls(),this.removeListeners()}}const Fv=n=>(s,l)=>{n&&ot.postRender(()=>n(s,l))};class nC extends cs{constructor(){super(...arguments),this.removePointerDownListener=_n}onPointerDown(s){this.session=new Tb(s,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:kb(this.node)})}createPanHandlers(){const{onPanSessionStart:s,onPanStart:l,onPan:o,onPanEnd:c}=this.node.getProps();return{onSessionStart:Fv(s),onStart:Fv(l),onMove:o,onEnd:(d,f)=>{delete this.session,c&&ot.postRender(()=>c(d,f))}}}mount(){this.removePointerDownListener=Yl(this.node.current,"pointerdown",s=>this.onPointerDown(s))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Vr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Qv(n,s){return s.max===s.min?0:n/(s.max-s.min)*100}const Ll={correct:(n,s)=>{if(!s.target)return n;if(typeof n=="string")if(Te.test(n))n=parseFloat(n);else return n;const l=Qv(n,s.target.x),o=Qv(n,s.target.y);return`${l}% ${o}%`}},aC={correct:(n,{treeScale:s,projectionDelta:l})=>{const o=n,c=rs.parse(n);if(c.length>5)return o;const d=rs.createTransformer(n),f=typeof c[0]!="number"?1:0,m=l.x.scale*s.x,p=l.y.scale*s.y;c[0+f]/=m,c[1+f]/=p;const v=mt(m,p,.5);return typeof c[2+f]=="number"&&(c[2+f]/=v),typeof c[3+f]=="number"&&(c[3+f]/=v),d(c)}};class sC extends S.Component{componentDidMount(){const{visualElement:s,layoutGroup:l,switchLayoutGroup:o,layoutId:c}=this.props,{projection:d}=s;DE(iC),d&&(l.group&&l.group.add(d),o&&o.register&&c&&o.register(d),d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,onExitComplete:()=>this.safeToRemove()})),Vr.hasEverUpdated=!0}getSnapshotBeforeUpdate(s){const{layoutDependency:l,visualElement:o,drag:c,isPresent:d}=this.props,f=o.projection;return f&&(f.isPresent=d,c||s.layoutDependency!==l||l===void 0?f.willUpdate():this.safeToRemove(),s.isPresent!==d&&(d?f.promote():f.relegate()||ot.postRender(()=>{const m=f.getStack();(!m||!m.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:s}=this.props.visualElement;s&&(s.root.didUpdate(),wf.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:s,layoutGroup:l,switchLayoutGroup:o}=this.props,{projection:c}=s;c&&(c.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(c),o&&o.deregister&&o.deregister(c))}safeToRemove(){const{safeToRemove:s}=this.props;s&&s()}render(){return null}}function Rb(n){const[s,l]=g0(),o=S.useContext(_f);return h.jsx(sC,{...n,layoutGroup:o,switchLayoutGroup:S.useContext(E0),isPresent:s,safeToRemove:l})}const iC={borderRadius:{...Ll,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ll,borderTopRightRadius:Ll,borderBottomLeftRadius:Ll,borderBottomRightRadius:Ll,boxShadow:aC};function lC(n,s,l){const o=$t(n)?n:Wl(n);return o.start(eh("",o,s,l)),o.animation}function oC(n){return n instanceof SVGElement&&n.tagName!=="svg"}const rC=(n,s)=>n.depth-s.depth;class cC{constructor(){this.children=[],this.isDirty=!1}add(s){Hf(this.children,s),this.isDirty=!0}remove(s){Gf(this.children,s),this.isDirty=!0}forEach(s){this.isDirty&&this.children.sort(rC),this.isDirty=!1,this.children.forEach(s)}}function uC(n,s){const l=la.now(),o=({timestamp:c})=>{const d=c-l;d>=s&&(os(o),n(d-s))};return ot.read(o,!0),()=>os(o)}const Mb=["TopLeft","TopRight","BottomLeft","BottomRight"],dC=Mb.length,Jv=n=>typeof n=="string"?parseFloat(n):n,Wv=n=>typeof n=="number"||Te.test(n);function fC(n,s,l,o,c,d){c?(n.opacity=mt(0,l.opacity!==void 0?l.opacity:1,hC(o)),n.opacityExit=mt(s.opacity!==void 0?s.opacity:1,0,mC(o))):d&&(n.opacity=mt(s.opacity!==void 0?s.opacity:1,l.opacity!==void 0?l.opacity:1,o));for(let f=0;f<dC;f++){const m=`border${Mb[f]}Radius`;let p=ey(s,m),v=ey(l,m);if(p===void 0&&v===void 0)continue;p||(p=0),v||(v=0),p===0||v===0||Wv(p)===Wv(v)?(n[m]=Math.max(mt(Jv(p),Jv(v),o),0),(ia.test(v)||ia.test(p))&&(n[m]+="%")):n[m]=v}(s.rotate||l.rotate)&&(n.rotate=mt(s.rotate||0,l.rotate||0,o))}function ey(n,s){return n[s]!==void 0?n[s]:n.borderRadius}const hC=Ob(0,.5,F0),mC=Ob(.5,.95,_n);function Ob(n,s,l){return o=>o<n?0:o>s?1:l(Bi(n,s,o))}function ty(n,s){n.min=s.min,n.max=s.max}function Ln(n,s){ty(n.x,s.x),ty(n.y,s.y)}function ny(n,s){n.translate=s.translate,n.scale=s.scale,n.originPoint=s.originPoint,n.origin=s.origin}function ay(n,s,l,o,c){return n-=s,n=Zr(n,1/l,o),c!==void 0&&(n=Zr(n,1/c,o)),n}function pC(n,s=0,l=1,o=.5,c,d=n,f=n){if(ia.test(s)&&(s=parseFloat(s),s=mt(f.min,f.max,s/100)-f.min),typeof s!="number")return;let m=mt(d.min,d.max,o);n===d&&(m-=s),n.min=ay(n.min,s,l,m,c),n.max=ay(n.max,s,l,m,c)}function sy(n,s,[l,o,c],d,f){pC(n,s[l],s[o],s[c],s.scale,d,f)}const gC=["x","scaleX","originX"],vC=["y","scaleY","originY"];function iy(n,s,l,o){sy(n.x,s,gC,l?l.x:void 0,o?o.x:void 0),sy(n.y,s,vC,l?l.y:void 0,o?o.y:void 0)}function ly(n){return n.translate===0&&n.scale===1}function Bb(n){return ly(n.x)&&ly(n.y)}function oy(n,s){return n.min===s.min&&n.max===s.max}function yC(n,s){return oy(n.x,s.x)&&oy(n.y,s.y)}function ry(n,s){return Math.round(n.min)===Math.round(s.min)&&Math.round(n.max)===Math.round(s.max)}function Lb(n,s){return ry(n.x,s.x)&&ry(n.y,s.y)}function cy(n){return Tn(n.x)/Tn(n.y)}function uy(n,s){return n.translate===s.translate&&n.scale===s.scale&&n.originPoint===s.originPoint}class bC{constructor(){this.members=[]}add(s){Hf(this.members,s),s.scheduleRender()}remove(s){if(Gf(this.members,s),s===this.prevLead&&(this.prevLead=void 0),s===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(s){const l=this.members.findIndex(c=>s===c);if(l===0)return!1;let o;for(let c=l;c>=0;c--){const d=this.members[c];if(d.isPresent!==!1){o=d;break}}return o?(this.promote(o),!0):!1}promote(s,l){const o=this.lead;if(s!==o&&(this.prevLead=o,this.lead=s,s.show(),o)){o.instance&&o.scheduleRender(),s.scheduleRender(),s.resumeFrom=o,l&&(s.resumeFrom.preserveOpacity=!0),o.snapshot&&(s.snapshot=o.snapshot,s.snapshot.latestValues=o.animationValues||o.latestValues),s.root&&s.root.isUpdating&&(s.isLayoutDirty=!0);const{crossfade:c}=s.options;c===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(s=>{const{options:l,resumingFrom:o}=s;l.onExitComplete&&l.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(s=>{s.instance&&s.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function SC(n,s,l){let o="";const c=n.x.translate/s.x,d=n.y.translate/s.y,f=(l==null?void 0:l.z)||0;if((c||d||f)&&(o=`translate3d(${c}px, ${d}px, ${f}px) `),(s.x!==1||s.y!==1)&&(o+=`scale(${1/s.x}, ${1/s.y}) `),l){const{transformPerspective:v,rotate:y,rotateX:b,rotateY:_,skewX:T,skewY:N}=l;v&&(o=`perspective(${v}px) ${o}`),y&&(o+=`rotate(${y}deg) `),b&&(o+=`rotateX(${b}deg) `),_&&(o+=`rotateY(${_}deg) `),T&&(o+=`skewX(${T}deg) `),N&&(o+=`skewY(${N}deg) `)}const m=n.x.scale*s.x,p=n.y.scale*s.y;return(m!==1||p!==1)&&(o+=`scale(${m}, ${p})`),o||"none"}const Rs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Hl=typeof window<"u"&&window.MotionDebug!==void 0,kd=["","X","Y","Z"],xC={visibility:"hidden"},dy=1e3;let _C=0;function Rd(n,s,l,o){const{latestValues:c}=s;c[n]&&(l[n]=c[n],s.setStaticValue(n,0),o&&(o[n]=0))}function Ub(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:s}=n.options;if(!s)return;const l=H0(s);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:c,layoutId:d}=n.options;window.MotionCancelOptimisedAnimation(l,"transform",ot,!(c||d))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&Ub(o)}function zb({attachResizeListener:n,defaultParent:s,measureScroll:l,checkIsScrollRoot:o,resetTransform:c}){return class{constructor(f={},m=s==null?void 0:s()){this.id=_C++,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,Hl&&(Rs.totalNodes=Rs.resolvedTargetDeltas=Rs.recalculatedProjection=0),this.nodes.forEach(jC),this.nodes.forEach(DC),this.nodes.forEach(kC),this.nodes.forEach(CC),Hl&&window.MotionDebug.record(Rs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=m?m.root||m:this,this.path=m?[...m.path,m]:[],this.parent=m,this.depth=m?m.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new cC)}addEventListener(f,m){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new If),this.eventHandlers.get(f).add(m)}notifyListeners(f,...m){const p=this.eventHandlers.get(f);p&&p.notify(...m)}hasListeners(f){return this.eventHandlers.has(f)}mount(f,m=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=oC(f),this.instance=f;const{layoutId:p,layout:v,visualElement:y}=this.options;if(y&&!y.current&&y.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),m&&(v||p)&&(this.isLayoutDirty=!0),n){let b;const _=()=>this.root.updateBlockedByResize=!1;n(f,()=>{this.root.updateBlockedByResize=!0,b&&b(),b=uC(_,250),Vr.hasAnimatedSinceResize&&(Vr.hasAnimatedSinceResize=!1,this.nodes.forEach(hy))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&y&&(p||v)&&this.addEventListener("didUpdate",({delta:b,hasLayoutChanged:_,hasRelativeTargetChanged:T,layout:N})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const D=this.options.transition||y.getDefaultTransition()||LC,{onLayoutAnimationStart:w,onLayoutAnimationComplete:C}=y.getProps(),H=!this.targetLayout||!Lb(this.targetLayout,N)||T,O=!_&&T;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||O||_&&(H||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(b,O);const F={...Vf(D,"layout"),onPlay:w,onComplete:C};(y.shouldReduceMotion||this.options.layoutRoot)&&(F.delay=0,F.type=!1),this.startAnimation(F)}else _||hy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=N})}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,os(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(RC),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&&Ub(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const b=this.path[y];b.shouldResetTransform=!0,b.updateScroll("snapshot"),b.options.layoutRoot&&b.willUpdate(!1)}const{layoutId:m,layout:p}=this.options;if(m===void 0&&!p)return;const v=this.getTransformTemplate();this.prevTransformTemplateValue=v?v(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(fy);return}this.isUpdating||this.nodes.forEach(NC),this.isUpdating=!1,this.nodes.forEach(wC),this.nodes.forEach(TC),this.nodes.forEach(EC),this.clearAllSnapshots();const m=la.now();qt.delta=ka(0,1e3/60,m-qt.timestamp),qt.timestamp=m,qt.isProcessing=!0,Td.update.process(qt),Td.preRender.process(qt),Td.render.process(qt),qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,wf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(AC),this.sharedNodes.forEach(MC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ot.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ot.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 p=0;p<this.path.length;p++)this.path[p].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ct(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:m}=this.options;m&&m.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let m=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(m=!1),m){const p=o(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:p,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!c)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,m=this.projectionDelta&&!Bb(this.projectionDelta),p=this.getTransformTemplate(),v=p?p(this.latestValues,""):void 0,y=v!==this.prevTransformTemplateValue;f&&(m||ks(this.latestValues)||y)&&(c(this.instance,v),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const m=this.measurePageBox();let p=this.removeElementScroll(m);return f&&(p=this.removeTransform(p)),UC(p),{animationId:this.root.animationId,measuredBox:m,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:m}=this.options;if(!m)return Ct();const p=m.measureViewportBox();if(!(((f=this.scroll)===null||f===void 0?void 0:f.wasRoot)||this.path.some(zC))){const{scroll:y}=this.root;y&&(Di(p.x,y.offset.x),Di(p.y,y.offset.y))}return p}removeElementScroll(f){var m;const p=Ct();if(Ln(p,f),!((m=this.scroll)===null||m===void 0)&&m.wasRoot)return p;for(let v=0;v<this.path.length;v++){const y=this.path[v],{scroll:b,options:_}=y;y!==this.root&&b&&_.layoutScroll&&(b.wasRoot&&Ln(p,f),Di(p.x,b.offset.x),Di(p.y,b.offset.y))}return p}applyTransform(f,m=!1){const p=Ct();Ln(p,f);for(let v=0;v<this.path.length;v++){const y=this.path[v];!m&&y.options.layoutScroll&&y.scroll&&y!==y.root&&ki(p,{x:-y.scroll.offset.x,y:-y.scroll.offset.y}),ks(y.latestValues)&&ki(p,y.latestValues)}return ks(this.latestValues)&&ki(p,this.latestValues),p}removeTransform(f){const m=Ct();Ln(m,f);for(let p=0;p<this.path.length;p++){const v=this.path[p];if(!v.instance||!ks(v.latestValues))continue;lf(v.latestValues)&&v.updateSnapshot();const y=Ct(),b=v.measurePageBox();Ln(y,b),iy(m,v.latestValues,v.snapshot?v.snapshot.layoutBox:void 0,y)}return ks(this.latestValues)&&iy(m,this.latestValues),m}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!==qt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){var m;const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const v=!!this.resumingFrom||this!==p;if(!(f||v&&this.isSharedProjectionDirty||this.isProjectionDirty||!((m=this.parent)===null||m===void 0)&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:b,layoutId:_}=this.options;if(!(!this.layout||!(b||_))){if(this.resolvedRelativeTargetAt=qt.timestamp,!this.targetDelta&&!this.relativeTarget){const T=this.getClosestProjectingParent();T&&T.layout&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ct(),this.relativeTargetOrigin=Ct(),Zl(this.relativeTargetOrigin,this.layout.layoutBox,T.layout.layoutBox),Ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ct(),this.targetWithTransforms=Ct()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Gj(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ln(this.target,this.layout.layoutBox),wb(this.target,this.targetDelta)):Ln(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const T=this.getClosestProjectingParent();T&&!!T.resumingFrom==!!this.resumingFrom&&!T.options.layoutScroll&&T.target&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ct(),this.relativeTargetOrigin=Ct(),Zl(this.relativeTargetOrigin,this.target,T.target),Ln(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Hl&&Rs.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||lf(this.parent.latestValues)||Nb(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 m=this.getLead(),p=!!this.resumingFrom||this!==m;let v=!0;if((this.isProjectionDirty||!((f=this.parent)===null||f===void 0)&&f.isProjectionDirty)&&(v=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(v=!1),this.resolvedRelativeTargetAt===qt.timestamp&&(v=!1),v)return;const{layout:y,layoutId:b}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(y||b))return;Ln(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,T=this.treeScale.y;Fj(this.layoutCorrected,this.treeScale,this.path,p),m.layout&&!m.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(m.target=m.layout.layoutBox,m.targetWithTransforms=Ct());const{target:N}=m;if(!N){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ny(this.prevProjectionDelta.x,this.projectionDelta.x),ny(this.prevProjectionDelta.y,this.projectionDelta.y)),Kl(this.projectionDelta,this.layoutCorrected,N,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==T||!uy(this.projectionDelta.x,this.prevProjectionDelta.x)||!uy(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",N)),Hl&&Rs.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){var m;if((m=this.options.visualElement)===null||m===void 0||m.scheduleRender(),f){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=wi(),this.projectionDelta=wi(),this.projectionDeltaWithTransform=wi()}setAnimationOrigin(f,m=!1){const p=this.snapshot,v=p?p.latestValues:{},y={...this.latestValues},b=wi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!m;const _=Ct(),T=p?p.source:void 0,N=this.layout?this.layout.source:void 0,D=T!==N,w=this.getStack(),C=!w||w.members.length<=1,H=!!(D&&!C&&this.options.crossfade===!0&&!this.path.some(BC));this.animationProgress=0;let O;this.mixTargetDelta=F=>{const G=F/1e3;my(b.x,f.x,G),my(b.y,f.y,G),this.setTargetDelta(b),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Zl(_,this.layout.layoutBox,this.relativeParent.layout.layoutBox),OC(this.relativeTarget,this.relativeTargetOrigin,_,G),O&&yC(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=Ct()),Ln(O,this.relativeTarget)),D&&(this.animationValues=y,fC(y,v,this.latestValues,G,H,C)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=G},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&&(os(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ot.update(()=>{Vr.hasAnimatedSinceResize=!0,this.currentAnimation=lC(0,dy,{...f,onUpdate:m=>{this.mixTargetDelta(m),f.onUpdate&&f.onUpdate(m)},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(dy),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:m,target:p,layout:v,latestValues:y}=f;if(!(!m||!p||!v)){if(this!==f&&this.layout&&v&&Vb(this.options.animationType,this.layout.layoutBox,v.layoutBox)){p=this.target||Ct();const b=Tn(this.layout.layoutBox.x);p.x.min=f.target.x.min,p.x.max=p.x.min+b;const _=Tn(this.layout.layoutBox.y);p.y.min=f.target.y.min,p.y.max=p.y.min+_}Ln(m,p),ki(m,y),Kl(this.projectionDeltaWithTransform,this.layoutCorrected,m,y)}}registerSharedNode(f,m){this.sharedNodes.has(f)||this.sharedNodes.set(f,new bC),this.sharedNodes.get(f).add(m);const v=m.options.initialPromotionConfig;m.promote({transition:v?v.transition:void 0,preserveFollowOpacity:v&&v.shouldPreserveFollowOpacity?v.shouldPreserveFollowOpacity(m):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){var f;const{layoutId:m}=this.options;return m?((f=this.getStack())===null||f===void 0?void 0:f.lead)||this:this}getPrevLead(){var f;const{layoutId:m}=this.options;return m?(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:m,preserveFollowOpacity:p}={}){const v=this.getStack();v&&v.promote(this,p),f&&(this.projectionDelta=void 0,this.needsReset=!0),m&&this.setOptions({transition:m})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let m=!1;const{latestValues:p}=f;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(m=!0),!m)return;const v={};p.z&&Rd("z",f,v,this.animationValues);for(let y=0;y<kd.length;y++)Rd(`rotate${kd[y]}`,f,v,this.animationValues),Rd(`skew${kd[y]}`,f,v,this.animationValues);f.render();for(const y in v)f.setStaticValue(y,v[y]),this.animationValues&&(this.animationValues[y]=v[y]);f.scheduleRender()}getProjectionStyles(f){var m,p;if(!this.instance||this.isSVG)return;if(!this.isVisible)return xC;const v={visibility:""},y=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,v.opacity="",v.pointerEvents=Ur(f==null?void 0:f.pointerEvents)||"",v.transform=y?y(this.latestValues,""):"none",v;const b=this.getLead();if(!this.projectionDelta||!this.layout||!b.target){const D={};return this.options.layoutId&&(D.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,D.pointerEvents=Ur(f==null?void 0:f.pointerEvents)||""),this.hasProjected&&!ks(this.latestValues)&&(D.transform=y?y({},""):"none",this.hasProjected=!1),D}const _=b.animationValues||b.latestValues;this.applyTransformsToTarget(),v.transform=SC(this.projectionDeltaWithTransform,this.treeScale,_),y&&(v.transform=y(_,v.transform));const{x:T,y:N}=this.projectionDelta;v.transformOrigin=`${T.origin*100}% ${N.origin*100}% 0`,b.animationValues?v.opacity=b===this?(p=(m=_.opacity)!==null&&m!==void 0?m:this.latestValues.opacity)!==null&&p!==void 0?p:1:this.preserveOpacity?this.latestValues.opacity:_.opacityExit:v.opacity=b===this?_.opacity!==void 0?_.opacity:"":_.opacityExit!==void 0?_.opacityExit:0;for(const D in Ir){if(_[D]===void 0)continue;const{correct:w,applyTo:C}=Ir[D],H=v.transform==="none"?_[D]:w(_[D],b);if(C){const O=C.length;for(let F=0;F<O;F++)v[C[F]]=H}else v[D]=H}return this.options.layoutId&&(v.pointerEvents=b===this?Ur(f==null?void 0:f.pointerEvents)||"":"none"),v}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>{var m;return(m=f.currentAnimation)===null||m===void 0?void 0:m.stop()}),this.root.nodes.forEach(fy),this.root.sharedNodes.clear()}}}function TC(n){n.updateLayout()}function EC(n){var s;const l=((s=n.resumeFrom)===null||s===void 0?void 0:s.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&l&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:c}=n.layout,{animationType:d}=n.options,f=l.source!==n.layout.source;d==="size"?Un(b=>{const _=f?l.measuredBox[b]:l.layoutBox[b],T=Tn(_);_.min=o[b].min,_.max=_.min+T}):Vb(d,l.layoutBox,o)&&Un(b=>{const _=f?l.measuredBox[b]:l.layoutBox[b],T=Tn(o[b]);_.max=_.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[b].max=n.relativeTarget[b].min+T)});const m=wi();Kl(m,o,l.layoutBox);const p=wi();f?Kl(p,n.applyTransform(c,!0),l.measuredBox):Kl(p,o,l.layoutBox);const v=!Bb(m);let y=!1;if(!n.resumeFrom){const b=n.getClosestProjectingParent();if(b&&!b.resumeFrom){const{snapshot:_,layout:T}=b;if(_&&T){const N=Ct();Zl(N,l.layoutBox,_.layoutBox);const D=Ct();Zl(D,o,T.layoutBox),Lb(N,D)||(y=!0),b.options.layoutRoot&&(n.relativeTarget=D,n.relativeTargetOrigin=N,n.relativeParent=b)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:l,delta:p,layoutDelta:m,hasLayoutChanged:v,hasRelativeTargetChanged:y})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function jC(n){Hl&&Rs.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function CC(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function AC(n){n.clearSnapshot()}function fy(n){n.clearMeasurements()}function NC(n){n.isLayoutDirty=!1}function wC(n){const{visualElement:s}=n.options;s&&s.getProps().onBeforeLayoutMeasure&&s.notify("BeforeLayoutMeasure"),n.resetTransform()}function hy(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function DC(n){n.resolveTargetDelta()}function kC(n){n.calcProjection()}function RC(n){n.resetSkewAndRotation()}function MC(n){n.removeLeadSnapshot()}function my(n,s,l){n.translate=mt(s.translate,0,l),n.scale=mt(s.scale,1,l),n.origin=s.origin,n.originPoint=s.originPoint}function py(n,s,l,o){n.min=mt(s.min,l.min,o),n.max=mt(s.max,l.max,o)}function OC(n,s,l,o){py(n.x,s.x,l.x,o),py(n.y,s.y,l.y,o)}function BC(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const LC={duration:.45,ease:[.4,0,.1,1]},gy=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),vy=gy("applewebkit/")&&!gy("chrome/")?Math.round:_n;function yy(n){n.min=vy(n.min),n.max=vy(n.max)}function UC(n){yy(n.x),yy(n.y)}function Vb(n,s,l){return n==="position"||n==="preserve-aspect"&&!Hj(cy(s),cy(l),.2)}function zC(n){var s;return n!==n.root&&((s=n.scroll)===null||s===void 0?void 0:s.wasRoot)}const VC=zb({attachResizeListener:(n,s)=>to(n,"resize",s),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Md={current:void 0},Hb=zb({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Md.current){const n=new VC({});n.mount(window),n.setOptions({layoutScroll:!0}),Md.current=n}return Md.current},resetTransform:(n,s)=>{n.style.transform=s!==void 0?s:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),HC={pan:{Feature:nC},drag:{Feature:tC,ProjectionNode:Hb,MeasureLayout:Rb}};function GC(n,s,l){var o;if(n instanceof Element)return[n];if(typeof n=="string"){let c=document;const d=(o=void 0)!==null&&o!==void 0?o:c.querySelectorAll(n);return d?Array.from(d):[]}return Array.from(n)}function Gb(n,s){const l=GC(n),o=new AbortController,c={passive:!0,...s,signal:o.signal};return[l,c,()=>o.abort()]}function by(n){return s=>{s.pointerType==="touch"||_b()||n(s)}}function IC(n,s,l={}){const[o,c,d]=Gb(n,l),f=by(m=>{const{target:p}=m,v=s(m);if(typeof v!="function"||!p)return;const y=by(b=>{v(b),p.removeEventListener("pointerleave",y)});p.addEventListener("pointerleave",y,c)});return o.forEach(m=>{m.addEventListener("pointerenter",f,c)}),d}function Sy(n,s,l){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",l==="Start");const c="onHover"+l,d=o[c];d&&ot.postRender(()=>d(s,ro(s)))}class PC extends cs{mount(){const{current:s}=this.node;s&&(this.unmount=IC(s,l=>(Sy(this.node,l,"Start"),o=>Sy(this.node,o,"End"))))}unmount(){}}class qC extends cs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let s=!1;try{s=this.node.current.matches(":focus-visible")}catch{s=!0}!s||!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=oo(to(this.node.current,"focus",()=>this.onFocus()),to(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ib=(n,s)=>s?n===s?!0:Ib(n,s.parentElement):!1,YC=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function KC(n){return YC.has(n.tagName)||n.tabIndex!==-1}const Gl=new WeakSet;function xy(n){return s=>{s.key==="Enter"&&n(s)}}function Od(n,s){n.dispatchEvent(new PointerEvent("pointer"+s,{isPrimary:!0,bubbles:!0}))}const ZC=(n,s)=>{const l=n.currentTarget;if(!l)return;const o=xy(()=>{if(Gl.has(l))return;Od(l,"down");const c=xy(()=>{Od(l,"up")}),d=()=>Od(l,"cancel");l.addEventListener("keyup",c,s),l.addEventListener("blur",d,s)});l.addEventListener("keydown",o,s),l.addEventListener("blur",()=>l.removeEventListener("keydown",o),s)};function _y(n){return th(n)&&!_b()}function XC(n,s,l={}){const[o,c,d]=Gb(n,l),f=m=>{const p=m.currentTarget;if(!_y(m)||Gl.has(p))return;Gl.add(p);const v=s(m),y=(T,N)=>{window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",_),!(!_y(T)||!Gl.has(p))&&(Gl.delete(p),typeof v=="function"&&v(T,{success:N}))},b=T=>{y(T,l.useGlobalTarget||Ib(p,T.target))},_=T=>{y(T,!1)};window.addEventListener("pointerup",b,c),window.addEventListener("pointercancel",_,c)};return o.forEach(m=>{!KC(m)&&m.getAttribute("tabindex")===null&&(m.tabIndex=0),(l.useGlobalTarget?window:m).addEventListener("pointerdown",f,c),m.addEventListener("focus",v=>ZC(v,c),c)}),d}function Ty(n,s,l){const{props:o}=n;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",l==="Start");const c="onTap"+(l==="End"?"":l),d=o[c];d&&ot.postRender(()=>d(s,ro(s)))}class $C extends cs{mount(){const{current:s}=this.node;s&&(this.unmount=XC(s,l=>(Ty(this.node,l,"Start"),(o,{success:c})=>Ty(this.node,o,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const rf=new WeakMap,Bd=new WeakMap,FC=n=>{const s=rf.get(n.target);s&&s(n)},QC=n=>{n.forEach(FC)};function JC({root:n,...s}){const l=n||document;Bd.has(l)||Bd.set(l,{});const o=Bd.get(l),c=JSON.stringify(s);return o[c]||(o[c]=new IntersectionObserver(QC,{root:n,...s})),o[c]}function WC(n,s,l){const o=JC(s);return rf.set(n,l),o.observe(n),()=>{rf.delete(n),o.unobserve(n)}}const eA={some:0,all:1};class tA extends cs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:s={}}=this.node.getProps(),{root:l,margin:o,amount:c="some",once:d}=s,f={root:l?l.current:void 0,rootMargin:o,threshold:typeof c=="number"?c:eA[c]},m=p=>{const{isIntersecting:v}=p;if(this.isInView===v||(this.isInView=v,d&&!v&&this.hasEnteredView))return;v&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",v);const{onViewportEnter:y,onViewportLeave:b}=this.node.getProps(),_=v?y:b;_&&_(p)};return WC(this.node.current,f,m)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:s,prevProps:l}=this.node;["amount","margin","root"].some(nA(s,l))&&this.startObserver()}unmount(){}}function nA({viewport:n={}},{viewport:s={}}={}){return l=>n[l]!==s[l]}const aA={inView:{Feature:tA},tap:{Feature:$C},focus:{Feature:qC},hover:{Feature:PC}},sA={layout:{ProjectionNode:Hb,MeasureLayout:Rb}},cf={current:null},Pb={current:!1};function iA(){if(Pb.current=!0,!!jf)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),s=()=>cf.current=n.matches;n.addListener(s),s()}else cf.current=!1}const lA=[...ub,Xt,rs],oA=n=>lA.find(cb(n)),Ey=new WeakMap;function rA(n,s,l){for(const o in s){const c=s[o],d=l[o];if($t(c))n.addValue(o,c);else if($t(d))n.addValue(o,Wl(c,{owner:n}));else if(d!==c)if(n.hasValue(o)){const f=n.getValue(o);f.liveStyle===!0?f.jump(c):f.hasAnimated||f.set(c)}else{const f=n.getStaticValue(o);n.addValue(o,Wl(f!==void 0?f:c,{owner:n}))}}for(const o in l)s[o]===void 0&&n.removeValue(o);return s}const jy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class cA{scrapeMotionValuesFromProps(s,l,o){return{}}constructor({parent:s,props:l,presenceContext:o,reducedMotionConfig:c,blockInitialAnimation:d,visualState:f},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Qf,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 T=la.now();this.renderScheduledAt<T&&(this.renderScheduledAt=T,ot.render(this.render,!1,!0))};const{latestValues:p,renderState:v,onUpdate:y}=f;this.onUpdate=y,this.latestValues=p,this.baseTarget={...p},this.initialValues=l.initial?{...p}:{},this.renderState=v,this.parent=s,this.props=l,this.presenceContext=o,this.depth=s?s.depth+1:0,this.reducedMotionConfig=c,this.options=m,this.blockInitialAnimation=!!d,this.isControllingVariants=sc(l),this.isVariantNode=_0(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(s&&s.current);const{willChange:b,..._}=this.scrapeMotionValuesFromProps(l,{},this);for(const T in _){const N=_[T];p[T]!==void 0&&$t(N)&&N.set(p[T],!1)}}mount(s){this.current=s,Ey.set(s,this),this.projection&&!this.projection.instance&&this.projection.mount(s),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((l,o)=>this.bindToMotionValue(o,l)),Pb.current||iA(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:cf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ey.delete(this.current),this.projection&&this.projection.unmount(),os(this.notifyUpdate),os(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const l=this.features[s];l&&(l.unmount(),l.isMounted=!1)}this.current=null}bindToMotionValue(s,l){this.valueSubscriptions.has(s)&&this.valueSubscriptions.get(s)();const o=Vs.has(s),c=l.on("change",m=>{this.latestValues[s]=m,this.props.onUpdate&&ot.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),d=l.on("renderRequest",this.scheduleRender);let f;window.MotionCheckAppearSync&&(f=window.MotionCheckAppearSync(this,s,l)),this.valueSubscriptions.set(s,()=>{c(),d(),f&&f(),l.owner&&l.stop()})}sortNodePosition(s){return!this.current||!this.sortInstanceNodePosition||this.type!==s.type?0:this.sortInstanceNodePosition(this.current,s.current)}updateFeatures(){let s="animation";for(s in Oi){const l=Oi[s];if(!l)continue;const{isEnabled:o,Feature:c}=l;if(!this.features[s]&&c&&o(this.props)&&(this.features[s]=new c(this)),this.features[s]){const d=this.features[s];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ct()}getStaticValue(s){return this.latestValues[s]}setStaticValue(s,l){this.latestValues[s]=l}update(s,l){(s.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=s,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let o=0;o<jy.length;o++){const c=jy[o];this.propEventSubscriptions[c]&&(this.propEventSubscriptions[c](),delete this.propEventSubscriptions[c]);const d="on"+c,f=s[d];f&&(this.propEventSubscriptions[c]=this.on(c,f))}this.prevMotionValues=rA(this,this.scrapeMotionValuesFromProps(s,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(s){return this.props.variants?this.props.variants[s]: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(s){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(s),()=>l.variantChildren.delete(s)}addValue(s,l){const o=this.values.get(s);l!==o&&(o&&this.removeValue(s),this.bindToMotionValue(s,l),this.values.set(s,l),this.latestValues[s]=l.get())}removeValue(s){this.values.delete(s);const l=this.valueSubscriptions.get(s);l&&(l(),this.valueSubscriptions.delete(s)),delete this.latestValues[s],this.removeValueFromRenderState(s,this.renderState)}hasValue(s){return this.values.has(s)}getValue(s,l){if(this.props.values&&this.props.values[s])return this.props.values[s];let o=this.values.get(s);return o===void 0&&l!==void 0&&(o=Wl(l===null?void 0:l,{owner:this}),this.addValue(s,o)),o}readValue(s,l){var o;let c=this.latestValues[s]!==void 0||!this.current?this.latestValues[s]:(o=this.getBaseTargetFromProps(this.props,s))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,s,this.options);return c!=null&&(typeof c=="string"&&(ob(c)||J0(c))?c=parseFloat(c):!oA(c)&&rs.test(l)&&(c=sb(s,l)),this.setBaseTarget(s,$t(c)?c.get():c)),$t(c)?c.get():c}setBaseTarget(s,l){this.baseTarget[s]=l}getBaseTarget(s){var l;const{initial:o}=this.props;let c;if(typeof o=="string"||typeof o=="object"){const f=kf(this.props,o,(l=this.presenceContext)===null||l===void 0?void 0:l.custom);f&&(c=f[s])}if(o&&c!==void 0)return c;const d=this.getBaseTargetFromProps(this.props,s);return d!==void 0&&!$t(d)?d:this.initialValues[s]!==void 0&&c===void 0?void 0:this.baseTarget[s]}on(s,l){return this.events[s]||(this.events[s]=new If),this.events[s].add(l)}notify(s,...l){this.events[s]&&this.events[s].notify(...l)}}class qb extends cA{constructor(){super(...arguments),this.KeyframeResolver=db}sortInstanceNodePosition(s,l){return s.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(s,l){return s.style?s.style[l]:void 0}removeValueFromRenderState(s,{vars:l,style:o}){delete l[s],delete o[s]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:s}=this.props;$t(s)&&(this.childSubscription=s.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}function uA(n){return window.getComputedStyle(n)}class dA extends qb{constructor(){super(...arguments),this.type="html",this.renderInstance=k0}readValueFromInstance(s,l){if(Vs.has(l)){const o=Ff(l);return o&&o.default||0}else{const o=uA(s),c=(N0(l)?o.getPropertyValue(l):o[l])||0;return typeof c=="string"?c.trim():c}}measureInstanceViewportBox(s,{transformPagePoint:l}){return Db(s,l)}build(s,l,o){Of(s,l,o.transformTemplate)}scrapeMotionValuesFromProps(s,l,o){return zf(s,l,o)}}class fA extends qb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ct}getBaseTargetFromProps(s,l){return s[l]}readValueFromInstance(s,l){if(Vs.has(l)){const o=Ff(l);return o&&o.default||0}return l=R0.has(l)?l:Nf(l),s.getAttribute(l)}scrapeMotionValuesFromProps(s,l,o){return B0(s,l,o)}build(s,l,o){Bf(s,l,this.isSVGTag,o.transformTemplate)}renderInstance(s,l,o,c){M0(s,l,o,c)}mount(s){this.isSVGTag=Uf(s.tagName),super.mount(s)}}const hA=(n,s)=>Df(n)?new fA(s):new dA(s,{allowProjection:n!==S.Fragment}),mA=VE({...Dj,...aA,...HC,...sA},hA),Fn=eE(mA);var St;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.TEXT=1]="TEXT",n[n.TOOL_USE=2]="TOOL_USE",n[n.TOOL_RESULT=3]="TOOL_RESULT",n[n.ERROR=4]="ERROR",n[n.STATUS=5]="STATUS",n[n.SYSTEM=6]="SYSTEM",n[n.FINDING=7]="FINDING",n[n.SUBTASK_CREATE=8]="SUBTASK_CREATE",n[n.USER_INPUT=9]="USER_INPUT"})(St||(St={}));var Mt;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.NOT_STARTED=1]="NOT_STARTED",n[n.WORKING=3]="WORKING",n[n.PAUSED=4]="PAUSED",n[n.COMPLETE=5]="COMPLETE",n[n.FAILED=6]="FAILED"})(Mt||(Mt={}));var is;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ACTIVE=1]="ACTIVE",n[n.ARCHIVED=2]="ARCHIVED"})(is||(is={}));var ls;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"})(ls||(ls={}));const pA=8;Object.assign(Object.create(null),{"":St.UNSPECIFIED,text:St.TEXT,tool_use:St.TOOL_USE,tool_result:St.TOOL_RESULT,error:St.ERROR,status:St.STATUS,system:St.SYSTEM,finding:St.FINDING,subtask_create:St.SUBTASK_CREATE,user_input:St.USER_INPUT});St.UNSPECIFIED+"",St.TEXT+"",St.TOOL_USE+"",St.TOOL_RESULT+"",St.ERROR+"",St.STATUS+"",St.SYSTEM+"",St.FINDING+"",St.SUBTASK_CREATE+"",St.USER_INPUT+"";Object.assign(Object.create(null),{"":Mt.UNSPECIFIED,not_started:Mt.NOT_STARTED,working:Mt.WORKING,paused:Mt.PAUSED,complete:Mt.COMPLETE,failed:Mt.FAILED,pending:Mt.NOT_STARTED,assigned:Mt.NOT_STARTED,in_progress:Mt.WORKING,waiting_input:Mt.PAUSED,review:Mt.PAUSED,done:Mt.COMPLETE});Mt.UNSPECIFIED+"",Mt.NOT_STARTED+"",Mt.WORKING+"",Mt.PAUSED+"",Mt.COMPLETE+"",Mt.FAILED+"";Object.assign(Object.create(null),{"":is.UNSPECIFIED,active:is.ACTIVE,archived:is.ARCHIVED});is.UNSPECIFIED+"",is.ACTIVE+"",is.ARCHIVED+"";Object.assign(Object.create(null),{"":ls.UNSPECIFIED,open:ls.OPEN,closed:ls.CLOSED});ls.UNSPECIFIED+"",ls.OPEN+"",ls.CLOSED+"";const gA="_breadcrumbs_17or2_1",vA="_list_17or2_11",yA="_item_17or2_21",bA="_separator_17or2_28",SA="_link_17or2_34",xA="_current_17or2_57",ji={breadcrumbs:gA,list:vA,item:yA,separator:bA,link:SA,current:xA},_A="›";function Gi({segments:n}){return h.jsx("nav",{className:ji.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:h.jsx("ol",{className:ji.list,children:n.map((s,l)=>{const o=l===n.length-1;return h.jsxs("li",{className:ji.item,children:[l>0&&h.jsx("span",{className:ji.separator,"aria-hidden":"true",children:_A}),s.url&&!o?h.jsx(Sf,{className:ji.link,to:s.url,title:s.label,children:s.label}):h.jsx("span",{className:ji.current,"aria-current":"page",title:s.label,children:s.label})]},l)})})})}function uf(){uf=function(c,d){return new l(c,void 0,d)};var n=RegExp.prototype,s=new WeakMap;function l(c,d,f){var m=new RegExp(c,d);return s.set(m,f||s.get(c)),Xr(m,l.prototype)}function o(c,d){var f=s.get(d);return Object.keys(f).reduce(function(m,p){var v=f[p];if(typeof v=="number")m[p]=c[v];else{for(var y=0;c[v[y]]===void 0&&y+1<v.length;)y++;m[p]=c[v[y]]}return m},Object.create(null))}return(function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(d&&d.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),d&&Xr(c,d)})(l,RegExp),l.prototype.exec=function(c){var d=n.exec.call(this,c);if(d){d.groups=o(d,this);var f=d.indices;f&&(f.groups=o(f,this))}return d},l.prototype[Symbol.replace]=function(c,d){if(typeof d=="string"){var f=s.get(this);return n[Symbol.replace].call(this,c,d.replace(/\$<([^>]+)>/g,function(p,v){var y=f[v];return"$"+(Array.isArray(y)?y.join("$"):y)}))}if(typeof d=="function"){var m=this;return n[Symbol.replace].call(this,c,function(){var p=arguments;return typeof p[p.length-1]!="object"&&(p=[].slice.call(p)).push(o(p,m)),d.apply(this,p)})}return n[Symbol.replace].call(this,c,d)},uf.apply(this,arguments)}function Xr(n,s){return Xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,o){return l.__proto__=o,l},Xr(n,s)}function Cy(n,s){(s==null||s>n.length)&&(s=n.length);for(var l=0,o=new Array(s);l<s;l++)o[l]=n[l];return o}function Ld(n,s){var l=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l)return(l=l.call(n)).next.bind(l);if(Array.isArray(n)||(l=(function(c,d){if(c){if(typeof c=="string")return Cy(c,d);var f=Object.prototype.toString.call(c).slice(8,-1);return f==="Object"&&c.constructor&&(f=c.constructor.name),f==="Map"||f==="Set"?Array.from(c):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?Cy(c,d):void 0}})(n))||s){l&&(n=l);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
87
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var TA=(function(n){return function(s){return s===void 0&&(s={}),(function(o,c){if(c&&!o.registered(c))throw new Error('The default language "'+c+'" is not registered with refractor.')})(n,s.defaultLanguage),function(o){dx(o,"element",l)};function l(o,c,d){var f,m;if(d&&d.tagName==="pre"&&o.tagName==="code"){var p=(o==null||(f=o.data)==null?void 0:f.meta)||(o==null||(m=o.properties)==null?void 0:m.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 v,y,b=(function(G){for(var W,ee=Ld(G.properties.className);!(W=ee()).done;){var $=W.value;if($.slice(0,9)==="language-")return $.slice(9).toLowerCase()}return null})(o);if(!b&&s.defaultLanguage&&o.properties.className.push("language-"+(b=s.defaultLanguage)),o.properties.className.push("code-highlight"),b)try{var _,T;T=(_=b)!=null&&_.includes("diff-")?b.split("-")[1]:b,v=n.highlight(jr(o),T),d.properties.className=(d.properties.className||[]).concat("language-"+T)}catch(G){if(!s.ignoreMissing||!/Unknown language/.test(G.message))throw G;v=o}else v=o;v.children=(y=1,function G(W){return W.reduce(function(ee,$){if($.type==="text"){var ae=$.value,_e=(ae.match(/\n/g)||"").length;if(_e===0)$.position={start:{line:y,column:1},end:{line:y,column:1}},ee.push($);else for(var L,be=ae.split(`
|
|
88
|
+
`),te=Ld(be.entries());!(L=te()).done;){var Be=L.value,P=Be[0],U=Be[1];ee.push({type:"text",value:P===be.length-1?U:U+`
|
|
89
|
+
`,position:{start:{line:y+P,column:1},end:{line:y+P,column:1}}})}return y+=_e,ee}if(Object.prototype.hasOwnProperty.call($,"children")){var K=y;return $.children=G($.children),ee.push($),$.position={start:{line:K,column:1},end:{line:y,column:1}},ee}return ee.push($),ee},[])})(v.children),v.position=v.children.length>0?{start:{line:v.children[0].position.start.line,column:0},end:{line:v.children[v.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var N,D=(function(G){var W=/{([\d,-]+)}/,ee=G.split(",").map(function(_e){return _e.trim()}).join();if(W.test(ee)){var $=W.exec(ee)[1],ae=hx($);return function(_e){return ae.includes(_e+1)}}return function(){return!1}})(p),w=(function(G){var W=uf(/showLineNumbers=(\d+)/i,{lines:1});if(W.test(G)){var ee=W.exec(G);return Number(ee.groups.lines)}return 1})(p),C=(function(G){for(var W=new Array(G),ee=0;ee<G;ee++)W[ee]={type:"element",tagName:"span",properties:{className:[]},children:[]};return W})(v.position.end.line),H=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],O=function(){var G,W,ee=N.value,$=ee[0],ae=ee[1];ae.properties.className=["code-line"];var _e=mx(v,function(L){return L.position.start.line<=$+1&&L.position.end.line>=$+1});ae.children=_e.children,(p.toLowerCase().includes("showLineNumbers".toLowerCase())||s.showLineNumbers===!0||typeof s.showLineNumbers=="object"&&s.showLineNumbers.includes(b))&&!H.some(function(L){return p.toLowerCase().includes(L)})&&(ae.properties.line=[($+w).toString()],ae.properties.className.push("line-number")),D($)&&ae.properties.className.push("highlight-line"),(b==="diff"||(G=b)!=null&&G.includes("diff-"))&&jr(ae).substring(0,1)==="-"?ae.properties.className.push("deleted"):(b==="diff"||(W=b)!=null&&W.includes("diff-"))&&jr(ae).substring(0,1)==="+"&&ae.properties.className.push("inserted")},F=Ld(C.entries());!(N=F()).done;)O();C.length>0&&jr(C[C.length-1]).trim()===""&&C.pop(),o.children=C}}}})(fx);const EA="_systemEvent_2kh3g_1",jA="_systemTimestamp_2kh3g_9",CA="_textEvent_2kh3g_13",AA="_toolUseEvent_2kh3g_100",NA="_toolUseHeader_2kh3g_116",wA="_toolUsePrefix_2kh3g_123",DA="_toolUseName_2kh3g_128",kA="_toolUseArgs_2kh3g_133",RA="_toolResultEvent_2kh3g_144",MA="_toolResultHeader_2kh3g_150",OA="_toolResultIndicatorOk_2kh3g_174",BA="_toolResultIndicatorError_2kh3g_181",LA="_toolResultLabel_2kh3g_188",UA="_toolResultToggle_2kh3g_192",zA="_toolResultCommand_2kh3g_198",VA="_toolResultEllipsis_2kh3g_208",HA="_toolResultPre_2kh3g_212",GA="_errorEvent_2kh3g_227",IA="_statusEvent_2kh3g_236",PA="_userInputEvent_2kh3g_246",qA="_userInputContent_2kh3g_253",YA="_defaultEvent_2kh3g_265",ht={systemEvent:EA,systemTimestamp:jA,textEvent:CA,toolUseEvent:AA,toolUseHeader:NA,toolUsePrefix:wA,toolUseName:DA,toolUseArgs:kA,toolResultEvent:RA,toolResultHeader:MA,toolResultIndicatorOk:OA,toolResultIndicatorError:BA,toolResultLabel:LA,toolResultToggle:UA,toolResultCommand:zA,toolResultEllipsis:VA,toolResultPre:HA,errorEvent:GA,statusEvent:IA,userInputEvent:PA,userInputContent:qA,defaultEvent:YA};function KA({time:n,content:s}){return h.jsxs("div",{className:ht.systemEvent,children:[h.jsxs("span",{className:ht.systemTimestamp,children:["[",n,"]"]})," ",s]})}function ZA({content:n}){return h.jsx("div",{className:ht.textEvent,children:h.jsx(df,{remarkPlugins:[ff],rehypePlugins:[TA],children:n})})}function XA({content:n}){let s="",l=n;try{const o=JSON.parse(n);s=o.tool||"",l=JSON.stringify(o.args,null,2)}catch{}return h.jsxs("div",{className:ht.toolUseEvent,children:[h.jsxs("div",{className:ht.toolUseHeader,children:[h.jsx("span",{className:ht.toolUsePrefix,children:">"}),s?h.jsx("span",{className:ht.toolUseName,children:s}):null]}),h.jsx("pre",{className:ht.toolUseArgs,children:l})]})}const Ay=5;function $A(n,s){if(s==null)return"";if(typeof s!="object")return String(s);const l=s;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(s);return o.length>150?`${o.slice(0,150)}…`:o}catch{return""}}function FA({content:n,raw:s,toolUseCtx:l}){const[o,c]=S.useState(!1);let d=!1;if(s)try{d=JSON.parse(s).is_error===!0}catch{}const f=n.split(`
|
|
90
|
+
`),m=f.length>Ay,p=o?n:f.slice(0,Ay).join(`
|
|
91
|
+
`),y=((l==null?void 0:l.tool)??"")||(d?"Tool error":"Tool output"),b=l?$A(l.tool,l.args):"",_=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:d?ht.toolResultIndicatorError:ht.toolResultIndicatorOk,"aria-label":d?"error":"success",children:d?"✗":"✓"}),h.jsx("span",{className:ht.toolResultLabel,children:y}),m&&h.jsx("span",{className:ht.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return h.jsxs("div",{className:ht.toolResultEvent,children:[m?h.jsx("button",{className:ht.toolResultHeader,onClick:()=>{c(T=>!T)},"aria-expanded":o,children:_}):h.jsx("div",{className:ht.toolResultHeader,children:_}),b&&h.jsx("div",{className:ht.toolResultCommand,children:b}),h.jsxs("pre",{className:ht.toolResultPre,children:[p,!o&&m&&h.jsx("span",{className:ht.toolResultEllipsis,children:"…"})]})]})}function QA({content:n}){return h.jsxs("div",{className:ht.errorEvent,children:["Error: ",n]})}function JA({content:n}){return h.jsxs("div",{className:ht.statusEvent,children:["--- ",n," ---"]})}function WA({content:n}){return h.jsx("div",{className:ht.userInputEvent,children:h.jsx("span",{className:ht.userInputContent,children:n})})}function eN({content:n}){return h.jsx("div",{className:ht.defaultEvent,children:n})}function Yb({event:n,toolUseCtx:s}){const l=new Date(n.timestamp).toLocaleTimeString();switch(n.eventType){case"system":return h.jsx(KA,{time:l,content:n.content});case"text":case"output":return h.jsx(ZA,{content:n.content});case"tool_use":return h.jsx(XA,{content:n.content});case"tool_result":return h.jsx(FA,{content:n.content,raw:n.raw,toolUseCtx:s});case"error":return h.jsx(QA,{content:n.content});case"status":return h.jsx(JA,{content:n.content});case"user_input":return h.jsx(WA,{content:n.content});default:return h.jsx(eN,{content:n.content})}}const tN="_overlay_cmicx_1",nN="_dialog_cmicx_11",aN="_title_cmicx_30",sN="_description_cmicx_38",iN="_actions_cmicx_45",lN="_cancelButton_cmicx_52",oN="_confirmButton_cmicx_79",Ds={overlay:tN,dialog:nN,title:aN,description:sN,actions:iN,cancelButton:lN,confirmButton:oN};function oc({isOpen:n,title:s,description:l,confirmLabel:o="Delete",onConfirm:c,onCancel:d}){const f=S.useId(),m=S.useId();return h.jsx(zs,{children:n&&h.jsx(Fn.div,{className:Ds.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:d,onKeyDown:p=>{p.key==="Escape"&&d()},role:"dialog","aria-modal":"true","aria-labelledby":f,"aria-describedby":l?m:void 0,children:h.jsxs(Fn.div,{className:Ds.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:p=>p.stopPropagation(),children:[h.jsx("h3",{id:f,className:Ds.title,children:s}),l&&h.jsx("p",{id:m,className:Ds.description,children:l}),h.jsxs("div",{className:Ds.actions,children:[h.jsx("button",{type:"button",className:Ds.cancelButton,onClick:d,autoFocus:!0,children:"Cancel"}),h.jsx("button",{type:"button",className:Ds.confirmButton,onClick:c,children:o})]})]})})})}const rN="_spinner_13c8l_1",cN="_spin_13c8l_1",uN="_sm_13c8l_14",dN="_md_13c8l_20",fN="_lg_13c8l_26",Ny={spinner:rN,spin:cN,sm:uN,md:dN,lg:fN};function wy({size:n="md",className:s,label:l="Loading",liveRegion:o=!1}){return h.jsx("span",{className:`${Ny.spinner} ${Ny[n]} ${s??""}`,role:o?"status":void 0,"aria-label":l,"aria-hidden":o?void 0:!0})}const hN="_container_129pn_1",mN="_header_129pn_5",pN="_addButton_129pn_17",gN="_createForm_129pn_44",vN="_createInput_129pn_50",yN="_createButton_129pn_81",bN="_creatingHint_129pn_122",SN="_projectRow_129pn_131",xN="_selected_129pn_149",_N="_expandArrow_129pn_154",TN="_expanded_129pn_161",EN="_projectName_129pn_165",jN="_taskCount_129pn_169",CN="_newTaskButton_129pn_175",AN="_taskRow_129pn_202",NN="_taskStatusIcon_129pn_227",wN="_taskTitle_129pn_231",DN="_dependencyBadge_129pn_238",kN="_blockedBadge_129pn_250",RN="_leafSpacer_129pn_255",MN="_childCountBadge_129pn_260",ON="_addChildButton_129pn_273",BN="_emptyCta_129pn_317",LN="_ctaDescription_129pn_330",UN="_ctaButton_129pn_336",zN="_emptyTaskCta_129pn_371",VN="_headerActions_129pn_376",HN="_groupToggle_129pn_382",GN="_groupToggleActive_129pn_409",IN="_statusGroupHeader_129pn_413",PN="_statusGroupIcon_129pn_432",qN="_statusGroupLabel_129pn_436",YN="_statusGroupCount_129pn_441",KN="_createTaskLink_129pn_454",Ne={container:hN,header:mN,addButton:pN,createForm:gN,createInput:vN,createButton:yN,creatingHint:bN,projectRow:SN,selected:xN,expandArrow:_N,expanded:TN,projectName:EN,taskCount:jN,newTaskButton:CN,taskRow:AN,taskStatusIcon:NN,taskTitle:wN,dependencyBadge:DN,blockedBadge:kN,leafSpacer:RN,childCountBadge:MN,addChildButton:ON,emptyCta:BN,ctaDescription:LN,ctaButton:UN,emptyTaskCta:zN,headerActions:VN,groupToggle:HN,groupToggleActive:GN,statusGroupHeader:IN,statusGroupIcon:PN,statusGroupLabel:qN,statusGroupCount:YN,createTaskLink:KN},ss={not_started:{color:"var(--text-tertiary)",icon:"○"},working:{color:"var(--accent-green)",icon:"●"},paused:{color:"var(--accent-yellow)",icon:"◉"},complete:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},blocked:{color:"var(--accent-yellow)",icon:"⦸"}},Kb=34,ZN=16,Zb="grackle-group-by-status";function Dy(){try{return localStorage.getItem(Zb)==="true"}catch{return!1}}function XN(n){try{localStorage.setItem(Zb,String(n))}catch{}}const $N=["working","paused","failed","not_started","blocked","complete"],FN={working:"Working",paused:"Paused",failed:"Failed",not_started:"Not Started",blocked:"Blocked",complete:"Complete"};function QN(n,s){const l=new Map;for(const d of n){const m=d.dependsOn.length>0&&d.dependsOn.some(v=>s.get(v)!=="complete")?"blocked":d.status,p=l.get(m);p?p.push(d):l.set(m,[d])}const o=[],c=new Set;for(const d of $N){c.add(d);const f=l.get(d);f&&f.length>0&&(f.sort((m,p)=>m.sortOrder-p.sortOrder),o.push({status:d,label:FN[d]||d,style:ss[d]||ss.not_started,tasks:f}))}for(const[d,f]of l)!c.has(d)&&f.length>0&&(f.sort((m,p)=>m.sortOrder-p.sortOrder),o.push({status:d,label:d,style:ss[d]||ss.not_started,tasks:f}));return o}function JN({group:n,isExpanded:s,onToggle:l,selectedTaskId:o,navigate:c}){return h.jsxs("div",{"data-testid":`status-group-${n.status}`,children:[h.jsxs("div",{className:Ne.statusGroupHeader,role:"button",tabIndex:0,"aria-expanded":s,onClick:l,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),l())},children:[h.jsx("span",{className:`${Ne.expandArrow} ${s?Ne.expanded:""}`,children:"▸"}),h.jsx("span",{className:Ne.statusGroupIcon,style:{color:n.style.color},children:n.style.icon}),h.jsx("span",{className:Ne.statusGroupLabel,children:n.label}),h.jsx("span",{className:Ne.statusGroupCount,children:n.tasks.length})]}),h.jsx(zs,{children:s&&h.jsx(Fn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},style:{overflow:"hidden"},children:n.tasks.map(d=>{const f=ss[d.status]||ss.not_started,m=o===d.id;return h.jsxs("div",{onClick:()=>c(Bs(d.id)),className:`${Ne.taskRow} ${m?Ne.selected:""}`,style:{paddingLeft:Kb},"data-task-id":d.id,children:[h.jsx("span",{className:Ne.leafSpacer}),h.jsx("span",{className:Ne.taskStatusIcon,style:{color:f.color},children:f.icon}),h.jsx("span",{className:Ne.taskTitle,title:d.title,children:d.title})]},d.id)})})})]})}function WN(n){const s=new Map(n.map(o=>[o.id,{...o,children:[]}])),l=[];for(const o of s.values())o.parentTaskId&&s.has(o.parentTaskId)?s.get(o.parentTaskId).children.push(o):l.push(o);for(const o of s.values())o.children.sort((c,d)=>c.sortOrder-d.sortOrder);return l.sort((o,c)=>o.sortOrder-c.sortOrder)}function Xb({node:n,depth:s,expandedTasks:l,toggleTask:o,selectedTaskId:c,navigate:d,projectId:f,taskStatusById:m}){const p=ss[n.status]||ss.not_started,v=n.dependsOn.length>0&&n.dependsOn.some(N=>m.get(N)!=="complete"),y=l.has(n.id),b=n.children.length>0,_=c===n.id,T=Kb+s*ZN;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{onClick:()=>d(Bs(n.id)),className:`${Ne.taskRow} ${_?Ne.selected:""}`,style:{paddingLeft:T},"data-task-id":n.id,children:[b&&h.jsx("span",{className:`${Ne.expandArrow} ${y?Ne.expanded:""}`,role:"button",tabIndex:0,"aria-label":y?"Collapse task":"Expand task",onClick:N=>{N.stopPropagation(),o(n.id)},onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),N.stopPropagation(),o(n.id))},children:"▸"}),!b&&h.jsx("span",{className:Ne.leafSpacer}),h.jsx("span",{className:Ne.taskStatusIcon,style:{color:p.color},children:p.icon}),h.jsx("span",{className:Ne.taskTitle,title:n.title,children:n.title}),b&&h.jsxs("span",{className:Ne.childCountBadge,children:[n.children.filter(N=>N.status==="complete").length,"/",n.children.length]}),n.dependsOn.length>0&&h.jsx("span",{className:`${Ne.dependencyBadge} ${v?Ne.blockedBadge:""}`,title:`Depends on: ${n.dependsOn.join(", ")}`,children:v?"blocked":"dep"}),s<pA&&h.jsx("button",{onClick:N=>{N.stopPropagation(),d(Mi(f,n.id))},title:"Add child task","aria-label":"Add child task",className:Ne.addChildButton,children:"+"})]}),h.jsx(zs,{children:b&&y&&h.jsx(Fn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:n.children.map(N=>h.jsx(Xb,{node:N,depth:s+1,expandedTasks:l,toggleTask:o,selectedTaskId:c,navigate:d,projectId:f,taskStatusById:m},N.id))})})]})}function ew(){const{projects:n,tasks:s,loadTasks:l,createProject:o,projectCreating:c}=Qt(),d=oa(),[f,m]=S.useState(new Set),[p,v]=S.useState(new Set),[y,b]=S.useState(new Set),[_,T]=S.useState(!1),[N,D]=S.useState(""),[w,C]=S.useState(Dy),[H,O]=S.useState(Dy),[F,G]=S.useState(new Map),W=()=>{const V=!w;XN(V),C(V),V&&(O(!0),G(new Map))},ee=(V,pe)=>{const ie=`${V}:${pe}`;G(Ae=>{const Se=new Map(Ae),me=Se.has(ie)?Se.get(ie):H;return Se.set(ie,!me),Se})},$=(V,pe)=>{const ie=`${V}:${pe}`;return F.has(ie)?F.get(ie):H},ae=tn("/tasks/:taskId/*"),_e=tn("/projects/:projectId"),L=(ae==null?void 0:ae.params.taskId)!=="new"?ae==null?void 0:ae.params.taskId:void 0,be=_e==null?void 0:_e.params.projectId,te=S.useRef(f);te.current=f;const Be=S.useMemo(()=>new Map(s.map(V=>[V.id,V.status])),[s]),P=V=>{m(pe=>{const ie=new Set(pe);return ie.has(V)?ie.delete(V):(ie.add(V),l(V)),ie})},U=V=>{v(pe=>{const ie=new Set(pe);return ie.has(V)?(ie.delete(V),b(Ae=>new Set(Ae).add(V))):(ie.add(V),b(Ae=>{const Se=new Set(Ae);return Se.delete(V),Se})),ie})};S.useEffect(()=>{const V=new Set(s.filter(pe=>pe.parentTaskId).map(pe=>pe.parentTaskId));V.size>0&&v(pe=>{const ie=new Set(pe);for(const Ae of V)y.has(Ae)||ie.add(Ae);return ie})},[s,y]),S.useEffect(()=>{be&&!te.current.has(be)&&(m(V=>new Set(V).add(be)),l(be))},[be,l]);const K=()=>{!N.trim()||c||(o(N.trim()),D(""),T(!1))};return h.jsxs("div",{className:Ne.container,children:[h.jsxs("div",{className:Ne.header,children:[h.jsx("span",{children:"Projects"}),h.jsxs("div",{className:Ne.headerActions,children:[h.jsx("button",{className:`${Ne.groupToggle} ${w?Ne.groupToggleActive:""}`,onClick:W,"aria-label":w?"Switch to tree view":"Group tasks by status","aria-pressed":w,title:w?"Switch to tree view":"Group tasks by status","data-testid":"group-by-status-toggle",children:"≡"}),h.jsx("button",{className:Ne.addButton,onClick:()=>T(!_),"aria-label":"Create project",title:"Create project",children:"+"})]})]}),_&&h.jsxs("div",{className:Ne.createForm,children:[h.jsx("input",{type:"text",value:N,onChange:V=>D(V.target.value),onKeyDown:V=>V.key==="Enter"&&K(),placeholder:"Project name...",autoFocus:!0,disabled:c,className:Ne.createInput}),h.jsx("button",{onClick:K,className:Ne.createButton,disabled:c,children:c?h.jsx(wy,{size:"sm",label:"Creating project"}):"OK"})]}),c&&h.jsxs("div",{className:Ne.creatingHint,children:[h.jsx(wy,{size:"sm",label:"Creating project"}),"Creating project…"]}),n.length===0&&!_&&h.jsxs("div",{className:Ne.emptyCta,children:[h.jsx("button",{className:Ne.ctaButton,onClick:()=>T(!0),children:"Create Project"}),h.jsx("div",{className:Ne.ctaDescription,children:"Organize your work into projects"})]}),n.map(V=>{const pe=f.has(V.id),ie=s.filter(me=>me.projectId===V.id),Ae=be===V.id,Se=pe&&!w?WN(ie):[];return h.jsxs("div",{children:[h.jsxs("div",{onClick:()=>{Ae?P(V.id):(pe||P(V.id),d(Fl(V.id)))},className:`${Ne.projectRow} ${Ae?Ne.selected:""}`,children:[h.jsx("span",{className:`${Ne.expandArrow} ${pe?Ne.expanded:""}`,children:"▸"}),h.jsx("span",{className:Ne.projectName,title:V.name,children:V.name}),h.jsx("span",{className:Ne.taskCount,children:ie.length>0&&`${ie.filter(me=>me.status==="complete").length}/${ie.length}`}),h.jsx("button",{onClick:me=>{me.stopPropagation(),d(Mi(V.id))},title:"New task",className:Ne.newTaskButton,children:"+"})]}),h.jsx(zs,{children:pe&&h.jsxs(Fn.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:[w?QN(ie,Be).map(me=>h.jsx(JN,{group:me,isExpanded:$(V.id,me.status),onToggle:()=>ee(V.id,me.status),selectedTaskId:L,navigate:d},me.status)):Se.map(me=>h.jsx(Xb,{node:me,depth:0,expandedTasks:p,toggleTask:U,selectedTaskId:L,navigate:d,projectId:V.id,taskStatusById:Be},me.id)),ie.length===0&&h.jsx("div",{className:Ne.emptyTaskCta,children:h.jsx("button",{className:Ne.createTaskLink,onClick:()=>d(Mi(V.id)),children:"+ Create Task"})})]})})]},V.id)})]})}const tw="_container_1purk_1",nw="_content_1purk_30",ky={container:tw,content:nw},aw=320,$b=220,Fb=600,Qb="grackle-sidebar-width";function sw(){try{const n=localStorage.getItem(Qb);if(n!==null){const s=Number(n);if(Number.isFinite(s)&&s>=$b&&s<=Fb)return s}}catch{}return aw}function iw(n){try{localStorage.setItem(Qb,String(n))}catch{}}function lw(){const[n]=S.useState(sw),s=S.useRef(null);return S.useEffect(()=>{const l=s.current;if(!l)return;const o=new ResizeObserver(c=>{for(const d of c){const f=d.borderBoxSize[0];if(f){const m=Math.round(f.inlineSize);m>=$b&&m<=Fb&&iw(m)}}});return o.observe(l),()=>{o.disconnect()}},[]),h.jsx("div",{className:ky.container,ref:s,"data-testid":"sidebar",style:{width:n},children:h.jsx("div",{className:ky.content,children:h.jsx(ew,{})})})}const ow="_bar_teqep_1",rw="_barColumn_teqep_26",cw="_barRow_teqep_52",uw="_input_teqep_58",dw="_inputSmall_teqep_87",fw="_select_teqep_150",hw="_btnPrimary_teqep_180",mw="_btnDanger_teqep_211",pw="_btnGhost_teqep_250",gw="_badge_teqep_278",vw="_statusText_teqep_288",yw="_statusCompleted_teqep_293",bw="_statusFailed_teqep_297",Sw="_statusBlocked_teqep_301",xw="_hintText_teqep_306",_w="_creatingHint_teqep_311",Tw="_errorHint_teqep_319",Ew="_disconnectHint_teqep_325",fe={bar:ow,barColumn:rw,barRow:cw,input:uw,inputSmall:dw,select:fw,btnPrimary:hw,btnDanger:mw,btnGhost:pw,badge:gw,statusText:vw,statusCompleted:yw,statusFailed:bw,statusBlocked:Sw,hintText:xw,creatingHint:_w,errorHint:Tw,disconnectHint:Ew};function Ry({value:n,onChange:s,testId:l}){return h.jsxs("select",{"data-testid":l,value:n,onChange:o=>s(o.target.value),className:fe.select,children:[h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"}),h.jsx("option",{value:"stub",children:"stub"})]})}function My(n,s){if(!n)return!1;const l=s.find(o=>o.id===n);return l!==void 0&&(l.status==="disconnected"||l.status==="error")}function Oy({environmentId:n,onReconnect:s}){return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:fe.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),h.jsx("button",{type:"button",onClick:()=>s(n),className:fe.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function jw(){const{spawn:n,sendInput:s,kill:l,sessions:o,tasks:c,environments:d,personas:f,addEnvironment:m,provisionEnvironment:p,codespaces:v,codespaceError:y,codespaceListError:b,codespaceCreating:_,listCodespaces:T,createCodespace:N}=Qt(),{showToast:D}=no(),w=oa(),[C]=xf(),H=tn("/sessions/:sessionId"),O=tn("/tasks/:taskId"),F=tn("/tasks/:taskId/stream"),G=tn("/tasks/:taskId/findings"),W=tn("/tasks/:taskId/edit"),ee=tn("/sessions/new"),$=tn("/environments/new"),ae=tn("/projects/:projectId"),_e=tn("/tasks/new"),L=tn("/"),be=tn("/settings/*"),te=H==null?void 0:H.params.sessionId,Be=(O==null?void 0:O.params.taskId)??(F==null?void 0:F.params.taskId)??(G==null?void 0:G.params.taskId),P=!!ee,U=!!$,K=!!ae,V=!!_e,pe=!!W,ie=!!L&&!P&&!U&&!K&&!V,Ae=!!be,Se=P?C.get("env")??"":"",me=P?C.get("runtime")??"claude-code":"claude-code",[we,Q]=S.useState(""),[ue,Pe]=S.useState(P?me:"claude-code"),[J,sn]=S.useState(""),Qn=ve=>{if(sn(ve),ve){const oe=f.find(Ce=>Ce.id===ve);oe!=null&&oe.runtime&&Pe(oe.runtime)}},[ln,jn]=S.useState(""),[dt,Jt]=S.useState("local"),[Hn,Gn]=S.useState("claude-code"),[mn,In]=S.useState(""),[Yt,Pn]=S.useState(""),[X,se]=S.useState(""),[re,de]=S.useState(""),[Ee,je]=S.useState(""),[Xe,Me]=S.useState(""),[nt,xt]=S.useState(""),[pt,At]=S.useState(""),[at,gt]=S.useState(""),[Wt,ft]=S.useState("pick");S.useEffect(()=>{P&&Pe(me)},[P,me]);const Lt=te?o.find(ve=>ve.id===te):void 0,Ut=Be?c.find(ve=>ve.id===Be):void 0,us=(Ut==null?void 0:Ut.latestSessionId)||void 0,qn=us?o.find(ve=>ve.id===us):void 0,ne=Ut?Ut.dependsOn.some(ve=>{const oe=c.find(Ce=>Ce.id===ve);return oe&&oe.status!=="complete"}):!1;if(ie||Ae)return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:fe.hintText,children:"Select a session or click + to start"})});if(pe||V)return h.jsx(h.Fragment,{});if(U){const ve=q=>{if(!q.trim())return!0;const Qe=Number(q);return Number.isInteger(Qe)&&Qe>=1&&Qe<=65535},oe=()=>!(!ln.trim()||dt==="ssh"&&!mn.trim()||dt==="codespace"&&!Xe.trim()||(dt==="local"||dt==="ssh")&&!ve(Yt)),Ce=()=>{if(!oe())return;const q={};if(dt==="local"){if(mn.trim()&&(q.host=mn.trim()),Yt.trim()){const Qe=Number(Yt);Number.isInteger(Qe)&&(q.port=Qe)}}else if(dt==="ssh"){if(q.host=mn.trim(),X.trim()&&(q.user=X.trim()),Yt.trim()){const Qe=Number(Yt);Number.isInteger(Qe)&&(q.sshPort=Qe)}nt.trim()&&(q.identityFile=nt.trim())}else dt==="docker"?(re.trim()&&(q.image=re.trim()),Ee.trim()&&(q.repo=Ee.trim())):dt==="codespace"&&(q.codespaceName=Xe.trim());m(ln.trim(),dt,q,Hn),D("Environment added successfully","success"),jn(""),Jt("local"),Gn("claude-code"),In(""),Pn(""),se(""),de(""),je(""),Me(""),xt(""),At(""),gt(""),ft("pick"),w(Ri,{replace:!0})};return h.jsxs("div",{className:fe.barColumn,children:[h.jsxs("div",{className:fe.barRow,children:[h.jsx("span",{className:fe.badge,children:"new env"}),h.jsx("input",{type:"text",value:ln,onChange:q=>jn(q.target.value),placeholder:"Environment name...",autoFocus:!0,className:fe.input}),h.jsxs("select",{value:dt,onChange:q=>{Jt(q.target.value),q.target.value==="codespace"&&(T(),ft("pick"),Me(""))},className:fe.select,children:[h.jsx("option",{value:"local",children:"local"}),h.jsx("option",{value:"ssh",children:"ssh"}),h.jsx("option",{value:"docker",children:"docker"}),h.jsx("option",{value:"codespace",children:"codespace"})]}),h.jsx(Ry,{value:Hn,onChange:Gn,testId:"new-environment-runtime-select"}),h.jsx("button",{onClick:Ce,disabled:!oe(),className:fe.btnPrimary,children:"Add"})]}),h.jsxs("div",{className:fe.barRow,children:[dt==="local"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:mn,onChange:q=>In(q.target.value),placeholder:"Host (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:Yt,onChange:q=>Pn(q.target.value),placeholder:"Port (optional)...",className:fe.inputSmall})]}),dt==="ssh"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:mn,onChange:q=>In(q.target.value),placeholder:"Host (required)...",className:fe.inputSmall}),h.jsx("input",{type:"text",value:X,onChange:q=>se(q.target.value),placeholder:"User (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:Yt,onChange:q=>Pn(q.target.value),placeholder:"SSH port (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"text",value:nt,onChange:q=>xt(q.target.value),placeholder:"Identity file (optional)...",className:fe.inputSmall})]}),dt==="docker"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:re,onChange:q=>de(q.target.value),placeholder:"Image (optional)...",className:fe.inputSmall}),h.jsx("input",{type:"text",value:Ee,onChange:q=>je(q.target.value),placeholder:"Repo (optional)...",className:fe.inputSmall})]}),dt==="codespace"&&Wt==="pick"&&h.jsxs(h.Fragment,{children:[!b&&h.jsxs("select",{value:Xe,onChange:q=>{q.target.value==="__create__"?(ft("create"),Me("")):(Me(q.target.value),q.target.value&&!ln.trim()&&jn(q.target.value))},disabled:_,className:fe.select,children:[h.jsx("option",{value:"",children:"Select a codespace..."}),v.map(q=>h.jsxs("option",{value:q.name,children:[q.name," (",q.repository,") — ",q.state]},q.name)),h.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),_&&h.jsx("span",{className:fe.creatingHint,children:"Creating codespace..."}),b&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:fe.errorHint,children:b}),h.jsx("input",{type:"text",value:Xe,onChange:q=>Me(q.target.value),placeholder:"Or enter codespace name manually...",className:fe.inputSmall})]}),y&&!b&&h.jsx("span",{className:fe.errorHint,children:y})]}),dt==="codespace"&&Wt==="create"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:pt,onChange:q=>At(q.target.value),placeholder:"owner/repo",className:fe.inputSmall}),h.jsx("input",{type:"text",value:at,onChange:q=>gt(q.target.value),placeholder:"Machine type (optional)...",className:fe.inputSmall}),h.jsx("button",{onClick:()=>{pt.trim()&&(N(pt.trim(),at.trim()||void 0),ft("pick"),At(""),gt(""))},disabled:!pt.trim(),className:fe.btnPrimary,children:"Create"}),h.jsx("button",{onClick:()=>{ft("pick"),At(""),gt("")},className:fe.btnGhost,children:"Cancel"})]})]})]})}if(K)return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:fe.hintText,children:"Select a task or click + to create one"})});if(Be&&Ut){if(Ut.status==="not_started"){const ve=ne?Ut.dependsOn.map(oe=>c.find(Ce=>Ce.id===oe)).filter(oe=>oe&&oe.status!=="complete").map(oe=>oe.title):[];return h.jsx("div",{className:fe.bar,children:ne?h.jsxs("span",{className:fe.statusBlocked,children:["Blocked by: ",ve.join(", ")]}):h.jsx("span",{className:fe.hintText,children:"Use the buttons above to start or manage this task"})})}if(Ut.status==="working"||Ut.status==="paused"){if((qn==null?void 0:qn.status)==="idle"){const oe=qn.environmentId,Ce=My(oe,d),q=Qe=>{Qe.preventDefault();const on=Ut.latestSessionId||us;!we.trim()||!on||Ce||(s(on,we),Q(""))};return h.jsxs("form",{onSubmit:q,className:fe.bar,children:[Ce&&oe&&h.jsx(Oy,{environmentId:oe,onReconnect:p}),h.jsx("input",{type:"text",value:we,onChange:Qe=>Q(Qe.target.value),placeholder:"Type a message...",autoFocus:!Ce,disabled:Ce,className:fe.input}),h.jsx("span",{title:Ce?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!we.trim()||Ce,className:fe.btnPrimary,children:"Send"})})]})}return h.jsx("div",{className:fe.bar,children:h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:fe.input})})}if(Ut.status==="complete")return h.jsxs("div",{className:fe.bar,children:[h.jsx("span",{className:`${fe.statusText} ${fe.statusCompleted}`,children:"Task completed"}),h.jsx("button",{onClick:()=>w(Mi(Ut.projectId)),className:fe.btnPrimary,children:"+ New Task"})]});if(Ut.status==="failed")return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:`${fe.statusText} ${fe.statusFailed}`,children:"Task failed"})})}if(P){const ve=oe=>{oe.preventDefault(),!(!we.trim()||!Se)&&(n(Se,we,void 0,ue,J),D("Session started","success"),Q(""),sn(""))};return h.jsxs("form",{onSubmit:ve,className:fe.bar,children:[h.jsx("span",{className:fe.badge,children:"new chat"}),h.jsx("input",{type:"text",value:we,onChange:oe=>Q(oe.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:fe.input}),h.jsx(Ry,{value:ue,onChange:Pe,testId:"new-chat-runtime-select"}),h.jsxs("select",{value:J,onChange:oe=>Qn(oe.target.value),className:fe.select,children:[h.jsx("option",{value:"",children:"No persona"}),f.map(oe=>h.jsx("option",{value:oe.id,children:oe.name},oe.id))]}),h.jsx("button",{type:"submit",disabled:!we.trim()||!Se,className:fe.btnPrimary,children:"Go"})]})}if(te){const ve=(Lt==null?void 0:Lt.status)==="running",oe=(Lt==null?void 0:Lt.status)==="idle",Ce=Lt!==void 0&&["completed","failed","interrupted"].includes(Lt.status);if(ve)return h.jsxs("div",{className:fe.bar,children:[h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:fe.input}),h.jsx("button",{onClick:()=>l(te),className:fe.btnDanger,title:"Stop session",children:"Stop"})]});if(oe){const q=My(Lt.environmentId,d),Qe=on=>{on.preventDefault(),!(!we.trim()||q)&&(s(te,we),Q(""))};return h.jsxs("form",{onSubmit:Qe,className:fe.bar,children:[q&&Lt.environmentId&&h.jsx(Oy,{environmentId:Lt.environmentId,onReconnect:p}),h.jsx("input",{type:"text",value:we,onChange:on=>Q(on.target.value),placeholder:"Type a message...",autoFocus:!q,disabled:q,className:fe.input}),h.jsx("span",{title:q?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!we.trim()||q,className:fe.btnPrimary,children:"Send"})}),h.jsx("button",{type:"button",onClick:()=>l(te),className:fe.btnDanger,title:"Stop session",children:"Stop"})]})}if(Ce)return h.jsxs("div",{className:fe.bar,children:[h.jsxs("span",{className:`${fe.statusText} ${fe.hintText}`,children:["Session ",Lt.status]}),h.jsx("button",{onClick:()=>w(p0(Lt.environmentId,Lt.runtime)),className:fe.btnPrimary,children:"+ New Chat"})]})}return h.jsx("div",{className:fe.bar,children:h.jsx("span",{className:fe.hintText,children:"Loading..."})})}const Cw="_toast_da8ll_1",Aw="_success_da8ll_18",Nw="_icon_da8ll_22",ww="_error_da8ll_25",Dw="_warning_da8ll_32",kw="_info_da8ll_38",Rw="_message_da8ll_53",Mw="_close_da8ll_60",Ul={toast:Cw,success:Aw,icon:Nw,error:ww,warning:Dw,info:kw,message:Rw,close:Mw},Ow={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function Bw({toast:n,onDismiss:s}){return S.useEffect(()=>{const l=setTimeout(()=>s(n.id),n.duration);return()=>clearTimeout(l)},[n.id,n.duration,s]),h.jsxs(Fn.div,{className:`${Ul.toast} ${Ul[n.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:[h.jsx("span",{className:Ul.icon,"aria-hidden":"true",children:Ow[n.variant]}),h.jsx("span",{className:Ul.message,children:n.message}),h.jsx("button",{type:"button",className:Ul.close,onClick:()=>s(n.id),"aria-label":"Dismiss notification",children:"×"})]})}const Lw="_container_qqse2_1",Uw={container:Lw};function zw(){const{toasts:n,dismissToast:s}=no();return h.jsx("div",{className:Uw.container,"data-testid":"toast-container",children:h.jsx(zs,{children:n.map(l=>h.jsx(Bw,{toast:l,onDismiss:s},l.id))})})}function Vw(n,s){const l=S.useRef(null);S.useEffect(()=>{const o=l.current;if(l.current=n,o===null)return;const c=new Map;for(const f of o)c.set(f.id,f);const d=new Set;for(const f of n){d.add(f.id);const m=c.get(f.id);m&&m.status!==f.status&&(f.status==="connecting"||f.status==="sleeping"||(f.status==="connected"?s("Environment connected","success"):f.status==="error"?s("Environment provision failed","error"):f.status==="disconnected"&&(m.status==="connected"?s("Environment disconnected","warning"):s("Environment stopped","info"))))}for(const f of o)d.has(f.id)||s("Environment removed","info")},[n,s])}const Hw="_panelContainer_1blx0_1",Gw="_emptyState_1blx0_8",Iw="_projectSummary_1blx0_17",Pw="_projectSummaryTitle_1blx0_28",qw="_projectSummarySubtitle_1blx0_32",Yw="_header_1blx0_36",Kw="_headerInfo_1blx0_63",Zw="_killButton_1blx0_69",Xw="_headerTitle_1blx0_98",$w="_headerActions_1blx0_108",Fw="_taskStatusBadge_1blx0_115",Qw="_taskBranch_1blx0_124",Jw="_taskBlockedBadge_1blx0_130",Ww="_btnPrimary_1blx0_138",eD="_btnDanger_1blx0_169",tD="_btnGhost_1blx0_208",nD="_tabBar_1blx0_264",aD="_tab_1blx0_264",sD="_active_1blx0_285",iD="_eventScroll_1blx0_290",lD="_tabContent_1blx0_296",oD="_noContext_1blx0_301",rD="_overviewContent_1blx0_307",cD="_overviewDashboard_1blx0_316",uD="_overviewHero_1blx0_322",dD="_statusBadge_1blx0_329",fD="_statusPending_1blx0_341",hD="_statusInProgress_1blx0_351",mD="_statusDone_1blx0_361",pD="_statusFailed_1blx0_366",gD="_statusWaitingInput_1blx0_371",vD="_overviewBranchPill_1blx0_376",yD="_branchLink_1blx0_391",bD="_overviewSection_1blx0_402",SD="_overviewLabel_1blx0_408",xD="_overviewValue_1blx0_415",_D="_overviewMuted_1blx0_420",TD="_overviewMarkdown_1blx0_426",ED="_envRow_1blx0_495",jD="_envDot_1blx0_501",CD="_envDotGreen_1blx0_508",AD="_envDotYellow_1blx0_512",ND="_envDotRed_1blx0_516",wD="_envDotGray_1blx0_520",DD="_depList_1blx0_524",kD="_depItem_1blx0_530",RD="_depBlocked_1blx0_537",MD="_depDone_1blx0_541",OD="_timeline_1blx0_545",BD="_timelineRow_1blx0_551",LD="_timelineKey_1blx0_558",UD="_timelineValue_1blx0_564",zD="_timelineDelta_1blx0_568",VD="_reviewNotes_1blx0_579",HD="_waitingMessage_1blx0_596",GD="_errorMessage_1blx0_600",ID="_eventOverflowWarning_1blx0_604",PD="_attemptSelector_1blx0_618",qD="_attemptLabel_1blx0_629",YD="_attemptButton_1blx0_633",KD="_attemptActive_1blx0_650",ZD="_attemptStatus_1blx0_656",XD="_emptyCta_1blx0_662",$D="_ctaTitle_1blx0_674",FD="_ctaDescription_1blx0_680",QD="_ctaButton_1blx0_687",JD="_projectHeader_1blx0_736",WD="_projectName_1blx0_761",ek="_projectMeta_1blx0_774",tk="_metaRow_1blx0_782",nk="_metaLabel_1blx0_789",ak="_metaValue_1blx0_799",sk="_metaPlaceholder_1blx0_809",ik="_editButton_1blx0_814",lk="_editInput_1blx0_830",ok="_editTextarea_1blx0_862",rk="_editSelect_1blx0_898",ck="_archiveButton_1blx0_931",uk="_repoLink_1blx0_961",dk="_metaValueClickable_1blx0_971",fk="_editHint_1blx0_990",hk="_editError_1blx0_999",mk="_editInputInvalid_1blx0_1006",pk="_unsavedDot_1blx0_1011",gk="_metaToggle_1blx0_1019",vk="_metaToggleArrow_1blx0_1040",yk="_metaToggleArrowOpen_1blx0_1045",bk="_progressBarContainer_1blx0_1049",Sk="_progressBar_1blx0_1049",xk="_progressFill_1blx0_1065",_k="_progressLabel_1blx0_1072",Tk="_metaTimestamps_1blx0_1079",Ek="_metaTimestamp_1blx0_1079",jk="_editFieldWrapper_1blx0_1095",A={panelContainer:Hw,emptyState:Gw,projectSummary:Iw,projectSummaryTitle:Pw,projectSummarySubtitle:qw,header:Yw,headerInfo:Kw,killButton:Zw,headerTitle:Xw,headerActions:$w,taskStatusBadge:Fw,taskBranch:Qw,taskBlockedBadge:Jw,btnPrimary:Ww,btnDanger:eD,btnGhost:tD,tabBar:nD,tab:aD,active:sD,eventScroll:iD,tabContent:lD,noContext:oD,overviewContent:rD,overviewDashboard:cD,overviewHero:uD,statusBadge:dD,statusPending:fD,statusInProgress:hD,statusDone:mD,statusFailed:pD,statusWaitingInput:gD,overviewBranchPill:vD,branchLink:yD,overviewSection:bD,overviewLabel:SD,overviewValue:xD,overviewMuted:_D,overviewMarkdown:TD,envRow:ED,envDot:jD,envDotGreen:CD,envDotYellow:AD,envDotRed:ND,envDotGray:wD,depList:DD,depItem:kD,depBlocked:RD,depDone:MD,timeline:OD,timelineRow:BD,timelineKey:LD,timelineValue:UD,timelineDelta:zD,reviewNotes:VD,waitingMessage:HD,errorMessage:GD,eventOverflowWarning:ID,attemptSelector:PD,attemptLabel:qD,attemptButton:YD,attemptActive:KD,attemptStatus:ZD,emptyCta:XD,ctaTitle:$D,ctaDescription:FD,ctaButton:QD,projectHeader:JD,projectName:WD,projectMeta:ek,metaRow:tk,metaLabel:nk,metaValue:ak,metaPlaceholder:sk,editButton:ik,editInput:lk,editTextarea:ok,editSelect:rk,archiveButton:ck,repoLink:uk,metaValueClickable:dk,editHint:fk,editError:hk,editInputInvalid:mk,unsavedDot:pk,metaToggle:gk,metaToggleArrow:vk,metaToggleArrowOpen:yk,progressBarContainer:bk,progressBar:Sk,progressFill:xk,progressLabel:_k,metaTimestamps:Tk,metaTimestamp:Ek,editFieldWrapper:jk};function Ck(){const{projects:n,createProject:s}=Qt();return n.length===0?h.jsxs("div",{className:A.emptyCta,children:[h.jsx("div",{className:A.ctaTitle,children:"Welcome to Grackle"}),h.jsx("div",{className:A.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),h.jsx("button",{className:A.ctaButton,onClick:()=>{const l=window.prompt("Project name:");l!=null&&l.trim()&&s(l.trim())},children:"Create Your First Project"})]}):h.jsx("div",{className:A.emptyState,children:"Select a project or task to get started"})}function Ak(n,s){const l=[];let o=n;const c=new Set;for(;o&&s.has(o)&&!c.has(o);){c.add(o);const d=s.get(o);l.unshift(d),o=d.parentTaskId||void 0}return l}const Ls={label:"Home",url:"/"};function Nk(n){return n?[Ls,{label:"Settings",url:"/settings"},{label:n,url:void 0}]:[Ls,{label:"Settings",url:void 0}]}function wk(){return[Ls,{label:"New Environment",url:void 0}]}function Dk(){return[Ls,{label:"New Chat",url:void 0}]}function kk(n){return[Ls,{label:`Session ${n.slice(0,8)}`,url:void 0}]}function Rk(n,s){const l=s.find(o=>o.id===n);return[Ls,{label:(l==null?void 0:l.name)??"Project",url:void 0}]}function Mk(n,s,l){const o=Ak(n,l),c=l.get(n),d=c==null?void 0:c.projectId,f=d?s.find(v=>v.id===d):void 0,m=[Ls];f&&m.push({label:f.name,url:Fl(f.id)});for(let v=0;v<o.length-1;v++)m.push({label:o[v].title,url:Bs(o[v].id)});const p=o[o.length-1];return m.push({label:(p==null?void 0:p.title)??n,url:void 0}),m}function Ok(){const n=Dk();return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Gi,{segments:n}),h.jsx("div",{className:A.emptyState,children:"Enter a prompt below to start a new session"})]})}function Jb(n){const s=[];for(const l of n){const o=s[s.length-1];l.eventType==="text"&&(o==null?void 0:o.eventType)==="text"?s[s.length-1]={...o,content:o.content+l.content}:s.push(l)}return s}function Wb(n){const s=new Map;for(const d of n)if(d.raw)try{s.set(d,JSON.parse(d.raw))}catch{}const l=new Map;for(const d of n){if(d.eventType!=="tool_use")continue;const f=s.get(d);if(!(!f||typeof f.id!="string"))try{const m=JSON.parse(d.content);l.set(f.id,{tool:m.tool,args:m.args})}catch{}}const o=new Set;return n.map(d=>{if(d.eventType!=="tool_result")return d;const f=s.get(d);if(!f||typeof f.tool_use_id!="string")return d;const m=l.get(f.tool_use_id);return m?(o.add(f.tool_use_id),{...d,toolUseCtx:m}):d}).filter(d=>{if(d.eventType!=="tool_use")return!0;const f=s.get(d);return f&&typeof f.id=="string"?!o.has(f.id):!0})}function Bk({sessionId:n,session:s,isActive:l,onKill:o}){return h.jsxs("div",{className:A.header,children:[h.jsxs("span",{children:["Session: ",n.slice(0,8),s&&` | ${s.runtime} | ${s.status}`]}),h.jsxs("span",{className:A.headerInfo,children:[s&&h.jsx("span",{children:s.prompt.length>60?s.prompt.slice(0,60)+"...":s.prompt}),l&&h.jsx("button",{onClick:()=>o(n),title:"Stop session",className:A.killButton,children:"×"})]})]})}function Lk({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:A.eventOverflowWarning,role:"alert",children:["⚠ ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function Uk({sessionEvents:n,session:s,eventsDropped:l,scrollRef:o}){const c=s&&["completed","failed","interrupted"].includes(s.status),d=c?`Session ${s.status} with no events recorded.`:"Waiting for events...";return h.jsxs("div",{ref:o,className:A.eventScroll,children:[n.length===0&&h.jsx("div",{className:c?A.errorMessage:A.waitingMessage,children:d}),h.jsx(Lk,{eventsDropped:l}),n.map((f,m)=>h.jsx(Yb,{event:f,toolUseCtx:f.toolUseCtx},`${f.sessionId}-${f.timestamp}-${m}`))]})}function zk(){const{sessionId:n}=Wr(),{events:s,eventsDropped:l,sessions:o,kill:c,loadSessionEvents:d}=Qt(),f=S.useRef(null),m=S.useRef(void 0),p=kk(n),v=o.find(_=>_.id===n)??void 0,y=S.useMemo(()=>{const _=n?s.filter(T=>T.sessionId===n):[];return Wb(Jb(_))},[s,n]);if(S.useEffect(()=>{n&&n!==m.current&&(m.current=n,d(n))},[n,d]),S.useEffect(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight)},[y.length]),!n)return h.jsx("div",{className:A.emptyState,children:"No session selected"});const b=(v==null?void 0:v.status)==="running"||(v==null?void 0:v.status)==="idle";return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Gi,{segments:p}),h.jsx(Bk,{sessionId:n,session:v,isActive:b,onKill:c}),h.jsx(Uk,{sessionEvents:y,session:v,eventsDropped:l,scrollRef:f})]})}const By=220,Ly=70,Vk=40,Hk=60,Gk="hierarchy",Ik="dependency";function Pk(n){return S.useMemo(()=>{if(n.length===0)return{nodes:[],edges:[]};const s=new qg.graphlib.Graph({multigraph:!0});s.setDefaultEdgeLabel(()=>({})),s.setGraph({rankdir:"TB",nodesep:Vk,ranksep:Hk});const l=new Map(n.map(f=>[f.id,f])),o=new Map;for(const f of n)if(f.parentTaskId&&l.has(f.parentTaskId)){const m=o.get(f.parentTaskId)||[];m.push(f),o.set(f.parentTaskId,m)}for(const f of n)s.setNode(f.id,{width:By,height:Ly});const c=[];for(const f of n){if(f.parentTaskId&&l.has(f.parentTaskId)){const m=`hierarchy-${f.parentTaskId}-${f.id}`;s.setEdge(f.parentTaskId,f.id,{},m),c.push({id:m,source:f.parentTaskId,target:f.id,type:"smoothstep",data:{edgeType:Gk},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const m of f.dependsOn)if(l.has(m)){const p=`dependency-${m}-${f.id}`;s.setEdge(m,f.id,{},p),c.push({id:p,source:m,target:f.id,type:"smoothstep",data:{edgeType:Ik},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return qg.layout(s),{nodes:n.map(f=>{const m=s.node(f.id),p=o.get(f.id)||[];return{id:f.id,type:"task",position:{x:m.x-By/2,y:m.y-Ly/2},data:{task:f,childCount:p.length,doneChildCount:p.filter(v=>v.status==="complete").length,hasDependencies:f.dependsOn.length>0}}}),edges:c}},[n])}const qk="_dagContainer_3al6d_1",Yk="_taskNode_3al6d_26",Kk="_taskNodeBorder_3al6d_48",Zk="_taskNodeContent_3al6d_54",Xk="_taskNodeHeader_3al6d_64",$k="_taskNodeIcon_3al6d_71",Fk="_taskNodeTitle_3al6d_76",Qk="_taskNodeBadges_3al6d_84",Jk="_childBadge_3al6d_89",Wk="_depBadge_3al6d_101",eR="_handle_3al6d_113",tR="_emptyCta_3al6d_120",nR="_ctaDescription_3al6d_131",aR="_ctaButton_3al6d_138",nn={dagContainer:qk,taskNode:Yk,taskNodeBorder:Kk,taskNodeContent:Zk,taskNodeHeader:Xk,taskNodeIcon:$k,taskNodeTitle:Fk,taskNodeBadges:Qk,childBadge:Jk,depBadge:Wk,handle:eR,emptyCta:tR,ctaDescription:nR,ctaButton:aR},Uy={not_started:{color:"var(--text-tertiary)",icon:"○"},working:{color:"var(--accent-green)",icon:"●"},paused:{color:"var(--accent-yellow)",icon:"◉"},complete:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"}};function sR({data:n}){const{task:s,childCount:l,doneChildCount:o,hasDependencies:c}=n,d=Uy[s.status]||Uy.not_started;return h.jsxs("div",{className:nn.taskNode,"data-task-id":s.id,"data-task-title":s.title,children:[h.jsx(Yg,{type:"target",position:Kg.Top,className:nn.handle}),h.jsx("div",{className:nn.taskNodeBorder,style:{backgroundColor:d.color}}),h.jsxs("div",{className:nn.taskNodeContent,children:[h.jsxs("div",{className:nn.taskNodeHeader,children:[h.jsx("span",{className:nn.taskNodeIcon,style:{color:d.color},children:d.icon}),h.jsx("span",{className:nn.taskNodeTitle,children:s.title})]}),h.jsxs("div",{className:nn.taskNodeBadges,children:[l>0&&h.jsxs("span",{className:nn.childBadge,children:[o,"/",l]}),c&&h.jsx("span",{className:nn.depBadge,children:"dep"})]})]}),h.jsx(Yg,{type:"source",position:Kg.Bottom,className:nn.handle})]})}const iR={pending:"--text-tertiary",assigned:"--accent-blue",in_progress:"--accent-green",review:"--accent-yellow",done:"--accent-green",failed:"--accent-red",waiting_input:"--accent-yellow"},lR={task:sR};function oR({projectId:n}){const{tasks:s}=Qt(),l=oa(),{resolvedThemeId:o}=Xy(),c=S.useMemo(()=>s.filter(y=>y.projectId===n),[s,n]),{nodes:d,edges:f}=Pk(c),m=S.useMemo(()=>{const y=getComputedStyle(document.documentElement),b={};for(const[_,T]of Object.entries(iR))b[_]=y.getPropertyValue(T).trim()||"#6b7a8d";return b},[o]),p=S.useCallback((y,b)=>{l(Bs(b.id))},[l]),v=S.useCallback(y=>{const b=y.data;return m[b.task.status]||m.pending},[m]);return c.length===0?h.jsxs("div",{className:nn.emptyCta,children:[h.jsx("button",{className:nn.ctaButton,onClick:()=>l(Mi(n)),children:"Create Task"}),h.jsx("div",{className:nn.ctaDescription,children:"Create tasks to see the dependency graph"})]}):h.jsx("div",{className:nn.dagContainer,children:h.jsxs(gx,{nodes:d,edges:f,nodeTypes:lR,onNodeClick:p,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[h.jsx(vx,{variant:yx.Dots,gap:24,size:1,color:"var(--text-disabled)"}),h.jsx(bx,{showInteractive:!1}),h.jsx(Sx,{nodeColor:v,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}function rR(n){const s=n.toLowerCase();return s==="ready"||s==="running"||s==="available"||s==="connected"?A.envDotGreen:s==="provisioning"||s==="starting"||s==="pending"||s==="connecting"?A.envDotYellow:s==="error"||s==="failed"||s==="disconnected"?A.envDotRed:A.envDotGray}function zy(n){if(!n)return"";const s=new Date(n);if(isNaN(s.getTime()))return"";const o=Date.now()-s.getTime();if(o<0)return"just now";const c=Math.floor(o/6e4);if(c<1)return"just now";if(c<60)return`${c}m ago`;const d=Math.floor(c/60);if(d<24)return`${d}h ago`;const f=Math.floor(d/24);return f<30?`${f}d ago`:s.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function cR(){const{projectId:n}=Wr(),s=oa(),{tasks:l,environments:o,projects:c,archiveProject:d,updateProject:f}=Qt(),[m,p]=S.useState("tasks"),[v,y]=S.useState(!1),[b,_]=S.useState(null),[T,N]=S.useState(""),[D,w]=S.useState(""),[C,H]=S.useState(!1),O=S.useRef(void 0),F=S.useRef(null),G=S.useRef(null),W=S.useRef(null),ee=S.useRef(null),$=S.useRef(null),ae=S.useRef(null),_e=Rk(n,c);S.useEffect(()=>{const Q=O.current;O.current=n,!(Q===void 0||Q===n)&&(b!==null||T!=="")&&(_(null),N(""))},[n,b,T]),S.useEffect(()=>{if(b===null)return;const Q=b==="name"?G.current:b==="description"?W.current:b==="repoUrl"?ee.current:b==="worktreeBasePath"?ae.current:$.current;if(!Q)return;const ue=window.setTimeout(()=>{Q.focus()},0);return()=>{window.clearTimeout(ue)}},[b]);const L=c.find(Q=>Q.id===n),be=l.filter(Q=>Q.projectId===n),te=be.filter(Q=>Q.status==="complete").length,Be=be.length,P=Be>0?Math.round(te/Be*100):0,U=100,K=(Q,ue)=>{F.current=Q,_(Q),N(ue),w("")},V=()=>{F.current=null,_(null),N(""),w("")},pe=(Q,ue)=>{if(Q==="name"){const Pe=ue.trim();if(!Pe)return"Name is required";if(Pe.length>U)return`Max ${U} characters`}if(Q==="repoUrl"){const Pe=ue.trim();if(Pe&&!/^https?:\/\/.+/.test(Pe))return"Must be a valid http(s) URL"}return""},ie=Q=>{if(!L)return;const ue=T.trim(),Pe=pe(Q,T);if(Pe){w(Pe);return}if(Q==="name"){if(ue===L.name){V();return}f(L.id,{name:ue})}else if(Q==="description"){const J=T;if(J===L.description){V();return}f(L.id,{description:J})}else if(Q==="repoUrl"){if(ue===L.repoUrl){V();return}f(L.id,{repoUrl:ue})}else if(Q==="defaultEnvironmentId"){if(T===L.defaultEnvironmentId){V();return}f(L.id,{defaultEnvironmentId:T})}else{if(ue===L.worktreeBasePath){V();return}f(L.id,{worktreeBasePath:ue})}V()},Ae=(Q,ue)=>{Q.key==="Escape"?V():Q.key==="Enter"&&ue!=="description"&&ie(ue)},Se=Q=>L?Q==="name"?T.trim()!==L.name:Q==="description"?T!==L.description:Q==="repoUrl"?T.trim()!==L.repoUrl:Q==="defaultEnvironmentId"?T!==L.defaultEnvironmentId:T.trim()!==L.worktreeBasePath:!1,me=o.find(Q=>Q.id===(L==null?void 0:L.defaultEnvironmentId)),we=b==="description"?"Tab to save · Esc to cancel":"Enter to save · Esc to cancel";return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Gi,{segments:_e}),h.jsxs("div",{className:A.projectHeader,children:[h.jsx("span",{className:A.projectName,"data-testid":"project-name",children:b==="name"?h.jsxs("div",{className:A.editFieldWrapper,children:[h.jsx("input",{ref:G,className:`${A.editInput} ${D?A.editInputInvalid:""}`,value:T,onChange:Q=>{N(Q.target.value),w("")},onBlur:Q=>{if(F.current==="name"){F.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="name"||ie("name")},onKeyDown:Q=>Ae(Q,"name"),maxLength:U,"aria-label":"Project name","data-testid":"edit-name-input"}),Se("name")&&h.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),D&&h.jsx("span",{className:A.editError,"data-testid":"edit-error",children:D}),h.jsx("span",{className:A.editHint,children:we})]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>K("name",(L==null?void 0:L.name)||""),title:"Click to edit name","aria-label":`Edit project name: ${(L==null?void 0:L.name)||n}`,"data-testid":"edit-name-button",children:[(L==null?void 0:L.name)||n,h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})}),h.jsx("button",{className:A.archiveButton,onClick:()=>y(!0),title:"Archive project","data-testid":"archive-project-button",children:"Archive"})]}),h.jsxs("button",{className:A.metaToggle,onClick:()=>H(!C),"aria-expanded":!C,"aria-controls":"project-meta-panel","data-testid":"meta-toggle",children:[h.jsx("span",{className:`${A.metaToggleArrow} ${C?"":A.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!C&&h.jsxs("div",{className:A.projectMeta,"data-testid":"project-meta",id:"project-meta-panel",children:[h.jsxs("div",{className:A.metaRow,children:[h.jsx("span",{className:A.metaLabel,children:"Description"}),h.jsx("div",{className:A.metaValue,children:b==="description"?h.jsxs("div",{className:A.editFieldWrapper,children:[h.jsx("textarea",{ref:W,className:A.editTextarea,value:T,onChange:Q=>{N(Q.target.value),w("")},onBlur:Q=>{if(F.current==="description"){F.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="description"||ie("description")},onKeyDown:Q=>Ae(Q,"description"),title:"Project description","aria-label":"Project description","data-testid":"edit-description-input"}),Se("description")&&h.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),h.jsx("span",{className:A.editHint,children:we})]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>K("description",(L==null?void 0:L.description)||""),title:"Click to edit description","aria-label":"Edit project description","data-testid":"edit-description-button",children:[L!=null&&L.description?h.jsx("span",{className:A.overviewMarkdown,children:h.jsx(df,{remarkPlugins:[ff],children:L.description})}):h.jsx("span",{className:A.metaPlaceholder,children:"No description"}),h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:A.metaRow,children:[h.jsx("span",{className:A.metaLabel,children:"Repository"}),h.jsx("div",{className:A.metaValue,children:b==="repoUrl"?h.jsxs("div",{className:A.editFieldWrapper,children:[h.jsx("input",{ref:ee,className:`${A.editInput} ${D?A.editInputInvalid:""}`,value:T,onChange:Q=>{N(Q.target.value),w("")},onBlur:Q=>{if(F.current==="repoUrl"){F.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="repoUrl"||ie("repoUrl")},onKeyDown:Q=>Ae(Q,"repoUrl"),placeholder:"https://github.com/...","aria-label":"Project repository URL","data-testid":"edit-repo-input"}),Se("repoUrl")&&h.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),D&&h.jsx("span",{className:A.editError,"data-testid":"edit-error",children:D}),h.jsx("span",{className:A.editHint,children:we})]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:Q=>{Q.preventDefault(),K("repoUrl",(L==null?void 0:L.repoUrl)||"")},title:"Click to edit repository URL","aria-label":"Edit project repository URL","data-testid":"edit-repo-button",children:[L!=null&&L.repoUrl&&/^https?:\/\//i.test(L.repoUrl)?h.jsx("a",{className:A.repoLink,href:L.repoUrl,target:"_blank",rel:"noopener noreferrer",onClick:Q=>Q.stopPropagation(),children:L.repoUrl}):L!=null&&L.repoUrl?h.jsx("span",{children:L.repoUrl}):h.jsx("span",{className:A.metaPlaceholder,children:"No repository"}),h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:A.metaRow,children:[h.jsx("span",{className:A.metaLabel,children:"Environment"}),h.jsx("div",{className:A.metaValue,children:b==="defaultEnvironmentId"?h.jsxs("select",{ref:$,className:A.editSelect,value:T,onChange:Q=>{F.current=null,N(Q.target.value);const ue=Q.target.value;L&&ue!==L.defaultEnvironmentId&&f(L.id,{defaultEnvironmentId:ue}),V()},onBlur:Q=>{if(F.current==="defaultEnvironmentId"){F.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="defaultEnvironmentId"||V()},title:"Default environment","aria-label":"Project default environment","data-testid":"edit-env-select",children:[h.jsx("option",{value:"",children:"None"}),o.map(Q=>h.jsx("option",{value:Q.id,children:Q.displayName},Q.id))]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>K("defaultEnvironmentId",(L==null?void 0:L.defaultEnvironmentId)||""),title:"Click to change default environment","aria-label":"Edit project default environment","data-testid":"edit-env-button",children:[me?h.jsxs("span",{className:A.envRow,children:[h.jsx("span",{className:`${A.envDot} ${rR(me.status)}`}),me.displayName]}):h.jsx("span",{className:A.metaPlaceholder,children:(L==null?void 0:L.defaultEnvironmentId)||"No default environment"}),h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:A.metaRow,children:[h.jsx("span",{className:A.metaLabel,children:"Worktree Base"}),h.jsx("div",{className:A.metaValue,children:b==="worktreeBasePath"?h.jsxs("div",{className:A.editFieldWrapper,children:[h.jsx("input",{ref:ae,className:`${A.editInput} ${D?A.editInputInvalid:""}`,value:T,onChange:Q=>{N(Q.target.value),w("")},onBlur:Q=>{if(F.current==="worktreeBasePath"){F.current=null;return}Q.relatedTarget instanceof HTMLElement&&Q.relatedTarget.dataset.editAction==="worktreeBasePath"||ie("worktreeBasePath")},onKeyDown:Q=>Ae(Q,"worktreeBasePath"),placeholder:"/workspaces/my-repo","aria-label":"Worktree base path","data-testid":"edit-worktree-base-path-input"}),Se("worktreeBasePath")&&h.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),D&&h.jsx("span",{className:A.editError,"data-testid":"edit-error",children:D}),h.jsx("span",{className:A.editHint,children:we})]}):h.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>K("worktreeBasePath",(L==null?void 0:L.worktreeBasePath)||""),title:"Click to edit worktree base path","aria-label":"Edit worktree base path","data-testid":"edit-worktree-base-path-button",children:[L!=null&&L.worktreeBasePath?h.jsx("span",{children:L.worktreeBasePath}):h.jsx("span",{className:A.metaPlaceholder,children:"Default (server default)"}),h.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),L&&h.jsxs("div",{className:A.metaTimestamps,children:[h.jsxs("span",{className:A.metaTimestamp,children:["Created ",zy(L.createdAt)]}),L.updatedAt&&L.updatedAt!==L.createdAt&&h.jsxs("span",{className:A.metaTimestamp,children:["· Updated ",zy(L.updatedAt)]})]})]}),Be>0&&h.jsxs("div",{className:A.progressBarContainer,"data-testid":"progress-bar",children:[h.jsx("div",{className:A.progressBar,children:h.jsx("div",{className:A.progressFill,style:{width:`${P}%`}})}),h.jsxs("span",{className:A.progressLabel,children:[te,"/",Be]})]}),h.jsxs("div",{className:A.tabBar,role:"tablist","aria-label":"Project view",children:[h.jsx("button",{role:"tab","aria-selected":m==="graph",className:`${A.tab} ${m==="graph"?A.active:""}`,onClick:()=>p("graph"),children:"Graph"}),h.jsx("button",{role:"tab","aria-selected":m==="tasks",className:`${A.tab} ${m==="tasks"?A.active:""}`,onClick:()=>p("tasks"),children:"Tasks"})]}),m==="tasks"&&Be>0&&h.jsxs("div",{className:A.projectSummary,children:[h.jsx("span",{className:A.projectSummaryTitle,children:`${te}/${Be} tasks complete`}),h.jsx("span",{className:A.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),m==="tasks"&&Be===0&&h.jsxs("div",{className:A.emptyCta,children:[h.jsx("button",{className:A.ctaButton,onClick:()=>s(Mi(n)),children:"Create Task"}),h.jsx("div",{className:A.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),m==="graph"&&h.jsx(oR,{projectId:n}),h.jsx(oc,{isOpen:v,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{L&&(d(L.id),s("/",{replace:!0})),y(!1)},onCancel:()=>y(!1)})]})}const uR="_container_yc33j_1",dR="_header_yc33j_8",fR="_headerTitle_yc33j_35",hR="_badge_yc33j_44",mR="_headerActions_yc33j_54",pR="_body_yc33j_61",gR="_formContent_yc33j_68",vR="_section_yc33j_75",yR="_label_yc33j_81",bR="_titleInput_yc33j_88",SR="_descriptionTextarea_yc33j_121",xR="_parentContext_yc33j_157",_R="_parentLabel_yc33j_165",TR="_parentName_yc33j_172",ER="_depList_yc33j_210",jR="_depItem_yc33j_216",CR="_depItemSelected_yc33j_238",AR="_noDeps_yc33j_242",NR="_btnPrimary_yc33j_248",wR="_btnGhost_yc33j_279",ut={container:uR,header:dR,headerTitle:fR,badge:hR,headerActions:mR,body:pR,formContent:gR,section:vR,label:yR,titleInput:bR,descriptionTextarea:SR,parentContext:xR,parentLabel:_R,parentName:TR,depList:ER,depItem:jR,depItemSelected:CR,noDeps:AR,btnPrimary:NR,btnGhost:wR};function eS({mode:n,taskId:s,projectId:l,parentTaskId:o}){const{tasks:c,createTask:d,updateTask:f}=Qt(),{showToast:m}=no(),p=oa(),v=n==="edit",y=v&&s?c.find(L=>L.id===s):void 0,b=v?(y==null?void 0:y.projectId)??"":l??"",_=v?(y==null?void 0:y.parentTaskId)??"":o??"",T=_?c.find(L=>L.id===_):void 0,[N,D]=S.useState((y==null?void 0:y.title)??""),[w,C]=S.useState((y==null?void 0:y.description)??""),[H,O]=S.useState((y==null?void 0:y.dependsOn)??[]),F=S.useRef(!1);S.useEffect(()=>{v&&y&&!F.current&&(F.current=!0,D(y.title),C(y.description),O(y.dependsOn))},[v,y]);const G=c.filter(L=>L.projectId===b&&(!v||L.id!==s)&&L.id!==_),W=N.trim().length>0&&(!v||y!==void 0)&&(v||b.length>0),ee=L=>{O(be=>be.includes(L)?be.filter(te=>te!==L):[...be,L])},$=()=>{W&&(v&&y===void 0||(v&&s?(f(s,N.trim(),w,H),m("Task updated","success"),p(Bs(s),{replace:!0})):(d(b,N.trim(),w,H.length>0?H:void 0,_||void 0),m("Task created","success"),p(Fl(b),{replace:!0}))))},ae=()=>{p(v&&s?Bs(s):Fl(b))},_e=v?"edit task":_?"child task":"new task";return h.jsxs("div",{className:ut.container,children:[h.jsxs("div",{className:ut.header,children:[h.jsxs("div",{className:ut.headerTitle,children:[h.jsx("span",{className:ut.badge,children:_e}),T&&h.jsxs("span",{className:ut.parentContext,children:[h.jsx("span",{className:ut.parentLabel,children:"Child of"}),h.jsx("span",{className:ut.parentName,children:T.title})]})]}),h.jsxs("div",{className:ut.headerActions,children:[h.jsx("button",{onClick:$,disabled:!W,className:ut.btnPrimary,"data-testid":"task-edit-save",children:v?"Save Changes":"Create"}),h.jsx("button",{onClick:ae,className:ut.btnGhost,children:"Cancel"})]})]}),h.jsx("div",{className:ut.body,children:h.jsxs("div",{className:ut.formContent,children:[h.jsxs("div",{className:ut.section,children:[h.jsx("label",{className:ut.label,htmlFor:"task-edit-title",children:"Title"}),h.jsx("input",{id:"task-edit-title",type:"text",value:N,onChange:L=>D(L.target.value),placeholder:"Task title...",autoFocus:!0,className:ut.titleInput,"data-testid":"task-edit-title",onKeyDown:L=>{L.key==="Enter"&&W&&$()}})]}),h.jsxs("div",{className:ut.section,children:[h.jsx("label",{className:ut.label,htmlFor:"task-edit-description",children:"Description"}),h.jsx("textarea",{id:"task-edit-description",value:w,onChange:L=>C(L.target.value),placeholder:"Describe the task... (markdown supported)",className:ut.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),h.jsxs("div",{className:ut.section,children:[h.jsx("div",{className:ut.label,children:"Dependencies"}),G.length===0?h.jsx("div",{className:ut.noDeps,children:"No other tasks in this project"}):h.jsx("div",{className:ut.depList,children:G.map(L=>{const be=H.includes(L.id);return h.jsxs("label",{className:`${ut.depItem} ${be?ut.depItemSelected:""}`,"data-testid":`dep-option-${L.id}`,children:[h.jsx("input",{type:"checkbox",checked:be,onChange:()=>ee(L.id)}),L.title,h.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",L.status,")"]})]},L.id)})})]})]})})]})}function DR(){const[n]=xf(),s=n.get("project")??"",l=n.get("parent")??void 0;return s?h.jsx(eS,{mode:"new",projectId:s,parentTaskId:l}):h.jsx(Or,{to:"/",replace:!0})}function kR(){const{taskId:n}=Wr();return h.jsx(eS,{mode:"edit",taskId:n})}const RR="_container_u6n1v_1",MR="_emptyState_u6n1v_8",OR="_card_u6n1v_14",BR="_cardHeader_u6n1v_34",LR="_categoryBadge_u6n1v_41",UR="_findingTitle_u6n1v_49",zR="_findingDate_u6n1v_55",VR="_findingContent_u6n1v_61",HR="_tags_u6n1v_67",GR="_tag_u6n1v_67",aa={container:RR,emptyState:MR,card:OR,cardHeader:BR,categoryBadge:LR,findingTitle:UR,findingDate:zR,findingContent:VR,tags:HR,tag:GR};function IR(n){const s=new Date(n),l=new Date,o=l.getTime()-s.getTime(),c=Math.floor(o/1e3),d=Math.floor(c/60),f=Math.floor(d/60),m=Math.floor(f/24);if(c<60)return"just now";if(d<60)return`${d}m ago`;if(f<24)return`${f}h ago`;if(m===1)return"yesterday";if(m<7)return`${m} days ago`;const p=s.getFullYear()===l.getFullYear(),v=s.toLocaleString("en-US",{month:"short"}),y=s.getDate();return p?`${v} ${y}`:`${v} ${y} ${s.getFullYear()}`}const Vy={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)"}};function PR({projectId:n}){const{findings:s}=Qt(),l=s.filter(o=>o.projectId===n);return l.length===0?h.jsx("div",{className:aa.emptyState,children:"No findings yet. Agents will post discoveries here."}):h.jsx("div",{className:aa.container,children:l.map((o,c)=>{const d=Vy[o.category]||Vy.general;return h.jsxs(Fn.div,{className:aa.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:c*.05,duration:.2},children:[h.jsxs("div",{className:aa.cardHeader,children:[h.jsx("span",{className:aa.categoryBadge,style:{background:d.bg,color:d.text},children:o.category}),h.jsx("span",{className:aa.findingTitle,children:o.title}),h.jsx("span",{className:aa.findingDate,title:o.createdAt,children:IR(o.createdAt)})]}),h.jsx("div",{className:aa.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&h.jsx("div",{className:aa.tags,children:o.tags.map(f=>h.jsx("span",{className:aa.tag,style:{color:d.text,textShadow:`0 0 8px ${d.text}`},children:f},f))})]},o.id)})})}function kr(n){if(!n)return"—";const s=new Date(n);return isNaN(s.getTime())?"—":s.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Ud(n,s){if(!n||!s)return;const l=new Date(s).getTime()-new Date(n).getTime();if(isNaN(l)||l<0)return;const o=Math.floor(l/6e4),c=Math.floor(l%6e4/1e3);if(o===0)return`${c}s`;const d=Math.floor(o/60),f=o%60;return d===0?`${o}m ${c}s`:`${d}h ${f}m`}function qR(n){const s=n.toLowerCase();return s==="ready"||s==="running"||s==="available"||s==="connected"?A.envDotGreen:s==="provisioning"||s==="starting"||s==="pending"||s==="connecting"?A.envDotYellow:s==="error"||s==="failed"||s==="disconnected"?A.envDotRed:A.envDotGray}function YR({status:n}){const s={not_started:"Not Started",working:"Working",paused:"Paused",complete:"Complete",failed:"Failed"},l={not_started:A.statusPending,working:A.statusInProgress,paused:A.statusWaitingInput,complete:A.statusDone,failed:A.statusFailed};return h.jsx("span",{className:`${A.statusBadge} ${l[n]??A.statusPending}`,children:s[n]??n})}function KR({task:n,tasksById:s,environments:l,projects:o,taskSessions:c}){const d=c.length>0?c[c.length-1]:void 0,f=(d==null?void 0:d.environmentId)??"",m=f?l.find(y=>y.id===f):void 0,p=o.find(y=>y.id===n.projectId),v=n.branch&&(p!=null&&p.repoUrl)?`${p.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(n.branch)}`:void 0;return h.jsxs("div",{className:A.overviewDashboard,children:[h.jsxs("div",{className:A.overviewHero,children:[h.jsx(YR,{status:n.status}),n.branch&&h.jsx("span",{className:A.overviewBranchPill,children:v?h.jsxs("a",{href:v,target:"_blank",rel:"noreferrer noopener",className:A.branchLink,children:["🔗"," ",n.branch]}):h.jsxs("span",{children:["🔗"," ",n.branch]})})]}),typeof n.description=="string"&&n.description&&h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Description"}),h.jsx("div",{className:A.overviewMarkdown,children:h.jsx(df,{remarkPlugins:[ff],children:n.description})})]}),f&&h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Environment"}),h.jsxs("div",{className:A.envRow,children:[m&&h.jsx("span",{className:`${A.envDot} ${qR(m.status)}`,title:m.status,"aria-label":`Status: ${m.status}`,role:"img"}),h.jsx("span",{className:A.overviewValue,children:(m==null?void 0:m.displayName)??f})]})]}),h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Dependencies"}),n.dependsOn.length===0?h.jsx("div",{className:A.overviewMuted,children:"None"}):h.jsx("div",{className:A.depList,children:n.dependsOn.map(y=>{const b=s.get(y),_=(b==null?void 0:b.status)==="complete";return h.jsxs("div",{className:`${A.depItem} ${_?A.depDone:A.depBlocked}`,children:[h.jsx("span",{children:_?"✓":"○"}),h.jsx("span",{children:(b==null?void 0:b.title)??y})]},y)})})]}),h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Timeline"}),h.jsxs("div",{className:A.timeline,children:[n.createdAt&&h.jsxs("div",{className:A.timelineRow,children:[h.jsx("span",{className:A.timelineKey,children:"Created"}),h.jsx("span",{className:A.timelineValue,children:kr(n.createdAt)})]}),n.assignedAt&&(()=>{const y=Ud(n.createdAt,n.assignedAt);return h.jsxs("div",{className:A.timelineRow,children:[h.jsx("span",{className:A.timelineKey,children:"Assigned"}),h.jsx("span",{className:A.timelineValue,children:kr(n.assignedAt)}),y!==void 0&&h.jsx("span",{className:A.timelineDelta,children:y})]})})(),n.startedAt&&(()=>{const y=Ud(n.assignedAt??n.createdAt,n.startedAt);return h.jsxs("div",{className:A.timelineRow,children:[h.jsx("span",{className:A.timelineKey,children:"Started"}),h.jsx("span",{className:A.timelineValue,children:kr(n.startedAt)}),y!==void 0&&h.jsx("span",{className:A.timelineDelta,children:y})]})})(),n.completedAt&&(()=>{const y=Ud(n.startedAt,n.completedAt);return h.jsxs("div",{className:A.timelineRow,children:[h.jsx("span",{className:A.timelineKey,children:"Completed"}),h.jsx("span",{className:A.timelineValue,children:kr(n.completedAt)}),y!==void 0&&h.jsx("span",{className:A.timelineDelta,children:y})]})})(),!n.createdAt&&!n.assignedAt&&!n.startedAt&&!n.completedAt&&h.jsx("div",{className:A.overviewMuted,children:"No timing data"})]})]}),n.reviewNotes&&h.jsxs("div",{className:A.overviewSection,children:[h.jsx("div",{className:A.overviewLabel,children:"Review Notes"}),h.jsx("div",{className:A.reviewNotes,children:n.reviewNotes})]})]})}function ZR({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:A.eventOverflowWarning,role:"alert",children:["⚠ ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown."]})}function XR({task:n,sessionId:s,isBlocked:l,onStart:o,onResume:c,onStop:d,onComplete:f,onDelete:m,onEdit:p}){if(n.status==="not_started")return l?h.jsxs("div",{className:A.headerActions,children:[h.jsx("button",{onClick:p,className:A.btnGhost,children:"Edit"}),h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})]}):h.jsxs("div",{className:A.headerActions,children:[h.jsx("button",{onClick:o,className:A.btnPrimary,children:"Start"}),h.jsx("button",{onClick:p,className:A.btnGhost,children:"Edit"}),h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})]});if(n.status==="working")return h.jsx("div",{className:A.headerActions,children:h.jsx("button",{onClick:d,disabled:!s,className:A.btnDanger,children:"Stop"})});if(n.status==="paused")return h.jsxs("div",{className:A.headerActions,children:[h.jsx("button",{onClick:f,className:A.btnPrimary,children:"Complete"}),h.jsx("button",{onClick:c,className:A.btnGhost,children:"Resume"}),h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})]});if(n.status==="complete")return h.jsx("div",{className:A.headerActions,children:h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})});if(n.status==="failed")return h.jsxs("div",{className:A.headerActions,children:[h.jsx("button",{onClick:o,className:A.btnPrimary,children:"Retry"}),h.jsx("button",{onClick:m,className:A.btnDanger,children:"Delete"})]})}function $R({taskSessions:n,selectedSessionId:s,onSelect:l}){if(!(n.length<2))return h.jsxs("div",{className:A.attemptSelector,"data-testid":"attempt-selector",children:[h.jsx("span",{className:A.attemptLabel,children:"Attempts:"}),n.map((o,c)=>{const d=o.id===s,f=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="idle"?"●":"";return h.jsxs("button",{className:`${A.attemptButton} ${d?A.attemptActive:""}`,onClick:()=>l(o.id),title:`Attempt #${c+1} — ${o.status}`,"aria-label":`Attempt #${c+1}, ${o.status}`,"aria-pressed":d,"data-testid":`attempt-${c+1}`,children:["#",c+1,f&&h.jsx("span",{className:A.attemptStatus,children:f})]},o.id)})]})}function zd(){const{taskId:n}=Wr(),s=an(),l=oa(),{events:o,eventsDropped:c,tasks:d,environments:f,loadSessionEvents:m,loadFindings:p,kill:v,startTask:y,resumeTask:b,completeTask:_,deleteTask:T,projects:N,taskSessions:D,loadTaskSessions:w}=Qt(),C=S.useRef(null),H=S.useRef(void 0),O=S.useRef(void 0),F=S.useRef(void 0),G=S.useRef(void 0),W=S.useRef(void 0),ee=s.pathname.endsWith("/stream")?"stream":s.pathname.endsWith("/findings")?"findings":"overview",[$,ae]=S.useState(ee),[_e,L]=S.useState(!1),[be,te]=S.useState(void 0),Be=S.useRef(ee);ee!==Be.current&&(Be.current=ee,ee!==$&&ae(ee));const P=d.find(ue=>ue.id===n),U=(P==null?void 0:P.projectId)||void 0,K=P?D[P.id]??[]:[];let V;be&&K.some(ue=>ue.id===be)?V=be:V=(P==null?void 0:P.latestSessionId)||void 0;const pe=()=>{L(!0)},ie=()=>{P&&(T(P.id),L(!1),l(Fl(P.projectId),{replace:!0}))};if((P==null?void 0:P.id)!==O.current&&(O.current=P==null?void 0:P.id,be!==void 0&&te(void 0)),S.useEffect(()=>{if(!(P!=null&&P.id))return;const ue=P.id!==G.current,Pe=P.latestSessionId!==W.current;(ue||Pe)&&(G.current=P.id,W.current=P.latestSessionId,w(P.id))},[P==null?void 0:P.id,P==null?void 0:P.latestSessionId,w]),(P==null?void 0:P.status)!==F.current){F.current=P==null?void 0:P.status;const ue=(P==null?void 0:P.status)==="not_started"?"overview":(P==null?void 0:P.status)==="working"||(P==null?void 0:P.status)==="paused"?"stream":(P==null?void 0:P.status)==="complete"?"findings":void 0;ue&&ue!==$&&ae(ue)}const Ae=S.useMemo(()=>new Map(d.map(ue=>[ue.id,ue])),[d]),Se=S.useMemo(()=>{const ue=V?o.filter(Pe=>Pe.sessionId===V):[];return Wb(Jb(ue))},[o,V]),me=P?P.dependsOn.some(ue=>{const Pe=Ae.get(ue);return Pe!==void 0&&Pe.status!=="complete"}):!1,we=S.useMemo(()=>Mk(n,N,Ae),[n,N,Ae]);S.useEffect(()=>{V&&V!==H.current&&(H.current=V,m(V))},[V,m]),S.useEffect(()=>{$==="findings"&&U&&p(U)},[$,U,p]),S.useEffect(()=>{C.current&&$==="stream"&&(C.current.scrollTop=C.current.scrollHeight)},[Se.length,$]);const Q=ue=>{ae(ue),l(Bs(n,ue==="overview"?void 0:ue))};return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Gi,{segments:we}),h.jsxs("div",{className:A.header,children:[h.jsxs("span",{className:A.headerTitle,children:[h.jsx("span",{"data-testid":"task-title",children:(P==null?void 0:P.title)||n}),P&&h.jsx("span",{className:A.taskStatusBadge,"data-testid":"task-status",children:P.status}),(P==null?void 0:P.branch)&&h.jsx("span",{className:A.taskBranch,children:P.branch}),me&&h.jsx("span",{className:A.taskBlockedBadge,children:"blocked"})]}),P&&h.jsx(XR,{task:P,sessionId:V,isBlocked:me,onStart:()=>y(P.id),onResume:()=>b(P.id),onStop:()=>V&&v(V),onComplete:()=>_(P.id),onDelete:pe,onEdit:()=>l(OT(P.id))})]}),h.jsxs("div",{className:A.tabBar,role:"tablist","aria-label":"Task view",children:[h.jsx("button",{role:"tab","aria-selected":$==="overview",className:`${A.tab} ${$==="overview"?A.active:""}`,onClick:()=>Q("overview"),children:"Overview"}),h.jsx("button",{role:"tab","aria-selected":$==="stream",className:`${A.tab} ${$==="stream"?A.active:""}`,onClick:()=>Q("stream"),children:"Stream"}),h.jsx("button",{role:"tab","aria-selected":$==="findings",className:`${A.tab} ${$==="findings"?A.active:""}`,onClick:()=>Q("findings"),children:"Findings"})]}),h.jsxs(zs,{mode:"wait",children:[$==="overview"&&h.jsx(Fn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:A.overviewContent,children:P?h.jsx(KR,{task:P,tasksById:Ae,environments:f,projects:N,taskSessions:K}):h.jsx("div",{className:A.waitingMessage,children:"No additional details"})},"overview"),$==="stream"&&h.jsxs(Fn.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:[h.jsx($R,{taskSessions:K,selectedSessionId:V,onSelect:ue=>te(ue)}),h.jsxs("div",{ref:C,className:A.eventScroll,children:[!V&&P&&h.jsxs("div",{className:A.emptyCta,children:[h.jsx("button",{className:A.ctaButton,onClick:()=>y(P.id),children:"Start Task"}),h.jsx("div",{className:A.ctaDescription,children:"Click to begin agent execution"})]}),V&&Se.length===0&&h.jsx("div",{className:A.waitingMessage,children:"Waiting for events..."}),h.jsx(ZR,{eventsDropped:c}),Se.map((ue,Pe)=>h.jsx(Yb,{event:ue,toolUseCtx:ue.toolUseCtx},`${ue.sessionId}-${ue.timestamp}-${Pe}`))]})]},"stream"),$==="findings"&&h.jsx(Fn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:A.tabContent,children:U?h.jsx(PR,{projectId:U}):h.jsx("div",{className:A.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),P&&h.jsx(oc,{isOpen:_e,title:"Delete Task?",description:`"${P.title}" will be permanently removed.`,onConfirm:ie,onCancel:()=>L(!1)})]})}function FR(){const n=wk();return h.jsxs("div",{className:A.panelContainer,children:[h.jsx(Gi,{segments:n}),h.jsx("div",{className:A.emptyState,children:"Configure the new environment below"})]})}const QR="_layout_1sbe4_1",JR="_content_1sbe4_8",Hy={layout:QR,content:JR},WR={environments:"Environments",credentials:"Credentials",personas:"Personas",appearance:"Appearance",about:"About"};function eM(){const s=an().pathname.replace(/^\/settings\/?/,"").split("/")[0],l=WR[s],o=Nk(l);return h.jsxs("div",{className:Hy.layout,children:[h.jsx(Gi,{segments:o}),h.jsx("div",{className:Hy.content,children:h.jsx(c0,{})})]})}const tM="_nav_29xjr_1",nM="_tab_29xjr_30",aM="_tabIcon_29xjr_56",sM="_tabActive_29xjr_62",Rr={nav:tM,tab:nM,tabIcon:aM,tabActive:sM},Aa=[{path:"environments",label:"Environments",icon:"🖥️"},{path:"credentials",label:"Credentials",icon:"🔑"},{path:"personas",label:"Personas",icon:"👤"},{path:"appearance",label:"Appearance",icon:"🎨"},{path:"about",label:"About",icon:"ℹ️"}];function iM(){var f;const n=an(),s=oa(),l=S.useRef(null),o=((f=Aa.find(m=>n.pathname===`${Ri}/${m.path}`))==null?void 0:f.path)??Aa[0].path,c=S.useCallback(m=>{s(`${Ri}/${m}`)},[s]),d=S.useCallback(m=>{var T,N;const p=(T=l.current)==null?void 0:T.querySelectorAll('[role="tab"]');if(!p)return;const v=Array.from(p).findIndex(D=>D===document.activeElement),y=v>=0?v:Aa.findIndex(D=>D.path===o);let b=y;if(m.key==="ArrowDown")m.preventDefault(),b=(y+1)%Aa.length;else if(m.key==="ArrowUp")m.preventDefault(),b=(y-1+Aa.length)%Aa.length;else if(m.key==="Home")m.preventDefault(),b=0;else if(m.key==="End")m.preventDefault(),b=Aa.length-1;else return;const _=Aa[b].path;s(`${Ri}/${_}`),(N=p[b])==null||N.focus()},[o,s]);return h.jsx("nav",{className:Rr.nav,ref:l,role:"tablist","aria-orientation":"vertical","aria-label":"Settings",onKeyDown:d,children:Aa.map(m=>{const p=m.path===o;return h.jsxs("button",{role:"tab",type:"button","aria-selected":p,tabIndex:p?0:-1,className:`${Rr.tab} ${p?Rr.tabActive:""}`,onClick:()=>c(m.path),children:[h.jsx("span",{className:Rr.tabIcon,"aria-hidden":"true",children:m.icon}),m.label]},m.path)})})}const lM="_container_1nk8c_1",oM="_header_1nk8c_5",rM="_headerLabel_1nk8c_12",cM="_addButton_1nk8c_20",uM="_envRow_1nk8c_55",dM="_targeted_1nk8c_69",fM="_expanded_1nk8c_72",hM="_statusDot_1nk8c_76",mM="_pulse_1nk8c_79",pM="_envName_1nk8c_83",gM="_envActions_1nk8c_87",vM="_idleLabel_1nk8c_94",yM="_newChatButton_1nk8c_99",bM="_envActionsRow_1nk8c_126",SM="_connectButton_1nk8c_134",xM="_stopButton_1nk8c_160",_M="_deleteButton_1nk8c_186",TM="_provisionMessage_1nk8c_213",EM="_errorMessage_1nk8c_220",jM="_sessionRow_1nk8c_227",CM="_selected_1nk8c_243",AM="_sessionDot_1nk8c_248",NM="_sessionSummaryRow_1nk8c_252",wM="_sessionExpandArrow_1nk8c_272",DM="_sessionSummaryText_1nk8c_283",kM="_sessionCountBadge_1nk8c_290",RM="_emptyCta_1nk8c_313",MM="_ctaDescription_1nk8c_326",OM="_ctaButton_1nk8c_332",Ze={container:lM,header:oM,headerLabel:rM,addButton:cM,envRow:uM,targeted:dM,expanded:fM,statusDot:hM,pulse:mM,envName:pM,envActions:gM,idleLabel:vM,newChatButton:yM,envActionsRow:bM,connectButton:SM,stopButton:xM,deleteButton:_M,provisionMessage:TM,errorMessage:EM,sessionRow:jM,selected:CM,sessionDot:AM,sessionSummaryRow:NM,sessionExpandArrow:wM,sessionSummaryText:DM,sessionCountBadge:kM,emptyCta:RM,ctaDescription:MM,ctaButton:OM},BM={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},LM={running:"running",idle:"awaiting input",failed:"failed",interrupted:"interrupted",completed:"completed"},Gy=["running","idle","failed","interrupted","completed"],UM=.2;function zM(n){const s={};for(const d of n)s[d.status]=(s[d.status]||0)+1;const l=Gy.filter(d=>s[d]>0).map(d=>`${s[d]} ${LM[d]||d}`),o=new Set(Gy),c=Object.keys(s).filter(d=>!o.has(d)).sort().map(d=>`${s[d]} ${d}`);return[...l,...c].join(", ")}function VM({status:n}){const s=n==="running"?"var(--accent-green)":n==="idle"?"var(--accent-yellow)":n==="completed"?"var(--text-secondary)":n==="failed"||n==="interrupted"?"var(--accent-red)":"var(--text-tertiary)";return h.jsx("span",{className:Ze.sessionDot,style:{color:s},children:"●"})}function HM({env:n,envSessions:s,selectedSessionId:l,isNewChatTarget:o,expanded:c,onToggleExpand:d,sessionsExpanded:f,onToggleSessionsExpand:m,provisionProgress:p,onProvision:v,onStop:y,onRemove:b,navigate:_}){const[T,N]=S.useState(!1),D=BM[n.status]||"var(--text-tertiary)",w=n.status==="connected",C=n.status==="connecting",H=n.status==="disconnected"||n.status==="error";return h.jsxs("div",{children:[h.jsx(oc,{isOpen:T,title:"Delete Environment?",description:`"${n.displayName||n.id}" will be permanently removed. This destroys the workspace and removes all data.`,onConfirm:()=>{b(n.id),N(!1)},onCancel:()=>N(!1)}),h.jsxs("div",{className:`${Ze.envRow} ${o?Ze.targeted:""} ${c?Ze.expanded:""}`,"data-testid":"env-row",onClick:d,children:[h.jsx("span",{className:`${Ze.statusDot} ${w?Ze.pulse:""}`,style:{color:D},children:"●"}),h.jsx("span",{className:Ze.envName,title:n.displayName||n.id,children:n.displayName||n.id}),h.jsxs("span",{className:Ze.envActions,children:[s.length===0&&!o&&!c&&h.jsx("span",{className:Ze.idleLabel,children:"(idle)"}),w&&h.jsx("button",{onClick:O=>{O.stopPropagation(),_(p0(n.id,n.defaultRuntime||"claude-code"))},title:"New chat",className:Ze.newChatButton,children:"+"})]})]}),c&&h.jsxs("div",{className:Ze.envActionsRow,children:[C&&p&&h.jsx("span",{className:Ze.provisionMessage,children:p.message}),n.status==="error"&&(p==null?void 0:p.stage)==="error"&&h.jsx("span",{className:Ze.errorMessage,children:p.message}),H&&h.jsx("button",{onClick:O=>{O.stopPropagation(),v(n.id)},className:Ze.connectButton,children:n.status==="error"?"Retry":"Connect"}),w&&h.jsx("button",{onClick:O=>{O.stopPropagation(),y(n.id)},className:Ze.stopButton,children:"Stop"}),!C&&h.jsx("button",{onClick:O=>{O.stopPropagation(),N(!0)},className:Ze.deleteButton,children:"Delete"})]}),s.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Ze.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":f,"aria-label":f?"Collapse sessions":"Expand sessions",onClick:m,onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),m())},children:[h.jsx("span",{className:`${Ze.sessionExpandArrow} ${f?Ze.expanded:""}`,children:"▸"}),h.jsx("span",{className:Ze.sessionSummaryText,children:zM(s)}),h.jsx("span",{className:Ze.sessionCountBadge,children:s.length})]}),h.jsx(zs,{children:f&&h.jsx(Fn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:UM,ease:"easeInOut"},style:{overflow:"hidden"},children:s.map(O=>h.jsxs("div",{onClick:F=>{F.stopPropagation(),_(m0(O.id))},className:`${Ze.sessionRow} ${l===O.id?Ze.selected:""}`,title:O.prompt,"data-testid":"session-row",children:[h.jsx(VM,{status:O.status})," ",O.prompt.length>24?O.prompt.slice(0,24)+"...":O.prompt]},O.id))})})]})]})}function GM(){const{environments:n,sessions:s,provisionStatus:l,provisionEnvironment:o,stopEnvironment:c,removeEnvironment:d}=Qt(),f=oa(),[m,p]=S.useState(null),[v,y]=S.useState(new Set),b=tn("/sessions/:sessionId"),_=tn("/sessions/new"),T=(b==null?void 0:b.params.sessionId)!=="new"?b==null?void 0:b.params.sessionId:void 0,[N]=xf(),D=_?N.get("env")??void 0:void 0;return h.jsxs("div",{className:Ze.container,children:[h.jsxs("div",{className:Ze.header,children:[h.jsx("span",{className:Ze.headerLabel,children:"Environments"}),h.jsx("button",{className:Ze.addButton,onClick:()=>f(uv),title:"Add environment",children:"+ Add Environment"})]}),n.length===0&&h.jsxs("div",{className:Ze.emptyCta,children:[h.jsx("button",{className:Ze.ctaButton,onClick:()=>f(uv),children:"Add Environment"}),h.jsx("div",{className:Ze.ctaDescription,children:"Connect an environment to run agents"})]}),n.map(w=>{const C=s.filter(H=>H.environmentId===w.id);return h.jsx(HM,{env:w,envSessions:C,selectedSessionId:T,isNewChatTarget:D===w.id,expanded:m===w.id,onToggleExpand:()=>p(m===w.id?null:w.id),sessionsExpanded:v.has(w.id),onToggleSessionsExpand:()=>{y(H=>{const O=new Set(H);return O.has(w.id)?O.delete(w.id):O.add(w.id),O})},provisionProgress:l[w.id],onProvision:o,onStop:c,onRemove:d,navigate:f},w.id)})]})}function IM(){return h.jsx(GM,{})}const PM="_section_1ingb_14",qM="_sectionTitle_1ingb_26",YM="_sectionDescription_1ingb_35",KM="_tokenList_1ingb_48",ZM="_tokenRow_1ingb_55",XM="_tokenBadge_1ingb_68",$M="_tokenName_1ingb_83",FM="_tokenTarget_1ingb_90",QM="_deleteButton_1ingb_99",JM="_addForm_1ingb_113",WM="_formRow_1ingb_119",e3="_input_1ingb_125",t3="_select_1ingb_155",n3="_addButton_1ingb_187",a3="_emptyStateInfo_1ingb_221",s3="_themeOptions_1ingb_229",i3="_themeOption_1ingb_229",l3="_themeOptionSelected_1ingb_254",o3="_themeOptionHeader_1ingb_259",r3="_themeOptionLabel_1ingb_266",c3="_themeOptionDesc_1ingb_273",u3="_variantToggle_1ingb_279",d3="_variantButton_1ingb_286",f3="_variantActive_1ingb_305",h3="_themeSwatches_1ingb_311",m3="_themeSwatch_1ingb_311",p3="_systemToggle_1ingb_325",g3="_systemToggleHint_1ingb_341",v3="_themeActive_1ingb_348",y3="_aboutGrid_1ingb_354",b3="_aboutItem_1ingb_360",S3="_aboutLabel_1ingb_373",x3="_aboutValue_1ingb_379",_3="_aboutDot_1ingb_387",T3="_aboutDotConnected_1ingb_394",E3="_aboutDotDisconnected_1ingb_398",he={section:PM,sectionTitle:qM,sectionDescription:YM,tokenList:KM,tokenRow:ZM,tokenBadge:XM,tokenName:$M,tokenTarget:FM,deleteButton:QM,addForm:JM,formRow:WM,input:e3,select:t3,addButton:n3,emptyStateInfo:a3,themeOptions:s3,themeOption:i3,themeOptionSelected:l3,themeOptionHeader:o3,themeOptionLabel:r3,themeOptionDesc:c3,variantToggle:u3,variantButton:d3,variantActive:f3,themeSwatches:h3,themeSwatch:m3,systemToggle:p3,systemToggleHint:g3,themeActive:v3,aboutGrid:y3,aboutItem:b3,aboutLabel:S3,aboutValue:x3,aboutDot:_3,aboutDotConnected:T3,aboutDotDisconnected:E3},j3=[{key:"claude",label:"Claude",description:"Forward Claude credentials for AI agent access.",options:[{value:"off",label:"Off"},{value:"subscription",label:"Subscription"},{value:"api_key",label:"API Key"}]},{key:"github",label:"GitHub",description:"Forward GITHUB_TOKEN and GH_TOKEN for git operations.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"copilot",label:"Copilot",description:"Forward Copilot tokens (COPILOT_GITHUB_TOKEN, CLI config).",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"codex",label:"Codex",description:"Forward OPENAI_API_KEY for Codex/OpenAI access.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]}];function C3(){const{credentialProviders:n,updateCredentialProviders:s}=Qt(),l=(o,c)=>{const d={...n};o==="claude"?d.claude=c:d[o]=c,s(d)};return h.jsxs("section",{className:he.section,children:[h.jsx("h3",{className:he.sectionTitle,children:"Credential Providers"}),h.jsx("p",{className:he.sectionDescription,children:"Enable providers to automatically forward credentials to environments at task start. Credentials are read fresh from the host each time."}),h.jsx("div",{className:he.tokenList,children:j3.map(o=>h.jsxs("div",{className:he.tokenRow,children:[h.jsx("span",{className:he.tokenName,children:o.label}),h.jsx("span",{className:he.tokenTarget,children:o.description}),h.jsx("select",{className:he.select,value:n[o.key],onChange:c=>l(o.key,c.target.value),children:o.options.map(c=>h.jsx("option",{value:c.value,children:c.label},c.value))})]},o.key))})]})}const A3=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function N3(){const{tokens:n,setToken:s,deleteToken:l}=Qt(),{showToast:o}=no(),[c,d]=S.useState(""),[f,m]=S.useState(""),[p,v]=S.useState("env_var"),[y,b]=S.useState(""),[_,T]=S.useState(null),N=C=>{if(C.preventDefault(),!c||!f)return;const H=p==="env_var"?y||c.toUpperCase()+"_TOKEN":"";s(c,f,p,H,p==="file"?y:""),o("Token saved successfully","success"),d(""),m(""),b("")},D=C=>{T(C)},w=()=>{_&&(l(_),o("Token deleted","info")),T(null)};return h.jsxs(h.Fragment,{children:[h.jsx(oc,{isOpen:_!==null,title:"Delete Token?",description:_?`"${_}" will be permanently removed.`:void 0,onConfirm:w,onCancel:()=>T(null)}),h.jsxs("section",{className:he.section,children:[h.jsx("h3",{className:he.sectionTitle,children:"Tokens"}),h.jsx("p",{className:he.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),n.length===0?h.jsx("div",{className:he.emptyStateInfo,children:"Add your first API token to enable service integrations."}):h.jsx("div",{className:he.tokenList,children:n.map(C=>h.jsxs("div",{className:he.tokenRow,children:[h.jsx("span",{className:he.tokenBadge,children:C.tokenType}),h.jsx("span",{className:he.tokenName,children:C.name}),h.jsx("span",{className:he.tokenTarget,children:C.tokenType==="env_var"?C.envVar:C.filePath}),h.jsx("button",{className:he.deleteButton,onClick:()=>D(C.name),title:`Delete ${C.name}`,children:"×"})]},C.name))}),h.jsxs("form",{className:he.addForm,onSubmit:N,children:[h.jsxs("div",{className:he.formRow,children:[h.jsx("input",{className:he.input,type:"text",placeholder:"Token name",value:c,onChange:C=>d(C.target.value)}),h.jsx("input",{className:he.input,type:"password",placeholder:"Value",value:f,onChange:C=>m(C.target.value)})]}),h.jsxs("div",{className:he.formRow,children:[h.jsx("select",{className:he.select,value:p,onChange:C=>v(C.target.value),children:A3.map(C=>h.jsx("option",{value:C.value,children:C.label},C.value))}),h.jsx("input",{className:he.input,type:"text",placeholder:p==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:y,onChange:C=>b(C.target.value)}),h.jsx("button",{className:he.addButton,type:"submit",children:"Add Token"})]})]})]})]})}function w3(){return h.jsxs(h.Fragment,{children:[h.jsx(C3,{}),h.jsx(N3,{})]})}const D3="_container_1xcp7_1",k3="_header_1xcp7_7",R3="_form_1xcp7_19",M3="_formActions_1xcp7_87",O3="_list_1xcp7_93",B3="_card_1xcp7_99",L3="_active_1xcp7_109",U3="_cardHeader_1xcp7_113",z3="_cardActions_1xcp7_123",V3="_description_1xcp7_128",H3="_meta_1xcp7_134",G3="_promptDetails_1xcp7_151",I3="_promptText_1xcp7_163",P3="_empty_1xcp7_180",q3="_btnPrimary_1xcp7_186",Y3="_btnSecondary_1xcp7_220",K3="_btnSmall_1xcp7_247",Z3="_btnDanger_1xcp7_273",Et={container:D3,header:k3,form:R3,formActions:M3,list:O3,card:B3,active:L3,cardHeader:U3,cardActions:z3,description:V3,meta:H3,promptDetails:G3,promptText:I3,empty:P3,btnPrimary:q3,btnSecondary:Y3,btnSmall:K3,btnDanger:Z3};function X3(){const{personas:n,createPersona:s,updatePersona:l,deletePersona:o}=Qt(),[c,d]=S.useState(null),[f,m]=S.useState(!1),[p,v]=S.useState(null),[y,b]=S.useState(""),[_,T]=S.useState(""),[N,D]=S.useState(""),[w,C]=S.useState(""),[H,O]=S.useState(""),[F,G]=S.useState(0),W=()=>{b(""),T(""),D(""),C(""),O(""),G(0)},ee=()=>{W(),d(null),m(!0)},$=te=>{b(te.name),T(te.description),D(te.systemPrompt),C(te.runtime),O(te.model),G(te.maxTurns),d(te),m(!1)},ae=te=>{te.preventDefault(),!(!y.trim()||!N.trim())&&(c?(l(c.id,y,_,N,w,H,F),d(null)):(s(y,_,N,w,H,F),m(!1)),W())},_e=te=>{o(te),v(null),(c==null?void 0:c.id)===te&&(d(null),W())},L=()=>{d(null),m(!1),W()},be=()=>h.jsxs("form",{onSubmit:ae,className:Et.form,children:[h.jsx("h3",{children:c?"Edit Persona":"Create Persona"}),h.jsxs("label",{children:["Name",h.jsx("input",{type:"text",value:y,onChange:te=>b(te.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),h.jsxs("label",{children:["Description",h.jsx("input",{type:"text",value:_,onChange:te=>T(te.target.value),placeholder:"Brief description..."})]}),h.jsxs("label",{children:["Runtime",h.jsxs("select",{value:w,onChange:te=>C(te.target.value),children:[h.jsx("option",{value:"",children:"Default"}),h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"})]})]}),h.jsxs("label",{children:["Model",h.jsx("input",{type:"text",value:H,onChange:te=>O(te.target.value),placeholder:"e.g. sonnet"})]}),h.jsxs("label",{children:["Max Turns",h.jsx("input",{type:"number",value:F,onChange:te=>G(parseInt(te.target.value,10)||0),min:0})]}),h.jsxs("label",{children:["System Prompt",h.jsx("textarea",{value:N,onChange:te=>D(te.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),h.jsxs("div",{className:Et.formActions,children:[h.jsx("button",{type:"submit",className:Et.btnPrimary,children:c?"Save":"Create"}),h.jsx("button",{type:"button",onClick:L,className:Et.btnSecondary,children:"Cancel"})]})]});return h.jsxs("div",{className:Et.container,children:[h.jsxs("div",{className:Et.header,children:[h.jsx("h2",{children:"Personas"}),h.jsx("button",{onClick:ee,className:Et.btnPrimary,children:"+ New Persona"})]}),(f||c)&&be(),n.length===0&&!f?h.jsx("p",{className:Et.empty,children:"No personas yet. Create one to get started."}):h.jsx("div",{className:Et.list,children:n.map(te=>h.jsxs("div",{className:`${Et.card} ${(c==null?void 0:c.id)===te.id?Et.active:""}`,children:[h.jsxs("div",{className:Et.cardHeader,children:[h.jsx("strong",{children:te.name}),h.jsxs("div",{className:Et.cardActions,children:[h.jsx("button",{onClick:()=>$(te),className:Et.btnSmall,children:"Edit"}),p===te.id?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>_e(te.id),className:Et.btnDanger,children:"Confirm"}),h.jsx("button",{onClick:()=>v(null),className:Et.btnSmall,children:"Cancel"})]}):h.jsx("button",{onClick:()=>v(te.id),className:Et.btnSmall,children:"Delete"})]})]}),te.description&&h.jsx("p",{className:Et.description,children:te.description}),h.jsxs("div",{className:Et.meta,children:[te.runtime&&h.jsxs("span",{children:["Runtime: ",te.runtime]}),te.model&&h.jsxs("span",{children:["Model: ",te.model]}),te.maxTurns>0&&h.jsxs("span",{children:["Max turns: ",te.maxTurns]})]}),h.jsxs("details",{className:Et.promptDetails,children:[h.jsx("summary",{children:"System Prompt"}),h.jsx("pre",{className:Et.promptText,children:te.systemPrompt})]})]},te.id))})]})}function $3(){return h.jsx(X3,{})}function F3(){const{themeId:n,resolvedThemeId:s,setTheme:l,preferSystem:o,setPreferSystem:c}=Xy();return h.jsxs("section",{className:he.section,children:[h.jsx("h3",{className:he.sectionTitle,children:"Appearance"}),h.jsx("p",{className:he.sectionDescription,children:"Choose how Grackle looks across the app."}),h.jsx("div",{className:he.themeOptions,children:$r.filter(d=>!d.hidden).map(d=>{const f=!!(d.variantLightId&&d.variantDarkId),m=f?n===d.id||n===d.variantLightId||n===d.variantDarkId:n===d.id,p=f&&s===d.variantLightId;return h.jsxs("button",{type:"button",className:`${he.themeOption} ${m?he.themeOptionSelected:""}`,"aria-pressed":m,onClick:()=>l(d.id),children:[h.jsxs("span",{className:he.themeOptionHeader,children:[h.jsxs("span",{children:[h.jsx("span",{className:he.themeOptionLabel,children:d.label}),h.jsx("span",{className:he.themeOptionDesc,children:d.description})]}),f&&h.jsxs("span",{className:he.variantToggle,children:[h.jsx("span",{role:"button",tabIndex:0,className:`${he.variantButton} ${m&&p?he.variantActive:""}`,onClick:v=>{v.stopPropagation(),c(!1),l(d.variantLightId)},onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),v.stopPropagation(),c(!1),l(d.variantLightId))},"aria-label":"Light variant","aria-pressed":m&&p,children:"☼"}),h.jsx("span",{role:"button",tabIndex:0,className:`${he.variantButton} ${m&&!p?he.variantActive:""}`,onClick:v=>{v.stopPropagation(),c(!1),l(d.variantDarkId)},onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),v.stopPropagation(),c(!1),l(d.variantDarkId))},"aria-label":"Dark variant","aria-pressed":m&&!p,children:"☾"})]})]}),d.swatches&&h.jsx("span",{className:he.themeSwatches,children:d.swatches.map((v,y)=>h.jsx("span",{className:he.themeSwatch,style:{background:v}},y))})]},d.id)})}),h.jsxs("label",{className:he.systemToggle,children:[h.jsx("input",{type:"checkbox",checked:o,onChange:d=>c(d.target.checked)}),h.jsx("span",{children:"Match system light/dark preference"})]}),h.jsx("p",{className:he.systemToggleHint,children:"Automatically switches between light and dark variants when available."}),h.jsxs("p",{className:he.themeActive,children:["Active theme: ",h.jsx("strong",{children:s})]})]})}function Q3(){return h.jsx(F3,{})}function J3(){const{connected:n,environments:s,sessions:l}=Qt(),o=s.filter(f=>f.status==="connected").length,c=s.length,d=l.filter(f=>["running","idle"].includes(f.status)).length;return h.jsxs("section",{className:he.section,children:[h.jsx("h3",{className:he.sectionTitle,children:"About"}),h.jsx("p",{className:he.sectionDescription,children:"Connection status and application information."}),h.jsxs("div",{className:he.aboutGrid,children:[h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Connection"}),h.jsxs("span",{className:he.aboutValue,children:[h.jsx("span",{className:`${he.aboutDot} ${n?he.aboutDotConnected:he.aboutDotDisconnected}`}),n?"Connected":"Disconnected"]})]}),h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Environments"}),h.jsxs("span",{className:he.aboutValue,children:[o,"/",c," connected"]})]}),h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Active Sessions"}),h.jsx("span",{className:he.aboutValue,children:d})]}),h.jsxs("div",{className:he.aboutItem,children:[h.jsx("span",{className:he.aboutLabel,children:"Version"}),h.jsx("span",{className:he.aboutValue,children:"0.29.0"})]})]})]})}function W3(){return h.jsx(J3,{})}const eO="_root_cdda9_1",tO="_body_cdda9_7",nO="_main_cdda9_13",Vd={root:eO,body:tO,main:nO},aO=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function sO(){const{lastSpawnedId:n,environments:s}=Qt(),{showToast:l}=no();Vw(s,l);const o=oa(),c=an(),d=c.pathname.startsWith(Ri);return S.useEffect(()=>{n&&!c.pathname.startsWith("/tasks/")&&o(m0(n),{replace:!0})},[n,o,c.pathname]),h.jsxs("div",{className:Vd.root,children:[h.jsx(IT,{}),h.jsxs("div",{className:Vd.body,children:[d?h.jsx(iM,{}):h.jsx(lw,{}),h.jsxs("div",{className:Vd.main,children:[h.jsx(c0,{}),h.jsx(jw,{})]})]}),h.jsx(zw,{})]})}function iO(){return h.jsx(W_,{children:h.jsxs(jt,{element:h.jsx(sO,{}),children:[h.jsx(jt,{index:!0,element:h.jsx(Ck,{})}),h.jsx(jt,{path:"sessions/new",element:h.jsx(Ok,{})}),h.jsx(jt,{path:"sessions/:sessionId",element:h.jsx(zk,{})}),h.jsx(jt,{path:"projects/:projectId",element:h.jsx(cR,{})}),h.jsx(jt,{path:"tasks/new",element:h.jsx(DR,{})}),h.jsx(jt,{path:"tasks/:taskId",element:h.jsx(zd,{})}),h.jsx(jt,{path:"tasks/:taskId/stream",element:h.jsx(zd,{})}),h.jsx(jt,{path:"tasks/:taskId/findings",element:h.jsx(zd,{})}),h.jsx(jt,{path:"tasks/:taskId/edit",element:h.jsx(kR,{})}),h.jsx(jt,{path:"environments/new",element:h.jsx(FR,{})}),h.jsxs(jt,{path:"settings",element:h.jsx(eM,{}),children:[h.jsx(jt,{index:!0,element:h.jsx(Or,{to:"environments",replace:!0})}),h.jsx(jt,{path:"environments",element:h.jsx(IM,{})}),h.jsx(jt,{path:"credentials",element:h.jsx(w3,{})}),h.jsx(jt,{path:"tokens",element:h.jsx(Or,{to:"../credentials",replace:!0})}),h.jsx(jt,{path:"personas",element:h.jsx($3,{})}),h.jsx(jt,{path:"appearance",element:h.jsx(Q3,{})}),h.jsx(jt,{path:"about",element:h.jsx(W3,{})})]}),h.jsx(jt,{path:"*",element:h.jsx(Or,{to:"/",replace:!0})})]})})}function lO(){const n=aO?$x:Hx;return h.jsx(t_,{children:h.jsx(Qx,{children:h.jsx(n,{children:h.jsx(ET,{children:h.jsx(iO,{})})})})})}jx.createRoot(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(lO,{})}));
|