@grackle-ai/web 0.41.0 → 0.41.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,91 +0,0 @@
1
- import{r as tx,a as S,j as h,v as nx,b as ax,t as Sr,i as sx,f as ix,M as Tf,c as Ef}from"./markdown-gcy1Jmzi.js";import{r as lx,d as hy,H as py,P as my,i as ox,B as rx,a as cx,C as ux,M as dx}from"./dagview-EHk2VaeR.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function i(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerPolicy&&(u.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?u.credentials="include":r.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(r){if(r.ep)return;r.ep=!0;const u=i(r);fetch(r.href,u)}})();var bd={exports:{}},wl={},Sd={exports:{}},_d={};/**
2
- * @license React
3
- * scheduler.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var gy;function fx(){return gy||(gy=1,(function(n){function a(O,G){var ee=O.length;O.push(G);e:for(;0<ee;){var ge=ee-1>>>1,pe=O[ge];if(0<r(pe,G))O[ge]=G,O[ee]=pe,ee=ge;else break e}}function i(O){return O.length===0?null:O[0]}function o(O){if(O.length===0)return null;var G=O[0],ee=O.pop();if(ee!==G){O[0]=ee;e:for(var ge=0,pe=O.length,We=pe>>>1;ge<We;){var Ae=2*(ge+1)-1,he=O[Ae],De=Ae+1,xe=O[De];if(0>r(he,ee))De<pe&&0>r(xe,he)?(O[ge]=xe,O[De]=ee,ge=De):(O[ge]=he,O[Ae]=ee,ge=Ae);else if(De<pe&&0>r(xe,ee))O[ge]=xe,O[De]=ee,ge=De;else break e}}return G}function r(O,G){var ee=O.sortIndex-G.sortIndex;return ee!==0?ee:O.id-G.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,p=d.now();n.unstable_now=function(){return d.now()-p}}var m=[],g=[],v=1,y=null,_=3,T=!1,E=!1,j=!1,A=!1,C=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function Y(O){for(var G=i(g);G!==null;){if(G.callback===null)o(g);else if(G.startTime<=O)o(g),G.sortIndex=G.expirationTime,a(m,G);else break;G=i(g)}}function w(O){if(j=!1,Y(O),!E)if(i(m)!==null)E=!0,F||(F=!0,le());else{var G=i(g);G!==null&&Q(w,G.startTime-O)}}var F=!1,q=-1,V=5,W=-1;function ae(){return A?!0:!(n.unstable_now()-W<V)}function se(){if(A=!1,F){var O=n.unstable_now();W=O;var G=!0;try{e:{E=!1,j&&(j=!1,M(q),q=-1),T=!0;var ee=_;try{t:{for(Y(O),y=i(m);y!==null&&!(y.expirationTime>O&&ae());){var ge=y.callback;if(typeof ge=="function"){y.callback=null,_=y.priorityLevel;var pe=ge(y.expirationTime<=O);if(O=n.unstable_now(),typeof pe=="function"){y.callback=pe,Y(O),G=!0;break t}y===i(m)&&o(m),Y(O)}else o(m);y=i(m)}if(y!==null)G=!0;else{var We=i(g);We!==null&&Q(w,We.startTime-O),G=!1}}break e}finally{y=null,_=ee,T=!1}G=void 0}}finally{G?le():F=!1}}}var le;if(typeof R=="function")le=function(){R(se)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,K=z.port2;z.port1.onmessage=se,le=function(){K.postMessage(null)}}else le=function(){C(se,0)};function Q(O,G){q=C(function(){O(n.unstable_now())},G)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(O){O.callback=null},n.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<O?Math.floor(1e3/O):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(O){switch(_){case 1:case 2:case 3:var G=3;break;default:G=_}var ee=_;_=G;try{return O()}finally{_=ee}},n.unstable_requestPaint=function(){A=!0},n.unstable_runWithPriority=function(O,G){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var ee=_;_=O;try{return G()}finally{_=ee}},n.unstable_scheduleCallback=function(O,G,ee){var ge=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ge+ee:ge):ee=ge,O){case 1:var pe=-1;break;case 2:pe=250;break;case 5:pe=1073741823;break;case 4:pe=1e4;break;default:pe=5e3}return pe=ee+pe,O={id:v++,callback:G,priorityLevel:O,startTime:ee,expirationTime:pe,sortIndex:-1},ee>ge?(O.sortIndex=ee,a(g,O),i(m)===null&&O===i(g)&&(j?(M(q),q=-1):j=!0,Q(w,ee-ge))):(O.sortIndex=pe,a(m,O),E||T||(E=!0,F||(F=!0,le()))),O},n.unstable_shouldYield=ae,n.unstable_wrapCallback=function(O){var G=_;return function(){var ee=_;_=G;try{return O.apply(this,arguments)}finally{_=ee}}}})(_d)),_d}var yy;function hx(){return yy||(yy=1,Sd.exports=fx()),Sd.exports}/**
10
- * @license React
11
- * react-dom-client.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var vy;function px(){if(vy)return wl;vy=1;var n=hx(),a=tx(),i=lx();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(u(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(o(188));return t!==e?null:e}for(var s=e,l=t;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(l=c.return,l!==null){s=l;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return m(c),e;if(f===l)return m(c),t;f=f.sibling}throw Error(o(188))}if(s.return!==l.return)s=c,l=f;else{for(var b=!1,x=c.child;x;){if(x===s){b=!0,s=c,l=f;break}if(x===l){b=!0,l=c,s=f;break}x=x.sibling}if(!b){for(x=f.child;x;){if(x===s){b=!0,s=f,l=c;break}if(x===l){b=!0,l=f,s=c;break}x=x.sibling}if(!b)throw Error(o(189))}}if(s.alternate!==l)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,_=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),R=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function le(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var z=Symbol.for("react.client.reference");function K(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===z?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case C:return"Profiler";case A:return"StrictMode";case w:return"Suspense";case F:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case R:return e.displayName||"Context";case M:return(e._context.displayName||"Context")+".Consumer";case Y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case q:return t=e.displayName||null,t!==null?t:K(e.type)||"Memo";case V:t=e._payload,e=e._init;try{return K(e(t))}catch{}}return null}var Q=Array.isArray,O=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ge=[],pe=-1;function We(e){return{current:e}}function Ae(e){0>pe||(e.current=ge[pe],ge[pe]=null,pe--)}function he(e,t){pe++,ge[pe]=e.current,e.current=t}var De=We(null),xe=We(null),ne=We(null),ke=We(null);function H(e,t){switch(he(ne,t),he(xe,e),he(De,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Lg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Lg(t),e=Ug(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ae(De),he(De,e)}function ie(){Ae(De),Ae(xe),Ae(ne)}function Ge(e){e.memoizedState!==null&&he(ke,e);var t=De.current,s=Ug(t,e.type);t!==s&&(he(xe,e),he(De,s))}function nt(e){xe.current===e&&(Ae(De),Ae(xe)),ke.current===e&&(Ae(ke),Cl._currentValue=ee)}var Bt,wt;function qe(e){if(Bt===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);Bt=t&&t[1]||"",wt=-1<s.stack.indexOf(`
18
- at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
19
- `+Bt+e+wt}var Be=!1;function Dn(e,t){if(!e||Be)return"";Be=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(P){var I=P}Reflect.construct(e,[],X)}else{try{X.call()}catch(P){I=P}e.call(X.prototype)}}else{try{throw Error()}catch(P){I=P}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(P){if(P&&I&&typeof P.stack=="string")return[P.stack,I.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),b=f[0],x=f[1];if(b&&x){var N=b.split(`
20
- `),U=x.split(`
21
- `);for(c=l=0;l<N.length&&!N[l].includes("DetermineComponentFrameRoot");)l++;for(;c<U.length&&!U[c].includes("DetermineComponentFrameRoot");)c++;if(l===N.length||c===U.length)for(l=N.length-1,c=U.length-1;1<=l&&0<=c&&N[l]!==U[c];)c--;for(;1<=l&&0<=c;l--,c--)if(N[l]!==U[c]){if(l!==1||c!==1)do if(l--,c--,0>c||N[l]!==U[c]){var $=`
22
- `+N[l].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=l&&0<=c);break}}}finally{Be=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?qe(s):""}function Ea(e,t){switch(e.tag){case 26:case 27:case 5:return qe(e.type);case 16:return qe("Lazy");case 13:return e.child!==t&&t!==null?qe("Suspense Fallback"):qe("Suspense");case 19:return qe("SuspenseList");case 0:case 15:return Dn(e.type,!1);case 11:return Dn(e.type.render,!1);case 1:return Dn(e.type,!0);case 31:return qe("Activity");default:return""}}function Ca(e){try{var t="",s=null;do t+=Ea(e,s),s=e,e=e.return;while(e);return t}catch(l){return`
23
- Error generating stack: `+l.message+`
24
- `+l.stack}}var In=Object.prototype.hasOwnProperty,Qn=n.unstable_scheduleCallback,kn=n.unstable_cancelCallback,Jn=n.unstable_shouldYield,J=n.unstable_requestPaint,te=n.unstable_now,oe=n.unstable_getCurrentPriorityLevel,Se=n.unstable_ImmediatePriority,ve=n.unstable_UserBlockingPriority,ze=n.unstable_NormalPriority,je=n.unstable_LowPriority,gt=n.unstable_IdlePriority,Ce=n.log,dt=n.unstable_setDisableYieldValue,yt=null,Le=null;function Dt(e){if(typeof Ce=="function"&&dt(e),Le&&typeof Le.setStrictMode=="function")try{Le.setStrictMode(yt,e)}catch{}}var Ee=Math.clz32?Math.clz32:ce,Me=Math.log,xt=Math.LN2;function ce(e){return e>>>=0,e===0?32:31-(Me(e)/xt|0)|0}var Tt=256,Mn=262144,io=4194304;function ls(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function lo(e,t,s){var l=e.pendingLanes;if(l===0)return 0;var c=0,f=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var x=l&134217727;return x!==0?(l=x&~f,l!==0?c=ls(l):(b&=x,b!==0?c=ls(b):s||(s=x&~e,s!==0&&(c=ls(s))))):(x=l&~f,x!==0?c=ls(x):b!==0?c=ls(b):s||(s=l&~e,s!==0&&(c=ls(s)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,s=t&-t,f>=s||f===32&&(s&4194048)!==0)?t:c}function Ii(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function H1(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yh(){var e=io;return io<<=1,(io&62914560)===0&&(io=4194304),e}function oc(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function zi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function G1(e,t,s,l,c,f){var b=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var x=e.entanglements,N=e.expirationTimes,U=e.hiddenUpdates;for(s=b&~s;0<s;){var $=31-Ee(s),X=1<<$;x[$]=0,N[$]=-1;var I=U[$];if(I!==null)for(U[$]=null,$=0;$<I.length;$++){var P=I[$];P!==null&&(P.lane&=-536870913)}s&=~X}l!==0&&vh(e,l,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(b&~t))}function vh(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Ee(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|s&261930}function bh(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var l=31-Ee(s),c=1<<l;c&t|e[l]&t&&(e[l]|=t),s&=~c}}function Sh(e,t){var s=t&-t;return s=(s&42)!==0?1:rc(s),(s&(e.suspendedLanes|t))!==0?0:s}function rc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function cc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function _h(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:ly(e.type))}function xh(e,t){var s=G.p;try{return G.p=e,t()}finally{G.p=s}}var Aa=Math.random().toString(36).slice(2),Lt="__reactFiber$"+Aa,Zt="__reactProps$"+Aa,Ls="__reactContainer$"+Aa,uc="__reactEvents$"+Aa,F1="__reactListeners$"+Aa,q1="__reactHandles$"+Aa,Th="__reactResources$"+Aa,Vi="__reactMarker$"+Aa;function dc(e){delete e[Lt],delete e[Zt],delete e[uc],delete e[F1],delete e[q1]}function Us(e){var t=e[Lt];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Ls]||s[Lt]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=Fg(e);e!==null;){if(s=e[Lt])return s;e=Fg(e)}return t}e=s,s=e.parentNode}return null}function Is(e){if(e=e[Lt]||e[Ls]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Pi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function zs(e){var t=e[Th];return t||(t=e[Th]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Rt(e){e[Vi]=!0}var Eh=new Set,Ch={};function os(e,t){Vs(e,t),Vs(e+"Capture",t)}function Vs(e,t){for(Ch[e]=t,e=0;e<t.length;e++)Eh.add(t[e])}var $1=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ah={},jh={};function Y1(e){return In.call(jh,e)?!0:In.call(Ah,e)?!1:$1.test(e)?jh[e]=!0:(Ah[e]=!0,!1)}function oo(e,t,s){if(Y1(t))if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+s)}}function ro(e,t,s){if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+s)}}function Wn(e,t,s,l){if(l===null)e.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(t,s,""+l)}}function mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function K1(e,t,s){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,f=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(b){s=""+b,f.call(this,b)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return s},setValue:function(b){s=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fc(e){if(!e._valueTracker){var t=Nh(e)?"checked":"value";e._valueTracker=K1(e,t,""+e[t])}}function wh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),l="";return e&&(l=Nh(e)?e.checked?"true":"false":e.value),e=l,e!==s?(t.setValue(e),!0):!1}function co(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Z1=/[\n"\\]/g;function gn(e){return e.replace(Z1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function hc(e,t,s,l,c,f,b,x){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+mn(t)):e.value!==""+mn(t)&&(e.value=""+mn(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?pc(e,b,mn(t)):s!=null?pc(e,b,mn(s)):l!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+mn(x):e.removeAttribute("name")}function Dh(e,t,s,l,c,f,b,x){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||s!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){fc(e);return}s=s!=null?""+mn(s):"",t=t!=null?""+mn(t):s,x||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=x?e.checked:!!l,e.defaultChecked=!!l,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),fc(e)}function pc(e,t,s){t==="number"&&co(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Ps(e,t,s,l){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&l&&(e[s].defaultSelected=!0)}else{for(s=""+mn(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function kh(e,t,s){if(t!=null&&(t=""+mn(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+mn(s):""}function Mh(e,t,s,l){if(t==null){if(l!=null){if(s!=null)throw Error(o(92));if(Q(l)){if(1<l.length)throw Error(o(93));l=l[0]}s=l}s==null&&(s=""),t=s}s=mn(t),e.defaultValue=s,l=e.textContent,l===s&&l!==""&&l!==null&&(e.value=l),fc(e)}function Hs(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var X1=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 Rh(e,t,s){var l=t.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,s):typeof s!="number"||s===0||X1.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function Oh(e,t,s){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,s!=null){for(var l in s)!s.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&s[c]!==l&&Rh(e,c,l)}else for(var f in t)t.hasOwnProperty(f)&&Rh(e,f,t[f])}function mc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Q1=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"]]),J1=/^[\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 uo(e){return J1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ea(){}var gc=null;function yc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gs=null,Fs=null;function Bh(e){var t=Is(e);if(t&&(e=t.stateNode)){var s=e[Zt]||null;e:switch(e=t.stateNode,t.type){case"input":if(hc(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+gn(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var l=s[t];if(l!==e&&l.form===e.form){var c=l[Zt]||null;if(!c)throw Error(o(90));hc(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<s.length;t++)l=s[t],l.form===e.form&&wh(l)}break e;case"textarea":kh(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&Ps(e,!!s.multiple,t,!1)}}}var vc=!1;function Lh(e,t,s){if(vc)return e(t,s);vc=!0;try{var l=e(t);return l}finally{if(vc=!1,(Gs!==null||Fs!==null)&&(Jo(),Gs&&(t=Gs,e=Fs,Fs=Gs=null,Bh(t),e)))for(t=0;t<e.length;t++)Bh(e[t])}}function Hi(e,t){var s=e.stateNode;if(s===null)return null;var l=s[Zt]||null;if(l===null)return null;s=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,t,typeof s));return s}var ta=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bc=!1;if(ta)try{var Gi={};Object.defineProperty(Gi,"passive",{get:function(){bc=!0}}),window.addEventListener("test",Gi,Gi),window.removeEventListener("test",Gi,Gi)}catch{bc=!1}var ja=null,Sc=null,fo=null;function Uh(){if(fo)return fo;var e,t=Sc,s=t.length,l,c="value"in ja?ja.value:ja.textContent,f=c.length;for(e=0;e<s&&t[e]===c[e];e++);var b=s-e;for(l=1;l<=b&&t[s-l]===c[f-l];l++);return fo=c.slice(e,1<l?1-l:void 0)}function ho(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function po(){return!0}function Ih(){return!1}function Xt(e){function t(s,l,c,f,b){this._reactName=s,this._targetInst=c,this.type=l,this.nativeEvent=f,this.target=b,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(s=e[x],this[x]=s?s(f):f[x]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?po:Ih,this.isPropagationStopped=Ih,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=po)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=po)},persist:function(){},isPersistent:po}),t}var rs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mo=Xt(rs),Fi=y({},rs,{view:0,detail:0}),W1=Xt(Fi),_c,xc,qi,go=y({},Fi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ec,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==qi&&(qi&&e.type==="mousemove"?(_c=e.screenX-qi.screenX,xc=e.screenY-qi.screenY):xc=_c=0,qi=e),_c)},movementY:function(e){return"movementY"in e?e.movementY:xc}}),zh=Xt(go),eS=y({},go,{dataTransfer:0}),tS=Xt(eS),nS=y({},Fi,{relatedTarget:0}),Tc=Xt(nS),aS=y({},rs,{animationName:0,elapsedTime:0,pseudoElement:0}),sS=Xt(aS),iS=y({},rs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lS=Xt(iS),oS=y({},rs,{data:0}),Vh=Xt(oS),rS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cS={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"},uS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=uS[e])?!!t[e]:!1}function Ec(){return dS}var fS=y({},Fi,{key:function(e){if(e.key){var t=rS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ho(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ec,charCode:function(e){return e.type==="keypress"?ho(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ho(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),hS=Xt(fS),pS=y({},go,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ph=Xt(pS),mS=y({},Fi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ec}),gS=Xt(mS),yS=y({},rs,{propertyName:0,elapsedTime:0,pseudoElement:0}),vS=Xt(yS),bS=y({},go,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),SS=Xt(bS),_S=y({},rs,{newState:0,oldState:0}),xS=Xt(_S),TS=[9,13,27,32],Cc=ta&&"CompositionEvent"in window,$i=null;ta&&"documentMode"in document&&($i=document.documentMode);var ES=ta&&"TextEvent"in window&&!$i,Hh=ta&&(!Cc||$i&&8<$i&&11>=$i),Gh=" ",Fh=!1;function qh(e,t){switch(e){case"keyup":return TS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $h(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qs=!1;function CS(e,t){switch(e){case"compositionend":return $h(t);case"keypress":return t.which!==32?null:(Fh=!0,Gh);case"textInput":return e=t.data,e===Gh&&Fh?null:e;default:return null}}function AS(e,t){if(qs)return e==="compositionend"||!Cc&&qh(e,t)?(e=Uh(),fo=Sc=ja=null,qs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Hh&&t.locale!=="ko"?null:t.data;default:return null}}var jS={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 Yh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!jS[e.type]:t==="textarea"}function Kh(e,t,s,l){Gs?Fs?Fs.push(l):Fs=[l]:Gs=l,t=ir(t,"onChange"),0<t.length&&(s=new mo("onChange","change",null,s,l),e.push({event:s,listeners:t}))}var Yi=null,Ki=null;function NS(e){Dg(e,0)}function yo(e){var t=Pi(e);if(wh(t))return e}function Zh(e,t){if(e==="change")return t}var Xh=!1;if(ta){var Ac;if(ta){var jc="oninput"in document;if(!jc){var Qh=document.createElement("div");Qh.setAttribute("oninput","return;"),jc=typeof Qh.oninput=="function"}Ac=jc}else Ac=!1;Xh=Ac&&(!document.documentMode||9<document.documentMode)}function Jh(){Yi&&(Yi.detachEvent("onpropertychange",Wh),Ki=Yi=null)}function Wh(e){if(e.propertyName==="value"&&yo(Ki)){var t=[];Kh(t,Ki,e,yc(e)),Lh(NS,t)}}function wS(e,t,s){e==="focusin"?(Jh(),Yi=t,Ki=s,Yi.attachEvent("onpropertychange",Wh)):e==="focusout"&&Jh()}function DS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yo(Ki)}function kS(e,t){if(e==="click")return yo(t)}function MS(e,t){if(e==="input"||e==="change")return yo(t)}function RS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var an=typeof Object.is=="function"?Object.is:RS;function Zi(e,t){if(an(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),l=Object.keys(t);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var c=s[l];if(!In.call(t,c)||!an(e[c],t[c]))return!1}return!0}function ep(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tp(e,t){var s=ep(e);e=0;for(var l;s;){if(s.nodeType===3){if(l=e+s.textContent.length,e<=t&&l>=t)return{node:s,offset:t-e};e=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=ep(s)}}function np(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?np(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ap(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=co(e.document);t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=co(e.document)}return t}function Nc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var OS=ta&&"documentMode"in document&&11>=document.documentMode,$s=null,wc=null,Xi=null,Dc=!1;function sp(e,t,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Dc||$s==null||$s!==co(l)||(l=$s,"selectionStart"in l&&Nc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Xi&&Zi(Xi,l)||(Xi=l,l=ir(wc,"onSelect"),0<l.length&&(t=new mo("onSelect","select",null,t,s),e.push({event:t,listeners:l}),t.target=$s)))}function cs(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Ys={animationend:cs("Animation","AnimationEnd"),animationiteration:cs("Animation","AnimationIteration"),animationstart:cs("Animation","AnimationStart"),transitionrun:cs("Transition","TransitionRun"),transitionstart:cs("Transition","TransitionStart"),transitioncancel:cs("Transition","TransitionCancel"),transitionend:cs("Transition","TransitionEnd")},kc={},ip={};ta&&(ip=document.createElement("div").style,"AnimationEvent"in window||(delete Ys.animationend.animation,delete Ys.animationiteration.animation,delete Ys.animationstart.animation),"TransitionEvent"in window||delete Ys.transitionend.transition);function us(e){if(kc[e])return kc[e];if(!Ys[e])return e;var t=Ys[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in ip)return kc[e]=t[s];return e}var lp=us("animationend"),op=us("animationiteration"),rp=us("animationstart"),BS=us("transitionrun"),LS=us("transitionstart"),US=us("transitioncancel"),cp=us("transitionend"),up=new Map,Mc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Mc.push("scrollEnd");function Rn(e,t){up.set(e,t),os(t,[e])}var vo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},yn=[],Ks=0,Rc=0;function bo(){for(var e=Ks,t=Rc=Ks=0;t<e;){var s=yn[t];yn[t++]=null;var l=yn[t];yn[t++]=null;var c=yn[t];yn[t++]=null;var f=yn[t];if(yn[t++]=null,l!==null&&c!==null){var b=l.pending;b===null?c.next=c:(c.next=b.next,b.next=c),l.pending=c}f!==0&&dp(s,c,f)}}function So(e,t,s,l){yn[Ks++]=e,yn[Ks++]=t,yn[Ks++]=s,yn[Ks++]=l,Rc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Oc(e,t,s,l){return So(e,t,s,l),_o(e)}function ds(e,t){return So(e,null,null,t),_o(e)}function dp(e,t,s){e.lanes|=s;var l=e.alternate;l!==null&&(l.lanes|=s);for(var c=!1,f=e.return;f!==null;)f.childLanes|=s,l=f.alternate,l!==null&&(l.childLanes|=s),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-Ee(s),e=f.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=s|536870912),f):null}function _o(e){if(50<vl)throw vl=0,Gu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Zs={};function IS(e,t,s,l){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(e,t,s,l){return new IS(e,t,s,l)}function Bc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function na(e,t){var s=e.alternate;return s===null?(s=sn(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function fp(e,t){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,t=s.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function xo(e,t,s,l,c,f){var b=0;if(l=e,typeof e=="function")Bc(e)&&(b=1);else if(typeof e=="string")b=G_(e,s,De.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=sn(31,s,t,c),e.elementType=W,e.lanes=f,e;case j:return fs(s.children,c,f,t);case A:b=8,c|=24;break;case C:return e=sn(12,s,t,c|2),e.elementType=C,e.lanes=f,e;case w:return e=sn(13,s,t,c),e.elementType=w,e.lanes=f,e;case F:return e=sn(19,s,t,c),e.elementType=F,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:b=10;break e;case M:b=9;break e;case Y:b=11;break e;case q:b=14;break e;case V:b=16,l=null;break e}b=29,s=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=sn(b,s,t,c),t.elementType=e,t.type=l,t.lanes=f,t}function fs(e,t,s,l){return e=sn(7,e,l,t),e.lanes=s,e}function Lc(e,t,s){return e=sn(6,e,null,t),e.lanes=s,e}function hp(e){var t=sn(18,null,null,0);return t.stateNode=e,t}function Uc(e,t,s){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pp=new WeakMap;function vn(e,t){if(typeof e=="object"&&e!==null){var s=pp.get(e);return s!==void 0?s:(t={value:e,source:t,stack:Ca(t)},pp.set(e,t),t)}return{value:e,source:t,stack:Ca(t)}}var Xs=[],Qs=0,To=null,Qi=0,bn=[],Sn=0,Na=null,zn=1,Vn="";function aa(e,t){Xs[Qs++]=Qi,Xs[Qs++]=To,To=e,Qi=t}function mp(e,t,s){bn[Sn++]=zn,bn[Sn++]=Vn,bn[Sn++]=Na,Na=e;var l=zn;e=Vn;var c=32-Ee(l)-1;l&=~(1<<c),s+=1;var f=32-Ee(t)+c;if(30<f){var b=c-c%5;f=(l&(1<<b)-1).toString(32),l>>=b,c-=b,zn=1<<32-Ee(t)+c|s<<c|l,Vn=f+e}else zn=1<<f|s<<c|l,Vn=e}function Ic(e){e.return!==null&&(aa(e,1),mp(e,1,0))}function zc(e){for(;e===To;)To=Xs[--Qs],Xs[Qs]=null,Qi=Xs[--Qs],Xs[Qs]=null;for(;e===Na;)Na=bn[--Sn],bn[Sn]=null,Vn=bn[--Sn],bn[Sn]=null,zn=bn[--Sn],bn[Sn]=null}function gp(e,t){bn[Sn++]=zn,bn[Sn++]=Vn,bn[Sn++]=Na,zn=t.id,Vn=t.overflow,Na=e}var Ut=null,at=null,Ve=!1,wa=null,_n=!1,Vc=Error(o(519));function Da(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ji(vn(t,e)),Vc}function yp(e){var t=e.stateNode,s=e.type,l=e.memoizedProps;switch(t[Lt]=e,t[Zt]=l,s){case"dialog":Oe("cancel",t),Oe("close",t);break;case"iframe":case"object":case"embed":Oe("load",t);break;case"video":case"audio":for(s=0;s<Sl.length;s++)Oe(Sl[s],t);break;case"source":Oe("error",t);break;case"img":case"image":case"link":Oe("error",t),Oe("load",t);break;case"details":Oe("toggle",t);break;case"input":Oe("invalid",t),Dh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Oe("invalid",t);break;case"textarea":Oe("invalid",t),Mh(t,l.value,l.defaultValue,l.children)}s=l.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||t.textContent===""+s||l.suppressHydrationWarning===!0||Og(t.textContent,s)?(l.popover!=null&&(Oe("beforetoggle",t),Oe("toggle",t)),l.onScroll!=null&&Oe("scroll",t),l.onScrollEnd!=null&&Oe("scrollend",t),l.onClick!=null&&(t.onclick=ea),t=!0):t=!1,t||Da(e,!0)}function vp(e){for(Ut=e.return;Ut;)switch(Ut.tag){case 5:case 31:case 13:_n=!1;return;case 27:case 3:_n=!0;return;default:Ut=Ut.return}}function Js(e){if(e!==Ut)return!1;if(!Ve)return vp(e),Ve=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||sd(e.type,e.memoizedProps)),s=!s),s&&at&&Da(e),vp(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));at=Gg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));at=Gg(e)}else t===27?(t=at,Fa(e.type)?(e=cd,cd=null,at=e):at=t):at=Ut?Tn(e.stateNode.nextSibling):null;return!0}function hs(){at=Ut=null,Ve=!1}function Pc(){var e=wa;return e!==null&&(en===null?en=e:en.push.apply(en,e),wa=null),e}function Ji(e){wa===null?wa=[e]:wa.push(e)}var Hc=We(null),ps=null,sa=null;function ka(e,t,s){he(Hc,t._currentValue),t._currentValue=s}function ia(e){e._currentValue=Hc.current,Ae(Hc)}function Gc(e,t,s){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===s)break;e=e.return}}function Fc(e,t,s,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var b=c.child;f=f.firstContext;e:for(;f!==null;){var x=f;f=c;for(var N=0;N<t.length;N++)if(x.context===t[N]){f.lanes|=s,x=f.alternate,x!==null&&(x.lanes|=s),Gc(f.return,s,e),l||(b=null);break e}f=x.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(o(341));b.lanes|=s,f=b.alternate,f!==null&&(f.lanes|=s),Gc(b,s,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function Ws(e,t,s,l){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(o(387));if(b=b.memoizedProps,b!==null){var x=c.type;an(c.pendingProps.value,b.value)||(e!==null?e.push(x):e=[x])}}else if(c===ke.current){if(b=c.alternate,b===null)throw Error(o(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Cl):e=[Cl])}c=c.return}e!==null&&Fc(t,e,s,l),t.flags|=262144}function Eo(e){for(e=e.firstContext;e!==null;){if(!an(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ms(e){ps=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function It(e){return bp(ps,e)}function Co(e,t){return ps===null&&ms(e),bp(e,t)}function bp(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},sa===null){if(e===null)throw Error(o(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return s}var zS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(s,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(s){return s()})}},VS=n.unstable_scheduleCallback,PS=n.unstable_NormalPriority,Et={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qc(){return{controller:new zS,data:new Map,refCount:0}}function Wi(e){e.refCount--,e.refCount===0&&VS(PS,function(){e.controller.abort()})}var el=null,$c=0,ei=0,ti=null;function HS(e,t){if(el===null){var s=el=[];$c=0,ei=Zu(),ti={status:"pending",value:void 0,then:function(l){s.push(l)}}}return $c++,t.then(Sp,Sp),t}function Sp(){if(--$c===0&&el!==null){ti!==null&&(ti.status="fulfilled");var e=el;el=null,ei=0,ti=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function GS(e,t){var s=[],l={status:"pending",value:null,reason:null,then:function(c){s.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<s.length;c++)(0,s[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<s.length;c++)(0,s[c])(void 0)}),l}var _p=O.S;O.S=function(e,t){sg=te(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&HS(e,t),_p!==null&&_p(e,t)};var gs=We(null);function Yc(){var e=gs.current;return e!==null?e:et.pooledCache}function Ao(e,t){t===null?he(gs,gs.current):he(gs,t.pool)}function xp(){var e=Yc();return e===null?null:{parent:Et._currentValue,pool:e}}var ni=Error(o(460)),Kc=Error(o(474)),jo=Error(o(542)),No={then:function(){}};function Tp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ep(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(ea,ea),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ap(e),e;default:if(typeof t.status=="string")t.then(ea,ea);else{if(e=et,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ap(e),e}throw vs=t,ni}}function ys(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(vs=s,ni):s}}var vs=null;function Cp(){if(vs===null)throw Error(o(459));var e=vs;return vs=null,e}function Ap(e){if(e===ni||e===jo)throw Error(o(483))}var ai=null,tl=0;function wo(e){var t=tl;return tl+=1,ai===null&&(ai=[]),Ep(ai,e,t)}function nl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Do(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function jp(e){function t(B,k){if(e){var L=B.deletions;L===null?(B.deletions=[k],B.flags|=16):L.push(k)}}function s(B,k){if(!e)return null;for(;k!==null;)t(B,k),k=k.sibling;return null}function l(B){for(var k=new Map;B!==null;)B.key!==null?k.set(B.key,B):k.set(B.index,B),B=B.sibling;return k}function c(B,k){return B=na(B,k),B.index=0,B.sibling=null,B}function f(B,k,L){return B.index=L,e?(L=B.alternate,L!==null?(L=L.index,L<k?(B.flags|=67108866,k):L):(B.flags|=67108866,k)):(B.flags|=1048576,k)}function b(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function x(B,k,L,Z){return k===null||k.tag!==6?(k=Lc(L,B.mode,Z),k.return=B,k):(k=c(k,L),k.return=B,k)}function N(B,k,L,Z){var me=L.type;return me===j?$(B,k,L.props.children,Z,L.key):k!==null&&(k.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===V&&ys(me)===k.type)?(k=c(k,L.props),nl(k,L),k.return=B,k):(k=xo(L.type,L.key,L.props,null,B.mode,Z),nl(k,L),k.return=B,k)}function U(B,k,L,Z){return k===null||k.tag!==4||k.stateNode.containerInfo!==L.containerInfo||k.stateNode.implementation!==L.implementation?(k=Uc(L,B.mode,Z),k.return=B,k):(k=c(k,L.children||[]),k.return=B,k)}function $(B,k,L,Z,me){return k===null||k.tag!==7?(k=fs(L,B.mode,Z,me),k.return=B,k):(k=c(k,L),k.return=B,k)}function X(B,k,L){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Lc(""+k,B.mode,L),k.return=B,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case T:return L=xo(k.type,k.key,k.props,null,B.mode,L),nl(L,k),L.return=B,L;case E:return k=Uc(k,B.mode,L),k.return=B,k;case V:return k=ys(k),X(B,k,L)}if(Q(k)||le(k))return k=fs(k,B.mode,L,null),k.return=B,k;if(typeof k.then=="function")return X(B,wo(k),L);if(k.$$typeof===R)return X(B,Co(B,k),L);Do(B,k)}return null}function I(B,k,L,Z){var me=k!==null?k.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return me!==null?null:x(B,k,""+L,Z);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case T:return L.key===me?N(B,k,L,Z):null;case E:return L.key===me?U(B,k,L,Z):null;case V:return L=ys(L),I(B,k,L,Z)}if(Q(L)||le(L))return me!==null?null:$(B,k,L,Z,null);if(typeof L.then=="function")return I(B,k,wo(L),Z);if(L.$$typeof===R)return I(B,k,Co(B,L),Z);Do(B,L)}return null}function P(B,k,L,Z,me){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return B=B.get(L)||null,x(k,B,""+Z,me);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case T:return B=B.get(Z.key===null?L:Z.key)||null,N(k,B,Z,me);case E:return B=B.get(Z.key===null?L:Z.key)||null,U(k,B,Z,me);case V:return Z=ys(Z),P(B,k,L,Z,me)}if(Q(Z)||le(Z))return B=B.get(L)||null,$(k,B,Z,me,null);if(typeof Z.then=="function")return P(B,k,L,wo(Z),me);if(Z.$$typeof===R)return P(B,k,L,Co(k,Z),me);Do(k,Z)}return null}function re(B,k,L,Z){for(var me=null,Pe=null,fe=k,we=k=0,Ie=null;fe!==null&&we<L.length;we++){fe.index>we?(Ie=fe,fe=null):Ie=fe.sibling;var He=I(B,fe,L[we],Z);if(He===null){fe===null&&(fe=Ie);break}e&&fe&&He.alternate===null&&t(B,fe),k=f(He,k,we),Pe===null?me=He:Pe.sibling=He,Pe=He,fe=Ie}if(we===L.length)return s(B,fe),Ve&&aa(B,we),me;if(fe===null){for(;we<L.length;we++)fe=X(B,L[we],Z),fe!==null&&(k=f(fe,k,we),Pe===null?me=fe:Pe.sibling=fe,Pe=fe);return Ve&&aa(B,we),me}for(fe=l(fe);we<L.length;we++)Ie=P(fe,B,we,L[we],Z),Ie!==null&&(e&&Ie.alternate!==null&&fe.delete(Ie.key===null?we:Ie.key),k=f(Ie,k,we),Pe===null?me=Ie:Pe.sibling=Ie,Pe=Ie);return e&&fe.forEach(function(Za){return t(B,Za)}),Ve&&aa(B,we),me}function ye(B,k,L,Z){if(L==null)throw Error(o(151));for(var me=null,Pe=null,fe=k,we=k=0,Ie=null,He=L.next();fe!==null&&!He.done;we++,He=L.next()){fe.index>we?(Ie=fe,fe=null):Ie=fe.sibling;var Za=I(B,fe,He.value,Z);if(Za===null){fe===null&&(fe=Ie);break}e&&fe&&Za.alternate===null&&t(B,fe),k=f(Za,k,we),Pe===null?me=Za:Pe.sibling=Za,Pe=Za,fe=Ie}if(He.done)return s(B,fe),Ve&&aa(B,we),me;if(fe===null){for(;!He.done;we++,He=L.next())He=X(B,He.value,Z),He!==null&&(k=f(He,k,we),Pe===null?me=He:Pe.sibling=He,Pe=He);return Ve&&aa(B,we),me}for(fe=l(fe);!He.done;we++,He=L.next())He=P(fe,B,we,He.value,Z),He!==null&&(e&&He.alternate!==null&&fe.delete(He.key===null?we:He.key),k=f(He,k,we),Pe===null?me=He:Pe.sibling=He,Pe=He);return e&&fe.forEach(function(ex){return t(B,ex)}),Ve&&aa(B,we),me}function Je(B,k,L,Z){if(typeof L=="object"&&L!==null&&L.type===j&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case T:e:{for(var me=L.key;k!==null;){if(k.key===me){if(me=L.type,me===j){if(k.tag===7){s(B,k.sibling),Z=c(k,L.props.children),Z.return=B,B=Z;break e}}else if(k.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===V&&ys(me)===k.type){s(B,k.sibling),Z=c(k,L.props),nl(Z,L),Z.return=B,B=Z;break e}s(B,k);break}else t(B,k);k=k.sibling}L.type===j?(Z=fs(L.props.children,B.mode,Z,L.key),Z.return=B,B=Z):(Z=xo(L.type,L.key,L.props,null,B.mode,Z),nl(Z,L),Z.return=B,B=Z)}return b(B);case E:e:{for(me=L.key;k!==null;){if(k.key===me)if(k.tag===4&&k.stateNode.containerInfo===L.containerInfo&&k.stateNode.implementation===L.implementation){s(B,k.sibling),Z=c(k,L.children||[]),Z.return=B,B=Z;break e}else{s(B,k);break}else t(B,k);k=k.sibling}Z=Uc(L,B.mode,Z),Z.return=B,B=Z}return b(B);case V:return L=ys(L),Je(B,k,L,Z)}if(Q(L))return re(B,k,L,Z);if(le(L)){if(me=le(L),typeof me!="function")throw Error(o(150));return L=me.call(L),ye(B,k,L,Z)}if(typeof L.then=="function")return Je(B,k,wo(L),Z);if(L.$$typeof===R)return Je(B,k,Co(B,L),Z);Do(B,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,k!==null&&k.tag===6?(s(B,k.sibling),Z=c(k,L),Z.return=B,B=Z):(s(B,k),Z=Lc(L,B.mode,Z),Z.return=B,B=Z),b(B)):s(B,k)}return function(B,k,L,Z){try{tl=0;var me=Je(B,k,L,Z);return ai=null,me}catch(fe){if(fe===ni||fe===jo)throw fe;var Pe=sn(29,fe,null,B.mode);return Pe.lanes=Z,Pe.return=B,Pe}finally{}}}var bs=jp(!0),Np=jp(!1),Ma=!1;function Zc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Oa(e,t,s){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Fe&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=_o(e),dp(e,null,s),t}return So(e,l,t,s),_o(e)}function al(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,bh(e,s)}}function Qc(e,t){var s=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var b={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};f===null?c=f=b:f=f.next=b,s=s.next}while(s!==null);f===null?c=f=t:f=f.next=t}else c=f=t;s={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}var Jc=!1;function sl(){if(Jc){var e=ti;if(e!==null)throw e}}function il(e,t,s,l){Jc=!1;var c=e.updateQueue;Ma=!1;var f=c.firstBaseUpdate,b=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var N=x,U=N.next;N.next=null,b===null?f=U:b.next=U,b=N;var $=e.alternate;$!==null&&($=$.updateQueue,x=$.lastBaseUpdate,x!==b&&(x===null?$.firstBaseUpdate=U:x.next=U,$.lastBaseUpdate=N))}if(f!==null){var X=c.baseState;b=0,$=U=N=null,x=f;do{var I=x.lane&-536870913,P=I!==x.lane;if(P?(Ue&I)===I:(l&I)===I){I!==0&&I===ei&&(Jc=!0),$!==null&&($=$.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var re=e,ye=x;I=t;var Je=s;switch(ye.tag){case 1:if(re=ye.payload,typeof re=="function"){X=re.call(Je,X,I);break e}X=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=ye.payload,I=typeof re=="function"?re.call(Je,X,I):re,I==null)break e;X=y({},X,I);break e;case 2:Ma=!0}}I=x.callback,I!==null&&(e.flags|=64,P&&(e.flags|=8192),P=c.callbacks,P===null?c.callbacks=[I]:P.push(I))}else P={lane:I,tag:x.tag,payload:x.payload,callback:x.callback,next:null},$===null?(U=$=P,N=X):$=$.next=P,b|=I;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;P=x,x=P.next,P.next=null,c.lastBaseUpdate=P,c.shared.pending=null}}while(!0);$===null&&(N=X),c.baseState=N,c.firstBaseUpdate=U,c.lastBaseUpdate=$,f===null&&(c.shared.lanes=0),za|=b,e.lanes=b,e.memoizedState=X}}function wp(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Dp(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)wp(s[e],t)}var si=We(null),ko=We(0);function kp(e,t){e=pa,he(ko,e),he(si,t),pa=e|t.baseLanes}function Wc(){he(ko,pa),he(si,si.current)}function eu(){pa=ko.current,Ae(si),Ae(ko)}var ln=We(null),xn=null;function Ba(e){var t=e.alternate;he(vt,vt.current&1),he(ln,e),xn===null&&(t===null||si.current!==null||t.memoizedState!==null)&&(xn=e)}function tu(e){he(vt,vt.current),he(ln,e),xn===null&&(xn=e)}function Mp(e){e.tag===22?(he(vt,vt.current),he(ln,e),xn===null&&(xn=e)):La()}function La(){he(vt,vt.current),he(ln,ln.current)}function on(e){Ae(ln),xn===e&&(xn=null),Ae(vt)}var vt=We(0);function Mo(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||od(s)||rd(s)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var la=0,Ne=null,Xe=null,Ct=null,Ro=!1,ii=!1,Ss=!1,Oo=0,ll=0,li=null,FS=0;function ft(){throw Error(o(321))}function nu(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!an(e[s],t[s]))return!1;return!0}function au(e,t,s,l,c,f){return la=f,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?mm:vu,Ss=!1,f=s(l,c),Ss=!1,ii&&(f=Op(t,s,l,c)),Rp(e),f}function Rp(e){O.H=cl;var t=Xe!==null&&Xe.next!==null;if(la=0,Ct=Xe=Ne=null,Ro=!1,ll=0,li=null,t)throw Error(o(300));e===null||At||(e=e.dependencies,e!==null&&Eo(e)&&(At=!0))}function Op(e,t,s,l){Ne=e;var c=0;do{if(ii&&(li=null),ll=0,ii=!1,25<=c)throw Error(o(301));if(c+=1,Ct=Xe=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}O.H=gm,f=t(s,l)}while(ii);return f}function qS(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?ol(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(Ne.flags|=1024),t}function su(){var e=Oo!==0;return Oo=0,e}function iu(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function lu(e){if(Ro){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ro=!1}la=0,Ct=Xe=Ne=null,ii=!1,ll=Oo=0,li=null}function qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?Ne.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function bt(){if(Xe===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=Ct===null?Ne.memoizedState:Ct.next;if(t!==null)Ct=t,Xe=e;else{if(e===null)throw Ne.alternate===null?Error(o(467)):Error(o(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},Ct===null?Ne.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function Bo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ol(e){var t=ll;return ll+=1,li===null&&(li=[]),e=Ep(li,e,t),t=Ne,(Ct===null?t.memoizedState:Ct.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?mm:vu),e}function Lo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ol(e);if(e.$$typeof===R)return It(e)}throw Error(o(438,String(e)))}function ou(e){var t=null,s=Ne.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var l=Ne.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),s===null&&(s=Bo(),Ne.updateQueue=s),s.memoCache=t,s=t.data[t.index],s===void 0)for(s=t.data[t.index]=Array(e),l=0;l<e;l++)s[l]=ae;return t.index++,s}function oa(e,t){return typeof t=="function"?t(e):t}function Uo(e){var t=bt();return ru(t,Xe,e)}function ru(e,t,s){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=s;var c=e.baseQueue,f=l.pending;if(f!==null){if(c!==null){var b=c.next;c.next=f.next,f.next=b}t.baseQueue=c=f,l.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var x=b=null,N=null,U=t,$=!1;do{var X=U.lane&-536870913;if(X!==U.lane?(Ue&X)===X:(la&X)===X){var I=U.revertLane;if(I===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),X===ei&&($=!0);else if((la&I)===I){U=U.next,I===ei&&($=!0);continue}else X={lane:0,revertLane:U.revertLane,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},N===null?(x=N=X,b=f):N=N.next=X,Ne.lanes|=I,za|=I;X=U.action,Ss&&s(f,X),f=U.hasEagerState?U.eagerState:s(f,X)}else I={lane:X,revertLane:U.revertLane,gesture:U.gesture,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},N===null?(x=N=I,b=f):N=N.next=I,Ne.lanes|=X,za|=X;U=U.next}while(U!==null&&U!==t);if(N===null?b=f:N.next=x,!an(f,e.memoizedState)&&(At=!0,$&&(s=ti,s!==null)))throw s;e.memoizedState=f,e.baseState=b,e.baseQueue=N,l.lastRenderedState=f}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function cu(e){var t=bt(),s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var l=s.dispatch,c=s.pending,f=t.memoizedState;if(c!==null){s.pending=null;var b=c=c.next;do f=e(f,b.action),b=b.next;while(b!==c);an(f,t.memoizedState)||(At=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,l]}function Bp(e,t,s){var l=Ne,c=bt(),f=Ve;if(f){if(s===void 0)throw Error(o(407));s=s()}else s=t();var b=!an((Xe||c).memoizedState,s);if(b&&(c.memoizedState=s,At=!0),c=c.queue,fu(Ip.bind(null,l,c,e),[e]),c.getSnapshot!==t||b||Ct!==null&&Ct.memoizedState.tag&1){if(l.flags|=2048,oi(9,{destroy:void 0},Up.bind(null,l,c,s,t),null),et===null)throw Error(o(349));f||(la&127)!==0||Lp(l,t,s)}return s}function Lp(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Ne.updateQueue,t===null?(t=Bo(),Ne.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function Up(e,t,s,l){t.value=s,t.getSnapshot=l,zp(t)&&Vp(e)}function Ip(e,t,s){return s(function(){zp(t)&&Vp(e)})}function zp(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!an(e,s)}catch{return!0}}function Vp(e){var t=ds(e,2);t!==null&&tn(t,e,2)}function uu(e){var t=qt();if(typeof e=="function"){var s=e;if(e=s(),Ss){Dt(!0);try{s()}finally{Dt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:e},t}function Pp(e,t,s,l){return e.baseState=s,ru(e,Xe,typeof l=="function"?l:oa)}function $S(e,t,s,l,c){if(Vo(e))throw Error(o(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){f.listeners.push(b)}};O.T!==null?s(!0):f.isTransition=!1,l(f),s=t.pending,s===null?(f.next=t.pending=f,Hp(t,f)):(f.next=s.next,t.pending=s.next=f)}}function Hp(e,t){var s=t.action,l=t.payload,c=e.state;if(t.isTransition){var f=O.T,b={};O.T=b;try{var x=s(c,l),N=O.S;N!==null&&N(b,x),Gp(e,t,x)}catch(U){du(e,t,U)}finally{f!==null&&b.types!==null&&(f.types=b.types),O.T=f}}else try{f=s(c,l),Gp(e,t,f)}catch(U){du(e,t,U)}}function Gp(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){Fp(e,t,l)},function(l){return du(e,t,l)}):Fp(e,t,s)}function Fp(e,t,s){t.status="fulfilled",t.value=s,qp(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,Hp(e,s)))}function du(e,t,s){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=s,qp(t),t=t.next;while(t!==l)}e.action=null}function qp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $p(e,t){return t}function Yp(e,t){if(Ve){var s=et.formState;if(s!==null){e:{var l=Ne;if(Ve){if(at){t:{for(var c=at,f=_n;c.nodeType!==8;){if(!f){c=null;break t}if(c=Tn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){at=Tn(c.nextSibling),l=c.data==="F!";break e}}Da(l)}l=!1}l&&(t=s[0])}}return s=qt(),s.memoizedState=s.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$p,lastRenderedState:t},s.queue=l,s=fm.bind(null,Ne,l),l.dispatch=s,l=uu(!1),f=yu.bind(null,Ne,!1,l.queue),l=qt(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,s=$S.bind(null,Ne,c,f,s),c.dispatch=s,l.memoizedState=e,[t,s,!1]}function Kp(e){var t=bt();return Zp(t,Xe,e)}function Zp(e,t,s){if(t=ru(e,t,$p)[0],e=Uo(oa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ol(t)}catch(b){throw b===ni?jo:b}else l=t;t=bt();var c=t.queue,f=c.dispatch;return s!==t.memoizedState&&(Ne.flags|=2048,oi(9,{destroy:void 0},YS.bind(null,c,s),null)),[l,f,e]}function YS(e,t){e.action=t}function Xp(e){var t=bt(),s=Xe;if(s!==null)return Zp(t,s,e);bt(),t=t.memoizedState,s=bt();var l=s.queue.dispatch;return s.memoizedState=e,[t,l,!1]}function oi(e,t,s,l){return e={tag:e,create:s,deps:l,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=Bo(),Ne.updateQueue=t),s=t.lastEffect,s===null?t.lastEffect=e.next=e:(l=s.next,s.next=e,e.next=l,t.lastEffect=e),e}function Qp(){return bt().memoizedState}function Io(e,t,s,l){var c=qt();Ne.flags|=e,c.memoizedState=oi(1|t,{destroy:void 0},s,l===void 0?null:l)}function zo(e,t,s,l){var c=bt();l=l===void 0?null:l;var f=c.memoizedState.inst;Xe!==null&&l!==null&&nu(l,Xe.memoizedState.deps)?c.memoizedState=oi(t,f,s,l):(Ne.flags|=e,c.memoizedState=oi(1|t,f,s,l))}function Jp(e,t){Io(8390656,8,e,t)}function fu(e,t){zo(2048,8,e,t)}function KS(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=Bo(),Ne.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function Wp(e){var t=bt().memoizedState;return KS({ref:t,nextImpl:e}),function(){if((Fe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function em(e,t){return zo(4,2,e,t)}function tm(e,t){return zo(4,4,e,t)}function nm(e,t){if(typeof t=="function"){e=e();var s=t(e);return function(){typeof s=="function"?s():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function am(e,t,s){s=s!=null?s.concat([e]):null,zo(4,4,nm.bind(null,t,e),s)}function hu(){}function sm(e,t){var s=bt();t=t===void 0?null:t;var l=s.memoizedState;return t!==null&&nu(t,l[1])?l[0]:(s.memoizedState=[e,t],e)}function im(e,t){var s=bt();t=t===void 0?null:t;var l=s.memoizedState;if(t!==null&&nu(t,l[1]))return l[0];if(l=e(),Ss){Dt(!0);try{e()}finally{Dt(!1)}}return s.memoizedState=[l,t],l}function pu(e,t,s){return s===void 0||(la&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=lg(),Ne.lanes|=e,za|=e,s)}function lm(e,t,s,l){return an(s,t)?s:si.current!==null?(e=pu(e,s,l),an(e,t)||(At=!0),e):(la&42)===0||(la&1073741824)!==0&&(Ue&261930)===0?(At=!0,e.memoizedState=s):(e=lg(),Ne.lanes|=e,za|=e,t)}function om(e,t,s,l,c){var f=G.p;G.p=f!==0&&8>f?f:8;var b=O.T,x={};O.T=x,yu(e,!1,t,s);try{var N=c(),U=O.S;if(U!==null&&U(x,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var $=GS(N,l);rl(e,t,$,un(e))}else rl(e,t,l,un(e))}catch(X){rl(e,t,{then:function(){},status:"rejected",reason:X},un())}finally{G.p=f,b!==null&&x.types!==null&&(b.types=x.types),O.T=b}}function ZS(){}function mu(e,t,s,l){if(e.tag!==5)throw Error(o(476));var c=rm(e).queue;om(e,c,t,ee,s===null?ZS:function(){return cm(e),s(l)})}function rm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:ee},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function cm(e){var t=rm(e);t.next===null&&(t=e.alternate.memoizedState),rl(e,t.next.queue,{},un())}function gu(){return It(Cl)}function um(){return bt().memoizedState}function dm(){return bt().memoizedState}function XS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=un();e=Ra(s);var l=Oa(t,e,s);l!==null&&(tn(l,t,s),al(l,t,s)),t={cache:qc()},e.payload=t;return}t=t.return}}function QS(e,t,s){var l=un();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Vo(e)?hm(t,s):(s=Oc(e,t,s,l),s!==null&&(tn(s,e,l),pm(s,t,l)))}function fm(e,t,s){var l=un();rl(e,t,s,l)}function rl(e,t,s,l){var c={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Vo(e))hm(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var b=t.lastRenderedState,x=f(b,s);if(c.hasEagerState=!0,c.eagerState=x,an(x,b))return So(e,t,c,0),et===null&&bo(),!1}catch{}finally{}if(s=Oc(e,t,c,l),s!==null)return tn(s,e,l),pm(s,t,l),!0}return!1}function yu(e,t,s,l){if(l={lane:2,revertLane:Zu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Vo(e)){if(t)throw Error(o(479))}else t=Oc(e,s,l,2),t!==null&&tn(t,e,2)}function Vo(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function hm(e,t){ii=Ro=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function pm(e,t,s){if((s&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,bh(e,s)}}var cl={readContext:It,use:Lo,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};cl.useEffectEvent=ft;var mm={readContext:It,use:Lo,useCallback:function(e,t){return qt().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:Jp,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,Io(4194308,4,nm.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Io(4194308,4,e,t)},useInsertionEffect:function(e,t){Io(4,2,e,t)},useMemo:function(e,t){var s=qt();t=t===void 0?null:t;var l=e();if(Ss){Dt(!0);try{e()}finally{Dt(!1)}}return s.memoizedState=[l,t],l},useReducer:function(e,t,s){var l=qt();if(s!==void 0){var c=s(t);if(Ss){Dt(!0);try{s(t)}finally{Dt(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=QS.bind(null,Ne,e),[l.memoizedState,e]},useRef:function(e){var t=qt();return e={current:e},t.memoizedState=e},useState:function(e){e=uu(e);var t=e.queue,s=fm.bind(null,Ne,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:hu,useDeferredValue:function(e,t){var s=qt();return pu(s,e,t)},useTransition:function(){var e=uu(!1);return e=om.bind(null,Ne,e.queue,!0,!1),qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var l=Ne,c=qt();if(Ve){if(s===void 0)throw Error(o(407));s=s()}else{if(s=t(),et===null)throw Error(o(349));(Ue&127)!==0||Lp(l,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,Jp(Ip.bind(null,l,f,e),[e]),l.flags|=2048,oi(9,{destroy:void 0},Up.bind(null,l,f,s,t),null),s},useId:function(){var e=qt(),t=et.identifierPrefix;if(Ve){var s=Vn,l=zn;s=(l&~(1<<32-Ee(l)-1)).toString(32)+s,t="_"+t+"R_"+s,s=Oo++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=FS++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:gu,useFormState:Yp,useActionState:Yp,useOptimistic:function(e){var t=qt();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=yu.bind(null,Ne,!0,s),s.dispatch=t,[e,t]},useMemoCache:ou,useCacheRefresh:function(){return qt().memoizedState=XS.bind(null,Ne)},useEffectEvent:function(e){var t=qt(),s={impl:e};return t.memoizedState=s,function(){if((Fe&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},vu={readContext:It,use:Lo,useCallback:sm,useContext:It,useEffect:fu,useImperativeHandle:am,useInsertionEffect:em,useLayoutEffect:tm,useMemo:im,useReducer:Uo,useRef:Qp,useState:function(){return Uo(oa)},useDebugValue:hu,useDeferredValue:function(e,t){var s=bt();return lm(s,Xe.memoizedState,e,t)},useTransition:function(){var e=Uo(oa)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:ol(e),t]},useSyncExternalStore:Bp,useId:um,useHostTransitionStatus:gu,useFormState:Kp,useActionState:Kp,useOptimistic:function(e,t){var s=bt();return Pp(s,Xe,e,t)},useMemoCache:ou,useCacheRefresh:dm};vu.useEffectEvent=Wp;var gm={readContext:It,use:Lo,useCallback:sm,useContext:It,useEffect:fu,useImperativeHandle:am,useInsertionEffect:em,useLayoutEffect:tm,useMemo:im,useReducer:cu,useRef:Qp,useState:function(){return cu(oa)},useDebugValue:hu,useDeferredValue:function(e,t){var s=bt();return Xe===null?pu(s,e,t):lm(s,Xe.memoizedState,e,t)},useTransition:function(){var e=cu(oa)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:ol(e),t]},useSyncExternalStore:Bp,useId:um,useHostTransitionStatus:gu,useFormState:Xp,useActionState:Xp,useOptimistic:function(e,t){var s=bt();return Xe!==null?Pp(s,Xe,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:ou,useCacheRefresh:dm};gm.useEffectEvent=Wp;function bu(e,t,s,l){t=e.memoizedState,s=s(l,t),s=s==null?t:y({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Su={enqueueSetState:function(e,t,s){e=e._reactInternals;var l=un(),c=Ra(l);c.payload=t,s!=null&&(c.callback=s),t=Oa(e,c,l),t!==null&&(tn(t,e,l),al(t,e,l))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var l=un(),c=Ra(l);c.tag=1,c.payload=t,s!=null&&(c.callback=s),t=Oa(e,c,l),t!==null&&(tn(t,e,l),al(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=un(),l=Ra(s);l.tag=2,t!=null&&(l.callback=t),t=Oa(e,l,s),t!==null&&(tn(t,e,s),al(t,e,s))}};function ym(e,t,s,l,c,f,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,b):t.prototype&&t.prototype.isPureReactComponent?!Zi(s,l)||!Zi(c,f):!0}function vm(e,t,s,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,l),t.state!==e&&Su.enqueueReplaceState(t,t.state,null)}function _s(e,t){var s=t;if("ref"in t){s={};for(var l in t)l!=="ref"&&(s[l]=t[l])}if(e=e.defaultProps){s===t&&(s=y({},s));for(var c in e)s[c]===void 0&&(s[c]=e[c])}return s}function bm(e){vo(e)}function Sm(e){console.error(e)}function _m(e){vo(e)}function Po(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function xm(e,t,s){try{var l=e.onCaughtError;l(s.value,{componentStack:s.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function _u(e,t,s){return s=Ra(s),s.tag=3,s.payload={element:null},s.callback=function(){Po(e,t)},s}function Tm(e){return e=Ra(e),e.tag=3,e}function Em(e,t,s,l){var c=s.type.getDerivedStateFromError;if(typeof c=="function"){var f=l.value;e.payload=function(){return c(f)},e.callback=function(){xm(t,s,l)}}var b=s.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){xm(t,s,l),typeof c!="function"&&(Va===null?Va=new Set([this]):Va.add(this));var x=l.stack;this.componentDidCatch(l.value,{componentStack:x!==null?x:""})})}function JS(e,t,s,l,c){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=s.alternate,t!==null&&Ws(t,s,c,!0),s=ln.current,s!==null){switch(s.tag){case 31:case 13:return xn===null?Wo():s.alternate===null&&ht===0&&(ht=3),s.flags&=-257,s.flags|=65536,s.lanes=c,l===No?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([l]):t.add(l),$u(e,l,c)),!1;case 22:return s.flags|=65536,l===No?s.flags|=16384:(t=s.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},s.updateQueue=t):(s=t.retryQueue,s===null?t.retryQueue=new Set([l]):s.add(l)),$u(e,l,c)),!1}throw Error(o(435,s.tag))}return $u(e,l,c),Wo(),!1}if(Ve)return t=ln.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Vc&&(e=Error(o(422),{cause:l}),Ji(vn(e,s)))):(l!==Vc&&(t=Error(o(423),{cause:l}),Ji(vn(t,s))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=vn(l,s),c=_u(e.stateNode,l,c),Qc(e,c),ht!==4&&(ht=2)),!1;var f=Error(o(520),{cause:l});if(f=vn(f,s),yl===null?yl=[f]:yl.push(f),ht!==4&&(ht=2),t===null)return!0;l=vn(l,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=c&-c,s.lanes|=e,e=_u(s.stateNode,l,e),Qc(s,e),!1;case 1:if(t=s.type,f=s.stateNode,(s.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Va===null||!Va.has(f))))return s.flags|=65536,c&=-c,s.lanes|=c,c=Tm(c),Em(c,e,s,l),Qc(s,c),!1}s=s.return}while(s!==null);return!1}var xu=Error(o(461)),At=!1;function zt(e,t,s,l){t.child=e===null?Np(t,null,s,l):bs(t,e.child,s,l)}function Cm(e,t,s,l,c){s=s.render;var f=t.ref;if("ref"in l){var b={};for(var x in l)x!=="ref"&&(b[x]=l[x])}else b=l;return ms(t),l=au(e,t,s,b,f,c),x=su(),e!==null&&!At?(iu(e,t,c),ra(e,t,c)):(Ve&&x&&Ic(t),t.flags|=1,zt(e,t,l,c),t.child)}function Am(e,t,s,l,c){if(e===null){var f=s.type;return typeof f=="function"&&!Bc(f)&&f.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=f,jm(e,t,f,l,c)):(e=xo(s.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Du(e,c)){var b=f.memoizedProps;if(s=s.compare,s=s!==null?s:Zi,s(b,l)&&e.ref===t.ref)return ra(e,t,c)}return t.flags|=1,e=na(f,l),e.ref=t.ref,e.return=t,t.child=e}function jm(e,t,s,l,c){if(e!==null){var f=e.memoizedProps;if(Zi(f,l)&&e.ref===t.ref)if(At=!1,t.pendingProps=l=f,Du(e,c))(e.flags&131072)!==0&&(At=!0);else return t.lanes=e.lanes,ra(e,t,c)}return Tu(e,t,s,l,c)}function Nm(e,t,s,l){var c=l.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|s:s,e!==null){for(l=t.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~f}else l=0,t.child=null;return wm(e,t,f,s,l)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ao(t,f!==null?f.cachePool:null),f!==null?kp(t,f):Wc(),Mp(t);else return l=t.lanes=536870912,wm(e,t,f!==null?f.baseLanes|s:s,s,l)}else f!==null?(Ao(t,f.cachePool),kp(t,f),La(),t.memoizedState=null):(e!==null&&Ao(t,null),Wc(),La());return zt(e,t,c,s),t.child}function ul(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function wm(e,t,s,l,c){var f=Yc();return f=f===null?null:{parent:Et._currentValue,pool:f},t.memoizedState={baseLanes:s,cachePool:f},e!==null&&Ao(t,null),Wc(),Mp(t),e!==null&&Ws(e,t,l,!0),t.childLanes=c,null}function Ho(e,t){return t=Fo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Dm(e,t,s){return bs(t,e.child,null,s),e=Ho(t,t.pendingProps),e.flags|=2,on(t),t.memoizedState=null,e}function WS(e,t,s){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ve){if(l.mode==="hidden")return e=Ho(t,l),t.lanes=536870912,ul(null,e);if(tu(t),(e=at)?(e=Hg(e,_n),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Na!==null?{id:zn,overflow:Vn}:null,retryLane:536870912,hydrationErrors:null},s=hp(e),s.return=t,t.child=s,Ut=t,at=null)):e=null,e===null)throw Da(t);return t.lanes=536870912,null}return Ho(t,l)}var f=e.memoizedState;if(f!==null){var b=f.dehydrated;if(tu(t),c)if(t.flags&256)t.flags&=-257,t=Dm(e,t,s);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(At||Ws(e,t,s,!1),c=(s&e.childLanes)!==0,At||c){if(l=et,l!==null&&(b=Sh(l,s),b!==0&&b!==f.retryLane))throw f.retryLane=b,ds(e,b),tn(l,e,b),xu;Wo(),t=Dm(e,t,s)}else e=f.treeContext,at=Tn(b.nextSibling),Ut=t,Ve=!0,wa=null,_n=!1,e!==null&&gp(t,e),t=Ho(t,l),t.flags|=4096;return t}return e=na(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Go(e,t){var s=t.ref;if(s===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(e===null||e.ref!==s)&&(t.flags|=4194816)}}function Tu(e,t,s,l,c){return ms(t),s=au(e,t,s,l,void 0,c),l=su(),e!==null&&!At?(iu(e,t,c),ra(e,t,c)):(Ve&&l&&Ic(t),t.flags|=1,zt(e,t,s,c),t.child)}function km(e,t,s,l,c,f){return ms(t),t.updateQueue=null,s=Op(t,l,s,c),Rp(e),l=su(),e!==null&&!At?(iu(e,t,f),ra(e,t,f)):(Ve&&l&&Ic(t),t.flags|=1,zt(e,t,s,f),t.child)}function Mm(e,t,s,l,c){if(ms(t),t.stateNode===null){var f=Zs,b=s.contextType;typeof b=="object"&&b!==null&&(f=It(b)),f=new s(l,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Su,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=l,f.state=t.memoizedState,f.refs={},Zc(t),b=s.contextType,f.context=typeof b=="object"&&b!==null?It(b):Zs,f.state=t.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(bu(t,s,b,l),f.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(b=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),b!==f.state&&Su.enqueueReplaceState(f,f.state,null),il(t,l,f,c),sl(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){f=t.stateNode;var x=t.memoizedProps,N=_s(s,x);f.props=N;var U=f.context,$=s.contextType;b=Zs,typeof $=="object"&&$!==null&&(b=It($));var X=s.getDerivedStateFromProps;$=typeof X=="function"||typeof f.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,$||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(x||U!==b)&&vm(t,f,l,b),Ma=!1;var I=t.memoizedState;f.state=I,il(t,l,f,c),sl(),U=t.memoizedState,x||I!==U||Ma?(typeof X=="function"&&(bu(t,s,X,l),U=t.memoizedState),(N=Ma||ym(t,s,N,l,I,U,b))?($||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=U),f.props=l,f.state=U,f.context=b,l=N):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{f=t.stateNode,Xc(e,t),b=t.memoizedProps,$=_s(s,b),f.props=$,X=t.pendingProps,I=f.context,U=s.contextType,N=Zs,typeof U=="object"&&U!==null&&(N=It(U)),x=s.getDerivedStateFromProps,(U=typeof x=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b!==X||I!==N)&&vm(t,f,l,N),Ma=!1,I=t.memoizedState,f.state=I,il(t,l,f,c),sl();var P=t.memoizedState;b!==X||I!==P||Ma||e!==null&&e.dependencies!==null&&Eo(e.dependencies)?(typeof x=="function"&&(bu(t,s,x,l),P=t.memoizedState),($=Ma||ym(t,s,$,l,I,P,N)||e!==null&&e.dependencies!==null&&Eo(e.dependencies))?(U||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,P,N),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,P,N)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=P),f.props=l,f.state=P,f.context=N,l=$):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),l=!1)}return f=l,Go(e,t),l=(t.flags&128)!==0,f||l?(f=t.stateNode,s=l&&typeof s.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&l?(t.child=bs(t,e.child,null,c),t.child=bs(t,null,s,c)):zt(e,t,s,c),t.memoizedState=f.state,e=t.child):e=ra(e,t,c),e}function Rm(e,t,s,l){return hs(),t.flags|=256,zt(e,t,s,l),t.child}var Eu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cu(e){return{baseLanes:e,cachePool:xp()}}function Au(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=cn),e}function Om(e,t,s){var l=t.pendingProps,c=!1,f=(t.flags&128)!==0,b;if((b=f)||(b=e!==null&&e.memoizedState===null?!1:(vt.current&2)!==0),b&&(c=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ve){if(c?Ba(t):La(),(e=at)?(e=Hg(e,_n),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Na!==null?{id:zn,overflow:Vn}:null,retryLane:536870912,hydrationErrors:null},s=hp(e),s.return=t,t.child=s,Ut=t,at=null)):e=null,e===null)throw Da(t);return rd(e)?t.lanes=32:t.lanes=536870912,null}var x=l.children;return l=l.fallback,c?(La(),c=t.mode,x=Fo({mode:"hidden",children:x},c),l=fs(l,c,s,null),x.return=t,l.return=t,x.sibling=l,t.child=x,l=t.child,l.memoizedState=Cu(s),l.childLanes=Au(e,b,s),t.memoizedState=Eu,ul(null,l)):(Ba(t),ju(t,x))}var N=e.memoizedState;if(N!==null&&(x=N.dehydrated,x!==null)){if(f)t.flags&256?(Ba(t),t.flags&=-257,t=Nu(e,t,s)):t.memoizedState!==null?(La(),t.child=e.child,t.flags|=128,t=null):(La(),x=l.fallback,c=t.mode,l=Fo({mode:"visible",children:l.children},c),x=fs(x,c,s,null),x.flags|=2,l.return=t,x.return=t,l.sibling=x,t.child=l,bs(t,e.child,null,s),l=t.child,l.memoizedState=Cu(s),l.childLanes=Au(e,b,s),t.memoizedState=Eu,t=ul(null,l));else if(Ba(t),rd(x)){if(b=x.nextSibling&&x.nextSibling.dataset,b)var U=b.dgst;b=U,l=Error(o(419)),l.stack="",l.digest=b,Ji({value:l,source:null,stack:null}),t=Nu(e,t,s)}else if(At||Ws(e,t,s,!1),b=(s&e.childLanes)!==0,At||b){if(b=et,b!==null&&(l=Sh(b,s),l!==0&&l!==N.retryLane))throw N.retryLane=l,ds(e,l),tn(b,e,l),xu;od(x)||Wo(),t=Nu(e,t,s)}else od(x)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,at=Tn(x.nextSibling),Ut=t,Ve=!0,wa=null,_n=!1,e!==null&&gp(t,e),t=ju(t,l.children),t.flags|=4096);return t}return c?(La(),x=l.fallback,c=t.mode,N=e.child,U=N.sibling,l=na(N,{mode:"hidden",children:l.children}),l.subtreeFlags=N.subtreeFlags&65011712,U!==null?x=na(U,x):(x=fs(x,c,s,null),x.flags|=2),x.return=t,l.return=t,l.sibling=x,t.child=l,ul(null,l),l=t.child,x=e.child.memoizedState,x===null?x=Cu(s):(c=x.cachePool,c!==null?(N=Et._currentValue,c=c.parent!==N?{parent:N,pool:N}:c):c=xp(),x={baseLanes:x.baseLanes|s,cachePool:c}),l.memoizedState=x,l.childLanes=Au(e,b,s),t.memoizedState=Eu,ul(e.child,l)):(Ba(t),s=e.child,e=s.sibling,s=na(s,{mode:"visible",children:l.children}),s.return=t,s.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=s,t.memoizedState=null,s)}function ju(e,t){return t=Fo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Fo(e,t){return e=sn(22,e,null,t),e.lanes=0,e}function Nu(e,t,s){return bs(t,e.child,null,s),e=ju(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Bm(e,t,s){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Gc(e.return,t,s)}function wu(e,t,s,l,c,f){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:c,treeForkCount:f}:(b.isBackwards=t,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail=s,b.tailMode=c,b.treeForkCount=f)}function Lm(e,t,s){var l=t.pendingProps,c=l.revealOrder,f=l.tail;l=l.children;var b=vt.current,x=(b&2)!==0;if(x?(b=b&1|2,t.flags|=128):b&=1,he(vt,b),zt(e,t,l,s),l=Ve?Qi:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bm(e,s,t);else if(e.tag===19)Bm(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(s=t.child,c=null;s!==null;)e=s.alternate,e!==null&&Mo(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),wu(t,!1,c,s,f,l);break;case"backwards":case"unstable_legacy-backwards":for(s=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Mo(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}wu(t,!0,s,null,f,l);break;case"together":wu(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function ra(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),za|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(Ws(e,t,s,!1),(s&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,s=na(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=na(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Du(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Eo(e)))}function e_(e,t,s){switch(t.tag){case 3:H(t,t.stateNode.containerInfo),ka(t,Et,e.memoizedState.cache),hs();break;case 27:case 5:Ge(t);break;case 4:H(t,t.stateNode.containerInfo);break;case 10:ka(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,tu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Ba(t),t.flags|=128,null):(s&t.child.childLanes)!==0?Om(e,t,s):(Ba(t),e=ra(e,t,s),e!==null?e.sibling:null);Ba(t);break;case 19:var c=(e.flags&128)!==0;if(l=(s&t.childLanes)!==0,l||(Ws(e,t,s,!1),l=(s&t.childLanes)!==0),c){if(l)return Lm(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),he(vt,vt.current),l)break;return null;case 22:return t.lanes=0,Nm(e,t,s,t.pendingProps);case 24:ka(t,Et,e.memoizedState.cache)}return ra(e,t,s)}function Um(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)At=!0;else{if(!Du(e,s)&&(t.flags&128)===0)return At=!1,e_(e,t,s);At=(e.flags&131072)!==0}else At=!1,Ve&&(t.flags&1048576)!==0&&mp(t,Qi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=ys(t.elementType),t.type=e,typeof e=="function")Bc(e)?(l=_s(e,l),t.tag=1,t=Mm(null,t,e,l,s)):(t.tag=0,t=Tu(null,t,e,l,s));else{if(e!=null){var c=e.$$typeof;if(c===Y){t.tag=11,t=Cm(null,t,e,l,s);break e}else if(c===q){t.tag=14,t=Am(null,t,e,l,s);break e}}throw t=K(e)||e,Error(o(306,t,""))}}return t;case 0:return Tu(e,t,t.type,t.pendingProps,s);case 1:return l=t.type,c=_s(l,t.pendingProps),Mm(e,t,l,c,s);case 3:e:{if(H(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var f=t.memoizedState;c=f.element,Xc(e,t),il(t,l,null,s);var b=t.memoizedState;if(l=b.cache,ka(t,Et,l),l!==f.cache&&Fc(t,[Et],s,!0),sl(),l=b.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Rm(e,t,l,s);break e}else if(l!==c){c=vn(Error(o(424)),t),Ji(c),t=Rm(e,t,l,s);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(at=Tn(e.firstChild),Ut=t,Ve=!0,wa=null,_n=!0,s=Np(t,null,l,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(hs(),l===c){t=ra(e,t,s);break e}zt(e,t,l,s)}t=t.child}return t;case 26:return Go(e,t),e===null?(s=Kg(t.type,null,t.pendingProps,null))?t.memoizedState=s:Ve||(s=t.type,e=t.pendingProps,l=lr(ne.current).createElement(s),l[Lt]=t,l[Zt]=e,Vt(l,s,e),Rt(l),t.stateNode=l):t.memoizedState=Kg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ge(t),e===null&&Ve&&(l=t.stateNode=qg(t.type,t.pendingProps,ne.current),Ut=t,_n=!0,c=at,Fa(t.type)?(cd=c,at=Tn(l.firstChild)):at=c),zt(e,t,t.pendingProps.children,s),Go(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ve&&((c=l=at)&&(l=D_(l,t.type,t.pendingProps,_n),l!==null?(t.stateNode=l,Ut=t,at=Tn(l.firstChild),_n=!1,c=!0):c=!1),c||Da(t)),Ge(t),c=t.type,f=t.pendingProps,b=e!==null?e.memoizedProps:null,l=f.children,sd(c,f)?l=null:b!==null&&sd(c,b)&&(t.flags|=32),t.memoizedState!==null&&(c=au(e,t,qS,null,null,s),Cl._currentValue=c),Go(e,t),zt(e,t,l,s),t.child;case 6:return e===null&&Ve&&((e=s=at)&&(s=k_(s,t.pendingProps,_n),s!==null?(t.stateNode=s,Ut=t,at=null,e=!0):e=!1),e||Da(t)),null;case 13:return Om(e,t,s);case 4:return H(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=bs(t,null,l,s):zt(e,t,l,s),t.child;case 11:return Cm(e,t,t.type,t.pendingProps,s);case 7:return zt(e,t,t.pendingProps,s),t.child;case 8:return zt(e,t,t.pendingProps.children,s),t.child;case 12:return zt(e,t,t.pendingProps.children,s),t.child;case 10:return l=t.pendingProps,ka(t,t.type,l.value),zt(e,t,l.children,s),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,ms(t),c=It(c),l=l(c),t.flags|=1,zt(e,t,l,s),t.child;case 14:return Am(e,t,t.type,t.pendingProps,s);case 15:return jm(e,t,t.type,t.pendingProps,s);case 19:return Lm(e,t,s);case 31:return WS(e,t,s);case 22:return Nm(e,t,s,t.pendingProps);case 24:return ms(t),l=It(Et),e===null?(c=Yc(),c===null&&(c=et,f=qc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=s),c=f),t.memoizedState={parent:l,cache:c},Zc(t),ka(t,Et,c)):((e.lanes&s)!==0&&(Xc(e,t),il(t,null,null,s),sl()),c=e.memoizedState,f=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),ka(t,Et,l)):(l=f.cache,ka(t,Et,l),l!==c.cache&&Fc(t,[Et],s,!0))),zt(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function ca(e){e.flags|=4}function ku(e,t,s,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(ug())e.flags|=8192;else throw vs=No,Kc}else e.flags&=-16777217}function Im(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Wg(t))if(ug())e.flags|=8192;else throw vs=No,Kc}function qo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?yh():536870912,e.lanes|=t,di|=t)}function dl(e,t){if(!Ve)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function st(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,l=0;if(t)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=s,t}function t_(e,t,s){var l=t.pendingProps;switch(zc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(t),null;case 1:return st(t),null;case 3:return s=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ia(Et),ie(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Js(t)?ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Pc())),st(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(ca(t),f!==null?(st(t),Im(t,f)):(st(t),ku(t,c,null,l,s))):f?f!==e.memoizedState?(ca(t),st(t),Im(t,f)):(st(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ca(t),st(t),ku(t,c,e,l,s)),null;case 27:if(nt(t),s=ne.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ca(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return st(t),null}e=De.current,Js(t)?yp(t):(e=qg(c,l,s),t.stateNode=e,ca(t))}return st(t),null;case 5:if(nt(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ca(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return st(t),null}if(f=De.current,Js(t))yp(t);else{var b=lr(ne.current);switch(f){case 1:f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=b.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?b.createElement("select",{is:l.is}):b.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?b.createElement(c,{is:l.is}):b.createElement(c)}}f[Lt]=t,f[Zt]=l;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)f.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=f;e:switch(Vt(f,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ca(t)}}return st(t),ku(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ca(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=ne.current,Js(t)){if(e=t.stateNode,s=t.memoizedProps,l=null,c=Ut,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[Lt]=t,e=!!(e.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||Og(e.nodeValue,s)),e||Da(t,!0)}else e=lr(e).createTextNode(l),e[Lt]=t,t.stateNode=e}return st(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(l=Js(t),s!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Lt]=t}else hs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),e=!1}else s=Pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(on(t),t):(on(t),null);if((t.flags&128)!==0)throw Error(o(558))}return st(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Js(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[Lt]=t}else hs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),c=!1}else c=Pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(on(t),t):(on(t),null)}return on(t),(t.flags&128)!==0?(t.lanes=s,t):(s=l!==null,e=e!==null&&e.memoizedState!==null,s&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==c&&(l.flags|=2048)),s!==e&&s&&(t.child.flags|=8192),qo(t,t.updateQueue),st(t),null);case 4:return ie(),e===null&&Wu(t.stateNode.containerInfo),st(t),null;case 10:return ia(t.type),st(t),null;case 19:if(Ae(vt),l=t.memoizedState,l===null)return st(t),null;if(c=(t.flags&128)!==0,f=l.rendering,f===null)if(c)dl(l,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Mo(e),f!==null){for(t.flags|=128,dl(l,!1),e=f.updateQueue,t.updateQueue=e,qo(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)fp(s,e),s=s.sibling;return he(vt,vt.current&1|2),Ve&&aa(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&te()>Xo&&(t.flags|=128,c=!0,dl(l,!1),t.lanes=4194304)}else{if(!c)if(e=Mo(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,qo(t,e),dl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Ve)return st(t),null}else 2*te()-l.renderingStartTime>Xo&&s!==536870912&&(t.flags|=128,c=!0,dl(l,!1),t.lanes=4194304);l.isBackwards?(f.sibling=t.child,t.child=f):(e=l.last,e!==null?e.sibling=f:t.child=f,l.last=f)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=te(),e.sibling=null,s=vt.current,he(vt,c?s&1|2:s&1),Ve&&aa(t,l.treeForkCount),e):(st(t),null);case 22:case 23:return on(t),eu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(s&536870912)!==0&&(t.flags&128)===0&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),s=t.updateQueue,s!==null&&qo(t,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==s&&(t.flags|=2048),e!==null&&Ae(gs),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ia(Et),st(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function n_(e,t){switch(zc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ia(Et),ie(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return nt(t),null;case 31:if(t.memoizedState!==null){if(on(t),t.alternate===null)throw Error(o(340));hs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(on(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));hs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ae(vt),null;case 4:return ie(),null;case 10:return ia(t.type),null;case 22:case 23:return on(t),eu(),e!==null&&Ae(gs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ia(Et),null;case 25:return null;default:return null}}function zm(e,t){switch(zc(t),t.tag){case 3:ia(Et),ie();break;case 26:case 27:case 5:nt(t);break;case 4:ie();break;case 31:t.memoizedState!==null&&on(t);break;case 13:on(t);break;case 19:Ae(vt);break;case 10:ia(t.type);break;case 22:case 23:on(t),eu(),e!==null&&Ae(gs);break;case 24:ia(Et)}}function fl(e,t){try{var s=t.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var c=l.next;s=c;do{if((s.tag&e)===e){l=void 0;var f=s.create,b=s.inst;l=f(),b.destroy=l}s=s.next}while(s!==c)}}catch(x){Ze(t,t.return,x)}}function Ua(e,t,s){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&e)===e){var b=l.inst,x=b.destroy;if(x!==void 0){b.destroy=void 0,c=t;var N=s,U=x;try{U()}catch($){Ze(c,N,$)}}}l=l.next}while(l!==f)}}catch($){Ze(t,t.return,$)}}function Vm(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{Dp(t,s)}catch(l){Ze(e,e.return,l)}}}function Pm(e,t,s){s.props=_s(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(l){Ze(e,t,l)}}function hl(e,t){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof s=="function"?e.refCleanup=s(l):s.current=l}}catch(c){Ze(e,t,c)}}function Pn(e,t){var s=e.ref,l=e.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(c){Ze(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(c){Ze(e,t,c)}else s.current=null}function Hm(e){var t=e.type,s=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(c){Ze(e,e.return,c)}}function Mu(e,t,s){try{var l=e.stateNode;E_(l,e.type,s,t),l[Zt]=t}catch(c){Ze(e,e.return,c)}}function Gm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Fa(e.type)||e.tag===4}function Ru(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Fa(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ou(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,t):(t=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,t.appendChild(e),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=ea));else if(l!==4&&(l===27&&Fa(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(Ou(e,t,s),e=e.sibling;e!==null;)Ou(e,t,s),e=e.sibling}function $o(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(l!==4&&(l===27&&Fa(e.type)&&(s=e.stateNode),e=e.child,e!==null))for($o(e,t,s),e=e.sibling;e!==null;)$o(e,t,s),e=e.sibling}function Fm(e){var t=e.stateNode,s=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Vt(t,l,s),t[Lt]=e,t[Zt]=s}catch(f){Ze(e,e.return,f)}}var ua=!1,jt=!1,Bu=!1,qm=typeof WeakSet=="function"?WeakSet:Set,Ot=null;function a_(e,t){if(e=e.containerInfo,nd=hr,e=ap(e),Nc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var b=0,x=-1,N=-1,U=0,$=0,X=e,I=null;t:for(;;){for(var P;X!==s||c!==0&&X.nodeType!==3||(x=b+c),X!==f||l!==0&&X.nodeType!==3||(N=b+l),X.nodeType===3&&(b+=X.nodeValue.length),(P=X.firstChild)!==null;)I=X,X=P;for(;;){if(X===e)break t;if(I===s&&++U===c&&(x=b),I===f&&++$===l&&(N=b),(P=X.nextSibling)!==null)break;X=I,I=X.parentNode}X=P}s=x===-1||N===-1?null:{start:x,end:N}}else s=null}s=s||{start:0,end:0}}else s=null;for(ad={focusedElem:e,selectionRange:s},hr=!1,Ot=t;Ot!==null;)if(t=Ot,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ot=e;else for(;Ot!==null;){switch(t=Ot,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)c=e[s],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,s=t,c=f.memoizedProps,f=f.memoizedState,l=s.stateNode;try{var re=_s(s.type,c);e=l.getSnapshotBeforeUpdate(re,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Ze(s,s.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)ld(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ld(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Ot=e;break}Ot=t.return}}function $m(e,t,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:fa(e,s),l&4&&fl(5,s);break;case 1:if(fa(e,s),l&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(b){Ze(s,s.return,b)}else{var c=_s(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Ze(s,s.return,b)}}l&64&&Vm(s),l&512&&hl(s,s.return);break;case 3:if(fa(e,s),l&64&&(e=s.updateQueue,e!==null)){if(t=null,s.child!==null)switch(s.child.tag){case 27:case 5:t=s.child.stateNode;break;case 1:t=s.child.stateNode}try{Dp(e,t)}catch(b){Ze(s,s.return,b)}}break;case 27:t===null&&l&4&&Fm(s);case 26:case 5:fa(e,s),t===null&&l&4&&Hm(s),l&512&&hl(s,s.return);break;case 12:fa(e,s);break;case 31:fa(e,s),l&4&&Zm(e,s);break;case 13:fa(e,s),l&4&&Xm(e,s),l&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=f_.bind(null,s),M_(e,s))));break;case 22:if(l=s.memoizedState!==null||ua,!l){t=t!==null&&t.memoizedState!==null||jt,c=ua;var f=jt;ua=l,(jt=t)&&!f?ha(e,s,(s.subtreeFlags&8772)!==0):fa(e,s),ua=c,jt=f}break;case 30:break;default:fa(e,s)}}function Ym(e){var t=e.alternate;t!==null&&(e.alternate=null,Ym(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&dc(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ot=null,Qt=!1;function da(e,t,s){for(s=s.child;s!==null;)Km(e,t,s),s=s.sibling}function Km(e,t,s){if(Le&&typeof Le.onCommitFiberUnmount=="function")try{Le.onCommitFiberUnmount(yt,s)}catch{}switch(s.tag){case 26:jt||Pn(s,t),da(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:jt||Pn(s,t);var l=ot,c=Qt;Fa(s.type)&&(ot=s.stateNode,Qt=!1),da(e,t,s),xl(s.stateNode),ot=l,Qt=c;break;case 5:jt||Pn(s,t);case 6:if(l=ot,c=Qt,ot=null,da(e,t,s),ot=l,Qt=c,ot!==null)if(Qt)try{(ot.nodeType===9?ot.body:ot.nodeName==="HTML"?ot.ownerDocument.body:ot).removeChild(s.stateNode)}catch(f){Ze(s,t,f)}else try{ot.removeChild(s.stateNode)}catch(f){Ze(s,t,f)}break;case 18:ot!==null&&(Qt?(e=ot,Vg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),bi(e)):Vg(ot,s.stateNode));break;case 4:l=ot,c=Qt,ot=s.stateNode.containerInfo,Qt=!0,da(e,t,s),ot=l,Qt=c;break;case 0:case 11:case 14:case 15:Ua(2,s,t),jt||Ua(4,s,t),da(e,t,s);break;case 1:jt||(Pn(s,t),l=s.stateNode,typeof l.componentWillUnmount=="function"&&Pm(s,t,l)),da(e,t,s);break;case 21:da(e,t,s);break;case 22:jt=(l=jt)||s.memoizedState!==null,da(e,t,s),jt=l;break;default:da(e,t,s)}}function Zm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{bi(e)}catch(s){Ze(t,t.return,s)}}}function Xm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{bi(e)}catch(s){Ze(t,t.return,s)}}function s_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new qm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new qm),t;default:throw Error(o(435,e.tag))}}function Yo(e,t){var s=s_(e);t.forEach(function(l){if(!s.has(l)){s.add(l);var c=h_.bind(null,e,l);l.then(c,c)}})}function Jt(e,t){var s=t.deletions;if(s!==null)for(var l=0;l<s.length;l++){var c=s[l],f=e,b=t,x=b;e:for(;x!==null;){switch(x.tag){case 27:if(Fa(x.type)){ot=x.stateNode,Qt=!1;break e}break;case 5:ot=x.stateNode,Qt=!1;break e;case 3:case 4:ot=x.stateNode.containerInfo,Qt=!0;break e}x=x.return}if(ot===null)throw Error(o(160));Km(f,b,c),ot=null,Qt=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Qm(t,e),t=t.sibling}var On=null;function Qm(e,t){var s=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Jt(t,e),Wt(e),l&4&&(Ua(3,e,e.return),fl(3,e),Ua(5,e,e.return));break;case 1:Jt(t,e),Wt(e),l&512&&(jt||s===null||Pn(s,s.return)),l&64&&ua&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?l:s.concat(l))));break;case 26:var c=On;if(Jt(t,e),Wt(e),l&512&&(jt||s===null||Pn(s,s.return)),l&4){var f=s!==null?s.memoizedState:null;if(l=e.memoizedState,s===null)if(l===null)if(e.stateNode===null){e:{l=e.type,s=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":f=c.getElementsByTagName("title")[0],(!f||f[Vi]||f[Lt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(l),c.head.insertBefore(f,c.querySelector("head > title"))),Vt(f,l,s),f[Lt]=e,Rt(f),l=f;break e;case"link":var b=Qg("link","href",c).get(l+(s.href||""));if(b){for(var x=0;x<b.length;x++)if(f=b[x],f.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&f.getAttribute("rel")===(s.rel==null?null:s.rel)&&f.getAttribute("title")===(s.title==null?null:s.title)&&f.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){b.splice(x,1);break t}}f=c.createElement(l),Vt(f,l,s),c.head.appendChild(f);break;case"meta":if(b=Qg("meta","content",c).get(l+(s.content||""))){for(x=0;x<b.length;x++)if(f=b[x],f.getAttribute("content")===(s.content==null?null:""+s.content)&&f.getAttribute("name")===(s.name==null?null:s.name)&&f.getAttribute("property")===(s.property==null?null:s.property)&&f.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&f.getAttribute("charset")===(s.charSet==null?null:s.charSet)){b.splice(x,1);break t}}f=c.createElement(l),Vt(f,l,s),c.head.appendChild(f);break;default:throw Error(o(468,l))}f[Lt]=e,Rt(f),l=f}e.stateNode=l}else Jg(c,e.type,e.stateNode);else e.stateNode=Xg(c,l,e.memoizedProps);else f!==l?(f===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):f.count--,l===null?Jg(c,e.type,e.stateNode):Xg(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Mu(e,e.memoizedProps,s.memoizedProps)}break;case 27:Jt(t,e),Wt(e),l&512&&(jt||s===null||Pn(s,s.return)),s!==null&&l&4&&Mu(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Jt(t,e),Wt(e),l&512&&(jt||s===null||Pn(s,s.return)),e.flags&32){c=e.stateNode;try{Hs(c,"")}catch(re){Ze(e,e.return,re)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Mu(e,c,s!==null?s.memoizedProps:c)),l&1024&&(Bu=!0);break;case 6:if(Jt(t,e),Wt(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,s=e.stateNode;try{s.nodeValue=l}catch(re){Ze(e,e.return,re)}}break;case 3:if(cr=null,c=On,On=or(t.containerInfo),Jt(t,e),On=c,Wt(e),l&4&&s!==null&&s.memoizedState.isDehydrated)try{bi(t.containerInfo)}catch(re){Ze(e,e.return,re)}Bu&&(Bu=!1,Jm(e));break;case 4:l=On,On=or(e.stateNode.containerInfo),Jt(t,e),Wt(e),On=l;break;case 12:Jt(t,e),Wt(e);break;case 31:Jt(t,e),Wt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Yo(e,l)));break;case 13:Jt(t,e),Wt(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Zo=te()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Yo(e,l)));break;case 22:c=e.memoizedState!==null;var N=s!==null&&s.memoizedState!==null,U=ua,$=jt;if(ua=U||c,jt=$||N,Jt(t,e),jt=$,ua=U,Wt(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(s===null||N||ua||jt||xs(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){N=s=t;try{if(f=N.stateNode,c)b=f.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{x=N.stateNode;var X=N.memoizedProps.style,I=X!=null&&X.hasOwnProperty("display")?X.display:null;x.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(re){Ze(N,N.return,re)}}}else if(t.tag===6){if(s===null){N=t;try{N.stateNode.nodeValue=c?"":N.memoizedProps}catch(re){Ze(N,N.return,re)}}}else if(t.tag===18){if(s===null){N=t;try{var P=N.stateNode;c?Pg(P,!0):Pg(N.stateNode,!1)}catch(re){Ze(N,N.return,re)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;s===t&&(s=null),t=t.return}s===t&&(s=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(s=l.retryQueue,s!==null&&(l.retryQueue=null,Yo(e,s))));break;case 19:Jt(t,e),Wt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Yo(e,l)));break;case 30:break;case 21:break;default:Jt(t,e),Wt(e)}}function Wt(e){var t=e.flags;if(t&2){try{for(var s,l=e.return;l!==null;){if(Gm(l)){s=l;break}l=l.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var c=s.stateNode,f=Ru(e);$o(e,f,c);break;case 5:var b=s.stateNode;s.flags&32&&(Hs(b,""),s.flags&=-33);var x=Ru(e);$o(e,x,b);break;case 3:case 4:var N=s.stateNode.containerInfo,U=Ru(e);Ou(e,U,N);break;default:throw Error(o(161))}}catch($){Ze(e,e.return,$)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Jm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Jm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)$m(e,t.alternate,t),t=t.sibling}function xs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ua(4,t,t.return),xs(t);break;case 1:Pn(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&Pm(t,t.return,s),xs(t);break;case 27:xl(t.stateNode);case 26:case 5:Pn(t,t.return),xs(t);break;case 22:t.memoizedState===null&&xs(t);break;case 30:xs(t);break;default:xs(t)}e=e.sibling}}function ha(e,t,s){for(s=s&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,f=t,b=f.flags;switch(f.tag){case 0:case 11:case 15:ha(c,f,s),fl(4,f);break;case 1:if(ha(c,f,s),l=f,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(U){Ze(l,l.return,U)}if(l=f,c=l.updateQueue,c!==null){var x=l.stateNode;try{var N=c.shared.hiddenCallbacks;if(N!==null)for(c.shared.hiddenCallbacks=null,c=0;c<N.length;c++)wp(N[c],x)}catch(U){Ze(l,l.return,U)}}s&&b&64&&Vm(f),hl(f,f.return);break;case 27:Fm(f);case 26:case 5:ha(c,f,s),s&&l===null&&b&4&&Hm(f),hl(f,f.return);break;case 12:ha(c,f,s);break;case 31:ha(c,f,s),s&&b&4&&Zm(c,f);break;case 13:ha(c,f,s),s&&b&4&&Xm(c,f);break;case 22:f.memoizedState===null&&ha(c,f,s),hl(f,f.return);break;case 30:break;default:ha(c,f,s)}t=t.sibling}}function Lu(e,t){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&Wi(s))}function Uu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wi(e))}function Bn(e,t,s,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Wm(e,t,s,l),t=t.sibling}function Wm(e,t,s,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Bn(e,t,s,l),c&2048&&fl(9,t);break;case 1:Bn(e,t,s,l);break;case 3:Bn(e,t,s,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wi(e)));break;case 12:if(c&2048){Bn(e,t,s,l),e=t.stateNode;try{var f=t.memoizedProps,b=f.id,x=f.onPostCommit;typeof x=="function"&&x(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){Ze(t,t.return,N)}}else Bn(e,t,s,l);break;case 31:Bn(e,t,s,l);break;case 13:Bn(e,t,s,l);break;case 23:break;case 22:f=t.stateNode,b=t.alternate,t.memoizedState!==null?f._visibility&2?Bn(e,t,s,l):pl(e,t):f._visibility&2?Bn(e,t,s,l):(f._visibility|=2,ri(e,t,s,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Lu(b,t);break;case 24:Bn(e,t,s,l),c&2048&&Uu(t.alternate,t);break;default:Bn(e,t,s,l)}}function ri(e,t,s,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,b=t,x=s,N=l,U=b.flags;switch(b.tag){case 0:case 11:case 15:ri(f,b,x,N,c),fl(8,b);break;case 23:break;case 22:var $=b.stateNode;b.memoizedState!==null?$._visibility&2?ri(f,b,x,N,c):pl(f,b):($._visibility|=2,ri(f,b,x,N,c)),c&&U&2048&&Lu(b.alternate,b);break;case 24:ri(f,b,x,N,c),c&&U&2048&&Uu(b.alternate,b);break;default:ri(f,b,x,N,c)}t=t.sibling}}function pl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var s=e,l=t,c=l.flags;switch(l.tag){case 22:pl(s,l),c&2048&&Lu(l.alternate,l);break;case 24:pl(s,l),c&2048&&Uu(l.alternate,l);break;default:pl(s,l)}t=t.sibling}}var ml=8192;function ci(e,t,s){if(e.subtreeFlags&ml)for(e=e.child;e!==null;)eg(e,t,s),e=e.sibling}function eg(e,t,s){switch(e.tag){case 26:ci(e,t,s),e.flags&ml&&e.memoizedState!==null&&F_(s,On,e.memoizedState,e.memoizedProps);break;case 5:ci(e,t,s);break;case 3:case 4:var l=On;On=or(e.stateNode.containerInfo),ci(e,t,s),On=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=ml,ml=16777216,ci(e,t,s),ml=l):ci(e,t,s));break;default:ci(e,t,s)}}function tg(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function gl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];Ot=l,ag(l,e)}tg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ng(e),e=e.sibling}function ng(e){switch(e.tag){case 0:case 11:case 15:gl(e),e.flags&2048&&Ua(9,e,e.return);break;case 3:gl(e);break;case 12:gl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ko(e)):gl(e);break;default:gl(e)}}function Ko(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];Ot=l,ag(l,e)}tg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ua(8,t,t.return),Ko(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,Ko(t));break;default:Ko(t)}e=e.sibling}}function ag(e,t){for(;Ot!==null;){var s=Ot;switch(s.tag){case 0:case 11:case 15:Ua(8,s,t);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Wi(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,Ot=l;else e:for(s=e;Ot!==null;){l=Ot;var c=l.sibling,f=l.return;if(Ym(l),l===s){Ot=null;break e}if(c!==null){c.return=f,Ot=c;break e}Ot=f}}}var i_={getCacheForType:function(e){var t=It(Et),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return It(Et).controller.signal}},l_=typeof WeakMap=="function"?WeakMap:Map,Fe=0,et=null,Re=null,Ue=0,Ke=0,rn=null,Ia=!1,ui=!1,Iu=!1,pa=0,ht=0,za=0,Ts=0,zu=0,cn=0,di=0,yl=null,en=null,Vu=!1,Zo=0,sg=0,Xo=1/0,Qo=null,Va=null,kt=0,Pa=null,fi=null,ma=0,Pu=0,Hu=null,ig=null,vl=0,Gu=null;function un(){return(Fe&2)!==0&&Ue!==0?Ue&-Ue:O.T!==null?Zu():_h()}function lg(){if(cn===0)if((Ue&536870912)===0||Ve){var e=Mn;Mn<<=1,(Mn&3932160)===0&&(Mn=262144),cn=e}else cn=536870912;return e=ln.current,e!==null&&(e.flags|=32),cn}function tn(e,t,s){(e===et&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(hi(e,0),Ha(e,Ue,cn,!1)),zi(e,s),((Fe&2)===0||e!==et)&&(e===et&&((Fe&2)===0&&(Ts|=s),ht===4&&Ha(e,Ue,cn,!1)),Hn(e))}function og(e,t,s){if((Fe&6)!==0)throw Error(o(327));var l=!s&&(t&127)===0&&(t&e.expiredLanes)===0||Ii(e,t),c=l?c_(e,t):qu(e,t,!0),f=l;do{if(c===0){ui&&!l&&Ha(e,t,0,!1);break}else{if(s=e.current.alternate,f&&!o_(s)){c=qu(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var x=e;c=yl;var N=x.current.memoizedState.isDehydrated;if(N&&(hi(x,b).flags|=256),b=qu(x,b,!1),b!==2){if(Iu&&!N){x.errorRecoveryDisabledLanes|=f,Ts|=f,c=4;break e}f=en,en=c,f!==null&&(en===null?en=f:en.push.apply(en,f))}c=b}if(f=!1,c!==2)continue}}if(c===1){hi(e,0),Ha(e,t,0,!0);break}e:{switch(l=e,f=c,f){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Ha(l,t,cn,!Ia);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=Zo+300-te(),10<c)){if(Ha(l,t,cn,!Ia),lo(l,0,!0)!==0)break e;ma=t,l.timeoutHandle=Ig(rg.bind(null,l,s,en,Qo,Vu,t,cn,Ts,di,Ia,f,"Throttled",-0,0),c);break e}rg(l,s,en,Qo,Vu,t,cn,Ts,di,Ia,f,null,-0,0)}}break}while(!0);Hn(e)}function rg(e,t,s,l,c,f,b,x,N,U,$,X,I,P){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ea},eg(t,f,X);var re=(f&62914560)===f?Zo-te():(f&4194048)===f?sg-te():0;if(re=q_(X,re),re!==null){ma=f,e.cancelPendingCommit=re(gg.bind(null,e,t,f,s,l,c,b,x,N,$,X,null,I,P)),Ha(e,f,b,!U);return}}gg(e,t,f,s,l,c,b,x,N)}function o_(e){for(var t=e;;){var s=t.tag;if((s===0||s===11||s===15)&&t.flags&16384&&(s=t.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var l=0;l<s.length;l++){var c=s[l],f=c.getSnapshot;c=c.value;try{if(!an(f(),c))return!1}catch{return!1}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ha(e,t,s,l){t&=~zu,t&=~Ts,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var f=31-Ee(c),b=1<<f;l[f]=-1,c&=~b}s!==0&&vh(e,s,t)}function Jo(){return(Fe&6)===0?(bl(0),!1):!0}function Fu(){if(Re!==null){if(Ke===0)var e=Re.return;else e=Re,sa=ps=null,lu(e),ai=null,tl=0,e=Re;for(;e!==null;)zm(e.alternate,e),e=e.return;Re=null}}function hi(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,j_(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),ma=0,Fu(),et=e,Re=s=na(e.current,null),Ue=t,Ke=0,rn=null,Ia=!1,ui=Ii(e,t),Iu=!1,di=cn=zu=Ts=za=ht=0,en=yl=null,Vu=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-Ee(l),f=1<<c;t|=e[c],l&=~f}return pa=t,bo(),s}function cg(e,t){Ne=null,O.H=cl,t===ni||t===jo?(t=Cp(),Ke=3):t===Kc?(t=Cp(),Ke=4):Ke=t===xu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,rn=t,Re===null&&(ht=1,Po(e,vn(t,e.current)))}function ug(){var e=ln.current;return e===null?!0:(Ue&4194048)===Ue?xn===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===xn:!1}function dg(){var e=O.H;return O.H=cl,e===null?cl:e}function fg(){var e=O.A;return O.A=i_,e}function Wo(){ht=4,Ia||(Ue&4194048)!==Ue&&ln.current!==null||(ui=!0),(za&134217727)===0&&(Ts&134217727)===0||et===null||Ha(et,Ue,cn,!1)}function qu(e,t,s){var l=Fe;Fe|=2;var c=dg(),f=fg();(et!==e||Ue!==t)&&(Qo=null,hi(e,t)),t=!1;var b=ht;e:do try{if(Ke!==0&&Re!==null){var x=Re,N=rn;switch(Ke){case 8:Fu(),b=6;break e;case 3:case 2:case 9:case 6:ln.current===null&&(t=!0);var U=Ke;if(Ke=0,rn=null,pi(e,x,N,U),s&&ui){b=0;break e}break;default:U=Ke,Ke=0,rn=null,pi(e,x,N,U)}}r_(),b=ht;break}catch($){cg(e,$)}while(!0);return t&&e.shellSuspendCounter++,sa=ps=null,Fe=l,O.H=c,O.A=f,Re===null&&(et=null,Ue=0,bo()),b}function r_(){for(;Re!==null;)hg(Re)}function c_(e,t){var s=Fe;Fe|=2;var l=dg(),c=fg();et!==e||Ue!==t?(Qo=null,Xo=te()+500,hi(e,t)):ui=Ii(e,t);e:do try{if(Ke!==0&&Re!==null){t=Re;var f=rn;t:switch(Ke){case 1:Ke=0,rn=null,pi(e,t,f,1);break;case 2:case 9:if(Tp(f)){Ke=0,rn=null,pg(t);break}t=function(){Ke!==2&&Ke!==9||et!==e||(Ke=7),Hn(e)},f.then(t,t);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:Tp(f)?(Ke=0,rn=null,pg(t)):(Ke=0,rn=null,pi(e,t,f,7));break;case 5:var b=null;switch(Re.tag){case 26:b=Re.memoizedState;case 5:case 27:var x=Re;if(b?Wg(b):x.stateNode.complete){Ke=0,rn=null;var N=x.sibling;if(N!==null)Re=N;else{var U=x.return;U!==null?(Re=U,er(U)):Re=null}break t}}Ke=0,rn=null,pi(e,t,f,5);break;case 6:Ke=0,rn=null,pi(e,t,f,6);break;case 8:Fu(),ht=6;break e;default:throw Error(o(462))}}u_();break}catch($){cg(e,$)}while(!0);return sa=ps=null,O.H=l,O.A=c,Fe=s,Re!==null?0:(et=null,Ue=0,bo(),ht)}function u_(){for(;Re!==null&&!Jn();)hg(Re)}function hg(e){var t=Um(e.alternate,e,pa);e.memoizedProps=e.pendingProps,t===null?er(e):Re=t}function pg(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=km(s,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=km(s,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:lu(t);default:zm(s,t),t=Re=fp(t,pa),t=Um(s,t,pa)}e.memoizedProps=e.pendingProps,t===null?er(e):Re=t}function pi(e,t,s,l){sa=ps=null,lu(t),ai=null,tl=0;var c=t.return;try{if(JS(e,c,t,s,Ue)){ht=1,Po(e,vn(s,e.current)),Re=null;return}}catch(f){if(c!==null)throw Re=c,f;ht=1,Po(e,vn(s,e.current)),Re=null;return}t.flags&32768?(Ve||l===1?e=!0:ui||(Ue&536870912)!==0?e=!1:(Ia=e=!0,(l===2||l===9||l===3||l===6)&&(l=ln.current,l!==null&&l.tag===13&&(l.flags|=16384))),mg(t,e)):er(t)}function er(e){var t=e;do{if((t.flags&32768)!==0){mg(t,Ia);return}e=t.return;var s=t_(t.alternate,t,pa);if(s!==null){Re=s;return}if(t=t.sibling,t!==null){Re=t;return}Re=t=e}while(t!==null);ht===0&&(ht=5)}function mg(e,t){do{var s=n_(e.alternate,e);if(s!==null){s.flags&=32767,Re=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){Re=e;return}Re=e=s}while(e!==null);ht=6,Re=null}function gg(e,t,s,l,c,f,b,x,N){e.cancelPendingCommit=null;do tr();while(kt!==0);if((Fe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(f=t.lanes|t.childLanes,f|=Rc,G1(e,s,f,b,x,N),e===et&&(Re=et=null,Ue=0),fi=t,Pa=e,ma=s,Pu=f,Hu=c,ig=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,p_(ze,function(){return _g(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=O.T,O.T=null,c=G.p,G.p=2,b=Fe,Fe|=4;try{a_(e,t,s)}finally{Fe=b,G.p=c,O.T=l}}kt=1,yg(),vg(),bg()}}function yg(){if(kt===1){kt=0;var e=Pa,t=fi,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=O.T,O.T=null;var l=G.p;G.p=2;var c=Fe;Fe|=4;try{Qm(t,e);var f=ad,b=ap(e.containerInfo),x=f.focusedElem,N=f.selectionRange;if(b!==x&&x&&x.ownerDocument&&np(x.ownerDocument.documentElement,x)){if(N!==null&&Nc(x)){var U=N.start,$=N.end;if($===void 0&&($=U),"selectionStart"in x)x.selectionStart=U,x.selectionEnd=Math.min($,x.value.length);else{var X=x.ownerDocument||document,I=X&&X.defaultView||window;if(I.getSelection){var P=I.getSelection(),re=x.textContent.length,ye=Math.min(N.start,re),Je=N.end===void 0?ye:Math.min(N.end,re);!P.extend&&ye>Je&&(b=Je,Je=ye,ye=b);var B=tp(x,ye),k=tp(x,Je);if(B&&k&&(P.rangeCount!==1||P.anchorNode!==B.node||P.anchorOffset!==B.offset||P.focusNode!==k.node||P.focusOffset!==k.offset)){var L=X.createRange();L.setStart(B.node,B.offset),P.removeAllRanges(),ye>Je?(P.addRange(L),P.extend(k.node,k.offset)):(L.setEnd(k.node,k.offset),P.addRange(L))}}}}for(X=[],P=x;P=P.parentNode;)P.nodeType===1&&X.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<X.length;x++){var Z=X[x];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}hr=!!nd,ad=nd=null}finally{Fe=c,G.p=l,O.T=s}}e.current=t,kt=2}}function vg(){if(kt===2){kt=0;var e=Pa,t=fi,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=O.T,O.T=null;var l=G.p;G.p=2;var c=Fe;Fe|=4;try{$m(e,t.alternate,t)}finally{Fe=c,G.p=l,O.T=s}}kt=3}}function bg(){if(kt===4||kt===3){kt=0,J();var e=Pa,t=fi,s=ma,l=ig;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?kt=5:(kt=0,fi=Pa=null,Sg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Va=null),cc(s),t=t.stateNode,Le&&typeof Le.onCommitFiberRoot=="function")try{Le.onCommitFiberRoot(yt,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=O.T,c=G.p,G.p=2,O.T=null;try{for(var f=e.onRecoverableError,b=0;b<l.length;b++){var x=l[b];f(x.value,{componentStack:x.stack})}}finally{O.T=t,G.p=c}}(ma&3)!==0&&tr(),Hn(e),c=e.pendingLanes,(s&261930)!==0&&(c&42)!==0?e===Gu?vl++:(vl=0,Gu=e):vl=0,bl(0)}}function Sg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Wi(t)))}function tr(){return yg(),vg(),bg(),_g()}function _g(){if(kt!==5)return!1;var e=Pa,t=Pu;Pu=0;var s=cc(ma),l=O.T,c=G.p;try{G.p=32>s?32:s,O.T=null,s=Hu,Hu=null;var f=Pa,b=ma;if(kt=0,fi=Pa=null,ma=0,(Fe&6)!==0)throw Error(o(331));var x=Fe;if(Fe|=4,ng(f.current),Wm(f,f.current,b,s),Fe=x,bl(0,!1),Le&&typeof Le.onPostCommitFiberRoot=="function")try{Le.onPostCommitFiberRoot(yt,f)}catch{}return!0}finally{G.p=c,O.T=l,Sg(e,t)}}function xg(e,t,s){t=vn(s,t),t=_u(e.stateNode,t,2),e=Oa(e,t,2),e!==null&&(zi(e,2),Hn(e))}function Ze(e,t,s){if(e.tag===3)xg(e,e,s);else for(;t!==null;){if(t.tag===3){xg(t,e,s);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Va===null||!Va.has(l))){e=vn(s,e),s=Tm(2),l=Oa(t,s,2),l!==null&&(Em(s,l,t,e),zi(l,2),Hn(l));break}}t=t.return}}function $u(e,t,s){var l=e.pingCache;if(l===null){l=e.pingCache=new l_;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(s)||(Iu=!0,c.add(s),e=d_.bind(null,e,t,s),t.then(e,e))}function d_(e,t,s){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,et===e&&(Ue&s)===s&&(ht===4||ht===3&&(Ue&62914560)===Ue&&300>te()-Zo?(Fe&2)===0&&hi(e,0):zu|=s,di===Ue&&(di=0)),Hn(e)}function Tg(e,t){t===0&&(t=yh()),e=ds(e,t),e!==null&&(zi(e,t),Hn(e))}function f_(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),Tg(e,s)}function h_(e,t){var s=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),Tg(e,s)}function p_(e,t){return Qn(e,t)}var nr=null,mi=null,Yu=!1,ar=!1,Ku=!1,Ga=0;function Hn(e){e!==mi&&e.next===null&&(mi===null?nr=mi=e:mi=mi.next=e),ar=!0,Yu||(Yu=!0,g_())}function bl(e,t){if(!Ku&&ar){Ku=!0;do for(var s=!1,l=nr;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var f=0;else{var b=l.suspendedLanes,x=l.pingedLanes;f=(1<<31-Ee(42|e)+1)-1,f&=c&~(b&~x),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,jg(l,f))}else f=Ue,f=lo(l,l===et?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||Ii(l,f)||(s=!0,jg(l,f));l=l.next}while(s);Ku=!1}}function m_(){Eg()}function Eg(){ar=Yu=!1;var e=0;Ga!==0&&A_()&&(e=Ga);for(var t=te(),s=null,l=nr;l!==null;){var c=l.next,f=Cg(l,t);f===0?(l.next=null,s===null?nr=c:s.next=c,c===null&&(mi=s)):(s=l,(e!==0||(f&3)!==0)&&(ar=!0)),l=c}kt!==0&&kt!==5||bl(e),Ga!==0&&(Ga=0)}function Cg(e,t){for(var s=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var b=31-Ee(f),x=1<<b,N=c[b];N===-1?((x&s)===0||(x&l)!==0)&&(c[b]=H1(x,t)):N<=t&&(e.expiredLanes|=x),f&=~x}if(t=et,s=Ue,s=lo(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,s===0||e===t&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&kn(l),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||Ii(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(l!==null&&kn(l),cc(s)){case 2:case 8:s=ve;break;case 32:s=ze;break;case 268435456:s=gt;break;default:s=ze}return l=Ag.bind(null,e),s=Qn(s,l),e.callbackPriority=t,e.callbackNode=s,t}return l!==null&&l!==null&&kn(l),e.callbackPriority=2,e.callbackNode=null,2}function Ag(e,t){if(kt!==0&&kt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(tr()&&e.callbackNode!==s)return null;var l=Ue;return l=lo(e,e===et?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(og(e,l,t),Cg(e,te()),e.callbackNode!=null&&e.callbackNode===s?Ag.bind(null,e):null)}function jg(e,t){if(tr())return null;og(e,t,!0)}function g_(){N_(function(){(Fe&6)!==0?Qn(Se,m_):Eg()})}function Zu(){if(Ga===0){var e=ei;e===0&&(e=Tt,Tt<<=1,(Tt&261888)===0&&(Tt=256)),Ga=e}return Ga}function Ng(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:uo(""+e)}function wg(e,t){var s=t.ownerDocument.createElement("input");return s.name=t.name,s.value=t.value,e.id&&s.setAttribute("form",e.id),t.parentNode.insertBefore(s,t),e=new FormData(e),s.parentNode.removeChild(s),e}function y_(e,t,s,l,c){if(t==="submit"&&s&&s.stateNode===c){var f=Ng((c[Zt]||null).action),b=l.submitter;b&&(t=(t=b[Zt]||null)?Ng(t.formAction):b.getAttribute("formAction"),t!==null&&(f=t,b=null));var x=new mo("action","action",null,l,c);e.push({event:x,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ga!==0){var N=b?wg(c,b):new FormData(c);mu(s,{pending:!0,data:N,method:c.method,action:f},null,N)}}else typeof f=="function"&&(x.preventDefault(),N=b?wg(c,b):new FormData(c),mu(s,{pending:!0,data:N,method:c.method,action:f},f,N))},currentTarget:c}]})}}for(var Xu=0;Xu<Mc.length;Xu++){var Qu=Mc[Xu],v_=Qu.toLowerCase(),b_=Qu[0].toUpperCase()+Qu.slice(1);Rn(v_,"on"+b_)}Rn(lp,"onAnimationEnd"),Rn(op,"onAnimationIteration"),Rn(rp,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(BS,"onTransitionRun"),Rn(LS,"onTransitionStart"),Rn(US,"onTransitionCancel"),Rn(cp,"onTransitionEnd"),Vs("onMouseEnter",["mouseout","mouseover"]),Vs("onMouseLeave",["mouseout","mouseover"]),Vs("onPointerEnter",["pointerout","pointerover"]),Vs("onPointerLeave",["pointerout","pointerover"]),os("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),os("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),os("onBeforeInput",["compositionend","keypress","textInput","paste"]),os("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),os("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),os("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),S_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Sl));function Dg(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var l=e[s],c=l.event;l=l.listeners;e:{var f=void 0;if(t)for(var b=l.length-1;0<=b;b--){var x=l[b],N=x.instance,U=x.currentTarget;if(x=x.listener,N!==f&&c.isPropagationStopped())break e;f=x,c.currentTarget=U;try{f(c)}catch($){vo($)}c.currentTarget=null,f=N}else for(b=0;b<l.length;b++){if(x=l[b],N=x.instance,U=x.currentTarget,x=x.listener,N!==f&&c.isPropagationStopped())break e;f=x,c.currentTarget=U;try{f(c)}catch($){vo($)}c.currentTarget=null,f=N}}}}function Oe(e,t){var s=t[uc];s===void 0&&(s=t[uc]=new Set);var l=e+"__bubble";s.has(l)||(kg(t,e,2,!1),s.add(l))}function Ju(e,t,s){var l=0;t&&(l|=4),kg(s,e,l,t)}var sr="_reactListening"+Math.random().toString(36).slice(2);function Wu(e){if(!e[sr]){e[sr]=!0,Eh.forEach(function(s){s!=="selectionchange"&&(S_.has(s)||Ju(s,!1,e),Ju(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[sr]||(t[sr]=!0,Ju("selectionchange",!1,t))}}function kg(e,t,s,l){switch(ly(t)){case 2:var c=K_;break;case 8:c=Z_;break;default:c=pd}s=c.bind(null,t,s,e),c=void 0,!bc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,s,{capture:!0,passive:c}):e.addEventListener(t,s,!0):c!==void 0?e.addEventListener(t,s,{passive:c}):e.addEventListener(t,s,!1)}function ed(e,t,s,l,c){var f=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var b=l.tag;if(b===3||b===4){var x=l.stateNode.containerInfo;if(x===c)break;if(b===4)for(b=l.return;b!==null;){var N=b.tag;if((N===3||N===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;x!==null;){if(b=Us(x),b===null)return;if(N=b.tag,N===5||N===6||N===26||N===27){l=f=b;continue e}x=x.parentNode}}l=l.return}Lh(function(){var U=f,$=yc(s),X=[];e:{var I=up.get(e);if(I!==void 0){var P=mo,re=e;switch(e){case"keypress":if(ho(s)===0)break e;case"keydown":case"keyup":P=hS;break;case"focusin":re="focus",P=Tc;break;case"focusout":re="blur",P=Tc;break;case"beforeblur":case"afterblur":P=Tc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=zh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=tS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=gS;break;case lp:case op:case rp:P=sS;break;case cp:P=vS;break;case"scroll":case"scrollend":P=W1;break;case"wheel":P=SS;break;case"copy":case"cut":case"paste":P=lS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Ph;break;case"toggle":case"beforetoggle":P=xS}var ye=(t&4)!==0,Je=!ye&&(e==="scroll"||e==="scrollend"),B=ye?I!==null?I+"Capture":null:I;ye=[];for(var k=U,L;k!==null;){var Z=k;if(L=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||L===null||B===null||(Z=Hi(k,B),Z!=null&&ye.push(_l(k,Z,L))),Je)break;k=k.return}0<ye.length&&(I=new P(I,re,null,s,$),X.push({event:I,listeners:ye}))}}if((t&7)===0){e:{if(I=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",I&&s!==gc&&(re=s.relatedTarget||s.fromElement)&&(Us(re)||re[Ls]))break e;if((P||I)&&(I=$.window===$?$:(I=$.ownerDocument)?I.defaultView||I.parentWindow:window,P?(re=s.relatedTarget||s.toElement,P=U,re=re?Us(re):null,re!==null&&(Je=u(re),ye=re.tag,re!==Je||ye!==5&&ye!==27&&ye!==6)&&(re=null)):(P=null,re=U),P!==re)){if(ye=zh,Z="onMouseLeave",B="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(ye=Ph,Z="onPointerLeave",B="onPointerEnter",k="pointer"),Je=P==null?I:Pi(P),L=re==null?I:Pi(re),I=new ye(Z,k+"leave",P,s,$),I.target=Je,I.relatedTarget=L,Z=null,Us($)===U&&(ye=new ye(B,k+"enter",re,s,$),ye.target=L,ye.relatedTarget=Je,Z=ye),Je=Z,P&&re)t:{for(ye=__,B=P,k=re,L=0,Z=B;Z;Z=ye(Z))L++;Z=0;for(var me=k;me;me=ye(me))Z++;for(;0<L-Z;)B=ye(B),L--;for(;0<Z-L;)k=ye(k),Z--;for(;L--;){if(B===k||k!==null&&B===k.alternate){ye=B;break t}B=ye(B),k=ye(k)}ye=null}else ye=null;P!==null&&Mg(X,I,P,ye,!1),re!==null&&Je!==null&&Mg(X,Je,re,ye,!0)}}e:{if(I=U?Pi(U):window,P=I.nodeName&&I.nodeName.toLowerCase(),P==="select"||P==="input"&&I.type==="file")var Pe=Zh;else if(Yh(I))if(Xh)Pe=MS;else{Pe=DS;var fe=wS}else P=I.nodeName,!P||P.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?U&&mc(U.elementType)&&(Pe=Zh):Pe=kS;if(Pe&&(Pe=Pe(e,U))){Kh(X,Pe,s,$);break e}fe&&fe(e,I,U),e==="focusout"&&U&&I.type==="number"&&U.memoizedProps.value!=null&&pc(I,"number",I.value)}switch(fe=U?Pi(U):window,e){case"focusin":(Yh(fe)||fe.contentEditable==="true")&&($s=fe,wc=U,Xi=null);break;case"focusout":Xi=wc=$s=null;break;case"mousedown":Dc=!0;break;case"contextmenu":case"mouseup":case"dragend":Dc=!1,sp(X,s,$);break;case"selectionchange":if(OS)break;case"keydown":case"keyup":sp(X,s,$)}var we;if(Cc)e:{switch(e){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else qs?qh(e,s)&&(Ie="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Ie="onCompositionStart");Ie&&(Hh&&s.locale!=="ko"&&(qs||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&qs&&(we=Uh()):(ja=$,Sc="value"in ja?ja.value:ja.textContent,qs=!0)),fe=ir(U,Ie),0<fe.length&&(Ie=new Vh(Ie,e,null,s,$),X.push({event:Ie,listeners:fe}),we?Ie.data=we:(we=$h(s),we!==null&&(Ie.data=we)))),(we=ES?CS(e,s):AS(e,s))&&(Ie=ir(U,"onBeforeInput"),0<Ie.length&&(fe=new Vh("onBeforeInput","beforeinput",null,s,$),X.push({event:fe,listeners:Ie}),fe.data=we)),y_(X,e,U,s,$)}Dg(X,t)})}function _l(e,t,s){return{instance:e,listener:t,currentTarget:s}}function ir(e,t){for(var s=t+"Capture",l=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=Hi(e,s),c!=null&&l.unshift(_l(e,c,f)),c=Hi(e,t),c!=null&&l.push(_l(e,c,f))),e.tag===3)return l;e=e.return}return[]}function __(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Mg(e,t,s,l,c){for(var f=t._reactName,b=[];s!==null&&s!==l;){var x=s,N=x.alternate,U=x.stateNode;if(x=x.tag,N!==null&&N===l)break;x!==5&&x!==26&&x!==27||U===null||(N=U,c?(U=Hi(s,f),U!=null&&b.unshift(_l(s,U,N))):c||(U=Hi(s,f),U!=null&&b.push(_l(s,U,N)))),s=s.return}b.length!==0&&e.push({event:t,listeners:b})}var x_=/\r\n?/g,T_=/\u0000|\uFFFD/g;function Rg(e){return(typeof e=="string"?e:""+e).replace(x_,`
25
- `).replace(T_,"")}function Og(e,t){return t=Rg(t),Rg(e)===t}function Qe(e,t,s,l,c,f){switch(s){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Hs(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Hs(e,""+l);break;case"className":ro(e,"class",l);break;case"tabIndex":ro(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ro(e,s,l);break;case"style":Oh(e,l,f);break;case"data":if(t!=="object"){ro(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||s!=="href")){e.removeAttribute(s);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=uo(""+l),e.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(s==="formAction"?(t!=="input"&&Qe(e,t,"name",c.name,c,null),Qe(e,t,"formEncType",c.formEncType,c,null),Qe(e,t,"formMethod",c.formMethod,c,null),Qe(e,t,"formTarget",c.formTarget,c,null)):(Qe(e,t,"encType",c.encType,c,null),Qe(e,t,"method",c.method,c,null),Qe(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=uo(""+l),e.setAttribute(s,l);break;case"onClick":l!=null&&(e.onclick=ea);break;case"onScroll":l!=null&&Oe("scroll",e);break;case"onScrollEnd":l!=null&&Oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(s=l.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}s=uo(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""+l):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":l===!0?e.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,l):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(s,l):e.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(s):e.setAttribute(s,l);break;case"popover":Oe("beforetoggle",e),Oe("toggle",e),oo(e,"popover",l);break;case"xlinkActuate":Wn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Wn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Wn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Wn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Wn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Wn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Wn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Wn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Wn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":oo(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=Q1.get(s)||s,oo(e,s,l))}}function td(e,t,s,l,c,f){switch(s){case"style":Oh(e,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(s=l.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"children":typeof l=="string"?Hs(e,l):(typeof l=="number"||typeof l=="bigint")&&Hs(e,""+l);break;case"onScroll":l!=null&&Oe("scroll",e);break;case"onScrollEnd":l!=null&&Oe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=ea);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ch.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(c=s.endsWith("Capture"),t=s.slice(2,c?s.length-7:void 0),f=e[Zt]||null,f=f!=null?f[s]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof l=="function")){typeof f!="function"&&f!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(t,l,c);break e}s in e?e[s]=l:l===!0?e.setAttribute(s,""):oo(e,s,l)}}}function Vt(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",e),Oe("load",e);var l=!1,c=!1,f;for(f in s)if(s.hasOwnProperty(f)){var b=s[f];if(b!=null)switch(f){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Qe(e,t,f,b,s,null)}}c&&Qe(e,t,"srcSet",s.srcSet,s,null),l&&Qe(e,t,"src",s.src,s,null);return;case"input":Oe("invalid",e);var x=f=b=c=null,N=null,U=null;for(l in s)if(s.hasOwnProperty(l)){var $=s[l];if($!=null)switch(l){case"name":c=$;break;case"type":b=$;break;case"checked":N=$;break;case"defaultChecked":U=$;break;case"value":f=$;break;case"defaultValue":x=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(o(137,t));break;default:Qe(e,t,l,$,s,null)}}Dh(e,f,x,N,U,b,c,!1);return;case"select":Oe("invalid",e),l=b=f=null;for(c in s)if(s.hasOwnProperty(c)&&(x=s[c],x!=null))switch(c){case"value":f=x;break;case"defaultValue":b=x;break;case"multiple":l=x;default:Qe(e,t,c,x,s,null)}t=f,s=b,e.multiple=!!l,t!=null?Ps(e,!!l,t,!1):s!=null&&Ps(e,!!l,s,!0);return;case"textarea":Oe("invalid",e),f=c=l=null;for(b in s)if(s.hasOwnProperty(b)&&(x=s[b],x!=null))switch(b){case"value":l=x;break;case"defaultValue":c=x;break;case"children":f=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(o(91));break;default:Qe(e,t,b,x,s,null)}Mh(e,l,c,f);return;case"option":for(N in s)if(s.hasOwnProperty(N)&&(l=s[N],l!=null))switch(N){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Qe(e,t,N,l,s,null)}return;case"dialog":Oe("beforetoggle",e),Oe("toggle",e),Oe("cancel",e),Oe("close",e);break;case"iframe":case"object":Oe("load",e);break;case"video":case"audio":for(l=0;l<Sl.length;l++)Oe(Sl[l],e);break;case"image":Oe("error",e),Oe("load",e);break;case"details":Oe("toggle",e);break;case"embed":case"source":case"link":Oe("error",e),Oe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(U in s)if(s.hasOwnProperty(U)&&(l=s[U],l!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Qe(e,t,U,l,s,null)}return;default:if(mc(t)){for($ in s)s.hasOwnProperty($)&&(l=s[$],l!==void 0&&td(e,t,$,l,s,void 0));return}}for(x in s)s.hasOwnProperty(x)&&(l=s[x],l!=null&&Qe(e,t,x,l,s,null))}function E_(e,t,s,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,b=null,x=null,N=null,U=null,$=null;for(P in s){var X=s[P];if(s.hasOwnProperty(P)&&X!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":N=X;default:l.hasOwnProperty(P)||Qe(e,t,P,null,l,X)}}for(var I in l){var P=l[I];if(X=s[I],l.hasOwnProperty(I)&&(P!=null||X!=null))switch(I){case"type":f=P;break;case"name":c=P;break;case"checked":U=P;break;case"defaultChecked":$=P;break;case"value":b=P;break;case"defaultValue":x=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:P!==X&&Qe(e,t,I,P,l,X)}}hc(e,b,x,N,U,$,f,c);return;case"select":P=b=x=I=null;for(f in s)if(N=s[f],s.hasOwnProperty(f)&&N!=null)switch(f){case"value":break;case"multiple":P=N;default:l.hasOwnProperty(f)||Qe(e,t,f,null,l,N)}for(c in l)if(f=l[c],N=s[c],l.hasOwnProperty(c)&&(f!=null||N!=null))switch(c){case"value":I=f;break;case"defaultValue":x=f;break;case"multiple":b=f;default:f!==N&&Qe(e,t,c,f,l,N)}t=x,s=b,l=P,I!=null?Ps(e,!!s,I,!1):!!l!=!!s&&(t!=null?Ps(e,!!s,t,!0):Ps(e,!!s,s?[]:"",!1));return;case"textarea":P=I=null;for(x in s)if(c=s[x],s.hasOwnProperty(x)&&c!=null&&!l.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Qe(e,t,x,null,l,c)}for(b in l)if(c=l[b],f=s[b],l.hasOwnProperty(b)&&(c!=null||f!=null))switch(b){case"value":I=c;break;case"defaultValue":P=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==f&&Qe(e,t,b,c,l,f)}kh(e,I,P);return;case"option":for(var re in s)if(I=s[re],s.hasOwnProperty(re)&&I!=null&&!l.hasOwnProperty(re))switch(re){case"selected":e.selected=!1;break;default:Qe(e,t,re,null,l,I)}for(N in l)if(I=l[N],P=s[N],l.hasOwnProperty(N)&&I!==P&&(I!=null||P!=null))switch(N){case"selected":e.selected=I&&typeof I!="function"&&typeof I!="symbol";break;default:Qe(e,t,N,I,l,P)}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 ye in s)I=s[ye],s.hasOwnProperty(ye)&&I!=null&&!l.hasOwnProperty(ye)&&Qe(e,t,ye,null,l,I);for(U in l)if(I=l[U],P=s[U],l.hasOwnProperty(U)&&I!==P&&(I!=null||P!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(o(137,t));break;default:Qe(e,t,U,I,l,P)}return;default:if(mc(t)){for(var Je in s)I=s[Je],s.hasOwnProperty(Je)&&I!==void 0&&!l.hasOwnProperty(Je)&&td(e,t,Je,void 0,l,I);for($ in l)I=l[$],P=s[$],!l.hasOwnProperty($)||I===P||I===void 0&&P===void 0||td(e,t,$,I,l,P);return}}for(var B in s)I=s[B],s.hasOwnProperty(B)&&I!=null&&!l.hasOwnProperty(B)&&Qe(e,t,B,null,l,I);for(X in l)I=l[X],P=s[X],!l.hasOwnProperty(X)||I===P||I==null&&P==null||Qe(e,t,X,I,l,P)}function Bg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function C_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,s=performance.getEntriesByType("resource"),l=0;l<s.length;l++){var c=s[l],f=c.transferSize,b=c.initiatorType,x=c.duration;if(f&&x&&Bg(b)){for(b=0,x=c.responseEnd,l+=1;l<s.length;l++){var N=s[l],U=N.startTime;if(U>x)break;var $=N.transferSize,X=N.initiatorType;$&&Bg(X)&&(N=N.responseEnd,b+=$*(N<x?1:(x-U)/(N-U)))}if(--l,t+=8*(f+b)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var nd=null,ad=null;function lr(e){return e.nodeType===9?e:e.ownerDocument}function Lg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ug(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function sd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var id=null;function A_(){var e=window.event;return e&&e.type==="popstate"?e===id?!1:(id=e,!0):(id=null,!1)}var Ig=typeof setTimeout=="function"?setTimeout:void 0,j_=typeof clearTimeout=="function"?clearTimeout:void 0,zg=typeof Promise=="function"?Promise:void 0,N_=typeof queueMicrotask=="function"?queueMicrotask:typeof zg<"u"?function(e){return zg.resolve(null).then(e).catch(w_)}:Ig;function w_(e){setTimeout(function(){throw e})}function Fa(e){return e==="head"}function Vg(e,t){var s=t,l=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"||s==="/&"){if(l===0){e.removeChild(c),bi(t);return}l--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")l++;else if(s==="html")xl(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,xl(s);for(var f=s.firstChild;f;){var b=f.nextSibling,x=f.nodeName;f[Vi]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=b}}else s==="body"&&xl(e.ownerDocument.body);s=c}while(s);bi(t)}function Pg(e,t){var s=e;e=0;do{var l=s.nextSibling;if(s.nodeType===1?t?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(t?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),l&&l.nodeType===8)if(s=l.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=l}while(s)}function ld(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var s=t;switch(t=t.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":ld(s),dc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function D_(e,t,s,l){for(;e.nodeType===1;){var c=s;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Vi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Tn(e.nextSibling),e===null)break}return null}function k_(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=Tn(e.nextSibling),e===null))return null;return e}function Hg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Tn(e.nextSibling),e===null))return null;return e}function od(e){return e.data==="$?"||e.data==="$~"}function rd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function M_(e,t){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||s.readyState!=="loading")t();else{var l=function(){t(),s.removeEventListener("DOMContentLoaded",l)};s.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Tn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var cd=null;function Gg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return Tn(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function Fg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(t===0)return e;t--}else s!=="/$"&&s!=="/&"||t++}e=e.previousSibling}return null}function qg(e,t,s){switch(t=lr(s),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function xl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);dc(e)}var En=new Map,$g=new Set;function or(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ga=G.d;G.d={f:R_,r:O_,D:B_,C:L_,L:U_,m:I_,X:V_,S:z_,M:P_};function R_(){var e=ga.f(),t=Jo();return e||t}function O_(e){var t=Is(e);t!==null&&t.tag===5&&t.type==="form"?cm(t):ga.r(e)}var gi=typeof document>"u"?null:document;function Yg(e,t,s){var l=gi;if(l&&typeof t=="string"&&t){var c=gn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof s=="string"&&(c+='[crossorigin="'+s+'"]'),$g.has(c)||($g.add(c),e={rel:e,crossOrigin:s,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),Vt(t,"link",e),Rt(t),l.head.appendChild(t)))}}function B_(e){ga.D(e),Yg("dns-prefetch",e,null)}function L_(e,t){ga.C(e,t),Yg("preconnect",e,t)}function U_(e,t,s){ga.L(e,t,s);var l=gi;if(l&&e&&t){var c='link[rel="preload"][as="'+gn(t)+'"]';t==="image"&&s&&s.imageSrcSet?(c+='[imagesrcset="'+gn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(c+='[imagesizes="'+gn(s.imageSizes)+'"]')):c+='[href="'+gn(e)+'"]';var f=c;switch(t){case"style":f=yi(e);break;case"script":f=vi(e)}En.has(f)||(e=y({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),En.set(f,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(Tl(f))||t==="script"&&l.querySelector(El(f))||(t=l.createElement("link"),Vt(t,"link",e),Rt(t),l.head.appendChild(t)))}}function I_(e,t){ga.m(e,t);var s=gi;if(s&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+gn(l)+'"][href="'+gn(e)+'"]',f=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=vi(e)}if(!En.has(f)&&(e=y({rel:"modulepreload",href:e},t),En.set(f,e),s.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(El(f)))return}l=s.createElement("link"),Vt(l,"link",e),Rt(l),s.head.appendChild(l)}}}function z_(e,t,s){ga.S(e,t,s);var l=gi;if(l&&e){var c=zs(l).hoistableStyles,f=yi(e);t=t||"default";var b=c.get(f);if(!b){var x={loading:0,preload:null};if(b=l.querySelector(Tl(f)))x.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},s),(s=En.get(f))&&ud(e,s);var N=b=l.createElement("link");Rt(N),Vt(N,"link",e),N._p=new Promise(function(U,$){N.onload=U,N.onerror=$}),N.addEventListener("load",function(){x.loading|=1}),N.addEventListener("error",function(){x.loading|=2}),x.loading|=4,rr(b,t,l)}b={type:"stylesheet",instance:b,count:1,state:x},c.set(f,b)}}}function V_(e,t){ga.X(e,t);var s=gi;if(s&&e){var l=zs(s).hoistableScripts,c=vi(e),f=l.get(c);f||(f=s.querySelector(El(c)),f||(e=y({src:e,async:!0},t),(t=En.get(c))&&dd(e,t),f=s.createElement("script"),Rt(f),Vt(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function P_(e,t){ga.M(e,t);var s=gi;if(s&&e){var l=zs(s).hoistableScripts,c=vi(e),f=l.get(c);f||(f=s.querySelector(El(c)),f||(e=y({src:e,async:!0,type:"module"},t),(t=En.get(c))&&dd(e,t),f=s.createElement("script"),Rt(f),Vt(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function Kg(e,t,s,l){var c=(c=ne.current)?or(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(t=yi(s.href),s=zs(c).hoistableStyles,l=s.get(t),l||(l={type:"style",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=yi(s.href);var f=zs(c).hoistableStyles,b=f.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,b),(f=c.querySelector(Tl(e)))&&!f._p&&(b.instance=f,b.state.loading=5),En.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},En.set(e,s),f||H_(c,e,s,b.state))),t&&l===null)throw Error(o(528,""));return b}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=s.async,s=s.src,typeof s=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=vi(s),s=zs(c).hoistableScripts,l=s.get(t),l||(l={type:"script",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function yi(e){return'href="'+gn(e)+'"'}function Tl(e){return'link[rel="stylesheet"]['+e+"]"}function Zg(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function H_(e,t,s,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Vt(t,"link",s),Rt(t),e.head.appendChild(t))}function vi(e){return'[src="'+gn(e)+'"]'}function El(e){return"script[async]"+e}function Xg(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+gn(s.href)+'"]');if(l)return t.instance=l,Rt(l),l;var c=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Rt(l),Vt(l,"style",c),rr(l,s.precedence,e),t.instance=l;case"stylesheet":c=yi(s.href);var f=e.querySelector(Tl(c));if(f)return t.state.loading|=4,t.instance=f,Rt(f),f;l=Zg(s),(c=En.get(c))&&ud(l,c),f=(e.ownerDocument||e).createElement("link"),Rt(f);var b=f;return b._p=new Promise(function(x,N){b.onload=x,b.onerror=N}),Vt(f,"link",l),t.state.loading|=4,rr(f,s.precedence,e),t.instance=f;case"script":return f=vi(s.src),(c=e.querySelector(El(f)))?(t.instance=c,Rt(c),c):(l=s,(c=En.get(f))&&(l=y({},s),dd(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Rt(c),Vt(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,rr(l,s.precedence,e));return t.instance}function rr(e,t,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,f=c,b=0;b<l.length;b++){var x=l[b];if(x.dataset.precedence===t)f=x;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=s.nodeType===9?s.head:s,t.insertBefore(e,t.firstChild))}function ud(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function dd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var cr=null;function Qg(e,t,s){if(cr===null){var l=new Map,c=cr=new Map;c.set(s,l)}else c=cr,l=c.get(s),l||(l=new Map,c.set(s,l));if(l.has(e))return l;for(l.set(e,null),s=s.getElementsByTagName(e),c=0;c<s.length;c++){var f=s[c];if(!(f[Vi]||f[Lt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var b=f.getAttribute(t)||"";b=e+b;var x=l.get(b);x?x.push(f):l.set(b,[f])}}return l}function Jg(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function G_(e,t,s){if(s===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Wg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function F_(e,t,s,l){if(s.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var c=yi(l.href),f=t.querySelector(Tl(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ur.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=f,Rt(f);return}f=t.ownerDocument||t,l=Zg(l),(c=En.get(c))&&ud(l,c),f=f.createElement("link"),Rt(f);var b=f;b._p=new Promise(function(x,N){b.onload=x,b.onerror=N}),Vt(f,"link",l),s.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,t),(t=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=ur.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var fd=0;function q_(e,t){return e.stylesheets&&e.count===0&&fr(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var l=setTimeout(function(){if(e.stylesheets&&fr(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&fd===0&&(fd=62500*C_());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&fr(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>fd?50:800)+t);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function ur(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var dr=null;function fr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,dr=new Map,t.forEach($_,e),dr=null,ur.call(e))}function $_(e,t){if(!(t.state.loading&4)){var s=dr.get(e);if(s)var l=s.get(null);else{s=new Map,dr.set(e,s);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var b=c[f];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(s.set(b.dataset.precedence,b),l=b)}l&&s.set(null,l)}c=t.instance,b=c.getAttribute("data-precedence"),f=s.get(b)||l,f===l&&s.set(null,c),s.set(b,c),this.count++,l=ur.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Cl={$$typeof:R,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function Y_(e,t,s,l,c,f,b,x,N){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=oc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oc(0),this.hiddenUpdates=oc(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function ey(e,t,s,l,c,f,b,x,N,U,$,X){return e=new Y_(e,t,s,b,N,U,$,X,x),t=1,f===!0&&(t|=24),f=sn(3,null,null,t),e.current=f,f.stateNode=e,t=qc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:l,isDehydrated:s,cache:t},Zc(f),e}function ty(e){return e?(e=Zs,e):Zs}function ny(e,t,s,l,c,f){c=ty(c),l.context===null?l.context=c:l.pendingContext=c,l=Ra(t),l.payload={element:s},f=f===void 0?null:f,f!==null&&(l.callback=f),s=Oa(e,l,t),s!==null&&(tn(s,e,t),al(s,e,t))}function ay(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function hd(e,t){ay(e,t),(e=e.alternate)&&ay(e,t)}function sy(e){if(e.tag===13||e.tag===31){var t=ds(e,67108864);t!==null&&tn(t,e,67108864),hd(e,67108864)}}function iy(e){if(e.tag===13||e.tag===31){var t=un();t=rc(t);var s=ds(e,t);s!==null&&tn(s,e,t),hd(e,t)}}var hr=!0;function K_(e,t,s,l){var c=O.T;O.T=null;var f=G.p;try{G.p=2,pd(e,t,s,l)}finally{G.p=f,O.T=c}}function Z_(e,t,s,l){var c=O.T;O.T=null;var f=G.p;try{G.p=8,pd(e,t,s,l)}finally{G.p=f,O.T=c}}function pd(e,t,s,l){if(hr){var c=md(l);if(c===null)ed(e,t,l,pr,s),oy(e,l);else if(Q_(c,e,t,s,l))l.stopPropagation();else if(oy(e,l),t&4&&-1<X_.indexOf(e)){for(;c!==null;){var f=Is(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var b=ls(f.pendingLanes);if(b!==0){var x=f;for(x.pendingLanes|=2,x.entangledLanes|=2;b;){var N=1<<31-Ee(b);x.entanglements[1]|=N,b&=~N}Hn(f),(Fe&6)===0&&(Xo=te()+500,bl(0))}}break;case 31:case 13:x=ds(f,2),x!==null&&tn(x,f,2),Jo(),hd(f,2)}if(f=md(l),f===null&&ed(e,t,l,pr,s),f===c)break;c=f}c!==null&&l.stopPropagation()}else ed(e,t,l,null,s)}}function md(e){return e=yc(e),gd(e)}var pr=null;function gd(e){if(pr=null,e=Us(e),e!==null){var t=u(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=d(t),e!==null)return e;e=null}else if(s===31){if(e=p(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return pr=e,null}function ly(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(oe()){case Se:return 2;case ve:return 8;case ze:case je:return 32;case gt:return 268435456;default:return 32}default:return 32}}var yd=!1,qa=null,$a=null,Ya=null,Al=new Map,jl=new Map,Ka=[],X_="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 oy(e,t){switch(e){case"focusin":case"focusout":qa=null;break;case"dragenter":case"dragleave":$a=null;break;case"mouseover":case"mouseout":Ya=null;break;case"pointerover":case"pointerout":Al.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jl.delete(t.pointerId)}}function Nl(e,t,s,l,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:s,eventSystemFlags:l,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Is(t),t!==null&&sy(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Q_(e,t,s,l,c){switch(t){case"focusin":return qa=Nl(qa,e,t,s,l,c),!0;case"dragenter":return $a=Nl($a,e,t,s,l,c),!0;case"mouseover":return Ya=Nl(Ya,e,t,s,l,c),!0;case"pointerover":var f=c.pointerId;return Al.set(f,Nl(Al.get(f)||null,e,t,s,l,c)),!0;case"gotpointercapture":return f=c.pointerId,jl.set(f,Nl(jl.get(f)||null,e,t,s,l,c)),!0}return!1}function ry(e){var t=Us(e.target);if(t!==null){var s=u(t);if(s!==null){if(t=s.tag,t===13){if(t=d(s),t!==null){e.blockedOn=t,xh(e.priority,function(){iy(s)});return}}else if(t===31){if(t=p(s),t!==null){e.blockedOn=t,xh(e.priority,function(){iy(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=md(e.nativeEvent);if(s===null){s=e.nativeEvent;var l=new s.constructor(s.type,s);gc=l,s.target.dispatchEvent(l),gc=null}else return t=Is(s),t!==null&&sy(t),e.blockedOn=s,!1;t.shift()}return!0}function cy(e,t,s){mr(e)&&s.delete(t)}function J_(){yd=!1,qa!==null&&mr(qa)&&(qa=null),$a!==null&&mr($a)&&($a=null),Ya!==null&&mr(Ya)&&(Ya=null),Al.forEach(cy),jl.forEach(cy)}function gr(e,t){e.blockedOn===t&&(e.blockedOn=null,yd||(yd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,J_)))}var yr=null;function uy(e){yr!==e&&(yr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){yr===e&&(yr=null);for(var t=0;t<e.length;t+=3){var s=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(gd(l||s)===null)continue;break}var f=Is(s);f!==null&&(e.splice(t,3),t-=3,mu(f,{pending:!0,data:c,method:s.method,action:l},l,c))}}))}function bi(e){function t(N){return gr(N,e)}qa!==null&&gr(qa,e),$a!==null&&gr($a,e),Ya!==null&&gr(Ya,e),Al.forEach(t),jl.forEach(t);for(var s=0;s<Ka.length;s++){var l=Ka[s];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ka.length&&(s=Ka[0],s.blockedOn===null);)ry(s),s.blockedOn===null&&Ka.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var c=s[l],f=s[l+1],b=c[Zt]||null;if(typeof f=="function")b||uy(s);else if(b){var x=null;if(f&&f.hasAttribute("formAction")){if(c=f,b=f[Zt]||null)x=b.formAction;else if(gd(c)!==null)continue}else x=b.action;typeof x=="function"?s[l+1]=x:(s.splice(l,3),l-=3),uy(s)}}}function dy(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(b){return c=b})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),l||setTimeout(s,20)}function s(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(s,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function vd(e){this._internalRoot=e}vr.prototype.render=vd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var s=t.current,l=un();ny(s,l,e,t,null,null)},vr.prototype.unmount=vd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ny(e.current,2,null,e,null,null),Jo(),t[Ls]=null}};function vr(e){this._internalRoot=e}vr.prototype.unstable_scheduleHydration=function(e){if(e){var t=_h();e={blockedOn:null,target:e,priority:t};for(var s=0;s<Ka.length&&t!==0&&t<Ka[s].priority;s++);Ka.splice(s,0,e),s===0&&ry(e)}};var fy=a.version;if(fy!=="19.2.4")throw Error(o(527,fy,"19.2.4"));G.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var W_={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var br=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!br.isDisabled&&br.supportsFiber)try{yt=br.inject(W_),Le=br}catch{}}return wl.createRoot=function(e,t){if(!r(e))throw Error(o(299));var s=!1,l="",c=bm,f=Sm,b=_m;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError)),t=ey(e,1,!1,null,null,s,l,null,c,f,b,dy),e[Ls]=t.current,Wu(e),new vd(t)},wl.hydrateRoot=function(e,t,s){if(!r(e))throw Error(o(299));var l=!1,c="",f=bm,b=Sm,x=_m,N=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(b=s.onCaughtError),s.onRecoverableError!==void 0&&(x=s.onRecoverableError),s.formState!==void 0&&(N=s.formState)),t=ey(e,1,!0,t,s??null,l,c,N,f,b,x,dy),t.context=ty(null),s=t.current,l=un(),l=rc(l),c=Ra(l),c.callback=null,Oa(s,c,l),s=l,t.current.lanes=s,zi(t,s),Hn(t),e[Ls]=t.current,Wu(e),new vr(t)},wl.version="19.2.4",wl}var by;function mx(){if(by)return bd.exports;by=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),bd.exports=px(),bd.exports}var gx=mx();/**
26
- * react-router v7.13.1
27
- *
28
- * Copyright (c) Remix Software Inc.
29
- *
30
- * This source code is licensed under the MIT license found in the
31
- * LICENSE.md file in the root directory of this source tree.
32
- *
33
- * @license MIT
34
- */var Sy="popstate";function _y(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function yx(n={}){function a(o,r){var g;let u=(g=r.state)==null?void 0:g.masked,{pathname:d,search:p,hash:m}=u||o.location;return $d("",{pathname:d,search:p,hash:m},r.state&&r.state.usr||null,r.state&&r.state.key||"default",u?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function i(o,r){return typeof r=="string"?r:Gl(r)}return bx(a,i,null,n)}function it(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function jn(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function vx(){return Math.random().toString(36).substring(2,10)}function xy(n,a){return{usr:n.state,key:n.key,idx:a,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function $d(n,a,i=null,o,r){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Mi(a):a,state:i,key:a&&a.key||o||vx(),unstable_mask:r}}function Gl({pathname:n="/",search:a="",hash:i=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function Mi(n){let a={};if(n){let i=n.indexOf("#");i>=0&&(a.hash=n.substring(i),n=n.substring(0,i));let o=n.indexOf("?");o>=0&&(a.search=n.substring(o),n=n.substring(0,o)),n&&(a.pathname=n)}return a}function bx(n,a,i,o={}){let{window:r=document.defaultView,v5Compat:u=!1}=o,d=r.history,p="POP",m=null,g=v();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function v(){return(d.state||{idx:null}).idx}function y(){p="POP";let A=v(),C=A==null?null:A-g;g=A,m&&m({action:p,location:j.location,delta:C})}function _(A,C){p="PUSH";let M=_y(A)?A:$d(j.location,A,C);g=v()+1;let R=xy(M,g),Y=j.createHref(M.unstable_mask||M);try{d.pushState(R,"",Y)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;r.location.assign(Y)}u&&m&&m({action:p,location:j.location,delta:1})}function T(A,C){p="REPLACE";let M=_y(A)?A:$d(j.location,A,C);g=v();let R=xy(M,g),Y=j.createHref(M.unstable_mask||M);d.replaceState(R,"",Y),u&&m&&m({action:p,location:j.location,delta:0})}function E(A){return Sx(A)}let j={get action(){return p},get location(){return n(r,d)},listen(A){if(m)throw new Error("A history only accepts one active listener");return r.addEventListener(Sy,y),m=A,()=>{r.removeEventListener(Sy,y),m=null}},createHref(A){return a(r,A)},createURL:E,encodeLocation(A){let C=E(A);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:_,replace:T,go(A){return d.go(A)}};return j}function Sx(n,a=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),it(i,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:Gl(n);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=i+o),new URL(o,i)}function y0(n,a,i="/"){return _x(n,a,i,!1)}function _x(n,a,i,o){let r=typeof a=="string"?Mi(a):a,u=_a(r.pathname||"/",i);if(u==null)return null;let d=v0(n);xx(d);let p=null;for(let m=0;p==null&&m<d.length;++m){let g=S0(u);p=kx(d[m],g,o)}return p}function v0(n,a=[],i=[],o="",r=!1){let u=(d,p,m=r,g)=>{let v={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:p,route:d};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(o)&&m)return;it(v.relativePath.startsWith(o),`Absolute route path "${v.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(o.length)}let y=$n([o,v.relativePath]),_=i.concat(v);d.children&&d.children.length>0&&(it(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),v0(d.children,a,_,y,m)),!(d.path==null&&!d.index)&&a.push({path:y,score:wx(y,d.index),routesMeta:_})};return n.forEach((d,p)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))u(d,p);else for(let g of b0(d.path))u(d,p,!0,g)}),a}function b0(n){let a=n.split("/");if(a.length===0)return[];let[i,...o]=a,r=i.endsWith("?"),u=i.replace(/\?$/,"");if(o.length===0)return r?[u,""]:[u];let d=b0(o.join("/")),p=[];return p.push(...d.map(m=>m===""?u:[u,m].join("/"))),r&&p.push(...d),p.map(m=>n.startsWith("/")&&m===""?"/":m)}function xx(n){n.sort((a,i)=>a.score!==i.score?i.score-a.score:Dx(a.routesMeta.map(o=>o.childrenIndex),i.routesMeta.map(o=>o.childrenIndex)))}var Tx=/^:[\w-]+$/,Ex=3,Cx=2,Ax=1,jx=10,Nx=-2,Ty=n=>n==="*";function wx(n,a){let i=n.split("/"),o=i.length;return i.some(Ty)&&(o+=Nx),a&&(o+=Cx),i.filter(r=>!Ty(r)).reduce((r,u)=>r+(Tx.test(u)?Ex:u===""?Ax:jx),o)}function Dx(n,a){return n.length===a.length&&n.slice(0,-1).every((o,r)=>o===a[r])?n[n.length-1]-a[a.length-1]:0}function kx(n,a,i=!1){let{routesMeta:o}=n,r={},u="/",d=[];for(let p=0;p<o.length;++p){let m=o[p],g=p===o.length-1,v=u==="/"?a:a.slice(u.length)||"/",y=Fl({path:m.relativePath,caseSensitive:m.caseSensitive,end:g},v),_=m.route;if(!y&&g&&i&&!o[o.length-1].route.index&&(y=Fl({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},v)),!y)return null;Object.assign(r,y.params),d.push({params:r,pathname:$n([u,y.pathname]),pathnameBase:Lx($n([u,y.pathnameBase])),route:_}),y.pathnameBase!=="/"&&(u=$n([u,y.pathnameBase]))}return d}function Fl(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,o]=Mx(n.path,n.caseSensitive,n.end),r=a.match(i);if(!r)return null;let u=r[0],d=u.replace(/(.)\/+$/,"$1"),p=r.slice(1);return{params:o.reduce((g,{paramName:v,isOptional:y},_)=>{if(v==="*"){let E=p[_]||"";d=u.slice(0,u.length-E.length).replace(/(.)\/+$/,"$1")}const T=p[_];return y&&!T?g[v]=void 0:g[v]=(T||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:d,pattern:n}}function Mx(n,a=!1,i=!0){jn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,p,m,g,v)=>{if(o.push({paramName:p,isOptional:m!=null}),m){let y=v.charAt(g+d.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,a?void 0:"i"),o]}function S0(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return jn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function _a(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,o=n.charAt(i);return o&&o!=="/"?null:n.slice(i)||"/"}var Rx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Ox(n,a="/"){let{pathname:i,search:o="",hash:r=""}=typeof n=="string"?Mi(n):n,u;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?u=Ey(i.substring(1),"/"):u=Ey(i,a)):u=a,{pathname:u,search:Ux(o),hash:Ix(r)}}function Ey(n,a){let i=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?i.length>1&&i.pop():r!=="."&&i.push(r)}),i.length>1?i.join("/"):"/"}function xd(n,a,i,o){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Bx(n){return n.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Cf(n){let a=Bx(n);return a.map((i,o)=>o===a.length-1?i.pathname:i.pathnameBase)}function Kr(n,a,i,o=!1){let r;typeof n=="string"?r=Mi(n):(r={...n},it(!r.pathname||!r.pathname.includes("?"),xd("?","pathname","search",r)),it(!r.pathname||!r.pathname.includes("#"),xd("#","pathname","hash",r)),it(!r.search||!r.search.includes("#"),xd("#","search","hash",r)));let u=n===""||r.pathname==="",d=u?"/":r.pathname,p;if(d==null)p=i;else{let y=a.length-1;if(!o&&d.startsWith("..")){let _=d.split("/");for(;_[0]==="..";)_.shift(),y-=1;r.pathname=_.join("/")}p=y>=0?a[y]:"/"}let m=Ox(r,p),g=d&&d!=="/"&&d.endsWith("/"),v=(u||d===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(g||v)&&(m.pathname+="/"),m}var $n=n=>n.join("/").replace(/\/\/+/g,"/"),Lx=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Ux=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Ix=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,zx=class{constructor(n,a,i,o=!1){this.status=n,this.statusText=a||"",this.internal=o,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function Vx(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Px(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var _0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function x0(n,a){let i=n;if(typeof i!="string"||!Rx.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let o=i,r=!1;if(_0)try{let u=new URL(window.location.href),d=i.startsWith("//")?new URL(u.protocol+i):new URL(i),p=_a(d.pathname,a);d.origin===u.origin&&p!=null?i=p+d.search+d.hash:r=!0}catch{jn(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:r,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var T0=["POST","PUT","PATCH","DELETE"];new Set(T0);var Hx=["GET",...T0];new Set(Hx);var Ri=S.createContext(null);Ri.displayName="DataRouter";var Zr=S.createContext(null);Zr.displayName="DataRouterState";var Gx=S.createContext(!1),E0=S.createContext({isTransitioning:!1});E0.displayName="ViewTransition";var Fx=S.createContext(new Map);Fx.displayName="Fetchers";var qx=S.createContext(null);qx.displayName="Await";var pn=S.createContext(null);pn.displayName="Navigation";var Jl=S.createContext(null);Jl.displayName="Location";var wn=S.createContext({outlet:null,matches:[],isDataRoute:!1});wn.displayName="Route";var Af=S.createContext(null);Af.displayName="RouteError";var C0="REACT_ROUTER_ERROR",$x="REDIRECT",Yx="ROUTE_ERROR_RESPONSE";function Kx(n){if(n.startsWith(`${C0}:${$x}:{`))try{let a=JSON.parse(n.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function Zx(n){if(n.startsWith(`${C0}:${Yx}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new zx(a.status,a.statusText,a.data)}catch{}}function Xx(n,{relative:a}={}){it(Os(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:o}=S.useContext(pn),{hash:r,pathname:u,search:d}=Wl(n,{relative:a}),p=u;return i!=="/"&&(p=u==="/"?i:$n([i,u])),o.createHref({pathname:p,search:d,hash:r})}function Os(){return S.useContext(Jl)!=null}function Kt(){return it(Os(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Jl).location}function $t(n){it(Os(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:a}=Kt();return S.useMemo(()=>Fl(n,S0(a)),[a,n])}var A0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function j0(n){S.useContext(pn).static||S.useLayoutEffect(n)}function Xr(){let{isDataRoute:n}=S.useContext(wn);return n?dT():Qx()}function Qx(){it(Os(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Ri),{basename:a,navigator:i}=S.useContext(pn),{matches:o}=S.useContext(wn),{pathname:r}=Kt(),u=JSON.stringify(Cf(o)),d=S.useRef(!1);return j0(()=>{d.current=!0}),S.useCallback((m,g={})=>{if(jn(d.current,A0),!d.current)return;if(typeof m=="number"){i.go(m);return}let v=Kr(m,JSON.parse(u),r,g.relative==="path");n==null&&a!=="/"&&(v.pathname=v.pathname==="/"?a:$n([a,v.pathname])),(g.replace?i.replace:i.push)(v,g.state,g)},[a,i,u,r,n])}var Jx=S.createContext(null);function Wx(n){let a=S.useContext(wn).outlet;return S.useMemo(()=>a&&S.createElement(Jx.Provider,{value:n},a),[a,n])}function Qr(){let{matches:n}=S.useContext(wn),a=n[n.length-1];return a?a.params:{}}function Wl(n,{relative:a}={}){let{matches:i}=S.useContext(wn),{pathname:o}=Kt(),r=JSON.stringify(Cf(i));return S.useMemo(()=>Kr(n,JSON.parse(r),o,a==="path"),[n,r,o,a])}function eT(n,a){return N0(n,a)}function N0(n,a,i){var A;it(Os(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(pn),{matches:r}=S.useContext(wn),u=r[r.length-1],d=u?u.params:{},p=u?u.pathname:"/",m=u?u.pathnameBase:"/",g=u&&u.route;{let C=g&&g.path||"";D0(p,!g||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
35
-
36
- Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let v=Kt(),y;if(a){let C=typeof a=="string"?Mi(a):a;it(m==="/"||((A=C.pathname)==null?void 0:A.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${C.pathname}" was given in the \`location\` prop.`),y=C}else y=v;let _=y.pathname||"/",T=_;if(m!=="/"){let C=m.replace(/^\//,"").split("/");T="/"+_.replace(/^\//,"").split("/").slice(C.length).join("/")}let E=y0(n,{pathname:T});jn(g||E!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),jn(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let j=iT(E&&E.map(C=>Object.assign({},C,{params:Object.assign({},d,C.params),pathname:$n([m,o.encodeLocation?o.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?m:$n([m,o.encodeLocation?o.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),r,i);return a&&j?S.createElement(Jl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...y},navigationType:"POP"}},j):j}function tT(){let n=uT(),a=Vx(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:u},"ErrorBoundary")," or"," ",S.createElement("code",{style:u},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),i?S.createElement("pre",{style:r},i):null,d)}var nT=S.createElement(tT,null),w0=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const i=Zx(n.digest);i&&(n=i)}let a=n!==void 0?S.createElement(wn.Provider,{value:this.props.routeContext},S.createElement(Af.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(aT,{error:n},a):a}};w0.contextType=Gx;var Td=new WeakMap;function aT({children:n,error:a}){let{basename:i}=S.useContext(pn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=Kx(a.digest);if(o){let r=Td.get(a);if(r)throw r;let u=x0(o.location,i);if(_0&&!Td.get(a))if(u.isExternal||o.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw Td.set(a,d),d}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return n}function sT({routeContext:n,match:a,children:i}){let o=S.useContext(Ri);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(wn.Provider,{value:n},i)}function iT(n,a=[],i){let o=i==null?void 0:i.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(a.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let r=n,u=o==null?void 0:o.errors;if(u!=null){let v=r.findIndex(y=>y.route.id&&(u==null?void 0:u[y.route.id])!==void 0);it(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),r=r.slice(0,Math.min(r.length,v+1))}let d=!1,p=-1;if(i&&o){d=o.renderFallback;for(let v=0;v<r.length;v++){let y=r[v];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(p=v),y.route.id){let{loaderData:_,errors:T}=o,E=y.route.loader&&!_.hasOwnProperty(y.route.id)&&(!T||T[y.route.id]===void 0);if(y.route.lazy||E){i.isStatic&&(d=!0),p>=0?r=r.slice(0,p+1):r=[r[0]];break}}}}let m=i==null?void 0:i.onError,g=o&&m?(v,y)=>{var _,T;m(v,{location:o.location,params:((T=(_=o.matches)==null?void 0:_[0])==null?void 0:T.params)??{},unstable_pattern:Px(o.matches),errorInfo:y})}:void 0;return r.reduceRight((v,y,_)=>{let T,E=!1,j=null,A=null;o&&(T=u&&y.route.id?u[y.route.id]:void 0,j=y.route.errorElement||nT,d&&(p<0&&_===0?(D0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,A=null):p===_&&(E=!0,A=y.route.hydrateFallbackElement||null)));let C=a.concat(r.slice(0,_+1)),M=()=>{let R;return T?R=j:E?R=A:y.route.Component?R=S.createElement(y.route.Component,null):y.route.element?R=y.route.element:R=v,S.createElement(sT,{match:y,routeContext:{outlet:v,matches:C,isDataRoute:o!=null},children:R})};return o&&(y.route.ErrorBoundary||y.route.errorElement||_===0)?S.createElement(w0,{location:o.location,revalidation:o.revalidation,component:j,error:T,children:M(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:g}):M()},null)}function jf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lT(n){let a=S.useContext(Ri);return it(a,jf(n)),a}function oT(n){let a=S.useContext(Zr);return it(a,jf(n)),a}function rT(n){let a=S.useContext(wn);return it(a,jf(n)),a}function Nf(n){let a=rT(n),i=a.matches[a.matches.length-1];return it(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function cT(){return Nf("useRouteId")}function uT(){var o;let n=S.useContext(Af),a=oT("useRouteError"),i=Nf("useRouteError");return n!==void 0?n:(o=a.errors)==null?void 0:o[i]}function dT(){let{router:n}=lT("useNavigate"),a=Nf("useNavigate"),i=S.useRef(!1);return j0(()=>{i.current=!0}),S.useCallback(async(r,u={})=>{jn(i.current,A0),i.current&&(typeof r=="number"?await n.navigate(r):await n.navigate(r,{fromRouteId:a,...u}))},[n,a])}var Cy={};function D0(n,a,i){!a&&!Cy[n]&&(Cy[n]=!0,jn(!1,i))}S.memo(fT);function fT({routes:n,future:a,state:i,isStatic:o,onError:r}){return N0(n,void 0,{state:i,isStatic:o,onError:r})}function wr({to:n,replace:a,state:i,relative:o}){it(Os(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=S.useContext(pn);jn(!r,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=S.useContext(wn),{pathname:d}=Kt(),p=Xr(),m=Kr(n,Cf(u),d,o==="path"),g=JSON.stringify(m);return S.useEffect(()=>{p(JSON.parse(g),{replace:a,state:i,relative:o})},[p,g,o,a,i]),null}function k0(n){return Wx(n.context)}function St(n){it(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function hT({basename:n="/",children:a=null,location:i,navigationType:o="POP",navigator:r,static:u=!1,unstable_useTransitions:d}){it(!Os(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=n.replace(/^\/*/,"/"),m=S.useMemo(()=>({basename:p,navigator:r,static:u,unstable_useTransitions:d,future:{}}),[p,r,u,d]);typeof i=="string"&&(i=Mi(i));let{pathname:g="/",search:v="",hash:y="",state:_=null,key:T="default",unstable_mask:E}=i,j=S.useMemo(()=>{let A=_a(g,p);return A==null?null:{location:{pathname:A,search:v,hash:y,state:_,key:T,unstable_mask:E},navigationType:o}},[p,g,v,y,_,T,o,E]);return jn(j!=null,`<Router basename="${p}"> is not able to match the URL "${g}${v}${y}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:S.createElement(pn.Provider,{value:m},S.createElement(Jl.Provider,{children:a,value:j}))}function pT({children:n,location:a}){return eT(Yd(n),a)}function Yd(n,a=[]){let i=[];return S.Children.forEach(n,(o,r)=>{if(!S.isValidElement(o))return;let u=[...a,r];if(o.type===S.Fragment){i.push.apply(i,Yd(o.props.children,u));return}it(o.type===St,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),it(!o.props.index||!o.props.children,"An index route cannot have child routes.");let d={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=Yd(o.props.children,u)),i.push(d)}),i}var Dr="get",kr="application/x-www-form-urlencoded";function Jr(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function mT(n){return Jr(n)&&n.tagName.toLowerCase()==="button"}function gT(n){return Jr(n)&&n.tagName.toLowerCase()==="form"}function yT(n){return Jr(n)&&n.tagName.toLowerCase()==="input"}function vT(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function bT(n,a){return n.button===0&&(!a||a==="_self")&&!vT(n)}function Kd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((a,i)=>{let o=n[i];return a.concat(Array.isArray(o)?o.map(r=>[i,r]):[[i,o]])},[]))}function ST(n,a){let i=Kd(n);return a&&a.forEach((o,r)=>{i.has(r)||a.getAll(r).forEach(u=>{i.append(r,u)})}),i}var _r=null;function _T(){if(_r===null)try{new FormData(document.createElement("form"),0),_r=!1}catch{_r=!0}return _r}var xT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ed(n){return n!=null&&!xT.has(n)?(jn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${kr}"`),null):n}function TT(n,a){let i,o,r,u,d;if(gT(n)){let p=n.getAttribute("action");o=p?_a(p,a):null,i=n.getAttribute("method")||Dr,r=Ed(n.getAttribute("enctype"))||kr,u=new FormData(n)}else if(mT(n)||yT(n)&&(n.type==="submit"||n.type==="image")){let p=n.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=n.getAttribute("formaction")||p.getAttribute("action");if(o=m?_a(m,a):null,i=n.getAttribute("formmethod")||p.getAttribute("method")||Dr,r=Ed(n.getAttribute("formenctype"))||Ed(p.getAttribute("enctype"))||kr,u=new FormData(p,n),!_T()){let{name:g,type:v,value:y}=n;if(v==="image"){let _=g?`${g}.`:"";u.append(`${_}x`,"0"),u.append(`${_}y`,"0")}else g&&u.append(g,y)}}else{if(Jr(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Dr,o=null,r=kr,d=n}return u&&r==="text/plain"&&(d=u,u=void 0),{action:o,method:i.toLowerCase(),encType:r,formData:u,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function wf(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function ET(n,a,i,o){let r=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i?r.pathname.endsWith("/")?r.pathname=`${r.pathname}_.${o}`:r.pathname=`${r.pathname}.${o}`:r.pathname==="/"?r.pathname=`_root.${o}`:a&&_a(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${o}`,r}async function CT(n,a){if(n.id in a)return a[n.id];try{let i=await import(n.module);return a[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function AT(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function jT(n,a,i){let o=await Promise.all(n.map(async r=>{let u=a.routes[r.route.id];if(u){let d=await CT(u,i);return d.links?d.links():[]}return[]}));return kT(o.flat(1).filter(AT).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function Ay(n,a,i,o,r,u){let d=(m,g)=>i[g]?m.route.id!==i[g].route.id:!0,p=(m,g)=>{var v;return i[g].pathname!==m.pathname||((v=i[g].route.path)==null?void 0:v.endsWith("*"))&&i[g].params["*"]!==m.params["*"]};return u==="assets"?a.filter((m,g)=>d(m,g)||p(m,g)):u==="data"?a.filter((m,g)=>{var y;let v=o.routes[m.route.id];if(!v||!v.hasLoader)return!1;if(d(m,g)||p(m,g))return!0;if(m.route.shouldRevalidate){let _=m.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:((y=i[0])==null?void 0:y.params)||{},nextUrl:new URL(n,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function NT(n,a,{includeHydrateFallback:i}={}){return wT(n.map(o=>{let r=a.routes[o.route.id];if(!r)return[];let u=[r.module];return r.clientActionModule&&(u=u.concat(r.clientActionModule)),r.clientLoaderModule&&(u=u.concat(r.clientLoaderModule)),i&&r.hydrateFallbackModule&&(u=u.concat(r.hydrateFallbackModule)),r.imports&&(u=u.concat(r.imports)),u}).flat(1))}function wT(n){return[...new Set(n)]}function DT(n){let a={},i=Object.keys(n).sort();for(let o of i)a[o]=n[o];return a}function kT(n,a){let i=new Set;return new Set(a),n.reduce((o,r)=>{let u=JSON.stringify(DT(r));return i.has(u)||(i.add(u),o.push({key:u,link:r})),o},[])}function M0(){let n=S.useContext(Ri);return wf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function MT(){let n=S.useContext(Zr);return wf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Df=S.createContext(void 0);Df.displayName="FrameworkContext";function R0(){let n=S.useContext(Df);return wf(n,"You must render this element inside a <HydratedRouter> element"),n}function RT(n,a){let i=S.useContext(Df),[o,r]=S.useState(!1),[u,d]=S.useState(!1),{onFocus:p,onBlur:m,onMouseEnter:g,onMouseLeave:v,onTouchStart:y}=a,_=S.useRef(null);S.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let j=C=>{C.forEach(M=>{d(M.isIntersecting)})},A=new IntersectionObserver(j,{threshold:.5});return _.current&&A.observe(_.current),()=>{A.disconnect()}}},[n]),S.useEffect(()=>{if(o){let j=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(j)}}},[o]);let T=()=>{r(!0)},E=()=>{r(!1),d(!1)};return i?n!=="intent"?[u,_,{}]:[u,_,{onFocus:Dl(p,T),onBlur:Dl(m,E),onMouseEnter:Dl(g,T),onMouseLeave:Dl(v,E),onTouchStart:Dl(y,T)}]:[!1,_,{}]}function Dl(n,a){return i=>{n&&n(i),i.defaultPrevented||a(i)}}function OT({page:n,...a}){let{router:i}=M0(),o=S.useMemo(()=>y0(i.routes,n,i.basename),[i.routes,n,i.basename]);return o?S.createElement(LT,{page:n,matches:o,...a}):null}function BT(n){let{manifest:a,routeModules:i}=R0(),[o,r]=S.useState([]);return S.useEffect(()=>{let u=!1;return jT(n,a,i).then(d=>{u||r(d)}),()=>{u=!0}},[n,a,i]),o}function LT({page:n,matches:a,...i}){let o=Kt(),{future:r,manifest:u,routeModules:d}=R0(),{basename:p}=M0(),{loaderData:m,matches:g}=MT(),v=S.useMemo(()=>Ay(n,a,g,u,o,"data"),[n,a,g,u,o]),y=S.useMemo(()=>Ay(n,a,g,u,o,"assets"),[n,a,g,u,o]),_=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let j=new Set,A=!1;if(a.forEach(M=>{var Y;let R=u.routes[M.route.id];!R||!R.hasLoader||(!v.some(w=>w.route.id===M.route.id)&&M.route.id in m&&((Y=d[M.route.id])!=null&&Y.shouldRevalidate)||R.hasClientLoader?A=!0:j.add(M.route.id))}),j.size===0)return[];let C=ET(n,p,r.unstable_trailingSlashAwareDataRequests,"data");return A&&j.size>0&&C.searchParams.set("_routes",a.filter(M=>j.has(M.route.id)).map(M=>M.route.id).join(",")),[C.pathname+C.search]},[p,r.unstable_trailingSlashAwareDataRequests,m,o,u,v,a,n,d]),T=S.useMemo(()=>NT(y,u),[y,u]),E=BT(y);return S.createElement(S.Fragment,null,_.map(j=>S.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...i})),T.map(j=>S.createElement("link",{key:j,rel:"modulepreload",href:j,...i})),E.map(({key:j,link:A})=>S.createElement("link",{key:j,nonce:i.nonce,...A,crossOrigin:A.crossOrigin??i.crossOrigin})))}function UT(...n){return a=>{n.forEach(i=>{typeof i=="function"?i(a):i!=null&&(i.current=a)})}}var IT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{IT&&(window.__reactRouterVersion="7.13.1")}catch{}function zT({basename:n,children:a,unstable_useTransitions:i,window:o}){let r=S.useRef();r.current==null&&(r.current=yx({window:o,v5Compat:!0}));let u=r.current,[d,p]=S.useState({action:u.action,location:u.location}),m=S.useCallback(g=>{i===!1?p(g):S.startTransition(()=>p(g))},[i]);return S.useLayoutEffect(()=>u.listen(m),[u,m]),S.createElement(hT,{basename:n,children:a,location:d.location,navigationType:d.action,navigator:u,unstable_useTransitions:i})}var O0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,kf=S.forwardRef(function({onClick:a,discover:i="render",prefetch:o="none",relative:r,reloadDocument:u,replace:d,unstable_mask:p,state:m,target:g,to:v,preventScrollReset:y,viewTransition:_,unstable_defaultShouldRevalidate:T,...E},j){let{basename:A,navigator:C,unstable_useTransitions:M}=S.useContext(pn),R=typeof v=="string"&&O0.test(v),Y=x0(v,A);v=Y.to;let w=Xx(v,{relative:r}),F=Kt(),q=null;if(p){let Q=Kr(p,[],F.unstable_mask?F.unstable_mask.pathname:"/",!0);A!=="/"&&(Q.pathname=Q.pathname==="/"?A:$n([A,Q.pathname])),q=C.createHref(Q)}let[V,W,ae]=RT(o,E),se=GT(v,{replace:d,unstable_mask:p,state:m,target:g,preventScrollReset:y,relative:r,viewTransition:_,unstable_defaultShouldRevalidate:T,unstable_useTransitions:M});function le(Q){a&&a(Q),Q.defaultPrevented||se(Q)}let z=!(Y.isExternal||u),K=S.createElement("a",{...E,...ae,href:(z?q:void 0)||Y.absoluteURL||w,onClick:z?le:a,ref:UT(j,W),target:g,"data-discover":!R&&i==="render"?"true":void 0});return V&&!R?S.createElement(S.Fragment,null,K,S.createElement(OT,{page:w})):K});kf.displayName="Link";var VT=S.forwardRef(function({"aria-current":a="page",caseSensitive:i=!1,className:o="",end:r=!1,style:u,to:d,viewTransition:p,children:m,...g},v){let y=Wl(d,{relative:g.relative}),_=Kt(),T=S.useContext(Zr),{navigator:E,basename:j}=S.useContext(pn),A=T!=null&&KT(y)&&p===!0,C=E.encodeLocation?E.encodeLocation(y).pathname:y.pathname,M=_.pathname,R=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;i||(M=M.toLowerCase(),R=R?R.toLowerCase():null,C=C.toLowerCase()),R&&j&&(R=_a(R,j)||R);const Y=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let w=M===C||!r&&M.startsWith(C)&&M.charAt(Y)==="/",F=R!=null&&(R===C||!r&&R.startsWith(C)&&R.charAt(C.length)==="/"),q={isActive:w,isPending:F,isTransitioning:A},V=w?a:void 0,W;typeof o=="function"?W=o(q):W=[o,w?"active":null,F?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let ae=typeof u=="function"?u(q):u;return S.createElement(kf,{...g,"aria-current":V,className:W,ref:v,style:ae,to:d,viewTransition:p},typeof m=="function"?m(q):m)});VT.displayName="NavLink";var PT=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:i,reloadDocument:o,replace:r,state:u,method:d=Dr,action:p,onSubmit:m,relative:g,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:_,...T},E)=>{let{unstable_useTransitions:j}=S.useContext(pn),A=$T(),C=YT(p,{relative:g}),M=d.toLowerCase()==="get"?"get":"post",R=typeof p=="string"&&O0.test(p),Y=w=>{if(m&&m(w),w.defaultPrevented)return;w.preventDefault();let F=w.nativeEvent.submitter,q=(F==null?void 0:F.getAttribute("formmethod"))||d,V=()=>A(F||w.currentTarget,{fetcherKey:a,method:q,navigate:i,replace:r,state:u,relative:g,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:_});j&&i!==!1?S.startTransition(()=>V()):V()};return S.createElement("form",{ref:E,method:M,action:C,onSubmit:o?m:Y,...T,"data-discover":!R&&n==="render"?"true":void 0})});PT.displayName="Form";function HT(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function B0(n){let a=S.useContext(Ri);return it(a,HT(n)),a}function GT(n,{target:a,replace:i,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:p,unstable_defaultShouldRevalidate:m,unstable_useTransitions:g}={}){let v=Xr(),y=Kt(),_=Wl(n,{relative:d});return S.useCallback(T=>{if(bT(T,a)){T.preventDefault();let E=i!==void 0?i:Gl(y)===Gl(_),j=()=>v(n,{replace:E,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:p,unstable_defaultShouldRevalidate:m});g?S.startTransition(()=>j()):j()}},[y,v,_,i,o,r,a,n,u,d,p,m,g])}function Mf(n){jn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let a=S.useRef(Kd(n)),i=S.useRef(!1),o=Kt(),r=S.useMemo(()=>ST(o.search,i.current?null:a.current),[o.search]),u=Xr(),d=S.useCallback((p,m)=>{const g=Kd(typeof p=="function"?p(new URLSearchParams(r)):p);i.current=!0,u("?"+g,m)},[u,r]);return[r,d]}var FT=0,qT=()=>`__${String(++FT)}__`;function $T(){let{router:n}=B0("useSubmit"),{basename:a}=S.useContext(pn),i=cT(),o=n.fetch,r=n.navigate;return S.useCallback(async(u,d={})=>{let{action:p,method:m,encType:g,formData:v,body:y}=TT(u,a);if(d.navigate===!1){let _=d.fetcherKey||qT();await o(_,i,d.action||p,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:v,body:y,formMethod:d.method||m,formEncType:d.encType||g,flushSync:d.flushSync})}else await r(d.action||p,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:v,body:y,formMethod:d.method||m,formEncType:d.encType||g,replace:d.replace,state:d.state,fromRouteId:i,flushSync:d.flushSync,viewTransition:d.viewTransition})},[o,r,a,i])}function YT(n,{relative:a}={}){let{basename:i}=S.useContext(pn),o=S.useContext(wn);it(o,"useFormAction must be used inside a RouteContext");let[r]=o.matches.slice(-1),u={...Wl(n||".",{relative:a})},d=Kt();if(n==null){u.search=d.search;let p=new URLSearchParams(u.search),m=p.getAll("index");if(m.some(v=>v==="")){p.delete("index"),m.filter(y=>y).forEach(y=>p.append("index",y));let v=p.toString();u.search=v?`?${v}`:""}}return(!n||n===".")&&r.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(u.pathname=u.pathname==="/"?i:$n([i,u.pathname])),Gl(u)}function KT(n,{relative:a}={}){let i=S.useContext(E0);it(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=B0("useViewTransitionState"),r=Wl(n,{relative:a});if(!i.isTransitioning)return!1;let u=_a(i.currentLocation.pathname,o)||i.currentLocation.pathname,d=_a(i.nextLocation.pathname,o)||i.nextLocation.pathname;return Fl(r.pathname,d)!=null||Fl(r.pathname,u)!=null}function Un(){const n=Xr();return S.useCallback((a,i)=>{typeof a=="number"?n(a):n(a,i)},[n])}function L0(n){return`/sessions/${encodeURIComponent(n)}`}function ql(n){return`/projects/${encodeURIComponent(n)}`}function es(n,a){const i=`/tasks/${encodeURIComponent(n)}`;return a?`${i}/${a}`:i}function ZT(n){return`/tasks/${encodeURIComponent(n)}/edit`}function Ms(n,a){const i=new URLSearchParams({project:n});return a&&i.set("parent",a),`/tasks/new?${i.toString()}`}function U0(n){return`/sessions/new?${new URLSearchParams({env:n}).toString()}`}const jy="/environments/new",Ni="/settings",XT="/pair";function Nn(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function $l(n,a){return console.warn(`[ws] Malformed "${n}" message: ${a}`),!1}function QT(n){return Nn(n)&&typeof n.id=="string"&&typeof n.displayName=="string"&&typeof n.adapterType=="string"&&typeof n.status=="string"&&typeof n.bootstrapped=="boolean"}function Ny(n){return Nn(n)&&typeof n.id=="string"&&typeof n.environmentId=="string"&&typeof n.runtime=="string"&&typeof n.status=="string"&&typeof n.prompt=="string"&&typeof n.startedAt=="string"&&(n.endedAt===void 0||typeof n.endedAt=="string")&&(n.error===void 0||typeof n.error=="string")}function wy(n){return Nn(n)&&typeof n.sessionId=="string"&&typeof n.eventType=="string"&&typeof n.timestamp=="string"&&typeof n.content=="string"&&(n.raw===void 0||typeof n.raw=="string")}function JT(n){return Nn(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.repoUrl=="string"&&typeof n.defaultEnvironmentId=="string"&&typeof n.status=="string"&&typeof n.worktreeBasePath=="string"&&typeof n.useWorktrees=="boolean"&&(n.defaultPersonaId===void 0||typeof n.defaultPersonaId=="string")&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function WT(n){return Nn(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.title=="string"&&typeof n.status=="string"&&typeof n.branch=="string"&&typeof n.sortOrder=="number"&&typeof n.depth=="number"&&(n.defaultPersonaId===void 0||typeof n.defaultPersonaId=="string")&&Array.isArray(n.dependsOn)&&Array.isArray(n.childTaskIds)}function eE(n){return Nn(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.taskId=="string"&&typeof n.sessionId=="string"&&typeof n.category=="string"&&typeof n.title=="string"&&typeof n.content=="string"&&Array.isArray(n.tags)&&typeof n.createdAt=="string"}function tE(n){return Nn(n)&&typeof n.name=="string"&&typeof n.tokenType=="string"&&typeof n.envVar=="string"&&typeof n.filePath=="string"&&typeof n.expiresAt=="string"}const nE=new Set(["off","subscription","api_key"]),Cd=new Set(["off","on"]);function Dy(n){return Nn(n)&&nE.has(n.claude)&&Cd.has(n.github)&&Cd.has(n.copilot)&&Cd.has(n.codex)}function aE(n){return Nn(n)&&typeof n.name=="string"&&typeof n.repository=="string"&&typeof n.state=="string"&&typeof n.gitStatus=="string"}function sE(n){return Nn(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.systemPrompt=="string"&&typeof n.toolConfig=="string"&&typeof n.runtime=="string"&&typeof n.model=="string"&&typeof n.maxTurns=="number"&&typeof n.mcpServers=="string"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function Yn(n,a,i,o){return Array.isArray(n)?n.filter((r,u)=>a(r)?!0:($l(i,`item at index ${u} in "${o}" has unexpected shape`),!1)):($l(i,`expected "${o}" to be an array, got ${typeof n}`),[])}function iE(n){let a;try{a=JSON.parse(n)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!Nn(a)||typeof a.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",a);return}const i={type:a.type,payload:Nn(a.payload)?a.payload:void 0};return typeof a.id=="string"&&(i.id=a.id),typeof a.timestamp=="string"&&(i.timestamp=a.timestamp),i}function lE(n){switch(n){case"waiting_input":return"idle";case"killed":return"interrupted";default:return n}}const oE=3e3,Si=5e3,rE=4001;function cE(n,a){const i=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`:"ws://localhost:3000",o=S.useRef(void 0),[r,u]=S.useState(!1),d=S.useRef(a.onMessage);d.current=a.onMessage;const p=S.useRef(a.onConnect);p.current=a.onConnect;const m=S.useRef(a.onDisconnect);m.current=a.onDisconnect;const g=S.useCallback(v=>{var y;((y=o.current)==null?void 0:y.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(v))},[]);return S.useEffect(()=>{let v,y;function _(){v=new WebSocket(i),o.current=v,v.onopen=()=>{u(!0),p.current(g)},v.onmessage=T=>{if(typeof T.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const E=iE(T.data);E&&d.current(E)},v.onclose=T=>{var E;if(u(!1),o.current=void 0,(E=m.current)==null||E.call(m),clearTimeout(y),T.code===rE){window.location.href=XT;return}y=setTimeout(_,oE)},v.onerror=()=>{v.close()}}return _(),()=>{clearTimeout(y),v==null||v.close()}},[i,g]),{connected:r,send:g}}const uE=5e3;function dE(n){const[a,i]=S.useState([]),[o,r]=S.useState({}),u=S.useCallback(y=>{switch(y.type){case"environment.added":return!0;case"environment.removed":{const _=y.payload.environmentId;return _&&(i(T=>T.filter(E=>E.id!==_)),r(T=>{const E={...T};return delete E[_],E})),n({type:"list_sessions"}),!0}case"environment.changed":return n({type:"list_environments"}),!0;case"environment.provision_progress":{const _=y.payload;if(typeof _.environmentId!="string"||typeof _.stage!="string"||typeof _.message!="string"||typeof _.progress!="number")return $l("environment.provision_progress","invalid payload"),!0;if(r(T=>({...T,[_.environmentId]:{stage:_.stage,message:_.message,progress:_.progress}})),_.stage==="ready"){const T=_.environmentId;setTimeout(()=>{r(E=>{const j={...E};return delete j[T],j})},uE)}return!0}default:return!1}},[n]),d=S.useCallback(y=>{var _;switch(y.type){case"environments":return i(Yn((_=y.payload)==null?void 0:_.environments,QT,"environments","environments")),!0;default:return!1}},[]),p=S.useCallback((y,_,T)=>{n({type:"add_environment",payload:{displayName:y,adapterType:_,adapterConfig:T||{}}})},[n]),m=S.useCallback(y=>{n({type:"provision_environment",payload:{environmentId:y}})},[n]),g=S.useCallback(y=>{n({type:"stop_environment",payload:{environmentId:y}})},[n]),v=S.useCallback(y=>{n({type:"remove_environment",payload:{environmentId:y}})},[n]);return{environments:a,provisionStatus:o,addEnvironment:p,provisionEnvironment:m,stopEnvironment:g,removeEnvironment:v,handleMessage:d,handleEvent:u}}const Ad=new Set(["pending","running","idle"]),fE=new Set(["completed","failed","interrupted"]),ky=["pending","running","idle"];function hE(n){const[a,i]=S.useState([]),[o,r]=S.useState([]),[u,d]=S.useState(0),[p,m]=S.useState(void 0),[g,v]=S.useState({}),y=S.useCallback(M=>{var R,Y,w,F,q;switch(M.type){case"sessions":return i(V=>{var se;const W=Yn((se=M.payload)==null?void 0:se.sessions,Ny,"sessions","sessions"),ae=new Map(V.map(le=>[le.id,le.status]));return W.map(le=>{const z=ae.get(le.id);return!z||z===le.status?le:fE.has(z)&&Ad.has(le.status)?{...le,status:z}:Ad.has(z)&&Ad.has(le.status)&&ky.indexOf(z)>ky.indexOf(le.status)?{...le,status:z}:le})}),!0;case"session_event":{if(!wy(M.payload))return $l("session_event","payload is not a valid SessionEvent"),!0;const V=M.payload;let W=0;if(r(ae=>{const se=[...ae,V];return se.length>Si?(W=se.length-Si,se.slice(-Si)):se}),W>0&&d(ae=>ae+W),V.eventType==="status"){const ae=lE(V.content);i(se=>se.some(z=>z.id===V.sessionId)?se.map(z=>z.id===V.sessionId?{...z,status:ae}:z):[...se,{id:V.sessionId,environmentId:"",runtime:"",status:ae,prompt:"",startedAt:V.timestamp}])}return!0}case"session_events":{const V=Yn((R=M.payload)==null?void 0:R.events,wy,"session_events","events"),W=(Y=M.payload)==null?void 0:Y.sessionId;if(typeof W!="string")return $l("session_events","missing or non-string sessionId"),!0;if(V.length>0){let ae=0;r(se=>{const le=new Set;for(const Q of se)Q.sessionId===W&&le.add(`${Q.timestamp}|${Q.eventType}`);const z=V.filter(Q=>!le.has(`${Q.timestamp}|${Q.eventType}`)),K=[...se,...z].sort((Q,O)=>Q.sessionId!==O.sessionId?0:Q.timestamp.localeCompare(O.timestamp));return K.length>Si?(ae=K.length-Si,K.slice(-Si)):K}),ae>0&&d(se=>se+ae)}return!0}case"spawned":{const V=(w=M.payload)==null?void 0:w.sessionId;return typeof V=="string"&&V&&m(V),n({type:"list_sessions"}),!0}case"task_sessions":{const V=(F=M.payload)==null?void 0:F.taskId;if(typeof V!="string"||!V)return!0;const W=Yn((q=M.payload)==null?void 0:q.sessions,Ny,"task_sessions","sessions");return v(ae=>({...ae,[V]:W})),!0}default:return!1}},[n]),_=S.useCallback((M,R,Y,w)=>{n({type:"spawn",payload:{environmentId:M,prompt:R,personaId:Y||"",worktreeBasePath:w||""}})},[n]),T=S.useCallback((M,R)=>{n({type:"send_input",payload:{sessionId:M,text:R}})},[n]),E=S.useCallback(M=>{n({type:"kill",payload:{sessionId:M}})},[n]),j=S.useCallback(M=>{n({type:"get_session_events",payload:{sessionId:M}})},[n]),A=S.useCallback(()=>{r([]),d(0)},[]),C=S.useCallback(M=>{n({type:"get_task_sessions",payload:{taskId:M}})},[n]);return{sessions:a,events:o,eventsDropped:u,lastSpawnedId:p,taskSessions:g,spawn:_,sendInput:T,kill:E,loadSessionEvents:j,clearEvents:A,loadTaskSessions:C,handleMessage:y}}function pE(n){const[a,i]=S.useState([]),[o,r]=S.useState(!1),u=S.useCallback(y=>{switch(y.type){case"project.created":return r(!1),n({type:"list_projects"}),!0;case"project.archived":case"project.updated":return n({type:"list_projects"}),!0;default:return!1}},[n]),d=S.useCallback(y=>{var _;switch(y.type){case"projects":return i(Yn((_=y.payload)==null?void 0:_.projects,JT,"projects","projects")),!0;default:return!1}},[]),p=S.useCallback(()=>{r(!1)},[]),m=S.useCallback((y,_,T,E,j)=>{r(!0),n({type:"create_project",payload:{name:y,description:_||"",repoUrl:T||"",defaultEnvironmentId:E||"",defaultPersonaId:j||""}})},[n]),g=S.useCallback(y=>{n({type:"archive_project",payload:{projectId:y}})},[n]),v=S.useCallback((y,_)=>{n({type:"update_project",payload:{projectId:y,..._}})},[n]);return{projects:a,projectCreating:o,createProject:m,archiveProject:g,updateProject:v,handleMessage:d,handleEvent:u,onDisconnect:p}}const mE=15e3;function gE(n){const[a,i]=S.useState([]),[o,r]=S.useState(void 0),u=S.useRef(new Map),d=S.useCallback(A=>{const C=A.payload;switch(A.type){case"task.created":{const M=typeof C.requestId=="string"?C.requestId:"";if(M){const Y=u.current.get(M);Y&&(clearTimeout(Y.timer),u.current.delete(M),Y.onSuccess())}const R=typeof C.projectId=="string"?C.projectId:"";return R&&n({type:"list_tasks",payload:{projectId:R}}),!0}case"task.started":{const M=typeof C.taskId=="string"?C.taskId:"",R=typeof C.sessionId=="string"?C.sessionId:"",Y=typeof C.projectId=="string"?C.projectId:"";return r(w=>M&&w===M?void 0:w),R&&(n({type:"list_sessions"}),M&&i(w=>w.map(F=>F.id===M?{...F,latestSessionId:R}:F))),Y?n({type:"list_tasks",payload:{projectId:Y}}):M&&i(w=>{const F=w.find(q=>q.id===M);return F&&n({type:"list_tasks",payload:{projectId:F.projectId}}),w}),!0}case"task.completed":case"task.deleted":case"task.updated":{const M=typeof C.projectId=="string"?C.projectId:"",R=typeof C.taskId=="string"?C.taskId:"";return M?n({type:"list_tasks",payload:{projectId:M}}):R&&i(Y=>{const w=Y.find(F=>F.id===R);return w&&n({type:"list_tasks",payload:{projectId:w.projectId}}),Y}),!0}default:return!1}},[n]),p=S.useCallback(A=>{var C,M,R,Y;switch(A.type){case"tasks":{const w=Yn((C=A.payload)==null?void 0:C.tasks,WT,"tasks","tasks"),F=(typeof((M=A.payload)==null?void 0:M.projectId)=="string"?A.payload.projectId:"")||(w.length>0?w[0].projectId:"");return F?(i(q=>[...q.filter(V=>V.projectId!==F),...w]),!0):(i(w),!0)}case"create_task_error":{const w=typeof((R=A.payload)==null?void 0:R.requestId)=="string"?A.payload.requestId:"",F=typeof((Y=A.payload)==null?void 0:Y.message)=="string"?A.payload.message:"Failed to create task";if(w){const q=u.current.get(w);q?(clearTimeout(q.timer),u.current.delete(w),q.onError(F)):console.error("[useTasks] create_task_error with unknown requestId:",F)}else console.error("[useTasks] create_task_error:",F);return!0}default:return!1}},[]),m=S.useCallback(()=>{r(void 0);for(const[,A]of u.current)clearTimeout(A.timer),A.onError("Disconnected");u.current.clear()},[]),g=S.useCallback(A=>{n({type:"list_tasks",payload:{projectId:A}})},[n]),v=S.useCallback((A,C,M,R,Y,w,F,q)=>{const V={projectId:A,title:C,description:M||"",dependsOn:R||[],parentTaskId:Y||"",defaultPersonaId:w||""};if(F||q){const W=crypto.randomUUID();V.requestId=W;const ae=q??(()=>{}),se=setTimeout(()=>{u.current.delete(W)&&ae("Request timed out")},mE);u.current.set(W,{onSuccess:F??(()=>{}),onError:ae,timer:se})}n({type:"create_task",payload:V})},[n]),y=S.useCallback((A,C,M,R)=>{r(A),n({type:"start_task",payload:{taskId:A,personaId:C||"",environmentId:M||"",notes:R||""}})},[n]),_=S.useCallback(A=>{n({type:"complete_task",payload:{taskId:A}})},[n]),T=S.useCallback(A=>{n({type:"resume_task",payload:{taskId:A}})},[n]),E=S.useCallback((A,C,M,R,Y)=>{const w={taskId:A,title:C,description:M,dependsOn:R};Y!==void 0&&(w.defaultPersonaId=Y),n({type:"update_task",payload:w})},[n]),j=S.useCallback(A=>{n({type:"delete_task",payload:{taskId:A}})},[n]);return{tasks:a,taskStartingId:o,loadTasks:g,createTask:v,startTask:y,completeTask:_,resumeTask:T,updateTask:E,deleteTask:j,handleMessage:p,handleEvent:d,onDisconnect:m}}function yE(n){const[a,i]=S.useState([]),o=S.useCallback(p=>{if(p.type==="finding.posted"){const m=typeof p.payload.projectId=="string"?p.payload.projectId:"";return m&&n({type:"list_findings",payload:{projectId:m}}),!0}return!1},[n]),r=S.useCallback(p=>{var m;switch(p.type){case"findings":return i(Yn((m=p.payload)==null?void 0:m.findings,eE,"findings","findings")),!0;default:return!1}},[]),u=S.useCallback(p=>{n({type:"list_findings",payload:{projectId:p}})},[n]),d=S.useCallback((p,m,g,v,y)=>{n({type:"post_finding",payload:{projectId:p,title:m,content:g,category:v||"general",tags:y||[]}})},[n]);return{findings:a,loadFindings:u,postFinding:d,handleMessage:r,handleEvent:o}}function vE(n){const[a,i]=S.useState([]),o=S.useCallback(m=>m.type==="token.changed"?(n({type:"list_tokens"}),!0):!1,[n]),r=S.useCallback(m=>{var g;switch(m.type){case"tokens":return i(Yn((g=m.payload)==null?void 0:g.tokens,tE,"tokens","tokens")),!0;default:return!1}},[]),u=S.useCallback(()=>{n({type:"list_tokens"})},[n]),d=S.useCallback((m,g,v,y,_)=>{n({type:"set_token",payload:{name:m,value:g,tokenType:v,envVar:y,filePath:_}})},[n]),p=S.useCallback(m=>{n({type:"delete_token",payload:{name:m}})},[n]);return{tokens:a,loadTokens:u,setToken:d,deleteToken:p,handleMessage:r,handleEvent:o}}function bE(n){const[a,i]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),o=S.useCallback(d=>d.type==="credential.providers_changed"?(Dy(d.payload)&&i(d.payload),!0):!1,[]),r=S.useCallback(d=>{switch(d.type){case"credential_providers":return Dy(d.payload)&&i(d.payload),!0;default:return!1}},[]),u=S.useCallback(d=>{n({type:"set_credential_providers",payload:d})},[n]);return{credentialProviders:a,updateCredentialProviders:u,handleMessage:r,handleEvent:o}}function SE(n,a){const[i,o]=S.useState([]),[r,u]=S.useState(""),[d,p]=S.useState(""),[m,g]=S.useState(!1),v=S.useCallback(T=>{var E,j,A;switch(T.type){case"codespaces_list":{const C=Yn((E=T.payload)==null?void 0:E.codespaces,aE,"codespaces_list","codespaces"),M=typeof((j=T.payload)==null?void 0:j.error)=="string"?T.payload.error:"";return o(C),p(M),!0}case"codespace_created":return g(!1),n({type:"list_codespaces"}),!0;case"codespace_create_error":{g(!1);const C=typeof((A=T.payload)==null?void 0:A.message)=="string"?T.payload.message:"Failed to create codespace";return u(C),!0}default:return!1}},[n]),y=S.useCallback(()=>{n({type:"list_codespaces"})},[n]),_=S.useCallback((T,E)=>{if(!a){u("Not connected to server. Please try again once the connection is restored.");return}g(!0),u("");const j={repo:T};E&&(j.machine=E),n({type:"create_codespace",payload:j})},[n,a]);return{codespaces:i,codespaceError:r,codespaceListError:d,codespaceCreating:m,listCodespaces:y,createCodespace:_,handleMessage:v}}function _E(n){const[a,i]=S.useState([]),o=S.useCallback(m=>{switch(m.type){case"persona.created":case"persona.updated":case"persona.deleted":return n({type:"list_personas"}),!0;default:return!1}},[n]),r=S.useCallback(m=>{var g;switch(m.type){case"personas":{const v=Yn((g=m.payload)==null?void 0:g.personas,sE,"personas","personas");return i(v),!0}default:return!1}},[]),u=S.useCallback((m,g,v,y,_,T)=>{n({type:"create_persona",payload:{name:m,description:g,systemPrompt:v,runtime:y||"",model:_||"",maxTurns:T||0}})},[n]),d=S.useCallback((m,g,v,y,_,T,E)=>{n({type:"update_persona",payload:{personaId:m,name:g||"",description:v||"",systemPrompt:y||"",runtime:_||"",model:T||"",maxTurns:E||0}})},[n]),p=S.useCallback(m=>{n({type:"delete_persona",payload:{personaId:m}})},[n]);return{personas:a,createPersona:u,updatePersona:d,deletePersona:p,handleMessage:r,handleEvent:o}}function xE(n){const[a,i]=S.useState(""),{connected:o,send:r}=cE(n,{onMessage:C,onConnect:M,onDisconnect:R}),u=dE(r),d=hE(r),p=pE(r),m=gE(r),g=yE(r),v=vE(r),y=bE(r),_=SE(r,o),T=_E(r),E="default_persona_id",j=S.useCallback(w=>{i(w),r({type:"set_setting",payload:{key:E,value:w}})},[r]);function A(w){const F=w.payload.key,q=w.payload.value;if(w.type==="setting.changed"){F===E&&i(q??"");return}u.handleEvent(w)||p.handleEvent(w)||m.handleEvent(w)||g.handleEvent(w)||v.handleEvent(w)||y.handleEvent(w)||T.handleEvent(w)}function C(w){var F,q,V;if(typeof w.type=="string"&&w.type.includes(".")){const W=w,ae={id:W.id??"",type:w.type,timestamp:W.timestamp??"",payload:w.payload??{}};A(ae);return}if(w.type==="setting"){const W=(F=w.payload)==null?void 0:F.key,ae=(q=w.payload)==null?void 0:q.value;W===E&&i(ae??"");return}if(!u.handleMessage(w)&&!d.handleMessage(w)&&!p.handleMessage(w)&&!m.handleMessage(w)&&!g.handleMessage(w)&&!v.handleMessage(w)&&!y.handleMessage(w)&&!_.handleMessage(w)&&!T.handleMessage(w)&&w.type==="error"){console.error("[ws]",(V=w.payload)==null?void 0:V.message);return}}function M(w){w({type:"list_environments"}),w({type:"list_sessions"}),w({type:"list_projects"}),w({type:"list_tokens"}),w({type:"get_credential_providers"}),w({type:"list_personas"}),w({type:"get_setting",payload:{key:E}}),w({type:"subscribe_all"})}function R(){p.onDisconnect(),m.onDisconnect()}const Y=S.useCallback(()=>{r({type:"list_environments"}),r({type:"list_sessions"}),r({type:"list_projects"}),r({type:"list_tokens"})},[r]);return{connected:o,environments:u.environments,sessions:d.sessions,events:d.events,eventsDropped:d.eventsDropped,lastSpawnedId:d.lastSpawnedId,projects:p.projects,tasks:m.tasks,findings:g.findings,tokens:v.tokens,spawn:d.spawn,sendInput:d.sendInput,kill:d.kill,refresh:Y,loadSessionEvents:d.loadSessionEvents,clearEvents:d.clearEvents,createProject:p.createProject,archiveProject:p.archiveProject,updateProject:p.updateProject,loadTasks:m.loadTasks,createTask:m.createTask,startTask:m.startTask,completeTask:m.completeTask,resumeTask:m.resumeTask,updateTask:m.updateTask,deleteTask:m.deleteTask,loadFindings:g.loadFindings,postFinding:g.postFinding,addEnvironment:u.addEnvironment,loadTokens:v.loadTokens,setToken:v.setToken,deleteToken:v.deleteToken,credentialProviders:y.credentialProviders,updateCredentialProviders:y.updateCredentialProviders,provisionStatus:u.provisionStatus,provisionEnvironment:u.provisionEnvironment,stopEnvironment:u.stopEnvironment,removeEnvironment:u.removeEnvironment,codespaces:_.codespaces,codespaceError:_.codespaceError,codespaceListError:_.codespaceListError,codespaceCreating:_.codespaceCreating,listCodespaces:_.listCodespaces,createCodespace:_.createCodespace,projectCreating:p.projectCreating,taskStartingId:m.taskStartingId,personas:T.personas,createPersona:T.createPersona,updatePersona:T.updatePersona,deletePersona:T.deletePersona,taskSessions:d.taskSessions,loadTaskSessions:d.loadTaskSessions,appDefaultPersonaId:a,setAppDefaultPersonaId:j}}const Rf=S.createContext(void 0);function TE({children:n}){const a=xE();return h.jsx(Rf.Provider,{value:a,children:n})}function Ht(){const n=S.useContext(Rf);if(!n)throw new Error("useGrackle must be used within GrackleProvider");return n}const EE=[{id:"env-local-01",displayName:"Local Dev",adapterType:"local",status:"connected",bootstrapped:!0},{id:"env-docker-01",displayName:"Docker Sandbox",adapterType:"docker",status:"connected",bootstrapped:!0},{id:"env-cs-01",displayName:"GitHub Codespace",adapterType:"codespace",status:"connected",bootstrapped:!0},{id:"env-remote-01",displayName:"Staging (SSH)",adapterType:"ssh",status:"disconnected",bootstrapped:!1}],CE=[{id:"sess-001-prev",environmentId:"env-local-01",runtime:"claude-code",status:"failed",prompt:"Implement auth middleware",startedAt:"2026-02-26T14:00:00Z",endedAt:"2026-02-26T15:12:00Z",error:"Context window exceeded before completing implementation"},{id:"sess-001",environmentId:"env-local-01",runtime:"node",status:"running",prompt:"Refactor the authentication middleware to use JWT tokens",startedAt:"2026-02-27T08:15:00Z"},{id:"sess-002",environmentId:"env-docker-01",runtime:"python",status:"completed",prompt:"Write unit tests for the user registration endpoint",startedAt:"2026-02-27T07:30:00Z"},{id:"sess-003",environmentId:"env-local-01",runtime:"node",status:"failed",prompt:"Migrate database schema to add audit_log table",startedAt:"2026-02-26T22:45:00Z"},{id:"sess-004",environmentId:"env-docker-01",runtime:"python",status:"running",prompt:"Implement rate limiting for the public API",startedAt:"2026-02-27T09:00:00Z"}],AE=[{sessionId:"sess-001-prev",eventType:"status",timestamp:"2026-02-26T14:00:01Z",content:"running"},{sessionId:"sess-001-prev",eventType:"output",timestamp:"2026-02-26T14:00:05Z",content:"Reading src/middleware/auth.ts to understand the current authentication flow..."},{sessionId:"sess-001-prev",eventType:"error",timestamp:"2026-02-26T15:12:00Z",content:"Context window exceeded before completing implementation"},{sessionId:"sess-001",eventType:"status",timestamp:"2026-02-27T08:15:01Z",content:"running"},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:02Z",content:"Analyzing current authentication middleware in src/middleware/auth.ts..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:04Z",content:`Found 3 files using session-based auth:
37
- - src/middleware/auth.ts
38
- - src/routes/login.ts
39
- - src/routes/protected.ts`},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:07Z",content:"Installing jsonwebtoken and @types/jsonwebtoken..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:12Z",content:`Rewriting auth middleware:
40
- \`\`\`typescript
41
- import jwt from "jsonwebtoken";
42
- import type { Request, Response, NextFunction } from "express";
43
-
44
- const JWT_SECRET = process.env.JWT_SECRET || "change-me";
45
-
46
- export function verifyToken(req: Request, res: Response, next: NextFunction): void {
47
- const header = req.headers.authorization;
48
- if (!header?.startsWith("Bearer ")) {
49
- res.status(401).json({ error: "Missing token" });
50
- return;
51
- }
52
- try {
53
- const decoded = jwt.verify(header.slice(7), JWT_SECRET);
54
- req.user = decoded;
55
- next();
56
- } catch {
57
- res.status(403).json({ error: "Invalid token" });
58
- }
59
- }
60
- \`\`\``},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:18Z",content:"Updated login route to issue JWT tokens with 24h expiry."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:22Z",content:"Running test suite... 14 tests passed, 2 updated, 0 failed."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:30:01Z",content:"running"},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:30:05Z",content:"Generating pytest tests for POST /api/register endpoint..."},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:32:00Z",content:"Created 8 test cases covering: valid registration, duplicate email, weak password, missing fields, SQL injection, XSS payload, rate limit, and CORS headers."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:33:00Z",content:"completed"}],jE=[{id:"proj-alpha",name:"Project Alpha",description:"Core platform API and authentication services",repoUrl:"https://github.com/acme/alpha",defaultEnvironmentId:"env-local-01",status:"active",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:"",createdAt:"2026-01-15T10:00:00Z",updatedAt:"2026-01-15T10:00:00Z"},{id:"proj-beta",name:"Data Pipeline",description:"ETL pipelines for analytics and reporting",repoUrl:"https://github.com/acme/data-pipeline",defaultEnvironmentId:"env-docker-01",status:"active",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:"",createdAt:"2026-02-01T14:30:00Z",updatedAt:"2026-02-01T14:30:00Z"},{id:"proj-gamma",name:"Mobile App",description:"React Native cross-platform mobile application",repoUrl:"",defaultEnvironmentId:"env-local-01",status:"archived",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:"",createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],NE=[{id:"task-001",projectId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"working",branch:"feat/jwt-auth",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0,defaultPersonaId:""},{id:"task-001a",projectId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"complete",branch:"feat/jwt-auth/design-token-schema",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-001b",projectId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"working",branch:"feat/jwt-auth/implement-auth-middleware",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-001c",projectId:"proj-alpha",title:"Write auth integration tests",description:"End-to-end tests for login flow, token refresh, and protected route access",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-002",projectId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-003",projectId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"paused",branch:"feat/openapi-docs",latestSessionId:"sess-002",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-004",projectId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"complete",branch:"feat/db-pool",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-005",projectId:"proj-alpha",title:"Fix N+1 query in user list",description:"Use a JOIN instead of per-row lookups in GET /api/users",status:"not_started",branch:"fix/user-list-n1",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006",projectId:"proj-beta",title:"Add Parquet export support",description:"Allow pipeline outputs to be written as Parquet files for Spark consumption",status:"working",branch:"feat/parquet-export",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0,defaultPersonaId:""},{id:"task-006a",projectId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"complete",branch:"feat/parquet-export/define-parquet-schema-mapping",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006b",projectId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"complete",branch:"feat/parquet-export/implement-row-group-writer",latestSessionId:"",dependsOn:["task-006a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006c",projectId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"working",branch:"feat/parquet-export/add-compression-options",latestSessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006d",projectId:"proj-beta",title:"Write Parquet integration tests",description:"Round-trip tests: write Parquet, read back with pyarrow, verify data integrity",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-006c"],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-007",projectId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"working",branch:"feat/incremental",latestSessionId:"sess-004",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0,defaultPersonaId:""},{id:"task-007a",projectId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"complete",branch:"feat/incremental/design-watermark-storage",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-007b",projectId:"proj-beta",title:"Implement change detection query",description:"Generate WHERE clauses from watermarks to fetch only changed rows",status:"failed",branch:"feat/incremental/implement-change-detection-query",latestSessionId:"",dependsOn:["task-007a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-008",projectId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"paused",branch:"feat/monitoring",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""}],My=[{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"}],wE=[{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:""}],DE=[{id:"persona-arch",name:"Software Architect",description:"Designs system architecture, defines interfaces, and decomposes large features into implementable tasks.",systemPrompt:"You are a senior software architect. Focus on clean interfaces, separation of concerns, and scalable patterns. When decomposing work, create concrete subtasks with clear acceptance criteria.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:50,mcpServers:"[]",createdAt:"2026-02-20T10:00:00Z",updatedAt:"2026-02-20T10:00:00Z"},{id:"persona-fe",name:"Frontend Engineer",description:"React specialist — builds UI components, writes CSS, implements routing, and creates Playwright tests.",systemPrompt:"You are a frontend engineer specializing in React, TypeScript, and modern CSS. Follow component composition patterns, use semantic HTML, and write accessible markup.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit","Bash"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:100,mcpServers:"[]",createdAt:"2026-02-20T10:05:00Z",updatedAt:"2026-02-20T10:05:00Z"},{id:"persona-reviewer",name:"Code Reviewer",description:"Reviews diffs for correctness, security, and style. Posts findings for issues discovered.",systemPrompt:"You are a meticulous code reviewer. Check for security vulnerabilities, performance issues, and style consistency. Post findings for anything noteworthy.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:30,mcpServers:"[]",createdAt:"2026-02-20T10:10:00Z",updatedAt:"2026-02-20T10:10:00Z"},{id:"persona-tester",name:"QA Engineer",description:"Writes comprehensive test suites — unit tests, integration tests, and E2E Playwright specs.",systemPrompt:"You are a QA engineer focused on test coverage. Write tests that cover happy paths, edge cases, error scenarios, and accessibility. Use Playwright for E2E tests.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit","Bash"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:80,mcpServers:"[]",createdAt:"2026-02-20T10:15:00Z",updatedAt:"2026-02-20T10:15:00Z"}],kE={"task-001b":[{id:"sess-001-prev",environmentId:"env-local-01",runtime:"claude-code",status:"failed",prompt:"Implement auth middleware",startedAt:"2026-02-26T14:00:00Z"},{id:"sess-001",environmentId:"env-local-01",runtime:"claude-code",status:"running",prompt:"Implement auth middleware",startedAt:"2026-02-27T08:15:00Z"}],"task-006c":[{id:"sess-004",environmentId:"env-docker-01",runtime:"claude-code",status:"running",prompt:"Add compression options",startedAt:"2026-02-27T09:00:00Z"}]};function Mt(n){return new Date(Date.now()+n).toISOString()}const Ry=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Mt(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:Mt(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:Mt(1600),content:`Found 5 endpoints that need refactoring:
61
- - GET /api/users
62
- - POST /api/users
63
- - GET /api/users/:id
64
- - PUT /api/users/:id
65
- - DELETE /api/users/:id`}},{delayMs:2800,event:{eventType:"output",timestamp:Mt(2800),content:"Refactoring to use Express Router with middleware chain...\n```typescript\nconst router = Router();\nrouter.use(authenticate);\nrouter.use(validateBody);\n```"}},{delayMs:4e3,event:{eventType:"output",timestamp:Mt(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:Mt(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:Mt(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:Mt(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:Mt(1400),content:`Found tables to modify:
66
- - users (add column: last_login_at)
67
- - sessions (add index on expires_at)
68
- - audit_log (new table)`}},{delayMs:2200,event:{eventType:"output",timestamp:Mt(2200),content:`⚠ This migration will add a NOT NULL column to the users table.
69
- The table has 50,000+ rows — this may lock the table briefly.
70
-
71
- Please confirm to proceed.`}}],resumeSteps:[{delayMs:500,event:{eventType:"output",timestamp:Mt(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:Mt(1e3),content:`Migration 001_add_last_login.sql applied successfully.
72
- Migration 002_sessions_index.sql applied successfully.
73
- Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventType:"output",timestamp:Mt(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:Mt(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Mt(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:Mt(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:Mt(1800),content:`Writing test cases:
74
- - should calculate monthly total
75
- - should apply discount codes
76
- - should handle currency conversion
77
- - should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:Mt(2800),content:`Error: Cannot resolve import 'src/services/stripe-client.ts' — module not found.
78
- The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:Mt(3500),content:"failed"}}]}],Oy=400;function ME({children:n}){const[a,i]=S.useState(CE),[o,r]=S.useState(AE),[u,d]=S.useState(void 0),[p,m]=S.useState(jE),[g,v]=S.useState(NE),[y,_]=S.useState(My),[T,E]=S.useState(wE),[j,A]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[C,M]=S.useState(DE),[R]=S.useState(kE),[Y,w]=S.useState(""),F=S.useRef(0),q=S.useRef(0),V=S.useRef(new Set),W=S.useRef(new Map),ae=S.useRef(g);ae.current=g;const se=S.useRef(new Map),le=S.useRef(new Map),z=S.useCallback(J=>(F.current+=1,`mock-${J}-${String(F.current).padStart(3,"0")}`),[]),K=S.useCallback(()=>{const J=Ry[q.current%Ry.length];return q.current+=1,J},[]),Q=S.useCallback((J,te,oe)=>{const Se=setTimeout(()=>{var ve;V.current.delete(Se),oe&&((ve=W.current.get(oe))==null||ve.delete(Se)),J()},te);V.current.add(Se),oe&&(W.current.has(oe)||W.current.set(oe,new Set),W.current.get(oe).add(Se))},[]),O=S.useCallback(J=>{const te=W.current.get(J);te&&(te.forEach(oe=>{clearTimeout(oe),V.current.delete(oe)}),W.current.delete(J))},[]),G=S.useCallback((J,te)=>{i(oe=>oe.map(Se=>Se.id===J?{...Se,status:te}:Se))},[]),ee=S.useCallback(J=>{r(te=>[...te,J])},[]),ge=S.useCallback((J,te,oe)=>{te.forEach((Se,ve)=>{Q(()=>{const ze={sessionId:J,...Se.event,timestamp:new Date().toISOString()};ee(ze),Se.event.eventType==="status"&&G(J,Se.event.content),ve===te.length-1&&oe&&oe()},Se.delayMs,J)})},[Q,ee,G]),pe=S.useCallback((J,te,oe,Se)=>{console.log("[MockGrackle] spawn",{environmentId:J,prompt:te,runtime:Se});const ve=z("sess"),ze={id:ve,environmentId:J,runtime:Se||"claude-code",status:"running",prompt:te,startedAt:new Date().toISOString()};i(gt=>[...gt,ze]),d(ve);const je=K();if(console.log(`[MockGrackle] Playing scenario: ${je.label}`),je.pauseForInput){const gt=je.pauseAfterStep??je.steps.length-1,Ce=je.steps.slice(0,gt+1),dt=Ce.length>0?Ce[Ce.length-1].delayMs:0;ge(ve,Ce),Q(()=>{G(ve,"idle"),ee({sessionId:ve,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},dt+Oy,ve),je.resumeSteps&&se.current.set(ve,je.resumeSteps)}else ge(ve,je.steps)},[z,K,ge,Q,G,ee]),We=S.useCallback(J=>{console.log("[MockGrackle] kill",J),O(J),se.current.delete(J),G(J,"interrupted"),ee({sessionId:J,eventType:"status",timestamp:new Date().toISOString(),content:"interrupted"}),v(te=>te.map(oe=>oe.latestSessionId===J&&oe.status==="working"?{...oe,status:"not_started"}:oe))},[O,G,ee]),Ae=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),he=S.useCallback(J=>{console.log("[MockGrackle] loadSessionEvents",J)},[]),De=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),r([])},[]),xe=S.useCallback((J,te,oe,Se,ve)=>{console.log("[MockGrackle] createProject",{name:J,description:te});const ze={id:z("proj"),name:J,description:te||"",repoUrl:oe||"",defaultEnvironmentId:Se||"",status:"active",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:ve||"",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};m(je=>[...je,ze])},[z]),ne=S.useCallback(J=>{console.log("[MockGrackle] archiveProject",J),m(te=>te.map(oe=>oe.id===J?{...oe,status:"archived"}:oe))},[]),ke=S.useCallback(J=>{console.log("[MockGrackle] loadTasks",J)},[]),H=S.useCallback((J,te,oe,Se,ve,ze,je,gt)=>{console.log("[MockGrackle] createTask",{projectId:J,title:te,parentTaskId:ve}),v(Ce=>{const yt=Ce.filter(Me=>Me.projectId===J).reduce((Me,xt)=>Math.max(Me,xt.sortOrder),0),Le=ve?Ce.find(Me=>Me.id===ve):void 0;if(ve&&!Le)return console.warn("[MockGrackle] Parent task not found:",ve),Ce;if(Le&&!Le.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",ve),Ce;const Dt=Le?Le.depth+1:0,Ee={id:z("task"),projectId:J,title:te,description:oe||"",status:"not_started",branch:"",latestSessionId:"",dependsOn:Se||[],reviewNotes:void 0,sortOrder:yt+1,createdAt:new Date().toISOString(),parentTaskId:ve||"",depth:Dt,childTaskIds:[],canDecompose:!ve,defaultPersonaId:ze||""};return[...Ce,Ee]}),je&&je()},[z]),ie=S.useCallback((J,te,oe,Se)=>{var dt;console.log("[MockGrackle] startTask",{taskId:J});const ve=ae.current.find(yt=>yt.id===J),ze=(ve==null?void 0:ve.title)??"",je=z("sess"),gt={id:je,environmentId:"env-local-01",runtime:"claude-code",status:"running",prompt:ze||J,startedAt:new Date().toISOString()};i(yt=>[...yt,gt]),v(yt=>yt.map(Le=>Le.id===J?{...Le,status:"working",latestSessionId:je,branch:`mock/${J.slice(0,8)}`}:Le));const Ce=K();if(console.log(`[MockGrackle] Playing task scenario: ${Ce.label}`),Ce.pauseForInput){const yt=Ce.pauseAfterStep??Ce.steps.length-1,Le=Ce.steps.slice(0,yt+1),Dt=Le.length>0?Le[Le.length-1].delayMs:0;if(ge(je,Le),Q(()=>{G(je,"idle"),ee({sessionId:je,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},Dt+Oy,je),Ce.resumeSteps){const Ee=[...Ce.resumeSteps];se.current.set(je,Ee);const Me=Ee.reduce((xt,ce)=>Math.max(xt,ce.delayMs),0);le.current.set(je,{taskId:J,delayAfterResume:Me+200})}}else{const yt=Ce.steps.length>0?Ce.steps[Ce.steps.length-1].delayMs:0;ge(je,Ce.steps);const Le=(dt=Ce.steps[Ce.steps.length-1])==null?void 0:dt.event.content;Q(()=>{Le==="completed"?v(Dt=>Dt.map(Ee=>Ee.id===J&&Ee.status==="working"?{...Ee,status:"paused"}:Ee)):Le==="failed"&&v(Dt=>Dt.map(Ee=>Ee.id===J&&Ee.status==="working"?{...Ee,status:"failed"}:Ee))},yt+100,je)}},[z,K,ge,Q,G,ee]),Ge=S.useCallback((J,te)=>{console.log("[MockGrackle] sendInput",{sessionId:J,text:te}),ee({sessionId:J,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${te}`}),G(J,"running"),ee({sessionId:J,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const oe=se.current.get(J);if(oe)se.current.delete(J),ge(J,oe);else{const ve=[{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"}}];ge(J,ve)}const Se=le.current.get(J);Se&&(le.current.delete(J),Q(()=>{v(ve=>ve.map(ze=>ze.id===Se.taskId&&ze.status==="working"?{...ze,status:"paused"}:ze))},Se.delayAfterResume,J))},[ee,G,ge,Q]),nt=S.useCallback(J=>{console.log("[MockGrackle] completeTask",J),v(te=>te.map(oe=>oe.id===J?{...oe,status:"complete"}:oe))},[]),Bt=S.useCallback(J=>{console.log("[MockGrackle] resumeTask",J)},[]),wt=S.useCallback((J,te,oe,Se,ve)=>{console.log("[MockGrackle] updateTask",{taskId:J,title:te}),v(ze=>ze.map(je=>je.id===J?{...je,title:te.trim()||je.title,description:oe,dependsOn:Se,...ve!==void 0?{defaultPersonaId:ve}:{}}:je))},[]),qe=S.useCallback(J=>{console.log("[MockGrackle] deleteTask",J),v(te=>te.filter(oe=>oe.id!==J))},[]),Be=S.useCallback(J=>{console.log("[MockGrackle] loadFindings",J),_(My.filter(te=>te.projectId===J))},[]),Dn=S.useCallback((J,te,oe,Se,ve)=>{console.log("[MockGrackle] postFinding",{projectId:J,title:te});const ze={id:z("find"),projectId:J,taskId:"",sessionId:"",category:Se||"general",title:te,content:oe,tags:ve||[],createdAt:new Date().toISOString()};_(je=>[...je,ze])},[z]),Ea=S.useCallback((J,te,oe)=>{console.log("[MockGrackle] addEnvironment",{displayName:J,adapterType:te,adapterConfig:oe})},[]),Ca=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),In=S.useCallback((J,te,oe,Se,ve)=>{console.log("[MockGrackle] setToken",{name:J,tokenType:oe}),E(ze=>[...ze.filter(gt=>gt.name!==J),{name:J,tokenType:oe,envVar:Se,filePath:ve,expiresAt:""}])},[]),Qn=S.useCallback(J=>{console.log("[MockGrackle] deleteToken",J),E(te=>te.filter(oe=>oe.name!==J))},[]),kn=S.useCallback(J=>{console.log("[MockGrackle] updateCredentialProviders",J),A(J)},[]);S.useEffect(()=>()=>{V.current.forEach(clearTimeout),V.current.clear()},[]);const Jn=S.useMemo(()=>({connected:!0,environments:EE,sessions:a,events:o,eventsDropped:0,lastSpawnedId:u,projects:p,tasks:g,findings:y,tokens:T,credentialProviders:j,spawn:pe,sendInput:Ge,kill:We,refresh:Ae,loadSessionEvents:he,clearEvents:De,createProject:xe,archiveProject:ne,updateProject:(J,te)=>{console.log("[MockGrackle] updateProject",{projectId:J,...te}),m(oe=>oe.map(Se=>Se.id!==J?Se:{...Se,...te.name!==void 0?{name:te.name}:{},...te.description!==void 0?{description:te.description}:{},...te.repoUrl!==void 0?{repoUrl:te.repoUrl}:{},...te.defaultEnvironmentId!==void 0?{defaultEnvironmentId:te.defaultEnvironmentId}:{},...te.worktreeBasePath!==void 0?{worktreeBasePath:te.worktreeBasePath}:{},...te.useWorktrees!==void 0?{useWorktrees:te.useWorktrees}:{},...te.defaultPersonaId!==void 0?{defaultPersonaId:te.defaultPersonaId}:{},updatedAt:new Date().toISOString()}))},loadTasks:ke,createTask:H,startTask:ie,completeTask:nt,resumeTask:Bt,updateTask:wt,deleteTask:qe,loadFindings:Be,postFinding:Dn,addEnvironment:Ea,loadTokens:Ca,setToken:In,deleteToken:Qn,updateCredentialProviders:kn,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceListError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:C,createPersona:(J,te,oe,Se,ve,ze)=>{console.log("[MockGrackle] createPersona",{name:J});const je={id:`mock-persona-${Date.now()}`,name:J,description:te,systemPrompt:oe,toolConfig:"{}",runtime:Se??"claude-code",model:ve||"",maxTurns:ze||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};M(gt=>[...gt,je])},updatePersona:(J,te,oe,Se,ve,ze,je)=>{console.log("[MockGrackle] updatePersona",{personaId:J,name:te}),M(gt=>gt.map(Ce=>Ce.id!==J?Ce:{...Ce,...te!==void 0?{name:te}:{},...oe!==void 0?{description:oe}:{},...Se!==void 0?{systemPrompt:Se}:{},...ve!==void 0?{runtime:ve}:{},...ze!==void 0?{model:ze}:{},...je!==void 0?{maxTurns:je}:{},updatedAt:new Date().toISOString()}))},deletePersona:J=>{console.log("[MockGrackle] deletePersona",J),M(te=>te.filter(oe=>oe.id!==J))},taskSessions:R,loadTaskSessions:J=>{console.log("[MockGrackle] loadTaskSessions",J)},appDefaultPersonaId:Y,setAppDefaultPersonaId:J=>{console.log("[MockGrackle] setAppDefaultPersonaId",J),w(J)}}),[a,o,u,p,g,y,T,j,C,R,Y,pe,Ge,We,Ae,he,De,xe,ne,ke,H,ie,nt,Bt,wt,qe,Be,Dn,Ea,Ca,In,Qn,kn]);return h.jsx(Rf.Provider,{value:Jn,children:n})}const I0=S.createContext(void 0),RE=4e3;function OE({children:n}){const[a,i]=S.useState([]),o=S.useRef(0),r=S.useCallback(d=>{i(p=>p.filter(m=>m.id!==d))},[]),u=S.useCallback((d,p="info",m=RE)=>{const g=`toast-${++o.current}`;i(v=>[...v,{id:g,message:d,variant:p,duration:m}])},[]);return h.jsx(I0.Provider,{value:{toasts:a,showToast:u,dismissToast:r},children:n})}function eo(){const n=S.useContext(I0);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const Wr=[{id:"grackle",label:"Grackle",description:"The default Grackle theme — iridescent purple on clean dark.",swatches:["#0e1218","#8b5cf6","#60a5fa","#e5e7eb","#34d399"],variantLightId:"grackle-light",variantDarkId:"grackle-dark"},{id:"grackle-light",label:"Grackle Light",description:"Light Grackle variant.",hidden:!0},{id:"grackle-dark",label:"Grackle Dark",description:"Dark Grackle variant.",hidden:!0},{id:"glass",label:"Glassmorphism",description:"Dark frosted-glass aesthetic with backdrop blur effects.",swatches:["#0a0c14","#4ecca3","#70a1ff","#e2e8f0","#a855f7"]},{id:"matrix",label:"Matrix",description:"Phosphor-green CRT terminal with scanlines and glow.",swatches:["#050505","#00ff41","#00bfff","#33ff77","#ffb000"]},{id:"brutalist",label:"Neubrutalism",description:"Thick borders, raw colors, bold type — ugly on purpose.",swatches:["#f5f0e8","#ff5757","#5ce1e6","#1a1a1a","#ffde59"],variantLightId:"brutalist-light",variantDarkId:"brutalist-dark"},{id:"brutalist-light",label:"Neubrutalism Light",description:"Light neubrutalism variant.",hidden:!0},{id:"brutalist-dark",label:"Neubrutalism Dark",description:"Dark neubrutalism variant.",hidden:!0},{id:"monokai",label:"Monokai",description:"Classic warm editor palette — pink, green, and purple.",swatches:["#272822","#f92672","#a6e22e","#f8f8f2","#ae81ff"],variantLightId:"monokai-light",variantDarkId:"monokai-dark"},{id:"monokai-dark",label:"Monokai Dark",description:"Dark Monokai variant.",hidden:!0},{id:"monokai-light",label:"Monokai Light",description:"Light Monokai variant.",hidden:!0},{id:"ubuntu",label:"Ubuntu",description:"Aubergine terminal with the GNOME Tango palette.",swatches:["#300a24","#8ae234","#ef2929","#eeeeec","#fce94f"]},{id:"sandstone",label:"Sandstone",description:"Warm terracotta accent on dark brown, in the style of Claude Code.",swatches:["#1a1815","#C15F3C","#6b8afd","#e8e6e3","#a78bfa"]},{id:"verdigris",label:"Verdigris",description:"Teal accent on charcoal, in the style of ChatGPT.",swatches:["#141414","#00a67e","#3b82f6","#ececec","#ab68ff"]},{id:"primer",label:"Primer",description:"Blue accent on ink-dark grey, in the style of GitHub.",swatches:["#0d1117","#58a6ff","#3fb950","#c9d1d9","#bc8cff"]}],z0=new Set(Wr.map(n=>n.id)),By="grackle";function Zd(n){return Wr.find(a=>a.id===n)}const Xd="grackle-theme",V0="grackle-prefer-system",P0="(prefers-color-scheme: dark)";let Ol=[],Mr;function jd(){Mr=void 0;for(const n of Ol)n()}function Qd(){return typeof window>"u"?!1:window.matchMedia(P0).matches}function Il(){if(typeof localStorage>"u")return By;try{const n=localStorage.getItem(Xd);if(n!==null&&z0.has(n))return n}catch{}return By}function Lr(){if(typeof localStorage>"u")return!1;try{return localStorage.getItem(V0)==="true"}catch{return!1}}function Jd(n){return Wr.find(a=>a.variantLightId===n||a.variantDarkId===n)}function H0(n,a){const i=Zd(n);if(i!=null&&i.variantDarkId)return a&&i.variantLightId?Qd()?i.variantDarkId:i.variantLightId:i.variantDarkId;if(i!=null&&i.hidden&&a){const o=Jd(n);if(o!=null&&o.variantLightId&&o.variantDarkId)return Qd()?o.variantDarkId:o.variantLightId}return n}function xi(n,a,i=!1){i&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=H0(n,a),i&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&xi(Il(),Lr());function BE(){return Mr===void 0&&(Mr={themeId:Il(),systemDark:Qd(),preferSystem:Lr()}),Mr}function LE(n){return Ol=[...Ol,n],()=>{Ol=Ol.filter(a=>a!==n)}}function UE(){const n=S.useSyncExternalStore(LE,BE),{themeId:a,preferSystem:i}=n,o=H0(a,i),r=S.useCallback(d=>{if(z0.has(d)){try{localStorage.setItem(Xd,d)}catch{}xi(d,Lr(),!0),jd()}},[]),u=S.useCallback(d=>{try{localStorage.setItem(V0,d?"true":"false")}catch{}if(d){const p=Il(),m=Zd(p);if(m!=null&&m.hidden){const g=Jd(p);if(g)try{localStorage.setItem(Xd,g.id)}catch{}}}xi(Il(),d,!0),jd()},[]);return S.useEffect(()=>{xi(a,i)},[a,i]),S.useEffect(()=>{if(typeof window>"u")return;const d=window.matchMedia(P0),p=()=>{const m=Il(),g=Lr();if(g){const v=Zd(m);if(v!=null&&v.variantDarkId&&v.variantLightId&&xi(m,g),v!=null&&v.hidden){const y=Jd(m);y!=null&&y.variantDarkId&&y.variantLightId&&xi(m,g)}}jd()};return d.addEventListener("change",p),()=>{d.removeEventListener("change",p)}},[]),{themeId:a,setTheme:r,resolvedThemeId:o,preferSystem:i,setPreferSystem:u}}const G0=S.createContext(void 0);function IE({children:n}){const a=UE();return h.jsx(G0.Provider,{value:a,children:n})}function F0(){const n=S.useContext(G0);if(!n)throw new Error("useThemeContext must be used within ThemeProvider");return n}const zE="_container_eix8p_1",VE="_hamburger_eix8p_33",PE="_brand_eix8p_49",HE="_info_eix8p_65",GE="_connectionLabel_eix8p_80",FE="_connectionDot_eix8p_93",qE="_connected_eix8p_96",$E="_disconnected_eix8p_100",YE="_settingsButton_eix8p_104",ya={container:zE,hamburger:VE,brand:PE,info:HE,connectionLabel:GE,connectionDot:FE,connected:qE,disconnected:$E,settingsButton:YE};function KE({onToggleSidebar:n,sidebarOpen:a}){const{connected:i,environments:o,sessions:r}=Ht(),u=Un(),d=o.length,p=o.filter(g=>g.status==="connected").length,m=r.filter(g=>["running","idle"].includes(g.status)).length;return h.jsxs("div",{className:ya.container,children:[n&&h.jsx("button",{type:"button",className:ya.hamburger,onClick:n,"aria-label":"Toggle sidebar","aria-expanded":a,children:"☰"}),h.jsx("button",{type:"button",className:ya.brand,onClick:()=>u("/"),title:"Home",children:"Grackle"}),h.jsxs("div",{className:ya.info,children:[h.jsxs("span",{"aria-label":i?"Connected":"Disconnected",children:[h.jsx("span",{className:`${ya.connectionDot} ${i?ya.connected:ya.disconnected}`,"aria-hidden":"true",children:"●"})," ",h.jsx("span",{className:ya.connectionLabel,"aria-hidden":"true",children:i?"Connected":"Disconnected"})]}),h.jsxs("span",{children:[p,"/",d," env",d!==1?"s":""]}),h.jsxs("span",{children:[m," active"]}),h.jsx("button",{className:ya.settingsButton,onClick:()=>u(Ni),title:"Settings",children:"⚙"})]})]})}const Of=S.createContext({});function Bf(n){const a=S.useRef(null);return a.current===null&&(a.current=n()),a.current}const ec=S.createContext(null),Lf=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class ZE extends S.Component{getSnapshotBeforeUpdate(a){const i=this.props.childRef.current;if(i&&a.isPresent&&!this.props.isPresent){const o=this.props.sizeRef.current;o.height=i.offsetHeight||0,o.width=i.offsetWidth||0,o.top=i.offsetTop,o.left=i.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function XE({children:n,isPresent:a}){const i=S.useId(),o=S.useRef(null),r=S.useRef({width:0,height:0,top:0,left:0}),{nonce:u}=S.useContext(Lf);return S.useInsertionEffect(()=>{const{width:d,height:p,top:m,left:g}=r.current;if(a||!o.current||!d||!p)return;o.current.dataset.motionPopId=i;const v=document.createElement("style");return u&&(v.nonce=u),document.head.appendChild(v),v.sheet&&v.sheet.insertRule(`
79
- [data-motion-pop-id="${i}"] {
80
- position: absolute !important;
81
- width: ${d}px !important;
82
- height: ${p}px !important;
83
- top: ${m}px !important;
84
- left: ${g}px !important;
85
- }
86
- `),()=>{document.head.removeChild(v)}},[a]),h.jsx(ZE,{isPresent:a,childRef:o,sizeRef:r,children:S.cloneElement(n,{ref:o})})}const QE=({children:n,initial:a,isPresent:i,onExitComplete:o,custom:r,presenceAffectsLayout:u,mode:d})=>{const p=Bf(JE),m=S.useId(),g=S.useCallback(y=>{p.set(y,!0);for(const _ of p.values())if(!_)return;o&&o()},[p,o]),v=S.useMemo(()=>({id:m,initial:a,isPresent:i,custom:r,onExitComplete:g,register:y=>(p.set(y,!1),()=>p.delete(y))}),u?[Math.random(),g]:[i,g]);return S.useMemo(()=>{p.forEach((y,_)=>p.set(_,!1))},[i]),S.useEffect(()=>{!i&&!p.size&&o&&o()},[i]),d==="popLayout"&&(n=h.jsx(XE,{isPresent:i,children:n})),h.jsx(ec.Provider,{value:v,children:n})};function JE(){return new Map}function q0(n=!0){const a=S.useContext(ec);if(a===null)return[!0,null];const{isPresent:i,onExitComplete:o,register:r}=a,u=S.useId();S.useEffect(()=>{n&&r(u)},[n]);const d=S.useCallback(()=>n&&o&&o(u),[u,o,n]);return!i&&o?[!1,d]:[!0]}const xr=n=>n.key||"";function Ly(n){const a=[];return S.Children.forEach(n,i=>{S.isValidElement(i)&&a.push(i)}),a}const Uf=typeof window<"u",$0=Uf?S.useLayoutEffect:S.useEffect,Xn=({children:n,custom:a,initial:i=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:u="sync",propagate:d=!1})=>{const[p,m]=q0(d),g=S.useMemo(()=>Ly(n),[n]),v=d&&!p?[]:g.map(xr),y=S.useRef(!0),_=S.useRef(g),T=Bf(()=>new Map),[E,j]=S.useState(g),[A,C]=S.useState(g);$0(()=>{y.current=!1,_.current=g;for(let Y=0;Y<A.length;Y++){const w=xr(A[Y]);v.includes(w)?T.delete(w):T.get(w)!==!0&&T.set(w,!1)}},[A,v.length,v.join("-")]);const M=[];if(g!==E){let Y=[...g];for(let w=0;w<A.length;w++){const F=A[w],q=xr(F);v.includes(q)||(Y.splice(w,0,F),M.push(F))}u==="wait"&&M.length&&(Y=M),C(Ly(Y)),j(g);return}const{forceRender:R}=S.useContext(Of);return h.jsx(h.Fragment,{children:A.map(Y=>{const w=xr(Y),F=d&&!p?!1:g===A||v.includes(w),q=()=>{if(T.has(w))T.set(w,!0);else return;let V=!0;T.forEach(W=>{W||(V=!1)}),V&&(R==null||R(),C(_.current),d&&(m==null||m()),o&&o())};return h.jsx(QE,{isPresent:F,initial:!y.current||i?void 0:!1,custom:F?void 0:a,presenceAffectsLayout:r,mode:u,onExitComplete:F?void 0:q,children:Y},w)})})},fn=n=>n;let Y0=fn;const WE={useManualTiming:!1};function eC(n){let a=new Set,i=new Set,o=!1,r=!1;const u=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function p(g){u.has(g)&&(m.schedule(g),n()),g(d)}const m={schedule:(g,v=!1,y=!1)=>{const T=y&&o?a:i;return v&&u.add(g),T.has(g)||T.add(g),g},cancel:g=>{i.delete(g),u.delete(g)},process:g=>{if(d=g,o){r=!0;return}o=!0,[a,i]=[i,a],a.forEach(p),a.clear(),o=!1,r&&(r=!1,m.process(g))}};return m}const Tr=["read","resolveKeyframes","update","preRender","render","postRender"],tC=40;function K0(n,a){let i=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},u=()=>i=!0,d=Tr.reduce((C,M)=>(C[M]=eC(u),C),{}),{read:p,resolveKeyframes:m,update:g,preRender:v,render:y,postRender:_}=d,T=()=>{const C=performance.now();i=!1,r.delta=o?1e3/60:Math.max(Math.min(C-r.timestamp,tC),1),r.timestamp=C,r.isProcessing=!0,p.process(r),m.process(r),g.process(r),v.process(r),y.process(r),_.process(r),r.isProcessing=!1,i&&a&&(o=!1,n(T))},E=()=>{i=!0,o=!0,r.isProcessing||n(T)};return{schedule:Tr.reduce((C,M)=>{const R=d[M];return C[M]=(Y,w=!1,F=!1)=>(i||E(),R.schedule(Y,w,F)),C},{}),cancel:C=>{for(let M=0;M<Tr.length;M++)d[Tr[M]].cancel(C)},state:r,steps:d}}const{schedule:lt,cancel:ts,state:Pt,steps:Nd}=K0(typeof requestAnimationFrame<"u"?requestAnimationFrame:fn,!0),Z0=S.createContext({strict:!1}),Uy={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"]},wi={};for(const n in Uy)wi[n]={isEnabled:a=>Uy[n].some(i=>!!a[i])};function nC(n){for(const a in n)wi[a]={...wi[a],...n[a]}}const aC=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 Ur(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||aC.has(n)}let X0=n=>!Ur(n);function sC(n){n&&(X0=a=>a.startsWith("on")?!Ur(a):n(a))}try{sC(require("@emotion/is-prop-valid").default)}catch{}function iC(n,a,i){const o={};for(const r in n)r==="values"&&typeof n.values=="object"||(X0(r)||i===!0&&Ur(r)||!a&&!Ur(r)||n.draggable&&r.startsWith("onDrag"))&&(o[r]=n[r]);return o}function lC(n){if(typeof Proxy>"u")return n;const a=new Map,i=(...o)=>n(...o);return new Proxy(i,{get:(o,r)=>r==="create"?n:(a.has(r)||a.set(r,n(r)),a.get(r))})}const tc=S.createContext({});function Yl(n){return typeof n=="string"||Array.isArray(n)}function nc(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const If=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zf=["initial",...If];function ac(n){return nc(n.animate)||zf.some(a=>Yl(n[a]))}function Q0(n){return!!(ac(n)||n.variants)}function oC(n,a){if(ac(n)){const{initial:i,animate:o}=n;return{initial:i===!1||Yl(i)?i:void 0,animate:Yl(o)?o:void 0}}return n.inherit!==!1?a:{}}function rC(n){const{initial:a,animate:i}=oC(n,S.useContext(tc));return S.useMemo(()=>({initial:a,animate:i}),[Iy(a),Iy(i)])}function Iy(n){return Array.isArray(n)?n.join(" "):n}const cC=Symbol.for("motionComponentSymbol");function Ti(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function uC(n,a,i){return S.useCallback(o=>{o&&n.onMount&&n.onMount(o),a&&(o?a.mount(o):a.unmount()),i&&(typeof i=="function"?i(o):Ti(i)&&(i.current=o))},[a])}const Vf=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),dC="framerAppearId",J0="data-"+Vf(dC),{schedule:Pf}=K0(queueMicrotask,!1),W0=S.createContext({});function fC(n,a,i,o,r){var u,d;const{visualElement:p}=S.useContext(tc),m=S.useContext(Z0),g=S.useContext(ec),v=S.useContext(Lf).reducedMotion,y=S.useRef(null);o=o||m.renderer,!y.current&&o&&(y.current=o(n,{visualState:a,parent:p,props:i,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:v}));const _=y.current,T=S.useContext(W0);_&&!_.projection&&r&&(_.type==="html"||_.type==="svg")&&hC(y.current,i,r,T);const E=S.useRef(!1);S.useInsertionEffect(()=>{_&&E.current&&_.update(i,g)});const j=i[J0],A=S.useRef(!!j&&!(!((u=window.MotionHandoffIsComplete)===null||u===void 0)&&u.call(window,j))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,j)));return $0(()=>{_&&(E.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),Pf.render(_.render),A.current&&_.animationState&&_.animationState.animateChanges())}),S.useEffect(()=>{_&&(!A.current&&_.animationState&&_.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)===null||C===void 0||C.call(window,j)}),A.current=!1))}),_}function hC(n,a,i,o){const{layoutId:r,layout:u,drag:d,dragConstraints:p,layoutScroll:m,layoutRoot:g}=a;n.projection=new i(n.latestValues,a["data-framer-portal-id"]?void 0:eb(n.parent)),n.projection.setOptions({layoutId:r,layout:u,alwaysMeasureLayout:!!d||p&&Ti(p),visualElement:n,animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:m,layoutRoot:g})}function eb(n){if(n)return n.options.allowProjection!==!1?n.projection:eb(n.parent)}function pC({preloadedFeatures:n,createVisualElement:a,useRender:i,useVisualState:o,Component:r}){var u,d;n&&nC(n);function p(g,v){let y;const _={...S.useContext(Lf),...g,layoutId:mC(g)},{isStatic:T}=_,E=rC(g),j=o(g,T);if(!T&&Uf){gC();const A=yC(_);y=A.MeasureLayout,E.visualElement=fC(r,j,_,a,A.ProjectionNode)}return h.jsxs(tc.Provider,{value:E,children:[y&&E.visualElement?h.jsx(y,{visualElement:E.visualElement,..._}):null,i(r,g,uC(j,E.visualElement,v),j,T,E.visualElement)]})}p.displayName=`motion.${typeof r=="string"?r:`create(${(d=(u=r.displayName)!==null&&u!==void 0?u:r.name)!==null&&d!==void 0?d:""})`}`;const m=S.forwardRef(p);return m[cC]=r,m}function mC({layoutId:n}){const a=S.useContext(Of).id;return a&&n!==void 0?a+"-"+n:n}function gC(n,a){S.useContext(Z0).strict}function yC(n){const{drag:a,layout:i}=wi;if(!a&&!i)return{};const o={...a,...i};return{MeasureLayout:a!=null&&a.isEnabled(n)||i!=null&&i.isEnabled(n)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const vC=["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 Hf(n){return typeof n!="string"||n.includes("-")?!1:!!(vC.indexOf(n)>-1||/[A-Z]/u.test(n))}function zy(n){const a=[{},{}];return n==null||n.values.forEach((i,o)=>{a[0][o]=i.get(),a[1][o]=i.getVelocity()}),a}function Gf(n,a,i,o){if(typeof a=="function"){const[r,u]=zy(o);a=a(i!==void 0?i:n.custom,r,u)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[r,u]=zy(o);a=a(i!==void 0?i:n.custom,r,u)}return a}const Wd=n=>Array.isArray(n),bC=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),SC=n=>Wd(n)?n[n.length-1]||0:n,Ft=n=>!!(n&&n.getVelocity);function Rr(n){const a=Ft(n)?n.get():n;return bC(a)?a.toValue():a}function _C({scrapeMotionValuesFromProps:n,createRenderState:a,onUpdate:i},o,r,u){const d={latestValues:xC(o,r,u,n),renderState:a()};return i&&(d.onMount=p=>i({props:o,current:p,...d}),d.onUpdate=p=>i(p)),d}const tb=n=>(a,i)=>{const o=S.useContext(tc),r=S.useContext(ec),u=()=>_C(n,a,o,r);return i?u():Bf(u)};function xC(n,a,i,o){const r={},u=o(n,{});for(const _ in u)r[_]=Rr(u[_]);let{initial:d,animate:p}=n;const m=ac(n),g=Q0(n);a&&g&&!m&&n.inherit!==!1&&(d===void 0&&(d=a.initial),p===void 0&&(p=a.animate));let v=i?i.initial===!1:!1;v=v||d===!1;const y=v?p:d;if(y&&typeof y!="boolean"&&!nc(y)){const _=Array.isArray(y)?y:[y];for(let T=0;T<_.length;T++){const E=Gf(n,_[T]);if(E){const{transitionEnd:j,transition:A,...C}=E;for(const M in C){let R=C[M];if(Array.isArray(R)){const Y=v?R.length-1:0;R=R[Y]}R!==null&&(r[M]=R)}for(const M in j)r[M]=j[M]}}}return r}const Oi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Bs=new Set(Oi),nb=n=>a=>typeof a=="string"&&a.startsWith(n),ab=nb("--"),TC=nb("var(--"),Ff=n=>TC(n)?EC.test(n.split("/*")[0].trim()):!1,EC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,sb=(n,a)=>a&&typeof n=="number"?a.transform(n):n,xa=(n,a,i)=>i>a?a:i<n?n:i,Bi={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Kl={...Bi,transform:n=>xa(0,1,n)},Er={...Bi,default:1},to=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),Xa=to("deg"),Kn=to("%"),be=to("px"),CC=to("vh"),AC=to("vw"),Vy={...Kn,parse:n=>Kn.parse(n)/100,transform:n=>Kn.transform(n*100)},jC={borderWidth:be,borderTopWidth:be,borderRightWidth:be,borderBottomWidth:be,borderLeftWidth:be,borderRadius:be,radius:be,borderTopLeftRadius:be,borderTopRightRadius:be,borderBottomRightRadius:be,borderBottomLeftRadius:be,width:be,maxWidth:be,height:be,maxHeight:be,top:be,right:be,bottom:be,left:be,padding:be,paddingTop:be,paddingRight:be,paddingBottom:be,paddingLeft:be,margin:be,marginTop:be,marginRight:be,marginBottom:be,marginLeft:be,backgroundPositionX:be,backgroundPositionY:be},NC={rotate:Xa,rotateX:Xa,rotateY:Xa,rotateZ:Xa,scale:Er,scaleX:Er,scaleY:Er,scaleZ:Er,skew:Xa,skewX:Xa,skewY:Xa,distance:be,translateX:be,translateY:be,translateZ:be,x:be,y:be,z:be,perspective:be,transformPerspective:be,opacity:Kl,originX:Vy,originY:Vy,originZ:be},Py={...Bi,transform:Math.round},qf={...jC,...NC,zIndex:Py,size:be,fillOpacity:Kl,strokeOpacity:Kl,numOctaves:Py},wC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},DC=Oi.length;function kC(n,a,i){let o="",r=!0;for(let u=0;u<DC;u++){const d=Oi[u],p=n[d];if(p===void 0)continue;let m=!0;if(typeof p=="number"?m=p===(d.startsWith("scale")?1:0):m=parseFloat(p)===0,!m||i){const g=sb(p,qf[d]);if(!m){r=!1;const v=wC[d]||d;o+=`${v}(${g}) `}i&&(a[d]=g)}}return o=o.trim(),i?o=i(a,r?"":o):r&&(o="none"),o}function $f(n,a,i){const{style:o,vars:r,transformOrigin:u}=n;let d=!1,p=!1;for(const m in a){const g=a[m];if(Bs.has(m)){d=!0;continue}else if(ab(m)){r[m]=g;continue}else{const v=sb(g,qf[m]);m.startsWith("origin")?(p=!0,u[m]=v):o[m]=v}}if(a.transform||(d||i?o.transform=kC(a,n.transform,i):o.transform&&(o.transform="none")),p){const{originX:m="50%",originY:g="50%",originZ:v=0}=u;o.transformOrigin=`${m} ${g} ${v}`}}const MC={offset:"stroke-dashoffset",array:"stroke-dasharray"},RC={offset:"strokeDashoffset",array:"strokeDasharray"};function OC(n,a,i=1,o=0,r=!0){n.pathLength=1;const u=r?MC:RC;n[u.offset]=be.transform(-o);const d=be.transform(a),p=be.transform(i);n[u.array]=`${d} ${p}`}function Hy(n,a,i){return typeof n=="string"?n:be.transform(a+i*n)}function BC(n,a,i){const o=Hy(a,n.x,n.width),r=Hy(i,n.y,n.height);return`${o} ${r}`}function Yf(n,{attrX:a,attrY:i,attrScale:o,originX:r,originY:u,pathLength:d,pathSpacing:p=1,pathOffset:m=0,...g},v,y){if($f(n,g,y),v){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:_,style:T,dimensions:E}=n;_.transform&&(E&&(T.transform=_.transform),delete _.transform),E&&(r!==void 0||u!==void 0||T.transform)&&(T.transformOrigin=BC(E,r!==void 0?r:.5,u!==void 0?u:.5)),a!==void 0&&(_.x=a),i!==void 0&&(_.y=i),o!==void 0&&(_.scale=o),d!==void 0&&OC(_,d,p,m,!1)}const Kf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),ib=()=>({...Kf(),attrs:{}}),Zf=n=>typeof n=="string"&&n.toLowerCase()==="svg";function lb(n,{style:a,vars:i},o,r){Object.assign(n.style,a,r&&r.getProjectionStyles(o));for(const u in i)n.style.setProperty(u,i[u])}const ob=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 rb(n,a,i,o){lb(n,a,void 0,o);for(const r in a.attrs)n.setAttribute(ob.has(r)?r:Vf(r),a.attrs[r])}const Ir={};function LC(n){Object.assign(Ir,n)}function cb(n,{layout:a,layoutId:i}){return Bs.has(n)||n.startsWith("origin")||(a||i!==void 0)&&(!!Ir[n]||n==="opacity")}function Xf(n,a,i){var o;const{style:r}=n,u={};for(const d in r)(Ft(r[d])||a.style&&Ft(a.style[d])||cb(d,n)||((o=i==null?void 0:i.getValue(d))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(u[d]=r[d]);return u}function ub(n,a,i){const o=Xf(n,a,i);for(const r in n)if(Ft(n[r])||Ft(a[r])){const u=Oi.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[u]=n[r]}return o}function UC(n,a){try{a.dimensions=typeof n.getBBox=="function"?n.getBBox():n.getBoundingClientRect()}catch{a.dimensions={x:0,y:0,width:0,height:0}}}const Gy=["x","y","width","height","cx","cy","r"],IC={useVisualState:tb({scrapeMotionValuesFromProps:ub,createRenderState:ib,onUpdate:({props:n,prevProps:a,current:i,renderState:o,latestValues:r})=>{if(!i)return;let u=!!n.drag;if(!u){for(const p in r)if(Bs.has(p)){u=!0;break}}if(!u)return;let d=!a;if(a)for(let p=0;p<Gy.length;p++){const m=Gy[p];n[m]!==a[m]&&(d=!0)}d&&lt.read(()=>{UC(i,o),lt.render(()=>{Yf(o,r,Zf(i.tagName),n.transformTemplate),rb(i,o)})})}})},zC={useVisualState:tb({scrapeMotionValuesFromProps:Xf,createRenderState:Kf})};function db(n,a,i){for(const o in a)!Ft(a[o])&&!cb(o,i)&&(n[o]=a[o])}function VC({transformTemplate:n},a){return S.useMemo(()=>{const i=Kf();return $f(i,a,n),Object.assign({},i.vars,i.style)},[a])}function PC(n,a){const i=n.style||{},o={};return db(o,i,n),Object.assign(o,VC(n,a)),o}function HC(n,a){const i={},o=PC(n,a);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=o,i}function GC(n,a,i,o){const r=S.useMemo(()=>{const u=ib();return Yf(u,a,Zf(o),n.transformTemplate),{...u.attrs,style:{...u.style}}},[a]);if(n.style){const u={};db(u,n.style,n),r.style={...u,...r.style}}return r}function FC(n=!1){return(i,o,r,{latestValues:u},d)=>{const m=(Hf(i)?GC:HC)(o,u,d,i),g=iC(o,typeof i=="string",n),v=i!==S.Fragment?{...g,...m,ref:r}:{},{children:y}=o,_=S.useMemo(()=>Ft(y)?y.get():y,[y]);return S.createElement(i,{...v,children:_})}}function qC(n,a){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const d={...Hf(o)?IC:zC,preloadedFeatures:n,useRender:FC(r),createVisualElement:a,Component:o};return pC(d)}}function fb(n,a){if(!Array.isArray(a))return!1;const i=a.length;if(i!==n.length)return!1;for(let o=0;o<i;o++)if(a[o]!==n[o])return!1;return!0}function sc(n,a,i){const o=n.getProps();return Gf(o,a,i!==void 0?i:o.custom,n)}function Qf(n,a){return n?n[a]||n.default||n:void 0}const hb=new Set(["width","height","top","left","right","bottom",...Oi]);let Or;function $C(){Or=void 0}const Zn={now:()=>(Or===void 0&&Zn.set(Pt.isProcessing||WE.useManualTiming?Pt.timestamp:performance.now()),Or),set:n=>{Or=n,queueMicrotask($C)}};function Jf(n,a){n.indexOf(a)===-1&&n.push(a)}function Wf(n,a){const i=n.indexOf(a);i>-1&&n.splice(i,1)}class eh{constructor(){this.subscriptions=[]}add(a){return Jf(this.subscriptions,a),()=>Wf(this.subscriptions,a)}notify(a,i,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](a,i,o);else for(let u=0;u<r;u++){const d=this.subscriptions[u];d&&d(a,i,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function pb(n,a){return a?n*(1e3/a):0}const Fy=30,YC=n=>!isNaN(parseFloat(n));class KC{constructor(a,i={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const u=Zn.now();this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(a),this.owner=i.owner}setCurrent(a){this.current=a,this.updatedAt=Zn.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=YC(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,i){this.events[a]||(this.events[a]=new eh);const o=this.events[a].add(i);return a==="change"?()=>{o(),lt.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,i){this.passiveEffect=a,this.stopPassiveEffect=i}set(a,i=!0){!i||!this.passiveEffect?this.updateAndNotify(a,i):this.passiveEffect(a,this.updateAndNotify)}setWithVelocity(a,i,o){this.set(i),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-o}jump(a,i=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=Zn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Fy)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,Fy);return pb(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(a){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=a(i),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zl(n,a){return new KC(n,a)}function ZC(n,a,i){n.hasValue(a)?n.getValue(a).set(i):n.addValue(a,Zl(i))}function XC(n,a){const i=sc(n,a);let{transitionEnd:o={},transition:r={},...u}=i||{};u={...u,...o};for(const d in u){const p=SC(u[d]);ZC(n,d,p)}}function QC(n){return!!(Ft(n)&&n.add)}function ef(n,a){const i=n.getValue("willChange");if(QC(i))return i.add(a)}function mb(n){return n.props[J0]}function th(n){let a;return()=>(a===void 0&&(a=n()),a)}const JC=th(()=>window.ScrollTimeline!==void 0);class WC{constructor(a){this.stop=()=>this.runAll("stop"),this.animations=a.filter(Boolean)}get finished(){return Promise.all(this.animations.map(a=>"finished"in a?a.finished:a))}getAll(a){return this.animations[0][a]}setAll(a,i){for(let o=0;o<this.animations.length;o++)this.animations[o][a]=i}attachTimeline(a,i){const o=this.animations.map(r=>{if(JC()&&r.attachTimeline)return r.attachTimeline(a);if(typeof i=="function")return i(r)});return()=>{o.forEach((r,u)=>{r&&r(),this.animations[u].stop()})}}get time(){return this.getAll("time")}set time(a){this.setAll("time",a)}get speed(){return this.getAll("speed")}set speed(a){this.setAll("speed",a)}get startTime(){return this.getAll("startTime")}get duration(){let a=0;for(let i=0;i<this.animations.length;i++)a=Math.max(a,this.animations[i].duration);return a}runAll(a){this.animations.forEach(i=>i[a]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class eA extends WC{then(a,i){return Promise.all(this.animations).then(a).catch(i)}}const ba=n=>n*1e3,Sa=n=>n/1e3;function nh(n){return typeof n=="function"}function qy(n,a){n.timeline=a,n.onfinish=null}const ah=n=>Array.isArray(n)&&typeof n[0]=="number",tA={linearEasing:void 0};function nA(n,a){const i=th(n);return()=>{var o;return(o=tA[a])!==null&&o!==void 0?o:i()}}const zr=nA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Di=(n,a,i)=>{const o=a-n;return o===0?1:(i-n)/o},gb=(n,a,i=10)=>{let o="";const r=Math.max(Math.round(a/i),2);for(let u=0;u<r;u++)o+=n(Di(0,r-1,u))+", ";return`linear(${o.substring(0,o.length-2)})`};function yb(n){return!!(typeof n=="function"&&zr()||!n||typeof n=="string"&&(n in tf||zr())||ah(n)||Array.isArray(n)&&n.every(yb))}const Bl=([n,a,i,o])=>`cubic-bezier(${n}, ${a}, ${i}, ${o})`,tf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Bl([0,.65,.55,1]),circOut:Bl([.55,0,1,.45]),backIn:Bl([.31,.01,.66,-.59]),backOut:Bl([.33,1.53,.69,.99])};function vb(n,a){if(n)return typeof n=="function"&&zr()?gb(n,a):ah(n)?Bl(n):Array.isArray(n)?n.map(i=>vb(i,a)||tf.easeOut):tf[n]}const bb=(n,a,i)=>(((1-3*i+3*a)*n+(3*i-6*a))*n+3*a)*n,aA=1e-7,sA=12;function iA(n,a,i,o,r){let u,d,p=0;do d=a+(i-a)/2,u=bb(d,o,r)-n,u>0?i=d:a=d;while(Math.abs(u)>aA&&++p<sA);return d}function no(n,a,i,o){if(n===a&&i===o)return fn;const r=u=>iA(u,0,1,n,i);return u=>u===0||u===1?u:bb(r(u),a,o)}const Sb=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,_b=n=>a=>1-n(1-a),xb=no(.33,1.53,.69,.99),sh=_b(xb),Tb=Sb(sh),Eb=n=>(n*=2)<1?.5*sh(n):.5*(2-Math.pow(2,-10*(n-1))),ih=n=>1-Math.sin(Math.acos(n)),Cb=_b(ih),Ab=Sb(ih),jb=n=>/^0[^.\s]+$/u.test(n);function lA(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||jb(n):!0}const zl=n=>Math.round(n*1e5)/1e5,lh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function oA(n){return n==null}const rA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,oh=(n,a)=>i=>!!(typeof i=="string"&&rA.test(i)&&i.startsWith(n)||a&&!oA(i)&&Object.prototype.hasOwnProperty.call(i,a)),Nb=(n,a,i)=>o=>{if(typeof o!="string")return o;const[r,u,d,p]=o.match(lh);return{[n]:parseFloat(r),[a]:parseFloat(u),[i]:parseFloat(d),alpha:p!==void 0?parseFloat(p):1}},cA=n=>xa(0,255,n),wd={...Bi,transform:n=>Math.round(cA(n))},Ds={test:oh("rgb","red"),parse:Nb("red","green","blue"),transform:({red:n,green:a,blue:i,alpha:o=1})=>"rgba("+wd.transform(n)+", "+wd.transform(a)+", "+wd.transform(i)+", "+zl(Kl.transform(o))+")"};function uA(n){let a="",i="",o="",r="";return n.length>5?(a=n.substring(1,3),i=n.substring(3,5),o=n.substring(5,7),r=n.substring(7,9)):(a=n.substring(1,2),i=n.substring(2,3),o=n.substring(3,4),r=n.substring(4,5),a+=a,i+=i,o+=o,r+=r),{red:parseInt(a,16),green:parseInt(i,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const nf={test:oh("#"),parse:uA,transform:Ds.transform},Ei={test:oh("hsl","hue"),parse:Nb("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:i,alpha:o=1})=>"hsla("+Math.round(n)+", "+Kn.transform(zl(a))+", "+Kn.transform(zl(i))+", "+zl(Kl.transform(o))+")"},Gt={test:n=>Ds.test(n)||nf.test(n)||Ei.test(n),parse:n=>Ds.test(n)?Ds.parse(n):Ei.test(n)?Ei.parse(n):nf.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Ds.transform(n):Ei.transform(n)},dA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fA(n){var a,i;return isNaN(n)&&typeof n=="string"&&(((a=n.match(lh))===null||a===void 0?void 0:a.length)||0)+(((i=n.match(dA))===null||i===void 0?void 0:i.length)||0)>0}const wb="number",Db="color",hA="var",pA="var(",$y="${}",mA=/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 Xl(n){const a=n.toString(),i=[],o={color:[],number:[],var:[]},r=[];let u=0;const p=a.replace(mA,m=>(Gt.test(m)?(o.color.push(u),r.push(Db),i.push(Gt.parse(m))):m.startsWith(pA)?(o.var.push(u),r.push(hA),i.push(m)):(o.number.push(u),r.push(wb),i.push(parseFloat(m))),++u,$y)).split($y);return{values:i,split:p,indexes:o,types:r}}function kb(n){return Xl(n).values}function Mb(n){const{split:a,types:i}=Xl(n),o=a.length;return r=>{let u="";for(let d=0;d<o;d++)if(u+=a[d],r[d]!==void 0){const p=i[d];p===wb?u+=zl(r[d]):p===Db?u+=Gt.transform(r[d]):u+=r[d]}return u}}const gA=n=>typeof n=="number"?0:n;function yA(n){const a=kb(n);return Mb(n)(a.map(gA))}const ns={test:fA,parse:kb,createTransformer:Mb,getAnimatableNone:yA},vA=new Set(["brightness","contrast","saturate","opacity"]);function bA(n){const[a,i]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=i.match(lh)||[];if(!o)return n;const r=i.replace(o,"");let u=vA.has(a)?1:0;return o!==i&&(u*=100),a+"("+u+r+")"}const SA=/\b([a-z-]*)\(.*?\)/gu,af={...ns,getAnimatableNone:n=>{const a=n.match(SA);return a?a.map(bA).join(" "):n}},_A={...qf,color:Gt,backgroundColor:Gt,outlineColor:Gt,fill:Gt,stroke:Gt,borderColor:Gt,borderTopColor:Gt,borderRightColor:Gt,borderBottomColor:Gt,borderLeftColor:Gt,filter:af,WebkitFilter:af},rh=n=>_A[n];function Rb(n,a){let i=rh(n);return i!==af&&(i=ns),i.getAnimatableNone?i.getAnimatableNone(a):void 0}const xA=new Set(["auto","none","0"]);function TA(n,a,i){let o=0,r;for(;o<n.length&&!r;){const u=n[o];typeof u=="string"&&!xA.has(u)&&Xl(u).values.length&&(r=n[o]),o++}if(r&&i)for(const u of a)n[u]=Rb(i,r)}const Yy=n=>n===Bi||n===be,Ky=(n,a)=>parseFloat(n.split(", ")[a]),Zy=(n,a)=>(i,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return Ky(r[1],a);{const u=o.match(/^matrix\((.+)\)$/u);return u?Ky(u[1],n):0}},EA=new Set(["x","y","z"]),CA=Oi.filter(n=>!EA.has(n));function AA(n){const a=[];return CA.forEach(i=>{const o=n.getValue(i);o!==void 0&&(a.push([i,o.get()]),o.set(i.startsWith("scale")?1:0))}),a}const ki={width:({x:n},{paddingLeft:a="0",paddingRight:i="0"})=>n.max-n.min-parseFloat(a)-parseFloat(i),height:({y:n},{paddingTop:a="0",paddingBottom:i="0"})=>n.max-n.min-parseFloat(a)-parseFloat(i),top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:Zy(4,13),y:Zy(5,14)};ki.translateX=ki.x;ki.translateY=ki.y;const ks=new Set;let sf=!1,lf=!1;function Ob(){if(lf){const n=Array.from(ks).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),i=new Map;a.forEach(o=>{const r=AA(o);r.length&&(i.set(o,r),o.render())}),n.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const r=i.get(o);r&&r.forEach(([u,d])=>{var p;(p=o.getValue(u))===null||p===void 0||p.set(d)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}lf=!1,sf=!1,ks.forEach(n=>n.complete()),ks.clear()}function Bb(){ks.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(lf=!0)})}function jA(){Bb(),Ob()}class ch{constructor(a,i,o,r,u,d=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...a],this.onComplete=i,this.name=o,this.motionValue=r,this.element=u,this.isAsync=d}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ks.add(this),sf||(sf=!0,lt.read(Bb),lt.resolveKeyframes(Ob))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:i,element:o,motionValue:r}=this;for(let u=0;u<a.length;u++)if(a[u]===null)if(u===0){const d=r==null?void 0:r.get(),p=a[a.length-1];if(d!==void 0)a[0]=d;else if(o&&i){const m=o.readValue(i,p);m!=null&&(a[0]=m)}a[0]===void 0&&(a[0]=p),r&&d===void 0&&r.set(a[0])}else a[u]=a[u-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ks.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ks.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Lb=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),NA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wA(n){const a=NA.exec(n);if(!a)return[,];const[,i,o,r]=a;return[`--${i??o}`,r]}function Ub(n,a,i=1){const[o,r]=wA(n);if(!o)return;const u=window.getComputedStyle(a).getPropertyValue(o);if(u){const d=u.trim();return Lb(d)?parseFloat(d):d}return Ff(r)?Ub(r,a,i+1):r}const Ib=n=>a=>a.test(n),DA={test:n=>n==="auto",parse:n=>n},zb=[Bi,be,Kn,Xa,AC,CC,DA],Xy=n=>zb.find(Ib(n));class Vb extends ch{constructor(a,i,o,r,u){super(a,i,o,r,u,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:i,name:o}=this;if(!i||!i.current)return;super.readKeyframes();for(let m=0;m<a.length;m++){let g=a[m];if(typeof g=="string"&&(g=g.trim(),Ff(g))){const v=Ub(g,i.current);v!==void 0&&(a[m]=v),m===a.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!hb.has(o)||a.length!==2)return;const[r,u]=a,d=Xy(r),p=Xy(u);if(d!==p)if(Yy(d)&&Yy(p))for(let m=0;m<a.length;m++){const g=a[m];typeof g=="string"&&(a[m]=parseFloat(g))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:i}=this,o=[];for(let r=0;r<a.length;r++)lA(a[r])&&o.push(r);o.length&&TA(a,o,i)}measureInitialState(){const{element:a,unresolvedKeyframes:i,name:o}=this;if(!a||!a.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ki[o](a.measureViewportBox(),window.getComputedStyle(a.current)),i[0]=this.measuredOrigin;const r=i[i.length-1];r!==void 0&&a.getValue(o,r).jump(r,!1)}measureEndState(){var a;const{element:i,name:o,unresolvedKeyframes:r}=this;if(!i||!i.current)return;const u=i.getValue(o);u&&u.jump(this.measuredOrigin,!1);const d=r.length-1,p=r[d];r[d]=ki[o](i.measureViewportBox(),window.getComputedStyle(i.current)),p!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=p),!((a=this.removedTransforms)===null||a===void 0)&&a.length&&this.removedTransforms.forEach(([m,g])=>{i.getValue(m).set(g)}),this.resolveNoneKeyframes()}}const Qy=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(ns.test(n)||n==="0")&&!n.startsWith("url("));function kA(n){const a=n[0];if(n.length===1)return!0;for(let i=0;i<n.length;i++)if(n[i]!==a)return!0}function MA(n,a,i,o){const r=n[0];if(r===null)return!1;if(a==="display"||a==="visibility")return!0;const u=n[n.length-1],d=Qy(r,a),p=Qy(u,a);return!d||!p?!1:kA(n)||(i==="spring"||nh(i))&&o}const RA=n=>n!==null;function ic(n,{repeat:a,repeatType:i="loop"},o){const r=n.filter(RA),u=a&&i!=="loop"&&a%2===1?0:r.length-1;return!u||o===void 0?r[u]:o}const OA=40;class Pb{constructor({autoplay:a=!0,delay:i=0,type:o="keyframes",repeat:r=0,repeatDelay:u=0,repeatType:d="loop",...p}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Zn.now(),this.options={autoplay:a,delay:i,type:o,repeat:r,repeatDelay:u,repeatType:d,...p},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>OA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&jA(),this._resolved}onKeyframesResolved(a,i){this.resolvedAt=Zn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:u,delay:d,onComplete:p,onUpdate:m,isGenerator:g}=this.options;if(!g&&!MA(a,o,r,u))if(d)this.options.duration=0;else{m&&m(ic(a,this.options,i)),p&&p(),this.resolveFinishedPromise();return}const v=this.initPlayback(a,i);v!==!1&&(this._resolved={keyframes:a,finalKeyframe:i,...v},this.onPostResolved())}onPostResolved(){}then(a,i){return this.currentFinishedPromise.then(a,i)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(a=>{this.resolveFinishedPromise=a})}}const of=2e4;function Hb(n){let a=0;const i=50;let o=n.next(a);for(;!o.done&&a<of;)a+=i,o=n.next(a);return a>=of?1/0:a}const ut=(n,a,i)=>n+(a-n)*i;function Dd(n,a,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?n+(a-n)*6*i:i<1/2?a:i<2/3?n+(a-n)*(2/3-i)*6:n}function BA({hue:n,saturation:a,lightness:i,alpha:o}){n/=360,a/=100,i/=100;let r=0,u=0,d=0;if(!a)r=u=d=i;else{const p=i<.5?i*(1+a):i+a-i*a,m=2*i-p;r=Dd(m,p,n+1/3),u=Dd(m,p,n),d=Dd(m,p,n-1/3)}return{red:Math.round(r*255),green:Math.round(u*255),blue:Math.round(d*255),alpha:o}}function Vr(n,a){return i=>i>0?a:n}const kd=(n,a,i)=>{const o=n*n,r=i*(a*a-o)+o;return r<0?0:Math.sqrt(r)},LA=[nf,Ds,Ei],UA=n=>LA.find(a=>a.test(n));function Jy(n){const a=UA(n);if(!a)return!1;let i=a.parse(n);return a===Ei&&(i=BA(i)),i}const Wy=(n,a)=>{const i=Jy(n),o=Jy(a);if(!i||!o)return Vr(n,a);const r={...i};return u=>(r.red=kd(i.red,o.red,u),r.green=kd(i.green,o.green,u),r.blue=kd(i.blue,o.blue,u),r.alpha=ut(i.alpha,o.alpha,u),Ds.transform(r))},IA=(n,a)=>i=>a(n(i)),ao=(...n)=>n.reduce(IA),rf=new Set(["none","hidden"]);function zA(n,a){return rf.has(n)?i=>i<=0?n:a:i=>i>=1?a:n}function VA(n,a){return i=>ut(n,a,i)}function uh(n){return typeof n=="number"?VA:typeof n=="string"?Ff(n)?Vr:Gt.test(n)?Wy:GA:Array.isArray(n)?Gb:typeof n=="object"?Gt.test(n)?Wy:PA:Vr}function Gb(n,a){const i=[...n],o=i.length,r=n.map((u,d)=>uh(u)(u,a[d]));return u=>{for(let d=0;d<o;d++)i[d]=r[d](u);return i}}function PA(n,a){const i={...n,...a},o={};for(const r in i)n[r]!==void 0&&a[r]!==void 0&&(o[r]=uh(n[r])(n[r],a[r]));return r=>{for(const u in o)i[u]=o[u](r);return i}}function HA(n,a){var i;const o=[],r={color:0,var:0,number:0};for(let u=0;u<a.values.length;u++){const d=a.types[u],p=n.indexes[d][r[d]],m=(i=n.values[p])!==null&&i!==void 0?i:0;o[u]=m,r[d]++}return o}const GA=(n,a)=>{const i=ns.createTransformer(a),o=Xl(n),r=Xl(a);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?rf.has(n)&&!r.values.length||rf.has(a)&&!o.values.length?zA(n,a):ao(Gb(HA(o,r),r.values),i):Vr(n,a)};function Fb(n,a,i){return typeof n=="number"&&typeof a=="number"&&typeof i=="number"?ut(n,a,i):uh(n)(n,a)}const FA=5;function qb(n,a,i){const o=Math.max(a-FA,0);return pb(i-n(o),a-o)}const pt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Md=.001;function qA({duration:n=pt.duration,bounce:a=pt.bounce,velocity:i=pt.velocity,mass:o=pt.mass}){let r,u,d=1-a;d=xa(pt.minDamping,pt.maxDamping,d),n=xa(pt.minDuration,pt.maxDuration,Sa(n)),d<1?(r=g=>{const v=g*d,y=v*n,_=v-i,T=cf(g,d),E=Math.exp(-y);return Md-_/T*E},u=g=>{const y=g*d*n,_=y*i+i,T=Math.pow(d,2)*Math.pow(g,2)*n,E=Math.exp(-y),j=cf(Math.pow(g,2),d);return(-r(g)+Md>0?-1:1)*((_-T)*E)/j}):(r=g=>{const v=Math.exp(-g*n),y=(g-i)*n+1;return-Md+v*y},u=g=>{const v=Math.exp(-g*n),y=(i-g)*(n*n);return v*y});const p=5/n,m=YA(r,u,p);if(n=ba(n),isNaN(m))return{stiffness:pt.stiffness,damping:pt.damping,duration:n};{const g=Math.pow(m,2)*o;return{stiffness:g,damping:d*2*Math.sqrt(o*g),duration:n}}}const $A=12;function YA(n,a,i){let o=i;for(let r=1;r<$A;r++)o=o-n(o)/a(o);return o}function cf(n,a){return n*Math.sqrt(1-a*a)}const KA=["duration","bounce"],ZA=["stiffness","damping","mass"];function ev(n,a){return a.some(i=>n[i]!==void 0)}function XA(n){let a={velocity:pt.velocity,stiffness:pt.stiffness,damping:pt.damping,mass:pt.mass,isResolvedFromDuration:!1,...n};if(!ev(n,ZA)&&ev(n,KA))if(n.visualDuration){const i=n.visualDuration,o=2*Math.PI/(i*1.2),r=o*o,u=2*xa(.05,1,1-(n.bounce||0))*Math.sqrt(r);a={...a,mass:pt.mass,stiffness:r,damping:u}}else{const i=qA(n);a={...a,...i,mass:pt.mass},a.isResolvedFromDuration=!0}return a}function $b(n=pt.visualDuration,a=pt.bounce){const i=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,restDelta:r}=i;const u=i.keyframes[0],d=i.keyframes[i.keyframes.length-1],p={done:!1,value:u},{stiffness:m,damping:g,mass:v,duration:y,velocity:_,isResolvedFromDuration:T}=XA({...i,velocity:-Sa(i.velocity||0)}),E=_||0,j=g/(2*Math.sqrt(m*v)),A=d-u,C=Sa(Math.sqrt(m/v)),M=Math.abs(A)<5;o||(o=M?pt.restSpeed.granular:pt.restSpeed.default),r||(r=M?pt.restDelta.granular:pt.restDelta.default);let R;if(j<1){const w=cf(C,j);R=F=>{const q=Math.exp(-j*C*F);return d-q*((E+j*C*A)/w*Math.sin(w*F)+A*Math.cos(w*F))}}else if(j===1)R=w=>d-Math.exp(-C*w)*(A+(E+C*A)*w);else{const w=C*Math.sqrt(j*j-1);R=F=>{const q=Math.exp(-j*C*F),V=Math.min(w*F,300);return d-q*((E+j*C*A)*Math.sinh(V)+w*A*Math.cosh(V))/w}}const Y={calculatedDuration:T&&y||null,next:w=>{const F=R(w);if(T)p.done=w>=y;else{let q=0;j<1&&(q=w===0?ba(E):qb(R,w,F));const V=Math.abs(q)<=o,W=Math.abs(d-F)<=r;p.done=V&&W}return p.value=p.done?d:F,p},toString:()=>{const w=Math.min(Hb(Y),of),F=gb(q=>Y.next(w*q).value,w,30);return w+"ms "+F}};return Y}function tv({keyframes:n,velocity:a=0,power:i=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:u=500,modifyTarget:d,min:p,max:m,restDelta:g=.5,restSpeed:v}){const y=n[0],_={done:!1,value:y},T=V=>p!==void 0&&V<p||m!==void 0&&V>m,E=V=>p===void 0?m:m===void 0||Math.abs(p-V)<Math.abs(m-V)?p:m;let j=i*a;const A=y+j,C=d===void 0?A:d(A);C!==A&&(j=C-y);const M=V=>-j*Math.exp(-V/o),R=V=>C+M(V),Y=V=>{const W=M(V),ae=R(V);_.done=Math.abs(W)<=g,_.value=_.done?C:ae};let w,F;const q=V=>{T(_.value)&&(w=V,F=$b({keyframes:[_.value,E(_.value)],velocity:qb(R,V,_.value),damping:r,stiffness:u,restDelta:g,restSpeed:v}))};return q(0),{calculatedDuration:null,next:V=>{let W=!1;return!F&&w===void 0&&(W=!0,Y(V),q(V)),w!==void 0&&V>=w?F.next(V-w):(!W&&Y(V),_)}}}const QA=no(.42,0,1,1),JA=no(0,0,.58,1),Yb=no(.42,0,.58,1),WA=n=>Array.isArray(n)&&typeof n[0]!="number",ej={linear:fn,easeIn:QA,easeInOut:Yb,easeOut:JA,circIn:ih,circInOut:Ab,circOut:Cb,backIn:sh,backInOut:Tb,backOut:xb,anticipate:Eb},nv=n=>{if(ah(n)){Y0(n.length===4);const[a,i,o,r]=n;return no(a,i,o,r)}else if(typeof n=="string")return ej[n];return n};function tj(n,a,i){const o=[],r=i||Fb,u=n.length-1;for(let d=0;d<u;d++){let p=r(n[d],n[d+1]);if(a){const m=Array.isArray(a)?a[d]||fn:a;p=ao(m,p)}o.push(p)}return o}function nj(n,a,{clamp:i=!0,ease:o,mixer:r}={}){const u=n.length;if(Y0(u===a.length),u===1)return()=>a[0];if(u===2&&a[0]===a[1])return()=>a[1];const d=n[0]===n[1];n[0]>n[u-1]&&(n=[...n].reverse(),a=[...a].reverse());const p=tj(a,o,r),m=p.length,g=v=>{if(d&&v<n[0])return a[0];let y=0;if(m>1)for(;y<n.length-2&&!(v<n[y+1]);y++);const _=Di(n[y],n[y+1],v);return p[y](_)};return i?v=>g(xa(n[0],n[u-1],v)):g}function aj(n,a){const i=n[n.length-1];for(let o=1;o<=a;o++){const r=Di(0,a,o);n.push(ut(i,1,r))}}function sj(n){const a=[0];return aj(a,n.length-1),a}function ij(n,a){return n.map(i=>i*a)}function lj(n,a){return n.map(()=>a||Yb).splice(0,n.length-1)}function Pr({duration:n=300,keyframes:a,times:i,ease:o="easeInOut"}){const r=WA(o)?o.map(nv):nv(o),u={done:!1,value:a[0]},d=ij(i&&i.length===a.length?i:sj(a),n),p=nj(d,a,{ease:Array.isArray(r)?r:lj(a,r)});return{calculatedDuration:n,next:m=>(u.value=p(m),u.done=m>=n,u)}}const oj=n=>{const a=({timestamp:i})=>n(i);return{start:()=>lt.update(a,!0),stop:()=>ts(a),now:()=>Pt.isProcessing?Pt.timestamp:Zn.now()}},rj={decay:tv,inertia:tv,tween:Pr,keyframes:Pr,spring:$b},cj=n=>n/100;class dh extends Pb{constructor(a){super(a),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:m}=this.options;m&&m()};const{name:i,motionValue:o,element:r,keyframes:u}=this.options,d=(r==null?void 0:r.KeyframeResolver)||ch,p=(m,g)=>this.onKeyframesResolved(m,g);this.resolver=new d(u,p,i,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(a){const{type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:u,velocity:d=0}=this.options,p=nh(i)?i:rj[i]||Pr;let m,g;p!==Pr&&typeof a[0]!="number"&&(m=ao(cj,Fb(a[0],a[1])),a=[0,100]);const v=p({...this.options,keyframes:a});u==="mirror"&&(g=p({...this.options,keyframes:[...a].reverse(),velocity:-d})),v.calculatedDuration===null&&(v.calculatedDuration=Hb(v));const{calculatedDuration:y}=v,_=y+r,T=_*(o+1)-r;return{generator:v,mirroredGenerator:g,mapPercentToKeyframes:m,calculatedDuration:y,resolvedDuration:_,totalDuration:T}}onPostResolved(){const{autoplay:a=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!a?this.pause():this.state=this.pendingPlayState}tick(a,i=!1){const{resolved:o}=this;if(!o){const{keyframes:V}=this.options;return{done:!0,value:V[V.length-1]}}const{finalKeyframe:r,generator:u,mirroredGenerator:d,mapPercentToKeyframes:p,keyframes:m,calculatedDuration:g,totalDuration:v,resolvedDuration:y}=o;if(this.startTime===null)return u.next(0);const{delay:_,repeat:T,repeatType:E,repeatDelay:j,onUpdate:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-v/this.speed,this.startTime)),i?this.currentTime=a:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(a-this.startTime)*this.speed;const C=this.currentTime-_*(this.speed>=0?1:-1),M=this.speed>=0?C<0:C>v;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=v);let R=this.currentTime,Y=u;if(T){const V=Math.min(this.currentTime,v)/y;let W=Math.floor(V),ae=V%1;!ae&&V>=1&&(ae=1),ae===1&&W--,W=Math.min(W,T+1),!!(W%2)&&(E==="reverse"?(ae=1-ae,j&&(ae-=j/y)):E==="mirror"&&(Y=d)),R=xa(0,1,ae)*y}const w=M?{done:!1,value:m[0]}:Y.next(R);p&&(w.value=p(w.value));let{done:F}=w;!M&&g!==null&&(F=this.speed>=0?this.currentTime>=v:this.currentTime<=0);const q=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&F);return q&&r!==void 0&&(w.value=ic(m,this.options,r)),A&&A(w.value),q&&this.finish(),w}get duration(){const{resolved:a}=this;return a?Sa(a.calculatedDuration):0}get time(){return Sa(this.currentTime)}set time(a){a=ba(a),this.currentTime=a,this.holdTime!==null||this.speed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.speed)}get speed(){return this.playbackSpeed}set speed(a){const i=this.playbackSpeed!==a;this.playbackSpeed=a,i&&(this.time=Sa(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:a=oj,onPlay:i,startTime:o}=this.options;this.driver||(this.driver=a(u=>this.tick(u))),i&&i();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var a;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(a=this.currentTime)!==null&&a!==void 0?a:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:a}=this.options;a&&a()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}}const uj=new Set(["opacity","clipPath","filter","transform"]);function dj(n,a,i,{delay:o=0,duration:r=300,repeat:u=0,repeatType:d="loop",ease:p="easeInOut",times:m}={}){const g={[a]:i};m&&(g.offset=m);const v=vb(p,r);return Array.isArray(v)&&(g.easing=v),n.animate(g,{delay:o,duration:r,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:u+1,direction:d==="reverse"?"alternate":"normal"})}const fj=th(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Hr=10,hj=2e4;function pj(n){return nh(n.type)||n.type==="spring"||!yb(n.ease)}function mj(n,a){const i=new dh({...a,keyframes:n,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:n[0]};const r=[];let u=0;for(;!o.done&&u<hj;)o=i.sample(u),r.push(o.value),u+=Hr;return{times:void 0,keyframes:r,duration:u-Hr,ease:"linear"}}const Kb={anticipate:Eb,backInOut:Tb,circInOut:Ab};function gj(n){return n in Kb}class av extends Pb{constructor(a){super(a);const{name:i,motionValue:o,element:r,keyframes:u}=this.options;this.resolver=new Vb(u,(d,p)=>this.onKeyframesResolved(d,p),i,o,r),this.resolver.scheduleResolve()}initPlayback(a,i){let{duration:o=300,times:r,ease:u,type:d,motionValue:p,name:m,startTime:g}=this.options;if(!p.owner||!p.owner.current)return!1;if(typeof u=="string"&&zr()&&gj(u)&&(u=Kb[u]),pj(this.options)){const{onComplete:y,onUpdate:_,motionValue:T,element:E,...j}=this.options,A=mj(a,j);a=A.keyframes,a.length===1&&(a[1]=a[0]),o=A.duration,r=A.times,u=A.ease,d="keyframes"}const v=dj(p.owner.current,m,a,{...this.options,duration:o,times:r,ease:u});return v.startTime=g??this.calcStartTime(),this.pendingTimeline?(qy(v,this.pendingTimeline),this.pendingTimeline=void 0):v.onfinish=()=>{const{onComplete:y}=this.options;p.set(ic(a,this.options,i)),y&&y(),this.cancel(),this.resolveFinishedPromise()},{animation:v,duration:o,times:r,type:d,ease:u,keyframes:a}}get duration(){const{resolved:a}=this;if(!a)return 0;const{duration:i}=a;return Sa(i)}get time(){const{resolved:a}=this;if(!a)return 0;const{animation:i}=a;return Sa(i.currentTime||0)}set time(a){const{resolved:i}=this;if(!i)return;const{animation:o}=i;o.currentTime=ba(a)}get speed(){const{resolved:a}=this;if(!a)return 1;const{animation:i}=a;return i.playbackRate}set speed(a){const{resolved:i}=this;if(!i)return;const{animation:o}=i;o.playbackRate=a}get state(){const{resolved:a}=this;if(!a)return"idle";const{animation:i}=a;return i.playState}get startTime(){const{resolved:a}=this;if(!a)return null;const{animation:i}=a;return i.startTime}attachTimeline(a){if(!this._resolved)this.pendingTimeline=a;else{const{resolved:i}=this;if(!i)return fn;const{animation:o}=i;qy(o,a)}return fn}play(){if(this.isStopped)return;const{resolved:a}=this;if(!a)return;const{animation:i}=a;i.playState==="finished"&&this.updateFinishedPromise(),i.play()}pause(){const{resolved:a}=this;if(!a)return;const{animation:i}=a;i.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:a}=this;if(!a)return;const{animation:i,keyframes:o,duration:r,type:u,ease:d,times:p}=a;if(i.playState==="idle"||i.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:v,onComplete:y,element:_,...T}=this.options,E=new dh({...T,keyframes:o,duration:r,type:u,ease:d,times:p,isGenerator:!0}),j=ba(this.time);g.setWithVelocity(E.sample(j-Hr).value,E.sample(j).value,Hr)}const{onStop:m}=this.options;m&&m(),this.cancel()}complete(){const{resolved:a}=this;a&&a.animation.finish()}cancel(){const{resolved:a}=this;a&&a.animation.cancel()}static supports(a){const{motionValue:i,name:o,repeatDelay:r,repeatType:u,damping:d,type:p}=a;if(!i||!i.owner||!(i.owner.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:g}=i.owner.getProps();return fj()&&o&&uj.has(o)&&!m&&!g&&!r&&u!=="mirror"&&d!==0&&p!=="inertia"}}const yj={type:"spring",stiffness:500,damping:25,restSpeed:10},vj=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),bj={type:"keyframes",duration:.8},Sj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_j=(n,{keyframes:a})=>a.length>2?bj:Bs.has(n)?n.startsWith("scale")?vj(a[1]):yj:Sj;function xj({when:n,delay:a,delayChildren:i,staggerChildren:o,staggerDirection:r,repeat:u,repeatType:d,repeatDelay:p,from:m,elapsed:g,...v}){return!!Object.keys(v).length}const fh=(n,a,i,o={},r,u)=>d=>{const p=Qf(o,n)||{},m=p.delay||o.delay||0;let{elapsed:g=0}=o;g=g-ba(m);let v={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:a.getVelocity(),...p,delay:-g,onUpdate:_=>{a.set(_),p.onUpdate&&p.onUpdate(_)},onComplete:()=>{d(),p.onComplete&&p.onComplete()},name:n,motionValue:a,element:u?void 0:r};xj(p)||(v={...v,..._j(n,v)}),v.duration&&(v.duration=ba(v.duration)),v.repeatDelay&&(v.repeatDelay=ba(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let y=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(v.duration=0,v.delay===0&&(y=!0)),y&&!u&&a.get()!==void 0){const _=ic(v.keyframes,p);if(_!==void 0)return lt.update(()=>{v.onUpdate(_),v.onComplete()}),new eA([])}return!u&&av.supports(v)?new av(v):new dh(v)};function Tj({protectedKeys:n,needsAnimating:a},i){const o=n.hasOwnProperty(i)&&a[i]!==!0;return a[i]=!1,o}function Zb(n,a,{delay:i=0,transitionOverride:o,type:r}={}){var u;let{transition:d=n.getDefaultTransition(),transitionEnd:p,...m}=a;o&&(d=o);const g=[],v=r&&n.animationState&&n.animationState.getState()[r];for(const y in m){const _=n.getValue(y,(u=n.latestValues[y])!==null&&u!==void 0?u:null),T=m[y];if(T===void 0||v&&Tj(v,y))continue;const E={delay:i,...Qf(d||{},y)};let j=!1;if(window.MotionHandoffAnimation){const C=mb(n);if(C){const M=window.MotionHandoffAnimation(C,y,lt);M!==null&&(E.startTime=M,j=!0)}}ef(n,y),_.start(fh(y,_,T,n.shouldReduceMotion&&hb.has(y)?{type:!1}:E,n,j));const A=_.animation;A&&g.push(A)}return p&&Promise.all(g).then(()=>{lt.update(()=>{p&&XC(n,p)})}),g}function uf(n,a,i={}){var o;const r=sc(n,a,i.type==="exit"?(o=n.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(u=i.transitionOverride);const d=r?()=>Promise.all(Zb(n,r,i)):()=>Promise.resolve(),p=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:v=0,staggerChildren:y,staggerDirection:_}=u;return Ej(n,a,v+g,y,_,i)}:()=>Promise.resolve(),{when:m}=u;if(m){const[g,v]=m==="beforeChildren"?[d,p]:[p,d];return g().then(()=>v())}else return Promise.all([d(),p(i.delay)])}function Ej(n,a,i=0,o=0,r=1,u){const d=[],p=(n.variantChildren.size-1)*o,m=r===1?(g=0)=>g*o:(g=0)=>p-g*o;return Array.from(n.variantChildren).sort(Cj).forEach((g,v)=>{g.notify("AnimationStart",a),d.push(uf(g,a,{...u,delay:i+m(v)}).then(()=>g.notify("AnimationComplete",a)))}),Promise.all(d)}function Cj(n,a){return n.sortNodePosition(a)}function Aj(n,a,i={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const r=a.map(u=>uf(n,u,i));o=Promise.all(r)}else if(typeof a=="string")o=uf(n,a,i);else{const r=typeof a=="function"?sc(n,a,i.custom):a;o=Promise.all(Zb(n,r,i))}return o.then(()=>{n.notify("AnimationComplete",a)})}const jj=zf.length;function Xb(n){if(!n)return;if(!n.isControllingVariants){const i=n.parent?Xb(n.parent)||{}:{};return n.props.initial!==void 0&&(i.initial=n.props.initial),i}const a={};for(let i=0;i<jj;i++){const o=zf[i],r=n.props[o];(Yl(r)||r===!1)&&(a[o]=r)}return a}const Nj=[...If].reverse(),wj=If.length;function Dj(n){return a=>Promise.all(a.map(({animation:i,options:o})=>Aj(n,i,o)))}function kj(n){let a=Dj(n),i=sv(),o=!0;const r=m=>(g,v)=>{var y;const _=sc(n,v,m==="exit"?(y=n.presenceContext)===null||y===void 0?void 0:y.custom:void 0);if(_){const{transition:T,transitionEnd:E,...j}=_;g={...g,...j,...E}}return g};function u(m){a=m(n)}function d(m){const{props:g}=n,v=Xb(n.parent)||{},y=[],_=new Set;let T={},E=1/0;for(let A=0;A<wj;A++){const C=Nj[A],M=i[C],R=g[C]!==void 0?g[C]:v[C],Y=Yl(R),w=C===m?M.isActive:null;w===!1&&(E=A);let F=R===v[C]&&R!==g[C]&&Y;if(F&&o&&n.manuallyAnimateOnMount&&(F=!1),M.protectedKeys={...T},!M.isActive&&w===null||!R&&!M.prevProp||nc(R)||typeof R=="boolean")continue;const q=Mj(M.prevProp,R);let V=q||C===m&&M.isActive&&!F&&Y||A>E&&Y,W=!1;const ae=Array.isArray(R)?R:[R];let se=ae.reduce(r(C),{});w===!1&&(se={});const{prevResolvedValues:le={}}=M,z={...le,...se},K=G=>{V=!0,_.has(G)&&(W=!0,_.delete(G)),M.needsAnimating[G]=!0;const ee=n.getValue(G);ee&&(ee.liveStyle=!1)};for(const G in z){const ee=se[G],ge=le[G];if(T.hasOwnProperty(G))continue;let pe=!1;Wd(ee)&&Wd(ge)?pe=!fb(ee,ge):pe=ee!==ge,pe?ee!=null?K(G):_.add(G):ee!==void 0&&_.has(G)?K(G):M.protectedKeys[G]=!0}M.prevProp=R,M.prevResolvedValues=se,M.isActive&&(T={...T,...se}),o&&n.blockInitialAnimation&&(V=!1),V&&(!(F&&q)||W)&&y.push(...ae.map(G=>({animation:G,options:{type:C}})))}if(_.size){const A={};_.forEach(C=>{const M=n.getBaseTarget(C),R=n.getValue(C);R&&(R.liveStyle=!0),A[C]=M??null}),y.push({animation:A})}let j=!!y.length;return o&&(g.initial===!1||g.initial===g.animate)&&!n.manuallyAnimateOnMount&&(j=!1),o=!1,j?a(y):Promise.resolve()}function p(m,g){var v;if(i[m].isActive===g)return Promise.resolve();(v=n.variantChildren)===null||v===void 0||v.forEach(_=>{var T;return(T=_.animationState)===null||T===void 0?void 0:T.setActive(m,g)}),i[m].isActive=g;const y=d(m);for(const _ in i)i[_].protectedKeys={};return y}return{animateChanges:d,setActive:p,setAnimateFunction:u,getState:()=>i,reset:()=>{i=sv(),o=!0}}}function Mj(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!fb(a,n):!1}function Es(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sv(){return{animate:Es(!0),whileInView:Es(),whileHover:Es(),whileTap:Es(),whileDrag:Es(),whileFocus:Es(),exit:Es()}}class ss{constructor(a){this.isMounted=!1,this.node=a}update(){}}class Rj extends ss{constructor(a){super(a),a.animationState||(a.animationState=kj(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();nc(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:i}=this.node.prevProps||{};a!==i&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)===null||a===void 0||a.call(this)}}let Oj=0;class Bj extends ss{constructor(){super(...arguments),this.id=Oj++}update(){if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:i}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===o)return;const r=this.node.animationState.setActive("exit",!a);i&&!a&&r.then(()=>i(this.id))}mount(){const{register:a}=this.node.presenceContext||{};a&&(this.unmount=a(this.id))}unmount(){}}const Lj={animation:{Feature:Rj},exit:{Feature:Bj}},Ln={x:!1,y:!1};function Qb(){return Ln.x||Ln.y}function Uj(n){return n==="x"||n==="y"?Ln[n]?null:(Ln[n]=!0,()=>{Ln[n]=!1}):Ln.x||Ln.y?null:(Ln.x=Ln.y=!0,()=>{Ln.x=Ln.y=!1})}const hh=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function Ql(n,a,i,o={passive:!0}){return n.addEventListener(a,i,o),()=>n.removeEventListener(a,i)}function so(n){return{point:{x:n.pageX,y:n.pageY}}}const Ij=n=>a=>hh(a)&&n(a,so(a));function Vl(n,a,i,o){return Ql(n,a,Ij(i),o)}const iv=(n,a)=>Math.abs(n-a);function zj(n,a){const i=iv(n.x,a.x),o=iv(n.y,a.y);return Math.sqrt(i**2+o**2)}class Jb{constructor(a,i,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:u=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Od(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,T=zj(y.offset,{x:0,y:0})>=3;if(!_&&!T)return;const{point:E}=y,{timestamp:j}=Pt;this.history.push({...E,timestamp:j});const{onStart:A,onMove:C}=this.handlers;_||(A&&A(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,y)},this.handlePointerMove=(y,_)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=Rd(_,this.transformPagePoint),lt.update(this.updatePoint,!0)},this.handlePointerUp=(y,_)=>{this.end();const{onEnd:T,onSessionEnd:E,resumeAnimation:j}=this.handlers;if(this.dragSnapToOrigin&&j&&j(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=Od(y.type==="pointercancel"?this.lastMoveEventInfo:Rd(_,this.transformPagePoint),this.history);this.startEvent&&T&&T(y,A),E&&E(y,A)},!hh(a))return;this.dragSnapToOrigin=u,this.handlers=i,this.transformPagePoint=o,this.contextWindow=r||window;const d=so(a),p=Rd(d,this.transformPagePoint),{point:m}=p,{timestamp:g}=Pt;this.history=[{...m,timestamp:g}];const{onSessionStart:v}=i;v&&v(a,Od(p,this.history)),this.removeListeners=ao(Vl(this.contextWindow,"pointermove",this.handlePointerMove),Vl(this.contextWindow,"pointerup",this.handlePointerUp),Vl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),ts(this.updatePoint)}}function Rd(n,a){return a?{point:a(n.point)}:n}function lv(n,a){return{x:n.x-a.x,y:n.y-a.y}}function Od({point:n},a){return{point:n,delta:lv(n,Wb(a)),offset:lv(n,Vj(a)),velocity:Pj(a,.1)}}function Vj(n){return n[0]}function Wb(n){return n[n.length-1]}function Pj(n,a){if(n.length<2)return{x:0,y:0};let i=n.length-1,o=null;const r=Wb(n);for(;i>=0&&(o=n[i],!(r.timestamp-o.timestamp>ba(a)));)i--;if(!o)return{x:0,y:0};const u=Sa(r.timestamp-o.timestamp);if(u===0)return{x:0,y:0};const d={x:(r.x-o.x)/u,y:(r.y-o.y)/u};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}const e1=1e-4,Hj=1-e1,Gj=1+e1,t1=.01,Fj=0-t1,qj=0+t1;function hn(n){return n.max-n.min}function $j(n,a,i){return Math.abs(n-a)<=i}function ov(n,a,i,o=.5){n.origin=o,n.originPoint=ut(a.min,a.max,n.origin),n.scale=hn(i)/hn(a),n.translate=ut(i.min,i.max,n.origin)-n.originPoint,(n.scale>=Hj&&n.scale<=Gj||isNaN(n.scale))&&(n.scale=1),(n.translate>=Fj&&n.translate<=qj||isNaN(n.translate))&&(n.translate=0)}function Pl(n,a,i,o){ov(n.x,a.x,i.x,o?o.originX:void 0),ov(n.y,a.y,i.y,o?o.originY:void 0)}function rv(n,a,i){n.min=i.min+a.min,n.max=n.min+hn(a)}function Yj(n,a,i){rv(n.x,a.x,i.x),rv(n.y,a.y,i.y)}function cv(n,a,i){n.min=a.min-i.min,n.max=n.min+hn(a)}function Hl(n,a,i){cv(n.x,a.x,i.x),cv(n.y,a.y,i.y)}function Kj(n,{min:a,max:i},o){return a!==void 0&&n<a?n=o?ut(a,n,o.min):Math.max(n,a):i!==void 0&&n>i&&(n=o?ut(i,n,o.max):Math.min(n,i)),n}function uv(n,a,i){return{min:a!==void 0?n.min+a:void 0,max:i!==void 0?n.max+i-(n.max-n.min):void 0}}function Zj(n,{top:a,left:i,bottom:o,right:r}){return{x:uv(n.x,i,r),y:uv(n.y,a,o)}}function dv(n,a){let i=a.min-n.min,o=a.max-n.max;return a.max-a.min<n.max-n.min&&([i,o]=[o,i]),{min:i,max:o}}function Xj(n,a){return{x:dv(n.x,a.x),y:dv(n.y,a.y)}}function Qj(n,a){let i=.5;const o=hn(n),r=hn(a);return r>o?i=Di(a.min,a.max-o,n.min):o>r&&(i=Di(n.min,n.max-r,a.min)),xa(0,1,i)}function Jj(n,a){const i={};return a.min!==void 0&&(i.min=a.min-n.min),a.max!==void 0&&(i.max=a.max-n.min),i}const df=.35;function Wj(n=df){return n===!1?n=0:n===!0&&(n=df),{x:fv(n,"left","right"),y:fv(n,"top","bottom")}}function fv(n,a,i){return{min:hv(n,a),max:hv(n,i)}}function hv(n,a){return typeof n=="number"?n:n[a]||0}const pv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ci=()=>({x:pv(),y:pv()}),mv=()=>({min:0,max:0}),_t=()=>({x:mv(),y:mv()});function An(n){return[n("x"),n("y")]}function n1({top:n,left:a,right:i,bottom:o}){return{x:{min:a,max:i},y:{min:n,max:o}}}function e2({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function t2(n,a){if(!a)return n;const i=a({x:n.left,y:n.top}),o=a({x:n.right,y:n.bottom});return{top:i.y,left:i.x,bottom:o.y,right:o.x}}function Bd(n){return n===void 0||n===1}function ff({scale:n,scaleX:a,scaleY:i}){return!Bd(n)||!Bd(a)||!Bd(i)}function js(n){return ff(n)||a1(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function a1(n){return gv(n.x)||gv(n.y)}function gv(n){return n&&n!=="0%"}function Gr(n,a,i){const o=n-i,r=a*o;return i+r}function yv(n,a,i,o,r){return r!==void 0&&(n=Gr(n,r,o)),Gr(n,i,o)+a}function hf(n,a=0,i=1,o,r){n.min=yv(n.min,a,i,o,r),n.max=yv(n.max,a,i,o,r)}function s1(n,{x:a,y:i}){hf(n.x,a.translate,a.scale,a.originPoint),hf(n.y,i.translate,i.scale,i.originPoint)}const vv=.999999999999,bv=1.0000000000001;function n2(n,a,i,o=!1){const r=i.length;if(!r)return;a.x=a.y=1;let u,d;for(let p=0;p<r;p++){u=i[p],d=u.projectionDelta;const{visualElement:m}=u.options;m&&m.props.style&&m.props.style.display==="contents"||(o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ji(n,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),d&&(a.x*=d.x.scale,a.y*=d.y.scale,s1(n,d)),o&&js(u.latestValues)&&ji(n,u.latestValues))}a.x<bv&&a.x>vv&&(a.x=1),a.y<bv&&a.y>vv&&(a.y=1)}function Ai(n,a){n.min=n.min+a,n.max=n.max+a}function Sv(n,a,i,o,r=.5){const u=ut(n.min,n.max,r);hf(n,a,i,u,o)}function ji(n,a){Sv(n.x,a.x,a.scaleX,a.scale,a.originX),Sv(n.y,a.y,a.scaleY,a.scale,a.originY)}function i1(n,a){return n1(t2(n.getBoundingClientRect(),a))}function a2(n,a,i){const o=i1(n,i),{scroll:r}=a;return r&&(Ai(o.x,r.offset.x),Ai(o.y,r.offset.y)),o}const l1=({current:n})=>n?n.ownerDocument.defaultView:null,s2=new WeakMap;class i2{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_t(),this.visualElement=a}start(a,{snapToCursor:i=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=v=>{const{dragSnapToOrigin:y}=this.getProps();y?this.pauseAnimation():this.stopAnimation(),i&&this.snapToCursor(so(v).point)},u=(v,y)=>{const{drag:_,dragPropagation:T,onDragStart:E}=this.getProps();if(_&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Uj(_),!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),An(A=>{let C=this.getAxisMotionValue(A).get()||0;if(Kn.test(C)){const{projection:M}=this.visualElement;if(M&&M.layout){const R=M.layout.layoutBox[A];R&&(C=hn(R)*(parseFloat(C)/100))}}this.originPoint[A]=C}),E&&lt.postRender(()=>E(v,y)),ef(this.visualElement,"transform");const{animationState:j}=this.visualElement;j&&j.setActive("whileDrag",!0)},d=(v,y)=>{const{dragPropagation:_,dragDirectionLock:T,onDirectionLock:E,onDrag:j}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:A}=y;if(T&&this.currentDirection===null){this.currentDirection=l2(A),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",y.point,A),this.updateAxis("y",y.point,A),this.visualElement.render(),j&&j(v,y)},p=(v,y)=>this.stop(v,y),m=()=>An(v=>{var y;return this.getAnimationState(v)==="paused"&&((y=this.getAxisMotionValue(v).animation)===null||y===void 0?void 0:y.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new Jb(a,{onSessionStart:r,onStart:u,onMove:d,onSessionEnd:p,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:l1(this.visualElement)})}stop(a,i){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:u}=this.getProps();u&&lt.postRender(()=>u(a,i))}cancel(){this.isDragging=!1;const{projection:a,animationState:i}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(a,i,o){const{drag:r}=this.getProps();if(!o||!Cr(a,r,this.currentDirection))return;const u=this.getAxisMotionValue(a);let d=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(d=Kj(d,this.constraints[a],this.elastic[a])),u.set(d)}resolveConstraints(){var a;const{dragConstraints:i,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)===null||a===void 0?void 0:a.layout,u=this.constraints;i&&Ti(i)?this.constraints||(this.constraints=this.resolveRefConstraints()):i&&r?this.constraints=Zj(r.layoutBox,i):this.constraints=!1,this.elastic=Wj(o),u!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&An(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=Jj(r.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:i}=this.getProps();if(!a||!Ti(a))return!1;const o=a.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const u=a2(o,r.root,this.visualElement.getTransformPagePoint());let d=Xj(r.layout.layoutBox,u);if(i){const p=i(e2(d));this.hasMutatedConstraints=!!p,p&&(d=n1(p))}return d}startAnimation(a){const{drag:i,dragMomentum:o,dragElastic:r,dragTransition:u,dragSnapToOrigin:d,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},g=An(v=>{if(!Cr(v,i,this.currentDirection))return;let y=m&&m[v]||{};d&&(y={min:0,max:0});const _=r?200:1e6,T=r?40:1e7,E={type:"inertia",velocity:o?a[v]:0,bounceStiffness:_,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...u,...y};return this.startAxisValueAnimation(v,E)});return Promise.all(g).then(p)}startAxisValueAnimation(a,i){const o=this.getAxisMotionValue(a);return ef(this.visualElement,a),o.start(fh(a,o,0,i,this.visualElement,!1))}stopAnimation(){An(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){An(a=>{var i;return(i=this.getAxisMotionValue(a).animation)===null||i===void 0?void 0:i.pause()})}getAnimationState(a){var i;return(i=this.getAxisMotionValue(a).animation)===null||i===void 0?void 0:i.state}getAxisMotionValue(a){const i=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),r=o[i];return r||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){An(i=>{const{drag:o}=this.getProps();if(!Cr(i,o,this.currentDirection))return;const{projection:r}=this.visualElement,u=this.getAxisMotionValue(i);if(r&&r.layout){const{min:d,max:p}=r.layout.layoutBox[i];u.set(a[i]-ut(d,p,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:i}=this.getProps(),{projection:o}=this.visualElement;if(!Ti(i)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};An(d=>{const p=this.getAxisMotionValue(d);if(p&&this.constraints!==!1){const m=p.get();r[d]=Qj({min:m,max:m},this.constraints[d])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),An(d=>{if(!Cr(d,a,null))return;const p=this.getAxisMotionValue(d),{min:m,max:g}=this.constraints[d];p.set(ut(m,g,r[d]))})}addListeners(){if(!this.visualElement.current)return;s2.set(this.visualElement,this);const a=this.visualElement.current,i=Vl(a,"pointerdown",m=>{const{drag:g,dragListener:v=!0}=this.getProps();g&&v&&this.start(m)}),o=()=>{const{dragConstraints:m}=this.getProps();Ti(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,u=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),lt.read(o);const d=Ql(window,"resize",()=>this.scalePositionWithinConstraints()),p=r.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:g})=>{this.isDragging&&g&&(An(v=>{const y=this.getAxisMotionValue(v);y&&(this.originPoint[v]+=m[v].translate,y.set(y.get()+m[v].translate))}),this.visualElement.render())}));return()=>{d(),i(),u(),p&&p()}}getProps(){const a=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:u=!1,dragElastic:d=df,dragMomentum:p=!0}=a;return{...a,drag:i,dragDirectionLock:o,dragPropagation:r,dragConstraints:u,dragElastic:d,dragMomentum:p}}}function Cr(n,a,i){return(a===!0||a===n)&&(i===null||i===n)}function l2(n,a=10){let i=null;return Math.abs(n.y)>a?i="y":Math.abs(n.x)>a&&(i="x"),i}class o2 extends ss{constructor(a){super(a),this.removeGroupControls=fn,this.removeListeners=fn,this.controls=new i2(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fn}unmount(){this.removeGroupControls(),this.removeListeners()}}const _v=n=>(a,i)=>{n&&lt.postRender(()=>n(a,i))};class r2 extends ss{constructor(){super(...arguments),this.removePointerDownListener=fn}onPointerDown(a){this.session=new Jb(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:l1(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:i,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:_v(a),onStart:_v(i),onMove:o,onEnd:(u,d)=>{delete this.session,r&&lt.postRender(()=>r(u,d))}}}mount(){this.removePointerDownListener=Vl(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Br={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function xv(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const kl={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(be.test(n))n=parseFloat(n);else return n;const i=xv(n,a.target.x),o=xv(n,a.target.y);return`${i}% ${o}%`}},c2={correct:(n,{treeScale:a,projectionDelta:i})=>{const o=n,r=ns.parse(n);if(r.length>5)return o;const u=ns.createTransformer(n),d=typeof r[0]!="number"?1:0,p=i.x.scale*a.x,m=i.y.scale*a.y;r[0+d]/=p,r[1+d]/=m;const g=ut(p,m,.5);return typeof r[2+d]=="number"&&(r[2+d]/=g),typeof r[3+d]=="number"&&(r[3+d]/=g),u(r)}};class u2 extends S.Component{componentDidMount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:o,layoutId:r}=this.props,{projection:u}=a;LC(d2),u&&(i.group&&i.group.add(u),o&&o.register&&r&&o.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,onExitComplete:()=>this.safeToRemove()})),Br.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:i,visualElement:o,drag:r,isPresent:u}=this.props,d=o.projection;return d&&(d.isPresent=u,r||a.layoutDependency!==i||i===void 0?d.willUpdate():this.safeToRemove(),a.isPresent!==u&&(u?d.promote():d.relegate()||lt.postRender(()=>{const p=d.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),Pf.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:o}=this.props,{projection:r}=a;r&&(r.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function o1(n){const[a,i]=q0(),o=S.useContext(Of);return h.jsx(u2,{...n,layoutGroup:o,switchLayoutGroup:S.useContext(W0),isPresent:a,safeToRemove:i})}const d2={borderRadius:{...kl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:kl,borderTopRightRadius:kl,borderBottomLeftRadius:kl,borderBottomRightRadius:kl,boxShadow:c2};function f2(n,a,i){const o=Ft(n)?n:Zl(n);return o.start(fh("",o,a,i)),o.animation}function h2(n){return n instanceof SVGElement&&n.tagName!=="svg"}const p2=(n,a)=>n.depth-a.depth;class m2{constructor(){this.children=[],this.isDirty=!1}add(a){Jf(this.children,a),this.isDirty=!0}remove(a){Wf(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(p2),this.isDirty=!1,this.children.forEach(a)}}function g2(n,a){const i=Zn.now(),o=({timestamp:r})=>{const u=r-i;u>=a&&(ts(o),n(u-a))};return lt.read(o,!0),()=>ts(o)}const r1=["TopLeft","TopRight","BottomLeft","BottomRight"],y2=r1.length,Tv=n=>typeof n=="string"?parseFloat(n):n,Ev=n=>typeof n=="number"||be.test(n);function v2(n,a,i,o,r,u){r?(n.opacity=ut(0,i.opacity!==void 0?i.opacity:1,b2(o)),n.opacityExit=ut(a.opacity!==void 0?a.opacity:1,0,S2(o))):u&&(n.opacity=ut(a.opacity!==void 0?a.opacity:1,i.opacity!==void 0?i.opacity:1,o));for(let d=0;d<y2;d++){const p=`border${r1[d]}Radius`;let m=Cv(a,p),g=Cv(i,p);if(m===void 0&&g===void 0)continue;m||(m=0),g||(g=0),m===0||g===0||Ev(m)===Ev(g)?(n[p]=Math.max(ut(Tv(m),Tv(g),o),0),(Kn.test(g)||Kn.test(m))&&(n[p]+="%")):n[p]=g}(a.rotate||i.rotate)&&(n.rotate=ut(a.rotate||0,i.rotate||0,o))}function Cv(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const b2=c1(0,.5,Cb),S2=c1(.5,.95,fn);function c1(n,a,i){return o=>o<n?0:o>a?1:i(Di(n,a,o))}function Av(n,a){n.min=a.min,n.max=a.max}function Cn(n,a){Av(n.x,a.x),Av(n.y,a.y)}function jv(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}function Nv(n,a,i,o,r){return n-=a,n=Gr(n,1/i,o),r!==void 0&&(n=Gr(n,1/r,o)),n}function _2(n,a=0,i=1,o=.5,r,u=n,d=n){if(Kn.test(a)&&(a=parseFloat(a),a=ut(d.min,d.max,a/100)-d.min),typeof a!="number")return;let p=ut(u.min,u.max,o);n===u&&(p-=a),n.min=Nv(n.min,a,i,p,r),n.max=Nv(n.max,a,i,p,r)}function wv(n,a,[i,o,r],u,d){_2(n,a[i],a[o],a[r],a.scale,u,d)}const x2=["x","scaleX","originX"],T2=["y","scaleY","originY"];function Dv(n,a,i,o){wv(n.x,a,x2,i?i.x:void 0,o?o.x:void 0),wv(n.y,a,T2,i?i.y:void 0,o?o.y:void 0)}function kv(n){return n.translate===0&&n.scale===1}function u1(n){return kv(n.x)&&kv(n.y)}function Mv(n,a){return n.min===a.min&&n.max===a.max}function E2(n,a){return Mv(n.x,a.x)&&Mv(n.y,a.y)}function Rv(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function d1(n,a){return Rv(n.x,a.x)&&Rv(n.y,a.y)}function Ov(n){return hn(n.x)/hn(n.y)}function Bv(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}class C2{constructor(){this.members=[]}add(a){Jf(this.members,a),a.scheduleRender()}remove(a){if(Wf(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(a){const i=this.members.findIndex(r=>a===r);if(i===0)return!1;let o;for(let r=i;r>=0;r--){const u=this.members[r];if(u.isPresent!==!1){o=u;break}}return o?(this.promote(o),!0):!1}promote(a,i){const o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.instance&&o.scheduleRender(),a.scheduleRender(),a.resumeFrom=o,i&&(a.resumeFrom.preserveOpacity=!0),o.snapshot&&(a.snapshot=o.snapshot,a.snapshot.latestValues=o.animationValues||o.latestValues),a.root&&a.root.isUpdating&&(a.isLayoutDirty=!0);const{crossfade:r}=a.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(a=>{const{options:i,resumingFrom:o}=a;i.onExitComplete&&i.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(a=>{a.instance&&a.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function A2(n,a,i){let o="";const r=n.x.translate/a.x,u=n.y.translate/a.y,d=(i==null?void 0:i.z)||0;if((r||u||d)&&(o=`translate3d(${r}px, ${u}px, ${d}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),i){const{transformPerspective:g,rotate:v,rotateX:y,rotateY:_,skewX:T,skewY:E}=i;g&&(o=`perspective(${g}px) ${o}`),v&&(o+=`rotate(${v}deg) `),y&&(o+=`rotateX(${y}deg) `),_&&(o+=`rotateY(${_}deg) `),T&&(o+=`skewX(${T}deg) `),E&&(o+=`skewY(${E}deg) `)}const p=n.x.scale*a.x,m=n.y.scale*a.y;return(p!==1||m!==1)&&(o+=`scale(${p}, ${m})`),o||"none"}const Ns={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ll=typeof window<"u"&&window.MotionDebug!==void 0,Ld=["","X","Y","Z"],j2={visibility:"hidden"},Lv=1e3;let N2=0;function Ud(n,a,i,o){const{latestValues:r}=a;r[n]&&(i[n]=r[n],a.setStaticValue(n,0),o&&(o[n]=0))}function f1(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const i=mb(a);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:r,layoutId:u}=n.options;window.MotionCancelOptimisedAnimation(i,"transform",lt,!(r||u))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&f1(o)}function h1({attachResizeListener:n,defaultParent:a,measureScroll:i,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(d={},p=a==null?void 0:a()){this.id=N2++,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,Ll&&(Ns.totalNodes=Ns.resolvedTargetDeltas=Ns.recalculatedProjection=0),this.nodes.forEach(k2),this.nodes.forEach(L2),this.nodes.forEach(U2),this.nodes.forEach(M2),Ll&&window.MotionDebug.record(Ns)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new m2)}addEventListener(d,p){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new eh),this.eventHandlers.get(d).add(p)}notifyListeners(d,...p){const m=this.eventHandlers.get(d);m&&m.notify(...p)}hasListeners(d){return this.eventHandlers.has(d)}mount(d,p=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=h2(d),this.instance=d;const{layoutId:m,layout:g,visualElement:v}=this.options;if(v&&!v.current&&v.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),p&&(g||m)&&(this.isLayoutDirty=!0),n){let y;const _=()=>this.root.updateBlockedByResize=!1;n(d,()=>{this.root.updateBlockedByResize=!0,y&&y(),y=g2(_,250),Br.hasAnimatedSinceResize&&(Br.hasAnimatedSinceResize=!1,this.nodes.forEach(Iv))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&v&&(m||g)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:_,hasRelativeTargetChanged:T,layout:E})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const j=this.options.transition||v.getDefaultTransition()||H2,{onLayoutAnimationStart:A,onLayoutAnimationComplete:C}=v.getProps(),M=!this.targetLayout||!d1(this.targetLayout,E)||T,R=!_&&T;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||R||_&&(M||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(y,R);const Y={...Qf(j,"layout"),onPlay:A,onComplete:C};(v.shouldReduceMotion||this.options.layoutRoot)&&(Y.delay=0,Y.type=!1),this.startAnimation(Y)}else _||Iv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=E})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ts(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(I2),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&f1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v<this.path.length;v++){const y=this.path[v];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:p,layout:m}=this.options;if(p===void 0&&!m)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Uv);return}this.isUpdating||this.nodes.forEach(O2),this.isUpdating=!1,this.nodes.forEach(B2),this.nodes.forEach(w2),this.nodes.forEach(D2),this.clearAllSnapshots();const p=Zn.now();Pt.delta=xa(0,1e3/60,p-Pt.timestamp),Pt.timestamp=p,Pt.isProcessing=!0,Nd.update.process(Pt),Nd.preRender.process(Pt),Nd.render.process(Pt),Pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Pf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(R2),this.sharedNodes.forEach(z2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,lt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){lt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let m=0;m<this.path.length;m++)this.path[m].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutCorrected=_t(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(p=!1),p){const m=o(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:m,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!r)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!u1(this.projectionDelta),m=this.getTransformTemplate(),g=m?m(this.latestValues,""):void 0,v=g!==this.prevTransformTemplateValue;d&&(p||js(this.latestValues)||v)&&(r(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const p=this.measurePageBox();let m=this.removeElementScroll(p);return d&&(m=this.removeTransform(m)),G2(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:p}=this.options;if(!p)return _t();const m=p.measureViewportBox();if(!(((d=this.scroll)===null||d===void 0?void 0:d.wasRoot)||this.path.some(F2))){const{scroll:v}=this.root;v&&(Ai(m.x,v.offset.x),Ai(m.y,v.offset.y))}return m}removeElementScroll(d){var p;const m=_t();if(Cn(m,d),!((p=this.scroll)===null||p===void 0)&&p.wasRoot)return m;for(let g=0;g<this.path.length;g++){const v=this.path[g],{scroll:y,options:_}=v;v!==this.root&&y&&_.layoutScroll&&(y.wasRoot&&Cn(m,d),Ai(m.x,y.offset.x),Ai(m.y,y.offset.y))}return m}applyTransform(d,p=!1){const m=_t();Cn(m,d);for(let g=0;g<this.path.length;g++){const v=this.path[g];!p&&v.options.layoutScroll&&v.scroll&&v!==v.root&&ji(m,{x:-v.scroll.offset.x,y:-v.scroll.offset.y}),js(v.latestValues)&&ji(m,v.latestValues)}return js(this.latestValues)&&ji(m,this.latestValues),m}removeTransform(d){const p=_t();Cn(p,d);for(let m=0;m<this.path.length;m++){const g=this.path[m];if(!g.instance||!js(g.latestValues))continue;ff(g.latestValues)&&g.updateSnapshot();const v=_t(),y=g.measurePageBox();Cn(v,y),Dv(p,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,v)}return js(this.latestValues)&&Dv(p,this.latestValues),p}setTargetDelta(d){this.targetDelta=d,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(d){this.options={...this.options,...d,crossfade:d.crossfade!==void 0?d.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Pt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){var p;const m=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=m.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=m.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=m.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==m;if(!(d||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((p=this.parent)===null||p===void 0)&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:y,layoutId:_}=this.options;if(!(!this.layout||!(y||_))){if(this.resolvedRelativeTargetAt=Pt.timestamp,!this.targetDelta&&!this.relativeTarget){const T=this.getClosestProjectingParent();T&&T.layout&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_t(),this.relativeTargetOrigin=_t(),Hl(this.relativeTargetOrigin,this.layout.layoutBox,T.layout.layoutBox),Cn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=_t(),this.targetWithTransforms=_t()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Yj(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Cn(this.target,this.layout.layoutBox),s1(this.target,this.targetDelta)):Cn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const T=this.getClosestProjectingParent();T&&!!T.resumingFrom==!!this.resumingFrom&&!T.options.layoutScroll&&T.target&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_t(),this.relativeTargetOrigin=_t(),Hl(this.relativeTargetOrigin,this.target,T.target),Cn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ll&&Ns.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ff(this.parent.latestValues)||a1(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var d;const p=this.getLead(),m=!!this.resumingFrom||this!==p;let g=!0;if((this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty)&&(g=!1),m&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===Pt.timestamp&&(g=!1),g)return;const{layout:v,layoutId:y}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(v||y))return;Cn(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,T=this.treeScale.y;n2(this.layoutCorrected,this.treeScale,this.path,m),p.layout&&!p.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(p.target=p.layout.layoutBox,p.targetWithTransforms=_t());const{target:E}=p;if(!E){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(jv(this.prevProjectionDelta.x,this.projectionDelta.x),jv(this.prevProjectionDelta.y,this.projectionDelta.y)),Pl(this.projectionDelta,this.layoutCorrected,E,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==T||!Bv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Bv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",E)),Ll&&Ns.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){var p;if((p=this.options.visualElement)===null||p===void 0||p.scheduleRender(),d){const m=this.getStack();m&&m.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ci(),this.projectionDelta=Ci(),this.projectionDeltaWithTransform=Ci()}setAnimationOrigin(d,p=!1){const m=this.snapshot,g=m?m.latestValues:{},v={...this.latestValues},y=Ci();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const _=_t(),T=m?m.source:void 0,E=this.layout?this.layout.source:void 0,j=T!==E,A=this.getStack(),C=!A||A.members.length<=1,M=!!(j&&!C&&this.options.crossfade===!0&&!this.path.some(P2));this.animationProgress=0;let R;this.mixTargetDelta=Y=>{const w=Y/1e3;zv(y.x,d.x,w),zv(y.y,d.y,w),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Hl(_,this.layout.layoutBox,this.relativeParent.layout.layoutBox),V2(this.relativeTarget,this.relativeTargetOrigin,_,w),R&&E2(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=_t()),Cn(R,this.relativeTarget)),j&&(this.animationValues=v,v2(v,g,this.latestValues,w,M,C)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ts(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=lt.update(()=>{Br.hasAnimatedSinceResize=!0,this.currentAnimation=f2(0,Lv,{...d,onUpdate:p=>{this.mixTargetDelta(p),d.onUpdate&&d.onUpdate(p)},onComplete:()=>{d.onComplete&&d.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Lv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:p,target:m,layout:g,latestValues:v}=d;if(!(!p||!m||!g)){if(this!==d&&this.layout&&g&&p1(this.options.animationType,this.layout.layoutBox,g.layoutBox)){m=this.target||_t();const y=hn(this.layout.layoutBox.x);m.x.min=d.target.x.min,m.x.max=m.x.min+y;const _=hn(this.layout.layoutBox.y);m.y.min=d.target.y.min,m.y.max=m.y.min+_}Cn(p,m),ji(p,v),Pl(this.projectionDeltaWithTransform,this.layoutCorrected,p,v)}}registerSharedNode(d,p){this.sharedNodes.has(d)||this.sharedNodes.set(d,new C2),this.sharedNodes.get(d).add(p);const g=p.options.initialPromotionConfig;p.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(p):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){var d;const{layoutId:p}=this.options;return p?((d=this.getStack())===null||d===void 0?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:p}=this.options;return p?(d=this.getStack())===null||d===void 0?void 0:d.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:p,preserveFollowOpacity:m}={}){const g=this.getStack();g&&g.promote(this,m),d&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let p=!1;const{latestValues:m}=d;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const g={};m.z&&Ud("z",d,g,this.animationValues);for(let v=0;v<Ld.length;v++)Ud(`rotate${Ld[v]}`,d,g,this.animationValues),Ud(`skew${Ld[v]}`,d,g,this.animationValues);d.render();for(const v in g)d.setStaticValue(v,g[v]),this.animationValues&&(this.animationValues[v]=g[v]);d.scheduleRender()}getProjectionStyles(d){var p,m;if(!this.instance||this.isSVG)return;if(!this.isVisible)return j2;const g={visibility:""},v=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=Rr(d==null?void 0:d.pointerEvents)||"",g.transform=v?v(this.latestValues,""):"none",g;const y=this.getLead();if(!this.projectionDelta||!this.layout||!y.target){const j={};return this.options.layoutId&&(j.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,j.pointerEvents=Rr(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!js(this.latestValues)&&(j.transform=v?v({},""):"none",this.hasProjected=!1),j}const _=y.animationValues||y.latestValues;this.applyTransformsToTarget(),g.transform=A2(this.projectionDeltaWithTransform,this.treeScale,_),v&&(g.transform=v(_,g.transform));const{x:T,y:E}=this.projectionDelta;g.transformOrigin=`${T.origin*100}% ${E.origin*100}% 0`,y.animationValues?g.opacity=y===this?(m=(p=_.opacity)!==null&&p!==void 0?p:this.latestValues.opacity)!==null&&m!==void 0?m:1:this.preserveOpacity?this.latestValues.opacity:_.opacityExit:g.opacity=y===this?_.opacity!==void 0?_.opacity:"":_.opacityExit!==void 0?_.opacityExit:0;for(const j in Ir){if(_[j]===void 0)continue;const{correct:A,applyTo:C}=Ir[j],M=g.transform==="none"?_[j]:A(_[j],y);if(C){const R=C.length;for(let Y=0;Y<R;Y++)g[C[Y]]=M}else g[j]=M}return this.options.layoutId&&(g.pointerEvents=y===this?Rr(d==null?void 0:d.pointerEvents)||"":"none"),g}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>{var p;return(p=d.currentAnimation)===null||p===void 0?void 0:p.stop()}),this.root.nodes.forEach(Uv),this.root.sharedNodes.clear()}}}function w2(n){n.updateLayout()}function D2(n){var a;const i=((a=n.resumeFrom)===null||a===void 0?void 0:a.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&i&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=n.layout,{animationType:u}=n.options,d=i.source!==n.layout.source;u==="size"?An(y=>{const _=d?i.measuredBox[y]:i.layoutBox[y],T=hn(_);_.min=o[y].min,_.max=_.min+T}):p1(u,i.layoutBox,o)&&An(y=>{const _=d?i.measuredBox[y]:i.layoutBox[y],T=hn(o[y]);_.max=_.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[y].max=n.relativeTarget[y].min+T)});const p=Ci();Pl(p,o,i.layoutBox);const m=Ci();d?Pl(m,n.applyTransform(r,!0),i.measuredBox):Pl(m,o,i.layoutBox);const g=!u1(p);let v=!1;if(!n.resumeFrom){const y=n.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:_,layout:T}=y;if(_&&T){const E=_t();Hl(E,i.layoutBox,_.layoutBox);const j=_t();Hl(j,o,T.layoutBox),d1(E,j)||(v=!0),y.options.layoutRoot&&(n.relativeTarget=j,n.relativeTargetOrigin=E,n.relativeParent=y)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:m,layoutDelta:p,hasLayoutChanged:g,hasRelativeTargetChanged:v})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function k2(n){Ll&&Ns.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function M2(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function R2(n){n.clearSnapshot()}function Uv(n){n.clearMeasurements()}function O2(n){n.isLayoutDirty=!1}function B2(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function Iv(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function L2(n){n.resolveTargetDelta()}function U2(n){n.calcProjection()}function I2(n){n.resetSkewAndRotation()}function z2(n){n.removeLeadSnapshot()}function zv(n,a,i){n.translate=ut(a.translate,0,i),n.scale=ut(a.scale,1,i),n.origin=a.origin,n.originPoint=a.originPoint}function Vv(n,a,i,o){n.min=ut(a.min,i.min,o),n.max=ut(a.max,i.max,o)}function V2(n,a,i,o){Vv(n.x,a.x,i.x,o),Vv(n.y,a.y,i.y,o)}function P2(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const H2={duration:.45,ease:[.4,0,.1,1]},Pv=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),Hv=Pv("applewebkit/")&&!Pv("chrome/")?Math.round:fn;function Gv(n){n.min=Hv(n.min),n.max=Hv(n.max)}function G2(n){Gv(n.x),Gv(n.y)}function p1(n,a,i){return n==="position"||n==="preserve-aspect"&&!$j(Ov(a),Ov(i),.2)}function F2(n){var a;return n!==n.root&&((a=n.scroll)===null||a===void 0?void 0:a.wasRoot)}const q2=h1({attachResizeListener:(n,a)=>Ql(n,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Id={current:void 0},m1=h1({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Id.current){const n=new q2({});n.mount(window),n.setOptions({layoutScroll:!0}),Id.current=n}return Id.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),$2={pan:{Feature:r2},drag:{Feature:o2,ProjectionNode:m1,MeasureLayout:o1}};function Y2(n,a,i){var o;if(n instanceof Element)return[n];if(typeof n=="string"){let r=document;const u=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n)}function g1(n,a){const i=Y2(n),o=new AbortController,r={passive:!0,...a,signal:o.signal};return[i,r,()=>o.abort()]}function Fv(n){return a=>{a.pointerType==="touch"||Qb()||n(a)}}function K2(n,a,i={}){const[o,r,u]=g1(n,i),d=Fv(p=>{const{target:m}=p,g=a(p);if(typeof g!="function"||!m)return;const v=Fv(y=>{g(y),m.removeEventListener("pointerleave",v)});m.addEventListener("pointerleave",v,r)});return o.forEach(p=>{p.addEventListener("pointerenter",d,r)}),u}function qv(n,a,i){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",i==="Start");const r="onHover"+i,u=o[r];u&&lt.postRender(()=>u(a,so(a)))}class Z2 extends ss{mount(){const{current:a}=this.node;a&&(this.unmount=K2(a,i=>(qv(this.node,i,"Start"),o=>qv(this.node,o,"End"))))}unmount(){}}class X2 extends ss{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ao(Ql(this.node.current,"focus",()=>this.onFocus()),Ql(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const y1=(n,a)=>a?n===a?!0:y1(n,a.parentElement):!1,Q2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function J2(n){return Q2.has(n.tagName)||n.tabIndex!==-1}const Ul=new WeakSet;function $v(n){return a=>{a.key==="Enter"&&n(a)}}function zd(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const W2=(n,a)=>{const i=n.currentTarget;if(!i)return;const o=$v(()=>{if(Ul.has(i))return;zd(i,"down");const r=$v(()=>{zd(i,"up")}),u=()=>zd(i,"cancel");i.addEventListener("keyup",r,a),i.addEventListener("blur",u,a)});i.addEventListener("keydown",o,a),i.addEventListener("blur",()=>i.removeEventListener("keydown",o),a)};function Yv(n){return hh(n)&&!Qb()}function eN(n,a,i={}){const[o,r,u]=g1(n,i),d=p=>{const m=p.currentTarget;if(!Yv(p)||Ul.has(m))return;Ul.add(m);const g=a(p),v=(T,E)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",_),!(!Yv(T)||!Ul.has(m))&&(Ul.delete(m),typeof g=="function"&&g(T,{success:E}))},y=T=>{v(T,i.useGlobalTarget||y1(m,T.target))},_=T=>{v(T,!1)};window.addEventListener("pointerup",y,r),window.addEventListener("pointercancel",_,r)};return o.forEach(p=>{!J2(p)&&p.getAttribute("tabindex")===null&&(p.tabIndex=0),(i.useGlobalTarget?window:p).addEventListener("pointerdown",d,r),p.addEventListener("focus",g=>W2(g,r),r)}),u}function Kv(n,a,i){const{props:o}=n;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",i==="Start");const r="onTap"+(i==="End"?"":i),u=o[r];u&&lt.postRender(()=>u(a,so(a)))}class tN extends ss{mount(){const{current:a}=this.node;a&&(this.unmount=eN(a,i=>(Kv(this.node,i,"Start"),(o,{success:r})=>Kv(this.node,o,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const pf=new WeakMap,Vd=new WeakMap,nN=n=>{const a=pf.get(n.target);a&&a(n)},aN=n=>{n.forEach(nN)};function sN({root:n,...a}){const i=n||document;Vd.has(i)||Vd.set(i,{});const o=Vd.get(i),r=JSON.stringify(a);return o[r]||(o[r]=new IntersectionObserver(aN,{root:n,...a})),o[r]}function iN(n,a,i){const o=sN(a);return pf.set(n,i),o.observe(n),()=>{pf.delete(n),o.unobserve(n)}}const lN={some:0,all:1};class oN extends ss{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:a={}}=this.node.getProps(),{root:i,margin:o,amount:r="some",once:u}=a,d={root:i?i.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:lN[r]},p=m=>{const{isIntersecting:g}=m;if(this.isInView===g||(this.isInView=g,u&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:v,onViewportLeave:y}=this.node.getProps(),_=g?v:y;_&&_(m)};return iN(this.node.current,d,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:i}=this.node;["amount","margin","root"].some(rN(a,i))&&this.startObserver()}unmount(){}}function rN({viewport:n={}},{viewport:a={}}={}){return i=>n[i]!==a[i]}const cN={inView:{Feature:oN},tap:{Feature:tN},focus:{Feature:X2},hover:{Feature:Z2}},uN={layout:{ProjectionNode:m1,MeasureLayout:o1}},Fr={current:null},ph={current:!1};function v1(){if(ph.current=!0,!!Uf)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>Fr.current=n.matches;n.addListener(a),a()}else Fr.current=!1}const dN=[...zb,Gt,ns],fN=n=>dN.find(Ib(n)),Zv=new WeakMap;function hN(n,a,i){for(const o in a){const r=a[o],u=i[o];if(Ft(r))n.addValue(o,r);else if(Ft(u))n.addValue(o,Zl(r,{owner:n}));else if(u!==r)if(n.hasValue(o)){const d=n.getValue(o);d.liveStyle===!0?d.jump(r):d.hasAnimated||d.set(r)}else{const d=n.getStaticValue(o);n.addValue(o,Zl(d!==void 0?d:r,{owner:n}))}}for(const o in i)a[o]===void 0&&n.removeValue(o);return a}const Xv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class pN{scrapeMotionValuesFromProps(a,i,o){return{}}constructor({parent:a,props:i,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:u,visualState:d},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ch,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const T=Zn.now();this.renderScheduledAt<T&&(this.renderScheduledAt=T,lt.render(this.render,!1,!0))};const{latestValues:m,renderState:g,onUpdate:v}=d;this.onUpdate=v,this.latestValues=m,this.baseTarget={...m},this.initialValues=i.initial?{...m}:{},this.renderState=g,this.parent=a,this.props=i,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=r,this.options=p,this.blockInitialAnimation=!!u,this.isControllingVariants=ac(i),this.isVariantNode=Q0(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:y,..._}=this.scrapeMotionValuesFromProps(i,{},this);for(const T in _){const E=_[T];m[T]!==void 0&&Ft(E)&&E.set(m[T],!1)}}mount(a){this.current=a,Zv.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,o)=>this.bindToMotionValue(o,i)),ph.current||v1(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Fr.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Zv.delete(this.current),this.projection&&this.projection.unmount(),ts(this.notifyUpdate),ts(this.render),this.valueSubscriptions.forEach(a=>a()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const a in this.events)this.events[a].clear();for(const a in this.features){const i=this.features[a];i&&(i.unmount(),i.isMounted=!1)}this.current=null}bindToMotionValue(a,i){this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)();const o=Bs.has(a),r=i.on("change",p=>{this.latestValues[a]=p,this.props.onUpdate&&lt.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),u=i.on("renderRequest",this.scheduleRender);let d;window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,a,i)),this.valueSubscriptions.set(a,()=>{r(),u(),d&&d(),i.owner&&i.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in wi){const i=wi[a];if(!i)continue;const{isEnabled:o,Feature:r}=i;if(!this.features[a]&&r&&o(this.props)&&(this.features[a]=new r(this)),this.features[a]){const u=this.features[a];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_t()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,i){this.latestValues[a]=i}update(a,i){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let o=0;o<Xv.length;o++){const r=Xv[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const u="on"+r,d=a[u];d&&(this.propEventSubscriptions[r]=this.on(r,d))}this.prevMotionValues=hN(this,this.scrapeMotionValuesFromProps(a,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(a){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(a),()=>i.variantChildren.delete(a)}addValue(a,i){const o=this.values.get(a);i!==o&&(o&&this.removeValue(a),this.bindToMotionValue(a,i),this.values.set(a,i),this.latestValues[a]=i.get())}removeValue(a){this.values.delete(a);const i=this.valueSubscriptions.get(a);i&&(i(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,i){if(this.props.values&&this.props.values[a])return this.props.values[a];let o=this.values.get(a);return o===void 0&&i!==void 0&&(o=Zl(i===null?void 0:i,{owner:this}),this.addValue(a,o)),o}readValue(a,i){var o;let r=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:(o=this.getBaseTargetFromProps(this.props,a))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,a,this.options);return r!=null&&(typeof r=="string"&&(Lb(r)||jb(r))?r=parseFloat(r):!fN(r)&&ns.test(i)&&(r=Rb(a,i)),this.setBaseTarget(a,Ft(r)?r.get():r)),Ft(r)?r.get():r}setBaseTarget(a,i){this.baseTarget[a]=i}getBaseTarget(a){var i;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const d=Gf(this.props,o,(i=this.presenceContext)===null||i===void 0?void 0:i.custom);d&&(r=d[a])}if(o&&r!==void 0)return r;const u=this.getBaseTargetFromProps(this.props,a);return u!==void 0&&!Ft(u)?u:this.initialValues[a]!==void 0&&r===void 0?void 0:this.baseTarget[a]}on(a,i){return this.events[a]||(this.events[a]=new eh),this.events[a].add(i)}notify(a,...i){this.events[a]&&this.events[a].notify(...i)}}class b1 extends pN{constructor(){super(...arguments),this.KeyframeResolver=Vb}sortInstanceNodePosition(a,i){return a.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(a,i){return a.style?a.style[i]:void 0}removeValueFromRenderState(a,{vars:i,style:o}){delete i[a],delete o[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;Ft(a)&&(this.childSubscription=a.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function mN(n){return window.getComputedStyle(n)}class gN extends b1{constructor(){super(...arguments),this.type="html",this.renderInstance=lb}readValueFromInstance(a,i){if(Bs.has(i)){const o=rh(i);return o&&o.default||0}else{const o=mN(a),r=(ab(i)?o.getPropertyValue(i):o[i])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(a,{transformPagePoint:i}){return i1(a,i)}build(a,i,o){$f(a,i,o.transformTemplate)}scrapeMotionValuesFromProps(a,i,o){return Xf(a,i,o)}}class yN extends b1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_t}getBaseTargetFromProps(a,i){return a[i]}readValueFromInstance(a,i){if(Bs.has(i)){const o=rh(i);return o&&o.default||0}return i=ob.has(i)?i:Vf(i),a.getAttribute(i)}scrapeMotionValuesFromProps(a,i,o){return ub(a,i,o)}build(a,i,o){Yf(a,i,this.isSVGTag,o.transformTemplate)}renderInstance(a,i,o,r){rb(a,i,o,r)}mount(a){this.isSVGTag=Zf(a.tagName),super.mount(a)}}const vN=(n,a)=>Hf(n)?new yN(a):new gN(a,{allowProjection:n!==S.Fragment}),bN=qC({...Lj,...cN,...$2,...uN},vN),nn=lC(bN);function SN(){!ph.current&&v1();const[n]=S.useState(Fr.current);return n}var mt;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.TEXT=1]="TEXT",n[n.TOOL_USE=2]="TOOL_USE",n[n.TOOL_RESULT=3]="TOOL_RESULT",n[n.ERROR=4]="ERROR",n[n.STATUS=5]="STATUS",n[n.SYSTEM=6]="SYSTEM",n[n.FINDING=7]="FINDING",n[n.SUBTASK_CREATE=8]="SUBTASK_CREATE",n[n.USER_INPUT=9]="USER_INPUT"})(mt||(mt={}));var Nt;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.NOT_STARTED=1]="NOT_STARTED",n[n.WORKING=3]="WORKING",n[n.PAUSED=4]="PAUSED",n[n.COMPLETE=5]="COMPLETE",n[n.FAILED=6]="FAILED"})(Nt||(Nt={}));var Qa;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ACTIVE=1]="ACTIVE",n[n.ARCHIVED=2]="ARCHIVED"})(Qa||(Qa={}));var Ja;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"})(Ja||(Ja={}));var Fn;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.SUBSCRIPTION=2]="SUBSCRIPTION",n[n.API_KEY=3]="API_KEY"})(Fn||(Fn={}));var Wa;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.ON=2]="ON"})(Wa||(Wa={}));const _N=8;Object.assign(Object.create(null),{"":mt.UNSPECIFIED,text:mt.TEXT,tool_use:mt.TOOL_USE,tool_result:mt.TOOL_RESULT,error:mt.ERROR,status:mt.STATUS,system:mt.SYSTEM,finding:mt.FINDING,subtask_create:mt.SUBTASK_CREATE,user_input:mt.USER_INPUT});mt.UNSPECIFIED+"",mt.TEXT+"",mt.TOOL_USE+"",mt.TOOL_RESULT+"",mt.ERROR+"",mt.STATUS+"",mt.SYSTEM+"",mt.FINDING+"",mt.SUBTASK_CREATE+"",mt.USER_INPUT+"";Object.assign(Object.create(null),{"":Nt.UNSPECIFIED,not_started:Nt.NOT_STARTED,working:Nt.WORKING,paused:Nt.PAUSED,complete:Nt.COMPLETE,failed:Nt.FAILED,pending:Nt.NOT_STARTED,assigned:Nt.NOT_STARTED,in_progress:Nt.WORKING,waiting_input:Nt.PAUSED,review:Nt.PAUSED,done:Nt.COMPLETE});Nt.UNSPECIFIED+"",Nt.NOT_STARTED+"",Nt.WORKING+"",Nt.PAUSED+"",Nt.COMPLETE+"",Nt.FAILED+"";Object.assign(Object.create(null),{"":Qa.UNSPECIFIED,active:Qa.ACTIVE,archived:Qa.ARCHIVED});Qa.UNSPECIFIED+"",Qa.ACTIVE+"",Qa.ARCHIVED+"";Object.assign(Object.create(null),{"":Ja.UNSPECIFIED,open:Ja.OPEN,closed:Ja.CLOSED});Ja.UNSPECIFIED+"",Ja.OPEN+"",Ja.CLOSED+"";Object.assign(Object.create(null),{"":Fn.UNSPECIFIED,off:Fn.OFF,subscription:Fn.SUBSCRIPTION,api_key:Fn.API_KEY});Fn.UNSPECIFIED+"",Fn.OFF+"",Fn.SUBSCRIPTION+"",Fn.API_KEY+"";Object.assign(Object.create(null),{"":Wa.UNSPECIFIED,off:Wa.OFF,on:Wa.ON});Wa.UNSPECIFIED+"",Wa.OFF+"",Wa.ON+"";function Ta(n){return Array.isArray?Array.isArray(n):x1(n)==="[object Array]"}function xN(n){if(typeof n=="string")return n;let a=n+"";return a=="0"&&1/n==-1/0?"-0":a}function TN(n){return n==null?"":xN(n)}function qn(n){return typeof n=="string"}function S1(n){return typeof n=="number"}function EN(n){return n===!0||n===!1||CN(n)&&x1(n)=="[object Boolean]"}function _1(n){return typeof n=="object"}function CN(n){return _1(n)&&n!==null}function dn(n){return n!=null}function Pd(n){return!n.trim().length}function x1(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const AN="Incorrect 'index' type",jN=n=>`Invalid value for key ${n}`,NN=n=>`Pattern length exceeds max of ${n}.`,wN=n=>`Missing ${n} property in key`,DN=n=>`Property 'weight' in key '${n}' must be a positive integer`,Qv=Object.prototype.hasOwnProperty;class kN{constructor(a){this._keys=[],this._keyMap={};let i=0;a.forEach(o=>{let r=T1(o);this._keys.push(r),this._keyMap[r.id]=r,i+=r.weight}),this._keys.forEach(o=>{o.weight/=i})}get(a){return this._keyMap[a]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function T1(n){let a=null,i=null,o=null,r=1,u=null;if(qn(n)||Ta(n))o=n,a=Jv(n),i=mf(n);else{if(!Qv.call(n,"name"))throw new Error(wN("name"));const d=n.name;if(o=d,Qv.call(n,"weight")&&(r=n.weight,r<=0))throw new Error(DN(d));a=Jv(d),i=mf(d),u=n.getFn}return{path:a,id:i,weight:r,src:o,getFn:u}}function Jv(n){return Ta(n)?n:n.split(".")}function mf(n){return Ta(n)?n.join("."):n}function MN(n,a){let i=[],o=!1;const r=(u,d,p)=>{if(dn(u))if(!d[p])i.push(u);else{let m=d[p];const g=u[m];if(!dn(g))return;if(p===d.length-1&&(qn(g)||S1(g)||EN(g)))i.push(TN(g));else if(Ta(g)){o=!0;for(let v=0,y=g.length;v<y;v+=1)r(g[v],d,p+1)}else d.length&&r(g,d,p+1)}};return r(n,qn(a)?a.split("."):a,0),o?i:i[0]}const RN={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},ON={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,a)=>n.score===a.score?n.idx<a.idx?-1:1:n.score<a.score?-1:1},BN={location:0,threshold:.6,distance:100},LN={useExtendedSearch:!1,getFn:MN,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var _e={...ON,...RN,...BN,...LN};const UN=/[^ ]+/g;function IN(n=1,a=3){const i=new Map,o=Math.pow(10,a);return{get(r){const u=r.match(UN).length;if(i.has(u))return i.get(u);const d=1/Math.pow(u,.5*n),p=parseFloat(Math.round(d*o)/o);return i.set(u,p),p},clear(){i.clear()}}}class mh{constructor({getFn:a=_e.getFn,fieldNormWeight:i=_e.fieldNormWeight}={}){this.norm=IN(i,3),this.getFn=a,this.isCreated=!1,this.setIndexRecords()}setSources(a=[]){this.docs=a}setIndexRecords(a=[]){this.records=a}setKeys(a=[]){this.keys=a,this._keysMap={},a.forEach((i,o)=>{this._keysMap[i.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,qn(this.docs[0])?this.docs.forEach((a,i)=>{this._addString(a,i)}):this.docs.forEach((a,i)=>{this._addObject(a,i)}),this.norm.clear())}add(a){const i=this.size();qn(a)?this._addString(a,i):this._addObject(a,i)}removeAt(a){this.records.splice(a,1);for(let i=a,o=this.size();i<o;i+=1)this.records[i].i-=1}getValueForItemAtKeyId(a,i){return a[this._keysMap[i]]}size(){return this.records.length}_addString(a,i){if(!dn(a)||Pd(a))return;let o={v:a,i,n:this.norm.get(a)};this.records.push(o)}_addObject(a,i){let o={i,$:{}};this.keys.forEach((r,u)=>{let d=r.getFn?r.getFn(a):this.getFn(a,r.path);if(dn(d)){if(Ta(d)){let p=[];const m=[{nestedArrIndex:-1,value:d}];for(;m.length;){const{nestedArrIndex:g,value:v}=m.pop();if(dn(v))if(qn(v)&&!Pd(v)){let y={v,i:g,n:this.norm.get(v)};p.push(y)}else Ta(v)&&v.forEach((y,_)=>{m.push({nestedArrIndex:_,value:y})})}o.$[u]=p}else if(qn(d)&&!Pd(d)){let p={v:d,n:this.norm.get(d)};o.$[u]=p}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function E1(n,a,{getFn:i=_e.getFn,fieldNormWeight:o=_e.fieldNormWeight}={}){const r=new mh({getFn:i,fieldNormWeight:o});return r.setKeys(n.map(T1)),r.setSources(a),r.create(),r}function zN(n,{getFn:a=_e.getFn,fieldNormWeight:i=_e.fieldNormWeight}={}){const{keys:o,records:r}=n,u=new mh({getFn:a,fieldNormWeight:i});return u.setKeys(o),u.setIndexRecords(r),u}function Ar(n,{errors:a=0,currentLocation:i=0,expectedLocation:o=0,distance:r=_e.distance,ignoreLocation:u=_e.ignoreLocation}={}){const d=a/n.length;if(u)return d;const p=Math.abs(o-i);return r?d+p/r:p?1:d}function VN(n=[],a=_e.minMatchCharLength){let i=[],o=-1,r=-1,u=0;for(let d=n.length;u<d;u+=1){let p=n[u];p&&o===-1?o=u:!p&&o!==-1&&(r=u-1,r-o+1>=a&&i.push([o,r]),o=-1)}return n[u-1]&&u-o>=a&&i.push([o,u-1]),i}const ws=32;function PN(n,a,i,{location:o=_e.location,distance:r=_e.distance,threshold:u=_e.threshold,findAllMatches:d=_e.findAllMatches,minMatchCharLength:p=_e.minMatchCharLength,includeMatches:m=_e.includeMatches,ignoreLocation:g=_e.ignoreLocation}={}){if(a.length>ws)throw new Error(NN(ws));const v=a.length,y=n.length,_=Math.max(0,Math.min(o,y));let T=u,E=_;const j=p>1||m,A=j?Array(y):[];let C;for(;(C=n.indexOf(a,E))>-1;){let q=Ar(a,{currentLocation:C,expectedLocation:_,distance:r,ignoreLocation:g});if(T=Math.min(q,T),E=C+v,j){let V=0;for(;V<v;)A[C+V]=1,V+=1}}E=-1;let M=[],R=1,Y=v+y;const w=1<<v-1;for(let q=0;q<v;q+=1){let V=0,W=Y;for(;V<W;)Ar(a,{errors:q,currentLocation:_+W,expectedLocation:_,distance:r,ignoreLocation:g})<=T?V=W:Y=W,W=Math.floor((Y-V)/2+V);Y=W;let ae=Math.max(1,_-W+1),se=d?y:Math.min(_+W,y)+v,le=Array(se+2);le[se+1]=(1<<q)-1;for(let K=se;K>=ae;K-=1){let Q=K-1,O=i[n.charAt(Q)];if(j&&(A[Q]=+!!O),le[K]=(le[K+1]<<1|1)&O,q&&(le[K]|=(M[K+1]|M[K])<<1|1|M[K+1]),le[K]&w&&(R=Ar(a,{errors:q,currentLocation:Q,expectedLocation:_,distance:r,ignoreLocation:g}),R<=T)){if(T=R,E=Q,E<=_)break;ae=Math.max(1,2*_-E)}}if(Ar(a,{errors:q+1,currentLocation:_,expectedLocation:_,distance:r,ignoreLocation:g})>T)break;M=le}const F={isMatch:E>=0,score:Math.max(.001,R)};if(j){const q=VN(A,p);q.length?m&&(F.indices=q):F.isMatch=!1}return F}function HN(n){let a={};for(let i=0,o=n.length;i<o;i+=1){const r=n.charAt(i);a[r]=(a[r]||0)|1<<o-i-1}return a}const qr=String.prototype.normalize?(n=>n.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(n=>n);class C1{constructor(a,{location:i=_e.location,threshold:o=_e.threshold,distance:r=_e.distance,includeMatches:u=_e.includeMatches,findAllMatches:d=_e.findAllMatches,minMatchCharLength:p=_e.minMatchCharLength,isCaseSensitive:m=_e.isCaseSensitive,ignoreDiacritics:g=_e.ignoreDiacritics,ignoreLocation:v=_e.ignoreLocation}={}){if(this.options={location:i,threshold:o,distance:r,includeMatches:u,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:g,ignoreLocation:v},a=m?a:a.toLowerCase(),a=g?qr(a):a,this.pattern=a,this.chunks=[],!this.pattern.length)return;const y=(T,E)=>{this.chunks.push({pattern:T,alphabet:HN(T),startIndex:E})},_=this.pattern.length;if(_>ws){let T=0;const E=_%ws,j=_-E;for(;T<j;)y(this.pattern.substr(T,ws),T),T+=ws;if(E){const A=_-ws;y(this.pattern.substr(A),A)}}else y(this.pattern,0)}searchIn(a){const{isCaseSensitive:i,ignoreDiacritics:o,includeMatches:r}=this.options;if(a=i?a:a.toLowerCase(),a=o?qr(a):a,this.pattern===a){let j={isMatch:!0,score:0};return r&&(j.indices=[[0,a.length-1]]),j}const{location:u,distance:d,threshold:p,findAllMatches:m,minMatchCharLength:g,ignoreLocation:v}=this.options;let y=[],_=0,T=!1;this.chunks.forEach(({pattern:j,alphabet:A,startIndex:C})=>{const{isMatch:M,score:R,indices:Y}=PN(a,j,A,{location:u+C,distance:d,threshold:p,findAllMatches:m,minMatchCharLength:g,includeMatches:r,ignoreLocation:v});M&&(T=!0),_+=R,M&&Y&&(y=[...y,...Y])});let E={isMatch:T,score:T?_/this.chunks.length:1};return T&&r&&(E.indices=y),E}}class is{constructor(a){this.pattern=a}static isMultiMatch(a){return Wv(a,this.multiRegex)}static isSingleMatch(a){return Wv(a,this.singleRegex)}search(){}}function Wv(n,a){const i=n.match(a);return i?i[1]:null}class GN extends is{constructor(a){super(a)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(a){const i=a===this.pattern;return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class FN extends is{constructor(a){super(a)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(a){const o=a.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,a.length-1]}}}class qN extends is{constructor(a){super(a)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(a){const i=a.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class $N extends is{constructor(a){super(a)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(a){const i=!a.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,a.length-1]}}}class YN extends is{constructor(a){super(a)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(a){const i=a.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[a.length-this.pattern.length,a.length-1]}}}class KN extends is{constructor(a){super(a)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(a){const i=!a.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,a.length-1]}}}class A1 extends is{constructor(a,{location:i=_e.location,threshold:o=_e.threshold,distance:r=_e.distance,includeMatches:u=_e.includeMatches,findAllMatches:d=_e.findAllMatches,minMatchCharLength:p=_e.minMatchCharLength,isCaseSensitive:m=_e.isCaseSensitive,ignoreDiacritics:g=_e.ignoreDiacritics,ignoreLocation:v=_e.ignoreLocation}={}){super(a),this._bitapSearch=new C1(a,{location:i,threshold:o,distance:r,includeMatches:u,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:g,ignoreLocation:v})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(a){return this._bitapSearch.searchIn(a)}}class j1 extends is{constructor(a){super(a)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(a){let i=0,o;const r=[],u=this.pattern.length;for(;(o=a.indexOf(this.pattern,i))>-1;)i=o+u,r.push([o,i-1]);const d=!!r.length;return{isMatch:d,score:d?0:1,indices:r}}}const gf=[GN,j1,qN,$N,KN,YN,FN,A1],e0=gf.length,ZN=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,XN="|";function QN(n,a={}){return n.split(XN).map(i=>{let o=i.trim().split(ZN).filter(u=>u&&!!u.trim()),r=[];for(let u=0,d=o.length;u<d;u+=1){const p=o[u];let m=!1,g=-1;for(;!m&&++g<e0;){const v=gf[g];let y=v.isMultiMatch(p);y&&(r.push(new v(y,a)),m=!0)}if(!m)for(g=-1;++g<e0;){const v=gf[g];let y=v.isSingleMatch(p);if(y){r.push(new v(y,a));break}}}return r})}const JN=new Set([A1.type,j1.type]);class WN{constructor(a,{isCaseSensitive:i=_e.isCaseSensitive,ignoreDiacritics:o=_e.ignoreDiacritics,includeMatches:r=_e.includeMatches,minMatchCharLength:u=_e.minMatchCharLength,ignoreLocation:d=_e.ignoreLocation,findAllMatches:p=_e.findAllMatches,location:m=_e.location,threshold:g=_e.threshold,distance:v=_e.distance}={}){this.query=null,this.options={isCaseSensitive:i,ignoreDiacritics:o,includeMatches:r,minMatchCharLength:u,findAllMatches:p,ignoreLocation:d,location:m,threshold:g,distance:v},a=i?a:a.toLowerCase(),a=o?qr(a):a,this.pattern=a,this.query=QN(this.pattern,this.options)}static condition(a,i){return i.useExtendedSearch}searchIn(a){const i=this.query;if(!i)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:r,ignoreDiacritics:u}=this.options;a=r?a:a.toLowerCase(),a=u?qr(a):a;let d=0,p=[],m=0;for(let g=0,v=i.length;g<v;g+=1){const y=i[g];p.length=0,d=0;for(let _=0,T=y.length;_<T;_+=1){const E=y[_],{isMatch:j,indices:A,score:C}=E.search(a);if(j){if(d+=1,m+=C,o){const M=E.constructor.type;JN.has(M)?p=[...p,...A]:p.push(A)}}else{m=0,d=0,p.length=0;break}}if(d){let _={isMatch:!0,score:m/d};return o&&(_.indices=p),_}}return{isMatch:!1,score:1}}}const yf=[];function ew(...n){yf.push(...n)}function vf(n,a){for(let i=0,o=yf.length;i<o;i+=1){let r=yf[i];if(r.condition(n,a))return new r(n,a)}return new C1(n,a)}const $r={AND:"$and",OR:"$or"},bf={PATH:"$path",PATTERN:"$val"},Sf=n=>!!(n[$r.AND]||n[$r.OR]),tw=n=>!!n[bf.PATH],nw=n=>!Ta(n)&&_1(n)&&!Sf(n),t0=n=>({[$r.AND]:Object.keys(n).map(a=>({[a]:n[a]}))});function N1(n,a,{auto:i=!0}={}){const o=r=>{let u=Object.keys(r);const d=tw(r);if(!d&&u.length>1&&!Sf(r))return o(t0(r));if(nw(r)){const m=d?r[bf.PATH]:u[0],g=d?r[bf.PATTERN]:r[m];if(!qn(g))throw new Error(jN(m));const v={keyId:mf(m),pattern:g};return i&&(v.searcher=vf(g,a)),v}let p={children:[],operator:u[0]};return u.forEach(m=>{const g=r[m];Ta(g)&&g.forEach(v=>{p.children.push(o(v))})}),p};return Sf(n)||(n=t0(n)),o(n)}function aw(n,{ignoreFieldNorm:a=_e.ignoreFieldNorm}){n.forEach(i=>{let o=1;i.matches.forEach(({key:r,norm:u,score:d})=>{const p=r?r.weight:null;o*=Math.pow(d===0&&p?Number.EPSILON:d,(p||1)*(a?1:u))}),i.score=o})}function sw(n,a){const i=n.matches;a.matches=[],dn(i)&&i.forEach(o=>{if(!dn(o.indices)||!o.indices.length)return;const{indices:r,value:u}=o;let d={indices:r,value:u};o.key&&(d.key=o.key.src),o.idx>-1&&(d.refIndex=o.idx),a.matches.push(d)})}function iw(n,a){a.score=n.score}function lw(n,a,{includeMatches:i=_e.includeMatches,includeScore:o=_e.includeScore}={}){const r=[];return i&&r.push(sw),o&&r.push(iw),n.map(u=>{const{idx:d}=u,p={item:a[d],refIndex:d};return r.length&&r.forEach(m=>{m(u,p)}),p})}class Li{constructor(a,i={},o){this.options={..._e,...i},this.options.useExtendedSearch,this._keyStore=new kN(this.options.keys),this.setCollection(a,o)}setCollection(a,i){if(this._docs=a,i&&!(i instanceof mh))throw new Error(AN);this._myIndex=i||E1(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(a){dn(a)&&(this._docs.push(a),this._myIndex.add(a))}remove(a=()=>!1){const i=[];for(let o=0,r=this._docs.length;o<r;o+=1){const u=this._docs[o];a(u,o)&&(this.removeAt(o),o-=1,r-=1,i.push(u))}return i}removeAt(a){this._docs.splice(a,1),this._myIndex.removeAt(a)}getIndex(){return this._myIndex}search(a,{limit:i=-1}={}){const{includeMatches:o,includeScore:r,shouldSort:u,sortFn:d,ignoreFieldNorm:p}=this.options;let m=qn(a)?qn(this._docs[0])?this._searchStringList(a):this._searchObjectList(a):this._searchLogical(a);return aw(m,{ignoreFieldNorm:p}),u&&m.sort(d),S1(i)&&i>-1&&(m=m.slice(0,i)),lw(m,this._docs,{includeMatches:o,includeScore:r})}_searchStringList(a){const i=vf(a,this.options),{records:o}=this._myIndex,r=[];return o.forEach(({v:u,i:d,n:p})=>{if(!dn(u))return;const{isMatch:m,score:g,indices:v}=i.searchIn(u);m&&r.push({item:u,idx:d,matches:[{score:g,value:u,norm:p,indices:v}]})}),r}_searchLogical(a){const i=N1(a,this.options),o=(p,m,g)=>{if(!p.children){const{keyId:y,searcher:_}=p,T=this._findMatches({key:this._keyStore.get(y),value:this._myIndex.getValueForItemAtKeyId(m,y),searcher:_});return T&&T.length?[{idx:g,item:m,matches:T}]:[]}const v=[];for(let y=0,_=p.children.length;y<_;y+=1){const T=p.children[y],E=o(T,m,g);if(E.length)v.push(...E);else if(p.operator===$r.AND)return[]}return v},r=this._myIndex.records,u={},d=[];return r.forEach(({$:p,i:m})=>{if(dn(p)){let g=o(i,p,m);g.length&&(u[m]||(u[m]={idx:m,item:p,matches:[]},d.push(u[m])),g.forEach(({matches:v})=>{u[m].matches.push(...v)}))}}),d}_searchObjectList(a){const i=vf(a,this.options),{keys:o,records:r}=this._myIndex,u=[];return r.forEach(({$:d,i:p})=>{if(!dn(d))return;let m=[];o.forEach((g,v)=>{m.push(...this._findMatches({key:g,value:d[v],searcher:i}))}),m.length&&u.push({idx:p,item:d,matches:m})}),u}_findMatches({key:a,value:i,searcher:o}){if(!dn(i))return[];let r=[];if(Ta(i))i.forEach(({v:u,i:d,n:p})=>{if(!dn(u))return;const{isMatch:m,score:g,indices:v}=o.searchIn(u);m&&r.push({score:g,key:a,value:u,idx:d,norm:p,indices:v})});else{const{v:u,n:d}=i,{isMatch:p,score:m,indices:g}=o.searchIn(u);p&&r.push({score:m,key:a,value:u,norm:d,indices:g})}return r}}Li.version="7.1.0";Li.createIndex=E1;Li.parseIndex=zN;Li.config=_e;Li.parseQuery=N1;ew(WN);function n0(n,a,i,o){if(!a.trim())return[];const r=.3;return new Li(n,{keys:i,threshold:r,ignoreLocation:!0,includeScore:!0,includeMatches:!0,minMatchCharLength:2}).search(a).map(m=>({item:m.item,score:m.score??1,matches:(m.matches??[]).map(g=>({key:g.key??"",indices:g.indices}))}))}const ow="_breadcrumbs_17or2_1",rw="_list_17or2_11",cw="_item_17or2_21",uw="_separator_17or2_28",dw="_link_17or2_34",fw="_current_17or2_57",_i={breadcrumbs:ow,list:rw,item:cw,separator:uw,link:dw,current:fw},hw="›";function Ui({segments:n}){return h.jsx("nav",{className:_i.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:h.jsx("ol",{className:_i.list,children:n.map((a,i)=>{const o=i===n.length-1;return h.jsxs("li",{className:_i.item,children:[i>0&&h.jsx("span",{className:_i.separator,"aria-hidden":"true",children:hw}),a.url&&!o?h.jsx(kf,{className:_i.link,to:a.url,title:a.label,children:a.label}):h.jsx("span",{className:_i.current,"aria-current":"page",title:a.label,children:a.label})]},i)})})})}function _f(){_f=function(r,u){return new i(r,void 0,u)};var n=RegExp.prototype,a=new WeakMap;function i(r,u,d){var p=new RegExp(r,u);return a.set(p,d||a.get(r)),Yr(p,i.prototype)}function o(r,u){var d=a.get(u);return Object.keys(d).reduce(function(p,m){var g=d[m];if(typeof g=="number")p[m]=r[g];else{for(var v=0;r[g[v]]===void 0&&v+1<g.length;)v++;p[m]=r[g[v]]}return p},Object.create(null))}return(function(r,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(u&&u.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),u&&Yr(r,u)})(i,RegExp),i.prototype.exec=function(r){var u=n.exec.call(this,r);if(u){u.groups=o(u,this);var d=u.indices;d&&(d.groups=o(d,this))}return u},i.prototype[Symbol.replace]=function(r,u){if(typeof u=="string"){var d=a.get(this);return n[Symbol.replace].call(this,r,u.replace(/\$<([^>]+)>/g,function(m,g){var v=d[g];return"$"+(Array.isArray(v)?v.join("$"):v)}))}if(typeof u=="function"){var p=this;return n[Symbol.replace].call(this,r,function(){var m=arguments;return typeof m[m.length-1]!="object"&&(m=[].slice.call(m)).push(o(m,p)),u.apply(this,m)})}return n[Symbol.replace].call(this,r,u)},_f.apply(this,arguments)}function Yr(n,a){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},Yr(n,a)}function a0(n,a){(a==null||a>n.length)&&(a=n.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=n[i];return o}function Hd(n,a){var i=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i)return(i=i.call(n)).next.bind(i);if(Array.isArray(n)||(i=(function(r,u){if(r){if(typeof r=="string")return a0(r,u);var d=Object.prototype.toString.call(r).slice(8,-1);return d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set"?Array.from(r):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?a0(r,u):void 0}})(n))||a){i&&(n=i);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
87
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var pw=(function(n){return function(a){return a===void 0&&(a={}),(function(o,r){if(r&&!o.registered(r))throw new Error('The default language "'+r+'" is not registered with refractor.')})(n,a.defaultLanguage),function(o){nx(o,"element",i)};function i(o,r,u){var d,p;if(u&&u.tagName==="pre"&&o.tagName==="code"){var m=(o==null||(d=o.data)==null?void 0:d.meta)||(o==null||(p=o.properties)==null?void 0:p.metastring)||"";o.properties.className?typeof o.properties.className=="boolean"?o.properties.className=[]:Array.isArray(o.properties.className)||(o.properties.className=[o.properties.className]):o.properties.className=[];var g,v,y=(function(w){for(var F,q=Hd(w.properties.className);!(F=q()).done;){var V=F.value;if(V.slice(0,9)==="language-")return V.slice(9).toLowerCase()}return null})(o);if(!y&&a.defaultLanguage&&o.properties.className.push("language-"+(y=a.defaultLanguage)),o.properties.className.push("code-highlight"),y)try{var _,T;T=(_=y)!=null&&_.includes("diff-")?y.split("-")[1]:y,g=n.highlight(Sr(o),T),u.properties.className=(u.properties.className||[]).concat("language-"+T)}catch(w){if(!a.ignoreMissing||!/Unknown language/.test(w.message))throw w;g=o}else g=o;g.children=(v=1,function w(F){return F.reduce(function(q,V){if(V.type==="text"){var W=V.value,ae=(W.match(/\n/g)||"").length;if(ae===0)V.position={start:{line:v,column:1},end:{line:v,column:1}},q.push(V);else for(var se,le=W.split(`
88
- `),z=Hd(le.entries());!(se=z()).done;){var K=se.value,Q=K[0],O=K[1];q.push({type:"text",value:Q===le.length-1?O:O+`
89
- `,position:{start:{line:v+Q,column:1},end:{line:v+Q,column:1}}})}return v+=ae,q}if(Object.prototype.hasOwnProperty.call(V,"children")){var G=v;return V.children=w(V.children),q.push(V),V.position={start:{line:G,column:1},end:{line:v,column:1}},q}return q.push(V),q},[])})(g.children),g.position=g.children.length>0?{start:{line:g.children[0].position.start.line,column:0},end:{line:g.children[g.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var E,j=(function(w){var F=/{([\d,-]+)}/,q=w.split(",").map(function(ae){return ae.trim()}).join();if(F.test(q)){var V=F.exec(q)[1],W=sx(V);return function(ae){return W.includes(ae+1)}}return function(){return!1}})(m),A=(function(w){var F=_f(/showLineNumbers=(\d+)/i,{lines:1});if(F.test(w)){var q=F.exec(w);return Number(q.groups.lines)}return 1})(m),C=(function(w){for(var F=new Array(w),q=0;q<w;q++)F[q]={type:"element",tagName:"span",properties:{className:[]},children:[]};return F})(g.position.end.line),M=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],R=function(){var w,F,q=E.value,V=q[0],W=q[1];W.properties.className=["code-line"];var ae=ix(g,function(se){return se.position.start.line<=V+1&&se.position.end.line>=V+1});W.children=ae.children,(m.toLowerCase().includes("showLineNumbers".toLowerCase())||a.showLineNumbers===!0||typeof a.showLineNumbers=="object"&&a.showLineNumbers.includes(y))&&!M.some(function(se){return m.toLowerCase().includes(se)})&&(W.properties.line=[(V+A).toString()],W.properties.className.push("line-number")),j(V)&&W.properties.className.push("highlight-line"),(y==="diff"||(w=y)!=null&&w.includes("diff-"))&&Sr(W).substring(0,1)==="-"?W.properties.className.push("deleted"):(y==="diff"||(F=y)!=null&&F.includes("diff-"))&&Sr(W).substring(0,1)==="+"&&W.properties.className.push("inserted")},Y=Hd(C.entries());!(E=Y()).done;)R();C.length>0&&Sr(C[C.length-1]).trim()===""&&C.pop(),o.children=C}}}})(ax);const mw="_systemEvent_463jy_1",gw="_systemTimestamp_463jy_8",yw="_textEvent_463jy_12",vw="_toolUseEvent_463jy_98",bw="_toolUseHeader_463jy_118",Sw="_toolUsePrefix_463jy_125",_w="_toolUseName_463jy_130",xw="_toolUseArgs_463jy_135",Tw="_toolResultEvent_463jy_146",Ew="_toolResultHeader_463jy_151",Cw="_toolResultIndicatorOk_463jy_175",Aw="_toolResultIndicatorError_463jy_182",jw="_toolResultLabel_463jy_189",Nw="_toolResultToggle_463jy_193",ww="_toolResultCommand_463jy_199",Dw="_toolResultEllipsis_463jy_209",kw="_toolResultPre_463jy_213",Mw="_errorEvent_463jy_234",Rw="_statusEvent_463jy_242",Ow="_userInputEvent_463jy_251",Bw="_userInputContent_463jy_257",Lw="_defaultEvent_463jy_274",ct={systemEvent:mw,systemTimestamp:gw,textEvent:yw,toolUseEvent:vw,toolUseHeader:bw,toolUsePrefix:Sw,toolUseName:_w,toolUseArgs:xw,toolResultEvent:Tw,toolResultHeader:Ew,toolResultIndicatorOk:Cw,toolResultIndicatorError:Aw,toolResultLabel:jw,toolResultToggle:Nw,toolResultCommand:ww,toolResultEllipsis:Dw,toolResultPre:kw,errorEvent:Mw,statusEvent:Rw,userInputEvent:Ow,userInputContent:Bw,defaultEvent:Lw};function Uw({time:n,content:a}){return h.jsxs("div",{className:ct.systemEvent,children:[h.jsxs("span",{className:ct.systemTimestamp,children:["[",n,"]"]})," ",a]})}function Iw({content:n}){return h.jsx("div",{className:ct.textEvent,children:h.jsx(Tf,{remarkPlugins:[Ef],rehypePlugins:[pw],children:n})})}function zw({content:n}){let a="",i=n;try{const o=JSON.parse(n);a=o.tool||"",i=JSON.stringify(o.args,null,2)}catch{}return h.jsxs("div",{className:ct.toolUseEvent,children:[h.jsxs("div",{className:ct.toolUseHeader,children:[h.jsx("span",{className:ct.toolUsePrefix,children:">"}),a?h.jsx("span",{className:ct.toolUseName,children:a}):null]}),h.jsx("pre",{className:ct.toolUseArgs,children:i})]})}const s0=5;function Vw(n,a){if(a==null)return"";if(typeof a!="object")return String(a);const i=a;if(typeof i.command=="string")return i.command;if(typeof i.file_path=="string")return i.file_path;if(typeof i.pattern=="string"){const o=typeof i.path=="string"?` in ${i.path}`:"";return`${i.pattern}${o}`}if(typeof i.path=="string")return i.path;if(typeof i.query=="string")return i.query;try{const o=JSON.stringify(a);return o.length>150?`${o.slice(0,150)}…`:o}catch{return""}}function Pw({content:n,raw:a,toolUseCtx:i}){const[o,r]=S.useState(!1);let u=!1;if(a)try{u=JSON.parse(a).is_error===!0}catch{}const d=n.split(`
90
- `),p=d.length>s0,m=o?n:d.slice(0,s0).join(`
91
- `),v=((i==null?void 0:i.tool)??"")||(u?"Tool error":"Tool output"),y=i?Vw(i.tool,i.args):"",_=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:u?ct.toolResultIndicatorError:ct.toolResultIndicatorOk,"aria-label":u?"error":"success",children:u?"✗":"✓"}),h.jsx("span",{className:ct.toolResultLabel,children:v}),p&&h.jsx("span",{className:ct.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return h.jsxs("div",{className:ct.toolResultEvent,children:[p?h.jsx("button",{className:ct.toolResultHeader,onClick:()=>{r(T=>!T)},"aria-expanded":o,children:_}):h.jsx("div",{className:ct.toolResultHeader,children:_}),y&&h.jsx("div",{className:ct.toolResultCommand,children:y}),h.jsxs("pre",{className:ct.toolResultPre,children:[m,!o&&p&&h.jsx("span",{className:ct.toolResultEllipsis,children:"…"})]})]})}function Hw({content:n}){return h.jsxs("div",{className:ct.errorEvent,children:["Error: ",n]})}function Gw({content:n}){return h.jsxs("div",{className:ct.statusEvent,children:["--- ",n," ---"]})}function Fw({content:n}){return h.jsx("div",{className:ct.userInputEvent,children:h.jsx("span",{className:ct.userInputContent,children:n})})}function qw({content:n}){return h.jsx("div",{className:ct.defaultEvent,children:n})}function $w({event:n,toolUseCtx:a}){const i=new Date(n.timestamp).toLocaleTimeString();switch(n.eventType){case"system":return h.jsx(Uw,{time:i,content:n.content});case"text":case"output":return h.jsx(Iw,{content:n.content});case"tool_use":return h.jsx(zw,{content:n.content});case"tool_result":return h.jsx(Pw,{content:n.content,raw:n.raw,toolUseCtx:a});case"error":return h.jsx(Hw,{content:n.content});case"status":return h.jsx(Gw,{content:n.content});case"user_input":return h.jsx(Fw,{content:n.content});default:return h.jsx(qw,{content:n.content})}}const Yw="_overlay_cmicx_1",Kw="_dialog_cmicx_11",Zw="_title_cmicx_30",Xw="_description_cmicx_38",Qw="_actions_cmicx_45",Jw="_cancelButton_cmicx_52",Ww="_confirmButton_cmicx_79",Cs={overlay:Yw,dialog:Kw,title:Zw,description:Xw,actions:Qw,cancelButton:Jw,confirmButton:Ww};function lc({isOpen:n,title:a,description:i,confirmLabel:o="Delete",onConfirm:r,onCancel:u}){const d=S.useId(),p=S.useId();return h.jsx(Xn,{children:n&&h.jsx(nn.div,{className:Cs.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:u,onKeyDown:m=>{m.key==="Escape"&&u()},role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":i?p:void 0,children:h.jsxs(nn.div,{className:Cs.dialog,initial:{opacity:0,scale:.93,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.93,y:-10},transition:{duration:.15,ease:[.16,1,.3,1]},onClick:m=>m.stopPropagation(),children:[h.jsx("h3",{id:d,className:Cs.title,children:a}),i&&h.jsx("p",{id:p,className:Cs.description,children:i}),h.jsxs("div",{className:Cs.actions,children:[h.jsx("button",{type:"button",className:Cs.cancelButton,onClick:u,autoFocus:!0,children:"Cancel"}),h.jsx("button",{type:"button",className:Cs.confirmButton,onClick:r,children:o})]})]})})})}const eD="_spinner_13c8l_1",tD="_spin_13c8l_1",nD="_sm_13c8l_14",aD="_md_13c8l_20",sD="_lg_13c8l_26",i0={spinner:eD,spin:tD,sm:nD,md:aD,lg:sD};function l0({size:n="md",className:a,label:i="Loading",liveRegion:o=!1}){return h.jsx("span",{className:`${i0.spinner} ${i0[n]} ${a??""}`,role:o?"status":void 0,"aria-label":i,"aria-hidden":o?void 0:!0})}const xf={not_started:{color:"var(--text-tertiary)",icon:"○",label:"Not Started"},working:{color:"var(--accent-green)",icon:"●",label:"Working"},paused:{color:"var(--accent-yellow)",icon:"◉",label:"Paused"},complete:{color:"var(--accent-green)",icon:"✓",label:"Complete"},failed:{color:"var(--accent-red)",icon:"✗",label:"Failed"},blocked:{color:"var(--accent-yellow)",icon:"⦸",label:"Blocked"}};function as(n){return n==="blocked"?xf.blocked:xf[gh(n)]}const iD={not_started:"statusPending",working:"statusInProgress",paused:"statusWaitingInput",complete:"statusDone",failed:"statusFailed"};function lD(n){return iD[gh(n)]??"statusPending"}const oD=["working","paused","failed","not_started","blocked","complete"],o0=["not_started","working","paused","complete","failed"],rD={pending:"not_started",assigned:"not_started",in_progress:"working",waiting_input:"paused",review:"paused",done:"complete"};function gh(n){return n in xf&&n!=="blocked"?n:rD[n]??"not_started"}const cD={not_started:"--text-tertiary",working:"--accent-green",paused:"--accent-yellow",complete:"--accent-green",failed:"--accent-red",pending:"--text-tertiary",assigned:"--text-tertiary",in_progress:"--accent-green",review:"--accent-yellow",done:"--accent-green",waiting_input:"--accent-yellow"},uD="_container_15oob_1",dD="_header_15oob_5",fD="_searchInput_15oob_17",hD="_searchHighlight_15oob_50",pD="_addButton_15oob_56",mD="_createForm_15oob_83",gD="_createInput_15oob_89",yD="_createButton_15oob_120",vD="_creatingHint_15oob_161",bD="_projectRow_15oob_170",SD="_selected_15oob_188",_D="_expandArrow_15oob_193",xD="_expanded_15oob_200",TD="_projectName_15oob_204",ED="_taskCount_15oob_208",CD="_newTaskButton_15oob_214",AD="_taskRow_15oob_241",jD="_taskStatusIcon_15oob_271",ND="_taskTitle_15oob_275",wD="_dependencyBadge_15oob_282",DD="_blockedBadge_15oob_294",kD="_leafSpacer_15oob_299",MD="_childCountBadge_15oob_304",RD="_addChildButton_15oob_317",OD="_emptyCta_15oob_366",BD="_ctaDescription_15oob_379",LD="_ctaButton_15oob_385",UD="_emptyTaskCta_15oob_420",ID="_headerActions_15oob_425",zD="_groupToggle_15oob_431",VD="_groupToggleActive_15oob_458",PD="_statusGroupHeader_15oob_462",HD="_statusGroupIcon_15oob_481",GD="_statusGroupLabel_15oob_485",FD="_statusGroupCount_15oob_490",qD="_createTaskLink_15oob_503",Te={container:uD,header:dD,searchInput:fD,searchHighlight:hD,addButton:pD,createForm:mD,createInput:gD,createButton:yD,creatingHint:vD,projectRow:bD,selected:SD,expandArrow:_D,expanded:xD,projectName:TD,taskCount:ED,newTaskButton:CD,taskRow:AD,taskStatusIcon:jD,taskTitle:ND,dependencyBadge:wD,blockedBadge:DD,leafSpacer:kD,childCountBadge:MD,addChildButton:RD,emptyCta:OD,ctaDescription:BD,ctaButton:LD,emptyTaskCta:UD,headerActions:ID,groupToggle:zD,groupToggleActive:VD,statusGroupHeader:PD,statusGroupIcon:HD,statusGroupLabel:GD,statusGroupCount:FD,createTaskLink:qD};function $D(n){if(n.length===0)return[];const a=[...n].sort((o,r)=>o[0]-r[0]),i=[[a[0][0],a[0][1]]];for(let o=1;o<a.length;o++){const r=i[i.length-1],[u,d]=a[o];u<=r[1]+1?r[1]=Math.max(r[1],d):i.push([u,d])}return i}function w1({text:n,indices:a}){if(!a||a.length===0)return h.jsx(h.Fragment,{children:n});const i=$D(a),o=[];let r=0;for(const[u,d]of i)u>r&&o.push(h.jsx("span",{children:n.slice(r,u)},`p${r}`)),o.push(h.jsx("mark",{className:Te.searchHighlight,children:n.slice(u,d+1)},`m${u}`)),r=d+1;return r<n.length&&o.push(h.jsx("span",{children:n.slice(r)},`p${r}`)),h.jsx(h.Fragment,{children:o})}const YD=[{name:"name",weight:2},{name:"description",weight:1}],KD=[{name:"title",weight:2},{name:"description",weight:1}],D1=34,ZD=16,k1="grackle-group-by-status";function r0(){try{return localStorage.getItem(k1)==="true"}catch{return!1}}function XD(n){try{localStorage.setItem(k1,String(n))}catch{}}function QD(n,a){const i=new Map;for(const u of n){const p=u.dependsOn.length>0&&u.dependsOn.some(g=>a.get(g)!=="complete")?"blocked":u.status,m=i.get(p);m?m.push(u):i.set(p,[u])}const o=[],r=new Set;for(const u of oD){r.add(u);const d=i.get(u);if(d&&d.length>0){d.sort((m,g)=>m.sortOrder-g.sortOrder);const p=as(u);o.push({status:u,label:p.label,style:p,tasks:d})}}for(const[u,d]of i)if(!r.has(u)&&d.length>0){d.sort((m,g)=>m.sortOrder-g.sortOrder);const p=as(u);o.push({status:u,label:p.label,style:p,tasks:d})}return o}function JD({group:n,isExpanded:a,onToggle:i,selectedTaskId:o,navigate:r,titleHighlights:u}){return h.jsxs("div",{"data-testid":`status-group-${n.status}`,children:[h.jsxs("div",{className:Te.statusGroupHeader,role:"button",tabIndex:0,"aria-expanded":a,onClick:i,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i())},children:[h.jsx("span",{className:`${Te.expandArrow} ${a?Te.expanded:""}`,children:"▸"}),h.jsx("span",{className:Te.statusGroupIcon,style:{color:n.style.color},children:n.style.icon}),h.jsx("span",{className:Te.statusGroupLabel,children:n.label}),h.jsx("span",{className:Te.statusGroupCount,children:n.tasks.length})]}),h.jsx(Xn,{children:a&&h.jsx(nn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},style:{overflow:"hidden"},children:n.tasks.map(d=>{const p=as(d.status),m=o===d.id;return h.jsxs("div",{onClick:()=>r(es(d.id)),className:`${Te.taskRow} ${m?Te.selected:""}`,style:{"--task-indent":`${D1}px`},"data-task-id":d.id,children:[h.jsx("span",{className:Te.leafSpacer}),h.jsx("span",{className:Te.taskStatusIcon,style:{color:p.color},children:p.icon}),h.jsx("span",{className:Te.taskTitle,title:d.title,children:h.jsx(w1,{text:d.title,indices:u.get(d.id)})})]},d.id)})})})]})}function WD(n){const a=new Map(n.map(o=>[o.id,{...o,children:[]}])),i=[];for(const o of a.values())o.parentTaskId&&a.has(o.parentTaskId)?a.get(o.parentTaskId).children.push(o):i.push(o);for(const o of a.values())o.children.sort((r,u)=>r.sortOrder-u.sortOrder);return i.sort((o,r)=>o.sortOrder-r.sortOrder)}function M1({node:n,depth:a,expandedTasks:i,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:p,titleHighlights:m}){const g=as(n.status),v=n.dependsOn.length>0&&n.dependsOn.some(j=>p.get(j)!=="complete"),y=i.has(n.id),_=n.children.length>0,T=r===n.id,E=D1+a*ZD;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{onClick:()=>u(es(n.id)),className:`${Te.taskRow} ${T?Te.selected:""}`,style:{"--task-indent":`${E}px`},"data-task-id":n.id,children:[_&&h.jsx("span",{className:`${Te.expandArrow} ${y?Te.expanded:""}`,role:"button",tabIndex:0,"aria-label":y?"Collapse task":"Expand task",onClick:j=>{j.stopPropagation(),o(n.id)},onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),j.stopPropagation(),o(n.id))},children:"▸"}),!_&&h.jsx("span",{className:Te.leafSpacer}),h.jsx("span",{className:Te.taskStatusIcon,style:{color:g.color},children:g.icon}),h.jsx("span",{className:Te.taskTitle,title:n.title,children:h.jsx(w1,{text:n.title,indices:m.get(n.id)})}),_&&h.jsxs("span",{className:Te.childCountBadge,children:[n.children.filter(j=>j.status==="complete").length,"/",n.children.length]}),n.dependsOn.length>0&&h.jsx("span",{className:`${Te.dependencyBadge} ${v?Te.blockedBadge:""}`,title:`Depends on: ${n.dependsOn.join(", ")}`,children:v?"blocked":"dep"}),a<_N&&h.jsx("button",{onClick:j=>{j.stopPropagation(),u(Ms(d,n.id))},title:"Add child task","aria-label":"Add child task",className:Te.addChildButton,children:"+"})]}),h.jsx(Xn,{children:_&&y&&h.jsx(nn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:n.children.map(j=>h.jsx(M1,{node:j,depth:a+1,expandedTasks:i,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:p,titleHighlights:m},j.id))})})]})}function ek(){const{projects:n,tasks:a,loadTasks:i,createProject:o,projectCreating:r}=Ht(),u=Un(),[d,p]=S.useState(new Set),[m,g]=S.useState(new Set),[v,y]=S.useState(new Set),[_,T]=S.useState(!1),[E,j]=S.useState(""),[A,C]=S.useState(r0),[M,R]=S.useState(r0),[Y,w]=S.useState(new Map),F=()=>{const ne=!A;XD(ne),C(ne),ne&&(R(!0),w(new Map))},q=(ne,ke)=>{const H=`${ne}:${ke}`;w(ie=>{const Ge=new Map(ie),nt=Ge.has(H)?Ge.get(H):M;return Ge.set(H,!nt),Ge})},V=(ne,ke)=>{const H=`${ne}:${ke}`;return Y.has(H)?Y.get(H):M},W=$t("/tasks/:taskId/*"),ae=$t("/projects/:projectId"),se=(W==null?void 0:W.params.taskId)!=="new"?W==null?void 0:W.params.taskId:void 0,le=ae==null?void 0:ae.params.projectId,z=S.useRef(d);z.current=d;const K=S.useMemo(()=>new Map(a.map(ne=>[ne.id,ne.status])),[a]),Q=ne=>{p(ke=>{const H=new Set(ke);return H.has(ne)?H.delete(ne):(H.add(ne),i(ne)),H})},O=ne=>{g(ke=>{const H=new Set(ke);return H.has(ne)?(H.delete(ne),y(ie=>new Set(ie).add(ne))):(H.add(ne),y(ie=>{const Ge=new Set(ie);return Ge.delete(ne),Ge})),H})};S.useEffect(()=>{const ne=new Set(a.filter(ke=>ke.parentTaskId).map(ke=>ke.parentTaskId));ne.size>0&&g(ke=>{const H=new Set(ke);for(const ie of ne)v.has(ie)||H.add(ie);return H})},[a,v]),S.useEffect(()=>{le&&!z.current.has(le)&&(p(ne=>new Set(ne).add(le)),i(le))},[le,i]);const G=()=>{!E.trim()||r||(o(E.trim()),j(""),T(!1))},[ee,ge]=S.useState(""),{directMatchTaskIds:pe,treeMatchTaskIds:We,visibleProjectIds:Ae,matchedProjectIds:he,titleHighlights:De}=S.useMemo(()=>{if(!ee.trim())return{directMatchTaskIds:null,treeMatchTaskIds:null,visibleProjectIds:null,matchedProjectIds:null,titleHighlights:new Map};const ne=n0(n,ee,YD),ke=n0(a,ee,KD),H=new Set(ne.map(qe=>qe.item.id)),ie=new Set(ke.map(qe=>qe.item.id)),Ge=new Map;for(const qe of ke){const Be=qe.matches.find(Dn=>Dn.key==="title");Be&&Ge.set(qe.item.id,Be.indices)}const nt=new Set(H);for(const qe of ke)nt.add(qe.item.projectId);const Bt=new Set(ie),wt=new Map(a.map(qe=>[qe.id,qe]));for(const qe of[...ie]){let Be=wt.get(qe);for(;Be!=null&&Be.parentTaskId;)Bt.add(Be.parentTaskId),Be=wt.get(Be.parentTaskId)}return{directMatchTaskIds:ie,treeMatchTaskIds:Bt,visibleProjectIds:nt,matchedProjectIds:H,titleHighlights:Ge}},[ee,n,a]),xe=S.useRef(new Set);return S.useEffect(()=>{if(ee.trim())for(const ne of n)!d.has(ne.id)&&!xe.current.has(ne.id)&&(xe.current.add(ne.id),i(ne.id))},[ee,n,d,i]),h.jsxs("div",{className:Te.container,children:[h.jsxs("div",{className:Te.header,children:[h.jsx("span",{children:"Projects"}),h.jsxs("div",{className:Te.headerActions,children:[h.jsx("button",{className:`${Te.groupToggle} ${A?Te.groupToggleActive:""}`,onClick:F,"aria-label":A?"Switch to tree view":"Group tasks by status","aria-pressed":A,title:A?"Switch to tree view":"Group tasks by status","data-testid":"group-by-status-toggle",children:"≡"}),h.jsx("button",{className:Te.addButton,onClick:()=>T(!_),"aria-label":"Create project",title:"Create project",children:"+"})]})]}),n.length>0&&h.jsx("input",{type:"text",value:ee,onChange:ne=>ge(ne.target.value),placeholder:"Filter...","aria-label":"Filter projects and tasks",className:Te.searchInput,"data-testid":"sidebar-search"}),_&&h.jsxs("div",{className:Te.createForm,children:[h.jsx("input",{type:"text",value:E,onChange:ne=>j(ne.target.value),onKeyDown:ne=>ne.key==="Enter"&&G(),placeholder:"Project name...",autoFocus:!0,disabled:r,className:Te.createInput}),h.jsx("button",{onClick:G,className:Te.createButton,disabled:r,children:r?h.jsx(l0,{size:"sm",label:"Creating project"}):"OK"})]}),r&&h.jsxs("div",{className:Te.creatingHint,children:[h.jsx(l0,{size:"sm",label:"Creating project"}),"Creating project…"]}),n.length===0&&!_&&h.jsxs("div",{className:Te.emptyCta,children:[h.jsx("button",{className:Te.ctaButton,onClick:()=>T(!0),children:"Create Project"}),h.jsx("div",{className:Te.ctaDescription,children:"Organize your work into projects"})]}),n.map(ne=>{if(Ae&&!Ae.has(ne.id))return null;const ke=pe!==null,H=d.has(ne.id)||ke,ie=a.filter(Be=>Be.projectId===ne.id),Ge=(he==null?void 0:he.has(ne.id))??!1,nt=ke&&!Ge?A?pe:We:null,Bt=nt?ie.filter(Be=>nt.has(Be.id)):ie,wt=le===ne.id,qe=H&&!A?WD(Bt):[];return h.jsxs("div",{children:[h.jsxs("div",{onClick:()=>{wt?Q(ne.id):(H||Q(ne.id),u(ql(ne.id)))},className:`${Te.projectRow} ${wt?Te.selected:""}`,children:[h.jsx("span",{className:`${Te.expandArrow} ${H?Te.expanded:""}`,children:"▸"}),h.jsx("span",{className:Te.projectName,title:ne.name,children:ne.name}),h.jsx("span",{className:Te.taskCount,children:ie.length>0&&`${ie.filter(Be=>Be.status==="complete").length}/${ie.length}`}),h.jsx("button",{onClick:Be=>{Be.stopPropagation(),u(Ms(ne.id))},title:"New task",className:Te.newTaskButton,children:"+"})]}),h.jsx(Xn,{children:H&&h.jsxs(nn.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:[A?QD(Bt,K).map(Be=>h.jsx(JD,{group:Be,isExpanded:V(ne.id,Be.status),onToggle:()=>q(ne.id,Be.status),selectedTaskId:se,navigate:u,titleHighlights:De},Be.status)):qe.map(Be=>h.jsx(M1,{node:Be,depth:0,expandedTasks:m,toggleTask:O,selectedTaskId:se,navigate:u,projectId:ne.id,taskStatusById:K,titleHighlights:De},Be.id)),Bt.length===0&&h.jsx("div",{className:Te.emptyTaskCta,children:h.jsx("button",{className:Te.createTaskLink,onClick:()=>u(Ms(ne.id)),children:"+ Create Task"})})]})})]},ne.id)})]})}const tk="_container_lovia_1",nk="_content_lovia_40",c0={container:tk,content:nk},ak=320,R1=220,O1=600,B1="grackle-sidebar-width";function sk(){try{const n=localStorage.getItem(B1);if(n!==null){const a=Number(n);if(Number.isFinite(a)&&a>=R1&&a<=O1)return a}}catch{}return ak}function ik(n){try{localStorage.setItem(B1,String(n))}catch{}}function lk(){const[n]=S.useState(sk),a=S.useRef(null);return S.useEffect(()=>{const i=a.current;if(!i)return;const o=new ResizeObserver(r=>{for(const u of r){const d=u.borderBoxSize[0];if(d){const p=Math.round(d.inlineSize);p>=R1&&p<=O1&&ik(p)}}});return o.observe(i),()=>{o.disconnect()}},[]),h.jsx("div",{className:c0.container,ref:a,"data-testid":"sidebar",style:{width:n},children:h.jsx("div",{className:c0.content,children:h.jsx(ek,{})})})}const ok="_bar_8ghh5_1",rk="_barColumn_8ghh5_32",ck="_barRow_8ghh5_63",uk="_input_8ghh5_74",dk="_inputSmall_8ghh5_109",fk="_select_8ghh5_178",hk="_btnPrimary_8ghh5_214",pk="_btnDanger_8ghh5_245",mk="_btnGhost_8ghh5_284",gk="_badge_8ghh5_312",yk="_statusText_8ghh5_322",vk="_statusCompleted_8ghh5_327",bk="_statusFailed_8ghh5_331",Sk="_statusBlocked_8ghh5_335",_k="_hintText_8ghh5_340",xk="_creatingHint_8ghh5_345",Tk="_errorHint_8ghh5_353",Ek="_disconnectHint_8ghh5_359",de={bar:ok,barColumn:rk,barRow:ck,input:uk,inputSmall:dk,select:fk,btnPrimary:hk,btnDanger:pk,btnGhost:mk,badge:gk,statusText:yk,statusCompleted:vk,statusFailed:bk,statusBlocked:Sk,hintText:_k,creatingHint:xk,errorHint:Tk,disconnectHint:Ek};function u0(n,a){if(!n)return!1;const i=a.find(o=>o.id===n);return i!==void 0&&(i.status==="disconnected"||i.status==="error")}function d0({environmentId:n,onReconnect:a}){return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:de.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),h.jsx("button",{type:"button",onClick:()=>a(n),className:de.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function Ck(){const{spawn:n,sendInput:a,kill:i,sessions:o,tasks:r,environments:u,personas:d,addEnvironment:p,provisionEnvironment:m,codespaces:g,codespaceError:v,codespaceListError:y,codespaceCreating:_,listCodespaces:T,createCodespace:E}=Ht(),{showToast:j}=eo(),A=Un(),[C]=Mf(),M=$t("/sessions/:sessionId"),R=$t("/tasks/:taskId"),Y=$t("/tasks/:taskId/stream"),w=$t("/tasks/:taskId/findings"),F=$t("/tasks/:taskId/edit"),q=$t("/sessions/new"),V=$t("/environments/new"),W=$t("/projects/:projectId"),ae=$t("/tasks/new"),se=$t("/"),le=$t("/settings/*"),z=M==null?void 0:M.params.sessionId,K=(R==null?void 0:R.params.taskId)??(Y==null?void 0:Y.params.taskId)??(w==null?void 0:w.params.taskId),Q=!!q,O=!!V,G=!!W,ee=!!ae,ge=!!F,pe=!!se&&!Q&&!O&&!G&&!ee,We=!!le,Ae=Q?C.get("env")??"":"",[he,De]=S.useState(""),[xe,ne]=S.useState(""),[ke,H]=S.useState(""),[ie,Ge]=S.useState("local"),[nt,Bt]=S.useState(""),[wt,qe]=S.useState(""),[Be,Dn]=S.useState(""),[Ea,Ca]=S.useState(""),[In,Qn]=S.useState(""),[kn,Jn]=S.useState(""),[J,te]=S.useState(""),[oe,Se]=S.useState(""),[ve,ze]=S.useState(""),[je,gt]=S.useState("pick"),Ce=z?o.find(Ee=>Ee.id===z):void 0,dt=K?r.find(Ee=>Ee.id===K):void 0,yt=(dt==null?void 0:dt.latestSessionId)||void 0,Le=yt?o.find(Ee=>Ee.id===yt):void 0,Dt=dt?dt.dependsOn.some(Ee=>{const Me=r.find(xt=>xt.id===Ee);return Me&&Me.status!=="complete"}):!1;if(pe||We)return h.jsx("div",{className:de.bar,children:h.jsx("span",{className:de.hintText,children:"Select a session or click + to start"})});if(ge||ee)return h.jsx(h.Fragment,{});if(O){const Ee=ce=>{if(!ce.trim())return!0;const Tt=Number(ce);return Number.isInteger(Tt)&&Tt>=1&&Tt<=65535},Me=()=>!(!ke.trim()||ie==="ssh"&&!nt.trim()||ie==="codespace"&&!kn.trim()||(ie==="local"||ie==="ssh")&&!Ee(wt)),xt=()=>{if(!Me())return;const ce={};if(ie==="local"){if(nt.trim()&&(ce.host=nt.trim()),wt.trim()){const Tt=Number(wt);Number.isInteger(Tt)&&(ce.port=Tt)}}else if(ie==="ssh"){if(ce.host=nt.trim(),Be.trim()&&(ce.user=Be.trim()),wt.trim()){const Tt=Number(wt);Number.isInteger(Tt)&&(ce.sshPort=Tt)}J.trim()&&(ce.identityFile=J.trim())}else ie==="docker"?(Ea.trim()&&(ce.image=Ea.trim()),In.trim()&&(ce.repo=In.trim())):ie==="codespace"&&(ce.codespaceName=kn.trim());p(ke.trim(),ie,ce),j("Environment added successfully","success"),H(""),Ge("local"),Bt(""),qe(""),Dn(""),Ca(""),Qn(""),Jn(""),te(""),Se(""),ze(""),gt("pick"),A(Ni,{replace:!0})};return h.jsxs("div",{className:de.barColumn,children:[h.jsxs("div",{className:de.barRow,children:[h.jsx("span",{className:de.badge,children:"new env"}),h.jsx("input",{type:"text",value:ke,onChange:ce=>H(ce.target.value),placeholder:"Environment name...",autoFocus:!0,className:de.input}),h.jsxs("select",{value:ie,onChange:ce=>{Ge(ce.target.value),ce.target.value==="codespace"&&(T(),gt("pick"),Jn(""))},className:de.select,children:[h.jsx("option",{value:"local",children:"local"}),h.jsx("option",{value:"ssh",children:"ssh"}),h.jsx("option",{value:"docker",children:"docker"}),h.jsx("option",{value:"codespace",children:"codespace"})]}),h.jsx("button",{onClick:xt,disabled:!Me(),className:de.btnPrimary,children:"Add"})]}),h.jsxs("div",{className:de.barRow,children:[ie==="local"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:nt,onChange:ce=>Bt(ce.target.value),placeholder:"Host (optional)...",className:de.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:wt,onChange:ce=>qe(ce.target.value),placeholder:"Port (optional)...",className:de.inputSmall})]}),ie==="ssh"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:nt,onChange:ce=>Bt(ce.target.value),placeholder:"Host (required)...",className:de.inputSmall}),h.jsx("input",{type:"text",value:Be,onChange:ce=>Dn(ce.target.value),placeholder:"User (optional)...",className:de.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:wt,onChange:ce=>qe(ce.target.value),placeholder:"SSH port (optional)...",className:de.inputSmall}),h.jsx("input",{type:"text",value:J,onChange:ce=>te(ce.target.value),placeholder:"Identity file (optional)...",className:de.inputSmall})]}),ie==="docker"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Ea,onChange:ce=>Ca(ce.target.value),placeholder:"Image (optional)...",className:de.inputSmall}),h.jsx("input",{type:"text",value:In,onChange:ce=>Qn(ce.target.value),placeholder:"Repo (optional)...",className:de.inputSmall})]}),ie==="codespace"&&je==="pick"&&h.jsxs(h.Fragment,{children:[!y&&h.jsxs("select",{value:kn,onChange:ce=>{ce.target.value==="__create__"?(gt("create"),Jn("")):(Jn(ce.target.value),ce.target.value&&!ke.trim()&&H(ce.target.value))},disabled:_,className:de.select,children:[h.jsx("option",{value:"",children:"Select a codespace..."}),g.map(ce=>h.jsxs("option",{value:ce.name,children:[ce.name," (",ce.repository,") — ",ce.state]},ce.name)),h.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),_&&h.jsx("span",{className:de.creatingHint,children:"Creating codespace..."}),y&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:de.errorHint,children:y}),h.jsx("input",{type:"text",value:kn,onChange:ce=>Jn(ce.target.value),placeholder:"Or enter codespace name manually...",className:de.inputSmall})]}),v&&!y&&h.jsx("span",{className:de.errorHint,children:v})]}),ie==="codespace"&&je==="create"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:oe,onChange:ce=>Se(ce.target.value),placeholder:"owner/repo",className:de.inputSmall}),h.jsx("input",{type:"text",value:ve,onChange:ce=>ze(ce.target.value),placeholder:"Machine type (optional)...",className:de.inputSmall}),h.jsx("button",{onClick:()=>{oe.trim()&&(E(oe.trim(),ve.trim()||void 0),gt("pick"),Se(""),ze(""))},disabled:!oe.trim(),className:de.btnPrimary,children:"Create"}),h.jsx("button",{onClick:()=>{gt("pick"),Se(""),ze("")},className:de.btnGhost,children:"Cancel"})]})]})]})}if(G)return h.jsx("div",{className:de.bar,children:h.jsx("span",{className:de.hintText,children:"Select a task or click + to create one"})});if(K&&dt){if(dt.status==="not_started"){const Ee=Dt?dt.dependsOn.map(Me=>r.find(xt=>xt.id===Me)).filter(Me=>Me&&Me.status!=="complete").map(Me=>Me.title):[];return h.jsx("div",{className:de.bar,children:Dt?h.jsxs("span",{className:de.statusBlocked,children:["Blocked by: ",Ee.join(", ")]}):h.jsx("span",{className:de.hintText,children:"Use the buttons above to start or manage this task"})})}if(dt.status==="working"||dt.status==="paused"){if((Le==null?void 0:Le.status)==="idle"){const Me=Le.environmentId,xt=u0(Me,u),ce=Tt=>{Tt.preventDefault();const Mn=dt.latestSessionId||yt;!he.trim()||!Mn||xt||(a(Mn,he),De(""))};return h.jsxs("form",{onSubmit:ce,className:de.bar,children:[xt&&Me&&h.jsx(d0,{environmentId:Me,onReconnect:m}),h.jsx("input",{type:"text",value:he,onChange:Tt=>De(Tt.target.value),placeholder:"Type a message...",autoFocus:!xt,disabled:xt,className:de.input}),h.jsx("span",{title:xt?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!he.trim()||xt,className:de.btnPrimary,children:"Send"})})]})}return h.jsx("div",{className:de.bar,children:h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:de.input})})}if(dt.status==="complete")return h.jsxs("div",{className:de.bar,children:[h.jsx("span",{className:`${de.statusText} ${de.statusCompleted}`,children:"Task completed"}),h.jsx("button",{onClick:()=>A(Ms(dt.projectId)),className:de.btnPrimary,children:"+ New Task"})]});if(dt.status==="failed")return h.jsx("div",{className:de.bar,children:h.jsx("span",{className:`${de.statusText} ${de.statusFailed}`,children:"Task failed"})})}if(Q){const Ee=Me=>{Me.preventDefault(),!(!he.trim()||!Ae)&&(n(Ae,he,xe),j("Session started","success"),De(""),ne(""))};return h.jsxs("form",{onSubmit:Ee,className:de.bar,children:[h.jsx("span",{className:de.badge,children:"new chat"}),h.jsx("input",{type:"text",value:he,onChange:Me=>De(Me.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:de.input}),h.jsxs("select",{value:xe,onChange:Me=>ne(Me.target.value),className:de.select,children:[h.jsx("option",{value:"",children:"(Default)"}),d.map(Me=>h.jsx("option",{value:Me.id,children:Me.name},Me.id))]}),h.jsx("button",{type:"submit",disabled:!he.trim()||!Ae,className:de.btnPrimary,children:"Go"})]})}if(z){const Ee=(Ce==null?void 0:Ce.status)==="running",Me=(Ce==null?void 0:Ce.status)==="idle",xt=Ce!==void 0&&["completed","failed","interrupted"].includes(Ce.status);if(Ee)return h.jsxs("div",{className:de.bar,children:[h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:de.input}),h.jsx("button",{onClick:()=>i(z),className:de.btnDanger,title:"Stop session",children:"Stop"})]});if(Me){const ce=u0(Ce.environmentId,u),Tt=Mn=>{Mn.preventDefault(),!(!he.trim()||ce)&&(a(z,he),De(""))};return h.jsxs("form",{onSubmit:Tt,className:de.bar,children:[ce&&Ce.environmentId&&h.jsx(d0,{environmentId:Ce.environmentId,onReconnect:m}),h.jsx("input",{type:"text",value:he,onChange:Mn=>De(Mn.target.value),placeholder:"Type a message...",autoFocus:!ce,disabled:ce,className:de.input}),h.jsx("span",{title:ce?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!he.trim()||ce,className:de.btnPrimary,children:"Send"})}),h.jsx("button",{type:"button",onClick:()=>i(z),className:de.btnDanger,title:"Stop session",children:"Stop"})]})}if(xt)return h.jsxs("div",{className:de.bar,children:[h.jsxs("span",{className:`${de.statusText} ${de.hintText}`,children:["Session ",Ce.status]}),h.jsx("button",{onClick:()=>A(U0(Ce.environmentId)),className:de.btnPrimary,children:"+ New Chat"})]})}return h.jsx("div",{className:de.bar,children:h.jsx("span",{className:de.hintText,children:"Loading..."})})}const Ak="_toast_da8ll_1",jk="_success_da8ll_18",Nk="_icon_da8ll_22",wk="_error_da8ll_25",Dk="_warning_da8ll_32",kk="_info_da8ll_38",Mk="_message_da8ll_53",Rk="_close_da8ll_60",Ml={toast:Ak,success:jk,icon:Nk,error:wk,warning:Dk,info:kk,message:Mk,close:Rk},Ok={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function Bk({toast:n,onDismiss:a}){return S.useEffect(()=>{const i=setTimeout(()=>a(n.id),n.duration);return()=>clearTimeout(i)},[n.id,n.duration,a]),h.jsxs(nn.div,{className:`${Ml.toast} ${Ml[n.variant]}`,role:"status",initial:{opacity:0,y:-16,scale:.94},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.94},transition:{duration:.2,ease:"easeOut"},layout:!0,children:[h.jsx("span",{className:Ml.icon,"aria-hidden":"true",children:Ok[n.variant]}),h.jsx("span",{className:Ml.message,children:n.message}),h.jsx("button",{type:"button",className:Ml.close,onClick:()=>a(n.id),"aria-label":"Dismiss notification",children:"×"})]})}const Lk="_container_qqse2_1",Uk={container:Lk};function Ik(){const{toasts:n,dismissToast:a}=eo();return h.jsx("div",{className:Uk.container,"data-testid":"toast-container",children:h.jsx(Xn,{children:n.map(i=>h.jsx(Bk,{toast:i,onDismiss:a},i.id))})})}function zk(n,a){const i=S.useRef(null);S.useEffect(()=>{const o=i.current;if(i.current=n,o===null)return;const r=new Map;for(const d of o)r.set(d.id,d);const u=new Set;for(const d of n){u.add(d.id);const p=r.get(d.id);if(p&&p.status!==d.status&&d.status!=="sleeping"){if(d.status==="connecting"){a("Provisioning environment…","info");continue}d.status==="connected"?a("Environment connected","success"):d.status==="error"?a("Environment provision failed","error"):d.status==="disconnected"&&(p.status==="connected"?a("Environment disconnected","warning"):a("Environment stopped","info"))}}for(const d of o)u.has(d.id)||a("Environment removed","info")},[n,a])}const Vk="_panelContainer_yidfr_1",Pk="_emptyState_yidfr_8",Hk="_fadeIn_yidfr_1",Gk="_projectSummary_yidfr_17",Fk="_projectSummaryTitle_yidfr_28",qk="_projectSummarySubtitle_yidfr_32",$k="_header_yidfr_36",Yk="_headerInfo_yidfr_69",Kk="_killButton_yidfr_75",Zk="_headerTitle_yidfr_104",Xk="_headerActions_yidfr_119",Qk="_taskStatusBadge_yidfr_126",Jk="_taskBranch_yidfr_135",Wk="_taskBlockedBadge_yidfr_141",eM="_btnPrimary_yidfr_149",tM="_btnDanger_yidfr_180",nM="_btnGhost_yidfr_219",aM="_rejectInput_yidfr_245",sM="_tabBar_yidfr_275",iM="_tab_yidfr_275",lM="_active_yidfr_301",oM="_eventScroll_yidfr_306",rM="_tabContent_yidfr_312",cM="_noContext_yidfr_317",uM="_overviewContent_yidfr_323",dM="_overviewDashboard_yidfr_332",fM="_overviewHero_yidfr_338",hM="_statusBadge_yidfr_345",pM="_statusPending_yidfr_357",mM="_statusAssigned_yidfr_362",gM="_statusInProgress_yidfr_367",yM="_statusReview_yidfr_372",vM="_statusDone_yidfr_377",bM="_statusFailed_yidfr_382",SM="_statusWaitingInput_yidfr_387",_M="_overviewBranchPill_yidfr_392",xM="_branchLink_yidfr_407",TM="_overviewSection_yidfr_418",EM="_overviewLabel_yidfr_424",CM="_overviewValue_yidfr_431",AM="_overviewMuted_yidfr_436",jM="_overviewMarkdown_yidfr_442",NM="_envRow_yidfr_511",wM="_envDot_yidfr_517",DM="_envDotGreen_yidfr_524",kM="_envDotYellow_yidfr_528",MM="_envDotRed_yidfr_532",RM="_envDotGray_yidfr_536",OM="_depList_yidfr_540",BM="_depItem_yidfr_546",LM="_depBlocked_yidfr_553",UM="_depDone_yidfr_557",IM="_timeline_yidfr_561",zM="_timelineRow_yidfr_567",VM="_timelineKey_yidfr_574",PM="_timelineValue_yidfr_580",HM="_timelineDelta_yidfr_584",GM="_reviewNotes_yidfr_595",FM="_overviewDescription_yidfr_606",qM="_waitingMessage_yidfr_612",$M="_errorMessage_yidfr_616",YM="_eventOverflowWarning_yidfr_620",KM="_attemptSelector_yidfr_634",ZM="_attemptLabel_yidfr_650",XM="_attemptButton_yidfr_654",QM="_attemptActive_yidfr_671",JM="_attemptStatus_yidfr_677",WM="_emptyCta_yidfr_683",eR="_ctaTitle_yidfr_695",tR="_ctaDescription_yidfr_701",nR="_ctaButton_yidfr_708",aR="_ctaLink_yidfr_743",sR="_projectHeader_yidfr_757",iR="_projectName_yidfr_782",lR="_projectMeta_yidfr_795",oR="_metaRow_yidfr_803",rR="_metaLabel_yidfr_816",cR="_metaValue_yidfr_831",uR="_metaPlaceholder_yidfr_841",dR="_editButton_yidfr_846",fR="_editInput_yidfr_862",hR="_editTextarea_yidfr_894",pR="_editSelect_yidfr_930",mR="_archiveButton_yidfr_963",gR="_repoLink_yidfr_993",yR="_metaValueClickable_yidfr_1003",vR="_editHint_yidfr_1022",bR="_editError_yidfr_1031",SR="_editInputInvalid_yidfr_1038",_R="_unsavedDot_yidfr_1043",xR="_metaToggle_yidfr_1051",TR="_metaToggleArrow_yidfr_1072",ER="_metaToggleArrowOpen_yidfr_1077",CR="_progressBarContainer_yidfr_1081",AR="_progressBar_yidfr_1081",jR="_progressFill_yidfr_1097",NR="_progressLabel_yidfr_1104",wR="_metaTimestamps_yidfr_1111",DR="_metaTimestamp_yidfr_1111",kR="_worktreeToggle_yidfr_1133",MR="_editFieldWrapper_yidfr_1148",D={panelContainer:Vk,emptyState:Pk,fadeIn:Hk,projectSummary:Gk,projectSummaryTitle:Fk,projectSummarySubtitle:qk,header:$k,headerInfo:Yk,killButton:Kk,headerTitle:Zk,headerActions:Xk,taskStatusBadge:Qk,taskBranch:Jk,taskBlockedBadge:Wk,btnPrimary:eM,btnDanger:tM,btnGhost:nM,rejectInput:aM,tabBar:sM,tab:iM,active:lM,eventScroll:oM,tabContent:rM,noContext:cM,overviewContent:uM,overviewDashboard:dM,overviewHero:fM,statusBadge:hM,statusPending:pM,statusAssigned:mM,statusInProgress:gM,statusReview:yM,statusDone:vM,statusFailed:bM,statusWaitingInput:SM,overviewBranchPill:_M,branchLink:xM,overviewSection:TM,overviewLabel:EM,overviewValue:CM,overviewMuted:AM,overviewMarkdown:jM,envRow:NM,envDot:wM,envDotGreen:DM,envDotYellow:kM,envDotRed:MM,envDotGray:RM,depList:OM,depItem:BM,depBlocked:LM,depDone:UM,timeline:IM,timelineRow:zM,timelineKey:VM,timelineValue:PM,timelineDelta:HM,reviewNotes:GM,overviewDescription:FM,waitingMessage:qM,errorMessage:$M,eventOverflowWarning:YM,attemptSelector:KM,attemptLabel:ZM,attemptButton:XM,attemptActive:QM,attemptStatus:JM,emptyCta:WM,ctaTitle:eR,ctaDescription:tR,ctaButton:nR,ctaLink:aR,projectHeader:sR,projectName:iR,projectMeta:lR,metaRow:oR,metaLabel:rR,metaValue:cR,metaPlaceholder:uR,editButton:dR,editInput:fR,editTextarea:hR,editSelect:pR,archiveButton:mR,repoLink:gR,metaValueClickable:yR,editHint:vR,editError:bR,editInputInvalid:SR,unsavedDot:_R,metaToggle:xR,metaToggleArrow:TR,metaToggleArrowOpen:ER,progressBarContainer:CR,progressBar:AR,progressFill:jR,progressLabel:NR,metaTimestamps:wR,metaTimestamp:DR,worktreeToggle:kR,editFieldWrapper:MR};function RR(){const{projects:n,createProject:a}=Ht();return n.length===0?h.jsxs("div",{className:D.emptyCta,children:[h.jsx("div",{className:D.ctaTitle,children:"Welcome to Grackle"}),h.jsx("div",{className:D.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),h.jsx("button",{className:D.ctaButton,onClick:()=>{const i=window.prompt("Project name:");i!=null&&i.trim()&&a(i.trim())},children:"Create Your First Project"})]}):h.jsx("div",{className:D.emptyState,children:"Select a project or task to get started"})}function OR(n,a){const i=[];let o=n;const r=new Set;for(;o&&a.has(o)&&!r.has(o);){r.add(o);const u=a.get(o);i.unshift(u),o=u.parentTaskId||void 0}return i}const Rs={label:"Home",url:"/"};function BR(n){return n?[Rs,{label:"Settings",url:"/settings"},{label:n,url:void 0}]:[Rs,{label:"Settings",url:void 0}]}function LR(){return[Rs,{label:"New Environment",url:void 0}]}function UR(){return[Rs,{label:"New Chat",url:void 0}]}function IR(n){return[Rs,{label:`Session ${n.slice(0,8)}`,url:void 0}]}function zR(n,a){const i=a.find(o=>o.id===n);return[Rs,{label:(i==null?void 0:i.name)??"Project",url:void 0}]}function VR(n,a,i){const o=OR(n,i),r=i.get(n),u=r==null?void 0:r.projectId,d=u?a.find(g=>g.id===u):void 0,p=[Rs];d&&p.push({label:d.name,url:ql(d.id)});for(let g=0;g<o.length-1;g++)p.push({label:o[g].title,url:es(o[g].id)});const m=o[o.length-1];return p.push({label:(m==null?void 0:m.title)??n,url:void 0}),p}function PR(){const n=UR();return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Ui,{segments:n}),h.jsx("div",{className:D.emptyState,children:"Enter a prompt below to start a new session"})]})}const L1=50;function HR(n,a,i,o,r=L1){return o?n<r:a-n-i<r}function GR(n,a){const i=a-n;return i>0?i:0}function FR({scrollRef:n,contentLength:a,isReversed:i}){const[o,r]=S.useState(!0),u=S.useRef(0),d=S.useRef(!1),p=S.useRef(0);S.useEffect(()=>{const g=n.current;if(!g)return;let v=!0;const y=()=>{p.current||(p.current=requestAnimationFrame(()=>{p.current=0;const _=HR(g.scrollTop,g.scrollHeight,g.clientHeight,i,L1);_!==v&&(v=_,r(_))}))};return g.addEventListener("scroll",y,{passive:!0}),()=>{g.removeEventListener("scroll",y),p.current&&(cancelAnimationFrame(p.current),p.current=0)}},[n,i]),S.useLayoutEffect(()=>{const g=n.current;!g||d.current||(d.current=!0,i?g.scrollTop=0:g.scrollTop=g.scrollHeight,r(!0))},[n,i]),S.useLayoutEffect(()=>{const g=n.current;if(g){if(i&&!o){const v=GR(u.current,g.scrollHeight);v>0&&(g.scrollTop+=v)}o&&(i?g.scrollTo({top:0,behavior:"smooth"}):g.scrollTo({top:g.scrollHeight,behavior:"smooth"})),u.current=g.scrollHeight}},[a,o,i,n]);const m=S.useCallback(()=>{const g=n.current;if(!g)return;const v=i?0:g.scrollHeight;g.scrollTo({top:v,behavior:"smooth"}),r(!0)},[n,i]);return{isAtAnchor:o,scrollToAnchor:m}}const qR="_wrapper_p24zt_1",$R="_scrollContainer_p24zt_9",YR="_toolbar_p24zt_15",KR="_directionToggle_p24zt_22",ZR="_scrollToAnchor_p24zt_60",XR="_scrollToAnchorBottom_p24zt_84",QR="_scrollToAnchorTop_p24zt_88",As={wrapper:qR,scrollContainer:$R,toolbar:YR,directionToggle:KR,scrollToAnchor:ZR,scrollToAnchorBottom:XR,scrollToAnchorTop:QR},U1="grackle-stream-direction";function JR(){try{return localStorage.getItem(U1)==="reversed"}catch{return!1}}function WR({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:D.eventOverflowWarning,role:"alert",children:["⚠"," ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function I1({events:n,eventsDropped:a,emptyState:i}){const o=S.useRef(null),[r,u]=S.useState(JR),d=SN(),p=S.useMemo(()=>r?[...n].reverse():n,[n,r]),{isAtAnchor:m,scrollToAnchor:g}=FR({scrollRef:o,contentLength:n.length,isReversed:r}),v=()=>{const T=!r;u(T);try{localStorage.setItem(U1,T?"reversed":"default")}catch{}},y=d?0:.2,_=r?-8:8;return h.jsxs("div",{className:As.wrapper,children:[h.jsx("div",{className:As.toolbar,children:h.jsx("button",{className:As.directionToggle,onClick:v,title:r?"Showing newest first":"Showing oldest first","aria-label":r?"Switch to newest at bottom":"Switch to newest at top","data-testid":"direction-toggle",children:r?"↓":"↑"})}),h.jsxs("div",{ref:o,className:As.scrollContainer,"data-testid":"event-stream-scroll",children:[n.length===0&&i,h.jsx(WR,{eventsDropped:a}),h.jsx(Xn,{initial:!1,children:p.map((T,E)=>{const j=r?n.length-1-E:E;return h.jsx(nn.div,{initial:{opacity:0,y:_},animate:{opacity:1,y:0},transition:{duration:y,ease:"easeOut"},children:h.jsx($w,{event:T,toolUseCtx:T.toolUseCtx})},`${T.sessionId}-${T.timestamp}-${j}`)})})]}),h.jsx(Xn,{children:!m&&h.jsxs(nn.button,{className:`${As.scrollToAnchor} ${r?As.scrollToAnchorTop:As.scrollToAnchorBottom}`,onClick:g,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.15},"aria-label":"Scroll to latest","data-testid":"scroll-to-anchor",children:[r?"↑":"↓"," New events"]})})]})}function z1(n){const a=[];for(const i of n){const o=a[a.length-1];i.eventType==="text"&&(o==null?void 0:o.eventType)==="text"?a[a.length-1]={...o,content:o.content+i.content}:a.push(i)}return a}function V1(n){const a=new Map;for(const u of n)if(u.raw)try{a.set(u,JSON.parse(u.raw))}catch{}const i=new Map;for(const u of n){if(u.eventType!=="tool_use")continue;const d=a.get(u);if(!(!d||typeof d.id!="string"))try{const p=JSON.parse(u.content);i.set(d.id,{tool:p.tool,args:p.args})}catch{}}const o=new Set;return n.map(u=>{if(u.eventType!=="tool_result")return u;const d=a.get(u);if(!d||typeof d.tool_use_id!="string")return u;const p=i.get(d.tool_use_id);return p?(o.add(d.tool_use_id),{...u,toolUseCtx:p}):u}).filter(u=>{if(u.eventType!=="tool_use")return!0;const d=a.get(u);return d&&typeof d.id=="string"?!o.has(d.id):!0})}function e3({sessionId:n,session:a,isActive:i,onKill:o}){return h.jsxs("div",{className:D.header,children:[h.jsxs("span",{children:["Session: ",n.slice(0,8),a&&` | ${a.runtime} | ${a.status}`]}),h.jsxs("span",{className:D.headerInfo,children:[a&&h.jsx("span",{children:a.prompt.length>60?a.prompt.slice(0,60)+"...":a.prompt}),i&&h.jsx("button",{onClick:()=>o(n),title:"Stop session",className:D.killButton,children:"×"})]})]})}function t3({session:n}){const a=n&&["completed","failed","interrupted"].includes(n.status),i=a?`Session ${n.status} with no events recorded.`:"Waiting for events...";return h.jsx("div",{className:a?D.errorMessage:D.waitingMessage,children:i})}function n3(){const{sessionId:n}=Qr(),{events:a,eventsDropped:i,sessions:o,kill:r,loadSessionEvents:u}=Ht(),d=S.useRef(void 0),p=IR(n),m=o.find(y=>y.id===n)??void 0,g=S.useMemo(()=>{const y=n?a.filter(_=>_.sessionId===n):[];return V1(z1(y))},[a,n]);if(S.useEffect(()=>{n&&n!==d.current&&(d.current=n,u(n))},[n,u]),!n)return h.jsx("div",{className:D.emptyState,children:"No session selected"});const v=(m==null?void 0:m.status)==="running"||(m==null?void 0:m.status)==="idle";return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Ui,{segments:p}),h.jsx(e3,{sessionId:n,session:m,isActive:v,onKill:r}),h.jsx(I1,{events:g,eventsDropped:i,emptyState:h.jsx(t3,{session:m})})]})}const f0=220,h0=70,a3=40,s3=60,i3="hierarchy",l3="dependency";function o3(n){return S.useMemo(()=>{if(n.length===0)return{nodes:[],edges:[]};const a=new hy.graphlib.Graph({multigraph:!0});a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:"TB",nodesep:a3,ranksep:s3});const i=new Map(n.map(d=>[d.id,d])),o=new Map;for(const d of n)if(d.parentTaskId&&i.has(d.parentTaskId)){const p=o.get(d.parentTaskId)||[];p.push(d),o.set(d.parentTaskId,p)}for(const d of n)a.setNode(d.id,{width:f0,height:h0});const r=[];for(const d of n){if(d.parentTaskId&&i.has(d.parentTaskId)){const p=`hierarchy-${d.parentTaskId}-${d.id}`;a.setEdge(d.parentTaskId,d.id,{},p),r.push({id:p,source:d.parentTaskId,target:d.id,type:"smoothstep",data:{edgeType:i3},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const p of d.dependsOn)if(i.has(p)){const m=`dependency-${p}-${d.id}`;a.setEdge(p,d.id,{},m),r.push({id:m,source:p,target:d.id,type:"smoothstep",data:{edgeType:l3},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return hy.layout(a),{nodes:n.map(d=>{const p=a.node(d.id),m=o.get(d.id)||[];return{id:d.id,type:"task",position:{x:p.x-f0/2,y:p.y-h0/2},data:{task:d,childCount:m.length,doneChildCount:m.filter(g=>g.status==="complete").length,hasDependencies:d.dependsOn.length>0}}}),edges:r}},[n])}const r3="_dagContainer_js4w6_1",c3="_taskNode_js4w6_26",u3="_taskNodeBorder_js4w6_54",d3="_taskNodeContent_js4w6_60",f3="_taskNodeHeader_js4w6_70",h3="_taskNodeIcon_js4w6_77",p3="_taskNodeTitle_js4w6_82",m3="_taskNodeBadges_js4w6_90",g3="_childBadge_js4w6_95",y3="_depBadge_js4w6_107",v3="_handle_js4w6_119",b3="_emptyCta_js4w6_126",S3="_ctaDescription_js4w6_137",_3="_ctaButton_js4w6_144",Yt={dagContainer:r3,taskNode:c3,taskNodeBorder:u3,taskNodeContent:d3,taskNodeHeader:f3,taskNodeIcon:h3,taskNodeTitle:p3,taskNodeBadges:m3,childBadge:g3,depBadge:y3,handle:v3,emptyCta:b3,ctaDescription:S3,ctaButton:_3};function x3({data:n}){const{task:a,childCount:i,doneChildCount:o,hasDependencies:r}=n,u=as(a.status);return h.jsxs("div",{className:Yt.taskNode,"data-task-id":a.id,"data-task-title":a.title,children:[h.jsx(py,{type:"target",position:my.Top,className:Yt.handle}),h.jsx("div",{className:Yt.taskNodeBorder,style:{backgroundColor:u.color}}),h.jsxs("div",{className:Yt.taskNodeContent,children:[h.jsxs("div",{className:Yt.taskNodeHeader,children:[h.jsx("span",{className:Yt.taskNodeIcon,style:{color:u.color},children:u.icon}),h.jsx("span",{className:Yt.taskNodeTitle,children:a.title})]}),h.jsxs("div",{className:Yt.taskNodeBadges,children:[i>0&&h.jsxs("span",{className:Yt.childBadge,children:[o,"/",i]}),r&&h.jsx("span",{className:Yt.depBadge,children:"dep"})]})]}),h.jsx(py,{type:"source",position:my.Bottom,className:Yt.handle})]})}const T3=cD,E3={task:x3};function C3({projectId:n}){const{tasks:a}=Ht(),i=Un(),{resolvedThemeId:o}=F0(),r=S.useMemo(()=>a.filter(v=>v.projectId===n),[a,n]),{nodes:u,edges:d}=o3(r),p=S.useMemo(()=>{const v=getComputedStyle(document.documentElement),y={};for(const[_,T]of Object.entries(T3))y[_]=v.getPropertyValue(T).trim()||"#6b7a8d";return y},[o]),m=S.useCallback((v,y)=>{i(es(y.id))},[i]),g=S.useCallback(v=>{const y=v.data;return p[y.task.status]||p.pending},[p]);return r.length===0?h.jsxs("div",{className:Yt.emptyCta,children:[h.jsx("button",{className:Yt.ctaButton,onClick:()=>i(Ms(n)),children:"Create Task"}),h.jsx("div",{className:Yt.ctaDescription,children:"Create tasks to see the dependency graph"})]}):h.jsx("div",{className:Yt.dagContainer,children:h.jsxs(ox,{nodes:u,edges:d,nodeTypes:E3,onNodeClick:m,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[h.jsx(rx,{variant:cx.Dots,gap:24,size:1,color:"var(--text-disabled)"}),h.jsx(ux,{showInteractive:!1}),h.jsx(dx,{nodeColor:g,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}function A3({tasks:n,taskStatusById:a,sessionStatusByTaskId:i}){const o=new Map;for(const u of n)if(u.parentTaskId){const d=o.get(u.parentTaskId);d?d.push(u):o.set(u.parentTaskId,[u])}const r=new Map(o0.map(u=>[u,[]]));for(const u of n){const d=gh(u.status),p=u.dependsOn.length>0&&u.dependsOn.some(E=>a.get(E)!=="complete"),m=o.get(u.id)??[],g=m.length,v=m.filter(E=>E.status==="complete").length;let y;if(d==="paused"&&i){const E=i.get(u.id);E==="idle"?y="Needs input":E==="completed"&&(y="Ready to complete")}const _={task:u,isBlocked:p,childCount:g,doneChildCount:v,pausedSubBadge:y},T=r.get(d);T?T.push(_):r.get("not_started").push(_)}for(const u of r.values())u.sort((d,p)=>d.task.sortOrder-p.task.sortOrder);return o0.map(u=>{const d=as(u);return{status:u,label:d.label,style:d,tasks:r.get(u)??[]}})}const j3="_boardContainer_1c4y1_1",N3="_column_1c4y1_17",w3="_columnHeader_1c4y1_34",D3="_columnIcon_1c4y1_47",k3="_columnLabel_1c4y1_52",M3="_columnCount_1c4y1_57",R3="_cardList_1c4y1_67",O3="_emptyPlaceholder_1c4y1_76",B3="_card_1c4y1_67",L3="_cardHeader_1c4y1_107",U3="_cardStatusIcon_1c4y1_113",I3="_cardTitle_1c4y1_119",z3="_cardBadges_1c4y1_127",V3="_badge_1c4y1_134",P3="_blockedBadge_1c4y1_146",H3="_childBadge_1c4y1_151",G3="_depBadge_1c4y1_155",F3="_parentBadge_1c4y1_159",q3="_pausedSubBadge_1c4y1_166",$3="_personaBadge_1c4y1_170",Y3="_envBadge_1c4y1_174",K3="_emptyCta_1c4y1_178",Z3="_ctaButton_1c4y1_188",X3="_ctaDescription_1c4y1_204",Ye={boardContainer:j3,column:N3,columnHeader:w3,columnIcon:D3,columnLabel:k3,columnCount:M3,cardList:R3,emptyPlaceholder:O3,card:B3,cardHeader:L3,cardStatusIcon:U3,cardTitle:I3,cardBadges:z3,badge:V3,blockedBadge:P3,childBadge:H3,depBadge:G3,parentBadge:F3,pausedSubBadge:q3,personaBadge:$3,envBadge:Y3,emptyCta:K3,ctaButton:Z3,ctaDescription:X3};function Q3({projectId:n}){const{tasks:a,sessions:i,personas:o,environments:r}=Ht(),u=Un(),d=S.useMemo(()=>a.filter(y=>y.projectId===n),[a,n]),p=S.useMemo(()=>new Map(a.map(y=>[y.id,y.status])),[a]),m=S.useMemo(()=>new Map(d.map(y=>[y.id,y])),[d]),g=S.useMemo(()=>{const y=new Map(i.map(C=>[C.id,C])),_=new Map(o.map(C=>[C.id,C])),T=new Map(r.map(C=>[C.id,C])),E=new Map,j=new Map,A=new Map;for(const C of d)if(C.latestSessionId){const M=y.get(C.latestSessionId);if(M){if(E.set(C.id,M.status),M.personaId){const R=_.get(M.personaId);R&&j.set(C.id,R.name)}if(M.environmentId){const R=T.get(M.environmentId);R&&A.set(C.id,R.displayName)}}}return{sessionStatusByTaskId:E,personaNameByTaskId:j,environmentNameByTaskId:A}},[d,i,o,r]),v=S.useMemo(()=>A3({tasks:d,taskStatusById:p,sessionStatusByTaskId:g.sessionStatusByTaskId}),[d,p,g]);return d.length===0?h.jsxs("div",{className:Ye.emptyCta,"data-testid":"board-empty-cta",children:[h.jsx("button",{className:Ye.ctaButton,onClick:()=>u(Ms(n)),children:"Create Task"}),h.jsx("div",{className:Ye.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}):h.jsx("div",{className:Ye.boardContainer,"data-testid":"board-container",children:v.map(y=>h.jsxs("section",{className:Ye.column,"data-testid":`board-column-${y.status}`,"aria-label":`${y.label}, ${y.tasks.length} ${y.tasks.length===1?"task":"tasks"}`,children:[h.jsxs("div",{className:Ye.columnHeader,children:[h.jsx("span",{className:Ye.columnIcon,style:{color:y.style.color},children:y.style.icon}),h.jsx("span",{className:Ye.columnLabel,children:y.label}),h.jsx("span",{className:Ye.columnCount,"data-testid":`board-count-${y.status}`,children:y.tasks.length})]}),h.jsx("div",{className:Ye.cardList,children:y.tasks.length===0?h.jsx("div",{className:Ye.emptyPlaceholder,children:"No tasks"}):h.jsx(Xn,{mode:"popLayout",children:y.tasks.map(_=>h.jsx(nn.div,{layout:!0,initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},children:h.jsx(J3,{boardTask:_,tasksById:m,personaName:g.personaNameByTaskId.get(_.task.id),envName:g.environmentNameByTaskId.get(_.task.id),onClick:()=>u(es(_.task.id))})},_.task.id))})})]},y.status))})}function J3({boardTask:n,tasksById:a,personaName:i,envName:o,onClick:r}){const{task:u,isBlocked:d,childCount:p,doneChildCount:m,pausedSubBadge:g}=n,v=as(u.status),y=u.parentTaskId?a.get(u.parentTaskId):void 0;return h.jsxs("div",{className:Ye.card,tabIndex:0,role:"button","data-testid":`board-card-${u.id}`,onClick:r,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),r())},children:[h.jsxs("div",{className:Ye.cardHeader,children:[h.jsx("span",{className:Ye.cardStatusIcon,style:{color:v.color},children:v.icon}),h.jsx("span",{className:Ye.cardTitle,children:u.title})]}),h.jsxs("div",{className:Ye.cardBadges,children:[y&&h.jsx("span",{className:`${Ye.badge} ${Ye.parentBadge}`,title:y.title,children:y.title}),p>0&&h.jsxs("span",{className:`${Ye.badge} ${Ye.childBadge}`,children:[m,"/",p]}),d&&h.jsx("span",{className:`${Ye.badge} ${Ye.blockedBadge}`,children:"blocked"}),u.dependsOn.length>0&&!d&&h.jsx("span",{className:`${Ye.badge} ${Ye.depBadge}`,children:"dep"}),g&&h.jsx("span",{className:`${Ye.badge} ${Ye.pausedSubBadge}`,children:g}),i&&h.jsx("span",{className:`${Ye.badge} ${Ye.personaBadge}`,children:i}),o&&h.jsx("span",{className:`${Ye.badge} ${Ye.envBadge}`,children:o})]})]})}function W3(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?D.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?D.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?D.envDotRed:D.envDotGray}function p0(n){if(!n)return"";const a=new Date(n);if(isNaN(a.getTime()))return"";const o=Date.now()-a.getTime();if(o<0)return"just now";const r=Math.floor(o/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const u=Math.floor(r/60);if(u<24)return`${u}h ago`;const d=Math.floor(u/24);return d<30?`${d}d ago`:a.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function eO(){const{projectId:n}=Qr(),a=Un(),{tasks:i,environments:o,projects:r,personas:u,archiveProject:d,updateProject:p}=Ht(),[m,g]=S.useState("tasks"),[v,y]=S.useState(!1),[_,T]=S.useState(null),[E,j]=S.useState(""),[A,C]=S.useState(""),[M,R]=S.useState(!1),Y=S.useRef(void 0),w=S.useRef(null),F=S.useRef(null),q=S.useRef(null),V=S.useRef(null),W=S.useRef(null),ae=S.useRef(null),se=S.useRef(null),le=zR(n,r);S.useEffect(()=>{const H=Y.current;Y.current=n,!(H===void 0||H===n)&&(_!==null||E!=="")&&(T(null),j(""))},[n,_,E]),S.useEffect(()=>{if(_===null)return;const H=_==="name"?F.current:_==="description"?q.current:_==="repoUrl"?V.current:_==="defaultPersonaId"?ae.current:_==="worktreeBasePath"?se.current:W.current;if(!H)return;const ie=window.setTimeout(()=>{H.focus()},0);return()=>{window.clearTimeout(ie)}},[_]);const z=r.find(H=>H.id===n),K=i.filter(H=>H.projectId===n),Q=K.filter(H=>H.status==="complete").length,O=K.length,G=O>0?Math.round(Q/O*100):0,ee=100,ge=(H,ie)=>{w.current=H,T(H),j(ie),C("")},pe=()=>{w.current=null,T(null),j(""),C("")},We=(H,ie)=>{if(H==="name"){const Ge=ie.trim();if(!Ge)return"Name is required";if(Ge.length>ee)return`Max ${ee} characters`}if(H==="repoUrl"){const Ge=ie.trim();if(Ge&&!/^https?:\/\/.+/.test(Ge))return"Must be a valid http(s) URL"}return""},Ae=H=>{if(!z)return;const ie=E.trim(),Ge=We(H,E);if(Ge){C(Ge);return}if(H==="name"){if(ie===z.name){pe();return}p(z.id,{name:ie})}else if(H==="description"){const nt=E;if(nt===z.description){pe();return}p(z.id,{description:nt})}else if(H==="repoUrl"){if(ie===z.repoUrl){pe();return}p(z.id,{repoUrl:ie})}else if(H==="defaultEnvironmentId"){if(E===z.defaultEnvironmentId){pe();return}p(z.id,{defaultEnvironmentId:E})}else if(H==="defaultPersonaId"){if(E===z.defaultPersonaId){pe();return}p(z.id,{defaultPersonaId:E})}else{if(ie===z.worktreeBasePath){pe();return}p(z.id,{worktreeBasePath:ie})}pe()},he=(H,ie)=>{H.key==="Escape"?pe():H.key==="Enter"&&ie!=="description"&&Ae(ie)},De=H=>z?H==="name"?E.trim()!==z.name:H==="description"?E!==z.description:H==="repoUrl"?E.trim()!==z.repoUrl:H==="defaultEnvironmentId"?E!==z.defaultEnvironmentId:H==="defaultPersonaId"?E!==z.defaultPersonaId:E.trim()!==z.worktreeBasePath:!1,xe=o.find(H=>H.id===(z==null?void 0:z.defaultEnvironmentId)),ne=u.find(H=>H.id===(z==null?void 0:z.defaultPersonaId)),ke=_==="description"?"Tab to save · Esc to cancel":"Enter to save · Esc to cancel";return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Ui,{segments:le}),h.jsxs("div",{className:D.projectHeader,children:[h.jsx("span",{className:D.projectName,"data-testid":"project-name",children:_==="name"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:F,className:`${D.editInput} ${A?D.editInputInvalid:""}`,value:E,onChange:H=>{j(H.target.value),C("")},onBlur:H=>{if(w.current==="name"){w.current=null;return}H.relatedTarget instanceof HTMLElement&&H.relatedTarget.dataset.editAction==="name"||Ae("name")},onKeyDown:H=>he(H,"name"),maxLength:ee,"aria-label":"Project name","data-testid":"edit-name-input"}),De("name")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),A&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:A}),h.jsx("span",{className:D.editHint,children:ke})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>ge("name",(z==null?void 0:z.name)||""),title:"Click to edit name","aria-label":`Edit project name: ${(z==null?void 0:z.name)||n}`,"data-testid":"edit-name-button",children:[(z==null?void 0:z.name)||n,h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})}),h.jsx("button",{className:D.archiveButton,onClick:()=>y(!0),title:"Archive project","data-testid":"archive-project-button",children:"Archive"})]}),h.jsxs("button",{className:D.metaToggle,onClick:()=>R(!M),"aria-expanded":!M,"aria-controls":"project-meta-panel","data-testid":"meta-toggle",children:[h.jsx("span",{className:`${D.metaToggleArrow} ${M?"":D.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!M&&h.jsxs("div",{className:D.projectMeta,"data-testid":"project-meta",id:"project-meta-panel",children:[h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Description"}),h.jsx("div",{className:D.metaValue,children:_==="description"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("textarea",{ref:q,className:D.editTextarea,value:E,onChange:H=>{j(H.target.value),C("")},onBlur:H=>{if(w.current==="description"){w.current=null;return}H.relatedTarget instanceof HTMLElement&&H.relatedTarget.dataset.editAction==="description"||Ae("description")},onKeyDown:H=>he(H,"description"),title:"Project description","aria-label":"Project description","data-testid":"edit-description-input"}),De("description")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),h.jsx("span",{className:D.editHint,children:ke})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>ge("description",(z==null?void 0:z.description)||""),title:"Click to edit description","aria-label":"Edit project description","data-testid":"edit-description-button",children:[z!=null&&z.description?h.jsx("span",{className:D.overviewMarkdown,children:h.jsx(Tf,{remarkPlugins:[Ef],children:z.description})}):h.jsx("span",{className:D.metaPlaceholder,children:"No description"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Repository"}),h.jsx("div",{className:D.metaValue,children:_==="repoUrl"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:V,className:`${D.editInput} ${A?D.editInputInvalid:""}`,value:E,onChange:H=>{j(H.target.value),C("")},onBlur:H=>{if(w.current==="repoUrl"){w.current=null;return}H.relatedTarget instanceof HTMLElement&&H.relatedTarget.dataset.editAction==="repoUrl"||Ae("repoUrl")},onKeyDown:H=>he(H,"repoUrl"),placeholder:"https://github.com/...","aria-label":"Project repository URL","data-testid":"edit-repo-input"}),De("repoUrl")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),A&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:A}),h.jsx("span",{className:D.editHint,children:ke})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:H=>{H.preventDefault(),ge("repoUrl",(z==null?void 0:z.repoUrl)||"")},title:"Click to edit repository URL","aria-label":"Edit project repository URL","data-testid":"edit-repo-button",children:[z!=null&&z.repoUrl&&/^https?:\/\//i.test(z.repoUrl)?h.jsx("a",{className:D.repoLink,href:z.repoUrl,target:"_blank",rel:"noopener noreferrer",onClick:H=>H.stopPropagation(),children:z.repoUrl}):z!=null&&z.repoUrl?h.jsx("span",{children:z.repoUrl}):h.jsx("span",{className:D.metaPlaceholder,children:"No repository"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Environment"}),h.jsx("div",{className:D.metaValue,children:_==="defaultEnvironmentId"?h.jsxs("select",{ref:W,className:D.editSelect,value:E,onChange:H=>{w.current=null,j(H.target.value);const ie=H.target.value;z&&ie!==z.defaultEnvironmentId&&p(z.id,{defaultEnvironmentId:ie}),pe()},onBlur:H=>{if(w.current==="defaultEnvironmentId"){w.current=null;return}H.relatedTarget instanceof HTMLElement&&H.relatedTarget.dataset.editAction==="defaultEnvironmentId"||pe()},title:"Default environment","aria-label":"Project default environment","data-testid":"edit-env-select",children:[h.jsx("option",{value:"",children:"None"}),o.map(H=>h.jsx("option",{value:H.id,children:H.displayName},H.id))]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>ge("defaultEnvironmentId",(z==null?void 0:z.defaultEnvironmentId)||""),title:"Click to change default environment","aria-label":"Edit project default environment","data-testid":"edit-env-button",children:[xe?h.jsxs("span",{className:D.envRow,children:[h.jsx("span",{className:`${D.envDot} ${W3(xe.status)}`}),xe.displayName]}):h.jsx("span",{className:D.metaPlaceholder,children:(z==null?void 0:z.defaultEnvironmentId)||"No default environment"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Persona"}),h.jsx("div",{className:D.metaValue,children:_==="defaultPersonaId"?h.jsxs("select",{ref:ae,className:D.editSelect,value:E,onChange:H=>{w.current=null,j(H.target.value);const ie=H.target.value;z&&ie!==z.defaultPersonaId&&p(z.id,{defaultPersonaId:ie}),pe()},onBlur:H=>{if(w.current==="defaultPersonaId"){w.current=null;return}H.relatedTarget instanceof HTMLElement&&H.relatedTarget.dataset.editAction==="defaultPersonaId"||pe()},title:"Default persona","aria-label":"Project default persona","data-testid":"edit-persona-select",children:[h.jsx("option",{value:"",children:"(Inherit)"}),u.map(H=>h.jsx("option",{value:H.id,children:H.name},H.id))]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>ge("defaultPersonaId",(z==null?void 0:z.defaultPersonaId)||""),title:"Click to change default persona","aria-label":"Edit project default persona","data-testid":"edit-persona-button",children:[ne?h.jsx("span",{children:ne.name}):h.jsx("span",{className:D.metaPlaceholder,children:(z==null?void 0:z.defaultPersonaId)||"(Inherit)"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Worktrees"}),h.jsx("div",{className:D.metaValue,children:h.jsxs("label",{className:D.worktreeToggle,"data-testid":"worktree-toggle",children:[h.jsx("input",{type:"checkbox",checked:(z==null?void 0:z.useWorktrees)??!0,onChange:H=>{z&&p(z.id,{useWorktrees:H.target.checked})}}),h.jsx("span",{children:"Enable worktree isolation"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Working Dir"}),h.jsx("div",{className:D.metaValue,children:_==="worktreeBasePath"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:se,className:`${D.editInput} ${A?D.editInputInvalid:""}`,value:E,onChange:H=>{j(H.target.value),C("")},onBlur:H=>{if(w.current==="worktreeBasePath"){w.current=null;return}H.relatedTarget instanceof HTMLElement&&H.relatedTarget.dataset.editAction==="worktreeBasePath"||Ae("worktreeBasePath")},onKeyDown:H=>he(H,"worktreeBasePath"),placeholder:"/workspaces/my-repo","aria-label":"Working directory","data-testid":"edit-worktree-base-path-input"}),De("worktreeBasePath")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),A&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:A}),h.jsx("span",{className:D.editHint,children:ke})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>ge("worktreeBasePath",(z==null?void 0:z.worktreeBasePath)||""),title:"Click to edit working directory","aria-label":"Edit working directory","data-testid":"edit-worktree-base-path-button",children:[z!=null&&z.worktreeBasePath?h.jsx("span",{children:z.worktreeBasePath}):h.jsx("span",{className:D.metaPlaceholder,children:"Default (server default)"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),z&&h.jsxs("div",{className:D.metaTimestamps,children:[h.jsxs("span",{className:D.metaTimestamp,children:["Created ",p0(z.createdAt)]}),z.updatedAt&&z.updatedAt!==z.createdAt&&h.jsxs("span",{className:D.metaTimestamp,children:["· Updated ",p0(z.updatedAt)]})]})]}),O>0&&h.jsxs("div",{className:D.progressBarContainer,"data-testid":"progress-bar",children:[h.jsx("div",{className:D.progressBar,children:h.jsx("div",{className:D.progressFill,style:{width:`${G}%`}})}),h.jsxs("span",{className:D.progressLabel,children:[Q,"/",O]})]}),h.jsxs("div",{className:D.tabBar,role:"tablist","aria-label":"Project view",children:[h.jsx("button",{role:"tab","aria-selected":m==="graph",className:`${D.tab} ${m==="graph"?D.active:""}`,onClick:()=>g("graph"),children:"Graph"}),h.jsx("button",{role:"tab","aria-selected":m==="board",className:`${D.tab} ${m==="board"?D.active:""}`,onClick:()=>g("board"),"data-testid":"board-tab",children:"Board"}),h.jsx("button",{role:"tab","aria-selected":m==="tasks",className:`${D.tab} ${m==="tasks"?D.active:""}`,onClick:()=>g("tasks"),children:"Tasks"})]}),m==="tasks"&&O>0&&h.jsxs("div",{className:D.projectSummary,children:[h.jsx("span",{className:D.projectSummaryTitle,children:`${Q}/${O} tasks complete`}),h.jsx("span",{className:D.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),m==="tasks"&&O===0&&h.jsxs("div",{className:D.emptyCta,children:[h.jsx("button",{className:D.ctaButton,onClick:()=>a(Ms(n)),children:"Create Task"}),h.jsx("div",{className:D.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),m==="board"&&h.jsx(Q3,{projectId:n}),m==="graph"&&h.jsx(C3,{projectId:n}),h.jsx(lc,{isOpen:v,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{z&&(d(z.id),a("/",{replace:!0})),y(!1)},onCancel:()=>y(!1)})]})}const tO="_container_cddyd_1",nO="_header_cddyd_8",aO="_headerTitle_cddyd_35",sO="_badge_cddyd_44",iO="_headerActions_cddyd_54",lO="_body_cddyd_61",oO="_formContent_cddyd_73",rO="_section_cddyd_85",cO="_label_cddyd_91",uO="_titleInput_cddyd_98",dO="_descriptionTextarea_cddyd_131",fO="_parentContext_cddyd_167",hO="_parentLabel_cddyd_175",pO="_parentName_cddyd_182",mO="_personaSelect_cddyd_186",gO="_depList_cddyd_220",yO="_depItem_cddyd_226",vO="_depItemSelected_cddyd_248",bO="_noDeps_cddyd_252",SO="_btnPrimary_cddyd_258",_O="_btnGhost_cddyd_289",tt={container:tO,header:nO,headerTitle:aO,badge:sO,headerActions:iO,body:lO,formContent:oO,section:rO,label:cO,titleInput:uO,descriptionTextarea:dO,parentContext:fO,parentLabel:hO,parentName:pO,personaSelect:mO,depList:gO,depItem:yO,depItemSelected:vO,noDeps:bO,btnPrimary:SO,btnGhost:_O};function P1({mode:n,taskId:a,projectId:i,parentTaskId:o}){const{tasks:r,personas:u,createTask:d,updateTask:p}=Ht(),{showToast:m}=eo(),g=Un(),v=n==="edit",y=v&&a?r.find(O=>O.id===a):void 0,_=v?(y==null?void 0:y.projectId)??"":i??"",T=v?(y==null?void 0:y.parentTaskId)??"":o??"",E=T?r.find(O=>O.id===T):void 0,[j,A]=S.useState((y==null?void 0:y.title)??""),[C,M]=S.useState((y==null?void 0:y.description)??""),[R,Y]=S.useState((y==null?void 0:y.dependsOn)??[]),[w,F]=S.useState((y==null?void 0:y.defaultPersonaId)??""),[q,V]=S.useState(!1),W=S.useRef(!1);S.useEffect(()=>{v&&y&&!W.current&&(W.current=!0,A(y.title),M(y.description),Y(y.dependsOn),F(y.defaultPersonaId))},[v,y]);const ae=r.filter(O=>O.projectId===_&&(!v||O.id!==a)&&O.id!==T),se=j.trim().length>0&&(!v||y!==void 0)&&(v||_.length>0),le=O=>{Y(G=>G.includes(O)?G.filter(ee=>ee!==O):[...G,O])},z=()=>{!se||q||v&&y===void 0||(v&&a?(p(a,j.trim(),C,R,w),m("Task updated","success"),g(es(a),{replace:!0})):(V(!0),d(_,j.trim(),C,R.length>0?R:void 0,T||void 0,w,()=>{m("Task created","success"),g(ql(_),{replace:!0})},O=>{m(O,"error"),V(!1)})))},K=()=>{g(v&&a?es(a):ql(_))},Q=v?"edit task":T?"child task":"new task";return h.jsxs("div",{className:tt.container,children:[h.jsxs("div",{className:tt.header,children:[h.jsxs("div",{className:tt.headerTitle,children:[h.jsx("span",{className:tt.badge,children:Q}),E&&h.jsxs("span",{className:tt.parentContext,children:[h.jsx("span",{className:tt.parentLabel,children:"Child of"}),h.jsx("span",{className:tt.parentName,children:E.title})]})]}),h.jsxs("div",{className:tt.headerActions,children:[h.jsx("button",{onClick:z,disabled:!se||q,className:tt.btnPrimary,"data-testid":"task-edit-save",children:q?"Creating…":v?"Save Changes":"Create"}),h.jsx("button",{onClick:K,className:tt.btnGhost,children:"Cancel"})]})]}),h.jsx("div",{className:tt.body,children:h.jsxs("div",{className:tt.formContent,children:[h.jsxs("div",{className:tt.section,children:[h.jsx("label",{className:tt.label,htmlFor:"task-edit-title",children:"Title"}),h.jsx("input",{id:"task-edit-title",type:"text",value:j,onChange:O=>A(O.target.value),placeholder:"Task title...",autoFocus:!0,className:tt.titleInput,"data-testid":"task-edit-title",onKeyDown:O=>{O.key==="Enter"&&se&&z()}})]}),h.jsxs("div",{className:tt.section,children:[h.jsx("label",{className:tt.label,htmlFor:"task-edit-description",children:"Description"}),h.jsx("textarea",{id:"task-edit-description",value:C,onChange:O=>M(O.target.value),placeholder:"Describe the task... (markdown supported)",className:tt.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),h.jsxs("div",{className:tt.section,children:[h.jsx("label",{className:tt.label,htmlFor:"task-edit-persona",children:"Default Persona"}),h.jsxs("select",{id:"task-edit-persona",value:w,onChange:O=>F(O.target.value),className:tt.personaSelect,"data-testid":"task-edit-persona",children:[h.jsx("option",{value:"",children:"(Inherit)"}),u.map(O=>h.jsx("option",{value:O.id,children:O.name},O.id))]})]}),h.jsxs("div",{className:tt.section,children:[h.jsx("div",{className:tt.label,children:"Dependencies"}),ae.length===0?h.jsx("div",{className:tt.noDeps,children:"No other tasks in this project"}):h.jsx("div",{className:tt.depList,children:ae.map(O=>{const G=R.includes(O.id);return h.jsxs("label",{className:`${tt.depItem} ${G?tt.depItemSelected:""}`,"data-testid":`dep-option-${O.id}`,children:[h.jsx("input",{type:"checkbox",checked:G,onChange:()=>le(O.id)}),O.title,h.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",O.status,")"]})]},O.id)})})]})]})})]})}function xO(){const[n]=Mf(),a=n.get("project")??"",i=n.get("parent")??void 0;return a?h.jsx(P1,{mode:"new",projectId:a,parentTaskId:i}):h.jsx(wr,{to:"/",replace:!0})}function TO(){const{taskId:n}=Qr();return h.jsx(P1,{mode:"edit",taskId:n})}const EO="_container_1pqxm_1",CO="_emptyState_1pqxm_8",AO="_card_1pqxm_14",jO="_cardHeader_1pqxm_34",NO="_categoryBadge_1pqxm_46",wO="_findingTitle_1pqxm_54",DO="_findingDate_1pqxm_60",kO="_findingContent_1pqxm_72",MO="_tags_1pqxm_78",RO="_tag_1pqxm_78",Gn={container:EO,emptyState:CO,card:AO,cardHeader:jO,categoryBadge:NO,findingTitle:wO,findingDate:DO,findingContent:kO,tags:MO,tag:RO};function OO(n){const a=new Date(n),i=new Date,o=i.getTime()-a.getTime(),r=Math.floor(o/1e3),u=Math.floor(r/60),d=Math.floor(u/60),p=Math.floor(d/24);if(r<60)return"just now";if(u<60)return`${u}m ago`;if(d<24)return`${d}h ago`;if(p===1)return"yesterday";if(p<7)return`${p} days ago`;const m=a.getFullYear()===i.getFullYear(),g=a.toLocaleString("en-US",{month:"short"}),v=a.getDate();return m?`${g} ${v}`:`${g} ${v} ${a.getFullYear()}`}const m0={architecture:{text:"var(--accent-blue)",bg:"var(--accent-blue-dim)"},api:{text:"var(--accent-green)",bg:"var(--accent-green-dim)"},bug:{text:"var(--accent-red)",bg:"var(--accent-red-dim)"},decision:{text:"var(--accent-yellow)",bg:"var(--accent-yellow-dim)"},dependency:{text:"var(--accent-purple)",bg:"var(--accent-purple-dim)"},pattern:{text:"var(--accent-cyan)",bg:"var(--accent-cyan-dim)"},general:{text:"var(--text-secondary)",bg:"var(--bg-elevated)"}};function BO({projectId:n}){const{findings:a}=Ht(),i=a.filter(o=>o.projectId===n);return i.length===0?h.jsx("div",{className:Gn.emptyState,children:"No findings yet. Agents will post discoveries here."}):h.jsx("div",{className:Gn.container,children:i.map((o,r)=>{const u=m0[o.category]||m0.general;return h.jsxs(nn.div,{className:Gn.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:r*.05,duration:.2},children:[h.jsxs("div",{className:Gn.cardHeader,children:[h.jsx("span",{className:Gn.categoryBadge,style:{background:u.bg,color:u.text},children:o.category}),h.jsx("span",{className:Gn.findingTitle,children:o.title}),h.jsx("span",{className:Gn.findingDate,title:o.createdAt,children:OO(o.createdAt)})]}),h.jsx("div",{className:Gn.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&h.jsx("div",{className:Gn.tags,children:o.tags.map(d=>h.jsx("span",{className:Gn.tag,style:{color:u.text,textShadow:`0 0 8px ${u.text}`},children:d},d))})]},o.id)})})}function jr(n){if(!n)return"—";const a=new Date(n);return isNaN(a.getTime())?"—":a.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Gd(n,a){if(!n||!a)return;const i=new Date(a).getTime()-new Date(n).getTime();if(isNaN(i)||i<0)return;const o=Math.floor(i/6e4),r=Math.floor(i%6e4/1e3);if(o===0)return`${r}s`;const u=Math.floor(o/60),d=o%60;return u===0?`${o}m ${r}s`:`${u}h ${d}m`}function LO(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?D.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?D.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?D.envDotRed:D.envDotGray}function UO({status:n}){const a=as(n),i=lD(n);return h.jsx("span",{className:`${D.statusBadge} ${D[i]??D.statusPending}`,children:a.label})}function IO({task:n,tasksById:a,environments:i,projects:o,taskSessions:r}){const u=r.length>0?r[r.length-1]:void 0,d=(u==null?void 0:u.environmentId)??"",p=d?i.find(v=>v.id===d):void 0,m=o.find(v=>v.id===n.projectId),g=n.branch&&(m!=null&&m.repoUrl)?`${m.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(n.branch)}`:void 0;return h.jsxs("div",{className:D.overviewDashboard,children:[h.jsxs("div",{className:D.overviewHero,children:[h.jsx(UO,{status:n.status}),n.branch&&h.jsx("span",{className:D.overviewBranchPill,children:g?h.jsxs("a",{href:g,target:"_blank",rel:"noreferrer noopener",className:D.branchLink,children:["🔗"," ",n.branch]}):h.jsxs("span",{children:["🔗"," ",n.branch]})})]}),typeof n.description=="string"&&n.description&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Description"}),h.jsx("div",{className:D.overviewMarkdown,children:h.jsx(Tf,{remarkPlugins:[Ef],children:n.description})})]}),d&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Environment"}),h.jsxs("div",{className:D.envRow,children:[p&&h.jsx("span",{className:`${D.envDot} ${LO(p.status)}`,title:p.status,"aria-label":`Status: ${p.status}`,role:"img"}),h.jsx("span",{className:D.overviewValue,children:(p==null?void 0:p.displayName)??d})]})]}),h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Dependencies"}),n.dependsOn.length===0?h.jsx("div",{className:D.overviewMuted,children:"None"}):h.jsx("div",{className:D.depList,children:n.dependsOn.map(v=>{const y=a.get(v),_=(y==null?void 0:y.status)==="complete";return h.jsxs("div",{className:`${D.depItem} ${_?D.depDone:D.depBlocked}`,children:[h.jsx("span",{children:_?"✓":"○"}),h.jsx("span",{children:(y==null?void 0:y.title)??v})]},v)})})]}),h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Timeline"}),h.jsxs("div",{className:D.timeline,children:[n.createdAt&&h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Created"}),h.jsx("span",{className:D.timelineValue,children:jr(n.createdAt)})]}),n.assignedAt&&(()=>{const v=Gd(n.createdAt,n.assignedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Assigned"}),h.jsx("span",{className:D.timelineValue,children:jr(n.assignedAt)}),v!==void 0&&h.jsx("span",{className:D.timelineDelta,children:v})]})})(),n.startedAt&&(()=>{const v=Gd(n.assignedAt??n.createdAt,n.startedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Started"}),h.jsx("span",{className:D.timelineValue,children:jr(n.startedAt)}),v!==void 0&&h.jsx("span",{className:D.timelineDelta,children:v})]})})(),n.completedAt&&(()=>{const v=Gd(n.startedAt,n.completedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Completed"}),h.jsx("span",{className:D.timelineValue,children:jr(n.completedAt)}),v!==void 0&&h.jsx("span",{className:D.timelineDelta,children:v})]})})(),!n.createdAt&&!n.assignedAt&&!n.startedAt&&!n.completedAt&&h.jsx("div",{className:D.overviewMuted,children:"No timing data"})]})]}),n.reviewNotes&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Review Notes"}),h.jsx("div",{className:D.reviewNotes,children:n.reviewNotes})]})]})}function zO({task:n,sessionId:a,isBlocked:i,onStart:o,onResume:r,onStop:u,onComplete:d,onDelete:p,onEdit:m}){if(n.status==="not_started")return i?h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:m,className:D.btnGhost,children:"Edit"}),h.jsx("button",{onClick:p,className:D.btnDanger,children:"Delete"})]}):h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:o,className:D.btnPrimary,children:"Start"}),h.jsx("button",{onClick:m,className:D.btnGhost,children:"Edit"}),h.jsx("button",{onClick:p,className:D.btnDanger,children:"Delete"})]});if(n.status==="working")return h.jsx("div",{className:D.headerActions,children:h.jsx("button",{onClick:u,disabled:!a,className:D.btnDanger,children:"Stop"})});if(n.status==="paused")return h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:d,className:D.btnPrimary,children:"Complete"}),h.jsx("button",{onClick:r,className:D.btnGhost,children:"Resume"}),h.jsx("button",{onClick:p,className:D.btnDanger,children:"Delete"})]});if(n.status==="complete")return h.jsx("div",{className:D.headerActions,children:h.jsx("button",{onClick:p,className:D.btnDanger,children:"Delete"})});if(n.status==="failed")return h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:o,className:D.btnPrimary,children:"Retry"}),h.jsx("button",{onClick:p,className:D.btnDanger,children:"Delete"})]})}function VO({taskSessions:n,selectedSessionId:a,onSelect:i}){if(!(n.length<2))return h.jsxs("div",{className:D.attemptSelector,"data-testid":"attempt-selector",children:[h.jsx("span",{className:D.attemptLabel,children:"Attempts:"}),n.map((o,r)=>{const u=o.id===a,d=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="idle"?"●":"";return h.jsxs("button",{className:`${D.attemptButton} ${u?D.attemptActive:""}`,onClick:()=>i(o.id),title:`Attempt #${r+1} — ${o.status}`,"aria-label":`Attempt #${r+1}, ${o.status}`,"aria-pressed":u,"data-testid":`attempt-${r+1}`,children:["#",r+1,d&&h.jsx("span",{className:D.attemptStatus,children:d})]},o.id)})]})}function Fd(){const{taskId:n}=Qr(),a=Kt(),i=Un(),{events:o,eventsDropped:r,tasks:u,environments:d,loadSessionEvents:p,loadFindings:m,kill:g,startTask:v,resumeTask:y,completeTask:_,deleteTask:T,projects:E,taskSessions:j,loadTaskSessions:A}=Ht(),C=S.useRef(void 0),M=S.useRef(void 0),R=S.useRef(void 0),Y=S.useRef(void 0),w=S.useRef(void 0),F=a.pathname.endsWith("/stream")?"stream":a.pathname.endsWith("/findings")?"findings":"overview",[q,V]=S.useState(F),[W,ae]=S.useState(!1),[se,le]=S.useState(void 0),z=S.useRef(F);F!==z.current&&(z.current=F,F!==q&&V(F));const K=u.find(xe=>xe.id===n),Q=(K==null?void 0:K.projectId)||void 0,O=K?j[K.id]??[]:[];let G;se&&O.some(xe=>xe.id===se)?G=se:G=(K==null?void 0:K.latestSessionId)||void 0;const ee=()=>{ae(!0)},ge=()=>{K&&(T(K.id),ae(!1),i(ql(K.projectId),{replace:!0}))};if((K==null?void 0:K.id)!==M.current&&(M.current=K==null?void 0:K.id,se!==void 0&&le(void 0)),S.useEffect(()=>{if(!(K!=null&&K.id))return;const xe=K.id!==Y.current,ne=K.latestSessionId!==w.current;(xe||ne)&&(Y.current=K.id,w.current=K.latestSessionId,A(K.id))},[K==null?void 0:K.id,K==null?void 0:K.latestSessionId,A]),(K==null?void 0:K.status)!==R.current){R.current=K==null?void 0:K.status;const xe=(K==null?void 0:K.status)==="not_started"?"overview":(K==null?void 0:K.status)==="working"||(K==null?void 0:K.status)==="paused"?"stream":(K==null?void 0:K.status)==="complete"?"findings":void 0;xe&&xe!==q&&V(xe)}const pe=S.useMemo(()=>new Map(u.map(xe=>[xe.id,xe])),[u]),We=S.useMemo(()=>{const xe=G?o.filter(ne=>ne.sessionId===G):[];return V1(z1(xe))},[o,G]),Ae=K?K.dependsOn.some(xe=>{const ne=pe.get(xe);return ne!==void 0&&ne.status!=="complete"}):!1,he=S.useMemo(()=>VR(n,E,pe),[n,E,pe]);S.useEffect(()=>{G&&G!==C.current&&(C.current=G,p(G))},[G,p]),S.useEffect(()=>{q==="findings"&&Q&&m(Q)},[q,Q,m]);const De=xe=>{V(xe),i(es(n,xe==="overview"?void 0:xe))};return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Ui,{segments:he}),h.jsxs("div",{className:D.header,children:[h.jsxs("span",{className:D.headerTitle,children:[h.jsx("span",{"data-testid":"task-title",children:(K==null?void 0:K.title)||n}),K&&h.jsx("span",{className:D.taskStatusBadge,"data-testid":"task-status",children:K.status}),(K==null?void 0:K.branch)&&h.jsx("span",{className:D.taskBranch,children:K.branch}),Ae&&h.jsx("span",{className:D.taskBlockedBadge,children:"blocked"})]}),K&&h.jsx(zO,{task:K,sessionId:G,isBlocked:Ae,onStart:()=>v(K.id),onResume:()=>y(K.id),onStop:()=>G&&g(G),onComplete:()=>_(K.id),onDelete:ee,onEdit:()=>i(ZT(K.id))})]}),h.jsxs("div",{className:D.tabBar,role:"tablist","aria-label":"Task view",children:[h.jsx("button",{role:"tab","aria-selected":q==="overview",className:`${D.tab} ${q==="overview"?D.active:""}`,onClick:()=>De("overview"),children:"Overview"}),h.jsx("button",{role:"tab","aria-selected":q==="stream",className:`${D.tab} ${q==="stream"?D.active:""}`,onClick:()=>De("stream"),children:"Stream"}),h.jsx("button",{role:"tab","aria-selected":q==="findings",className:`${D.tab} ${q==="findings"?D.active:""}`,onClick:()=>De("findings"),children:"Findings"})]}),h.jsxs(Xn,{mode:"wait",children:[q==="overview"&&h.jsx(nn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:D.overviewContent,children:K?h.jsx(IO,{task:K,tasksById:pe,environments:d,projects:E,taskSessions:O}):h.jsx("div",{className:D.waitingMessage,children:"No additional details"})},"overview"),q==="stream"&&h.jsxs(nn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden"},children:[h.jsx(VO,{taskSessions:O,selectedSessionId:G,onSelect:xe=>le(xe)}),h.jsx(I1,{events:We,eventsDropped:r,emptyState:!G&&K?h.jsxs("div",{className:D.emptyCta,children:[h.jsx("button",{className:D.ctaButton,onClick:()=>v(K.id),children:"Start Task"}),h.jsx("div",{className:D.ctaDescription,children:"Click to begin agent execution"})]}):G&&We.length===0?h.jsx("div",{className:D.waitingMessage,children:"Waiting for events..."}):void 0})]},"stream"),q==="findings"&&h.jsx(nn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:D.tabContent,children:Q?h.jsx(BO,{projectId:Q}):h.jsx("div",{className:D.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),K&&h.jsx(lc,{isOpen:W,title:"Delete Task?",description:`"${K.title}" will be permanently removed.`,onConfirm:ge,onCancel:()=>ae(!1)})]})}function PO(){const n=LR();return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Ui,{segments:n}),h.jsx("div",{className:D.emptyState,children:"Configure the new environment below"})]})}const HO="_layout_11u79_1",GO="_content_11u79_8",FO="_tabPanel_11u79_14",qd={layout:HO,content:GO,tabPanel:FO},qO={environments:"Environments",credentials:"Credentials",personas:"Personas",appearance:"Appearance",about:"About"};function $O(){const a=Kt().pathname.replace(/^\/settings\/?/,"").split("/")[0],i=qO[a],o=BR(i);return h.jsxs("div",{className:qd.layout,children:[h.jsx(Ui,{segments:o}),h.jsx("div",{className:qd.content,children:h.jsx("div",{className:qd.tabPanel,children:h.jsx(k0,{})},a)})]})}const YO="_nav_13n0b_1",KO="_tab_13n0b_44",ZO="_tabIcon_13n0b_82",XO="_tabActive_13n0b_88",Nr={nav:YO,tab:KO,tabIcon:ZO,tabActive:XO},va=[{path:"environments",label:"Environments",icon:"🖥️"},{path:"credentials",label:"Credentials",icon:"🔑"},{path:"personas",label:"Personas",icon:"👤"},{path:"appearance",label:"Appearance",icon:"🎨"},{path:"about",label:"About",icon:"ℹ️"}];function QO(){var d;const n=Kt(),a=Un(),i=S.useRef(null),o=((d=va.find(p=>n.pathname===`${Ni}/${p.path}`))==null?void 0:d.path)??va[0].path,r=S.useCallback(p=>{a(`${Ni}/${p}`)},[a]),u=S.useCallback(p=>{var T,E;const m=(T=i.current)==null?void 0:T.querySelectorAll('[role="tab"]');if(!m)return;const g=Array.from(m).findIndex(j=>j===document.activeElement),v=g>=0?g:va.findIndex(j=>j.path===o);let y=v;if(p.key==="ArrowDown")p.preventDefault(),y=(v+1)%va.length;else if(p.key==="ArrowUp")p.preventDefault(),y=(v-1+va.length)%va.length;else if(p.key==="Home")p.preventDefault(),y=0;else if(p.key==="End")p.preventDefault(),y=va.length-1;else return;const _=va[y].path;a(`${Ni}/${_}`),(E=m[y])==null||E.focus()},[o,a]);return h.jsx("nav",{className:Nr.nav,ref:i,role:"tablist","aria-orientation":"vertical","aria-label":"Settings",onKeyDown:u,children:va.map(p=>{const m=p.path===o;return h.jsxs("button",{role:"tab",type:"button","aria-selected":m,tabIndex:m?0:-1,className:`${Nr.tab} ${m?Nr.tabActive:""}`,onClick:()=>r(p.path),children:[h.jsx("span",{className:Nr.tabIcon,"aria-hidden":"true",children:p.icon}),p.label]},p.path)})})}const JO="_container_1nk8c_1",WO="_header_1nk8c_5",eB="_headerLabel_1nk8c_12",tB="_addButton_1nk8c_20",nB="_envRow_1nk8c_55",aB="_targeted_1nk8c_69",sB="_expanded_1nk8c_72",iB="_statusDot_1nk8c_76",lB="_pulse_1nk8c_79",oB="_envName_1nk8c_83",rB="_envActions_1nk8c_87",cB="_idleLabel_1nk8c_94",uB="_newChatButton_1nk8c_99",dB="_envActionsRow_1nk8c_126",fB="_connectButton_1nk8c_134",hB="_stopButton_1nk8c_160",pB="_deleteButton_1nk8c_186",mB="_provisionMessage_1nk8c_213",gB="_errorMessage_1nk8c_220",yB="_sessionRow_1nk8c_227",vB="_selected_1nk8c_243",bB="_sessionDot_1nk8c_248",SB="_sessionSummaryRow_1nk8c_252",_B="_sessionExpandArrow_1nk8c_272",xB="_sessionSummaryText_1nk8c_283",TB="_sessionCountBadge_1nk8c_290",EB="_emptyCta_1nk8c_313",CB="_ctaDescription_1nk8c_326",AB="_ctaButton_1nk8c_332",$e={container:JO,header:WO,headerLabel:eB,addButton:tB,envRow:nB,targeted:aB,expanded:sB,statusDot:iB,pulse:lB,envName:oB,envActions:rB,idleLabel:cB,newChatButton:uB,envActionsRow:dB,connectButton:fB,stopButton:hB,deleteButton:pB,provisionMessage:mB,errorMessage:gB,sessionRow:yB,selected:vB,sessionDot:bB,sessionSummaryRow:SB,sessionExpandArrow:_B,sessionSummaryText:xB,sessionCountBadge:TB,emptyCta:EB,ctaDescription:CB,ctaButton:AB},jB={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},NB={running:"running",idle:"awaiting input",failed:"failed",interrupted:"interrupted",completed:"completed"},g0=["running","idle","failed","interrupted","completed"],wB=.2;function DB(n){const a={};for(const u of n)a[u.status]=(a[u.status]||0)+1;const i=g0.filter(u=>a[u]>0).map(u=>`${a[u]} ${NB[u]||u}`),o=new Set(g0),r=Object.keys(a).filter(u=>!o.has(u)).sort().map(u=>`${a[u]} ${u}`);return[...i,...r].join(", ")}function kB({status:n}){const a=n==="running"?"var(--accent-green)":n==="idle"?"var(--accent-yellow)":n==="completed"?"var(--text-secondary)":n==="failed"||n==="interrupted"?"var(--accent-red)":"var(--text-tertiary)";return h.jsx("span",{className:$e.sessionDot,style:{color:a},children:"●"})}function MB({env:n,envSessions:a,selectedSessionId:i,isNewChatTarget:o,expanded:r,onToggleExpand:u,sessionsExpanded:d,onToggleSessionsExpand:p,provisionProgress:m,onProvision:g,onStop:v,onRemove:y,navigate:_}){const[T,E]=S.useState(!1),j=jB[n.status]||"var(--text-tertiary)",A=n.status==="connected",C=n.status==="connecting",M=n.status==="disconnected"||n.status==="error";return h.jsxs("div",{children:[h.jsx(lc,{isOpen:T,title:"Delete Environment?",description:`"${n.displayName||n.id}" will be permanently removed. This destroys the workspace and removes all data.`,onConfirm:()=>{y(n.id),E(!1)},onCancel:()=>E(!1)}),h.jsxs("div",{className:`${$e.envRow} ${o?$e.targeted:""} ${r?$e.expanded:""}`,"data-testid":"env-row",onClick:u,children:[h.jsx("span",{className:`${$e.statusDot} ${A?$e.pulse:""}`,style:{color:j},children:"●"}),h.jsx("span",{className:$e.envName,title:n.displayName||n.id,children:n.displayName||n.id}),h.jsxs("span",{className:$e.envActions,children:[a.length===0&&!o&&!r&&h.jsx("span",{className:$e.idleLabel,children:"(idle)"}),A&&h.jsx("button",{onClick:R=>{R.stopPropagation(),_(U0(n.id))},title:"New chat",className:$e.newChatButton,children:"+"})]})]}),r&&h.jsxs("div",{className:$e.envActionsRow,children:[C&&m&&h.jsx("span",{className:$e.provisionMessage,children:m.message}),n.status==="error"&&(m==null?void 0:m.stage)==="error"&&h.jsx("span",{className:$e.errorMessage,children:m.message}),M&&h.jsx("button",{onClick:R=>{R.stopPropagation(),g(n.id)},className:$e.connectButton,children:n.status==="error"?"Retry":"Connect"}),A&&h.jsx("button",{onClick:R=>{R.stopPropagation(),v(n.id)},className:$e.stopButton,children:"Stop"}),!C&&h.jsx("button",{onClick:R=>{R.stopPropagation(),E(!0)},className:$e.deleteButton,children:"Delete"})]}),a.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:$e.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":d,"aria-label":d?"Collapse sessions":"Expand sessions",onClick:p,onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),p())},children:[h.jsx("span",{className:`${$e.sessionExpandArrow} ${d?$e.expanded:""}`,children:"▸"}),h.jsx("span",{className:$e.sessionSummaryText,children:DB(a)}),h.jsx("span",{className:$e.sessionCountBadge,children:a.length})]}),h.jsx(Xn,{children:d&&h.jsx(nn.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:wB,ease:"easeInOut"},style:{overflow:"hidden"},children:a.map(R=>h.jsxs("div",{onClick:Y=>{Y.stopPropagation(),_(L0(R.id))},className:`${$e.sessionRow} ${i===R.id?$e.selected:""}`,title:R.prompt,"data-testid":"session-row",children:[h.jsx(kB,{status:R.status})," ",R.prompt.length>24?R.prompt.slice(0,24)+"...":R.prompt]},R.id))})})]})]})}function RB(){const{environments:n,sessions:a,provisionStatus:i,provisionEnvironment:o,stopEnvironment:r,removeEnvironment:u}=Ht(),d=Un(),[p,m]=S.useState(null),[g,v]=S.useState(new Set),y=$t("/sessions/:sessionId"),_=$t("/sessions/new"),T=(y==null?void 0:y.params.sessionId)!=="new"?y==null?void 0:y.params.sessionId:void 0,[E]=Mf(),j=_?E.get("env")??void 0:void 0;return h.jsxs("div",{className:$e.container,children:[h.jsxs("div",{className:$e.header,children:[h.jsx("span",{className:$e.headerLabel,children:"Environments"}),h.jsx("button",{className:$e.addButton,onClick:()=>d(jy),title:"Add environment",children:"+ Add Environment"})]}),n.length===0&&h.jsxs("div",{className:$e.emptyCta,children:[h.jsx("button",{className:$e.ctaButton,onClick:()=>d(jy),children:"Add Environment"}),h.jsx("div",{className:$e.ctaDescription,children:"Connect an environment to run agents"})]}),n.map(A=>{const C=a.filter(M=>M.environmentId===A.id);return h.jsx(MB,{env:A,envSessions:C,selectedSessionId:T,isNewChatTarget:j===A.id,expanded:p===A.id,onToggleExpand:()=>m(p===A.id?null:A.id),sessionsExpanded:g.has(A.id),onToggleSessionsExpand:()=>{v(M=>{const R=new Set(M);return R.has(A.id)?R.delete(A.id):R.add(A.id),R})},provisionProgress:i[A.id],onProvision:o,onStop:r,onRemove:u,navigate:d},A.id)})]})}function OB(){return h.jsx(RB,{})}const BB="_section_1ingb_14",LB="_sectionTitle_1ingb_26",UB="_sectionDescription_1ingb_35",IB="_tokenList_1ingb_48",zB="_tokenRow_1ingb_55",VB="_tokenBadge_1ingb_68",PB="_tokenName_1ingb_83",HB="_tokenTarget_1ingb_90",GB="_deleteButton_1ingb_99",FB="_addForm_1ingb_113",qB="_formRow_1ingb_119",$B="_input_1ingb_125",YB="_select_1ingb_155",KB="_addButton_1ingb_187",ZB="_emptyStateInfo_1ingb_221",XB="_themeOptions_1ingb_229",QB="_themeOption_1ingb_229",JB="_themeOptionSelected_1ingb_254",WB="_themeOptionHeader_1ingb_259",e6="_themeOptionLabel_1ingb_266",t6="_themeOptionDesc_1ingb_273",n6="_variantToggle_1ingb_279",a6="_variantButton_1ingb_286",s6="_variantActive_1ingb_305",i6="_themeSwatches_1ingb_311",l6="_themeSwatch_1ingb_311",o6="_systemToggle_1ingb_325",r6="_systemToggleHint_1ingb_341",c6="_themeActive_1ingb_348",u6="_aboutGrid_1ingb_354",d6="_aboutItem_1ingb_360",f6="_aboutLabel_1ingb_373",h6="_aboutValue_1ingb_379",p6="_aboutDot_1ingb_387",m6="_aboutDotConnected_1ingb_394",g6="_aboutDotDisconnected_1ingb_398",ue={section:BB,sectionTitle:LB,sectionDescription:UB,tokenList:IB,tokenRow:zB,tokenBadge:VB,tokenName:PB,tokenTarget:HB,deleteButton:GB,addForm:FB,formRow:qB,input:$B,select:YB,addButton:KB,emptyStateInfo:ZB,themeOptions:XB,themeOption:QB,themeOptionSelected:JB,themeOptionHeader:WB,themeOptionLabel:e6,themeOptionDesc:t6,variantToggle:n6,variantButton:a6,variantActive:s6,themeSwatches:i6,themeSwatch:l6,systemToggle:o6,systemToggleHint:r6,themeActive:c6,aboutGrid:u6,aboutItem:d6,aboutLabel:f6,aboutValue:h6,aboutDot:p6,aboutDotConnected:m6,aboutDotDisconnected:g6},y6=[{key:"claude",label:"Claude",description:"Forward Claude credentials for AI agent access.",options:[{value:"off",label:"Off"},{value:"subscription",label:"Subscription"},{value:"api_key",label:"API Key"}]},{key:"github",label:"GitHub",description:"Forward GITHUB_TOKEN and GH_TOKEN for git operations.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"copilot",label:"Copilot",description:"Forward Copilot tokens (COPILOT_GITHUB_TOKEN, CLI config).",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"codex",label:"Codex",description:"Forward OPENAI_API_KEY for Codex/OpenAI access.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]}];function v6(){const{credentialProviders:n,updateCredentialProviders:a}=Ht(),i=(o,r)=>{const u={...n};o==="claude"?u.claude=r:u[o]=r,a(u)};return h.jsxs("section",{className:ue.section,children:[h.jsx("h3",{className:ue.sectionTitle,children:"Credential Providers"}),h.jsx("p",{className:ue.sectionDescription,children:"Enable providers to automatically forward credentials to environments at task start. Credentials are read fresh from the host each time."}),h.jsx("div",{className:ue.tokenList,children:y6.map(o=>h.jsxs("div",{className:ue.tokenRow,children:[h.jsx("span",{className:ue.tokenName,children:o.label}),h.jsx("span",{className:ue.tokenTarget,children:o.description}),h.jsx("select",{className:ue.select,value:n[o.key],onChange:r=>i(o.key,r.target.value),children:o.options.map(r=>h.jsx("option",{value:r.value,children:r.label},r.value))})]},o.key))})]})}const b6=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function S6(){const{tokens:n,setToken:a,deleteToken:i}=Ht(),{showToast:o}=eo(),[r,u]=S.useState(""),[d,p]=S.useState(""),[m,g]=S.useState("env_var"),[v,y]=S.useState(""),[_,T]=S.useState(null),E=C=>{if(C.preventDefault(),!r||!d)return;const M=m==="env_var"?v||r.toUpperCase()+"_TOKEN":"";a(r,d,m,M,m==="file"?v:""),o("Token saved successfully","success"),u(""),p(""),y("")},j=C=>{T(C)},A=()=>{_&&(i(_),o("Token deleted","info")),T(null)};return h.jsxs(h.Fragment,{children:[h.jsx(lc,{isOpen:_!==null,title:"Delete Token?",description:_?`"${_}" will be permanently removed.`:void 0,onConfirm:A,onCancel:()=>T(null)}),h.jsxs("section",{className:ue.section,children:[h.jsx("h3",{className:ue.sectionTitle,children:"Tokens"}),h.jsx("p",{className:ue.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),n.length===0?h.jsx("div",{className:ue.emptyStateInfo,children:"Add your first API token to enable service integrations."}):h.jsx("div",{className:ue.tokenList,children:n.map(C=>h.jsxs("div",{className:ue.tokenRow,children:[h.jsx("span",{className:ue.tokenBadge,children:C.tokenType}),h.jsx("span",{className:ue.tokenName,children:C.name}),h.jsx("span",{className:ue.tokenTarget,children:C.tokenType==="env_var"?C.envVar:C.filePath}),h.jsx("button",{className:ue.deleteButton,onClick:()=>j(C.name),title:`Delete ${C.name}`,children:"×"})]},C.name))}),h.jsxs("form",{className:ue.addForm,onSubmit:E,children:[h.jsxs("div",{className:ue.formRow,children:[h.jsx("input",{className:ue.input,type:"text",placeholder:"Token name",value:r,onChange:C=>u(C.target.value)}),h.jsx("input",{className:ue.input,type:"password",placeholder:"Value",value:d,onChange:C=>p(C.target.value)})]}),h.jsxs("div",{className:ue.formRow,children:[h.jsx("select",{className:ue.select,value:m,onChange:C=>g(C.target.value),children:b6.map(C=>h.jsx("option",{value:C.value,children:C.label},C.value))}),h.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:v,onChange:C=>y(C.target.value)}),h.jsx("button",{className:ue.addButton,type:"submit",children:"Add Token"})]})]})]})]})}function _6(){return h.jsxs(h.Fragment,{children:[h.jsx(v6,{}),h.jsx(S6,{})]})}const x6="_container_6b3ow_1",T6="_header_6b3ow_7",E6="_form_6b3ow_19",C6="_formActions_6b3ow_87",A6="_list_6b3ow_93",j6="_card_6b3ow_99",N6="_active_6b3ow_109",w6="_cardHeader_6b3ow_113",D6="_cardTitle_6b3ow_123",k6="_defaultBadge_6b3ow_129",M6="_cardActions_6b3ow_143",R6="_description_6b3ow_148",O6="_meta_6b3ow_154",B6="_promptDetails_6b3ow_171",L6="_promptText_6b3ow_183",U6="_empty_6b3ow_200",I6="_btnPrimary_6b3ow_206",z6="_btnSecondary_6b3ow_240",V6="_btnSmall_6b3ow_267",P6="_btnDanger_6b3ow_293",rt={container:x6,header:T6,form:E6,formActions:C6,list:A6,card:j6,active:N6,cardHeader:w6,cardTitle:D6,defaultBadge:k6,cardActions:M6,description:R6,meta:O6,promptDetails:B6,promptText:L6,empty:U6,btnPrimary:I6,btnSecondary:z6,btnSmall:V6,btnDanger:P6};function H6(){const{personas:n,createPersona:a,updatePersona:i,deletePersona:o,appDefaultPersonaId:r,setAppDefaultPersonaId:u}=Ht(),[d,p]=S.useState(null),[m,g]=S.useState(!1),[v,y]=S.useState(null),[_,T]=S.useState(""),[E,j]=S.useState(""),[A,C]=S.useState(""),[M,R]=S.useState("claude-code"),[Y,w]=S.useState("sonnet"),[F,q]=S.useState(0),V=()=>{T(""),j(""),C(""),R("claude-code"),w("sonnet"),q(0)},W=()=>{V(),p(null),g(!0)},ae=Q=>{T(Q.name),j(Q.description),C(Q.systemPrompt),R(Q.runtime),w(Q.model),q(Q.maxTurns),p(Q),g(!1)},se=Q=>{Q.preventDefault(),!(!_.trim()||!A.trim()||!M||!Y)&&(d?(i(d.id,_,E,A,M,Y,F),p(null)):(a(_,E,A,M,Y,F),g(!1)),V())},le=Q=>{o(Q),y(null),(d==null?void 0:d.id)===Q&&(p(null),V())},z=()=>{p(null),g(!1),V()},K=()=>h.jsxs("form",{onSubmit:se,className:rt.form,children:[h.jsx("h3",{children:d?"Edit Persona":"Create Persona"}),h.jsxs("label",{children:["Name",h.jsx("input",{type:"text",value:_,onChange:Q=>T(Q.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),h.jsxs("label",{children:["Description",h.jsx("input",{type:"text",value:E,onChange:Q=>j(Q.target.value),placeholder:"Brief description..."})]}),h.jsxs("label",{children:["Runtime",h.jsxs("select",{value:M,onChange:Q=>R(Q.target.value),"data-testid":"persona-runtime-select",children:[h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"}),h.jsx("option",{value:"stub",children:"stub"}),h.jsx("option",{value:"claude-code-acp",children:"claude-code-acp (experimental)"}),h.jsx("option",{value:"codex-acp",children:"codex-acp (experimental)"}),h.jsx("option",{value:"copilot-acp",children:"copilot-acp (experimental)"})]})]}),h.jsxs("label",{children:["Model",h.jsx("input",{type:"text",value:Y,onChange:Q=>w(Q.target.value),placeholder:"e.g. sonnet"})]}),h.jsxs("label",{children:["Max Turns",h.jsx("input",{type:"number",value:F,onChange:Q=>q(parseInt(Q.target.value,10)||0),min:0})]}),h.jsxs("label",{children:["System Prompt",h.jsx("textarea",{value:A,onChange:Q=>C(Q.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),h.jsxs("div",{className:rt.formActions,children:[h.jsx("button",{type:"submit",className:rt.btnPrimary,children:d?"Save":"Create"}),h.jsx("button",{type:"button",onClick:z,className:rt.btnSecondary,children:"Cancel"})]})]});return h.jsxs("div",{className:rt.container,children:[h.jsxs("div",{className:rt.header,children:[h.jsx("h2",{children:"Personas"}),h.jsx("button",{onClick:W,className:rt.btnPrimary,children:"+ New Persona"})]}),(m||d)&&K(),n.length===0&&!m?h.jsx("p",{className:rt.empty,children:"No personas yet. Create one to get started."}):h.jsx("div",{className:rt.list,children:n.map(Q=>{const O=r===Q.id;return h.jsxs("div",{className:`${rt.card} ${(d==null?void 0:d.id)===Q.id?rt.active:""}`,"data-testid":`persona-card-${Q.id}`,children:[h.jsxs("div",{className:rt.cardHeader,children:[h.jsxs("span",{className:rt.cardTitle,children:[h.jsx("strong",{children:Q.name}),O&&h.jsx("span",{className:rt.defaultBadge,"data-testid":`persona-default-badge-${Q.id}`,children:"App Default"})]}),h.jsxs("div",{className:rt.cardActions,children:[!O&&h.jsx("button",{onClick:()=>u(Q.id),className:rt.btnSmall,"data-testid":`persona-set-default-${Q.id}`,title:"Set as app default persona",children:"Set Default"}),h.jsx("button",{onClick:()=>ae(Q),className:rt.btnSmall,children:"Edit"}),v===Q.id?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>le(Q.id),className:rt.btnDanger,children:"Confirm"}),h.jsx("button",{onClick:()=>y(null),className:rt.btnSmall,children:"Cancel"})]}):h.jsx("button",{onClick:()=>y(Q.id),className:rt.btnSmall,children:"Delete"})]})]}),Q.description&&h.jsx("p",{className:rt.description,children:Q.description}),h.jsxs("div",{className:rt.meta,children:[Q.runtime&&h.jsxs("span",{children:["Runtime: ",Q.runtime]}),Q.model&&h.jsxs("span",{children:["Model: ",Q.model]}),Q.maxTurns>0&&h.jsxs("span",{children:["Max turns: ",Q.maxTurns]})]}),h.jsxs("details",{className:rt.promptDetails,children:[h.jsx("summary",{children:"System Prompt"}),h.jsx("pre",{className:rt.promptText,children:Q.systemPrompt})]})]},Q.id)})})]})}function G6(){return h.jsx(H6,{})}function F6(){const{themeId:n,resolvedThemeId:a,setTheme:i,preferSystem:o,setPreferSystem:r}=F0();return h.jsxs("section",{className:ue.section,children:[h.jsx("h3",{className:ue.sectionTitle,children:"Appearance"}),h.jsx("p",{className:ue.sectionDescription,children:"Choose how Grackle looks across the app."}),h.jsx("div",{className:ue.themeOptions,children:Wr.filter(u=>!u.hidden).map(u=>{const d=!!(u.variantLightId&&u.variantDarkId),p=d?n===u.id||n===u.variantLightId||n===u.variantDarkId:n===u.id,m=d&&a===u.variantLightId;return h.jsxs("button",{type:"button",className:`${ue.themeOption} ${p?ue.themeOptionSelected:""}`,"aria-pressed":p,onClick:()=>i(u.id),children:[h.jsxs("span",{className:ue.themeOptionHeader,children:[h.jsxs("span",{children:[h.jsx("span",{className:ue.themeOptionLabel,children:u.label}),h.jsx("span",{className:ue.themeOptionDesc,children:u.description})]}),d&&h.jsxs("span",{className:ue.variantToggle,children:[h.jsx("span",{role:"button",tabIndex:0,className:`${ue.variantButton} ${p&&m?ue.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),i(u.variantLightId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),i(u.variantLightId))},"aria-label":"Light variant","aria-pressed":p&&m,children:"☼"}),h.jsx("span",{role:"button",tabIndex:0,className:`${ue.variantButton} ${p&&!m?ue.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),i(u.variantDarkId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),i(u.variantDarkId))},"aria-label":"Dark variant","aria-pressed":p&&!m,children:"☾"})]})]}),u.swatches&&h.jsx("span",{className:ue.themeSwatches,children:u.swatches.map((g,v)=>h.jsx("span",{className:ue.themeSwatch,style:{background:g}},v))})]},u.id)})}),h.jsxs("label",{className:ue.systemToggle,children:[h.jsx("input",{type:"checkbox",checked:o,onChange:u=>r(u.target.checked)}),h.jsx("span",{children:"Match system light/dark preference"})]}),h.jsx("p",{className:ue.systemToggleHint,children:"Automatically switches between light and dark variants when available."}),h.jsxs("p",{className:ue.themeActive,children:["Active theme: ",h.jsx("strong",{children:a})]})]})}function q6(){return h.jsx(F6,{})}function $6(){const{connected:n,environments:a,sessions:i}=Ht(),o=a.filter(d=>d.status==="connected").length,r=a.length,u=i.filter(d=>["running","idle"].includes(d.status)).length;return h.jsxs("section",{className:ue.section,"data-testid":"about-panel",children:[h.jsx("h3",{className:ue.sectionTitle,children:"About"}),h.jsx("p",{className:ue.sectionDescription,children:"Connection status and application information."}),h.jsxs("div",{className:ue.aboutGrid,children:[h.jsxs("div",{className:ue.aboutItem,children:[h.jsx("span",{className:ue.aboutLabel,children:"Connection"}),h.jsxs("span",{className:ue.aboutValue,children:[h.jsx("span",{className:`${ue.aboutDot} ${n?ue.aboutDotConnected:ue.aboutDotDisconnected}`}),n?"Connected":"Disconnected"]})]}),h.jsxs("div",{className:ue.aboutItem,children:[h.jsx("span",{className:ue.aboutLabel,children:"Environments"}),h.jsxs("span",{className:ue.aboutValue,children:[o,"/",r," connected"]})]}),h.jsxs("div",{className:ue.aboutItem,children:[h.jsx("span",{className:ue.aboutLabel,children:"Active Sessions"}),h.jsx("span",{className:ue.aboutValue,children:u})]}),h.jsxs("div",{className:ue.aboutItem,children:[h.jsx("span",{className:ue.aboutLabel,children:"Version"}),h.jsx("span",{className:ue.aboutValue,children:"0.40.0"})]})]})]})}function Y6(){return h.jsx($6,{})}const K6="_root_h353j_1",Z6="_body_h353j_7",X6="_main_h353j_19",Q6="_sidebarWrapper_h353j_26",J6="_overlay_h353j_56",Rl={root:K6,body:Z6,main:X6,sidebarWrapper:Q6,overlay:J6},W6=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function e4(){const{lastSpawnedId:n,environments:a}=Ht(),{showToast:i}=eo();zk(a,i);const o=Un(),r=Kt(),u=r.pathname.startsWith(Ni),[d,p]=S.useState(!1),m=S.useCallback(()=>p(g=>!g),[]);return S.useEffect(()=>{p(!1)},[r.pathname]),S.useEffect(()=>{if(!d)return;const g=v=>{v.key==="Escape"&&p(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[d]),S.useEffect(()=>{n&&!r.pathname.startsWith("/tasks/")&&o(L0(n),{replace:!0})},[n,o,r.pathname]),h.jsxs("div",{className:Rl.root,children:[h.jsx(KE,{onToggleSidebar:u?void 0:m,sidebarOpen:d}),h.jsxs("div",{className:Rl.body,children:[h.jsx("div",{className:Rl.sidebarWrapper,"data-sidebar-open":d,"data-settings":u,children:u?h.jsx(QO,{}):h.jsx(lk,{})}),d&&!u&&h.jsx("div",{className:Rl.overlay,"data-testid":"drawer-overlay",onClick:()=>p(!1)}),h.jsxs("div",{className:Rl.main,children:[h.jsx(k0,{}),h.jsx(Ck,{})]})]}),h.jsx(Ik,{})]})}function t4(){return h.jsx(pT,{children:h.jsxs(St,{element:h.jsx(e4,{}),children:[h.jsx(St,{index:!0,element:h.jsx(RR,{})}),h.jsx(St,{path:"sessions/new",element:h.jsx(PR,{})}),h.jsx(St,{path:"sessions/:sessionId",element:h.jsx(n3,{})}),h.jsx(St,{path:"projects/:projectId",element:h.jsx(eO,{})}),h.jsx(St,{path:"tasks/new",element:h.jsx(xO,{})}),h.jsx(St,{path:"tasks/:taskId",element:h.jsx(Fd,{})}),h.jsx(St,{path:"tasks/:taskId/stream",element:h.jsx(Fd,{})}),h.jsx(St,{path:"tasks/:taskId/findings",element:h.jsx(Fd,{})}),h.jsx(St,{path:"tasks/:taskId/edit",element:h.jsx(TO,{})}),h.jsx(St,{path:"environments/new",element:h.jsx(PO,{})}),h.jsxs(St,{path:"settings",element:h.jsx($O,{}),children:[h.jsx(St,{index:!0,element:h.jsx(wr,{to:"environments",replace:!0})}),h.jsx(St,{path:"environments",element:h.jsx(OB,{})}),h.jsx(St,{path:"credentials",element:h.jsx(_6,{})}),h.jsx(St,{path:"tokens",element:h.jsx(wr,{to:"../credentials",replace:!0})}),h.jsx(St,{path:"personas",element:h.jsx(G6,{})}),h.jsx(St,{path:"appearance",element:h.jsx(q6,{})}),h.jsx(St,{path:"about",element:h.jsx(Y6,{})})]}),h.jsx(St,{path:"*",element:h.jsx(wr,{to:"/",replace:!0})})]})})}function n4(){const n=W6?ME:TE;return h.jsx(IE,{children:h.jsx(OE,{children:h.jsx(n,{children:h.jsx(zT,{children:h.jsx(t4,{})})})})})}gx.createRoot(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(n4,{})}));