@grackle-ai/web 0.18.1 → 0.18.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,78 @@
1
+ import{r as pb,a as _,j as f,v as gb,b as vb,t as Ko,i as yb,f as bb,M as od,c as rd}from"./markdown-gcy1Jmzi.js";import{r as Sb,d as Bp,H as zp,P as Up,i as _b,B as Tb,a as xb,C as jb,M as Ab}from"./dagview-EHk2VaeR.js";(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const h of u)if(h.type==="childList")for(const d of h.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function l(u){const h={};return u.integrity&&(h.integrity=u.integrity),u.referrerPolicy&&(h.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?h.credentials="include":u.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(u){if(u.ep)return;u.ep=!0;const h=l(u);fetch(u.href,h)}})();var Au={exports:{}},hl={},Eu={exports:{}},Nu={};/**
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 Vp;function Eb(){return Vp||(Vp=1,(function(a){function i(B,X){var rt=B.length;B.push(X);t:for(;0<rt;){var bt=rt-1>>>1,Tt=B[bt];if(0<u(Tt,X))B[bt]=X,B[rt]=Tt,rt=bt;else break t}}function l(B){return B.length===0?null:B[0]}function o(B){if(B.length===0)return null;var X=B[0],rt=B.pop();if(rt!==X){B[0]=rt;t:for(var bt=0,Tt=B.length,Pt=Tt>>>1;bt<Pt;){var Et=2*(bt+1)-1,St=B[Et],G=Et+1,Kt=B[G];if(0>u(St,rt))G<Tt&&0>u(Kt,St)?(B[bt]=Kt,B[G]=rt,bt=G):(B[bt]=St,B[Et]=rt,bt=Et);else if(G<Tt&&0>u(Kt,rt))B[bt]=Kt,B[G]=rt,bt=G;else break t}}return X}function u(B,X){var rt=B.sortIndex-X.sortIndex;return rt!==0?rt:B.id-X.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;a.unstable_now=function(){return h.now()}}else{var d=Date,p=d.now();a.unstable_now=function(){return d.now()-p}}var g=[],v=[],b=1,S=null,x=3,D=!1,k=!1,O=!1,Y=!1,L=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function tt(B){for(var X=l(v);X!==null;){if(X.callback===null)o(v);else if(X.startTime<=B)o(v),X.sortIndex=X.expirationTime,i(g,X);else break;X=l(v)}}function Z(B){if(O=!1,tt(B),!k)if(l(g)!==null)k=!0,P||(P=!0,zt());else{var X=l(v);X!==null&&Ut(Z,X.startTime-B)}}var P=!1,at=-1,z=5,nt=-1;function dt(){return Y?!0:!(a.unstable_now()-nt<z)}function yt(){if(Y=!1,P){var B=a.unstable_now();nt=B;var X=!0;try{t:{k=!1,O&&(O=!1,Q(at),at=-1),D=!0;var rt=x;try{e:{for(tt(B),S=l(g);S!==null&&!(S.expirationTime>B&&dt());){var bt=S.callback;if(typeof bt=="function"){S.callback=null,x=S.priorityLevel;var Tt=bt(S.expirationTime<=B);if(B=a.unstable_now(),typeof Tt=="function"){S.callback=Tt,tt(B),X=!0;break e}S===l(g)&&o(g),tt(B)}else o(g);S=l(g)}if(S!==null)X=!0;else{var Pt=l(v);Pt!==null&&Ut(Z,Pt.startTime-B),X=!1}}break t}finally{S=null,x=rt,D=!1}X=void 0}}finally{X?zt():P=!1}}}var zt;if(typeof R=="function")zt=function(){R(yt)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,Xt=$.port2;$.port1.onmessage=yt,zt=function(){Xt.postMessage(null)}}else zt=function(){L(yt,0)};function Ut(B,X){at=L(function(){B(a.unstable_now())},X)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(B){B.callback=null},a.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<B?Math.floor(1e3/B):5},a.unstable_getCurrentPriorityLevel=function(){return x},a.unstable_next=function(B){switch(x){case 1:case 2:case 3:var X=3;break;default:X=x}var rt=x;x=X;try{return B()}finally{x=rt}},a.unstable_requestPaint=function(){Y=!0},a.unstable_runWithPriority=function(B,X){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var rt=x;x=B;try{return X()}finally{x=rt}},a.unstable_scheduleCallback=function(B,X,rt){var bt=a.unstable_now();switch(typeof rt=="object"&&rt!==null?(rt=rt.delay,rt=typeof rt=="number"&&0<rt?bt+rt:bt):rt=bt,B){case 1:var Tt=-1;break;case 2:Tt=250;break;case 5:Tt=1073741823;break;case 4:Tt=1e4;break;default:Tt=5e3}return Tt=rt+Tt,B={id:b++,callback:X,priorityLevel:B,startTime:rt,expirationTime:Tt,sortIndex:-1},rt>bt?(B.sortIndex=rt,i(v,B),l(g)===null&&B===l(v)&&(O?(Q(at),at=-1):O=!0,Ut(Z,rt-bt))):(B.sortIndex=Tt,i(g,B),k||D||(k=!0,P||(P=!0,zt()))),B},a.unstable_shouldYield=dt,a.unstable_wrapCallback=function(B){var X=x;return function(){var rt=x;x=X;try{return B.apply(this,arguments)}finally{x=rt}}}})(Nu)),Nu}var Lp;function Nb(){return Lp||(Lp=1,Eu.exports=Eb()),Eu.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 Hp;function Cb(){if(Hp)return hl;Hp=1;var a=Nb(),i=pb(),l=Sb();function o(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function h(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function d(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function p(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function g(t){if(h(t)!==t)throw Error(o(188))}function v(t){var e=t.alternate;if(!e){if(e=h(t),e===null)throw Error(o(188));return e!==t?null:t}for(var n=t,s=e;;){var r=n.return;if(r===null)break;var c=r.alternate;if(c===null){if(s=r.return,s!==null){n=s;continue}break}if(r.child===c.child){for(c=r.child;c;){if(c===n)return g(r),t;if(c===s)return g(r),e;c=c.sibling}throw Error(o(188))}if(n.return!==s.return)n=r,s=c;else{for(var m=!1,y=r.child;y;){if(y===n){m=!0,n=r,s=c;break}if(y===s){m=!0,s=r,n=c;break}y=y.sibling}if(!m){for(y=c.child;y;){if(y===n){m=!0,n=c,s=r;break}if(y===s){m=!0,s=c,n=r;break}y=y.sibling}if(!m)throw Error(o(189))}}if(n.alternate!==s)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?t:e}function b(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=b(t),e!==null)return e;t=t.sibling}return null}var S=Object.assign,x=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),R=Symbol.for("react.context"),tt=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),at=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),nt=Symbol.for("react.activity"),dt=Symbol.for("react.memo_cache_sentinel"),yt=Symbol.iterator;function zt(t){return t===null||typeof t!="object"?null:(t=yt&&t[yt]||t["@@iterator"],typeof t=="function"?t:null)}var $=Symbol.for("react.client.reference");function Xt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===$?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case O:return"Fragment";case L:return"Profiler";case Y:return"StrictMode";case Z:return"Suspense";case P:return"SuspenseList";case nt:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case k:return"Portal";case R:return t.displayName||"Context";case Q:return(t._context.displayName||"Context")+".Consumer";case tt:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case at:return e=t.displayName||null,e!==null?e:Xt(t.type)||"Memo";case z:e=t._payload,t=t._init;try{return Xt(t(e))}catch{}}return null}var Ut=Array.isArray,B=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,rt={pending:!1,data:null,method:null,action:null},bt=[],Tt=-1;function Pt(t){return{current:t}}function Et(t){0>Tt||(t.current=bt[Tt],bt[Tt]=null,Tt--)}function St(t,e){Tt++,bt[Tt]=t.current,t.current=e}var G=Pt(null),Kt=Pt(null),fe=Pt(null),Ze=Pt(null);function Xe(t,e){switch(St(fe,e),St(Kt,t),St(G,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?sp(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=sp(e),t=ip(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Et(G),St(G,t)}function ee(){Et(G),Et(Kt),Et(fe)}function Je(t){t.memoizedState!==null&&St(Ze,t);var e=G.current,n=ip(e,t.type);e!==n&&(St(Kt,t),St(G,n))}function Ie(t){Kt.current===t&&(Et(G),Et(Kt)),Ze.current===t&&(Et(Ze),cl._currentValue=rt)}var $e,We;function ve(t){if($e===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);$e=e&&e[1]||"",We=-1<n.stack.indexOf(`
18
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
19
+ `+$e+t+We}var F=!1;function Re(t,e){if(!t||F)return"";F=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(e){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(M){var w=M}Reflect.construct(t,[],I)}else{try{I.call()}catch(M){w=M}t.call(I.prototype)}}else{try{throw Error()}catch(M){w=M}(I=t())&&typeof I.catch=="function"&&I.catch(function(){})}}catch(M){if(M&&w&&typeof M.stack=="string")return[M.stack,w.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=s.DetermineComponentFrameRoot(),m=c[0],y=c[1];if(m&&y){var T=m.split(`
20
+ `),C=y.split(`
21
+ `);for(r=s=0;s<T.length&&!T[s].includes("DetermineComponentFrameRoot");)s++;for(;r<C.length&&!C[r].includes("DetermineComponentFrameRoot");)r++;if(s===T.length||r===C.length)for(s=T.length-1,r=C.length-1;1<=s&&0<=r&&T[s]!==C[r];)r--;for(;1<=s&&0<=r;s--,r--)if(T[s]!==C[r]){if(s!==1||r!==1)do if(s--,r--,0>r||T[s]!==C[r]){var V=`
22
+ `+T[s].replace(" at new "," at ");return t.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",t.displayName)),V}while(1<=s&&0<=r);break}}}finally{F=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?ve(n):""}function q(t,e){switch(t.tag){case 26:case 27:case 5:return ve(t.type);case 16:return ve("Lazy");case 13:return t.child!==e&&e!==null?ve("Suspense Fallback"):ve("Suspense");case 19:return ve("SuspenseList");case 0:case 15:return Re(t.type,!1);case 11:return Re(t.type.render,!1);case 1:return Re(t.type,!0);case 31:return ve("Activity");default:return""}}function K(t){try{var e="",n=null;do e+=q(t,n),n=t,t=t.return;while(t);return e}catch(s){return`
23
+ Error generating stack: `+s.message+`
24
+ `+s.stack}}var ot=Object.prototype.hasOwnProperty,ut=a.unstable_scheduleCallback,ft=a.unstable_cancelCallback,pt=a.unstable_shouldYield,jt=a.unstable_requestPaint,Mt=a.unstable_now,mt=a.unstable_getCurrentPriorityLevel,et=a.unstable_ImmediatePriority,Nt=a.unstable_UserBlockingPriority,J=a.unstable_NormalPriority,Lt=a.unstable_LowPriority,U=a.unstable_IdlePriority,Ne=a.log,Kn=a.unstable_setDisableYieldValue,Oe=null,Be=null;function W(t){if(typeof Ne=="function"&&Kn(t),Be&&typeof Be.setStrictMode=="function")try{Be.setStrictMode(Oe,t)}catch{}}var At=Math.clz32?Math.clz32:gt,qt=Math.log,ae=Math.LN2;function gt(t){return t>>>=0,t===0?32:31-(qt(t)/ae|0)|0}var ze=256,Ke=262144,kn=4194304;function tn(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function lt(t,e,n){var s=t.pendingLanes;if(s===0)return 0;var r=0,c=t.suspendedLanes,m=t.pingedLanes;t=t.warmLanes;var y=s&134217727;return y!==0?(s=y&~c,s!==0?r=tn(s):(m&=y,m!==0?r=tn(m):n||(n=y&~t,n!==0&&(r=tn(n))))):(y=s&~c,y!==0?r=tn(y):m!==0?r=tn(m):n||(n=s&~t,n!==0&&(r=tn(n)))),r===0?0:e!==0&&e!==r&&(e&c)===0&&(c=r&-r,n=e&-e,c>=n||c===32&&(n&4194048)!==0)?e:r}function re(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function rn(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pa(){var t=kn;return kn<<=1,(kn&62914560)===0&&(kn=4194304),t}function Ss(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ga(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Rl(t,e,n,s,r,c){var m=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var y=t.entanglements,T=t.expirationTimes,C=t.hiddenUpdates;for(n=m&~n;0<n;){var V=31-At(n),I=1<<V;y[V]=0,T[V]=-1;var w=C[V];if(w!==null)for(C[V]=null,V=0;V<w.length;V++){var M=w[V];M!==null&&(M.lane&=-536870913)}n&=~I}s!==0&&Si(t,s,0),c!==0&&r===0&&t.tag!==0&&(t.suspendedLanes|=c&~(m&~e))}function Si(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var s=31-At(e);t.entangledLanes|=e,t.entanglements[s]=t.entanglements[s]|1073741824|n&261930}function _i(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var s=31-At(n),r=1<<s;r&e|t[s]&e&&(t[s]|=e),n&=~r}}function Ti(t,e){var n=e&-e;return n=(n&42)!==0?1:_s(n),(n&(t.suspendedLanes|e))!==0?0:n}function _s(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Ts(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function xi(){var t=X.p;return t!==0?t:(t=window.event,t===void 0?32:Cp(t.type))}function ji(t,e){var n=X.p;try{return X.p=t,e()}finally{X.p=n}}var Mn=Math.random().toString(36).slice(2),Te="__reactFiber$"+Mn,st="__reactProps$"+Mn,Rt="__reactContainer$"+Mn,Ht="__reactEvents$"+Mn,se="__reactListeners$"+Mn,xs="__reactHandles$"+Mn,Qa="__reactResources$"+Mn,Pa="__reactMarker$"+Mn;function vr(t){delete t[Te],delete t[st],delete t[Ht],delete t[se],delete t[xs]}function js(t){var e=t[Te];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Rt]||n[Te]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=fp(t);t!==null;){if(n=t[Te])return n;t=fp(t)}return e}t=n,n=t.parentNode}return null}function As(t){if(t=t[Te]||t[Rt]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Ai(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(o(33))}function Es(t){var e=t[Qa];return e||(e=t[Qa]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function we(t){t[Pa]=!0}var Zd=new Set,Xd={};function Fa(t,e){Ns(t,e),Ns(t+"Capture",e)}function Ns(t,e){for(Xd[t]=e,t=0;t<e.length;t++)Zd.add(e[t])}var ly=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]*$"),Kd={},Qd={};function oy(t){return ot.call(Qd,t)?!0:ot.call(Kd,t)?!1:ly.test(t)?Qd[t]=!0:(Kd[t]=!0,!1)}function Ol(t,e,n){if(oy(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var s=e.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function Bl(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function Qn(t,e,n,s){if(s===null)t.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+s)}}function bn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Pd(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function ry(t,e,n){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,c=s.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(m){n=""+m,c.call(this,m)}}),Object.defineProperty(t,e,{enumerable:s.enumerable}),{getValue:function(){return n},setValue:function(m){n=""+m},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function yr(t){if(!t._valueTracker){var e=Pd(t)?"checked":"value";t._valueTracker=ry(t,e,""+t[e])}}function Fd(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),s="";return t&&(s=Pd(t)?t.checked?"true":"false":t.value),t=s,t!==n?(e.setValue(t),!0):!1}function zl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var cy=/[\n"\\]/g;function Sn(t){return t.replace(cy,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function br(t,e,n,s,r,c,m,y){t.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?t.type=m:t.removeAttribute("type"),e!=null?m==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+bn(e)):t.value!==""+bn(e)&&(t.value=""+bn(e)):m!=="submit"&&m!=="reset"||t.removeAttribute("value"),e!=null?Sr(t,m,bn(e)):n!=null?Sr(t,m,bn(n)):s!=null&&t.removeAttribute("value"),r==null&&c!=null&&(t.defaultChecked=!!c),r!=null&&(t.checked=r&&typeof r!="function"&&typeof r!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.name=""+bn(y):t.removeAttribute("name")}function Jd(t,e,n,s,r,c,m,y){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(t.type=c),e!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||e!=null)){yr(t);return}n=n!=null?""+bn(n):"",e=e!=null?""+bn(e):n,y||e===t.value||(t.value=e),t.defaultValue=e}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=y?t.checked:!!s,t.defaultChecked=!!s,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.name=m),yr(t)}function Sr(t,e,n){e==="number"&&zl(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function Cs(t,e,n,s){if(t=t.options,e){e={};for(var r=0;r<n.length;r++)e["$"+n[r]]=!0;for(n=0;n<t.length;n++)r=e.hasOwnProperty("$"+t[n].value),t[n].selected!==r&&(t[n].selected=r),r&&s&&(t[n].defaultSelected=!0)}else{for(n=""+bn(n),e=null,r=0;r<t.length;r++){if(t[r].value===n){t[r].selected=!0,s&&(t[r].defaultSelected=!0);return}e!==null||t[r].disabled||(e=t[r])}e!==null&&(e.selected=!0)}}function $d(t,e,n){if(e!=null&&(e=""+bn(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+bn(n):""}function Wd(t,e,n,s){if(e==null){if(s!=null){if(n!=null)throw Error(o(92));if(Ut(s)){if(1<s.length)throw Error(o(93));s=s[0]}n=s}n==null&&(n=""),e=n}n=bn(e),t.defaultValue=n,s=t.textContent,s===n&&s!==""&&s!==null&&(t.value=s),yr(t)}function Ds(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var uy=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 tf(t,e,n){var s=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?s?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":s?t.setProperty(e,n):typeof n!="number"||n===0||uy.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function ef(t,e,n){if(e!=null&&typeof e!="object")throw Error(o(62));if(t=t.style,n!=null){for(var s in n)!n.hasOwnProperty(s)||e!=null&&e.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var r in e)s=e[r],e.hasOwnProperty(r)&&n[r]!==s&&tf(t,r,s)}else for(var c in e)e.hasOwnProperty(c)&&tf(t,c,e[c])}function _r(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var dy=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"]]),fy=/^[\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 Ul(t){return fy.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Pn(){}var Tr=null;function xr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ws=null,ks=null;function nf(t){var e=As(t);if(e&&(t=e.stateNode)){var n=t[st]||null;t:switch(t=e.stateNode,e.type){case"input":if(br(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Sn(""+e)+'"][type="radio"]'),e=0;e<n.length;e++){var s=n[e];if(s!==t&&s.form===t.form){var r=s[st]||null;if(!r)throw Error(o(90));br(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(e=0;e<n.length;e++)s=n[e],s.form===t.form&&Fd(s)}break t;case"textarea":$d(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&Cs(t,!!n.multiple,e,!1)}}}var jr=!1;function af(t,e,n){if(jr)return t(e,n);jr=!0;try{var s=t(e);return s}finally{if(jr=!1,(ws!==null||ks!==null)&&(Ao(),ws&&(e=ws,t=ks,ks=ws=null,nf(e),t)))for(e=0;e<t.length;e++)nf(t[e])}}function Ei(t,e){var n=t.stateNode;if(n===null)return null;var s=n[st]||null;if(s===null)return null;n=s[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break t;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(o(231,e,typeof n));return n}var Fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ar=!1;if(Fn)try{var Ni={};Object.defineProperty(Ni,"passive",{get:function(){Ar=!0}}),window.addEventListener("test",Ni,Ni),window.removeEventListener("test",Ni,Ni)}catch{Ar=!1}var va=null,Er=null,Vl=null;function sf(){if(Vl)return Vl;var t,e=Er,n=e.length,s,r="value"in va?va.value:va.textContent,c=r.length;for(t=0;t<n&&e[t]===r[t];t++);var m=n-t;for(s=1;s<=m&&e[n-s]===r[c-s];s++);return Vl=r.slice(t,1<s?1-s:void 0)}function Ll(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Hl(){return!0}function lf(){return!1}function en(t){function e(n,s,r,c,m){this._reactName=n,this._targetInst=r,this.type=s,this.nativeEvent=c,this.target=m,this.currentTarget=null;for(var y in t)t.hasOwnProperty(y)&&(n=t[y],this[y]=n?n(c):c[y]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Hl:lf,this.isPropagationStopped=lf,this}return S(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Hl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Hl)},persist:function(){},isPersistent:Hl}),e}var Ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gl=en(Ja),Ci=S({},Ja,{view:0,detail:0}),hy=en(Ci),Nr,Cr,Di,Il=S({},Ci,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wr,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Di&&(Di&&t.type==="mousemove"?(Nr=t.screenX-Di.screenX,Cr=t.screenY-Di.screenY):Cr=Nr=0,Di=t),Nr)},movementY:function(t){return"movementY"in t?t.movementY:Cr}}),of=en(Il),my=S({},Il,{dataTransfer:0}),py=en(my),gy=S({},Ci,{relatedTarget:0}),Dr=en(gy),vy=S({},Ja,{animationName:0,elapsedTime:0,pseudoElement:0}),yy=en(vy),by=S({},Ja,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Sy=en(by),_y=S({},Ja,{data:0}),rf=en(_y),Ty={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xy={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"},jy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ay(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=jy[t])?!!e[t]:!1}function wr(){return Ay}var Ey=S({},Ci,{key:function(t){if(t.key){var e=Ty[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Ll(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?xy[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wr,charCode:function(t){return t.type==="keypress"?Ll(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ll(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Ny=en(Ey),Cy=S({},Il,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cf=en(Cy),Dy=S({},Ci,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wr}),wy=en(Dy),ky=S({},Ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),My=en(ky),Ry=S({},Il,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Oy=en(Ry),By=S({},Ja,{newState:0,oldState:0}),zy=en(By),Uy=[9,13,27,32],kr=Fn&&"CompositionEvent"in window,wi=null;Fn&&"documentMode"in document&&(wi=document.documentMode);var Vy=Fn&&"TextEvent"in window&&!wi,uf=Fn&&(!kr||wi&&8<wi&&11>=wi),df=" ",ff=!1;function hf(t,e){switch(t){case"keyup":return Uy.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mf(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ms=!1;function Ly(t,e){switch(t){case"compositionend":return mf(e);case"keypress":return e.which!==32?null:(ff=!0,df);case"textInput":return t=e.data,t===df&&ff?null:t;default:return null}}function Hy(t,e){if(Ms)return t==="compositionend"||!kr&&hf(t,e)?(t=sf(),Vl=Er=va=null,Ms=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return uf&&e.locale!=="ko"?null:e.data;default:return null}}var Gy={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 pf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Gy[t.type]:e==="textarea"}function gf(t,e,n,s){ws?ks?ks.push(s):ks=[s]:ws=s,e=Mo(e,"onChange"),0<e.length&&(n=new Gl("onChange","change",null,n,s),t.push({event:n,listeners:e}))}var ki=null,Mi=null;function Iy(t){$m(t,0)}function ql(t){var e=Ai(t);if(Fd(e))return t}function vf(t,e){if(t==="change")return e}var yf=!1;if(Fn){var Mr;if(Fn){var Rr="oninput"in document;if(!Rr){var bf=document.createElement("div");bf.setAttribute("oninput","return;"),Rr=typeof bf.oninput=="function"}Mr=Rr}else Mr=!1;yf=Mr&&(!document.documentMode||9<document.documentMode)}function Sf(){ki&&(ki.detachEvent("onpropertychange",_f),Mi=ki=null)}function _f(t){if(t.propertyName==="value"&&ql(Mi)){var e=[];gf(e,Mi,t,xr(t)),af(Iy,e)}}function qy(t,e,n){t==="focusin"?(Sf(),ki=e,Mi=n,ki.attachEvent("onpropertychange",_f)):t==="focusout"&&Sf()}function Yy(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ql(Mi)}function Zy(t,e){if(t==="click")return ql(e)}function Xy(t,e){if(t==="input"||t==="change")return ql(e)}function Ky(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var cn=typeof Object.is=="function"?Object.is:Ky;function Ri(t,e){if(cn(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),s=Object.keys(e);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var r=n[s];if(!ot.call(e,r)||!cn(t[r],e[r]))return!1}return!0}function Tf(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function xf(t,e){var n=Tf(t);t=0;for(var s;n;){if(n.nodeType===3){if(s=t+n.textContent.length,t<=e&&s>=e)return{node:n,offset:e-t};t=s}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=Tf(n)}}function jf(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?jf(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Af(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=zl(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=zl(t.document)}return e}function Or(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var Qy=Fn&&"documentMode"in document&&11>=document.documentMode,Rs=null,Br=null,Oi=null,zr=!1;function Ef(t,e,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zr||Rs==null||Rs!==zl(s)||(s=Rs,"selectionStart"in s&&Or(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Oi&&Ri(Oi,s)||(Oi=s,s=Mo(Br,"onSelect"),0<s.length&&(e=new Gl("onSelect","select",null,e,n),t.push({event:e,listeners:s}),e.target=Rs)))}function $a(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Os={animationend:$a("Animation","AnimationEnd"),animationiteration:$a("Animation","AnimationIteration"),animationstart:$a("Animation","AnimationStart"),transitionrun:$a("Transition","TransitionRun"),transitionstart:$a("Transition","TransitionStart"),transitioncancel:$a("Transition","TransitionCancel"),transitionend:$a("Transition","TransitionEnd")},Ur={},Nf={};Fn&&(Nf=document.createElement("div").style,"AnimationEvent"in window||(delete Os.animationend.animation,delete Os.animationiteration.animation,delete Os.animationstart.animation),"TransitionEvent"in window||delete Os.transitionend.transition);function Wa(t){if(Ur[t])return Ur[t];if(!Os[t])return t;var e=Os[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Nf)return Ur[t]=e[n];return t}var Cf=Wa("animationend"),Df=Wa("animationiteration"),wf=Wa("animationstart"),Py=Wa("transitionrun"),Fy=Wa("transitionstart"),Jy=Wa("transitioncancel"),kf=Wa("transitionend"),Mf=new Map,Vr="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(" ");Vr.push("scrollEnd");function Rn(t,e){Mf.set(t,e),Fa(e,[t])}var Yl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},_n=[],Bs=0,Lr=0;function Zl(){for(var t=Bs,e=Lr=Bs=0;e<t;){var n=_n[e];_n[e++]=null;var s=_n[e];_n[e++]=null;var r=_n[e];_n[e++]=null;var c=_n[e];if(_n[e++]=null,s!==null&&r!==null){var m=s.pending;m===null?r.next=r:(r.next=m.next,m.next=r),s.pending=r}c!==0&&Rf(n,r,c)}}function Xl(t,e,n,s){_n[Bs++]=t,_n[Bs++]=e,_n[Bs++]=n,_n[Bs++]=s,Lr|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Hr(t,e,n,s){return Xl(t,e,n,s),Kl(t)}function ts(t,e){return Xl(t,null,null,e),Kl(t)}function Rf(t,e,n){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n);for(var r=!1,c=t.return;c!==null;)c.childLanes|=n,s=c.alternate,s!==null&&(s.childLanes|=n),c.tag===22&&(t=c.stateNode,t===null||t._visibility&1||(r=!0)),t=c,c=c.return;return t.tag===3?(c=t.stateNode,r&&e!==null&&(r=31-At(n),t=c.hiddenUpdates,s=t[r],s===null?t[r]=[e]:s.push(e),e.lane=n|536870912),c):null}function Kl(t){if(50<nl)throw nl=0,Pc=null,Error(o(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var zs={};function $y(t,e,n,s){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function un(t,e,n,s){return new $y(t,e,n,s)}function Gr(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Jn(t,e){var n=t.alternate;return n===null?(n=un(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&65011712,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n.refCleanup=t.refCleanup,n}function Of(t,e){t.flags&=65011714;var n=t.alternate;return n===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,t.type=n.type,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Ql(t,e,n,s,r,c){var m=0;if(s=t,typeof t=="function")Gr(t)&&(m=1);else if(typeof t=="string")m=ab(t,n,G.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case nt:return t=un(31,n,e,r),t.elementType=nt,t.lanes=c,t;case O:return es(n.children,r,c,e);case Y:m=8,r|=24;break;case L:return t=un(12,n,e,r|2),t.elementType=L,t.lanes=c,t;case Z:return t=un(13,n,e,r),t.elementType=Z,t.lanes=c,t;case P:return t=un(19,n,e,r),t.elementType=P,t.lanes=c,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case R:m=10;break t;case Q:m=9;break t;case tt:m=11;break t;case at:m=14;break t;case z:m=16,s=null;break t}m=29,n=Error(o(130,t===null?"null":typeof t,"")),s=null}return e=un(m,n,e,r),e.elementType=t,e.type=s,e.lanes=c,e}function es(t,e,n,s){return t=un(7,t,s,e),t.lanes=n,t}function Ir(t,e,n){return t=un(6,t,null,e),t.lanes=n,t}function Bf(t){var e=un(18,null,null,0);return e.stateNode=t,e}function qr(t,e,n){return e=un(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var zf=new WeakMap;function Tn(t,e){if(typeof t=="object"&&t!==null){var n=zf.get(t);return n!==void 0?n:(e={value:t,source:e,stack:K(e)},zf.set(t,e),e)}return{value:t,source:e,stack:K(e)}}var Us=[],Vs=0,Pl=null,Bi=0,xn=[],jn=0,ya=null,Vn=1,Ln="";function $n(t,e){Us[Vs++]=Bi,Us[Vs++]=Pl,Pl=t,Bi=e}function Uf(t,e,n){xn[jn++]=Vn,xn[jn++]=Ln,xn[jn++]=ya,ya=t;var s=Vn;t=Ln;var r=32-At(s)-1;s&=~(1<<r),n+=1;var c=32-At(e)+r;if(30<c){var m=r-r%5;c=(s&(1<<m)-1).toString(32),s>>=m,r-=m,Vn=1<<32-At(e)+r|n<<r|s,Ln=c+t}else Vn=1<<c|n<<r|s,Ln=t}function Yr(t){t.return!==null&&($n(t,1),Uf(t,1,0))}function Zr(t){for(;t===Pl;)Pl=Us[--Vs],Us[Vs]=null,Bi=Us[--Vs],Us[Vs]=null;for(;t===ya;)ya=xn[--jn],xn[jn]=null,Ln=xn[--jn],xn[jn]=null,Vn=xn[--jn],xn[jn]=null}function Vf(t,e){xn[jn++]=Vn,xn[jn++]=Ln,xn[jn++]=ya,Vn=e.id,Ln=e.overflow,ya=t}var Ue=null,ie=null,Vt=!1,ba=null,An=!1,Xr=Error(o(519));function Sa(t){var e=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zi(Tn(e,t)),Xr}function Lf(t){var e=t.stateNode,n=t.type,s=t.memoizedProps;switch(e[Te]=t,e[st]=s,n){case"dialog":kt("cancel",e),kt("close",e);break;case"iframe":case"object":case"embed":kt("load",e);break;case"video":case"audio":for(n=0;n<sl.length;n++)kt(sl[n],e);break;case"source":kt("error",e);break;case"img":case"image":case"link":kt("error",e),kt("load",e);break;case"details":kt("toggle",e);break;case"input":kt("invalid",e),Jd(e,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":kt("invalid",e);break;case"textarea":kt("invalid",e),Wd(e,s.value,s.defaultValue,s.children)}n=s.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||e.textContent===""+n||s.suppressHydrationWarning===!0||np(e.textContent,n)?(s.popover!=null&&(kt("beforetoggle",e),kt("toggle",e)),s.onScroll!=null&&kt("scroll",e),s.onScrollEnd!=null&&kt("scrollend",e),s.onClick!=null&&(e.onclick=Pn),e=!0):e=!1,e||Sa(t,!0)}function Hf(t){for(Ue=t.return;Ue;)switch(Ue.tag){case 5:case 31:case 13:An=!1;return;case 27:case 3:An=!0;return;default:Ue=Ue.return}}function Ls(t){if(t!==Ue)return!1;if(!Vt)return Hf(t),Vt=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||uu(t.type,t.memoizedProps)),n=!n),n&&ie&&Sa(t),Hf(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));ie=dp(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));ie=dp(t)}else e===27?(e=ie,Oa(t.type)?(t=pu,pu=null,ie=t):ie=e):ie=Ue?Nn(t.stateNode.nextSibling):null;return!0}function ns(){ie=Ue=null,Vt=!1}function Kr(){var t=ba;return t!==null&&(ln===null?ln=t:ln.push.apply(ln,t),ba=null),t}function zi(t){ba===null?ba=[t]:ba.push(t)}var Qr=Pt(null),as=null,Wn=null;function _a(t,e,n){St(Qr,e._currentValue),e._currentValue=n}function ta(t){t._currentValue=Qr.current,Et(Qr)}function Pr(t,e,n){for(;t!==null;){var s=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,s!==null&&(s.childLanes|=e)):s!==null&&(s.childLanes&e)!==e&&(s.childLanes|=e),t===n)break;t=t.return}}function Fr(t,e,n,s){var r=t.child;for(r!==null&&(r.return=t);r!==null;){var c=r.dependencies;if(c!==null){var m=r.child;c=c.firstContext;t:for(;c!==null;){var y=c;c=r;for(var T=0;T<e.length;T++)if(y.context===e[T]){c.lanes|=n,y=c.alternate,y!==null&&(y.lanes|=n),Pr(c.return,n,t),s||(m=null);break t}c=y.next}}else if(r.tag===18){if(m=r.return,m===null)throw Error(o(341));m.lanes|=n,c=m.alternate,c!==null&&(c.lanes|=n),Pr(m,n,t),m=null}else m=r.child;if(m!==null)m.return=r;else for(m=r;m!==null;){if(m===t){m=null;break}if(r=m.sibling,r!==null){r.return=m.return,m=r;break}m=m.return}r=m}}function Hs(t,e,n,s){t=null;for(var r=e,c=!1;r!==null;){if(!c){if((r.flags&524288)!==0)c=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var m=r.alternate;if(m===null)throw Error(o(387));if(m=m.memoizedProps,m!==null){var y=r.type;cn(r.pendingProps.value,m.value)||(t!==null?t.push(y):t=[y])}}else if(r===Ze.current){if(m=r.alternate,m===null)throw Error(o(387));m.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(t!==null?t.push(cl):t=[cl])}r=r.return}t!==null&&Fr(e,t,n,s),e.flags|=262144}function Fl(t){for(t=t.firstContext;t!==null;){if(!cn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ss(t){as=t,Wn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Ve(t){return Gf(as,t)}function Jl(t,e){return as===null&&ss(t),Gf(t,e)}function Gf(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},Wn===null){if(t===null)throw Error(o(308));Wn=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Wn=Wn.next=e;return n}var Wy=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,s){t.push(s)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},t1=a.unstable_scheduleCallback,e1=a.unstable_NormalPriority,xe={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jr(){return{controller:new Wy,data:new Map,refCount:0}}function Ui(t){t.refCount--,t.refCount===0&&t1(e1,function(){t.controller.abort()})}var Vi=null,$r=0,Gs=0,Is=null;function n1(t,e){if(Vi===null){var n=Vi=[];$r=0,Gs=eu(),Is={status:"pending",value:void 0,then:function(s){n.push(s)}}}return $r++,e.then(If,If),e}function If(){if(--$r===0&&Vi!==null){Is!==null&&(Is.status="fulfilled");var t=Vi;Vi=null,Gs=0,Is=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function a1(t,e){var n=[],s={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return t.then(function(){s.status="fulfilled",s.value=e;for(var r=0;r<n.length;r++)(0,n[r])(e)},function(r){for(s.status="rejected",s.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),s}var qf=B.S;B.S=function(t,e){Em=Mt(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&n1(t,e),qf!==null&&qf(t,e)};var is=Pt(null);function Wr(){var t=is.current;return t!==null?t:ne.pooledCache}function $l(t,e){e===null?St(is,is.current):St(is,e.pool)}function Yf(){var t=Wr();return t===null?null:{parent:xe._currentValue,pool:t}}var qs=Error(o(460)),tc=Error(o(474)),Wl=Error(o(542)),to={then:function(){}};function Zf(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Xf(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then(Pn,Pn),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Qf(t),t;default:if(typeof e.status=="string")e.then(Pn,Pn);else{if(t=ne,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=e,t.status="pending",t.then(function(s){if(e.status==="pending"){var r=e;r.status="fulfilled",r.value=s}},function(s){if(e.status==="pending"){var r=e;r.status="rejected",r.reason=s}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Qf(t),t}throw os=e,qs}}function ls(t){try{var e=t._init;return e(t._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(os=n,qs):n}}var os=null;function Kf(){if(os===null)throw Error(o(459));var t=os;return os=null,t}function Qf(t){if(t===qs||t===Wl)throw Error(o(483))}var Ys=null,Li=0;function eo(t){var e=Li;return Li+=1,Ys===null&&(Ys=[]),Xf(Ys,t,e)}function Hi(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function no(t,e){throw e.$$typeof===x?Error(o(525)):(t=Object.prototype.toString.call(e),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Pf(t){function e(E,j){if(t){var N=E.deletions;N===null?(E.deletions=[j],E.flags|=16):N.push(j)}}function n(E,j){if(!t)return null;for(;j!==null;)e(E,j),j=j.sibling;return null}function s(E){for(var j=new Map;E!==null;)E.key!==null?j.set(E.key,E):j.set(E.index,E),E=E.sibling;return j}function r(E,j){return E=Jn(E,j),E.index=0,E.sibling=null,E}function c(E,j,N){return E.index=N,t?(N=E.alternate,N!==null?(N=N.index,N<j?(E.flags|=67108866,j):N):(E.flags|=67108866,j)):(E.flags|=1048576,j)}function m(E){return t&&E.alternate===null&&(E.flags|=67108866),E}function y(E,j,N,H){return j===null||j.tag!==6?(j=Ir(N,E.mode,H),j.return=E,j):(j=r(j,N),j.return=E,j)}function T(E,j,N,H){var vt=N.type;return vt===O?V(E,j,N.props.children,H,N.key):j!==null&&(j.elementType===vt||typeof vt=="object"&&vt!==null&&vt.$$typeof===z&&ls(vt)===j.type)?(j=r(j,N.props),Hi(j,N),j.return=E,j):(j=Ql(N.type,N.key,N.props,null,E.mode,H),Hi(j,N),j.return=E,j)}function C(E,j,N,H){return j===null||j.tag!==4||j.stateNode.containerInfo!==N.containerInfo||j.stateNode.implementation!==N.implementation?(j=qr(N,E.mode,H),j.return=E,j):(j=r(j,N.children||[]),j.return=E,j)}function V(E,j,N,H,vt){return j===null||j.tag!==7?(j=es(N,E.mode,H,vt),j.return=E,j):(j=r(j,N),j.return=E,j)}function I(E,j,N){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Ir(""+j,E.mode,N),j.return=E,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case D:return N=Ql(j.type,j.key,j.props,null,E.mode,N),Hi(N,j),N.return=E,N;case k:return j=qr(j,E.mode,N),j.return=E,j;case z:return j=ls(j),I(E,j,N)}if(Ut(j)||zt(j))return j=es(j,E.mode,N,null),j.return=E,j;if(typeof j.then=="function")return I(E,eo(j),N);if(j.$$typeof===R)return I(E,Jl(E,j),N);no(E,j)}return null}function w(E,j,N,H){var vt=j!==null?j.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return vt!==null?null:y(E,j,""+N,H);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case D:return N.key===vt?T(E,j,N,H):null;case k:return N.key===vt?C(E,j,N,H):null;case z:return N=ls(N),w(E,j,N,H)}if(Ut(N)||zt(N))return vt!==null?null:V(E,j,N,H,null);if(typeof N.then=="function")return w(E,j,eo(N),H);if(N.$$typeof===R)return w(E,j,Jl(E,N),H);no(E,N)}return null}function M(E,j,N,H,vt){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return E=E.get(N)||null,y(j,E,""+H,vt);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case D:return E=E.get(H.key===null?N:H.key)||null,T(j,E,H,vt);case k:return E=E.get(H.key===null?N:H.key)||null,C(j,E,H,vt);case z:return H=ls(H),M(E,j,N,H,vt)}if(Ut(H)||zt(H))return E=E.get(N)||null,V(j,E,H,vt,null);if(typeof H.then=="function")return M(E,j,N,eo(H),vt);if(H.$$typeof===R)return M(E,j,N,Jl(j,H),vt);no(j,H)}return null}function ct(E,j,N,H){for(var vt=null,Gt=null,ht=j,Dt=j=0,Bt=null;ht!==null&&Dt<N.length;Dt++){ht.index>Dt?(Bt=ht,ht=null):Bt=ht.sibling;var It=w(E,ht,N[Dt],H);if(It===null){ht===null&&(ht=Bt);break}t&&ht&&It.alternate===null&&e(E,ht),j=c(It,j,Dt),Gt===null?vt=It:Gt.sibling=It,Gt=It,ht=Bt}if(Dt===N.length)return n(E,ht),Vt&&$n(E,Dt),vt;if(ht===null){for(;Dt<N.length;Dt++)ht=I(E,N[Dt],H),ht!==null&&(j=c(ht,j,Dt),Gt===null?vt=ht:Gt.sibling=ht,Gt=ht);return Vt&&$n(E,Dt),vt}for(ht=s(ht);Dt<N.length;Dt++)Bt=M(ht,E,Dt,N[Dt],H),Bt!==null&&(t&&Bt.alternate!==null&&ht.delete(Bt.key===null?Dt:Bt.key),j=c(Bt,j,Dt),Gt===null?vt=Bt:Gt.sibling=Bt,Gt=Bt);return t&&ht.forEach(function(La){return e(E,La)}),Vt&&$n(E,Dt),vt}function _t(E,j,N,H){if(N==null)throw Error(o(151));for(var vt=null,Gt=null,ht=j,Dt=j=0,Bt=null,It=N.next();ht!==null&&!It.done;Dt++,It=N.next()){ht.index>Dt?(Bt=ht,ht=null):Bt=ht.sibling;var La=w(E,ht,It.value,H);if(La===null){ht===null&&(ht=Bt);break}t&&ht&&La.alternate===null&&e(E,ht),j=c(La,j,Dt),Gt===null?vt=La:Gt.sibling=La,Gt=La,ht=Bt}if(It.done)return n(E,ht),Vt&&$n(E,Dt),vt;if(ht===null){for(;!It.done;Dt++,It=N.next())It=I(E,It.value,H),It!==null&&(j=c(It,j,Dt),Gt===null?vt=It:Gt.sibling=It,Gt=It);return Vt&&$n(E,Dt),vt}for(ht=s(ht);!It.done;Dt++,It=N.next())It=M(ht,E,Dt,It.value,H),It!==null&&(t&&It.alternate!==null&&ht.delete(It.key===null?Dt:It.key),j=c(It,j,Dt),Gt===null?vt=It:Gt.sibling=It,Gt=It);return t&&ht.forEach(function(mb){return e(E,mb)}),Vt&&$n(E,Dt),vt}function te(E,j,N,H){if(typeof N=="object"&&N!==null&&N.type===O&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case D:t:{for(var vt=N.key;j!==null;){if(j.key===vt){if(vt=N.type,vt===O){if(j.tag===7){n(E,j.sibling),H=r(j,N.props.children),H.return=E,E=H;break t}}else if(j.elementType===vt||typeof vt=="object"&&vt!==null&&vt.$$typeof===z&&ls(vt)===j.type){n(E,j.sibling),H=r(j,N.props),Hi(H,N),H.return=E,E=H;break t}n(E,j);break}else e(E,j);j=j.sibling}N.type===O?(H=es(N.props.children,E.mode,H,N.key),H.return=E,E=H):(H=Ql(N.type,N.key,N.props,null,E.mode,H),Hi(H,N),H.return=E,E=H)}return m(E);case k:t:{for(vt=N.key;j!==null;){if(j.key===vt)if(j.tag===4&&j.stateNode.containerInfo===N.containerInfo&&j.stateNode.implementation===N.implementation){n(E,j.sibling),H=r(j,N.children||[]),H.return=E,E=H;break t}else{n(E,j);break}else e(E,j);j=j.sibling}H=qr(N,E.mode,H),H.return=E,E=H}return m(E);case z:return N=ls(N),te(E,j,N,H)}if(Ut(N))return ct(E,j,N,H);if(zt(N)){if(vt=zt(N),typeof vt!="function")throw Error(o(150));return N=vt.call(N),_t(E,j,N,H)}if(typeof N.then=="function")return te(E,j,eo(N),H);if(N.$$typeof===R)return te(E,j,Jl(E,N),H);no(E,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,j!==null&&j.tag===6?(n(E,j.sibling),H=r(j,N),H.return=E,E=H):(n(E,j),H=Ir(N,E.mode,H),H.return=E,E=H),m(E)):n(E,j)}return function(E,j,N,H){try{Li=0;var vt=te(E,j,N,H);return Ys=null,vt}catch(ht){if(ht===qs||ht===Wl)throw ht;var Gt=un(29,ht,null,E.mode);return Gt.lanes=H,Gt.return=E,Gt}finally{}}}var rs=Pf(!0),Ff=Pf(!1),Ta=!1;function ec(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nc(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function xa(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ja(t,e,n){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Yt&2)!==0){var r=s.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),s.pending=e,e=Kl(t),Rf(t,null,n),e}return Xl(t,s,e,n),Kl(t)}function Gi(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var s=e.lanes;s&=t.pendingLanes,n|=s,e.lanes=n,_i(t,n)}}function ac(t,e){var n=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var r=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var m={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?r=c=m:c=c.next=m,n=n.next}while(n!==null);c===null?r=c=e:c=c.next=e}else r=c=e;n={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:c,shared:s.shared,callbacks:s.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var sc=!1;function Ii(){if(sc){var t=Is;if(t!==null)throw t}}function qi(t,e,n,s){sc=!1;var r=t.updateQueue;Ta=!1;var c=r.firstBaseUpdate,m=r.lastBaseUpdate,y=r.shared.pending;if(y!==null){r.shared.pending=null;var T=y,C=T.next;T.next=null,m===null?c=C:m.next=C,m=T;var V=t.alternate;V!==null&&(V=V.updateQueue,y=V.lastBaseUpdate,y!==m&&(y===null?V.firstBaseUpdate=C:y.next=C,V.lastBaseUpdate=T))}if(c!==null){var I=r.baseState;m=0,V=C=T=null,y=c;do{var w=y.lane&-536870913,M=w!==y.lane;if(M?(Ot&w)===w:(s&w)===w){w!==0&&w===Gs&&(sc=!0),V!==null&&(V=V.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});t:{var ct=t,_t=y;w=e;var te=n;switch(_t.tag){case 1:if(ct=_t.payload,typeof ct=="function"){I=ct.call(te,I,w);break t}I=ct;break t;case 3:ct.flags=ct.flags&-65537|128;case 0:if(ct=_t.payload,w=typeof ct=="function"?ct.call(te,I,w):ct,w==null)break t;I=S({},I,w);break t;case 2:Ta=!0}}w=y.callback,w!==null&&(t.flags|=64,M&&(t.flags|=8192),M=r.callbacks,M===null?r.callbacks=[w]:M.push(w))}else M={lane:w,tag:y.tag,payload:y.payload,callback:y.callback,next:null},V===null?(C=V=M,T=I):V=V.next=M,m|=w;if(y=y.next,y===null){if(y=r.shared.pending,y===null)break;M=y,y=M.next,M.next=null,r.lastBaseUpdate=M,r.shared.pending=null}}while(!0);V===null&&(T=I),r.baseState=T,r.firstBaseUpdate=C,r.lastBaseUpdate=V,c===null&&(r.shared.lanes=0),Da|=m,t.lanes=m,t.memoizedState=I}}function Jf(t,e){if(typeof t!="function")throw Error(o(191,t));t.call(e)}function $f(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)Jf(n[t],e)}var Zs=Pt(null),ao=Pt(0);function Wf(t,e){t=ca,St(ao,t),St(Zs,e),ca=t|e.baseLanes}function ic(){St(ao,ca),St(Zs,Zs.current)}function lc(){ca=ao.current,Et(Zs),Et(ao)}var dn=Pt(null),En=null;function Aa(t){var e=t.alternate;St(ye,ye.current&1),St(dn,t),En===null&&(e===null||Zs.current!==null||e.memoizedState!==null)&&(En=t)}function oc(t){St(ye,ye.current),St(dn,t),En===null&&(En=t)}function th(t){t.tag===22?(St(ye,ye.current),St(dn,t),En===null&&(En=t)):Ea()}function Ea(){St(ye,ye.current),St(dn,dn.current)}function fn(t){Et(dn),En===t&&(En=null),Et(ye)}var ye=Pt(0);function so(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||hu(n)||mu(n)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var ea=0,Ct=null,$t=null,je=null,io=!1,Xs=!1,cs=!1,lo=0,Yi=0,Ks=null,s1=0;function he(){throw Error(o(321))}function rc(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!cn(t[n],e[n]))return!1;return!0}function cc(t,e,n,s,r,c){return ea=c,Ct=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,B.H=t===null||t.memoizedState===null?Uh:jc,cs=!1,c=n(s,r),cs=!1,Xs&&(c=nh(e,n,s,r)),eh(t),c}function eh(t){B.H=Ki;var e=$t!==null&&$t.next!==null;if(ea=0,je=$t=Ct=null,io=!1,Yi=0,Ks=null,e)throw Error(o(300));t===null||Ae||(t=t.dependencies,t!==null&&Fl(t)&&(Ae=!0))}function nh(t,e,n,s){Ct=t;var r=0;do{if(Xs&&(Ks=null),Yi=0,Xs=!1,25<=r)throw Error(o(301));if(r+=1,je=$t=null,t.updateQueue!=null){var c=t.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}B.H=Vh,c=e(n,s)}while(Xs);return c}function i1(){var t=B.H,e=t.useState()[0];return e=typeof e.then=="function"?Zi(e):e,t=t.useState()[0],($t!==null?$t.memoizedState:null)!==t&&(Ct.flags|=1024),e}function uc(){var t=lo!==0;return lo=0,t}function dc(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function fc(t){if(io){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}io=!1}ea=0,je=$t=Ct=null,Xs=!1,Yi=lo=0,Ks=null}function Qe(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return je===null?Ct.memoizedState=je=t:je=je.next=t,je}function be(){if($t===null){var t=Ct.alternate;t=t!==null?t.memoizedState:null}else t=$t.next;var e=je===null?Ct.memoizedState:je.next;if(e!==null)je=e,$t=t;else{if(t===null)throw Ct.alternate===null?Error(o(467)):Error(o(310));$t=t,t={memoizedState:$t.memoizedState,baseState:$t.baseState,baseQueue:$t.baseQueue,queue:$t.queue,next:null},je===null?Ct.memoizedState=je=t:je=je.next=t}return je}function oo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Zi(t){var e=Yi;return Yi+=1,Ks===null&&(Ks=[]),t=Xf(Ks,t,e),e=Ct,(je===null?e.memoizedState:je.next)===null&&(e=e.alternate,B.H=e===null||e.memoizedState===null?Uh:jc),t}function ro(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Zi(t);if(t.$$typeof===R)return Ve(t)}throw Error(o(438,String(t)))}function hc(t){var e=null,n=Ct.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var s=Ct.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(e={data:s.data.map(function(r){return r.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=oo(),Ct.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),s=0;s<t;s++)n[s]=dt;return e.index++,n}function na(t,e){return typeof e=="function"?e(t):e}function co(t){var e=be();return mc(e,$t,t)}function mc(t,e,n){var s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=n;var r=t.baseQueue,c=s.pending;if(c!==null){if(r!==null){var m=r.next;r.next=c.next,c.next=m}e.baseQueue=r=c,s.pending=null}if(c=t.baseState,r===null)t.memoizedState=c;else{e=r.next;var y=m=null,T=null,C=e,V=!1;do{var I=C.lane&-536870913;if(I!==C.lane?(Ot&I)===I:(ea&I)===I){var w=C.revertLane;if(w===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null}),I===Gs&&(V=!0);else if((ea&w)===w){C=C.next,w===Gs&&(V=!0);continue}else I={lane:0,revertLane:C.revertLane,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},T===null?(y=T=I,m=c):T=T.next=I,Ct.lanes|=w,Da|=w;I=C.action,cs&&n(c,I),c=C.hasEagerState?C.eagerState:n(c,I)}else w={lane:I,revertLane:C.revertLane,gesture:C.gesture,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},T===null?(y=T=w,m=c):T=T.next=w,Ct.lanes|=I,Da|=I;C=C.next}while(C!==null&&C!==e);if(T===null?m=c:T.next=y,!cn(c,t.memoizedState)&&(Ae=!0,V&&(n=Is,n!==null)))throw n;t.memoizedState=c,t.baseState=m,t.baseQueue=T,s.lastRenderedState=c}return r===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function pc(t){var e=be(),n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=t;var s=n.dispatch,r=n.pending,c=e.memoizedState;if(r!==null){n.pending=null;var m=r=r.next;do c=t(c,m.action),m=m.next;while(m!==r);cn(c,e.memoizedState)||(Ae=!0),e.memoizedState=c,e.baseQueue===null&&(e.baseState=c),n.lastRenderedState=c}return[c,s]}function ah(t,e,n){var s=Ct,r=be(),c=Vt;if(c){if(n===void 0)throw Error(o(407));n=n()}else n=e();var m=!cn(($t||r).memoizedState,n);if(m&&(r.memoizedState=n,Ae=!0),r=r.queue,yc(lh.bind(null,s,r,t),[t]),r.getSnapshot!==e||m||je!==null&&je.memoizedState.tag&1){if(s.flags|=2048,Qs(9,{destroy:void 0},ih.bind(null,s,r,n,e),null),ne===null)throw Error(o(349));c||(ea&127)!==0||sh(s,e,n)}return n}function sh(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Ct.updateQueue,e===null?(e=oo(),Ct.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function ih(t,e,n,s){e.value=n,e.getSnapshot=s,oh(e)&&rh(t)}function lh(t,e,n){return n(function(){oh(e)&&rh(t)})}function oh(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!cn(t,n)}catch{return!0}}function rh(t){var e=ts(t,2);e!==null&&on(e,t,2)}function gc(t){var e=Qe();if(typeof t=="function"){var n=t;if(t=n(),cs){W(!0);try{n()}finally{W(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:t},e}function ch(t,e,n,s){return t.baseState=n,mc(t,$t,typeof s=="function"?s:na)}function l1(t,e,n,s,r){if(ho(t))throw Error(o(485));if(t=e.action,t!==null){var c={payload:r,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){c.listeners.push(m)}};B.T!==null?n(!0):c.isTransition=!1,s(c),n=e.pending,n===null?(c.next=e.pending=c,uh(e,c)):(c.next=n.next,e.pending=n.next=c)}}function uh(t,e){var n=e.action,s=e.payload,r=t.state;if(e.isTransition){var c=B.T,m={};B.T=m;try{var y=n(r,s),T=B.S;T!==null&&T(m,y),dh(t,e,y)}catch(C){vc(t,e,C)}finally{c!==null&&m.types!==null&&(c.types=m.types),B.T=c}}else try{c=n(r,s),dh(t,e,c)}catch(C){vc(t,e,C)}}function dh(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(s){fh(t,e,s)},function(s){return vc(t,e,s)}):fh(t,e,n)}function fh(t,e,n){e.status="fulfilled",e.value=n,hh(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,uh(t,n)))}function vc(t,e,n){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do e.status="rejected",e.reason=n,hh(e),e=e.next;while(e!==s)}t.action=null}function hh(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function mh(t,e){return e}function ph(t,e){if(Vt){var n=ne.formState;if(n!==null){t:{var s=Ct;if(Vt){if(ie){e:{for(var r=ie,c=An;r.nodeType!==8;){if(!c){r=null;break e}if(r=Nn(r.nextSibling),r===null){r=null;break e}}c=r.data,r=c==="F!"||c==="F"?r:null}if(r){ie=Nn(r.nextSibling),s=r.data==="F!";break t}}Sa(s)}s=!1}s&&(e=n[0])}}return n=Qe(),n.memoizedState=n.baseState=e,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mh,lastRenderedState:e},n.queue=s,n=Oh.bind(null,Ct,s),s.dispatch=n,s=gc(!1),c=xc.bind(null,Ct,!1,s.queue),s=Qe(),r={state:e,dispatch:null,action:t,pending:null},s.queue=r,n=l1.bind(null,Ct,r,c,n),r.dispatch=n,s.memoizedState=t,[e,n,!1]}function gh(t){var e=be();return vh(e,$t,t)}function vh(t,e,n){if(e=mc(t,e,mh)[0],t=co(na)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var s=Zi(e)}catch(m){throw m===qs?Wl:m}else s=e;e=be();var r=e.queue,c=r.dispatch;return n!==e.memoizedState&&(Ct.flags|=2048,Qs(9,{destroy:void 0},o1.bind(null,r,n),null)),[s,c,t]}function o1(t,e){t.action=e}function yh(t){var e=be(),n=$t;if(n!==null)return vh(e,n,t);be(),e=e.memoizedState,n=be();var s=n.queue.dispatch;return n.memoizedState=t,[e,s,!1]}function Qs(t,e,n,s){return t={tag:t,create:n,deps:s,inst:e,next:null},e=Ct.updateQueue,e===null&&(e=oo(),Ct.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(s=n.next,n.next=t,t.next=s,e.lastEffect=t),t}function bh(){return be().memoizedState}function uo(t,e,n,s){var r=Qe();Ct.flags|=t,r.memoizedState=Qs(1|e,{destroy:void 0},n,s===void 0?null:s)}function fo(t,e,n,s){var r=be();s=s===void 0?null:s;var c=r.memoizedState.inst;$t!==null&&s!==null&&rc(s,$t.memoizedState.deps)?r.memoizedState=Qs(e,c,n,s):(Ct.flags|=t,r.memoizedState=Qs(1|e,c,n,s))}function Sh(t,e){uo(8390656,8,t,e)}function yc(t,e){fo(2048,8,t,e)}function r1(t){Ct.flags|=4;var e=Ct.updateQueue;if(e===null)e=oo(),Ct.updateQueue=e,e.events=[t];else{var n=e.events;n===null?e.events=[t]:n.push(t)}}function _h(t){var e=be().memoizedState;return r1({ref:e,nextImpl:t}),function(){if((Yt&2)!==0)throw Error(o(440));return e.impl.apply(void 0,arguments)}}function Th(t,e){return fo(4,2,t,e)}function xh(t,e){return fo(4,4,t,e)}function jh(t,e){if(typeof e=="function"){t=t();var n=e(t);return function(){typeof n=="function"?n():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Ah(t,e,n){n=n!=null?n.concat([t]):null,fo(4,4,jh.bind(null,e,t),n)}function bc(){}function Eh(t,e){var n=be();e=e===void 0?null:e;var s=n.memoizedState;return e!==null&&rc(e,s[1])?s[0]:(n.memoizedState=[t,e],t)}function Nh(t,e){var n=be();e=e===void 0?null:e;var s=n.memoizedState;if(e!==null&&rc(e,s[1]))return s[0];if(s=t(),cs){W(!0);try{t()}finally{W(!1)}}return n.memoizedState=[s,e],s}function Sc(t,e,n){return n===void 0||(ea&1073741824)!==0&&(Ot&261930)===0?t.memoizedState=e:(t.memoizedState=n,t=Cm(),Ct.lanes|=t,Da|=t,n)}function Ch(t,e,n,s){return cn(n,e)?n:Zs.current!==null?(t=Sc(t,n,s),cn(t,e)||(Ae=!0),t):(ea&42)===0||(ea&1073741824)!==0&&(Ot&261930)===0?(Ae=!0,t.memoizedState=n):(t=Cm(),Ct.lanes|=t,Da|=t,e)}function Dh(t,e,n,s,r){var c=X.p;X.p=c!==0&&8>c?c:8;var m=B.T,y={};B.T=y,xc(t,!1,e,n);try{var T=r(),C=B.S;if(C!==null&&C(y,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var V=a1(T,s);Xi(t,e,V,pn(t))}else Xi(t,e,s,pn(t))}catch(I){Xi(t,e,{then:function(){},status:"rejected",reason:I},pn())}finally{X.p=c,m!==null&&y.types!==null&&(m.types=y.types),B.T=m}}function c1(){}function _c(t,e,n,s){if(t.tag!==5)throw Error(o(476));var r=wh(t).queue;Dh(t,r,e,rt,n===null?c1:function(){return kh(t),n(s)})}function wh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:rt,baseState:rt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:rt},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function kh(t){var e=wh(t);e.next===null&&(e=t.alternate.memoizedState),Xi(t,e.next.queue,{},pn())}function Tc(){return Ve(cl)}function Mh(){return be().memoizedState}function Rh(){return be().memoizedState}function u1(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=pn();t=xa(n);var s=ja(e,t,n);s!==null&&(on(s,e,n),Gi(s,e,n)),e={cache:Jr()},t.payload=e;return}e=e.return}}function d1(t,e,n){var s=pn();n={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ho(t)?Bh(e,n):(n=Hr(t,e,n,s),n!==null&&(on(n,t,s),zh(n,e,s)))}function Oh(t,e,n){var s=pn();Xi(t,e,n,s)}function Xi(t,e,n,s){var r={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ho(t))Bh(e,r);else{var c=t.alternate;if(t.lanes===0&&(c===null||c.lanes===0)&&(c=e.lastRenderedReducer,c!==null))try{var m=e.lastRenderedState,y=c(m,n);if(r.hasEagerState=!0,r.eagerState=y,cn(y,m))return Xl(t,e,r,0),ne===null&&Zl(),!1}catch{}finally{}if(n=Hr(t,e,r,s),n!==null)return on(n,t,s),zh(n,e,s),!0}return!1}function xc(t,e,n,s){if(s={lane:2,revertLane:eu(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},ho(t)){if(e)throw Error(o(479))}else e=Hr(t,n,s,2),e!==null&&on(e,t,2)}function ho(t){var e=t.alternate;return t===Ct||e!==null&&e===Ct}function Bh(t,e){Xs=io=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function zh(t,e,n){if((n&4194048)!==0){var s=e.lanes;s&=t.pendingLanes,n|=s,e.lanes=n,_i(t,n)}}var Ki={readContext:Ve,use:ro,useCallback:he,useContext:he,useEffect:he,useImperativeHandle:he,useLayoutEffect:he,useInsertionEffect:he,useMemo:he,useReducer:he,useRef:he,useState:he,useDebugValue:he,useDeferredValue:he,useTransition:he,useSyncExternalStore:he,useId:he,useHostTransitionStatus:he,useFormState:he,useActionState:he,useOptimistic:he,useMemoCache:he,useCacheRefresh:he};Ki.useEffectEvent=he;var Uh={readContext:Ve,use:ro,useCallback:function(t,e){return Qe().memoizedState=[t,e===void 0?null:e],t},useContext:Ve,useEffect:Sh,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,uo(4194308,4,jh.bind(null,e,t),n)},useLayoutEffect:function(t,e){return uo(4194308,4,t,e)},useInsertionEffect:function(t,e){uo(4,2,t,e)},useMemo:function(t,e){var n=Qe();e=e===void 0?null:e;var s=t();if(cs){W(!0);try{t()}finally{W(!1)}}return n.memoizedState=[s,e],s},useReducer:function(t,e,n){var s=Qe();if(n!==void 0){var r=n(e);if(cs){W(!0);try{n(e)}finally{W(!1)}}}else r=e;return s.memoizedState=s.baseState=r,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},s.queue=t,t=t.dispatch=d1.bind(null,Ct,t),[s.memoizedState,t]},useRef:function(t){var e=Qe();return t={current:t},e.memoizedState=t},useState:function(t){t=gc(t);var e=t.queue,n=Oh.bind(null,Ct,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:bc,useDeferredValue:function(t,e){var n=Qe();return Sc(n,t,e)},useTransition:function(){var t=gc(!1);return t=Dh.bind(null,Ct,t.queue,!0,!1),Qe().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var s=Ct,r=Qe();if(Vt){if(n===void 0)throw Error(o(407));n=n()}else{if(n=e(),ne===null)throw Error(o(349));(Ot&127)!==0||sh(s,e,n)}r.memoizedState=n;var c={value:n,getSnapshot:e};return r.queue=c,Sh(lh.bind(null,s,c,t),[t]),s.flags|=2048,Qs(9,{destroy:void 0},ih.bind(null,s,c,n,e),null),n},useId:function(){var t=Qe(),e=ne.identifierPrefix;if(Vt){var n=Ln,s=Vn;n=(s&~(1<<32-At(s)-1)).toString(32)+n,e="_"+e+"R_"+n,n=lo++,0<n&&(e+="H"+n.toString(32)),e+="_"}else n=s1++,e="_"+e+"r_"+n.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:Tc,useFormState:ph,useActionState:ph,useOptimistic:function(t){var e=Qe();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=xc.bind(null,Ct,!0,n),n.dispatch=e,[t,e]},useMemoCache:hc,useCacheRefresh:function(){return Qe().memoizedState=u1.bind(null,Ct)},useEffectEvent:function(t){var e=Qe(),n={impl:t};return e.memoizedState=n,function(){if((Yt&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},jc={readContext:Ve,use:ro,useCallback:Eh,useContext:Ve,useEffect:yc,useImperativeHandle:Ah,useInsertionEffect:Th,useLayoutEffect:xh,useMemo:Nh,useReducer:co,useRef:bh,useState:function(){return co(na)},useDebugValue:bc,useDeferredValue:function(t,e){var n=be();return Ch(n,$t.memoizedState,t,e)},useTransition:function(){var t=co(na)[0],e=be().memoizedState;return[typeof t=="boolean"?t:Zi(t),e]},useSyncExternalStore:ah,useId:Mh,useHostTransitionStatus:Tc,useFormState:gh,useActionState:gh,useOptimistic:function(t,e){var n=be();return ch(n,$t,t,e)},useMemoCache:hc,useCacheRefresh:Rh};jc.useEffectEvent=_h;var Vh={readContext:Ve,use:ro,useCallback:Eh,useContext:Ve,useEffect:yc,useImperativeHandle:Ah,useInsertionEffect:Th,useLayoutEffect:xh,useMemo:Nh,useReducer:pc,useRef:bh,useState:function(){return pc(na)},useDebugValue:bc,useDeferredValue:function(t,e){var n=be();return $t===null?Sc(n,t,e):Ch(n,$t.memoizedState,t,e)},useTransition:function(){var t=pc(na)[0],e=be().memoizedState;return[typeof t=="boolean"?t:Zi(t),e]},useSyncExternalStore:ah,useId:Mh,useHostTransitionStatus:Tc,useFormState:yh,useActionState:yh,useOptimistic:function(t,e){var n=be();return $t!==null?ch(n,$t,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:hc,useCacheRefresh:Rh};Vh.useEffectEvent=_h;function Ac(t,e,n,s){e=t.memoizedState,n=n(s,e),n=n==null?e:S({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Ec={enqueueSetState:function(t,e,n){t=t._reactInternals;var s=pn(),r=xa(s);r.payload=e,n!=null&&(r.callback=n),e=ja(t,r,s),e!==null&&(on(e,t,s),Gi(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var s=pn(),r=xa(s);r.tag=1,r.payload=e,n!=null&&(r.callback=n),e=ja(t,r,s),e!==null&&(on(e,t,s),Gi(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=pn(),s=xa(n);s.tag=2,e!=null&&(s.callback=e),e=ja(t,s,n),e!==null&&(on(e,t,n),Gi(e,t,n))}};function Lh(t,e,n,s,r,c,m){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,c,m):e.prototype&&e.prototype.isPureReactComponent?!Ri(n,s)||!Ri(r,c):!0}function Hh(t,e,n,s){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,s),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,s),e.state!==t&&Ec.enqueueReplaceState(e,e.state,null)}function us(t,e){var n=e;if("ref"in e){n={};for(var s in e)s!=="ref"&&(n[s]=e[s])}if(t=t.defaultProps){n===e&&(n=S({},n));for(var r in t)n[r]===void 0&&(n[r]=t[r])}return n}function Gh(t){Yl(t)}function Ih(t){console.error(t)}function qh(t){Yl(t)}function mo(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(s){setTimeout(function(){throw s})}}function Yh(t,e,n){try{var s=t.onCaughtError;s(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Nc(t,e,n){return n=xa(n),n.tag=3,n.payload={element:null},n.callback=function(){mo(t,e)},n}function Zh(t){return t=xa(t),t.tag=3,t}function Xh(t,e,n,s){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var c=s.value;t.payload=function(){return r(c)},t.callback=function(){Yh(e,n,s)}}var m=n.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(t.callback=function(){Yh(e,n,s),typeof r!="function"&&(wa===null?wa=new Set([this]):wa.add(this));var y=s.stack;this.componentDidCatch(s.value,{componentStack:y!==null?y:""})})}function f1(t,e,n,s,r){if(n.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(e=n.alternate,e!==null&&Hs(e,n,r,!0),n=dn.current,n!==null){switch(n.tag){case 31:case 13:return En===null?Eo():n.alternate===null&&me===0&&(me=3),n.flags&=-257,n.flags|=65536,n.lanes=r,s===to?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([s]):e.add(s),$c(t,s,r)),!1;case 22:return n.flags|=65536,s===to?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([s])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([s]):n.add(s)),$c(t,s,r)),!1}throw Error(o(435,n.tag))}return $c(t,s,r),Eo(),!1}if(Vt)return e=dn.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=r,s!==Xr&&(t=Error(o(422),{cause:s}),zi(Tn(t,n)))):(s!==Xr&&(e=Error(o(423),{cause:s}),zi(Tn(e,n))),t=t.current.alternate,t.flags|=65536,r&=-r,t.lanes|=r,s=Tn(s,n),r=Nc(t.stateNode,s,r),ac(t,r),me!==4&&(me=2)),!1;var c=Error(o(520),{cause:s});if(c=Tn(c,n),el===null?el=[c]:el.push(c),me!==4&&(me=2),e===null)return!0;s=Tn(s,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=r&-r,n.lanes|=t,t=Nc(n.stateNode,s,t),ac(n,t),!1;case 1:if(e=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(wa===null||!wa.has(c))))return n.flags|=65536,r&=-r,n.lanes|=r,r=Zh(r),Xh(r,t,n,s),ac(n,r),!1}n=n.return}while(n!==null);return!1}var Cc=Error(o(461)),Ae=!1;function Le(t,e,n,s){e.child=t===null?Ff(e,null,n,s):rs(e,t.child,n,s)}function Kh(t,e,n,s,r){n=n.render;var c=e.ref;if("ref"in s){var m={};for(var y in s)y!=="ref"&&(m[y]=s[y])}else m=s;return ss(e),s=cc(t,e,n,m,c,r),y=uc(),t!==null&&!Ae?(dc(t,e,r),aa(t,e,r)):(Vt&&y&&Yr(e),e.flags|=1,Le(t,e,s,r),e.child)}function Qh(t,e,n,s,r){if(t===null){var c=n.type;return typeof c=="function"&&!Gr(c)&&c.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=c,Ph(t,e,c,s,r)):(t=Ql(n.type,null,s,e,e.mode,r),t.ref=e.ref,t.return=e,e.child=t)}if(c=t.child,!zc(t,r)){var m=c.memoizedProps;if(n=n.compare,n=n!==null?n:Ri,n(m,s)&&t.ref===e.ref)return aa(t,e,r)}return e.flags|=1,t=Jn(c,s),t.ref=e.ref,t.return=e,e.child=t}function Ph(t,e,n,s,r){if(t!==null){var c=t.memoizedProps;if(Ri(c,s)&&t.ref===e.ref)if(Ae=!1,e.pendingProps=s=c,zc(t,r))(t.flags&131072)!==0&&(Ae=!0);else return e.lanes=t.lanes,aa(t,e,r)}return Dc(t,e,n,s,r)}function Fh(t,e,n,s){var r=s.children,c=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((e.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,t!==null){for(s=e.child=t.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~c}else s=0,e.child=null;return Jh(t,e,c,n,s)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&$l(e,c!==null?c.cachePool:null),c!==null?Wf(e,c):ic(),th(e);else return s=e.lanes=536870912,Jh(t,e,c!==null?c.baseLanes|n:n,n,s)}else c!==null?($l(e,c.cachePool),Wf(e,c),Ea(),e.memoizedState=null):(t!==null&&$l(e,null),ic(),Ea());return Le(t,e,r,n),e.child}function Qi(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function Jh(t,e,n,s,r){var c=Wr();return c=c===null?null:{parent:xe._currentValue,pool:c},e.memoizedState={baseLanes:n,cachePool:c},t!==null&&$l(e,null),ic(),th(e),t!==null&&Hs(t,e,s,!0),e.childLanes=r,null}function po(t,e){return e=vo({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function $h(t,e,n){return rs(e,t.child,null,n),t=po(e,e.pendingProps),t.flags|=2,fn(e),e.memoizedState=null,t}function h1(t,e,n){var s=e.pendingProps,r=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Vt){if(s.mode==="hidden")return t=po(e,s),e.lanes=536870912,Qi(null,t);if(oc(e),(t=ie)?(t=up(t,An),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:ya!==null?{id:Vn,overflow:Ln}:null,retryLane:536870912,hydrationErrors:null},n=Bf(t),n.return=e,e.child=n,Ue=e,ie=null)):t=null,t===null)throw Sa(e);return e.lanes=536870912,null}return po(e,s)}var c=t.memoizedState;if(c!==null){var m=c.dehydrated;if(oc(e),r)if(e.flags&256)e.flags&=-257,e=$h(t,e,n);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(o(558));else if(Ae||Hs(t,e,n,!1),r=(n&t.childLanes)!==0,Ae||r){if(s=ne,s!==null&&(m=Ti(s,n),m!==0&&m!==c.retryLane))throw c.retryLane=m,ts(t,m),on(s,t,m),Cc;Eo(),e=$h(t,e,n)}else t=c.treeContext,ie=Nn(m.nextSibling),Ue=e,Vt=!0,ba=null,An=!1,t!==null&&Vf(e,t),e=po(e,s),e.flags|=4096;return e}return t=Jn(t.child,{mode:s.mode,children:s.children}),t.ref=e.ref,e.child=t,t.return=e,t}function go(t,e){var n=e.ref;if(n===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(o(284));(t===null||t.ref!==n)&&(e.flags|=4194816)}}function Dc(t,e,n,s,r){return ss(e),n=cc(t,e,n,s,void 0,r),s=uc(),t!==null&&!Ae?(dc(t,e,r),aa(t,e,r)):(Vt&&s&&Yr(e),e.flags|=1,Le(t,e,n,r),e.child)}function Wh(t,e,n,s,r,c){return ss(e),e.updateQueue=null,n=nh(e,s,n,r),eh(t),s=uc(),t!==null&&!Ae?(dc(t,e,c),aa(t,e,c)):(Vt&&s&&Yr(e),e.flags|=1,Le(t,e,n,c),e.child)}function tm(t,e,n,s,r){if(ss(e),e.stateNode===null){var c=zs,m=n.contextType;typeof m=="object"&&m!==null&&(c=Ve(m)),c=new n(s,c),e.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Ec,e.stateNode=c,c._reactInternals=e,c=e.stateNode,c.props=s,c.state=e.memoizedState,c.refs={},ec(e),m=n.contextType,c.context=typeof m=="object"&&m!==null?Ve(m):zs,c.state=e.memoizedState,m=n.getDerivedStateFromProps,typeof m=="function"&&(Ac(e,n,m,s),c.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(m=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),m!==c.state&&Ec.enqueueReplaceState(c,c.state,null),qi(e,s,c,r),Ii(),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308),s=!0}else if(t===null){c=e.stateNode;var y=e.memoizedProps,T=us(n,y);c.props=T;var C=c.context,V=n.contextType;m=zs,typeof V=="object"&&V!==null&&(m=Ve(V));var I=n.getDerivedStateFromProps;V=typeof I=="function"||typeof c.getSnapshotBeforeUpdate=="function",y=e.pendingProps!==y,V||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y||C!==m)&&Hh(e,c,s,m),Ta=!1;var w=e.memoizedState;c.state=w,qi(e,s,c,r),Ii(),C=e.memoizedState,y||w!==C||Ta?(typeof I=="function"&&(Ac(e,n,I,s),C=e.memoizedState),(T=Ta||Lh(e,n,T,s,w,C,m))?(V||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(e.flags|=4194308)):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=s,e.memoizedState=C),c.props=s,c.state=C,c.context=m,s=T):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),s=!1)}else{c=e.stateNode,nc(t,e),m=e.memoizedProps,V=us(n,m),c.props=V,I=e.pendingProps,w=c.context,C=n.contextType,T=zs,typeof C=="object"&&C!==null&&(T=Ve(C)),y=n.getDerivedStateFromProps,(C=typeof y=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(m!==I||w!==T)&&Hh(e,c,s,T),Ta=!1,w=e.memoizedState,c.state=w,qi(e,s,c,r),Ii();var M=e.memoizedState;m!==I||w!==M||Ta||t!==null&&t.dependencies!==null&&Fl(t.dependencies)?(typeof y=="function"&&(Ac(e,n,y,s),M=e.memoizedState),(V=Ta||Lh(e,n,V,s,w,M,T)||t!==null&&t.dependencies!==null&&Fl(t.dependencies))?(C||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(s,M,T),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(s,M,T)),typeof c.componentDidUpdate=="function"&&(e.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof c.componentDidUpdate!="function"||m===t.memoizedProps&&w===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===t.memoizedProps&&w===t.memoizedState||(e.flags|=1024),e.memoizedProps=s,e.memoizedState=M),c.props=s,c.state=M,c.context=T,s=V):(typeof c.componentDidUpdate!="function"||m===t.memoizedProps&&w===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===t.memoizedProps&&w===t.memoizedState||(e.flags|=1024),s=!1)}return c=s,go(t,e),s=(e.flags&128)!==0,c||s?(c=e.stateNode,n=s&&typeof n.getDerivedStateFromError!="function"?null:c.render(),e.flags|=1,t!==null&&s?(e.child=rs(e,t.child,null,r),e.child=rs(e,null,n,r)):Le(t,e,n,r),e.memoizedState=c.state,t=e.child):t=aa(t,e,r),t}function em(t,e,n,s){return ns(),e.flags|=256,Le(t,e,n,s),e.child}var wc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kc(t){return{baseLanes:t,cachePool:Yf()}}function Mc(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=mn),t}function nm(t,e,n){var s=e.pendingProps,r=!1,c=(e.flags&128)!==0,m;if((m=c)||(m=t!==null&&t.memoizedState===null?!1:(ye.current&2)!==0),m&&(r=!0,e.flags&=-129),m=(e.flags&32)!==0,e.flags&=-33,t===null){if(Vt){if(r?Aa(e):Ea(),(t=ie)?(t=up(t,An),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:ya!==null?{id:Vn,overflow:Ln}:null,retryLane:536870912,hydrationErrors:null},n=Bf(t),n.return=e,e.child=n,Ue=e,ie=null)):t=null,t===null)throw Sa(e);return mu(t)?e.lanes=32:e.lanes=536870912,null}var y=s.children;return s=s.fallback,r?(Ea(),r=e.mode,y=vo({mode:"hidden",children:y},r),s=es(s,r,n,null),y.return=e,s.return=e,y.sibling=s,e.child=y,s=e.child,s.memoizedState=kc(n),s.childLanes=Mc(t,m,n),e.memoizedState=wc,Qi(null,s)):(Aa(e),Rc(e,y))}var T=t.memoizedState;if(T!==null&&(y=T.dehydrated,y!==null)){if(c)e.flags&256?(Aa(e),e.flags&=-257,e=Oc(t,e,n)):e.memoizedState!==null?(Ea(),e.child=t.child,e.flags|=128,e=null):(Ea(),y=s.fallback,r=e.mode,s=vo({mode:"visible",children:s.children},r),y=es(y,r,n,null),y.flags|=2,s.return=e,y.return=e,s.sibling=y,e.child=s,rs(e,t.child,null,n),s=e.child,s.memoizedState=kc(n),s.childLanes=Mc(t,m,n),e.memoizedState=wc,e=Qi(null,s));else if(Aa(e),mu(y)){if(m=y.nextSibling&&y.nextSibling.dataset,m)var C=m.dgst;m=C,s=Error(o(419)),s.stack="",s.digest=m,zi({value:s,source:null,stack:null}),e=Oc(t,e,n)}else if(Ae||Hs(t,e,n,!1),m=(n&t.childLanes)!==0,Ae||m){if(m=ne,m!==null&&(s=Ti(m,n),s!==0&&s!==T.retryLane))throw T.retryLane=s,ts(t,s),on(m,t,s),Cc;hu(y)||Eo(),e=Oc(t,e,n)}else hu(y)?(e.flags|=192,e.child=t.child,e=null):(t=T.treeContext,ie=Nn(y.nextSibling),Ue=e,Vt=!0,ba=null,An=!1,t!==null&&Vf(e,t),e=Rc(e,s.children),e.flags|=4096);return e}return r?(Ea(),y=s.fallback,r=e.mode,T=t.child,C=T.sibling,s=Jn(T,{mode:"hidden",children:s.children}),s.subtreeFlags=T.subtreeFlags&65011712,C!==null?y=Jn(C,y):(y=es(y,r,n,null),y.flags|=2),y.return=e,s.return=e,s.sibling=y,e.child=s,Qi(null,s),s=e.child,y=t.child.memoizedState,y===null?y=kc(n):(r=y.cachePool,r!==null?(T=xe._currentValue,r=r.parent!==T?{parent:T,pool:T}:r):r=Yf(),y={baseLanes:y.baseLanes|n,cachePool:r}),s.memoizedState=y,s.childLanes=Mc(t,m,n),e.memoizedState=wc,Qi(t.child,s)):(Aa(e),n=t.child,t=n.sibling,n=Jn(n,{mode:"visible",children:s.children}),n.return=e,n.sibling=null,t!==null&&(m=e.deletions,m===null?(e.deletions=[t],e.flags|=16):m.push(t)),e.child=n,e.memoizedState=null,n)}function Rc(t,e){return e=vo({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function vo(t,e){return t=un(22,t,null,e),t.lanes=0,t}function Oc(t,e,n){return rs(e,t.child,null,n),t=Rc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function am(t,e,n){t.lanes|=e;var s=t.alternate;s!==null&&(s.lanes|=e),Pr(t.return,e,n)}function Bc(t,e,n,s,r,c){var m=t.memoizedState;m===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:r,treeForkCount:c}:(m.isBackwards=e,m.rendering=null,m.renderingStartTime=0,m.last=s,m.tail=n,m.tailMode=r,m.treeForkCount=c)}function sm(t,e,n){var s=e.pendingProps,r=s.revealOrder,c=s.tail;s=s.children;var m=ye.current,y=(m&2)!==0;if(y?(m=m&1|2,e.flags|=128):m&=1,St(ye,m),Le(t,e,s,n),s=Vt?Bi:0,!y&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&am(t,n,e);else if(t.tag===19)am(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(r){case"forwards":for(n=e.child,r=null;n!==null;)t=n.alternate,t!==null&&so(t)===null&&(r=n),n=n.sibling;n=r,n===null?(r=e.child,e.child=null):(r=n.sibling,n.sibling=null),Bc(e,!1,r,n,c,s);break;case"backwards":case"unstable_legacy-backwards":for(n=null,r=e.child,e.child=null;r!==null;){if(t=r.alternate,t!==null&&so(t)===null){e.child=r;break}t=r.sibling,r.sibling=n,n=r,r=t}Bc(e,!0,n,null,c,s);break;case"together":Bc(e,!1,null,null,void 0,s);break;default:e.memoizedState=null}return e.child}function aa(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Da|=e.lanes,(n&e.childLanes)===0)if(t!==null){if(Hs(t,e,n,!1),(n&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(o(153));if(e.child!==null){for(t=e.child,n=Jn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Jn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function zc(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Fl(t)))}function m1(t,e,n){switch(e.tag){case 3:Xe(e,e.stateNode.containerInfo),_a(e,xe,t.memoizedState.cache),ns();break;case 27:case 5:Je(e);break;case 4:Xe(e,e.stateNode.containerInfo);break;case 10:_a(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,oc(e),null;break;case 13:var s=e.memoizedState;if(s!==null)return s.dehydrated!==null?(Aa(e),e.flags|=128,null):(n&e.child.childLanes)!==0?nm(t,e,n):(Aa(e),t=aa(t,e,n),t!==null?t.sibling:null);Aa(e);break;case 19:var r=(t.flags&128)!==0;if(s=(n&e.childLanes)!==0,s||(Hs(t,e,n,!1),s=(n&e.childLanes)!==0),r){if(s)return sm(t,e,n);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),St(ye,ye.current),s)break;return null;case 22:return e.lanes=0,Fh(t,e,n,e.pendingProps);case 24:_a(e,xe,t.memoizedState.cache)}return aa(t,e,n)}function im(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)Ae=!0;else{if(!zc(t,n)&&(e.flags&128)===0)return Ae=!1,m1(t,e,n);Ae=(t.flags&131072)!==0}else Ae=!1,Vt&&(e.flags&1048576)!==0&&Uf(e,Bi,e.index);switch(e.lanes=0,e.tag){case 16:t:{var s=e.pendingProps;if(t=ls(e.elementType),e.type=t,typeof t=="function")Gr(t)?(s=us(t,s),e.tag=1,e=tm(null,e,t,s,n)):(e.tag=0,e=Dc(null,e,t,s,n));else{if(t!=null){var r=t.$$typeof;if(r===tt){e.tag=11,e=Kh(null,e,t,s,n);break t}else if(r===at){e.tag=14,e=Qh(null,e,t,s,n);break t}}throw e=Xt(t)||t,Error(o(306,e,""))}}return e;case 0:return Dc(t,e,e.type,e.pendingProps,n);case 1:return s=e.type,r=us(s,e.pendingProps),tm(t,e,s,r,n);case 3:t:{if(Xe(e,e.stateNode.containerInfo),t===null)throw Error(o(387));s=e.pendingProps;var c=e.memoizedState;r=c.element,nc(t,e),qi(e,s,null,n);var m=e.memoizedState;if(s=m.cache,_a(e,xe,s),s!==c.cache&&Fr(e,[xe],n,!0),Ii(),s=m.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:m.cache},e.updateQueue.baseState=c,e.memoizedState=c,e.flags&256){e=em(t,e,s,n);break t}else if(s!==r){r=Tn(Error(o(424)),e),zi(r),e=em(t,e,s,n);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(ie=Nn(t.firstChild),Ue=e,Vt=!0,ba=null,An=!0,n=Ff(e,null,s,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ns(),s===r){e=aa(t,e,n);break t}Le(t,e,s,n)}e=e.child}return e;case 26:return go(t,e),t===null?(n=gp(e.type,null,e.pendingProps,null))?e.memoizedState=n:Vt||(n=e.type,t=e.pendingProps,s=Ro(fe.current).createElement(n),s[Te]=e,s[st]=t,He(s,n,t),we(s),e.stateNode=s):e.memoizedState=gp(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Je(e),t===null&&Vt&&(s=e.stateNode=hp(e.type,e.pendingProps,fe.current),Ue=e,An=!0,r=ie,Oa(e.type)?(pu=r,ie=Nn(s.firstChild)):ie=r),Le(t,e,e.pendingProps.children,n),go(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Vt&&((r=s=ie)&&(s=Y1(s,e.type,e.pendingProps,An),s!==null?(e.stateNode=s,Ue=e,ie=Nn(s.firstChild),An=!1,r=!0):r=!1),r||Sa(e)),Je(e),r=e.type,c=e.pendingProps,m=t!==null?t.memoizedProps:null,s=c.children,uu(r,c)?s=null:m!==null&&uu(r,m)&&(e.flags|=32),e.memoizedState!==null&&(r=cc(t,e,i1,null,null,n),cl._currentValue=r),go(t,e),Le(t,e,s,n),e.child;case 6:return t===null&&Vt&&((t=n=ie)&&(n=Z1(n,e.pendingProps,An),n!==null?(e.stateNode=n,Ue=e,ie=null,t=!0):t=!1),t||Sa(e)),null;case 13:return nm(t,e,n);case 4:return Xe(e,e.stateNode.containerInfo),s=e.pendingProps,t===null?e.child=rs(e,null,s,n):Le(t,e,s,n),e.child;case 11:return Kh(t,e,e.type,e.pendingProps,n);case 7:return Le(t,e,e.pendingProps,n),e.child;case 8:return Le(t,e,e.pendingProps.children,n),e.child;case 12:return Le(t,e,e.pendingProps.children,n),e.child;case 10:return s=e.pendingProps,_a(e,e.type,s.value),Le(t,e,s.children,n),e.child;case 9:return r=e.type._context,s=e.pendingProps.children,ss(e),r=Ve(r),s=s(r),e.flags|=1,Le(t,e,s,n),e.child;case 14:return Qh(t,e,e.type,e.pendingProps,n);case 15:return Ph(t,e,e.type,e.pendingProps,n);case 19:return sm(t,e,n);case 31:return h1(t,e,n);case 22:return Fh(t,e,n,e.pendingProps);case 24:return ss(e),s=Ve(xe),t===null?(r=Wr(),r===null&&(r=ne,c=Jr(),r.pooledCache=c,c.refCount++,c!==null&&(r.pooledCacheLanes|=n),r=c),e.memoizedState={parent:s,cache:r},ec(e),_a(e,xe,r)):((t.lanes&n)!==0&&(nc(t,e),qi(e,null,null,n),Ii()),r=t.memoizedState,c=e.memoizedState,r.parent!==s?(r={parent:s,cache:s},e.memoizedState=r,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=r),_a(e,xe,s)):(s=c.cache,_a(e,xe,s),s!==r.cache&&Fr(e,[xe],n,!0))),Le(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(o(156,e.tag))}function sa(t){t.flags|=4}function Uc(t,e,n,s,r){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(r&335544128)===r)if(t.stateNode.complete)t.flags|=8192;else if(Mm())t.flags|=8192;else throw os=to,tc}else t.flags&=-16777217}function lm(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!_p(e))if(Mm())t.flags|=8192;else throw os=to,tc}function yo(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?pa():536870912,t.lanes|=e,$s|=e)}function Pi(t,e){if(!Vt)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function le(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,s=0;if(e)for(var r=t.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=t,r=r.sibling;else for(r=t.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=t,r=r.sibling;return t.subtreeFlags|=s,t.childLanes=n,e}function p1(t,e,n){var s=e.pendingProps;switch(Zr(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return le(e),null;case 1:return le(e),null;case 3:return n=e.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),e.memoizedState.cache!==s&&(e.flags|=2048),ta(xe),ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Ls(e)?sa(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Kr())),le(e),null;case 26:var r=e.type,c=e.memoizedState;return t===null?(sa(e),c!==null?(le(e),lm(e,c)):(le(e),Uc(e,r,null,s,n))):c?c!==t.memoizedState?(sa(e),le(e),lm(e,c)):(le(e),e.flags&=-16777217):(t=t.memoizedProps,t!==s&&sa(e),le(e),Uc(e,r,t,s,n)),null;case 27:if(Ie(e),n=fe.current,r=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&sa(e);else{if(!s){if(e.stateNode===null)throw Error(o(166));return le(e),null}t=G.current,Ls(e)?Lf(e):(t=hp(r,s,n),e.stateNode=t,sa(e))}return le(e),null;case 5:if(Ie(e),r=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&sa(e);else{if(!s){if(e.stateNode===null)throw Error(o(166));return le(e),null}if(c=G.current,Ls(e))Lf(e);else{var m=Ro(fe.current);switch(c){case 1:c=m.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:c=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":c=m.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":c=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":c=m.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof s.is=="string"?m.createElement("select",{is:s.is}):m.createElement("select"),s.multiple?c.multiple=!0:s.size&&(c.size=s.size);break;default:c=typeof s.is=="string"?m.createElement(r,{is:s.is}):m.createElement(r)}}c[Te]=e,c[st]=s;t:for(m=e.child;m!==null;){if(m.tag===5||m.tag===6)c.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break t;for(;m.sibling===null;){if(m.return===null||m.return===e)break t;m=m.return}m.sibling.return=m.return,m=m.sibling}e.stateNode=c;t:switch(He(c,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break t;case"img":s=!0;break t;default:s=!1}s&&sa(e)}}return le(e),Uc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==s&&sa(e);else{if(typeof s!="string"&&e.stateNode===null)throw Error(o(166));if(t=fe.current,Ls(e)){if(t=e.stateNode,n=e.memoizedProps,s=null,r=Ue,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}t[Te]=e,t=!!(t.nodeValue===n||s!==null&&s.suppressHydrationWarning===!0||np(t.nodeValue,n)),t||Sa(e,!0)}else t=Ro(t).createTextNode(s),t[Te]=e,e.stateNode=t}return le(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(s=Ls(e),n!==null){if(t===null){if(!s)throw Error(o(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[Te]=e}else ns(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;le(e),t=!1}else n=Kr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(fn(e),e):(fn(e),null);if((e.flags&128)!==0)throw Error(o(558))}return le(e),null;case 13:if(s=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(r=Ls(e),s!==null&&s.dehydrated!==null){if(t===null){if(!r)throw Error(o(318));if(r=e.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[Te]=e}else ns(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;le(e),r=!1}else r=Kr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=r),r=!0;if(!r)return e.flags&256?(fn(e),e):(fn(e),null)}return fn(e),(e.flags&128)!==0?(e.lanes=n,e):(n=s!==null,t=t!==null&&t.memoizedState!==null,n&&(s=e.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==r&&(s.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),yo(e,e.updateQueue),le(e),null);case 4:return ee(),t===null&&iu(e.stateNode.containerInfo),le(e),null;case 10:return ta(e.type),le(e),null;case 19:if(Et(ye),s=e.memoizedState,s===null)return le(e),null;if(r=(e.flags&128)!==0,c=s.rendering,c===null)if(r)Pi(s,!1);else{if(me!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(c=so(t),c!==null){for(e.flags|=128,Pi(s,!1),t=c.updateQueue,e.updateQueue=t,yo(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)Of(n,t),n=n.sibling;return St(ye,ye.current&1|2),Vt&&$n(e,s.treeForkCount),e.child}t=t.sibling}s.tail!==null&&Mt()>xo&&(e.flags|=128,r=!0,Pi(s,!1),e.lanes=4194304)}else{if(!r)if(t=so(c),t!==null){if(e.flags|=128,r=!0,t=t.updateQueue,e.updateQueue=t,yo(e,t),Pi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!Vt)return le(e),null}else 2*Mt()-s.renderingStartTime>xo&&n!==536870912&&(e.flags|=128,r=!0,Pi(s,!1),e.lanes=4194304);s.isBackwards?(c.sibling=e.child,e.child=c):(t=s.last,t!==null?t.sibling=c:e.child=c,s.last=c)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Mt(),t.sibling=null,n=ye.current,St(ye,r?n&1|2:n&1),Vt&&$n(e,s.treeForkCount),t):(le(e),null);case 22:case 23:return fn(e),lc(),s=e.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(e.flags|=8192):s&&(e.flags|=8192),s?(n&536870912)!==0&&(e.flags&128)===0&&(le(e),e.subtreeFlags&6&&(e.flags|=8192)):le(e),n=e.updateQueue,n!==null&&yo(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),s=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),s!==n&&(e.flags|=2048),t!==null&&Et(is),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),ta(xe),le(e),null;case 25:return null;case 30:return null}throw Error(o(156,e.tag))}function g1(t,e){switch(Zr(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return ta(xe),ee(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Ie(e),null;case 31:if(e.memoizedState!==null){if(fn(e),e.alternate===null)throw Error(o(340));ns()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(fn(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(o(340));ns()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Et(ye),null;case 4:return ee(),null;case 10:return ta(e.type),null;case 22:case 23:return fn(e),lc(),t!==null&&Et(is),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return ta(xe),null;case 25:return null;default:return null}}function om(t,e){switch(Zr(e),e.tag){case 3:ta(xe),ee();break;case 26:case 27:case 5:Ie(e);break;case 4:ee();break;case 31:e.memoizedState!==null&&fn(e);break;case 13:fn(e);break;case 19:Et(ye);break;case 10:ta(e.type);break;case 22:case 23:fn(e),lc(),t!==null&&Et(is);break;case 24:ta(xe)}}function Fi(t,e){try{var n=e.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var r=s.next;n=r;do{if((n.tag&t)===t){s=void 0;var c=n.create,m=n.inst;s=c(),m.destroy=s}n=n.next}while(n!==r)}}catch(y){Jt(e,e.return,y)}}function Na(t,e,n){try{var s=e.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var c=r.next;s=c;do{if((s.tag&t)===t){var m=s.inst,y=m.destroy;if(y!==void 0){m.destroy=void 0,r=e;var T=n,C=y;try{C()}catch(V){Jt(r,T,V)}}}s=s.next}while(s!==c)}}catch(V){Jt(e,e.return,V)}}function rm(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{$f(e,n)}catch(s){Jt(t,t.return,s)}}}function cm(t,e,n){n.props=us(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(s){Jt(t,e,s)}}function Ji(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof n=="function"?t.refCleanup=n(s):n.current=s}}catch(r){Jt(t,e,r)}}function Hn(t,e){var n=t.ref,s=t.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(r){Jt(t,e,r)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){Jt(t,e,r)}else n.current=null}function um(t){var e=t.type,n=t.memoizedProps,s=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&s.focus();break t;case"img":n.src?s.src=n.src:n.srcSet&&(s.srcset=n.srcSet)}}catch(r){Jt(t,t.return,r)}}function Vc(t,e,n){try{var s=t.stateNode;V1(s,t.type,n,e),s[st]=e}catch(r){Jt(t,t.return,r)}}function dm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Oa(t.type)||t.tag===4}function Lc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||dm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Oa(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Hc(t,e,n){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Pn));else if(s!==4&&(s===27&&Oa(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(Hc(t,e,n),t=t.sibling;t!==null;)Hc(t,e,n),t=t.sibling}function bo(t,e,n){var s=t.tag;if(s===5||s===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(s!==4&&(s===27&&Oa(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(bo(t,e,n),t=t.sibling;t!==null;)bo(t,e,n),t=t.sibling}function fm(t){var e=t.stateNode,n=t.memoizedProps;try{for(var s=t.type,r=e.attributes;r.length;)e.removeAttributeNode(r[0]);He(e,s,n),e[Te]=t,e[st]=n}catch(c){Jt(t,t.return,c)}}var ia=!1,Ee=!1,Gc=!1,hm=typeof WeakSet=="function"?WeakSet:Set,ke=null;function v1(t,e){if(t=t.containerInfo,ru=Ho,t=Af(t),Or(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var r=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break t}var m=0,y=-1,T=-1,C=0,V=0,I=t,w=null;e:for(;;){for(var M;I!==n||r!==0&&I.nodeType!==3||(y=m+r),I!==c||s!==0&&I.nodeType!==3||(T=m+s),I.nodeType===3&&(m+=I.nodeValue.length),(M=I.firstChild)!==null;)w=I,I=M;for(;;){if(I===t)break e;if(w===n&&++C===r&&(y=m),w===c&&++V===s&&(T=m),(M=I.nextSibling)!==null)break;I=w,w=I.parentNode}I=M}n=y===-1||T===-1?null:{start:y,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(cu={focusedElem:t,selectionRange:n},Ho=!1,ke=e;ke!==null;)if(e=ke,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ke=t;else for(;ke!==null;){switch(e=ke,c=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n<t.length;n++)r=t[n],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&c!==null){t=void 0,n=e,r=c.memoizedProps,c=c.memoizedState,s=n.stateNode;try{var ct=us(n.type,r);t=s.getSnapshotBeforeUpdate(ct,c),s.__reactInternalSnapshotBeforeUpdate=t}catch(_t){Jt(n,n.return,_t)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)fu(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":fu(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(o(163))}if(t=e.sibling,t!==null){t.return=e.return,ke=t;break}ke=e.return}}function mm(t,e,n){var s=n.flags;switch(n.tag){case 0:case 11:case 15:oa(t,n),s&4&&Fi(5,n);break;case 1:if(oa(t,n),s&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(m){Jt(n,n.return,m)}else{var r=us(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(r,e,t.__reactInternalSnapshotBeforeUpdate)}catch(m){Jt(n,n.return,m)}}s&64&&rm(n),s&512&&Ji(n,n.return);break;case 3:if(oa(t,n),s&64&&(t=n.updateQueue,t!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{$f(t,e)}catch(m){Jt(n,n.return,m)}}break;case 27:e===null&&s&4&&fm(n);case 26:case 5:oa(t,n),e===null&&s&4&&um(n),s&512&&Ji(n,n.return);break;case 12:oa(t,n);break;case 31:oa(t,n),s&4&&vm(t,n);break;case 13:oa(t,n),s&4&&ym(t,n),s&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=E1.bind(null,n),X1(t,n))));break;case 22:if(s=n.memoizedState!==null||ia,!s){e=e!==null&&e.memoizedState!==null||Ee,r=ia;var c=Ee;ia=s,(Ee=e)&&!c?ra(t,n,(n.subtreeFlags&8772)!==0):oa(t,n),ia=r,Ee=c}break;case 30:break;default:oa(t,n)}}function pm(t){var e=t.alternate;e!==null&&(t.alternate=null,pm(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&vr(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ce=null,nn=!1;function la(t,e,n){for(n=n.child;n!==null;)gm(t,e,n),n=n.sibling}function gm(t,e,n){if(Be&&typeof Be.onCommitFiberUnmount=="function")try{Be.onCommitFiberUnmount(Oe,n)}catch{}switch(n.tag){case 26:Ee||Hn(n,e),la(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ee||Hn(n,e);var s=ce,r=nn;Oa(n.type)&&(ce=n.stateNode,nn=!1),la(t,e,n),ll(n.stateNode),ce=s,nn=r;break;case 5:Ee||Hn(n,e);case 6:if(s=ce,r=nn,ce=null,la(t,e,n),ce=s,nn=r,ce!==null)if(nn)try{(ce.nodeType===9?ce.body:ce.nodeName==="HTML"?ce.ownerDocument.body:ce).removeChild(n.stateNode)}catch(c){Jt(n,e,c)}else try{ce.removeChild(n.stateNode)}catch(c){Jt(n,e,c)}break;case 18:ce!==null&&(nn?(t=ce,rp(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),li(t)):rp(ce,n.stateNode));break;case 4:s=ce,r=nn,ce=n.stateNode.containerInfo,nn=!0,la(t,e,n),ce=s,nn=r;break;case 0:case 11:case 14:case 15:Na(2,n,e),Ee||Na(4,n,e),la(t,e,n);break;case 1:Ee||(Hn(n,e),s=n.stateNode,typeof s.componentWillUnmount=="function"&&cm(n,e,s)),la(t,e,n);break;case 21:la(t,e,n);break;case 22:Ee=(s=Ee)||n.memoizedState!==null,la(t,e,n),Ee=s;break;default:la(t,e,n)}}function vm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{li(t)}catch(n){Jt(e,e.return,n)}}}function ym(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{li(t)}catch(n){Jt(e,e.return,n)}}function y1(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new hm),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new hm),e;default:throw Error(o(435,t.tag))}}function So(t,e){var n=y1(t);e.forEach(function(s){if(!n.has(s)){n.add(s);var r=N1.bind(null,t,s);s.then(r,r)}})}function an(t,e){var n=e.deletions;if(n!==null)for(var s=0;s<n.length;s++){var r=n[s],c=t,m=e,y=m;t:for(;y!==null;){switch(y.tag){case 27:if(Oa(y.type)){ce=y.stateNode,nn=!1;break t}break;case 5:ce=y.stateNode,nn=!1;break t;case 3:case 4:ce=y.stateNode.containerInfo,nn=!0;break t}y=y.return}if(ce===null)throw Error(o(160));gm(c,m,r),ce=null,nn=!1,c=r.alternate,c!==null&&(c.return=null),r.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)bm(e,t),e=e.sibling}var On=null;function bm(t,e){var n=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:an(e,t),sn(t),s&4&&(Na(3,t,t.return),Fi(3,t),Na(5,t,t.return));break;case 1:an(e,t),sn(t),s&512&&(Ee||n===null||Hn(n,n.return)),s&64&&ia&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?s:n.concat(s))));break;case 26:var r=On;if(an(e,t),sn(t),s&512&&(Ee||n===null||Hn(n,n.return)),s&4){var c=n!==null?n.memoizedState:null;if(s=t.memoizedState,n===null)if(s===null)if(t.stateNode===null){t:{s=t.type,n=t.memoizedProps,r=r.ownerDocument||r;e:switch(s){case"title":c=r.getElementsByTagName("title")[0],(!c||c[Pa]||c[Te]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=r.createElement(s),r.head.insertBefore(c,r.querySelector("head > title"))),He(c,s,n),c[Te]=t,we(c),s=c;break t;case"link":var m=bp("link","href",r).get(s+(n.href||""));if(m){for(var y=0;y<m.length;y++)if(c=m[y],c.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&c.getAttribute("rel")===(n.rel==null?null:n.rel)&&c.getAttribute("title")===(n.title==null?null:n.title)&&c.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){m.splice(y,1);break e}}c=r.createElement(s),He(c,s,n),r.head.appendChild(c);break;case"meta":if(m=bp("meta","content",r).get(s+(n.content||""))){for(y=0;y<m.length;y++)if(c=m[y],c.getAttribute("content")===(n.content==null?null:""+n.content)&&c.getAttribute("name")===(n.name==null?null:n.name)&&c.getAttribute("property")===(n.property==null?null:n.property)&&c.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&c.getAttribute("charset")===(n.charSet==null?null:n.charSet)){m.splice(y,1);break e}}c=r.createElement(s),He(c,s,n),r.head.appendChild(c);break;default:throw Error(o(468,s))}c[Te]=t,we(c),s=c}t.stateNode=s}else Sp(r,t.type,t.stateNode);else t.stateNode=yp(r,s,t.memoizedProps);else c!==s?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,s===null?Sp(r,t.type,t.stateNode):yp(r,s,t.memoizedProps)):s===null&&t.stateNode!==null&&Vc(t,t.memoizedProps,n.memoizedProps)}break;case 27:an(e,t),sn(t),s&512&&(Ee||n===null||Hn(n,n.return)),n!==null&&s&4&&Vc(t,t.memoizedProps,n.memoizedProps);break;case 5:if(an(e,t),sn(t),s&512&&(Ee||n===null||Hn(n,n.return)),t.flags&32){r=t.stateNode;try{Ds(r,"")}catch(ct){Jt(t,t.return,ct)}}s&4&&t.stateNode!=null&&(r=t.memoizedProps,Vc(t,r,n!==null?n.memoizedProps:r)),s&1024&&(Gc=!0);break;case 6:if(an(e,t),sn(t),s&4){if(t.stateNode===null)throw Error(o(162));s=t.memoizedProps,n=t.stateNode;try{n.nodeValue=s}catch(ct){Jt(t,t.return,ct)}}break;case 3:if(zo=null,r=On,On=Oo(e.containerInfo),an(e,t),On=r,sn(t),s&4&&n!==null&&n.memoizedState.isDehydrated)try{li(e.containerInfo)}catch(ct){Jt(t,t.return,ct)}Gc&&(Gc=!1,Sm(t));break;case 4:s=On,On=Oo(t.stateNode.containerInfo),an(e,t),sn(t),On=s;break;case 12:an(e,t),sn(t);break;case 31:an(e,t),sn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,So(t,s)));break;case 13:an(e,t),sn(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(To=Mt()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,So(t,s)));break;case 22:r=t.memoizedState!==null;var T=n!==null&&n.memoizedState!==null,C=ia,V=Ee;if(ia=C||r,Ee=V||T,an(e,t),Ee=V,ia=C,sn(t),s&8192)t:for(e=t.stateNode,e._visibility=r?e._visibility&-2:e._visibility|1,r&&(n===null||T||ia||Ee||ds(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){T=n=e;try{if(c=T.stateNode,r)m=c.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{y=T.stateNode;var I=T.memoizedProps.style,w=I!=null&&I.hasOwnProperty("display")?I.display:null;y.style.display=w==null||typeof w=="boolean"?"":(""+w).trim()}}catch(ct){Jt(T,T.return,ct)}}}else if(e.tag===6){if(n===null){T=e;try{T.stateNode.nodeValue=r?"":T.memoizedProps}catch(ct){Jt(T,T.return,ct)}}}else if(e.tag===18){if(n===null){T=e;try{var M=T.stateNode;r?cp(M,!0):cp(T.stateNode,!1)}catch(ct){Jt(T,T.return,ct)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;n===e&&(n=null),e=e.return}n===e&&(n=null),e.sibling.return=e.return,e=e.sibling}s&4&&(s=t.updateQueue,s!==null&&(n=s.retryQueue,n!==null&&(s.retryQueue=null,So(t,n))));break;case 19:an(e,t),sn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,So(t,s)));break;case 30:break;case 21:break;default:an(e,t),sn(t)}}function sn(t){var e=t.flags;if(e&2){try{for(var n,s=t.return;s!==null;){if(dm(s)){n=s;break}s=s.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var r=n.stateNode,c=Lc(t);bo(t,c,r);break;case 5:var m=n.stateNode;n.flags&32&&(Ds(m,""),n.flags&=-33);var y=Lc(t);bo(t,y,m);break;case 3:case 4:var T=n.stateNode.containerInfo,C=Lc(t);Hc(t,C,T);break;default:throw Error(o(161))}}catch(V){Jt(t,t.return,V)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Sm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;Sm(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function oa(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)mm(t,e.alternate,e),e=e.sibling}function ds(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:Na(4,e,e.return),ds(e);break;case 1:Hn(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&cm(e,e.return,n),ds(e);break;case 27:ll(e.stateNode);case 26:case 5:Hn(e,e.return),ds(e);break;case 22:e.memoizedState===null&&ds(e);break;case 30:ds(e);break;default:ds(e)}t=t.sibling}}function ra(t,e,n){for(n=n&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var s=e.alternate,r=t,c=e,m=c.flags;switch(c.tag){case 0:case 11:case 15:ra(r,c,n),Fi(4,c);break;case 1:if(ra(r,c,n),s=c,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(C){Jt(s,s.return,C)}if(s=c,r=s.updateQueue,r!==null){var y=s.stateNode;try{var T=r.shared.hiddenCallbacks;if(T!==null)for(r.shared.hiddenCallbacks=null,r=0;r<T.length;r++)Jf(T[r],y)}catch(C){Jt(s,s.return,C)}}n&&m&64&&rm(c),Ji(c,c.return);break;case 27:fm(c);case 26:case 5:ra(r,c,n),n&&s===null&&m&4&&um(c),Ji(c,c.return);break;case 12:ra(r,c,n);break;case 31:ra(r,c,n),n&&m&4&&vm(r,c);break;case 13:ra(r,c,n),n&&m&4&&ym(r,c);break;case 22:c.memoizedState===null&&ra(r,c,n),Ji(c,c.return);break;case 30:break;default:ra(r,c,n)}e=e.sibling}}function Ic(t,e){var n=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==n&&(t!=null&&t.refCount++,n!=null&&Ui(n))}function qc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Ui(t))}function Bn(t,e,n,s){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_m(t,e,n,s),e=e.sibling}function _m(t,e,n,s){var r=e.flags;switch(e.tag){case 0:case 11:case 15:Bn(t,e,n,s),r&2048&&Fi(9,e);break;case 1:Bn(t,e,n,s);break;case 3:Bn(t,e,n,s),r&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Ui(t)));break;case 12:if(r&2048){Bn(t,e,n,s),t=e.stateNode;try{var c=e.memoizedProps,m=c.id,y=c.onPostCommit;typeof y=="function"&&y(m,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(T){Jt(e,e.return,T)}}else Bn(t,e,n,s);break;case 31:Bn(t,e,n,s);break;case 13:Bn(t,e,n,s);break;case 23:break;case 22:c=e.stateNode,m=e.alternate,e.memoizedState!==null?c._visibility&2?Bn(t,e,n,s):$i(t,e):c._visibility&2?Bn(t,e,n,s):(c._visibility|=2,Ps(t,e,n,s,(e.subtreeFlags&10256)!==0||!1)),r&2048&&Ic(m,e);break;case 24:Bn(t,e,n,s),r&2048&&qc(e.alternate,e);break;default:Bn(t,e,n,s)}}function Ps(t,e,n,s,r){for(r=r&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var c=t,m=e,y=n,T=s,C=m.flags;switch(m.tag){case 0:case 11:case 15:Ps(c,m,y,T,r),Fi(8,m);break;case 23:break;case 22:var V=m.stateNode;m.memoizedState!==null?V._visibility&2?Ps(c,m,y,T,r):$i(c,m):(V._visibility|=2,Ps(c,m,y,T,r)),r&&C&2048&&Ic(m.alternate,m);break;case 24:Ps(c,m,y,T,r),r&&C&2048&&qc(m.alternate,m);break;default:Ps(c,m,y,T,r)}e=e.sibling}}function $i(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,s=e,r=s.flags;switch(s.tag){case 22:$i(n,s),r&2048&&Ic(s.alternate,s);break;case 24:$i(n,s),r&2048&&qc(s.alternate,s);break;default:$i(n,s)}e=e.sibling}}var Wi=8192;function Fs(t,e,n){if(t.subtreeFlags&Wi)for(t=t.child;t!==null;)Tm(t,e,n),t=t.sibling}function Tm(t,e,n){switch(t.tag){case 26:Fs(t,e,n),t.flags&Wi&&t.memoizedState!==null&&sb(n,On,t.memoizedState,t.memoizedProps);break;case 5:Fs(t,e,n);break;case 3:case 4:var s=On;On=Oo(t.stateNode.containerInfo),Fs(t,e,n),On=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=Wi,Wi=16777216,Fs(t,e,n),Wi=s):Fs(t,e,n));break;default:Fs(t,e,n)}}function xm(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function tl(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var s=e[n];ke=s,Am(s,t)}xm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jm(t),t=t.sibling}function jm(t){switch(t.tag){case 0:case 11:case 15:tl(t),t.flags&2048&&Na(9,t,t.return);break;case 3:tl(t);break;case 12:tl(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,_o(t)):tl(t);break;default:tl(t)}}function _o(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var s=e[n];ke=s,Am(s,t)}xm(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:Na(8,e,e.return),_o(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,_o(e));break;default:_o(e)}t=t.sibling}}function Am(t,e){for(;ke!==null;){var n=ke;switch(n.tag){case 0:case 11:case 15:Na(8,n,e);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var s=n.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Ui(n.memoizedState.cache)}if(s=n.child,s!==null)s.return=n,ke=s;else t:for(n=t;ke!==null;){s=ke;var r=s.sibling,c=s.return;if(pm(s),s===n){ke=null;break t}if(r!==null){r.return=c,ke=r;break t}ke=c}}}var b1={getCacheForType:function(t){var e=Ve(xe),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n},cacheSignal:function(){return Ve(xe).controller.signal}},S1=typeof WeakMap=="function"?WeakMap:Map,Yt=0,ne=null,wt=null,Ot=0,Ft=0,hn=null,Ca=!1,Js=!1,Yc=!1,ca=0,me=0,Da=0,fs=0,Zc=0,mn=0,$s=0,el=null,ln=null,Xc=!1,To=0,Em=0,xo=1/0,jo=null,wa=null,Ce=0,ka=null,Ws=null,ua=0,Kc=0,Qc=null,Nm=null,nl=0,Pc=null;function pn(){return(Yt&2)!==0&&Ot!==0?Ot&-Ot:B.T!==null?eu():xi()}function Cm(){if(mn===0)if((Ot&536870912)===0||Vt){var t=Ke;Ke<<=1,(Ke&3932160)===0&&(Ke=262144),mn=t}else mn=536870912;return t=dn.current,t!==null&&(t.flags|=32),mn}function on(t,e,n){(t===ne&&(Ft===2||Ft===9)||t.cancelPendingCommit!==null)&&(ti(t,0),Ma(t,Ot,mn,!1)),ga(t,n),((Yt&2)===0||t!==ne)&&(t===ne&&((Yt&2)===0&&(fs|=n),me===4&&Ma(t,Ot,mn,!1)),Gn(t))}function Dm(t,e,n){if((Yt&6)!==0)throw Error(o(327));var s=!n&&(e&127)===0&&(e&t.expiredLanes)===0||re(t,e),r=s?x1(t,e):Jc(t,e,!0),c=s;do{if(r===0){Js&&!s&&Ma(t,e,0,!1);break}else{if(n=t.current.alternate,c&&!_1(n)){r=Jc(t,e,!1),c=!1;continue}if(r===2){if(c=e,t.errorRecoveryDisabledLanes&c)var m=0;else m=t.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){e=m;t:{var y=t;r=el;var T=y.current.memoizedState.isDehydrated;if(T&&(ti(y,m).flags|=256),m=Jc(y,m,!1),m!==2){if(Yc&&!T){y.errorRecoveryDisabledLanes|=c,fs|=c,r=4;break t}c=ln,ln=r,c!==null&&(ln===null?ln=c:ln.push.apply(ln,c))}r=m}if(c=!1,r!==2)continue}}if(r===1){ti(t,0),Ma(t,e,0,!0);break}t:{switch(s=t,c=r,c){case 0:case 1:throw Error(o(345));case 4:if((e&4194048)!==e)break;case 6:Ma(s,e,mn,!Ca);break t;case 2:ln=null;break;case 3:case 5:break;default:throw Error(o(329))}if((e&62914560)===e&&(r=To+300-Mt(),10<r)){if(Ma(s,e,mn,!Ca),lt(s,0,!0)!==0)break t;ua=e,s.timeoutHandle=lp(wm.bind(null,s,n,ln,jo,Xc,e,mn,fs,$s,Ca,c,"Throttled",-0,0),r);break t}wm(s,n,ln,jo,Xc,e,mn,fs,$s,Ca,c,null,-0,0)}}break}while(!0);Gn(t)}function wm(t,e,n,s,r,c,m,y,T,C,V,I,w,M){if(t.timeoutHandle=-1,I=e.subtreeFlags,I&8192||(I&16785408)===16785408){I={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pn},Tm(e,c,I);var ct=(c&62914560)===c?To-Mt():(c&4194048)===c?Em-Mt():0;if(ct=ib(I,ct),ct!==null){ua=c,t.cancelPendingCommit=ct(Vm.bind(null,t,e,c,n,s,r,m,y,T,V,I,null,w,M)),Ma(t,c,m,!C);return}}Vm(t,e,c,n,s,r,m,y,T)}function _1(t){for(var e=t;;){var n=e.tag;if((n===0||n===11||n===15)&&e.flags&16384&&(n=e.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var s=0;s<n.length;s++){var r=n[s],c=r.getSnapshot;r=r.value;try{if(!cn(c(),r))return!1}catch{return!1}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Ma(t,e,n,s){e&=~Zc,e&=~fs,t.suspendedLanes|=e,t.pingedLanes&=~e,s&&(t.warmLanes|=e),s=t.expirationTimes;for(var r=e;0<r;){var c=31-At(r),m=1<<c;s[c]=-1,r&=~m}n!==0&&Si(t,n,e)}function Ao(){return(Yt&6)===0?(al(0),!1):!0}function Fc(){if(wt!==null){if(Ft===0)var t=wt.return;else t=wt,Wn=as=null,fc(t),Ys=null,Li=0,t=wt;for(;t!==null;)om(t.alternate,t),t=t.return;wt=null}}function ti(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,G1(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),ua=0,Fc(),ne=t,wt=n=Jn(t.current,null),Ot=e,Ft=0,hn=null,Ca=!1,Js=re(t,e),Yc=!1,$s=mn=Zc=fs=Da=me=0,ln=el=null,Xc=!1,(e&8)!==0&&(e|=e&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=e;0<s;){var r=31-At(s),c=1<<r;e|=t[r],s&=~c}return ca=e,Zl(),n}function km(t,e){Ct=null,B.H=Ki,e===qs||e===Wl?(e=Kf(),Ft=3):e===tc?(e=Kf(),Ft=4):Ft=e===Cc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,hn=e,wt===null&&(me=1,mo(t,Tn(e,t.current)))}function Mm(){var t=dn.current;return t===null?!0:(Ot&4194048)===Ot?En===null:(Ot&62914560)===Ot||(Ot&536870912)!==0?t===En:!1}function Rm(){var t=B.H;return B.H=Ki,t===null?Ki:t}function Om(){var t=B.A;return B.A=b1,t}function Eo(){me=4,Ca||(Ot&4194048)!==Ot&&dn.current!==null||(Js=!0),(Da&134217727)===0&&(fs&134217727)===0||ne===null||Ma(ne,Ot,mn,!1)}function Jc(t,e,n){var s=Yt;Yt|=2;var r=Rm(),c=Om();(ne!==t||Ot!==e)&&(jo=null,ti(t,e)),e=!1;var m=me;t:do try{if(Ft!==0&&wt!==null){var y=wt,T=hn;switch(Ft){case 8:Fc(),m=6;break t;case 3:case 2:case 9:case 6:dn.current===null&&(e=!0);var C=Ft;if(Ft=0,hn=null,ei(t,y,T,C),n&&Js){m=0;break t}break;default:C=Ft,Ft=0,hn=null,ei(t,y,T,C)}}T1(),m=me;break}catch(V){km(t,V)}while(!0);return e&&t.shellSuspendCounter++,Wn=as=null,Yt=s,B.H=r,B.A=c,wt===null&&(ne=null,Ot=0,Zl()),m}function T1(){for(;wt!==null;)Bm(wt)}function x1(t,e){var n=Yt;Yt|=2;var s=Rm(),r=Om();ne!==t||Ot!==e?(jo=null,xo=Mt()+500,ti(t,e)):Js=re(t,e);t:do try{if(Ft!==0&&wt!==null){e=wt;var c=hn;e:switch(Ft){case 1:Ft=0,hn=null,ei(t,e,c,1);break;case 2:case 9:if(Zf(c)){Ft=0,hn=null,zm(e);break}e=function(){Ft!==2&&Ft!==9||ne!==t||(Ft=7),Gn(t)},c.then(e,e);break t;case 3:Ft=7;break t;case 4:Ft=5;break t;case 7:Zf(c)?(Ft=0,hn=null,zm(e)):(Ft=0,hn=null,ei(t,e,c,7));break;case 5:var m=null;switch(wt.tag){case 26:m=wt.memoizedState;case 5:case 27:var y=wt;if(m?_p(m):y.stateNode.complete){Ft=0,hn=null;var T=y.sibling;if(T!==null)wt=T;else{var C=y.return;C!==null?(wt=C,No(C)):wt=null}break e}}Ft=0,hn=null,ei(t,e,c,5);break;case 6:Ft=0,hn=null,ei(t,e,c,6);break;case 8:Fc(),me=6;break t;default:throw Error(o(462))}}j1();break}catch(V){km(t,V)}while(!0);return Wn=as=null,B.H=s,B.A=r,Yt=n,wt!==null?0:(ne=null,Ot=0,Zl(),me)}function j1(){for(;wt!==null&&!pt();)Bm(wt)}function Bm(t){var e=im(t.alternate,t,ca);t.memoizedProps=t.pendingProps,e===null?No(t):wt=e}function zm(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=Wh(n,e,e.pendingProps,e.type,void 0,Ot);break;case 11:e=Wh(n,e,e.pendingProps,e.type.render,e.ref,Ot);break;case 5:fc(e);default:om(n,e),e=wt=Of(e,ca),e=im(n,e,ca)}t.memoizedProps=t.pendingProps,e===null?No(t):wt=e}function ei(t,e,n,s){Wn=as=null,fc(e),Ys=null,Li=0;var r=e.return;try{if(f1(t,r,e,n,Ot)){me=1,mo(t,Tn(n,t.current)),wt=null;return}}catch(c){if(r!==null)throw wt=r,c;me=1,mo(t,Tn(n,t.current)),wt=null;return}e.flags&32768?(Vt||s===1?t=!0:Js||(Ot&536870912)!==0?t=!1:(Ca=t=!0,(s===2||s===9||s===3||s===6)&&(s=dn.current,s!==null&&s.tag===13&&(s.flags|=16384))),Um(e,t)):No(e)}function No(t){var e=t;do{if((e.flags&32768)!==0){Um(e,Ca);return}t=e.return;var n=p1(e.alternate,e,ca);if(n!==null){wt=n;return}if(e=e.sibling,e!==null){wt=e;return}wt=e=t}while(e!==null);me===0&&(me=5)}function Um(t,e){do{var n=g1(t.alternate,t);if(n!==null){n.flags&=32767,wt=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){wt=t;return}wt=t=n}while(t!==null);me=6,wt=null}function Vm(t,e,n,s,r,c,m,y,T){t.cancelPendingCommit=null;do Co();while(Ce!==0);if((Yt&6)!==0)throw Error(o(327));if(e!==null){if(e===t.current)throw Error(o(177));if(c=e.lanes|e.childLanes,c|=Lr,Rl(t,n,c,m,y,T),t===ne&&(wt=ne=null,Ot=0),Ws=e,ka=t,ua=n,Kc=c,Qc=r,Nm=s,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,C1(J,function(){return qm(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||s){s=B.T,B.T=null,r=X.p,X.p=2,m=Yt,Yt|=4;try{v1(t,e,n)}finally{Yt=m,X.p=r,B.T=s}}Ce=1,Lm(),Hm(),Gm()}}function Lm(){if(Ce===1){Ce=0;var t=ka,e=Ws,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=B.T,B.T=null;var s=X.p;X.p=2;var r=Yt;Yt|=4;try{bm(e,t);var c=cu,m=Af(t.containerInfo),y=c.focusedElem,T=c.selectionRange;if(m!==y&&y&&y.ownerDocument&&jf(y.ownerDocument.documentElement,y)){if(T!==null&&Or(y)){var C=T.start,V=T.end;if(V===void 0&&(V=C),"selectionStart"in y)y.selectionStart=C,y.selectionEnd=Math.min(V,y.value.length);else{var I=y.ownerDocument||document,w=I&&I.defaultView||window;if(w.getSelection){var M=w.getSelection(),ct=y.textContent.length,_t=Math.min(T.start,ct),te=T.end===void 0?_t:Math.min(T.end,ct);!M.extend&&_t>te&&(m=te,te=_t,_t=m);var E=xf(y,_t),j=xf(y,te);if(E&&j&&(M.rangeCount!==1||M.anchorNode!==E.node||M.anchorOffset!==E.offset||M.focusNode!==j.node||M.focusOffset!==j.offset)){var N=I.createRange();N.setStart(E.node,E.offset),M.removeAllRanges(),_t>te?(M.addRange(N),M.extend(j.node,j.offset)):(N.setEnd(j.node,j.offset),M.addRange(N))}}}}for(I=[],M=y;M=M.parentNode;)M.nodeType===1&&I.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<I.length;y++){var H=I[y];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}Ho=!!ru,cu=ru=null}finally{Yt=r,X.p=s,B.T=n}}t.current=e,Ce=2}}function Hm(){if(Ce===2){Ce=0;var t=ka,e=Ws,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=B.T,B.T=null;var s=X.p;X.p=2;var r=Yt;Yt|=4;try{mm(t,e.alternate,e)}finally{Yt=r,X.p=s,B.T=n}}Ce=3}}function Gm(){if(Ce===4||Ce===3){Ce=0,jt();var t=ka,e=Ws,n=ua,s=Nm;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Ce=5:(Ce=0,Ws=ka=null,Im(t,t.pendingLanes));var r=t.pendingLanes;if(r===0&&(wa=null),Ts(n),e=e.stateNode,Be&&typeof Be.onCommitFiberRoot=="function")try{Be.onCommitFiberRoot(Oe,e,void 0,(e.current.flags&128)===128)}catch{}if(s!==null){e=B.T,r=X.p,X.p=2,B.T=null;try{for(var c=t.onRecoverableError,m=0;m<s.length;m++){var y=s[m];c(y.value,{componentStack:y.stack})}}finally{B.T=e,X.p=r}}(ua&3)!==0&&Co(),Gn(t),r=t.pendingLanes,(n&261930)!==0&&(r&42)!==0?t===Pc?nl++:(nl=0,Pc=t):nl=0,al(0)}}function Im(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,Ui(e)))}function Co(){return Lm(),Hm(),Gm(),qm()}function qm(){if(Ce!==5)return!1;var t=ka,e=Kc;Kc=0;var n=Ts(ua),s=B.T,r=X.p;try{X.p=32>n?32:n,B.T=null,n=Qc,Qc=null;var c=ka,m=ua;if(Ce=0,Ws=ka=null,ua=0,(Yt&6)!==0)throw Error(o(331));var y=Yt;if(Yt|=4,jm(c.current),_m(c,c.current,m,n),Yt=y,al(0,!1),Be&&typeof Be.onPostCommitFiberRoot=="function")try{Be.onPostCommitFiberRoot(Oe,c)}catch{}return!0}finally{X.p=r,B.T=s,Im(t,e)}}function Ym(t,e,n){e=Tn(n,e),e=Nc(t.stateNode,e,2),t=ja(t,e,2),t!==null&&(ga(t,2),Gn(t))}function Jt(t,e,n){if(t.tag===3)Ym(t,t,n);else for(;e!==null;){if(e.tag===3){Ym(e,t,n);break}else if(e.tag===1){var s=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(wa===null||!wa.has(s))){t=Tn(n,t),n=Zh(2),s=ja(e,n,2),s!==null&&(Xh(n,s,e,t),ga(s,2),Gn(s));break}}e=e.return}}function $c(t,e,n){var s=t.pingCache;if(s===null){s=t.pingCache=new S1;var r=new Set;s.set(e,r)}else r=s.get(e),r===void 0&&(r=new Set,s.set(e,r));r.has(n)||(Yc=!0,r.add(n),t=A1.bind(null,t,e,n),e.then(t,t))}function A1(t,e,n){var s=t.pingCache;s!==null&&s.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,ne===t&&(Ot&n)===n&&(me===4||me===3&&(Ot&62914560)===Ot&&300>Mt()-To?(Yt&2)===0&&ti(t,0):Zc|=n,$s===Ot&&($s=0)),Gn(t)}function Zm(t,e){e===0&&(e=pa()),t=ts(t,e),t!==null&&(ga(t,e),Gn(t))}function E1(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Zm(t,n)}function N1(t,e){var n=0;switch(t.tag){case 31:case 13:var s=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(o(314))}s!==null&&s.delete(e),Zm(t,n)}function C1(t,e){return ut(t,e)}var Do=null,ni=null,Wc=!1,wo=!1,tu=!1,Ra=0;function Gn(t){t!==ni&&t.next===null&&(ni===null?Do=ni=t:ni=ni.next=t),wo=!0,Wc||(Wc=!0,w1())}function al(t,e){if(!tu&&wo){tu=!0;do for(var n=!1,s=Do;s!==null;){if(t!==0){var r=s.pendingLanes;if(r===0)var c=0;else{var m=s.suspendedLanes,y=s.pingedLanes;c=(1<<31-At(42|t)+1)-1,c&=r&~(m&~y),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Pm(s,c))}else c=Ot,c=lt(s,s===ne?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(c&3)===0||re(s,c)||(n=!0,Pm(s,c));s=s.next}while(n);tu=!1}}function D1(){Xm()}function Xm(){wo=Wc=!1;var t=0;Ra!==0&&H1()&&(t=Ra);for(var e=Mt(),n=null,s=Do;s!==null;){var r=s.next,c=Km(s,e);c===0?(s.next=null,n===null?Do=r:n.next=r,r===null&&(ni=n)):(n=s,(t!==0||(c&3)!==0)&&(wo=!0)),s=r}Ce!==0&&Ce!==5||al(t),Ra!==0&&(Ra=0)}function Km(t,e){for(var n=t.suspendedLanes,s=t.pingedLanes,r=t.expirationTimes,c=t.pendingLanes&-62914561;0<c;){var m=31-At(c),y=1<<m,T=r[m];T===-1?((y&n)===0||(y&s)!==0)&&(r[m]=rn(y,e)):T<=e&&(t.expiredLanes|=y),c&=~y}if(e=ne,n=Ot,n=lt(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,n===0||t===e&&(Ft===2||Ft===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&ft(s),t.callbackNode=null,t.callbackPriority=0;if((n&3)===0||re(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(s!==null&&ft(s),Ts(n)){case 2:case 8:n=Nt;break;case 32:n=J;break;case 268435456:n=U;break;default:n=J}return s=Qm.bind(null,t),n=ut(n,s),t.callbackPriority=e,t.callbackNode=n,e}return s!==null&&s!==null&&ft(s),t.callbackPriority=2,t.callbackNode=null,2}function Qm(t,e){if(Ce!==0&&Ce!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(Co()&&t.callbackNode!==n)return null;var s=Ot;return s=lt(t,t===ne?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(Dm(t,s,e),Km(t,Mt()),t.callbackNode!=null&&t.callbackNode===n?Qm.bind(null,t):null)}function Pm(t,e){if(Co())return null;Dm(t,e,!0)}function w1(){I1(function(){(Yt&6)!==0?ut(et,D1):Xm()})}function eu(){if(Ra===0){var t=Gs;t===0&&(t=ze,ze<<=1,(ze&261888)===0&&(ze=256)),Ra=t}return Ra}function Fm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ul(""+t)}function Jm(t,e){var n=e.ownerDocument.createElement("input");return n.name=e.name,n.value=e.value,t.id&&n.setAttribute("form",t.id),e.parentNode.insertBefore(n,e),t=new FormData(t),n.parentNode.removeChild(n),t}function k1(t,e,n,s,r){if(e==="submit"&&n&&n.stateNode===r){var c=Fm((r[st]||null).action),m=s.submitter;m&&(e=(e=m[st]||null)?Fm(e.formAction):m.getAttribute("formAction"),e!==null&&(c=e,m=null));var y=new Gl("action","action",null,s,r);t.push({event:y,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ra!==0){var T=m?Jm(r,m):new FormData(r);_c(n,{pending:!0,data:T,method:r.method,action:c},null,T)}}else typeof c=="function"&&(y.preventDefault(),T=m?Jm(r,m):new FormData(r),_c(n,{pending:!0,data:T,method:r.method,action:c},c,T))},currentTarget:r}]})}}for(var nu=0;nu<Vr.length;nu++){var au=Vr[nu],M1=au.toLowerCase(),R1=au[0].toUpperCase()+au.slice(1);Rn(M1,"on"+R1)}Rn(Cf,"onAnimationEnd"),Rn(Df,"onAnimationIteration"),Rn(wf,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(Py,"onTransitionRun"),Rn(Fy,"onTransitionStart"),Rn(Jy,"onTransitionCancel"),Rn(kf,"onTransitionEnd"),Ns("onMouseEnter",["mouseout","mouseover"]),Ns("onMouseLeave",["mouseout","mouseover"]),Ns("onPointerEnter",["pointerout","pointerover"]),Ns("onPointerLeave",["pointerout","pointerover"]),Fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sl="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(" "),O1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sl));function $m(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var s=t[n],r=s.event;s=s.listeners;t:{var c=void 0;if(e)for(var m=s.length-1;0<=m;m--){var y=s[m],T=y.instance,C=y.currentTarget;if(y=y.listener,T!==c&&r.isPropagationStopped())break t;c=y,r.currentTarget=C;try{c(r)}catch(V){Yl(V)}r.currentTarget=null,c=T}else for(m=0;m<s.length;m++){if(y=s[m],T=y.instance,C=y.currentTarget,y=y.listener,T!==c&&r.isPropagationStopped())break t;c=y,r.currentTarget=C;try{c(r)}catch(V){Yl(V)}r.currentTarget=null,c=T}}}}function kt(t,e){var n=e[Ht];n===void 0&&(n=e[Ht]=new Set);var s=t+"__bubble";n.has(s)||(Wm(e,t,2,!1),n.add(s))}function su(t,e,n){var s=0;e&&(s|=4),Wm(n,t,s,e)}var ko="_reactListening"+Math.random().toString(36).slice(2);function iu(t){if(!t[ko]){t[ko]=!0,Zd.forEach(function(n){n!=="selectionchange"&&(O1.has(n)||su(n,!1,t),su(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[ko]||(e[ko]=!0,su("selectionchange",!1,e))}}function Wm(t,e,n,s){switch(Cp(e)){case 2:var r=rb;break;case 8:r=cb;break;default:r=Su}n=r.bind(null,e,n,t),r=void 0,!Ar||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(r=!0),s?r!==void 0?t.addEventListener(e,n,{capture:!0,passive:r}):t.addEventListener(e,n,!0):r!==void 0?t.addEventListener(e,n,{passive:r}):t.addEventListener(e,n,!1)}function lu(t,e,n,s,r){var c=s;if((e&1)===0&&(e&2)===0&&s!==null)t:for(;;){if(s===null)return;var m=s.tag;if(m===3||m===4){var y=s.stateNode.containerInfo;if(y===r)break;if(m===4)for(m=s.return;m!==null;){var T=m.tag;if((T===3||T===4)&&m.stateNode.containerInfo===r)return;m=m.return}for(;y!==null;){if(m=js(y),m===null)return;if(T=m.tag,T===5||T===6||T===26||T===27){s=c=m;continue t}y=y.parentNode}}s=s.return}af(function(){var C=c,V=xr(n),I=[];t:{var w=Mf.get(t);if(w!==void 0){var M=Gl,ct=t;switch(t){case"keypress":if(Ll(n)===0)break t;case"keydown":case"keyup":M=Ny;break;case"focusin":ct="focus",M=Dr;break;case"focusout":ct="blur",M=Dr;break;case"beforeblur":case"afterblur":M=Dr;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":M=of;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=py;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=wy;break;case Cf:case Df:case wf:M=yy;break;case kf:M=My;break;case"scroll":case"scrollend":M=hy;break;case"wheel":M=Oy;break;case"copy":case"cut":case"paste":M=Sy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=cf;break;case"toggle":case"beforetoggle":M=zy}var _t=(e&4)!==0,te=!_t&&(t==="scroll"||t==="scrollend"),E=_t?w!==null?w+"Capture":null:w;_t=[];for(var j=C,N;j!==null;){var H=j;if(N=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||N===null||E===null||(H=Ei(j,E),H!=null&&_t.push(il(j,H,N))),te)break;j=j.return}0<_t.length&&(w=new M(w,ct,null,n,V),I.push({event:w,listeners:_t}))}}if((e&7)===0){t:{if(w=t==="mouseover"||t==="pointerover",M=t==="mouseout"||t==="pointerout",w&&n!==Tr&&(ct=n.relatedTarget||n.fromElement)&&(js(ct)||ct[Rt]))break t;if((M||w)&&(w=V.window===V?V:(w=V.ownerDocument)?w.defaultView||w.parentWindow:window,M?(ct=n.relatedTarget||n.toElement,M=C,ct=ct?js(ct):null,ct!==null&&(te=h(ct),_t=ct.tag,ct!==te||_t!==5&&_t!==27&&_t!==6)&&(ct=null)):(M=null,ct=C),M!==ct)){if(_t=of,H="onMouseLeave",E="onMouseEnter",j="mouse",(t==="pointerout"||t==="pointerover")&&(_t=cf,H="onPointerLeave",E="onPointerEnter",j="pointer"),te=M==null?w:Ai(M),N=ct==null?w:Ai(ct),w=new _t(H,j+"leave",M,n,V),w.target=te,w.relatedTarget=N,H=null,js(V)===C&&(_t=new _t(E,j+"enter",ct,n,V),_t.target=N,_t.relatedTarget=te,H=_t),te=H,M&&ct)e:{for(_t=B1,E=M,j=ct,N=0,H=E;H;H=_t(H))N++;H=0;for(var vt=j;vt;vt=_t(vt))H++;for(;0<N-H;)E=_t(E),N--;for(;0<H-N;)j=_t(j),H--;for(;N--;){if(E===j||j!==null&&E===j.alternate){_t=E;break e}E=_t(E),j=_t(j)}_t=null}else _t=null;M!==null&&tp(I,w,M,_t,!1),ct!==null&&te!==null&&tp(I,te,ct,_t,!0)}}t:{if(w=C?Ai(C):window,M=w.nodeName&&w.nodeName.toLowerCase(),M==="select"||M==="input"&&w.type==="file")var Gt=vf;else if(pf(w))if(yf)Gt=Xy;else{Gt=Yy;var ht=qy}else M=w.nodeName,!M||M.toLowerCase()!=="input"||w.type!=="checkbox"&&w.type!=="radio"?C&&_r(C.elementType)&&(Gt=vf):Gt=Zy;if(Gt&&(Gt=Gt(t,C))){gf(I,Gt,n,V);break t}ht&&ht(t,w,C),t==="focusout"&&C&&w.type==="number"&&C.memoizedProps.value!=null&&Sr(w,"number",w.value)}switch(ht=C?Ai(C):window,t){case"focusin":(pf(ht)||ht.contentEditable==="true")&&(Rs=ht,Br=C,Oi=null);break;case"focusout":Oi=Br=Rs=null;break;case"mousedown":zr=!0;break;case"contextmenu":case"mouseup":case"dragend":zr=!1,Ef(I,n,V);break;case"selectionchange":if(Qy)break;case"keydown":case"keyup":Ef(I,n,V)}var Dt;if(kr)t:{switch(t){case"compositionstart":var Bt="onCompositionStart";break t;case"compositionend":Bt="onCompositionEnd";break t;case"compositionupdate":Bt="onCompositionUpdate";break t}Bt=void 0}else Ms?hf(t,n)&&(Bt="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(Bt="onCompositionStart");Bt&&(uf&&n.locale!=="ko"&&(Ms||Bt!=="onCompositionStart"?Bt==="onCompositionEnd"&&Ms&&(Dt=sf()):(va=V,Er="value"in va?va.value:va.textContent,Ms=!0)),ht=Mo(C,Bt),0<ht.length&&(Bt=new rf(Bt,t,null,n,V),I.push({event:Bt,listeners:ht}),Dt?Bt.data=Dt:(Dt=mf(n),Dt!==null&&(Bt.data=Dt)))),(Dt=Vy?Ly(t,n):Hy(t,n))&&(Bt=Mo(C,"onBeforeInput"),0<Bt.length&&(ht=new rf("onBeforeInput","beforeinput",null,n,V),I.push({event:ht,listeners:Bt}),ht.data=Dt)),k1(I,t,C,n,V)}$m(I,e)})}function il(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Mo(t,e){for(var n=e+"Capture",s=[];t!==null;){var r=t,c=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||c===null||(r=Ei(t,n),r!=null&&s.unshift(il(t,r,c)),r=Ei(t,e),r!=null&&s.push(il(t,r,c))),t.tag===3)return s;t=t.return}return[]}function B1(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function tp(t,e,n,s,r){for(var c=e._reactName,m=[];n!==null&&n!==s;){var y=n,T=y.alternate,C=y.stateNode;if(y=y.tag,T!==null&&T===s)break;y!==5&&y!==26&&y!==27||C===null||(T=C,r?(C=Ei(n,c),C!=null&&m.unshift(il(n,C,T))):r||(C=Ei(n,c),C!=null&&m.push(il(n,C,T)))),n=n.return}m.length!==0&&t.push({event:e,listeners:m})}var z1=/\r\n?/g,U1=/\u0000|\uFFFD/g;function ep(t){return(typeof t=="string"?t:""+t).replace(z1,`
25
+ `).replace(U1,"")}function np(t,e){return e=ep(e),ep(t)===e}function Wt(t,e,n,s,r,c){switch(n){case"children":typeof s=="string"?e==="body"||e==="textarea"&&s===""||Ds(t,s):(typeof s=="number"||typeof s=="bigint")&&e!=="body"&&Ds(t,""+s);break;case"className":Bl(t,"class",s);break;case"tabIndex":Bl(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Bl(t,n,s);break;case"style":ef(t,s,c);break;case"data":if(e!=="object"){Bl(t,"data",s);break}case"src":case"href":if(s===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(n);break}s=Ul(""+s),t.setAttribute(n,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(n==="formAction"?(e!=="input"&&Wt(t,e,"name",r.name,r,null),Wt(t,e,"formEncType",r.formEncType,r,null),Wt(t,e,"formMethod",r.formMethod,r,null),Wt(t,e,"formTarget",r.formTarget,r,null)):(Wt(t,e,"encType",r.encType,r,null),Wt(t,e,"method",r.method,r,null),Wt(t,e,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(n);break}s=Ul(""+s),t.setAttribute(n,s);break;case"onClick":s!=null&&(t.onclick=Pn);break;case"onScroll":s!=null&&kt("scroll",t);break;case"onScrollEnd":s!=null&&kt("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(o(60));t.innerHTML=n}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}n=Ul(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,""+s):t.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":s===!0?t.setAttribute(n,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,s):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(n,s):t.removeAttribute(n);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(n):t.setAttribute(n,s);break;case"popover":kt("beforetoggle",t),kt("toggle",t),Ol(t,"popover",s);break;case"xlinkActuate":Qn(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Qn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Qn(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Qn(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Qn(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Qn(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Qn(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Qn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Qn(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Ol(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=dy.get(n)||n,Ol(t,n,s))}}function ou(t,e,n,s,r,c){switch(n){case"style":ef(t,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(o(60));t.innerHTML=n}}break;case"children":typeof s=="string"?Ds(t,s):(typeof s=="number"||typeof s=="bigint")&&Ds(t,""+s);break;case"onScroll":s!=null&&kt("scroll",t);break;case"onScrollEnd":s!=null&&kt("scrollend",t);break;case"onClick":s!=null&&(t.onclick=Pn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xd.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),e=n.slice(2,r?n.length-7:void 0),c=t[st]||null,c=c!=null?c[n]:null,typeof c=="function"&&t.removeEventListener(e,c,r),typeof s=="function")){typeof c!="function"&&c!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,s,r);break t}n in t?t[n]=s:s===!0?t.setAttribute(n,""):Ol(t,n,s)}}}function He(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":kt("error",t),kt("load",t);var s=!1,r=!1,c;for(c in n)if(n.hasOwnProperty(c)){var m=n[c];if(m!=null)switch(c){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,e));default:Wt(t,e,c,m,n,null)}}r&&Wt(t,e,"srcSet",n.srcSet,n,null),s&&Wt(t,e,"src",n.src,n,null);return;case"input":kt("invalid",t);var y=c=m=r=null,T=null,C=null;for(s in n)if(n.hasOwnProperty(s)){var V=n[s];if(V!=null)switch(s){case"name":r=V;break;case"type":m=V;break;case"checked":T=V;break;case"defaultChecked":C=V;break;case"value":c=V;break;case"defaultValue":y=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,e));break;default:Wt(t,e,s,V,n,null)}}Jd(t,c,y,T,C,m,r,!1);return;case"select":kt("invalid",t),s=m=c=null;for(r in n)if(n.hasOwnProperty(r)&&(y=n[r],y!=null))switch(r){case"value":c=y;break;case"defaultValue":m=y;break;case"multiple":s=y;default:Wt(t,e,r,y,n,null)}e=c,n=m,t.multiple=!!s,e!=null?Cs(t,!!s,e,!1):n!=null&&Cs(t,!!s,n,!0);return;case"textarea":kt("invalid",t),c=r=s=null;for(m in n)if(n.hasOwnProperty(m)&&(y=n[m],y!=null))switch(m){case"value":s=y;break;case"defaultValue":r=y;break;case"children":c=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(o(91));break;default:Wt(t,e,m,y,n,null)}Wd(t,s,r,c);return;case"option":for(T in n)if(n.hasOwnProperty(T)&&(s=n[T],s!=null))switch(T){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Wt(t,e,T,s,n,null)}return;case"dialog":kt("beforetoggle",t),kt("toggle",t),kt("cancel",t),kt("close",t);break;case"iframe":case"object":kt("load",t);break;case"video":case"audio":for(s=0;s<sl.length;s++)kt(sl[s],t);break;case"image":kt("error",t),kt("load",t);break;case"details":kt("toggle",t);break;case"embed":case"source":case"link":kt("error",t),kt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(C in n)if(n.hasOwnProperty(C)&&(s=n[C],s!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,e));default:Wt(t,e,C,s,n,null)}return;default:if(_r(e)){for(V in n)n.hasOwnProperty(V)&&(s=n[V],s!==void 0&&ou(t,e,V,s,n,void 0));return}}for(y in n)n.hasOwnProperty(y)&&(s=n[y],s!=null&&Wt(t,e,y,s,n,null))}function V1(t,e,n,s){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,c=null,m=null,y=null,T=null,C=null,V=null;for(M in n){var I=n[M];if(n.hasOwnProperty(M)&&I!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":T=I;default:s.hasOwnProperty(M)||Wt(t,e,M,null,s,I)}}for(var w in s){var M=s[w];if(I=n[w],s.hasOwnProperty(w)&&(M!=null||I!=null))switch(w){case"type":c=M;break;case"name":r=M;break;case"checked":C=M;break;case"defaultChecked":V=M;break;case"value":m=M;break;case"defaultValue":y=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(137,e));break;default:M!==I&&Wt(t,e,w,M,s,I)}}br(t,m,y,T,C,V,c,r);return;case"select":M=m=y=w=null;for(c in n)if(T=n[c],n.hasOwnProperty(c)&&T!=null)switch(c){case"value":break;case"multiple":M=T;default:s.hasOwnProperty(c)||Wt(t,e,c,null,s,T)}for(r in s)if(c=s[r],T=n[r],s.hasOwnProperty(r)&&(c!=null||T!=null))switch(r){case"value":w=c;break;case"defaultValue":y=c;break;case"multiple":m=c;default:c!==T&&Wt(t,e,r,c,s,T)}e=y,n=m,s=M,w!=null?Cs(t,!!n,w,!1):!!s!=!!n&&(e!=null?Cs(t,!!n,e,!0):Cs(t,!!n,n?[]:"",!1));return;case"textarea":M=w=null;for(y in n)if(r=n[y],n.hasOwnProperty(y)&&r!=null&&!s.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:Wt(t,e,y,null,s,r)}for(m in s)if(r=s[m],c=n[m],s.hasOwnProperty(m)&&(r!=null||c!=null))switch(m){case"value":w=r;break;case"defaultValue":M=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==c&&Wt(t,e,m,r,s,c)}$d(t,w,M);return;case"option":for(var ct in n)if(w=n[ct],n.hasOwnProperty(ct)&&w!=null&&!s.hasOwnProperty(ct))switch(ct){case"selected":t.selected=!1;break;default:Wt(t,e,ct,null,s,w)}for(T in s)if(w=s[T],M=n[T],s.hasOwnProperty(T)&&w!==M&&(w!=null||M!=null))switch(T){case"selected":t.selected=w&&typeof w!="function"&&typeof w!="symbol";break;default:Wt(t,e,T,w,s,M)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var _t in n)w=n[_t],n.hasOwnProperty(_t)&&w!=null&&!s.hasOwnProperty(_t)&&Wt(t,e,_t,null,s,w);for(C in s)if(w=s[C],M=n[C],s.hasOwnProperty(C)&&w!==M&&(w!=null||M!=null))switch(C){case"children":case"dangerouslySetInnerHTML":if(w!=null)throw Error(o(137,e));break;default:Wt(t,e,C,w,s,M)}return;default:if(_r(e)){for(var te in n)w=n[te],n.hasOwnProperty(te)&&w!==void 0&&!s.hasOwnProperty(te)&&ou(t,e,te,void 0,s,w);for(V in s)w=s[V],M=n[V],!s.hasOwnProperty(V)||w===M||w===void 0&&M===void 0||ou(t,e,V,w,s,M);return}}for(var E in n)w=n[E],n.hasOwnProperty(E)&&w!=null&&!s.hasOwnProperty(E)&&Wt(t,e,E,null,s,w);for(I in s)w=s[I],M=n[I],!s.hasOwnProperty(I)||w===M||w==null&&M==null||Wt(t,e,I,w,s,M)}function ap(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function L1(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,n=performance.getEntriesByType("resource"),s=0;s<n.length;s++){var r=n[s],c=r.transferSize,m=r.initiatorType,y=r.duration;if(c&&y&&ap(m)){for(m=0,y=r.responseEnd,s+=1;s<n.length;s++){var T=n[s],C=T.startTime;if(C>y)break;var V=T.transferSize,I=T.initiatorType;V&&ap(I)&&(T=T.responseEnd,m+=V*(T<y?1:(y-C)/(T-C)))}if(--s,e+=8*(c+m)/(r.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var ru=null,cu=null;function Ro(t){return t.nodeType===9?t:t.ownerDocument}function sp(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ip(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function uu(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var du=null;function H1(){var t=window.event;return t&&t.type==="popstate"?t===du?!1:(du=t,!0):(du=null,!1)}var lp=typeof setTimeout=="function"?setTimeout:void 0,G1=typeof clearTimeout=="function"?clearTimeout:void 0,op=typeof Promise=="function"?Promise:void 0,I1=typeof queueMicrotask=="function"?queueMicrotask:typeof op<"u"?function(t){return op.resolve(null).then(t).catch(q1)}:lp;function q1(t){setTimeout(function(){throw t})}function Oa(t){return t==="head"}function rp(t,e){var n=e,s=0;do{var r=n.nextSibling;if(t.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"||n==="/&"){if(s===0){t.removeChild(r),li(e);return}s--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")s++;else if(n==="html")ll(t.ownerDocument.documentElement);else if(n==="head"){n=t.ownerDocument.head,ll(n);for(var c=n.firstChild;c;){var m=c.nextSibling,y=c.nodeName;c[Pa]||y==="SCRIPT"||y==="STYLE"||y==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=m}}else n==="body"&&ll(t.ownerDocument.body);n=r}while(n);li(e)}function cp(t,e){var n=t;t=0;do{var s=n.nextSibling;if(n.nodeType===1?e?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(e?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(t===0)break;t--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||t++;n=s}while(n)}function fu(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":fu(n),vr(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function Y1(t,e,n,s){for(;t.nodeType===1;){var r=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[Pa])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(c=t.getAttribute("rel"),c==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(c!==r.rel||t.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||t.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||t.getAttribute("title")!==(r.title==null?null:r.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(c=t.getAttribute("src"),(c!==(r.src==null?null:r.src)||t.getAttribute("type")!==(r.type==null?null:r.type)||t.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&c&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var c=r.name==null?null:""+r.name;if(r.type==="hidden"&&t.getAttribute("name")===c)return t}else return t;if(t=Nn(t.nextSibling),t===null)break}return null}function Z1(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Nn(t.nextSibling),t===null))return null;return t}function up(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Nn(t.nextSibling),t===null))return null;return t}function hu(t){return t.data==="$?"||t.data==="$~"}function mu(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function X1(t,e){var n=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||n.readyState!=="loading")e();else{var s=function(){e(),n.removeEventListener("DOMContentLoaded",s)};n.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function Nn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var pu=null;function dp(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"||n==="/&"){if(e===0)return Nn(t.nextSibling);e--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||e++}t=t.nextSibling}return null}function fp(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(e===0)return t;e--}else n!=="/$"&&n!=="/&"||e++}t=t.previousSibling}return null}function hp(t,e,n){switch(e=Ro(n),t){case"html":if(t=e.documentElement,!t)throw Error(o(452));return t;case"head":if(t=e.head,!t)throw Error(o(453));return t;case"body":if(t=e.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function ll(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);vr(t)}var Cn=new Map,mp=new Set;function Oo(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var da=X.d;X.d={f:K1,r:Q1,D:P1,C:F1,L:J1,m:$1,X:tb,S:W1,M:eb};function K1(){var t=da.f(),e=Ao();return t||e}function Q1(t){var e=As(t);e!==null&&e.tag===5&&e.type==="form"?kh(e):da.r(t)}var ai=typeof document>"u"?null:document;function pp(t,e,n){var s=ai;if(s&&typeof e=="string"&&e){var r=Sn(e);r='link[rel="'+t+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),mp.has(r)||(mp.add(r),t={rel:t,crossOrigin:n,href:e},s.querySelector(r)===null&&(e=s.createElement("link"),He(e,"link",t),we(e),s.head.appendChild(e)))}}function P1(t){da.D(t),pp("dns-prefetch",t,null)}function F1(t,e){da.C(t,e),pp("preconnect",t,e)}function J1(t,e,n){da.L(t,e,n);var s=ai;if(s&&t&&e){var r='link[rel="preload"][as="'+Sn(e)+'"]';e==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+Sn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+Sn(n.imageSizes)+'"]')):r+='[href="'+Sn(t)+'"]';var c=r;switch(e){case"style":c=si(t);break;case"script":c=ii(t)}Cn.has(c)||(t=S({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),Cn.set(c,t),s.querySelector(r)!==null||e==="style"&&s.querySelector(ol(c))||e==="script"&&s.querySelector(rl(c))||(e=s.createElement("link"),He(e,"link",t),we(e),s.head.appendChild(e)))}}function $1(t,e){da.m(t,e);var n=ai;if(n&&t){var s=e&&typeof e.as=="string"?e.as:"script",r='link[rel="modulepreload"][as="'+Sn(s)+'"][href="'+Sn(t)+'"]',c=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=ii(t)}if(!Cn.has(c)&&(t=S({rel:"modulepreload",href:t},e),Cn.set(c,t),n.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(rl(c)))return}s=n.createElement("link"),He(s,"link",t),we(s),n.head.appendChild(s)}}}function W1(t,e,n){da.S(t,e,n);var s=ai;if(s&&t){var r=Es(s).hoistableStyles,c=si(t);e=e||"default";var m=r.get(c);if(!m){var y={loading:0,preload:null};if(m=s.querySelector(ol(c)))y.loading=5;else{t=S({rel:"stylesheet",href:t,"data-precedence":e},n),(n=Cn.get(c))&&gu(t,n);var T=m=s.createElement("link");we(T),He(T,"link",t),T._p=new Promise(function(C,V){T.onload=C,T.onerror=V}),T.addEventListener("load",function(){y.loading|=1}),T.addEventListener("error",function(){y.loading|=2}),y.loading|=4,Bo(m,e,s)}m={type:"stylesheet",instance:m,count:1,state:y},r.set(c,m)}}}function tb(t,e){da.X(t,e);var n=ai;if(n&&t){var s=Es(n).hoistableScripts,r=ii(t),c=s.get(r);c||(c=n.querySelector(rl(r)),c||(t=S({src:t,async:!0},e),(e=Cn.get(r))&&vu(t,e),c=n.createElement("script"),we(c),He(c,"link",t),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(r,c))}}function eb(t,e){da.M(t,e);var n=ai;if(n&&t){var s=Es(n).hoistableScripts,r=ii(t),c=s.get(r);c||(c=n.querySelector(rl(r)),c||(t=S({src:t,async:!0,type:"module"},e),(e=Cn.get(r))&&vu(t,e),c=n.createElement("script"),we(c),He(c,"link",t),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},s.set(r,c))}}function gp(t,e,n,s){var r=(r=fe.current)?Oo(r):null;if(!r)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=si(n.href),n=Es(r).hoistableStyles,s=n.get(e),s||(s={type:"style",instance:null,count:0,state:null},n.set(e,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=si(n.href);var c=Es(r).hoistableStyles,m=c.get(t);if(m||(r=r.ownerDocument||r,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(t,m),(c=r.querySelector(ol(t)))&&!c._p&&(m.instance=c,m.state.loading=5),Cn.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Cn.set(t,n),c||nb(r,t,n,m.state))),e&&s===null)throw Error(o(528,""));return m}if(e&&s!==null)throw Error(o(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=ii(n),n=Es(r).hoistableScripts,s=n.get(e),s||(s={type:"script",instance:null,count:0,state:null},n.set(e,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function si(t){return'href="'+Sn(t)+'"'}function ol(t){return'link[rel="stylesheet"]['+t+"]"}function vp(t){return S({},t,{"data-precedence":t.precedence,precedence:null})}function nb(t,e,n,s){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?s.loading=1:(e=t.createElement("link"),s.preload=e,e.addEventListener("load",function(){return s.loading|=1}),e.addEventListener("error",function(){return s.loading|=2}),He(e,"link",n),we(e),t.head.appendChild(e))}function ii(t){return'[src="'+Sn(t)+'"]'}function rl(t){return"script[async]"+t}function yp(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var s=t.querySelector('style[data-href~="'+Sn(n.href)+'"]');if(s)return e.instance=s,we(s),s;var r=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),we(s),He(s,"style",r),Bo(s,n.precedence,t),e.instance=s;case"stylesheet":r=si(n.href);var c=t.querySelector(ol(r));if(c)return e.state.loading|=4,e.instance=c,we(c),c;s=vp(n),(r=Cn.get(r))&&gu(s,r),c=(t.ownerDocument||t).createElement("link"),we(c);var m=c;return m._p=new Promise(function(y,T){m.onload=y,m.onerror=T}),He(c,"link",s),e.state.loading|=4,Bo(c,n.precedence,t),e.instance=c;case"script":return c=ii(n.src),(r=t.querySelector(rl(c)))?(e.instance=r,we(r),r):(s=n,(r=Cn.get(c))&&(s=S({},n),vu(s,r)),t=t.ownerDocument||t,r=t.createElement("script"),we(r),He(r,"link",s),t.head.appendChild(r),e.instance=r);case"void":return null;default:throw Error(o(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(s=e.instance,e.state.loading|=4,Bo(s,n.precedence,t));return e.instance}function Bo(t,e,n){for(var s=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,c=r,m=0;m<s.length;m++){var y=s[m];if(y.dataset.precedence===e)c=y;else if(c!==r)break}c?c.parentNode.insertBefore(t,c.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function gu(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function vu(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var zo=null;function bp(t,e,n){if(zo===null){var s=new Map,r=zo=new Map;r.set(n,s)}else r=zo,s=r.get(n),s||(s=new Map,r.set(n,s));if(s.has(t))return s;for(s.set(t,null),n=n.getElementsByTagName(t),r=0;r<n.length;r++){var c=n[r];if(!(c[Pa]||c[Te]||t==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var m=c.getAttribute(e)||"";m=t+m;var y=s.get(m);y?y.push(c):s.set(m,[c])}}return s}function Sp(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function ab(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function _p(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function sb(t,e,n,s){if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var r=si(s.href),c=e.querySelector(ol(r));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Uo.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=c,we(c);return}c=e.ownerDocument||e,s=vp(s),(r=Cn.get(r))&&gu(s,r),c=c.createElement("link"),we(c);var m=c;m._p=new Promise(function(y,T){m.onload=y,m.onerror=T}),He(c,"link",s),n.instance=c}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=Uo.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var yu=0;function ib(t,e){return t.stylesheets&&t.count===0&&Lo(t,t.stylesheets),0<t.count||0<t.imgCount?function(n){var s=setTimeout(function(){if(t.stylesheets&&Lo(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4+e);0<t.imgBytes&&yu===0&&(yu=62500*L1());var r=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Lo(t,t.stylesheets),t.unsuspend)){var c=t.unsuspend;t.unsuspend=null,c()}},(t.imgBytes>yu?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function Uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lo(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Vo=null;function Lo(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Vo=new Map,e.forEach(lb,t),Vo=null,Uo.call(t))}function lb(t,e){if(!(e.state.loading&4)){var n=Vo.get(t);if(n)var s=n.get(null);else{n=new Map,Vo.set(t,n);for(var r=t.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<r.length;c++){var m=r[c];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(n.set(m.dataset.precedence,m),s=m)}s&&n.set(null,s)}r=e.instance,m=r.getAttribute("data-precedence"),c=n.get(m)||s,c===s&&n.set(null,r),n.set(m,r),this.count++,s=Uo.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),c?c.parentNode.insertBefore(r,c.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(r,t.firstChild)),e.state.loading|=4}}var cl={$$typeof:R,Provider:null,Consumer:null,_currentValue:rt,_currentValue2:rt,_threadCount:0};function ob(t,e,n,s,r,c,m,y,T){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ss(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ss(0),this.hiddenUpdates=Ss(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=c,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function Tp(t,e,n,s,r,c,m,y,T,C,V,I){return t=new ob(t,e,n,m,T,C,V,I,y),e=1,c===!0&&(e|=24),c=un(3,null,null,e),t.current=c,c.stateNode=t,e=Jr(),e.refCount++,t.pooledCache=e,e.refCount++,c.memoizedState={element:s,isDehydrated:n,cache:e},ec(c),t}function xp(t){return t?(t=zs,t):zs}function jp(t,e,n,s,r,c){r=xp(r),s.context===null?s.context=r:s.pendingContext=r,s=xa(e),s.payload={element:n},c=c===void 0?null:c,c!==null&&(s.callback=c),n=ja(t,s,e),n!==null&&(on(n,t,e),Gi(n,t,e))}function Ap(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function bu(t,e){Ap(t,e),(t=t.alternate)&&Ap(t,e)}function Ep(t){if(t.tag===13||t.tag===31){var e=ts(t,67108864);e!==null&&on(e,t,67108864),bu(t,67108864)}}function Np(t){if(t.tag===13||t.tag===31){var e=pn();e=_s(e);var n=ts(t,e);n!==null&&on(n,t,e),bu(t,e)}}var Ho=!0;function rb(t,e,n,s){var r=B.T;B.T=null;var c=X.p;try{X.p=2,Su(t,e,n,s)}finally{X.p=c,B.T=r}}function cb(t,e,n,s){var r=B.T;B.T=null;var c=X.p;try{X.p=8,Su(t,e,n,s)}finally{X.p=c,B.T=r}}function Su(t,e,n,s){if(Ho){var r=_u(s);if(r===null)lu(t,e,s,Go,n),Dp(t,s);else if(db(r,t,e,n,s))s.stopPropagation();else if(Dp(t,s),e&4&&-1<ub.indexOf(t)){for(;r!==null;){var c=As(r);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var m=tn(c.pendingLanes);if(m!==0){var y=c;for(y.pendingLanes|=2,y.entangledLanes|=2;m;){var T=1<<31-At(m);y.entanglements[1]|=T,m&=~T}Gn(c),(Yt&6)===0&&(xo=Mt()+500,al(0))}}break;case 31:case 13:y=ts(c,2),y!==null&&on(y,c,2),Ao(),bu(c,2)}if(c=_u(s),c===null&&lu(t,e,s,Go,n),c===r)break;r=c}r!==null&&s.stopPropagation()}else lu(t,e,s,null,n)}}function _u(t){return t=xr(t),Tu(t)}var Go=null;function Tu(t){if(Go=null,t=js(t),t!==null){var e=h(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=d(e),t!==null)return t;t=null}else if(n===31){if(t=p(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Go=t,null}function Cp(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(mt()){case et:return 2;case Nt:return 8;case J:case Lt:return 32;case U:return 268435456;default:return 32}default:return 32}}var xu=!1,Ba=null,za=null,Ua=null,ul=new Map,dl=new Map,Va=[],ub="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 Dp(t,e){switch(t){case"focusin":case"focusout":Ba=null;break;case"dragenter":case"dragleave":za=null;break;case"mouseover":case"mouseout":Ua=null;break;case"pointerover":case"pointerout":ul.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":dl.delete(e.pointerId)}}function fl(t,e,n,s,r,c){return t===null||t.nativeEvent!==c?(t={blockedOn:e,domEventName:n,eventSystemFlags:s,nativeEvent:c,targetContainers:[r]},e!==null&&(e=As(e),e!==null&&Ep(e)),t):(t.eventSystemFlags|=s,e=t.targetContainers,r!==null&&e.indexOf(r)===-1&&e.push(r),t)}function db(t,e,n,s,r){switch(e){case"focusin":return Ba=fl(Ba,t,e,n,s,r),!0;case"dragenter":return za=fl(za,t,e,n,s,r),!0;case"mouseover":return Ua=fl(Ua,t,e,n,s,r),!0;case"pointerover":var c=r.pointerId;return ul.set(c,fl(ul.get(c)||null,t,e,n,s,r)),!0;case"gotpointercapture":return c=r.pointerId,dl.set(c,fl(dl.get(c)||null,t,e,n,s,r)),!0}return!1}function wp(t){var e=js(t.target);if(e!==null){var n=h(e);if(n!==null){if(e=n.tag,e===13){if(e=d(n),e!==null){t.blockedOn=e,ji(t.priority,function(){Np(n)});return}}else if(e===31){if(e=p(n),e!==null){t.blockedOn=e,ji(t.priority,function(){Np(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Io(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=_u(t.nativeEvent);if(n===null){n=t.nativeEvent;var s=new n.constructor(n.type,n);Tr=s,n.target.dispatchEvent(s),Tr=null}else return e=As(n),e!==null&&Ep(e),t.blockedOn=n,!1;e.shift()}return!0}function kp(t,e,n){Io(t)&&n.delete(e)}function fb(){xu=!1,Ba!==null&&Io(Ba)&&(Ba=null),za!==null&&Io(za)&&(za=null),Ua!==null&&Io(Ua)&&(Ua=null),ul.forEach(kp),dl.forEach(kp)}function qo(t,e){t.blockedOn===e&&(t.blockedOn=null,xu||(xu=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,fb)))}var Yo=null;function Mp(t){Yo!==t&&(Yo=t,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Yo===t&&(Yo=null);for(var e=0;e<t.length;e+=3){var n=t[e],s=t[e+1],r=t[e+2];if(typeof s!="function"){if(Tu(s||n)===null)continue;break}var c=As(n);c!==null&&(t.splice(e,3),e-=3,_c(c,{pending:!0,data:r,method:n.method,action:s},s,r))}}))}function li(t){function e(T){return qo(T,t)}Ba!==null&&qo(Ba,t),za!==null&&qo(za,t),Ua!==null&&qo(Ua,t),ul.forEach(e),dl.forEach(e);for(var n=0;n<Va.length;n++){var s=Va[n];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Va.length&&(n=Va[0],n.blockedOn===null);)wp(n),n.blockedOn===null&&Va.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(s=0;s<n.length;s+=3){var r=n[s],c=n[s+1],m=r[st]||null;if(typeof c=="function")m||Mp(n);else if(m){var y=null;if(c&&c.hasAttribute("formAction")){if(r=c,m=c[st]||null)y=m.formAction;else if(Tu(r)!==null)continue}else y=m.action;typeof y=="function"?n[s+1]=y:(n.splice(s,3),s-=3),Mp(n)}}}function Rp(){function t(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(m){return r=m})},focusReset:"manual",scroll:"manual"})}function e(){r!==null&&(r(),r=null),s||setTimeout(n,20)}function n(){if(!s&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(n,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),r!==null&&(r(),r=null)}}}function ju(t){this._internalRoot=t}Zo.prototype.render=ju.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(o(409));var n=e.current,s=pn();jp(n,s,t,e,null,null)},Zo.prototype.unmount=ju.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;jp(t.current,2,null,t,null,null),Ao(),e[Rt]=null}};function Zo(t){this._internalRoot=t}Zo.prototype.unstable_scheduleHydration=function(t){if(t){var e=xi();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Va.length&&e!==0&&e<Va[n].priority;n++);Va.splice(n,0,t),n===0&&wp(t)}};var Op=i.version;if(Op!=="19.2.4")throw Error(o(527,Op,"19.2.4"));X.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=v(e),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var hb={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xo.isDisabled&&Xo.supportsFiber)try{Oe=Xo.inject(hb),Be=Xo}catch{}}return hl.createRoot=function(t,e){if(!u(t))throw Error(o(299));var n=!1,s="",r=Gh,c=Ih,m=qh;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(s=e.identifierPrefix),e.onUncaughtError!==void 0&&(r=e.onUncaughtError),e.onCaughtError!==void 0&&(c=e.onCaughtError),e.onRecoverableError!==void 0&&(m=e.onRecoverableError)),e=Tp(t,1,!1,null,null,n,s,null,r,c,m,Rp),t[Rt]=e.current,iu(t),new ju(e)},hl.hydrateRoot=function(t,e,n){if(!u(t))throw Error(o(299));var s=!1,r="",c=Gh,m=Ih,y=qh,T=null;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError),n.formState!==void 0&&(T=n.formState)),e=Tp(t,1,!0,e,n??null,s,r,T,c,m,y,Rp),e.context=xp(null),n=e.current,s=pn(),s=_s(s),r=xa(s),r.callback=null,ja(n,r,s),n=s,e.current.lanes=n,ga(e,n),Gn(e),t[Rt]=e.current,iu(t),new Zo(e)},hl.version="19.2.4",hl}var Gp;function Db(){if(Gp)return Au.exports;Gp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),Au.exports=Cb(),Au.exports}var wb=Db();function Fe(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)}function bl(a,i){return console.warn(`[ws] Malformed "${a}" message: ${i}`),!1}function kb(a){return Fe(a)&&typeof a.id=="string"&&typeof a.displayName=="string"&&typeof a.adapterType=="string"&&typeof a.defaultRuntime=="string"&&typeof a.status=="string"&&typeof a.bootstrapped=="boolean"}function Ip(a){return Fe(a)&&typeof a.id=="string"&&typeof a.environmentId=="string"&&typeof a.runtime=="string"&&typeof a.status=="string"&&typeof a.prompt=="string"&&typeof a.startedAt=="string"&&(a.endedAt===void 0||typeof a.endedAt=="string")&&(a.error===void 0||typeof a.error=="string")}function qp(a){return Fe(a)&&typeof a.sessionId=="string"&&typeof a.eventType=="string"&&typeof a.timestamp=="string"&&typeof a.content=="string"}function Mb(a){return Fe(a)&&typeof a.id=="string"&&typeof a.name=="string"&&typeof a.description=="string"&&typeof a.repoUrl=="string"&&typeof a.defaultEnvironmentId=="string"&&typeof a.status=="string"&&typeof a.createdAt=="string"&&typeof a.updatedAt=="string"}function Rb(a){return Fe(a)&&typeof a.id=="string"&&typeof a.projectId=="string"&&typeof a.title=="string"&&typeof a.status=="string"&&typeof a.branch=="string"&&typeof a.sortOrder=="number"&&typeof a.depth=="number"&&Array.isArray(a.dependsOn)&&Array.isArray(a.childTaskIds)}function Ob(a){return Fe(a)&&typeof a.id=="string"&&typeof a.projectId=="string"&&typeof a.taskId=="string"&&typeof a.sessionId=="string"&&typeof a.category=="string"&&typeof a.title=="string"&&typeof a.content=="string"&&Array.isArray(a.tags)&&typeof a.createdAt=="string"}function Bb(a){return Fe(a)&&typeof a.name=="string"&&typeof a.tokenType=="string"&&typeof a.envVar=="string"&&typeof a.filePath=="string"&&typeof a.expiresAt=="string"}function zb(a){return Fe(a)&&typeof a.environmentId=="string"&&typeof a.stage=="string"&&typeof a.message=="string"&&typeof a.progress=="number"}function Ub(a){return Fe(a)&&typeof a.name=="string"&&typeof a.repository=="string"&&typeof a.state=="string"&&typeof a.gitStatus=="string"}function Vb(a){return Fe(a)&&typeof a.id=="string"&&typeof a.name=="string"&&typeof a.description=="string"&&typeof a.systemPrompt=="string"&&typeof a.toolConfig=="string"&&typeof a.runtime=="string"&&typeof a.model=="string"&&typeof a.maxTurns=="number"&&typeof a.mcpServers=="string"&&typeof a.createdAt=="string"&&typeof a.updatedAt=="string"}function In(a,i,l,o){return Array.isArray(a)?a.filter((u,h)=>i(u)?!0:(bl(l,`item at index ${h} in "${o}" has unexpected shape`),!1)):(bl(l,`expected "${o}" to be an array, got ${typeof a}`),[])}function Lb(a){let i;try{i=JSON.parse(a)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!Fe(i)||typeof i.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",i);return}return{type:i.type,payload:Fe(i.payload)?i.payload:void 0}}const Hb=3e3,oi=5e3;function Gb(a){const i=typeof window<"u"&&window.__GRACKLE_API_KEY__||"",l=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}?token=${encodeURIComponent(i)}`:"ws://localhost:3000",o=_.useRef(void 0),[u,h]=_.useState(!1),[d,p]=_.useState([]),[g,v]=_.useState([]),[b,S]=_.useState([]),[x,D]=_.useState(0),[k,O]=_.useState(void 0),[Y,L]=_.useState([]),[Q,R]=_.useState([]),[tt,Z]=_.useState([]),[P,at]=_.useState([]),[z,nt]=_.useState({}),[dt,yt]=_.useState([]),[zt,$]=_.useState(""),[Xt,Ut]=_.useState(!1),[B,X]=_.useState([]),[rt,bt]=_.useState({}),[Tt,Pt]=_.useState(!1),[Et,St]=_.useState(void 0),G=_.useCallback(W=>{var At;((At=o.current)==null?void 0:At.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(W))},[]);_.useEffect(()=>{let W,At;function qt(){W=new WebSocket(l),o.current=W,W.onopen=()=>{h(!0),G({type:"list_environments"}),G({type:"list_sessions"}),G({type:"list_projects"}),G({type:"list_tokens"}),G({type:"list_personas"}),G({type:"subscribe_all"})},W.onmessage=ae=>{var ze,Ke,kn,tn,lt,re,rn,pa,Ss,ga,Rl,Si,_i,Ti,_s,Ts,xi,ji,Mn,Te;if(typeof ae.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const gt=Lb(ae.data);if(gt)switch(gt.type){case"environments":p(In((ze=gt.payload)==null?void 0:ze.environments,kb,"environments","environments"));break;case"sessions":v(In((Ke=gt.payload)==null?void 0:Ke.sessions,Ip,"sessions","sessions"));break;case"session_event":{if(!qp(gt.payload)){bl("session_event","payload is not a valid SessionEvent");break}const st=gt.payload;let Rt=0;S(Ht=>{const se=[...Ht,st];return se.length>oi?(Rt=se.length-oi,se.slice(-oi)):se}),Rt>0&&D(Ht=>Ht+Rt),st.eventType==="status"&&v(Ht=>Ht.map(se=>se.id===st.sessionId?{...se,status:st.content}:se));break}case"session_events":{const st=In((kn=gt.payload)==null?void 0:kn.events,qp,"session_events","events"),Rt=(tn=gt.payload)==null?void 0:tn.sessionId;if(typeof Rt!="string"){bl("session_events","missing or non-string sessionId");break}if(st.length>0){let Ht=0;S(se=>{const Qa=[...se.filter(Pa=>Pa.sessionId!==Rt),...st];return Qa.length>oi?(Ht=Qa.length-oi,Qa.slice(-oi)):Qa}),Ht>0&&D(se=>se+Ht)}break}case"spawned":{const st=(lt=gt.payload)==null?void 0:lt.sessionId;typeof st=="string"&&st&&O(st),G({type:"list_sessions"});break}case"projects":L(In((re=gt.payload)==null?void 0:re.projects,Mb,"projects","projects"));break;case"project_created":Pt(!1),G({type:"list_projects"});break;case"project_archived":G({type:"list_projects"});break;case"project_updated":G({type:"list_projects"});break;case"tasks":{const st=In((rn=gt.payload)==null?void 0:rn.tasks,Rb,"tasks","tasks"),Rt=(typeof((pa=gt.payload)==null?void 0:pa.projectId)=="string"?gt.payload.projectId:"")||(st.length>0?st[0].projectId:"");if(!Rt){R(st);break}R(Ht=>[...Ht.filter(se=>se.projectId!==Rt),...st]);break}case"task_created":{const st=(Ss=gt.payload)==null?void 0:Ss.task;if(Fe(st)){const Rt=typeof st.project_id=="string"?st.project_id:typeof st.projectId=="string"?st.projectId:"";Rt&&G({type:"list_tasks",payload:{projectId:Rt}})}break}case"task_started":{const st=gt.payload;if(!Fe(st))break;St(Ht=>st.taskId&&Ht===st.taskId?void 0:Ht),st.sessionId&&G({type:"list_sessions"});const Rt=typeof st.projectId=="string"?st.projectId:void 0;Rt?G({type:"list_tasks",payload:{projectId:Rt}}):st.taskId&&R(Ht=>{const se=Ht.find(xs=>xs.id===st.taskId);return se&&G({type:"list_tasks",payload:{projectId:se.projectId}}),Ht});break}case"task_approved":case"task_rejected":case"task_deleted":case"task_updated":{const st=gt.payload;if(!Fe(st))break;const Rt=typeof st.projectId=="string"?st.projectId:void 0;Rt?G({type:"list_tasks",payload:{projectId:Rt}}):st.taskId&&R(Ht=>{const se=Ht.find(xs=>xs.id===st.taskId);return se&&G({type:"list_tasks",payload:{projectId:se.projectId}}),Ht});break}case"findings":Z(In((ga=gt.payload)==null?void 0:ga.findings,Ob,"findings","findings"));break;case"finding_posted":typeof((Rl=gt.payload)==null?void 0:Rl.projectId)=="string"&&G({type:"list_findings",payload:{projectId:gt.payload.projectId}});break;case"tokens":at(In((Si=gt.payload)==null?void 0:Si.tokens,Bb,"tokens","tokens"));break;case"token_changed":G({type:"list_tokens"});break;case"provision_progress":{if(!zb(gt.payload)){bl("provision_progress","payload is not a valid ProvisionStatus with environmentId");break}const st=gt.payload;nt(Rt=>({...Rt,[st.environmentId]:{stage:st.stage,message:st.message,progress:st.progress}})),st.stage==="ready"&&setTimeout(()=>{nt(Ht=>{const se={...Ht};return delete se[st.environmentId],se})},5e3);break}case"environment_added":break;case"environment_removed":if(typeof((_i=gt.payload)==null?void 0:_i.environmentId)=="string"){const st=gt.payload.environmentId;p(Rt=>Rt.filter(Ht=>Ht.id!==st)),nt(Rt=>{const Ht={...Rt};return delete Ht[st],Ht})}G({type:"list_sessions"});break;case"codespaces_list":{const st=In((Ti=gt.payload)==null?void 0:Ti.codespaces,Ub,"codespaces_list","codespaces"),Rt=typeof((_s=gt.payload)==null?void 0:_s.error)=="string"?gt.payload.error:"";yt(st),$(Rt);break}case"codespace_created":{Ut(!1),G({type:"list_codespaces"});break}case"codespace_create_error":{Ut(!1);const st=typeof((Ts=gt.payload)==null?void 0:Ts.message)=="string"?gt.payload.message:"Failed to create codespace";$(st);break}case"personas":{const st=In((xi=gt.payload)==null?void 0:xi.personas,Vb,"personas","personas");X(st);break}case"persona_created":case"persona_updated":case"persona_deleted":G({type:"list_personas"});break;case"task_sessions":{const st=(ji=gt.payload)==null?void 0:ji.taskId;if(typeof st!="string"||!st)break;const Rt=In((Mn=gt.payload)==null?void 0:Mn.sessions,Ip,"task_sessions","sessions");bt(Ht=>({...Ht,[st]:Rt}));break}case"error":console.error("[ws]",(Te=gt.payload)==null?void 0:Te.message);break}},W.onclose=()=>{h(!1),o.current=void 0,Pt(!1),St(void 0),clearTimeout(At),At=setTimeout(qt,Hb)},W.onerror=()=>{W.close()}}return qt(),()=>{clearTimeout(At),W==null||W.close()}},[l,G]);const Kt=_.useCallback((W,At,qt,ae,gt)=>{G({type:"spawn",payload:{environmentId:W,prompt:At,model:qt||"",runtime:ae||"",personaId:gt||""}})},[G]),fe=_.useCallback((W,At)=>{G({type:"send_input",payload:{sessionId:W,text:At}})},[G]),Ze=_.useCallback(W=>{G({type:"kill",payload:{sessionId:W}})},[G]),Xe=_.useCallback(()=>{G({type:"list_environments"}),G({type:"list_sessions"}),G({type:"list_projects"}),G({type:"list_tokens"})},[G]),ee=_.useCallback(W=>{G({type:"get_session_events",payload:{sessionId:W}})},[G]),Je=_.useCallback(()=>{S([]),D(0)},[]),Ie=_.useCallback((W,At,qt,ae)=>{Pt(!0),G({type:"create_project",payload:{name:W,description:At||"",repoUrl:qt||"",defaultEnvironmentId:ae||""}})},[G]),$e=_.useCallback(W=>{G({type:"archive_project",payload:{projectId:W}})},[G]),We=_.useCallback((W,At)=>{G({type:"update_project",payload:{projectId:W,...At}})},[G]),ve=_.useCallback(W=>{G({type:"list_tasks",payload:{projectId:W}})},[G]),F=_.useCallback((W,At,qt,ae,gt,ze,Ke)=>{G({type:"create_task",payload:{projectId:W,title:At,description:qt||"",environmentId:ae||"",dependsOn:gt||[],parentTaskId:ze||"",personaId:Ke||""}})},[G]),Re=_.useCallback((W,At,qt,ae)=>{St(W),G({type:"start_task",payload:{taskId:W,runtime:At||"",model:qt||"",personaId:ae||""}})},[G]),q=_.useCallback(W=>{G({type:"approve_task",payload:{taskId:W}})},[G]),K=_.useCallback((W,At)=>{G({type:"reject_task",payload:{taskId:W,reviewNotes:At}})},[G]),ot=_.useCallback(W=>{G({type:"delete_task",payload:{taskId:W}})},[G]),ut=_.useCallback(W=>{G({type:"list_findings",payload:{projectId:W}})},[G]),ft=_.useCallback((W,At,qt,ae,gt)=>{G({type:"post_finding",payload:{projectId:W,title:At,content:qt,category:ae||"general",tags:gt||[]}})},[G]),pt=_.useCallback(()=>{G({type:"list_tokens"})},[G]),jt=_.useCallback((W,At,qt,ae,gt)=>{G({type:"set_token",payload:{name:W,value:At,tokenType:qt,envVar:ae,filePath:gt}})},[G]),Mt=_.useCallback(W=>{G({type:"delete_token",payload:{name:W}})},[G]),mt=_.useCallback((W,At,qt,ae)=>{const gt={displayName:W,adapterType:At,adapterConfig:qt||{}};ae&&(gt.defaultRuntime=ae),G({type:"add_environment",payload:gt})},[G]),et=_.useCallback(W=>{G({type:"provision_environment",payload:{environmentId:W}})},[G]),Nt=_.useCallback(W=>{G({type:"stop_environment",payload:{environmentId:W}})},[G]),J=_.useCallback(W=>{G({type:"remove_environment",payload:{environmentId:W}})},[G]),Lt=_.useCallback(()=>{G({type:"list_codespaces"})},[G]),U=_.useCallback(W=>{if(!u){$("Not connected to server. Please try again once the connection is restored.");return}Ut(!0),$(""),G({type:"create_codespace",payload:{repo:W}})},[G,u]),Ne=_.useCallback((W,At,qt,ae,gt,ze)=>{G({type:"create_persona",payload:{name:W,description:At,systemPrompt:qt,runtime:ae||"",model:gt||"",maxTurns:ze||0}})},[G]),Kn=_.useCallback((W,At,qt,ae,gt,ze,Ke)=>{G({type:"update_persona",payload:{personaId:W,name:At||"",description:qt||"",systemPrompt:ae||"",runtime:gt||"",model:ze||"",maxTurns:Ke||0}})},[G]),Oe=_.useCallback(W=>{G({type:"delete_persona",payload:{personaId:W}})},[G]),Be=_.useCallback(W=>{G({type:"get_task_sessions",payload:{taskId:W}})},[G]);return{connected:u,environments:d,sessions:g,events:b,eventsDropped:x,lastSpawnedId:k,projects:Y,tasks:Q,findings:tt,tokens:P,spawn:Kt,sendInput:fe,kill:Ze,refresh:Xe,loadSessionEvents:ee,clearEvents:Je,createProject:Ie,archiveProject:$e,updateProject:We,loadTasks:ve,createTask:F,startTask:Re,approveTask:q,rejectTask:K,deleteTask:ot,loadFindings:ut,postFinding:ft,addEnvironment:mt,loadTokens:pt,setToken:jt,deleteToken:Mt,provisionStatus:z,provisionEnvironment:et,stopEnvironment:Nt,removeEnvironment:J,codespaces:dt,codespaceError:zt,codespaceCreating:Xt,listCodespaces:Lt,createCodespace:U,projectCreating:Tt,taskStartingId:Et,personas:B,createPersona:Ne,updatePersona:Kn,deletePersona:Oe,taskSessions:rt,loadTaskSessions:Be}}const cd=_.createContext(void 0);function Ib({children:a}){const i=Gb();return f.jsx(cd.Provider,{value:i,children:a})}function Un(){const a=_.useContext(cd);if(!a)throw new Error("useGrackle must be used within GrackleProvider");return a}const qb=[{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}],Yb=[{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"}],Zb=[{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"}],Xb=[{id:"proj-alpha",name:"Project Alpha",description:"Core platform API and authentication services",repoUrl:"https://github.com/acme/alpha",defaultEnvironmentId:"env-local-01",status:"active",createdAt:"2026-01-15T10:00:00Z",updatedAt:"2026-01-15T10:00:00Z"},{id:"proj-beta",name:"Data Pipeline",description:"ETL pipelines for analytics and reporting",repoUrl:"https://github.com/acme/data-pipeline",defaultEnvironmentId:"env-docker-01",status:"active",createdAt:"2026-02-01T14:30:00Z",updatedAt:"2026-02-01T14:30:00Z"},{id:"proj-gamma",name:"Mobile App",description:"React Native cross-platform mobile application",repoUrl:"",defaultEnvironmentId:"env-local-01",status:"archived",createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],Kb=[{id:"task-001",projectId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"in_progress",branch:"feat/jwt-auth",environmentId:"env-local-01",sessionId:"sess-001",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0,personaId:"persona-arch"},{id:"task-001a",projectId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"done",branch:"feat/jwt-auth/design-token-schema",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-001b",projectId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"in_progress",branch:"feat/jwt-auth/implement-auth-middleware",environmentId:"env-local-01",sessionId:"sess-001",dependsOn:[],reviewNotes:"",sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:"persona-fe"},{id:"task-001c",projectId:"proj-alpha",title:"Write auth integration tests",description:"End-to-end tests for login flow, token refresh, and protected route access",status:"pending",branch:"",environmentId:"env-local-01",sessionId:"",dependsOn:["task-001b"],reviewNotes:"",sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,personaId:"persona-tester"},{id:"task-002",projectId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"pending",branch:"",environmentId:"env-local-01",sessionId:"",dependsOn:["task-001"],reviewNotes:"",sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-003",projectId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"review",branch:"feat/openapi-docs",environmentId:"env-local-01",sessionId:"sess-002",dependsOn:[],reviewNotes:"",sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:"persona-fe"},{id:"task-004",projectId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"done",branch:"feat/db-pool",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"LGTM — pool size and idle timeout values are sensible.",sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-005",projectId:"proj-alpha",title:"Fix N+1 query in user list",description:"Use a JOIN instead of per-row lookups in GET /api/users",status:"assigned",branch:"fix/user-list-n1",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"The fix breaks pagination — cursor should reference the joined table, not the subquery.",sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006",projectId:"proj-beta",title:"Add Parquet export support",description:"Allow pipeline outputs to be written as Parquet files for Spark consumption",status:"in_progress",branch:"feat/parquet-export",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0,personaId:""},{id:"task-006a",projectId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"done",branch:"feat/parquet-export/define-parquet-schema-mapping",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006b",projectId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"done",branch:"feat/parquet-export/implement-row-group-writer",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-006a"],reviewNotes:"",sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006c",projectId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"in_progress",branch:"feat/parquet-export/add-compression-options",environmentId:"env-docker-01",sessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:"",sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-006d",projectId:"proj-beta",title:"Write Parquet integration tests",description:"Round-trip tests: write Parquet, read back with pyarrow, verify data integrity",status:"pending",branch:"",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-006c"],reviewNotes:"",sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-007",projectId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"in_progress",branch:"feat/incremental",environmentId:"env-docker-01",sessionId:"sess-004",dependsOn:[],reviewNotes:"",sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0,personaId:""},{id:"task-007a",projectId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"done",branch:"feat/incremental/design-watermark-storage",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-007b",projectId:"proj-beta",title:"Implement change detection query",description:"Generate WHERE clauses from watermarks to fetch only changed rows",status:"failed",branch:"feat/incremental/implement-change-detection-query",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-007a"],reviewNotes:"Query fails on tables without a monotonic primary key",sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,personaId:""},{id:"task-008",projectId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"review",branch:"feat/monitoring",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,personaId:""}],Yp=[{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"}],Qb=[{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:""}],Pb=[{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"}],Fb={"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 De(a){return new Date(Date.now()+a).toISOString()}const Zp=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:De(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:De(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:De(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:De(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:De(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:De(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:De(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:De(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:De(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:De(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:De(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:De(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:De(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:De(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:De(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:De(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:De(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:De(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:De(3500),content:"failed"}}]}],Xp=400;function Jb({children:a}){const[i,l]=_.useState(Yb),[o,u]=_.useState(Zb),[h,d]=_.useState(void 0),[p,g]=_.useState(Xb),[v,b]=_.useState(Kb),[S,x]=_.useState(Yp),[D,k]=_.useState(Qb),[O,Y]=_.useState(Pb),[L]=_.useState(Fb),Q=_.useRef(0),R=_.useRef(0),tt=_.useRef(new Set),Z=_.useRef(new Map),P=_.useRef(v);P.current=v;const at=_.useRef(new Map),z=_.useRef(new Map),nt=_.useCallback(q=>(Q.current+=1,`mock-${q}-${String(Q.current).padStart(3,"0")}`),[]),dt=_.useCallback(()=>{const q=Zp[R.current%Zp.length];return R.current+=1,q},[]),yt=_.useCallback((q,K,ot)=>{const ut=setTimeout(()=>{var ft;tt.current.delete(ut),ot&&((ft=Z.current.get(ot))==null||ft.delete(ut)),q()},K);tt.current.add(ut),ot&&(Z.current.has(ot)||Z.current.set(ot,new Set),Z.current.get(ot).add(ut))},[]),zt=_.useCallback(q=>{const K=Z.current.get(q);K&&(K.forEach(ot=>{clearTimeout(ot),tt.current.delete(ot)}),Z.current.delete(q))},[]),$=_.useCallback((q,K)=>{l(ot=>ot.map(ut=>ut.id===q?{...ut,status:K}:ut))},[]),Xt=_.useCallback(q=>{u(K=>[...K,q])},[]),Ut=_.useCallback((q,K,ot)=>{K.forEach((ut,ft)=>{yt(()=>{const pt={sessionId:q,...ut.event,timestamp:new Date().toISOString()};Xt(pt),ut.event.eventType==="status"&&$(q,ut.event.content),ft===K.length-1&&ot&&ot()},ut.delayMs,q)})},[yt,Xt,$]),B=_.useCallback((q,K,ot,ut)=>{console.log("[MockGrackle] spawn",{environmentId:q,prompt:K,runtime:ut});const ft=nt("sess"),pt={id:ft,environmentId:q,runtime:ut||"claude-code",status:"running",prompt:K,startedAt:new Date().toISOString()};l(Mt=>[...Mt,pt]),d(ft);const jt=dt();if(console.log(`[MockGrackle] Playing scenario: ${jt.label}`),jt.pauseForInput){const Mt=jt.pauseAfterStep??jt.steps.length-1,mt=jt.steps.slice(0,Mt+1),et=mt.length>0?mt[mt.length-1].delayMs:0;Ut(ft,mt),yt(()=>{$(ft,"waiting_input"),Xt({sessionId:ft,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},et+Xp,ft),jt.resumeSteps&&at.current.set(ft,jt.resumeSteps)}else Ut(ft,jt.steps)},[nt,dt,Ut,yt,$,Xt]),X=_.useCallback(q=>{console.log("[MockGrackle] kill",q),zt(q),at.current.delete(q),$(q,"killed"),Xt({sessionId:q,eventType:"status",timestamp:new Date().toISOString(),content:"killed"}),b(K=>K.map(ot=>ot.sessionId===q&&ot.status==="in_progress"?{...ot,status:"failed"}:ot))},[zt,$,Xt]),rt=_.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),bt=_.useCallback(q=>{console.log("[MockGrackle] loadSessionEvents",q)},[]),Tt=_.useCallback(()=>{console.log("[MockGrackle] clearEvents"),u([])},[]),Pt=_.useCallback((q,K,ot,ut)=>{console.log("[MockGrackle] createProject",{name:q,description:K});const ft={id:nt("proj"),name:q,description:K||"",repoUrl:ot||"",defaultEnvironmentId:ut||"",status:"active",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};g(pt=>[...pt,ft])},[nt]),Et=_.useCallback(q=>{console.log("[MockGrackle] archiveProject",q),g(K=>K.map(ot=>ot.id===q?{...ot,status:"archived"}:ot))},[]),St=_.useCallback(q=>{console.log("[MockGrackle] loadTasks",q)},[]),G=_.useCallback((q,K,ot,ut,ft,pt)=>{console.log("[MockGrackle] createTask",{projectId:q,title:K,parentTaskId:pt}),b(jt=>{const mt=jt.filter(Lt=>Lt.projectId===q).reduce((Lt,U)=>Math.max(Lt,U.sortOrder),0),et=pt?jt.find(Lt=>Lt.id===pt):void 0;if(pt&&!et)return console.warn("[MockGrackle] Parent task not found:",pt),jt;if(et&&!et.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",pt),jt;const Nt=et?et.depth+1:0,J={id:nt("task"),projectId:q,title:K,description:ot||"",status:"pending",branch:"",environmentId:ut||"",sessionId:"",dependsOn:ft||[],reviewNotes:"",sortOrder:mt+1,createdAt:new Date().toISOString(),parentTaskId:pt||"",depth:Nt,childTaskIds:[],canDecompose:!pt,personaId:""};return[...jt,J]})},[nt]),Kt=_.useCallback((q,K,ot)=>{var et;console.log("[MockGrackle] startTask",{taskId:q,runtime:K});const ut=P.current.find(Nt=>Nt.id===q),ft=(ut==null?void 0:ut.environmentId)??"",pt=(ut==null?void 0:ut.title)??"",jt=nt("sess"),Mt={id:jt,environmentId:ft||"env-local-01",runtime:K||"claude-code",status:"running",prompt:pt||q,startedAt:new Date().toISOString()};l(Nt=>[...Nt,Mt]),b(Nt=>Nt.map(J=>J.id===q?{...J,status:"in_progress",sessionId:jt,branch:`mock/${q.slice(0,8)}`}:J));const mt=dt();if(console.log(`[MockGrackle] Playing task scenario: ${mt.label}`),mt.pauseForInput){const Nt=mt.pauseAfterStep??mt.steps.length-1,J=mt.steps.slice(0,Nt+1),Lt=J.length>0?J[J.length-1].delayMs:0;if(Ut(jt,J),yt(()=>{$(jt,"waiting_input"),Xt({sessionId:jt,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},Lt+Xp,jt),mt.resumeSteps){const U=[...mt.resumeSteps];at.current.set(jt,U);const Ne=U.reduce((Kn,Oe)=>Math.max(Kn,Oe.delayMs),0);z.current.set(jt,{taskId:q,delayAfterResume:Ne+200})}}else{const Nt=mt.steps.length>0?mt.steps[mt.steps.length-1].delayMs:0;Ut(jt,mt.steps);const J=(et=mt.steps[mt.steps.length-1])==null?void 0:et.event.content;yt(()=>{J==="completed"?b(Lt=>Lt.map(U=>U.id===q&&U.status==="in_progress"?{...U,status:"review"}:U)):J==="failed"&&b(Lt=>Lt.map(U=>U.id===q&&U.status==="in_progress"?{...U,status:"failed"}:U))},Nt+100,jt)}},[nt,dt,Ut,yt,$,Xt]),fe=_.useCallback((q,K)=>{console.log("[MockGrackle] sendInput",{sessionId:q,text:K}),Xt({sessionId:q,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${K}`}),$(q,"running"),Xt({sessionId:q,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const ot=at.current.get(q);if(ot)at.current.delete(q),Ut(q,ot);else{const ft=[{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"}}];Ut(q,ft)}const ut=z.current.get(q);ut&&(z.current.delete(q),yt(()=>{b(ft=>ft.map(pt=>pt.id===ut.taskId&&pt.status==="in_progress"?{...pt,status:"review"}:pt))},ut.delayAfterResume,q))},[Xt,$,Ut,yt]),Ze=_.useCallback(q=>{console.log("[MockGrackle] approveTask",q),b(K=>K.map(ot=>ot.id===q?{...ot,status:"done"}:ot))},[]),Xe=_.useCallback((q,K)=>{console.log("[MockGrackle] rejectTask",{taskId:q,reviewNotes:K}),b(ot=>ot.map(ut=>ut.id===q?{...ut,status:"assigned",reviewNotes:K,sessionId:""}:ut))},[]),ee=_.useCallback(q=>{console.log("[MockGrackle] deleteTask",q),b(K=>K.filter(ot=>ot.id!==q))},[]),Je=_.useCallback(q=>{console.log("[MockGrackle] loadFindings",q),x(Yp.filter(K=>K.projectId===q))},[]),Ie=_.useCallback((q,K,ot,ut,ft)=>{console.log("[MockGrackle] postFinding",{projectId:q,title:K});const pt={id:nt("find"),projectId:q,taskId:"",sessionId:"",category:ut||"general",title:K,content:ot,tags:ft||[],createdAt:new Date().toISOString()};x(jt=>[...jt,pt])},[nt]),$e=_.useCallback((q,K,ot,ut)=>{console.log("[MockGrackle] addEnvironment",{displayName:q,adapterType:K,adapterConfig:ot,defaultRuntime:ut})},[]),We=_.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),ve=_.useCallback((q,K,ot,ut,ft)=>{console.log("[MockGrackle] setToken",{name:q,tokenType:ot}),k(pt=>[...pt.filter(Mt=>Mt.name!==q),{name:q,tokenType:ot,envVar:ut,filePath:ft,expiresAt:""}])},[]),F=_.useCallback(q=>{console.log("[MockGrackle] deleteToken",q),k(K=>K.filter(ot=>ot.name!==q))},[]);_.useEffect(()=>()=>{tt.current.forEach(clearTimeout),tt.current.clear()},[]);const Re=_.useMemo(()=>({connected:!0,environments:qb,sessions:i,events:o,eventsDropped:0,lastSpawnedId:h,projects:p,tasks:v,findings:S,tokens:D,spawn:B,sendInput:fe,kill:X,refresh:rt,loadSessionEvents:bt,clearEvents:Tt,createProject:Pt,archiveProject:Et,updateProject:(q,K)=>{console.log("[MockGrackle] updateProject",{projectId:q,...K}),g(ot=>ot.map(ut=>ut.id!==q?ut:{...ut,...K.name!==void 0?{name:K.name}:{},...K.description!==void 0?{description:K.description}:{},...K.repoUrl!==void 0?{repoUrl:K.repoUrl}:{},...K.defaultEnvironmentId!==void 0?{defaultEnvironmentId:K.defaultEnvironmentId}:{},updatedAt:new Date().toISOString()}))},loadTasks:St,createTask:G,startTask:Kt,approveTask:Ze,rejectTask:Xe,deleteTask:ee,loadFindings:Je,postFinding:Ie,addEnvironment:$e,loadTokens:We,setToken:ve,deleteToken:F,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:O,createPersona:(q,K,ot,ut,ft,pt)=>{console.log("[MockGrackle] createPersona",{name:q});const jt={id:`mock-persona-${Date.now()}`,name:q,description:K,systemPrompt:ot,toolConfig:"{}",runtime:ut??"claude-code",model:ft||"",maxTurns:pt||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};Y(Mt=>[...Mt,jt])},updatePersona:(q,K,ot,ut,ft,pt,jt)=>{console.log("[MockGrackle] updatePersona",{personaId:q,name:K}),Y(Mt=>Mt.map(mt=>mt.id!==q?mt:{...mt,...K!==void 0?{name:K}:{},...ot!==void 0?{description:ot}:{},...ut!==void 0?{systemPrompt:ut}:{},...ft!==void 0?{runtime:ft}:{},...pt!==void 0?{model:pt}:{},...jt!==void 0?{maxTurns:jt}:{},updatedAt:new Date().toISOString()}))},deletePersona:q=>{console.log("[MockGrackle] deletePersona",q),Y(K=>K.filter(ot=>ot.id!==q))},taskSessions:L,loadTaskSessions:q=>{console.log("[MockGrackle] loadTaskSessions",q)}}),[i,o,h,p,v,S,D,O,L,B,fe,X,rt,bt,Tt,Pt,Et,St,G,Kt,Ze,Xe,ee,Je,Ie,$e,We,ve,F]);return f.jsx(cd.Provider,{value:Re,children:a})}const xv=_.createContext(void 0),$b=4e3;function Wb({children:a}){const[i,l]=_.useState([]),o=_.useRef(0),u=_.useCallback(d=>{l(p=>p.filter(g=>g.id!==d))},[]),h=_.useCallback((d,p="info",g=$b)=>{const v=`toast-${++o.current}`;l(b=>[...b,{id:v,message:d,variant:p,duration:g}])},[]);return f.jsx(xv.Provider,{value:{toasts:i,showToast:h,dismissToast:u},children:a})}function ud(){const a=_.useContext(xv);if(!a)throw new Error("useToast must be used within ToastProvider");return a}const tS="_container_ew76q_1",eS="_brand_ew76q_26",nS="_info_ew76q_34",aS="_connectionDot_ew76q_41",sS="_connected_ew76q_44",iS="_disconnected_ew76q_48",lS="_settingsButton_ew76q_52",Ha={container:tS,brand:eS,info:nS,connectionDot:aS,connected:sS,disconnected:iS,settingsButton:lS};function oS({setViewMode:a}){const{connected:i,environments:l,sessions:o}=Un(),u=l.length,h=l.filter(p=>p.status==="connected").length,d=o.filter(p=>["running","waiting_input"].includes(p.status)).length;return f.jsxs("div",{className:Ha.container,children:[f.jsx("div",{className:Ha.brand,children:"Grackle"}),f.jsxs("div",{className:Ha.info,children:[f.jsxs("span",{children:[f.jsx("span",{className:`${Ha.connectionDot} ${i?Ha.connected:Ha.disconnected}`,children:"●"})," ",i?"Connected":"Disconnected"]}),f.jsxs("span",{children:[h,"/",u," env",u!==1?"s":""]}),f.jsxs("span",{children:[d," active"]}),a&&f.jsxs(f.Fragment,{children:[f.jsx("button",{className:Ha.settingsButton,onClick:()=>a({kind:"persona_management"}),title:"Personas",children:"👤"}),f.jsx("button",{className:Ha.settingsButton,onClick:()=>a({kind:"settings"}),title:"Settings",children:"⚙"})]})]})]})}const dd=_.createContext({});function fd(a){const i=_.useRef(null);return i.current===null&&(i.current=a()),i.current}const dr=_.createContext(null),hd=_.createContext({transformPagePoint:a=>a,isStatic:!1,reducedMotion:"never"});class rS extends _.Component{getSnapshotBeforeUpdate(i){const l=this.props.childRef.current;if(l&&i.isPresent&&!this.props.isPresent){const o=this.props.sizeRef.current;o.height=l.offsetHeight||0,o.width=l.offsetWidth||0,o.top=l.offsetTop,o.left=l.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function cS({children:a,isPresent:i}){const l=_.useId(),o=_.useRef(null),u=_.useRef({width:0,height:0,top:0,left:0}),{nonce:h}=_.useContext(hd);return _.useInsertionEffect(()=>{const{width:d,height:p,top:g,left:v}=u.current;if(i||!o.current||!d||!p)return;o.current.dataset.motionPopId=l;const b=document.createElement("style");return h&&(b.nonce=h),document.head.appendChild(b),b.sheet&&b.sheet.insertRule(`
68
+ [data-motion-pop-id="${l}"] {
69
+ position: absolute !important;
70
+ width: ${d}px !important;
71
+ height: ${p}px !important;
72
+ top: ${g}px !important;
73
+ left: ${v}px !important;
74
+ }
75
+ `),()=>{document.head.removeChild(b)}},[i]),f.jsx(rS,{isPresent:i,childRef:o,sizeRef:u,children:_.cloneElement(a,{ref:o})})}const uS=({children:a,initial:i,isPresent:l,onExitComplete:o,custom:u,presenceAffectsLayout:h,mode:d})=>{const p=fd(dS),g=_.useId(),v=_.useCallback(S=>{p.set(S,!0);for(const x of p.values())if(!x)return;o&&o()},[p,o]),b=_.useMemo(()=>({id:g,initial:i,isPresent:l,custom:u,onExitComplete:v,register:S=>(p.set(S,!1),()=>p.delete(S))}),h?[Math.random(),v]:[l,v]);return _.useMemo(()=>{p.forEach((S,x)=>p.set(x,!1))},[l]),_.useEffect(()=>{!l&&!p.size&&o&&o()},[l]),d==="popLayout"&&(a=f.jsx(cS,{isPresent:l,children:a})),f.jsx(dr.Provider,{value:b,children:a})};function dS(){return new Map}function jv(a=!0){const i=_.useContext(dr);if(i===null)return[!0,null];const{isPresent:l,onExitComplete:o,register:u}=i,h=_.useId();_.useEffect(()=>{a&&u(h)},[a]);const d=_.useCallback(()=>a&&o&&o(h),[h,o,a]);return!l&&o?[!1,d]:[!0]}const Qo=a=>a.key||"";function Kp(a){const i=[];return _.Children.forEach(a,l=>{_.isValidElement(l)&&i.push(l)}),i}const md=typeof window<"u",Av=md?_.useLayoutEffect:_.useEffect,vi=({children:a,custom:i,initial:l=!0,onExitComplete:o,presenceAffectsLayout:u=!0,mode:h="sync",propagate:d=!1})=>{const[p,g]=jv(d),v=_.useMemo(()=>Kp(a),[a]),b=d&&!p?[]:v.map(Qo),S=_.useRef(!0),x=_.useRef(v),D=fd(()=>new Map),[k,O]=_.useState(v),[Y,L]=_.useState(v);Av(()=>{S.current=!1,x.current=v;for(let tt=0;tt<Y.length;tt++){const Z=Qo(Y[tt]);b.includes(Z)?D.delete(Z):D.get(Z)!==!0&&D.set(Z,!1)}},[Y,b.length,b.join("-")]);const Q=[];if(v!==k){let tt=[...v];for(let Z=0;Z<Y.length;Z++){const P=Y[Z],at=Qo(P);b.includes(at)||(tt.splice(Z,0,P),Q.push(P))}h==="wait"&&Q.length&&(tt=Q),L(Kp(tt)),O(v);return}const{forceRender:R}=_.useContext(dd);return f.jsx(f.Fragment,{children:Y.map(tt=>{const Z=Qo(tt),P=d&&!p?!1:v===Y||b.includes(Z),at=()=>{if(D.has(Z))D.set(Z,!0);else return;let z=!0;D.forEach(nt=>{nt||(z=!1)}),z&&(R==null||R(),L(x.current),d&&(g==null||g()),o&&o())};return f.jsx(uS,{isPresent:P,initial:!S.current||l?void 0:!1,custom:P?void 0:i,presenceAffectsLayout:u,mode:h,onExitComplete:P?void 0:at,children:tt},Z)})})},gn=a=>a;let Ev=gn;const fS={useManualTiming:!1};function hS(a){let i=new Set,l=new Set,o=!1,u=!1;const h=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function p(v){h.has(v)&&(g.schedule(v),a()),v(d)}const g={schedule:(v,b=!1,S=!1)=>{const D=S&&o?i:l;return b&&h.add(v),D.has(v)||D.add(v),v},cancel:v=>{l.delete(v),h.delete(v)},process:v=>{if(d=v,o){u=!0;return}o=!0,[i,l]=[l,i],i.forEach(p),i.clear(),o=!1,u&&(u=!1,g.process(v))}};return g}const Po=["read","resolveKeyframes","update","preRender","render","postRender"],mS=40;function Nv(a,i){let l=!1,o=!0;const u={delta:0,timestamp:0,isProcessing:!1},h=()=>l=!0,d=Po.reduce((L,Q)=>(L[Q]=hS(h),L),{}),{read:p,resolveKeyframes:g,update:v,preRender:b,render:S,postRender:x}=d,D=()=>{const L=performance.now();l=!1,u.delta=o?1e3/60:Math.max(Math.min(L-u.timestamp,mS),1),u.timestamp=L,u.isProcessing=!0,p.process(u),g.process(u),v.process(u),b.process(u),S.process(u),x.process(u),u.isProcessing=!1,l&&i&&(o=!1,a(D))},k=()=>{l=!0,o=!0,u.isProcessing||a(D)};return{schedule:Po.reduce((L,Q)=>{const R=d[Q];return L[Q]=(tt,Z=!1,P=!1)=>(l||k(),R.schedule(tt,Z,P)),L},{}),cancel:L=>{for(let Q=0;Q<Po.length;Q++)d[Po[Q]].cancel(L)},state:u,steps:d}}const{schedule:oe,cancel:Za,state:Ge,steps:Cu}=Nv(typeof requestAnimationFrame<"u"?requestAnimationFrame:gn,!0),Cv=_.createContext({strict:!1}),Qp={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"]},mi={};for(const a in Qp)mi[a]={isEnabled:i=>Qp[a].some(l=>!!i[l])};function pS(a){for(const i in a)mi[i]={...mi[i],...a[i]}}const gS=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 nr(a){return a.startsWith("while")||a.startsWith("drag")&&a!=="draggable"||a.startsWith("layout")||a.startsWith("onTap")||a.startsWith("onPan")||a.startsWith("onLayout")||gS.has(a)}let Dv=a=>!nr(a);function vS(a){a&&(Dv=i=>i.startsWith("on")?!nr(i):a(i))}try{vS(require("@emotion/is-prop-valid").default)}catch{}function yS(a,i,l){const o={};for(const u in a)u==="values"&&typeof a.values=="object"||(Dv(u)||l===!0&&nr(u)||!i&&!nr(u)||a.draggable&&u.startsWith("onDrag"))&&(o[u]=a[u]);return o}function bS(a){if(typeof Proxy>"u")return a;const i=new Map,l=(...o)=>a(...o);return new Proxy(l,{get:(o,u)=>u==="create"?a:(i.has(u)||i.set(u,a(u)),i.get(u))})}const fr=_.createContext({});function jl(a){return typeof a=="string"||Array.isArray(a)}function hr(a){return a!==null&&typeof a=="object"&&typeof a.start=="function"}const pd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gd=["initial",...pd];function mr(a){return hr(a.animate)||gd.some(i=>jl(a[i]))}function wv(a){return!!(mr(a)||a.variants)}function SS(a,i){if(mr(a)){const{initial:l,animate:o}=a;return{initial:l===!1||jl(l)?l:void 0,animate:jl(o)?o:void 0}}return a.inherit!==!1?i:{}}function _S(a){const{initial:i,animate:l}=SS(a,_.useContext(fr));return _.useMemo(()=>({initial:i,animate:l}),[Pp(i),Pp(l)])}function Pp(a){return Array.isArray(a)?a.join(" "):a}const TS=Symbol.for("motionComponentSymbol");function ci(a){return a&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function xS(a,i,l){return _.useCallback(o=>{o&&a.onMount&&a.onMount(o),i&&(o?i.mount(o):i.unmount()),l&&(typeof l=="function"?l(o):ci(l)&&(l.current=o))},[i])}const vd=a=>a.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),jS="framerAppearId",kv="data-"+vd(jS),{schedule:yd}=Nv(queueMicrotask,!1),Mv=_.createContext({});function AS(a,i,l,o,u){var h,d;const{visualElement:p}=_.useContext(fr),g=_.useContext(Cv),v=_.useContext(dr),b=_.useContext(hd).reducedMotion,S=_.useRef(null);o=o||g.renderer,!S.current&&o&&(S.current=o(a,{visualState:i,parent:p,props:l,presenceContext:v,blockInitialAnimation:v?v.initial===!1:!1,reducedMotionConfig:b}));const x=S.current,D=_.useContext(Mv);x&&!x.projection&&u&&(x.type==="html"||x.type==="svg")&&ES(S.current,l,u,D);const k=_.useRef(!1);_.useInsertionEffect(()=>{x&&k.current&&x.update(l,v)});const O=l[kv],Y=_.useRef(!!O&&!(!((h=window.MotionHandoffIsComplete)===null||h===void 0)&&h.call(window,O))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,O)));return Av(()=>{x&&(k.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),yd.render(x.render),Y.current&&x.animationState&&x.animationState.animateChanges())}),_.useEffect(()=>{x&&(!Y.current&&x.animationState&&x.animationState.animateChanges(),Y.current&&(queueMicrotask(()=>{var L;(L=window.MotionHandoffMarkAsComplete)===null||L===void 0||L.call(window,O)}),Y.current=!1))}),x}function ES(a,i,l,o){const{layoutId:u,layout:h,drag:d,dragConstraints:p,layoutScroll:g,layoutRoot:v}=i;a.projection=new l(a.latestValues,i["data-framer-portal-id"]?void 0:Rv(a.parent)),a.projection.setOptions({layoutId:u,layout:h,alwaysMeasureLayout:!!d||p&&ci(p),visualElement:a,animationType:typeof h=="string"?h:"both",initialPromotionConfig:o,layoutScroll:g,layoutRoot:v})}function Rv(a){if(a)return a.options.allowProjection!==!1?a.projection:Rv(a.parent)}function NS({preloadedFeatures:a,createVisualElement:i,useRender:l,useVisualState:o,Component:u}){var h,d;a&&pS(a);function p(v,b){let S;const x={..._.useContext(hd),...v,layoutId:CS(v)},{isStatic:D}=x,k=_S(v),O=o(v,D);if(!D&&md){DS();const Y=wS(x);S=Y.MeasureLayout,k.visualElement=AS(u,O,x,i,Y.ProjectionNode)}return f.jsxs(fr.Provider,{value:k,children:[S&&k.visualElement?f.jsx(S,{visualElement:k.visualElement,...x}):null,l(u,v,xS(O,k.visualElement,b),O,D,k.visualElement)]})}p.displayName=`motion.${typeof u=="string"?u:`create(${(d=(h=u.displayName)!==null&&h!==void 0?h:u.name)!==null&&d!==void 0?d:""})`}`;const g=_.forwardRef(p);return g[TS]=u,g}function CS({layoutId:a}){const i=_.useContext(dd).id;return i&&a!==void 0?i+"-"+a:a}function DS(a,i){_.useContext(Cv).strict}function wS(a){const{drag:i,layout:l}=mi;if(!i&&!l)return{};const o={...i,...l};return{MeasureLayout:i!=null&&i.isEnabled(a)||l!=null&&l.isEnabled(a)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const kS=["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 bd(a){return typeof a!="string"||a.includes("-")?!1:!!(kS.indexOf(a)>-1||/[A-Z]/u.test(a))}function Fp(a){const i=[{},{}];return a==null||a.values.forEach((l,o)=>{i[0][o]=l.get(),i[1][o]=l.getVelocity()}),i}function Sd(a,i,l,o){if(typeof i=="function"){const[u,h]=Fp(o);i=i(l!==void 0?l:a.custom,u,h)}if(typeof i=="string"&&(i=a.variants&&a.variants[i]),typeof i=="function"){const[u,h]=Fp(o);i=i(l!==void 0?l:a.custom,u,h)}return i}const Yu=a=>Array.isArray(a),MS=a=>!!(a&&typeof a=="object"&&a.mix&&a.toValue),RS=a=>Yu(a)?a[a.length-1]||0:a,Ye=a=>!!(a&&a.getVelocity);function Wo(a){const i=Ye(a)?a.get():a;return MS(i)?i.toValue():i}function OS({scrapeMotionValuesFromProps:a,createRenderState:i,onUpdate:l},o,u,h){const d={latestValues:BS(o,u,h,a),renderState:i()};return l&&(d.onMount=p=>l({props:o,current:p,...d}),d.onUpdate=p=>l(p)),d}const Ov=a=>(i,l)=>{const o=_.useContext(fr),u=_.useContext(dr),h=()=>OS(a,i,o,u);return l?h():fd(h)};function BS(a,i,l,o){const u={},h=o(a,{});for(const x in h)u[x]=Wo(h[x]);let{initial:d,animate:p}=a;const g=mr(a),v=wv(a);i&&v&&!g&&a.inherit!==!1&&(d===void 0&&(d=i.initial),p===void 0&&(p=i.animate));let b=l?l.initial===!1:!1;b=b||d===!1;const S=b?p:d;if(S&&typeof S!="boolean"&&!hr(S)){const x=Array.isArray(S)?S:[S];for(let D=0;D<x.length;D++){const k=Sd(a,x[D]);if(k){const{transitionEnd:O,transition:Y,...L}=k;for(const Q in L){let R=L[Q];if(Array.isArray(R)){const tt=b?R.length-1:0;R=R[tt]}R!==null&&(u[Q]=R)}for(const Q in O)u[Q]=O[Q]}}}return u}const yi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],bs=new Set(yi),Bv=a=>i=>typeof i=="string"&&i.startsWith(a),zv=Bv("--"),zS=Bv("var(--"),_d=a=>zS(a)?US.test(a.split("/*")[0].trim()):!1,US=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Uv=(a,i)=>i&&typeof a=="number"?i.transform(a):a,ma=(a,i,l)=>l>i?i:l<a?a:l,bi={test:a=>typeof a=="number",parse:parseFloat,transform:a=>a},Al={...bi,transform:a=>ma(0,1,a)},Fo={...bi,default:1},Dl=a=>({test:i=>typeof i=="string"&&i.endsWith(a)&&i.split(" ").length===1,parse:parseFloat,transform:i=>`${i}${a}`}),Ia=Dl("deg"),Yn=Dl("%"),xt=Dl("px"),VS=Dl("vh"),LS=Dl("vw"),Jp={...Yn,parse:a=>Yn.parse(a)/100,transform:a=>Yn.transform(a*100)},HS={borderWidth:xt,borderTopWidth:xt,borderRightWidth:xt,borderBottomWidth:xt,borderLeftWidth:xt,borderRadius:xt,radius:xt,borderTopLeftRadius:xt,borderTopRightRadius:xt,borderBottomRightRadius:xt,borderBottomLeftRadius:xt,width:xt,maxWidth:xt,height:xt,maxHeight:xt,top:xt,right:xt,bottom:xt,left:xt,padding:xt,paddingTop:xt,paddingRight:xt,paddingBottom:xt,paddingLeft:xt,margin:xt,marginTop:xt,marginRight:xt,marginBottom:xt,marginLeft:xt,backgroundPositionX:xt,backgroundPositionY:xt},GS={rotate:Ia,rotateX:Ia,rotateY:Ia,rotateZ:Ia,scale:Fo,scaleX:Fo,scaleY:Fo,scaleZ:Fo,skew:Ia,skewX:Ia,skewY:Ia,distance:xt,translateX:xt,translateY:xt,translateZ:xt,x:xt,y:xt,z:xt,perspective:xt,transformPerspective:xt,opacity:Al,originX:Jp,originY:Jp,originZ:xt},$p={...bi,transform:Math.round},Td={...HS,...GS,zIndex:$p,size:xt,fillOpacity:Al,strokeOpacity:Al,numOctaves:$p},IS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qS=yi.length;function YS(a,i,l){let o="",u=!0;for(let h=0;h<qS;h++){const d=yi[h],p=a[d];if(p===void 0)continue;let g=!0;if(typeof p=="number"?g=p===(d.startsWith("scale")?1:0):g=parseFloat(p)===0,!g||l){const v=Uv(p,Td[d]);if(!g){u=!1;const b=IS[d]||d;o+=`${b}(${v}) `}l&&(i[d]=v)}}return o=o.trim(),l?o=l(i,u?"":o):u&&(o="none"),o}function xd(a,i,l){const{style:o,vars:u,transformOrigin:h}=a;let d=!1,p=!1;for(const g in i){const v=i[g];if(bs.has(g)){d=!0;continue}else if(zv(g)){u[g]=v;continue}else{const b=Uv(v,Td[g]);g.startsWith("origin")?(p=!0,h[g]=b):o[g]=b}}if(i.transform||(d||l?o.transform=YS(i,a.transform,l):o.transform&&(o.transform="none")),p){const{originX:g="50%",originY:v="50%",originZ:b=0}=h;o.transformOrigin=`${g} ${v} ${b}`}}const ZS={offset:"stroke-dashoffset",array:"stroke-dasharray"},XS={offset:"strokeDashoffset",array:"strokeDasharray"};function KS(a,i,l=1,o=0,u=!0){a.pathLength=1;const h=u?ZS:XS;a[h.offset]=xt.transform(-o);const d=xt.transform(i),p=xt.transform(l);a[h.array]=`${d} ${p}`}function Wp(a,i,l){return typeof a=="string"?a:xt.transform(i+l*a)}function QS(a,i,l){const o=Wp(i,a.x,a.width),u=Wp(l,a.y,a.height);return`${o} ${u}`}function jd(a,{attrX:i,attrY:l,attrScale:o,originX:u,originY:h,pathLength:d,pathSpacing:p=1,pathOffset:g=0,...v},b,S){if(xd(a,v,S),b){a.style.viewBox&&(a.attrs.viewBox=a.style.viewBox);return}a.attrs=a.style,a.style={};const{attrs:x,style:D,dimensions:k}=a;x.transform&&(k&&(D.transform=x.transform),delete x.transform),k&&(u!==void 0||h!==void 0||D.transform)&&(D.transformOrigin=QS(k,u!==void 0?u:.5,h!==void 0?h:.5)),i!==void 0&&(x.x=i),l!==void 0&&(x.y=l),o!==void 0&&(x.scale=o),d!==void 0&&KS(x,d,p,g,!1)}const Ad=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Vv=()=>({...Ad(),attrs:{}}),Ed=a=>typeof a=="string"&&a.toLowerCase()==="svg";function Lv(a,{style:i,vars:l},o,u){Object.assign(a.style,i,u&&u.getProjectionStyles(o));for(const h in l)a.style.setProperty(h,l[h])}const Hv=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 Gv(a,i,l,o){Lv(a,i,void 0,o);for(const u in i.attrs)a.setAttribute(Hv.has(u)?u:vd(u),i.attrs[u])}const ar={};function PS(a){Object.assign(ar,a)}function Iv(a,{layout:i,layoutId:l}){return bs.has(a)||a.startsWith("origin")||(i||l!==void 0)&&(!!ar[a]||a==="opacity")}function Nd(a,i,l){var o;const{style:u}=a,h={};for(const d in u)(Ye(u[d])||i.style&&Ye(i.style[d])||Iv(d,a)||((o=l==null?void 0:l.getValue(d))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(h[d]=u[d]);return h}function qv(a,i,l){const o=Nd(a,i,l);for(const u in a)if(Ye(a[u])||Ye(i[u])){const h=yi.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;o[h]=a[u]}return o}function FS(a,i){try{i.dimensions=typeof a.getBBox=="function"?a.getBBox():a.getBoundingClientRect()}catch{i.dimensions={x:0,y:0,width:0,height:0}}}const tg=["x","y","width","height","cx","cy","r"],JS={useVisualState:Ov({scrapeMotionValuesFromProps:qv,createRenderState:Vv,onUpdate:({props:a,prevProps:i,current:l,renderState:o,latestValues:u})=>{if(!l)return;let h=!!a.drag;if(!h){for(const p in u)if(bs.has(p)){h=!0;break}}if(!h)return;let d=!i;if(i)for(let p=0;p<tg.length;p++){const g=tg[p];a[g]!==i[g]&&(d=!0)}d&&oe.read(()=>{FS(l,o),oe.render(()=>{jd(o,u,Ed(l.tagName),a.transformTemplate),Gv(l,o)})})}})},$S={useVisualState:Ov({scrapeMotionValuesFromProps:Nd,createRenderState:Ad})};function Yv(a,i,l){for(const o in i)!Ye(i[o])&&!Iv(o,l)&&(a[o]=i[o])}function WS({transformTemplate:a},i){return _.useMemo(()=>{const l=Ad();return xd(l,i,a),Object.assign({},l.vars,l.style)},[i])}function t_(a,i){const l=a.style||{},o={};return Yv(o,l,a),Object.assign(o,WS(a,i)),o}function e_(a,i){const l={},o=t_(a,i);return a.drag&&a.dragListener!==!1&&(l.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=a.drag===!0?"none":`pan-${a.drag==="x"?"y":"x"}`),a.tabIndex===void 0&&(a.onTap||a.onTapStart||a.whileTap)&&(l.tabIndex=0),l.style=o,l}function n_(a,i,l,o){const u=_.useMemo(()=>{const h=Vv();return jd(h,i,Ed(o),a.transformTemplate),{...h.attrs,style:{...h.style}}},[i]);if(a.style){const h={};Yv(h,a.style,a),u.style={...h,...u.style}}return u}function a_(a=!1){return(l,o,u,{latestValues:h},d)=>{const g=(bd(l)?n_:e_)(o,h,d,l),v=yS(o,typeof l=="string",a),b=l!==_.Fragment?{...v,...g,ref:u}:{},{children:S}=o,x=_.useMemo(()=>Ye(S)?S.get():S,[S]);return _.createElement(l,{...b,children:x})}}function s_(a,i){return function(o,{forwardMotionProps:u}={forwardMotionProps:!1}){const d={...bd(o)?JS:$S,preloadedFeatures:a,useRender:a_(u),createVisualElement:i,Component:o};return NS(d)}}function Zv(a,i){if(!Array.isArray(i))return!1;const l=i.length;if(l!==a.length)return!1;for(let o=0;o<l;o++)if(i[o]!==a[o])return!1;return!0}function pr(a,i,l){const o=a.getProps();return Sd(o,i,l!==void 0?l:o.custom,a)}function Cd(a,i){return a?a[i]||a.default||a:void 0}const Xv=new Set(["width","height","top","left","right","bottom",...yi]);let tr;function i_(){tr=void 0}const Zn={now:()=>(tr===void 0&&Zn.set(Ge.isProcessing||fS.useManualTiming?Ge.timestamp:performance.now()),tr),set:a=>{tr=a,queueMicrotask(i_)}};function Dd(a,i){a.indexOf(i)===-1&&a.push(i)}function wd(a,i){const l=a.indexOf(i);l>-1&&a.splice(l,1)}class kd{constructor(){this.subscriptions=[]}add(i){return Dd(this.subscriptions,i),()=>wd(this.subscriptions,i)}notify(i,l,o){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](i,l,o);else for(let h=0;h<u;h++){const d=this.subscriptions[h];d&&d(i,l,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Kv(a,i){return i?a*(1e3/i):0}const eg=30,l_=a=>!isNaN(parseFloat(a));class o_{constructor(i,l={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,u=!0)=>{const h=Zn.now();this.updatedAt!==h&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),u&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(i),this.owner=l.owner}setCurrent(i){this.current=i,this.updatedAt=Zn.now(),this.canTrackVelocity===null&&i!==void 0&&(this.canTrackVelocity=l_(this.current))}setPrevFrameValue(i=this.current){this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt}onChange(i){return this.on("change",i)}on(i,l){this.events[i]||(this.events[i]=new kd);const o=this.events[i].add(l);return i==="change"?()=>{o(),oe.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const i in this.events)this.events[i].clear()}attach(i,l){this.passiveEffect=i,this.stopPassiveEffect=l}set(i,l=!0){!l||!this.passiveEffect?this.updateAndNotify(i,l):this.passiveEffect(i,this.updateAndNotify)}setWithVelocity(i,l,o){this.set(l),this.prev=void 0,this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt-o}jump(i,l=!0){this.updateAndNotify(i),this.prev=i,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const i=Zn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||i-this.updatedAt>eg)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,eg);return Kv(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(i){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=i(l),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function El(a,i){return new o_(a,i)}function r_(a,i,l){a.hasValue(i)?a.getValue(i).set(l):a.addValue(i,El(l))}function c_(a,i){const l=pr(a,i);let{transitionEnd:o={},transition:u={},...h}=l||{};h={...h,...o};for(const d in h){const p=RS(h[d]);r_(a,d,p)}}function u_(a){return!!(Ye(a)&&a.add)}function Zu(a,i){const l=a.getValue("willChange");if(u_(l))return l.add(i)}function Qv(a){return a.props[kv]}function Md(a){let i;return()=>(i===void 0&&(i=a()),i)}const d_=Md(()=>window.ScrollTimeline!==void 0);class f_{constructor(i){this.stop=()=>this.runAll("stop"),this.animations=i.filter(Boolean)}get finished(){return Promise.all(this.animations.map(i=>"finished"in i?i.finished:i))}getAll(i){return this.animations[0][i]}setAll(i,l){for(let o=0;o<this.animations.length;o++)this.animations[o][i]=l}attachTimeline(i,l){const o=this.animations.map(u=>{if(d_()&&u.attachTimeline)return u.attachTimeline(i);if(typeof l=="function")return l(u)});return()=>{o.forEach((u,h)=>{u&&u(),this.animations[h].stop()})}}get time(){return this.getAll("time")}set time(i){this.setAll("time",i)}get speed(){return this.getAll("speed")}set speed(i){this.setAll("speed",i)}get startTime(){return this.getAll("startTime")}get duration(){let i=0;for(let l=0;l<this.animations.length;l++)i=Math.max(i,this.animations[l].duration);return i}runAll(i){this.animations.forEach(l=>l[i]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class h_ extends f_{then(i,l){return Promise.all(this.animations).then(i).catch(l)}}const fa=a=>a*1e3,ha=a=>a/1e3;function Rd(a){return typeof a=="function"}function ng(a,i){a.timeline=i,a.onfinish=null}const Od=a=>Array.isArray(a)&&typeof a[0]=="number",m_={linearEasing:void 0};function p_(a,i){const l=Md(a);return()=>{var o;return(o=m_[i])!==null&&o!==void 0?o:l()}}const sr=p_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),pi=(a,i,l)=>{const o=i-a;return o===0?1:(l-a)/o},Pv=(a,i,l=10)=>{let o="";const u=Math.max(Math.round(i/l),2);for(let h=0;h<u;h++)o+=a(pi(0,u-1,h))+", ";return`linear(${o.substring(0,o.length-2)})`};function Fv(a){return!!(typeof a=="function"&&sr()||!a||typeof a=="string"&&(a in Xu||sr())||Od(a)||Array.isArray(a)&&a.every(Fv))}const gl=([a,i,l,o])=>`cubic-bezier(${a}, ${i}, ${l}, ${o})`,Xu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gl([0,.65,.55,1]),circOut:gl([.55,0,1,.45]),backIn:gl([.31,.01,.66,-.59]),backOut:gl([.33,1.53,.69,.99])};function Jv(a,i){if(a)return typeof a=="function"&&sr()?Pv(a,i):Od(a)?gl(a):Array.isArray(a)?a.map(l=>Jv(l,i)||Xu.easeOut):Xu[a]}const $v=(a,i,l)=>(((1-3*l+3*i)*a+(3*l-6*i))*a+3*i)*a,g_=1e-7,v_=12;function y_(a,i,l,o,u){let h,d,p=0;do d=i+(l-i)/2,h=$v(d,o,u)-a,h>0?l=d:i=d;while(Math.abs(h)>g_&&++p<v_);return d}function wl(a,i,l,o){if(a===i&&l===o)return gn;const u=h=>y_(h,0,1,a,l);return h=>h===0||h===1?h:$v(u(h),i,o)}const Wv=a=>i=>i<=.5?a(2*i)/2:(2-a(2*(1-i)))/2,t0=a=>i=>1-a(1-i),e0=wl(.33,1.53,.69,.99),Bd=t0(e0),n0=Wv(Bd),a0=a=>(a*=2)<1?.5*Bd(a):.5*(2-Math.pow(2,-10*(a-1))),zd=a=>1-Math.sin(Math.acos(a)),s0=t0(zd),i0=Wv(zd),l0=a=>/^0[^.\s]+$/u.test(a);function b_(a){return typeof a=="number"?a===0:a!==null?a==="none"||a==="0"||l0(a):!0}const Sl=a=>Math.round(a*1e5)/1e5,Ud=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function S_(a){return a==null}const __=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vd=(a,i)=>l=>!!(typeof l=="string"&&__.test(l)&&l.startsWith(a)||i&&!S_(l)&&Object.prototype.hasOwnProperty.call(l,i)),o0=(a,i,l)=>o=>{if(typeof o!="string")return o;const[u,h,d,p]=o.match(Ud);return{[a]:parseFloat(u),[i]:parseFloat(h),[l]:parseFloat(d),alpha:p!==void 0?parseFloat(p):1}},T_=a=>ma(0,255,a),Du={...bi,transform:a=>Math.round(T_(a))},vs={test:Vd("rgb","red"),parse:o0("red","green","blue"),transform:({red:a,green:i,blue:l,alpha:o=1})=>"rgba("+Du.transform(a)+", "+Du.transform(i)+", "+Du.transform(l)+", "+Sl(Al.transform(o))+")"};function x_(a){let i="",l="",o="",u="";return a.length>5?(i=a.substring(1,3),l=a.substring(3,5),o=a.substring(5,7),u=a.substring(7,9)):(i=a.substring(1,2),l=a.substring(2,3),o=a.substring(3,4),u=a.substring(4,5),i+=i,l+=l,o+=o,u+=u),{red:parseInt(i,16),green:parseInt(l,16),blue:parseInt(o,16),alpha:u?parseInt(u,16)/255:1}}const Ku={test:Vd("#"),parse:x_,transform:vs.transform},ui={test:Vd("hsl","hue"),parse:o0("hue","saturation","lightness"),transform:({hue:a,saturation:i,lightness:l,alpha:o=1})=>"hsla("+Math.round(a)+", "+Yn.transform(Sl(i))+", "+Yn.transform(Sl(l))+", "+Sl(Al.transform(o))+")"},qe={test:a=>vs.test(a)||Ku.test(a)||ui.test(a),parse:a=>vs.test(a)?vs.parse(a):ui.test(a)?ui.parse(a):Ku.parse(a),transform:a=>typeof a=="string"?a:a.hasOwnProperty("red")?vs.transform(a):ui.transform(a)},j_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function A_(a){var i,l;return isNaN(a)&&typeof a=="string"&&(((i=a.match(Ud))===null||i===void 0?void 0:i.length)||0)+(((l=a.match(j_))===null||l===void 0?void 0:l.length)||0)>0}const r0="number",c0="color",E_="var",N_="var(",ag="${}",C_=/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 Nl(a){const i=a.toString(),l=[],o={color:[],number:[],var:[]},u=[];let h=0;const p=i.replace(C_,g=>(qe.test(g)?(o.color.push(h),u.push(c0),l.push(qe.parse(g))):g.startsWith(N_)?(o.var.push(h),u.push(E_),l.push(g)):(o.number.push(h),u.push(r0),l.push(parseFloat(g))),++h,ag)).split(ag);return{values:l,split:p,indexes:o,types:u}}function u0(a){return Nl(a).values}function d0(a){const{split:i,types:l}=Nl(a),o=i.length;return u=>{let h="";for(let d=0;d<o;d++)if(h+=i[d],u[d]!==void 0){const p=l[d];p===r0?h+=Sl(u[d]):p===c0?h+=qe.transform(u[d]):h+=u[d]}return h}}const D_=a=>typeof a=="number"?0:a;function w_(a){const i=u0(a);return d0(a)(i.map(D_))}const Xa={test:A_,parse:u0,createTransformer:d0,getAnimatableNone:w_},k_=new Set(["brightness","contrast","saturate","opacity"]);function M_(a){const[i,l]=a.slice(0,-1).split("(");if(i==="drop-shadow")return a;const[o]=l.match(Ud)||[];if(!o)return a;const u=l.replace(o,"");let h=k_.has(i)?1:0;return o!==l&&(h*=100),i+"("+h+u+")"}const R_=/\b([a-z-]*)\(.*?\)/gu,Qu={...Xa,getAnimatableNone:a=>{const i=a.match(R_);return i?i.map(M_).join(" "):a}},O_={...Td,color:qe,backgroundColor:qe,outlineColor:qe,fill:qe,stroke:qe,borderColor:qe,borderTopColor:qe,borderRightColor:qe,borderBottomColor:qe,borderLeftColor:qe,filter:Qu,WebkitFilter:Qu},Ld=a=>O_[a];function f0(a,i){let l=Ld(a);return l!==Qu&&(l=Xa),l.getAnimatableNone?l.getAnimatableNone(i):void 0}const B_=new Set(["auto","none","0"]);function z_(a,i,l){let o=0,u;for(;o<a.length&&!u;){const h=a[o];typeof h=="string"&&!B_.has(h)&&Nl(h).values.length&&(u=a[o]),o++}if(u&&l)for(const h of i)a[h]=f0(l,u)}const sg=a=>a===bi||a===xt,ig=(a,i)=>parseFloat(a.split(", ")[i]),lg=(a,i)=>(l,{transform:o})=>{if(o==="none"||!o)return 0;const u=o.match(/^matrix3d\((.+)\)$/u);if(u)return ig(u[1],i);{const h=o.match(/^matrix\((.+)\)$/u);return h?ig(h[1],a):0}},U_=new Set(["x","y","z"]),V_=yi.filter(a=>!U_.has(a));function L_(a){const i=[];return V_.forEach(l=>{const o=a.getValue(l);o!==void 0&&(i.push([l,o.get()]),o.set(l.startsWith("scale")?1:0))}),i}const gi={width:({x:a},{paddingLeft:i="0",paddingRight:l="0"})=>a.max-a.min-parseFloat(i)-parseFloat(l),height:({y:a},{paddingTop:i="0",paddingBottom:l="0"})=>a.max-a.min-parseFloat(i)-parseFloat(l),top:(a,{top:i})=>parseFloat(i),left:(a,{left:i})=>parseFloat(i),bottom:({y:a},{top:i})=>parseFloat(i)+(a.max-a.min),right:({x:a},{left:i})=>parseFloat(i)+(a.max-a.min),x:lg(4,13),y:lg(5,14)};gi.translateX=gi.x;gi.translateY=gi.y;const ys=new Set;let Pu=!1,Fu=!1;function h0(){if(Fu){const a=Array.from(ys).filter(o=>o.needsMeasurement),i=new Set(a.map(o=>o.element)),l=new Map;i.forEach(o=>{const u=L_(o);u.length&&(l.set(o,u),o.render())}),a.forEach(o=>o.measureInitialState()),i.forEach(o=>{o.render();const u=l.get(o);u&&u.forEach(([h,d])=>{var p;(p=o.getValue(h))===null||p===void 0||p.set(d)})}),a.forEach(o=>o.measureEndState()),a.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Fu=!1,Pu=!1,ys.forEach(a=>a.complete()),ys.clear()}function m0(){ys.forEach(a=>{a.readKeyframes(),a.needsMeasurement&&(Fu=!0)})}function H_(){m0(),h0()}class Hd{constructor(i,l,o,u,h,d=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...i],this.onComplete=l,this.name=o,this.motionValue=u,this.element=h,this.isAsync=d}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ys.add(this),Pu||(Pu=!0,oe.read(m0),oe.resolveKeyframes(h0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:i,name:l,element:o,motionValue:u}=this;for(let h=0;h<i.length;h++)if(i[h]===null)if(h===0){const d=u==null?void 0:u.get(),p=i[i.length-1];if(d!==void 0)i[0]=d;else if(o&&l){const g=o.readValue(l,p);g!=null&&(i[0]=g)}i[0]===void 0&&(i[0]=p),u&&d===void 0&&u.set(i[0])}else i[h]=i[h-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ys.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ys.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const p0=a=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(a),G_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function I_(a){const i=G_.exec(a);if(!i)return[,];const[,l,o,u]=i;return[`--${l??o}`,u]}function g0(a,i,l=1){const[o,u]=I_(a);if(!o)return;const h=window.getComputedStyle(i).getPropertyValue(o);if(h){const d=h.trim();return p0(d)?parseFloat(d):d}return _d(u)?g0(u,i,l+1):u}const v0=a=>i=>i.test(a),q_={test:a=>a==="auto",parse:a=>a},y0=[bi,xt,Yn,Ia,LS,VS,q_],og=a=>y0.find(v0(a));class b0 extends Hd{constructor(i,l,o,u,h){super(i,l,o,u,h,!0)}readKeyframes(){const{unresolvedKeyframes:i,element:l,name:o}=this;if(!l||!l.current)return;super.readKeyframes();for(let g=0;g<i.length;g++){let v=i[g];if(typeof v=="string"&&(v=v.trim(),_d(v))){const b=g0(v,l.current);b!==void 0&&(i[g]=b),g===i.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!Xv.has(o)||i.length!==2)return;const[u,h]=i,d=og(u),p=og(h);if(d!==p)if(sg(d)&&sg(p))for(let g=0;g<i.length;g++){const v=i[g];typeof v=="string"&&(i[g]=parseFloat(v))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:i,name:l}=this,o=[];for(let u=0;u<i.length;u++)b_(i[u])&&o.push(u);o.length&&z_(i,o,l)}measureInitialState(){const{element:i,unresolvedKeyframes:l,name:o}=this;if(!i||!i.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=gi[o](i.measureViewportBox(),window.getComputedStyle(i.current)),l[0]=this.measuredOrigin;const u=l[l.length-1];u!==void 0&&i.getValue(o,u).jump(u,!1)}measureEndState(){var i;const{element:l,name:o,unresolvedKeyframes:u}=this;if(!l||!l.current)return;const h=l.getValue(o);h&&h.jump(this.measuredOrigin,!1);const d=u.length-1,p=u[d];u[d]=gi[o](l.measureViewportBox(),window.getComputedStyle(l.current)),p!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=p),!((i=this.removedTransforms)===null||i===void 0)&&i.length&&this.removedTransforms.forEach(([g,v])=>{l.getValue(g).set(v)}),this.resolveNoneKeyframes()}}const rg=(a,i)=>i==="zIndex"?!1:!!(typeof a=="number"||Array.isArray(a)||typeof a=="string"&&(Xa.test(a)||a==="0")&&!a.startsWith("url("));function Y_(a){const i=a[0];if(a.length===1)return!0;for(let l=0;l<a.length;l++)if(a[l]!==i)return!0}function Z_(a,i,l,o){const u=a[0];if(u===null)return!1;if(i==="display"||i==="visibility")return!0;const h=a[a.length-1],d=rg(u,i),p=rg(h,i);return!d||!p?!1:Y_(a)||(l==="spring"||Rd(l))&&o}const X_=a=>a!==null;function gr(a,{repeat:i,repeatType:l="loop"},o){const u=a.filter(X_),h=i&&l!=="loop"&&i%2===1?0:u.length-1;return!h||o===void 0?u[h]:o}const K_=40;class S0{constructor({autoplay:i=!0,delay:l=0,type:o="keyframes",repeat:u=0,repeatDelay:h=0,repeatType:d="loop",...p}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Zn.now(),this.options={autoplay:i,delay:l,type:o,repeat:u,repeatDelay:h,repeatType:d,...p},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>K_?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&H_(),this._resolved}onKeyframesResolved(i,l){this.resolvedAt=Zn.now(),this.hasAttemptedResolve=!0;const{name:o,type:u,velocity:h,delay:d,onComplete:p,onUpdate:g,isGenerator:v}=this.options;if(!v&&!Z_(i,o,u,h))if(d)this.options.duration=0;else{g&&g(gr(i,this.options,l)),p&&p(),this.resolveFinishedPromise();return}const b=this.initPlayback(i,l);b!==!1&&(this._resolved={keyframes:i,finalKeyframe:l,...b},this.onPostResolved())}onPostResolved(){}then(i,l){return this.currentFinishedPromise.then(i,l)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(i=>{this.resolveFinishedPromise=i})}}const Ju=2e4;function _0(a){let i=0;const l=50;let o=a.next(i);for(;!o.done&&i<Ju;)i+=l,o=a.next(i);return i>=Ju?1/0:i}const de=(a,i,l)=>a+(i-a)*l;function wu(a,i,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?a+(i-a)*6*l:l<1/2?i:l<2/3?a+(i-a)*(2/3-l)*6:a}function Q_({hue:a,saturation:i,lightness:l,alpha:o}){a/=360,i/=100,l/=100;let u=0,h=0,d=0;if(!i)u=h=d=l;else{const p=l<.5?l*(1+i):l+i-l*i,g=2*l-p;u=wu(g,p,a+1/3),h=wu(g,p,a),d=wu(g,p,a-1/3)}return{red:Math.round(u*255),green:Math.round(h*255),blue:Math.round(d*255),alpha:o}}function ir(a,i){return l=>l>0?i:a}const ku=(a,i,l)=>{const o=a*a,u=l*(i*i-o)+o;return u<0?0:Math.sqrt(u)},P_=[Ku,vs,ui],F_=a=>P_.find(i=>i.test(a));function cg(a){const i=F_(a);if(!i)return!1;let l=i.parse(a);return i===ui&&(l=Q_(l)),l}const ug=(a,i)=>{const l=cg(a),o=cg(i);if(!l||!o)return ir(a,i);const u={...l};return h=>(u.red=ku(l.red,o.red,h),u.green=ku(l.green,o.green,h),u.blue=ku(l.blue,o.blue,h),u.alpha=de(l.alpha,o.alpha,h),vs.transform(u))},J_=(a,i)=>l=>i(a(l)),kl=(...a)=>a.reduce(J_),$u=new Set(["none","hidden"]);function $_(a,i){return $u.has(a)?l=>l<=0?a:i:l=>l>=1?i:a}function W_(a,i){return l=>de(a,i,l)}function Gd(a){return typeof a=="number"?W_:typeof a=="string"?_d(a)?ir:qe.test(a)?ug:nT:Array.isArray(a)?T0:typeof a=="object"?qe.test(a)?ug:tT:ir}function T0(a,i){const l=[...a],o=l.length,u=a.map((h,d)=>Gd(h)(h,i[d]));return h=>{for(let d=0;d<o;d++)l[d]=u[d](h);return l}}function tT(a,i){const l={...a,...i},o={};for(const u in l)a[u]!==void 0&&i[u]!==void 0&&(o[u]=Gd(a[u])(a[u],i[u]));return u=>{for(const h in o)l[h]=o[h](u);return l}}function eT(a,i){var l;const o=[],u={color:0,var:0,number:0};for(let h=0;h<i.values.length;h++){const d=i.types[h],p=a.indexes[d][u[d]],g=(l=a.values[p])!==null&&l!==void 0?l:0;o[h]=g,u[d]++}return o}const nT=(a,i)=>{const l=Xa.createTransformer(i),o=Nl(a),u=Nl(i);return o.indexes.var.length===u.indexes.var.length&&o.indexes.color.length===u.indexes.color.length&&o.indexes.number.length>=u.indexes.number.length?$u.has(a)&&!u.values.length||$u.has(i)&&!o.values.length?$_(a,i):kl(T0(eT(o,u),u.values),l):ir(a,i)};function x0(a,i,l){return typeof a=="number"&&typeof i=="number"&&typeof l=="number"?de(a,i,l):Gd(a)(a,i)}const aT=5;function j0(a,i,l){const o=Math.max(i-aT,0);return Kv(l-a(o),i-o)}const pe={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},Mu=.001;function sT({duration:a=pe.duration,bounce:i=pe.bounce,velocity:l=pe.velocity,mass:o=pe.mass}){let u,h,d=1-i;d=ma(pe.minDamping,pe.maxDamping,d),a=ma(pe.minDuration,pe.maxDuration,ha(a)),d<1?(u=v=>{const b=v*d,S=b*a,x=b-l,D=Wu(v,d),k=Math.exp(-S);return Mu-x/D*k},h=v=>{const S=v*d*a,x=S*l+l,D=Math.pow(d,2)*Math.pow(v,2)*a,k=Math.exp(-S),O=Wu(Math.pow(v,2),d);return(-u(v)+Mu>0?-1:1)*((x-D)*k)/O}):(u=v=>{const b=Math.exp(-v*a),S=(v-l)*a+1;return-Mu+b*S},h=v=>{const b=Math.exp(-v*a),S=(l-v)*(a*a);return b*S});const p=5/a,g=lT(u,h,p);if(a=fa(a),isNaN(g))return{stiffness:pe.stiffness,damping:pe.damping,duration:a};{const v=Math.pow(g,2)*o;return{stiffness:v,damping:d*2*Math.sqrt(o*v),duration:a}}}const iT=12;function lT(a,i,l){let o=l;for(let u=1;u<iT;u++)o=o-a(o)/i(o);return o}function Wu(a,i){return a*Math.sqrt(1-i*i)}const oT=["duration","bounce"],rT=["stiffness","damping","mass"];function dg(a,i){return i.some(l=>a[l]!==void 0)}function cT(a){let i={velocity:pe.velocity,stiffness:pe.stiffness,damping:pe.damping,mass:pe.mass,isResolvedFromDuration:!1,...a};if(!dg(a,rT)&&dg(a,oT))if(a.visualDuration){const l=a.visualDuration,o=2*Math.PI/(l*1.2),u=o*o,h=2*ma(.05,1,1-(a.bounce||0))*Math.sqrt(u);i={...i,mass:pe.mass,stiffness:u,damping:h}}else{const l=sT(a);i={...i,...l,mass:pe.mass},i.isResolvedFromDuration=!0}return i}function A0(a=pe.visualDuration,i=pe.bounce){const l=typeof a!="object"?{visualDuration:a,keyframes:[0,1],bounce:i}:a;let{restSpeed:o,restDelta:u}=l;const h=l.keyframes[0],d=l.keyframes[l.keyframes.length-1],p={done:!1,value:h},{stiffness:g,damping:v,mass:b,duration:S,velocity:x,isResolvedFromDuration:D}=cT({...l,velocity:-ha(l.velocity||0)}),k=x||0,O=v/(2*Math.sqrt(g*b)),Y=d-h,L=ha(Math.sqrt(g/b)),Q=Math.abs(Y)<5;o||(o=Q?pe.restSpeed.granular:pe.restSpeed.default),u||(u=Q?pe.restDelta.granular:pe.restDelta.default);let R;if(O<1){const Z=Wu(L,O);R=P=>{const at=Math.exp(-O*L*P);return d-at*((k+O*L*Y)/Z*Math.sin(Z*P)+Y*Math.cos(Z*P))}}else if(O===1)R=Z=>d-Math.exp(-L*Z)*(Y+(k+L*Y)*Z);else{const Z=L*Math.sqrt(O*O-1);R=P=>{const at=Math.exp(-O*L*P),z=Math.min(Z*P,300);return d-at*((k+O*L*Y)*Math.sinh(z)+Z*Y*Math.cosh(z))/Z}}const tt={calculatedDuration:D&&S||null,next:Z=>{const P=R(Z);if(D)p.done=Z>=S;else{let at=0;O<1&&(at=Z===0?fa(k):j0(R,Z,P));const z=Math.abs(at)<=o,nt=Math.abs(d-P)<=u;p.done=z&&nt}return p.value=p.done?d:P,p},toString:()=>{const Z=Math.min(_0(tt),Ju),P=Pv(at=>tt.next(Z*at).value,Z,30);return Z+"ms "+P}};return tt}function fg({keyframes:a,velocity:i=0,power:l=.8,timeConstant:o=325,bounceDamping:u=10,bounceStiffness:h=500,modifyTarget:d,min:p,max:g,restDelta:v=.5,restSpeed:b}){const S=a[0],x={done:!1,value:S},D=z=>p!==void 0&&z<p||g!==void 0&&z>g,k=z=>p===void 0?g:g===void 0||Math.abs(p-z)<Math.abs(g-z)?p:g;let O=l*i;const Y=S+O,L=d===void 0?Y:d(Y);L!==Y&&(O=L-S);const Q=z=>-O*Math.exp(-z/o),R=z=>L+Q(z),tt=z=>{const nt=Q(z),dt=R(z);x.done=Math.abs(nt)<=v,x.value=x.done?L:dt};let Z,P;const at=z=>{D(x.value)&&(Z=z,P=A0({keyframes:[x.value,k(x.value)],velocity:j0(R,z,x.value),damping:u,stiffness:h,restDelta:v,restSpeed:b}))};return at(0),{calculatedDuration:null,next:z=>{let nt=!1;return!P&&Z===void 0&&(nt=!0,tt(z),at(z)),Z!==void 0&&z>=Z?P.next(z-Z):(!nt&&tt(z),x)}}}const uT=wl(.42,0,1,1),dT=wl(0,0,.58,1),E0=wl(.42,0,.58,1),fT=a=>Array.isArray(a)&&typeof a[0]!="number",hT={linear:gn,easeIn:uT,easeInOut:E0,easeOut:dT,circIn:zd,circInOut:i0,circOut:s0,backIn:Bd,backInOut:n0,backOut:e0,anticipate:a0},hg=a=>{if(Od(a)){Ev(a.length===4);const[i,l,o,u]=a;return wl(i,l,o,u)}else if(typeof a=="string")return hT[a];return a};function mT(a,i,l){const o=[],u=l||x0,h=a.length-1;for(let d=0;d<h;d++){let p=u(a[d],a[d+1]);if(i){const g=Array.isArray(i)?i[d]||gn:i;p=kl(g,p)}o.push(p)}return o}function pT(a,i,{clamp:l=!0,ease:o,mixer:u}={}){const h=a.length;if(Ev(h===i.length),h===1)return()=>i[0];if(h===2&&i[0]===i[1])return()=>i[1];const d=a[0]===a[1];a[0]>a[h-1]&&(a=[...a].reverse(),i=[...i].reverse());const p=mT(i,o,u),g=p.length,v=b=>{if(d&&b<a[0])return i[0];let S=0;if(g>1)for(;S<a.length-2&&!(b<a[S+1]);S++);const x=pi(a[S],a[S+1],b);return p[S](x)};return l?b=>v(ma(a[0],a[h-1],b)):v}function gT(a,i){const l=a[a.length-1];for(let o=1;o<=i;o++){const u=pi(0,i,o);a.push(de(l,1,u))}}function vT(a){const i=[0];return gT(i,a.length-1),i}function yT(a,i){return a.map(l=>l*i)}function bT(a,i){return a.map(()=>i||E0).splice(0,a.length-1)}function lr({duration:a=300,keyframes:i,times:l,ease:o="easeInOut"}){const u=fT(o)?o.map(hg):hg(o),h={done:!1,value:i[0]},d=yT(l&&l.length===i.length?l:vT(i),a),p=pT(d,i,{ease:Array.isArray(u)?u:bT(i,u)});return{calculatedDuration:a,next:g=>(h.value=p(g),h.done=g>=a,h)}}const ST=a=>{const i=({timestamp:l})=>a(l);return{start:()=>oe.update(i,!0),stop:()=>Za(i),now:()=>Ge.isProcessing?Ge.timestamp:Zn.now()}},_T={decay:fg,inertia:fg,tween:lr,keyframes:lr,spring:A0},TT=a=>a/100;class Id extends S0{constructor(i){super(i),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:g}=this.options;g&&g()};const{name:l,motionValue:o,element:u,keyframes:h}=this.options,d=(u==null?void 0:u.KeyframeResolver)||Hd,p=(g,v)=>this.onKeyframesResolved(g,v);this.resolver=new d(h,p,l,o,u),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(i){const{type:l="keyframes",repeat:o=0,repeatDelay:u=0,repeatType:h,velocity:d=0}=this.options,p=Rd(l)?l:_T[l]||lr;let g,v;p!==lr&&typeof i[0]!="number"&&(g=kl(TT,x0(i[0],i[1])),i=[0,100]);const b=p({...this.options,keyframes:i});h==="mirror"&&(v=p({...this.options,keyframes:[...i].reverse(),velocity:-d})),b.calculatedDuration===null&&(b.calculatedDuration=_0(b));const{calculatedDuration:S}=b,x=S+u,D=x*(o+1)-u;return{generator:b,mirroredGenerator:v,mapPercentToKeyframes:g,calculatedDuration:S,resolvedDuration:x,totalDuration:D}}onPostResolved(){const{autoplay:i=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!i?this.pause():this.state=this.pendingPlayState}tick(i,l=!1){const{resolved:o}=this;if(!o){const{keyframes:z}=this.options;return{done:!0,value:z[z.length-1]}}const{finalKeyframe:u,generator:h,mirroredGenerator:d,mapPercentToKeyframes:p,keyframes:g,calculatedDuration:v,totalDuration:b,resolvedDuration:S}=o;if(this.startTime===null)return h.next(0);const{delay:x,repeat:D,repeatType:k,repeatDelay:O,onUpdate:Y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,i):this.speed<0&&(this.startTime=Math.min(i-b/this.speed,this.startTime)),l?this.currentTime=i:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(i-this.startTime)*this.speed;const L=this.currentTime-x*(this.speed>=0?1:-1),Q=this.speed>=0?L<0:L>b;this.currentTime=Math.max(L,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=b);let R=this.currentTime,tt=h;if(D){const z=Math.min(this.currentTime,b)/S;let nt=Math.floor(z),dt=z%1;!dt&&z>=1&&(dt=1),dt===1&&nt--,nt=Math.min(nt,D+1),!!(nt%2)&&(k==="reverse"?(dt=1-dt,O&&(dt-=O/S)):k==="mirror"&&(tt=d)),R=ma(0,1,dt)*S}const Z=Q?{done:!1,value:g[0]}:tt.next(R);p&&(Z.value=p(Z.value));let{done:P}=Z;!Q&&v!==null&&(P=this.speed>=0?this.currentTime>=b:this.currentTime<=0);const at=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return at&&u!==void 0&&(Z.value=gr(g,this.options,u)),Y&&Y(Z.value),at&&this.finish(),Z}get duration(){const{resolved:i}=this;return i?ha(i.calculatedDuration):0}get time(){return ha(this.currentTime)}set time(i){i=fa(i),this.currentTime=i,this.holdTime!==null||this.speed===0?this.holdTime=i:this.driver&&(this.startTime=this.driver.now()-i/this.speed)}get speed(){return this.playbackSpeed}set speed(i){const l=this.playbackSpeed!==i;this.playbackSpeed=i,l&&(this.time=ha(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:i=ST,onPlay:l,startTime:o}=this.options;this.driver||(this.driver=i(h=>this.tick(h))),l&&l();const u=this.driver.now();this.holdTime!==null?this.startTime=u-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=u):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var i;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(i=this.currentTime)!==null&&i!==void 0?i:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:i}=this.options;i&&i()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(i){return this.startTime=0,this.tick(i,!0)}}const xT=new Set(["opacity","clipPath","filter","transform"]);function jT(a,i,l,{delay:o=0,duration:u=300,repeat:h=0,repeatType:d="loop",ease:p="easeInOut",times:g}={}){const v={[i]:l};g&&(v.offset=g);const b=Jv(p,u);return Array.isArray(b)&&(v.easing=b),a.animate(v,{delay:o,duration:u,easing:Array.isArray(b)?"linear":b,fill:"both",iterations:h+1,direction:d==="reverse"?"alternate":"normal"})}const AT=Md(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),or=10,ET=2e4;function NT(a){return Rd(a.type)||a.type==="spring"||!Fv(a.ease)}function CT(a,i){const l=new Id({...i,keyframes:a,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:a[0]};const u=[];let h=0;for(;!o.done&&h<ET;)o=l.sample(h),u.push(o.value),h+=or;return{times:void 0,keyframes:u,duration:h-or,ease:"linear"}}const N0={anticipate:a0,backInOut:n0,circInOut:i0};function DT(a){return a in N0}class mg extends S0{constructor(i){super(i);const{name:l,motionValue:o,element:u,keyframes:h}=this.options;this.resolver=new b0(h,(d,p)=>this.onKeyframesResolved(d,p),l,o,u),this.resolver.scheduleResolve()}initPlayback(i,l){let{duration:o=300,times:u,ease:h,type:d,motionValue:p,name:g,startTime:v}=this.options;if(!p.owner||!p.owner.current)return!1;if(typeof h=="string"&&sr()&&DT(h)&&(h=N0[h]),NT(this.options)){const{onComplete:S,onUpdate:x,motionValue:D,element:k,...O}=this.options,Y=CT(i,O);i=Y.keyframes,i.length===1&&(i[1]=i[0]),o=Y.duration,u=Y.times,h=Y.ease,d="keyframes"}const b=jT(p.owner.current,g,i,{...this.options,duration:o,times:u,ease:h});return b.startTime=v??this.calcStartTime(),this.pendingTimeline?(ng(b,this.pendingTimeline),this.pendingTimeline=void 0):b.onfinish=()=>{const{onComplete:S}=this.options;p.set(gr(i,this.options,l)),S&&S(),this.cancel(),this.resolveFinishedPromise()},{animation:b,duration:o,times:u,type:d,ease:h,keyframes:i}}get duration(){const{resolved:i}=this;if(!i)return 0;const{duration:l}=i;return ha(l)}get time(){const{resolved:i}=this;if(!i)return 0;const{animation:l}=i;return ha(l.currentTime||0)}set time(i){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.currentTime=fa(i)}get speed(){const{resolved:i}=this;if(!i)return 1;const{animation:l}=i;return l.playbackRate}set speed(i){const{resolved:l}=this;if(!l)return;const{animation:o}=l;o.playbackRate=i}get state(){const{resolved:i}=this;if(!i)return"idle";const{animation:l}=i;return l.playState}get startTime(){const{resolved:i}=this;if(!i)return null;const{animation:l}=i;return l.startTime}attachTimeline(i){if(!this._resolved)this.pendingTimeline=i;else{const{resolved:l}=this;if(!l)return gn;const{animation:o}=l;ng(o,i)}return gn}play(){if(this.isStopped)return;const{resolved:i}=this;if(!i)return;const{animation:l}=i;l.playState==="finished"&&this.updateFinishedPromise(),l.play()}pause(){const{resolved:i}=this;if(!i)return;const{animation:l}=i;l.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:i}=this;if(!i)return;const{animation:l,keyframes:o,duration:u,type:h,ease:d,times:p}=i;if(l.playState==="idle"||l.playState==="finished")return;if(this.time){const{motionValue:v,onUpdate:b,onComplete:S,element:x,...D}=this.options,k=new Id({...D,keyframes:o,duration:u,type:h,ease:d,times:p,isGenerator:!0}),O=fa(this.time);v.setWithVelocity(k.sample(O-or).value,k.sample(O).value,or)}const{onStop:g}=this.options;g&&g(),this.cancel()}complete(){const{resolved:i}=this;i&&i.animation.finish()}cancel(){const{resolved:i}=this;i&&i.animation.cancel()}static supports(i){const{motionValue:l,name:o,repeatDelay:u,repeatType:h,damping:d,type:p}=i;if(!l||!l.owner||!(l.owner.current instanceof HTMLElement))return!1;const{onUpdate:g,transformTemplate:v}=l.owner.getProps();return AT()&&o&&xT.has(o)&&!g&&!v&&!u&&h!=="mirror"&&d!==0&&p!=="inertia"}}const wT={type:"spring",stiffness:500,damping:25,restSpeed:10},kT=a=>({type:"spring",stiffness:550,damping:a===0?2*Math.sqrt(550):30,restSpeed:10}),MT={type:"keyframes",duration:.8},RT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},OT=(a,{keyframes:i})=>i.length>2?MT:bs.has(a)?a.startsWith("scale")?kT(i[1]):wT:RT;function BT({when:a,delay:i,delayChildren:l,staggerChildren:o,staggerDirection:u,repeat:h,repeatType:d,repeatDelay:p,from:g,elapsed:v,...b}){return!!Object.keys(b).length}const qd=(a,i,l,o={},u,h)=>d=>{const p=Cd(o,a)||{},g=p.delay||o.delay||0;let{elapsed:v=0}=o;v=v-fa(g);let b={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:i.getVelocity(),...p,delay:-v,onUpdate:x=>{i.set(x),p.onUpdate&&p.onUpdate(x)},onComplete:()=>{d(),p.onComplete&&p.onComplete()},name:a,motionValue:i,element:h?void 0:u};BT(p)||(b={...b,...OT(a,b)}),b.duration&&(b.duration=fa(b.duration)),b.repeatDelay&&(b.repeatDelay=fa(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let S=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(b.duration=0,b.delay===0&&(S=!0)),S&&!h&&i.get()!==void 0){const x=gr(b.keyframes,p);if(x!==void 0)return oe.update(()=>{b.onUpdate(x),b.onComplete()}),new h_([])}return!h&&mg.supports(b)?new mg(b):new Id(b)};function zT({protectedKeys:a,needsAnimating:i},l){const o=a.hasOwnProperty(l)&&i[l]!==!0;return i[l]=!1,o}function C0(a,i,{delay:l=0,transitionOverride:o,type:u}={}){var h;let{transition:d=a.getDefaultTransition(),transitionEnd:p,...g}=i;o&&(d=o);const v=[],b=u&&a.animationState&&a.animationState.getState()[u];for(const S in g){const x=a.getValue(S,(h=a.latestValues[S])!==null&&h!==void 0?h:null),D=g[S];if(D===void 0||b&&zT(b,S))continue;const k={delay:l,...Cd(d||{},S)};let O=!1;if(window.MotionHandoffAnimation){const L=Qv(a);if(L){const Q=window.MotionHandoffAnimation(L,S,oe);Q!==null&&(k.startTime=Q,O=!0)}}Zu(a,S),x.start(qd(S,x,D,a.shouldReduceMotion&&Xv.has(S)?{type:!1}:k,a,O));const Y=x.animation;Y&&v.push(Y)}return p&&Promise.all(v).then(()=>{oe.update(()=>{p&&c_(a,p)})}),v}function td(a,i,l={}){var o;const u=pr(a,i,l.type==="exit"?(o=a.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:h=a.getDefaultTransition()||{}}=u||{};l.transitionOverride&&(h=l.transitionOverride);const d=u?()=>Promise.all(C0(a,u,l)):()=>Promise.resolve(),p=a.variantChildren&&a.variantChildren.size?(v=0)=>{const{delayChildren:b=0,staggerChildren:S,staggerDirection:x}=h;return UT(a,i,b+v,S,x,l)}:()=>Promise.resolve(),{when:g}=h;if(g){const[v,b]=g==="beforeChildren"?[d,p]:[p,d];return v().then(()=>b())}else return Promise.all([d(),p(l.delay)])}function UT(a,i,l=0,o=0,u=1,h){const d=[],p=(a.variantChildren.size-1)*o,g=u===1?(v=0)=>v*o:(v=0)=>p-v*o;return Array.from(a.variantChildren).sort(VT).forEach((v,b)=>{v.notify("AnimationStart",i),d.push(td(v,i,{...h,delay:l+g(b)}).then(()=>v.notify("AnimationComplete",i)))}),Promise.all(d)}function VT(a,i){return a.sortNodePosition(i)}function LT(a,i,l={}){a.notify("AnimationStart",i);let o;if(Array.isArray(i)){const u=i.map(h=>td(a,h,l));o=Promise.all(u)}else if(typeof i=="string")o=td(a,i,l);else{const u=typeof i=="function"?pr(a,i,l.custom):i;o=Promise.all(C0(a,u,l))}return o.then(()=>{a.notify("AnimationComplete",i)})}const HT=gd.length;function D0(a){if(!a)return;if(!a.isControllingVariants){const l=a.parent?D0(a.parent)||{}:{};return a.props.initial!==void 0&&(l.initial=a.props.initial),l}const i={};for(let l=0;l<HT;l++){const o=gd[l],u=a.props[o];(jl(u)||u===!1)&&(i[o]=u)}return i}const GT=[...pd].reverse(),IT=pd.length;function qT(a){return i=>Promise.all(i.map(({animation:l,options:o})=>LT(a,l,o)))}function YT(a){let i=qT(a),l=pg(),o=!0;const u=g=>(v,b)=>{var S;const x=pr(a,b,g==="exit"?(S=a.presenceContext)===null||S===void 0?void 0:S.custom:void 0);if(x){const{transition:D,transitionEnd:k,...O}=x;v={...v,...O,...k}}return v};function h(g){i=g(a)}function d(g){const{props:v}=a,b=D0(a.parent)||{},S=[],x=new Set;let D={},k=1/0;for(let Y=0;Y<IT;Y++){const L=GT[Y],Q=l[L],R=v[L]!==void 0?v[L]:b[L],tt=jl(R),Z=L===g?Q.isActive:null;Z===!1&&(k=Y);let P=R===b[L]&&R!==v[L]&&tt;if(P&&o&&a.manuallyAnimateOnMount&&(P=!1),Q.protectedKeys={...D},!Q.isActive&&Z===null||!R&&!Q.prevProp||hr(R)||typeof R=="boolean")continue;const at=ZT(Q.prevProp,R);let z=at||L===g&&Q.isActive&&!P&&tt||Y>k&&tt,nt=!1;const dt=Array.isArray(R)?R:[R];let yt=dt.reduce(u(L),{});Z===!1&&(yt={});const{prevResolvedValues:zt={}}=Q,$={...zt,...yt},Xt=X=>{z=!0,x.has(X)&&(nt=!0,x.delete(X)),Q.needsAnimating[X]=!0;const rt=a.getValue(X);rt&&(rt.liveStyle=!1)};for(const X in $){const rt=yt[X],bt=zt[X];if(D.hasOwnProperty(X))continue;let Tt=!1;Yu(rt)&&Yu(bt)?Tt=!Zv(rt,bt):Tt=rt!==bt,Tt?rt!=null?Xt(X):x.add(X):rt!==void 0&&x.has(X)?Xt(X):Q.protectedKeys[X]=!0}Q.prevProp=R,Q.prevResolvedValues=yt,Q.isActive&&(D={...D,...yt}),o&&a.blockInitialAnimation&&(z=!1),z&&(!(P&&at)||nt)&&S.push(...dt.map(X=>({animation:X,options:{type:L}})))}if(x.size){const Y={};x.forEach(L=>{const Q=a.getBaseTarget(L),R=a.getValue(L);R&&(R.liveStyle=!0),Y[L]=Q??null}),S.push({animation:Y})}let O=!!S.length;return o&&(v.initial===!1||v.initial===v.animate)&&!a.manuallyAnimateOnMount&&(O=!1),o=!1,O?i(S):Promise.resolve()}function p(g,v){var b;if(l[g].isActive===v)return Promise.resolve();(b=a.variantChildren)===null||b===void 0||b.forEach(x=>{var D;return(D=x.animationState)===null||D===void 0?void 0:D.setActive(g,v)}),l[g].isActive=v;const S=d(g);for(const x in l)l[x].protectedKeys={};return S}return{animateChanges:d,setActive:p,setAnimateFunction:h,getState:()=>l,reset:()=>{l=pg(),o=!0}}}function ZT(a,i){return typeof i=="string"?i!==a:Array.isArray(i)?!Zv(i,a):!1}function hs(a=!1){return{isActive:a,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pg(){return{animate:hs(!0),whileInView:hs(),whileHover:hs(),whileTap:hs(),whileDrag:hs(),whileFocus:hs(),exit:hs()}}class Ka{constructor(i){this.isMounted=!1,this.node=i}update(){}}class XT extends Ka{constructor(i){super(i),i.animationState||(i.animationState=YT(i))}updateAnimationControlsSubscription(){const{animate:i}=this.node.getProps();hr(i)&&(this.unmountControls=i.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:i}=this.node.getProps(),{animate:l}=this.node.prevProps||{};i!==l&&this.updateAnimationControlsSubscription()}unmount(){var i;this.node.animationState.reset(),(i=this.unmountControls)===null||i===void 0||i.call(this)}}let KT=0;class QT extends Ka{constructor(){super(...arguments),this.id=KT++}update(){if(!this.node.presenceContext)return;const{isPresent:i,onExitComplete:l}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||i===o)return;const u=this.node.animationState.setActive("exit",!i);l&&!i&&u.then(()=>l(this.id))}mount(){const{register:i}=this.node.presenceContext||{};i&&(this.unmount=i(this.id))}unmount(){}}const PT={animation:{Feature:XT},exit:{Feature:QT}},zn={x:!1,y:!1};function w0(){return zn.x||zn.y}function FT(a){return a==="x"||a==="y"?zn[a]?null:(zn[a]=!0,()=>{zn[a]=!1}):zn.x||zn.y?null:(zn.x=zn.y=!0,()=>{zn.x=zn.y=!1})}const Yd=a=>a.pointerType==="mouse"?typeof a.button!="number"||a.button<=0:a.isPrimary!==!1;function Cl(a,i,l,o={passive:!0}){return a.addEventListener(i,l,o),()=>a.removeEventListener(i,l)}function Ml(a){return{point:{x:a.pageX,y:a.pageY}}}const JT=a=>i=>Yd(i)&&a(i,Ml(i));function _l(a,i,l,o){return Cl(a,i,JT(l),o)}const gg=(a,i)=>Math.abs(a-i);function $T(a,i){const l=gg(a.x,i.x),o=gg(a.y,i.y);return Math.sqrt(l**2+o**2)}class k0{constructor(i,l,{transformPagePoint:o,contextWindow:u,dragSnapToOrigin:h=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Ou(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,D=$T(S.offset,{x:0,y:0})>=3;if(!x&&!D)return;const{point:k}=S,{timestamp:O}=Ge;this.history.push({...k,timestamp:O});const{onStart:Y,onMove:L}=this.handlers;x||(Y&&Y(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),L&&L(this.lastMoveEvent,S)},this.handlePointerMove=(S,x)=>{this.lastMoveEvent=S,this.lastMoveEventInfo=Ru(x,this.transformPagePoint),oe.update(this.updatePoint,!0)},this.handlePointerUp=(S,x)=>{this.end();const{onEnd:D,onSessionEnd:k,resumeAnimation:O}=this.handlers;if(this.dragSnapToOrigin&&O&&O(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const Y=Ou(S.type==="pointercancel"?this.lastMoveEventInfo:Ru(x,this.transformPagePoint),this.history);this.startEvent&&D&&D(S,Y),k&&k(S,Y)},!Yd(i))return;this.dragSnapToOrigin=h,this.handlers=l,this.transformPagePoint=o,this.contextWindow=u||window;const d=Ml(i),p=Ru(d,this.transformPagePoint),{point:g}=p,{timestamp:v}=Ge;this.history=[{...g,timestamp:v}];const{onSessionStart:b}=l;b&&b(i,Ou(p,this.history)),this.removeListeners=kl(_l(this.contextWindow,"pointermove",this.handlePointerMove),_l(this.contextWindow,"pointerup",this.handlePointerUp),_l(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(i){this.handlers=i}end(){this.removeListeners&&this.removeListeners(),Za(this.updatePoint)}}function Ru(a,i){return i?{point:i(a.point)}:a}function vg(a,i){return{x:a.x-i.x,y:a.y-i.y}}function Ou({point:a},i){return{point:a,delta:vg(a,M0(i)),offset:vg(a,WT(i)),velocity:tx(i,.1)}}function WT(a){return a[0]}function M0(a){return a[a.length-1]}function tx(a,i){if(a.length<2)return{x:0,y:0};let l=a.length-1,o=null;const u=M0(a);for(;l>=0&&(o=a[l],!(u.timestamp-o.timestamp>fa(i)));)l--;if(!o)return{x:0,y:0};const h=ha(u.timestamp-o.timestamp);if(h===0)return{x:0,y:0};const d={x:(u.x-o.x)/h,y:(u.y-o.y)/h};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}const R0=1e-4,ex=1-R0,nx=1+R0,O0=.01,ax=0-O0,sx=0+O0;function yn(a){return a.max-a.min}function ix(a,i,l){return Math.abs(a-i)<=l}function yg(a,i,l,o=.5){a.origin=o,a.originPoint=de(i.min,i.max,a.origin),a.scale=yn(l)/yn(i),a.translate=de(l.min,l.max,a.origin)-a.originPoint,(a.scale>=ex&&a.scale<=nx||isNaN(a.scale))&&(a.scale=1),(a.translate>=ax&&a.translate<=sx||isNaN(a.translate))&&(a.translate=0)}function Tl(a,i,l,o){yg(a.x,i.x,l.x,o?o.originX:void 0),yg(a.y,i.y,l.y,o?o.originY:void 0)}function bg(a,i,l){a.min=l.min+i.min,a.max=a.min+yn(i)}function lx(a,i,l){bg(a.x,i.x,l.x),bg(a.y,i.y,l.y)}function Sg(a,i,l){a.min=i.min-l.min,a.max=a.min+yn(i)}function xl(a,i,l){Sg(a.x,i.x,l.x),Sg(a.y,i.y,l.y)}function ox(a,{min:i,max:l},o){return i!==void 0&&a<i?a=o?de(i,a,o.min):Math.max(a,i):l!==void 0&&a>l&&(a=o?de(l,a,o.max):Math.min(a,l)),a}function _g(a,i,l){return{min:i!==void 0?a.min+i:void 0,max:l!==void 0?a.max+l-(a.max-a.min):void 0}}function rx(a,{top:i,left:l,bottom:o,right:u}){return{x:_g(a.x,l,u),y:_g(a.y,i,o)}}function Tg(a,i){let l=i.min-a.min,o=i.max-a.max;return i.max-i.min<a.max-a.min&&([l,o]=[o,l]),{min:l,max:o}}function cx(a,i){return{x:Tg(a.x,i.x),y:Tg(a.y,i.y)}}function ux(a,i){let l=.5;const o=yn(a),u=yn(i);return u>o?l=pi(i.min,i.max-o,a.min):o>u&&(l=pi(a.min,a.max-u,i.min)),ma(0,1,l)}function dx(a,i){const l={};return i.min!==void 0&&(l.min=i.min-a.min),i.max!==void 0&&(l.max=i.max-a.min),l}const ed=.35;function fx(a=ed){return a===!1?a=0:a===!0&&(a=ed),{x:xg(a,"left","right"),y:xg(a,"top","bottom")}}function xg(a,i,l){return{min:jg(a,i),max:jg(a,l)}}function jg(a,i){return typeof a=="number"?a:a[i]||0}const Ag=()=>({translate:0,scale:1,origin:0,originPoint:0}),di=()=>({x:Ag(),y:Ag()}),Eg=()=>({min:0,max:0}),_e=()=>({x:Eg(),y:Eg()});function wn(a){return[a("x"),a("y")]}function B0({top:a,left:i,right:l,bottom:o}){return{x:{min:i,max:l},y:{min:a,max:o}}}function hx({x:a,y:i}){return{top:i.min,right:a.max,bottom:i.max,left:a.min}}function mx(a,i){if(!i)return a;const l=i({x:a.left,y:a.top}),o=i({x:a.right,y:a.bottom});return{top:l.y,left:l.x,bottom:o.y,right:o.x}}function Bu(a){return a===void 0||a===1}function nd({scale:a,scaleX:i,scaleY:l}){return!Bu(a)||!Bu(i)||!Bu(l)}function ps(a){return nd(a)||z0(a)||a.z||a.rotate||a.rotateX||a.rotateY||a.skewX||a.skewY}function z0(a){return Ng(a.x)||Ng(a.y)}function Ng(a){return a&&a!=="0%"}function rr(a,i,l){const o=a-l,u=i*o;return l+u}function Cg(a,i,l,o,u){return u!==void 0&&(a=rr(a,u,o)),rr(a,l,o)+i}function ad(a,i=0,l=1,o,u){a.min=Cg(a.min,i,l,o,u),a.max=Cg(a.max,i,l,o,u)}function U0(a,{x:i,y:l}){ad(a.x,i.translate,i.scale,i.originPoint),ad(a.y,l.translate,l.scale,l.originPoint)}const Dg=.999999999999,wg=1.0000000000001;function px(a,i,l,o=!1){const u=l.length;if(!u)return;i.x=i.y=1;let h,d;for(let p=0;p<u;p++){h=l[p],d=h.projectionDelta;const{visualElement:g}=h.options;g&&g.props.style&&g.props.style.display==="contents"||(o&&h.options.layoutScroll&&h.scroll&&h!==h.root&&hi(a,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),d&&(i.x*=d.x.scale,i.y*=d.y.scale,U0(a,d)),o&&ps(h.latestValues)&&hi(a,h.latestValues))}i.x<wg&&i.x>Dg&&(i.x=1),i.y<wg&&i.y>Dg&&(i.y=1)}function fi(a,i){a.min=a.min+i,a.max=a.max+i}function kg(a,i,l,o,u=.5){const h=de(a.min,a.max,u);ad(a,i,l,h,o)}function hi(a,i){kg(a.x,i.x,i.scaleX,i.scale,i.originX),kg(a.y,i.y,i.scaleY,i.scale,i.originY)}function V0(a,i){return B0(mx(a.getBoundingClientRect(),i))}function gx(a,i,l){const o=V0(a,l),{scroll:u}=i;return u&&(fi(o.x,u.offset.x),fi(o.y,u.offset.y)),o}const L0=({current:a})=>a?a.ownerDocument.defaultView:null,vx=new WeakMap;class yx{constructor(i){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_e(),this.visualElement=i}start(i,{snapToCursor:l=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const u=b=>{const{dragSnapToOrigin:S}=this.getProps();S?this.pauseAnimation():this.stopAnimation(),l&&this.snapToCursor(Ml(b).point)},h=(b,S)=>{const{drag:x,dragPropagation:D,onDragStart:k}=this.getProps();if(x&&!D&&(this.openDragLock&&this.openDragLock(),this.openDragLock=FT(x),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),wn(Y=>{let L=this.getAxisMotionValue(Y).get()||0;if(Yn.test(L)){const{projection:Q}=this.visualElement;if(Q&&Q.layout){const R=Q.layout.layoutBox[Y];R&&(L=yn(R)*(parseFloat(L)/100))}}this.originPoint[Y]=L}),k&&oe.postRender(()=>k(b,S)),Zu(this.visualElement,"transform");const{animationState:O}=this.visualElement;O&&O.setActive("whileDrag",!0)},d=(b,S)=>{const{dragPropagation:x,dragDirectionLock:D,onDirectionLock:k,onDrag:O}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:Y}=S;if(D&&this.currentDirection===null){this.currentDirection=bx(Y),this.currentDirection!==null&&k&&k(this.currentDirection);return}this.updateAxis("x",S.point,Y),this.updateAxis("y",S.point,Y),this.visualElement.render(),O&&O(b,S)},p=(b,S)=>this.stop(b,S),g=()=>wn(b=>{var S;return this.getAnimationState(b)==="paused"&&((S=this.getAxisMotionValue(b).animation)===null||S===void 0?void 0:S.play())}),{dragSnapToOrigin:v}=this.getProps();this.panSession=new k0(i,{onSessionStart:u,onStart:h,onMove:d,onSessionEnd:p,resumeAnimation:g},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:v,contextWindow:L0(this.visualElement)})}stop(i,l){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:u}=l;this.startAnimation(u);const{onDragEnd:h}=this.getProps();h&&oe.postRender(()=>h(i,l))}cancel(){this.isDragging=!1;const{projection:i,animationState:l}=this.visualElement;i&&(i.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}updateAxis(i,l,o){const{drag:u}=this.getProps();if(!o||!Jo(i,u,this.currentDirection))return;const h=this.getAxisMotionValue(i);let d=this.originPoint[i]+o[i];this.constraints&&this.constraints[i]&&(d=ox(d,this.constraints[i],this.elastic[i])),h.set(d)}resolveConstraints(){var i;const{dragConstraints:l,dragElastic:o}=this.getProps(),u=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)===null||i===void 0?void 0:i.layout,h=this.constraints;l&&ci(l)?this.constraints||(this.constraints=this.resolveRefConstraints()):l&&u?this.constraints=rx(u.layoutBox,l):this.constraints=!1,this.elastic=fx(o),h!==this.constraints&&u&&this.constraints&&!this.hasMutatedConstraints&&wn(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=dx(u.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:i,onMeasureDragConstraints:l}=this.getProps();if(!i||!ci(i))return!1;const o=i.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const h=gx(o,u.root,this.visualElement.getTransformPagePoint());let d=cx(u.layout.layoutBox,h);if(l){const p=l(hx(d));this.hasMutatedConstraints=!!p,p&&(d=B0(p))}return d}startAnimation(i){const{drag:l,dragMomentum:o,dragElastic:u,dragTransition:h,dragSnapToOrigin:d,onDragTransitionEnd:p}=this.getProps(),g=this.constraints||{},v=wn(b=>{if(!Jo(b,l,this.currentDirection))return;let S=g&&g[b]||{};d&&(S={min:0,max:0});const x=u?200:1e6,D=u?40:1e7,k={type:"inertia",velocity:o?i[b]:0,bounceStiffness:x,bounceDamping:D,timeConstant:750,restDelta:1,restSpeed:10,...h,...S};return this.startAxisValueAnimation(b,k)});return Promise.all(v).then(p)}startAxisValueAnimation(i,l){const o=this.getAxisMotionValue(i);return Zu(this.visualElement,i),o.start(qd(i,o,0,l,this.visualElement,!1))}stopAnimation(){wn(i=>this.getAxisMotionValue(i).stop())}pauseAnimation(){wn(i=>{var l;return(l=this.getAxisMotionValue(i).animation)===null||l===void 0?void 0:l.pause()})}getAnimationState(i){var l;return(l=this.getAxisMotionValue(i).animation)===null||l===void 0?void 0:l.state}getAxisMotionValue(i){const l=`_drag${i.toUpperCase()}`,o=this.visualElement.getProps(),u=o[l];return u||this.visualElement.getValue(i,(o.initial?o.initial[i]:void 0)||0)}snapToCursor(i){wn(l=>{const{drag:o}=this.getProps();if(!Jo(l,o,this.currentDirection))return;const{projection:u}=this.visualElement,h=this.getAxisMotionValue(l);if(u&&u.layout){const{min:d,max:p}=u.layout.layoutBox[l];h.set(i[l]-de(d,p,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:i,dragConstraints:l}=this.getProps(),{projection:o}=this.visualElement;if(!ci(l)||!o||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};wn(d=>{const p=this.getAxisMotionValue(d);if(p&&this.constraints!==!1){const g=p.get();u[d]=ux({min:g,max:g},this.constraints[d])}});const{transformTemplate:h}=this.visualElement.getProps();this.visualElement.current.style.transform=h?h({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),wn(d=>{if(!Jo(d,i,null))return;const p=this.getAxisMotionValue(d),{min:g,max:v}=this.constraints[d];p.set(de(g,v,u[d]))})}addListeners(){if(!this.visualElement.current)return;vx.set(this.visualElement,this);const i=this.visualElement.current,l=_l(i,"pointerdown",g=>{const{drag:v,dragListener:b=!0}=this.getProps();v&&b&&this.start(g)}),o=()=>{const{dragConstraints:g}=this.getProps();ci(g)&&g.current&&(this.constraints=this.resolveRefConstraints())},{projection:u}=this.visualElement,h=u.addEventListener("measure",o);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),oe.read(o);const d=Cl(window,"resize",()=>this.scalePositionWithinConstraints()),p=u.addEventListener("didUpdate",(({delta:g,hasLayoutChanged:v})=>{this.isDragging&&v&&(wn(b=>{const S=this.getAxisMotionValue(b);S&&(this.originPoint[b]+=g[b].translate,S.set(S.get()+g[b].translate))}),this.visualElement.render())}));return()=>{d(),l(),h(),p&&p()}}getProps(){const i=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:o=!1,dragPropagation:u=!1,dragConstraints:h=!1,dragElastic:d=ed,dragMomentum:p=!0}=i;return{...i,drag:l,dragDirectionLock:o,dragPropagation:u,dragConstraints:h,dragElastic:d,dragMomentum:p}}}function Jo(a,i,l){return(i===!0||i===a)&&(l===null||l===a)}function bx(a,i=10){let l=null;return Math.abs(a.y)>i?l="y":Math.abs(a.x)>i&&(l="x"),l}class Sx extends Ka{constructor(i){super(i),this.removeGroupControls=gn,this.removeListeners=gn,this.controls=new yx(i)}mount(){const{dragControls:i}=this.node.getProps();i&&(this.removeGroupControls=i.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Mg=a=>(i,l)=>{a&&oe.postRender(()=>a(i,l))};class _x extends Ka{constructor(){super(...arguments),this.removePointerDownListener=gn}onPointerDown(i){this.session=new k0(i,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:L0(this.node)})}createPanHandlers(){const{onPanSessionStart:i,onPanStart:l,onPan:o,onPanEnd:u}=this.node.getProps();return{onSessionStart:Mg(i),onStart:Mg(l),onMove:o,onEnd:(h,d)=>{delete this.session,u&&oe.postRender(()=>u(h,d))}}}mount(){this.removePointerDownListener=_l(this.node.current,"pointerdown",i=>this.onPointerDown(i))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const er={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Rg(a,i){return i.max===i.min?0:a/(i.max-i.min)*100}const ml={correct:(a,i)=>{if(!i.target)return a;if(typeof a=="string")if(xt.test(a))a=parseFloat(a);else return a;const l=Rg(a,i.target.x),o=Rg(a,i.target.y);return`${l}% ${o}%`}},Tx={correct:(a,{treeScale:i,projectionDelta:l})=>{const o=a,u=Xa.parse(a);if(u.length>5)return o;const h=Xa.createTransformer(a),d=typeof u[0]!="number"?1:0,p=l.x.scale*i.x,g=l.y.scale*i.y;u[0+d]/=p,u[1+d]/=g;const v=de(p,g,.5);return typeof u[2+d]=="number"&&(u[2+d]/=v),typeof u[3+d]=="number"&&(u[3+d]/=v),h(u)}};class xx extends _.Component{componentDidMount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:o,layoutId:u}=this.props,{projection:h}=i;PS(jx),h&&(l.group&&l.group.add(h),o&&o.register&&u&&o.register(h),h.root.didUpdate(),h.addEventListener("animationComplete",()=>{this.safeToRemove()}),h.setOptions({...h.options,onExitComplete:()=>this.safeToRemove()})),er.hasEverUpdated=!0}getSnapshotBeforeUpdate(i){const{layoutDependency:l,visualElement:o,drag:u,isPresent:h}=this.props,d=o.projection;return d&&(d.isPresent=h,u||i.layoutDependency!==l||l===void 0?d.willUpdate():this.safeToRemove(),i.isPresent!==h&&(h?d.promote():d.relegate()||oe.postRender(()=>{const p=d.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:i}=this.props.visualElement;i&&(i.root.didUpdate(),yd.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:o}=this.props,{projection:u}=i;u&&(u.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(u),o&&o.deregister&&o.deregister(u))}safeToRemove(){const{safeToRemove:i}=this.props;i&&i()}render(){return null}}function H0(a){const[i,l]=jv(),o=_.useContext(dd);return f.jsx(xx,{...a,layoutGroup:o,switchLayoutGroup:_.useContext(Mv),isPresent:i,safeToRemove:l})}const jx={borderRadius:{...ml,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ml,borderTopRightRadius:ml,borderBottomLeftRadius:ml,borderBottomRightRadius:ml,boxShadow:Tx};function Ax(a,i,l){const o=Ye(a)?a:El(a);return o.start(qd("",o,i,l)),o.animation}function Ex(a){return a instanceof SVGElement&&a.tagName!=="svg"}const Nx=(a,i)=>a.depth-i.depth;class Cx{constructor(){this.children=[],this.isDirty=!1}add(i){Dd(this.children,i),this.isDirty=!0}remove(i){wd(this.children,i),this.isDirty=!0}forEach(i){this.isDirty&&this.children.sort(Nx),this.isDirty=!1,this.children.forEach(i)}}function Dx(a,i){const l=Zn.now(),o=({timestamp:u})=>{const h=u-l;h>=i&&(Za(o),a(h-i))};return oe.read(o,!0),()=>Za(o)}const G0=["TopLeft","TopRight","BottomLeft","BottomRight"],wx=G0.length,Og=a=>typeof a=="string"?parseFloat(a):a,Bg=a=>typeof a=="number"||xt.test(a);function kx(a,i,l,o,u,h){u?(a.opacity=de(0,l.opacity!==void 0?l.opacity:1,Mx(o)),a.opacityExit=de(i.opacity!==void 0?i.opacity:1,0,Rx(o))):h&&(a.opacity=de(i.opacity!==void 0?i.opacity:1,l.opacity!==void 0?l.opacity:1,o));for(let d=0;d<wx;d++){const p=`border${G0[d]}Radius`;let g=zg(i,p),v=zg(l,p);if(g===void 0&&v===void 0)continue;g||(g=0),v||(v=0),g===0||v===0||Bg(g)===Bg(v)?(a[p]=Math.max(de(Og(g),Og(v),o),0),(Yn.test(v)||Yn.test(g))&&(a[p]+="%")):a[p]=v}(i.rotate||l.rotate)&&(a.rotate=de(i.rotate||0,l.rotate||0,o))}function zg(a,i){return a[i]!==void 0?a[i]:a.borderRadius}const Mx=I0(0,.5,s0),Rx=I0(.5,.95,gn);function I0(a,i,l){return o=>o<a?0:o>i?1:l(pi(a,i,o))}function Ug(a,i){a.min=i.min,a.max=i.max}function Dn(a,i){Ug(a.x,i.x),Ug(a.y,i.y)}function Vg(a,i){a.translate=i.translate,a.scale=i.scale,a.originPoint=i.originPoint,a.origin=i.origin}function Lg(a,i,l,o,u){return a-=i,a=rr(a,1/l,o),u!==void 0&&(a=rr(a,1/u,o)),a}function Ox(a,i=0,l=1,o=.5,u,h=a,d=a){if(Yn.test(i)&&(i=parseFloat(i),i=de(d.min,d.max,i/100)-d.min),typeof i!="number")return;let p=de(h.min,h.max,o);a===h&&(p-=i),a.min=Lg(a.min,i,l,p,u),a.max=Lg(a.max,i,l,p,u)}function Hg(a,i,[l,o,u],h,d){Ox(a,i[l],i[o],i[u],i.scale,h,d)}const Bx=["x","scaleX","originX"],zx=["y","scaleY","originY"];function Gg(a,i,l,o){Hg(a.x,i,Bx,l?l.x:void 0,o?o.x:void 0),Hg(a.y,i,zx,l?l.y:void 0,o?o.y:void 0)}function Ig(a){return a.translate===0&&a.scale===1}function q0(a){return Ig(a.x)&&Ig(a.y)}function qg(a,i){return a.min===i.min&&a.max===i.max}function Ux(a,i){return qg(a.x,i.x)&&qg(a.y,i.y)}function Yg(a,i){return Math.round(a.min)===Math.round(i.min)&&Math.round(a.max)===Math.round(i.max)}function Y0(a,i){return Yg(a.x,i.x)&&Yg(a.y,i.y)}function Zg(a){return yn(a.x)/yn(a.y)}function Xg(a,i){return a.translate===i.translate&&a.scale===i.scale&&a.originPoint===i.originPoint}class Vx{constructor(){this.members=[]}add(i){Dd(this.members,i),i.scheduleRender()}remove(i){if(wd(this.members,i),i===this.prevLead&&(this.prevLead=void 0),i===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(i){const l=this.members.findIndex(u=>i===u);if(l===0)return!1;let o;for(let u=l;u>=0;u--){const h=this.members[u];if(h.isPresent!==!1){o=h;break}}return o?(this.promote(o),!0):!1}promote(i,l){const o=this.lead;if(i!==o&&(this.prevLead=o,this.lead=i,i.show(),o)){o.instance&&o.scheduleRender(),i.scheduleRender(),i.resumeFrom=o,l&&(i.resumeFrom.preserveOpacity=!0),o.snapshot&&(i.snapshot=o.snapshot,i.snapshot.latestValues=o.animationValues||o.latestValues),i.root&&i.root.isUpdating&&(i.isLayoutDirty=!0);const{crossfade:u}=i.options;u===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(i=>{const{options:l,resumingFrom:o}=i;l.onExitComplete&&l.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(i=>{i.instance&&i.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Lx(a,i,l){let o="";const u=a.x.translate/i.x,h=a.y.translate/i.y,d=(l==null?void 0:l.z)||0;if((u||h||d)&&(o=`translate3d(${u}px, ${h}px, ${d}px) `),(i.x!==1||i.y!==1)&&(o+=`scale(${1/i.x}, ${1/i.y}) `),l){const{transformPerspective:v,rotate:b,rotateX:S,rotateY:x,skewX:D,skewY:k}=l;v&&(o=`perspective(${v}px) ${o}`),b&&(o+=`rotate(${b}deg) `),S&&(o+=`rotateX(${S}deg) `),x&&(o+=`rotateY(${x}deg) `),D&&(o+=`skewX(${D}deg) `),k&&(o+=`skewY(${k}deg) `)}const p=a.x.scale*i.x,g=a.y.scale*i.y;return(p!==1||g!==1)&&(o+=`scale(${p}, ${g})`),o||"none"}const gs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},vl=typeof window<"u"&&window.MotionDebug!==void 0,zu=["","X","Y","Z"],Hx={visibility:"hidden"},Kg=1e3;let Gx=0;function Uu(a,i,l,o){const{latestValues:u}=i;u[a]&&(l[a]=u[a],i.setStaticValue(a,0),o&&(o[a]=0))}function Z0(a){if(a.hasCheckedOptimisedAppear=!0,a.root===a)return;const{visualElement:i}=a.options;if(!i)return;const l=Qv(i);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:u,layoutId:h}=a.options;window.MotionCancelOptimisedAnimation(l,"transform",oe,!(u||h))}const{parent:o}=a;o&&!o.hasCheckedOptimisedAppear&&Z0(o)}function X0({attachResizeListener:a,defaultParent:i,measureScroll:l,checkIsScrollRoot:o,resetTransform:u}){return class{constructor(d={},p=i==null?void 0:i()){this.id=Gx++,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,vl&&(gs.totalNodes=gs.resolvedTargetDeltas=gs.recalculatedProjection=0),this.nodes.forEach(Yx),this.nodes.forEach(Px),this.nodes.forEach(Fx),this.nodes.forEach(Zx),vl&&window.MotionDebug.record(gs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let g=0;g<this.path.length;g++)this.path[g].shouldResetTransform=!0;this.root===this&&(this.nodes=new Cx)}addEventListener(d,p){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new kd),this.eventHandlers.get(d).add(p)}notifyListeners(d,...p){const g=this.eventHandlers.get(d);g&&g.notify(...p)}hasListeners(d){return this.eventHandlers.has(d)}mount(d,p=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Ex(d),this.instance=d;const{layoutId:g,layout:v,visualElement:b}=this.options;if(b&&!b.current&&b.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),p&&(v||g)&&(this.isLayoutDirty=!0),a){let S;const x=()=>this.root.updateBlockedByResize=!1;a(d,()=>{this.root.updateBlockedByResize=!0,S&&S(),S=Dx(x,250),er.hasAnimatedSinceResize&&(er.hasAnimatedSinceResize=!1,this.nodes.forEach(Pg))})}g&&this.root.registerSharedNode(g,this),this.options.animate!==!1&&b&&(g||v)&&this.addEventListener("didUpdate",({delta:S,hasLayoutChanged:x,hasRelativeTargetChanged:D,layout:k})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const O=this.options.transition||b.getDefaultTransition()||e2,{onLayoutAnimationStart:Y,onLayoutAnimationComplete:L}=b.getProps(),Q=!this.targetLayout||!Y0(this.targetLayout,k)||D,R=!x&&D;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||R||x&&(Q||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(S,R);const tt={...Cd(O,"layout"),onPlay:Y,onComplete:L};(b.shouldReduceMotion||this.options.layoutRoot)&&(tt.delay=0,tt.type=!1),this.startAnimation(tt)}else x||Pg(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=k})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Za(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(Jx),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Z0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const S=this.path[b];S.shouldResetTransform=!0,S.updateScroll("snapshot"),S.options.layoutRoot&&S.willUpdate(!1)}const{layoutId:p,layout:g}=this.options;if(p===void 0&&!g)return;const v=this.getTransformTemplate();this.prevTransformTemplateValue=v?v(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Qg);return}this.isUpdating||this.nodes.forEach(Kx),this.isUpdating=!1,this.nodes.forEach(Qx),this.nodes.forEach(Ix),this.nodes.forEach(qx),this.clearAllSnapshots();const p=Zn.now();Ge.delta=ma(0,1e3/60,p-Ge.timestamp),Ge.timestamp=p,Ge.isProcessing=!0,Cu.update.process(Ge),Cu.preRender.process(Ge),Cu.render.process(Ge),Ge.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Xx),this.sharedNodes.forEach($x)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,oe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){oe.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 g=0;g<this.path.length;g++)this.path[g].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutCorrected=_e(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(p=!1),p){const g=o(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:g,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:g}}}resetTransform(){if(!u)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!q0(this.projectionDelta),g=this.getTransformTemplate(),v=g?g(this.latestValues,""):void 0,b=v!==this.prevTransformTemplateValue;d&&(p||ps(this.latestValues)||b)&&(u(this.instance,v),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const p=this.measurePageBox();let g=this.removeElementScroll(p);return d&&(g=this.removeTransform(g)),n2(g),{animationId:this.root.animationId,measuredBox:p,layoutBox:g,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:p}=this.options;if(!p)return _e();const g=p.measureViewportBox();if(!(((d=this.scroll)===null||d===void 0?void 0:d.wasRoot)||this.path.some(a2))){const{scroll:b}=this.root;b&&(fi(g.x,b.offset.x),fi(g.y,b.offset.y))}return g}removeElementScroll(d){var p;const g=_e();if(Dn(g,d),!((p=this.scroll)===null||p===void 0)&&p.wasRoot)return g;for(let v=0;v<this.path.length;v++){const b=this.path[v],{scroll:S,options:x}=b;b!==this.root&&S&&x.layoutScroll&&(S.wasRoot&&Dn(g,d),fi(g.x,S.offset.x),fi(g.y,S.offset.y))}return g}applyTransform(d,p=!1){const g=_e();Dn(g,d);for(let v=0;v<this.path.length;v++){const b=this.path[v];!p&&b.options.layoutScroll&&b.scroll&&b!==b.root&&hi(g,{x:-b.scroll.offset.x,y:-b.scroll.offset.y}),ps(b.latestValues)&&hi(g,b.latestValues)}return ps(this.latestValues)&&hi(g,this.latestValues),g}removeTransform(d){const p=_e();Dn(p,d);for(let g=0;g<this.path.length;g++){const v=this.path[g];if(!v.instance||!ps(v.latestValues))continue;nd(v.latestValues)&&v.updateSnapshot();const b=_e(),S=v.measurePageBox();Dn(b,S),Gg(p,v.latestValues,v.snapshot?v.snapshot.layoutBox:void 0,b)}return ps(this.latestValues)&&Gg(p,this.latestValues),p}setTargetDelta(d){this.targetDelta=d,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(d){this.options={...this.options,...d,crossfade:d.crossfade!==void 0?d.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!==Ge.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){var p;const g=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=g.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=g.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=g.isSharedProjectionDirty);const v=!!this.resumingFrom||this!==g;if(!(d||v&&this.isSharedProjectionDirty||this.isProjectionDirty||!((p=this.parent)===null||p===void 0)&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:S,layoutId:x}=this.options;if(!(!this.layout||!(S||x))){if(this.resolvedRelativeTargetAt=Ge.timestamp,!this.targetDelta&&!this.relativeTarget){const D=this.getClosestProjectingParent();D&&D.layout&&this.animationProgress!==1?(this.relativeParent=D,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_e(),this.relativeTargetOrigin=_e(),xl(this.relativeTargetOrigin,this.layout.layoutBox,D.layout.layoutBox),Dn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=_e(),this.targetWithTransforms=_e()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lx(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Dn(this.target,this.layout.layoutBox),U0(this.target,this.targetDelta)):Dn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const D=this.getClosestProjectingParent();D&&!!D.resumingFrom==!!this.resumingFrom&&!D.options.layoutScroll&&D.target&&this.animationProgress!==1?(this.relativeParent=D,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_e(),this.relativeTargetOrigin=_e(),xl(this.relativeTargetOrigin,this.target,D.target),Dn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}vl&&gs.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||nd(this.parent.latestValues)||z0(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 d;const p=this.getLead(),g=!!this.resumingFrom||this!==p;let v=!0;if((this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty)&&(v=!1),g&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(v=!1),this.resolvedRelativeTargetAt===Ge.timestamp&&(v=!1),v)return;const{layout:b,layoutId:S}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(b||S))return;Dn(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,D=this.treeScale.y;px(this.layoutCorrected,this.treeScale,this.path,g),p.layout&&!p.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(p.target=p.layout.layoutBox,p.targetWithTransforms=_e());const{target:k}=p;if(!k){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Vg(this.prevProjectionDelta.x,this.projectionDelta.x),Vg(this.prevProjectionDelta.y,this.projectionDelta.y)),Tl(this.projectionDelta,this.layoutCorrected,k,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==D||!Xg(this.projectionDelta.x,this.prevProjectionDelta.x)||!Xg(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",k)),vl&&gs.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){var p;if((p=this.options.visualElement)===null||p===void 0||p.scheduleRender(),d){const g=this.getStack();g&&g.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=di(),this.projectionDelta=di(),this.projectionDeltaWithTransform=di()}setAnimationOrigin(d,p=!1){const g=this.snapshot,v=g?g.latestValues:{},b={...this.latestValues},S=di();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const x=_e(),D=g?g.source:void 0,k=this.layout?this.layout.source:void 0,O=D!==k,Y=this.getStack(),L=!Y||Y.members.length<=1,Q=!!(O&&!L&&this.options.crossfade===!0&&!this.path.some(t2));this.animationProgress=0;let R;this.mixTargetDelta=tt=>{const Z=tt/1e3;Fg(S.x,d.x,Z),Fg(S.y,d.y,Z),this.setTargetDelta(S),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xl(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Wx(this.relativeTarget,this.relativeTargetOrigin,x,Z),R&&Ux(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=_e()),Dn(R,this.relativeTarget)),O&&(this.animationValues=b,kx(b,v,this.latestValues,Z,Q,L)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=Z},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Za(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=oe.update(()=>{er.hasAnimatedSinceResize=!0,this.currentAnimation=Ax(0,Kg,{...d,onUpdate:p=>{this.mixTargetDelta(p),d.onUpdate&&d.onUpdate(p)},onComplete:()=>{d.onComplete&&d.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 d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Kg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:p,target:g,layout:v,latestValues:b}=d;if(!(!p||!g||!v)){if(this!==d&&this.layout&&v&&K0(this.options.animationType,this.layout.layoutBox,v.layoutBox)){g=this.target||_e();const S=yn(this.layout.layoutBox.x);g.x.min=d.target.x.min,g.x.max=g.x.min+S;const x=yn(this.layout.layoutBox.y);g.y.min=d.target.y.min,g.y.max=g.y.min+x}Dn(p,g),hi(p,b),Tl(this.projectionDeltaWithTransform,this.layoutCorrected,p,b)}}registerSharedNode(d,p){this.sharedNodes.has(d)||this.sharedNodes.set(d,new Vx),this.sharedNodes.get(d).add(p);const v=p.options.initialPromotionConfig;p.promote({transition:v?v.transition:void 0,preserveFollowOpacity:v&&v.shouldPreserveFollowOpacity?v.shouldPreserveFollowOpacity(p):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){var d;const{layoutId:p}=this.options;return p?((d=this.getStack())===null||d===void 0?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:p}=this.options;return p?(d=this.getStack())===null||d===void 0?void 0:d.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:p,preserveFollowOpacity:g}={}){const v=this.getStack();v&&v.promote(this,g),d&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let p=!1;const{latestValues:g}=d;if((g.z||g.rotate||g.rotateX||g.rotateY||g.rotateZ||g.skewX||g.skewY)&&(p=!0),!p)return;const v={};g.z&&Uu("z",d,v,this.animationValues);for(let b=0;b<zu.length;b++)Uu(`rotate${zu[b]}`,d,v,this.animationValues),Uu(`skew${zu[b]}`,d,v,this.animationValues);d.render();for(const b in v)d.setStaticValue(b,v[b]),this.animationValues&&(this.animationValues[b]=v[b]);d.scheduleRender()}getProjectionStyles(d){var p,g;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Hx;const v={visibility:""},b=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,v.opacity="",v.pointerEvents=Wo(d==null?void 0:d.pointerEvents)||"",v.transform=b?b(this.latestValues,""):"none",v;const S=this.getLead();if(!this.projectionDelta||!this.layout||!S.target){const O={};return this.options.layoutId&&(O.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,O.pointerEvents=Wo(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!ps(this.latestValues)&&(O.transform=b?b({},""):"none",this.hasProjected=!1),O}const x=S.animationValues||S.latestValues;this.applyTransformsToTarget(),v.transform=Lx(this.projectionDeltaWithTransform,this.treeScale,x),b&&(v.transform=b(x,v.transform));const{x:D,y:k}=this.projectionDelta;v.transformOrigin=`${D.origin*100}% ${k.origin*100}% 0`,S.animationValues?v.opacity=S===this?(g=(p=x.opacity)!==null&&p!==void 0?p:this.latestValues.opacity)!==null&&g!==void 0?g:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:v.opacity=S===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const O in ar){if(x[O]===void 0)continue;const{correct:Y,applyTo:L}=ar[O],Q=v.transform==="none"?x[O]:Y(x[O],S);if(L){const R=L.length;for(let tt=0;tt<R;tt++)v[L[tt]]=Q}else v[O]=Q}return this.options.layoutId&&(v.pointerEvents=S===this?Wo(d==null?void 0:d.pointerEvents)||"":"none"),v}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>{var p;return(p=d.currentAnimation)===null||p===void 0?void 0:p.stop()}),this.root.nodes.forEach(Qg),this.root.sharedNodes.clear()}}}function Ix(a){a.updateLayout()}function qx(a){var i;const l=((i=a.resumeFrom)===null||i===void 0?void 0:i.snapshot)||a.snapshot;if(a.isLead()&&a.layout&&l&&a.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:u}=a.layout,{animationType:h}=a.options,d=l.source!==a.layout.source;h==="size"?wn(S=>{const x=d?l.measuredBox[S]:l.layoutBox[S],D=yn(x);x.min=o[S].min,x.max=x.min+D}):K0(h,l.layoutBox,o)&&wn(S=>{const x=d?l.measuredBox[S]:l.layoutBox[S],D=yn(o[S]);x.max=x.min+D,a.relativeTarget&&!a.currentAnimation&&(a.isProjectionDirty=!0,a.relativeTarget[S].max=a.relativeTarget[S].min+D)});const p=di();Tl(p,o,l.layoutBox);const g=di();d?Tl(g,a.applyTransform(u,!0),l.measuredBox):Tl(g,o,l.layoutBox);const v=!q0(p);let b=!1;if(!a.resumeFrom){const S=a.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:x,layout:D}=S;if(x&&D){const k=_e();xl(k,l.layoutBox,x.layoutBox);const O=_e();xl(O,o,D.layoutBox),Y0(k,O)||(b=!0),S.options.layoutRoot&&(a.relativeTarget=O,a.relativeTargetOrigin=k,a.relativeParent=S)}}}a.notifyListeners("didUpdate",{layout:o,snapshot:l,delta:g,layoutDelta:p,hasLayoutChanged:v,hasRelativeTargetChanged:b})}else if(a.isLead()){const{onExitComplete:o}=a.options;o&&o()}a.options.transition=void 0}function Yx(a){vl&&gs.totalNodes++,a.parent&&(a.isProjecting()||(a.isProjectionDirty=a.parent.isProjectionDirty),a.isSharedProjectionDirty||(a.isSharedProjectionDirty=!!(a.isProjectionDirty||a.parent.isProjectionDirty||a.parent.isSharedProjectionDirty)),a.isTransformDirty||(a.isTransformDirty=a.parent.isTransformDirty))}function Zx(a){a.isProjectionDirty=a.isSharedProjectionDirty=a.isTransformDirty=!1}function Xx(a){a.clearSnapshot()}function Qg(a){a.clearMeasurements()}function Kx(a){a.isLayoutDirty=!1}function Qx(a){const{visualElement:i}=a.options;i&&i.getProps().onBeforeLayoutMeasure&&i.notify("BeforeLayoutMeasure"),a.resetTransform()}function Pg(a){a.finishAnimation(),a.targetDelta=a.relativeTarget=a.target=void 0,a.isProjectionDirty=!0}function Px(a){a.resolveTargetDelta()}function Fx(a){a.calcProjection()}function Jx(a){a.resetSkewAndRotation()}function $x(a){a.removeLeadSnapshot()}function Fg(a,i,l){a.translate=de(i.translate,0,l),a.scale=de(i.scale,1,l),a.origin=i.origin,a.originPoint=i.originPoint}function Jg(a,i,l,o){a.min=de(i.min,l.min,o),a.max=de(i.max,l.max,o)}function Wx(a,i,l,o){Jg(a.x,i.x,l.x,o),Jg(a.y,i.y,l.y,o)}function t2(a){return a.animationValues&&a.animationValues.opacityExit!==void 0}const e2={duration:.45,ease:[.4,0,.1,1]},$g=a=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(a),Wg=$g("applewebkit/")&&!$g("chrome/")?Math.round:gn;function tv(a){a.min=Wg(a.min),a.max=Wg(a.max)}function n2(a){tv(a.x),tv(a.y)}function K0(a,i,l){return a==="position"||a==="preserve-aspect"&&!ix(Zg(i),Zg(l),.2)}function a2(a){var i;return a!==a.root&&((i=a.scroll)===null||i===void 0?void 0:i.wasRoot)}const s2=X0({attachResizeListener:(a,i)=>Cl(a,"resize",i),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vu={current:void 0},Q0=X0({measureScroll:a=>({x:a.scrollLeft,y:a.scrollTop}),defaultParent:()=>{if(!Vu.current){const a=new s2({});a.mount(window),a.setOptions({layoutScroll:!0}),Vu.current=a}return Vu.current},resetTransform:(a,i)=>{a.style.transform=i!==void 0?i:"none"},checkIsScrollRoot:a=>window.getComputedStyle(a).position==="fixed"}),i2={pan:{Feature:_x},drag:{Feature:Sx,ProjectionNode:Q0,MeasureLayout:H0}};function l2(a,i,l){var o;if(a instanceof Element)return[a];if(typeof a=="string"){let u=document;const h=(o=void 0)!==null&&o!==void 0?o:u.querySelectorAll(a);return h?Array.from(h):[]}return Array.from(a)}function P0(a,i){const l=l2(a),o=new AbortController,u={passive:!0,...i,signal:o.signal};return[l,u,()=>o.abort()]}function ev(a){return i=>{i.pointerType==="touch"||w0()||a(i)}}function o2(a,i,l={}){const[o,u,h]=P0(a,l),d=ev(p=>{const{target:g}=p,v=i(p);if(typeof v!="function"||!g)return;const b=ev(S=>{v(S),g.removeEventListener("pointerleave",b)});g.addEventListener("pointerleave",b,u)});return o.forEach(p=>{p.addEventListener("pointerenter",d,u)}),h}function nv(a,i,l){const{props:o}=a;a.animationState&&o.whileHover&&a.animationState.setActive("whileHover",l==="Start");const u="onHover"+l,h=o[u];h&&oe.postRender(()=>h(i,Ml(i)))}class r2 extends Ka{mount(){const{current:i}=this.node;i&&(this.unmount=o2(i,l=>(nv(this.node,l,"Start"),o=>nv(this.node,o,"End"))))}unmount(){}}class c2 extends Ka{constructor(){super(...arguments),this.isActive=!1}onFocus(){let i=!1;try{i=this.node.current.matches(":focus-visible")}catch{i=!0}!i||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=kl(Cl(this.node.current,"focus",()=>this.onFocus()),Cl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const F0=(a,i)=>i?a===i?!0:F0(a,i.parentElement):!1,u2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function d2(a){return u2.has(a.tagName)||a.tabIndex!==-1}const yl=new WeakSet;function av(a){return i=>{i.key==="Enter"&&a(i)}}function Lu(a,i){a.dispatchEvent(new PointerEvent("pointer"+i,{isPrimary:!0,bubbles:!0}))}const f2=(a,i)=>{const l=a.currentTarget;if(!l)return;const o=av(()=>{if(yl.has(l))return;Lu(l,"down");const u=av(()=>{Lu(l,"up")}),h=()=>Lu(l,"cancel");l.addEventListener("keyup",u,i),l.addEventListener("blur",h,i)});l.addEventListener("keydown",o,i),l.addEventListener("blur",()=>l.removeEventListener("keydown",o),i)};function sv(a){return Yd(a)&&!w0()}function h2(a,i,l={}){const[o,u,h]=P0(a,l),d=p=>{const g=p.currentTarget;if(!sv(p)||yl.has(g))return;yl.add(g);const v=i(p),b=(D,k)=>{window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",x),!(!sv(D)||!yl.has(g))&&(yl.delete(g),typeof v=="function"&&v(D,{success:k}))},S=D=>{b(D,l.useGlobalTarget||F0(g,D.target))},x=D=>{b(D,!1)};window.addEventListener("pointerup",S,u),window.addEventListener("pointercancel",x,u)};return o.forEach(p=>{!d2(p)&&p.getAttribute("tabindex")===null&&(p.tabIndex=0),(l.useGlobalTarget?window:p).addEventListener("pointerdown",d,u),p.addEventListener("focus",v=>f2(v,u),u)}),h}function iv(a,i,l){const{props:o}=a;a.animationState&&o.whileTap&&a.animationState.setActive("whileTap",l==="Start");const u="onTap"+(l==="End"?"":l),h=o[u];h&&oe.postRender(()=>h(i,Ml(i)))}class m2 extends Ka{mount(){const{current:i}=this.node;i&&(this.unmount=h2(i,l=>(iv(this.node,l,"Start"),(o,{success:u})=>iv(this.node,o,u?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const sd=new WeakMap,Hu=new WeakMap,p2=a=>{const i=sd.get(a.target);i&&i(a)},g2=a=>{a.forEach(p2)};function v2({root:a,...i}){const l=a||document;Hu.has(l)||Hu.set(l,{});const o=Hu.get(l),u=JSON.stringify(i);return o[u]||(o[u]=new IntersectionObserver(g2,{root:a,...i})),o[u]}function y2(a,i,l){const o=v2(i);return sd.set(a,l),o.observe(a),()=>{sd.delete(a),o.unobserve(a)}}const b2={some:0,all:1};class S2 extends Ka{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:i={}}=this.node.getProps(),{root:l,margin:o,amount:u="some",once:h}=i,d={root:l?l.current:void 0,rootMargin:o,threshold:typeof u=="number"?u:b2[u]},p=g=>{const{isIntersecting:v}=g;if(this.isInView===v||(this.isInView=v,h&&!v&&this.hasEnteredView))return;v&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",v);const{onViewportEnter:b,onViewportLeave:S}=this.node.getProps(),x=v?b:S;x&&x(g)};return y2(this.node.current,d,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:i,prevProps:l}=this.node;["amount","margin","root"].some(_2(i,l))&&this.startObserver()}unmount(){}}function _2({viewport:a={}},{viewport:i={}}={}){return l=>a[l]!==i[l]}const T2={inView:{Feature:S2},tap:{Feature:m2},focus:{Feature:c2},hover:{Feature:r2}},x2={layout:{ProjectionNode:Q0,MeasureLayout:H0}},id={current:null},J0={current:!1};function j2(){if(J0.current=!0,!!md)if(window.matchMedia){const a=window.matchMedia("(prefers-reduced-motion)"),i=()=>id.current=a.matches;a.addListener(i),i()}else id.current=!1}const A2=[...y0,qe,Xa],E2=a=>A2.find(v0(a)),lv=new WeakMap;function N2(a,i,l){for(const o in i){const u=i[o],h=l[o];if(Ye(u))a.addValue(o,u);else if(Ye(h))a.addValue(o,El(u,{owner:a}));else if(h!==u)if(a.hasValue(o)){const d=a.getValue(o);d.liveStyle===!0?d.jump(u):d.hasAnimated||d.set(u)}else{const d=a.getStaticValue(o);a.addValue(o,El(d!==void 0?d:u,{owner:a}))}}for(const o in l)i[o]===void 0&&a.removeValue(o);return i}const ov=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class C2{scrapeMotionValuesFromProps(i,l,o){return{}}constructor({parent:i,props:l,presenceContext:o,reducedMotionConfig:u,blockInitialAnimation:h,visualState:d},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Hd,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 D=Zn.now();this.renderScheduledAt<D&&(this.renderScheduledAt=D,oe.render(this.render,!1,!0))};const{latestValues:g,renderState:v,onUpdate:b}=d;this.onUpdate=b,this.latestValues=g,this.baseTarget={...g},this.initialValues=l.initial?{...g}:{},this.renderState=v,this.parent=i,this.props=l,this.presenceContext=o,this.depth=i?i.depth+1:0,this.reducedMotionConfig=u,this.options=p,this.blockInitialAnimation=!!h,this.isControllingVariants=mr(l),this.isVariantNode=wv(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(i&&i.current);const{willChange:S,...x}=this.scrapeMotionValuesFromProps(l,{},this);for(const D in x){const k=x[D];g[D]!==void 0&&Ye(k)&&k.set(g[D],!1)}}mount(i){this.current=i,lv.set(i,this),this.projection&&!this.projection.instance&&this.projection.mount(i),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((l,o)=>this.bindToMotionValue(o,l)),J0.current||j2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:id.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){lv.delete(this.current),this.projection&&this.projection.unmount(),Za(this.notifyUpdate),Za(this.render),this.valueSubscriptions.forEach(i=>i()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const i in this.events)this.events[i].clear();for(const i in this.features){const l=this.features[i];l&&(l.unmount(),l.isMounted=!1)}this.current=null}bindToMotionValue(i,l){this.valueSubscriptions.has(i)&&this.valueSubscriptions.get(i)();const o=bs.has(i),u=l.on("change",p=>{this.latestValues[i]=p,this.props.onUpdate&&oe.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),h=l.on("renderRequest",this.scheduleRender);let d;window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,i,l)),this.valueSubscriptions.set(i,()=>{u(),h(),d&&d(),l.owner&&l.stop()})}sortNodePosition(i){return!this.current||!this.sortInstanceNodePosition||this.type!==i.type?0:this.sortInstanceNodePosition(this.current,i.current)}updateFeatures(){let i="animation";for(i in mi){const l=mi[i];if(!l)continue;const{isEnabled:o,Feature:u}=l;if(!this.features[i]&&u&&o(this.props)&&(this.features[i]=new u(this)),this.features[i]){const h=this.features[i];h.isMounted?h.update():(h.mount(),h.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_e()}getStaticValue(i){return this.latestValues[i]}setStaticValue(i,l){this.latestValues[i]=l}update(i,l){(i.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=i,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let o=0;o<ov.length;o++){const u=ov[o];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const h="on"+u,d=i[h];d&&(this.propEventSubscriptions[u]=this.on(u,d))}this.prevMotionValues=N2(this,this.scrapeMotionValuesFromProps(i,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(i){return this.props.variants?this.props.variants[i]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(i){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(i),()=>l.variantChildren.delete(i)}addValue(i,l){const o=this.values.get(i);l!==o&&(o&&this.removeValue(i),this.bindToMotionValue(i,l),this.values.set(i,l),this.latestValues[i]=l.get())}removeValue(i){this.values.delete(i);const l=this.valueSubscriptions.get(i);l&&(l(),this.valueSubscriptions.delete(i)),delete this.latestValues[i],this.removeValueFromRenderState(i,this.renderState)}hasValue(i){return this.values.has(i)}getValue(i,l){if(this.props.values&&this.props.values[i])return this.props.values[i];let o=this.values.get(i);return o===void 0&&l!==void 0&&(o=El(l===null?void 0:l,{owner:this}),this.addValue(i,o)),o}readValue(i,l){var o;let u=this.latestValues[i]!==void 0||!this.current?this.latestValues[i]:(o=this.getBaseTargetFromProps(this.props,i))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,i,this.options);return u!=null&&(typeof u=="string"&&(p0(u)||l0(u))?u=parseFloat(u):!E2(u)&&Xa.test(l)&&(u=f0(i,l)),this.setBaseTarget(i,Ye(u)?u.get():u)),Ye(u)?u.get():u}setBaseTarget(i,l){this.baseTarget[i]=l}getBaseTarget(i){var l;const{initial:o}=this.props;let u;if(typeof o=="string"||typeof o=="object"){const d=Sd(this.props,o,(l=this.presenceContext)===null||l===void 0?void 0:l.custom);d&&(u=d[i])}if(o&&u!==void 0)return u;const h=this.getBaseTargetFromProps(this.props,i);return h!==void 0&&!Ye(h)?h:this.initialValues[i]!==void 0&&u===void 0?void 0:this.baseTarget[i]}on(i,l){return this.events[i]||(this.events[i]=new kd),this.events[i].add(l)}notify(i,...l){this.events[i]&&this.events[i].notify(...l)}}class $0 extends C2{constructor(){super(...arguments),this.KeyframeResolver=b0}sortInstanceNodePosition(i,l){return i.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(i,l){return i.style?i.style[l]:void 0}removeValueFromRenderState(i,{vars:l,style:o}){delete l[i],delete o[i]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:i}=this.props;Ye(i)&&(this.childSubscription=i.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}function D2(a){return window.getComputedStyle(a)}class w2 extends $0{constructor(){super(...arguments),this.type="html",this.renderInstance=Lv}readValueFromInstance(i,l){if(bs.has(l)){const o=Ld(l);return o&&o.default||0}else{const o=D2(i),u=(zv(l)?o.getPropertyValue(l):o[l])||0;return typeof u=="string"?u.trim():u}}measureInstanceViewportBox(i,{transformPagePoint:l}){return V0(i,l)}build(i,l,o){xd(i,l,o.transformTemplate)}scrapeMotionValuesFromProps(i,l,o){return Nd(i,l,o)}}class k2 extends $0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_e}getBaseTargetFromProps(i,l){return i[l]}readValueFromInstance(i,l){if(bs.has(l)){const o=Ld(l);return o&&o.default||0}return l=Hv.has(l)?l:vd(l),i.getAttribute(l)}scrapeMotionValuesFromProps(i,l,o){return qv(i,l,o)}build(i,l,o){jd(i,l,this.isSVGTag,o.transformTemplate)}renderInstance(i,l,o,u){Gv(i,l,o,u)}mount(i){this.isSVGTag=Ed(i.tagName),super.mount(i)}}const M2=(a,i)=>bd(a)?new k2(i):new w2(i,{allowProjection:a!==_.Fragment}),R2=s_({...PT,...T2,...i2,...x2},M2),Xn=bS(R2);var ge;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.TEXT=1]="TEXT",a[a.TOOL_USE=2]="TOOL_USE",a[a.TOOL_RESULT=3]="TOOL_RESULT",a[a.ERROR=4]="ERROR",a[a.STATUS=5]="STATUS",a[a.SYSTEM=6]="SYSTEM",a[a.FINDING=7]="FINDING",a[a.SUBTASK_CREATE=8]="SUBTASK_CREATE",a[a.USER_INPUT=9]="USER_INPUT"})(ge||(ge={}));var Me;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.PENDING=1]="PENDING",a[a.ASSIGNED=2]="ASSIGNED",a[a.IN_PROGRESS=3]="IN_PROGRESS",a[a.REVIEW=4]="REVIEW",a[a.DONE=5]="DONE",a[a.FAILED=6]="FAILED",a[a.WAITING_INPUT=7]="WAITING_INPUT"})(Me||(Me={}));var qa;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.ACTIVE=1]="ACTIVE",a[a.ARCHIVED=2]="ARCHIVED"})(qa||(qa={}));var Ya;(function(a){a[a.UNSPECIFIED=0]="UNSPECIFIED",a[a.OPEN=1]="OPEN",a[a.CLOSED=2]="CLOSED"})(Ya||(Ya={}));const O2=8;Object.assign(Object.create(null),{"":ge.UNSPECIFIED,text:ge.TEXT,tool_use:ge.TOOL_USE,tool_result:ge.TOOL_RESULT,error:ge.ERROR,status:ge.STATUS,system:ge.SYSTEM,finding:ge.FINDING,subtask_create:ge.SUBTASK_CREATE,user_input:ge.USER_INPUT});ge.UNSPECIFIED+"",ge.TEXT+"",ge.TOOL_USE+"",ge.TOOL_RESULT+"",ge.ERROR+"",ge.STATUS+"",ge.SYSTEM+"",ge.FINDING+"",ge.SUBTASK_CREATE+"",ge.USER_INPUT+"";Object.assign(Object.create(null),{"":Me.UNSPECIFIED,pending:Me.PENDING,assigned:Me.ASSIGNED,in_progress:Me.IN_PROGRESS,review:Me.REVIEW,done:Me.DONE,failed:Me.FAILED,waiting_input:Me.WAITING_INPUT});Me.UNSPECIFIED+"",Me.PENDING+"",Me.ASSIGNED+"",Me.IN_PROGRESS+"",Me.REVIEW+"",Me.DONE+"",Me.FAILED+"",Me.WAITING_INPUT+"";Object.assign(Object.create(null),{"":qa.UNSPECIFIED,active:qa.ACTIVE,archived:qa.ARCHIVED});qa.UNSPECIFIED+"",qa.ACTIVE+"",qa.ARCHIVED+"";Object.assign(Object.create(null),{"":Ya.UNSPECIFIED,open:Ya.OPEN,closed:Ya.CLOSED});Ya.UNSPECIFIED+"",Ya.OPEN+"",Ya.CLOSED+"";const B2="_breadcrumbs_1s6xc_1",z2="_list_1s6xc_11",U2="_item_1s6xc_21",V2="_separator_1s6xc_28",L2="_link_1s6xc_34",H2="_current_1s6xc_57",ri={breadcrumbs:B2,list:z2,item:U2,separator:V2,link:L2,current:H2},G2="›";function Ga({segments:a,onNavigate:i}){return f.jsx("nav",{className:ri.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:f.jsx("ol",{className:ri.list,children:a.map((l,o)=>{const u=o===a.length-1;return f.jsxs("li",{className:ri.item,children:[o>0&&f.jsx("span",{className:ri.separator,"aria-hidden":"true",children:G2}),l.viewMode&&!u?f.jsx("button",{className:ri.link,onClick:()=>i(l),title:l.label,children:l.label}):f.jsx("span",{className:ri.current,"aria-current":"page",title:l.label,children:l.label})]},o)})})})}function ld(){ld=function(u,h){return new l(u,void 0,h)};var a=RegExp.prototype,i=new WeakMap;function l(u,h,d){var p=new RegExp(u,h);return i.set(p,d||i.get(u)),cr(p,l.prototype)}function o(u,h){var d=i.get(h);return Object.keys(d).reduce(function(p,g){var v=d[g];if(typeof v=="number")p[g]=u[v];else{for(var b=0;u[v[b]]===void 0&&b+1<v.length;)b++;p[g]=u[v[b]]}return p},Object.create(null))}return(function(u,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(h&&h.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),h&&cr(u,h)})(l,RegExp),l.prototype.exec=function(u){var h=a.exec.call(this,u);if(h){h.groups=o(h,this);var d=h.indices;d&&(d.groups=o(d,this))}return h},l.prototype[Symbol.replace]=function(u,h){if(typeof h=="string"){var d=i.get(this);return a[Symbol.replace].call(this,u,h.replace(/\$<([^>]+)>/g,function(g,v){var b=d[v];return"$"+(Array.isArray(b)?b.join("$"):b)}))}if(typeof h=="function"){var p=this;return a[Symbol.replace].call(this,u,function(){var g=arguments;return typeof g[g.length-1]!="object"&&(g=[].slice.call(g)).push(o(g,p)),h.apply(this,g)})}return a[Symbol.replace].call(this,u,h)},ld.apply(this,arguments)}function cr(a,i){return cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,o){return l.__proto__=o,l},cr(a,i)}function rv(a,i){(i==null||i>a.length)&&(i=a.length);for(var l=0,o=new Array(i);l<i;l++)o[l]=a[l];return o}function Gu(a,i){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l)return(l=l.call(a)).next.bind(l);if(Array.isArray(a)||(l=(function(u,h){if(u){if(typeof u=="string")return rv(u,h);var d=Object.prototype.toString.call(u).slice(8,-1);return d==="Object"&&u.constructor&&(d=u.constructor.name),d==="Map"||d==="Set"?Array.from(u):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?rv(u,h):void 0}})(a))||i){l&&(a=l);var o=0;return function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
76
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var I2=(function(a){return function(i){return i===void 0&&(i={}),(function(o,u){if(u&&!o.registered(u))throw new Error('The default language "'+u+'" is not registered with refractor.')})(a,i.defaultLanguage),function(o){gb(o,"element",l)};function l(o,u,h){var d,p;if(h&&h.tagName==="pre"&&o.tagName==="code"){var g=(o==null||(d=o.data)==null?void 0:d.meta)||(o==null||(p=o.properties)==null?void 0:p.metastring)||"";o.properties.className?typeof o.properties.className=="boolean"?o.properties.className=[]:Array.isArray(o.properties.className)||(o.properties.className=[o.properties.className]):o.properties.className=[];var v,b,S=(function(Z){for(var P,at=Gu(Z.properties.className);!(P=at()).done;){var z=P.value;if(z.slice(0,9)==="language-")return z.slice(9).toLowerCase()}return null})(o);if(!S&&i.defaultLanguage&&o.properties.className.push("language-"+(S=i.defaultLanguage)),o.properties.className.push("code-highlight"),S)try{var x,D;D=(x=S)!=null&&x.includes("diff-")?S.split("-")[1]:S,v=a.highlight(Ko(o),D),h.properties.className=(h.properties.className||[]).concat("language-"+D)}catch(Z){if(!i.ignoreMissing||!/Unknown language/.test(Z.message))throw Z;v=o}else v=o;v.children=(b=1,function Z(P){return P.reduce(function(at,z){if(z.type==="text"){var nt=z.value,dt=(nt.match(/\n/g)||"").length;if(dt===0)z.position={start:{line:b,column:1},end:{line:b,column:1}},at.push(z);else for(var yt,zt=nt.split(`
77
+ `),$=Gu(zt.entries());!(yt=$()).done;){var Xt=yt.value,Ut=Xt[0],B=Xt[1];at.push({type:"text",value:Ut===zt.length-1?B:B+`
78
+ `,position:{start:{line:b+Ut,column:1},end:{line:b+Ut,column:1}}})}return b+=dt,at}if(Object.prototype.hasOwnProperty.call(z,"children")){var X=b;return z.children=Z(z.children),at.push(z),z.position={start:{line:X,column:1},end:{line:b,column:1}},at}return at.push(z),at},[])})(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 k,O=(function(Z){var P=/{([\d,-]+)}/,at=Z.split(",").map(function(dt){return dt.trim()}).join();if(P.test(at)){var z=P.exec(at)[1],nt=yb(z);return function(dt){return nt.includes(dt+1)}}return function(){return!1}})(g),Y=(function(Z){var P=ld(/showLineNumbers=(\d+)/i,{lines:1});if(P.test(Z)){var at=P.exec(Z);return Number(at.groups.lines)}return 1})(g),L=(function(Z){for(var P=new Array(Z),at=0;at<Z;at++)P[at]={type:"element",tagName:"span",properties:{className:[]},children:[]};return P})(v.position.end.line),Q=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],R=function(){var Z,P,at=k.value,z=at[0],nt=at[1];nt.properties.className=["code-line"];var dt=bb(v,function(yt){return yt.position.start.line<=z+1&&yt.position.end.line>=z+1});nt.children=dt.children,(g.toLowerCase().includes("showLineNumbers".toLowerCase())||i.showLineNumbers===!0||typeof i.showLineNumbers=="object"&&i.showLineNumbers.includes(S))&&!Q.some(function(yt){return g.toLowerCase().includes(yt)})&&(nt.properties.line=[(z+Y).toString()],nt.properties.className.push("line-number")),O(z)&&nt.properties.className.push("highlight-line"),(S==="diff"||(Z=S)!=null&&Z.includes("diff-"))&&Ko(nt).substring(0,1)==="-"?nt.properties.className.push("deleted"):(S==="diff"||(P=S)!=null&&P.includes("diff-"))&&Ko(nt).substring(0,1)==="+"&&nt.properties.className.push("inserted")},tt=Gu(L.entries());!(k=tt()).done;)R();L.length>0&&Ko(L[L.length-1]).trim()===""&&L.pop(),o.children=L}}}})(vb);const q2="_systemEvent_11qnw_1",Y2="_systemTimestamp_11qnw_9",Z2="_textEvent_11qnw_13",X2="_toolUseEvent_11qnw_100",K2="_toolUsePrefix_11qnw_116",Q2="_toolResultEvent_11qnw_120",P2="_toolResultSummary_11qnw_126",F2="_toolResultPre_11qnw_140",J2="_errorEvent_11qnw_154",$2="_statusEvent_11qnw_163",W2="_userInputEvent_11qnw_173",tj="_userInputContent_11qnw_180",ej="_defaultEvent_11qnw_191",vn={systemEvent:q2,systemTimestamp:Y2,textEvent:Z2,toolUseEvent:X2,toolUsePrefix:K2,toolResultEvent:Q2,toolResultSummary:P2,toolResultPre:F2,errorEvent:J2,statusEvent:$2,userInputEvent:W2,userInputContent:tj,defaultEvent:ej};function nj({time:a,content:i}){return f.jsxs("div",{className:vn.systemEvent,children:[f.jsxs("span",{className:vn.systemTimestamp,children:["[",a,"]"]})," ",i]})}function aj({content:a}){return f.jsx("div",{className:vn.textEvent,children:f.jsx(od,{remarkPlugins:[rd],rehypePlugins:[I2],children:a})})}function sj({content:a}){let i=a;try{const l=JSON.parse(a);i=`${l.tool}: ${JSON.stringify(l.args,null,2)}`}catch{}return f.jsxs("div",{className:vn.toolUseEvent,children:[f.jsx("span",{className:vn.toolUsePrefix,children:">"})," ",i]})}function ij({content:a}){return f.jsxs("details",{className:vn.toolResultEvent,children:[f.jsx("summary",{className:vn.toolResultSummary,children:"Tool output"}),f.jsx("pre",{className:vn.toolResultPre,children:a})]})}function lj({content:a}){return f.jsxs("div",{className:vn.errorEvent,children:["Error: ",a]})}function oj({content:a}){return f.jsxs("div",{className:vn.statusEvent,children:["--- ",a," ---"]})}function rj({content:a}){return f.jsx("div",{className:vn.userInputEvent,children:f.jsx("span",{className:vn.userInputContent,children:a})})}function cj({content:a}){return f.jsx("div",{className:vn.defaultEvent,children:a})}function W0({event:a}){const i=new Date(a.timestamp).toLocaleTimeString();switch(a.eventType){case"system":return f.jsx(nj,{time:i,content:a.content});case"text":case"output":return f.jsx(aj,{content:a.content});case"tool_use":return f.jsx(sj,{content:a.content});case"tool_result":return f.jsx(ij,{content:a.content});case"error":return f.jsx(lj,{content:a.content});case"status":return f.jsx(oj,{content:a.content});case"user_input":return f.jsx(rj,{content:a.content});default:return f.jsx(cj,{content:a.content})}}const uj="_overlay_1hz80_1",dj="_dialog_1hz80_13",fj="_title_1hz80_31",hj="_description_1hz80_39",mj="_actions_1hz80_46",pj="_cancelButton_1hz80_53",gj="_confirmButton_1hz80_71",ms={overlay:uj,dialog:dj,title:fj,description:hj,actions:mj,cancelButton:pj,confirmButton:gj};function ur({isOpen:a,title:i,description:l,confirmLabel:o="Delete",onConfirm:u,onCancel:h}){const d=_.useId(),p=_.useId();return f.jsx(vi,{children:a&&f.jsx(Xn.div,{className:ms.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:h,onKeyDown:g=>{g.key==="Escape"&&h()},role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":l?p:void 0,children:f.jsxs(Xn.div,{className:ms.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:g=>g.stopPropagation(),children:[f.jsx("h3",{id:d,className:ms.title,children:i}),l&&f.jsx("p",{id:p,className:ms.description,children:l}),f.jsxs("div",{className:ms.actions,children:[f.jsx("button",{type:"button",className:ms.cancelButton,onClick:h,autoFocus:!0,children:"Cancel"}),f.jsx("button",{type:"button",className:ms.confirmButton,onClick:u,children:o})]})]})})})}const vj="_spinner_13c8l_1",yj="_spin_13c8l_1",bj="_sm_13c8l_14",Sj="_md_13c8l_20",_j="_lg_13c8l_26",cv={spinner:vj,spin:yj,sm:bj,md:Sj,lg:_j};function uv({size:a="md",className:i,label:l="Loading",liveRegion:o=!1}){return f.jsx("span",{className:`${cv.spinner} ${cv[a]} ${i??""}`,role:o?"status":void 0,"aria-label":l,"aria-hidden":o?void 0:!0})}const Tj="_container_d6rhh_1",xj="_header_d6rhh_5",jj="_addButton_d6rhh_17",Aj="_createForm_d6rhh_35",Ej="_createInput_d6rhh_41",Nj="_createButton_d6rhh_71",Cj="_creatingHint_d6rhh_107",Dj="_projectRow_d6rhh_116",wj="_selected_d6rhh_136",kj="_expandArrow_d6rhh_143",Mj="_expanded_d6rhh_150",Rj="_projectName_d6rhh_154",Oj="_taskCount_d6rhh_158",Bj="_newTaskButton_d6rhh_164",zj="_taskRow_d6rhh_182",Uj="_taskStatusIcon_d6rhh_211",Vj="_taskTitle_d6rhh_215",Lj="_dependencyBadge_d6rhh_222",Hj="_blockedBadge_d6rhh_234",Gj="_leafSpacer_d6rhh_239",Ij="_childCountBadge_d6rhh_244",qj="_addChildButton_d6rhh_257",Yj="_emptyCta_d6rhh_292",Zj="_ctaDescription_d6rhh_305",Xj="_ctaButton_d6rhh_311",Kj="_emptyTaskCta_d6rhh_341",Qj="_createTaskLink_d6rhh_346",Zt={container:Tj,header:xj,addButton:jj,createForm:Aj,createInput:Ej,createButton:Nj,creatingHint:Cj,projectRow:Dj,selected:wj,expandArrow:kj,expanded:Mj,projectName:Rj,taskCount:Oj,newTaskButton:Bj,taskRow:zj,taskStatusIcon:Uj,taskTitle:Vj,dependencyBadge:Lj,blockedBadge:Hj,leafSpacer:Gj,childCountBadge:Ij,addChildButton:qj,emptyCta:Yj,ctaDescription:Zj,ctaButton:Xj,emptyTaskCta:Kj,createTaskLink:Qj},dv={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},waiting_input:{color:"var(--accent-yellow)",icon:"⧖"}};function Pj(a){const i=new Map(a.map(o=>[o.id,{...o,children:[]}])),l=[];for(const o of i.values())o.parentTaskId&&i.has(o.parentTaskId)?i.get(o.parentTaskId).children.push(o):l.push(o);for(const o of i.values())o.children.sort((u,h)=>u.sortOrder-h.sortOrder);return l.sort((o,u)=>o.sortOrder-u.sortOrder)}const Fj=34,Jj=16;function ty({node:a,depth:i,expandedTasks:l,toggleTask:o,selectedTaskId:u,setViewMode:h,projectId:d,taskStatusById:p}){const{personas:g}=Un(),v=dv[a.status]||dv.pending,b=a.dependsOn.length>0&&a.dependsOn.some(O=>p.get(O)!=="done"),S=l.has(a.id),x=a.children.length>0,D=u===a.id,k=Fj+i*Jj;return f.jsxs(f.Fragment,{children:[f.jsxs("div",{onClick:()=>h({kind:"task",taskId:a.id}),className:`${Zt.taskRow} ${D?Zt.selected:""}`,style:{paddingLeft:k},"data-task-id":a.id,children:[x&&f.jsx("span",{className:`${Zt.expandArrow} ${S?Zt.expanded:""}`,role:"button",tabIndex:0,"aria-label":S?"Collapse task":"Expand task",onClick:O=>{O.stopPropagation(),o(a.id)},onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),O.stopPropagation(),o(a.id))},children:"▸"}),!x&&f.jsx("span",{className:Zt.leafSpacer}),f.jsx("span",{className:Zt.taskStatusIcon,style:{color:v.color},children:v.icon}),f.jsx("span",{className:Zt.taskTitle,title:a.title,children:a.title}),x&&f.jsxs("span",{className:Zt.childCountBadge,children:[a.children.filter(O=>O.status==="done").length,"/",a.children.length]}),a.dependsOn.length>0&&f.jsx("span",{className:`${Zt.dependencyBadge} ${b?Zt.blockedBadge:""}`,title:`Depends on: ${a.dependsOn.join(", ")}`,children:b?"blocked":"dep"}),a.personaId&&(()=>{const O=g.find(Y=>Y.id===a.personaId);return O?f.jsx("span",{className:Zt.dependencyBadge,title:`Persona: ${O.name}`,style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"8rem"},children:O.name}):null})(),i<O2&&f.jsx("button",{onClick:O=>{O.stopPropagation(),h({kind:"new_task",projectId:d,parentTaskId:a.id})},title:"Add child task","aria-label":"Add child task",className:Zt.addChildButton,children:"+"})]}),f.jsx(vi,{children:x&&S&&f.jsx(Xn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:a.children.map(O=>f.jsx(ty,{node:O,depth:i+1,expandedTasks:l,toggleTask:o,selectedTaskId:u,setViewMode:h,projectId:d,taskStatusById:p},O.id))})})]})}function $j({viewMode:a,setViewMode:i}){const{projects:l,tasks:o,loadTasks:u,createProject:h,projectCreating:d}=Un(),[p,g]=_.useState(new Set),[v,b]=_.useState(new Set),[S,x]=_.useState(new Set),[D,k]=_.useState(!1),[O,Y]=_.useState(""),L=a.kind==="project"?a.projectId:void 0,Q=a.kind==="task"?a.taskId:void 0,R=_.useRef(p);R.current=p;const tt=_.useMemo(()=>new Map(o.map(z=>[z.id,z.status])),[o]),Z=z=>{g(nt=>{const dt=new Set(nt);return dt.has(z)?dt.delete(z):(dt.add(z),u(z)),dt})},P=z=>{b(nt=>{const dt=new Set(nt);return dt.has(z)?(dt.delete(z),x(yt=>new Set(yt).add(z))):(dt.add(z),x(yt=>{const zt=new Set(yt);return zt.delete(z),zt})),dt})};_.useEffect(()=>{const z=new Set(o.filter(nt=>nt.parentTaskId).map(nt=>nt.parentTaskId));z.size>0&&b(nt=>{const dt=new Set(nt);for(const yt of z)S.has(yt)||dt.add(yt);return dt})},[o,S]),_.useEffect(()=>{L&&!R.current.has(L)&&(g(z=>new Set(z).add(L)),u(L))},[L,u]);const at=()=>{!O.trim()||d||(h(O.trim()),Y(""),k(!1))};return f.jsxs("div",{className:Zt.container,children:[f.jsxs("div",{className:Zt.header,children:[f.jsx("span",{children:"Projects"}),f.jsx("button",{className:Zt.addButton,onClick:()=>k(!D),"aria-label":"Create project",title:"Create project",children:"+"})]}),D&&f.jsxs("div",{className:Zt.createForm,children:[f.jsx("input",{type:"text",value:O,onChange:z=>Y(z.target.value),onKeyDown:z=>z.key==="Enter"&&at(),placeholder:"Project name...",autoFocus:!0,disabled:d,className:Zt.createInput}),f.jsx("button",{onClick:at,className:Zt.createButton,disabled:d,children:d?f.jsx(uv,{size:"sm",label:"Creating project"}):"OK"})]}),d&&f.jsxs("div",{className:Zt.creatingHint,children:[f.jsx(uv,{size:"sm",label:"Creating project"}),"Creating project…"]}),l.length===0&&!D&&f.jsxs("div",{className:Zt.emptyCta,children:[f.jsx("button",{className:Zt.ctaButton,onClick:()=>k(!0),children:"Create Project"}),f.jsx("div",{className:Zt.ctaDescription,children:"Organize your work into projects"})]}),l.map(z=>{const nt=p.has(z.id),dt=o.filter($=>$.projectId===z.id),yt=L===z.id,zt=nt?Pj(dt):[];return f.jsxs("div",{children:[f.jsxs("div",{onClick:()=>{yt?Z(z.id):(nt||Z(z.id),i({kind:"project",projectId:z.id}))},className:`${Zt.projectRow} ${yt?Zt.selected:""}`,children:[f.jsx("span",{className:`${Zt.expandArrow} ${nt?Zt.expanded:""}`,children:"▸"}),f.jsx("span",{className:Zt.projectName,title:z.name,children:z.name}),f.jsx("span",{className:Zt.taskCount,children:dt.length>0&&`${dt.filter($=>$.status==="done").length}/${dt.length}`}),f.jsx("button",{onClick:$=>{$.stopPropagation(),i({kind:"new_task",projectId:z.id})},title:"New task",className:Zt.newTaskButton,children:"+"})]}),f.jsx(vi,{children:nt&&f.jsxs(Xn.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:[zt.map($=>f.jsx(ty,{node:$,depth:0,expandedTasks:v,toggleTask:P,selectedTaskId:Q,setViewMode:i,projectId:z.id,taskStatusById:tt},$.id)),dt.length===0&&f.jsx("div",{className:Zt.emptyTaskCta,children:f.jsx("button",{className:Zt.createTaskLink,onClick:()=>i({kind:"new_task",projectId:z.id}),children:"+ Create Task"})})]})})]},z.id)})]})}const Wj="_container_1xzk5_1",tA="_content_1xzk5_28",fv={container:Wj,content:tA},eA=320,ey=220,ny=600,ay="grackle-sidebar-width";function nA(){try{const a=localStorage.getItem(ay);if(a!==null){const i=Number(a);if(Number.isFinite(i)&&i>=ey&&i<=ny)return i}}catch{}return eA}function aA(a){try{localStorage.setItem(ay,String(a))}catch{}}function sA({viewMode:a,setViewMode:i}){const[l]=_.useState(nA),o=_.useRef(null);return _.useEffect(()=>{const u=o.current;if(!u)return;const h=new ResizeObserver(d=>{for(const p of d){const g=p.borderBoxSize[0];if(g){const v=Math.round(g.inlineSize);v>=ey&&v<=ny&&aA(v)}}});return h.observe(u),()=>{h.disconnect()}},[]),f.jsx("div",{className:fv.container,ref:o,"data-testid":"sidebar",style:{width:l},children:f.jsx("div",{className:fv.content,children:f.jsx($j,{viewMode:a,setViewMode:i})})})}const iA="_bar_1hf84_1",lA="_barColumn_1hf84_25",oA="_barRow_1hf84_50",rA="_input_1hf84_56",cA="_inputSmall_1hf84_84",uA="_textarea_1hf84_113",dA="_select_1hf84_145",fA="_btnPrimary_1hf84_174",hA="_btnDanger_1hf84_200",mA="_btnGhost_1hf84_232",pA="_badge_1hf84_251",gA="_statusText_1hf84_261",vA="_statusCompleted_1hf84_266",yA="_statusFailed_1hf84_270",bA="_statusBlocked_1hf84_274",SA="_hintText_1hf84_279",_A="_creatingHint_1hf84_284",TA="_errorHint_1hf84_292",xA="_disconnectHint_1hf84_298",it={bar:iA,barColumn:lA,barRow:oA,input:rA,inputSmall:cA,textarea:uA,select:dA,btnPrimary:fA,btnDanger:hA,btnGhost:mA,badge:pA,statusText:gA,statusCompleted:vA,statusFailed:yA,statusBlocked:bA,hintText:SA,creatingHint:_A,errorHint:TA,disconnectHint:xA};function hv({value:a,onChange:i,testId:l}){return f.jsxs("select",{"data-testid":l,value:a,onChange:o=>i(o.target.value),className:it.select,children:[f.jsx("option",{value:"claude-code",children:"claude-code"}),f.jsx("option",{value:"codex",children:"codex"}),f.jsx("option",{value:"copilot",children:"copilot"}),f.jsx("option",{value:"stub",children:"stub"})]})}function mv(a,i){if(!a)return!1;const l=i.find(o=>o.id===a);return l!==void 0&&(l.status==="disconnected"||l.status==="error")}function pv({environmentId:a,onReconnect:i}){return f.jsxs(f.Fragment,{children:[f.jsx("span",{className:it.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),f.jsx("button",{type:"button",onClick:()=>i(a),className:it.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function jA({viewMode:a,setViewMode:i}){const{spawn:l,sendInput:o,kill:u,sessions:h,tasks:d,environments:p,personas:g,createTask:v,addEnvironment:b,provisionEnvironment:S,codespaces:x,codespaceError:D,codespaceCreating:k,listCodespaces:O,createCodespace:Y}=Un(),{showToast:L}=ud(),[Q,R]=_.useState(""),[tt,Z]=_.useState(a.kind==="new_chat"?a.runtime:"claude-code"),[P,at]=_.useState(""),[z,nt]=_.useState(""),[dt,yt]=_.useState(""),[zt,$]=_.useState(""),[Xt,Ut]=_.useState(""),B=mt=>{if(Ut(mt),mt){const et=g.find(Nt=>Nt.id===mt);et!=null&&et.runtime&&Z(et.runtime)}},[X,rt]=_.useState(""),[bt,Tt]=_.useState("local"),[Pt,Et]=_.useState("claude-code"),[St,G]=_.useState(""),[Kt,fe]=_.useState(""),[Ze,Xe]=_.useState(""),[ee,Je]=_.useState(""),[Ie,$e]=_.useState(""),[We,ve]=_.useState(""),[F,Re]=_.useState(""),[q,K]=_.useState(""),[ot,ut]=_.useState("pick");_.useEffect(()=>{if(a.kind==="new_chat"&&Z(a.runtime),a.kind==="new_task"&&a.parentTaskId){const mt=d.find(et=>et.id===a.parentTaskId);mt!=null&&mt.environmentId&&yt(mt.environmentId)}a.kind==="new_task"&&!a.parentTaskId&&p.length===1&&yt(p[0].id)},[a]);const ft=a.kind==="session"?h.find(mt=>mt.id===a.sessionId):void 0,pt=a.kind==="task"?d.find(mt=>mt.id===a.taskId):void 0,jt=pt!=null&&pt.sessionId?h.find(mt=>mt.id===pt.sessionId):void 0,Mt=pt?pt.dependsOn.some(mt=>{const et=d.find(Nt=>Nt.id===mt);return et&&et.status!=="done"}):!1;if(a.kind==="empty")return f.jsx("div",{className:it.bar,children:f.jsx("span",{className:it.hintText,children:"Select a session or click + to start"})});if(a.kind==="new_environment"){const mt=J=>{if(!J.trim())return!0;const Lt=Number(J);return Number.isInteger(Lt)&&Lt>=1&&Lt<=65535},et=()=>!(!X.trim()||bt==="ssh"&&!St.trim()||bt==="codespace"&&!We.trim()||(bt==="local"||bt==="ssh")&&!mt(Kt)),Nt=()=>{if(!et())return;const J={};if(bt==="local"){if(St.trim()&&(J.host=St.trim()),Kt.trim()){const Lt=Number(Kt);Number.isInteger(Lt)&&(J.port=Lt)}}else if(bt==="ssh"){if(J.host=St.trim(),Ze.trim()&&(J.user=Ze.trim()),Kt.trim()){const Lt=Number(Kt);Number.isInteger(Lt)&&(J.sshPort=Lt)}F.trim()&&(J.identityFile=F.trim())}else bt==="docker"?(ee.trim()&&(J.image=ee.trim()),Ie.trim()&&(J.repo=Ie.trim())):bt==="codespace"&&(J.codespaceName=We.trim());b(X.trim(),bt,J,Pt),L("Environment added successfully","success"),rt(""),Tt("local"),Et("claude-code"),G(""),fe(""),Xe(""),Je(""),$e(""),ve(""),Re(""),K(""),ut("pick"),i({kind:"settings"})};return f.jsxs("div",{className:it.barColumn,children:[f.jsxs("div",{className:it.barRow,children:[f.jsx("span",{className:it.badge,children:"new env"}),f.jsx("input",{type:"text",value:X,onChange:J=>rt(J.target.value),placeholder:"Environment name...",autoFocus:!0,className:it.input}),f.jsxs("select",{value:bt,onChange:J=>{Tt(J.target.value),J.target.value==="codespace"&&(O(),ut("pick"),ve(""))},className:it.select,children:[f.jsx("option",{value:"local",children:"local"}),f.jsx("option",{value:"ssh",children:"ssh"}),f.jsx("option",{value:"docker",children:"docker"}),f.jsx("option",{value:"codespace",children:"codespace"})]}),f.jsx(hv,{value:Pt,onChange:Et,testId:"new-environment-runtime-select"}),f.jsx("button",{onClick:Nt,disabled:!et(),className:it.btnPrimary,children:"Add"})]}),f.jsxs("div",{className:it.barRow,children:[bt==="local"&&f.jsxs(f.Fragment,{children:[f.jsx("input",{type:"text",value:St,onChange:J=>G(J.target.value),placeholder:"Host (optional)...",className:it.inputSmall}),f.jsx("input",{type:"number",min:1,max:65535,value:Kt,onChange:J=>fe(J.target.value),placeholder:"Port (optional)...",className:it.inputSmall})]}),bt==="ssh"&&f.jsxs(f.Fragment,{children:[f.jsx("input",{type:"text",value:St,onChange:J=>G(J.target.value),placeholder:"Host (required)...",className:it.inputSmall}),f.jsx("input",{type:"text",value:Ze,onChange:J=>Xe(J.target.value),placeholder:"User (optional)...",className:it.inputSmall}),f.jsx("input",{type:"number",min:1,max:65535,value:Kt,onChange:J=>fe(J.target.value),placeholder:"SSH port (optional)...",className:it.inputSmall}),f.jsx("input",{type:"text",value:F,onChange:J=>Re(J.target.value),placeholder:"Identity file (optional)...",className:it.inputSmall})]}),bt==="docker"&&f.jsxs(f.Fragment,{children:[f.jsx("input",{type:"text",value:ee,onChange:J=>Je(J.target.value),placeholder:"Image (optional)...",className:it.inputSmall}),f.jsx("input",{type:"text",value:Ie,onChange:J=>$e(J.target.value),placeholder:"Repo (optional)...",className:it.inputSmall})]}),bt==="codespace"&&ot==="pick"&&f.jsxs(f.Fragment,{children:[f.jsxs("select",{value:We,onChange:J=>{J.target.value==="__create__"?(ut("create"),ve("")):(ve(J.target.value),J.target.value&&!X.trim()&&rt(J.target.value))},disabled:k,className:it.select,children:[f.jsx("option",{value:"",children:"Select a codespace..."}),x.map(J=>f.jsxs("option",{value:J.name,children:[J.name," (",J.repository,") — ",J.state]},J.name)),f.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),k&&f.jsx("span",{className:it.creatingHint,children:"Creating codespace..."}),D&&f.jsx("span",{className:it.errorHint,children:D})]}),bt==="codespace"&&ot==="create"&&f.jsxs(f.Fragment,{children:[f.jsx("input",{type:"text",value:q,onChange:J=>K(J.target.value),placeholder:"owner/repo",className:it.inputSmall}),f.jsx("button",{onClick:()=>{q.trim()&&(Y(q.trim()),ut("pick"),K(""))},disabled:!q.trim(),className:it.btnPrimary,children:"Create"}),f.jsx("button",{onClick:()=>{ut("pick"),K("")},className:it.btnGhost,children:"Cancel"})]})]})]})}if(a.kind==="project")return f.jsx("div",{className:it.bar,children:f.jsx("span",{className:it.hintText,children:"Select a task or click + to create one"})});if(a.kind==="new_task"){const mt=et=>{P.trim()&&(v(a.projectId,P.trim(),z,dt,void 0,a.parentTaskId,zt),L("Task created successfully","success"),at(""),nt(""),yt(""),$(""),i({kind:"project",projectId:a.projectId}))};return f.jsxs("div",{className:it.barColumn,children:[f.jsxs("div",{className:it.barRow,children:[f.jsx("span",{className:it.badge,children:a.parentTaskId?"child task":"new task"}),f.jsx("input",{type:"text",value:P,onChange:et=>at(et.target.value),placeholder:"Task title...",autoFocus:!0,className:it.input}),f.jsxs("select",{value:dt,onChange:et=>yt(et.target.value),className:it.select,children:[f.jsx("option",{value:"",children:"Default env"}),p.map(et=>f.jsx("option",{value:et.id,children:et.displayName},et.id))]}),f.jsxs("select",{value:zt,onChange:et=>$(et.target.value),className:it.select,children:[f.jsx("option",{value:"",children:"No persona"}),g.map(et=>f.jsx("option",{value:et.id,children:et.name},et.id))]}),f.jsx("button",{onClick:()=>mt(),disabled:!P.trim(),className:it.btnPrimary,children:"Create"})]}),f.jsx("textarea",{value:z,onChange:et=>nt(et.target.value),placeholder:"Description (optional)...",className:it.textarea,rows:3})]})}if(a.kind==="task"&&pt){if(pt.status==="pending"||pt.status==="assigned"){const mt=Mt?pt.dependsOn.map(et=>d.find(Nt=>Nt.id===et)).filter(et=>et&&et.status!=="done").map(et=>et.title):[];return f.jsx("div",{className:it.bar,children:Mt?f.jsxs("span",{className:it.statusBlocked,children:["Blocked by: ",mt.join(", ")]}):f.jsx("span",{className:it.hintText,children:"Use the buttons above to start or manage this task"})})}if(pt.status==="in_progress"||pt.status==="waiting_input"){if((jt==null?void 0:jt.status)==="waiting_input"){const et=(jt==null?void 0:jt.environmentId)||pt.environmentId,Nt=mv(et,p),J=Lt=>{Lt.preventDefault(),!(!Q.trim()||!pt.sessionId||Nt)&&(o(pt.sessionId,Q),R(""))};return f.jsxs("form",{onSubmit:J,className:it.bar,children:[Nt&&et&&f.jsx(pv,{environmentId:et,onReconnect:S}),f.jsx("input",{type:"text",value:Q,onChange:Lt=>R(Lt.target.value),placeholder:"Type a message...",autoFocus:!Nt,disabled:Nt,className:it.input}),f.jsx("span",{title:Nt?"Environment is unavailable — reconnect first":void 0,children:f.jsx("button",{type:"submit",disabled:!Q.trim()||Nt,className:it.btnPrimary,children:"Send"})})]})}return f.jsx("div",{className:it.bar,children:f.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:it.input})})}if(pt.status==="review")return f.jsx("div",{className:it.bar,children:f.jsx("span",{className:it.hintText,children:"Review the changes above, then approve or reject in the header"})});if(pt.status==="done")return f.jsxs("div",{className:it.bar,children:[f.jsx("span",{className:`${it.statusText} ${it.statusCompleted}`,children:"Task completed"}),f.jsx("button",{onClick:()=>i({kind:"new_task",projectId:pt.projectId}),className:it.btnPrimary,children:"+ New Task"})]});if(pt.status==="failed")return f.jsx("div",{className:it.bar,children:f.jsx("span",{className:`${it.statusText} ${it.statusFailed}`,children:"Task failed"})})}if(a.kind==="new_chat"){const mt=et=>{et.preventDefault(),Q.trim()&&(l(a.environmentId,Q,void 0,tt,Xt),L("Session started","success"),R(""),Ut(""))};return f.jsxs("form",{onSubmit:mt,className:it.bar,children:[f.jsx("span",{className:it.badge,children:"new chat"}),f.jsx("input",{type:"text",value:Q,onChange:et=>R(et.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:it.input}),f.jsx(hv,{value:tt,onChange:Z,testId:"new-chat-runtime-select"}),f.jsxs("select",{value:Xt,onChange:et=>B(et.target.value),className:it.select,children:[f.jsx("option",{value:"",children:"No persona"}),g.map(et=>f.jsx("option",{value:et.id,children:et.name},et.id))]}),f.jsx("button",{type:"submit",disabled:!Q.trim(),className:it.btnPrimary,children:"Go"})]})}if(a.kind==="session"){const mt=(ft==null?void 0:ft.status)==="running",et=(ft==null?void 0:ft.status)==="waiting_input",Nt=ft!==void 0&&["completed","failed","killed"].includes(ft.status);if(mt)return f.jsxs("div",{className:it.bar,children:[f.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:it.input}),f.jsx("button",{onClick:()=>u(a.sessionId),className:it.btnDanger,title:"Stop session",children:"Stop"})]});if(et){const J=mv(ft==null?void 0:ft.environmentId,p),Lt=U=>{U.preventDefault(),!(!Q.trim()||J)&&(o(a.sessionId,Q),R(""))};return f.jsxs("form",{onSubmit:Lt,className:it.bar,children:[J&&(ft==null?void 0:ft.environmentId)&&f.jsx(pv,{environmentId:ft.environmentId,onReconnect:S}),f.jsx("input",{type:"text",value:Q,onChange:U=>R(U.target.value),placeholder:"Type a message...",autoFocus:!J,disabled:J,className:it.input}),f.jsx("span",{title:J?"Environment is unavailable — reconnect first":void 0,children:f.jsx("button",{type:"submit",disabled:!Q.trim()||J,className:it.btnPrimary,children:"Send"})}),f.jsx("button",{type:"button",onClick:()=>u(a.sessionId),className:it.btnDanger,title:"Stop session",children:"Stop"})]})}if(Nt&&ft)return f.jsxs("div",{className:it.bar,children:[f.jsxs("span",{className:`${it.statusText} ${it.hintText}`,children:["Session ",ft.status]}),f.jsx("button",{onClick:()=>i({kind:"new_chat",environmentId:ft.environmentId,runtime:ft.runtime}),className:it.btnPrimary,children:"+ New Chat"})]})}return f.jsx("div",{className:it.bar,children:f.jsx("span",{className:it.hintText,children:"Loading..."})})}const AA="_container_twqwx_1",EA="_emptyState_twqwx_8",NA="_card_twqwx_14",CA="_cardHeader_twqwx_34",DA="_categoryBadge_twqwx_41",wA="_findingTitle_twqwx_49",kA="_findingDate_twqwx_55",MA="_findingContent_twqwx_61",RA="_tags_twqwx_67",OA="_tag_twqwx_67",qn={container:AA,emptyState:EA,card:NA,cardHeader:CA,categoryBadge:DA,findingTitle:wA,findingDate:kA,findingContent:MA,tags:RA,tag:OA};function BA(a){const i=new Date(a),l=new Date,o=l.getTime()-i.getTime(),u=Math.floor(o/1e3),h=Math.floor(u/60),d=Math.floor(h/60),p=Math.floor(d/24);if(u<60)return"just now";if(h<60)return`${h}m ago`;if(d<24)return`${d}h ago`;if(p===1)return"yesterday";if(p<7)return`${p} days ago`;const g=i.getFullYear()===l.getFullYear(),v=i.toLocaleString("en-US",{month:"short"}),b=i.getDate();return g?`${v} ${b}`:`${v} ${b} ${i.getFullYear()}`}const zA={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)"}},UA={text:"var(--text-secondary)",bg:"var(--bg-elevated)"};function VA({projectId:a}){const{findings:i}=Un(),l=i.filter(o=>o.projectId===a);return l.length===0?f.jsx("div",{className:qn.emptyState,children:"No findings yet. Agents will post discoveries here."}):f.jsx("div",{className:qn.container,children:l.map((o,u)=>{const h=zA[o.category]||UA;return f.jsxs(Xn.div,{className:qn.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:u*.05,duration:.2},children:[f.jsxs("div",{className:qn.cardHeader,children:[f.jsx("span",{className:qn.categoryBadge,style:{background:h.bg,color:h.text},children:o.category}),f.jsx("span",{className:qn.findingTitle,children:o.title}),f.jsx("span",{className:qn.findingDate,title:o.createdAt,children:BA(o.createdAt)})]}),f.jsx("div",{className:qn.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&f.jsx("div",{className:qn.tags,children:o.tags.map(d=>f.jsx("span",{className:qn.tag,style:{color:h.text,textShadow:`0 0 8px ${h.text}`},children:d},d))})]},o.id)})})}const LA="_container_vs9om_1",HA="_header_vs9om_5",GA="_headerLabel_vs9om_12",IA="_addButton_vs9om_20",qA="_envRow_vs9om_46",YA="_targeted_vs9om_60",ZA="_expanded_vs9om_63",XA="_statusDot_vs9om_67",KA="_pulse_vs9om_70",QA="_envName_vs9om_74",PA="_envActions_vs9om_78",FA="_idleLabel_vs9om_85",JA="_newChatButton_vs9om_90",$A="_envActionsRow_vs9om_108",WA="_connectButton_vs9om_116",tE="_stopButton_vs9om_133",eE="_deleteButton_vs9om_150",nE="_provisionMessage_vs9om_168",aE="_errorMessage_vs9om_175",sE="_sessionRow_vs9om_182",iE="_selected_vs9om_200",lE="_sessionDot_vs9om_207",oE="_sessionSummaryRow_vs9om_211",rE="_sessionExpandArrow_vs9om_233",cE="_sessionSummaryText_vs9om_244",uE="_sessionCountBadge_vs9om_251",dE="_emptyCta_vs9om_274",fE="_ctaDescription_vs9om_287",hE="_ctaButton_vs9om_293",Qt={container:LA,header:HA,headerLabel:GA,addButton:IA,envRow:qA,targeted:YA,expanded:ZA,statusDot:XA,pulse:KA,envName:QA,envActions:PA,idleLabel:FA,newChatButton:JA,envActionsRow:$A,connectButton:WA,stopButton:tE,deleteButton:eE,provisionMessage:nE,errorMessage:aE,sessionRow:sE,selected:iE,sessionDot:lE,sessionSummaryRow:oE,sessionExpandArrow:rE,sessionSummaryText:cE,sessionCountBadge:uE,emptyCta:dE,ctaDescription:fE,ctaButton:hE},mE={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},pE={running:"running",waiting_input:"awaiting input",failed:"failed",killed:"killed",completed:"completed"},gv=["running","waiting_input","failed","killed","completed"],gE=.2;function vE(a){const i={};for(const h of a)i[h.status]=(i[h.status]||0)+1;const l=gv.filter(h=>i[h]>0).map(h=>`${i[h]} ${pE[h]||h}`),o=new Set(gv),u=Object.keys(i).filter(h=>!o.has(h)).sort().map(h=>`${i[h]} ${h}`);return[...l,...u].join(", ")}function yE({status:a}){const i=a==="running"?"var(--accent-green)":a==="waiting_input"?"var(--accent-yellow)":a==="completed"?"var(--text-secondary)":a==="failed"||a==="killed"?"var(--accent-red)":"var(--text-tertiary)";return f.jsx("span",{className:Qt.sessionDot,style:{color:i},children:"●"})}function bE({env:a,envSessions:i,selectedSessionId:l,isNewChatTarget:o,expanded:u,onToggleExpand:h,sessionsExpanded:d,onToggleSessionsExpand:p,provisionProgress:g,onProvision:v,onStop:b,onRemove:S,setViewMode:x}){const[D,k]=_.useState(!1),O=mE[a.status]||"var(--text-tertiary)",Y=a.status==="connected",L=a.status==="connecting",Q=a.status==="disconnected"||a.status==="error";return f.jsxs("div",{children:[f.jsx(ur,{isOpen:D,title:"Delete Environment?",description:`"${a.displayName||a.id}" will be permanently removed. This destroys the workspace and removes all data.`,onConfirm:()=>{S(a.id),k(!1)},onCancel:()=>k(!1)}),f.jsxs("div",{className:`${Qt.envRow} ${o?Qt.targeted:""} ${u?Qt.expanded:""}`,"data-testid":"env-row",onClick:h,children:[f.jsx("span",{className:`${Qt.statusDot} ${Y?Qt.pulse:""}`,style:{color:O},children:"●"}),f.jsx("span",{className:Qt.envName,title:a.displayName||a.id,children:a.displayName||a.id}),f.jsxs("span",{className:Qt.envActions,children:[i.length===0&&!o&&!u&&f.jsx("span",{className:Qt.idleLabel,children:"(idle)"}),Y&&f.jsx("button",{onClick:R=>{R.stopPropagation(),x({kind:"new_chat",environmentId:a.id,runtime:a.defaultRuntime||"claude-code"})},title:"New chat",className:Qt.newChatButton,children:"+"})]})]}),u&&f.jsxs("div",{className:Qt.envActionsRow,children:[L&&g&&f.jsx("span",{className:Qt.provisionMessage,children:g.message}),a.status==="error"&&(g==null?void 0:g.stage)==="error"&&f.jsx("span",{className:Qt.errorMessage,children:g.message}),Q&&f.jsx("button",{onClick:R=>{R.stopPropagation(),v(a.id)},className:Qt.connectButton,children:a.status==="error"?"Retry":"Connect"}),Y&&f.jsx("button",{onClick:R=>{R.stopPropagation(),b(a.id)},className:Qt.stopButton,children:"Stop"}),!L&&f.jsx("button",{onClick:R=>{R.stopPropagation(),k(!0)},className:Qt.deleteButton,children:"Delete"})]}),i.length>0&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Qt.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":d,"aria-label":d?"Collapse sessions":"Expand sessions",onClick:p,onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),p())},children:[f.jsx("span",{className:`${Qt.sessionExpandArrow} ${d?Qt.expanded:""}`,children:"▸"}),f.jsx("span",{className:Qt.sessionSummaryText,children:vE(i)}),f.jsx("span",{className:Qt.sessionCountBadge,children:i.length})]}),f.jsx(vi,{children:d&&f.jsx(Xn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:gE,ease:"easeInOut"},style:{overflow:"hidden"},children:i.map(R=>f.jsxs("div",{onClick:tt=>{tt.stopPropagation(),x({kind:"session",sessionId:R.id})},className:`${Qt.sessionRow} ${l===R.id?Qt.selected:""}`,title:R.prompt,"data-testid":"session-row",children:[f.jsx(yE,{status:R.status})," ",R.prompt.length>24?R.prompt.slice(0,24)+"...":R.prompt]},R.id))})})]})]})}function SE({viewMode:a,setViewMode:i}){const{environments:l,sessions:o,provisionStatus:u,provisionEnvironment:h,stopEnvironment:d,removeEnvironment:p}=Un(),[g,v]=_.useState(null),[b,S]=_.useState(new Set),x=a.kind==="session"?a.sessionId:void 0,D=a.kind==="new_chat"?a.environmentId:void 0;return f.jsxs("div",{className:Qt.container,children:[f.jsxs("div",{className:Qt.header,children:[f.jsx("span",{className:Qt.headerLabel,children:"Environments"}),f.jsx("button",{className:Qt.addButton,onClick:()=>i({kind:"new_environment"}),title:"Add environment",children:"+ Add Environment"})]}),l.length===0&&f.jsxs("div",{className:Qt.emptyCta,children:[f.jsx("button",{className:Qt.ctaButton,onClick:()=>i({kind:"new_environment"}),children:"Add Environment"}),f.jsx("div",{className:Qt.ctaDescription,children:"Connect an environment to run agents"})]}),l.map(k=>{const O=o.filter(Y=>Y.environmentId===k.id);return f.jsx(bE,{env:k,envSessions:O,selectedSessionId:x,isNewChatTarget:D===k.id,expanded:g===k.id,onToggleExpand:()=>v(g===k.id?null:k.id),sessionsExpanded:b.has(k.id),onToggleSessionsExpand:()=>{S(Y=>{const L=new Set(Y);return L.has(k.id)?L.delete(k.id):L.add(k.id),L})},provisionProgress:u[k.id],onProvision:h,onStop:d,onRemove:p,setViewMode:i},k.id)})]})}const _E="_container_8bik7_1",TE="_heading_8bik7_7",xE="_section_8bik7_14",jE="_sectionTitle_8bik7_25",AE="_sectionDescription_8bik7_34",EE="_tokenList_8bik7_47",NE="_tokenRow_8bik7_54",CE="_tokenBadge_8bik7_67",DE="_tokenName_8bik7_82",wE="_tokenTarget_8bik7_89",kE="_deleteButton_8bik7_98",ME="_addForm_8bik7_112",RE="_formRow_8bik7_118",OE="_input_8bik7_124",BE="_select_8bik7_153",zE="_addButton_8bik7_184",UE="_emptyStateInfo_8bik7_213",ue={container:_E,heading:TE,section:xE,sectionTitle:jE,sectionDescription:AE,tokenList:EE,tokenRow:NE,tokenBadge:CE,tokenName:DE,tokenTarget:wE,deleteButton:kE,addForm:ME,formRow:RE,input:OE,select:BE,addButton:zE,emptyStateInfo:UE},VE=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function LE({viewMode:a,setViewMode:i}){const{tokens:l,setToken:o,deleteToken:u}=Un(),{showToast:h}=ud(),[d,p]=_.useState(""),[g,v]=_.useState(""),[b,S]=_.useState("env_var"),[x,D]=_.useState(""),[k,O]=_.useState(null),Y=R=>{if(R.preventDefault(),!d||!g)return;const tt=b==="env_var"?x||d.toUpperCase()+"_TOKEN":"";o(d,g,b,tt,b==="file"?x:""),h("Token saved successfully","success"),p(""),v(""),D("")},L=R=>{O(R)},Q=()=>{k&&(u(k),h("Token deleted","info")),O(null)};return f.jsxs("div",{className:ue.container,children:[f.jsx(ur,{isOpen:k!==null,title:"Delete Token?",description:k?`"${k}" will be permanently removed.`:void 0,onConfirm:Q,onCancel:()=>O(null)}),f.jsx("h2",{className:ue.heading,children:"Settings"}),f.jsxs("section",{className:ue.section,children:[f.jsx("h3",{className:ue.sectionTitle,children:"Environments"}),f.jsx("p",{className:ue.sectionDescription,children:"Environments are compute workspaces where agents run. Configure once, reuse across projects."}),f.jsx(SE,{viewMode:a,setViewMode:i})]}),f.jsxs("section",{className:ue.section,children:[f.jsx("h3",{className:ue.sectionTitle,children:"Tokens"}),f.jsx("p",{className:ue.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),l.length===0?f.jsx("div",{className:ue.emptyStateInfo,children:"Add your first API token to enable service integrations."}):f.jsx("div",{className:ue.tokenList,children:l.map(R=>f.jsxs("div",{className:ue.tokenRow,children:[f.jsx("span",{className:ue.tokenBadge,children:R.tokenType}),f.jsx("span",{className:ue.tokenName,children:R.name}),f.jsx("span",{className:ue.tokenTarget,children:R.tokenType==="env_var"?R.envVar:R.filePath}),f.jsx("button",{className:ue.deleteButton,onClick:()=>L(R.name),title:`Delete ${R.name}`,children:"×"})]},R.name))}),f.jsxs("form",{className:ue.addForm,onSubmit:Y,children:[f.jsxs("div",{className:ue.formRow,children:[f.jsx("input",{className:ue.input,type:"text",placeholder:"Token name",value:d,onChange:R=>p(R.target.value)}),f.jsx("input",{className:ue.input,type:"password",placeholder:"Value",value:g,onChange:R=>v(R.target.value)})]}),f.jsxs("div",{className:ue.formRow,children:[f.jsx("select",{className:ue.select,value:b,onChange:R=>S(R.target.value),children:VE.map(R=>f.jsx("option",{value:R.value,children:R.label},R.value))}),f.jsx("input",{className:ue.input,type:"text",placeholder:b==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:x,onChange:R=>D(R.target.value)}),f.jsx("button",{className:ue.addButton,type:"submit",children:"Add Token"})]})]})]})]})}const HE="_container_14lk7_1",GE="_header_14lk7_7",IE="_form_14lk7_18",qE="_formActions_14lk7_61",YE="_list_14lk7_67",ZE="_card_14lk7_73",XE="_active_14lk7_79",KE="_cardHeader_14lk7_83",QE="_cardActions_14lk7_92",PE="_description_14lk7_97",FE="_meta_14lk7_103",JE="_promptDetails_14lk7_116",$E="_promptText_14lk7_128",WE="_empty_14lk7_140",tN="_btnPrimary_14lk7_146",eN="_btnSecondary_14lk7_160",nN="_btnSmall_14lk7_174",aN="_btnDanger_14lk7_188",Se={container:HE,header:GE,form:IE,formActions:qE,list:YE,card:ZE,active:XE,cardHeader:KE,cardActions:QE,description:PE,meta:FE,promptDetails:JE,promptText:$E,empty:WE,btnPrimary:tN,btnSecondary:eN,btnSmall:nN,btnDanger:aN};function sN(){const{personas:a,createPersona:i,updatePersona:l,deletePersona:o}=Un(),[u,h]=_.useState(null),[d,p]=_.useState(!1),[g,v]=_.useState(null),[b,S]=_.useState(""),[x,D]=_.useState(""),[k,O]=_.useState(""),[Y,L]=_.useState(""),[Q,R]=_.useState(""),[tt,Z]=_.useState(0),P=()=>{S(""),D(""),O(""),L(""),R(""),Z(0)},at=()=>{P(),h(null),p(!0)},z=$=>{S($.name),D($.description),O($.systemPrompt),L($.runtime),R($.model),Z($.maxTurns),h($),p(!1)},nt=$=>{$.preventDefault(),!(!b.trim()||!k.trim())&&(u?(l(u.id,b,x,k,Y,Q,tt),h(null)):(i(b,x,k,Y,Q,tt),p(!1)),P())},dt=$=>{o($),v(null),(u==null?void 0:u.id)===$&&(h(null),P())},yt=()=>{h(null),p(!1),P()},zt=()=>f.jsxs("form",{onSubmit:nt,className:Se.form,children:[f.jsx("h3",{children:u?"Edit Persona":"Create Persona"}),f.jsxs("label",{children:["Name",f.jsx("input",{type:"text",value:b,onChange:$=>S($.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),f.jsxs("label",{children:["Description",f.jsx("input",{type:"text",value:x,onChange:$=>D($.target.value),placeholder:"Brief description..."})]}),f.jsxs("label",{children:["Runtime",f.jsxs("select",{value:Y,onChange:$=>L($.target.value),children:[f.jsx("option",{value:"",children:"Default"}),f.jsx("option",{value:"claude-code",children:"claude-code"}),f.jsx("option",{value:"codex",children:"codex"}),f.jsx("option",{value:"copilot",children:"copilot"})]})]}),f.jsxs("label",{children:["Model",f.jsx("input",{type:"text",value:Q,onChange:$=>R($.target.value),placeholder:"e.g. sonnet"})]}),f.jsxs("label",{children:["Max Turns",f.jsx("input",{type:"number",value:tt,onChange:$=>Z(parseInt($.target.value,10)||0),min:0})]}),f.jsxs("label",{children:["System Prompt",f.jsx("textarea",{value:k,onChange:$=>O($.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),f.jsxs("div",{className:Se.formActions,children:[f.jsx("button",{type:"submit",className:Se.btnPrimary,children:u?"Save":"Create"}),f.jsx("button",{type:"button",onClick:yt,className:Se.btnSecondary,children:"Cancel"})]})]});return f.jsxs("div",{className:Se.container,children:[f.jsxs("div",{className:Se.header,children:[f.jsx("h2",{children:"Personas"}),f.jsx("button",{onClick:at,className:Se.btnPrimary,children:"+ New Persona"})]}),(d||u)&&zt(),a.length===0&&!d?f.jsx("p",{className:Se.empty,children:"No personas yet. Create one to get started."}):f.jsx("div",{className:Se.list,children:a.map($=>f.jsxs("div",{className:`${Se.card} ${(u==null?void 0:u.id)===$.id?Se.active:""}`,children:[f.jsxs("div",{className:Se.cardHeader,children:[f.jsx("strong",{children:$.name}),f.jsxs("div",{className:Se.cardActions,children:[f.jsx("button",{onClick:()=>z($),className:Se.btnSmall,children:"Edit"}),g===$.id?f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>dt($.id),className:Se.btnDanger,children:"Confirm"}),f.jsx("button",{onClick:()=>v(null),className:Se.btnSmall,children:"Cancel"})]}):f.jsx("button",{onClick:()=>v($.id),className:Se.btnSmall,children:"Delete"})]})]}),$.description&&f.jsx("p",{className:Se.description,children:$.description}),f.jsxs("div",{className:Se.meta,children:[$.runtime&&f.jsxs("span",{children:["Runtime: ",$.runtime]}),$.model&&f.jsxs("span",{children:["Model: ",$.model]}),$.maxTurns>0&&f.jsxs("span",{children:["Max turns: ",$.maxTurns]})]}),f.jsxs("details",{className:Se.promptDetails,children:[f.jsx("summary",{children:"System Prompt"}),f.jsx("pre",{className:Se.promptText,children:$.systemPrompt})]})]},$.id))})]})}const vv=220,yv=70,iN=40,lN=60,oN="hierarchy",rN="dependency";function cN(a){return _.useMemo(()=>{if(a.length===0)return{nodes:[],edges:[]};const i=new Bp.graphlib.Graph({multigraph:!0});i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:"TB",nodesep:iN,ranksep:lN});const l=new Map(a.map(d=>[d.id,d])),o=new Map;for(const d of a)if(d.parentTaskId&&l.has(d.parentTaskId)){const p=o.get(d.parentTaskId)||[];p.push(d),o.set(d.parentTaskId,p)}for(const d of a)i.setNode(d.id,{width:vv,height:yv});const u=[];for(const d of a){if(d.parentTaskId&&l.has(d.parentTaskId)){const p=`hierarchy-${d.parentTaskId}-${d.id}`;i.setEdge(d.parentTaskId,d.id,{},p),u.push({id:p,source:d.parentTaskId,target:d.id,type:"smoothstep",data:{edgeType:oN},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const p of d.dependsOn)if(l.has(p)){const g=`dependency-${p}-${d.id}`;i.setEdge(p,d.id,{},g),u.push({id:g,source:p,target:d.id,type:"smoothstep",data:{edgeType:rN},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return Bp.layout(i),{nodes:a.map(d=>{const p=i.node(d.id),g=o.get(d.id)||[];return{id:d.id,type:"task",position:{x:p.x-vv/2,y:p.y-yv/2},data:{task:d,childCount:g.length,doneChildCount:g.filter(v=>v.status==="done").length,hasDependencies:d.dependsOn.length>0}}}),edges:u}},[a])}const uN="_dagContainer_iizup_1",dN="_taskNode_iizup_26",fN="_taskNodeBorder_iizup_48",hN="_taskNodeContent_iizup_54",mN="_taskNodeHeader_iizup_64",pN="_taskNodeIcon_iizup_71",gN="_taskNodeTitle_iizup_76",vN="_taskNodeBadges_iizup_84",yN="_childBadge_iizup_89",bN="_depBadge_iizup_101",SN="_handle_iizup_113",_N="_emptyCta_iizup_120",TN="_ctaDescription_iizup_131",xN="_ctaButton_iizup_138",Pe={dagContainer:uN,taskNode:dN,taskNodeBorder:fN,taskNodeContent:hN,taskNodeHeader:mN,taskNodeIcon:pN,taskNodeTitle:gN,taskNodeBadges:vN,childBadge:yN,depBadge:bN,handle:SN,emptyCta:_N,ctaDescription:TN,ctaButton:xN},bv={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},waiting_input:{color:"var(--accent-yellow)",icon:"⧖"}};function jN({data:a}){const{task:i,childCount:l,doneChildCount:o,hasDependencies:u}=a,h=bv[i.status]||bv.pending;return f.jsxs("div",{className:Pe.taskNode,"data-task-id":i.id,"data-task-title":i.title,children:[f.jsx(zp,{type:"target",position:Up.Top,className:Pe.handle}),f.jsx("div",{className:Pe.taskNodeBorder,style:{backgroundColor:h.color}}),f.jsxs("div",{className:Pe.taskNodeContent,children:[f.jsxs("div",{className:Pe.taskNodeHeader,children:[f.jsx("span",{className:Pe.taskNodeIcon,style:{color:h.color},children:h.icon}),f.jsx("span",{className:Pe.taskNodeTitle,children:i.title})]}),f.jsxs("div",{className:Pe.taskNodeBadges,children:[l>0&&f.jsxs("span",{className:Pe.childBadge,children:[o,"/",l]}),u&&f.jsx("span",{className:Pe.depBadge,children:"dep"})]})]}),f.jsx(zp,{type:"source",position:Up.Bottom,className:Pe.handle})]})}const Sv={pending:"#6b7a8d",assigned:"#70a1ff",in_progress:"#4ecca3",review:"#f0c040",done:"#4ecca3",failed:"#e94560",waiting_input:"#f0c040"},AN={task:jN};function EN({projectId:a,setViewMode:i}){const{tasks:l}=Un(),o=_.useMemo(()=>l.filter(g=>g.projectId===a),[l,a]),{nodes:u,edges:h}=cN(o),d=_.useCallback((g,v)=>{i({kind:"task",taskId:v.id})},[i]),p=_.useCallback(g=>{const v=g.data;return Sv[v.task.status]||Sv.pending},[]);return o.length===0?f.jsxs("div",{className:Pe.emptyCta,children:[f.jsx("button",{className:Pe.ctaButton,onClick:()=>i({kind:"new_task",projectId:a}),children:"Create Task"}),f.jsx("div",{className:Pe.ctaDescription,children:"Create tasks to see the dependency graph"})]}):f.jsx("div",{className:Pe.dagContainer,children:f.jsxs(_b,{nodes:u,edges:h,nodeTypes:AN,onNodeClick:d,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[f.jsx(Tb,{variant:xb.Dots,gap:20,size:1,color:"rgba(255,255,255,0.05)"}),f.jsx(jb,{showInteractive:!1}),f.jsx(Ab,{nodeColor:p,maskColor:"rgba(10, 12, 20, 0.7)",style:{background:"var(--bg-inset)"}})]})})}const NN="_panelContainer_18j12_1",CN="_emptyState_18j12_8",DN="_projectSummary_18j12_17",wN="_projectSummaryTitle_18j12_28",kN="_projectSummarySubtitle_18j12_32",MN="_header_18j12_36",RN="_headerInfo_18j12_62",ON="_killButton_18j12_68",BN="_headerTitle_18j12_89",zN="_headerActions_18j12_99",UN="_taskStatusBadge_18j12_106",VN="_taskBranch_18j12_115",LN="_taskBlockedBadge_18j12_121",HN="_btnPrimary_18j12_129",GN="_btnDanger_18j12_155",IN="_rejectInput_18j12_187",qN="_tabBar_18j12_216",YN="_tab_18j12_216",ZN="_active_18j12_239",XN="_eventScroll_18j12_244",KN="_tabContent_18j12_250",QN="_noContext_18j12_255",PN="_overviewContent_18j12_261",FN="_overviewDashboard_18j12_270",JN="_overviewHero_18j12_276",$N="_statusBadge_18j12_283",WN="_statusPending_18j12_295",tC="_statusAssigned_18j12_300",eC="_statusInProgress_18j12_305",nC="_statusReview_18j12_310",aC="_statusDone_18j12_315",sC="_statusFailed_18j12_320",iC="_statusWaitingInput_18j12_325",lC="_overviewBranchPill_18j12_330",oC="_branchLink_18j12_345",rC="_overviewSection_18j12_356",cC="_overviewLabel_18j12_362",uC="_overviewValue_18j12_369",dC="_overviewMuted_18j12_374",fC="_overviewMarkdown_18j12_380",hC="_envRow_18j12_449",mC="_envDot_18j12_455",pC="_envDotGreen_18j12_462",gC="_envDotYellow_18j12_467",vC="_envDotRed_18j12_472",yC="_envDotGray_18j12_477",bC="_depList_18j12_481",SC="_depItem_18j12_487",_C="_depBlocked_18j12_494",TC="_depDone_18j12_498",xC="_timeline_18j12_502",jC="_timelineRow_18j12_508",AC="_timelineKey_18j12_515",EC="_timelineValue_18j12_521",NC="_timelineDelta_18j12_525",CC="_reviewNotes_18j12_536",DC="_waitingMessage_18j12_553",wC="_errorMessage_18j12_557",kC="_eventOverflowWarning_18j12_561",MC="_attemptSelector_18j12_575",RC="_attemptLabel_18j12_586",OC="_attemptButton_18j12_590",BC="_attemptActive_18j12_607",zC="_attemptStatus_18j12_613",UC="_emptyCta_18j12_619",VC="_ctaTitle_18j12_631",LC="_ctaDescription_18j12_637",HC="_ctaButton_18j12_644",GC="_projectHeader_18j12_688",IC="_projectName_18j12_712",qC="_projectMeta_18j12_725",YC="_metaRow_18j12_733",ZC="_metaLabel_18j12_740",XC="_metaValue_18j12_750",KC="_metaPlaceholder_18j12_760",QC="_editButton_18j12_765",PC="_editInput_18j12_781",FC="_editTextarea_18j12_812",JC="_editSelect_18j12_847",$C="_archiveButton_18j12_879",WC="_repoLink_18j12_901",tD="_metaValueClickable_18j12_911",eD="_editHint_18j12_930",nD="_editError_18j12_939",aD="_editInputInvalid_18j12_946",sD="_unsavedDot_18j12_951",iD="_metaToggle_18j12_960",lD="_metaToggleArrow_18j12_981",oD="_metaToggleArrowOpen_18j12_986",rD="_progressBarContainer_18j12_990",cD="_progressBar_18j12_990",uD="_progressFill_18j12_1006",dD="_progressLabel_18j12_1013",fD="_metaTimestamps_18j12_1020",hD="_metaTimestamp_18j12_1020",mD="_editFieldWrapper_18j12_1036",A={panelContainer:NN,emptyState:CN,projectSummary:DN,projectSummaryTitle:wN,projectSummarySubtitle:kN,header:MN,headerInfo:RN,killButton:ON,headerTitle:BN,headerActions:zN,taskStatusBadge:UN,taskBranch:VN,taskBlockedBadge:LN,btnPrimary:HN,btnDanger:GN,rejectInput:IN,tabBar:qN,tab:YN,active:ZN,eventScroll:XN,tabContent:KN,noContext:QN,overviewContent:PN,overviewDashboard:FN,overviewHero:JN,statusBadge:$N,statusPending:WN,statusAssigned:tC,statusInProgress:eC,statusReview:nC,statusDone:aC,statusFailed:sC,statusWaitingInput:iC,overviewBranchPill:lC,branchLink:oC,overviewSection:rC,overviewLabel:cC,overviewValue:uC,overviewMuted:dC,overviewMarkdown:fC,envRow:hC,envDot:mC,envDotGreen:pC,envDotYellow:gC,envDotRed:vC,envDotGray:yC,depList:bC,depItem:SC,depBlocked:_C,depDone:TC,timeline:xC,timelineRow:jC,timelineKey:AC,timelineValue:EC,timelineDelta:NC,reviewNotes:CC,waitingMessage:DC,errorMessage:wC,eventOverflowWarning:kC,attemptSelector:MC,attemptLabel:RC,attemptButton:OC,attemptActive:BC,attemptStatus:zC,emptyCta:UC,ctaTitle:VC,ctaDescription:LC,ctaButton:HC,projectHeader:GC,projectName:IC,projectMeta:qC,metaRow:YC,metaLabel:ZC,metaValue:XC,metaPlaceholder:KC,editButton:QC,editInput:PC,editTextarea:FC,editSelect:JC,archiveButton:$C,repoLink:WC,metaValueClickable:tD,editHint:eD,editError:nD,editInputInvalid:aD,unsavedDot:sD,metaToggle:iD,metaToggleArrow:lD,metaToggleArrowOpen:oD,progressBarContainer:rD,progressBar:cD,progressFill:uD,progressLabel:dD,metaTimestamps:fD,metaTimestamp:hD,editFieldWrapper:mD};function _v(a,i){const l=[];let o=a;const u=new Set;for(;o&&i.has(o)&&!u.has(o);){u.add(o);const h=i.get(o);l.unshift(h),o=h.parentTaskId||void 0}return l}function pD(a,i,l){const o={label:"Home",viewMode:{kind:"empty"}};switch(a.kind){case"empty":return[{label:"Home",viewMode:void 0}];case"settings":return[o,{label:"Settings",viewMode:void 0}];case"persona_management":return[o,{label:"Personas",viewMode:void 0}];case"new_environment":return[o,{label:"New Environment",viewMode:void 0}];case"project":{const u=i.find(h=>h.id===a.projectId);return[o,{label:(u==null?void 0:u.name)??"Project",viewMode:void 0}]}case"new_task":{const u=i.find(d=>d.id===a.projectId),h=[o,{label:(u==null?void 0:u.name)??"Project",viewMode:{kind:"project",projectId:a.projectId}}];if(a.parentTaskId){const d=_v(a.parentTaskId,l);for(const p of d)h.push({label:p.title,viewMode:{kind:"task",taskId:p.id}})}return h.push({label:"New Task",viewMode:void 0}),h}case"task":{const u=_v(a.taskId,l),h=l.get(a.taskId),d=h==null?void 0:h.projectId,p=d?i.find(b=>b.id===d):void 0,g=[o];p&&g.push({label:p.name,viewMode:{kind:"project",projectId:p.id}});for(let b=0;b<u.length-1;b++)g.push({label:u[b].title,viewMode:{kind:"task",taskId:u[b].id}});const v=u[u.length-1];return g.push({label:(v==null?void 0:v.title)??a.taskId,viewMode:void 0}),g}case"new_chat":return[o,{label:"New Chat",viewMode:void 0}];case"session":return[o,{label:`Session ${a.sessionId.slice(0,8)}`,viewMode:void 0}];default:return[{label:"Home",viewMode:void 0}]}}function gD({sessionId:a,session:i,isActive:l,onKill:o}){return f.jsxs("div",{className:A.header,children:[f.jsxs("span",{children:["Session: ",a.slice(0,8),i&&` | ${i.runtime} | ${i.status}`]}),f.jsxs("span",{className:A.headerInfo,children:[i&&f.jsx("span",{children:i.prompt.length>60?i.prompt.slice(0,60)+"...":i.prompt}),l&&f.jsx("button",{onClick:()=>o(a),title:"Stop session",className:A.killButton,children:"×"})]})]})}function sy({eventsDropped:a}){return a<=0?f.jsx(f.Fragment,{}):f.jsxs("div",{className:A.eventOverflowWarning,role:"alert",children:["⚠ ",a.toLocaleString()," older event",a===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function vD({sessionEvents:a,session:i,eventsDropped:l,scrollRef:o}){const u=i&&["completed","failed","killed"].includes(i.status),h=u?`Session ${i.status} with no events recorded.`:"Waiting for events...";return f.jsxs("div",{ref:o,className:A.eventScroll,children:[a.length===0&&f.jsx("div",{className:u?A.errorMessage:A.waitingMessage,children:h}),f.jsx(sy,{eventsDropped:l}),a.map((d,p)=>f.jsx(W0,{event:d},`${d.sessionId}-${d.timestamp}-${p}`))]})}function yD(a){const i=[];for(const l of a){const o=i[i.length-1];l.eventType==="text"&&(o==null?void 0:o.eventType)==="text"?i[i.length-1]={...o,content:o.content+l.content}:i.push(l)}return i}function $o(a){if(!a)return"—";const i=new Date(a);return isNaN(i.getTime())?"—":i.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Iu(a,i){if(!a||!i)return;const l=new Date(i).getTime()-new Date(a).getTime();if(isNaN(l)||l<0)return;const o=Math.floor(l/6e4),u=Math.floor(l%6e4/1e3);if(o===0)return`${u}s`;const h=Math.floor(o/60),d=o%60;return h===0?`${o}m ${u}s`:`${h}h ${d}m`}function iy(a){const i=a.toLowerCase();return i==="ready"||i==="running"||i==="available"||i==="connected"?A.envDotGreen:i==="provisioning"||i==="starting"||i==="pending"||i==="connecting"?A.envDotYellow:i==="error"||i==="failed"||i==="disconnected"?A.envDotRed:A.envDotGray}function Tv(a){if(!a)return"";const i=new Date(a);if(isNaN(i.getTime()))return"";const o=Date.now()-i.getTime();if(o<0)return"just now";const u=Math.floor(o/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const h=Math.floor(u/60);if(h<24)return`${h}h ago`;const d=Math.floor(h/24);return d<30?`${d}d ago`:i.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function bD({status:a}){const i={pending:"Pending",assigned:"Assigned",in_progress:"In Progress",waiting_input:"Waiting for Input",review:"Review",done:"Done",failed:"Failed"},l={pending:A.statusPending,assigned:A.statusAssigned,in_progress:A.statusInProgress,waiting_input:A.statusWaitingInput,review:A.statusReview,done:A.statusDone,failed:A.statusFailed};return f.jsx("span",{className:`${A.statusBadge} ${l[a]??A.statusPending}`,children:i[a]??a})}function SD({task:a,tasksById:i,environments:l,projects:o}){const u=l.find(p=>p.id===a.environmentId),h=o.find(p=>p.id===a.projectId),d=a.branch&&(h!=null&&h.repoUrl)?`${h.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(a.branch)}`:void 0;return f.jsxs("div",{className:A.overviewDashboard,children:[f.jsxs("div",{className:A.overviewHero,children:[f.jsx(bD,{status:a.status}),a.branch&&f.jsx("span",{className:A.overviewBranchPill,children:d?f.jsxs("a",{href:d,target:"_blank",rel:"noreferrer noopener",className:A.branchLink,children:["🔗"," ",a.branch]}):f.jsxs("span",{children:["🔗"," ",a.branch]})})]}),typeof a.description=="string"&&a.description&&f.jsxs("div",{className:A.overviewSection,children:[f.jsx("div",{className:A.overviewLabel,children:"Description"}),f.jsx("div",{className:A.overviewMarkdown,children:f.jsx(od,{remarkPlugins:[rd],children:a.description})})]}),a.environmentId&&f.jsxs("div",{className:A.overviewSection,children:[f.jsx("div",{className:A.overviewLabel,children:"Environment"}),f.jsxs("div",{className:A.envRow,children:[u&&f.jsx("span",{className:`${A.envDot} ${iy(u.status)}`,title:u.status,"aria-label":`Status: ${u.status}`,role:"img"}),f.jsx("span",{className:A.overviewValue,children:(u==null?void 0:u.displayName)??a.environmentId})]})]}),f.jsxs("div",{className:A.overviewSection,children:[f.jsx("div",{className:A.overviewLabel,children:"Dependencies"}),a.dependsOn.length===0?f.jsx("div",{className:A.overviewMuted,children:"None"}):f.jsx("div",{className:A.depList,children:a.dependsOn.map(p=>{const g=i.get(p),v=(g==null?void 0:g.status)==="done";return f.jsxs("div",{className:`${A.depItem} ${v?A.depDone:A.depBlocked}`,children:[f.jsx("span",{children:v?"✓":"○"}),f.jsx("span",{children:(g==null?void 0:g.title)??p})]},p)})})]}),f.jsxs("div",{className:A.overviewSection,children:[f.jsx("div",{className:A.overviewLabel,children:"Timeline"}),f.jsxs("div",{className:A.timeline,children:[a.createdAt&&f.jsxs("div",{className:A.timelineRow,children:[f.jsx("span",{className:A.timelineKey,children:"Created"}),f.jsx("span",{className:A.timelineValue,children:$o(a.createdAt)})]}),a.assignedAt&&(()=>{const p=Iu(a.createdAt,a.assignedAt);return f.jsxs("div",{className:A.timelineRow,children:[f.jsx("span",{className:A.timelineKey,children:"Assigned"}),f.jsx("span",{className:A.timelineValue,children:$o(a.assignedAt)}),p!==void 0&&f.jsx("span",{className:A.timelineDelta,children:p})]})})(),a.startedAt&&(()=>{const p=Iu(a.assignedAt??a.createdAt,a.startedAt);return f.jsxs("div",{className:A.timelineRow,children:[f.jsx("span",{className:A.timelineKey,children:"Started"}),f.jsx("span",{className:A.timelineValue,children:$o(a.startedAt)}),p!==void 0&&f.jsx("span",{className:A.timelineDelta,children:p})]})})(),a.completedAt&&(()=>{const p=Iu(a.startedAt,a.completedAt);return f.jsxs("div",{className:A.timelineRow,children:[f.jsx("span",{className:A.timelineKey,children:"Completed"}),f.jsx("span",{className:A.timelineValue,children:$o(a.completedAt)}),p!==void 0&&f.jsx("span",{className:A.timelineDelta,children:p})]})})(),!a.createdAt&&!a.assignedAt&&!a.startedAt&&!a.completedAt&&f.jsx("div",{className:A.overviewMuted,children:"No timing data"})]})]}),a.reviewNotes&&f.jsxs("div",{className:A.overviewSection,children:[f.jsx("div",{className:A.overviewLabel,children:"Review Notes"}),f.jsx("div",{className:A.reviewNotes,children:a.reviewNotes})]})]})}function _D({task:a,sessionId:i,isBlocked:l,rejectNotes:o,onRejectNotesChange:u,onStart:h,onStop:d,onApprove:p,onReject:g,onDelete:v}){if(a.status==="pending"||a.status==="assigned")return l?f.jsx("div",{className:A.headerActions,children:f.jsx("button",{onClick:v,className:A.btnDanger,children:"Delete"})}):f.jsxs("div",{className:A.headerActions,children:[f.jsx("button",{onClick:h,className:A.btnPrimary,children:"Start"}),f.jsx("button",{onClick:v,className:A.btnDanger,children:"Delete"})]});if(a.status==="in_progress"||a.status==="waiting_input")return f.jsx("div",{className:A.headerActions,children:f.jsx("button",{onClick:d,disabled:!i,className:A.btnDanger,children:"Stop"})});if(a.status==="review")return f.jsxs("div",{className:A.headerActions,children:[f.jsx("input",{type:"text",value:o,onChange:b=>u(b.target.value),placeholder:"Rejection notes...",className:A.rejectInput}),f.jsx("button",{onClick:p,className:A.btnPrimary,children:"Approve"}),f.jsx("button",{onClick:g,className:A.btnDanger,children:"Reject"})]});if(a.status==="done")return f.jsx("div",{className:A.headerActions,children:f.jsx("button",{onClick:v,className:A.btnDanger,children:"Delete"})});if(a.status==="failed")return f.jsxs("div",{className:A.headerActions,children:[f.jsx("button",{onClick:h,className:A.btnPrimary,children:"Retry"}),f.jsx("button",{onClick:v,className:A.btnDanger,children:"Delete"})]})}function TD({taskSessions:a,selectedSessionId:i,onSelect:l}){if(!(a.length<2))return f.jsxs("div",{className:A.attemptSelector,"data-testid":"attempt-selector",children:[f.jsx("span",{className:A.attemptLabel,children:"Attempts:"}),a.map((o,u)=>{const h=o.id===i,d=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="waiting_input"?"●":"";return f.jsxs("button",{className:`${A.attemptButton} ${h?A.attemptActive:""}`,onClick:()=>l(o.id),title:`Attempt #${u+1} — ${o.status}`,"aria-label":`Attempt #${u+1}, ${o.status}`,"aria-pressed":h,"data-testid":`attempt-${u+1}`,children:["#",u+1,d&&f.jsx("span",{className:A.attemptStatus,children:d})]},o.id)})]})}function xD({viewMode:a,setViewMode:i}){const{events:l,eventsDropped:o,sessions:u,tasks:h,environments:d,loadSessionEvents:p,loadFindings:g,kill:v,startTask:b,approveTask:S,rejectTask:x,deleteTask:D,projects:k,createProject:O,archiveProject:Y,updateProject:L,taskSessions:Q,loadTaskSessions:R}=Un(),tt=_.useRef(null),Z=_.useRef(void 0),[P,at]=_.useState("overview"),[z,nt]=_.useState("tasks"),[dt,yt]=_.useState(""),[zt,$]=_.useState(!1),[Xt,Ut]=_.useState(!1),[B,X]=_.useState(void 0),rt=_.useRef(void 0),bt=_.useRef(void 0),[Tt,Pt]=_.useState(null),[Et,St]=_.useState(""),[G,Kt]=_.useState(""),[fe,Ze]=_.useState(!1),Xe=_.useRef(void 0),ee=_.useRef(null),Je=_.useRef(null),Ie=_.useRef(null),$e=_.useRef(null),We=_.useRef(null),ve=a.kind==="project"?a.projectId:void 0;_.useEffect(()=>{const U=Xe.current;Xe.current=ve,!(U===void 0||U===ve)&&(Tt!==null||Et!=="")&&(Pt(null),St(""))},[ve,Tt,Et]),_.useEffect(()=>{if(Tt===null)return;const U=Tt==="name"?Je.current:Tt==="description"?Ie.current:Tt==="repoUrl"?$e.current:We.current;if(!U)return;const Ne=window.setTimeout(()=>{U.focus()},0);return()=>{window.clearTimeout(Ne)}},[Tt]);let F,Re;a.kind==="task"&&(F=h.find(U=>U.id===a.taskId),Re=(F==null?void 0:F.projectId)||void 0);const q=F?Q[F.id]??[]:[];let K;a.kind==="session"?K=a.sessionId:a.kind==="task"&&(B&&q.some(U=>U.id===B)?K=B:K=(F==null?void 0:F.sessionId)||void 0);const ot=()=>{$(!0)},ut=()=>{F&&(D(F.id),$(!1),i({kind:"project",projectId:F.projectId}))};a.kind==="task"&&(F==null?void 0:F.id)!==rt.current&&(rt.current=F==null?void 0:F.id,P!=="overview"&&at("overview"),dt!==""&&yt(""),B!==void 0&&X(void 0));const ft=_.useRef(void 0),pt=_.useRef(void 0);if(_.useEffect(()=>{if(!(F!=null&&F.id))return;const U=F.id!==ft.current,Ne=F.sessionId!==pt.current;(U||Ne)&&(ft.current=F.id,pt.current=F.sessionId,R(F.id))},[F==null?void 0:F.id,F==null?void 0:F.sessionId,R]),(F==null?void 0:F.status)!==bt.current){bt.current=F==null?void 0:F.status;const U=(F==null?void 0:F.status)==="pending"||(F==null?void 0:F.status)==="assigned"?"overview":(F==null?void 0:F.status)==="in_progress"||(F==null?void 0:F.status)==="waiting_input"||(F==null?void 0:F.status)==="review"?"stream":(F==null?void 0:F.status)==="done"?"findings":void 0;U&&U!==P&&at(U)}const jt=_.useMemo(()=>{const U=K?l.filter(Ne=>Ne.sessionId===K):[];return yD(U)},[l,K]),Mt=_.useMemo(()=>new Map(h.map(U=>[U.id,U])),[h]),mt=F?F.dependsOn.some(U=>{const Ne=Mt.get(U);return Ne!==void 0&&Ne.status!=="done"}):!1,et=_.useMemo(()=>pD(a,k,Mt),[a,k,Mt]),Nt=U=>{U.viewMode&&i(U.viewMode)},J=K?u.find(U=>U.id===K)??void 0:void 0;if(_.useEffect(()=>{K&&K!==Z.current&&(Z.current=K,p(K))},[K,p]),_.useEffect(()=>{P==="findings"&&Re&&g(Re)},[P,Re,g]),_.useEffect(()=>{tt.current&&P==="stream"&&(tt.current.scrollTop=tt.current.scrollHeight)},[jt.length,P]),a.kind==="settings")return f.jsxs("div",{className:A.panelContainer,children:[f.jsx(Ga,{segments:et,onNavigate:Nt}),f.jsx(LE,{viewMode:a,setViewMode:i})]});if(a.kind==="persona_management")return f.jsxs("div",{className:A.panelContainer,children:[f.jsx(Ga,{segments:et,onNavigate:Nt}),f.jsx(sN,{})]});if(a.kind==="empty")return k.length===0?f.jsxs("div",{className:A.emptyCta,children:[f.jsx("div",{className:A.ctaTitle,children:"Welcome to Grackle"}),f.jsx("div",{className:A.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),f.jsx("button",{className:A.ctaButton,onClick:()=>{const U=window.prompt("Project name:");U!=null&&U.trim()&&O(U.trim())},children:"Create Your First Project"})]}):f.jsx("div",{className:A.emptyState,children:"Select a project or task to get started"});if(a.kind==="new_chat")return f.jsxs("div",{className:A.panelContainer,children:[f.jsx(Ga,{segments:et,onNavigate:Nt}),f.jsx("div",{className:A.emptyState,children:"Enter a prompt below to start a new session"})]});if(a.kind==="project"){const U=k.find(lt=>lt.id===a.projectId),Ne=h.filter(lt=>lt.projectId===a.projectId),Kn=Ne.filter(lt=>lt.status==="done").length,Oe=Ne.length,Be=Oe>0?Math.round(Kn/Oe*100):0,W=100,At=(lt,re)=>{ee.current=lt,Pt(lt),St(re),Kt("")},qt=()=>{ee.current=null,Pt(null),St(""),Kt("")},ae=(lt,re)=>{if(lt==="name"){const rn=re.trim();if(!rn)return"Name is required";if(rn.length>W)return`Max ${W} characters`}if(lt==="repoUrl"){const rn=re.trim();if(rn&&!/^https?:\/\/.+/.test(rn))return"Must be a valid http(s) URL"}return""},gt=lt=>{if(!U)return;const re=Et.trim(),rn=ae(lt,Et);if(rn){Kt(rn);return}if(lt==="name"){if(re===U.name){qt();return}L(U.id,{name:re})}else if(lt==="description"){const pa=Et;if(pa===U.description){qt();return}L(U.id,{description:pa})}else if(lt==="repoUrl"){if(re===U.repoUrl){qt();return}L(U.id,{repoUrl:re})}else if(lt==="defaultEnvironmentId"){if(Et===U.defaultEnvironmentId){qt();return}L(U.id,{defaultEnvironmentId:Et})}qt()},ze=(lt,re)=>{lt.key==="Escape"?qt():lt.key==="Enter"&&re!=="description"&&gt(re)},Ke=lt=>U?lt==="name"?Et.trim()!==U.name:lt==="description"?Et!==U.description:lt==="repoUrl"?Et.trim()!==U.repoUrl:lt==="defaultEnvironmentId"?Et!==U.defaultEnvironmentId:!1:!1,kn=d.find(lt=>lt.id===(U==null?void 0:U.defaultEnvironmentId)),tn=Tt==="description"?"Tab to save · Esc to cancel":"Enter to save · Esc to cancel";return f.jsxs("div",{className:A.panelContainer,children:[f.jsx(Ga,{segments:et,onNavigate:Nt}),f.jsxs("div",{className:A.projectHeader,children:[f.jsx("span",{className:A.projectName,"data-testid":"project-name",children:Tt==="name"?f.jsxs("div",{className:A.editFieldWrapper,children:[f.jsx("input",{ref:Je,className:`${A.editInput} ${G?A.editInputInvalid:""}`,value:Et,onChange:lt=>{St(lt.target.value),Kt("")},onBlur:lt=>{if(ee.current==="name"){ee.current=null;return}lt.relatedTarget instanceof HTMLElement&&lt.relatedTarget.dataset.editAction==="name"||gt("name")},onKeyDown:lt=>ze(lt,"name"),maxLength:W,"aria-label":"Project name","data-testid":"edit-name-input"}),Ke("name")&&f.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),G&&f.jsx("span",{className:A.editError,"data-testid":"edit-error",children:G}),f.jsx("span",{className:A.editHint,children:tn})]}):f.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>At("name",(U==null?void 0:U.name)||""),title:"Click to edit name","aria-label":`Edit project name: ${(U==null?void 0:U.name)||a.projectId}`,"data-testid":"edit-name-button",children:[(U==null?void 0:U.name)||a.projectId,f.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})}),f.jsx("button",{className:A.archiveButton,onClick:()=>Ut(!0),title:"Archive project","data-testid":"archive-project-button",children:"Archive"})]}),f.jsxs("button",{className:A.metaToggle,onClick:()=>Ze(!fe),"aria-expanded":!fe,"aria-controls":"project-meta-panel","data-testid":"meta-toggle",children:[f.jsx("span",{className:`${A.metaToggleArrow} ${fe?"":A.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!fe&&f.jsxs("div",{className:A.projectMeta,"data-testid":"project-meta",id:"project-meta-panel",children:[f.jsxs("div",{className:A.metaRow,children:[f.jsx("span",{className:A.metaLabel,children:"Description"}),f.jsx("div",{className:A.metaValue,children:Tt==="description"?f.jsxs("div",{className:A.editFieldWrapper,children:[f.jsx("textarea",{ref:Ie,className:A.editTextarea,value:Et,onChange:lt=>{St(lt.target.value),Kt("")},onBlur:lt=>{if(ee.current==="description"){ee.current=null;return}lt.relatedTarget instanceof HTMLElement&&lt.relatedTarget.dataset.editAction==="description"||gt("description")},onKeyDown:lt=>ze(lt,"description"),title:"Project description","aria-label":"Project description","data-testid":"edit-description-input"}),Ke("description")&&f.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),f.jsx("span",{className:A.editHint,children:tn})]}):f.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>At("description",(U==null?void 0:U.description)||""),title:"Click to edit description","aria-label":"Edit project description","data-testid":"edit-description-button",children:[U!=null&&U.description?f.jsx("span",{className:A.overviewMarkdown,children:f.jsx(od,{remarkPlugins:[rd],children:U.description})}):f.jsx("span",{className:A.metaPlaceholder,children:"No description"}),f.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),f.jsxs("div",{className:A.metaRow,children:[f.jsx("span",{className:A.metaLabel,children:"Repository"}),f.jsx("div",{className:A.metaValue,children:Tt==="repoUrl"?f.jsxs("div",{className:A.editFieldWrapper,children:[f.jsx("input",{ref:$e,className:`${A.editInput} ${G?A.editInputInvalid:""}`,value:Et,onChange:lt=>{St(lt.target.value),Kt("")},onBlur:lt=>{if(ee.current==="repoUrl"){ee.current=null;return}lt.relatedTarget instanceof HTMLElement&&lt.relatedTarget.dataset.editAction==="repoUrl"||gt("repoUrl")},onKeyDown:lt=>ze(lt,"repoUrl"),placeholder:"https://github.com/...","aria-label":"Project repository URL","data-testid":"edit-repo-input"}),Ke("repoUrl")&&f.jsx("span",{className:A.unsavedDot,title:"Unsaved changes"}),G&&f.jsx("span",{className:A.editError,"data-testid":"edit-error",children:G}),f.jsx("span",{className:A.editHint,children:tn})]}):f.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:lt=>{lt.preventDefault(),At("repoUrl",(U==null?void 0:U.repoUrl)||"")},title:"Click to edit repository URL","aria-label":"Edit project repository URL","data-testid":"edit-repo-button",children:[U!=null&&U.repoUrl&&/^https?:\/\//i.test(U.repoUrl)?f.jsx("a",{className:A.repoLink,href:U.repoUrl,target:"_blank",rel:"noopener noreferrer",onClick:lt=>lt.stopPropagation(),children:U.repoUrl}):U!=null&&U.repoUrl?f.jsx("span",{children:U.repoUrl}):f.jsx("span",{className:A.metaPlaceholder,children:"No repository"}),f.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),f.jsxs("div",{className:A.metaRow,children:[f.jsx("span",{className:A.metaLabel,children:"Environment"}),f.jsx("div",{className:A.metaValue,children:Tt==="defaultEnvironmentId"?f.jsxs("select",{ref:We,className:A.editSelect,value:Et,onChange:lt=>{ee.current=null,St(lt.target.value);const re=lt.target.value;U&&re!==U.defaultEnvironmentId&&L(U.id,{defaultEnvironmentId:re}),qt()},onBlur:lt=>{if(ee.current==="defaultEnvironmentId"){ee.current=null;return}lt.relatedTarget instanceof HTMLElement&&lt.relatedTarget.dataset.editAction==="defaultEnvironmentId"||qt()},title:"Default environment","aria-label":"Project default environment","data-testid":"edit-env-select",children:[f.jsx("option",{value:"",children:"None"}),d.map(lt=>f.jsx("option",{value:lt.id,children:lt.displayName},lt.id))]}):f.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>At("defaultEnvironmentId",(U==null?void 0:U.defaultEnvironmentId)||""),title:"Click to change default environment","aria-label":"Edit project default environment","data-testid":"edit-env-button",children:[kn?f.jsxs("span",{className:A.envRow,children:[f.jsx("span",{className:`${A.envDot} ${iy(kn.status)}`}),kn.displayName]}):f.jsx("span",{className:A.metaPlaceholder,children:(U==null?void 0:U.defaultEnvironmentId)||"No default environment"}),f.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),U&&f.jsxs("div",{className:A.metaTimestamps,children:[f.jsxs("span",{className:A.metaTimestamp,children:["Created ",Tv(U.createdAt)]}),U.updatedAt&&U.updatedAt!==U.createdAt&&f.jsxs("span",{className:A.metaTimestamp,children:["· Updated ",Tv(U.updatedAt)]})]})]}),Oe>0&&f.jsxs("div",{className:A.progressBarContainer,"data-testid":"progress-bar",children:[f.jsx("div",{className:A.progressBar,children:f.jsx("div",{className:A.progressFill,style:{width:`${Be}%`}})}),f.jsxs("span",{className:A.progressLabel,children:[Kn,"/",Oe]})]}),f.jsxs("div",{className:A.tabBar,role:"tablist","aria-label":"Project view",children:[f.jsx("button",{role:"tab","aria-selected":z==="graph",className:`${A.tab} ${z==="graph"?A.active:""}`,onClick:()=>nt("graph"),children:"Graph"}),f.jsx("button",{role:"tab","aria-selected":z==="tasks",className:`${A.tab} ${z==="tasks"?A.active:""}`,onClick:()=>nt("tasks"),children:"Tasks"})]}),z==="tasks"&&Oe>0&&f.jsxs("div",{className:A.projectSummary,children:[f.jsx("span",{className:A.projectSummaryTitle,children:`${Kn}/${Oe} tasks complete`}),f.jsx("span",{className:A.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),z==="tasks"&&Oe===0&&f.jsxs("div",{className:A.emptyCta,children:[f.jsx("button",{className:A.ctaButton,onClick:()=>i({kind:"new_task",projectId:a.projectId}),children:"Create Task"}),f.jsx("div",{className:A.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),z==="graph"&&f.jsx(EN,{projectId:a.projectId,setViewMode:i}),f.jsx(ur,{isOpen:Xt,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{U&&(Y(U.id),i({kind:"empty"})),Ut(!1)},onCancel:()=>Ut(!1)})]})}if(a.kind==="new_environment")return f.jsxs("div",{className:A.panelContainer,children:[f.jsx(Ga,{segments:et,onNavigate:Nt}),f.jsx("div",{className:A.emptyState,children:"Configure the new environment below"})]});if(a.kind==="new_task")return f.jsxs("div",{className:A.panelContainer,children:[f.jsx(Ga,{segments:et,onNavigate:Nt}),f.jsx("div",{className:A.emptyState,children:"Fill in the task details below"})]});if(a.kind==="task")return f.jsxs("div",{className:A.panelContainer,children:[f.jsx(Ga,{segments:et,onNavigate:Nt}),f.jsxs("div",{className:A.header,children:[f.jsxs("span",{className:A.headerTitle,children:[f.jsx("span",{"data-testid":"task-title",children:(F==null?void 0:F.title)||a.taskId}),F&&f.jsx("span",{className:A.taskStatusBadge,"data-testid":"task-status",children:F.status}),(F==null?void 0:F.branch)&&f.jsx("span",{className:A.taskBranch,children:F.branch}),mt&&f.jsx("span",{className:A.taskBlockedBadge,children:"blocked"})]}),F&&f.jsx(_D,{task:F,sessionId:K,isBlocked:mt,rejectNotes:dt,onRejectNotesChange:yt,onStart:()=>b(F.id),onStop:()=>K&&v(K),onApprove:()=>S(F.id),onReject:()=>{x(F.id,dt),yt("")},onDelete:ot})]}),f.jsxs("div",{className:A.tabBar,role:"tablist","aria-label":"Task view",children:[f.jsx("button",{role:"tab","aria-selected":P==="overview",className:`${A.tab} ${P==="overview"?A.active:""}`,onClick:()=>at("overview"),children:"Overview"}),f.jsx("button",{role:"tab","aria-selected":P==="stream",className:`${A.tab} ${P==="stream"?A.active:""}`,onClick:()=>at("stream"),children:"Stream"}),f.jsx("button",{role:"tab","aria-selected":P==="findings",className:`${A.tab} ${P==="findings"?A.active:""}`,onClick:()=>at("findings"),children:"Findings"})]}),f.jsxs(vi,{mode:"wait",children:[P==="overview"&&f.jsx(Xn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:A.overviewContent,children:F?f.jsx(SD,{task:F,tasksById:Mt,environments:d,projects:k}):f.jsx("div",{className:A.waitingMessage,children:"No additional details"})},"overview"),P==="stream"&&f.jsxs(Xn.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:[f.jsx(TD,{taskSessions:q,selectedSessionId:K,onSelect:U=>{X(U)}}),f.jsxs("div",{ref:tt,className:A.eventScroll,children:[!K&&F&&f.jsxs("div",{className:A.emptyCta,children:[f.jsx("button",{className:A.ctaButton,onClick:()=>b(F.id),children:"Start Task"}),f.jsx("div",{className:A.ctaDescription,children:"Click to begin agent execution"})]}),K&&jt.length===0&&f.jsx("div",{className:A.waitingMessage,children:"Waiting for events..."}),f.jsx(sy,{eventsDropped:o}),jt.map((U,Ne)=>f.jsx(W0,{event:U},`${U.sessionId}-${U.timestamp}-${Ne}`))]})]},"stream"),P==="findings"&&f.jsx(Xn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:A.tabContent,children:Re?f.jsx(VA,{projectId:Re}):f.jsx("div",{className:A.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),F&&f.jsx(ur,{isOpen:zt,title:"Delete Task?",description:`"${F.title}" will be permanently removed.`,onConfirm:ut,onCancel:()=>$(!1)})]});if(!K)return f.jsx("div",{className:A.emptyState,children:"No session selected"});const Lt=(J==null?void 0:J.status)==="running"||(J==null?void 0:J.status)==="waiting_input";return f.jsxs("div",{className:A.panelContainer,children:[f.jsx(Ga,{segments:et,onNavigate:Nt}),f.jsx(gD,{sessionId:K,session:J,isActive:Lt,onKill:v}),f.jsx(vD,{sessionEvents:jt,session:J,eventsDropped:o,scrollRef:tt})]})}const jD="_toast_1bnyi_1",AD="_success_1bnyi_17",ED="_icon_1bnyi_21",ND="_error_1bnyi_24",CD="_warning_1bnyi_31",DD="_info_1bnyi_37",wD="_message_1bnyi_52",kD="_close_1bnyi_59",pl={toast:jD,success:AD,icon:ED,error:ND,warning:CD,info:DD,message:wD,close:kD},MD={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function RD({toast:a,onDismiss:i}){return _.useEffect(()=>{const l=setTimeout(()=>i(a.id),a.duration);return()=>clearTimeout(l)},[a.id,a.duration,i]),f.jsxs(Xn.div,{className:`${pl.toast} ${pl[a.variant]}`,role:"status",initial:{opacity:0,y:-16,scale:.94},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.94},transition:{duration:.2,ease:"easeOut"},layout:!0,children:[f.jsx("span",{className:pl.icon,"aria-hidden":"true",children:MD[a.variant]}),f.jsx("span",{className:pl.message,children:a.message}),f.jsx("button",{type:"button",className:pl.close,onClick:()=>i(a.id),"aria-label":"Dismiss notification",children:"×"})]})}const OD="_container_qqse2_1",BD={container:OD};function zD(){const{toasts:a,dismissToast:i}=ud();return f.jsx("div",{className:BD.container,"data-testid":"toast-container",children:f.jsx(vi,{children:a.map(l=>f.jsx(RD,{toast:l,onDismiss:i},l.id))})})}const UD="_root_cdda9_1",VD="_body_cdda9_7",LD="_main_cdda9_13",qu={root:UD,body:VD,main:LD},HD=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function GD(){const[a,i]=_.useState({kind:"empty"}),{lastSpawnedId:l}=Un();return _.useEffect(()=>{l&&i({kind:"session",sessionId:l})},[l]),f.jsxs("div",{className:qu.root,children:[f.jsx(oS,{setViewMode:i}),f.jsxs("div",{className:qu.body,children:[f.jsx(sA,{viewMode:a,setViewMode:i}),f.jsxs("div",{className:qu.main,children:[f.jsx(xD,{viewMode:a,setViewMode:i},a.kind==="task"?a.taskId:a.kind==="session"?a.sessionId:a.kind),f.jsx(jA,{viewMode:a,setViewMode:i})]})]}),f.jsx(zD,{})]})}function ID(){const a=HD?Jb:Ib;return f.jsx(Wb,{children:f.jsx(a,{children:f.jsx(GD,{})})})}wb.createRoot(document.getElementById("root")).render(f.jsx(_.StrictMode,{children:f.jsx(ID,{})}));