@grackle-ai/web 0.18.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import{r as hb,a as _,j as f,v as mb,b as pb,t as Ko,i as gb,f as vb,M as od,c as rd}from"./markdown-gcy1Jmzi.js";import{r as yb,d as Bp,H as zp,P as Up,i as bb,B as Sb,a as _b,C as Tb,M as xb}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"]'))r(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"&&r(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 r(u){if(u.ep)return;u.ep=!0;const h=l(u);fetch(u.href,h)}})();var Au={exports:{}},hl={},Nu={exports:{}},Eu={};/**
|
|
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 jb(){return Vp||(Vp=1,(function(a){function i(z,X){var rt=z.length;z.push(X);t:for(;0<rt;){var yt=rt-1>>>1,Tt=z[yt];if(0<u(Tt,X))z[yt]=X,z[rt]=Tt,rt=yt;else break t}}function l(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var X=z[0],rt=z.pop();if(rt!==X){z[0]=rt;t:for(var yt=0,Tt=z.length,Pt=Tt>>>1;yt<Pt;){var At=2*(yt+1)-1,St=z[At],G=At+1,Kt=z[G];if(0>u(St,rt))G<Tt&&0>u(Kt,St)?(z[yt]=Kt,z[G]=rt,yt=G):(z[yt]=St,z[At]=rt,yt=At);else if(G<Tt&&0>u(Kt,rt))z[yt]=Kt,z[G]=rt,yt=G;else break t}}return X}function u(z,X){var rt=z.sortIndex-X.sortIndex;return rt!==0?rt:z.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,R=!1,q=!1,B=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function W(z){for(var X=l(v);X!==null;){if(X.callback===null)r(v);else if(X.startTime<=z)r(v),X.sortIndex=X.expirationTime,i(g,X);else break;X=l(v)}}function Z(z){if(R=!1,W(z),!k)if(l(g)!==null)k=!0,Q||(Q=!0,zt());else{var X=l(v);X!==null&&Vt(Z,X.startTime-z)}}var Q=!1,nt=-1,U=5,et=-1;function dt(){return q?!0:!(a.unstable_now()-et<U)}function bt(){if(q=!1,Q){var z=a.unstable_now();et=z;var X=!0;try{t:{k=!1,R&&(R=!1,F(nt),nt=-1),D=!0;var rt=x;try{e:{for(W(z),S=l(g);S!==null&&!(S.expirationTime>z&&dt());){var yt=S.callback;if(typeof yt=="function"){S.callback=null,x=S.priorityLevel;var Tt=yt(S.expirationTime<=z);if(z=a.unstable_now(),typeof Tt=="function"){S.callback=Tt,W(z),X=!0;break e}S===l(g)&&r(g),W(z)}else r(g);S=l(g)}if(S!==null)X=!0;else{var Pt=l(v);Pt!==null&&Vt(Z,Pt.startTime-z),X=!1}}break t}finally{S=null,x=rt,D=!1}X=void 0}}finally{X?zt():Q=!1}}}var zt;if(typeof O=="function")zt=function(){O(bt)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,Xt=J.port2;J.port1.onmessage=bt,zt=function(){Xt.postMessage(null)}}else zt=function(){B(bt,0)};function Vt(z,X){nt=B(function(){z(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(z){z.callback=null},a.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<z?Math.floor(1e3/z):5},a.unstable_getCurrentPriorityLevel=function(){return x},a.unstable_next=function(z){switch(x){case 1:case 2:case 3:var X=3;break;default:X=x}var rt=x;x=X;try{return z()}finally{x=rt}},a.unstable_requestPaint=function(){q=!0},a.unstable_runWithPriority=function(z,X){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var rt=x;x=z;try{return X()}finally{x=rt}},a.unstable_scheduleCallback=function(z,X,rt){var yt=a.unstable_now();switch(typeof rt=="object"&&rt!==null?(rt=rt.delay,rt=typeof rt=="number"&&0<rt?yt+rt:yt):rt=yt,z){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,z={id:b++,callback:X,priorityLevel:z,startTime:rt,expirationTime:Tt,sortIndex:-1},rt>yt?(z.sortIndex=rt,i(v,z),l(g)===null&&z===l(v)&&(R?(F(nt),nt=-1):R=!0,Vt(Z,rt-yt))):(z.sortIndex=Tt,i(g,z),k||D||(k=!0,Q||(Q=!0,zt()))),z},a.unstable_shouldYield=dt,a.unstable_wrapCallback=function(z){var X=x;return function(){var rt=x;x=X;try{return z.apply(this,arguments)}finally{x=rt}}}})(Eu)),Eu}var Lp;function Ab(){return Lp||(Lp=1,Nu.exports=jb()),Nu.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 Nb(){if(Hp)return hl;Hp=1;var a=Ab(),i=hb(),l=yb();function r(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(r(188))}function v(t){var e=t.alternate;if(!e){if(e=h(t),e===null)throw Error(r(188));return e!==t?null:t}for(var n=t,s=e;;){var o=n.return;if(o===null)break;var c=o.alternate;if(c===null){if(s=o.return,s!==null){n=s;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===n)return g(o),t;if(c===s)return g(o),e;c=c.sibling}throw Error(r(188))}if(n.return!==s.return)n=o,s=c;else{for(var m=!1,y=o.child;y;){if(y===n){m=!0,n=o,s=c;break}if(y===s){m=!0,s=o,n=c;break}y=y.sibling}if(!m){for(y=c.child;y;){if(y===n){m=!0,n=c,s=o;break}if(y===s){m=!0,s=c,n=o;break}y=y.sibling}if(!m)throw Error(r(189))}}if(n.alternate!==s)throw Error(r(190))}if(n.tag!==3)throw Error(r(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"),R=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),F=Symbol.for("react.consumer"),O=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),nt=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),et=Symbol.for("react.activity"),dt=Symbol.for("react.memo_cache_sentinel"),bt=Symbol.iterator;function zt(t){return t===null||typeof t!="object"?null:(t=bt&&t[bt]||t["@@iterator"],typeof t=="function"?t:null)}var J=Symbol.for("react.client.reference");function Xt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===J?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case R:return"Fragment";case B:return"Profiler";case q:return"StrictMode";case Z:return"Suspense";case Q:return"SuspenseList";case et:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case k:return"Portal";case O:return t.displayName||"Context";case F:return(t._context.displayName||"Context")+".Consumer";case W:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case nt:return e=t.displayName||null,e!==null?e:Xt(t.type)||"Memo";case U:e=t._payload,t=t._init;try{return Xt(t(e))}catch{}}return null}var Vt=Array.isArray,z=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},yt=[],Tt=-1;function Pt(t){return{current:t}}function At(t){0>Tt||(t.current=yt[Tt],yt[Tt]=null,Tt--)}function St(t,e){Tt++,yt[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}}At(G),St(G,t)}function ee(){At(G),At(Kt),At(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&&(At(G),At(Kt)),Ze.current===t&&(At(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 P=!1;function Re(t,e){if(!t||P)return"";P=!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 o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.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(o=s=0;s<T.length&&!T[s].includes("DetermineComponentFrameRoot");)s++;for(;o<C.length&&!C[o].includes("DetermineComponentFrameRoot");)o++;if(s===T.length||o===C.length)for(s=T.length-1,o=C.length-1;1<=s&&0<=o&&T[s]!==C[o];)o--;for(;1<=s&&0<=o;s--,o--)if(T[s]!==C[o]){if(s!==1||o!==1)do if(s--,o--,0>o||T[s]!==C[o]){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<=o);break}}}finally{P=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?ve(n):""}function Y(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+=Y(t,n),n=t,t=t.return;while(t);return e}catch(s){return`
|
|
23
|
+
Error generating stack: `+s.message+`
|
|
24
|
+
`+s.stack}}var lt=Object.prototype.hasOwnProperty,ut=a.unstable_scheduleCallback,vt=a.unstable_cancelCallback,mt=a.unstable_shouldYield,Nt=a.unstable_requestPaint,Mt=a.unstable_now,ft=a.unstable_getCurrentPriorityLevel,at=a.unstable_ImmediatePriority,Dt=a.unstable_UserBlockingPriority,$=a.unstable_NormalPriority,It=a.unstable_LowPriority,L=a.unstable_IdlePriority,Ee=a.log,Kn=a.unstable_setDisableYieldValue,Oe=null,Be=null;function tt(t){if(typeof Ee=="function"&&Kn(t),Be&&typeof Be.setStrictMode=="function")try{Be.setStrictMode(Oe,t)}catch{}}var jt=Math.clz32?Math.clz32:pt,qt=Math.log,ae=Math.LN2;function pt(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 it(t,e,n){var s=t.pendingLanes;if(s===0)return 0;var o=0,c=t.suspendedLanes,m=t.pingedLanes;t=t.warmLanes;var y=s&134217727;return y!==0?(s=y&~c,s!==0?o=tn(s):(m&=y,m!==0?o=tn(m):n||(n=y&~t,n!==0&&(o=tn(n))))):(y=s&~c,y!==0?o=tn(y):m!==0?o=tn(m):n||(n=s&~t,n!==0&&(o=tn(n)))),o===0?0:e!==0&&e!==o&&(e&c)===0&&(c=o&-o,n=e&-e,c>=n||c===32&&(n&4194048)!==0)?e:o}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,o,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-jt(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&&o===0&&t.tag!==0&&(t.suspendedLanes|=c&~(m&~e))}function Si(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var s=31-jt(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-jt(n),o=1<<s;o&e|t[s]&e&&(t[s]|=e),n&=~o}}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,Lt="__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[Lt],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(r(33))}function Ns(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){Es(t,e),Es(t+"Capture",e)}function Es(t,e){for(Xd[t]=e,t=0;t<e.length;t++)Zd.add(e[t])}var sy=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 iy(t){return lt.call(Qd,t)?!0:lt.call(Kd,t)?!1:sy.test(t)?Qd[t]=!0:(Kd[t]=!0,!1)}function Ol(t,e,n){if(iy(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 ly(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 o=s.get,c=s.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.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=ly(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 oy=/[\n"\\]/g;function Sn(t){return t.replace(oy,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function br(t,e,n,s,o,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"),o==null&&c!=null&&(t.defaultChecked=!!c),o!=null&&(t.checked=o&&typeof o!="function"&&typeof o!="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,o,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??o,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 o=0;o<n.length;o++)e["$"+n[o]]=!0;for(n=0;n<t.length;n++)o=e.hasOwnProperty("$"+t[n].value),t[n].selected!==o&&(t[n].selected=o),o&&s&&(t[n].defaultSelected=!0)}else{for(n=""+bn(n),e=null,o=0;o<t.length;o++){if(t[o].value===n){t[o].selected=!0,s&&(t[o].defaultSelected=!0);return}e!==null||t[o].disabled||(e=t[o])}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(r(92));if(Vt(s)){if(1<s.length)throw Error(r(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 ry=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||ry.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(r(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 o in e)s=e[o],e.hasOwnProperty(o)&&n[o]!==s&&tf(t,o,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 cy=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),uy=/^[\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 uy.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 o=s[st]||null;if(!o)throw Error(r(90));br(s,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.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 Ni(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(r(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 Ei={};Object.defineProperty(Ei,"passive",{get:function(){Ar=!0}}),window.addEventListener("test",Ei,Ei),window.removeEventListener("test",Ei,Ei)}catch{Ar=!1}var va=null,Nr=null,Vl=null;function sf(){if(Vl)return Vl;var t,e=Nr,n=e.length,s,o="value"in va?va.value:va.textContent,c=o.length;for(t=0;t<n&&e[t]===o[t];t++);var m=n-t;for(s=1;s<=m&&e[n-s]===o[c-s];s++);return Vl=o.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,o,c,m){this._reactName=n,this._targetInst=o,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}),dy=en(Ci),Er,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"?(Er=t.screenX-Di.screenX,Cr=t.screenY-Di.screenY):Cr=Er=0,Di=t),Er)},movementY:function(t){return"movementY"in t?t.movementY:Cr}}),of=en(Il),fy=S({},Il,{dataTransfer:0}),hy=en(fy),my=S({},Ci,{relatedTarget:0}),Dr=en(my),py=S({},Ja,{animationName:0,elapsedTime:0,pseudoElement:0}),gy=en(py),vy=S({},Ja,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),yy=en(vy),by=S({},Ja,{data:0}),rf=en(by),Sy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_y={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"},Ty={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xy(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Ty[t])?!!e[t]:!1}function wr(){return xy}var jy=S({},Ci,{key:function(t){if(t.key){var e=Sy[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"?_y[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}}),Ay=en(jy),Ny=S({},Il,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cf=en(Ny),Ey=S({},Ci,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wr}),Cy=en(Ey),Dy=S({},Ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),wy=en(Dy),ky=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}),My=en(ky),Ry=S({},Ja,{newState:0,oldState:0}),Oy=en(Ry),By=[9,13,27,32],kr=Fn&&"CompositionEvent"in window,wi=null;Fn&&"documentMode"in document&&(wi=document.documentMode);var zy=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 By.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 Uy(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 Vy(t,e){if(Ms)return t==="compositionend"||!kr&&hf(t,e)?(t=sf(),Vl=Nr=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 Ly={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"?!!Ly[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 Hy(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(Hy,e)}}function Gy(t,e,n){t==="focusin"?(Sf(),ki=e,Mi=n,ki.attachEvent("onpropertychange",_f)):t==="focusout"&&Sf()}function Iy(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ql(Mi)}function qy(t,e){if(t==="click")return ql(e)}function Yy(t,e){if(t==="input"||t==="change")return ql(e)}function Zy(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var cn=typeof Object.is=="function"?Object.is:Zy;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 o=n[s];if(!lt.call(e,o)||!cn(t[o],e[o]))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 Xy=Fn&&"documentMode"in document&&11>=document.documentMode,Rs=null,Br=null,Oi=null,zr=!1;function Nf(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={},Ef={};Fn&&(Ef=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 Ef)return Ur[t]=e[n];return t}var Cf=Wa("animationend"),Df=Wa("animationiteration"),wf=Wa("animationstart"),Ky=Wa("transitionrun"),Qy=Wa("transitionstart"),Py=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 o=_n[e];_n[e++]=null;var c=_n[e];if(_n[e++]=null,s!==null&&o!==null){var m=s.pending;m===null?o.next=o:(o.next=m.next,m.next=o),s.pending=o}c!==0&&Rf(n,o,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 o=!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||(o=!0)),t=c,c=c.return;return t.tag===3?(c=t.stateNode,o&&e!==null&&(o=31-jt(n),t=c.hiddenUpdates,s=t[o],s===null?t[o]=[e]:s.push(e),e.lane=n|536870912),c):null}function Kl(t){if(50<nl)throw nl=0,Pc=null,Error(r(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var zs={};function Fy(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 Fy(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,o,c){var m=0;if(s=t,typeof t=="function")Gr(t)&&(m=1);else if(typeof t=="string")m=eb(t,n,G.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case et:return t=un(31,n,e,o),t.elementType=et,t.lanes=c,t;case R:return es(n.children,o,c,e);case q:m=8,o|=24;break;case B:return t=un(12,n,e,o|2),t.elementType=B,t.lanes=c,t;case Z:return t=un(13,n,e,o),t.elementType=Z,t.lanes=c,t;case Q:return t=un(19,n,e,o),t.elementType=Q,t.lanes=c,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case O:m=10;break t;case F:m=9;break t;case W:m=11;break t;case nt:m=14;break t;case U:m=16,s=null;break t}m=29,n=Error(r(130,t===null?"null":typeof t,"")),s=null}return e=un(m,n,e,o),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 o=32-jt(s)-1;s&=~(1<<o),n+=1;var c=32-jt(e)+o;if(30<c){var m=o-o%5;c=(s&(1<<m)-1).toString(32),s>>=m,o-=m,Vn=1<<32-jt(e)+o|n<<o|s,Ln=c+t}else Vn=1<<c|n<<o|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,Ut=!1,ba=null,An=!1,Xr=Error(r(519));function Sa(t){var e=Error(r(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(!Ut)return Hf(t),Ut=!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(r(317));ie=dp(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));ie=dp(t)}else e===27?(e=ie,Oa(t.type)?(t=pu,pu=null,ie=t):ie=e):ie=Ue?En(t.stateNode.nextSibling):null;return!0}function ns(){ie=Ue=null,Ut=!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,At(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 o=t.child;for(o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){var m=o.child;c=c.firstContext;t:for(;c!==null;){var y=c;c=o;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(o.tag===18){if(m=o.return,m===null)throw Error(r(341));m.lanes|=n,c=m.alternate,c!==null&&(c.lanes|=n),Pr(m,n,t),m=null}else m=o.child;if(m!==null)m.return=o;else for(m=o;m!==null;){if(m===t){m=null;break}if(o=m.sibling,o!==null){o.return=m.return,m=o;break}m=m.return}o=m}}function Hs(t,e,n,s){t=null;for(var o=e,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var m=o.alternate;if(m===null)throw Error(r(387));if(m=m.memoizedProps,m!==null){var y=o.type;cn(o.pendingProps.value,m.value)||(t!==null?t.push(y):t=[y])}}else if(o===Ze.current){if(m=o.alternate,m===null)throw Error(r(387));m.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(t!==null?t.push(cl):t=[cl])}o=o.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(r(308));Wn=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Wn=Wn.next=e;return n}var Jy=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()})}},$y=a.unstable_scheduleCallback,Wy=a.unstable_NormalPriority,xe={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jr(){return{controller:new Jy,data:new Map,refCount:0}}function Ui(t){t.refCount--,t.refCount===0&&$y(Wy,function(){t.controller.abort()})}var Vi=null,$r=0,Gs=0,Is=null;function t1(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 e1(t,e){var n=[],s={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return t.then(function(){s.status="fulfilled",s.value=e;for(var o=0;o<n.length;o++)(0,n[o])(e)},function(o){for(s.status="rejected",s.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),s}var qf=z.S;z.S=function(t,e){Nm=Mt(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&t1(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(r(460)),tc=Error(r(474)),Wl=Error(r(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(r(482));t=e,t.status="pending",t.then(function(s){if(e.status==="pending"){var o=e;o.status="fulfilled",o.value=s}},function(s){if(e.status==="pending"){var o=e;o.status="rejected",o.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(r(459));var t=os;return os=null,t}function Qf(t){if(t===qs||t===Wl)throw Error(r(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(r(525)):(t=Object.prototype.toString.call(e),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Pf(t){function e(N,j){if(t){var E=N.deletions;E===null?(N.deletions=[j],N.flags|=16):E.push(j)}}function n(N,j){if(!t)return null;for(;j!==null;)e(N,j),j=j.sibling;return null}function s(N){for(var j=new Map;N!==null;)N.key!==null?j.set(N.key,N):j.set(N.index,N),N=N.sibling;return j}function o(N,j){return N=Jn(N,j),N.index=0,N.sibling=null,N}function c(N,j,E){return N.index=E,t?(E=N.alternate,E!==null?(E=E.index,E<j?(N.flags|=67108866,j):E):(N.flags|=67108866,j)):(N.flags|=1048576,j)}function m(N){return t&&N.alternate===null&&(N.flags|=67108866),N}function y(N,j,E,H){return j===null||j.tag!==6?(j=Ir(E,N.mode,H),j.return=N,j):(j=o(j,E),j.return=N,j)}function T(N,j,E,H){var gt=E.type;return gt===R?V(N,j,E.props.children,H,E.key):j!==null&&(j.elementType===gt||typeof gt=="object"&>!==null&>.$$typeof===U&&ls(gt)===j.type)?(j=o(j,E.props),Hi(j,E),j.return=N,j):(j=Ql(E.type,E.key,E.props,null,N.mode,H),Hi(j,E),j.return=N,j)}function C(N,j,E,H){return j===null||j.tag!==4||j.stateNode.containerInfo!==E.containerInfo||j.stateNode.implementation!==E.implementation?(j=qr(E,N.mode,H),j.return=N,j):(j=o(j,E.children||[]),j.return=N,j)}function V(N,j,E,H,gt){return j===null||j.tag!==7?(j=es(E,N.mode,H,gt),j.return=N,j):(j=o(j,E),j.return=N,j)}function I(N,j,E){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Ir(""+j,N.mode,E),j.return=N,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case D:return E=Ql(j.type,j.key,j.props,null,N.mode,E),Hi(E,j),E.return=N,E;case k:return j=qr(j,N.mode,E),j.return=N,j;case U:return j=ls(j),I(N,j,E)}if(Vt(j)||zt(j))return j=es(j,N.mode,E,null),j.return=N,j;if(typeof j.then=="function")return I(N,eo(j),E);if(j.$$typeof===O)return I(N,Jl(N,j),E);no(N,j)}return null}function w(N,j,E,H){var gt=j!==null?j.key:null;if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return gt!==null?null:y(N,j,""+E,H);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case D:return E.key===gt?T(N,j,E,H):null;case k:return E.key===gt?C(N,j,E,H):null;case U:return E=ls(E),w(N,j,E,H)}if(Vt(E)||zt(E))return gt!==null?null:V(N,j,E,H,null);if(typeof E.then=="function")return w(N,j,eo(E),H);if(E.$$typeof===O)return w(N,j,Jl(N,E),H);no(N,E)}return null}function M(N,j,E,H,gt){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return N=N.get(E)||null,y(j,N,""+H,gt);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case D:return N=N.get(H.key===null?E:H.key)||null,T(j,N,H,gt);case k:return N=N.get(H.key===null?E:H.key)||null,C(j,N,H,gt);case U:return H=ls(H),M(N,j,E,H,gt)}if(Vt(H)||zt(H))return N=N.get(E)||null,V(j,N,H,gt,null);if(typeof H.then=="function")return M(N,j,E,eo(H),gt);if(H.$$typeof===O)return M(N,j,E,Jl(j,H),gt);no(j,H)}return null}function ct(N,j,E,H){for(var gt=null,Ht=null,ht=j,Ct=j=0,Bt=null;ht!==null&&Ct<E.length;Ct++){ht.index>Ct?(Bt=ht,ht=null):Bt=ht.sibling;var Gt=w(N,ht,E[Ct],H);if(Gt===null){ht===null&&(ht=Bt);break}t&&ht&&Gt.alternate===null&&e(N,ht),j=c(Gt,j,Ct),Ht===null?gt=Gt:Ht.sibling=Gt,Ht=Gt,ht=Bt}if(Ct===E.length)return n(N,ht),Ut&&$n(N,Ct),gt;if(ht===null){for(;Ct<E.length;Ct++)ht=I(N,E[Ct],H),ht!==null&&(j=c(ht,j,Ct),Ht===null?gt=ht:Ht.sibling=ht,Ht=ht);return Ut&&$n(N,Ct),gt}for(ht=s(ht);Ct<E.length;Ct++)Bt=M(ht,N,Ct,E[Ct],H),Bt!==null&&(t&&Bt.alternate!==null&&ht.delete(Bt.key===null?Ct:Bt.key),j=c(Bt,j,Ct),Ht===null?gt=Bt:Ht.sibling=Bt,Ht=Bt);return t&&ht.forEach(function(La){return e(N,La)}),Ut&&$n(N,Ct),gt}function _t(N,j,E,H){if(E==null)throw Error(r(151));for(var gt=null,Ht=null,ht=j,Ct=j=0,Bt=null,Gt=E.next();ht!==null&&!Gt.done;Ct++,Gt=E.next()){ht.index>Ct?(Bt=ht,ht=null):Bt=ht.sibling;var La=w(N,ht,Gt.value,H);if(La===null){ht===null&&(ht=Bt);break}t&&ht&&La.alternate===null&&e(N,ht),j=c(La,j,Ct),Ht===null?gt=La:Ht.sibling=La,Ht=La,ht=Bt}if(Gt.done)return n(N,ht),Ut&&$n(N,Ct),gt;if(ht===null){for(;!Gt.done;Ct++,Gt=E.next())Gt=I(N,Gt.value,H),Gt!==null&&(j=c(Gt,j,Ct),Ht===null?gt=Gt:Ht.sibling=Gt,Ht=Gt);return Ut&&$n(N,Ct),gt}for(ht=s(ht);!Gt.done;Ct++,Gt=E.next())Gt=M(ht,N,Ct,Gt.value,H),Gt!==null&&(t&&Gt.alternate!==null&&ht.delete(Gt.key===null?Ct:Gt.key),j=c(Gt,j,Ct),Ht===null?gt=Gt:Ht.sibling=Gt,Ht=Gt);return t&&ht.forEach(function(fb){return e(N,fb)}),Ut&&$n(N,Ct),gt}function te(N,j,E,H){if(typeof E=="object"&&E!==null&&E.type===R&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case D:t:{for(var gt=E.key;j!==null;){if(j.key===gt){if(gt=E.type,gt===R){if(j.tag===7){n(N,j.sibling),H=o(j,E.props.children),H.return=N,N=H;break t}}else if(j.elementType===gt||typeof gt=="object"&>!==null&>.$$typeof===U&&ls(gt)===j.type){n(N,j.sibling),H=o(j,E.props),Hi(H,E),H.return=N,N=H;break t}n(N,j);break}else e(N,j);j=j.sibling}E.type===R?(H=es(E.props.children,N.mode,H,E.key),H.return=N,N=H):(H=Ql(E.type,E.key,E.props,null,N.mode,H),Hi(H,E),H.return=N,N=H)}return m(N);case k:t:{for(gt=E.key;j!==null;){if(j.key===gt)if(j.tag===4&&j.stateNode.containerInfo===E.containerInfo&&j.stateNode.implementation===E.implementation){n(N,j.sibling),H=o(j,E.children||[]),H.return=N,N=H;break t}else{n(N,j);break}else e(N,j);j=j.sibling}H=qr(E,N.mode,H),H.return=N,N=H}return m(N);case U:return E=ls(E),te(N,j,E,H)}if(Vt(E))return ct(N,j,E,H);if(zt(E)){if(gt=zt(E),typeof gt!="function")throw Error(r(150));return E=gt.call(E),_t(N,j,E,H)}if(typeof E.then=="function")return te(N,j,eo(E),H);if(E.$$typeof===O)return te(N,j,Jl(N,E),H);no(N,E)}return typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint"?(E=""+E,j!==null&&j.tag===6?(n(N,j.sibling),H=o(j,E),H.return=N,N=H):(n(N,j),H=Ir(E,N.mode,H),H.return=N,N=H),m(N)):n(N,j)}return function(N,j,E,H){try{Li=0;var gt=te(N,j,E,H);return Ys=null,gt}catch(ht){if(ht===qs||ht===Wl)throw ht;var Ht=un(29,ht,null,N.mode);return Ht.lanes=H,Ht.return=N,Ht}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 o=s.pending;return o===null?e.next=e:(e.next=o.next,o.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 o=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?o=c=m:c=c.next=m,n=n.next}while(n!==null);c===null?o=c=e:c=c.next=e}else o=c=e;n={baseState:s.baseState,firstBaseUpdate:o,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 o=t.updateQueue;Ta=!1;var c=o.firstBaseUpdate,m=o.lastBaseUpdate,y=o.shared.pending;if(y!==null){o.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=o.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=o.callbacks,M===null?o.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=o.shared.pending,y===null)break;M=y,y=M.next,M.next=null,o.lastBaseUpdate=M,o.shared.pending=null}}while(!0);V===null&&(T=I),o.baseState=T,o.firstBaseUpdate=C,o.lastBaseUpdate=V,c===null&&(o.shared.lanes=0),Da|=m,t.lanes=m,t.memoizedState=I}}function Jf(t,e){if(typeof t!="function")throw Error(r(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,At(Zs),At(ao)}var dn=Pt(null),Nn=null;function Aa(t){var e=t.alternate;St(ye,ye.current&1),St(dn,t),Nn===null&&(e===null||Zs.current!==null||e.memoizedState!==null)&&(Nn=t)}function oc(t){St(ye,ye.current),St(dn,t),Nn===null&&(Nn=t)}function th(t){t.tag===22?(St(ye,ye.current),St(dn,t),Nn===null&&(Nn=t)):Na()}function Na(){St(ye,ye.current),St(dn,dn.current)}function fn(t){At(dn),Nn===t&&(Nn=null),At(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,Et=null,$t=null,je=null,io=!1,Xs=!1,cs=!1,lo=0,Yi=0,Ks=null,n1=0;function he(){throw Error(r(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,o,c){return ea=c,Et=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,z.H=t===null||t.memoizedState===null?Uh:jc,cs=!1,c=n(s,o),cs=!1,Xs&&(c=nh(e,n,s,o)),eh(t),c}function eh(t){z.H=Ki;var e=$t!==null&&$t.next!==null;if(ea=0,je=$t=Et=null,io=!1,Yi=0,Ks=null,e)throw Error(r(300));t===null||Ae||(t=t.dependencies,t!==null&&Fl(t)&&(Ae=!0))}function nh(t,e,n,s){Et=t;var o=0;do{if(Xs&&(Ks=null),Yi=0,Xs=!1,25<=o)throw Error(r(301));if(o+=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)}z.H=Vh,c=e(n,s)}while(Xs);return c}function a1(){var t=z.H,e=t.useState()[0];return e=typeof e.then=="function"?Zi(e):e,t=t.useState()[0],($t!==null?$t.memoizedState:null)!==t&&(Et.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=Et=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?Et.memoizedState=je=t:je=je.next=t,je}function be(){if($t===null){var t=Et.alternate;t=t!==null?t.memoizedState:null}else t=$t.next;var e=je===null?Et.memoizedState:je.next;if(e!==null)je=e,$t=t;else{if(t===null)throw Et.alternate===null?Error(r(467)):Error(r(310));$t=t,t={memoizedState:$t.memoizedState,baseState:$t.baseState,baseQueue:$t.baseQueue,queue:$t.queue,next:null},je===null?Et.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=Et,(je===null?e.memoizedState:je.next)===null&&(e=e.alternate,z.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===O)return Ve(t)}throw Error(r(438,String(t)))}function hc(t){var e=null,n=Et.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var s=Et.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(e={data:s.data.map(function(o){return o.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=oo(),Et.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(r(311));s.lastRenderedReducer=n;var o=t.baseQueue,c=s.pending;if(c!==null){if(o!==null){var m=o.next;o.next=c.next,c.next=m}e.baseQueue=o=c,s.pending=null}if(c=t.baseState,o===null)t.memoizedState=c;else{e=o.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,Et.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,Et.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 o===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function pc(t){var e=be(),n=e.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=t;var s=n.dispatch,o=n.pending,c=e.memoizedState;if(o!==null){n.pending=null;var m=o=o.next;do c=t(c,m.action),m=m.next;while(m!==o);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=Et,o=be(),c=Ut;if(c){if(n===void 0)throw Error(r(407));n=n()}else n=e();var m=!cn(($t||o).memoizedState,n);if(m&&(o.memoizedState=n,Ae=!0),o=o.queue,yc(lh.bind(null,s,o,t),[t]),o.getSnapshot!==e||m||je!==null&&je.memoizedState.tag&1){if(s.flags|=2048,Qs(9,{destroy:void 0},ih.bind(null,s,o,n,e),null),ne===null)throw Error(r(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=Et.updateQueue,e===null?(e=oo(),Et.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){tt(!0);try{n()}finally{tt(!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 s1(t,e,n,s,o){if(ho(t))throw Error(r(485));if(t=e.action,t!==null){var c={payload:o,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){c.listeners.push(m)}};z.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,o=t.state;if(e.isTransition){var c=z.T,m={};z.T=m;try{var y=n(o,s),T=z.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),z.T=c}}else try{c=n(o,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(Ut){var n=ne.formState;if(n!==null){t:{var s=Et;if(Ut){if(ie){e:{for(var o=ie,c=An;o.nodeType!==8;){if(!c){o=null;break e}if(o=En(o.nextSibling),o===null){o=null;break e}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){ie=En(o.nextSibling),s=o.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,Et,s),s.dispatch=n,s=gc(!1),c=xc.bind(null,Et,!1,s.queue),s=Qe(),o={state:e,dispatch:null,action:t,pending:null},s.queue=o,n=s1.bind(null,Et,o,c,n),o.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 o=e.queue,c=o.dispatch;return n!==e.memoizedState&&(Et.flags|=2048,Qs(9,{destroy:void 0},i1.bind(null,o,n),null)),[s,c,t]}function i1(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=Et.updateQueue,e===null&&(e=oo(),Et.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 o=Qe();Et.flags|=t,o.memoizedState=Qs(1|e,{destroy:void 0},n,s===void 0?null:s)}function fo(t,e,n,s){var o=be();s=s===void 0?null:s;var c=o.memoizedState.inst;$t!==null&&s!==null&&rc(s,$t.memoizedState.deps)?o.memoizedState=Qs(e,c,n,s):(Et.flags|=t,o.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 l1(t){Et.flags|=4;var e=Et.updateQueue;if(e===null)e=oo(),Et.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 l1({ref:e,nextImpl:t}),function(){if((Yt&2)!==0)throw Error(r(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 Nh(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 Eh(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){tt(!0);try{t()}finally{tt(!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(),Et.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(),Et.lanes|=t,Da|=t,e)}function Dh(t,e,n,s,o){var c=X.p;X.p=c!==0&&8>c?c:8;var m=z.T,y={};z.T=y,xc(t,!1,e,n);try{var T=o(),C=z.S;if(C!==null&&C(y,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var V=e1(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),z.T=m}}function o1(){}function _c(t,e,n,s){if(t.tag!==5)throw Error(r(476));var o=wh(t).queue;Dh(t,o,e,rt,n===null?o1: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 r1(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 c1(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 o={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ho(t))Bh(e,o);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(o.hasEagerState=!0,o.eagerState=y,cn(y,m))return Xl(t,e,o,0),ne===null&&Zl(),!1}catch{}finally{}if(n=Hr(t,e,o,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(r(479))}else e=Hr(t,n,s,2),e!==null&&on(e,t,2)}function ho(t){var e=t.alternate;return t===Et||e!==null&&e===Et}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){tt(!0);try{t()}finally{tt(!1)}}return n.memoizedState=[s,e],s},useReducer:function(t,e,n){var s=Qe();if(n!==void 0){var o=n(e);if(cs){tt(!0);try{n(e)}finally{tt(!1)}}}else o=e;return s.memoizedState=s.baseState=o,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:o},s.queue=t,t=t.dispatch=c1.bind(null,Et,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,Et,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,Et,t.queue,!0,!1),Qe().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var s=Et,o=Qe();if(Ut){if(n===void 0)throw Error(r(407));n=n()}else{if(n=e(),ne===null)throw Error(r(349));(Ot&127)!==0||sh(s,e,n)}o.memoizedState=n;var c={value:n,getSnapshot:e};return o.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(Ut){var n=Ln,s=Vn;n=(s&~(1<<32-jt(s)-1)).toString(32)+n,e="_"+e+"R_"+n,n=lo++,0<n&&(e+="H"+n.toString(32)),e+="_"}else n=n1++,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,Et,!0,n),n.dispatch=e,[t,e]},useMemoCache:hc,useCacheRefresh:function(){return Qe().memoizedState=r1.bind(null,Et)},useEffectEvent:function(t){var e=Qe(),n={impl:t};return e.memoizedState=n,function(){if((Yt&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},jc={readContext:Ve,use:ro,useCallback:Nh,useContext:Ve,useEffect:yc,useImperativeHandle:Ah,useInsertionEffect:Th,useLayoutEffect:xh,useMemo:Eh,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:Nh,useContext:Ve,useEffect:yc,useImperativeHandle:Ah,useInsertionEffect:Th,useLayoutEffect:xh,useMemo:Eh,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 Nc={enqueueSetState:function(t,e,n){t=t._reactInternals;var s=pn(),o=xa(s);o.payload=e,n!=null&&(o.callback=n),e=ja(t,o,s),e!==null&&(on(e,t,s),Gi(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var s=pn(),o=xa(s);o.tag=1,o.payload=e,n!=null&&(o.callback=n),e=ja(t,o,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,o,c,m){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,c,m):e.prototype&&e.prototype.isPureReactComponent?!Ri(n,s)||!Ri(o,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&&Nc.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 o in t)n[o]===void 0&&(n[o]=t[o])}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(o){setTimeout(function(){throw o})}}function Ec(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 o=n.type.getDerivedStateFromError;if(typeof o=="function"){var c=s.value;t.payload=function(){return o(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 o!="function"&&(wa===null?wa=new Set([this]):wa.add(this));var y=s.stack;this.componentDidCatch(s.value,{componentStack:y!==null?y:""})})}function u1(t,e,n,s,o){if(n.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(e=n.alternate,e!==null&&Hs(e,n,o,!0),n=dn.current,n!==null){switch(n.tag){case 31:case 13:return Nn===null?No():n.alternate===null&&me===0&&(me=3),n.flags&=-257,n.flags|=65536,n.lanes=o,s===to?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([s]):e.add(s),$c(t,s,o)),!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,o)),!1}throw Error(r(435,n.tag))}return $c(t,s,o),No(),!1}if(Ut)return e=dn.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=o,s!==Xr&&(t=Error(r(422),{cause:s}),zi(Tn(t,n)))):(s!==Xr&&(e=Error(r(423),{cause:s}),zi(Tn(e,n))),t=t.current.alternate,t.flags|=65536,o&=-o,t.lanes|=o,s=Tn(s,n),o=Ec(t.stateNode,s,o),ac(t,o),me!==4&&(me=2)),!1;var c=Error(r(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=o&-o,n.lanes|=t,t=Ec(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,o&=-o,n.lanes|=o,o=Zh(o),Xh(o,t,n,s),ac(n,o),!1}n=n.return}while(n!==null);return!1}var Cc=Error(r(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,o){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,o),y=uc(),t!==null&&!Ae?(dc(t,e,o),aa(t,e,o)):(Ut&&y&&Yr(e),e.flags|=1,Le(t,e,s,o),e.child)}function Qh(t,e,n,s,o){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,o)):(t=Ql(n.type,null,s,e,e.mode,o),t.ref=e.ref,t.return=e,e.child=t)}if(c=t.child,!zc(t,o)){var m=c.memoizedProps;if(n=n.compare,n=n!==null?n:Ri,n(m,s)&&t.ref===e.ref)return aa(t,e,o)}return e.flags|=1,t=Jn(c,s),t.ref=e.ref,t.return=e,e.child=t}function Ph(t,e,n,s,o){if(t!==null){var c=t.memoizedProps;if(Ri(c,s)&&t.ref===e.ref)if(Ae=!1,e.pendingProps=s=c,zc(t,o))(t.flags&131072)!==0&&(Ae=!0);else return e.lanes=t.lanes,aa(t,e,o)}return Dc(t,e,n,s,o)}function Fh(t,e,n,s){var o=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,o=0;s!==null;)o=o|s.lanes|s.childLanes,s=s.sibling;s=o&~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),Na(),e.memoizedState=null):(t!==null&&$l(e,null),ic(),Na());return Le(t,e,o,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,o){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=o,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 d1(t,e,n){var s=e.pendingProps,o=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Ut){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),o)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(r(558));else if(Ae||Hs(t,e,n,!1),o=(n&t.childLanes)!==0,Ae||o){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;No(),e=$h(t,e,n)}else t=c.treeContext,ie=En(m.nextSibling),Ue=e,Ut=!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(r(284));(t===null||t.ref!==n)&&(e.flags|=4194816)}}function Dc(t,e,n,s,o){return ss(e),n=cc(t,e,n,s,void 0,o),s=uc(),t!==null&&!Ae?(dc(t,e,o),aa(t,e,o)):(Ut&&s&&Yr(e),e.flags|=1,Le(t,e,n,o),e.child)}function Wh(t,e,n,s,o,c){return ss(e),e.updateQueue=null,n=nh(e,s,n,o),eh(t),s=uc(),t!==null&&!Ae?(dc(t,e,c),aa(t,e,c)):(Ut&&s&&Yr(e),e.flags|=1,Le(t,e,n,c),e.child)}function tm(t,e,n,s,o){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=Nc,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&&Nc.enqueueReplaceState(c,c.state,null),qi(e,s,c,o),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,o),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,o),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,o),e.child=rs(e,null,n,o)):Le(t,e,n,o),e.memoizedState=c.state,t=e.child):t=aa(t,e,o),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,o=!1,c=(e.flags&128)!==0,m;if((m=c)||(m=t!==null&&t.memoizedState===null?!1:(ye.current&2)!==0),m&&(o=!0,e.flags&=-129),m=(e.flags&32)!==0,e.flags&=-33,t===null){if(Ut){if(o?Aa(e):Na(),(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,o?(Na(),o=e.mode,y=vo({mode:"hidden",children:y},o),s=es(s,o,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?(Na(),e.child=t.child,e.flags|=128,e=null):(Na(),y=s.fallback,o=e.mode,s=vo({mode:"visible",children:s.children},o),y=es(y,o,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(r(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)||No(),e=Oc(t,e,n)}else hu(y)?(e.flags|=192,e.child=t.child,e=null):(t=T.treeContext,ie=En(y.nextSibling),Ue=e,Ut=!0,ba=null,An=!1,t!==null&&Vf(e,t),e=Rc(e,s.children),e.flags|=4096);return e}return o?(Na(),y=s.fallback,o=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,o,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):(o=y.cachePool,o!==null?(T=xe._currentValue,o=o.parent!==T?{parent:T,pool:T}:o):o=Yf(),y={baseLanes:y.baseLanes|n,cachePool:o}),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,o,c){var m=t.memoizedState;m===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:o,treeForkCount:c}:(m.isBackwards=e,m.rendering=null,m.renderingStartTime=0,m.last=s,m.tail=n,m.tailMode=o,m.treeForkCount=c)}function sm(t,e,n){var s=e.pendingProps,o=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=Ut?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(o){case"forwards":for(n=e.child,o=null;n!==null;)t=n.alternate,t!==null&&so(t)===null&&(o=n),n=n.sibling;n=o,n===null?(o=e.child,e.child=null):(o=n.sibling,n.sibling=null),Bc(e,!1,o,n,c,s);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=e.child,e.child=null;o!==null;){if(t=o.alternate,t!==null&&so(t)===null){e.child=o;break}t=o.sibling,o.sibling=n,n=o,o=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(r(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 f1(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 o=(t.flags&128)!==0;if(s=(n&e.childLanes)!==0,s||(Hs(t,e,n,!1),s=(n&e.childLanes)!==0),o){if(s)return sm(t,e,n);e.flags|=128}if(o=e.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.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,f1(t,e,n);Ae=(t.flags&131072)!==0}else Ae=!1,Ut&&(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 o=t.$$typeof;if(o===W){e.tag=11,e=Kh(null,e,t,s,n);break t}else if(o===nt){e.tag=14,e=Qh(null,e,t,s,n);break t}}throw e=Xt(t)||t,Error(r(306,e,""))}}return e;case 0:return Dc(t,e,e.type,e.pendingProps,n);case 1:return s=e.type,o=us(s,e.pendingProps),tm(t,e,s,o,n);case 3:t:{if(Xe(e,e.stateNode.containerInfo),t===null)throw Error(r(387));s=e.pendingProps;var c=e.memoizedState;o=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!==o){o=Tn(Error(r(424)),e),zi(o),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=En(t.firstChild),Ue=e,Ut=!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===o){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:Ut||(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&&Ut&&(s=e.stateNode=hp(e.type,e.pendingProps,fe.current),Ue=e,An=!0,o=ie,Oa(e.type)?(pu=o,ie=En(s.firstChild)):ie=o),Le(t,e,e.pendingProps.children,n),go(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Ut&&((o=s=ie)&&(s=I1(s,e.type,e.pendingProps,An),s!==null?(e.stateNode=s,Ue=e,ie=En(s.firstChild),An=!1,o=!0):o=!1),o||Sa(e)),Je(e),o=e.type,c=e.pendingProps,m=t!==null?t.memoizedProps:null,s=c.children,uu(o,c)?s=null:m!==null&&uu(o,m)&&(e.flags|=32),e.memoizedState!==null&&(o=cc(t,e,a1,null,null,n),cl._currentValue=o),go(t,e),Le(t,e,s,n),e.child;case 6:return t===null&&Ut&&((t=n=ie)&&(n=q1(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 o=e.type._context,s=e.pendingProps.children,ss(e),o=Ve(o),s=s(o),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 d1(t,e,n);case 22:return Fh(t,e,n,e.pendingProps);case 24:return ss(e),s=Ve(xe),t===null?(o=Wr(),o===null&&(o=ne,c=Jr(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=n),o=c),e.memoizedState={parent:s,cache:o},ec(e),_a(e,xe,o)):((t.lanes&n)!==0&&(nc(t,e),qi(e,null,null,n),Ii()),o=t.memoizedState,c=e.memoizedState,o.parent!==s?(o={parent:s,cache:s},e.memoizedState=o,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=o),_a(e,xe,s)):(s=c.cache,_a(e,xe,s),s!==o.cache&&Fr(e,[xe],n,!0))),Le(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(r(156,e.tag))}function sa(t){t.flags|=4}function Uc(t,e,n,s,o){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(o&335544128)===o)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(!Ut)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 o=t.child;o!==null;)n|=o.lanes|o.childLanes,s|=o.subtreeFlags&65011712,s|=o.flags&65011712,o.return=t,o=o.sibling;else for(o=t.child;o!==null;)n|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=t,o=o.sibling;return t.subtreeFlags|=s,t.childLanes=n,e}function h1(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 o=e.type,c=e.memoizedState;return t===null?(sa(e),c!==null?(le(e),lm(e,c)):(le(e),Uc(e,o,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,o,t,s,n)),null;case 27:if(Ie(e),n=fe.current,o=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&sa(e);else{if(!s){if(e.stateNode===null)throw Error(r(166));return le(e),null}t=G.current,Ls(e)?Lf(e):(t=hp(o,s,n),e.stateNode=t,sa(e))}return le(e),null;case 5:if(Ie(e),o=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==s&&sa(e);else{if(!s){if(e.stateNode===null)throw Error(r(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",o);break;case 2:c=m.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=m.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=m.createElementNS("http://www.w3.org/1998/Math/MathML",o);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(o,{is:s.is}):m.createElement(o)}}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,o,s),o){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(r(166));if(t=fe.current,Ls(e)){if(t=e.stateNode,n=e.memoizedProps,s=null,o=Ue,o!==null)switch(o.tag){case 27:case 5:s=o.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(r(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(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(r(558))}return le(e),null;case 13:if(s=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(o=Ls(e),s!==null&&s.dehydrated!==null){if(t===null){if(!o)throw Error(r(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[Te]=e}else ns(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;le(e),o=!1}else o=Kr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=o),o=!0;if(!o)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,o=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(o=s.alternate.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==o&&(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(At(ye),s=e.memoizedState,s===null)return le(e),null;if(o=(e.flags&128)!==0,c=s.rendering,c===null)if(o)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),Ut&&$n(e,s.treeForkCount),e.child}t=t.sibling}s.tail!==null&&Mt()>xo&&(e.flags|=128,o=!0,Pi(s,!1),e.lanes=4194304)}else{if(!o)if(t=so(c),t!==null){if(e.flags|=128,o=!0,t=t.updateQueue,e.updateQueue=t,yo(e,t),Pi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!c.alternate&&!Ut)return le(e),null}else 2*Mt()-s.renderingStartTime>xo&&n!==536870912&&(e.flags|=128,o=!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,o?n&1|2:n&1),Ut&&$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&&At(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(r(156,e.tag))}function m1(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(r(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(r(340));ns()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return At(ye),null;case 4:return ee(),null;case 10:return ta(e.type),null;case 22:case 23:return fn(e),lc(),t!==null&&At(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:At(ye);break;case 10:ta(e.type);break;case 22:case 23:fn(e),lc(),t!==null&&At(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 o=s.next;n=o;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!==o)}}catch(y){Jt(e,e.return,y)}}function Ea(t,e,n){try{var s=e.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var c=o.next;s=c;do{if((s.tag&t)===t){var m=s.inst,y=m.destroy;if(y!==void 0){m.destroy=void 0,o=e;var T=n,C=y;try{C()}catch(V){Jt(o,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(o){Jt(t,e,o)}}function Hn(t,e){var n=t.ref,s=t.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(o){Jt(t,e,o)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){Jt(t,e,o)}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(o){Jt(t,t.return,o)}}function Vc(t,e,n){try{var s=t.stateNode;z1(s,t.type,n,e),s[st]=e}catch(o){Jt(t,t.return,o)}}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,o=e.attributes;o.length;)e.removeAttributeNode(o[0]);He(e,s,n),e[Te]=t,e[st]=n}catch(c){Jt(t,t.return,c)}}var ia=!1,Ne=!1,Gc=!1,hm=typeof WeakSet=="function"?WeakSet:Set,ke=null;function p1(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 o=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||o!==0&&I.nodeType!==3||(y=m+o),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===o&&(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++)o=t[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&c!==null){t=void 0,n=e,o=c.memoizedProps,c=c.memoizedState,s=n.stateNode;try{var ct=us(n.type,o);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(r(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 o=us(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(o,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=j1.bind(null,n),Y1(t,n))));break;case 22:if(s=n.memoizedState!==null||ia,!s){e=e!==null&&e.memoizedState!==null||Ne,o=ia;var c=Ne;ia=s,(Ne=e)&&!c?ra(t,n,(n.subtreeFlags&8772)!==0):oa(t,n),ia=o,Ne=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:Ne||Hn(n,e),la(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ne||Hn(n,e);var s=ce,o=nn;Oa(n.type)&&(ce=n.stateNode,nn=!1),la(t,e,n),ll(n.stateNode),ce=s,nn=o;break;case 5:Ne||Hn(n,e);case 6:if(s=ce,o=nn,ce=null,la(t,e,n),ce=s,nn=o,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,o=nn,ce=n.stateNode.containerInfo,nn=!0,la(t,e,n),ce=s,nn=o;break;case 0:case 11:case 14:case 15:Ea(2,n,e),Ne||Ea(4,n,e),la(t,e,n);break;case 1:Ne||(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:Ne=(s=Ne)||n.memoizedState!==null,la(t,e,n),Ne=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 g1(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(r(435,t.tag))}}function So(t,e){var n=g1(t);e.forEach(function(s){if(!n.has(s)){n.add(s);var o=A1.bind(null,t,s);s.then(o,o)}})}function an(t,e){var n=e.deletions;if(n!==null)for(var s=0;s<n.length;s++){var o=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(r(160));gm(c,m,o),ce=null,nn=!1,c=o.alternate,c!==null&&(c.return=null),o.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&&(Ea(3,t,t.return),Fi(3,t),Ea(5,t,t.return));break;case 1:an(e,t),sn(t),s&512&&(Ne||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 o=On;if(an(e,t),sn(t),s&512&&(Ne||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,o=o.ownerDocument||o;e:switch(s){case"title":c=o.getElementsByTagName("title")[0],(!c||c[Pa]||c[Te]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(s),o.head.insertBefore(c,o.querySelector("head > title"))),He(c,s,n),c[Te]=t,we(c),s=c;break t;case"link":var m=bp("link","href",o).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=o.createElement(s),He(c,s,n),o.head.appendChild(c);break;case"meta":if(m=bp("meta","content",o).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=o.createElement(s),He(c,s,n),o.head.appendChild(c);break;default:throw Error(r(468,s))}c[Te]=t,we(c),s=c}t.stateNode=s}else Sp(o,t.type,t.stateNode);else t.stateNode=yp(o,s,t.memoizedProps);else c!==s?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,s===null?Sp(o,t.type,t.stateNode):yp(o,s,t.memoizedProps)):s===null&&t.stateNode!==null&&Vc(t,t.memoizedProps,n.memoizedProps)}break;case 27:an(e,t),sn(t),s&512&&(Ne||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&&(Ne||n===null||Hn(n,n.return)),t.flags&32){o=t.stateNode;try{Ds(o,"")}catch(ct){Jt(t,t.return,ct)}}s&4&&t.stateNode!=null&&(o=t.memoizedProps,Vc(t,o,n!==null?n.memoizedProps:o)),s&1024&&(Gc=!0);break;case 6:if(an(e,t),sn(t),s&4){if(t.stateNode===null)throw Error(r(162));s=t.memoizedProps,n=t.stateNode;try{n.nodeValue=s}catch(ct){Jt(t,t.return,ct)}}break;case 3:if(zo=null,o=On,On=Oo(e.containerInfo),an(e,t),On=o,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:o=t.memoizedState!==null;var T=n!==null&&n.memoizedState!==null,C=ia,V=Ne;if(ia=C||o,Ne=V||T,an(e,t),Ne=V,ia=C,sn(t),s&8192)t:for(e=t.stateNode,e._visibility=o?e._visibility&-2:e._visibility|1,o&&(n===null||T||ia||Ne||ds(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){T=n=e;try{if(c=T.stateNode,o)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=o?"":T.memoizedProps}catch(ct){Jt(T,T.return,ct)}}}else if(e.tag===18){if(n===null){T=e;try{var M=T.stateNode;o?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(r(160));switch(n.tag){case 27:var o=n.stateNode,c=Lc(t);bo(t,c,o);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(r(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:Ea(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,o=t,c=e,m=c.flags;switch(c.tag){case 0:case 11:case 15:ra(o,c,n),Fi(4,c);break;case 1:if(ra(o,c,n),s=c,o=s.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(C){Jt(s,s.return,C)}if(s=c,o=s.updateQueue,o!==null){var y=s.stateNode;try{var T=o.shared.hiddenCallbacks;if(T!==null)for(o.shared.hiddenCallbacks=null,o=0;o<T.length;o++)Jf(T[o],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(o,c,n),n&&s===null&&m&4&&um(c),Ji(c,c.return);break;case 12:ra(o,c,n);break;case 31:ra(o,c,n),n&&m&4&&vm(o,c);break;case 13:ra(o,c,n),n&&m&4&&ym(o,c);break;case 22:c.memoizedState===null&&ra(o,c,n),Ji(c,c.return);break;case 30:break;default:ra(o,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 o=e.flags;switch(e.tag){case 0:case 11:case 15:Bn(t,e,n,s),o&2048&&Fi(9,e);break;case 1:Bn(t,e,n,s);break;case 3:Bn(t,e,n,s),o&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(o&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)),o&2048&&Ic(m,e);break;case 24:Bn(t,e,n,s),o&2048&&qc(e.alternate,e);break;default:Bn(t,e,n,s)}}function Ps(t,e,n,s,o){for(o=o&&((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,o),Fi(8,m);break;case 23:break;case 22:var V=m.stateNode;m.memoizedState!==null?V._visibility&2?Ps(c,m,y,T,o):$i(c,m):(V._visibility|=2,Ps(c,m,y,T,o)),o&&C&2048&&Ic(m.alternate,m);break;case 24:Ps(c,m,y,T,o),o&&C&2048&&qc(m.alternate,m);break;default:Ps(c,m,y,T,o)}e=e.sibling}}function $i(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,s=e,o=s.flags;switch(s.tag){case 22:$i(n,s),o&2048&&Ic(s.alternate,s);break;case 24:$i(n,s),o&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&&nb(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&&Ea(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:Ea(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:Ea(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 o=s.sibling,c=s.return;if(pm(s),s===n){ke=null;break t}if(o!==null){o.return=c,ke=o;break t}ke=c}}}var v1={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}},y1=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,Nm=0,xo=1/0,jo=null,wa=null,Ce=0,ka=null,Ws=null,ua=0,Kc=0,Qc=null,Em=null,nl=0,Pc=null;function pn(){return(Yt&2)!==0&&Ot!==0?Ot&-Ot:z.T!==null?eu():xi()}function Cm(){if(mn===0)if((Ot&536870912)===0||Ut){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(r(327));var s=!n&&(e&127)===0&&(e&t.expiredLanes)===0||re(t,e),o=s?_1(t,e):Jc(t,e,!0),c=s;do{if(o===0){Js&&!s&&Ma(t,e,0,!1);break}else{if(n=t.current.alternate,c&&!b1(n)){o=Jc(t,e,!1),c=!1;continue}if(o===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;o=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,o=4;break t}c=ln,ln=o,c!==null&&(ln===null?ln=c:ln.push.apply(ln,c))}o=m}if(c=!1,o!==2)continue}}if(o===1){ti(t,0),Ma(t,e,0,!0);break}t:{switch(s=t,c=o,c){case 0:case 1:throw Error(r(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(r(329))}if((e&62914560)===e&&(o=To+300-Mt(),10<o)){if(Ma(s,e,mn,!Ca),it(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),o);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,o,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?Nm-Mt():0;if(ct=ab(I,ct),ct!==null){ua=c,t.cancelPendingCommit=ct(Vm.bind(null,t,e,c,n,s,o,m,y,T,V,I,null,w,M)),Ma(t,c,m,!C);return}}Vm(t,e,c,n,s,o,m,y,T)}function b1(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 o=n[s],c=o.getSnapshot;o=o.value;try{if(!cn(c(),o))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 o=e;0<o;){var c=31-jt(o),m=1<<c;s[c]=-1,o&=~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,L1(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 o=31-jt(s),c=1<<o;e|=t[o],s&=~c}return ca=e,Zl(),n}function km(t,e){Et=null,z.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?Nn===null:(Ot&62914560)===Ot||(Ot&536870912)!==0?t===Nn:!1}function Rm(){var t=z.H;return z.H=Ki,t===null?Ki:t}function Om(){var t=z.A;return z.A=v1,t}function No(){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 o=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)}}S1(),m=me;break}catch(V){km(t,V)}while(!0);return e&&t.shellSuspendCounter++,Wn=as=null,Yt=s,z.H=o,z.A=c,wt===null&&(ne=null,Ot=0,Zl()),m}function S1(){for(;wt!==null;)Bm(wt)}function _1(t,e){var n=Yt;Yt|=2;var s=Rm(),o=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,Eo(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(r(462))}}T1();break}catch(V){km(t,V)}while(!0);return Wn=as=null,z.H=s,z.A=o,Yt=n,wt!==null?0:(ne=null,Ot=0,Zl(),me)}function T1(){for(;wt!==null&&!mt();)Bm(wt)}function Bm(t){var e=im(t.alternate,t,ca);t.memoizedProps=t.pendingProps,e===null?Eo(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?Eo(t):wt=e}function ei(t,e,n,s){Wn=as=null,fc(e),Ys=null,Li=0;var o=e.return;try{if(u1(t,o,e,n,Ot)){me=1,mo(t,Tn(n,t.current)),wt=null;return}}catch(c){if(o!==null)throw wt=o,c;me=1,mo(t,Tn(n,t.current)),wt=null;return}e.flags&32768?(Ut||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)):Eo(e)}function Eo(t){var e=t;do{if((e.flags&32768)!==0){Um(e,Ca);return}t=e.return;var n=h1(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=m1(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,o,c,m,y,T){t.cancelPendingCommit=null;do Co();while(Ce!==0);if((Yt&6)!==0)throw Error(r(327));if(e!==null){if(e===t.current)throw Error(r(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=o,Em=s,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,N1($,function(){return qm(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||s){s=z.T,z.T=null,o=X.p,X.p=2,m=Yt,Yt|=4;try{p1(t,e,n)}finally{Yt=m,X.p=o,z.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=z.T,z.T=null;var s=X.p;X.p=2;var o=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 N=xf(y,_t),j=xf(y,te);if(N&&j&&(M.rangeCount!==1||M.anchorNode!==N.node||M.anchorOffset!==N.offset||M.focusNode!==j.node||M.focusOffset!==j.offset)){var E=I.createRange();E.setStart(N.node,N.offset),M.removeAllRanges(),_t>te?(M.addRange(E),M.extend(j.node,j.offset)):(E.setEnd(j.node,j.offset),M.addRange(E))}}}}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=o,X.p=s,z.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=z.T,z.T=null;var s=X.p;X.p=2;var o=Yt;Yt|=4;try{mm(t,e.alternate,e)}finally{Yt=o,X.p=s,z.T=n}}Ce=3}}function Gm(){if(Ce===4||Ce===3){Ce=0,Nt();var t=ka,e=Ws,n=ua,s=Em;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Ce=5:(Ce=0,Ws=ka=null,Im(t,t.pendingLanes));var o=t.pendingLanes;if(o===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=z.T,o=X.p,X.p=2,z.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{z.T=e,X.p=o}}(ua&3)!==0&&Co(),Gn(t),o=t.pendingLanes,(n&261930)!==0&&(o&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=z.T,o=X.p;try{X.p=32>n?32:n,z.T=null,n=Qc,Qc=null;var c=ka,m=ua;if(Ce=0,Ws=ka=null,ua=0,(Yt&6)!==0)throw Error(r(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=o,z.T=s,Im(t,e)}}function Ym(t,e,n){e=Tn(n,e),e=Ec(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 y1;var o=new Set;s.set(e,o)}else o=s.get(e),o===void 0&&(o=new Set,s.set(e,o));o.has(n)||(Yc=!0,o.add(n),t=x1.bind(null,t,e,n),e.then(t,t))}function x1(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 j1(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Zm(t,n)}function A1(t,e){var n=0;switch(t.tag){case 31:case 13:var s=t.stateNode,o=t.memoizedState;o!==null&&(n=o.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(e),Zm(t,n)}function N1(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,C1())}function al(t,e){if(!tu&&wo){tu=!0;do for(var n=!1,s=Do;s!==null;){if(t!==0){var o=s.pendingLanes;if(o===0)var c=0;else{var m=s.suspendedLanes,y=s.pingedLanes;c=(1<<31-jt(42|t)+1)-1,c&=o&~(m&~y),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Pm(s,c))}else c=Ot,c=it(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 E1(){Xm()}function Xm(){wo=Wc=!1;var t=0;Ra!==0&&V1()&&(t=Ra);for(var e=Mt(),n=null,s=Do;s!==null;){var o=s.next,c=Km(s,e);c===0?(s.next=null,n===null?Do=o:n.next=o,o===null&&(ni=n)):(n=s,(t!==0||(c&3)!==0)&&(wo=!0)),s=o}Ce!==0&&Ce!==5||al(t),Ra!==0&&(Ra=0)}function Km(t,e){for(var n=t.suspendedLanes,s=t.pingedLanes,o=t.expirationTimes,c=t.pendingLanes&-62914561;0<c;){var m=31-jt(c),y=1<<m,T=o[m];T===-1?((y&n)===0||(y&s)!==0)&&(o[m]=rn(y,e)):T<=e&&(t.expiredLanes|=y),c&=~y}if(e=ne,n=Ot,n=it(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,n===0||t===e&&(Ft===2||Ft===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&vt(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&&vt(s),Ts(n)){case 2:case 8:n=Dt;break;case 32:n=$;break;case 268435456:n=L;break;default:n=$}return s=Qm.bind(null,t),n=ut(n,s),t.callbackPriority=e,t.callbackNode=n,e}return s!==null&&s!==null&&vt(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=it(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 C1(){H1(function(){(Yt&6)!==0?ut(at,E1):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 D1(t,e,n,s,o){if(e==="submit"&&n&&n.stateNode===o){var c=Fm((o[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,o);t.push({event:y,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ra!==0){var T=m?Jm(o,m):new FormData(o);_c(n,{pending:!0,data:T,method:o.method,action:c},null,T)}}else typeof c=="function"&&(y.preventDefault(),T=m?Jm(o,m):new FormData(o),_c(n,{pending:!0,data:T,method:o.method,action:c},c,T))},currentTarget:o}]})}}for(var nu=0;nu<Vr.length;nu++){var au=Vr[nu],w1=au.toLowerCase(),k1=au[0].toUpperCase()+au.slice(1);Rn(w1,"on"+k1)}Rn(Cf,"onAnimationEnd"),Rn(Df,"onAnimationIteration"),Rn(wf,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(Ky,"onTransitionRun"),Rn(Qy,"onTransitionStart"),Rn(Py,"onTransitionCancel"),Rn(kf,"onTransitionEnd"),Es("onMouseEnter",["mouseout","mouseover"]),Es("onMouseLeave",["mouseout","mouseover"]),Es("onPointerEnter",["pointerout","pointerover"]),Es("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(" "),M1=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],o=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&&o.isPropagationStopped())break t;c=y,o.currentTarget=C;try{c(o)}catch(V){Yl(V)}o.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&&o.isPropagationStopped())break t;c=y,o.currentTarget=C;try{c(o)}catch(V){Yl(V)}o.currentTarget=null,c=T}}}}function kt(t,e){var n=e[Lt];n===void 0&&(n=e[Lt]=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"&&(M1.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 o=lb;break;case 8:o=ob;break;default:o=Su}n=o.bind(null,e,n,t),o=void 0,!Ar||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(o=!0),s?o!==void 0?t.addEventListener(e,n,{capture:!0,passive:o}):t.addEventListener(e,n,!0):o!==void 0?t.addEventListener(e,n,{passive:o}):t.addEventListener(e,n,!1)}function lu(t,e,n,s,o){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===o)break;if(m===4)for(m=s.return;m!==null;){var T=m.tag;if((T===3||T===4)&&m.stateNode.containerInfo===o)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=Ay;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=hy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Cy;break;case Cf:case Df:case wf:M=gy;break;case kf:M=wy;break;case"scroll":case"scrollend":M=dy;break;case"wheel":M=My;break;case"copy":case"cut":case"paste":M=yy;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=Oy}var _t=(e&4)!==0,te=!_t&&(t==="scroll"||t==="scrollend"),N=_t?w!==null?w+"Capture":null:w;_t=[];for(var j=C,E;j!==null;){var H=j;if(E=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||E===null||N===null||(H=Ni(j,N),H!=null&&_t.push(il(j,H,E))),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",N="onMouseEnter",j="mouse",(t==="pointerout"||t==="pointerover")&&(_t=cf,H="onPointerLeave",N="onPointerEnter",j="pointer"),te=M==null?w:Ai(M),E=ct==null?w:Ai(ct),w=new _t(H,j+"leave",M,n,V),w.target=te,w.relatedTarget=E,H=null,js(V)===C&&(_t=new _t(N,j+"enter",ct,n,V),_t.target=E,_t.relatedTarget=te,H=_t),te=H,M&&ct)e:{for(_t=R1,N=M,j=ct,E=0,H=N;H;H=_t(H))E++;H=0;for(var gt=j;gt;gt=_t(gt))H++;for(;0<E-H;)N=_t(N),E--;for(;0<H-E;)j=_t(j),H--;for(;E--;){if(N===j||j!==null&&N===j.alternate){_t=N;break e}N=_t(N),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 Ht=vf;else if(pf(w))if(yf)Ht=Yy;else{Ht=Iy;var ht=Gy}else M=w.nodeName,!M||M.toLowerCase()!=="input"||w.type!=="checkbox"&&w.type!=="radio"?C&&_r(C.elementType)&&(Ht=vf):Ht=qy;if(Ht&&(Ht=Ht(t,C))){gf(I,Ht,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,Nf(I,n,V);break;case"selectionchange":if(Xy)break;case"keydown":case"keyup":Nf(I,n,V)}var Ct;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&&(Ct=sf()):(va=V,Nr="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}),Ct?Bt.data=Ct:(Ct=mf(n),Ct!==null&&(Bt.data=Ct)))),(Ct=zy?Uy(t,n):Vy(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=Ct)),D1(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 o=t,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=Ni(t,n),o!=null&&s.unshift(il(t,o,c)),o=Ni(t,e),o!=null&&s.push(il(t,o,c))),t.tag===3)return s;t=t.return}return[]}function R1(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,o){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,o?(C=Ni(n,c),C!=null&&m.unshift(il(n,C,T))):o||(C=Ni(n,c),C!=null&&m.push(il(n,C,T)))),n=n.return}m.length!==0&&t.push({event:e,listeners:m})}var O1=/\r\n?/g,B1=/\u0000|\uFFFD/g;function ep(t){return(typeof t=="string"?t:""+t).replace(O1,`
|
|
25
|
+
`).replace(B1,"")}function np(t,e){return e=ep(e),ep(t)===e}function Wt(t,e,n,s,o,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",o.name,o,null),Wt(t,e,"formEncType",o.formEncType,o,null),Wt(t,e,"formMethod",o.formMethod,o,null),Wt(t,e,"formTarget",o.formTarget,o,null)):(Wt(t,e,"encType",o.encType,o,null),Wt(t,e,"method",o.method,o,null),Wt(t,e,"target",o.target,o,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(r(61));if(n=s.__html,n!=null){if(o.children!=null)throw Error(r(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=cy.get(n)||n,Ol(t,n,s))}}function ou(t,e,n,s,o,c){switch(n){case"style":ef(t,s,c);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(n=s.__html,n!=null){if(o.children!=null)throw Error(r(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"&&(o=n.endsWith("Capture"),e=n.slice(2,o?n.length-7:void 0),c=t[st]||null,c=c!=null?c[n]:null,typeof c=="function"&&t.removeEventListener(e,c,o),typeof s=="function")){typeof c!="function"&&c!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,s,o);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,o=!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":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Wt(t,e,c,m,n,null)}}o&&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=o=null,T=null,C=null;for(s in n)if(n.hasOwnProperty(s)){var V=n[s];if(V!=null)switch(s){case"name":o=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(r(137,e));break;default:Wt(t,e,s,V,n,null)}}Jd(t,c,y,T,C,m,o,!1);return;case"select":kt("invalid",t),s=m=c=null;for(o in n)if(n.hasOwnProperty(o)&&(y=n[o],y!=null))switch(o){case"value":c=y;break;case"defaultValue":m=y;break;case"multiple":s=y;default:Wt(t,e,o,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=o=s=null;for(m in n)if(n.hasOwnProperty(m)&&(y=n[m],y!=null))switch(m){case"value":s=y;break;case"defaultValue":o=y;break;case"children":c=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:Wt(t,e,m,y,n,null)}Wd(t,s,o,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(r(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 z1(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 o=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":o=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(r(137,e));break;default:M!==I&&Wt(t,e,w,M,s,I)}}br(t,m,y,T,C,V,c,o);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(o in s)if(c=s[o],T=n[o],s.hasOwnProperty(o)&&(c!=null||T!=null))switch(o){case"value":w=c;break;case"defaultValue":y=c;break;case"multiple":m=c;default:c!==T&&Wt(t,e,o,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(o=n[y],n.hasOwnProperty(y)&&o!=null&&!s.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:Wt(t,e,y,null,s,o)}for(m in s)if(o=s[m],c=n[m],s.hasOwnProperty(m)&&(o!=null||c!=null))switch(m){case"value":w=o;break;case"defaultValue":M=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==c&&Wt(t,e,m,o,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(r(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 N in n)w=n[N],n.hasOwnProperty(N)&&w!=null&&!s.hasOwnProperty(N)&&Wt(t,e,N,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 U1(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,n=performance.getEntriesByType("resource"),s=0;s<n.length;s++){var o=n[s],c=o.transferSize,m=o.initiatorType,y=o.duration;if(c&&y&&ap(m)){for(m=0,y=o.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)/(o.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 V1(){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,L1=typeof clearTimeout=="function"?clearTimeout:void 0,op=typeof Promise=="function"?Promise:void 0,H1=typeof queueMicrotask=="function"?queueMicrotask:typeof op<"u"?function(t){return op.resolve(null).then(t).catch(G1)}:lp;function G1(t){setTimeout(function(){throw t})}function Oa(t){return t==="head"}function rp(t,e){var n=e,s=0;do{var o=n.nextSibling;if(t.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(s===0){t.removeChild(o),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=o}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 I1(t,e,n,s){for(;t.nodeType===1;){var o=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!==o.rel||t.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||t.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||t.getAttribute("title")!==(o.title==null?null:o.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(c=t.getAttribute("src"),(c!==(o.src==null?null:o.src)||t.getAttribute("type")!==(o.type==null?null:o.type)||t.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&t.getAttribute("name")===c)return t}else return t;if(t=En(t.nextSibling),t===null)break}return null}function q1(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=En(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=En(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 Y1(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 En(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 En(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(r(452));return t;case"head":if(t=e.head,!t)throw Error(r(453));return t;case"body":if(t=e.body,!t)throw Error(r(454));return t;default:throw Error(r(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:Z1,r:X1,D:K1,C:Q1,L:P1,m:F1,X:$1,S:J1,M:W1};function Z1(){var t=da.f(),e=Ao();return t||e}function X1(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 o=Sn(e);o='link[rel="'+t+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),mp.has(o)||(mp.add(o),t={rel:t,crossOrigin:n,href:e},s.querySelector(o)===null&&(e=s.createElement("link"),He(e,"link",t),we(e),s.head.appendChild(e)))}}function K1(t){da.D(t),pp("dns-prefetch",t,null)}function Q1(t,e){da.C(t,e),pp("preconnect",t,e)}function P1(t,e,n){da.L(t,e,n);var s=ai;if(s&&t&&e){var o='link[rel="preload"][as="'+Sn(e)+'"]';e==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+Sn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+Sn(n.imageSizes)+'"]')):o+='[href="'+Sn(t)+'"]';var c=o;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(o)!==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 F1(t,e){da.m(t,e);var n=ai;if(n&&t){var s=e&&typeof e.as=="string"?e.as:"script",o='link[rel="modulepreload"][as="'+Sn(s)+'"][href="'+Sn(t)+'"]',c=o;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(o)===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 J1(t,e,n){da.S(t,e,n);var s=ai;if(s&&t){var o=Ns(s).hoistableStyles,c=si(t);e=e||"default";var m=o.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},o.set(c,m)}}}function $1(t,e){da.X(t,e);var n=ai;if(n&&t){var s=Ns(n).hoistableScripts,o=ii(t),c=s.get(o);c||(c=n.querySelector(rl(o)),c||(t=S({src:t,async:!0},e),(e=Cn.get(o))&&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(o,c))}}function W1(t,e){da.M(t,e);var n=ai;if(n&&t){var s=Ns(n).hoistableScripts,o=ii(t),c=s.get(o);c||(c=n.querySelector(rl(o)),c||(t=S({src:t,async:!0,type:"module"},e),(e=Cn.get(o))&&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(o,c))}}function gp(t,e,n,s){var o=(o=fe.current)?Oo(o):null;if(!o)throw Error(r(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=Ns(o).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=Ns(o).hoistableStyles,m=c.get(t);if(m||(o=o.ownerDocument||o,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(t,m),(c=o.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||tb(o,t,n,m.state))),e&&s===null)throw Error(r(528,""));return m}if(e&&s!==null)throw Error(r(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=Ns(o).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(r(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 tb(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 o=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",o),Bo(s,n.precedence,t),e.instance=s;case"stylesheet":o=si(n.href);var c=t.querySelector(ol(o));if(c)return e.state.loading|=4,e.instance=c,we(c),c;s=vp(n),(o=Cn.get(o))&&gu(s,o),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),(o=t.querySelector(rl(c)))?(e.instance=o,we(o),o):(s=n,(o=Cn.get(c))&&(s=S({},n),vu(s,o)),t=t.ownerDocument||t,o=t.createElement("script"),we(o),He(o,"link",s),t.head.appendChild(o),e.instance=o);case"void":return null;default:throw Error(r(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]'),o=s.length?s[s.length-1]:null,c=o,m=0;m<s.length;m++){var y=s[m];if(y.dataset.precedence===e)c=y;else if(c!==o)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,o=zo=new Map;o.set(n,s)}else o=zo,s=o.get(n),s||(s=new Map,o.set(n,s));if(s.has(t))return s;for(s.set(t,null),n=n.getElementsByTagName(t),o=0;o<n.length;o++){var c=n[o];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 eb(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 nb(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 o=si(s.href),c=e.querySelector(ol(o));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),(o=Cn.get(o))&&gu(s,o),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 ab(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*U1());var o=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(o)}}: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(sb,t),Vo=null,Uo.call(t))}function sb(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 o=t.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var m=o[c];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(n.set(m.dataset.precedence,m),s=m)}s&&n.set(null,s)}o=e.instance,m=o.getAttribute("data-precedence"),c=n.get(m)||s,c===s&&n.set(null,o),n.set(m,o),this.count++,s=Uo.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),c?c.parentNode.insertBefore(o,c.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(o,t.firstChild)),e.state.loading|=4}}var cl={$$typeof:O,Provider:null,Consumer:null,_currentValue:rt,_currentValue2:rt,_threadCount:0};function ib(t,e,n,s,o,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=o,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,o,c,m,y,T,C,V,I){return t=new ib(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,o,c){o=xp(o),s.context===null?s.context=o:s.pendingContext=o,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 Np(t){if(t.tag===13||t.tag===31){var e=ts(t,67108864);e!==null&&on(e,t,67108864),bu(t,67108864)}}function Ep(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 lb(t,e,n,s){var o=z.T;z.T=null;var c=X.p;try{X.p=2,Su(t,e,n,s)}finally{X.p=c,z.T=o}}function ob(t,e,n,s){var o=z.T;z.T=null;var c=X.p;try{X.p=8,Su(t,e,n,s)}finally{X.p=c,z.T=o}}function Su(t,e,n,s){if(Ho){var o=_u(s);if(o===null)lu(t,e,s,Go,n),Dp(t,s);else if(cb(o,t,e,n,s))s.stopPropagation();else if(Dp(t,s),e&4&&-1<rb.indexOf(t)){for(;o!==null;){var c=As(o);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-jt(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===o)break;o=c}o!==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(ft()){case at:return 2;case Dt:return 8;case $:case It:return 32;case L:return 268435456;default:return 32}default:return 32}}var xu=!1,Ba=null,za=null,Ua=null,ul=new Map,dl=new Map,Va=[],rb="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,o,c){return t===null||t.nativeEvent!==c?(t={blockedOn:e,domEventName:n,eventSystemFlags:s,nativeEvent:c,targetContainers:[o]},e!==null&&(e=As(e),e!==null&&Np(e)),t):(t.eventSystemFlags|=s,e=t.targetContainers,o!==null&&e.indexOf(o)===-1&&e.push(o),t)}function cb(t,e,n,s,o){switch(e){case"focusin":return Ba=fl(Ba,t,e,n,s,o),!0;case"dragenter":return za=fl(za,t,e,n,s,o),!0;case"mouseover":return Ua=fl(Ua,t,e,n,s,o),!0;case"pointerover":var c=o.pointerId;return ul.set(c,fl(ul.get(c)||null,t,e,n,s,o)),!0;case"gotpointercapture":return c=o.pointerId,dl.set(c,fl(dl.get(c)||null,t,e,n,s,o)),!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(){Ep(n)});return}}else if(e===31){if(e=p(n),e!==null){t.blockedOn=e,ji(t.priority,function(){Ep(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&&Np(e),t.blockedOn=n,!1;e.shift()}return!0}function kp(t,e,n){Io(t)&&n.delete(e)}function ub(){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,ub)))}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],o=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:o,method:n.method,action:s},s,o))}}))}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 o=n[s],c=n[s+1],m=o[st]||null;if(typeof c=="function")m||Mp(n);else if(m){var y=null;if(c&&c.hasAttribute("formAction")){if(o=c,m=c[st]||null)y=m.formAction;else if(Tu(o)!==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 o=m})},focusReset:"manual",scroll:"manual"})}function e(){o!==null&&(o(),o=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,o=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),o!==null&&(o(),o=null)}}}function ju(t){this._internalRoot=t}Zo.prototype.render=ju.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(r(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(r(527,Op,"19.2.4"));X.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=v(e),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var db={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,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(db),Be=Xo}catch{}}return hl.createRoot=function(t,e){if(!u(t))throw Error(r(299));var n=!1,s="",o=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&&(o=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,o,c,m,Rp),t[Rt]=e.current,iu(t),new ju(e)},hl.hydrateRoot=function(t,e,n){if(!u(t))throw Error(r(299));var s=!1,o="",c=Gh,m=Ih,y=qh,T=null;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=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,o,T,c,m,y,Rp),e.context=xp(null),n=e.current,s=pn(),s=_s(s),o=xa(s),o.callback=null,ja(n,o,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 Eb(){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=Nb(),Au.exports}var Cb=Eb();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 Db(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 wb(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 kb(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 Mb(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 Rb(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 Ob(a){return Fe(a)&&typeof a.environmentId=="string"&&typeof a.stage=="string"&&typeof a.message=="string"&&typeof a.progress=="number"}function Bb(a){return Fe(a)&&typeof a.name=="string"&&typeof a.repository=="string"&&typeof a.state=="string"&&typeof a.gitStatus=="string"}function zb(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,r){return Array.isArray(a)?a.filter((u,h)=>i(u)?!0:(bl(l,`item at index ${h} in "${r}" has unexpected shape`),!1)):(bl(l,`expected "${r}" to be an array, got ${typeof a}`),[])}function Ub(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 Vb=3e3,oi=5e3;function Lb(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",r=_.useRef(void 0),[u,h]=_.useState(!1),[d,p]=_.useState([]),[g,v]=_.useState([]),[b,S]=_.useState([]),[x,D]=_.useState(0),[k,R]=_.useState(void 0),[q,B]=_.useState([]),[F,O]=_.useState([]),[W,Z]=_.useState([]),[Q,nt]=_.useState([]),[U,et]=_.useState({}),[dt,bt]=_.useState([]),[zt,J]=_.useState(""),[Xt,Vt]=_.useState(!1),[z,X]=_.useState([]),[rt,yt]=_.useState({}),[Tt,Pt]=_.useState(!1),[At,St]=_.useState(void 0),G=_.useCallback(tt=>{var jt;((jt=r.current)==null?void 0:jt.readyState)===WebSocket.OPEN&&r.current.send(JSON.stringify(tt))},[]);_.useEffect(()=>{let tt,jt;function qt(){tt=new WebSocket(l),r.current=tt,tt.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"})},tt.onmessage=ae=>{var ze,Ke,kn,tn,it,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 pt=Ub(ae.data);if(pt)switch(pt.type){case"environments":p(In((ze=pt.payload)==null?void 0:ze.environments,Db,"environments","environments"));break;case"sessions":v(In((Ke=pt.payload)==null?void 0:Ke.sessions,Ip,"sessions","sessions"));break;case"session_event":{if(!qp(pt.payload)){bl("session_event","payload is not a valid SessionEvent");break}const st=pt.payload;let Rt=0;S(Lt=>{const se=[...Lt,st];return se.length>oi?(Rt=se.length-oi,se.slice(-oi)):se}),Rt>0&&D(Lt=>Lt+Rt),st.eventType==="status"&&v(Lt=>Lt.map(se=>se.id===st.sessionId?{...se,status:st.content}:se));break}case"session_events":{const st=In((kn=pt.payload)==null?void 0:kn.events,qp,"session_events","events"),Rt=(tn=pt.payload)==null?void 0:tn.sessionId;if(typeof Rt!="string"){bl("session_events","missing or non-string sessionId");break}if(st.length>0){let Lt=0;S(se=>{const Qa=[...se.filter(Pa=>Pa.sessionId!==Rt),...st];return Qa.length>oi?(Lt=Qa.length-oi,Qa.slice(-oi)):Qa}),Lt>0&&D(se=>se+Lt)}break}case"spawned":{const st=(it=pt.payload)==null?void 0:it.sessionId;typeof st=="string"&&st&&R(st),G({type:"list_sessions"});break}case"projects":B(In((re=pt.payload)==null?void 0:re.projects,wb,"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=pt.payload)==null?void 0:rn.tasks,kb,"tasks","tasks"),Rt=(typeof((pa=pt.payload)==null?void 0:pa.projectId)=="string"?pt.payload.projectId:"")||(st.length>0?st[0].projectId:"");if(!Rt){O(st);break}O(Lt=>[...Lt.filter(se=>se.projectId!==Rt),...st]);break}case"task_created":{const st=(Ss=pt.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=pt.payload;if(!Fe(st))break;St(Lt=>st.taskId&&Lt===st.taskId?void 0:Lt),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&&O(Lt=>{const se=Lt.find(xs=>xs.id===st.taskId);return se&&G({type:"list_tasks",payload:{projectId:se.projectId}}),Lt});break}case"task_approved":case"task_rejected":case"task_deleted":case"task_updated":{const st=pt.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&&O(Lt=>{const se=Lt.find(xs=>xs.id===st.taskId);return se&&G({type:"list_tasks",payload:{projectId:se.projectId}}),Lt});break}case"findings":Z(In((ga=pt.payload)==null?void 0:ga.findings,Mb,"findings","findings"));break;case"finding_posted":typeof((Rl=pt.payload)==null?void 0:Rl.projectId)=="string"&&G({type:"list_findings",payload:{projectId:pt.payload.projectId}});break;case"tokens":nt(In((Si=pt.payload)==null?void 0:Si.tokens,Rb,"tokens","tokens"));break;case"token_changed":G({type:"list_tokens"});break;case"provision_progress":{if(!Ob(pt.payload)){bl("provision_progress","payload is not a valid ProvisionStatus with environmentId");break}const st=pt.payload;et(Rt=>({...Rt,[st.environmentId]:{stage:st.stage,message:st.message,progress:st.progress}})),st.stage==="ready"&&setTimeout(()=>{et(Lt=>{const se={...Lt};return delete se[st.environmentId],se})},5e3);break}case"environment_added":break;case"environment_removed":if(typeof((_i=pt.payload)==null?void 0:_i.environmentId)=="string"){const st=pt.payload.environmentId;p(Rt=>Rt.filter(Lt=>Lt.id!==st)),et(Rt=>{const Lt={...Rt};return delete Lt[st],Lt})}G({type:"list_sessions"});break;case"codespaces_list":{const st=In((Ti=pt.payload)==null?void 0:Ti.codespaces,Bb,"codespaces_list","codespaces"),Rt=typeof((_s=pt.payload)==null?void 0:_s.error)=="string"?pt.payload.error:"";bt(st),J(Rt);break}case"codespace_created":{Vt(!1),G({type:"list_codespaces"});break}case"codespace_create_error":{Vt(!1);const st=typeof((Ts=pt.payload)==null?void 0:Ts.message)=="string"?pt.payload.message:"Failed to create codespace";J(st);break}case"personas":{const st=In((xi=pt.payload)==null?void 0:xi.personas,zb,"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=pt.payload)==null?void 0:ji.taskId;if(typeof st!="string"||!st)break;const Rt=In((Mn=pt.payload)==null?void 0:Mn.sessions,Ip,"task_sessions","sessions");yt(Lt=>({...Lt,[st]:Rt}));break}case"error":console.error("[ws]",(Te=pt.payload)==null?void 0:Te.message);break}},tt.onclose=()=>{h(!1),r.current=void 0,Pt(!1),St(void 0),clearTimeout(jt),jt=setTimeout(qt,Vb)},tt.onerror=()=>{tt.close()}}return qt(),()=>{clearTimeout(jt),tt==null||tt.close()}},[l,G]);const Kt=_.useCallback((tt,jt,qt,ae,pt)=>{G({type:"spawn",payload:{environmentId:tt,prompt:jt,model:qt||"",runtime:ae||"",personaId:pt||""}})},[G]),fe=_.useCallback((tt,jt)=>{G({type:"send_input",payload:{sessionId:tt,text:jt}})},[G]),Ze=_.useCallback(tt=>{G({type:"kill",payload:{sessionId:tt}})},[G]),Xe=_.useCallback(()=>{G({type:"list_environments"}),G({type:"list_sessions"}),G({type:"list_projects"}),G({type:"list_tokens"})},[G]),ee=_.useCallback(tt=>{G({type:"get_session_events",payload:{sessionId:tt}})},[G]),Je=_.useCallback(()=>{S([]),D(0)},[]),Ie=_.useCallback((tt,jt,qt,ae)=>{Pt(!0),G({type:"create_project",payload:{name:tt,description:jt||"",repoUrl:qt||"",defaultEnvironmentId:ae||""}})},[G]),$e=_.useCallback(tt=>{G({type:"archive_project",payload:{projectId:tt}})},[G]),We=_.useCallback((tt,jt)=>{G({type:"update_project",payload:{projectId:tt,...jt}})},[G]),ve=_.useCallback(tt=>{G({type:"list_tasks",payload:{projectId:tt}})},[G]),P=_.useCallback((tt,jt,qt,ae,pt,ze,Ke)=>{G({type:"create_task",payload:{projectId:tt,title:jt,description:qt||"",environmentId:ae||"",dependsOn:pt||[],parentTaskId:ze||"",personaId:Ke||""}})},[G]),Re=_.useCallback((tt,jt,qt,ae)=>{St(tt),G({type:"start_task",payload:{taskId:tt,runtime:jt||"",model:qt||"",personaId:ae||""}})},[G]),Y=_.useCallback(tt=>{G({type:"approve_task",payload:{taskId:tt}})},[G]),K=_.useCallback((tt,jt)=>{G({type:"reject_task",payload:{taskId:tt,reviewNotes:jt}})},[G]),lt=_.useCallback(tt=>{G({type:"delete_task",payload:{taskId:tt}})},[G]),ut=_.useCallback(tt=>{G({type:"list_findings",payload:{projectId:tt}})},[G]),vt=_.useCallback((tt,jt,qt,ae,pt)=>{G({type:"post_finding",payload:{projectId:tt,title:jt,content:qt,category:ae||"general",tags:pt||[]}})},[G]),mt=_.useCallback(()=>{G({type:"list_tokens"})},[G]),Nt=_.useCallback((tt,jt,qt,ae,pt)=>{G({type:"set_token",payload:{name:tt,value:jt,tokenType:qt,envVar:ae,filePath:pt}})},[G]),Mt=_.useCallback(tt=>{G({type:"delete_token",payload:{name:tt}})},[G]),ft=_.useCallback((tt,jt,qt,ae)=>{const pt={displayName:tt,adapterType:jt,adapterConfig:qt||{}};ae&&(pt.defaultRuntime=ae),G({type:"add_environment",payload:pt})},[G]),at=_.useCallback(tt=>{G({type:"provision_environment",payload:{environmentId:tt}})},[G]),Dt=_.useCallback(tt=>{G({type:"stop_environment",payload:{environmentId:tt}})},[G]),$=_.useCallback(tt=>{G({type:"remove_environment",payload:{environmentId:tt}})},[G]),It=_.useCallback(()=>{G({type:"list_codespaces"})},[G]),L=_.useCallback(tt=>{if(!u){J("Not connected to server. Please try again once the connection is restored.");return}Vt(!0),J(""),G({type:"create_codespace",payload:{repo:tt}})},[G,u]),Ee=_.useCallback((tt,jt,qt,ae,pt,ze)=>{G({type:"create_persona",payload:{name:tt,description:jt,systemPrompt:qt,runtime:ae||"",model:pt||"",maxTurns:ze||0}})},[G]),Kn=_.useCallback((tt,jt,qt,ae,pt,ze,Ke)=>{G({type:"update_persona",payload:{personaId:tt,name:jt||"",description:qt||"",systemPrompt:ae||"",runtime:pt||"",model:ze||"",maxTurns:Ke||0}})},[G]),Oe=_.useCallback(tt=>{G({type:"delete_persona",payload:{personaId:tt}})},[G]),Be=_.useCallback(tt=>{G({type:"get_task_sessions",payload:{taskId:tt}})},[G]);return{connected:u,environments:d,sessions:g,events:b,eventsDropped:x,lastSpawnedId:k,projects:q,tasks:F,findings:W,tokens:Q,spawn:Kt,sendInput:fe,kill:Ze,refresh:Xe,loadSessionEvents:ee,clearEvents:Je,createProject:Ie,archiveProject:$e,updateProject:We,loadTasks:ve,createTask:P,startTask:Re,approveTask:Y,rejectTask:K,deleteTask:lt,loadFindings:ut,postFinding:vt,addEnvironment:ft,loadTokens:mt,setToken:Nt,deleteToken:Mt,provisionStatus:U,provisionEnvironment:at,stopEnvironment:Dt,removeEnvironment:$,codespaces:dt,codespaceError:zt,codespaceCreating:Xt,listCodespaces:It,createCodespace:L,projectCreating:Tt,taskStartingId:At,personas:z,createPersona:Ee,updatePersona:Kn,deletePersona:Oe,taskSessions:rt,loadTaskSessions:Be}}const cd=_.createContext(void 0);function Hb({children:a}){const i=Lb();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 Gb=[{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}],Ib=[{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"}],qb=[{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"}],Yb=[{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"}],Zb=[{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"}],Xb=[{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:""}],Kb=[{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"}],Qb={"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 Pb({children:a}){const[i,l]=_.useState(Ib),[r,u]=_.useState(qb),[h,d]=_.useState(void 0),[p,g]=_.useState(Yb),[v,b]=_.useState(Zb),[S,x]=_.useState(Yp),[D,k]=_.useState(Xb),[R,q]=_.useState(Kb),[B]=_.useState(Qb),F=_.useRef(0),O=_.useRef(0),W=_.useRef(new Set),Z=_.useRef(new Map),Q=_.useRef(v);Q.current=v;const nt=_.useRef(new Map),U=_.useRef(new Map),et=_.useCallback(Y=>(F.current+=1,`mock-${Y}-${String(F.current).padStart(3,"0")}`),[]),dt=_.useCallback(()=>{const Y=Zp[O.current%Zp.length];return O.current+=1,Y},[]),bt=_.useCallback((Y,K,lt)=>{const ut=setTimeout(()=>{var vt;W.current.delete(ut),lt&&((vt=Z.current.get(lt))==null||vt.delete(ut)),Y()},K);W.current.add(ut),lt&&(Z.current.has(lt)||Z.current.set(lt,new Set),Z.current.get(lt).add(ut))},[]),zt=_.useCallback(Y=>{const K=Z.current.get(Y);K&&(K.forEach(lt=>{clearTimeout(lt),W.current.delete(lt)}),Z.current.delete(Y))},[]),J=_.useCallback((Y,K)=>{l(lt=>lt.map(ut=>ut.id===Y?{...ut,status:K}:ut))},[]),Xt=_.useCallback(Y=>{u(K=>[...K,Y])},[]),Vt=_.useCallback((Y,K,lt)=>{K.forEach((ut,vt)=>{bt(()=>{const mt={sessionId:Y,...ut.event,timestamp:new Date().toISOString()};Xt(mt),ut.event.eventType==="status"&&J(Y,ut.event.content),vt===K.length-1&<&<()},ut.delayMs,Y)})},[bt,Xt,J]),z=_.useCallback((Y,K,lt,ut)=>{console.log("[MockGrackle] spawn",{environmentId:Y,prompt:K,runtime:ut});const vt=et("sess"),mt={id:vt,environmentId:Y,runtime:ut||"claude-code",status:"running",prompt:K,startedAt:new Date().toISOString()};l(Mt=>[...Mt,mt]),d(vt);const Nt=dt();if(console.log(`[MockGrackle] Playing scenario: ${Nt.label}`),Nt.pauseForInput){const Mt=Nt.pauseAfterStep??Nt.steps.length-1,ft=Nt.steps.slice(0,Mt+1),at=ft.length>0?ft[ft.length-1].delayMs:0;Vt(vt,ft),bt(()=>{J(vt,"waiting_input"),Xt({sessionId:vt,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},at+Xp,vt),Nt.resumeSteps&&nt.current.set(vt,Nt.resumeSteps)}else Vt(vt,Nt.steps)},[et,dt,Vt,bt,J,Xt]),X=_.useCallback(Y=>{console.log("[MockGrackle] kill",Y),zt(Y),nt.current.delete(Y),J(Y,"killed"),Xt({sessionId:Y,eventType:"status",timestamp:new Date().toISOString(),content:"killed"}),b(K=>K.map(lt=>lt.sessionId===Y&<.status==="in_progress"?{...lt,status:"failed"}:lt))},[zt,J,Xt]),rt=_.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),yt=_.useCallback(Y=>{console.log("[MockGrackle] loadSessionEvents",Y)},[]),Tt=_.useCallback(()=>{console.log("[MockGrackle] clearEvents"),u([])},[]),Pt=_.useCallback((Y,K,lt,ut)=>{console.log("[MockGrackle] createProject",{name:Y,description:K});const vt={id:et("proj"),name:Y,description:K||"",repoUrl:lt||"",defaultEnvironmentId:ut||"",status:"active",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};g(mt=>[...mt,vt])},[et]),At=_.useCallback(Y=>{console.log("[MockGrackle] archiveProject",Y),g(K=>K.map(lt=>lt.id===Y?{...lt,status:"archived"}:lt))},[]),St=_.useCallback(Y=>{console.log("[MockGrackle] loadTasks",Y)},[]),G=_.useCallback((Y,K,lt,ut,vt,mt)=>{console.log("[MockGrackle] createTask",{projectId:Y,title:K,parentTaskId:mt}),b(Nt=>{const ft=Nt.filter(It=>It.projectId===Y).reduce((It,L)=>Math.max(It,L.sortOrder),0),at=mt?Nt.find(It=>It.id===mt):void 0;if(mt&&!at)return console.warn("[MockGrackle] Parent task not found:",mt),Nt;if(at&&!at.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",mt),Nt;const Dt=at?at.depth+1:0,$={id:et("task"),projectId:Y,title:K,description:lt||"",status:"pending",branch:"",environmentId:ut||"",sessionId:"",dependsOn:vt||[],reviewNotes:"",sortOrder:ft+1,createdAt:new Date().toISOString(),parentTaskId:mt||"",depth:Dt,childTaskIds:[],canDecompose:!mt,personaId:""};return[...Nt,$]})},[et]),Kt=_.useCallback((Y,K,lt)=>{var at;console.log("[MockGrackle] startTask",{taskId:Y,runtime:K});const ut=Q.current.find(Dt=>Dt.id===Y),vt=(ut==null?void 0:ut.environmentId)??"",mt=(ut==null?void 0:ut.title)??"",Nt=et("sess"),Mt={id:Nt,environmentId:vt||"env-local-01",runtime:K||"claude-code",status:"running",prompt:mt||Y,startedAt:new Date().toISOString()};l(Dt=>[...Dt,Mt]),b(Dt=>Dt.map($=>$.id===Y?{...$,status:"in_progress",sessionId:Nt,branch:`mock/${Y.slice(0,8)}`}:$));const ft=dt();if(console.log(`[MockGrackle] Playing task scenario: ${ft.label}`),ft.pauseForInput){const Dt=ft.pauseAfterStep??ft.steps.length-1,$=ft.steps.slice(0,Dt+1),It=$.length>0?$[$.length-1].delayMs:0;if(Vt(Nt,$),bt(()=>{J(Nt,"waiting_input"),Xt({sessionId:Nt,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},It+Xp,Nt),ft.resumeSteps){const L=[...ft.resumeSteps];nt.current.set(Nt,L);const Ee=L.reduce((Kn,Oe)=>Math.max(Kn,Oe.delayMs),0);U.current.set(Nt,{taskId:Y,delayAfterResume:Ee+200})}}else{const Dt=ft.steps.length>0?ft.steps[ft.steps.length-1].delayMs:0;Vt(Nt,ft.steps);const $=(at=ft.steps[ft.steps.length-1])==null?void 0:at.event.content;bt(()=>{$==="completed"?b(It=>It.map(L=>L.id===Y&&L.status==="in_progress"?{...L,status:"review"}:L)):$==="failed"&&b(It=>It.map(L=>L.id===Y&&L.status==="in_progress"?{...L,status:"failed"}:L))},Dt+100,Nt)}},[et,dt,Vt,bt,J,Xt]),fe=_.useCallback((Y,K)=>{console.log("[MockGrackle] sendInput",{sessionId:Y,text:K}),Xt({sessionId:Y,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${K}`}),J(Y,"running"),Xt({sessionId:Y,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const lt=nt.current.get(Y);if(lt)nt.current.delete(Y),Vt(Y,lt);else{const vt=[{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"}}];Vt(Y,vt)}const ut=U.current.get(Y);ut&&(U.current.delete(Y),bt(()=>{b(vt=>vt.map(mt=>mt.id===ut.taskId&&mt.status==="in_progress"?{...mt,status:"review"}:mt))},ut.delayAfterResume,Y))},[Xt,J,Vt,bt]),Ze=_.useCallback(Y=>{console.log("[MockGrackle] approveTask",Y),b(K=>K.map(lt=>lt.id===Y?{...lt,status:"done"}:lt))},[]),Xe=_.useCallback((Y,K)=>{console.log("[MockGrackle] rejectTask",{taskId:Y,reviewNotes:K}),b(lt=>lt.map(ut=>ut.id===Y?{...ut,status:"assigned",reviewNotes:K,sessionId:""}:ut))},[]),ee=_.useCallback(Y=>{console.log("[MockGrackle] deleteTask",Y),b(K=>K.filter(lt=>lt.id!==Y))},[]),Je=_.useCallback(Y=>{console.log("[MockGrackle] loadFindings",Y),x(Yp.filter(K=>K.projectId===Y))},[]),Ie=_.useCallback((Y,K,lt,ut,vt)=>{console.log("[MockGrackle] postFinding",{projectId:Y,title:K});const mt={id:et("find"),projectId:Y,taskId:"",sessionId:"",category:ut||"general",title:K,content:lt,tags:vt||[],createdAt:new Date().toISOString()};x(Nt=>[...Nt,mt])},[et]),$e=_.useCallback((Y,K,lt,ut)=>{console.log("[MockGrackle] addEnvironment",{displayName:Y,adapterType:K,adapterConfig:lt,defaultRuntime:ut})},[]),We=_.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),ve=_.useCallback((Y,K,lt,ut,vt)=>{console.log("[MockGrackle] setToken",{name:Y,tokenType:lt}),k(mt=>[...mt.filter(Mt=>Mt.name!==Y),{name:Y,tokenType:lt,envVar:ut,filePath:vt,expiresAt:""}])},[]),P=_.useCallback(Y=>{console.log("[MockGrackle] deleteToken",Y),k(K=>K.filter(lt=>lt.name!==Y))},[]);_.useEffect(()=>()=>{W.current.forEach(clearTimeout),W.current.clear()},[]);const Re=_.useMemo(()=>({connected:!0,environments:Gb,sessions:i,events:r,eventsDropped:0,lastSpawnedId:h,projects:p,tasks:v,findings:S,tokens:D,spawn:z,sendInput:fe,kill:X,refresh:rt,loadSessionEvents:yt,clearEvents:Tt,createProject:Pt,archiveProject:At,updateProject:(Y,K)=>{console.log("[MockGrackle] updateProject",{projectId:Y,...K}),g(lt=>lt.map(ut=>ut.id!==Y?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:P,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:R,createPersona:(Y,K,lt,ut,vt,mt)=>{console.log("[MockGrackle] createPersona",{name:Y});const Nt={id:`mock-persona-${Date.now()}`,name:Y,description:K,systemPrompt:lt,toolConfig:"{}",runtime:ut??"claude-code",model:vt||"",maxTurns:mt||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};q(Mt=>[...Mt,Nt])},updatePersona:(Y,K,lt,ut,vt,mt,Nt)=>{console.log("[MockGrackle] updatePersona",{personaId:Y,name:K}),q(Mt=>Mt.map(ft=>ft.id!==Y?ft:{...ft,...K!==void 0?{name:K}:{},...lt!==void 0?{description:lt}:{},...ut!==void 0?{systemPrompt:ut}:{},...vt!==void 0?{runtime:vt}:{},...mt!==void 0?{model:mt}:{},...Nt!==void 0?{maxTurns:Nt}:{},updatedAt:new Date().toISOString()}))},deletePersona:Y=>{console.log("[MockGrackle] deletePersona",Y),q(K=>K.filter(lt=>lt.id!==Y))},taskSessions:B,loadTaskSessions:Y=>{console.log("[MockGrackle] loadTaskSessions",Y)}}),[i,r,h,p,v,S,D,R,B,z,fe,X,rt,yt,Tt,Pt,At,St,G,Kt,Ze,Xe,ee,Je,Ie,$e,We,ve,P]);return f.jsx(cd.Provider,{value:Re,children:a})}const _v=_.createContext(void 0),Fb=4e3;function Jb({children:a}){const[i,l]=_.useState([]),r=_.useRef(0),u=_.useCallback(d=>{l(p=>p.filter(g=>g.id!==d))},[]),h=_.useCallback((d,p="info",g=Fb)=>{const v=`toast-${++r.current}`;l(b=>[...b,{id:v,message:d,variant:p,duration:g}])},[]);return f.jsx(_v.Provider,{value:{toasts:i,showToast:h,dismissToast:u},children:a})}function ud(){const a=_.useContext(_v);if(!a)throw new Error("useToast must be used within ToastProvider");return a}const $b="_container_ew76q_1",Wb="_brand_ew76q_26",tS="_info_ew76q_34",eS="_connectionDot_ew76q_41",nS="_connected_ew76q_44",aS="_disconnected_ew76q_48",sS="_settingsButton_ew76q_52",Ha={container:$b,brand:Wb,info:tS,connectionDot:eS,connected:nS,disconnected:aS,settingsButton:sS};function iS({setViewMode:a}){const{connected:i,environments:l,sessions:r}=Un(),u=l.length,h=l.filter(p=>p.status==="connected").length,d=r.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 lS extends _.Component{getSnapshotBeforeUpdate(i){const l=this.props.childRef.current;if(l&&i.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=l.offsetHeight||0,r.width=l.offsetWidth||0,r.top=l.offsetTop,r.left=l.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function oS({children:a,isPresent:i}){const l=_.useId(),r=_.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||!r.current||!d||!p)return;r.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(lS,{isPresent:i,childRef:r,sizeRef:u,children:_.cloneElement(a,{ref:r})})}const rS=({children:a,initial:i,isPresent:l,onExitComplete:r,custom:u,presenceAffectsLayout:h,mode:d})=>{const p=fd(cS),g=_.useId(),v=_.useCallback(S=>{p.set(S,!0);for(const x of p.values())if(!x)return;r&&r()},[p,r]),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&&r&&r()},[l]),d==="popLayout"&&(a=f.jsx(oS,{isPresent:l,children:a})),f.jsx(dr.Provider,{value:b,children:a})};function cS(){return new Map}function Tv(a=!0){const i=_.useContext(dr);if(i===null)return[!0,null];const{isPresent:l,onExitComplete:r,register:u}=i,h=_.useId();_.useEffect(()=>{a&&u(h)},[a]);const d=_.useCallback(()=>a&&r&&r(h),[h,r,a]);return!l&&r?[!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",xv=md?_.useLayoutEffect:_.useEffect,vi=({children:a,custom:i,initial:l=!0,onExitComplete:r,presenceAffectsLayout:u=!0,mode:h="sync",propagate:d=!1})=>{const[p,g]=Tv(d),v=_.useMemo(()=>Kp(a),[a]),b=d&&!p?[]:v.map(Qo),S=_.useRef(!0),x=_.useRef(v),D=fd(()=>new Map),[k,R]=_.useState(v),[q,B]=_.useState(v);xv(()=>{S.current=!1,x.current=v;for(let W=0;W<q.length;W++){const Z=Qo(q[W]);b.includes(Z)?D.delete(Z):D.get(Z)!==!0&&D.set(Z,!1)}},[q,b.length,b.join("-")]);const F=[];if(v!==k){let W=[...v];for(let Z=0;Z<q.length;Z++){const Q=q[Z],nt=Qo(Q);b.includes(nt)||(W.splice(Z,0,Q),F.push(Q))}h==="wait"&&F.length&&(W=F),B(Kp(W)),R(v);return}const{forceRender:O}=_.useContext(dd);return f.jsx(f.Fragment,{children:q.map(W=>{const Z=Qo(W),Q=d&&!p?!1:v===q||b.includes(Z),nt=()=>{if(D.has(Z))D.set(Z,!0);else return;let U=!0;D.forEach(et=>{et||(U=!1)}),U&&(O==null||O(),B(x.current),d&&(g==null||g()),r&&r())};return f.jsx(rS,{isPresent:Q,initial:!S.current||l?void 0:!1,custom:Q?void 0:i,presenceAffectsLayout:u,mode:h,onExitComplete:Q?void 0:nt,children:W},Z)})})},gn=a=>a;let jv=gn;const uS={useManualTiming:!1};function dS(a){let i=new Set,l=new Set,r=!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&&r?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,r){u=!0;return}r=!0,[i,l]=[l,i],i.forEach(p),i.clear(),r=!1,u&&(u=!1,g.process(v))}};return g}const Po=["read","resolveKeyframes","update","preRender","render","postRender"],fS=40;function Av(a,i){let l=!1,r=!0;const u={delta:0,timestamp:0,isProcessing:!1},h=()=>l=!0,d=Po.reduce((B,F)=>(B[F]=dS(h),B),{}),{read:p,resolveKeyframes:g,update:v,preRender:b,render:S,postRender:x}=d,D=()=>{const B=performance.now();l=!1,u.delta=r?1e3/60:Math.max(Math.min(B-u.timestamp,fS),1),u.timestamp=B,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&&(r=!1,a(D))},k=()=>{l=!0,r=!0,u.isProcessing||a(D)};return{schedule:Po.reduce((B,F)=>{const O=d[F];return B[F]=(W,Z=!1,Q=!1)=>(l||k(),O.schedule(W,Z,Q)),B},{}),cancel:B=>{for(let F=0;F<Po.length;F++)d[Po[F]].cancel(B)},state:u,steps:d}}const{schedule:oe,cancel:Za,state:Ge,steps:Cu}=Av(typeof requestAnimationFrame<"u"?requestAnimationFrame:gn,!0),Nv=_.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 hS(a){for(const i in a)mi[i]={...mi[i],...a[i]}}const mS=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")||mS.has(a)}let Ev=a=>!nr(a);function pS(a){a&&(Ev=i=>i.startsWith("on")?!nr(i):a(i))}try{pS(require("@emotion/is-prop-valid").default)}catch{}function gS(a,i,l){const r={};for(const u in a)u==="values"&&typeof a.values=="object"||(Ev(u)||l===!0&&nr(u)||!i&&!nr(u)||a.draggable&&u.startsWith("onDrag"))&&(r[u]=a[u]);return r}function vS(a){if(typeof Proxy>"u")return a;const i=new Map,l=(...r)=>a(...r);return new Proxy(l,{get:(r,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 Cv(a){return!!(mr(a)||a.variants)}function yS(a,i){if(mr(a)){const{initial:l,animate:r}=a;return{initial:l===!1||jl(l)?l:void 0,animate:jl(r)?r:void 0}}return a.inherit!==!1?i:{}}function bS(a){const{initial:i,animate:l}=yS(a,_.useContext(fr));return _.useMemo(()=>({initial:i,animate:l}),[Pp(i),Pp(l)])}function Pp(a){return Array.isArray(a)?a.join(" "):a}const SS=Symbol.for("motionComponentSymbol");function ci(a){return a&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function _S(a,i,l){return _.useCallback(r=>{r&&a.onMount&&a.onMount(r),i&&(r?i.mount(r):i.unmount()),l&&(typeof l=="function"?l(r):ci(l)&&(l.current=r))},[i])}const vd=a=>a.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),TS="framerAppearId",Dv="data-"+vd(TS),{schedule:yd}=Av(queueMicrotask,!1),wv=_.createContext({});function xS(a,i,l,r,u){var h,d;const{visualElement:p}=_.useContext(fr),g=_.useContext(Nv),v=_.useContext(dr),b=_.useContext(hd).reducedMotion,S=_.useRef(null);r=r||g.renderer,!S.current&&r&&(S.current=r(a,{visualState:i,parent:p,props:l,presenceContext:v,blockInitialAnimation:v?v.initial===!1:!1,reducedMotionConfig:b}));const x=S.current,D=_.useContext(wv);x&&!x.projection&&u&&(x.type==="html"||x.type==="svg")&&jS(S.current,l,u,D);const k=_.useRef(!1);_.useInsertionEffect(()=>{x&&k.current&&x.update(l,v)});const R=l[Dv],q=_.useRef(!!R&&!(!((h=window.MotionHandoffIsComplete)===null||h===void 0)&&h.call(window,R))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,R)));return xv(()=>{x&&(k.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),yd.render(x.render),q.current&&x.animationState&&x.animationState.animateChanges())}),_.useEffect(()=>{x&&(!q.current&&x.animationState&&x.animationState.animateChanges(),q.current&&(queueMicrotask(()=>{var B;(B=window.MotionHandoffMarkAsComplete)===null||B===void 0||B.call(window,R)}),q.current=!1))}),x}function jS(a,i,l,r){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:kv(a.parent)),a.projection.setOptions({layoutId:u,layout:h,alwaysMeasureLayout:!!d||p&&ci(p),visualElement:a,animationType:typeof h=="string"?h:"both",initialPromotionConfig:r,layoutScroll:g,layoutRoot:v})}function kv(a){if(a)return a.options.allowProjection!==!1?a.projection:kv(a.parent)}function AS({preloadedFeatures:a,createVisualElement:i,useRender:l,useVisualState:r,Component:u}){var h,d;a&&hS(a);function p(v,b){let S;const x={..._.useContext(hd),...v,layoutId:NS(v)},{isStatic:D}=x,k=bS(v),R=r(v,D);if(!D&&md){ES();const q=CS(x);S=q.MeasureLayout,k.visualElement=xS(u,R,x,i,q.ProjectionNode)}return f.jsxs(fr.Provider,{value:k,children:[S&&k.visualElement?f.jsx(S,{visualElement:k.visualElement,...x}):null,l(u,v,_S(R,k.visualElement,b),R,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[SS]=u,g}function NS({layoutId:a}){const i=_.useContext(dd).id;return i&&a!==void 0?i+"-"+a:a}function ES(a,i){_.useContext(Nv).strict}function CS(a){const{drag:i,layout:l}=mi;if(!i&&!l)return{};const r={...i,...l};return{MeasureLayout:i!=null&&i.isEnabled(a)||l!=null&&l.isEnabled(a)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const DS=["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:!!(DS.indexOf(a)>-1||/[A-Z]/u.test(a))}function Fp(a){const i=[{},{}];return a==null||a.values.forEach((l,r)=>{i[0][r]=l.get(),i[1][r]=l.getVelocity()}),i}function Sd(a,i,l,r){if(typeof i=="function"){const[u,h]=Fp(r);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(r);i=i(l!==void 0?l:a.custom,u,h)}return i}const Yu=a=>Array.isArray(a),wS=a=>!!(a&&typeof a=="object"&&a.mix&&a.toValue),kS=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 wS(i)?i.toValue():i}function MS({scrapeMotionValuesFromProps:a,createRenderState:i,onUpdate:l},r,u,h){const d={latestValues:RS(r,u,h,a),renderState:i()};return l&&(d.onMount=p=>l({props:r,current:p,...d}),d.onUpdate=p=>l(p)),d}const Mv=a=>(i,l)=>{const r=_.useContext(fr),u=_.useContext(dr),h=()=>MS(a,i,r,u);return l?h():fd(h)};function RS(a,i,l,r){const u={},h=r(a,{});for(const x in h)u[x]=Wo(h[x]);let{initial:d,animate:p}=a;const g=mr(a),v=Cv(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:R,transition:q,...B}=k;for(const F in B){let O=B[F];if(Array.isArray(O)){const W=b?O.length-1:0;O=O[W]}O!==null&&(u[F]=O)}for(const F in R)u[F]=R[F]}}}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),Rv=a=>i=>typeof i=="string"&&i.startsWith(a),Ov=Rv("--"),OS=Rv("var(--"),_d=a=>OS(a)?BS.test(a.split("/*")[0].trim()):!1,BS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Bv=(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"),zS=Dl("vh"),US=Dl("vw"),Jp={...Yn,parse:a=>Yn.parse(a)/100,transform:a=>Yn.transform(a*100)},VS={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},LS={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={...VS,...LS,zIndex:$p,size:xt,fillOpacity:Al,strokeOpacity:Al,numOctaves:$p},HS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},GS=yi.length;function IS(a,i,l){let r="",u=!0;for(let h=0;h<GS;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=Bv(p,Td[d]);if(!g){u=!1;const b=HS[d]||d;r+=`${b}(${v}) `}l&&(i[d]=v)}}return r=r.trim(),l?r=l(i,u?"":r):u&&(r="none"),r}function xd(a,i,l){const{style:r,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(Ov(g)){u[g]=v;continue}else{const b=Bv(v,Td[g]);g.startsWith("origin")?(p=!0,h[g]=b):r[g]=b}}if(i.transform||(d||l?r.transform=IS(i,a.transform,l):r.transform&&(r.transform="none")),p){const{originX:g="50%",originY:v="50%",originZ:b=0}=h;r.transformOrigin=`${g} ${v} ${b}`}}const qS={offset:"stroke-dashoffset",array:"stroke-dasharray"},YS={offset:"strokeDashoffset",array:"strokeDasharray"};function ZS(a,i,l=1,r=0,u=!0){a.pathLength=1;const h=u?qS:YS;a[h.offset]=xt.transform(-r);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 XS(a,i,l){const r=Wp(i,a.x,a.width),u=Wp(l,a.y,a.height);return`${r} ${u}`}function jd(a,{attrX:i,attrY:l,attrScale:r,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=XS(k,u!==void 0?u:.5,h!==void 0?h:.5)),i!==void 0&&(x.x=i),l!==void 0&&(x.y=l),r!==void 0&&(x.scale=r),d!==void 0&&ZS(x,d,p,g,!1)}const Ad=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),zv=()=>({...Ad(),attrs:{}}),Nd=a=>typeof a=="string"&&a.toLowerCase()==="svg";function Uv(a,{style:i,vars:l},r,u){Object.assign(a.style,i,u&&u.getProjectionStyles(r));for(const h in l)a.style.setProperty(h,l[h])}const Vv=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 Lv(a,i,l,r){Uv(a,i,void 0,r);for(const u in i.attrs)a.setAttribute(Vv.has(u)?u:vd(u),i.attrs[u])}const ar={};function KS(a){Object.assign(ar,a)}function Hv(a,{layout:i,layoutId:l}){return bs.has(a)||a.startsWith("origin")||(i||l!==void 0)&&(!!ar[a]||a==="opacity")}function Ed(a,i,l){var r;const{style:u}=a,h={};for(const d in u)(Ye(u[d])||i.style&&Ye(i.style[d])||Hv(d,a)||((r=l==null?void 0:l.getValue(d))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(h[d]=u[d]);return h}function Gv(a,i,l){const r=Ed(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;r[h]=a[u]}return r}function QS(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"],PS={useVisualState:Mv({scrapeMotionValuesFromProps:Gv,createRenderState:zv,onUpdate:({props:a,prevProps:i,current:l,renderState:r,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(()=>{QS(l,r),oe.render(()=>{jd(r,u,Nd(l.tagName),a.transformTemplate),Lv(l,r)})})}})},FS={useVisualState:Mv({scrapeMotionValuesFromProps:Ed,createRenderState:Ad})};function Iv(a,i,l){for(const r in i)!Ye(i[r])&&!Hv(r,l)&&(a[r]=i[r])}function JS({transformTemplate:a},i){return _.useMemo(()=>{const l=Ad();return xd(l,i,a),Object.assign({},l.vars,l.style)},[i])}function $S(a,i){const l=a.style||{},r={};return Iv(r,l,a),Object.assign(r,JS(a,i)),r}function WS(a,i){const l={},r=$S(a,i);return a.drag&&a.dragListener!==!1&&(l.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.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=r,l}function t_(a,i,l,r){const u=_.useMemo(()=>{const h=zv();return jd(h,i,Nd(r),a.transformTemplate),{...h.attrs,style:{...h.style}}},[i]);if(a.style){const h={};Iv(h,a.style,a),u.style={...h,...u.style}}return u}function e_(a=!1){return(l,r,u,{latestValues:h},d)=>{const g=(bd(l)?t_:WS)(r,h,d,l),v=gS(r,typeof l=="string",a),b=l!==_.Fragment?{...v,...g,ref:u}:{},{children:S}=r,x=_.useMemo(()=>Ye(S)?S.get():S,[S]);return _.createElement(l,{...b,children:x})}}function n_(a,i){return function(r,{forwardMotionProps:u}={forwardMotionProps:!1}){const d={...bd(r)?PS:FS,preloadedFeatures:a,useRender:e_(u),createVisualElement:i,Component:r};return AS(d)}}function qv(a,i){if(!Array.isArray(i))return!1;const l=i.length;if(l!==a.length)return!1;for(let r=0;r<l;r++)if(i[r]!==a[r])return!1;return!0}function pr(a,i,l){const r=a.getProps();return Sd(r,i,l!==void 0?l:r.custom,a)}function Cd(a,i){return a?a[i]||a.default||a:void 0}const Yv=new Set(["width","height","top","left","right","bottom",...yi]);let tr;function a_(){tr=void 0}const Zn={now:()=>(tr===void 0&&Zn.set(Ge.isProcessing||uS.useManualTiming?Ge.timestamp:performance.now()),tr),set:a=>{tr=a,queueMicrotask(a_)}};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,r){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](i,l,r);else for(let h=0;h<u;h++){const d=this.subscriptions[h];d&&d(i,l,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Zv(a,i){return i?a*(1e3/i):0}const eg=30,s_=a=>!isNaN(parseFloat(a));class i_{constructor(i,l={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,u=!0)=>{const h=Zn.now();this.updatedAt!==h&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),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=s_(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 r=this.events[i].add(l);return i==="change"?()=>{r(),oe.read(()=>{this.events.change.getSize()||this.stop()})}:r}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,r){this.set(l),this.prev=void 0,this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt-r}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 Zv(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 Nl(a,i){return new i_(a,i)}function l_(a,i,l){a.hasValue(i)?a.getValue(i).set(l):a.addValue(i,Nl(l))}function o_(a,i){const l=pr(a,i);let{transitionEnd:r={},transition:u={},...h}=l||{};h={...h,...r};for(const d in h){const p=kS(h[d]);l_(a,d,p)}}function r_(a){return!!(Ye(a)&&a.add)}function Zu(a,i){const l=a.getValue("willChange");if(r_(l))return l.add(i)}function Xv(a){return a.props[Dv]}function Md(a){let i;return()=>(i===void 0&&(i=a()),i)}const c_=Md(()=>window.ScrollTimeline!==void 0);class u_{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 r=0;r<this.animations.length;r++)this.animations[r][i]=l}attachTimeline(i,l){const r=this.animations.map(u=>{if(c_()&&u.attachTimeline)return u.attachTimeline(i);if(typeof l=="function")return l(u)});return()=>{r.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 d_ extends u_{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",f_={linearEasing:void 0};function h_(a,i){const l=Md(a);return()=>{var r;return(r=f_[i])!==null&&r!==void 0?r:l()}}const sr=h_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),pi=(a,i,l)=>{const r=i-a;return r===0?1:(l-a)/r},Kv=(a,i,l=10)=>{let r="";const u=Math.max(Math.round(i/l),2);for(let h=0;h<u;h++)r+=a(pi(0,u-1,h))+", ";return`linear(${r.substring(0,r.length-2)})`};function Qv(a){return!!(typeof a=="function"&&sr()||!a||typeof a=="string"&&(a in Xu||sr())||Od(a)||Array.isArray(a)&&a.every(Qv))}const gl=([a,i,l,r])=>`cubic-bezier(${a}, ${i}, ${l}, ${r})`,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 Pv(a,i){if(a)return typeof a=="function"&&sr()?Kv(a,i):Od(a)?gl(a):Array.isArray(a)?a.map(l=>Pv(l,i)||Xu.easeOut):Xu[a]}const Fv=(a,i,l)=>(((1-3*l+3*i)*a+(3*l-6*i))*a+3*i)*a,m_=1e-7,p_=12;function g_(a,i,l,r,u){let h,d,p=0;do d=i+(l-i)/2,h=Fv(d,r,u)-a,h>0?l=d:i=d;while(Math.abs(h)>m_&&++p<p_);return d}function wl(a,i,l,r){if(a===i&&l===r)return gn;const u=h=>g_(h,0,1,a,l);return h=>h===0||h===1?h:Fv(u(h),i,r)}const Jv=a=>i=>i<=.5?a(2*i)/2:(2-a(2*(1-i)))/2,$v=a=>i=>1-a(1-i),Wv=wl(.33,1.53,.69,.99),Bd=$v(Wv),t0=Jv(Bd),e0=a=>(a*=2)<1?.5*Bd(a):.5*(2-Math.pow(2,-10*(a-1))),zd=a=>1-Math.sin(Math.acos(a)),n0=$v(zd),a0=Jv(zd),s0=a=>/^0[^.\s]+$/u.test(a);function v_(a){return typeof a=="number"?a===0:a!==null?a==="none"||a==="0"||s0(a):!0}const Sl=a=>Math.round(a*1e5)/1e5,Ud=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function y_(a){return a==null}const b_=/^(?:#[\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"&&b_.test(l)&&l.startsWith(a)||i&&!y_(l)&&Object.prototype.hasOwnProperty.call(l,i)),i0=(a,i,l)=>r=>{if(typeof r!="string")return r;const[u,h,d,p]=r.match(Ud);return{[a]:parseFloat(u),[i]:parseFloat(h),[l]:parseFloat(d),alpha:p!==void 0?parseFloat(p):1}},S_=a=>ma(0,255,a),Du={...bi,transform:a=>Math.round(S_(a))},vs={test:Vd("rgb","red"),parse:i0("red","green","blue"),transform:({red:a,green:i,blue:l,alpha:r=1})=>"rgba("+Du.transform(a)+", "+Du.transform(i)+", "+Du.transform(l)+", "+Sl(Al.transform(r))+")"};function __(a){let i="",l="",r="",u="";return a.length>5?(i=a.substring(1,3),l=a.substring(3,5),r=a.substring(5,7),u=a.substring(7,9)):(i=a.substring(1,2),l=a.substring(2,3),r=a.substring(3,4),u=a.substring(4,5),i+=i,l+=l,r+=r,u+=u),{red:parseInt(i,16),green:parseInt(l,16),blue:parseInt(r,16),alpha:u?parseInt(u,16)/255:1}}const Ku={test:Vd("#"),parse:__,transform:vs.transform},ui={test:Vd("hsl","hue"),parse:i0("hue","saturation","lightness"),transform:({hue:a,saturation:i,lightness:l,alpha:r=1})=>"hsla("+Math.round(a)+", "+Yn.transform(Sl(i))+", "+Yn.transform(Sl(l))+", "+Sl(Al.transform(r))+")"},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)},T_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function x_(a){var i,l;return isNaN(a)&&typeof a=="string"&&(((i=a.match(Ud))===null||i===void 0?void 0:i.length)||0)+(((l=a.match(T_))===null||l===void 0?void 0:l.length)||0)>0}const l0="number",o0="color",j_="var",A_="var(",ag="${}",N_=/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 El(a){const i=a.toString(),l=[],r={color:[],number:[],var:[]},u=[];let h=0;const p=i.replace(N_,g=>(qe.test(g)?(r.color.push(h),u.push(o0),l.push(qe.parse(g))):g.startsWith(A_)?(r.var.push(h),u.push(j_),l.push(g)):(r.number.push(h),u.push(l0),l.push(parseFloat(g))),++h,ag)).split(ag);return{values:l,split:p,indexes:r,types:u}}function r0(a){return El(a).values}function c0(a){const{split:i,types:l}=El(a),r=i.length;return u=>{let h="";for(let d=0;d<r;d++)if(h+=i[d],u[d]!==void 0){const p=l[d];p===l0?h+=Sl(u[d]):p===o0?h+=qe.transform(u[d]):h+=u[d]}return h}}const E_=a=>typeof a=="number"?0:a;function C_(a){const i=r0(a);return c0(a)(i.map(E_))}const Xa={test:x_,parse:r0,createTransformer:c0,getAnimatableNone:C_},D_=new Set(["brightness","contrast","saturate","opacity"]);function w_(a){const[i,l]=a.slice(0,-1).split("(");if(i==="drop-shadow")return a;const[r]=l.match(Ud)||[];if(!r)return a;const u=l.replace(r,"");let h=D_.has(i)?1:0;return r!==l&&(h*=100),i+"("+h+u+")"}const k_=/\b([a-z-]*)\(.*?\)/gu,Qu={...Xa,getAnimatableNone:a=>{const i=a.match(k_);return i?i.map(w_).join(" "):a}},M_={...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=>M_[a];function u0(a,i){let l=Ld(a);return l!==Qu&&(l=Xa),l.getAnimatableNone?l.getAnimatableNone(i):void 0}const R_=new Set(["auto","none","0"]);function O_(a,i,l){let r=0,u;for(;r<a.length&&!u;){const h=a[r];typeof h=="string"&&!R_.has(h)&&El(h).values.length&&(u=a[r]),r++}if(u&&l)for(const h of i)a[h]=u0(l,u)}const sg=a=>a===bi||a===xt,ig=(a,i)=>parseFloat(a.split(", ")[i]),lg=(a,i)=>(l,{transform:r})=>{if(r==="none"||!r)return 0;const u=r.match(/^matrix3d\((.+)\)$/u);if(u)return ig(u[1],i);{const h=r.match(/^matrix\((.+)\)$/u);return h?ig(h[1],a):0}},B_=new Set(["x","y","z"]),z_=yi.filter(a=>!B_.has(a));function U_(a){const i=[];return z_.forEach(l=>{const r=a.getValue(l);r!==void 0&&(i.push([l,r.get()]),r.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 d0(){if(Fu){const a=Array.from(ys).filter(r=>r.needsMeasurement),i=new Set(a.map(r=>r.element)),l=new Map;i.forEach(r=>{const u=U_(r);u.length&&(l.set(r,u),r.render())}),a.forEach(r=>r.measureInitialState()),i.forEach(r=>{r.render();const u=l.get(r);u&&u.forEach(([h,d])=>{var p;(p=r.getValue(h))===null||p===void 0||p.set(d)})}),a.forEach(r=>r.measureEndState()),a.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Fu=!1,Pu=!1,ys.forEach(a=>a.complete()),ys.clear()}function f0(){ys.forEach(a=>{a.readKeyframes(),a.needsMeasurement&&(Fu=!0)})}function V_(){f0(),d0()}class Hd{constructor(i,l,r,u,h,d=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...i],this.onComplete=l,this.name=r,this.motionValue=u,this.element=h,this.isAsync=d}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ys.add(this),Pu||(Pu=!0,oe.read(f0),oe.resolveKeyframes(d0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:i,name:l,element:r,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(r&&l){const g=r.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 h0=a=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(a),L_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function H_(a){const i=L_.exec(a);if(!i)return[,];const[,l,r,u]=i;return[`--${l??r}`,u]}function m0(a,i,l=1){const[r,u]=H_(a);if(!r)return;const h=window.getComputedStyle(i).getPropertyValue(r);if(h){const d=h.trim();return h0(d)?parseFloat(d):d}return _d(u)?m0(u,i,l+1):u}const p0=a=>i=>i.test(a),G_={test:a=>a==="auto",parse:a=>a},g0=[bi,xt,Yn,Ia,US,zS,G_],og=a=>g0.find(p0(a));class v0 extends Hd{constructor(i,l,r,u,h){super(i,l,r,u,h,!0)}readKeyframes(){const{unresolvedKeyframes:i,element:l,name:r}=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=m0(v,l.current);b!==void 0&&(i[g]=b),g===i.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!Yv.has(r)||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,r=[];for(let u=0;u<i.length;u++)v_(i[u])&&r.push(u);r.length&&O_(i,r,l)}measureInitialState(){const{element:i,unresolvedKeyframes:l,name:r}=this;if(!i||!i.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=gi[r](i.measureViewportBox(),window.getComputedStyle(i.current)),l[0]=this.measuredOrigin;const u=l[l.length-1];u!==void 0&&i.getValue(r,u).jump(u,!1)}measureEndState(){var i;const{element:l,name:r,unresolvedKeyframes:u}=this;if(!l||!l.current)return;const h=l.getValue(r);h&&h.jump(this.measuredOrigin,!1);const d=u.length-1,p=u[d];u[d]=gi[r](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 I_(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 q_(a,i,l,r){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:I_(a)||(l==="spring"||Rd(l))&&r}const Y_=a=>a!==null;function gr(a,{repeat:i,repeatType:l="loop"},r){const u=a.filter(Y_),h=i&&l!=="loop"&&i%2===1?0:u.length-1;return!h||r===void 0?u[h]:r}const Z_=40;class y0{constructor({autoplay:i=!0,delay:l=0,type:r="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:r,repeat:u,repeatDelay:h,repeatType:d,...p},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Z_?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&V_(),this._resolved}onKeyframesResolved(i,l){this.resolvedAt=Zn.now(),this.hasAttemptedResolve=!0;const{name:r,type:u,velocity:h,delay:d,onComplete:p,onUpdate:g,isGenerator:v}=this.options;if(!v&&!q_(i,r,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 b0(a){let i=0;const l=50;let r=a.next(i);for(;!r.done&&i<Ju;)i+=l,r=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 X_({hue:a,saturation:i,lightness:l,alpha:r}){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:r}}function ir(a,i){return l=>l>0?i:a}const ku=(a,i,l)=>{const r=a*a,u=l*(i*i-r)+r;return u<0?0:Math.sqrt(u)},K_=[Ku,vs,ui],Q_=a=>K_.find(i=>i.test(a));function cg(a){const i=Q_(a);if(!i)return!1;let l=i.parse(a);return i===ui&&(l=X_(l)),l}const ug=(a,i)=>{const l=cg(a),r=cg(i);if(!l||!r)return ir(a,i);const u={...l};return h=>(u.red=ku(l.red,r.red,h),u.green=ku(l.green,r.green,h),u.blue=ku(l.blue,r.blue,h),u.alpha=de(l.alpha,r.alpha,h),vs.transform(u))},P_=(a,i)=>l=>i(a(l)),kl=(...a)=>a.reduce(P_),$u=new Set(["none","hidden"]);function F_(a,i){return $u.has(a)?l=>l<=0?a:i:l=>l>=1?i:a}function J_(a,i){return l=>de(a,i,l)}function Gd(a){return typeof a=="number"?J_:typeof a=="string"?_d(a)?ir:qe.test(a)?ug:tT:Array.isArray(a)?S0:typeof a=="object"?qe.test(a)?ug:$_:ir}function S0(a,i){const l=[...a],r=l.length,u=a.map((h,d)=>Gd(h)(h,i[d]));return h=>{for(let d=0;d<r;d++)l[d]=u[d](h);return l}}function $_(a,i){const l={...a,...i},r={};for(const u in l)a[u]!==void 0&&i[u]!==void 0&&(r[u]=Gd(a[u])(a[u],i[u]));return u=>{for(const h in r)l[h]=r[h](u);return l}}function W_(a,i){var l;const r=[],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;r[h]=g,u[d]++}return r}const tT=(a,i)=>{const l=Xa.createTransformer(i),r=El(a),u=El(i);return r.indexes.var.length===u.indexes.var.length&&r.indexes.color.length===u.indexes.color.length&&r.indexes.number.length>=u.indexes.number.length?$u.has(a)&&!u.values.length||$u.has(i)&&!r.values.length?F_(a,i):kl(S0(W_(r,u),u.values),l):ir(a,i)};function _0(a,i,l){return typeof a=="number"&&typeof i=="number"&&typeof l=="number"?de(a,i,l):Gd(a)(a,i)}const eT=5;function T0(a,i,l){const r=Math.max(i-eT,0);return Zv(l-a(r),i-r)}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 nT({duration:a=pe.duration,bounce:i=pe.bounce,velocity:l=pe.velocity,mass:r=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),R=Wu(Math.pow(v,2),d);return(-u(v)+Mu>0?-1:1)*((x-D)*k)/R}):(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=sT(u,h,p);if(a=fa(a),isNaN(g))return{stiffness:pe.stiffness,damping:pe.damping,duration:a};{const v=Math.pow(g,2)*r;return{stiffness:v,damping:d*2*Math.sqrt(r*v),duration:a}}}const aT=12;function sT(a,i,l){let r=l;for(let u=1;u<aT;u++)r=r-a(r)/i(r);return r}function Wu(a,i){return a*Math.sqrt(1-i*i)}const iT=["duration","bounce"],lT=["stiffness","damping","mass"];function dg(a,i){return i.some(l=>a[l]!==void 0)}function oT(a){let i={velocity:pe.velocity,stiffness:pe.stiffness,damping:pe.damping,mass:pe.mass,isResolvedFromDuration:!1,...a};if(!dg(a,lT)&&dg(a,iT))if(a.visualDuration){const l=a.visualDuration,r=2*Math.PI/(l*1.2),u=r*r,h=2*ma(.05,1,1-(a.bounce||0))*Math.sqrt(u);i={...i,mass:pe.mass,stiffness:u,damping:h}}else{const l=nT(a);i={...i,...l,mass:pe.mass},i.isResolvedFromDuration=!0}return i}function x0(a=pe.visualDuration,i=pe.bounce){const l=typeof a!="object"?{visualDuration:a,keyframes:[0,1],bounce:i}:a;let{restSpeed:r,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}=oT({...l,velocity:-ha(l.velocity||0)}),k=x||0,R=v/(2*Math.sqrt(g*b)),q=d-h,B=ha(Math.sqrt(g/b)),F=Math.abs(q)<5;r||(r=F?pe.restSpeed.granular:pe.restSpeed.default),u||(u=F?pe.restDelta.granular:pe.restDelta.default);let O;if(R<1){const Z=Wu(B,R);O=Q=>{const nt=Math.exp(-R*B*Q);return d-nt*((k+R*B*q)/Z*Math.sin(Z*Q)+q*Math.cos(Z*Q))}}else if(R===1)O=Z=>d-Math.exp(-B*Z)*(q+(k+B*q)*Z);else{const Z=B*Math.sqrt(R*R-1);O=Q=>{const nt=Math.exp(-R*B*Q),U=Math.min(Z*Q,300);return d-nt*((k+R*B*q)*Math.sinh(U)+Z*q*Math.cosh(U))/Z}}const W={calculatedDuration:D&&S||null,next:Z=>{const Q=O(Z);if(D)p.done=Z>=S;else{let nt=0;R<1&&(nt=Z===0?fa(k):T0(O,Z,Q));const U=Math.abs(nt)<=r,et=Math.abs(d-Q)<=u;p.done=U&&et}return p.value=p.done?d:Q,p},toString:()=>{const Z=Math.min(b0(W),Ju),Q=Kv(nt=>W.next(Z*nt).value,Z,30);return Z+"ms "+Q}};return W}function fg({keyframes:a,velocity:i=0,power:l=.8,timeConstant:r=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=U=>p!==void 0&&U<p||g!==void 0&&U>g,k=U=>p===void 0?g:g===void 0||Math.abs(p-U)<Math.abs(g-U)?p:g;let R=l*i;const q=S+R,B=d===void 0?q:d(q);B!==q&&(R=B-S);const F=U=>-R*Math.exp(-U/r),O=U=>B+F(U),W=U=>{const et=F(U),dt=O(U);x.done=Math.abs(et)<=v,x.value=x.done?B:dt};let Z,Q;const nt=U=>{D(x.value)&&(Z=U,Q=x0({keyframes:[x.value,k(x.value)],velocity:T0(O,U,x.value),damping:u,stiffness:h,restDelta:v,restSpeed:b}))};return nt(0),{calculatedDuration:null,next:U=>{let et=!1;return!Q&&Z===void 0&&(et=!0,W(U),nt(U)),Z!==void 0&&U>=Z?Q.next(U-Z):(!et&&W(U),x)}}}const rT=wl(.42,0,1,1),cT=wl(0,0,.58,1),j0=wl(.42,0,.58,1),uT=a=>Array.isArray(a)&&typeof a[0]!="number",dT={linear:gn,easeIn:rT,easeInOut:j0,easeOut:cT,circIn:zd,circInOut:a0,circOut:n0,backIn:Bd,backInOut:t0,backOut:Wv,anticipate:e0},hg=a=>{if(Od(a)){jv(a.length===4);const[i,l,r,u]=a;return wl(i,l,r,u)}else if(typeof a=="string")return dT[a];return a};function fT(a,i,l){const r=[],u=l||_0,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)}r.push(p)}return r}function hT(a,i,{clamp:l=!0,ease:r,mixer:u}={}){const h=a.length;if(jv(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=fT(i,r,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 mT(a,i){const l=a[a.length-1];for(let r=1;r<=i;r++){const u=pi(0,i,r);a.push(de(l,1,u))}}function pT(a){const i=[0];return mT(i,a.length-1),i}function gT(a,i){return a.map(l=>l*i)}function vT(a,i){return a.map(()=>i||j0).splice(0,a.length-1)}function lr({duration:a=300,keyframes:i,times:l,ease:r="easeInOut"}){const u=uT(r)?r.map(hg):hg(r),h={done:!1,value:i[0]},d=gT(l&&l.length===i.length?l:pT(i),a),p=hT(d,i,{ease:Array.isArray(u)?u:vT(i,u)});return{calculatedDuration:a,next:g=>(h.value=p(g),h.done=g>=a,h)}}const yT=a=>{const i=({timestamp:l})=>a(l);return{start:()=>oe.update(i,!0),stop:()=>Za(i),now:()=>Ge.isProcessing?Ge.timestamp:Zn.now()}},bT={decay:fg,inertia:fg,tween:lr,keyframes:lr,spring:x0},ST=a=>a/100;class Id extends y0{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:r,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,r,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:r=0,repeatDelay:u=0,repeatType:h,velocity:d=0}=this.options,p=Rd(l)?l:bT[l]||lr;let g,v;p!==lr&&typeof i[0]!="number"&&(g=kl(ST,_0(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=b0(b));const{calculatedDuration:S}=b,x=S+u,D=x*(r+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:r}=this;if(!r){const{keyframes:U}=this.options;return{done:!0,value:U[U.length-1]}}const{finalKeyframe:u,generator:h,mirroredGenerator:d,mapPercentToKeyframes:p,keyframes:g,calculatedDuration:v,totalDuration:b,resolvedDuration:S}=r;if(this.startTime===null)return h.next(0);const{delay:x,repeat:D,repeatType:k,repeatDelay:R,onUpdate:q}=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 B=this.currentTime-x*(this.speed>=0?1:-1),F=this.speed>=0?B<0:B>b;this.currentTime=Math.max(B,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=b);let O=this.currentTime,W=h;if(D){const U=Math.min(this.currentTime,b)/S;let et=Math.floor(U),dt=U%1;!dt&&U>=1&&(dt=1),dt===1&&et--,et=Math.min(et,D+1),!!(et%2)&&(k==="reverse"?(dt=1-dt,R&&(dt-=R/S)):k==="mirror"&&(W=d)),O=ma(0,1,dt)*S}const Z=F?{done:!1,value:g[0]}:W.next(O);p&&(Z.value=p(Z.value));let{done:Q}=Z;!F&&v!==null&&(Q=this.speed>=0?this.currentTime>=b:this.currentTime<=0);const nt=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&Q);return nt&&u!==void 0&&(Z.value=gr(g,this.options,u)),q&&q(Z.value),nt&&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=yT,onPlay:l,startTime:r}=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=r??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 _T=new Set(["opacity","clipPath","filter","transform"]);function TT(a,i,l,{delay:r=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=Pv(p,u);return Array.isArray(b)&&(v.easing=b),a.animate(v,{delay:r,duration:u,easing:Array.isArray(b)?"linear":b,fill:"both",iterations:h+1,direction:d==="reverse"?"alternate":"normal"})}const xT=Md(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),or=10,jT=2e4;function AT(a){return Rd(a.type)||a.type==="spring"||!Qv(a.ease)}function NT(a,i){const l=new Id({...i,keyframes:a,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:a[0]};const u=[];let h=0;for(;!r.done&&h<jT;)r=l.sample(h),u.push(r.value),h+=or;return{times:void 0,keyframes:u,duration:h-or,ease:"linear"}}const A0={anticipate:e0,backInOut:t0,circInOut:a0};function ET(a){return a in A0}class mg extends y0{constructor(i){super(i);const{name:l,motionValue:r,element:u,keyframes:h}=this.options;this.resolver=new v0(h,(d,p)=>this.onKeyframesResolved(d,p),l,r,u),this.resolver.scheduleResolve()}initPlayback(i,l){let{duration:r=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()&&ET(h)&&(h=A0[h]),AT(this.options)){const{onComplete:S,onUpdate:x,motionValue:D,element:k,...R}=this.options,q=NT(i,R);i=q.keyframes,i.length===1&&(i[1]=i[0]),r=q.duration,u=q.times,h=q.ease,d="keyframes"}const b=TT(p.owner.current,g,i,{...this.options,duration:r,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:r,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:r}=l;r.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:r}=l;r.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:r}=l;ng(r,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:r,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:r,duration:u,type:h,ease:d,times:p,isGenerator:!0}),R=fa(this.time);v.setWithVelocity(k.sample(R-or).value,k.sample(R).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:r,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 xT()&&r&&_T.has(r)&&!g&&!v&&!u&&h!=="mirror"&&d!==0&&p!=="inertia"}}const CT={type:"spring",stiffness:500,damping:25,restSpeed:10},DT=a=>({type:"spring",stiffness:550,damping:a===0?2*Math.sqrt(550):30,restSpeed:10}),wT={type:"keyframes",duration:.8},kT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},MT=(a,{keyframes:i})=>i.length>2?wT:bs.has(a)?a.startsWith("scale")?DT(i[1]):CT:kT;function RT({when:a,delay:i,delayChildren:l,staggerChildren:r,staggerDirection:u,repeat:h,repeatType:d,repeatDelay:p,from:g,elapsed:v,...b}){return!!Object.keys(b).length}const qd=(a,i,l,r={},u,h)=>d=>{const p=Cd(r,a)||{},g=p.delay||r.delay||0;let{elapsed:v=0}=r;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};RT(p)||(b={...b,...MT(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 d_([])}return!h&&mg.supports(b)?new mg(b):new Id(b)};function OT({protectedKeys:a,needsAnimating:i},l){const r=a.hasOwnProperty(l)&&i[l]!==!0;return i[l]=!1,r}function N0(a,i,{delay:l=0,transitionOverride:r,type:u}={}){var h;let{transition:d=a.getDefaultTransition(),transitionEnd:p,...g}=i;r&&(d=r);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&&OT(b,S))continue;const k={delay:l,...Cd(d||{},S)};let R=!1;if(window.MotionHandoffAnimation){const B=Xv(a);if(B){const F=window.MotionHandoffAnimation(B,S,oe);F!==null&&(k.startTime=F,R=!0)}}Zu(a,S),x.start(qd(S,x,D,a.shouldReduceMotion&&Yv.has(S)?{type:!1}:k,a,R));const q=x.animation;q&&v.push(q)}return p&&Promise.all(v).then(()=>{oe.update(()=>{p&&o_(a,p)})}),v}function td(a,i,l={}){var r;const u=pr(a,i,l.type==="exit"?(r=a.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:h=a.getDefaultTransition()||{}}=u||{};l.transitionOverride&&(h=l.transitionOverride);const d=u?()=>Promise.all(N0(a,u,l)):()=>Promise.resolve(),p=a.variantChildren&&a.variantChildren.size?(v=0)=>{const{delayChildren:b=0,staggerChildren:S,staggerDirection:x}=h;return BT(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 BT(a,i,l=0,r=0,u=1,h){const d=[],p=(a.variantChildren.size-1)*r,g=u===1?(v=0)=>v*r:(v=0)=>p-v*r;return Array.from(a.variantChildren).sort(zT).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 zT(a,i){return a.sortNodePosition(i)}function UT(a,i,l={}){a.notify("AnimationStart",i);let r;if(Array.isArray(i)){const u=i.map(h=>td(a,h,l));r=Promise.all(u)}else if(typeof i=="string")r=td(a,i,l);else{const u=typeof i=="function"?pr(a,i,l.custom):i;r=Promise.all(N0(a,u,l))}return r.then(()=>{a.notify("AnimationComplete",i)})}const VT=gd.length;function E0(a){if(!a)return;if(!a.isControllingVariants){const l=a.parent?E0(a.parent)||{}:{};return a.props.initial!==void 0&&(l.initial=a.props.initial),l}const i={};for(let l=0;l<VT;l++){const r=gd[l],u=a.props[r];(jl(u)||u===!1)&&(i[r]=u)}return i}const LT=[...pd].reverse(),HT=pd.length;function GT(a){return i=>Promise.all(i.map(({animation:l,options:r})=>UT(a,l,r)))}function IT(a){let i=GT(a),l=pg(),r=!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,...R}=x;v={...v,...R,...k}}return v};function h(g){i=g(a)}function d(g){const{props:v}=a,b=E0(a.parent)||{},S=[],x=new Set;let D={},k=1/0;for(let q=0;q<HT;q++){const B=LT[q],F=l[B],O=v[B]!==void 0?v[B]:b[B],W=jl(O),Z=B===g?F.isActive:null;Z===!1&&(k=q);let Q=O===b[B]&&O!==v[B]&&W;if(Q&&r&&a.manuallyAnimateOnMount&&(Q=!1),F.protectedKeys={...D},!F.isActive&&Z===null||!O&&!F.prevProp||hr(O)||typeof O=="boolean")continue;const nt=qT(F.prevProp,O);let U=nt||B===g&&F.isActive&&!Q&&W||q>k&&W,et=!1;const dt=Array.isArray(O)?O:[O];let bt=dt.reduce(u(B),{});Z===!1&&(bt={});const{prevResolvedValues:zt={}}=F,J={...zt,...bt},Xt=X=>{U=!0,x.has(X)&&(et=!0,x.delete(X)),F.needsAnimating[X]=!0;const rt=a.getValue(X);rt&&(rt.liveStyle=!1)};for(const X in J){const rt=bt[X],yt=zt[X];if(D.hasOwnProperty(X))continue;let Tt=!1;Yu(rt)&&Yu(yt)?Tt=!qv(rt,yt):Tt=rt!==yt,Tt?rt!=null?Xt(X):x.add(X):rt!==void 0&&x.has(X)?Xt(X):F.protectedKeys[X]=!0}F.prevProp=O,F.prevResolvedValues=bt,F.isActive&&(D={...D,...bt}),r&&a.blockInitialAnimation&&(U=!1),U&&(!(Q&&nt)||et)&&S.push(...dt.map(X=>({animation:X,options:{type:B}})))}if(x.size){const q={};x.forEach(B=>{const F=a.getBaseTarget(B),O=a.getValue(B);O&&(O.liveStyle=!0),q[B]=F??null}),S.push({animation:q})}let R=!!S.length;return r&&(v.initial===!1||v.initial===v.animate)&&!a.manuallyAnimateOnMount&&(R=!1),r=!1,R?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(),r=!0}}}function qT(a,i){return typeof i=="string"?i!==a:Array.isArray(i)?!qv(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 YT extends Ka{constructor(i){super(i),i.animationState||(i.animationState=IT(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 ZT=0;class XT extends Ka{constructor(){super(...arguments),this.id=ZT++}update(){if(!this.node.presenceContext)return;const{isPresent:i,onExitComplete:l}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||i===r)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 KT={animation:{Feature:YT},exit:{Feature:XT}},zn={x:!1,y:!1};function C0(){return zn.x||zn.y}function QT(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,r={passive:!0}){return a.addEventListener(i,l,r),()=>a.removeEventListener(i,l)}function Ml(a){return{point:{x:a.pageX,y:a.pageY}}}const PT=a=>i=>Yd(i)&&a(i,Ml(i));function _l(a,i,l,r){return Cl(a,i,PT(l),r)}const gg=(a,i)=>Math.abs(a-i);function FT(a,i){const l=gg(a.x,i.x),r=gg(a.y,i.y);return Math.sqrt(l**2+r**2)}class D0{constructor(i,l,{transformPagePoint:r,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=FT(S.offset,{x:0,y:0})>=3;if(!x&&!D)return;const{point:k}=S,{timestamp:R}=Ge;this.history.push({...k,timestamp:R});const{onStart:q,onMove:B}=this.handlers;x||(q&&q(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),B&&B(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:R}=this.handlers;if(this.dragSnapToOrigin&&R&&R(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const q=Ou(S.type==="pointercancel"?this.lastMoveEventInfo:Ru(x,this.transformPagePoint),this.history);this.startEvent&&D&&D(S,q),k&&k(S,q)},!Yd(i))return;this.dragSnapToOrigin=h,this.handlers=l,this.transformPagePoint=r,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,w0(i)),offset:vg(a,JT(i)),velocity:$T(i,.1)}}function JT(a){return a[0]}function w0(a){return a[a.length-1]}function $T(a,i){if(a.length<2)return{x:0,y:0};let l=a.length-1,r=null;const u=w0(a);for(;l>=0&&(r=a[l],!(u.timestamp-r.timestamp>fa(i)));)l--;if(!r)return{x:0,y:0};const h=ha(u.timestamp-r.timestamp);if(h===0)return{x:0,y:0};const d={x:(u.x-r.x)/h,y:(u.y-r.y)/h};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}const k0=1e-4,WT=1-k0,tx=1+k0,M0=.01,ex=0-M0,nx=0+M0;function yn(a){return a.max-a.min}function ax(a,i,l){return Math.abs(a-i)<=l}function yg(a,i,l,r=.5){a.origin=r,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>=WT&&a.scale<=tx||isNaN(a.scale))&&(a.scale=1),(a.translate>=ex&&a.translate<=nx||isNaN(a.translate))&&(a.translate=0)}function Tl(a,i,l,r){yg(a.x,i.x,l.x,r?r.originX:void 0),yg(a.y,i.y,l.y,r?r.originY:void 0)}function bg(a,i,l){a.min=l.min+i.min,a.max=a.min+yn(i)}function sx(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 ix(a,{min:i,max:l},r){return i!==void 0&&a<i?a=r?de(i,a,r.min):Math.max(a,i):l!==void 0&&a>l&&(a=r?de(l,a,r.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 lx(a,{top:i,left:l,bottom:r,right:u}){return{x:_g(a.x,l,u),y:_g(a.y,i,r)}}function Tg(a,i){let l=i.min-a.min,r=i.max-a.max;return i.max-i.min<a.max-a.min&&([l,r]=[r,l]),{min:l,max:r}}function ox(a,i){return{x:Tg(a.x,i.x),y:Tg(a.y,i.y)}}function rx(a,i){let l=.5;const r=yn(a),u=yn(i);return u>r?l=pi(i.min,i.max-r,a.min):r>u&&(l=pi(a.min,a.max-u,i.min)),ma(0,1,l)}function cx(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 ux(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()}),Ng=()=>({min:0,max:0}),_e=()=>({x:Ng(),y:Ng()});function wn(a){return[a("x"),a("y")]}function R0({top:a,left:i,right:l,bottom:r}){return{x:{min:i,max:l},y:{min:a,max:r}}}function dx({x:a,y:i}){return{top:i.min,right:a.max,bottom:i.max,left:a.min}}function fx(a,i){if(!i)return a;const l=i({x:a.left,y:a.top}),r=i({x:a.right,y:a.bottom});return{top:l.y,left:l.x,bottom:r.y,right:r.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)||O0(a)||a.z||a.rotate||a.rotateX||a.rotateY||a.skewX||a.skewY}function O0(a){return Eg(a.x)||Eg(a.y)}function Eg(a){return a&&a!=="0%"}function rr(a,i,l){const r=a-l,u=i*r;return l+u}function Cg(a,i,l,r,u){return u!==void 0&&(a=rr(a,u,r)),rr(a,l,r)+i}function ad(a,i=0,l=1,r,u){a.min=Cg(a.min,i,l,r,u),a.max=Cg(a.max,i,l,r,u)}function B0(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 hx(a,i,l,r=!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"||(r&&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,B0(a,d)),r&&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,r,u=.5){const h=de(a.min,a.max,u);ad(a,i,l,h,r)}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 z0(a,i){return R0(fx(a.getBoundingClientRect(),i))}function mx(a,i,l){const r=z0(a,l),{scroll:u}=i;return u&&(fi(r.x,u.offset.x),fi(r.y,u.offset.y)),r}const U0=({current:a})=>a?a.ownerDocument.defaultView:null,px=new WeakMap;class gx{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:r}=this.visualElement;if(r&&r.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=QT(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(q=>{let B=this.getAxisMotionValue(q).get()||0;if(Yn.test(B)){const{projection:F}=this.visualElement;if(F&&F.layout){const O=F.layout.layoutBox[q];O&&(B=yn(O)*(parseFloat(B)/100))}}this.originPoint[q]=B}),k&&oe.postRender(()=>k(b,S)),Zu(this.visualElement,"transform");const{animationState:R}=this.visualElement;R&&R.setActive("whileDrag",!0)},d=(b,S)=>{const{dragPropagation:x,dragDirectionLock:D,onDirectionLock:k,onDrag:R}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:q}=S;if(D&&this.currentDirection===null){this.currentDirection=vx(q),this.currentDirection!==null&&k&&k(this.currentDirection);return}this.updateAxis("x",S.point,q),this.updateAxis("y",S.point,q),this.visualElement.render(),R&&R(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 D0(i,{onSessionStart:u,onStart:h,onMove:d,onSessionEnd:p,resumeAnimation:g},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:v,contextWindow:U0(this.visualElement)})}stop(i,l){const r=this.isDragging;if(this.cancel(),!r)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:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}updateAxis(i,l,r){const{drag:u}=this.getProps();if(!r||!Jo(i,u,this.currentDirection))return;const h=this.getAxisMotionValue(i);let d=this.originPoint[i]+r[i];this.constraints&&this.constraints[i]&&(d=ix(d,this.constraints[i],this.elastic[i])),h.set(d)}resolveConstraints(){var i;const{dragConstraints:l,dragElastic:r}=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=lx(u.layoutBox,l):this.constraints=!1,this.elastic=ux(r),h!==this.constraints&&u&&this.constraints&&!this.hasMutatedConstraints&&wn(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=cx(u.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:i,onMeasureDragConstraints:l}=this.getProps();if(!i||!ci(i))return!1;const r=i.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const h=mx(r,u.root,this.visualElement.getTransformPagePoint());let d=ox(u.layout.layoutBox,h);if(l){const p=l(dx(d));this.hasMutatedConstraints=!!p,p&&(d=R0(p))}return d}startAnimation(i){const{drag:l,dragMomentum:r,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:r?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 r=this.getAxisMotionValue(i);return Zu(this.visualElement,i),r.start(qd(i,r,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()}`,r=this.visualElement.getProps(),u=r[l];return u||this.visualElement.getValue(i,(r.initial?r.initial[i]:void 0)||0)}snapToCursor(i){wn(l=>{const{drag:r}=this.getProps();if(!Jo(l,r,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:r}=this.visualElement;if(!ci(l)||!r||!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]=rx({min:g,max:g},this.constraints[d])}});const{transformTemplate:h}=this.visualElement.getProps();this.visualElement.current.style.transform=h?h({},""):"none",r.root&&r.root.updateScroll(),r.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;px.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)}),r=()=>{const{dragConstraints:g}=this.getProps();ci(g)&&g.current&&(this.constraints=this.resolveRefConstraints())},{projection:u}=this.visualElement,h=u.addEventListener("measure",r);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),oe.read(r);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:r=!1,dragPropagation:u=!1,dragConstraints:h=!1,dragElastic:d=ed,dragMomentum:p=!0}=i;return{...i,drag:l,dragDirectionLock:r,dragPropagation:u,dragConstraints:h,dragElastic:d,dragMomentum:p}}}function Jo(a,i,l){return(i===!0||i===a)&&(l===null||l===a)}function vx(a,i=10){let l=null;return Math.abs(a.y)>i?l="y":Math.abs(a.x)>i&&(l="x"),l}class yx extends Ka{constructor(i){super(i),this.removeGroupControls=gn,this.removeListeners=gn,this.controls=new gx(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 bx extends Ka{constructor(){super(...arguments),this.removePointerDownListener=gn}onPointerDown(i){this.session=new D0(i,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:U0(this.node)})}createPanHandlers(){const{onPanSessionStart:i,onPanStart:l,onPan:r,onPanEnd:u}=this.node.getProps();return{onSessionStart:Mg(i),onStart:Mg(l),onMove:r,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),r=Rg(a,i.target.y);return`${l}% ${r}%`}},Sx={correct:(a,{treeScale:i,projectionDelta:l})=>{const r=a,u=Xa.parse(a);if(u.length>5)return r;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 _x extends _.Component{componentDidMount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:r,layoutId:u}=this.props,{projection:h}=i;KS(Tx),h&&(l.group&&l.group.add(h),r&&r.register&&u&&r.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:r,drag:u,isPresent:h}=this.props,d=r.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:r}=this.props,{projection:u}=i;u&&(u.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(u),r&&r.deregister&&r.deregister(u))}safeToRemove(){const{safeToRemove:i}=this.props;i&&i()}render(){return null}}function V0(a){const[i,l]=Tv(),r=_.useContext(dd);return f.jsx(_x,{...a,layoutGroup:r,switchLayoutGroup:_.useContext(wv),isPresent:i,safeToRemove:l})}const Tx={borderRadius:{...ml,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ml,borderTopRightRadius:ml,borderBottomLeftRadius:ml,borderBottomRightRadius:ml,boxShadow:Sx};function xx(a,i,l){const r=Ye(a)?a:Nl(a);return r.start(qd("",r,i,l)),r.animation}function jx(a){return a instanceof SVGElement&&a.tagName!=="svg"}const Ax=(a,i)=>a.depth-i.depth;class Nx{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(Ax),this.isDirty=!1,this.children.forEach(i)}}function Ex(a,i){const l=Zn.now(),r=({timestamp:u})=>{const h=u-l;h>=i&&(Za(r),a(h-i))};return oe.read(r,!0),()=>Za(r)}const L0=["TopLeft","TopRight","BottomLeft","BottomRight"],Cx=L0.length,Og=a=>typeof a=="string"?parseFloat(a):a,Bg=a=>typeof a=="number"||xt.test(a);function Dx(a,i,l,r,u,h){u?(a.opacity=de(0,l.opacity!==void 0?l.opacity:1,wx(r)),a.opacityExit=de(i.opacity!==void 0?i.opacity:1,0,kx(r))):h&&(a.opacity=de(i.opacity!==void 0?i.opacity:1,l.opacity!==void 0?l.opacity:1,r));for(let d=0;d<Cx;d++){const p=`border${L0[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),r),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,r))}function zg(a,i){return a[i]!==void 0?a[i]:a.borderRadius}const wx=H0(0,.5,n0),kx=H0(.5,.95,gn);function H0(a,i,l){return r=>r<a?0:r>i?1:l(pi(a,i,r))}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,r,u){return a-=i,a=rr(a,1/l,r),u!==void 0&&(a=rr(a,1/u,r)),a}function Mx(a,i=0,l=1,r=.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,r);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,r,u],h,d){Mx(a,i[l],i[r],i[u],i.scale,h,d)}const Rx=["x","scaleX","originX"],Ox=["y","scaleY","originY"];function Gg(a,i,l,r){Hg(a.x,i,Rx,l?l.x:void 0,r?r.x:void 0),Hg(a.y,i,Ox,l?l.y:void 0,r?r.y:void 0)}function Ig(a){return a.translate===0&&a.scale===1}function G0(a){return Ig(a.x)&&Ig(a.y)}function qg(a,i){return a.min===i.min&&a.max===i.max}function Bx(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 I0(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 zx{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 r;for(let u=l;u>=0;u--){const h=this.members[u];if(h.isPresent!==!1){r=h;break}}return r?(this.promote(r),!0):!1}promote(i,l){const r=this.lead;if(i!==r&&(this.prevLead=r,this.lead=i,i.show(),r)){r.instance&&r.scheduleRender(),i.scheduleRender(),i.resumeFrom=r,l&&(i.resumeFrom.preserveOpacity=!0),r.snapshot&&(i.snapshot=r.snapshot,i.snapshot.latestValues=r.animationValues||r.latestValues),i.root&&i.root.isUpdating&&(i.isLayoutDirty=!0);const{crossfade:u}=i.options;u===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(i=>{const{options:l,resumingFrom:r}=i;l.onExitComplete&&l.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(i=>{i.instance&&i.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ux(a,i,l){let r="";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)&&(r=`translate3d(${u}px, ${h}px, ${d}px) `),(i.x!==1||i.y!==1)&&(r+=`scale(${1/i.x}, ${1/i.y}) `),l){const{transformPerspective:v,rotate:b,rotateX:S,rotateY:x,skewX:D,skewY:k}=l;v&&(r=`perspective(${v}px) ${r}`),b&&(r+=`rotate(${b}deg) `),S&&(r+=`rotateX(${S}deg) `),x&&(r+=`rotateY(${x}deg) `),D&&(r+=`skewX(${D}deg) `),k&&(r+=`skewY(${k}deg) `)}const p=a.x.scale*i.x,g=a.y.scale*i.y;return(p!==1||g!==1)&&(r+=`scale(${p}, ${g})`),r||"none"}const gs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},vl=typeof window<"u"&&window.MotionDebug!==void 0,zu=["","X","Y","Z"],Vx={visibility:"hidden"},Kg=1e3;let Lx=0;function Uu(a,i,l,r){const{latestValues:u}=i;u[a]&&(l[a]=u[a],i.setStaticValue(a,0),r&&(r[a]=0))}function q0(a){if(a.hasCheckedOptimisedAppear=!0,a.root===a)return;const{visualElement:i}=a.options;if(!i)return;const l=Xv(i);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:u,layoutId:h}=a.options;window.MotionCancelOptimisedAnimation(l,"transform",oe,!(u||h))}const{parent:r}=a;r&&!r.hasCheckedOptimisedAppear&&q0(r)}function Y0({attachResizeListener:a,defaultParent:i,measureScroll:l,checkIsScrollRoot:r,resetTransform:u}){return class{constructor(d={},p=i==null?void 0:i()){this.id=Lx++,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(Ix),this.nodes.forEach(Kx),this.nodes.forEach(Qx),this.nodes.forEach(qx),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 Nx)}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=jx(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=Ex(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 R=this.options.transition||b.getDefaultTransition()||Wx,{onLayoutAnimationStart:q,onLayoutAnimationComplete:B}=b.getProps(),F=!this.targetLayout||!I0(this.targetLayout,k)||D,O=!x&&D;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||O||x&&(F||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(S,O);const W={...Cd(R,"layout"),onPlay:q,onComplete:B};(b.shouldReduceMotion||this.options.layoutRoot)&&(W.delay=0,W.type=!1),this.startAnimation(W)}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(Px),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&&q0(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(Zx),this.isUpdating=!1,this.nodes.forEach(Xx),this.nodes.forEach(Hx),this.nodes.forEach(Gx),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(Yx),this.sharedNodes.forEach(Fx)}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=r(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&&!G0(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)),t2(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(e2))){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(),sx(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Dn(this.target,this.layout.layoutBox),B0(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)||O0(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;hx(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,R=D!==k,q=this.getStack(),B=!q||q.members.length<=1,F=!!(R&&!B&&this.options.crossfade===!0&&!this.path.some($x));this.animationProgress=0;let O;this.mixTargetDelta=W=>{const Z=W/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),Jx(this.relativeTarget,this.relativeTargetOrigin,x,Z),O&&Bx(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=_e()),Dn(O,this.relativeTarget)),R&&(this.animationValues=b,Dx(b,v,this.latestValues,Z,F,B)),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=xx(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&&Z0(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 zx),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 Vx;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 R={};return this.options.layoutId&&(R.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,R.pointerEvents=Wo(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!ps(this.latestValues)&&(R.transform=b?b({},""):"none",this.hasProjected=!1),R}const x=S.animationValues||S.latestValues;this.applyTransformsToTarget(),v.transform=Ux(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 R in ar){if(x[R]===void 0)continue;const{correct:q,applyTo:B}=ar[R],F=v.transform==="none"?x[R]:q(x[R],S);if(B){const O=B.length;for(let W=0;W<O;W++)v[B[W]]=F}else v[R]=F}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 Hx(a){a.updateLayout()}function Gx(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:r,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=r[S].min,x.max=x.min+D}):Z0(h,l.layoutBox,r)&&wn(S=>{const x=d?l.measuredBox[S]:l.layoutBox[S],D=yn(r[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,r,l.layoutBox);const g=di();d?Tl(g,a.applyTransform(u,!0),l.measuredBox):Tl(g,r,l.layoutBox);const v=!G0(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 R=_e();xl(R,r,D.layoutBox),I0(k,R)||(b=!0),S.options.layoutRoot&&(a.relativeTarget=R,a.relativeTargetOrigin=k,a.relativeParent=S)}}}a.notifyListeners("didUpdate",{layout:r,snapshot:l,delta:g,layoutDelta:p,hasLayoutChanged:v,hasRelativeTargetChanged:b})}else if(a.isLead()){const{onExitComplete:r}=a.options;r&&r()}a.options.transition=void 0}function Ix(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 qx(a){a.isProjectionDirty=a.isSharedProjectionDirty=a.isTransformDirty=!1}function Yx(a){a.clearSnapshot()}function Qg(a){a.clearMeasurements()}function Zx(a){a.isLayoutDirty=!1}function Xx(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 Kx(a){a.resolveTargetDelta()}function Qx(a){a.calcProjection()}function Px(a){a.resetSkewAndRotation()}function Fx(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,r){a.min=de(i.min,l.min,r),a.max=de(i.max,l.max,r)}function Jx(a,i,l,r){Jg(a.x,i.x,l.x,r),Jg(a.y,i.y,l.y,r)}function $x(a){return a.animationValues&&a.animationValues.opacityExit!==void 0}const Wx={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 t2(a){tv(a.x),tv(a.y)}function Z0(a,i,l){return a==="position"||a==="preserve-aspect"&&!ax(Zg(i),Zg(l),.2)}function e2(a){var i;return a!==a.root&&((i=a.scroll)===null||i===void 0?void 0:i.wasRoot)}const n2=Y0({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},X0=Y0({measureScroll:a=>({x:a.scrollLeft,y:a.scrollTop}),defaultParent:()=>{if(!Vu.current){const a=new n2({});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"}),a2={pan:{Feature:bx},drag:{Feature:yx,ProjectionNode:X0,MeasureLayout:V0}};function s2(a,i,l){var r;if(a instanceof Element)return[a];if(typeof a=="string"){let u=document;const h=(r=void 0)!==null&&r!==void 0?r:u.querySelectorAll(a);return h?Array.from(h):[]}return Array.from(a)}function K0(a,i){const l=s2(a),r=new AbortController,u={passive:!0,...i,signal:r.signal};return[l,u,()=>r.abort()]}function ev(a){return i=>{i.pointerType==="touch"||C0()||a(i)}}function i2(a,i,l={}){const[r,u,h]=K0(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 r.forEach(p=>{p.addEventListener("pointerenter",d,u)}),h}function nv(a,i,l){const{props:r}=a;a.animationState&&r.whileHover&&a.animationState.setActive("whileHover",l==="Start");const u="onHover"+l,h=r[u];h&&oe.postRender(()=>h(i,Ml(i)))}class l2 extends Ka{mount(){const{current:i}=this.node;i&&(this.unmount=i2(i,l=>(nv(this.node,l,"Start"),r=>nv(this.node,r,"End"))))}unmount(){}}class o2 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 Q0=(a,i)=>i?a===i?!0:Q0(a,i.parentElement):!1,r2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function c2(a){return r2.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 u2=(a,i)=>{const l=a.currentTarget;if(!l)return;const r=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",r,i),l.addEventListener("blur",()=>l.removeEventListener("keydown",r),i)};function sv(a){return Yd(a)&&!C0()}function d2(a,i,l={}){const[r,u,h]=K0(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||Q0(g,D.target))},x=D=>{b(D,!1)};window.addEventListener("pointerup",S,u),window.addEventListener("pointercancel",x,u)};return r.forEach(p=>{!c2(p)&&p.getAttribute("tabindex")===null&&(p.tabIndex=0),(l.useGlobalTarget?window:p).addEventListener("pointerdown",d,u),p.addEventListener("focus",v=>u2(v,u),u)}),h}function iv(a,i,l){const{props:r}=a;a.animationState&&r.whileTap&&a.animationState.setActive("whileTap",l==="Start");const u="onTap"+(l==="End"?"":l),h=r[u];h&&oe.postRender(()=>h(i,Ml(i)))}class f2 extends Ka{mount(){const{current:i}=this.node;i&&(this.unmount=d2(i,l=>(iv(this.node,l,"Start"),(r,{success:u})=>iv(this.node,r,u?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const sd=new WeakMap,Hu=new WeakMap,h2=a=>{const i=sd.get(a.target);i&&i(a)},m2=a=>{a.forEach(h2)};function p2({root:a,...i}){const l=a||document;Hu.has(l)||Hu.set(l,{});const r=Hu.get(l),u=JSON.stringify(i);return r[u]||(r[u]=new IntersectionObserver(m2,{root:a,...i})),r[u]}function g2(a,i,l){const r=p2(i);return sd.set(a,l),r.observe(a),()=>{sd.delete(a),r.unobserve(a)}}const v2={some:0,all:1};class y2 extends Ka{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:i={}}=this.node.getProps(),{root:l,margin:r,amount:u="some",once:h}=i,d={root:l?l.current:void 0,rootMargin:r,threshold:typeof u=="number"?u:v2[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 g2(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(b2(i,l))&&this.startObserver()}unmount(){}}function b2({viewport:a={}},{viewport:i={}}={}){return l=>a[l]!==i[l]}const S2={inView:{Feature:y2},tap:{Feature:f2},focus:{Feature:o2},hover:{Feature:l2}},_2={layout:{ProjectionNode:X0,MeasureLayout:V0}},id={current:null},P0={current:!1};function T2(){if(P0.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 x2=[...g0,qe,Xa],j2=a=>x2.find(p0(a)),lv=new WeakMap;function A2(a,i,l){for(const r in i){const u=i[r],h=l[r];if(Ye(u))a.addValue(r,u);else if(Ye(h))a.addValue(r,Nl(u,{owner:a}));else if(h!==u)if(a.hasValue(r)){const d=a.getValue(r);d.liveStyle===!0?d.jump(u):d.hasAnimated||d.set(u)}else{const d=a.getStaticValue(r);a.addValue(r,Nl(d!==void 0?d:u,{owner:a}))}}for(const r in l)i[r]===void 0&&a.removeValue(r);return i}const ov=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class N2{scrapeMotionValuesFromProps(i,l,r){return{}}constructor({parent:i,props:l,presenceContext:r,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=r,this.depth=i?i.depth+1:0,this.reducedMotionConfig=u,this.options=p,this.blockInitialAnimation=!!h,this.isControllingVariants=mr(l),this.isVariantNode=Cv(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,r)=>this.bindToMotionValue(r,l)),P0.current||T2(),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 r=bs.has(i),u=l.on("change",p=>{this.latestValues[i]=p,this.props.onUpdate&&oe.preRender(this.notifyUpdate),r&&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:r,Feature:u}=l;if(!this.features[i]&&u&&r(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 r=0;r<ov.length;r++){const u=ov[r];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=A2(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 r=this.values.get(i);l!==r&&(r&&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 r=this.values.get(i);return r===void 0&&l!==void 0&&(r=Nl(l===null?void 0:l,{owner:this}),this.addValue(i,r)),r}readValue(i,l){var r;let u=this.latestValues[i]!==void 0||!this.current?this.latestValues[i]:(r=this.getBaseTargetFromProps(this.props,i))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,i,this.options);return u!=null&&(typeof u=="string"&&(h0(u)||s0(u))?u=parseFloat(u):!j2(u)&&Xa.test(l)&&(u=u0(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:r}=this.props;let u;if(typeof r=="string"||typeof r=="object"){const d=Sd(this.props,r,(l=this.presenceContext)===null||l===void 0?void 0:l.custom);d&&(u=d[i])}if(r&&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 F0 extends N2{constructor(){super(...arguments),this.KeyframeResolver=v0}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:r}){delete l[i],delete r[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 E2(a){return window.getComputedStyle(a)}class C2 extends F0{constructor(){super(...arguments),this.type="html",this.renderInstance=Uv}readValueFromInstance(i,l){if(bs.has(l)){const r=Ld(l);return r&&r.default||0}else{const r=E2(i),u=(Ov(l)?r.getPropertyValue(l):r[l])||0;return typeof u=="string"?u.trim():u}}measureInstanceViewportBox(i,{transformPagePoint:l}){return z0(i,l)}build(i,l,r){xd(i,l,r.transformTemplate)}scrapeMotionValuesFromProps(i,l,r){return Ed(i,l,r)}}class D2 extends F0{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 r=Ld(l);return r&&r.default||0}return l=Vv.has(l)?l:vd(l),i.getAttribute(l)}scrapeMotionValuesFromProps(i,l,r){return Gv(i,l,r)}build(i,l,r){jd(i,l,this.isSVGTag,r.transformTemplate)}renderInstance(i,l,r,u){Lv(i,l,r,u)}mount(i){this.isSVGTag=Nd(i.tagName),super.mount(i)}}const w2=(a,i)=>bd(a)?new D2(i):new C2(i,{allowProjection:a!==_.Fragment}),k2=n_({...KT,...S2,...a2,..._2},w2),Xn=vS(k2);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 M2=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 R2="_breadcrumbs_1s6xc_1",O2="_list_1s6xc_11",B2="_item_1s6xc_21",z2="_separator_1s6xc_28",U2="_link_1s6xc_34",V2="_current_1s6xc_57",ri={breadcrumbs:R2,list:O2,item:B2,separator:z2,link:U2,current:V2},L2="›";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,r)=>{const u=r===a.length-1;return f.jsxs("li",{className:ri.item,children:[r>0&&f.jsx("span",{className:ri.separator,"aria-hidden":"true",children:L2}),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})]},r)})})})}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 r(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=r(h,this);var d=h.indices;d&&(d.groups=r(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(r(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,r){return l.__proto__=r,l},cr(a,i)}function rv(a,i){(i==null||i>a.length)&&(i=a.length);for(var l=0,r=new Array(i);l<i;l++)r[l]=a[l];return r}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 r=0;return function(){return r>=a.length?{done:!0}:{done:!1,value:a[r++]}}}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 H2=(function(a){return function(i){return i===void 0&&(i={}),(function(r,u){if(u&&!r.registered(u))throw new Error('The default language "'+u+'" is not registered with refractor.')})(a,i.defaultLanguage),function(r){mb(r,"element",l)};function l(r,u,h){var d,p;if(h&&h.tagName==="pre"&&r.tagName==="code"){var g=(r==null||(d=r.data)==null?void 0:d.meta)||(r==null||(p=r.properties)==null?void 0:p.metastring)||"";r.properties.className?typeof r.properties.className=="boolean"?r.properties.className=[]:Array.isArray(r.properties.className)||(r.properties.className=[r.properties.className]):r.properties.className=[];var v,b,S=(function(Z){for(var Q,nt=Gu(Z.properties.className);!(Q=nt()).done;){var U=Q.value;if(U.slice(0,9)==="language-")return U.slice(9).toLowerCase()}return null})(r);if(!S&&i.defaultLanguage&&r.properties.className.push("language-"+(S=i.defaultLanguage)),r.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(r),D),h.properties.className=(h.properties.className||[]).concat("language-"+D)}catch(Z){if(!i.ignoreMissing||!/Unknown language/.test(Z.message))throw Z;v=r}else v=r;v.children=(b=1,function Z(Q){return Q.reduce(function(nt,U){if(U.type==="text"){var et=U.value,dt=(et.match(/\n/g)||"").length;if(dt===0)U.position={start:{line:b,column:1},end:{line:b,column:1}},nt.push(U);else for(var bt,zt=et.split(`
|
|
77
|
+
`),J=Gu(zt.entries());!(bt=J()).done;){var Xt=bt.value,Vt=Xt[0],z=Xt[1];nt.push({type:"text",value:Vt===zt.length-1?z:z+`
|
|
78
|
+
`,position:{start:{line:b+Vt,column:1},end:{line:b+Vt,column:1}}})}return b+=dt,nt}if(Object.prototype.hasOwnProperty.call(U,"children")){var X=b;return U.children=Z(U.children),nt.push(U),U.position={start:{line:X,column:1},end:{line:b,column:1}},nt}return nt.push(U),nt},[])})(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,R=(function(Z){var Q=/{([\d,-]+)}/,nt=Z.split(",").map(function(dt){return dt.trim()}).join();if(Q.test(nt)){var U=Q.exec(nt)[1],et=gb(U);return function(dt){return et.includes(dt+1)}}return function(){return!1}})(g),q=(function(Z){var Q=ld(/showLineNumbers=(\d+)/i,{lines:1});if(Q.test(Z)){var nt=Q.exec(Z);return Number(nt.groups.lines)}return 1})(g),B=(function(Z){for(var Q=new Array(Z),nt=0;nt<Z;nt++)Q[nt]={type:"element",tagName:"span",properties:{className:[]},children:[]};return Q})(v.position.end.line),F=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],O=function(){var Z,Q,nt=k.value,U=nt[0],et=nt[1];et.properties.className=["code-line"];var dt=vb(v,function(bt){return bt.position.start.line<=U+1&&bt.position.end.line>=U+1});et.children=dt.children,(g.toLowerCase().includes("showLineNumbers".toLowerCase())||i.showLineNumbers===!0||typeof i.showLineNumbers=="object"&&i.showLineNumbers.includes(S))&&!F.some(function(bt){return g.toLowerCase().includes(bt)})&&(et.properties.line=[(U+q).toString()],et.properties.className.push("line-number")),R(U)&&et.properties.className.push("highlight-line"),(S==="diff"||(Z=S)!=null&&Z.includes("diff-"))&&Ko(et).substring(0,1)==="-"?et.properties.className.push("deleted"):(S==="diff"||(Q=S)!=null&&Q.includes("diff-"))&&Ko(et).substring(0,1)==="+"&&et.properties.className.push("inserted")},W=Gu(B.entries());!(k=W()).done;)O();B.length>0&&Ko(B[B.length-1]).trim()===""&&B.pop(),r.children=B}}}})(pb);const G2="_systemEvent_11qnw_1",I2="_systemTimestamp_11qnw_9",q2="_textEvent_11qnw_13",Y2="_toolUseEvent_11qnw_100",Z2="_toolUsePrefix_11qnw_116",X2="_toolResultEvent_11qnw_120",K2="_toolResultSummary_11qnw_126",Q2="_toolResultPre_11qnw_140",P2="_errorEvent_11qnw_154",F2="_statusEvent_11qnw_163",J2="_userInputEvent_11qnw_173",$2="_userInputContent_11qnw_180",W2="_defaultEvent_11qnw_191",vn={systemEvent:G2,systemTimestamp:I2,textEvent:q2,toolUseEvent:Y2,toolUsePrefix:Z2,toolResultEvent:X2,toolResultSummary:K2,toolResultPre:Q2,errorEvent:P2,statusEvent:F2,userInputEvent:J2,userInputContent:$2,defaultEvent:W2};function tj({time:a,content:i}){return f.jsxs("div",{className:vn.systemEvent,children:[f.jsxs("span",{className:vn.systemTimestamp,children:["[",a,"]"]})," ",i]})}function ej({content:a}){return f.jsx("div",{className:vn.textEvent,children:f.jsx(od,{remarkPlugins:[rd],rehypePlugins:[H2],children:a})})}function nj({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 aj({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 sj({content:a}){return f.jsxs("div",{className:vn.errorEvent,children:["Error: ",a]})}function ij({content:a}){return f.jsxs("div",{className:vn.statusEvent,children:["--- ",a," ---"]})}function lj({content:a}){return f.jsx("div",{className:vn.userInputEvent,children:f.jsx("span",{className:vn.userInputContent,children:a})})}function oj({content:a}){return f.jsx("div",{className:vn.defaultEvent,children:a})}function J0({event:a}){const i=new Date(a.timestamp).toLocaleTimeString();switch(a.eventType){case"system":return f.jsx(tj,{time:i,content:a.content});case"text":case"output":return f.jsx(ej,{content:a.content});case"tool_use":return f.jsx(nj,{content:a.content});case"tool_result":return f.jsx(aj,{content:a.content});case"error":return f.jsx(sj,{content:a.content});case"status":return f.jsx(ij,{content:a.content});case"user_input":return f.jsx(lj,{content:a.content});default:return f.jsx(oj,{content:a.content})}}const rj="_overlay_1hz80_1",cj="_dialog_1hz80_13",uj="_title_1hz80_31",dj="_description_1hz80_39",fj="_actions_1hz80_46",hj="_cancelButton_1hz80_53",mj="_confirmButton_1hz80_71",ms={overlay:rj,dialog:cj,title:uj,description:dj,actions:fj,cancelButton:hj,confirmButton:mj};function ur({isOpen:a,title:i,description:l,confirmLabel:r="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:r})]})]})})})}const pj="_spinner_13c8l_1",gj="_spin_13c8l_1",vj="_sm_13c8l_14",yj="_md_13c8l_20",bj="_lg_13c8l_26",cv={spinner:pj,spin:gj,sm:vj,md:yj,lg:bj};function uv({size:a="md",className:i,label:l="Loading",liveRegion:r=!1}){return f.jsx("span",{className:`${cv.spinner} ${cv[a]} ${i??""}`,role:r?"status":void 0,"aria-label":l,"aria-hidden":r?void 0:!0})}const Sj="_container_d6rhh_1",_j="_header_d6rhh_5",Tj="_addButton_d6rhh_17",xj="_createForm_d6rhh_35",jj="_createInput_d6rhh_41",Aj="_createButton_d6rhh_71",Nj="_creatingHint_d6rhh_107",Ej="_projectRow_d6rhh_116",Cj="_selected_d6rhh_136",Dj="_expandArrow_d6rhh_143",wj="_expanded_d6rhh_150",kj="_projectName_d6rhh_154",Mj="_taskCount_d6rhh_158",Rj="_newTaskButton_d6rhh_164",Oj="_taskRow_d6rhh_182",Bj="_taskStatusIcon_d6rhh_211",zj="_taskTitle_d6rhh_215",Uj="_dependencyBadge_d6rhh_222",Vj="_blockedBadge_d6rhh_234",Lj="_leafSpacer_d6rhh_239",Hj="_childCountBadge_d6rhh_244",Gj="_addChildButton_d6rhh_257",Ij="_emptyCta_d6rhh_292",qj="_ctaDescription_d6rhh_305",Yj="_ctaButton_d6rhh_311",Zj="_emptyTaskCta_d6rhh_341",Xj="_createTaskLink_d6rhh_346",Zt={container:Sj,header:_j,addButton:Tj,createForm:xj,createInput:jj,createButton:Aj,creatingHint:Nj,projectRow:Ej,selected:Cj,expandArrow:Dj,expanded:wj,projectName:kj,taskCount:Mj,newTaskButton:Rj,taskRow:Oj,taskStatusIcon:Bj,taskTitle:zj,dependencyBadge:Uj,blockedBadge:Vj,leafSpacer:Lj,childCountBadge:Hj,addChildButton:Gj,emptyCta:Ij,ctaDescription:qj,ctaButton:Yj,emptyTaskCta:Zj,createTaskLink:Xj},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 Kj(a){const i=new Map(a.map(r=>[r.id,{...r,children:[]}])),l=[];for(const r of i.values())r.parentTaskId&&i.has(r.parentTaskId)?i.get(r.parentTaskId).children.push(r):l.push(r);for(const r of i.values())r.children.sort((u,h)=>u.sortOrder-h.sortOrder);return l.sort((r,u)=>r.sortOrder-u.sortOrder)}const Qj=34,Pj=16;function $0({node:a,depth:i,expandedTasks:l,toggleTask:r,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(R=>p.get(R)!=="done"),S=l.has(a.id),x=a.children.length>0,D=u===a.id,k=Qj+i*Pj;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:R=>{R.stopPropagation(),r(a.id)},onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),R.stopPropagation(),r(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(R=>R.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 R=g.find(q=>q.id===a.personaId);return R?f.jsx("span",{className:Zt.dependencyBadge,title:`Persona: ${R.name}`,style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"8rem"},children:R.name}):null})(),i<M2&&f.jsx("button",{onClick:R=>{R.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(R=>f.jsx($0,{node:R,depth:i+1,expandedTasks:l,toggleTask:r,selectedTaskId:u,setViewMode:h,projectId:d,taskStatusById:p},R.id))})})]})}function Fj({viewMode:a,setViewMode:i}){const{projects:l,tasks:r,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),[R,q]=_.useState(""),B=a.kind==="project"?a.projectId:void 0,F=a.kind==="task"?a.taskId:void 0,O=_.useRef(p);O.current=p;const W=_.useMemo(()=>new Map(r.map(U=>[U.id,U.status])),[r]),Z=U=>{g(et=>{const dt=new Set(et);return dt.has(U)?dt.delete(U):(dt.add(U),u(U)),dt})},Q=U=>{b(et=>{const dt=new Set(et);return dt.has(U)?(dt.delete(U),x(bt=>new Set(bt).add(U))):(dt.add(U),x(bt=>{const zt=new Set(bt);return zt.delete(U),zt})),dt})};_.useEffect(()=>{const U=new Set(r.filter(et=>et.parentTaskId).map(et=>et.parentTaskId));U.size>0&&b(et=>{const dt=new Set(et);for(const bt of U)S.has(bt)||dt.add(bt);return dt})},[r,S]),_.useEffect(()=>{B&&!O.current.has(B)&&(g(U=>new Set(U).add(B)),u(B))},[B,u]);const nt=()=>{!R.trim()||d||(h(R.trim()),q(""),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:R,onChange:U=>q(U.target.value),onKeyDown:U=>U.key==="Enter"&&nt(),placeholder:"Project name...",autoFocus:!0,disabled:d,className:Zt.createInput}),f.jsx("button",{onClick:nt,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(U=>{const et=p.has(U.id),dt=r.filter(J=>J.projectId===U.id),bt=B===U.id,zt=et?Kj(dt):[];return f.jsxs("div",{children:[f.jsxs("div",{onClick:()=>{bt?Z(U.id):(et||Z(U.id),i({kind:"project",projectId:U.id}))},className:`${Zt.projectRow} ${bt?Zt.selected:""}`,children:[f.jsx("span",{className:`${Zt.expandArrow} ${et?Zt.expanded:""}`,children:"▸"}),f.jsx("span",{className:Zt.projectName,title:U.name,children:U.name}),f.jsx("span",{className:Zt.taskCount,children:dt.length>0&&`${dt.filter(J=>J.status==="done").length}/${dt.length}`}),f.jsx("button",{onClick:J=>{J.stopPropagation(),i({kind:"new_task",projectId:U.id})},title:"New task",className:Zt.newTaskButton,children:"+"})]}),f.jsx(vi,{children:et&&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(J=>f.jsx($0,{node:J,depth:0,expandedTasks:v,toggleTask:Q,selectedTaskId:F,setViewMode:i,projectId:U.id,taskStatusById:W},J.id)),dt.length===0&&f.jsx("div",{className:Zt.emptyTaskCta,children:f.jsx("button",{className:Zt.createTaskLink,onClick:()=>i({kind:"new_task",projectId:U.id}),children:"+ Create Task"})})]})})]},U.id)})]})}const Jj="_container_1xzk5_1",$j="_content_1xzk5_28",fv={container:Jj,content:$j},Wj=320,W0=220,ty=600,ey="grackle-sidebar-width";function tA(){try{const a=localStorage.getItem(ey);if(a!==null){const i=Number(a);if(Number.isFinite(i)&&i>=W0&&i<=ty)return i}}catch{}return Wj}function eA(a){try{localStorage.setItem(ey,String(a))}catch{}}function nA({viewMode:a,setViewMode:i}){const[l]=_.useState(tA),r=_.useRef(null);return _.useEffect(()=>{const u=r.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>=W0&&v<=ty&&eA(v)}}});return h.observe(u),()=>{h.disconnect()}},[]),f.jsx("div",{className:fv.container,ref:r,"data-testid":"sidebar",style:{width:l},children:f.jsx("div",{className:fv.content,children:f.jsx(Fj,{viewMode:a,setViewMode:i})})})}const aA="_bar_5apte_1",sA="_barColumn_5apte_25",iA="_barRow_5apte_50",lA="_input_5apte_56",oA="_inputSmall_5apte_84",rA="_textarea_5apte_113",cA="_select_5apte_145",uA="_btnPrimary_5apte_174",dA="_btnDanger_5apte_200",fA="_btnGhost_5apte_232",hA="_badge_5apte_251",mA="_statusText_5apte_261",pA="_statusCompleted_5apte_266",gA="_statusFailed_5apte_270",vA="_statusBlocked_5apte_274",yA="_hintText_5apte_279",bA="_creatingHint_5apte_284",SA="_errorHint_5apte_292",ot={bar:aA,barColumn:sA,barRow:iA,input:lA,inputSmall:oA,textarea:rA,select:cA,btnPrimary:uA,btnDanger:dA,btnGhost:fA,badge:hA,statusText:mA,statusCompleted:pA,statusFailed:gA,statusBlocked:vA,hintText:yA,creatingHint:bA,errorHint:SA};function hv({value:a,onChange:i,testId:l}){return f.jsxs("select",{"data-testid":l,value:a,onChange:r=>i(r.target.value),className:ot.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 _A({viewMode:a,setViewMode:i}){const{spawn:l,sendInput:r,kill:u,sessions:h,tasks:d,environments:p,personas:g,createTask:v,addEnvironment:b,codespaces:S,codespaceError:x,codespaceCreating:D,listCodespaces:k,createCodespace:R}=Un(),{showToast:q}=ud(),[B,F]=_.useState(""),[O,W]=_.useState(a.kind==="new_chat"?a.runtime:"claude-code"),[Z,Q]=_.useState(""),[nt,U]=_.useState(""),[et,dt]=_.useState(""),[bt,zt]=_.useState(""),[J,Xt]=_.useState(""),Vt=ft=>{zt(ft)},z=ft=>{if(Xt(ft),ft){const at=g.find(Dt=>Dt.id===ft);at!=null&&at.runtime&&W(at.runtime)}},[X,rt]=_.useState(""),[yt,Tt]=_.useState("local"),[Pt,At]=_.useState("claude-code"),[St,G]=_.useState(""),[Kt,fe]=_.useState(""),[Ze,Xe]=_.useState(""),[ee,Je]=_.useState(""),[Ie,$e]=_.useState(""),[We,ve]=_.useState(""),[P,Re]=_.useState(""),[Y,K]=_.useState(""),[lt,ut]=_.useState("pick");_.useEffect(()=>{if(a.kind==="new_chat"&&W(a.runtime),a.kind==="new_task"&&a.parentTaskId){const ft=d.find(at=>at.id===a.parentTaskId);ft!=null&&ft.environmentId&&dt(ft.environmentId)}a.kind==="new_task"&&!a.parentTaskId&&p.length===1&&dt(p[0].id)},[a]);const vt=a.kind==="session"?h.find(ft=>ft.id===a.sessionId):void 0,mt=a.kind==="task"?d.find(ft=>ft.id===a.taskId):void 0,Nt=mt!=null&&mt.sessionId?h.find(ft=>ft.id===mt.sessionId):void 0,Mt=mt?mt.dependsOn.some(ft=>{const at=d.find(Dt=>Dt.id===ft);return at&&at.status!=="done"}):!1;if(a.kind==="empty")return f.jsx("div",{className:ot.bar,children:f.jsx("span",{className:ot.hintText,children:"Select a session or click + to start"})});if(a.kind==="new_environment"){const ft=$=>{if(!$.trim())return!0;const It=Number($);return Number.isInteger(It)&&It>=1&&It<=65535},at=()=>!(!X.trim()||yt==="ssh"&&!St.trim()||yt==="codespace"&&!We.trim()||(yt==="local"||yt==="ssh")&&!ft(Kt)),Dt=()=>{if(!at())return;const $={};if(yt==="local"){if(St.trim()&&($.host=St.trim()),Kt.trim()){const It=Number(Kt);Number.isInteger(It)&&($.port=It)}}else if(yt==="ssh"){if($.host=St.trim(),Ze.trim()&&($.user=Ze.trim()),Kt.trim()){const It=Number(Kt);Number.isInteger(It)&&($.sshPort=It)}P.trim()&&($.identityFile=P.trim())}else yt==="docker"?(ee.trim()&&($.image=ee.trim()),Ie.trim()&&($.repo=Ie.trim())):yt==="codespace"&&($.codespaceName=We.trim());b(X.trim(),yt,$,Pt),q("Environment added successfully","success"),rt(""),Tt("local"),At("claude-code"),G(""),fe(""),Xe(""),Je(""),$e(""),ve(""),Re(""),K(""),ut("pick"),i({kind:"settings"})};return f.jsxs("div",{className:ot.barColumn,children:[f.jsxs("div",{className:ot.barRow,children:[f.jsx("span",{className:ot.badge,children:"new env"}),f.jsx("input",{type:"text",value:X,onChange:$=>rt($.target.value),placeholder:"Environment name...",autoFocus:!0,className:ot.input}),f.jsxs("select",{value:yt,onChange:$=>{Tt($.target.value),$.target.value==="codespace"&&(k(),ut("pick"),ve(""))},className:ot.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:At,testId:"new-environment-runtime-select"}),f.jsx("button",{onClick:Dt,disabled:!at(),className:ot.btnPrimary,children:"Add"})]}),f.jsxs("div",{className:ot.barRow,children:[yt==="local"&&f.jsxs(f.Fragment,{children:[f.jsx("input",{type:"text",value:St,onChange:$=>G($.target.value),placeholder:"Host (optional)...",className:ot.inputSmall}),f.jsx("input",{type:"number",min:1,max:65535,value:Kt,onChange:$=>fe($.target.value),placeholder:"Port (optional)...",className:ot.inputSmall})]}),yt==="ssh"&&f.jsxs(f.Fragment,{children:[f.jsx("input",{type:"text",value:St,onChange:$=>G($.target.value),placeholder:"Host (required)...",className:ot.inputSmall}),f.jsx("input",{type:"text",value:Ze,onChange:$=>Xe($.target.value),placeholder:"User (optional)...",className:ot.inputSmall}),f.jsx("input",{type:"number",min:1,max:65535,value:Kt,onChange:$=>fe($.target.value),placeholder:"SSH port (optional)...",className:ot.inputSmall}),f.jsx("input",{type:"text",value:P,onChange:$=>Re($.target.value),placeholder:"Identity file (optional)...",className:ot.inputSmall})]}),yt==="docker"&&f.jsxs(f.Fragment,{children:[f.jsx("input",{type:"text",value:ee,onChange:$=>Je($.target.value),placeholder:"Image (optional)...",className:ot.inputSmall}),f.jsx("input",{type:"text",value:Ie,onChange:$=>$e($.target.value),placeholder:"Repo (optional)...",className:ot.inputSmall})]}),yt==="codespace"&<==="pick"&&f.jsxs(f.Fragment,{children:[f.jsxs("select",{value:We,onChange:$=>{$.target.value==="__create__"?(ut("create"),ve("")):(ve($.target.value),$.target.value&&!X.trim()&&rt($.target.value))},disabled:D,className:ot.select,children:[f.jsx("option",{value:"",children:"Select a codespace..."}),S.map($=>f.jsxs("option",{value:$.name,children:[$.name," (",$.repository,") — ",$.state]},$.name)),f.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),D&&f.jsx("span",{className:ot.creatingHint,children:"Creating codespace..."}),x&&f.jsx("span",{className:ot.errorHint,children:x})]}),yt==="codespace"&<==="create"&&f.jsxs(f.Fragment,{children:[f.jsx("input",{type:"text",value:Y,onChange:$=>K($.target.value),placeholder:"owner/repo",className:ot.inputSmall}),f.jsx("button",{onClick:()=>{Y.trim()&&(R(Y.trim()),ut("pick"),K(""))},disabled:!Y.trim(),className:ot.btnPrimary,children:"Create"}),f.jsx("button",{onClick:()=>{ut("pick"),K("")},className:ot.btnGhost,children:"Cancel"})]})]})]})}if(a.kind==="project")return f.jsx("div",{className:ot.bar,children:f.jsx("span",{className:ot.hintText,children:"Select a task or click + to create one"})});if(a.kind==="new_task"){const ft=at=>{Z.trim()&&(v(a.projectId,Z.trim(),nt,et,void 0,a.parentTaskId,bt),q("Task created successfully","success"),Q(""),U(""),dt(""),zt(""),i({kind:"project",projectId:a.projectId}))};return f.jsxs("div",{className:ot.barColumn,children:[f.jsxs("div",{className:ot.barRow,children:[f.jsx("span",{className:ot.badge,children:a.parentTaskId?"child task":"new task"}),f.jsx("input",{type:"text",value:Z,onChange:at=>Q(at.target.value),placeholder:"Task title...",autoFocus:!0,className:ot.input}),f.jsxs("select",{value:et,onChange:at=>dt(at.target.value),className:ot.select,children:[f.jsx("option",{value:"",children:"Default env"}),p.map(at=>f.jsx("option",{value:at.id,children:at.displayName},at.id))]}),f.jsxs("select",{value:bt,onChange:at=>Vt(at.target.value),className:ot.select,children:[f.jsx("option",{value:"",children:"No persona"}),g.map(at=>f.jsx("option",{value:at.id,children:at.name},at.id))]}),f.jsx("button",{onClick:()=>ft(),disabled:!Z.trim(),className:ot.btnPrimary,children:"Create"})]}),f.jsx("textarea",{value:nt,onChange:at=>U(at.target.value),placeholder:"Description (optional)...",className:ot.textarea,rows:3})]})}if(a.kind==="task"&&mt){if(mt.status==="pending"||mt.status==="assigned"){const ft=Mt?mt.dependsOn.map(at=>d.find(Dt=>Dt.id===at)).filter(at=>at&&at.status!=="done").map(at=>at.title):[];return f.jsx("div",{className:ot.bar,children:Mt?f.jsxs("span",{className:ot.statusBlocked,children:["Blocked by: ",ft.join(", ")]}):f.jsx("span",{className:ot.hintText,children:"Use the buttons above to start or manage this task"})})}if(mt.status==="in_progress"||mt.status==="waiting_input"){if((Nt==null?void 0:Nt.status)==="waiting_input"){const at=Dt=>{Dt.preventDefault(),!(!B.trim()||!mt.sessionId)&&(r(mt.sessionId,B),F(""))};return f.jsxs("form",{onSubmit:at,className:ot.bar,children:[f.jsx("input",{type:"text",value:B,onChange:Dt=>F(Dt.target.value),placeholder:"Type a message...",autoFocus:!0,className:ot.input}),f.jsx("button",{type:"submit",disabled:!B.trim(),className:ot.btnPrimary,children:"Send"})]})}return f.jsx("div",{className:ot.bar,children:f.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:ot.input})})}if(mt.status==="review")return f.jsx("div",{className:ot.bar,children:f.jsx("span",{className:ot.hintText,children:"Review the changes above, then approve or reject in the header"})});if(mt.status==="done")return f.jsxs("div",{className:ot.bar,children:[f.jsx("span",{className:`${ot.statusText} ${ot.statusCompleted}`,children:"Task completed"}),f.jsx("button",{onClick:()=>i({kind:"new_task",projectId:mt.projectId}),className:ot.btnPrimary,children:"+ New Task"})]});if(mt.status==="failed")return f.jsx("div",{className:ot.bar,children:f.jsx("span",{className:`${ot.statusText} ${ot.statusFailed}`,children:"Task failed"})})}if(a.kind==="new_chat"){const ft=at=>{at.preventDefault(),B.trim()&&(l(a.environmentId,B,void 0,O,J),q("Session started","success"),F(""),Xt(""))};return f.jsxs("form",{onSubmit:ft,className:ot.bar,children:[f.jsx("span",{className:ot.badge,children:"new chat"}),f.jsx("input",{type:"text",value:B,onChange:at=>F(at.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:ot.input}),f.jsx(hv,{value:O,onChange:W,testId:"new-chat-runtime-select"}),f.jsxs("select",{value:J,onChange:at=>z(at.target.value),className:ot.select,children:[f.jsx("option",{value:"",children:"No persona"}),g.map(at=>f.jsx("option",{value:at.id,children:at.name},at.id))]}),f.jsx("button",{type:"submit",disabled:!B.trim(),className:ot.btnPrimary,children:"Go"})]})}if(a.kind==="session"){const ft=(vt==null?void 0:vt.status)==="running",at=(vt==null?void 0:vt.status)==="waiting_input",Dt=vt!==void 0&&["completed","failed","killed"].includes(vt.status);if(ft)return f.jsxs("div",{className:ot.bar,children:[f.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:ot.input}),f.jsx("button",{onClick:()=>u(a.sessionId),className:ot.btnDanger,title:"Stop session",children:"Stop"})]});if(at){const $=It=>{It.preventDefault(),B.trim()&&(r(a.sessionId,B),F(""))};return f.jsxs("form",{onSubmit:$,className:ot.bar,children:[f.jsx("input",{type:"text",value:B,onChange:It=>F(It.target.value),placeholder:"Type a message...",autoFocus:!0,className:ot.input}),f.jsx("button",{type:"submit",disabled:!B.trim(),className:ot.btnPrimary,children:"Send"}),f.jsx("button",{type:"button",onClick:()=>u(a.sessionId),className:ot.btnDanger,title:"Stop session",children:"Stop"})]})}if(Dt&&vt)return f.jsxs("div",{className:ot.bar,children:[f.jsxs("span",{className:`${ot.statusText} ${ot.hintText}`,children:["Session ",vt.status]}),f.jsx("button",{onClick:()=>i({kind:"new_chat",environmentId:vt.environmentId,runtime:vt.runtime}),className:ot.btnPrimary,children:"+ New Chat"})]})}return f.jsx("div",{className:ot.bar,children:f.jsx("span",{className:ot.hintText,children:"Loading..."})})}const TA="_container_twqwx_1",xA="_emptyState_twqwx_8",jA="_card_twqwx_14",AA="_cardHeader_twqwx_34",NA="_categoryBadge_twqwx_41",EA="_findingTitle_twqwx_49",CA="_findingDate_twqwx_55",DA="_findingContent_twqwx_61",wA="_tags_twqwx_67",kA="_tag_twqwx_67",qn={container:TA,emptyState:xA,card:jA,cardHeader:AA,categoryBadge:NA,findingTitle:EA,findingDate:CA,findingContent:DA,tags:wA,tag:kA};function MA(a){const i=new Date(a),l=new Date,r=l.getTime()-i.getTime(),u=Math.floor(r/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 RA={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)"}},OA={text:"var(--text-secondary)",bg:"var(--bg-elevated)"};function BA({projectId:a}){const{findings:i}=Un(),l=i.filter(r=>r.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((r,u)=>{const h=RA[r.category]||OA;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:r.category}),f.jsx("span",{className:qn.findingTitle,children:r.title}),f.jsx("span",{className:qn.findingDate,title:r.createdAt,children:MA(r.createdAt)})]}),f.jsx("div",{className:qn.findingContent,children:r.content.length>300?r.content.slice(0,300)+"...":r.content}),r.tags.length>0&&f.jsx("div",{className:qn.tags,children:r.tags.map(d=>f.jsx("span",{className:qn.tag,style:{color:h.text,textShadow:`0 0 8px ${h.text}`},children:d},d))})]},r.id)})})}const zA="_container_vs9om_1",UA="_header_vs9om_5",VA="_headerLabel_vs9om_12",LA="_addButton_vs9om_20",HA="_envRow_vs9om_46",GA="_targeted_vs9om_60",IA="_expanded_vs9om_63",qA="_statusDot_vs9om_67",YA="_pulse_vs9om_70",ZA="_envName_vs9om_74",XA="_envActions_vs9om_78",KA="_idleLabel_vs9om_85",QA="_newChatButton_vs9om_90",PA="_envActionsRow_vs9om_108",FA="_connectButton_vs9om_116",JA="_stopButton_vs9om_133",$A="_deleteButton_vs9om_150",WA="_provisionMessage_vs9om_168",tN="_errorMessage_vs9om_175",eN="_sessionRow_vs9om_182",nN="_selected_vs9om_200",aN="_sessionDot_vs9om_207",sN="_sessionSummaryRow_vs9om_211",iN="_sessionExpandArrow_vs9om_233",lN="_sessionSummaryText_vs9om_244",oN="_sessionCountBadge_vs9om_251",rN="_emptyCta_vs9om_274",cN="_ctaDescription_vs9om_287",uN="_ctaButton_vs9om_293",Qt={container:zA,header:UA,headerLabel:VA,addButton:LA,envRow:HA,targeted:GA,expanded:IA,statusDot:qA,pulse:YA,envName:ZA,envActions:XA,idleLabel:KA,newChatButton:QA,envActionsRow:PA,connectButton:FA,stopButton:JA,deleteButton:$A,provisionMessage:WA,errorMessage:tN,sessionRow:eN,selected:nN,sessionDot:aN,sessionSummaryRow:sN,sessionExpandArrow:iN,sessionSummaryText:lN,sessionCountBadge:oN,emptyCta:rN,ctaDescription:cN,ctaButton:uN},dN={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},fN={running:"running",waiting_input:"awaiting input",failed:"failed",killed:"killed",completed:"completed"},mv=["running","waiting_input","failed","killed","completed"],hN=.2;function mN(a){const i={};for(const h of a)i[h.status]=(i[h.status]||0)+1;const l=mv.filter(h=>i[h]>0).map(h=>`${i[h]} ${fN[h]||h}`),r=new Set(mv),u=Object.keys(i).filter(h=>!r.has(h)).sort().map(h=>`${i[h]} ${h}`);return[...l,...u].join(", ")}function pN({status:a}){const i=a==="running"?"var(--accent-green)":a==="waiting_input"?"var(--accent-yellow)":a==="completed"?"var(--text-secondary)":a==="failed"||a==="killed"?"var(--accent-red)":"var(--text-tertiary)";return f.jsx("span",{className:Qt.sessionDot,style:{color:i},children:"●"})}function gN({env:a,envSessions:i,selectedSessionId:l,isNewChatTarget:r,expanded:u,onToggleExpand:h,sessionsExpanded:d,onToggleSessionsExpand:p,provisionProgress:g,onProvision:v,onStop:b,onRemove:S,setViewMode:x}){const[D,k]=_.useState(!1),R=dN[a.status]||"var(--text-tertiary)",q=a.status==="connected",B=a.status==="connecting",F=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} ${r?Qt.targeted:""} ${u?Qt.expanded:""}`,"data-testid":"env-row",onClick:h,children:[f.jsx("span",{className:`${Qt.statusDot} ${q?Qt.pulse:""}`,style:{color:R},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&&!r&&!u&&f.jsx("span",{className:Qt.idleLabel,children:"(idle)"}),q&&f.jsx("button",{onClick:O=>{O.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:[B&&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}),F&&f.jsx("button",{onClick:O=>{O.stopPropagation(),v(a.id)},className:Qt.connectButton,children:a.status==="error"?"Retry":"Connect"}),q&&f.jsx("button",{onClick:O=>{O.stopPropagation(),b(a.id)},className:Qt.stopButton,children:"Stop"}),!B&&f.jsx("button",{onClick:O=>{O.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:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),p())},children:[f.jsx("span",{className:`${Qt.sessionExpandArrow} ${d?Qt.expanded:""}`,children:"▸"}),f.jsx("span",{className:Qt.sessionSummaryText,children:mN(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:hN,ease:"easeInOut"},style:{overflow:"hidden"},children:i.map(O=>f.jsxs("div",{onClick:W=>{W.stopPropagation(),x({kind:"session",sessionId:O.id})},className:`${Qt.sessionRow} ${l===O.id?Qt.selected:""}`,title:O.prompt,"data-testid":"session-row",children:[f.jsx(pN,{status:O.status})," ",O.prompt.length>24?O.prompt.slice(0,24)+"...":O.prompt]},O.id))})})]})]})}function vN({viewMode:a,setViewMode:i}){const{environments:l,sessions:r,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 R=r.filter(q=>q.environmentId===k.id);return f.jsx(gN,{env:k,envSessions:R,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(q=>{const B=new Set(q);return B.has(k.id)?B.delete(k.id):B.add(k.id),B})},provisionProgress:u[k.id],onProvision:h,onStop:d,onRemove:p,setViewMode:i},k.id)})]})}const yN="_container_8bik7_1",bN="_heading_8bik7_7",SN="_section_8bik7_14",_N="_sectionTitle_8bik7_25",TN="_sectionDescription_8bik7_34",xN="_tokenList_8bik7_47",jN="_tokenRow_8bik7_54",AN="_tokenBadge_8bik7_67",NN="_tokenName_8bik7_82",EN="_tokenTarget_8bik7_89",CN="_deleteButton_8bik7_98",DN="_addForm_8bik7_112",wN="_formRow_8bik7_118",kN="_input_8bik7_124",MN="_select_8bik7_153",RN="_addButton_8bik7_184",ON="_emptyStateInfo_8bik7_213",ue={container:yN,heading:bN,section:SN,sectionTitle:_N,sectionDescription:TN,tokenList:xN,tokenRow:jN,tokenBadge:AN,tokenName:NN,tokenTarget:EN,deleteButton:CN,addForm:DN,formRow:wN,input:kN,select:MN,addButton:RN,emptyStateInfo:ON},BN=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function zN({viewMode:a,setViewMode:i}){const{tokens:l,setToken:r,deleteToken:u}=Un(),{showToast:h}=ud(),[d,p]=_.useState(""),[g,v]=_.useState(""),[b,S]=_.useState("env_var"),[x,D]=_.useState(""),[k,R]=_.useState(null),q=O=>{if(O.preventDefault(),!d||!g)return;const W=b==="env_var"?x||d.toUpperCase()+"_TOKEN":"";r(d,g,b,W,b==="file"?x:""),h("Token saved successfully","success"),p(""),v(""),D("")},B=O=>{R(O)},F=()=>{k&&(u(k),h("Token deleted","info")),R(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:F,onCancel:()=>R(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(vN,{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(O=>f.jsxs("div",{className:ue.tokenRow,children:[f.jsx("span",{className:ue.tokenBadge,children:O.tokenType}),f.jsx("span",{className:ue.tokenName,children:O.name}),f.jsx("span",{className:ue.tokenTarget,children:O.tokenType==="env_var"?O.envVar:O.filePath}),f.jsx("button",{className:ue.deleteButton,onClick:()=>B(O.name),title:`Delete ${O.name}`,children:"×"})]},O.name))}),f.jsxs("form",{className:ue.addForm,onSubmit:q,children:[f.jsxs("div",{className:ue.formRow,children:[f.jsx("input",{className:ue.input,type:"text",placeholder:"Token name",value:d,onChange:O=>p(O.target.value)}),f.jsx("input",{className:ue.input,type:"password",placeholder:"Value",value:g,onChange:O=>v(O.target.value)})]}),f.jsxs("div",{className:ue.formRow,children:[f.jsx("select",{className:ue.select,value:b,onChange:O=>S(O.target.value),children:BN.map(O=>f.jsx("option",{value:O.value,children:O.label},O.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:O=>D(O.target.value)}),f.jsx("button",{className:ue.addButton,type:"submit",children:"Add Token"})]})]})]})]})}const UN="_container_14lk7_1",VN="_header_14lk7_7",LN="_form_14lk7_18",HN="_formActions_14lk7_61",GN="_list_14lk7_67",IN="_card_14lk7_73",qN="_active_14lk7_79",YN="_cardHeader_14lk7_83",ZN="_cardActions_14lk7_92",XN="_description_14lk7_97",KN="_meta_14lk7_103",QN="_promptDetails_14lk7_116",PN="_promptText_14lk7_128",FN="_empty_14lk7_140",JN="_btnPrimary_14lk7_146",$N="_btnSecondary_14lk7_160",WN="_btnSmall_14lk7_174",tE="_btnDanger_14lk7_188",Se={container:UN,header:VN,form:LN,formActions:HN,list:GN,card:IN,active:qN,cardHeader:YN,cardActions:ZN,description:XN,meta:KN,promptDetails:QN,promptText:PN,empty:FN,btnPrimary:JN,btnSecondary:$N,btnSmall:WN,btnDanger:tE};function eE(){const{personas:a,createPersona:i,updatePersona:l,deletePersona:r}=Un(),[u,h]=_.useState(null),[d,p]=_.useState(!1),[g,v]=_.useState(null),[b,S]=_.useState(""),[x,D]=_.useState(""),[k,R]=_.useState(""),[q,B]=_.useState(""),[F,O]=_.useState(""),[W,Z]=_.useState(0),Q=()=>{S(""),D(""),R(""),B(""),O(""),Z(0)},nt=()=>{Q(),h(null),p(!0)},U=J=>{S(J.name),D(J.description),R(J.systemPrompt),B(J.runtime),O(J.model),Z(J.maxTurns),h(J),p(!1)},et=J=>{J.preventDefault(),!(!b.trim()||!k.trim())&&(u?(l(u.id,b,x,k,q,F,W),h(null)):(i(b,x,k,q,F,W),p(!1)),Q())},dt=J=>{r(J),v(null),(u==null?void 0:u.id)===J&&(h(null),Q())},bt=()=>{h(null),p(!1),Q()},zt=()=>f.jsxs("form",{onSubmit:et,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:J=>S(J.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),f.jsxs("label",{children:["Description",f.jsx("input",{type:"text",value:x,onChange:J=>D(J.target.value),placeholder:"Brief description..."})]}),f.jsxs("label",{children:["Runtime",f.jsxs("select",{value:q,onChange:J=>B(J.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:F,onChange:J=>O(J.target.value),placeholder:"e.g. sonnet"})]}),f.jsxs("label",{children:["Max Turns",f.jsx("input",{type:"number",value:W,onChange:J=>Z(parseInt(J.target.value,10)||0),min:0})]}),f.jsxs("label",{children:["System Prompt",f.jsx("textarea",{value:k,onChange:J=>R(J.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:bt,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:nt,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(J=>f.jsxs("div",{className:`${Se.card} ${(u==null?void 0:u.id)===J.id?Se.active:""}`,children:[f.jsxs("div",{className:Se.cardHeader,children:[f.jsx("strong",{children:J.name}),f.jsxs("div",{className:Se.cardActions,children:[f.jsx("button",{onClick:()=>U(J),className:Se.btnSmall,children:"Edit"}),g===J.id?f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>dt(J.id),className:Se.btnDanger,children:"Confirm"}),f.jsx("button",{onClick:()=>v(null),className:Se.btnSmall,children:"Cancel"})]}):f.jsx("button",{onClick:()=>v(J.id),className:Se.btnSmall,children:"Delete"})]})]}),J.description&&f.jsx("p",{className:Se.description,children:J.description}),f.jsxs("div",{className:Se.meta,children:[J.runtime&&f.jsxs("span",{children:["Runtime: ",J.runtime]}),J.model&&f.jsxs("span",{children:["Model: ",J.model]}),J.maxTurns>0&&f.jsxs("span",{children:["Max turns: ",J.maxTurns]})]}),f.jsxs("details",{className:Se.promptDetails,children:[f.jsx("summary",{children:"System Prompt"}),f.jsx("pre",{className:Se.promptText,children:J.systemPrompt})]})]},J.id))})]})}const pv=220,gv=70,nE=40,aE=60,sE="hierarchy",iE="dependency";function lE(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:nE,ranksep:aE});const l=new Map(a.map(d=>[d.id,d])),r=new Map;for(const d of a)if(d.parentTaskId&&l.has(d.parentTaskId)){const p=r.get(d.parentTaskId)||[];p.push(d),r.set(d.parentTaskId,p)}for(const d of a)i.setNode(d.id,{width:pv,height:gv});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:sE},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:iE},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=r.get(d.id)||[];return{id:d.id,type:"task",position:{x:p.x-pv/2,y:p.y-gv/2},data:{task:d,childCount:g.length,doneChildCount:g.filter(v=>v.status==="done").length,hasDependencies:d.dependsOn.length>0}}}),edges:u}},[a])}const oE="_dagContainer_iizup_1",rE="_taskNode_iizup_26",cE="_taskNodeBorder_iizup_48",uE="_taskNodeContent_iizup_54",dE="_taskNodeHeader_iizup_64",fE="_taskNodeIcon_iizup_71",hE="_taskNodeTitle_iizup_76",mE="_taskNodeBadges_iizup_84",pE="_childBadge_iizup_89",gE="_depBadge_iizup_101",vE="_handle_iizup_113",yE="_emptyCta_iizup_120",bE="_ctaDescription_iizup_131",SE="_ctaButton_iizup_138",Pe={dagContainer:oE,taskNode:rE,taskNodeBorder:cE,taskNodeContent:uE,taskNodeHeader:dE,taskNodeIcon:fE,taskNodeTitle:hE,taskNodeBadges:mE,childBadge:pE,depBadge:gE,handle:vE,emptyCta:yE,ctaDescription:bE,ctaButton:SE},vv={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 _E({data:a}){const{task:i,childCount:l,doneChildCount:r,hasDependencies:u}=a,h=vv[i.status]||vv.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:[r,"/",l]}),u&&f.jsx("span",{className:Pe.depBadge,children:"dep"})]})]}),f.jsx(zp,{type:"source",position:Up.Bottom,className:Pe.handle})]})}const yv={pending:"#6b7a8d",assigned:"#70a1ff",in_progress:"#4ecca3",review:"#f0c040",done:"#4ecca3",failed:"#e94560",waiting_input:"#f0c040"},TE={task:_E};function xE({projectId:a,setViewMode:i}){const{tasks:l}=Un(),r=_.useMemo(()=>l.filter(g=>g.projectId===a),[l,a]),{nodes:u,edges:h}=lE(r),d=_.useCallback((g,v)=>{i({kind:"task",taskId:v.id})},[i]),p=_.useCallback(g=>{const v=g.data;return yv[v.task.status]||yv.pending},[]);return r.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(bb,{nodes:u,edges:h,nodeTypes:TE,onNodeClick:d,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[f.jsx(Sb,{variant:_b.Dots,gap:20,size:1,color:"rgba(255,255,255,0.05)"}),f.jsx(Tb,{showInteractive:!1}),f.jsx(xb,{nodeColor:p,maskColor:"rgba(10, 12, 20, 0.7)",style:{background:"var(--bg-inset)"}})]})})}const jE="_panelContainer_18j12_1",AE="_emptyState_18j12_8",NE="_projectSummary_18j12_17",EE="_projectSummaryTitle_18j12_28",CE="_projectSummarySubtitle_18j12_32",DE="_header_18j12_36",wE="_headerInfo_18j12_62",kE="_killButton_18j12_68",ME="_headerTitle_18j12_89",RE="_headerActions_18j12_99",OE="_taskStatusBadge_18j12_106",BE="_taskBranch_18j12_115",zE="_taskBlockedBadge_18j12_121",UE="_btnPrimary_18j12_129",VE="_btnDanger_18j12_155",LE="_rejectInput_18j12_187",HE="_tabBar_18j12_216",GE="_tab_18j12_216",IE="_active_18j12_239",qE="_eventScroll_18j12_244",YE="_tabContent_18j12_250",ZE="_noContext_18j12_255",XE="_overviewContent_18j12_261",KE="_overviewDashboard_18j12_270",QE="_overviewHero_18j12_276",PE="_statusBadge_18j12_283",FE="_statusPending_18j12_295",JE="_statusAssigned_18j12_300",$E="_statusInProgress_18j12_305",WE="_statusReview_18j12_310",tC="_statusDone_18j12_315",eC="_statusFailed_18j12_320",nC="_statusWaitingInput_18j12_325",aC="_overviewBranchPill_18j12_330",sC="_branchLink_18j12_345",iC="_overviewSection_18j12_356",lC="_overviewLabel_18j12_362",oC="_overviewValue_18j12_369",rC="_overviewMuted_18j12_374",cC="_overviewMarkdown_18j12_380",uC="_envRow_18j12_449",dC="_envDot_18j12_455",fC="_envDotGreen_18j12_462",hC="_envDotYellow_18j12_467",mC="_envDotRed_18j12_472",pC="_envDotGray_18j12_477",gC="_depList_18j12_481",vC="_depItem_18j12_487",yC="_depBlocked_18j12_494",bC="_depDone_18j12_498",SC="_timeline_18j12_502",_C="_timelineRow_18j12_508",TC="_timelineKey_18j12_515",xC="_timelineValue_18j12_521",jC="_timelineDelta_18j12_525",AC="_reviewNotes_18j12_536",NC="_waitingMessage_18j12_553",EC="_errorMessage_18j12_557",CC="_eventOverflowWarning_18j12_561",DC="_attemptSelector_18j12_575",wC="_attemptLabel_18j12_586",kC="_attemptButton_18j12_590",MC="_attemptActive_18j12_607",RC="_attemptStatus_18j12_613",OC="_emptyCta_18j12_619",BC="_ctaTitle_18j12_631",zC="_ctaDescription_18j12_637",UC="_ctaButton_18j12_644",VC="_projectHeader_18j12_688",LC="_projectName_18j12_712",HC="_projectMeta_18j12_725",GC="_metaRow_18j12_733",IC="_metaLabel_18j12_740",qC="_metaValue_18j12_750",YC="_metaPlaceholder_18j12_760",ZC="_editButton_18j12_765",XC="_editInput_18j12_781",KC="_editTextarea_18j12_812",QC="_editSelect_18j12_847",PC="_archiveButton_18j12_879",FC="_repoLink_18j12_901",JC="_metaValueClickable_18j12_911",$C="_editHint_18j12_930",WC="_editError_18j12_939",tD="_editInputInvalid_18j12_946",eD="_unsavedDot_18j12_951",nD="_metaToggle_18j12_960",aD="_metaToggleArrow_18j12_981",sD="_metaToggleArrowOpen_18j12_986",iD="_progressBarContainer_18j12_990",lD="_progressBar_18j12_990",oD="_progressFill_18j12_1006",rD="_progressLabel_18j12_1013",cD="_metaTimestamps_18j12_1020",uD="_metaTimestamp_18j12_1020",dD="_editFieldWrapper_18j12_1036",A={panelContainer:jE,emptyState:AE,projectSummary:NE,projectSummaryTitle:EE,projectSummarySubtitle:CE,header:DE,headerInfo:wE,killButton:kE,headerTitle:ME,headerActions:RE,taskStatusBadge:OE,taskBranch:BE,taskBlockedBadge:zE,btnPrimary:UE,btnDanger:VE,rejectInput:LE,tabBar:HE,tab:GE,active:IE,eventScroll:qE,tabContent:YE,noContext:ZE,overviewContent:XE,overviewDashboard:KE,overviewHero:QE,statusBadge:PE,statusPending:FE,statusAssigned:JE,statusInProgress:$E,statusReview:WE,statusDone:tC,statusFailed:eC,statusWaitingInput:nC,overviewBranchPill:aC,branchLink:sC,overviewSection:iC,overviewLabel:lC,overviewValue:oC,overviewMuted:rC,overviewMarkdown:cC,envRow:uC,envDot:dC,envDotGreen:fC,envDotYellow:hC,envDotRed:mC,envDotGray:pC,depList:gC,depItem:vC,depBlocked:yC,depDone:bC,timeline:SC,timelineRow:_C,timelineKey:TC,timelineValue:xC,timelineDelta:jC,reviewNotes:AC,waitingMessage:NC,errorMessage:EC,eventOverflowWarning:CC,attemptSelector:DC,attemptLabel:wC,attemptButton:kC,attemptActive:MC,attemptStatus:RC,emptyCta:OC,ctaTitle:BC,ctaDescription:zC,ctaButton:UC,projectHeader:VC,projectName:LC,projectMeta:HC,metaRow:GC,metaLabel:IC,metaValue:qC,metaPlaceholder:YC,editButton:ZC,editInput:XC,editTextarea:KC,editSelect:QC,archiveButton:PC,repoLink:FC,metaValueClickable:JC,editHint:$C,editError:WC,editInputInvalid:tD,unsavedDot:eD,metaToggle:nD,metaToggleArrow:aD,metaToggleArrowOpen:sD,progressBarContainer:iD,progressBar:lD,progressFill:oD,progressLabel:rD,metaTimestamps:cD,metaTimestamp:uD,editFieldWrapper:dD};function bv(a,i){const l=[];let r=a;const u=new Set;for(;r&&i.has(r)&&!u.has(r);){u.add(r);const h=i.get(r);l.unshift(h),r=h.parentTaskId||void 0}return l}function fD(a,i,l){const r={label:"Home",viewMode:{kind:"empty"}};switch(a.kind){case"empty":return[{label:"Home",viewMode:void 0}];case"settings":return[r,{label:"Settings",viewMode:void 0}];case"persona_management":return[r,{label:"Personas",viewMode:void 0}];case"new_environment":return[r,{label:"New Environment",viewMode:void 0}];case"project":{const u=i.find(h=>h.id===a.projectId);return[r,{label:(u==null?void 0:u.name)??"Project",viewMode:void 0}]}case"new_task":{const u=i.find(d=>d.id===a.projectId),h=[r,{label:(u==null?void 0:u.name)??"Project",viewMode:{kind:"project",projectId:a.projectId}}];if(a.parentTaskId){const d=bv(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=bv(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=[r];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[r,{label:"New Chat",viewMode:void 0}];case"session":return[r,{label:`Session ${a.sessionId.slice(0,8)}`,viewMode:void 0}];default:return[{label:"Home",viewMode:void 0}]}}function hD({sessionId:a,session:i,isActive:l,onKill:r}){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:()=>r(a),title:"Stop session",className:A.killButton,children:"×"})]})]})}function ny({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 mD({sessionEvents:a,session:i,eventsDropped:l,scrollRef:r}){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:r,className:A.eventScroll,children:[a.length===0&&f.jsx("div",{className:u?A.errorMessage:A.waitingMessage,children:h}),f.jsx(ny,{eventsDropped:l}),a.map((d,p)=>f.jsx(J0,{event:d},`${d.sessionId}-${d.timestamp}-${p}`))]})}function pD(a){const i=[];for(const l of a){const r=i[i.length-1];l.eventType==="text"&&(r==null?void 0:r.eventType)==="text"?i[i.length-1]={...r,content:r.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 r=Math.floor(l/6e4),u=Math.floor(l%6e4/1e3);if(r===0)return`${u}s`;const h=Math.floor(r/60),d=r%60;return h===0?`${r}m ${u}s`:`${h}h ${d}m`}function ay(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 Sv(a){if(!a)return"";const i=new Date(a);if(isNaN(i.getTime()))return"";const r=Date.now()-i.getTime();if(r<0)return"just now";const u=Math.floor(r/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 gD({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 vD({task:a,tasksById:i,environments:l,projects:r}){const u=l.find(p=>p.id===a.environmentId),h=r.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(gD,{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} ${ay(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 yD({task:a,sessionId:i,isBlocked:l,rejectNotes:r,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:r,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 bD({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((r,u)=>{const h=r.id===i,d=r.status==="completed"?"✓":r.status==="failed"?"✗":r.status==="running"||r.status==="waiting_input"?"●":"";return f.jsxs("button",{className:`${A.attemptButton} ${h?A.attemptActive:""}`,onClick:()=>l(r.id),title:`Attempt #${u+1} — ${r.status}`,"aria-label":`Attempt #${u+1}, ${r.status}`,"aria-pressed":h,"data-testid":`attempt-${u+1}`,children:["#",u+1,d&&f.jsx("span",{className:A.attemptStatus,children:d})]},r.id)})]})}function SD({viewMode:a,setViewMode:i}){const{events:l,eventsDropped:r,sessions:u,tasks:h,environments:d,loadSessionEvents:p,loadFindings:g,kill:v,startTask:b,approveTask:S,rejectTask:x,deleteTask:D,projects:k,createProject:R,archiveProject:q,updateProject:B,taskSessions:F,loadTaskSessions:O}=Un(),W=_.useRef(null),Z=_.useRef(void 0),[Q,nt]=_.useState("overview"),[U,et]=_.useState("tasks"),[dt,bt]=_.useState(""),[zt,J]=_.useState(!1),[Xt,Vt]=_.useState(!1),[z,X]=_.useState(void 0),rt=_.useRef(void 0),yt=_.useRef(void 0),[Tt,Pt]=_.useState(null),[At,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 L=Xe.current;Xe.current=ve,!(L===void 0||L===ve)&&(Tt!==null||At!=="")&&(Pt(null),St(""))},[ve,Tt,At]),_.useEffect(()=>{if(Tt===null)return;const L=Tt==="name"?Je.current:Tt==="description"?Ie.current:Tt==="repoUrl"?$e.current:We.current;if(!L)return;const Ee=window.setTimeout(()=>{L.focus()},0);return()=>{window.clearTimeout(Ee)}},[Tt]);let P,Re;a.kind==="task"&&(P=h.find(L=>L.id===a.taskId),Re=(P==null?void 0:P.projectId)||void 0);const Y=P?F[P.id]??[]:[];let K;a.kind==="session"?K=a.sessionId:a.kind==="task"&&(z&&Y.some(L=>L.id===z)?K=z:K=(P==null?void 0:P.sessionId)||void 0);const lt=()=>{J(!0)},ut=()=>{P&&(D(P.id),J(!1),i({kind:"project",projectId:P.projectId}))};a.kind==="task"&&(P==null?void 0:P.id)!==rt.current&&(rt.current=P==null?void 0:P.id,Q!=="overview"&&nt("overview"),dt!==""&&bt(""),z!==void 0&&X(void 0));const vt=_.useRef(void 0),mt=_.useRef(void 0);if(_.useEffect(()=>{if(!(P!=null&&P.id))return;const L=P.id!==vt.current,Ee=P.sessionId!==mt.current;(L||Ee)&&(vt.current=P.id,mt.current=P.sessionId,O(P.id))},[P==null?void 0:P.id,P==null?void 0:P.sessionId,O]),(P==null?void 0:P.status)!==yt.current){yt.current=P==null?void 0:P.status;const L=(P==null?void 0:P.status)==="pending"||(P==null?void 0:P.status)==="assigned"?"overview":(P==null?void 0:P.status)==="in_progress"||(P==null?void 0:P.status)==="waiting_input"||(P==null?void 0:P.status)==="review"?"stream":(P==null?void 0:P.status)==="done"?"findings":void 0;L&&L!==Q&&nt(L)}const Nt=_.useMemo(()=>{const L=K?l.filter(Ee=>Ee.sessionId===K):[];return pD(L)},[l,K]),Mt=_.useMemo(()=>new Map(h.map(L=>[L.id,L])),[h]),ft=P?P.dependsOn.some(L=>{const Ee=Mt.get(L);return Ee!==void 0&&Ee.status!=="done"}):!1,at=_.useMemo(()=>fD(a,k,Mt),[a,k,Mt]),Dt=L=>{L.viewMode&&i(L.viewMode)},$=K?u.find(L=>L.id===K)??void 0:void 0;if(_.useEffect(()=>{K&&K!==Z.current&&(Z.current=K,p(K))},[K,p]),_.useEffect(()=>{Q==="findings"&&Re&&g(Re)},[Q,Re,g]),_.useEffect(()=>{W.current&&Q==="stream"&&(W.current.scrollTop=W.current.scrollHeight)},[Nt.length,Q]),a.kind==="settings")return f.jsxs("div",{className:A.panelContainer,children:[f.jsx(Ga,{segments:at,onNavigate:Dt}),f.jsx(zN,{viewMode:a,setViewMode:i})]});if(a.kind==="persona_management")return f.jsxs("div",{className:A.panelContainer,children:[f.jsx(Ga,{segments:at,onNavigate:Dt}),f.jsx(eE,{})]});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 L=window.prompt("Project name:");L!=null&&L.trim()&&R(L.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:at,onNavigate:Dt}),f.jsx("div",{className:A.emptyState,children:"Enter a prompt below to start a new session"})]});if(a.kind==="project"){const L=k.find(it=>it.id===a.projectId),Ee=h.filter(it=>it.projectId===a.projectId),Kn=Ee.filter(it=>it.status==="done").length,Oe=Ee.length,Be=Oe>0?Math.round(Kn/Oe*100):0,tt=100,jt=(it,re)=>{ee.current=it,Pt(it),St(re),Kt("")},qt=()=>{ee.current=null,Pt(null),St(""),Kt("")},ae=(it,re)=>{if(it==="name"){const rn=re.trim();if(!rn)return"Name is required";if(rn.length>tt)return`Max ${tt} characters`}if(it==="repoUrl"){const rn=re.trim();if(rn&&!/^https?:\/\/.+/.test(rn))return"Must be a valid http(s) URL"}return""},pt=it=>{if(!L)return;const re=At.trim(),rn=ae(it,At);if(rn){Kt(rn);return}if(it==="name"){if(re===L.name){qt();return}B(L.id,{name:re})}else if(it==="description"){const pa=At;if(pa===L.description){qt();return}B(L.id,{description:pa})}else if(it==="repoUrl"){if(re===L.repoUrl){qt();return}B(L.id,{repoUrl:re})}else if(it==="defaultEnvironmentId"){if(At===L.defaultEnvironmentId){qt();return}B(L.id,{defaultEnvironmentId:At})}qt()},ze=(it,re)=>{it.key==="Escape"?qt():it.key==="Enter"&&re!=="description"&&pt(re)},Ke=it=>L?it==="name"?At.trim()!==L.name:it==="description"?At!==L.description:it==="repoUrl"?At.trim()!==L.repoUrl:it==="defaultEnvironmentId"?At!==L.defaultEnvironmentId:!1:!1,kn=d.find(it=>it.id===(L==null?void 0:L.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:at,onNavigate:Dt}),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:At,onChange:it=>{St(it.target.value),Kt("")},onBlur:it=>{if(ee.current==="name"){ee.current=null;return}it.relatedTarget instanceof HTMLElement&&it.relatedTarget.dataset.editAction==="name"||pt("name")},onKeyDown:it=>ze(it,"name"),maxLength:tt,"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:()=>jt("name",(L==null?void 0:L.name)||""),title:"Click to edit name","aria-label":`Edit project name: ${(L==null?void 0:L.name)||a.projectId}`,"data-testid":"edit-name-button",children:[(L==null?void 0:L.name)||a.projectId,f.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})}),f.jsx("button",{className:A.archiveButton,onClick:()=>Vt(!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:At,onChange:it=>{St(it.target.value),Kt("")},onBlur:it=>{if(ee.current==="description"){ee.current=null;return}it.relatedTarget instanceof HTMLElement&&it.relatedTarget.dataset.editAction==="description"||pt("description")},onKeyDown:it=>ze(it,"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:()=>jt("description",(L==null?void 0:L.description)||""),title:"Click to edit description","aria-label":"Edit project description","data-testid":"edit-description-button",children:[L!=null&&L.description?f.jsx("span",{className:A.overviewMarkdown,children:f.jsx(od,{remarkPlugins:[rd],children:L.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:At,onChange:it=>{St(it.target.value),Kt("")},onBlur:it=>{if(ee.current==="repoUrl"){ee.current=null;return}it.relatedTarget instanceof HTMLElement&&it.relatedTarget.dataset.editAction==="repoUrl"||pt("repoUrl")},onKeyDown:it=>ze(it,"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:it=>{it.preventDefault(),jt("repoUrl",(L==null?void 0:L.repoUrl)||"")},title:"Click to edit repository URL","aria-label":"Edit project repository URL","data-testid":"edit-repo-button",children:[L!=null&&L.repoUrl&&/^https?:\/\//i.test(L.repoUrl)?f.jsx("a",{className:A.repoLink,href:L.repoUrl,target:"_blank",rel:"noopener noreferrer",onClick:it=>it.stopPropagation(),children:L.repoUrl}):L!=null&&L.repoUrl?f.jsx("span",{children:L.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:At,onChange:it=>{ee.current=null,St(it.target.value);const re=it.target.value;L&&re!==L.defaultEnvironmentId&&B(L.id,{defaultEnvironmentId:re}),qt()},onBlur:it=>{if(ee.current==="defaultEnvironmentId"){ee.current=null;return}it.relatedTarget instanceof HTMLElement&&it.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(it=>f.jsx("option",{value:it.id,children:it.displayName},it.id))]}):f.jsxs("button",{type:"button",className:A.metaValueClickable,onClick:()=>jt("defaultEnvironmentId",(L==null?void 0:L.defaultEnvironmentId)||""),title:"Click to change default environment","aria-label":"Edit project default environment","data-testid":"edit-env-button",children:[kn?f.jsxs("span",{className:A.envRow,children:[f.jsx("span",{className:`${A.envDot} ${ay(kn.status)}`}),kn.displayName]}):f.jsx("span",{className:A.metaPlaceholder,children:(L==null?void 0:L.defaultEnvironmentId)||"No default environment"}),f.jsx("span",{className:A.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),L&&f.jsxs("div",{className:A.metaTimestamps,children:[f.jsxs("span",{className:A.metaTimestamp,children:["Created ",Sv(L.createdAt)]}),L.updatedAt&&L.updatedAt!==L.createdAt&&f.jsxs("span",{className:A.metaTimestamp,children:["· Updated ",Sv(L.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":U==="graph",className:`${A.tab} ${U==="graph"?A.active:""}`,onClick:()=>et("graph"),children:"Graph"}),f.jsx("button",{role:"tab","aria-selected":U==="tasks",className:`${A.tab} ${U==="tasks"?A.active:""}`,onClick:()=>et("tasks"),children:"Tasks"})]}),U==="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"})]}),U==="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"})]}),U==="graph"&&f.jsx(xE,{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:()=>{L&&(q(L.id),i({kind:"empty"})),Vt(!1)},onCancel:()=>Vt(!1)})]})}if(a.kind==="new_environment")return f.jsxs("div",{className:A.panelContainer,children:[f.jsx(Ga,{segments:at,onNavigate:Dt}),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:at,onNavigate:Dt}),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:at,onNavigate:Dt}),f.jsxs("div",{className:A.header,children:[f.jsxs("span",{className:A.headerTitle,children:[f.jsx("span",{"data-testid":"task-title",children:(P==null?void 0:P.title)||a.taskId}),P&&f.jsx("span",{className:A.taskStatusBadge,"data-testid":"task-status",children:P.status}),(P==null?void 0:P.branch)&&f.jsx("span",{className:A.taskBranch,children:P.branch}),ft&&f.jsx("span",{className:A.taskBlockedBadge,children:"blocked"})]}),P&&f.jsx(yD,{task:P,sessionId:K,isBlocked:ft,rejectNotes:dt,onRejectNotesChange:bt,onStart:()=>b(P.id),onStop:()=>K&&v(K),onApprove:()=>S(P.id),onReject:()=>{x(P.id,dt),bt("")},onDelete:lt})]}),f.jsxs("div",{className:A.tabBar,role:"tablist","aria-label":"Task view",children:[f.jsx("button",{role:"tab","aria-selected":Q==="overview",className:`${A.tab} ${Q==="overview"?A.active:""}`,onClick:()=>nt("overview"),children:"Overview"}),f.jsx("button",{role:"tab","aria-selected":Q==="stream",className:`${A.tab} ${Q==="stream"?A.active:""}`,onClick:()=>nt("stream"),children:"Stream"}),f.jsx("button",{role:"tab","aria-selected":Q==="findings",className:`${A.tab} ${Q==="findings"?A.active:""}`,onClick:()=>nt("findings"),children:"Findings"})]}),f.jsxs(vi,{mode:"wait",children:[Q==="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:P?f.jsx(vD,{task:P,tasksById:Mt,environments:d,projects:k}):f.jsx("div",{className:A.waitingMessage,children:"No additional details"})},"overview"),Q==="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(bD,{taskSessions:Y,selectedSessionId:K,onSelect:L=>{X(L)}}),f.jsxs("div",{ref:W,className:A.eventScroll,children:[!K&&P&&f.jsxs("div",{className:A.emptyCta,children:[f.jsx("button",{className:A.ctaButton,onClick:()=>b(P.id),children:"Start Task"}),f.jsx("div",{className:A.ctaDescription,children:"Click to begin agent execution"})]}),K&&Nt.length===0&&f.jsx("div",{className:A.waitingMessage,children:"Waiting for events..."}),f.jsx(ny,{eventsDropped:r}),Nt.map((L,Ee)=>f.jsx(J0,{event:L},`${L.sessionId}-${L.timestamp}-${Ee}`))]})]},"stream"),Q==="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(BA,{projectId:Re}):f.jsx("div",{className:A.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),P&&f.jsx(ur,{isOpen:zt,title:"Delete Task?",description:`"${P.title}" will be permanently removed.`,onConfirm:ut,onCancel:()=>J(!1)})]});if(!K)return f.jsx("div",{className:A.emptyState,children:"No session selected"});const It=($==null?void 0:$.status)==="running"||($==null?void 0:$.status)==="waiting_input";return f.jsxs("div",{className:A.panelContainer,children:[f.jsx(Ga,{segments:at,onNavigate:Dt}),f.jsx(hD,{sessionId:K,session:$,isActive:It,onKill:v}),f.jsx(mD,{sessionEvents:Nt,session:$,eventsDropped:r,scrollRef:W})]})}const _D="_toast_1bnyi_1",TD="_success_1bnyi_17",xD="_icon_1bnyi_21",jD="_error_1bnyi_24",AD="_warning_1bnyi_31",ND="_info_1bnyi_37",ED="_message_1bnyi_52",CD="_close_1bnyi_59",pl={toast:_D,success:TD,icon:xD,error:jD,warning:AD,info:ND,message:ED,close:CD},DD={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function wD({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:DD[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 kD="_container_qqse2_1",MD={container:kD};function RD(){const{toasts:a,dismissToast:i}=ud();return f.jsx("div",{className:MD.container,"data-testid":"toast-container",children:f.jsx(vi,{children:a.map(l=>f.jsx(wD,{toast:l,onDismiss:i},l.id))})})}const OD="_root_cdda9_1",BD="_body_cdda9_7",zD="_main_cdda9_13",qu={root:OD,body:BD,main:zD},UD=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function VD(){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(iS,{setViewMode:i}),f.jsxs("div",{className:qu.body,children:[f.jsx(nA,{viewMode:a,setViewMode:i}),f.jsxs("div",{className:qu.main,children:[f.jsx(SD,{viewMode:a,setViewMode:i},a.kind==="task"?a.taskId:a.kind==="session"?a.sessionId:a.kind),f.jsx(_A,{viewMode:a,setViewMode:i})]})]}),f.jsx(RD,{})]})}function LD(){const a=UD?Pb:Hb;return f.jsx(Jb,{children:f.jsx(a,{children:f.jsx(VD,{})})})}Cb.createRoot(document.getElementById("root")).render(f.jsx(_.StrictMode,{children:f.jsx(LD,{})}));
|