@grackle-ai/web 0.14.1 → 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-XP15s_3y.js +141 -0
- package/dist/index.html +1 -1
- package/package.json +6 -4
- package/dist/assets/index-Ds-c-Tbs.js +0 -141
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import{r as q1,a as _,j as y,v as G1,b as Y1,t as Ao,i as X1,f as Z1,M as K1,c as Q1}from"./markdown-gcy1Jmzi.js";import{r as J1,d as gp,H as yp,P as bp,i as I1,B as F1,a as P1,C as $1,M as W1}from"./dagview-EHk2VaeR.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))r(c);new MutationObserver(c=>{for(const h of c)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function o(c){const h={};return c.integrity&&(h.integrity=c.integrity),c.referrerPolicy&&(h.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?h.credentials="include":c.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(c){if(c.ep)return;c.ep=!0;const h=o(c);fetch(c.href,h)}})();var ac={exports:{}},Xs={},ic={exports:{}},sc={};/**
|
|
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 Sp;function tb(){return Sp||(Sp=1,(function(a){function s(A,G){var et=A.length;A.push(G);t:for(;0<et;){var yt=et-1>>>1,bt=A[yt];if(0<c(bt,G))A[yt]=G,A[et]=bt,et=yt;else break t}}function o(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var G=A[0],et=A.pop();if(et!==G){A[0]=et;t:for(var yt=0,bt=A.length,Ht=bt>>>1;yt<Ht;){var Dt=2*(yt+1)-1,mt=A[Dt],qt=Dt+1,ce=A[qt];if(0>c(mt,et))qt<bt&&0>c(ce,mt)?(A[yt]=ce,A[qt]=et,yt=qt):(A[yt]=mt,A[Dt]=et,yt=Dt);else if(qt<bt&&0>c(ce,et))A[yt]=ce,A[qt]=et,yt=qt;else break t}}return G}function c(A,G){var et=A.sortIndex-G.sortIndex;return et!==0?et:A.id-G.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;a.unstable_now=function(){return h.now()}}else{var f=Date,m=f.now();a.unstable_now=function(){return f.now()-m}}var p=[],g=[],b=1,S=null,x=3,j=!1,O=!1,w=!1,Z=!1,X=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function R(A){for(var G=o(g);G!==null;){if(G.callback===null)r(g);else if(G.startTime<=A)r(g),G.sortIndex=G.expirationTime,s(p,G);else break;G=o(g)}}function Y(A){if(w=!1,R(A),!O)if(o(p)!==null)O=!0,H||(H=!0,ft());else{var G=o(g);G!==null&&Yt(Y,G.startTime-A)}}var H=!1,I=-1,B=5,nt=-1;function ct(){return Z?!0:!(a.unstable_now()-nt<B)}function st(){if(Z=!1,H){var A=a.unstable_now();nt=A;var G=!0;try{t:{O=!1,w&&(w=!1,F(I),I=-1),j=!0;var et=x;try{e:{for(R(A),S=o(p);S!==null&&!(S.expirationTime>A&&ct());){var yt=S.callback;if(typeof yt=="function"){S.callback=null,x=S.priorityLevel;var bt=yt(S.expirationTime<=A);if(A=a.unstable_now(),typeof bt=="function"){S.callback=bt,R(A),G=!0;break e}S===o(p)&&r(p),R(A)}else r(p);S=o(p)}if(S!==null)G=!0;else{var Ht=o(g);Ht!==null&&Yt(Y,Ht.startTime-A),G=!1}}break t}finally{S=null,x=et,j=!1}G=void 0}}finally{G?ft():H=!1}}}var ft;if(typeof L=="function")ft=function(){L(st)};else if(typeof MessageChannel<"u"){var gt=new MessageChannel,Ct=gt.port2;gt.port1.onmessage=st,ft=function(){Ct.postMessage(null)}}else ft=function(){X(st,0)};function Yt(A,G){I=X(function(){A(a.unstable_now())},G)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(A){A.callback=null},a.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<A?Math.floor(1e3/A):5},a.unstable_getCurrentPriorityLevel=function(){return x},a.unstable_next=function(A){switch(x){case 1:case 2:case 3:var G=3;break;default:G=x}var et=x;x=G;try{return A()}finally{x=et}},a.unstable_requestPaint=function(){Z=!0},a.unstable_runWithPriority=function(A,G){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var et=x;x=A;try{return G()}finally{x=et}},a.unstable_scheduleCallback=function(A,G,et){var yt=a.unstable_now();switch(typeof et=="object"&&et!==null?(et=et.delay,et=typeof et=="number"&&0<et?yt+et:yt):et=yt,A){case 1:var bt=-1;break;case 2:bt=250;break;case 5:bt=1073741823;break;case 4:bt=1e4;break;default:bt=5e3}return bt=et+bt,A={id:b++,callback:G,priorityLevel:A,startTime:et,expirationTime:bt,sortIndex:-1},et>yt?(A.sortIndex=et,s(g,A),o(p)===null&&A===o(g)&&(w?(F(I),I=-1):w=!0,Yt(Y,et-yt))):(A.sortIndex=bt,s(p,A),O||j||(O=!0,H||(H=!0,ft()))),A},a.unstable_shouldYield=ct,a.unstable_wrapCallback=function(A){var G=x;return function(){var et=x;x=G;try{return A.apply(this,arguments)}finally{x=et}}}})(sc)),sc}var Tp;function eb(){return Tp||(Tp=1,ic.exports=tb()),ic.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 xp;function nb(){if(xp)return Xs;xp=1;var a=eb(),s=q1(),o=J1();function r(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function h(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function f(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function m(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function p(t){if(h(t)!==t)throw Error(r(188))}function g(t){var e=t.alternate;if(!e){if(e=h(t),e===null)throw Error(r(188));return e!==t?null:t}for(var n=t,i=e;;){var l=n.return;if(l===null)break;var u=l.alternate;if(u===null){if(i=l.return,i!==null){n=i;continue}break}if(l.child===u.child){for(u=l.child;u;){if(u===n)return p(l),t;if(u===i)return p(l),e;u=u.sibling}throw Error(r(188))}if(n.return!==i.return)n=l,i=u;else{for(var d=!1,v=l.child;v;){if(v===n){d=!0,n=l,i=u;break}if(v===i){d=!0,i=l,n=u;break}v=v.sibling}if(!d){for(v=u.child;v;){if(v===n){d=!0,n=u,i=l;break}if(v===i){d=!0,i=u,n=l;break}v=v.sibling}if(!d)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?t:e}function b(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=b(t),e!==null)return e;t=t.sibling}return null}var S=Object.assign,x=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),F=Symbol.for("react.consumer"),L=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),nt=Symbol.for("react.activity"),ct=Symbol.for("react.memo_cache_sentinel"),st=Symbol.iterator;function ft(t){return t===null||typeof t!="object"?null:(t=st&&t[st]||t["@@iterator"],typeof t=="function"?t:null)}var gt=Symbol.for("react.client.reference");function Ct(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===gt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case w:return"Fragment";case X:return"Profiler";case Z:return"StrictMode";case Y:return"Suspense";case H:return"SuspenseList";case nt:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case O:return"Portal";case L:return t.displayName||"Context";case F:return(t._context.displayName||"Context")+".Consumer";case R:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case I:return e=t.displayName||null,e!==null?e:Ct(t.type)||"Memo";case B:e=t._payload,t=t._init;try{return Ct(t(e))}catch{}}return null}var Yt=Array.isArray,A=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,et={pending:!1,data:null,method:null,action:null},yt=[],bt=-1;function Ht(t){return{current:t}}function Dt(t){0>bt||(t.current=yt[bt],yt[bt]=null,bt--)}function mt(t,e){bt++,yt[bt]=t.current,t.current=e}var qt=Ht(null),ce=Ht(null),_e=Ht(null),Le=Ht(null);function We(t,e){switch(mt(_e,e),mt(ce,t),mt(qt,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Hm(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Hm(e),t=qm(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Dt(qt),mt(qt,t)}function Ne(){Dt(qt),Dt(ce),Dt(_e)}function mn(t){t.memoizedState!==null&&mt(Le,t);var e=qt.current,n=qm(e,t.type);e!==n&&(mt(ce,t),mt(qt,n))}function He(t){ce.current===t&&(Dt(qt),Dt(ce)),Le.current===t&&(Dt(Le),Hs._currentValue=et)}var qe,pn;function Me(t){if(qe===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);qe=e&&e[1]||"",pn=-1<n.stack.indexOf(`
|
|
18
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
-
`+qe+t+pn}var Ge=!1;function tn(t,e){if(!t||Ge)return"";Ge=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(e){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(k){var M=k}Reflect.construct(t,[],U)}else{try{U.call()}catch(k){M=k}t.call(U.prototype)}}else{try{throw Error()}catch(k){M=k}(U=t())&&typeof U.catch=="function"&&U.catch(function(){})}}catch(k){if(k&&M&&typeof k.stack=="string")return[k.stack,M.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=i.DetermineComponentFrameRoot(),d=u[0],v=u[1];if(d&&v){var T=d.split(`
|
|
20
|
-
`),N=v.split(`
|
|
21
|
-
`);for(l=i=0;i<T.length&&!T[i].includes("DetermineComponentFrameRoot");)i++;for(;l<N.length&&!N[l].includes("DetermineComponentFrameRoot");)l++;if(i===T.length||l===N.length)for(i=T.length-1,l=N.length-1;1<=i&&0<=l&&T[i]!==N[l];)l--;for(;1<=i&&0<=l;i--,l--)if(T[i]!==N[l]){if(i!==1||l!==1)do if(i--,l--,0>l||T[i]!==N[l]){var z=`
|
|
22
|
-
`+T[i].replace(" at new "," at ");return t.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",t.displayName)),z}while(1<=i&&0<=l);break}}}finally{Ge=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Me(n):""}function K(t,e){switch(t.tag){case 26:case 27:case 5:return Me(t.type);case 16:return Me("Lazy");case 13:return t.child!==e&&e!==null?Me("Suspense Fallback"):Me("Suspense");case 19:return Me("SuspenseList");case 0:case 15:return tn(t.type,!1);case 11:return tn(t.type.render,!1);case 1:return tn(t.type,!0);case 31:return Me("Activity");default:return""}}function at(t){try{var e="",n=null;do e+=K(t,n),n=t,t=t.return;while(t);return e}catch(i){return`
|
|
23
|
-
Error generating stack: `+i.message+`
|
|
24
|
-
`+i.stack}}var W=Object.prototype.hasOwnProperty,J=a.unstable_scheduleCallback,St=a.unstable_cancelCallback,kt=a.unstable_shouldYield,q=a.unstable_requestPaint,P=a.unstable_now,Q=a.unstable_getCurrentPriorityLevel,Tt=a.unstable_ImmediatePriority,Rt=a.unstable_UserBlockingPriority,dt=a.unstable_NormalPriority,Ae=a.unstable_LowPriority,ie=a.unstable_IdlePriority,si=a.log,li=a.unstable_setDisableYieldValue,xn=null,Ee=null;function vn(t){if(typeof si=="function"&&li(t),Ee&&typeof Ee.setStrictMode=="function")try{Ee.setStrictMode(xn,t)}catch{}}var je=Math.clz32?Math.clz32:cl,rl=Math.log,ul=Math.LN2;function cl(t){return t>>>=0,t===0?32:31-(rl(t)/ul|0)|0}var Da=256,Na=262144,Ma=4194304;function _n(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ka(t,e,n){var i=t.pendingLanes;if(i===0)return 0;var l=0,u=t.suspendedLanes,d=t.pingedLanes;t=t.warmLanes;var v=i&134217727;return v!==0?(i=v&~u,i!==0?l=_n(i):(d&=v,d!==0?l=_n(d):n||(n=v&~t,n!==0&&(l=_n(n))))):(v=i&~u,v!==0?l=_n(v):d!==0?l=_n(d):n||(n=i&~t,n!==0&&(l=_n(n)))),l===0?0:e!==0&&e!==l&&(e&u)===0&&(u=l&-l,n=e&-e,u>=n||u===32&&(n&4194048)!==0)?e:l}function Wn(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function ht(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Bt(){var t=Ma;return Ma<<=1,(Ma&62914560)===0&&(Ma=4194304),t}function Xt(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function pe(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Oa(t,e,n,i,l,u){var d=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var v=t.entanglements,T=t.expirationTimes,N=t.hiddenUpdates;for(n=d&~n;0<n;){var z=31-je(n),U=1<<z;v[z]=0,T[z]=-1;var M=N[z];if(M!==null)for(N[z]=null,z=0;z<M.length;z++){var k=M[z];k!==null&&(k.lane&=-536870913)}n&=~U}i!==0&&xf(t,i,0),u!==0&&l===0&&t.tag!==0&&(t.suspendedLanes|=u&~(d&~e))}function xf(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var i=31-je(e);t.entangledLanes|=e,t.entanglements[i]=t.entanglements[i]|1073741824|n&261930}function _f(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var i=31-je(n),l=1<<i;l&e|t[i]&e&&(t[i]|=e),n&=~l}}function Af(t,e){var n=e&-e;return n=(n&42)!==0?1:Ko(n),(n&(t.suspendedLanes|e))!==0?0:n}function Ko(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Qo(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ef(){var t=G.p;return t!==0?t:(t=window.event,t===void 0?32:cp(t.type))}function jf(t,e){var n=G.p;try{return G.p=t,e()}finally{G.p=n}}var ta=Math.random().toString(36).slice(2),ve="__reactFiber$"+ta,Oe="__reactProps$"+ta,oi="__reactContainer$"+ta,Jo="__reactEvents$"+ta,Mg="__reactListeners$"+ta,kg="__reactHandles$"+ta,Cf="__reactResources$"+ta,es="__reactMarker$"+ta;function Io(t){delete t[ve],delete t[Oe],delete t[Jo],delete t[Mg],delete t[kg]}function ri(t){var e=t[ve];if(e)return e;for(var n=t.parentNode;n;){if(e=n[oi]||n[ve]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Jm(t);t!==null;){if(n=t[ve])return n;t=Jm(t)}return e}t=n,n=t.parentNode}return null}function ui(t){if(t=t[ve]||t[oi]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function ns(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(r(33))}function ci(t){var e=t[Cf];return e||(e=t[Cf]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function he(t){t[es]=!0}var Df=new Set,Nf={};function Ra(t,e){fi(t,e),fi(t+"Capture",e)}function fi(t,e){for(Nf[t]=e,t=0;t<e.length;t++)Df.add(e[t])}var Og=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]*$"),Mf={},kf={};function Rg(t){return W.call(kf,t)?!0:W.call(Mf,t)?!1:Og.test(t)?kf[t]=!0:(Mf[t]=!0,!1)}function fl(t,e,n){if(Rg(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var i=e.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function dl(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function kn(t,e,n,i){if(i===null)t.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+i)}}function en(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Of(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function wg(t,e,n){var i=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var l=i.get,u=i.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return l.call(this)},set:function(d){n=""+d,u.call(this,d)}}),Object.defineProperty(t,e,{enumerable:i.enumerable}),{getValue:function(){return n},setValue:function(d){n=""+d},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Fo(t){if(!t._valueTracker){var e=Of(t)?"checked":"value";t._valueTracker=wg(t,e,""+t[e])}}function Rf(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=Of(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function hl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var zg=/[\n"\\]/g;function nn(t){return t.replace(zg,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Po(t,e,n,i,l,u,d,v){t.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?t.type=d:t.removeAttribute("type"),e!=null?d==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+en(e)):t.value!==""+en(e)&&(t.value=""+en(e)):d!=="submit"&&d!=="reset"||t.removeAttribute("value"),e!=null?$o(t,d,en(e)):n!=null?$o(t,d,en(n)):i!=null&&t.removeAttribute("value"),l==null&&u!=null&&(t.defaultChecked=!!u),l!=null&&(t.checked=l&&typeof l!="function"&&typeof l!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?t.name=""+en(v):t.removeAttribute("name")}function wf(t,e,n,i,l,u,d,v){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||e!=null)){Fo(t);return}n=n!=null?""+en(n):"",e=e!=null?""+en(e):n,v||e===t.value||(t.value=e),t.defaultValue=e}i=i??l,i=typeof i!="function"&&typeof i!="symbol"&&!!i,t.checked=v?t.checked:!!i,t.defaultChecked=!!i,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(t.name=d),Fo(t)}function $o(t,e,n){e==="number"&&hl(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function di(t,e,n,i){if(t=t.options,e){e={};for(var l=0;l<n.length;l++)e["$"+n[l]]=!0;for(n=0;n<t.length;n++)l=e.hasOwnProperty("$"+t[n].value),t[n].selected!==l&&(t[n].selected=l),l&&i&&(t[n].defaultSelected=!0)}else{for(n=""+en(n),e=null,l=0;l<t.length;l++){if(t[l].value===n){t[l].selected=!0,i&&(t[l].defaultSelected=!0);return}e!==null||t[l].disabled||(e=t[l])}e!==null&&(e.selected=!0)}}function zf(t,e,n){if(e!=null&&(e=""+en(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+en(n):""}function Bf(t,e,n,i){if(e==null){if(i!=null){if(n!=null)throw Error(r(92));if(Yt(i)){if(1<i.length)throw Error(r(93));i=i[0]}n=i}n==null&&(n=""),e=n}n=en(e),t.defaultValue=n,i=t.textContent,i===n&&i!==""&&i!==null&&(t.value=i),Fo(t)}function hi(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Bg=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 Vf(t,e,n){var i=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?i?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":i?t.setProperty(e,n):typeof n!="number"||n===0||Bg.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function Uf(t,e,n){if(e!=null&&typeof e!="object")throw Error(r(62));if(t=t.style,n!=null){for(var i in n)!n.hasOwnProperty(i)||e!=null&&e.hasOwnProperty(i)||(i.indexOf("--")===0?t.setProperty(i,""):i==="float"?t.cssFloat="":t[i]="");for(var l in e)i=e[l],e.hasOwnProperty(l)&&n[l]!==i&&Vf(t,l,i)}else for(var u in e)e.hasOwnProperty(u)&&Vf(t,u,e[u])}function Wo(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Vg=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"]]),Ug=/^[\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 ml(t){return Ug.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function On(){}var tr=null;function er(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var mi=null,pi=null;function Lf(t){var e=ui(t);if(e&&(t=e.stateNode)){var n=t[Oe]||null;t:switch(t=e.stateNode,e.type){case"input":if(Po(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+nn(""+e)+'"][type="radio"]'),e=0;e<n.length;e++){var i=n[e];if(i!==t&&i.form===t.form){var l=i[Oe]||null;if(!l)throw Error(r(90));Po(i,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(e=0;e<n.length;e++)i=n[e],i.form===t.form&&Rf(i)}break t;case"textarea":zf(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&di(t,!!n.multiple,e,!1)}}}var nr=!1;function Hf(t,e,n){if(nr)return t(e,n);nr=!0;try{var i=t(e);return i}finally{if(nr=!1,(mi!==null||pi!==null)&&(eo(),mi&&(e=mi,t=pi,pi=mi=null,Lf(e),t)))for(e=0;e<t.length;e++)Lf(t[e])}}function as(t,e){var n=t.stateNode;if(n===null)return null;var i=n[Oe]||null;if(i===null)return null;n=i[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(t=t.type,i=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!i;break t;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(r(231,e,typeof n));return n}var Rn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ar=!1;if(Rn)try{var is={};Object.defineProperty(is,"passive",{get:function(){ar=!0}}),window.addEventListener("test",is,is),window.removeEventListener("test",is,is)}catch{ar=!1}var ea=null,ir=null,pl=null;function qf(){if(pl)return pl;var t,e=ir,n=e.length,i,l="value"in ea?ea.value:ea.textContent,u=l.length;for(t=0;t<n&&e[t]===l[t];t++);var d=n-t;for(i=1;i<=d&&e[n-i]===l[u-i];i++);return pl=l.slice(t,1<i?1-i:void 0)}function vl(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function gl(){return!0}function Gf(){return!1}function Re(t){function e(n,i,l,u,d){this._reactName=n,this._targetInst=l,this.type=i,this.nativeEvent=u,this.target=d,this.currentTarget=null;for(var v in t)t.hasOwnProperty(v)&&(n=t[v],this[v]=n?n(u):u[v]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?gl:Gf,this.isPropagationStopped=Gf,this}return S(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=gl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=gl)},persist:function(){},isPersistent:gl}),e}var wa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yl=Re(wa),ss=S({},wa,{view:0,detail:0}),Lg=Re(ss),sr,lr,ls,bl=S({},ss,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rr,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ls&&(ls&&t.type==="mousemove"?(sr=t.screenX-ls.screenX,lr=t.screenY-ls.screenY):lr=sr=0,ls=t),sr)},movementY:function(t){return"movementY"in t?t.movementY:lr}}),Yf=Re(bl),Hg=S({},bl,{dataTransfer:0}),qg=Re(Hg),Gg=S({},ss,{relatedTarget:0}),or=Re(Gg),Yg=S({},wa,{animationName:0,elapsedTime:0,pseudoElement:0}),Xg=Re(Yg),Zg=S({},wa,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Kg=Re(Zg),Qg=S({},wa,{data:0}),Xf=Re(Qg),Jg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ig={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"},Fg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pg(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Fg[t])?!!e[t]:!1}function rr(){return Pg}var $g=S({},ss,{key:function(t){if(t.key){var e=Jg[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=vl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Ig[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rr,charCode:function(t){return t.type==="keypress"?vl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?vl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Wg=Re($g),ty=S({},bl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zf=Re(ty),ey=S({},ss,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rr}),ny=Re(ey),ay=S({},wa,{propertyName:0,elapsedTime:0,pseudoElement:0}),iy=Re(ay),sy=S({},bl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),ly=Re(sy),oy=S({},wa,{newState:0,oldState:0}),ry=Re(oy),uy=[9,13,27,32],ur=Rn&&"CompositionEvent"in window,os=null;Rn&&"documentMode"in document&&(os=document.documentMode);var cy=Rn&&"TextEvent"in window&&!os,Kf=Rn&&(!ur||os&&8<os&&11>=os),Qf=" ",Jf=!1;function If(t,e){switch(t){case"keyup":return uy.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ff(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var vi=!1;function fy(t,e){switch(t){case"compositionend":return Ff(e);case"keypress":return e.which!==32?null:(Jf=!0,Qf);case"textInput":return t=e.data,t===Qf&&Jf?null:t;default:return null}}function dy(t,e){if(vi)return t==="compositionend"||!ur&&If(t,e)?(t=qf(),pl=ir=ea=null,vi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Kf&&e.locale!=="ko"?null:e.data;default:return null}}var hy={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Pf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!hy[t.type]:e==="textarea"}function $f(t,e,n,i){mi?pi?pi.push(i):pi=[i]:mi=i,e=ro(e,"onChange"),0<e.length&&(n=new yl("onChange","change",null,n,i),t.push({event:n,listeners:e}))}var rs=null,us=null;function my(t){wm(t,0)}function Sl(t){var e=ns(t);if(Rf(e))return t}function Wf(t,e){if(t==="change")return e}var td=!1;if(Rn){var cr;if(Rn){var fr="oninput"in document;if(!fr){var ed=document.createElement("div");ed.setAttribute("oninput","return;"),fr=typeof ed.oninput=="function"}cr=fr}else cr=!1;td=cr&&(!document.documentMode||9<document.documentMode)}function nd(){rs&&(rs.detachEvent("onpropertychange",ad),us=rs=null)}function ad(t){if(t.propertyName==="value"&&Sl(us)){var e=[];$f(e,us,t,er(t)),Hf(my,e)}}function py(t,e,n){t==="focusin"?(nd(),rs=e,us=n,rs.attachEvent("onpropertychange",ad)):t==="focusout"&&nd()}function vy(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Sl(us)}function gy(t,e){if(t==="click")return Sl(e)}function yy(t,e){if(t==="input"||t==="change")return Sl(e)}function by(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ye=typeof Object.is=="function"?Object.is:by;function cs(t,e){if(Ye(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var l=n[i];if(!W.call(e,l)||!Ye(t[l],e[l]))return!1}return!0}function id(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function sd(t,e){var n=id(t);t=0;for(var i;n;){if(n.nodeType===3){if(i=t+n.textContent.length,t<=e&&i>=e)return{node:n,offset:e-t};t=i}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=id(n)}}function ld(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?ld(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function od(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=hl(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=hl(t.document)}return e}function dr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var Sy=Rn&&"documentMode"in document&&11>=document.documentMode,gi=null,hr=null,fs=null,mr=!1;function rd(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;mr||gi==null||gi!==hl(i)||(i=gi,"selectionStart"in i&&dr(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),fs&&cs(fs,i)||(fs=i,i=ro(hr,"onSelect"),0<i.length&&(e=new yl("onSelect","select",null,e,n),t.push({event:e,listeners:i}),e.target=gi)))}function za(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var yi={animationend:za("Animation","AnimationEnd"),animationiteration:za("Animation","AnimationIteration"),animationstart:za("Animation","AnimationStart"),transitionrun:za("Transition","TransitionRun"),transitionstart:za("Transition","TransitionStart"),transitioncancel:za("Transition","TransitionCancel"),transitionend:za("Transition","TransitionEnd")},pr={},ud={};Rn&&(ud=document.createElement("div").style,"AnimationEvent"in window||(delete yi.animationend.animation,delete yi.animationiteration.animation,delete yi.animationstart.animation),"TransitionEvent"in window||delete yi.transitionend.transition);function Ba(t){if(pr[t])return pr[t];if(!yi[t])return t;var e=yi[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in ud)return pr[t]=e[n];return t}var cd=Ba("animationend"),fd=Ba("animationiteration"),dd=Ba("animationstart"),Ty=Ba("transitionrun"),xy=Ba("transitionstart"),_y=Ba("transitioncancel"),hd=Ba("transitionend"),md=new Map,vr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");vr.push("scrollEnd");function gn(t,e){md.set(t,e),Ra(e,[t])}var Tl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},an=[],bi=0,gr=0;function xl(){for(var t=bi,e=gr=bi=0;e<t;){var n=an[e];an[e++]=null;var i=an[e];an[e++]=null;var l=an[e];an[e++]=null;var u=an[e];if(an[e++]=null,i!==null&&l!==null){var d=i.pending;d===null?l.next=l:(l.next=d.next,d.next=l),i.pending=l}u!==0&&pd(n,l,u)}}function _l(t,e,n,i){an[bi++]=t,an[bi++]=e,an[bi++]=n,an[bi++]=i,gr|=i,t.lanes|=i,t=t.alternate,t!==null&&(t.lanes|=i)}function yr(t,e,n,i){return _l(t,e,n,i),Al(t)}function Va(t,e){return _l(t,null,null,e),Al(t)}function pd(t,e,n){t.lanes|=n;var i=t.alternate;i!==null&&(i.lanes|=n);for(var l=!1,u=t.return;u!==null;)u.childLanes|=n,i=u.alternate,i!==null&&(i.childLanes|=n),u.tag===22&&(t=u.stateNode,t===null||t._visibility&1||(l=!0)),t=u,u=u.return;return t.tag===3?(u=t.stateNode,l&&e!==null&&(l=31-je(n),t=u.hiddenUpdates,i=t[l],i===null?t[l]=[e]:i.push(e),e.lane=n|536870912),u):null}function Al(t){if(50<Rs)throw Rs=0,Cu=null,Error(r(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Si={};function Ay(t,e,n,i){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xe(t,e,n,i){return new Ay(t,e,n,i)}function br(t){return t=t.prototype,!(!t||!t.isReactComponent)}function wn(t,e){var n=t.alternate;return n===null?(n=Xe(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&65011712,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n.refCleanup=t.refCleanup,n}function vd(t,e){t.flags&=65011714;var n=t.alternate;return n===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,t.type=n.type,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function El(t,e,n,i,l,u){var d=0;if(i=t,typeof t=="function")br(t)&&(d=1);else if(typeof t=="string")d=N1(t,n,qt.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case nt:return t=Xe(31,n,e,l),t.elementType=nt,t.lanes=u,t;case w:return Ua(n.children,l,u,e);case Z:d=8,l|=24;break;case X:return t=Xe(12,n,e,l|2),t.elementType=X,t.lanes=u,t;case Y:return t=Xe(13,n,e,l),t.elementType=Y,t.lanes=u,t;case H:return t=Xe(19,n,e,l),t.elementType=H,t.lanes=u,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case L:d=10;break t;case F:d=9;break t;case R:d=11;break t;case I:d=14;break t;case B:d=16,i=null;break t}d=29,n=Error(r(130,t===null?"null":typeof t,"")),i=null}return e=Xe(d,n,e,l),e.elementType=t,e.type=i,e.lanes=u,e}function Ua(t,e,n,i){return t=Xe(7,t,i,e),t.lanes=n,t}function Sr(t,e,n){return t=Xe(6,t,null,e),t.lanes=n,t}function gd(t){var e=Xe(18,null,null,0);return e.stateNode=t,e}function Tr(t,e,n){return e=Xe(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var yd=new WeakMap;function sn(t,e){if(typeof t=="object"&&t!==null){var n=yd.get(t);return n!==void 0?n:(e={value:t,source:e,stack:at(e)},yd.set(t,e),e)}return{value:t,source:e,stack:at(e)}}var Ti=[],xi=0,jl=null,ds=0,ln=[],on=0,na=null,An=1,En="";function zn(t,e){Ti[xi++]=ds,Ti[xi++]=jl,jl=t,ds=e}function bd(t,e,n){ln[on++]=An,ln[on++]=En,ln[on++]=na,na=t;var i=An;t=En;var l=32-je(i)-1;i&=~(1<<l),n+=1;var u=32-je(e)+l;if(30<u){var d=l-l%5;u=(i&(1<<d)-1).toString(32),i>>=d,l-=d,An=1<<32-je(e)+l|n<<l|i,En=u+t}else An=1<<u|n<<l|i,En=t}function xr(t){t.return!==null&&(zn(t,1),bd(t,1,0))}function _r(t){for(;t===jl;)jl=Ti[--xi],Ti[xi]=null,ds=Ti[--xi],Ti[xi]=null;for(;t===na;)na=ln[--on],ln[on]=null,En=ln[--on],ln[on]=null,An=ln[--on],ln[on]=null}function Sd(t,e){ln[on++]=An,ln[on++]=En,ln[on++]=na,An=e.id,En=e.overflow,na=t}var ge=null,Kt=null,jt=!1,aa=null,rn=!1,Ar=Error(r(519));function ia(t){var e=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hs(sn(e,t)),Ar}function Td(t){var e=t.stateNode,n=t.type,i=t.memoizedProps;switch(e[ve]=t,e[Oe]=i,n){case"dialog":_t("cancel",e),_t("close",e);break;case"iframe":case"object":case"embed":_t("load",e);break;case"video":case"audio":for(n=0;n<zs.length;n++)_t(zs[n],e);break;case"source":_t("error",e);break;case"img":case"image":case"link":_t("error",e),_t("load",e);break;case"details":_t("toggle",e);break;case"input":_t("invalid",e),wf(e,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":_t("invalid",e);break;case"textarea":_t("invalid",e),Bf(e,i.value,i.defaultValue,i.children)}n=i.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||e.textContent===""+n||i.suppressHydrationWarning===!0||Um(e.textContent,n)?(i.popover!=null&&(_t("beforetoggle",e),_t("toggle",e)),i.onScroll!=null&&_t("scroll",e),i.onScrollEnd!=null&&_t("scrollend",e),i.onClick!=null&&(e.onclick=On),e=!0):e=!1,e||ia(t,!0)}function xd(t){for(ge=t.return;ge;)switch(ge.tag){case 5:case 31:case 13:rn=!1;return;case 27:case 3:rn=!0;return;default:ge=ge.return}}function _i(t){if(t!==ge)return!1;if(!jt)return xd(t),jt=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||Gu(t.type,t.memoizedProps)),n=!n),n&&Kt&&ia(t),xd(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Kt=Qm(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Kt=Qm(t)}else e===27?(e=Kt,ya(t.type)?(t=Qu,Qu=null,Kt=t):Kt=e):Kt=ge?cn(t.stateNode.nextSibling):null;return!0}function La(){Kt=ge=null,jt=!1}function Er(){var t=aa;return t!==null&&(Ve===null?Ve=t:Ve.push.apply(Ve,t),aa=null),t}function hs(t){aa===null?aa=[t]:aa.push(t)}var jr=Ht(null),Ha=null,Bn=null;function sa(t,e,n){mt(jr,e._currentValue),e._currentValue=n}function Vn(t){t._currentValue=jr.current,Dt(jr)}function Cr(t,e,n){for(;t!==null;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===n)break;t=t.return}}function Dr(t,e,n,i){var l=t.child;for(l!==null&&(l.return=t);l!==null;){var u=l.dependencies;if(u!==null){var d=l.child;u=u.firstContext;t:for(;u!==null;){var v=u;u=l;for(var T=0;T<e.length;T++)if(v.context===e[T]){u.lanes|=n,v=u.alternate,v!==null&&(v.lanes|=n),Cr(u.return,n,t),i||(d=null);break t}u=v.next}}else if(l.tag===18){if(d=l.return,d===null)throw Error(r(341));d.lanes|=n,u=d.alternate,u!==null&&(u.lanes|=n),Cr(d,n,t),d=null}else d=l.child;if(d!==null)d.return=l;else for(d=l;d!==null;){if(d===t){d=null;break}if(l=d.sibling,l!==null){l.return=d.return,d=l;break}d=d.return}l=d}}function Ai(t,e,n,i){t=null;for(var l=e,u=!1;l!==null;){if(!u){if((l.flags&524288)!==0)u=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var d=l.alternate;if(d===null)throw Error(r(387));if(d=d.memoizedProps,d!==null){var v=l.type;Ye(l.pendingProps.value,d.value)||(t!==null?t.push(v):t=[v])}}else if(l===Le.current){if(d=l.alternate,d===null)throw Error(r(387));d.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(t!==null?t.push(Hs):t=[Hs])}l=l.return}t!==null&&Dr(e,t,n,i),e.flags|=262144}function Cl(t){for(t=t.firstContext;t!==null;){if(!Ye(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function qa(t){Ha=t,Bn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function ye(t){return _d(Ha,t)}function Dl(t,e){return Ha===null&&qa(t),_d(t,e)}function _d(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},Bn===null){if(t===null)throw Error(r(308));Bn=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Bn=Bn.next=e;return n}var Ey=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,i){t.push(i)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},jy=a.unstable_scheduleCallback,Cy=a.unstable_NormalPriority,se={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nr(){return{controller:new Ey,data:new Map,refCount:0}}function ms(t){t.refCount--,t.refCount===0&&jy(Cy,function(){t.controller.abort()})}var ps=null,Mr=0,Ei=0,ji=null;function Dy(t,e){if(ps===null){var n=ps=[];Mr=0,Ei=Ru(),ji={status:"pending",value:void 0,then:function(i){n.push(i)}}}return Mr++,e.then(Ad,Ad),e}function Ad(){if(--Mr===0&&ps!==null){ji!==null&&(ji.status="fulfilled");var t=ps;ps=null,Ei=0,ji=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Ny(t,e){var n=[],i={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return t.then(function(){i.status="fulfilled",i.value=e;for(var l=0;l<n.length;l++)(0,n[l])(e)},function(l){for(i.status="rejected",i.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),i}var Ed=A.S;A.S=function(t,e){rm=P(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&Dy(t,e),Ed!==null&&Ed(t,e)};var Ga=Ht(null);function kr(){var t=Ga.current;return t!==null?t:Gt.pooledCache}function Nl(t,e){e===null?mt(Ga,Ga.current):mt(Ga,e.pool)}function jd(){var t=kr();return t===null?null:{parent:se._currentValue,pool:t}}var Ci=Error(r(460)),Or=Error(r(474)),Ml=Error(r(542)),kl={then:function(){}};function Cd(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Dd(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then(On,On),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Md(t),t;default:if(typeof e.status=="string")e.then(On,On);else{if(t=Gt,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=e,t.status="pending",t.then(function(i){if(e.status==="pending"){var l=e;l.status="fulfilled",l.value=i}},function(i){if(e.status==="pending"){var l=e;l.status="rejected",l.reason=i}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Md(t),t}throw Xa=e,Ci}}function Ya(t){try{var e=t._init;return e(t._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Xa=n,Ci):n}}var Xa=null;function Nd(){if(Xa===null)throw Error(r(459));var t=Xa;return Xa=null,t}function Md(t){if(t===Ci||t===Ml)throw Error(r(483))}var Di=null,vs=0;function Ol(t){var e=vs;return vs+=1,Di===null&&(Di=[]),Dd(Di,t,e)}function gs(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Rl(t,e){throw e.$$typeof===x?Error(r(525)):(t=Object.prototype.toString.call(e),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function kd(t){function e(C,E){if(t){var D=C.deletions;D===null?(C.deletions=[E],C.flags|=16):D.push(E)}}function n(C,E){if(!t)return null;for(;E!==null;)e(C,E),E=E.sibling;return null}function i(C){for(var E=new Map;C!==null;)C.key!==null?E.set(C.key,C):E.set(C.index,C),C=C.sibling;return E}function l(C,E){return C=wn(C,E),C.index=0,C.sibling=null,C}function u(C,E,D){return C.index=D,t?(D=C.alternate,D!==null?(D=D.index,D<E?(C.flags|=67108866,E):D):(C.flags|=67108866,E)):(C.flags|=1048576,E)}function d(C){return t&&C.alternate===null&&(C.flags|=67108866),C}function v(C,E,D,V){return E===null||E.tag!==6?(E=Sr(D,C.mode,V),E.return=C,E):(E=l(E,D),E.return=C,E)}function T(C,E,D,V){var lt=D.type;return lt===w?z(C,E,D.props.children,V,D.key):E!==null&&(E.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===B&&Ya(lt)===E.type)?(E=l(E,D.props),gs(E,D),E.return=C,E):(E=El(D.type,D.key,D.props,null,C.mode,V),gs(E,D),E.return=C,E)}function N(C,E,D,V){return E===null||E.tag!==4||E.stateNode.containerInfo!==D.containerInfo||E.stateNode.implementation!==D.implementation?(E=Tr(D,C.mode,V),E.return=C,E):(E=l(E,D.children||[]),E.return=C,E)}function z(C,E,D,V,lt){return E===null||E.tag!==7?(E=Ua(D,C.mode,V,lt),E.return=C,E):(E=l(E,D),E.return=C,E)}function U(C,E,D){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=Sr(""+E,C.mode,D),E.return=C,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case j:return D=El(E.type,E.key,E.props,null,C.mode,D),gs(D,E),D.return=C,D;case O:return E=Tr(E,C.mode,D),E.return=C,E;case B:return E=Ya(E),U(C,E,D)}if(Yt(E)||ft(E))return E=Ua(E,C.mode,D,null),E.return=C,E;if(typeof E.then=="function")return U(C,Ol(E),D);if(E.$$typeof===L)return U(C,Dl(C,E),D);Rl(C,E)}return null}function M(C,E,D,V){var lt=E!==null?E.key:null;if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return lt!==null?null:v(C,E,""+D,V);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case j:return D.key===lt?T(C,E,D,V):null;case O:return D.key===lt?N(C,E,D,V):null;case B:return D=Ya(D),M(C,E,D,V)}if(Yt(D)||ft(D))return lt!==null?null:z(C,E,D,V,null);if(typeof D.then=="function")return M(C,E,Ol(D),V);if(D.$$typeof===L)return M(C,E,Dl(C,D),V);Rl(C,D)}return null}function k(C,E,D,V,lt){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return C=C.get(D)||null,v(E,C,""+V,lt);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case j:return C=C.get(V.key===null?D:V.key)||null,T(E,C,V,lt);case O:return C=C.get(V.key===null?D:V.key)||null,N(E,C,V,lt);case B:return V=Ya(V),k(C,E,D,V,lt)}if(Yt(V)||ft(V))return C=C.get(D)||null,z(E,C,V,lt,null);if(typeof V.then=="function")return k(C,E,D,Ol(V),lt);if(V.$$typeof===L)return k(C,E,D,Dl(E,V),lt);Rl(E,V)}return null}function tt(C,E,D,V){for(var lt=null,Nt=null,it=E,vt=E=0,Et=null;it!==null&&vt<D.length;vt++){it.index>vt?(Et=it,it=null):Et=it.sibling;var Mt=M(C,it,D[vt],V);if(Mt===null){it===null&&(it=Et);break}t&&it&&Mt.alternate===null&&e(C,it),E=u(Mt,E,vt),Nt===null?lt=Mt:Nt.sibling=Mt,Nt=Mt,it=Et}if(vt===D.length)return n(C,it),jt&&zn(C,vt),lt;if(it===null){for(;vt<D.length;vt++)it=U(C,D[vt],V),it!==null&&(E=u(it,E,vt),Nt===null?lt=it:Nt.sibling=it,Nt=it);return jt&&zn(C,vt),lt}for(it=i(it);vt<D.length;vt++)Et=k(it,C,vt,D[vt],V),Et!==null&&(t&&Et.alternate!==null&&it.delete(Et.key===null?vt:Et.key),E=u(Et,E,vt),Nt===null?lt=Et:Nt.sibling=Et,Nt=Et);return t&&it.forEach(function(_a){return e(C,_a)}),jt&&zn(C,vt),lt}function rt(C,E,D,V){if(D==null)throw Error(r(151));for(var lt=null,Nt=null,it=E,vt=E=0,Et=null,Mt=D.next();it!==null&&!Mt.done;vt++,Mt=D.next()){it.index>vt?(Et=it,it=null):Et=it.sibling;var _a=M(C,it,Mt.value,V);if(_a===null){it===null&&(it=Et);break}t&&it&&_a.alternate===null&&e(C,it),E=u(_a,E,vt),Nt===null?lt=_a:Nt.sibling=_a,Nt=_a,it=Et}if(Mt.done)return n(C,it),jt&&zn(C,vt),lt;if(it===null){for(;!Mt.done;vt++,Mt=D.next())Mt=U(C,Mt.value,V),Mt!==null&&(E=u(Mt,E,vt),Nt===null?lt=Mt:Nt.sibling=Mt,Nt=Mt);return jt&&zn(C,vt),lt}for(it=i(it);!Mt.done;vt++,Mt=D.next())Mt=k(it,C,vt,Mt.value,V),Mt!==null&&(t&&Mt.alternate!==null&&it.delete(Mt.key===null?vt:Mt.key),E=u(Mt,E,vt),Nt===null?lt=Mt:Nt.sibling=Mt,Nt=Mt);return t&&it.forEach(function(H1){return e(C,H1)}),jt&&zn(C,vt),lt}function Lt(C,E,D,V){if(typeof D=="object"&&D!==null&&D.type===w&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case j:t:{for(var lt=D.key;E!==null;){if(E.key===lt){if(lt=D.type,lt===w){if(E.tag===7){n(C,E.sibling),V=l(E,D.props.children),V.return=C,C=V;break t}}else if(E.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===B&&Ya(lt)===E.type){n(C,E.sibling),V=l(E,D.props),gs(V,D),V.return=C,C=V;break t}n(C,E);break}else e(C,E);E=E.sibling}D.type===w?(V=Ua(D.props.children,C.mode,V,D.key),V.return=C,C=V):(V=El(D.type,D.key,D.props,null,C.mode,V),gs(V,D),V.return=C,C=V)}return d(C);case O:t:{for(lt=D.key;E!==null;){if(E.key===lt)if(E.tag===4&&E.stateNode.containerInfo===D.containerInfo&&E.stateNode.implementation===D.implementation){n(C,E.sibling),V=l(E,D.children||[]),V.return=C,C=V;break t}else{n(C,E);break}else e(C,E);E=E.sibling}V=Tr(D,C.mode,V),V.return=C,C=V}return d(C);case B:return D=Ya(D),Lt(C,E,D,V)}if(Yt(D))return tt(C,E,D,V);if(ft(D)){if(lt=ft(D),typeof lt!="function")throw Error(r(150));return D=lt.call(D),rt(C,E,D,V)}if(typeof D.then=="function")return Lt(C,E,Ol(D),V);if(D.$$typeof===L)return Lt(C,E,Dl(C,D),V);Rl(C,D)}return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,E!==null&&E.tag===6?(n(C,E.sibling),V=l(E,D),V.return=C,C=V):(n(C,E),V=Sr(D,C.mode,V),V.return=C,C=V),d(C)):n(C,E)}return function(C,E,D,V){try{vs=0;var lt=Lt(C,E,D,V);return Di=null,lt}catch(it){if(it===Ci||it===Ml)throw it;var Nt=Xe(29,it,null,C.mode);return Nt.lanes=V,Nt.return=C,Nt}finally{}}}var Za=kd(!0),Od=kd(!1),la=!1;function Rr(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wr(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function oa(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ra(t,e,n){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,(Ot&2)!==0){var l=i.pending;return l===null?e.next=e:(e.next=l.next,l.next=e),i.pending=e,e=Al(t),pd(t,null,n),e}return _l(t,i,e,n),Al(t)}function ys(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,_f(t,n)}}function zr(t,e){var n=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var l=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var d={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?l=u=d:u=u.next=d,n=n.next}while(n!==null);u===null?l=u=e:u=u.next=e}else l=u=e;n={baseState:i.baseState,firstBaseUpdate:l,lastBaseUpdate:u,shared:i.shared,callbacks:i.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var Br=!1;function bs(){if(Br){var t=ji;if(t!==null)throw t}}function Ss(t,e,n,i){Br=!1;var l=t.updateQueue;la=!1;var u=l.firstBaseUpdate,d=l.lastBaseUpdate,v=l.shared.pending;if(v!==null){l.shared.pending=null;var T=v,N=T.next;T.next=null,d===null?u=N:d.next=N,d=T;var z=t.alternate;z!==null&&(z=z.updateQueue,v=z.lastBaseUpdate,v!==d&&(v===null?z.firstBaseUpdate=N:v.next=N,z.lastBaseUpdate=T))}if(u!==null){var U=l.baseState;d=0,z=N=T=null,v=u;do{var M=v.lane&-536870913,k=M!==v.lane;if(k?(At&M)===M:(i&M)===M){M!==0&&M===Ei&&(Br=!0),z!==null&&(z=z.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});t:{var tt=t,rt=v;M=e;var Lt=n;switch(rt.tag){case 1:if(tt=rt.payload,typeof tt=="function"){U=tt.call(Lt,U,M);break t}U=tt;break t;case 3:tt.flags=tt.flags&-65537|128;case 0:if(tt=rt.payload,M=typeof tt=="function"?tt.call(Lt,U,M):tt,M==null)break t;U=S({},U,M);break t;case 2:la=!0}}M=v.callback,M!==null&&(t.flags|=64,k&&(t.flags|=8192),k=l.callbacks,k===null?l.callbacks=[M]:k.push(M))}else k={lane:M,tag:v.tag,payload:v.payload,callback:v.callback,next:null},z===null?(N=z=k,T=U):z=z.next=k,d|=M;if(v=v.next,v===null){if(v=l.shared.pending,v===null)break;k=v,v=k.next,k.next=null,l.lastBaseUpdate=k,l.shared.pending=null}}while(!0);z===null&&(T=U),l.baseState=T,l.firstBaseUpdate=N,l.lastBaseUpdate=z,u===null&&(l.shared.lanes=0),ha|=d,t.lanes=d,t.memoizedState=U}}function Rd(t,e){if(typeof t!="function")throw Error(r(191,t));t.call(e)}function wd(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)Rd(n[t],e)}var Ni=Ht(null),wl=Ht(0);function zd(t,e){t=Kn,mt(wl,t),mt(Ni,e),Kn=t|e.baseLanes}function Vr(){mt(wl,Kn),mt(Ni,Ni.current)}function Ur(){Kn=wl.current,Dt(Ni),Dt(wl)}var Ze=Ht(null),un=null;function ua(t){var e=t.alternate;mt(ee,ee.current&1),mt(Ze,t),un===null&&(e===null||Ni.current!==null||e.memoizedState!==null)&&(un=t)}function Lr(t){mt(ee,ee.current),mt(Ze,t),un===null&&(un=t)}function Bd(t){t.tag===22?(mt(ee,ee.current),mt(Ze,t),un===null&&(un=t)):ca()}function ca(){mt(ee,ee.current),mt(Ze,Ze.current)}function Ke(t){Dt(Ze),un===t&&(un=null),Dt(ee)}var ee=Ht(0);function zl(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Zu(n)||Ku(n)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Un=0,pt=null,Vt=null,le=null,Bl=!1,Mi=!1,Ka=!1,Vl=0,Ts=0,ki=null,My=0;function Pt(){throw Error(r(321))}function Hr(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Ye(t[n],e[n]))return!1;return!0}function qr(t,e,n,i,l,u){return Un=u,pt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,A.H=t===null||t.memoizedState===null?bh:nu,Ka=!1,u=n(i,l),Ka=!1,Mi&&(u=Ud(e,n,i,l)),Vd(t),u}function Vd(t){A.H=As;var e=Vt!==null&&Vt.next!==null;if(Un=0,le=Vt=pt=null,Bl=!1,Ts=0,ki=null,e)throw Error(r(300));t===null||oe||(t=t.dependencies,t!==null&&Cl(t)&&(oe=!0))}function Ud(t,e,n,i){pt=t;var l=0;do{if(Mi&&(ki=null),Ts=0,Mi=!1,25<=l)throw Error(r(301));if(l+=1,le=Vt=null,t.updateQueue!=null){var u=t.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}A.H=Sh,u=e(n,i)}while(Mi);return u}function ky(){var t=A.H,e=t.useState()[0];return e=typeof e.then=="function"?xs(e):e,t=t.useState()[0],(Vt!==null?Vt.memoizedState:null)!==t&&(pt.flags|=1024),e}function Gr(){var t=Vl!==0;return Vl=0,t}function Yr(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function Xr(t){if(Bl){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Bl=!1}Un=0,le=Vt=pt=null,Mi=!1,Ts=Vl=0,ki=null}function ke(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return le===null?pt.memoizedState=le=t:le=le.next=t,le}function ne(){if(Vt===null){var t=pt.alternate;t=t!==null?t.memoizedState:null}else t=Vt.next;var e=le===null?pt.memoizedState:le.next;if(e!==null)le=e,Vt=t;else{if(t===null)throw pt.alternate===null?Error(r(467)):Error(r(310));Vt=t,t={memoizedState:Vt.memoizedState,baseState:Vt.baseState,baseQueue:Vt.baseQueue,queue:Vt.queue,next:null},le===null?pt.memoizedState=le=t:le=le.next=t}return le}function Ul(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xs(t){var e=Ts;return Ts+=1,ki===null&&(ki=[]),t=Dd(ki,t,e),e=pt,(le===null?e.memoizedState:le.next)===null&&(e=e.alternate,A.H=e===null||e.memoizedState===null?bh:nu),t}function Ll(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return xs(t);if(t.$$typeof===L)return ye(t)}throw Error(r(438,String(t)))}function Zr(t){var e=null,n=pt.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var i=pt.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(e={data:i.data.map(function(l){return l.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=Ul(),pt.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),i=0;i<t;i++)n[i]=ct;return e.index++,n}function Ln(t,e){return typeof e=="function"?e(t):e}function Hl(t){var e=ne();return Kr(e,Vt,t)}function Kr(t,e,n){var i=t.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=n;var l=t.baseQueue,u=i.pending;if(u!==null){if(l!==null){var d=l.next;l.next=u.next,u.next=d}e.baseQueue=l=u,i.pending=null}if(u=t.baseState,l===null)t.memoizedState=u;else{e=l.next;var v=d=null,T=null,N=e,z=!1;do{var U=N.lane&-536870913;if(U!==N.lane?(At&U)===U:(Un&U)===U){var M=N.revertLane;if(M===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),U===Ei&&(z=!0);else if((Un&M)===M){N=N.next,M===Ei&&(z=!0);continue}else U={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},T===null?(v=T=U,d=u):T=T.next=U,pt.lanes|=M,ha|=M;U=N.action,Ka&&n(u,U),u=N.hasEagerState?N.eagerState:n(u,U)}else M={lane:U,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},T===null?(v=T=M,d=u):T=T.next=M,pt.lanes|=U,ha|=U;N=N.next}while(N!==null&&N!==e);if(T===null?d=u:T.next=v,!Ye(u,t.memoizedState)&&(oe=!0,z&&(n=ji,n!==null)))throw n;t.memoizedState=u,t.baseState=d,t.baseQueue=T,i.lastRenderedState=u}return l===null&&(i.lanes=0),[t.memoizedState,i.dispatch]}function Qr(t){var e=ne(),n=e.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=t;var i=n.dispatch,l=n.pending,u=e.memoizedState;if(l!==null){n.pending=null;var d=l=l.next;do u=t(u,d.action),d=d.next;while(d!==l);Ye(u,e.memoizedState)||(oe=!0),e.memoizedState=u,e.baseQueue===null&&(e.baseState=u),n.lastRenderedState=u}return[u,i]}function Ld(t,e,n){var i=pt,l=ne(),u=jt;if(u){if(n===void 0)throw Error(r(407));n=n()}else n=e();var d=!Ye((Vt||l).memoizedState,n);if(d&&(l.memoizedState=n,oe=!0),l=l.queue,Fr(Gd.bind(null,i,l,t),[t]),l.getSnapshot!==e||d||le!==null&&le.memoizedState.tag&1){if(i.flags|=2048,Oi(9,{destroy:void 0},qd.bind(null,i,l,n,e),null),Gt===null)throw Error(r(349));u||(Un&127)!==0||Hd(i,e,n)}return n}function Hd(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=pt.updateQueue,e===null?(e=Ul(),pt.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function qd(t,e,n,i){e.value=n,e.getSnapshot=i,Yd(e)&&Xd(t)}function Gd(t,e,n){return n(function(){Yd(e)&&Xd(t)})}function Yd(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Ye(t,n)}catch{return!0}}function Xd(t){var e=Va(t,2);e!==null&&Ue(e,t,2)}function Jr(t){var e=ke();if(typeof t=="function"){var n=t;if(t=n(),Ka){vn(!0);try{n()}finally{vn(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:t},e}function Zd(t,e,n,i){return t.baseState=n,Kr(t,Vt,typeof i=="function"?i:Ln)}function Oy(t,e,n,i,l){if(Yl(t))throw Error(r(485));if(t=e.action,t!==null){var u={payload:l,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){u.listeners.push(d)}};A.T!==null?n(!0):u.isTransition=!1,i(u),n=e.pending,n===null?(u.next=e.pending=u,Kd(e,u)):(u.next=n.next,e.pending=n.next=u)}}function Kd(t,e){var n=e.action,i=e.payload,l=t.state;if(e.isTransition){var u=A.T,d={};A.T=d;try{var v=n(l,i),T=A.S;T!==null&&T(d,v),Qd(t,e,v)}catch(N){Ir(t,e,N)}finally{u!==null&&d.types!==null&&(u.types=d.types),A.T=u}}else try{u=n(l,i),Qd(t,e,u)}catch(N){Ir(t,e,N)}}function Qd(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){Jd(t,e,i)},function(i){return Ir(t,e,i)}):Jd(t,e,n)}function Jd(t,e,n){e.status="fulfilled",e.value=n,Id(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,Kd(t,n)))}function Ir(t,e,n){var i=t.pending;if(t.pending=null,i!==null){i=i.next;do e.status="rejected",e.reason=n,Id(e),e=e.next;while(e!==i)}t.action=null}function Id(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Fd(t,e){return e}function Pd(t,e){if(jt){var n=Gt.formState;if(n!==null){t:{var i=pt;if(jt){if(Kt){e:{for(var l=Kt,u=rn;l.nodeType!==8;){if(!u){l=null;break e}if(l=cn(l.nextSibling),l===null){l=null;break e}}u=l.data,l=u==="F!"||u==="F"?l:null}if(l){Kt=cn(l.nextSibling),i=l.data==="F!";break t}}ia(i)}i=!1}i&&(e=n[0])}}return n=ke(),n.memoizedState=n.baseState=e,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fd,lastRenderedState:e},n.queue=i,n=vh.bind(null,pt,i),i.dispatch=n,i=Jr(!1),u=eu.bind(null,pt,!1,i.queue),i=ke(),l={state:e,dispatch:null,action:t,pending:null},i.queue=l,n=Oy.bind(null,pt,l,u,n),l.dispatch=n,i.memoizedState=t,[e,n,!1]}function $d(t){var e=ne();return Wd(e,Vt,t)}function Wd(t,e,n){if(e=Kr(t,e,Fd)[0],t=Hl(Ln)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var i=xs(e)}catch(d){throw d===Ci?Ml:d}else i=e;e=ne();var l=e.queue,u=l.dispatch;return n!==e.memoizedState&&(pt.flags|=2048,Oi(9,{destroy:void 0},Ry.bind(null,l,n),null)),[i,u,t]}function Ry(t,e){t.action=e}function th(t){var e=ne(),n=Vt;if(n!==null)return Wd(e,n,t);ne(),e=e.memoizedState,n=ne();var i=n.queue.dispatch;return n.memoizedState=t,[e,i,!1]}function Oi(t,e,n,i){return t={tag:t,create:n,deps:i,inst:e,next:null},e=pt.updateQueue,e===null&&(e=Ul(),pt.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(i=n.next,n.next=t,t.next=i,e.lastEffect=t),t}function eh(){return ne().memoizedState}function ql(t,e,n,i){var l=ke();pt.flags|=t,l.memoizedState=Oi(1|e,{destroy:void 0},n,i===void 0?null:i)}function Gl(t,e,n,i){var l=ne();i=i===void 0?null:i;var u=l.memoizedState.inst;Vt!==null&&i!==null&&Hr(i,Vt.memoizedState.deps)?l.memoizedState=Oi(e,u,n,i):(pt.flags|=t,l.memoizedState=Oi(1|e,u,n,i))}function nh(t,e){ql(8390656,8,t,e)}function Fr(t,e){Gl(2048,8,t,e)}function wy(t){pt.flags|=4;var e=pt.updateQueue;if(e===null)e=Ul(),pt.updateQueue=e,e.events=[t];else{var n=e.events;n===null?e.events=[t]:n.push(t)}}function ah(t){var e=ne().memoizedState;return wy({ref:e,nextImpl:t}),function(){if((Ot&2)!==0)throw Error(r(440));return e.impl.apply(void 0,arguments)}}function ih(t,e){return Gl(4,2,t,e)}function sh(t,e){return Gl(4,4,t,e)}function lh(t,e){if(typeof e=="function"){t=t();var n=e(t);return function(){typeof n=="function"?n():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function oh(t,e,n){n=n!=null?n.concat([t]):null,Gl(4,4,lh.bind(null,e,t),n)}function Pr(){}function rh(t,e){var n=ne();e=e===void 0?null:e;var i=n.memoizedState;return e!==null&&Hr(e,i[1])?i[0]:(n.memoizedState=[t,e],t)}function uh(t,e){var n=ne();e=e===void 0?null:e;var i=n.memoizedState;if(e!==null&&Hr(e,i[1]))return i[0];if(i=t(),Ka){vn(!0);try{t()}finally{vn(!1)}}return n.memoizedState=[i,e],i}function $r(t,e,n){return n===void 0||(Un&1073741824)!==0&&(At&261930)===0?t.memoizedState=e:(t.memoizedState=n,t=cm(),pt.lanes|=t,ha|=t,n)}function ch(t,e,n,i){return Ye(n,e)?n:Ni.current!==null?(t=$r(t,n,i),Ye(t,e)||(oe=!0),t):(Un&42)===0||(Un&1073741824)!==0&&(At&261930)===0?(oe=!0,t.memoizedState=n):(t=cm(),pt.lanes|=t,ha|=t,e)}function fh(t,e,n,i,l){var u=G.p;G.p=u!==0&&8>u?u:8;var d=A.T,v={};A.T=v,eu(t,!1,e,n);try{var T=l(),N=A.S;if(N!==null&&N(v,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var z=Ny(T,i);_s(t,e,z,Ie(t))}else _s(t,e,i,Ie(t))}catch(U){_s(t,e,{then:function(){},status:"rejected",reason:U},Ie())}finally{G.p=u,d!==null&&v.types!==null&&(d.types=v.types),A.T=d}}function zy(){}function Wr(t,e,n,i){if(t.tag!==5)throw Error(r(476));var l=dh(t).queue;fh(t,l,e,et,n===null?zy:function(){return hh(t),n(i)})}function dh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:et,baseState:et,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:et},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function hh(t){var e=dh(t);e.next===null&&(e=t.alternate.memoizedState),_s(t,e.next.queue,{},Ie())}function tu(){return ye(Hs)}function mh(){return ne().memoizedState}function ph(){return ne().memoizedState}function By(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=Ie();t=oa(n);var i=ra(e,t,n);i!==null&&(Ue(i,e,n),ys(i,e,n)),e={cache:Nr()},t.payload=e;return}e=e.return}}function Vy(t,e,n){var i=Ie();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Yl(t)?gh(e,n):(n=yr(t,e,n,i),n!==null&&(Ue(n,t,i),yh(n,e,i)))}function vh(t,e,n){var i=Ie();_s(t,e,n,i)}function _s(t,e,n,i){var l={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Yl(t))gh(e,l);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var d=e.lastRenderedState,v=u(d,n);if(l.hasEagerState=!0,l.eagerState=v,Ye(v,d))return _l(t,e,l,0),Gt===null&&xl(),!1}catch{}finally{}if(n=yr(t,e,l,i),n!==null)return Ue(n,t,i),yh(n,e,i),!0}return!1}function eu(t,e,n,i){if(i={lane:2,revertLane:Ru(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Yl(t)){if(e)throw Error(r(479))}else e=yr(t,n,i,2),e!==null&&Ue(e,t,2)}function Yl(t){var e=t.alternate;return t===pt||e!==null&&e===pt}function gh(t,e){Mi=Bl=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function yh(t,e,n){if((n&4194048)!==0){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,_f(t,n)}}var As={readContext:ye,use:Ll,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useLayoutEffect:Pt,useInsertionEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useSyncExternalStore:Pt,useId:Pt,useHostTransitionStatus:Pt,useFormState:Pt,useActionState:Pt,useOptimistic:Pt,useMemoCache:Pt,useCacheRefresh:Pt};As.useEffectEvent=Pt;var bh={readContext:ye,use:Ll,useCallback:function(t,e){return ke().memoizedState=[t,e===void 0?null:e],t},useContext:ye,useEffect:nh,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,ql(4194308,4,lh.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ql(4194308,4,t,e)},useInsertionEffect:function(t,e){ql(4,2,t,e)},useMemo:function(t,e){var n=ke();e=e===void 0?null:e;var i=t();if(Ka){vn(!0);try{t()}finally{vn(!1)}}return n.memoizedState=[i,e],i},useReducer:function(t,e,n){var i=ke();if(n!==void 0){var l=n(e);if(Ka){vn(!0);try{n(e)}finally{vn(!1)}}}else l=e;return i.memoizedState=i.baseState=l,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:l},i.queue=t,t=t.dispatch=Vy.bind(null,pt,t),[i.memoizedState,t]},useRef:function(t){var e=ke();return t={current:t},e.memoizedState=t},useState:function(t){t=Jr(t);var e=t.queue,n=vh.bind(null,pt,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:Pr,useDeferredValue:function(t,e){var n=ke();return $r(n,t,e)},useTransition:function(){var t=Jr(!1);return t=fh.bind(null,pt,t.queue,!0,!1),ke().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var i=pt,l=ke();if(jt){if(n===void 0)throw Error(r(407));n=n()}else{if(n=e(),Gt===null)throw Error(r(349));(At&127)!==0||Hd(i,e,n)}l.memoizedState=n;var u={value:n,getSnapshot:e};return l.queue=u,nh(Gd.bind(null,i,u,t),[t]),i.flags|=2048,Oi(9,{destroy:void 0},qd.bind(null,i,u,n,e),null),n},useId:function(){var t=ke(),e=Gt.identifierPrefix;if(jt){var n=En,i=An;n=(i&~(1<<32-je(i)-1)).toString(32)+n,e="_"+e+"R_"+n,n=Vl++,0<n&&(e+="H"+n.toString(32)),e+="_"}else n=My++,e="_"+e+"r_"+n.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:tu,useFormState:Pd,useActionState:Pd,useOptimistic:function(t){var e=ke();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=eu.bind(null,pt,!0,n),n.dispatch=e,[t,e]},useMemoCache:Zr,useCacheRefresh:function(){return ke().memoizedState=By.bind(null,pt)},useEffectEvent:function(t){var e=ke(),n={impl:t};return e.memoizedState=n,function(){if((Ot&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},nu={readContext:ye,use:Ll,useCallback:rh,useContext:ye,useEffect:Fr,useImperativeHandle:oh,useInsertionEffect:ih,useLayoutEffect:sh,useMemo:uh,useReducer:Hl,useRef:eh,useState:function(){return Hl(Ln)},useDebugValue:Pr,useDeferredValue:function(t,e){var n=ne();return ch(n,Vt.memoizedState,t,e)},useTransition:function(){var t=Hl(Ln)[0],e=ne().memoizedState;return[typeof t=="boolean"?t:xs(t),e]},useSyncExternalStore:Ld,useId:mh,useHostTransitionStatus:tu,useFormState:$d,useActionState:$d,useOptimistic:function(t,e){var n=ne();return Zd(n,Vt,t,e)},useMemoCache:Zr,useCacheRefresh:ph};nu.useEffectEvent=ah;var Sh={readContext:ye,use:Ll,useCallback:rh,useContext:ye,useEffect:Fr,useImperativeHandle:oh,useInsertionEffect:ih,useLayoutEffect:sh,useMemo:uh,useReducer:Qr,useRef:eh,useState:function(){return Qr(Ln)},useDebugValue:Pr,useDeferredValue:function(t,e){var n=ne();return Vt===null?$r(n,t,e):ch(n,Vt.memoizedState,t,e)},useTransition:function(){var t=Qr(Ln)[0],e=ne().memoizedState;return[typeof t=="boolean"?t:xs(t),e]},useSyncExternalStore:Ld,useId:mh,useHostTransitionStatus:tu,useFormState:th,useActionState:th,useOptimistic:function(t,e){var n=ne();return Vt!==null?Zd(n,Vt,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:Zr,useCacheRefresh:ph};Sh.useEffectEvent=ah;function au(t,e,n,i){e=t.memoizedState,n=n(i,e),n=n==null?e:S({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var iu={enqueueSetState:function(t,e,n){t=t._reactInternals;var i=Ie(),l=oa(i);l.payload=e,n!=null&&(l.callback=n),e=ra(t,l,i),e!==null&&(Ue(e,t,i),ys(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var i=Ie(),l=oa(i);l.tag=1,l.payload=e,n!=null&&(l.callback=n),e=ra(t,l,i),e!==null&&(Ue(e,t,i),ys(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Ie(),i=oa(n);i.tag=2,e!=null&&(i.callback=e),e=ra(t,i,n),e!==null&&(Ue(e,t,n),ys(e,t,n))}};function Th(t,e,n,i,l,u,d){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(i,u,d):e.prototype&&e.prototype.isPureReactComponent?!cs(n,i)||!cs(l,u):!0}function xh(t,e,n,i){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,i),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,i),e.state!==t&&iu.enqueueReplaceState(e,e.state,null)}function Qa(t,e){var n=e;if("ref"in e){n={};for(var i in e)i!=="ref"&&(n[i]=e[i])}if(t=t.defaultProps){n===e&&(n=S({},n));for(var l in t)n[l]===void 0&&(n[l]=t[l])}return n}function _h(t){Tl(t)}function Ah(t){console.error(t)}function Eh(t){Tl(t)}function Xl(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(i){setTimeout(function(){throw i})}}function jh(t,e,n){try{var i=t.onCaughtError;i(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function su(t,e,n){return n=oa(n),n.tag=3,n.payload={element:null},n.callback=function(){Xl(t,e)},n}function Ch(t){return t=oa(t),t.tag=3,t}function Dh(t,e,n,i){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var u=i.value;t.payload=function(){return l(u)},t.callback=function(){jh(e,n,i)}}var d=n.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(t.callback=function(){jh(e,n,i),typeof l!="function"&&(ma===null?ma=new Set([this]):ma.add(this));var v=i.stack;this.componentDidCatch(i.value,{componentStack:v!==null?v:""})})}function Uy(t,e,n,i,l){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(e=n.alternate,e!==null&&Ai(e,n,l,!0),n=Ze.current,n!==null){switch(n.tag){case 31:case 13:return un===null?no():n.alternate===null&&$t===0&&($t=3),n.flags&=-257,n.flags|=65536,n.lanes=l,i===kl?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([i]):e.add(i),Mu(t,i,l)),!1;case 22:return n.flags|=65536,i===kl?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([i]):n.add(i)),Mu(t,i,l)),!1}throw Error(r(435,n.tag))}return Mu(t,i,l),no(),!1}if(jt)return e=Ze.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=l,i!==Ar&&(t=Error(r(422),{cause:i}),hs(sn(t,n)))):(i!==Ar&&(e=Error(r(423),{cause:i}),hs(sn(e,n))),t=t.current.alternate,t.flags|=65536,l&=-l,t.lanes|=l,i=sn(i,n),l=su(t.stateNode,i,l),zr(t,l),$t!==4&&($t=2)),!1;var u=Error(r(520),{cause:i});if(u=sn(u,n),Os===null?Os=[u]:Os.push(u),$t!==4&&($t=2),e===null)return!0;i=sn(i,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=l&-l,n.lanes|=t,t=su(n.stateNode,i,t),zr(n,t),!1;case 1:if(e=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(ma===null||!ma.has(u))))return n.flags|=65536,l&=-l,n.lanes|=l,l=Ch(l),Dh(l,t,n,i),zr(n,l),!1}n=n.return}while(n!==null);return!1}var lu=Error(r(461)),oe=!1;function be(t,e,n,i){e.child=t===null?Od(e,null,n,i):Za(e,t.child,n,i)}function Nh(t,e,n,i,l){n=n.render;var u=e.ref;if("ref"in i){var d={};for(var v in i)v!=="ref"&&(d[v]=i[v])}else d=i;return qa(e),i=qr(t,e,n,d,u,l),v=Gr(),t!==null&&!oe?(Yr(t,e,l),Hn(t,e,l)):(jt&&v&&xr(e),e.flags|=1,be(t,e,i,l),e.child)}function Mh(t,e,n,i,l){if(t===null){var u=n.type;return typeof u=="function"&&!br(u)&&u.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=u,kh(t,e,u,i,l)):(t=El(n.type,null,i,e,e.mode,l),t.ref=e.ref,t.return=e,e.child=t)}if(u=t.child,!mu(t,l)){var d=u.memoizedProps;if(n=n.compare,n=n!==null?n:cs,n(d,i)&&t.ref===e.ref)return Hn(t,e,l)}return e.flags|=1,t=wn(u,i),t.ref=e.ref,t.return=e,e.child=t}function kh(t,e,n,i,l){if(t!==null){var u=t.memoizedProps;if(cs(u,i)&&t.ref===e.ref)if(oe=!1,e.pendingProps=i=u,mu(t,l))(t.flags&131072)!==0&&(oe=!0);else return e.lanes=t.lanes,Hn(t,e,l)}return ou(t,e,n,i,l)}function Oh(t,e,n,i){var l=i.children,u=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((e.flags&128)!==0){if(u=u!==null?u.baseLanes|n:n,t!==null){for(i=e.child=t.child,l=0;i!==null;)l=l|i.lanes|i.childLanes,i=i.sibling;i=l&~u}else i=0,e.child=null;return Rh(t,e,u,n,i)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Nl(e,u!==null?u.cachePool:null),u!==null?zd(e,u):Vr(),Bd(e);else return i=e.lanes=536870912,Rh(t,e,u!==null?u.baseLanes|n:n,n,i)}else u!==null?(Nl(e,u.cachePool),zd(e,u),ca(),e.memoizedState=null):(t!==null&&Nl(e,null),Vr(),ca());return be(t,e,l,n),e.child}function Es(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function Rh(t,e,n,i,l){var u=kr();return u=u===null?null:{parent:se._currentValue,pool:u},e.memoizedState={baseLanes:n,cachePool:u},t!==null&&Nl(e,null),Vr(),Bd(e),t!==null&&Ai(t,e,i,!0),e.childLanes=l,null}function Zl(t,e){return e=Ql({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function wh(t,e,n){return Za(e,t.child,null,n),t=Zl(e,e.pendingProps),t.flags|=2,Ke(e),e.memoizedState=null,t}function Ly(t,e,n){var i=e.pendingProps,l=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(jt){if(i.mode==="hidden")return t=Zl(e,i),e.lanes=536870912,Es(null,t);if(Lr(e),(t=Kt)?(t=Km(t,rn),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:na!==null?{id:An,overflow:En}:null,retryLane:536870912,hydrationErrors:null},n=gd(t),n.return=e,e.child=n,ge=e,Kt=null)):t=null,t===null)throw ia(e);return e.lanes=536870912,null}return Zl(e,i)}var u=t.memoizedState;if(u!==null){var d=u.dehydrated;if(Lr(e),l)if(e.flags&256)e.flags&=-257,e=wh(t,e,n);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(r(558));else if(oe||Ai(t,e,n,!1),l=(n&t.childLanes)!==0,oe||l){if(i=Gt,i!==null&&(d=Af(i,n),d!==0&&d!==u.retryLane))throw u.retryLane=d,Va(t,d),Ue(i,t,d),lu;no(),e=wh(t,e,n)}else t=u.treeContext,Kt=cn(d.nextSibling),ge=e,jt=!0,aa=null,rn=!1,t!==null&&Sd(e,t),e=Zl(e,i),e.flags|=4096;return e}return t=wn(t.child,{mode:i.mode,children:i.children}),t.ref=e.ref,e.child=t,t.return=e,t}function Kl(t,e){var n=e.ref;if(n===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(t===null||t.ref!==n)&&(e.flags|=4194816)}}function ou(t,e,n,i,l){return qa(e),n=qr(t,e,n,i,void 0,l),i=Gr(),t!==null&&!oe?(Yr(t,e,l),Hn(t,e,l)):(jt&&i&&xr(e),e.flags|=1,be(t,e,n,l),e.child)}function zh(t,e,n,i,l,u){return qa(e),e.updateQueue=null,n=Ud(e,i,n,l),Vd(t),i=Gr(),t!==null&&!oe?(Yr(t,e,u),Hn(t,e,u)):(jt&&i&&xr(e),e.flags|=1,be(t,e,n,u),e.child)}function Bh(t,e,n,i,l){if(qa(e),e.stateNode===null){var u=Si,d=n.contextType;typeof d=="object"&&d!==null&&(u=ye(d)),u=new n(i,u),e.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=iu,e.stateNode=u,u._reactInternals=e,u=e.stateNode,u.props=i,u.state=e.memoizedState,u.refs={},Rr(e),d=n.contextType,u.context=typeof d=="object"&&d!==null?ye(d):Si,u.state=e.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(au(e,n,d,i),u.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(d=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),d!==u.state&&iu.enqueueReplaceState(u,u.state,null),Ss(e,i,u,l),bs(),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308),i=!0}else if(t===null){u=e.stateNode;var v=e.memoizedProps,T=Qa(n,v);u.props=T;var N=u.context,z=n.contextType;d=Si,typeof z=="object"&&z!==null&&(d=ye(z));var U=n.getDerivedStateFromProps;z=typeof U=="function"||typeof u.getSnapshotBeforeUpdate=="function",v=e.pendingProps!==v,z||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(v||N!==d)&&xh(e,u,i,d),la=!1;var M=e.memoizedState;u.state=M,Ss(e,i,u,l),bs(),N=e.memoizedState,v||M!==N||la?(typeof U=="function"&&(au(e,n,U,i),N=e.memoizedState),(T=la||Th(e,n,T,i,M,N,d))?(z||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(e.flags|=4194308)):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=N),u.props=i,u.state=N,u.context=d,i=T):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{u=e.stateNode,wr(t,e),d=e.memoizedProps,z=Qa(n,d),u.props=z,U=e.pendingProps,M=u.context,N=n.contextType,T=Si,typeof N=="object"&&N!==null&&(T=ye(N)),v=n.getDerivedStateFromProps,(N=typeof v=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(d!==U||M!==T)&&xh(e,u,i,T),la=!1,M=e.memoizedState,u.state=M,Ss(e,i,u,l),bs();var k=e.memoizedState;d!==U||M!==k||la||t!==null&&t.dependencies!==null&&Cl(t.dependencies)?(typeof v=="function"&&(au(e,n,v,i),k=e.memoizedState),(z=la||Th(e,n,z,i,M,k,T)||t!==null&&t.dependencies!==null&&Cl(t.dependencies))?(N||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(i,k,T),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(i,k,T)),typeof u.componentDidUpdate=="function"&&(e.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof u.componentDidUpdate!="function"||d===t.memoizedProps&&M===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===t.memoizedProps&&M===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=k),u.props=i,u.state=k,u.context=T,i=z):(typeof u.componentDidUpdate!="function"||d===t.memoizedProps&&M===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===t.memoizedProps&&M===t.memoizedState||(e.flags|=1024),i=!1)}return u=i,Kl(t,e),i=(e.flags&128)!==0,u||i?(u=e.stateNode,n=i&&typeof n.getDerivedStateFromError!="function"?null:u.render(),e.flags|=1,t!==null&&i?(e.child=Za(e,t.child,null,l),e.child=Za(e,null,n,l)):be(t,e,n,l),e.memoizedState=u.state,t=e.child):t=Hn(t,e,l),t}function Vh(t,e,n,i){return La(),e.flags|=256,be(t,e,n,i),e.child}var ru={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uu(t){return{baseLanes:t,cachePool:jd()}}function cu(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=Je),t}function Uh(t,e,n){var i=e.pendingProps,l=!1,u=(e.flags&128)!==0,d;if((d=u)||(d=t!==null&&t.memoizedState===null?!1:(ee.current&2)!==0),d&&(l=!0,e.flags&=-129),d=(e.flags&32)!==0,e.flags&=-33,t===null){if(jt){if(l?ua(e):ca(),(t=Kt)?(t=Km(t,rn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:na!==null?{id:An,overflow:En}:null,retryLane:536870912,hydrationErrors:null},n=gd(t),n.return=e,e.child=n,ge=e,Kt=null)):t=null,t===null)throw ia(e);return Ku(t)?e.lanes=32:e.lanes=536870912,null}var v=i.children;return i=i.fallback,l?(ca(),l=e.mode,v=Ql({mode:"hidden",children:v},l),i=Ua(i,l,n,null),v.return=e,i.return=e,v.sibling=i,e.child=v,i=e.child,i.memoizedState=uu(n),i.childLanes=cu(t,d,n),e.memoizedState=ru,Es(null,i)):(ua(e),fu(e,v))}var T=t.memoizedState;if(T!==null&&(v=T.dehydrated,v!==null)){if(u)e.flags&256?(ua(e),e.flags&=-257,e=du(t,e,n)):e.memoizedState!==null?(ca(),e.child=t.child,e.flags|=128,e=null):(ca(),v=i.fallback,l=e.mode,i=Ql({mode:"visible",children:i.children},l),v=Ua(v,l,n,null),v.flags|=2,i.return=e,v.return=e,i.sibling=v,e.child=i,Za(e,t.child,null,n),i=e.child,i.memoizedState=uu(n),i.childLanes=cu(t,d,n),e.memoizedState=ru,e=Es(null,i));else if(ua(e),Ku(v)){if(d=v.nextSibling&&v.nextSibling.dataset,d)var N=d.dgst;d=N,i=Error(r(419)),i.stack="",i.digest=d,hs({value:i,source:null,stack:null}),e=du(t,e,n)}else if(oe||Ai(t,e,n,!1),d=(n&t.childLanes)!==0,oe||d){if(d=Gt,d!==null&&(i=Af(d,n),i!==0&&i!==T.retryLane))throw T.retryLane=i,Va(t,i),Ue(d,t,i),lu;Zu(v)||no(),e=du(t,e,n)}else Zu(v)?(e.flags|=192,e.child=t.child,e=null):(t=T.treeContext,Kt=cn(v.nextSibling),ge=e,jt=!0,aa=null,rn=!1,t!==null&&Sd(e,t),e=fu(e,i.children),e.flags|=4096);return e}return l?(ca(),v=i.fallback,l=e.mode,T=t.child,N=T.sibling,i=wn(T,{mode:"hidden",children:i.children}),i.subtreeFlags=T.subtreeFlags&65011712,N!==null?v=wn(N,v):(v=Ua(v,l,n,null),v.flags|=2),v.return=e,i.return=e,i.sibling=v,e.child=i,Es(null,i),i=e.child,v=t.child.memoizedState,v===null?v=uu(n):(l=v.cachePool,l!==null?(T=se._currentValue,l=l.parent!==T?{parent:T,pool:T}:l):l=jd(),v={baseLanes:v.baseLanes|n,cachePool:l}),i.memoizedState=v,i.childLanes=cu(t,d,n),e.memoizedState=ru,Es(t.child,i)):(ua(e),n=t.child,t=n.sibling,n=wn(n,{mode:"visible",children:i.children}),n.return=e,n.sibling=null,t!==null&&(d=e.deletions,d===null?(e.deletions=[t],e.flags|=16):d.push(t)),e.child=n,e.memoizedState=null,n)}function fu(t,e){return e=Ql({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Ql(t,e){return t=Xe(22,t,null,e),t.lanes=0,t}function du(t,e,n){return Za(e,t.child,null,n),t=fu(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Lh(t,e,n){t.lanes|=e;var i=t.alternate;i!==null&&(i.lanes|=e),Cr(t.return,e,n)}function hu(t,e,n,i,l,u){var d=t.memoizedState;d===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:l,treeForkCount:u}:(d.isBackwards=e,d.rendering=null,d.renderingStartTime=0,d.last=i,d.tail=n,d.tailMode=l,d.treeForkCount=u)}function Hh(t,e,n){var i=e.pendingProps,l=i.revealOrder,u=i.tail;i=i.children;var d=ee.current,v=(d&2)!==0;if(v?(d=d&1|2,e.flags|=128):d&=1,mt(ee,d),be(t,e,i,n),i=jt?ds:0,!v&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Lh(t,n,e);else if(t.tag===19)Lh(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(l){case"forwards":for(n=e.child,l=null;n!==null;)t=n.alternate,t!==null&&zl(t)===null&&(l=n),n=n.sibling;n=l,n===null?(l=e.child,e.child=null):(l=n.sibling,n.sibling=null),hu(e,!1,l,n,u,i);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=e.child,e.child=null;l!==null;){if(t=l.alternate,t!==null&&zl(t)===null){e.child=l;break}t=l.sibling,l.sibling=n,n=l,l=t}hu(e,!0,n,null,u,i);break;case"together":hu(e,!1,null,null,void 0,i);break;default:e.memoizedState=null}return e.child}function Hn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),ha|=e.lanes,(n&e.childLanes)===0)if(t!==null){if(Ai(t,e,n,!1),(n&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(r(153));if(e.child!==null){for(t=e.child,n=wn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=wn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function mu(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Cl(t)))}function Hy(t,e,n){switch(e.tag){case 3:We(e,e.stateNode.containerInfo),sa(e,se,t.memoizedState.cache),La();break;case 27:case 5:mn(e);break;case 4:We(e,e.stateNode.containerInfo);break;case 10:sa(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,Lr(e),null;break;case 13:var i=e.memoizedState;if(i!==null)return i.dehydrated!==null?(ua(e),e.flags|=128,null):(n&e.child.childLanes)!==0?Uh(t,e,n):(ua(e),t=Hn(t,e,n),t!==null?t.sibling:null);ua(e);break;case 19:var l=(t.flags&128)!==0;if(i=(n&e.childLanes)!==0,i||(Ai(t,e,n,!1),i=(n&e.childLanes)!==0),l){if(i)return Hh(t,e,n);e.flags|=128}if(l=e.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),mt(ee,ee.current),i)break;return null;case 22:return e.lanes=0,Oh(t,e,n,e.pendingProps);case 24:sa(e,se,t.memoizedState.cache)}return Hn(t,e,n)}function qh(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)oe=!0;else{if(!mu(t,n)&&(e.flags&128)===0)return oe=!1,Hy(t,e,n);oe=(t.flags&131072)!==0}else oe=!1,jt&&(e.flags&1048576)!==0&&bd(e,ds,e.index);switch(e.lanes=0,e.tag){case 16:t:{var i=e.pendingProps;if(t=Ya(e.elementType),e.type=t,typeof t=="function")br(t)?(i=Qa(t,i),e.tag=1,e=Bh(null,e,t,i,n)):(e.tag=0,e=ou(null,e,t,i,n));else{if(t!=null){var l=t.$$typeof;if(l===R){e.tag=11,e=Nh(null,e,t,i,n);break t}else if(l===I){e.tag=14,e=Mh(null,e,t,i,n);break t}}throw e=Ct(t)||t,Error(r(306,e,""))}}return e;case 0:return ou(t,e,e.type,e.pendingProps,n);case 1:return i=e.type,l=Qa(i,e.pendingProps),Bh(t,e,i,l,n);case 3:t:{if(We(e,e.stateNode.containerInfo),t===null)throw Error(r(387));i=e.pendingProps;var u=e.memoizedState;l=u.element,wr(t,e),Ss(e,i,null,n);var d=e.memoizedState;if(i=d.cache,sa(e,se,i),i!==u.cache&&Dr(e,[se],n,!0),bs(),i=d.element,u.isDehydrated)if(u={element:i,isDehydrated:!1,cache:d.cache},e.updateQueue.baseState=u,e.memoizedState=u,e.flags&256){e=Vh(t,e,i,n);break t}else if(i!==l){l=sn(Error(r(424)),e),hs(l),e=Vh(t,e,i,n);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Kt=cn(t.firstChild),ge=e,jt=!0,aa=null,rn=!0,n=Od(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(La(),i===l){e=Hn(t,e,n);break t}be(t,e,i,n)}e=e.child}return e;case 26:return Kl(t,e),t===null?(n=$m(e.type,null,e.pendingProps,null))?e.memoizedState=n:jt||(n=e.type,t=e.pendingProps,i=uo(_e.current).createElement(n),i[ve]=e,i[Oe]=t,Se(i,n,t),he(i),e.stateNode=i):e.memoizedState=$m(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return mn(e),t===null&&jt&&(i=e.stateNode=Im(e.type,e.pendingProps,_e.current),ge=e,rn=!0,l=Kt,ya(e.type)?(Qu=l,Kt=cn(i.firstChild)):Kt=l),be(t,e,e.pendingProps.children,n),Kl(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&jt&&((l=i=Kt)&&(i=v1(i,e.type,e.pendingProps,rn),i!==null?(e.stateNode=i,ge=e,Kt=cn(i.firstChild),rn=!1,l=!0):l=!1),l||ia(e)),mn(e),l=e.type,u=e.pendingProps,d=t!==null?t.memoizedProps:null,i=u.children,Gu(l,u)?i=null:d!==null&&Gu(l,d)&&(e.flags|=32),e.memoizedState!==null&&(l=qr(t,e,ky,null,null,n),Hs._currentValue=l),Kl(t,e),be(t,e,i,n),e.child;case 6:return t===null&&jt&&((t=n=Kt)&&(n=g1(n,e.pendingProps,rn),n!==null?(e.stateNode=n,ge=e,Kt=null,t=!0):t=!1),t||ia(e)),null;case 13:return Uh(t,e,n);case 4:return We(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=Za(e,null,i,n):be(t,e,i,n),e.child;case 11:return Nh(t,e,e.type,e.pendingProps,n);case 7:return be(t,e,e.pendingProps,n),e.child;case 8:return be(t,e,e.pendingProps.children,n),e.child;case 12:return be(t,e,e.pendingProps.children,n),e.child;case 10:return i=e.pendingProps,sa(e,e.type,i.value),be(t,e,i.children,n),e.child;case 9:return l=e.type._context,i=e.pendingProps.children,qa(e),l=ye(l),i=i(l),e.flags|=1,be(t,e,i,n),e.child;case 14:return Mh(t,e,e.type,e.pendingProps,n);case 15:return kh(t,e,e.type,e.pendingProps,n);case 19:return Hh(t,e,n);case 31:return Ly(t,e,n);case 22:return Oh(t,e,n,e.pendingProps);case 24:return qa(e),i=ye(se),t===null?(l=kr(),l===null&&(l=Gt,u=Nr(),l.pooledCache=u,u.refCount++,u!==null&&(l.pooledCacheLanes|=n),l=u),e.memoizedState={parent:i,cache:l},Rr(e),sa(e,se,l)):((t.lanes&n)!==0&&(wr(t,e),Ss(e,null,null,n),bs()),l=t.memoizedState,u=e.memoizedState,l.parent!==i?(l={parent:i,cache:i},e.memoizedState=l,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=l),sa(e,se,i)):(i=u.cache,sa(e,se,i),i!==l.cache&&Dr(e,[se],n,!0))),be(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(r(156,e.tag))}function qn(t){t.flags|=4}function pu(t,e,n,i,l){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(l&335544128)===l)if(t.stateNode.complete)t.flags|=8192;else if(mm())t.flags|=8192;else throw Xa=kl,Or}else t.flags&=-16777217}function Gh(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!ap(e))if(mm())t.flags|=8192;else throw Xa=kl,Or}function Jl(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Bt():536870912,t.lanes|=e,Bi|=e)}function js(t,e){if(!jt)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:i.sibling=null}}function Qt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,i=0;if(e)for(var l=t.child;l!==null;)n|=l.lanes|l.childLanes,i|=l.subtreeFlags&65011712,i|=l.flags&65011712,l.return=t,l=l.sibling;else for(l=t.child;l!==null;)n|=l.lanes|l.childLanes,i|=l.subtreeFlags,i|=l.flags,l.return=t,l=l.sibling;return t.subtreeFlags|=i,t.childLanes=n,e}function qy(t,e,n){var i=e.pendingProps;switch(_r(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qt(e),null;case 1:return Qt(e),null;case 3:return n=e.stateNode,i=null,t!==null&&(i=t.memoizedState.cache),e.memoizedState.cache!==i&&(e.flags|=2048),Vn(se),Ne(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(_i(e)?qn(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Er())),Qt(e),null;case 26:var l=e.type,u=e.memoizedState;return t===null?(qn(e),u!==null?(Qt(e),Gh(e,u)):(Qt(e),pu(e,l,null,i,n))):u?u!==t.memoizedState?(qn(e),Qt(e),Gh(e,u)):(Qt(e),e.flags&=-16777217):(t=t.memoizedProps,t!==i&&qn(e),Qt(e),pu(e,l,t,i,n)),null;case 27:if(He(e),n=_e.current,l=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==i&&qn(e);else{if(!i){if(e.stateNode===null)throw Error(r(166));return Qt(e),null}t=qt.current,_i(e)?Td(e):(t=Im(l,i,n),e.stateNode=t,qn(e))}return Qt(e),null;case 5:if(He(e),l=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==i&&qn(e);else{if(!i){if(e.stateNode===null)throw Error(r(166));return Qt(e),null}if(u=qt.current,_i(e))Td(e);else{var d=uo(_e.current);switch(u){case 1:u=d.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:u=d.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":u=d.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":u=d.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":u=d.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof i.is=="string"?d.createElement("select",{is:i.is}):d.createElement("select"),i.multiple?u.multiple=!0:i.size&&(u.size=i.size);break;default:u=typeof i.is=="string"?d.createElement(l,{is:i.is}):d.createElement(l)}}u[ve]=e,u[Oe]=i;t:for(d=e.child;d!==null;){if(d.tag===5||d.tag===6)u.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break t;for(;d.sibling===null;){if(d.return===null||d.return===e)break t;d=d.return}d.sibling.return=d.return,d=d.sibling}e.stateNode=u;t:switch(Se(u,l,i),l){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break t;case"img":i=!0;break t;default:i=!1}i&&qn(e)}}return Qt(e),pu(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==i&&qn(e);else{if(typeof i!="string"&&e.stateNode===null)throw Error(r(166));if(t=_e.current,_i(e)){if(t=e.stateNode,n=e.memoizedProps,i=null,l=ge,l!==null)switch(l.tag){case 27:case 5:i=l.memoizedProps}t[ve]=e,t=!!(t.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||Um(t.nodeValue,n)),t||ia(e,!0)}else t=uo(t).createTextNode(i),t[ve]=e,e.stateNode=t}return Qt(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(i=_i(e),n!==null){if(t===null){if(!i)throw Error(r(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[ve]=e}else La(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Qt(e),t=!1}else n=Er(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(Ke(e),e):(Ke(e),null);if((e.flags&128)!==0)throw Error(r(558))}return Qt(e),null;case 13:if(i=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(l=_i(e),i!==null&&i.dehydrated!==null){if(t===null){if(!l)throw Error(r(318));if(l=e.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(317));l[ve]=e}else La(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Qt(e),l=!1}else l=Er(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),l=!0;if(!l)return e.flags&256?(Ke(e),e):(Ke(e),null)}return Ke(e),(e.flags&128)!==0?(e.lanes=n,e):(n=i!==null,t=t!==null&&t.memoizedState!==null,n&&(i=e.child,l=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(l=i.alternate.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==l&&(i.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),Jl(e,e.updateQueue),Qt(e),null);case 4:return Ne(),t===null&&Vu(e.stateNode.containerInfo),Qt(e),null;case 10:return Vn(e.type),Qt(e),null;case 19:if(Dt(ee),i=e.memoizedState,i===null)return Qt(e),null;if(l=(e.flags&128)!==0,u=i.rendering,u===null)if(l)js(i,!1);else{if($t!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=zl(t),u!==null){for(e.flags|=128,js(i,!1),t=u.updateQueue,e.updateQueue=t,Jl(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)vd(n,t),n=n.sibling;return mt(ee,ee.current&1|2),jt&&zn(e,i.treeForkCount),e.child}t=t.sibling}i.tail!==null&&P()>Wl&&(e.flags|=128,l=!0,js(i,!1),e.lanes=4194304)}else{if(!l)if(t=zl(u),t!==null){if(e.flags|=128,l=!0,t=t.updateQueue,e.updateQueue=t,Jl(e,t),js(i,!0),i.tail===null&&i.tailMode==="hidden"&&!u.alternate&&!jt)return Qt(e),null}else 2*P()-i.renderingStartTime>Wl&&n!==536870912&&(e.flags|=128,l=!0,js(i,!1),e.lanes=4194304);i.isBackwards?(u.sibling=e.child,e.child=u):(t=i.last,t!==null?t.sibling=u:e.child=u,i.last=u)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=P(),t.sibling=null,n=ee.current,mt(ee,l?n&1|2:n&1),jt&&zn(e,i.treeForkCount),t):(Qt(e),null);case 22:case 23:return Ke(e),Ur(),i=e.memoizedState!==null,t!==null?t.memoizedState!==null!==i&&(e.flags|=8192):i&&(e.flags|=8192),i?(n&536870912)!==0&&(e.flags&128)===0&&(Qt(e),e.subtreeFlags&6&&(e.flags|=8192)):Qt(e),n=e.updateQueue,n!==null&&Jl(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),i=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),i!==n&&(e.flags|=2048),t!==null&&Dt(Ga),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),Vn(se),Qt(e),null;case 25:return null;case 30:return null}throw Error(r(156,e.tag))}function Gy(t,e){switch(_r(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Vn(se),Ne(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return He(e),null;case 31:if(e.memoizedState!==null){if(Ke(e),e.alternate===null)throw Error(r(340));La()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Ke(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(r(340));La()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Dt(ee),null;case 4:return Ne(),null;case 10:return Vn(e.type),null;case 22:case 23:return Ke(e),Ur(),t!==null&&Dt(Ga),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Vn(se),null;case 25:return null;default:return null}}function Yh(t,e){switch(_r(e),e.tag){case 3:Vn(se),Ne();break;case 26:case 27:case 5:He(e);break;case 4:Ne();break;case 31:e.memoizedState!==null&&Ke(e);break;case 13:Ke(e);break;case 19:Dt(ee);break;case 10:Vn(e.type);break;case 22:case 23:Ke(e),Ur(),t!==null&&Dt(Ga);break;case 24:Vn(se)}}function Cs(t,e){try{var n=e.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var l=i.next;n=l;do{if((n.tag&t)===t){i=void 0;var u=n.create,d=n.inst;i=u(),d.destroy=i}n=n.next}while(n!==l)}}catch(v){zt(e,e.return,v)}}function fa(t,e,n){try{var i=e.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var u=l.next;i=u;do{if((i.tag&t)===t){var d=i.inst,v=d.destroy;if(v!==void 0){d.destroy=void 0,l=e;var T=n,N=v;try{N()}catch(z){zt(l,T,z)}}}i=i.next}while(i!==u)}}catch(z){zt(e,e.return,z)}}function Xh(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{wd(e,n)}catch(i){zt(t,t.return,i)}}}function Zh(t,e,n){n.props=Qa(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(i){zt(t,e,i)}}function Ds(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var i=t.stateNode;break;case 30:i=t.stateNode;break;default:i=t.stateNode}typeof n=="function"?t.refCleanup=n(i):n.current=i}}catch(l){zt(t,e,l)}}function jn(t,e){var n=t.ref,i=t.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(l){zt(t,e,l)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){zt(t,e,l)}else n.current=null}function Kh(t){var e=t.type,n=t.memoizedProps,i=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break t;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(l){zt(t,t.return,l)}}function vu(t,e,n){try{var i=t.stateNode;c1(i,t.type,n,e),i[Oe]=e}catch(l){zt(t,t.return,l)}}function Qh(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&ya(t.type)||t.tag===4}function gu(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Qh(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&ya(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function yu(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=On));else if(i!==4&&(i===27&&ya(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(yu(t,e,n),t=t.sibling;t!==null;)yu(t,e,n),t=t.sibling}function Il(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(i!==4&&(i===27&&ya(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(Il(t,e,n),t=t.sibling;t!==null;)Il(t,e,n),t=t.sibling}function Jh(t){var e=t.stateNode,n=t.memoizedProps;try{for(var i=t.type,l=e.attributes;l.length;)e.removeAttributeNode(l[0]);Se(e,i,n),e[ve]=t,e[Oe]=n}catch(u){zt(t,t.return,u)}}var Gn=!1,re=!1,bu=!1,Ih=typeof WeakSet=="function"?WeakSet:Set,me=null;function Yy(t,e){if(t=t.containerInfo,Hu=go,t=od(t),dr(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var l=i.anchorOffset,u=i.focusNode;i=i.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break t}var d=0,v=-1,T=-1,N=0,z=0,U=t,M=null;e:for(;;){for(var k;U!==n||l!==0&&U.nodeType!==3||(v=d+l),U!==u||i!==0&&U.nodeType!==3||(T=d+i),U.nodeType===3&&(d+=U.nodeValue.length),(k=U.firstChild)!==null;)M=U,U=k;for(;;){if(U===t)break e;if(M===n&&++N===l&&(v=d),M===u&&++z===i&&(T=d),(k=U.nextSibling)!==null)break;U=M,M=U.parentNode}U=k}n=v===-1||T===-1?null:{start:v,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(qu={focusedElem:t,selectionRange:n},go=!1,me=e;me!==null;)if(e=me,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,me=t;else for(;me!==null;){switch(e=me,u=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n<t.length;n++)l=t[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&u!==null){t=void 0,n=e,l=u.memoizedProps,u=u.memoizedState,i=n.stateNode;try{var tt=Qa(n.type,l);t=i.getSnapshotBeforeUpdate(tt,u),i.__reactInternalSnapshotBeforeUpdate=t}catch(rt){zt(n,n.return,rt)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)Xu(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Xu(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(r(163))}if(t=e.sibling,t!==null){t.return=e.return,me=t;break}me=e.return}}function Fh(t,e,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:Xn(t,n),i&4&&Cs(5,n);break;case 1:if(Xn(t,n),i&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(d){zt(n,n.return,d)}else{var l=Qa(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(l,e,t.__reactInternalSnapshotBeforeUpdate)}catch(d){zt(n,n.return,d)}}i&64&&Xh(n),i&512&&Ds(n,n.return);break;case 3:if(Xn(t,n),i&64&&(t=n.updateQueue,t!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{wd(t,e)}catch(d){zt(n,n.return,d)}}break;case 27:e===null&&i&4&&Jh(n);case 26:case 5:Xn(t,n),e===null&&i&4&&Kh(n),i&512&&Ds(n,n.return);break;case 12:Xn(t,n);break;case 31:Xn(t,n),i&4&&Wh(t,n);break;case 13:Xn(t,n),i&4&&tm(t,n),i&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=$y.bind(null,n),y1(t,n))));break;case 22:if(i=n.memoizedState!==null||Gn,!i){e=e!==null&&e.memoizedState!==null||re,l=Gn;var u=re;Gn=i,(re=e)&&!u?Zn(t,n,(n.subtreeFlags&8772)!==0):Xn(t,n),Gn=l,re=u}break;case 30:break;default:Xn(t,n)}}function Ph(t){var e=t.alternate;e!==null&&(t.alternate=null,Ph(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&Io(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var It=null,we=!1;function Yn(t,e,n){for(n=n.child;n!==null;)$h(t,e,n),n=n.sibling}function $h(t,e,n){if(Ee&&typeof Ee.onCommitFiberUnmount=="function")try{Ee.onCommitFiberUnmount(xn,n)}catch{}switch(n.tag){case 26:re||jn(n,e),Yn(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:re||jn(n,e);var i=It,l=we;ya(n.type)&&(It=n.stateNode,we=!1),Yn(t,e,n),Vs(n.stateNode),It=i,we=l;break;case 5:re||jn(n,e);case 6:if(i=It,l=we,It=null,Yn(t,e,n),It=i,we=l,It!==null)if(we)try{(It.nodeType===9?It.body:It.nodeName==="HTML"?It.ownerDocument.body:It).removeChild(n.stateNode)}catch(u){zt(n,e,u)}else try{It.removeChild(n.stateNode)}catch(u){zt(n,e,u)}break;case 18:It!==null&&(we?(t=It,Xm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),Xi(t)):Xm(It,n.stateNode));break;case 4:i=It,l=we,It=n.stateNode.containerInfo,we=!0,Yn(t,e,n),It=i,we=l;break;case 0:case 11:case 14:case 15:fa(2,n,e),re||fa(4,n,e),Yn(t,e,n);break;case 1:re||(jn(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"&&Zh(n,e,i)),Yn(t,e,n);break;case 21:Yn(t,e,n);break;case 22:re=(i=re)||n.memoizedState!==null,Yn(t,e,n),re=i;break;default:Yn(t,e,n)}}function Wh(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Xi(t)}catch(n){zt(e,e.return,n)}}}function tm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Xi(t)}catch(n){zt(e,e.return,n)}}function Xy(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Ih),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Ih),e;default:throw Error(r(435,t.tag))}}function Fl(t,e){var n=Xy(t);e.forEach(function(i){if(!n.has(i)){n.add(i);var l=Wy.bind(null,t,i);i.then(l,l)}})}function ze(t,e){var n=e.deletions;if(n!==null)for(var i=0;i<n.length;i++){var l=n[i],u=t,d=e,v=d;t:for(;v!==null;){switch(v.tag){case 27:if(ya(v.type)){It=v.stateNode,we=!1;break t}break;case 5:It=v.stateNode,we=!1;break t;case 3:case 4:It=v.stateNode.containerInfo,we=!0;break t}v=v.return}if(It===null)throw Error(r(160));$h(u,d,l),It=null,we=!1,u=l.alternate,u!==null&&(u.return=null),l.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)em(e,t),e=e.sibling}var yn=null;function em(t,e){var n=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ze(e,t),Be(t),i&4&&(fa(3,t,t.return),Cs(3,t),fa(5,t,t.return));break;case 1:ze(e,t),Be(t),i&512&&(re||n===null||jn(n,n.return)),i&64&&Gn&&(t=t.updateQueue,t!==null&&(i=t.callbacks,i!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?i:n.concat(i))));break;case 26:var l=yn;if(ze(e,t),Be(t),i&512&&(re||n===null||jn(n,n.return)),i&4){var u=n!==null?n.memoizedState:null;if(i=t.memoizedState,n===null)if(i===null)if(t.stateNode===null){t:{i=t.type,n=t.memoizedProps,l=l.ownerDocument||l;e:switch(i){case"title":u=l.getElementsByTagName("title")[0],(!u||u[es]||u[ve]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=l.createElement(i),l.head.insertBefore(u,l.querySelector("head > title"))),Se(u,i,n),u[ve]=t,he(u),i=u;break t;case"link":var d=ep("link","href",l).get(i+(n.href||""));if(d){for(var v=0;v<d.length;v++)if(u=d[v],u.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&u.getAttribute("rel")===(n.rel==null?null:n.rel)&&u.getAttribute("title")===(n.title==null?null:n.title)&&u.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){d.splice(v,1);break e}}u=l.createElement(i),Se(u,i,n),l.head.appendChild(u);break;case"meta":if(d=ep("meta","content",l).get(i+(n.content||""))){for(v=0;v<d.length;v++)if(u=d[v],u.getAttribute("content")===(n.content==null?null:""+n.content)&&u.getAttribute("name")===(n.name==null?null:n.name)&&u.getAttribute("property")===(n.property==null?null:n.property)&&u.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&u.getAttribute("charset")===(n.charSet==null?null:n.charSet)){d.splice(v,1);break e}}u=l.createElement(i),Se(u,i,n),l.head.appendChild(u);break;default:throw Error(r(468,i))}u[ve]=t,he(u),i=u}t.stateNode=i}else np(l,t.type,t.stateNode);else t.stateNode=tp(l,i,t.memoizedProps);else u!==i?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,i===null?np(l,t.type,t.stateNode):tp(l,i,t.memoizedProps)):i===null&&t.stateNode!==null&&vu(t,t.memoizedProps,n.memoizedProps)}break;case 27:ze(e,t),Be(t),i&512&&(re||n===null||jn(n,n.return)),n!==null&&i&4&&vu(t,t.memoizedProps,n.memoizedProps);break;case 5:if(ze(e,t),Be(t),i&512&&(re||n===null||jn(n,n.return)),t.flags&32){l=t.stateNode;try{hi(l,"")}catch(tt){zt(t,t.return,tt)}}i&4&&t.stateNode!=null&&(l=t.memoizedProps,vu(t,l,n!==null?n.memoizedProps:l)),i&1024&&(bu=!0);break;case 6:if(ze(e,t),Be(t),i&4){if(t.stateNode===null)throw Error(r(162));i=t.memoizedProps,n=t.stateNode;try{n.nodeValue=i}catch(tt){zt(t,t.return,tt)}}break;case 3:if(ho=null,l=yn,yn=co(e.containerInfo),ze(e,t),yn=l,Be(t),i&4&&n!==null&&n.memoizedState.isDehydrated)try{Xi(e.containerInfo)}catch(tt){zt(t,t.return,tt)}bu&&(bu=!1,nm(t));break;case 4:i=yn,yn=co(t.stateNode.containerInfo),ze(e,t),Be(t),yn=i;break;case 12:ze(e,t),Be(t);break;case 31:ze(e,t),Be(t),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,Fl(t,i)));break;case 13:ze(e,t),Be(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=P()),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,Fl(t,i)));break;case 22:l=t.memoizedState!==null;var T=n!==null&&n.memoizedState!==null,N=Gn,z=re;if(Gn=N||l,re=z||T,ze(e,t),re=z,Gn=N,Be(t),i&8192)t:for(e=t.stateNode,e._visibility=l?e._visibility&-2:e._visibility|1,l&&(n===null||T||Gn||re||Ja(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){T=n=e;try{if(u=T.stateNode,l)d=u.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{v=T.stateNode;var U=T.memoizedProps.style,M=U!=null&&U.hasOwnProperty("display")?U.display:null;v.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(tt){zt(T,T.return,tt)}}}else if(e.tag===6){if(n===null){T=e;try{T.stateNode.nodeValue=l?"":T.memoizedProps}catch(tt){zt(T,T.return,tt)}}}else if(e.tag===18){if(n===null){T=e;try{var k=T.stateNode;l?Zm(k,!0):Zm(T.stateNode,!1)}catch(tt){zt(T,T.return,tt)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;n===e&&(n=null),e=e.return}n===e&&(n=null),e.sibling.return=e.return,e=e.sibling}i&4&&(i=t.updateQueue,i!==null&&(n=i.retryQueue,n!==null&&(i.retryQueue=null,Fl(t,n))));break;case 19:ze(e,t),Be(t),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,Fl(t,i)));break;case 30:break;case 21:break;default:ze(e,t),Be(t)}}function Be(t){var e=t.flags;if(e&2){try{for(var n,i=t.return;i!==null;){if(Qh(i)){n=i;break}i=i.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var l=n.stateNode,u=gu(t);Il(t,u,l);break;case 5:var d=n.stateNode;n.flags&32&&(hi(d,""),n.flags&=-33);var v=gu(t);Il(t,v,d);break;case 3:case 4:var T=n.stateNode.containerInfo,N=gu(t);yu(t,N,T);break;default:throw Error(r(161))}}catch(z){zt(t,t.return,z)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function nm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;nm(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function Xn(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Fh(t,e.alternate,e),e=e.sibling}function Ja(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:fa(4,e,e.return),Ja(e);break;case 1:jn(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&Zh(e,e.return,n),Ja(e);break;case 27:Vs(e.stateNode);case 26:case 5:jn(e,e.return),Ja(e);break;case 22:e.memoizedState===null&&Ja(e);break;case 30:Ja(e);break;default:Ja(e)}t=t.sibling}}function Zn(t,e,n){for(n=n&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var i=e.alternate,l=t,u=e,d=u.flags;switch(u.tag){case 0:case 11:case 15:Zn(l,u,n),Cs(4,u);break;case 1:if(Zn(l,u,n),i=u,l=i.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(N){zt(i,i.return,N)}if(i=u,l=i.updateQueue,l!==null){var v=i.stateNode;try{var T=l.shared.hiddenCallbacks;if(T!==null)for(l.shared.hiddenCallbacks=null,l=0;l<T.length;l++)Rd(T[l],v)}catch(N){zt(i,i.return,N)}}n&&d&64&&Xh(u),Ds(u,u.return);break;case 27:Jh(u);case 26:case 5:Zn(l,u,n),n&&i===null&&d&4&&Kh(u),Ds(u,u.return);break;case 12:Zn(l,u,n);break;case 31:Zn(l,u,n),n&&d&4&&Wh(l,u);break;case 13:Zn(l,u,n),n&&d&4&&tm(l,u);break;case 22:u.memoizedState===null&&Zn(l,u,n),Ds(u,u.return);break;case 30:break;default:Zn(l,u,n)}e=e.sibling}}function Su(t,e){var n=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==n&&(t!=null&&t.refCount++,n!=null&&ms(n))}function Tu(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ms(t))}function bn(t,e,n,i){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)am(t,e,n,i),e=e.sibling}function am(t,e,n,i){var l=e.flags;switch(e.tag){case 0:case 11:case 15:bn(t,e,n,i),l&2048&&Cs(9,e);break;case 1:bn(t,e,n,i);break;case 3:bn(t,e,n,i),l&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ms(t)));break;case 12:if(l&2048){bn(t,e,n,i),t=e.stateNode;try{var u=e.memoizedProps,d=u.id,v=u.onPostCommit;typeof v=="function"&&v(d,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(T){zt(e,e.return,T)}}else bn(t,e,n,i);break;case 31:bn(t,e,n,i);break;case 13:bn(t,e,n,i);break;case 23:break;case 22:u=e.stateNode,d=e.alternate,e.memoizedState!==null?u._visibility&2?bn(t,e,n,i):Ns(t,e):u._visibility&2?bn(t,e,n,i):(u._visibility|=2,Ri(t,e,n,i,(e.subtreeFlags&10256)!==0||!1)),l&2048&&Su(d,e);break;case 24:bn(t,e,n,i),l&2048&&Tu(e.alternate,e);break;default:bn(t,e,n,i)}}function Ri(t,e,n,i,l){for(l=l&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var u=t,d=e,v=n,T=i,N=d.flags;switch(d.tag){case 0:case 11:case 15:Ri(u,d,v,T,l),Cs(8,d);break;case 23:break;case 22:var z=d.stateNode;d.memoizedState!==null?z._visibility&2?Ri(u,d,v,T,l):Ns(u,d):(z._visibility|=2,Ri(u,d,v,T,l)),l&&N&2048&&Su(d.alternate,d);break;case 24:Ri(u,d,v,T,l),l&&N&2048&&Tu(d.alternate,d);break;default:Ri(u,d,v,T,l)}e=e.sibling}}function Ns(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,i=e,l=i.flags;switch(i.tag){case 22:Ns(n,i),l&2048&&Su(i.alternate,i);break;case 24:Ns(n,i),l&2048&&Tu(i.alternate,i);break;default:Ns(n,i)}e=e.sibling}}var Ms=8192;function wi(t,e,n){if(t.subtreeFlags&Ms)for(t=t.child;t!==null;)im(t,e,n),t=t.sibling}function im(t,e,n){switch(t.tag){case 26:wi(t,e,n),t.flags&Ms&&t.memoizedState!==null&&M1(n,yn,t.memoizedState,t.memoizedProps);break;case 5:wi(t,e,n);break;case 3:case 4:var i=yn;yn=co(t.stateNode.containerInfo),wi(t,e,n),yn=i;break;case 22:t.memoizedState===null&&(i=t.alternate,i!==null&&i.memoizedState!==null?(i=Ms,Ms=16777216,wi(t,e,n),Ms=i):wi(t,e,n));break;default:wi(t,e,n)}}function sm(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function ks(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var i=e[n];me=i,om(i,t)}sm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)lm(t),t=t.sibling}function lm(t){switch(t.tag){case 0:case 11:case 15:ks(t),t.flags&2048&&fa(9,t,t.return);break;case 3:ks(t);break;case 12:ks(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,Pl(t)):ks(t);break;default:ks(t)}}function Pl(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var i=e[n];me=i,om(i,t)}sm(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:fa(8,e,e.return),Pl(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,Pl(e));break;default:Pl(e)}t=t.sibling}}function om(t,e){for(;me!==null;){var n=me;switch(n.tag){case 0:case 11:case 15:fa(8,n,e);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var i=n.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:ms(n.memoizedState.cache)}if(i=n.child,i!==null)i.return=n,me=i;else t:for(n=t;me!==null;){i=me;var l=i.sibling,u=i.return;if(Ph(i),i===n){me=null;break t}if(l!==null){l.return=u,me=l;break t}me=u}}}var Zy={getCacheForType:function(t){var e=ye(se),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n},cacheSignal:function(){return ye(se).controller.signal}},Ky=typeof WeakMap=="function"?WeakMap:Map,Ot=0,Gt=null,xt=null,At=0,wt=0,Qe=null,da=!1,zi=!1,xu=!1,Kn=0,$t=0,ha=0,Ia=0,_u=0,Je=0,Bi=0,Os=null,Ve=null,Au=!1,$l=0,rm=0,Wl=1/0,to=null,ma=null,fe=0,pa=null,Vi=null,Qn=0,Eu=0,ju=null,um=null,Rs=0,Cu=null;function Ie(){return(Ot&2)!==0&&At!==0?At&-At:A.T!==null?Ru():Ef()}function cm(){if(Je===0)if((At&536870912)===0||jt){var t=Na;Na<<=1,(Na&3932160)===0&&(Na=262144),Je=t}else Je=536870912;return t=Ze.current,t!==null&&(t.flags|=32),Je}function Ue(t,e,n){(t===Gt&&(wt===2||wt===9)||t.cancelPendingCommit!==null)&&(Ui(t,0),va(t,At,Je,!1)),pe(t,n),((Ot&2)===0||t!==Gt)&&(t===Gt&&((Ot&2)===0&&(Ia|=n),$t===4&&va(t,At,Je,!1)),Cn(t))}function fm(t,e,n){if((Ot&6)!==0)throw Error(r(327));var i=!n&&(e&127)===0&&(e&t.expiredLanes)===0||Wn(t,e),l=i?Iy(t,e):Nu(t,e,!0),u=i;do{if(l===0){zi&&!i&&va(t,e,0,!1);break}else{if(n=t.current.alternate,u&&!Qy(n)){l=Nu(t,e,!1),u=!1;continue}if(l===2){if(u=e,t.errorRecoveryDisabledLanes&u)var d=0;else d=t.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){e=d;t:{var v=t;l=Os;var T=v.current.memoizedState.isDehydrated;if(T&&(Ui(v,d).flags|=256),d=Nu(v,d,!1),d!==2){if(xu&&!T){v.errorRecoveryDisabledLanes|=u,Ia|=u,l=4;break t}u=Ve,Ve=l,u!==null&&(Ve===null?Ve=u:Ve.push.apply(Ve,u))}l=d}if(u=!1,l!==2)continue}}if(l===1){Ui(t,0),va(t,e,0,!0);break}t:{switch(i=t,u=l,u){case 0:case 1:throw Error(r(345));case 4:if((e&4194048)!==e)break;case 6:va(i,e,Je,!da);break t;case 2:Ve=null;break;case 3:case 5:break;default:throw Error(r(329))}if((e&62914560)===e&&(l=$l+300-P(),10<l)){if(va(i,e,Je,!da),ka(i,0,!0)!==0)break t;Qn=e,i.timeoutHandle=Gm(dm.bind(null,i,n,Ve,to,Au,e,Je,Ia,Bi,da,u,"Throttled",-0,0),l);break t}dm(i,n,Ve,to,Au,e,Je,Ia,Bi,da,u,null,-0,0)}}break}while(!0);Cn(t)}function dm(t,e,n,i,l,u,d,v,T,N,z,U,M,k){if(t.timeoutHandle=-1,U=e.subtreeFlags,U&8192||(U&16785408)===16785408){U={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:On},im(e,u,U);var tt=(u&62914560)===u?$l-P():(u&4194048)===u?rm-P():0;if(tt=k1(U,tt),tt!==null){Qn=u,t.cancelPendingCommit=tt(Sm.bind(null,t,e,u,n,i,l,d,v,T,z,U,null,M,k)),va(t,u,d,!N);return}}Sm(t,e,u,n,i,l,d,v,T)}function Qy(t){for(var e=t;;){var n=e.tag;if((n===0||n===11||n===15)&&e.flags&16384&&(n=e.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var i=0;i<n.length;i++){var l=n[i],u=l.getSnapshot;l=l.value;try{if(!Ye(u(),l))return!1}catch{return!1}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function va(t,e,n,i){e&=~_u,e&=~Ia,t.suspendedLanes|=e,t.pingedLanes&=~e,i&&(t.warmLanes|=e),i=t.expirationTimes;for(var l=e;0<l;){var u=31-je(l),d=1<<u;i[u]=-1,l&=~d}n!==0&&xf(t,n,e)}function eo(){return(Ot&6)===0?(ws(0),!1):!0}function Du(){if(xt!==null){if(wt===0)var t=xt.return;else t=xt,Bn=Ha=null,Xr(t),Di=null,vs=0,t=xt;for(;t!==null;)Yh(t.alternate,t),t=t.return;xt=null}}function Ui(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,h1(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),Qn=0,Du(),Gt=t,xt=n=wn(t.current,null),At=e,wt=0,Qe=null,da=!1,zi=Wn(t,e),xu=!1,Bi=Je=_u=Ia=ha=$t=0,Ve=Os=null,Au=!1,(e&8)!==0&&(e|=e&32);var i=t.entangledLanes;if(i!==0)for(t=t.entanglements,i&=e;0<i;){var l=31-je(i),u=1<<l;e|=t[l],i&=~u}return Kn=e,xl(),n}function hm(t,e){pt=null,A.H=As,e===Ci||e===Ml?(e=Nd(),wt=3):e===Or?(e=Nd(),wt=4):wt=e===lu?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,Qe=e,xt===null&&($t=1,Xl(t,sn(e,t.current)))}function mm(){var t=Ze.current;return t===null?!0:(At&4194048)===At?un===null:(At&62914560)===At||(At&536870912)!==0?t===un:!1}function pm(){var t=A.H;return A.H=As,t===null?As:t}function vm(){var t=A.A;return A.A=Zy,t}function no(){$t=4,da||(At&4194048)!==At&&Ze.current!==null||(zi=!0),(ha&134217727)===0&&(Ia&134217727)===0||Gt===null||va(Gt,At,Je,!1)}function Nu(t,e,n){var i=Ot;Ot|=2;var l=pm(),u=vm();(Gt!==t||At!==e)&&(to=null,Ui(t,e)),e=!1;var d=$t;t:do try{if(wt!==0&&xt!==null){var v=xt,T=Qe;switch(wt){case 8:Du(),d=6;break t;case 3:case 2:case 9:case 6:Ze.current===null&&(e=!0);var N=wt;if(wt=0,Qe=null,Li(t,v,T,N),n&&zi){d=0;break t}break;default:N=wt,wt=0,Qe=null,Li(t,v,T,N)}}Jy(),d=$t;break}catch(z){hm(t,z)}while(!0);return e&&t.shellSuspendCounter++,Bn=Ha=null,Ot=i,A.H=l,A.A=u,xt===null&&(Gt=null,At=0,xl()),d}function Jy(){for(;xt!==null;)gm(xt)}function Iy(t,e){var n=Ot;Ot|=2;var i=pm(),l=vm();Gt!==t||At!==e?(to=null,Wl=P()+500,Ui(t,e)):zi=Wn(t,e);t:do try{if(wt!==0&&xt!==null){e=xt;var u=Qe;e:switch(wt){case 1:wt=0,Qe=null,Li(t,e,u,1);break;case 2:case 9:if(Cd(u)){wt=0,Qe=null,ym(e);break}e=function(){wt!==2&&wt!==9||Gt!==t||(wt=7),Cn(t)},u.then(e,e);break t;case 3:wt=7;break t;case 4:wt=5;break t;case 7:Cd(u)?(wt=0,Qe=null,ym(e)):(wt=0,Qe=null,Li(t,e,u,7));break;case 5:var d=null;switch(xt.tag){case 26:d=xt.memoizedState;case 5:case 27:var v=xt;if(d?ap(d):v.stateNode.complete){wt=0,Qe=null;var T=v.sibling;if(T!==null)xt=T;else{var N=v.return;N!==null?(xt=N,ao(N)):xt=null}break e}}wt=0,Qe=null,Li(t,e,u,5);break;case 6:wt=0,Qe=null,Li(t,e,u,6);break;case 8:Du(),$t=6;break t;default:throw Error(r(462))}}Fy();break}catch(z){hm(t,z)}while(!0);return Bn=Ha=null,A.H=i,A.A=l,Ot=n,xt!==null?0:(Gt=null,At=0,xl(),$t)}function Fy(){for(;xt!==null&&!kt();)gm(xt)}function gm(t){var e=qh(t.alternate,t,Kn);t.memoizedProps=t.pendingProps,e===null?ao(t):xt=e}function ym(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=zh(n,e,e.pendingProps,e.type,void 0,At);break;case 11:e=zh(n,e,e.pendingProps,e.type.render,e.ref,At);break;case 5:Xr(e);default:Yh(n,e),e=xt=vd(e,Kn),e=qh(n,e,Kn)}t.memoizedProps=t.pendingProps,e===null?ao(t):xt=e}function Li(t,e,n,i){Bn=Ha=null,Xr(e),Di=null,vs=0;var l=e.return;try{if(Uy(t,l,e,n,At)){$t=1,Xl(t,sn(n,t.current)),xt=null;return}}catch(u){if(l!==null)throw xt=l,u;$t=1,Xl(t,sn(n,t.current)),xt=null;return}e.flags&32768?(jt||i===1?t=!0:zi||(At&536870912)!==0?t=!1:(da=t=!0,(i===2||i===9||i===3||i===6)&&(i=Ze.current,i!==null&&i.tag===13&&(i.flags|=16384))),bm(e,t)):ao(e)}function ao(t){var e=t;do{if((e.flags&32768)!==0){bm(e,da);return}t=e.return;var n=qy(e.alternate,e,Kn);if(n!==null){xt=n;return}if(e=e.sibling,e!==null){xt=e;return}xt=e=t}while(e!==null);$t===0&&($t=5)}function bm(t,e){do{var n=Gy(t.alternate,t);if(n!==null){n.flags&=32767,xt=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){xt=t;return}xt=t=n}while(t!==null);$t=6,xt=null}function Sm(t,e,n,i,l,u,d,v,T){t.cancelPendingCommit=null;do io();while(fe!==0);if((Ot&6)!==0)throw Error(r(327));if(e!==null){if(e===t.current)throw Error(r(177));if(u=e.lanes|e.childLanes,u|=gr,Oa(t,n,u,d,v,T),t===Gt&&(xt=Gt=null,At=0),Vi=e,pa=t,Qn=n,Eu=u,ju=l,um=i,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,t1(dt,function(){return Em(),null})):(t.callbackNode=null,t.callbackPriority=0),i=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||i){i=A.T,A.T=null,l=G.p,G.p=2,d=Ot,Ot|=4;try{Yy(t,e,n)}finally{Ot=d,G.p=l,A.T=i}}fe=1,Tm(),xm(),_m()}}function Tm(){if(fe===1){fe=0;var t=pa,e=Vi,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=A.T,A.T=null;var i=G.p;G.p=2;var l=Ot;Ot|=4;try{em(e,t);var u=qu,d=od(t.containerInfo),v=u.focusedElem,T=u.selectionRange;if(d!==v&&v&&v.ownerDocument&&ld(v.ownerDocument.documentElement,v)){if(T!==null&&dr(v)){var N=T.start,z=T.end;if(z===void 0&&(z=N),"selectionStart"in v)v.selectionStart=N,v.selectionEnd=Math.min(z,v.value.length);else{var U=v.ownerDocument||document,M=U&&U.defaultView||window;if(M.getSelection){var k=M.getSelection(),tt=v.textContent.length,rt=Math.min(T.start,tt),Lt=T.end===void 0?rt:Math.min(T.end,tt);!k.extend&&rt>Lt&&(d=Lt,Lt=rt,rt=d);var C=sd(v,rt),E=sd(v,Lt);if(C&&E&&(k.rangeCount!==1||k.anchorNode!==C.node||k.anchorOffset!==C.offset||k.focusNode!==E.node||k.focusOffset!==E.offset)){var D=U.createRange();D.setStart(C.node,C.offset),k.removeAllRanges(),rt>Lt?(k.addRange(D),k.extend(E.node,E.offset)):(D.setEnd(E.node,E.offset),k.addRange(D))}}}}for(U=[],k=v;k=k.parentNode;)k.nodeType===1&&U.push({element:k,left:k.scrollLeft,top:k.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<U.length;v++){var V=U[v];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}go=!!Hu,qu=Hu=null}finally{Ot=l,G.p=i,A.T=n}}t.current=e,fe=2}}function xm(){if(fe===2){fe=0;var t=pa,e=Vi,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=A.T,A.T=null;var i=G.p;G.p=2;var l=Ot;Ot|=4;try{Fh(t,e.alternate,e)}finally{Ot=l,G.p=i,A.T=n}}fe=3}}function _m(){if(fe===4||fe===3){fe=0,q();var t=pa,e=Vi,n=Qn,i=um;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?fe=5:(fe=0,Vi=pa=null,Am(t,t.pendingLanes));var l=t.pendingLanes;if(l===0&&(ma=null),Qo(n),e=e.stateNode,Ee&&typeof Ee.onCommitFiberRoot=="function")try{Ee.onCommitFiberRoot(xn,e,void 0,(e.current.flags&128)===128)}catch{}if(i!==null){e=A.T,l=G.p,G.p=2,A.T=null;try{for(var u=t.onRecoverableError,d=0;d<i.length;d++){var v=i[d];u(v.value,{componentStack:v.stack})}}finally{A.T=e,G.p=l}}(Qn&3)!==0&&io(),Cn(t),l=t.pendingLanes,(n&261930)!==0&&(l&42)!==0?t===Cu?Rs++:(Rs=0,Cu=t):Rs=0,ws(0)}}function Am(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,ms(e)))}function io(){return Tm(),xm(),_m(),Em()}function Em(){if(fe!==5)return!1;var t=pa,e=Eu;Eu=0;var n=Qo(Qn),i=A.T,l=G.p;try{G.p=32>n?32:n,A.T=null,n=ju,ju=null;var u=pa,d=Qn;if(fe=0,Vi=pa=null,Qn=0,(Ot&6)!==0)throw Error(r(331));var v=Ot;if(Ot|=4,lm(u.current),am(u,u.current,d,n),Ot=v,ws(0,!1),Ee&&typeof Ee.onPostCommitFiberRoot=="function")try{Ee.onPostCommitFiberRoot(xn,u)}catch{}return!0}finally{G.p=l,A.T=i,Am(t,e)}}function jm(t,e,n){e=sn(n,e),e=su(t.stateNode,e,2),t=ra(t,e,2),t!==null&&(pe(t,2),Cn(t))}function zt(t,e,n){if(t.tag===3)jm(t,t,n);else for(;e!==null;){if(e.tag===3){jm(e,t,n);break}else if(e.tag===1){var i=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(ma===null||!ma.has(i))){t=sn(n,t),n=Ch(2),i=ra(e,n,2),i!==null&&(Dh(n,i,e,t),pe(i,2),Cn(i));break}}e=e.return}}function Mu(t,e,n){var i=t.pingCache;if(i===null){i=t.pingCache=new Ky;var l=new Set;i.set(e,l)}else l=i.get(e),l===void 0&&(l=new Set,i.set(e,l));l.has(n)||(xu=!0,l.add(n),t=Py.bind(null,t,e,n),e.then(t,t))}function Py(t,e,n){var i=t.pingCache;i!==null&&i.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,Gt===t&&(At&n)===n&&($t===4||$t===3&&(At&62914560)===At&&300>P()-$l?(Ot&2)===0&&Ui(t,0):_u|=n,Bi===At&&(Bi=0)),Cn(t)}function Cm(t,e){e===0&&(e=Bt()),t=Va(t,e),t!==null&&(pe(t,e),Cn(t))}function $y(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Cm(t,n)}function Wy(t,e){var n=0;switch(t.tag){case 31:case 13:var i=t.stateNode,l=t.memoizedState;l!==null&&(n=l.retryLane);break;case 19:i=t.stateNode;break;case 22:i=t.stateNode._retryCache;break;default:throw Error(r(314))}i!==null&&i.delete(e),Cm(t,n)}function t1(t,e){return J(t,e)}var so=null,Hi=null,ku=!1,lo=!1,Ou=!1,ga=0;function Cn(t){t!==Hi&&t.next===null&&(Hi===null?so=Hi=t:Hi=Hi.next=t),lo=!0,ku||(ku=!0,n1())}function ws(t,e){if(!Ou&&lo){Ou=!0;do for(var n=!1,i=so;i!==null;){if(t!==0){var l=i.pendingLanes;if(l===0)var u=0;else{var d=i.suspendedLanes,v=i.pingedLanes;u=(1<<31-je(42|t)+1)-1,u&=l&~(d&~v),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,km(i,u))}else u=At,u=ka(i,i===Gt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(u&3)===0||Wn(i,u)||(n=!0,km(i,u));i=i.next}while(n);Ou=!1}}function e1(){Dm()}function Dm(){lo=ku=!1;var t=0;ga!==0&&d1()&&(t=ga);for(var e=P(),n=null,i=so;i!==null;){var l=i.next,u=Nm(i,e);u===0?(i.next=null,n===null?so=l:n.next=l,l===null&&(Hi=n)):(n=i,(t!==0||(u&3)!==0)&&(lo=!0)),i=l}fe!==0&&fe!==5||ws(t),ga!==0&&(ga=0)}function Nm(t,e){for(var n=t.suspendedLanes,i=t.pingedLanes,l=t.expirationTimes,u=t.pendingLanes&-62914561;0<u;){var d=31-je(u),v=1<<d,T=l[d];T===-1?((v&n)===0||(v&i)!==0)&&(l[d]=ht(v,e)):T<=e&&(t.expiredLanes|=v),u&=~v}if(e=Gt,n=At,n=ka(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),i=t.callbackNode,n===0||t===e&&(wt===2||wt===9)||t.cancelPendingCommit!==null)return i!==null&&i!==null&&St(i),t.callbackNode=null,t.callbackPriority=0;if((n&3)===0||Wn(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(i!==null&&St(i),Qo(n)){case 2:case 8:n=Rt;break;case 32:n=dt;break;case 268435456:n=ie;break;default:n=dt}return i=Mm.bind(null,t),n=J(n,i),t.callbackPriority=e,t.callbackNode=n,e}return i!==null&&i!==null&&St(i),t.callbackPriority=2,t.callbackNode=null,2}function Mm(t,e){if(fe!==0&&fe!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(io()&&t.callbackNode!==n)return null;var i=At;return i=ka(t,t===Gt?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),i===0?null:(fm(t,i,e),Nm(t,P()),t.callbackNode!=null&&t.callbackNode===n?Mm.bind(null,t):null)}function km(t,e){if(io())return null;fm(t,e,!0)}function n1(){m1(function(){(Ot&6)!==0?J(Tt,e1):Dm()})}function Ru(){if(ga===0){var t=Ei;t===0&&(t=Da,Da<<=1,(Da&261888)===0&&(Da=256)),ga=t}return ga}function Om(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ml(""+t)}function Rm(t,e){var n=e.ownerDocument.createElement("input");return n.name=e.name,n.value=e.value,t.id&&n.setAttribute("form",t.id),e.parentNode.insertBefore(n,e),t=new FormData(t),n.parentNode.removeChild(n),t}function a1(t,e,n,i,l){if(e==="submit"&&n&&n.stateNode===l){var u=Om((l[Oe]||null).action),d=i.submitter;d&&(e=(e=d[Oe]||null)?Om(e.formAction):d.getAttribute("formAction"),e!==null&&(u=e,d=null));var v=new yl("action","action",null,i,l);t.push({event:v,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(ga!==0){var T=d?Rm(l,d):new FormData(l);Wr(n,{pending:!0,data:T,method:l.method,action:u},null,T)}}else typeof u=="function"&&(v.preventDefault(),T=d?Rm(l,d):new FormData(l),Wr(n,{pending:!0,data:T,method:l.method,action:u},u,T))},currentTarget:l}]})}}for(var wu=0;wu<vr.length;wu++){var zu=vr[wu],i1=zu.toLowerCase(),s1=zu[0].toUpperCase()+zu.slice(1);gn(i1,"on"+s1)}gn(cd,"onAnimationEnd"),gn(fd,"onAnimationIteration"),gn(dd,"onAnimationStart"),gn("dblclick","onDoubleClick"),gn("focusin","onFocus"),gn("focusout","onBlur"),gn(Ty,"onTransitionRun"),gn(xy,"onTransitionStart"),gn(_y,"onTransitionCancel"),gn(hd,"onTransitionEnd"),fi("onMouseEnter",["mouseout","mouseover"]),fi("onMouseLeave",["mouseout","mouseover"]),fi("onPointerEnter",["pointerout","pointerover"]),fi("onPointerLeave",["pointerout","pointerover"]),Ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ra("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zs="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(" "),l1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zs));function wm(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var i=t[n],l=i.event;i=i.listeners;t:{var u=void 0;if(e)for(var d=i.length-1;0<=d;d--){var v=i[d],T=v.instance,N=v.currentTarget;if(v=v.listener,T!==u&&l.isPropagationStopped())break t;u=v,l.currentTarget=N;try{u(l)}catch(z){Tl(z)}l.currentTarget=null,u=T}else for(d=0;d<i.length;d++){if(v=i[d],T=v.instance,N=v.currentTarget,v=v.listener,T!==u&&l.isPropagationStopped())break t;u=v,l.currentTarget=N;try{u(l)}catch(z){Tl(z)}l.currentTarget=null,u=T}}}}function _t(t,e){var n=e[Jo];n===void 0&&(n=e[Jo]=new Set);var i=t+"__bubble";n.has(i)||(zm(e,t,2,!1),n.add(i))}function Bu(t,e,n){var i=0;e&&(i|=4),zm(n,t,i,e)}var oo="_reactListening"+Math.random().toString(36).slice(2);function Vu(t){if(!t[oo]){t[oo]=!0,Df.forEach(function(n){n!=="selectionchange"&&(l1.has(n)||Bu(n,!1,t),Bu(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[oo]||(e[oo]=!0,Bu("selectionchange",!1,e))}}function zm(t,e,n,i){switch(cp(e)){case 2:var l=w1;break;case 8:l=z1;break;default:l=$u}n=l.bind(null,e,n,t),l=void 0,!ar||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(l=!0),i?l!==void 0?t.addEventListener(e,n,{capture:!0,passive:l}):t.addEventListener(e,n,!0):l!==void 0?t.addEventListener(e,n,{passive:l}):t.addEventListener(e,n,!1)}function Uu(t,e,n,i,l){var u=i;if((e&1)===0&&(e&2)===0&&i!==null)t:for(;;){if(i===null)return;var d=i.tag;if(d===3||d===4){var v=i.stateNode.containerInfo;if(v===l)break;if(d===4)for(d=i.return;d!==null;){var T=d.tag;if((T===3||T===4)&&d.stateNode.containerInfo===l)return;d=d.return}for(;v!==null;){if(d=ri(v),d===null)return;if(T=d.tag,T===5||T===6||T===26||T===27){i=u=d;continue t}v=v.parentNode}}i=i.return}Hf(function(){var N=u,z=er(n),U=[];t:{var M=md.get(t);if(M!==void 0){var k=yl,tt=t;switch(t){case"keypress":if(vl(n)===0)break t;case"keydown":case"keyup":k=Wg;break;case"focusin":tt="focus",k=or;break;case"focusout":tt="blur",k=or;break;case"beforeblur":case"afterblur":k=or;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":k=Yf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=qg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=ny;break;case cd:case fd:case dd:k=Xg;break;case hd:k=iy;break;case"scroll":case"scrollend":k=Lg;break;case"wheel":k=ly;break;case"copy":case"cut":case"paste":k=Kg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=Zf;break;case"toggle":case"beforetoggle":k=ry}var rt=(e&4)!==0,Lt=!rt&&(t==="scroll"||t==="scrollend"),C=rt?M!==null?M+"Capture":null:M;rt=[];for(var E=N,D;E!==null;){var V=E;if(D=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||D===null||C===null||(V=as(E,C),V!=null&&rt.push(Bs(E,V,D))),Lt)break;E=E.return}0<rt.length&&(M=new k(M,tt,null,n,z),U.push({event:M,listeners:rt}))}}if((e&7)===0){t:{if(M=t==="mouseover"||t==="pointerover",k=t==="mouseout"||t==="pointerout",M&&n!==tr&&(tt=n.relatedTarget||n.fromElement)&&(ri(tt)||tt[oi]))break t;if((k||M)&&(M=z.window===z?z:(M=z.ownerDocument)?M.defaultView||M.parentWindow:window,k?(tt=n.relatedTarget||n.toElement,k=N,tt=tt?ri(tt):null,tt!==null&&(Lt=h(tt),rt=tt.tag,tt!==Lt||rt!==5&&rt!==27&&rt!==6)&&(tt=null)):(k=null,tt=N),k!==tt)){if(rt=Yf,V="onMouseLeave",C="onMouseEnter",E="mouse",(t==="pointerout"||t==="pointerover")&&(rt=Zf,V="onPointerLeave",C="onPointerEnter",E="pointer"),Lt=k==null?M:ns(k),D=tt==null?M:ns(tt),M=new rt(V,E+"leave",k,n,z),M.target=Lt,M.relatedTarget=D,V=null,ri(z)===N&&(rt=new rt(C,E+"enter",tt,n,z),rt.target=D,rt.relatedTarget=Lt,V=rt),Lt=V,k&&tt)e:{for(rt=o1,C=k,E=tt,D=0,V=C;V;V=rt(V))D++;V=0;for(var lt=E;lt;lt=rt(lt))V++;for(;0<D-V;)C=rt(C),D--;for(;0<V-D;)E=rt(E),V--;for(;D--;){if(C===E||E!==null&&C===E.alternate){rt=C;break e}C=rt(C),E=rt(E)}rt=null}else rt=null;k!==null&&Bm(U,M,k,rt,!1),tt!==null&&Lt!==null&&Bm(U,Lt,tt,rt,!0)}}t:{if(M=N?ns(N):window,k=M.nodeName&&M.nodeName.toLowerCase(),k==="select"||k==="input"&&M.type==="file")var Nt=Wf;else if(Pf(M))if(td)Nt=yy;else{Nt=vy;var it=py}else k=M.nodeName,!k||k.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?N&&Wo(N.elementType)&&(Nt=Wf):Nt=gy;if(Nt&&(Nt=Nt(t,N))){$f(U,Nt,n,z);break t}it&&it(t,M,N),t==="focusout"&&N&&M.type==="number"&&N.memoizedProps.value!=null&&$o(M,"number",M.value)}switch(it=N?ns(N):window,t){case"focusin":(Pf(it)||it.contentEditable==="true")&&(gi=it,hr=N,fs=null);break;case"focusout":fs=hr=gi=null;break;case"mousedown":mr=!0;break;case"contextmenu":case"mouseup":case"dragend":mr=!1,rd(U,n,z);break;case"selectionchange":if(Sy)break;case"keydown":case"keyup":rd(U,n,z)}var vt;if(ur)t:{switch(t){case"compositionstart":var Et="onCompositionStart";break t;case"compositionend":Et="onCompositionEnd";break t;case"compositionupdate":Et="onCompositionUpdate";break t}Et=void 0}else vi?If(t,n)&&(Et="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(Et="onCompositionStart");Et&&(Kf&&n.locale!=="ko"&&(vi||Et!=="onCompositionStart"?Et==="onCompositionEnd"&&vi&&(vt=qf()):(ea=z,ir="value"in ea?ea.value:ea.textContent,vi=!0)),it=ro(N,Et),0<it.length&&(Et=new Xf(Et,t,null,n,z),U.push({event:Et,listeners:it}),vt?Et.data=vt:(vt=Ff(n),vt!==null&&(Et.data=vt)))),(vt=cy?fy(t,n):dy(t,n))&&(Et=ro(N,"onBeforeInput"),0<Et.length&&(it=new Xf("onBeforeInput","beforeinput",null,n,z),U.push({event:it,listeners:Et}),it.data=vt)),a1(U,t,N,n,z)}wm(U,e)})}function Bs(t,e,n){return{instance:t,listener:e,currentTarget:n}}function ro(t,e){for(var n=e+"Capture",i=[];t!==null;){var l=t,u=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||u===null||(l=as(t,n),l!=null&&i.unshift(Bs(t,l,u)),l=as(t,e),l!=null&&i.push(Bs(t,l,u))),t.tag===3)return i;t=t.return}return[]}function o1(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Bm(t,e,n,i,l){for(var u=e._reactName,d=[];n!==null&&n!==i;){var v=n,T=v.alternate,N=v.stateNode;if(v=v.tag,T!==null&&T===i)break;v!==5&&v!==26&&v!==27||N===null||(T=N,l?(N=as(n,u),N!=null&&d.unshift(Bs(n,N,T))):l||(N=as(n,u),N!=null&&d.push(Bs(n,N,T)))),n=n.return}d.length!==0&&t.push({event:e,listeners:d})}var r1=/\r\n?/g,u1=/\u0000|\uFFFD/g;function Vm(t){return(typeof t=="string"?t:""+t).replace(r1,`
|
|
25
|
-
`).replace(u1,"")}function Um(t,e){return e=Vm(e),Vm(t)===e}function Ut(t,e,n,i,l,u){switch(n){case"children":typeof i=="string"?e==="body"||e==="textarea"&&i===""||hi(t,i):(typeof i=="number"||typeof i=="bigint")&&e!=="body"&&hi(t,""+i);break;case"className":dl(t,"class",i);break;case"tabIndex":dl(t,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":dl(t,n,i);break;case"style":Uf(t,i,u);break;case"data":if(e!=="object"){dl(t,"data",i);break}case"src":case"href":if(i===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){t.removeAttribute(n);break}i=ml(""+i),t.setAttribute(n,i);break;case"action":case"formAction":if(typeof i=="function"){t.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(n==="formAction"?(e!=="input"&&Ut(t,e,"name",l.name,l,null),Ut(t,e,"formEncType",l.formEncType,l,null),Ut(t,e,"formMethod",l.formMethod,l,null),Ut(t,e,"formTarget",l.formTarget,l,null)):(Ut(t,e,"encType",l.encType,l,null),Ut(t,e,"method",l.method,l,null),Ut(t,e,"target",l.target,l,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){t.removeAttribute(n);break}i=ml(""+i),t.setAttribute(n,i);break;case"onClick":i!=null&&(t.onclick=On);break;case"onScroll":i!=null&&_t("scroll",t);break;case"onScrollEnd":i!=null&&_t("scrollend",t);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(r(61));if(n=i.__html,n!=null){if(l.children!=null)throw Error(r(60));t.innerHTML=n}}break;case"multiple":t.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":t.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){t.removeAttribute("xlink:href");break}n=ml(""+i),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(n,""+i):t.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":i===!0?t.setAttribute(n,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(n,i):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?t.setAttribute(n,i):t.removeAttribute(n);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?t.removeAttribute(n):t.setAttribute(n,i);break;case"popover":_t("beforetoggle",t),_t("toggle",t),fl(t,"popover",i);break;case"xlinkActuate":kn(t,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":kn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":kn(t,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":kn(t,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":kn(t,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":kn(t,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":kn(t,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":kn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":kn(t,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":fl(t,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Vg.get(n)||n,fl(t,n,i))}}function Lu(t,e,n,i,l,u){switch(n){case"style":Uf(t,i,u);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(r(61));if(n=i.__html,n!=null){if(l.children!=null)throw Error(r(60));t.innerHTML=n}}break;case"children":typeof i=="string"?hi(t,i):(typeof i=="number"||typeof i=="bigint")&&hi(t,""+i);break;case"onScroll":i!=null&&_t("scroll",t);break;case"onScrollEnd":i!=null&&_t("scrollend",t);break;case"onClick":i!=null&&(t.onclick=On);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Nf.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),e=n.slice(2,l?n.length-7:void 0),u=t[Oe]||null,u=u!=null?u[n]:null,typeof u=="function"&&t.removeEventListener(e,u,l),typeof i=="function")){typeof u!="function"&&u!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,i,l);break t}n in t?t[n]=i:i===!0?t.setAttribute(n,""):fl(t,n,i)}}}function Se(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_t("error",t),_t("load",t);var i=!1,l=!1,u;for(u in n)if(n.hasOwnProperty(u)){var d=n[u];if(d!=null)switch(u){case"src":i=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Ut(t,e,u,d,n,null)}}l&&Ut(t,e,"srcSet",n.srcSet,n,null),i&&Ut(t,e,"src",n.src,n,null);return;case"input":_t("invalid",t);var v=u=d=l=null,T=null,N=null;for(i in n)if(n.hasOwnProperty(i)){var z=n[i];if(z!=null)switch(i){case"name":l=z;break;case"type":d=z;break;case"checked":T=z;break;case"defaultChecked":N=z;break;case"value":u=z;break;case"defaultValue":v=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,e));break;default:Ut(t,e,i,z,n,null)}}wf(t,u,v,T,N,d,l,!1);return;case"select":_t("invalid",t),i=d=u=null;for(l in n)if(n.hasOwnProperty(l)&&(v=n[l],v!=null))switch(l){case"value":u=v;break;case"defaultValue":d=v;break;case"multiple":i=v;default:Ut(t,e,l,v,n,null)}e=u,n=d,t.multiple=!!i,e!=null?di(t,!!i,e,!1):n!=null&&di(t,!!i,n,!0);return;case"textarea":_t("invalid",t),u=l=i=null;for(d in n)if(n.hasOwnProperty(d)&&(v=n[d],v!=null))switch(d){case"value":i=v;break;case"defaultValue":l=v;break;case"children":u=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:Ut(t,e,d,v,n,null)}Bf(t,i,l,u);return;case"option":for(T in n)if(n.hasOwnProperty(T)&&(i=n[T],i!=null))switch(T){case"selected":t.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:Ut(t,e,T,i,n,null)}return;case"dialog":_t("beforetoggle",t),_t("toggle",t),_t("cancel",t),_t("close",t);break;case"iframe":case"object":_t("load",t);break;case"video":case"audio":for(i=0;i<zs.length;i++)_t(zs[i],t);break;case"image":_t("error",t),_t("load",t);break;case"details":_t("toggle",t);break;case"embed":case"source":case"link":_t("error",t),_t("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(N in n)if(n.hasOwnProperty(N)&&(i=n[N],i!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Ut(t,e,N,i,n,null)}return;default:if(Wo(e)){for(z in n)n.hasOwnProperty(z)&&(i=n[z],i!==void 0&&Lu(t,e,z,i,n,void 0));return}}for(v in n)n.hasOwnProperty(v)&&(i=n[v],i!=null&&Ut(t,e,v,i,n,null))}function c1(t,e,n,i){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,u=null,d=null,v=null,T=null,N=null,z=null;for(k in n){var U=n[k];if(n.hasOwnProperty(k)&&U!=null)switch(k){case"checked":break;case"value":break;case"defaultValue":T=U;default:i.hasOwnProperty(k)||Ut(t,e,k,null,i,U)}}for(var M in i){var k=i[M];if(U=n[M],i.hasOwnProperty(M)&&(k!=null||U!=null))switch(M){case"type":u=k;break;case"name":l=k;break;case"checked":N=k;break;case"defaultChecked":z=k;break;case"value":d=k;break;case"defaultValue":v=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(137,e));break;default:k!==U&&Ut(t,e,M,k,i,U)}}Po(t,d,v,T,N,z,u,l);return;case"select":k=d=v=M=null;for(u in n)if(T=n[u],n.hasOwnProperty(u)&&T!=null)switch(u){case"value":break;case"multiple":k=T;default:i.hasOwnProperty(u)||Ut(t,e,u,null,i,T)}for(l in i)if(u=i[l],T=n[l],i.hasOwnProperty(l)&&(u!=null||T!=null))switch(l){case"value":M=u;break;case"defaultValue":v=u;break;case"multiple":d=u;default:u!==T&&Ut(t,e,l,u,i,T)}e=v,n=d,i=k,M!=null?di(t,!!n,M,!1):!!i!=!!n&&(e!=null?di(t,!!n,e,!0):di(t,!!n,n?[]:"",!1));return;case"textarea":k=M=null;for(v in n)if(l=n[v],n.hasOwnProperty(v)&&l!=null&&!i.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Ut(t,e,v,null,i,l)}for(d in i)if(l=i[d],u=n[d],i.hasOwnProperty(d)&&(l!=null||u!=null))switch(d){case"value":M=l;break;case"defaultValue":k=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(r(91));break;default:l!==u&&Ut(t,e,d,l,i,u)}zf(t,M,k);return;case"option":for(var tt in n)if(M=n[tt],n.hasOwnProperty(tt)&&M!=null&&!i.hasOwnProperty(tt))switch(tt){case"selected":t.selected=!1;break;default:Ut(t,e,tt,null,i,M)}for(T in i)if(M=i[T],k=n[T],i.hasOwnProperty(T)&&M!==k&&(M!=null||k!=null))switch(T){case"selected":t.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:Ut(t,e,T,M,i,k)}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 rt in n)M=n[rt],n.hasOwnProperty(rt)&&M!=null&&!i.hasOwnProperty(rt)&&Ut(t,e,rt,null,i,M);for(N in i)if(M=i[N],k=n[N],i.hasOwnProperty(N)&&M!==k&&(M!=null||k!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,e));break;default:Ut(t,e,N,M,i,k)}return;default:if(Wo(e)){for(var Lt in n)M=n[Lt],n.hasOwnProperty(Lt)&&M!==void 0&&!i.hasOwnProperty(Lt)&&Lu(t,e,Lt,void 0,i,M);for(z in i)M=i[z],k=n[z],!i.hasOwnProperty(z)||M===k||M===void 0&&k===void 0||Lu(t,e,z,M,i,k);return}}for(var C in n)M=n[C],n.hasOwnProperty(C)&&M!=null&&!i.hasOwnProperty(C)&&Ut(t,e,C,null,i,M);for(U in i)M=i[U],k=n[U],!i.hasOwnProperty(U)||M===k||M==null&&k==null||Ut(t,e,U,M,i,k)}function Lm(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function f1(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,n=performance.getEntriesByType("resource"),i=0;i<n.length;i++){var l=n[i],u=l.transferSize,d=l.initiatorType,v=l.duration;if(u&&v&&Lm(d)){for(d=0,v=l.responseEnd,i+=1;i<n.length;i++){var T=n[i],N=T.startTime;if(N>v)break;var z=T.transferSize,U=T.initiatorType;z&&Lm(U)&&(T=T.responseEnd,d+=z*(T<v?1:(v-N)/(T-N)))}if(--i,e+=8*(u+d)/(l.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Hu=null,qu=null;function uo(t){return t.nodeType===9?t:t.ownerDocument}function Hm(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function qm(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function Gu(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Yu=null;function d1(){var t=window.event;return t&&t.type==="popstate"?t===Yu?!1:(Yu=t,!0):(Yu=null,!1)}var Gm=typeof setTimeout=="function"?setTimeout:void 0,h1=typeof clearTimeout=="function"?clearTimeout:void 0,Ym=typeof Promise=="function"?Promise:void 0,m1=typeof queueMicrotask=="function"?queueMicrotask:typeof Ym<"u"?function(t){return Ym.resolve(null).then(t).catch(p1)}:Gm;function p1(t){setTimeout(function(){throw t})}function ya(t){return t==="head"}function Xm(t,e){var n=e,i=0;do{var l=n.nextSibling;if(t.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(i===0){t.removeChild(l),Xi(e);return}i--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")i++;else if(n==="html")Vs(t.ownerDocument.documentElement);else if(n==="head"){n=t.ownerDocument.head,Vs(n);for(var u=n.firstChild;u;){var d=u.nextSibling,v=u.nodeName;u[es]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=d}}else n==="body"&&Vs(t.ownerDocument.body);n=l}while(n);Xi(e)}function Zm(t,e){var n=t;t=0;do{var i=n.nextSibling;if(n.nodeType===1?e?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(e?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(t===0)break;t--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||t++;n=i}while(n)}function Xu(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Xu(n),Io(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function v1(t,e,n,i){for(;t.nodeType===1;){var l=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!i&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(i){if(!t[es])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(u=t.getAttribute("rel"),u==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(u!==l.rel||t.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||t.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||t.getAttribute("title")!==(l.title==null?null:l.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(u=t.getAttribute("src"),(u!==(l.src==null?null:l.src)||t.getAttribute("type")!==(l.type==null?null:l.type)||t.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&u&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var u=l.name==null?null:""+l.name;if(l.type==="hidden"&&t.getAttribute("name")===u)return t}else return t;if(t=cn(t.nextSibling),t===null)break}return null}function g1(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=cn(t.nextSibling),t===null))return null;return t}function Km(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=cn(t.nextSibling),t===null))return null;return t}function Zu(t){return t.data==="$?"||t.data==="$~"}function Ku(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function y1(t,e){var n=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||n.readyState!=="loading")e();else{var i=function(){e(),n.removeEventListener("DOMContentLoaded",i)};n.addEventListener("DOMContentLoaded",i),t._reactRetry=i}}function cn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var Qu=null;function Qm(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"||n==="/&"){if(e===0)return cn(t.nextSibling);e--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||e++}t=t.nextSibling}return null}function Jm(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(e===0)return t;e--}else n!=="/$"&&n!=="/&"||e++}t=t.previousSibling}return null}function Im(t,e,n){switch(e=uo(n),t){case"html":if(t=e.documentElement,!t)throw Error(r(452));return t;case"head":if(t=e.head,!t)throw Error(r(453));return t;case"body":if(t=e.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function Vs(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);Io(t)}var fn=new Map,Fm=new Set;function co(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Jn=G.d;G.d={f:b1,r:S1,D:T1,C:x1,L:_1,m:A1,X:j1,S:E1,M:C1};function b1(){var t=Jn.f(),e=eo();return t||e}function S1(t){var e=ui(t);e!==null&&e.tag===5&&e.type==="form"?hh(e):Jn.r(t)}var qi=typeof document>"u"?null:document;function Pm(t,e,n){var i=qi;if(i&&typeof e=="string"&&e){var l=nn(e);l='link[rel="'+t+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Fm.has(l)||(Fm.add(l),t={rel:t,crossOrigin:n,href:e},i.querySelector(l)===null&&(e=i.createElement("link"),Se(e,"link",t),he(e),i.head.appendChild(e)))}}function T1(t){Jn.D(t),Pm("dns-prefetch",t,null)}function x1(t,e){Jn.C(t,e),Pm("preconnect",t,e)}function _1(t,e,n){Jn.L(t,e,n);var i=qi;if(i&&t&&e){var l='link[rel="preload"][as="'+nn(e)+'"]';e==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+nn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+nn(n.imageSizes)+'"]')):l+='[href="'+nn(t)+'"]';var u=l;switch(e){case"style":u=Gi(t);break;case"script":u=Yi(t)}fn.has(u)||(t=S({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),fn.set(u,t),i.querySelector(l)!==null||e==="style"&&i.querySelector(Us(u))||e==="script"&&i.querySelector(Ls(u))||(e=i.createElement("link"),Se(e,"link",t),he(e),i.head.appendChild(e)))}}function A1(t,e){Jn.m(t,e);var n=qi;if(n&&t){var i=e&&typeof e.as=="string"?e.as:"script",l='link[rel="modulepreload"][as="'+nn(i)+'"][href="'+nn(t)+'"]',u=l;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Yi(t)}if(!fn.has(u)&&(t=S({rel:"modulepreload",href:t},e),fn.set(u,t),n.querySelector(l)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ls(u)))return}i=n.createElement("link"),Se(i,"link",t),he(i),n.head.appendChild(i)}}}function E1(t,e,n){Jn.S(t,e,n);var i=qi;if(i&&t){var l=ci(i).hoistableStyles,u=Gi(t);e=e||"default";var d=l.get(u);if(!d){var v={loading:0,preload:null};if(d=i.querySelector(Us(u)))v.loading=5;else{t=S({rel:"stylesheet",href:t,"data-precedence":e},n),(n=fn.get(u))&&Ju(t,n);var T=d=i.createElement("link");he(T),Se(T,"link",t),T._p=new Promise(function(N,z){T.onload=N,T.onerror=z}),T.addEventListener("load",function(){v.loading|=1}),T.addEventListener("error",function(){v.loading|=2}),v.loading|=4,fo(d,e,i)}d={type:"stylesheet",instance:d,count:1,state:v},l.set(u,d)}}}function j1(t,e){Jn.X(t,e);var n=qi;if(n&&t){var i=ci(n).hoistableScripts,l=Yi(t),u=i.get(l);u||(u=n.querySelector(Ls(l)),u||(t=S({src:t,async:!0},e),(e=fn.get(l))&&Iu(t,e),u=n.createElement("script"),he(u),Se(u,"link",t),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},i.set(l,u))}}function C1(t,e){Jn.M(t,e);var n=qi;if(n&&t){var i=ci(n).hoistableScripts,l=Yi(t),u=i.get(l);u||(u=n.querySelector(Ls(l)),u||(t=S({src:t,async:!0,type:"module"},e),(e=fn.get(l))&&Iu(t,e),u=n.createElement("script"),he(u),Se(u,"link",t),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},i.set(l,u))}}function $m(t,e,n,i){var l=(l=_e.current)?co(l):null;if(!l)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=Gi(n.href),n=ci(l).hoistableStyles,i=n.get(e),i||(i={type:"style",instance:null,count:0,state:null},n.set(e,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=Gi(n.href);var u=ci(l).hoistableStyles,d=u.get(t);if(d||(l=l.ownerDocument||l,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,d),(u=l.querySelector(Us(t)))&&!u._p&&(d.instance=u,d.state.loading=5),fn.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},fn.set(t,n),u||D1(l,t,n,d.state))),e&&i===null)throw Error(r(528,""));return d}if(e&&i!==null)throw Error(r(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Yi(n),n=ci(l).hoistableScripts,i=n.get(e),i||(i={type:"script",instance:null,count:0,state:null},n.set(e,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function Gi(t){return'href="'+nn(t)+'"'}function Us(t){return'link[rel="stylesheet"]['+t+"]"}function Wm(t){return S({},t,{"data-precedence":t.precedence,precedence:null})}function D1(t,e,n,i){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?i.loading=1:(e=t.createElement("link"),i.preload=e,e.addEventListener("load",function(){return i.loading|=1}),e.addEventListener("error",function(){return i.loading|=2}),Se(e,"link",n),he(e),t.head.appendChild(e))}function Yi(t){return'[src="'+nn(t)+'"]'}function Ls(t){return"script[async]"+t}function tp(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var i=t.querySelector('style[data-href~="'+nn(n.href)+'"]');if(i)return e.instance=i,he(i),i;var l=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(t.ownerDocument||t).createElement("style"),he(i),Se(i,"style",l),fo(i,n.precedence,t),e.instance=i;case"stylesheet":l=Gi(n.href);var u=t.querySelector(Us(l));if(u)return e.state.loading|=4,e.instance=u,he(u),u;i=Wm(n),(l=fn.get(l))&&Ju(i,l),u=(t.ownerDocument||t).createElement("link"),he(u);var d=u;return d._p=new Promise(function(v,T){d.onload=v,d.onerror=T}),Se(u,"link",i),e.state.loading|=4,fo(u,n.precedence,t),e.instance=u;case"script":return u=Yi(n.src),(l=t.querySelector(Ls(u)))?(e.instance=l,he(l),l):(i=n,(l=fn.get(u))&&(i=S({},n),Iu(i,l)),t=t.ownerDocument||t,l=t.createElement("script"),he(l),Se(l,"link",i),t.head.appendChild(l),e.instance=l);case"void":return null;default:throw Error(r(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(i=e.instance,e.state.loading|=4,fo(i,n.precedence,t));return e.instance}function fo(t,e,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=i.length?i[i.length-1]:null,u=l,d=0;d<i.length;d++){var v=i[d];if(v.dataset.precedence===e)u=v;else if(u!==l)break}u?u.parentNode.insertBefore(t,u.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function Ju(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function Iu(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var ho=null;function ep(t,e,n){if(ho===null){var i=new Map,l=ho=new Map;l.set(n,i)}else l=ho,i=l.get(n),i||(i=new Map,l.set(n,i));if(i.has(t))return i;for(i.set(t,null),n=n.getElementsByTagName(t),l=0;l<n.length;l++){var u=n[l];if(!(u[es]||u[ve]||t==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var d=u.getAttribute(e)||"";d=t+d;var v=i.get(d);v?v.push(u):i.set(d,[u])}}return i}function np(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function N1(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function ap(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function M1(t,e,n,i){if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=Gi(i.href),u=e.querySelector(Us(l));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=mo.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=u,he(u);return}u=e.ownerDocument||e,i=Wm(i),(l=fn.get(l))&&Ju(i,l),u=u.createElement("link"),he(u);var d=u;d._p=new Promise(function(v,T){d.onload=v,d.onerror=T}),Se(u,"link",i),n.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=mo.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var Fu=0;function k1(t,e){return t.stylesheets&&t.count===0&&vo(t,t.stylesheets),0<t.count||0<t.imgCount?function(n){var i=setTimeout(function(){if(t.stylesheets&&vo(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4+e);0<t.imgBytes&&Fu===0&&(Fu=62500*f1());var l=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&vo(t,t.stylesheets),t.unsuspend)){var u=t.unsuspend;t.unsuspend=null,u()}},(t.imgBytes>Fu?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(i),clearTimeout(l)}}:null}function mo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)vo(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var po=null;function vo(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,po=new Map,e.forEach(O1,t),po=null,mo.call(t))}function O1(t,e){if(!(e.state.loading&4)){var n=po.get(t);if(n)var i=n.get(null);else{n=new Map,po.set(t,n);for(var l=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<l.length;u++){var d=l[u];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(n.set(d.dataset.precedence,d),i=d)}i&&n.set(null,i)}l=e.instance,d=l.getAttribute("data-precedence"),u=n.get(d)||i,u===i&&n.set(null,l),n.set(d,l),this.count++,i=mo.bind(this),l.addEventListener("load",i),l.addEventListener("error",i),u?u.parentNode.insertBefore(l,u.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(l,t.firstChild)),e.state.loading|=4}}var Hs={$$typeof:L,Provider:null,Consumer:null,_currentValue:et,_currentValue2:et,_threadCount:0};function R1(t,e,n,i,l,u,d,v,T){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xt(0),this.hiddenUpdates=Xt(null),this.identifierPrefix=i,this.onUncaughtError=l,this.onCaughtError=u,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function ip(t,e,n,i,l,u,d,v,T,N,z,U){return t=new R1(t,e,n,d,T,N,z,U,v),e=1,u===!0&&(e|=24),u=Xe(3,null,null,e),t.current=u,u.stateNode=t,e=Nr(),e.refCount++,t.pooledCache=e,e.refCount++,u.memoizedState={element:i,isDehydrated:n,cache:e},Rr(u),t}function sp(t){return t?(t=Si,t):Si}function lp(t,e,n,i,l,u){l=sp(l),i.context===null?i.context=l:i.pendingContext=l,i=oa(e),i.payload={element:n},u=u===void 0?null:u,u!==null&&(i.callback=u),n=ra(t,i,e),n!==null&&(Ue(n,t,e),ys(n,t,e))}function op(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Pu(t,e){op(t,e),(t=t.alternate)&&op(t,e)}function rp(t){if(t.tag===13||t.tag===31){var e=Va(t,67108864);e!==null&&Ue(e,t,67108864),Pu(t,67108864)}}function up(t){if(t.tag===13||t.tag===31){var e=Ie();e=Ko(e);var n=Va(t,e);n!==null&&Ue(n,t,e),Pu(t,e)}}var go=!0;function w1(t,e,n,i){var l=A.T;A.T=null;var u=G.p;try{G.p=2,$u(t,e,n,i)}finally{G.p=u,A.T=l}}function z1(t,e,n,i){var l=A.T;A.T=null;var u=G.p;try{G.p=8,$u(t,e,n,i)}finally{G.p=u,A.T=l}}function $u(t,e,n,i){if(go){var l=Wu(i);if(l===null)Uu(t,e,i,yo,n),fp(t,i);else if(V1(l,t,e,n,i))i.stopPropagation();else if(fp(t,i),e&4&&-1<B1.indexOf(t)){for(;l!==null;){var u=ui(l);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var d=_n(u.pendingLanes);if(d!==0){var v=u;for(v.pendingLanes|=2,v.entangledLanes|=2;d;){var T=1<<31-je(d);v.entanglements[1]|=T,d&=~T}Cn(u),(Ot&6)===0&&(Wl=P()+500,ws(0))}}break;case 31:case 13:v=Va(u,2),v!==null&&Ue(v,u,2),eo(),Pu(u,2)}if(u=Wu(i),u===null&&Uu(t,e,i,yo,n),u===l)break;l=u}l!==null&&i.stopPropagation()}else Uu(t,e,i,null,n)}}function Wu(t){return t=er(t),tc(t)}var yo=null;function tc(t){if(yo=null,t=ri(t),t!==null){var e=h(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=f(e),t!==null)return t;t=null}else if(n===31){if(t=m(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return yo=t,null}function cp(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Q()){case Tt:return 2;case Rt:return 8;case dt:case Ae:return 32;case ie:return 268435456;default:return 32}default:return 32}}var ec=!1,ba=null,Sa=null,Ta=null,qs=new Map,Gs=new Map,xa=[],B1="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 fp(t,e){switch(t){case"focusin":case"focusout":ba=null;break;case"dragenter":case"dragleave":Sa=null;break;case"mouseover":case"mouseout":Ta=null;break;case"pointerover":case"pointerout":qs.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gs.delete(e.pointerId)}}function Ys(t,e,n,i,l,u){return t===null||t.nativeEvent!==u?(t={blockedOn:e,domEventName:n,eventSystemFlags:i,nativeEvent:u,targetContainers:[l]},e!==null&&(e=ui(e),e!==null&&rp(e)),t):(t.eventSystemFlags|=i,e=t.targetContainers,l!==null&&e.indexOf(l)===-1&&e.push(l),t)}function V1(t,e,n,i,l){switch(e){case"focusin":return ba=Ys(ba,t,e,n,i,l),!0;case"dragenter":return Sa=Ys(Sa,t,e,n,i,l),!0;case"mouseover":return Ta=Ys(Ta,t,e,n,i,l),!0;case"pointerover":var u=l.pointerId;return qs.set(u,Ys(qs.get(u)||null,t,e,n,i,l)),!0;case"gotpointercapture":return u=l.pointerId,Gs.set(u,Ys(Gs.get(u)||null,t,e,n,i,l)),!0}return!1}function dp(t){var e=ri(t.target);if(e!==null){var n=h(e);if(n!==null){if(e=n.tag,e===13){if(e=f(n),e!==null){t.blockedOn=e,jf(t.priority,function(){up(n)});return}}else if(e===31){if(e=m(n),e!==null){t.blockedOn=e,jf(t.priority,function(){up(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function bo(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Wu(t.nativeEvent);if(n===null){n=t.nativeEvent;var i=new n.constructor(n.type,n);tr=i,n.target.dispatchEvent(i),tr=null}else return e=ui(n),e!==null&&rp(e),t.blockedOn=n,!1;e.shift()}return!0}function hp(t,e,n){bo(t)&&n.delete(e)}function U1(){ec=!1,ba!==null&&bo(ba)&&(ba=null),Sa!==null&&bo(Sa)&&(Sa=null),Ta!==null&&bo(Ta)&&(Ta=null),qs.forEach(hp),Gs.forEach(hp)}function So(t,e){t.blockedOn===e&&(t.blockedOn=null,ec||(ec=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,U1)))}var To=null;function mp(t){To!==t&&(To=t,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){To===t&&(To=null);for(var e=0;e<t.length;e+=3){var n=t[e],i=t[e+1],l=t[e+2];if(typeof i!="function"){if(tc(i||n)===null)continue;break}var u=ui(n);u!==null&&(t.splice(e,3),e-=3,Wr(u,{pending:!0,data:l,method:n.method,action:i},i,l))}}))}function Xi(t){function e(T){return So(T,t)}ba!==null&&So(ba,t),Sa!==null&&So(Sa,t),Ta!==null&&So(Ta,t),qs.forEach(e),Gs.forEach(e);for(var n=0;n<xa.length;n++){var i=xa[n];i.blockedOn===t&&(i.blockedOn=null)}for(;0<xa.length&&(n=xa[0],n.blockedOn===null);)dp(n),n.blockedOn===null&&xa.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(i=0;i<n.length;i+=3){var l=n[i],u=n[i+1],d=l[Oe]||null;if(typeof u=="function")d||mp(n);else if(d){var v=null;if(u&&u.hasAttribute("formAction")){if(l=u,d=u[Oe]||null)v=d.formAction;else if(tc(l)!==null)continue}else v=d.action;typeof v=="function"?n[i+1]=v:(n.splice(i,3),i-=3),mp(n)}}}function pp(){function t(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(d){return l=d})},focusReset:"manual",scroll:"manual"})}function e(){l!==null&&(l(),l=null),i||setTimeout(n,20)}function n(){if(!i&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,l=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(n,100),function(){i=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),l!==null&&(l(),l=null)}}}function nc(t){this._internalRoot=t}xo.prototype.render=nc.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(r(409));var n=e.current,i=Ie();lp(n,i,t,e,null,null)},xo.prototype.unmount=nc.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;lp(t.current,2,null,t,null,null),eo(),e[oi]=null}};function xo(t){this._internalRoot=t}xo.prototype.unstable_scheduleHydration=function(t){if(t){var e=Ef();t={blockedOn:null,target:t,priority:e};for(var n=0;n<xa.length&&e!==0&&e<xa[n].priority;n++);xa.splice(n,0,t),n===0&&dp(t)}};var vp=s.version;if(vp!=="19.2.4")throw Error(r(527,vp,"19.2.4"));G.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=g(e),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var L1={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _o=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_o.isDisabled&&_o.supportsFiber)try{xn=_o.inject(L1),Ee=_o}catch{}}return Xs.createRoot=function(t,e){if(!c(t))throw Error(r(299));var n=!1,i="",l=_h,u=Ah,d=Eh;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(i=e.identifierPrefix),e.onUncaughtError!==void 0&&(l=e.onUncaughtError),e.onCaughtError!==void 0&&(u=e.onCaughtError),e.onRecoverableError!==void 0&&(d=e.onRecoverableError)),e=ip(t,1,!1,null,null,n,i,null,l,u,d,pp),t[oi]=e.current,Vu(t),new nc(e)},Xs.hydrateRoot=function(t,e,n){if(!c(t))throw Error(r(299));var i=!1,l="",u=_h,d=Ah,v=Eh,T=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.formState!==void 0&&(T=n.formState)),e=ip(t,1,!0,e,n??null,i,l,T,u,d,v,pp),e.context=sp(null),n=e.current,i=Ie(),i=Ko(i),l=oa(i),l.callback=null,ra(n,l,i),n=i,e.current.lanes=n,pe(e,n),Cn(e),t[oi]=e.current,Vu(t),new xo(e)},Xs.version="19.2.4",Xs}var _p;function ab(){if(_p)return ac.exports;_p=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(s){console.error(s)}}return a(),ac.exports=nb(),ac.exports}var ib=ab();const sb=3e3,lb=1e4,Ap=5e3;function ob(a){const s=typeof window<"u"&&window.__GRACKLE_API_KEY__||"",o=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}?token=${encodeURIComponent(s)}`:"ws://localhost:3000",r=_.useRef(void 0),[c,h]=_.useState(!1),[f,m]=_.useState([]),[p,g]=_.useState([]),[b,S]=_.useState([]),[x,j]=_.useState(void 0),[O,w]=_.useState([]),[Z,X]=_.useState([]),[F,L]=_.useState([]),[R,Y]=_.useState([]),[H,I]=_.useState(void 0),[B,nt]=_.useState({}),[ct,st]=_.useState([]),[ft,gt]=_.useState(""),[Ct,Yt]=_.useState(!1),A=_.useCallback(q=>{var P;((P=r.current)==null?void 0:P.readyState)===WebSocket.OPEN&&r.current.send(JSON.stringify(q))},[]);_.useEffect(()=>{let q,P,Q;function Tt(){q=new WebSocket(o),r.current=q,q.onopen=()=>{h(!0),A({type:"list_environments"}),A({type:"list_sessions"}),A({type:"list_projects"}),A({type:"list_tokens"}),A({type:"subscribe_all"}),clearInterval(Q),Q=setInterval(()=>{A({type:"list_environments"})},lb)},q.onmessage=Rt=>{var Ae,ie,si,li,xn,Ee,vn,je,rl,ul,cl,Da,Na,Ma,_n,ka,Wn;const dt=JSON.parse(Rt.data);switch(dt.type){case"environments":m(((Ae=dt.payload)==null?void 0:Ae.environments)||[]);break;case"sessions":g(((ie=dt.payload)==null?void 0:ie.sessions)||[]);break;case"session_event":{const ht=dt.payload;S(Bt=>{const Xt=[...Bt,ht];return Xt.length>Ap?Xt.slice(-Ap):Xt}),ht.eventType==="status"&&g(Bt=>Bt.map(Xt=>Xt.id===ht.sessionId?{...Xt,status:ht.content}:Xt));break}case"session_events":{const ht=(si=dt.payload)==null?void 0:si.events,Bt=(li=dt.payload)==null?void 0:li.sessionId;ht&&Bt&&S(Xt=>[...Xt.filter(Oa=>Oa.sessionId!==Bt),...ht]);break}case"spawned":{const ht=(xn=dt.payload)==null?void 0:xn.sessionId;ht&&j(ht),A({type:"list_sessions"}),A({type:"list_environments"});break}case"projects":w(((Ee=dt.payload)==null?void 0:Ee.projects)||[]);break;case"project_created":A({type:"list_projects"});break;case"project_archived":A({type:"list_projects"});break;case"tasks":{const ht=((vn=dt.payload)==null?void 0:vn.tasks)||[],Bt=((je=dt.payload)==null?void 0:je.projectId)||(ht.length>0?ht[0].projectId:"");if(!Bt){X(ht);break}X(Xt=>[...Xt.filter(pe=>pe.projectId!==Bt),...ht]);break}case"task_created":{const ht=((rl=dt.payload)==null?void 0:rl.task)||{},Bt=ht.project_id||ht.projectId;Bt&&A({type:"list_tasks",payload:{projectId:Bt}});break}case"task_started":{const ht=dt.payload;ht.sessionId&&A({type:"list_sessions"});const Bt=ht.projectId;Bt?A({type:"list_tasks",payload:{projectId:Bt}}):ht.taskId&&X(Xt=>{const pe=Xt.find(Oa=>Oa.id===ht.taskId);return pe&&A({type:"list_tasks",payload:{projectId:pe.projectId}}),Xt});break}case"task_approved":case"task_rejected":case"task_deleted":case"task_updated":{const ht=dt.payload,Bt=ht.projectId;Bt?A({type:"list_tasks",payload:{projectId:Bt}}):ht.taskId&&X(Xt=>{const pe=Xt.find(Oa=>Oa.id===ht.taskId);return pe&&A({type:"list_tasks",payload:{projectId:pe.projectId}}),Xt});break}case"findings":L(((ul=dt.payload)==null?void 0:ul.findings)||[]);break;case"finding_posted":(cl=dt.payload)!=null&&cl.projectId&&A({type:"list_findings",payload:{projectId:dt.payload.projectId}});break;case"tokens":Y(((Da=dt.payload)==null?void 0:Da.tokens)||[]);break;case"token_changed":A({type:"list_tokens"});break;case"task_diff":I(dt.payload);break;case"provision_progress":{const ht=dt.payload;ht.environmentId&&(nt(Bt=>({...Bt,[ht.environmentId]:{stage:ht.stage,message:ht.message,progress:ht.progress}})),ht.stage==="ready"&&setTimeout(()=>{nt(Xt=>{const pe={...Xt};return delete pe[ht.environmentId],pe})},5e3),(ht.stage==="ready"||ht.stage==="error")&&A({type:"list_environments"}));break}case"environment_added":break;case"environment_removed":if((Na=dt.payload)!=null&&Na.environmentId){const ht=dt.payload.environmentId;nt(Bt=>{const Xt={...Bt};return delete Xt[ht],Xt})}A({type:"list_environments"}),A({type:"list_sessions"});break;case"codespaces_list":{const ht=((Ma=dt.payload)==null?void 0:Ma.codespaces)||[],Bt=((_n=dt.payload)==null?void 0:_n.error)||"";st(ht),gt(Bt);break}case"codespace_created":{Yt(!1),A({type:"list_codespaces"});break}case"codespace_create_error":{Yt(!1);const ht=((ka=dt.payload)==null?void 0:ka.message)||"Failed to create codespace";gt(ht);break}case"error":console.error("[ws]",(Wn=dt.payload)==null?void 0:Wn.message);break}},q.onclose=()=>{h(!1),r.current=void 0,clearInterval(Q),clearTimeout(P),P=setTimeout(Tt,sb)},q.onerror=()=>{q.close()}}return Tt(),()=>{clearInterval(Q),clearTimeout(P),q==null||q.close()}},[o,A]);const G=_.useCallback((q,P,Q,Tt)=>{A({type:"spawn",payload:{environmentId:q,prompt:P,model:Q||"",runtime:Tt||""}})},[A]),et=_.useCallback((q,P)=>{A({type:"send_input",payload:{sessionId:q,text:P}})},[A]),yt=_.useCallback(q=>{A({type:"kill",payload:{sessionId:q}})},[A]),bt=_.useCallback(()=>{A({type:"list_environments"}),A({type:"list_sessions"}),A({type:"list_projects"}),A({type:"list_tokens"})},[A]),Ht=_.useCallback(q=>{A({type:"get_session_events",payload:{sessionId:q}})},[A]),Dt=_.useCallback(()=>{S([])},[]),mt=_.useCallback((q,P,Q,Tt)=>{A({type:"create_project",payload:{name:q,description:P||"",repoUrl:Q||"",defaultEnvironmentId:Tt||""}})},[A]),qt=_.useCallback(q=>{A({type:"archive_project",payload:{projectId:q}})},[A]),ce=_.useCallback(q=>{A({type:"list_tasks",payload:{projectId:q}})},[A]),_e=_.useCallback((q,P,Q,Tt,Rt,dt)=>{A({type:"create_task",payload:{projectId:q,title:P,description:Q||"",environmentId:Tt||"",dependsOn:Rt||[],parentTaskId:dt||""}})},[A]),Le=_.useCallback((q,P,Q)=>{A({type:"start_task",payload:{taskId:q,runtime:P||"",model:Q||""}})},[A]),We=_.useCallback(q=>{A({type:"approve_task",payload:{taskId:q}})},[A]),Ne=_.useCallback((q,P)=>{A({type:"reject_task",payload:{taskId:q,reviewNotes:P}})},[A]),mn=_.useCallback(q=>{A({type:"delete_task",payload:{taskId:q}})},[A]),He=_.useCallback(q=>{A({type:"list_findings",payload:{projectId:q}})},[A]),qe=_.useCallback((q,P,Q,Tt,Rt)=>{A({type:"post_finding",payload:{projectId:q,title:P,content:Q,category:Tt||"general",tags:Rt||[]}})},[A]),pn=_.useCallback(q=>{I(void 0),A({type:"get_task_diff",payload:{taskId:q}})},[A]),Me=_.useCallback(()=>{A({type:"list_tokens"})},[A]),Ge=_.useCallback((q,P,Q,Tt,Rt)=>{A({type:"set_token",payload:{name:q,value:P,tokenType:Q,envVar:Tt,filePath:Rt}})},[A]),tn=_.useCallback(q=>{A({type:"delete_token",payload:{name:q}})},[A]),K=_.useCallback((q,P,Q,Tt)=>{const Rt={displayName:q,adapterType:P,adapterConfig:Q||{}};Tt&&(Rt.defaultRuntime=Tt),A({type:"add_environment",payload:Rt})},[A]),at=_.useCallback(q=>{A({type:"provision_environment",payload:{environmentId:q}})},[A]),W=_.useCallback(q=>{A({type:"stop_environment",payload:{environmentId:q}})},[A]),J=_.useCallback(q=>{A({type:"remove_environment",payload:{environmentId:q}})},[A]),St=_.useCallback(()=>{A({type:"list_codespaces"})},[A]),kt=_.useCallback(q=>{if(!c){gt("Not connected to server. Please try again once the connection is restored.");return}Yt(!0),gt(""),A({type:"create_codespace",payload:{repo:q}})},[A,c]);return{connected:c,environments:f,sessions:p,events:b,lastSpawnedId:x,projects:O,tasks:Z,findings:F,tokens:R,taskDiff:H,spawn:G,sendInput:et,kill:yt,refresh:bt,loadSessionEvents:Ht,clearEvents:Dt,createProject:mt,archiveProject:qt,loadTasks:ce,createTask:_e,startTask:Le,approveTask:We,rejectTask:Ne,deleteTask:mn,loadFindings:He,postFinding:qe,loadTaskDiff:pn,addEnvironment:K,loadTokens:Me,setToken:Ge,deleteToken:tn,provisionStatus:B,provisionEnvironment:at,stopEnvironment:W,removeEnvironment:J,codespaces:ct,codespaceError:ft,codespaceCreating:Ct,listCodespaces:St,createCodespace:kt}}const Lc=_.createContext(void 0);function rb({children:a}){const s=ob();return y.jsx(Lc.Provider,{value:s,children:a})}function $n(){const a=_.useContext(Lc);if(!a)throw new Error("useGrackle must be used within GrackleProvider");return a}const ub=[{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}],cb=[{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"}],fb=[{sessionId:"sess-001",eventType:"status",timestamp:"2026-02-27T08:15:01Z",content:"running"},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:02Z",content:"Analyzing current authentication middleware in src/middleware/auth.ts..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:04Z",content:`Found 3 files using session-based auth:
|
|
26
|
-
- src/middleware/auth.ts
|
|
27
|
-
- src/routes/login.ts
|
|
28
|
-
- src/routes/protected.ts`},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:07Z",content:"Installing jsonwebtoken and @types/jsonwebtoken..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:12Z",content:`Rewriting auth middleware:
|
|
29
|
-
\`\`\`typescript
|
|
30
|
-
import jwt from "jsonwebtoken";
|
|
31
|
-
import type { Request, Response, NextFunction } from "express";
|
|
32
|
-
|
|
33
|
-
const JWT_SECRET = process.env.JWT_SECRET || "change-me";
|
|
34
|
-
|
|
35
|
-
export function verifyToken(req: Request, res: Response, next: NextFunction): void {
|
|
36
|
-
const header = req.headers.authorization;
|
|
37
|
-
if (!header?.startsWith("Bearer ")) {
|
|
38
|
-
res.status(401).json({ error: "Missing token" });
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
try {
|
|
42
|
-
const decoded = jwt.verify(header.slice(7), JWT_SECRET);
|
|
43
|
-
req.user = decoded;
|
|
44
|
-
next();
|
|
45
|
-
} catch {
|
|
46
|
-
res.status(403).json({ error: "Invalid token" });
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
\`\`\``},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:18Z",content:"Updated login route to issue JWT tokens with 24h expiry."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:22Z",content:"Running test suite... 14 tests passed, 2 updated, 0 failed."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:30:01Z",content:"running"},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:30:05Z",content:"Generating pytest tests for POST /api/register endpoint..."},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:32:00Z",content:"Created 8 test cases covering: valid registration, duplicate email, weak password, missing fields, SQL injection, XSS payload, rate limit, and CORS headers."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:33:00Z",content:"completed"}],db=[{id:"proj-alpha",name:"Project Alpha",description:"Core platform API and authentication services",repoUrl:"https://github.com/acme/alpha",defaultEnvironmentId:"env-local-01",status:"active",createdAt:"2026-01-15T10:00:00Z"},{id:"proj-beta",name:"Data Pipeline",description:"ETL pipelines for analytics and reporting",repoUrl:"https://github.com/acme/data-pipeline",defaultEnvironmentId:"env-docker-01",status:"active",createdAt:"2026-02-01T14:30:00Z"},{id:"proj-gamma",name:"Mobile App",description:"React Native cross-platform mobile application",repoUrl:"",defaultEnvironmentId:"env-local-01",status:"archived",createdAt:"2025-11-20T09:00:00Z"}],hb=[{id:"task-001",projectId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"in_progress",branch:"feat/jwt-auth",environmentId:"env-local-01",sessionId:"sess-001",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0},{id:"task-001a",projectId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"done",branch:"feat/jwt-auth/design-token-schema",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-001b",projectId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"in_progress",branch:"feat/jwt-auth/implement-auth-middleware",environmentId:"env-local-01",sessionId:"sess-001",dependsOn:[],reviewNotes:"",sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-001c",projectId:"proj-alpha",title:"Write auth integration tests",description:"End-to-end tests for login flow, token refresh, and protected route access",status:"pending",branch:"",environmentId:"env-local-01",sessionId:"",dependsOn:["task-001b"],reviewNotes:"",sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-002",projectId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"pending",branch:"",environmentId:"env-local-01",sessionId:"",dependsOn:["task-001"],reviewNotes:"",sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-003",projectId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"review",branch:"feat/openapi-docs",environmentId:"env-local-01",sessionId:"sess-002",dependsOn:[],reviewNotes:"",sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-004",projectId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"done",branch:"feat/db-pool",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"LGTM — pool size and idle timeout values are sensible.",sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-005",projectId:"proj-alpha",title:"Fix N+1 query in user list",description:"Use a JOIN instead of per-row lookups in GET /api/users",status:"assigned",branch:"fix/user-list-n1",environmentId:"env-local-01",sessionId:"",dependsOn:[],reviewNotes:"The fix breaks pagination — cursor should reference the joined table, not the subquery.",sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-006",projectId:"proj-beta",title:"Add Parquet export support",description:"Allow pipeline outputs to be written as Parquet files for Spark consumption",status:"in_progress",branch:"feat/parquet-export",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0},{id:"task-006a",projectId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"done",branch:"feat/parquet-export/define-parquet-schema-mapping",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006b",projectId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"done",branch:"feat/parquet-export/implement-row-group-writer",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-006a"],reviewNotes:"",sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006c",projectId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"in_progress",branch:"feat/parquet-export/add-compression-options",environmentId:"env-docker-01",sessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:"",sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006d",projectId:"proj-beta",title:"Write Parquet integration tests",description:"Round-trip tests: write Parquet, read back with pyarrow, verify data integrity",status:"pending",branch:"",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-006c"],reviewNotes:"",sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-007",projectId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"in_progress",branch:"feat/incremental",environmentId:"env-docker-01",sessionId:"sess-004",dependsOn:[],reviewNotes:"",sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0},{id:"task-007a",projectId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"done",branch:"feat/incremental/design-watermark-storage",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-007b",projectId:"proj-beta",title:"Implement change detection query",description:"Generate WHERE clauses from watermarks to fetch only changed rows",status:"failed",branch:"feat/incremental/implement-change-detection-query",environmentId:"env-docker-01",sessionId:"",dependsOn:["task-007a"],reviewNotes:"Query fails on tables without a monotonic primary key",sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-008",projectId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"review",branch:"feat/monitoring",environmentId:"env-docker-01",sessionId:"",dependsOn:[],reviewNotes:"",sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1}],Ep=[{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"}],mb=[{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:""}];function de(a){return new Date(Date.now()+a).toISOString()}const jp=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:de(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:de(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:de(1600),content:`Found 5 endpoints that need refactoring:
|
|
50
|
-
- GET /api/users
|
|
51
|
-
- POST /api/users
|
|
52
|
-
- GET /api/users/:id
|
|
53
|
-
- PUT /api/users/:id
|
|
54
|
-
- DELETE /api/users/:id`}},{delayMs:2800,event:{eventType:"output",timestamp:de(2800),content:"Refactoring to use Express Router with middleware chain...\n```typescript\nconst router = Router();\nrouter.use(authenticate);\nrouter.use(validateBody);\n```"}},{delayMs:4e3,event:{eventType:"output",timestamp:de(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:de(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:de(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:de(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:de(1400),content:`Found tables to modify:
|
|
55
|
-
- users (add column: last_login_at)
|
|
56
|
-
- sessions (add index on expires_at)
|
|
57
|
-
- audit_log (new table)`}},{delayMs:2200,event:{eventType:"output",timestamp:de(2200),content:`⚠ This migration will add a NOT NULL column to the users table.
|
|
58
|
-
The table has 50,000+ rows — this may lock the table briefly.
|
|
59
|
-
|
|
60
|
-
Please confirm to proceed.`}}],resumeSteps:[{delayMs:500,event:{eventType:"output",timestamp:de(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:de(1e3),content:`Migration 001_add_last_login.sql applied successfully.
|
|
61
|
-
Migration 002_sessions_index.sql applied successfully.
|
|
62
|
-
Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventType:"output",timestamp:de(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:de(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:de(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:de(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:de(1800),content:`Writing test cases:
|
|
63
|
-
- should calculate monthly total
|
|
64
|
-
- should apply discount codes
|
|
65
|
-
- should handle currency conversion
|
|
66
|
-
- should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:de(2800),content:`Error: Cannot resolve import 'src/services/stripe-client.ts' — module not found.
|
|
67
|
-
The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:de(3500),content:"failed"}}]}],lc={taskId:"task-001",branch:"feat/jwt-auth",changedFiles:["src/middleware/auth.ts","src/routes/login.ts","src/routes/protected.ts","package.json","tests/auth.test.ts"],additions:87,deletions:34,diff:`diff --git a/src/middleware/auth.ts b/src/middleware/auth.ts
|
|
68
|
-
index 1a2b3c4..5e6f7g8 100644
|
|
69
|
-
--- a/src/middleware/auth.ts
|
|
70
|
-
+++ b/src/middleware/auth.ts
|
|
71
|
-
@@ -1,18 +1,26 @@
|
|
72
|
-
-import session from "express-session";
|
|
73
|
-
-import type { Request, Response, NextFunction } from "express";
|
|
74
|
-
+import jwt from "jsonwebtoken";
|
|
75
|
-
+import type { Request, Response, NextFunction } from "express";
|
|
76
|
-
+
|
|
77
|
-
+const JWT_SECRET: string = process.env.JWT_SECRET || "change-me";
|
|
78
|
-
+const TOKEN_EXPIRY: string = "24h";
|
|
79
|
-
|
|
80
|
-
-export function requireSession(req: Request, res: Response, next: NextFunction): void {
|
|
81
|
-
- if (!req.session?.userId) {
|
|
82
|
-
- res.status(401).json({ message: "Not authenticated" });
|
|
83
|
-
+export function verifyToken(req: Request, res: Response, next: NextFunction): void {
|
|
84
|
-
+ const header = req.headers.authorization;
|
|
85
|
-
+ if (!header?.startsWith("Bearer ")) {
|
|
86
|
-
+ res.status(401).json({ error: "Missing token", code: "AUTH_MISSING" });
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
- next();
|
|
90
|
-
+ try {
|
|
91
|
-
+ const decoded = jwt.verify(header.slice(7), JWT_SECRET);
|
|
92
|
-
+ req.user = decoded;
|
|
93
|
-
+ next();
|
|
94
|
-
+ } catch {
|
|
95
|
-
+ res.status(403).json({ error: "Invalid token", code: "AUTH_INVALID" });
|
|
96
|
-
+ }
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
diff --git a/src/routes/login.ts b/src/routes/login.ts
|
|
100
|
-
index 2b3c4d5..8f9a0b1 100644
|
|
101
|
-
--- a/src/routes/login.ts
|
|
102
|
-
+++ b/src/routes/login.ts
|
|
103
|
-
@@ -1,12 +1,22 @@
|
|
104
|
-
import { Router } from "express";
|
|
105
|
-
+import jwt from "jsonwebtoken";
|
|
106
|
-
import { findUserByEmail, verifyPassword } from "../services/users.js";
|
|
107
|
-
|
|
108
|
-
+const JWT_SECRET: string = process.env.JWT_SECRET || "change-me";
|
|
109
|
-
+const TOKEN_EXPIRY: string = "24h";
|
|
110
|
-
+
|
|
111
|
-
const router = Router();
|
|
112
|
-
|
|
113
|
-
router.post("/login", async (req, res) => {
|
|
114
|
-
const { email, password } = req.body;
|
|
115
|
-
const user = await findUserByEmail(email);
|
|
116
|
-
- if (!user || !verifyPassword(password, user.passwordHash)) {
|
|
117
|
-
- return res.status(401).json({ message: "Invalid credentials" });
|
|
118
|
-
+ if (!user || !await verifyPassword(password, user.passwordHash)) {
|
|
119
|
-
+ return res.status(401).json({ error: "Invalid credentials", code: "AUTH_FAILED" });
|
|
120
|
-
}
|
|
121
|
-
- req.session.userId = user.id;
|
|
122
|
-
- res.json({ ok: true });
|
|
123
|
-
+ const token = jwt.sign(
|
|
124
|
-
+ { sub: user.id, email: user.email, role: user.role },
|
|
125
|
-
+ JWT_SECRET,
|
|
126
|
-
+ { expiresIn: TOKEN_EXPIRY }
|
|
127
|
-
+ );
|
|
128
|
-
+ res.json({ token, expiresIn: TOKEN_EXPIRY });
|
|
129
|
-
});`},Cp=400,pb=600;function vb({children:a}){const[s,o]=_.useState(cb),[r,c]=_.useState(fb),[h,f]=_.useState(void 0),[m,p]=_.useState(db),[g,b]=_.useState(hb),[S,x]=_.useState(Ep),[j,O]=_.useState(mb),[w,Z]=_.useState(lc),X=_.useRef(0),F=_.useRef(0),L=_.useRef(new Set),R=_.useRef(new Map),Y=_.useRef(g);Y.current=g;const H=_.useRef(new Map),I=_.useRef(new Map),B=_.useCallback(K=>(X.current+=1,`mock-${K}-${String(X.current).padStart(3,"0")}`),[]),nt=_.useCallback(()=>{const K=jp[F.current%jp.length];return F.current+=1,K},[]),ct=_.useCallback((K,at,W)=>{const J=setTimeout(()=>{var St;L.current.delete(J),W&&((St=R.current.get(W))==null||St.delete(J)),K()},at);L.current.add(J),W&&(R.current.has(W)||R.current.set(W,new Set),R.current.get(W).add(J))},[]),st=_.useCallback(K=>{const at=R.current.get(K);at&&(at.forEach(W=>{clearTimeout(W),L.current.delete(W)}),R.current.delete(K))},[]),ft=_.useCallback((K,at)=>{o(W=>W.map(J=>J.id===K?{...J,status:at}:J))},[]),gt=_.useCallback(K=>{c(at=>[...at,K])},[]),Ct=_.useCallback((K,at,W)=>{at.forEach((J,St)=>{ct(()=>{const kt={sessionId:K,...J.event,timestamp:new Date().toISOString()};gt(kt),J.event.eventType==="status"&&ft(K,J.event.content),St===at.length-1&&W&&W()},J.delayMs,K)})},[ct,gt,ft]),Yt=_.useCallback((K,at,W,J)=>{console.log("[MockGrackle] spawn",{environmentId:K,prompt:at,runtime:J});const St=B("sess"),kt={id:St,environmentId:K,runtime:J||"claude-code",status:"running",prompt:at,startedAt:new Date().toISOString()};o(P=>[...P,kt]),f(St);const q=nt();if(console.log(`[MockGrackle] Playing scenario: ${q.label}`),q.pauseForInput){const P=q.pauseAfterStep??q.steps.length-1,Q=q.steps.slice(0,P+1),Tt=Q.length>0?Q[Q.length-1].delayMs:0;Ct(St,Q),ct(()=>{ft(St,"waiting_input"),gt({sessionId:St,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},Tt+Cp,St),q.resumeSteps&&H.current.set(St,q.resumeSteps)}else Ct(St,q.steps)},[B,nt,Ct,ct,ft,gt]),A=_.useCallback(K=>{console.log("[MockGrackle] kill",K),st(K),H.current.delete(K),ft(K,"killed"),gt({sessionId:K,eventType:"status",timestamp:new Date().toISOString(),content:"killed"}),b(at=>at.map(W=>W.sessionId===K&&W.status==="in_progress"?{...W,status:"failed"}:W))},[st,ft,gt]),G=_.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),et=_.useCallback(K=>{console.log("[MockGrackle] loadSessionEvents",K)},[]),yt=_.useCallback(()=>{console.log("[MockGrackle] clearEvents"),c([])},[]),bt=_.useCallback((K,at,W,J)=>{console.log("[MockGrackle] createProject",{name:K,description:at});const St={id:B("proj"),name:K,description:at||"",repoUrl:W||"",defaultEnvironmentId:J||"",status:"active",createdAt:new Date().toISOString()};p(kt=>[...kt,St])},[B]),Ht=_.useCallback(K=>{console.log("[MockGrackle] archiveProject",K),p(at=>at.map(W=>W.id===K?{...W,status:"archived"}:W))},[]),Dt=_.useCallback(K=>{console.log("[MockGrackle] loadTasks",K)},[]),mt=_.useCallback((K,at,W,J,St,kt)=>{console.log("[MockGrackle] createTask",{projectId:K,title:at,parentTaskId:kt}),b(q=>{const Q=q.filter(Ae=>Ae.projectId===K).reduce((Ae,ie)=>Math.max(Ae,ie.sortOrder),0),Tt=kt?q.find(Ae=>Ae.id===kt):void 0;if(kt&&!Tt)return console.warn("[MockGrackle] Parent task not found:",kt),q;if(Tt&&!Tt.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",kt),q;const Rt=Tt?Tt.depth+1:0,dt={id:B("task"),projectId:K,title:at,description:W||"",status:"pending",branch:"",environmentId:J||"",sessionId:"",dependsOn:St||[],reviewNotes:"",sortOrder:Q+1,createdAt:new Date().toISOString(),parentTaskId:kt||"",depth:Rt,childTaskIds:[],canDecompose:!kt};return[...q,dt]})},[B]),qt=_.useCallback((K,at,W)=>{var Tt;console.log("[MockGrackle] startTask",{taskId:K,runtime:at});const J=Y.current.find(Rt=>Rt.id===K),St=(J==null?void 0:J.environmentId)??"",kt=(J==null?void 0:J.title)??"",q=B("sess"),P={id:q,environmentId:St||"env-local-01",runtime:at||"claude-code",status:"running",prompt:kt||K,startedAt:new Date().toISOString()};o(Rt=>[...Rt,P]),b(Rt=>Rt.map(dt=>dt.id===K?{...dt,status:"in_progress",sessionId:q,branch:`mock/${K.slice(0,8)}`}:dt));const Q=nt();if(console.log(`[MockGrackle] Playing task scenario: ${Q.label}`),Q.pauseForInput){const Rt=Q.pauseAfterStep??Q.steps.length-1,dt=Q.steps.slice(0,Rt+1),Ae=dt.length>0?dt[dt.length-1].delayMs:0;if(Ct(q,dt),ct(()=>{ft(q,"waiting_input"),gt({sessionId:q,eventType:"status",timestamp:new Date().toISOString(),content:"waiting_input"})},Ae+Cp,q),Q.resumeSteps){const ie=[...Q.resumeSteps];H.current.set(q,ie);const si=ie.reduce((li,xn)=>Math.max(li,xn.delayMs),0);I.current.set(q,{taskId:K,delayAfterResume:si+200})}}else{const Rt=Q.steps.length>0?Q.steps[Q.steps.length-1].delayMs:0;Ct(q,Q.steps);const dt=(Tt=Q.steps[Q.steps.length-1])==null?void 0:Tt.event.content;ct(()=>{dt==="completed"?b(Ae=>Ae.map(ie=>ie.id===K&&ie.status==="in_progress"?{...ie,status:"review"}:ie)):dt==="failed"&&b(Ae=>Ae.map(ie=>ie.id===K&&ie.status==="in_progress"?{...ie,status:"failed"}:ie))},Rt+100,q)}},[B,nt,Ct,ct,ft,gt]),ce=_.useCallback((K,at)=>{console.log("[MockGrackle] sendInput",{sessionId:K,text:at}),gt({sessionId:K,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${at}`}),ft(K,"running"),gt({sessionId:K,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const W=H.current.get(K);if(W)H.current.delete(K),Ct(K,W);else{const St=[{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"}}];Ct(K,St)}const J=I.current.get(K);J&&(I.current.delete(K),ct(()=>{b(St=>St.map(kt=>kt.id===J.taskId&&kt.status==="in_progress"?{...kt,status:"review"}:kt))},J.delayAfterResume,K))},[gt,ft,Ct,ct]),_e=_.useCallback(K=>{console.log("[MockGrackle] approveTask",K),b(at=>at.map(W=>W.id===K?{...W,status:"done"}:W))},[]),Le=_.useCallback((K,at)=>{console.log("[MockGrackle] rejectTask",{taskId:K,reviewNotes:at}),b(W=>W.map(J=>J.id===K?{...J,status:"assigned",reviewNotes:at,sessionId:""}:J))},[]),We=_.useCallback(K=>{console.log("[MockGrackle] deleteTask",K),b(at=>at.filter(W=>W.id!==K))},[]),Ne=_.useCallback(K=>{console.log("[MockGrackle] loadFindings",K),x(Ep.filter(at=>at.projectId===K))},[]),mn=_.useCallback((K,at,W,J,St)=>{console.log("[MockGrackle] postFinding",{projectId:K,title:at});const kt={id:B("find"),projectId:K,taskId:"",sessionId:"",category:J||"general",title:at,content:W,tags:St||[],createdAt:new Date().toISOString()};x(q=>[...q,kt])},[B]),He=_.useCallback((K,at,W,J)=>{console.log("[MockGrackle] addEnvironment",{displayName:K,adapterType:at,adapterConfig:W,defaultRuntime:J})},[]),qe=_.useCallback(K=>{console.log("[MockGrackle] loadTaskDiff",K),Z(void 0);const at=setTimeout(()=>{L.current.delete(at),lc.taskId===K?Z(lc):Z({taskId:K,error:"No diff available for this task in mock mode."})},pb);L.current.add(at)},[]),pn=_.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),Me=_.useCallback((K,at,W,J,St)=>{console.log("[MockGrackle] setToken",{name:K,tokenType:W}),O(kt=>[...kt.filter(P=>P.name!==K),{name:K,tokenType:W,envVar:J,filePath:St,expiresAt:""}])},[]),Ge=_.useCallback(K=>{console.log("[MockGrackle] deleteToken",K),O(at=>at.filter(W=>W.name!==K))},[]);_.useEffect(()=>()=>{L.current.forEach(clearTimeout),L.current.clear()},[]);const tn=_.useMemo(()=>({connected:!0,environments:ub,sessions:s,events:r,lastSpawnedId:h,projects:m,tasks:g,findings:S,tokens:j,taskDiff:w,spawn:Yt,sendInput:ce,kill:A,refresh:G,loadSessionEvents:et,clearEvents:yt,createProject:bt,archiveProject:Ht,loadTasks:Dt,createTask:mt,startTask:qt,approveTask:_e,rejectTask:Le,deleteTask:We,loadFindings:Ne,postFinding:mn,loadTaskDiff:qe,addEnvironment:He,loadTokens:pn,setToken:Me,deleteToken:Ge,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{}}),[s,r,h,m,g,S,j,w,Yt,ce,A,G,et,yt,bt,Ht,Dt,mt,qt,_e,Le,We,Ne,mn,qe,He,pn,Me,Ge]);return y.jsx(Lc.Provider,{value:tn,children:a})}const gb="_container_ew76q_1",yb="_brand_ew76q_26",bb="_info_ew76q_34",Sb="_connectionDot_ew76q_41",Tb="_connected_ew76q_44",xb="_disconnected_ew76q_48",_b="_settingsButton_ew76q_52",Fa={container:gb,brand:yb,info:bb,connectionDot:Sb,connected:Tb,disconnected:xb,settingsButton:_b};function Ab({setViewMode:a}){const{connected:s,environments:o,sessions:r}=$n(),c=o.length,h=o.filter(m=>m.status==="connected").length,f=r.filter(m=>["running","waiting_input"].includes(m.status)).length;return y.jsxs("div",{className:Fa.container,children:[y.jsx("div",{className:Fa.brand,children:"Grackle"}),y.jsxs("div",{className:Fa.info,children:[y.jsxs("span",{children:[y.jsx("span",{className:`${Fa.connectionDot} ${s?Fa.connected:Fa.disconnected}`,children:"●"})," ",s?"Connected":"Disconnected"]}),y.jsxs("span",{children:[h,"/",c," env",c!==1?"s":""]}),y.jsxs("span",{children:[f," active"]}),a&&y.jsx("button",{className:Fa.settingsButton,onClick:()=>a({kind:"settings"}),title:"Settings",children:"⚙"})]})]})}const Eb="_container_14p5s_1",jb="_header_14p5s_5",Cb="_addButton_14p5s_17",Db="_emptyState_14p5s_35",Nb="_envRow_14p5s_41",Mb="_targeted_14p5s_55",kb="_expanded_14p5s_58",Ob="_statusDot_14p5s_62",Rb="_pulse_14p5s_65",wb="_envName_14p5s_69",zb="_envActions_14p5s_73",Bb="_idleLabel_14p5s_80",Vb="_newChatButton_14p5s_85",Ub="_envActionsRow_14p5s_103",Lb="_connectButton_14p5s_111",Hb="_stopButton_14p5s_128",qb="_deleteButton_14p5s_145",Gb="_provisionMessage_14p5s_163",Yb="_errorMessage_14p5s_170",Xb="_sessionRow_14p5s_177",Zb="_selected_14p5s_195",Kb="_sessionDot_14p5s_202",Wt={container:Eb,header:jb,addButton:Cb,emptyState:Db,envRow:Nb,targeted:Mb,expanded:kb,statusDot:Ob,pulse:Rb,envName:wb,envActions:zb,idleLabel:Bb,newChatButton:Vb,envActionsRow:Ub,connectButton:Lb,stopButton:Hb,deleteButton:qb,provisionMessage:Gb,errorMessage:Yb,sessionRow:Xb,selected:Zb,sessionDot:Kb},Qb={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"};function Jb({status:a}){const s=a==="running"?"var(--accent-green)":a==="waiting_input"?"var(--accent-yellow)":a==="completed"?"var(--text-secondary)":a==="failed"||a==="killed"?"var(--accent-red)":"var(--text-tertiary)";return y.jsx("span",{className:Wt.sessionDot,style:{color:s},children:"●"})}function Ib({env:a,envSessions:s,selectedSessionId:o,isNewChatTarget:r,expanded:c,onToggleExpand:h,provisionProgress:f,onProvision:m,onStop:p,onRemove:g,setViewMode:b}){const S=Qb[a.status]||"var(--text-tertiary)",x=a.status==="connected",j=a.status==="connecting",O=a.status==="disconnected"||a.status==="error";return y.jsxs("div",{children:[y.jsxs("div",{className:`${Wt.envRow} ${r?Wt.targeted:""} ${c?Wt.expanded:""}`,onClick:h,children:[y.jsx("span",{className:`${Wt.statusDot} ${x?Wt.pulse:""}`,style:{color:S},children:"●"}),y.jsx("span",{className:Wt.envName,children:a.displayName||a.id}),y.jsxs("span",{className:Wt.envActions,children:[s.length===0&&!r&&!c&&y.jsx("span",{className:Wt.idleLabel,children:"(idle)"}),x&&y.jsx("button",{onClick:w=>{w.stopPropagation(),b({kind:"new_chat",environmentId:a.id,runtime:a.defaultRuntime||"claude-code"})},title:"New chat",className:Wt.newChatButton,children:"+"})]})]}),c&&y.jsxs("div",{className:Wt.envActionsRow,children:[j&&f&&y.jsx("span",{className:Wt.provisionMessage,children:f.message}),a.status==="error"&&(f==null?void 0:f.stage)==="error"&&y.jsx("span",{className:Wt.errorMessage,children:f.message}),O&&y.jsx("button",{onClick:w=>{w.stopPropagation(),m(a.id)},className:Wt.connectButton,children:a.status==="error"?"Retry":"Connect"}),x&&y.jsx("button",{onClick:w=>{w.stopPropagation(),p(a.id)},className:Wt.stopButton,children:"Stop"}),!j&&y.jsx("button",{onClick:w=>{w.stopPropagation(),window.confirm(`Delete environment "${a.displayName||a.id}"? This destroys the workspace and removes all data.`)&&g(a.id)},className:Wt.deleteButton,children:"Delete"})]}),s.map(w=>y.jsxs("div",{onClick:()=>b({kind:"session",sessionId:w.id}),className:`${Wt.sessionRow} ${o===w.id?Wt.selected:""}`,children:[y.jsx(Jb,{status:w.status})," ",w.prompt.length>24?w.prompt.slice(0,24)+"...":w.prompt]},w.id))]})}function Fb({viewMode:a,setViewMode:s}){const{environments:o,sessions:r,provisionStatus:c,provisionEnvironment:h,stopEnvironment:f,removeEnvironment:m}=$n(),[p,g]=_.useState(null),b=a.kind==="session"?a.sessionId:void 0,S=a.kind==="new_chat"?a.environmentId:void 0;return y.jsxs("div",{className:Wt.container,children:[y.jsxs("div",{className:Wt.header,children:["Environments",y.jsx("button",{className:Wt.addButton,onClick:()=>s({kind:"new_environment"}),title:"Add environment","aria-label":"Add environment",children:"+"})]}),o.length===0&&y.jsx("div",{className:Wt.emptyState,children:"No environments. Click + to add one."}),o.map(x=>{const j=r.filter(O=>O.environmentId===x.id);return y.jsx(Ib,{env:x,envSessions:j,selectedSessionId:b,isNewChatTarget:S===x.id,expanded:p===x.id,onToggleExpand:()=>g(p===x.id?null:x.id),provisionProgress:c[x.id],onProvision:h,onStop:f,onRemove:m,setViewMode:s},x.id)})]})}const Hc=_.createContext({});function qc(a){const s=_.useRef(null);return s.current===null&&(s.current=a()),s.current}const Ho=_.createContext(null),Gc=_.createContext({transformPagePoint:a=>a,isStatic:!1,reducedMotion:"never"});class Pb extends _.Component{getSnapshotBeforeUpdate(s){const o=this.props.childRef.current;if(o&&s.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=o.offsetHeight||0,r.width=o.offsetWidth||0,r.top=o.offsetTop,r.left=o.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function $b({children:a,isPresent:s}){const o=_.useId(),r=_.useRef(null),c=_.useRef({width:0,height:0,top:0,left:0}),{nonce:h}=_.useContext(Gc);return _.useInsertionEffect(()=>{const{width:f,height:m,top:p,left:g}=c.current;if(s||!r.current||!f||!m)return;r.current.dataset.motionPopId=o;const b=document.createElement("style");return h&&(b.nonce=h),document.head.appendChild(b),b.sheet&&b.sheet.insertRule(`
|
|
130
|
-
[data-motion-pop-id="${o}"] {
|
|
131
|
-
position: absolute !important;
|
|
132
|
-
width: ${f}px !important;
|
|
133
|
-
height: ${m}px !important;
|
|
134
|
-
top: ${p}px !important;
|
|
135
|
-
left: ${g}px !important;
|
|
136
|
-
}
|
|
137
|
-
`),()=>{document.head.removeChild(b)}},[s]),y.jsx(Pb,{isPresent:s,childRef:r,sizeRef:c,children:_.cloneElement(a,{ref:r})})}const Wb=({children:a,initial:s,isPresent:o,onExitComplete:r,custom:c,presenceAffectsLayout:h,mode:f})=>{const m=qc(tS),p=_.useId(),g=_.useCallback(S=>{m.set(S,!0);for(const x of m.values())if(!x)return;r&&r()},[m,r]),b=_.useMemo(()=>({id:p,initial:s,isPresent:o,custom:c,onExitComplete:g,register:S=>(m.set(S,!1),()=>m.delete(S))}),h?[Math.random(),g]:[o,g]);return _.useMemo(()=>{m.forEach((S,x)=>m.set(x,!1))},[o]),_.useEffect(()=>{!o&&!m.size&&r&&r()},[o]),f==="popLayout"&&(a=y.jsx($b,{isPresent:o,children:a})),y.jsx(Ho.Provider,{value:b,children:a})};function tS(){return new Map}function Fv(a=!0){const s=_.useContext(Ho);if(s===null)return[!0,null];const{isPresent:o,onExitComplete:r,register:c}=s,h=_.useId();_.useEffect(()=>{a&&c(h)},[a]);const f=_.useCallback(()=>a&&r&&r(h),[h,r,a]);return!o&&r?[!1,f]:[!0]}const Eo=a=>a.key||"";function Dp(a){const s=[];return _.Children.forEach(a,o=>{_.isValidElement(o)&&s.push(o)}),s}const Yc=typeof window<"u",Pv=Yc?_.useLayoutEffect:_.useEffect,Xc=({children:a,custom:s,initial:o=!0,onExitComplete:r,presenceAffectsLayout:c=!0,mode:h="sync",propagate:f=!1})=>{const[m,p]=Fv(f),g=_.useMemo(()=>Dp(a),[a]),b=f&&!m?[]:g.map(Eo),S=_.useRef(!0),x=_.useRef(g),j=qc(()=>new Map),[O,w]=_.useState(g),[Z,X]=_.useState(g);Pv(()=>{S.current=!1,x.current=g;for(let R=0;R<Z.length;R++){const Y=Eo(Z[R]);b.includes(Y)?j.delete(Y):j.get(Y)!==!0&&j.set(Y,!1)}},[Z,b.length,b.join("-")]);const F=[];if(g!==O){let R=[...g];for(let Y=0;Y<Z.length;Y++){const H=Z[Y],I=Eo(H);b.includes(I)||(R.splice(Y,0,H),F.push(H))}h==="wait"&&F.length&&(R=F),X(Dp(R)),w(g);return}const{forceRender:L}=_.useContext(Hc);return y.jsx(y.Fragment,{children:Z.map(R=>{const Y=Eo(R),H=f&&!m?!1:g===Z||b.includes(Y),I=()=>{if(j.has(Y))j.set(Y,!0);else return;let B=!0;j.forEach(nt=>{nt||(B=!1)}),B&&(L==null||L(),X(x.current),f&&(p==null||p()),r&&r())};return y.jsx(Wb,{isPresent:H,initial:!S.current||o?void 0:!1,custom:H?void 0:s,presenceAffectsLayout:c,mode:h,onExitComplete:H?void 0:I,children:R},Y)})})},Pe=a=>a;let $v=Pe;const eS={useManualTiming:!1};function nS(a){let s=new Set,o=new Set,r=!1,c=!1;const h=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function m(g){h.has(g)&&(p.schedule(g),a()),g(f)}const p={schedule:(g,b=!1,S=!1)=>{const j=S&&r?s:o;return b&&h.add(g),j.has(g)||j.add(g),g},cancel:g=>{o.delete(g),h.delete(g)},process:g=>{if(f=g,r){c=!0;return}r=!0,[s,o]=[o,s],s.forEach(m),s.clear(),r=!1,c&&(c=!1,p.process(g))}};return p}const jo=["read","resolveKeyframes","update","preRender","render","postRender"],aS=40;function Wv(a,s){let o=!1,r=!0;const c={delta:0,timestamp:0,isProcessing:!1},h=()=>o=!0,f=jo.reduce((X,F)=>(X[F]=nS(h),X),{}),{read:m,resolveKeyframes:p,update:g,preRender:b,render:S,postRender:x}=f,j=()=>{const X=performance.now();o=!1,c.delta=r?1e3/60:Math.max(Math.min(X-c.timestamp,aS),1),c.timestamp=X,c.isProcessing=!0,m.process(c),p.process(c),g.process(c),b.process(c),S.process(c),x.process(c),c.isProcessing=!1,o&&s&&(r=!1,a(j))},O=()=>{o=!0,r=!0,c.isProcessing||a(j)};return{schedule:jo.reduce((X,F)=>{const L=f[F];return X[F]=(R,Y=!1,H=!1)=>(o||O(),L.schedule(R,Y,H)),X},{}),cancel:X=>{for(let F=0;F<jo.length;F++)f[jo[F]].cancel(X)},state:c,steps:f}}const{schedule:Jt,cancel:Ea,state:xe,steps:oc}=Wv(typeof requestAnimationFrame<"u"?requestAnimationFrame:Pe,!0),t0=_.createContext({strict:!1}),Np={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"]},Fi={};for(const a in Np)Fi[a]={isEnabled:s=>Np[a].some(o=>!!s[o])};function iS(a){for(const s in a)Fi[s]={...Fi[s],...a[s]}}const sS=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 Oo(a){return a.startsWith("while")||a.startsWith("drag")&&a!=="draggable"||a.startsWith("layout")||a.startsWith("onTap")||a.startsWith("onPan")||a.startsWith("onLayout")||sS.has(a)}let e0=a=>!Oo(a);function lS(a){a&&(e0=s=>s.startsWith("on")?!Oo(s):a(s))}try{lS(require("@emotion/is-prop-valid").default)}catch{}function oS(a,s,o){const r={};for(const c in a)c==="values"&&typeof a.values=="object"||(e0(c)||o===!0&&Oo(c)||!s&&!Oo(c)||a.draggable&&c.startsWith("onDrag"))&&(r[c]=a[c]);return r}function rS(a){if(typeof Proxy>"u")return a;const s=new Map,o=(...r)=>a(...r);return new Proxy(o,{get:(r,c)=>c==="create"?a:(s.has(c)||s.set(c,a(c)),s.get(c))})}const qo=_.createContext({});function Ws(a){return typeof a=="string"||Array.isArray(a)}function Go(a){return a!==null&&typeof a=="object"&&typeof a.start=="function"}const Zc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Kc=["initial",...Zc];function Yo(a){return Go(a.animate)||Kc.some(s=>Ws(a[s]))}function n0(a){return!!(Yo(a)||a.variants)}function uS(a,s){if(Yo(a)){const{initial:o,animate:r}=a;return{initial:o===!1||Ws(o)?o:void 0,animate:Ws(r)?r:void 0}}return a.inherit!==!1?s:{}}function cS(a){const{initial:s,animate:o}=uS(a,_.useContext(qo));return _.useMemo(()=>({initial:s,animate:o}),[Mp(s),Mp(o)])}function Mp(a){return Array.isArray(a)?a.join(" "):a}const fS=Symbol.for("motionComponentSymbol");function Zi(a){return a&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function dS(a,s,o){return _.useCallback(r=>{r&&a.onMount&&a.onMount(r),s&&(r?s.mount(r):s.unmount()),o&&(typeof o=="function"?o(r):Zi(o)&&(o.current=r))},[s])}const Qc=a=>a.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hS="framerAppearId",a0="data-"+Qc(hS),{schedule:Jc}=Wv(queueMicrotask,!1),i0=_.createContext({});function mS(a,s,o,r,c){var h,f;const{visualElement:m}=_.useContext(qo),p=_.useContext(t0),g=_.useContext(Ho),b=_.useContext(Gc).reducedMotion,S=_.useRef(null);r=r||p.renderer,!S.current&&r&&(S.current=r(a,{visualState:s,parent:m,props:o,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:b}));const x=S.current,j=_.useContext(i0);x&&!x.projection&&c&&(x.type==="html"||x.type==="svg")&&pS(S.current,o,c,j);const O=_.useRef(!1);_.useInsertionEffect(()=>{x&&O.current&&x.update(o,g)});const w=o[a0],Z=_.useRef(!!w&&!(!((h=window.MotionHandoffIsComplete)===null||h===void 0)&&h.call(window,w))&&((f=window.MotionHasOptimisedAnimation)===null||f===void 0?void 0:f.call(window,w)));return Pv(()=>{x&&(O.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),Jc.render(x.render),Z.current&&x.animationState&&x.animationState.animateChanges())}),_.useEffect(()=>{x&&(!Z.current&&x.animationState&&x.animationState.animateChanges(),Z.current&&(queueMicrotask(()=>{var X;(X=window.MotionHandoffMarkAsComplete)===null||X===void 0||X.call(window,w)}),Z.current=!1))}),x}function pS(a,s,o,r){const{layoutId:c,layout:h,drag:f,dragConstraints:m,layoutScroll:p,layoutRoot:g}=s;a.projection=new o(a.latestValues,s["data-framer-portal-id"]?void 0:s0(a.parent)),a.projection.setOptions({layoutId:c,layout:h,alwaysMeasureLayout:!!f||m&&Zi(m),visualElement:a,animationType:typeof h=="string"?h:"both",initialPromotionConfig:r,layoutScroll:p,layoutRoot:g})}function s0(a){if(a)return a.options.allowProjection!==!1?a.projection:s0(a.parent)}function vS({preloadedFeatures:a,createVisualElement:s,useRender:o,useVisualState:r,Component:c}){var h,f;a&&iS(a);function m(g,b){let S;const x={..._.useContext(Gc),...g,layoutId:gS(g)},{isStatic:j}=x,O=cS(g),w=r(g,j);if(!j&&Yc){yS();const Z=bS(x);S=Z.MeasureLayout,O.visualElement=mS(c,w,x,s,Z.ProjectionNode)}return y.jsxs(qo.Provider,{value:O,children:[S&&O.visualElement?y.jsx(S,{visualElement:O.visualElement,...x}):null,o(c,g,dS(w,O.visualElement,b),w,j,O.visualElement)]})}m.displayName=`motion.${typeof c=="string"?c:`create(${(f=(h=c.displayName)!==null&&h!==void 0?h:c.name)!==null&&f!==void 0?f:""})`}`;const p=_.forwardRef(m);return p[fS]=c,p}function gS({layoutId:a}){const s=_.useContext(Hc).id;return s&&a!==void 0?s+"-"+a:a}function yS(a,s){_.useContext(t0).strict}function bS(a){const{drag:s,layout:o}=Fi;if(!s&&!o)return{};const r={...s,...o};return{MeasureLayout:s!=null&&s.isEnabled(a)||o!=null&&o.isEnabled(a)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const SS=["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 Ic(a){return typeof a!="string"||a.includes("-")?!1:!!(SS.indexOf(a)>-1||/[A-Z]/u.test(a))}function kp(a){const s=[{},{}];return a==null||a.values.forEach((o,r)=>{s[0][r]=o.get(),s[1][r]=o.getVelocity()}),s}function Fc(a,s,o,r){if(typeof s=="function"){const[c,h]=kp(r);s=s(o!==void 0?o:a.custom,c,h)}if(typeof s=="string"&&(s=a.variants&&a.variants[s]),typeof s=="function"){const[c,h]=kp(r);s=s(o!==void 0?o:a.custom,c,h)}return s}const xc=a=>Array.isArray(a),TS=a=>!!(a&&typeof a=="object"&&a.mix&&a.toValue),xS=a=>xc(a)?a[a.length-1]||0:a,De=a=>!!(a&&a.getVelocity);function No(a){const s=De(a)?a.get():a;return TS(s)?s.toValue():s}function _S({scrapeMotionValuesFromProps:a,createRenderState:s,onUpdate:o},r,c,h){const f={latestValues:AS(r,c,h,a),renderState:s()};return o&&(f.onMount=m=>o({props:r,current:m,...f}),f.onUpdate=m=>o(m)),f}const l0=a=>(s,o)=>{const r=_.useContext(qo),c=_.useContext(Ho),h=()=>_S(a,s,r,c);return o?h():qc(h)};function AS(a,s,o,r){const c={},h=r(a,{});for(const x in h)c[x]=No(h[x]);let{initial:f,animate:m}=a;const p=Yo(a),g=n0(a);s&&g&&!p&&a.inherit!==!1&&(f===void 0&&(f=s.initial),m===void 0&&(m=s.animate));let b=o?o.initial===!1:!1;b=b||f===!1;const S=b?m:f;if(S&&typeof S!="boolean"&&!Go(S)){const x=Array.isArray(S)?S:[S];for(let j=0;j<x.length;j++){const O=Fc(a,x[j]);if(O){const{transitionEnd:w,transition:Z,...X}=O;for(const F in X){let L=X[F];if(Array.isArray(L)){const R=b?L.length-1:0;L=L[R]}L!==null&&(c[F]=L)}for(const F in w)c[F]=w[F]}}}return c}const Wi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ii=new Set(Wi),o0=a=>s=>typeof s=="string"&&s.startsWith(a),r0=o0("--"),ES=o0("var(--"),Pc=a=>ES(a)?jS.test(a.split("/*")[0].trim()):!1,jS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,u0=(a,s)=>s&&typeof a=="number"?s.transform(a):a,Pn=(a,s,o)=>o>s?s:o<a?a:o,ts={test:a=>typeof a=="number",parse:parseFloat,transform:a=>a},tl={...ts,transform:a=>Pn(0,1,a)},Co={...ts,default:1},il=a=>({test:s=>typeof s=="string"&&s.endsWith(a)&&s.split(" ").length===1,parse:parseFloat,transform:s=>`${s}${a}`}),Aa=il("deg"),Nn=il("%"),ut=il("px"),CS=il("vh"),DS=il("vw"),Op={...Nn,parse:a=>Nn.parse(a)/100,transform:a=>Nn.transform(a*100)},NS={borderWidth:ut,borderTopWidth:ut,borderRightWidth:ut,borderBottomWidth:ut,borderLeftWidth:ut,borderRadius:ut,radius:ut,borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomRightRadius:ut,borderBottomLeftRadius:ut,width:ut,maxWidth:ut,height:ut,maxHeight:ut,top:ut,right:ut,bottom:ut,left:ut,padding:ut,paddingTop:ut,paddingRight:ut,paddingBottom:ut,paddingLeft:ut,margin:ut,marginTop:ut,marginRight:ut,marginBottom:ut,marginLeft:ut,backgroundPositionX:ut,backgroundPositionY:ut},MS={rotate:Aa,rotateX:Aa,rotateY:Aa,rotateZ:Aa,scale:Co,scaleX:Co,scaleY:Co,scaleZ:Co,skew:Aa,skewX:Aa,skewY:Aa,distance:ut,translateX:ut,translateY:ut,translateZ:ut,x:ut,y:ut,z:ut,perspective:ut,transformPerspective:ut,opacity:tl,originX:Op,originY:Op,originZ:ut},Rp={...ts,transform:Math.round},$c={...NS,...MS,zIndex:Rp,size:ut,fillOpacity:tl,strokeOpacity:tl,numOctaves:Rp},kS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},OS=Wi.length;function RS(a,s,o){let r="",c=!0;for(let h=0;h<OS;h++){const f=Wi[h],m=a[f];if(m===void 0)continue;let p=!0;if(typeof m=="number"?p=m===(f.startsWith("scale")?1:0):p=parseFloat(m)===0,!p||o){const g=u0(m,$c[f]);if(!p){c=!1;const b=kS[f]||f;r+=`${b}(${g}) `}o&&(s[f]=g)}}return r=r.trim(),o?r=o(s,c?"":r):c&&(r="none"),r}function Wc(a,s,o){const{style:r,vars:c,transformOrigin:h}=a;let f=!1,m=!1;for(const p in s){const g=s[p];if(ii.has(p)){f=!0;continue}else if(r0(p)){c[p]=g;continue}else{const b=u0(g,$c[p]);p.startsWith("origin")?(m=!0,h[p]=b):r[p]=b}}if(s.transform||(f||o?r.transform=RS(s,a.transform,o):r.transform&&(r.transform="none")),m){const{originX:p="50%",originY:g="50%",originZ:b=0}=h;r.transformOrigin=`${p} ${g} ${b}`}}const wS={offset:"stroke-dashoffset",array:"stroke-dasharray"},zS={offset:"strokeDashoffset",array:"strokeDasharray"};function BS(a,s,o=1,r=0,c=!0){a.pathLength=1;const h=c?wS:zS;a[h.offset]=ut.transform(-r);const f=ut.transform(s),m=ut.transform(o);a[h.array]=`${f} ${m}`}function wp(a,s,o){return typeof a=="string"?a:ut.transform(s+o*a)}function VS(a,s,o){const r=wp(s,a.x,a.width),c=wp(o,a.y,a.height);return`${r} ${c}`}function tf(a,{attrX:s,attrY:o,attrScale:r,originX:c,originY:h,pathLength:f,pathSpacing:m=1,pathOffset:p=0,...g},b,S){if(Wc(a,g,S),b){a.style.viewBox&&(a.attrs.viewBox=a.style.viewBox);return}a.attrs=a.style,a.style={};const{attrs:x,style:j,dimensions:O}=a;x.transform&&(O&&(j.transform=x.transform),delete x.transform),O&&(c!==void 0||h!==void 0||j.transform)&&(j.transformOrigin=VS(O,c!==void 0?c:.5,h!==void 0?h:.5)),s!==void 0&&(x.x=s),o!==void 0&&(x.y=o),r!==void 0&&(x.scale=r),f!==void 0&&BS(x,f,m,p,!1)}const ef=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),c0=()=>({...ef(),attrs:{}}),nf=a=>typeof a=="string"&&a.toLowerCase()==="svg";function f0(a,{style:s,vars:o},r,c){Object.assign(a.style,s,c&&c.getProjectionStyles(r));for(const h in o)a.style.setProperty(h,o[h])}const d0=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 h0(a,s,o,r){f0(a,s,void 0,r);for(const c in s.attrs)a.setAttribute(d0.has(c)?c:Qc(c),s.attrs[c])}const Ro={};function US(a){Object.assign(Ro,a)}function m0(a,{layout:s,layoutId:o}){return ii.has(a)||a.startsWith("origin")||(s||o!==void 0)&&(!!Ro[a]||a==="opacity")}function af(a,s,o){var r;const{style:c}=a,h={};for(const f in c)(De(c[f])||s.style&&De(s.style[f])||m0(f,a)||((r=o==null?void 0:o.getValue(f))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(h[f]=c[f]);return h}function p0(a,s,o){const r=af(a,s,o);for(const c in a)if(De(a[c])||De(s[c])){const h=Wi.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;r[h]=a[c]}return r}function LS(a,s){try{s.dimensions=typeof a.getBBox=="function"?a.getBBox():a.getBoundingClientRect()}catch{s.dimensions={x:0,y:0,width:0,height:0}}}const zp=["x","y","width","height","cx","cy","r"],HS={useVisualState:l0({scrapeMotionValuesFromProps:p0,createRenderState:c0,onUpdate:({props:a,prevProps:s,current:o,renderState:r,latestValues:c})=>{if(!o)return;let h=!!a.drag;if(!h){for(const m in c)if(ii.has(m)){h=!0;break}}if(!h)return;let f=!s;if(s)for(let m=0;m<zp.length;m++){const p=zp[m];a[p]!==s[p]&&(f=!0)}f&&Jt.read(()=>{LS(o,r),Jt.render(()=>{tf(r,c,nf(o.tagName),a.transformTemplate),h0(o,r)})})}})},qS={useVisualState:l0({scrapeMotionValuesFromProps:af,createRenderState:ef})};function v0(a,s,o){for(const r in s)!De(s[r])&&!m0(r,o)&&(a[r]=s[r])}function GS({transformTemplate:a},s){return _.useMemo(()=>{const o=ef();return Wc(o,s,a),Object.assign({},o.vars,o.style)},[s])}function YS(a,s){const o=a.style||{},r={};return v0(r,o,a),Object.assign(r,GS(a,s)),r}function XS(a,s){const o={},r=YS(a,s);return a.drag&&a.dragListener!==!1&&(o.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=a.drag===!0?"none":`pan-${a.drag==="x"?"y":"x"}`),a.tabIndex===void 0&&(a.onTap||a.onTapStart||a.whileTap)&&(o.tabIndex=0),o.style=r,o}function ZS(a,s,o,r){const c=_.useMemo(()=>{const h=c0();return tf(h,s,nf(r),a.transformTemplate),{...h.attrs,style:{...h.style}}},[s]);if(a.style){const h={};v0(h,a.style,a),c.style={...h,...c.style}}return c}function KS(a=!1){return(o,r,c,{latestValues:h},f)=>{const p=(Ic(o)?ZS:XS)(r,h,f,o),g=oS(r,typeof o=="string",a),b=o!==_.Fragment?{...g,...p,ref:c}:{},{children:S}=r,x=_.useMemo(()=>De(S)?S.get():S,[S]);return _.createElement(o,{...b,children:x})}}function QS(a,s){return function(r,{forwardMotionProps:c}={forwardMotionProps:!1}){const f={...Ic(r)?HS:qS,preloadedFeatures:a,useRender:KS(c),createVisualElement:s,Component:r};return vS(f)}}function g0(a,s){if(!Array.isArray(s))return!1;const o=s.length;if(o!==a.length)return!1;for(let r=0;r<o;r++)if(s[r]!==a[r])return!1;return!0}function Xo(a,s,o){const r=a.getProps();return Fc(r,s,o!==void 0?o:r.custom,a)}function sf(a,s){return a?a[s]||a.default||a:void 0}const y0=new Set(["width","height","top","left","right","bottom",...Wi]);let Mo;function JS(){Mo=void 0}const Mn={now:()=>(Mo===void 0&&Mn.set(xe.isProcessing||eS.useManualTiming?xe.timestamp:performance.now()),Mo),set:a=>{Mo=a,queueMicrotask(JS)}};function lf(a,s){a.indexOf(s)===-1&&a.push(s)}function of(a,s){const o=a.indexOf(s);o>-1&&a.splice(o,1)}class rf{constructor(){this.subscriptions=[]}add(s){return lf(this.subscriptions,s),()=>of(this.subscriptions,s)}notify(s,o,r){const c=this.subscriptions.length;if(c)if(c===1)this.subscriptions[0](s,o,r);else for(let h=0;h<c;h++){const f=this.subscriptions[h];f&&f(s,o,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function b0(a,s){return s?a*(1e3/s):0}const Bp=30,IS=a=>!isNaN(parseFloat(a));class FS{constructor(s,o={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,c=!0)=>{const h=Mn.now();this.updatedAt!==h&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),c&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(s),this.owner=o.owner}setCurrent(s){this.current=s,this.updatedAt=Mn.now(),this.canTrackVelocity===null&&s!==void 0&&(this.canTrackVelocity=IS(this.current))}setPrevFrameValue(s=this.current){this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt}onChange(s){return this.on("change",s)}on(s,o){this.events[s]||(this.events[s]=new rf);const r=this.events[s].add(o);return s==="change"?()=>{r(),Jt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const s in this.events)this.events[s].clear()}attach(s,o){this.passiveEffect=s,this.stopPassiveEffect=o}set(s,o=!0){!o||!this.passiveEffect?this.updateAndNotify(s,o):this.passiveEffect(s,this.updateAndNotify)}setWithVelocity(s,o,r){this.set(o),this.prev=void 0,this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt-r}jump(s,o=!0){this.updateAndNotify(s),this.prev=s,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const s=Mn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||s-this.updatedAt>Bp)return 0;const o=Math.min(this.updatedAt-this.prevUpdatedAt,Bp);return b0(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(s){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=s(o),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function el(a,s){return new FS(a,s)}function PS(a,s,o){a.hasValue(s)?a.getValue(s).set(o):a.addValue(s,el(o))}function $S(a,s){const o=Xo(a,s);let{transitionEnd:r={},transition:c={},...h}=o||{};h={...h,...r};for(const f in h){const m=xS(h[f]);PS(a,f,m)}}function WS(a){return!!(De(a)&&a.add)}function _c(a,s){const o=a.getValue("willChange");if(WS(o))return o.add(s)}function S0(a){return a.props[a0]}function uf(a){let s;return()=>(s===void 0&&(s=a()),s)}const tT=uf(()=>window.ScrollTimeline!==void 0);class eT{constructor(s){this.stop=()=>this.runAll("stop"),this.animations=s.filter(Boolean)}get finished(){return Promise.all(this.animations.map(s=>"finished"in s?s.finished:s))}getAll(s){return this.animations[0][s]}setAll(s,o){for(let r=0;r<this.animations.length;r++)this.animations[r][s]=o}attachTimeline(s,o){const r=this.animations.map(c=>{if(tT()&&c.attachTimeline)return c.attachTimeline(s);if(typeof o=="function")return o(c)});return()=>{r.forEach((c,h)=>{c&&c(),this.animations[h].stop()})}}get time(){return this.getAll("time")}set time(s){this.setAll("time",s)}get speed(){return this.getAll("speed")}set speed(s){this.setAll("speed",s)}get startTime(){return this.getAll("startTime")}get duration(){let s=0;for(let o=0;o<this.animations.length;o++)s=Math.max(s,this.animations[o].duration);return s}runAll(s){this.animations.forEach(o=>o[s]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class nT extends eT{then(s,o){return Promise.all(this.animations).then(s).catch(o)}}const In=a=>a*1e3,Fn=a=>a/1e3;function cf(a){return typeof a=="function"}function Vp(a,s){a.timeline=s,a.onfinish=null}const ff=a=>Array.isArray(a)&&typeof a[0]=="number",aT={linearEasing:void 0};function iT(a,s){const o=uf(a);return()=>{var r;return(r=aT[s])!==null&&r!==void 0?r:o()}}const wo=iT(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Pi=(a,s,o)=>{const r=s-a;return r===0?1:(o-a)/r},T0=(a,s,o=10)=>{let r="";const c=Math.max(Math.round(s/o),2);for(let h=0;h<c;h++)r+=a(Pi(0,c-1,h))+", ";return`linear(${r.substring(0,r.length-2)})`};function x0(a){return!!(typeof a=="function"&&wo()||!a||typeof a=="string"&&(a in Ac||wo())||ff(a)||Array.isArray(a)&&a.every(x0))}const Ks=([a,s,o,r])=>`cubic-bezier(${a}, ${s}, ${o}, ${r})`,Ac={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ks([0,.65,.55,1]),circOut:Ks([.55,0,1,.45]),backIn:Ks([.31,.01,.66,-.59]),backOut:Ks([.33,1.53,.69,.99])};function _0(a,s){if(a)return typeof a=="function"&&wo()?T0(a,s):ff(a)?Ks(a):Array.isArray(a)?a.map(o=>_0(o,s)||Ac.easeOut):Ac[a]}const A0=(a,s,o)=>(((1-3*o+3*s)*a+(3*o-6*s))*a+3*s)*a,sT=1e-7,lT=12;function oT(a,s,o,r,c){let h,f,m=0;do f=s+(o-s)/2,h=A0(f,r,c)-a,h>0?o=f:s=f;while(Math.abs(h)>sT&&++m<lT);return f}function sl(a,s,o,r){if(a===s&&o===r)return Pe;const c=h=>oT(h,0,1,a,o);return h=>h===0||h===1?h:A0(c(h),s,r)}const E0=a=>s=>s<=.5?a(2*s)/2:(2-a(2*(1-s)))/2,j0=a=>s=>1-a(1-s),C0=sl(.33,1.53,.69,.99),df=j0(C0),D0=E0(df),N0=a=>(a*=2)<1?.5*df(a):.5*(2-Math.pow(2,-10*(a-1))),hf=a=>1-Math.sin(Math.acos(a)),M0=j0(hf),k0=E0(hf),O0=a=>/^0[^.\s]+$/u.test(a);function rT(a){return typeof a=="number"?a===0:a!==null?a==="none"||a==="0"||O0(a):!0}const Is=a=>Math.round(a*1e5)/1e5,mf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function uT(a){return a==null}const cT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,pf=(a,s)=>o=>!!(typeof o=="string"&&cT.test(o)&&o.startsWith(a)||s&&!uT(o)&&Object.prototype.hasOwnProperty.call(o,s)),R0=(a,s,o)=>r=>{if(typeof r!="string")return r;const[c,h,f,m]=r.match(mf);return{[a]:parseFloat(c),[s]:parseFloat(h),[o]:parseFloat(f),alpha:m!==void 0?parseFloat(m):1}},fT=a=>Pn(0,255,a),rc={...ts,transform:a=>Math.round(fT(a))},ei={test:pf("rgb","red"),parse:R0("red","green","blue"),transform:({red:a,green:s,blue:o,alpha:r=1})=>"rgba("+rc.transform(a)+", "+rc.transform(s)+", "+rc.transform(o)+", "+Is(tl.transform(r))+")"};function dT(a){let s="",o="",r="",c="";return a.length>5?(s=a.substring(1,3),o=a.substring(3,5),r=a.substring(5,7),c=a.substring(7,9)):(s=a.substring(1,2),o=a.substring(2,3),r=a.substring(3,4),c=a.substring(4,5),s+=s,o+=o,r+=r,c+=c),{red:parseInt(s,16),green:parseInt(o,16),blue:parseInt(r,16),alpha:c?parseInt(c,16)/255:1}}const Ec={test:pf("#"),parse:dT,transform:ei.transform},Ki={test:pf("hsl","hue"),parse:R0("hue","saturation","lightness"),transform:({hue:a,saturation:s,lightness:o,alpha:r=1})=>"hsla("+Math.round(a)+", "+Nn.transform(Is(s))+", "+Nn.transform(Is(o))+", "+Is(tl.transform(r))+")"},Ce={test:a=>ei.test(a)||Ec.test(a)||Ki.test(a),parse:a=>ei.test(a)?ei.parse(a):Ki.test(a)?Ki.parse(a):Ec.parse(a),transform:a=>typeof a=="string"?a:a.hasOwnProperty("red")?ei.transform(a):Ki.transform(a)},hT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function mT(a){var s,o;return isNaN(a)&&typeof a=="string"&&(((s=a.match(mf))===null||s===void 0?void 0:s.length)||0)+(((o=a.match(hT))===null||o===void 0?void 0:o.length)||0)>0}const w0="number",z0="color",pT="var",vT="var(",Up="${}",gT=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function nl(a){const s=a.toString(),o=[],r={color:[],number:[],var:[]},c=[];let h=0;const m=s.replace(gT,p=>(Ce.test(p)?(r.color.push(h),c.push(z0),o.push(Ce.parse(p))):p.startsWith(vT)?(r.var.push(h),c.push(pT),o.push(p)):(r.number.push(h),c.push(w0),o.push(parseFloat(p))),++h,Up)).split(Up);return{values:o,split:m,indexes:r,types:c}}function B0(a){return nl(a).values}function V0(a){const{split:s,types:o}=nl(a),r=s.length;return c=>{let h="";for(let f=0;f<r;f++)if(h+=s[f],c[f]!==void 0){const m=o[f];m===w0?h+=Is(c[f]):m===z0?h+=Ce.transform(c[f]):h+=c[f]}return h}}const yT=a=>typeof a=="number"?0:a;function bT(a){const s=B0(a);return V0(a)(s.map(yT))}const ja={test:mT,parse:B0,createTransformer:V0,getAnimatableNone:bT},ST=new Set(["brightness","contrast","saturate","opacity"]);function TT(a){const[s,o]=a.slice(0,-1).split("(");if(s==="drop-shadow")return a;const[r]=o.match(mf)||[];if(!r)return a;const c=o.replace(r,"");let h=ST.has(s)?1:0;return r!==o&&(h*=100),s+"("+h+c+")"}const xT=/\b([a-z-]*)\(.*?\)/gu,jc={...ja,getAnimatableNone:a=>{const s=a.match(xT);return s?s.map(TT).join(" "):a}},_T={...$c,color:Ce,backgroundColor:Ce,outlineColor:Ce,fill:Ce,stroke:Ce,borderColor:Ce,borderTopColor:Ce,borderRightColor:Ce,borderBottomColor:Ce,borderLeftColor:Ce,filter:jc,WebkitFilter:jc},vf=a=>_T[a];function U0(a,s){let o=vf(a);return o!==jc&&(o=ja),o.getAnimatableNone?o.getAnimatableNone(s):void 0}const AT=new Set(["auto","none","0"]);function ET(a,s,o){let r=0,c;for(;r<a.length&&!c;){const h=a[r];typeof h=="string"&&!AT.has(h)&&nl(h).values.length&&(c=a[r]),r++}if(c&&o)for(const h of s)a[h]=U0(o,c)}const Lp=a=>a===ts||a===ut,Hp=(a,s)=>parseFloat(a.split(", ")[s]),qp=(a,s)=>(o,{transform:r})=>{if(r==="none"||!r)return 0;const c=r.match(/^matrix3d\((.+)\)$/u);if(c)return Hp(c[1],s);{const h=r.match(/^matrix\((.+)\)$/u);return h?Hp(h[1],a):0}},jT=new Set(["x","y","z"]),CT=Wi.filter(a=>!jT.has(a));function DT(a){const s=[];return CT.forEach(o=>{const r=a.getValue(o);r!==void 0&&(s.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),s}const $i={width:({x:a},{paddingLeft:s="0",paddingRight:o="0"})=>a.max-a.min-parseFloat(s)-parseFloat(o),height:({y:a},{paddingTop:s="0",paddingBottom:o="0"})=>a.max-a.min-parseFloat(s)-parseFloat(o),top:(a,{top:s})=>parseFloat(s),left:(a,{left:s})=>parseFloat(s),bottom:({y:a},{top:s})=>parseFloat(s)+(a.max-a.min),right:({x:a},{left:s})=>parseFloat(s)+(a.max-a.min),x:qp(4,13),y:qp(5,14)};$i.translateX=$i.x;$i.translateY=$i.y;const ai=new Set;let Cc=!1,Dc=!1;function L0(){if(Dc){const a=Array.from(ai).filter(r=>r.needsMeasurement),s=new Set(a.map(r=>r.element)),o=new Map;s.forEach(r=>{const c=DT(r);c.length&&(o.set(r,c),r.render())}),a.forEach(r=>r.measureInitialState()),s.forEach(r=>{r.render();const c=o.get(r);c&&c.forEach(([h,f])=>{var m;(m=r.getValue(h))===null||m===void 0||m.set(f)})}),a.forEach(r=>r.measureEndState()),a.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Dc=!1,Cc=!1,ai.forEach(a=>a.complete()),ai.clear()}function H0(){ai.forEach(a=>{a.readKeyframes(),a.needsMeasurement&&(Dc=!0)})}function NT(){H0(),L0()}class gf{constructor(s,o,r,c,h,f=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...s],this.onComplete=o,this.name=r,this.motionValue=c,this.element=h,this.isAsync=f}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ai.add(this),Cc||(Cc=!0,Jt.read(H0),Jt.resolveKeyframes(L0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:s,name:o,element:r,motionValue:c}=this;for(let h=0;h<s.length;h++)if(s[h]===null)if(h===0){const f=c==null?void 0:c.get(),m=s[s.length-1];if(f!==void 0)s[0]=f;else if(r&&o){const p=r.readValue(o,m);p!=null&&(s[0]=p)}s[0]===void 0&&(s[0]=m),c&&f===void 0&&c.set(s[0])}else s[h]=s[h-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ai.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ai.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const q0=a=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(a),MT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function kT(a){const s=MT.exec(a);if(!s)return[,];const[,o,r,c]=s;return[`--${o??r}`,c]}function G0(a,s,o=1){const[r,c]=kT(a);if(!r)return;const h=window.getComputedStyle(s).getPropertyValue(r);if(h){const f=h.trim();return q0(f)?parseFloat(f):f}return Pc(c)?G0(c,s,o+1):c}const Y0=a=>s=>s.test(a),OT={test:a=>a==="auto",parse:a=>a},X0=[ts,ut,Nn,Aa,DS,CS,OT],Gp=a=>X0.find(Y0(a));class Z0 extends gf{constructor(s,o,r,c,h){super(s,o,r,c,h,!0)}readKeyframes(){const{unresolvedKeyframes:s,element:o,name:r}=this;if(!o||!o.current)return;super.readKeyframes();for(let p=0;p<s.length;p++){let g=s[p];if(typeof g=="string"&&(g=g.trim(),Pc(g))){const b=G0(g,o.current);b!==void 0&&(s[p]=b),p===s.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!y0.has(r)||s.length!==2)return;const[c,h]=s,f=Gp(c),m=Gp(h);if(f!==m)if(Lp(f)&&Lp(m))for(let p=0;p<s.length;p++){const g=s[p];typeof g=="string"&&(s[p]=parseFloat(g))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:s,name:o}=this,r=[];for(let c=0;c<s.length;c++)rT(s[c])&&r.push(c);r.length&&ET(s,r,o)}measureInitialState(){const{element:s,unresolvedKeyframes:o,name:r}=this;if(!s||!s.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$i[r](s.measureViewportBox(),window.getComputedStyle(s.current)),o[0]=this.measuredOrigin;const c=o[o.length-1];c!==void 0&&s.getValue(r,c).jump(c,!1)}measureEndState(){var s;const{element:o,name:r,unresolvedKeyframes:c}=this;if(!o||!o.current)return;const h=o.getValue(r);h&&h.jump(this.measuredOrigin,!1);const f=c.length-1,m=c[f];c[f]=$i[r](o.measureViewportBox(),window.getComputedStyle(o.current)),m!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=m),!((s=this.removedTransforms)===null||s===void 0)&&s.length&&this.removedTransforms.forEach(([p,g])=>{o.getValue(p).set(g)}),this.resolveNoneKeyframes()}}const Yp=(a,s)=>s==="zIndex"?!1:!!(typeof a=="number"||Array.isArray(a)||typeof a=="string"&&(ja.test(a)||a==="0")&&!a.startsWith("url("));function RT(a){const s=a[0];if(a.length===1)return!0;for(let o=0;o<a.length;o++)if(a[o]!==s)return!0}function wT(a,s,o,r){const c=a[0];if(c===null)return!1;if(s==="display"||s==="visibility")return!0;const h=a[a.length-1],f=Yp(c,s),m=Yp(h,s);return!f||!m?!1:RT(a)||(o==="spring"||cf(o))&&r}const zT=a=>a!==null;function Zo(a,{repeat:s,repeatType:o="loop"},r){const c=a.filter(zT),h=s&&o!=="loop"&&s%2===1?0:c.length-1;return!h||r===void 0?c[h]:r}const BT=40;class K0{constructor({autoplay:s=!0,delay:o=0,type:r="keyframes",repeat:c=0,repeatDelay:h=0,repeatType:f="loop",...m}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Mn.now(),this.options={autoplay:s,delay:o,type:r,repeat:c,repeatDelay:h,repeatType:f,...m},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>BT?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&NT(),this._resolved}onKeyframesResolved(s,o){this.resolvedAt=Mn.now(),this.hasAttemptedResolve=!0;const{name:r,type:c,velocity:h,delay:f,onComplete:m,onUpdate:p,isGenerator:g}=this.options;if(!g&&!wT(s,r,c,h))if(f)this.options.duration=0;else{p&&p(Zo(s,this.options,o)),m&&m(),this.resolveFinishedPromise();return}const b=this.initPlayback(s,o);b!==!1&&(this._resolved={keyframes:s,finalKeyframe:o,...b},this.onPostResolved())}onPostResolved(){}then(s,o){return this.currentFinishedPromise.then(s,o)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(s=>{this.resolveFinishedPromise=s})}}const Nc=2e4;function Q0(a){let s=0;const o=50;let r=a.next(s);for(;!r.done&&s<Nc;)s+=o,r=a.next(s);return s>=Nc?1/0:s}const Ft=(a,s,o)=>a+(s-a)*o;function uc(a,s,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?a+(s-a)*6*o:o<1/2?s:o<2/3?a+(s-a)*(2/3-o)*6:a}function VT({hue:a,saturation:s,lightness:o,alpha:r}){a/=360,s/=100,o/=100;let c=0,h=0,f=0;if(!s)c=h=f=o;else{const m=o<.5?o*(1+s):o+s-o*s,p=2*o-m;c=uc(p,m,a+1/3),h=uc(p,m,a),f=uc(p,m,a-1/3)}return{red:Math.round(c*255),green:Math.round(h*255),blue:Math.round(f*255),alpha:r}}function zo(a,s){return o=>o>0?s:a}const cc=(a,s,o)=>{const r=a*a,c=o*(s*s-r)+r;return c<0?0:Math.sqrt(c)},UT=[Ec,ei,Ki],LT=a=>UT.find(s=>s.test(a));function Xp(a){const s=LT(a);if(!s)return!1;let o=s.parse(a);return s===Ki&&(o=VT(o)),o}const Zp=(a,s)=>{const o=Xp(a),r=Xp(s);if(!o||!r)return zo(a,s);const c={...o};return h=>(c.red=cc(o.red,r.red,h),c.green=cc(o.green,r.green,h),c.blue=cc(o.blue,r.blue,h),c.alpha=Ft(o.alpha,r.alpha,h),ei.transform(c))},HT=(a,s)=>o=>s(a(o)),ll=(...a)=>a.reduce(HT),Mc=new Set(["none","hidden"]);function qT(a,s){return Mc.has(a)?o=>o<=0?a:s:o=>o>=1?s:a}function GT(a,s){return o=>Ft(a,s,o)}function yf(a){return typeof a=="number"?GT:typeof a=="string"?Pc(a)?zo:Ce.test(a)?Zp:ZT:Array.isArray(a)?J0:typeof a=="object"?Ce.test(a)?Zp:YT:zo}function J0(a,s){const o=[...a],r=o.length,c=a.map((h,f)=>yf(h)(h,s[f]));return h=>{for(let f=0;f<r;f++)o[f]=c[f](h);return o}}function YT(a,s){const o={...a,...s},r={};for(const c in o)a[c]!==void 0&&s[c]!==void 0&&(r[c]=yf(a[c])(a[c],s[c]));return c=>{for(const h in r)o[h]=r[h](c);return o}}function XT(a,s){var o;const r=[],c={color:0,var:0,number:0};for(let h=0;h<s.values.length;h++){const f=s.types[h],m=a.indexes[f][c[f]],p=(o=a.values[m])!==null&&o!==void 0?o:0;r[h]=p,c[f]++}return r}const ZT=(a,s)=>{const o=ja.createTransformer(s),r=nl(a),c=nl(s);return r.indexes.var.length===c.indexes.var.length&&r.indexes.color.length===c.indexes.color.length&&r.indexes.number.length>=c.indexes.number.length?Mc.has(a)&&!c.values.length||Mc.has(s)&&!r.values.length?qT(a,s):ll(J0(XT(r,c),c.values),o):zo(a,s)};function I0(a,s,o){return typeof a=="number"&&typeof s=="number"&&typeof o=="number"?Ft(a,s,o):yf(a)(a,s)}const KT=5;function F0(a,s,o){const r=Math.max(s-KT,0);return b0(o-a(r),s-r)}const te={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},fc=.001;function QT({duration:a=te.duration,bounce:s=te.bounce,velocity:o=te.velocity,mass:r=te.mass}){let c,h,f=1-s;f=Pn(te.minDamping,te.maxDamping,f),a=Pn(te.minDuration,te.maxDuration,Fn(a)),f<1?(c=g=>{const b=g*f,S=b*a,x=b-o,j=kc(g,f),O=Math.exp(-S);return fc-x/j*O},h=g=>{const S=g*f*a,x=S*o+o,j=Math.pow(f,2)*Math.pow(g,2)*a,O=Math.exp(-S),w=kc(Math.pow(g,2),f);return(-c(g)+fc>0?-1:1)*((x-j)*O)/w}):(c=g=>{const b=Math.exp(-g*a),S=(g-o)*a+1;return-fc+b*S},h=g=>{const b=Math.exp(-g*a),S=(o-g)*(a*a);return b*S});const m=5/a,p=IT(c,h,m);if(a=In(a),isNaN(p))return{stiffness:te.stiffness,damping:te.damping,duration:a};{const g=Math.pow(p,2)*r;return{stiffness:g,damping:f*2*Math.sqrt(r*g),duration:a}}}const JT=12;function IT(a,s,o){let r=o;for(let c=1;c<JT;c++)r=r-a(r)/s(r);return r}function kc(a,s){return a*Math.sqrt(1-s*s)}const FT=["duration","bounce"],PT=["stiffness","damping","mass"];function Kp(a,s){return s.some(o=>a[o]!==void 0)}function $T(a){let s={velocity:te.velocity,stiffness:te.stiffness,damping:te.damping,mass:te.mass,isResolvedFromDuration:!1,...a};if(!Kp(a,PT)&&Kp(a,FT))if(a.visualDuration){const o=a.visualDuration,r=2*Math.PI/(o*1.2),c=r*r,h=2*Pn(.05,1,1-(a.bounce||0))*Math.sqrt(c);s={...s,mass:te.mass,stiffness:c,damping:h}}else{const o=QT(a);s={...s,...o,mass:te.mass},s.isResolvedFromDuration=!0}return s}function P0(a=te.visualDuration,s=te.bounce){const o=typeof a!="object"?{visualDuration:a,keyframes:[0,1],bounce:s}:a;let{restSpeed:r,restDelta:c}=o;const h=o.keyframes[0],f=o.keyframes[o.keyframes.length-1],m={done:!1,value:h},{stiffness:p,damping:g,mass:b,duration:S,velocity:x,isResolvedFromDuration:j}=$T({...o,velocity:-Fn(o.velocity||0)}),O=x||0,w=g/(2*Math.sqrt(p*b)),Z=f-h,X=Fn(Math.sqrt(p/b)),F=Math.abs(Z)<5;r||(r=F?te.restSpeed.granular:te.restSpeed.default),c||(c=F?te.restDelta.granular:te.restDelta.default);let L;if(w<1){const Y=kc(X,w);L=H=>{const I=Math.exp(-w*X*H);return f-I*((O+w*X*Z)/Y*Math.sin(Y*H)+Z*Math.cos(Y*H))}}else if(w===1)L=Y=>f-Math.exp(-X*Y)*(Z+(O+X*Z)*Y);else{const Y=X*Math.sqrt(w*w-1);L=H=>{const I=Math.exp(-w*X*H),B=Math.min(Y*H,300);return f-I*((O+w*X*Z)*Math.sinh(B)+Y*Z*Math.cosh(B))/Y}}const R={calculatedDuration:j&&S||null,next:Y=>{const H=L(Y);if(j)m.done=Y>=S;else{let I=0;w<1&&(I=Y===0?In(O):F0(L,Y,H));const B=Math.abs(I)<=r,nt=Math.abs(f-H)<=c;m.done=B&&nt}return m.value=m.done?f:H,m},toString:()=>{const Y=Math.min(Q0(R),Nc),H=T0(I=>R.next(Y*I).value,Y,30);return Y+"ms "+H}};return R}function Qp({keyframes:a,velocity:s=0,power:o=.8,timeConstant:r=325,bounceDamping:c=10,bounceStiffness:h=500,modifyTarget:f,min:m,max:p,restDelta:g=.5,restSpeed:b}){const S=a[0],x={done:!1,value:S},j=B=>m!==void 0&&B<m||p!==void 0&&B>p,O=B=>m===void 0?p:p===void 0||Math.abs(m-B)<Math.abs(p-B)?m:p;let w=o*s;const Z=S+w,X=f===void 0?Z:f(Z);X!==Z&&(w=X-S);const F=B=>-w*Math.exp(-B/r),L=B=>X+F(B),R=B=>{const nt=F(B),ct=L(B);x.done=Math.abs(nt)<=g,x.value=x.done?X:ct};let Y,H;const I=B=>{j(x.value)&&(Y=B,H=P0({keyframes:[x.value,O(x.value)],velocity:F0(L,B,x.value),damping:c,stiffness:h,restDelta:g,restSpeed:b}))};return I(0),{calculatedDuration:null,next:B=>{let nt=!1;return!H&&Y===void 0&&(nt=!0,R(B),I(B)),Y!==void 0&&B>=Y?H.next(B-Y):(!nt&&R(B),x)}}}const WT=sl(.42,0,1,1),tx=sl(0,0,.58,1),$0=sl(.42,0,.58,1),ex=a=>Array.isArray(a)&&typeof a[0]!="number",nx={linear:Pe,easeIn:WT,easeInOut:$0,easeOut:tx,circIn:hf,circInOut:k0,circOut:M0,backIn:df,backInOut:D0,backOut:C0,anticipate:N0},Jp=a=>{if(ff(a)){$v(a.length===4);const[s,o,r,c]=a;return sl(s,o,r,c)}else if(typeof a=="string")return nx[a];return a};function ax(a,s,o){const r=[],c=o||I0,h=a.length-1;for(let f=0;f<h;f++){let m=c(a[f],a[f+1]);if(s){const p=Array.isArray(s)?s[f]||Pe:s;m=ll(p,m)}r.push(m)}return r}function ix(a,s,{clamp:o=!0,ease:r,mixer:c}={}){const h=a.length;if($v(h===s.length),h===1)return()=>s[0];if(h===2&&s[0]===s[1])return()=>s[1];const f=a[0]===a[1];a[0]>a[h-1]&&(a=[...a].reverse(),s=[...s].reverse());const m=ax(s,r,c),p=m.length,g=b=>{if(f&&b<a[0])return s[0];let S=0;if(p>1)for(;S<a.length-2&&!(b<a[S+1]);S++);const x=Pi(a[S],a[S+1],b);return m[S](x)};return o?b=>g(Pn(a[0],a[h-1],b)):g}function sx(a,s){const o=a[a.length-1];for(let r=1;r<=s;r++){const c=Pi(0,s,r);a.push(Ft(o,1,c))}}function lx(a){const s=[0];return sx(s,a.length-1),s}function ox(a,s){return a.map(o=>o*s)}function rx(a,s){return a.map(()=>s||$0).splice(0,a.length-1)}function Bo({duration:a=300,keyframes:s,times:o,ease:r="easeInOut"}){const c=ex(r)?r.map(Jp):Jp(r),h={done:!1,value:s[0]},f=ox(o&&o.length===s.length?o:lx(s),a),m=ix(f,s,{ease:Array.isArray(c)?c:rx(s,c)});return{calculatedDuration:a,next:p=>(h.value=m(p),h.done=p>=a,h)}}const ux=a=>{const s=({timestamp:o})=>a(o);return{start:()=>Jt.update(s,!0),stop:()=>Ea(s),now:()=>xe.isProcessing?xe.timestamp:Mn.now()}},cx={decay:Qp,inertia:Qp,tween:Bo,keyframes:Bo,spring:P0},fx=a=>a/100;class bf extends K0{constructor(s){super(s),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:p}=this.options;p&&p()};const{name:o,motionValue:r,element:c,keyframes:h}=this.options,f=(c==null?void 0:c.KeyframeResolver)||gf,m=(p,g)=>this.onKeyframesResolved(p,g);this.resolver=new f(h,m,o,r,c),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(s){const{type:o="keyframes",repeat:r=0,repeatDelay:c=0,repeatType:h,velocity:f=0}=this.options,m=cf(o)?o:cx[o]||Bo;let p,g;m!==Bo&&typeof s[0]!="number"&&(p=ll(fx,I0(s[0],s[1])),s=[0,100]);const b=m({...this.options,keyframes:s});h==="mirror"&&(g=m({...this.options,keyframes:[...s].reverse(),velocity:-f})),b.calculatedDuration===null&&(b.calculatedDuration=Q0(b));const{calculatedDuration:S}=b,x=S+c,j=x*(r+1)-c;return{generator:b,mirroredGenerator:g,mapPercentToKeyframes:p,calculatedDuration:S,resolvedDuration:x,totalDuration:j}}onPostResolved(){const{autoplay:s=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!s?this.pause():this.state=this.pendingPlayState}tick(s,o=!1){const{resolved:r}=this;if(!r){const{keyframes:B}=this.options;return{done:!0,value:B[B.length-1]}}const{finalKeyframe:c,generator:h,mirroredGenerator:f,mapPercentToKeyframes:m,keyframes:p,calculatedDuration:g,totalDuration:b,resolvedDuration:S}=r;if(this.startTime===null)return h.next(0);const{delay:x,repeat:j,repeatType:O,repeatDelay:w,onUpdate:Z}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,s):this.speed<0&&(this.startTime=Math.min(s-b/this.speed,this.startTime)),o?this.currentTime=s:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(s-this.startTime)*this.speed;const X=this.currentTime-x*(this.speed>=0?1:-1),F=this.speed>=0?X<0:X>b;this.currentTime=Math.max(X,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=b);let L=this.currentTime,R=h;if(j){const B=Math.min(this.currentTime,b)/S;let nt=Math.floor(B),ct=B%1;!ct&&B>=1&&(ct=1),ct===1&&nt--,nt=Math.min(nt,j+1),!!(nt%2)&&(O==="reverse"?(ct=1-ct,w&&(ct-=w/S)):O==="mirror"&&(R=f)),L=Pn(0,1,ct)*S}const Y=F?{done:!1,value:p[0]}:R.next(L);m&&(Y.value=m(Y.value));let{done:H}=Y;!F&&g!==null&&(H=this.speed>=0?this.currentTime>=b:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&H);return I&&c!==void 0&&(Y.value=Zo(p,this.options,c)),Z&&Z(Y.value),I&&this.finish(),Y}get duration(){const{resolved:s}=this;return s?Fn(s.calculatedDuration):0}get time(){return Fn(this.currentTime)}set time(s){s=In(s),this.currentTime=s,this.holdTime!==null||this.speed===0?this.holdTime=s:this.driver&&(this.startTime=this.driver.now()-s/this.speed)}get speed(){return this.playbackSpeed}set speed(s){const o=this.playbackSpeed!==s;this.playbackSpeed=s,o&&(this.time=Fn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:s=ux,onPlay:o,startTime:r}=this.options;this.driver||(this.driver=s(h=>this.tick(h))),o&&o();const c=this.driver.now();this.holdTime!==null?this.startTime=c-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=c):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var s;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(s=this.currentTime)!==null&&s!==void 0?s:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:s}=this.options;s&&s()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(s){return this.startTime=0,this.tick(s,!0)}}const dx=new Set(["opacity","clipPath","filter","transform"]);function hx(a,s,o,{delay:r=0,duration:c=300,repeat:h=0,repeatType:f="loop",ease:m="easeInOut",times:p}={}){const g={[s]:o};p&&(g.offset=p);const b=_0(m,c);return Array.isArray(b)&&(g.easing=b),a.animate(g,{delay:r,duration:c,easing:Array.isArray(b)?"linear":b,fill:"both",iterations:h+1,direction:f==="reverse"?"alternate":"normal"})}const mx=uf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Vo=10,px=2e4;function vx(a){return cf(a.type)||a.type==="spring"||!x0(a.ease)}function gx(a,s){const o=new bf({...s,keyframes:a,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:a[0]};const c=[];let h=0;for(;!r.done&&h<px;)r=o.sample(h),c.push(r.value),h+=Vo;return{times:void 0,keyframes:c,duration:h-Vo,ease:"linear"}}const W0={anticipate:N0,backInOut:D0,circInOut:k0};function yx(a){return a in W0}class Ip extends K0{constructor(s){super(s);const{name:o,motionValue:r,element:c,keyframes:h}=this.options;this.resolver=new Z0(h,(f,m)=>this.onKeyframesResolved(f,m),o,r,c),this.resolver.scheduleResolve()}initPlayback(s,o){let{duration:r=300,times:c,ease:h,type:f,motionValue:m,name:p,startTime:g}=this.options;if(!m.owner||!m.owner.current)return!1;if(typeof h=="string"&&wo()&&yx(h)&&(h=W0[h]),vx(this.options)){const{onComplete:S,onUpdate:x,motionValue:j,element:O,...w}=this.options,Z=gx(s,w);s=Z.keyframes,s.length===1&&(s[1]=s[0]),r=Z.duration,c=Z.times,h=Z.ease,f="keyframes"}const b=hx(m.owner.current,p,s,{...this.options,duration:r,times:c,ease:h});return b.startTime=g??this.calcStartTime(),this.pendingTimeline?(Vp(b,this.pendingTimeline),this.pendingTimeline=void 0):b.onfinish=()=>{const{onComplete:S}=this.options;m.set(Zo(s,this.options,o)),S&&S(),this.cancel(),this.resolveFinishedPromise()},{animation:b,duration:r,times:c,type:f,ease:h,keyframes:s}}get duration(){const{resolved:s}=this;if(!s)return 0;const{duration:o}=s;return Fn(o)}get time(){const{resolved:s}=this;if(!s)return 0;const{animation:o}=s;return Fn(o.currentTime||0)}set time(s){const{resolved:o}=this;if(!o)return;const{animation:r}=o;r.currentTime=In(s)}get speed(){const{resolved:s}=this;if(!s)return 1;const{animation:o}=s;return o.playbackRate}set speed(s){const{resolved:o}=this;if(!o)return;const{animation:r}=o;r.playbackRate=s}get state(){const{resolved:s}=this;if(!s)return"idle";const{animation:o}=s;return o.playState}get startTime(){const{resolved:s}=this;if(!s)return null;const{animation:o}=s;return o.startTime}attachTimeline(s){if(!this._resolved)this.pendingTimeline=s;else{const{resolved:o}=this;if(!o)return Pe;const{animation:r}=o;Vp(r,s)}return Pe}play(){if(this.isStopped)return;const{resolved:s}=this;if(!s)return;const{animation:o}=s;o.playState==="finished"&&this.updateFinishedPromise(),o.play()}pause(){const{resolved:s}=this;if(!s)return;const{animation:o}=s;o.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:s}=this;if(!s)return;const{animation:o,keyframes:r,duration:c,type:h,ease:f,times:m}=s;if(o.playState==="idle"||o.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:b,onComplete:S,element:x,...j}=this.options,O=new bf({...j,keyframes:r,duration:c,type:h,ease:f,times:m,isGenerator:!0}),w=In(this.time);g.setWithVelocity(O.sample(w-Vo).value,O.sample(w).value,Vo)}const{onStop:p}=this.options;p&&p(),this.cancel()}complete(){const{resolved:s}=this;s&&s.animation.finish()}cancel(){const{resolved:s}=this;s&&s.animation.cancel()}static supports(s){const{motionValue:o,name:r,repeatDelay:c,repeatType:h,damping:f,type:m}=s;if(!o||!o.owner||!(o.owner.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:g}=o.owner.getProps();return mx()&&r&&dx.has(r)&&!p&&!g&&!c&&h!=="mirror"&&f!==0&&m!=="inertia"}}const bx={type:"spring",stiffness:500,damping:25,restSpeed:10},Sx=a=>({type:"spring",stiffness:550,damping:a===0?2*Math.sqrt(550):30,restSpeed:10}),Tx={type:"keyframes",duration:.8},xx={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_x=(a,{keyframes:s})=>s.length>2?Tx:ii.has(a)?a.startsWith("scale")?Sx(s[1]):bx:xx;function Ax({when:a,delay:s,delayChildren:o,staggerChildren:r,staggerDirection:c,repeat:h,repeatType:f,repeatDelay:m,from:p,elapsed:g,...b}){return!!Object.keys(b).length}const Sf=(a,s,o,r={},c,h)=>f=>{const m=sf(r,a)||{},p=m.delay||r.delay||0;let{elapsed:g=0}=r;g=g-In(p);let b={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:s.getVelocity(),...m,delay:-g,onUpdate:x=>{s.set(x),m.onUpdate&&m.onUpdate(x)},onComplete:()=>{f(),m.onComplete&&m.onComplete()},name:a,motionValue:s,element:h?void 0:c};Ax(m)||(b={...b,..._x(a,b)}),b.duration&&(b.duration=In(b.duration)),b.repeatDelay&&(b.repeatDelay=In(b.repeatDelay)),b.from!==void 0&&(b.keyframes[0]=b.from);let S=!1;if((b.type===!1||b.duration===0&&!b.repeatDelay)&&(b.duration=0,b.delay===0&&(S=!0)),S&&!h&&s.get()!==void 0){const x=Zo(b.keyframes,m);if(x!==void 0)return Jt.update(()=>{b.onUpdate(x),b.onComplete()}),new nT([])}return!h&&Ip.supports(b)?new Ip(b):new bf(b)};function Ex({protectedKeys:a,needsAnimating:s},o){const r=a.hasOwnProperty(o)&&s[o]!==!0;return s[o]=!1,r}function tg(a,s,{delay:o=0,transitionOverride:r,type:c}={}){var h;let{transition:f=a.getDefaultTransition(),transitionEnd:m,...p}=s;r&&(f=r);const g=[],b=c&&a.animationState&&a.animationState.getState()[c];for(const S in p){const x=a.getValue(S,(h=a.latestValues[S])!==null&&h!==void 0?h:null),j=p[S];if(j===void 0||b&&Ex(b,S))continue;const O={delay:o,...sf(f||{},S)};let w=!1;if(window.MotionHandoffAnimation){const X=S0(a);if(X){const F=window.MotionHandoffAnimation(X,S,Jt);F!==null&&(O.startTime=F,w=!0)}}_c(a,S),x.start(Sf(S,x,j,a.shouldReduceMotion&&y0.has(S)?{type:!1}:O,a,w));const Z=x.animation;Z&&g.push(Z)}return m&&Promise.all(g).then(()=>{Jt.update(()=>{m&&$S(a,m)})}),g}function Oc(a,s,o={}){var r;const c=Xo(a,s,o.type==="exit"?(r=a.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:h=a.getDefaultTransition()||{}}=c||{};o.transitionOverride&&(h=o.transitionOverride);const f=c?()=>Promise.all(tg(a,c,o)):()=>Promise.resolve(),m=a.variantChildren&&a.variantChildren.size?(g=0)=>{const{delayChildren:b=0,staggerChildren:S,staggerDirection:x}=h;return jx(a,s,b+g,S,x,o)}:()=>Promise.resolve(),{when:p}=h;if(p){const[g,b]=p==="beforeChildren"?[f,m]:[m,f];return g().then(()=>b())}else return Promise.all([f(),m(o.delay)])}function jx(a,s,o=0,r=0,c=1,h){const f=[],m=(a.variantChildren.size-1)*r,p=c===1?(g=0)=>g*r:(g=0)=>m-g*r;return Array.from(a.variantChildren).sort(Cx).forEach((g,b)=>{g.notify("AnimationStart",s),f.push(Oc(g,s,{...h,delay:o+p(b)}).then(()=>g.notify("AnimationComplete",s)))}),Promise.all(f)}function Cx(a,s){return a.sortNodePosition(s)}function Dx(a,s,o={}){a.notify("AnimationStart",s);let r;if(Array.isArray(s)){const c=s.map(h=>Oc(a,h,o));r=Promise.all(c)}else if(typeof s=="string")r=Oc(a,s,o);else{const c=typeof s=="function"?Xo(a,s,o.custom):s;r=Promise.all(tg(a,c,o))}return r.then(()=>{a.notify("AnimationComplete",s)})}const Nx=Kc.length;function eg(a){if(!a)return;if(!a.isControllingVariants){const o=a.parent?eg(a.parent)||{}:{};return a.props.initial!==void 0&&(o.initial=a.props.initial),o}const s={};for(let o=0;o<Nx;o++){const r=Kc[o],c=a.props[r];(Ws(c)||c===!1)&&(s[r]=c)}return s}const Mx=[...Zc].reverse(),kx=Zc.length;function Ox(a){return s=>Promise.all(s.map(({animation:o,options:r})=>Dx(a,o,r)))}function Rx(a){let s=Ox(a),o=Fp(),r=!0;const c=p=>(g,b)=>{var S;const x=Xo(a,b,p==="exit"?(S=a.presenceContext)===null||S===void 0?void 0:S.custom:void 0);if(x){const{transition:j,transitionEnd:O,...w}=x;g={...g,...w,...O}}return g};function h(p){s=p(a)}function f(p){const{props:g}=a,b=eg(a.parent)||{},S=[],x=new Set;let j={},O=1/0;for(let Z=0;Z<kx;Z++){const X=Mx[Z],F=o[X],L=g[X]!==void 0?g[X]:b[X],R=Ws(L),Y=X===p?F.isActive:null;Y===!1&&(O=Z);let H=L===b[X]&&L!==g[X]&&R;if(H&&r&&a.manuallyAnimateOnMount&&(H=!1),F.protectedKeys={...j},!F.isActive&&Y===null||!L&&!F.prevProp||Go(L)||typeof L=="boolean")continue;const I=wx(F.prevProp,L);let B=I||X===p&&F.isActive&&!H&&R||Z>O&&R,nt=!1;const ct=Array.isArray(L)?L:[L];let st=ct.reduce(c(X),{});Y===!1&&(st={});const{prevResolvedValues:ft={}}=F,gt={...ft,...st},Ct=G=>{B=!0,x.has(G)&&(nt=!0,x.delete(G)),F.needsAnimating[G]=!0;const et=a.getValue(G);et&&(et.liveStyle=!1)};for(const G in gt){const et=st[G],yt=ft[G];if(j.hasOwnProperty(G))continue;let bt=!1;xc(et)&&xc(yt)?bt=!g0(et,yt):bt=et!==yt,bt?et!=null?Ct(G):x.add(G):et!==void 0&&x.has(G)?Ct(G):F.protectedKeys[G]=!0}F.prevProp=L,F.prevResolvedValues=st,F.isActive&&(j={...j,...st}),r&&a.blockInitialAnimation&&(B=!1),B&&(!(H&&I)||nt)&&S.push(...ct.map(G=>({animation:G,options:{type:X}})))}if(x.size){const Z={};x.forEach(X=>{const F=a.getBaseTarget(X),L=a.getValue(X);L&&(L.liveStyle=!0),Z[X]=F??null}),S.push({animation:Z})}let w=!!S.length;return r&&(g.initial===!1||g.initial===g.animate)&&!a.manuallyAnimateOnMount&&(w=!1),r=!1,w?s(S):Promise.resolve()}function m(p,g){var b;if(o[p].isActive===g)return Promise.resolve();(b=a.variantChildren)===null||b===void 0||b.forEach(x=>{var j;return(j=x.animationState)===null||j===void 0?void 0:j.setActive(p,g)}),o[p].isActive=g;const S=f(p);for(const x in o)o[x].protectedKeys={};return S}return{animateChanges:f,setActive:m,setAnimateFunction:h,getState:()=>o,reset:()=>{o=Fp(),r=!0}}}function wx(a,s){return typeof s=="string"?s!==a:Array.isArray(s)?!g0(s,a):!1}function Pa(a=!1){return{isActive:a,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Fp(){return{animate:Pa(!0),whileInView:Pa(),whileHover:Pa(),whileTap:Pa(),whileDrag:Pa(),whileFocus:Pa(),exit:Pa()}}class Ca{constructor(s){this.isMounted=!1,this.node=s}update(){}}class zx extends Ca{constructor(s){super(s),s.animationState||(s.animationState=Rx(s))}updateAnimationControlsSubscription(){const{animate:s}=this.node.getProps();Go(s)&&(this.unmountControls=s.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:s}=this.node.getProps(),{animate:o}=this.node.prevProps||{};s!==o&&this.updateAnimationControlsSubscription()}unmount(){var s;this.node.animationState.reset(),(s=this.unmountControls)===null||s===void 0||s.call(this)}}let Bx=0;class Vx extends Ca{constructor(){super(...arguments),this.id=Bx++}update(){if(!this.node.presenceContext)return;const{isPresent:s,onExitComplete:o}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||s===r)return;const c=this.node.animationState.setActive("exit",!s);o&&!s&&c.then(()=>o(this.id))}mount(){const{register:s}=this.node.presenceContext||{};s&&(this.unmount=s(this.id))}unmount(){}}const Ux={animation:{Feature:zx},exit:{Feature:Vx}},Sn={x:!1,y:!1};function ng(){return Sn.x||Sn.y}function Lx(a){return a==="x"||a==="y"?Sn[a]?null:(Sn[a]=!0,()=>{Sn[a]=!1}):Sn.x||Sn.y?null:(Sn.x=Sn.y=!0,()=>{Sn.x=Sn.y=!1})}const Tf=a=>a.pointerType==="mouse"?typeof a.button!="number"||a.button<=0:a.isPrimary!==!1;function al(a,s,o,r={passive:!0}){return a.addEventListener(s,o,r),()=>a.removeEventListener(s,o)}function ol(a){return{point:{x:a.pageX,y:a.pageY}}}const Hx=a=>s=>Tf(s)&&a(s,ol(s));function Fs(a,s,o,r){return al(a,s,Hx(o),r)}const Pp=(a,s)=>Math.abs(a-s);function qx(a,s){const o=Pp(a.x,s.x),r=Pp(a.y,s.y);return Math.sqrt(o**2+r**2)}class ag{constructor(s,o,{transformPagePoint:r,contextWindow:c,dragSnapToOrigin:h=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=hc(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,j=qx(S.offset,{x:0,y:0})>=3;if(!x&&!j)return;const{point:O}=S,{timestamp:w}=xe;this.history.push({...O,timestamp:w});const{onStart:Z,onMove:X}=this.handlers;x||(Z&&Z(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),X&&X(this.lastMoveEvent,S)},this.handlePointerMove=(S,x)=>{this.lastMoveEvent=S,this.lastMoveEventInfo=dc(x,this.transformPagePoint),Jt.update(this.updatePoint,!0)},this.handlePointerUp=(S,x)=>{this.end();const{onEnd:j,onSessionEnd:O,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const Z=hc(S.type==="pointercancel"?this.lastMoveEventInfo:dc(x,this.transformPagePoint),this.history);this.startEvent&&j&&j(S,Z),O&&O(S,Z)},!Tf(s))return;this.dragSnapToOrigin=h,this.handlers=o,this.transformPagePoint=r,this.contextWindow=c||window;const f=ol(s),m=dc(f,this.transformPagePoint),{point:p}=m,{timestamp:g}=xe;this.history=[{...p,timestamp:g}];const{onSessionStart:b}=o;b&&b(s,hc(m,this.history)),this.removeListeners=ll(Fs(this.contextWindow,"pointermove",this.handlePointerMove),Fs(this.contextWindow,"pointerup",this.handlePointerUp),Fs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(s){this.handlers=s}end(){this.removeListeners&&this.removeListeners(),Ea(this.updatePoint)}}function dc(a,s){return s?{point:s(a.point)}:a}function $p(a,s){return{x:a.x-s.x,y:a.y-s.y}}function hc({point:a},s){return{point:a,delta:$p(a,ig(s)),offset:$p(a,Gx(s)),velocity:Yx(s,.1)}}function Gx(a){return a[0]}function ig(a){return a[a.length-1]}function Yx(a,s){if(a.length<2)return{x:0,y:0};let o=a.length-1,r=null;const c=ig(a);for(;o>=0&&(r=a[o],!(c.timestamp-r.timestamp>In(s)));)o--;if(!r)return{x:0,y:0};const h=Fn(c.timestamp-r.timestamp);if(h===0)return{x:0,y:0};const f={x:(c.x-r.x)/h,y:(c.y-r.y)/h};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}const sg=1e-4,Xx=1-sg,Zx=1+sg,lg=.01,Kx=0-lg,Qx=0+lg;function $e(a){return a.max-a.min}function Jx(a,s,o){return Math.abs(a-s)<=o}function Wp(a,s,o,r=.5){a.origin=r,a.originPoint=Ft(s.min,s.max,a.origin),a.scale=$e(o)/$e(s),a.translate=Ft(o.min,o.max,a.origin)-a.originPoint,(a.scale>=Xx&&a.scale<=Zx||isNaN(a.scale))&&(a.scale=1),(a.translate>=Kx&&a.translate<=Qx||isNaN(a.translate))&&(a.translate=0)}function Ps(a,s,o,r){Wp(a.x,s.x,o.x,r?r.originX:void 0),Wp(a.y,s.y,o.y,r?r.originY:void 0)}function tv(a,s,o){a.min=o.min+s.min,a.max=a.min+$e(s)}function Ix(a,s,o){tv(a.x,s.x,o.x),tv(a.y,s.y,o.y)}function ev(a,s,o){a.min=s.min-o.min,a.max=a.min+$e(s)}function $s(a,s,o){ev(a.x,s.x,o.x),ev(a.y,s.y,o.y)}function Fx(a,{min:s,max:o},r){return s!==void 0&&a<s?a=r?Ft(s,a,r.min):Math.max(a,s):o!==void 0&&a>o&&(a=r?Ft(o,a,r.max):Math.min(a,o)),a}function nv(a,s,o){return{min:s!==void 0?a.min+s:void 0,max:o!==void 0?a.max+o-(a.max-a.min):void 0}}function Px(a,{top:s,left:o,bottom:r,right:c}){return{x:nv(a.x,o,c),y:nv(a.y,s,r)}}function av(a,s){let o=s.min-a.min,r=s.max-a.max;return s.max-s.min<a.max-a.min&&([o,r]=[r,o]),{min:o,max:r}}function $x(a,s){return{x:av(a.x,s.x),y:av(a.y,s.y)}}function Wx(a,s){let o=.5;const r=$e(a),c=$e(s);return c>r?o=Pi(s.min,s.max-r,a.min):r>c&&(o=Pi(a.min,a.max-c,s.min)),Pn(0,1,o)}function t_(a,s){const o={};return s.min!==void 0&&(o.min=s.min-a.min),s.max!==void 0&&(o.max=s.max-a.min),o}const Rc=.35;function e_(a=Rc){return a===!1?a=0:a===!0&&(a=Rc),{x:iv(a,"left","right"),y:iv(a,"top","bottom")}}function iv(a,s,o){return{min:sv(a,s),max:sv(a,o)}}function sv(a,s){return typeof a=="number"?a:a[s]||0}const lv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Qi=()=>({x:lv(),y:lv()}),ov=()=>({min:0,max:0}),ae=()=>({x:ov(),y:ov()});function hn(a){return[a("x"),a("y")]}function og({top:a,left:s,right:o,bottom:r}){return{x:{min:s,max:o},y:{min:a,max:r}}}function n_({x:a,y:s}){return{top:s.min,right:a.max,bottom:s.max,left:a.min}}function a_(a,s){if(!s)return a;const o=s({x:a.left,y:a.top}),r=s({x:a.right,y:a.bottom});return{top:o.y,left:o.x,bottom:r.y,right:r.x}}function mc(a){return a===void 0||a===1}function wc({scale:a,scaleX:s,scaleY:o}){return!mc(a)||!mc(s)||!mc(o)}function Wa(a){return wc(a)||rg(a)||a.z||a.rotate||a.rotateX||a.rotateY||a.skewX||a.skewY}function rg(a){return rv(a.x)||rv(a.y)}function rv(a){return a&&a!=="0%"}function Uo(a,s,o){const r=a-o,c=s*r;return o+c}function uv(a,s,o,r,c){return c!==void 0&&(a=Uo(a,c,r)),Uo(a,o,r)+s}function zc(a,s=0,o=1,r,c){a.min=uv(a.min,s,o,r,c),a.max=uv(a.max,s,o,r,c)}function ug(a,{x:s,y:o}){zc(a.x,s.translate,s.scale,s.originPoint),zc(a.y,o.translate,o.scale,o.originPoint)}const cv=.999999999999,fv=1.0000000000001;function i_(a,s,o,r=!1){const c=o.length;if(!c)return;s.x=s.y=1;let h,f;for(let m=0;m<c;m++){h=o[m],f=h.projectionDelta;const{visualElement:p}=h.options;p&&p.props.style&&p.props.style.display==="contents"||(r&&h.options.layoutScroll&&h.scroll&&h!==h.root&&Ii(a,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),f&&(s.x*=f.x.scale,s.y*=f.y.scale,ug(a,f)),r&&Wa(h.latestValues)&&Ii(a,h.latestValues))}s.x<fv&&s.x>cv&&(s.x=1),s.y<fv&&s.y>cv&&(s.y=1)}function Ji(a,s){a.min=a.min+s,a.max=a.max+s}function dv(a,s,o,r,c=.5){const h=Ft(a.min,a.max,c);zc(a,s,o,h,r)}function Ii(a,s){dv(a.x,s.x,s.scaleX,s.scale,s.originX),dv(a.y,s.y,s.scaleY,s.scale,s.originY)}function cg(a,s){return og(a_(a.getBoundingClientRect(),s))}function s_(a,s,o){const r=cg(a,o),{scroll:c}=s;return c&&(Ji(r.x,c.offset.x),Ji(r.y,c.offset.y)),r}const fg=({current:a})=>a?a.ownerDocument.defaultView:null,l_=new WeakMap;class o_{constructor(s){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ae(),this.visualElement=s}start(s,{snapToCursor:o=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const c=b=>{const{dragSnapToOrigin:S}=this.getProps();S?this.pauseAnimation():this.stopAnimation(),o&&this.snapToCursor(ol(b).point)},h=(b,S)=>{const{drag:x,dragPropagation:j,onDragStart:O}=this.getProps();if(x&&!j&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Lx(x),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),hn(Z=>{let X=this.getAxisMotionValue(Z).get()||0;if(Nn.test(X)){const{projection:F}=this.visualElement;if(F&&F.layout){const L=F.layout.layoutBox[Z];L&&(X=$e(L)*(parseFloat(X)/100))}}this.originPoint[Z]=X}),O&&Jt.postRender(()=>O(b,S)),_c(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},f=(b,S)=>{const{dragPropagation:x,dragDirectionLock:j,onDirectionLock:O,onDrag:w}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:Z}=S;if(j&&this.currentDirection===null){this.currentDirection=r_(Z),this.currentDirection!==null&&O&&O(this.currentDirection);return}this.updateAxis("x",S.point,Z),this.updateAxis("y",S.point,Z),this.visualElement.render(),w&&w(b,S)},m=(b,S)=>this.stop(b,S),p=()=>hn(b=>{var S;return this.getAnimationState(b)==="paused"&&((S=this.getAxisMotionValue(b).animation)===null||S===void 0?void 0:S.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new ag(s,{onSessionStart:c,onStart:h,onMove:f,onSessionEnd:m,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:fg(this.visualElement)})}stop(s,o){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:h}=this.getProps();h&&Jt.postRender(()=>h(s,o))}cancel(){this.isDragging=!1;const{projection:s,animationState:o}=this.visualElement;s&&(s.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}updateAxis(s,o,r){const{drag:c}=this.getProps();if(!r||!Do(s,c,this.currentDirection))return;const h=this.getAxisMotionValue(s);let f=this.originPoint[s]+r[s];this.constraints&&this.constraints[s]&&(f=Fx(f,this.constraints[s],this.elastic[s])),h.set(f)}resolveConstraints(){var s;const{dragConstraints:o,dragElastic:r}=this.getProps(),c=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)===null||s===void 0?void 0:s.layout,h=this.constraints;o&&Zi(o)?this.constraints||(this.constraints=this.resolveRefConstraints()):o&&c?this.constraints=Px(c.layoutBox,o):this.constraints=!1,this.elastic=e_(r),h!==this.constraints&&c&&this.constraints&&!this.hasMutatedConstraints&&hn(f=>{this.constraints!==!1&&this.getAxisMotionValue(f)&&(this.constraints[f]=t_(c.layoutBox[f],this.constraints[f]))})}resolveRefConstraints(){const{dragConstraints:s,onMeasureDragConstraints:o}=this.getProps();if(!s||!Zi(s))return!1;const r=s.current,{projection:c}=this.visualElement;if(!c||!c.layout)return!1;const h=s_(r,c.root,this.visualElement.getTransformPagePoint());let f=$x(c.layout.layoutBox,h);if(o){const m=o(n_(f));this.hasMutatedConstraints=!!m,m&&(f=og(m))}return f}startAnimation(s){const{drag:o,dragMomentum:r,dragElastic:c,dragTransition:h,dragSnapToOrigin:f,onDragTransitionEnd:m}=this.getProps(),p=this.constraints||{},g=hn(b=>{if(!Do(b,o,this.currentDirection))return;let S=p&&p[b]||{};f&&(S={min:0,max:0});const x=c?200:1e6,j=c?40:1e7,O={type:"inertia",velocity:r?s[b]:0,bounceStiffness:x,bounceDamping:j,timeConstant:750,restDelta:1,restSpeed:10,...h,...S};return this.startAxisValueAnimation(b,O)});return Promise.all(g).then(m)}startAxisValueAnimation(s,o){const r=this.getAxisMotionValue(s);return _c(this.visualElement,s),r.start(Sf(s,r,0,o,this.visualElement,!1))}stopAnimation(){hn(s=>this.getAxisMotionValue(s).stop())}pauseAnimation(){hn(s=>{var o;return(o=this.getAxisMotionValue(s).animation)===null||o===void 0?void 0:o.pause()})}getAnimationState(s){var o;return(o=this.getAxisMotionValue(s).animation)===null||o===void 0?void 0:o.state}getAxisMotionValue(s){const o=`_drag${s.toUpperCase()}`,r=this.visualElement.getProps(),c=r[o];return c||this.visualElement.getValue(s,(r.initial?r.initial[s]:void 0)||0)}snapToCursor(s){hn(o=>{const{drag:r}=this.getProps();if(!Do(o,r,this.currentDirection))return;const{projection:c}=this.visualElement,h=this.getAxisMotionValue(o);if(c&&c.layout){const{min:f,max:m}=c.layout.layoutBox[o];h.set(s[o]-Ft(f,m,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:s,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!Zi(o)||!r||!this.constraints)return;this.stopAnimation();const c={x:0,y:0};hn(f=>{const m=this.getAxisMotionValue(f);if(m&&this.constraints!==!1){const p=m.get();c[f]=Wx({min:p,max:p},this.constraints[f])}});const{transformTemplate:h}=this.visualElement.getProps();this.visualElement.current.style.transform=h?h({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),hn(f=>{if(!Do(f,s,null))return;const m=this.getAxisMotionValue(f),{min:p,max:g}=this.constraints[f];m.set(Ft(p,g,c[f]))})}addListeners(){if(!this.visualElement.current)return;l_.set(this.visualElement,this);const s=this.visualElement.current,o=Fs(s,"pointerdown",p=>{const{drag:g,dragListener:b=!0}=this.getProps();g&&b&&this.start(p)}),r=()=>{const{dragConstraints:p}=this.getProps();Zi(p)&&p.current&&(this.constraints=this.resolveRefConstraints())},{projection:c}=this.visualElement,h=c.addEventListener("measure",r);c&&!c.layout&&(c.root&&c.root.updateScroll(),c.updateLayout()),Jt.read(r);const f=al(window,"resize",()=>this.scalePositionWithinConstraints()),m=c.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:g})=>{this.isDragging&&g&&(hn(b=>{const S=this.getAxisMotionValue(b);S&&(this.originPoint[b]+=p[b].translate,S.set(S.get()+p[b].translate))}),this.visualElement.render())}));return()=>{f(),o(),h(),m&&m()}}getProps(){const s=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:r=!1,dragPropagation:c=!1,dragConstraints:h=!1,dragElastic:f=Rc,dragMomentum:m=!0}=s;return{...s,drag:o,dragDirectionLock:r,dragPropagation:c,dragConstraints:h,dragElastic:f,dragMomentum:m}}}function Do(a,s,o){return(s===!0||s===a)&&(o===null||o===a)}function r_(a,s=10){let o=null;return Math.abs(a.y)>s?o="y":Math.abs(a.x)>s&&(o="x"),o}class u_ extends Ca{constructor(s){super(s),this.removeGroupControls=Pe,this.removeListeners=Pe,this.controls=new o_(s)}mount(){const{dragControls:s}=this.node.getProps();s&&(this.removeGroupControls=s.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pe}unmount(){this.removeGroupControls(),this.removeListeners()}}const hv=a=>(s,o)=>{a&&Jt.postRender(()=>a(s,o))};class c_ extends Ca{constructor(){super(...arguments),this.removePointerDownListener=Pe}onPointerDown(s){this.session=new ag(s,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:fg(this.node)})}createPanHandlers(){const{onPanSessionStart:s,onPanStart:o,onPan:r,onPanEnd:c}=this.node.getProps();return{onSessionStart:hv(s),onStart:hv(o),onMove:r,onEnd:(h,f)=>{delete this.session,c&&Jt.postRender(()=>c(h,f))}}}mount(){this.removePointerDownListener=Fs(this.node.current,"pointerdown",s=>this.onPointerDown(s))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ko={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function mv(a,s){return s.max===s.min?0:a/(s.max-s.min)*100}const Zs={correct:(a,s)=>{if(!s.target)return a;if(typeof a=="string")if(ut.test(a))a=parseFloat(a);else return a;const o=mv(a,s.target.x),r=mv(a,s.target.y);return`${o}% ${r}%`}},f_={correct:(a,{treeScale:s,projectionDelta:o})=>{const r=a,c=ja.parse(a);if(c.length>5)return r;const h=ja.createTransformer(a),f=typeof c[0]!="number"?1:0,m=o.x.scale*s.x,p=o.y.scale*s.y;c[0+f]/=m,c[1+f]/=p;const g=Ft(m,p,.5);return typeof c[2+f]=="number"&&(c[2+f]/=g),typeof c[3+f]=="number"&&(c[3+f]/=g),h(c)}};class d_ extends _.Component{componentDidMount(){const{visualElement:s,layoutGroup:o,switchLayoutGroup:r,layoutId:c}=this.props,{projection:h}=s;US(h_),h&&(o.group&&o.group.add(h),r&&r.register&&c&&r.register(h),h.root.didUpdate(),h.addEventListener("animationComplete",()=>{this.safeToRemove()}),h.setOptions({...h.options,onExitComplete:()=>this.safeToRemove()})),ko.hasEverUpdated=!0}getSnapshotBeforeUpdate(s){const{layoutDependency:o,visualElement:r,drag:c,isPresent:h}=this.props,f=r.projection;return f&&(f.isPresent=h,c||s.layoutDependency!==o||o===void 0?f.willUpdate():this.safeToRemove(),s.isPresent!==h&&(h?f.promote():f.relegate()||Jt.postRender(()=>{const m=f.getStack();(!m||!m.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:s}=this.props.visualElement;s&&(s.root.didUpdate(),Jc.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:s,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:c}=s;c&&(c.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(c),r&&r.deregister&&r.deregister(c))}safeToRemove(){const{safeToRemove:s}=this.props;s&&s()}render(){return null}}function dg(a){const[s,o]=Fv(),r=_.useContext(Hc);return y.jsx(d_,{...a,layoutGroup:r,switchLayoutGroup:_.useContext(i0),isPresent:s,safeToRemove:o})}const h_={borderRadius:{...Zs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Zs,borderTopRightRadius:Zs,borderBottomLeftRadius:Zs,borderBottomRightRadius:Zs,boxShadow:f_};function m_(a,s,o){const r=De(a)?a:el(a);return r.start(Sf("",r,s,o)),r.animation}function p_(a){return a instanceof SVGElement&&a.tagName!=="svg"}const v_=(a,s)=>a.depth-s.depth;class g_{constructor(){this.children=[],this.isDirty=!1}add(s){lf(this.children,s),this.isDirty=!0}remove(s){of(this.children,s),this.isDirty=!0}forEach(s){this.isDirty&&this.children.sort(v_),this.isDirty=!1,this.children.forEach(s)}}function y_(a,s){const o=Mn.now(),r=({timestamp:c})=>{const h=c-o;h>=s&&(Ea(r),a(h-s))};return Jt.read(r,!0),()=>Ea(r)}const hg=["TopLeft","TopRight","BottomLeft","BottomRight"],b_=hg.length,pv=a=>typeof a=="string"?parseFloat(a):a,vv=a=>typeof a=="number"||ut.test(a);function S_(a,s,o,r,c,h){c?(a.opacity=Ft(0,o.opacity!==void 0?o.opacity:1,T_(r)),a.opacityExit=Ft(s.opacity!==void 0?s.opacity:1,0,x_(r))):h&&(a.opacity=Ft(s.opacity!==void 0?s.opacity:1,o.opacity!==void 0?o.opacity:1,r));for(let f=0;f<b_;f++){const m=`border${hg[f]}Radius`;let p=gv(s,m),g=gv(o,m);if(p===void 0&&g===void 0)continue;p||(p=0),g||(g=0),p===0||g===0||vv(p)===vv(g)?(a[m]=Math.max(Ft(pv(p),pv(g),r),0),(Nn.test(g)||Nn.test(p))&&(a[m]+="%")):a[m]=g}(s.rotate||o.rotate)&&(a.rotate=Ft(s.rotate||0,o.rotate||0,r))}function gv(a,s){return a[s]!==void 0?a[s]:a.borderRadius}const T_=mg(0,.5,M0),x_=mg(.5,.95,Pe);function mg(a,s,o){return r=>r<a?0:r>s?1:o(Pi(a,s,r))}function yv(a,s){a.min=s.min,a.max=s.max}function dn(a,s){yv(a.x,s.x),yv(a.y,s.y)}function bv(a,s){a.translate=s.translate,a.scale=s.scale,a.originPoint=s.originPoint,a.origin=s.origin}function Sv(a,s,o,r,c){return a-=s,a=Uo(a,1/o,r),c!==void 0&&(a=Uo(a,1/c,r)),a}function __(a,s=0,o=1,r=.5,c,h=a,f=a){if(Nn.test(s)&&(s=parseFloat(s),s=Ft(f.min,f.max,s/100)-f.min),typeof s!="number")return;let m=Ft(h.min,h.max,r);a===h&&(m-=s),a.min=Sv(a.min,s,o,m,c),a.max=Sv(a.max,s,o,m,c)}function Tv(a,s,[o,r,c],h,f){__(a,s[o],s[r],s[c],s.scale,h,f)}const A_=["x","scaleX","originX"],E_=["y","scaleY","originY"];function xv(a,s,o,r){Tv(a.x,s,A_,o?o.x:void 0,r?r.x:void 0),Tv(a.y,s,E_,o?o.y:void 0,r?r.y:void 0)}function _v(a){return a.translate===0&&a.scale===1}function pg(a){return _v(a.x)&&_v(a.y)}function Av(a,s){return a.min===s.min&&a.max===s.max}function j_(a,s){return Av(a.x,s.x)&&Av(a.y,s.y)}function Ev(a,s){return Math.round(a.min)===Math.round(s.min)&&Math.round(a.max)===Math.round(s.max)}function vg(a,s){return Ev(a.x,s.x)&&Ev(a.y,s.y)}function jv(a){return $e(a.x)/$e(a.y)}function Cv(a,s){return a.translate===s.translate&&a.scale===s.scale&&a.originPoint===s.originPoint}class C_{constructor(){this.members=[]}add(s){lf(this.members,s),s.scheduleRender()}remove(s){if(of(this.members,s),s===this.prevLead&&(this.prevLead=void 0),s===this.lead){const o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(s){const o=this.members.findIndex(c=>s===c);if(o===0)return!1;let r;for(let c=o;c>=0;c--){const h=this.members[c];if(h.isPresent!==!1){r=h;break}}return r?(this.promote(r),!0):!1}promote(s,o){const r=this.lead;if(s!==r&&(this.prevLead=r,this.lead=s,s.show(),r)){r.instance&&r.scheduleRender(),s.scheduleRender(),s.resumeFrom=r,o&&(s.resumeFrom.preserveOpacity=!0),r.snapshot&&(s.snapshot=r.snapshot,s.snapshot.latestValues=r.animationValues||r.latestValues),s.root&&s.root.isUpdating&&(s.isLayoutDirty=!0);const{crossfade:c}=s.options;c===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(s=>{const{options:o,resumingFrom:r}=s;o.onExitComplete&&o.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(s=>{s.instance&&s.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function D_(a,s,o){let r="";const c=a.x.translate/s.x,h=a.y.translate/s.y,f=(o==null?void 0:o.z)||0;if((c||h||f)&&(r=`translate3d(${c}px, ${h}px, ${f}px) `),(s.x!==1||s.y!==1)&&(r+=`scale(${1/s.x}, ${1/s.y}) `),o){const{transformPerspective:g,rotate:b,rotateX:S,rotateY:x,skewX:j,skewY:O}=o;g&&(r=`perspective(${g}px) ${r}`),b&&(r+=`rotate(${b}deg) `),S&&(r+=`rotateX(${S}deg) `),x&&(r+=`rotateY(${x}deg) `),j&&(r+=`skewX(${j}deg) `),O&&(r+=`skewY(${O}deg) `)}const m=a.x.scale*s.x,p=a.y.scale*s.y;return(m!==1||p!==1)&&(r+=`scale(${m}, ${p})`),r||"none"}const ti={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Qs=typeof window<"u"&&window.MotionDebug!==void 0,pc=["","X","Y","Z"],N_={visibility:"hidden"},Dv=1e3;let M_=0;function vc(a,s,o,r){const{latestValues:c}=s;c[a]&&(o[a]=c[a],s.setStaticValue(a,0),r&&(r[a]=0))}function gg(a){if(a.hasCheckedOptimisedAppear=!0,a.root===a)return;const{visualElement:s}=a.options;if(!s)return;const o=S0(s);if(window.MotionHasOptimisedAnimation(o,"transform")){const{layout:c,layoutId:h}=a.options;window.MotionCancelOptimisedAnimation(o,"transform",Jt,!(c||h))}const{parent:r}=a;r&&!r.hasCheckedOptimisedAppear&&gg(r)}function yg({attachResizeListener:a,defaultParent:s,measureScroll:o,checkIsScrollRoot:r,resetTransform:c}){return class{constructor(f={},m=s==null?void 0:s()){this.id=M_++,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,Qs&&(ti.totalNodes=ti.resolvedTargetDeltas=ti.recalculatedProjection=0),this.nodes.forEach(R_),this.nodes.forEach(U_),this.nodes.forEach(L_),this.nodes.forEach(w_),Qs&&window.MotionDebug.record(ti)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=m?m.root||m:this,this.path=m?[...m.path,m]:[],this.parent=m,this.depth=m?m.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new g_)}addEventListener(f,m){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new rf),this.eventHandlers.get(f).add(m)}notifyListeners(f,...m){const p=this.eventHandlers.get(f);p&&p.notify(...m)}hasListeners(f){return this.eventHandlers.has(f)}mount(f,m=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=p_(f),this.instance=f;const{layoutId:p,layout:g,visualElement:b}=this.options;if(b&&!b.current&&b.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),m&&(g||p)&&(this.isLayoutDirty=!0),a){let S;const x=()=>this.root.updateBlockedByResize=!1;a(f,()=>{this.root.updateBlockedByResize=!0,S&&S(),S=y_(x,250),ko.hasAnimatedSinceResize&&(ko.hasAnimatedSinceResize=!1,this.nodes.forEach(Mv))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&b&&(p||g)&&this.addEventListener("didUpdate",({delta:S,hasLayoutChanged:x,hasRelativeTargetChanged:j,layout:O})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||b.getDefaultTransition()||X_,{onLayoutAnimationStart:Z,onLayoutAnimationComplete:X}=b.getProps(),F=!this.targetLayout||!vg(this.targetLayout,O)||j,L=!x&&j;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||L||x&&(F||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(S,L);const R={...sf(w,"layout"),onPlay:Z,onComplete:X};(b.shouldReduceMotion||this.options.layoutRoot)&&(R.delay=0,R.type=!1),this.startAnimation(R)}else x||Mv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=O})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ea(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(H_),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&gg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let b=0;b<this.path.length;b++){const S=this.path[b];S.shouldResetTransform=!0,S.updateScroll("snapshot"),S.options.layoutRoot&&S.willUpdate(!1)}const{layoutId:m,layout:p}=this.options;if(m===void 0&&!p)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Nv);return}this.isUpdating||this.nodes.forEach(B_),this.isUpdating=!1,this.nodes.forEach(V_),this.nodes.forEach(k_),this.nodes.forEach(O_),this.clearAllSnapshots();const m=Mn.now();xe.delta=Pn(0,1e3/60,m-xe.timestamp),xe.timestamp=m,xe.isProcessing=!0,oc.update.process(xe),oc.preRender.process(xe),oc.render.process(xe),xe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Jc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(z_),this.sharedNodes.forEach(q_)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Jt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Jt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let p=0;p<this.path.length;p++)this.path[p].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ae(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:m}=this.options;m&&m.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let m=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(m=!1),m){const p=r(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:p,offset:o(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!c)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,m=this.projectionDelta&&!pg(this.projectionDelta),p=this.getTransformTemplate(),g=p?p(this.latestValues,""):void 0,b=g!==this.prevTransformTemplateValue;f&&(m||Wa(this.latestValues)||b)&&(c(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const m=this.measurePageBox();let p=this.removeElementScroll(m);return f&&(p=this.removeTransform(p)),Z_(p),{animationId:this.root.animationId,measuredBox:m,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:m}=this.options;if(!m)return ae();const p=m.measureViewportBox();if(!(((f=this.scroll)===null||f===void 0?void 0:f.wasRoot)||this.path.some(K_))){const{scroll:b}=this.root;b&&(Ji(p.x,b.offset.x),Ji(p.y,b.offset.y))}return p}removeElementScroll(f){var m;const p=ae();if(dn(p,f),!((m=this.scroll)===null||m===void 0)&&m.wasRoot)return p;for(let g=0;g<this.path.length;g++){const b=this.path[g],{scroll:S,options:x}=b;b!==this.root&&S&&x.layoutScroll&&(S.wasRoot&&dn(p,f),Ji(p.x,S.offset.x),Ji(p.y,S.offset.y))}return p}applyTransform(f,m=!1){const p=ae();dn(p,f);for(let g=0;g<this.path.length;g++){const b=this.path[g];!m&&b.options.layoutScroll&&b.scroll&&b!==b.root&&Ii(p,{x:-b.scroll.offset.x,y:-b.scroll.offset.y}),Wa(b.latestValues)&&Ii(p,b.latestValues)}return Wa(this.latestValues)&&Ii(p,this.latestValues),p}removeTransform(f){const m=ae();dn(m,f);for(let p=0;p<this.path.length;p++){const g=this.path[p];if(!g.instance||!Wa(g.latestValues))continue;wc(g.latestValues)&&g.updateSnapshot();const b=ae(),S=g.measurePageBox();dn(b,S),xv(m,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,b)}return Wa(this.latestValues)&&xv(m,this.latestValues),m}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==xe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){var m;const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==p;if(!(f||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((m=this.parent)===null||m===void 0)&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:S,layoutId:x}=this.options;if(!(!this.layout||!(S||x))){if(this.resolvedRelativeTargetAt=xe.timestamp,!this.targetDelta&&!this.relativeTarget){const j=this.getClosestProjectingParent();j&&j.layout&&this.animationProgress!==1?(this.relativeParent=j,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ae(),this.relativeTargetOrigin=ae(),$s(this.relativeTargetOrigin,this.layout.layoutBox,j.layout.layoutBox),dn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=ae(),this.targetWithTransforms=ae()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ix(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):dn(this.target,this.layout.layoutBox),ug(this.target,this.targetDelta)):dn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const j=this.getClosestProjectingParent();j&&!!j.resumingFrom==!!this.resumingFrom&&!j.options.layoutScroll&&j.target&&this.animationProgress!==1?(this.relativeParent=j,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ae(),this.relativeTargetOrigin=ae(),$s(this.relativeTargetOrigin,this.target,j.target),dn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Qs&&ti.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||wc(this.parent.latestValues)||rg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var f;const m=this.getLead(),p=!!this.resumingFrom||this!==m;let g=!0;if((this.isProjectionDirty||!((f=this.parent)===null||f===void 0)&&f.isProjectionDirty)&&(g=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===xe.timestamp&&(g=!1),g)return;const{layout:b,layoutId:S}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(b||S))return;dn(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,j=this.treeScale.y;i_(this.layoutCorrected,this.treeScale,this.path,p),m.layout&&!m.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(m.target=m.layout.layoutBox,m.targetWithTransforms=ae());const{target:O}=m;if(!O){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(bv(this.prevProjectionDelta.x,this.projectionDelta.x),bv(this.prevProjectionDelta.y,this.projectionDelta.y)),Ps(this.projectionDelta,this.layoutCorrected,O,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==j||!Cv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Cv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",O)),Qs&&ti.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){var m;if((m=this.options.visualElement)===null||m===void 0||m.scheduleRender(),f){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Qi(),this.projectionDelta=Qi(),this.projectionDeltaWithTransform=Qi()}setAnimationOrigin(f,m=!1){const p=this.snapshot,g=p?p.latestValues:{},b={...this.latestValues},S=Qi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!m;const x=ae(),j=p?p.source:void 0,O=this.layout?this.layout.source:void 0,w=j!==O,Z=this.getStack(),X=!Z||Z.members.length<=1,F=!!(w&&!X&&this.options.crossfade===!0&&!this.path.some(Y_));this.animationProgress=0;let L;this.mixTargetDelta=R=>{const Y=R/1e3;kv(S.x,f.x,Y),kv(S.y,f.y,Y),this.setTargetDelta(S),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($s(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),G_(this.relativeTarget,this.relativeTargetOrigin,x,Y),L&&j_(this.relativeTarget,L)&&(this.isProjectionDirty=!1),L||(L=ae()),dn(L,this.relativeTarget)),w&&(this.animationValues=b,S_(b,g,this.latestValues,Y,F,X)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=Y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ea(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Jt.update(()=>{ko.hasAnimatedSinceResize=!0,this.currentAnimation=m_(0,Dv,{...f,onUpdate:m=>{this.mixTargetDelta(m),f.onUpdate&&f.onUpdate(m)},onComplete:()=>{f.onComplete&&f.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Dv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:m,target:p,layout:g,latestValues:b}=f;if(!(!m||!p||!g)){if(this!==f&&this.layout&&g&&bg(this.options.animationType,this.layout.layoutBox,g.layoutBox)){p=this.target||ae();const S=$e(this.layout.layoutBox.x);p.x.min=f.target.x.min,p.x.max=p.x.min+S;const x=$e(this.layout.layoutBox.y);p.y.min=f.target.y.min,p.y.max=p.y.min+x}dn(m,p),Ii(m,b),Ps(this.projectionDeltaWithTransform,this.layoutCorrected,m,b)}}registerSharedNode(f,m){this.sharedNodes.has(f)||this.sharedNodes.set(f,new C_),this.sharedNodes.get(f).add(m);const g=m.options.initialPromotionConfig;m.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(m):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){var f;const{layoutId:m}=this.options;return m?((f=this.getStack())===null||f===void 0?void 0:f.lead)||this:this}getPrevLead(){var f;const{layoutId:m}=this.options;return m?(f=this.getStack())===null||f===void 0?void 0:f.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:m,preserveFollowOpacity:p}={}){const g=this.getStack();g&&g.promote(this,p),f&&(this.projectionDelta=void 0,this.needsReset=!0),m&&this.setOptions({transition:m})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let m=!1;const{latestValues:p}=f;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(m=!0),!m)return;const g={};p.z&&vc("z",f,g,this.animationValues);for(let b=0;b<pc.length;b++)vc(`rotate${pc[b]}`,f,g,this.animationValues),vc(`skew${pc[b]}`,f,g,this.animationValues);f.render();for(const b in g)f.setStaticValue(b,g[b]),this.animationValues&&(this.animationValues[b]=g[b]);f.scheduleRender()}getProjectionStyles(f){var m,p;if(!this.instance||this.isSVG)return;if(!this.isVisible)return N_;const g={visibility:""},b=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=No(f==null?void 0:f.pointerEvents)||"",g.transform=b?b(this.latestValues,""):"none",g;const S=this.getLead();if(!this.projectionDelta||!this.layout||!S.target){const w={};return this.options.layoutId&&(w.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,w.pointerEvents=No(f==null?void 0:f.pointerEvents)||""),this.hasProjected&&!Wa(this.latestValues)&&(w.transform=b?b({},""):"none",this.hasProjected=!1),w}const x=S.animationValues||S.latestValues;this.applyTransformsToTarget(),g.transform=D_(this.projectionDeltaWithTransform,this.treeScale,x),b&&(g.transform=b(x,g.transform));const{x:j,y:O}=this.projectionDelta;g.transformOrigin=`${j.origin*100}% ${O.origin*100}% 0`,S.animationValues?g.opacity=S===this?(p=(m=x.opacity)!==null&&m!==void 0?m:this.latestValues.opacity)!==null&&p!==void 0?p:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:g.opacity=S===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const w in Ro){if(x[w]===void 0)continue;const{correct:Z,applyTo:X}=Ro[w],F=g.transform==="none"?x[w]:Z(x[w],S);if(X){const L=X.length;for(let R=0;R<L;R++)g[X[R]]=F}else g[w]=F}return this.options.layoutId&&(g.pointerEvents=S===this?No(f==null?void 0:f.pointerEvents)||"":"none"),g}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>{var m;return(m=f.currentAnimation)===null||m===void 0?void 0:m.stop()}),this.root.nodes.forEach(Nv),this.root.sharedNodes.clear()}}}function k_(a){a.updateLayout()}function O_(a){var s;const o=((s=a.resumeFrom)===null||s===void 0?void 0:s.snapshot)||a.snapshot;if(a.isLead()&&a.layout&&o&&a.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:c}=a.layout,{animationType:h}=a.options,f=o.source!==a.layout.source;h==="size"?hn(S=>{const x=f?o.measuredBox[S]:o.layoutBox[S],j=$e(x);x.min=r[S].min,x.max=x.min+j}):bg(h,o.layoutBox,r)&&hn(S=>{const x=f?o.measuredBox[S]:o.layoutBox[S],j=$e(r[S]);x.max=x.min+j,a.relativeTarget&&!a.currentAnimation&&(a.isProjectionDirty=!0,a.relativeTarget[S].max=a.relativeTarget[S].min+j)});const m=Qi();Ps(m,r,o.layoutBox);const p=Qi();f?Ps(p,a.applyTransform(c,!0),o.measuredBox):Ps(p,r,o.layoutBox);const g=!pg(m);let b=!1;if(!a.resumeFrom){const S=a.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:x,layout:j}=S;if(x&&j){const O=ae();$s(O,o.layoutBox,x.layoutBox);const w=ae();$s(w,r,j.layoutBox),vg(O,w)||(b=!0),S.options.layoutRoot&&(a.relativeTarget=w,a.relativeTargetOrigin=O,a.relativeParent=S)}}}a.notifyListeners("didUpdate",{layout:r,snapshot:o,delta:p,layoutDelta:m,hasLayoutChanged:g,hasRelativeTargetChanged:b})}else if(a.isLead()){const{onExitComplete:r}=a.options;r&&r()}a.options.transition=void 0}function R_(a){Qs&&ti.totalNodes++,a.parent&&(a.isProjecting()||(a.isProjectionDirty=a.parent.isProjectionDirty),a.isSharedProjectionDirty||(a.isSharedProjectionDirty=!!(a.isProjectionDirty||a.parent.isProjectionDirty||a.parent.isSharedProjectionDirty)),a.isTransformDirty||(a.isTransformDirty=a.parent.isTransformDirty))}function w_(a){a.isProjectionDirty=a.isSharedProjectionDirty=a.isTransformDirty=!1}function z_(a){a.clearSnapshot()}function Nv(a){a.clearMeasurements()}function B_(a){a.isLayoutDirty=!1}function V_(a){const{visualElement:s}=a.options;s&&s.getProps().onBeforeLayoutMeasure&&s.notify("BeforeLayoutMeasure"),a.resetTransform()}function Mv(a){a.finishAnimation(),a.targetDelta=a.relativeTarget=a.target=void 0,a.isProjectionDirty=!0}function U_(a){a.resolveTargetDelta()}function L_(a){a.calcProjection()}function H_(a){a.resetSkewAndRotation()}function q_(a){a.removeLeadSnapshot()}function kv(a,s,o){a.translate=Ft(s.translate,0,o),a.scale=Ft(s.scale,1,o),a.origin=s.origin,a.originPoint=s.originPoint}function Ov(a,s,o,r){a.min=Ft(s.min,o.min,r),a.max=Ft(s.max,o.max,r)}function G_(a,s,o,r){Ov(a.x,s.x,o.x,r),Ov(a.y,s.y,o.y,r)}function Y_(a){return a.animationValues&&a.animationValues.opacityExit!==void 0}const X_={duration:.45,ease:[.4,0,.1,1]},Rv=a=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(a),wv=Rv("applewebkit/")&&!Rv("chrome/")?Math.round:Pe;function zv(a){a.min=wv(a.min),a.max=wv(a.max)}function Z_(a){zv(a.x),zv(a.y)}function bg(a,s,o){return a==="position"||a==="preserve-aspect"&&!Jx(jv(s),jv(o),.2)}function K_(a){var s;return a!==a.root&&((s=a.scroll)===null||s===void 0?void 0:s.wasRoot)}const Q_=yg({attachResizeListener:(a,s)=>al(a,"resize",s),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),gc={current:void 0},Sg=yg({measureScroll:a=>({x:a.scrollLeft,y:a.scrollTop}),defaultParent:()=>{if(!gc.current){const a=new Q_({});a.mount(window),a.setOptions({layoutScroll:!0}),gc.current=a}return gc.current},resetTransform:(a,s)=>{a.style.transform=s!==void 0?s:"none"},checkIsScrollRoot:a=>window.getComputedStyle(a).position==="fixed"}),J_={pan:{Feature:c_},drag:{Feature:u_,ProjectionNode:Sg,MeasureLayout:dg}};function I_(a,s,o){var r;if(a instanceof Element)return[a];if(typeof a=="string"){let c=document;const h=(r=void 0)!==null&&r!==void 0?r:c.querySelectorAll(a);return h?Array.from(h):[]}return Array.from(a)}function Tg(a,s){const o=I_(a),r=new AbortController,c={passive:!0,...s,signal:r.signal};return[o,c,()=>r.abort()]}function Bv(a){return s=>{s.pointerType==="touch"||ng()||a(s)}}function F_(a,s,o={}){const[r,c,h]=Tg(a,o),f=Bv(m=>{const{target:p}=m,g=s(m);if(typeof g!="function"||!p)return;const b=Bv(S=>{g(S),p.removeEventListener("pointerleave",b)});p.addEventListener("pointerleave",b,c)});return r.forEach(m=>{m.addEventListener("pointerenter",f,c)}),h}function Vv(a,s,o){const{props:r}=a;a.animationState&&r.whileHover&&a.animationState.setActive("whileHover",o==="Start");const c="onHover"+o,h=r[c];h&&Jt.postRender(()=>h(s,ol(s)))}class P_ extends Ca{mount(){const{current:s}=this.node;s&&(this.unmount=F_(s,o=>(Vv(this.node,o,"Start"),r=>Vv(this.node,r,"End"))))}unmount(){}}class $_ extends Ca{constructor(){super(...arguments),this.isActive=!1}onFocus(){let s=!1;try{s=this.node.current.matches(":focus-visible")}catch{s=!0}!s||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ll(al(this.node.current,"focus",()=>this.onFocus()),al(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const xg=(a,s)=>s?a===s?!0:xg(a,s.parentElement):!1,W_=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function t2(a){return W_.has(a.tagName)||a.tabIndex!==-1}const Js=new WeakSet;function Uv(a){return s=>{s.key==="Enter"&&a(s)}}function yc(a,s){a.dispatchEvent(new PointerEvent("pointer"+s,{isPrimary:!0,bubbles:!0}))}const e2=(a,s)=>{const o=a.currentTarget;if(!o)return;const r=Uv(()=>{if(Js.has(o))return;yc(o,"down");const c=Uv(()=>{yc(o,"up")}),h=()=>yc(o,"cancel");o.addEventListener("keyup",c,s),o.addEventListener("blur",h,s)});o.addEventListener("keydown",r,s),o.addEventListener("blur",()=>o.removeEventListener("keydown",r),s)};function Lv(a){return Tf(a)&&!ng()}function n2(a,s,o={}){const[r,c,h]=Tg(a,o),f=m=>{const p=m.currentTarget;if(!Lv(m)||Js.has(p))return;Js.add(p);const g=s(m),b=(j,O)=>{window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",x),!(!Lv(j)||!Js.has(p))&&(Js.delete(p),typeof g=="function"&&g(j,{success:O}))},S=j=>{b(j,o.useGlobalTarget||xg(p,j.target))},x=j=>{b(j,!1)};window.addEventListener("pointerup",S,c),window.addEventListener("pointercancel",x,c)};return r.forEach(m=>{!t2(m)&&m.getAttribute("tabindex")===null&&(m.tabIndex=0),(o.useGlobalTarget?window:m).addEventListener("pointerdown",f,c),m.addEventListener("focus",g=>e2(g,c),c)}),h}function Hv(a,s,o){const{props:r}=a;a.animationState&&r.whileTap&&a.animationState.setActive("whileTap",o==="Start");const c="onTap"+(o==="End"?"":o),h=r[c];h&&Jt.postRender(()=>h(s,ol(s)))}class a2 extends Ca{mount(){const{current:s}=this.node;s&&(this.unmount=n2(s,o=>(Hv(this.node,o,"Start"),(r,{success:c})=>Hv(this.node,r,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Bc=new WeakMap,bc=new WeakMap,i2=a=>{const s=Bc.get(a.target);s&&s(a)},s2=a=>{a.forEach(i2)};function l2({root:a,...s}){const o=a||document;bc.has(o)||bc.set(o,{});const r=bc.get(o),c=JSON.stringify(s);return r[c]||(r[c]=new IntersectionObserver(s2,{root:a,...s})),r[c]}function o2(a,s,o){const r=l2(s);return Bc.set(a,o),r.observe(a),()=>{Bc.delete(a),r.unobserve(a)}}const r2={some:0,all:1};class u2 extends Ca{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:s={}}=this.node.getProps(),{root:o,margin:r,amount:c="some",once:h}=s,f={root:o?o.current:void 0,rootMargin:r,threshold:typeof c=="number"?c:r2[c]},m=p=>{const{isIntersecting:g}=p;if(this.isInView===g||(this.isInView=g,h&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:b,onViewportLeave:S}=this.node.getProps(),x=g?b:S;x&&x(p)};return o2(this.node.current,f,m)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:s,prevProps:o}=this.node;["amount","margin","root"].some(c2(s,o))&&this.startObserver()}unmount(){}}function c2({viewport:a={}},{viewport:s={}}={}){return o=>a[o]!==s[o]}const f2={inView:{Feature:u2},tap:{Feature:a2},focus:{Feature:$_},hover:{Feature:P_}},d2={layout:{ProjectionNode:Sg,MeasureLayout:dg}},Vc={current:null},_g={current:!1};function h2(){if(_g.current=!0,!!Yc)if(window.matchMedia){const a=window.matchMedia("(prefers-reduced-motion)"),s=()=>Vc.current=a.matches;a.addListener(s),s()}else Vc.current=!1}const m2=[...X0,Ce,ja],p2=a=>m2.find(Y0(a)),qv=new WeakMap;function v2(a,s,o){for(const r in s){const c=s[r],h=o[r];if(De(c))a.addValue(r,c);else if(De(h))a.addValue(r,el(c,{owner:a}));else if(h!==c)if(a.hasValue(r)){const f=a.getValue(r);f.liveStyle===!0?f.jump(c):f.hasAnimated||f.set(c)}else{const f=a.getStaticValue(r);a.addValue(r,el(f!==void 0?f:c,{owner:a}))}}for(const r in o)s[r]===void 0&&a.removeValue(r);return s}const Gv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class g2{scrapeMotionValuesFromProps(s,o,r){return{}}constructor({parent:s,props:o,presenceContext:r,reducedMotionConfig:c,blockInitialAnimation:h,visualState:f},m={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=gf,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 j=Mn.now();this.renderScheduledAt<j&&(this.renderScheduledAt=j,Jt.render(this.render,!1,!0))};const{latestValues:p,renderState:g,onUpdate:b}=f;this.onUpdate=b,this.latestValues=p,this.baseTarget={...p},this.initialValues=o.initial?{...p}:{},this.renderState=g,this.parent=s,this.props=o,this.presenceContext=r,this.depth=s?s.depth+1:0,this.reducedMotionConfig=c,this.options=m,this.blockInitialAnimation=!!h,this.isControllingVariants=Yo(o),this.isVariantNode=n0(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(s&&s.current);const{willChange:S,...x}=this.scrapeMotionValuesFromProps(o,{},this);for(const j in x){const O=x[j];p[j]!==void 0&&De(O)&&O.set(p[j],!1)}}mount(s){this.current=s,qv.set(s,this),this.projection&&!this.projection.instance&&this.projection.mount(s),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,r)=>this.bindToMotionValue(r,o)),_g.current||h2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Vc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){qv.delete(this.current),this.projection&&this.projection.unmount(),Ea(this.notifyUpdate),Ea(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const o=this.features[s];o&&(o.unmount(),o.isMounted=!1)}this.current=null}bindToMotionValue(s,o){this.valueSubscriptions.has(s)&&this.valueSubscriptions.get(s)();const r=ii.has(s),c=o.on("change",m=>{this.latestValues[s]=m,this.props.onUpdate&&Jt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),h=o.on("renderRequest",this.scheduleRender);let f;window.MotionCheckAppearSync&&(f=window.MotionCheckAppearSync(this,s,o)),this.valueSubscriptions.set(s,()=>{c(),h(),f&&f(),o.owner&&o.stop()})}sortNodePosition(s){return!this.current||!this.sortInstanceNodePosition||this.type!==s.type?0:this.sortInstanceNodePosition(this.current,s.current)}updateFeatures(){let s="animation";for(s in Fi){const o=Fi[s];if(!o)continue;const{isEnabled:r,Feature:c}=o;if(!this.features[s]&&c&&r(this.props)&&(this.features[s]=new c(this)),this.features[s]){const h=this.features[s];h.isMounted?h.update():(h.mount(),h.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ae()}getStaticValue(s){return this.latestValues[s]}setStaticValue(s,o){this.latestValues[s]=o}update(s,o){(s.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=s,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let r=0;r<Gv.length;r++){const c=Gv[r];this.propEventSubscriptions[c]&&(this.propEventSubscriptions[c](),delete this.propEventSubscriptions[c]);const h="on"+c,f=s[h];f&&(this.propEventSubscriptions[c]=this.on(c,f))}this.prevMotionValues=v2(this,this.scrapeMotionValuesFromProps(s,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(s){return this.props.variants?this.props.variants[s]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(s){const o=this.getClosestVariantNode();if(o)return o.variantChildren&&o.variantChildren.add(s),()=>o.variantChildren.delete(s)}addValue(s,o){const r=this.values.get(s);o!==r&&(r&&this.removeValue(s),this.bindToMotionValue(s,o),this.values.set(s,o),this.latestValues[s]=o.get())}removeValue(s){this.values.delete(s);const o=this.valueSubscriptions.get(s);o&&(o(),this.valueSubscriptions.delete(s)),delete this.latestValues[s],this.removeValueFromRenderState(s,this.renderState)}hasValue(s){return this.values.has(s)}getValue(s,o){if(this.props.values&&this.props.values[s])return this.props.values[s];let r=this.values.get(s);return r===void 0&&o!==void 0&&(r=el(o===null?void 0:o,{owner:this}),this.addValue(s,r)),r}readValue(s,o){var r;let c=this.latestValues[s]!==void 0||!this.current?this.latestValues[s]:(r=this.getBaseTargetFromProps(this.props,s))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,s,this.options);return c!=null&&(typeof c=="string"&&(q0(c)||O0(c))?c=parseFloat(c):!p2(c)&&ja.test(o)&&(c=U0(s,o)),this.setBaseTarget(s,De(c)?c.get():c)),De(c)?c.get():c}setBaseTarget(s,o){this.baseTarget[s]=o}getBaseTarget(s){var o;const{initial:r}=this.props;let c;if(typeof r=="string"||typeof r=="object"){const f=Fc(this.props,r,(o=this.presenceContext)===null||o===void 0?void 0:o.custom);f&&(c=f[s])}if(r&&c!==void 0)return c;const h=this.getBaseTargetFromProps(this.props,s);return h!==void 0&&!De(h)?h:this.initialValues[s]!==void 0&&c===void 0?void 0:this.baseTarget[s]}on(s,o){return this.events[s]||(this.events[s]=new rf),this.events[s].add(o)}notify(s,...o){this.events[s]&&this.events[s].notify(...o)}}class Ag extends g2{constructor(){super(...arguments),this.KeyframeResolver=Z0}sortInstanceNodePosition(s,o){return s.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(s,o){return s.style?s.style[o]:void 0}removeValueFromRenderState(s,{vars:o,style:r}){delete o[s],delete r[s]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:s}=this.props;De(s)&&(this.childSubscription=s.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}}function y2(a){return window.getComputedStyle(a)}class b2 extends Ag{constructor(){super(...arguments),this.type="html",this.renderInstance=f0}readValueFromInstance(s,o){if(ii.has(o)){const r=vf(o);return r&&r.default||0}else{const r=y2(s),c=(r0(o)?r.getPropertyValue(o):r[o])||0;return typeof c=="string"?c.trim():c}}measureInstanceViewportBox(s,{transformPagePoint:o}){return cg(s,o)}build(s,o,r){Wc(s,o,r.transformTemplate)}scrapeMotionValuesFromProps(s,o,r){return af(s,o,r)}}class S2 extends Ag{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ae}getBaseTargetFromProps(s,o){return s[o]}readValueFromInstance(s,o){if(ii.has(o)){const r=vf(o);return r&&r.default||0}return o=d0.has(o)?o:Qc(o),s.getAttribute(o)}scrapeMotionValuesFromProps(s,o,r){return p0(s,o,r)}build(s,o,r){tf(s,o,this.isSVGTag,r.transformTemplate)}renderInstance(s,o,r,c){h0(s,o,r,c)}mount(s){this.isSVGTag=nf(s.tagName),super.mount(s)}}const T2=(a,s)=>Ic(a)?new S2(s):new b2(s,{allowProjection:a!==_.Fragment}),x2=QS({...Ux,...f2,...J_,...d2},T2),ni=rS(x2),_2="_container_33dc5_1",A2="_header_33dc5_5",E2="_addButton_33dc5_17",j2="_createForm_33dc5_35",C2="_createInput_33dc5_41",D2="_createButton_33dc5_71",N2="_emptyState_33dc5_101",M2="_projectRow_33dc5_107",k2="_selected_33dc5_127",O2="_expandArrow_33dc5_134",R2="_expanded_33dc5_141",w2="_projectName_33dc5_145",z2="_taskCount_33dc5_149",B2="_newTaskButton_33dc5_155",V2="_taskRow_33dc5_173",U2="_taskStatusIcon_33dc5_202",L2="_taskTitle_33dc5_206",H2="_dependencyBadge_33dc5_213",q2="_blockedBadge_33dc5_225",G2="_leafSpacer_33dc5_230",Y2="_childCountBadge_33dc5_235",X2="_addChildButton_33dc5_248",Z2="_emptyTasks_33dc5_277",Zt={container:_2,header:A2,addButton:E2,createForm:j2,createInput:C2,createButton:D2,emptyState:N2,projectRow:M2,selected:k2,expandArrow:O2,expanded:R2,projectName:w2,taskCount:z2,newTaskButton:B2,taskRow:V2,taskStatusIcon:U2,taskTitle:L2,dependencyBadge:H2,blockedBadge:q2,leafSpacer:G2,childCountBadge:Y2,addChildButton:X2,emptyTasks:Z2},Yv={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},waiting:{color:"var(--accent-purple, #a78bfa)",icon:"⧖"}};function K2(a){const s=new Map(a.map(r=>[r.id,{...r,children:[]}])),o=[];for(const r of s.values())r.parentTaskId&&s.has(r.parentTaskId)?s.get(r.parentTaskId).children.push(r):o.push(r);for(const r of s.values())r.children.sort((c,h)=>c.sortOrder-h.sortOrder);return o.sort((r,c)=>r.sortOrder-c.sortOrder)}const Q2=34,J2=16,I2=5;function Eg({node:a,depth:s,expandedTasks:o,toggleTask:r,selectedTaskId:c,setViewMode:h,projectId:f,taskStatusById:m}){const p=Yv[a.status]||Yv.pending,g=a.dependsOn.length>0&&a.dependsOn.some(O=>m.get(O)!=="done"),b=o.has(a.id),S=a.children.length>0,x=c===a.id,j=Q2+s*J2;return y.jsxs(y.Fragment,{children:[y.jsxs("div",{onClick:()=>h({kind:"task",taskId:a.id}),className:`${Zt.taskRow} ${x?Zt.selected:""}`,style:{paddingLeft:j},"data-task-id":a.id,children:[S&&y.jsx("span",{className:`${Zt.expandArrow} ${b?Zt.expanded:""}`,role:"button",tabIndex:0,"aria-label":b?"Collapse task":"Expand task",onClick:O=>{O.stopPropagation(),r(a.id)},onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),O.stopPropagation(),r(a.id))},children:"▸"}),!S&&y.jsx("span",{className:Zt.leafSpacer}),y.jsx("span",{className:Zt.taskStatusIcon,style:{color:p.color},children:p.icon}),y.jsx("span",{className:Zt.taskTitle,children:a.title}),S&&y.jsxs("span",{className:Zt.childCountBadge,children:[a.children.filter(O=>O.status==="done").length,"/",a.children.length]}),a.dependsOn.length>0&&y.jsx("span",{className:`${Zt.dependencyBadge} ${g?Zt.blockedBadge:""}`,title:`Depends on: ${a.dependsOn.join(", ")}`,children:g?"blocked":"dep"}),s<I2&&y.jsx("button",{onClick:O=>{O.stopPropagation(),h({kind:"new_task",projectId:f,parentTaskId:a.id})},title:"Add child task","aria-label":"Add child task",className:Zt.addChildButton,children:"+"})]}),y.jsx(Xc,{children:S&&b&&y.jsx(ni.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:a.children.map(O=>y.jsx(Eg,{node:O,depth:s+1,expandedTasks:o,toggleTask:r,selectedTaskId:c,setViewMode:h,projectId:f,taskStatusById:m},O.id))})})]})}function F2({viewMode:a,setViewMode:s}){const{projects:o,tasks:r,loadTasks:c,createProject:h}=$n(),[f,m]=_.useState(new Set),[p,g]=_.useState(new Set),[b,S]=_.useState(new Set),[x,j]=_.useState(!1),[O,w]=_.useState(""),Z=a.kind==="project"?a.projectId:void 0,X=a.kind==="task"?a.taskId:void 0,F=_.useMemo(()=>new Map(r.map(H=>[H.id,H.status])),[r]),L=H=>{m(I=>{const B=new Set(I);return B.has(H)?B.delete(H):(B.add(H),c(H)),B})},R=H=>{g(I=>{const B=new Set(I);return B.has(H)?(B.delete(H),S(nt=>new Set(nt).add(H))):(B.add(H),S(nt=>{const ct=new Set(nt);return ct.delete(H),ct})),B})};_.useEffect(()=>{const H=new Set(r.filter(I=>I.parentTaskId).map(I=>I.parentTaskId));H.size>0&&g(I=>{const B=new Set(I);for(const nt of H)b.has(nt)||B.add(nt);return B})},[r,b]),_.useEffect(()=>{Z&&!f.has(Z)&&(m(H=>new Set(H).add(Z)),c(Z))},[Z,f,c]);const Y=()=>{O.trim()&&(h(O.trim()),w(""),j(!1))};return y.jsxs("div",{className:Zt.container,children:[y.jsxs("div",{className:Zt.header,children:[y.jsx("span",{children:"Projects"}),y.jsx("button",{className:Zt.addButton,onClick:()=>j(!x),"aria-label":"Create project",title:"Create project",children:"+"})]}),x&&y.jsxs("div",{className:Zt.createForm,children:[y.jsx("input",{type:"text",value:O,onChange:H=>w(H.target.value),onKeyDown:H=>H.key==="Enter"&&Y(),placeholder:"Project name...",autoFocus:!0,className:Zt.createInput}),y.jsx("button",{onClick:Y,className:Zt.createButton,children:"OK"})]}),o.length===0&&!x&&y.jsx("div",{className:Zt.emptyState,children:"No projects. Click + to create one."}),o.map(H=>{const I=f.has(H.id),B=r.filter(st=>st.projectId===H.id),nt=Z===H.id,ct=I?K2(B):[];return y.jsxs("div",{children:[y.jsxs("div",{onClick:()=>{L(H.id),s({kind:"project",projectId:H.id})},className:`${Zt.projectRow} ${nt?Zt.selected:""}`,children:[y.jsx("span",{className:`${Zt.expandArrow} ${I?Zt.expanded:""}`,children:"▸"}),y.jsx("span",{className:Zt.projectName,children:H.name}),y.jsx("span",{className:Zt.taskCount,children:B.length>0&&`${B.filter(st=>st.status==="done").length}/${B.length}`}),y.jsx("button",{onClick:st=>{st.stopPropagation(),s({kind:"new_task",projectId:H.id})},title:"New task",className:Zt.newTaskButton,children:"+"})]}),y.jsx(Xc,{children:I&&y.jsxs(ni.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:[ct.map(st=>y.jsx(Eg,{node:st,depth:0,expandedTasks:p,toggleTask:R,selectedTaskId:X,setViewMode:s,projectId:H.id,taskStatusById:F},st.id)),B.length===0&&y.jsx("div",{className:Zt.emptyTasks,children:"No tasks yet"})]})})]},H.id)})]})}const P2="_container_v2rs3_1",$2="_tabBar_v2rs3_28",W2="_tab_v2rs3_28",tA="_active_v2rs3_54",eA="_content_v2rs3_60",$a={container:P2,tabBar:$2,tab:W2,active:tA,content:eA},nA=260,jg=180,Cg=500,Dg="grackle-sidebar-width";function aA(){try{const a=localStorage.getItem(Dg);if(a!==null){const s=Number(a);if(Number.isFinite(s)&&s>=jg&&s<=Cg)return s}}catch{}return nA}function iA(a){try{localStorage.setItem(Dg,String(a))}catch{}}function sA({viewMode:a,setViewMode:s}){const[o,r]=_.useState("projects"),[c]=_.useState(aA),h=_.useRef(null);return _.useEffect(()=>{const f=h.current;if(!f)return;const m=new ResizeObserver(p=>{for(const g of p){const b=g.borderBoxSize[0];if(b){const S=Math.round(b.inlineSize);S>=jg&&S<=Cg&&iA(S)}}});return m.observe(f),()=>{m.disconnect()}},[]),y.jsxs("div",{className:$a.container,ref:h,"data-testid":"sidebar",style:{width:c},children:[y.jsxs("div",{className:$a.tabBar,children:[y.jsx("button",{className:`${$a.tab} ${o==="projects"?$a.active:""}`,onClick:()=>r("projects"),children:"Projects"}),y.jsx("button",{className:`${$a.tab} ${o==="environments"?$a.active:""}`,onClick:()=>r("environments"),children:"Environments"})]}),y.jsx("div",{className:$a.content,children:o==="projects"?y.jsx(F2,{viewMode:a,setViewMode:s}):y.jsx(Fb,{viewMode:a,setViewMode:s})})]})}const lA="_bar_yszm0_1",oA="_barColumn_yszm0_25",rA="_barRow_yszm0_50",uA="_input_yszm0_56",cA="_inputSmall_yszm0_84",fA="_textarea_yszm0_113",dA="_select_yszm0_145",hA="_btnPrimary_yszm0_174",mA="_btnDanger_yszm0_200",pA="_btnGhost_yszm0_232",vA="_badge_yszm0_245",gA="_statusText_yszm0_255",yA="_statusCompleted_yszm0_260",bA="_statusFailed_yszm0_264",SA="_statusBlocked_yszm0_268",TA="_hintText_yszm0_273",xA="_creatingHint_yszm0_278",_A="_errorHint_yszm0_284",$={bar:lA,barColumn:oA,barRow:rA,input:uA,inputSmall:cA,textarea:fA,select:dA,btnPrimary:hA,btnDanger:mA,btnGhost:pA,badge:vA,statusText:gA,statusCompleted:yA,statusFailed:bA,statusBlocked:SA,hintText:TA,creatingHint:xA,errorHint:_A};function Xv({value:a,onChange:s}){return y.jsxs("select",{value:a,onChange:o=>s(o.target.value),className:$.select,children:[y.jsx("option",{value:"claude-code",children:"claude-code"}),y.jsx("option",{value:"codex",children:"codex"}),y.jsx("option",{value:"copilot",children:"copilot"}),y.jsx("option",{value:"stub",children:"stub"})]})}function AA({viewMode:a,setViewMode:s}){const{spawn:o,sendInput:r,kill:c,sessions:h,tasks:f,environments:m,createTask:p,startTask:g,approveTask:b,rejectTask:S,deleteTask:x,addEnvironment:j,codespaces:O,codespaceError:w,codespaceCreating:Z,listCodespaces:X,createCodespace:F}=$n(),[L,R]=_.useState(""),[Y,H]=_.useState(a.kind==="new_chat"?a.runtime:"claude-code"),[I,B]=_.useState(""),[nt,ct]=_.useState(""),[st,ft]=_.useState(""),[gt,Ct]=_.useState(""),[Yt,A]=_.useState(""),[G,et]=_.useState("local"),[yt,bt]=_.useState("claude-code"),[Ht,Dt]=_.useState(""),[mt,qt]=_.useState(""),[ce,_e]=_.useState(""),[Le,We]=_.useState(""),[Ne,mn]=_.useState(""),[He,qe]=_.useState(""),[pn,Me]=_.useState(""),[Ge,tn]=_.useState(""),[K,at]=_.useState("pick");_.useEffect(()=>{a.kind==="new_chat"&&H(a.runtime)},[a]);const W=a.kind==="session"?h.find(q=>q.id===a.sessionId):void 0,J=a.kind==="task"?f.find(q=>q.id===a.taskId):void 0,St=J!=null&&J.sessionId?h.find(q=>q.id===J.sessionId):void 0,kt=J?J.dependsOn.some(q=>{const P=f.find(Q=>Q.id===q);return P&&P.status!=="done"}):!1;if(a.kind==="empty")return y.jsx("div",{className:$.bar,children:y.jsx("span",{className:$.hintText,children:"Select a session or click + to start"})});if(a.kind==="new_environment"){const q=()=>!(!Yt.trim()||G==="ssh"&&!Ht.trim()||G==="codespace"&&!He.trim()),P=()=>{if(!q())return;const Q={};if(G==="local"){if(Ht.trim()&&(Q.host=Ht.trim()),mt.trim()){const Tt=parseInt(mt,10);Number.isFinite(Tt)&&(Q.port=Tt)}}else if(G==="ssh"){if(Q.host=Ht.trim(),ce.trim()&&(Q.user=ce.trim()),mt.trim()){const Tt=parseInt(mt,10);Number.isFinite(Tt)&&(Q.sshPort=Tt)}pn.trim()&&(Q.identityFile=pn.trim())}else G==="docker"?(Le.trim()&&(Q.image=Le.trim()),Ne.trim()&&(Q.repo=Ne.trim())):G==="codespace"&&(Q.codespaceName=He.trim());j(Yt.trim(),G,Q,yt),A(""),et("local"),bt("claude-code"),Dt(""),qt(""),_e(""),We(""),mn(""),qe(""),Me(""),tn(""),at("pick"),s({kind:"empty"})};return y.jsxs("div",{className:$.barColumn,children:[y.jsxs("div",{className:$.barRow,children:[y.jsx("span",{className:$.badge,children:"new env"}),y.jsx("input",{type:"text",value:Yt,onChange:Q=>A(Q.target.value),placeholder:"Environment name...",autoFocus:!0,className:$.input}),y.jsxs("select",{value:G,onChange:Q=>{et(Q.target.value),Q.target.value==="codespace"&&(X(),at("pick"),qe(""))},className:$.select,children:[y.jsx("option",{value:"local",children:"local"}),y.jsx("option",{value:"ssh",children:"ssh"}),y.jsx("option",{value:"docker",children:"docker"}),y.jsx("option",{value:"codespace",children:"codespace"})]}),y.jsx(Xv,{value:yt,onChange:bt}),y.jsx("button",{onClick:P,disabled:!q(),className:$.btnPrimary,children:"Add"})]}),y.jsxs("div",{className:$.barRow,children:[G==="local"&&y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"text",value:Ht,onChange:Q=>Dt(Q.target.value),placeholder:"Host (optional)...",className:$.inputSmall}),y.jsx("input",{type:"text",value:mt,onChange:Q=>qt(Q.target.value),placeholder:"Port (optional)...",className:$.inputSmall})]}),G==="ssh"&&y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"text",value:Ht,onChange:Q=>Dt(Q.target.value),placeholder:"Host (required)...",className:$.inputSmall}),y.jsx("input",{type:"text",value:ce,onChange:Q=>_e(Q.target.value),placeholder:"User (optional)...",className:$.inputSmall}),y.jsx("input",{type:"text",value:mt,onChange:Q=>qt(Q.target.value),placeholder:"SSH port (optional)...",className:$.inputSmall}),y.jsx("input",{type:"text",value:pn,onChange:Q=>Me(Q.target.value),placeholder:"Identity file (optional)...",className:$.inputSmall})]}),G==="docker"&&y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"text",value:Le,onChange:Q=>We(Q.target.value),placeholder:"Image (optional)...",className:$.inputSmall}),y.jsx("input",{type:"text",value:Ne,onChange:Q=>mn(Q.target.value),placeholder:"Repo (optional)...",className:$.inputSmall})]}),G==="codespace"&&K==="pick"&&y.jsxs(y.Fragment,{children:[y.jsxs("select",{value:He,onChange:Q=>{Q.target.value==="__create__"?(at("create"),qe("")):(qe(Q.target.value),Q.target.value&&!Yt.trim()&&A(Q.target.value))},disabled:Z,className:$.select,children:[y.jsx("option",{value:"",children:"Select a codespace..."}),O.map(Q=>y.jsxs("option",{value:Q.name,children:[Q.name," (",Q.repository,") — ",Q.state]},Q.name)),y.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),Z&&y.jsx("span",{className:$.creatingHint,children:"Creating codespace..."}),w&&y.jsx("span",{className:$.errorHint,children:w})]}),G==="codespace"&&K==="create"&&y.jsxs(y.Fragment,{children:[y.jsx("input",{type:"text",value:Ge,onChange:Q=>tn(Q.target.value),placeholder:"owner/repo",className:$.inputSmall}),y.jsx("button",{onClick:()=>{Ge.trim()&&(F(Ge.trim()),at("pick"),tn(""))},disabled:!Ge.trim(),className:$.btnPrimary,children:"Create"}),y.jsx("button",{onClick:()=>{at("pick"),tn("")},className:$.btnGhost,children:"Cancel"})]})]})]})}if(a.kind==="project")return y.jsx("div",{className:$.bar,children:y.jsx("span",{className:$.hintText,children:"Select a task or click + to create one"})});if(a.kind==="new_task"){const q=P=>{I.trim()&&(p(a.projectId,I.trim(),nt,st,void 0,a.parentTaskId),B(""),ct(""),ft(""),s({kind:"project",projectId:a.projectId}))};return y.jsxs("div",{className:$.barColumn,children:[y.jsxs("div",{className:$.barRow,children:[y.jsx("span",{className:$.badge,children:a.parentTaskId?"child task":"new task"}),y.jsx("input",{type:"text",value:I,onChange:P=>B(P.target.value),placeholder:"Task title...",autoFocus:!0,className:$.input}),y.jsxs("select",{value:st,onChange:P=>ft(P.target.value),className:$.select,children:[y.jsx("option",{value:"",children:"Default env"}),m.map(P=>y.jsx("option",{value:P.id,children:P.displayName},P.id))]}),y.jsx("button",{onClick:()=>q(),disabled:!I.trim(),className:$.btnPrimary,children:"Create"})]}),y.jsx("textarea",{value:nt,onChange:P=>ct(P.target.value),placeholder:"Description (optional)...",className:$.textarea,rows:3})]})}if(a.kind==="task"&&J){if(J.status==="pending"&&kt){const q=J.dependsOn.map(P=>f.find(Q=>Q.id===P)).filter(P=>P&&P.status!=="done").map(P=>P.title);return y.jsxs("div",{className:$.bar,children:[y.jsxs("span",{className:$.statusBlocked,children:["Blocked by: ",q.join(", ")]}),y.jsx("button",{onClick:()=>{window.confirm(`Delete task "${J.title}"?`)&&(x(J.id),s({kind:"project",projectId:J.projectId}))},className:$.btnDanger,children:"Delete"})]})}if(J.status==="pending"||J.status==="assigned")return y.jsxs("div",{className:$.bar,children:[y.jsx("button",{onClick:()=>g(J.id),className:$.btnPrimary,children:"Start Task"}),y.jsx("button",{onClick:()=>{window.confirm(`Delete task "${J.title}"?`)&&(x(J.id),s({kind:"project",projectId:J.projectId}))},className:$.btnDanger,children:"Delete"})]});if(J.status==="in_progress"){if((St==null?void 0:St.status)==="waiting_input"){const P=Q=>{Q.preventDefault(),!(!L.trim()||!J.sessionId)&&(r(J.sessionId,L),R(""))};return y.jsxs("form",{onSubmit:P,className:$.bar,children:[y.jsx("input",{type:"text",value:L,onChange:Q=>R(Q.target.value),placeholder:"Type a message...",autoFocus:!0,className:$.input}),y.jsx("button",{type:"submit",disabled:!L.trim(),className:$.btnPrimary,children:"Send"}),y.jsx("button",{type:"button",onClick:()=>J.sessionId&&c(J.sessionId),className:$.btnDanger,children:"Stop"})]})}return y.jsxs("div",{className:$.bar,children:[y.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:$.input}),y.jsx("button",{onClick:()=>J.sessionId&&c(J.sessionId),className:$.btnDanger,children:"Stop"})]})}if(J.status==="review")return y.jsxs("div",{className:$.bar,children:[y.jsx("input",{type:"text",value:gt,onChange:q=>Ct(q.target.value),placeholder:"Rejection notes (optional)...",className:$.input}),y.jsx("button",{onClick:()=>{b(J.id)},className:$.btnPrimary,children:"Approve"}),y.jsx("button",{onClick:()=>{S(J.id,gt),Ct("")},className:$.btnDanger,children:"Reject"})]});if(J.status==="done")return y.jsxs("div",{className:$.bar,children:[y.jsx("span",{className:`${$.statusText} ${$.statusCompleted}`,children:"Task completed"}),y.jsx("button",{onClick:()=>s({kind:"new_task",projectId:J.projectId}),className:$.btnPrimary,children:"+ New Task"}),y.jsx("button",{onClick:()=>{window.confirm(`Delete task "${J.title}"?`)&&(x(J.id),s({kind:"project",projectId:J.projectId}))},className:$.btnDanger,children:"Delete"})]});if(J.status==="failed")return y.jsxs("div",{className:$.bar,children:[y.jsx("span",{className:`${$.statusText} ${$.statusFailed}`,children:"Task failed"}),y.jsx("button",{onClick:()=>g(J.id),className:$.btnPrimary,children:"Retry"}),y.jsx("button",{onClick:()=>{window.confirm(`Delete task "${J.title}"?`)&&(x(J.id),s({kind:"project",projectId:J.projectId}))},className:$.btnDanger,children:"Delete"})]})}if(a.kind==="new_chat"){const q=P=>{P.preventDefault(),L.trim()&&(o(a.environmentId,L,void 0,Y),R(""))};return y.jsxs("form",{onSubmit:q,className:$.bar,children:[y.jsx("span",{className:$.badge,children:"new chat"}),y.jsx("input",{type:"text",value:L,onChange:P=>R(P.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:$.input}),y.jsx(Xv,{value:Y,onChange:H}),y.jsx("button",{type:"submit",disabled:!L.trim(),className:$.btnPrimary,children:"Go"})]})}if(a.kind==="session"){const q=(W==null?void 0:W.status)==="running",P=(W==null?void 0:W.status)==="waiting_input",Q=W!==void 0&&["completed","failed","killed"].includes(W.status);if(q)return y.jsxs("div",{className:$.bar,children:[y.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:$.input}),y.jsx("button",{onClick:()=>c(a.sessionId),className:$.btnDanger,title:"Stop session",children:"Stop"})]});if(P){const Tt=Rt=>{Rt.preventDefault(),L.trim()&&(r(a.sessionId,L),R(""))};return y.jsxs("form",{onSubmit:Tt,className:$.bar,children:[y.jsx("input",{type:"text",value:L,onChange:Rt=>R(Rt.target.value),placeholder:"Type a message...",autoFocus:!0,className:$.input}),y.jsx("button",{type:"submit",disabled:!L.trim(),className:$.btnPrimary,children:"Send"}),y.jsx("button",{type:"button",onClick:()=>c(a.sessionId),className:$.btnDanger,title:"Stop session",children:"Stop"})]})}if(Q&&W)return y.jsxs("div",{className:$.bar,children:[y.jsxs("span",{className:`${$.statusText} ${$.hintText}`,children:["Session ",W.status]}),y.jsx("button",{onClick:()=>s({kind:"new_chat",environmentId:W.environmentId,runtime:W.runtime}),className:$.btnPrimary,children:"+ New Chat"})]})}return y.jsx("div",{className:$.bar,children:y.jsx("span",{className:$.hintText,children:"Loading..."})})}function Uc(){Uc=function(c,h){return new o(c,void 0,h)};var a=RegExp.prototype,s=new WeakMap;function o(c,h,f){var m=new RegExp(c,h);return s.set(m,f||s.get(c)),Lo(m,o.prototype)}function r(c,h){var f=s.get(h);return Object.keys(f).reduce(function(m,p){var g=f[p];if(typeof g=="number")m[p]=c[g];else{for(var b=0;c[g[b]]===void 0&&b+1<g.length;)b++;m[p]=c[g[b]]}return m},Object.create(null))}return(function(c,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(h&&h.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),h&&Lo(c,h)})(o,RegExp),o.prototype.exec=function(c){var h=a.exec.call(this,c);if(h){h.groups=r(h,this);var f=h.indices;f&&(f.groups=r(f,this))}return h},o.prototype[Symbol.replace]=function(c,h){if(typeof h=="string"){var f=s.get(this);return a[Symbol.replace].call(this,c,h.replace(/\$<([^>]+)>/g,function(p,g){var b=f[g];return"$"+(Array.isArray(b)?b.join("$"):b)}))}if(typeof h=="function"){var m=this;return a[Symbol.replace].call(this,c,function(){var p=arguments;return typeof p[p.length-1]!="object"&&(p=[].slice.call(p)).push(r(p,m)),h.apply(this,p)})}return a[Symbol.replace].call(this,c,h)},Uc.apply(this,arguments)}function Lo(a,s){return Lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},Lo(a,s)}function Zv(a,s){(s==null||s>a.length)&&(s=a.length);for(var o=0,r=new Array(s);o<s;o++)r[o]=a[o];return r}function Sc(a,s){var o=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(o)return(o=o.call(a)).next.bind(o);if(Array.isArray(a)||(o=(function(c,h){if(c){if(typeof c=="string")return Zv(c,h);var f=Object.prototype.toString.call(c).slice(8,-1);return f==="Object"&&c.constructor&&(f=c.constructor.name),f==="Map"||f==="Set"?Array.from(c):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?Zv(c,h):void 0}})(a))||s){o&&(a=o);var r=0;return function(){return r>=a.length?{done:!0}:{done:!1,value:a[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
138
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var EA=(function(a){return function(s){return s===void 0&&(s={}),(function(r,c){if(c&&!r.registered(c))throw new Error('The default language "'+c+'" is not registered with refractor.')})(a,s.defaultLanguage),function(r){G1(r,"element",o)};function o(r,c,h){var f,m;if(h&&h.tagName==="pre"&&r.tagName==="code"){var p=(r==null||(f=r.data)==null?void 0:f.meta)||(r==null||(m=r.properties)==null?void 0:m.metastring)||"";r.properties.className?typeof r.properties.className=="boolean"?r.properties.className=[]:Array.isArray(r.properties.className)||(r.properties.className=[r.properties.className]):r.properties.className=[];var g,b,S=(function(Y){for(var H,I=Sc(Y.properties.className);!(H=I()).done;){var B=H.value;if(B.slice(0,9)==="language-")return B.slice(9).toLowerCase()}return null})(r);if(!S&&s.defaultLanguage&&r.properties.className.push("language-"+(S=s.defaultLanguage)),r.properties.className.push("code-highlight"),S)try{var x,j;j=(x=S)!=null&&x.includes("diff-")?S.split("-")[1]:S,g=a.highlight(Ao(r),j),h.properties.className=(h.properties.className||[]).concat("language-"+j)}catch(Y){if(!s.ignoreMissing||!/Unknown language/.test(Y.message))throw Y;g=r}else g=r;g.children=(b=1,function Y(H){return H.reduce(function(I,B){if(B.type==="text"){var nt=B.value,ct=(nt.match(/\n/g)||"").length;if(ct===0)B.position={start:{line:b,column:1},end:{line:b,column:1}},I.push(B);else for(var st,ft=nt.split(`
|
|
139
|
-
`),gt=Sc(ft.entries());!(st=gt()).done;){var Ct=st.value,Yt=Ct[0],A=Ct[1];I.push({type:"text",value:Yt===ft.length-1?A:A+`
|
|
140
|
-
`,position:{start:{line:b+Yt,column:1},end:{line:b+Yt,column:1}}})}return b+=ct,I}if(Object.prototype.hasOwnProperty.call(B,"children")){var G=b;return B.children=Y(B.children),I.push(B),B.position={start:{line:G,column:1},end:{line:b,column:1}},I}return I.push(B),I},[])})(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 O,w=(function(Y){var H=/{([\d,-]+)}/,I=Y.split(",").map(function(ct){return ct.trim()}).join();if(H.test(I)){var B=H.exec(I)[1],nt=X1(B);return function(ct){return nt.includes(ct+1)}}return function(){return!1}})(p),Z=(function(Y){var H=Uc(/showLineNumbers=(\d+)/i,{lines:1});if(H.test(Y)){var I=H.exec(Y);return Number(I.groups.lines)}return 1})(p),X=(function(Y){for(var H=new Array(Y),I=0;I<Y;I++)H[I]={type:"element",tagName:"span",properties:{className:[]},children:[]};return H})(g.position.end.line),F=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],L=function(){var Y,H,I=O.value,B=I[0],nt=I[1];nt.properties.className=["code-line"];var ct=Z1(g,function(st){return st.position.start.line<=B+1&&st.position.end.line>=B+1});nt.children=ct.children,(p.toLowerCase().includes("showLineNumbers".toLowerCase())||s.showLineNumbers===!0||typeof s.showLineNumbers=="object"&&s.showLineNumbers.includes(S))&&!F.some(function(st){return p.toLowerCase().includes(st)})&&(nt.properties.line=[(B+Z).toString()],nt.properties.className.push("line-number")),w(B)&&nt.properties.className.push("highlight-line"),(S==="diff"||(Y=S)!=null&&Y.includes("diff-"))&&Ao(nt).substring(0,1)==="-"?nt.properties.className.push("deleted"):(S==="diff"||(H=S)!=null&&H.includes("diff-"))&&Ao(nt).substring(0,1)==="+"&&nt.properties.className.push("inserted")},R=Sc(X.entries());!(O=R()).done;)L();X.length>0&&Ao(X[X.length-1]).trim()===""&&X.pop(),r.children=X}}}})(Y1);const jA="_systemEvent_1ftop_1",CA="_systemTimestamp_1ftop_9",DA="_textEvent_1ftop_13",NA="_toolUseEvent_1ftop_100",MA="_toolUsePrefix_1ftop_116",kA="_toolResultEvent_1ftop_120",OA="_toolResultSummary_1ftop_126",RA="_toolResultPre_1ftop_140",wA="_errorEvent_1ftop_154",zA="_statusEvent_1ftop_163",BA="_defaultEvent_1ftop_173",Tn={systemEvent:jA,systemTimestamp:CA,textEvent:DA,toolUseEvent:NA,toolUsePrefix:MA,toolResultEvent:kA,toolResultSummary:OA,toolResultPre:RA,errorEvent:wA,statusEvent:zA,defaultEvent:BA};function VA({time:a,content:s}){return y.jsxs("div",{className:Tn.systemEvent,children:[y.jsxs("span",{className:Tn.systemTimestamp,children:["[",a,"]"]})," ",s]})}function UA({content:a}){return y.jsx("div",{className:Tn.textEvent,children:y.jsx(K1,{remarkPlugins:[Q1],rehypePlugins:[EA],children:a})})}function LA({content:a}){let s=a;try{const o=JSON.parse(a);s=`${o.tool}: ${JSON.stringify(o.args,null,2)}`}catch{}return y.jsxs("div",{className:Tn.toolUseEvent,children:[y.jsx("span",{className:Tn.toolUsePrefix,children:">"})," ",s]})}function HA({content:a}){return y.jsxs("details",{className:Tn.toolResultEvent,children:[y.jsx("summary",{className:Tn.toolResultSummary,children:"Tool output"}),y.jsx("pre",{className:Tn.toolResultPre,children:a})]})}function qA({content:a}){return y.jsxs("div",{className:Tn.errorEvent,children:["Error: ",a]})}function GA({content:a}){return y.jsxs("div",{className:Tn.statusEvent,children:["--- ",a," ---"]})}function YA({content:a}){return y.jsx("div",{className:Tn.defaultEvent,children:a})}function Ng({event:a}){const s=new Date(a.timestamp).toLocaleTimeString();switch(a.eventType){case"system":return y.jsx(VA,{time:s,content:a.content});case"text":case"output":return y.jsx(UA,{content:a.content});case"tool_use":return y.jsx(LA,{content:a.content});case"tool_result":return y.jsx(HA,{content:a.content});case"error":return y.jsx(qA,{content:a.content});case"status":return y.jsx(GA,{content:a.content});default:return y.jsx(YA,{content:a.content})}}const XA="_container_1e9es_1",ZA="_emptyState_1e9es_7",KA="_errorState_1e9es_13",QA="_statsBar_1e9es_19",JA="_branchName_1e9es_45",IA="_additions_1e9es_50",FA="_deletions_1e9es_54",PA="_fileList_1e9es_58",$A="_fileName_1e9es_68",WA="_diffContent_1e9es_85",tE="_diffLine_1e9es_103",eE="_added_1e9es_112",nE="_removed_1e9es_116",aE="_hunk_1e9es_120",iE="_meta_1e9es_123",sE="_context_1e9es_126",Te={container:XA,emptyState:ZA,errorState:KA,statsBar:QA,branchName:JA,additions:IA,deletions:FA,fileList:PA,fileName:$A,diffContent:WA,diffLine:tE,added:eE,removed:nE,hunk:aE,meta:iE,context:sE};function lE(a){return a.startsWith("+")&&!a.startsWith("+++")?Te.added:a.startsWith("-")&&!a.startsWith("---")?Te.removed:a.startsWith("@@")?Te.hunk:a.startsWith("diff ")||a.startsWith("index ")?Te.meta:Te.context}function oE({diff:a}){var o;if(!a)return y.jsx("div",{className:Te.emptyState,children:"Loading diff..."});if(a.error)return y.jsx("div",{className:Te.errorState,children:a.error});if(!a.diff||a.diff.trim()==="")return y.jsxs("div",{className:Te.emptyState,children:["No changes on branch ",a.branch]});const s=a.diff.split(`
|
|
141
|
-
`);return y.jsxs("div",{className:Te.container,children:[y.jsxs("div",{className:Te.statsBar,children:[y.jsxs("span",{children:["Branch: ",y.jsx("b",{className:Te.branchName,children:a.branch})]}),y.jsxs("span",{children:["Files: ",y.jsx("b",{children:((o=a.changedFiles)==null?void 0:o.length)||0})]}),y.jsxs("span",{className:Te.additions,children:["+",a.additions||0]}),y.jsxs("span",{className:Te.deletions,children:["-",a.deletions||0]})]}),a.changedFiles&&a.changedFiles.length>0&&y.jsx("div",{className:Te.fileList,children:a.changedFiles.map(r=>y.jsx("span",{className:Te.fileName,children:r},r))}),y.jsx("div",{className:Te.diffContent,children:s.map((r,c)=>y.jsx("div",{className:`${Te.diffLine} ${lE(r)}`,children:r},c))})]})}const rE="_container_twqwx_1",uE="_emptyState_twqwx_8",cE="_card_twqwx_14",fE="_cardHeader_twqwx_34",dE="_categoryBadge_twqwx_41",hE="_findingTitle_twqwx_49",mE="_findingDate_twqwx_55",pE="_findingContent_twqwx_61",vE="_tags_twqwx_67",gE="_tag_twqwx_67",Dn={container:rE,emptyState:uE,card:cE,cardHeader:fE,categoryBadge:dE,findingTitle:hE,findingDate:mE,findingContent:pE,tags:vE,tag:gE},yE={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)"}},bE={text:"var(--text-secondary)",bg:"var(--bg-elevated)"};function SE({projectId:a}){const{findings:s}=$n(),o=s.filter(r=>r.projectId===a);return o.length===0?y.jsx("div",{className:Dn.emptyState,children:"No findings yet. Agents will post discoveries here."}):y.jsx("div",{className:Dn.container,children:o.map((r,c)=>{const h=yE[r.category]||bE;return y.jsxs(ni.div,{className:Dn.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:c*.05,duration:.2},children:[y.jsxs("div",{className:Dn.cardHeader,children:[y.jsx("span",{className:Dn.categoryBadge,style:{background:h.bg,color:h.text},children:r.category}),y.jsx("span",{className:Dn.findingTitle,children:r.title}),y.jsx("span",{className:Dn.findingDate,children:r.createdAt})]}),y.jsx("div",{className:Dn.findingContent,children:r.content.length>300?r.content.slice(0,300)+"...":r.content}),r.tags.length>0&&y.jsx("div",{className:Dn.tags,children:r.tags.map(f=>y.jsx("span",{className:Dn.tag,style:{color:h.text,textShadow:`0 0 8px ${h.text}`},children:f},f))})]},r.id)})})}const TE="_container_1vhtg_1",xE="_heading_1vhtg_7",_E="_section_1vhtg_14",AE="_sectionTitle_1vhtg_25",EE="_sectionDescription_1vhtg_34",jE="_emptyState_1vhtg_40",CE="_tokenList_1vhtg_47",DE="_tokenRow_1vhtg_54",NE="_tokenBadge_1vhtg_67",ME="_tokenName_1vhtg_82",kE="_tokenTarget_1vhtg_89",OE="_deleteButton_1vhtg_98",RE="_addForm_1vhtg_112",wE="_formRow_1vhtg_118",zE="_input_1vhtg_124",BE="_select_1vhtg_153",VE="_addButton_1vhtg_184",ue={container:TE,heading:xE,section:_E,sectionTitle:AE,sectionDescription:EE,emptyState:jE,tokenList:CE,tokenRow:DE,tokenBadge:NE,tokenName:ME,tokenTarget:kE,deleteButton:OE,addForm:RE,formRow:wE,input:zE,select:BE,addButton:VE},UE=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function LE(){const{tokens:a,setToken:s,deleteToken:o}=$n(),[r,c]=_.useState(""),[h,f]=_.useState(""),[m,p]=_.useState("env_var"),[g,b]=_.useState(""),S=j=>{if(j.preventDefault(),!r||!h)return;const O=m==="env_var"?g||r.toUpperCase()+"_TOKEN":"";s(r,h,m,O,m==="file"?g:""),c(""),f(""),b("")},x=j=>{window.confirm(`Delete token "${j}"?`)&&o(j)};return y.jsxs("div",{className:ue.container,children:[y.jsx("h2",{className:ue.heading,children:"Settings"}),y.jsxs("section",{className:ue.section,children:[y.jsx("h3",{className:ue.sectionTitle,children:"Tokens"}),y.jsx("p",{className:ue.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),a.length===0?y.jsx("div",{className:ue.emptyState,children:"No tokens configured"}):y.jsx("div",{className:ue.tokenList,children:a.map(j=>y.jsxs("div",{className:ue.tokenRow,children:[y.jsx("span",{className:ue.tokenBadge,children:j.tokenType}),y.jsx("span",{className:ue.tokenName,children:j.name}),y.jsx("span",{className:ue.tokenTarget,children:j.tokenType==="env_var"?j.envVar:j.filePath}),y.jsx("button",{className:ue.deleteButton,onClick:()=>x(j.name),title:`Delete ${j.name}`,children:"×"})]},j.name))}),y.jsxs("form",{className:ue.addForm,onSubmit:S,children:[y.jsxs("div",{className:ue.formRow,children:[y.jsx("input",{className:ue.input,type:"text",placeholder:"Token name",value:r,onChange:j=>c(j.target.value)}),y.jsx("input",{className:ue.input,type:"password",placeholder:"Value",value:h,onChange:j=>f(j.target.value)})]}),y.jsxs("div",{className:ue.formRow,children:[y.jsx("select",{className:ue.select,value:m,onChange:j=>p(j.target.value),children:UE.map(j=>y.jsx("option",{value:j.value,children:j.label},j.value))}),y.jsx("input",{className:ue.input,type:"text",placeholder:m==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:g,onChange:j=>b(j.target.value)}),y.jsx("button",{className:ue.addButton,type:"submit",children:"Add Token"})]})]})]})]})}const Kv=220,Qv=70,HE=40,qE=60,GE="hierarchy",YE="dependency";function XE(a){return _.useMemo(()=>{if(a.length===0)return{nodes:[],edges:[]};const s=new gp.graphlib.Graph({multigraph:!0});s.setDefaultEdgeLabel(()=>({})),s.setGraph({rankdir:"TB",nodesep:HE,ranksep:qE});const o=new Map(a.map(f=>[f.id,f])),r=new Map;for(const f of a)if(f.parentTaskId&&o.has(f.parentTaskId)){const m=r.get(f.parentTaskId)||[];m.push(f),r.set(f.parentTaskId,m)}for(const f of a)s.setNode(f.id,{width:Kv,height:Qv});const c=[];for(const f of a){if(f.parentTaskId&&o.has(f.parentTaskId)){const m=`hierarchy-${f.parentTaskId}-${f.id}`;s.setEdge(f.parentTaskId,f.id,{},m),c.push({id:m,source:f.parentTaskId,target:f.id,type:"smoothstep",data:{edgeType:GE},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const m of f.dependsOn)if(o.has(m)){const p=`dependency-${m}-${f.id}`;s.setEdge(m,f.id,{},p),c.push({id:p,source:m,target:f.id,type:"smoothstep",data:{edgeType:YE},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return gp.layout(s),{nodes:a.map(f=>{const m=s.node(f.id),p=r.get(f.id)||[];return{id:f.id,type:"task",position:{x:m.x-Kv/2,y:m.y-Qv/2},data:{task:f,childCount:p.length,doneChildCount:p.filter(g=>g.status==="done").length,hasDependencies:f.dependsOn.length>0}}}),edges:c}},[a])}const ZE="_dagContainer_1c7ip_1",KE="_emptyDag_1c7ip_18",QE="_taskNode_1c7ip_26",JE="_taskNodeBorder_1c7ip_48",IE="_taskNodeContent_1c7ip_54",FE="_taskNodeHeader_1c7ip_64",PE="_taskNodeIcon_1c7ip_71",$E="_taskNodeTitle_1c7ip_76",WE="_taskNodeBadges_1c7ip_84",tj="_childBadge_1c7ip_89",ej="_depBadge_1c7ip_101",nj="_handle_1c7ip_113",Fe={dagContainer:ZE,emptyDag:KE,taskNode:QE,taskNodeBorder:JE,taskNodeContent:IE,taskNodeHeader:FE,taskNodeIcon:PE,taskNodeTitle:$E,taskNodeBadges:WE,childBadge:tj,depBadge:ej,handle:nj},Jv={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"},waiting:{color:"var(--accent-purple, #a78bfa)",icon:"⧖"}};function aj({data:a}){const{task:s,childCount:o,doneChildCount:r,hasDependencies:c}=a,h=Jv[s.status]||Jv.pending;return y.jsxs("div",{className:Fe.taskNode,"data-task-id":s.id,"data-task-title":s.title,children:[y.jsx(yp,{type:"target",position:bp.Top,className:Fe.handle}),y.jsx("div",{className:Fe.taskNodeBorder,style:{backgroundColor:h.color}}),y.jsxs("div",{className:Fe.taskNodeContent,children:[y.jsxs("div",{className:Fe.taskNodeHeader,children:[y.jsx("span",{className:Fe.taskNodeIcon,style:{color:h.color},children:h.icon}),y.jsx("span",{className:Fe.taskNodeTitle,children:s.title})]}),y.jsxs("div",{className:Fe.taskNodeBadges,children:[o>0&&y.jsxs("span",{className:Fe.childBadge,children:[r,"/",o]}),c&&y.jsx("span",{className:Fe.depBadge,children:"dep"})]})]}),y.jsx(yp,{type:"source",position:bp.Bottom,className:Fe.handle})]})}const Iv={pending:"#6b7a8d",assigned:"#70a1ff",in_progress:"#4ecca3",review:"#f0c040",done:"#4ecca3",failed:"#e94560",waiting:"#a78bfa"},ij={task:aj};function sj({projectId:a,setViewMode:s}){const{tasks:o}=$n(),r=_.useMemo(()=>o.filter(p=>p.projectId===a),[o,a]),{nodes:c,edges:h}=XE(r),f=_.useCallback((p,g)=>{s({kind:"task",taskId:g.id})},[s]),m=_.useCallback(p=>{const g=p.data;return Iv[g.task.status]||Iv.pending},[]);return r.length===0?y.jsx("div",{className:Fe.emptyDag,children:"No tasks to visualize. Create tasks to see the dependency graph."}):y.jsx("div",{className:Fe.dagContainer,children:y.jsxs(I1,{nodes:c,edges:h,nodeTypes:ij,onNodeClick:f,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[y.jsx(F1,{variant:P1.Dots,gap:20,size:1,color:"rgba(255,255,255,0.05)"}),y.jsx($1,{showInteractive:!1}),y.jsx(W1,{nodeColor:m,maskColor:"rgba(10, 12, 20, 0.7)",style:{background:"var(--bg-inset)"}})]})})}const lj="_panelContainer_m2c7m_1",oj="_emptyState_m2c7m_8",rj="_projectSummary_m2c7m_17",uj="_projectSummaryTitle_m2c7m_28",cj="_projectSummarySubtitle_m2c7m_32",fj="_header_m2c7m_36",dj="_headerInfo_m2c7m_62",hj="_killButton_m2c7m_68",mj="_tabBar_m2c7m_89",pj="_tab_m2c7m_89",vj="_active_m2c7m_112",gj="_eventScroll_m2c7m_117",yj="_tabContent_m2c7m_123",bj="_noContext_m2c7m_128",Sj="_overviewContent_m2c7m_134",Tj="_overviewSection_m2c7m_143",xj="_overviewLabel_m2c7m_149",_j="_overviewDescription_m2c7m_156",Aj="_depList_m2c7m_162",Ej="_depItem_m2c7m_168",jj="_depBlocked_m2c7m_175",Cj="_depDone_m2c7m_179",Dj="_waitingMessage_m2c7m_183",Nj="_errorMessage_m2c7m_187",ot={panelContainer:lj,emptyState:oj,projectSummary:rj,projectSummaryTitle:uj,projectSummarySubtitle:cj,header:fj,headerInfo:dj,killButton:hj,tabBar:mj,tab:pj,active:vj,eventScroll:gj,tabContent:yj,noContext:bj,overviewContent:Sj,overviewSection:Tj,overviewLabel:xj,overviewDescription:_j,depList:Aj,depItem:Ej,depBlocked:jj,depDone:Cj,waitingMessage:Dj,errorMessage:Nj};function Mj({sessionId:a,session:s,isActive:o,onKill:r}){return y.jsxs("div",{className:ot.header,children:[y.jsxs("span",{children:["Session: ",a.slice(0,8),s&&` | ${s.runtime} | ${s.status}`]}),y.jsxs("span",{className:ot.headerInfo,children:[s&&y.jsx("span",{children:s.prompt.length>60?s.prompt.slice(0,60)+"...":s.prompt}),o&&y.jsx("button",{onClick:()=>r(a),title:"Stop session",className:ot.killButton,children:"×"})]})]})}function kj({sessionEvents:a,session:s,scrollRef:o}){const r=s&&["completed","failed","killed"].includes(s.status),c=r?`Session ${s.status} with no events recorded.`:"Waiting for events...";return y.jsxs("div",{ref:o,className:ot.eventScroll,children:[a.length===0&&y.jsx("div",{className:r?ot.errorMessage:ot.waitingMessage,children:c}),a.map((h,f)=>y.jsx(Ng,{event:h},`${h.sessionId}-${h.timestamp}-${f}`))]})}function Oj(a){const s=[];for(const o of a){const r=s[s.length-1];o.eventType==="text"&&(r==null?void 0:r.eventType)==="text"?s[s.length-1]={...r,content:r.content+o.content}:s.push(o)}return s}function Rj({viewMode:a,setViewMode:s}){var ct;const{events:o,sessions:r,tasks:c,environments:h,taskDiff:f,loadSessionEvents:m,loadFindings:p,loadTaskDiff:g,kill:b}=$n(),S=_.useRef(null),x=_.useRef(void 0),[j,O]=_.useState("overview"),[w,Z]=_.useState("tasks"),X=_.useRef(void 0),F=_.useRef(void 0);let L,R,Y;if(a.kind==="session"?L=a.sessionId:a.kind==="task"&&(R=c.find(st=>st.id===a.taskId),L=(R==null?void 0:R.sessionId)||void 0,Y=(R==null?void 0:R.projectId)||void 0),a.kind==="task"&&(R==null?void 0:R.id)!==X.current&&(X.current=R==null?void 0:R.id,j!=="overview"&&O("overview")),(R==null?void 0:R.status)!==F.current){F.current=R==null?void 0:R.status;const st=(R==null?void 0:R.status)==="pending"||(R==null?void 0:R.status)==="assigned"?"overview":(R==null?void 0:R.status)==="in_progress"?"stream":(R==null?void 0:R.status)==="review"?"diff":(R==null?void 0:R.status)==="done"?"findings":void 0;st&&st!==j&&O(st)}const H=_.useMemo(()=>{const st=L?o.filter(ft=>ft.sessionId===L):[];return Oj(st)},[o,L]),I=_.useMemo(()=>new Map(c.map(st=>[st.id,st])),[c]),B=L?r.find(st=>st.id===L)??void 0:void 0;if(_.useEffect(()=>{L&&L!==x.current&&(x.current=L,m(L))},[L,m]),_.useEffect(()=>{j==="findings"&&Y&&p(Y),j==="diff"&&(R!=null&&R.id)&&g(R.id)},[j,Y,R==null?void 0:R.id,p,g]),_.useEffect(()=>{S.current&&j==="stream"&&(S.current.scrollTop=S.current.scrollHeight)},[H.length,j]),a.kind==="settings")return y.jsx(LE,{});if(a.kind==="empty")return y.jsx("div",{className:ot.emptyState,children:"Select a session, project, or task to get started"});if(a.kind==="new_chat")return y.jsx("div",{className:ot.emptyState,children:"Enter a prompt below to start a new session"});if(a.kind==="project"){const st=c.filter(Ct=>Ct.projectId===a.projectId),ft=st.filter(Ct=>Ct.status==="done").length,gt=st.length;return y.jsxs("div",{className:ot.panelContainer,children:[y.jsxs("div",{className:ot.tabBar,role:"tablist","aria-label":"Project view",children:[y.jsx("button",{role:"tab","aria-selected":w==="graph",className:`${ot.tab} ${w==="graph"?ot.active:""}`,onClick:()=>Z("graph"),children:"Graph"}),y.jsx("button",{role:"tab","aria-selected":w==="tasks",className:`${ot.tab} ${w==="tasks"?ot.active:""}`,onClick:()=>Z("tasks"),children:"Tasks"})]}),w==="tasks"&&y.jsxs("div",{className:ot.projectSummary,children:[y.jsx("span",{className:ot.projectSummaryTitle,children:gt>0?`${ft}/${gt} tasks complete`:"No tasks yet"}),y.jsx("span",{className:ot.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),w==="graph"&&y.jsx(sj,{projectId:a.projectId,setViewMode:s})]})}if(a.kind==="new_environment")return y.jsx("div",{className:ot.emptyState,children:"Configure the new environment below"});if(a.kind==="new_task")return y.jsx("div",{className:ot.emptyState,children:"Fill in the task details below"});if(a.kind==="task"){const st=(B==null?void 0:B.status)==="running"||(B==null?void 0:B.status)==="waiting_input";return y.jsxs("div",{className:ot.panelContainer,children:[y.jsxs("div",{className:ot.header,children:[y.jsxs("span",{children:["Task: ",(R==null?void 0:R.title)||a.taskId,R&&` | ${R.status}`,(R==null?void 0:R.branch)&&` | ${R.branch}`]}),st&&y.jsx("button",{onClick:()=>L&&b(L),title:"Stop session",className:ot.killButton,children:"×"})]}),y.jsxs("div",{className:ot.tabBar,role:"tablist","aria-label":"Task view",children:[y.jsx("button",{role:"tab","aria-selected":j==="overview",className:`${ot.tab} ${j==="overview"?ot.active:""}`,onClick:()=>O("overview"),children:"Overview"}),y.jsx("button",{role:"tab","aria-selected":j==="stream",className:`${ot.tab} ${j==="stream"?ot.active:""}`,onClick:()=>O("stream"),children:"Stream"}),y.jsx("button",{role:"tab","aria-selected":j==="diff",className:`${ot.tab} ${j==="diff"?ot.active:""}`,onClick:()=>O("diff"),children:"Diff"}),y.jsx("button",{role:"tab","aria-selected":j==="findings",className:`${ot.tab} ${j==="findings"?ot.active:""}`,onClick:()=>O("findings"),children:"Findings"})]}),y.jsxs(Xc,{mode:"wait",children:[j==="overview"&&y.jsxs(ni.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:ot.overviewContent,children:[(R==null?void 0:R.description)&&y.jsxs("div",{className:ot.overviewSection,children:[y.jsx("div",{className:ot.overviewLabel,children:"Description"}),y.jsx("div",{className:ot.overviewDescription,children:R.description})]}),(R==null?void 0:R.environmentId)&&y.jsxs("div",{className:ot.overviewSection,children:[y.jsx("div",{className:ot.overviewLabel,children:"Environment"}),y.jsx("div",{className:ot.overviewDescription,children:((ct=h.find(ft=>ft.id===R.environmentId))==null?void 0:ct.displayName)??R.environmentId})]}),R&&R.dependsOn.length>0&&y.jsxs("div",{className:ot.overviewSection,children:[y.jsx("div",{className:ot.overviewLabel,children:"Dependencies"}),y.jsx("div",{className:ot.depList,children:R.dependsOn.map(ft=>{const gt=I.get(ft),Ct=(gt==null?void 0:gt.status)==="done";return y.jsxs("div",{className:`${ot.depItem} ${Ct?ot.depDone:ot.depBlocked}`,children:[y.jsx("span",{children:Ct?"✓":"○"}),y.jsx("span",{children:(gt==null?void 0:gt.title)??ft})]},ft)})})]}),R&&R.dependsOn.length===0&&!R.description&&y.jsx("div",{className:ot.waitingMessage,children:"No additional details"})]},"overview"),j==="stream"&&y.jsxs(ni.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},ref:S,className:ot.eventScroll,children:[!L&&y.jsx("div",{className:ot.waitingMessage,children:"Task has not been started yet"}),L&&H.length===0&&y.jsx("div",{className:ot.waitingMessage,children:"Waiting for events..."}),H.map((ft,gt)=>y.jsx(Ng,{event:ft},`${ft.sessionId}-${ft.timestamp}-${gt}`))]},"stream"),j==="diff"&&y.jsx(ni.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:ot.tabContent,children:y.jsx(oE,{diff:f})},"diff"),j==="findings"&&y.jsx(ni.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:ot.tabContent,children:Y?y.jsx(SE,{projectId:Y}):y.jsx("div",{className:ot.noContext,children:"No project context"})},"findings")]})]})}if(!L)return y.jsx("div",{className:ot.emptyState,children:"No session selected"});const nt=(B==null?void 0:B.status)==="running"||(B==null?void 0:B.status)==="waiting_input";return y.jsxs("div",{className:ot.panelContainer,children:[y.jsx(Mj,{sessionId:L,session:B,isActive:nt,onKill:b}),y.jsx(kj,{sessionEvents:H,session:B,scrollRef:S})]})}const wj="_root_cdda9_1",zj="_body_cdda9_7",Bj="_main_cdda9_13",Tc={root:wj,body:zj,main:Bj},Vj=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function Uj(){const[a,s]=_.useState({kind:"empty"}),{lastSpawnedId:o}=$n();return _.useEffect(()=>{o&&s({kind:"session",sessionId:o})},[o]),y.jsxs("div",{className:Tc.root,children:[y.jsx(Ab,{setViewMode:s}),y.jsxs("div",{className:Tc.body,children:[y.jsx(sA,{viewMode:a,setViewMode:s}),y.jsxs("div",{className:Tc.main,children:[y.jsx(Rj,{viewMode:a,setViewMode:s},a.kind==="task"?a.taskId:a.kind==="session"?a.sessionId:a.kind),y.jsx(AA,{viewMode:a,setViewMode:s})]})]})]})}function Lj(){const a=Vj?vb:rb;return y.jsx(a,{children:y.jsx(Uj,{})})}ib.createRoot(document.getElementById("root")).render(y.jsx(_.StrictMode,{children:y.jsx(Lj,{})}));
|