@grackle-ai/web 0.35.1 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import{r as Q_,a as S,j as h,v as J_,b as W_,t as _r,i as ex,f as tx,M as Tf,c as Ef}from"./markdown-gcy1Jmzi.js";import{r as nx,d as dy,H as fy,P as hy,i as ax,B as sx,a as ix,C as lx,M as ox}from"./dagview-EHk2VaeR.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function i(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerPolicy&&(u.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?u.credentials="include":r.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(r){if(r.ep)return;r.ep=!0;const u=i(r);fetch(r.href,u)}})();var bd={exports:{}},Ml={},Sd={exports:{}},_d={};/**
|
|
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 py;function rx(){return py||(py=1,(function(n){function a(U,K){var ee=U.length;U.push(K);e:for(;0<ee;){var we=ee-1>>>1,xe=U[we];if(0<r(xe,K))U[we]=K,U[ee]=xe,ee=we;else break e}}function i(U){return U.length===0?null:U[0]}function o(U){if(U.length===0)return null;var K=U[0],ee=U.pop();if(ee!==K){U[0]=ee;e:for(var we=0,xe=U.length,Ue=xe>>>1;we<Ue;){var Ee=2*(we+1)-1,ye=U[Ee],Te=Ee+1,J=U[Te];if(0>r(ye,ee))Te<xe&&0>r(J,ye)?(U[we]=J,U[Te]=ee,we=Te):(U[we]=ye,U[Ee]=ee,we=Ee);else if(Te<xe&&0>r(J,ee))U[we]=J,U[Te]=ee,we=Te;else break e}}return K}function r(U,K){var ee=U.sortIndex-K.sortIndex;return ee!==0?ee:U.id-K.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,p=d.now();n.unstable_now=function(){return d.now()-p}}var m=[],g=[],y=1,v=null,_=3,T=!1,E=!1,A=!1,j=!1,C=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function G(U){for(var K=i(g);K!==null;){if(K.callback===null)o(g);else if(K.startTime<=U)o(g),K.sortIndex=K.expirationTime,a(m,K);else break;K=i(g)}}function V(U){if(A=!1,G(U),!E)if(i(m)!==null)E=!0,X||(X=!0,ne());else{var K=i(g);K!==null&&P(V,K.startTime-U)}}var X=!1,Q=-1,I=5,te=-1;function se(){return j?!0:!(n.unstable_now()-te<I)}function O(){if(j=!1,X){var U=n.unstable_now();te=U;var K=!0;try{e:{E=!1,A&&(A=!1,w(Q),Q=-1),T=!0;var ee=_;try{t:{for(G(U),v=i(m);v!==null&&!(v.expirationTime>U&&se());){var we=v.callback;if(typeof we=="function"){v.callback=null,_=v.priorityLevel;var xe=we(v.expirationTime<=U);if(U=n.unstable_now(),typeof xe=="function"){v.callback=xe,G(U),K=!0;break t}v===i(m)&&o(m),G(U)}else o(m);v=i(m)}if(v!==null)K=!0;else{var Ue=i(g);Ue!==null&&P(V,Ue.startTime-U),K=!1}}break e}finally{v=null,_=ee,T=!1}K=void 0}}finally{K?ne():X=!1}}}var ne;if(typeof M=="function")ne=function(){M(O)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,he=W.port2;W.port1.onmessage=O,ne=function(){he.postMessage(null)}}else ne=function(){C(O,0)};function P(U,K){Q=C(function(){U(n.unstable_now())},K)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(U){switch(_){case 1:case 2:case 3:var K=3;break;default:K=_}var ee=_;_=K;try{return U()}finally{_=ee}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(U,K){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ee=_;_=U;try{return K()}finally{_=ee}},n.unstable_scheduleCallback=function(U,K,ee){var we=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?we+ee:we):ee=we,U){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=ee+xe,U={id:y++,callback:K,priorityLevel:U,startTime:ee,expirationTime:xe,sortIndex:-1},ee>we?(U.sortIndex=ee,a(g,U),i(m)===null&&U===i(g)&&(A?(w(Q),Q=-1):A=!0,P(V,ee-we))):(U.sortIndex=xe,a(m,U),E||T||(E=!0,X||(X=!0,ne()))),U},n.unstable_shouldYield=se,n.unstable_wrapCallback=function(U){var K=_;return function(){var ee=_;_=K;try{return U.apply(this,arguments)}finally{_=ee}}}})(_d)),_d}var my;function cx(){return my||(my=1,Sd.exports=rx()),Sd.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 gy;function ux(){if(gy)return Ml;gy=1;var n=cx(),a=Q_(),i=nx();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(u(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(o(188));return t!==e?null:e}for(var s=e,l=t;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(l=c.return,l!==null){s=l;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return m(c),e;if(f===l)return m(c),t;f=f.sibling}throw Error(o(188))}if(s.return!==l.return)s=c,l=f;else{for(var b=!1,x=c.child;x;){if(x===s){b=!0,s=c,l=f;break}if(x===l){b=!0,l=c,s=f;break}x=x.sibling}if(!b){for(x=f.child;x;){if(x===s){b=!0,s=f,l=c;break}if(x===l){b=!0,l=f,s=c;break}x=x.sibling}if(!b)throw Error(o(189))}}if(s.alternate!==l)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,_=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),M=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),O=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=O&&e[O]||e["@@iterator"],typeof e=="function"?e:null)}var W=Symbol.for("react.client.reference");function he(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===W?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case C:return"Profiler";case j:return"StrictMode";case V:return"Suspense";case X:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case M:return e.displayName||"Context";case w:return(e._context.displayName||"Context")+".Consumer";case G:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q:return t=e.displayName||null,t!==null?t:he(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return he(e(t))}catch{}}return null}var P=Array.isArray,U=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},we=[],xe=-1;function Ue(e){return{current:e}}function Ee(e){0>xe||(e.current=we[xe],we[xe]=null,xe--)}function ye(e,t){xe++,we[xe]=e.current,e.current=t}var Te=Ue(null),J=Ue(null),F=Ue(null),me=Ue(null);function Ae(e,t){switch(ye(F,t),ye(J,e),ye(Te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Og(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Og(t),e=Bg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ee(Te),ye(Te,e)}function Ie(){Ee(Te),Ee(J),Ee(F)}function pt(e){e.memoizedState!==null&&ye(me,e);var t=Te.current,s=Bg(t,e.type);t!==s&&(ye(J,e),ye(Te,s))}function xt(e){J.current===e&&(Ee(Te),Ee(J)),me.current===e&&(Ee(me),Nl._currentValue=ee)}var Lt,Xe;function qe(e){if(Lt===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);Lt=t&&t[1]||"",Xe=-1<s.stack.indexOf(`
|
|
18
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
+
`+Lt+e+Xe}var Be=!1;function Ln(e,t){if(!e||Be)return"";Be=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(H){var z=H}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(H){z=H}e.call(Y.prototype)}}else{try{throw Error()}catch(H){z=H}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(H){if(H&&z&&typeof H.stack=="string")return[H.stack,z.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),b=f[0],x=f[1];if(b&&x){var N=b.split(`
|
|
20
|
+
`),L=x.split(`
|
|
21
|
+
`);for(c=l=0;l<N.length&&!N[l].includes("DetermineComponentFrameRoot");)l++;for(;c<L.length&&!L[c].includes("DetermineComponentFrameRoot");)c++;if(l===N.length||c===L.length)for(l=N.length-1,c=L.length-1;1<=l&&0<=c&&N[l]!==L[c];)c--;for(;1<=l&&0<=c;l--,c--)if(N[l]!==L[c]){if(l!==1||c!==1)do if(l--,c--,0>c||N[l]!==L[c]){var q=`
|
|
22
|
+
`+N[l].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=l&&0<=c);break}}}finally{Be=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?qe(s):""}function Un(e,t){switch(e.tag){case 26:case 27:case 5:return qe(e.type);case 16:return qe("Lazy");case 13:return e.child!==t&&t!==null?qe("Suspense Fallback"):qe("Suspense");case 19:return qe("SuspenseList");case 0:case 15:return Ln(e.type,!1);case 11:return Ln(e.type.render,!1);case 1:return Ln(e.type,!0);case 31:return qe("Activity");default:return""}}function ea(e){try{var t="",s=null;do t+=Un(e,s),s=e,e=e.return;while(e);return t}catch(l){return`
|
|
23
|
+
Error generating stack: `+l.message+`
|
|
24
|
+
`+l.stack}}var en=Object.prototype.hasOwnProperty,ta=n.unstable_scheduleCallback,Z=n.unstable_cancelCallback,ae=n.unstable_shouldYield,oe=n.unstable_requestPaint,ue=n.unstable_now,be=n.unstable_getCurrentPriorityLevel,Se=n.unstable_ImmediatePriority,Qe=n.unstable_UserBlockingPriority,Me=n.unstable_NormalPriority,lt=n.unstable_LowPriority,Dt=n.unstable_IdlePriority,Tt=n.log,Rt=n.unstable_setDisableYieldValue,ot=null,Et=null;function cn(e){if(typeof Tt=="function"&&Rt(e),Et&&typeof Et.setStrictMode=="function")try{Et.setStrictMode(ot,e)}catch{}}var mt=Math.clz32?Math.clz32:Hi,Ft=Math.log,$t=Math.LN2;function Hi(e){return e>>>=0,e===0?32:31-(Ft(e)/$t|0)|0}var na=256,us=262144,We=4194304;function je(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function gt(e,t,s){var l=e.pendingLanes;if(l===0)return 0;var c=0,f=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var x=l&134217727;return x!==0?(l=x&~f,l!==0?c=je(l):(b&=x,b!==0?c=je(b):s||(s=x&~e,s!==0&&(c=je(s))))):(x=l&~f,x!==0?c=je(x):b!==0?c=je(b):s||(s=l&~e,s!==0&&(c=je(s)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,s=t&-t,f>=s||f===32&&(s&4194048)!==0)?t:c}function ie(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ut(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function aa(){var e=We;return We<<=1,(We&62914560)===0&&(We=4194304),e}function oc(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function Pi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function V1(e,t,s,l,c,f){var b=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var x=e.entanglements,N=e.expirationTimes,L=e.hiddenUpdates;for(s=b&~s;0<s;){var q=31-mt(s),Y=1<<q;x[q]=0,N[q]=-1;var z=L[q];if(z!==null)for(L[q]=null,q=0;q<z.length;q++){var H=z[q];H!==null&&(H.lane&=-536870913)}s&=~Y}l!==0&&gh(e,l,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(b&~t))}function gh(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-mt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|s&261930}function yh(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var l=31-mt(s),c=1<<l;c&t|e[l]&t&&(e[l]|=t),s&=~c}}function vh(e,t){var s=t&-t;return s=(s&42)!==0?1:rc(s),(s&(e.suspendedLanes|t))!==0?0:s}function rc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function cc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function bh(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:sy(e.type))}function Sh(e,t){var s=K.p;try{return K.p=e,t()}finally{K.p=s}}var wa=Math.random().toString(36).slice(2),zt="__reactFiber$"+wa,tn="__reactProps$"+wa,Vs="__reactContainer$"+wa,uc="__reactEvents$"+wa,I1="__reactListeners$"+wa,H1="__reactHandles$"+wa,_h="__reactResources$"+wa,Gi="__reactMarker$"+wa;function dc(e){delete e[zt],delete e[tn],delete e[uc],delete e[I1],delete e[H1]}function Is(e){var t=e[zt];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Vs]||s[zt]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=Pg(e);e!==null;){if(s=e[zt])return s;e=Pg(e)}return t}e=s,s=e.parentNode}return null}function Hs(e){if(e=e[zt]||e[Vs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function qi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Ps(e){var t=e[_h];return t||(t=e[_h]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ot(e){e[Gi]=!0}var xh=new Set,Th={};function ds(e,t){Gs(e,t),Gs(e+"Capture",t)}function Gs(e,t){for(Th[e]=t,e=0;e<t.length;e++)xh.add(t[e])}var P1=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]*$"),Eh={},Ch={};function G1(e){return en.call(Ch,e)?!0:en.call(Eh,e)?!1:P1.test(e)?Ch[e]=!0:(Eh[e]=!0,!1)}function ro(e,t,s){if(G1(t))if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+s)}}function co(e,t,s){if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+s)}}function sa(e,t,s,l){if(l===null)e.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(t,s,""+l)}}function _n(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ah(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function q1(e,t,s){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,f=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(b){s=""+b,f.call(this,b)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return s},setValue:function(b){s=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fc(e){if(!e._valueTracker){var t=Ah(e)?"checked":"value";e._valueTracker=q1(e,t,""+e[t])}}function jh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),l="";return e&&(l=Ah(e)?e.checked?"true":"false":e.value),e=l,e!==s?(t.setValue(e),!0):!1}function uo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var F1=/[\n"\\]/g;function xn(e){return e.replace(F1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function hc(e,t,s,l,c,f,b,x){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+_n(t)):e.value!==""+_n(t)&&(e.value=""+_n(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?pc(e,b,_n(t)):s!=null?pc(e,b,_n(s)):l!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+_n(x):e.removeAttribute("name")}function Nh(e,t,s,l,c,f,b,x){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||s!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){fc(e);return}s=s!=null?""+_n(s):"",t=t!=null?""+_n(t):s,x||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=x?e.checked:!!l,e.defaultChecked=!!l,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),fc(e)}function pc(e,t,s){t==="number"&&uo(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function qs(e,t,s,l){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&l&&(e[s].defaultSelected=!0)}else{for(s=""+_n(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function wh(e,t,s){if(t!=null&&(t=""+_n(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+_n(s):""}function Dh(e,t,s,l){if(t==null){if(l!=null){if(s!=null)throw Error(o(92));if(P(l)){if(1<l.length)throw Error(o(93));l=l[0]}s=l}s==null&&(s=""),t=s}s=_n(t),e.defaultValue=s,l=e.textContent,l===s&&l!==""&&l!==null&&(e.value=l),fc(e)}function Fs(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var $1=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 kh(e,t,s){var l=t.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,s):typeof s!="number"||s===0||$1.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function Mh(e,t,s){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,s!=null){for(var l in s)!s.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&s[c]!==l&&kh(e,c,l)}else for(var f in t)t.hasOwnProperty(f)&&kh(e,f,t[f])}function mc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Y1=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"]]),K1=/^[\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 fo(e){return K1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ia(){}var gc=null;function yc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $s=null,Ys=null;function Rh(e){var t=Hs(e);if(t&&(e=t.stateNode)){var s=e[tn]||null;e:switch(e=t.stateNode,t.type){case"input":if(hc(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+xn(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var l=s[t];if(l!==e&&l.form===e.form){var c=l[tn]||null;if(!c)throw Error(o(90));hc(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<s.length;t++)l=s[t],l.form===e.form&&jh(l)}break e;case"textarea":wh(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&qs(e,!!s.multiple,t,!1)}}}var vc=!1;function Oh(e,t,s){if(vc)return e(t,s);vc=!0;try{var l=e(t);return l}finally{if(vc=!1,($s!==null||Ys!==null)&&(Wo(),$s&&(t=$s,e=Ys,Ys=$s=null,Rh(t),e)))for(t=0;t<e.length;t++)Rh(e[t])}}function Fi(e,t){var s=e.stateNode;if(s===null)return null;var l=s[tn]||null;if(l===null)return null;s=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,t,typeof s));return s}var la=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bc=!1;if(la)try{var $i={};Object.defineProperty($i,"passive",{get:function(){bc=!0}}),window.addEventListener("test",$i,$i),window.removeEventListener("test",$i,$i)}catch{bc=!1}var Da=null,Sc=null,ho=null;function Bh(){if(ho)return ho;var e,t=Sc,s=t.length,l,c="value"in Da?Da.value:Da.textContent,f=c.length;for(e=0;e<s&&t[e]===c[e];e++);var b=s-e;for(l=1;l<=b&&t[s-l]===c[f-l];l++);return ho=c.slice(e,1<l?1-l:void 0)}function po(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function mo(){return!0}function Lh(){return!1}function nn(e){function t(s,l,c,f,b){this._reactName=s,this._targetInst=c,this.type=l,this.nativeEvent=f,this.target=b,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(s=e[x],this[x]=s?s(f):f[x]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?mo:Lh,this.isPropagationStopped=Lh,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=mo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=mo)},persist:function(){},isPersistent:mo}),t}var fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},go=nn(fs),Yi=v({},fs,{view:0,detail:0}),Z1=nn(Yi),_c,xc,Ki,yo=v({},Yi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ec,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ki&&(Ki&&e.type==="mousemove"?(_c=e.screenX-Ki.screenX,xc=e.screenY-Ki.screenY):xc=_c=0,Ki=e),_c)},movementY:function(e){return"movementY"in e?e.movementY:xc}}),Uh=nn(yo),X1=v({},yo,{dataTransfer:0}),Q1=nn(X1),J1=v({},Yi,{relatedTarget:0}),Tc=nn(J1),W1=v({},fs,{animationName:0,elapsedTime:0,pseudoElement:0}),eS=nn(W1),tS=v({},fs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nS=nn(tS),aS=v({},fs,{data:0}),zh=nn(aS),sS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iS={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"},lS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function oS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lS[e])?!!t[e]:!1}function Ec(){return oS}var rS=v({},Yi,{key:function(e){if(e.key){var t=sS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=po(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?iS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ec,charCode:function(e){return e.type==="keypress"?po(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?po(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),cS=nn(rS),uS=v({},yo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vh=nn(uS),dS=v({},Yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ec}),fS=nn(dS),hS=v({},fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),pS=nn(hS),mS=v({},yo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),gS=nn(mS),yS=v({},fs,{newState:0,oldState:0}),vS=nn(yS),bS=[9,13,27,32],Cc=la&&"CompositionEvent"in window,Zi=null;la&&"documentMode"in document&&(Zi=document.documentMode);var SS=la&&"TextEvent"in window&&!Zi,Ih=la&&(!Cc||Zi&&8<Zi&&11>=Zi),Hh=" ",Ph=!1;function Gh(e,t){switch(e){case"keyup":return bS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ks=!1;function _S(e,t){switch(e){case"compositionend":return qh(t);case"keypress":return t.which!==32?null:(Ph=!0,Hh);case"textInput":return e=t.data,e===Hh&&Ph?null:e;default:return null}}function xS(e,t){if(Ks)return e==="compositionend"||!Cc&&Gh(e,t)?(e=Bh(),ho=Sc=Da=null,Ks=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ih&&t.locale!=="ko"?null:t.data;default:return null}}var TS={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 Fh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!TS[e.type]:t==="textarea"}function $h(e,t,s,l){$s?Ys?Ys.push(l):Ys=[l]:$s=l,t=lr(t,"onChange"),0<t.length&&(s=new go("onChange","change",null,s,l),e.push({event:s,listeners:t}))}var Xi=null,Qi=null;function ES(e){Ng(e,0)}function vo(e){var t=qi(e);if(jh(t))return e}function Yh(e,t){if(e==="change")return t}var Kh=!1;if(la){var Ac;if(la){var jc="oninput"in document;if(!jc){var Zh=document.createElement("div");Zh.setAttribute("oninput","return;"),jc=typeof Zh.oninput=="function"}Ac=jc}else Ac=!1;Kh=Ac&&(!document.documentMode||9<document.documentMode)}function Xh(){Xi&&(Xi.detachEvent("onpropertychange",Qh),Qi=Xi=null)}function Qh(e){if(e.propertyName==="value"&&vo(Qi)){var t=[];$h(t,Qi,e,yc(e)),Oh(ES,t)}}function CS(e,t,s){e==="focusin"?(Xh(),Xi=t,Qi=s,Xi.attachEvent("onpropertychange",Qh)):e==="focusout"&&Xh()}function AS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vo(Qi)}function jS(e,t){if(e==="click")return vo(t)}function NS(e,t){if(e==="input"||e==="change")return vo(t)}function wS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var un=typeof Object.is=="function"?Object.is:wS;function Ji(e,t){if(un(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),l=Object.keys(t);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var c=s[l];if(!en.call(t,c)||!un(e[c],t[c]))return!1}return!0}function Jh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wh(e,t){var s=Jh(e);e=0;for(var l;s;){if(s.nodeType===3){if(l=e+s.textContent.length,e<=t&&l>=t)return{node:s,offset:t-e};e=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Jh(s)}}function ep(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ep(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=uo(e.document);t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=uo(e.document)}return t}function Nc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var DS=la&&"documentMode"in document&&11>=document.documentMode,Zs=null,wc=null,Wi=null,Dc=!1;function np(e,t,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Dc||Zs==null||Zs!==uo(l)||(l=Zs,"selectionStart"in l&&Nc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Wi&&Ji(Wi,l)||(Wi=l,l=lr(wc,"onSelect"),0<l.length&&(t=new go("onSelect","select",null,t,s),e.push({event:t,listeners:l}),t.target=Zs)))}function hs(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Xs={animationend:hs("Animation","AnimationEnd"),animationiteration:hs("Animation","AnimationIteration"),animationstart:hs("Animation","AnimationStart"),transitionrun:hs("Transition","TransitionRun"),transitionstart:hs("Transition","TransitionStart"),transitioncancel:hs("Transition","TransitionCancel"),transitionend:hs("Transition","TransitionEnd")},kc={},ap={};la&&(ap=document.createElement("div").style,"AnimationEvent"in window||(delete Xs.animationend.animation,delete Xs.animationiteration.animation,delete Xs.animationstart.animation),"TransitionEvent"in window||delete Xs.transitionend.transition);function ps(e){if(kc[e])return kc[e];if(!Xs[e])return e;var t=Xs[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in ap)return kc[e]=t[s];return e}var sp=ps("animationend"),ip=ps("animationiteration"),lp=ps("animationstart"),kS=ps("transitionrun"),MS=ps("transitionstart"),RS=ps("transitioncancel"),op=ps("transitionend"),rp=new Map,Mc="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(" ");Mc.push("scrollEnd");function zn(e,t){rp.set(e,t),ds(t,[e])}var bo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Tn=[],Qs=0,Rc=0;function So(){for(var e=Qs,t=Rc=Qs=0;t<e;){var s=Tn[t];Tn[t++]=null;var l=Tn[t];Tn[t++]=null;var c=Tn[t];Tn[t++]=null;var f=Tn[t];if(Tn[t++]=null,l!==null&&c!==null){var b=l.pending;b===null?c.next=c:(c.next=b.next,b.next=c),l.pending=c}f!==0&&cp(s,c,f)}}function _o(e,t,s,l){Tn[Qs++]=e,Tn[Qs++]=t,Tn[Qs++]=s,Tn[Qs++]=l,Rc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Oc(e,t,s,l){return _o(e,t,s,l),xo(e)}function ms(e,t){return _o(e,null,null,t),xo(e)}function cp(e,t,s){e.lanes|=s;var l=e.alternate;l!==null&&(l.lanes|=s);for(var c=!1,f=e.return;f!==null;)f.childLanes|=s,l=f.alternate,l!==null&&(l.childLanes|=s),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-mt(s),e=f.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=s|536870912),f):null}function xo(e){if(50<_l)throw _l=0,Gu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Js={};function OS(e,t,s,l){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dn(e,t,s,l){return new OS(e,t,s,l)}function Bc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oa(e,t){var s=e.alternate;return s===null?(s=dn(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function up(e,t){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,t=s.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function To(e,t,s,l,c,f){var b=0;if(l=e,typeof e=="function")Bc(e)&&(b=1);else if(typeof e=="string")b=V_(e,s,Te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=dn(31,s,t,c),e.elementType=te,e.lanes=f,e;case A:return gs(s.children,c,f,t);case j:b=8,c|=24;break;case C:return e=dn(12,s,t,c|2),e.elementType=C,e.lanes=f,e;case V:return e=dn(13,s,t,c),e.elementType=V,e.lanes=f,e;case X:return e=dn(19,s,t,c),e.elementType=X,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:b=10;break e;case w:b=9;break e;case G:b=11;break e;case Q:b=14;break e;case I:b=16,l=null;break e}b=29,s=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=dn(b,s,t,c),t.elementType=e,t.type=l,t.lanes=f,t}function gs(e,t,s,l){return e=dn(7,e,l,t),e.lanes=s,e}function Lc(e,t,s){return e=dn(6,e,null,t),e.lanes=s,e}function dp(e){var t=dn(18,null,null,0);return t.stateNode=e,t}function Uc(e,t,s){return t=dn(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var fp=new WeakMap;function En(e,t){if(typeof e=="object"&&e!==null){var s=fp.get(e);return s!==void 0?s:(t={value:e,source:t,stack:ea(t)},fp.set(e,t),t)}return{value:e,source:t,stack:ea(t)}}var Ws=[],ei=0,Eo=null,el=0,Cn=[],An=0,ka=null,Gn=1,qn="";function ra(e,t){Ws[ei++]=el,Ws[ei++]=Eo,Eo=e,el=t}function hp(e,t,s){Cn[An++]=Gn,Cn[An++]=qn,Cn[An++]=ka,ka=e;var l=Gn;e=qn;var c=32-mt(l)-1;l&=~(1<<c),s+=1;var f=32-mt(t)+c;if(30<f){var b=c-c%5;f=(l&(1<<b)-1).toString(32),l>>=b,c-=b,Gn=1<<32-mt(t)+c|s<<c|l,qn=f+e}else Gn=1<<f|s<<c|l,qn=e}function zc(e){e.return!==null&&(ra(e,1),hp(e,1,0))}function Vc(e){for(;e===Eo;)Eo=Ws[--ei],Ws[ei]=null,el=Ws[--ei],Ws[ei]=null;for(;e===ka;)ka=Cn[--An],Cn[An]=null,qn=Cn[--An],Cn[An]=null,Gn=Cn[--An],Cn[An]=null}function pp(e,t){Cn[An++]=Gn,Cn[An++]=qn,Cn[An++]=ka,Gn=t.id,qn=t.overflow,ka=e}var Vt=null,et=null,Le=!1,Ma=null,jn=!1,Ic=Error(o(519));function Ra(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tl(En(t,e)),Ic}function mp(e){var t=e.stateNode,s=e.type,l=e.memoizedProps;switch(t[zt]=e,t[tn]=l,s){case"dialog":ke("cancel",t),ke("close",t);break;case"iframe":case"object":case"embed":ke("load",t);break;case"video":case"audio":for(s=0;s<Tl.length;s++)ke(Tl[s],t);break;case"source":ke("error",t);break;case"img":case"image":case"link":ke("error",t),ke("load",t);break;case"details":ke("toggle",t);break;case"input":ke("invalid",t),Nh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ke("invalid",t);break;case"textarea":ke("invalid",t),Dh(t,l.value,l.defaultValue,l.children)}s=l.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||t.textContent===""+s||l.suppressHydrationWarning===!0||Mg(t.textContent,s)?(l.popover!=null&&(ke("beforetoggle",t),ke("toggle",t)),l.onScroll!=null&&ke("scroll",t),l.onScrollEnd!=null&&ke("scrollend",t),l.onClick!=null&&(t.onclick=ia),t=!0):t=!1,t||Ra(e,!0)}function gp(e){for(Vt=e.return;Vt;)switch(Vt.tag){case 5:case 31:case 13:jn=!1;return;case 27:case 3:jn=!0;return;default:Vt=Vt.return}}function ti(e){if(e!==Vt)return!1;if(!Le)return gp(e),Le=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||sd(e.type,e.memoizedProps)),s=!s),s&&et&&Ra(e),gp(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));et=Hg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));et=Hg(e)}else t===27?(t=et,Ya(e.type)?(e=cd,cd=null,et=e):et=t):et=Vt?wn(e.stateNode.nextSibling):null;return!0}function ys(){et=Vt=null,Le=!1}function Hc(){var e=Ma;return e!==null&&(on===null?on=e:on.push.apply(on,e),Ma=null),e}function tl(e){Ma===null?Ma=[e]:Ma.push(e)}var Pc=Ue(null),vs=null,ca=null;function Oa(e,t,s){ye(Pc,t._currentValue),t._currentValue=s}function ua(e){e._currentValue=Pc.current,Ee(Pc)}function Gc(e,t,s){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===s)break;e=e.return}}function qc(e,t,s,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var b=c.child;f=f.firstContext;e:for(;f!==null;){var x=f;f=c;for(var N=0;N<t.length;N++)if(x.context===t[N]){f.lanes|=s,x=f.alternate,x!==null&&(x.lanes|=s),Gc(f.return,s,e),l||(b=null);break e}f=x.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(o(341));b.lanes|=s,f=b.alternate,f!==null&&(f.lanes|=s),Gc(b,s,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function ni(e,t,s,l){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(o(387));if(b=b.memoizedProps,b!==null){var x=c.type;un(c.pendingProps.value,b.value)||(e!==null?e.push(x):e=[x])}}else if(c===me.current){if(b=c.alternate,b===null)throw Error(o(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Nl):e=[Nl])}c=c.return}e!==null&&qc(t,e,s,l),t.flags|=262144}function Co(e){for(e=e.firstContext;e!==null;){if(!un(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function bs(e){vs=e,ca=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function It(e){return yp(vs,e)}function Ao(e,t){return vs===null&&bs(e),yp(e,t)}function yp(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},ca===null){if(e===null)throw Error(o(308));ca=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ca=ca.next=t;return s}var BS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(s,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(s){return s()})}},LS=n.unstable_scheduleCallback,US=n.unstable_NormalPriority,Ct={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fc(){return{controller:new BS,data:new Map,refCount:0}}function nl(e){e.refCount--,e.refCount===0&&LS(US,function(){e.controller.abort()})}var al=null,$c=0,ai=0,si=null;function zS(e,t){if(al===null){var s=al=[];$c=0,ai=Zu(),si={status:"pending",value:void 0,then:function(l){s.push(l)}}}return $c++,t.then(vp,vp),t}function vp(){if(--$c===0&&al!==null){si!==null&&(si.status="fulfilled");var e=al;al=null,ai=0,si=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function VS(e,t){var s=[],l={status:"pending",value:null,reason:null,then:function(c){s.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<s.length;c++)(0,s[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<s.length;c++)(0,s[c])(void 0)}),l}var bp=U.S;U.S=function(e,t){ng=ue(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&zS(e,t),bp!==null&&bp(e,t)};var Ss=Ue(null);function Yc(){var e=Ss.current;return e!==null?e:Je.pooledCache}function jo(e,t){t===null?ye(Ss,Ss.current):ye(Ss,t.pool)}function Sp(){var e=Yc();return e===null?null:{parent:Ct._currentValue,pool:e}}var ii=Error(o(460)),Kc=Error(o(474)),No=Error(o(542)),wo={then:function(){}};function _p(e){return e=e.status,e==="fulfilled"||e==="rejected"}function xp(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(ia,ia),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ep(e),e;default:if(typeof t.status=="string")t.then(ia,ia);else{if(e=Je,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ep(e),e}throw xs=t,ii}}function _s(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(xs=s,ii):s}}var xs=null;function Tp(){if(xs===null)throw Error(o(459));var e=xs;return xs=null,e}function Ep(e){if(e===ii||e===No)throw Error(o(483))}var li=null,sl=0;function Do(e){var t=sl;return sl+=1,li===null&&(li=[]),xp(li,e,t)}function il(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ko(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Cp(e){function t(R,D){if(e){var B=R.deletions;B===null?(R.deletions=[D],R.flags|=16):B.push(D)}}function s(R,D){if(!e)return null;for(;D!==null;)t(R,D),D=D.sibling;return null}function l(R){for(var D=new Map;R!==null;)R.key!==null?D.set(R.key,R):D.set(R.index,R),R=R.sibling;return D}function c(R,D){return R=oa(R,D),R.index=0,R.sibling=null,R}function f(R,D,B){return R.index=B,e?(B=R.alternate,B!==null?(B=B.index,B<D?(R.flags|=67108866,D):B):(R.flags|=67108866,D)):(R.flags|=1048576,D)}function b(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function x(R,D,B,$){return D===null||D.tag!==6?(D=Lc(B,R.mode,$),D.return=R,D):(D=c(D,B),D.return=R,D)}function N(R,D,B,$){var fe=B.type;return fe===A?q(R,D,B.props.children,$,B.key):D!==null&&(D.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===I&&_s(fe)===D.type)?(D=c(D,B.props),il(D,B),D.return=R,D):(D=To(B.type,B.key,B.props,null,R.mode,$),il(D,B),D.return=R,D)}function L(R,D,B,$){return D===null||D.tag!==4||D.stateNode.containerInfo!==B.containerInfo||D.stateNode.implementation!==B.implementation?(D=Uc(B,R.mode,$),D.return=R,D):(D=c(D,B.children||[]),D.return=R,D)}function q(R,D,B,$,fe){return D===null||D.tag!==7?(D=gs(B,R.mode,$,fe),D.return=R,D):(D=c(D,B),D.return=R,D)}function Y(R,D,B){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=Lc(""+D,R.mode,B),D.return=R,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case T:return B=To(D.type,D.key,D.props,null,R.mode,B),il(B,D),B.return=R,B;case E:return D=Uc(D,R.mode,B),D.return=R,D;case I:return D=_s(D),Y(R,D,B)}if(P(D)||ne(D))return D=gs(D,R.mode,B,null),D.return=R,D;if(typeof D.then=="function")return Y(R,Do(D),B);if(D.$$typeof===M)return Y(R,Ao(R,D),B);ko(R,D)}return null}function z(R,D,B,$){var fe=D!==null?D.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return fe!==null?null:x(R,D,""+B,$);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case T:return B.key===fe?N(R,D,B,$):null;case E:return B.key===fe?L(R,D,B,$):null;case I:return B=_s(B),z(R,D,B,$)}if(P(B)||ne(B))return fe!==null?null:q(R,D,B,$,null);if(typeof B.then=="function")return z(R,D,Do(B),$);if(B.$$typeof===M)return z(R,D,Ao(R,B),$);ko(R,B)}return null}function H(R,D,B,$,fe){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return R=R.get(B)||null,x(D,R,""+$,fe);if(typeof $=="object"&&$!==null){switch($.$$typeof){case T:return R=R.get($.key===null?B:$.key)||null,N(D,R,$,fe);case E:return R=R.get($.key===null?B:$.key)||null,L(D,R,$,fe);case I:return $=_s($),H(R,D,B,$,fe)}if(P($)||ne($))return R=R.get(B)||null,q(D,R,$,fe,null);if(typeof $.then=="function")return H(R,D,B,Do($),fe);if($.$$typeof===M)return H(R,D,B,Ao(D,$),fe);ko(D,$)}return null}function le(R,D,B,$){for(var fe=null,ze=null,de=D,Ne=D=0,Oe=null;de!==null&&Ne<B.length;Ne++){de.index>Ne?(Oe=de,de=null):Oe=de.sibling;var Ve=z(R,de,B[Ne],$);if(Ve===null){de===null&&(de=Oe);break}e&&de&&Ve.alternate===null&&t(R,de),D=f(Ve,D,Ne),ze===null?fe=Ve:ze.sibling=Ve,ze=Ve,de=Oe}if(Ne===B.length)return s(R,de),Le&&ra(R,Ne),fe;if(de===null){for(;Ne<B.length;Ne++)de=Y(R,B[Ne],$),de!==null&&(D=f(de,D,Ne),ze===null?fe=de:ze.sibling=de,ze=de);return Le&&ra(R,Ne),fe}for(de=l(de);Ne<B.length;Ne++)Oe=H(de,R,Ne,B[Ne],$),Oe!==null&&(e&&Oe.alternate!==null&&de.delete(Oe.key===null?Ne:Oe.key),D=f(Oe,D,Ne),ze===null?fe=Oe:ze.sibling=Oe,ze=Oe);return e&&de.forEach(function(Ja){return t(R,Ja)}),Le&&ra(R,Ne),fe}function pe(R,D,B,$){if(B==null)throw Error(o(151));for(var fe=null,ze=null,de=D,Ne=D=0,Oe=null,Ve=B.next();de!==null&&!Ve.done;Ne++,Ve=B.next()){de.index>Ne?(Oe=de,de=null):Oe=de.sibling;var Ja=z(R,de,Ve.value,$);if(Ja===null){de===null&&(de=Oe);break}e&&de&&Ja.alternate===null&&t(R,de),D=f(Ja,D,Ne),ze===null?fe=Ja:ze.sibling=Ja,ze=Ja,de=Oe}if(Ve.done)return s(R,de),Le&&ra(R,Ne),fe;if(de===null){for(;!Ve.done;Ne++,Ve=B.next())Ve=Y(R,Ve.value,$),Ve!==null&&(D=f(Ve,D,Ne),ze===null?fe=Ve:ze.sibling=Ve,ze=Ve);return Le&&ra(R,Ne),fe}for(de=l(de);!Ve.done;Ne++,Ve=B.next())Ve=H(de,R,Ne,Ve.value,$),Ve!==null&&(e&&Ve.alternate!==null&&de.delete(Ve.key===null?Ne:Ve.key),D=f(Ve,D,Ne),ze===null?fe=Ve:ze.sibling=Ve,ze=Ve);return e&&de.forEach(function(X_){return t(R,X_)}),Le&&ra(R,Ne),fe}function Ze(R,D,B,$){if(typeof B=="object"&&B!==null&&B.type===A&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case T:e:{for(var fe=B.key;D!==null;){if(D.key===fe){if(fe=B.type,fe===A){if(D.tag===7){s(R,D.sibling),$=c(D,B.props.children),$.return=R,R=$;break e}}else if(D.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===I&&_s(fe)===D.type){s(R,D.sibling),$=c(D,B.props),il($,B),$.return=R,R=$;break e}s(R,D);break}else t(R,D);D=D.sibling}B.type===A?($=gs(B.props.children,R.mode,$,B.key),$.return=R,R=$):($=To(B.type,B.key,B.props,null,R.mode,$),il($,B),$.return=R,R=$)}return b(R);case E:e:{for(fe=B.key;D!==null;){if(D.key===fe)if(D.tag===4&&D.stateNode.containerInfo===B.containerInfo&&D.stateNode.implementation===B.implementation){s(R,D.sibling),$=c(D,B.children||[]),$.return=R,R=$;break e}else{s(R,D);break}else t(R,D);D=D.sibling}$=Uc(B,R.mode,$),$.return=R,R=$}return b(R);case I:return B=_s(B),Ze(R,D,B,$)}if(P(B))return le(R,D,B,$);if(ne(B)){if(fe=ne(B),typeof fe!="function")throw Error(o(150));return B=fe.call(B),pe(R,D,B,$)}if(typeof B.then=="function")return Ze(R,D,Do(B),$);if(B.$$typeof===M)return Ze(R,D,Ao(R,B),$);ko(R,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,D!==null&&D.tag===6?(s(R,D.sibling),$=c(D,B),$.return=R,R=$):(s(R,D),$=Lc(B,R.mode,$),$.return=R,R=$),b(R)):s(R,D)}return function(R,D,B,$){try{sl=0;var fe=Ze(R,D,B,$);return li=null,fe}catch(de){if(de===ii||de===No)throw de;var ze=dn(29,de,null,R.mode);return ze.lanes=$,ze.return=R,ze}finally{}}}var Ts=Cp(!0),Ap=Cp(!1),Ba=!1;function Zc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function La(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,s){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(He&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=xo(e),cp(e,null,s),t}return _o(e,l,t,s),xo(e)}function ll(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,yh(e,s)}}function Qc(e,t){var s=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var b={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};f===null?c=f=b:f=f.next=b,s=s.next}while(s!==null);f===null?c=f=t:f=f.next=t}else c=f=t;s={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}var Jc=!1;function ol(){if(Jc){var e=si;if(e!==null)throw e}}function rl(e,t,s,l){Jc=!1;var c=e.updateQueue;Ba=!1;var f=c.firstBaseUpdate,b=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var N=x,L=N.next;N.next=null,b===null?f=L:b.next=L,b=N;var q=e.alternate;q!==null&&(q=q.updateQueue,x=q.lastBaseUpdate,x!==b&&(x===null?q.firstBaseUpdate=L:x.next=L,q.lastBaseUpdate=N))}if(f!==null){var Y=c.baseState;b=0,q=L=N=null,x=f;do{var z=x.lane&-536870913,H=z!==x.lane;if(H?(Re&z)===z:(l&z)===z){z!==0&&z===ai&&(Jc=!0),q!==null&&(q=q.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var le=e,pe=x;z=t;var Ze=s;switch(pe.tag){case 1:if(le=pe.payload,typeof le=="function"){Y=le.call(Ze,Y,z);break e}Y=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=pe.payload,z=typeof le=="function"?le.call(Ze,Y,z):le,z==null)break e;Y=v({},Y,z);break e;case 2:Ba=!0}}z=x.callback,z!==null&&(e.flags|=64,H&&(e.flags|=8192),H=c.callbacks,H===null?c.callbacks=[z]:H.push(z))}else H={lane:z,tag:x.tag,payload:x.payload,callback:x.callback,next:null},q===null?(L=q=H,N=Y):q=q.next=H,b|=z;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;H=x,x=H.next,H.next=null,c.lastBaseUpdate=H,c.shared.pending=null}}while(!0);q===null&&(N=Y),c.baseState=N,c.firstBaseUpdate=L,c.lastBaseUpdate=q,f===null&&(c.shared.lanes=0),Pa|=b,e.lanes=b,e.memoizedState=Y}}function jp(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Np(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)jp(s[e],t)}var oi=Ue(null),Mo=Ue(0);function wp(e,t){e=ba,ye(Mo,e),ye(oi,t),ba=e|t.baseLanes}function Wc(){ye(Mo,ba),ye(oi,oi.current)}function eu(){ba=Mo.current,Ee(oi),Ee(Mo)}var fn=Ue(null),Nn=null;function za(e){var t=e.alternate;ye(yt,yt.current&1),ye(fn,e),Nn===null&&(t===null||oi.current!==null||t.memoizedState!==null)&&(Nn=e)}function tu(e){ye(yt,yt.current),ye(fn,e),Nn===null&&(Nn=e)}function Dp(e){e.tag===22?(ye(yt,yt.current),ye(fn,e),Nn===null&&(Nn=e)):Va()}function Va(){ye(yt,yt.current),ye(fn,fn.current)}function hn(e){Ee(fn),Nn===e&&(Nn=null),Ee(yt)}var yt=Ue(0);function Ro(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||od(s)||rd(s)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var da=0,Ce=null,Ye=null,At=null,Oo=!1,ri=!1,Es=!1,Bo=0,cl=0,ci=null,IS=0;function ut(){throw Error(o(321))}function nu(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!un(e[s],t[s]))return!1;return!0}function au(e,t,s,l,c,f){return da=f,Ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?hm:vu,Es=!1,f=s(l,c),Es=!1,ri&&(f=Mp(t,s,l,c)),kp(e),f}function kp(e){U.H=fl;var t=Ye!==null&&Ye.next!==null;if(da=0,At=Ye=Ce=null,Oo=!1,cl=0,ci=null,t)throw Error(o(300));e===null||jt||(e=e.dependencies,e!==null&&Co(e)&&(jt=!0))}function Mp(e,t,s,l){Ce=e;var c=0;do{if(ri&&(ci=null),cl=0,ri=!1,25<=c)throw Error(o(301));if(c+=1,At=Ye=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}U.H=pm,f=t(s,l)}while(ri);return f}function HS(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?ul(t):t,e=e.useState()[0],(Ye!==null?Ye.memoizedState:null)!==e&&(Ce.flags|=1024),t}function su(){var e=Bo!==0;return Bo=0,e}function iu(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function lu(e){if(Oo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Oo=!1}da=0,At=Ye=Ce=null,ri=!1,cl=Bo=0,ci=null}function Xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?Ce.memoizedState=At=e:At=At.next=e,At}function vt(){if(Ye===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var t=At===null?Ce.memoizedState:At.next;if(t!==null)At=t,Ye=e;else{if(e===null)throw Ce.alternate===null?Error(o(467)):Error(o(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},At===null?Ce.memoizedState=At=e:At=At.next=e}return At}function Lo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ul(e){var t=cl;return cl+=1,ci===null&&(ci=[]),e=xp(ci,e,t),t=Ce,(At===null?t.memoizedState:At.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?hm:vu),e}function Uo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ul(e);if(e.$$typeof===M)return It(e)}throw Error(o(438,String(e)))}function ou(e){var t=null,s=Ce.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var l=Ce.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),s===null&&(s=Lo(),Ce.updateQueue=s),s.memoCache=t,s=t.data[t.index],s===void 0)for(s=t.data[t.index]=Array(e),l=0;l<e;l++)s[l]=se;return t.index++,s}function fa(e,t){return typeof t=="function"?t(e):t}function zo(e){var t=vt();return ru(t,Ye,e)}function ru(e,t,s){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=s;var c=e.baseQueue,f=l.pending;if(f!==null){if(c!==null){var b=c.next;c.next=f.next,f.next=b}t.baseQueue=c=f,l.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var x=b=null,N=null,L=t,q=!1;do{var Y=L.lane&-536870913;if(Y!==L.lane?(Re&Y)===Y:(da&Y)===Y){var z=L.revertLane;if(z===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),Y===ai&&(q=!0);else if((da&z)===z){L=L.next,z===ai&&(q=!0);continue}else Y={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},N===null?(x=N=Y,b=f):N=N.next=Y,Ce.lanes|=z,Pa|=z;Y=L.action,Es&&s(f,Y),f=L.hasEagerState?L.eagerState:s(f,Y)}else z={lane:Y,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},N===null?(x=N=z,b=f):N=N.next=z,Ce.lanes|=Y,Pa|=Y;L=L.next}while(L!==null&&L!==t);if(N===null?b=f:N.next=x,!un(f,e.memoizedState)&&(jt=!0,q&&(s=si,s!==null)))throw s;e.memoizedState=f,e.baseState=b,e.baseQueue=N,l.lastRenderedState=f}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function cu(e){var t=vt(),s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var l=s.dispatch,c=s.pending,f=t.memoizedState;if(c!==null){s.pending=null;var b=c=c.next;do f=e(f,b.action),b=b.next;while(b!==c);un(f,t.memoizedState)||(jt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,l]}function Rp(e,t,s){var l=Ce,c=vt(),f=Le;if(f){if(s===void 0)throw Error(o(407));s=s()}else s=t();var b=!un((Ye||c).memoizedState,s);if(b&&(c.memoizedState=s,jt=!0),c=c.queue,fu(Lp.bind(null,l,c,e),[e]),c.getSnapshot!==t||b||At!==null&&At.memoizedState.tag&1){if(l.flags|=2048,ui(9,{destroy:void 0},Bp.bind(null,l,c,s,t),null),Je===null)throw Error(o(349));f||(da&127)!==0||Op(l,t,s)}return s}function Op(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Ce.updateQueue,t===null?(t=Lo(),Ce.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function Bp(e,t,s,l){t.value=s,t.getSnapshot=l,Up(t)&&zp(e)}function Lp(e,t,s){return s(function(){Up(t)&&zp(e)})}function Up(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!un(e,s)}catch{return!0}}function zp(e){var t=ms(e,2);t!==null&&rn(t,e,2)}function uu(e){var t=Xt();if(typeof e=="function"){var s=e;if(e=s(),Es){cn(!0);try{s()}finally{cn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:e},t}function Vp(e,t,s,l){return e.baseState=s,ru(e,Ye,typeof l=="function"?l:fa)}function PS(e,t,s,l,c){if(Ho(e))throw Error(o(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){f.listeners.push(b)}};U.T!==null?s(!0):f.isTransition=!1,l(f),s=t.pending,s===null?(f.next=t.pending=f,Ip(t,f)):(f.next=s.next,t.pending=s.next=f)}}function Ip(e,t){var s=t.action,l=t.payload,c=e.state;if(t.isTransition){var f=U.T,b={};U.T=b;try{var x=s(c,l),N=U.S;N!==null&&N(b,x),Hp(e,t,x)}catch(L){du(e,t,L)}finally{f!==null&&b.types!==null&&(f.types=b.types),U.T=f}}else try{f=s(c,l),Hp(e,t,f)}catch(L){du(e,t,L)}}function Hp(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){Pp(e,t,l)},function(l){return du(e,t,l)}):Pp(e,t,s)}function Pp(e,t,s){t.status="fulfilled",t.value=s,Gp(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,Ip(e,s)))}function du(e,t,s){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=s,Gp(t),t=t.next;while(t!==l)}e.action=null}function Gp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function qp(e,t){return t}function Fp(e,t){if(Le){var s=Je.formState;if(s!==null){e:{var l=Ce;if(Le){if(et){t:{for(var c=et,f=jn;c.nodeType!==8;){if(!f){c=null;break t}if(c=wn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){et=wn(c.nextSibling),l=c.data==="F!";break e}}Ra(l)}l=!1}l&&(t=s[0])}}return s=Xt(),s.memoizedState=s.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qp,lastRenderedState:t},s.queue=l,s=um.bind(null,Ce,l),l.dispatch=s,l=uu(!1),f=yu.bind(null,Ce,!1,l.queue),l=Xt(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,s=PS.bind(null,Ce,c,f,s),c.dispatch=s,l.memoizedState=e,[t,s,!1]}function $p(e){var t=vt();return Yp(t,Ye,e)}function Yp(e,t,s){if(t=ru(e,t,qp)[0],e=zo(fa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ul(t)}catch(b){throw b===ii?No:b}else l=t;t=vt();var c=t.queue,f=c.dispatch;return s!==t.memoizedState&&(Ce.flags|=2048,ui(9,{destroy:void 0},GS.bind(null,c,s),null)),[l,f,e]}function GS(e,t){e.action=t}function Kp(e){var t=vt(),s=Ye;if(s!==null)return Yp(t,s,e);vt(),t=t.memoizedState,s=vt();var l=s.queue.dispatch;return s.memoizedState=e,[t,l,!1]}function ui(e,t,s,l){return e={tag:e,create:s,deps:l,inst:t,next:null},t=Ce.updateQueue,t===null&&(t=Lo(),Ce.updateQueue=t),s=t.lastEffect,s===null?t.lastEffect=e.next=e:(l=s.next,s.next=e,e.next=l,t.lastEffect=e),e}function Zp(){return vt().memoizedState}function Vo(e,t,s,l){var c=Xt();Ce.flags|=e,c.memoizedState=ui(1|t,{destroy:void 0},s,l===void 0?null:l)}function Io(e,t,s,l){var c=vt();l=l===void 0?null:l;var f=c.memoizedState.inst;Ye!==null&&l!==null&&nu(l,Ye.memoizedState.deps)?c.memoizedState=ui(t,f,s,l):(Ce.flags|=e,c.memoizedState=ui(1|t,f,s,l))}function Xp(e,t){Vo(8390656,8,e,t)}function fu(e,t){Io(2048,8,e,t)}function qS(e){Ce.flags|=4;var t=Ce.updateQueue;if(t===null)t=Lo(),Ce.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function Qp(e){var t=vt().memoizedState;return qS({ref:t,nextImpl:e}),function(){if((He&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Jp(e,t){return Io(4,2,e,t)}function Wp(e,t){return Io(4,4,e,t)}function em(e,t){if(typeof t=="function"){e=e();var s=t(e);return function(){typeof s=="function"?s():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function tm(e,t,s){s=s!=null?s.concat([e]):null,Io(4,4,em.bind(null,t,e),s)}function hu(){}function nm(e,t){var s=vt();t=t===void 0?null:t;var l=s.memoizedState;return t!==null&&nu(t,l[1])?l[0]:(s.memoizedState=[e,t],e)}function am(e,t){var s=vt();t=t===void 0?null:t;var l=s.memoizedState;if(t!==null&&nu(t,l[1]))return l[0];if(l=e(),Es){cn(!0);try{e()}finally{cn(!1)}}return s.memoizedState=[l,t],l}function pu(e,t,s){return s===void 0||(da&1073741824)!==0&&(Re&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=sg(),Ce.lanes|=e,Pa|=e,s)}function sm(e,t,s,l){return un(s,t)?s:oi.current!==null?(e=pu(e,s,l),un(e,t)||(jt=!0),e):(da&42)===0||(da&1073741824)!==0&&(Re&261930)===0?(jt=!0,e.memoizedState=s):(e=sg(),Ce.lanes|=e,Pa|=e,t)}function im(e,t,s,l,c){var f=K.p;K.p=f!==0&&8>f?f:8;var b=U.T,x={};U.T=x,yu(e,!1,t,s);try{var N=c(),L=U.S;if(L!==null&&L(x,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var q=VS(N,l);dl(e,t,q,gn(e))}else dl(e,t,l,gn(e))}catch(Y){dl(e,t,{then:function(){},status:"rejected",reason:Y},gn())}finally{K.p=f,b!==null&&x.types!==null&&(b.types=x.types),U.T=b}}function FS(){}function mu(e,t,s,l){if(e.tag!==5)throw Error(o(476));var c=lm(e).queue;im(e,c,t,ee,s===null?FS:function(){return om(e),s(l)})}function lm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:ee},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function om(e){var t=lm(e);t.next===null&&(t=e.alternate.memoizedState),dl(e,t.next.queue,{},gn())}function gu(){return It(Nl)}function rm(){return vt().memoizedState}function cm(){return vt().memoizedState}function $S(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=gn();e=La(s);var l=Ua(t,e,s);l!==null&&(rn(l,t,s),ll(l,t,s)),t={cache:Fc()},e.payload=t;return}t=t.return}}function YS(e,t,s){var l=gn();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Ho(e)?dm(t,s):(s=Oc(e,t,s,l),s!==null&&(rn(s,e,l),fm(s,t,l)))}function um(e,t,s){var l=gn();dl(e,t,s,l)}function dl(e,t,s,l){var c={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Ho(e))dm(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var b=t.lastRenderedState,x=f(b,s);if(c.hasEagerState=!0,c.eagerState=x,un(x,b))return _o(e,t,c,0),Je===null&&So(),!1}catch{}finally{}if(s=Oc(e,t,c,l),s!==null)return rn(s,e,l),fm(s,t,l),!0}return!1}function yu(e,t,s,l){if(l={lane:2,revertLane:Zu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ho(e)){if(t)throw Error(o(479))}else t=Oc(e,s,l,2),t!==null&&rn(t,e,2)}function Ho(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function dm(e,t){ri=Oo=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function fm(e,t,s){if((s&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,yh(e,s)}}var fl={readContext:It,use:Uo,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};fl.useEffectEvent=ut;var hm={readContext:It,use:Uo,useCallback:function(e,t){return Xt().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:Xp,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,Vo(4194308,4,em.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Vo(4194308,4,e,t)},useInsertionEffect:function(e,t){Vo(4,2,e,t)},useMemo:function(e,t){var s=Xt();t=t===void 0?null:t;var l=e();if(Es){cn(!0);try{e()}finally{cn(!1)}}return s.memoizedState=[l,t],l},useReducer:function(e,t,s){var l=Xt();if(s!==void 0){var c=s(t);if(Es){cn(!0);try{s(t)}finally{cn(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=YS.bind(null,Ce,e),[l.memoizedState,e]},useRef:function(e){var t=Xt();return e={current:e},t.memoizedState=e},useState:function(e){e=uu(e);var t=e.queue,s=um.bind(null,Ce,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:hu,useDeferredValue:function(e,t){var s=Xt();return pu(s,e,t)},useTransition:function(){var e=uu(!1);return e=im.bind(null,Ce,e.queue,!0,!1),Xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var l=Ce,c=Xt();if(Le){if(s===void 0)throw Error(o(407));s=s()}else{if(s=t(),Je===null)throw Error(o(349));(Re&127)!==0||Op(l,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,Xp(Lp.bind(null,l,f,e),[e]),l.flags|=2048,ui(9,{destroy:void 0},Bp.bind(null,l,f,s,t),null),s},useId:function(){var e=Xt(),t=Je.identifierPrefix;if(Le){var s=qn,l=Gn;s=(l&~(1<<32-mt(l)-1)).toString(32)+s,t="_"+t+"R_"+s,s=Bo++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=IS++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:gu,useFormState:Fp,useActionState:Fp,useOptimistic:function(e){var t=Xt();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=yu.bind(null,Ce,!0,s),s.dispatch=t,[e,t]},useMemoCache:ou,useCacheRefresh:function(){return Xt().memoizedState=$S.bind(null,Ce)},useEffectEvent:function(e){var t=Xt(),s={impl:e};return t.memoizedState=s,function(){if((He&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},vu={readContext:It,use:Uo,useCallback:nm,useContext:It,useEffect:fu,useImperativeHandle:tm,useInsertionEffect:Jp,useLayoutEffect:Wp,useMemo:am,useReducer:zo,useRef:Zp,useState:function(){return zo(fa)},useDebugValue:hu,useDeferredValue:function(e,t){var s=vt();return sm(s,Ye.memoizedState,e,t)},useTransition:function(){var e=zo(fa)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:ul(e),t]},useSyncExternalStore:Rp,useId:rm,useHostTransitionStatus:gu,useFormState:$p,useActionState:$p,useOptimistic:function(e,t){var s=vt();return Vp(s,Ye,e,t)},useMemoCache:ou,useCacheRefresh:cm};vu.useEffectEvent=Qp;var pm={readContext:It,use:Uo,useCallback:nm,useContext:It,useEffect:fu,useImperativeHandle:tm,useInsertionEffect:Jp,useLayoutEffect:Wp,useMemo:am,useReducer:cu,useRef:Zp,useState:function(){return cu(fa)},useDebugValue:hu,useDeferredValue:function(e,t){var s=vt();return Ye===null?pu(s,e,t):sm(s,Ye.memoizedState,e,t)},useTransition:function(){var e=cu(fa)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:ul(e),t]},useSyncExternalStore:Rp,useId:rm,useHostTransitionStatus:gu,useFormState:Kp,useActionState:Kp,useOptimistic:function(e,t){var s=vt();return Ye!==null?Vp(s,Ye,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:ou,useCacheRefresh:cm};pm.useEffectEvent=Qp;function bu(e,t,s,l){t=e.memoizedState,s=s(l,t),s=s==null?t:v({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Su={enqueueSetState:function(e,t,s){e=e._reactInternals;var l=gn(),c=La(l);c.payload=t,s!=null&&(c.callback=s),t=Ua(e,c,l),t!==null&&(rn(t,e,l),ll(t,e,l))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var l=gn(),c=La(l);c.tag=1,c.payload=t,s!=null&&(c.callback=s),t=Ua(e,c,l),t!==null&&(rn(t,e,l),ll(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=gn(),l=La(s);l.tag=2,t!=null&&(l.callback=t),t=Ua(e,l,s),t!==null&&(rn(t,e,s),ll(t,e,s))}};function mm(e,t,s,l,c,f,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,b):t.prototype&&t.prototype.isPureReactComponent?!Ji(s,l)||!Ji(c,f):!0}function gm(e,t,s,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,l),t.state!==e&&Su.enqueueReplaceState(t,t.state,null)}function Cs(e,t){var s=t;if("ref"in t){s={};for(var l in t)l!=="ref"&&(s[l]=t[l])}if(e=e.defaultProps){s===t&&(s=v({},s));for(var c in e)s[c]===void 0&&(s[c]=e[c])}return s}function ym(e){bo(e)}function vm(e){console.error(e)}function bm(e){bo(e)}function Po(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Sm(e,t,s){try{var l=e.onCaughtError;l(s.value,{componentStack:s.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function _u(e,t,s){return s=La(s),s.tag=3,s.payload={element:null},s.callback=function(){Po(e,t)},s}function _m(e){return e=La(e),e.tag=3,e}function xm(e,t,s,l){var c=s.type.getDerivedStateFromError;if(typeof c=="function"){var f=l.value;e.payload=function(){return c(f)},e.callback=function(){Sm(t,s,l)}}var b=s.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Sm(t,s,l),typeof c!="function"&&(Ga===null?Ga=new Set([this]):Ga.add(this));var x=l.stack;this.componentDidCatch(l.value,{componentStack:x!==null?x:""})})}function KS(e,t,s,l,c){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=s.alternate,t!==null&&ni(t,s,c,!0),s=fn.current,s!==null){switch(s.tag){case 31:case 13:return Nn===null?er():s.alternate===null&&dt===0&&(dt=3),s.flags&=-257,s.flags|=65536,s.lanes=c,l===wo?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([l]):t.add(l),$u(e,l,c)),!1;case 22:return s.flags|=65536,l===wo?s.flags|=16384:(t=s.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},s.updateQueue=t):(s=t.retryQueue,s===null?t.retryQueue=new Set([l]):s.add(l)),$u(e,l,c)),!1}throw Error(o(435,s.tag))}return $u(e,l,c),er(),!1}if(Le)return t=fn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Ic&&(e=Error(o(422),{cause:l}),tl(En(e,s)))):(l!==Ic&&(t=Error(o(423),{cause:l}),tl(En(t,s))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=En(l,s),c=_u(e.stateNode,l,c),Qc(e,c),dt!==4&&(dt=2)),!1;var f=Error(o(520),{cause:l});if(f=En(f,s),Sl===null?Sl=[f]:Sl.push(f),dt!==4&&(dt=2),t===null)return!0;l=En(l,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=c&-c,s.lanes|=e,e=_u(s.stateNode,l,e),Qc(s,e),!1;case 1:if(t=s.type,f=s.stateNode,(s.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Ga===null||!Ga.has(f))))return s.flags|=65536,c&=-c,s.lanes|=c,c=_m(c),xm(c,e,s,l),Qc(s,c),!1}s=s.return}while(s!==null);return!1}var xu=Error(o(461)),jt=!1;function Ht(e,t,s,l){t.child=e===null?Ap(t,null,s,l):Ts(t,e.child,s,l)}function Tm(e,t,s,l,c){s=s.render;var f=t.ref;if("ref"in l){var b={};for(var x in l)x!=="ref"&&(b[x]=l[x])}else b=l;return bs(t),l=au(e,t,s,b,f,c),x=su(),e!==null&&!jt?(iu(e,t,c),ha(e,t,c)):(Le&&x&&zc(t),t.flags|=1,Ht(e,t,l,c),t.child)}function Em(e,t,s,l,c){if(e===null){var f=s.type;return typeof f=="function"&&!Bc(f)&&f.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=f,Cm(e,t,f,l,c)):(e=To(s.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Du(e,c)){var b=f.memoizedProps;if(s=s.compare,s=s!==null?s:Ji,s(b,l)&&e.ref===t.ref)return ha(e,t,c)}return t.flags|=1,e=oa(f,l),e.ref=t.ref,e.return=t,t.child=e}function Cm(e,t,s,l,c){if(e!==null){var f=e.memoizedProps;if(Ji(f,l)&&e.ref===t.ref)if(jt=!1,t.pendingProps=l=f,Du(e,c))(e.flags&131072)!==0&&(jt=!0);else return t.lanes=e.lanes,ha(e,t,c)}return Tu(e,t,s,l,c)}function Am(e,t,s,l){var c=l.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|s:s,e!==null){for(l=t.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~f}else l=0,t.child=null;return jm(e,t,f,s,l)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&jo(t,f!==null?f.cachePool:null),f!==null?wp(t,f):Wc(),Dp(t);else return l=t.lanes=536870912,jm(e,t,f!==null?f.baseLanes|s:s,s,l)}else f!==null?(jo(t,f.cachePool),wp(t,f),Va(),t.memoizedState=null):(e!==null&&jo(t,null),Wc(),Va());return Ht(e,t,c,s),t.child}function hl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function jm(e,t,s,l,c){var f=Yc();return f=f===null?null:{parent:Ct._currentValue,pool:f},t.memoizedState={baseLanes:s,cachePool:f},e!==null&&jo(t,null),Wc(),Dp(t),e!==null&&ni(e,t,l,!0),t.childLanes=c,null}function Go(e,t){return t=Fo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Nm(e,t,s){return Ts(t,e.child,null,s),e=Go(t,t.pendingProps),e.flags|=2,hn(t),t.memoizedState=null,e}function ZS(e,t,s){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Le){if(l.mode==="hidden")return e=Go(t,l),t.lanes=536870912,hl(null,e);if(tu(t),(e=et)?(e=Ig(e,jn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ka!==null?{id:Gn,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},s=dp(e),s.return=t,t.child=s,Vt=t,et=null)):e=null,e===null)throw Ra(t);return t.lanes=536870912,null}return Go(t,l)}var f=e.memoizedState;if(f!==null){var b=f.dehydrated;if(tu(t),c)if(t.flags&256)t.flags&=-257,t=Nm(e,t,s);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(jt||ni(e,t,s,!1),c=(s&e.childLanes)!==0,jt||c){if(l=Je,l!==null&&(b=vh(l,s),b!==0&&b!==f.retryLane))throw f.retryLane=b,ms(e,b),rn(l,e,b),xu;er(),t=Nm(e,t,s)}else e=f.treeContext,et=wn(b.nextSibling),Vt=t,Le=!0,Ma=null,jn=!1,e!==null&&pp(t,e),t=Go(t,l),t.flags|=4096;return t}return e=oa(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function qo(e,t){var s=t.ref;if(s===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(e===null||e.ref!==s)&&(t.flags|=4194816)}}function Tu(e,t,s,l,c){return bs(t),s=au(e,t,s,l,void 0,c),l=su(),e!==null&&!jt?(iu(e,t,c),ha(e,t,c)):(Le&&l&&zc(t),t.flags|=1,Ht(e,t,s,c),t.child)}function wm(e,t,s,l,c,f){return bs(t),t.updateQueue=null,s=Mp(t,l,s,c),kp(e),l=su(),e!==null&&!jt?(iu(e,t,f),ha(e,t,f)):(Le&&l&&zc(t),t.flags|=1,Ht(e,t,s,f),t.child)}function Dm(e,t,s,l,c){if(bs(t),t.stateNode===null){var f=Js,b=s.contextType;typeof b=="object"&&b!==null&&(f=It(b)),f=new s(l,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Su,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=l,f.state=t.memoizedState,f.refs={},Zc(t),b=s.contextType,f.context=typeof b=="object"&&b!==null?It(b):Js,f.state=t.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(bu(t,s,b,l),f.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(b=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),b!==f.state&&Su.enqueueReplaceState(f,f.state,null),rl(t,l,f,c),ol(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){f=t.stateNode;var x=t.memoizedProps,N=Cs(s,x);f.props=N;var L=f.context,q=s.contextType;b=Js,typeof q=="object"&&q!==null&&(b=It(q));var Y=s.getDerivedStateFromProps;q=typeof Y=="function"||typeof f.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,q||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(x||L!==b)&&gm(t,f,l,b),Ba=!1;var z=t.memoizedState;f.state=z,rl(t,l,f,c),ol(),L=t.memoizedState,x||z!==L||Ba?(typeof Y=="function"&&(bu(t,s,Y,l),L=t.memoizedState),(N=Ba||mm(t,s,N,l,z,L,b))?(q||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=L),f.props=l,f.state=L,f.context=b,l=N):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{f=t.stateNode,Xc(e,t),b=t.memoizedProps,q=Cs(s,b),f.props=q,Y=t.pendingProps,z=f.context,L=s.contextType,N=Js,typeof L=="object"&&L!==null&&(N=It(L)),x=s.getDerivedStateFromProps,(L=typeof x=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b!==Y||z!==N)&&gm(t,f,l,N),Ba=!1,z=t.memoizedState,f.state=z,rl(t,l,f,c),ol();var H=t.memoizedState;b!==Y||z!==H||Ba||e!==null&&e.dependencies!==null&&Co(e.dependencies)?(typeof x=="function"&&(bu(t,s,x,l),H=t.memoizedState),(q=Ba||mm(t,s,q,l,z,H,N)||e!==null&&e.dependencies!==null&&Co(e.dependencies))?(L||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,H,N),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,H,N)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=H),f.props=l,f.state=H,f.context=N,l=q):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),l=!1)}return f=l,qo(e,t),l=(t.flags&128)!==0,f||l?(f=t.stateNode,s=l&&typeof s.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&l?(t.child=Ts(t,e.child,null,c),t.child=Ts(t,null,s,c)):Ht(e,t,s,c),t.memoizedState=f.state,e=t.child):e=ha(e,t,c),e}function km(e,t,s,l){return ys(),t.flags|=256,Ht(e,t,s,l),t.child}var Eu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cu(e){return{baseLanes:e,cachePool:Sp()}}function Au(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=mn),e}function Mm(e,t,s){var l=t.pendingProps,c=!1,f=(t.flags&128)!==0,b;if((b=f)||(b=e!==null&&e.memoizedState===null?!1:(yt.current&2)!==0),b&&(c=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(Le){if(c?za(t):Va(),(e=et)?(e=Ig(e,jn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ka!==null?{id:Gn,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},s=dp(e),s.return=t,t.child=s,Vt=t,et=null)):e=null,e===null)throw Ra(t);return rd(e)?t.lanes=32:t.lanes=536870912,null}var x=l.children;return l=l.fallback,c?(Va(),c=t.mode,x=Fo({mode:"hidden",children:x},c),l=gs(l,c,s,null),x.return=t,l.return=t,x.sibling=l,t.child=x,l=t.child,l.memoizedState=Cu(s),l.childLanes=Au(e,b,s),t.memoizedState=Eu,hl(null,l)):(za(t),ju(t,x))}var N=e.memoizedState;if(N!==null&&(x=N.dehydrated,x!==null)){if(f)t.flags&256?(za(t),t.flags&=-257,t=Nu(e,t,s)):t.memoizedState!==null?(Va(),t.child=e.child,t.flags|=128,t=null):(Va(),x=l.fallback,c=t.mode,l=Fo({mode:"visible",children:l.children},c),x=gs(x,c,s,null),x.flags|=2,l.return=t,x.return=t,l.sibling=x,t.child=l,Ts(t,e.child,null,s),l=t.child,l.memoizedState=Cu(s),l.childLanes=Au(e,b,s),t.memoizedState=Eu,t=hl(null,l));else if(za(t),rd(x)){if(b=x.nextSibling&&x.nextSibling.dataset,b)var L=b.dgst;b=L,l=Error(o(419)),l.stack="",l.digest=b,tl({value:l,source:null,stack:null}),t=Nu(e,t,s)}else if(jt||ni(e,t,s,!1),b=(s&e.childLanes)!==0,jt||b){if(b=Je,b!==null&&(l=vh(b,s),l!==0&&l!==N.retryLane))throw N.retryLane=l,ms(e,l),rn(b,e,l),xu;od(x)||er(),t=Nu(e,t,s)}else od(x)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,et=wn(x.nextSibling),Vt=t,Le=!0,Ma=null,jn=!1,e!==null&&pp(t,e),t=ju(t,l.children),t.flags|=4096);return t}return c?(Va(),x=l.fallback,c=t.mode,N=e.child,L=N.sibling,l=oa(N,{mode:"hidden",children:l.children}),l.subtreeFlags=N.subtreeFlags&65011712,L!==null?x=oa(L,x):(x=gs(x,c,s,null),x.flags|=2),x.return=t,l.return=t,l.sibling=x,t.child=l,hl(null,l),l=t.child,x=e.child.memoizedState,x===null?x=Cu(s):(c=x.cachePool,c!==null?(N=Ct._currentValue,c=c.parent!==N?{parent:N,pool:N}:c):c=Sp(),x={baseLanes:x.baseLanes|s,cachePool:c}),l.memoizedState=x,l.childLanes=Au(e,b,s),t.memoizedState=Eu,hl(e.child,l)):(za(t),s=e.child,e=s.sibling,s=oa(s,{mode:"visible",children:l.children}),s.return=t,s.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=s,t.memoizedState=null,s)}function ju(e,t){return t=Fo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Fo(e,t){return e=dn(22,e,null,t),e.lanes=0,e}function Nu(e,t,s){return Ts(t,e.child,null,s),e=ju(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Rm(e,t,s){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Gc(e.return,t,s)}function wu(e,t,s,l,c,f){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:c,treeForkCount:f}:(b.isBackwards=t,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail=s,b.tailMode=c,b.treeForkCount=f)}function Om(e,t,s){var l=t.pendingProps,c=l.revealOrder,f=l.tail;l=l.children;var b=yt.current,x=(b&2)!==0;if(x?(b=b&1|2,t.flags|=128):b&=1,ye(yt,b),Ht(e,t,l,s),l=Le?el:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rm(e,s,t);else if(e.tag===19)Rm(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(s=t.child,c=null;s!==null;)e=s.alternate,e!==null&&Ro(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),wu(t,!1,c,s,f,l);break;case"backwards":case"unstable_legacy-backwards":for(s=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Ro(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}wu(t,!0,s,null,f,l);break;case"together":wu(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function ha(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Pa|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(ni(e,t,s,!1),(s&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,s=oa(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=oa(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Du(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Co(e)))}function XS(e,t,s){switch(t.tag){case 3:Ae(t,t.stateNode.containerInfo),Oa(t,Ct,e.memoizedState.cache),ys();break;case 27:case 5:pt(t);break;case 4:Ae(t,t.stateNode.containerInfo);break;case 10:Oa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,tu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(za(t),t.flags|=128,null):(s&t.child.childLanes)!==0?Mm(e,t,s):(za(t),e=ha(e,t,s),e!==null?e.sibling:null);za(t);break;case 19:var c=(e.flags&128)!==0;if(l=(s&t.childLanes)!==0,l||(ni(e,t,s,!1),l=(s&t.childLanes)!==0),c){if(l)return Om(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),ye(yt,yt.current),l)break;return null;case 22:return t.lanes=0,Am(e,t,s,t.pendingProps);case 24:Oa(t,Ct,e.memoizedState.cache)}return ha(e,t,s)}function Bm(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)jt=!0;else{if(!Du(e,s)&&(t.flags&128)===0)return jt=!1,XS(e,t,s);jt=(e.flags&131072)!==0}else jt=!1,Le&&(t.flags&1048576)!==0&&hp(t,el,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=_s(t.elementType),t.type=e,typeof e=="function")Bc(e)?(l=Cs(e,l),t.tag=1,t=Dm(null,t,e,l,s)):(t.tag=0,t=Tu(null,t,e,l,s));else{if(e!=null){var c=e.$$typeof;if(c===G){t.tag=11,t=Tm(null,t,e,l,s);break e}else if(c===Q){t.tag=14,t=Em(null,t,e,l,s);break e}}throw t=he(e)||e,Error(o(306,t,""))}}return t;case 0:return Tu(e,t,t.type,t.pendingProps,s);case 1:return l=t.type,c=Cs(l,t.pendingProps),Dm(e,t,l,c,s);case 3:e:{if(Ae(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var f=t.memoizedState;c=f.element,Xc(e,t),rl(t,l,null,s);var b=t.memoizedState;if(l=b.cache,Oa(t,Ct,l),l!==f.cache&&qc(t,[Ct],s,!0),ol(),l=b.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=km(e,t,l,s);break e}else if(l!==c){c=En(Error(o(424)),t),tl(c),t=km(e,t,l,s);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(et=wn(e.firstChild),Vt=t,Le=!0,Ma=null,jn=!0,s=Ap(t,null,l,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(ys(),l===c){t=ha(e,t,s);break e}Ht(e,t,l,s)}t=t.child}return t;case 26:return qo(e,t),e===null?(s=$g(t.type,null,t.pendingProps,null))?t.memoizedState=s:Le||(s=t.type,e=t.pendingProps,l=or(F.current).createElement(s),l[zt]=t,l[tn]=e,Pt(l,s,e),Ot(l),t.stateNode=l):t.memoizedState=$g(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return pt(t),e===null&&Le&&(l=t.stateNode=Gg(t.type,t.pendingProps,F.current),Vt=t,jn=!0,c=et,Ya(t.type)?(cd=c,et=wn(l.firstChild)):et=c),Ht(e,t,t.pendingProps.children,s),qo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Le&&((c=l=et)&&(l=A_(l,t.type,t.pendingProps,jn),l!==null?(t.stateNode=l,Vt=t,et=wn(l.firstChild),jn=!1,c=!0):c=!1),c||Ra(t)),pt(t),c=t.type,f=t.pendingProps,b=e!==null?e.memoizedProps:null,l=f.children,sd(c,f)?l=null:b!==null&&sd(c,b)&&(t.flags|=32),t.memoizedState!==null&&(c=au(e,t,HS,null,null,s),Nl._currentValue=c),qo(e,t),Ht(e,t,l,s),t.child;case 6:return e===null&&Le&&((e=s=et)&&(s=j_(s,t.pendingProps,jn),s!==null?(t.stateNode=s,Vt=t,et=null,e=!0):e=!1),e||Ra(t)),null;case 13:return Mm(e,t,s);case 4:return Ae(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Ts(t,null,l,s):Ht(e,t,l,s),t.child;case 11:return Tm(e,t,t.type,t.pendingProps,s);case 7:return Ht(e,t,t.pendingProps,s),t.child;case 8:return Ht(e,t,t.pendingProps.children,s),t.child;case 12:return Ht(e,t,t.pendingProps.children,s),t.child;case 10:return l=t.pendingProps,Oa(t,t.type,l.value),Ht(e,t,l.children,s),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,bs(t),c=It(c),l=l(c),t.flags|=1,Ht(e,t,l,s),t.child;case 14:return Em(e,t,t.type,t.pendingProps,s);case 15:return Cm(e,t,t.type,t.pendingProps,s);case 19:return Om(e,t,s);case 31:return ZS(e,t,s);case 22:return Am(e,t,s,t.pendingProps);case 24:return bs(t),l=It(Ct),e===null?(c=Yc(),c===null&&(c=Je,f=Fc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=s),c=f),t.memoizedState={parent:l,cache:c},Zc(t),Oa(t,Ct,c)):((e.lanes&s)!==0&&(Xc(e,t),rl(t,null,null,s),ol()),c=e.memoizedState,f=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Oa(t,Ct,l)):(l=f.cache,Oa(t,Ct,l),l!==c.cache&&qc(t,[Ct],s,!0))),Ht(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function pa(e){e.flags|=4}function ku(e,t,s,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(rg())e.flags|=8192;else throw xs=wo,Kc}else e.flags&=-16777217}function Lm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Qg(t))if(rg())e.flags|=8192;else throw xs=wo,Kc}function $o(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?aa():536870912,e.lanes|=t,pi|=t)}function pl(e,t){if(!Le)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function tt(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,l=0;if(t)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=s,t}function QS(e,t,s){var l=t.pendingProps;switch(Vc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tt(t),null;case 1:return tt(t),null;case 3:return s=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ua(Ct),Ie(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ti(t)?pa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Hc())),tt(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(pa(t),f!==null?(tt(t),Lm(t,f)):(tt(t),ku(t,c,null,l,s))):f?f!==e.memoizedState?(pa(t),tt(t),Lm(t,f)):(tt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&pa(t),tt(t),ku(t,c,e,l,s)),null;case 27:if(xt(t),s=F.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&pa(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return tt(t),null}e=Te.current,ti(t)?mp(t):(e=Gg(c,l,s),t.stateNode=e,pa(t))}return tt(t),null;case 5:if(xt(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&pa(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return tt(t),null}if(f=Te.current,ti(t))mp(t);else{var b=or(F.current);switch(f){case 1:f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=b.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?b.createElement("select",{is:l.is}):b.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?b.createElement(c,{is:l.is}):b.createElement(c)}}f[zt]=t,f[tn]=l;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)f.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=f;e:switch(Pt(f,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&pa(t)}}return tt(t),ku(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&pa(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=F.current,ti(t)){if(e=t.stateNode,s=t.memoizedProps,l=null,c=Vt,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[zt]=t,e=!!(e.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||Mg(e.nodeValue,s)),e||Ra(t,!0)}else e=or(e).createTextNode(l),e[zt]=t,t.stateNode=e}return tt(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(l=ti(t),s!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[zt]=t}else ys(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;tt(t),e=!1}else s=Hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(hn(t),t):(hn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return tt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ti(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[zt]=t}else ys(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;tt(t),c=!1}else c=Hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(hn(t),t):(hn(t),null)}return hn(t),(t.flags&128)!==0?(t.lanes=s,t):(s=l!==null,e=e!==null&&e.memoizedState!==null,s&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==c&&(l.flags|=2048)),s!==e&&s&&(t.child.flags|=8192),$o(t,t.updateQueue),tt(t),null);case 4:return Ie(),e===null&&Wu(t.stateNode.containerInfo),tt(t),null;case 10:return ua(t.type),tt(t),null;case 19:if(Ee(yt),l=t.memoizedState,l===null)return tt(t),null;if(c=(t.flags&128)!==0,f=l.rendering,f===null)if(c)pl(l,!1);else{if(dt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Ro(e),f!==null){for(t.flags|=128,pl(l,!1),e=f.updateQueue,t.updateQueue=e,$o(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)up(s,e),s=s.sibling;return ye(yt,yt.current&1|2),Le&&ra(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ue()>Qo&&(t.flags|=128,c=!0,pl(l,!1),t.lanes=4194304)}else{if(!c)if(e=Ro(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,$o(t,e),pl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Le)return tt(t),null}else 2*ue()-l.renderingStartTime>Qo&&s!==536870912&&(t.flags|=128,c=!0,pl(l,!1),t.lanes=4194304);l.isBackwards?(f.sibling=t.child,t.child=f):(e=l.last,e!==null?e.sibling=f:t.child=f,l.last=f)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ue(),e.sibling=null,s=yt.current,ye(yt,c?s&1|2:s&1),Le&&ra(t,l.treeForkCount),e):(tt(t),null);case 22:case 23:return hn(t),eu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(s&536870912)!==0&&(t.flags&128)===0&&(tt(t),t.subtreeFlags&6&&(t.flags|=8192)):tt(t),s=t.updateQueue,s!==null&&$o(t,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==s&&(t.flags|=2048),e!==null&&Ee(Ss),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ua(Ct),tt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function JS(e,t){switch(Vc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ua(Ct),Ie(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xt(t),null;case 31:if(t.memoizedState!==null){if(hn(t),t.alternate===null)throw Error(o(340));ys()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(hn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ys()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(yt),null;case 4:return Ie(),null;case 10:return ua(t.type),null;case 22:case 23:return hn(t),eu(),e!==null&&Ee(Ss),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ua(Ct),null;case 25:return null;default:return null}}function Um(e,t){switch(Vc(t),t.tag){case 3:ua(Ct),Ie();break;case 26:case 27:case 5:xt(t);break;case 4:Ie();break;case 31:t.memoizedState!==null&&hn(t);break;case 13:hn(t);break;case 19:Ee(yt);break;case 10:ua(t.type);break;case 22:case 23:hn(t),eu(),e!==null&&Ee(Ss);break;case 24:ua(Ct)}}function ml(e,t){try{var s=t.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var c=l.next;s=c;do{if((s.tag&e)===e){l=void 0;var f=s.create,b=s.inst;l=f(),b.destroy=l}s=s.next}while(s!==c)}}catch(x){$e(t,t.return,x)}}function Ia(e,t,s){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&e)===e){var b=l.inst,x=b.destroy;if(x!==void 0){b.destroy=void 0,c=t;var N=s,L=x;try{L()}catch(q){$e(c,N,q)}}}l=l.next}while(l!==f)}}catch(q){$e(t,t.return,q)}}function zm(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{Np(t,s)}catch(l){$e(e,e.return,l)}}}function Vm(e,t,s){s.props=Cs(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(l){$e(e,t,l)}}function gl(e,t){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof s=="function"?e.refCleanup=s(l):s.current=l}}catch(c){$e(e,t,c)}}function Fn(e,t){var s=e.ref,l=e.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(c){$e(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(c){$e(e,t,c)}else s.current=null}function Im(e){var t=e.type,s=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(c){$e(e,e.return,c)}}function Mu(e,t,s){try{var l=e.stateNode;S_(l,e.type,s,t),l[tn]=t}catch(c){$e(e,e.return,c)}}function Hm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ya(e.type)||e.tag===4}function Ru(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ya(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ou(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,t):(t=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,t.appendChild(e),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=ia));else if(l!==4&&(l===27&&Ya(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(Ou(e,t,s),e=e.sibling;e!==null;)Ou(e,t,s),e=e.sibling}function Yo(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(l!==4&&(l===27&&Ya(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Yo(e,t,s),e=e.sibling;e!==null;)Yo(e,t,s),e=e.sibling}function Pm(e){var t=e.stateNode,s=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Pt(t,l,s),t[zt]=e,t[tn]=s}catch(f){$e(e,e.return,f)}}var ma=!1,Nt=!1,Bu=!1,Gm=typeof WeakSet=="function"?WeakSet:Set,Bt=null;function WS(e,t){if(e=e.containerInfo,nd=pr,e=tp(e),Nc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var b=0,x=-1,N=-1,L=0,q=0,Y=e,z=null;t:for(;;){for(var H;Y!==s||c!==0&&Y.nodeType!==3||(x=b+c),Y!==f||l!==0&&Y.nodeType!==3||(N=b+l),Y.nodeType===3&&(b+=Y.nodeValue.length),(H=Y.firstChild)!==null;)z=Y,Y=H;for(;;){if(Y===e)break t;if(z===s&&++L===c&&(x=b),z===f&&++q===l&&(N=b),(H=Y.nextSibling)!==null)break;Y=z,z=Y.parentNode}Y=H}s=x===-1||N===-1?null:{start:x,end:N}}else s=null}s=s||{start:0,end:0}}else s=null;for(ad={focusedElem:e,selectionRange:s},pr=!1,Bt=t;Bt!==null;)if(t=Bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Bt=e;else for(;Bt!==null;){switch(t=Bt,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)c=e[s],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,s=t,c=f.memoizedProps,f=f.memoizedState,l=s.stateNode;try{var le=Cs(s.type,c);e=l.getSnapshotBeforeUpdate(le,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(pe){$e(s,s.return,pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)ld(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ld(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Bt=e;break}Bt=t.return}}function qm(e,t,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:ya(e,s),l&4&&ml(5,s);break;case 1:if(ya(e,s),l&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(b){$e(s,s.return,b)}else{var c=Cs(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){$e(s,s.return,b)}}l&64&&zm(s),l&512&&gl(s,s.return);break;case 3:if(ya(e,s),l&64&&(e=s.updateQueue,e!==null)){if(t=null,s.child!==null)switch(s.child.tag){case 27:case 5:t=s.child.stateNode;break;case 1:t=s.child.stateNode}try{Np(e,t)}catch(b){$e(s,s.return,b)}}break;case 27:t===null&&l&4&&Pm(s);case 26:case 5:ya(e,s),t===null&&l&4&&Im(s),l&512&&gl(s,s.return);break;case 12:ya(e,s);break;case 31:ya(e,s),l&4&&Ym(e,s);break;case 13:ya(e,s),l&4&&Km(e,s),l&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=r_.bind(null,s),N_(e,s))));break;case 22:if(l=s.memoizedState!==null||ma,!l){t=t!==null&&t.memoizedState!==null||Nt,c=ma;var f=Nt;ma=l,(Nt=t)&&!f?va(e,s,(s.subtreeFlags&8772)!==0):ya(e,s),ma=c,Nt=f}break;case 30:break;default:ya(e,s)}}function Fm(e){var t=e.alternate;t!==null&&(e.alternate=null,Fm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&dc(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var st=null,an=!1;function ga(e,t,s){for(s=s.child;s!==null;)$m(e,t,s),s=s.sibling}function $m(e,t,s){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(ot,s)}catch{}switch(s.tag){case 26:Nt||Fn(s,t),ga(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Nt||Fn(s,t);var l=st,c=an;Ya(s.type)&&(st=s.stateNode,an=!1),ga(e,t,s),Cl(s.stateNode),st=l,an=c;break;case 5:Nt||Fn(s,t);case 6:if(l=st,c=an,st=null,ga(e,t,s),st=l,an=c,st!==null)if(an)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(s.stateNode)}catch(f){$e(s,t,f)}else try{st.removeChild(s.stateNode)}catch(f){$e(s,t,f)}break;case 18:st!==null&&(an?(e=st,zg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),xi(e)):zg(st,s.stateNode));break;case 4:l=st,c=an,st=s.stateNode.containerInfo,an=!0,ga(e,t,s),st=l,an=c;break;case 0:case 11:case 14:case 15:Ia(2,s,t),Nt||Ia(4,s,t),ga(e,t,s);break;case 1:Nt||(Fn(s,t),l=s.stateNode,typeof l.componentWillUnmount=="function"&&Vm(s,t,l)),ga(e,t,s);break;case 21:ga(e,t,s);break;case 22:Nt=(l=Nt)||s.memoizedState!==null,ga(e,t,s),Nt=l;break;default:ga(e,t,s)}}function Ym(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{xi(e)}catch(s){$e(t,t.return,s)}}}function Km(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{xi(e)}catch(s){$e(t,t.return,s)}}function e_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Gm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Gm),t;default:throw Error(o(435,e.tag))}}function Ko(e,t){var s=e_(e);t.forEach(function(l){if(!s.has(l)){s.add(l);var c=c_.bind(null,e,l);l.then(c,c)}})}function sn(e,t){var s=t.deletions;if(s!==null)for(var l=0;l<s.length;l++){var c=s[l],f=e,b=t,x=b;e:for(;x!==null;){switch(x.tag){case 27:if(Ya(x.type)){st=x.stateNode,an=!1;break e}break;case 5:st=x.stateNode,an=!1;break e;case 3:case 4:st=x.stateNode.containerInfo,an=!0;break e}x=x.return}if(st===null)throw Error(o(160));$m(f,b,c),st=null,an=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Zm(t,e),t=t.sibling}var Vn=null;function Zm(e,t){var s=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:sn(t,e),ln(e),l&4&&(Ia(3,e,e.return),ml(3,e),Ia(5,e,e.return));break;case 1:sn(t,e),ln(e),l&512&&(Nt||s===null||Fn(s,s.return)),l&64&&ma&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?l:s.concat(l))));break;case 26:var c=Vn;if(sn(t,e),ln(e),l&512&&(Nt||s===null||Fn(s,s.return)),l&4){var f=s!==null?s.memoizedState:null;if(l=e.memoizedState,s===null)if(l===null)if(e.stateNode===null){e:{l=e.type,s=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":f=c.getElementsByTagName("title")[0],(!f||f[Gi]||f[zt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(l),c.head.insertBefore(f,c.querySelector("head > title"))),Pt(f,l,s),f[zt]=e,Ot(f),l=f;break e;case"link":var b=Zg("link","href",c).get(l+(s.href||""));if(b){for(var x=0;x<b.length;x++)if(f=b[x],f.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&f.getAttribute("rel")===(s.rel==null?null:s.rel)&&f.getAttribute("title")===(s.title==null?null:s.title)&&f.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){b.splice(x,1);break t}}f=c.createElement(l),Pt(f,l,s),c.head.appendChild(f);break;case"meta":if(b=Zg("meta","content",c).get(l+(s.content||""))){for(x=0;x<b.length;x++)if(f=b[x],f.getAttribute("content")===(s.content==null?null:""+s.content)&&f.getAttribute("name")===(s.name==null?null:s.name)&&f.getAttribute("property")===(s.property==null?null:s.property)&&f.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&f.getAttribute("charset")===(s.charSet==null?null:s.charSet)){b.splice(x,1);break t}}f=c.createElement(l),Pt(f,l,s),c.head.appendChild(f);break;default:throw Error(o(468,l))}f[zt]=e,Ot(f),l=f}e.stateNode=l}else Xg(c,e.type,e.stateNode);else e.stateNode=Kg(c,l,e.memoizedProps);else f!==l?(f===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):f.count--,l===null?Xg(c,e.type,e.stateNode):Kg(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Mu(e,e.memoizedProps,s.memoizedProps)}break;case 27:sn(t,e),ln(e),l&512&&(Nt||s===null||Fn(s,s.return)),s!==null&&l&4&&Mu(e,e.memoizedProps,s.memoizedProps);break;case 5:if(sn(t,e),ln(e),l&512&&(Nt||s===null||Fn(s,s.return)),e.flags&32){c=e.stateNode;try{Fs(c,"")}catch(le){$e(e,e.return,le)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Mu(e,c,s!==null?s.memoizedProps:c)),l&1024&&(Bu=!0);break;case 6:if(sn(t,e),ln(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,s=e.stateNode;try{s.nodeValue=l}catch(le){$e(e,e.return,le)}}break;case 3:if(ur=null,c=Vn,Vn=rr(t.containerInfo),sn(t,e),Vn=c,ln(e),l&4&&s!==null&&s.memoizedState.isDehydrated)try{xi(t.containerInfo)}catch(le){$e(e,e.return,le)}Bu&&(Bu=!1,Xm(e));break;case 4:l=Vn,Vn=rr(e.stateNode.containerInfo),sn(t,e),ln(e),Vn=l;break;case 12:sn(t,e),ln(e);break;case 31:sn(t,e),ln(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ko(e,l)));break;case 13:sn(t,e),ln(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Xo=ue()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ko(e,l)));break;case 22:c=e.memoizedState!==null;var N=s!==null&&s.memoizedState!==null,L=ma,q=Nt;if(ma=L||c,Nt=q||N,sn(t,e),Nt=q,ma=L,ln(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(s===null||N||ma||Nt||As(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){N=s=t;try{if(f=N.stateNode,c)b=f.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{x=N.stateNode;var Y=N.memoizedProps.style,z=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;x.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(le){$e(N,N.return,le)}}}else if(t.tag===6){if(s===null){N=t;try{N.stateNode.nodeValue=c?"":N.memoizedProps}catch(le){$e(N,N.return,le)}}}else if(t.tag===18){if(s===null){N=t;try{var H=N.stateNode;c?Vg(H,!0):Vg(N.stateNode,!1)}catch(le){$e(N,N.return,le)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;s===t&&(s=null),t=t.return}s===t&&(s=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(s=l.retryQueue,s!==null&&(l.retryQueue=null,Ko(e,s))));break;case 19:sn(t,e),ln(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ko(e,l)));break;case 30:break;case 21:break;default:sn(t,e),ln(e)}}function ln(e){var t=e.flags;if(t&2){try{for(var s,l=e.return;l!==null;){if(Hm(l)){s=l;break}l=l.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var c=s.stateNode,f=Ru(e);Yo(e,f,c);break;case 5:var b=s.stateNode;s.flags&32&&(Fs(b,""),s.flags&=-33);var x=Ru(e);Yo(e,x,b);break;case 3:case 4:var N=s.stateNode.containerInfo,L=Ru(e);Ou(e,L,N);break;default:throw Error(o(161))}}catch(q){$e(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Xm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ya(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)qm(e,t.alternate,t),t=t.sibling}function As(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ia(4,t,t.return),As(t);break;case 1:Fn(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&Vm(t,t.return,s),As(t);break;case 27:Cl(t.stateNode);case 26:case 5:Fn(t,t.return),As(t);break;case 22:t.memoizedState===null&&As(t);break;case 30:As(t);break;default:As(t)}e=e.sibling}}function va(e,t,s){for(s=s&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,f=t,b=f.flags;switch(f.tag){case 0:case 11:case 15:va(c,f,s),ml(4,f);break;case 1:if(va(c,f,s),l=f,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(L){$e(l,l.return,L)}if(l=f,c=l.updateQueue,c!==null){var x=l.stateNode;try{var N=c.shared.hiddenCallbacks;if(N!==null)for(c.shared.hiddenCallbacks=null,c=0;c<N.length;c++)jp(N[c],x)}catch(L){$e(l,l.return,L)}}s&&b&64&&zm(f),gl(f,f.return);break;case 27:Pm(f);case 26:case 5:va(c,f,s),s&&l===null&&b&4&&Im(f),gl(f,f.return);break;case 12:va(c,f,s);break;case 31:va(c,f,s),s&&b&4&&Ym(c,f);break;case 13:va(c,f,s),s&&b&4&&Km(c,f);break;case 22:f.memoizedState===null&&va(c,f,s),gl(f,f.return);break;case 30:break;default:va(c,f,s)}t=t.sibling}}function Lu(e,t){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&nl(s))}function Uu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&nl(e))}function In(e,t,s,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Qm(e,t,s,l),t=t.sibling}function Qm(e,t,s,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:In(e,t,s,l),c&2048&&ml(9,t);break;case 1:In(e,t,s,l);break;case 3:In(e,t,s,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&nl(e)));break;case 12:if(c&2048){In(e,t,s,l),e=t.stateNode;try{var f=t.memoizedProps,b=f.id,x=f.onPostCommit;typeof x=="function"&&x(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){$e(t,t.return,N)}}else In(e,t,s,l);break;case 31:In(e,t,s,l);break;case 13:In(e,t,s,l);break;case 23:break;case 22:f=t.stateNode,b=t.alternate,t.memoizedState!==null?f._visibility&2?In(e,t,s,l):yl(e,t):f._visibility&2?In(e,t,s,l):(f._visibility|=2,di(e,t,s,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Lu(b,t);break;case 24:In(e,t,s,l),c&2048&&Uu(t.alternate,t);break;default:In(e,t,s,l)}}function di(e,t,s,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,b=t,x=s,N=l,L=b.flags;switch(b.tag){case 0:case 11:case 15:di(f,b,x,N,c),ml(8,b);break;case 23:break;case 22:var q=b.stateNode;b.memoizedState!==null?q._visibility&2?di(f,b,x,N,c):yl(f,b):(q._visibility|=2,di(f,b,x,N,c)),c&&L&2048&&Lu(b.alternate,b);break;case 24:di(f,b,x,N,c),c&&L&2048&&Uu(b.alternate,b);break;default:di(f,b,x,N,c)}t=t.sibling}}function yl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var s=e,l=t,c=l.flags;switch(l.tag){case 22:yl(s,l),c&2048&&Lu(l.alternate,l);break;case 24:yl(s,l),c&2048&&Uu(l.alternate,l);break;default:yl(s,l)}t=t.sibling}}var vl=8192;function fi(e,t,s){if(e.subtreeFlags&vl)for(e=e.child;e!==null;)Jm(e,t,s),e=e.sibling}function Jm(e,t,s){switch(e.tag){case 26:fi(e,t,s),e.flags&vl&&e.memoizedState!==null&&I_(s,Vn,e.memoizedState,e.memoizedProps);break;case 5:fi(e,t,s);break;case 3:case 4:var l=Vn;Vn=rr(e.stateNode.containerInfo),fi(e,t,s),Vn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=vl,vl=16777216,fi(e,t,s),vl=l):fi(e,t,s));break;default:fi(e,t,s)}}function Wm(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function bl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];Bt=l,tg(l,e)}Wm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)eg(e),e=e.sibling}function eg(e){switch(e.tag){case 0:case 11:case 15:bl(e),e.flags&2048&&Ia(9,e,e.return);break;case 3:bl(e);break;case 12:bl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Zo(e)):bl(e);break;default:bl(e)}}function Zo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];Bt=l,tg(l,e)}Wm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ia(8,t,t.return),Zo(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,Zo(t));break;default:Zo(t)}e=e.sibling}}function tg(e,t){for(;Bt!==null;){var s=Bt;switch(s.tag){case 0:case 11:case 15:Ia(8,s,t);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:nl(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,Bt=l;else e:for(s=e;Bt!==null;){l=Bt;var c=l.sibling,f=l.return;if(Fm(l),l===s){Bt=null;break e}if(c!==null){c.return=f,Bt=c;break e}Bt=f}}}var t_={getCacheForType:function(e){var t=It(Ct),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return It(Ct).controller.signal}},n_=typeof WeakMap=="function"?WeakMap:Map,He=0,Je=null,De=null,Re=0,Fe=0,pn=null,Ha=!1,hi=!1,zu=!1,ba=0,dt=0,Pa=0,js=0,Vu=0,mn=0,pi=0,Sl=null,on=null,Iu=!1,Xo=0,ng=0,Qo=1/0,Jo=null,Ga=null,kt=0,qa=null,mi=null,Sa=0,Hu=0,Pu=null,ag=null,_l=0,Gu=null;function gn(){return(He&2)!==0&&Re!==0?Re&-Re:U.T!==null?Zu():bh()}function sg(){if(mn===0)if((Re&536870912)===0||Le){var e=us;us<<=1,(us&3932160)===0&&(us=262144),mn=e}else mn=536870912;return e=fn.current,e!==null&&(e.flags|=32),mn}function rn(e,t,s){(e===Je&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)&&(gi(e,0),Fa(e,Re,mn,!1)),Pi(e,s),((He&2)===0||e!==Je)&&(e===Je&&((He&2)===0&&(js|=s),dt===4&&Fa(e,Re,mn,!1)),$n(e))}function ig(e,t,s){if((He&6)!==0)throw Error(o(327));var l=!s&&(t&127)===0&&(t&e.expiredLanes)===0||ie(e,t),c=l?i_(e,t):Fu(e,t,!0),f=l;do{if(c===0){hi&&!l&&Fa(e,t,0,!1);break}else{if(s=e.current.alternate,f&&!a_(s)){c=Fu(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var x=e;c=Sl;var N=x.current.memoizedState.isDehydrated;if(N&&(gi(x,b).flags|=256),b=Fu(x,b,!1),b!==2){if(zu&&!N){x.errorRecoveryDisabledLanes|=f,js|=f,c=4;break e}f=on,on=c,f!==null&&(on===null?on=f:on.push.apply(on,f))}c=b}if(f=!1,c!==2)continue}}if(c===1){gi(e,0),Fa(e,t,0,!0);break}e:{switch(l=e,f=c,f){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Fa(l,t,mn,!Ha);break e;case 2:on=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=Xo+300-ue(),10<c)){if(Fa(l,t,mn,!Ha),gt(l,0,!0)!==0)break e;Sa=t,l.timeoutHandle=Lg(lg.bind(null,l,s,on,Jo,Iu,t,mn,js,pi,Ha,f,"Throttled",-0,0),c);break e}lg(l,s,on,Jo,Iu,t,mn,js,pi,Ha,f,null,-0,0)}}break}while(!0);$n(e)}function lg(e,t,s,l,c,f,b,x,N,L,q,Y,z,H){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ia},Jm(t,f,Y);var le=(f&62914560)===f?Xo-ue():(f&4194048)===f?ng-ue():0;if(le=H_(Y,le),le!==null){Sa=f,e.cancelPendingCommit=le(pg.bind(null,e,t,f,s,l,c,b,x,N,q,Y,null,z,H)),Fa(e,f,b,!L);return}}pg(e,t,f,s,l,c,b,x,N)}function a_(e){for(var t=e;;){var s=t.tag;if((s===0||s===11||s===15)&&t.flags&16384&&(s=t.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var l=0;l<s.length;l++){var c=s[l],f=c.getSnapshot;c=c.value;try{if(!un(f(),c))return!1}catch{return!1}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Fa(e,t,s,l){t&=~Vu,t&=~js,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var f=31-mt(c),b=1<<f;l[f]=-1,c&=~b}s!==0&&gh(e,s,t)}function Wo(){return(He&6)===0?(xl(0),!1):!0}function qu(){if(De!==null){if(Fe===0)var e=De.return;else e=De,ca=vs=null,lu(e),li=null,sl=0,e=De;for(;e!==null;)Um(e.alternate,e),e=e.return;De=null}}function gi(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,T_(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Sa=0,qu(),Je=e,De=s=oa(e.current,null),Re=t,Fe=0,pn=null,Ha=!1,hi=ie(e,t),zu=!1,pi=mn=Vu=js=Pa=dt=0,on=Sl=null,Iu=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-mt(l),f=1<<c;t|=e[c],l&=~f}return ba=t,So(),s}function og(e,t){Ce=null,U.H=fl,t===ii||t===No?(t=Tp(),Fe=3):t===Kc?(t=Tp(),Fe=4):Fe=t===xu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pn=t,De===null&&(dt=1,Po(e,En(t,e.current)))}function rg(){var e=fn.current;return e===null?!0:(Re&4194048)===Re?Nn===null:(Re&62914560)===Re||(Re&536870912)!==0?e===Nn:!1}function cg(){var e=U.H;return U.H=fl,e===null?fl:e}function ug(){var e=U.A;return U.A=t_,e}function er(){dt=4,Ha||(Re&4194048)!==Re&&fn.current!==null||(hi=!0),(Pa&134217727)===0&&(js&134217727)===0||Je===null||Fa(Je,Re,mn,!1)}function Fu(e,t,s){var l=He;He|=2;var c=cg(),f=ug();(Je!==e||Re!==t)&&(Jo=null,gi(e,t)),t=!1;var b=dt;e:do try{if(Fe!==0&&De!==null){var x=De,N=pn;switch(Fe){case 8:qu(),b=6;break e;case 3:case 2:case 9:case 6:fn.current===null&&(t=!0);var L=Fe;if(Fe=0,pn=null,yi(e,x,N,L),s&&hi){b=0;break e}break;default:L=Fe,Fe=0,pn=null,yi(e,x,N,L)}}s_(),b=dt;break}catch(q){og(e,q)}while(!0);return t&&e.shellSuspendCounter++,ca=vs=null,He=l,U.H=c,U.A=f,De===null&&(Je=null,Re=0,So()),b}function s_(){for(;De!==null;)dg(De)}function i_(e,t){var s=He;He|=2;var l=cg(),c=ug();Je!==e||Re!==t?(Jo=null,Qo=ue()+500,gi(e,t)):hi=ie(e,t);e:do try{if(Fe!==0&&De!==null){t=De;var f=pn;t:switch(Fe){case 1:Fe=0,pn=null,yi(e,t,f,1);break;case 2:case 9:if(_p(f)){Fe=0,pn=null,fg(t);break}t=function(){Fe!==2&&Fe!==9||Je!==e||(Fe=7),$n(e)},f.then(t,t);break e;case 3:Fe=7;break e;case 4:Fe=5;break e;case 7:_p(f)?(Fe=0,pn=null,fg(t)):(Fe=0,pn=null,yi(e,t,f,7));break;case 5:var b=null;switch(De.tag){case 26:b=De.memoizedState;case 5:case 27:var x=De;if(b?Qg(b):x.stateNode.complete){Fe=0,pn=null;var N=x.sibling;if(N!==null)De=N;else{var L=x.return;L!==null?(De=L,tr(L)):De=null}break t}}Fe=0,pn=null,yi(e,t,f,5);break;case 6:Fe=0,pn=null,yi(e,t,f,6);break;case 8:qu(),dt=6;break e;default:throw Error(o(462))}}l_();break}catch(q){og(e,q)}while(!0);return ca=vs=null,U.H=l,U.A=c,He=s,De!==null?0:(Je=null,Re=0,So(),dt)}function l_(){for(;De!==null&&!ae();)dg(De)}function dg(e){var t=Bm(e.alternate,e,ba);e.memoizedProps=e.pendingProps,t===null?tr(e):De=t}function fg(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=wm(s,t,t.pendingProps,t.type,void 0,Re);break;case 11:t=wm(s,t,t.pendingProps,t.type.render,t.ref,Re);break;case 5:lu(t);default:Um(s,t),t=De=up(t,ba),t=Bm(s,t,ba)}e.memoizedProps=e.pendingProps,t===null?tr(e):De=t}function yi(e,t,s,l){ca=vs=null,lu(t),li=null,sl=0;var c=t.return;try{if(KS(e,c,t,s,Re)){dt=1,Po(e,En(s,e.current)),De=null;return}}catch(f){if(c!==null)throw De=c,f;dt=1,Po(e,En(s,e.current)),De=null;return}t.flags&32768?(Le||l===1?e=!0:hi||(Re&536870912)!==0?e=!1:(Ha=e=!0,(l===2||l===9||l===3||l===6)&&(l=fn.current,l!==null&&l.tag===13&&(l.flags|=16384))),hg(t,e)):tr(t)}function tr(e){var t=e;do{if((t.flags&32768)!==0){hg(t,Ha);return}e=t.return;var s=QS(t.alternate,t,ba);if(s!==null){De=s;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);dt===0&&(dt=5)}function hg(e,t){do{var s=JS(e.alternate,e);if(s!==null){s.flags&=32767,De=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){De=e;return}De=e=s}while(e!==null);dt=6,De=null}function pg(e,t,s,l,c,f,b,x,N){e.cancelPendingCommit=null;do nr();while(kt!==0);if((He&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(f=t.lanes|t.childLanes,f|=Rc,V1(e,s,f,b,x,N),e===Je&&(De=Je=null,Re=0),mi=t,qa=e,Sa=s,Hu=f,Pu=c,ag=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,u_(Me,function(){return bg(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=U.T,U.T=null,c=K.p,K.p=2,b=He,He|=4;try{WS(e,t,s)}finally{He=b,K.p=c,U.T=l}}kt=1,mg(),gg(),yg()}}function mg(){if(kt===1){kt=0;var e=qa,t=mi,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=U.T,U.T=null;var l=K.p;K.p=2;var c=He;He|=4;try{Zm(t,e);var f=ad,b=tp(e.containerInfo),x=f.focusedElem,N=f.selectionRange;if(b!==x&&x&&x.ownerDocument&&ep(x.ownerDocument.documentElement,x)){if(N!==null&&Nc(x)){var L=N.start,q=N.end;if(q===void 0&&(q=L),"selectionStart"in x)x.selectionStart=L,x.selectionEnd=Math.min(q,x.value.length);else{var Y=x.ownerDocument||document,z=Y&&Y.defaultView||window;if(z.getSelection){var H=z.getSelection(),le=x.textContent.length,pe=Math.min(N.start,le),Ze=N.end===void 0?pe:Math.min(N.end,le);!H.extend&&pe>Ze&&(b=Ze,Ze=pe,pe=b);var R=Wh(x,pe),D=Wh(x,Ze);if(R&&D&&(H.rangeCount!==1||H.anchorNode!==R.node||H.anchorOffset!==R.offset||H.focusNode!==D.node||H.focusOffset!==D.offset)){var B=Y.createRange();B.setStart(R.node,R.offset),H.removeAllRanges(),pe>Ze?(H.addRange(B),H.extend(D.node,D.offset)):(B.setEnd(D.node,D.offset),H.addRange(B))}}}}for(Y=[],H=x;H=H.parentNode;)H.nodeType===1&&Y.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<Y.length;x++){var $=Y[x];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}pr=!!nd,ad=nd=null}finally{He=c,K.p=l,U.T=s}}e.current=t,kt=2}}function gg(){if(kt===2){kt=0;var e=qa,t=mi,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=U.T,U.T=null;var l=K.p;K.p=2;var c=He;He|=4;try{qm(e,t.alternate,t)}finally{He=c,K.p=l,U.T=s}}kt=3}}function yg(){if(kt===4||kt===3){kt=0,oe();var e=qa,t=mi,s=Sa,l=ag;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?kt=5:(kt=0,mi=qa=null,vg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Ga=null),cc(s),t=t.stateNode,Et&&typeof Et.onCommitFiberRoot=="function")try{Et.onCommitFiberRoot(ot,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=U.T,c=K.p,K.p=2,U.T=null;try{for(var f=e.onRecoverableError,b=0;b<l.length;b++){var x=l[b];f(x.value,{componentStack:x.stack})}}finally{U.T=t,K.p=c}}(Sa&3)!==0&&nr(),$n(e),c=e.pendingLanes,(s&261930)!==0&&(c&42)!==0?e===Gu?_l++:(_l=0,Gu=e):_l=0,xl(0)}}function vg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,nl(t)))}function nr(){return mg(),gg(),yg(),bg()}function bg(){if(kt!==5)return!1;var e=qa,t=Hu;Hu=0;var s=cc(Sa),l=U.T,c=K.p;try{K.p=32>s?32:s,U.T=null,s=Pu,Pu=null;var f=qa,b=Sa;if(kt=0,mi=qa=null,Sa=0,(He&6)!==0)throw Error(o(331));var x=He;if(He|=4,eg(f.current),Qm(f,f.current,b,s),He=x,xl(0,!1),Et&&typeof Et.onPostCommitFiberRoot=="function")try{Et.onPostCommitFiberRoot(ot,f)}catch{}return!0}finally{K.p=c,U.T=l,vg(e,t)}}function Sg(e,t,s){t=En(s,t),t=_u(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(Pi(e,2),$n(e))}function $e(e,t,s){if(e.tag===3)Sg(e,e,s);else for(;t!==null;){if(t.tag===3){Sg(t,e,s);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ga===null||!Ga.has(l))){e=En(s,e),s=_m(2),l=Ua(t,s,2),l!==null&&(xm(s,l,t,e),Pi(l,2),$n(l));break}}t=t.return}}function $u(e,t,s){var l=e.pingCache;if(l===null){l=e.pingCache=new n_;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(s)||(zu=!0,c.add(s),e=o_.bind(null,e,t,s),t.then(e,e))}function o_(e,t,s){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,Je===e&&(Re&s)===s&&(dt===4||dt===3&&(Re&62914560)===Re&&300>ue()-Xo?(He&2)===0&&gi(e,0):Vu|=s,pi===Re&&(pi=0)),$n(e)}function _g(e,t){t===0&&(t=aa()),e=ms(e,t),e!==null&&(Pi(e,t),$n(e))}function r_(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),_g(e,s)}function c_(e,t){var s=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),_g(e,s)}function u_(e,t){return ta(e,t)}var ar=null,vi=null,Yu=!1,sr=!1,Ku=!1,$a=0;function $n(e){e!==vi&&e.next===null&&(vi===null?ar=vi=e:vi=vi.next=e),sr=!0,Yu||(Yu=!0,f_())}function xl(e,t){if(!Ku&&sr){Ku=!0;do for(var s=!1,l=ar;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var f=0;else{var b=l.suspendedLanes,x=l.pingedLanes;f=(1<<31-mt(42|e)+1)-1,f&=c&~(b&~x),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,Cg(l,f))}else f=Re,f=gt(l,l===Je?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||ie(l,f)||(s=!0,Cg(l,f));l=l.next}while(s);Ku=!1}}function d_(){xg()}function xg(){sr=Yu=!1;var e=0;$a!==0&&x_()&&(e=$a);for(var t=ue(),s=null,l=ar;l!==null;){var c=l.next,f=Tg(l,t);f===0?(l.next=null,s===null?ar=c:s.next=c,c===null&&(vi=s)):(s=l,(e!==0||(f&3)!==0)&&(sr=!0)),l=c}kt!==0&&kt!==5||xl(e),$a!==0&&($a=0)}function Tg(e,t){for(var s=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var b=31-mt(f),x=1<<b,N=c[b];N===-1?((x&s)===0||(x&l)!==0)&&(c[b]=Ut(x,t)):N<=t&&(e.expiredLanes|=x),f&=~x}if(t=Je,s=Re,s=gt(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,s===0||e===t&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Z(l),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||ie(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(l!==null&&Z(l),cc(s)){case 2:case 8:s=Qe;break;case 32:s=Me;break;case 268435456:s=Dt;break;default:s=Me}return l=Eg.bind(null,e),s=ta(s,l),e.callbackPriority=t,e.callbackNode=s,t}return l!==null&&l!==null&&Z(l),e.callbackPriority=2,e.callbackNode=null,2}function Eg(e,t){if(kt!==0&&kt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(nr()&&e.callbackNode!==s)return null;var l=Re;return l=gt(e,e===Je?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(ig(e,l,t),Tg(e,ue()),e.callbackNode!=null&&e.callbackNode===s?Eg.bind(null,e):null)}function Cg(e,t){if(nr())return null;ig(e,t,!0)}function f_(){E_(function(){(He&6)!==0?ta(Se,d_):xg()})}function Zu(){if($a===0){var e=ai;e===0&&(e=na,na<<=1,(na&261888)===0&&(na=256)),$a=e}return $a}function Ag(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:fo(""+e)}function jg(e,t){var s=t.ownerDocument.createElement("input");return s.name=t.name,s.value=t.value,e.id&&s.setAttribute("form",e.id),t.parentNode.insertBefore(s,t),e=new FormData(e),s.parentNode.removeChild(s),e}function h_(e,t,s,l,c){if(t==="submit"&&s&&s.stateNode===c){var f=Ag((c[tn]||null).action),b=l.submitter;b&&(t=(t=b[tn]||null)?Ag(t.formAction):b.getAttribute("formAction"),t!==null&&(f=t,b=null));var x=new go("action","action",null,l,c);e.push({event:x,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if($a!==0){var N=b?jg(c,b):new FormData(c);mu(s,{pending:!0,data:N,method:c.method,action:f},null,N)}}else typeof f=="function"&&(x.preventDefault(),N=b?jg(c,b):new FormData(c),mu(s,{pending:!0,data:N,method:c.method,action:f},f,N))},currentTarget:c}]})}}for(var Xu=0;Xu<Mc.length;Xu++){var Qu=Mc[Xu],p_=Qu.toLowerCase(),m_=Qu[0].toUpperCase()+Qu.slice(1);zn(p_,"on"+m_)}zn(sp,"onAnimationEnd"),zn(ip,"onAnimationIteration"),zn(lp,"onAnimationStart"),zn("dblclick","onDoubleClick"),zn("focusin","onFocus"),zn("focusout","onBlur"),zn(kS,"onTransitionRun"),zn(MS,"onTransitionStart"),zn(RS,"onTransitionCancel"),zn(op,"onTransitionEnd"),Gs("onMouseEnter",["mouseout","mouseover"]),Gs("onMouseLeave",["mouseout","mouseover"]),Gs("onPointerEnter",["pointerout","pointerover"]),Gs("onPointerLeave",["pointerout","pointerover"]),ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ds("onBeforeInput",["compositionend","keypress","textInput","paste"]),ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tl="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(" "),g_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Tl));function Ng(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var l=e[s],c=l.event;l=l.listeners;e:{var f=void 0;if(t)for(var b=l.length-1;0<=b;b--){var x=l[b],N=x.instance,L=x.currentTarget;if(x=x.listener,N!==f&&c.isPropagationStopped())break e;f=x,c.currentTarget=L;try{f(c)}catch(q){bo(q)}c.currentTarget=null,f=N}else for(b=0;b<l.length;b++){if(x=l[b],N=x.instance,L=x.currentTarget,x=x.listener,N!==f&&c.isPropagationStopped())break e;f=x,c.currentTarget=L;try{f(c)}catch(q){bo(q)}c.currentTarget=null,f=N}}}}function ke(e,t){var s=t[uc];s===void 0&&(s=t[uc]=new Set);var l=e+"__bubble";s.has(l)||(wg(t,e,2,!1),s.add(l))}function Ju(e,t,s){var l=0;t&&(l|=4),wg(s,e,l,t)}var ir="_reactListening"+Math.random().toString(36).slice(2);function Wu(e){if(!e[ir]){e[ir]=!0,xh.forEach(function(s){s!=="selectionchange"&&(g_.has(s)||Ju(s,!1,e),Ju(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ir]||(t[ir]=!0,Ju("selectionchange",!1,t))}}function wg(e,t,s,l){switch(sy(t)){case 2:var c=q_;break;case 8:c=F_;break;default:c=pd}s=c.bind(null,t,s,e),c=void 0,!bc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,s,{capture:!0,passive:c}):e.addEventListener(t,s,!0):c!==void 0?e.addEventListener(t,s,{passive:c}):e.addEventListener(t,s,!1)}function ed(e,t,s,l,c){var f=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var b=l.tag;if(b===3||b===4){var x=l.stateNode.containerInfo;if(x===c)break;if(b===4)for(b=l.return;b!==null;){var N=b.tag;if((N===3||N===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;x!==null;){if(b=Is(x),b===null)return;if(N=b.tag,N===5||N===6||N===26||N===27){l=f=b;continue e}x=x.parentNode}}l=l.return}Oh(function(){var L=f,q=yc(s),Y=[];e:{var z=rp.get(e);if(z!==void 0){var H=go,le=e;switch(e){case"keypress":if(po(s)===0)break e;case"keydown":case"keyup":H=cS;break;case"focusin":le="focus",H=Tc;break;case"focusout":le="blur",H=Tc;break;case"beforeblur":case"afterblur":H=Tc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=Uh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=Q1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=fS;break;case sp:case ip:case lp:H=eS;break;case op:H=pS;break;case"scroll":case"scrollend":H=Z1;break;case"wheel":H=gS;break;case"copy":case"cut":case"paste":H=nS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=Vh;break;case"toggle":case"beforetoggle":H=vS}var pe=(t&4)!==0,Ze=!pe&&(e==="scroll"||e==="scrollend"),R=pe?z!==null?z+"Capture":null:z;pe=[];for(var D=L,B;D!==null;){var $=D;if(B=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||B===null||R===null||($=Fi(D,R),$!=null&&pe.push(El(D,$,B))),Ze)break;D=D.return}0<pe.length&&(z=new H(z,le,null,s,q),Y.push({event:z,listeners:pe}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",H=e==="mouseout"||e==="pointerout",z&&s!==gc&&(le=s.relatedTarget||s.fromElement)&&(Is(le)||le[Vs]))break e;if((H||z)&&(z=q.window===q?q:(z=q.ownerDocument)?z.defaultView||z.parentWindow:window,H?(le=s.relatedTarget||s.toElement,H=L,le=le?Is(le):null,le!==null&&(Ze=u(le),pe=le.tag,le!==Ze||pe!==5&&pe!==27&&pe!==6)&&(le=null)):(H=null,le=L),H!==le)){if(pe=Uh,$="onMouseLeave",R="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(pe=Vh,$="onPointerLeave",R="onPointerEnter",D="pointer"),Ze=H==null?z:qi(H),B=le==null?z:qi(le),z=new pe($,D+"leave",H,s,q),z.target=Ze,z.relatedTarget=B,$=null,Is(q)===L&&(pe=new pe(R,D+"enter",le,s,q),pe.target=B,pe.relatedTarget=Ze,$=pe),Ze=$,H&&le)t:{for(pe=y_,R=H,D=le,B=0,$=R;$;$=pe($))B++;$=0;for(var fe=D;fe;fe=pe(fe))$++;for(;0<B-$;)R=pe(R),B--;for(;0<$-B;)D=pe(D),$--;for(;B--;){if(R===D||D!==null&&R===D.alternate){pe=R;break t}R=pe(R),D=pe(D)}pe=null}else pe=null;H!==null&&Dg(Y,z,H,pe,!1),le!==null&&Ze!==null&&Dg(Y,Ze,le,pe,!0)}}e:{if(z=L?qi(L):window,H=z.nodeName&&z.nodeName.toLowerCase(),H==="select"||H==="input"&&z.type==="file")var ze=Yh;else if(Fh(z))if(Kh)ze=NS;else{ze=AS;var de=CS}else H=z.nodeName,!H||H.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?L&&mc(L.elementType)&&(ze=Yh):ze=jS;if(ze&&(ze=ze(e,L))){$h(Y,ze,s,q);break e}de&&de(e,z,L),e==="focusout"&&L&&z.type==="number"&&L.memoizedProps.value!=null&&pc(z,"number",z.value)}switch(de=L?qi(L):window,e){case"focusin":(Fh(de)||de.contentEditable==="true")&&(Zs=de,wc=L,Wi=null);break;case"focusout":Wi=wc=Zs=null;break;case"mousedown":Dc=!0;break;case"contextmenu":case"mouseup":case"dragend":Dc=!1,np(Y,s,q);break;case"selectionchange":if(DS)break;case"keydown":case"keyup":np(Y,s,q)}var Ne;if(Cc)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else Ks?Gh(e,s)&&(Oe="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Oe="onCompositionStart");Oe&&(Ih&&s.locale!=="ko"&&(Ks||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&Ks&&(Ne=Bh()):(Da=q,Sc="value"in Da?Da.value:Da.textContent,Ks=!0)),de=lr(L,Oe),0<de.length&&(Oe=new zh(Oe,e,null,s,q),Y.push({event:Oe,listeners:de}),Ne?Oe.data=Ne:(Ne=qh(s),Ne!==null&&(Oe.data=Ne)))),(Ne=SS?_S(e,s):xS(e,s))&&(Oe=lr(L,"onBeforeInput"),0<Oe.length&&(de=new zh("onBeforeInput","beforeinput",null,s,q),Y.push({event:de,listeners:Oe}),de.data=Ne)),h_(Y,e,L,s,q)}Ng(Y,t)})}function El(e,t,s){return{instance:e,listener:t,currentTarget:s}}function lr(e,t){for(var s=t+"Capture",l=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=Fi(e,s),c!=null&&l.unshift(El(e,c,f)),c=Fi(e,t),c!=null&&l.push(El(e,c,f))),e.tag===3)return l;e=e.return}return[]}function y_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dg(e,t,s,l,c){for(var f=t._reactName,b=[];s!==null&&s!==l;){var x=s,N=x.alternate,L=x.stateNode;if(x=x.tag,N!==null&&N===l)break;x!==5&&x!==26&&x!==27||L===null||(N=L,c?(L=Fi(s,f),L!=null&&b.unshift(El(s,L,N))):c||(L=Fi(s,f),L!=null&&b.push(El(s,L,N)))),s=s.return}b.length!==0&&e.push({event:t,listeners:b})}var v_=/\r\n?/g,b_=/\u0000|\uFFFD/g;function kg(e){return(typeof e=="string"?e:""+e).replace(v_,`
|
|
25
|
+
`).replace(b_,"")}function Mg(e,t){return t=kg(t),kg(e)===t}function Ke(e,t,s,l,c,f){switch(s){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Fs(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Fs(e,""+l);break;case"className":co(e,"class",l);break;case"tabIndex":co(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":co(e,s,l);break;case"style":Mh(e,l,f);break;case"data":if(t!=="object"){co(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||s!=="href")){e.removeAttribute(s);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=fo(""+l),e.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(s,"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 f=="function"&&(s==="formAction"?(t!=="input"&&Ke(e,t,"name",c.name,c,null),Ke(e,t,"formEncType",c.formEncType,c,null),Ke(e,t,"formMethod",c.formMethod,c,null),Ke(e,t,"formTarget",c.formTarget,c,null)):(Ke(e,t,"encType",c.encType,c,null),Ke(e,t,"method",c.method,c,null),Ke(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=fo(""+l),e.setAttribute(s,l);break;case"onClick":l!=null&&(e.onclick=ia);break;case"onScroll":l!=null&&ke("scroll",e);break;case"onScrollEnd":l!=null&&ke("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(s=l.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}s=fo(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""+l):e.removeAttribute(s);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":l===!0?e.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,l):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(s,l):e.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(s):e.setAttribute(s,l);break;case"popover":ke("beforetoggle",e),ke("toggle",e),ro(e,"popover",l);break;case"xlinkActuate":sa(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":sa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":sa(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":sa(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":sa(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":sa(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":sa(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":sa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":sa(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ro(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=Y1.get(s)||s,ro(e,s,l))}}function td(e,t,s,l,c,f){switch(s){case"style":Mh(e,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(s=l.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"children":typeof l=="string"?Fs(e,l):(typeof l=="number"||typeof l=="bigint")&&Fs(e,""+l);break;case"onScroll":l!=null&&ke("scroll",e);break;case"onScrollEnd":l!=null&&ke("scrollend",e);break;case"onClick":l!=null&&(e.onclick=ia);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Th.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(c=s.endsWith("Capture"),t=s.slice(2,c?s.length-7:void 0),f=e[tn]||null,f=f!=null?f[s]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof l=="function")){typeof f!="function"&&f!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(t,l,c);break e}s in e?e[s]=l:l===!0?e.setAttribute(s,""):ro(e,s,l)}}}function Pt(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ke("error",e),ke("load",e);var l=!1,c=!1,f;for(f in s)if(s.hasOwnProperty(f)){var b=s[f];if(b!=null)switch(f){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ke(e,t,f,b,s,null)}}c&&Ke(e,t,"srcSet",s.srcSet,s,null),l&&Ke(e,t,"src",s.src,s,null);return;case"input":ke("invalid",e);var x=f=b=c=null,N=null,L=null;for(l in s)if(s.hasOwnProperty(l)){var q=s[l];if(q!=null)switch(l){case"name":c=q;break;case"type":b=q;break;case"checked":N=q;break;case"defaultChecked":L=q;break;case"value":f=q;break;case"defaultValue":x=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(o(137,t));break;default:Ke(e,t,l,q,s,null)}}Nh(e,f,x,N,L,b,c,!1);return;case"select":ke("invalid",e),l=b=f=null;for(c in s)if(s.hasOwnProperty(c)&&(x=s[c],x!=null))switch(c){case"value":f=x;break;case"defaultValue":b=x;break;case"multiple":l=x;default:Ke(e,t,c,x,s,null)}t=f,s=b,e.multiple=!!l,t!=null?qs(e,!!l,t,!1):s!=null&&qs(e,!!l,s,!0);return;case"textarea":ke("invalid",e),f=c=l=null;for(b in s)if(s.hasOwnProperty(b)&&(x=s[b],x!=null))switch(b){case"value":l=x;break;case"defaultValue":c=x;break;case"children":f=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(o(91));break;default:Ke(e,t,b,x,s,null)}Dh(e,l,c,f);return;case"option":for(N in s)if(s.hasOwnProperty(N)&&(l=s[N],l!=null))switch(N){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ke(e,t,N,l,s,null)}return;case"dialog":ke("beforetoggle",e),ke("toggle",e),ke("cancel",e),ke("close",e);break;case"iframe":case"object":ke("load",e);break;case"video":case"audio":for(l=0;l<Tl.length;l++)ke(Tl[l],e);break;case"image":ke("error",e),ke("load",e);break;case"details":ke("toggle",e);break;case"embed":case"source":case"link":ke("error",e),ke("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(L in s)if(s.hasOwnProperty(L)&&(l=s[L],l!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ke(e,t,L,l,s,null)}return;default:if(mc(t)){for(q in s)s.hasOwnProperty(q)&&(l=s[q],l!==void 0&&td(e,t,q,l,s,void 0));return}}for(x in s)s.hasOwnProperty(x)&&(l=s[x],l!=null&&Ke(e,t,x,l,s,null))}function S_(e,t,s,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,b=null,x=null,N=null,L=null,q=null;for(H in s){var Y=s[H];if(s.hasOwnProperty(H)&&Y!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":N=Y;default:l.hasOwnProperty(H)||Ke(e,t,H,null,l,Y)}}for(var z in l){var H=l[z];if(Y=s[z],l.hasOwnProperty(z)&&(H!=null||Y!=null))switch(z){case"type":f=H;break;case"name":c=H;break;case"checked":L=H;break;case"defaultChecked":q=H;break;case"value":b=H;break;case"defaultValue":x=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(o(137,t));break;default:H!==Y&&Ke(e,t,z,H,l,Y)}}hc(e,b,x,N,L,q,f,c);return;case"select":H=b=x=z=null;for(f in s)if(N=s[f],s.hasOwnProperty(f)&&N!=null)switch(f){case"value":break;case"multiple":H=N;default:l.hasOwnProperty(f)||Ke(e,t,f,null,l,N)}for(c in l)if(f=l[c],N=s[c],l.hasOwnProperty(c)&&(f!=null||N!=null))switch(c){case"value":z=f;break;case"defaultValue":x=f;break;case"multiple":b=f;default:f!==N&&Ke(e,t,c,f,l,N)}t=x,s=b,l=H,z!=null?qs(e,!!s,z,!1):!!l!=!!s&&(t!=null?qs(e,!!s,t,!0):qs(e,!!s,s?[]:"",!1));return;case"textarea":H=z=null;for(x in s)if(c=s[x],s.hasOwnProperty(x)&&c!=null&&!l.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Ke(e,t,x,null,l,c)}for(b in l)if(c=l[b],f=s[b],l.hasOwnProperty(b)&&(c!=null||f!=null))switch(b){case"value":z=c;break;case"defaultValue":H=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==f&&Ke(e,t,b,c,l,f)}wh(e,z,H);return;case"option":for(var le in s)if(z=s[le],s.hasOwnProperty(le)&&z!=null&&!l.hasOwnProperty(le))switch(le){case"selected":e.selected=!1;break;default:Ke(e,t,le,null,l,z)}for(N in l)if(z=l[N],H=s[N],l.hasOwnProperty(N)&&z!==H&&(z!=null||H!=null))switch(N){case"selected":e.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:Ke(e,t,N,z,l,H)}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 pe in s)z=s[pe],s.hasOwnProperty(pe)&&z!=null&&!l.hasOwnProperty(pe)&&Ke(e,t,pe,null,l,z);for(L in l)if(z=l[L],H=s[L],l.hasOwnProperty(L)&&z!==H&&(z!=null||H!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,t));break;default:Ke(e,t,L,z,l,H)}return;default:if(mc(t)){for(var Ze in s)z=s[Ze],s.hasOwnProperty(Ze)&&z!==void 0&&!l.hasOwnProperty(Ze)&&td(e,t,Ze,void 0,l,z);for(q in l)z=l[q],H=s[q],!l.hasOwnProperty(q)||z===H||z===void 0&&H===void 0||td(e,t,q,z,l,H);return}}for(var R in s)z=s[R],s.hasOwnProperty(R)&&z!=null&&!l.hasOwnProperty(R)&&Ke(e,t,R,null,l,z);for(Y in l)z=l[Y],H=s[Y],!l.hasOwnProperty(Y)||z===H||z==null&&H==null||Ke(e,t,Y,z,l,H)}function Rg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function __(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,s=performance.getEntriesByType("resource"),l=0;l<s.length;l++){var c=s[l],f=c.transferSize,b=c.initiatorType,x=c.duration;if(f&&x&&Rg(b)){for(b=0,x=c.responseEnd,l+=1;l<s.length;l++){var N=s[l],L=N.startTime;if(L>x)break;var q=N.transferSize,Y=N.initiatorType;q&&Rg(Y)&&(N=N.responseEnd,b+=q*(N<x?1:(x-L)/(N-L)))}if(--l,t+=8*(f+b)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var nd=null,ad=null;function or(e){return e.nodeType===9?e:e.ownerDocument}function Og(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Bg(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function sd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var id=null;function x_(){var e=window.event;return e&&e.type==="popstate"?e===id?!1:(id=e,!0):(id=null,!1)}var Lg=typeof setTimeout=="function"?setTimeout:void 0,T_=typeof clearTimeout=="function"?clearTimeout:void 0,Ug=typeof Promise=="function"?Promise:void 0,E_=typeof queueMicrotask=="function"?queueMicrotask:typeof Ug<"u"?function(e){return Ug.resolve(null).then(e).catch(C_)}:Lg;function C_(e){setTimeout(function(){throw e})}function Ya(e){return e==="head"}function zg(e,t){var s=t,l=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"||s==="/&"){if(l===0){e.removeChild(c),xi(t);return}l--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")l++;else if(s==="html")Cl(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Cl(s);for(var f=s.firstChild;f;){var b=f.nextSibling,x=f.nodeName;f[Gi]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=b}}else s==="body"&&Cl(e.ownerDocument.body);s=c}while(s);xi(t)}function Vg(e,t){var s=e;e=0;do{var l=s.nextSibling;if(s.nodeType===1?t?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(t?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),l&&l.nodeType===8)if(s=l.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=l}while(s)}function ld(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var s=t;switch(t=t.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":ld(s),dc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function A_(e,t,s,l){for(;e.nodeType===1;){var c=s;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Gi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=wn(e.nextSibling),e===null)break}return null}function j_(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=wn(e.nextSibling),e===null))return null;return e}function Ig(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=wn(e.nextSibling),e===null))return null;return e}function od(e){return e.data==="$?"||e.data==="$~"}function rd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function N_(e,t){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||s.readyState!=="loading")t();else{var l=function(){t(),s.removeEventListener("DOMContentLoaded",l)};s.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function wn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var cd=null;function Hg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return wn(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function Pg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(t===0)return e;t--}else s!=="/$"&&s!=="/&"||t++}e=e.previousSibling}return null}function Gg(e,t,s){switch(t=or(s),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Cl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);dc(e)}var Dn=new Map,qg=new Set;function rr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _a=K.d;K.d={f:w_,r:D_,D:k_,C:M_,L:R_,m:O_,X:L_,S:B_,M:U_};function w_(){var e=_a.f(),t=Wo();return e||t}function D_(e){var t=Hs(e);t!==null&&t.tag===5&&t.type==="form"?om(t):_a.r(e)}var bi=typeof document>"u"?null:document;function Fg(e,t,s){var l=bi;if(l&&typeof t=="string"&&t){var c=xn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof s=="string"&&(c+='[crossorigin="'+s+'"]'),qg.has(c)||(qg.add(c),e={rel:e,crossOrigin:s,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),Pt(t,"link",e),Ot(t),l.head.appendChild(t)))}}function k_(e){_a.D(e),Fg("dns-prefetch",e,null)}function M_(e,t){_a.C(e,t),Fg("preconnect",e,t)}function R_(e,t,s){_a.L(e,t,s);var l=bi;if(l&&e&&t){var c='link[rel="preload"][as="'+xn(t)+'"]';t==="image"&&s&&s.imageSrcSet?(c+='[imagesrcset="'+xn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(c+='[imagesizes="'+xn(s.imageSizes)+'"]')):c+='[href="'+xn(e)+'"]';var f=c;switch(t){case"style":f=Si(e);break;case"script":f=_i(e)}Dn.has(f)||(e=v({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),Dn.set(f,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(Al(f))||t==="script"&&l.querySelector(jl(f))||(t=l.createElement("link"),Pt(t,"link",e),Ot(t),l.head.appendChild(t)))}}function O_(e,t){_a.m(e,t);var s=bi;if(s&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+xn(l)+'"][href="'+xn(e)+'"]',f=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=_i(e)}if(!Dn.has(f)&&(e=v({rel:"modulepreload",href:e},t),Dn.set(f,e),s.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(jl(f)))return}l=s.createElement("link"),Pt(l,"link",e),Ot(l),s.head.appendChild(l)}}}function B_(e,t,s){_a.S(e,t,s);var l=bi;if(l&&e){var c=Ps(l).hoistableStyles,f=Si(e);t=t||"default";var b=c.get(f);if(!b){var x={loading:0,preload:null};if(b=l.querySelector(Al(f)))x.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},s),(s=Dn.get(f))&&ud(e,s);var N=b=l.createElement("link");Ot(N),Pt(N,"link",e),N._p=new Promise(function(L,q){N.onload=L,N.onerror=q}),N.addEventListener("load",function(){x.loading|=1}),N.addEventListener("error",function(){x.loading|=2}),x.loading|=4,cr(b,t,l)}b={type:"stylesheet",instance:b,count:1,state:x},c.set(f,b)}}}function L_(e,t){_a.X(e,t);var s=bi;if(s&&e){var l=Ps(s).hoistableScripts,c=_i(e),f=l.get(c);f||(f=s.querySelector(jl(c)),f||(e=v({src:e,async:!0},t),(t=Dn.get(c))&&dd(e,t),f=s.createElement("script"),Ot(f),Pt(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function U_(e,t){_a.M(e,t);var s=bi;if(s&&e){var l=Ps(s).hoistableScripts,c=_i(e),f=l.get(c);f||(f=s.querySelector(jl(c)),f||(e=v({src:e,async:!0,type:"module"},t),(t=Dn.get(c))&&dd(e,t),f=s.createElement("script"),Ot(f),Pt(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function $g(e,t,s,l){var c=(c=F.current)?rr(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(t=Si(s.href),s=Ps(c).hoistableStyles,l=s.get(t),l||(l={type:"style",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=Si(s.href);var f=Ps(c).hoistableStyles,b=f.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,b),(f=c.querySelector(Al(e)))&&!f._p&&(b.instance=f,b.state.loading=5),Dn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Dn.set(e,s),f||z_(c,e,s,b.state))),t&&l===null)throw Error(o(528,""));return b}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=s.async,s=s.src,typeof s=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=_i(s),s=Ps(c).hoistableScripts,l=s.get(t),l||(l={type:"script",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Si(e){return'href="'+xn(e)+'"'}function Al(e){return'link[rel="stylesheet"]['+e+"]"}function Yg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function z_(e,t,s,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Pt(t,"link",s),Ot(t),e.head.appendChild(t))}function _i(e){return'[src="'+xn(e)+'"]'}function jl(e){return"script[async]"+e}function Kg(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+xn(s.href)+'"]');if(l)return t.instance=l,Ot(l),l;var c=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ot(l),Pt(l,"style",c),cr(l,s.precedence,e),t.instance=l;case"stylesheet":c=Si(s.href);var f=e.querySelector(Al(c));if(f)return t.state.loading|=4,t.instance=f,Ot(f),f;l=Yg(s),(c=Dn.get(c))&&ud(l,c),f=(e.ownerDocument||e).createElement("link"),Ot(f);var b=f;return b._p=new Promise(function(x,N){b.onload=x,b.onerror=N}),Pt(f,"link",l),t.state.loading|=4,cr(f,s.precedence,e),t.instance=f;case"script":return f=_i(s.src),(c=e.querySelector(jl(f)))?(t.instance=c,Ot(c),c):(l=s,(c=Dn.get(f))&&(l=v({},s),dd(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Ot(c),Pt(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,cr(l,s.precedence,e));return t.instance}function cr(e,t,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,f=c,b=0;b<l.length;b++){var x=l[b];if(x.dataset.precedence===t)f=x;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=s.nodeType===9?s.head:s,t.insertBefore(e,t.firstChild))}function ud(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function dd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ur=null;function Zg(e,t,s){if(ur===null){var l=new Map,c=ur=new Map;c.set(s,l)}else c=ur,l=c.get(s),l||(l=new Map,c.set(s,l));if(l.has(e))return l;for(l.set(e,null),s=s.getElementsByTagName(e),c=0;c<s.length;c++){var f=s[c];if(!(f[Gi]||f[zt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var b=f.getAttribute(t)||"";b=e+b;var x=l.get(b);x?x.push(f):l.set(b,[f])}}return l}function Xg(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function V_(e,t,s){if(s===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Qg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function I_(e,t,s,l){if(s.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var c=Si(l.href),f=t.querySelector(Al(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=dr.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=f,Ot(f);return}f=t.ownerDocument||t,l=Yg(l),(c=Dn.get(c))&&ud(l,c),f=f.createElement("link"),Ot(f);var b=f;b._p=new Promise(function(x,N){b.onload=x,b.onerror=N}),Pt(f,"link",l),s.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,t),(t=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=dr.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var fd=0;function H_(e,t){return e.stylesheets&&e.count===0&&hr(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var l=setTimeout(function(){if(e.stylesheets&&hr(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&fd===0&&(fd=62500*__());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hr(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>fd?50:800)+t);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function dr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var fr=null;function hr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,fr=new Map,t.forEach(P_,e),fr=null,dr.call(e))}function P_(e,t){if(!(t.state.loading&4)){var s=fr.get(e);if(s)var l=s.get(null);else{s=new Map,fr.set(e,s);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var b=c[f];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(s.set(b.dataset.precedence,b),l=b)}l&&s.set(null,l)}c=t.instance,b=c.getAttribute("data-precedence"),f=s.get(b)||l,f===l&&s.set(null,c),s.set(b,c),this.count++,l=dr.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Nl={$$typeof:M,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function G_(e,t,s,l,c,f,b,x,N){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=oc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oc(0),this.hiddenUpdates=oc(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Jg(e,t,s,l,c,f,b,x,N,L,q,Y){return e=new G_(e,t,s,b,N,L,q,Y,x),t=1,f===!0&&(t|=24),f=dn(3,null,null,t),e.current=f,f.stateNode=e,t=Fc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:l,isDehydrated:s,cache:t},Zc(f),e}function Wg(e){return e?(e=Js,e):Js}function ey(e,t,s,l,c,f){c=Wg(c),l.context===null?l.context=c:l.pendingContext=c,l=La(t),l.payload={element:s},f=f===void 0?null:f,f!==null&&(l.callback=f),s=Ua(e,l,t),s!==null&&(rn(s,e,t),ll(s,e,t))}function ty(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function hd(e,t){ty(e,t),(e=e.alternate)&&ty(e,t)}function ny(e){if(e.tag===13||e.tag===31){var t=ms(e,67108864);t!==null&&rn(t,e,67108864),hd(e,67108864)}}function ay(e){if(e.tag===13||e.tag===31){var t=gn();t=rc(t);var s=ms(e,t);s!==null&&rn(s,e,t),hd(e,t)}}var pr=!0;function q_(e,t,s,l){var c=U.T;U.T=null;var f=K.p;try{K.p=2,pd(e,t,s,l)}finally{K.p=f,U.T=c}}function F_(e,t,s,l){var c=U.T;U.T=null;var f=K.p;try{K.p=8,pd(e,t,s,l)}finally{K.p=f,U.T=c}}function pd(e,t,s,l){if(pr){var c=md(l);if(c===null)ed(e,t,l,mr,s),iy(e,l);else if(Y_(c,e,t,s,l))l.stopPropagation();else if(iy(e,l),t&4&&-1<$_.indexOf(e)){for(;c!==null;){var f=Hs(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var b=je(f.pendingLanes);if(b!==0){var x=f;for(x.pendingLanes|=2,x.entangledLanes|=2;b;){var N=1<<31-mt(b);x.entanglements[1]|=N,b&=~N}$n(f),(He&6)===0&&(Qo=ue()+500,xl(0))}}break;case 31:case 13:x=ms(f,2),x!==null&&rn(x,f,2),Wo(),hd(f,2)}if(f=md(l),f===null&&ed(e,t,l,mr,s),f===c)break;c=f}c!==null&&l.stopPropagation()}else ed(e,t,l,null,s)}}function md(e){return e=yc(e),gd(e)}var mr=null;function gd(e){if(mr=null,e=Is(e),e!==null){var t=u(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=d(t),e!==null)return e;e=null}else if(s===31){if(e=p(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return mr=e,null}function sy(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(be()){case Se:return 2;case Qe:return 8;case Me:case lt:return 32;case Dt:return 268435456;default:return 32}default:return 32}}var yd=!1,Ka=null,Za=null,Xa=null,wl=new Map,Dl=new Map,Qa=[],$_="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 iy(e,t){switch(e){case"focusin":case"focusout":Ka=null;break;case"dragenter":case"dragleave":Za=null;break;case"mouseover":case"mouseout":Xa=null;break;case"pointerover":case"pointerout":wl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dl.delete(t.pointerId)}}function kl(e,t,s,l,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:s,eventSystemFlags:l,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Hs(t),t!==null&&ny(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Y_(e,t,s,l,c){switch(t){case"focusin":return Ka=kl(Ka,e,t,s,l,c),!0;case"dragenter":return Za=kl(Za,e,t,s,l,c),!0;case"mouseover":return Xa=kl(Xa,e,t,s,l,c),!0;case"pointerover":var f=c.pointerId;return wl.set(f,kl(wl.get(f)||null,e,t,s,l,c)),!0;case"gotpointercapture":return f=c.pointerId,Dl.set(f,kl(Dl.get(f)||null,e,t,s,l,c)),!0}return!1}function ly(e){var t=Is(e.target);if(t!==null){var s=u(t);if(s!==null){if(t=s.tag,t===13){if(t=d(s),t!==null){e.blockedOn=t,Sh(e.priority,function(){ay(s)});return}}else if(t===31){if(t=p(s),t!==null){e.blockedOn=t,Sh(e.priority,function(){ay(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function gr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=md(e.nativeEvent);if(s===null){s=e.nativeEvent;var l=new s.constructor(s.type,s);gc=l,s.target.dispatchEvent(l),gc=null}else return t=Hs(s),t!==null&&ny(t),e.blockedOn=s,!1;t.shift()}return!0}function oy(e,t,s){gr(e)&&s.delete(t)}function K_(){yd=!1,Ka!==null&&gr(Ka)&&(Ka=null),Za!==null&&gr(Za)&&(Za=null),Xa!==null&&gr(Xa)&&(Xa=null),wl.forEach(oy),Dl.forEach(oy)}function yr(e,t){e.blockedOn===t&&(e.blockedOn=null,yd||(yd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,K_)))}var vr=null;function ry(e){vr!==e&&(vr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){vr===e&&(vr=null);for(var t=0;t<e.length;t+=3){var s=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(gd(l||s)===null)continue;break}var f=Hs(s);f!==null&&(e.splice(t,3),t-=3,mu(f,{pending:!0,data:c,method:s.method,action:l},l,c))}}))}function xi(e){function t(N){return yr(N,e)}Ka!==null&&yr(Ka,e),Za!==null&&yr(Za,e),Xa!==null&&yr(Xa,e),wl.forEach(t),Dl.forEach(t);for(var s=0;s<Qa.length;s++){var l=Qa[s];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Qa.length&&(s=Qa[0],s.blockedOn===null);)ly(s),s.blockedOn===null&&Qa.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var c=s[l],f=s[l+1],b=c[tn]||null;if(typeof f=="function")b||ry(s);else if(b){var x=null;if(f&&f.hasAttribute("formAction")){if(c=f,b=f[tn]||null)x=b.formAction;else if(gd(c)!==null)continue}else x=b.action;typeof x=="function"?s[l+1]=x:(s.splice(l,3),l-=3),ry(s)}}}function cy(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(b){return c=b})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),l||setTimeout(s,20)}function s(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(s,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function vd(e){this._internalRoot=e}br.prototype.render=vd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var s=t.current,l=gn();ey(s,l,e,t,null,null)},br.prototype.unmount=vd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ey(e.current,2,null,e,null,null),Wo(),t[Vs]=null}};function br(e){this._internalRoot=e}br.prototype.unstable_scheduleHydration=function(e){if(e){var t=bh();e={blockedOn:null,target:e,priority:t};for(var s=0;s<Qa.length&&t!==0&&t<Qa[s].priority;s++);Qa.splice(s,0,e),s===0&&ly(e)}};var uy=a.version;if(uy!=="19.2.4")throw Error(o(527,uy,"19.2.4"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var Z_={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sr.isDisabled&&Sr.supportsFiber)try{ot=Sr.inject(Z_),Et=Sr}catch{}}return Ml.createRoot=function(e,t){if(!r(e))throw Error(o(299));var s=!1,l="",c=ym,f=vm,b=bm;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError)),t=Jg(e,1,!1,null,null,s,l,null,c,f,b,cy),e[Vs]=t.current,Wu(e),new vd(t)},Ml.hydrateRoot=function(e,t,s){if(!r(e))throw Error(o(299));var l=!1,c="",f=ym,b=vm,x=bm,N=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(b=s.onCaughtError),s.onRecoverableError!==void 0&&(x=s.onRecoverableError),s.formState!==void 0&&(N=s.formState)),t=Jg(e,1,!0,t,s??null,l,c,N,f,b,x,cy),t.context=Wg(null),s=t.current,l=gn(),l=rc(l),c=La(l),c.callback=null,Ua(s,c,l),s=l,t.current.lanes=s,Pi(t,s),$n(t),e[Vs]=t.current,Wu(e),new br(t)},Ml.version="19.2.4",Ml}var yy;function dx(){if(yy)return bd.exports;yy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),bd.exports=ux(),bd.exports}var fx=dx();/**
|
|
26
|
+
* react-router v7.13.1
|
|
27
|
+
*
|
|
28
|
+
* Copyright (c) Remix Software Inc.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
32
|
+
*
|
|
33
|
+
* @license MIT
|
|
34
|
+
*/var vy="popstate";function by(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function hx(n={}){function a(o,r){var g;let u=(g=r.state)==null?void 0:g.masked,{pathname:d,search:p,hash:m}=u||o.location;return Fd("",{pathname:d,search:p,hash:m},r.state&&r.state.usr||null,r.state&&r.state.key||"default",u?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function i(o,r){return typeof r=="string"?r:$l(r)}return mx(a,i,null,n)}function nt(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function On(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function px(){return Math.random().toString(36).substring(2,10)}function Sy(n,a){return{usr:n.state,key:n.key,idx:a,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Fd(n,a,i=null,o,r){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Bi(a):a,state:i,key:a&&a.key||o||px(),unstable_mask:r}}function $l({pathname:n="/",search:a="",hash:i=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function Bi(n){let a={};if(n){let i=n.indexOf("#");i>=0&&(a.hash=n.substring(i),n=n.substring(0,i));let o=n.indexOf("?");o>=0&&(a.search=n.substring(o),n=n.substring(0,o)),n&&(a.pathname=n)}return a}function mx(n,a,i,o={}){let{window:r=document.defaultView,v5Compat:u=!1}=o,d=r.history,p="POP",m=null,g=y();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function y(){return(d.state||{idx:null}).idx}function v(){p="POP";let j=y(),C=j==null?null:j-g;g=j,m&&m({action:p,location:A.location,delta:C})}function _(j,C){p="PUSH";let w=by(j)?j:Fd(A.location,j,C);g=y()+1;let M=Sy(w,g),G=A.createHref(w.unstable_mask||w);try{d.pushState(M,"",G)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;r.location.assign(G)}u&&m&&m({action:p,location:A.location,delta:1})}function T(j,C){p="REPLACE";let w=by(j)?j:Fd(A.location,j,C);g=y();let M=Sy(w,g),G=A.createHref(w.unstable_mask||w);d.replaceState(M,"",G),u&&m&&m({action:p,location:A.location,delta:0})}function E(j){return gx(j)}let A={get action(){return p},get location(){return n(r,d)},listen(j){if(m)throw new Error("A history only accepts one active listener");return r.addEventListener(vy,v),m=j,()=>{r.removeEventListener(vy,v),m=null}},createHref(j){return a(r,j)},createURL:E,encodeLocation(j){let C=E(j);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:_,replace:T,go(j){return d.go(j)}};return A}function gx(n,a=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),nt(i,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:$l(n);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=i+o),new URL(o,i)}function g0(n,a,i="/"){return yx(n,a,i,!1)}function yx(n,a,i,o){let r=typeof a=="string"?Bi(a):a,u=Aa(r.pathname||"/",i);if(u==null)return null;let d=y0(n);vx(d);let p=null;for(let m=0;p==null&&m<d.length;++m){let g=b0(u);p=jx(d[m],g,o)}return p}function y0(n,a=[],i=[],o="",r=!1){let u=(d,p,m=r,g)=>{let y={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:p,route:d};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&m)return;nt(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let v=Xn([o,y.relativePath]),_=i.concat(y);d.children&&d.children.length>0&&(nt(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),y0(d.children,a,_,v,m)),!(d.path==null&&!d.index)&&a.push({path:v,score:Cx(v,d.index),routesMeta:_})};return n.forEach((d,p)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))u(d,p);else for(let g of v0(d.path))u(d,p,!0,g)}),a}function v0(n){let a=n.split("/");if(a.length===0)return[];let[i,...o]=a,r=i.endsWith("?"),u=i.replace(/\?$/,"");if(o.length===0)return r?[u,""]:[u];let d=v0(o.join("/")),p=[];return p.push(...d.map(m=>m===""?u:[u,m].join("/"))),r&&p.push(...d),p.map(m=>n.startsWith("/")&&m===""?"/":m)}function vx(n){n.sort((a,i)=>a.score!==i.score?i.score-a.score:Ax(a.routesMeta.map(o=>o.childrenIndex),i.routesMeta.map(o=>o.childrenIndex)))}var bx=/^:[\w-]+$/,Sx=3,_x=2,xx=1,Tx=10,Ex=-2,_y=n=>n==="*";function Cx(n,a){let i=n.split("/"),o=i.length;return i.some(_y)&&(o+=Ex),a&&(o+=_x),i.filter(r=>!_y(r)).reduce((r,u)=>r+(bx.test(u)?Sx:u===""?xx:Tx),o)}function Ax(n,a){return n.length===a.length&&n.slice(0,-1).every((o,r)=>o===a[r])?n[n.length-1]-a[a.length-1]:0}function jx(n,a,i=!1){let{routesMeta:o}=n,r={},u="/",d=[];for(let p=0;p<o.length;++p){let m=o[p],g=p===o.length-1,y=u==="/"?a:a.slice(u.length)||"/",v=Yl({path:m.relativePath,caseSensitive:m.caseSensitive,end:g},y),_=m.route;if(!v&&g&&i&&!o[o.length-1].route.index&&(v=Yl({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},y)),!v)return null;Object.assign(r,v.params),d.push({params:r,pathname:Xn([u,v.pathname]),pathnameBase:Mx(Xn([u,v.pathnameBase])),route:_}),v.pathnameBase!=="/"&&(u=Xn([u,v.pathnameBase]))}return d}function Yl(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,o]=Nx(n.path,n.caseSensitive,n.end),r=a.match(i);if(!r)return null;let u=r[0],d=u.replace(/(.)\/+$/,"$1"),p=r.slice(1);return{params:o.reduce((g,{paramName:y,isOptional:v},_)=>{if(y==="*"){let E=p[_]||"";d=u.slice(0,u.length-E.length).replace(/(.)\/+$/,"$1")}const T=p[_];return v&&!T?g[y]=void 0:g[y]=(T||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:d,pattern:n}}function Nx(n,a=!1,i=!0){On(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,p,m,g,y)=>{if(o.push({paramName:p,isOptional:m!=null}),m){let v=y.charAt(g+d.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,a?void 0:"i"),o]}function b0(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return On(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function Aa(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,o=n.charAt(i);return o&&o!=="/"?null:n.slice(i)||"/"}var wx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Dx(n,a="/"){let{pathname:i,search:o="",hash:r=""}=typeof n=="string"?Bi(n):n,u;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?u=xy(i.substring(1),"/"):u=xy(i,a)):u=a,{pathname:u,search:Rx(o),hash:Ox(r)}}function xy(n,a){let i=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?i.length>1&&i.pop():r!=="."&&i.push(r)}),i.length>1?i.join("/"):"/"}function xd(n,a,i,o){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function kx(n){return n.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Cf(n){let a=kx(n);return a.map((i,o)=>o===a.length-1?i.pathname:i.pathnameBase)}function Kr(n,a,i,o=!1){let r;typeof n=="string"?r=Bi(n):(r={...n},nt(!r.pathname||!r.pathname.includes("?"),xd("?","pathname","search",r)),nt(!r.pathname||!r.pathname.includes("#"),xd("#","pathname","hash",r)),nt(!r.search||!r.search.includes("#"),xd("#","search","hash",r)));let u=n===""||r.pathname==="",d=u?"/":r.pathname,p;if(d==null)p=i;else{let v=a.length-1;if(!o&&d.startsWith("..")){let _=d.split("/");for(;_[0]==="..";)_.shift(),v-=1;r.pathname=_.join("/")}p=v>=0?a[v]:"/"}let m=Dx(r,p),g=d&&d!=="/"&&d.endsWith("/"),y=(u||d===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(g||y)&&(m.pathname+="/"),m}var Xn=n=>n.join("/").replace(/\/\/+/g,"/"),Mx=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Rx=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Ox=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Bx=class{constructor(n,a,i,o=!1){this.status=n,this.statusText=a||"",this.internal=o,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function Lx(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Ux(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var S0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function _0(n,a){let i=n;if(typeof i!="string"||!wx.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let o=i,r=!1;if(S0)try{let u=new URL(window.location.href),d=i.startsWith("//")?new URL(u.protocol+i):new URL(i),p=Aa(d.pathname,a);d.origin===u.origin&&p!=null?i=p+d.search+d.hash:r=!0}catch{On(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:r,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var x0=["POST","PUT","PATCH","DELETE"];new Set(x0);var zx=["GET",...x0];new Set(zx);var Li=S.createContext(null);Li.displayName="DataRouter";var Zr=S.createContext(null);Zr.displayName="DataRouterState";var Vx=S.createContext(!1),T0=S.createContext({isTransitioning:!1});T0.displayName="ViewTransition";var Ix=S.createContext(new Map);Ix.displayName="Fetchers";var Hx=S.createContext(null);Hx.displayName="Await";var Sn=S.createContext(null);Sn.displayName="Navigation";var to=S.createContext(null);to.displayName="Location";var Bn=S.createContext({outlet:null,matches:[],isDataRoute:!1});Bn.displayName="Route";var Af=S.createContext(null);Af.displayName="RouteError";var E0="REACT_ROUTER_ERROR",Px="REDIRECT",Gx="ROUTE_ERROR_RESPONSE";function qx(n){if(n.startsWith(`${E0}:${Px}:{`))try{let a=JSON.parse(n.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function Fx(n){if(n.startsWith(`${E0}:${Gx}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new Bx(a.status,a.statusText,a.data)}catch{}}function $x(n,{relative:a}={}){nt(Us(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:o}=S.useContext(Sn),{hash:r,pathname:u,search:d}=no(n,{relative:a}),p=u;return i!=="/"&&(p=u==="/"?i:Xn([i,u])),o.createHref({pathname:p,search:d,hash:r})}function Us(){return S.useContext(to)!=null}function Wt(){return nt(Us(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(to).location}function Qt(n){nt(Us(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:a}=Wt();return S.useMemo(()=>Yl(n,b0(a)),[a,n])}var C0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function A0(n){S.useContext(Sn).static||S.useLayoutEffect(n)}function Xr(){let{isDataRoute:n}=S.useContext(Bn);return n?oT():Yx()}function Yx(){nt(Us(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Li),{basename:a,navigator:i}=S.useContext(Sn),{matches:o}=S.useContext(Bn),{pathname:r}=Wt(),u=JSON.stringify(Cf(o)),d=S.useRef(!1);return A0(()=>{d.current=!0}),S.useCallback((m,g={})=>{if(On(d.current,C0),!d.current)return;if(typeof m=="number"){i.go(m);return}let y=Kr(m,JSON.parse(u),r,g.relative==="path");n==null&&a!=="/"&&(y.pathname=y.pathname==="/"?a:Xn([a,y.pathname])),(g.replace?i.replace:i.push)(y,g.state,g)},[a,i,u,r,n])}var Kx=S.createContext(null);function Zx(n){let a=S.useContext(Bn).outlet;return S.useMemo(()=>a&&S.createElement(Kx.Provider,{value:n},a),[a,n])}function Qr(){let{matches:n}=S.useContext(Bn),a=n[n.length-1];return a?a.params:{}}function no(n,{relative:a}={}){let{matches:i}=S.useContext(Bn),{pathname:o}=Wt(),r=JSON.stringify(Cf(i));return S.useMemo(()=>Kr(n,JSON.parse(r),o,a==="path"),[n,r,o,a])}function Xx(n,a){return j0(n,a)}function j0(n,a,i){var j;nt(Us(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(Sn),{matches:r}=S.useContext(Bn),u=r[r.length-1],d=u?u.params:{},p=u?u.pathname:"/",m=u?u.pathnameBase:"/",g=u&&u.route;{let C=g&&g.path||"";w0(p,!g||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
35
|
+
|
|
36
|
+
Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let y=Wt(),v;if(a){let C=typeof a=="string"?Bi(a):a;nt(m==="/"||((j=C.pathname)==null?void 0:j.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${C.pathname}" was given in the \`location\` prop.`),v=C}else v=y;let _=v.pathname||"/",T=_;if(m!=="/"){let C=m.replace(/^\//,"").split("/");T="/"+_.replace(/^\//,"").split("/").slice(C.length).join("/")}let E=g0(n,{pathname:T});On(g||E!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),On(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let A=tT(E&&E.map(C=>Object.assign({},C,{params:Object.assign({},d,C.params),pathname:Xn([m,o.encodeLocation?o.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?m:Xn([m,o.encodeLocation?o.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),r,i);return a&&A?S.createElement(to.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},A):A}function Qx(){let n=lT(),a=Lx(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:u},"ErrorBoundary")," or"," ",S.createElement("code",{style:u},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),i?S.createElement("pre",{style:r},i):null,d)}var Jx=S.createElement(Qx,null),N0=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const i=Fx(n.digest);i&&(n=i)}let a=n!==void 0?S.createElement(Bn.Provider,{value:this.props.routeContext},S.createElement(Af.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(Wx,{error:n},a):a}};N0.contextType=Vx;var Td=new WeakMap;function Wx({children:n,error:a}){let{basename:i}=S.useContext(Sn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=qx(a.digest);if(o){let r=Td.get(a);if(r)throw r;let u=_0(o.location,i);if(S0&&!Td.get(a))if(u.isExternal||o.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw Td.set(a,d),d}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return n}function eT({routeContext:n,match:a,children:i}){let o=S.useContext(Li);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(Bn.Provider,{value:n},i)}function tT(n,a=[],i){let o=i==null?void 0:i.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(a.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let r=n,u=o==null?void 0:o.errors;if(u!=null){let y=r.findIndex(v=>v.route.id&&(u==null?void 0:u[v.route.id])!==void 0);nt(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),r=r.slice(0,Math.min(r.length,y+1))}let d=!1,p=-1;if(i&&o){d=o.renderFallback;for(let y=0;y<r.length;y++){let v=r[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(p=y),v.route.id){let{loaderData:_,errors:T}=o,E=v.route.loader&&!_.hasOwnProperty(v.route.id)&&(!T||T[v.route.id]===void 0);if(v.route.lazy||E){i.isStatic&&(d=!0),p>=0?r=r.slice(0,p+1):r=[r[0]];break}}}}let m=i==null?void 0:i.onError,g=o&&m?(y,v)=>{var _,T;m(y,{location:o.location,params:((T=(_=o.matches)==null?void 0:_[0])==null?void 0:T.params)??{},unstable_pattern:Ux(o.matches),errorInfo:v})}:void 0;return r.reduceRight((y,v,_)=>{let T,E=!1,A=null,j=null;o&&(T=u&&v.route.id?u[v.route.id]:void 0,A=v.route.errorElement||Jx,d&&(p<0&&_===0?(w0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,j=null):p===_&&(E=!0,j=v.route.hydrateFallbackElement||null)));let C=a.concat(r.slice(0,_+1)),w=()=>{let M;return T?M=A:E?M=j:v.route.Component?M=S.createElement(v.route.Component,null):v.route.element?M=v.route.element:M=y,S.createElement(eT,{match:v,routeContext:{outlet:y,matches:C,isDataRoute:o!=null},children:M})};return o&&(v.route.ErrorBoundary||v.route.errorElement||_===0)?S.createElement(N0,{location:o.location,revalidation:o.revalidation,component:A,error:T,children:w(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:g}):w()},null)}function jf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nT(n){let a=S.useContext(Li);return nt(a,jf(n)),a}function aT(n){let a=S.useContext(Zr);return nt(a,jf(n)),a}function sT(n){let a=S.useContext(Bn);return nt(a,jf(n)),a}function Nf(n){let a=sT(n),i=a.matches[a.matches.length-1];return nt(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function iT(){return Nf("useRouteId")}function lT(){var o;let n=S.useContext(Af),a=aT("useRouteError"),i=Nf("useRouteError");return n!==void 0?n:(o=a.errors)==null?void 0:o[i]}function oT(){let{router:n}=nT("useNavigate"),a=Nf("useNavigate"),i=S.useRef(!1);return A0(()=>{i.current=!0}),S.useCallback(async(r,u={})=>{On(i.current,C0),i.current&&(typeof r=="number"?await n.navigate(r):await n.navigate(r,{fromRouteId:a,...u}))},[n,a])}var Ty={};function w0(n,a,i){!a&&!Ty[n]&&(Ty[n]=!0,On(!1,i))}S.memo(rT);function rT({routes:n,future:a,state:i,isStatic:o,onError:r}){return j0(n,void 0,{state:i,isStatic:o,onError:r})}function Dr({to:n,replace:a,state:i,relative:o}){nt(Us(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=S.useContext(Sn);On(!r,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=S.useContext(Bn),{pathname:d}=Wt(),p=Xr(),m=Kr(n,Cf(u),d,o==="path"),g=JSON.stringify(m);return S.useEffect(()=>{p(JSON.parse(g),{replace:a,state:i,relative:o})},[p,g,o,a,i]),null}function D0(n){return Zx(n.context)}function St(n){nt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function cT({basename:n="/",children:a=null,location:i,navigationType:o="POP",navigator:r,static:u=!1,unstable_useTransitions:d}){nt(!Us(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=n.replace(/^\/*/,"/"),m=S.useMemo(()=>({basename:p,navigator:r,static:u,unstable_useTransitions:d,future:{}}),[p,r,u,d]);typeof i=="string"&&(i=Bi(i));let{pathname:g="/",search:y="",hash:v="",state:_=null,key:T="default",unstable_mask:E}=i,A=S.useMemo(()=>{let j=Aa(g,p);return j==null?null:{location:{pathname:j,search:y,hash:v,state:_,key:T,unstable_mask:E},navigationType:o}},[p,g,y,v,_,T,o,E]);return On(A!=null,`<Router basename="${p}"> is not able to match the URL "${g}${y}${v}" because it does not start with the basename, so the <Router> won't render anything.`),A==null?null:S.createElement(Sn.Provider,{value:m},S.createElement(to.Provider,{children:a,value:A}))}function uT({children:n,location:a}){return Xx($d(n),a)}function $d(n,a=[]){let i=[];return S.Children.forEach(n,(o,r)=>{if(!S.isValidElement(o))return;let u=[...a,r];if(o.type===S.Fragment){i.push.apply(i,$d(o.props.children,u));return}nt(o.type===St,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),nt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let d={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=$d(o.props.children,u)),i.push(d)}),i}var kr="get",Mr="application/x-www-form-urlencoded";function Jr(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function dT(n){return Jr(n)&&n.tagName.toLowerCase()==="button"}function fT(n){return Jr(n)&&n.tagName.toLowerCase()==="form"}function hT(n){return Jr(n)&&n.tagName.toLowerCase()==="input"}function pT(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function mT(n,a){return n.button===0&&(!a||a==="_self")&&!pT(n)}function Yd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((a,i)=>{let o=n[i];return a.concat(Array.isArray(o)?o.map(r=>[i,r]):[[i,o]])},[]))}function gT(n,a){let i=Yd(n);return a&&a.forEach((o,r)=>{i.has(r)||a.getAll(r).forEach(u=>{i.append(r,u)})}),i}var xr=null;function yT(){if(xr===null)try{new FormData(document.createElement("form"),0),xr=!1}catch{xr=!0}return xr}var vT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ed(n){return n!=null&&!vT.has(n)?(On(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Mr}"`),null):n}function bT(n,a){let i,o,r,u,d;if(fT(n)){let p=n.getAttribute("action");o=p?Aa(p,a):null,i=n.getAttribute("method")||kr,r=Ed(n.getAttribute("enctype"))||Mr,u=new FormData(n)}else if(dT(n)||hT(n)&&(n.type==="submit"||n.type==="image")){let p=n.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=n.getAttribute("formaction")||p.getAttribute("action");if(o=m?Aa(m,a):null,i=n.getAttribute("formmethod")||p.getAttribute("method")||kr,r=Ed(n.getAttribute("formenctype"))||Ed(p.getAttribute("enctype"))||Mr,u=new FormData(p,n),!yT()){let{name:g,type:y,value:v}=n;if(y==="image"){let _=g?`${g}.`:"";u.append(`${_}x`,"0"),u.append(`${_}y`,"0")}else g&&u.append(g,v)}}else{if(Jr(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=kr,o=null,r=Mr,d=n}return u&&r==="text/plain"&&(d=u,u=void 0),{action:o,method:i.toLowerCase(),encType:r,formData:u,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function wf(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function ST(n,a,i,o){let r=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i?r.pathname.endsWith("/")?r.pathname=`${r.pathname}_.${o}`:r.pathname=`${r.pathname}.${o}`:r.pathname==="/"?r.pathname=`_root.${o}`:a&&Aa(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${o}`,r}async function _T(n,a){if(n.id in a)return a[n.id];try{let i=await import(n.module);return a[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function xT(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function TT(n,a,i){let o=await Promise.all(n.map(async r=>{let u=a.routes[r.route.id];if(u){let d=await _T(u,i);return d.links?d.links():[]}return[]}));return jT(o.flat(1).filter(xT).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function Ey(n,a,i,o,r,u){let d=(m,g)=>i[g]?m.route.id!==i[g].route.id:!0,p=(m,g)=>{var y;return i[g].pathname!==m.pathname||((y=i[g].route.path)==null?void 0:y.endsWith("*"))&&i[g].params["*"]!==m.params["*"]};return u==="assets"?a.filter((m,g)=>d(m,g)||p(m,g)):u==="data"?a.filter((m,g)=>{var v;let y=o.routes[m.route.id];if(!y||!y.hasLoader)return!1;if(d(m,g)||p(m,g))return!0;if(m.route.shouldRevalidate){let _=m.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:((v=i[0])==null?void 0:v.params)||{},nextUrl:new URL(n,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function ET(n,a,{includeHydrateFallback:i}={}){return CT(n.map(o=>{let r=a.routes[o.route.id];if(!r)return[];let u=[r.module];return r.clientActionModule&&(u=u.concat(r.clientActionModule)),r.clientLoaderModule&&(u=u.concat(r.clientLoaderModule)),i&&r.hydrateFallbackModule&&(u=u.concat(r.hydrateFallbackModule)),r.imports&&(u=u.concat(r.imports)),u}).flat(1))}function CT(n){return[...new Set(n)]}function AT(n){let a={},i=Object.keys(n).sort();for(let o of i)a[o]=n[o];return a}function jT(n,a){let i=new Set;return new Set(a),n.reduce((o,r)=>{let u=JSON.stringify(AT(r));return i.has(u)||(i.add(u),o.push({key:u,link:r})),o},[])}function k0(){let n=S.useContext(Li);return wf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function NT(){let n=S.useContext(Zr);return wf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Df=S.createContext(void 0);Df.displayName="FrameworkContext";function M0(){let n=S.useContext(Df);return wf(n,"You must render this element inside a <HydratedRouter> element"),n}function wT(n,a){let i=S.useContext(Df),[o,r]=S.useState(!1),[u,d]=S.useState(!1),{onFocus:p,onBlur:m,onMouseEnter:g,onMouseLeave:y,onTouchStart:v}=a,_=S.useRef(null);S.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let A=C=>{C.forEach(w=>{d(w.isIntersecting)})},j=new IntersectionObserver(A,{threshold:.5});return _.current&&j.observe(_.current),()=>{j.disconnect()}}},[n]),S.useEffect(()=>{if(o){let A=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(A)}}},[o]);let T=()=>{r(!0)},E=()=>{r(!1),d(!1)};return i?n!=="intent"?[u,_,{}]:[u,_,{onFocus:Rl(p,T),onBlur:Rl(m,E),onMouseEnter:Rl(g,T),onMouseLeave:Rl(y,E),onTouchStart:Rl(v,T)}]:[!1,_,{}]}function Rl(n,a){return i=>{n&&n(i),i.defaultPrevented||a(i)}}function DT({page:n,...a}){let{router:i}=k0(),o=S.useMemo(()=>g0(i.routes,n,i.basename),[i.routes,n,i.basename]);return o?S.createElement(MT,{page:n,matches:o,...a}):null}function kT(n){let{manifest:a,routeModules:i}=M0(),[o,r]=S.useState([]);return S.useEffect(()=>{let u=!1;return TT(n,a,i).then(d=>{u||r(d)}),()=>{u=!0}},[n,a,i]),o}function MT({page:n,matches:a,...i}){let o=Wt(),{future:r,manifest:u,routeModules:d}=M0(),{basename:p}=k0(),{loaderData:m,matches:g}=NT(),y=S.useMemo(()=>Ey(n,a,g,u,o,"data"),[n,a,g,u,o]),v=S.useMemo(()=>Ey(n,a,g,u,o,"assets"),[n,a,g,u,o]),_=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let A=new Set,j=!1;if(a.forEach(w=>{var G;let M=u.routes[w.route.id];!M||!M.hasLoader||(!y.some(V=>V.route.id===w.route.id)&&w.route.id in m&&((G=d[w.route.id])!=null&&G.shouldRevalidate)||M.hasClientLoader?j=!0:A.add(w.route.id))}),A.size===0)return[];let C=ST(n,p,r.unstable_trailingSlashAwareDataRequests,"data");return j&&A.size>0&&C.searchParams.set("_routes",a.filter(w=>A.has(w.route.id)).map(w=>w.route.id).join(",")),[C.pathname+C.search]},[p,r.unstable_trailingSlashAwareDataRequests,m,o,u,y,a,n,d]),T=S.useMemo(()=>ET(v,u),[v,u]),E=kT(v);return S.createElement(S.Fragment,null,_.map(A=>S.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...i})),T.map(A=>S.createElement("link",{key:A,rel:"modulepreload",href:A,...i})),E.map(({key:A,link:j})=>S.createElement("link",{key:A,nonce:i.nonce,...j,crossOrigin:j.crossOrigin??i.crossOrigin})))}function RT(...n){return a=>{n.forEach(i=>{typeof i=="function"?i(a):i!=null&&(i.current=a)})}}var OT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{OT&&(window.__reactRouterVersion="7.13.1")}catch{}function BT({basename:n,children:a,unstable_useTransitions:i,window:o}){let r=S.useRef();r.current==null&&(r.current=hx({window:o,v5Compat:!0}));let u=r.current,[d,p]=S.useState({action:u.action,location:u.location}),m=S.useCallback(g=>{i===!1?p(g):S.startTransition(()=>p(g))},[i]);return S.useLayoutEffect(()=>u.listen(m),[u,m]),S.createElement(cT,{basename:n,children:a,location:d.location,navigationType:d.action,navigator:u,unstable_useTransitions:i})}var R0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,kf=S.forwardRef(function({onClick:a,discover:i="render",prefetch:o="none",relative:r,reloadDocument:u,replace:d,unstable_mask:p,state:m,target:g,to:y,preventScrollReset:v,viewTransition:_,unstable_defaultShouldRevalidate:T,...E},A){let{basename:j,navigator:C,unstable_useTransitions:w}=S.useContext(Sn),M=typeof y=="string"&&R0.test(y),G=_0(y,j);y=G.to;let V=$x(y,{relative:r}),X=Wt(),Q=null;if(p){let P=Kr(p,[],X.unstable_mask?X.unstable_mask.pathname:"/",!0);j!=="/"&&(P.pathname=P.pathname==="/"?j:Xn([j,P.pathname])),Q=C.createHref(P)}let[I,te,se]=wT(o,E),O=VT(y,{replace:d,unstable_mask:p,state:m,target:g,preventScrollReset:v,relative:r,viewTransition:_,unstable_defaultShouldRevalidate:T,unstable_useTransitions:w});function ne(P){a&&a(P),P.defaultPrevented||O(P)}let W=!(G.isExternal||u),he=S.createElement("a",{...E,...se,href:(W?Q:void 0)||G.absoluteURL||V,onClick:W?ne:a,ref:RT(A,te),target:g,"data-discover":!M&&i==="render"?"true":void 0});return I&&!M?S.createElement(S.Fragment,null,he,S.createElement(DT,{page:V})):he});kf.displayName="Link";var LT=S.forwardRef(function({"aria-current":a="page",caseSensitive:i=!1,className:o="",end:r=!1,style:u,to:d,viewTransition:p,children:m,...g},y){let v=no(d,{relative:g.relative}),_=Wt(),T=S.useContext(Zr),{navigator:E,basename:A}=S.useContext(Sn),j=T!=null&&qT(v)&&p===!0,C=E.encodeLocation?E.encodeLocation(v).pathname:v.pathname,w=_.pathname,M=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;i||(w=w.toLowerCase(),M=M?M.toLowerCase():null,C=C.toLowerCase()),M&&A&&(M=Aa(M,A)||M);const G=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let V=w===C||!r&&w.startsWith(C)&&w.charAt(G)==="/",X=M!=null&&(M===C||!r&&M.startsWith(C)&&M.charAt(C.length)==="/"),Q={isActive:V,isPending:X,isTransitioning:j},I=V?a:void 0,te;typeof o=="function"?te=o(Q):te=[o,V?"active":null,X?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let se=typeof u=="function"?u(Q):u;return S.createElement(kf,{...g,"aria-current":I,className:te,ref:y,style:se,to:d,viewTransition:p},typeof m=="function"?m(Q):m)});LT.displayName="NavLink";var UT=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:i,reloadDocument:o,replace:r,state:u,method:d=kr,action:p,onSubmit:m,relative:g,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:_,...T},E)=>{let{unstable_useTransitions:A}=S.useContext(Sn),j=PT(),C=GT(p,{relative:g}),w=d.toLowerCase()==="get"?"get":"post",M=typeof p=="string"&&R0.test(p),G=V=>{if(m&&m(V),V.defaultPrevented)return;V.preventDefault();let X=V.nativeEvent.submitter,Q=(X==null?void 0:X.getAttribute("formmethod"))||d,I=()=>j(X||V.currentTarget,{fetcherKey:a,method:Q,navigate:i,replace:r,state:u,relative:g,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:_});A&&i!==!1?S.startTransition(()=>I()):I()};return S.createElement("form",{ref:E,method:w,action:C,onSubmit:o?m:G,...T,"data-discover":!M&&n==="render"?"true":void 0})});UT.displayName="Form";function zT(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function O0(n){let a=S.useContext(Li);return nt(a,zT(n)),a}function VT(n,{target:a,replace:i,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:p,unstable_defaultShouldRevalidate:m,unstable_useTransitions:g}={}){let y=Xr(),v=Wt(),_=no(n,{relative:d});return S.useCallback(T=>{if(mT(T,a)){T.preventDefault();let E=i!==void 0?i:$l(v)===$l(_),A=()=>y(n,{replace:E,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:p,unstable_defaultShouldRevalidate:m});g?S.startTransition(()=>A()):A()}},[v,y,_,i,o,r,a,n,u,d,p,m,g])}function Mf(n){On(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let a=S.useRef(Yd(n)),i=S.useRef(!1),o=Wt(),r=S.useMemo(()=>gT(o.search,i.current?null:a.current),[o.search]),u=Xr(),d=S.useCallback((p,m)=>{const g=Yd(typeof p=="function"?p(new URLSearchParams(r)):p);i.current=!0,u("?"+g,m)},[u,r]);return[r,d]}var IT=0,HT=()=>`__${String(++IT)}__`;function PT(){let{router:n}=O0("useSubmit"),{basename:a}=S.useContext(Sn),i=iT(),o=n.fetch,r=n.navigate;return S.useCallback(async(u,d={})=>{let{action:p,method:m,encType:g,formData:y,body:v}=bT(u,a);if(d.navigate===!1){let _=d.fetcherKey||HT();await o(_,i,d.action||p,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:y,body:v,formMethod:d.method||m,formEncType:d.encType||g,flushSync:d.flushSync})}else await r(d.action||p,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:y,body:v,formMethod:d.method||m,formEncType:d.encType||g,replace:d.replace,state:d.state,fromRouteId:i,flushSync:d.flushSync,viewTransition:d.viewTransition})},[o,r,a,i])}function GT(n,{relative:a}={}){let{basename:i}=S.useContext(Sn),o=S.useContext(Bn);nt(o,"useFormAction must be used inside a RouteContext");let[r]=o.matches.slice(-1),u={...no(n||".",{relative:a})},d=Wt();if(n==null){u.search=d.search;let p=new URLSearchParams(u.search),m=p.getAll("index");if(m.some(y=>y==="")){p.delete("index"),m.filter(v=>v).forEach(v=>p.append("index",v));let y=p.toString();u.search=y?`?${y}`:""}}return(!n||n===".")&&r.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(u.pathname=u.pathname==="/"?i:Xn([i,u.pathname])),$l(u)}function qT(n,{relative:a}={}){let i=S.useContext(T0);nt(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=O0("useViewTransitionState"),r=no(n,{relative:a});if(!i.isTransitioning)return!1;let u=Aa(i.currentLocation.pathname,o)||i.currentLocation.pathname,d=Aa(i.nextLocation.pathname,o)||i.nextLocation.pathname;return Yl(r.pathname,d)!=null||Yl(r.pathname,u)!=null}function Pn(){const n=Xr();return S.useCallback((a,i)=>{typeof a=="number"?n(a):n(a,i)},[n])}function B0(n){return`/sessions/${encodeURIComponent(n)}`}function Kl(n){return`/projects/${encodeURIComponent(n)}`}function as(n,a){const i=`/tasks/${encodeURIComponent(n)}`;return a?`${i}/${a}`:i}function FT(n){return`/tasks/${encodeURIComponent(n)}/edit`}function Bs(n,a){const i=new URLSearchParams({project:n});return a&&i.set("parent",a),`/tasks/new?${i.toString()}`}function L0(n,a){return`/sessions/new?${new URLSearchParams({env:n,runtime:a}).toString()}`}const Cy="/environments/new",ki="/settings",$T="/pair";function Zt(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Zl(n,a){return console.warn(`[ws] Malformed "${n}" message: ${a}`),!1}function YT(n){return Zt(n)&&typeof n.id=="string"&&typeof n.displayName=="string"&&typeof n.adapterType=="string"&&typeof n.defaultRuntime=="string"&&typeof n.status=="string"&&typeof n.bootstrapped=="boolean"}function Ay(n){return Zt(n)&&typeof n.id=="string"&&typeof n.environmentId=="string"&&typeof n.runtime=="string"&&typeof n.status=="string"&&typeof n.prompt=="string"&&typeof n.startedAt=="string"&&(n.endedAt===void 0||typeof n.endedAt=="string")&&(n.error===void 0||typeof n.error=="string")}function jy(n){return Zt(n)&&typeof n.sessionId=="string"&&typeof n.eventType=="string"&&typeof n.timestamp=="string"&&typeof n.content=="string"&&(n.raw===void 0||typeof n.raw=="string")}function KT(n){return Zt(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.repoUrl=="string"&&typeof n.defaultEnvironmentId=="string"&&typeof n.status=="string"&&typeof n.worktreeBasePath=="string"&&typeof n.useWorktrees=="boolean"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function ZT(n){return Zt(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.title=="string"&&typeof n.status=="string"&&typeof n.branch=="string"&&typeof n.sortOrder=="number"&&typeof n.depth=="number"&&Array.isArray(n.dependsOn)&&Array.isArray(n.childTaskIds)}function XT(n){return Zt(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.taskId=="string"&&typeof n.sessionId=="string"&&typeof n.category=="string"&&typeof n.title=="string"&&typeof n.content=="string"&&Array.isArray(n.tags)&&typeof n.createdAt=="string"}function QT(n){return Zt(n)&&typeof n.name=="string"&&typeof n.tokenType=="string"&&typeof n.envVar=="string"&&typeof n.filePath=="string"&&typeof n.expiresAt=="string"}const JT=new Set(["off","subscription","api_key"]),Cd=new Set(["off","on"]);function WT(n){return Zt(n)&&JT.has(n.claude)&&Cd.has(n.github)&&Cd.has(n.copilot)&&Cd.has(n.codex)}function eE(n){return Zt(n)&&typeof n.environmentId=="string"&&typeof n.stage=="string"&&typeof n.message=="string"&&typeof n.progress=="number"}function tE(n){return Zt(n)&&typeof n.name=="string"&&typeof n.repository=="string"&&typeof n.state=="string"&&typeof n.gitStatus=="string"}function nE(n){return Zt(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.systemPrompt=="string"&&typeof n.toolConfig=="string"&&typeof n.runtime=="string"&&typeof n.model=="string"&&typeof n.maxTurns=="number"&&typeof n.mcpServers=="string"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function Qn(n,a,i,o){return Array.isArray(n)?n.filter((r,u)=>a(r)?!0:(Zl(i,`item at index ${u} in "${o}" has unexpected shape`),!1)):(Zl(i,`expected "${o}" to be an array, got ${typeof n}`),[])}function aE(n){let a;try{a=JSON.parse(n)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!Zt(a)||typeof a.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",a);return}return{type:a.type,payload:Zt(a.payload)?a.payload:void 0}}function sE(n){switch(n){case"waiting_input":return"idle";case"killed":return"interrupted";default:return n}}const iE=3e3,Ti=5e3,lE=4001;function oE(n,a){const i=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`:"ws://localhost:3000",o=S.useRef(void 0),[r,u]=S.useState(!1),d=S.useRef(a.onMessage);d.current=a.onMessage;const p=S.useRef(a.onConnect);p.current=a.onConnect;const m=S.useRef(a.onDisconnect);m.current=a.onDisconnect;const g=S.useCallback(y=>{var v;((v=o.current)==null?void 0:v.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(y))},[]);return S.useEffect(()=>{let y,v;function _(){y=new WebSocket(i),o.current=y,y.onopen=()=>{u(!0),p.current(g)},y.onmessage=T=>{if(typeof T.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const E=aE(T.data);E&&d.current(E)},y.onclose=T=>{var E;if(u(!1),o.current=void 0,(E=m.current)==null||E.call(m),clearTimeout(v),T.code===lE){window.location.href=$T;return}v=setTimeout(_,iE)},y.onerror=()=>{y.close()}}return _(),()=>{clearTimeout(v),y==null||y.close()}},[i,g]),{connected:r,send:g}}const rE=5e3;function cE(n){const[a,i]=S.useState([]),[o,r]=S.useState({}),u=S.useCallback(y=>{var v,_;switch(y.type){case"environments":return i(Qn((v=y.payload)==null?void 0:v.environments,YT,"environments","environments")),!0;case"provision_progress":{if(!eE(y.payload))return Zl("provision_progress","payload is not a valid ProvisionStatus with environmentId"),!0;const T=y.payload;return r(E=>({...E,[T.environmentId]:{stage:T.stage,message:T.message,progress:T.progress}})),T.stage==="ready"&&setTimeout(()=>{r(E=>{const A={...E};return delete A[T.environmentId],A})},rE),!0}case"environment_added":return!0;case"environment_removed":if(typeof((_=y.payload)==null?void 0:_.environmentId)=="string"){const T=y.payload.environmentId;i(E=>E.filter(A=>A.id!==T)),r(E=>{const A={...E};return delete A[T],A})}return n({type:"list_sessions"}),!0;default:return!1}},[n]),d=S.useCallback((y,v,_,T)=>{const E={displayName:y,adapterType:v,adapterConfig:_||{}};T&&(E.defaultRuntime=T),n({type:"add_environment",payload:E})},[n]),p=S.useCallback(y=>{n({type:"provision_environment",payload:{environmentId:y}})},[n]),m=S.useCallback(y=>{n({type:"stop_environment",payload:{environmentId:y}})},[n]),g=S.useCallback(y=>{n({type:"remove_environment",payload:{environmentId:y}})},[n]);return{environments:a,provisionStatus:o,addEnvironment:d,provisionEnvironment:p,stopEnvironment:m,removeEnvironment:g,handleMessage:u}}const Ad=new Set(["pending","running","idle"]),uE=new Set(["completed","failed","interrupted"]),Ny=["pending","running","idle"];function dE(n){const[a,i]=S.useState([]),[o,r]=S.useState([]),[u,d]=S.useState(0),[p,m]=S.useState(void 0),[g,y]=S.useState({}),v=S.useCallback(w=>{var M,G,V,X,Q;switch(w.type){case"sessions":return i(I=>{var O;const te=Qn((O=w.payload)==null?void 0:O.sessions,Ay,"sessions","sessions"),se=new Map(I.map(ne=>[ne.id,ne.status]));return te.map(ne=>{const W=se.get(ne.id);return!W||W===ne.status?ne:uE.has(W)&&Ad.has(ne.status)?{...ne,status:W}:Ad.has(W)&&Ad.has(ne.status)&&Ny.indexOf(W)>Ny.indexOf(ne.status)?{...ne,status:W}:ne})}),!0;case"session_event":{if(!jy(w.payload))return Zl("session_event","payload is not a valid SessionEvent"),!0;const I=w.payload;let te=0;if(r(se=>{const O=[...se,I];return O.length>Ti?(te=O.length-Ti,O.slice(-Ti)):O}),te>0&&d(se=>se+te),I.eventType==="status"){const se=sE(I.content);i(O=>O.some(W=>W.id===I.sessionId)?O.map(W=>W.id===I.sessionId?{...W,status:se}:W):[...O,{id:I.sessionId,environmentId:"",runtime:"",status:se,prompt:"",startedAt:I.timestamp}])}return!0}case"session_events":{const I=Qn((M=w.payload)==null?void 0:M.events,jy,"session_events","events"),te=(G=w.payload)==null?void 0:G.sessionId;if(typeof te!="string")return Zl("session_events","missing or non-string sessionId"),!0;if(I.length>0){let se=0;r(O=>{const ne=new Set;for(const P of O)P.sessionId===te&&ne.add(`${P.timestamp}|${P.eventType}`);const W=I.filter(P=>!ne.has(`${P.timestamp}|${P.eventType}`)),he=[...O,...W].sort((P,U)=>P.sessionId!==U.sessionId?0:P.timestamp.localeCompare(U.timestamp));return he.length>Ti?(se=he.length-Ti,he.slice(-Ti)):he}),se>0&&d(O=>O+se)}return!0}case"spawned":{const I=(V=w.payload)==null?void 0:V.sessionId;return typeof I=="string"&&I&&m(I),n({type:"list_sessions"}),!0}case"task_sessions":{const I=(X=w.payload)==null?void 0:X.taskId;if(typeof I!="string"||!I)return!0;const te=Qn((Q=w.payload)==null?void 0:Q.sessions,Ay,"task_sessions","sessions");return y(se=>({...se,[I]:te})),!0}default:return!1}},[n]),_=S.useCallback((w,M,G,V,X,Q)=>{n({type:"spawn",payload:{environmentId:w,prompt:M,model:G||"",runtime:V||"",personaId:X||"",worktreeBasePath:Q||""}})},[n]),T=S.useCallback((w,M)=>{n({type:"send_input",payload:{sessionId:w,text:M}})},[n]),E=S.useCallback(w=>{n({type:"kill",payload:{sessionId:w}})},[n]),A=S.useCallback(w=>{n({type:"get_session_events",payload:{sessionId:w}})},[n]),j=S.useCallback(()=>{r([]),d(0)},[]),C=S.useCallback(w=>{n({type:"get_task_sessions",payload:{taskId:w}})},[n]);return{sessions:a,events:o,eventsDropped:u,lastSpawnedId:p,taskSessions:g,spawn:_,sendInput:T,kill:E,loadSessionEvents:A,clearEvents:j,loadTaskSessions:C,handleMessage:v}}function fE(n){const[a,i]=S.useState([]),[o,r]=S.useState(!1),u=S.useCallback(y=>{var v;switch(y.type){case"projects":return i(Qn((v=y.payload)==null?void 0:v.projects,KT,"projects","projects")),!0;case"project_created":return r(!1),n({type:"list_projects"}),!0;case"project_archived":return n({type:"list_projects"}),!0;case"project_updated":return n({type:"list_projects"}),!0;default:return!1}},[n]),d=S.useCallback(()=>{r(!1)},[]),p=S.useCallback((y,v,_,T)=>{r(!0),n({type:"create_project",payload:{name:y,description:v||"",repoUrl:_||"",defaultEnvironmentId:T||""}})},[n]),m=S.useCallback(y=>{n({type:"archive_project",payload:{projectId:y}})},[n]),g=S.useCallback((y,v)=>{n({type:"update_project",payload:{projectId:y,...v}})},[n]);return{projects:a,projectCreating:o,createProject:p,archiveProject:m,updateProject:g,handleMessage:u,onDisconnect:d}}function hE(n){const[a,i]=S.useState([]),[o,r]=S.useState(void 0),u=S.useCallback(E=>{var A,j,C;switch(E.type){case"tasks":{const w=Qn((A=E.payload)==null?void 0:A.tasks,ZT,"tasks","tasks"),M=(typeof((j=E.payload)==null?void 0:j.projectId)=="string"?E.payload.projectId:"")||(w.length>0?w[0].projectId:"");return M?(i(G=>[...G.filter(V=>V.projectId!==M),...w]),!0):(i(w),!0)}case"task_created":{const w=(C=E.payload)==null?void 0:C.task;if(Zt(w)){const M=typeof w.project_id=="string"?w.project_id:typeof w.projectId=="string"?w.projectId:"";M&&n({type:"list_tasks",payload:{projectId:M}})}return!0}case"task_started":{const w=E.payload;if(!Zt(w))return!0;r(G=>w.taskId&&G===w.taskId?void 0:G),w.sessionId&&(n({type:"list_sessions"}),typeof w.taskId=="string"&&typeof w.sessionId=="string"&&i(G=>G.map(V=>V.id===w.taskId?{...V,latestSessionId:w.sessionId}:V)));const M=typeof w.projectId=="string"?w.projectId:void 0;return M?n({type:"list_tasks",payload:{projectId:M}}):w.taskId&&i(G=>{const V=G.find(X=>X.id===w.taskId);return V&&n({type:"list_tasks",payload:{projectId:V.projectId}}),G}),!0}case"task_completed":case"task_deleted":case"task_updated":{const w=E.payload;if(!Zt(w))return!0;const M=typeof w.projectId=="string"?w.projectId:void 0;return M?n({type:"list_tasks",payload:{projectId:M}}):w.taskId&&i(G=>{const V=G.find(X=>X.id===w.taskId);return V&&n({type:"list_tasks",payload:{projectId:V.projectId}}),G}),!0}default:return!1}},[n]),d=S.useCallback(()=>{r(void 0)},[]),p=S.useCallback(E=>{n({type:"list_tasks",payload:{projectId:E}})},[n]),m=S.useCallback((E,A,j,C,w)=>{n({type:"create_task",payload:{projectId:E,title:A,description:j||"",dependsOn:C||[],parentTaskId:w||""}})},[n]),g=S.useCallback((E,A,j,C,w,M)=>{r(E),n({type:"start_task",payload:{taskId:E,runtime:A||"",model:j||"",personaId:C||"",environmentId:w||"",notes:M||""}})},[n]),y=S.useCallback(E=>{n({type:"complete_task",payload:{taskId:E}})},[n]),v=S.useCallback(E=>{n({type:"resume_task",payload:{taskId:E}})},[n]),_=S.useCallback((E,A,j,C)=>{n({type:"update_task",payload:{taskId:E,title:A,description:j,dependsOn:C}})},[n]),T=S.useCallback(E=>{n({type:"delete_task",payload:{taskId:E}})},[n]);return{tasks:a,taskStartingId:o,loadTasks:p,createTask:m,startTask:g,completeTask:y,resumeTask:v,updateTask:_,deleteTask:T,handleMessage:u,onDisconnect:d}}function pE(n){const[a,i]=S.useState([]),o=S.useCallback(d=>{var p,m;switch(d.type){case"findings":return i(Qn((p=d.payload)==null?void 0:p.findings,XT,"findings","findings")),!0;case"finding_posted":return typeof((m=d.payload)==null?void 0:m.projectId)=="string"&&n({type:"list_findings",payload:{projectId:d.payload.projectId}}),!0;default:return!1}},[n]),r=S.useCallback(d=>{n({type:"list_findings",payload:{projectId:d}})},[n]),u=S.useCallback((d,p,m,g,y)=>{n({type:"post_finding",payload:{projectId:d,title:p,content:m,category:g||"general",tags:y||[]}})},[n]);return{findings:a,loadFindings:r,postFinding:u,handleMessage:o}}function mE(n){const[a,i]=S.useState([]),o=S.useCallback(p=>{var m;switch(p.type){case"tokens":return i(Qn((m=p.payload)==null?void 0:m.tokens,QT,"tokens","tokens")),!0;case"token_changed":return n({type:"list_tokens"}),!0;default:return!1}},[n]),r=S.useCallback(()=>{n({type:"list_tokens"})},[n]),u=S.useCallback((p,m,g,y,v)=>{n({type:"set_token",payload:{name:p,value:m,tokenType:g,envVar:y,filePath:v}})},[n]),d=S.useCallback(p=>{n({type:"delete_token",payload:{name:p}})},[n]);return{tokens:a,loadTokens:r,setToken:u,deleteToken:d,handleMessage:o}}function gE(n){const[a,i]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),o=S.useCallback(u=>{switch(u.type){case"credential_providers":return WT(u.payload)&&i(u.payload),!0;default:return!1}},[]),r=S.useCallback(u=>{n({type:"set_credential_providers",payload:u})},[n]);return{credentialProviders:a,updateCredentialProviders:r,handleMessage:o}}function yE(n,a){const[i,o]=S.useState([]),[r,u]=S.useState(""),[d,p]=S.useState(""),[m,g]=S.useState(!1),y=S.useCallback(T=>{var E,A,j;switch(T.type){case"codespaces_list":{const C=Qn((E=T.payload)==null?void 0:E.codespaces,tE,"codespaces_list","codespaces"),w=typeof((A=T.payload)==null?void 0:A.error)=="string"?T.payload.error:"";return o(C),p(w),!0}case"codespace_created":return g(!1),n({type:"list_codespaces"}),!0;case"codespace_create_error":{g(!1);const C=typeof((j=T.payload)==null?void 0:j.message)=="string"?T.payload.message:"Failed to create codespace";return u(C),!0}default:return!1}},[n]),v=S.useCallback(()=>{n({type:"list_codespaces"})},[n]),_=S.useCallback((T,E)=>{if(!a){u("Not connected to server. Please try again once the connection is restored.");return}g(!0),u("");const A={repo:T};E&&(A.machine=E),n({type:"create_codespace",payload:A})},[n,a]);return{codespaces:i,codespaceError:r,codespaceListError:d,codespaceCreating:m,listCodespaces:v,createCodespace:_,handleMessage:y}}function vE(n){const[a,i]=S.useState([]),o=S.useCallback(p=>{var m;switch(p.type){case"personas":{const g=Qn((m=p.payload)==null?void 0:m.personas,nE,"personas","personas");return i(g),!0}case"persona_created":case"persona_updated":case"persona_deleted":return n({type:"list_personas"}),!0;default:return!1}},[n]),r=S.useCallback((p,m,g,y,v,_)=>{n({type:"create_persona",payload:{name:p,description:m,systemPrompt:g,runtime:y||"",model:v||"",maxTurns:_||0}})},[n]),u=S.useCallback((p,m,g,y,v,_,T)=>{n({type:"update_persona",payload:{personaId:p,name:m||"",description:g||"",systemPrompt:y||"",runtime:v||"",model:_||"",maxTurns:T||0}})},[n]),d=S.useCallback(p=>{n({type:"delete_persona",payload:{personaId:p}})},[n]);return{personas:a,createPersona:r,updatePersona:u,deletePersona:d,handleMessage:o}}function bE(n){const{connected:a,send:i}=oE(n,{onMessage:_,onConnect:T,onDisconnect:E}),o=cE(i),r=dE(i),u=fE(i),d=hE(i),p=pE(i),m=mE(i),g=gE(i),y=yE(i,a),v=vE(i);function _(j){var C;if(!o.handleMessage(j)&&!r.handleMessage(j)&&!u.handleMessage(j)&&!d.handleMessage(j)&&!p.handleMessage(j)&&!m.handleMessage(j)&&!g.handleMessage(j)&&!y.handleMessage(j)&&!v.handleMessage(j)&&j.type==="error"){console.error("[ws]",(C=j.payload)==null?void 0:C.message);return}}function T(j){j({type:"list_environments"}),j({type:"list_sessions"}),j({type:"list_projects"}),j({type:"list_tokens"}),j({type:"get_credential_providers"}),j({type:"list_personas"}),j({type:"subscribe_all"})}function E(){u.onDisconnect(),d.onDisconnect()}const A=S.useCallback(()=>{i({type:"list_environments"}),i({type:"list_sessions"}),i({type:"list_projects"}),i({type:"list_tokens"})},[i]);return{connected:a,environments:o.environments,sessions:r.sessions,events:r.events,eventsDropped:r.eventsDropped,lastSpawnedId:r.lastSpawnedId,projects:u.projects,tasks:d.tasks,findings:p.findings,tokens:m.tokens,spawn:r.spawn,sendInput:r.sendInput,kill:r.kill,refresh:A,loadSessionEvents:r.loadSessionEvents,clearEvents:r.clearEvents,createProject:u.createProject,archiveProject:u.archiveProject,updateProject:u.updateProject,loadTasks:d.loadTasks,createTask:d.createTask,startTask:d.startTask,completeTask:d.completeTask,resumeTask:d.resumeTask,updateTask:d.updateTask,deleteTask:d.deleteTask,loadFindings:p.loadFindings,postFinding:p.postFinding,addEnvironment:o.addEnvironment,loadTokens:m.loadTokens,setToken:m.setToken,deleteToken:m.deleteToken,credentialProviders:g.credentialProviders,updateCredentialProviders:g.updateCredentialProviders,provisionStatus:o.provisionStatus,provisionEnvironment:o.provisionEnvironment,stopEnvironment:o.stopEnvironment,removeEnvironment:o.removeEnvironment,codespaces:y.codespaces,codespaceError:y.codespaceError,codespaceListError:y.codespaceListError,codespaceCreating:y.codespaceCreating,listCodespaces:y.listCodespaces,createCodespace:y.createCodespace,projectCreating:u.projectCreating,taskStartingId:d.taskStartingId,personas:v.personas,createPersona:v.createPersona,updatePersona:v.updatePersona,deletePersona:v.deletePersona,taskSessions:r.taskSessions,loadTaskSessions:r.loadTaskSessions}}const Rf=S.createContext(void 0);function SE({children:n}){const a=bE();return h.jsx(Rf.Provider,{value:a,children:n})}function qt(){const n=S.useContext(Rf);if(!n)throw new Error("useGrackle must be used within GrackleProvider");return n}const _E=[{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}],xE=[{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"}],TE=[{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:
|
|
37
|
+
- src/middleware/auth.ts
|
|
38
|
+
- src/routes/login.ts
|
|
39
|
+
- 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:
|
|
40
|
+
\`\`\`typescript
|
|
41
|
+
import jwt from "jsonwebtoken";
|
|
42
|
+
import type { Request, Response, NextFunction } from "express";
|
|
43
|
+
|
|
44
|
+
const JWT_SECRET = process.env.JWT_SECRET || "change-me";
|
|
45
|
+
|
|
46
|
+
export function verifyToken(req: Request, res: Response, next: NextFunction): void {
|
|
47
|
+
const header = req.headers.authorization;
|
|
48
|
+
if (!header?.startsWith("Bearer ")) {
|
|
49
|
+
res.status(401).json({ error: "Missing token" });
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
const decoded = jwt.verify(header.slice(7), JWT_SECRET);
|
|
54
|
+
req.user = decoded;
|
|
55
|
+
next();
|
|
56
|
+
} catch {
|
|
57
|
+
res.status(403).json({ error: "Invalid token" });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
\`\`\``},{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"}],EE=[{id:"proj-alpha",name:"Project Alpha",description:"Core platform API and authentication services",repoUrl:"https://github.com/acme/alpha",defaultEnvironmentId:"env-local-01",status:"active",worktreeBasePath:"",useWorktrees:!0,createdAt:"2026-01-15T10:00:00Z",updatedAt:"2026-01-15T10:00:00Z"},{id:"proj-beta",name:"Data Pipeline",description:"ETL pipelines for analytics and reporting",repoUrl:"https://github.com/acme/data-pipeline",defaultEnvironmentId:"env-docker-01",status:"active",worktreeBasePath:"",useWorktrees:!0,createdAt:"2026-02-01T14:30:00Z",updatedAt:"2026-02-01T14:30:00Z"},{id:"proj-gamma",name:"Mobile App",description:"React Native cross-platform mobile application",repoUrl:"",defaultEnvironmentId:"env-local-01",status:"archived",worktreeBasePath:"",useWorktrees:!0,createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],CE=[{id:"task-001",projectId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"working",branch:"feat/jwt-auth",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0},{id:"task-001a",projectId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"complete",branch:"feat/jwt-auth/design-token-schema",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-001b",projectId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"working",branch:"feat/jwt-auth/implement-auth-middleware",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-001c",projectId:"proj-alpha",title:"Write auth integration tests",description:"End-to-end tests for login flow, token refresh, and protected route access",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-002",projectId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-003",projectId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"paused",branch:"feat/openapi-docs",latestSessionId:"sess-002",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-004",projectId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"complete",branch:"feat/db-pool",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-005",projectId:"proj-alpha",title:"Fix N+1 query in user list",description:"Use a JOIN instead of per-row lookups in GET /api/users",status:"not_started",branch:"fix/user-list-n1",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-006",projectId:"proj-beta",title:"Add Parquet export support",description:"Allow pipeline outputs to be written as Parquet files for Spark consumption",status:"working",branch:"feat/parquet-export",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0},{id:"task-006a",projectId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"complete",branch:"feat/parquet-export/define-parquet-schema-mapping",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006b",projectId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"complete",branch:"feat/parquet-export/implement-row-group-writer",latestSessionId:"",dependsOn:["task-006a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006c",projectId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"working",branch:"feat/parquet-export/add-compression-options",latestSessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006d",projectId:"proj-beta",title:"Write Parquet integration tests",description:"Round-trip tests: write Parquet, read back with pyarrow, verify data integrity",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-006c"],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-007",projectId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"working",branch:"feat/incremental",latestSessionId:"sess-004",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0},{id:"task-007a",projectId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"complete",branch:"feat/incremental/design-watermark-storage",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-007b",projectId:"proj-beta",title:"Implement change detection query",description:"Generate WHERE clauses from watermarks to fetch only changed rows",status:"failed",branch:"feat/incremental/implement-change-detection-query",latestSessionId:"",dependsOn:["task-007a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-008",projectId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"paused",branch:"feat/monitoring",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1}],wy=[{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"}],AE=[{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:""}],jE=[{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"}],NE={"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 Mt(n){return new Date(Date.now()+n).toISOString()}const Dy=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Mt(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:Mt(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:Mt(1600),content:`Found 5 endpoints that need refactoring:
|
|
61
|
+
- GET /api/users
|
|
62
|
+
- POST /api/users
|
|
63
|
+
- GET /api/users/:id
|
|
64
|
+
- PUT /api/users/:id
|
|
65
|
+
- DELETE /api/users/:id`}},{delayMs:2800,event:{eventType:"output",timestamp:Mt(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:Mt(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:Mt(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:Mt(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:Mt(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:Mt(1400),content:`Found tables to modify:
|
|
66
|
+
- users (add column: last_login_at)
|
|
67
|
+
- sessions (add index on expires_at)
|
|
68
|
+
- audit_log (new table)`}},{delayMs:2200,event:{eventType:"output",timestamp:Mt(2200),content:`⚠ This migration will add a NOT NULL column to the users table.
|
|
69
|
+
The table has 50,000+ rows — this may lock the table briefly.
|
|
70
|
+
|
|
71
|
+
Please confirm to proceed.`}}],resumeSteps:[{delayMs:500,event:{eventType:"output",timestamp:Mt(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:Mt(1e3),content:`Migration 001_add_last_login.sql applied successfully.
|
|
72
|
+
Migration 002_sessions_index.sql applied successfully.
|
|
73
|
+
Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventType:"output",timestamp:Mt(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:Mt(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Mt(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:Mt(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:Mt(1800),content:`Writing test cases:
|
|
74
|
+
- should calculate monthly total
|
|
75
|
+
- should apply discount codes
|
|
76
|
+
- should handle currency conversion
|
|
77
|
+
- should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:Mt(2800),content:`Error: Cannot resolve import 'src/services/stripe-client.ts' — module not found.
|
|
78
|
+
The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:Mt(3500),content:"failed"}}]}],ky=400;function wE({children:n}){const[a,i]=S.useState(xE),[o,r]=S.useState(TE),[u,d]=S.useState(void 0),[p,m]=S.useState(EE),[g,y]=S.useState(CE),[v,_]=S.useState(wy),[T,E]=S.useState(AE),[A,j]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[C,w]=S.useState(jE),[M]=S.useState(NE),G=S.useRef(0),V=S.useRef(0),X=S.useRef(new Set),Q=S.useRef(new Map),I=S.useRef(g);I.current=g;const te=S.useRef(new Map),se=S.useRef(new Map),O=S.useCallback(Z=>(G.current+=1,`mock-${Z}-${String(G.current).padStart(3,"0")}`),[]),ne=S.useCallback(()=>{const Z=Dy[V.current%Dy.length];return V.current+=1,Z},[]),W=S.useCallback((Z,ae,oe)=>{const ue=setTimeout(()=>{var be;X.current.delete(ue),oe&&((be=Q.current.get(oe))==null||be.delete(ue)),Z()},ae);X.current.add(ue),oe&&(Q.current.has(oe)||Q.current.set(oe,new Set),Q.current.get(oe).add(ue))},[]),he=S.useCallback(Z=>{const ae=Q.current.get(Z);ae&&(ae.forEach(oe=>{clearTimeout(oe),X.current.delete(oe)}),Q.current.delete(Z))},[]),P=S.useCallback((Z,ae)=>{i(oe=>oe.map(ue=>ue.id===Z?{...ue,status:ae}:ue))},[]),U=S.useCallback(Z=>{r(ae=>[...ae,Z])},[]),K=S.useCallback((Z,ae,oe)=>{ae.forEach((ue,be)=>{W(()=>{const Se={sessionId:Z,...ue.event,timestamp:new Date().toISOString()};U(Se),ue.event.eventType==="status"&&P(Z,ue.event.content),be===ae.length-1&&oe&&oe()},ue.delayMs,Z)})},[W,U,P]),ee=S.useCallback((Z,ae,oe,ue)=>{console.log("[MockGrackle] spawn",{environmentId:Z,prompt:ae,runtime:ue});const be=O("sess"),Se={id:be,environmentId:Z,runtime:ue||"claude-code",status:"running",prompt:ae,startedAt:new Date().toISOString()};i(Me=>[...Me,Se]),d(be);const Qe=ne();if(console.log(`[MockGrackle] Playing scenario: ${Qe.label}`),Qe.pauseForInput){const Me=Qe.pauseAfterStep??Qe.steps.length-1,lt=Qe.steps.slice(0,Me+1),Dt=lt.length>0?lt[lt.length-1].delayMs:0;K(be,lt),W(()=>{P(be,"idle"),U({sessionId:be,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},Dt+ky,be),Qe.resumeSteps&&te.current.set(be,Qe.resumeSteps)}else K(be,Qe.steps)},[O,ne,K,W,P,U]),we=S.useCallback(Z=>{console.log("[MockGrackle] kill",Z),he(Z),te.current.delete(Z),P(Z,"interrupted"),U({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"interrupted"}),y(ae=>ae.map(oe=>oe.latestSessionId===Z&&oe.status==="working"?{...oe,status:"not_started"}:oe))},[he,P,U]),xe=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),Ue=S.useCallback(Z=>{console.log("[MockGrackle] loadSessionEvents",Z)},[]),Ee=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),r([])},[]),ye=S.useCallback((Z,ae,oe,ue)=>{console.log("[MockGrackle] createProject",{name:Z,description:ae});const be={id:O("proj"),name:Z,description:ae||"",repoUrl:oe||"",defaultEnvironmentId:ue||"",status:"active",worktreeBasePath:"",useWorktrees:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};m(Se=>[...Se,be])},[O]),Te=S.useCallback(Z=>{console.log("[MockGrackle] archiveProject",Z),m(ae=>ae.map(oe=>oe.id===Z?{...oe,status:"archived"}:oe))},[]),J=S.useCallback(Z=>{console.log("[MockGrackle] loadTasks",Z)},[]),F=S.useCallback((Z,ae,oe,ue,be)=>{console.log("[MockGrackle] createTask",{projectId:Z,title:ae,parentTaskId:be}),y(Se=>{const Me=Se.filter(Rt=>Rt.projectId===Z).reduce((Rt,ot)=>Math.max(Rt,ot.sortOrder),0),lt=be?Se.find(Rt=>Rt.id===be):void 0;if(be&&!lt)return console.warn("[MockGrackle] Parent task not found:",be),Se;if(lt&&!lt.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",be),Se;const Dt=lt?lt.depth+1:0,Tt={id:O("task"),projectId:Z,title:ae,description:oe||"",status:"not_started",branch:"",latestSessionId:"",dependsOn:ue||[],reviewNotes:void 0,sortOrder:Me+1,createdAt:new Date().toISOString(),parentTaskId:be||"",depth:Dt,childTaskIds:[],canDecompose:!be};return[...Se,Tt]})},[O]),me=S.useCallback((Z,ae,oe)=>{var lt;console.log("[MockGrackle] startTask",{taskId:Z,runtime:ae});const ue=I.current.find(Dt=>Dt.id===Z),be=(ue==null?void 0:ue.title)??"",Se=O("sess"),Qe={id:Se,environmentId:"env-local-01",runtime:ae||"claude-code",status:"running",prompt:be||Z,startedAt:new Date().toISOString()};i(Dt=>[...Dt,Qe]),y(Dt=>Dt.map(Tt=>Tt.id===Z?{...Tt,status:"working",latestSessionId:Se,branch:`mock/${Z.slice(0,8)}`}:Tt));const Me=ne();if(console.log(`[MockGrackle] Playing task scenario: ${Me.label}`),Me.pauseForInput){const Dt=Me.pauseAfterStep??Me.steps.length-1,Tt=Me.steps.slice(0,Dt+1),Rt=Tt.length>0?Tt[Tt.length-1].delayMs:0;if(K(Se,Tt),W(()=>{P(Se,"idle"),U({sessionId:Se,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},Rt+ky,Se),Me.resumeSteps){const ot=[...Me.resumeSteps];te.current.set(Se,ot);const Et=ot.reduce((cn,mt)=>Math.max(cn,mt.delayMs),0);se.current.set(Se,{taskId:Z,delayAfterResume:Et+200})}}else{const Dt=Me.steps.length>0?Me.steps[Me.steps.length-1].delayMs:0;K(Se,Me.steps);const Tt=(lt=Me.steps[Me.steps.length-1])==null?void 0:lt.event.content;W(()=>{Tt==="completed"?y(Rt=>Rt.map(ot=>ot.id===Z&&ot.status==="working"?{...ot,status:"paused"}:ot)):Tt==="failed"&&y(Rt=>Rt.map(ot=>ot.id===Z&&ot.status==="working"?{...ot,status:"failed"}:ot))},Dt+100,Se)}},[O,ne,K,W,P,U]),Ae=S.useCallback((Z,ae)=>{console.log("[MockGrackle] sendInput",{sessionId:Z,text:ae}),U({sessionId:Z,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${ae}`}),P(Z,"running"),U({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const oe=te.current.get(Z);if(oe)te.current.delete(Z),K(Z,oe);else{const be=[{delayMs:500,event:{eventType:"output",timestamp:new Date().toISOString(),content:"I received your input, continuing..."}},{delayMs:1500,event:{eventType:"status",timestamp:new Date().toISOString(),content:"completed"}}];K(Z,be)}const ue=se.current.get(Z);ue&&(se.current.delete(Z),W(()=>{y(be=>be.map(Se=>Se.id===ue.taskId&&Se.status==="working"?{...Se,status:"paused"}:Se))},ue.delayAfterResume,Z))},[U,P,K,W]),Ie=S.useCallback(Z=>{console.log("[MockGrackle] completeTask",Z),y(ae=>ae.map(oe=>oe.id===Z?{...oe,status:"complete"}:oe))},[]),pt=S.useCallback(Z=>{console.log("[MockGrackle] resumeTask",Z)},[]),xt=S.useCallback((Z,ae,oe,ue)=>{console.log("[MockGrackle] updateTask",{taskId:Z,title:ae}),y(be=>be.map(Se=>Se.id===Z?{...Se,title:ae.trim()||Se.title,description:oe,dependsOn:ue}:Se))},[]),Lt=S.useCallback(Z=>{console.log("[MockGrackle] deleteTask",Z),y(ae=>ae.filter(oe=>oe.id!==Z))},[]),Xe=S.useCallback(Z=>{console.log("[MockGrackle] loadFindings",Z),_(wy.filter(ae=>ae.projectId===Z))},[]),qe=S.useCallback((Z,ae,oe,ue,be)=>{console.log("[MockGrackle] postFinding",{projectId:Z,title:ae});const Se={id:O("find"),projectId:Z,taskId:"",sessionId:"",category:ue||"general",title:ae,content:oe,tags:be||[],createdAt:new Date().toISOString()};_(Qe=>[...Qe,Se])},[O]),Be=S.useCallback((Z,ae,oe,ue)=>{console.log("[MockGrackle] addEnvironment",{displayName:Z,adapterType:ae,adapterConfig:oe,defaultRuntime:ue})},[]),Ln=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),Un=S.useCallback((Z,ae,oe,ue,be)=>{console.log("[MockGrackle] setToken",{name:Z,tokenType:oe}),E(Se=>[...Se.filter(Me=>Me.name!==Z),{name:Z,tokenType:oe,envVar:ue,filePath:be,expiresAt:""}])},[]),ea=S.useCallback(Z=>{console.log("[MockGrackle] deleteToken",Z),E(ae=>ae.filter(oe=>oe.name!==Z))},[]),en=S.useCallback(Z=>{console.log("[MockGrackle] updateCredentialProviders",Z),j(Z)},[]);S.useEffect(()=>()=>{X.current.forEach(clearTimeout),X.current.clear()},[]);const ta=S.useMemo(()=>({connected:!0,environments:_E,sessions:a,events:o,eventsDropped:0,lastSpawnedId:u,projects:p,tasks:g,findings:v,tokens:T,credentialProviders:A,spawn:ee,sendInput:Ae,kill:we,refresh:xe,loadSessionEvents:Ue,clearEvents:Ee,createProject:ye,archiveProject:Te,updateProject:(Z,ae)=>{console.log("[MockGrackle] updateProject",{projectId:Z,...ae}),m(oe=>oe.map(ue=>ue.id!==Z?ue:{...ue,...ae.name!==void 0?{name:ae.name}:{},...ae.description!==void 0?{description:ae.description}:{},...ae.repoUrl!==void 0?{repoUrl:ae.repoUrl}:{},...ae.defaultEnvironmentId!==void 0?{defaultEnvironmentId:ae.defaultEnvironmentId}:{},...ae.worktreeBasePath!==void 0?{worktreeBasePath:ae.worktreeBasePath}:{},...ae.useWorktrees!==void 0?{useWorktrees:ae.useWorktrees}:{},updatedAt:new Date().toISOString()}))},loadTasks:J,createTask:F,startTask:me,completeTask:Ie,resumeTask:pt,updateTask:xt,deleteTask:Lt,loadFindings:Xe,postFinding:qe,addEnvironment:Be,loadTokens:Ln,setToken:Un,deleteToken:ea,updateCredentialProviders:en,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceListError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:C,createPersona:(Z,ae,oe,ue,be,Se)=>{console.log("[MockGrackle] createPersona",{name:Z});const Qe={id:`mock-persona-${Date.now()}`,name:Z,description:ae,systemPrompt:oe,toolConfig:"{}",runtime:ue??"claude-code",model:be||"",maxTurns:Se||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};w(Me=>[...Me,Qe])},updatePersona:(Z,ae,oe,ue,be,Se,Qe)=>{console.log("[MockGrackle] updatePersona",{personaId:Z,name:ae}),w(Me=>Me.map(lt=>lt.id!==Z?lt:{...lt,...ae!==void 0?{name:ae}:{},...oe!==void 0?{description:oe}:{},...ue!==void 0?{systemPrompt:ue}:{},...be!==void 0?{runtime:be}:{},...Se!==void 0?{model:Se}:{},...Qe!==void 0?{maxTurns:Qe}:{},updatedAt:new Date().toISOString()}))},deletePersona:Z=>{console.log("[MockGrackle] deletePersona",Z),w(ae=>ae.filter(oe=>oe.id!==Z))},taskSessions:M,loadTaskSessions:Z=>{console.log("[MockGrackle] loadTaskSessions",Z)}}),[a,o,u,p,g,v,T,A,C,M,ee,Ae,we,xe,Ue,Ee,ye,Te,J,F,me,Ie,pt,xt,Lt,Xe,qe,Be,Ln,Un,ea,en]);return h.jsx(Rf.Provider,{value:ta,children:n})}const U0=S.createContext(void 0),DE=4e3;function kE({children:n}){const[a,i]=S.useState([]),o=S.useRef(0),r=S.useCallback(d=>{i(p=>p.filter(m=>m.id!==d))},[]),u=S.useCallback((d,p="info",m=DE)=>{const g=`toast-${++o.current}`;i(y=>[...y,{id:g,message:d,variant:p,duration:m}])},[]);return h.jsx(U0.Provider,{value:{toasts:a,showToast:u,dismissToast:r},children:n})}function ao(){const n=S.useContext(U0);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const Wr=[{id:"grackle",label:"Grackle",description:"The default Grackle theme — iridescent purple on clean dark.",swatches:["#0e1218","#8b5cf6","#60a5fa","#e5e7eb","#34d399"],variantLightId:"grackle-light",variantDarkId:"grackle-dark"},{id:"grackle-light",label:"Grackle Light",description:"Light Grackle variant.",hidden:!0},{id:"grackle-dark",label:"Grackle Dark",description:"Dark Grackle variant.",hidden:!0},{id:"glass",label:"Glassmorphism",description:"Dark frosted-glass aesthetic with backdrop blur effects.",swatches:["#0a0c14","#4ecca3","#70a1ff","#e2e8f0","#a855f7"]},{id:"matrix",label:"Matrix",description:"Phosphor-green CRT terminal with scanlines and glow.",swatches:["#050505","#00ff41","#00bfff","#33ff77","#ffb000"]},{id:"brutalist",label:"Neubrutalism",description:"Thick borders, raw colors, bold type — ugly on purpose.",swatches:["#f5f0e8","#ff5757","#5ce1e6","#1a1a1a","#ffde59"],variantLightId:"brutalist-light",variantDarkId:"brutalist-dark"},{id:"brutalist-light",label:"Neubrutalism Light",description:"Light neubrutalism variant.",hidden:!0},{id:"brutalist-dark",label:"Neubrutalism Dark",description:"Dark neubrutalism variant.",hidden:!0},{id:"monokai",label:"Monokai",description:"Classic warm editor palette — pink, green, and purple.",swatches:["#272822","#f92672","#a6e22e","#f8f8f2","#ae81ff"],variantLightId:"monokai-light",variantDarkId:"monokai-dark"},{id:"monokai-dark",label:"Monokai Dark",description:"Dark Monokai variant.",hidden:!0},{id:"monokai-light",label:"Monokai Light",description:"Light Monokai variant.",hidden:!0},{id:"ubuntu",label:"Ubuntu",description:"Aubergine terminal with the GNOME Tango palette.",swatches:["#300a24","#8ae234","#ef2929","#eeeeec","#fce94f"]},{id:"sandstone",label:"Sandstone",description:"Warm terracotta accent on dark brown, in the style of Claude Code.",swatches:["#1a1815","#C15F3C","#6b8afd","#e8e6e3","#a78bfa"]},{id:"verdigris",label:"Verdigris",description:"Teal accent on charcoal, in the style of ChatGPT.",swatches:["#141414","#00a67e","#3b82f6","#ececec","#ab68ff"]},{id:"primer",label:"Primer",description:"Blue accent on ink-dark grey, in the style of GitHub.",swatches:["#0d1117","#58a6ff","#3fb950","#c9d1d9","#bc8cff"]}],z0=new Set(Wr.map(n=>n.id)),My="grackle";function Kd(n){return Wr.find(a=>a.id===n)}const Zd="grackle-theme",V0="grackle-prefer-system",I0="(prefers-color-scheme: dark)";let Ul=[],Rr;function jd(){Rr=void 0;for(const n of Ul)n()}function Xd(){return typeof window>"u"?!1:window.matchMedia(I0).matches}function Hl(){if(typeof localStorage>"u")return My;try{const n=localStorage.getItem(Zd);if(n!==null&&z0.has(n))return n}catch{}return My}function Ur(){if(typeof localStorage>"u")return!1;try{return localStorage.getItem(V0)==="true"}catch{return!1}}function Qd(n){return Wr.find(a=>a.variantLightId===n||a.variantDarkId===n)}function H0(n,a){const i=Kd(n);if(i!=null&&i.variantDarkId)return a&&i.variantLightId?Xd()?i.variantDarkId:i.variantLightId:i.variantDarkId;if(i!=null&&i.hidden&&a){const o=Qd(n);if(o!=null&&o.variantLightId&&o.variantDarkId)return Xd()?o.variantDarkId:o.variantLightId}return n}function Ci(n,a,i=!1){i&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=H0(n,a),i&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&Ci(Hl(),Ur());function ME(){return Rr===void 0&&(Rr={themeId:Hl(),systemDark:Xd(),preferSystem:Ur()}),Rr}function RE(n){return Ul=[...Ul,n],()=>{Ul=Ul.filter(a=>a!==n)}}function OE(){const n=S.useSyncExternalStore(RE,ME),{themeId:a,preferSystem:i}=n,o=H0(a,i),r=S.useCallback(d=>{if(z0.has(d)){try{localStorage.setItem(Zd,d)}catch{}Ci(d,Ur(),!0),jd()}},[]),u=S.useCallback(d=>{try{localStorage.setItem(V0,d?"true":"false")}catch{}if(d){const p=Hl(),m=Kd(p);if(m!=null&&m.hidden){const g=Qd(p);if(g)try{localStorage.setItem(Zd,g.id)}catch{}}}Ci(Hl(),d,!0),jd()},[]);return S.useEffect(()=>{Ci(a,i)},[a,i]),S.useEffect(()=>{if(typeof window>"u")return;const d=window.matchMedia(I0),p=()=>{const m=Hl(),g=Ur();if(g){const y=Kd(m);if(y!=null&&y.variantDarkId&&y.variantLightId&&Ci(m,g),y!=null&&y.hidden){const v=Qd(m);v!=null&&v.variantDarkId&&v.variantLightId&&Ci(m,g)}}jd()};return d.addEventListener("change",p),()=>{d.removeEventListener("change",p)}},[]),{themeId:a,setTheme:r,resolvedThemeId:o,preferSystem:i,setPreferSystem:u}}const P0=S.createContext(void 0);function BE({children:n}){const a=OE();return h.jsx(P0.Provider,{value:a,children:n})}function G0(){const n=S.useContext(P0);if(!n)throw new Error("useThemeContext must be used within ThemeProvider");return n}const LE="_container_eix8p_1",UE="_hamburger_eix8p_33",zE="_brand_eix8p_49",VE="_info_eix8p_65",IE="_connectionLabel_eix8p_80",HE="_connectionDot_eix8p_93",PE="_connected_eix8p_96",GE="_disconnected_eix8p_100",qE="_settingsButton_eix8p_104",xa={container:LE,hamburger:UE,brand:zE,info:VE,connectionLabel:IE,connectionDot:HE,connected:PE,disconnected:GE,settingsButton:qE};function FE({onToggleSidebar:n,sidebarOpen:a}){const{connected:i,environments:o,sessions:r}=qt(),u=Pn(),d=o.length,p=o.filter(g=>g.status==="connected").length,m=r.filter(g=>["running","idle"].includes(g.status)).length;return h.jsxs("div",{className:xa.container,children:[n&&h.jsx("button",{type:"button",className:xa.hamburger,onClick:n,"aria-label":"Toggle sidebar","aria-expanded":a,children:"☰"}),h.jsx("button",{type:"button",className:xa.brand,onClick:()=>u("/"),title:"Home",children:"Grackle"}),h.jsxs("div",{className:xa.info,children:[h.jsxs("span",{"aria-label":i?"Connected":"Disconnected",children:[h.jsx("span",{className:`${xa.connectionDot} ${i?xa.connected:xa.disconnected}`,"aria-hidden":"true",children:"●"})," ",h.jsx("span",{className:xa.connectionLabel,"aria-hidden":"true",children:i?"Connected":"Disconnected"})]}),h.jsxs("span",{children:[p,"/",d," env",d!==1?"s":""]}),h.jsxs("span",{children:[m," active"]}),h.jsx("button",{className:xa.settingsButton,onClick:()=>u(ki),title:"Settings",children:"⚙"})]})]})}const Of=S.createContext({});function Bf(n){const a=S.useRef(null);return a.current===null&&(a.current=n()),a.current}const ec=S.createContext(null),Lf=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class $E extends S.Component{getSnapshotBeforeUpdate(a){const i=this.props.childRef.current;if(i&&a.isPresent&&!this.props.isPresent){const o=this.props.sizeRef.current;o.height=i.offsetHeight||0,o.width=i.offsetWidth||0,o.top=i.offsetTop,o.left=i.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function YE({children:n,isPresent:a}){const i=S.useId(),o=S.useRef(null),r=S.useRef({width:0,height:0,top:0,left:0}),{nonce:u}=S.useContext(Lf);return S.useInsertionEffect(()=>{const{width:d,height:p,top:m,left:g}=r.current;if(a||!o.current||!d||!p)return;o.current.dataset.motionPopId=i;const y=document.createElement("style");return u&&(y.nonce=u),document.head.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
79
|
+
[data-motion-pop-id="${i}"] {
|
|
80
|
+
position: absolute !important;
|
|
81
|
+
width: ${d}px !important;
|
|
82
|
+
height: ${p}px !important;
|
|
83
|
+
top: ${m}px !important;
|
|
84
|
+
left: ${g}px !important;
|
|
85
|
+
}
|
|
86
|
+
`),()=>{document.head.removeChild(y)}},[a]),h.jsx($E,{isPresent:a,childRef:o,sizeRef:r,children:S.cloneElement(n,{ref:o})})}const KE=({children:n,initial:a,isPresent:i,onExitComplete:o,custom:r,presenceAffectsLayout:u,mode:d})=>{const p=Bf(ZE),m=S.useId(),g=S.useCallback(v=>{p.set(v,!0);for(const _ of p.values())if(!_)return;o&&o()},[p,o]),y=S.useMemo(()=>({id:m,initial:a,isPresent:i,custom:r,onExitComplete:g,register:v=>(p.set(v,!1),()=>p.delete(v))}),u?[Math.random(),g]:[i,g]);return S.useMemo(()=>{p.forEach((v,_)=>p.set(_,!1))},[i]),S.useEffect(()=>{!i&&!p.size&&o&&o()},[i]),d==="popLayout"&&(n=h.jsx(YE,{isPresent:i,children:n})),h.jsx(ec.Provider,{value:y,children:n})};function ZE(){return new Map}function q0(n=!0){const a=S.useContext(ec);if(a===null)return[!0,null];const{isPresent:i,onExitComplete:o,register:r}=a,u=S.useId();S.useEffect(()=>{n&&r(u)},[n]);const d=S.useCallback(()=>n&&o&&o(u),[u,o,n]);return!i&&o?[!1,d]:[!0]}const Tr=n=>n.key||"";function Ry(n){const a=[];return S.Children.forEach(n,i=>{S.isValidElement(i)&&a.push(i)}),a}const Uf=typeof window<"u",F0=Uf?S.useLayoutEffect:S.useEffect,os=({children:n,custom:a,initial:i=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:u="sync",propagate:d=!1})=>{const[p,m]=q0(d),g=S.useMemo(()=>Ry(n),[n]),y=d&&!p?[]:g.map(Tr),v=S.useRef(!0),_=S.useRef(g),T=Bf(()=>new Map),[E,A]=S.useState(g),[j,C]=S.useState(g);F0(()=>{v.current=!1,_.current=g;for(let G=0;G<j.length;G++){const V=Tr(j[G]);y.includes(V)?T.delete(V):T.get(V)!==!0&&T.set(V,!1)}},[j,y.length,y.join("-")]);const w=[];if(g!==E){let G=[...g];for(let V=0;V<j.length;V++){const X=j[V],Q=Tr(X);y.includes(Q)||(G.splice(V,0,X),w.push(X))}u==="wait"&&w.length&&(G=w),C(Ry(G)),A(g);return}const{forceRender:M}=S.useContext(Of);return h.jsx(h.Fragment,{children:j.map(G=>{const V=Tr(G),X=d&&!p?!1:g===j||y.includes(V),Q=()=>{if(T.has(V))T.set(V,!0);else return;let I=!0;T.forEach(te=>{te||(I=!1)}),I&&(M==null||M(),C(_.current),d&&(m==null||m()),o&&o())};return h.jsx(KE,{isPresent:X,initial:!v.current||i?void 0:!1,custom:X?void 0:a,presenceAffectsLayout:r,mode:u,onExitComplete:X?void 0:Q,children:G},V)})})},vn=n=>n;let $0=vn;const XE={useManualTiming:!1};function QE(n){let a=new Set,i=new Set,o=!1,r=!1;const u=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function p(g){u.has(g)&&(m.schedule(g),n()),g(d)}const m={schedule:(g,y=!1,v=!1)=>{const T=v&&o?a:i;return y&&u.add(g),T.has(g)||T.add(g),g},cancel:g=>{i.delete(g),u.delete(g)},process:g=>{if(d=g,o){r=!0;return}o=!0,[a,i]=[i,a],a.forEach(p),a.clear(),o=!1,r&&(r=!1,m.process(g))}};return m}const Er=["read","resolveKeyframes","update","preRender","render","postRender"],JE=40;function Y0(n,a){let i=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},u=()=>i=!0,d=Er.reduce((C,w)=>(C[w]=QE(u),C),{}),{read:p,resolveKeyframes:m,update:g,preRender:y,render:v,postRender:_}=d,T=()=>{const C=performance.now();i=!1,r.delta=o?1e3/60:Math.max(Math.min(C-r.timestamp,JE),1),r.timestamp=C,r.isProcessing=!0,p.process(r),m.process(r),g.process(r),y.process(r),v.process(r),_.process(r),r.isProcessing=!1,i&&a&&(o=!1,n(T))},E=()=>{i=!0,o=!0,r.isProcessing||n(T)};return{schedule:Er.reduce((C,w)=>{const M=d[w];return C[w]=(G,V=!1,X=!1)=>(i||E(),M.schedule(G,V,X)),C},{}),cancel:C=>{for(let w=0;w<Er.length;w++)d[Er[w]].cancel(C)},state:r,steps:d}}const{schedule:at,cancel:ss,state:Gt,steps:Nd}=Y0(typeof requestAnimationFrame<"u"?requestAnimationFrame:vn,!0),K0=S.createContext({strict:!1}),Oy={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 n in Oy)Mi[n]={isEnabled:a=>Oy[n].some(i=>!!a[i])};function WE(n){for(const a in n)Mi[a]={...Mi[a],...n[a]}}const eC=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 zr(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||eC.has(n)}let Z0=n=>!zr(n);function tC(n){n&&(Z0=a=>a.startsWith("on")?!zr(a):n(a))}try{tC(require("@emotion/is-prop-valid").default)}catch{}function nC(n,a,i){const o={};for(const r in n)r==="values"&&typeof n.values=="object"||(Z0(r)||i===!0&&zr(r)||!a&&!zr(r)||n.draggable&&r.startsWith("onDrag"))&&(o[r]=n[r]);return o}function aC(n){if(typeof Proxy>"u")return n;const a=new Map,i=(...o)=>n(...o);return new Proxy(i,{get:(o,r)=>r==="create"?n:(a.has(r)||a.set(r,n(r)),a.get(r))})}const tc=S.createContext({});function Xl(n){return typeof n=="string"||Array.isArray(n)}function nc(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const zf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vf=["initial",...zf];function ac(n){return nc(n.animate)||Vf.some(a=>Xl(n[a]))}function X0(n){return!!(ac(n)||n.variants)}function sC(n,a){if(ac(n)){const{initial:i,animate:o}=n;return{initial:i===!1||Xl(i)?i:void 0,animate:Xl(o)?o:void 0}}return n.inherit!==!1?a:{}}function iC(n){const{initial:a,animate:i}=sC(n,S.useContext(tc));return S.useMemo(()=>({initial:a,animate:i}),[By(a),By(i)])}function By(n){return Array.isArray(n)?n.join(" "):n}const lC=Symbol.for("motionComponentSymbol");function Ai(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function oC(n,a,i){return S.useCallback(o=>{o&&n.onMount&&n.onMount(o),a&&(o?a.mount(o):a.unmount()),i&&(typeof i=="function"?i(o):Ai(i)&&(i.current=o))},[a])}const If=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),rC="framerAppearId",Q0="data-"+If(rC),{schedule:Hf}=Y0(queueMicrotask,!1),J0=S.createContext({});function cC(n,a,i,o,r){var u,d;const{visualElement:p}=S.useContext(tc),m=S.useContext(K0),g=S.useContext(ec),y=S.useContext(Lf).reducedMotion,v=S.useRef(null);o=o||m.renderer,!v.current&&o&&(v.current=o(n,{visualState:a,parent:p,props:i,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:y}));const _=v.current,T=S.useContext(J0);_&&!_.projection&&r&&(_.type==="html"||_.type==="svg")&&uC(v.current,i,r,T);const E=S.useRef(!1);S.useInsertionEffect(()=>{_&&E.current&&_.update(i,g)});const A=i[Q0],j=S.useRef(!!A&&!(!((u=window.MotionHandoffIsComplete)===null||u===void 0)&&u.call(window,A))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,A)));return F0(()=>{_&&(E.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),Hf.render(_.render),j.current&&_.animationState&&_.animationState.animateChanges())}),S.useEffect(()=>{_&&(!j.current&&_.animationState&&_.animationState.animateChanges(),j.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)===null||C===void 0||C.call(window,A)}),j.current=!1))}),_}function uC(n,a,i,o){const{layoutId:r,layout:u,drag:d,dragConstraints:p,layoutScroll:m,layoutRoot:g}=a;n.projection=new i(n.latestValues,a["data-framer-portal-id"]?void 0:W0(n.parent)),n.projection.setOptions({layoutId:r,layout:u,alwaysMeasureLayout:!!d||p&&Ai(p),visualElement:n,animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:m,layoutRoot:g})}function W0(n){if(n)return n.options.allowProjection!==!1?n.projection:W0(n.parent)}function dC({preloadedFeatures:n,createVisualElement:a,useRender:i,useVisualState:o,Component:r}){var u,d;n&&WE(n);function p(g,y){let v;const _={...S.useContext(Lf),...g,layoutId:fC(g)},{isStatic:T}=_,E=iC(g),A=o(g,T);if(!T&&Uf){hC();const j=pC(_);v=j.MeasureLayout,E.visualElement=cC(r,A,_,a,j.ProjectionNode)}return h.jsxs(tc.Provider,{value:E,children:[v&&E.visualElement?h.jsx(v,{visualElement:E.visualElement,..._}):null,i(r,g,oC(A,E.visualElement,y),A,T,E.visualElement)]})}p.displayName=`motion.${typeof r=="string"?r:`create(${(d=(u=r.displayName)!==null&&u!==void 0?u:r.name)!==null&&d!==void 0?d:""})`}`;const m=S.forwardRef(p);return m[lC]=r,m}function fC({layoutId:n}){const a=S.useContext(Of).id;return a&&n!==void 0?a+"-"+n:n}function hC(n,a){S.useContext(K0).strict}function pC(n){const{drag:a,layout:i}=Mi;if(!a&&!i)return{};const o={...a,...i};return{MeasureLayout:a!=null&&a.isEnabled(n)||i!=null&&i.isEnabled(n)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const mC=["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 Pf(n){return typeof n!="string"||n.includes("-")?!1:!!(mC.indexOf(n)>-1||/[A-Z]/u.test(n))}function Ly(n){const a=[{},{}];return n==null||n.values.forEach((i,o)=>{a[0][o]=i.get(),a[1][o]=i.getVelocity()}),a}function Gf(n,a,i,o){if(typeof a=="function"){const[r,u]=Ly(o);a=a(i!==void 0?i:n.custom,r,u)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[r,u]=Ly(o);a=a(i!==void 0?i:n.custom,r,u)}return a}const Jd=n=>Array.isArray(n),gC=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),yC=n=>Jd(n)?n[n.length-1]||0:n,Kt=n=>!!(n&&n.getVelocity);function Or(n){const a=Kt(n)?n.get():n;return gC(a)?a.toValue():a}function vC({scrapeMotionValuesFromProps:n,createRenderState:a,onUpdate:i},o,r,u){const d={latestValues:bC(o,r,u,n),renderState:a()};return i&&(d.onMount=p=>i({props:o,current:p,...d}),d.onUpdate=p=>i(p)),d}const eb=n=>(a,i)=>{const o=S.useContext(tc),r=S.useContext(ec),u=()=>vC(n,a,o,r);return i?u():Bf(u)};function bC(n,a,i,o){const r={},u=o(n,{});for(const _ in u)r[_]=Or(u[_]);let{initial:d,animate:p}=n;const m=ac(n),g=X0(n);a&&g&&!m&&n.inherit!==!1&&(d===void 0&&(d=a.initial),p===void 0&&(p=a.animate));let y=i?i.initial===!1:!1;y=y||d===!1;const v=y?p:d;if(v&&typeof v!="boolean"&&!nc(v)){const _=Array.isArray(v)?v:[v];for(let T=0;T<_.length;T++){const E=Gf(n,_[T]);if(E){const{transitionEnd:A,transition:j,...C}=E;for(const w in C){let M=C[w];if(Array.isArray(M)){const G=y?M.length-1:0;M=M[G]}M!==null&&(r[w]=M)}for(const w in A)r[w]=A[w]}}}return r}const Ui=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zs=new Set(Ui),tb=n=>a=>typeof a=="string"&&a.startsWith(n),nb=tb("--"),SC=tb("var(--"),qf=n=>SC(n)?_C.test(n.split("/*")[0].trim()):!1,_C=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ab=(n,a)=>a&&typeof n=="number"?a.transform(n):n,ja=(n,a,i)=>i>a?a:i<n?n:i,zi={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Ql={...zi,transform:n=>ja(0,1,n)},Cr={...zi,default:1},so=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),Wa=so("deg"),Jn=so("%"),ge=so("px"),xC=so("vh"),TC=so("vw"),Uy={...Jn,parse:n=>Jn.parse(n)/100,transform:n=>Jn.transform(n*100)},EC={borderWidth:ge,borderTopWidth:ge,borderRightWidth:ge,borderBottomWidth:ge,borderLeftWidth:ge,borderRadius:ge,radius:ge,borderTopLeftRadius:ge,borderTopRightRadius:ge,borderBottomRightRadius:ge,borderBottomLeftRadius:ge,width:ge,maxWidth:ge,height:ge,maxHeight:ge,top:ge,right:ge,bottom:ge,left:ge,padding:ge,paddingTop:ge,paddingRight:ge,paddingBottom:ge,paddingLeft:ge,margin:ge,marginTop:ge,marginRight:ge,marginBottom:ge,marginLeft:ge,backgroundPositionX:ge,backgroundPositionY:ge},CC={rotate:Wa,rotateX:Wa,rotateY:Wa,rotateZ:Wa,scale:Cr,scaleX:Cr,scaleY:Cr,scaleZ:Cr,skew:Wa,skewX:Wa,skewY:Wa,distance:ge,translateX:ge,translateY:ge,translateZ:ge,x:ge,y:ge,z:ge,perspective:ge,transformPerspective:ge,opacity:Ql,originX:Uy,originY:Uy,originZ:ge},zy={...zi,transform:Math.round},Ff={...EC,...CC,zIndex:zy,size:ge,fillOpacity:Ql,strokeOpacity:Ql,numOctaves:zy},AC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},jC=Ui.length;function NC(n,a,i){let o="",r=!0;for(let u=0;u<jC;u++){const d=Ui[u],p=n[d];if(p===void 0)continue;let m=!0;if(typeof p=="number"?m=p===(d.startsWith("scale")?1:0):m=parseFloat(p)===0,!m||i){const g=ab(p,Ff[d]);if(!m){r=!1;const y=AC[d]||d;o+=`${y}(${g}) `}i&&(a[d]=g)}}return o=o.trim(),i?o=i(a,r?"":o):r&&(o="none"),o}function $f(n,a,i){const{style:o,vars:r,transformOrigin:u}=n;let d=!1,p=!1;for(const m in a){const g=a[m];if(zs.has(m)){d=!0;continue}else if(nb(m)){r[m]=g;continue}else{const y=ab(g,Ff[m]);m.startsWith("origin")?(p=!0,u[m]=y):o[m]=y}}if(a.transform||(d||i?o.transform=NC(a,n.transform,i):o.transform&&(o.transform="none")),p){const{originX:m="50%",originY:g="50%",originZ:y=0}=u;o.transformOrigin=`${m} ${g} ${y}`}}const wC={offset:"stroke-dashoffset",array:"stroke-dasharray"},DC={offset:"strokeDashoffset",array:"strokeDasharray"};function kC(n,a,i=1,o=0,r=!0){n.pathLength=1;const u=r?wC:DC;n[u.offset]=ge.transform(-o);const d=ge.transform(a),p=ge.transform(i);n[u.array]=`${d} ${p}`}function Vy(n,a,i){return typeof n=="string"?n:ge.transform(a+i*n)}function MC(n,a,i){const o=Vy(a,n.x,n.width),r=Vy(i,n.y,n.height);return`${o} ${r}`}function Yf(n,{attrX:a,attrY:i,attrScale:o,originX:r,originY:u,pathLength:d,pathSpacing:p=1,pathOffset:m=0,...g},y,v){if($f(n,g,v),y){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:_,style:T,dimensions:E}=n;_.transform&&(E&&(T.transform=_.transform),delete _.transform),E&&(r!==void 0||u!==void 0||T.transform)&&(T.transformOrigin=MC(E,r!==void 0?r:.5,u!==void 0?u:.5)),a!==void 0&&(_.x=a),i!==void 0&&(_.y=i),o!==void 0&&(_.scale=o),d!==void 0&&kC(_,d,p,m,!1)}const Kf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),sb=()=>({...Kf(),attrs:{}}),Zf=n=>typeof n=="string"&&n.toLowerCase()==="svg";function ib(n,{style:a,vars:i},o,r){Object.assign(n.style,a,r&&r.getProjectionStyles(o));for(const u in i)n.style.setProperty(u,i[u])}const lb=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 ob(n,a,i,o){ib(n,a,void 0,o);for(const r in a.attrs)n.setAttribute(lb.has(r)?r:If(r),a.attrs[r])}const Vr={};function RC(n){Object.assign(Vr,n)}function rb(n,{layout:a,layoutId:i}){return zs.has(n)||n.startsWith("origin")||(a||i!==void 0)&&(!!Vr[n]||n==="opacity")}function Xf(n,a,i){var o;const{style:r}=n,u={};for(const d in r)(Kt(r[d])||a.style&&Kt(a.style[d])||rb(d,n)||((o=i==null?void 0:i.getValue(d))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(u[d]=r[d]);return u}function cb(n,a,i){const o=Xf(n,a,i);for(const r in n)if(Kt(n[r])||Kt(a[r])){const u=Ui.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[u]=n[r]}return o}function OC(n,a){try{a.dimensions=typeof n.getBBox=="function"?n.getBBox():n.getBoundingClientRect()}catch{a.dimensions={x:0,y:0,width:0,height:0}}}const Iy=["x","y","width","height","cx","cy","r"],BC={useVisualState:eb({scrapeMotionValuesFromProps:cb,createRenderState:sb,onUpdate:({props:n,prevProps:a,current:i,renderState:o,latestValues:r})=>{if(!i)return;let u=!!n.drag;if(!u){for(const p in r)if(zs.has(p)){u=!0;break}}if(!u)return;let d=!a;if(a)for(let p=0;p<Iy.length;p++){const m=Iy[p];n[m]!==a[m]&&(d=!0)}d&&at.read(()=>{OC(i,o),at.render(()=>{Yf(o,r,Zf(i.tagName),n.transformTemplate),ob(i,o)})})}})},LC={useVisualState:eb({scrapeMotionValuesFromProps:Xf,createRenderState:Kf})};function ub(n,a,i){for(const o in a)!Kt(a[o])&&!rb(o,i)&&(n[o]=a[o])}function UC({transformTemplate:n},a){return S.useMemo(()=>{const i=Kf();return $f(i,a,n),Object.assign({},i.vars,i.style)},[a])}function zC(n,a){const i=n.style||{},o={};return ub(o,i,n),Object.assign(o,UC(n,a)),o}function VC(n,a){const i={},o=zC(n,a);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=o,i}function IC(n,a,i,o){const r=S.useMemo(()=>{const u=sb();return Yf(u,a,Zf(o),n.transformTemplate),{...u.attrs,style:{...u.style}}},[a]);if(n.style){const u={};ub(u,n.style,n),r.style={...u,...r.style}}return r}function HC(n=!1){return(i,o,r,{latestValues:u},d)=>{const m=(Pf(i)?IC:VC)(o,u,d,i),g=nC(o,typeof i=="string",n),y=i!==S.Fragment?{...g,...m,ref:r}:{},{children:v}=o,_=S.useMemo(()=>Kt(v)?v.get():v,[v]);return S.createElement(i,{...y,children:_})}}function PC(n,a){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const d={...Pf(o)?BC:LC,preloadedFeatures:n,useRender:HC(r),createVisualElement:a,Component:o};return dC(d)}}function db(n,a){if(!Array.isArray(a))return!1;const i=a.length;if(i!==n.length)return!1;for(let o=0;o<i;o++)if(a[o]!==n[o])return!1;return!0}function sc(n,a,i){const o=n.getProps();return Gf(o,a,i!==void 0?i:o.custom,n)}function Qf(n,a){return n?n[a]||n.default||n:void 0}const fb=new Set(["width","height","top","left","right","bottom",...Ui]);let Br;function GC(){Br=void 0}const Wn={now:()=>(Br===void 0&&Wn.set(Gt.isProcessing||XE.useManualTiming?Gt.timestamp:performance.now()),Br),set:n=>{Br=n,queueMicrotask(GC)}};function Jf(n,a){n.indexOf(a)===-1&&n.push(a)}function Wf(n,a){const i=n.indexOf(a);i>-1&&n.splice(i,1)}class eh{constructor(){this.subscriptions=[]}add(a){return Jf(this.subscriptions,a),()=>Wf(this.subscriptions,a)}notify(a,i,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](a,i,o);else for(let u=0;u<r;u++){const d=this.subscriptions[u];d&&d(a,i,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function hb(n,a){return a?n*(1e3/a):0}const Hy=30,qC=n=>!isNaN(parseFloat(n));class FC{constructor(a,i={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const u=Wn.now();this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(a),this.owner=i.owner}setCurrent(a){this.current=a,this.updatedAt=Wn.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=qC(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,i){this.events[a]||(this.events[a]=new eh);const o=this.events[a].add(i);return a==="change"?()=>{o(),at.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,i){this.passiveEffect=a,this.stopPassiveEffect=i}set(a,i=!0){!i||!this.passiveEffect?this.updateAndNotify(a,i):this.passiveEffect(a,this.updateAndNotify)}setWithVelocity(a,i,o){this.set(i),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-o}jump(a,i=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=Wn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Hy)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,Hy);return hb(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(a){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=a(i),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 Jl(n,a){return new FC(n,a)}function $C(n,a,i){n.hasValue(a)?n.getValue(a).set(i):n.addValue(a,Jl(i))}function YC(n,a){const i=sc(n,a);let{transitionEnd:o={},transition:r={},...u}=i||{};u={...u,...o};for(const d in u){const p=yC(u[d]);$C(n,d,p)}}function KC(n){return!!(Kt(n)&&n.add)}function Wd(n,a){const i=n.getValue("willChange");if(KC(i))return i.add(a)}function pb(n){return n.props[Q0]}function th(n){let a;return()=>(a===void 0&&(a=n()),a)}const ZC=th(()=>window.ScrollTimeline!==void 0);class XC{constructor(a){this.stop=()=>this.runAll("stop"),this.animations=a.filter(Boolean)}get finished(){return Promise.all(this.animations.map(a=>"finished"in a?a.finished:a))}getAll(a){return this.animations[0][a]}setAll(a,i){for(let o=0;o<this.animations.length;o++)this.animations[o][a]=i}attachTimeline(a,i){const o=this.animations.map(r=>{if(ZC()&&r.attachTimeline)return r.attachTimeline(a);if(typeof i=="function")return i(r)});return()=>{o.forEach((r,u)=>{r&&r(),this.animations[u].stop()})}}get time(){return this.getAll("time")}set time(a){this.setAll("time",a)}get speed(){return this.getAll("speed")}set speed(a){this.setAll("speed",a)}get startTime(){return this.getAll("startTime")}get duration(){let a=0;for(let i=0;i<this.animations.length;i++)a=Math.max(a,this.animations[i].duration);return a}runAll(a){this.animations.forEach(i=>i[a]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class QC extends XC{then(a,i){return Promise.all(this.animations).then(a).catch(i)}}const Ea=n=>n*1e3,Ca=n=>n/1e3;function nh(n){return typeof n=="function"}function Py(n,a){n.timeline=a,n.onfinish=null}const ah=n=>Array.isArray(n)&&typeof n[0]=="number",JC={linearEasing:void 0};function WC(n,a){const i=th(n);return()=>{var o;return(o=JC[a])!==null&&o!==void 0?o:i()}}const Ir=WC(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ri=(n,a,i)=>{const o=a-n;return o===0?1:(i-n)/o},mb=(n,a,i=10)=>{let o="";const r=Math.max(Math.round(a/i),2);for(let u=0;u<r;u++)o+=n(Ri(0,r-1,u))+", ";return`linear(${o.substring(0,o.length-2)})`};function gb(n){return!!(typeof n=="function"&&Ir()||!n||typeof n=="string"&&(n in ef||Ir())||ah(n)||Array.isArray(n)&&n.every(gb))}const zl=([n,a,i,o])=>`cubic-bezier(${n}, ${a}, ${i}, ${o})`,ef={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:zl([0,.65,.55,1]),circOut:zl([.55,0,1,.45]),backIn:zl([.31,.01,.66,-.59]),backOut:zl([.33,1.53,.69,.99])};function yb(n,a){if(n)return typeof n=="function"&&Ir()?mb(n,a):ah(n)?zl(n):Array.isArray(n)?n.map(i=>yb(i,a)||ef.easeOut):ef[n]}const vb=(n,a,i)=>(((1-3*i+3*a)*n+(3*i-6*a))*n+3*a)*n,eA=1e-7,tA=12;function nA(n,a,i,o,r){let u,d,p=0;do d=a+(i-a)/2,u=vb(d,o,r)-n,u>0?i=d:a=d;while(Math.abs(u)>eA&&++p<tA);return d}function io(n,a,i,o){if(n===a&&i===o)return vn;const r=u=>nA(u,0,1,n,i);return u=>u===0||u===1?u:vb(r(u),a,o)}const bb=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,Sb=n=>a=>1-n(1-a),_b=io(.33,1.53,.69,.99),sh=Sb(_b),xb=bb(sh),Tb=n=>(n*=2)<1?.5*sh(n):.5*(2-Math.pow(2,-10*(n-1))),ih=n=>1-Math.sin(Math.acos(n)),Eb=Sb(ih),Cb=bb(ih),Ab=n=>/^0[^.\s]+$/u.test(n);function aA(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Ab(n):!0}const Pl=n=>Math.round(n*1e5)/1e5,lh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sA(n){return n==null}const iA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,oh=(n,a)=>i=>!!(typeof i=="string"&&iA.test(i)&&i.startsWith(n)||a&&!sA(i)&&Object.prototype.hasOwnProperty.call(i,a)),jb=(n,a,i)=>o=>{if(typeof o!="string")return o;const[r,u,d,p]=o.match(lh);return{[n]:parseFloat(r),[a]:parseFloat(u),[i]:parseFloat(d),alpha:p!==void 0?parseFloat(p):1}},lA=n=>ja(0,255,n),wd={...zi,transform:n=>Math.round(lA(n))},Rs={test:oh("rgb","red"),parse:jb("red","green","blue"),transform:({red:n,green:a,blue:i,alpha:o=1})=>"rgba("+wd.transform(n)+", "+wd.transform(a)+", "+wd.transform(i)+", "+Pl(Ql.transform(o))+")"};function oA(n){let a="",i="",o="",r="";return n.length>5?(a=n.substring(1,3),i=n.substring(3,5),o=n.substring(5,7),r=n.substring(7,9)):(a=n.substring(1,2),i=n.substring(2,3),o=n.substring(3,4),r=n.substring(4,5),a+=a,i+=i,o+=o,r+=r),{red:parseInt(a,16),green:parseInt(i,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const tf={test:oh("#"),parse:oA,transform:Rs.transform},ji={test:oh("hsl","hue"),parse:jb("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:i,alpha:o=1})=>"hsla("+Math.round(n)+", "+Jn.transform(Pl(a))+", "+Jn.transform(Pl(i))+", "+Pl(Ql.transform(o))+")"},Yt={test:n=>Rs.test(n)||tf.test(n)||ji.test(n),parse:n=>Rs.test(n)?Rs.parse(n):ji.test(n)?ji.parse(n):tf.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Rs.transform(n):ji.transform(n)},rA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function cA(n){var a,i;return isNaN(n)&&typeof n=="string"&&(((a=n.match(lh))===null||a===void 0?void 0:a.length)||0)+(((i=n.match(rA))===null||i===void 0?void 0:i.length)||0)>0}const Nb="number",wb="color",uA="var",dA="var(",Gy="${}",fA=/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 Wl(n){const a=n.toString(),i=[],o={color:[],number:[],var:[]},r=[];let u=0;const p=a.replace(fA,m=>(Yt.test(m)?(o.color.push(u),r.push(wb),i.push(Yt.parse(m))):m.startsWith(dA)?(o.var.push(u),r.push(uA),i.push(m)):(o.number.push(u),r.push(Nb),i.push(parseFloat(m))),++u,Gy)).split(Gy);return{values:i,split:p,indexes:o,types:r}}function Db(n){return Wl(n).values}function kb(n){const{split:a,types:i}=Wl(n),o=a.length;return r=>{let u="";for(let d=0;d<o;d++)if(u+=a[d],r[d]!==void 0){const p=i[d];p===Nb?u+=Pl(r[d]):p===wb?u+=Yt.transform(r[d]):u+=r[d]}return u}}const hA=n=>typeof n=="number"?0:n;function pA(n){const a=Db(n);return kb(n)(a.map(hA))}const is={test:cA,parse:Db,createTransformer:kb,getAnimatableNone:pA},mA=new Set(["brightness","contrast","saturate","opacity"]);function gA(n){const[a,i]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=i.match(lh)||[];if(!o)return n;const r=i.replace(o,"");let u=mA.has(a)?1:0;return o!==i&&(u*=100),a+"("+u+r+")"}const yA=/\b([a-z-]*)\(.*?\)/gu,nf={...is,getAnimatableNone:n=>{const a=n.match(yA);return a?a.map(gA).join(" "):n}},vA={...Ff,color:Yt,backgroundColor:Yt,outlineColor:Yt,fill:Yt,stroke:Yt,borderColor:Yt,borderTopColor:Yt,borderRightColor:Yt,borderBottomColor:Yt,borderLeftColor:Yt,filter:nf,WebkitFilter:nf},rh=n=>vA[n];function Mb(n,a){let i=rh(n);return i!==nf&&(i=is),i.getAnimatableNone?i.getAnimatableNone(a):void 0}const bA=new Set(["auto","none","0"]);function SA(n,a,i){let o=0,r;for(;o<n.length&&!r;){const u=n[o];typeof u=="string"&&!bA.has(u)&&Wl(u).values.length&&(r=n[o]),o++}if(r&&i)for(const u of a)n[u]=Mb(i,r)}const qy=n=>n===zi||n===ge,Fy=(n,a)=>parseFloat(n.split(", ")[a]),$y=(n,a)=>(i,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return Fy(r[1],a);{const u=o.match(/^matrix\((.+)\)$/u);return u?Fy(u[1],n):0}},_A=new Set(["x","y","z"]),xA=Ui.filter(n=>!_A.has(n));function TA(n){const a=[];return xA.forEach(i=>{const o=n.getValue(i);o!==void 0&&(a.push([i,o.get()]),o.set(i.startsWith("scale")?1:0))}),a}const Oi={width:({x:n},{paddingLeft:a="0",paddingRight:i="0"})=>n.max-n.min-parseFloat(a)-parseFloat(i),height:({y:n},{paddingTop:a="0",paddingBottom:i="0"})=>n.max-n.min-parseFloat(a)-parseFloat(i),top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:$y(4,13),y:$y(5,14)};Oi.translateX=Oi.x;Oi.translateY=Oi.y;const Os=new Set;let af=!1,sf=!1;function Rb(){if(sf){const n=Array.from(Os).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),i=new Map;a.forEach(o=>{const r=TA(o);r.length&&(i.set(o,r),o.render())}),n.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const r=i.get(o);r&&r.forEach(([u,d])=>{var p;(p=o.getValue(u))===null||p===void 0||p.set(d)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}sf=!1,af=!1,Os.forEach(n=>n.complete()),Os.clear()}function Ob(){Os.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(sf=!0)})}function EA(){Ob(),Rb()}class ch{constructor(a,i,o,r,u,d=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...a],this.onComplete=i,this.name=o,this.motionValue=r,this.element=u,this.isAsync=d}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Os.add(this),af||(af=!0,at.read(Ob),at.resolveKeyframes(Rb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:i,element:o,motionValue:r}=this;for(let u=0;u<a.length;u++)if(a[u]===null)if(u===0){const d=r==null?void 0:r.get(),p=a[a.length-1];if(d!==void 0)a[0]=d;else if(o&&i){const m=o.readValue(i,p);m!=null&&(a[0]=m)}a[0]===void 0&&(a[0]=p),r&&d===void 0&&r.set(a[0])}else a[u]=a[u-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Os.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Os.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Bb=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),CA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function AA(n){const a=CA.exec(n);if(!a)return[,];const[,i,o,r]=a;return[`--${i??o}`,r]}function Lb(n,a,i=1){const[o,r]=AA(n);if(!o)return;const u=window.getComputedStyle(a).getPropertyValue(o);if(u){const d=u.trim();return Bb(d)?parseFloat(d):d}return qf(r)?Lb(r,a,i+1):r}const Ub=n=>a=>a.test(n),jA={test:n=>n==="auto",parse:n=>n},zb=[zi,ge,Jn,Wa,TC,xC,jA],Yy=n=>zb.find(Ub(n));class Vb extends ch{constructor(a,i,o,r,u){super(a,i,o,r,u,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:i,name:o}=this;if(!i||!i.current)return;super.readKeyframes();for(let m=0;m<a.length;m++){let g=a[m];if(typeof g=="string"&&(g=g.trim(),qf(g))){const y=Lb(g,i.current);y!==void 0&&(a[m]=y),m===a.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!fb.has(o)||a.length!==2)return;const[r,u]=a,d=Yy(r),p=Yy(u);if(d!==p)if(qy(d)&&qy(p))for(let m=0;m<a.length;m++){const g=a[m];typeof g=="string"&&(a[m]=parseFloat(g))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:i}=this,o=[];for(let r=0;r<a.length;r++)aA(a[r])&&o.push(r);o.length&&SA(a,o,i)}measureInitialState(){const{element:a,unresolvedKeyframes:i,name:o}=this;if(!a||!a.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Oi[o](a.measureViewportBox(),window.getComputedStyle(a.current)),i[0]=this.measuredOrigin;const r=i[i.length-1];r!==void 0&&a.getValue(o,r).jump(r,!1)}measureEndState(){var a;const{element:i,name:o,unresolvedKeyframes:r}=this;if(!i||!i.current)return;const u=i.getValue(o);u&&u.jump(this.measuredOrigin,!1);const d=r.length-1,p=r[d];r[d]=Oi[o](i.measureViewportBox(),window.getComputedStyle(i.current)),p!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=p),!((a=this.removedTransforms)===null||a===void 0)&&a.length&&this.removedTransforms.forEach(([m,g])=>{i.getValue(m).set(g)}),this.resolveNoneKeyframes()}}const Ky=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(is.test(n)||n==="0")&&!n.startsWith("url("));function NA(n){const a=n[0];if(n.length===1)return!0;for(let i=0;i<n.length;i++)if(n[i]!==a)return!0}function wA(n,a,i,o){const r=n[0];if(r===null)return!1;if(a==="display"||a==="visibility")return!0;const u=n[n.length-1],d=Ky(r,a),p=Ky(u,a);return!d||!p?!1:NA(n)||(i==="spring"||nh(i))&&o}const DA=n=>n!==null;function ic(n,{repeat:a,repeatType:i="loop"},o){const r=n.filter(DA),u=a&&i!=="loop"&&a%2===1?0:r.length-1;return!u||o===void 0?r[u]:o}const kA=40;class Ib{constructor({autoplay:a=!0,delay:i=0,type:o="keyframes",repeat:r=0,repeatDelay:u=0,repeatType:d="loop",...p}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Wn.now(),this.options={autoplay:a,delay:i,type:o,repeat:r,repeatDelay:u,repeatType:d,...p},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>kA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&EA(),this._resolved}onKeyframesResolved(a,i){this.resolvedAt=Wn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:u,delay:d,onComplete:p,onUpdate:m,isGenerator:g}=this.options;if(!g&&!wA(a,o,r,u))if(d)this.options.duration=0;else{m&&m(ic(a,this.options,i)),p&&p(),this.resolveFinishedPromise();return}const y=this.initPlayback(a,i);y!==!1&&(this._resolved={keyframes:a,finalKeyframe:i,...y},this.onPostResolved())}onPostResolved(){}then(a,i){return this.currentFinishedPromise.then(a,i)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(a=>{this.resolveFinishedPromise=a})}}const lf=2e4;function Hb(n){let a=0;const i=50;let o=n.next(a);for(;!o.done&&a<lf;)a+=i,o=n.next(a);return a>=lf?1/0:a}const ct=(n,a,i)=>n+(a-n)*i;function Dd(n,a,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?n+(a-n)*6*i:i<1/2?a:i<2/3?n+(a-n)*(2/3-i)*6:n}function MA({hue:n,saturation:a,lightness:i,alpha:o}){n/=360,a/=100,i/=100;let r=0,u=0,d=0;if(!a)r=u=d=i;else{const p=i<.5?i*(1+a):i+a-i*a,m=2*i-p;r=Dd(m,p,n+1/3),u=Dd(m,p,n),d=Dd(m,p,n-1/3)}return{red:Math.round(r*255),green:Math.round(u*255),blue:Math.round(d*255),alpha:o}}function Hr(n,a){return i=>i>0?a:n}const kd=(n,a,i)=>{const o=n*n,r=i*(a*a-o)+o;return r<0?0:Math.sqrt(r)},RA=[tf,Rs,ji],OA=n=>RA.find(a=>a.test(n));function Zy(n){const a=OA(n);if(!a)return!1;let i=a.parse(n);return a===ji&&(i=MA(i)),i}const Xy=(n,a)=>{const i=Zy(n),o=Zy(a);if(!i||!o)return Hr(n,a);const r={...i};return u=>(r.red=kd(i.red,o.red,u),r.green=kd(i.green,o.green,u),r.blue=kd(i.blue,o.blue,u),r.alpha=ct(i.alpha,o.alpha,u),Rs.transform(r))},BA=(n,a)=>i=>a(n(i)),lo=(...n)=>n.reduce(BA),of=new Set(["none","hidden"]);function LA(n,a){return of.has(n)?i=>i<=0?n:a:i=>i>=1?a:n}function UA(n,a){return i=>ct(n,a,i)}function uh(n){return typeof n=="number"?UA:typeof n=="string"?qf(n)?Hr:Yt.test(n)?Xy:IA:Array.isArray(n)?Pb:typeof n=="object"?Yt.test(n)?Xy:zA:Hr}function Pb(n,a){const i=[...n],o=i.length,r=n.map((u,d)=>uh(u)(u,a[d]));return u=>{for(let d=0;d<o;d++)i[d]=r[d](u);return i}}function zA(n,a){const i={...n,...a},o={};for(const r in i)n[r]!==void 0&&a[r]!==void 0&&(o[r]=uh(n[r])(n[r],a[r]));return r=>{for(const u in o)i[u]=o[u](r);return i}}function VA(n,a){var i;const o=[],r={color:0,var:0,number:0};for(let u=0;u<a.values.length;u++){const d=a.types[u],p=n.indexes[d][r[d]],m=(i=n.values[p])!==null&&i!==void 0?i:0;o[u]=m,r[d]++}return o}const IA=(n,a)=>{const i=is.createTransformer(a),o=Wl(n),r=Wl(a);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?of.has(n)&&!r.values.length||of.has(a)&&!o.values.length?LA(n,a):lo(Pb(VA(o,r),r.values),i):Hr(n,a)};function Gb(n,a,i){return typeof n=="number"&&typeof a=="number"&&typeof i=="number"?ct(n,a,i):uh(n)(n,a)}const HA=5;function qb(n,a,i){const o=Math.max(a-HA,0);return hb(i-n(o),a-o)}const ft={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},Md=.001;function PA({duration:n=ft.duration,bounce:a=ft.bounce,velocity:i=ft.velocity,mass:o=ft.mass}){let r,u,d=1-a;d=ja(ft.minDamping,ft.maxDamping,d),n=ja(ft.minDuration,ft.maxDuration,Ca(n)),d<1?(r=g=>{const y=g*d,v=y*n,_=y-i,T=rf(g,d),E=Math.exp(-v);return Md-_/T*E},u=g=>{const v=g*d*n,_=v*i+i,T=Math.pow(d,2)*Math.pow(g,2)*n,E=Math.exp(-v),A=rf(Math.pow(g,2),d);return(-r(g)+Md>0?-1:1)*((_-T)*E)/A}):(r=g=>{const y=Math.exp(-g*n),v=(g-i)*n+1;return-Md+y*v},u=g=>{const y=Math.exp(-g*n),v=(i-g)*(n*n);return y*v});const p=5/n,m=qA(r,u,p);if(n=Ea(n),isNaN(m))return{stiffness:ft.stiffness,damping:ft.damping,duration:n};{const g=Math.pow(m,2)*o;return{stiffness:g,damping:d*2*Math.sqrt(o*g),duration:n}}}const GA=12;function qA(n,a,i){let o=i;for(let r=1;r<GA;r++)o=o-n(o)/a(o);return o}function rf(n,a){return n*Math.sqrt(1-a*a)}const FA=["duration","bounce"],$A=["stiffness","damping","mass"];function Qy(n,a){return a.some(i=>n[i]!==void 0)}function YA(n){let a={velocity:ft.velocity,stiffness:ft.stiffness,damping:ft.damping,mass:ft.mass,isResolvedFromDuration:!1,...n};if(!Qy(n,$A)&&Qy(n,FA))if(n.visualDuration){const i=n.visualDuration,o=2*Math.PI/(i*1.2),r=o*o,u=2*ja(.05,1,1-(n.bounce||0))*Math.sqrt(r);a={...a,mass:ft.mass,stiffness:r,damping:u}}else{const i=PA(n);a={...a,...i,mass:ft.mass},a.isResolvedFromDuration=!0}return a}function Fb(n=ft.visualDuration,a=ft.bounce){const i=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,restDelta:r}=i;const u=i.keyframes[0],d=i.keyframes[i.keyframes.length-1],p={done:!1,value:u},{stiffness:m,damping:g,mass:y,duration:v,velocity:_,isResolvedFromDuration:T}=YA({...i,velocity:-Ca(i.velocity||0)}),E=_||0,A=g/(2*Math.sqrt(m*y)),j=d-u,C=Ca(Math.sqrt(m/y)),w=Math.abs(j)<5;o||(o=w?ft.restSpeed.granular:ft.restSpeed.default),r||(r=w?ft.restDelta.granular:ft.restDelta.default);let M;if(A<1){const V=rf(C,A);M=X=>{const Q=Math.exp(-A*C*X);return d-Q*((E+A*C*j)/V*Math.sin(V*X)+j*Math.cos(V*X))}}else if(A===1)M=V=>d-Math.exp(-C*V)*(j+(E+C*j)*V);else{const V=C*Math.sqrt(A*A-1);M=X=>{const Q=Math.exp(-A*C*X),I=Math.min(V*X,300);return d-Q*((E+A*C*j)*Math.sinh(I)+V*j*Math.cosh(I))/V}}const G={calculatedDuration:T&&v||null,next:V=>{const X=M(V);if(T)p.done=V>=v;else{let Q=0;A<1&&(Q=V===0?Ea(E):qb(M,V,X));const I=Math.abs(Q)<=o,te=Math.abs(d-X)<=r;p.done=I&&te}return p.value=p.done?d:X,p},toString:()=>{const V=Math.min(Hb(G),lf),X=mb(Q=>G.next(V*Q).value,V,30);return V+"ms "+X}};return G}function Jy({keyframes:n,velocity:a=0,power:i=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:u=500,modifyTarget:d,min:p,max:m,restDelta:g=.5,restSpeed:y}){const v=n[0],_={done:!1,value:v},T=I=>p!==void 0&&I<p||m!==void 0&&I>m,E=I=>p===void 0?m:m===void 0||Math.abs(p-I)<Math.abs(m-I)?p:m;let A=i*a;const j=v+A,C=d===void 0?j:d(j);C!==j&&(A=C-v);const w=I=>-A*Math.exp(-I/o),M=I=>C+w(I),G=I=>{const te=w(I),se=M(I);_.done=Math.abs(te)<=g,_.value=_.done?C:se};let V,X;const Q=I=>{T(_.value)&&(V=I,X=Fb({keyframes:[_.value,E(_.value)],velocity:qb(M,I,_.value),damping:r,stiffness:u,restDelta:g,restSpeed:y}))};return Q(0),{calculatedDuration:null,next:I=>{let te=!1;return!X&&V===void 0&&(te=!0,G(I),Q(I)),V!==void 0&&I>=V?X.next(I-V):(!te&&G(I),_)}}}const KA=io(.42,0,1,1),ZA=io(0,0,.58,1),$b=io(.42,0,.58,1),XA=n=>Array.isArray(n)&&typeof n[0]!="number",QA={linear:vn,easeIn:KA,easeInOut:$b,easeOut:ZA,circIn:ih,circInOut:Cb,circOut:Eb,backIn:sh,backInOut:xb,backOut:_b,anticipate:Tb},Wy=n=>{if(ah(n)){$0(n.length===4);const[a,i,o,r]=n;return io(a,i,o,r)}else if(typeof n=="string")return QA[n];return n};function JA(n,a,i){const o=[],r=i||Gb,u=n.length-1;for(let d=0;d<u;d++){let p=r(n[d],n[d+1]);if(a){const m=Array.isArray(a)?a[d]||vn:a;p=lo(m,p)}o.push(p)}return o}function WA(n,a,{clamp:i=!0,ease:o,mixer:r}={}){const u=n.length;if($0(u===a.length),u===1)return()=>a[0];if(u===2&&a[0]===a[1])return()=>a[1];const d=n[0]===n[1];n[0]>n[u-1]&&(n=[...n].reverse(),a=[...a].reverse());const p=JA(a,o,r),m=p.length,g=y=>{if(d&&y<n[0])return a[0];let v=0;if(m>1)for(;v<n.length-2&&!(y<n[v+1]);v++);const _=Ri(n[v],n[v+1],y);return p[v](_)};return i?y=>g(ja(n[0],n[u-1],y)):g}function ej(n,a){const i=n[n.length-1];for(let o=1;o<=a;o++){const r=Ri(0,a,o);n.push(ct(i,1,r))}}function tj(n){const a=[0];return ej(a,n.length-1),a}function nj(n,a){return n.map(i=>i*a)}function aj(n,a){return n.map(()=>a||$b).splice(0,n.length-1)}function Pr({duration:n=300,keyframes:a,times:i,ease:o="easeInOut"}){const r=XA(o)?o.map(Wy):Wy(o),u={done:!1,value:a[0]},d=nj(i&&i.length===a.length?i:tj(a),n),p=WA(d,a,{ease:Array.isArray(r)?r:aj(a,r)});return{calculatedDuration:n,next:m=>(u.value=p(m),u.done=m>=n,u)}}const sj=n=>{const a=({timestamp:i})=>n(i);return{start:()=>at.update(a,!0),stop:()=>ss(a),now:()=>Gt.isProcessing?Gt.timestamp:Wn.now()}},ij={decay:Jy,inertia:Jy,tween:Pr,keyframes:Pr,spring:Fb},lj=n=>n/100;class dh extends Ib{constructor(a){super(a),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:m}=this.options;m&&m()};const{name:i,motionValue:o,element:r,keyframes:u}=this.options,d=(r==null?void 0:r.KeyframeResolver)||ch,p=(m,g)=>this.onKeyframesResolved(m,g);this.resolver=new d(u,p,i,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(a){const{type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:u,velocity:d=0}=this.options,p=nh(i)?i:ij[i]||Pr;let m,g;p!==Pr&&typeof a[0]!="number"&&(m=lo(lj,Gb(a[0],a[1])),a=[0,100]);const y=p({...this.options,keyframes:a});u==="mirror"&&(g=p({...this.options,keyframes:[...a].reverse(),velocity:-d})),y.calculatedDuration===null&&(y.calculatedDuration=Hb(y));const{calculatedDuration:v}=y,_=v+r,T=_*(o+1)-r;return{generator:y,mirroredGenerator:g,mapPercentToKeyframes:m,calculatedDuration:v,resolvedDuration:_,totalDuration:T}}onPostResolved(){const{autoplay:a=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!a?this.pause():this.state=this.pendingPlayState}tick(a,i=!1){const{resolved:o}=this;if(!o){const{keyframes:I}=this.options;return{done:!0,value:I[I.length-1]}}const{finalKeyframe:r,generator:u,mirroredGenerator:d,mapPercentToKeyframes:p,keyframes:m,calculatedDuration:g,totalDuration:y,resolvedDuration:v}=o;if(this.startTime===null)return u.next(0);const{delay:_,repeat:T,repeatType:E,repeatDelay:A,onUpdate:j}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-y/this.speed,this.startTime)),i?this.currentTime=a:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(a-this.startTime)*this.speed;const C=this.currentTime-_*(this.speed>=0?1:-1),w=this.speed>=0?C<0:C>y;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=y);let M=this.currentTime,G=u;if(T){const I=Math.min(this.currentTime,y)/v;let te=Math.floor(I),se=I%1;!se&&I>=1&&(se=1),se===1&&te--,te=Math.min(te,T+1),!!(te%2)&&(E==="reverse"?(se=1-se,A&&(se-=A/v)):E==="mirror"&&(G=d)),M=ja(0,1,se)*v}const V=w?{done:!1,value:m[0]}:G.next(M);p&&(V.value=p(V.value));let{done:X}=V;!w&&g!==null&&(X=this.speed>=0?this.currentTime>=y:this.currentTime<=0);const Q=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&X);return Q&&r!==void 0&&(V.value=ic(m,this.options,r)),j&&j(V.value),Q&&this.finish(),V}get duration(){const{resolved:a}=this;return a?Ca(a.calculatedDuration):0}get time(){return Ca(this.currentTime)}set time(a){a=Ea(a),this.currentTime=a,this.holdTime!==null||this.speed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.speed)}get speed(){return this.playbackSpeed}set speed(a){const i=this.playbackSpeed!==a;this.playbackSpeed=a,i&&(this.time=Ca(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:a=sj,onPlay:i,startTime:o}=this.options;this.driver||(this.driver=a(u=>this.tick(u))),i&&i();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var a;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(a=this.currentTime)!==null&&a!==void 0?a:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:a}=this.options;a&&a()}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(a){return this.startTime=0,this.tick(a,!0)}}const oj=new Set(["opacity","clipPath","filter","transform"]);function rj(n,a,i,{delay:o=0,duration:r=300,repeat:u=0,repeatType:d="loop",ease:p="easeInOut",times:m}={}){const g={[a]:i};m&&(g.offset=m);const y=yb(p,r);return Array.isArray(y)&&(g.easing=y),n.animate(g,{delay:o,duration:r,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:u+1,direction:d==="reverse"?"alternate":"normal"})}const cj=th(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Gr=10,uj=2e4;function dj(n){return nh(n.type)||n.type==="spring"||!gb(n.ease)}function fj(n,a){const i=new dh({...a,keyframes:n,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:n[0]};const r=[];let u=0;for(;!o.done&&u<uj;)o=i.sample(u),r.push(o.value),u+=Gr;return{times:void 0,keyframes:r,duration:u-Gr,ease:"linear"}}const Yb={anticipate:Tb,backInOut:xb,circInOut:Cb};function hj(n){return n in Yb}class ev extends Ib{constructor(a){super(a);const{name:i,motionValue:o,element:r,keyframes:u}=this.options;this.resolver=new Vb(u,(d,p)=>this.onKeyframesResolved(d,p),i,o,r),this.resolver.scheduleResolve()}initPlayback(a,i){let{duration:o=300,times:r,ease:u,type:d,motionValue:p,name:m,startTime:g}=this.options;if(!p.owner||!p.owner.current)return!1;if(typeof u=="string"&&Ir()&&hj(u)&&(u=Yb[u]),dj(this.options)){const{onComplete:v,onUpdate:_,motionValue:T,element:E,...A}=this.options,j=fj(a,A);a=j.keyframes,a.length===1&&(a[1]=a[0]),o=j.duration,r=j.times,u=j.ease,d="keyframes"}const y=rj(p.owner.current,m,a,{...this.options,duration:o,times:r,ease:u});return y.startTime=g??this.calcStartTime(),this.pendingTimeline?(Py(y,this.pendingTimeline),this.pendingTimeline=void 0):y.onfinish=()=>{const{onComplete:v}=this.options;p.set(ic(a,this.options,i)),v&&v(),this.cancel(),this.resolveFinishedPromise()},{animation:y,duration:o,times:r,type:d,ease:u,keyframes:a}}get duration(){const{resolved:a}=this;if(!a)return 0;const{duration:i}=a;return Ca(i)}get time(){const{resolved:a}=this;if(!a)return 0;const{animation:i}=a;return Ca(i.currentTime||0)}set time(a){const{resolved:i}=this;if(!i)return;const{animation:o}=i;o.currentTime=Ea(a)}get speed(){const{resolved:a}=this;if(!a)return 1;const{animation:i}=a;return i.playbackRate}set speed(a){const{resolved:i}=this;if(!i)return;const{animation:o}=i;o.playbackRate=a}get state(){const{resolved:a}=this;if(!a)return"idle";const{animation:i}=a;return i.playState}get startTime(){const{resolved:a}=this;if(!a)return null;const{animation:i}=a;return i.startTime}attachTimeline(a){if(!this._resolved)this.pendingTimeline=a;else{const{resolved:i}=this;if(!i)return vn;const{animation:o}=i;Py(o,a)}return vn}play(){if(this.isStopped)return;const{resolved:a}=this;if(!a)return;const{animation:i}=a;i.playState==="finished"&&this.updateFinishedPromise(),i.play()}pause(){const{resolved:a}=this;if(!a)return;const{animation:i}=a;i.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:a}=this;if(!a)return;const{animation:i,keyframes:o,duration:r,type:u,ease:d,times:p}=a;if(i.playState==="idle"||i.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:y,onComplete:v,element:_,...T}=this.options,E=new dh({...T,keyframes:o,duration:r,type:u,ease:d,times:p,isGenerator:!0}),A=Ea(this.time);g.setWithVelocity(E.sample(A-Gr).value,E.sample(A).value,Gr)}const{onStop:m}=this.options;m&&m(),this.cancel()}complete(){const{resolved:a}=this;a&&a.animation.finish()}cancel(){const{resolved:a}=this;a&&a.animation.cancel()}static supports(a){const{motionValue:i,name:o,repeatDelay:r,repeatType:u,damping:d,type:p}=a;if(!i||!i.owner||!(i.owner.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:g}=i.owner.getProps();return cj()&&o&&oj.has(o)&&!m&&!g&&!r&&u!=="mirror"&&d!==0&&p!=="inertia"}}const pj={type:"spring",stiffness:500,damping:25,restSpeed:10},mj=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),gj={type:"keyframes",duration:.8},yj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},vj=(n,{keyframes:a})=>a.length>2?gj:zs.has(n)?n.startsWith("scale")?mj(a[1]):pj:yj;function bj({when:n,delay:a,delayChildren:i,staggerChildren:o,staggerDirection:r,repeat:u,repeatType:d,repeatDelay:p,from:m,elapsed:g,...y}){return!!Object.keys(y).length}const fh=(n,a,i,o={},r,u)=>d=>{const p=Qf(o,n)||{},m=p.delay||o.delay||0;let{elapsed:g=0}=o;g=g-Ea(m);let y={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:a.getVelocity(),...p,delay:-g,onUpdate:_=>{a.set(_),p.onUpdate&&p.onUpdate(_)},onComplete:()=>{d(),p.onComplete&&p.onComplete()},name:n,motionValue:a,element:u?void 0:r};bj(p)||(y={...y,...vj(n,y)}),y.duration&&(y.duration=Ea(y.duration)),y.repeatDelay&&(y.repeatDelay=Ea(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let v=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(y.duration=0,y.delay===0&&(v=!0)),v&&!u&&a.get()!==void 0){const _=ic(y.keyframes,p);if(_!==void 0)return at.update(()=>{y.onUpdate(_),y.onComplete()}),new QC([])}return!u&&ev.supports(y)?new ev(y):new dh(y)};function Sj({protectedKeys:n,needsAnimating:a},i){const o=n.hasOwnProperty(i)&&a[i]!==!0;return a[i]=!1,o}function Kb(n,a,{delay:i=0,transitionOverride:o,type:r}={}){var u;let{transition:d=n.getDefaultTransition(),transitionEnd:p,...m}=a;o&&(d=o);const g=[],y=r&&n.animationState&&n.animationState.getState()[r];for(const v in m){const _=n.getValue(v,(u=n.latestValues[v])!==null&&u!==void 0?u:null),T=m[v];if(T===void 0||y&&Sj(y,v))continue;const E={delay:i,...Qf(d||{},v)};let A=!1;if(window.MotionHandoffAnimation){const C=pb(n);if(C){const w=window.MotionHandoffAnimation(C,v,at);w!==null&&(E.startTime=w,A=!0)}}Wd(n,v),_.start(fh(v,_,T,n.shouldReduceMotion&&fb.has(v)?{type:!1}:E,n,A));const j=_.animation;j&&g.push(j)}return p&&Promise.all(g).then(()=>{at.update(()=>{p&&YC(n,p)})}),g}function cf(n,a,i={}){var o;const r=sc(n,a,i.type==="exit"?(o=n.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(u=i.transitionOverride);const d=r?()=>Promise.all(Kb(n,r,i)):()=>Promise.resolve(),p=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:y=0,staggerChildren:v,staggerDirection:_}=u;return _j(n,a,y+g,v,_,i)}:()=>Promise.resolve(),{when:m}=u;if(m){const[g,y]=m==="beforeChildren"?[d,p]:[p,d];return g().then(()=>y())}else return Promise.all([d(),p(i.delay)])}function _j(n,a,i=0,o=0,r=1,u){const d=[],p=(n.variantChildren.size-1)*o,m=r===1?(g=0)=>g*o:(g=0)=>p-g*o;return Array.from(n.variantChildren).sort(xj).forEach((g,y)=>{g.notify("AnimationStart",a),d.push(cf(g,a,{...u,delay:i+m(y)}).then(()=>g.notify("AnimationComplete",a)))}),Promise.all(d)}function xj(n,a){return n.sortNodePosition(a)}function Tj(n,a,i={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const r=a.map(u=>cf(n,u,i));o=Promise.all(r)}else if(typeof a=="string")o=cf(n,a,i);else{const r=typeof a=="function"?sc(n,a,i.custom):a;o=Promise.all(Kb(n,r,i))}return o.then(()=>{n.notify("AnimationComplete",a)})}const Ej=Vf.length;function Zb(n){if(!n)return;if(!n.isControllingVariants){const i=n.parent?Zb(n.parent)||{}:{};return n.props.initial!==void 0&&(i.initial=n.props.initial),i}const a={};for(let i=0;i<Ej;i++){const o=Vf[i],r=n.props[o];(Xl(r)||r===!1)&&(a[o]=r)}return a}const Cj=[...zf].reverse(),Aj=zf.length;function jj(n){return a=>Promise.all(a.map(({animation:i,options:o})=>Tj(n,i,o)))}function Nj(n){let a=jj(n),i=tv(),o=!0;const r=m=>(g,y)=>{var v;const _=sc(n,y,m==="exit"?(v=n.presenceContext)===null||v===void 0?void 0:v.custom:void 0);if(_){const{transition:T,transitionEnd:E,...A}=_;g={...g,...A,...E}}return g};function u(m){a=m(n)}function d(m){const{props:g}=n,y=Zb(n.parent)||{},v=[],_=new Set;let T={},E=1/0;for(let j=0;j<Aj;j++){const C=Cj[j],w=i[C],M=g[C]!==void 0?g[C]:y[C],G=Xl(M),V=C===m?w.isActive:null;V===!1&&(E=j);let X=M===y[C]&&M!==g[C]&&G;if(X&&o&&n.manuallyAnimateOnMount&&(X=!1),w.protectedKeys={...T},!w.isActive&&V===null||!M&&!w.prevProp||nc(M)||typeof M=="boolean")continue;const Q=wj(w.prevProp,M);let I=Q||C===m&&w.isActive&&!X&&G||j>E&&G,te=!1;const se=Array.isArray(M)?M:[M];let O=se.reduce(r(C),{});V===!1&&(O={});const{prevResolvedValues:ne={}}=w,W={...ne,...O},he=K=>{I=!0,_.has(K)&&(te=!0,_.delete(K)),w.needsAnimating[K]=!0;const ee=n.getValue(K);ee&&(ee.liveStyle=!1)};for(const K in W){const ee=O[K],we=ne[K];if(T.hasOwnProperty(K))continue;let xe=!1;Jd(ee)&&Jd(we)?xe=!db(ee,we):xe=ee!==we,xe?ee!=null?he(K):_.add(K):ee!==void 0&&_.has(K)?he(K):w.protectedKeys[K]=!0}w.prevProp=M,w.prevResolvedValues=O,w.isActive&&(T={...T,...O}),o&&n.blockInitialAnimation&&(I=!1),I&&(!(X&&Q)||te)&&v.push(...se.map(K=>({animation:K,options:{type:C}})))}if(_.size){const j={};_.forEach(C=>{const w=n.getBaseTarget(C),M=n.getValue(C);M&&(M.liveStyle=!0),j[C]=w??null}),v.push({animation:j})}let A=!!v.length;return o&&(g.initial===!1||g.initial===g.animate)&&!n.manuallyAnimateOnMount&&(A=!1),o=!1,A?a(v):Promise.resolve()}function p(m,g){var y;if(i[m].isActive===g)return Promise.resolve();(y=n.variantChildren)===null||y===void 0||y.forEach(_=>{var T;return(T=_.animationState)===null||T===void 0?void 0:T.setActive(m,g)}),i[m].isActive=g;const v=d(m);for(const _ in i)i[_].protectedKeys={};return v}return{animateChanges:d,setActive:p,setAnimateFunction:u,getState:()=>i,reset:()=>{i=tv(),o=!0}}}function wj(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!db(a,n):!1}function Ns(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function tv(){return{animate:Ns(!0),whileInView:Ns(),whileHover:Ns(),whileTap:Ns(),whileDrag:Ns(),whileFocus:Ns(),exit:Ns()}}class rs{constructor(a){this.isMounted=!1,this.node=a}update(){}}class Dj extends rs{constructor(a){super(a),a.animationState||(a.animationState=Nj(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();nc(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:i}=this.node.prevProps||{};a!==i&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)===null||a===void 0||a.call(this)}}let kj=0;class Mj extends rs{constructor(){super(...arguments),this.id=kj++}update(){if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:i}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===o)return;const r=this.node.animationState.setActive("exit",!a);i&&!a&&r.then(()=>i(this.id))}mount(){const{register:a}=this.node.presenceContext||{};a&&(this.unmount=a(this.id))}unmount(){}}const Rj={animation:{Feature:Dj},exit:{Feature:Mj}},Hn={x:!1,y:!1};function Xb(){return Hn.x||Hn.y}function Oj(n){return n==="x"||n==="y"?Hn[n]?null:(Hn[n]=!0,()=>{Hn[n]=!1}):Hn.x||Hn.y?null:(Hn.x=Hn.y=!0,()=>{Hn.x=Hn.y=!1})}const hh=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function eo(n,a,i,o={passive:!0}){return n.addEventListener(a,i,o),()=>n.removeEventListener(a,i)}function oo(n){return{point:{x:n.pageX,y:n.pageY}}}const Bj=n=>a=>hh(a)&&n(a,oo(a));function Gl(n,a,i,o){return eo(n,a,Bj(i),o)}const nv=(n,a)=>Math.abs(n-a);function Lj(n,a){const i=nv(n.x,a.x),o=nv(n.y,a.y);return Math.sqrt(i**2+o**2)}class Qb{constructor(a,i,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:u=!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 v=Od(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,T=Lj(v.offset,{x:0,y:0})>=3;if(!_&&!T)return;const{point:E}=v,{timestamp:A}=Gt;this.history.push({...E,timestamp:A});const{onStart:j,onMove:C}=this.handlers;_||(j&&j(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,v)},this.handlePointerMove=(v,_)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=Rd(_,this.transformPagePoint),at.update(this.updatePoint,!0)},this.handlePointerUp=(v,_)=>{this.end();const{onEnd:T,onSessionEnd:E,resumeAnimation:A}=this.handlers;if(this.dragSnapToOrigin&&A&&A(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const j=Od(v.type==="pointercancel"?this.lastMoveEventInfo:Rd(_,this.transformPagePoint),this.history);this.startEvent&&T&&T(v,j),E&&E(v,j)},!hh(a))return;this.dragSnapToOrigin=u,this.handlers=i,this.transformPagePoint=o,this.contextWindow=r||window;const d=oo(a),p=Rd(d,this.transformPagePoint),{point:m}=p,{timestamp:g}=Gt;this.history=[{...m,timestamp:g}];const{onSessionStart:y}=i;y&&y(a,Od(p,this.history)),this.removeListeners=lo(Gl(this.contextWindow,"pointermove",this.handlePointerMove),Gl(this.contextWindow,"pointerup",this.handlePointerUp),Gl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),ss(this.updatePoint)}}function Rd(n,a){return a?{point:a(n.point)}:n}function av(n,a){return{x:n.x-a.x,y:n.y-a.y}}function Od({point:n},a){return{point:n,delta:av(n,Jb(a)),offset:av(n,Uj(a)),velocity:zj(a,.1)}}function Uj(n){return n[0]}function Jb(n){return n[n.length-1]}function zj(n,a){if(n.length<2)return{x:0,y:0};let i=n.length-1,o=null;const r=Jb(n);for(;i>=0&&(o=n[i],!(r.timestamp-o.timestamp>Ea(a)));)i--;if(!o)return{x:0,y:0};const u=Ca(r.timestamp-o.timestamp);if(u===0)return{x:0,y:0};const d={x:(r.x-o.x)/u,y:(r.y-o.y)/u};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}const Wb=1e-4,Vj=1-Wb,Ij=1+Wb,e1=.01,Hj=0-e1,Pj=0+e1;function bn(n){return n.max-n.min}function Gj(n,a,i){return Math.abs(n-a)<=i}function sv(n,a,i,o=.5){n.origin=o,n.originPoint=ct(a.min,a.max,n.origin),n.scale=bn(i)/bn(a),n.translate=ct(i.min,i.max,n.origin)-n.originPoint,(n.scale>=Vj&&n.scale<=Ij||isNaN(n.scale))&&(n.scale=1),(n.translate>=Hj&&n.translate<=Pj||isNaN(n.translate))&&(n.translate=0)}function ql(n,a,i,o){sv(n.x,a.x,i.x,o?o.originX:void 0),sv(n.y,a.y,i.y,o?o.originY:void 0)}function iv(n,a,i){n.min=i.min+a.min,n.max=n.min+bn(a)}function qj(n,a,i){iv(n.x,a.x,i.x),iv(n.y,a.y,i.y)}function lv(n,a,i){n.min=a.min-i.min,n.max=n.min+bn(a)}function Fl(n,a,i){lv(n.x,a.x,i.x),lv(n.y,a.y,i.y)}function Fj(n,{min:a,max:i},o){return a!==void 0&&n<a?n=o?ct(a,n,o.min):Math.max(n,a):i!==void 0&&n>i&&(n=o?ct(i,n,o.max):Math.min(n,i)),n}function ov(n,a,i){return{min:a!==void 0?n.min+a:void 0,max:i!==void 0?n.max+i-(n.max-n.min):void 0}}function $j(n,{top:a,left:i,bottom:o,right:r}){return{x:ov(n.x,i,r),y:ov(n.y,a,o)}}function rv(n,a){let i=a.min-n.min,o=a.max-n.max;return a.max-a.min<n.max-n.min&&([i,o]=[o,i]),{min:i,max:o}}function Yj(n,a){return{x:rv(n.x,a.x),y:rv(n.y,a.y)}}function Kj(n,a){let i=.5;const o=bn(n),r=bn(a);return r>o?i=Ri(a.min,a.max-o,n.min):o>r&&(i=Ri(n.min,n.max-r,a.min)),ja(0,1,i)}function Zj(n,a){const i={};return a.min!==void 0&&(i.min=a.min-n.min),a.max!==void 0&&(i.max=a.max-n.min),i}const uf=.35;function Xj(n=uf){return n===!1?n=0:n===!0&&(n=uf),{x:cv(n,"left","right"),y:cv(n,"top","bottom")}}function cv(n,a,i){return{min:uv(n,a),max:uv(n,i)}}function uv(n,a){return typeof n=="number"?n:n[a]||0}const dv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ni=()=>({x:dv(),y:dv()}),fv=()=>({min:0,max:0}),_t=()=>({x:fv(),y:fv()});function Mn(n){return[n("x"),n("y")]}function t1({top:n,left:a,right:i,bottom:o}){return{x:{min:a,max:i},y:{min:n,max:o}}}function Qj({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function Jj(n,a){if(!a)return n;const i=a({x:n.left,y:n.top}),o=a({x:n.right,y:n.bottom});return{top:i.y,left:i.x,bottom:o.y,right:o.x}}function Bd(n){return n===void 0||n===1}function df({scale:n,scaleX:a,scaleY:i}){return!Bd(n)||!Bd(a)||!Bd(i)}function Ds(n){return df(n)||n1(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function n1(n){return hv(n.x)||hv(n.y)}function hv(n){return n&&n!=="0%"}function qr(n,a,i){const o=n-i,r=a*o;return i+r}function pv(n,a,i,o,r){return r!==void 0&&(n=qr(n,r,o)),qr(n,i,o)+a}function ff(n,a=0,i=1,o,r){n.min=pv(n.min,a,i,o,r),n.max=pv(n.max,a,i,o,r)}function a1(n,{x:a,y:i}){ff(n.x,a.translate,a.scale,a.originPoint),ff(n.y,i.translate,i.scale,i.originPoint)}const mv=.999999999999,gv=1.0000000000001;function Wj(n,a,i,o=!1){const r=i.length;if(!r)return;a.x=a.y=1;let u,d;for(let p=0;p<r;p++){u=i[p],d=u.projectionDelta;const{visualElement:m}=u.options;m&&m.props.style&&m.props.style.display==="contents"||(o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Di(n,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),d&&(a.x*=d.x.scale,a.y*=d.y.scale,a1(n,d)),o&&Ds(u.latestValues)&&Di(n,u.latestValues))}a.x<gv&&a.x>mv&&(a.x=1),a.y<gv&&a.y>mv&&(a.y=1)}function wi(n,a){n.min=n.min+a,n.max=n.max+a}function yv(n,a,i,o,r=.5){const u=ct(n.min,n.max,r);ff(n,a,i,u,o)}function Di(n,a){yv(n.x,a.x,a.scaleX,a.scale,a.originX),yv(n.y,a.y,a.scaleY,a.scale,a.originY)}function s1(n,a){return t1(Jj(n.getBoundingClientRect(),a))}function e2(n,a,i){const o=s1(n,i),{scroll:r}=a;return r&&(wi(o.x,r.offset.x),wi(o.y,r.offset.y)),o}const i1=({current:n})=>n?n.ownerDocument.defaultView:null,t2=new WeakMap;class n2{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_t(),this.visualElement=a}start(a,{snapToCursor:i=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=y=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),i&&this.snapToCursor(oo(y).point)},u=(y,v)=>{const{drag:_,dragPropagation:T,onDragStart:E}=this.getProps();if(_&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Oj(_),!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),Mn(j=>{let C=this.getAxisMotionValue(j).get()||0;if(Jn.test(C)){const{projection:w}=this.visualElement;if(w&&w.layout){const M=w.layout.layoutBox[j];M&&(C=bn(M)*(parseFloat(C)/100))}}this.originPoint[j]=C}),E&&at.postRender(()=>E(y,v)),Wd(this.visualElement,"transform");const{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},d=(y,v)=>{const{dragPropagation:_,dragDirectionLock:T,onDirectionLock:E,onDrag:A}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:j}=v;if(T&&this.currentDirection===null){this.currentDirection=a2(j),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",v.point,j),this.updateAxis("y",v.point,j),this.visualElement.render(),A&&A(y,v)},p=(y,v)=>this.stop(y,v),m=()=>Mn(y=>{var v;return this.getAnimationState(y)==="paused"&&((v=this.getAxisMotionValue(y).animation)===null||v===void 0?void 0:v.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new Qb(a,{onSessionStart:r,onStart:u,onMove:d,onSessionEnd:p,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:i1(this.visualElement)})}stop(a,i){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:u}=this.getProps();u&&at.postRender(()=>u(a,i))}cancel(){this.isDragging=!1;const{projection:a,animationState:i}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(a,i,o){const{drag:r}=this.getProps();if(!o||!Ar(a,r,this.currentDirection))return;const u=this.getAxisMotionValue(a);let d=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(d=Fj(d,this.constraints[a],this.elastic[a])),u.set(d)}resolveConstraints(){var a;const{dragConstraints:i,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)===null||a===void 0?void 0:a.layout,u=this.constraints;i&&Ai(i)?this.constraints||(this.constraints=this.resolveRefConstraints()):i&&r?this.constraints=$j(r.layoutBox,i):this.constraints=!1,this.elastic=Xj(o),u!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Mn(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=Zj(r.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:i}=this.getProps();if(!a||!Ai(a))return!1;const o=a.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const u=e2(o,r.root,this.visualElement.getTransformPagePoint());let d=Yj(r.layout.layoutBox,u);if(i){const p=i(Qj(d));this.hasMutatedConstraints=!!p,p&&(d=t1(p))}return d}startAnimation(a){const{drag:i,dragMomentum:o,dragElastic:r,dragTransition:u,dragSnapToOrigin:d,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},g=Mn(y=>{if(!Ar(y,i,this.currentDirection))return;let v=m&&m[y]||{};d&&(v={min:0,max:0});const _=r?200:1e6,T=r?40:1e7,E={type:"inertia",velocity:o?a[y]:0,bounceStiffness:_,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...u,...v};return this.startAxisValueAnimation(y,E)});return Promise.all(g).then(p)}startAxisValueAnimation(a,i){const o=this.getAxisMotionValue(a);return Wd(this.visualElement,a),o.start(fh(a,o,0,i,this.visualElement,!1))}stopAnimation(){Mn(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){Mn(a=>{var i;return(i=this.getAxisMotionValue(a).animation)===null||i===void 0?void 0:i.pause()})}getAnimationState(a){var i;return(i=this.getAxisMotionValue(a).animation)===null||i===void 0?void 0:i.state}getAxisMotionValue(a){const i=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),r=o[i];return r||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){Mn(i=>{const{drag:o}=this.getProps();if(!Ar(i,o,this.currentDirection))return;const{projection:r}=this.visualElement,u=this.getAxisMotionValue(i);if(r&&r.layout){const{min:d,max:p}=r.layout.layoutBox[i];u.set(a[i]-ct(d,p,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:i}=this.getProps(),{projection:o}=this.visualElement;if(!Ai(i)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Mn(d=>{const p=this.getAxisMotionValue(d);if(p&&this.constraints!==!1){const m=p.get();r[d]=Kj({min:m,max:m},this.constraints[d])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Mn(d=>{if(!Ar(d,a,null))return;const p=this.getAxisMotionValue(d),{min:m,max:g}=this.constraints[d];p.set(ct(m,g,r[d]))})}addListeners(){if(!this.visualElement.current)return;t2.set(this.visualElement,this);const a=this.visualElement.current,i=Gl(a,"pointerdown",m=>{const{drag:g,dragListener:y=!0}=this.getProps();g&&y&&this.start(m)}),o=()=>{const{dragConstraints:m}=this.getProps();Ai(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,u=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),at.read(o);const d=eo(window,"resize",()=>this.scalePositionWithinConstraints()),p=r.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:g})=>{this.isDragging&&g&&(Mn(y=>{const v=this.getAxisMotionValue(y);v&&(this.originPoint[y]+=m[y].translate,v.set(v.get()+m[y].translate))}),this.visualElement.render())}));return()=>{d(),i(),u(),p&&p()}}getProps(){const a=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:u=!1,dragElastic:d=uf,dragMomentum:p=!0}=a;return{...a,drag:i,dragDirectionLock:o,dragPropagation:r,dragConstraints:u,dragElastic:d,dragMomentum:p}}}function Ar(n,a,i){return(a===!0||a===n)&&(i===null||i===n)}function a2(n,a=10){let i=null;return Math.abs(n.y)>a?i="y":Math.abs(n.x)>a&&(i="x"),i}class s2 extends rs{constructor(a){super(a),this.removeGroupControls=vn,this.removeListeners=vn,this.controls=new n2(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||vn}unmount(){this.removeGroupControls(),this.removeListeners()}}const vv=n=>(a,i)=>{n&&at.postRender(()=>n(a,i))};class i2 extends rs{constructor(){super(...arguments),this.removePointerDownListener=vn}onPointerDown(a){this.session=new Qb(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:i1(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:i,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:vv(a),onStart:vv(i),onMove:o,onEnd:(u,d)=>{delete this.session,r&&at.postRender(()=>r(u,d))}}}mount(){this.removePointerDownListener=Gl(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Lr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function bv(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Ol={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(ge.test(n))n=parseFloat(n);else return n;const i=bv(n,a.target.x),o=bv(n,a.target.y);return`${i}% ${o}%`}},l2={correct:(n,{treeScale:a,projectionDelta:i})=>{const o=n,r=is.parse(n);if(r.length>5)return o;const u=is.createTransformer(n),d=typeof r[0]!="number"?1:0,p=i.x.scale*a.x,m=i.y.scale*a.y;r[0+d]/=p,r[1+d]/=m;const g=ct(p,m,.5);return typeof r[2+d]=="number"&&(r[2+d]/=g),typeof r[3+d]=="number"&&(r[3+d]/=g),u(r)}};class o2 extends S.Component{componentDidMount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:o,layoutId:r}=this.props,{projection:u}=a;RC(r2),u&&(i.group&&i.group.add(u),o&&o.register&&r&&o.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,onExitComplete:()=>this.safeToRemove()})),Lr.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:i,visualElement:o,drag:r,isPresent:u}=this.props,d=o.projection;return d&&(d.isPresent=u,r||a.layoutDependency!==i||i===void 0?d.willUpdate():this.safeToRemove(),a.isPresent!==u&&(u?d.promote():d.relegate()||at.postRender(()=>{const p=d.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),Hf.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:o}=this.props,{projection:r}=a;r&&(r.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function l1(n){const[a,i]=q0(),o=S.useContext(Of);return h.jsx(o2,{...n,layoutGroup:o,switchLayoutGroup:S.useContext(J0),isPresent:a,safeToRemove:i})}const r2={borderRadius:{...Ol,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ol,borderTopRightRadius:Ol,borderBottomLeftRadius:Ol,borderBottomRightRadius:Ol,boxShadow:l2};function c2(n,a,i){const o=Kt(n)?n:Jl(n);return o.start(fh("",o,a,i)),o.animation}function u2(n){return n instanceof SVGElement&&n.tagName!=="svg"}const d2=(n,a)=>n.depth-a.depth;class f2{constructor(){this.children=[],this.isDirty=!1}add(a){Jf(this.children,a),this.isDirty=!0}remove(a){Wf(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(d2),this.isDirty=!1,this.children.forEach(a)}}function h2(n,a){const i=Wn.now(),o=({timestamp:r})=>{const u=r-i;u>=a&&(ss(o),n(u-a))};return at.read(o,!0),()=>ss(o)}const o1=["TopLeft","TopRight","BottomLeft","BottomRight"],p2=o1.length,Sv=n=>typeof n=="string"?parseFloat(n):n,_v=n=>typeof n=="number"||ge.test(n);function m2(n,a,i,o,r,u){r?(n.opacity=ct(0,i.opacity!==void 0?i.opacity:1,g2(o)),n.opacityExit=ct(a.opacity!==void 0?a.opacity:1,0,y2(o))):u&&(n.opacity=ct(a.opacity!==void 0?a.opacity:1,i.opacity!==void 0?i.opacity:1,o));for(let d=0;d<p2;d++){const p=`border${o1[d]}Radius`;let m=xv(a,p),g=xv(i,p);if(m===void 0&&g===void 0)continue;m||(m=0),g||(g=0),m===0||g===0||_v(m)===_v(g)?(n[p]=Math.max(ct(Sv(m),Sv(g),o),0),(Jn.test(g)||Jn.test(m))&&(n[p]+="%")):n[p]=g}(a.rotate||i.rotate)&&(n.rotate=ct(a.rotate||0,i.rotate||0,o))}function xv(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const g2=r1(0,.5,Eb),y2=r1(.5,.95,vn);function r1(n,a,i){return o=>o<n?0:o>a?1:i(Ri(n,a,o))}function Tv(n,a){n.min=a.min,n.max=a.max}function kn(n,a){Tv(n.x,a.x),Tv(n.y,a.y)}function Ev(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}function Cv(n,a,i,o,r){return n-=a,n=qr(n,1/i,o),r!==void 0&&(n=qr(n,1/r,o)),n}function v2(n,a=0,i=1,o=.5,r,u=n,d=n){if(Jn.test(a)&&(a=parseFloat(a),a=ct(d.min,d.max,a/100)-d.min),typeof a!="number")return;let p=ct(u.min,u.max,o);n===u&&(p-=a),n.min=Cv(n.min,a,i,p,r),n.max=Cv(n.max,a,i,p,r)}function Av(n,a,[i,o,r],u,d){v2(n,a[i],a[o],a[r],a.scale,u,d)}const b2=["x","scaleX","originX"],S2=["y","scaleY","originY"];function jv(n,a,i,o){Av(n.x,a,b2,i?i.x:void 0,o?o.x:void 0),Av(n.y,a,S2,i?i.y:void 0,o?o.y:void 0)}function Nv(n){return n.translate===0&&n.scale===1}function c1(n){return Nv(n.x)&&Nv(n.y)}function wv(n,a){return n.min===a.min&&n.max===a.max}function _2(n,a){return wv(n.x,a.x)&&wv(n.y,a.y)}function Dv(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function u1(n,a){return Dv(n.x,a.x)&&Dv(n.y,a.y)}function kv(n){return bn(n.x)/bn(n.y)}function Mv(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}class x2{constructor(){this.members=[]}add(a){Jf(this.members,a),a.scheduleRender()}remove(a){if(Wf(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(a){const i=this.members.findIndex(r=>a===r);if(i===0)return!1;let o;for(let r=i;r>=0;r--){const u=this.members[r];if(u.isPresent!==!1){o=u;break}}return o?(this.promote(o),!0):!1}promote(a,i){const o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.instance&&o.scheduleRender(),a.scheduleRender(),a.resumeFrom=o,i&&(a.resumeFrom.preserveOpacity=!0),o.snapshot&&(a.snapshot=o.snapshot,a.snapshot.latestValues=o.animationValues||o.latestValues),a.root&&a.root.isUpdating&&(a.isLayoutDirty=!0);const{crossfade:r}=a.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(a=>{const{options:i,resumingFrom:o}=a;i.onExitComplete&&i.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(a=>{a.instance&&a.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function T2(n,a,i){let o="";const r=n.x.translate/a.x,u=n.y.translate/a.y,d=(i==null?void 0:i.z)||0;if((r||u||d)&&(o=`translate3d(${r}px, ${u}px, ${d}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),i){const{transformPerspective:g,rotate:y,rotateX:v,rotateY:_,skewX:T,skewY:E}=i;g&&(o=`perspective(${g}px) ${o}`),y&&(o+=`rotate(${y}deg) `),v&&(o+=`rotateX(${v}deg) `),_&&(o+=`rotateY(${_}deg) `),T&&(o+=`skewX(${T}deg) `),E&&(o+=`skewY(${E}deg) `)}const p=n.x.scale*a.x,m=n.y.scale*a.y;return(p!==1||m!==1)&&(o+=`scale(${p}, ${m})`),o||"none"}const ks={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Vl=typeof window<"u"&&window.MotionDebug!==void 0,Ld=["","X","Y","Z"],E2={visibility:"hidden"},Rv=1e3;let C2=0;function Ud(n,a,i,o){const{latestValues:r}=a;r[n]&&(i[n]=r[n],a.setStaticValue(n,0),o&&(o[n]=0))}function d1(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const i=pb(a);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:r,layoutId:u}=n.options;window.MotionCancelOptimisedAnimation(i,"transform",at,!(r||u))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&d1(o)}function f1({attachResizeListener:n,defaultParent:a,measureScroll:i,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(d={},p=a==null?void 0:a()){this.id=C2++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Vl&&(ks.totalNodes=ks.resolvedTargetDeltas=ks.recalculatedProjection=0),this.nodes.forEach(N2),this.nodes.forEach(R2),this.nodes.forEach(O2),this.nodes.forEach(w2),Vl&&window.MotionDebug.record(ks)},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 m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new f2)}addEventListener(d,p){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new eh),this.eventHandlers.get(d).add(p)}notifyListeners(d,...p){const m=this.eventHandlers.get(d);m&&m.notify(...p)}hasListeners(d){return this.eventHandlers.has(d)}mount(d,p=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=u2(d),this.instance=d;const{layoutId:m,layout:g,visualElement:y}=this.options;if(y&&!y.current&&y.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),p&&(g||m)&&(this.isLayoutDirty=!0),n){let v;const _=()=>this.root.updateBlockedByResize=!1;n(d,()=>{this.root.updateBlockedByResize=!0,v&&v(),v=h2(_,250),Lr.hasAnimatedSinceResize&&(Lr.hasAnimatedSinceResize=!1,this.nodes.forEach(Bv))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&y&&(m||g)&&this.addEventListener("didUpdate",({delta:v,hasLayoutChanged:_,hasRelativeTargetChanged:T,layout:E})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const A=this.options.transition||y.getDefaultTransition()||V2,{onLayoutAnimationStart:j,onLayoutAnimationComplete:C}=y.getProps(),w=!this.targetLayout||!u1(this.targetLayout,E)||T,M=!_&&T;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||M||_&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(v,M);const G={...Qf(A,"layout"),onPlay:j,onComplete:C};(y.shouldReduceMotion||this.options.layoutRoot)&&(G.delay=0,G.type=!1),this.startAnimation(G)}else _||Bv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=E})}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,ss(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(B2),this.animationId++)}getTransformTemplate(){const{visualElement: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&&d1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const v=this.path[y];v.shouldResetTransform=!0,v.updateScroll("snapshot"),v.options.layoutRoot&&v.willUpdate(!1)}const{layoutId:p,layout:m}=this.options;if(p===void 0&&!m)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ov);return}this.isUpdating||this.nodes.forEach(k2),this.isUpdating=!1,this.nodes.forEach(M2),this.nodes.forEach(A2),this.nodes.forEach(j2),this.clearAllSnapshots();const p=Wn.now();Gt.delta=ja(0,1e3/60,p-Gt.timestamp),Gt.timestamp=p,Gt.isProcessing=!0,Nd.update.process(Gt),Nd.preRender.process(Gt),Nd.render.process(Gt),Gt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(D2),this.sharedNodes.forEach(L2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,at.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){at.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 m=0;m<this.path.length;m++)this.path[m].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutCorrected=_t(),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 m=o(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:m,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!r)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!c1(this.projectionDelta),m=this.getTransformTemplate(),g=m?m(this.latestValues,""):void 0,y=g!==this.prevTransformTemplateValue;d&&(p||Ds(this.latestValues)||y)&&(r(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const p=this.measurePageBox();let m=this.removeElementScroll(p);return d&&(m=this.removeTransform(m)),I2(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:p}=this.options;if(!p)return _t();const m=p.measureViewportBox();if(!(((d=this.scroll)===null||d===void 0?void 0:d.wasRoot)||this.path.some(H2))){const{scroll:y}=this.root;y&&(wi(m.x,y.offset.x),wi(m.y,y.offset.y))}return m}removeElementScroll(d){var p;const m=_t();if(kn(m,d),!((p=this.scroll)===null||p===void 0)&&p.wasRoot)return m;for(let g=0;g<this.path.length;g++){const y=this.path[g],{scroll:v,options:_}=y;y!==this.root&&v&&_.layoutScroll&&(v.wasRoot&&kn(m,d),wi(m.x,v.offset.x),wi(m.y,v.offset.y))}return m}applyTransform(d,p=!1){const m=_t();kn(m,d);for(let g=0;g<this.path.length;g++){const y=this.path[g];!p&&y.options.layoutScroll&&y.scroll&&y!==y.root&&Di(m,{x:-y.scroll.offset.x,y:-y.scroll.offset.y}),Ds(y.latestValues)&&Di(m,y.latestValues)}return Ds(this.latestValues)&&Di(m,this.latestValues),m}removeTransform(d){const p=_t();kn(p,d);for(let m=0;m<this.path.length;m++){const g=this.path[m];if(!g.instance||!Ds(g.latestValues))continue;df(g.latestValues)&&g.updateSnapshot();const y=_t(),v=g.measurePageBox();kn(y,v),jv(p,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,y)}return Ds(this.latestValues)&&jv(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!==Gt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){var p;const m=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=m.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=m.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=m.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==m;if(!(d||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((p=this.parent)===null||p===void 0)&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:v,layoutId:_}=this.options;if(!(!this.layout||!(v||_))){if(this.resolvedRelativeTargetAt=Gt.timestamp,!this.targetDelta&&!this.relativeTarget){const T=this.getClosestProjectingParent();T&&T.layout&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_t(),this.relativeTargetOrigin=_t(),Fl(this.relativeTargetOrigin,this.layout.layoutBox,T.layout.layoutBox),kn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=_t(),this.targetWithTransforms=_t()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),qj(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):kn(this.target,this.layout.layoutBox),a1(this.target,this.targetDelta)):kn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const T=this.getClosestProjectingParent();T&&!!T.resumingFrom==!!this.resumingFrom&&!T.options.layoutScroll&&T.target&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_t(),this.relativeTargetOrigin=_t(),Fl(this.relativeTargetOrigin,this.target,T.target),kn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Vl&&ks.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||df(this.parent.latestValues)||n1(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(),m=!!this.resumingFrom||this!==p;let g=!0;if((this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty)&&(g=!1),m&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===Gt.timestamp&&(g=!1),g)return;const{layout:y,layoutId:v}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(y||v))return;kn(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,T=this.treeScale.y;Wj(this.layoutCorrected,this.treeScale,this.path,m),p.layout&&!p.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(p.target=p.layout.layoutBox,p.targetWithTransforms=_t());const{target:E}=p;if(!E){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ev(this.prevProjectionDelta.x,this.projectionDelta.x),Ev(this.prevProjectionDelta.y,this.projectionDelta.y)),ql(this.projectionDelta,this.layoutCorrected,E,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==T||!Mv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Mv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",E)),Vl&&ks.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 m=this.getStack();m&&m.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ni(),this.projectionDelta=Ni(),this.projectionDeltaWithTransform=Ni()}setAnimationOrigin(d,p=!1){const m=this.snapshot,g=m?m.latestValues:{},y={...this.latestValues},v=Ni();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const _=_t(),T=m?m.source:void 0,E=this.layout?this.layout.source:void 0,A=T!==E,j=this.getStack(),C=!j||j.members.length<=1,w=!!(A&&!C&&this.options.crossfade===!0&&!this.path.some(z2));this.animationProgress=0;let M;this.mixTargetDelta=G=>{const V=G/1e3;Lv(v.x,d.x,V),Lv(v.y,d.y,V),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fl(_,this.layout.layoutBox,this.relativeParent.layout.layoutBox),U2(this.relativeTarget,this.relativeTargetOrigin,_,V),M&&_2(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=_t()),kn(M,this.relativeTarget)),A&&(this.animationValues=y,m2(y,g,this.latestValues,V,w,C)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},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&&(ss(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=at.update(()=>{Lr.hasAnimatedSinceResize=!0,this.currentAnimation=c2(0,Rv,{...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(Rv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:p,target:m,layout:g,latestValues:y}=d;if(!(!p||!m||!g)){if(this!==d&&this.layout&&g&&h1(this.options.animationType,this.layout.layoutBox,g.layoutBox)){m=this.target||_t();const v=bn(this.layout.layoutBox.x);m.x.min=d.target.x.min,m.x.max=m.x.min+v;const _=bn(this.layout.layoutBox.y);m.y.min=d.target.y.min,m.y.max=m.y.min+_}kn(p,m),Di(p,y),ql(this.projectionDeltaWithTransform,this.layoutCorrected,p,y)}}registerSharedNode(d,p){this.sharedNodes.has(d)||this.sharedNodes.set(d,new x2),this.sharedNodes.get(d).add(p);const g=p.options.initialPromotionConfig;p.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(p):void 0})}isLead(){const 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:m}={}){const g=this.getStack();g&&g.promote(this,m),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:m}=d;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const g={};m.z&&Ud("z",d,g,this.animationValues);for(let y=0;y<Ld.length;y++)Ud(`rotate${Ld[y]}`,d,g,this.animationValues),Ud(`skew${Ld[y]}`,d,g,this.animationValues);d.render();for(const y in g)d.setStaticValue(y,g[y]),this.animationValues&&(this.animationValues[y]=g[y]);d.scheduleRender()}getProjectionStyles(d){var p,m;if(!this.instance||this.isSVG)return;if(!this.isVisible)return E2;const g={visibility:""},y=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=Or(d==null?void 0:d.pointerEvents)||"",g.transform=y?y(this.latestValues,""):"none",g;const v=this.getLead();if(!this.projectionDelta||!this.layout||!v.target){const A={};return this.options.layoutId&&(A.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,A.pointerEvents=Or(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!Ds(this.latestValues)&&(A.transform=y?y({},""):"none",this.hasProjected=!1),A}const _=v.animationValues||v.latestValues;this.applyTransformsToTarget(),g.transform=T2(this.projectionDeltaWithTransform,this.treeScale,_),y&&(g.transform=y(_,g.transform));const{x:T,y:E}=this.projectionDelta;g.transformOrigin=`${T.origin*100}% ${E.origin*100}% 0`,v.animationValues?g.opacity=v===this?(m=(p=_.opacity)!==null&&p!==void 0?p:this.latestValues.opacity)!==null&&m!==void 0?m:1:this.preserveOpacity?this.latestValues.opacity:_.opacityExit:g.opacity=v===this?_.opacity!==void 0?_.opacity:"":_.opacityExit!==void 0?_.opacityExit:0;for(const A in Vr){if(_[A]===void 0)continue;const{correct:j,applyTo:C}=Vr[A],w=g.transform==="none"?_[A]:j(_[A],v);if(C){const M=C.length;for(let G=0;G<M;G++)g[C[G]]=w}else g[A]=w}return this.options.layoutId&&(g.pointerEvents=v===this?Or(d==null?void 0:d.pointerEvents)||"":"none"),g}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(Ov),this.root.sharedNodes.clear()}}}function A2(n){n.updateLayout()}function j2(n){var a;const i=((a=n.resumeFrom)===null||a===void 0?void 0:a.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&i&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=n.layout,{animationType:u}=n.options,d=i.source!==n.layout.source;u==="size"?Mn(v=>{const _=d?i.measuredBox[v]:i.layoutBox[v],T=bn(_);_.min=o[v].min,_.max=_.min+T}):h1(u,i.layoutBox,o)&&Mn(v=>{const _=d?i.measuredBox[v]:i.layoutBox[v],T=bn(o[v]);_.max=_.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[v].max=n.relativeTarget[v].min+T)});const p=Ni();ql(p,o,i.layoutBox);const m=Ni();d?ql(m,n.applyTransform(r,!0),i.measuredBox):ql(m,o,i.layoutBox);const g=!c1(p);let y=!1;if(!n.resumeFrom){const v=n.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:_,layout:T}=v;if(_&&T){const E=_t();Fl(E,i.layoutBox,_.layoutBox);const A=_t();Fl(A,o,T.layoutBox),u1(E,A)||(y=!0),v.options.layoutRoot&&(n.relativeTarget=A,n.relativeTargetOrigin=E,n.relativeParent=v)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:m,layoutDelta:p,hasLayoutChanged:g,hasRelativeTargetChanged:y})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function N2(n){Vl&&ks.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function w2(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function D2(n){n.clearSnapshot()}function Ov(n){n.clearMeasurements()}function k2(n){n.isLayoutDirty=!1}function M2(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function Bv(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function R2(n){n.resolveTargetDelta()}function O2(n){n.calcProjection()}function B2(n){n.resetSkewAndRotation()}function L2(n){n.removeLeadSnapshot()}function Lv(n,a,i){n.translate=ct(a.translate,0,i),n.scale=ct(a.scale,1,i),n.origin=a.origin,n.originPoint=a.originPoint}function Uv(n,a,i,o){n.min=ct(a.min,i.min,o),n.max=ct(a.max,i.max,o)}function U2(n,a,i,o){Uv(n.x,a.x,i.x,o),Uv(n.y,a.y,i.y,o)}function z2(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const V2={duration:.45,ease:[.4,0,.1,1]},zv=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),Vv=zv("applewebkit/")&&!zv("chrome/")?Math.round:vn;function Iv(n){n.min=Vv(n.min),n.max=Vv(n.max)}function I2(n){Iv(n.x),Iv(n.y)}function h1(n,a,i){return n==="position"||n==="preserve-aspect"&&!Gj(kv(a),kv(i),.2)}function H2(n){var a;return n!==n.root&&((a=n.scroll)===null||a===void 0?void 0:a.wasRoot)}const P2=f1({attachResizeListener:(n,a)=>eo(n,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zd={current:void 0},p1=f1({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!zd.current){const n=new P2({});n.mount(window),n.setOptions({layoutScroll:!0}),zd.current=n}return zd.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),G2={pan:{Feature:i2},drag:{Feature:s2,ProjectionNode:p1,MeasureLayout:l1}};function q2(n,a,i){var o;if(n instanceof Element)return[n];if(typeof n=="string"){let r=document;const u=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n)}function m1(n,a){const i=q2(n),o=new AbortController,r={passive:!0,...a,signal:o.signal};return[i,r,()=>o.abort()]}function Hv(n){return a=>{a.pointerType==="touch"||Xb()||n(a)}}function F2(n,a,i={}){const[o,r,u]=m1(n,i),d=Hv(p=>{const{target:m}=p,g=a(p);if(typeof g!="function"||!m)return;const y=Hv(v=>{g(v),m.removeEventListener("pointerleave",y)});m.addEventListener("pointerleave",y,r)});return o.forEach(p=>{p.addEventListener("pointerenter",d,r)}),u}function Pv(n,a,i){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",i==="Start");const r="onHover"+i,u=o[r];u&&at.postRender(()=>u(a,oo(a)))}class $2 extends rs{mount(){const{current:a}=this.node;a&&(this.unmount=F2(a,i=>(Pv(this.node,i,"Start"),o=>Pv(this.node,o,"End"))))}unmount(){}}class Y2 extends rs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!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=lo(eo(this.node.current,"focus",()=>this.onFocus()),eo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const g1=(n,a)=>a?n===a?!0:g1(n,a.parentElement):!1,K2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Z2(n){return K2.has(n.tagName)||n.tabIndex!==-1}const Il=new WeakSet;function Gv(n){return a=>{a.key==="Enter"&&n(a)}}function Vd(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const X2=(n,a)=>{const i=n.currentTarget;if(!i)return;const o=Gv(()=>{if(Il.has(i))return;Vd(i,"down");const r=Gv(()=>{Vd(i,"up")}),u=()=>Vd(i,"cancel");i.addEventListener("keyup",r,a),i.addEventListener("blur",u,a)});i.addEventListener("keydown",o,a),i.addEventListener("blur",()=>i.removeEventListener("keydown",o),a)};function qv(n){return hh(n)&&!Xb()}function Q2(n,a,i={}){const[o,r,u]=m1(n,i),d=p=>{const m=p.currentTarget;if(!qv(p)||Il.has(m))return;Il.add(m);const g=a(p),y=(T,E)=>{window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",_),!(!qv(T)||!Il.has(m))&&(Il.delete(m),typeof g=="function"&&g(T,{success:E}))},v=T=>{y(T,i.useGlobalTarget||g1(m,T.target))},_=T=>{y(T,!1)};window.addEventListener("pointerup",v,r),window.addEventListener("pointercancel",_,r)};return o.forEach(p=>{!Z2(p)&&p.getAttribute("tabindex")===null&&(p.tabIndex=0),(i.useGlobalTarget?window:p).addEventListener("pointerdown",d,r),p.addEventListener("focus",g=>X2(g,r),r)}),u}function Fv(n,a,i){const{props:o}=n;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",i==="Start");const r="onTap"+(i==="End"?"":i),u=o[r];u&&at.postRender(()=>u(a,oo(a)))}class J2 extends rs{mount(){const{current:a}=this.node;a&&(this.unmount=Q2(a,i=>(Fv(this.node,i,"Start"),(o,{success:r})=>Fv(this.node,o,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const hf=new WeakMap,Id=new WeakMap,W2=n=>{const a=hf.get(n.target);a&&a(n)},eN=n=>{n.forEach(W2)};function tN({root:n,...a}){const i=n||document;Id.has(i)||Id.set(i,{});const o=Id.get(i),r=JSON.stringify(a);return o[r]||(o[r]=new IntersectionObserver(eN,{root:n,...a})),o[r]}function nN(n,a,i){const o=tN(a);return hf.set(n,i),o.observe(n),()=>{hf.delete(n),o.unobserve(n)}}const aN={some:0,all:1};class sN extends rs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:a={}}=this.node.getProps(),{root:i,margin:o,amount:r="some",once:u}=a,d={root:i?i.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:aN[r]},p=m=>{const{isIntersecting:g}=m;if(this.isInView===g||(this.isInView=g,u&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:y,onViewportLeave:v}=this.node.getProps(),_=g?y:v;_&&_(m)};return nN(this.node.current,d,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:i}=this.node;["amount","margin","root"].some(iN(a,i))&&this.startObserver()}unmount(){}}function iN({viewport:n={}},{viewport:a={}}={}){return i=>n[i]!==a[i]}const lN={inView:{Feature:sN},tap:{Feature:J2},focus:{Feature:Y2},hover:{Feature:$2}},oN={layout:{ProjectionNode:p1,MeasureLayout:l1}},pf={current:null},y1={current:!1};function rN(){if(y1.current=!0,!!Uf)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>pf.current=n.matches;n.addListener(a),a()}else pf.current=!1}const cN=[...zb,Yt,is],uN=n=>cN.find(Ub(n)),$v=new WeakMap;function dN(n,a,i){for(const o in a){const r=a[o],u=i[o];if(Kt(r))n.addValue(o,r);else if(Kt(u))n.addValue(o,Jl(r,{owner:n}));else if(u!==r)if(n.hasValue(o)){const d=n.getValue(o);d.liveStyle===!0?d.jump(r):d.hasAnimated||d.set(r)}else{const d=n.getStaticValue(o);n.addValue(o,Jl(d!==void 0?d:r,{owner:n}))}}for(const o in i)a[o]===void 0&&n.removeValue(o);return a}const Yv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class fN{scrapeMotionValuesFromProps(a,i,o){return{}}constructor({parent:a,props:i,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:u,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=ch,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const T=Wn.now();this.renderScheduledAt<T&&(this.renderScheduledAt=T,at.render(this.render,!1,!0))};const{latestValues:m,renderState:g,onUpdate:y}=d;this.onUpdate=y,this.latestValues=m,this.baseTarget={...m},this.initialValues=i.initial?{...m}:{},this.renderState=g,this.parent=a,this.props=i,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=r,this.options=p,this.blockInitialAnimation=!!u,this.isControllingVariants=ac(i),this.isVariantNode=X0(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:v,..._}=this.scrapeMotionValuesFromProps(i,{},this);for(const T in _){const E=_[T];m[T]!==void 0&&Kt(E)&&E.set(m[T],!1)}}mount(a){this.current=a,$v.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,o)=>this.bindToMotionValue(o,i)),y1.current||rN(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:pf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){$v.delete(this.current),this.projection&&this.projection.unmount(),ss(this.notifyUpdate),ss(this.render),this.valueSubscriptions.forEach(a=>a()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const a in this.events)this.events[a].clear();for(const a in this.features){const i=this.features[a];i&&(i.unmount(),i.isMounted=!1)}this.current=null}bindToMotionValue(a,i){this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)();const o=zs.has(a),r=i.on("change",p=>{this.latestValues[a]=p,this.props.onUpdate&&at.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),u=i.on("renderRequest",this.scheduleRender);let d;window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,a,i)),this.valueSubscriptions.set(a,()=>{r(),u(),d&&d(),i.owner&&i.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in Mi){const i=Mi[a];if(!i)continue;const{isEnabled:o,Feature:r}=i;if(!this.features[a]&&r&&o(this.props)&&(this.features[a]=new r(this)),this.features[a]){const u=this.features[a];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_t()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,i){this.latestValues[a]=i}update(a,i){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let o=0;o<Yv.length;o++){const r=Yv[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const u="on"+r,d=a[u];d&&(this.propEventSubscriptions[r]=this.on(r,d))}this.prevMotionValues=dN(this,this.scrapeMotionValuesFromProps(a,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]: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(a){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(a),()=>i.variantChildren.delete(a)}addValue(a,i){const o=this.values.get(a);i!==o&&(o&&this.removeValue(a),this.bindToMotionValue(a,i),this.values.set(a,i),this.latestValues[a]=i.get())}removeValue(a){this.values.delete(a);const i=this.valueSubscriptions.get(a);i&&(i(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,i){if(this.props.values&&this.props.values[a])return this.props.values[a];let o=this.values.get(a);return o===void 0&&i!==void 0&&(o=Jl(i===null?void 0:i,{owner:this}),this.addValue(a,o)),o}readValue(a,i){var o;let r=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:(o=this.getBaseTargetFromProps(this.props,a))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,a,this.options);return r!=null&&(typeof r=="string"&&(Bb(r)||Ab(r))?r=parseFloat(r):!uN(r)&&is.test(i)&&(r=Mb(a,i)),this.setBaseTarget(a,Kt(r)?r.get():r)),Kt(r)?r.get():r}setBaseTarget(a,i){this.baseTarget[a]=i}getBaseTarget(a){var i;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const d=Gf(this.props,o,(i=this.presenceContext)===null||i===void 0?void 0:i.custom);d&&(r=d[a])}if(o&&r!==void 0)return r;const u=this.getBaseTargetFromProps(this.props,a);return u!==void 0&&!Kt(u)?u:this.initialValues[a]!==void 0&&r===void 0?void 0:this.baseTarget[a]}on(a,i){return this.events[a]||(this.events[a]=new eh),this.events[a].add(i)}notify(a,...i){this.events[a]&&this.events[a].notify(...i)}}class v1 extends fN{constructor(){super(...arguments),this.KeyframeResolver=Vb}sortInstanceNodePosition(a,i){return a.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(a,i){return a.style?a.style[i]:void 0}removeValueFromRenderState(a,{vars:i,style:o}){delete i[a],delete o[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;Kt(a)&&(this.childSubscription=a.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function hN(n){return window.getComputedStyle(n)}class pN extends v1{constructor(){super(...arguments),this.type="html",this.renderInstance=ib}readValueFromInstance(a,i){if(zs.has(i)){const o=rh(i);return o&&o.default||0}else{const o=hN(a),r=(nb(i)?o.getPropertyValue(i):o[i])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(a,{transformPagePoint:i}){return s1(a,i)}build(a,i,o){$f(a,i,o.transformTemplate)}scrapeMotionValuesFromProps(a,i,o){return Xf(a,i,o)}}class mN extends v1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_t}getBaseTargetFromProps(a,i){return a[i]}readValueFromInstance(a,i){if(zs.has(i)){const o=rh(i);return o&&o.default||0}return i=lb.has(i)?i:If(i),a.getAttribute(i)}scrapeMotionValuesFromProps(a,i,o){return cb(a,i,o)}build(a,i,o){Yf(a,i,this.isSVGTag,o.transformTemplate)}renderInstance(a,i,o,r){ob(a,i,o,r)}mount(a){this.isSVGTag=Zf(a.tagName),super.mount(a)}}const gN=(n,a)=>Pf(n)?new mN(a):new pN(a,{allowProjection:n!==S.Fragment}),yN=PC({...Rj,...lN,...G2,...oN},gN),Rn=aC(yN);var ht;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.TEXT=1]="TEXT",n[n.TOOL_USE=2]="TOOL_USE",n[n.TOOL_RESULT=3]="TOOL_RESULT",n[n.ERROR=4]="ERROR",n[n.STATUS=5]="STATUS",n[n.SYSTEM=6]="SYSTEM",n[n.FINDING=7]="FINDING",n[n.SUBTASK_CREATE=8]="SUBTASK_CREATE",n[n.USER_INPUT=9]="USER_INPUT"})(ht||(ht={}));var wt;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.NOT_STARTED=1]="NOT_STARTED",n[n.WORKING=3]="WORKING",n[n.PAUSED=4]="PAUSED",n[n.COMPLETE=5]="COMPLETE",n[n.FAILED=6]="FAILED"})(wt||(wt={}));var es;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ACTIVE=1]="ACTIVE",n[n.ARCHIVED=2]="ARCHIVED"})(es||(es={}));var ts;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"})(ts||(ts={}));var Kn;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.SUBSCRIPTION=2]="SUBSCRIPTION",n[n.API_KEY=3]="API_KEY"})(Kn||(Kn={}));var ns;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.ON=2]="ON"})(ns||(ns={}));const vN=8;Object.assign(Object.create(null),{"":ht.UNSPECIFIED,text:ht.TEXT,tool_use:ht.TOOL_USE,tool_result:ht.TOOL_RESULT,error:ht.ERROR,status:ht.STATUS,system:ht.SYSTEM,finding:ht.FINDING,subtask_create:ht.SUBTASK_CREATE,user_input:ht.USER_INPUT});ht.UNSPECIFIED+"",ht.TEXT+"",ht.TOOL_USE+"",ht.TOOL_RESULT+"",ht.ERROR+"",ht.STATUS+"",ht.SYSTEM+"",ht.FINDING+"",ht.SUBTASK_CREATE+"",ht.USER_INPUT+"";Object.assign(Object.create(null),{"":wt.UNSPECIFIED,not_started:wt.NOT_STARTED,working:wt.WORKING,paused:wt.PAUSED,complete:wt.COMPLETE,failed:wt.FAILED,pending:wt.NOT_STARTED,assigned:wt.NOT_STARTED,in_progress:wt.WORKING,waiting_input:wt.PAUSED,review:wt.PAUSED,done:wt.COMPLETE});wt.UNSPECIFIED+"",wt.NOT_STARTED+"",wt.WORKING+"",wt.PAUSED+"",wt.COMPLETE+"",wt.FAILED+"";Object.assign(Object.create(null),{"":es.UNSPECIFIED,active:es.ACTIVE,archived:es.ARCHIVED});es.UNSPECIFIED+"",es.ACTIVE+"",es.ARCHIVED+"";Object.assign(Object.create(null),{"":ts.UNSPECIFIED,open:ts.OPEN,closed:ts.CLOSED});ts.UNSPECIFIED+"",ts.OPEN+"",ts.CLOSED+"";Object.assign(Object.create(null),{"":Kn.UNSPECIFIED,off:Kn.OFF,subscription:Kn.SUBSCRIPTION,api_key:Kn.API_KEY});Kn.UNSPECIFIED+"",Kn.OFF+"",Kn.SUBSCRIPTION+"",Kn.API_KEY+"";Object.assign(Object.create(null),{"":ns.UNSPECIFIED,off:ns.OFF,on:ns.ON});ns.UNSPECIFIED+"",ns.OFF+"",ns.ON+"";function Na(n){return Array.isArray?Array.isArray(n):_1(n)==="[object Array]"}function bN(n){if(typeof n=="string")return n;let a=n+"";return a=="0"&&1/n==-1/0?"-0":a}function SN(n){return n==null?"":bN(n)}function Zn(n){return typeof n=="string"}function b1(n){return typeof n=="number"}function _N(n){return n===!0||n===!1||xN(n)&&_1(n)=="[object Boolean]"}function S1(n){return typeof n=="object"}function xN(n){return S1(n)&&n!==null}function yn(n){return n!=null}function Hd(n){return!n.trim().length}function _1(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const TN="Incorrect 'index' type",EN=n=>`Invalid value for key ${n}`,CN=n=>`Pattern length exceeds max of ${n}.`,AN=n=>`Missing ${n} property in key`,jN=n=>`Property 'weight' in key '${n}' must be a positive integer`,Kv=Object.prototype.hasOwnProperty;class NN{constructor(a){this._keys=[],this._keyMap={};let i=0;a.forEach(o=>{let r=x1(o);this._keys.push(r),this._keyMap[r.id]=r,i+=r.weight}),this._keys.forEach(o=>{o.weight/=i})}get(a){return this._keyMap[a]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function x1(n){let a=null,i=null,o=null,r=1,u=null;if(Zn(n)||Na(n))o=n,a=Zv(n),i=mf(n);else{if(!Kv.call(n,"name"))throw new Error(AN("name"));const d=n.name;if(o=d,Kv.call(n,"weight")&&(r=n.weight,r<=0))throw new Error(jN(d));a=Zv(d),i=mf(d),u=n.getFn}return{path:a,id:i,weight:r,src:o,getFn:u}}function Zv(n){return Na(n)?n:n.split(".")}function mf(n){return Na(n)?n.join("."):n}function wN(n,a){let i=[],o=!1;const r=(u,d,p)=>{if(yn(u))if(!d[p])i.push(u);else{let m=d[p];const g=u[m];if(!yn(g))return;if(p===d.length-1&&(Zn(g)||b1(g)||_N(g)))i.push(SN(g));else if(Na(g)){o=!0;for(let y=0,v=g.length;y<v;y+=1)r(g[y],d,p+1)}else d.length&&r(g,d,p+1)}};return r(n,Zn(a)?a.split("."):a,0),o?i:i[0]}const DN={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},kN={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,a)=>n.score===a.score?n.idx<a.idx?-1:1:n.score<a.score?-1:1},MN={location:0,threshold:.6,distance:100},RN={useExtendedSearch:!1,getFn:wN,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var ve={...kN,...DN,...MN,...RN};const ON=/[^ ]+/g;function BN(n=1,a=3){const i=new Map,o=Math.pow(10,a);return{get(r){const u=r.match(ON).length;if(i.has(u))return i.get(u);const d=1/Math.pow(u,.5*n),p=parseFloat(Math.round(d*o)/o);return i.set(u,p),p},clear(){i.clear()}}}class ph{constructor({getFn:a=ve.getFn,fieldNormWeight:i=ve.fieldNormWeight}={}){this.norm=BN(i,3),this.getFn=a,this.isCreated=!1,this.setIndexRecords()}setSources(a=[]){this.docs=a}setIndexRecords(a=[]){this.records=a}setKeys(a=[]){this.keys=a,this._keysMap={},a.forEach((i,o)=>{this._keysMap[i.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Zn(this.docs[0])?this.docs.forEach((a,i)=>{this._addString(a,i)}):this.docs.forEach((a,i)=>{this._addObject(a,i)}),this.norm.clear())}add(a){const i=this.size();Zn(a)?this._addString(a,i):this._addObject(a,i)}removeAt(a){this.records.splice(a,1);for(let i=a,o=this.size();i<o;i+=1)this.records[i].i-=1}getValueForItemAtKeyId(a,i){return a[this._keysMap[i]]}size(){return this.records.length}_addString(a,i){if(!yn(a)||Hd(a))return;let o={v:a,i,n:this.norm.get(a)};this.records.push(o)}_addObject(a,i){let o={i,$:{}};this.keys.forEach((r,u)=>{let d=r.getFn?r.getFn(a):this.getFn(a,r.path);if(yn(d)){if(Na(d)){let p=[];const m=[{nestedArrIndex:-1,value:d}];for(;m.length;){const{nestedArrIndex:g,value:y}=m.pop();if(yn(y))if(Zn(y)&&!Hd(y)){let v={v:y,i:g,n:this.norm.get(y)};p.push(v)}else Na(y)&&y.forEach((v,_)=>{m.push({nestedArrIndex:_,value:v})})}o.$[u]=p}else if(Zn(d)&&!Hd(d)){let p={v:d,n:this.norm.get(d)};o.$[u]=p}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function T1(n,a,{getFn:i=ve.getFn,fieldNormWeight:o=ve.fieldNormWeight}={}){const r=new ph({getFn:i,fieldNormWeight:o});return r.setKeys(n.map(x1)),r.setSources(a),r.create(),r}function LN(n,{getFn:a=ve.getFn,fieldNormWeight:i=ve.fieldNormWeight}={}){const{keys:o,records:r}=n,u=new ph({getFn:a,fieldNormWeight:i});return u.setKeys(o),u.setIndexRecords(r),u}function jr(n,{errors:a=0,currentLocation:i=0,expectedLocation:o=0,distance:r=ve.distance,ignoreLocation:u=ve.ignoreLocation}={}){const d=a/n.length;if(u)return d;const p=Math.abs(o-i);return r?d+p/r:p?1:d}function UN(n=[],a=ve.minMatchCharLength){let i=[],o=-1,r=-1,u=0;for(let d=n.length;u<d;u+=1){let p=n[u];p&&o===-1?o=u:!p&&o!==-1&&(r=u-1,r-o+1>=a&&i.push([o,r]),o=-1)}return n[u-1]&&u-o>=a&&i.push([o,u-1]),i}const Ms=32;function zN(n,a,i,{location:o=ve.location,distance:r=ve.distance,threshold:u=ve.threshold,findAllMatches:d=ve.findAllMatches,minMatchCharLength:p=ve.minMatchCharLength,includeMatches:m=ve.includeMatches,ignoreLocation:g=ve.ignoreLocation}={}){if(a.length>Ms)throw new Error(CN(Ms));const y=a.length,v=n.length,_=Math.max(0,Math.min(o,v));let T=u,E=_;const A=p>1||m,j=A?Array(v):[];let C;for(;(C=n.indexOf(a,E))>-1;){let Q=jr(a,{currentLocation:C,expectedLocation:_,distance:r,ignoreLocation:g});if(T=Math.min(Q,T),E=C+y,A){let I=0;for(;I<y;)j[C+I]=1,I+=1}}E=-1;let w=[],M=1,G=y+v;const V=1<<y-1;for(let Q=0;Q<y;Q+=1){let I=0,te=G;for(;I<te;)jr(a,{errors:Q,currentLocation:_+te,expectedLocation:_,distance:r,ignoreLocation:g})<=T?I=te:G=te,te=Math.floor((G-I)/2+I);G=te;let se=Math.max(1,_-te+1),O=d?v:Math.min(_+te,v)+y,ne=Array(O+2);ne[O+1]=(1<<Q)-1;for(let he=O;he>=se;he-=1){let P=he-1,U=i[n.charAt(P)];if(A&&(j[P]=+!!U),ne[he]=(ne[he+1]<<1|1)&U,Q&&(ne[he]|=(w[he+1]|w[he])<<1|1|w[he+1]),ne[he]&V&&(M=jr(a,{errors:Q,currentLocation:P,expectedLocation:_,distance:r,ignoreLocation:g}),M<=T)){if(T=M,E=P,E<=_)break;se=Math.max(1,2*_-E)}}if(jr(a,{errors:Q+1,currentLocation:_,expectedLocation:_,distance:r,ignoreLocation:g})>T)break;w=ne}const X={isMatch:E>=0,score:Math.max(.001,M)};if(A){const Q=UN(j,p);Q.length?m&&(X.indices=Q):X.isMatch=!1}return X}function VN(n){let a={};for(let i=0,o=n.length;i<o;i+=1){const r=n.charAt(i);a[r]=(a[r]||0)|1<<o-i-1}return a}const Fr=String.prototype.normalize?(n=>n.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(n=>n);class E1{constructor(a,{location:i=ve.location,threshold:o=ve.threshold,distance:r=ve.distance,includeMatches:u=ve.includeMatches,findAllMatches:d=ve.findAllMatches,minMatchCharLength:p=ve.minMatchCharLength,isCaseSensitive:m=ve.isCaseSensitive,ignoreDiacritics:g=ve.ignoreDiacritics,ignoreLocation:y=ve.ignoreLocation}={}){if(this.options={location:i,threshold:o,distance:r,includeMatches:u,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:g,ignoreLocation:y},a=m?a:a.toLowerCase(),a=g?Fr(a):a,this.pattern=a,this.chunks=[],!this.pattern.length)return;const v=(T,E)=>{this.chunks.push({pattern:T,alphabet:VN(T),startIndex:E})},_=this.pattern.length;if(_>Ms){let T=0;const E=_%Ms,A=_-E;for(;T<A;)v(this.pattern.substr(T,Ms),T),T+=Ms;if(E){const j=_-Ms;v(this.pattern.substr(j),j)}}else v(this.pattern,0)}searchIn(a){const{isCaseSensitive:i,ignoreDiacritics:o,includeMatches:r}=this.options;if(a=i?a:a.toLowerCase(),a=o?Fr(a):a,this.pattern===a){let A={isMatch:!0,score:0};return r&&(A.indices=[[0,a.length-1]]),A}const{location:u,distance:d,threshold:p,findAllMatches:m,minMatchCharLength:g,ignoreLocation:y}=this.options;let v=[],_=0,T=!1;this.chunks.forEach(({pattern:A,alphabet:j,startIndex:C})=>{const{isMatch:w,score:M,indices:G}=zN(a,A,j,{location:u+C,distance:d,threshold:p,findAllMatches:m,minMatchCharLength:g,includeMatches:r,ignoreLocation:y});w&&(T=!0),_+=M,w&&G&&(v=[...v,...G])});let E={isMatch:T,score:T?_/this.chunks.length:1};return T&&r&&(E.indices=v),E}}class cs{constructor(a){this.pattern=a}static isMultiMatch(a){return Xv(a,this.multiRegex)}static isSingleMatch(a){return Xv(a,this.singleRegex)}search(){}}function Xv(n,a){const i=n.match(a);return i?i[1]:null}class IN extends cs{constructor(a){super(a)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(a){const i=a===this.pattern;return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class HN extends cs{constructor(a){super(a)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(a){const o=a.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,a.length-1]}}}class PN extends cs{constructor(a){super(a)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(a){const i=a.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class GN extends cs{constructor(a){super(a)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(a){const i=!a.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,a.length-1]}}}class qN extends cs{constructor(a){super(a)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(a){const i=a.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[a.length-this.pattern.length,a.length-1]}}}class FN extends cs{constructor(a){super(a)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(a){const i=!a.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,a.length-1]}}}class C1 extends cs{constructor(a,{location:i=ve.location,threshold:o=ve.threshold,distance:r=ve.distance,includeMatches:u=ve.includeMatches,findAllMatches:d=ve.findAllMatches,minMatchCharLength:p=ve.minMatchCharLength,isCaseSensitive:m=ve.isCaseSensitive,ignoreDiacritics:g=ve.ignoreDiacritics,ignoreLocation:y=ve.ignoreLocation}={}){super(a),this._bitapSearch=new E1(a,{location:i,threshold:o,distance:r,includeMatches:u,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:g,ignoreLocation:y})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(a){return this._bitapSearch.searchIn(a)}}class A1 extends cs{constructor(a){super(a)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(a){let i=0,o;const r=[],u=this.pattern.length;for(;(o=a.indexOf(this.pattern,i))>-1;)i=o+u,r.push([o,i-1]);const d=!!r.length;return{isMatch:d,score:d?0:1,indices:r}}}const gf=[IN,A1,PN,GN,FN,qN,HN,C1],Qv=gf.length,$N=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,YN="|";function KN(n,a={}){return n.split(YN).map(i=>{let o=i.trim().split($N).filter(u=>u&&!!u.trim()),r=[];for(let u=0,d=o.length;u<d;u+=1){const p=o[u];let m=!1,g=-1;for(;!m&&++g<Qv;){const y=gf[g];let v=y.isMultiMatch(p);v&&(r.push(new y(v,a)),m=!0)}if(!m)for(g=-1;++g<Qv;){const y=gf[g];let v=y.isSingleMatch(p);if(v){r.push(new y(v,a));break}}}return r})}const ZN=new Set([C1.type,A1.type]);class XN{constructor(a,{isCaseSensitive:i=ve.isCaseSensitive,ignoreDiacritics:o=ve.ignoreDiacritics,includeMatches:r=ve.includeMatches,minMatchCharLength:u=ve.minMatchCharLength,ignoreLocation:d=ve.ignoreLocation,findAllMatches:p=ve.findAllMatches,location:m=ve.location,threshold:g=ve.threshold,distance:y=ve.distance}={}){this.query=null,this.options={isCaseSensitive:i,ignoreDiacritics:o,includeMatches:r,minMatchCharLength:u,findAllMatches:p,ignoreLocation:d,location:m,threshold:g,distance:y},a=i?a:a.toLowerCase(),a=o?Fr(a):a,this.pattern=a,this.query=KN(this.pattern,this.options)}static condition(a,i){return i.useExtendedSearch}searchIn(a){const i=this.query;if(!i)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:r,ignoreDiacritics:u}=this.options;a=r?a:a.toLowerCase(),a=u?Fr(a):a;let d=0,p=[],m=0;for(let g=0,y=i.length;g<y;g+=1){const v=i[g];p.length=0,d=0;for(let _=0,T=v.length;_<T;_+=1){const E=v[_],{isMatch:A,indices:j,score:C}=E.search(a);if(A){if(d+=1,m+=C,o){const w=E.constructor.type;ZN.has(w)?p=[...p,...j]:p.push(j)}}else{m=0,d=0,p.length=0;break}}if(d){let _={isMatch:!0,score:m/d};return o&&(_.indices=p),_}}return{isMatch:!1,score:1}}}const yf=[];function QN(...n){yf.push(...n)}function vf(n,a){for(let i=0,o=yf.length;i<o;i+=1){let r=yf[i];if(r.condition(n,a))return new r(n,a)}return new E1(n,a)}const $r={AND:"$and",OR:"$or"},bf={PATH:"$path",PATTERN:"$val"},Sf=n=>!!(n[$r.AND]||n[$r.OR]),JN=n=>!!n[bf.PATH],WN=n=>!Na(n)&&S1(n)&&!Sf(n),Jv=n=>({[$r.AND]:Object.keys(n).map(a=>({[a]:n[a]}))});function j1(n,a,{auto:i=!0}={}){const o=r=>{let u=Object.keys(r);const d=JN(r);if(!d&&u.length>1&&!Sf(r))return o(Jv(r));if(WN(r)){const m=d?r[bf.PATH]:u[0],g=d?r[bf.PATTERN]:r[m];if(!Zn(g))throw new Error(EN(m));const y={keyId:mf(m),pattern:g};return i&&(y.searcher=vf(g,a)),y}let p={children:[],operator:u[0]};return u.forEach(m=>{const g=r[m];Na(g)&&g.forEach(y=>{p.children.push(o(y))})}),p};return Sf(n)||(n=Jv(n)),o(n)}function ew(n,{ignoreFieldNorm:a=ve.ignoreFieldNorm}){n.forEach(i=>{let o=1;i.matches.forEach(({key:r,norm:u,score:d})=>{const p=r?r.weight:null;o*=Math.pow(d===0&&p?Number.EPSILON:d,(p||1)*(a?1:u))}),i.score=o})}function tw(n,a){const i=n.matches;a.matches=[],yn(i)&&i.forEach(o=>{if(!yn(o.indices)||!o.indices.length)return;const{indices:r,value:u}=o;let d={indices:r,value:u};o.key&&(d.key=o.key.src),o.idx>-1&&(d.refIndex=o.idx),a.matches.push(d)})}function nw(n,a){a.score=n.score}function aw(n,a,{includeMatches:i=ve.includeMatches,includeScore:o=ve.includeScore}={}){const r=[];return i&&r.push(tw),o&&r.push(nw),n.map(u=>{const{idx:d}=u,p={item:a[d],refIndex:d};return r.length&&r.forEach(m=>{m(u,p)}),p})}class Vi{constructor(a,i={},o){this.options={...ve,...i},this.options.useExtendedSearch,this._keyStore=new NN(this.options.keys),this.setCollection(a,o)}setCollection(a,i){if(this._docs=a,i&&!(i instanceof ph))throw new Error(TN);this._myIndex=i||T1(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(a){yn(a)&&(this._docs.push(a),this._myIndex.add(a))}remove(a=()=>!1){const i=[];for(let o=0,r=this._docs.length;o<r;o+=1){const u=this._docs[o];a(u,o)&&(this.removeAt(o),o-=1,r-=1,i.push(u))}return i}removeAt(a){this._docs.splice(a,1),this._myIndex.removeAt(a)}getIndex(){return this._myIndex}search(a,{limit:i=-1}={}){const{includeMatches:o,includeScore:r,shouldSort:u,sortFn:d,ignoreFieldNorm:p}=this.options;let m=Zn(a)?Zn(this._docs[0])?this._searchStringList(a):this._searchObjectList(a):this._searchLogical(a);return ew(m,{ignoreFieldNorm:p}),u&&m.sort(d),b1(i)&&i>-1&&(m=m.slice(0,i)),aw(m,this._docs,{includeMatches:o,includeScore:r})}_searchStringList(a){const i=vf(a,this.options),{records:o}=this._myIndex,r=[];return o.forEach(({v:u,i:d,n:p})=>{if(!yn(u))return;const{isMatch:m,score:g,indices:y}=i.searchIn(u);m&&r.push({item:u,idx:d,matches:[{score:g,value:u,norm:p,indices:y}]})}),r}_searchLogical(a){const i=j1(a,this.options),o=(p,m,g)=>{if(!p.children){const{keyId:v,searcher:_}=p,T=this._findMatches({key:this._keyStore.get(v),value:this._myIndex.getValueForItemAtKeyId(m,v),searcher:_});return T&&T.length?[{idx:g,item:m,matches:T}]:[]}const y=[];for(let v=0,_=p.children.length;v<_;v+=1){const T=p.children[v],E=o(T,m,g);if(E.length)y.push(...E);else if(p.operator===$r.AND)return[]}return y},r=this._myIndex.records,u={},d=[];return r.forEach(({$:p,i:m})=>{if(yn(p)){let g=o(i,p,m);g.length&&(u[m]||(u[m]={idx:m,item:p,matches:[]},d.push(u[m])),g.forEach(({matches:y})=>{u[m].matches.push(...y)}))}}),d}_searchObjectList(a){const i=vf(a,this.options),{keys:o,records:r}=this._myIndex,u=[];return r.forEach(({$:d,i:p})=>{if(!yn(d))return;let m=[];o.forEach((g,y)=>{m.push(...this._findMatches({key:g,value:d[y],searcher:i}))}),m.length&&u.push({idx:p,item:d,matches:m})}),u}_findMatches({key:a,value:i,searcher:o}){if(!yn(i))return[];let r=[];if(Na(i))i.forEach(({v:u,i:d,n:p})=>{if(!yn(u))return;const{isMatch:m,score:g,indices:y}=o.searchIn(u);m&&r.push({score:g,key:a,value:u,idx:d,norm:p,indices:y})});else{const{v:u,n:d}=i,{isMatch:p,score:m,indices:g}=o.searchIn(u);p&&r.push({score:m,key:a,value:u,norm:d,indices:g})}return r}}Vi.version="7.1.0";Vi.createIndex=T1;Vi.parseIndex=LN;Vi.config=ve;Vi.parseQuery=j1;QN(XN);function Wv(n,a,i,o){if(!a.trim())return[];const r=.3;return new Vi(n,{keys:i,threshold:r,ignoreLocation:!0,includeScore:!0,includeMatches:!0,minMatchCharLength:2}).search(a).map(m=>({item:m.item,score:m.score??1,matches:(m.matches??[]).map(g=>({key:g.key??"",indices:g.indices}))}))}const sw="_breadcrumbs_17or2_1",iw="_list_17or2_11",lw="_item_17or2_21",ow="_separator_17or2_28",rw="_link_17or2_34",cw="_current_17or2_57",Ei={breadcrumbs:sw,list:iw,item:lw,separator:ow,link:rw,current:cw},uw="›";function Ii({segments:n}){return h.jsx("nav",{className:Ei.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:h.jsx("ol",{className:Ei.list,children:n.map((a,i)=>{const o=i===n.length-1;return h.jsxs("li",{className:Ei.item,children:[i>0&&h.jsx("span",{className:Ei.separator,"aria-hidden":"true",children:uw}),a.url&&!o?h.jsx(kf,{className:Ei.link,to:a.url,title:a.label,children:a.label}):h.jsx("span",{className:Ei.current,"aria-current":"page",title:a.label,children:a.label})]},i)})})})}function _f(){_f=function(r,u){return new i(r,void 0,u)};var n=RegExp.prototype,a=new WeakMap;function i(r,u,d){var p=new RegExp(r,u);return a.set(p,d||a.get(r)),Yr(p,i.prototype)}function o(r,u){var d=a.get(u);return Object.keys(d).reduce(function(p,m){var g=d[m];if(typeof g=="number")p[m]=r[g];else{for(var y=0;r[g[y]]===void 0&&y+1<g.length;)y++;p[m]=r[g[y]]}return p},Object.create(null))}return(function(r,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(u&&u.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),u&&Yr(r,u)})(i,RegExp),i.prototype.exec=function(r){var u=n.exec.call(this,r);if(u){u.groups=o(u,this);var d=u.indices;d&&(d.groups=o(d,this))}return u},i.prototype[Symbol.replace]=function(r,u){if(typeof u=="string"){var d=a.get(this);return n[Symbol.replace].call(this,r,u.replace(/\$<([^>]+)>/g,function(m,g){var y=d[g];return"$"+(Array.isArray(y)?y.join("$"):y)}))}if(typeof u=="function"){var p=this;return n[Symbol.replace].call(this,r,function(){var m=arguments;return typeof m[m.length-1]!="object"&&(m=[].slice.call(m)).push(o(m,p)),u.apply(this,m)})}return n[Symbol.replace].call(this,r,u)},_f.apply(this,arguments)}function Yr(n,a){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},Yr(n,a)}function e0(n,a){(a==null||a>n.length)&&(a=n.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=n[i];return o}function Pd(n,a){var i=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i)return(i=i.call(n)).next.bind(i);if(Array.isArray(n)||(i=(function(r,u){if(r){if(typeof r=="string")return e0(r,u);var d=Object.prototype.toString.call(r).slice(8,-1);return d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set"?Array.from(r):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?e0(r,u):void 0}})(n))||a){i&&(n=i);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
87
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var dw=(function(n){return function(a){return a===void 0&&(a={}),(function(o,r){if(r&&!o.registered(r))throw new Error('The default language "'+r+'" is not registered with refractor.')})(n,a.defaultLanguage),function(o){J_(o,"element",i)};function i(o,r,u){var d,p;if(u&&u.tagName==="pre"&&o.tagName==="code"){var m=(o==null||(d=o.data)==null?void 0:d.meta)||(o==null||(p=o.properties)==null?void 0:p.metastring)||"";o.properties.className?typeof o.properties.className=="boolean"?o.properties.className=[]:Array.isArray(o.properties.className)||(o.properties.className=[o.properties.className]):o.properties.className=[];var g,y,v=(function(V){for(var X,Q=Pd(V.properties.className);!(X=Q()).done;){var I=X.value;if(I.slice(0,9)==="language-")return I.slice(9).toLowerCase()}return null})(o);if(!v&&a.defaultLanguage&&o.properties.className.push("language-"+(v=a.defaultLanguage)),o.properties.className.push("code-highlight"),v)try{var _,T;T=(_=v)!=null&&_.includes("diff-")?v.split("-")[1]:v,g=n.highlight(_r(o),T),u.properties.className=(u.properties.className||[]).concat("language-"+T)}catch(V){if(!a.ignoreMissing||!/Unknown language/.test(V.message))throw V;g=o}else g=o;g.children=(y=1,function V(X){return X.reduce(function(Q,I){if(I.type==="text"){var te=I.value,se=(te.match(/\n/g)||"").length;if(se===0)I.position={start:{line:y,column:1},end:{line:y,column:1}},Q.push(I);else for(var O,ne=te.split(`
|
|
88
|
+
`),W=Pd(ne.entries());!(O=W()).done;){var he=O.value,P=he[0],U=he[1];Q.push({type:"text",value:P===ne.length-1?U:U+`
|
|
89
|
+
`,position:{start:{line:y+P,column:1},end:{line:y+P,column:1}}})}return y+=se,Q}if(Object.prototype.hasOwnProperty.call(I,"children")){var K=y;return I.children=V(I.children),Q.push(I),I.position={start:{line:K,column:1},end:{line:y,column:1}},Q}return Q.push(I),Q},[])})(g.children),g.position=g.children.length>0?{start:{line:g.children[0].position.start.line,column:0},end:{line:g.children[g.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var E,A=(function(V){var X=/{([\d,-]+)}/,Q=V.split(",").map(function(se){return se.trim()}).join();if(X.test(Q)){var I=X.exec(Q)[1],te=ex(I);return function(se){return te.includes(se+1)}}return function(){return!1}})(m),j=(function(V){var X=_f(/showLineNumbers=(\d+)/i,{lines:1});if(X.test(V)){var Q=X.exec(V);return Number(Q.groups.lines)}return 1})(m),C=(function(V){for(var X=new Array(V),Q=0;Q<V;Q++)X[Q]={type:"element",tagName:"span",properties:{className:[]},children:[]};return X})(g.position.end.line),w=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],M=function(){var V,X,Q=E.value,I=Q[0],te=Q[1];te.properties.className=["code-line"];var se=tx(g,function(O){return O.position.start.line<=I+1&&O.position.end.line>=I+1});te.children=se.children,(m.toLowerCase().includes("showLineNumbers".toLowerCase())||a.showLineNumbers===!0||typeof a.showLineNumbers=="object"&&a.showLineNumbers.includes(v))&&!w.some(function(O){return m.toLowerCase().includes(O)})&&(te.properties.line=[(I+j).toString()],te.properties.className.push("line-number")),A(I)&&te.properties.className.push("highlight-line"),(v==="diff"||(V=v)!=null&&V.includes("diff-"))&&_r(te).substring(0,1)==="-"?te.properties.className.push("deleted"):(v==="diff"||(X=v)!=null&&X.includes("diff-"))&&_r(te).substring(0,1)==="+"&&te.properties.className.push("inserted")},G=Pd(C.entries());!(E=G()).done;)M();C.length>0&&_r(C[C.length-1]).trim()===""&&C.pop(),o.children=C}}}})(W_);const fw="_systemEvent_qvd33_1",hw="_systemTimestamp_qvd33_9",pw="_textEvent_qvd33_13",mw="_toolUseEvent_qvd33_100",gw="_toolUseHeader_qvd33_121",yw="_toolUsePrefix_qvd33_128",vw="_toolUseName_qvd33_133",bw="_toolUseArgs_qvd33_138",Sw="_toolResultEvent_qvd33_149",_w="_toolResultHeader_qvd33_155",xw="_toolResultIndicatorOk_qvd33_179",Tw="_toolResultIndicatorError_qvd33_186",Ew="_toolResultLabel_qvd33_193",Cw="_toolResultToggle_qvd33_197",Aw="_toolResultCommand_qvd33_203",jw="_toolResultEllipsis_qvd33_213",Nw="_toolResultPre_qvd33_217",ww="_errorEvent_qvd33_238",Dw="_statusEvent_qvd33_247",kw="_userInputEvent_qvd33_257",Mw="_userInputContent_qvd33_264",Rw="_defaultEvent_qvd33_281",rt={systemEvent:fw,systemTimestamp:hw,textEvent:pw,toolUseEvent:mw,toolUseHeader:gw,toolUsePrefix:yw,toolUseName:vw,toolUseArgs:bw,toolResultEvent:Sw,toolResultHeader:_w,toolResultIndicatorOk:xw,toolResultIndicatorError:Tw,toolResultLabel:Ew,toolResultToggle:Cw,toolResultCommand:Aw,toolResultEllipsis:jw,toolResultPre:Nw,errorEvent:ww,statusEvent:Dw,userInputEvent:kw,userInputContent:Mw,defaultEvent:Rw};function Ow({time:n,content:a}){return h.jsxs("div",{className:rt.systemEvent,children:[h.jsxs("span",{className:rt.systemTimestamp,children:["[",n,"]"]})," ",a]})}function Bw({content:n}){return h.jsx("div",{className:rt.textEvent,children:h.jsx(Tf,{remarkPlugins:[Ef],rehypePlugins:[dw],children:n})})}function Lw({content:n}){let a="",i=n;try{const o=JSON.parse(n);a=o.tool||"",i=JSON.stringify(o.args,null,2)}catch{}return h.jsxs("div",{className:rt.toolUseEvent,children:[h.jsxs("div",{className:rt.toolUseHeader,children:[h.jsx("span",{className:rt.toolUsePrefix,children:">"}),a?h.jsx("span",{className:rt.toolUseName,children:a}):null]}),h.jsx("pre",{className:rt.toolUseArgs,children:i})]})}const t0=5;function Uw(n,a){if(a==null)return"";if(typeof a!="object")return String(a);const i=a;if(typeof i.command=="string")return i.command;if(typeof i.file_path=="string")return i.file_path;if(typeof i.pattern=="string"){const o=typeof i.path=="string"?` in ${i.path}`:"";return`${i.pattern}${o}`}if(typeof i.path=="string")return i.path;if(typeof i.query=="string")return i.query;try{const o=JSON.stringify(a);return o.length>150?`${o.slice(0,150)}…`:o}catch{return""}}function zw({content:n,raw:a,toolUseCtx:i}){const[o,r]=S.useState(!1);let u=!1;if(a)try{u=JSON.parse(a).is_error===!0}catch{}const d=n.split(`
|
|
90
|
+
`),p=d.length>t0,m=o?n:d.slice(0,t0).join(`
|
|
91
|
+
`),y=((i==null?void 0:i.tool)??"")||(u?"Tool error":"Tool output"),v=i?Uw(i.tool,i.args):"",_=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:u?rt.toolResultIndicatorError:rt.toolResultIndicatorOk,"aria-label":u?"error":"success",children:u?"✗":"✓"}),h.jsx("span",{className:rt.toolResultLabel,children:y}),p&&h.jsx("span",{className:rt.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return h.jsxs("div",{className:rt.toolResultEvent,children:[p?h.jsx("button",{className:rt.toolResultHeader,onClick:()=>{r(T=>!T)},"aria-expanded":o,children:_}):h.jsx("div",{className:rt.toolResultHeader,children:_}),v&&h.jsx("div",{className:rt.toolResultCommand,children:v}),h.jsxs("pre",{className:rt.toolResultPre,children:[m,!o&&p&&h.jsx("span",{className:rt.toolResultEllipsis,children:"…"})]})]})}function Vw({content:n}){return h.jsxs("div",{className:rt.errorEvent,children:["Error: ",n]})}function Iw({content:n}){return h.jsxs("div",{className:rt.statusEvent,children:["--- ",n," ---"]})}function Hw({content:n}){return h.jsx("div",{className:rt.userInputEvent,children:h.jsx("span",{className:rt.userInputContent,children:n})})}function Pw({content:n}){return h.jsx("div",{className:rt.defaultEvent,children:n})}function N1({event:n,toolUseCtx:a}){const i=new Date(n.timestamp).toLocaleTimeString();switch(n.eventType){case"system":return h.jsx(Ow,{time:i,content:n.content});case"text":case"output":return h.jsx(Bw,{content:n.content});case"tool_use":return h.jsx(Lw,{content:n.content});case"tool_result":return h.jsx(zw,{content:n.content,raw:n.raw,toolUseCtx:a});case"error":return h.jsx(Vw,{content:n.content});case"status":return h.jsx(Iw,{content:n.content});case"user_input":return h.jsx(Hw,{content:n.content});default:return h.jsx(Pw,{content:n.content})}}const Gw="_overlay_cmicx_1",qw="_dialog_cmicx_11",Fw="_title_cmicx_30",$w="_description_cmicx_38",Yw="_actions_cmicx_45",Kw="_cancelButton_cmicx_52",Zw="_confirmButton_cmicx_79",ws={overlay:Gw,dialog:qw,title:Fw,description:$w,actions:Yw,cancelButton:Kw,confirmButton:Zw};function lc({isOpen:n,title:a,description:i,confirmLabel:o="Delete",onConfirm:r,onCancel:u}){const d=S.useId(),p=S.useId();return h.jsx(os,{children:n&&h.jsx(Rn.div,{className:ws.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:u,onKeyDown:m=>{m.key==="Escape"&&u()},role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":i?p:void 0,children:h.jsxs(Rn.div,{className:ws.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:m=>m.stopPropagation(),children:[h.jsx("h3",{id:d,className:ws.title,children:a}),i&&h.jsx("p",{id:p,className:ws.description,children:i}),h.jsxs("div",{className:ws.actions,children:[h.jsx("button",{type:"button",className:ws.cancelButton,onClick:u,autoFocus:!0,children:"Cancel"}),h.jsx("button",{type:"button",className:ws.confirmButton,onClick:r,children:o})]})]})})})}const Xw="_spinner_13c8l_1",Qw="_spin_13c8l_1",Jw="_sm_13c8l_14",Ww="_md_13c8l_20",eD="_lg_13c8l_26",n0={spinner:Xw,spin:Qw,sm:Jw,md:Ww,lg:eD};function a0({size:n="md",className:a,label:i="Loading",liveRegion:o=!1}){return h.jsx("span",{className:`${n0.spinner} ${n0[n]} ${a??""}`,role:o?"status":void 0,"aria-label":i,"aria-hidden":o?void 0:!0})}const xf={not_started:{color:"var(--text-tertiary)",icon:"○",label:"Not Started"},working:{color:"var(--accent-green)",icon:"●",label:"Working"},paused:{color:"var(--accent-yellow)",icon:"◉",label:"Paused"},complete:{color:"var(--accent-green)",icon:"✓",label:"Complete"},failed:{color:"var(--accent-red)",icon:"✗",label:"Failed"},blocked:{color:"var(--accent-yellow)",icon:"⦸",label:"Blocked"}};function ls(n){return n==="blocked"?xf.blocked:xf[mh(n)]}const tD={not_started:"statusPending",working:"statusInProgress",paused:"statusWaitingInput",complete:"statusDone",failed:"statusFailed"};function nD(n){return tD[mh(n)]??"statusPending"}const aD=["working","paused","failed","not_started","blocked","complete"],s0=["not_started","working","paused","complete","failed"],sD={pending:"not_started",assigned:"not_started",in_progress:"working",waiting_input:"paused",review:"paused",done:"complete"};function mh(n){return n in xf&&n!=="blocked"?n:sD[n]??"not_started"}const iD={not_started:"--text-tertiary",working:"--accent-green",paused:"--accent-yellow",complete:"--accent-green",failed:"--accent-red",pending:"--text-tertiary",assigned:"--text-tertiary",in_progress:"--accent-green",review:"--accent-yellow",done:"--accent-green",waiting_input:"--accent-yellow"},lD="_container_15oob_1",oD="_header_15oob_5",rD="_searchInput_15oob_17",cD="_searchHighlight_15oob_50",uD="_addButton_15oob_56",dD="_createForm_15oob_83",fD="_createInput_15oob_89",hD="_createButton_15oob_120",pD="_creatingHint_15oob_161",mD="_projectRow_15oob_170",gD="_selected_15oob_188",yD="_expandArrow_15oob_193",vD="_expanded_15oob_200",bD="_projectName_15oob_204",SD="_taskCount_15oob_208",_D="_newTaskButton_15oob_214",xD="_taskRow_15oob_241",TD="_taskStatusIcon_15oob_271",ED="_taskTitle_15oob_275",CD="_dependencyBadge_15oob_282",AD="_blockedBadge_15oob_294",jD="_leafSpacer_15oob_299",ND="_childCountBadge_15oob_304",wD="_addChildButton_15oob_317",DD="_emptyCta_15oob_366",kD="_ctaDescription_15oob_379",MD="_ctaButton_15oob_385",RD="_emptyTaskCta_15oob_420",OD="_headerActions_15oob_425",BD="_groupToggle_15oob_431",LD="_groupToggleActive_15oob_458",UD="_statusGroupHeader_15oob_462",zD="_statusGroupIcon_15oob_481",VD="_statusGroupLabel_15oob_485",ID="_statusGroupCount_15oob_490",HD="_createTaskLink_15oob_503",_e={container:lD,header:oD,searchInput:rD,searchHighlight:cD,addButton:uD,createForm:dD,createInput:fD,createButton:hD,creatingHint:pD,projectRow:mD,selected:gD,expandArrow:yD,expanded:vD,projectName:bD,taskCount:SD,newTaskButton:_D,taskRow:xD,taskStatusIcon:TD,taskTitle:ED,dependencyBadge:CD,blockedBadge:AD,leafSpacer:jD,childCountBadge:ND,addChildButton:wD,emptyCta:DD,ctaDescription:kD,ctaButton:MD,emptyTaskCta:RD,headerActions:OD,groupToggle:BD,groupToggleActive:LD,statusGroupHeader:UD,statusGroupIcon:zD,statusGroupLabel:VD,statusGroupCount:ID,createTaskLink:HD};function PD(n){if(n.length===0)return[];const a=[...n].sort((o,r)=>o[0]-r[0]),i=[[a[0][0],a[0][1]]];for(let o=1;o<a.length;o++){const r=i[i.length-1],[u,d]=a[o];u<=r[1]+1?r[1]=Math.max(r[1],d):i.push([u,d])}return i}function w1({text:n,indices:a}){if(!a||a.length===0)return h.jsx(h.Fragment,{children:n});const i=PD(a),o=[];let r=0;for(const[u,d]of i)u>r&&o.push(h.jsx("span",{children:n.slice(r,u)},`p${r}`)),o.push(h.jsx("mark",{className:_e.searchHighlight,children:n.slice(u,d+1)},`m${u}`)),r=d+1;return r<n.length&&o.push(h.jsx("span",{children:n.slice(r)},`p${r}`)),h.jsx(h.Fragment,{children:o})}const GD=[{name:"name",weight:2},{name:"description",weight:1}],qD=[{name:"title",weight:2},{name:"description",weight:1}],D1=34,FD=16,k1="grackle-group-by-status";function i0(){try{return localStorage.getItem(k1)==="true"}catch{return!1}}function $D(n){try{localStorage.setItem(k1,String(n))}catch{}}function YD(n,a){const i=new Map;for(const u of n){const p=u.dependsOn.length>0&&u.dependsOn.some(g=>a.get(g)!=="complete")?"blocked":u.status,m=i.get(p);m?m.push(u):i.set(p,[u])}const o=[],r=new Set;for(const u of aD){r.add(u);const d=i.get(u);if(d&&d.length>0){d.sort((m,g)=>m.sortOrder-g.sortOrder);const p=ls(u);o.push({status:u,label:p.label,style:p,tasks:d})}}for(const[u,d]of i)if(!r.has(u)&&d.length>0){d.sort((m,g)=>m.sortOrder-g.sortOrder);const p=ls(u);o.push({status:u,label:p.label,style:p,tasks:d})}return o}function KD({group:n,isExpanded:a,onToggle:i,selectedTaskId:o,navigate:r,titleHighlights:u}){return h.jsxs("div",{"data-testid":`status-group-${n.status}`,children:[h.jsxs("div",{className:_e.statusGroupHeader,role:"button",tabIndex:0,"aria-expanded":a,onClick:i,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i())},children:[h.jsx("span",{className:`${_e.expandArrow} ${a?_e.expanded:""}`,children:"▸"}),h.jsx("span",{className:_e.statusGroupIcon,style:{color:n.style.color},children:n.style.icon}),h.jsx("span",{className:_e.statusGroupLabel,children:n.label}),h.jsx("span",{className:_e.statusGroupCount,children:n.tasks.length})]}),h.jsx(os,{children:a&&h.jsx(Rn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},style:{overflow:"hidden"},children:n.tasks.map(d=>{const p=ls(d.status),m=o===d.id;return h.jsxs("div",{onClick:()=>r(as(d.id)),className:`${_e.taskRow} ${m?_e.selected:""}`,style:{"--task-indent":`${D1}px`},"data-task-id":d.id,children:[h.jsx("span",{className:_e.leafSpacer}),h.jsx("span",{className:_e.taskStatusIcon,style:{color:p.color},children:p.icon}),h.jsx("span",{className:_e.taskTitle,title:d.title,children:h.jsx(w1,{text:d.title,indices:u.get(d.id)})})]},d.id)})})})]})}function ZD(n){const a=new Map(n.map(o=>[o.id,{...o,children:[]}])),i=[];for(const o of a.values())o.parentTaskId&&a.has(o.parentTaskId)?a.get(o.parentTaskId).children.push(o):i.push(o);for(const o of a.values())o.children.sort((r,u)=>r.sortOrder-u.sortOrder);return i.sort((o,r)=>o.sortOrder-r.sortOrder)}function M1({node:n,depth:a,expandedTasks:i,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:p,titleHighlights:m}){const g=ls(n.status),y=n.dependsOn.length>0&&n.dependsOn.some(A=>p.get(A)!=="complete"),v=i.has(n.id),_=n.children.length>0,T=r===n.id,E=D1+a*FD;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{onClick:()=>u(as(n.id)),className:`${_e.taskRow} ${T?_e.selected:""}`,style:{"--task-indent":`${E}px`},"data-task-id":n.id,children:[_&&h.jsx("span",{className:`${_e.expandArrow} ${v?_e.expanded:""}`,role:"button",tabIndex:0,"aria-label":v?"Collapse task":"Expand task",onClick:A=>{A.stopPropagation(),o(n.id)},onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),A.stopPropagation(),o(n.id))},children:"▸"}),!_&&h.jsx("span",{className:_e.leafSpacer}),h.jsx("span",{className:_e.taskStatusIcon,style:{color:g.color},children:g.icon}),h.jsx("span",{className:_e.taskTitle,title:n.title,children:h.jsx(w1,{text:n.title,indices:m.get(n.id)})}),_&&h.jsxs("span",{className:_e.childCountBadge,children:[n.children.filter(A=>A.status==="complete").length,"/",n.children.length]}),n.dependsOn.length>0&&h.jsx("span",{className:`${_e.dependencyBadge} ${y?_e.blockedBadge:""}`,title:`Depends on: ${n.dependsOn.join(", ")}`,children:y?"blocked":"dep"}),a<vN&&h.jsx("button",{onClick:A=>{A.stopPropagation(),u(Bs(d,n.id))},title:"Add child task","aria-label":"Add child task",className:_e.addChildButton,children:"+"})]}),h.jsx(os,{children:_&&v&&h.jsx(Rn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:n.children.map(A=>h.jsx(M1,{node:A,depth:a+1,expandedTasks:i,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:p,titleHighlights:m},A.id))})})]})}function XD(){const{projects:n,tasks:a,loadTasks:i,createProject:o,projectCreating:r}=qt(),u=Pn(),[d,p]=S.useState(new Set),[m,g]=S.useState(new Set),[y,v]=S.useState(new Set),[_,T]=S.useState(!1),[E,A]=S.useState(""),[j,C]=S.useState(i0),[w,M]=S.useState(i0),[G,V]=S.useState(new Map),X=()=>{const F=!j;$D(F),C(F),F&&(M(!0),V(new Map))},Q=(F,me)=>{const Ae=`${F}:${me}`;V(Ie=>{const pt=new Map(Ie),xt=pt.has(Ae)?pt.get(Ae):w;return pt.set(Ae,!xt),pt})},I=(F,me)=>{const Ae=`${F}:${me}`;return G.has(Ae)?G.get(Ae):w},te=Qt("/tasks/:taskId/*"),se=Qt("/projects/:projectId"),O=(te==null?void 0:te.params.taskId)!=="new"?te==null?void 0:te.params.taskId:void 0,ne=se==null?void 0:se.params.projectId,W=S.useRef(d);W.current=d;const he=S.useMemo(()=>new Map(a.map(F=>[F.id,F.status])),[a]),P=F=>{p(me=>{const Ae=new Set(me);return Ae.has(F)?Ae.delete(F):(Ae.add(F),i(F)),Ae})},U=F=>{g(me=>{const Ae=new Set(me);return Ae.has(F)?(Ae.delete(F),v(Ie=>new Set(Ie).add(F))):(Ae.add(F),v(Ie=>{const pt=new Set(Ie);return pt.delete(F),pt})),Ae})};S.useEffect(()=>{const F=new Set(a.filter(me=>me.parentTaskId).map(me=>me.parentTaskId));F.size>0&&g(me=>{const Ae=new Set(me);for(const Ie of F)y.has(Ie)||Ae.add(Ie);return Ae})},[a,y]),S.useEffect(()=>{ne&&!W.current.has(ne)&&(p(F=>new Set(F).add(ne)),i(ne))},[ne,i]);const K=()=>{!E.trim()||r||(o(E.trim()),A(""),T(!1))},[ee,we]=S.useState(""),{directMatchTaskIds:xe,treeMatchTaskIds:Ue,visibleProjectIds:Ee,matchedProjectIds:ye,titleHighlights:Te}=S.useMemo(()=>{if(!ee.trim())return{directMatchTaskIds:null,treeMatchTaskIds:null,visibleProjectIds:null,matchedProjectIds:null,titleHighlights:new Map};const F=Wv(n,ee,GD),me=Wv(a,ee,qD),Ae=new Set(F.map(qe=>qe.item.id)),Ie=new Set(me.map(qe=>qe.item.id)),pt=new Map;for(const qe of me){const Be=qe.matches.find(Ln=>Ln.key==="title");Be&&pt.set(qe.item.id,Be.indices)}const xt=new Set(Ae);for(const qe of me)xt.add(qe.item.projectId);const Lt=new Set(Ie),Xe=new Map(a.map(qe=>[qe.id,qe]));for(const qe of[...Ie]){let Be=Xe.get(qe);for(;Be!=null&&Be.parentTaskId;)Lt.add(Be.parentTaskId),Be=Xe.get(Be.parentTaskId)}return{directMatchTaskIds:Ie,treeMatchTaskIds:Lt,visibleProjectIds:xt,matchedProjectIds:Ae,titleHighlights:pt}},[ee,n,a]),J=S.useRef(new Set);return S.useEffect(()=>{if(ee.trim())for(const F of n)!d.has(F.id)&&!J.current.has(F.id)&&(J.current.add(F.id),i(F.id))},[ee,n,d,i]),h.jsxs("div",{className:_e.container,children:[h.jsxs("div",{className:_e.header,children:[h.jsx("span",{children:"Projects"}),h.jsxs("div",{className:_e.headerActions,children:[h.jsx("button",{className:`${_e.groupToggle} ${j?_e.groupToggleActive:""}`,onClick:X,"aria-label":j?"Switch to tree view":"Group tasks by status","aria-pressed":j,title:j?"Switch to tree view":"Group tasks by status","data-testid":"group-by-status-toggle",children:"≡"}),h.jsx("button",{className:_e.addButton,onClick:()=>T(!_),"aria-label":"Create project",title:"Create project",children:"+"})]})]}),n.length>0&&h.jsx("input",{type:"text",value:ee,onChange:F=>we(F.target.value),placeholder:"Filter...","aria-label":"Filter projects and tasks",className:_e.searchInput,"data-testid":"sidebar-search"}),_&&h.jsxs("div",{className:_e.createForm,children:[h.jsx("input",{type:"text",value:E,onChange:F=>A(F.target.value),onKeyDown:F=>F.key==="Enter"&&K(),placeholder:"Project name...",autoFocus:!0,disabled:r,className:_e.createInput}),h.jsx("button",{onClick:K,className:_e.createButton,disabled:r,children:r?h.jsx(a0,{size:"sm",label:"Creating project"}):"OK"})]}),r&&h.jsxs("div",{className:_e.creatingHint,children:[h.jsx(a0,{size:"sm",label:"Creating project"}),"Creating project…"]}),n.length===0&&!_&&h.jsxs("div",{className:_e.emptyCta,children:[h.jsx("button",{className:_e.ctaButton,onClick:()=>T(!0),children:"Create Project"}),h.jsx("div",{className:_e.ctaDescription,children:"Organize your work into projects"})]}),n.map(F=>{if(Ee&&!Ee.has(F.id))return null;const me=xe!==null,Ae=d.has(F.id)||me,Ie=a.filter(Be=>Be.projectId===F.id),pt=(ye==null?void 0:ye.has(F.id))??!1,xt=me&&!pt?j?xe:Ue:null,Lt=xt?Ie.filter(Be=>xt.has(Be.id)):Ie,Xe=ne===F.id,qe=Ae&&!j?ZD(Lt):[];return h.jsxs("div",{children:[h.jsxs("div",{onClick:()=>{Xe?P(F.id):(Ae||P(F.id),u(Kl(F.id)))},className:`${_e.projectRow} ${Xe?_e.selected:""}`,children:[h.jsx("span",{className:`${_e.expandArrow} ${Ae?_e.expanded:""}`,children:"▸"}),h.jsx("span",{className:_e.projectName,title:F.name,children:F.name}),h.jsx("span",{className:_e.taskCount,children:Ie.length>0&&`${Ie.filter(Be=>Be.status==="complete").length}/${Ie.length}`}),h.jsx("button",{onClick:Be=>{Be.stopPropagation(),u(Bs(F.id))},title:"New task",className:_e.newTaskButton,children:"+"})]}),h.jsx(os,{children:Ae&&h.jsxs(Rn.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:[j?YD(Lt,he).map(Be=>h.jsx(KD,{group:Be,isExpanded:I(F.id,Be.status),onToggle:()=>Q(F.id,Be.status),selectedTaskId:O,navigate:u,titleHighlights:Te},Be.status)):qe.map(Be=>h.jsx(M1,{node:Be,depth:0,expandedTasks:m,toggleTask:U,selectedTaskId:O,navigate:u,projectId:F.id,taskStatusById:he,titleHighlights:Te},Be.id)),Lt.length===0&&h.jsx("div",{className:_e.emptyTaskCta,children:h.jsx("button",{className:_e.createTaskLink,onClick:()=>u(Bs(F.id)),children:"+ Create Task"})})]})})]},F.id)})]})}const QD="_container_lovia_1",JD="_content_lovia_40",l0={container:QD,content:JD},WD=320,R1=220,O1=600,B1="grackle-sidebar-width";function ek(){try{const n=localStorage.getItem(B1);if(n!==null){const a=Number(n);if(Number.isFinite(a)&&a>=R1&&a<=O1)return a}}catch{}return WD}function tk(n){try{localStorage.setItem(B1,String(n))}catch{}}function nk(){const[n]=S.useState(ek),a=S.useRef(null);return S.useEffect(()=>{const i=a.current;if(!i)return;const o=new ResizeObserver(r=>{for(const u of r){const d=u.borderBoxSize[0];if(d){const p=Math.round(d.inlineSize);p>=R1&&p<=O1&&tk(p)}}});return o.observe(i),()=>{o.disconnect()}},[]),h.jsx("div",{className:l0.container,ref:a,"data-testid":"sidebar",style:{width:n},children:h.jsx("div",{className:l0.content,children:h.jsx(XD,{})})})}const ak="_bar_8ghh5_1",sk="_barColumn_8ghh5_32",ik="_barRow_8ghh5_63",lk="_input_8ghh5_74",ok="_inputSmall_8ghh5_109",rk="_select_8ghh5_178",ck="_btnPrimary_8ghh5_214",uk="_btnDanger_8ghh5_245",dk="_btnGhost_8ghh5_284",fk="_badge_8ghh5_312",hk="_statusText_8ghh5_322",pk="_statusCompleted_8ghh5_327",mk="_statusFailed_8ghh5_331",gk="_statusBlocked_8ghh5_335",yk="_hintText_8ghh5_340",vk="_creatingHint_8ghh5_345",bk="_errorHint_8ghh5_353",Sk="_disconnectHint_8ghh5_359",re={bar:ak,barColumn:sk,barRow:ik,input:lk,inputSmall:ok,select:rk,btnPrimary:ck,btnDanger:uk,btnGhost:dk,badge:fk,statusText:hk,statusCompleted:pk,statusFailed:mk,statusBlocked:gk,hintText:yk,creatingHint:vk,errorHint:bk,disconnectHint:Sk};function o0({value:n,onChange:a,testId:i}){return h.jsxs("select",{"data-testid":i,value:n,onChange:o=>a(o.target.value),className:re.select,children:[h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"}),h.jsx("option",{value:"stub",children:"stub"})]})}function r0(n,a){if(!n)return!1;const i=a.find(o=>o.id===n);return i!==void 0&&(i.status==="disconnected"||i.status==="error")}function c0({environmentId:n,onReconnect:a}){return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:re.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),h.jsx("button",{type:"button",onClick:()=>a(n),className:re.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function _k(){const{spawn:n,sendInput:a,kill:i,sessions:o,tasks:r,environments:u,personas:d,addEnvironment:p,provisionEnvironment:m,codespaces:g,codespaceError:y,codespaceListError:v,codespaceCreating:_,listCodespaces:T,createCodespace:E}=qt(),{showToast:A}=ao(),j=Pn(),[C]=Mf(),w=Qt("/sessions/:sessionId"),M=Qt("/tasks/:taskId"),G=Qt("/tasks/:taskId/stream"),V=Qt("/tasks/:taskId/findings"),X=Qt("/tasks/:taskId/edit"),Q=Qt("/sessions/new"),I=Qt("/environments/new"),te=Qt("/projects/:projectId"),se=Qt("/tasks/new"),O=Qt("/"),ne=Qt("/settings/*"),W=w==null?void 0:w.params.sessionId,he=(M==null?void 0:M.params.taskId)??(G==null?void 0:G.params.taskId)??(V==null?void 0:V.params.taskId),P=!!Q,U=!!I,K=!!te,ee=!!se,we=!!X,xe=!!O&&!P&&!U&&!K&&!ee,Ue=!!ne,Ee=P?C.get("env")??"":"",ye=P?C.get("runtime")??"claude-code":"claude-code",[Te,J]=S.useState(""),[F,me]=S.useState(P?ye:"claude-code"),[Ae,Ie]=S.useState(""),pt=We=>{if(Ie(We),We){const je=d.find(gt=>gt.id===We);je!=null&&je.runtime&&me(je.runtime)}},[xt,Lt]=S.useState(""),[Xe,qe]=S.useState("local"),[Be,Ln]=S.useState("claude-code"),[Un,ea]=S.useState(""),[en,ta]=S.useState(""),[Z,ae]=S.useState(""),[oe,ue]=S.useState(""),[be,Se]=S.useState(""),[Qe,Me]=S.useState(""),[lt,Dt]=S.useState(""),[Tt,Rt]=S.useState(""),[ot,Et]=S.useState(""),[cn,mt]=S.useState("pick");S.useEffect(()=>{P&&me(ye)},[P,ye]);const Ft=W?o.find(We=>We.id===W):void 0,$t=he?r.find(We=>We.id===he):void 0,Hi=($t==null?void 0:$t.latestSessionId)||void 0,na=Hi?o.find(We=>We.id===Hi):void 0,us=$t?$t.dependsOn.some(We=>{const je=r.find(gt=>gt.id===We);return je&&je.status!=="complete"}):!1;if(xe||Ue)return h.jsx("div",{className:re.bar,children:h.jsx("span",{className:re.hintText,children:"Select a session or click + to start"})});if(we||ee)return h.jsx(h.Fragment,{});if(U){const We=ie=>{if(!ie.trim())return!0;const Ut=Number(ie);return Number.isInteger(Ut)&&Ut>=1&&Ut<=65535},je=()=>!(!xt.trim()||Xe==="ssh"&&!Un.trim()||Xe==="codespace"&&!Qe.trim()||(Xe==="local"||Xe==="ssh")&&!We(en)),gt=()=>{if(!je())return;const ie={};if(Xe==="local"){if(Un.trim()&&(ie.host=Un.trim()),en.trim()){const Ut=Number(en);Number.isInteger(Ut)&&(ie.port=Ut)}}else if(Xe==="ssh"){if(ie.host=Un.trim(),Z.trim()&&(ie.user=Z.trim()),en.trim()){const Ut=Number(en);Number.isInteger(Ut)&&(ie.sshPort=Ut)}lt.trim()&&(ie.identityFile=lt.trim())}else Xe==="docker"?(oe.trim()&&(ie.image=oe.trim()),be.trim()&&(ie.repo=be.trim())):Xe==="codespace"&&(ie.codespaceName=Qe.trim());p(xt.trim(),Xe,ie,Be),A("Environment added successfully","success"),Lt(""),qe("local"),Ln("claude-code"),ea(""),ta(""),ae(""),ue(""),Se(""),Me(""),Dt(""),Rt(""),Et(""),mt("pick"),j(ki,{replace:!0})};return h.jsxs("div",{className:re.barColumn,children:[h.jsxs("div",{className:re.barRow,children:[h.jsx("span",{className:re.badge,children:"new env"}),h.jsx("input",{type:"text",value:xt,onChange:ie=>Lt(ie.target.value),placeholder:"Environment name...",autoFocus:!0,className:re.input}),h.jsxs("select",{value:Xe,onChange:ie=>{qe(ie.target.value),ie.target.value==="codespace"&&(T(),mt("pick"),Me(""))},className:re.select,children:[h.jsx("option",{value:"local",children:"local"}),h.jsx("option",{value:"ssh",children:"ssh"}),h.jsx("option",{value:"docker",children:"docker"}),h.jsx("option",{value:"codespace",children:"codespace"})]}),h.jsx(o0,{value:Be,onChange:Ln,testId:"new-environment-runtime-select"}),h.jsx("button",{onClick:gt,disabled:!je(),className:re.btnPrimary,children:"Add"})]}),h.jsxs("div",{className:re.barRow,children:[Xe==="local"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Un,onChange:ie=>ea(ie.target.value),placeholder:"Host (optional)...",className:re.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:en,onChange:ie=>ta(ie.target.value),placeholder:"Port (optional)...",className:re.inputSmall})]}),Xe==="ssh"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Un,onChange:ie=>ea(ie.target.value),placeholder:"Host (required)...",className:re.inputSmall}),h.jsx("input",{type:"text",value:Z,onChange:ie=>ae(ie.target.value),placeholder:"User (optional)...",className:re.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:en,onChange:ie=>ta(ie.target.value),placeholder:"SSH port (optional)...",className:re.inputSmall}),h.jsx("input",{type:"text",value:lt,onChange:ie=>Dt(ie.target.value),placeholder:"Identity file (optional)...",className:re.inputSmall})]}),Xe==="docker"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:oe,onChange:ie=>ue(ie.target.value),placeholder:"Image (optional)...",className:re.inputSmall}),h.jsx("input",{type:"text",value:be,onChange:ie=>Se(ie.target.value),placeholder:"Repo (optional)...",className:re.inputSmall})]}),Xe==="codespace"&&cn==="pick"&&h.jsxs(h.Fragment,{children:[!v&&h.jsxs("select",{value:Qe,onChange:ie=>{ie.target.value==="__create__"?(mt("create"),Me("")):(Me(ie.target.value),ie.target.value&&!xt.trim()&&Lt(ie.target.value))},disabled:_,className:re.select,children:[h.jsx("option",{value:"",children:"Select a codespace..."}),g.map(ie=>h.jsxs("option",{value:ie.name,children:[ie.name," (",ie.repository,") — ",ie.state]},ie.name)),h.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),_&&h.jsx("span",{className:re.creatingHint,children:"Creating codespace..."}),v&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:re.errorHint,children:v}),h.jsx("input",{type:"text",value:Qe,onChange:ie=>Me(ie.target.value),placeholder:"Or enter codespace name manually...",className:re.inputSmall})]}),y&&!v&&h.jsx("span",{className:re.errorHint,children:y})]}),Xe==="codespace"&&cn==="create"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Tt,onChange:ie=>Rt(ie.target.value),placeholder:"owner/repo",className:re.inputSmall}),h.jsx("input",{type:"text",value:ot,onChange:ie=>Et(ie.target.value),placeholder:"Machine type (optional)...",className:re.inputSmall}),h.jsx("button",{onClick:()=>{Tt.trim()&&(E(Tt.trim(),ot.trim()||void 0),mt("pick"),Rt(""),Et(""))},disabled:!Tt.trim(),className:re.btnPrimary,children:"Create"}),h.jsx("button",{onClick:()=>{mt("pick"),Rt(""),Et("")},className:re.btnGhost,children:"Cancel"})]})]})]})}if(K)return h.jsx("div",{className:re.bar,children:h.jsx("span",{className:re.hintText,children:"Select a task or click + to create one"})});if(he&&$t){if($t.status==="not_started"){const We=us?$t.dependsOn.map(je=>r.find(gt=>gt.id===je)).filter(je=>je&&je.status!=="complete").map(je=>je.title):[];return h.jsx("div",{className:re.bar,children:us?h.jsxs("span",{className:re.statusBlocked,children:["Blocked by: ",We.join(", ")]}):h.jsx("span",{className:re.hintText,children:"Use the buttons above to start or manage this task"})})}if($t.status==="working"||$t.status==="paused"){if((na==null?void 0:na.status)==="idle"){const je=na.environmentId,gt=r0(je,u),ie=Ut=>{Ut.preventDefault();const aa=$t.latestSessionId||Hi;!Te.trim()||!aa||gt||(a(aa,Te),J(""))};return h.jsxs("form",{onSubmit:ie,className:re.bar,children:[gt&&je&&h.jsx(c0,{environmentId:je,onReconnect:m}),h.jsx("input",{type:"text",value:Te,onChange:Ut=>J(Ut.target.value),placeholder:"Type a message...",autoFocus:!gt,disabled:gt,className:re.input}),h.jsx("span",{title:gt?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!Te.trim()||gt,className:re.btnPrimary,children:"Send"})})]})}return h.jsx("div",{className:re.bar,children:h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:re.input})})}if($t.status==="complete")return h.jsxs("div",{className:re.bar,children:[h.jsx("span",{className:`${re.statusText} ${re.statusCompleted}`,children:"Task completed"}),h.jsx("button",{onClick:()=>j(Bs($t.projectId)),className:re.btnPrimary,children:"+ New Task"})]});if($t.status==="failed")return h.jsx("div",{className:re.bar,children:h.jsx("span",{className:`${re.statusText} ${re.statusFailed}`,children:"Task failed"})})}if(P){const We=je=>{je.preventDefault(),!(!Te.trim()||!Ee)&&(n(Ee,Te,void 0,F,Ae),A("Session started","success"),J(""),Ie(""))};return h.jsxs("form",{onSubmit:We,className:re.bar,children:[h.jsx("span",{className:re.badge,children:"new chat"}),h.jsx("input",{type:"text",value:Te,onChange:je=>J(je.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:re.input}),h.jsx(o0,{value:F,onChange:me,testId:"new-chat-runtime-select"}),h.jsxs("select",{value:Ae,onChange:je=>pt(je.target.value),className:re.select,children:[h.jsx("option",{value:"",children:"No persona"}),d.map(je=>h.jsx("option",{value:je.id,children:je.name},je.id))]}),h.jsx("button",{type:"submit",disabled:!Te.trim()||!Ee,className:re.btnPrimary,children:"Go"})]})}if(W){const We=(Ft==null?void 0:Ft.status)==="running",je=(Ft==null?void 0:Ft.status)==="idle",gt=Ft!==void 0&&["completed","failed","interrupted"].includes(Ft.status);if(We)return h.jsxs("div",{className:re.bar,children:[h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:re.input}),h.jsx("button",{onClick:()=>i(W),className:re.btnDanger,title:"Stop session",children:"Stop"})]});if(je){const ie=r0(Ft.environmentId,u),Ut=aa=>{aa.preventDefault(),!(!Te.trim()||ie)&&(a(W,Te),J(""))};return h.jsxs("form",{onSubmit:Ut,className:re.bar,children:[ie&&Ft.environmentId&&h.jsx(c0,{environmentId:Ft.environmentId,onReconnect:m}),h.jsx("input",{type:"text",value:Te,onChange:aa=>J(aa.target.value),placeholder:"Type a message...",autoFocus:!ie,disabled:ie,className:re.input}),h.jsx("span",{title:ie?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!Te.trim()||ie,className:re.btnPrimary,children:"Send"})}),h.jsx("button",{type:"button",onClick:()=>i(W),className:re.btnDanger,title:"Stop session",children:"Stop"})]})}if(gt)return h.jsxs("div",{className:re.bar,children:[h.jsxs("span",{className:`${re.statusText} ${re.hintText}`,children:["Session ",Ft.status]}),h.jsx("button",{onClick:()=>j(L0(Ft.environmentId,Ft.runtime)),className:re.btnPrimary,children:"+ New Chat"})]})}return h.jsx("div",{className:re.bar,children:h.jsx("span",{className:re.hintText,children:"Loading..."})})}const xk="_toast_da8ll_1",Tk="_success_da8ll_18",Ek="_icon_da8ll_22",Ck="_error_da8ll_25",Ak="_warning_da8ll_32",jk="_info_da8ll_38",Nk="_message_da8ll_53",wk="_close_da8ll_60",Bl={toast:xk,success:Tk,icon:Ek,error:Ck,warning:Ak,info:jk,message:Nk,close:wk},Dk={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function kk({toast:n,onDismiss:a}){return S.useEffect(()=>{const i=setTimeout(()=>a(n.id),n.duration);return()=>clearTimeout(i)},[n.id,n.duration,a]),h.jsxs(Rn.div,{className:`${Bl.toast} ${Bl[n.variant]}`,role:"status",initial:{opacity:0,y:-16,scale:.94},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.94},transition:{duration:.2,ease:"easeOut"},layout:!0,children:[h.jsx("span",{className:Bl.icon,"aria-hidden":"true",children:Dk[n.variant]}),h.jsx("span",{className:Bl.message,children:n.message}),h.jsx("button",{type:"button",className:Bl.close,onClick:()=>a(n.id),"aria-label":"Dismiss notification",children:"×"})]})}const Mk="_container_qqse2_1",Rk={container:Mk};function Ok(){const{toasts:n,dismissToast:a}=ao();return h.jsx("div",{className:Rk.container,"data-testid":"toast-container",children:h.jsx(os,{children:n.map(i=>h.jsx(kk,{toast:i,onDismiss:a},i.id))})})}function Bk(n,a){const i=S.useRef(null);S.useEffect(()=>{const o=i.current;if(i.current=n,o===null)return;const r=new Map;for(const d of o)r.set(d.id,d);const u=new Set;for(const d of n){u.add(d.id);const p=r.get(d.id);p&&p.status!==d.status&&(d.status==="connecting"||d.status==="sleeping"||(d.status==="connected"?a("Environment connected","success"):d.status==="error"?a("Environment provision failed","error"):d.status==="disconnected"&&(p.status==="connected"?a("Environment disconnected","warning"):a("Environment stopped","info"))))}for(const d of o)u.has(d.id)||a("Environment removed","info")},[n,a])}const Lk="_panelContainer_yidfr_1",Uk="_emptyState_yidfr_8",zk="_fadeIn_yidfr_1",Vk="_projectSummary_yidfr_17",Ik="_projectSummaryTitle_yidfr_28",Hk="_projectSummarySubtitle_yidfr_32",Pk="_header_yidfr_36",Gk="_headerInfo_yidfr_69",qk="_killButton_yidfr_75",Fk="_headerTitle_yidfr_104",$k="_headerActions_yidfr_119",Yk="_taskStatusBadge_yidfr_126",Kk="_taskBranch_yidfr_135",Zk="_taskBlockedBadge_yidfr_141",Xk="_btnPrimary_yidfr_149",Qk="_btnDanger_yidfr_180",Jk="_btnGhost_yidfr_219",Wk="_rejectInput_yidfr_245",eM="_tabBar_yidfr_275",tM="_tab_yidfr_275",nM="_active_yidfr_301",aM="_eventScroll_yidfr_306",sM="_tabContent_yidfr_312",iM="_noContext_yidfr_317",lM="_overviewContent_yidfr_323",oM="_overviewDashboard_yidfr_332",rM="_overviewHero_yidfr_338",cM="_statusBadge_yidfr_345",uM="_statusPending_yidfr_357",dM="_statusAssigned_yidfr_362",fM="_statusInProgress_yidfr_367",hM="_statusReview_yidfr_372",pM="_statusDone_yidfr_377",mM="_statusFailed_yidfr_382",gM="_statusWaitingInput_yidfr_387",yM="_overviewBranchPill_yidfr_392",vM="_branchLink_yidfr_407",bM="_overviewSection_yidfr_418",SM="_overviewLabel_yidfr_424",_M="_overviewValue_yidfr_431",xM="_overviewMuted_yidfr_436",TM="_overviewMarkdown_yidfr_442",EM="_envRow_yidfr_511",CM="_envDot_yidfr_517",AM="_envDotGreen_yidfr_524",jM="_envDotYellow_yidfr_528",NM="_envDotRed_yidfr_532",wM="_envDotGray_yidfr_536",DM="_depList_yidfr_540",kM="_depItem_yidfr_546",MM="_depBlocked_yidfr_553",RM="_depDone_yidfr_557",OM="_timeline_yidfr_561",BM="_timelineRow_yidfr_567",LM="_timelineKey_yidfr_574",UM="_timelineValue_yidfr_580",zM="_timelineDelta_yidfr_584",VM="_reviewNotes_yidfr_595",IM="_overviewDescription_yidfr_606",HM="_waitingMessage_yidfr_612",PM="_errorMessage_yidfr_616",GM="_eventOverflowWarning_yidfr_620",qM="_attemptSelector_yidfr_634",FM="_attemptLabel_yidfr_650",$M="_attemptButton_yidfr_654",YM="_attemptActive_yidfr_671",KM="_attemptStatus_yidfr_677",ZM="_emptyCta_yidfr_683",XM="_ctaTitle_yidfr_695",QM="_ctaDescription_yidfr_701",JM="_ctaButton_yidfr_708",WM="_ctaLink_yidfr_743",eR="_projectHeader_yidfr_757",tR="_projectName_yidfr_782",nR="_projectMeta_yidfr_795",aR="_metaRow_yidfr_803",sR="_metaLabel_yidfr_816",iR="_metaValue_yidfr_831",lR="_metaPlaceholder_yidfr_841",oR="_editButton_yidfr_846",rR="_editInput_yidfr_862",cR="_editTextarea_yidfr_894",uR="_editSelect_yidfr_930",dR="_archiveButton_yidfr_963",fR="_repoLink_yidfr_993",hR="_metaValueClickable_yidfr_1003",pR="_editHint_yidfr_1022",mR="_editError_yidfr_1031",gR="_editInputInvalid_yidfr_1038",yR="_unsavedDot_yidfr_1043",vR="_metaToggle_yidfr_1051",bR="_metaToggleArrow_yidfr_1072",SR="_metaToggleArrowOpen_yidfr_1077",_R="_progressBarContainer_yidfr_1081",xR="_progressBar_yidfr_1081",TR="_progressFill_yidfr_1097",ER="_progressLabel_yidfr_1104",CR="_metaTimestamps_yidfr_1111",AR="_metaTimestamp_yidfr_1111",jR="_worktreeToggle_yidfr_1133",NR="_editFieldWrapper_yidfr_1148",k={panelContainer:Lk,emptyState:Uk,fadeIn:zk,projectSummary:Vk,projectSummaryTitle:Ik,projectSummarySubtitle:Hk,header:Pk,headerInfo:Gk,killButton:qk,headerTitle:Fk,headerActions:$k,taskStatusBadge:Yk,taskBranch:Kk,taskBlockedBadge:Zk,btnPrimary:Xk,btnDanger:Qk,btnGhost:Jk,rejectInput:Wk,tabBar:eM,tab:tM,active:nM,eventScroll:aM,tabContent:sM,noContext:iM,overviewContent:lM,overviewDashboard:oM,overviewHero:rM,statusBadge:cM,statusPending:uM,statusAssigned:dM,statusInProgress:fM,statusReview:hM,statusDone:pM,statusFailed:mM,statusWaitingInput:gM,overviewBranchPill:yM,branchLink:vM,overviewSection:bM,overviewLabel:SM,overviewValue:_M,overviewMuted:xM,overviewMarkdown:TM,envRow:EM,envDot:CM,envDotGreen:AM,envDotYellow:jM,envDotRed:NM,envDotGray:wM,depList:DM,depItem:kM,depBlocked:MM,depDone:RM,timeline:OM,timelineRow:BM,timelineKey:LM,timelineValue:UM,timelineDelta:zM,reviewNotes:VM,overviewDescription:IM,waitingMessage:HM,errorMessage:PM,eventOverflowWarning:GM,attemptSelector:qM,attemptLabel:FM,attemptButton:$M,attemptActive:YM,attemptStatus:KM,emptyCta:ZM,ctaTitle:XM,ctaDescription:QM,ctaButton:JM,ctaLink:WM,projectHeader:eR,projectName:tR,projectMeta:nR,metaRow:aR,metaLabel:sR,metaValue:iR,metaPlaceholder:lR,editButton:oR,editInput:rR,editTextarea:cR,editSelect:uR,archiveButton:dR,repoLink:fR,metaValueClickable:hR,editHint:pR,editError:mR,editInputInvalid:gR,unsavedDot:yR,metaToggle:vR,metaToggleArrow:bR,metaToggleArrowOpen:SR,progressBarContainer:_R,progressBar:xR,progressFill:TR,progressLabel:ER,metaTimestamps:CR,metaTimestamp:AR,worktreeToggle:jR,editFieldWrapper:NR};function wR(){const{projects:n,createProject:a}=qt();return n.length===0?h.jsxs("div",{className:k.emptyCta,children:[h.jsx("div",{className:k.ctaTitle,children:"Welcome to Grackle"}),h.jsx("div",{className:k.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),h.jsx("button",{className:k.ctaButton,onClick:()=>{const i=window.prompt("Project name:");i!=null&&i.trim()&&a(i.trim())},children:"Create Your First Project"})]}):h.jsx("div",{className:k.emptyState,children:"Select a project or task to get started"})}function DR(n,a){const i=[];let o=n;const r=new Set;for(;o&&a.has(o)&&!r.has(o);){r.add(o);const u=a.get(o);i.unshift(u),o=u.parentTaskId||void 0}return i}const Ls={label:"Home",url:"/"};function kR(n){return n?[Ls,{label:"Settings",url:"/settings"},{label:n,url:void 0}]:[Ls,{label:"Settings",url:void 0}]}function MR(){return[Ls,{label:"New Environment",url:void 0}]}function RR(){return[Ls,{label:"New Chat",url:void 0}]}function OR(n){return[Ls,{label:`Session ${n.slice(0,8)}`,url:void 0}]}function BR(n,a){const i=a.find(o=>o.id===n);return[Ls,{label:(i==null?void 0:i.name)??"Project",url:void 0}]}function LR(n,a,i){const o=DR(n,i),r=i.get(n),u=r==null?void 0:r.projectId,d=u?a.find(g=>g.id===u):void 0,p=[Ls];d&&p.push({label:d.name,url:Kl(d.id)});for(let g=0;g<o.length-1;g++)p.push({label:o[g].title,url:as(o[g].id)});const m=o[o.length-1];return p.push({label:(m==null?void 0:m.title)??n,url:void 0}),p}function UR(){const n=RR();return h.jsxs("div",{className:k.panelContainer,children:[h.jsx(Ii,{segments:n}),h.jsx("div",{className:k.emptyState,children:"Enter a prompt below to start a new session"})]})}function L1(n){const a=[];for(const i of n){const o=a[a.length-1];i.eventType==="text"&&(o==null?void 0:o.eventType)==="text"?a[a.length-1]={...o,content:o.content+i.content}:a.push(i)}return a}function U1(n){const a=new Map;for(const u of n)if(u.raw)try{a.set(u,JSON.parse(u.raw))}catch{}const i=new Map;for(const u of n){if(u.eventType!=="tool_use")continue;const d=a.get(u);if(!(!d||typeof d.id!="string"))try{const p=JSON.parse(u.content);i.set(d.id,{tool:p.tool,args:p.args})}catch{}}const o=new Set;return n.map(u=>{if(u.eventType!=="tool_result")return u;const d=a.get(u);if(!d||typeof d.tool_use_id!="string")return u;const p=i.get(d.tool_use_id);return p?(o.add(d.tool_use_id),{...u,toolUseCtx:p}):u}).filter(u=>{if(u.eventType!=="tool_use")return!0;const d=a.get(u);return d&&typeof d.id=="string"?!o.has(d.id):!0})}function zR({sessionId:n,session:a,isActive:i,onKill:o}){return h.jsxs("div",{className:k.header,children:[h.jsxs("span",{children:["Session: ",n.slice(0,8),a&&` | ${a.runtime} | ${a.status}`]}),h.jsxs("span",{className:k.headerInfo,children:[a&&h.jsx("span",{children:a.prompt.length>60?a.prompt.slice(0,60)+"...":a.prompt}),i&&h.jsx("button",{onClick:()=>o(n),title:"Stop session",className:k.killButton,children:"×"})]})]})}function VR({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:k.eventOverflowWarning,role:"alert",children:["⚠ ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function IR({sessionEvents:n,session:a,eventsDropped:i,scrollRef:o}){const r=a&&["completed","failed","interrupted"].includes(a.status),u=r?`Session ${a.status} with no events recorded.`:"Waiting for events...";return h.jsxs("div",{ref:o,className:k.eventScroll,children:[n.length===0&&h.jsx("div",{className:r?k.errorMessage:k.waitingMessage,children:u}),h.jsx(VR,{eventsDropped:i}),n.map((d,p)=>h.jsx(N1,{event:d,toolUseCtx:d.toolUseCtx},`${d.sessionId}-${d.timestamp}-${p}`))]})}function HR(){const{sessionId:n}=Qr(),{events:a,eventsDropped:i,sessions:o,kill:r,loadSessionEvents:u}=qt(),d=S.useRef(null),p=S.useRef(void 0),m=OR(n),g=o.find(_=>_.id===n)??void 0,y=S.useMemo(()=>{const _=n?a.filter(T=>T.sessionId===n):[];return U1(L1(_))},[a,n]);if(S.useEffect(()=>{n&&n!==p.current&&(p.current=n,u(n))},[n,u]),S.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[y.length]),!n)return h.jsx("div",{className:k.emptyState,children:"No session selected"});const v=(g==null?void 0:g.status)==="running"||(g==null?void 0:g.status)==="idle";return h.jsxs("div",{className:k.panelContainer,children:[h.jsx(Ii,{segments:m}),h.jsx(zR,{sessionId:n,session:g,isActive:v,onKill:r}),h.jsx(IR,{sessionEvents:y,session:g,eventsDropped:i,scrollRef:d})]})}const u0=220,d0=70,PR=40,GR=60,qR="hierarchy",FR="dependency";function $R(n){return S.useMemo(()=>{if(n.length===0)return{nodes:[],edges:[]};const a=new dy.graphlib.Graph({multigraph:!0});a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:"TB",nodesep:PR,ranksep:GR});const i=new Map(n.map(d=>[d.id,d])),o=new Map;for(const d of n)if(d.parentTaskId&&i.has(d.parentTaskId)){const p=o.get(d.parentTaskId)||[];p.push(d),o.set(d.parentTaskId,p)}for(const d of n)a.setNode(d.id,{width:u0,height:d0});const r=[];for(const d of n){if(d.parentTaskId&&i.has(d.parentTaskId)){const p=`hierarchy-${d.parentTaskId}-${d.id}`;a.setEdge(d.parentTaskId,d.id,{},p),r.push({id:p,source:d.parentTaskId,target:d.id,type:"smoothstep",data:{edgeType:qR},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const p of d.dependsOn)if(i.has(p)){const m=`dependency-${p}-${d.id}`;a.setEdge(p,d.id,{},m),r.push({id:m,source:p,target:d.id,type:"smoothstep",data:{edgeType:FR},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return dy.layout(a),{nodes:n.map(d=>{const p=a.node(d.id),m=o.get(d.id)||[];return{id:d.id,type:"task",position:{x:p.x-u0/2,y:p.y-d0/2},data:{task:d,childCount:m.length,doneChildCount:m.filter(g=>g.status==="complete").length,hasDependencies:d.dependsOn.length>0}}}),edges:r}},[n])}const YR="_dagContainer_js4w6_1",KR="_taskNode_js4w6_26",ZR="_taskNodeBorder_js4w6_54",XR="_taskNodeContent_js4w6_60",QR="_taskNodeHeader_js4w6_70",JR="_taskNodeIcon_js4w6_77",WR="_taskNodeTitle_js4w6_82",e3="_taskNodeBadges_js4w6_90",t3="_childBadge_js4w6_95",n3="_depBadge_js4w6_107",a3="_handle_js4w6_119",s3="_emptyCta_js4w6_126",i3="_ctaDescription_js4w6_137",l3="_ctaButton_js4w6_144",Jt={dagContainer:YR,taskNode:KR,taskNodeBorder:ZR,taskNodeContent:XR,taskNodeHeader:QR,taskNodeIcon:JR,taskNodeTitle:WR,taskNodeBadges:e3,childBadge:t3,depBadge:n3,handle:a3,emptyCta:s3,ctaDescription:i3,ctaButton:l3};function o3({data:n}){const{task:a,childCount:i,doneChildCount:o,hasDependencies:r}=n,u=ls(a.status);return h.jsxs("div",{className:Jt.taskNode,"data-task-id":a.id,"data-task-title":a.title,children:[h.jsx(fy,{type:"target",position:hy.Top,className:Jt.handle}),h.jsx("div",{className:Jt.taskNodeBorder,style:{backgroundColor:u.color}}),h.jsxs("div",{className:Jt.taskNodeContent,children:[h.jsxs("div",{className:Jt.taskNodeHeader,children:[h.jsx("span",{className:Jt.taskNodeIcon,style:{color:u.color},children:u.icon}),h.jsx("span",{className:Jt.taskNodeTitle,children:a.title})]}),h.jsxs("div",{className:Jt.taskNodeBadges,children:[i>0&&h.jsxs("span",{className:Jt.childBadge,children:[o,"/",i]}),r&&h.jsx("span",{className:Jt.depBadge,children:"dep"})]})]}),h.jsx(fy,{type:"source",position:hy.Bottom,className:Jt.handle})]})}const r3=iD,c3={task:o3};function u3({projectId:n}){const{tasks:a}=qt(),i=Pn(),{resolvedThemeId:o}=G0(),r=S.useMemo(()=>a.filter(y=>y.projectId===n),[a,n]),{nodes:u,edges:d}=$R(r),p=S.useMemo(()=>{const y=getComputedStyle(document.documentElement),v={};for(const[_,T]of Object.entries(r3))v[_]=y.getPropertyValue(T).trim()||"#6b7a8d";return v},[o]),m=S.useCallback((y,v)=>{i(as(v.id))},[i]),g=S.useCallback(y=>{const v=y.data;return p[v.task.status]||p.pending},[p]);return r.length===0?h.jsxs("div",{className:Jt.emptyCta,children:[h.jsx("button",{className:Jt.ctaButton,onClick:()=>i(Bs(n)),children:"Create Task"}),h.jsx("div",{className:Jt.ctaDescription,children:"Create tasks to see the dependency graph"})]}):h.jsx("div",{className:Jt.dagContainer,children:h.jsxs(ax,{nodes:u,edges:d,nodeTypes:c3,onNodeClick:m,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[h.jsx(sx,{variant:ix.Dots,gap:24,size:1,color:"var(--text-disabled)"}),h.jsx(lx,{showInteractive:!1}),h.jsx(ox,{nodeColor:g,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}function d3({tasks:n,taskStatusById:a,sessionStatusByTaskId:i}){const o=new Map;for(const u of n)if(u.parentTaskId){const d=o.get(u.parentTaskId);d?d.push(u):o.set(u.parentTaskId,[u])}const r=new Map(s0.map(u=>[u,[]]));for(const u of n){const d=mh(u.status),p=u.dependsOn.length>0&&u.dependsOn.some(E=>a.get(E)!=="complete"),m=o.get(u.id)??[],g=m.length,y=m.filter(E=>E.status==="complete").length;let v;if(d==="paused"&&i){const E=i.get(u.id);E==="idle"?v="Needs input":E==="completed"&&(v="Ready to complete")}const _={task:u,isBlocked:p,childCount:g,doneChildCount:y,pausedSubBadge:v},T=r.get(d);T?T.push(_):r.get("not_started").push(_)}for(const u of r.values())u.sort((d,p)=>d.task.sortOrder-p.task.sortOrder);return s0.map(u=>{const d=ls(u);return{status:u,label:d.label,style:d,tasks:r.get(u)??[]}})}const f3="_boardContainer_1c4y1_1",h3="_column_1c4y1_17",p3="_columnHeader_1c4y1_34",m3="_columnIcon_1c4y1_47",g3="_columnLabel_1c4y1_52",y3="_columnCount_1c4y1_57",v3="_cardList_1c4y1_67",b3="_emptyPlaceholder_1c4y1_76",S3="_card_1c4y1_67",_3="_cardHeader_1c4y1_107",x3="_cardStatusIcon_1c4y1_113",T3="_cardTitle_1c4y1_119",E3="_cardBadges_1c4y1_127",C3="_badge_1c4y1_134",A3="_blockedBadge_1c4y1_146",j3="_childBadge_1c4y1_151",N3="_depBadge_1c4y1_155",w3="_parentBadge_1c4y1_159",D3="_pausedSubBadge_1c4y1_166",k3="_personaBadge_1c4y1_170",M3="_envBadge_1c4y1_174",R3="_emptyCta_1c4y1_178",O3="_ctaButton_1c4y1_188",B3="_ctaDescription_1c4y1_204",Ge={boardContainer:f3,column:h3,columnHeader:p3,columnIcon:m3,columnLabel:g3,columnCount:y3,cardList:v3,emptyPlaceholder:b3,card:S3,cardHeader:_3,cardStatusIcon:x3,cardTitle:T3,cardBadges:E3,badge:C3,blockedBadge:A3,childBadge:j3,depBadge:N3,parentBadge:w3,pausedSubBadge:D3,personaBadge:k3,envBadge:M3,emptyCta:R3,ctaButton:O3,ctaDescription:B3};function L3({projectId:n}){const{tasks:a,sessions:i,personas:o,environments:r}=qt(),u=Pn(),d=S.useMemo(()=>a.filter(v=>v.projectId===n),[a,n]),p=S.useMemo(()=>new Map(a.map(v=>[v.id,v.status])),[a]),m=S.useMemo(()=>new Map(d.map(v=>[v.id,v])),[d]),g=S.useMemo(()=>{const v=new Map(i.map(C=>[C.id,C])),_=new Map(o.map(C=>[C.id,C])),T=new Map(r.map(C=>[C.id,C])),E=new Map,A=new Map,j=new Map;for(const C of d)if(C.latestSessionId){const w=v.get(C.latestSessionId);if(w){if(E.set(C.id,w.status),w.personaId){const M=_.get(w.personaId);M&&A.set(C.id,M.name)}if(w.environmentId){const M=T.get(w.environmentId);M&&j.set(C.id,M.displayName)}}}return{sessionStatusByTaskId:E,personaNameByTaskId:A,environmentNameByTaskId:j}},[d,i,o,r]),y=S.useMemo(()=>d3({tasks:d,taskStatusById:p,sessionStatusByTaskId:g.sessionStatusByTaskId}),[d,p,g]);return d.length===0?h.jsxs("div",{className:Ge.emptyCta,"data-testid":"board-empty-cta",children:[h.jsx("button",{className:Ge.ctaButton,onClick:()=>u(Bs(n)),children:"Create Task"}),h.jsx("div",{className:Ge.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}):h.jsx("div",{className:Ge.boardContainer,"data-testid":"board-container",children:y.map(v=>h.jsxs("section",{className:Ge.column,"data-testid":`board-column-${v.status}`,"aria-label":`${v.label}, ${v.tasks.length} ${v.tasks.length===1?"task":"tasks"}`,children:[h.jsxs("div",{className:Ge.columnHeader,children:[h.jsx("span",{className:Ge.columnIcon,style:{color:v.style.color},children:v.style.icon}),h.jsx("span",{className:Ge.columnLabel,children:v.label}),h.jsx("span",{className:Ge.columnCount,"data-testid":`board-count-${v.status}`,children:v.tasks.length})]}),h.jsx("div",{className:Ge.cardList,children:v.tasks.length===0?h.jsx("div",{className:Ge.emptyPlaceholder,children:"No tasks"}):h.jsx(os,{mode:"popLayout",children:v.tasks.map(_=>h.jsx(Rn.div,{layout:!0,initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},children:h.jsx(U3,{boardTask:_,tasksById:m,personaName:g.personaNameByTaskId.get(_.task.id),envName:g.environmentNameByTaskId.get(_.task.id),onClick:()=>u(as(_.task.id))})},_.task.id))})})]},v.status))})}function U3({boardTask:n,tasksById:a,personaName:i,envName:o,onClick:r}){const{task:u,isBlocked:d,childCount:p,doneChildCount:m,pausedSubBadge:g}=n,y=ls(u.status),v=u.parentTaskId?a.get(u.parentTaskId):void 0;return h.jsxs("div",{className:Ge.card,tabIndex:0,role:"button","data-testid":`board-card-${u.id}`,onClick:r,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),r())},children:[h.jsxs("div",{className:Ge.cardHeader,children:[h.jsx("span",{className:Ge.cardStatusIcon,style:{color:y.color},children:y.icon}),h.jsx("span",{className:Ge.cardTitle,children:u.title})]}),h.jsxs("div",{className:Ge.cardBadges,children:[v&&h.jsx("span",{className:`${Ge.badge} ${Ge.parentBadge}`,title:v.title,children:v.title}),p>0&&h.jsxs("span",{className:`${Ge.badge} ${Ge.childBadge}`,children:[m,"/",p]}),d&&h.jsx("span",{className:`${Ge.badge} ${Ge.blockedBadge}`,children:"blocked"}),u.dependsOn.length>0&&!d&&h.jsx("span",{className:`${Ge.badge} ${Ge.depBadge}`,children:"dep"}),g&&h.jsx("span",{className:`${Ge.badge} ${Ge.pausedSubBadge}`,children:g}),i&&h.jsx("span",{className:`${Ge.badge} ${Ge.personaBadge}`,children:i}),o&&h.jsx("span",{className:`${Ge.badge} ${Ge.envBadge}`,children:o})]})]})}function z3(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?k.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?k.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?k.envDotRed:k.envDotGray}function f0(n){if(!n)return"";const a=new Date(n);if(isNaN(a.getTime()))return"";const o=Date.now()-a.getTime();if(o<0)return"just now";const r=Math.floor(o/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const u=Math.floor(r/60);if(u<24)return`${u}h ago`;const d=Math.floor(u/24);return d<30?`${d}d ago`:a.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function V3(){const{projectId:n}=Qr(),a=Pn(),{tasks:i,environments:o,projects:r,archiveProject:u,updateProject:d}=qt(),[p,m]=S.useState("tasks"),[g,y]=S.useState(!1),[v,_]=S.useState(null),[T,E]=S.useState(""),[A,j]=S.useState(""),[C,w]=S.useState(!1),M=S.useRef(void 0),G=S.useRef(null),V=S.useRef(null),X=S.useRef(null),Q=S.useRef(null),I=S.useRef(null),te=S.useRef(null),se=BR(n,r);S.useEffect(()=>{const J=M.current;M.current=n,!(J===void 0||J===n)&&(v!==null||T!=="")&&(_(null),E(""))},[n,v,T]),S.useEffect(()=>{if(v===null)return;const J=v==="name"?V.current:v==="description"?X.current:v==="repoUrl"?Q.current:v==="worktreeBasePath"?te.current:I.current;if(!J)return;const F=window.setTimeout(()=>{J.focus()},0);return()=>{window.clearTimeout(F)}},[v]);const O=r.find(J=>J.id===n),ne=i.filter(J=>J.projectId===n),W=ne.filter(J=>J.status==="complete").length,he=ne.length,P=he>0?Math.round(W/he*100):0,U=100,K=(J,F)=>{G.current=J,_(J),E(F),j("")},ee=()=>{G.current=null,_(null),E(""),j("")},we=(J,F)=>{if(J==="name"){const me=F.trim();if(!me)return"Name is required";if(me.length>U)return`Max ${U} characters`}if(J==="repoUrl"){const me=F.trim();if(me&&!/^https?:\/\/.+/.test(me))return"Must be a valid http(s) URL"}return""},xe=J=>{if(!O)return;const F=T.trim(),me=we(J,T);if(me){j(me);return}if(J==="name"){if(F===O.name){ee();return}d(O.id,{name:F})}else if(J==="description"){const Ae=T;if(Ae===O.description){ee();return}d(O.id,{description:Ae})}else if(J==="repoUrl"){if(F===O.repoUrl){ee();return}d(O.id,{repoUrl:F})}else if(J==="defaultEnvironmentId"){if(T===O.defaultEnvironmentId){ee();return}d(O.id,{defaultEnvironmentId:T})}else{if(F===O.worktreeBasePath){ee();return}d(O.id,{worktreeBasePath:F})}ee()},Ue=(J,F)=>{J.key==="Escape"?ee():J.key==="Enter"&&F!=="description"&&xe(F)},Ee=J=>O?J==="name"?T.trim()!==O.name:J==="description"?T!==O.description:J==="repoUrl"?T.trim()!==O.repoUrl:J==="defaultEnvironmentId"?T!==O.defaultEnvironmentId:T.trim()!==O.worktreeBasePath:!1,ye=o.find(J=>J.id===(O==null?void 0:O.defaultEnvironmentId)),Te=v==="description"?"Tab to save · Esc to cancel":"Enter to save · Esc to cancel";return h.jsxs("div",{className:k.panelContainer,children:[h.jsx(Ii,{segments:se}),h.jsxs("div",{className:k.projectHeader,children:[h.jsx("span",{className:k.projectName,"data-testid":"project-name",children:v==="name"?h.jsxs("div",{className:k.editFieldWrapper,children:[h.jsx("input",{ref:V,className:`${k.editInput} ${A?k.editInputInvalid:""}`,value:T,onChange:J=>{E(J.target.value),j("")},onBlur:J=>{if(G.current==="name"){G.current=null;return}J.relatedTarget instanceof HTMLElement&&J.relatedTarget.dataset.editAction==="name"||xe("name")},onKeyDown:J=>Ue(J,"name"),maxLength:U,"aria-label":"Project name","data-testid":"edit-name-input"}),Ee("name")&&h.jsx("span",{className:k.unsavedDot,title:"Unsaved changes"}),A&&h.jsx("span",{className:k.editError,"data-testid":"edit-error",children:A}),h.jsx("span",{className:k.editHint,children:Te})]}):h.jsxs("button",{type:"button",className:k.metaValueClickable,onClick:()=>K("name",(O==null?void 0:O.name)||""),title:"Click to edit name","aria-label":`Edit project name: ${(O==null?void 0:O.name)||n}`,"data-testid":"edit-name-button",children:[(O==null?void 0:O.name)||n,h.jsx("span",{className:k.editButton,"aria-hidden":"true",children:"✏️"})]})}),h.jsx("button",{className:k.archiveButton,onClick:()=>y(!0),title:"Archive project","data-testid":"archive-project-button",children:"Archive"})]}),h.jsxs("button",{className:k.metaToggle,onClick:()=>w(!C),"aria-expanded":!C,"aria-controls":"project-meta-panel","data-testid":"meta-toggle",children:[h.jsx("span",{className:`${k.metaToggleArrow} ${C?"":k.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!C&&h.jsxs("div",{className:k.projectMeta,"data-testid":"project-meta",id:"project-meta-panel",children:[h.jsxs("div",{className:k.metaRow,children:[h.jsx("span",{className:k.metaLabel,children:"Description"}),h.jsx("div",{className:k.metaValue,children:v==="description"?h.jsxs("div",{className:k.editFieldWrapper,children:[h.jsx("textarea",{ref:X,className:k.editTextarea,value:T,onChange:J=>{E(J.target.value),j("")},onBlur:J=>{if(G.current==="description"){G.current=null;return}J.relatedTarget instanceof HTMLElement&&J.relatedTarget.dataset.editAction==="description"||xe("description")},onKeyDown:J=>Ue(J,"description"),title:"Project description","aria-label":"Project description","data-testid":"edit-description-input"}),Ee("description")&&h.jsx("span",{className:k.unsavedDot,title:"Unsaved changes"}),h.jsx("span",{className:k.editHint,children:Te})]}):h.jsxs("button",{type:"button",className:k.metaValueClickable,onClick:()=>K("description",(O==null?void 0:O.description)||""),title:"Click to edit description","aria-label":"Edit project description","data-testid":"edit-description-button",children:[O!=null&&O.description?h.jsx("span",{className:k.overviewMarkdown,children:h.jsx(Tf,{remarkPlugins:[Ef],children:O.description})}):h.jsx("span",{className:k.metaPlaceholder,children:"No description"}),h.jsx("span",{className:k.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:k.metaRow,children:[h.jsx("span",{className:k.metaLabel,children:"Repository"}),h.jsx("div",{className:k.metaValue,children:v==="repoUrl"?h.jsxs("div",{className:k.editFieldWrapper,children:[h.jsx("input",{ref:Q,className:`${k.editInput} ${A?k.editInputInvalid:""}`,value:T,onChange:J=>{E(J.target.value),j("")},onBlur:J=>{if(G.current==="repoUrl"){G.current=null;return}J.relatedTarget instanceof HTMLElement&&J.relatedTarget.dataset.editAction==="repoUrl"||xe("repoUrl")},onKeyDown:J=>Ue(J,"repoUrl"),placeholder:"https://github.com/...","aria-label":"Project repository URL","data-testid":"edit-repo-input"}),Ee("repoUrl")&&h.jsx("span",{className:k.unsavedDot,title:"Unsaved changes"}),A&&h.jsx("span",{className:k.editError,"data-testid":"edit-error",children:A}),h.jsx("span",{className:k.editHint,children:Te})]}):h.jsxs("button",{type:"button",className:k.metaValueClickable,onClick:J=>{J.preventDefault(),K("repoUrl",(O==null?void 0:O.repoUrl)||"")},title:"Click to edit repository URL","aria-label":"Edit project repository URL","data-testid":"edit-repo-button",children:[O!=null&&O.repoUrl&&/^https?:\/\//i.test(O.repoUrl)?h.jsx("a",{className:k.repoLink,href:O.repoUrl,target:"_blank",rel:"noopener noreferrer",onClick:J=>J.stopPropagation(),children:O.repoUrl}):O!=null&&O.repoUrl?h.jsx("span",{children:O.repoUrl}):h.jsx("span",{className:k.metaPlaceholder,children:"No repository"}),h.jsx("span",{className:k.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:k.metaRow,children:[h.jsx("span",{className:k.metaLabel,children:"Environment"}),h.jsx("div",{className:k.metaValue,children:v==="defaultEnvironmentId"?h.jsxs("select",{ref:I,className:k.editSelect,value:T,onChange:J=>{G.current=null,E(J.target.value);const F=J.target.value;O&&F!==O.defaultEnvironmentId&&d(O.id,{defaultEnvironmentId:F}),ee()},onBlur:J=>{if(G.current==="defaultEnvironmentId"){G.current=null;return}J.relatedTarget instanceof HTMLElement&&J.relatedTarget.dataset.editAction==="defaultEnvironmentId"||ee()},title:"Default environment","aria-label":"Project default environment","data-testid":"edit-env-select",children:[h.jsx("option",{value:"",children:"None"}),o.map(J=>h.jsx("option",{value:J.id,children:J.displayName},J.id))]}):h.jsxs("button",{type:"button",className:k.metaValueClickable,onClick:()=>K("defaultEnvironmentId",(O==null?void 0:O.defaultEnvironmentId)||""),title:"Click to change default environment","aria-label":"Edit project default environment","data-testid":"edit-env-button",children:[ye?h.jsxs("span",{className:k.envRow,children:[h.jsx("span",{className:`${k.envDot} ${z3(ye.status)}`}),ye.displayName]}):h.jsx("span",{className:k.metaPlaceholder,children:(O==null?void 0:O.defaultEnvironmentId)||"No default environment"}),h.jsx("span",{className:k.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:k.metaRow,children:[h.jsx("span",{className:k.metaLabel,children:"Worktrees"}),h.jsx("div",{className:k.metaValue,children:h.jsxs("label",{className:k.worktreeToggle,"data-testid":"worktree-toggle",children:[h.jsx("input",{type:"checkbox",checked:(O==null?void 0:O.useWorktrees)??!0,onChange:J=>{O&&d(O.id,{useWorktrees:J.target.checked})}}),h.jsx("span",{children:"Enable worktree isolation"})]})})]}),h.jsxs("div",{className:k.metaRow,children:[h.jsx("span",{className:k.metaLabel,children:"Working Dir"}),h.jsx("div",{className:k.metaValue,children:v==="worktreeBasePath"?h.jsxs("div",{className:k.editFieldWrapper,children:[h.jsx("input",{ref:te,className:`${k.editInput} ${A?k.editInputInvalid:""}`,value:T,onChange:J=>{E(J.target.value),j("")},onBlur:J=>{if(G.current==="worktreeBasePath"){G.current=null;return}J.relatedTarget instanceof HTMLElement&&J.relatedTarget.dataset.editAction==="worktreeBasePath"||xe("worktreeBasePath")},onKeyDown:J=>Ue(J,"worktreeBasePath"),placeholder:"/workspaces/my-repo","aria-label":"Working directory","data-testid":"edit-worktree-base-path-input"}),Ee("worktreeBasePath")&&h.jsx("span",{className:k.unsavedDot,title:"Unsaved changes"}),A&&h.jsx("span",{className:k.editError,"data-testid":"edit-error",children:A}),h.jsx("span",{className:k.editHint,children:Te})]}):h.jsxs("button",{type:"button",className:k.metaValueClickable,onClick:()=>K("worktreeBasePath",(O==null?void 0:O.worktreeBasePath)||""),title:"Click to edit working directory","aria-label":"Edit working directory","data-testid":"edit-worktree-base-path-button",children:[O!=null&&O.worktreeBasePath?h.jsx("span",{children:O.worktreeBasePath}):h.jsx("span",{className:k.metaPlaceholder,children:"Default (server default)"}),h.jsx("span",{className:k.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),O&&h.jsxs("div",{className:k.metaTimestamps,children:[h.jsxs("span",{className:k.metaTimestamp,children:["Created ",f0(O.createdAt)]}),O.updatedAt&&O.updatedAt!==O.createdAt&&h.jsxs("span",{className:k.metaTimestamp,children:["· Updated ",f0(O.updatedAt)]})]})]}),he>0&&h.jsxs("div",{className:k.progressBarContainer,"data-testid":"progress-bar",children:[h.jsx("div",{className:k.progressBar,children:h.jsx("div",{className:k.progressFill,style:{width:`${P}%`}})}),h.jsxs("span",{className:k.progressLabel,children:[W,"/",he]})]}),h.jsxs("div",{className:k.tabBar,role:"tablist","aria-label":"Project view",children:[h.jsx("button",{role:"tab","aria-selected":p==="graph",className:`${k.tab} ${p==="graph"?k.active:""}`,onClick:()=>m("graph"),children:"Graph"}),h.jsx("button",{role:"tab","aria-selected":p==="board",className:`${k.tab} ${p==="board"?k.active:""}`,onClick:()=>m("board"),"data-testid":"board-tab",children:"Board"}),h.jsx("button",{role:"tab","aria-selected":p==="tasks",className:`${k.tab} ${p==="tasks"?k.active:""}`,onClick:()=>m("tasks"),children:"Tasks"})]}),p==="tasks"&&he>0&&h.jsxs("div",{className:k.projectSummary,children:[h.jsx("span",{className:k.projectSummaryTitle,children:`${W}/${he} tasks complete`}),h.jsx("span",{className:k.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),p==="tasks"&&he===0&&h.jsxs("div",{className:k.emptyCta,children:[h.jsx("button",{className:k.ctaButton,onClick:()=>a(Bs(n)),children:"Create Task"}),h.jsx("div",{className:k.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),p==="board"&&h.jsx(L3,{projectId:n}),p==="graph"&&h.jsx(u3,{projectId:n}),h.jsx(lc,{isOpen:g,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{O&&(u(O.id),a("/",{replace:!0})),y(!1)},onCancel:()=>y(!1)})]})}const I3="_container_cddyd_1",H3="_header_cddyd_8",P3="_headerTitle_cddyd_35",G3="_badge_cddyd_44",q3="_headerActions_cddyd_54",F3="_body_cddyd_61",$3="_formContent_cddyd_73",Y3="_section_cddyd_85",K3="_label_cddyd_91",Z3="_titleInput_cddyd_98",X3="_descriptionTextarea_cddyd_131",Q3="_parentContext_cddyd_167",J3="_parentLabel_cddyd_175",W3="_parentName_cddyd_182",eO="_depList_cddyd_220",tO="_depItem_cddyd_226",nO="_depItemSelected_cddyd_248",aO="_noDeps_cddyd_252",sO="_btnPrimary_cddyd_258",iO="_btnGhost_cddyd_289",it={container:I3,header:H3,headerTitle:P3,badge:G3,headerActions:q3,body:F3,formContent:$3,section:Y3,label:K3,titleInput:Z3,descriptionTextarea:X3,parentContext:Q3,parentLabel:J3,parentName:W3,depList:eO,depItem:tO,depItemSelected:nO,noDeps:aO,btnPrimary:sO,btnGhost:iO};function z1({mode:n,taskId:a,projectId:i,parentTaskId:o}){const{tasks:r,createTask:u,updateTask:d}=qt(),{showToast:p}=ao(),m=Pn(),g=n==="edit",y=g&&a?r.find(O=>O.id===a):void 0,v=g?(y==null?void 0:y.projectId)??"":i??"",_=g?(y==null?void 0:y.parentTaskId)??"":o??"",T=_?r.find(O=>O.id===_):void 0,[E,A]=S.useState((y==null?void 0:y.title)??""),[j,C]=S.useState((y==null?void 0:y.description)??""),[w,M]=S.useState((y==null?void 0:y.dependsOn)??[]),G=S.useRef(!1);S.useEffect(()=>{g&&y&&!G.current&&(G.current=!0,A(y.title),C(y.description),M(y.dependsOn))},[g,y]);const V=r.filter(O=>O.projectId===v&&(!g||O.id!==a)&&O.id!==_),X=E.trim().length>0&&(!g||y!==void 0)&&(g||v.length>0),Q=O=>{M(ne=>ne.includes(O)?ne.filter(W=>W!==O):[...ne,O])},I=()=>{X&&(g&&y===void 0||(g&&a?(d(a,E.trim(),j,w),p("Task updated","success"),m(as(a),{replace:!0})):(u(v,E.trim(),j,w.length>0?w:void 0,_||void 0),p("Task created","success"),m(Kl(v),{replace:!0}))))},te=()=>{m(g&&a?as(a):Kl(v))},se=g?"edit task":_?"child task":"new task";return h.jsxs("div",{className:it.container,children:[h.jsxs("div",{className:it.header,children:[h.jsxs("div",{className:it.headerTitle,children:[h.jsx("span",{className:it.badge,children:se}),T&&h.jsxs("span",{className:it.parentContext,children:[h.jsx("span",{className:it.parentLabel,children:"Child of"}),h.jsx("span",{className:it.parentName,children:T.title})]})]}),h.jsxs("div",{className:it.headerActions,children:[h.jsx("button",{onClick:I,disabled:!X,className:it.btnPrimary,"data-testid":"task-edit-save",children:g?"Save Changes":"Create"}),h.jsx("button",{onClick:te,className:it.btnGhost,children:"Cancel"})]})]}),h.jsx("div",{className:it.body,children:h.jsxs("div",{className:it.formContent,children:[h.jsxs("div",{className:it.section,children:[h.jsx("label",{className:it.label,htmlFor:"task-edit-title",children:"Title"}),h.jsx("input",{id:"task-edit-title",type:"text",value:E,onChange:O=>A(O.target.value),placeholder:"Task title...",autoFocus:!0,className:it.titleInput,"data-testid":"task-edit-title",onKeyDown:O=>{O.key==="Enter"&&X&&I()}})]}),h.jsxs("div",{className:it.section,children:[h.jsx("label",{className:it.label,htmlFor:"task-edit-description",children:"Description"}),h.jsx("textarea",{id:"task-edit-description",value:j,onChange:O=>C(O.target.value),placeholder:"Describe the task... (markdown supported)",className:it.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),h.jsxs("div",{className:it.section,children:[h.jsx("div",{className:it.label,children:"Dependencies"}),V.length===0?h.jsx("div",{className:it.noDeps,children:"No other tasks in this project"}):h.jsx("div",{className:it.depList,children:V.map(O=>{const ne=w.includes(O.id);return h.jsxs("label",{className:`${it.depItem} ${ne?it.depItemSelected:""}`,"data-testid":`dep-option-${O.id}`,children:[h.jsx("input",{type:"checkbox",checked:ne,onChange:()=>Q(O.id)}),O.title,h.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",O.status,")"]})]},O.id)})})]})]})})]})}function lO(){const[n]=Mf(),a=n.get("project")??"",i=n.get("parent")??void 0;return a?h.jsx(z1,{mode:"new",projectId:a,parentTaskId:i}):h.jsx(Dr,{to:"/",replace:!0})}function oO(){const{taskId:n}=Qr();return h.jsx(z1,{mode:"edit",taskId:n})}const rO="_container_1pqxm_1",cO="_emptyState_1pqxm_8",uO="_card_1pqxm_14",dO="_cardHeader_1pqxm_34",fO="_categoryBadge_1pqxm_46",hO="_findingTitle_1pqxm_54",pO="_findingDate_1pqxm_60",mO="_findingContent_1pqxm_72",gO="_tags_1pqxm_78",yO="_tag_1pqxm_78",Yn={container:rO,emptyState:cO,card:uO,cardHeader:dO,categoryBadge:fO,findingTitle:hO,findingDate:pO,findingContent:mO,tags:gO,tag:yO};function vO(n){const a=new Date(n),i=new Date,o=i.getTime()-a.getTime(),r=Math.floor(o/1e3),u=Math.floor(r/60),d=Math.floor(u/60),p=Math.floor(d/24);if(r<60)return"just now";if(u<60)return`${u}m ago`;if(d<24)return`${d}h ago`;if(p===1)return"yesterday";if(p<7)return`${p} days ago`;const m=a.getFullYear()===i.getFullYear(),g=a.toLocaleString("en-US",{month:"short"}),y=a.getDate();return m?`${g} ${y}`:`${g} ${y} ${a.getFullYear()}`}const h0={architecture:{text:"var(--accent-blue)",bg:"var(--accent-blue-dim)"},api:{text:"var(--accent-green)",bg:"var(--accent-green-dim)"},bug:{text:"var(--accent-red)",bg:"var(--accent-red-dim)"},decision:{text:"var(--accent-yellow)",bg:"var(--accent-yellow-dim)"},dependency:{text:"var(--accent-purple)",bg:"var(--accent-purple-dim)"},pattern:{text:"var(--accent-cyan)",bg:"var(--accent-cyan-dim)"},general:{text:"var(--text-secondary)",bg:"var(--bg-elevated)"}};function bO({projectId:n}){const{findings:a}=qt(),i=a.filter(o=>o.projectId===n);return i.length===0?h.jsx("div",{className:Yn.emptyState,children:"No findings yet. Agents will post discoveries here."}):h.jsx("div",{className:Yn.container,children:i.map((o,r)=>{const u=h0[o.category]||h0.general;return h.jsxs(Rn.div,{className:Yn.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:r*.05,duration:.2},children:[h.jsxs("div",{className:Yn.cardHeader,children:[h.jsx("span",{className:Yn.categoryBadge,style:{background:u.bg,color:u.text},children:o.category}),h.jsx("span",{className:Yn.findingTitle,children:o.title}),h.jsx("span",{className:Yn.findingDate,title:o.createdAt,children:vO(o.createdAt)})]}),h.jsx("div",{className:Yn.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&h.jsx("div",{className:Yn.tags,children:o.tags.map(d=>h.jsx("span",{className:Yn.tag,style:{color:u.text,textShadow:`0 0 8px ${u.text}`},children:d},d))})]},o.id)})})}function Nr(n){if(!n)return"—";const a=new Date(n);return isNaN(a.getTime())?"—":a.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Gd(n,a){if(!n||!a)return;const i=new Date(a).getTime()-new Date(n).getTime();if(isNaN(i)||i<0)return;const o=Math.floor(i/6e4),r=Math.floor(i%6e4/1e3);if(o===0)return`${r}s`;const u=Math.floor(o/60),d=o%60;return u===0?`${o}m ${r}s`:`${u}h ${d}m`}function SO(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?k.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?k.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?k.envDotRed:k.envDotGray}function _O({status:n}){const a=ls(n),i=nD(n);return h.jsx("span",{className:`${k.statusBadge} ${k[i]??k.statusPending}`,children:a.label})}function xO({task:n,tasksById:a,environments:i,projects:o,taskSessions:r}){const u=r.length>0?r[r.length-1]:void 0,d=(u==null?void 0:u.environmentId)??"",p=d?i.find(y=>y.id===d):void 0,m=o.find(y=>y.id===n.projectId),g=n.branch&&(m!=null&&m.repoUrl)?`${m.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(n.branch)}`:void 0;return h.jsxs("div",{className:k.overviewDashboard,children:[h.jsxs("div",{className:k.overviewHero,children:[h.jsx(_O,{status:n.status}),n.branch&&h.jsx("span",{className:k.overviewBranchPill,children:g?h.jsxs("a",{href:g,target:"_blank",rel:"noreferrer noopener",className:k.branchLink,children:["🔗"," ",n.branch]}):h.jsxs("span",{children:["🔗"," ",n.branch]})})]}),typeof n.description=="string"&&n.description&&h.jsxs("div",{className:k.overviewSection,children:[h.jsx("div",{className:k.overviewLabel,children:"Description"}),h.jsx("div",{className:k.overviewMarkdown,children:h.jsx(Tf,{remarkPlugins:[Ef],children:n.description})})]}),d&&h.jsxs("div",{className:k.overviewSection,children:[h.jsx("div",{className:k.overviewLabel,children:"Environment"}),h.jsxs("div",{className:k.envRow,children:[p&&h.jsx("span",{className:`${k.envDot} ${SO(p.status)}`,title:p.status,"aria-label":`Status: ${p.status}`,role:"img"}),h.jsx("span",{className:k.overviewValue,children:(p==null?void 0:p.displayName)??d})]})]}),h.jsxs("div",{className:k.overviewSection,children:[h.jsx("div",{className:k.overviewLabel,children:"Dependencies"}),n.dependsOn.length===0?h.jsx("div",{className:k.overviewMuted,children:"None"}):h.jsx("div",{className:k.depList,children:n.dependsOn.map(y=>{const v=a.get(y),_=(v==null?void 0:v.status)==="complete";return h.jsxs("div",{className:`${k.depItem} ${_?k.depDone:k.depBlocked}`,children:[h.jsx("span",{children:_?"✓":"○"}),h.jsx("span",{children:(v==null?void 0:v.title)??y})]},y)})})]}),h.jsxs("div",{className:k.overviewSection,children:[h.jsx("div",{className:k.overviewLabel,children:"Timeline"}),h.jsxs("div",{className:k.timeline,children:[n.createdAt&&h.jsxs("div",{className:k.timelineRow,children:[h.jsx("span",{className:k.timelineKey,children:"Created"}),h.jsx("span",{className:k.timelineValue,children:Nr(n.createdAt)})]}),n.assignedAt&&(()=>{const y=Gd(n.createdAt,n.assignedAt);return h.jsxs("div",{className:k.timelineRow,children:[h.jsx("span",{className:k.timelineKey,children:"Assigned"}),h.jsx("span",{className:k.timelineValue,children:Nr(n.assignedAt)}),y!==void 0&&h.jsx("span",{className:k.timelineDelta,children:y})]})})(),n.startedAt&&(()=>{const y=Gd(n.assignedAt??n.createdAt,n.startedAt);return h.jsxs("div",{className:k.timelineRow,children:[h.jsx("span",{className:k.timelineKey,children:"Started"}),h.jsx("span",{className:k.timelineValue,children:Nr(n.startedAt)}),y!==void 0&&h.jsx("span",{className:k.timelineDelta,children:y})]})})(),n.completedAt&&(()=>{const y=Gd(n.startedAt,n.completedAt);return h.jsxs("div",{className:k.timelineRow,children:[h.jsx("span",{className:k.timelineKey,children:"Completed"}),h.jsx("span",{className:k.timelineValue,children:Nr(n.completedAt)}),y!==void 0&&h.jsx("span",{className:k.timelineDelta,children:y})]})})(),!n.createdAt&&!n.assignedAt&&!n.startedAt&&!n.completedAt&&h.jsx("div",{className:k.overviewMuted,children:"No timing data"})]})]}),n.reviewNotes&&h.jsxs("div",{className:k.overviewSection,children:[h.jsx("div",{className:k.overviewLabel,children:"Review Notes"}),h.jsx("div",{className:k.reviewNotes,children:n.reviewNotes})]})]})}function TO({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:k.eventOverflowWarning,role:"alert",children:["⚠ ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown."]})}function EO({task:n,sessionId:a,isBlocked:i,onStart:o,onResume:r,onStop:u,onComplete:d,onDelete:p,onEdit:m}){if(n.status==="not_started")return i?h.jsxs("div",{className:k.headerActions,children:[h.jsx("button",{onClick:m,className:k.btnGhost,children:"Edit"}),h.jsx("button",{onClick:p,className:k.btnDanger,children:"Delete"})]}):h.jsxs("div",{className:k.headerActions,children:[h.jsx("button",{onClick:o,className:k.btnPrimary,children:"Start"}),h.jsx("button",{onClick:m,className:k.btnGhost,children:"Edit"}),h.jsx("button",{onClick:p,className:k.btnDanger,children:"Delete"})]});if(n.status==="working")return h.jsx("div",{className:k.headerActions,children:h.jsx("button",{onClick:u,disabled:!a,className:k.btnDanger,children:"Stop"})});if(n.status==="paused")return h.jsxs("div",{className:k.headerActions,children:[h.jsx("button",{onClick:d,className:k.btnPrimary,children:"Complete"}),h.jsx("button",{onClick:r,className:k.btnGhost,children:"Resume"}),h.jsx("button",{onClick:p,className:k.btnDanger,children:"Delete"})]});if(n.status==="complete")return h.jsx("div",{className:k.headerActions,children:h.jsx("button",{onClick:p,className:k.btnDanger,children:"Delete"})});if(n.status==="failed")return h.jsxs("div",{className:k.headerActions,children:[h.jsx("button",{onClick:o,className:k.btnPrimary,children:"Retry"}),h.jsx("button",{onClick:p,className:k.btnDanger,children:"Delete"})]})}function CO({taskSessions:n,selectedSessionId:a,onSelect:i}){if(!(n.length<2))return h.jsxs("div",{className:k.attemptSelector,"data-testid":"attempt-selector",children:[h.jsx("span",{className:k.attemptLabel,children:"Attempts:"}),n.map((o,r)=>{const u=o.id===a,d=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="idle"?"●":"";return h.jsxs("button",{className:`${k.attemptButton} ${u?k.attemptActive:""}`,onClick:()=>i(o.id),title:`Attempt #${r+1} — ${o.status}`,"aria-label":`Attempt #${r+1}, ${o.status}`,"aria-pressed":u,"data-testid":`attempt-${r+1}`,children:["#",r+1,d&&h.jsx("span",{className:k.attemptStatus,children:d})]},o.id)})]})}function qd(){const{taskId:n}=Qr(),a=Wt(),i=Pn(),{events:o,eventsDropped:r,tasks:u,environments:d,loadSessionEvents:p,loadFindings:m,kill:g,startTask:y,resumeTask:v,completeTask:_,deleteTask:T,projects:E,taskSessions:A,loadTaskSessions:j}=qt(),C=S.useRef(null),w=S.useRef(void 0),M=S.useRef(void 0),G=S.useRef(void 0),V=S.useRef(void 0),X=S.useRef(void 0),Q=a.pathname.endsWith("/stream")?"stream":a.pathname.endsWith("/findings")?"findings":"overview",[I,te]=S.useState(Q),[se,O]=S.useState(!1),[ne,W]=S.useState(void 0),he=S.useRef(Q);Q!==he.current&&(he.current=Q,Q!==I&&te(Q));const P=u.find(F=>F.id===n),U=(P==null?void 0:P.projectId)||void 0,K=P?A[P.id]??[]:[];let ee;ne&&K.some(F=>F.id===ne)?ee=ne:ee=(P==null?void 0:P.latestSessionId)||void 0;const we=()=>{O(!0)},xe=()=>{P&&(T(P.id),O(!1),i(Kl(P.projectId),{replace:!0}))};if((P==null?void 0:P.id)!==M.current&&(M.current=P==null?void 0:P.id,ne!==void 0&&W(void 0)),S.useEffect(()=>{if(!(P!=null&&P.id))return;const F=P.id!==V.current,me=P.latestSessionId!==X.current;(F||me)&&(V.current=P.id,X.current=P.latestSessionId,j(P.id))},[P==null?void 0:P.id,P==null?void 0:P.latestSessionId,j]),(P==null?void 0:P.status)!==G.current){G.current=P==null?void 0:P.status;const F=(P==null?void 0:P.status)==="not_started"?"overview":(P==null?void 0:P.status)==="working"||(P==null?void 0:P.status)==="paused"?"stream":(P==null?void 0:P.status)==="complete"?"findings":void 0;F&&F!==I&&te(F)}const Ue=S.useMemo(()=>new Map(u.map(F=>[F.id,F])),[u]),Ee=S.useMemo(()=>{const F=ee?o.filter(me=>me.sessionId===ee):[];return U1(L1(F))},[o,ee]),ye=P?P.dependsOn.some(F=>{const me=Ue.get(F);return me!==void 0&&me.status!=="complete"}):!1,Te=S.useMemo(()=>LR(n,E,Ue),[n,E,Ue]);S.useEffect(()=>{ee&&ee!==w.current&&(w.current=ee,p(ee))},[ee,p]),S.useEffect(()=>{I==="findings"&&U&&m(U)},[I,U,m]),S.useEffect(()=>{C.current&&I==="stream"&&(C.current.scrollTop=C.current.scrollHeight)},[Ee.length,I]);const J=F=>{te(F),i(as(n,F==="overview"?void 0:F))};return h.jsxs("div",{className:k.panelContainer,children:[h.jsx(Ii,{segments:Te}),h.jsxs("div",{className:k.header,children:[h.jsxs("span",{className:k.headerTitle,children:[h.jsx("span",{"data-testid":"task-title",children:(P==null?void 0:P.title)||n}),P&&h.jsx("span",{className:k.taskStatusBadge,"data-testid":"task-status",children:P.status}),(P==null?void 0:P.branch)&&h.jsx("span",{className:k.taskBranch,children:P.branch}),ye&&h.jsx("span",{className:k.taskBlockedBadge,children:"blocked"})]}),P&&h.jsx(EO,{task:P,sessionId:ee,isBlocked:ye,onStart:()=>y(P.id),onResume:()=>v(P.id),onStop:()=>ee&&g(ee),onComplete:()=>_(P.id),onDelete:we,onEdit:()=>i(FT(P.id))})]}),h.jsxs("div",{className:k.tabBar,role:"tablist","aria-label":"Task view",children:[h.jsx("button",{role:"tab","aria-selected":I==="overview",className:`${k.tab} ${I==="overview"?k.active:""}`,onClick:()=>J("overview"),children:"Overview"}),h.jsx("button",{role:"tab","aria-selected":I==="stream",className:`${k.tab} ${I==="stream"?k.active:""}`,onClick:()=>J("stream"),children:"Stream"}),h.jsx("button",{role:"tab","aria-selected":I==="findings",className:`${k.tab} ${I==="findings"?k.active:""}`,onClick:()=>J("findings"),children:"Findings"})]}),h.jsxs(os,{mode:"wait",children:[I==="overview"&&h.jsx(Rn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:k.overviewContent,children:P?h.jsx(xO,{task:P,tasksById:Ue,environments:d,projects:E,taskSessions:K}):h.jsx("div",{className:k.waitingMessage,children:"No additional details"})},"overview"),I==="stream"&&h.jsxs(Rn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden"},children:[h.jsx(CO,{taskSessions:K,selectedSessionId:ee,onSelect:F=>W(F)}),h.jsxs("div",{ref:C,className:k.eventScroll,children:[!ee&&P&&h.jsxs("div",{className:k.emptyCta,children:[h.jsx("button",{className:k.ctaButton,onClick:()=>y(P.id),children:"Start Task"}),h.jsx("div",{className:k.ctaDescription,children:"Click to begin agent execution"})]}),ee&&Ee.length===0&&h.jsx("div",{className:k.waitingMessage,children:"Waiting for events..."}),h.jsx(TO,{eventsDropped:r}),Ee.map((F,me)=>h.jsx(N1,{event:F,toolUseCtx:F.toolUseCtx},`${F.sessionId}-${F.timestamp}-${me}`))]})]},"stream"),I==="findings"&&h.jsx(Rn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:k.tabContent,children:U?h.jsx(bO,{projectId:U}):h.jsx("div",{className:k.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),P&&h.jsx(lc,{isOpen:se,title:"Delete Task?",description:`"${P.title}" will be permanently removed.`,onConfirm:xe,onCancel:()=>O(!1)})]})}function AO(){const n=MR();return h.jsxs("div",{className:k.panelContainer,children:[h.jsx(Ii,{segments:n}),h.jsx("div",{className:k.emptyState,children:"Configure the new environment below"})]})}const jO="_layout_1sbe4_1",NO="_content_1sbe4_8",p0={layout:jO,content:NO},wO={environments:"Environments",credentials:"Credentials",personas:"Personas",appearance:"Appearance",about:"About"};function DO(){const a=Wt().pathname.replace(/^\/settings\/?/,"").split("/")[0],i=wO[a],o=kR(i);return h.jsxs("div",{className:p0.layout,children:[h.jsx(Ii,{segments:o}),h.jsx("div",{className:p0.content,children:h.jsx(D0,{})})]})}const kO="_nav_13n0b_1",MO="_tab_13n0b_44",RO="_tabIcon_13n0b_82",OO="_tabActive_13n0b_88",wr={nav:kO,tab:MO,tabIcon:RO,tabActive:OO},Ta=[{path:"environments",label:"Environments",icon:"🖥️"},{path:"credentials",label:"Credentials",icon:"🔑"},{path:"personas",label:"Personas",icon:"👤"},{path:"appearance",label:"Appearance",icon:"🎨"},{path:"about",label:"About",icon:"ℹ️"}];function BO(){var d;const n=Wt(),a=Pn(),i=S.useRef(null),o=((d=Ta.find(p=>n.pathname===`${ki}/${p.path}`))==null?void 0:d.path)??Ta[0].path,r=S.useCallback(p=>{a(`${ki}/${p}`)},[a]),u=S.useCallback(p=>{var T,E;const m=(T=i.current)==null?void 0:T.querySelectorAll('[role="tab"]');if(!m)return;const g=Array.from(m).findIndex(A=>A===document.activeElement),y=g>=0?g:Ta.findIndex(A=>A.path===o);let v=y;if(p.key==="ArrowDown")p.preventDefault(),v=(y+1)%Ta.length;else if(p.key==="ArrowUp")p.preventDefault(),v=(y-1+Ta.length)%Ta.length;else if(p.key==="Home")p.preventDefault(),v=0;else if(p.key==="End")p.preventDefault(),v=Ta.length-1;else return;const _=Ta[v].path;a(`${ki}/${_}`),(E=m[v])==null||E.focus()},[o,a]);return h.jsx("nav",{className:wr.nav,ref:i,role:"tablist","aria-orientation":"vertical","aria-label":"Settings",onKeyDown:u,children:Ta.map(p=>{const m=p.path===o;return h.jsxs("button",{role:"tab",type:"button","aria-selected":m,tabIndex:m?0:-1,className:`${wr.tab} ${m?wr.tabActive:""}`,onClick:()=>r(p.path),children:[h.jsx("span",{className:wr.tabIcon,"aria-hidden":"true",children:p.icon}),p.label]},p.path)})})}const LO="_container_1nk8c_1",UO="_header_1nk8c_5",zO="_headerLabel_1nk8c_12",VO="_addButton_1nk8c_20",IO="_envRow_1nk8c_55",HO="_targeted_1nk8c_69",PO="_expanded_1nk8c_72",GO="_statusDot_1nk8c_76",qO="_pulse_1nk8c_79",FO="_envName_1nk8c_83",$O="_envActions_1nk8c_87",YO="_idleLabel_1nk8c_94",KO="_newChatButton_1nk8c_99",ZO="_envActionsRow_1nk8c_126",XO="_connectButton_1nk8c_134",QO="_stopButton_1nk8c_160",JO="_deleteButton_1nk8c_186",WO="_provisionMessage_1nk8c_213",eB="_errorMessage_1nk8c_220",tB="_sessionRow_1nk8c_227",nB="_selected_1nk8c_243",aB="_sessionDot_1nk8c_248",sB="_sessionSummaryRow_1nk8c_252",iB="_sessionExpandArrow_1nk8c_272",lB="_sessionSummaryText_1nk8c_283",oB="_sessionCountBadge_1nk8c_290",rB="_emptyCta_1nk8c_313",cB="_ctaDescription_1nk8c_326",uB="_ctaButton_1nk8c_332",Pe={container:LO,header:UO,headerLabel:zO,addButton:VO,envRow:IO,targeted:HO,expanded:PO,statusDot:GO,pulse:qO,envName:FO,envActions:$O,idleLabel:YO,newChatButton:KO,envActionsRow:ZO,connectButton:XO,stopButton:QO,deleteButton:JO,provisionMessage:WO,errorMessage:eB,sessionRow:tB,selected:nB,sessionDot:aB,sessionSummaryRow:sB,sessionExpandArrow:iB,sessionSummaryText:lB,sessionCountBadge:oB,emptyCta:rB,ctaDescription:cB,ctaButton:uB},dB={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},fB={running:"running",idle:"awaiting input",failed:"failed",interrupted:"interrupted",completed:"completed"},m0=["running","idle","failed","interrupted","completed"],hB=.2;function pB(n){const a={};for(const u of n)a[u.status]=(a[u.status]||0)+1;const i=m0.filter(u=>a[u]>0).map(u=>`${a[u]} ${fB[u]||u}`),o=new Set(m0),r=Object.keys(a).filter(u=>!o.has(u)).sort().map(u=>`${a[u]} ${u}`);return[...i,...r].join(", ")}function mB({status:n}){const a=n==="running"?"var(--accent-green)":n==="idle"?"var(--accent-yellow)":n==="completed"?"var(--text-secondary)":n==="failed"||n==="interrupted"?"var(--accent-red)":"var(--text-tertiary)";return h.jsx("span",{className:Pe.sessionDot,style:{color:a},children:"●"})}function gB({env:n,envSessions:a,selectedSessionId:i,isNewChatTarget:o,expanded:r,onToggleExpand:u,sessionsExpanded:d,onToggleSessionsExpand:p,provisionProgress:m,onProvision:g,onStop:y,onRemove:v,navigate:_}){const[T,E]=S.useState(!1),A=dB[n.status]||"var(--text-tertiary)",j=n.status==="connected",C=n.status==="connecting",w=n.status==="disconnected"||n.status==="error";return h.jsxs("div",{children:[h.jsx(lc,{isOpen:T,title:"Delete Environment?",description:`"${n.displayName||n.id}" will be permanently removed. This destroys the workspace and removes all data.`,onConfirm:()=>{v(n.id),E(!1)},onCancel:()=>E(!1)}),h.jsxs("div",{className:`${Pe.envRow} ${o?Pe.targeted:""} ${r?Pe.expanded:""}`,"data-testid":"env-row",onClick:u,children:[h.jsx("span",{className:`${Pe.statusDot} ${j?Pe.pulse:""}`,style:{color:A},children:"●"}),h.jsx("span",{className:Pe.envName,title:n.displayName||n.id,children:n.displayName||n.id}),h.jsxs("span",{className:Pe.envActions,children:[a.length===0&&!o&&!r&&h.jsx("span",{className:Pe.idleLabel,children:"(idle)"}),j&&h.jsx("button",{onClick:M=>{M.stopPropagation(),_(L0(n.id,n.defaultRuntime||"claude-code"))},title:"New chat",className:Pe.newChatButton,children:"+"})]})]}),r&&h.jsxs("div",{className:Pe.envActionsRow,children:[C&&m&&h.jsx("span",{className:Pe.provisionMessage,children:m.message}),n.status==="error"&&(m==null?void 0:m.stage)==="error"&&h.jsx("span",{className:Pe.errorMessage,children:m.message}),w&&h.jsx("button",{onClick:M=>{M.stopPropagation(),g(n.id)},className:Pe.connectButton,children:n.status==="error"?"Retry":"Connect"}),j&&h.jsx("button",{onClick:M=>{M.stopPropagation(),y(n.id)},className:Pe.stopButton,children:"Stop"}),!C&&h.jsx("button",{onClick:M=>{M.stopPropagation(),E(!0)},className:Pe.deleteButton,children:"Delete"})]}),a.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Pe.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":d,"aria-label":d?"Collapse sessions":"Expand sessions",onClick:p,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),p())},children:[h.jsx("span",{className:`${Pe.sessionExpandArrow} ${d?Pe.expanded:""}`,children:"▸"}),h.jsx("span",{className:Pe.sessionSummaryText,children:pB(a)}),h.jsx("span",{className:Pe.sessionCountBadge,children:a.length})]}),h.jsx(os,{children:d&&h.jsx(Rn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:hB,ease:"easeInOut"},style:{overflow:"hidden"},children:a.map(M=>h.jsxs("div",{onClick:G=>{G.stopPropagation(),_(B0(M.id))},className:`${Pe.sessionRow} ${i===M.id?Pe.selected:""}`,title:M.prompt,"data-testid":"session-row",children:[h.jsx(mB,{status:M.status})," ",M.prompt.length>24?M.prompt.slice(0,24)+"...":M.prompt]},M.id))})})]})]})}function yB(){const{environments:n,sessions:a,provisionStatus:i,provisionEnvironment:o,stopEnvironment:r,removeEnvironment:u}=qt(),d=Pn(),[p,m]=S.useState(null),[g,y]=S.useState(new Set),v=Qt("/sessions/:sessionId"),_=Qt("/sessions/new"),T=(v==null?void 0:v.params.sessionId)!=="new"?v==null?void 0:v.params.sessionId:void 0,[E]=Mf(),A=_?E.get("env")??void 0:void 0;return h.jsxs("div",{className:Pe.container,children:[h.jsxs("div",{className:Pe.header,children:[h.jsx("span",{className:Pe.headerLabel,children:"Environments"}),h.jsx("button",{className:Pe.addButton,onClick:()=>d(Cy),title:"Add environment",children:"+ Add Environment"})]}),n.length===0&&h.jsxs("div",{className:Pe.emptyCta,children:[h.jsx("button",{className:Pe.ctaButton,onClick:()=>d(Cy),children:"Add Environment"}),h.jsx("div",{className:Pe.ctaDescription,children:"Connect an environment to run agents"})]}),n.map(j=>{const C=a.filter(w=>w.environmentId===j.id);return h.jsx(gB,{env:j,envSessions:C,selectedSessionId:T,isNewChatTarget:A===j.id,expanded:p===j.id,onToggleExpand:()=>m(p===j.id?null:j.id),sessionsExpanded:g.has(j.id),onToggleSessionsExpand:()=>{y(w=>{const M=new Set(w);return M.has(j.id)?M.delete(j.id):M.add(j.id),M})},provisionProgress:i[j.id],onProvision:o,onStop:r,onRemove:u,navigate:d},j.id)})]})}function vB(){return h.jsx(yB,{})}const bB="_section_1ingb_14",SB="_sectionTitle_1ingb_26",_B="_sectionDescription_1ingb_35",xB="_tokenList_1ingb_48",TB="_tokenRow_1ingb_55",EB="_tokenBadge_1ingb_68",CB="_tokenName_1ingb_83",AB="_tokenTarget_1ingb_90",jB="_deleteButton_1ingb_99",NB="_addForm_1ingb_113",wB="_formRow_1ingb_119",DB="_input_1ingb_125",kB="_select_1ingb_155",MB="_addButton_1ingb_187",RB="_emptyStateInfo_1ingb_221",OB="_themeOptions_1ingb_229",BB="_themeOption_1ingb_229",LB="_themeOptionSelected_1ingb_254",UB="_themeOptionHeader_1ingb_259",zB="_themeOptionLabel_1ingb_266",VB="_themeOptionDesc_1ingb_273",IB="_variantToggle_1ingb_279",HB="_variantButton_1ingb_286",PB="_variantActive_1ingb_305",GB="_themeSwatches_1ingb_311",qB="_themeSwatch_1ingb_311",FB="_systemToggle_1ingb_325",$B="_systemToggleHint_1ingb_341",YB="_themeActive_1ingb_348",KB="_aboutGrid_1ingb_354",ZB="_aboutItem_1ingb_360",XB="_aboutLabel_1ingb_373",QB="_aboutValue_1ingb_379",JB="_aboutDot_1ingb_387",WB="_aboutDotConnected_1ingb_394",e5="_aboutDotDisconnected_1ingb_398",ce={section:bB,sectionTitle:SB,sectionDescription:_B,tokenList:xB,tokenRow:TB,tokenBadge:EB,tokenName:CB,tokenTarget:AB,deleteButton:jB,addForm:NB,formRow:wB,input:DB,select:kB,addButton:MB,emptyStateInfo:RB,themeOptions:OB,themeOption:BB,themeOptionSelected:LB,themeOptionHeader:UB,themeOptionLabel:zB,themeOptionDesc:VB,variantToggle:IB,variantButton:HB,variantActive:PB,themeSwatches:GB,themeSwatch:qB,systemToggle:FB,systemToggleHint:$B,themeActive:YB,aboutGrid:KB,aboutItem:ZB,aboutLabel:XB,aboutValue:QB,aboutDot:JB,aboutDotConnected:WB,aboutDotDisconnected:e5},t5=[{key:"claude",label:"Claude",description:"Forward Claude credentials for AI agent access.",options:[{value:"off",label:"Off"},{value:"subscription",label:"Subscription"},{value:"api_key",label:"API Key"}]},{key:"github",label:"GitHub",description:"Forward GITHUB_TOKEN and GH_TOKEN for git operations.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"copilot",label:"Copilot",description:"Forward Copilot tokens (COPILOT_GITHUB_TOKEN, CLI config).",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"codex",label:"Codex",description:"Forward OPENAI_API_KEY for Codex/OpenAI access.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]}];function n5(){const{credentialProviders:n,updateCredentialProviders:a}=qt(),i=(o,r)=>{const u={...n};o==="claude"?u.claude=r:u[o]=r,a(u)};return h.jsxs("section",{className:ce.section,children:[h.jsx("h3",{className:ce.sectionTitle,children:"Credential Providers"}),h.jsx("p",{className:ce.sectionDescription,children:"Enable providers to automatically forward credentials to environments at task start. Credentials are read fresh from the host each time."}),h.jsx("div",{className:ce.tokenList,children:t5.map(o=>h.jsxs("div",{className:ce.tokenRow,children:[h.jsx("span",{className:ce.tokenName,children:o.label}),h.jsx("span",{className:ce.tokenTarget,children:o.description}),h.jsx("select",{className:ce.select,value:n[o.key],onChange:r=>i(o.key,r.target.value),children:o.options.map(r=>h.jsx("option",{value:r.value,children:r.label},r.value))})]},o.key))})]})}const a5=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function s5(){const{tokens:n,setToken:a,deleteToken:i}=qt(),{showToast:o}=ao(),[r,u]=S.useState(""),[d,p]=S.useState(""),[m,g]=S.useState("env_var"),[y,v]=S.useState(""),[_,T]=S.useState(null),E=C=>{if(C.preventDefault(),!r||!d)return;const w=m==="env_var"?y||r.toUpperCase()+"_TOKEN":"";a(r,d,m,w,m==="file"?y:""),o("Token saved successfully","success"),u(""),p(""),v("")},A=C=>{T(C)},j=()=>{_&&(i(_),o("Token deleted","info")),T(null)};return h.jsxs(h.Fragment,{children:[h.jsx(lc,{isOpen:_!==null,title:"Delete Token?",description:_?`"${_}" will be permanently removed.`:void 0,onConfirm:j,onCancel:()=>T(null)}),h.jsxs("section",{className:ce.section,children:[h.jsx("h3",{className:ce.sectionTitle,children:"Tokens"}),h.jsx("p",{className:ce.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),n.length===0?h.jsx("div",{className:ce.emptyStateInfo,children:"Add your first API token to enable service integrations."}):h.jsx("div",{className:ce.tokenList,children:n.map(C=>h.jsxs("div",{className:ce.tokenRow,children:[h.jsx("span",{className:ce.tokenBadge,children:C.tokenType}),h.jsx("span",{className:ce.tokenName,children:C.name}),h.jsx("span",{className:ce.tokenTarget,children:C.tokenType==="env_var"?C.envVar:C.filePath}),h.jsx("button",{className:ce.deleteButton,onClick:()=>A(C.name),title:`Delete ${C.name}`,children:"×"})]},C.name))}),h.jsxs("form",{className:ce.addForm,onSubmit:E,children:[h.jsxs("div",{className:ce.formRow,children:[h.jsx("input",{className:ce.input,type:"text",placeholder:"Token name",value:r,onChange:C=>u(C.target.value)}),h.jsx("input",{className:ce.input,type:"password",placeholder:"Value",value:d,onChange:C=>p(C.target.value)})]}),h.jsxs("div",{className:ce.formRow,children:[h.jsx("select",{className:ce.select,value:m,onChange:C=>g(C.target.value),children:a5.map(C=>h.jsx("option",{value:C.value,children:C.label},C.value))}),h.jsx("input",{className:ce.input,type:"text",placeholder:m==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:y,onChange:C=>v(C.target.value)}),h.jsx("button",{className:ce.addButton,type:"submit",children:"Add Token"})]})]})]})]})}function i5(){return h.jsxs(h.Fragment,{children:[h.jsx(n5,{}),h.jsx(s5,{})]})}const l5="_container_1xcp7_1",o5="_header_1xcp7_7",r5="_form_1xcp7_19",c5="_formActions_1xcp7_87",u5="_list_1xcp7_93",d5="_card_1xcp7_99",f5="_active_1xcp7_109",h5="_cardHeader_1xcp7_113",p5="_cardActions_1xcp7_123",m5="_description_1xcp7_128",g5="_meta_1xcp7_134",y5="_promptDetails_1xcp7_151",v5="_promptText_1xcp7_163",b5="_empty_1xcp7_180",S5="_btnPrimary_1xcp7_186",_5="_btnSecondary_1xcp7_220",x5="_btnSmall_1xcp7_247",T5="_btnDanger_1xcp7_273",bt={container:l5,header:o5,form:r5,formActions:c5,list:u5,card:d5,active:f5,cardHeader:h5,cardActions:p5,description:m5,meta:g5,promptDetails:y5,promptText:v5,empty:b5,btnPrimary:S5,btnSecondary:_5,btnSmall:x5,btnDanger:T5};function E5(){const{personas:n,createPersona:a,updatePersona:i,deletePersona:o}=qt(),[r,u]=S.useState(null),[d,p]=S.useState(!1),[m,g]=S.useState(null),[y,v]=S.useState(""),[_,T]=S.useState(""),[E,A]=S.useState(""),[j,C]=S.useState(""),[w,M]=S.useState(""),[G,V]=S.useState(0),X=()=>{v(""),T(""),A(""),C(""),M(""),V(0)},Q=()=>{X(),u(null),p(!0)},I=W=>{v(W.name),T(W.description),A(W.systemPrompt),C(W.runtime),M(W.model),V(W.maxTurns),u(W),p(!1)},te=W=>{W.preventDefault(),!(!y.trim()||!E.trim())&&(r?(i(r.id,y,_,E,j,w,G),u(null)):(a(y,_,E,j,w,G),p(!1)),X())},se=W=>{o(W),g(null),(r==null?void 0:r.id)===W&&(u(null),X())},O=()=>{u(null),p(!1),X()},ne=()=>h.jsxs("form",{onSubmit:te,className:bt.form,children:[h.jsx("h3",{children:r?"Edit Persona":"Create Persona"}),h.jsxs("label",{children:["Name",h.jsx("input",{type:"text",value:y,onChange:W=>v(W.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),h.jsxs("label",{children:["Description",h.jsx("input",{type:"text",value:_,onChange:W=>T(W.target.value),placeholder:"Brief description..."})]}),h.jsxs("label",{children:["Runtime",h.jsxs("select",{value:j,onChange:W=>C(W.target.value),children:[h.jsx("option",{value:"",children:"Default"}),h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"})]})]}),h.jsxs("label",{children:["Model",h.jsx("input",{type:"text",value:w,onChange:W=>M(W.target.value),placeholder:"e.g. sonnet"})]}),h.jsxs("label",{children:["Max Turns",h.jsx("input",{type:"number",value:G,onChange:W=>V(parseInt(W.target.value,10)||0),min:0})]}),h.jsxs("label",{children:["System Prompt",h.jsx("textarea",{value:E,onChange:W=>A(W.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),h.jsxs("div",{className:bt.formActions,children:[h.jsx("button",{type:"submit",className:bt.btnPrimary,children:r?"Save":"Create"}),h.jsx("button",{type:"button",onClick:O,className:bt.btnSecondary,children:"Cancel"})]})]});return h.jsxs("div",{className:bt.container,children:[h.jsxs("div",{className:bt.header,children:[h.jsx("h2",{children:"Personas"}),h.jsx("button",{onClick:Q,className:bt.btnPrimary,children:"+ New Persona"})]}),(d||r)&&ne(),n.length===0&&!d?h.jsx("p",{className:bt.empty,children:"No personas yet. Create one to get started."}):h.jsx("div",{className:bt.list,children:n.map(W=>h.jsxs("div",{className:`${bt.card} ${(r==null?void 0:r.id)===W.id?bt.active:""}`,children:[h.jsxs("div",{className:bt.cardHeader,children:[h.jsx("strong",{children:W.name}),h.jsxs("div",{className:bt.cardActions,children:[h.jsx("button",{onClick:()=>I(W),className:bt.btnSmall,children:"Edit"}),m===W.id?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>se(W.id),className:bt.btnDanger,children:"Confirm"}),h.jsx("button",{onClick:()=>g(null),className:bt.btnSmall,children:"Cancel"})]}):h.jsx("button",{onClick:()=>g(W.id),className:bt.btnSmall,children:"Delete"})]})]}),W.description&&h.jsx("p",{className:bt.description,children:W.description}),h.jsxs("div",{className:bt.meta,children:[W.runtime&&h.jsxs("span",{children:["Runtime: ",W.runtime]}),W.model&&h.jsxs("span",{children:["Model: ",W.model]}),W.maxTurns>0&&h.jsxs("span",{children:["Max turns: ",W.maxTurns]})]}),h.jsxs("details",{className:bt.promptDetails,children:[h.jsx("summary",{children:"System Prompt"}),h.jsx("pre",{className:bt.promptText,children:W.systemPrompt})]})]},W.id))})]})}function C5(){return h.jsx(E5,{})}function A5(){const{themeId:n,resolvedThemeId:a,setTheme:i,preferSystem:o,setPreferSystem:r}=G0();return h.jsxs("section",{className:ce.section,children:[h.jsx("h3",{className:ce.sectionTitle,children:"Appearance"}),h.jsx("p",{className:ce.sectionDescription,children:"Choose how Grackle looks across the app."}),h.jsx("div",{className:ce.themeOptions,children:Wr.filter(u=>!u.hidden).map(u=>{const d=!!(u.variantLightId&&u.variantDarkId),p=d?n===u.id||n===u.variantLightId||n===u.variantDarkId:n===u.id,m=d&&a===u.variantLightId;return h.jsxs("button",{type:"button",className:`${ce.themeOption} ${p?ce.themeOptionSelected:""}`,"aria-pressed":p,onClick:()=>i(u.id),children:[h.jsxs("span",{className:ce.themeOptionHeader,children:[h.jsxs("span",{children:[h.jsx("span",{className:ce.themeOptionLabel,children:u.label}),h.jsx("span",{className:ce.themeOptionDesc,children:u.description})]}),d&&h.jsxs("span",{className:ce.variantToggle,children:[h.jsx("span",{role:"button",tabIndex:0,className:`${ce.variantButton} ${p&&m?ce.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),i(u.variantLightId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),i(u.variantLightId))},"aria-label":"Light variant","aria-pressed":p&&m,children:"☼"}),h.jsx("span",{role:"button",tabIndex:0,className:`${ce.variantButton} ${p&&!m?ce.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),i(u.variantDarkId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),i(u.variantDarkId))},"aria-label":"Dark variant","aria-pressed":p&&!m,children:"☾"})]})]}),u.swatches&&h.jsx("span",{className:ce.themeSwatches,children:u.swatches.map((g,y)=>h.jsx("span",{className:ce.themeSwatch,style:{background:g}},y))})]},u.id)})}),h.jsxs("label",{className:ce.systemToggle,children:[h.jsx("input",{type:"checkbox",checked:o,onChange:u=>r(u.target.checked)}),h.jsx("span",{children:"Match system light/dark preference"})]}),h.jsx("p",{className:ce.systemToggleHint,children:"Automatically switches between light and dark variants when available."}),h.jsxs("p",{className:ce.themeActive,children:["Active theme: ",h.jsx("strong",{children:a})]})]})}function j5(){return h.jsx(A5,{})}function N5(){const{connected:n,environments:a,sessions:i}=qt(),o=a.filter(d=>d.status==="connected").length,r=a.length,u=i.filter(d=>["running","idle"].includes(d.status)).length;return h.jsxs("section",{className:ce.section,"data-testid":"about-panel",children:[h.jsx("h3",{className:ce.sectionTitle,children:"About"}),h.jsx("p",{className:ce.sectionDescription,children:"Connection status and application information."}),h.jsxs("div",{className:ce.aboutGrid,children:[h.jsxs("div",{className:ce.aboutItem,children:[h.jsx("span",{className:ce.aboutLabel,children:"Connection"}),h.jsxs("span",{className:ce.aboutValue,children:[h.jsx("span",{className:`${ce.aboutDot} ${n?ce.aboutDotConnected:ce.aboutDotDisconnected}`}),n?"Connected":"Disconnected"]})]}),h.jsxs("div",{className:ce.aboutItem,children:[h.jsx("span",{className:ce.aboutLabel,children:"Environments"}),h.jsxs("span",{className:ce.aboutValue,children:[o,"/",r," connected"]})]}),h.jsxs("div",{className:ce.aboutItem,children:[h.jsx("span",{className:ce.aboutLabel,children:"Active Sessions"}),h.jsx("span",{className:ce.aboutValue,children:u})]}),h.jsxs("div",{className:ce.aboutItem,children:[h.jsx("span",{className:ce.aboutLabel,children:"Version"}),h.jsx("span",{className:ce.aboutValue,children:"0.36.0"})]})]})]})}function w5(){return h.jsx(N5,{})}const D5="_root_h353j_1",k5="_body_h353j_7",M5="_main_h353j_19",R5="_sidebarWrapper_h353j_26",O5="_overlay_h353j_56",Ll={root:D5,body:k5,main:M5,sidebarWrapper:R5,overlay:O5},B5=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function L5(){const{lastSpawnedId:n,environments:a}=qt(),{showToast:i}=ao();Bk(a,i);const o=Pn(),r=Wt(),u=r.pathname.startsWith(ki),[d,p]=S.useState(!1),m=S.useCallback(()=>p(g=>!g),[]);return S.useEffect(()=>{p(!1)},[r.pathname]),S.useEffect(()=>{if(!d)return;const g=y=>{y.key==="Escape"&&p(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[d]),S.useEffect(()=>{n&&!r.pathname.startsWith("/tasks/")&&o(B0(n),{replace:!0})},[n,o,r.pathname]),h.jsxs("div",{className:Ll.root,children:[h.jsx(FE,{onToggleSidebar:u?void 0:m,sidebarOpen:d}),h.jsxs("div",{className:Ll.body,children:[h.jsx("div",{className:Ll.sidebarWrapper,"data-sidebar-open":d,"data-settings":u,children:u?h.jsx(BO,{}):h.jsx(nk,{})}),d&&!u&&h.jsx("div",{className:Ll.overlay,"data-testid":"drawer-overlay",onClick:()=>p(!1)}),h.jsxs("div",{className:Ll.main,children:[h.jsx(D0,{}),h.jsx(_k,{})]})]}),h.jsx(Ok,{})]})}function U5(){return h.jsx(uT,{children:h.jsxs(St,{element:h.jsx(L5,{}),children:[h.jsx(St,{index:!0,element:h.jsx(wR,{})}),h.jsx(St,{path:"sessions/new",element:h.jsx(UR,{})}),h.jsx(St,{path:"sessions/:sessionId",element:h.jsx(HR,{})}),h.jsx(St,{path:"projects/:projectId",element:h.jsx(V3,{})}),h.jsx(St,{path:"tasks/new",element:h.jsx(lO,{})}),h.jsx(St,{path:"tasks/:taskId",element:h.jsx(qd,{})}),h.jsx(St,{path:"tasks/:taskId/stream",element:h.jsx(qd,{})}),h.jsx(St,{path:"tasks/:taskId/findings",element:h.jsx(qd,{})}),h.jsx(St,{path:"tasks/:taskId/edit",element:h.jsx(oO,{})}),h.jsx(St,{path:"environments/new",element:h.jsx(AO,{})}),h.jsxs(St,{path:"settings",element:h.jsx(DO,{}),children:[h.jsx(St,{index:!0,element:h.jsx(Dr,{to:"environments",replace:!0})}),h.jsx(St,{path:"environments",element:h.jsx(vB,{})}),h.jsx(St,{path:"credentials",element:h.jsx(i5,{})}),h.jsx(St,{path:"tokens",element:h.jsx(Dr,{to:"../credentials",replace:!0})}),h.jsx(St,{path:"personas",element:h.jsx(C5,{})}),h.jsx(St,{path:"appearance",element:h.jsx(j5,{})}),h.jsx(St,{path:"about",element:h.jsx(w5,{})})]}),h.jsx(St,{path:"*",element:h.jsx(Dr,{to:"/",replace:!0})})]})})}function z5(){const n=B5?wE:SE;return h.jsx(BE,{children:h.jsx(kE,{children:h.jsx(n,{children:h.jsx(BT,{children:h.jsx(U5,{})})})})})}fx.createRoot(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(z5,{})}));
|