agent-dealer 1.2.0 → 1.2.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,60 +0,0 @@
1
- (function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))u(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&u(m)}).observe(document,{childList:!0,subtree:!0});function s(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(d){if(d.ep)return;d.ep=!0;const f=s(d);fetch(d.href,f)}})();var Ro={exports:{}},os={};/**
2
- * @license React
3
- * react-jsx-runtime.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 Lp;function Fg(){if(Lp)return os;Lp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(u,d,f){var m=null;if(f!==void 0&&(m=""+f),d.key!==void 0&&(m=""+d.key),"key"in d){f={};for(var y in d)y!=="key"&&(f[y]=d[y])}else f=d;return d=f.ref,{$$typeof:n,type:u,key:m,ref:d!==void 0?d:null,props:f}}return os.Fragment=i,os.jsx=s,os.jsxs=s,os}var Up;function Wg(){return Up||(Up=1,Ro.exports=Fg()),Ro.exports}var c=Wg(),ko={exports:{}},ve={};/**
10
- * @license React
11
- * react.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 zp;function Pg(){if(zp)return ve;zp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),L=Symbol.iterator;function K(_){return _===null||typeof _!="object"?null:(_=L&&_[L]||_["@@iterator"],typeof _=="function"?_:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},V=Object.assign,O={};function Y(_,B,G){this.props=_,this.context=B,this.refs=O,this.updater=G||D}Y.prototype.isReactComponent={},Y.prototype.setState=function(_,B){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,B,"setState")},Y.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function J(){}J.prototype=Y.prototype;function ne(_,B,G){this.props=_,this.context=B,this.refs=O,this.updater=G||D}var pe=ne.prototype=new J;pe.constructor=ne,V(pe,Y.prototype),pe.isPureReactComponent=!0;var I=Array.isArray;function Ee(){}var X={H:null,A:null,T:null,S:null},be=Object.prototype.hasOwnProperty;function $e(_,B,G){var P=G.ref;return{$$typeof:n,type:_,key:B,ref:P!==void 0?P:null,props:G}}function gt(_,B){return $e(_.type,B,_.props)}function xt(_){return typeof _=="object"&&_!==null&&_.$$typeof===n}function et(_){var B={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(G){return B[G]})}var Tt=/\/+/g;function He(_,B){return typeof _=="object"&&_!==null&&_.key!=null?et(""+_.key):B.toString(36)}function ie(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(Ee,Ee):(_.status="pending",_.then(function(B){_.status==="pending"&&(_.status="fulfilled",_.value=B)},function(B){_.status==="pending"&&(_.status="rejected",_.reason=B)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function U(_,B,G,P,re){var ce=typeof _;(ce==="undefined"||ce==="boolean")&&(_=null);var Te=!1;if(_===null)Te=!0;else switch(ce){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(_.$$typeof){case n:case i:Te=!0;break;case b:return Te=_._init,U(Te(_._payload),B,G,P,re)}}if(Te)return re=re(_),Te=P===""?"."+He(_,0):P,I(re)?(G="",Te!=null&&(G=Te.replace(Tt,"$&/")+"/"),U(re,B,G,"",function(ot){return ot})):re!=null&&(xt(re)&&(re=gt(re,G+(re.key==null||_&&_.key===re.key?"":(""+re.key).replace(Tt,"$&/")+"/")+Te)),B.push(re)),1;Te=0;var nt=P===""?".":P+":";if(I(_))for(var fe=0;fe<_.length;fe++)P=_[fe],ce=nt+He(P,fe),Te+=U(P,B,G,ce,re);else if(fe=K(_),typeof fe=="function")for(_=fe.call(_),fe=0;!(P=_.next()).done;)P=P.value,ce=nt+He(P,fe++),Te+=U(P,B,G,ce,re);else if(ce==="object"){if(typeof _.then=="function")return U(ie(_),B,G,P,re);throw B=String(_),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return Te}function F(_,B,G){if(_==null)return _;var P=[],re=0;return U(_,P,"","",function(ce){return B.call(G,ce,re++)}),P}function oe(_){if(_._status===-1){var B=_._result;B=B(),B.then(function(G){(_._status===0||_._status===-1)&&(_._status=1,_._result=G)},function(G){(_._status===0||_._status===-1)&&(_._status=2,_._result=G)}),_._status===-1&&(_._status=0,_._result=B)}if(_._status===1)return _._result.default;throw _._result}var je=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},Me={map:F,forEach:function(_,B,G){F(_,function(){B.apply(this,arguments)},G)},count:function(_){var B=0;return F(_,function(){B++}),B},toArray:function(_){return F(_,function(B){return B})||[]},only:function(_){if(!xt(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return ve.Activity=N,ve.Children=Me,ve.Component=Y,ve.Fragment=s,ve.Profiler=d,ve.PureComponent=ne,ve.StrictMode=u,ve.Suspense=v,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,ve.__COMPILER_RUNTIME={__proto__:null,c:function(_){return X.H.useMemoCache(_)}},ve.cache=function(_){return function(){return _.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(_,B,G){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var P=V({},_.props),re=_.key;if(B!=null)for(ce in B.key!==void 0&&(re=""+B.key),B)!be.call(B,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&B.ref===void 0||(P[ce]=B[ce]);var ce=arguments.length-2;if(ce===1)P.children=G;else if(1<ce){for(var Te=Array(ce),nt=0;nt<ce;nt++)Te[nt]=arguments[nt+2];P.children=Te}return $e(_.type,re,P)},ve.createContext=function(_){return _={$$typeof:m,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:f,_context:_},_},ve.createElement=function(_,B,G){var P,re={},ce=null;if(B!=null)for(P in B.key!==void 0&&(ce=""+B.key),B)be.call(B,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(re[P]=B[P]);var Te=arguments.length-2;if(Te===1)re.children=G;else if(1<Te){for(var nt=Array(Te),fe=0;fe<Te;fe++)nt[fe]=arguments[fe+2];re.children=nt}if(_&&_.defaultProps)for(P in Te=_.defaultProps,Te)re[P]===void 0&&(re[P]=Te[P]);return $e(_,ce,re)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(_){return{$$typeof:y,render:_}},ve.isValidElement=xt,ve.lazy=function(_){return{$$typeof:b,_payload:{_status:-1,_result:_},_init:oe}},ve.memo=function(_,B){return{$$typeof:g,type:_,compare:B===void 0?null:B}},ve.startTransition=function(_){var B=X.T,G={};X.T=G;try{var P=_(),re=X.S;re!==null&&re(G,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(Ee,je)}catch(ce){je(ce)}finally{B!==null&&G.types!==null&&(B.types=G.types),X.T=B}},ve.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},ve.use=function(_){return X.H.use(_)},ve.useActionState=function(_,B,G){return X.H.useActionState(_,B,G)},ve.useCallback=function(_,B){return X.H.useCallback(_,B)},ve.useContext=function(_){return X.H.useContext(_)},ve.useDebugValue=function(){},ve.useDeferredValue=function(_,B){return X.H.useDeferredValue(_,B)},ve.useEffect=function(_,B){return X.H.useEffect(_,B)},ve.useEffectEvent=function(_){return X.H.useEffectEvent(_)},ve.useId=function(){return X.H.useId()},ve.useImperativeHandle=function(_,B,G){return X.H.useImperativeHandle(_,B,G)},ve.useInsertionEffect=function(_,B){return X.H.useInsertionEffect(_,B)},ve.useLayoutEffect=function(_,B){return X.H.useLayoutEffect(_,B)},ve.useMemo=function(_,B){return X.H.useMemo(_,B)},ve.useOptimistic=function(_,B){return X.H.useOptimistic(_,B)},ve.useReducer=function(_,B,G){return X.H.useReducer(_,B,G)},ve.useRef=function(_){return X.H.useRef(_)},ve.useState=function(_){return X.H.useState(_)},ve.useSyncExternalStore=function(_,B,G){return X.H.useSyncExternalStore(_,B,G)},ve.useTransition=function(){return X.H.useTransition()},ve.version="19.2.7",ve}var Bp;function vd(){return Bp||(Bp=1,ko.exports=Pg()),ko.exports}var S=vd(),Oo={exports:{}},ds={},Mo={exports:{}},Do={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var qp;function e0(){return qp||(qp=1,(function(n){function i(U,F){var oe=U.length;U.push(F);e:for(;0<oe;){var je=oe-1>>>1,Me=U[je];if(0<d(Me,F))U[je]=F,U[oe]=Me,oe=je;else break e}}function s(U){return U.length===0?null:U[0]}function u(U){if(U.length===0)return null;var F=U[0],oe=U.pop();if(oe!==F){U[0]=oe;e:for(var je=0,Me=U.length,_=Me>>>1;je<_;){var B=2*(je+1)-1,G=U[B],P=B+1,re=U[P];if(0>d(G,oe))P<Me&&0>d(re,G)?(U[je]=re,U[P]=oe,je=P):(U[je]=G,U[B]=oe,je=B);else if(P<Me&&0>d(re,oe))U[je]=re,U[P]=oe,je=P;else break e}}return F}function d(U,F){var oe=U.sortIndex-F.sortIndex;return oe!==0?oe:U.id-F.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var m=Date,y=m.now();n.unstable_now=function(){return m.now()-y}}var v=[],g=[],b=1,N=null,L=3,K=!1,D=!1,V=!1,O=!1,Y=typeof setTimeout=="function"?setTimeout:null,J=typeof clearTimeout=="function"?clearTimeout:null,ne=typeof setImmediate<"u"?setImmediate:null;function pe(U){for(var F=s(g);F!==null;){if(F.callback===null)u(g);else if(F.startTime<=U)u(g),F.sortIndex=F.expirationTime,i(v,F);else break;F=s(g)}}function I(U){if(V=!1,pe(U),!D)if(s(v)!==null)D=!0,Ee||(Ee=!0,et());else{var F=s(g);F!==null&&ie(I,F.startTime-U)}}var Ee=!1,X=-1,be=5,$e=-1;function gt(){return O?!0:!(n.unstable_now()-$e<be)}function xt(){if(O=!1,Ee){var U=n.unstable_now();$e=U;var F=!0;try{e:{D=!1,V&&(V=!1,J(X),X=-1),K=!0;var oe=L;try{t:{for(pe(U),N=s(v);N!==null&&!(N.expirationTime>U&&gt());){var je=N.callback;if(typeof je=="function"){N.callback=null,L=N.priorityLevel;var Me=je(N.expirationTime<=U);if(U=n.unstable_now(),typeof Me=="function"){N.callback=Me,pe(U),F=!0;break t}N===s(v)&&u(v),pe(U)}else u(v);N=s(v)}if(N!==null)F=!0;else{var _=s(g);_!==null&&ie(I,_.startTime-U),F=!1}}break e}finally{N=null,L=oe,K=!1}F=void 0}}finally{F?et():Ee=!1}}}var et;if(typeof ne=="function")et=function(){ne(xt)};else if(typeof MessageChannel<"u"){var Tt=new MessageChannel,He=Tt.port2;Tt.port1.onmessage=xt,et=function(){He.postMessage(null)}}else et=function(){Y(xt,0)};function ie(U,F){X=Y(function(){U(n.unstable_now())},F)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):be=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return L},n.unstable_next=function(U){switch(L){case 1:case 2:case 3:var F=3;break;default:F=L}var oe=L;L=F;try{return U()}finally{L=oe}},n.unstable_requestPaint=function(){O=!0},n.unstable_runWithPriority=function(U,F){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var oe=L;L=U;try{return F()}finally{L=oe}},n.unstable_scheduleCallback=function(U,F,oe){var je=n.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?je+oe:je):oe=je,U){case 1:var Me=-1;break;case 2:Me=250;break;case 5:Me=1073741823;break;case 4:Me=1e4;break;default:Me=5e3}return Me=oe+Me,U={id:b++,callback:F,priorityLevel:U,startTime:oe,expirationTime:Me,sortIndex:-1},oe>je?(U.sortIndex=oe,i(g,U),s(v)===null&&U===s(g)&&(V?(J(X),X=-1):V=!0,ie(I,oe-je))):(U.sortIndex=Me,i(v,U),D||K||(D=!0,Ee||(Ee=!0,et()))),U},n.unstable_shouldYield=gt,n.unstable_wrapCallback=function(U){var F=L;return function(){var oe=L;L=F;try{return U.apply(this,arguments)}finally{L=oe}}}})(Do)),Do}var Hp;function t0(){return Hp||(Hp=1,Mo.exports=e0()),Mo.exports}var Lo={exports:{}},Ct={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var $p;function a0(){if($p)return Ct;$p=1;var n=vd();function i(v){var g="https://react.dev/errors/"+v;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+v+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var u={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(v,g,b){var N=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:N==null?null:""+N,children:v,containerInfo:g,implementation:b}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(v,g){if(v==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Ct.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Ct.createPortal=function(v,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(i(299));return f(v,g,null,b)},Ct.flushSync=function(v){var g=m.T,b=u.p;try{if(m.T=null,u.p=2,v)return v()}finally{m.T=g,u.p=b,u.d.f()}},Ct.preconnect=function(v,g){typeof v=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,u.d.C(v,g))},Ct.prefetchDNS=function(v){typeof v=="string"&&u.d.D(v)},Ct.preinit=function(v,g){if(typeof v=="string"&&g&&typeof g.as=="string"){var b=g.as,N=y(b,g.crossOrigin),L=typeof g.integrity=="string"?g.integrity:void 0,K=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?u.d.S(v,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:N,integrity:L,fetchPriority:K}):b==="script"&&u.d.X(v,{crossOrigin:N,integrity:L,fetchPriority:K,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Ct.preinitModule=function(v,g){if(typeof v=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=y(g.as,g.crossOrigin);u.d.M(v,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&u.d.M(v)},Ct.preload=function(v,g){if(typeof v=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,N=y(b,g.crossOrigin);u.d.L(v,b,{crossOrigin:N,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Ct.preloadModule=function(v,g){if(typeof v=="string")if(g){var b=y(g.as,g.crossOrigin);u.d.m(v,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else u.d.m(v)},Ct.requestFormReset=function(v){u.d.r(v)},Ct.unstable_batchedUpdates=function(v,g){return v(g)},Ct.useFormState=function(v,g,b){return m.H.useFormState(v,g,b)},Ct.useFormStatus=function(){return m.H.useHostTransitionStatus()},Ct.version="19.2.7",Ct}var Vp;function n0(){if(Vp)return Lo.exports;Vp=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(i){console.error(i)}}return n(),Lo.exports=a0(),Lo.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var Yp;function l0(){if(Yp)return ds;Yp=1;var n=t0(),i=vd(),s=n0();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function m(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 y(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 v(e){if(f(e)!==e)throw Error(u(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,l=t;;){var r=a.return;if(r===null)break;var o=r.alternate;if(o===null){if(l=r.return,l!==null){a=l;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===a)return v(r),e;if(o===l)return v(r),t;o=o.sibling}throw Error(u(188))}if(a.return!==l.return)a=r,l=o;else{for(var h=!1,x=r.child;x;){if(x===a){h=!0,a=r,l=o;break}if(x===l){h=!0,l=r,a=o;break}x=x.sibling}if(!h){for(x=o.child;x;){if(x===a){h=!0,a=o,l=r;break}if(x===l){h=!0,l=o,a=r;break}x=x.sibling}if(!h)throw Error(u(189))}}if(a.alternate!==l)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var N=Object.assign,L=Symbol.for("react.element"),K=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),ne=Symbol.for("react.context"),pe=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),Ee=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),be=Symbol.for("react.lazy"),$e=Symbol.for("react.activity"),gt=Symbol.for("react.memo_cache_sentinel"),xt=Symbol.iterator;function et(e){return e===null||typeof e!="object"?null:(e=xt&&e[xt]||e["@@iterator"],typeof e=="function"?e:null)}var Tt=Symbol.for("react.client.reference");function He(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Tt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case V:return"Fragment";case Y:return"Profiler";case O:return"StrictMode";case I:return"Suspense";case Ee:return"SuspenseList";case $e:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case D:return"Portal";case ne:return e.displayName||"Context";case J:return(e._context.displayName||"Context")+".Consumer";case pe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:He(e.type)||"Memo";case be:t=e._payload,e=e._init;try{return He(e(t))}catch{}}return null}var ie=Array.isArray,U=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},je=[],Me=-1;function _(e){return{current:e}}function B(e){0>Me||(e.current=je[Me],je[Me]=null,Me--)}function G(e,t){Me++,je[Me]=e.current,e.current=t}var P=_(null),re=_(null),ce=_(null),Te=_(null);function nt(e,t){switch(G(ce,t),G(re,e),G(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?lp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=lp(t),e=ip(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(P),G(P,e)}function fe(){B(P),B(re),B(ce)}function ot(e){e.memoizedState!==null&&G(Te,e);var t=P.current,a=ip(t,e.type);t!==a&&(G(re,e),G(P,a))}function ea(e){re.current===e&&(B(P),B(re)),Te.current===e&&(B(Te),ss._currentValue=oe)}var lt,va;function ga(e){if(lt===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);lt=t&&t[1]||"",va=-1<a.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+lt+e+va}var ba=!1;function Dt(e,t){if(!e||ba)return"";ba=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(M){var k=M}Reflect.construct(e,[],H)}else{try{H.call()}catch(M){k=M}e.call(H.prototype)}}else{try{throw Error()}catch(M){k=M}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(M){if(M&&k&&typeof M.stack=="string")return[M.stack,k.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=l.DetermineComponentFrameRoot(),h=o[0],x=o[1];if(h&&x){var w=h.split(`
44
- `),C=x.split(`
45
- `);for(r=l=0;l<w.length&&!w[l].includes("DetermineComponentFrameRoot");)l++;for(;r<C.length&&!C[r].includes("DetermineComponentFrameRoot");)r++;if(l===w.length||r===C.length)for(l=w.length-1,r=C.length-1;1<=l&&0<=r&&w[l]!==C[r];)r--;for(;1<=l&&0<=r;l--,r--)if(w[l]!==C[r]){if(l!==1||r!==1)do if(l--,r--,0>r||w[l]!==C[r]){var z=`
46
- `+w[l].replace(" at new "," at ");return e.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",e.displayName)),z}while(1<=l&&0<=r);break}}}finally{ba=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ga(a):""}function Ya(e,t){switch(e.tag){case 26:case 27:case 5:return ga(e.type);case 16:return ga("Lazy");case 13:return e.child!==t&&t!==null?ga("Suspense Fallback"):ga("Suspense");case 19:return ga("SuspenseList");case 0:case 15:return Dt(e.type,!1);case 11:return Dt(e.type.render,!1);case 1:return Dt(e.type,!0);case 31:return ga("Activity");default:return""}}function wa(e){try{var t="",a=null;do t+=Ya(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
47
- Error generating stack: `+l.message+`
48
- `+l.stack}}var Rt=Object.prototype.hasOwnProperty,Fe=n.unstable_scheduleCallback,mn=n.unstable_cancelCallback,vl=n.unstable_shouldYield,gl=n.unstable_requestPaint,yt=n.unstable_now,St=n.unstable_getCurrentPriorityLevel,bl=n.unstable_ImmediatePriority,wl=n.unstable_UserBlockingPriority,pn=n.unstable_NormalPriority,yi=n.unstable_LowPriority,Gn=n.unstable_IdlePriority,vi=n.log,Sl=n.unstable_setDisableYieldValue,Sa=null,Z=null;function we(e){if(typeof vi=="function"&&Sl(e),Z&&typeof Z.setStrictMode=="function")try{Z.setStrictMode(Sa,e)}catch{}}var Ue=Math.clz32?Math.clz32:_a,Qn=Math.log,_l=Math.LN2;function _a(e){return e>>>=0,e===0?32:31-(Qn(e)/_l|0)|0}var R=256,ue=262144,Ve=4194304;function kt(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 As(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var r=0,o=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var x=l&134217727;return x!==0?(l=x&~o,l!==0?r=kt(l):(h&=x,h!==0?r=kt(h):a||(a=x&~e,a!==0&&(r=kt(a))))):(x=l&~o,x!==0?r=kt(x):h!==0?r=kt(h):a||(a=l&~e,a!==0&&(r=kt(a)))),r===0?0:t!==0&&t!==r&&(t&o)===0&&(o=r&-r,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:r}function gi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function By(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 Bd(){var e=Ve;return Ve<<=1,(Ve&62914560)===0&&(Ve=4194304),e}function yu(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function bi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qy(e,t,a,l,r,o){var h=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var x=e.entanglements,w=e.expirationTimes,C=e.hiddenUpdates;for(a=h&~a;0<a;){var z=31-Ue(a),H=1<<z;x[z]=0,w[z]=-1;var k=C[z];if(k!==null)for(C[z]=null,z=0;z<k.length;z++){var M=k[z];M!==null&&(M.lane&=-536870913)}a&=~H}l!==0&&qd(e,l,0),o!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=o&~(h&~t))}function qd(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Ue(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Hd(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-Ue(a),r=1<<l;r&t|e[l]&t&&(e[l]|=t),a&=~r}}function $d(e,t){var a=t&-t;return a=(a&42)!==0?1:vu(a),(a&(e.suspendedLanes|t))!==0?0:a}function vu(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 gu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vd(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:Tp(e.type))}function Yd(e,t){var a=F.p;try{return F.p=e,t()}finally{F.p=a}}var xn=Math.random().toString(36).slice(2),_t="__reactFiber$"+xn,Lt="__reactProps$"+xn,jl="__reactContainer$"+xn,bu="__reactEvents$"+xn,Hy="__reactListeners$"+xn,$y="__reactHandles$"+xn,Zd="__reactResources$"+xn,wi="__reactMarker$"+xn;function wu(e){delete e[_t],delete e[Lt],delete e[bu],delete e[Hy],delete e[$y]}function Nl(e){var t=e[_t];if(t)return t;for(var a=e.parentNode;a;){if(t=a[jl]||a[_t]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=fp(e);e!==null;){if(a=e[_t])return a;e=fp(e)}return t}e=a,a=e.parentNode}return null}function Al(e){if(e=e[_t]||e[jl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Si(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function El(e){var t=e[Zd];return t||(t=e[Zd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function bt(e){e[wi]=!0}var Gd=new Set,Qd={};function Xn(e,t){Tl(e,t),Tl(e+"Capture",t)}function Tl(e,t){for(Qd[e]=t,e=0;e<t.length;e++)Gd.add(t[e])}var Vy=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]*$"),Xd={},Kd={};function Yy(e){return Rt.call(Kd,e)?!0:Rt.call(Xd,e)?!1:Vy.test(e)?Kd[e]=!0:(Xd[e]=!0,!1)}function Es(e,t,a){if(Yy(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){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,""+a)}}function Ts(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Za(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function ta(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Jd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zy(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var r=l.get,o=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(h){a=""+h,o.call(this,h)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Su(e){if(!e._valueTracker){var t=Jd(e)?"checked":"value";e._valueTracker=Zy(e,t,""+e[t])}}function Id(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Jd(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Cs(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 Gy=/[\n"\\]/g;function aa(e){return e.replace(Gy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function _u(e,t,a,l,r,o,h,x){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ta(t)):e.value!==""+ta(t)&&(e.value=""+ta(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?ju(e,h,ta(t)):a!=null?ju(e,h,ta(a)):l!=null&&e.removeAttribute("value"),r==null&&o!=null&&(e.defaultChecked=!!o),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+ta(x):e.removeAttribute("name")}function Fd(e,t,a,l,r,o,h,x){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Su(e);return}a=a!=null?""+ta(a):"",t=t!=null?""+ta(t):a,x||t===e.value||(e.value=t),e.defaultValue=t}l=l??r,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=x?e.checked:!!l,e.defaultChecked=!!l,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Su(e)}function ju(e,t,a){t==="number"&&Cs(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Cl(e,t,a,l){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&l&&(e[a].defaultSelected=!0)}else{for(a=""+ta(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,l&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Wd(e,t,a){if(t!=null&&(t=""+ta(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+ta(a):""}function Pd(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(u(92));if(ie(l)){if(1<l.length)throw Error(u(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=ta(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Su(e)}function Rl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Qy=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 ef(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Qy.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function tf(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var r in t)l=t[r],t.hasOwnProperty(r)&&a[r]!==l&&ef(e,r,l)}else for(var o in t)t.hasOwnProperty(o)&&ef(e,o,t[o])}function Nu(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 Xy=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"]]),Ky=/^[\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 Rs(e){return Ky.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ga(){}var Au=null;function Eu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kl=null,Ol=null;function af(e){var t=Al(e);if(t&&(e=t.stateNode)){var a=e[Lt]||null;e:switch(e=t.stateNode,t.type){case"input":if(_u(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+aa(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var r=l[Lt]||null;if(!r)throw Error(u(90));_u(l,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Id(l)}break e;case"textarea":Wd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Cl(e,!!a.multiple,t,!1)}}}var Tu=!1;function nf(e,t,a){if(Tu)return e(t,a);Tu=!0;try{var l=e(t);return l}finally{if(Tu=!1,(kl!==null||Ol!==null)&&(yr(),kl&&(t=kl,e=Ol,Ol=kl=null,af(t),e)))for(t=0;t<e.length;t++)af(e[t])}}function _i(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Lt]||null;if(l===null)return null;a=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(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var Qa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cu=!1;if(Qa)try{var ji={};Object.defineProperty(ji,"passive",{get:function(){Cu=!0}}),window.addEventListener("test",ji,ji),window.removeEventListener("test",ji,ji)}catch{Cu=!1}var yn=null,Ru=null,ks=null;function lf(){if(ks)return ks;var e,t=Ru,a=t.length,l,r="value"in yn?yn.value:yn.textContent,o=r.length;for(e=0;e<a&&t[e]===r[e];e++);var h=a-e;for(l=1;l<=h&&t[a-l]===r[o-l];l++);return ks=r.slice(e,1<l?1-l:void 0)}function Os(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 Ms(){return!0}function sf(){return!1}function Ut(e){function t(a,l,r,o,h){this._reactName=a,this._targetInst=r,this.type=l,this.nativeEvent=o,this.target=h,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(a=e[x],this[x]=a?a(o):o[x]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ms:sf,this.isPropagationStopped=sf,this}return N(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ms)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ms)},persist:function(){},isPersistent:Ms}),t}var Kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ds=Ut(Kn),Ni=N({},Kn,{view:0,detail:0}),Jy=Ut(Ni),ku,Ou,Ai,Ls=N({},Ni,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Du,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!==Ai&&(Ai&&e.type==="mousemove"?(ku=e.screenX-Ai.screenX,Ou=e.screenY-Ai.screenY):Ou=ku=0,Ai=e),ku)},movementY:function(e){return"movementY"in e?e.movementY:Ou}}),rf=Ut(Ls),Iy=N({},Ls,{dataTransfer:0}),Fy=Ut(Iy),Wy=N({},Ni,{relatedTarget:0}),Mu=Ut(Wy),Py=N({},Kn,{animationName:0,elapsedTime:0,pseudoElement:0}),ev=Ut(Py),tv=N({},Kn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),av=Ut(tv),nv=N({},Kn,{data:0}),uf=Ut(nv),lv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iv={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"},sv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sv[e])?!!t[e]:!1}function Du(){return rv}var uv=N({},Ni,{key:function(e){if(e.key){var t=lv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Os(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?iv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Du,charCode:function(e){return e.type==="keypress"?Os(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Os(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),cv=Ut(uv),ov=N({},Ls,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cf=Ut(ov),dv=N({},Ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Du}),fv=Ut(dv),hv=N({},Kn,{propertyName:0,elapsedTime:0,pseudoElement:0}),mv=Ut(hv),pv=N({},Ls,{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}),xv=Ut(pv),yv=N({},Kn,{newState:0,oldState:0}),vv=Ut(yv),gv=[9,13,27,32],Lu=Qa&&"CompositionEvent"in window,Ei=null;Qa&&"documentMode"in document&&(Ei=document.documentMode);var bv=Qa&&"TextEvent"in window&&!Ei,of=Qa&&(!Lu||Ei&&8<Ei&&11>=Ei),df=" ",ff=!1;function hf(e,t){switch(e){case"keyup":return gv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ml=!1;function wv(e,t){switch(e){case"compositionend":return mf(t);case"keypress":return t.which!==32?null:(ff=!0,df);case"textInput":return e=t.data,e===df&&ff?null:e;default:return null}}function Sv(e,t){if(Ml)return e==="compositionend"||!Lu&&hf(e,t)?(e=lf(),ks=Ru=yn=null,Ml=!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 of&&t.locale!=="ko"?null:t.data;default:return null}}var _v={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function pf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!_v[e.type]:t==="textarea"}function xf(e,t,a,l){kl?Ol?Ol.push(l):Ol=[l]:kl=l,t=jr(t,"onChange"),0<t.length&&(a=new Ds("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Ti=null,Ci=null;function jv(e){Wm(e,0)}function Us(e){var t=Si(e);if(Id(t))return e}function yf(e,t){if(e==="change")return t}var vf=!1;if(Qa){var Uu;if(Qa){var zu="oninput"in document;if(!zu){var gf=document.createElement("div");gf.setAttribute("oninput","return;"),zu=typeof gf.oninput=="function"}Uu=zu}else Uu=!1;vf=Uu&&(!document.documentMode||9<document.documentMode)}function bf(){Ti&&(Ti.detachEvent("onpropertychange",wf),Ci=Ti=null)}function wf(e){if(e.propertyName==="value"&&Us(Ci)){var t=[];xf(t,Ci,e,Eu(e)),nf(jv,t)}}function Nv(e,t,a){e==="focusin"?(bf(),Ti=t,Ci=a,Ti.attachEvent("onpropertychange",wf)):e==="focusout"&&bf()}function Av(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Us(Ci)}function Ev(e,t){if(e==="click")return Us(t)}function Tv(e,t){if(e==="input"||e==="change")return Us(t)}function Cv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gt=typeof Object.is=="function"?Object.is:Cv;function Ri(e,t){if(Gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var r=a[l];if(!Rt.call(t,r)||!Gt(e[r],t[r]))return!1}return!0}function Sf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _f(e,t){var a=Sf(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Sf(a)}}function jf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Cs(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Cs(e.document)}return t}function Bu(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 Rv=Qa&&"documentMode"in document&&11>=document.documentMode,Dl=null,qu=null,ki=null,Hu=!1;function Af(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Hu||Dl==null||Dl!==Cs(l)||(l=Dl,"selectionStart"in l&&Bu(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}),ki&&Ri(ki,l)||(ki=l,l=jr(qu,"onSelect"),0<l.length&&(t=new Ds("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Dl)))}function Jn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Ll={animationend:Jn("Animation","AnimationEnd"),animationiteration:Jn("Animation","AnimationIteration"),animationstart:Jn("Animation","AnimationStart"),transitionrun:Jn("Transition","TransitionRun"),transitionstart:Jn("Transition","TransitionStart"),transitioncancel:Jn("Transition","TransitionCancel"),transitionend:Jn("Transition","TransitionEnd")},$u={},Ef={};Qa&&(Ef=document.createElement("div").style,"AnimationEvent"in window||(delete Ll.animationend.animation,delete Ll.animationiteration.animation,delete Ll.animationstart.animation),"TransitionEvent"in window||delete Ll.transitionend.transition);function In(e){if($u[e])return $u[e];if(!Ll[e])return e;var t=Ll[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Ef)return $u[e]=t[a];return e}var Tf=In("animationend"),Cf=In("animationiteration"),Rf=In("animationstart"),kv=In("transitionrun"),Ov=In("transitionstart"),Mv=In("transitioncancel"),kf=In("transitionend"),Of=new Map,Vu="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(" ");Vu.push("scrollEnd");function ja(e,t){Of.set(e,t),Xn(t,[e])}var zs=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)},na=[],Ul=0,Yu=0;function Bs(){for(var e=Ul,t=Yu=Ul=0;t<e;){var a=na[t];na[t++]=null;var l=na[t];na[t++]=null;var r=na[t];na[t++]=null;var o=na[t];if(na[t++]=null,l!==null&&r!==null){var h=l.pending;h===null?r.next=r:(r.next=h.next,h.next=r),l.pending=r}o!==0&&Mf(a,r,o)}}function qs(e,t,a,l){na[Ul++]=e,na[Ul++]=t,na[Ul++]=a,na[Ul++]=l,Yu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Zu(e,t,a,l){return qs(e,t,a,l),Hs(e)}function Fn(e,t){return qs(e,null,null,t),Hs(e)}function Mf(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var r=!1,o=e.return;o!==null;)o.childLanes|=a,l=o.alternate,l!==null&&(l.childLanes|=a),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(r=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,r&&t!==null&&(r=31-Ue(a),e=o.hiddenUpdates,l=e[r],l===null?e[r]=[t]:l.push(t),t.lane=a|536870912),o):null}function Hs(e){if(50<Pi)throw Pi=0,Pc=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zl={};function Dv(e,t,a,l){this.tag=e,this.key=a,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 Qt(e,t,a,l){return new Dv(e,t,a,l)}function Gu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xa(e,t){var a=e.alternate;return a===null?(a=Qt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Df(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function $s(e,t,a,l,r,o){var h=0;if(l=e,typeof e=="function")Gu(e)&&(h=1);else if(typeof e=="string")h=qg(e,a,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $e:return e=Qt(31,a,t,r),e.elementType=$e,e.lanes=o,e;case V:return Wn(a.children,r,o,t);case O:h=8,r|=24;break;case Y:return e=Qt(12,a,t,r|2),e.elementType=Y,e.lanes=o,e;case I:return e=Qt(13,a,t,r),e.elementType=I,e.lanes=o,e;case Ee:return e=Qt(19,a,t,r),e.elementType=Ee,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ne:h=10;break e;case J:h=9;break e;case pe:h=11;break e;case X:h=14;break e;case be:h=16,l=null;break e}h=29,a=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=Qt(h,a,t,r),t.elementType=e,t.type=l,t.lanes=o,t}function Wn(e,t,a,l){return e=Qt(7,e,l,t),e.lanes=a,e}function Qu(e,t,a){return e=Qt(6,e,null,t),e.lanes=a,e}function Lf(e){var t=Qt(18,null,null,0);return t.stateNode=e,t}function Xu(e,t,a){return t=Qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Uf=new WeakMap;function la(e,t){if(typeof e=="object"&&e!==null){var a=Uf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:wa(t)},Uf.set(e,t),t)}return{value:e,source:t,stack:wa(t)}}var Bl=[],ql=0,Vs=null,Oi=0,ia=[],sa=0,vn=null,La=1,Ua="";function Ka(e,t){Bl[ql++]=Oi,Bl[ql++]=Vs,Vs=e,Oi=t}function zf(e,t,a){ia[sa++]=La,ia[sa++]=Ua,ia[sa++]=vn,vn=e;var l=La;e=Ua;var r=32-Ue(l)-1;l&=~(1<<r),a+=1;var o=32-Ue(t)+r;if(30<o){var h=r-r%5;o=(l&(1<<h)-1).toString(32),l>>=h,r-=h,La=1<<32-Ue(t)+r|a<<r|l,Ua=o+e}else La=1<<o|a<<r|l,Ua=e}function Ku(e){e.return!==null&&(Ka(e,1),zf(e,1,0))}function Ju(e){for(;e===Vs;)Vs=Bl[--ql],Bl[ql]=null,Oi=Bl[--ql],Bl[ql]=null;for(;e===vn;)vn=ia[--sa],ia[sa]=null,Ua=ia[--sa],ia[sa]=null,La=ia[--sa],ia[sa]=null}function Bf(e,t){ia[sa++]=La,ia[sa++]=Ua,ia[sa++]=vn,La=t.id,Ua=t.overflow,vn=e}var jt=null,We=null,Oe=!1,gn=null,ra=!1,Iu=Error(u(519));function bn(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Mi(la(t,e)),Iu}function qf(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[_t]=e,t[Lt]=l,a){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(a=0;a<ts.length;a++)Ae(ts[a],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),Fd(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Pd(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||ap(t.textContent,a)?(l.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),l.onScroll!=null&&Ae("scroll",t),l.onScrollEnd!=null&&Ae("scrollend",t),l.onClick!=null&&(t.onclick=Ga),t=!0):t=!1,t||bn(e,!0)}function Hf(e){for(jt=e.return;jt;)switch(jt.tag){case 5:case 31:case 13:ra=!1;return;case 27:case 3:ra=!0;return;default:jt=jt.return}}function Hl(e){if(e!==jt)return!1;if(!Oe)return Hf(e),Oe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||po(e.type,e.memoizedProps)),a=!a),a&&We&&bn(e),Hf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));We=dp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));We=dp(e)}else t===27?(t=We,Dn(e.type)?(e=bo,bo=null,We=e):We=t):We=jt?ca(e.stateNode.nextSibling):null;return!0}function Pn(){We=jt=null,Oe=!1}function Fu(){var e=gn;return e!==null&&(Ht===null?Ht=e:Ht.push.apply(Ht,e),gn=null),e}function Mi(e){gn===null?gn=[e]:gn.push(e)}var Wu=_(null),el=null,Ja=null;function wn(e,t,a){G(Wu,t._currentValue),t._currentValue=a}function Ia(e){e._currentValue=Wu.current,B(Wu)}function Pu(e,t,a){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===a)break;e=e.return}}function ec(e,t,a,l){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var o=r.dependencies;if(o!==null){var h=r.child;o=o.firstContext;e:for(;o!==null;){var x=o;o=r;for(var w=0;w<t.length;w++)if(x.context===t[w]){o.lanes|=a,x=o.alternate,x!==null&&(x.lanes|=a),Pu(o.return,a,e),l||(h=null);break e}o=x.next}}else if(r.tag===18){if(h=r.return,h===null)throw Error(u(341));h.lanes|=a,o=h.alternate,o!==null&&(o.lanes|=a),Pu(h,a,e),h=null}else h=r.child;if(h!==null)h.return=r;else for(h=r;h!==null;){if(h===e){h=null;break}if(r=h.sibling,r!==null){r.return=h.return,h=r;break}h=h.return}r=h}}function $l(e,t,a,l){e=null;for(var r=t,o=!1;r!==null;){if(!o){if((r.flags&524288)!==0)o=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var h=r.alternate;if(h===null)throw Error(u(387));if(h=h.memoizedProps,h!==null){var x=r.type;Gt(r.pendingProps.value,h.value)||(e!==null?e.push(x):e=[x])}}else if(r===Te.current){if(h=r.alternate,h===null)throw Error(u(387));h.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(ss):e=[ss])}r=r.return}e!==null&&ec(t,e,a,l),t.flags|=262144}function Ys(e){for(e=e.firstContext;e!==null;){if(!Gt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function tl(e){el=e,Ja=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Nt(e){return $f(el,e)}function Zs(e,t){return el===null&&tl(e),$f(e,t)}function $f(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ja===null){if(e===null)throw Error(u(308));Ja=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ja=Ja.next=t;return a}var Lv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Uv=n.unstable_scheduleCallback,zv=n.unstable_NormalPriority,dt={$$typeof:ne,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function tc(){return{controller:new Lv,data:new Map,refCount:0}}function Di(e){e.refCount--,e.refCount===0&&Uv(zv,function(){e.controller.abort()})}var Li=null,ac=0,Vl=0,Yl=null;function Bv(e,t){if(Li===null){var a=Li=[];ac=0,Vl=io(),Yl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return ac++,t.then(Vf,Vf),t}function Vf(){if(--ac===0&&Li!==null){Yl!==null&&(Yl.status="fulfilled");var e=Li;Li=null,Vl=0,Yl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function qv(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(l.status="rejected",l.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),l}var Yf=U.S;U.S=function(e,t){Am=yt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Bv(e,t),Yf!==null&&Yf(e,t)};var al=_(null);function nc(){var e=al.current;return e!==null?e:Ie.pooledCache}function Gs(e,t){t===null?G(al,al.current):G(al,t.pool)}function Zf(){var e=nc();return e===null?null:{parent:dt._currentValue,pool:e}}var Zl=Error(u(460)),lc=Error(u(474)),Qs=Error(u(542)),Xs={then:function(){}};function Gf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Qf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ga,Ga),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kf(e),e;default:if(typeof t.status=="string")t.then(Ga,Ga);else{if(e=Ie,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=l}},function(l){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kf(e),e}throw ll=t,Zl}}function nl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ll=a,Zl):a}}var ll=null;function Xf(){if(ll===null)throw Error(u(459));var e=ll;return ll=null,e}function Kf(e){if(e===Zl||e===Qs)throw Error(u(483))}var Gl=null,Ui=0;function Ks(e){var t=Ui;return Ui+=1,Gl===null&&(Gl=[]),Qf(Gl,e,t)}function zi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Js(e,t){throw t.$$typeof===L?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Jf(e){function t(A,j){if(e){var T=A.deletions;T===null?(A.deletions=[j],A.flags|=16):T.push(j)}}function a(A,j){if(!e)return null;for(;j!==null;)t(A,j),j=j.sibling;return null}function l(A){for(var j=new Map;A!==null;)A.key!==null?j.set(A.key,A):j.set(A.index,A),A=A.sibling;return j}function r(A,j){return A=Xa(A,j),A.index=0,A.sibling=null,A}function o(A,j,T){return A.index=T,e?(T=A.alternate,T!==null?(T=T.index,T<j?(A.flags|=67108866,j):T):(A.flags|=67108866,j)):(A.flags|=1048576,j)}function h(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function x(A,j,T,q){return j===null||j.tag!==6?(j=Qu(T,A.mode,q),j.return=A,j):(j=r(j,T),j.return=A,j)}function w(A,j,T,q){var de=T.type;return de===V?z(A,j,T.props.children,q,T.key):j!==null&&(j.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===be&&nl(de)===j.type)?(j=r(j,T.props),zi(j,T),j.return=A,j):(j=$s(T.type,T.key,T.props,null,A.mode,q),zi(j,T),j.return=A,j)}function C(A,j,T,q){return j===null||j.tag!==4||j.stateNode.containerInfo!==T.containerInfo||j.stateNode.implementation!==T.implementation?(j=Xu(T,A.mode,q),j.return=A,j):(j=r(j,T.children||[]),j.return=A,j)}function z(A,j,T,q,de){return j===null||j.tag!==7?(j=Wn(T,A.mode,q,de),j.return=A,j):(j=r(j,T),j.return=A,j)}function H(A,j,T){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Qu(""+j,A.mode,T),j.return=A,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case K:return T=$s(j.type,j.key,j.props,null,A.mode,T),zi(T,j),T.return=A,T;case D:return j=Xu(j,A.mode,T),j.return=A,j;case be:return j=nl(j),H(A,j,T)}if(ie(j)||et(j))return j=Wn(j,A.mode,T,null),j.return=A,j;if(typeof j.then=="function")return H(A,Ks(j),T);if(j.$$typeof===ne)return H(A,Zs(A,j),T);Js(A,j)}return null}function k(A,j,T,q){var de=j!==null?j.key:null;if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return de!==null?null:x(A,j,""+T,q);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case K:return T.key===de?w(A,j,T,q):null;case D:return T.key===de?C(A,j,T,q):null;case be:return T=nl(T),k(A,j,T,q)}if(ie(T)||et(T))return de!==null?null:z(A,j,T,q,null);if(typeof T.then=="function")return k(A,j,Ks(T),q);if(T.$$typeof===ne)return k(A,j,Zs(A,T),q);Js(A,T)}return null}function M(A,j,T,q,de){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return A=A.get(T)||null,x(j,A,""+q,de);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case K:return A=A.get(q.key===null?T:q.key)||null,w(j,A,q,de);case D:return A=A.get(q.key===null?T:q.key)||null,C(j,A,q,de);case be:return q=nl(q),M(A,j,T,q,de)}if(ie(q)||et(q))return A=A.get(T)||null,z(j,A,q,de,null);if(typeof q.then=="function")return M(A,j,T,Ks(q),de);if(q.$$typeof===ne)return M(A,j,T,Zs(j,q),de);Js(j,q)}return null}function te(A,j,T,q){for(var de=null,ze=null,le=j,Se=j=0,Re=null;le!==null&&Se<T.length;Se++){le.index>Se?(Re=le,le=null):Re=le.sibling;var Be=k(A,le,T[Se],q);if(Be===null){le===null&&(le=Re);break}e&&le&&Be.alternate===null&&t(A,le),j=o(Be,j,Se),ze===null?de=Be:ze.sibling=Be,ze=Be,le=Re}if(Se===T.length)return a(A,le),Oe&&Ka(A,Se),de;if(le===null){for(;Se<T.length;Se++)le=H(A,T[Se],q),le!==null&&(j=o(le,j,Se),ze===null?de=le:ze.sibling=le,ze=le);return Oe&&Ka(A,Se),de}for(le=l(le);Se<T.length;Se++)Re=M(le,A,Se,T[Se],q),Re!==null&&(e&&Re.alternate!==null&&le.delete(Re.key===null?Se:Re.key),j=o(Re,j,Se),ze===null?de=Re:ze.sibling=Re,ze=Re);return e&&le.forEach(function(qn){return t(A,qn)}),Oe&&Ka(A,Se),de}function he(A,j,T,q){if(T==null)throw Error(u(151));for(var de=null,ze=null,le=j,Se=j=0,Re=null,Be=T.next();le!==null&&!Be.done;Se++,Be=T.next()){le.index>Se?(Re=le,le=null):Re=le.sibling;var qn=k(A,le,Be.value,q);if(qn===null){le===null&&(le=Re);break}e&&le&&qn.alternate===null&&t(A,le),j=o(qn,j,Se),ze===null?de=qn:ze.sibling=qn,ze=qn,le=Re}if(Be.done)return a(A,le),Oe&&Ka(A,Se),de;if(le===null){for(;!Be.done;Se++,Be=T.next())Be=H(A,Be.value,q),Be!==null&&(j=o(Be,j,Se),ze===null?de=Be:ze.sibling=Be,ze=Be);return Oe&&Ka(A,Se),de}for(le=l(le);!Be.done;Se++,Be=T.next())Be=M(le,A,Se,Be.value,q),Be!==null&&(e&&Be.alternate!==null&&le.delete(Be.key===null?Se:Be.key),j=o(Be,j,Se),ze===null?de=Be:ze.sibling=Be,ze=Be);return e&&le.forEach(function(Ig){return t(A,Ig)}),Oe&&Ka(A,Se),de}function Je(A,j,T,q){if(typeof T=="object"&&T!==null&&T.type===V&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case K:e:{for(var de=T.key;j!==null;){if(j.key===de){if(de=T.type,de===V){if(j.tag===7){a(A,j.sibling),q=r(j,T.props.children),q.return=A,A=q;break e}}else if(j.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===be&&nl(de)===j.type){a(A,j.sibling),q=r(j,T.props),zi(q,T),q.return=A,A=q;break e}a(A,j);break}else t(A,j);j=j.sibling}T.type===V?(q=Wn(T.props.children,A.mode,q,T.key),q.return=A,A=q):(q=$s(T.type,T.key,T.props,null,A.mode,q),zi(q,T),q.return=A,A=q)}return h(A);case D:e:{for(de=T.key;j!==null;){if(j.key===de)if(j.tag===4&&j.stateNode.containerInfo===T.containerInfo&&j.stateNode.implementation===T.implementation){a(A,j.sibling),q=r(j,T.children||[]),q.return=A,A=q;break e}else{a(A,j);break}else t(A,j);j=j.sibling}q=Xu(T,A.mode,q),q.return=A,A=q}return h(A);case be:return T=nl(T),Je(A,j,T,q)}if(ie(T))return te(A,j,T,q);if(et(T)){if(de=et(T),typeof de!="function")throw Error(u(150));return T=de.call(T),he(A,j,T,q)}if(typeof T.then=="function")return Je(A,j,Ks(T),q);if(T.$$typeof===ne)return Je(A,j,Zs(A,T),q);Js(A,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,j!==null&&j.tag===6?(a(A,j.sibling),q=r(j,T),q.return=A,A=q):(a(A,j),q=Qu(T,A.mode,q),q.return=A,A=q),h(A)):a(A,j)}return function(A,j,T,q){try{Ui=0;var de=Je(A,j,T,q);return Gl=null,de}catch(le){if(le===Zl||le===Qs)throw le;var ze=Qt(29,le,null,A.mode);return ze.lanes=q,ze.return=A,ze}finally{}}}var il=Jf(!0),If=Jf(!1),Sn=!1;function ic(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sc(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 _n(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function jn(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(qe&2)!==0){var r=l.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),l.pending=t,t=Hs(e),Mf(e,null,a),t}return qs(e,l,t,a),Hs(e)}function Bi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Hd(e,a)}}function rc(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var r=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?r=o=h:o=o.next=h,a=a.next}while(a!==null);o===null?r=o=t:o=o.next=t}else r=o=t;a={baseState:l.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var uc=!1;function qi(){if(uc){var e=Yl;if(e!==null)throw e}}function Hi(e,t,a,l){uc=!1;var r=e.updateQueue;Sn=!1;var o=r.firstBaseUpdate,h=r.lastBaseUpdate,x=r.shared.pending;if(x!==null){r.shared.pending=null;var w=x,C=w.next;w.next=null,h===null?o=C:h.next=C,h=w;var z=e.alternate;z!==null&&(z=z.updateQueue,x=z.lastBaseUpdate,x!==h&&(x===null?z.firstBaseUpdate=C:x.next=C,z.lastBaseUpdate=w))}if(o!==null){var H=r.baseState;h=0,z=C=w=null,x=o;do{var k=x.lane&-536870913,M=k!==x.lane;if(M?(Ce&k)===k:(l&k)===k){k!==0&&k===Vl&&(uc=!0),z!==null&&(z=z.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var te=e,he=x;k=t;var Je=a;switch(he.tag){case 1:if(te=he.payload,typeof te=="function"){H=te.call(Je,H,k);break e}H=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=he.payload,k=typeof te=="function"?te.call(Je,H,k):te,k==null)break e;H=N({},H,k);break e;case 2:Sn=!0}}k=x.callback,k!==null&&(e.flags|=64,M&&(e.flags|=8192),M=r.callbacks,M===null?r.callbacks=[k]:M.push(k))}else M={lane:k,tag:x.tag,payload:x.payload,callback:x.callback,next:null},z===null?(C=z=M,w=H):z=z.next=M,h|=k;if(x=x.next,x===null){if(x=r.shared.pending,x===null)break;M=x,x=M.next,M.next=null,r.lastBaseUpdate=M,r.shared.pending=null}}while(!0);z===null&&(w=H),r.baseState=w,r.firstBaseUpdate=C,r.lastBaseUpdate=z,o===null&&(r.shared.lanes=0),Cn|=h,e.lanes=h,e.memoizedState=H}}function Ff(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Wf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Ff(a[e],t)}var Ql=_(null),Is=_(0);function Pf(e,t){e=sn,G(Is,e),G(Ql,t),sn=e|t.baseLanes}function cc(){G(Is,sn),G(Ql,Ql.current)}function oc(){sn=Is.current,B(Ql),B(Is)}var Xt=_(null),ua=null;function Nn(e){var t=e.alternate;G(ut,ut.current&1),G(Xt,e),ua===null&&(t===null||Ql.current!==null||t.memoizedState!==null)&&(ua=e)}function dc(e){G(ut,ut.current),G(Xt,e),ua===null&&(ua=e)}function eh(e){e.tag===22?(G(ut,ut.current),G(Xt,e),ua===null&&(ua=e)):An()}function An(){G(ut,ut.current),G(Xt,Xt.current)}function Kt(e){B(Xt),ua===e&&(ua=null),B(ut)}var ut=_(0);function Fs(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||vo(a)||go(a)))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 Fa=0,ge=null,Xe=null,ft=null,Ws=!1,Xl=!1,sl=!1,Ps=0,$i=0,Kl=null,Hv=0;function it(){throw Error(u(321))}function fc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Gt(e[a],t[a]))return!1;return!0}function hc(e,t,a,l,r,o){return Fa=o,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?zh:Tc,sl=!1,o=a(l,r),sl=!1,Xl&&(o=ah(t,a,l,r)),th(e),o}function th(e){U.H=Zi;var t=Xe!==null&&Xe.next!==null;if(Fa=0,ft=Xe=ge=null,Ws=!1,$i=0,Kl=null,t)throw Error(u(300));e===null||ht||(e=e.dependencies,e!==null&&Ys(e)&&(ht=!0))}function ah(e,t,a,l){ge=e;var r=0;do{if(Xl&&(Kl=null),$i=0,Xl=!1,25<=r)throw Error(u(301));if(r+=1,ft=Xe=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}U.H=Bh,o=t(a,l)}while(Xl);return o}function $v(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?Vi(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(ge.flags|=1024),t}function mc(){var e=Ps!==0;return Ps=0,e}function pc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function xc(e){if(Ws){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ws=!1}Fa=0,ft=Xe=ge=null,Xl=!1,$i=Ps=0,Kl=null}function Ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?ge.memoizedState=ft=e:ft=ft.next=e,ft}function ct(){if(Xe===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ft===null?ge.memoizedState:ft.next;if(t!==null)ft=t,Xe=e;else{if(e===null)throw ge.alternate===null?Error(u(467)):Error(u(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ft===null?ge.memoizedState=ft=e:ft=ft.next=e}return ft}function er(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Vi(e){var t=$i;return $i+=1,Kl===null&&(Kl=[]),e=Qf(Kl,e,t),t=ge,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?zh:Tc),e}function tr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Vi(e);if(e.$$typeof===ne)return Nt(e)}throw Error(u(438,String(e)))}function yc(e){var t=null,a=ge.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ge.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=er(),ge.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=gt;return t.index++,a}function Wa(e,t){return typeof t=="function"?t(e):t}function ar(e){var t=ct();return vc(t,Xe,e)}function vc(e,t,a){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=a;var r=e.baseQueue,o=l.pending;if(o!==null){if(r!==null){var h=r.next;r.next=o.next,o.next=h}t.baseQueue=r=o,l.pending=null}if(o=e.baseState,r===null)e.memoizedState=o;else{t=r.next;var x=h=null,w=null,C=t,z=!1;do{var H=C.lane&-536870913;if(H!==C.lane?(Ce&H)===H:(Fa&H)===H){var k=C.revertLane;if(k===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null}),H===Vl&&(z=!0);else if((Fa&k)===k){C=C.next,k===Vl&&(z=!0);continue}else H={lane:0,revertLane:C.revertLane,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},w===null?(x=w=H,h=o):w=w.next=H,ge.lanes|=k,Cn|=k;H=C.action,sl&&a(o,H),o=C.hasEagerState?C.eagerState:a(o,H)}else k={lane:H,revertLane:C.revertLane,gesture:C.gesture,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},w===null?(x=w=k,h=o):w=w.next=k,ge.lanes|=H,Cn|=H;C=C.next}while(C!==null&&C!==t);if(w===null?h=o:w.next=x,!Gt(o,e.memoizedState)&&(ht=!0,z&&(a=Yl,a!==null)))throw a;e.memoizedState=o,e.baseState=h,e.baseQueue=w,l.lastRenderedState=o}return r===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function gc(e){var t=ct(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var l=a.dispatch,r=a.pending,o=t.memoizedState;if(r!==null){a.pending=null;var h=r=r.next;do o=e(o,h.action),h=h.next;while(h!==r);Gt(o,t.memoizedState)||(ht=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,l]}function nh(e,t,a){var l=ge,r=ct(),o=Oe;if(o){if(a===void 0)throw Error(u(407));a=a()}else a=t();var h=!Gt((Xe||r).memoizedState,a);if(h&&(r.memoizedState=a,ht=!0),r=r.queue,Sc(sh.bind(null,l,r,e),[e]),r.getSnapshot!==t||h||ft!==null&&ft.memoizedState.tag&1){if(l.flags|=2048,Jl(9,{destroy:void 0},ih.bind(null,l,r,a,t),null),Ie===null)throw Error(u(349));o||(Fa&127)!==0||lh(l,t,a)}return a}function lh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ge.updateQueue,t===null?(t=er(),ge.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function ih(e,t,a,l){t.value=a,t.getSnapshot=l,rh(t)&&uh(e)}function sh(e,t,a){return a(function(){rh(t)&&uh(e)})}function rh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Gt(e,a)}catch{return!0}}function uh(e){var t=Fn(e,2);t!==null&&$t(t,e,2)}function bc(e){var t=Ot();if(typeof e=="function"){var a=e;if(e=a(),sl){we(!0);try{a()}finally{we(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wa,lastRenderedState:e},t}function ch(e,t,a,l){return e.baseState=a,vc(e,Xe,typeof l=="function"?l:Wa)}function Vv(e,t,a,l,r){if(ir(e))throw Error(u(485));if(e=t.action,e!==null){var o={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){o.listeners.push(h)}};U.T!==null?a(!0):o.isTransition=!1,l(o),a=t.pending,a===null?(o.next=t.pending=o,oh(t,o)):(o.next=a.next,t.pending=a.next=o)}}function oh(e,t){var a=t.action,l=t.payload,r=e.state;if(t.isTransition){var o=U.T,h={};U.T=h;try{var x=a(r,l),w=U.S;w!==null&&w(h,x),dh(e,t,x)}catch(C){wc(e,t,C)}finally{o!==null&&h.types!==null&&(o.types=h.types),U.T=o}}else try{o=a(r,l),dh(e,t,o)}catch(C){wc(e,t,C)}}function dh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){fh(e,t,l)},function(l){return wc(e,t,l)}):fh(e,t,a)}function fh(e,t,a){t.status="fulfilled",t.value=a,hh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,oh(e,a)))}function wc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,hh(t),t=t.next;while(t!==l)}e.action=null}function hh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mh(e,t){return t}function ph(e,t){if(Oe){var a=Ie.formState;if(a!==null){e:{var l=ge;if(Oe){if(We){t:{for(var r=We,o=ra;r.nodeType!==8;){if(!o){r=null;break t}if(r=ca(r.nextSibling),r===null){r=null;break t}}o=r.data,r=o==="F!"||o==="F"?r:null}if(r){We=ca(r.nextSibling),l=r.data==="F!";break e}}bn(l)}l=!1}l&&(t=a[0])}}return a=Ot(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mh,lastRenderedState:t},a.queue=l,a=Dh.bind(null,ge,l),l.dispatch=a,l=bc(!1),o=Ec.bind(null,ge,!1,l.queue),l=Ot(),r={state:t,dispatch:null,action:e,pending:null},l.queue=r,a=Vv.bind(null,ge,r,o,a),r.dispatch=a,l.memoizedState=e,[t,a,!1]}function xh(e){var t=ct();return yh(t,Xe,e)}function yh(e,t,a){if(t=vc(e,t,mh)[0],e=ar(Wa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Vi(t)}catch(h){throw h===Zl?Qs:h}else l=t;t=ct();var r=t.queue,o=r.dispatch;return a!==t.memoizedState&&(ge.flags|=2048,Jl(9,{destroy:void 0},Yv.bind(null,r,a),null)),[l,o,e]}function Yv(e,t){e.action=t}function vh(e){var t=ct(),a=Xe;if(a!==null)return yh(t,a,e);ct(),t=t.memoizedState,a=ct();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Jl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ge.updateQueue,t===null&&(t=er(),ge.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function gh(){return ct().memoizedState}function nr(e,t,a,l){var r=Ot();ge.flags|=e,r.memoizedState=Jl(1|t,{destroy:void 0},a,l===void 0?null:l)}function lr(e,t,a,l){var r=ct();l=l===void 0?null:l;var o=r.memoizedState.inst;Xe!==null&&l!==null&&fc(l,Xe.memoizedState.deps)?r.memoizedState=Jl(t,o,a,l):(ge.flags|=e,r.memoizedState=Jl(1|t,o,a,l))}function bh(e,t){nr(8390656,8,e,t)}function Sc(e,t){lr(2048,8,e,t)}function Zv(e){ge.flags|=4;var t=ge.updateQueue;if(t===null)t=er(),ge.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function wh(e){var t=ct().memoizedState;return Zv({ref:t,nextImpl:e}),function(){if((qe&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Sh(e,t){return lr(4,2,e,t)}function _h(e,t){return lr(4,4,e,t)}function jh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Nh(e,t,a){a=a!=null?a.concat([e]):null,lr(4,4,jh.bind(null,t,e),a)}function _c(){}function Ah(e,t){var a=ct();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&fc(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Eh(e,t){var a=ct();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&fc(t,l[1]))return l[0];if(l=e(),sl){we(!0);try{e()}finally{we(!1)}}return a.memoizedState=[l,t],l}function jc(e,t,a){return a===void 0||(Fa&1073741824)!==0&&(Ce&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Tm(),ge.lanes|=e,Cn|=e,a)}function Th(e,t,a,l){return Gt(a,t)?a:Ql.current!==null?(e=jc(e,a,l),Gt(e,t)||(ht=!0),e):(Fa&42)===0||(Fa&1073741824)!==0&&(Ce&261930)===0?(ht=!0,e.memoizedState=a):(e=Tm(),ge.lanes|=e,Cn|=e,t)}function Ch(e,t,a,l,r){var o=F.p;F.p=o!==0&&8>o?o:8;var h=U.T,x={};U.T=x,Ec(e,!1,t,a);try{var w=r(),C=U.S;if(C!==null&&C(x,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var z=qv(w,l);Yi(e,t,z,Ft(e))}else Yi(e,t,l,Ft(e))}catch(H){Yi(e,t,{then:function(){},status:"rejected",reason:H},Ft())}finally{F.p=o,h!==null&&x.types!==null&&(h.types=x.types),U.T=h}}function Gv(){}function Nc(e,t,a,l){if(e.tag!==5)throw Error(u(476));var r=Rh(e).queue;Ch(e,r,t,oe,a===null?Gv:function(){return kh(e),a(l)})}function Rh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wa,lastRenderedState:oe},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function kh(e){var t=Rh(e);t.next===null&&(t=e.alternate.memoizedState),Yi(e,t.next.queue,{},Ft())}function Ac(){return Nt(ss)}function Oh(){return ct().memoizedState}function Mh(){return ct().memoizedState}function Qv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ft();e=_n(a);var l=jn(t,e,a);l!==null&&($t(l,t,a),Bi(l,t,a)),t={cache:tc()},e.payload=t;return}t=t.return}}function Xv(e,t,a){var l=Ft();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ir(e)?Lh(t,a):(a=Zu(e,t,a,l),a!==null&&($t(a,e,l),Uh(a,t,l)))}function Dh(e,t,a){var l=Ft();Yi(e,t,a,l)}function Yi(e,t,a,l){var r={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ir(e))Lh(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var h=t.lastRenderedState,x=o(h,a);if(r.hasEagerState=!0,r.eagerState=x,Gt(x,h))return qs(e,t,r,0),Ie===null&&Bs(),!1}catch{}finally{}if(a=Zu(e,t,r,l),a!==null)return $t(a,e,l),Uh(a,t,l),!0}return!1}function Ec(e,t,a,l){if(l={lane:2,revertLane:io(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ir(e)){if(t)throw Error(u(479))}else t=Zu(e,a,l,2),t!==null&&$t(t,e,2)}function ir(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function Lh(e,t){Xl=Ws=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Uh(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Hd(e,a)}}var Zi={readContext:Nt,use:tr,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};Zi.useEffectEvent=it;var zh={readContext:Nt,use:tr,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:Nt,useEffect:bh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,nr(4194308,4,jh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return nr(4194308,4,e,t)},useInsertionEffect:function(e,t){nr(4,2,e,t)},useMemo:function(e,t){var a=Ot();t=t===void 0?null:t;var l=e();if(sl){we(!0);try{e()}finally{we(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Ot();if(a!==void 0){var r=a(t);if(sl){we(!0);try{a(t)}finally{we(!1)}}}else r=t;return l.memoizedState=l.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=Xv.bind(null,ge,e),[l.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:function(e){e=bc(e);var t=e.queue,a=Dh.bind(null,ge,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:_c,useDeferredValue:function(e,t){var a=Ot();return jc(a,e,t)},useTransition:function(){var e=bc(!1);return e=Ch.bind(null,ge,e.queue,!0,!1),Ot().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ge,r=Ot();if(Oe){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Ie===null)throw Error(u(349));(Ce&127)!==0||lh(l,t,a)}r.memoizedState=a;var o={value:a,getSnapshot:t};return r.queue=o,bh(sh.bind(null,l,o,e),[e]),l.flags|=2048,Jl(9,{destroy:void 0},ih.bind(null,l,o,a,t),null),a},useId:function(){var e=Ot(),t=Ie.identifierPrefix;if(Oe){var a=Ua,l=La;a=(l&~(1<<32-Ue(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ps++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Hv++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ac,useFormState:ph,useActionState:ph,useOptimistic:function(e){var t=Ot();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Ec.bind(null,ge,!0,a),a.dispatch=t,[e,t]},useMemoCache:yc,useCacheRefresh:function(){return Ot().memoizedState=Qv.bind(null,ge)},useEffectEvent:function(e){var t=Ot(),a={impl:e};return t.memoizedState=a,function(){if((qe&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},Tc={readContext:Nt,use:tr,useCallback:Ah,useContext:Nt,useEffect:Sc,useImperativeHandle:Nh,useInsertionEffect:Sh,useLayoutEffect:_h,useMemo:Eh,useReducer:ar,useRef:gh,useState:function(){return ar(Wa)},useDebugValue:_c,useDeferredValue:function(e,t){var a=ct();return Th(a,Xe.memoizedState,e,t)},useTransition:function(){var e=ar(Wa)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:Vi(e),t]},useSyncExternalStore:nh,useId:Oh,useHostTransitionStatus:Ac,useFormState:xh,useActionState:xh,useOptimistic:function(e,t){var a=ct();return ch(a,Xe,e,t)},useMemoCache:yc,useCacheRefresh:Mh};Tc.useEffectEvent=wh;var Bh={readContext:Nt,use:tr,useCallback:Ah,useContext:Nt,useEffect:Sc,useImperativeHandle:Nh,useInsertionEffect:Sh,useLayoutEffect:_h,useMemo:Eh,useReducer:gc,useRef:gh,useState:function(){return gc(Wa)},useDebugValue:_c,useDeferredValue:function(e,t){var a=ct();return Xe===null?jc(a,e,t):Th(a,Xe.memoizedState,e,t)},useTransition:function(){var e=gc(Wa)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:Vi(e),t]},useSyncExternalStore:nh,useId:Oh,useHostTransitionStatus:Ac,useFormState:vh,useActionState:vh,useOptimistic:function(e,t){var a=ct();return Xe!==null?ch(a,Xe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:yc,useCacheRefresh:Mh};Bh.useEffectEvent=wh;function Cc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:N({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Rc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Ft(),r=_n(l);r.payload=t,a!=null&&(r.callback=a),t=jn(e,r,l),t!==null&&($t(t,e,l),Bi(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Ft(),r=_n(l);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=jn(e,r,l),t!==null&&($t(t,e,l),Bi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ft(),l=_n(a);l.tag=2,t!=null&&(l.callback=t),t=jn(e,l,a),t!==null&&($t(t,e,a),Bi(t,e,a))}};function qh(e,t,a,l,r,o,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,o,h):t.prototype&&t.prototype.isPureReactComponent?!Ri(a,l)||!Ri(r,o):!0}function Hh(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Rc.enqueueReplaceState(t,t.state,null)}function rl(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=N({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function $h(e){zs(e)}function Vh(e){console.error(e)}function Yh(e){zs(e)}function sr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Zh(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function kc(e,t,a){return a=_n(a),a.tag=3,a.payload={element:null},a.callback=function(){sr(e,t)},a}function Gh(e){return e=_n(e),e.tag=3,e}function Qh(e,t,a,l){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var o=l.value;e.payload=function(){return r(o)},e.callback=function(){Zh(t,a,l)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){Zh(t,a,l),typeof r!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var x=l.stack;this.componentDidCatch(l.value,{componentStack:x!==null?x:""})})}function Kv(e,t,a,l,r){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&$l(t,a,r,!0),a=Xt.current,a!==null){switch(a.tag){case 31:case 13:return ua===null?vr():a.alternate===null&&st===0&&(st=3),a.flags&=-257,a.flags|=65536,a.lanes=r,l===Xs?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),ao(e,l,r)),!1;case 22:return a.flags|=65536,l===Xs?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),ao(e,l,r)),!1}throw Error(u(435,a.tag))}return ao(e,l,r),vr(),!1}if(Oe)return t=Xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,l!==Iu&&(e=Error(u(422),{cause:l}),Mi(la(e,a)))):(l!==Iu&&(t=Error(u(423),{cause:l}),Mi(la(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,l=la(l,a),r=kc(e.stateNode,l,r),rc(e,r),st!==4&&(st=2)),!1;var o=Error(u(520),{cause:l});if(o=la(o,a),Wi===null?Wi=[o]:Wi.push(o),st!==4&&(st=2),t===null)return!0;l=la(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=kc(a.stateNode,l,e),rc(a,e),!1;case 1:if(t=a.type,o=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(Rn===null||!Rn.has(o))))return a.flags|=65536,r&=-r,a.lanes|=r,r=Gh(r),Qh(r,e,a,l),rc(a,r),!1}a=a.return}while(a!==null);return!1}var Oc=Error(u(461)),ht=!1;function At(e,t,a,l){t.child=e===null?If(t,null,a,l):il(t,e.child,a,l)}function Xh(e,t,a,l,r){a=a.render;var o=t.ref;if("ref"in l){var h={};for(var x in l)x!=="ref"&&(h[x]=l[x])}else h=l;return tl(t),l=hc(e,t,a,h,o,r),x=mc(),e!==null&&!ht?(pc(e,t,r),Pa(e,t,r)):(Oe&&x&&Ku(t),t.flags|=1,At(e,t,l,r),t.child)}function Kh(e,t,a,l,r){if(e===null){var o=a.type;return typeof o=="function"&&!Gu(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,Jh(e,t,o,l,r)):(e=$s(a.type,null,l,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!Hc(e,r)){var h=o.memoizedProps;if(a=a.compare,a=a!==null?a:Ri,a(h,l)&&e.ref===t.ref)return Pa(e,t,r)}return t.flags|=1,e=Xa(o,l),e.ref=t.ref,e.return=t,t.child=e}function Jh(e,t,a,l,r){if(e!==null){var o=e.memoizedProps;if(Ri(o,l)&&e.ref===t.ref)if(ht=!1,t.pendingProps=l=o,Hc(e,r))(e.flags&131072)!==0&&(ht=!0);else return t.lanes=e.lanes,Pa(e,t,r)}return Mc(e,t,a,l,r)}function Ih(e,t,a,l){var r=l.children,o=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(o=o!==null?o.baseLanes|a:a,e!==null){for(l=t.child=e.child,r=0;l!==null;)r=r|l.lanes|l.childLanes,l=l.sibling;l=r&~o}else l=0,t.child=null;return Fh(e,t,o,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gs(t,o!==null?o.cachePool:null),o!==null?Pf(t,o):cc(),eh(t);else return l=t.lanes=536870912,Fh(e,t,o!==null?o.baseLanes|a:a,a,l)}else o!==null?(Gs(t,o.cachePool),Pf(t,o),An(),t.memoizedState=null):(e!==null&&Gs(t,null),cc(),An());return At(e,t,r,a),t.child}function Gi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Fh(e,t,a,l,r){var o=nc();return o=o===null?null:{parent:dt._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&Gs(t,null),cc(),eh(t),e!==null&&$l(e,t,l,!0),t.childLanes=r,null}function rr(e,t){return t=cr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Wh(e,t,a){return il(t,e.child,null,a),e=rr(t,t.pendingProps),e.flags|=2,Kt(t),t.memoizedState=null,e}function Jv(e,t,a){var l=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Oe){if(l.mode==="hidden")return e=rr(t,l),t.lanes=536870912,Gi(null,e);if(dc(t),(e=We)?(e=op(e,ra),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vn!==null?{id:La,overflow:Ua}:null,retryLane:536870912,hydrationErrors:null},a=Lf(e),a.return=t,t.child=a,jt=t,We=null)):e=null,e===null)throw bn(t);return t.lanes=536870912,null}return rr(t,l)}var o=e.memoizedState;if(o!==null){var h=o.dehydrated;if(dc(t),r)if(t.flags&256)t.flags&=-257,t=Wh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(ht||$l(e,t,a,!1),r=(a&e.childLanes)!==0,ht||r){if(l=Ie,l!==null&&(h=$d(l,a),h!==0&&h!==o.retryLane))throw o.retryLane=h,Fn(e,h),$t(l,e,h),Oc;vr(),t=Wh(e,t,a)}else e=o.treeContext,We=ca(h.nextSibling),jt=t,Oe=!0,gn=null,ra=!1,e!==null&&Bf(t,e),t=rr(t,l),t.flags|=4096;return t}return e=Xa(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ur(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Mc(e,t,a,l,r){return tl(t),a=hc(e,t,a,l,void 0,r),l=mc(),e!==null&&!ht?(pc(e,t,r),Pa(e,t,r)):(Oe&&l&&Ku(t),t.flags|=1,At(e,t,a,r),t.child)}function Ph(e,t,a,l,r,o){return tl(t),t.updateQueue=null,a=ah(t,l,a,r),th(e),l=mc(),e!==null&&!ht?(pc(e,t,o),Pa(e,t,o)):(Oe&&l&&Ku(t),t.flags|=1,At(e,t,a,o),t.child)}function em(e,t,a,l,r){if(tl(t),t.stateNode===null){var o=zl,h=a.contextType;typeof h=="object"&&h!==null&&(o=Nt(h)),o=new a(l,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Rc,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=l,o.state=t.memoizedState,o.refs={},ic(t),h=a.contextType,o.context=typeof h=="object"&&h!==null?Nt(h):zl,o.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(Cc(t,a,h,l),o.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(h=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),h!==o.state&&Rc.enqueueReplaceState(o,o.state,null),Hi(t,l,o,r),qi(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){o=t.stateNode;var x=t.memoizedProps,w=rl(a,x);o.props=w;var C=o.context,z=a.contextType;h=zl,typeof z=="object"&&z!==null&&(h=Nt(z));var H=a.getDerivedStateFromProps;z=typeof H=="function"||typeof o.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,z||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(x||C!==h)&&Hh(t,o,l,h),Sn=!1;var k=t.memoizedState;o.state=k,Hi(t,l,o,r),qi(),C=t.memoizedState,x||k!==C||Sn?(typeof H=="function"&&(Cc(t,a,H,l),C=t.memoizedState),(w=Sn||qh(t,a,w,l,k,C,h))?(z||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=C),o.props=l,o.state=C,o.context=h,l=w):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{o=t.stateNode,sc(e,t),h=t.memoizedProps,z=rl(a,h),o.props=z,H=t.pendingProps,k=o.context,C=a.contextType,w=zl,typeof C=="object"&&C!==null&&(w=Nt(C)),x=a.getDerivedStateFromProps,(C=typeof x=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(h!==H||k!==w)&&Hh(t,o,l,w),Sn=!1,k=t.memoizedState,o.state=k,Hi(t,l,o,r),qi();var M=t.memoizedState;h!==H||k!==M||Sn||e!==null&&e.dependencies!==null&&Ys(e.dependencies)?(typeof x=="function"&&(Cc(t,a,x,l),M=t.memoizedState),(z=Sn||qh(t,a,z,l,k,M,w)||e!==null&&e.dependencies!==null&&Ys(e.dependencies))?(C||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(l,M,w),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(l,M,w)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=M),o.props=l,o.state=M,o.context=w,l=z):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),l=!1)}return o=l,ur(e,t),l=(t.flags&128)!==0,o||l?(o=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&l?(t.child=il(t,e.child,null,r),t.child=il(t,null,a,r)):At(e,t,a,r),t.memoizedState=o.state,e=t.child):e=Pa(e,t,r),e}function tm(e,t,a,l){return Pn(),t.flags|=256,At(e,t,a,l),t.child}var Dc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lc(e){return{baseLanes:e,cachePool:Zf()}}function Uc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=It),e}function am(e,t,a){var l=t.pendingProps,r=!1,o=(t.flags&128)!==0,h;if((h=o)||(h=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),h&&(r=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Oe){if(r?Nn(t):An(),(e=We)?(e=op(e,ra),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vn!==null?{id:La,overflow:Ua}:null,retryLane:536870912,hydrationErrors:null},a=Lf(e),a.return=t,t.child=a,jt=t,We=null)):e=null,e===null)throw bn(t);return go(e)?t.lanes=32:t.lanes=536870912,null}var x=l.children;return l=l.fallback,r?(An(),r=t.mode,x=cr({mode:"hidden",children:x},r),l=Wn(l,r,a,null),x.return=t,l.return=t,x.sibling=l,t.child=x,l=t.child,l.memoizedState=Lc(a),l.childLanes=Uc(e,h,a),t.memoizedState=Dc,Gi(null,l)):(Nn(t),zc(t,x))}var w=e.memoizedState;if(w!==null&&(x=w.dehydrated,x!==null)){if(o)t.flags&256?(Nn(t),t.flags&=-257,t=Bc(e,t,a)):t.memoizedState!==null?(An(),t.child=e.child,t.flags|=128,t=null):(An(),x=l.fallback,r=t.mode,l=cr({mode:"visible",children:l.children},r),x=Wn(x,r,a,null),x.flags|=2,l.return=t,x.return=t,l.sibling=x,t.child=l,il(t,e.child,null,a),l=t.child,l.memoizedState=Lc(a),l.childLanes=Uc(e,h,a),t.memoizedState=Dc,t=Gi(null,l));else if(Nn(t),go(x)){if(h=x.nextSibling&&x.nextSibling.dataset,h)var C=h.dgst;h=C,l=Error(u(419)),l.stack="",l.digest=h,Mi({value:l,source:null,stack:null}),t=Bc(e,t,a)}else if(ht||$l(e,t,a,!1),h=(a&e.childLanes)!==0,ht||h){if(h=Ie,h!==null&&(l=$d(h,a),l!==0&&l!==w.retryLane))throw w.retryLane=l,Fn(e,l),$t(h,e,l),Oc;vo(x)||vr(),t=Bc(e,t,a)}else vo(x)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,We=ca(x.nextSibling),jt=t,Oe=!0,gn=null,ra=!1,e!==null&&Bf(t,e),t=zc(t,l.children),t.flags|=4096);return t}return r?(An(),x=l.fallback,r=t.mode,w=e.child,C=w.sibling,l=Xa(w,{mode:"hidden",children:l.children}),l.subtreeFlags=w.subtreeFlags&65011712,C!==null?x=Xa(C,x):(x=Wn(x,r,a,null),x.flags|=2),x.return=t,l.return=t,l.sibling=x,t.child=l,Gi(null,l),l=t.child,x=e.child.memoizedState,x===null?x=Lc(a):(r=x.cachePool,r!==null?(w=dt._currentValue,r=r.parent!==w?{parent:w,pool:w}:r):r=Zf(),x={baseLanes:x.baseLanes|a,cachePool:r}),l.memoizedState=x,l.childLanes=Uc(e,h,a),t.memoizedState=Dc,Gi(e.child,l)):(Nn(t),a=e.child,e=a.sibling,a=Xa(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=a,t.memoizedState=null,a)}function zc(e,t){return t=cr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function cr(e,t){return e=Qt(22,e,null,t),e.lanes=0,e}function Bc(e,t,a){return il(t,e.child,null,a),e=zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nm(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Pu(e.return,t,a)}function qc(e,t,a,l,r,o){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:r,treeForkCount:o}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=l,h.tail=a,h.tailMode=r,h.treeForkCount=o)}function lm(e,t,a){var l=t.pendingProps,r=l.revealOrder,o=l.tail;l=l.children;var h=ut.current,x=(h&2)!==0;if(x?(h=h&1|2,t.flags|=128):h&=1,G(ut,h),At(e,t,l,a),l=Oe?Oi:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nm(e,a,t);else if(e.tag===19)nm(e,a,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(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&Fs(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),qc(t,!1,r,a,o,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Fs(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}qc(t,!0,a,null,o,l);break;case"together":qc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Pa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Cn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if($l(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=Xa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Xa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Hc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ys(e)))}function Iv(e,t,a){switch(t.tag){case 3:nt(t,t.stateNode.containerInfo),wn(t,dt,e.memoizedState.cache),Pn();break;case 27:case 5:ot(t);break;case 4:nt(t,t.stateNode.containerInfo);break;case 10:wn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,dc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Nn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?am(e,t,a):(Nn(t),e=Pa(e,t,a),e!==null?e.sibling:null);Nn(t);break;case 19:var r=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||($l(e,t,a,!1),l=(a&t.childLanes)!==0),r){if(l)return lm(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),G(ut,ut.current),l)break;return null;case 22:return t.lanes=0,Ih(e,t,a,t.pendingProps);case 24:wn(t,dt,e.memoizedState.cache)}return Pa(e,t,a)}function im(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ht=!0;else{if(!Hc(e,a)&&(t.flags&128)===0)return ht=!1,Iv(e,t,a);ht=(e.flags&131072)!==0}else ht=!1,Oe&&(t.flags&1048576)!==0&&zf(t,Oi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=nl(t.elementType),t.type=e,typeof e=="function")Gu(e)?(l=rl(e,l),t.tag=1,t=em(null,t,e,l,a)):(t.tag=0,t=Mc(null,t,e,l,a));else{if(e!=null){var r=e.$$typeof;if(r===pe){t.tag=11,t=Xh(null,t,e,l,a);break e}else if(r===X){t.tag=14,t=Kh(null,t,e,l,a);break e}}throw t=He(e)||e,Error(u(306,t,""))}}return t;case 0:return Mc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,r=rl(l,t.pendingProps),em(e,t,l,r,a);case 3:e:{if(nt(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var o=t.memoizedState;r=o.element,sc(e,t),Hi(t,l,null,a);var h=t.memoizedState;if(l=h.cache,wn(t,dt,l),l!==o.cache&&ec(t,[dt],a,!0),qi(),l=h.element,o.isDehydrated)if(o={element:l,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=tm(e,t,l,a);break e}else if(l!==r){r=la(Error(u(424)),t),Mi(r),t=tm(e,t,l,a);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(We=ca(e.firstChild),jt=t,Oe=!0,gn=null,ra=!0,a=If(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Pn(),l===r){t=Pa(e,t,a);break e}At(e,t,l,a)}t=t.child}return t;case 26:return ur(e,t),e===null?(a=xp(t.type,null,t.pendingProps,null))?t.memoizedState=a:Oe||(a=t.type,e=t.pendingProps,l=Nr(ce.current).createElement(a),l[_t]=t,l[Lt]=e,Et(l,a,e),bt(l),t.stateNode=l):t.memoizedState=xp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ot(t),e===null&&Oe&&(l=t.stateNode=hp(t.type,t.pendingProps,ce.current),jt=t,ra=!0,r=We,Dn(t.type)?(bo=r,We=ca(l.firstChild)):We=r),At(e,t,t.pendingProps.children,a),ur(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oe&&((r=l=We)&&(l=Ag(l,t.type,t.pendingProps,ra),l!==null?(t.stateNode=l,jt=t,We=ca(l.firstChild),ra=!1,r=!0):r=!1),r||bn(t)),ot(t),r=t.type,o=t.pendingProps,h=e!==null?e.memoizedProps:null,l=o.children,po(r,o)?l=null:h!==null&&po(r,h)&&(t.flags|=32),t.memoizedState!==null&&(r=hc(e,t,$v,null,null,a),ss._currentValue=r),ur(e,t),At(e,t,l,a),t.child;case 6:return e===null&&Oe&&((e=a=We)&&(a=Eg(a,t.pendingProps,ra),a!==null?(t.stateNode=a,jt=t,We=null,e=!0):e=!1),e||bn(t)),null;case 13:return am(e,t,a);case 4:return nt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=il(t,null,l,a):At(e,t,l,a),t.child;case 11:return Xh(e,t,t.type,t.pendingProps,a);case 7:return At(e,t,t.pendingProps,a),t.child;case 8:return At(e,t,t.pendingProps.children,a),t.child;case 12:return At(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,wn(t,t.type,l.value),At(e,t,l.children,a),t.child;case 9:return r=t.type._context,l=t.pendingProps.children,tl(t),r=Nt(r),l=l(r),t.flags|=1,At(e,t,l,a),t.child;case 14:return Kh(e,t,t.type,t.pendingProps,a);case 15:return Jh(e,t,t.type,t.pendingProps,a);case 19:return lm(e,t,a);case 31:return Jv(e,t,a);case 22:return Ih(e,t,a,t.pendingProps);case 24:return tl(t),l=Nt(dt),e===null?(r=nc(),r===null&&(r=Ie,o=tc(),r.pooledCache=o,o.refCount++,o!==null&&(r.pooledCacheLanes|=a),r=o),t.memoizedState={parent:l,cache:r},ic(t),wn(t,dt,r)):((e.lanes&a)!==0&&(sc(e,t),Hi(t,null,null,a),qi()),r=e.memoizedState,o=t.memoizedState,r.parent!==l?(r={parent:l,cache:l},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),wn(t,dt,l)):(l=o.cache,wn(t,dt,l),l!==r.cache&&ec(t,[dt],a,!0))),At(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function en(e){e.flags|=4}function $c(e,t,a,l,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Om())e.flags|=8192;else throw ll=Xs,lc}else e.flags&=-16777217}function sm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wp(t))if(Om())e.flags|=8192;else throw ll=Xs,lc}function or(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Bd():536870912,e.lanes|=t,Pl|=t)}function Qi(e,t){if(!Oe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,l|=r.subtreeFlags&65011712,l|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,l|=r.subtreeFlags,l|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Fv(e,t,a){var l=t.pendingProps;switch(Ju(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return Pe(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ia(dt),fe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Hl(t)?en(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Fu())),Pe(t),null;case 26:var r=t.type,o=t.memoizedState;return e===null?(en(t),o!==null?(Pe(t),sm(t,o)):(Pe(t),$c(t,r,null,l,a))):o?o!==e.memoizedState?(en(t),Pe(t),sm(t,o)):(Pe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&en(t),Pe(t),$c(t,r,e,l,a)),null;case 27:if(ea(t),a=ce.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return Pe(t),null}e=P.current,Hl(t)?qf(t):(e=hp(r,l,a),t.stateNode=e,en(t))}return Pe(t),null;case 5:if(ea(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return Pe(t),null}if(o=P.current,Hl(t))qf(t);else{var h=Nr(ce.current);switch(o){case 1:o=h.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:o=h.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":o=h.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":o=h.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":o=h.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof l.is=="string"?h.createElement("select",{is:l.is}):h.createElement("select"),l.multiple?o.multiple=!0:l.size&&(o.size=l.size);break;default:o=typeof l.is=="string"?h.createElement(r,{is:l.is}):h.createElement(r)}}o[_t]=t,o[Lt]=l;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)o.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=o;e:switch(Et(o,r,l),r){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&en(t)}}return Pe(t),$c(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=ce.current,Hl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,r=jt,r!==null)switch(r.tag){case 27:case 5:l=r.memoizedProps}e[_t]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||ap(e.nodeValue,a)),e||bn(t,!0)}else e=Nr(e).createTextNode(l),e[_t]=t,t.stateNode=e}return Pe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Hl(t),a!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[_t]=t}else Pn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),e=!1}else a=Fu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Kt(t),t):(Kt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Pe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Hl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!r)throw Error(u(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(u(317));r[_t]=t}else Pn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),r=!1}else r=Fu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Kt(t),t):(Kt(t),null)}return Kt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,r=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(r=l.alternate.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==r&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),or(t,t.updateQueue),Pe(t),null);case 4:return fe(),e===null&&co(t.stateNode.containerInfo),Pe(t),null;case 10:return Ia(t.type),Pe(t),null;case 19:if(B(ut),l=t.memoizedState,l===null)return Pe(t),null;if(r=(t.flags&128)!==0,o=l.rendering,o===null)if(r)Qi(l,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Fs(e),o!==null){for(t.flags|=128,Qi(l,!1),e=o.updateQueue,t.updateQueue=e,or(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Df(a,e),a=a.sibling;return G(ut,ut.current&1|2),Oe&&Ka(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&yt()>pr&&(t.flags|=128,r=!0,Qi(l,!1),t.lanes=4194304)}else{if(!r)if(e=Fs(o),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,or(t,e),Qi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!Oe)return Pe(t),null}else 2*yt()-l.renderingStartTime>pr&&a!==536870912&&(t.flags|=128,r=!0,Qi(l,!1),t.lanes=4194304);l.isBackwards?(o.sibling=t.child,t.child=o):(e=l.last,e!==null?e.sibling=o:t.child=o,l.last=o)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=yt(),e.sibling=null,a=ut.current,G(ut,r?a&1|2:a&1),Oe&&Ka(t,l.treeForkCount),e):(Pe(t),null);case 22:case 23:return Kt(t),oc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),a=t.updateQueue,a!==null&&or(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&B(al),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ia(dt),Pe(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Wv(e,t){switch(Ju(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ia(dt),fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ea(t),null;case 31:if(t.memoizedState!==null){if(Kt(t),t.alternate===null)throw Error(u(340));Pn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Pn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(ut),null;case 4:return fe(),null;case 10:return Ia(t.type),null;case 22:case 23:return Kt(t),oc(),e!==null&&B(al),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ia(dt),null;case 25:return null;default:return null}}function rm(e,t){switch(Ju(t),t.tag){case 3:Ia(dt),fe();break;case 26:case 27:case 5:ea(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&Kt(t);break;case 13:Kt(t);break;case 19:B(ut);break;case 10:Ia(t.type);break;case 22:case 23:Kt(t),oc(),e!==null&&B(al);break;case 24:Ia(dt)}}function Xi(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var r=l.next;a=r;do{if((a.tag&e)===e){l=void 0;var o=a.create,h=a.inst;l=o(),h.destroy=l}a=a.next}while(a!==r)}}catch(x){Ze(t,t.return,x)}}function En(e,t,a){try{var l=t.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var o=r.next;l=o;do{if((l.tag&e)===e){var h=l.inst,x=h.destroy;if(x!==void 0){h.destroy=void 0,r=t;var w=a,C=x;try{C()}catch(z){Ze(r,w,z)}}}l=l.next}while(l!==o)}}catch(z){Ze(t,t.return,z)}}function um(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Wf(t,a)}catch(l){Ze(e,e.return,l)}}}function cm(e,t,a){a.props=rl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ze(e,t,l)}}function Ki(e,t){try{var a=e.ref;if(a!==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 a=="function"?e.refCleanup=a(l):a.current=l}}catch(r){Ze(e,t,r)}}function za(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(r){Ze(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Ze(e,t,r)}else a.current=null}function om(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(r){Ze(e,e.return,r)}}function Vc(e,t,a){try{var l=e.stateNode;bg(l,e.type,a,t),l[Lt]=t}catch(r){Ze(e,e.return,r)}}function dm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dn(e.type)||e.tag===4}function Yc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dm(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&&Dn(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 Zc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ga));else if(l!==4&&(l===27&&Dn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,a),e=e.sibling;e!==null;)Zc(e,t,a),e=e.sibling}function dr(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Dn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(dr(e,t,a),e=e.sibling;e!==null;)dr(e,t,a),e=e.sibling}function fm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Et(t,l,a),t[_t]=e,t[Lt]=a}catch(o){Ze(e,e.return,o)}}var tn=!1,mt=!1,Gc=!1,hm=typeof WeakSet=="function"?WeakSet:Set,wt=null;function Pv(e,t){if(e=e.containerInfo,ho=Or,e=Nf(e),Bu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var r=l.anchorOffset,o=l.focusNode;l=l.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var h=0,x=-1,w=-1,C=0,z=0,H=e,k=null;t:for(;;){for(var M;H!==a||r!==0&&H.nodeType!==3||(x=h+r),H!==o||l!==0&&H.nodeType!==3||(w=h+l),H.nodeType===3&&(h+=H.nodeValue.length),(M=H.firstChild)!==null;)k=H,H=M;for(;;){if(H===e)break t;if(k===a&&++C===r&&(x=h),k===o&&++z===l&&(w=h),(M=H.nextSibling)!==null)break;H=k,k=H.parentNode}H=M}a=x===-1||w===-1?null:{start:x,end:w}}else a=null}a=a||{start:0,end:0}}else a=null;for(mo={focusedElem:e,selectionRange:a},Or=!1,wt=t;wt!==null;)if(t=wt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,wt=e;else for(;wt!==null;){switch(t=wt,o=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(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,a=t,r=o.memoizedProps,o=o.memoizedState,l=a.stateNode;try{var te=rl(a.type,r);e=l.getSnapshotBeforeUpdate(te,o),l.__reactInternalSnapshotBeforeUpdate=e}catch(he){Ze(a,a.return,he)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)yo(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":yo(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(u(163))}if(e=t.sibling,e!==null){e.return=t.return,wt=e;break}wt=t.return}}function mm(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:nn(e,a),l&4&&Xi(5,a);break;case 1:if(nn(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){Ze(a,a.return,h)}else{var r=rl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Ze(a,a.return,h)}}l&64&&um(a),l&512&&Ki(a,a.return);break;case 3:if(nn(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Wf(e,t)}catch(h){Ze(a,a.return,h)}}break;case 27:t===null&&l&4&&fm(a);case 26:case 5:nn(e,a),t===null&&l&4&&om(a),l&512&&Ki(a,a.return);break;case 12:nn(e,a);break;case 31:nn(e,a),l&4&&ym(e,a);break;case 13:nn(e,a),l&4&&vm(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=ug.bind(null,a),Tg(e,a))));break;case 22:if(l=a.memoizedState!==null||tn,!l){t=t!==null&&t.memoizedState!==null||mt,r=tn;var o=mt;tn=l,(mt=t)&&!o?ln(e,a,(a.subtreeFlags&8772)!==0):nn(e,a),tn=r,mt=o}break;case 30:break;default:nn(e,a)}}function pm(e){var t=e.alternate;t!==null&&(e.alternate=null,pm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&wu(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 tt=null,zt=!1;function an(e,t,a){for(a=a.child;a!==null;)xm(e,t,a),a=a.sibling}function xm(e,t,a){if(Z&&typeof Z.onCommitFiberUnmount=="function")try{Z.onCommitFiberUnmount(Sa,a)}catch{}switch(a.tag){case 26:mt||za(a,t),an(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:mt||za(a,t);var l=tt,r=zt;Dn(a.type)&&(tt=a.stateNode,zt=!1),an(e,t,a),ns(a.stateNode),tt=l,zt=r;break;case 5:mt||za(a,t);case 6:if(l=tt,r=zt,tt=null,an(e,t,a),tt=l,zt=r,tt!==null)if(zt)try{(tt.nodeType===9?tt.body:tt.nodeName==="HTML"?tt.ownerDocument.body:tt).removeChild(a.stateNode)}catch(o){Ze(a,t,o)}else try{tt.removeChild(a.stateNode)}catch(o){Ze(a,t,o)}break;case 18:tt!==null&&(zt?(e=tt,up(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ri(e)):up(tt,a.stateNode));break;case 4:l=tt,r=zt,tt=a.stateNode.containerInfo,zt=!0,an(e,t,a),tt=l,zt=r;break;case 0:case 11:case 14:case 15:En(2,a,t),mt||En(4,a,t),an(e,t,a);break;case 1:mt||(za(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&cm(a,t,l)),an(e,t,a);break;case 21:an(e,t,a);break;case 22:mt=(l=mt)||a.memoizedState!==null,an(e,t,a),mt=l;break;default:an(e,t,a)}}function ym(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ri(e)}catch(a){Ze(t,t.return,a)}}}function vm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ri(e)}catch(a){Ze(t,t.return,a)}}function eg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new hm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new hm),t;default:throw Error(u(435,e.tag))}}function fr(e,t){var a=eg(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var r=cg.bind(null,e,l);l.then(r,r)}})}function Bt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var r=a[l],o=e,h=t,x=h;e:for(;x!==null;){switch(x.tag){case 27:if(Dn(x.type)){tt=x.stateNode,zt=!1;break e}break;case 5:tt=x.stateNode,zt=!1;break e;case 3:case 4:tt=x.stateNode.containerInfo,zt=!0;break e}x=x.return}if(tt===null)throw Error(u(160));xm(o,h,r),tt=null,zt=!1,o=r.alternate,o!==null&&(o.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)gm(t,e),t=t.sibling}var Na=null;function gm(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Bt(t,e),qt(e),l&4&&(En(3,e,e.return),Xi(3,e),En(5,e,e.return));break;case 1:Bt(t,e),qt(e),l&512&&(mt||a===null||za(a,a.return)),l&64&&tn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var r=Na;if(Bt(t,e),qt(e),l&512&&(mt||a===null||za(a,a.return)),l&4){var o=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(l){case"title":o=r.getElementsByTagName("title")[0],(!o||o[wi]||o[_t]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=r.createElement(l),r.head.insertBefore(o,r.querySelector("head > title"))),Et(o,l,a),o[_t]=e,bt(o),l=o;break e;case"link":var h=gp("link","href",r).get(l+(a.href||""));if(h){for(var x=0;x<h.length;x++)if(o=h[x],o.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(x,1);break t}}o=r.createElement(l),Et(o,l,a),r.head.appendChild(o);break;case"meta":if(h=gp("meta","content",r).get(l+(a.content||""))){for(x=0;x<h.length;x++)if(o=h[x],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){h.splice(x,1);break t}}o=r.createElement(l),Et(o,l,a),r.head.appendChild(o);break;default:throw Error(u(468,l))}o[_t]=e,bt(o),l=o}e.stateNode=l}else bp(r,e.type,e.stateNode);else e.stateNode=vp(r,l,e.memoizedProps);else o!==l?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,l===null?bp(r,e.type,e.stateNode):vp(r,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Vc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Bt(t,e),qt(e),l&512&&(mt||a===null||za(a,a.return)),a!==null&&l&4&&Vc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Bt(t,e),qt(e),l&512&&(mt||a===null||za(a,a.return)),e.flags&32){r=e.stateNode;try{Rl(r,"")}catch(te){Ze(e,e.return,te)}}l&4&&e.stateNode!=null&&(r=e.memoizedProps,Vc(e,r,a!==null?a.memoizedProps:r)),l&1024&&(Gc=!0);break;case 6:if(Bt(t,e),qt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(te){Ze(e,e.return,te)}}break;case 3:if(Tr=null,r=Na,Na=Ar(t.containerInfo),Bt(t,e),Na=r,qt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{ri(t.containerInfo)}catch(te){Ze(e,e.return,te)}Gc&&(Gc=!1,bm(e));break;case 4:l=Na,Na=Ar(e.stateNode.containerInfo),Bt(t,e),qt(e),Na=l;break;case 12:Bt(t,e),qt(e);break;case 31:Bt(t,e),qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fr(e,l)));break;case 13:Bt(t,e),qt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(mr=yt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fr(e,l)));break;case 22:r=e.memoizedState!==null;var w=a!==null&&a.memoizedState!==null,C=tn,z=mt;if(tn=C||r,mt=z||w,Bt(t,e),mt=z,tn=C,qt(e),l&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||w||tn||mt||ul(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){w=a=t;try{if(o=w.stateNode,r)h=o.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{x=w.stateNode;var H=w.memoizedProps.style,k=H!=null&&H.hasOwnProperty("display")?H.display:null;x.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(te){Ze(w,w.return,te)}}}else if(t.tag===6){if(a===null){w=t;try{w.stateNode.nodeValue=r?"":w.memoizedProps}catch(te){Ze(w,w.return,te)}}}else if(t.tag===18){if(a===null){w=t;try{var M=w.stateNode;r?cp(M,!0):cp(w.stateNode,!1)}catch(te){Ze(w,w.return,te)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,fr(e,a))));break;case 19:Bt(t,e),qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fr(e,l)));break;case 30:break;case 21:break;default:Bt(t,e),qt(e)}}function qt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(dm(l)){a=l;break}l=l.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var r=a.stateNode,o=Yc(e);dr(e,o,r);break;case 5:var h=a.stateNode;a.flags&32&&(Rl(h,""),a.flags&=-33);var x=Yc(e);dr(e,x,h);break;case 3:case 4:var w=a.stateNode.containerInfo,C=Yc(e);Zc(e,C,w);break;default:throw Error(u(161))}}catch(z){Ze(e,e.return,z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function nn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)mm(e,t.alternate,t),t=t.sibling}function ul(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:En(4,t,t.return),ul(t);break;case 1:za(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&cm(t,t.return,a),ul(t);break;case 27:ns(t.stateNode);case 26:case 5:za(t,t.return),ul(t);break;case 22:t.memoizedState===null&&ul(t);break;case 30:ul(t);break;default:ul(t)}e=e.sibling}}function ln(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,r=e,o=t,h=o.flags;switch(o.tag){case 0:case 11:case 15:ln(r,o,a),Xi(4,o);break;case 1:if(ln(r,o,a),l=o,r=l.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(C){Ze(l,l.return,C)}if(l=o,r=l.updateQueue,r!==null){var x=l.stateNode;try{var w=r.shared.hiddenCallbacks;if(w!==null)for(r.shared.hiddenCallbacks=null,r=0;r<w.length;r++)Ff(w[r],x)}catch(C){Ze(l,l.return,C)}}a&&h&64&&um(o),Ki(o,o.return);break;case 27:fm(o);case 26:case 5:ln(r,o,a),a&&l===null&&h&4&&om(o),Ki(o,o.return);break;case 12:ln(r,o,a);break;case 31:ln(r,o,a),a&&h&4&&ym(r,o);break;case 13:ln(r,o,a),a&&h&4&&vm(r,o);break;case 22:o.memoizedState===null&&ln(r,o,a),Ki(o,o.return);break;case 30:break;default:ln(r,o,a)}t=t.sibling}}function Qc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Di(a))}function Xc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Di(e))}function Aa(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wm(e,t,a,l),t=t.sibling}function wm(e,t,a,l){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Aa(e,t,a,l),r&2048&&Xi(9,t);break;case 1:Aa(e,t,a,l);break;case 3:Aa(e,t,a,l),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Di(e)));break;case 12:if(r&2048){Aa(e,t,a,l),e=t.stateNode;try{var o=t.memoizedProps,h=o.id,x=o.onPostCommit;typeof x=="function"&&x(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){Ze(t,t.return,w)}}else Aa(e,t,a,l);break;case 31:Aa(e,t,a,l);break;case 13:Aa(e,t,a,l);break;case 23:break;case 22:o=t.stateNode,h=t.alternate,t.memoizedState!==null?o._visibility&2?Aa(e,t,a,l):Ji(e,t):o._visibility&2?Aa(e,t,a,l):(o._visibility|=2,Il(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Qc(h,t);break;case 24:Aa(e,t,a,l),r&2048&&Xc(t.alternate,t);break;default:Aa(e,t,a,l)}}function Il(e,t,a,l,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,h=t,x=a,w=l,C=h.flags;switch(h.tag){case 0:case 11:case 15:Il(o,h,x,w,r),Xi(8,h);break;case 23:break;case 22:var z=h.stateNode;h.memoizedState!==null?z._visibility&2?Il(o,h,x,w,r):Ji(o,h):(z._visibility|=2,Il(o,h,x,w,r)),r&&C&2048&&Qc(h.alternate,h);break;case 24:Il(o,h,x,w,r),r&&C&2048&&Xc(h.alternate,h);break;default:Il(o,h,x,w,r)}t=t.sibling}}function Ji(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,r=l.flags;switch(l.tag){case 22:Ji(a,l),r&2048&&Qc(l.alternate,l);break;case 24:Ji(a,l),r&2048&&Xc(l.alternate,l);break;default:Ji(a,l)}t=t.sibling}}var Ii=8192;function Fl(e,t,a){if(e.subtreeFlags&Ii)for(e=e.child;e!==null;)Sm(e,t,a),e=e.sibling}function Sm(e,t,a){switch(e.tag){case 26:Fl(e,t,a),e.flags&Ii&&e.memoizedState!==null&&Hg(a,Na,e.memoizedState,e.memoizedProps);break;case 5:Fl(e,t,a);break;case 3:case 4:var l=Na;Na=Ar(e.stateNode.containerInfo),Fl(e,t,a),Na=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ii,Ii=16777216,Fl(e,t,a),Ii=l):Fl(e,t,a));break;default:Fl(e,t,a)}}function _m(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 Fi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];wt=l,Nm(l,e)}_m(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jm(e),e=e.sibling}function jm(e){switch(e.tag){case 0:case 11:case 15:Fi(e),e.flags&2048&&En(9,e,e.return);break;case 3:Fi(e);break;case 12:Fi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,hr(e)):Fi(e);break;default:Fi(e)}}function hr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];wt=l,Nm(l,e)}_m(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:En(8,t,t.return),hr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,hr(t));break;default:hr(t)}e=e.sibling}}function Nm(e,t){for(;wt!==null;){var a=wt;switch(a.tag){case 0:case 11:case 15:En(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Di(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,wt=l;else e:for(a=e;wt!==null;){l=wt;var r=l.sibling,o=l.return;if(pm(l),l===a){wt=null;break e}if(r!==null){r.return=o,wt=r;break e}wt=o}}}var tg={getCacheForType:function(e){var t=Nt(dt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Nt(dt).controller.signal}},ag=typeof WeakMap=="function"?WeakMap:Map,qe=0,Ie=null,Ne=null,Ce=0,Ye=0,Jt=null,Tn=!1,Wl=!1,Kc=!1,sn=0,st=0,Cn=0,cl=0,Jc=0,It=0,Pl=0,Wi=null,Ht=null,Ic=!1,mr=0,Am=0,pr=1/0,xr=null,Rn=null,vt=0,kn=null,ei=null,rn=0,Fc=0,Wc=null,Em=null,Pi=0,Pc=null;function Ft(){return(qe&2)!==0&&Ce!==0?Ce&-Ce:U.T!==null?io():Vd()}function Tm(){if(It===0)if((Ce&536870912)===0||Oe){var e=ue;ue<<=1,(ue&3932160)===0&&(ue=262144),It=e}else It=536870912;return e=Xt.current,e!==null&&(e.flags|=32),It}function $t(e,t,a){(e===Ie&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)&&(ti(e,0),On(e,Ce,It,!1)),bi(e,a),((qe&2)===0||e!==Ie)&&(e===Ie&&((qe&2)===0&&(cl|=a),st===4&&On(e,Ce,It,!1)),Ba(e))}function Cm(e,t,a){if((qe&6)!==0)throw Error(u(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||gi(e,t),r=l?ig(e,t):to(e,t,!0),o=l;do{if(r===0){Wl&&!l&&On(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!ng(a)){r=to(e,t,!1),o=!1;continue}if(r===2){if(o=t,e.errorRecoveryDisabledLanes&o)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var x=e;r=Wi;var w=x.current.memoizedState.isDehydrated;if(w&&(ti(x,h).flags|=256),h=to(x,h,!1),h!==2){if(Kc&&!w){x.errorRecoveryDisabledLanes|=o,cl|=o,r=4;break e}o=Ht,Ht=r,o!==null&&(Ht===null?Ht=o:Ht.push.apply(Ht,o))}r=h}if(o=!1,r!==2)continue}}if(r===1){ti(e,0),On(e,t,0,!0);break}e:{switch(l=e,o=r,o){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:On(l,t,It,!Tn);break e;case 2:Ht=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(r=mr+300-yt(),10<r)){if(On(l,t,It,!Tn),As(l,0,!0)!==0)break e;rn=t,l.timeoutHandle=sp(Rm.bind(null,l,a,Ht,xr,Ic,t,It,cl,Pl,Tn,o,"Throttled",-0,0),r);break e}Rm(l,a,Ht,xr,Ic,t,It,cl,Pl,Tn,o,null,-0,0)}}break}while(!0);Ba(e)}function Rm(e,t,a,l,r,o,h,x,w,C,z,H,k,M){if(e.timeoutHandle=-1,H=t.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ga},Sm(t,o,H);var te=(o&62914560)===o?mr-yt():(o&4194048)===o?Am-yt():0;if(te=$g(H,te),te!==null){rn=o,e.cancelPendingCommit=te(Bm.bind(null,e,t,o,a,l,r,h,x,w,z,H,null,k,M)),On(e,o,h,!C);return}}Bm(e,t,o,a,l,r,h,x,w)}function ng(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var r=a[l],o=r.getSnapshot;r=r.value;try{if(!Gt(o(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 On(e,t,a,l){t&=~Jc,t&=~cl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var r=t;0<r;){var o=31-Ue(r),h=1<<o;l[o]=-1,r&=~h}a!==0&&qd(e,a,t)}function yr(){return(qe&6)===0?(es(0),!1):!0}function eo(){if(Ne!==null){if(Ye===0)var e=Ne.return;else e=Ne,Ja=el=null,xc(e),Gl=null,Ui=0,e=Ne;for(;e!==null;)rm(e.alternate,e),e=e.return;Ne=null}}function ti(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,_g(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),rn=0,eo(),Ie=e,Ne=a=Xa(e.current,null),Ce=t,Ye=0,Jt=null,Tn=!1,Wl=gi(e,t),Kc=!1,Pl=It=Jc=cl=Cn=st=0,Ht=Wi=null,Ic=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var r=31-Ue(l),o=1<<r;t|=e[r],l&=~o}return sn=t,Bs(),a}function km(e,t){ge=null,U.H=Zi,t===Zl||t===Qs?(t=Xf(),Ye=3):t===lc?(t=Xf(),Ye=4):Ye=t===Oc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Jt=t,Ne===null&&(st=1,sr(e,la(t,e.current)))}function Om(){var e=Xt.current;return e===null?!0:(Ce&4194048)===Ce?ua===null:(Ce&62914560)===Ce||(Ce&536870912)!==0?e===ua:!1}function Mm(){var e=U.H;return U.H=Zi,e===null?Zi:e}function Dm(){var e=U.A;return U.A=tg,e}function vr(){st=4,Tn||(Ce&4194048)!==Ce&&Xt.current!==null||(Wl=!0),(Cn&134217727)===0&&(cl&134217727)===0||Ie===null||On(Ie,Ce,It,!1)}function to(e,t,a){var l=qe;qe|=2;var r=Mm(),o=Dm();(Ie!==e||Ce!==t)&&(xr=null,ti(e,t)),t=!1;var h=st;e:do try{if(Ye!==0&&Ne!==null){var x=Ne,w=Jt;switch(Ye){case 8:eo(),h=6;break e;case 3:case 2:case 9:case 6:Xt.current===null&&(t=!0);var C=Ye;if(Ye=0,Jt=null,ai(e,x,w,C),a&&Wl){h=0;break e}break;default:C=Ye,Ye=0,Jt=null,ai(e,x,w,C)}}lg(),h=st;break}catch(z){km(e,z)}while(!0);return t&&e.shellSuspendCounter++,Ja=el=null,qe=l,U.H=r,U.A=o,Ne===null&&(Ie=null,Ce=0,Bs()),h}function lg(){for(;Ne!==null;)Lm(Ne)}function ig(e,t){var a=qe;qe|=2;var l=Mm(),r=Dm();Ie!==e||Ce!==t?(xr=null,pr=yt()+500,ti(e,t)):Wl=gi(e,t);e:do try{if(Ye!==0&&Ne!==null){t=Ne;var o=Jt;t:switch(Ye){case 1:Ye=0,Jt=null,ai(e,t,o,1);break;case 2:case 9:if(Gf(o)){Ye=0,Jt=null,Um(t);break}t=function(){Ye!==2&&Ye!==9||Ie!==e||(Ye=7),Ba(e)},o.then(t,t);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:Gf(o)?(Ye=0,Jt=null,Um(t)):(Ye=0,Jt=null,ai(e,t,o,7));break;case 5:var h=null;switch(Ne.tag){case 26:h=Ne.memoizedState;case 5:case 27:var x=Ne;if(h?wp(h):x.stateNode.complete){Ye=0,Jt=null;var w=x.sibling;if(w!==null)Ne=w;else{var C=x.return;C!==null?(Ne=C,gr(C)):Ne=null}break t}}Ye=0,Jt=null,ai(e,t,o,5);break;case 6:Ye=0,Jt=null,ai(e,t,o,6);break;case 8:eo(),st=6;break e;default:throw Error(u(462))}}sg();break}catch(z){km(e,z)}while(!0);return Ja=el=null,U.H=l,U.A=r,qe=a,Ne!==null?0:(Ie=null,Ce=0,Bs(),st)}function sg(){for(;Ne!==null&&!vl();)Lm(Ne)}function Lm(e){var t=im(e.alternate,e,sn);e.memoizedProps=e.pendingProps,t===null?gr(e):Ne=t}function Um(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Ph(a,t,t.pendingProps,t.type,void 0,Ce);break;case 11:t=Ph(a,t,t.pendingProps,t.type.render,t.ref,Ce);break;case 5:xc(t);default:rm(a,t),t=Ne=Df(t,sn),t=im(a,t,sn)}e.memoizedProps=e.pendingProps,t===null?gr(e):Ne=t}function ai(e,t,a,l){Ja=el=null,xc(t),Gl=null,Ui=0;var r=t.return;try{if(Kv(e,r,t,a,Ce)){st=1,sr(e,la(a,e.current)),Ne=null;return}}catch(o){if(r!==null)throw Ne=r,o;st=1,sr(e,la(a,e.current)),Ne=null;return}t.flags&32768?(Oe||l===1?e=!0:Wl||(Ce&536870912)!==0?e=!1:(Tn=e=!0,(l===2||l===9||l===3||l===6)&&(l=Xt.current,l!==null&&l.tag===13&&(l.flags|=16384))),zm(t,e)):gr(t)}function gr(e){var t=e;do{if((t.flags&32768)!==0){zm(t,Tn);return}e=t.return;var a=Fv(t.alternate,t,sn);if(a!==null){Ne=a;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);st===0&&(st=5)}function zm(e,t){do{var a=Wv(e.alternate,e);if(a!==null){a.flags&=32767,Ne=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=a}while(e!==null);st=6,Ne=null}function Bm(e,t,a,l,r,o,h,x,w){e.cancelPendingCommit=null;do br();while(vt!==0);if((qe&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(o=t.lanes|t.childLanes,o|=Yu,qy(e,a,o,h,x,w),e===Ie&&(Ne=Ie=null,Ce=0),ei=t,kn=e,rn=a,Fc=o,Wc=r,Em=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,og(pn,function(){return Ym(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=U.T,U.T=null,r=F.p,F.p=2,h=qe,qe|=4;try{Pv(e,t,a)}finally{qe=h,F.p=r,U.T=l}}vt=1,qm(),Hm(),$m()}}function qm(){if(vt===1){vt=0;var e=kn,t=ei,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var l=F.p;F.p=2;var r=qe;qe|=4;try{gm(t,e);var o=mo,h=Nf(e.containerInfo),x=o.focusedElem,w=o.selectionRange;if(h!==x&&x&&x.ownerDocument&&jf(x.ownerDocument.documentElement,x)){if(w!==null&&Bu(x)){var C=w.start,z=w.end;if(z===void 0&&(z=C),"selectionStart"in x)x.selectionStart=C,x.selectionEnd=Math.min(z,x.value.length);else{var H=x.ownerDocument||document,k=H&&H.defaultView||window;if(k.getSelection){var M=k.getSelection(),te=x.textContent.length,he=Math.min(w.start,te),Je=w.end===void 0?he:Math.min(w.end,te);!M.extend&&he>Je&&(h=Je,Je=he,he=h);var A=_f(x,he),j=_f(x,Je);if(A&&j&&(M.rangeCount!==1||M.anchorNode!==A.node||M.anchorOffset!==A.offset||M.focusNode!==j.node||M.focusOffset!==j.offset)){var T=H.createRange();T.setStart(A.node,A.offset),M.removeAllRanges(),he>Je?(M.addRange(T),M.extend(j.node,j.offset)):(T.setEnd(j.node,j.offset),M.addRange(T))}}}}for(H=[],M=x;M=M.parentNode;)M.nodeType===1&&H.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<H.length;x++){var q=H[x];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}Or=!!ho,mo=ho=null}finally{qe=r,F.p=l,U.T=a}}e.current=t,vt=2}}function Hm(){if(vt===2){vt=0;var e=kn,t=ei,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var l=F.p;F.p=2;var r=qe;qe|=4;try{mm(e,t.alternate,t)}finally{qe=r,F.p=l,U.T=a}}vt=3}}function $m(){if(vt===4||vt===3){vt=0,gl();var e=kn,t=ei,a=rn,l=Em;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?vt=5:(vt=0,ei=kn=null,Vm(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Rn=null),gu(a),t=t.stateNode,Z&&typeof Z.onCommitFiberRoot=="function")try{Z.onCommitFiberRoot(Sa,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=U.T,r=F.p,F.p=2,U.T=null;try{for(var o=e.onRecoverableError,h=0;h<l.length;h++){var x=l[h];o(x.value,{componentStack:x.stack})}}finally{U.T=t,F.p=r}}(rn&3)!==0&&br(),Ba(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===Pc?Pi++:(Pi=0,Pc=e):Pi=0,es(0)}}function Vm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Di(t)))}function br(){return qm(),Hm(),$m(),Ym()}function Ym(){if(vt!==5)return!1;var e=kn,t=Fc;Fc=0;var a=gu(rn),l=U.T,r=F.p;try{F.p=32>a?32:a,U.T=null,a=Wc,Wc=null;var o=kn,h=rn;if(vt=0,ei=kn=null,rn=0,(qe&6)!==0)throw Error(u(331));var x=qe;if(qe|=4,jm(o.current),wm(o,o.current,h,a),qe=x,es(0,!1),Z&&typeof Z.onPostCommitFiberRoot=="function")try{Z.onPostCommitFiberRoot(Sa,o)}catch{}return!0}finally{F.p=r,U.T=l,Vm(e,t)}}function Zm(e,t,a){t=la(a,t),t=kc(e.stateNode,t,2),e=jn(e,t,2),e!==null&&(bi(e,2),Ba(e))}function Ze(e,t,a){if(e.tag===3)Zm(e,e,a);else for(;t!==null;){if(t.tag===3){Zm(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Rn===null||!Rn.has(l))){e=la(a,e),a=Gh(2),l=jn(t,a,2),l!==null&&(Qh(a,l,t,e),bi(l,2),Ba(l));break}}t=t.return}}function ao(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new ag;var r=new Set;l.set(t,r)}else r=l.get(t),r===void 0&&(r=new Set,l.set(t,r));r.has(a)||(Kc=!0,r.add(a),e=rg.bind(null,e,t,a),t.then(e,e))}function rg(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ie===e&&(Ce&a)===a&&(st===4||st===3&&(Ce&62914560)===Ce&&300>yt()-mr?(qe&2)===0&&ti(e,0):Jc|=a,Pl===Ce&&(Pl=0)),Ba(e)}function Gm(e,t){t===0&&(t=Bd()),e=Fn(e,t),e!==null&&(bi(e,t),Ba(e))}function ug(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Gm(e,a)}function cg(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),Gm(e,a)}function og(e,t){return Fe(e,t)}var wr=null,ni=null,no=!1,Sr=!1,lo=!1,Mn=0;function Ba(e){e!==ni&&e.next===null&&(ni===null?wr=ni=e:ni=ni.next=e),Sr=!0,no||(no=!0,fg())}function es(e,t){if(!lo&&Sr){lo=!0;do for(var a=!1,l=wr;l!==null;){if(e!==0){var r=l.pendingLanes;if(r===0)var o=0;else{var h=l.suspendedLanes,x=l.pingedLanes;o=(1<<31-Ue(42|e)+1)-1,o&=r&~(h&~x),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,Jm(l,o))}else o=Ce,o=As(l,l===Ie?o:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(o&3)===0||gi(l,o)||(a=!0,Jm(l,o));l=l.next}while(a);lo=!1}}function dg(){Qm()}function Qm(){Sr=no=!1;var e=0;Mn!==0&&Sg()&&(e=Mn);for(var t=yt(),a=null,l=wr;l!==null;){var r=l.next,o=Xm(l,t);o===0?(l.next=null,a===null?wr=r:a.next=r,r===null&&(ni=a)):(a=l,(e!==0||(o&3)!==0)&&(Sr=!0)),l=r}vt!==0&&vt!==5||es(e),Mn!==0&&(Mn=0)}function Xm(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var h=31-Ue(o),x=1<<h,w=r[h];w===-1?((x&a)===0||(x&l)!==0)&&(r[h]=By(x,t)):w<=t&&(e.expiredLanes|=x),o&=~x}if(t=Ie,a=Ce,a=As(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&mn(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||gi(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&mn(l),gu(a)){case 2:case 8:a=wl;break;case 32:a=pn;break;case 268435456:a=Gn;break;default:a=pn}return l=Km.bind(null,e),a=Fe(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&mn(l),e.callbackPriority=2,e.callbackNode=null,2}function Km(e,t){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(br()&&e.callbackNode!==a)return null;var l=Ce;return l=As(e,e===Ie?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Cm(e,l,t),Xm(e,yt()),e.callbackNode!=null&&e.callbackNode===a?Km.bind(null,e):null)}function Jm(e,t){if(br())return null;Cm(e,t,!0)}function fg(){jg(function(){(qe&6)!==0?Fe(bl,dg):Qm()})}function io(){if(Mn===0){var e=Vl;e===0&&(e=R,R<<=1,(R&261888)===0&&(R=256)),Mn=e}return Mn}function Im(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Rs(""+e)}function Fm(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function hg(e,t,a,l,r){if(t==="submit"&&a&&a.stateNode===r){var o=Im((r[Lt]||null).action),h=l.submitter;h&&(t=(t=h[Lt]||null)?Im(t.formAction):h.getAttribute("formAction"),t!==null&&(o=t,h=null));var x=new Ds("action","action",null,l,r);e.push({event:x,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Mn!==0){var w=h?Fm(r,h):new FormData(r);Nc(a,{pending:!0,data:w,method:r.method,action:o},null,w)}}else typeof o=="function"&&(x.preventDefault(),w=h?Fm(r,h):new FormData(r),Nc(a,{pending:!0,data:w,method:r.method,action:o},o,w))},currentTarget:r}]})}}for(var so=0;so<Vu.length;so++){var ro=Vu[so],mg=ro.toLowerCase(),pg=ro[0].toUpperCase()+ro.slice(1);ja(mg,"on"+pg)}ja(Tf,"onAnimationEnd"),ja(Cf,"onAnimationIteration"),ja(Rf,"onAnimationStart"),ja("dblclick","onDoubleClick"),ja("focusin","onFocus"),ja("focusout","onBlur"),ja(kv,"onTransitionRun"),ja(Ov,"onTransitionStart"),ja(Mv,"onTransitionCancel"),ja(kf,"onTransitionEnd"),Tl("onMouseEnter",["mouseout","mouseover"]),Tl("onMouseLeave",["mouseout","mouseover"]),Tl("onPointerEnter",["pointerout","pointerover"]),Tl("onPointerLeave",["pointerout","pointerover"]),Xn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ts="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(" "),xg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ts));function Wm(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],r=l.event;l=l.listeners;e:{var o=void 0;if(t)for(var h=l.length-1;0<=h;h--){var x=l[h],w=x.instance,C=x.currentTarget;if(x=x.listener,w!==o&&r.isPropagationStopped())break e;o=x,r.currentTarget=C;try{o(r)}catch(z){zs(z)}r.currentTarget=null,o=w}else for(h=0;h<l.length;h++){if(x=l[h],w=x.instance,C=x.currentTarget,x=x.listener,w!==o&&r.isPropagationStopped())break e;o=x,r.currentTarget=C;try{o(r)}catch(z){zs(z)}r.currentTarget=null,o=w}}}}function Ae(e,t){var a=t[bu];a===void 0&&(a=t[bu]=new Set);var l=e+"__bubble";a.has(l)||(Pm(t,e,2,!1),a.add(l))}function uo(e,t,a){var l=0;t&&(l|=4),Pm(a,e,l,t)}var _r="_reactListening"+Math.random().toString(36).slice(2);function co(e){if(!e[_r]){e[_r]=!0,Gd.forEach(function(a){a!=="selectionchange"&&(xg.has(a)||uo(a,!1,e),uo(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_r]||(t[_r]=!0,uo("selectionchange",!1,t))}}function Pm(e,t,a,l){switch(Tp(t)){case 2:var r=Zg;break;case 8:r=Gg;break;default:r=No}a=r.bind(null,t,a,e),r=void 0,!Cu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),l?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function oo(e,t,a,l,r){var o=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var h=l.tag;if(h===3||h===4){var x=l.stateNode.containerInfo;if(x===r)break;if(h===4)for(h=l.return;h!==null;){var w=h.tag;if((w===3||w===4)&&h.stateNode.containerInfo===r)return;h=h.return}for(;x!==null;){if(h=Nl(x),h===null)return;if(w=h.tag,w===5||w===6||w===26||w===27){l=o=h;continue e}x=x.parentNode}}l=l.return}nf(function(){var C=o,z=Eu(a),H=[];e:{var k=Of.get(e);if(k!==void 0){var M=Ds,te=e;switch(e){case"keypress":if(Os(a)===0)break e;case"keydown":case"keyup":M=cv;break;case"focusin":te="focus",M=Mu;break;case"focusout":te="blur",M=Mu;break;case"beforeblur":case"afterblur":M=Mu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":M=rf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=Fy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=fv;break;case Tf:case Cf:case Rf:M=ev;break;case kf:M=mv;break;case"scroll":case"scrollend":M=Jy;break;case"wheel":M=xv;break;case"copy":case"cut":case"paste":M=av;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=cf;break;case"toggle":case"beforetoggle":M=vv}var he=(t&4)!==0,Je=!he&&(e==="scroll"||e==="scrollend"),A=he?k!==null?k+"Capture":null:k;he=[];for(var j=C,T;j!==null;){var q=j;if(T=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||T===null||A===null||(q=_i(j,A),q!=null&&he.push(as(j,q,T))),Je)break;j=j.return}0<he.length&&(k=new M(k,te,null,a,z),H.push({event:k,listeners:he}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",k&&a!==Au&&(te=a.relatedTarget||a.fromElement)&&(Nl(te)||te[jl]))break e;if((M||k)&&(k=z.window===z?z:(k=z.ownerDocument)?k.defaultView||k.parentWindow:window,M?(te=a.relatedTarget||a.toElement,M=C,te=te?Nl(te):null,te!==null&&(Je=f(te),he=te.tag,te!==Je||he!==5&&he!==27&&he!==6)&&(te=null)):(M=null,te=C),M!==te)){if(he=rf,q="onMouseLeave",A="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(he=cf,q="onPointerLeave",A="onPointerEnter",j="pointer"),Je=M==null?k:Si(M),T=te==null?k:Si(te),k=new he(q,j+"leave",M,a,z),k.target=Je,k.relatedTarget=T,q=null,Nl(z)===C&&(he=new he(A,j+"enter",te,a,z),he.target=T,he.relatedTarget=Je,q=he),Je=q,M&&te)t:{for(he=yg,A=M,j=te,T=0,q=A;q;q=he(q))T++;q=0;for(var de=j;de;de=he(de))q++;for(;0<T-q;)A=he(A),T--;for(;0<q-T;)j=he(j),q--;for(;T--;){if(A===j||j!==null&&A===j.alternate){he=A;break t}A=he(A),j=he(j)}he=null}else he=null;M!==null&&ep(H,k,M,he,!1),te!==null&&Je!==null&&ep(H,Je,te,he,!0)}}e:{if(k=C?Si(C):window,M=k.nodeName&&k.nodeName.toLowerCase(),M==="select"||M==="input"&&k.type==="file")var ze=yf;else if(pf(k))if(vf)ze=Tv;else{ze=Av;var le=Nv}else M=k.nodeName,!M||M.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?C&&Nu(C.elementType)&&(ze=yf):ze=Ev;if(ze&&(ze=ze(e,C))){xf(H,ze,a,z);break e}le&&le(e,k,C),e==="focusout"&&C&&k.type==="number"&&C.memoizedProps.value!=null&&ju(k,"number",k.value)}switch(le=C?Si(C):window,e){case"focusin":(pf(le)||le.contentEditable==="true")&&(Dl=le,qu=C,ki=null);break;case"focusout":ki=qu=Dl=null;break;case"mousedown":Hu=!0;break;case"contextmenu":case"mouseup":case"dragend":Hu=!1,Af(H,a,z);break;case"selectionchange":if(Rv)break;case"keydown":case"keyup":Af(H,a,z)}var Se;if(Lu)e:{switch(e){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else Ml?hf(e,a)&&(Re="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Re="onCompositionStart");Re&&(of&&a.locale!=="ko"&&(Ml||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&Ml&&(Se=lf()):(yn=z,Ru="value"in yn?yn.value:yn.textContent,Ml=!0)),le=jr(C,Re),0<le.length&&(Re=new uf(Re,e,null,a,z),H.push({event:Re,listeners:le}),Se?Re.data=Se:(Se=mf(a),Se!==null&&(Re.data=Se)))),(Se=bv?wv(e,a):Sv(e,a))&&(Re=jr(C,"onBeforeInput"),0<Re.length&&(le=new uf("onBeforeInput","beforeinput",null,a,z),H.push({event:le,listeners:Re}),le.data=Se)),hg(H,e,C,a,z)}Wm(H,t)})}function as(e,t,a){return{instance:e,listener:t,currentTarget:a}}function jr(e,t){for(var a=t+"Capture",l=[];e!==null;){var r=e,o=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||o===null||(r=_i(e,a),r!=null&&l.unshift(as(e,r,o)),r=_i(e,t),r!=null&&l.push(as(e,r,o))),e.tag===3)return l;e=e.return}return[]}function yg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ep(e,t,a,l,r){for(var o=t._reactName,h=[];a!==null&&a!==l;){var x=a,w=x.alternate,C=x.stateNode;if(x=x.tag,w!==null&&w===l)break;x!==5&&x!==26&&x!==27||C===null||(w=C,r?(C=_i(a,o),C!=null&&h.unshift(as(a,C,w))):r||(C=_i(a,o),C!=null&&h.push(as(a,C,w)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var vg=/\r\n?/g,gg=/\u0000|\uFFFD/g;function tp(e){return(typeof e=="string"?e:""+e).replace(vg,`
49
- `).replace(gg,"")}function ap(e,t){return t=tp(t),tp(e)===t}function Ke(e,t,a,l,r,o){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Rl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Rl(e,""+l);break;case"className":Ts(e,"class",l);break;case"tabIndex":Ts(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ts(e,a,l);break;case"style":tf(e,l,o);break;case"data":if(t!=="object"){Ts(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Rs(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"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 o=="function"&&(a==="formAction"?(t!=="input"&&Ke(e,t,"name",r.name,r,null),Ke(e,t,"formEncType",r.formEncType,r,null),Ke(e,t,"formMethod",r.formMethod,r,null),Ke(e,t,"formTarget",r.formTarget,r,null)):(Ke(e,t,"encType",r.encType,r,null),Ke(e,t,"method",r.method,r,null),Ke(e,t,"target",r.target,r,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Rs(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Ga);break;case"onScroll":l!=null&&Ae("scroll",e);break;case"onScrollEnd":l!=null&&Ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}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}a=Rs(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);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(a,""+l):e.removeAttribute(a);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(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),Es(e,"popover",l);break;case"xlinkActuate":Za(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Za(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Za(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Za(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Za(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Za(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Za(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Za(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Za(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Es(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Xy.get(a)||a,Es(e,a,l))}}function fo(e,t,a,l,r,o){switch(a){case"style":tf(e,l,o);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Rl(e,l):(typeof l=="number"||typeof l=="bigint")&&Rl(e,""+l);break;case"onScroll":l!=null&&Ae("scroll",e);break;case"onScrollEnd":l!=null&&Ae("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Ga);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Qd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),o=e[Lt]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,r),typeof l=="function")){typeof o!="function"&&o!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,r);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Es(e,a,l)}}}function Et(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var l=!1,r=!1,o;for(o in a)if(a.hasOwnProperty(o)){var h=a[o];if(h!=null)switch(o){case"src":l=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ke(e,t,o,h,a,null)}}r&&Ke(e,t,"srcSet",a.srcSet,a,null),l&&Ke(e,t,"src",a.src,a,null);return;case"input":Ae("invalid",e);var x=o=h=r=null,w=null,C=null;for(l in a)if(a.hasOwnProperty(l)){var z=a[l];if(z!=null)switch(l){case"name":r=z;break;case"type":h=z;break;case"checked":w=z;break;case"defaultChecked":C=z;break;case"value":o=z;break;case"defaultValue":x=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(u(137,t));break;default:Ke(e,t,l,z,a,null)}}Fd(e,o,x,w,C,h,r,!1);return;case"select":Ae("invalid",e),l=h=o=null;for(r in a)if(a.hasOwnProperty(r)&&(x=a[r],x!=null))switch(r){case"value":o=x;break;case"defaultValue":h=x;break;case"multiple":l=x;default:Ke(e,t,r,x,a,null)}t=o,a=h,e.multiple=!!l,t!=null?Cl(e,!!l,t,!1):a!=null&&Cl(e,!!l,a,!0);return;case"textarea":Ae("invalid",e),o=r=l=null;for(h in a)if(a.hasOwnProperty(h)&&(x=a[h],x!=null))switch(h){case"value":l=x;break;case"defaultValue":r=x;break;case"children":o=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(u(91));break;default:Ke(e,t,h,x,a,null)}Pd(e,l,r,o);return;case"option":for(w in a)if(a.hasOwnProperty(w)&&(l=a[w],l!=null))switch(w){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ke(e,t,w,l,a,null)}return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(l=0;l<ts.length;l++)Ae(ts[l],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("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(C in a)if(a.hasOwnProperty(C)&&(l=a[C],l!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ke(e,t,C,l,a,null)}return;default:if(Nu(t)){for(z in a)a.hasOwnProperty(z)&&(l=a[z],l!==void 0&&fo(e,t,z,l,a,void 0));return}}for(x in a)a.hasOwnProperty(x)&&(l=a[x],l!=null&&Ke(e,t,x,l,a,null))}function bg(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,o=null,h=null,x=null,w=null,C=null,z=null;for(M in a){var H=a[M];if(a.hasOwnProperty(M)&&H!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":w=H;default:l.hasOwnProperty(M)||Ke(e,t,M,null,l,H)}}for(var k in l){var M=l[k];if(H=a[k],l.hasOwnProperty(k)&&(M!=null||H!=null))switch(k){case"type":o=M;break;case"name":r=M;break;case"checked":C=M;break;case"defaultChecked":z=M;break;case"value":h=M;break;case"defaultValue":x=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(u(137,t));break;default:M!==H&&Ke(e,t,k,M,l,H)}}_u(e,h,x,w,C,z,o,r);return;case"select":M=h=x=k=null;for(o in a)if(w=a[o],a.hasOwnProperty(o)&&w!=null)switch(o){case"value":break;case"multiple":M=w;default:l.hasOwnProperty(o)||Ke(e,t,o,null,l,w)}for(r in l)if(o=l[r],w=a[r],l.hasOwnProperty(r)&&(o!=null||w!=null))switch(r){case"value":k=o;break;case"defaultValue":x=o;break;case"multiple":h=o;default:o!==w&&Ke(e,t,r,o,l,w)}t=x,a=h,l=M,k!=null?Cl(e,!!a,k,!1):!!l!=!!a&&(t!=null?Cl(e,!!a,t,!0):Cl(e,!!a,a?[]:"",!1));return;case"textarea":M=k=null;for(x in a)if(r=a[x],a.hasOwnProperty(x)&&r!=null&&!l.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Ke(e,t,x,null,l,r)}for(h in l)if(r=l[h],o=a[h],l.hasOwnProperty(h)&&(r!=null||o!=null))switch(h){case"value":k=r;break;case"defaultValue":M=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(u(91));break;default:r!==o&&Ke(e,t,h,r,l,o)}Wd(e,k,M);return;case"option":for(var te in a)if(k=a[te],a.hasOwnProperty(te)&&k!=null&&!l.hasOwnProperty(te))switch(te){case"selected":e.selected=!1;break;default:Ke(e,t,te,null,l,k)}for(w in l)if(k=l[w],M=a[w],l.hasOwnProperty(w)&&k!==M&&(k!=null||M!=null))switch(w){case"selected":e.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:Ke(e,t,w,k,l,M)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var he in a)k=a[he],a.hasOwnProperty(he)&&k!=null&&!l.hasOwnProperty(he)&&Ke(e,t,he,null,l,k);for(C in l)if(k=l[C],M=a[C],l.hasOwnProperty(C)&&k!==M&&(k!=null||M!=null))switch(C){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(u(137,t));break;default:Ke(e,t,C,k,l,M)}return;default:if(Nu(t)){for(var Je in a)k=a[Je],a.hasOwnProperty(Je)&&k!==void 0&&!l.hasOwnProperty(Je)&&fo(e,t,Je,void 0,l,k);for(z in l)k=l[z],M=a[z],!l.hasOwnProperty(z)||k===M||k===void 0&&M===void 0||fo(e,t,z,k,l,M);return}}for(var A in a)k=a[A],a.hasOwnProperty(A)&&k!=null&&!l.hasOwnProperty(A)&&Ke(e,t,A,null,l,k);for(H in l)k=l[H],M=a[H],!l.hasOwnProperty(H)||k===M||k==null&&M==null||Ke(e,t,H,k,l,M)}function np(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function wg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var r=a[l],o=r.transferSize,h=r.initiatorType,x=r.duration;if(o&&x&&np(h)){for(h=0,x=r.responseEnd,l+=1;l<a.length;l++){var w=a[l],C=w.startTime;if(C>x)break;var z=w.transferSize,H=w.initiatorType;z&&np(H)&&(w=w.responseEnd,h+=z*(w<x?1:(x-C)/(w-C)))}if(--l,t+=8*(o+h)/(r.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 ho=null,mo=null;function Nr(e){return e.nodeType===9?e:e.ownerDocument}function lp(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 ip(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 po(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 xo=null;function Sg(){var e=window.event;return e&&e.type==="popstate"?e===xo?!1:(xo=e,!0):(xo=null,!1)}var sp=typeof setTimeout=="function"?setTimeout:void 0,_g=typeof clearTimeout=="function"?clearTimeout:void 0,rp=typeof Promise=="function"?Promise:void 0,jg=typeof queueMicrotask=="function"?queueMicrotask:typeof rp<"u"?function(e){return rp.resolve(null).then(e).catch(Ng)}:sp;function Ng(e){setTimeout(function(){throw e})}function Dn(e){return e==="head"}function up(e,t){var a=t,l=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(r),ri(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")ns(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ns(a);for(var o=a.firstChild;o;){var h=o.nextSibling,x=o.nodeName;o[wi]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=h}}else a==="body"&&ns(e.ownerDocument.body);a=r}while(a);ri(t)}function cp(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function yo(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":yo(a),wu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Ag(e,t,a,l){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[wi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=ca(e.nextSibling),e===null)break}return null}function Eg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ca(e.nextSibling),e===null))return null;return e}function op(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ca(e.nextSibling),e===null))return null;return e}function vo(e){return e.data==="$?"||e.data==="$~"}function go(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Tg(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function ca(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 bo=null;function dp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ca(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function fp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function hp(e,t,a){switch(t=Nr(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function ns(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);wu(e)}var oa=new Map,mp=new Set;function Ar(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var un=F.d;F.d={f:Cg,r:Rg,D:kg,C:Og,L:Mg,m:Dg,X:Ug,S:Lg,M:zg};function Cg(){var e=un.f(),t=yr();return e||t}function Rg(e){var t=Al(e);t!==null&&t.tag===5&&t.type==="form"?kh(t):un.r(e)}var li=typeof document>"u"?null:document;function pp(e,t,a){var l=li;if(l&&typeof t=="string"&&t){var r=aa(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),mp.has(r)||(mp.add(r),e={rel:e,crossOrigin:a,href:t},l.querySelector(r)===null&&(t=l.createElement("link"),Et(t,"link",e),bt(t),l.head.appendChild(t)))}}function kg(e){un.D(e),pp("dns-prefetch",e,null)}function Og(e,t){un.C(e,t),pp("preconnect",e,t)}function Mg(e,t,a){un.L(e,t,a);var l=li;if(l&&e&&t){var r='link[rel="preload"][as="'+aa(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+aa(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+aa(a.imageSizes)+'"]')):r+='[href="'+aa(e)+'"]';var o=r;switch(t){case"style":o=ii(e);break;case"script":o=si(e)}oa.has(o)||(e=N({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),oa.set(o,e),l.querySelector(r)!==null||t==="style"&&l.querySelector(ls(o))||t==="script"&&l.querySelector(is(o))||(t=l.createElement("link"),Et(t,"link",e),bt(t),l.head.appendChild(t)))}}function Dg(e,t){un.m(e,t);var a=li;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+aa(l)+'"][href="'+aa(e)+'"]',o=r;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=si(e)}if(!oa.has(o)&&(e=N({rel:"modulepreload",href:e},t),oa.set(o,e),a.querySelector(r)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(is(o)))return}l=a.createElement("link"),Et(l,"link",e),bt(l),a.head.appendChild(l)}}}function Lg(e,t,a){un.S(e,t,a);var l=li;if(l&&e){var r=El(l).hoistableStyles,o=ii(e);t=t||"default";var h=r.get(o);if(!h){var x={loading:0,preload:null};if(h=l.querySelector(ls(o)))x.loading=5;else{e=N({rel:"stylesheet",href:e,"data-precedence":t},a),(a=oa.get(o))&&wo(e,a);var w=h=l.createElement("link");bt(w),Et(w,"link",e),w._p=new Promise(function(C,z){w.onload=C,w.onerror=z}),w.addEventListener("load",function(){x.loading|=1}),w.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Er(h,t,l)}h={type:"stylesheet",instance:h,count:1,state:x},r.set(o,h)}}}function Ug(e,t){un.X(e,t);var a=li;if(a&&e){var l=El(a).hoistableScripts,r=si(e),o=l.get(r);o||(o=a.querySelector(is(r)),o||(e=N({src:e,async:!0},t),(t=oa.get(r))&&So(e,t),o=a.createElement("script"),bt(o),Et(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},l.set(r,o))}}function zg(e,t){un.M(e,t);var a=li;if(a&&e){var l=El(a).hoistableScripts,r=si(e),o=l.get(r);o||(o=a.querySelector(is(r)),o||(e=N({src:e,async:!0,type:"module"},t),(t=oa.get(r))&&So(e,t),o=a.createElement("script"),bt(o),Et(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},l.set(r,o))}}function xp(e,t,a,l){var r=(r=ce.current)?Ar(r):null;if(!r)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=ii(a.href),a=El(r).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ii(a.href);var o=El(r).hoistableStyles,h=o.get(e);if(h||(r=r.ownerDocument||r,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,h),(o=r.querySelector(ls(e)))&&!o._p&&(h.instance=o,h.state.loading=5),oa.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},oa.set(e,a),o||Bg(r,e,a,h.state))),t&&l===null)throw Error(u(528,""));return h}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=si(a),a=El(r).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function ii(e){return'href="'+aa(e)+'"'}function ls(e){return'link[rel="stylesheet"]['+e+"]"}function yp(e){return N({},e,{"data-precedence":e.precedence,precedence:null})}function Bg(e,t,a,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}),Et(t,"link",a),bt(t),e.head.appendChild(t))}function si(e){return'[src="'+aa(e)+'"]'}function is(e){return"script[async]"+e}function vp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+aa(a.href)+'"]');if(l)return t.instance=l,bt(l),l;var r=N({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),bt(l),Et(l,"style",r),Er(l,a.precedence,e),t.instance=l;case"stylesheet":r=ii(a.href);var o=e.querySelector(ls(r));if(o)return t.state.loading|=4,t.instance=o,bt(o),o;l=yp(a),(r=oa.get(r))&&wo(l,r),o=(e.ownerDocument||e).createElement("link"),bt(o);var h=o;return h._p=new Promise(function(x,w){h.onload=x,h.onerror=w}),Et(o,"link",l),t.state.loading|=4,Er(o,a.precedence,e),t.instance=o;case"script":return o=si(a.src),(r=e.querySelector(is(o)))?(t.instance=r,bt(r),r):(l=a,(r=oa.get(o))&&(l=N({},a),So(l,r)),e=e.ownerDocument||e,r=e.createElement("script"),bt(r),Et(r,"link",l),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Er(l,a.precedence,e));return t.instance}function Er(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=l.length?l[l.length-1]:null,o=r,h=0;h<l.length;h++){var x=l[h];if(x.dataset.precedence===t)o=x;else if(o!==r)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function wo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function So(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Tr=null;function gp(e,t,a){if(Tr===null){var l=new Map,r=Tr=new Map;r.set(a,l)}else r=Tr,l=r.get(a),l||(l=new Map,r.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var o=a[r];if(!(o[wi]||o[_t]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var h=o.getAttribute(t)||"";h=e+h;var x=l.get(h);x?x.push(o):l.set(h,[o])}}return l}function bp(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function qg(e,t,a){if(a===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 wp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Hg(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=ii(l.href),o=t.querySelector(ls(r));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Cr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,bt(o);return}o=t.ownerDocument||t,l=yp(l),(r=oa.get(r))&&wo(l,r),o=o.createElement("link"),bt(o);var h=o;h._p=new Promise(function(x,w){h.onload=x,h.onerror=w}),Et(o,"link",l),a.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Cr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var _o=0;function $g(e,t){return e.stylesheets&&e.count===0&&kr(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&kr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&_o===0&&(_o=62500*wg());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&kr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>_o?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(r)}}:null}function Cr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)kr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rr=null;function kr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rr=new Map,t.forEach(Vg,e),Rr=null,Cr.call(e))}function Vg(e,t){if(!(t.state.loading&4)){var a=Rr.get(e);if(a)var l=a.get(null);else{a=new Map,Rr.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<r.length;o++){var h=r[o];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),l=h)}l&&a.set(null,l)}r=t.instance,h=r.getAttribute("data-precedence"),o=a.get(h)||l,o===l&&a.set(null,r),a.set(h,r),this.count++,l=Cr.bind(this),r.addEventListener("load",l),r.addEventListener("error",l),o?o.parentNode.insertBefore(r,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var ss={$$typeof:ne,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function Yg(e,t,a,l,r,o,h,x,w){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=yu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yu(0),this.hiddenUpdates=yu(null),this.identifierPrefix=l,this.onUncaughtError=r,this.onCaughtError=o,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function Sp(e,t,a,l,r,o,h,x,w,C,z,H){return e=new Yg(e,t,a,h,w,C,z,H,x),t=1,o===!0&&(t|=24),o=Qt(3,null,null,t),e.current=o,o.stateNode=e,t=tc(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:l,isDehydrated:a,cache:t},ic(o),e}function _p(e){return e?(e=zl,e):zl}function jp(e,t,a,l,r,o){r=_p(r),l.context===null?l.context=r:l.pendingContext=r,l=_n(t),l.payload={element:a},o=o===void 0?null:o,o!==null&&(l.callback=o),a=jn(e,l,t),a!==null&&($t(a,e,t),Bi(a,e,t))}function Np(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function jo(e,t){Np(e,t),(e=e.alternate)&&Np(e,t)}function Ap(e){if(e.tag===13||e.tag===31){var t=Fn(e,67108864);t!==null&&$t(t,e,67108864),jo(e,67108864)}}function Ep(e){if(e.tag===13||e.tag===31){var t=Ft();t=vu(t);var a=Fn(e,t);a!==null&&$t(a,e,t),jo(e,t)}}var Or=!0;function Zg(e,t,a,l){var r=U.T;U.T=null;var o=F.p;try{F.p=2,No(e,t,a,l)}finally{F.p=o,U.T=r}}function Gg(e,t,a,l){var r=U.T;U.T=null;var o=F.p;try{F.p=8,No(e,t,a,l)}finally{F.p=o,U.T=r}}function No(e,t,a,l){if(Or){var r=Ao(l);if(r===null)oo(e,t,l,Mr,a),Cp(e,l);else if(Xg(r,e,t,a,l))l.stopPropagation();else if(Cp(e,l),t&4&&-1<Qg.indexOf(e)){for(;r!==null;){var o=Al(r);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var h=kt(o.pendingLanes);if(h!==0){var x=o;for(x.pendingLanes|=2,x.entangledLanes|=2;h;){var w=1<<31-Ue(h);x.entanglements[1]|=w,h&=~w}Ba(o),(qe&6)===0&&(pr=yt()+500,es(0))}}break;case 31:case 13:x=Fn(o,2),x!==null&&$t(x,o,2),yr(),jo(o,2)}if(o=Ao(l),o===null&&oo(e,t,l,Mr,a),o===r)break;r=o}r!==null&&l.stopPropagation()}else oo(e,t,l,null,a)}}function Ao(e){return e=Eu(e),Eo(e)}var Mr=null;function Eo(e){if(Mr=null,e=Nl(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===31){if(e=y(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Mr=e,null}function Tp(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(St()){case bl:return 2;case wl:return 8;case pn:case yi:return 32;case Gn:return 268435456;default:return 32}default:return 32}}var To=!1,Ln=null,Un=null,zn=null,rs=new Map,us=new Map,Bn=[],Qg="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 Cp(e,t){switch(e){case"focusin":case"focusout":Ln=null;break;case"dragenter":case"dragleave":Un=null;break;case"mouseover":case"mouseout":zn=null;break;case"pointerover":case"pointerout":rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":us.delete(t.pointerId)}}function cs(e,t,a,l,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:o,targetContainers:[r]},t!==null&&(t=Al(t),t!==null&&Ap(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Xg(e,t,a,l,r){switch(t){case"focusin":return Ln=cs(Ln,e,t,a,l,r),!0;case"dragenter":return Un=cs(Un,e,t,a,l,r),!0;case"mouseover":return zn=cs(zn,e,t,a,l,r),!0;case"pointerover":var o=r.pointerId;return rs.set(o,cs(rs.get(o)||null,e,t,a,l,r)),!0;case"gotpointercapture":return o=r.pointerId,us.set(o,cs(us.get(o)||null,e,t,a,l,r)),!0}return!1}function Rp(e){var t=Nl(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,Yd(e.priority,function(){Ep(a)});return}}else if(t===31){if(t=y(a),t!==null){e.blockedOn=t,Yd(e.priority,function(){Ep(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Ao(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Au=l,a.target.dispatchEvent(l),Au=null}else return t=Al(a),t!==null&&Ap(t),e.blockedOn=a,!1;t.shift()}return!0}function kp(e,t,a){Dr(e)&&a.delete(t)}function Kg(){To=!1,Ln!==null&&Dr(Ln)&&(Ln=null),Un!==null&&Dr(Un)&&(Un=null),zn!==null&&Dr(zn)&&(zn=null),rs.forEach(kp),us.forEach(kp)}function Lr(e,t){e.blockedOn===t&&(e.blockedOn=null,To||(To=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Kg)))}var Ur=null;function Op(e){Ur!==e&&(Ur=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ur===e&&(Ur=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],r=e[t+2];if(typeof l!="function"){if(Eo(l||a)===null)continue;break}var o=Al(a);o!==null&&(e.splice(t,3),t-=3,Nc(o,{pending:!0,data:r,method:a.method,action:l},l,r))}}))}function ri(e){function t(w){return Lr(w,e)}Ln!==null&&Lr(Ln,e),Un!==null&&Lr(Un,e),zn!==null&&Lr(zn,e),rs.forEach(t),us.forEach(t);for(var a=0;a<Bn.length;a++){var l=Bn[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Bn.length&&(a=Bn[0],a.blockedOn===null);)Rp(a),a.blockedOn===null&&Bn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var r=a[l],o=a[l+1],h=r[Lt]||null;if(typeof o=="function")h||Op(a);else if(h){var x=null;if(o&&o.hasAttribute("formAction")){if(r=o,h=o[Lt]||null)x=h.formAction;else if(Eo(r)!==null)continue}else x=h.action;typeof x=="function"?a[l+1]=x:(a.splice(l,3),l-=3),Op(a)}}}function Mp(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(h){return r=h})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Co(e){this._internalRoot=e}zr.prototype.render=Co.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,l=Ft();jp(a,l,e,t,null,null)},zr.prototype.unmount=Co.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jp(e.current,2,null,e,null,null),yr(),t[jl]=null}};function zr(e){this._internalRoot=e}zr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vd();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Bn.length&&t!==0&&t<Bn[a].priority;a++);Bn.splice(a,0,e),a===0&&Rp(e)}};var Dp=i.version;if(Dp!=="19.2.7")throw Error(u(527,Dp,"19.2.7"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=g(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Jg={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Br=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Br.isDisabled&&Br.supportsFiber)try{Sa=Br.inject(Jg),Z=Br}catch{}}return ds.createRoot=function(e,t){if(!d(e))throw Error(u(299));var a=!1,l="",r=$h,o=Vh,h=Yh;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Sp(e,1,!1,null,null,a,l,null,r,o,h,Mp),e[jl]=t.current,co(e),new Co(t)},ds.hydrateRoot=function(e,t,a){if(!d(e))throw Error(u(299));var l=!1,r="",o=$h,h=Vh,x=Yh,w=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError),a.formState!==void 0&&(w=a.formState)),t=Sp(e,1,!0,t,a??null,l,r,w,o,h,x,Mp),t.context=_p(null),a=t.current,l=Ft(),l=vu(l),r=_n(l),r.callback=null,jn(a,r,l),a=l,t.current.lanes=a,bi(t,a),Ba(t),e[jl]=t.current,co(e),new zr(t)},ds.version="19.2.7",ds}var Zp;function i0(){if(Zp)return Oo.exports;Zp=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(i){console.error(i)}}return n(),Oo.exports=l0(),Oo.exports}var s0=i0();/**
50
- * react-router v7.18.4
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */var gd=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ox=/^[\\/]{2}/;function r0(n,i){return i+n.replace(/\\/g,"/")}var Gp="popstate";function Qp(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function u0(n={}){function i(u,d){var g;let f=(g=d.state)==null?void 0:g.masked,{pathname:m,search:y,hash:v}=f||u.location;return ad("",{pathname:m,search:y,hash:v},d.state&&d.state.usr||null,d.state&&d.state.key||"default",f?{pathname:u.location.pathname,search:u.location.search,hash:u.location.hash}:void 0)}function s(u,d){return typeof d=="string"?d:dl(d)}return o0(i,s,null,n)}function at(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function pa(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function c0(){return Math.random().toString(36).substring(2,10)}function Xp(n,i){return{usr:n.state,key:n.key,idx:i,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function ad(n,i,s=null,u,d){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?mi(i):i,state:s,key:i&&i.key||u||c0(),mask:d}}function dl({pathname:n="/",search:i="",hash:s=""}){return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function mi(n){let i={};if(n){let s=n.indexOf("#");s>=0&&(i.hash=n.substring(s),n=n.substring(0,s));let u=n.indexOf("?");u>=0&&(i.search=n.substring(u),n=n.substring(0,u)),n&&(i.pathname=n)}return i}function o0(n,i,s,u={}){let{window:d=document.defaultView,v5Compat:f=!1}=u,m=d.history,y="POP",v=null,g=b();g==null&&(g=0,m.replaceState({...m.state,idx:g},""));function b(){return(m.state||{idx:null}).idx}function N(){y="POP";let O=b(),Y=O==null?null:O-g;g=O,v&&v({action:y,location:V.location,delta:Y})}function L(O,Y){y="PUSH";let J=Qp(O)?O:ad(V.location,O,Y);g=b()+1;let ne=Xp(J,g),pe=V.createHref(J.mask||J);try{m.pushState(ne,"",pe)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;d.location.assign(pe)}f&&v&&v({action:y,location:V.location,delta:1})}function K(O,Y){y="REPLACE";let J=Qp(O)?O:ad(V.location,O,Y);g=b();let ne=Xp(J,g),pe=V.createHref(J.mask||J);m.replaceState(ne,"",pe),f&&v&&v({action:y,location:V.location,delta:0})}function D(O){return d0(d,O)}let V={get action(){return y},get location(){return n(d,m)},listen(O){if(v)throw new Error("A history only accepts one active listener");return d.addEventListener(Gp,N),v=O,()=>{d.removeEventListener(Gp,N),v=null}},createHref(O){return i(d,O)},createURL:D,encodeLocation(O){let Y=D(O);return{pathname:Y.pathname,search:Y.search,hash:Y.hash}},push:L,replace:K,go(O){return m.go(O)}};return V}function d0(n,i,s=!1){let u="http://localhost";n&&(u=n.location.origin!=="null"?n.location.origin:n.location.href),at(u,"No window.location.(origin|href) available to create URL");let d=typeof i=="string"?i:dl(i);return d=d.replace(/ $/,"%20"),!s&&Ox.test(d)&&(d=u+d),new URL(d,u)}function Mx(n,i,s="/"){return f0(n,i,s,!1)}function f0(n,i,s,u,d){let f=typeof i=="string"?mi(i):i,m=fn(f.pathname||"/",s);if(m==null)return null;let y=h0(n),v=null,g=j0(m);for(let b=0;v==null&&b<y.length;++b)v=_0(y[b],g,u);return v}function h0(n){let i=Dx(n);return m0(i),i}function Dx(n,i=[],s=[],u="",d=!1){let f=(m,y,v=d,g)=>{let b={relativePath:g===void 0?m.path||"":g,caseSensitive:m.caseSensitive===!0,childrenIndex:y,route:m};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(u)&&v)return;at(b.relativePath.startsWith(u),`Absolute route path "${b.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(u.length)}let N=Ra([u,b.relativePath]),L=s.concat(b);m.children&&m.children.length>0&&(at(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${N}".`),Dx(m.children,i,L,N,v)),!(m.path==null&&!m.index)&&i.push({path:N,score:w0(N,m.index),routesMeta:L.map((K,D)=>{let[V,O]=zx(K.relativePath,K.caseSensitive,D===L.length-1);return{...K,matcher:V,compiledParams:O}})})};return n.forEach((m,y)=>{var v;if(m.path===""||!((v=m.path)!=null&&v.includes("?")))f(m,y);else for(let g of Lx(m.path))f(m,y,!0,g)}),i}function Lx(n){let i=n.split("/");if(i.length===0)return[];let[s,...u]=i,d=s.endsWith("?"),f=s.replace(/\?$/,"");if(u.length===0)return d?[f,""]:[f];let m=Lx(u.join("/")),y=[];return y.push(...m.map(v=>v===""?f:[f,v].join("/"))),d&&y.push(...m),y.map(v=>n.startsWith("/")&&v===""?"/":v)}function m0(n){n.sort((i,s)=>i.score!==s.score?s.score-i.score:S0(i.routesMeta.map(u=>u.childrenIndex),s.routesMeta.map(u=>u.childrenIndex)))}var p0=/^:[\w-]+$/,x0=3,y0=2,v0=1,g0=10,b0=-2,Kp=n=>n==="*";function w0(n,i){let s=n.split("/"),u=s.length;return s.some(Kp)&&(u+=b0),i&&(u+=y0),s.filter(d=>!Kp(d)).reduce((d,f)=>d+(p0.test(f)?x0:f===""?v0:g0),u)}function S0(n,i){return n.length===i.length&&n.slice(0,-1).every((u,d)=>u===i[d])?n[n.length-1]-i[i.length-1]:0}function _0(n,i,s=!1){let{routesMeta:u}=n,d={},f="/",m=[];for(let y=0;y<u.length;++y){let v=u[y],g=y===u.length-1,b=f==="/"?i:i.slice(f.length)||"/",N={path:v.relativePath,caseSensitive:v.caseSensitive,end:g},L=v.matcher&&v.compiledParams?Ux(N,b,v.matcher,v.compiledParams):Jr(N,b),K=v.route;if(!L&&g&&s&&!u[u.length-1].route.index&&(L=Jr({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},b)),!L)return null;Object.assign(d,L.params),m.push({params:d,pathname:Ra([f,L.pathname]),pathnameBase:E0(Ra([f,L.pathnameBase])),route:K}),L.pathnameBase!=="/"&&(f=Ra([f,L.pathnameBase]))}return m}function Jr(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,u]=zx(n.path,n.caseSensitive,n.end);return Ux(n,i,s,u)}function Ux(n,i,s,u){let d=i.match(s);if(!d)return null;let f=d[0],m=di(f,1),y=d.slice(1);return{params:u.reduce((g,{paramName:b,isOptional:N},L)=>{if(b==="*"){let D=y[L]||"";m=di(f.slice(0,f.length-D.length),1)}const K=y[L];return N&&!K?g[b]=void 0:g[b]=(K||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:m,pattern:n}}function zx(n,i=!1,s=!0){pa(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 u=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,y,v,g,b)=>{if(u.push({paramName:y,isOptional:v!=null}),v){let N=b.charAt(g+m.length);return N&&N!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(u.push({paramName:"*"}),d+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?d+="\\/*$":n!==""&&n!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,i?void 0:"i"),u]}function j0(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return pa(!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 (${i}).`),n}}function fn(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let s=i.endsWith("/")?i.length-1:i.length,u=n.charAt(s);return u&&u!=="/"?null:n.slice(s)||"/"}function N0(n,i="/"){let{pathname:s,search:u="",hash:d=""}=typeof n=="string"?mi(n):n,f;return s?(s=Bx(s),s.startsWith("/")||s.startsWith("\\")?f=Jp(s.substring(1),"/"):f=Jp(s,i)):f=i,{pathname:f,search:T0(u),hash:C0(d)}}function Jp(n,i){let s=di(i).split("/");return n.split("/").forEach(d=>{d===".."?s.length>1&&s.pop():d!=="."&&s.push(d)}),s.length>1?s.join("/"):"/"}function Uo(n,i,s,u){return`Cannot include a '${n}' character in a manually specified \`to.${i}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function A0(n){return n.filter((i,s)=>s===0||i.route.path&&i.route.path.length>0)}function bd(n){let i=A0(n);return i.map((s,u)=>u===i.length-1?s.pathname:s.pathnameBase)}function cu(n,i,s,u=!1){let d;typeof n=="string"?d=mi(n):(d={...n},at(!d.pathname||!d.pathname.includes("?"),Uo("?","pathname","search",d)),at(!d.pathname||!d.pathname.includes("#"),Uo("#","pathname","hash",d)),at(!d.search||!d.search.includes("#"),Uo("#","search","hash",d)));let f=n===""||d.pathname==="",m=f?"/":d.pathname,y;if(m==null)y=s;else{let N=i.length-1;if(!u&&m.startsWith("..")){let L=m.split("/");for(;L[0]==="..";)L.shift(),N-=1;d.pathname=L.join("/")}y=N>=0?i[N]:"/"}let v=N0(d,y),g=m&&m!=="/"&&m.endsWith("/"),b=(f||m===".")&&s.endsWith("/");return!v.pathname.endsWith("/")&&(g||b)&&(v.pathname+="/"),v}var Bx=n=>n.replace(/[\\/]{2,}/g,"/"),Ra=n=>Bx(n.join("/"));function di(n,i=0){let s=n.length;for(;s>i&&n.charCodeAt(s-1)===47;)s--;return s===n.length?n:n.slice(0,s)}var E0=n=>di(n).replace(/^\/*/,"/"),T0=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,C0=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,R0=class{constructor(n,i,s,u=!1){this.status=n,this.statusText=i||"",this.internal=u,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function k0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function O0(n){let i=n.map(s=>s.route.path).filter(Boolean);return Ra(i)||"/"}var qx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Hx(n,i){let s=n;if(typeof s!="string"||!gd.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let u=s,d=!1;if(qx)try{let f=new URL(window.location.href),m=Ox.test(s)?new URL(r0(s,f.protocol)):new URL(s),y=fn(m.pathname,i);m.origin===f.origin&&y!=null?s=y+m.search+m.hash:d=!0}catch{pa(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:d,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ip=new URL("http://localhost");function wd(n){if(n.createURL)return n.createURL("/");try{return new URL(n.createHref("/"),Ip)}catch{return Ip}}function zo(n,i){return n.origin===i.origin&&(n.origin!=="null"||n.protocol===i.protocol&&n.host===i.host)}function M0(n,i){if(n.startsWith("//"))return!0;let s=i.protocol.toLowerCase();return n.toLowerCase().startsWith(s)?i.host===""||n.slice(s.length).startsWith("//"):!1}function Sd(n,i,s,u){let d=null;try{d=n==null?null:new URL(n,s)}catch{}let f=new URL(i,s),m=d!=null&&!zo(d,s),y=!zo(f,s);if(u==="reject"){if(m||y)throw new Error("External navigation is not allowed")}else if(y&&(d==null||!M0(n,d)||!zo(d,f)))throw new Error("External navigation is not allowed")}var $x=["POST","PUT","PATCH","DELETE"];new Set($x);var D0=["GET",...$x];new Set(D0);var L0=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function U0(n){try{return L0.includes(new URL(n).protocol)}catch{return!1}}var pi=S.createContext(null);pi.displayName="DataRouter";var ou=S.createContext(null);ou.displayName="DataRouterState";var Vx=S.createContext(!1);function z0(){return S.useContext(Vx)}var Yx=S.createContext({isTransitioning:!1});Yx.displayName="ViewTransition";var B0=S.createContext(new Map);B0.displayName="Fetchers";var q0=S.createContext(null);q0.displayName="Await";var Pt=S.createContext(null);Pt.displayName="Navigation";var js=S.createContext(null);js.displayName="Location";var Ma=S.createContext({outlet:null,matches:[],isDataRoute:!1});Ma.displayName="Route";var _d=S.createContext(null);_d.displayName="RouteError";var Zx="REACT_ROUTER_ERROR",H0="REDIRECT",$0="ROUTE_ERROR_RESPONSE";function V0(n){if(n.startsWith(`${Zx}:${H0}:{`))try{let i=JSON.parse(n.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function Y0(n){if(n.startsWith(`${Zx}:${$0}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new R0(i.status,i.statusText,i.data)}catch{}}function Z0(n,{relative:i}={}){at(xi(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:u}=S.useContext(Pt),{hash:d,pathname:f,search:m}=Ns(n,{relative:i}),y=f;return s!=="/"&&(y=f==="/"?s:Ra([s,f])),u.createHref({pathname:y,search:m,hash:d})}function xi(){return S.useContext(js)!=null}function Da(){return at(xi(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(js).location}var Gx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Qx(n){S.useContext(Pt).static||S.useLayoutEffect(n)}function jd(){let{isDataRoute:n}=S.useContext(Ma);return n?lb():G0()}function G0(){at(xi(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(pi),{basename:i,navigator:s}=S.useContext(Pt),{matches:u}=S.useContext(Ma),{pathname:d}=Da(),f=JSON.stringify(bd(u)),m=S.useRef(!1);return Qx(()=>{m.current=!0}),S.useCallback((v,g={})=>{if(pa(m.current,Gx),!m.current)return;if(typeof v=="number"){s.go(v);return}let b=cu(v,JSON.parse(f),d,g.relative==="path");n==null&&i!=="/"&&(b.pathname=b.pathname==="/"?i:Ra([i,b.pathname])),Sd(typeof v=="string"?v:dl(v),s.createHref(b),wd(s),"reject"),(g.replace?s.replace:s.push)(b,g.state,g)},[i,s,f,d,n])}S.createContext(null);function Q0(){let{matches:n}=S.useContext(Ma),i=n[n.length-1];return(i==null?void 0:i.params)??{}}function Ns(n,{relative:i}={}){let{matches:s}=S.useContext(Ma),{pathname:u}=Da(),d=JSON.stringify(bd(s));return S.useMemo(()=>cu(n,JSON.parse(d),u,i==="path"),[n,d,u,i])}function X0(n,i){return Xx(n,i)}function Xx(n,i,s){var O;at(xi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=S.useContext(Pt),{matches:d}=S.useContext(Ma),f=d[d.length-1],m=f?f.params:{},y=f?f.pathname:"/",v=f?f.pathnameBase:"/",g=f&&f.route;{let Y=g&&g.path||"";Jx(y,!g||Y.endsWith("*")||Y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${Y}">) 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.
59
-
60
- Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}/*`}">.`)}let b=Da(),N;if(i){let Y=typeof i=="string"?mi(i):i;at(v==="/"||((O=Y.pathname)==null?void 0:O.startsWith(v)),`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 "${v}" but pathname "${Y.pathname}" was given in the \`location\` prop.`),N=Y}else N=b;let L=N.pathname||"/",K=L;if(v!=="/"){let Y=v.replace(/^\//,"").split("/");K="/"+L.replace(/^\//,"").split("/").slice(Y.length).join("/")}let D=s&&s.state.matches.length?s.state.matches.map(Y=>Object.assign(Y,{route:s.manifest[Y.route.id]||Y.route})):Mx(n,{pathname:K});pa(g||D!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),pa(D==null||D[D.length-1].route.element!==void 0||D[D.length-1].route.Component!==void 0||D[D.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.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 V=W0(D&&D.map(Y=>Object.assign({},Y,{params:Object.assign({},m,Y.params),pathname:Ra([v,u.encodeLocation?u.encodeLocation(Y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathname]),pathnameBase:Y.pathnameBase==="/"?v:Ra([v,u.encodeLocation?u.encodeLocation(Y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathnameBase])})),d,s);return i&&V?S.createElement(js.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...N},navigationType:"POP"}},V):V}function K0(){let n=nb(),i=k0(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,u="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:u},f={padding:"2px 4px",backgroundColor:u},m=null;return console.error("Error handled by React Router default ErrorBoundary:",n),m=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:f},"ErrorBoundary")," or"," ",S.createElement("code",{style:f},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},i),s?S.createElement("pre",{style:d},s):null,m)}var J0=S.createElement(K0,null),Kx=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,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):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 s=Y0(n.digest);s&&(n=s)}let i=n!==void 0?S.createElement(Ma.Provider,{value:this.props.routeContext},S.createElement(_d.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(I0,{error:n},i):i}};Kx.contextType=Vx;var Bo=new WeakMap;function I0({children:n,error:i}){let{basename:s,navigator:u}=S.useContext(Pt);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let d=V0(i.digest);if(d){let f=Bo.get(i);if(f)throw f;let m=Hx(d.location,s),y=m.absoluteURL||m.to;if(Sd(d.location,y,wd(u),"allow-explicit"),U0(y))throw new Error("Invalid redirect location");if(qx&&!Bo.get(i))if(m.isExternal||d.reloadDocument)window.location.href=y;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:d.replace}));throw Bo.set(i,v),v}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${y}`})}}return n}function F0({routeContext:n,match:i,children:s}){let u=S.useContext(pi);return u&&u.static&&u.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=i.route.id),S.createElement(Ma.Provider,{value:n},s)}function W0(n,i=[],s){let u=s==null?void 0:s.state;if(n==null){if(!u)return null;if(u.errors)n=u.matches;else if(i.length===0&&!u.initialized&&u.matches.length>0)n=u.matches;else return null}let d=n,f=u==null?void 0:u.errors;if(f!=null){let b=d.findIndex(N=>N.route.id&&(f==null?void 0:f[N.route.id])!==void 0);at(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,b+1))}let m=!1,y=-1;if(s&&u){m=u.renderFallback;for(let b=0;b<d.length;b++){let N=d[b];if((N.route.HydrateFallback||N.route.hydrateFallbackElement)&&(y=b),N.route.id){let{loaderData:L,errors:K}=u,D=N.route.loader&&!L.hasOwnProperty(N.route.id)&&(!K||K[N.route.id]===void 0);if(N.route.lazy||D){s.isStatic&&(m=!0),y>=0?d=d.slice(0,y+1):d=[d[0]];break}}}}let v=s==null?void 0:s.onError,g=u&&v?(b,N)=>{var L,K;v(b,{location:u.location,params:((K=(L=u.matches)==null?void 0:L[0])==null?void 0:K.params)??{},pattern:O0(u.matches),errorInfo:N})}:void 0;return d.reduceRight((b,N,L)=>{let K,D=!1,V=null,O=null;u&&(K=f&&N.route.id?f[N.route.id]:void 0,V=N.route.errorElement||J0,m&&(y<0&&L===0?(Jx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),D=!0,O=null):y===L&&(D=!0,O=N.route.hydrateFallbackElement||null)));let Y=i.concat(d.slice(0,L+1)),J=()=>{let ne;return K?ne=V:D?ne=O:N.route.Component?ne=S.createElement(N.route.Component,null):N.route.element?ne=N.route.element:ne=b,S.createElement(F0,{match:N,routeContext:{outlet:b,matches:Y,isDataRoute:u!=null},children:ne})};return u&&(N.route.ErrorBoundary||N.route.errorElement||L===0)?S.createElement(Kx,{location:u.location,revalidation:u.revalidation,component:V,error:K,children:J(),routeContext:{outlet:null,matches:Y,isDataRoute:!0},onError:g}):J()},null)}function Nd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function P0(n){let i=S.useContext(pi);return at(i,Nd(n)),i}function eb(n){let i=S.useContext(ou);return at(i,Nd(n)),i}function tb(n){let i=S.useContext(Ma);return at(i,Nd(n)),i}function Ad(n){let i=tb(n),s=i.matches[i.matches.length-1];return at(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function ab(){return Ad("useRouteId")}function nb(){var u;let n=S.useContext(_d),i=eb("useRouteError"),s=Ad("useRouteError");return n!==void 0?n:(u=i.errors)==null?void 0:u[s]}function lb(){let{router:n}=P0("useNavigate"),i=Ad("useNavigate"),s=S.useRef(!1);return Qx(()=>{s.current=!0}),S.useCallback(async(d,f={})=>{pa(s.current,Gx),s.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:i,...f}))},[n,i])}var Fp={};function Jx(n,i,s){!i&&!Fp[n]&&(Fp[n]=!0,pa(!1,s))}S.memo(ib);function ib({routes:n,manifest:i,future:s,state:u,isStatic:d,onError:f}){return Xx(n,void 0,{manifest:i,state:u,isStatic:d,onError:f})}function Ix({to:n,replace:i,state:s,relative:u}){at(xi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d,navigator:f}=S.useContext(Pt);pa(!d,"<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:m}=S.useContext(Ma),{pathname:y}=Da(),v=jd(),g=cu(n,bd(m),y,u==="path");Sd(typeof n=="string"?n:dl(n),f.createHref(g),wd(f),"reject");let b=JSON.stringify(g);return S.useEffect(()=>{v(JSON.parse(b),{replace:i,state:s,relative:u})},[v,b,u,i,s]),null}function ol(n){at(!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 sb({basename:n="/",children:i=null,location:s,navigationType:u="POP",navigator:d,static:f=!1,useTransitions:m}){at(!xi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=n.replace(/^\/*/,"/"),v=S.useMemo(()=>({basename:y,navigator:d,static:f,useTransitions:m,future:{}}),[y,d,f,m]);typeof s=="string"&&(s=mi(s));let{pathname:g="/",search:b="",hash:N="",state:L=null,key:K="default",mask:D}=s,V=S.useMemo(()=>{let O=fn(g,y);return O==null?null:{location:{pathname:O,search:b,hash:N,state:L,key:K,mask:D},navigationType:u}},[y,g,b,N,L,K,u,D]);return pa(V!=null,`<Router basename="${y}"> is not able to match the URL "${g}${b}${N}" because it does not start with the basename, so the <Router> won't render anything.`),V==null?null:S.createElement(Pt.Provider,{value:v},S.createElement(js.Provider,{children:i,value:V}))}function rb({children:n,location:i}){return X0(nd(n),i)}function nd(n,i=[]){let s=[];return S.Children.forEach(n,(u,d)=>{if(!S.isValidElement(u))return;let f=[...i,d];if(u.type===S.Fragment){s.push.apply(s,nd(u.props.children,f));return}at(u.type===ol,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),at(!u.props.index||!u.props.children,"An index route cannot have child routes.");let m={id:u.props.id||f.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(m.children=nd(u.props.children,f)),s.push(m)}),s}var Gr="get",Qr="application/x-www-form-urlencoded";function du(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function ub(n){return du(n)&&n.tagName.toLowerCase()==="button"}function cb(n){return du(n)&&n.tagName.toLowerCase()==="form"}function ob(n){return du(n)&&n.tagName.toLowerCase()==="input"}function db(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function fb(n,i){return n.button===0&&(!i||i==="_self")&&!db(n)}function ld(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((i,s)=>{let u=n[s];return i.concat(Array.isArray(u)?u.map(d=>[s,d]):[[s,u]])},[]))}function hb(n,i){let s=ld(n);return i&&i.forEach((u,d)=>{s.has(d)||i.getAll(d).forEach(f=>{s.append(d,f)})}),s}var qr=null;function mb(){if(qr===null)try{new FormData(document.createElement("form"),0),qr=!1}catch{qr=!0}return qr}var pb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function qo(n){return n!=null&&!pb.has(n)?(pa(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Qr}"`),null):n}function xb(n,i){let s,u,d,f,m;if(cb(n)){let y=n.getAttribute("action");u=y?fn(y,i):null,s=n.getAttribute("method")||Gr,d=qo(n.getAttribute("enctype"))||Qr,f=new FormData(n)}else if(ub(n)||ob(n)&&(n.type==="submit"||n.type==="image")){let y=n.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=n.getAttribute("formaction")||y.getAttribute("action");if(u=v?fn(v,i):null,s=n.getAttribute("formmethod")||y.getAttribute("method")||Gr,d=qo(n.getAttribute("formenctype"))||qo(y.getAttribute("enctype"))||Qr,f=new FormData(y,n),!mb()){let{name:g,type:b,value:N}=n;if(b==="image"){let L=g?`${g}.`:"";f.append(`${L}x`,"0"),f.append(`${L}y`,"0")}else g&&f.append(g,N)}}else{if(du(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Gr,u=null,d=Qr,m=n}return f&&d==="text/plain"&&(m=f,f=void 0),{action:u,method:s.toLowerCase(),encType:d,formData:f,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ed(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function Fx(n,i,s,u){let d=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return s?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${u}`:d.pathname=`${d.pathname}.${u}`:d.pathname==="/"?d.pathname=`_root.${u}`:i&&fn(d.pathname,i)==="/"?d.pathname=`${di(i)}/_root.${u}`:d.pathname=`${di(d.pathname)}.${u}`,d}async function yb(n,i){if(n.id in i)return i[n.id];try{let s=await import(n.module);return i[n.id]=s,s}catch(s){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function vb(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 gb(n,i,s){let u=await Promise.all(n.map(async d=>{let f=i.routes[d.route.id];if(f){let m=await yb(f,s);return m.links?m.links():[]}return[]}));return _b(u.flat(1).filter(vb).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Wp(n,i,s,u,d,f){let m=(v,g)=>s[g]?v.route.id!==s[g].route.id:!0,y=(v,g)=>{var b;return s[g].pathname!==v.pathname||((b=s[g].route.path)==null?void 0:b.endsWith("*"))&&s[g].params["*"]!==v.params["*"]};return f==="assets"?i.filter((v,g)=>m(v,g)||y(v,g)):f==="data"?i.filter((v,g)=>{var N;let b=u.routes[v.route.id];if(!b||!b.hasLoader)return!1;if(m(v,g)||y(v,g))return!0;if(v.route.shouldRevalidate){let L=v.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((N=s[0])==null?void 0:N.params)||{},nextUrl:new URL(n,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof L=="boolean")return L}return!0}):[]}function bb(n,i,{includeHydrateFallback:s}={}){return wb(n.map(u=>{let d=i.routes[u.route.id];if(!d)return[];let f=[d.module];return d.clientActionModule&&(f=f.concat(d.clientActionModule)),d.clientLoaderModule&&(f=f.concat(d.clientLoaderModule)),s&&d.hydrateFallbackModule&&(f=f.concat(d.hydrateFallbackModule)),d.imports&&(f=f.concat(d.imports)),f}).flat(1))}function wb(n){return[...new Set(n)]}function Sb(n){let i={},s=Object.keys(n).sort();for(let u of s)i[u]=n[u];return i}function _b(n,i){let s=new Set;return new Set(i),n.reduce((u,d)=>{let f=JSON.stringify(Sb(d));return s.has(f)||(s.add(f),u.push({key:f,link:d})),u},[])}function Td(){let n=S.useContext(pi);return Ed(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function jb(){let n=S.useContext(ou);return Ed(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Cd=S.createContext(void 0);Cd.displayName="FrameworkContext";function fu(){let n=S.useContext(Cd);return Ed(n,"You must render this element inside a <HydratedRouter> element"),n}function Nb(n,i){let s=S.useContext(Cd),[u,d]=S.useState(!1),[f,m]=S.useState(!1),{onFocus:y,onBlur:v,onMouseEnter:g,onMouseLeave:b,onTouchStart:N}=i,L=S.useRef(null);S.useEffect(()=>{if(n==="render"&&m(!0),n==="viewport"){let V=Y=>{Y.forEach(J=>{m(J.isIntersecting)})},O=new IntersectionObserver(V,{threshold:.5});return L.current&&O.observe(L.current),()=>{O.disconnect()}}},[n]),S.useEffect(()=>{if(u){let V=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(V)}}},[u]);let K=()=>{d(!0)},D=()=>{d(!1),m(!1)};return s?n!=="intent"?[f,L,{}]:[f,L,{onFocus:fs(y,K),onBlur:fs(v,D),onMouseEnter:fs(g,K),onMouseLeave:fs(b,D),onTouchStart:fs(N,K)}]:[!1,L,{}]}function fs(n,i){return s=>{n&&n(s),s.defaultPrevented||i(s)}}function Ab({page:n,...i}){let s=z0(),{nonce:u}=fu(),{router:d}=Td(),f=S.useMemo(()=>Mx(d.routes,n,d.basename),[d.routes,n,d.basename]);return f?(i.nonce==null&&u&&(i={...i,nonce:u}),s?S.createElement(Tb,{page:n,matches:f,...i}):S.createElement(Cb,{page:n,matches:f,...i})):null}function Eb(n){let{manifest:i,routeModules:s}=fu(),[u,d]=S.useState([]);return S.useEffect(()=>{let f=!1;return gb(n,i,s).then(m=>{f||d(m)}),()=>{f=!0}},[n,i,s]),u}function Tb({page:n,matches:i,...s}){let u=Da(),{future:d}=fu(),{basename:f}=Td(),m=S.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let y=Fx(n,f,d.v8_trailingSlashAwareDataRequests,"rsc"),v=!1,g=[];for(let b of i)typeof b.route.shouldRevalidate=="function"?v=!0:g.push(b.route.id);return v&&g.length>0&&y.searchParams.set("_routes",g.join(",")),[y.pathname+y.search]},[f,d.v8_trailingSlashAwareDataRequests,n,u,i]);return S.createElement(S.Fragment,null,m.map(y=>S.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...s})))}function Cb({page:n,matches:i,...s}){let u=Da(),{future:d,manifest:f,routeModules:m}=fu(),{basename:y}=Td(),{loaderData:v,matches:g}=jb(),b=S.useMemo(()=>Wp(n,i,g,f,u,"data"),[n,i,g,f,u]),N=S.useMemo(()=>Wp(n,i,g,f,u,"assets"),[n,i,g,f,u]),L=S.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let V=new Set,O=!1;if(i.forEach(J=>{var pe;let ne=f.routes[J.route.id];!ne||!ne.hasLoader||(!b.some(I=>I.route.id===J.route.id)&&J.route.id in v&&((pe=m[J.route.id])!=null&&pe.shouldRevalidate)||ne.hasClientLoader?O=!0:V.add(J.route.id))}),V.size===0)return[];let Y=Fx(n,y,d.v8_trailingSlashAwareDataRequests,"data");return O&&V.size>0&&Y.searchParams.set("_routes",i.filter(J=>V.has(J.route.id)).map(J=>J.route.id).join(",")),[Y.pathname+Y.search]},[y,d.v8_trailingSlashAwareDataRequests,v,u,f,b,i,n,m]),K=S.useMemo(()=>bb(N,f),[N,f]),D=Eb(N);return S.createElement(S.Fragment,null,L.map(V=>S.createElement("link",{key:V,rel:"prefetch",as:"fetch",href:V,...s})),K.map(V=>S.createElement("link",{key:V,rel:"modulepreload",href:V,...s})),D.map(({key:V,link:O})=>S.createElement("link",{key:V,nonce:s.nonce,...O,crossOrigin:O.crossOrigin??s.crossOrigin})))}function Rb(...n){return i=>{n.forEach(s=>{typeof s=="function"?s(i):s!=null&&(s.current=i)})}}var kb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{kb&&(window.__reactRouterVersion="7.18.4")}catch{}function Ob({basename:n,children:i,useTransitions:s,window:u}){let d=S.useRef();d.current==null&&(d.current=u0({window:u,v5Compat:!0}));let f=d.current,[m,y]=S.useState({action:f.action,location:f.location}),v=S.useCallback(g=>{s===!1?y(g):S.startTransition(()=>y(g))},[s]);return S.useLayoutEffect(()=>f.listen(v),[f,v]),S.createElement(sb,{basename:n,children:i,location:m.location,navigationType:m.action,navigator:f,useTransitions:s})}var xa=S.forwardRef(function({onClick:i,discover:s="render",prefetch:u="none",relative:d,reloadDocument:f,replace:m,mask:y,state:v,target:g,to:b,preventScrollReset:N,viewTransition:L,defaultShouldRevalidate:K,...D},V){let{basename:O,navigator:Y,useTransitions:J}=S.useContext(Pt),ne=typeof b=="string"&&gd.test(b),pe=Hx(b,O);b=pe.to;let I=Z0(b,{relative:d}),Ee=Da(),X=null;if(y){let ie=cu(y,[],Ee.mask?Ee.mask.pathname:"/",!0);O!=="/"&&(ie.pathname=ie.pathname==="/"?O:Ra([O,ie.pathname])),X=Y.createHref(ie)}let[be,$e,gt]=Nb(u,D),xt=Lb(b,{replace:m,mask:y,state:v,target:g,preventScrollReset:N,relative:d,viewTransition:L,defaultShouldRevalidate:K,useTransitions:J});function et(ie){i&&i(ie),ie.defaultPrevented||xt(ie)}let Tt=!(pe.isExternal||f),He=S.createElement("a",{...D,...gt,href:(Tt?X:void 0)||pe.absoluteURL||I,onClick:Tt?et:i,ref:Rb(V,$e),target:g,"data-discover":!ne&&s==="render"?"true":void 0});return be&&!ne?S.createElement(S.Fragment,null,He,S.createElement(Ab,{page:I})):He});xa.displayName="Link";var Xr=S.forwardRef(function({"aria-current":i="page",caseSensitive:s=!1,className:u="",end:d=!1,style:f,to:m,viewTransition:y,children:v,...g},b){let N=Ns(m,{relative:g.relative}),L=Da(),K=S.useContext(ou),{navigator:D,basename:V}=S.useContext(Pt),O=K!=null&&Hb(N)&&y===!0,Y=D.encodeLocation?D.encodeLocation(N).pathname:N.pathname,J=L.pathname,ne=K&&K.navigation&&K.navigation.location?K.navigation.location.pathname:null;s||(J=J.toLowerCase(),ne=ne?ne.toLowerCase():null,Y=Y.toLowerCase()),ne&&V&&(ne=fn(ne,V)||ne);const pe=Y!=="/"&&Y.endsWith("/")?Y.length-1:Y.length;let I=J===Y||!d&&J.startsWith(Y)&&J.charAt(pe)==="/",Ee=ne!=null&&(ne===Y||!d&&ne.startsWith(Y)&&ne.charAt(Y.length)==="/"),X={isActive:I,isPending:Ee,isTransitioning:O},be=I?i:void 0,$e;typeof u=="function"?$e=u(X):$e=[u,I?"active":null,Ee?"pending":null,O?"transitioning":null].filter(Boolean).join(" ");let gt=typeof f=="function"?f(X):f;return S.createElement(xa,{...g,"aria-current":be,className:$e,ref:b,style:gt,to:m,viewTransition:y},typeof v=="function"?v(X):v)});Xr.displayName="NavLink";var Mb=S.forwardRef(({discover:n="render",fetcherKey:i,navigate:s,reloadDocument:u,replace:d,state:f,method:m=Gr,action:y,onSubmit:v,relative:g,preventScrollReset:b,viewTransition:N,defaultShouldRevalidate:L,...K},D)=>{let{useTransitions:V}=S.useContext(Pt),O=Bb(),Y=qb(y,{relative:g}),J=m.toLowerCase()==="get"?"get":"post",ne=typeof y=="string"&&gd.test(y),pe=I=>{if(v&&v(I),I.defaultPrevented)return;I.preventDefault();let Ee=I.nativeEvent.submitter,X=(Ee==null?void 0:Ee.getAttribute("formmethod"))||m,be=()=>O(Ee||I.currentTarget,{fetcherKey:i,method:X,navigate:s,replace:d,state:f,relative:g,preventScrollReset:b,viewTransition:N,defaultShouldRevalidate:L});V&&s!==!1?S.startTransition(()=>be()):be()};return S.createElement("form",{ref:D,method:J,action:Y,onSubmit:u?v:pe,...K,"data-discover":!ne&&n==="render"?"true":void 0})});Mb.displayName="Form";function Db(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wx(n){let i=S.useContext(pi);return at(i,Db(n)),i}function Lb(n,{target:i,replace:s,mask:u,state:d,preventScrollReset:f,relative:m,viewTransition:y,defaultShouldRevalidate:v,useTransitions:g}={}){let b=jd(),N=Da(),L=Ns(n,{relative:m});return S.useCallback(K=>{if(fb(K,i)){K.preventDefault();let D=s!==void 0?s:dl(N)===dl(L),V=()=>b(n,{replace:D,mask:u,state:d,preventScrollReset:f,relative:m,viewTransition:y,defaultShouldRevalidate:v});g?S.startTransition(()=>V()):V()}},[N,b,L,s,u,d,i,n,f,m,y,v,g])}function Px(n){pa(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 i=S.useRef(ld(n)),s=S.useRef(!1),u=Da(),d=S.useMemo(()=>hb(u.search,s.current?null:i.current),[u.search]),f=jd(),m=S.useCallback((y,v)=>{const g=ld(typeof y=="function"?y(new URLSearchParams(d)):y);s.current=!0,f("?"+g,v)},[f,d]);return[d,m]}var Ub=0,zb=()=>`__${String(++Ub)}__`;function Bb(){let{router:n}=Wx("useSubmit"),{basename:i}=S.useContext(Pt),s=ab(),u=n.fetch,d=n.navigate;return S.useCallback(async(f,m={})=>{let{action:y,method:v,encType:g,formData:b,body:N}=xb(f,i);if(m.navigate===!1){let L=m.fetcherKey||zb();await u(L,s,m.action||y,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:N,formMethod:m.method||v,formEncType:m.encType||g,flushSync:m.flushSync})}else await d(m.action||y,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:N,formMethod:m.method||v,formEncType:m.encType||g,replace:m.replace,state:m.state,fromRouteId:s,flushSync:m.flushSync,viewTransition:m.viewTransition})},[u,d,i,s])}function qb(n,{relative:i}={}){let{basename:s}=S.useContext(Pt),u=S.useContext(Ma);at(u,"useFormAction must be used inside a RouteContext");let[d]=u.matches.slice(-1),f={...Ns(n||".",{relative:i})},m=Da();if(n==null){f.search=m.search;let y=new URLSearchParams(f.search),v=y.getAll("index");if(v.some(b=>b==="")){y.delete("index"),v.filter(N=>N).forEach(N=>y.append("index",N));let b=y.toString();f.search=b?`?${b}`:""}}return(!n||n===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(f.pathname=f.pathname==="/"?s:Ra([s,f.pathname])),dl(f)}function Hb(n,{relative:i}={}){let s=S.useContext(Yx);at(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=Wx("useViewTransitionState"),d=Ns(n,{relative:i});if(!s.isTransitioning)return!1;let f=fn(s.currentLocation.pathname,u)||s.currentLocation.pathname,m=fn(s.nextLocation.pathname,u)||s.nextLocation.pathname;return Jr(d.pathname,m)!=null||Jr(d.pathname,f)!=null}var De;(function(n){n.assertEqual=d=>{};function i(d){}n.assertIs=i;function s(d){throw new Error}n.assertNever=s,n.arrayToEnum=d=>{const f={};for(const m of d)f[m]=m;return f},n.getValidEnumValues=d=>{const f=n.objectKeys(d).filter(y=>typeof d[d[y]]!="number"),m={};for(const y of f)m[y]=d[y];return n.objectValues(m)},n.objectValues=d=>n.objectKeys(d).map(function(f){return d[f]}),n.objectKeys=typeof Object.keys=="function"?d=>Object.keys(d):d=>{const f=[];for(const m in d)Object.prototype.hasOwnProperty.call(d,m)&&f.push(m);return f},n.find=(d,f)=>{for(const m of d)if(f(m))return m},n.isInteger=typeof Number.isInteger=="function"?d=>Number.isInteger(d):d=>typeof d=="number"&&Number.isFinite(d)&&Math.floor(d)===d;function u(d,f=" | "){return d.map(m=>typeof m=="string"?`'${m}'`:m).join(f)}n.joinValues=u,n.jsonStringifyReplacer=(d,f)=>typeof f=="bigint"?f.toString():f})(De||(De={}));var Pp;(function(n){n.mergeShapes=(i,s)=>({...i,...s})})(Pp||(Pp={}));const ee=De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$n=n=>{switch(typeof n){case"undefined":return ee.undefined;case"string":return ee.string;case"number":return Number.isNaN(n)?ee.nan:ee.number;case"boolean":return ee.boolean;case"function":return ee.function;case"bigint":return ee.bigint;case"symbol":return ee.symbol;case"object":return Array.isArray(n)?ee.array:n===null?ee.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?ee.promise:typeof Map<"u"&&n instanceof Map?ee.map:typeof Set<"u"&&n instanceof Set?ee.set:typeof Date<"u"&&n instanceof Date?ee.date:ee.object;default:return ee.unknown}},Q=De.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class hn extends Error{get errors(){return this.issues}constructor(i){super(),this.issues=[],this.addIssue=u=>{this.issues=[...this.issues,u]},this.addIssues=(u=[])=>{this.issues=[...this.issues,...u]};const s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=i}format(i){const s=i||function(f){return f.message},u={_errors:[]},d=f=>{for(const m of f.issues)if(m.code==="invalid_union")m.unionErrors.map(d);else if(m.code==="invalid_return_type")d(m.returnTypeError);else if(m.code==="invalid_arguments")d(m.argumentsError);else if(m.path.length===0)u._errors.push(s(m));else{let y=u,v=0;for(;v<m.path.length;){const g=m.path[v];v===m.path.length-1?(y[g]=y[g]||{_errors:[]},y[g]._errors.push(s(m))):y[g]=y[g]||{_errors:[]},y=y[g],v++}}};return d(this),u}static assert(i){if(!(i instanceof hn))throw new Error(`Not a ZodError: ${i}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(i=s=>s.message){const s={},u=[];for(const d of this.issues)if(d.path.length>0){const f=d.path[0];s[f]=s[f]||[],s[f].push(i(d))}else u.push(i(d));return{formErrors:u,fieldErrors:s}}get formErrors(){return this.flatten()}}hn.create=n=>new hn(n);const id=(n,i)=>{let s;switch(n.code){case Q.invalid_type:n.received===ee.undefined?s="Required":s=`Expected ${n.expected}, received ${n.received}`;break;case Q.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(n.expected,De.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:s=`Unrecognized key(s) in object: ${De.joinValues(n.keys,", ")}`;break;case Q.invalid_union:s="Invalid input";break;case Q.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${De.joinValues(n.options)}`;break;case Q.invalid_enum_value:s=`Invalid enum value. Expected ${De.joinValues(n.options)}, received '${n.received}'`;break;case Q.invalid_arguments:s="Invalid function arguments";break;case Q.invalid_return_type:s="Invalid function return type";break;case Q.invalid_date:s="Invalid date";break;case Q.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(s=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(s=`${s} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?s=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?s=`Invalid input: must end with "${n.validation.endsWith}"`:De.assertNever(n.validation):n.validation!=="regex"?s=`Invalid ${n.validation}`:s="Invalid";break;case Q.too_small:n.type==="array"?s=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?s=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?s=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="bigint"?s=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?s=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:s="Invalid input";break;case Q.too_big:n.type==="array"?s=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?s=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?s=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?s=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?s=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:s="Invalid input";break;case Q.custom:s="Invalid input";break;case Q.invalid_intersection_types:s="Intersection results could not be merged";break;case Q.not_multiple_of:s=`Number must be a multiple of ${n.multipleOf}`;break;case Q.not_finite:s="Number must be finite";break;default:s=i.defaultError,De.assertNever(n)}return{message:s}};let $b=id;function Vb(){return $b}const Yb=n=>{const{data:i,path:s,errorMaps:u,issueData:d}=n,f=[...s,...d.path||[]],m={...d,path:f};if(d.message!==void 0)return{...d,path:f,message:d.message};let y="";const v=u.filter(g=>!!g).slice().reverse();for(const g of v)y=g(m,{data:i,defaultError:y}).message;return{...d,path:f,message:y}};function W(n,i){const s=Vb(),u=Yb({issueData:i,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,s,s===id?void 0:id].filter(d=>!!d)});n.common.issues.push(u)}class Mt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(i,s){const u=[];for(const d of s){if(d.status==="aborted")return xe;d.status==="dirty"&&i.dirty(),u.push(d.value)}return{status:i.value,value:u}}static async mergeObjectAsync(i,s){const u=[];for(const d of s){const f=await d.key,m=await d.value;u.push({key:f,value:m})}return Mt.mergeObjectSync(i,u)}static mergeObjectSync(i,s){const u={};for(const d of s){const{key:f,value:m}=d;if(f.status==="aborted"||m.status==="aborted")return xe;f.status==="dirty"&&i.dirty(),m.status==="dirty"&&i.dirty(),f.value!=="__proto__"&&(typeof m.value<"u"||d.alwaysSet)&&(u[f.value]=m.value)}return{status:i.value,value:u}}}const xe=Object.freeze({status:"aborted"}),ms=n=>({status:"dirty",value:n}),ya=n=>({status:"valid",value:n}),ex=n=>n.status==="aborted",tx=n=>n.status==="dirty",fi=n=>n.status==="valid",Ir=n=>typeof Promise<"u"&&n instanceof Promise;var se;(function(n){n.errToObj=i=>typeof i=="string"?{message:i}:i||{},n.toString=i=>typeof i=="string"?i:i==null?void 0:i.message})(se||(se={}));class Va{constructor(i,s,u,d){this._cachedPath=[],this.parent=i,this.data=s,this._path=u,this._key=d}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ax=(n,i)=>{if(fi(i))return{success:!0,data:i.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const s=new hn(n.common.issues);return this._error=s,this._error}}};function _e(n){if(!n)return{};const{errorMap:i,invalid_type_error:s,required_error:u,description:d}=n;if(i&&(s||u))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return i?{errorMap:i,description:d}:{errorMap:(m,y)=>{const{message:v}=n;return m.code==="invalid_enum_value"?{message:v??y.defaultError}:typeof y.data>"u"?{message:v??u??y.defaultError}:m.code!=="invalid_type"?{message:y.defaultError}:{message:v??s??y.defaultError}},description:d}}class ke{get description(){return this._def.description}_getType(i){return $n(i.data)}_getOrReturnCtx(i,s){return s||{common:i.parent.common,data:i.data,parsedType:$n(i.data),schemaErrorMap:this._def.errorMap,path:i.path,parent:i.parent}}_processInputParams(i){return{status:new Mt,ctx:{common:i.parent.common,data:i.data,parsedType:$n(i.data),schemaErrorMap:this._def.errorMap,path:i.path,parent:i.parent}}}_parseSync(i){const s=this._parse(i);if(Ir(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(i){const s=this._parse(i);return Promise.resolve(s)}parse(i,s){const u=this.safeParse(i,s);if(u.success)return u.data;throw u.error}safeParse(i,s){const u={common:{issues:[],async:(s==null?void 0:s.async)??!1,contextualErrorMap:s==null?void 0:s.errorMap},path:(s==null?void 0:s.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:$n(i)},d=this._parseSync({data:i,path:u.path,parent:u});return ax(u,d)}"~validate"(i){var u,d;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:$n(i)};if(!this["~standard"].async)try{const f=this._parseSync({data:i,path:[],parent:s});return fi(f)?{value:f.value}:{issues:s.common.issues}}catch(f){(d=(u=f==null?void 0:f.message)==null?void 0:u.toLowerCase())!=null&&d.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:i,path:[],parent:s}).then(f=>fi(f)?{value:f.value}:{issues:s.common.issues})}async parseAsync(i,s){const u=await this.safeParseAsync(i,s);if(u.success)return u.data;throw u.error}async safeParseAsync(i,s){const u={common:{issues:[],contextualErrorMap:s==null?void 0:s.errorMap,async:!0},path:(s==null?void 0:s.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:$n(i)},d=this._parse({data:i,path:u.path,parent:u}),f=await(Ir(d)?d:Promise.resolve(d));return ax(u,f)}refine(i,s){const u=d=>typeof s=="string"||typeof s>"u"?{message:s}:typeof s=="function"?s(d):s;return this._refinement((d,f)=>{const m=i(d),y=()=>f.addIssue({code:Q.custom,...u(d)});return typeof Promise<"u"&&m instanceof Promise?m.then(v=>v?!0:(y(),!1)):m?!0:(y(),!1)})}refinement(i,s){return this._refinement((u,d)=>i(u)?!0:(d.addIssue(typeof s=="function"?s(u,d):s),!1))}_refinement(i){return new xl({schema:this,typeName:ye.ZodEffects,effect:{type:"refinement",refinement:i}})}superRefine(i){return this._refinement(i)}constructor(i){this.spa=this.safeParseAsync,this._def=i,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:s=>this["~validate"](s)}}optional(){return dn.create(this,this._def)}nullable(){return yl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $a.create(this)}promise(){return au.create(this,this._def)}or(i){return Wr.create([this,i],this._def)}and(i){return Pr.create(this,i,this._def)}transform(i){return new xl({..._e(this._def),schema:this,typeName:ye.ZodEffects,effect:{type:"transform",transform:i}})}default(i){const s=typeof i=="function"?i:()=>i;return new nu({..._e(this._def),innerType:this,defaultValue:s,typeName:ye.ZodDefault})}brand(){return new ny({typeName:ye.ZodBranded,type:this,..._e(this._def)})}catch(i){const s=typeof i=="function"?i:()=>i;return new lu({..._e(this._def),innerType:this,catchValue:s,typeName:ye.ZodCatch})}describe(i){const s=this.constructor;return new s({...this._def,description:i})}pipe(i){return kd.create(this,i)}readonly(){return iu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Zb=/^c[^\s-]{8,}$/i,Gb=/^[0-9a-z]+$/,Qb=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Xb=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Kb=/^[a-z0-9_-]{21}$/i,Jb=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ib=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Fb=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Wb="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ho;const Pb=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,e1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,t1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,a1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,n1=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,l1=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ey="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",i1=new RegExp(`^${ey}$`);function ty(n){let i="[0-5]\\d";n.precision?i=`${i}\\.\\d{${n.precision}}`:n.precision==null&&(i=`${i}(\\.\\d+)?`);const s=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${i})${s}`}function s1(n){return new RegExp(`^${ty(n)}$`)}function r1(n){let i=`${ey}T${ty(n)}`;const s=[];return s.push(n.local?"Z?":"Z"),n.offset&&s.push("([+-]\\d{2}:?\\d{2})"),i=`${i}(${s.join("|")})`,new RegExp(`^${i}$`)}function u1(n,i){return!!((i==="v4"||!i)&&Pb.test(n)||(i==="v6"||!i)&&t1.test(n))}function c1(n,i){if(!Jb.test(n))return!1;try{const[s]=n.split(".");if(!s)return!1;const u=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),d=JSON.parse(atob(u));return!(typeof d!="object"||d===null||"typ"in d&&(d==null?void 0:d.typ)!=="JWT"||!d.alg||i&&d.alg!==i)}catch{return!1}}function o1(n,i){return!!((i==="v4"||!i)&&e1.test(n)||(i==="v6"||!i)&&a1.test(n))}class qa extends ke{_parse(i){if(this._def.coerce&&(i.data=String(i.data)),this._getType(i)!==ee.string){const f=this._getOrReturnCtx(i);return W(f,{code:Q.invalid_type,expected:ee.string,received:f.parsedType}),xe}const u=new Mt;let d;for(const f of this._def.checks)if(f.kind==="min")i.data.length<f.value&&(d=this._getOrReturnCtx(i,d),W(d,{code:Q.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!1,message:f.message}),u.dirty());else if(f.kind==="max")i.data.length>f.value&&(d=this._getOrReturnCtx(i,d),W(d,{code:Q.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!1,message:f.message}),u.dirty());else if(f.kind==="length"){const m=i.data.length>f.value,y=i.data.length<f.value;(m||y)&&(d=this._getOrReturnCtx(i,d),m?W(d,{code:Q.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}):y&&W(d,{code:Q.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}),u.dirty())}else if(f.kind==="email")Fb.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"email",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="emoji")Ho||(Ho=new RegExp(Wb,"u")),Ho.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"emoji",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="uuid")Xb.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"uuid",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="nanoid")Kb.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"nanoid",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid")Zb.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"cuid",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid2")Gb.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"cuid2",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="ulid")Qb.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"ulid",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="url")try{new URL(i.data)}catch{d=this._getOrReturnCtx(i,d),W(d,{validation:"url",code:Q.invalid_string,message:f.message}),u.dirty()}else f.kind==="regex"?(f.regex.lastIndex=0,f.regex.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"regex",code:Q.invalid_string,message:f.message}),u.dirty())):f.kind==="trim"?i.data=i.data.trim():f.kind==="includes"?i.data.includes(f.value,f.position)||(d=this._getOrReturnCtx(i,d),W(d,{code:Q.invalid_string,validation:{includes:f.value,position:f.position},message:f.message}),u.dirty()):f.kind==="toLowerCase"?i.data=i.data.toLowerCase():f.kind==="toUpperCase"?i.data=i.data.toUpperCase():f.kind==="startsWith"?i.data.startsWith(f.value)||(d=this._getOrReturnCtx(i,d),W(d,{code:Q.invalid_string,validation:{startsWith:f.value},message:f.message}),u.dirty()):f.kind==="endsWith"?i.data.endsWith(f.value)||(d=this._getOrReturnCtx(i,d),W(d,{code:Q.invalid_string,validation:{endsWith:f.value},message:f.message}),u.dirty()):f.kind==="datetime"?r1(f).test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{code:Q.invalid_string,validation:"datetime",message:f.message}),u.dirty()):f.kind==="date"?i1.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{code:Q.invalid_string,validation:"date",message:f.message}),u.dirty()):f.kind==="time"?s1(f).test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{code:Q.invalid_string,validation:"time",message:f.message}),u.dirty()):f.kind==="duration"?Ib.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"duration",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="ip"?u1(i.data,f.version)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"ip",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="jwt"?c1(i.data,f.alg)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"jwt",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="cidr"?o1(i.data,f.version)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"cidr",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="base64"?n1.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"base64",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="base64url"?l1.test(i.data)||(d=this._getOrReturnCtx(i,d),W(d,{validation:"base64url",code:Q.invalid_string,message:f.message}),u.dirty()):De.assertNever(f);return{status:u.value,value:i.data}}_regex(i,s,u){return this.refinement(d=>i.test(d),{validation:s,code:Q.invalid_string,...se.errToObj(u)})}_addCheck(i){return new qa({...this._def,checks:[...this._def.checks,i]})}email(i){return this._addCheck({kind:"email",...se.errToObj(i)})}url(i){return this._addCheck({kind:"url",...se.errToObj(i)})}emoji(i){return this._addCheck({kind:"emoji",...se.errToObj(i)})}uuid(i){return this._addCheck({kind:"uuid",...se.errToObj(i)})}nanoid(i){return this._addCheck({kind:"nanoid",...se.errToObj(i)})}cuid(i){return this._addCheck({kind:"cuid",...se.errToObj(i)})}cuid2(i){return this._addCheck({kind:"cuid2",...se.errToObj(i)})}ulid(i){return this._addCheck({kind:"ulid",...se.errToObj(i)})}base64(i){return this._addCheck({kind:"base64",...se.errToObj(i)})}base64url(i){return this._addCheck({kind:"base64url",...se.errToObj(i)})}jwt(i){return this._addCheck({kind:"jwt",...se.errToObj(i)})}ip(i){return this._addCheck({kind:"ip",...se.errToObj(i)})}cidr(i){return this._addCheck({kind:"cidr",...se.errToObj(i)})}datetime(i){return typeof i=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:i}):this._addCheck({kind:"datetime",precision:typeof(i==null?void 0:i.precision)>"u"?null:i==null?void 0:i.precision,offset:(i==null?void 0:i.offset)??!1,local:(i==null?void 0:i.local)??!1,...se.errToObj(i==null?void 0:i.message)})}date(i){return this._addCheck({kind:"date",message:i})}time(i){return typeof i=="string"?this._addCheck({kind:"time",precision:null,message:i}):this._addCheck({kind:"time",precision:typeof(i==null?void 0:i.precision)>"u"?null:i==null?void 0:i.precision,...se.errToObj(i==null?void 0:i.message)})}duration(i){return this._addCheck({kind:"duration",...se.errToObj(i)})}regex(i,s){return this._addCheck({kind:"regex",regex:i,...se.errToObj(s)})}includes(i,s){return this._addCheck({kind:"includes",value:i,position:s==null?void 0:s.position,...se.errToObj(s==null?void 0:s.message)})}startsWith(i,s){return this._addCheck({kind:"startsWith",value:i,...se.errToObj(s)})}endsWith(i,s){return this._addCheck({kind:"endsWith",value:i,...se.errToObj(s)})}min(i,s){return this._addCheck({kind:"min",value:i,...se.errToObj(s)})}max(i,s){return this._addCheck({kind:"max",value:i,...se.errToObj(s)})}length(i,s){return this._addCheck({kind:"length",value:i,...se.errToObj(s)})}nonempty(i){return this.min(1,se.errToObj(i))}trim(){return new qa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new qa({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new qa({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(i=>i.kind==="datetime")}get isDate(){return!!this._def.checks.find(i=>i.kind==="date")}get isTime(){return!!this._def.checks.find(i=>i.kind==="time")}get isDuration(){return!!this._def.checks.find(i=>i.kind==="duration")}get isEmail(){return!!this._def.checks.find(i=>i.kind==="email")}get isURL(){return!!this._def.checks.find(i=>i.kind==="url")}get isEmoji(){return!!this._def.checks.find(i=>i.kind==="emoji")}get isUUID(){return!!this._def.checks.find(i=>i.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(i=>i.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(i=>i.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(i=>i.kind==="cuid2")}get isULID(){return!!this._def.checks.find(i=>i.kind==="ulid")}get isIP(){return!!this._def.checks.find(i=>i.kind==="ip")}get isCIDR(){return!!this._def.checks.find(i=>i.kind==="cidr")}get isBase64(){return!!this._def.checks.find(i=>i.kind==="base64")}get isBase64url(){return!!this._def.checks.find(i=>i.kind==="base64url")}get minLength(){let i=null;for(const s of this._def.checks)s.kind==="min"&&(i===null||s.value>i)&&(i=s.value);return i}get maxLength(){let i=null;for(const s of this._def.checks)s.kind==="max"&&(i===null||s.value<i)&&(i=s.value);return i}}qa.create=n=>new qa({checks:[],typeName:ye.ZodString,coerce:(n==null?void 0:n.coerce)??!1,..._e(n)});function d1(n,i){const s=(n.toString().split(".")[1]||"").length,u=(i.toString().split(".")[1]||"").length,d=s>u?s:u,f=Number.parseInt(n.toFixed(d).replace(".","")),m=Number.parseInt(i.toFixed(d).replace(".",""));return f%m/10**d}class fl extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(i){if(this._def.coerce&&(i.data=Number(i.data)),this._getType(i)!==ee.number){const f=this._getOrReturnCtx(i);return W(f,{code:Q.invalid_type,expected:ee.number,received:f.parsedType}),xe}let u;const d=new Mt;for(const f of this._def.checks)f.kind==="int"?De.isInteger(i.data)||(u=this._getOrReturnCtx(i,u),W(u,{code:Q.invalid_type,expected:"integer",received:"float",message:f.message}),d.dirty()):f.kind==="min"?(f.inclusive?i.data<f.value:i.data<=f.value)&&(u=this._getOrReturnCtx(i,u),W(u,{code:Q.too_small,minimum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),d.dirty()):f.kind==="max"?(f.inclusive?i.data>f.value:i.data>=f.value)&&(u=this._getOrReturnCtx(i,u),W(u,{code:Q.too_big,maximum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),d.dirty()):f.kind==="multipleOf"?d1(i.data,f.value)!==0&&(u=this._getOrReturnCtx(i,u),W(u,{code:Q.not_multiple_of,multipleOf:f.value,message:f.message}),d.dirty()):f.kind==="finite"?Number.isFinite(i.data)||(u=this._getOrReturnCtx(i,u),W(u,{code:Q.not_finite,message:f.message}),d.dirty()):De.assertNever(f);return{status:d.value,value:i.data}}gte(i,s){return this.setLimit("min",i,!0,se.toString(s))}gt(i,s){return this.setLimit("min",i,!1,se.toString(s))}lte(i,s){return this.setLimit("max",i,!0,se.toString(s))}lt(i,s){return this.setLimit("max",i,!1,se.toString(s))}setLimit(i,s,u,d){return new fl({...this._def,checks:[...this._def.checks,{kind:i,value:s,inclusive:u,message:se.toString(d)}]})}_addCheck(i){return new fl({...this._def,checks:[...this._def.checks,i]})}int(i){return this._addCheck({kind:"int",message:se.toString(i)})}positive(i){return this._addCheck({kind:"min",value:0,inclusive:!1,message:se.toString(i)})}negative(i){return this._addCheck({kind:"max",value:0,inclusive:!1,message:se.toString(i)})}nonpositive(i){return this._addCheck({kind:"max",value:0,inclusive:!0,message:se.toString(i)})}nonnegative(i){return this._addCheck({kind:"min",value:0,inclusive:!0,message:se.toString(i)})}multipleOf(i,s){return this._addCheck({kind:"multipleOf",value:i,message:se.toString(s)})}finite(i){return this._addCheck({kind:"finite",message:se.toString(i)})}safe(i){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:se.toString(i)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:se.toString(i)})}get minValue(){let i=null;for(const s of this._def.checks)s.kind==="min"&&(i===null||s.value>i)&&(i=s.value);return i}get maxValue(){let i=null;for(const s of this._def.checks)s.kind==="max"&&(i===null||s.value<i)&&(i=s.value);return i}get isInt(){return!!this._def.checks.find(i=>i.kind==="int"||i.kind==="multipleOf"&&De.isInteger(i.value))}get isFinite(){let i=null,s=null;for(const u of this._def.checks){if(u.kind==="finite"||u.kind==="int"||u.kind==="multipleOf")return!0;u.kind==="min"?(s===null||u.value>s)&&(s=u.value):u.kind==="max"&&(i===null||u.value<i)&&(i=u.value)}return Number.isFinite(s)&&Number.isFinite(i)}}fl.create=n=>new fl({checks:[],typeName:ye.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,..._e(n)});class hl extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(i){if(this._def.coerce)try{i.data=BigInt(i.data)}catch{return this._getInvalidInput(i)}if(this._getType(i)!==ee.bigint)return this._getInvalidInput(i);let u;const d=new Mt;for(const f of this._def.checks)f.kind==="min"?(f.inclusive?i.data<f.value:i.data<=f.value)&&(u=this._getOrReturnCtx(i,u),W(u,{code:Q.too_small,type:"bigint",minimum:f.value,inclusive:f.inclusive,message:f.message}),d.dirty()):f.kind==="max"?(f.inclusive?i.data>f.value:i.data>=f.value)&&(u=this._getOrReturnCtx(i,u),W(u,{code:Q.too_big,type:"bigint",maximum:f.value,inclusive:f.inclusive,message:f.message}),d.dirty()):f.kind==="multipleOf"?i.data%f.value!==BigInt(0)&&(u=this._getOrReturnCtx(i,u),W(u,{code:Q.not_multiple_of,multipleOf:f.value,message:f.message}),d.dirty()):De.assertNever(f);return{status:d.value,value:i.data}}_getInvalidInput(i){const s=this._getOrReturnCtx(i);return W(s,{code:Q.invalid_type,expected:ee.bigint,received:s.parsedType}),xe}gte(i,s){return this.setLimit("min",i,!0,se.toString(s))}gt(i,s){return this.setLimit("min",i,!1,se.toString(s))}lte(i,s){return this.setLimit("max",i,!0,se.toString(s))}lt(i,s){return this.setLimit("max",i,!1,se.toString(s))}setLimit(i,s,u,d){return new hl({...this._def,checks:[...this._def.checks,{kind:i,value:s,inclusive:u,message:se.toString(d)}]})}_addCheck(i){return new hl({...this._def,checks:[...this._def.checks,i]})}positive(i){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:se.toString(i)})}negative(i){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:se.toString(i)})}nonpositive(i){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:se.toString(i)})}nonnegative(i){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:se.toString(i)})}multipleOf(i,s){return this._addCheck({kind:"multipleOf",value:i,message:se.toString(s)})}get minValue(){let i=null;for(const s of this._def.checks)s.kind==="min"&&(i===null||s.value>i)&&(i=s.value);return i}get maxValue(){let i=null;for(const s of this._def.checks)s.kind==="max"&&(i===null||s.value<i)&&(i=s.value);return i}}hl.create=n=>new hl({checks:[],typeName:ye.ZodBigInt,coerce:(n==null?void 0:n.coerce)??!1,..._e(n)});class Fr extends ke{_parse(i){if(this._def.coerce&&(i.data=!!i.data),this._getType(i)!==ee.boolean){const u=this._getOrReturnCtx(i);return W(u,{code:Q.invalid_type,expected:ee.boolean,received:u.parsedType}),xe}return ya(i.data)}}Fr.create=n=>new Fr({typeName:ye.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,..._e(n)});class hi extends ke{_parse(i){if(this._def.coerce&&(i.data=new Date(i.data)),this._getType(i)!==ee.date){const f=this._getOrReturnCtx(i);return W(f,{code:Q.invalid_type,expected:ee.date,received:f.parsedType}),xe}if(Number.isNaN(i.data.getTime())){const f=this._getOrReturnCtx(i);return W(f,{code:Q.invalid_date}),xe}const u=new Mt;let d;for(const f of this._def.checks)f.kind==="min"?i.data.getTime()<f.value&&(d=this._getOrReturnCtx(i,d),W(d,{code:Q.too_small,message:f.message,inclusive:!0,exact:!1,minimum:f.value,type:"date"}),u.dirty()):f.kind==="max"?i.data.getTime()>f.value&&(d=this._getOrReturnCtx(i,d),W(d,{code:Q.too_big,message:f.message,inclusive:!0,exact:!1,maximum:f.value,type:"date"}),u.dirty()):De.assertNever(f);return{status:u.value,value:new Date(i.data.getTime())}}_addCheck(i){return new hi({...this._def,checks:[...this._def.checks,i]})}min(i,s){return this._addCheck({kind:"min",value:i.getTime(),message:se.toString(s)})}max(i,s){return this._addCheck({kind:"max",value:i.getTime(),message:se.toString(s)})}get minDate(){let i=null;for(const s of this._def.checks)s.kind==="min"&&(i===null||s.value>i)&&(i=s.value);return i!=null?new Date(i):null}get maxDate(){let i=null;for(const s of this._def.checks)s.kind==="max"&&(i===null||s.value<i)&&(i=s.value);return i!=null?new Date(i):null}}hi.create=n=>new hi({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:ye.ZodDate,..._e(n)});class nx extends ke{_parse(i){if(this._getType(i)!==ee.symbol){const u=this._getOrReturnCtx(i);return W(u,{code:Q.invalid_type,expected:ee.symbol,received:u.parsedType}),xe}return ya(i.data)}}nx.create=n=>new nx({typeName:ye.ZodSymbol,..._e(n)});class sd extends ke{_parse(i){if(this._getType(i)!==ee.undefined){const u=this._getOrReturnCtx(i);return W(u,{code:Q.invalid_type,expected:ee.undefined,received:u.parsedType}),xe}return ya(i.data)}}sd.create=n=>new sd({typeName:ye.ZodUndefined,..._e(n)});class rd extends ke{_parse(i){if(this._getType(i)!==ee.null){const u=this._getOrReturnCtx(i);return W(u,{code:Q.invalid_type,expected:ee.null,received:u.parsedType}),xe}return ya(i.data)}}rd.create=n=>new rd({typeName:ye.ZodNull,..._e(n)});class lx extends ke{constructor(){super(...arguments),this._any=!0}_parse(i){return ya(i.data)}}lx.create=n=>new lx({typeName:ye.ZodAny,..._e(n)});class ud extends ke{constructor(){super(...arguments),this._unknown=!0}_parse(i){return ya(i.data)}}ud.create=n=>new ud({typeName:ye.ZodUnknown,..._e(n)});class Zn extends ke{_parse(i){const s=this._getOrReturnCtx(i);return W(s,{code:Q.invalid_type,expected:ee.never,received:s.parsedType}),xe}}Zn.create=n=>new Zn({typeName:ye.ZodNever,..._e(n)});class ix extends ke{_parse(i){if(this._getType(i)!==ee.undefined){const u=this._getOrReturnCtx(i);return W(u,{code:Q.invalid_type,expected:ee.void,received:u.parsedType}),xe}return ya(i.data)}}ix.create=n=>new ix({typeName:ye.ZodVoid,..._e(n)});class $a extends ke{_parse(i){const{ctx:s,status:u}=this._processInputParams(i),d=this._def;if(s.parsedType!==ee.array)return W(s,{code:Q.invalid_type,expected:ee.array,received:s.parsedType}),xe;if(d.exactLength!==null){const m=s.data.length>d.exactLength.value,y=s.data.length<d.exactLength.value;(m||y)&&(W(s,{code:m?Q.too_big:Q.too_small,minimum:y?d.exactLength.value:void 0,maximum:m?d.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:d.exactLength.message}),u.dirty())}if(d.minLength!==null&&s.data.length<d.minLength.value&&(W(s,{code:Q.too_small,minimum:d.minLength.value,type:"array",inclusive:!0,exact:!1,message:d.minLength.message}),u.dirty()),d.maxLength!==null&&s.data.length>d.maxLength.value&&(W(s,{code:Q.too_big,maximum:d.maxLength.value,type:"array",inclusive:!0,exact:!1,message:d.maxLength.message}),u.dirty()),s.common.async)return Promise.all([...s.data].map((m,y)=>d.type._parseAsync(new Va(s,m,s.path,y)))).then(m=>Mt.mergeArray(u,m));const f=[...s.data].map((m,y)=>d.type._parseSync(new Va(s,m,s.path,y)));return Mt.mergeArray(u,f)}get element(){return this._def.type}min(i,s){return new $a({...this._def,minLength:{value:i,message:se.toString(s)}})}max(i,s){return new $a({...this._def,maxLength:{value:i,message:se.toString(s)}})}length(i,s){return new $a({...this._def,exactLength:{value:i,message:se.toString(s)}})}nonempty(i){return this.min(1,i)}}$a.create=(n,i)=>new $a({type:n,minLength:null,maxLength:null,exactLength:null,typeName:ye.ZodArray,..._e(i)});function ci(n){if(n instanceof pt){const i={};for(const s in n.shape){const u=n.shape[s];i[s]=dn.create(ci(u))}return new pt({...n._def,shape:()=>i})}else return n instanceof $a?new $a({...n._def,type:ci(n.element)}):n instanceof dn?dn.create(ci(n.unwrap())):n instanceof yl?yl.create(ci(n.unwrap())):n instanceof ml?ml.create(n.items.map(i=>ci(i))):n}class pt extends ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const i=this._def.shape(),s=De.objectKeys(i);return this._cached={shape:i,keys:s},this._cached}_parse(i){if(this._getType(i)!==ee.object){const g=this._getOrReturnCtx(i);return W(g,{code:Q.invalid_type,expected:ee.object,received:g.parsedType}),xe}const{status:u,ctx:d}=this._processInputParams(i),{shape:f,keys:m}=this._getCached(),y=[];if(!(this._def.catchall instanceof Zn&&this._def.unknownKeys==="strip"))for(const g in d.data)m.includes(g)||y.push(g);const v=[];for(const g of m){const b=f[g],N=d.data[g];v.push({key:{status:"valid",value:g},value:b._parse(new Va(d,N,d.path,g)),alwaysSet:g in d.data})}if(this._def.catchall instanceof Zn){const g=this._def.unknownKeys;if(g==="passthrough")for(const b of y)v.push({key:{status:"valid",value:b},value:{status:"valid",value:d.data[b]}});else if(g==="strict")y.length>0&&(W(d,{code:Q.unrecognized_keys,keys:y}),u.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const g=this._def.catchall;for(const b of y){const N=d.data[b];v.push({key:{status:"valid",value:b},value:g._parse(new Va(d,N,d.path,b)),alwaysSet:b in d.data})}}return d.common.async?Promise.resolve().then(async()=>{const g=[];for(const b of v){const N=await b.key,L=await b.value;g.push({key:N,value:L,alwaysSet:b.alwaysSet})}return g}).then(g=>Mt.mergeObjectSync(u,g)):Mt.mergeObjectSync(u,v)}get shape(){return this._def.shape()}strict(i){return se.errToObj,new pt({...this._def,unknownKeys:"strict",...i!==void 0?{errorMap:(s,u)=>{var f,m;const d=((m=(f=this._def).errorMap)==null?void 0:m.call(f,s,u).message)??u.defaultError;return s.code==="unrecognized_keys"?{message:se.errToObj(i).message??d}:{message:d}}}:{}})}strip(){return new pt({...this._def,unknownKeys:"strip"})}passthrough(){return new pt({...this._def,unknownKeys:"passthrough"})}extend(i){return new pt({...this._def,shape:()=>({...this._def.shape(),...i})})}merge(i){return new pt({unknownKeys:i._def.unknownKeys,catchall:i._def.catchall,shape:()=>({...this._def.shape(),...i._def.shape()}),typeName:ye.ZodObject})}setKey(i,s){return this.augment({[i]:s})}catchall(i){return new pt({...this._def,catchall:i})}pick(i){const s={};for(const u of De.objectKeys(i))i[u]&&this.shape[u]&&(s[u]=this.shape[u]);return new pt({...this._def,shape:()=>s})}omit(i){const s={};for(const u of De.objectKeys(this.shape))i[u]||(s[u]=this.shape[u]);return new pt({...this._def,shape:()=>s})}deepPartial(){return ci(this)}partial(i){const s={};for(const u of De.objectKeys(this.shape)){const d=this.shape[u];i&&!i[u]?s[u]=d:s[u]=d.optional()}return new pt({...this._def,shape:()=>s})}required(i){const s={};for(const u of De.objectKeys(this.shape))if(i&&!i[u])s[u]=this.shape[u];else{let f=this.shape[u];for(;f instanceof dn;)f=f._def.innerType;s[u]=f}return new pt({...this._def,shape:()=>s})}keyof(){return ay(De.objectKeys(this.shape))}}pt.create=(n,i)=>new pt({shape:()=>n,unknownKeys:"strip",catchall:Zn.create(),typeName:ye.ZodObject,..._e(i)});pt.strictCreate=(n,i)=>new pt({shape:()=>n,unknownKeys:"strict",catchall:Zn.create(),typeName:ye.ZodObject,..._e(i)});pt.lazycreate=(n,i)=>new pt({shape:n,unknownKeys:"strip",catchall:Zn.create(),typeName:ye.ZodObject,..._e(i)});class Wr extends ke{_parse(i){const{ctx:s}=this._processInputParams(i),u=this._def.options;function d(f){for(const y of f)if(y.result.status==="valid")return y.result;for(const y of f)if(y.result.status==="dirty")return s.common.issues.push(...y.ctx.common.issues),y.result;const m=f.map(y=>new hn(y.ctx.common.issues));return W(s,{code:Q.invalid_union,unionErrors:m}),xe}if(s.common.async)return Promise.all(u.map(async f=>{const m={...s,common:{...s.common,issues:[]},parent:null};return{result:await f._parseAsync({data:s.data,path:s.path,parent:m}),ctx:m}})).then(d);{let f;const m=[];for(const v of u){const g={...s,common:{...s.common,issues:[]},parent:null},b=v._parseSync({data:s.data,path:s.path,parent:g});if(b.status==="valid")return b;b.status==="dirty"&&!f&&(f={result:b,ctx:g}),g.common.issues.length&&m.push(g.common.issues)}if(f)return s.common.issues.push(...f.ctx.common.issues),f.result;const y=m.map(v=>new hn(v));return W(s,{code:Q.invalid_union,unionErrors:y}),xe}}get options(){return this._def.options}}Wr.create=(n,i)=>new Wr({options:n,typeName:ye.ZodUnion,..._e(i)});const on=n=>n instanceof od?on(n.schema):n instanceof xl?on(n.innerType()):n instanceof tu?[n.value]:n instanceof pl?n.options:n instanceof dd?De.objectValues(n.enum):n instanceof nu?on(n._def.innerType):n instanceof sd?[void 0]:n instanceof rd?[null]:n instanceof dn?[void 0,...on(n.unwrap())]:n instanceof yl?[null,...on(n.unwrap())]:n instanceof ny||n instanceof iu?on(n.unwrap()):n instanceof lu?on(n._def.innerType):[];class Rd extends ke{_parse(i){const{ctx:s}=this._processInputParams(i);if(s.parsedType!==ee.object)return W(s,{code:Q.invalid_type,expected:ee.object,received:s.parsedType}),xe;const u=this.discriminator,d=s.data[u],f=this.optionsMap.get(d);return f?s.common.async?f._parseAsync({data:s.data,path:s.path,parent:s}):f._parseSync({data:s.data,path:s.path,parent:s}):(W(s,{code:Q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[u]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(i,s,u){const d=new Map;for(const f of s){const m=on(f.shape[i]);if(!m.length)throw new Error(`A discriminator value for key \`${i}\` could not be extracted from all schema options`);for(const y of m){if(d.has(y))throw new Error(`Discriminator property ${String(i)} has duplicate value ${String(y)}`);d.set(y,f)}}return new Rd({typeName:ye.ZodDiscriminatedUnion,discriminator:i,options:s,optionsMap:d,..._e(u)})}}function cd(n,i){const s=$n(n),u=$n(i);if(n===i)return{valid:!0,data:n};if(s===ee.object&&u===ee.object){const d=De.objectKeys(i),f=De.objectKeys(n).filter(y=>d.indexOf(y)!==-1),m={...n,...i};for(const y of f){const v=cd(n[y],i[y]);if(!v.valid)return{valid:!1};m[y]=v.data}return{valid:!0,data:m}}else if(s===ee.array&&u===ee.array){if(n.length!==i.length)return{valid:!1};const d=[];for(let f=0;f<n.length;f++){const m=n[f],y=i[f],v=cd(m,y);if(!v.valid)return{valid:!1};d.push(v.data)}return{valid:!0,data:d}}else return s===ee.date&&u===ee.date&&+n==+i?{valid:!0,data:n}:{valid:!1}}class Pr extends ke{_parse(i){const{status:s,ctx:u}=this._processInputParams(i),d=(f,m)=>{if(ex(f)||ex(m))return xe;const y=cd(f.value,m.value);return y.valid?((tx(f)||tx(m))&&s.dirty(),{status:s.value,value:y.data}):(W(u,{code:Q.invalid_intersection_types}),xe)};return u.common.async?Promise.all([this._def.left._parseAsync({data:u.data,path:u.path,parent:u}),this._def.right._parseAsync({data:u.data,path:u.path,parent:u})]).then(([f,m])=>d(f,m)):d(this._def.left._parseSync({data:u.data,path:u.path,parent:u}),this._def.right._parseSync({data:u.data,path:u.path,parent:u}))}}Pr.create=(n,i,s)=>new Pr({left:n,right:i,typeName:ye.ZodIntersection,..._e(s)});class ml extends ke{_parse(i){const{status:s,ctx:u}=this._processInputParams(i);if(u.parsedType!==ee.array)return W(u,{code:Q.invalid_type,expected:ee.array,received:u.parsedType}),xe;if(u.data.length<this._def.items.length)return W(u,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xe;!this._def.rest&&u.data.length>this._def.items.length&&(W(u,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());const f=[...u.data].map((m,y)=>{const v=this._def.items[y]||this._def.rest;return v?v._parse(new Va(u,m,u.path,y)):null}).filter(m=>!!m);return u.common.async?Promise.all(f).then(m=>Mt.mergeArray(s,m)):Mt.mergeArray(s,f)}get items(){return this._def.items}rest(i){return new ml({...this._def,rest:i})}}ml.create=(n,i)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ml({items:n,typeName:ye.ZodTuple,rest:null,..._e(i)})};class eu extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(i){const{status:s,ctx:u}=this._processInputParams(i);if(u.parsedType!==ee.object)return W(u,{code:Q.invalid_type,expected:ee.object,received:u.parsedType}),xe;const d=[],f=this._def.keyType,m=this._def.valueType;for(const y in u.data)d.push({key:f._parse(new Va(u,y,u.path,y)),value:m._parse(new Va(u,u.data[y],u.path,y)),alwaysSet:y in u.data});return u.common.async?Mt.mergeObjectAsync(s,d):Mt.mergeObjectSync(s,d)}get element(){return this._def.valueType}static create(i,s,u){return s instanceof ke?new eu({keyType:i,valueType:s,typeName:ye.ZodRecord,..._e(u)}):new eu({keyType:qa.create(),valueType:i,typeName:ye.ZodRecord,..._e(s)})}}class sx extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(i){const{status:s,ctx:u}=this._processInputParams(i);if(u.parsedType!==ee.map)return W(u,{code:Q.invalid_type,expected:ee.map,received:u.parsedType}),xe;const d=this._def.keyType,f=this._def.valueType,m=[...u.data.entries()].map(([y,v],g)=>({key:d._parse(new Va(u,y,u.path,[g,"key"])),value:f._parse(new Va(u,v,u.path,[g,"value"]))}));if(u.common.async){const y=new Map;return Promise.resolve().then(async()=>{for(const v of m){const g=await v.key,b=await v.value;if(g.status==="aborted"||b.status==="aborted")return xe;(g.status==="dirty"||b.status==="dirty")&&s.dirty(),y.set(g.value,b.value)}return{status:s.value,value:y}})}else{const y=new Map;for(const v of m){const g=v.key,b=v.value;if(g.status==="aborted"||b.status==="aborted")return xe;(g.status==="dirty"||b.status==="dirty")&&s.dirty(),y.set(g.value,b.value)}return{status:s.value,value:y}}}}sx.create=(n,i,s)=>new sx({valueType:i,keyType:n,typeName:ye.ZodMap,..._e(s)});class bs extends ke{_parse(i){const{status:s,ctx:u}=this._processInputParams(i);if(u.parsedType!==ee.set)return W(u,{code:Q.invalid_type,expected:ee.set,received:u.parsedType}),xe;const d=this._def;d.minSize!==null&&u.data.size<d.minSize.value&&(W(u,{code:Q.too_small,minimum:d.minSize.value,type:"set",inclusive:!0,exact:!1,message:d.minSize.message}),s.dirty()),d.maxSize!==null&&u.data.size>d.maxSize.value&&(W(u,{code:Q.too_big,maximum:d.maxSize.value,type:"set",inclusive:!0,exact:!1,message:d.maxSize.message}),s.dirty());const f=this._def.valueType;function m(v){const g=new Set;for(const b of v){if(b.status==="aborted")return xe;b.status==="dirty"&&s.dirty(),g.add(b.value)}return{status:s.value,value:g}}const y=[...u.data.values()].map((v,g)=>f._parse(new Va(u,v,u.path,g)));return u.common.async?Promise.all(y).then(v=>m(v)):m(y)}min(i,s){return new bs({...this._def,minSize:{value:i,message:se.toString(s)}})}max(i,s){return new bs({...this._def,maxSize:{value:i,message:se.toString(s)}})}size(i,s){return this.min(i,s).max(i,s)}nonempty(i){return this.min(1,i)}}bs.create=(n,i)=>new bs({valueType:n,minSize:null,maxSize:null,typeName:ye.ZodSet,..._e(i)});class od extends ke{get schema(){return this._def.getter()}_parse(i){const{ctx:s}=this._processInputParams(i);return this._def.getter()._parse({data:s.data,path:s.path,parent:s})}}od.create=(n,i)=>new od({getter:n,typeName:ye.ZodLazy,..._e(i)});class tu extends ke{_parse(i){if(i.data!==this._def.value){const s=this._getOrReturnCtx(i);return W(s,{received:s.data,code:Q.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:i.data}}get value(){return this._def.value}}tu.create=(n,i)=>new tu({value:n,typeName:ye.ZodLiteral,..._e(i)});function ay(n,i){return new pl({values:n,typeName:ye.ZodEnum,..._e(i)})}class pl extends ke{_parse(i){if(typeof i.data!="string"){const s=this._getOrReturnCtx(i),u=this._def.values;return W(s,{expected:De.joinValues(u),received:s.parsedType,code:Q.invalid_type}),xe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(i.data)){const s=this._getOrReturnCtx(i),u=this._def.values;return W(s,{received:s.data,code:Q.invalid_enum_value,options:u}),xe}return ya(i.data)}get options(){return this._def.values}get enum(){const i={};for(const s of this._def.values)i[s]=s;return i}get Values(){const i={};for(const s of this._def.values)i[s]=s;return i}get Enum(){const i={};for(const s of this._def.values)i[s]=s;return i}extract(i,s=this._def){return pl.create(i,{...this._def,...s})}exclude(i,s=this._def){return pl.create(this.options.filter(u=>!i.includes(u)),{...this._def,...s})}}pl.create=ay;class dd extends ke{_parse(i){const s=De.getValidEnumValues(this._def.values),u=this._getOrReturnCtx(i);if(u.parsedType!==ee.string&&u.parsedType!==ee.number){const d=De.objectValues(s);return W(u,{expected:De.joinValues(d),received:u.parsedType,code:Q.invalid_type}),xe}if(this._cache||(this._cache=new Set(De.getValidEnumValues(this._def.values))),!this._cache.has(i.data)){const d=De.objectValues(s);return W(u,{received:u.data,code:Q.invalid_enum_value,options:d}),xe}return ya(i.data)}get enum(){return this._def.values}}dd.create=(n,i)=>new dd({values:n,typeName:ye.ZodNativeEnum,..._e(i)});class au extends ke{unwrap(){return this._def.type}_parse(i){const{ctx:s}=this._processInputParams(i);if(s.parsedType!==ee.promise&&s.common.async===!1)return W(s,{code:Q.invalid_type,expected:ee.promise,received:s.parsedType}),xe;const u=s.parsedType===ee.promise?s.data:Promise.resolve(s.data);return ya(u.then(d=>this._def.type.parseAsync(d,{path:s.path,errorMap:s.common.contextualErrorMap})))}}au.create=(n,i)=>new au({type:n,typeName:ye.ZodPromise,..._e(i)});class xl extends ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(i){const{status:s,ctx:u}=this._processInputParams(i),d=this._def.effect||null,f={addIssue:m=>{W(u,m),m.fatal?s.abort():s.dirty()},get path(){return u.path}};if(f.addIssue=f.addIssue.bind(f),d.type==="preprocess"){const m=d.transform(u.data,f);if(u.common.async)return Promise.resolve(m).then(async y=>{if(s.value==="aborted")return xe;const v=await this._def.schema._parseAsync({data:y,path:u.path,parent:u});return v.status==="aborted"?xe:v.status==="dirty"||s.value==="dirty"?ms(v.value):v});{if(s.value==="aborted")return xe;const y=this._def.schema._parseSync({data:m,path:u.path,parent:u});return y.status==="aborted"?xe:y.status==="dirty"||s.value==="dirty"?ms(y.value):y}}if(d.type==="refinement"){const m=y=>{const v=d.refinement(y,f);if(u.common.async)return Promise.resolve(v);if(v instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return y};if(u.common.async===!1){const y=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});return y.status==="aborted"?xe:(y.status==="dirty"&&s.dirty(),m(y.value),{status:s.value,value:y.value})}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(y=>y.status==="aborted"?xe:(y.status==="dirty"&&s.dirty(),m(y.value).then(()=>({status:s.value,value:y.value}))))}if(d.type==="transform")if(u.common.async===!1){const m=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});if(!fi(m))return xe;const y=d.transform(m.value,f);if(y instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:y}}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(m=>fi(m)?Promise.resolve(d.transform(m.value,f)).then(y=>({status:s.value,value:y})):xe);De.assertNever(d)}}xl.create=(n,i,s)=>new xl({schema:n,typeName:ye.ZodEffects,effect:i,..._e(s)});xl.createWithPreprocess=(n,i,s)=>new xl({schema:i,effect:{type:"preprocess",transform:n},typeName:ye.ZodEffects,..._e(s)});class dn extends ke{_parse(i){return this._getType(i)===ee.undefined?ya(void 0):this._def.innerType._parse(i)}unwrap(){return this._def.innerType}}dn.create=(n,i)=>new dn({innerType:n,typeName:ye.ZodOptional,..._e(i)});class yl extends ke{_parse(i){return this._getType(i)===ee.null?ya(null):this._def.innerType._parse(i)}unwrap(){return this._def.innerType}}yl.create=(n,i)=>new yl({innerType:n,typeName:ye.ZodNullable,..._e(i)});class nu extends ke{_parse(i){const{ctx:s}=this._processInputParams(i);let u=s.data;return s.parsedType===ee.undefined&&(u=this._def.defaultValue()),this._def.innerType._parse({data:u,path:s.path,parent:s})}removeDefault(){return this._def.innerType}}nu.create=(n,i)=>new nu({innerType:n,typeName:ye.ZodDefault,defaultValue:typeof i.default=="function"?i.default:()=>i.default,..._e(i)});class lu extends ke{_parse(i){const{ctx:s}=this._processInputParams(i),u={...s,common:{...s.common,issues:[]}},d=this._def.innerType._parse({data:u.data,path:u.path,parent:{...u}});return Ir(d)?d.then(f=>({status:"valid",value:f.status==="valid"?f.value:this._def.catchValue({get error(){return new hn(u.common.issues)},input:u.data})})):{status:"valid",value:d.status==="valid"?d.value:this._def.catchValue({get error(){return new hn(u.common.issues)},input:u.data})}}removeCatch(){return this._def.innerType}}lu.create=(n,i)=>new lu({innerType:n,typeName:ye.ZodCatch,catchValue:typeof i.catch=="function"?i.catch:()=>i.catch,..._e(i)});class rx extends ke{_parse(i){if(this._getType(i)!==ee.nan){const u=this._getOrReturnCtx(i);return W(u,{code:Q.invalid_type,expected:ee.nan,received:u.parsedType}),xe}return{status:"valid",value:i.data}}}rx.create=n=>new rx({typeName:ye.ZodNaN,..._e(n)});class ny extends ke{_parse(i){const{ctx:s}=this._processInputParams(i),u=s.data;return this._def.type._parse({data:u,path:s.path,parent:s})}unwrap(){return this._def.type}}class kd extends ke{_parse(i){const{status:s,ctx:u}=this._processInputParams(i);if(u.common.async)return(async()=>{const f=await this._def.in._parseAsync({data:u.data,path:u.path,parent:u});return f.status==="aborted"?xe:f.status==="dirty"?(s.dirty(),ms(f.value)):this._def.out._parseAsync({data:f.value,path:u.path,parent:u})})();{const d=this._def.in._parseSync({data:u.data,path:u.path,parent:u});return d.status==="aborted"?xe:d.status==="dirty"?(s.dirty(),{status:"dirty",value:d.value}):this._def.out._parseSync({data:d.value,path:u.path,parent:u})}}static create(i,s){return new kd({in:i,out:s,typeName:ye.ZodPipeline})}}class iu extends ke{_parse(i){const s=this._def.innerType._parse(i),u=d=>(fi(d)&&(d.value=Object.freeze(d.value)),d);return Ir(s)?s.then(d=>u(d)):u(s)}unwrap(){return this._def.innerType}}iu.create=(n,i)=>new iu({innerType:n,typeName:ye.ZodReadonly,..._e(i)});var ye;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(ye||(ye={}));const p=qa.create,E=fl.create;hl.create;const Qe=Fr.create;hi.create;const ly=ud.create;Zn.create;const ae=$a.create,$=pt.create,f1=Wr.create,iy=Rd.create;Pr.create;ml.create;const ws=eu.create,Ca=tu.create,me=pl.create;au.create;dn.create;yl.create;const ux={string:(n=>qa.create({...n,coerce:!0})),number:(n=>fl.create({...n,coerce:!0})),boolean:(n=>Fr.create({...n,coerce:!0})),bigint:(n=>hl.create({...n,coerce:!0})),date:(n=>hi.create({...n,coerce:!0}))},h1=xe,m1=p().regex(/^github\.com\/[^/]+\/[^/]+$/,"Expected github.com/<owner>/<repo>"),p1=/^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?$/;function x1(n){const i=n.trim();return i?!!(i.startsWith("/")||i.startsWith("~")||i.startsWith(".")||/^[A-Za-z]:[\\/]/.test(i)||i.startsWith("\\\\")):!1}function Od(n){const i=n.trim();if(!i)throw new Error("Repository is required");if(x1(i))throw new Error("Local filesystem paths are no longer accepted. Pass a GitHub URL or owner/repo (e.g. https://github.com/acme/app or acme/app).");let s,u;const d=p1.exec(i);if(d&&!i.includes("://")&&!i.toLowerCase().includes("github.com"))s=d[1],u=d[2];else{let m=i;/^[a-z][a-z0-9+.-]*:\/\//i.test(m)||(m.startsWith("git@")?m=m.replace(/^git@([^:]+):/,"https://$1/"):m=`https://${m}`);let y;try{y=new URL(m)}catch{throw new Error(`Unrecognized GitHub repository reference: ${n}`)}if(!/^([^.]+\.)?github\.com$/i.test(y.hostname))throw new Error(`Only github.com repositories are supported (got host ${y.hostname})`);const v=y.pathname.replace(/^\/+|\/+$/g,"").split("/");if(v.length<2||!v[0]||!v[1])throw new Error(`Unrecognized GitHub repository reference: ${n}`);s=v[0],u=v[1].replace(/\.git$/i,"")}if(!s||!u||s.includes("..")||u.includes(".."))throw new Error(`Unrecognized GitHub repository reference: ${n}`);const f=m1.parse(`github.com/${s}/${u}`);return{owner:s,repo:u,identity:f,cloneUrl:`https://github.com/${s}/${u}.git`}}const sy=p().min(1).transform((n,i)=>{try{return Od(n).identity}catch(s){return i.addIssue({code:Q.custom,message:s.message}),h1}}),ry="repo:",y1=me(["resolved","unresolved","conflict","invalid"]),v1=$({status:y1,repository:p().optional(),sourceLabel:p().optional(),labels:ae(p()).optional(),error:p().optional()});function g1(n){return n?n.filter(i=>i.toLowerCase().startsWith(ry)):[]}function uy(n){const i=g1(n);if(i.length===0)return{status:"unresolved",labels:[]};if(i.length>1)return{status:"conflict",labels:[...i]};const s=i[0],u=s.slice(ry.length).trim();if(!u)return{status:"invalid",labels:[s],error:"Repository label has no value"};try{return{status:"resolved",repository:Od(u).identity,sourceLabel:s,labels:[s]}}catch(d){return{status:"invalid",labels:[s],error:d.message}}}const Zt=me(["claude_code","cursor_local","codex_local","muse_code"]),ka=$({maxTurns:E().positive().nullable().optional(),maxBudgetUsd:E().positive().nullable().optional()}),cy=$({plan:ka.optional(),execute:ka.optional(),reflect:ka.optional()});function Kr(n){if(!(n!=null&&n.trim()))return null;try{const i=ka.parse(JSON.parse(n));return i.maxTurns==null&&i.maxBudgetUsd==null?null:i}catch{return null}}function b1(n){return!n||n.maxTurns==null&&n.maxBudgetUsd==null?null:JSON.stringify(n)}const Md=me(["developer","reviewer","legacy"]),w1=me(["queued","running","done","failed","timed_out","cancelled"]);$({id:p().uuid(),issueId:p().uuid(),role:Md,round:E().int().min(1),agentId:p().uuid().nullable(),runtime:Zt.nullable(),model:p().nullable(),budgetJson:p().nullable(),worktreePath:p().nullable(),inputSha:p().nullable(),status:w1,sessionRef:p().nullable(),logPath:p().nullable(),exitCode:E().int().nullable(),errorJson:p().nullable(),metadataJson:p().nullable(),profileSnapshotJson:p().nullable(),processPid:E().int().nullable(),processOwner:p().nullable(),processStartedAt:p().nullable(),createdAt:p(),startedAt:p().nullable(),heartbeatAt:p().nullable(),completedAt:p().nullable(),updatedAt:p()});$({issueId:p().uuid(),role:Md,round:E().int().min(1),agentId:p().uuid().nullable(),runtime:Zt.nullable(),model:p().nullable().optional(),budgetJson:p().nullable().optional(),inputSha:p().nullable().optional(),metadataJson:p().nullable().optional(),profileSnapshotJson:p().nullable().optional()});const S1=$({worktreeWrite:Qe(),publishReview:Qe(),outboundMutation:Qe(),resolveHumanAction:Qe()}),oy=$({worktreeWrite:Qe().optional(),outboundMutation:Qe().optional()}).strict(),hu=me(["low","medium","high"]);$({version:Ca(1),agentId:p().nullable(),role:Md,runtime:Zt.nullable(),model:p().nullable(),effort:hu.nullable().default(null),budgetJson:p().nullable(),permissionPolicy:S1,deckId:p().nullable(),purpose:p().nullable(),capturedAt:p()});const dy="auto",_1="muse-spark-1.3-contributor",j1=$({code:me(["cli_missing","runtime_auth","runtime_unknown","cursor_keychain","usage_capped","deck_offline","deck_unauthorized","workspace_missing","deck_missing","mcp_not_registered","github_cli_missing","github_auth","github_unreachable"]),message:p()}),N1=$({id:p().uuid(),name:p(),runtime:Zt,workspaceRoot:p().nullable(),deckId:p().uuid().nullable(),deckName:p().nullable(),playbookId:p().nullable(),defaultPlanModel:p().nullable(),defaultExecuteModel:p().nullable(),defaultPlanBudgetJson:p().nullable(),defaultExecuteBudgetJson:p().nullable(),defaultModel:p().nullable(),defaultEffort:hu.nullable(),defaultBudgetJson:p().nullable(),purpose:p().nullable(),playbookIdsJson:p().nullable(),externalMemoryRefsJson:p().nullable(),permissionPolicyJson:p().nullable(),isBuiltin:Qe(),createdAt:p(),updatedAt:p()}),fy=N1.extend({healthy:Qe(),issues:ae(j1)});$({name:p().min(1),runtime:Zt,deckId:p().uuid(),defaultModel:p().nullable().optional(),defaultEffort:hu.nullable().optional(),defaultBudget:ka.nullable().optional(),purpose:p().nullable().optional(),permissionPolicy:oy.nullable().optional()});$({name:p().min(1).optional(),runtime:Zt.optional(),deckId:p().uuid().nullable().optional(),defaultModel:p().nullable().optional(),defaultEffort:hu.nullable().optional(),defaultBudget:ka.nullable().optional(),purpose:p().nullable().optional(),permissionPolicy:oy.nullable().optional()});$({agents:ae(fy),issueCount:E()});function cx(n){return n.defaultModel??n.defaultExecuteModel??n.defaultPlanModel??null}function A1(n){const i=Kr(n.defaultBudgetJson)??Kr(n.defaultExecuteBudgetJson)??Kr(n.defaultPlanBudgetJson);return b1(i)}const E1=me(["slack_message","email","service_tool_call"]),T1=$({target:p().min(1).max(120),body:p().min(1).max(4e3)}),C1=$({serviceName:p().min(1).max(120),toolName:p().min(1).max(120),arguments:ws(ly())}),R1=$({actionType:E1,summary:T1,toolCall:C1}),k1=me(["pending","sent","rejected"]);$({draft:R1,status:k1,sentAt:p().optional(),rejectedAt:p().optional(),bodyMismatch:Qe().optional(),deliveryAttempts:E().int().min(0).default(0)});$({draftArtifactId:p().uuid(),sentAt:p(),toolResult:ws(ly()),permalink:p().url().optional()});const O1=$({failure_summary:p().min(1),user_feedback_excerpt:p().min(1),corrected_output_hint:p().optional()}),M1=iy("op",[$({op:Ca("add_item"),section:p().min(1),text:p().min(1)}),$({op:Ca("amend_item"),section:p().min(1),anchor:p().min(1),text:p().min(1)}),$({op:Ca("remove_item"),section:p().min(1),anchor:p().min(1)}),$({op:Ca("set_triggers"),triggers:ae(p())}),$({op:Ca("rewrite_body"),text:p()})]);$({rationale:p().min(1),ops:ae(M1).min(1),evidence:O1.optional()});const D1=me(["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"]),L1=me(["human","developer","reviewer","system"]),hy=me(["manual","linear","agent"]),U1=$({id:p().uuid(),source:hy,externalId:p().nullable(),externalLabel:p().nullable(),externalUrl:p().nullable(),title:p(),description:p().nullable(),acceptanceCriteria:p().nullable(),repo:p(),baseBranch:p(),status:D1,currentOwner:L1,currentIntent:p().nullable(),developerAgentId:p().uuid().nullable(),reviewerAgentId:p().uuid().nullable(),maxReviewRounds:E().int().min(1),currentRound:E().int().min(1),maxInfraAttempts:E().int().min(0),infraAttempts:E().int().min(0),branch:p().nullable(),baseSha:p().nullable(),headSha:p().nullable(),prNumber:E().int().nullable(),prUrl:p().nullable(),autoMerge:Qe(),createdAt:p(),updatedAt:p()});$({title:p().min(1),description:p().optional(),acceptanceCriteria:p().optional(),repo:sy,baseBranch:p().min(1).default("main"),developerAgentId:p().uuid(),reviewerAgentId:p().uuid(),maxReviewRounds:E().int().min(1).default(3),maxInfraAttempts:E().int().min(0).default(3),autoMerge:Qe().default(!1),source:hy.default("manual"),externalId:p().optional(),externalLabel:p().optional(),externalUrl:p().optional(),enqueue:Qe().default(!0)});$({title:p().min(1).optional(),description:p().nullable().optional(),acceptanceCriteria:p().nullable().optional(),repo:sy.optional(),baseBranch:p().min(1).optional(),developerAgentId:p().uuid().optional(),reviewerAgentId:p().uuid().optional(),maxReviewRounds:E().int().min(1).optional(),maxInfraAttempts:E().int().min(0).optional(),autoMerge:Qe().optional()});const ox={ready:["developing","closed"],developing:["developing","reviewing","needs_human","closed"],reviewing:["reviewing","repairing","final_review","needs_human","closed"],repairing:["repairing","reviewing","needs_human","closed"],needs_human:["developing","reviewing","repairing","final_review","done","closed"],final_review:["final_review","done","repairing","needs_human","closed"],done:[],closed:[]};Object.keys(ox).filter(n=>ox[n].length===0);const z1=me(["enqueued","already_queued","not_queued"]);U1.extend({created:Qe(),queue:z1,priorPasses:E().int().min(0)});$({id:p(),issueId:p().nullable(),workerSessionId:p().nullable(),kind:p(),contentJson:p().nullable(),blobPath:p().nullable(),author:me(["human","agent","system"]),createdAt:p()});const B1=me(["authentication_configuration","provider_capacity_rate_limit","agent_cli_crash","tool_test_timeout","coordinator_crash","validation_failure","publish_git_failure","agent_deck_unavailable","host_sleep_liveness","unknown"]),q1=me(["task","infrastructure","unknown"]),H1=me(["high","medium","low"]),$1=me(["outcome_kind","session_error","spawn_log","workflow_event","recovery"]),V1=me(["exact","inferred"]),fd=$({code:B1,domain:q1,primary:Qe(),confidence:H1,evidenceSource:$1,occurredAt:p().nullable(),eventCursor:E().int().nullable(),rawReason:p(),sessionId:p().nullable(),logPath:p().nullable(),eventId:p().nullable(),eventType:p().nullable(),quality:V1}),Y1=me(["commit","verification_receipt","branch_pushed"]),Z1=me(["sampler","salvage","session_end"]),Dd=me(["worktree","commit","verification_receipt","publish_only"]);$({kind:Y1,observedSha:p().nullable(),observedAt:p(),origin:Z1.nullable(),inputSha:p().nullable(),samplingPrecisionMs:E().int().nullable(),branch:p().nullable()});$({kinds:ae(Dd),retryReason:p().nullable()});const G1=me(["done","closed","migrated"]);$({id:p().uuid(),issueId:p().uuid(),workflowVersion:p(),startedAt:p(),completedAt:p().nullable(),outcome:G1.nullable()});const Q1=me(["issue.created","issue.reassigned","workflow.started","worker.started","worker.completed","worker.failed","worker.deferred","worktree.ready","deck.connected","brief.resolved","branch.pushed","checks.started","pull_request.opened","pull_request.updated","checks.completed","review.submitted","repair.started","guidance.added","task_snapshot.refreshed","human_action.requested","human_action.resolved","final_review.requested","issue.completed","issue.closed","queue.enqueued","queue.wait_reason_changed","queue.admitted","queue.removed","agent.started","agent.completed","host.suspended","checkpoint.observed","retry.reused","legacy.imported"]);$({id:p().uuid(),issueId:p().uuid(),workflowInstanceId:p().uuid().nullable(),workerSessionId:p().uuid().nullable(),type:Q1,actorType:me(["human","developer","reviewer","system"]),actorRef:p().nullable(),stage:p(),round:E().int().nullable(),payloadJson:p().nullable(),artifactRef:p().nullable(),idempotencyKey:p().nullable(),causationEventId:p().uuid().nullable(),ts:p()});const X1=me(["product_scope_decision","policy_escalation","attempts_exhausted","final_review","deck_interaction_required","reflection_interaction_required","outbound_delivery_interaction_required"]),K1=me(["open","resolved"]);$({id:p().uuid(),issueId:p().uuid().nullable(),runId:p().uuid().nullable(),workflowInstanceId:p().uuid().nullable(),actionType:X1,reason:p(),question:p(),evidenceJson:p().nullable(),responseOptionsJson:p().nullable(),continuationPreviewJson:p().nullable(),requestId:p().nullable(),status:K1,resolutionJson:p().nullable(),resolvedBy:p().nullable(),requestedAt:p(),resolvedAt:p().nullable()});const J1=me(["blocking","non_blocking"]),I1=me(["open","resolved","recurring","superseded"]);$({id:p().uuid(),issueId:p().uuid(),fingerprint:p(),severity:J1,title:p(),rationale:p(),evidenceRef:p().nullable(),file:p().nullable(),line:E().int().nullable(),status:I1,firstRound:E().int().min(1),lastRound:E().int().min(1)});$({id:p().uuid(),issueId:p().uuid(),workerSessionId:p().uuid(),role:me(["developer","reviewer","legacy"]),runtime:p().nullable(),tokensIn:E().int().nullable(),tokensOut:E().int().nullable(),costUsd:E().nullable(),durationMs:E().int().nullable(),ts:p(),model:p().nullable().optional()});const F1=$({available:Ca(!0)}),W1=$({available:Ca(!1),until:p(),reason:p()});iy("available",[F1,W1]);const my=me(["supported_protocol","observed_event","experimental_api","unavailable"]),Ld=me(["unsupported","missing","expired","unparsable","stale"]),P1=$({windowKey:p().min(1),providerBucket:p().min(1),durationMinutes:E().int().positive().nullable(),displayLabel:p().min(1),usedValue:E().nullable(),usedUnit:p().nullable(),remainingPercent:E().min(0).max(100).nullable(),resetAt:p().nullable(),observedAt:p(),freshUntil:p().nullable(),expiresAt:p().nullable(),source:my,unavailableReason:Ld.nullable()}),ew=$({runtime:Zt,windows:ae(P1),unavailableReason:Ld.nullable()});$({runtimes:ae(ew),generatedAt:p()});$({configured:Qe(),cycleStart:p().nullable(),cycleEnd:p().nullable(),spendValue:E().nullable(),spendUnit:p().nullable(),hardLimitValue:E().nullable(),hardLimitUnit:p().nullable(),memberCount:E().nullable(),memberLimitOverrideCount:E().nullable(),usagePeriodStart:p().nullable(),usagePeriodEnd:p().nullable(),usageSpendValue:E().nullable(),usageSpendUnit:p().nullable(),source:my,unavailableReason:Ld.nullable(),observedAt:p().nullable(),generatedAt:p()});const tw=me(["queued","admitted","removed"]),aw=$({id:p().uuid(),issueId:p().uuid(),position:E().int(),enqueuedAt:p(),state:tw,waitReason:p().nullable(),waitReasonAt:p().nullable()});aw.extend({title:p().optional(),issueStatus:p().optional()});$({issueId:p().uuid()});const nw=f1([Ca("top"),Ca("bottom"),$({before:p().uuid()}).strict(),$({after:p().uuid()}).strict()]);$({to:nw});const lw=2;$({maxActiveIssues:E().int().min(1).max(lw)});$({active:E().int().min(0),waiting:E().int().min(0),limit:E().int().min(0),maxActiveIssues:E().int().min(1),ceiling:E().int().min(0),options:ae(E().int().min(1)),overCap:Qe()});const Wt=me(["exact","inferred","unavailable"]),mu=$({quality:Wt,reasons:ae(p())}),py=me(["queue_wait","coordinator_setup","agent_process","coordinator_validation_publish","coordinator_work"]),gs=$({phase:py,startMs:E().int().nullable(),endMs:E().int().nullable(),durationMs:E().int().nullable(),quality:Wt,reasons:ae(p()),sessionId:p().nullable(),startCursor:E().int().nullable(),endCursor:E().int().nullable()}),iw=mu.extend({phase:py,durationMs:E().int().nullable(),rawCount:E().int(),known:E().int(),total:E().int()}),xy=$({kind:me(["admission_dependency_wait","runtime_health_preflight","unexplained_silence","human_wait"]),startMs:E().int().nullable(),endMs:E().int().nullable(),durationMs:E().int().nullable(),quality:Wt,reasons:ae(p()),category:p().nullable(),sessionId:p().nullable()}),Yt=mu.extend({value:E().nullable(),known:E().int(),total:E().int()}),Ha=mu.extend({p50:E().nullable(),p95:E().nullable(),n:E().int()}),sw=$({sessionId:p(),role:p(),runtime:p().nullable(),model:p().nullable(),status:p(),round:E().int(),publishOnly:Qe(),setup:gs,agentProcess:gs,validationPublish:gs,spawnEnvelopeMs:E().int().nullable(),spawnEnvelopeQuality:Wt,spawnEnvelopeReasons:ae(p()),failureCauses:ae(fd),reuseKinds:ae(Dd).optional(),silence:ae(xy),silenceQuality:Wt,silenceReasons:ae(p()),tokensIn:E().int().nullable(),tokensOut:E().int().nullable(),costUsd:E().nullable(),usageDurationMs:E().int().nullable(),usageQuality:Wt,usageReasons:ae(p())}),rw=$({kind:p().nullable(),observedSha:p().nullable(),msSinceWorkflowStart:E().int().nullable(),quality:Wt,reasons:ae(p())}),uw=$({attempts:E().int(),retries:E().int(),cold:E().int(),reused:E().int(),unknown:E().int(),publishOnly:E().int(),reuseRate:E().nullable(),preservedKinds:ae(Dd).optional(),quality:Wt,reasons:ae(p())}),cw=$({rounds:E().int(),verdicts:E().int(),changeRequests:E().int(),changeRequestRate:E().nullable(),quality:Wt,reasons:ae(p())});$({issueId:p(),elapsed:gs,rawIntervals:ae(gs),unionedDurations:ae(iw),exclusiveTotalMs:E().int().nullable(),exclusiveTotalQuality:Wt,exclusiveTotalReasons:ae(p()),nested:ae(xy),attempts:ae(sw),primaryFailure:fd.nullable(),primaryFailureQuality:Wt,primaryFailureReasons:ae(p()),consequenceCauses:ae(fd),waste:$({failedAttempts:E().int(),publishOnlyAttempts:E().int(),runtimeMs:Yt,tokensIn:Yt,tokensOut:Yt,costUsd:Yt}),firstCheckpoint:rw,retry:uw,reviewer:cw,humanWaitMs:E().int().nullable(),humanWaitQuality:Wt,humanWaitReasons:ae(p()),interventionCount:E().int(),coverage:$({duration:Yt,tokens:Yt,cost:Yt})});$({from:p().nullable().default(null),to:p().nullable().default(null),role:p().nullable().default(null),runtime:p().nullable().default(null),model:p().nullable().default(null),status:p().nullable().default(null),repo:p().nullable().default(null),limit:E().int().min(1).max(200).default(50),offset:E().int().min(0).default(0)});const $o=mu.extend({numerator:E().int(),denominator:E().int(),rate:E().nullable()}),Vo=$({key:p(),attempts:E().int(),successes:E().int(),successRate:E().nullable(),retries:E().int(),retryRate:E().nullable(),wallTimeMs:Ha});$({window:$({from:p(),to:p(),defaultApplied:Qe()}),pagination:$({limit:E().int(),offset:E().int(),totalIssues:E().int()}),issueIds:ae(p()),phaseWallTime:ws(p(),Ha),attemptSuccess:$o,issueSuccess:$o,primaryFailures:ae($({code:p(),count:E().int(),rate:E().nullable()})),primaryFailureDenominator:E().int(),waste:$({failedAttempts:E().int(),runtimeMs:Yt,tokensIn:Yt,tokensOut:Yt,costUsd:Yt}),checkpointLatencyMs:Ha,retryReuse:$o,reviewer:$({rounds:E().int(),verdicts:E().int(),changeRequests:E().int(),changeRequestRate:E().nullable(),quality:Wt,reasons:ae(p())}),humanInterventions:$({totalActions:E().int(),issuesWithIntervention:E().int(),humanWaitMs:Ha}),byRole:ae(Vo),byRuntime:ae(Vo),byModel:ae(Vo),coverage:$({duration:Yt,tokens:Yt,cost:Yt})});const ow=100,yy=25,vy=5,dw=me(["developer","reviewer","legacy"]),fw=me(["authentication_configuration","provider_capacity_rate_limit","agent_cli_crash","tool_test_timeout","coordinator_crash","validation_failure","publish_git_failure","agent_deck_unavailable","host_sleep_liveness","unknown"]),hw=me(["task","infrastructure","unknown"]);$({from:p().optional(),to:p().optional(),repo:p().optional(),role:dw.optional(),runtime:p().optional(),model:p().optional(),status:p().optional(),page:ux.number().int().min(1).default(1),limit:ux.number().int().min(1).max(ow).default(yy)});const gy=me(["exact","inferred","unavailable"]),da=$({sum:E().nullable(),known:E().int().min(0),total:E().int().min(0),quality:gy,reasons:ae(p())}),Yo=$({key:p(),issues:E().int().min(0),attempts:E().int().min(0),issueSuccess:E().nullable(),issueSuccessDenominator:E().int().min(0),attemptSuccess:E().nullable(),attemptSuccessDenominator:E().int().min(0),sessionWallMs:Ha,spawnEnvelopeMs:Ha,retryRate:E().nullable(),tokensIn:da,tokensOut:da,costUsd:da,durationMs:da,failedDurationMs:da,failedTokensIn:da,failedTokensOut:da,failedCostUsd:da}),mw=$({code:fw,domain:hw,count:E().int().min(0),share:E().nullable(),issueIds:ae(p()),issueTotal:E().int().min(0)}),pw=$({id:p(),title:p(),status:p(),repo:p(),attempts:E().int().min(0),updatedAt:p()}),xw=$({window:$({from:p(),to:p()}),filters:$({repo:p().nullable(),role:p().nullable(),runtime:p().nullable(),model:p().nullable(),status:ae(p())}),summary:$({issues:E().int().min(0),closedIssues:E().int().min(0),issueSuccess:E().nullable(),attempts:E().int().min(0),terminalAttempts:E().int().min(0),attemptSuccess:E().nullable(),retryRate:E().nullable(),retryExtraAttempts:E().int().min(0),reuseRate:E().nullable(),reuseDenominator:E().int().min(0),humanWaitMs:E().int().min(0),humanWaitQuality:gy,interventions:E().int().min(0),avgReviewerRounds:E().nullable(),reviewedIssues:E().int().min(0),changeRequestRate:E().nullable(),sessionWallMs:Ha,spawnEnvelopeMs:Ha,checkpointMs:Ha,phaseWallMs:ae($({phase:p(),stat:Ha})),failedDurationMs:da,failedTokensIn:da,failedTokensOut:da,failedCostUsd:da}),byRole:ae(Yo),byRuntime:ae(Yo),byModel:ae(Yo),failures:ae(mw),issues:ae(pw),pagination:$({page:E().int().min(1),limit:E().int().min(1),total:E().int().min(0),totalPages:E().int().min(0)}),meta:$({generatedAt:p(),partial:Qe(),partialReasons:ae(p())})});function by(n){const i=new URLSearchParams;for(const[s,u]of Object.entries(n)){if(u==null)continue;const d=String(u).trim();d&&(s==="page"&&d==="1"||s==="limit"&&d===String(yy)||i.set(s,d))}return i.sort(),i.toString()}function Hn(n,i){return n.sum===null||n.known===0?"Unavailable":n.known<n.total?`${i(n.sum)} (${n.known}/${n.total} known)`:i(n.sum)}function wy(n){return n<vy?`n=${n} (sparse)`:`n=${n}`}function hd(n){return n<vy}function dx(n,i){if(n.n===0||n.p50===null&&n.p95===null)return"Unavailable";const s=u=>u===null?"–":i(u);return`P50 ${s(n.p50)} · P95 ${s(n.p95)} (${wy(n.n)})`}function ps(n){return`$${n.toFixed(2)}`}function Ge(n){return n.toLocaleString("en-US")}function yw(n){if(!Number.isFinite(n))return Ge(n);const i=Math.abs(n);if(i<1e3)return Ge(n);const s=u=>u>=100?String(Math.round(u)):u.toFixed(1).replace(/\.0$/,"");return i<1e6?`${s(n/1e3)}K`:`${s(n/1e6)}M`}function Vt(n){if(n<1e3)return`${Math.round(n)} ms`;const i=n/1e3;if(i<60)return`${i.toFixed(1)} s`;const s=Math.floor(i/60),u=Math.round(i%60);return s<60?`${s}m ${u}s`:`${Math.floor(s/60)}h ${s%60}m`}function pu(n){return n===null||!Number.isFinite(n)?"Unavailable":`${(n*100).toFixed(1)}%`}const vw=me(["queued","plan_pending","plan_approved","running","review","done","failed","cancelled"]),Sy=me(["code","communication","email","research","content","other"]),gw=me(["task_snapshot","draft_plan","approved_plan","plan_triage","plan_answers","acceptance_criteria","transcript","stream_trace","usage","agent_session","execution_result","diff","pr","email_draft","slack_draft","service_draft","document","research_brief","deliverable","feedback","playbook_patch","reflect_status","linear_sync","send_receipt","result_qa"]),xu=me(["plan","execute","reflect","qa"]),_y=me(["retry","approve"]);$({patchId:p(),playbookId:p().optional(),playbookTitle:p().optional(),rationale:p().optional(),status:Ca("proposed"),trigger:_y,dashboardUrl:p().optional()});$({status:me(["pending","completed","failed","skipped"]),trigger:_y,error:p().optional()});const bw=$({type:me(["system","human","context","thinking","assistant","tool","rate_limit","result"]),text:p(),toolName:p().optional()});$({phase:xu,runtime:Zt,entries:ae(bw)});const ww=$({phase:xu,runtime:Zt,totalCostUsd:E().optional(),inputTokens:E().optional(),outputTokens:E().optional(),cacheReadTokens:E().optional(),cacheWriteTokens:E().optional(),durationMs:E().optional(),model:p().optional(),numTurns:E().optional(),maxTurns:E().optional(),maxBudgetUsd:E().optional()}),Sw=$({label:p(),usage:ww,maxTurns:E().optional(),maxBudgetUsd:E().optional()});$({lines:ae(Sw),total:$({totalCostUsd:E(),inputTokens:E(),outputTokens:E(),durationMs:E(),numTurns:E()})});$({phase:xu,runtime:Zt,sessionId:p()});$({phase:xu,exitCode:E(),resultText:p().optional(),isError:Qe().optional(),blocker:$({summary:p().optional()}).optional()});$({path:p(),title:p(),markdown:p()});$({markdown:p(),sessionId:p().optional()});const _w=me(["manual","linear"]);$({id:p(),title:p(),description:p().optional(),url:p().optional()});const cn=$({id:p().uuid(),source:_w,externalId:p().nullable(),externalLabel:p().nullable(),taskCategory:Sy,title:p(),description:p().nullable(),repo:p().nullable(),artifactWorkspace:p().nullable(),agentId:p().uuid().nullable(),agentName:p().nullable(),deckId:p().nullable(),deckName:p().nullable(),playbookId:p().nullable(),runtime:Zt.nullable(),planModel:p().nullable(),executeModel:p().nullable(),status:vw,lineageId:p().uuid().nullable(),acceptanceCriteria:p().nullable(),approvalGatesJson:p().nullable(),budgetJson:p().nullable(),createdAt:p(),updatedAt:p()});$({id:p().uuid(),runId:p().uuid(),kind:gw,contentJson:p().nullable(),blobPath:p().nullable(),author:me(["human","agent","system"]),createdAt:p()});$({id:p().uuid(),runId:p().uuid(),type:p(),payloadJson:p().nullable(),ts:p()});$({title:p().min(1),description:p().optional(),taskCategory:Sy.default("other"),repo:p().optional(),artifactWorkspace:p().optional(),acceptanceCriteria:p().optional(),status:me(["queued","plan_pending","plan_approved"]).default("plan_pending"),agentId:p().uuid(),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),budget:cy.optional()});$({runtime:Zt,deckId:p().uuid().optional(),playbookId:p().optional(),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),budget:cy.optional()});$({planMarkdown:p(),approve:Qe().default(!1),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),planBudget:ka.nullable().optional(),executeBudget:ka.nullable().optional()});$({runtime:Zt.optional(),deckId:p().uuid().optional(),playbookId:p().optional(),executeModel:p().nullable().optional(),executeBudget:ka.nullable().optional()});$({feedback:p().min(1),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),executeBudget:ka.nullable().optional()});$({outboundBody:p().min(1).max(4e3).optional()});$({id:p(),identifier:p(),title:p(),description:p().optional(),url:p(),state:p().optional(),labels:ae(p()).optional(),teamId:p().optional(),repoResolution:v1.optional()});$({stateFilter:ae(p()),teamId:p().nullable(),assigneeMe:Qe(),syncEnabled:Qe()});$({host:p(),port:E().int().min(1).max(65535),envOverride:Qe()});const jw=me(["UNAUTHORIZED","DECK_UNAVAILABLE"]);$({connected:Qe(),apiUrl:p(),mcpUrl:p(),deckCount:E().optional(),envOverride:Qe(),error:p().optional(),deckAccessError:jw.optional(),deckAccessErrorMessage:p().optional()});$({agentId:p().uuid().optional(),autoAgent:Qe().optional(),planModel:p().nullable().optional()}).refine(n=>n.agentId!==void 0||n.autoAgent===!0,{message:"Provide agentId or autoAgent: true"});$({planModel:p().nullable().optional(),planBudget:ka.nullable().optional(),feedback:p().optional(),editedMarkdown:p().optional()});const Nw=$({id:p(),label:p()});$({runtime:Zt,models:ae(Nw),source:me(["live","fallback"])});$({planReviewCount:E(),resultReviewCount:E(),maxConcurrent:E(),planningActiveRuns:ae(cn),planningQueuedRuns:ae(cn),runningRuns:ae(cn),waitingExecution:ae(cn),resultReviewRuns:ae(cn),recentDone:ae(cn),awaitingPlanReview:ae(cn),awaitingAnswerRuns:ae(cn),openQuestionCounts:ws(p(),E()),pendingSendCounts:ws(p(),E()),sentRunIds:ae(p()).optional(),autoApprovedRunIds:ae(p()),runs:ae(cn),agentDeckOnline:Qe(),agents:ae(fy),agentIssueCount:E()});const jy=new Map,Zo=new Map;function md(n){return jy.get(n)??null}function Aw(n,i){i.models.length!==0&&jy.set(n,i)}function Ew(n,i){const s=md(n);if(s)return Promise.resolve(s);const u=Zo.get(n);if(u)return u;const d=i().then(f=>(Aw(n,f),f)).finally(()=>Zo.delete(n));return Zo.set(n,d),d}const Le="";async function rt(n){const i=await n.text();try{const s=JSON.parse(i),u=s.error??s.message;if(typeof u=="string"&&u.trim())return u.replace(/^Error:\s*/i,"")}catch{}return i}async function Tw(){const n=await fetch(`${Le}/api/intake/linear`);if(!n.ok)throw new Error(await n.text());return(await n.json()).candidates??[]}async function Cw(n){const i=await fetch(`${Le}/api/intake/linear/lookup?q=${encodeURIComponent(n)}`),s=await i.json().catch(()=>({}));if(!i.ok)throw new Error(s.error??`Lookup failed (${i.status})`);if(!s.candidate)throw new Error("Linear issue not found");return s.candidate}async function Rw(){const n=await fetch(`${Le}/api/agents`);if(!n.ok)throw new Error("Failed to fetch agents");return n.json()}async function kw(n){const i=await fetch(`${Le}/api/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw new Error(await i.text());return i.json()}async function Ow(n,i){const s=await fetch(`${Le}/api/agents/${n}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(await s.text());return s.json()}async function Mw(n){const i=await fetch(`${Le}/api/agents/${n}`,{method:"DELETE"});if(!i.ok)throw new Error(await i.text())}async function Dw(n,i){return Ew(n,async()=>{const u=await fetch(`${Le}/api/runtimes/${n}/models`);if(!u.ok)throw new Error(await u.text());return u.json()})}async function Lw(){const n=await fetch(`${Le}/api/runtime-capacity`);if(!n.ok)throw new Error(await n.text());return n.json()}async function Uw(){const n=await fetch(`${Le}/api/cursor-team-billing`);if(!n.ok)throw new Error(await n.text());return n.json()}async function Ny(){const n=await fetch(`${Le}/api/agent-deck/status`);if(!n.ok)throw new Error(await n.text());return n.json()}async function zw(){try{const n=await fetch(`${Le}/api/agent-deck/decks`),i=await n.json().catch(()=>null);return n.ok?{ok:!0,decks:(i==null?void 0:i.data)??[]}:{ok:!1,code:i==null?void 0:i.code,message:(i==null?void 0:i.error)??`Agent Deck error (${n.status})`}}catch(n){return{ok:!1,message:n instanceof Error?n.message:String(n)}}}async function Bw(n){var u,d,f;const i=new URLSearchParams;(u=n.q)!=null&&u.trim()&&i.set("q",n.q.trim()),(d=n.status)!=null&&d.trim()&&i.set("status",n.status.trim()),(f=n.repo)!=null&&f.trim()&&i.set("repo",n.repo.trim()),n.needsAttention&&i.set("needsAttention","1"),i.set("page",String(n.page&&n.page>1?Math.floor(n.page):1)),i.sort();const s=await fetch(`${Le}/api/issues?${i.toString()}`);if(!s.ok)throw new Error(await rt(s));return s.json()}async function qw(){const n=await fetch(`${Le}/api/issues/recent-repos`);if(!n.ok)throw new Error(await rt(n));return(await n.json()).repos??[]}async function Ay(n){const i=await fetch(`${Le}/api/issues/${n}`);if(!i.ok)throw new Error(await rt(i));return i.json()}async function Hw(n){const i=await fetch(`${Le}/api/issues/${n}/execution-analysis`);if(!i.ok)throw new Error(await rt(i));return i.json()}async function $w(n){const i=await fetch(`${Le}/api/issues/${n}/evidence`);if(!i.ok)throw new Error(await rt(i));return i.json()}async function Vw(n,i){const s=await fetch(`${Le}/api/issues/${n}/artifacts/${i}/trace`);if(!s.ok)throw new Error(await rt(s));return s.json()}async function Yw(n){const i=await fetch(`${Le}/api/issues`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw new Error(await rt(i));return i.json()}async function pd(n,i){const s=await fetch(`${Le}/api/issues/${n}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(await rt(s));return s.json()}async function Ey(n){const i=await fetch(`${Le}/api/issues/${n}/start`,{method:"POST"});if(!i.ok)throw new Error(await rt(i));return i.json()}async function Ty(n){const i=await fetch(`${Le}/api/issues/${n}/execute`,{method:"POST"});if(!i.ok)throw new Error(await rt(i));return i.json()}async function Zw(n,i="web"){const s=await fetch(`${Le}/api/issues/${n}/abort`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({resolvedBy:i})});if(!s.ok)throw new Error(await rt(s));return s.json()}async function Gw(n,i="web"){const s=await fetch(`${Le}/api/issues/${n}/close`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({closedBy:i})});if(!s.ok)throw new Error(await rt(s));return s.json()}async function Qw(n){const i=await fetch(`${Le}/api/queue`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({issueId:n})});if(!i.ok)throw new Error(await rt(i));return i.json()}async function Cy(n){const i=await fetch(`${Le}/api/queue/${n}`,{method:"DELETE"});if(!i.ok)throw new Error(await rt(i));return i.json()}async function Hr(n,i){const s=await fetch(`${Le}/api/queue/${n}/move`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({to:i})});if(!s.ok)throw new Error(await rt(s));return s.json()}async function Go(){const n=await fetch(`${Le}/api/queue`);if(!n.ok)throw new Error(await rt(n));return n.json()}async function Xw(){const n=await fetch(`${Le}/api/queue/status`);if(!n.ok)throw new Error(await rt(n));return n.json()}async function Kw(n){const i=await fetch(`${Le}/api/queue/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({maxActiveIssues:n})});if(!i.ok)throw new Error(await rt(i));return i.json()}async function Jw(n,i){const s=await fetch(`${Le}/api/issues/${n}/guidance`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({markdown:i})});if(!s.ok)throw new Error(await rt(s));return s.json()}async function Iw(n){const i=by(n),s=await fetch(`${Le}/api/execution-report${i?`?${i}`:""}`);if(!s.ok)throw new Error(await rt(s));const u=await s.json(),d=xw.safeParse(u);if(!d.success)throw new Error(`Unexpected report shape: ${d.error.message}`);return d.data}async function Fw(){const n=await fetch(`${Le}/api/human-actions`);if(!n.ok)throw new Error(await rt(n));return n.json()}async function Ry(n,i,s){const u=await fetch(`${Le}/api/human-actions/${n}/resolve`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({resolvedBy:i,choice:s})});if(!u.ok)throw new Error(await rt(u));return u.json()}function Ww(n){return n||dy}function Pw({runtime:n,label:i,value:s,onChange:u,defaultModelId:d,disabled:f,compact:m}){const y=md(n),[v,g]=S.useState((y==null?void 0:y.models)??[]),[b,N]=S.useState((y==null?void 0:y.source)??"fallback"),[L,K]=S.useState(!y);S.useEffect(()=>{const O=md(n);if(O){g(O.models),N(O.source),K(!1);return}K(!0),Dw(n).then(Y=>{g(Y.models),N(Y.source)}).catch(()=>g([])).finally(()=>K(!1))},[n]);const D=S.useMemo(()=>{var O,Y;if(n==="cursor_local"){const J=Ww(d);return((O=v.find(ne=>ne.id===J))==null?void 0:O.label)??"Auto (subscription pool)"}return d?((Y=v.find(J=>J.id===d))==null?void 0:Y.label)??d:"runtime default"},[n,d,v]),V=n==="cursor_local"?L?"Loading models…":`Agent default (${D})`:L?"Loading models…":`Default (${D})`;return c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:i}),c.jsxs("select",{className:"field text-sm",disabled:f||L,value:s,onChange:O=>u(O.target.value),children:[c.jsx("option",{value:"",children:V}),v.map(O=>c.jsx("option",{value:O.id,children:O.label},O.id))]}),n==="cursor_local"&&!L&&!m&&c.jsx("p",{className:"text-xs text-white/40",children:"Auto and Composer use your Cursor subscription pool. Other models draw API credits."}),b==="fallback"&&v.length>0&&!L&&n==="cursor_local"&&!m&&c.jsx("p",{className:"text-xs text-white/40",children:"Run cursor-agent login to load the full model list."})]})}function fx(n){const i={};return n.allowWorktreeWrite||(i.worktreeWrite=!1),Object.keys(i).length?i:null}function e2(n){let i={};try{n!=null&&n.trim()&&(i=JSON.parse(n))}catch{i={}}return{allowWorktreeWrite:i.worktreeWrite!==!1}}function hx({value:n,onChange:i,agentDeckOnline:s,disabled:u}){const[d,f]=S.useState([]),[m,y]=S.useState(null);S.useEffect(()=>{zw().then(b=>{b.ok?(f(b.decks),y(null)):(f([]),y(b.message))})},[]);const v=b=>i({...n,...b}),g=n.runtime==="codex_local"||n.runtime==="claude_code";return c.jsxs("div",{className:"space-y-2",children:[c.jsx("div",{className:"font-ui-display text-base uppercase tracking-wide text-[#92E4DD]",children:"Agent"}),c.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Runtime (required)"}),c.jsxs("select",{className:"field",disabled:u,value:n.runtime,onChange:b=>{const N=b.target.value;v({runtime:N,defaultModel:N==="cursor_local"?dy:N==="muse_code"?_1:"",defaultEffort:N==="cursor_local"||N==="muse_code"?"":n.defaultEffort})},children:[c.jsx("option",{value:"claude_code",children:"Claude Code (claude -p)"}),c.jsx("option",{value:"cursor_local",children:"Cursor local (cursor-agent -p)"}),c.jsx("option",{value:"codex_local",children:"Codex local (codex exec)"}),c.jsx("option",{value:"muse_code",children:"Muse Code (muse exec) — developer only, trial"})]}),c.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Agent Deck (required)"}),c.jsxs("select",{className:"field",disabled:u||!s||!!m,value:n.deckId,onChange:b=>v({deckId:b.target.value}),required:!0,children:[c.jsx("option",{value:"",disabled:!!n.deckId,children:s?m?"Agent Deck error — see below":"Select a deck…":"Agent Deck offline"}),d.map(b=>c.jsxs("option",{value:b.id,children:["◆ ",b.name]},b.id))]}),s&&m&&c.jsx("p",{className:"text-xs text-amber-300/90",children:m}),c.jsxs("div",{className:"pt-2 mt-2 border-t border-white/10 space-y-2",children:[c.jsx("div",{className:"font-ui-display text-xs uppercase tracking-wide text-white/40",children:"Issue-centric session defaults"}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Purpose (optional)"}),c.jsx("input",{className:"field text-sm",placeholder:"e.g. backend refactors on the payments service",disabled:u,value:n.purpose,onChange:b=>v({purpose:b.target.value})})]}),c.jsxs("div",{className:`grid gap-2 ${g?"grid-cols-2":"grid-cols-1"}`,children:[c.jsx(Pw,{runtime:n.runtime,label:"Default model",value:n.defaultModel,onChange:b=>v({defaultModel:b}),disabled:u,compact:!0}),g&&c.jsxs("label",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Reasoning effort"}),c.jsxs("select",{className:"field text-sm",disabled:u,value:n.defaultEffort,onChange:b=>v({defaultEffort:b.target.value}),children:[c.jsx("option",{value:"",children:"Runtime default"}),c.jsx("option",{value:"low",children:"Low"}),c.jsx("option",{value:"medium",children:"Medium"}),c.jsx("option",{value:"high",children:"High"})]})]})]}),n.runtime==="muse_code"&&c.jsx("p",{className:"text-xs text-white/40",children:"Developer role only — keep a Claude or Codex agent as the reviewer. Contributor-tier content may be used for product improvement; use it on non-sensitive tickets."}),n.runtime==="cursor_local"&&c.jsx("p",{className:"text-xs text-white/40",children:"Cursor has no separate effort flag — put effort in the model id if needed (e.g. parameterized `[effort=high]`)."}),c.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[c.jsxs("label",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max turns"}),c.jsx("input",{className:"field text-sm",type:"number",min:1,placeholder:"none",disabled:u,value:n.defaultBudget.maxTurns,onChange:b=>v({defaultBudget:{...n.defaultBudget,maxTurns:b.target.value}})})]}),c.jsxs("label",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max $ / session"}),c.jsx("input",{className:"field text-sm",type:"number",min:0,step:"0.1",placeholder:"none",disabled:u,value:n.defaultBudget.maxBudgetUsd,onChange:b=>v({defaultBudget:{...n.defaultBudget,maxBudgetUsd:b.target.value}})})]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Developer capabilities"}),c.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm text-white/70",children:c.jsxs("label",{className:"flex items-center gap-1.5",children:[c.jsx("input",{type:"checkbox",disabled:u,checked:n.allowWorktreeWrite,onChange:b=>v({allowWorktreeWrite:b.target.checked})}),"Write files"]})}),c.jsx("p",{className:"text-xs text-white/40",children:"Unchecking runs the developer read-only (no Write/Edit/Bash grant), same as a reviewer. There is no separate push / open-PR toggle — a session with file-write access can already push and open PRs, and no mechanism here can restrict just that without also removing write access."})]})]})]})}function Oa(n){return n==="claude_code"?"Claude":n==="cursor_local"?"Cursor":n==="codex_local"?"Codex":n==="muse_code"?"Muse Code":"No agent"}function t2(){return{maxTurns:"",maxBudgetUsd:""}}function mx(n){const i=n.maxTurns.trim()?Number(n.maxTurns):null,s=n.maxBudgetUsd.trim()?Number(n.maxBudgetUsd):null;return i==null&&s==null||i!=null&&(!Number.isFinite(i)||i<=0)||s!=null&&(!Number.isFinite(s)||s<=0)?null:{maxTurns:i,maxBudgetUsd:s}}function a2(n){const i=Kr(n);return{maxTurns:(i==null?void 0:i.maxTurns)!=null?String(i.maxTurns):"",maxBudgetUsd:(i==null?void 0:i.maxBudgetUsd)!=null?String(i.maxBudgetUsd):""}}function hs({children:n,className:i="",title:s}){return c.jsx("span",{title:s,className:`inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium uppercase tracking-wide border ${i}`,children:n})}function $r(n,i){const s=n.find(d=>d.runtime===i);if(!s)return{ok:!1,detail:"no agent"};const u=s.issues.find(d=>d.code==="cli_missing"||d.code==="runtime_auth"||d.code==="runtime_unknown"||d.code==="cursor_keychain");return u?{ok:!1,detail:u.message}:{ok:!0,detail:"CLI ready"}}function n2(n){const i=n.flatMap(s=>s.issues).find(s=>s.code==="github_cli_missing"||s.code==="github_auth"||s.code==="github_unreachable");return i?{ok:!1,detail:i.message}:n.length===0?{ok:!1,detail:"no agent"}:{ok:!0,detail:"gh ready"}}function ui({ok:n}){return c.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${n?"bg-emerald-400":"bg-amber-400"}`,"aria-hidden":!0})}function l2({agents:n,agentDeckOnline:i}){const[s,u]=S.useState(null);S.useEffect(()=>{Ny().then(b=>u(b.mcpUrl)).catch(()=>u(null))},[i]);const d=$r(n,"claude_code"),f=$r(n,"cursor_local"),m=$r(n,"codex_local"),y=n.some(b=>b.runtime==="muse_code")?$r(n,"muse_code"):null,v=n2(n),g=n.flatMap(b=>b.issues).find(b=>b.code==="mcp_not_registered");return c.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-1.5 text-xs text-white/45",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Connections"}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:d.detail,children:[c.jsx(ui,{ok:d.ok}),c.jsx("span",{className:d.ok?"text-white/55":"text-amber-200/90",children:"Claude"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:f.detail,children:[c.jsx(ui,{ok:f.ok}),c.jsx("span",{className:f.ok?"text-white/55":"text-amber-200/90",children:"Cursor"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:m.detail,children:[c.jsx(ui,{ok:m.ok}),c.jsx("span",{className:m.ok?"text-white/55":"text-amber-200/90",children:"Codex"})]}),y&&c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:y.detail,children:[c.jsx(ui,{ok:y.ok}),c.jsx("span",{className:y.ok?"text-white/55":"text-amber-200/90",children:"Muse Code"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:v.detail,children:[c.jsx(ui,{ok:v.ok}),c.jsx("span",{className:v.ok?"text-white/55":"text-amber-200/90",children:"GitHub"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:(g==null?void 0:g.message)??(s?`MCP ${s}`:"Agent Deck optional"),children:[c.jsx(ui,{ok:i&&!g}),c.jsxs("span",{className:i&&!g?"text-[#92E4DD]/80":g?"text-amber-200/90":"text-white/35",children:["Agent Deck MCP",i?g?" (setup needed)":"":" (optional)"]})]})]})}const ky={unsupported:"not reported by provider",missing:"no data yet",expired:"expired",unparsable:"provider data unparsable",stale:"stale"};function i2(n){if(n.unavailableReason!==null)return`${n.displayLabel}: N/A (${ky[n.unavailableReason]})`;const i=n.resetAt?`, resets ${new Date(n.resetAt).toLocaleString()}`:"";return`${n.displayLabel}: ${Math.round(n.remainingPercent??0)}% remaining${i}`}function s2({window:n}){const i=n.unavailableReason===null&&n.remainingPercent!==null;return c.jsxs("span",{"data-testid":`capacity-window-${n.windowKey}`,"data-reason":n.unavailableReason??void 0,title:i2(n),className:`inline-flex items-center gap-1 rounded border px-1.5 py-0.5 whitespace-nowrap ${i?"border-white/15 bg-white/5 text-white/70":"border-white/10 bg-transparent text-white/35"}`,children:[c.jsx("span",{className:"text-white/40",children:n.displayLabel}),i?c.jsxs("span",{className:"font-medium",children:[Math.round(n.remainingPercent??0),"%"]}):c.jsx("span",{children:"N/A"})]})}function r2({data:n}){return n.runtimes.length===0?null:c.jsxs("div",{"data-testid":"runtime-capacity-strip",className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Runtime capacity"}),n.runtimes.map(i=>c.jsxs("span",{"data-testid":`capacity-entry-${i.runtime}`,className:"inline-flex min-w-0 flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"shrink-0 font-medium text-white/55",children:Oa(i.runtime)}),i.windows.length===0?c.jsx("span",{"data-testid":`capacity-entry-${i.runtime}-na`,"data-reason":i.unavailableReason??"missing",title:`N/A (${ky[i.unavailableReason??"missing"]})`,className:"text-white/35",children:"N/A"}):i.windows.map(s=>c.jsx(s2,{window:s},s.windowKey))]},i.runtime))]})}function u2({refreshTick:n}){const[i,s]=S.useState(null);return S.useEffect(()=>{let u=!1;return Lw().then(d=>{u||s(d)}).catch(()=>{u||s(null)}),()=>{u=!0}},[n]),i?c.jsx(r2,{data:i}):null}const px={unsupported:"not reported by provider",missing:"no data yet",expired:"expired",unparsable:"provider data unparsable",stale:"stale"};function Qo(n,i){return n===null||!Number.isFinite(n)?null:i?`${n} ${i}`:`${n}`}function c2(n){if(!n.cycleStart&&!n.cycleEnd)return null;const i=s=>new Date(s).toLocaleDateString();return n.cycleStart&&n.cycleEnd?`${i(n.cycleStart)} → ${i(n.cycleEnd)}`:i(n.cycleStart??n.cycleEnd)}function o2(n){if(n.memberCount===null||!Number.isFinite(n.memberCount))return null;const i=`${n.memberCount} member${n.memberCount===1?"":"s"}`;return n.memberLimitOverrideCount!==null&&Number.isFinite(n.memberLimitOverrideCount)&&n.memberLimitOverrideCount>0?`${i} · ${n.memberLimitOverrideCount} with a per-member limit override`:i}function d2({data:n}){const i=n.unavailableReason===null&&n.source!=="unavailable",s=Qo(n.spendValue,n.spendUnit),u=Qo(n.hardLimitValue,n.hardLimitUnit),d=Qo(n.usageSpendValue,n.usageSpendUnit),f=o2(n),m=c2(n);return c.jsxs("div",{"data-testid":"cursor-team-billing","data-reason":n.unavailableReason??void 0,"data-configured":n.configured?"true":"false",className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Cursor team billing"}),c.jsx("span",{className:"rounded border border-white/10 px-1.5 py-0.5 text-white/35",title:"Official Cursor Admin API — team-level billing, not individual runtime quota",children:"Admin API"}),i?c.jsxs("span",{className:"inline-flex flex-wrap items-center gap-x-3 gap-y-1 text-white/70",children:[s&&c.jsxs("span",{"data-testid":"cursor-team-spend",title:`Team spend ${s}${u?` of ${u} hard limit`:""}`,children:["Spend ",s,u&&c.jsxs("span",{className:"text-white/40",children:[" of ",u," hard limit"]})]}),!s&&u&&c.jsxs("span",{"data-testid":"cursor-team-spend",title:`Hard limit ${u}`,children:["Hard limit ",u]}),m&&c.jsxs("span",{"data-testid":"cursor-team-cycle",className:"text-white/40",children:["cycle ",m]}),f&&c.jsx("span",{"data-testid":"cursor-team-members",className:"text-white/40",title:"Team size and per-member limit overrides as reported — never summed into a team total",children:f}),d&&c.jsxs("span",{"data-testid":"cursor-team-usage",className:"text-white/40",title:"Summed trailing-window usage spend as reported",children:["trailing usage ",d]})]}):c.jsxs("span",{"data-testid":"cursor-team-billing-na",className:"text-white/35",title:`N/A (${px[n.unavailableReason??"missing"]})`,children:["N/A (",px[n.unavailableReason??"missing"],")",!n.configured&&c.jsx("span",{className:"ml-1 text-white/25",children:"— set CURSOR_ADMIN_API_KEY to enable"})]})]})}function f2({refreshTick:n}){const[i,s]=S.useState(null);return S.useEffect(()=>{let u=!1;return Uw().then(d=>{u||s(d)}).catch(()=>{u||s(null)}),()=>{u=!0}},[n]),i?c.jsx(d2,{data:i}):null}const h2="data:image/svg+xml,%3csvg%20viewBox='0%200%20248%20248'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-hidden='true'%3e%3cpath%20d='M52.4285%20162.873L98.7844%20136.879L99.5485%20134.602L98.7844%20133.334H96.4921L88.7237%20132.862L62.2346%20132.153L39.3113%20131.207L17.0249%20130.026L11.4214%20128.844L6.2%20121.873L6.7094%20118.447L11.4214%20115.257L18.171%20115.847L33.0711%20116.911L55.485%20118.447L71.6586%20119.392L95.728%20121.873H99.5485L100.058%20120.337L98.7844%20119.392L97.7656%20118.447L74.5877%20102.732L49.4995%2086.1905L36.3823%2076.62L29.3779%2071.7757L25.8121%2067.2858L24.2839%2057.3608L30.6515%2050.2716L39.3113%2050.8623L41.4763%2051.4531L50.2636%2058.1879L68.9842%2072.7209L93.4357%2090.6804L97.0015%2093.6343L98.4374%2092.6652L98.6571%2091.9801L97.0015%2089.2625L83.757%2065.2772L69.621%2040.8192L63.2534%2030.6579L61.5978%2024.632C60.9565%2022.1032%2060.579%2020.0111%2060.579%2017.4246L67.8381%207.49965L71.9133%206.19995L81.7193%207.49965L85.7946%2011.0443L91.9074%2024.9865L101.714%2046.8451L116.996%2076.62L121.453%2085.4816L123.873%2093.6343L124.764%2096.1155H126.292V94.6976L127.566%2077.9197L129.858%2057.3608L132.15%2030.8942L132.915%2023.4505L136.608%2014.4708L143.994%209.62643L149.725%2012.344L154.437%2019.0788L153.8%2023.4505L150.998%2041.6463L145.522%2070.1215L141.957%2089.2625H143.994L146.414%2086.7813L156.093%2074.0206L172.266%2053.698L179.398%2045.6635L187.803%2036.802L193.152%2032.5484H203.34L210.726%2043.6549L207.415%2055.1159L196.972%2068.3492L188.312%2079.5739L175.896%2096.2095L168.191%20109.585L168.882%20110.689L170.738%20110.53L198.755%20104.504L213.91%20101.787L231.994%2098.7149L240.144%20102.496L241.036%20106.395L237.852%20114.311L218.495%20119.037L195.826%20123.645L162.07%20131.592L161.696%20131.893L162.137%20132.547L177.36%20133.925L183.855%20134.279H199.774L229.447%20136.524L237.215%20141.605L241.8%20147.867L241.036%20152.711L229.065%20158.737L213.019%20154.956L175.45%20145.977L162.587%20142.787H160.805V143.85L171.502%20154.366L191.242%20172.089L215.82%20195.011L217.094%20200.682L213.91%20205.172L210.599%20204.699L188.949%20188.394L180.544%20181.069L161.696%20165.118H160.422V166.772L164.752%20173.152L187.803%20207.771L188.949%20218.405L187.294%20221.832L181.308%20223.959L174.813%20222.777L161.187%20203.754L147.305%20182.486L136.098%20163.345L134.745%20164.2L128.075%20235.42L125.019%20239.082L117.887%20241.8L111.902%20237.31L108.718%20229.984L111.902%20215.452L115.722%20196.547L118.779%20181.541L121.58%20162.873L123.291%20156.636L123.14%20156.219L121.773%20156.449L107.699%20175.752L86.304%20204.699L69.3663%20222.777L65.291%20224.431L58.2867%20220.768L58.9235%20214.27L62.8713%20208.48L86.304%20178.705L100.44%20160.155L109.551%20149.507L109.462%20147.967L108.959%20147.924L46.6977%20188.512L35.6182%20189.93L30.7788%20185.44L31.4156%20178.115L33.7079%20175.752L52.4285%20162.873Z'%20fill='%23D97757'/%3e%3c/svg%3e",m2="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-hidden='true'%3e%3cpath%20fill='%23EDEDED'%20d='M11.503.131%201.891%205.678a.84.84%200%200%200-.42.726v11.188c0%20.3.162.575.42.724l9.609%205.55a1%201%200%200%200%20.998%200l9.61-5.55a.84.84%200%200%200%20.42-.724V6.404a.84.84%200%200%200-.42-.726L12.497.131a1.01%201.01%200%200%200-.996%200M2.657%206.338h18.55c.263%200%20.43.287.297.515L12.23%2022.918c-.062.107-.229.064-.229-.06V12.335a.59.59%200%200%200-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23'/%3e%3c/svg%3e";function Oy({src:n,className:i}){return c.jsx("span",{className:`inline-flex items-center justify-center rounded-lg bg-white/[0.04] ${i??"h-8 w-8"}`,children:c.jsx("img",{src:n,alt:"",className:"h-[70%] w-[70%] object-contain",draggable:!1})})}function p2({className:n="h-8 w-8"}){return c.jsx(Oy,{src:h2,className:n})}function x2({className:n="h-8 w-8"}){return c.jsx(Oy,{src:m2,className:n})}function y2({className:n="h-8 w-8"}){return c.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,"aria-hidden":!0,children:[c.jsx("rect",{width:"32",height:"32",rx:"8",fill:"white",fillOpacity:"0.06"}),c.jsx("circle",{cx:"16",cy:"13",r:"4.5",stroke:"#92E4DD",strokeWidth:"1.75"}),c.jsx("path",{d:"M8.5 24.5c1.2-3.5 3.8-5.5 7.5-5.5s6.3 2 7.5 5.5",stroke:"#92E4DD",strokeWidth:"1.75",strokeLinecap:"round"})]})}function v2({className:n="h-8 w-8"}){return c.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,"aria-hidden":!0,children:[c.jsx("rect",{width:"32",height:"32",rx:"8",fill:"white",fillOpacity:"0.06"}),c.jsx("text",{x:"16",y:"21",textAnchor:"middle",fill:"#92E4DD",fontSize:"11",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:"600",children:"Cx"})]})}function g2({className:n="h-8 w-8"}){return c.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,"aria-hidden":!0,children:[c.jsx("rect",{width:"32",height:"32",rx:"8",fill:"white",fillOpacity:"0.06"}),c.jsx("text",{x:"16",y:"21",textAnchor:"middle",fill:"#92E4DD",fontSize:"11",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:"600",children:"Mu"})]})}function b2({runtime:n,className:i="h-8 w-8 shrink-0"}){return n==="claude_code"?c.jsx(p2,{className:i}):n==="cursor_local"?c.jsx(x2,{className:i}):n==="codex_local"?c.jsx(v2,{className:i}):n==="muse_code"?c.jsx(g2,{className:i}):c.jsx(y2,{className:i})}const Vr=()=>({runtime:"claude_code",deckId:"",purpose:"",defaultModel:"",defaultEffort:"",defaultBudget:t2(),allowWorktreeWrite:!0});function w2({agents:n,agentDeckOnline:i,onRefresh:s}){const[u,d]=S.useState(!1),[f,m]=S.useState(""),[y,v]=S.useState(Vr()),[g,b]=S.useState(!1),[N,L]=S.useState(null),[K,D]=S.useState(""),[V,O]=S.useState(Vr()),Y=async X=>{if(X.preventDefault(),!(!f.trim()||!y.deckId)){b(!0);try{const be={name:f.trim(),runtime:y.runtime,deckId:y.deckId,defaultModel:y.defaultModel.trim()||null,defaultEffort:y.defaultEffort||null,defaultBudget:mx(y.defaultBudget),purpose:y.purpose.trim()||null,permissionPolicy:fx(y)};await kw(be),m(""),v(Vr()),d(!1),s()}catch(be){alert(String(be))}finally{b(!1)}}},J=X=>{L(X.id),D(X.name),O({runtime:X.runtime,deckId:X.deckId??"",purpose:X.purpose??"",defaultModel:cx(X)??"",defaultEffort:X.defaultEffort??"",defaultBudget:a2(A1(X)),...e2(X.permissionPolicyJson)})},ne=()=>{L(null),O(Vr())},pe=async X=>{if(!(!K.trim()||!V.deckId)){b(!0);try{const be={name:K.trim(),runtime:V.runtime,deckId:V.deckId,defaultModel:V.defaultModel.trim()||null,defaultEffort:V.defaultEffort||null,defaultBudget:mx(V.defaultBudget),purpose:V.purpose.trim()||null,permissionPolicy:fx(V)};await Ow(X.id,be),ne(),s()}catch(be){alert(String(be))}finally{b(!1)}}},I=async X=>{if(confirm(`Delete agent "${X.name}"?`)){b(!0);try{await Mw(X.id),s()}catch(be){alert(String(be))}finally{b(!1)}}},Ee=n.filter(X=>!X.healthy).length;return c.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4 max-w-6xl mx-auto w-full",children:[c.jsxs("div",{className:"mb-6 flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h1",{className:"heading-page",children:"Agents"}),c.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Saved execution profiles — pick one when creating an issue instead of configuring each task"}),c.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[n.length," agent",n.length===1?"":"s",Ee>0&&c.jsxs("span",{className:"text-red-400 ml-2",children:["· ",Ee," need",Ee===1?"s":""," attention"]})]})]}),c.jsx(l2,{agents:n,agentDeckOnline:i})]}),c.jsxs("div",{className:"mb-4 overflow-x-auto space-y-2",children:[c.jsx(u2,{}),c.jsx(f2,{})]}),c.jsx("div",{className:"space-y-3 mb-6",children:n.map(X=>{const be=cx(X);return c.jsxs("div",{className:"panel flex flex-col sm:flex-row sm:items-start gap-3 justify-between",children:[c.jsxs("div",{className:"flex gap-3 min-w-0 flex-1",children:[c.jsx(b2,{runtime:X.runtime}),c.jsxs("div",{className:"space-y-2 min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsx("span",{className:"text-lg font-semibold text-[#E8F6F4]",children:X.name}),!X.healthy&&c.jsx(hs,{className:"bg-red-500/15 text-red-300 border-red-400/30 normal-case",children:"Needs fix"})]}),c.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[c.jsx(hs,{className:"bg-white/5 text-white/55 border-white/15 normal-case",children:Oa(X.runtime)}),X.deckName?c.jsxs(hs,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",X.deckName]}):c.jsx(hs,{className:"bg-white/5 text-white/40 border-white/10 normal-case",children:"No deck"}),be&&c.jsx(hs,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:be,children:be})]}),N===X.id&&c.jsxs("div",{className:"space-y-3 pt-2 border-t border-white/10",children:[c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),c.jsx("input",{className:"field text-sm",value:K,onChange:$e=>D($e.target.value)})]}),c.jsx(hx,{value:V,onChange:O,agentDeckOnline:i}),c.jsxs("div",{className:"flex gap-2 pt-1",children:[c.jsx("button",{type:"button",disabled:g||!K.trim()||!V.deckId,onClick:()=>pe(X),className:"btn-gold text-sm px-3 py-1.5",children:"Save"}),c.jsx("button",{type:"button",onClick:ne,className:"btn-ghost text-sm px-3 py-1.5",children:"Cancel"})]})]}),X.issues.length>0&&c.jsx("ul",{className:"text-sm text-red-300/90 space-y-1",children:X.issues.map(($e,gt)=>c.jsxs("li",{children:["· ",$e.message]},gt))})]})]}),c.jsxs("div",{className:"flex gap-2 shrink-0",children:[N!==X.id&&c.jsx("button",{type:"button",disabled:g,onClick:()=>J(X),className:"btn-ghost text-sm px-3 py-1.5",children:"Edit"}),c.jsx("button",{type:"button",disabled:g,onClick:()=>I(X),className:"btn-ghost text-sm px-3 py-1.5",children:"Delete"})]})]},X.id)})}),u?c.jsxs("form",{onSubmit:Y,className:"panel space-y-3",children:[c.jsx("h2",{className:"heading-panel",children:"New Agent"}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),c.jsx("input",{className:"field",placeholder:"e.g. Claude · Work",value:f,onChange:X=>m(X.target.value)})]}),c.jsx(hx,{value:y,onChange:v,agentDeckOnline:i}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"submit",disabled:g||!f.trim()||!y.deckId,className:"btn-gold px-4 py-2",children:g?"Saving…":"Create agent"}),c.jsx("button",{type:"button",onClick:()=>d(!1),className:"btn-ghost px-4 py-2",children:"Cancel"})]})]}):c.jsx("button",{type:"button",onClick:()=>d(!0),className:"btn-gold px-4 py-2",children:"Add agent"})]})}function S2(n){try{return Od(n).identity}catch{return null}}function _2(n,i){return n!=="linear"||!i?null:i.repoResolution??uy(i.labels)}function j2(n,i){if(!i)return n;const s=i.repoResolution??uy(i.labels);return s.status==="resolved"&&s.repository?s.repository:n}function N2(n,i){var u;const s=_2(n,i);if(!s)return null;if(s.status==="conflict")return`Conflicting repo: labels (${(s.labels??[]).join(", ")}) — kept the current repository. Fix the labels in Linear or type a repository below.`;if(s.status==="invalid"){const d=((u=s.labels)==null?void 0:u[0])??"repo:",f=s.error?` — ${s.error}`:"";return`Invalid repository label ${d}${f}. Kept the current repository — fix the label in Linear or type a repository below.`}return null}function xx(n){return n.title.trim().length>0&&S2(n.repo)!=null&&n.developerAgentId.length>0&&n.reviewerAgentId.length>0}const A2=["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"],E2={q:"",status:"",repo:"",needsAttention:!1};function Ud(n){return n.startsWith("?")?n.slice(1):n}function yx(n){var s,u,d;const i=new URLSearchParams(Ud(n));return{q:((s=i.get("q"))==null?void 0:s.trim())??"",status:((u=i.get("status"))==null?void 0:u.trim())??"",repo:((d=i.get("repo"))==null?void 0:d.trim())??"",needsAttention:i.get("needsAttention")==="1"||i.get("needsAttention")==="true"}}function T2(n){const i=new URLSearchParams(Ud(n)),s=v=>{var b;const g=(b=i.get(v))==null?void 0:b.trim();return g||void 0},u={},d=s("q");d!==void 0&&(u.q=d);const f=s("status");f!==void 0&&(u.status=f);const m=s("repo");m!==void 0&&(u.repo=m),(i.get("needsAttention")==="1"||i.get("needsAttention")==="true")&&(u.needsAttention=!0);const y=Number(i.get("page"));return Number.isInteger(y)&&y>=1&&(u.page=y),u}function C2(n){var s,u,d;const i=new URLSearchParams;return(s=n.q)!=null&&s.trim()&&i.set("q",n.q.trim()),(u=n.status)!=null&&u.trim()&&i.set("status",n.status.trim()),(d=n.repo)!=null&&d.trim()&&i.set("repo",n.repo.trim()),n.needsAttention&&i.set("needsAttention","1"),n.page!==void 0&&Number.isInteger(n.page)&&n.page>1&&i.set("page",String(n.page)),i.sort(),i.toString()}function R2(n){const i={};return n.q.trim()&&(i.q=n.q.trim()),n.status.trim()&&(i.status=n.status.trim()),n.repo.trim()&&(i.repo=n.repo.trim()),n.needsAttention&&(i.needsAttention=!0),i}function k2(n,i){const s=new URLSearchParams(Ud(n));return i<=1?s.delete("page"):s.set("page",String(Math.floor(i))),s.sort(),s.toString()}function vx(n){if(n.total===0)return"No issues match these filters";const i=(n.page-1)*n.limit+1,s=Math.min(n.total,n.page*n.limit);return`Showing ${i}–${s} of ${n.total} issues`}function gx(n){return n.totalPages<=1?"":`Page ${n.page} of ${n.totalPages}`}function O2(n){return!!(n.q||n.status||n.repo||n.needsAttention)}const M2={ready:"bg-white/10 text-white/70 border-white/20",developing:"bg-cyber-violet/20 text-cyber-violet-light border-cyber-violet/40",reviewing:"bg-cyber-gold/20 text-[#E8DC7A] border-cyber-gold/40",repairing:"bg-cyber-violet/25 text-cyber-violet-light border-cyber-violet/50",final_review:"bg-amber-500/20 text-amber-300 border-amber-400/40",needs_human:"bg-red-500/20 text-red-300 border-red-400/40",done:"bg-cyber-teal/20 text-cyber-teal border-cyber-teal/40",closed:"bg-white/5 text-white/40 border-white/10"},D2={ready:"Ready",developing:"Developing",reviewing:"Reviewing",repairing:"Repairing",final_review:"Final review",needs_human:"Needs human",done:"Done",closed:"Closed"};function My({status:n}){return c.jsx("span",{className:`text-xs leading-none px-2 py-1 rounded border tabular-nums ${M2[n]}`,children:D2[n]})}function Dy(n){return n.issues.some(i=>i.code==="usage_capped")}function Ly(n){return[...n].sort((i,s)=>Number(s.healthy)-Number(i.healthy))}function Yn(n){var u;const i=`${n.name} · ${Oa(n.runtime)}`,s=[];if(!n.healthy){const d=((u=n.issues[0])==null?void 0:u.message)??"unhealthy";s.push(`NEEDS FIX: ${d}`)}return Dy(n)&&s.push("USAGE CAPPED"),s.length>0?`${i} — ${s.join(" · ")}`:i}function su(n){var i;return n?n.healthy?Dy(n)?"Usage capped — admission will refuse until the cap lifts":null:((i=n.issues[0])==null?void 0:i.message)??"Agent is unhealthy":null}function L2({agents:n,initialDeveloperId:i,initialReviewerId:s,busy:u,onSave:d,onCancel:f}){var O,Y;const[m,y]=S.useState(i??""),[v,g]=S.useState(s??""),b=Ly(n),N=n.find(J=>J.id===m),L=n.find(J=>J.id===v),K=su(N),D=su(L),V=m===(i??"")&&v===(s??"");return c.jsxs("div",{className:"p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsx("p",{className:"text-xs text-white/50",children:"Reassign agents — queue position is kept, the wait reason is rechecked, and the change is recorded on the timeline."}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Developer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:m,disabled:u,title:N?`${N.name} · ${Oa(N.runtime)}${N.healthy?" · healthy":` · ${((O=N.issues[0])==null?void 0:O.message)??"unhealthy"}`}`:"Pick a developer agent",onChange:J=>y(J.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),b.map(J=>c.jsx("option",{value:J.id,title:Yn(J),children:(J.healthy?"● ":"○ ")+Yn(J)},J.id))]}),K&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:K})]}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Reviewer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:v,disabled:u,title:L?`${L.name} · ${Oa(L.runtime)}${L.healthy?" · healthy":` · ${((Y=L.issues[0])==null?void 0:Y.message)??"unhealthy"}`}`:"Pick a reviewer agent",onChange:J=>g(J.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),b.map(J=>J.runtime==="muse_code"?c.jsx("option",{value:J.id,disabled:!0,title:"Muse Code cannot be a reviewer (developer role only)",children:`○ ${J.name} · ${Oa(J.runtime)} — reviewer not supported`},J.id):c.jsx("option",{value:J.id,title:Yn(J),children:(J.healthy?"● ":"○ ")+Yn(J)},J.id))]}),D&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:D})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm disabled:opacity-50",disabled:u||!m||!v||V,title:"Save via the issue PATCH contract — keeps queue position and rechecks the wait reason",onClick:()=>d(m,v),children:"Save agents"}),c.jsx("button",{type:"button",className:"px-4 py-1.5 text-sm text-white/60 hover:text-white disabled:opacity-50",disabled:u,onClick:f,children:"Cancel"})]})]})}function ru({className:n="w-3.5 h-3.5"}){return c.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":!0,children:c.jsx("path",{fillRule:"evenodd",d:"M8.982 1.566a1.13 1.13 0 0 0-1.964 0L.165 13.233c-.457.778.091 1.767.982 1.767h13.706c.891 0 1.439-.99.982-1.767L8.982 1.566zM8 5.697a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 5.697zm0 7.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}const U2={final_review:"Final review",attempts_exhausted:"Attempts exhausted",policy_escalation:"Policy escalation",product_scope_decision:"Product scope decision",deck_interaction_required:"Agent Deck interaction required",reflection_interaction_required:"Reflection interaction required",outbound_delivery_interaction_required:"Outbound delivery interaction required"};function z2(n){return U2[n]??n}function xd(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}function Uy(n){const i=xd(n.responseOptionsJson);return Array.isArray(i)?i.filter(s=>typeof(s==null?void 0:s.choice)=="string"&&typeof(s==null?void 0:s.label)=="string"):[]}function B2(n){var f;const i=[],s=xd(n.evidenceJson),u=xd(n.continuationPreviewJson);if((f=s==null?void 0:s.review)!=null&&f.verdict){const m=Array.isArray(s.review.findings)?s.review.findings.length:0;i.push(`Reviewer verdict: ${s.review.verdict}${m?` · ${m} finding(s)`:""}`)}(s!=null&&s.serviceId||s!=null&&s.toolName)&&i.push(`Delivery: ${[s.serviceId,s.toolName].filter(Boolean).join(" · ")}`);const d=s==null?void 0:s.pushDivergence;if(d&&typeof d.localSha=="string"&&typeof d.remoteSha=="string"){const m=typeof d.branch=="string"?d.branch:"the branch",y=typeof d.ahead=="number"?` (+${d.ahead})`:"",v=typeof d.behind=="number"?` (+${d.behind})`:"";i.push(`Push: local ${d.localSha}${y} · origin/${m} ${d.remoteSha}${v}`),typeof d.observedRemoteSha=="string"&&d.observedRemoteSha!==d.remoteSha&&i.push(`Remote moved: origin/${m} is now at ${d.observedRemoteSha}`),typeof d.lastLeaseError=="string"&&d.lastLeaseError&&i.push(`Last lease attempt: ${d.lastLeaseError}`)}return u!=null&&u.resumeRole&&i.push(`Continuation: resumes as ${u.resumeRole}${u.resumeHeadSha?` at ${u.resumeHeadSha.slice(0,8)}`:""}`),i}function q2(n){return n==="close"||n==="reject"||n==="abort"}function zy({options:n,disabled:i,onChoose:s}){return n.length===0?null:c.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(u=>c.jsx("button",{type:"button",className:`${q2(u.choice)?"btn-ghost-danger":"btn-gold"} px-3 py-1 text-xs disabled:opacity-50`,disabled:i,onClick:()=>s(u.choice),children:u.label},u.choice))})}function H2({actions:n,busyActionId:i,onResolve:s}){return n.length===0?null:c.jsxs("div",{className:"mb-4 rounded border border-red-400/30 bg-red-500/10",children:[c.jsxs("div",{className:"px-4 py-2 flex items-center gap-2 border-b border-red-400/20",children:[c.jsx(ru,{className:"w-4 h-4 shrink-0 text-red-300"}),c.jsxs("span",{className:"font-ui-display text-sm font-medium text-red-200",children:[n.length," ",n.length===1?"item needs":"items need"," your attention"]})]}),c.jsx("div",{className:"divide-y divide-white/5",children:n.map(u=>{const d=z2(u.actionType),f=B2(u);if(u.issueId)return c.jsxs(xa,{to:`/issues/${u.issueId}`,className:"block w-full text-left px-4 py-2 hover:bg-white/5 transition-colors",children:[c.jsx("span",{className:"text-xs uppercase tracking-wide text-red-300/80",children:d}),c.jsx("span",{className:"text-sm text-white/80 ml-2",children:u.question})]},u.id);const m=Uy(u);return c.jsxs("div",{className:"px-4 py-3 space-y-1.5",children:[c.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[c.jsx("span",{className:"text-xs uppercase tracking-wide text-red-300/80",children:d}),c.jsx("span",{className:"text-xs text-white/35 shrink-0",children:new Date(u.requestedAt).toLocaleString()})]}),c.jsx("p",{className:"text-sm text-white/85",children:u.question}),u.reason&&u.reason!==u.question&&c.jsx("p",{className:"text-xs text-white/50",children:u.reason}),f.map(y=>c.jsx("p",{className:"text-xs text-white/50",children:y},y)),m.length>0?c.jsx(zy,{options:m,disabled:i===u.id,onChoose:y=>s(u.id,y)}):c.jsxs("p",{className:"text-xs text-amber-200/80",children:["This item declares no response options — resolve it from the CLI (",c.jsx("code",{children:"agent-dealer action"}),")."]})]},u.id)})})]})}const $2="web";function V2(n){const i=Date.now()-new Date(n).getTime(),s=Math.floor(i/6e4);if(s<1)return"just now";if(s<60)return`${s}m ago`;const u=Math.floor(s/60);return u<24?`${u}h ago`:`${Math.floor(u/24)}d ago`}function Y2(n){var u;if(!(n!=null&&n.trim()))return;const i=n.match(/##\s*Acceptance criteria\s*\n([\s\S]*?)(?=\n##\s|$)/i);return((u=i==null?void 0:i[1])==null?void 0:u.trim())||void 0}function Z2({agents:n,humanActions:i,onHumanActionsChanged:s}){const[u,d]=S.useState(null),[f,m]=S.useState(null),[y,v]=Px(),g=y.toString(),b=T2(g),N=S.useRef(b);N.current=b;const[L,K]=S.useState(()=>yx(g)),[D,V]=S.useState(!1),[O,Y]=S.useState("manual"),[J,ne]=S.useState([]),[pe,I]=S.useState(""),[Ee,X]=S.useState(""),[be,$e]=S.useState(!1),[gt,xt]=S.useState([]),[et,Tt]=S.useState(""),[He,ie]=S.useState(""),[U,F]=S.useState("main"),[oe,je]=S.useState(""),[Me,_]=S.useState(""),[B,G]=S.useState(""),[P,re]=S.useState(""),[ce,Te]=S.useState(!0),[nt,fe]=S.useState(null),[ot,ea]=S.useState([]),[lt,va]=S.useState(null),[ga,ba]=S.useState(!1),[Dt,Ya]=S.useState(null),[wa,Rt]=S.useState(null),Fe=J.find(R=>R.id===pe)??null,mn=O==="linear"&&Fe!=null,vl=N2(O,Fe),gl=xx({title:et,repo:He,developerAgentId:B,reviewerAgentId:P}),yt=R=>{Bw(R).then(d).catch(ue=>fe(String(ue)))},St=()=>{yt(N.current),Go().then(ea).catch(()=>{}),Xw().then(va).catch(()=>{})},bl=async R=>{ba(!0),fe(null);try{const ue=await Kw(R);va(ue),St()}catch(ue){fe(String(ue))}finally{ba(!1)}},wl=async R=>{Rt(R),fe(null);try{const ue=await Ay(R);Ya({issueId:R,developerAgentId:ue.issue.developerAgentId,reviewerAgentId:ue.issue.reviewerAgentId})}catch(ue){fe(String(ue))}finally{Rt(null)}},pn=async(R,ue)=>{if(Dt){Rt(Dt.issueId);try{await pd(Dt.issueId,{developerAgentId:R,reviewerAgentId:ue}),Ya(null),St()}catch(Ve){Ya(null),fe(String(Ve)),St()}finally{Rt(null)}}},yi=async R=>{Rt(R),fe(null);try{await Ey(R),St()}catch(ue){fe(String(ue))}finally{Rt(null)}},Gn=async R=>{Rt(R),fe(null);try{await Ty(R),St()}catch(ue){fe(String(ue)),St()}finally{Rt(null)}},vi=R=>{const ue=C2(R2(R));v(ue?Object.fromEntries(new URLSearchParams(ue)):{})},Sl=()=>{K(E2),v({})},Sa=R=>{const ue=k2(g,R);v(ue?Object.fromEntries(new URLSearchParams(ue)):{})},Z=R=>K(ue=>({...ue,...R})),we=async(R,ue)=>{m(R),fe(null);try{await Ry(R,$2,ue),s(),St()}catch(Ve){fe(String(Ve))}finally{m(null)}};S.useEffect(()=>{K(yx(g))},[g]),S.useEffect(()=>{yt(N.current),Go().then(ea).catch(()=>{});const R=setInterval(()=>{yt(N.current),Go().then(ea).catch(()=>{})},5e3);return()=>clearInterval(R)},[g]),S.useEffect(()=>{D&&(qw().then(xt).catch(()=>xt([])),O==="linear"&&Tw().then(ne).catch(R=>fe(`Linear inbox: ${String(R)}`)))},[D,O]),S.useEffect(()=>{Fe&&(Tt(`${Fe.identifier}: ${Fe.title}`),je(Fe.description??""),_(Y2(Fe.description)??""),ie(R=>j2(R,Fe)))},[Fe]);const Ue=()=>{Tt(""),ie(""),je(""),_(""),I(""),X(""),Te(!0),F("main")},Qn=R=>{ne(ue=>[R,...ue.filter(Ve=>Ve.id!==R.id)]),I(R.id),X(R.identifier)},_l=async()=>{const R=Ee.trim();if(!R){fe("Paste a Linear id (e.g. NOT-103) or issue URL");return}$e(!0),fe(null);try{const ue=await Cw(R);Qn(ue)}catch(ue){fe(`Linear lookup: ${String(ue)}`)}finally{$e(!1)}},_a=async()=>{if(!xx({title:et,repo:He,developerAgentId:B,reviewerAgentId:P})){fe("Title, GitHub repository, developer, and reviewer are required");return}try{await Yw({title:et.trim(),repo:He.trim(),baseBranch:U.trim()||"main",description:oe.trim()||void 0,acceptanceCriteria:Me.trim()||void 0,developerAgentId:B,reviewerAgentId:P,maxReviewRounds:3,maxInfraAttempts:3,autoMerge:ce,source:O==="linear"&&Fe?"linear":"manual",externalId:Fe==null?void 0:Fe.id,externalLabel:Fe==null?void 0:Fe.identifier,externalUrl:Fe==null?void 0:Fe.url}),V(!1),Ue(),St()}catch(R){fe(String(R))}};return c.jsxs("div",{className:"flex-1 min-h-0 px-6 py-4 w-full overflow-y-auto",children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsx("h2",{className:"font-ui-display text-lg font-semibold text-white/90",children:"Issues"}),c.jsx("button",{type:"button",className:"btn-gold px-4",onClick:()=>V(R=>!R),children:"New issue"})]}),nt&&c.jsx("p",{className:"text-sm text-red-300 mb-3",children:nt}),D&&c.jsxs("div",{className:"mb-4 p-4 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsxs("p",{className:"text-xs text-white/50",children:["Workflow:"," ",c.jsxs("span",{className:"text-white/75",children:["developer → reviewer → ",ce?"auto-merge on approve":"final human review"]}),"."]}),c.jsxs("div",{className:"flex gap-2 text-sm",children:[c.jsx("button",{type:"button",className:`font-ui-display px-3 py-1 rounded border ${O==="manual"?"border-teal/50 text-teal":"border-white/10 text-white/50"}`,onClick:()=>{Y("manual"),I("")},children:"Manual"}),c.jsx("button",{type:"button",className:`font-ui-display px-3 py-1 rounded border ${O==="linear"?"border-teal/50 text-teal":"border-white/10 text-white/50"}`,onClick:()=>Y("linear"),children:"From Linear"})]}),O==="linear"&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{className:"flex-1 bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"NOT-103 or Linear URL",value:Ee,onChange:R=>X(R.target.value),onKeyDown:R=>{R.key==="Enter"&&(R.preventDefault(),_l())}}),c.jsx("button",{type:"button",className:"font-ui-display px-3 py-2 rounded border border-teal/40 text-teal text-sm disabled:opacity-50",disabled:be||!Ee.trim(),onClick:()=>void _l(),children:be?"…":"Lookup"})]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:pe,onChange:R=>{const ue=R.target.value;I(ue);const Ve=J.find(kt=>kt.id===ue);Ve&&X(Ve.identifier)},children:[c.jsx("option",{value:"",children:"Or pick from open inbox…"}),J.map(R=>c.jsxs("option",{value:R.id,children:[R.identifier,": ",R.title]},R.id))]})]}),c.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm disabled:opacity-60",placeholder:"Title",value:et,disabled:mn,onChange:R=>Tt(R.target.value)}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm disabled:opacity-60",rows:3,placeholder:"Problem statement / description",value:oe,disabled:mn,onChange:R=>je(R.target.value)}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:3,placeholder:"Acceptance criteria",value:Me,onChange:R=>_(R.target.value)}),c.jsxs("div",{className:"flex gap-2 items-stretch",children:[c.jsxs("div",{className:"flex-1 space-y-1",children:[gt.length>0&&c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:gt.includes(He)?He:"",onChange:R=>{R.target.value&&ie(R.target.value)},children:[c.jsx("option",{value:"",children:"Recent repositories…"}),gt.map(R=>c.jsx("option",{value:R,children:R},R))]}),c.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"GitHub URL or owner/repo",value:He,onChange:R=>ie(R.target.value)}),vl&&c.jsx("p",{className:"text-xs text-amber-200/80","data-testid":"repo-label-warning",children:vl})]}),c.jsx("input",{className:"w-32 bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"Base (seed)",title:"Seed only — managed GitHub clones use the remote default at first checkout",value:U,onChange:R=>F(R.target.value)})]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:B,onChange:R=>G(R.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),n.map(R=>c.jsx("option",{value:R.id,children:R.name},R.id))]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:P,onChange:R=>re(R.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),n.map(R=>c.jsx("option",{value:R.id,children:R.name},R.id))]}),c.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/70 cursor-pointer",children:[c.jsx("input",{type:"checkbox",checked:ce,onChange:R=>Te(R.target.checked),className:"accent-[#C4B643]"}),"Auto-merge when reviewer approves (skip final human review)"]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 disabled:opacity-40",disabled:!gl,title:gl?void 0:"Title, GitHub repository, developer, and reviewer are required",onClick:_a,children:O==="linear"?"Kick from Linear":"Create"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm text-white/60 hover:text-white",onClick:()=>{V(!1),Ue()},children:"Cancel"})]})]}),(ot.length>0||lt)&&c.jsxs("div",{className:"mb-4 rounded border border-cyber-teal/25 bg-cyber-teal/5",children:[c.jsxs("div",{className:"px-4 py-2 border-b border-cyber-teal/20 flex items-center justify-between gap-3",children:[c.jsx("span",{className:"font-ui-display text-sm font-medium text-cyber-teal",children:"Admission queue"}),c.jsx("span",{className:"flex items-center gap-2 text-xs text-white/40",children:lt?c.jsxs(c.Fragment,{children:[c.jsxs("span",{children:[lt.active," active · ",lt.waiting," waiting · limit"," ",lt.limit,lt.overCap?" · over capacity":""]}),lt.options.length>0?c.jsxs("label",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"text-white/35",children:"limit"}),c.jsx("select",{className:"bg-black/30 border border-white/10 rounded px-1.5 py-0.5 text-xs text-white/80 disabled:opacity-50",value:lt.options.includes(lt.maxActiveIssues)?lt.maxActiveIssues:lt.limit,disabled:ga,title:lt.ceiling<2?`Capped by the worker/spawn ceiling (${lt.ceiling})`:"How many issues may execute in parallel (max one per repository)",onChange:R=>void bl(Number(R.target.value)),children:lt.options.map(R=>c.jsx("option",{value:R,children:R},R))})]}):c.jsxs("span",{title:`Capped by the worker/spawn ceiling (${lt.ceiling})`,children:["max ",lt.ceiling]})]}):c.jsxs("span",{children:[ot.length," waiting · sequential"]})})]}),c.jsx("div",{className:"divide-y divide-white/5",children:ot.map((R,ue)=>c.jsxs("div",{children:[c.jsxs("div",{className:"px-4 py-2 flex items-start gap-3",children:[c.jsx("span",{className:"text-xs text-white/35 w-5 shrink-0 pt-0.5",children:R.position}),c.jsxs(xa,{to:`/issues/${R.issueId}`,className:"flex-1 min-w-0 text-left hover:text-cyber-teal",children:[c.jsx("span",{className:"text-sm text-white/85 truncate block",children:R.title??R.issueId.slice(0,8)}),R.waitReason?c.jsx("span",{className:"text-xs text-amber-200/80 block mt-0.5",children:R.waitReason}):c.jsxs("span",{className:"text-xs text-white/35 block mt-0.5",children:[R.issueStatus??"queued"," · next up"]})]}),c.jsxs("div",{className:"flex items-center gap-2 shrink-0 flex-wrap justify-end",children:[c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:wa===R.issueId,title:"Change the developer/reviewer agents — keeps queue position and rechecks the wait reason",onClick:()=>void wl(R.issueId),children:"Edit"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:wa===R.issueId,title:"Run next — move to the front of the admission queue; runs now if a slot is free, otherwise waits first with a reason",onClick:()=>void yi(R.issueId),children:"Run next"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:wa===R.issueId,title:"Execute now — start immediately, skipping queue order; refuses (changing nothing) when capacity, readiness, blockers, or agent health prevents it",onClick:()=>void Gn(R.issueId),children:"Execute now"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:ue===0,title:"Move to top",onClick:()=>{Hr(R.issueId,"top").then(St).catch(Ve=>fe(String(Ve)))},children:"Top"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:ue===0,title:"Move up",onClick:()=>{const Ve=ot[ue-1];Ve&&Hr(R.issueId,{before:Ve.issueId}).then(St).catch(kt=>fe(String(kt)))},children:"↑"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:ue===ot.length-1,title:"Move down",onClick:()=>{const Ve=ot[ue+1];Ve&&Hr(R.issueId,{after:Ve.issueId}).then(St).catch(kt=>fe(String(kt)))},children:"↓"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:ue===ot.length-1,title:"Move to bottom",onClick:()=>{Hr(R.issueId,"bottom").then(St).catch(Ve=>fe(String(Ve)))},children:"Bottom"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-white",onClick:()=>{Cy(R.issueId).then(St).catch(Ve=>fe(String(Ve)))},children:"Remove"})]})]}),(Dt==null?void 0:Dt.issueId)===R.issueId&&c.jsx("div",{className:"px-4 pb-3 pl-12",children:c.jsx(L2,{agents:n,initialDeveloperId:Dt.developerAgentId,initialReviewerId:Dt.reviewerAgentId,busy:wa===R.issueId,onSave:(Ve,kt)=>void pn(Ve,kt),onCancel:()=>Ya(null)})})]},R.id))})]}),c.jsx(H2,{actions:i,busyActionId:f,onResolve:(R,ue)=>void we(R,ue)}),c.jsx("form",{"aria-label":"Issues filters",className:"mb-4 p-4 rounded border border-white/10 bg-panel-elevated/60",onSubmit:R=>{R.preventDefault(),vi(L)},children:c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Search"}),c.jsx("input",{type:"text",placeholder:"Title or label (e.g. NOT-175)",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:L.q,onChange:R=>Z({q:R.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Status"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:L.status,onChange:R=>Z({status:R.target.value}),children:[c.jsx("option",{value:"",children:"All statuses"}),A2.map(R=>c.jsx("option",{value:R,children:R},R))]})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Repository"}),c.jsx("input",{type:"text",placeholder:"github.com/owner/repo",title:"Exact repository identity",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:L.repo,onChange:R=>Z({repo:R.target.value})})]}),c.jsx("div",{className:"flex items-end gap-2",children:c.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/70 cursor-pointer pb-2",children:[c.jsx("input",{type:"checkbox",checked:L.needsAttention,onChange:R=>Z({needsAttention:R.target.checked}),className:"accent-[#C4B643]"}),"Needs attention"]})}),c.jsxs("div",{className:"flex items-end gap-2 sm:col-span-2 lg:col-span-4",children:[c.jsx("button",{type:"submit",className:"btn-gold px-4",children:"Apply"}),c.jsx("button",{type:"button",className:"px-4 py-2 text-sm text-white/60 hover:text-white",onClick:Sl,children:"Reset"})]})]})}),u===null?c.jsx("p",{className:"text-white/50 text-sm",children:"Loading…"}):u.total===0&&!O2(b)?c.jsx("p",{className:"text-white/45 text-sm",children:"No issues yet — create one to get started."}):u.total===0?c.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/40 px-4 py-3",children:[c.jsx("p",{className:"text-white/45 text-sm",children:vx(u)}),c.jsx("button",{type:"button",className:"mt-2 px-3 py-1.5 text-sm rounded border border-white/15 text-white/70 hover:text-white",onClick:Sl,children:"Reset filters"})]}):c.jsxs("div",{children:[c.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2 mb-2",children:[c.jsx("h3",{className:"text-sm font-medium text-white/80",children:"Issues"}),c.jsxs("p",{className:"text-xs text-white/40 tabular-nums",children:[vx(u),gx(u)?` · ${gx(u)}`:""]})]}),c.jsx("div",{className:"space-y-2",children:u.issues.map(R=>{const ue=ot.find(Ve=>Ve.issueId===R.id);return c.jsxs(xa,{to:`/issues/${R.id}`,className:"w-full text-left flex items-center gap-3 px-4 py-3 rounded border border-white/10 bg-panel-elevated/40 hover:bg-panel-elevated/70 transition-colors",children:[R.hasOpenHumanAction&&c.jsx(ru,{className:"w-4 h-4 shrink-0 text-red-400"}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-sm font-medium text-white/90 truncate",children:R.title}),ue!=null&&ue.waitReason?c.jsx("p",{className:"text-xs text-amber-200/80 truncate",title:ue.waitReason,children:ue.waitReason}):R.currentIntent&&c.jsx("p",{className:"text-xs text-white/50 truncate",children:R.currentIntent})]}),c.jsx("span",{className:"text-xs text-white/40 capitalize shrink-0",children:R.currentOwner}),ue&&c.jsxs("span",{className:"text-xs px-2 py-0.5 rounded border border-cyber-teal/40 text-cyber-teal shrink-0",title:ue.waitReason??"Next up for admission",children:["Queued #",ue.position]}),c.jsx(My,{status:R.status}),c.jsx("span",{className:"text-xs text-white/35 shrink-0 w-16 text-right",children:V2(R.updatedAt)})]},R.id)})}),u.totalPages>1&&c.jsxs("nav",{"aria-label":"Issues pages",className:"mt-3 flex items-center gap-2",children:[c.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded border border-white/15 text-white/70 hover:text-white disabled:opacity-40",disabled:u.page<=1,onClick:()=>Sa(u.page-1),children:"Previous"}),c.jsxs("span",{className:"text-xs text-white/45 tabular-nums",children:["Page ",u.page," of ",u.totalPages]}),c.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded border border-white/15 text-white/70 hover:text-white disabled:opacity-40",disabled:u.page>=u.totalPages,onClick:()=>Sa(u.page+1),children:"Next"})]})]})]})}const G2=["developer","reviewer","legacy"],bx=["claude_code","cursor_local","codex_local"],Q2=["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"];function oi(n,i){return n.n===0||n.p50===null&&n.p95===null?{available:!1,p50Text:null,p95Text:null,sampleText:"n=0",sampleTitle:"No observations in this cohort",sparse:!0}:{available:!0,p50Text:n.p50===null?null:i(n.p50),p95Text:n.p95===null?null:i(n.p95),sampleText:wy(n.n),sampleTitle:`Sample size ${n.n}${hd(n.n)?" — fewer than 5 observations, compare with care":""}`,sparse:hd(n.n)}}function fa(n,i,s){if(n.sum===null||n.known===0)return{available:!1,valueText:"N/A",exactText:null,noteText:null,noteTitle:null,incomplete:n.known<n.total};const u=i(n.sum),d=s!=null&&s.compact?yw(n.sum):u,f=n.known<n.total;return{available:!0,valueText:d,exactText:s!=null&&s.compact?u:null,noteText:f?`${Ge(n.known)}/${Ge(n.total)} known`:null,noteTitle:f?"Partial sample — missing provider metadata is excluded, never zero":null,incomplete:f}}function Ss(n,i,s){return n===null||i===0?{available:!1,valueText:"N/A",evidenceCounts:null,evidenceNoun:null,title:`No ${s} in this cohort`}:{available:!0,valueText:pu(n),evidenceCounts:`${Ge(Math.round(n*i))}/${Ge(i)}`,evidenceNoun:s,title:`Exact share over ${i} ${s}`}}function wx(n,i,s){const u=Ss(n,i,s);return u.available?{text:`${u.valueText} (${u.evidenceCounts} ${u.evidenceNoun})`,title:u.title}:{text:u.valueText,title:u.title}}function Xo(n){const i=wx(n.issueSuccess,n.issueSuccessDenominator,"closed"),s=wx(n.attemptSuccess,n.attemptSuccessDenominator,"terminal attempts");return{key:n.key,issuesText:Ge(n.issues),attemptsText:Ge(n.attempts),issueSuccessText:i.text,issueSuccessTitle:i.title,attemptSuccessText:s.text,attemptSuccessTitle:s.title,issueSuccessDisplay:Ss(n.issueSuccess,n.issueSuccessDenominator,"closed"),attemptSuccessDisplay:Ss(n.attemptSuccess,n.attemptSuccessDenominator,"terminal attempts"),wallText:dx(n.sessionWallMs,Vt),envelopeText:dx(n.spawnEnvelopeMs,Vt),retryText:n.retryRate===null?"N/A":pu(n.retryRate),retryTitle:"Extra attempts after a terminal attempt in the same issue/role/round ÷ attempts",tokensInText:Hn(n.tokensIn,Ge),tokensOutText:Hn(n.tokensOut,Ge),costText:Hn(n.costUsd,ps),costIncomplete:n.costUsd.known<n.costUsd.total,durationText:Hn(n.durationMs,Vt),failedCostText:Hn(n.failedCostUsd,ps),failedTokensText:`${Hn(n.failedTokensIn,Ge)} in · ${Hn(n.failedTokensOut,Ge)} out`,failedDurationText:Hn(n.failedDurationMs,Vt),wall:oi(n.sessionWallMs,Vt),envelope:oi(n.spawnEnvelopeMs,Vt),tokensIn:fa(n.tokensIn,Ge,{compact:!0}),tokensOut:fa(n.tokensOut,Ge,{compact:!0}),cost:fa(n.costUsd,ps),duration:fa(n.durationMs,Vt),failedCost:fa(n.failedCostUsd,ps),failedTokensIn:fa(n.failedTokensIn,Ge,{compact:!0}),failedTokensOut:fa(n.failedTokensOut,Ge,{compact:!0}),failedDuration:fa(n.failedDurationMs,Vt),failedIncomplete:n.failedCostUsd.known<n.failedCostUsd.total||n.failedTokensIn.known<n.failedTokensIn.total||n.failedTokensOut.known<n.failedTokensOut.total||n.failedDurationMs.known<n.failedDurationMs.total,sparse:n.attempts>0&&hd(n.attempts)}}function X2(n,i){const s=n.code==="unknown";return{code:n.code,domain:n.domain,countText:Ge(n.count),shareText:n.share===null?"N/A":pu(n.share),shareTitle:i>0?`${Ge(n.count)} of ${Ge(i)} issues with a failed attempt`:"No issues with a failed attempt in scope",isUnknown:s,blurb:s?"Ambiguous evidence — not promoted to a specific cause.":`Primary cause · ${n.domain} domain`,displayCode:s?"Cause not recorded":n.code,displayNote:s?"Needs more evidence":`Primary cause · ${n.domain} domain`,issueIds:n.issueIds,hiddenIssueCount:Math.max(0,n.issueTotal-n.issueIds.length)}}function K2(n){const i=n.reduce((s,u)=>s+u.count,0);return n.map(s=>X2(s,i))}function J2(n){return`/issues/${n}`}function Sx(n,i){if(n!=null&&n.trim()&&/^\d{4}-\d{2}-\d{2}$/.test(n.trim()))return i?`${n.trim()}T23:59:59.999Z`:`${n.trim()}T00:00:00.000Z`}function _x(n){if(!n)return"";const i=n.match(/^(\d{4}-\d{2}-\d{2})/);return i?i[1]:""}function jx(n){const i=new URLSearchParams(n.startsWith("?")?n.slice(1):n),s=u=>{var d;return((d=i.get(u))==null?void 0:d.trim())??""};return{fromDate:_x(s("from")),toDate:_x(s("to")),repo:s("repo"),role:s("role"),runtime:s("runtime"),model:s("model"),status:s("status")}}function I2(n){const i=new URLSearchParams(n.startsWith("?")?n.slice(1):n),s=d=>{var m;const f=(m=i.get(d))==null?void 0:m.trim();return f||void 0},u={};for(const d of["from","to","repo","role","runtime","model","status"]){const f=s(d);f!==void 0&&(u[d]=f)}return u}function F2(n,i,s){const u=new URLSearchParams(n.startsWith("?")?n.slice(1):n);u.set(i,s),u.delete("page"),u.delete("limit"),u.sort();const d=u.toString();return`/reports/execution${d?`?${d}`:""}`}function W2(n){return{from:Sx(n.fromDate,!1),to:Sx(n.toDate,!0),repo:n.repo.trim()||void 0,role:n.role||void 0,runtime:n.runtime.trim()||void 0,model:n.model.trim()||void 0,status:n.status.trim()||void 0}}function Ko(n){return n===null?"N/A":pu(n)}function Ea({label:n,value:i,valueTitle:s,note:u}){return c.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/60 px-4 py-3",children:[c.jsx("p",{className:"font-ui-display text-xs uppercase tracking-wide text-white/40",children:n}),c.jsx("div",{className:"mt-1 font-mono text-lg font-semibold text-white/90 tabular-nums",title:s,children:i}),u&&c.jsx("div",{className:"mt-0.5 font-ui-display text-xs text-white/40",children:u})]})}function uu({display:n,compact:i}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",title:n.title,children:"N/A"});const s=i?"font-mono text-sm font-medium text-white/85 tabular-nums leading-tight whitespace-nowrap":"font-mono text-base sm:text-lg font-semibold text-white/90 tabular-nums leading-tight whitespace-nowrap";return c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",title:n.title,children:[c.jsx("span",{className:s,"aria-label":n.title,children:n.valueText}),c.jsxs("span",{className:"font-ui-display min-w-0 break-words text-xs text-white/40",children:["(",c.jsx("span",{className:"font-mono tabular-nums",children:n.evidenceCounts})," ",n.evidenceNoun,")"]})]})}function xs({display:n,compact:i}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",children:"N/A"});const s=i?"font-ui-display text-[11px] uppercase tracking-wide text-white/40":"font-ui-display text-xs uppercase tracking-wide text-white/40",u=i?"font-mono text-sm font-medium text-white/85 tabular-nums":"font-mono text-base font-semibold text-white/90 tabular-nums";return c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-3 gap-y-0.5",children:[c.jsxs("span",{className:"inline-flex items-baseline gap-x-1.5",children:[c.jsx("span",{className:s,children:"P50"}),c.jsx("span",{className:u,children:n.p50Text??"N/A"})]}),c.jsxs("span",{className:"inline-flex items-baseline gap-x-1.5",children:[c.jsx("span",{className:s,children:"P95"}),c.jsx("span",{className:u,children:n.p95Text??"N/A"})]}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",title:n.sampleTitle,children:n.sampleText})]})}function ha({display:n,compact:i}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",children:"N/A"});const s=n.exactText??n.valueText,u=i?"font-mono text-sm font-medium text-white/85 tabular-nums":"font-mono text-base font-semibold text-white/90 tabular-nums";return c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",children:[c.jsx("span",{className:u,title:s,"aria-label":s,children:n.valueText}),n.noteText&&c.jsx("span",{className:"font-ui-display text-xs text-white/40",title:n.noteTitle??void 0,children:n.noteText})]})}function Jo({caption:n,dimension:i,rows:s,cohortLink:u}){return s.length===0?c.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/60 px-4 py-3",children:[c.jsx("h4",{className:"font-ui-display text-sm font-medium text-white/80",children:n}),c.jsx("p",{className:"font-ui-display mt-1 text-sm text-white/45",children:"No attempts in this dimension for these filters."})]}):c.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:c.jsxs("table",{className:"w-full min-w-[1440px] text-sm",children:[c.jsxs("caption",{className:"sr-only",children:[n," — sorted by name, never by cost"]}),c.jsx("thead",{children:c.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[c.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:n}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issues"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Attempts"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issue success"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Attempt success"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Session wall P50/P95"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Retry rate"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Tokens in"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Tokens out"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Cost"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Duration"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed cost"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed tokens"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed runtime"})]})}),c.jsx("tbody",{className:"divide-y divide-white/5",children:s.map(d=>c.jsxs("tr",{className:"tabular-nums",children:[c.jsxs("th",{scope:"row",className:"px-4 py-2 text-left font-mono font-medium text-white/85",children:[u?c.jsx(xa,{to:u(i,d.key),className:"text-cyber-teal hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-cyber-teal/45",title:`Filter the report to ${i} ${d.key}`,children:d.key}):d.key,d.sparse&&c.jsx("span",{className:"font-ui-display ml-2 text-xs font-normal text-amber-200/80",title:"Fewer than 5 attempts — compare with care",children:"sparse"})]}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:d.issuesText}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:d.attemptsText}),c.jsx("td",{className:"px-3 py-2 text-white/75",title:d.issueSuccessTitle,children:c.jsx(uu,{display:d.issueSuccessDisplay,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",title:d.attemptSuccessTitle,children:c.jsx(uu,{display:d.attemptSuccessDisplay,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(xs,{display:d.wall,compact:!0})}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",title:d.retryTitle,children:d.retryText}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ha,{display:d.tokensIn,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ha,{display:d.tokensOut,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ha,{display:d.cost,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ha,{display:d.duration,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ha,{display:d.failedCost,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-1.5",children:[c.jsx(ha,{display:d.failedTokensIn,compact:!0}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"in"}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"·"}),c.jsx(ha,{display:d.failedTokensOut,compact:!0}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"out"})]})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ha,{display:d.failedDuration,compact:!0})})]},d.key))})]})})}const P2={fromDate:"",toDate:"",repo:"",role:"",runtime:"",model:"",status:""};function eS({loading:n,error:i,report:s,onRetry:u,cohortLink:d}){const f=(s==null?void 0:s.summary)??null,m=S.useMemo(()=>s?K2(s.failures):[],[s]),y=S.useMemo(()=>s?s.failures.reduce((v,g)=>v+g.count,0):0,[s]);return c.jsxs("div",{"aria-live":"polite",children:[n&&c.jsx("p",{role:"status",className:"text-sm text-white/50",children:"Loading execution report…"}),!n&&i&&c.jsxs("div",{className:"rounded border border-red-400/30 bg-red-500/10 px-4 py-3",role:"alert",children:[c.jsxs("p",{className:"font-ui-display text-sm text-red-200",children:["Couldn’t load the execution report: ",i]}),c.jsx("button",{type:"button",className:"font-ui-display mt-2 px-3 py-1.5 text-sm rounded border border-red-300/40 text-red-100 hover:bg-red-500/20",onClick:u,children:"Retry"})]}),!n&&!i&&s&&f&&c.jsxs("div",{className:"space-y-6",children:[s.meta.partial&&c.jsxs("div",{className:"rounded border border-amber-300/30 bg-amber-400/10 px-4 py-3",children:[c.jsx("p",{className:"font-ui-display text-sm text-amber-100 font-medium",children:"Partial metadata"}),c.jsx("ul",{className:"font-ui-display mt-1 list-disc list-inside text-sm text-amber-100/80",children:s.meta.partialReasons.map(v=>c.jsx("li",{children:v},v))})]}),f.issues===0?c.jsx("p",{className:"font-ui-display text-sm text-white/45",children:"No issues match these filters in this window. Widen the date range or clear filters."}):c.jsxs(c.Fragment,{children:[c.jsx("section",{"aria-label":"Summary",children:c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-3",children:[c.jsx(Ea,{label:"Issue success",value:c.jsx(uu,{display:Ss(f.issueSuccess,f.closedIssues,"closed")}),valueTitle:`done / (done + closed), denominator ${f.closedIssues}`,note:`${Ge(f.issues)} issues · ${Ge(f.closedIssues)} closed`}),c.jsx(Ea,{label:"Attempt success",value:c.jsx(uu,{display:Ss(f.attemptSuccess,f.terminalAttempts,"terminal")}),valueTitle:`done sessions / terminal sessions, denominator ${f.terminalAttempts}`,note:`${Ge(f.attempts)} attempts · ${Ge(f.terminalAttempts)} terminal`}),c.jsx(Ea,{label:"Retry rate",value:Ko(f.retryRate),valueTitle:`${f.retryExtraAttempts} extra attempts after a terminal attempt in the same issue/role/round ÷ ${f.attempts} attempts`,note:`Reuse rate ${Ko(f.reuseRate)} over ${Ge(f.reuseDenominator)} reviewer sessions with input SHA`}),c.jsx(Ea,{label:"Human wait",value:Vt(f.humanWaitMs),note:`${Ge(f.interventions)} interventions`}),c.jsx(Ea,{label:"Session wall P50/P95",value:c.jsx(xs,{display:oi(f.sessionWallMs,Vt)}),note:"Session bookkeeping proxy — never CLI runtime"}),c.jsx(Ea,{label:"Spawn envelope P50/P95",value:c.jsx(xs,{display:oi(f.spawnEnvelopeMs,Vt)}),note:"Coordinator-measured; includes slot wait + post-exit work"}),c.jsx(Ea,{label:"Checkpoint latency P50/P95",value:c.jsx(xs,{display:oi(f.checkpointMs,Vt)}),note:"Session start → first heartbeat"}),c.jsx(Ea,{label:"Reviewer rounds (avg)",value:f.avgReviewerRounds===null?"N/A":f.avgReviewerRounds.toFixed(1),note:`Change-request rate ${Ko(f.changeRequestRate)} over ${Ge(f.reviewedIssues)} reviewed`})]})}),c.jsxs("section",{"aria-label":"Failed-attempt waste",children:[c.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Failed-attempt waste (known values only)"}),c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[c.jsx(Ea,{label:"Failed cost",value:c.jsx(ha,{display:fa(f.failedCostUsd,ps)})}),c.jsx(Ea,{label:"Failed tokens",value:c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",children:[c.jsx(ha,{display:fa(f.failedTokensIn,Ge,{compact:!0})}),c.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"in"}),c.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"·"}),c.jsx(ha,{display:fa(f.failedTokensOut,Ge,{compact:!0})}),c.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"out"})]})}),c.jsx(Ea,{label:"Failed runtime",value:c.jsx(ha,{display:fa(f.failedDurationMs,Vt)})})]})]}),c.jsxs("section",{"aria-label":"Phase wall time",children:[c.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Phase wall time"}),c.jsx("p",{className:"font-ui-display text-xs text-white/40 mb-2",children:"Composed from the execution-analysis read model over the same issues: exact when agent start/complete events are recorded, inferred usage-envelope backfill otherwise. Rows without evidence read N/A — never a guess. See per-row reasons."}),c.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:c.jsxs("table",{className:"w-full min-w-[560px] text-sm",children:[c.jsx("caption",{className:"sr-only",children:"Exclusive phase wall times. Boundaries without defensible evidence are N/A."}),c.jsx("thead",{children:c.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[c.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:"Phase"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"P50 / P95"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Why"})]})}),c.jsx("tbody",{className:"divide-y divide-white/5",children:f.phaseWallMs.map(v=>c.jsxs("tr",{className:"tabular-nums",children:[c.jsx("th",{scope:"row",className:"px-4 py-2 text-left font-mono font-medium text-white/85",children:v.phase}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(xs,{display:oi(v.stat,Vt),compact:!0})}),c.jsx("td",{className:"font-ui-display px-3 py-2 text-xs text-white/45",children:v.stat.reasons.join(", ")})]},v.phase))})]})})]}),c.jsxs("section",{"aria-label":"Comparisons",className:"space-y-4",children:[c.jsxs("h3",{className:"font-ui-display text-sm font-medium text-white/80",children:["Comparisons ",c.jsx("span",{className:"font-normal text-white/40",children:"— sorted by name, never by cost"})]}),c.jsx(Jo,{caption:"By role",dimension:"role",rows:s.byRole.map(Xo),cohortLink:d}),c.jsx(Jo,{caption:"By runtime",dimension:"runtime",rows:s.byRuntime.map(Xo),cohortLink:d}),c.jsx(Jo,{caption:"By model",dimension:"model",rows:s.byModel.map(Xo),cohortLink:d})]}),c.jsxs("section",{"aria-label":"Why attempts failed",children:[c.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Why attempts failed"}),c.jsxs("p",{className:"font-ui-display text-xs text-white/40 mb-2",children:["Each issue with a failed attempt is counted once using its primary actionable cause, and may later have recovered. Share is over"," ",Ge(y)," failed ",y===1?"issue":"issues"," in scope."]}),m.length===0?c.jsx("p",{className:"font-ui-display text-sm text-white/45",children:"No failed attempts in this window."}):c.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:c.jsxs("table",{className:"w-full min-w-[560px] text-sm",children:[c.jsx("caption",{className:"sr-only",children:"Why attempts failed: each issue counted once by primary cause. Cause not recorded is its own bucket and is never promoted."}),c.jsx("thead",{children:c.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[c.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:"Failure"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Domain"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issues"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Share"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Example issues"})]})}),c.jsx("tbody",{className:"divide-y divide-white/5",children:m.map(v=>c.jsxs("tr",{className:v.isUnknown?"bg-amber-400/5 tabular-nums":"tabular-nums",children:[c.jsxs("th",{scope:"row",className:"px-4 py-2 text-left text-white/85",children:[c.jsx("span",{className:"font-ui-display block font-medium",title:v.code,children:v.displayCode}),c.jsx("span",{className:`font-ui-display block text-xs font-normal ${v.isUnknown?"text-amber-200/90":"text-white/40"}`,children:v.displayNote})]}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:v.domain}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:v.countText}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",title:v.shareTitle,children:v.shareText}),c.jsx("td",{className:"px-3 py-2",children:c.jsxs("span",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[v.issueIds.map(g=>c.jsx(xa,{to:J2(g),className:"text-cyber-teal hover:underline font-mono text-xs",children:g.slice(0,8)},g)),v.hiddenIssueCount>0&&c.jsxs("span",{className:"font-ui-display text-xs text-white/40",children:["+",v.hiddenIssueCount," more"]})]})})]},v.code))})]})})]})]})]})]})}function tS(){const[n,i]=Px(),s=n.toString(),u=S.useMemo(()=>I2(s),[s]),[d,f]=S.useState(()=>jx(s)),[m,y]=S.useState(null),[v,g]=S.useState(!0),[b,N]=S.useState(null),[L,K]=S.useState(0);S.useEffect(()=>{f(jx(s))},[s]),S.useEffect(()=>{let O=!1;return g(!0),N(null),Iw(u).then(Y=>{O||(y(Y),g(!1))}).catch(Y=>{O||(N(Y instanceof Error?Y.message:String(Y)),g(!1))}),()=>{O=!0}},[s,L]);const D=O=>{const Y=by(W2(O));i(Y?Object.fromEntries(new URLSearchParams(Y)):{})},V=O=>f(Y=>({...Y,...O}));return c.jsxs("div",{className:"flex-1 min-h-0 px-6 py-4 w-full overflow-y-auto",children:[c.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2 mb-1",children:[c.jsx("h2",{className:"font-ui-display text-lg font-semibold text-white/90",children:"Execution report"}),m&&c.jsxs("p",{className:"font-ui-display text-xs text-white/40",children:["Window ",new Date(m.window.from).toLocaleDateString()," –"," ",new Date(m.window.to).toLocaleDateString()," · generated"," ",new Date(m.meta.generatedAt).toLocaleTimeString()]})]}),c.jsx("p",{className:"font-ui-display text-sm text-white/50 mb-4",children:"Reliability, latency, retry waste, and metadata coverage by role, runtime, and model. Missing cost/token data reads as N/A — never as zero."}),c.jsx("form",{"aria-label":"Report filters",className:"mb-4 p-4 rounded border border-white/10 bg-panel-elevated/60",onSubmit:O=>{O.preventDefault(),D(d)},children:c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"From"}),c.jsx("input",{type:"date",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.fromDate,onChange:O=>V({fromDate:O.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"To"}),c.jsx("input",{type:"date",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.toDate,onChange:O=>V({toDate:O.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Repository"}),c.jsx("input",{type:"text",placeholder:"github.com/owner/repo",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.repo,onChange:O=>V({repo:O.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Role"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.role,onChange:O=>V({role:O.target.value}),children:[c.jsx("option",{value:"",children:"All roles"}),G2.map(O=>c.jsx("option",{value:O,children:O},O))]})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Runtime"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.runtime,onChange:O=>{V({runtime:O.target.value})},children:[c.jsx("option",{value:"",children:"All runtimes"}),bx.map(O=>c.jsx("option",{value:O,children:O},O)),c.jsx("option",{value:"unknown",children:"unknown (missing metadata)"}),d.runtime&&!bx.includes(d.runtime)&&c.jsxs("option",{value:d.runtime,children:[d.runtime," (from URL)"]})]})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Model"}),c.jsx("input",{type:"text",placeholder:"Any model",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.model,onChange:O=>V({model:O.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Issue status"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.status,onChange:O=>V({status:O.target.value}),children:[c.jsx("option",{value:"",children:"All statuses"}),Q2.map(O=>c.jsx("option",{value:O,children:O},O))]})]}),c.jsxs("div",{className:"flex items-end gap-2",children:[c.jsx("button",{type:"submit",className:"btn-gold px-4",children:"Apply"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm text-white/60 hover:text-white",onClick:()=>{f(P2),i({})},children:"Reset"})]})]})}),c.jsx(eS,{loading:v,error:b,report:m,onRetry:()=>K(O=>O+1),cohortLink:(O,Y)=>F2(s,O,Y)})]})}function Nx(n,i){var d;if(!n)return"Not assigned";const s=i.find(f=>f.id===n);if(!s)return"Unavailable — profile removed";const u=`${s.name} · ${Oa(s.runtime)}`;return s.healthy?u:`${u} (unhealthy: ${((d=s.issues[0])==null?void 0:d.message)??"needs attention"})`}function Ax(n,i){var u;if(!n)return;const s=i.find(d=>d.id===n);return s?`${s.name} · ${Oa(s.runtime)}${s.healthy?" · healthy":` · ${((u=s.issues[0])==null?void 0:u.message)??"unhealthy"}`}`:`Configured profile ${n} is not on record (deleted?)`}function aS({agents:n,initialRepo:i,initialDeveloperId:s,initialReviewerId:u,busy:d,onSave:f,onCancel:m}){var ne,pe;const[y,v]=S.useState(i),[g,b]=S.useState(s??""),[N,L]=S.useState(u??""),K=Ly(n),D=n.find(I=>I.id===g),V=n.find(I=>I.id===N),O=su(D),Y=su(V),J=y.trim()===i&&g===(s??"")&&N===(u??"");return c.jsxs("div",{className:"p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsx("p",{className:"text-xs text-white/50",children:"Edit configuration — repository, developer, and reviewer save together. Queue position is kept, readiness and the wait reason are rechecked, and the change is recorded on the timeline."}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Repository"}),c.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:y,disabled:d,placeholder:"GitHub URL or owner/repo",title:"GitHub URL or owner/repo — normalized to github.com/owner/repo, same validation as issue creation",onChange:I=>v(I.target.value)})]}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Developer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:g,disabled:d,title:D?`${D.name} · ${Oa(D.runtime)}${D.healthy?" · healthy":` · ${((ne=D.issues[0])==null?void 0:ne.message)??"unhealthy"}`}`:"Pick a developer agent",onChange:I=>b(I.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),K.map(I=>c.jsx("option",{value:I.id,title:Yn(I),children:(I.healthy?"● ":"○ ")+Yn(I)},I.id))]}),O&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:O})]}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Reviewer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:N,disabled:d,title:V?`${V.name} · ${Oa(V.runtime)}${V.healthy?" · healthy":` · ${((pe=V.issues[0])==null?void 0:pe.message)??"unhealthy"}`}`:"Pick a reviewer agent",onChange:I=>L(I.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),K.map(I=>I.runtime==="muse_code"?c.jsx("option",{value:I.id,disabled:!0,title:"Muse Code cannot be a reviewer (developer role only)",children:`○ ${I.name} · ${Oa(I.runtime)} — reviewer not supported`},I.id):c.jsx("option",{value:I.id,title:Yn(I),children:(I.healthy?"● ":"○ ")+Yn(I)},I.id))]}),Y&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:Y})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm disabled:opacity-50",disabled:d||!y.trim()||!g||!N||J,title:"Save via the issue PATCH contract — keeps queue position, rechecks readiness and the wait reason",onClick:()=>f(y.trim(),g,N),children:"Save configuration"}),c.jsx("button",{type:"button",className:"px-4 py-1.5 text-sm text-white/60 hover:text-white disabled:opacity-50",disabled:d,onClick:m,children:"Cancel"})]})]})}function nS({issue:n,agents:i,canEdit:s,editing:u,busy:d,onBeginEdit:f,onSave:m,onCancel:y}){return c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03] space-y-1.5",children:[c.jsx("p",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Configuration"}),c.jsxs("p",{className:"text-sm text-white/85",title:`Exact repository identity: ${n.repo}`,children:[c.jsx("span",{className:"text-white/45",children:"Repository "}),n.repo]}),c.jsxs("p",{className:"text-sm text-white/85",title:Ax(n.developerAgentId,i),children:[c.jsx("span",{className:"text-white/45",children:"Developer "}),Nx(n.developerAgentId,i)]}),c.jsxs("p",{className:"text-sm text-white/85",title:Ax(n.reviewerAgentId,i),children:[c.jsx("span",{className:"text-white/45",children:"Reviewer "}),Nx(n.reviewerAgentId,i)]}),s&&!u&&c.jsx("button",{type:"button",className:"text-xs text-cyber-teal hover:underline disabled:opacity-50",disabled:d,onClick:f,children:"Edit configuration"}),s&&u&&c.jsx(aS,{agents:i,initialRepo:n.repo,initialDeveloperId:n.developerAgentId,initialReviewerId:n.reviewerAgentId,busy:d,onSave:m,onCancel:y})]})}function Yr(n){return n==="developer"?"Developer":n==="reviewer"?"Reviewer":"Worker"}const Io={"issue.created":()=>"Issue created","issue.reassigned":()=>"Configuration updated","workflow.started":()=>"Workflow started","worker.started":n=>`${Yr(n.actorType)} started${n.round?` (round ${n.round})`:""}`,"worker.completed":n=>`${Yr(n.actorType)} finished${n.round?` (round ${n.round})`:""}`,"worker.failed":n=>`${Yr(n.actorType)} failed${n.round?` (round ${n.round})`:""}`,"worker.deferred":n=>{var i;return((i=ys(n.payloadJson))==null?void 0:i.outcome)==="deck_unavailable"?`Waiting for Agent Deck${n.round?` (round ${n.round})`:""}`:`${Yr(n.actorType)} deferred${n.round?` (round ${n.round})`:""}`},"worktree.ready":()=>"Worktree ready","deck.connected":()=>"Deck connected","brief.resolved":()=>"Brief resolved","branch.pushed":()=>"Branch pushed","checks.started":()=>"Checks started","pull_request.opened":()=>"Developer opened the PR","pull_request.updated":()=>"Developer updated the PR","checks.completed":()=>"Checks completed","review.submitted":()=>"Reviewer submitted a review","repair.started":n=>`Repair round ${n.round??"?"} started`,"guidance.added":()=>"Guidance added","task_snapshot.refreshed":()=>"Task snapshot refreshed","human_action.requested":()=>"Human action requested","human_action.resolved":()=>"Human action resolved","final_review.requested":()=>"Final review requested","issue.completed":()=>"Issue completed","issue.closed":()=>"Issue closed"};function ys(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}const lS={approved:"text-cyber-teal",changes_requested:"text-amber-300",escalated:"text-red-300"};function iS({e:n}){var i;if(n.type==="pull_request.opened"||n.type==="pull_request.updated"){const s=ys(n.payloadJson);return n.artifactRef?c.jsxs("a",{href:n.artifactRef,target:"_blank",rel:"noreferrer",className:"text-sm text-cyber-teal hover:underline",children:["PR ",s!=null&&s.prNumber?`#${s.prNumber}`:""," ",s!=null&&s.branch?`(${s.branch})`:""]}):null}if(n.type==="review.submitted"){const s=ys(n.payloadJson);return s?c.jsxs("span",{className:"text-sm",children:[c.jsx("span",{className:lS[s.verdict]??"text-white/70",children:s.verdict.replace("_"," ")}),(i=s.findings)!=null&&i.length?` · ${s.findings.length} finding(s)`:""]}):null}if(n.type==="guidance.added"){const s=ys(n.payloadJson);return s!=null&&s.markdown?c.jsxs("span",{className:"text-sm text-white/55 italic",children:["— ",s.markdown]}):null}if(n.type==="worker.started"||n.type==="worker.completed"||n.type==="worker.failed"||n.type==="worker.deferred"||n.type==="worktree.ready"||n.type==="deck.connected"||n.type==="brief.resolved"||n.type==="branch.pushed"||n.type==="checks.started"||n.type==="checks.completed"){const s=ys(n.payloadJson);if(!s)return null;const u=[];return s.runtime&&u.push(s.runtime),s.model&&u.push(s.model),s.sessionId&&u.push(s.sessionId.slice(0,8)),s.worktreePath&&u.push(s.worktreePath),s.resolution&&u.push(s.resolution),s.branch&&u.push(s.branch),s.commitsAhead!=null&&u.push(`${s.commitsAhead} ahead`),s.snapshot&&u.push(s.snapshot),(n.type==="worker.deferred"||n.type==="worker.failed")&&(s.reason&&u.push(s.reason),n.type==="worker.deferred"&&s.until&&u.push(`until ${new Date(s.until).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`)),u.length===0?null:c.jsxs("span",{className:"text-xs text-white/40",children:["· ",u.join(" · ")]})}return null}function sS(n){var i;return((i=Io[n.type])==null?void 0:i.call(Io,n))??n.type}const Ex={human:"You",system:"System",developer:"Developer",reviewer:"Reviewer"},rS={human:"bg-cyber-teal/15 text-cyber-teal",system:"bg-white/10 text-white/50",developer:"bg-cyber-violet/20 text-cyber-violet-light",reviewer:"bg-[#C4B643]/25 text-[#E8DC7A]"};function uS(n){return n.actorRef?`${Ex[n.actorType]} · ${n.actorRef}`:Ex[n.actorType]}function cS({events:n}){return n.length===0?c.jsx("p",{className:"text-white/40 text-sm",children:"No activity yet."}):c.jsx("div",{className:"space-y-1",children:n.map(i=>c.jsxs("div",{className:"flex items-baseline gap-3 py-1.5 border-b border-white/5 last:border-0",children:[c.jsx("span",{className:"text-xs text-white/35 w-20 shrink-0 tabular-nums",children:new Date(i.ts).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),c.jsx("span",{className:`text-[11px] leading-none px-1.5 py-0.5 rounded shrink-0 ${rS[i.actorType]}`,children:uS(i)}),c.jsx("span",{className:"text-sm text-white/80",children:sS(i)}),c.jsx(iS,{e:i})]},i.id))})}function Ta(n){if(n==null||!Number.isFinite(n))return null;if(n<1e3)return"<1s";const i=Math.round(n/1e3);if(i<60)return`${i}s`;const s=Math.floor(i/60);if(s<60){const f=i%60;return f===0?`${s}m`:`${s}m ${f}s`}const u=Math.floor(s/60),d=s%60;return d===0?`${u}h`:`${u}h ${d}m`}function Tx(n){return n==null||!Number.isFinite(n)?null:`${Math.round(n).toLocaleString("en-US")} tokens`}function oS(n){return n==null||!Number.isFinite(n)?null:`$${n.toFixed(2)}`}const dS={queue_wait:"Queue / admission wait",coordinator_setup:"Setup",agent_process:"Agent process",coordinator_validation_publish:"Validation / publish",coordinator_work:"Coordinator work"},Cx={model_provider_wait:"Silent · waiting on model provider",tool_or_subprocess_in_flight:"Silent · tool/subprocess in flight",host_suspended:"Silent · host suspended",no_structured_output:"Silent · no structured output yet",unknown:"Silent · unknown cause"},yd={worktree:"worktree",commit:"commit",verification_receipt:"verification receipt",publish_only:"publish-only result"},fS=new Set(["failed","timed_out","error"]);function zd(n){return n.replace(/_/g," ")}function _s(n,i){const s=`Evidence quality: ${n}`;return i.length>0?`${s} — ${i.join(", ")}`:s}function ma({quality:n,reasons:i}){return c.jsxs("span",{className:`text-[11px] tabular-nums ${n==="exact"?"text-white/60":n==="inferred"?"text-amber-300/90":"text-white/60 italic"}`,title:_s(n,i),children:["· ",n,i.length>0&&c.jsxs("span",{className:"sr-only",children:[" (",i.join(", "),")"]})]})}function Vn({reasons:n}){const i=n.length>0?n.join(", "):"no reason recorded";return c.jsxs("span",{className:"text-white/45 italic",title:`Unavailable — ${i}`,children:["Unavailable",c.jsxs("span",{className:"text-[11px]",children:[" — ",i]})]})}function Zr({covered:n,format:i,unit:s}){if(n.value==null)return c.jsx(Vn,{reasons:n.reasons});const u=n.known<n.total;return c.jsxs("span",{title:`${_s(n.quality,n.reasons)} · known ${n.known} of ${n.total} ${s}`,children:[i(n.value),c.jsx(ma,{quality:n.quality,reasons:n.reasons}),u&&c.jsxs("span",{className:"text-[11px] text-white/60",title:`Known for ${n.known} of ${n.total} ${s}`,children:[" ","(known ",n.known," of ",n.total,")"]})]})}function Rx({cause:n,primary:i}){return c.jsxs("div",{className:i?"p-2.5 rounded border border-red-400/30 bg-red-500/10 space-y-1":"p-2 rounded border border-white/10 bg-white/[0.02] space-y-1",children:[c.jsxs("p",{className:i?"text-sm font-medium text-red-200":"text-xs text-white/60",children:[i?"First failure: ":"Consequence: ",zd(n.code)]}),c.jsx("p",{className:i?"text-sm text-white/85 whitespace-pre-wrap break-words":"text-xs text-white/55 whitespace-pre-wrap break-words",children:n.rawReason}),c.jsxs("p",{className:"text-[11px] text-white/60",title:_s(n.quality==="exact"?"exact":"inferred",[`evidence: ${n.evidenceSource}`,`confidence: ${n.confidence}`]),children:[n.domain," · ",n.confidence," confidence · via ",n.evidenceSource.replace(/_/g," ")," · ",n.quality,n.occurredAt?` · ${new Date(n.occurredAt).toLocaleString()}`:""]})]})}function hS({interval:n}){const i=Cx[n.category??"unknown"]??Cx.unknown,s=Ta(n.durationMs),u=n.category==="host_suspended";return c.jsxs("li",{className:`flex flex-wrap items-baseline gap-x-2 gap-y-0.5 py-1 border-b border-white/5 last:border-0 ${u?"text-amber-200/90":"text-white/70"}`,children:[c.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded border shrink-0 ${u?"border-amber-400/40 bg-amber-500/10":"border-white/15 bg-white/5"}`,title:u?"Overlapping durable host-sleep evidence split this gap — the host was suspended, not the agent.":"Observational gap with no new structured activity — not a diagnosis of what the agent was doing.",children:i}),c.jsx("span",{className:"text-xs tabular-nums",children:s??c.jsx(Vn,{reasons:n.reasons})}),c.jsx(ma,{quality:n.quality,reasons:n.reasons})]})}function mS({attempt:n}){const i=n.reuseKinds;return i===void 0?c.jsx("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60 italic",title:"Reuse unknown for this retry — no reuse evidence recorded.",children:"reuse unknown"}):i.length===0?c.jsx("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60",title:"Cold retry — no prior worktree, commit, or verification was reused.",children:"cold retry"}):c.jsx(c.Fragment,{children:i.map(s=>c.jsxs("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-cyber-teal/40 bg-cyber-teal/10 text-cyber-teal",title:`This retry preserved the prior ${yd[s]??s} instead of starting cold.`,children:["reused ",yd[s]??s]},s))})}function pS({attempt:n,isRetry:i}){const s=Ta(n.setup.durationMs),u=Ta(n.agentProcess.durationMs),d=Ta(n.validationPublish.durationMs),f=i&&n.role==="developer";return c.jsxs("li",{className:"py-1.5 border-b border-white/5 last:border-0 space-y-0.5",children:[c.jsxs("p",{className:"text-sm text-white/85",children:[c.jsx("span",{className:"capitalize",children:n.role}),c.jsxs("span",{className:"text-white/45",children:[n.runtime?` · ${n.runtime}`:"",n.model?` · ${n.model}`:"",` · round ${n.round} · ${n.status}`]}),n.publishOnly&&c.jsx("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-cyber-violet/40 bg-cyber-violet/10 text-cyber-violet-light",title:"Publish-only attempt: no agent process ran — the coordinator published prior work.",children:"publish-only"}),f&&!n.publishOnly&&c.jsx(mS,{attempt:n})]}),c.jsxs("p",{className:"text-xs text-white/50 tabular-nums",children:[c.jsxs("span",{title:s?void 0:`Setup unavailable — ${n.setup.reasons.join(", ")||"no reason recorded"}`,children:["Setup ",s??c.jsxs("span",{className:"italic",children:["Unavailable — ",n.setup.reasons.join(", ")||"no reason recorded"]})]}),c.jsx(ma,{quality:n.setup.quality,reasons:n.setup.reasons})," · ",c.jsxs("span",{title:u?void 0:`Agent process unavailable — ${n.agentProcess.reasons.join(", ")||"no reason recorded"}`,children:["Agent ",u??c.jsxs("span",{className:"italic",children:["Unavailable — ",n.agentProcess.reasons.join(", ")||"no reason recorded"]})]}),c.jsx(ma,{quality:n.agentProcess.quality,reasons:n.agentProcess.reasons})," · ",c.jsxs("span",{title:d?void 0:`Validation/publish unavailable — ${n.validationPublish.reasons.join(", ")||"no reason recorded"}`,children:["Validation/publish ",d??c.jsxs("span",{className:"italic",children:["Unavailable — ",n.validationPublish.reasons.join(", ")||"no reason recorded"]})]}),c.jsx(ma,{quality:n.validationPublish.quality,reasons:n.validationPublish.reasons})]}),n.failureCauses.length>0&&c.jsxs("p",{className:"text-[11px] text-white/60",children:["Failures: ",n.failureCauses.map(m=>zd(m.code)).join(", ")]})]})}function xS({analysis:n}){const i=Ta(n.elapsed.durationMs),s=Ta(n.exclusiveTotalMs),u=Ta(n.firstCheckpoint.msSinceWorkflowStart),d=n.nested.filter(D=>D.kind!=="unexplained_silence"),f=n.attempts.flatMap(D=>D.silence),m=n.attempts.length>0&&n.attempts.every(D=>D.silence.length===0&&D.silenceQuality==="unavailable"),y=n.attempts.filter(D=>D.silence.length===0&&D.silenceQuality==="unavailable"),v=n.waste.failedAttempts>0||n.waste.publishOnlyAttempts>0||n.attempts.some(D=>D.failureCauses.length>0||fS.has(D.status)),g=Ta(n.humanWaitMs),b=n.retry.reuseRate==null?null:`${Math.round(n.retry.reuseRate*100)}% reused`,L=(n.retry.preservedKinds??[]).map(D=>yd[D]??D),K=n.waste.failedAttempts>0||n.waste.publishOnlyAttempts>0;return c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{children:[c.jsxs("p",{className:"text-sm text-white/85 tabular-nums",children:["Elapsed ",i??c.jsx(Vn,{reasons:n.elapsed.reasons}),c.jsx(ma,{quality:n.elapsed.quality,reasons:n.elapsed.reasons})]}),c.jsxs("p",{className:"text-xs text-white/45 tabular-nums",title:"Unioned top-level phases with overlaps removed (human wait excluded). Nested waits below explain phases — they are never added to this total.",children:["Exclusive phase total ",s??c.jsx(Vn,{reasons:n.exclusiveTotalReasons}),c.jsx(ma,{quality:n.exclusiveTotalQuality,reasons:n.exclusiveTotalReasons}),c.jsx("span",{children:" · overlaps unioned, not summed"})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Phase breakdown"}),c.jsx("ul",{children:n.unionedDurations.map(D=>{const V=Ta(D.durationMs);return c.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-2 py-0.5 text-sm",children:[c.jsx("span",{className:"text-white/70 w-36 shrink-0",children:dS[D.phase]??D.phase}),c.jsx("span",{className:"text-white/85 tabular-nums",children:V??c.jsx(Vn,{reasons:D.reasons})}),c.jsx(ma,{quality:D.quality,reasons:D.reasons}),D.known<D.total&&c.jsxs("span",{className:"text-[11px] text-white/60",children:["(known ",D.known," of ",D.total,")"]})]},D.phase)})}),c.jsxs("p",{className:"text-xs text-white/45 tabular-nums mt-1",children:["Human wait ",g??c.jsx(Vn,{reasons:n.humanWaitReasons}),c.jsx(ma,{quality:n.humanWaitQuality,reasons:n.humanWaitReasons}),c.jsx("span",{title:"Human wait is tracked separately — it never adds to the phase total.",children:" · never additive"})]}),d.length>0&&c.jsx("ul",{className:"mt-1",children:d.map((D,V)=>c.jsxs("li",{className:"text-xs text-white/50 tabular-nums",children:[c.jsxs("span",{title:"Nested drill-down: explains its parent phase, never adds to the total.",children:["↳ ",D.kind==="human_wait"?"Human wait":D.category??D.kind]})," ",Ta(D.durationMs)??c.jsx(Vn,{reasons:D.reasons}),c.jsx(ma,{quality:D.quality,reasons:D.reasons})]},V))})]}),c.jsxs("div",{children:[c.jsxs("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:["Attempts (",n.attempts.length,")"]}),n.attempts.length===0?c.jsx("p",{className:"text-xs text-white/45 italic",children:"No attempts recorded yet."}):c.jsx("ul",{children:n.attempts.map((D,V)=>c.jsx(pS,{attempt:D,isRetry:V>0},D.sessionId))})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Failure"}),n.primaryFailure?c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(Rx,{cause:n.primaryFailure,primary:!0}),n.consequenceCauses.length>0&&c.jsx("div",{className:"space-y-1 opacity-80",children:n.consequenceCauses.map((D,V)=>c.jsx(Rx,{cause:D,primary:!1},`${D.code}-${V}`))})]}):v?c.jsxs("p",{className:"text-sm text-white/60 italic",title:_s("unavailable",n.primaryFailureReasons),children:["Unknown — ",n.primaryFailureReasons.join(", ")||"no failure evidence recorded"]}):c.jsx("p",{className:"text-sm text-white/45",children:"No failure recorded."})]}),c.jsxs("div",{children:[c.jsxs("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:["Retry waste (",n.waste.failedAttempts," failed attempt",n.waste.failedAttempts===1?"":"s",")"]}),K?c.jsxs("p",{className:"text-sm text-white/85 flex flex-wrap gap-x-3 gap-y-0.5 tabular-nums",children:[c.jsxs("span",{title:"Failed-attempt agent-process time over known values only",children:["Runtime ",c.jsx(Zr,{covered:n.waste.runtimeMs,format:D=>Ta(Math.round(D))??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt input tokens over known values only",children:["In ",c.jsx(Zr,{covered:n.waste.tokensIn,format:D=>Tx(D)??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt output tokens over known values only",children:["Out ",c.jsx(Zr,{covered:n.waste.tokensOut,format:D=>Tx(D)??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt known cost over known values only",children:["Cost ",c.jsx(Zr,{covered:n.waste.costUsd,format:D=>oS(D)??"?",unit:"attempts"})]})]}):c.jsx("p",{className:"text-sm text-white/45",children:"No failed attempts — no retry waste."})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"First checkpoint"}),n.firstCheckpoint.msSinceWorkflowStart==null&&n.firstCheckpoint.kind==null?c.jsxs("p",{className:"text-sm text-white/60 italic",title:_s(n.firstCheckpoint.quality,n.firstCheckpoint.reasons),children:["Unavailable — ",n.firstCheckpoint.reasons.join(", ")||"no checkpoint recorded"]}):c.jsxs("p",{className:"text-sm text-white/85 tabular-nums",children:[n.firstCheckpoint.kind?zd(n.firstCheckpoint.kind):"Checkpoint",n.firstCheckpoint.observedSha?` · ${n.firstCheckpoint.observedSha.slice(0,12)}`:"",u?` · ${u} after workflow start`:"",c.jsx(ma,{quality:n.firstCheckpoint.quality,reasons:n.firstCheckpoint.reasons})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Retry reuse"}),c.jsxs("div",{className:"flex flex-wrap gap-1.5",role:"group","aria-label":"Retry reuse summary",children:[c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-cyber-teal/40 bg-cyber-teal/10 text-cyber-teal",title:"Retries that preserved prior work — a reused worktree, commit, or verification receipt.",children:["Reused ",n.retry.reused]}),c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60",title:"Retries that started cold — no prior worktree, commit, or verification was reused.",children:["Cold ",n.retry.cold]}),n.retry.unknown>0&&c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60 italic",title:`Unknown reuse for ${n.retry.unknown} retr${n.retry.unknown===1?"y":"ies"} — ${n.retry.reasons.join(", ")||"no reuse evidence"}.`,children:["Unknown ",n.retry.unknown]}),n.retry.publishOnly>0&&c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-cyber-violet/40 bg-cyber-violet/10 text-cyber-violet-light",title:"Publish-only retries ran no agent process — the coordinator published already-verified work.",children:["Publish-only ",n.retry.publishOnly]}),c.jsxs("span",{className:"text-[11px] text-white/60 tabular-nums self-center",children:[n.retry.retries===0?"No retries":b??c.jsx(Vn,{reasons:n.retry.reasons}),c.jsx(ma,{quality:n.retry.quality,reasons:n.retry.reasons})]})]}),c.jsx("p",{className:"text-[11px] text-white/60 mt-0.5",children:n.retry.retries===0?"No retries — nothing to preserve.":L.length>0?`Preserved: ${L.join(", ")}.`:n.retry.unknown>0?`Preservation unknown for ${n.retry.unknown} retr${n.retry.unknown===1?"y":"ies"} — no reuse evidence.`:"No prior work preserved — every retry started cold."})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Silence"}),c.jsx("p",{className:"text-[11px] text-white/60 mb-1",children:"Silence is observational — gaps with no new structured activity. It describes what was observed, never a diagnosis."}),f.length===0?m?c.jsx("p",{className:"text-sm text-white/60 italic",children:"Unknown — silence cannot be derived without agent-process bounds."}):c.jsx("p",{className:"text-sm text-white/45",children:"No silence observed."}):c.jsxs(c.Fragment,{children:[c.jsx("ul",{"aria-label":"Observed silence intervals",children:f.map((D,V)=>c.jsx(hS,{interval:D},V))}),y.length>0&&c.jsx("ul",{"aria-label":"Attempts with unknown silence",className:"mt-1",children:y.map(D=>c.jsxs("li",{className:"text-[11px] text-white/60 italic py-0.5",children:["Silence unknown for attempt ",D.sessionId.length>12?`${D.sessionId.slice(0,8)}…`:D.sessionId," —"," ",D.silenceReasons.join(", ")||"no silence evidence recorded"]},D.sessionId))})]})]})]})}function yS({issueId:n}){const[i,s]=S.useState(null),[u,d]=S.useState(null),[f,m]=S.useState(!0);return S.useEffect(()=>{s(null),d(null),m(!0);let y=!1;return Hw(n).then(v=>{y||(s(v),m(!1))}).catch(v=>{y||(/not found/i.test(String(v))?(s(null),d(null)):d(String(v).replace(/^Error:\s*/i,"")),m(!1))}),()=>{y=!0}},[n]),c.jsxs("section",{"aria-labelledby":"execution-analysis-heading",className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03]",children:[c.jsx("h3",{id:"execution-analysis-heading",className:"font-ui-display text-sm font-medium text-white/85 mb-2",children:"Execution analysis"}),f&&c.jsx("p",{className:"text-xs text-white/40",children:"Loading execution analysis…"}),!f&&u&&c.jsx("p",{className:"text-xs text-red-300",children:u}),!f&&!u&&!i&&c.jsx("p",{className:"text-xs text-white/45",children:"No execution analysis yet — start the workflow to see where time goes."}),!f&&!u&&i&&c.jsx(xS,{analysis:i})]})}const vS="web";function gS(n){try{const i=JSON.parse(n);return typeof i.text=="string"?i.text:JSON.stringify(i,null,2)}catch{return n}}function Fo(n){const i=Math.floor(n/6e4);return i<60?`${i}m`:`${Math.floor(i/60)}h ${i%60}m`}function bS(n){if(!n)return"no heartbeat yet";const i=Math.max(0,Math.floor((Date.now()-new Date(n).getTime())/1e3));return i<5?"just now":i<60?`${i}s ago`:`${Math.floor(i/60)}m ago`}function vs(n){if(!n)return null;const i=n.split(/[/\\]/).filter(Boolean);return i.length<=2?n:i.slice(-2).join("/")}function Wo(n){var i;return[n.branch,n.tipLabel,(i=n.worktree)!=null&&i.path?vs(n.worktree.path):null].filter(Boolean).join(" · ")}function Po(n){var i;return[n.restartRisk?"restart risk":null,(i=n.worktree)!=null&&i.preserved?"dirty worktree preserved":null].filter(Boolean).map(s=>` · ${s}`).join("")}function ed(n){var i;return!!(n.restartRisk||(i=n.worktree)!=null&&i.preserved)}function wS(n,i){return!n||!i?!1:n===i?!0:n.includes(i)}function SS({busy:n,onConfirm:i,onCancel:s}){return c.jsxs("div",{className:"mt-2 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-2",children:[c.jsx("p",{className:"text-sm text-white/90 font-medium",children:"Close this issue?"}),c.jsx("p",{className:"text-sm text-white/70",children:"It will not execute. Any queue entry will be removed. History is retained and can be found as closed work — filter the Issues list by status closed or open this page directly."}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"px-4 py-1.5 text-sm rounded border border-red-400/50 text-red-200 hover:bg-red-500/20 disabled:opacity-50",disabled:n,onClick:i,children:"Close issue"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-1.5 text-sm text-white/60 hover:text-white",onClick:s,children:"Keep issue"})]})]})}function _S(n){const i=n.humanActions.find(s=>s.status==="open");if(i)return i.question;switch(n.issue.currentOwner){case"developer":return"Waiting on the developer";case"reviewer":return"Waiting on the reviewer";case"human":return"Waiting on you";default:return n.issue.status==="done"||n.issue.status==="closed"?"Complete":"Idle"}}function jS({issueId:n,detail:i,agents:s,onHumanActionsChanged:u,refresh:d,onError:f}){var Sa;const[m,y]=S.useState(null),[v,g]=S.useState({}),[b,N]=S.useState(""),[L,K]=S.useState(!1),[D,V]=S.useState(""),[O,Y]=S.useState(""),[J,ne]=S.useState(""),[pe,I]=S.useState(!1),[Ee,X]=S.useState(null),[be,$e]=S.useState(!1),[gt,xt]=S.useState(!1),[et,Tt]=S.useState(null),He=Z=>f(String(Z)),{issue:ie,timeline:U,humanActions:F,usageSummary:oe,readiness:je,humanWaitMs:Me,interventionCount:_,latestWorkflowInstance:B,activeWorkerSession:G,liveProgress:P,latestSessionFailure:re,branchTipStatus:ce,queued:Te,queueEntry:nt}=i,fe=s.find(Z=>Z.id===ie.developerAgentId),ot=fe&&!fe.healthy,ea=((Sa=fe==null?void 0:fe.issues[0])==null?void 0:Sa.message)??"Developer agent is unhealthy",lt=B?new Date(B.completedAt??Date.now()).getTime()-new Date(B.startedAt).getTime():0,va=F.filter(Z=>Z.status==="open"),ga=je.ok===!1||va.some(Z=>Z.actionType==="product_scope_decision"),ba=B!=null&&B.completedAt===null,Dt=ie.status==="ready"&&!ba,Ya=ie.status==="ready"&&!ba,wa=G&&G.status==="running"&&(ie.status==="developing"||ie.status==="reviewing"||ie.status==="repairing"),Rt=!!re&&!wa,Fe=async()=>{b.trim()&&(await Jw(n,b),N(""),d())},mn=()=>{V(ie.title),Y(ie.description??""),ne(ie.acceptanceCriteria??""),K(!0)},vl=async()=>{I(!0),f(null);try{await pd(n,{title:D.trim()||void 0,description:O.trim()||null,acceptanceCriteria:J.trim()||null}),K(!1),d()}catch(Z){He(Z)}finally{I(!1)}},gl=async()=>{I(!0),f(null);try{const Z=await Ey(n);X(Z.state==="admitted"?null:`Queued at position ${Z.position}${Z.waitReason?` — ${Z.waitReason}`:""}`),d()}catch(Z){He(Z)}finally{I(!1)}},yt=async()=>{I(!0),f(null);try{await Qw(n),d()}catch(Z){He(Z)}finally{I(!1)}},St=async()=>{I(!0),f(null);try{await Ty(n),X(null),$e(!1),d()}catch(Z){He(Z),d()}finally{I(!1)}},bl=async(Z,we,Ue)=>{I(!0),f(null);try{await pd(n,{repo:Z,developerAgentId:we,reviewerAgentId:Ue}),$e(!1),d()}catch(Qn){$e(!1),He(Qn),d()}finally{I(!1)}},wl=async()=>{I(!0),f(null);try{await Cy(n),d()}catch(Z){He(Z)}finally{I(!1)}},pn=async()=>{I(!0),f(null);try{await Gw(n),xt(!1),Tt("Issue closed — it will not execute. History is retained and can be found as closed work."),d()}catch(Z){He(Z)}finally{I(!1)}},yi=async()=>{if(confirm("Abort this workflow? The current worker will stop and the issue will close. History and evidence are kept.")){I(!0),f(null);try{await Zw(n),d()}catch(Z){He(Z)}finally{I(!1)}}},Gn=async(Z,we)=>{I(!0),f(null);try{await Ry(Z,vS,we),u(),d()}catch(Ue){He(Ue)}finally{I(!1)}},vi=()=>{m||$w(n).then(y).catch(Z=>He(Z))},Sl=Z=>{v[Z]||(g(we=>({...we,[Z]:{content:"",loading:!0}})),Vw(n,Z).then(we=>g(Ue=>({...Ue,[Z]:{content:we.content,loading:!1}}))).catch(we=>g(Ue=>({...Ue,[Z]:{content:"",loading:!1,error:String(we)}}))))};return c.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-4",children:c.jsxs("div",{className:"max-w-3xl",children:[c.jsx(xa,{to:"/issues",className:"font-ui-display inline-block text-sm text-white/50 hover:text-white mb-3",children:"← Issues"}),c.jsxs("div",{className:"flex items-start justify-between gap-4 mb-4",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-semibold text-white/90",children:ie.title}),c.jsxs("p",{className:"text-xs text-white/45 mt-1",children:["Owner: ",c.jsx("span",{className:"capitalize",children:ie.currentOwner}),ie.currentIntent?` · ${ie.currentIntent}`:""]}),c.jsxs("div",{className:"flex flex-wrap gap-3 mt-2 text-xs text-white/40",children:[ie.prUrl&&c.jsxs("a",{href:ie.prUrl,target:"_blank",rel:"noreferrer",className:"text-cyber-teal hover:underline",children:["PR #",ie.prNumber]}),ie.externalUrl&&c.jsx("a",{href:ie.externalUrl,target:"_blank",rel:"noreferrer",className:"text-cyber-teal hover:underline",children:ie.externalLabel??"External link"}),c.jsxs("span",{children:["Round ",ie.currentRound,"/",ie.maxReviewRounds]}),c.jsxs("span",{children:["Infra attempts ",ie.infraAttempts,"/",ie.maxInfraAttempts]}),c.jsxs("span",{title:"Wall-clock time from workflow start to completion (or now)",children:[Fo(lt)," elapsed"]}),c.jsxs("span",{title:`${oe.totalTokensIn} in / ${oe.totalTokensOut} out tokens`,children:["$",oe.totalCostUsd.toFixed(2)]}),Me>0&&c.jsxs("span",{title:"Time spent waiting on a human, excluding autonomous processing",children:[Fo(Me)," human wait"]}),_>0&&c.jsxs("span",{children:[_," intervention",_===1?"":"s"]})]})]}),c.jsx(My,{status:ie.status})]}),et&&c.jsx("div",{className:"mb-4 p-3 rounded border border-white/15 bg-white/[0.04]",children:c.jsx("p",{className:"text-sm text-white/85",children:et})}),c.jsx(nS,{issue:ie,agents:s,canEdit:Ya,editing:be,busy:pe,onBeginEdit:()=>$e(!0),onSave:(Z,we,Ue)=>void bl(Z,we,Ue),onCancel:()=>$e(!1)}),c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-panel-elevated/40 flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-xs text-white/45",children:"Next"}),c.jsx("p",{className:"text-sm text-white/85",children:_S(i)})]}),ba&&c.jsx("button",{type:"button",className:"btn-ghost-danger px-3 py-1.5 text-xs shrink-0 disabled:cursor-not-allowed disabled:opacity-60",disabled:pe,onClick:yi,children:"Abort workflow"})]}),nt&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-cyber-teal/30 bg-cyber-teal/5",children:[c.jsxs("p",{className:"text-xs text-cyber-teal font-medium uppercase tracking-wide",children:["Queued · position ",nt.position]}),c.jsx("p",{className:"text-sm text-white/80 mt-0.5",children:nt.waitReason??"Next up — starts as soon as the coordinator ticks"})]}),wa&&G&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-cyber-teal/35 bg-cyber-teal/5 space-y-1.5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-cyber-teal animate-pulse","aria-hidden":!0}),c.jsx("p",{className:"text-xs text-cyber-teal font-medium uppercase tracking-wide",children:"Running now"})]}),c.jsxs("p",{className:"text-sm text-white/90",children:[c.jsx("span",{className:"capitalize",children:G.role}),G.runtime?` · ${G.runtime}`:"",G.model?` · ${G.model}`:"",` · round ${G.round}`]}),c.jsxs("p",{className:"text-sm text-[#C4B643] truncate",title:P??ie.currentIntent??"session started",children:["Last progress: ",P??ie.currentIntent??"session started"]}),ce&&c.jsxs("p",{className:`text-xs ${ed(ce)?"text-amber-300":"text-white/55"}`,title:Wo(ce),children:["Branch tip: ",ce.tipLabel,Po(ce)]}),P&&ie.currentIntent&&!/session running/i.test(ie.currentIntent)&&!wS(ie.currentIntent,P)&&c.jsx("p",{className:"text-xs text-white/45 truncate",title:ie.currentIntent,children:ie.currentIntent}),c.jsxs("p",{className:"text-xs text-white/45",children:["Heartbeat ",bS(G.heartbeatAt),vs(G.worktreePath)?` · ${vs(G.worktreePath)}`:""]}),G.logPath&&c.jsxs("p",{className:"text-xs text-white/40 font-mono break-all",title:G.logPath,children:["Log: ",vs(G.logPath)??G.logPath]})]}),Rt&&re&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-1.5",children:[c.jsx("p",{className:"text-xs text-red-300 font-medium uppercase tracking-wide",children:"Latest session failure"}),c.jsx("p",{className:"text-sm text-white/90 whitespace-pre-wrap break-words",children:re.reason}),c.jsxs("p",{className:"text-xs text-white/45",children:[re.role?c.jsx("span",{className:"capitalize",children:re.role}):"Worker",re.outcome?` · ${re.outcome}`:"",` · ${new Date(re.when).toLocaleString()}`,` · infra ${re.infraAttempts}/${re.maxInfraAttempts}`]}),ce&&c.jsxs("p",{className:`text-xs ${ed(ce)?"text-amber-300":"text-white/55"}`,title:Wo(ce),children:["Branch tip: ",ce.tipLabel,Po(ce)]}),re.logPath&&c.jsxs("p",{className:"text-xs text-white/40 font-mono break-all",title:re.logPath,children:["Log: ",vs(re.logPath)??re.logPath]})]}),ce&&!wa&&!Rt&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03] space-y-1",children:[c.jsx("p",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Branch tip"}),c.jsxs("p",{className:`text-sm ${ed(ce)?"text-amber-300":"text-white/80"}`,title:Wo(ce),children:[ce.tipLabel,Po(ce)]})]}),!je.ok&&!va.some(Z=>Z.actionType==="product_scope_decision")&&c.jsx("div",{className:"mb-4 p-3 rounded border border-amber-400/30 bg-amber-500/10",children:c.jsxs("p",{className:"text-xs text-amber-300 font-medium",children:["Not startable yet — missing: ",je.missing.join(", ")]})}),va.length>0&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-2",children:[c.jsx("p",{className:"text-xs text-red-300 font-medium",children:"Human action needed"}),va.map(Z=>{const we=Z.actionType==="product_scope_decision";return c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"text-sm text-white/80",children:Z.question}),we?je.ok&&c.jsx("button",{type:"button",className:"btn-gold px-3 py-1 text-xs",disabled:pe,onClick:()=>Gn(Z.id,"resume"),children:"Resume"}):c.jsx(zy,{options:Uy(Z),disabled:pe,onChoose:Ue=>Gn(Z.id,Ue)})]},Z.id)})]}),ga&&!L&&c.jsx("button",{type:"button",className:"font-ui-display mb-4 text-xs text-cyber-teal hover:underline",onClick:mn,children:"Edit title / description / acceptance criteria"}),L&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:D,onChange:Z=>V(Z.target.value),placeholder:"Title"}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:2,value:O,onChange:Z=>Y(Z.target.value),placeholder:"Description"}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:2,value:J,onChange:Z=>ne(Z.target.value),placeholder:"Acceptance criteria"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm",disabled:pe,onClick:vl,children:"Save"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-1.5 text-sm text-white/60 hover:text-white",onClick:()=>K(!1),children:"Cancel"})]})]}),(ie.status==="ready"||ie.status==="needs_human"&&va.length===0)&&c.jsxs("div",{className:"mb-4 space-y-2",children:[ot&&c.jsxs("p",{className:"text-sm text-amber-200/90",children:["Fix before Start: ",ea]}),Ee&&c.jsx("p",{className:"text-sm text-amber-200/90",children:Ee}),c.jsxs("div",{className:"flex flex-wrap gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-2 disabled:opacity-50",disabled:!je.ok||pe||!!ot,title:ot?ea:"Run next — move to the front of the admission queue; runs now if a slot is free, otherwise waits first with a reason",onClick:gl,children:"Run next"}),c.jsx("button",{type:"button",className:"px-4 py-2 text-sm border border-cyber-teal/40 rounded text-cyber-teal hover:bg-cyber-teal/10 disabled:opacity-50",disabled:!je.ok||pe||!!ot,title:ot?ea:"Execute now — start immediately, skipping queue order; refuses (changing nothing) when capacity, readiness, blockers, or agent health prevents it",onClick:St,children:"Execute now"}),Te?c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm border border-white/15 rounded text-white/60 hover:text-white disabled:opacity-50",disabled:pe,onClick:wl,children:"Remove from queue"}):c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm border border-white/15 rounded text-white/80 hover:border-cyber-teal/50 hover:text-cyber-teal disabled:opacity-50",disabled:pe||ba,title:"Add to queue — append to the end of the admission queue; does not start anything now",onClick:yt,children:"Add to queue"})]}),Te&&Ya&&!be&&c.jsx("p",{className:"text-xs text-white/40",children:"Queued — edit repository / agents from the Configuration section above; position is kept."})]}),c.jsx(yS,{issueId:n}),c.jsx("div",{className:"border-t border-white/10 pt-3",children:c.jsx(cS,{events:U})}),c.jsxs("div",{className:"mt-4 flex gap-2",children:[c.jsx("input",{className:"flex-1 bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"Guide this issue…",value:b,onChange:Z=>N(Z.target.value),onKeyDown:Z=>Z.key==="Enter"&&Fe()}),c.jsx("button",{type:"button",className:"btn-gold px-4",onClick:Fe,children:"Send"})]}),Dt&&c.jsxs("details",{className:"mt-6",children:[c.jsx("summary",{className:"text-xs text-white/45 cursor-pointer hover:text-white/70",children:"More actions"}),c.jsxs("div",{className:"mt-2 space-y-2",children:[c.jsx("p",{className:"text-xs text-white/45",children:"Remove from queue means do not run yet — the issue stays ready and can run later. Close issue means this work is no longer needed — it will never execute."}),gt?c.jsx(SS,{busy:pe,onConfirm:()=>void pn(),onCancel:()=>xt(!1)}):c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/50 hover:text-red-300 underline underline-offset-2 disabled:opacity-50",disabled:pe,title:"Retire this issue without running it — removes any queue entry, keeps history as closed work",onClick:()=>xt(!0),children:"Close issue"})]})]}),c.jsxs("details",{className:"mt-6",onToggle:Z=>Z.currentTarget.open&&vi(),children:[c.jsx("summary",{className:"text-xs text-white/45 cursor-pointer hover:text-white/70",children:"Evidence & raw trace"}),m?c.jsxs("div",{className:"mt-2 space-y-3 text-xs text-white/60",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-white/45 mb-1",children:"Worker sessions"}),m.workerSessions.map(Z=>{const we=m.usageEvents.filter(_a=>_a.workerSessionId===Z.id),Ue=we.reduce((_a,R)=>_a+(R.costUsd??0),0),Qn=we.reduce((_a,R)=>_a+(R.tokensIn??0),0),_l=we.reduce((_a,R)=>_a+(R.tokensOut??0),0);return c.jsxs("p",{children:[Z.role," round ",Z.round," · ",Z.status,Z.startedAt&&Z.completedAt?` · ${Fo(new Date(Z.completedAt).getTime()-new Date(Z.startedAt).getTime())}`:"",we.length>0?` · $${Ue.toFixed(3)} · ${Qn}→${_l} tok`:""]},Z.id)}),m.workerSessions.length===0&&c.jsx("p",{className:"text-white/35",children:"None yet."})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-white/45 mb-1",children:"Artifacts"}),m.artifacts.map(Z=>{const we=v[Z.id];return c.jsxs("details",{className:"mb-1.5",onToggle:Ue=>Ue.currentTarget.open&&Z.blobPath&&Sl(Z.id),children:[c.jsxs("summary",{className:"cursor-pointer hover:text-white/80",children:[Z.kind," · ",new Date(Z.createdAt).toLocaleString()]}),c.jsxs("div",{className:"mt-1 pl-3 border-l border-white/10 space-y-1",children:[Z.contentJson&&c.jsx("pre",{className:"whitespace-pre-wrap break-words text-white/55",children:gS(Z.contentJson)}),Z.blobPath&&c.jsxs("div",{children:[c.jsxs("p",{className:"text-white/40",children:["Raw trace: ",Z.blobPath]}),(we==null?void 0:we.loading)&&c.jsx("p",{className:"text-white/35",children:"Loading trace…"}),(we==null?void 0:we.error)&&c.jsx("p",{className:"text-red-300/80",children:we.error}),we&&!we.loading&&!we.error&&c.jsx("pre",{className:"mt-1 max-h-64 overflow-y-auto whitespace-pre-wrap break-words text-white/50 bg-black/20 rounded p-2",children:we.content||"(empty)"})]}),!Z.contentJson&&!Z.blobPath&&c.jsx("p",{className:"text-white/35",children:"No content recorded."})]})]},Z.id)}),m.artifacts.length===0&&c.jsx("p",{className:"text-white/35",children:"None yet."})]})]}):c.jsx("p",{className:"text-xs text-white/40 mt-2",children:"Loading…"})]})]})})}function NS({issueId:n,agents:i,onHumanActionsChanged:s}){const[u,d]=S.useState(null),[f,m]=S.useState(null),[y,v]=S.useState(!1),g=()=>Ay(n).then(b=>{d(b),m(null),v(!1)}).catch(b=>{const N=String(b).replace(/^Error:\s*/i,"").trim();/^not found$/i.test(N)?(v(!0),m(null),d(null)):(m(N),v(!1))});return S.useEffect(()=>{d(null),m(null),v(!1),g();const b=setInterval(g,4e3);return()=>clearInterval(b)},[n]),y?c.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-10",children:c.jsxs("div",{className:"max-w-md space-y-3",children:[c.jsx("h2",{className:"text-lg font-semibold text-white/90",children:"Issue not found"}),c.jsx("p",{className:"text-sm text-white/55",children:"No issue exists for this ID — it may have been deleted, or the link is wrong."}),c.jsx(xa,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]})}):f?c.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-6 space-y-3",children:[c.jsx("p",{className:"text-red-300 text-sm",children:f}),c.jsx(xa,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]}):u?c.jsx(jS,{issueId:n,detail:u,agents:i,onHumanActionsChanged:s,refresh:g,onError:b=>m(b)},n):c.jsx("div",{className:"p-6 text-white/50 text-sm",children:"Loading…"})}function AS(){return c.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-10",children:c.jsxs("div",{className:"max-w-md space-y-3",children:[c.jsx("h2",{className:"font-ui-display text-lg font-semibold text-white/90",children:"Page not found"}),c.jsx("p",{className:"text-sm text-white/55",children:"That URL is not a destination in Agent Dealer."}),c.jsx(xa,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]})})}function ES(){return c.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 overflow-hidden","aria-hidden":!0,children:[c.jsx("div",{className:"absolute top-16 left-12",children:c.jsx("div",{className:"ambient-orb ambient-orb-a w-[26rem] h-[26rem] rounded-full bg-cyan-500/10 blur-3xl"})}),c.jsx("div",{className:"absolute bottom-20 right-12",children:c.jsx("div",{className:"ambient-orb ambient-orb-b w-[26rem] h-[26rem] rounded-full bg-pink-500/10 blur-3xl"})}),c.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",children:c.jsx("div",{className:"ambient-orb ambient-orb-c w-[22rem] h-[22rem] rounded-full bg-blue-500/[0.07] blur-3xl"})})]})}function TS({className:n="w-5 h-5"}){return c.jsxs("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:n,"aria-hidden":!0,children:[c.jsx("circle",{cx:"6.75",cy:"6.25",r:"3.25"}),c.jsx("circle",{cx:"13.5",cy:"6.75",r:"2.85",opacity:"0.85"}),c.jsx("path",{d:"M1.75 16v-1.1c0-2.35 1.928-4.25 4.3-4.25 1.16 0 2.21.456 3 1.2.79-.744 1.84-1.2 3-1.2 2.372 0 4.3 1.9 4.3 4.25V16H1.75z"})]})}const CS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAN5UlEQVR4AeydXagdVxmGF7loIKSpN/WHttqKktpAvWkVoRctp4gRtf4QbxRrREEb0wtRGkRovLCmKC1Y641CFGpBCtpIsVfHRvAm5KpIrMGfCCJUa8GmTWl6k+5nznlPvzOZ2Xtmz5o1a/Z8Ie/+vjU/a6351nPe/Xv22bFr185LLq9BbAZ2BP/nFeihAg5WD0X1LkNwsJyCXirgYPVSVu/UwXIGeqmAg9VLWTPsNPGUHKzEBZ/KcA7WVFY68XU6WIkLPpXhHKyprHTi63SwEhc89nDv37cndpdR+nOwopQxfScA9dDRfQGRM4O1ew+Fd3/wVtLB5WANtgTLDQxEwITI6eXoDz8dHvjrmbB2+J6ZDrFpcDlYgy9BswkAETAhcnvWnlfOBsS2G2aOlYNrOVisRsYCImBC5HVTveb5327tWjs8vGs5WFvLkVcCRMCEyO3szu/ea5tFjmMhGjm4loPFSmQkIAImRG6nBlDPvedbAZHbfeQ5uZaDxYpkICACJkRupwREwIR+c3w9fPu9+8LRb/7aHlLkOBaiMbRrOViswoACImBC5HYqVUCt/+jR4pBnz5wPqGiYm1xcy8F6c1GSZkAETIjcDj4PKHvcL574l20WuRyLxpCu5WCxAgkFRMCEyO3QTYHSOTgWUlvx2gyeITpYWo2eIxABEyK3w7UFyp5b5Vr27nAo13Kw7Cr1kAMRMCFyO0QXoNQPjoXUVhzatRwsrUTkCETAhMht9zGAsv3l6FoOll2hCDkQARMit13GBkp941hIbcUhXcvB0ip0jEAETIjcdtcXUHaM3Fwra7Bs4XLNgQiYELmdZwqgNB6OhdRWHMq1HCytQMsIRMCEyO3pKYGy4+bkWg6WXZkGORABEyK3pwwFlOaAYyG1FYdwLQdL1V8QgQiYELk93AJ16dyt4R2PXxNueXm/PSRZnotrOVgLlhyIgAmR28MtULw5/NID58LuP11ZHHLj9bcFVDQS3uBYqDxkatdysMorsNkGImBC5Jubi1AGik8b8ObwiWeOFft1c9cdR5QmjTm4loNVWnIgAiZEbnfXAaVj/vLPPwakNo6F1E4VcSxUHi+la7UDqzzTFWsDE2oLlC2Du9ZGNRysjTrU3sqliOdOnQ7c5dUePNuBY6FZWvzHsVDRSHiDY6HykKlcy8EylT91+l2mtZHy+SZEq+knBdy1gn+jH8DgKPcdfCp85AOPh4uv3symbbIfQ2nyGzA4FlIn9I/UThVxLFQeL4VrTdqxWGyAQhQfGF564XOk24RjITa6a1GFxZokWGWgHjz+sYC4C3vtws0r5Vp1CPTtWpMCqw4onIoFIKJVcC2e2fIMF3FtVjwRQdpW4cLatXScBFiLgLLVS+lad3/2urD+xIcCENg5dMnpC5gQue2Lx49/3/Odyt9LbPLY0fa1KF9psNoApULhWKhP1xJQXzhwbTHs3QeuK2KXGyACJkRu++IB/DeOngl/OPnxcOncLXbXVh7btVYSrGWA2qrwLDk7ewW9j8daV139y/Dhj34vCKjZUMV/QEBFo+UN5wETIrenCyigIseNr/jPznDFf3faw7bymK61UmB1BUoVfnLzPb9YrvX8ha+Fd960P1x19WMa4rLY1rWACJgQue0QiIAJkWsfToyu3HyjXNsVY7rWSoAVCygVmHji5LHQ1bXKd3n0WyfgQHX7tZ1jgAmRazsRiIAJkbOtrFSuNWqw+gBKC9HVtVj08l0effNsjO9gINK2muda9AdMiNyeB0TAhMjtvnKOY6G+XWuUYPUJlF2ILq718u69oQoe+mf7v9/+CdJtAhhkN9IGJkRu9wERMCFyu29ensK1RgVWKqC0KMu4Ft+m95XHfh6+PFMVPLyCj4ALaSxFuRYQARMi134iEAETImdbG+FYqE/XGgVYqYGyi9TGtQQUD4Lpg0VH5FZ677EKPCACJkRuz6MvYELkdl/bvG/XyhqsIYHSQrVxLQHFx2t+9vkvhp/OVPVpThwL4VhIYyn2CZTGwLFQX66VJVg5AKUFIDZ1LY4VUP84dZpm8R1WVe4i1+KxWHFgxQ3n4U6IvOKQTpv6dK2swMoNKK1aU9fS8eVY51rv+9sPggArnwNIfQGlsXAs1IdrZQFWrkBpAYi4FndbiLaVhaPq1WsgQfYccu4OiUOqL9caFKwxAKVFx7V4O+SFHQc2NplbAEFs4nEWzwzJrZ7983nbrM0Bl9e5fvz0rtpjYu7AsVBs1xoErDEBZRcR1+JNXBbfbievcy0eiPMMr+rFUs6T6BOgfvfi7eGhr34/6DGa9vcZ+3CtpGCNFSgtahvX+tSX7iz+zg1QAZf6KMcyUDyTTAkV88GxUEzXSgLW2IGi+NIi19rzytnAg/Kv779w2eesgAjRF9E61BBAMQ8ptmv1CtYqAaUFWORaQAVcOp4oiACJF0WJussbGijmh3AsFMu1egFrFYGi+NI819IxRAsUOdt4dshjqFyAYk5STNeKCtaqA6UFmOdaHANEuBIiZ5t9NT71YyjGbyIcC8VwrShg5QFUk9LFO6bKtYAImBC5Riu/Gq/tOcZYrtUJrCkCJRisawERMCFyHTPGiGOhrq61FFhTBsrCgms99/vXKn/rxR5X9Wq83Z9bHsO1WoHlQG1HANd6+MHPBB4/ofVHfrL9gM1W3avxm7uzCzgW6uJajcByoOavPc/wEN9EA2BVR0/NteaC5UBVITJ/2/ojj1YeMDXXqgTLgapko9FGXkpw1yp9jVFkoBotxCoeNCXXqlu/wrEsUOQ82+HbV3gAV3eib6+vwKRc695DlYUowGIPQBHR3utvI7g6VGAqrrV2+J7KKhVg4UxIRwAZUttj+wpM3bUKsCgbL4oRpaG+o1zjr0KcsmttgYVjIS0ojoXU9ti+AlN2rS2wKJu7FlWIq0m41qxk5cda28DCsdDsuOI/joWKht8sVYGputY2sKicuxZViKsputZlYOFYSKXFsZDaHttXYIqudRlYlM1diyrE1dRcqxIsHAuptDgWUttj+wpMzbUqwaJs7lpUIa6m5Fq1YOFYSKXFsZDaHttXIJ1rtZ9b2zMwHr5yoOobmPl0Ry1YDMTJRMlfjVcllo+r4lqvv+1iePHO/4XX33pxqxgApV8cmQsWjoV0Jo6F1PbYvgJjdy2+8ETfXCioLFBcH1WZCxYHuGtRhbgao2tZoPg0LBWpAortaCFYOBbiYIRjIXLXchXgp5pFqTp77XD155uqjk2xrS1QmtNCsDjQXYsqxFXurrUsUKpSI7BwLKSTcCyktsf2FcjVtboCpUo0AouD3bWowtKqPDEn14oFlC60MVg4FtKJOBZS22P7CuTgWrGBUhUag8UJ7lpUIa6Gcq2+gFJ1WoGFYyGdjGMhtT22r0Bq1+obKFWgFVic5K5FFeIqhWulAkqVaQ0WjoXUAY6F1PbYvgJ9ulZqoHT1rcHiRHctqhBXsV1rKKBUlaXAwrGQOsGxkNpjiLnNMZZrDQ2U6roUWJzsrkUV4qqLa+UClCqyNFg4FlJHOBZS22P7CizjWrkBpateGiw6cNeiCnHV1LVyBUrV6AQWjoXUGY6F1PbYvgKLXCt3oHTFncCiE3ctqhBX81yLvzXd5PNQcWfUvrfOYOFYSEPjWEhtj+0rMM+16I3PcukjwBzLttzUGSwuKIpr0ZFrqwJVrjUGoHQBUcDCsZA6xbGQ2h7bVYDaHbjp/qDfgBkTULrSKGDRmbsWVegmgLrv4FMB0RNf7537XR7zrFI0sHAspEEoElLbY30FqBMwIY7i+1/R0796OOlfWmXsWIoGFhNy16IKzVUHlP0Bbd5bXkdGBYuCIF0ihUNqe9yoADXBnRBbcCdka8f2MSsqWBTCXYsqVGsKQOnK54ClQ9pFfuqQzqKYSO0pRq4fd0JcP+6EbJ3YvkqKDhbFcdeiCiFMEaiNKy/9yRNt7Br5SUTqhwIjtVc9cq24E+JacSdka8L2VVYvjkXBpuhaDhQrv6HewOKnE20Ms3G3QOHVXqXIdeFOiOvCnZC9frZPSb2BRRFX3bUcKFa5Wr2CxU8s0tAsBFJ7rJFrwJ0Q14A7IXutbB+L+phnr2Ax4VVyLQeKFW2m3sHipxhpOiwOUnsMkfniToj54k7IXhfbXW9WoHewGGqsruVAsXrLKQlY/GQjTZEFQ2rnFpkb7oSYG+6E7DWw3VVfgSRgMfwYXOuTdxwJx7/7/63PQwETcqBYwXZKBhaLgzQ9XAGpPWQUUHfdfiQwR2BC5EPOa8xjJwOLIpVd68Ybhv3b09kCRbFGrqRg4QBINcMhlKeMDlT/1U4KFpdTdi0Wme0pxFg8hgJoAOfuDpGnGH9KYyQHi0VEKjKLrLyv6ED1Vdn6fpODxVRSuZYDRbWH0SBg4VhIlxzbtSxQJ04eCwfvf0vwuzxVO00cBCwurQ/XqgLqyWeOMZwrcQUGAwvHQrreLq7VP1CapcemFRgMLCbY1bUcKKqYpwYFC8dCKk1T13KgVLF846BgUZY2ruVAUbFxaHCwcCykclW5lgOl6ownDg4WpapzLQeK6oxTWYCFYyGVENfSWy96HcpfNlB1xhGzAItSlV1rAVCc4sq4AtmAhWMhBypjWlpMLRuwmDNvu/hdHpUYv7ICa/zl9CtQBRwsVcJj1Ao4WFHL6Z2pAg6WKuExagWigRV1Vt7Z6CvgYI1+CfO8AAcrz3UZ/awcrNEvYZ4X4GDluS6jn5WDNfolzPMCHKw81yXjWTWb2hsAAAD//0DhVxwAAAAGSURBVAMA8NLI/5AoLlwAAAAASUVORK5CYII=";function RS({className:n="",size:i=36}){return c.jsx("img",{src:CS,alt:"",width:i,height:i,className:`shrink-0 object-contain ${n}`,"aria-hidden":!0,draggable:!1})}const kx=5e3;function td({isActive:n}){return`font-ui-display px-3 py-2 text-base rounded ${n?"bg-cyber-teal/20 text-cyber-teal":"text-white/60 hover:text-white"}`}function kS({agents:n,onHumanActionsChanged:i}){const{issueId:s}=Q0();return s?c.jsx(NS,{issueId:s,agents:n,onHumanActionsChanged:i},s):c.jsx(Ix,{to:"/issues",replace:!0})}function OS({openHumanActionCount:n,agentCount:i,agentIssueCount:s}){return c.jsxs("header",{className:"px-6 py-4 border-b border-white/10 flex flex-wrap gap-4 items-center justify-between glass-header shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-6",children:[c.jsxs(xa,{to:"/issues",className:"flex items-center gap-3 text-left rounded hover:opacity-90 transition-opacity focus-visible:outline focus-visible:outline-2 focus-visible:outline-cyber-teal/45","aria-label":"AgentDealer — go to Issues",title:"AgentDealer — go to Issues",children:[c.jsx(RS,{size:40}),c.jsxs("div",{children:[c.jsx("h1",{className:"font-mono text-xl font-bold sm:text-2xl",style:{background:"linear-gradient(to right, #C4B643, #D4C760)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"AgentDealer"}),c.jsx("p",{className:"text-sm text-cyber-teal",children:"One issue, one durable coordination record"})]})]}),c.jsxs("nav",{className:"flex gap-1",children:[c.jsxs(Xr,{to:"/issues",className:td,children:["Issues",n>0&&c.jsxs("span",{className:"ml-1.5 inline-flex items-center gap-0.5 font-mono text-xs leading-none bg-red-500/20 text-red-300 px-1.5 py-0.5 rounded tabular-nums border border-red-400/30 align-middle",title:`${n} open human action${n===1?"":"s"}`,children:[c.jsx(ru,{className:"w-3 h-3 shrink-0"}),n]})]}),c.jsx(Xr,{to:"/reports/execution",className:td,children:"Reports"})]})]}),c.jsxs(Xr,{to:"/agents",className:({isActive:u})=>`${td({isActive:u})} inline-flex items-center gap-1.5 transition-colors`,"aria-label":"Agents",title:"Agents",children:[c.jsx(TS,{className:"w-6 h-6 shrink-0"}),c.jsx("span",{children:"Agents"}),i>0&&c.jsx("span",{className:"font-mono text-xs leading-none bg-white/10 text-white/55 px-1.5 py-0.5 rounded tabular-nums border border-white/10",title:`${i} configured agent${i===1?"":"s"}`,children:i}),s>0&&c.jsxs("span",{className:"inline-flex items-center gap-0.5 font-mono text-xs leading-none bg-red-500/20 text-red-300 px-1.5 py-0.5 rounded tabular-nums border border-red-400/30",title:`${s} need${s===1?"s":""} attention`,children:[c.jsx(ru,{className:"w-3 h-3 shrink-0"}),s]})]})]})}function MS(){const[n,i]=S.useState([]),[s,u]=S.useState(0),[d,f]=S.useState(!1),[m,y]=S.useState([]),v=S.useCallback(()=>{Rw().then(({agents:L,issueCount:K})=>{i(L),u(K)}).catch(console.error),Ny().then(L=>f(L.connected)).catch(()=>f(!1))},[]),g=S.useCallback(()=>Fw().then(y).catch(()=>{}),[]);S.useEffect(()=>{v();const L=setInterval(v,kx);return()=>clearInterval(L)},[v]),S.useEffect(()=>{g();const L=setInterval(()=>void g(),kx);return()=>clearInterval(L)},[g]);const b=m.length,N=n.length;return c.jsxs(c.Fragment,{children:[c.jsx(ES,{}),c.jsxs("div",{className:"relative z-10 min-h-screen flex flex-col",children:[c.jsx(OS,{openHumanActionCount:b,agentCount:N,agentIssueCount:s}),c.jsx("main",{className:"flex-1 flex overflow-hidden",children:c.jsxs(rb,{children:[c.jsx(ol,{path:"/",element:c.jsx(Ix,{to:"/issues",replace:!0})}),c.jsx(ol,{path:"/issues",element:c.jsx(Z2,{agents:n,humanActions:m,onHumanActionsChanged:g})}),c.jsx(ol,{path:"/issues/:issueId",element:c.jsx(kS,{agents:n,onHumanActionsChanged:g})}),c.jsx(ol,{path:"/agents",element:c.jsx(w2,{agents:n,agentDeckOnline:d,onRefresh:v})}),c.jsx(ol,{path:"/reports/execution",element:c.jsx(tS,{})}),c.jsx(ol,{path:"*",element:c.jsx(AS,{})})]})})]})]})}function DS(){return typeof document>"u"?Promise.resolve():document.fonts.load('13px "Monaco"').then(()=>{}).catch(()=>{})}DS();s0.createRoot(document.getElementById("root")).render(c.jsx(S.StrictMode,{children:c.jsx(Ob,{children:c.jsx(MS,{})})}));