agent-dealer 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/server/dist/adapters/github.js +80 -4
- package/bundle/server/dist/adapters/github.test.js +83 -1
- package/bundle/server/dist/adapters/worktree-deps.js +96 -0
- package/bundle/server/dist/adapters/worktree-deps.test.js +144 -0
- package/bundle/server/dist/coordinator/auto-merge.js +205 -1
- package/bundle/server/dist/coordinator/checks-wait-config.js +19 -0
- package/bundle/server/dist/coordinator/commands.js +194 -18
- package/bundle/server/dist/coordinator/commands.test.js +47 -0
- package/bundle/server/dist/coordinator/developer-effect.js +145 -3
- package/bundle/server/dist/coordinator/developer-effect.test.js +288 -3
- package/bundle/server/dist/coordinator/human-resolution.js +19 -0
- package/bundle/server/dist/coordinator/human-resolution.test.js +33 -0
- package/bundle/server/dist/coordinator/operator-criteria.js +168 -0
- package/bundle/server/dist/coordinator/operator-criteria.test.js +78 -0
- package/bundle/server/dist/coordinator/operator-verification.integration.test.js +347 -0
- package/bundle/server/dist/coordinator/playbook-feedback.js +3 -0
- package/bundle/server/dist/coordinator/projection.js +10 -4
- package/bundle/server/dist/coordinator/projection.test.js +13 -0
- package/bundle/server/dist/coordinator/prompts.js +134 -1
- package/bundle/server/dist/coordinator/prompts.test.js +148 -0
- package/bundle/server/dist/coordinator/recovery.js +57 -3
- package/bundle/server/dist/coordinator/recovery.test.js +67 -8
- package/bundle/server/dist/coordinator/repair-cycle.integration.test.js +1 -0
- package/bundle/server/dist/coordinator/reviewer-effect.js +6 -0
- package/bundle/server/dist/coordinator/routing.js +45 -6
- package/bundle/server/dist/coordinator/routing.test.js +62 -15
- package/bundle/server/dist/coordinator/usage-cap-defer.js +61 -0
- package/bundle/server/dist/db/ci-attempts-migration.test.js +70 -0
- package/bundle/server/dist/db/index.js +13 -0
- package/bundle/server/dist/db/schema.sql +2 -0
- package/bundle/server/dist/repository/issues.js +39 -3
- package/bundle/server/dist/repository/work-items.js +7 -0
- package/bundle/server/dist/runners/muse-code-args.js +25 -0
- package/bundle/server/dist/runners/muse-code-args.test.js +30 -0
- package/bundle/server/package.json +2 -2
- package/bundle/server/static-ui/assets/index-CU6fNntg.js +64 -0
- package/bundle/server/static-ui/index.html +1 -1
- package/bundle/shared/dist/human-actions.d.ts +4 -4
- package/bundle/shared/dist/human-actions.js +8 -0
- package/bundle/shared/dist/issues.d.ts +30 -0
- package/bundle/shared/dist/issues.js +14 -0
- package/bundle/shared/dist/issues.test.js +2 -0
- package/bundle/shared/dist/workflow.d.ts +4 -4
- package/bundle/shared/dist/workflow.js +6 -0
- package/bundle/shared/dist/workflow.test.js +1 -0
- package/bundle/shared/package.json +1 -1
- package/dist/action.js +4 -1
- package/dist/action.test.js +42 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/bundle/server/static-ui/assets/index-B6SVCzMR.js +0 -64
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.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 Vo={exports:{}},vs={};/**
|
|
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 Qp;function j0(){if(Qp)return vs;Qp=1;var n=Symbol.for("react.transitional.element"),l=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 x in d)x!=="key"&&(f[x]=d[x])}else f=d;return d=f.ref,{$$typeof:n,type:u,key:m,ref:d!==void 0?d:null,props:f}}return vs.Fragment=l,vs.jsx=s,vs.jsxs=s,vs}var Xp;function N0(){return Xp||(Xp=1,Vo.exports=j0()),Vo.exports}var c=N0(),Zo={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 Kp;function _0(){if(Kp)return ve;Kp=1;var n=Symbol.for("react.transitional.element"),l=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"),x=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),L=Symbol.iterator;function X(_){return _===null||typeof _!="object"?null:(_=L&&_[L]||_["@@iterator"],typeof _=="function"?_:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,D={};function B(_,$,I){this.props=_,this.context=$,this.refs=D,this.updater=I||C}B.prototype.isReactComponent={},B.prototype.setState=function(_,$){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,_,$,"setState")},B.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function Z(){}Z.prototype=B.prototype;function W(_,$,I){this.props=_,this.context=$,this.refs=D,this.updater=I||C}var ce=W.prototype=new Z;ce.constructor=W,Y(ce,B.prototype),ce.isPureReactComponent=!0;var K=Array.isArray;function Te(){}var J={H:null,A:null,T:null,S:null},be=Object.prototype.hasOwnProperty;function Ye(_,$,I){var te=I.ref;return{$$typeof:n,type:_,key:$,ref:te!==void 0?te:null,props:I}}function vt(_,$){return Ye(_.type,$,_.props)}function ft(_){return typeof _=="object"&&_!==null&&_.$$typeof===n}function tt(_){var $={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(I){return $[I]})}var Lt=/\/+/g;function wt(_,$){return typeof _=="object"&&_!==null&&_.key!=null?tt(""+_.key):$.toString(36)}function Fe(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(Te,Te):(_.status="pending",_.then(function($){_.status==="pending"&&(_.status="fulfilled",_.value=$)},function($){_.status==="pending"&&(_.status="rejected",_.reason=$)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function U(_,$,I,te,me){var xe=typeof _;(xe==="undefined"||xe==="boolean")&&(_=null);var fe=!1;if(_===null)fe=!0;else switch(xe){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(_.$$typeof){case n:case l:fe=!0;break;case b:return fe=_._init,U(fe(_._payload),$,I,te,me)}}if(fe)return me=me(_),fe=te===""?"."+wt(_,0):te,K(me)?(I="",fe!=null&&(I=fe.replace(Lt,"$&/")+"/"),U(me,$,I,"",function(lt){return lt})):me!=null&&(ft(me)&&(me=vt(me,I+(me.key==null||_&&_.key===me.key?"":(""+me.key).replace(Lt,"$&/")+"/")+fe)),$.push(me)),1;fe=0;var st=te===""?".":te+":";if(K(_))for(var we=0;we<_.length;we++)te=_[we],xe=st+wt(te,we),fe+=U(te,$,I,xe,me);else if(we=X(_),typeof we=="function")for(_=we.call(_),we=0;!(te=_.next()).done;)te=te.value,xe=st+wt(te,we++),fe+=U(te,$,I,xe,me);else if(xe==="object"){if(typeof _.then=="function")return U(Fe(_),$,I,te,me);throw $=String(_),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return fe}function F(_,$,I){if(_==null)return _;var te=[],me=0;return U(_,te,"","",function(xe){return $.call(I,xe,me++)}),te}function ie(_){if(_._status===-1){var $=_._result;$=$(),$.then(function(I){(_._status===0||_._status===-1)&&(_._status=1,_._result=I)},function(I){(_._status===0||_._status===-1)&&(_._status=2,_._result=I)}),_._status===-1&&(_._status=0,_._result=$)}if(_._status===1)return _._result.default;throw _._result}var ee=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},Le={map:F,forEach:function(_,$,I){F(_,function(){$.apply(this,arguments)},I)},count:function(_){var $=0;return F(_,function(){$++}),$},toArray:function(_){return F(_,function($){return $})||[]},only:function(_){if(!ft(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return ve.Activity=N,ve.Children=Le,ve.Component=B,ve.Fragment=s,ve.Profiler=d,ve.PureComponent=W,ve.StrictMode=u,ve.Suspense=y,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=J,ve.__COMPILER_RUNTIME={__proto__:null,c:function(_){return J.H.useMemoCache(_)}},ve.cache=function(_){return function(){return _.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(_,$,I){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var te=Y({},_.props),me=_.key;if($!=null)for(xe in $.key!==void 0&&(me=""+$.key),$)!be.call($,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&$.ref===void 0||(te[xe]=$[xe]);var xe=arguments.length-2;if(xe===1)te.children=I;else if(1<xe){for(var fe=Array(xe),st=0;st<xe;st++)fe[st]=arguments[st+2];te.children=fe}return Ye(_.type,me,te)},ve.createContext=function(_){return _={$$typeof:m,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:f,_context:_},_},ve.createElement=function(_,$,I){var te,me={},xe=null;if($!=null)for(te in $.key!==void 0&&(xe=""+$.key),$)be.call($,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(me[te]=$[te]);var fe=arguments.length-2;if(fe===1)me.children=I;else if(1<fe){for(var st=Array(fe),we=0;we<fe;we++)st[we]=arguments[we+2];me.children=st}if(_&&_.defaultProps)for(te in fe=_.defaultProps,fe)me[te]===void 0&&(me[te]=fe[te]);return Ye(_,xe,me)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(_){return{$$typeof:x,render:_}},ve.isValidElement=ft,ve.lazy=function(_){return{$$typeof:b,_payload:{_status:-1,_result:_},_init:ie}},ve.memo=function(_,$){return{$$typeof:g,type:_,compare:$===void 0?null:$}},ve.startTransition=function(_){var $=J.T,I={};J.T=I;try{var te=_(),me=J.S;me!==null&&me(I,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(Te,ee)}catch(xe){ee(xe)}finally{$!==null&&I.types!==null&&($.types=I.types),J.T=$}},ve.unstable_useCacheRefresh=function(){return J.H.useCacheRefresh()},ve.use=function(_){return J.H.use(_)},ve.useActionState=function(_,$,I){return J.H.useActionState(_,$,I)},ve.useCallback=function(_,$){return J.H.useCallback(_,$)},ve.useContext=function(_){return J.H.useContext(_)},ve.useDebugValue=function(){},ve.useDeferredValue=function(_,$){return J.H.useDeferredValue(_,$)},ve.useEffect=function(_,$){return J.H.useEffect(_,$)},ve.useEffectEvent=function(_){return J.H.useEffectEvent(_)},ve.useId=function(){return J.H.useId()},ve.useImperativeHandle=function(_,$,I){return J.H.useImperativeHandle(_,$,I)},ve.useInsertionEffect=function(_,$){return J.H.useInsertionEffect(_,$)},ve.useLayoutEffect=function(_,$){return J.H.useLayoutEffect(_,$)},ve.useMemo=function(_,$){return J.H.useMemo(_,$)},ve.useOptimistic=function(_,$){return J.H.useOptimistic(_,$)},ve.useReducer=function(_,$,I){return J.H.useReducer(_,$,I)},ve.useRef=function(_){return J.H.useRef(_)},ve.useState=function(_){return J.H.useState(_)},ve.useSyncExternalStore=function(_,$,I){return J.H.useSyncExternalStore(_,$,I)},ve.useTransition=function(){return J.H.useTransition()},ve.version="19.2.7",ve}var Jp;function Td(){return Jp||(Jp=1,Zo.exports=_0()),Zo.exports}var w=Td(),Go={exports:{}},gs={},Qo={exports:{}},Xo={};/**
|
|
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 Ip;function A0(){return Ip||(Ip=1,(function(n){function l(U,F){var ie=U.length;U.push(F);e:for(;0<ie;){var ee=ie-1>>>1,Le=U[ee];if(0<d(Le,F))U[ee]=F,U[ie]=Le,ie=ee;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],ie=U.pop();if(ie!==F){U[0]=ie;e:for(var ee=0,Le=U.length,_=Le>>>1;ee<_;){var $=2*(ee+1)-1,I=U[$],te=$+1,me=U[te];if(0>d(I,ie))te<Le&&0>d(me,I)?(U[ee]=me,U[te]=ie,ee=te):(U[ee]=I,U[$]=ie,ee=$);else if(te<Le&&0>d(me,ie))U[ee]=me,U[te]=ie,ee=te;else break e}}return F}function d(U,F){var ie=U.sortIndex-F.sortIndex;return ie!==0?ie: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,x=m.now();n.unstable_now=function(){return m.now()-x}}var y=[],g=[],b=1,N=null,L=3,X=!1,C=!1,Y=!1,D=!1,B=typeof setTimeout=="function"?setTimeout:null,Z=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function ce(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,l(y,F);else break;F=s(g)}}function K(U){if(Y=!1,ce(U),!C)if(s(y)!==null)C=!0,Te||(Te=!0,tt());else{var F=s(g);F!==null&&Fe(K,F.startTime-U)}}var Te=!1,J=-1,be=5,Ye=-1;function vt(){return D?!0:!(n.unstable_now()-Ye<be)}function ft(){if(D=!1,Te){var U=n.unstable_now();Ye=U;var F=!0;try{e:{C=!1,Y&&(Y=!1,Z(J),J=-1),X=!0;var ie=L;try{t:{for(ce(U),N=s(y);N!==null&&!(N.expirationTime>U&&vt());){var ee=N.callback;if(typeof ee=="function"){N.callback=null,L=N.priorityLevel;var Le=ee(N.expirationTime<=U);if(U=n.unstable_now(),typeof Le=="function"){N.callback=Le,ce(U),F=!0;break t}N===s(y)&&u(y),ce(U)}else u(y);N=s(y)}if(N!==null)F=!0;else{var _=s(g);_!==null&&Fe(K,_.startTime-U),F=!1}}break e}finally{N=null,L=ie,X=!1}F=void 0}}finally{F?tt():Te=!1}}}var tt;if(typeof W=="function")tt=function(){W(ft)};else if(typeof MessageChannel<"u"){var Lt=new MessageChannel,wt=Lt.port2;Lt.port1.onmessage=ft,tt=function(){wt.postMessage(null)}}else tt=function(){B(ft,0)};function Fe(U,F){J=B(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 ie=L;L=F;try{return U()}finally{L=ie}},n.unstable_requestPaint=function(){D=!0},n.unstable_runWithPriority=function(U,F){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ie=L;L=U;try{return F()}finally{L=ie}},n.unstable_scheduleCallback=function(U,F,ie){var ee=n.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?ee+ie:ee):ie=ee,U){case 1:var Le=-1;break;case 2:Le=250;break;case 5:Le=1073741823;break;case 4:Le=1e4;break;default:Le=5e3}return Le=ie+Le,U={id:b++,callback:F,priorityLevel:U,startTime:ie,expirationTime:Le,sortIndex:-1},ie>ee?(U.sortIndex=ie,l(g,U),s(y)===null&&U===s(g)&&(Y?(Z(J),J=-1):Y=!0,Fe(K,ie-ee))):(U.sortIndex=Le,l(y,U),C||X||(C=!0,Te||(Te=!0,tt()))),U},n.unstable_shouldYield=vt,n.unstable_wrapCallback=function(U){var F=L;return function(){var ie=L;L=F;try{return U.apply(this,arguments)}finally{L=ie}}}})(Xo)),Xo}var Fp;function E0(){return Fp||(Fp=1,Qo.exports=A0()),Qo.exports}var Ko={exports:{}},Dt={};/**
|
|
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 Wp;function k0(){if(Wp)return Dt;Wp=1;var n=Td();function l(y){var g="https://react.dev/errors/"+y;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 #"+y+"; 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(l(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(y,g,b){var N=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:N==null?null:""+N,children:y,containerInfo:g,implementation:b}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(y,g){if(y==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Dt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Dt.createPortal=function(y,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(l(299));return f(y,g,null,b)},Dt.flushSync=function(y){var g=m.T,b=u.p;try{if(m.T=null,u.p=2,y)return y()}finally{m.T=g,u.p=b,u.d.f()}},Dt.preconnect=function(y,g){typeof y=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,u.d.C(y,g))},Dt.prefetchDNS=function(y){typeof y=="string"&&u.d.D(y)},Dt.preinit=function(y,g){if(typeof y=="string"&&g&&typeof g.as=="string"){var b=g.as,N=x(b,g.crossOrigin),L=typeof g.integrity=="string"?g.integrity:void 0,X=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?u.d.S(y,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:N,integrity:L,fetchPriority:X}):b==="script"&&u.d.X(y,{crossOrigin:N,integrity:L,fetchPriority:X,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Dt.preinitModule=function(y,g){if(typeof y=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=x(g.as,g.crossOrigin);u.d.M(y,{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(y)},Dt.preload=function(y,g){if(typeof y=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,N=x(b,g.crossOrigin);u.d.L(y,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})}},Dt.preloadModule=function(y,g){if(typeof y=="string")if(g){var b=x(g.as,g.crossOrigin);u.d.m(y,{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(y)},Dt.requestFormReset=function(y){u.d.r(y)},Dt.unstable_batchedUpdates=function(y,g){return y(g)},Dt.useFormState=function(y,g,b){return m.H.useFormState(y,g,b)},Dt.useFormStatus=function(){return m.H.useHostTransitionStatus()},Dt.version="19.2.7",Dt}var Pp;function R0(){if(Pp)return Ko.exports;Pp=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(l){console.error(l)}}return n(),Ko.exports=k0(),Ko.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 ex;function C0(){if(ex)return gs;ex=1;var n=E0(),l=Td(),s=R0();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 x(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 y(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,i=t;;){var r=a.return;if(r===null)break;var o=r.alternate;if(o===null){if(i=r.return,i!==null){a=i;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===a)return y(r),e;if(o===i)return y(r),t;o=o.sibling}throw Error(u(188))}if(a.return!==i.return)a=r,i=o;else{for(var h=!1,v=r.child;v;){if(v===a){h=!0,a=r,i=o;break}if(v===i){h=!0,i=r,a=o;break}v=v.sibling}if(!h){for(v=o.child;v;){if(v===a){h=!0,a=o,i=r;break}if(v===i){h=!0,i=o,a=r;break}v=v.sibling}if(!h)throw Error(u(189))}}if(a.alternate!==i)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"),X=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),W=Symbol.for("react.context"),ce=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),Te=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),be=Symbol.for("react.lazy"),Ye=Symbol.for("react.activity"),vt=Symbol.for("react.memo_cache_sentinel"),ft=Symbol.iterator;function tt(e){return e===null||typeof e!="object"?null:(e=ft&&e[ft]||e["@@iterator"],typeof e=="function"?e:null)}var Lt=Symbol.for("react.client.reference");function wt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Lt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case B:return"Profiler";case D:return"StrictMode";case K:return"Suspense";case Te:return"SuspenseList";case Ye:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case W:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case ce:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case J:return t=e.displayName||null,t!==null?t:wt(e.type)||"Memo";case be:t=e._payload,e=e._init;try{return wt(e(t))}catch{}}return null}var Fe=Array.isArray,U=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},ee=[],Le=-1;function _(e){return{current:e}}function $(e){0>Le||(e.current=ee[Le],ee[Le]=null,Le--)}function I(e,t){Le++,ee[Le]=e.current,e.current=t}var te=_(null),me=_(null),xe=_(null),fe=_(null);function st(e,t){switch(I(xe,t),I(me,e),I(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?pp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=pp(t),e=xp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}$(te),I(te,e)}function we(){$(te),$(me),$(xe)}function lt(e){e.memoizedState!==null&&I(fe,e);var t=te.current,a=xp(t,e.type);t!==a&&(I(me,e),I(te,a))}function Ea(e){me.current===e&&($(te),$(me)),fe.current===e&&($(fe),ms._currentValue=ie)}var $a,ka;function Ne(e){if($a===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);$a=t&&t[1]||"",ka=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+$a+e+ka}var Mt=!1;function Ia(e,t){if(!e||Mt)return"";Mt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(M){var T=M}Reflect.construct(e,[],V)}else{try{V.call()}catch(M){T=M}e.call(V.prototype)}}else{try{throw Error()}catch(M){T=M}(V=e())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(M){if(M&&T&&typeof M.stack=="string")return[M.stack,T.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=i.DetermineComponentFrameRoot(),h=o[0],v=o[1];if(h&&v){var S=h.split(`
|
|
44
|
+
`),R=v.split(`
|
|
45
|
+
`);for(r=i=0;i<S.length&&!S[i].includes("DetermineComponentFrameRoot");)i++;for(;r<R.length&&!R[r].includes("DetermineComponentFrameRoot");)r++;if(i===S.length||r===R.length)for(i=S.length-1,r=R.length-1;1<=i&&0<=r&&S[i]!==R[r];)r--;for(;1<=i&&0<=r;i--,r--)if(S[i]!==R[r]){if(i!==1||r!==1)do if(i--,r--,0>r||S[i]!==R[r]){var z=`
|
|
46
|
+
`+S[i].replace(" at new "," at ");return e.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",e.displayName)),z}while(1<=i&&0<=r);break}}}finally{Mt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ne(a):""}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ne(e.type);case 16:return Ne("Lazy");case 13:return e.child!==t&&t!==null?Ne("Suspense Fallback"):Ne("Suspense");case 19:return Ne("SuspenseList");case 0:case 15:return Ia(e.type,!1);case 11:return Ia(e.type.render,!1);case 1:return Ia(e.type,!0);case 31:return Ne("Activity");default:return""}}function nl(e){try{var t="",a=null;do t+=Ee(e,a),a=e,e=e.return;while(e);return t}catch(i){return`
|
|
47
|
+
Error generating stack: `+i.message+`
|
|
48
|
+
`+i.stack}}var Ra=Object.prototype.hasOwnProperty,jn=n.unstable_scheduleCallback,Nn=n.unstable_cancelCallback,_n=n.unstable_shouldYield,Tl=n.unstable_requestPaint,St=n.unstable_now,ra=n.unstable_getCurrentPriorityLevel,Fa=n.unstable_ImmediatePriority,Wa=n.unstable_UserBlockingPriority,Ut=n.unstable_NormalPriority,rt=n.unstable_LowPriority,ll=n.unstable_IdlePriority,Ol=n.log,Ml=n.unstable_setDisableYieldValue,Ca=null,gt=null;function ua(e){if(typeof Ol=="function"&&Ml(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Ca,e)}catch{}}var Et=Math.clz32?Math.clz32:De,jt=Math.log,G=Math.LN2;function De(e){return e>>>=0,e===0?32:31-(jt(e)/G|0)|0}var Ie=256,Nt=262144,Ta=4194304;function it(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 zt(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var r=0,o=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var v=i&134217727;return v!==0?(i=v&~o,i!==0?r=it(i):(h&=v,h!==0?r=it(h):a||(a=v&~e,a!==0&&(r=it(a))))):(v=i&~o,v!==0?r=it(v):h!==0?r=it(h):a||(a=i&~e,a!==0&&(r=it(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 An(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Dl(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 Ls(){var e=Ta;return Ta<<=1,(Ta&62914560)===0&&(Ta=4194304),e}function Ll(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function il(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Us(e,t,a,i,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 v=e.entanglements,S=e.expirationTimes,R=e.hiddenUpdates;for(a=h&~a;0<a;){var z=31-Et(a),V=1<<z;v[z]=0,S[z]=-1;var T=R[z];if(T!==null)for(R[z]=null,z=0;z<T.length;z++){var M=T[z];M!==null&&(M.lane&=-536870913)}a&=~V}i!==0&&zs(e,i,0),o!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=o&~(h&~t))}function zs(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Et(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function O(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-Et(a),r=1<<i;r&t|e[i]&t&&(e[i]|=t),a&=~r}}function ue(e,t){var a=t&-t;return a=(a&42)!==0?1:$e(a),(a&(e.suspendedLanes|t))!==0?0:a}function $e(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 It(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Pd(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:qp(e.type))}function ef(e,t){var a=F.p;try{return F.p=e,t()}finally{F.p=a}}var En=Math.random().toString(36).slice(2),kt="__reactFiber$"+En,$t="__reactProps$"+En,Ul="__reactContainer$"+En,Mu="__reactEvents$"+En,fv="__reactListeners$"+En,hv="__reactHandles$"+En,tf="__reactResources$"+En,Ri="__reactMarker$"+En;function Du(e){delete e[kt],delete e[$t],delete e[Mu],delete e[fv],delete e[hv]}function zl(e){var t=e[kt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ul]||a[kt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=jp(e);e!==null;){if(a=e[kt])return a;e=jp(e)}return t}e=a,a=e.parentNode}return null}function Bl(e){if(e=e[kt]||e[Ul]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ci(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function ql(e){var t=e[tf];return t||(t=e[tf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[Ri]=!0}var af=new Set,nf={};function sl(e,t){Hl(e,t),Hl(e+"Capture",t)}function Hl(e,t){for(nf[e]=t,e=0;e<t.length;e++)af.add(t[e])}var mv=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]*$"),lf={},sf={};function pv(e){return Ra.call(sf,e)?!0:Ra.call(lf,e)?!1:mv.test(e)?sf[e]=!0:(lf[e]=!0,!1)}function Bs(e,t,a){if(pv(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function qs(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 Pa(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}function ca(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function rf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xv(e,t,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var r=i.get,o=i.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:i.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lu(e){if(!e._valueTracker){var t=rf(e)?"checked":"value";e._valueTracker=xv(e,t,""+e[t])}}function uf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=rf(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function Hs(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 yv=/[\n"\\]/g;function oa(e){return e.replace(yv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Uu(e,t,a,i,r,o,h,v){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=""+ca(t)):e.value!==""+ca(t)&&(e.value=""+ca(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?zu(e,h,ca(t)):a!=null?zu(e,h,ca(a)):i!=null&&e.removeAttribute("value"),r==null&&o!=null&&(e.defaultChecked=!!o),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+ca(v):e.removeAttribute("name")}function cf(e,t,a,i,r,o,h,v){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)){Lu(e);return}a=a!=null?""+ca(a):"",t=t!=null?""+ca(t):a,v||t===e.value||(e.value=t),e.defaultValue=t}i=i??r,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=v?e.checked:!!i,e.defaultChecked=!!i,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Lu(e)}function zu(e,t,a){t==="number"&&Hs(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function $l(e,t,a,i){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&&i&&(e[a].defaultSelected=!0)}else{for(a=""+ca(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,i&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function of(e,t,a){if(t!=null&&(t=""+ca(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+ca(a):""}function df(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(u(92));if(Fe(i)){if(1<i.length)throw Error(u(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=ca(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),Lu(e)}function Yl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var vv=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 ff(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||vv.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function hf(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var r in t)i=t[r],t.hasOwnProperty(r)&&a[r]!==i&&ff(e,r,i)}else for(var o in t)t.hasOwnProperty(o)&&ff(e,o,t[o])}function Bu(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 gv=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"]]),bv=/^[\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 $s(e){return bv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function en(){}var qu=null;function Hu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vl=null,Zl=null;function mf(e){var t=Bl(e);if(t&&(e=t.stateNode)){var a=e[$t]||null;e:switch(e=t.stateNode,t.type){case"input":if(Uu(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="'+oa(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var r=i[$t]||null;if(!r)throw Error(u(90));Uu(i,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&uf(i)}break e;case"textarea":of(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&$l(e,!!a.multiple,t,!1)}}}var $u=!1;function pf(e,t,a){if($u)return e(t,a);$u=!0;try{var i=e(t);return i}finally{if($u=!1,(Vl!==null||Zl!==null)&&(kr(),Vl&&(t=Vl,e=Zl,Zl=Vl=null,mf(t),e)))for(t=0;t<e.length;t++)mf(e[t])}}function Ti(e,t){var a=e.stateNode;if(a===null)return null;var i=a[$t]||null;if(i===null)return null;a=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yu=!1;if(tn)try{var Oi={};Object.defineProperty(Oi,"passive",{get:function(){Yu=!0}}),window.addEventListener("test",Oi,Oi),window.removeEventListener("test",Oi,Oi)}catch{Yu=!1}var kn=null,Vu=null,Ys=null;function xf(){if(Ys)return Ys;var e,t=Vu,a=t.length,i,r="value"in kn?kn.value:kn.textContent,o=r.length;for(e=0;e<a&&t[e]===r[e];e++);var h=a-e;for(i=1;i<=h&&t[a-i]===r[o-i];i++);return Ys=r.slice(e,1<i?1-i:void 0)}function Vs(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 Zs(){return!0}function yf(){return!1}function Yt(e){function t(a,i,r,o,h){this._reactName=a,this._targetInst=r,this.type=i,this.nativeEvent=o,this.target=h,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(a=e[v],this[v]=a?a(o):o[v]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Zs:yf,this.isPropagationStopped=yf,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=Zs)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Zs)},persist:function(){},isPersistent:Zs}),t}var rl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gs=Yt(rl),Mi=N({},rl,{view:0,detail:0}),wv=Yt(Mi),Zu,Gu,Di,Qs=N({},Mi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xu,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!==Di&&(Di&&e.type==="mousemove"?(Zu=e.screenX-Di.screenX,Gu=e.screenY-Di.screenY):Gu=Zu=0,Di=e),Zu)},movementY:function(e){return"movementY"in e?e.movementY:Gu}}),vf=Yt(Qs),Sv=N({},Qs,{dataTransfer:0}),jv=Yt(Sv),Nv=N({},Mi,{relatedTarget:0}),Qu=Yt(Nv),_v=N({},rl,{animationName:0,elapsedTime:0,pseudoElement:0}),Av=Yt(_v),Ev=N({},rl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kv=Yt(Ev),Rv=N({},rl,{data:0}),gf=Yt(Rv),Cv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tv={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"},Ov={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ov[e])?!!t[e]:!1}function Xu(){return Mv}var Dv=N({},Mi,{key:function(e){if(e.key){var t=Cv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Tv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xu,charCode:function(e){return e.type==="keypress"?Vs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Lv=Yt(Dv),Uv=N({},Qs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bf=Yt(Uv),zv=N({},Mi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xu}),Bv=Yt(zv),qv=N({},rl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hv=Yt(qv),$v=N({},Qs,{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}),Yv=Yt($v),Vv=N({},rl,{newState:0,oldState:0}),Zv=Yt(Vv),Gv=[9,13,27,32],Ku=tn&&"CompositionEvent"in window,Li=null;tn&&"documentMode"in document&&(Li=document.documentMode);var Qv=tn&&"TextEvent"in window&&!Li,wf=tn&&(!Ku||Li&&8<Li&&11>=Li),Sf=" ",jf=!1;function Nf(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 _f(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gl=!1;function Xv(e,t){switch(e){case"compositionend":return _f(t);case"keypress":return t.which!==32?null:(jf=!0,Sf);case"textInput":return e=t.data,e===Sf&&jf?null:e;default:return null}}function Kv(e,t){if(Gl)return e==="compositionend"||!Ku&&Nf(e,t)?(e=xf(),Ys=Vu=kn=null,Gl=!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 wf&&t.locale!=="ko"?null:t.data;default:return null}}var Jv={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 Af(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Jv[e.type]:t==="textarea"}function Ef(e,t,a,i){Vl?Zl?Zl.push(i):Zl=[i]:Vl=i,t=Lr(t,"onChange"),0<t.length&&(a=new Gs("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var Ui=null,zi=null;function Iv(e){cp(e,0)}function Xs(e){var t=Ci(e);if(uf(t))return e}function kf(e,t){if(e==="change")return t}var Rf=!1;if(tn){var Ju;if(tn){var Iu="oninput"in document;if(!Iu){var Cf=document.createElement("div");Cf.setAttribute("oninput","return;"),Iu=typeof Cf.oninput=="function"}Ju=Iu}else Ju=!1;Rf=Ju&&(!document.documentMode||9<document.documentMode)}function Tf(){Ui&&(Ui.detachEvent("onpropertychange",Of),zi=Ui=null)}function Of(e){if(e.propertyName==="value"&&Xs(zi)){var t=[];Ef(t,zi,e,Hu(e)),pf(Iv,t)}}function Fv(e,t,a){e==="focusin"?(Tf(),Ui=t,zi=a,Ui.attachEvent("onpropertychange",Of)):e==="focusout"&&Tf()}function Wv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xs(zi)}function Pv(e,t){if(e==="click")return Xs(t)}function eg(e,t){if(e==="input"||e==="change")return Xs(t)}function tg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ft=typeof Object.is=="function"?Object.is:tg;function Bi(e,t){if(Ft(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var r=a[i];if(!Ra.call(t,r)||!Ft(e[r],t[r]))return!1}return!0}function Mf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Df(e,t){var a=Mf(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Mf(a)}}function Lf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Uf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Hs(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=Hs(e.document)}return t}function Fu(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 ag=tn&&"documentMode"in document&&11>=document.documentMode,Ql=null,Wu=null,qi=null,Pu=!1;function zf(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Pu||Ql==null||Ql!==Hs(i)||(i=Ql,"selectionStart"in i&&Fu(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),qi&&Bi(qi,i)||(qi=i,i=Lr(Wu,"onSelect"),0<i.length&&(t=new Gs("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=Ql)))}function ul(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Xl={animationend:ul("Animation","AnimationEnd"),animationiteration:ul("Animation","AnimationIteration"),animationstart:ul("Animation","AnimationStart"),transitionrun:ul("Transition","TransitionRun"),transitionstart:ul("Transition","TransitionStart"),transitioncancel:ul("Transition","TransitionCancel"),transitionend:ul("Transition","TransitionEnd")},ec={},Bf={};tn&&(Bf=document.createElement("div").style,"AnimationEvent"in window||(delete Xl.animationend.animation,delete Xl.animationiteration.animation,delete Xl.animationstart.animation),"TransitionEvent"in window||delete Xl.transitionend.transition);function cl(e){if(ec[e])return ec[e];if(!Xl[e])return e;var t=Xl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Bf)return ec[e]=t[a];return e}var qf=cl("animationend"),Hf=cl("animationiteration"),$f=cl("animationstart"),ng=cl("transitionrun"),lg=cl("transitionstart"),ig=cl("transitioncancel"),Yf=cl("transitionend"),Vf=new Map,tc="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(" ");tc.push("scrollEnd");function Oa(e,t){Vf.set(e,t),sl(t,[e])}var Ks=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)},da=[],Kl=0,ac=0;function Js(){for(var e=Kl,t=ac=Kl=0;t<e;){var a=da[t];da[t++]=null;var i=da[t];da[t++]=null;var r=da[t];da[t++]=null;var o=da[t];if(da[t++]=null,i!==null&&r!==null){var h=i.pending;h===null?r.next=r:(r.next=h.next,h.next=r),i.pending=r}o!==0&&Zf(a,r,o)}}function Is(e,t,a,i){da[Kl++]=e,da[Kl++]=t,da[Kl++]=a,da[Kl++]=i,ac|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function nc(e,t,a,i){return Is(e,t,a,i),Fs(e)}function ol(e,t){return Is(e,null,null,t),Fs(e)}function Zf(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var r=!1,o=e.return;o!==null;)o.childLanes|=a,i=o.alternate,i!==null&&(i.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-Et(a),e=o.hiddenUpdates,i=e[r],i===null?e[r]=[t]:i.push(t),t.lane=a|536870912),o):null}function Fs(e){if(50<rs)throw rs=0,ho=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Jl={};function sg(e,t,a,i){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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wt(e,t,a,i){return new sg(e,t,a,i)}function lc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function an(e,t){var a=e.alternate;return a===null?(a=Wt(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 Gf(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 Ws(e,t,a,i,r,o){var h=0;if(i=e,typeof e=="function")lc(e)&&(h=1);else if(typeof e=="string")h=d0(e,a,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Ye:return e=Wt(31,a,t,r),e.elementType=Ye,e.lanes=o,e;case Y:return dl(a.children,r,o,t);case D:h=8,r|=24;break;case B:return e=Wt(12,a,t,r|2),e.elementType=B,e.lanes=o,e;case K:return e=Wt(13,a,t,r),e.elementType=K,e.lanes=o,e;case Te:return e=Wt(19,a,t,r),e.elementType=Te,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:h=10;break e;case Z:h=9;break e;case ce:h=11;break e;case J:h=14;break e;case be:h=16,i=null;break e}h=29,a=Error(u(130,e===null?"null":typeof e,"")),i=null}return t=Wt(h,a,t,r),t.elementType=e,t.type=i,t.lanes=o,t}function dl(e,t,a,i){return e=Wt(7,e,i,t),e.lanes=a,e}function ic(e,t,a){return e=Wt(6,e,null,t),e.lanes=a,e}function Qf(e){var t=Wt(18,null,null,0);return t.stateNode=e,t}function sc(e,t,a){return t=Wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Xf=new WeakMap;function fa(e,t){if(typeof e=="object"&&e!==null){var a=Xf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:nl(t)},Xf.set(e,t),t)}return{value:e,source:t,stack:nl(t)}}var Il=[],Fl=0,Ps=null,Hi=0,ha=[],ma=0,Rn=null,Ya=1,Va="";function nn(e,t){Il[Fl++]=Hi,Il[Fl++]=Ps,Ps=e,Hi=t}function Kf(e,t,a){ha[ma++]=Ya,ha[ma++]=Va,ha[ma++]=Rn,Rn=e;var i=Ya;e=Va;var r=32-Et(i)-1;i&=~(1<<r),a+=1;var o=32-Et(t)+r;if(30<o){var h=r-r%5;o=(i&(1<<h)-1).toString(32),i>>=h,r-=h,Ya=1<<32-Et(t)+r|a<<r|i,Va=o+e}else Ya=1<<o|a<<r|i,Va=e}function rc(e){e.return!==null&&(nn(e,1),Kf(e,1,0))}function uc(e){for(;e===Ps;)Ps=Il[--Fl],Il[Fl]=null,Hi=Il[--Fl],Il[Fl]=null;for(;e===Rn;)Rn=ha[--ma],ha[ma]=null,Va=ha[--ma],ha[ma]=null,Ya=ha[--ma],ha[ma]=null}function Jf(e,t){ha[ma++]=Ya,ha[ma++]=Va,ha[ma++]=Rn,Ya=t.id,Va=t.overflow,Rn=e}var Rt=null,We=null,Oe=!1,Cn=null,pa=!1,cc=Error(u(519));function Tn(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $i(fa(t,e)),cc}function If(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[kt]=e,t[$t]=i,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<cs.length;a++)Ae(cs[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),cf(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),df(t,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||hp(t.textContent,a)?(i.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),i.onScroll!=null&&Ae("scroll",t),i.onScrollEnd!=null&&Ae("scrollend",t),i.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||Tn(e,!0)}function Ff(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:pa=!1;return;case 27:case 3:pa=!0;return;default:Rt=Rt.return}}function Wl(e){if(e!==Rt)return!1;if(!Oe)return Ff(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")||ko(e.type,e.memoizedProps)),a=!a),a&&We&&Tn(e),Ff(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));We=Sp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));We=Sp(e)}else t===27?(t=We,Gn(e.type)?(e=Mo,Mo=null,We=e):We=t):We=Rt?ya(e.stateNode.nextSibling):null;return!0}function fl(){We=Rt=null,Oe=!1}function oc(){var e=Cn;return e!==null&&(Qt===null?Qt=e:Qt.push.apply(Qt,e),Cn=null),e}function $i(e){Cn===null?Cn=[e]:Cn.push(e)}var dc=_(null),hl=null,ln=null;function On(e,t,a){I(dc,t._currentValue),t._currentValue=a}function sn(e){e._currentValue=dc.current,$(dc)}function fc(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function hc(e,t,a,i){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 v=o;o=r;for(var S=0;S<t.length;S++)if(v.context===t[S]){o.lanes|=a,v=o.alternate,v!==null&&(v.lanes|=a),fc(o.return,a,e),i||(h=null);break e}o=v.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),fc(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 Pl(e,t,a,i){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 v=r.type;Ft(r.pendingProps.value,h.value)||(e!==null?e.push(v):e=[v])}}else if(r===fe.current){if(h=r.alternate,h===null)throw Error(u(387));h.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(ms):e=[ms])}r=r.return}e!==null&&hc(t,e,a,i),t.flags|=262144}function er(e){for(e=e.firstContext;e!==null;){if(!Ft(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ml(e){hl=e,ln=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ct(e){return Wf(hl,e)}function tr(e,t){return hl===null&&ml(e),Wf(e,t)}function Wf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ln===null){if(e===null)throw Error(u(308));ln=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ln=ln.next=t;return a}var rg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},ug=n.unstable_scheduleCallback,cg=n.unstable_NormalPriority,ht={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mc(){return{controller:new rg,data:new Map,refCount:0}}function Yi(e){e.refCount--,e.refCount===0&&ug(cg,function(){e.controller.abort()})}var Vi=null,pc=0,ei=0,ti=null;function og(e,t){if(Vi===null){var a=Vi=[];pc=0,ei=go(),ti={status:"pending",value:void 0,then:function(i){a.push(i)}}}return pc++,t.then(Pf,Pf),t}function Pf(){if(--pc===0&&Vi!==null){ti!==null&&(ti.status="fulfilled");var e=Vi;Vi=null,ei=0,ti=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function dg(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(i.status="rejected",i.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),i}var eh=U.S;U.S=function(e,t){zm=St(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&og(e,t),eh!==null&&eh(e,t)};var pl=_(null);function xc(){var e=pl.current;return e!==null?e:Je.pooledCache}function ar(e,t){t===null?I(pl,pl.current):I(pl,t.pool)}function th(){var e=xc();return e===null?null:{parent:ht._currentValue,pool:e}}var ai=Error(u(460)),yc=Error(u(474)),nr=Error(u(542)),lr={then:function(){}};function ah(e){return e=e.status,e==="fulfilled"||e==="rejected"}function nh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(en,en),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ih(e),e;default:if(typeof t.status=="string")t.then(en,en);else{if(e=Je,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=i}},function(i){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ih(e),e}throw yl=t,ai}}function xl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(yl=a,ai):a}}var yl=null;function lh(){if(yl===null)throw Error(u(459));var e=yl;return yl=null,e}function ih(e){if(e===ai||e===nr)throw Error(u(483))}var ni=null,Zi=0;function ir(e){var t=Zi;return Zi+=1,ni===null&&(ni=[]),nh(ni,e,t)}function Gi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function sr(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 sh(e){function t(A,j){if(e){var k=A.deletions;k===null?(A.deletions=[j],A.flags|=16):k.push(j)}}function a(A,j){if(!e)return null;for(;j!==null;)t(A,j),j=j.sibling;return null}function i(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=an(A,j),A.index=0,A.sibling=null,A}function o(A,j,k){return A.index=k,e?(k=A.alternate,k!==null?(k=k.index,k<j?(A.flags|=67108866,j):k):(A.flags|=67108866,j)):(A.flags|=1048576,j)}function h(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function v(A,j,k,q){return j===null||j.tag!==6?(j=ic(k,A.mode,q),j.return=A,j):(j=r(j,k),j.return=A,j)}function S(A,j,k,q){var oe=k.type;return oe===Y?z(A,j,k.props.children,q,k.key):j!==null&&(j.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===be&&xl(oe)===j.type)?(j=r(j,k.props),Gi(j,k),j.return=A,j):(j=Ws(k.type,k.key,k.props,null,A.mode,q),Gi(j,k),j.return=A,j)}function R(A,j,k,q){return j===null||j.tag!==4||j.stateNode.containerInfo!==k.containerInfo||j.stateNode.implementation!==k.implementation?(j=sc(k,A.mode,q),j.return=A,j):(j=r(j,k.children||[]),j.return=A,j)}function z(A,j,k,q,oe){return j===null||j.tag!==7?(j=dl(k,A.mode,q,oe),j.return=A,j):(j=r(j,k),j.return=A,j)}function V(A,j,k){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=ic(""+j,A.mode,k),j.return=A,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case X:return k=Ws(j.type,j.key,j.props,null,A.mode,k),Gi(k,j),k.return=A,k;case C:return j=sc(j,A.mode,k),j.return=A,j;case be:return j=xl(j),V(A,j,k)}if(Fe(j)||tt(j))return j=dl(j,A.mode,k,null),j.return=A,j;if(typeof j.then=="function")return V(A,ir(j),k);if(j.$$typeof===W)return V(A,tr(A,j),k);sr(A,j)}return null}function T(A,j,k,q){var oe=j!==null?j.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return oe!==null?null:v(A,j,""+k,q);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case X:return k.key===oe?S(A,j,k,q):null;case C:return k.key===oe?R(A,j,k,q):null;case be:return k=xl(k),T(A,j,k,q)}if(Fe(k)||tt(k))return oe!==null?null:z(A,j,k,q,null);if(typeof k.then=="function")return T(A,j,ir(k),q);if(k.$$typeof===W)return T(A,j,tr(A,k),q);sr(A,k)}return null}function M(A,j,k,q,oe){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return A=A.get(k)||null,v(j,A,""+q,oe);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case X:return A=A.get(q.key===null?k:q.key)||null,S(j,A,q,oe);case C:return A=A.get(q.key===null?k:q.key)||null,R(j,A,q,oe);case be:return q=xl(q),M(A,j,k,q,oe)}if(Fe(q)||tt(q))return A=A.get(k)||null,z(j,A,q,oe,null);if(typeof q.then=="function")return M(A,j,k,ir(q),oe);if(q.$$typeof===W)return M(A,j,k,tr(j,q),oe);sr(j,q)}return null}function le(A,j,k,q){for(var oe=null,ze=null,se=j,Se=j=0,Re=null;se!==null&&Se<k.length;Se++){se.index>Se?(Re=se,se=null):Re=se.sibling;var Be=T(A,se,k[Se],q);if(Be===null){se===null&&(se=Re);break}e&&se&&Be.alternate===null&&t(A,se),j=o(Be,j,Se),ze===null?oe=Be:ze.sibling=Be,ze=Be,se=Re}if(Se===k.length)return a(A,se),Oe&&nn(A,Se),oe;if(se===null){for(;Se<k.length;Se++)se=V(A,k[Se],q),se!==null&&(j=o(se,j,Se),ze===null?oe=se:ze.sibling=se,ze=se);return Oe&&nn(A,Se),oe}for(se=i(se);Se<k.length;Se++)Re=M(se,A,Se,k[Se],q),Re!==null&&(e&&Re.alternate!==null&&se.delete(Re.key===null?Se:Re.key),j=o(Re,j,Se),ze===null?oe=Re:ze.sibling=Re,ze=Re);return e&&se.forEach(function(In){return t(A,In)}),Oe&&nn(A,Se),oe}function he(A,j,k,q){if(k==null)throw Error(u(151));for(var oe=null,ze=null,se=j,Se=j=0,Re=null,Be=k.next();se!==null&&!Be.done;Se++,Be=k.next()){se.index>Se?(Re=se,se=null):Re=se.sibling;var In=T(A,se,Be.value,q);if(In===null){se===null&&(se=Re);break}e&&se&&In.alternate===null&&t(A,se),j=o(In,j,Se),ze===null?oe=In:ze.sibling=In,ze=In,se=Re}if(Be.done)return a(A,se),Oe&&nn(A,Se),oe;if(se===null){for(;!Be.done;Se++,Be=k.next())Be=V(A,Be.value,q),Be!==null&&(j=o(Be,j,Se),ze===null?oe=Be:ze.sibling=Be,ze=Be);return Oe&&nn(A,Se),oe}for(se=i(se);!Be.done;Se++,Be=k.next())Be=M(se,A,Se,Be.value,q),Be!==null&&(e&&Be.alternate!==null&&se.delete(Be.key===null?Se:Be.key),j=o(Be,j,Se),ze===null?oe=Be:ze.sibling=Be,ze=Be);return e&&se.forEach(function(S0){return t(A,S0)}),Oe&&nn(A,Se),oe}function Ke(A,j,k,q){if(typeof k=="object"&&k!==null&&k.type===Y&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case X:e:{for(var oe=k.key;j!==null;){if(j.key===oe){if(oe=k.type,oe===Y){if(j.tag===7){a(A,j.sibling),q=r(j,k.props.children),q.return=A,A=q;break e}}else if(j.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===be&&xl(oe)===j.type){a(A,j.sibling),q=r(j,k.props),Gi(q,k),q.return=A,A=q;break e}a(A,j);break}else t(A,j);j=j.sibling}k.type===Y?(q=dl(k.props.children,A.mode,q,k.key),q.return=A,A=q):(q=Ws(k.type,k.key,k.props,null,A.mode,q),Gi(q,k),q.return=A,A=q)}return h(A);case C:e:{for(oe=k.key;j!==null;){if(j.key===oe)if(j.tag===4&&j.stateNode.containerInfo===k.containerInfo&&j.stateNode.implementation===k.implementation){a(A,j.sibling),q=r(j,k.children||[]),q.return=A,A=q;break e}else{a(A,j);break}else t(A,j);j=j.sibling}q=sc(k,A.mode,q),q.return=A,A=q}return h(A);case be:return k=xl(k),Ke(A,j,k,q)}if(Fe(k))return le(A,j,k,q);if(tt(k)){if(oe=tt(k),typeof oe!="function")throw Error(u(150));return k=oe.call(k),he(A,j,k,q)}if(typeof k.then=="function")return Ke(A,j,ir(k),q);if(k.$$typeof===W)return Ke(A,j,tr(A,k),q);sr(A,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,j!==null&&j.tag===6?(a(A,j.sibling),q=r(j,k),q.return=A,A=q):(a(A,j),q=ic(k,A.mode,q),q.return=A,A=q),h(A)):a(A,j)}return function(A,j,k,q){try{Zi=0;var oe=Ke(A,j,k,q);return ni=null,oe}catch(se){if(se===ai||se===nr)throw se;var ze=Wt(29,se,null,A.mode);return ze.lanes=q,ze.return=A,ze}finally{}}}var vl=sh(!0),rh=sh(!1),Mn=!1;function vc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function gc(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 Dn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ln(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(qe&2)!==0){var r=i.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),i.pending=t,t=Fs(e),Zf(e,null,a),t}return Is(e,i,t,a),Fs(e)}function Qi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,O(e,a)}}function bc(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){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:i.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var wc=!1;function Xi(){if(wc){var e=ti;if(e!==null)throw e}}function Ki(e,t,a,i){wc=!1;var r=e.updateQueue;Mn=!1;var o=r.firstBaseUpdate,h=r.lastBaseUpdate,v=r.shared.pending;if(v!==null){r.shared.pending=null;var S=v,R=S.next;S.next=null,h===null?o=R:h.next=R,h=S;var z=e.alternate;z!==null&&(z=z.updateQueue,v=z.lastBaseUpdate,v!==h&&(v===null?z.firstBaseUpdate=R:v.next=R,z.lastBaseUpdate=S))}if(o!==null){var V=r.baseState;h=0,z=R=S=null,v=o;do{var T=v.lane&-536870913,M=T!==v.lane;if(M?(ke&T)===T:(i&T)===T){T!==0&&T===ei&&(wc=!0),z!==null&&(z=z.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var le=e,he=v;T=t;var Ke=a;switch(he.tag){case 1:if(le=he.payload,typeof le=="function"){V=le.call(Ke,V,T);break e}V=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=he.payload,T=typeof le=="function"?le.call(Ke,V,T):le,T==null)break e;V=N({},V,T);break e;case 2:Mn=!0}}T=v.callback,T!==null&&(e.flags|=64,M&&(e.flags|=8192),M=r.callbacks,M===null?r.callbacks=[T]:M.push(T))}else M={lane:T,tag:v.tag,payload:v.payload,callback:v.callback,next:null},z===null?(R=z=M,S=V):z=z.next=M,h|=T;if(v=v.next,v===null){if(v=r.shared.pending,v===null)break;M=v,v=M.next,M.next=null,r.lastBaseUpdate=M,r.shared.pending=null}}while(!0);z===null&&(S=V),r.baseState=S,r.firstBaseUpdate=R,r.lastBaseUpdate=z,o===null&&(r.shared.lanes=0),Hn|=h,e.lanes=h,e.memoizedState=V}}function uh(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function ch(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)uh(a[e],t)}var li=_(null),rr=_(0);function oh(e,t){e=pn,I(rr,e),I(li,t),pn=e|t.baseLanes}function Sc(){I(rr,pn),I(li,li.current)}function jc(){pn=rr.current,$(li),$(rr)}var Pt=_(null),xa=null;function Un(e){var t=e.alternate;I(ot,ot.current&1),I(Pt,e),xa===null&&(t===null||li.current!==null||t.memoizedState!==null)&&(xa=e)}function Nc(e){I(ot,ot.current),I(Pt,e),xa===null&&(xa=e)}function dh(e){e.tag===22?(I(ot,ot.current),I(Pt,e),xa===null&&(xa=e)):zn()}function zn(){I(ot,ot.current),I(Pt,Pt.current)}function ea(e){$(Pt),xa===e&&(xa=null),$(ot)}var ot=_(0);function ur(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||To(a)||Oo(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 rn=0,ge=null,Qe=null,mt=null,cr=!1,ii=!1,gl=!1,or=0,Ji=0,si=null,fg=0;function ut(){throw Error(u(321))}function _c(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Ft(e[a],t[a]))return!1;return!0}function Ac(e,t,a,i,r,o){return rn=o,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Kh:$c,gl=!1,o=a(i,r),gl=!1,ii&&(o=hh(t,a,i,r)),fh(e),o}function fh(e){U.H=Wi;var t=Qe!==null&&Qe.next!==null;if(rn=0,mt=Qe=ge=null,cr=!1,Ji=0,si=null,t)throw Error(u(300));e===null||pt||(e=e.dependencies,e!==null&&er(e)&&(pt=!0))}function hh(e,t,a,i){ge=e;var r=0;do{if(ii&&(si=null),Ji=0,ii=!1,25<=r)throw Error(u(301));if(r+=1,mt=Qe=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=Jh,o=t(a,i)}while(ii);return o}function hg(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?Ii(t):t,e=e.useState()[0],(Qe!==null?Qe.memoizedState:null)!==e&&(ge.flags|=1024),t}function Ec(){var e=or!==0;return or=0,e}function kc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Rc(e){if(cr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}cr=!1}rn=0,mt=Qe=ge=null,ii=!1,Ji=or=0,si=null}function Bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?ge.memoizedState=mt=e:mt=mt.next=e,mt}function dt(){if(Qe===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=mt===null?ge.memoizedState:mt.next;if(t!==null)mt=t,Qe=e;else{if(e===null)throw ge.alternate===null?Error(u(467)):Error(u(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},mt===null?ge.memoizedState=mt=e:mt=mt.next=e}return mt}function dr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ii(e){var t=Ji;return Ji+=1,si===null&&(si=[]),e=nh(si,e,t),t=ge,(mt===null?t.memoizedState:mt.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Kh:$c),e}function fr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ii(e);if(e.$$typeof===W)return Ct(e)}throw Error(u(438,String(e)))}function Cc(e){var t=null,a=ge.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=ge.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=dr(),ge.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=vt;return t.index++,a}function un(e,t){return typeof t=="function"?t(e):t}function hr(e){var t=dt();return Tc(t,Qe,e)}function Tc(e,t,a){var i=e.queue;if(i===null)throw Error(u(311));i.lastRenderedReducer=a;var r=e.baseQueue,o=i.pending;if(o!==null){if(r!==null){var h=r.next;r.next=o.next,o.next=h}t.baseQueue=r=o,i.pending=null}if(o=e.baseState,r===null)e.memoizedState=o;else{t=r.next;var v=h=null,S=null,R=t,z=!1;do{var V=R.lane&-536870913;if(V!==R.lane?(ke&V)===V:(rn&V)===V){var T=R.revertLane;if(T===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),V===ei&&(z=!0);else if((rn&T)===T){R=R.next,T===ei&&(z=!0);continue}else V={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(v=S=V,h=o):S=S.next=V,ge.lanes|=T,Hn|=T;V=R.action,gl&&a(o,V),o=R.hasEagerState?R.eagerState:a(o,V)}else T={lane:V,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},S===null?(v=S=T,h=o):S=S.next=T,ge.lanes|=V,Hn|=V;R=R.next}while(R!==null&&R!==t);if(S===null?h=o:S.next=v,!Ft(o,e.memoizedState)&&(pt=!0,z&&(a=ti,a!==null)))throw a;e.memoizedState=o,e.baseState=h,e.baseQueue=S,i.lastRenderedState=o}return r===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Oc(e){var t=dt(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var i=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);Ft(o,t.memoizedState)||(pt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,i]}function mh(e,t,a){var i=ge,r=dt(),o=Oe;if(o){if(a===void 0)throw Error(u(407));a=a()}else a=t();var h=!Ft((Qe||r).memoizedState,a);if(h&&(r.memoizedState=a,pt=!0),r=r.queue,Lc(yh.bind(null,i,r,e),[e]),r.getSnapshot!==t||h||mt!==null&&mt.memoizedState.tag&1){if(i.flags|=2048,ri(9,{destroy:void 0},xh.bind(null,i,r,a,t),null),Je===null)throw Error(u(349));o||(rn&127)!==0||ph(i,t,a)}return a}function ph(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ge.updateQueue,t===null?(t=dr(),ge.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function xh(e,t,a,i){t.value=a,t.getSnapshot=i,vh(t)&&gh(e)}function yh(e,t,a){return a(function(){vh(t)&&gh(e)})}function vh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Ft(e,a)}catch{return!0}}function gh(e){var t=ol(e,2);t!==null&&Xt(t,e,2)}function Mc(e){var t=Bt();if(typeof e=="function"){var a=e;if(e=a(),gl){ua(!0);try{a()}finally{ua(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:un,lastRenderedState:e},t}function bh(e,t,a,i){return e.baseState=a,Tc(e,Qe,typeof i=="function"?i:un)}function mg(e,t,a,i,r){if(xr(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,i(o),a=t.pending,a===null?(o.next=t.pending=o,wh(t,o)):(o.next=a.next,t.pending=a.next=o)}}function wh(e,t){var a=t.action,i=t.payload,r=e.state;if(t.isTransition){var o=U.T,h={};U.T=h;try{var v=a(r,i),S=U.S;S!==null&&S(h,v),Sh(e,t,v)}catch(R){Dc(e,t,R)}finally{o!==null&&h.types!==null&&(o.types=h.types),U.T=o}}else try{o=a(r,i),Sh(e,t,o)}catch(R){Dc(e,t,R)}}function Sh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){jh(e,t,i)},function(i){return Dc(e,t,i)}):jh(e,t,a)}function jh(e,t,a){t.status="fulfilled",t.value=a,Nh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,wh(e,a)))}function Dc(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,Nh(t),t=t.next;while(t!==i)}e.action=null}function Nh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function _h(e,t){return t}function Ah(e,t){if(Oe){var a=Je.formState;if(a!==null){e:{var i=ge;if(Oe){if(We){t:{for(var r=We,o=pa;r.nodeType!==8;){if(!o){r=null;break t}if(r=ya(r.nextSibling),r===null){r=null;break t}}o=r.data,r=o==="F!"||o==="F"?r:null}if(r){We=ya(r.nextSibling),i=r.data==="F!";break e}}Tn(i)}i=!1}i&&(t=a[0])}}return a=Bt(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_h,lastRenderedState:t},a.queue=i,a=Gh.bind(null,ge,i),i.dispatch=a,i=Mc(!1),o=Hc.bind(null,ge,!1,i.queue),i=Bt(),r={state:t,dispatch:null,action:e,pending:null},i.queue=r,a=mg.bind(null,ge,r,o,a),r.dispatch=a,i.memoizedState=e,[t,a,!1]}function Eh(e){var t=dt();return kh(t,Qe,e)}function kh(e,t,a){if(t=Tc(e,t,_h)[0],e=hr(un)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Ii(t)}catch(h){throw h===ai?nr:h}else i=t;t=dt();var r=t.queue,o=r.dispatch;return a!==t.memoizedState&&(ge.flags|=2048,ri(9,{destroy:void 0},pg.bind(null,r,a),null)),[i,o,e]}function pg(e,t){e.action=t}function Rh(e){var t=dt(),a=Qe;if(a!==null)return kh(t,a,e);dt(),t=t.memoizedState,a=dt();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function ri(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=ge.updateQueue,t===null&&(t=dr(),ge.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function Ch(){return dt().memoizedState}function mr(e,t,a,i){var r=Bt();ge.flags|=e,r.memoizedState=ri(1|t,{destroy:void 0},a,i===void 0?null:i)}function pr(e,t,a,i){var r=dt();i=i===void 0?null:i;var o=r.memoizedState.inst;Qe!==null&&i!==null&&_c(i,Qe.memoizedState.deps)?r.memoizedState=ri(t,o,a,i):(ge.flags|=e,r.memoizedState=ri(1|t,o,a,i))}function Th(e,t){mr(8390656,8,e,t)}function Lc(e,t){pr(2048,8,e,t)}function xg(e){ge.flags|=4;var t=ge.updateQueue;if(t===null)t=dr(),ge.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Oh(e){var t=dt().memoizedState;return xg({ref:t,nextImpl:e}),function(){if((qe&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Mh(e,t){return pr(4,2,e,t)}function Dh(e,t){return pr(4,4,e,t)}function Lh(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 Uh(e,t,a){a=a!=null?a.concat([e]):null,pr(4,4,Lh.bind(null,t,e),a)}function Uc(){}function zh(e,t){var a=dt();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&_c(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function Bh(e,t){var a=dt();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&_c(t,i[1]))return i[0];if(i=e(),gl){ua(!0);try{e()}finally{ua(!1)}}return a.memoizedState=[i,t],i}function zc(e,t,a){return a===void 0||(rn&1073741824)!==0&&(ke&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=qm(),ge.lanes|=e,Hn|=e,a)}function qh(e,t,a,i){return Ft(a,t)?a:li.current!==null?(e=zc(e,a,i),Ft(e,t)||(pt=!0),e):(rn&42)===0||(rn&1073741824)!==0&&(ke&261930)===0?(pt=!0,e.memoizedState=a):(e=qm(),ge.lanes|=e,Hn|=e,t)}function Hh(e,t,a,i,r){var o=F.p;F.p=o!==0&&8>o?o:8;var h=U.T,v={};U.T=v,Hc(e,!1,t,a);try{var S=r(),R=U.S;if(R!==null&&R(v,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var z=dg(S,i);Fi(e,t,z,na(e))}else Fi(e,t,i,na(e))}catch(V){Fi(e,t,{then:function(){},status:"rejected",reason:V},na())}finally{F.p=o,h!==null&&v.types!==null&&(h.types=v.types),U.T=h}}function yg(){}function Bc(e,t,a,i){if(e.tag!==5)throw Error(u(476));var r=$h(e).queue;Hh(e,r,t,ie,a===null?yg:function(){return Yh(e),a(i)})}function $h(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:un,lastRenderedState:ie},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:un,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Yh(e){var t=$h(e);t.next===null&&(t=e.alternate.memoizedState),Fi(e,t.next.queue,{},na())}function qc(){return Ct(ms)}function Vh(){return dt().memoizedState}function Zh(){return dt().memoizedState}function vg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=na();e=Dn(a);var i=Ln(t,e,a);i!==null&&(Xt(i,t,a),Qi(i,t,a)),t={cache:mc()},e.payload=t;return}t=t.return}}function gg(e,t,a){var i=na();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},xr(e)?Qh(t,a):(a=nc(e,t,a,i),a!==null&&(Xt(a,e,i),Xh(a,t,i)))}function Gh(e,t,a){var i=na();Fi(e,t,a,i)}function Fi(e,t,a,i){var r={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(xr(e))Qh(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,v=o(h,a);if(r.hasEagerState=!0,r.eagerState=v,Ft(v,h))return Is(e,t,r,0),Je===null&&Js(),!1}catch{}finally{}if(a=nc(e,t,r,i),a!==null)return Xt(a,e,i),Xh(a,t,i),!0}return!1}function Hc(e,t,a,i){if(i={lane:2,revertLane:go(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},xr(e)){if(t)throw Error(u(479))}else t=nc(e,a,i,2),t!==null&&Xt(t,e,2)}function xr(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function Qh(e,t){ii=cr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Xh(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,O(e,a)}}var Wi={readContext:Ct,use:fr,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};Wi.useEffectEvent=ut;var Kh={readContext:Ct,use:fr,useCallback:function(e,t){return Bt().memoizedState=[e,t===void 0?null:t],e},useContext:Ct,useEffect:Th,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,mr(4194308,4,Lh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return mr(4194308,4,e,t)},useInsertionEffect:function(e,t){mr(4,2,e,t)},useMemo:function(e,t){var a=Bt();t=t===void 0?null:t;var i=e();if(gl){ua(!0);try{e()}finally{ua(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=Bt();if(a!==void 0){var r=a(t);if(gl){ua(!0);try{a(t)}finally{ua(!1)}}}else r=t;return i.memoizedState=i.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},i.queue=e,e=e.dispatch=gg.bind(null,ge,e),[i.memoizedState,e]},useRef:function(e){var t=Bt();return e={current:e},t.memoizedState=e},useState:function(e){e=Mc(e);var t=e.queue,a=Gh.bind(null,ge,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Uc,useDeferredValue:function(e,t){var a=Bt();return zc(a,e,t)},useTransition:function(){var e=Mc(!1);return e=Hh.bind(null,ge,e.queue,!0,!1),Bt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=ge,r=Bt();if(Oe){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Je===null)throw Error(u(349));(ke&127)!==0||ph(i,t,a)}r.memoizedState=a;var o={value:a,getSnapshot:t};return r.queue=o,Th(yh.bind(null,i,o,e),[e]),i.flags|=2048,ri(9,{destroy:void 0},xh.bind(null,i,o,a,t),null),a},useId:function(){var e=Bt(),t=Je.identifierPrefix;if(Oe){var a=Va,i=Ya;a=(i&~(1<<32-Et(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=or++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=fg++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:qc,useFormState:Ah,useActionState:Ah,useOptimistic:function(e){var t=Bt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Hc.bind(null,ge,!0,a),a.dispatch=t,[e,t]},useMemoCache:Cc,useCacheRefresh:function(){return Bt().memoizedState=vg.bind(null,ge)},useEffectEvent:function(e){var t=Bt(),a={impl:e};return t.memoizedState=a,function(){if((qe&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},$c={readContext:Ct,use:fr,useCallback:zh,useContext:Ct,useEffect:Lc,useImperativeHandle:Uh,useInsertionEffect:Mh,useLayoutEffect:Dh,useMemo:Bh,useReducer:hr,useRef:Ch,useState:function(){return hr(un)},useDebugValue:Uc,useDeferredValue:function(e,t){var a=dt();return qh(a,Qe.memoizedState,e,t)},useTransition:function(){var e=hr(un)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:Ii(e),t]},useSyncExternalStore:mh,useId:Vh,useHostTransitionStatus:qc,useFormState:Eh,useActionState:Eh,useOptimistic:function(e,t){var a=dt();return bh(a,Qe,e,t)},useMemoCache:Cc,useCacheRefresh:Zh};$c.useEffectEvent=Oh;var Jh={readContext:Ct,use:fr,useCallback:zh,useContext:Ct,useEffect:Lc,useImperativeHandle:Uh,useInsertionEffect:Mh,useLayoutEffect:Dh,useMemo:Bh,useReducer:Oc,useRef:Ch,useState:function(){return Oc(un)},useDebugValue:Uc,useDeferredValue:function(e,t){var a=dt();return Qe===null?zc(a,e,t):qh(a,Qe.memoizedState,e,t)},useTransition:function(){var e=Oc(un)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:Ii(e),t]},useSyncExternalStore:mh,useId:Vh,useHostTransitionStatus:qc,useFormState:Rh,useActionState:Rh,useOptimistic:function(e,t){var a=dt();return Qe!==null?bh(a,Qe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Cc,useCacheRefresh:Zh};Jh.useEffectEvent=Oh;function Yc(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:N({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Vc={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=na(),r=Dn(i);r.payload=t,a!=null&&(r.callback=a),t=Ln(e,r,i),t!==null&&(Xt(t,e,i),Qi(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=na(),r=Dn(i);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=Ln(e,r,i),t!==null&&(Xt(t,e,i),Qi(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=na(),i=Dn(a);i.tag=2,t!=null&&(i.callback=t),t=Ln(e,i,a),t!==null&&(Xt(t,e,a),Qi(t,e,a))}};function Ih(e,t,a,i,r,o,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,o,h):t.prototype&&t.prototype.isPureReactComponent?!Bi(a,i)||!Bi(r,o):!0}function Fh(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&Vc.enqueueReplaceState(t,t.state,null)}function bl(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}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 Wh(e){Ks(e)}function Ph(e){console.error(e)}function em(e){Ks(e)}function yr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function tm(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Zc(e,t,a){return a=Dn(a),a.tag=3,a.payload={element:null},a.callback=function(){yr(e,t)},a}function am(e){return e=Dn(e),e.tag=3,e}function nm(e,t,a,i){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var o=i.value;e.payload=function(){return r(o)},e.callback=function(){tm(t,a,i)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){tm(t,a,i),typeof r!="function"&&($n===null?$n=new Set([this]):$n.add(this));var v=i.stack;this.componentDidCatch(i.value,{componentStack:v!==null?v:""})})}function bg(e,t,a,i,r){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&Pl(t,a,r,!0),a=Pt.current,a!==null){switch(a.tag){case 31:case 13:return xa===null?Rr():a.alternate===null&&ct===0&&(ct=3),a.flags&=-257,a.flags|=65536,a.lanes=r,i===lr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),xo(e,i,r)),!1;case 22:return a.flags|=65536,i===lr?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),xo(e,i,r)),!1}throw Error(u(435,a.tag))}return xo(e,i,r),Rr(),!1}if(Oe)return t=Pt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,i!==cc&&(e=Error(u(422),{cause:i}),$i(fa(e,a)))):(i!==cc&&(t=Error(u(423),{cause:i}),$i(fa(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,i=fa(i,a),r=Zc(e.stateNode,i,r),bc(e,r),ct!==4&&(ct=2)),!1;var o=Error(u(520),{cause:i});if(o=fa(o,a),ss===null?ss=[o]:ss.push(o),ct!==4&&(ct=2),t===null)return!0;i=fa(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=Zc(a.stateNode,i,e),bc(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"&&($n===null||!$n.has(o))))return a.flags|=65536,r&=-r,a.lanes|=r,r=am(r),nm(r,e,a,i),bc(a,r),!1}a=a.return}while(a!==null);return!1}var Gc=Error(u(461)),pt=!1;function Tt(e,t,a,i){t.child=e===null?rh(t,null,a,i):vl(t,e.child,a,i)}function lm(e,t,a,i,r){a=a.render;var o=t.ref;if("ref"in i){var h={};for(var v in i)v!=="ref"&&(h[v]=i[v])}else h=i;return ml(t),i=Ac(e,t,a,h,o,r),v=Ec(),e!==null&&!pt?(kc(e,t,r),cn(e,t,r)):(Oe&&v&&rc(t),t.flags|=1,Tt(e,t,i,r),t.child)}function im(e,t,a,i,r){if(e===null){var o=a.type;return typeof o=="function"&&!lc(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,sm(e,t,o,i,r)):(e=Ws(a.type,null,i,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!Pc(e,r)){var h=o.memoizedProps;if(a=a.compare,a=a!==null?a:Bi,a(h,i)&&e.ref===t.ref)return cn(e,t,r)}return t.flags|=1,e=an(o,i),e.ref=t.ref,e.return=t,t.child=e}function sm(e,t,a,i,r){if(e!==null){var o=e.memoizedProps;if(Bi(o,i)&&e.ref===t.ref)if(pt=!1,t.pendingProps=i=o,Pc(e,r))(e.flags&131072)!==0&&(pt=!0);else return t.lanes=e.lanes,cn(e,t,r)}return Qc(e,t,a,i,r)}function rm(e,t,a,i){var r=i.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|a:a,e!==null){for(i=t.child=e.child,r=0;i!==null;)r=r|i.lanes|i.childLanes,i=i.sibling;i=r&~o}else i=0,t.child=null;return um(e,t,o,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ar(t,o!==null?o.cachePool:null),o!==null?oh(t,o):Sc(),dh(t);else return i=t.lanes=536870912,um(e,t,o!==null?o.baseLanes|a:a,a,i)}else o!==null?(ar(t,o.cachePool),oh(t,o),zn(),t.memoizedState=null):(e!==null&&ar(t,null),Sc(),zn());return Tt(e,t,r,a),t.child}function Pi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function um(e,t,a,i,r){var o=xc();return o=o===null?null:{parent:ht._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&ar(t,null),Sc(),dh(t),e!==null&&Pl(e,t,i,!0),t.childLanes=r,null}function vr(e,t){return t=br({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cm(e,t,a){return vl(t,e.child,null,a),e=vr(t,t.pendingProps),e.flags|=2,ea(t),t.memoizedState=null,e}function wg(e,t,a){var i=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Oe){if(i.mode==="hidden")return e=vr(t,i),t.lanes=536870912,Pi(null,e);if(Nc(t),(e=We)?(e=wp(e,pa),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Rn!==null?{id:Ya,overflow:Va}:null,retryLane:536870912,hydrationErrors:null},a=Qf(e),a.return=t,t.child=a,Rt=t,We=null)):e=null,e===null)throw Tn(t);return t.lanes=536870912,null}return vr(t,i)}var o=e.memoizedState;if(o!==null){var h=o.dehydrated;if(Nc(t),r)if(t.flags&256)t.flags&=-257,t=cm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(pt||Pl(e,t,a,!1),r=(a&e.childLanes)!==0,pt||r){if(i=Je,i!==null&&(h=ue(i,a),h!==0&&h!==o.retryLane))throw o.retryLane=h,ol(e,h),Xt(i,e,h),Gc;Rr(),t=cm(e,t,a)}else e=o.treeContext,We=ya(h.nextSibling),Rt=t,Oe=!0,Cn=null,pa=!1,e!==null&&Jf(t,e),t=vr(t,i),t.flags|=4096;return t}return e=an(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function gr(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 Qc(e,t,a,i,r){return ml(t),a=Ac(e,t,a,i,void 0,r),i=Ec(),e!==null&&!pt?(kc(e,t,r),cn(e,t,r)):(Oe&&i&&rc(t),t.flags|=1,Tt(e,t,a,r),t.child)}function om(e,t,a,i,r,o){return ml(t),t.updateQueue=null,a=hh(t,i,a,r),fh(e),i=Ec(),e!==null&&!pt?(kc(e,t,o),cn(e,t,o)):(Oe&&i&&rc(t),t.flags|=1,Tt(e,t,a,o),t.child)}function dm(e,t,a,i,r){if(ml(t),t.stateNode===null){var o=Jl,h=a.contextType;typeof h=="object"&&h!==null&&(o=Ct(h)),o=new a(i,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Vc,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=i,o.state=t.memoizedState,o.refs={},vc(t),h=a.contextType,o.context=typeof h=="object"&&h!==null?Ct(h):Jl,o.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(Yc(t,a,h,i),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&&Vc.enqueueReplaceState(o,o.state,null),Ki(t,i,o,r),Xi(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){o=t.stateNode;var v=t.memoizedProps,S=bl(a,v);o.props=S;var R=o.context,z=a.contextType;h=Jl,typeof z=="object"&&z!==null&&(h=Ct(z));var V=a.getDerivedStateFromProps;z=typeof V=="function"||typeof o.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,z||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(v||R!==h)&&Fh(t,o,i,h),Mn=!1;var T=t.memoizedState;o.state=T,Ki(t,i,o,r),Xi(),R=t.memoizedState,v||T!==R||Mn?(typeof V=="function"&&(Yc(t,a,V,i),R=t.memoizedState),(S=Mn||Ih(t,a,S,i,T,R,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=i,t.memoizedState=R),o.props=i,o.state=R,o.context=h,i=S):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{o=t.stateNode,gc(e,t),h=t.memoizedProps,z=bl(a,h),o.props=z,V=t.pendingProps,T=o.context,R=a.contextType,S=Jl,typeof R=="object"&&R!==null&&(S=Ct(R)),v=a.getDerivedStateFromProps,(R=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(h!==V||T!==S)&&Fh(t,o,i,S),Mn=!1,T=t.memoizedState,o.state=T,Ki(t,i,o,r),Xi();var M=t.memoizedState;h!==V||T!==M||Mn||e!==null&&e.dependencies!==null&&er(e.dependencies)?(typeof v=="function"&&(Yc(t,a,v,i),M=t.memoizedState),(z=Mn||Ih(t,a,z,i,T,M,S)||e!==null&&e.dependencies!==null&&er(e.dependencies))?(R||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,M,S),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,M,S)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=M),o.props=i,o.state=M,o.context=S,i=z):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),i=!1)}return o=i,gr(e,t),i=(t.flags&128)!==0,o||i?(o=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&i?(t.child=vl(t,e.child,null,r),t.child=vl(t,null,a,r)):Tt(e,t,a,r),t.memoizedState=o.state,e=t.child):e=cn(e,t,r),e}function fm(e,t,a,i){return fl(),t.flags|=256,Tt(e,t,a,i),t.child}var Xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kc(e){return{baseLanes:e,cachePool:th()}}function Jc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=aa),e}function hm(e,t,a){var i=t.pendingProps,r=!1,o=(t.flags&128)!==0,h;if((h=o)||(h=e!==null&&e.memoizedState===null?!1:(ot.current&2)!==0),h&&(r=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Oe){if(r?Un(t):zn(),(e=We)?(e=wp(e,pa),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Rn!==null?{id:Ya,overflow:Va}:null,retryLane:536870912,hydrationErrors:null},a=Qf(e),a.return=t,t.child=a,Rt=t,We=null)):e=null,e===null)throw Tn(t);return Oo(e)?t.lanes=32:t.lanes=536870912,null}var v=i.children;return i=i.fallback,r?(zn(),r=t.mode,v=br({mode:"hidden",children:v},r),i=dl(i,r,a,null),v.return=t,i.return=t,v.sibling=i,t.child=v,i=t.child,i.memoizedState=Kc(a),i.childLanes=Jc(e,h,a),t.memoizedState=Xc,Pi(null,i)):(Un(t),Ic(t,v))}var S=e.memoizedState;if(S!==null&&(v=S.dehydrated,v!==null)){if(o)t.flags&256?(Un(t),t.flags&=-257,t=Fc(e,t,a)):t.memoizedState!==null?(zn(),t.child=e.child,t.flags|=128,t=null):(zn(),v=i.fallback,r=t.mode,i=br({mode:"visible",children:i.children},r),v=dl(v,r,a,null),v.flags|=2,i.return=t,v.return=t,i.sibling=v,t.child=i,vl(t,e.child,null,a),i=t.child,i.memoizedState=Kc(a),i.childLanes=Jc(e,h,a),t.memoizedState=Xc,t=Pi(null,i));else if(Un(t),Oo(v)){if(h=v.nextSibling&&v.nextSibling.dataset,h)var R=h.dgst;h=R,i=Error(u(419)),i.stack="",i.digest=h,$i({value:i,source:null,stack:null}),t=Fc(e,t,a)}else if(pt||Pl(e,t,a,!1),h=(a&e.childLanes)!==0,pt||h){if(h=Je,h!==null&&(i=ue(h,a),i!==0&&i!==S.retryLane))throw S.retryLane=i,ol(e,i),Xt(h,e,i),Gc;To(v)||Rr(),t=Fc(e,t,a)}else To(v)?(t.flags|=192,t.child=e.child,t=null):(e=S.treeContext,We=ya(v.nextSibling),Rt=t,Oe=!0,Cn=null,pa=!1,e!==null&&Jf(t,e),t=Ic(t,i.children),t.flags|=4096);return t}return r?(zn(),v=i.fallback,r=t.mode,S=e.child,R=S.sibling,i=an(S,{mode:"hidden",children:i.children}),i.subtreeFlags=S.subtreeFlags&65011712,R!==null?v=an(R,v):(v=dl(v,r,a,null),v.flags|=2),v.return=t,i.return=t,i.sibling=v,t.child=i,Pi(null,i),i=t.child,v=e.child.memoizedState,v===null?v=Kc(a):(r=v.cachePool,r!==null?(S=ht._currentValue,r=r.parent!==S?{parent:S,pool:S}:r):r=th(),v={baseLanes:v.baseLanes|a,cachePool:r}),i.memoizedState=v,i.childLanes=Jc(e,h,a),t.memoizedState=Xc,Pi(e.child,i)):(Un(t),a=e.child,e=a.sibling,a=an(a,{mode:"visible",children:i.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 Ic(e,t){return t=br({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function br(e,t){return e=Wt(22,e,null,t),e.lanes=0,e}function Fc(e,t,a){return vl(t,e.child,null,a),e=Ic(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mm(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),fc(e.return,t,a)}function Wc(e,t,a,i,r,o){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:r,treeForkCount:o}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=i,h.tail=a,h.tailMode=r,h.treeForkCount=o)}function pm(e,t,a){var i=t.pendingProps,r=i.revealOrder,o=i.tail;i=i.children;var h=ot.current,v=(h&2)!==0;if(v?(h=h&1|2,t.flags|=128):h&=1,I(ot,h),Tt(e,t,i,a),i=Oe?Hi:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mm(e,a,t);else if(e.tag===19)mm(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&&ur(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),Wc(t,!1,r,a,o,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&ur(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}Wc(t,!0,a,null,o,i);break;case"together":Wc(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function cn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Hn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Pl(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=an(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=an(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&er(e)))}function Sg(e,t,a){switch(t.tag){case 3:st(t,t.stateNode.containerInfo),On(t,ht,e.memoizedState.cache),fl();break;case 27:case 5:lt(t);break;case 4:st(t,t.stateNode.containerInfo);break;case 10:On(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Nc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Un(t),t.flags|=128,null):(a&t.child.childLanes)!==0?hm(e,t,a):(Un(t),e=cn(e,t,a),e!==null?e.sibling:null);Un(t);break;case 19:var r=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(Pl(e,t,a,!1),i=(a&t.childLanes)!==0),r){if(i)return pm(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),I(ot,ot.current),i)break;return null;case 22:return t.lanes=0,rm(e,t,a,t.pendingProps);case 24:On(t,ht,e.memoizedState.cache)}return cn(e,t,a)}function xm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)pt=!0;else{if(!Pc(e,a)&&(t.flags&128)===0)return pt=!1,Sg(e,t,a);pt=(e.flags&131072)!==0}else pt=!1,Oe&&(t.flags&1048576)!==0&&Kf(t,Hi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=xl(t.elementType),t.type=e,typeof e=="function")lc(e)?(i=bl(e,i),t.tag=1,t=dm(null,t,e,i,a)):(t.tag=0,t=Qc(null,t,e,i,a));else{if(e!=null){var r=e.$$typeof;if(r===ce){t.tag=11,t=lm(null,t,e,i,a);break e}else if(r===J){t.tag=14,t=im(null,t,e,i,a);break e}}throw t=wt(e)||e,Error(u(306,t,""))}}return t;case 0:return Qc(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,r=bl(i,t.pendingProps),dm(e,t,i,r,a);case 3:e:{if(st(t,t.stateNode.containerInfo),e===null)throw Error(u(387));i=t.pendingProps;var o=t.memoizedState;r=o.element,gc(e,t),Ki(t,i,null,a);var h=t.memoizedState;if(i=h.cache,On(t,ht,i),i!==o.cache&&hc(t,[ht],a,!0),Xi(),i=h.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=fm(e,t,i,a);break e}else if(i!==r){r=fa(Error(u(424)),t),$i(r),t=fm(e,t,i,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=ya(e.firstChild),Rt=t,Oe=!0,Cn=null,pa=!0,a=rh(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(fl(),i===r){t=cn(e,t,a);break e}Tt(e,t,i,a)}t=t.child}return t;case 26:return gr(e,t),e===null?(a=Ep(t.type,null,t.pendingProps,null))?t.memoizedState=a:Oe||(a=t.type,e=t.pendingProps,i=Ur(xe.current).createElement(a),i[kt]=t,i[$t]=e,Ot(i,a,e),_t(i),t.stateNode=i):t.memoizedState=Ep(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return lt(t),e===null&&Oe&&(i=t.stateNode=Np(t.type,t.pendingProps,xe.current),Rt=t,pa=!0,r=We,Gn(t.type)?(Mo=r,We=ya(i.firstChild)):We=r),Tt(e,t,t.pendingProps.children,a),gr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oe&&((r=i=We)&&(i=Wg(i,t.type,t.pendingProps,pa),i!==null?(t.stateNode=i,Rt=t,We=ya(i.firstChild),pa=!1,r=!0):r=!1),r||Tn(t)),lt(t),r=t.type,o=t.pendingProps,h=e!==null?e.memoizedProps:null,i=o.children,ko(r,o)?i=null:h!==null&&ko(r,h)&&(t.flags|=32),t.memoizedState!==null&&(r=Ac(e,t,hg,null,null,a),ms._currentValue=r),gr(e,t),Tt(e,t,i,a),t.child;case 6:return e===null&&Oe&&((e=a=We)&&(a=Pg(a,t.pendingProps,pa),a!==null?(t.stateNode=a,Rt=t,We=null,e=!0):e=!1),e||Tn(t)),null;case 13:return hm(e,t,a);case 4:return st(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=vl(t,null,i,a):Tt(e,t,i,a),t.child;case 11:return lm(e,t,t.type,t.pendingProps,a);case 7:return Tt(e,t,t.pendingProps,a),t.child;case 8:return Tt(e,t,t.pendingProps.children,a),t.child;case 12:return Tt(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,On(t,t.type,i.value),Tt(e,t,i.children,a),t.child;case 9:return r=t.type._context,i=t.pendingProps.children,ml(t),r=Ct(r),i=i(r),t.flags|=1,Tt(e,t,i,a),t.child;case 14:return im(e,t,t.type,t.pendingProps,a);case 15:return sm(e,t,t.type,t.pendingProps,a);case 19:return pm(e,t,a);case 31:return wg(e,t,a);case 22:return rm(e,t,a,t.pendingProps);case 24:return ml(t),i=Ct(ht),e===null?(r=xc(),r===null&&(r=Je,o=mc(),r.pooledCache=o,o.refCount++,o!==null&&(r.pooledCacheLanes|=a),r=o),t.memoizedState={parent:i,cache:r},vc(t),On(t,ht,r)):((e.lanes&a)!==0&&(gc(e,t),Ki(t,null,null,a),Xi()),r=e.memoizedState,o=t.memoizedState,r.parent!==i?(r={parent:i,cache:i},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),On(t,ht,i)):(i=o.cache,On(t,ht,i),i!==r.cache&&hc(t,[ht],a,!0))),Tt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function on(e){e.flags|=4}function eo(e,t,a,i,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(Vm())e.flags|=8192;else throw yl=lr,yc}else e.flags&=-16777217}function ym(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Op(t))if(Vm())e.flags|=8192;else throw yl=lr,yc}function wr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ls():536870912,e.lanes|=t,di|=t)}function es(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 i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,i|=r.subtreeFlags&65011712,i|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function jg(e,t,a){var i=t.pendingProps;switch(uc(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,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),sn(ht),we(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Wl(t)?on(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,oc())),Pe(t),null;case 26:var r=t.type,o=t.memoizedState;return e===null?(on(t),o!==null?(Pe(t),ym(t,o)):(Pe(t),eo(t,r,null,i,a))):o?o!==e.memoizedState?(on(t),Pe(t),ym(t,o)):(Pe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&on(t),Pe(t),eo(t,r,e,i,a)),null;case 27:if(Ea(t),a=xe.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&on(t);else{if(!i){if(t.stateNode===null)throw Error(u(166));return Pe(t),null}e=te.current,Wl(t)?If(t):(e=Np(r,i,a),t.stateNode=e,on(t))}return Pe(t),null;case 5:if(Ea(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&on(t);else{if(!i){if(t.stateNode===null)throw Error(u(166));return Pe(t),null}if(o=te.current,Wl(t))If(t);else{var h=Ur(xe.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 i.is=="string"?h.createElement("select",{is:i.is}):h.createElement("select"),i.multiple?o.multiple=!0:i.size&&(o.size=i.size);break;default:o=typeof i.is=="string"?h.createElement(r,{is:i.is}):h.createElement(r)}}o[kt]=t,o[$t]=i;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(Ot(o,r,i),r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&on(t)}}return Pe(t),eo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&on(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(u(166));if(e=xe.current,Wl(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,r=Rt,r!==null)switch(r.tag){case 27:case 5:i=r.memoizedProps}e[kt]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||hp(e.nodeValue,a)),e||Tn(t,!0)}else e=Ur(e).createTextNode(i),e[kt]=t,t.stateNode=e}return Pe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=Wl(t),a!==null){if(e===null){if(!i)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[kt]=t}else fl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),e=!1}else a=oc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(ea(t),t):(ea(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Pe(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Wl(t),i!==null&&i.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[kt]=t}else fl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),r=!1}else r=oc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(ea(t),t):(ea(t),null)}return ea(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,r=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(r=i.alternate.memoizedState.cachePool.pool),o=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==r&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),wr(t,t.updateQueue),Pe(t),null);case 4:return we(),e===null&&jo(t.stateNode.containerInfo),Pe(t),null;case 10:return sn(t.type),Pe(t),null;case 19:if($(ot),i=t.memoizedState,i===null)return Pe(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)es(i,!1);else{if(ct!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=ur(e),o!==null){for(t.flags|=128,es(i,!1),e=o.updateQueue,t.updateQueue=e,wr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Gf(a,e),a=a.sibling;return I(ot,ot.current&1|2),Oe&&nn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&St()>Ar&&(t.flags|=128,r=!0,es(i,!1),t.lanes=4194304)}else{if(!r)if(e=ur(o),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,wr(t,e),es(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Oe)return Pe(t),null}else 2*St()-i.renderingStartTime>Ar&&a!==536870912&&(t.flags|=128,r=!0,es(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(e=i.last,e!==null?e.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=St(),e.sibling=null,a=ot.current,I(ot,r?a&1|2:a&1),Oe&&nn(t,i.treeForkCount),e):(Pe(t),null);case 22:case 23:return ea(t),jc(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),a=t.updateQueue,a!==null&&wr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&$(pl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),sn(ht),Pe(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Ng(e,t){switch(uc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return sn(ht),we(),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(ea(t),t.alternate===null)throw Error(u(340));fl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ea(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));fl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $(ot),null;case 4:return we(),null;case 10:return sn(t.type),null;case 22:case 23:return ea(t),jc(),e!==null&&$(pl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return sn(ht),null;case 25:return null;default:return null}}function vm(e,t){switch(uc(t),t.tag){case 3:sn(ht),we();break;case 26:case 27:case 5:Ea(t);break;case 4:we();break;case 31:t.memoizedState!==null&&ea(t);break;case 13:ea(t);break;case 19:$(ot);break;case 10:sn(t.type);break;case 22:case 23:ea(t),jc(),e!==null&&$(pl);break;case 24:sn(ht)}}function ts(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var r=i.next;a=r;do{if((a.tag&e)===e){i=void 0;var o=a.create,h=a.inst;i=o(),h.destroy=i}a=a.next}while(a!==r)}}catch(v){Ze(t,t.return,v)}}function Bn(e,t,a){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var o=r.next;i=o;do{if((i.tag&e)===e){var h=i.inst,v=h.destroy;if(v!==void 0){h.destroy=void 0,r=t;var S=a,R=v;try{R()}catch(z){Ze(r,S,z)}}}i=i.next}while(i!==o)}}catch(z){Ze(t,t.return,z)}}function gm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ch(t,a)}catch(i){Ze(e,e.return,i)}}}function bm(e,t,a){a.props=bl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){Ze(e,t,i)}}function as(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(r){Ze(e,t,r)}}function Za(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}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 wm(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(r){Ze(e,e.return,r)}}function to(e,t,a){try{var i=e.stateNode;Qg(i,e.type,a,t),i[$t]=t}catch(r){Ze(e,e.return,r)}}function Sm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gn(e.type)||e.tag===4}function ao(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sm(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&&Gn(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 no(e,t,a){var i=e.tag;if(i===5||i===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=en));else if(i!==4&&(i===27&&Gn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(no(e,t,a),e=e.sibling;e!==null;)no(e,t,a),e=e.sibling}function Sr(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&Gn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Sr(e,t,a),e=e.sibling;e!==null;)Sr(e,t,a),e=e.sibling}function jm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Ot(t,i,a),t[kt]=e,t[$t]=a}catch(o){Ze(e,e.return,o)}}var dn=!1,xt=!1,lo=!1,Nm=typeof WeakSet=="function"?WeakSet:Set,At=null;function _g(e,t){if(e=e.containerInfo,Ao=Vr,e=Uf(e),Fu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var r=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var h=0,v=-1,S=-1,R=0,z=0,V=e,T=null;t:for(;;){for(var M;V!==a||r!==0&&V.nodeType!==3||(v=h+r),V!==o||i!==0&&V.nodeType!==3||(S=h+i),V.nodeType===3&&(h+=V.nodeValue.length),(M=V.firstChild)!==null;)T=V,V=M;for(;;){if(V===e)break t;if(T===a&&++R===r&&(v=h),T===o&&++z===i&&(S=h),(M=V.nextSibling)!==null)break;V=T,T=V.parentNode}V=M}a=v===-1||S===-1?null:{start:v,end:S}}else a=null}a=a||{start:0,end:0}}else a=null;for(Eo={focusedElem:e,selectionRange:a},Vr=!1,At=t;At!==null;)if(t=At,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,At=e;else for(;At!==null;){switch(t=At,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,i=a.stateNode;try{var le=bl(a.type,r);e=i.getSnapshotBeforeUpdate(le,o),i.__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)Co(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Co(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,At=e;break}At=t.return}}function _m(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:hn(e,a),i&4&&ts(5,a);break;case 1:if(hn(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){Ze(a,a.return,h)}else{var r=bl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Ze(a,a.return,h)}}i&64&&gm(a),i&512&&as(a,a.return);break;case 3:if(hn(e,a),i&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{ch(e,t)}catch(h){Ze(a,a.return,h)}}break;case 27:t===null&&i&4&&jm(a);case 26:case 5:hn(e,a),t===null&&i&4&&wm(a),i&512&&as(a,a.return);break;case 12:hn(e,a);break;case 31:hn(e,a),i&4&&km(e,a);break;case 13:hn(e,a),i&4&&Rm(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Dg.bind(null,a),e0(e,a))));break;case 22:if(i=a.memoizedState!==null||dn,!i){t=t!==null&&t.memoizedState!==null||xt,r=dn;var o=xt;dn=i,(xt=t)&&!o?mn(e,a,(a.subtreeFlags&8772)!==0):hn(e,a),dn=r,xt=o}break;case 30:break;default:hn(e,a)}}function Am(e){var t=e.alternate;t!==null&&(e.alternate=null,Am(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Du(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 at=null,Vt=!1;function fn(e,t,a){for(a=a.child;a!==null;)Em(e,t,a),a=a.sibling}function Em(e,t,a){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Ca,a)}catch{}switch(a.tag){case 26:xt||Za(a,t),fn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:xt||Za(a,t);var i=at,r=Vt;Gn(a.type)&&(at=a.stateNode,Vt=!1),fn(e,t,a),ds(a.stateNode),at=i,Vt=r;break;case 5:xt||Za(a,t);case 6:if(i=at,r=Vt,at=null,fn(e,t,a),at=i,Vt=r,at!==null)if(Vt)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(a.stateNode)}catch(o){Ze(a,t,o)}else try{at.removeChild(a.stateNode)}catch(o){Ze(a,t,o)}break;case 18:at!==null&&(Vt?(e=at,gp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),gi(e)):gp(at,a.stateNode));break;case 4:i=at,r=Vt,at=a.stateNode.containerInfo,Vt=!0,fn(e,t,a),at=i,Vt=r;break;case 0:case 11:case 14:case 15:Bn(2,a,t),xt||Bn(4,a,t),fn(e,t,a);break;case 1:xt||(Za(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&bm(a,t,i)),fn(e,t,a);break;case 21:fn(e,t,a);break;case 22:xt=(i=xt)||a.memoizedState!==null,fn(e,t,a),xt=i;break;default:fn(e,t,a)}}function km(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{gi(e)}catch(a){Ze(t,t.return,a)}}}function Rm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{gi(e)}catch(a){Ze(t,t.return,a)}}function Ag(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Nm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Nm),t;default:throw Error(u(435,e.tag))}}function jr(e,t){var a=Ag(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var r=Lg.bind(null,e,i);i.then(r,r)}})}function Zt(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var r=a[i],o=e,h=t,v=h;e:for(;v!==null;){switch(v.tag){case 27:if(Gn(v.type)){at=v.stateNode,Vt=!1;break e}break;case 5:at=v.stateNode,Vt=!1;break e;case 3:case 4:at=v.stateNode.containerInfo,Vt=!0;break e}v=v.return}if(at===null)throw Error(u(160));Em(o,h,r),at=null,Vt=!1,o=r.alternate,o!==null&&(o.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cm(t,e),t=t.sibling}var Ma=null;function Cm(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Zt(t,e),Gt(e),i&4&&(Bn(3,e,e.return),ts(3,e),Bn(5,e,e.return));break;case 1:Zt(t,e),Gt(e),i&512&&(xt||a===null||Za(a,a.return)),i&64&&dn&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var r=Ma;if(Zt(t,e),Gt(e),i&512&&(xt||a===null||Za(a,a.return)),i&4){var o=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(i){case"title":o=r.getElementsByTagName("title")[0],(!o||o[Ri]||o[kt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=r.createElement(i),r.head.insertBefore(o,r.querySelector("head > title"))),Ot(o,i,a),o[kt]=e,_t(o),i=o;break e;case"link":var h=Cp("link","href",r).get(i+(a.href||""));if(h){for(var v=0;v<h.length;v++)if(o=h[v],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(v,1);break t}}o=r.createElement(i),Ot(o,i,a),r.head.appendChild(o);break;case"meta":if(h=Cp("meta","content",r).get(i+(a.content||""))){for(v=0;v<h.length;v++)if(o=h[v],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(v,1);break t}}o=r.createElement(i),Ot(o,i,a),r.head.appendChild(o);break;default:throw Error(u(468,i))}o[kt]=e,_t(o),i=o}e.stateNode=i}else Tp(r,e.type,e.stateNode);else e.stateNode=Rp(r,i,e.memoizedProps);else o!==i?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,i===null?Tp(r,e.type,e.stateNode):Rp(r,i,e.memoizedProps)):i===null&&e.stateNode!==null&&to(e,e.memoizedProps,a.memoizedProps)}break;case 27:Zt(t,e),Gt(e),i&512&&(xt||a===null||Za(a,a.return)),a!==null&&i&4&&to(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Zt(t,e),Gt(e),i&512&&(xt||a===null||Za(a,a.return)),e.flags&32){r=e.stateNode;try{Yl(r,"")}catch(le){Ze(e,e.return,le)}}i&4&&e.stateNode!=null&&(r=e.memoizedProps,to(e,r,a!==null?a.memoizedProps:r)),i&1024&&(lo=!0);break;case 6:if(Zt(t,e),Gt(e),i&4){if(e.stateNode===null)throw Error(u(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(le){Ze(e,e.return,le)}}break;case 3:if(qr=null,r=Ma,Ma=zr(t.containerInfo),Zt(t,e),Ma=r,Gt(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{gi(t.containerInfo)}catch(le){Ze(e,e.return,le)}lo&&(lo=!1,Tm(e));break;case 4:i=Ma,Ma=zr(e.stateNode.containerInfo),Zt(t,e),Gt(e),Ma=i;break;case 12:Zt(t,e),Gt(e);break;case 31:Zt(t,e),Gt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,jr(e,i)));break;case 13:Zt(t,e),Gt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(_r=St()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,jr(e,i)));break;case 22:r=e.memoizedState!==null;var S=a!==null&&a.memoizedState!==null,R=dn,z=xt;if(dn=R||r,xt=z||S,Zt(t,e),xt=z,dn=R,Gt(e),i&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||S||dn||xt||wl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){S=a=t;try{if(o=S.stateNode,r)h=o.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{v=S.stateNode;var V=S.memoizedProps.style,T=V!=null&&V.hasOwnProperty("display")?V.display:null;v.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(le){Ze(S,S.return,le)}}}else if(t.tag===6){if(a===null){S=t;try{S.stateNode.nodeValue=r?"":S.memoizedProps}catch(le){Ze(S,S.return,le)}}}else if(t.tag===18){if(a===null){S=t;try{var M=S.stateNode;r?bp(M,!0):bp(S.stateNode,!1)}catch(le){Ze(S,S.return,le)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,jr(e,a))));break;case 19:Zt(t,e),Gt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,jr(e,i)));break;case 30:break;case 21:break;default:Zt(t,e),Gt(e)}}function Gt(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(Sm(i)){a=i;break}i=i.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var r=a.stateNode,o=ao(e);Sr(e,o,r);break;case 5:var h=a.stateNode;a.flags&32&&(Yl(h,""),a.flags&=-33);var v=ao(e);Sr(e,v,h);break;case 3:case 4:var S=a.stateNode.containerInfo,R=ao(e);no(e,R,S);break;default:throw Error(u(161))}}catch(z){Ze(e,e.return,z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_m(e,t.alternate,t),t=t.sibling}function wl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Bn(4,t,t.return),wl(t);break;case 1:Za(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&bm(t,t.return,a),wl(t);break;case 27:ds(t.stateNode);case 26:case 5:Za(t,t.return),wl(t);break;case 22:t.memoizedState===null&&wl(t);break;case 30:wl(t);break;default:wl(t)}e=e.sibling}}function mn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,r=e,o=t,h=o.flags;switch(o.tag){case 0:case 11:case 15:mn(r,o,a),ts(4,o);break;case 1:if(mn(r,o,a),i=o,r=i.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(R){Ze(i,i.return,R)}if(i=o,r=i.updateQueue,r!==null){var v=i.stateNode;try{var S=r.shared.hiddenCallbacks;if(S!==null)for(r.shared.hiddenCallbacks=null,r=0;r<S.length;r++)uh(S[r],v)}catch(R){Ze(i,i.return,R)}}a&&h&64&&gm(o),as(o,o.return);break;case 27:jm(o);case 26:case 5:mn(r,o,a),a&&i===null&&h&4&&wm(o),as(o,o.return);break;case 12:mn(r,o,a);break;case 31:mn(r,o,a),a&&h&4&&km(r,o);break;case 13:mn(r,o,a),a&&h&4&&Rm(r,o);break;case 22:o.memoizedState===null&&mn(r,o,a),as(o,o.return);break;case 30:break;default:mn(r,o,a)}t=t.sibling}}function io(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&&Yi(a))}function so(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yi(e))}function Da(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Om(e,t,a,i),t=t.sibling}function Om(e,t,a,i){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Da(e,t,a,i),r&2048&&ts(9,t);break;case 1:Da(e,t,a,i);break;case 3:Da(e,t,a,i),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yi(e)));break;case 12:if(r&2048){Da(e,t,a,i),e=t.stateNode;try{var o=t.memoizedProps,h=o.id,v=o.onPostCommit;typeof v=="function"&&v(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(S){Ze(t,t.return,S)}}else Da(e,t,a,i);break;case 31:Da(e,t,a,i);break;case 13:Da(e,t,a,i);break;case 23:break;case 22:o=t.stateNode,h=t.alternate,t.memoizedState!==null?o._visibility&2?Da(e,t,a,i):ns(e,t):o._visibility&2?Da(e,t,a,i):(o._visibility|=2,ui(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),r&2048&&io(h,t);break;case 24:Da(e,t,a,i),r&2048&&so(t.alternate,t);break;default:Da(e,t,a,i)}}function ui(e,t,a,i,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,h=t,v=a,S=i,R=h.flags;switch(h.tag){case 0:case 11:case 15:ui(o,h,v,S,r),ts(8,h);break;case 23:break;case 22:var z=h.stateNode;h.memoizedState!==null?z._visibility&2?ui(o,h,v,S,r):ns(o,h):(z._visibility|=2,ui(o,h,v,S,r)),r&&R&2048&&io(h.alternate,h);break;case 24:ui(o,h,v,S,r),r&&R&2048&&so(h.alternate,h);break;default:ui(o,h,v,S,r)}t=t.sibling}}function ns(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,r=i.flags;switch(i.tag){case 22:ns(a,i),r&2048&&io(i.alternate,i);break;case 24:ns(a,i),r&2048&&so(i.alternate,i);break;default:ns(a,i)}t=t.sibling}}var ls=8192;function ci(e,t,a){if(e.subtreeFlags&ls)for(e=e.child;e!==null;)Mm(e,t,a),e=e.sibling}function Mm(e,t,a){switch(e.tag){case 26:ci(e,t,a),e.flags&ls&&e.memoizedState!==null&&f0(a,Ma,e.memoizedState,e.memoizedProps);break;case 5:ci(e,t,a);break;case 3:case 4:var i=Ma;Ma=zr(e.stateNode.containerInfo),ci(e,t,a),Ma=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=ls,ls=16777216,ci(e,t,a),ls=i):ci(e,t,a));break;default:ci(e,t,a)}}function Dm(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 is(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];At=i,Um(i,e)}Dm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lm(e),e=e.sibling}function Lm(e){switch(e.tag){case 0:case 11:case 15:is(e),e.flags&2048&&Bn(9,e,e.return);break;case 3:is(e);break;case 12:is(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nr(e)):is(e);break;default:is(e)}}function Nr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];At=i,Um(i,e)}Dm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Bn(8,t,t.return),Nr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Nr(t));break;default:Nr(t)}e=e.sibling}}function Um(e,t){for(;At!==null;){var a=At;switch(a.tag){case 0:case 11:case 15:Bn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Yi(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,At=i;else e:for(a=e;At!==null;){i=At;var r=i.sibling,o=i.return;if(Am(i),i===a){At=null;break e}if(r!==null){r.return=o,At=r;break e}At=o}}}var Eg={getCacheForType:function(e){var t=Ct(ht),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Ct(ht).controller.signal}},kg=typeof WeakMap=="function"?WeakMap:Map,qe=0,Je=null,_e=null,ke=0,Ve=0,ta=null,qn=!1,oi=!1,ro=!1,pn=0,ct=0,Hn=0,Sl=0,uo=0,aa=0,di=0,ss=null,Qt=null,co=!1,_r=0,zm=0,Ar=1/0,Er=null,$n=null,bt=0,Yn=null,fi=null,xn=0,oo=0,fo=null,Bm=null,rs=0,ho=null;function na(){return(qe&2)!==0&&ke!==0?ke&-ke:U.T!==null?go():Pd()}function qm(){if(aa===0)if((ke&536870912)===0||Oe){var e=Nt;Nt<<=1,(Nt&3932160)===0&&(Nt=262144),aa=e}else aa=536870912;return e=Pt.current,e!==null&&(e.flags|=32),aa}function Xt(e,t,a){(e===Je&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(hi(e,0),Vn(e,ke,aa,!1)),il(e,a),((qe&2)===0||e!==Je)&&(e===Je&&((qe&2)===0&&(Sl|=a),ct===4&&Vn(e,ke,aa,!1)),Ga(e))}function Hm(e,t,a){if((qe&6)!==0)throw Error(u(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||An(e,t),r=i?Tg(e,t):po(e,t,!0),o=i;do{if(r===0){oi&&!i&&Vn(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!Rg(a)){r=po(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 v=e;r=ss;var S=v.current.memoizedState.isDehydrated;if(S&&(hi(v,h).flags|=256),h=po(v,h,!1),h!==2){if(ro&&!S){v.errorRecoveryDisabledLanes|=o,Sl|=o,r=4;break e}o=Qt,Qt=r,o!==null&&(Qt===null?Qt=o:Qt.push.apply(Qt,o))}r=h}if(o=!1,r!==2)continue}}if(r===1){hi(e,0),Vn(e,t,0,!0);break}e:{switch(i=e,o=r,o){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Vn(i,t,aa,!qn);break e;case 2:Qt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(r=_r+300-St(),10<r)){if(Vn(i,t,aa,!qn),zt(i,0,!0)!==0)break e;xn=t,i.timeoutHandle=yp($m.bind(null,i,a,Qt,Er,co,t,aa,Sl,di,qn,o,"Throttled",-0,0),r);break e}$m(i,a,Qt,Er,co,t,aa,Sl,di,qn,o,null,-0,0)}}break}while(!0);Ga(e)}function $m(e,t,a,i,r,o,h,v,S,R,z,V,T,M){if(e.timeoutHandle=-1,V=t.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:en},Mm(t,o,V);var le=(o&62914560)===o?_r-St():(o&4194048)===o?zm-St():0;if(le=h0(V,le),le!==null){xn=o,e.cancelPendingCommit=le(Jm.bind(null,e,t,o,a,i,r,h,v,S,z,V,null,T,M)),Vn(e,o,h,!R);return}}Jm(e,t,o,a,i,r,h,v,S)}function Rg(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 i=0;i<a.length;i++){var r=a[i],o=r.getSnapshot;r=r.value;try{if(!Ft(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 Vn(e,t,a,i){t&=~uo,t&=~Sl,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var r=t;0<r;){var o=31-Et(r),h=1<<o;i[o]=-1,r&=~h}a!==0&&zs(e,a,t)}function kr(){return(qe&6)===0?(us(0),!1):!0}function mo(){if(_e!==null){if(Ve===0)var e=_e.return;else e=_e,ln=hl=null,Rc(e),ni=null,Zi=0,e=_e;for(;e!==null;)vm(e.alternate,e),e=e.return;_e=null}}function hi(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Jg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),xn=0,mo(),Je=e,_e=a=an(e.current,null),ke=t,Ve=0,ta=null,qn=!1,oi=An(e,t),ro=!1,di=aa=uo=Sl=Hn=ct=0,Qt=ss=null,co=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var r=31-Et(i),o=1<<r;t|=e[r],i&=~o}return pn=t,Js(),a}function Ym(e,t){ge=null,U.H=Wi,t===ai||t===nr?(t=lh(),Ve=3):t===yc?(t=lh(),Ve=4):Ve=t===Gc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ta=t,_e===null&&(ct=1,yr(e,fa(t,e.current)))}function Vm(){var e=Pt.current;return e===null?!0:(ke&4194048)===ke?xa===null:(ke&62914560)===ke||(ke&536870912)!==0?e===xa:!1}function Zm(){var e=U.H;return U.H=Wi,e===null?Wi:e}function Gm(){var e=U.A;return U.A=Eg,e}function Rr(){ct=4,qn||(ke&4194048)!==ke&&Pt.current!==null||(oi=!0),(Hn&134217727)===0&&(Sl&134217727)===0||Je===null||Vn(Je,ke,aa,!1)}function po(e,t,a){var i=qe;qe|=2;var r=Zm(),o=Gm();(Je!==e||ke!==t)&&(Er=null,hi(e,t)),t=!1;var h=ct;e:do try{if(Ve!==0&&_e!==null){var v=_e,S=ta;switch(Ve){case 8:mo(),h=6;break e;case 3:case 2:case 9:case 6:Pt.current===null&&(t=!0);var R=Ve;if(Ve=0,ta=null,mi(e,v,S,R),a&&oi){h=0;break e}break;default:R=Ve,Ve=0,ta=null,mi(e,v,S,R)}}Cg(),h=ct;break}catch(z){Ym(e,z)}while(!0);return t&&e.shellSuspendCounter++,ln=hl=null,qe=i,U.H=r,U.A=o,_e===null&&(Je=null,ke=0,Js()),h}function Cg(){for(;_e!==null;)Qm(_e)}function Tg(e,t){var a=qe;qe|=2;var i=Zm(),r=Gm();Je!==e||ke!==t?(Er=null,Ar=St()+500,hi(e,t)):oi=An(e,t);e:do try{if(Ve!==0&&_e!==null){t=_e;var o=ta;t:switch(Ve){case 1:Ve=0,ta=null,mi(e,t,o,1);break;case 2:case 9:if(ah(o)){Ve=0,ta=null,Xm(t);break}t=function(){Ve!==2&&Ve!==9||Je!==e||(Ve=7),Ga(e)},o.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:ah(o)?(Ve=0,ta=null,Xm(t)):(Ve=0,ta=null,mi(e,t,o,7));break;case 5:var h=null;switch(_e.tag){case 26:h=_e.memoizedState;case 5:case 27:var v=_e;if(h?Op(h):v.stateNode.complete){Ve=0,ta=null;var S=v.sibling;if(S!==null)_e=S;else{var R=v.return;R!==null?(_e=R,Cr(R)):_e=null}break t}}Ve=0,ta=null,mi(e,t,o,5);break;case 6:Ve=0,ta=null,mi(e,t,o,6);break;case 8:mo(),ct=6;break e;default:throw Error(u(462))}}Og();break}catch(z){Ym(e,z)}while(!0);return ln=hl=null,U.H=i,U.A=r,qe=a,_e!==null?0:(Je=null,ke=0,Js(),ct)}function Og(){for(;_e!==null&&!_n();)Qm(_e)}function Qm(e){var t=xm(e.alternate,e,pn);e.memoizedProps=e.pendingProps,t===null?Cr(e):_e=t}function Xm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=om(a,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=om(a,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:Rc(t);default:vm(a,t),t=_e=Gf(t,pn),t=xm(a,t,pn)}e.memoizedProps=e.pendingProps,t===null?Cr(e):_e=t}function mi(e,t,a,i){ln=hl=null,Rc(t),ni=null,Zi=0;var r=t.return;try{if(bg(e,r,t,a,ke)){ct=1,yr(e,fa(a,e.current)),_e=null;return}}catch(o){if(r!==null)throw _e=r,o;ct=1,yr(e,fa(a,e.current)),_e=null;return}t.flags&32768?(Oe||i===1?e=!0:oi||(ke&536870912)!==0?e=!1:(qn=e=!0,(i===2||i===9||i===3||i===6)&&(i=Pt.current,i!==null&&i.tag===13&&(i.flags|=16384))),Km(t,e)):Cr(t)}function Cr(e){var t=e;do{if((t.flags&32768)!==0){Km(t,qn);return}e=t.return;var a=jg(t.alternate,t,pn);if(a!==null){_e=a;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);ct===0&&(ct=5)}function Km(e,t){do{var a=Ng(e.alternate,e);if(a!==null){a.flags&=32767,_e=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=a}while(e!==null);ct=6,_e=null}function Jm(e,t,a,i,r,o,h,v,S){e.cancelPendingCommit=null;do Tr();while(bt!==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|=ac,Us(e,a,o,h,v,S),e===Je&&(_e=Je=null,ke=0),fi=t,Yn=e,xn=a,oo=o,fo=r,Bm=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ug(Ut,function(){return ep(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=U.T,U.T=null,r=F.p,F.p=2,h=qe,qe|=4;try{_g(e,t,a)}finally{qe=h,F.p=r,U.T=i}}bt=1,Im(),Fm(),Wm()}}function Im(){if(bt===1){bt=0;var e=Yn,t=fi,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var i=F.p;F.p=2;var r=qe;qe|=4;try{Cm(t,e);var o=Eo,h=Uf(e.containerInfo),v=o.focusedElem,S=o.selectionRange;if(h!==v&&v&&v.ownerDocument&&Lf(v.ownerDocument.documentElement,v)){if(S!==null&&Fu(v)){var R=S.start,z=S.end;if(z===void 0&&(z=R),"selectionStart"in v)v.selectionStart=R,v.selectionEnd=Math.min(z,v.value.length);else{var V=v.ownerDocument||document,T=V&&V.defaultView||window;if(T.getSelection){var M=T.getSelection(),le=v.textContent.length,he=Math.min(S.start,le),Ke=S.end===void 0?he:Math.min(S.end,le);!M.extend&&he>Ke&&(h=Ke,Ke=he,he=h);var A=Df(v,he),j=Df(v,Ke);if(A&&j&&(M.rangeCount!==1||M.anchorNode!==A.node||M.anchorOffset!==A.offset||M.focusNode!==j.node||M.focusOffset!==j.offset)){var k=V.createRange();k.setStart(A.node,A.offset),M.removeAllRanges(),he>Ke?(M.addRange(k),M.extend(j.node,j.offset)):(k.setEnd(j.node,j.offset),M.addRange(k))}}}}for(V=[],M=v;M=M.parentNode;)M.nodeType===1&&V.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<V.length;v++){var q=V[v];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}Vr=!!Ao,Eo=Ao=null}finally{qe=r,F.p=i,U.T=a}}e.current=t,bt=2}}function Fm(){if(bt===2){bt=0;var e=Yn,t=fi,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var i=F.p;F.p=2;var r=qe;qe|=4;try{_m(e,t.alternate,t)}finally{qe=r,F.p=i,U.T=a}}bt=3}}function Wm(){if(bt===4||bt===3){bt=0,Tl();var e=Yn,t=fi,a=xn,i=Bm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?bt=5:(bt=0,fi=Yn=null,Pm(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&($n=null),It(a),t=t.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Ca,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=U.T,r=F.p,F.p=2,U.T=null;try{for(var o=e.onRecoverableError,h=0;h<i.length;h++){var v=i[h];o(v.value,{componentStack:v.stack})}}finally{U.T=t,F.p=r}}(xn&3)!==0&&Tr(),Ga(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===ho?rs++:(rs=0,ho=e):rs=0,us(0)}}function Pm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Yi(t)))}function Tr(){return Im(),Fm(),Wm(),ep()}function ep(){if(bt!==5)return!1;var e=Yn,t=oo;oo=0;var a=It(xn),i=U.T,r=F.p;try{F.p=32>a?32:a,U.T=null,a=fo,fo=null;var o=Yn,h=xn;if(bt=0,fi=Yn=null,xn=0,(qe&6)!==0)throw Error(u(331));var v=qe;if(qe|=4,Lm(o.current),Om(o,o.current,h,a),qe=v,us(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Ca,o)}catch{}return!0}finally{F.p=r,U.T=i,Pm(e,t)}}function tp(e,t,a){t=fa(a,t),t=Zc(e.stateNode,t,2),e=Ln(e,t,2),e!==null&&(il(e,2),Ga(e))}function Ze(e,t,a){if(e.tag===3)tp(e,e,a);else for(;t!==null;){if(t.tag===3){tp(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&($n===null||!$n.has(i))){e=fa(a,e),a=am(2),i=Ln(t,a,2),i!==null&&(nm(a,i,t,e),il(i,2),Ga(i));break}}t=t.return}}function xo(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new kg;var r=new Set;i.set(t,r)}else r=i.get(t),r===void 0&&(r=new Set,i.set(t,r));r.has(a)||(ro=!0,r.add(a),e=Mg.bind(null,e,t,a),t.then(e,e))}function Mg(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Je===e&&(ke&a)===a&&(ct===4||ct===3&&(ke&62914560)===ke&&300>St()-_r?(qe&2)===0&&hi(e,0):uo|=a,di===ke&&(di=0)),Ga(e)}function ap(e,t){t===0&&(t=Ls()),e=ol(e,t),e!==null&&(il(e,t),Ga(e))}function Dg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),ap(e,a)}function Lg(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(u(314))}i!==null&&i.delete(t),ap(e,a)}function Ug(e,t){return jn(e,t)}var Or=null,pi=null,yo=!1,Mr=!1,vo=!1,Zn=0;function Ga(e){e!==pi&&e.next===null&&(pi===null?Or=pi=e:pi=pi.next=e),Mr=!0,yo||(yo=!0,Bg())}function us(e,t){if(!vo&&Mr){vo=!0;do for(var a=!1,i=Or;i!==null;){if(e!==0){var r=i.pendingLanes;if(r===0)var o=0;else{var h=i.suspendedLanes,v=i.pingedLanes;o=(1<<31-Et(42|e)+1)-1,o&=r&~(h&~v),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,sp(i,o))}else o=ke,o=zt(i,i===Je?o:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(o&3)===0||An(i,o)||(a=!0,sp(i,o));i=i.next}while(a);vo=!1}}function zg(){np()}function np(){Mr=yo=!1;var e=0;Zn!==0&&Kg()&&(e=Zn);for(var t=St(),a=null,i=Or;i!==null;){var r=i.next,o=lp(i,t);o===0?(i.next=null,a===null?Or=r:a.next=r,r===null&&(pi=a)):(a=i,(e!==0||(o&3)!==0)&&(Mr=!0)),i=r}bt!==0&&bt!==5||us(e),Zn!==0&&(Zn=0)}function lp(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var h=31-Et(o),v=1<<h,S=r[h];S===-1?((v&a)===0||(v&i)!==0)&&(r[h]=Dl(v,t)):S<=t&&(e.expiredLanes|=v),o&=~v}if(t=Je,a=ke,a=zt(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&Nn(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||An(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&Nn(i),It(a)){case 2:case 8:a=Wa;break;case 32:a=Ut;break;case 268435456:a=ll;break;default:a=Ut}return i=ip.bind(null,e),a=jn(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&Nn(i),e.callbackPriority=2,e.callbackNode=null,2}function ip(e,t){if(bt!==0&&bt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Tr()&&e.callbackNode!==a)return null;var i=ke;return i=zt(e,e===Je?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Hm(e,i,t),lp(e,St()),e.callbackNode!=null&&e.callbackNode===a?ip.bind(null,e):null)}function sp(e,t){if(Tr())return null;Hm(e,t,!0)}function Bg(){Ig(function(){(qe&6)!==0?jn(Fa,zg):np()})}function go(){if(Zn===0){var e=ei;e===0&&(e=Ie,Ie<<=1,(Ie&261888)===0&&(Ie=256)),Zn=e}return Zn}function rp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:$s(""+e)}function up(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 qg(e,t,a,i,r){if(t==="submit"&&a&&a.stateNode===r){var o=rp((r[$t]||null).action),h=i.submitter;h&&(t=(t=h[$t]||null)?rp(t.formAction):h.getAttribute("formAction"),t!==null&&(o=t,h=null));var v=new Gs("action","action",null,i,r);e.push({event:v,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Zn!==0){var S=h?up(r,h):new FormData(r);Bc(a,{pending:!0,data:S,method:r.method,action:o},null,S)}}else typeof o=="function"&&(v.preventDefault(),S=h?up(r,h):new FormData(r),Bc(a,{pending:!0,data:S,method:r.method,action:o},o,S))},currentTarget:r}]})}}for(var bo=0;bo<tc.length;bo++){var wo=tc[bo],Hg=wo.toLowerCase(),$g=wo[0].toUpperCase()+wo.slice(1);Oa(Hg,"on"+$g)}Oa(qf,"onAnimationEnd"),Oa(Hf,"onAnimationIteration"),Oa($f,"onAnimationStart"),Oa("dblclick","onDoubleClick"),Oa("focusin","onFocus"),Oa("focusout","onBlur"),Oa(ng,"onTransitionRun"),Oa(lg,"onTransitionStart"),Oa(ig,"onTransitionCancel"),Oa(Yf,"onTransitionEnd"),Hl("onMouseEnter",["mouseout","mouseover"]),Hl("onMouseLeave",["mouseout","mouseover"]),Hl("onPointerEnter",["pointerout","pointerover"]),Hl("onPointerLeave",["pointerout","pointerover"]),sl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),sl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),sl("onBeforeInput",["compositionend","keypress","textInput","paste"]),sl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),sl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),sl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cs="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(" "),Yg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cs));function cp(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],r=i.event;i=i.listeners;e:{var o=void 0;if(t)for(var h=i.length-1;0<=h;h--){var v=i[h],S=v.instance,R=v.currentTarget;if(v=v.listener,S!==o&&r.isPropagationStopped())break e;o=v,r.currentTarget=R;try{o(r)}catch(z){Ks(z)}r.currentTarget=null,o=S}else for(h=0;h<i.length;h++){if(v=i[h],S=v.instance,R=v.currentTarget,v=v.listener,S!==o&&r.isPropagationStopped())break e;o=v,r.currentTarget=R;try{o(r)}catch(z){Ks(z)}r.currentTarget=null,o=S}}}}function Ae(e,t){var a=t[Mu];a===void 0&&(a=t[Mu]=new Set);var i=e+"__bubble";a.has(i)||(op(t,e,2,!1),a.add(i))}function So(e,t,a){var i=0;t&&(i|=4),op(a,e,i,t)}var Dr="_reactListening"+Math.random().toString(36).slice(2);function jo(e){if(!e[Dr]){e[Dr]=!0,af.forEach(function(a){a!=="selectionchange"&&(Yg.has(a)||So(a,!1,e),So(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Dr]||(t[Dr]=!0,So("selectionchange",!1,t))}}function op(e,t,a,i){switch(qp(t)){case 2:var r=x0;break;case 8:r=y0;break;default:r=Bo}a=r.bind(null,t,a,e),r=void 0,!Yu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),i?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 No(e,t,a,i,r){var o=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var h=i.tag;if(h===3||h===4){var v=i.stateNode.containerInfo;if(v===r)break;if(h===4)for(h=i.return;h!==null;){var S=h.tag;if((S===3||S===4)&&h.stateNode.containerInfo===r)return;h=h.return}for(;v!==null;){if(h=zl(v),h===null)return;if(S=h.tag,S===5||S===6||S===26||S===27){i=o=h;continue e}v=v.parentNode}}i=i.return}pf(function(){var R=o,z=Hu(a),V=[];e:{var T=Vf.get(e);if(T!==void 0){var M=Gs,le=e;switch(e){case"keypress":if(Vs(a)===0)break e;case"keydown":case"keyup":M=Lv;break;case"focusin":le="focus",M=Qu;break;case"focusout":le="blur",M=Qu;break;case"beforeblur":case"afterblur":M=Qu;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=vf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=jv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Bv;break;case qf:case Hf:case $f:M=Av;break;case Yf:M=Hv;break;case"scroll":case"scrollend":M=wv;break;case"wheel":M=Yv;break;case"copy":case"cut":case"paste":M=kv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=bf;break;case"toggle":case"beforetoggle":M=Zv}var he=(t&4)!==0,Ke=!he&&(e==="scroll"||e==="scrollend"),A=he?T!==null?T+"Capture":null:T;he=[];for(var j=R,k;j!==null;){var q=j;if(k=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||k===null||A===null||(q=Ti(j,A),q!=null&&he.push(os(j,q,k))),Ke)break;j=j.return}0<he.length&&(T=new M(T,le,null,a,z),V.push({event:T,listeners:he}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",T&&a!==qu&&(le=a.relatedTarget||a.fromElement)&&(zl(le)||le[Ul]))break e;if((M||T)&&(T=z.window===z?z:(T=z.ownerDocument)?T.defaultView||T.parentWindow:window,M?(le=a.relatedTarget||a.toElement,M=R,le=le?zl(le):null,le!==null&&(Ke=f(le),he=le.tag,le!==Ke||he!==5&&he!==27&&he!==6)&&(le=null)):(M=null,le=R),M!==le)){if(he=vf,q="onMouseLeave",A="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(he=bf,q="onPointerLeave",A="onPointerEnter",j="pointer"),Ke=M==null?T:Ci(M),k=le==null?T:Ci(le),T=new he(q,j+"leave",M,a,z),T.target=Ke,T.relatedTarget=k,q=null,zl(z)===R&&(he=new he(A,j+"enter",le,a,z),he.target=k,he.relatedTarget=Ke,q=he),Ke=q,M&&le)t:{for(he=Vg,A=M,j=le,k=0,q=A;q;q=he(q))k++;q=0;for(var oe=j;oe;oe=he(oe))q++;for(;0<k-q;)A=he(A),k--;for(;0<q-k;)j=he(j),q--;for(;k--;){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&&dp(V,T,M,he,!1),le!==null&&Ke!==null&&dp(V,Ke,le,he,!0)}}e:{if(T=R?Ci(R):window,M=T.nodeName&&T.nodeName.toLowerCase(),M==="select"||M==="input"&&T.type==="file")var ze=kf;else if(Af(T))if(Rf)ze=eg;else{ze=Wv;var se=Fv}else M=T.nodeName,!M||M.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?R&&Bu(R.elementType)&&(ze=kf):ze=Pv;if(ze&&(ze=ze(e,R))){Ef(V,ze,a,z);break e}se&&se(e,T,R),e==="focusout"&&R&&T.type==="number"&&R.memoizedProps.value!=null&&zu(T,"number",T.value)}switch(se=R?Ci(R):window,e){case"focusin":(Af(se)||se.contentEditable==="true")&&(Ql=se,Wu=R,qi=null);break;case"focusout":qi=Wu=Ql=null;break;case"mousedown":Pu=!0;break;case"contextmenu":case"mouseup":case"dragend":Pu=!1,zf(V,a,z);break;case"selectionchange":if(ag)break;case"keydown":case"keyup":zf(V,a,z)}var Se;if(Ku)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 Gl?Nf(e,a)&&(Re="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Re="onCompositionStart");Re&&(wf&&a.locale!=="ko"&&(Gl||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&Gl&&(Se=xf()):(kn=z,Vu="value"in kn?kn.value:kn.textContent,Gl=!0)),se=Lr(R,Re),0<se.length&&(Re=new gf(Re,e,null,a,z),V.push({event:Re,listeners:se}),Se?Re.data=Se:(Se=_f(a),Se!==null&&(Re.data=Se)))),(Se=Qv?Xv(e,a):Kv(e,a))&&(Re=Lr(R,"onBeforeInput"),0<Re.length&&(se=new gf("onBeforeInput","beforeinput",null,a,z),V.push({event:se,listeners:Re}),se.data=Se)),qg(V,e,R,a,z)}cp(V,t)})}function os(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Lr(e,t){for(var a=t+"Capture",i=[];e!==null;){var r=e,o=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||o===null||(r=Ti(e,a),r!=null&&i.unshift(os(e,r,o)),r=Ti(e,t),r!=null&&i.push(os(e,r,o))),e.tag===3)return i;e=e.return}return[]}function Vg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function dp(e,t,a,i,r){for(var o=t._reactName,h=[];a!==null&&a!==i;){var v=a,S=v.alternate,R=v.stateNode;if(v=v.tag,S!==null&&S===i)break;v!==5&&v!==26&&v!==27||R===null||(S=R,r?(R=Ti(a,o),R!=null&&h.unshift(os(a,R,S))):r||(R=Ti(a,o),R!=null&&h.push(os(a,R,S)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var Zg=/\r\n?/g,Gg=/\u0000|\uFFFD/g;function fp(e){return(typeof e=="string"?e:""+e).replace(Zg,`
|
|
49
|
+
`).replace(Gg,"")}function hp(e,t){return t=fp(t),fp(e)===t}function Xe(e,t,a,i,r,o){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Yl(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Yl(e,""+i);break;case"className":qs(e,"class",i);break;case"tabIndex":qs(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":qs(e,a,i);break;case"style":hf(e,i,o);break;case"data":if(t!=="object"){qs(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=$s(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="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"&&Xe(e,t,"name",r.name,r,null),Xe(e,t,"formEncType",r.formEncType,r,null),Xe(e,t,"formMethod",r.formMethod,r,null),Xe(e,t,"formTarget",r.formTarget,r,null)):(Xe(e,t,"encType",r.encType,r,null),Xe(e,t,"method",r.method,r,null),Xe(e,t,"target",r.target,r,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=$s(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=en);break;case"onScroll":i!=null&&Ae("scroll",e);break;case"onScrollEnd":i!=null&&Ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(u(61));if(a=i.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=$s(""+i),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":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):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":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),Bs(e,"popover",i);break;case"xlinkActuate":Pa(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Pa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Pa(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Pa(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Pa(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Pa(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Pa(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Pa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Pa(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":Bs(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=gv.get(a)||a,Bs(e,a,i))}}function _o(e,t,a,i,r,o){switch(a){case"style":hf(e,i,o);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(u(61));if(a=i.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof i=="string"?Yl(e,i):(typeof i=="number"||typeof i=="bigint")&&Yl(e,""+i);break;case"onScroll":i!=null&&Ae("scroll",e);break;case"onScrollEnd":i!=null&&Ae("scrollend",e);break;case"onClick":i!=null&&(e.onclick=en);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!nf.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[$t]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,r),typeof i=="function")){typeof o!="function"&&o!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,r);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):Bs(e,a,i)}}}function Ot(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 i=!1,r=!1,o;for(o in a)if(a.hasOwnProperty(o)){var h=a[o];if(h!=null)switch(o){case"src":i=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Xe(e,t,o,h,a,null)}}r&&Xe(e,t,"srcSet",a.srcSet,a,null),i&&Xe(e,t,"src",a.src,a,null);return;case"input":Ae("invalid",e);var v=o=h=r=null,S=null,R=null;for(i in a)if(a.hasOwnProperty(i)){var z=a[i];if(z!=null)switch(i){case"name":r=z;break;case"type":h=z;break;case"checked":S=z;break;case"defaultChecked":R=z;break;case"value":o=z;break;case"defaultValue":v=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(u(137,t));break;default:Xe(e,t,i,z,a,null)}}cf(e,o,v,S,R,h,r,!1);return;case"select":Ae("invalid",e),i=h=o=null;for(r in a)if(a.hasOwnProperty(r)&&(v=a[r],v!=null))switch(r){case"value":o=v;break;case"defaultValue":h=v;break;case"multiple":i=v;default:Xe(e,t,r,v,a,null)}t=o,a=h,e.multiple=!!i,t!=null?$l(e,!!i,t,!1):a!=null&&$l(e,!!i,a,!0);return;case"textarea":Ae("invalid",e),o=r=i=null;for(h in a)if(a.hasOwnProperty(h)&&(v=a[h],v!=null))switch(h){case"value":i=v;break;case"defaultValue":r=v;break;case"children":o=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(u(91));break;default:Xe(e,t,h,v,a,null)}df(e,i,r,o);return;case"option":for(S in a)if(a.hasOwnProperty(S)&&(i=a[S],i!=null))switch(S){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:Xe(e,t,S,i,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(i=0;i<cs.length;i++)Ae(cs[i],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(R in a)if(a.hasOwnProperty(R)&&(i=a[R],i!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Xe(e,t,R,i,a,null)}return;default:if(Bu(t)){for(z in a)a.hasOwnProperty(z)&&(i=a[z],i!==void 0&&_o(e,t,z,i,a,void 0));return}}for(v in a)a.hasOwnProperty(v)&&(i=a[v],i!=null&&Xe(e,t,v,i,a,null))}function Qg(e,t,a,i){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,v=null,S=null,R=null,z=null;for(M in a){var V=a[M];if(a.hasOwnProperty(M)&&V!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":S=V;default:i.hasOwnProperty(M)||Xe(e,t,M,null,i,V)}}for(var T in i){var M=i[T];if(V=a[T],i.hasOwnProperty(T)&&(M!=null||V!=null))switch(T){case"type":o=M;break;case"name":r=M;break;case"checked":R=M;break;case"defaultChecked":z=M;break;case"value":h=M;break;case"defaultValue":v=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(u(137,t));break;default:M!==V&&Xe(e,t,T,M,i,V)}}Uu(e,h,v,S,R,z,o,r);return;case"select":M=h=v=T=null;for(o in a)if(S=a[o],a.hasOwnProperty(o)&&S!=null)switch(o){case"value":break;case"multiple":M=S;default:i.hasOwnProperty(o)||Xe(e,t,o,null,i,S)}for(r in i)if(o=i[r],S=a[r],i.hasOwnProperty(r)&&(o!=null||S!=null))switch(r){case"value":T=o;break;case"defaultValue":v=o;break;case"multiple":h=o;default:o!==S&&Xe(e,t,r,o,i,S)}t=v,a=h,i=M,T!=null?$l(e,!!a,T,!1):!!i!=!!a&&(t!=null?$l(e,!!a,t,!0):$l(e,!!a,a?[]:"",!1));return;case"textarea":M=T=null;for(v in a)if(r=a[v],a.hasOwnProperty(v)&&r!=null&&!i.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Xe(e,t,v,null,i,r)}for(h in i)if(r=i[h],o=a[h],i.hasOwnProperty(h)&&(r!=null||o!=null))switch(h){case"value":T=r;break;case"defaultValue":M=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(u(91));break;default:r!==o&&Xe(e,t,h,r,i,o)}of(e,T,M);return;case"option":for(var le in a)if(T=a[le],a.hasOwnProperty(le)&&T!=null&&!i.hasOwnProperty(le))switch(le){case"selected":e.selected=!1;break;default:Xe(e,t,le,null,i,T)}for(S in i)if(T=i[S],M=a[S],i.hasOwnProperty(S)&&T!==M&&(T!=null||M!=null))switch(S){case"selected":e.selected=T&&typeof T!="function"&&typeof T!="symbol";break;default:Xe(e,t,S,T,i,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)T=a[he],a.hasOwnProperty(he)&&T!=null&&!i.hasOwnProperty(he)&&Xe(e,t,he,null,i,T);for(R in i)if(T=i[R],M=a[R],i.hasOwnProperty(R)&&T!==M&&(T!=null||M!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(u(137,t));break;default:Xe(e,t,R,T,i,M)}return;default:if(Bu(t)){for(var Ke in a)T=a[Ke],a.hasOwnProperty(Ke)&&T!==void 0&&!i.hasOwnProperty(Ke)&&_o(e,t,Ke,void 0,i,T);for(z in i)T=i[z],M=a[z],!i.hasOwnProperty(z)||T===M||T===void 0&&M===void 0||_o(e,t,z,T,i,M);return}}for(var A in a)T=a[A],a.hasOwnProperty(A)&&T!=null&&!i.hasOwnProperty(A)&&Xe(e,t,A,null,i,T);for(V in i)T=i[V],M=a[V],!i.hasOwnProperty(V)||T===M||T==null&&M==null||Xe(e,t,V,T,i,M)}function mp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Xg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var r=a[i],o=r.transferSize,h=r.initiatorType,v=r.duration;if(o&&v&&mp(h)){for(h=0,v=r.responseEnd,i+=1;i<a.length;i++){var S=a[i],R=S.startTime;if(R>v)break;var z=S.transferSize,V=S.initiatorType;z&&mp(V)&&(S=S.responseEnd,h+=z*(S<v?1:(v-R)/(S-R)))}if(--i,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 Ao=null,Eo=null;function Ur(e){return e.nodeType===9?e:e.ownerDocument}function pp(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 xp(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 ko(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 Ro=null;function Kg(){var e=window.event;return e&&e.type==="popstate"?e===Ro?!1:(Ro=e,!0):(Ro=null,!1)}var yp=typeof setTimeout=="function"?setTimeout:void 0,Jg=typeof clearTimeout=="function"?clearTimeout:void 0,vp=typeof Promise=="function"?Promise:void 0,Ig=typeof queueMicrotask=="function"?queueMicrotask:typeof vp<"u"?function(e){return vp.resolve(null).then(e).catch(Fg)}:yp;function Fg(e){setTimeout(function(){throw e})}function Gn(e){return e==="head"}function gp(e,t){var a=t,i=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(r),gi(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")ds(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ds(a);for(var o=a.firstChild;o;){var h=o.nextSibling,v=o.nodeName;o[Ri]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=h}}else a==="body"&&ds(e.ownerDocument.body);a=r}while(a);gi(t)}function bp(e,t){var a=e;e=0;do{var i=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||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function Co(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":Co(a),Du(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Wg(e,t,a,i){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Ri])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=ya(e.nextSibling),e===null)break}return null}function Pg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ya(e.nextSibling),e===null))return null;return e}function wp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ya(e.nextSibling),e===null))return null;return e}function To(e){return e.data==="$?"||e.data==="$~"}function Oo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function e0(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function ya(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 Mo=null;function Sp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ya(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function jp(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 Np(e,t,a){switch(t=Ur(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 ds(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Du(e)}var va=new Map,_p=new Set;function zr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yn=F.d;F.d={f:t0,r:a0,D:n0,C:l0,L:i0,m:s0,X:u0,S:r0,M:c0};function t0(){var e=yn.f(),t=kr();return e||t}function a0(e){var t=Bl(e);t!==null&&t.tag===5&&t.type==="form"?Yh(t):yn.r(e)}var xi=typeof document>"u"?null:document;function Ap(e,t,a){var i=xi;if(i&&typeof t=="string"&&t){var r=oa(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),_p.has(r)||(_p.add(r),e={rel:e,crossOrigin:a,href:t},i.querySelector(r)===null&&(t=i.createElement("link"),Ot(t,"link",e),_t(t),i.head.appendChild(t)))}}function n0(e){yn.D(e),Ap("dns-prefetch",e,null)}function l0(e,t){yn.C(e,t),Ap("preconnect",e,t)}function i0(e,t,a){yn.L(e,t,a);var i=xi;if(i&&e&&t){var r='link[rel="preload"][as="'+oa(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+oa(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+oa(a.imageSizes)+'"]')):r+='[href="'+oa(e)+'"]';var o=r;switch(t){case"style":o=yi(e);break;case"script":o=vi(e)}va.has(o)||(e=N({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),va.set(o,e),i.querySelector(r)!==null||t==="style"&&i.querySelector(fs(o))||t==="script"&&i.querySelector(hs(o))||(t=i.createElement("link"),Ot(t,"link",e),_t(t),i.head.appendChild(t)))}}function s0(e,t){yn.m(e,t);var a=xi;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+oa(i)+'"][href="'+oa(e)+'"]',o=r;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=vi(e)}if(!va.has(o)&&(e=N({rel:"modulepreload",href:e},t),va.set(o,e),a.querySelector(r)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(hs(o)))return}i=a.createElement("link"),Ot(i,"link",e),_t(i),a.head.appendChild(i)}}}function r0(e,t,a){yn.S(e,t,a);var i=xi;if(i&&e){var r=ql(i).hoistableStyles,o=yi(e);t=t||"default";var h=r.get(o);if(!h){var v={loading:0,preload:null};if(h=i.querySelector(fs(o)))v.loading=5;else{e=N({rel:"stylesheet",href:e,"data-precedence":t},a),(a=va.get(o))&&Do(e,a);var S=h=i.createElement("link");_t(S),Ot(S,"link",e),S._p=new Promise(function(R,z){S.onload=R,S.onerror=z}),S.addEventListener("load",function(){v.loading|=1}),S.addEventListener("error",function(){v.loading|=2}),v.loading|=4,Br(h,t,i)}h={type:"stylesheet",instance:h,count:1,state:v},r.set(o,h)}}}function u0(e,t){yn.X(e,t);var a=xi;if(a&&e){var i=ql(a).hoistableScripts,r=vi(e),o=i.get(r);o||(o=a.querySelector(hs(r)),o||(e=N({src:e,async:!0},t),(t=va.get(r))&&Lo(e,t),o=a.createElement("script"),_t(o),Ot(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(r,o))}}function c0(e,t){yn.M(e,t);var a=xi;if(a&&e){var i=ql(a).hoistableScripts,r=vi(e),o=i.get(r);o||(o=a.querySelector(hs(r)),o||(e=N({src:e,async:!0,type:"module"},t),(t=va.get(r))&&Lo(e,t),o=a.createElement("script"),_t(o),Ot(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(r,o))}}function Ep(e,t,a,i){var r=(r=xe.current)?zr(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=yi(a.href),a=ql(r).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=yi(a.href);var o=ql(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(fs(e)))&&!o._p&&(h.instance=o,h.state.loading=5),va.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},va.set(e,a),o||o0(r,e,a,h.state))),t&&i===null)throw Error(u(528,""));return h}if(t&&i!==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=vi(a),a=ql(r).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function yi(e){return'href="'+oa(e)+'"'}function fs(e){return'link[rel="stylesheet"]['+e+"]"}function kp(e){return N({},e,{"data-precedence":e.precedence,precedence:null})}function o0(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Ot(t,"link",a),_t(t),e.head.appendChild(t))}function vi(e){return'[src="'+oa(e)+'"]'}function hs(e){return"script[async]"+e}function Rp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+oa(a.href)+'"]');if(i)return t.instance=i,_t(i),i;var r=N({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),_t(i),Ot(i,"style",r),Br(i,a.precedence,e),t.instance=i;case"stylesheet":r=yi(a.href);var o=e.querySelector(fs(r));if(o)return t.state.loading|=4,t.instance=o,_t(o),o;i=kp(a),(r=va.get(r))&&Do(i,r),o=(e.ownerDocument||e).createElement("link"),_t(o);var h=o;return h._p=new Promise(function(v,S){h.onload=v,h.onerror=S}),Ot(o,"link",i),t.state.loading|=4,Br(o,a.precedence,e),t.instance=o;case"script":return o=vi(a.src),(r=e.querySelector(hs(o)))?(t.instance=r,_t(r),r):(i=a,(r=va.get(o))&&(i=N({},a),Lo(i,r)),e=e.ownerDocument||e,r=e.createElement("script"),_t(r),Ot(r,"link",i),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&&(i=t.instance,t.state.loading|=4,Br(i,a.precedence,e));return t.instance}function Br(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=i.length?i[i.length-1]:null,o=r,h=0;h<i.length;h++){var v=i[h];if(v.dataset.precedence===t)o=v;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 Do(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Lo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var qr=null;function Cp(e,t,a){if(qr===null){var i=new Map,r=qr=new Map;r.set(a,i)}else r=qr,i=r.get(a),i||(i=new Map,r.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var o=a[r];if(!(o[Ri]||o[kt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var h=o.getAttribute(t)||"";h=e+h;var v=i.get(h);v?v.push(o):i.set(h,[o])}}return i}function Tp(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function d0(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 Op(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function f0(e,t,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=yi(i.href),o=t.querySelector(fs(r));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Hr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,_t(o);return}o=t.ownerDocument||t,i=kp(i),(r=va.get(r))&&Do(i,r),o=o.createElement("link"),_t(o);var h=o;h._p=new Promise(function(v,S){h.onload=v,h.onerror=S}),Ot(o,"link",i),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=Hr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Uo=0;function h0(e,t){return e.stylesheets&&e.count===0&&Yr(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&Yr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Uo===0&&(Uo=62500*Xg());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Yr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Uo?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(r)}}:null}function Hr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $r=null;function Yr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$r=new Map,t.forEach(m0,e),$r=null,Hr.call(e))}function m0(e,t){if(!(t.state.loading&4)){var a=$r.get(e);if(a)var i=a.get(null);else{a=new Map,$r.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),i=h)}i&&a.set(null,i)}r=t.instance,h=r.getAttribute("data-precedence"),o=a.get(h)||i,o===i&&a.set(null,r),a.set(h,r),this.count++,i=Hr.bind(this),r.addEventListener("load",i),r.addEventListener("error",i),o?o.parentNode.insertBefore(r,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var ms={$$typeof:W,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function p0(e,t,a,i,r,o,h,v,S){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=Ll(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ll(0),this.hiddenUpdates=Ll(null),this.identifierPrefix=i,this.onUncaughtError=r,this.onCaughtError=o,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function Mp(e,t,a,i,r,o,h,v,S,R,z,V){return e=new p0(e,t,a,h,S,R,z,V,v),t=1,o===!0&&(t|=24),o=Wt(3,null,null,t),e.current=o,o.stateNode=e,t=mc(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:i,isDehydrated:a,cache:t},vc(o),e}function Dp(e){return e?(e=Jl,e):Jl}function Lp(e,t,a,i,r,o){r=Dp(r),i.context===null?i.context=r:i.pendingContext=r,i=Dn(t),i.payload={element:a},o=o===void 0?null:o,o!==null&&(i.callback=o),a=Ln(e,i,t),a!==null&&(Xt(a,e,t),Qi(a,e,t))}function Up(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function zo(e,t){Up(e,t),(e=e.alternate)&&Up(e,t)}function zp(e){if(e.tag===13||e.tag===31){var t=ol(e,67108864);t!==null&&Xt(t,e,67108864),zo(e,67108864)}}function Bp(e){if(e.tag===13||e.tag===31){var t=na();t=$e(t);var a=ol(e,t);a!==null&&Xt(a,e,t),zo(e,t)}}var Vr=!0;function x0(e,t,a,i){var r=U.T;U.T=null;var o=F.p;try{F.p=2,Bo(e,t,a,i)}finally{F.p=o,U.T=r}}function y0(e,t,a,i){var r=U.T;U.T=null;var o=F.p;try{F.p=8,Bo(e,t,a,i)}finally{F.p=o,U.T=r}}function Bo(e,t,a,i){if(Vr){var r=qo(i);if(r===null)No(e,t,i,Zr,a),Hp(e,i);else if(g0(r,e,t,a,i))i.stopPropagation();else if(Hp(e,i),t&4&&-1<v0.indexOf(e)){for(;r!==null;){var o=Bl(r);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var h=it(o.pendingLanes);if(h!==0){var v=o;for(v.pendingLanes|=2,v.entangledLanes|=2;h;){var S=1<<31-Et(h);v.entanglements[1]|=S,h&=~S}Ga(o),(qe&6)===0&&(Ar=St()+500,us(0))}}break;case 31:case 13:v=ol(o,2),v!==null&&Xt(v,o,2),kr(),zo(o,2)}if(o=qo(i),o===null&&No(e,t,i,Zr,a),o===r)break;r=o}r!==null&&i.stopPropagation()}else No(e,t,i,null,a)}}function qo(e){return e=Hu(e),Ho(e)}var Zr=null;function Ho(e){if(Zr=null,e=zl(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=x(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 Zr=e,null}function qp(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(ra()){case Fa:return 2;case Wa:return 8;case Ut:case rt:return 32;case ll:return 268435456;default:return 32}default:return 32}}var $o=!1,Qn=null,Xn=null,Kn=null,ps=new Map,xs=new Map,Jn=[],v0="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 Hp(e,t){switch(e){case"focusin":case"focusout":Qn=null;break;case"dragenter":case"dragleave":Xn=null;break;case"mouseover":case"mouseout":Kn=null;break;case"pointerover":case"pointerout":ps.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xs.delete(t.pointerId)}}function ys(e,t,a,i,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:o,targetContainers:[r]},t!==null&&(t=Bl(t),t!==null&&zp(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function g0(e,t,a,i,r){switch(t){case"focusin":return Qn=ys(Qn,e,t,a,i,r),!0;case"dragenter":return Xn=ys(Xn,e,t,a,i,r),!0;case"mouseover":return Kn=ys(Kn,e,t,a,i,r),!0;case"pointerover":var o=r.pointerId;return ps.set(o,ys(ps.get(o)||null,e,t,a,i,r)),!0;case"gotpointercapture":return o=r.pointerId,xs.set(o,ys(xs.get(o)||null,e,t,a,i,r)),!0}return!1}function $p(e){var t=zl(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,ef(e.priority,function(){Bp(a)});return}}else if(t===31){if(t=x(a),t!==null){e.blockedOn=t,ef(e.priority,function(){Bp(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 Gr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=qo(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);qu=i,a.target.dispatchEvent(i),qu=null}else return t=Bl(a),t!==null&&zp(t),e.blockedOn=a,!1;t.shift()}return!0}function Yp(e,t,a){Gr(e)&&a.delete(t)}function b0(){$o=!1,Qn!==null&&Gr(Qn)&&(Qn=null),Xn!==null&&Gr(Xn)&&(Xn=null),Kn!==null&&Gr(Kn)&&(Kn=null),ps.forEach(Yp),xs.forEach(Yp)}function Qr(e,t){e.blockedOn===t&&(e.blockedOn=null,$o||($o=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,b0)))}var Xr=null;function Vp(e){Xr!==e&&(Xr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Xr===e&&(Xr=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],r=e[t+2];if(typeof i!="function"){if(Ho(i||a)===null)continue;break}var o=Bl(a);o!==null&&(e.splice(t,3),t-=3,Bc(o,{pending:!0,data:r,method:a.method,action:i},i,r))}}))}function gi(e){function t(S){return Qr(S,e)}Qn!==null&&Qr(Qn,e),Xn!==null&&Qr(Xn,e),Kn!==null&&Qr(Kn,e),ps.forEach(t),xs.forEach(t);for(var a=0;a<Jn.length;a++){var i=Jn[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Jn.length&&(a=Jn[0],a.blockedOn===null);)$p(a),a.blockedOn===null&&Jn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var r=a[i],o=a[i+1],h=r[$t]||null;if(typeof o=="function")h||Vp(a);else if(h){var v=null;if(o&&o.hasAttribute("formAction")){if(r=o,h=o[$t]||null)v=h.formAction;else if(Ho(r)!==null)continue}else v=h.action;typeof v=="function"?a[i+1]=v:(a.splice(i,3),i-=3),Vp(a)}}}function Zp(){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),i||setTimeout(a,20)}function a(){if(!i&&!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 i=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Yo(e){this._internalRoot=e}Kr.prototype.render=Yo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,i=na();Lp(a,i,e,t,null,null)},Kr.prototype.unmount=Yo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lp(e.current,2,null,e,null,null),kr(),t[Ul]=null}};function Kr(e){this._internalRoot=e}Kr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Pd();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Jn.length&&t!==0&&t<Jn[a].priority;a++);Jn.splice(a,0,e),a===0&&$p(e)}};var Gp=l.version;if(Gp!=="19.2.7")throw Error(u(527,Gp,"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 w0={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jr.isDisabled&&Jr.supportsFiber)try{Ca=Jr.inject(w0),gt=Jr}catch{}}return gs.createRoot=function(e,t){if(!d(e))throw Error(u(299));var a=!1,i="",r=Wh,o=Ph,h=em;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Mp(e,1,!1,null,null,a,i,null,r,o,h,Zp),e[Ul]=t.current,jo(e),new Yo(t)},gs.hydrateRoot=function(e,t,a){if(!d(e))throw Error(u(299));var i=!1,r="",o=Wh,h=Ph,v=em,S=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!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&&(v=a.onRecoverableError),a.formState!==void 0&&(S=a.formState)),t=Mp(e,1,!0,t,a??null,i,r,S,o,h,v,Zp),t.context=Dp(null),a=t.current,i=na(),i=$e(i),r=Dn(i),r.callback=null,Ln(a,r,i),a=i,t.current.lanes=a,il(t,a),Ga(t),e[Ul]=t.current,jo(e),new Kr(t)},gs.version="19.2.7",gs}var tx;function T0(){if(tx)return Go.exports;tx=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(l){console.error(l)}}return n(),Go.exports=C0(),Go.exports}var O0=T0();/**
|
|
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 Od=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Fx=/^[\\/]{2}/;function M0(n,l){return l+n.replace(/\\/g,"/")}var ax="popstate";function nx(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function D0(n={}){function l(u,d){var g;let f=(g=d.state)==null?void 0:g.masked,{pathname:m,search:x,hash:y}=f||u.location;return pd("",{pathname:m,search:x,hash:y},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:Nl(d)}return U0(l,s,null,n)}function nt(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function _a(n,l){if(!n){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function L0(){return Math.random().toString(36).substring(2,10)}function lx(n,l){return{usr:n.state,key:n.key,idx:l,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function pd(n,l,s=null,u,d){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof l=="string"?Ai(l):l,state:s,key:l&&l.key||u||L0(),mask:d}}function Nl({pathname:n="/",search:l="",hash:s=""}){return l&&l!=="?"&&(n+=l.charAt(0)==="?"?l:"?"+l),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function Ai(n){let l={};if(n){let s=n.indexOf("#");s>=0&&(l.hash=n.substring(s),n=n.substring(0,s));let u=n.indexOf("?");u>=0&&(l.search=n.substring(u),n=n.substring(0,u)),n&&(l.pathname=n)}return l}function U0(n,l,s,u={}){let{window:d=document.defaultView,v5Compat:f=!1}=u,m=d.history,x="POP",y=null,g=b();g==null&&(g=0,m.replaceState({...m.state,idx:g},""));function b(){return(m.state||{idx:null}).idx}function N(){x="POP";let D=b(),B=D==null?null:D-g;g=D,y&&y({action:x,location:Y.location,delta:B})}function L(D,B){x="PUSH";let Z=nx(D)?D:pd(Y.location,D,B);g=b()+1;let W=lx(Z,g),ce=Y.createHref(Z.mask||Z);try{m.pushState(W,"",ce)}catch(K){if(K instanceof DOMException&&K.name==="DataCloneError")throw K;d.location.assign(ce)}f&&y&&y({action:x,location:Y.location,delta:1})}function X(D,B){x="REPLACE";let Z=nx(D)?D:pd(Y.location,D,B);g=b();let W=lx(Z,g),ce=Y.createHref(Z.mask||Z);m.replaceState(W,"",ce),f&&y&&y({action:x,location:Y.location,delta:0})}function C(D){return z0(d,D)}let Y={get action(){return x},get location(){return n(d,m)},listen(D){if(y)throw new Error("A history only accepts one active listener");return d.addEventListener(ax,N),y=D,()=>{d.removeEventListener(ax,N),y=null}},createHref(D){return l(d,D)},createURL:C,encodeLocation(D){let B=C(D);return{pathname:B.pathname,search:B.search,hash:B.hash}},push:L,replace:X,go(D){return m.go(D)}};return Y}function z0(n,l,s=!1){let u="http://localhost";n&&(u=n.location.origin!=="null"?n.location.origin:n.location.href),nt(u,"No window.location.(origin|href) available to create URL");let d=typeof l=="string"?l:Nl(l);return d=d.replace(/ $/,"%20"),!s&&Fx.test(d)&&(d=u+d),new URL(d,u)}function Wx(n,l,s="/"){return B0(n,l,s,!1)}function B0(n,l,s,u,d){let f=typeof l=="string"?Ai(l):l,m=wn(f.pathname||"/",s);if(m==null)return null;let x=q0(n),y=null,g=I0(m);for(let b=0;y==null&&b<x.length;++b)y=J0(x[b],g,u);return y}function q0(n){let l=Px(n);return H0(l),l}function Px(n,l=[],s=[],u="",d=!1){let f=(m,x,y=d,g)=>{let b={relativePath:g===void 0?m.path||"":g,caseSensitive:m.caseSensitive===!0,childrenIndex:x,route:m};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(u)&&y)return;nt(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=za([u,b.relativePath]),L=s.concat(b);m.children&&m.children.length>0&&(nt(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${N}".`),Px(m.children,l,L,N,y)),!(m.path==null&&!m.index)&&l.push({path:N,score:X0(N,m.index),routesMeta:L.map((X,C)=>{let[Y,D]=ay(X.relativePath,X.caseSensitive,C===L.length-1);return{...X,matcher:Y,compiledParams:D}})})};return n.forEach((m,x)=>{var y;if(m.path===""||!((y=m.path)!=null&&y.includes("?")))f(m,x);else for(let g of ey(m.path))f(m,x,!0,g)}),l}function ey(n){let l=n.split("/");if(l.length===0)return[];let[s,...u]=l,d=s.endsWith("?"),f=s.replace(/\?$/,"");if(u.length===0)return d?[f,""]:[f];let m=ey(u.join("/")),x=[];return x.push(...m.map(y=>y===""?f:[f,y].join("/"))),d&&x.push(...m),x.map(y=>n.startsWith("/")&&y===""?"/":y)}function H0(n){n.sort((l,s)=>l.score!==s.score?s.score-l.score:K0(l.routesMeta.map(u=>u.childrenIndex),s.routesMeta.map(u=>u.childrenIndex)))}var $0=/^:[\w-]+$/,Y0=3,V0=2,Z0=1,G0=10,Q0=-2,ix=n=>n==="*";function X0(n,l){let s=n.split("/"),u=s.length;return s.some(ix)&&(u+=Q0),l&&(u+=V0),s.filter(d=>!ix(d)).reduce((d,f)=>d+($0.test(f)?Y0:f===""?Z0:G0),u)}function K0(n,l){return n.length===l.length&&n.slice(0,-1).every((u,d)=>u===l[d])?n[n.length-1]-l[l.length-1]:0}function J0(n,l,s=!1){let{routesMeta:u}=n,d={},f="/",m=[];for(let x=0;x<u.length;++x){let y=u[x],g=x===u.length-1,b=f==="/"?l:l.slice(f.length)||"/",N={path:y.relativePath,caseSensitive:y.caseSensitive,end:g},L=y.matcher&&y.compiledParams?ty(N,b,y.matcher,y.compiledParams):su(N,b),X=y.route;if(!L&&g&&s&&!u[u.length-1].route.index&&(L=su({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},b)),!L)return null;Object.assign(d,L.params),m.push({params:d,pathname:za([f,L.pathname]),pathnameBase:P0(za([f,L.pathnameBase])),route:X}),L.pathnameBase!=="/"&&(f=za([f,L.pathnameBase]))}return m}function su(n,l){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,u]=ay(n.path,n.caseSensitive,n.end);return ty(n,l,s,u)}function ty(n,l,s,u){let d=l.match(s);if(!d)return null;let f=d[0],m=ji(f,1),x=d.slice(1);return{params:u.reduce((g,{paramName:b,isOptional:N},L)=>{if(b==="*"){let C=x[L]||"";m=ji(f.slice(0,f.length-C.length),1)}const X=x[L];return N&&!X?g[b]=void 0:g[b]=(X||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:m,pattern:n}}function ay(n,l=!1,s=!0){_a(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,x,y,g,b)=>{if(u.push({paramName:x,isOptional:y!=null}),y){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,l?void 0:"i"),u]}function I0(n){try{return n.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return _a(!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 (${l}).`),n}}function wn(n,l){if(l==="/")return n;if(!n.toLowerCase().startsWith(l.toLowerCase()))return null;let s=l.endsWith("/")?l.length-1:l.length,u=n.charAt(s);return u&&u!=="/"?null:n.slice(s)||"/"}function F0(n,l="/"){let{pathname:s,search:u="",hash:d=""}=typeof n=="string"?Ai(n):n,f;return s?(s=ny(s),s.startsWith("/")||s.startsWith("\\")?f=sx(s.substring(1),"/"):f=sx(s,l)):f=l,{pathname:f,search:eb(u),hash:tb(d)}}function sx(n,l){let s=ji(l).split("/");return n.split("/").forEach(d=>{d===".."?s.length>1&&s.pop():d!=="."&&s.push(d)}),s.length>1?s.join("/"):"/"}function Jo(n,l,s,u){return`Cannot include a '${n}' character in a manually specified \`to.${l}\` 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 W0(n){return n.filter((l,s)=>s===0||l.route.path&&l.route.path.length>0)}function Md(n){let l=W0(n);return l.map((s,u)=>u===l.length-1?s.pathname:s.pathnameBase)}function wu(n,l,s,u=!1){let d;typeof n=="string"?d=Ai(n):(d={...n},nt(!d.pathname||!d.pathname.includes("?"),Jo("?","pathname","search",d)),nt(!d.pathname||!d.pathname.includes("#"),Jo("#","pathname","hash",d)),nt(!d.search||!d.search.includes("#"),Jo("#","search","hash",d)));let f=n===""||d.pathname==="",m=f?"/":d.pathname,x;if(m==null)x=s;else{let N=l.length-1;if(!u&&m.startsWith("..")){let L=m.split("/");for(;L[0]==="..";)L.shift(),N-=1;d.pathname=L.join("/")}x=N>=0?l[N]:"/"}let y=F0(d,x),g=m&&m!=="/"&&m.endsWith("/"),b=(f||m===".")&&s.endsWith("/");return!y.pathname.endsWith("/")&&(g||b)&&(y.pathname+="/"),y}var ny=n=>n.replace(/[\\/]{2,}/g,"/"),za=n=>ny(n.join("/"));function ji(n,l=0){let s=n.length;for(;s>l&&n.charCodeAt(s-1)===47;)s--;return s===n.length?n:n.slice(0,s)}var P0=n=>ji(n).replace(/^\/*/,"/"),eb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,tb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,ab=class{constructor(n,l,s,u=!1){this.status=n,this.statusText=l||"",this.internal=u,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function nb(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function lb(n){let l=n.map(s=>s.route.path).filter(Boolean);return za(l)||"/"}var ly=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function iy(n,l){let s=n;if(typeof s!="string"||!Od.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let u=s,d=!1;if(ly)try{let f=new URL(window.location.href),m=Fx.test(s)?new URL(M0(s,f.protocol)):new URL(s),x=wn(m.pathname,l);m.origin===f.origin&&x!=null?s=x+m.search+m.hash:d=!0}catch{_a(!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 rx=new URL("http://localhost");function Dd(n){if(n.createURL)return n.createURL("/");try{return new URL(n.createHref("/"),rx)}catch{return rx}}function Io(n,l){return n.origin===l.origin&&(n.origin!=="null"||n.protocol===l.protocol&&n.host===l.host)}function ib(n,l){if(n.startsWith("//"))return!0;let s=l.protocol.toLowerCase();return n.toLowerCase().startsWith(s)?l.host===""||n.slice(s.length).startsWith("//"):!1}function Ld(n,l,s,u){let d=null;try{d=n==null?null:new URL(n,s)}catch{}let f=new URL(l,s),m=d!=null&&!Io(d,s),x=!Io(f,s);if(u==="reject"){if(m||x)throw new Error("External navigation is not allowed")}else if(x&&(d==null||!ib(n,d)||!Io(d,f)))throw new Error("External navigation is not allowed")}var sy=["POST","PUT","PATCH","DELETE"];new Set(sy);var sb=["GET",...sy];new Set(sb);var rb=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function ub(n){try{return rb.includes(new URL(n).protocol)}catch{return!1}}var Ei=w.createContext(null);Ei.displayName="DataRouter";var Su=w.createContext(null);Su.displayName="DataRouterState";var ry=w.createContext(!1);function cb(){return w.useContext(ry)}var uy=w.createContext({isTransitioning:!1});uy.displayName="ViewTransition";var ob=w.createContext(new Map);ob.displayName="Fetchers";var db=w.createContext(null);db.displayName="Await";var sa=w.createContext(null);sa.displayName="Navigation";var Ms=w.createContext(null);Ms.displayName="Location";var qa=w.createContext({outlet:null,matches:[],isDataRoute:!1});qa.displayName="Route";var Ud=w.createContext(null);Ud.displayName="RouteError";var cy="REACT_ROUTER_ERROR",fb="REDIRECT",hb="ROUTE_ERROR_RESPONSE";function mb(n){if(n.startsWith(`${cy}:${fb}:{`))try{let l=JSON.parse(n.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function pb(n){if(n.startsWith(`${cy}:${hb}:{`))try{let l=JSON.parse(n.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new ab(l.status,l.statusText,l.data)}catch{}}function xb(n,{relative:l}={}){nt(ki(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:u}=w.useContext(sa),{hash:d,pathname:f,search:m}=Ds(n,{relative:l}),x=f;return s!=="/"&&(x=f==="/"?s:za([s,f])),u.createHref({pathname:x,search:m,hash:d})}function ki(){return w.useContext(Ms)!=null}function Ha(){return nt(ki(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Ms).location}var oy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function dy(n){w.useContext(sa).static||w.useLayoutEffect(n)}function zd(){let{isDataRoute:n}=w.useContext(qa);return n?Cb():yb()}function yb(){nt(ki(),"useNavigate() may be used only in the context of a <Router> component.");let n=w.useContext(Ei),{basename:l,navigator:s}=w.useContext(sa),{matches:u}=w.useContext(qa),{pathname:d}=Ha(),f=JSON.stringify(Md(u)),m=w.useRef(!1);return dy(()=>{m.current=!0}),w.useCallback((y,g={})=>{if(_a(m.current,oy),!m.current)return;if(typeof y=="number"){s.go(y);return}let b=wu(y,JSON.parse(f),d,g.relative==="path");n==null&&l!=="/"&&(b.pathname=b.pathname==="/"?l:za([l,b.pathname])),Ld(typeof y=="string"?y:Nl(y),s.createHref(b),Dd(s),"reject"),(g.replace?s.replace:s.push)(b,g.state,g)},[l,s,f,d,n])}w.createContext(null);function vb(){let{matches:n}=w.useContext(qa),l=n[n.length-1];return(l==null?void 0:l.params)??{}}function Ds(n,{relative:l}={}){let{matches:s}=w.useContext(qa),{pathname:u}=Ha(),d=JSON.stringify(Md(s));return w.useMemo(()=>wu(n,JSON.parse(d),u,l==="path"),[n,d,u,l])}function gb(n,l){return fy(n,l)}function fy(n,l,s){var D;nt(ki(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=w.useContext(sa),{matches:d}=w.useContext(qa),f=d[d.length-1],m=f?f.params:{},x=f?f.pathname:"/",y=f?f.pathnameBase:"/",g=f&&f.route;{let B=g&&g.path||"";my(x,!g||B.endsWith("*")||B.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${B}">) 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="${B}"> to <Route path="${B==="/"?"*":`${B}/*`}">.`)}let b=Ha(),N;if(l){let B=typeof l=="string"?Ai(l):l;nt(y==="/"||((D=B.pathname)==null?void 0:D.startsWith(y)),`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 "${y}" but pathname "${B.pathname}" was given in the \`location\` prop.`),N=B}else N=b;let L=N.pathname||"/",X=L;if(y!=="/"){let B=y.replace(/^\//,"").split("/");X="/"+L.replace(/^\//,"").split("/").slice(B.length).join("/")}let C=s&&s.state.matches.length?s.state.matches.map(B=>Object.assign(B,{route:s.manifest[B.route.id]||B.route})):Wx(n,{pathname:X});_a(g||C!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),_a(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.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 Y=Nb(C&&C.map(B=>Object.assign({},B,{params:Object.assign({},m,B.params),pathname:za([y,u.encodeLocation?u.encodeLocation(B.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:B.pathname]),pathnameBase:B.pathnameBase==="/"?y:za([y,u.encodeLocation?u.encodeLocation(B.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:B.pathnameBase])})),d,s);return l&&Y?w.createElement(Ms.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...N},navigationType:"POP"}},Y):Y}function bb(){let n=Rb(),l=nb(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=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:f},"ErrorBoundary")," or"," ",w.createElement("code",{style:f},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},l),s?w.createElement("pre",{style:d},s):null,m)}var wb=w.createElement(bb,null),hy=class extends w.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,l){return l.location!==n.location||l.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:l.error,location:l.location,revalidation:n.revalidation||l.revalidation}}componentDidCatch(n,l){this.props.onError?this.props.onError(n,l):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=pb(n.digest);s&&(n=s)}let l=n!==void 0?w.createElement(qa.Provider,{value:this.props.routeContext},w.createElement(Ud.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?w.createElement(Sb,{error:n},l):l}};hy.contextType=ry;var Fo=new WeakMap;function Sb({children:n,error:l}){let{basename:s,navigator:u}=w.useContext(sa);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let d=mb(l.digest);if(d){let f=Fo.get(l);if(f)throw f;let m=iy(d.location,s),x=m.absoluteURL||m.to;if(Ld(d.location,x,Dd(u),"allow-explicit"),ub(x))throw new Error("Invalid redirect location");if(ly&&!Fo.get(l))if(m.isExternal||d.reloadDocument)window.location.href=x;else{const y=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:d.replace}));throw Fo.set(l,y),y}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x}`})}}return n}function jb({routeContext:n,match:l,children:s}){let u=w.useContext(Ei);return u&&u.static&&u.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=l.route.id),w.createElement(qa.Provider,{value:n},s)}function Nb(n,l=[],s){let u=s==null?void 0:s.state;if(n==null){if(!u)return null;if(u.errors)n=u.matches;else if(l.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);nt(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,x=-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)&&(x=b),N.route.id){let{loaderData:L,errors:X}=u,C=N.route.loader&&!L.hasOwnProperty(N.route.id)&&(!X||X[N.route.id]===void 0);if(N.route.lazy||C){s.isStatic&&(m=!0),x>=0?d=d.slice(0,x+1):d=[d[0]];break}}}}let y=s==null?void 0:s.onError,g=u&&y?(b,N)=>{var L,X;y(b,{location:u.location,params:((X=(L=u.matches)==null?void 0:L[0])==null?void 0:X.params)??{},pattern:lb(u.matches),errorInfo:N})}:void 0;return d.reduceRight((b,N,L)=>{let X,C=!1,Y=null,D=null;u&&(X=f&&N.route.id?f[N.route.id]:void 0,Y=N.route.errorElement||wb,m&&(x<0&&L===0?(my("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,D=null):x===L&&(C=!0,D=N.route.hydrateFallbackElement||null)));let B=l.concat(d.slice(0,L+1)),Z=()=>{let W;return X?W=Y:C?W=D:N.route.Component?W=w.createElement(N.route.Component,null):N.route.element?W=N.route.element:W=b,w.createElement(jb,{match:N,routeContext:{outlet:b,matches:B,isDataRoute:u!=null},children:W})};return u&&(N.route.ErrorBoundary||N.route.errorElement||L===0)?w.createElement(hy,{location:u.location,revalidation:u.revalidation,component:Y,error:X,children:Z(),routeContext:{outlet:null,matches:B,isDataRoute:!0},onError:g}):Z()},null)}function Bd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _b(n){let l=w.useContext(Ei);return nt(l,Bd(n)),l}function Ab(n){let l=w.useContext(Su);return nt(l,Bd(n)),l}function Eb(n){let l=w.useContext(qa);return nt(l,Bd(n)),l}function qd(n){let l=Eb(n),s=l.matches[l.matches.length-1];return nt(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function kb(){return qd("useRouteId")}function Rb(){var u;let n=w.useContext(Ud),l=Ab("useRouteError"),s=qd("useRouteError");return n!==void 0?n:(u=l.errors)==null?void 0:u[s]}function Cb(){let{router:n}=_b("useNavigate"),l=qd("useNavigate"),s=w.useRef(!1);return dy(()=>{s.current=!0}),w.useCallback(async(d,f={})=>{_a(s.current,oy),s.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:l,...f}))},[n,l])}var ux={};function my(n,l,s){!l&&!ux[n]&&(ux[n]=!0,_a(!1,s))}w.memo(Tb);function Tb({routes:n,manifest:l,future:s,state:u,isStatic:d,onError:f}){return fy(n,void 0,{manifest:l,state:u,isStatic:d,onError:f})}function py({to:n,replace:l,state:s,relative:u}){nt(ki(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d,navigator:f}=w.useContext(sa);_a(!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}=w.useContext(qa),{pathname:x}=Ha(),y=zd(),g=wu(n,Md(m),x,u==="path");Ld(typeof n=="string"?n:Nl(n),f.createHref(g),Dd(f),"reject");let b=JSON.stringify(g);return w.useEffect(()=>{y(JSON.parse(b),{replace:l,state:s,relative:u})},[y,b,u,l,s]),null}function jl(n){nt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Ob({basename:n="/",children:l=null,location:s,navigationType:u="POP",navigator:d,static:f=!1,useTransitions:m}){nt(!ki(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let x=n.replace(/^\/*/,"/"),y=w.useMemo(()=>({basename:x,navigator:d,static:f,useTransitions:m,future:{}}),[x,d,f,m]);typeof s=="string"&&(s=Ai(s));let{pathname:g="/",search:b="",hash:N="",state:L=null,key:X="default",mask:C}=s,Y=w.useMemo(()=>{let D=wn(g,x);return D==null?null:{location:{pathname:D,search:b,hash:N,state:L,key:X,mask:C},navigationType:u}},[x,g,b,N,L,X,u,C]);return _a(Y!=null,`<Router basename="${x}"> 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.`),Y==null?null:w.createElement(sa.Provider,{value:y},w.createElement(Ms.Provider,{children:l,value:Y}))}function Mb({children:n,location:l}){return gb(xd(n),l)}function xd(n,l=[]){let s=[];return w.Children.forEach(n,(u,d)=>{if(!w.isValidElement(u))return;let f=[...l,d];if(u.type===w.Fragment){s.push.apply(s,xd(u.props.children,f));return}nt(u.type===jl,`[${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>`),nt(!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=xd(u.props.children,f)),s.push(m)}),s}var au="get",nu="application/x-www-form-urlencoded";function ju(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Db(n){return ju(n)&&n.tagName.toLowerCase()==="button"}function Lb(n){return ju(n)&&n.tagName.toLowerCase()==="form"}function Ub(n){return ju(n)&&n.tagName.toLowerCase()==="input"}function zb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Bb(n,l){return n.button===0&&(!l||l==="_self")&&!zb(n)}function yd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((l,s)=>{let u=n[s];return l.concat(Array.isArray(u)?u.map(d=>[s,d]):[[s,u]])},[]))}function qb(n,l){let s=yd(n);return l&&l.forEach((u,d)=>{s.has(d)||l.getAll(d).forEach(f=>{s.append(d,f)})}),s}var Ir=null;function Hb(){if(Ir===null)try{new FormData(document.createElement("form"),0),Ir=!1}catch{Ir=!0}return Ir}var $b=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Wo(n){return n!=null&&!$b.has(n)?(_a(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${nu}"`),null):n}function Yb(n,l){let s,u,d,f,m;if(Lb(n)){let x=n.getAttribute("action");u=x?wn(x,l):null,s=n.getAttribute("method")||au,d=Wo(n.getAttribute("enctype"))||nu,f=new FormData(n)}else if(Db(n)||Ub(n)&&(n.type==="submit"||n.type==="image")){let x=n.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=n.getAttribute("formaction")||x.getAttribute("action");if(u=y?wn(y,l):null,s=n.getAttribute("formmethod")||x.getAttribute("method")||au,d=Wo(n.getAttribute("formenctype"))||Wo(x.getAttribute("enctype"))||nu,f=new FormData(x,n),!Hb()){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(ju(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=au,u=null,d=nu,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 Hd(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function xy(n,l,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}`:l&&wn(d.pathname,l)==="/"?d.pathname=`${ji(l)}/_root.${u}`:d.pathname=`${ji(d.pathname)}.${u}`,d}async function Vb(n,l){if(n.id in l)return l[n.id];try{let s=await import(n.module);return l[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 Zb(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,l,s){let u=await Promise.all(n.map(async d=>{let f=l.routes[d.route.id];if(f){let m=await Vb(f,s);return m.links?m.links():[]}return[]}));return Jb(u.flat(1).filter(Zb).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function cx(n,l,s,u,d,f){let m=(y,g)=>s[g]?y.route.id!==s[g].route.id:!0,x=(y,g)=>{var b;return s[g].pathname!==y.pathname||((b=s[g].route.path)==null?void 0:b.endsWith("*"))&&s[g].params["*"]!==y.params["*"]};return f==="assets"?l.filter((y,g)=>m(y,g)||x(y,g)):f==="data"?l.filter((y,g)=>{var N;let b=u.routes[y.route.id];if(!b||!b.hasLoader)return!1;if(m(y,g)||x(y,g))return!0;if(y.route.shouldRevalidate){let L=y.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:y.params,defaultShouldRevalidate:!0});if(typeof L=="boolean")return L}return!0}):[]}function Qb(n,l,{includeHydrateFallback:s}={}){return Xb(n.map(u=>{let d=l.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 Xb(n){return[...new Set(n)]}function Kb(n){let l={},s=Object.keys(n).sort();for(let u of s)l[u]=n[u];return l}function Jb(n,l){let s=new Set;return new Set(l),n.reduce((u,d)=>{let f=JSON.stringify(Kb(d));return s.has(f)||(s.add(f),u.push({key:f,link:d})),u},[])}function $d(){let n=w.useContext(Ei);return Hd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Ib(){let n=w.useContext(Su);return Hd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Yd=w.createContext(void 0);Yd.displayName="FrameworkContext";function Nu(){let n=w.useContext(Yd);return Hd(n,"You must render this element inside a <HydratedRouter> element"),n}function Fb(n,l){let s=w.useContext(Yd),[u,d]=w.useState(!1),[f,m]=w.useState(!1),{onFocus:x,onBlur:y,onMouseEnter:g,onMouseLeave:b,onTouchStart:N}=l,L=w.useRef(null);w.useEffect(()=>{if(n==="render"&&m(!0),n==="viewport"){let Y=B=>{B.forEach(Z=>{m(Z.isIntersecting)})},D=new IntersectionObserver(Y,{threshold:.5});return L.current&&D.observe(L.current),()=>{D.disconnect()}}},[n]),w.useEffect(()=>{if(u){let Y=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(Y)}}},[u]);let X=()=>{d(!0)},C=()=>{d(!1),m(!1)};return s?n!=="intent"?[f,L,{}]:[f,L,{onFocus:bs(x,X),onBlur:bs(y,C),onMouseEnter:bs(g,X),onMouseLeave:bs(b,C),onTouchStart:bs(N,X)}]:[!1,L,{}]}function bs(n,l){return s=>{n&&n(s),s.defaultPrevented||l(s)}}function Wb({page:n,...l}){let s=cb(),{nonce:u}=Nu(),{router:d}=$d(),f=w.useMemo(()=>Wx(d.routes,n,d.basename),[d.routes,n,d.basename]);return f?(l.nonce==null&&u&&(l={...l,nonce:u}),s?w.createElement(e1,{page:n,matches:f,...l}):w.createElement(t1,{page:n,matches:f,...l})):null}function Pb(n){let{manifest:l,routeModules:s}=Nu(),[u,d]=w.useState([]);return w.useEffect(()=>{let f=!1;return Gb(n,l,s).then(m=>{f||d(m)}),()=>{f=!0}},[n,l,s]),u}function e1({page:n,matches:l,...s}){let u=Ha(),{future:d}=Nu(),{basename:f}=$d(),m=w.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let x=xy(n,f,d.v8_trailingSlashAwareDataRequests,"rsc"),y=!1,g=[];for(let b of l)typeof b.route.shouldRevalidate=="function"?y=!0:g.push(b.route.id);return y&&g.length>0&&x.searchParams.set("_routes",g.join(",")),[x.pathname+x.search]},[f,d.v8_trailingSlashAwareDataRequests,n,u,l]);return w.createElement(w.Fragment,null,m.map(x=>w.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...s})))}function t1({page:n,matches:l,...s}){let u=Ha(),{future:d,manifest:f,routeModules:m}=Nu(),{basename:x}=$d(),{loaderData:y,matches:g}=Ib(),b=w.useMemo(()=>cx(n,l,g,f,u,"data"),[n,l,g,f,u]),N=w.useMemo(()=>cx(n,l,g,f,u,"assets"),[n,l,g,f,u]),L=w.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let Y=new Set,D=!1;if(l.forEach(Z=>{var ce;let W=f.routes[Z.route.id];!W||!W.hasLoader||(!b.some(K=>K.route.id===Z.route.id)&&Z.route.id in y&&((ce=m[Z.route.id])!=null&&ce.shouldRevalidate)||W.hasClientLoader?D=!0:Y.add(Z.route.id))}),Y.size===0)return[];let B=xy(n,x,d.v8_trailingSlashAwareDataRequests,"data");return D&&Y.size>0&&B.searchParams.set("_routes",l.filter(Z=>Y.has(Z.route.id)).map(Z=>Z.route.id).join(",")),[B.pathname+B.search]},[x,d.v8_trailingSlashAwareDataRequests,y,u,f,b,l,n,m]),X=w.useMemo(()=>Qb(N,f),[N,f]),C=Pb(N);return w.createElement(w.Fragment,null,L.map(Y=>w.createElement("link",{key:Y,rel:"prefetch",as:"fetch",href:Y,...s})),X.map(Y=>w.createElement("link",{key:Y,rel:"modulepreload",href:Y,...s})),C.map(({key:Y,link:D})=>w.createElement("link",{key:Y,nonce:s.nonce,...D,crossOrigin:D.crossOrigin??s.crossOrigin})))}function a1(...n){return l=>{n.forEach(s=>{typeof s=="function"?s(l):s!=null&&(s.current=l)})}}var n1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{n1&&(window.__reactRouterVersion="7.18.4")}catch{}function l1({basename:n,children:l,useTransitions:s,window:u}){let d=w.useRef();d.current==null&&(d.current=D0({window:u,v5Compat:!0}));let f=d.current,[m,x]=w.useState({action:f.action,location:f.location}),y=w.useCallback(g=>{s===!1?x(g):w.startTransition(()=>x(g))},[s]);return w.useLayoutEffect(()=>f.listen(y),[f,y]),w.createElement(Ob,{basename:n,children:l,location:m.location,navigationType:m.action,navigator:f,useTransitions:s})}var ia=w.forwardRef(function({onClick:l,discover:s="render",prefetch:u="none",relative:d,reloadDocument:f,replace:m,mask:x,state:y,target:g,to:b,preventScrollReset:N,viewTransition:L,defaultShouldRevalidate:X,...C},Y){let{basename:D,navigator:B,useTransitions:Z}=w.useContext(sa),W=typeof b=="string"&&Od.test(b),ce=iy(b,D);b=ce.to;let K=xb(b,{relative:d}),Te=Ha(),J=null;if(x){let Fe=wu(x,[],Te.mask?Te.mask.pathname:"/",!0);D!=="/"&&(Fe.pathname=Fe.pathname==="/"?D:za([D,Fe.pathname])),J=B.createHref(Fe)}let[be,Ye,vt]=Fb(u,C),ft=r1(b,{replace:m,mask:x,state:y,target:g,preventScrollReset:N,relative:d,viewTransition:L,defaultShouldRevalidate:X,useTransitions:Z});function tt(Fe){l&&l(Fe),Fe.defaultPrevented||ft(Fe)}let Lt=!(ce.isExternal||f),wt=w.createElement("a",{...C,...vt,href:(Lt?J:void 0)||ce.absoluteURL||K,onClick:Lt?tt:l,ref:a1(Y,Ye),target:g,"data-discover":!W&&s==="render"?"true":void 0});return be&&!W?w.createElement(w.Fragment,null,wt,w.createElement(Wb,{page:K})):wt});ia.displayName="Link";var lu=w.forwardRef(function({"aria-current":l="page",caseSensitive:s=!1,className:u="",end:d=!1,style:f,to:m,viewTransition:x,children:y,...g},b){let N=Ds(m,{relative:g.relative}),L=Ha(),X=w.useContext(Su),{navigator:C,basename:Y}=w.useContext(sa),D=X!=null&&f1(N)&&x===!0,B=C.encodeLocation?C.encodeLocation(N).pathname:N.pathname,Z=L.pathname,W=X&&X.navigation&&X.navigation.location?X.navigation.location.pathname:null;s||(Z=Z.toLowerCase(),W=W?W.toLowerCase():null,B=B.toLowerCase()),W&&Y&&(W=wn(W,Y)||W);const ce=B!=="/"&&B.endsWith("/")?B.length-1:B.length;let K=Z===B||!d&&Z.startsWith(B)&&Z.charAt(ce)==="/",Te=W!=null&&(W===B||!d&&W.startsWith(B)&&W.charAt(B.length)==="/"),J={isActive:K,isPending:Te,isTransitioning:D},be=K?l:void 0,Ye;typeof u=="function"?Ye=u(J):Ye=[u,K?"active":null,Te?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let vt=typeof f=="function"?f(J):f;return w.createElement(ia,{...g,"aria-current":be,className:Ye,ref:b,style:vt,to:m,viewTransition:x},typeof y=="function"?y(J):y)});lu.displayName="NavLink";var i1=w.forwardRef(({discover:n="render",fetcherKey:l,navigate:s,reloadDocument:u,replace:d,state:f,method:m=au,action:x,onSubmit:y,relative:g,preventScrollReset:b,viewTransition:N,defaultShouldRevalidate:L,...X},C)=>{let{useTransitions:Y}=w.useContext(sa),D=o1(),B=d1(x,{relative:g}),Z=m.toLowerCase()==="get"?"get":"post",W=typeof x=="string"&&Od.test(x),ce=K=>{if(y&&y(K),K.defaultPrevented)return;K.preventDefault();let Te=K.nativeEvent.submitter,J=(Te==null?void 0:Te.getAttribute("formmethod"))||m,be=()=>D(Te||K.currentTarget,{fetcherKey:l,method:J,navigate:s,replace:d,state:f,relative:g,preventScrollReset:b,viewTransition:N,defaultShouldRevalidate:L});Y&&s!==!1?w.startTransition(()=>be()):be()};return w.createElement("form",{ref:C,method:Z,action:B,onSubmit:u?y:ce,...X,"data-discover":!W&&n==="render"?"true":void 0})});i1.displayName="Form";function s1(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yy(n){let l=w.useContext(Ei);return nt(l,s1(n)),l}function r1(n,{target:l,replace:s,mask:u,state:d,preventScrollReset:f,relative:m,viewTransition:x,defaultShouldRevalidate:y,useTransitions:g}={}){let b=zd(),N=Ha(),L=Ds(n,{relative:m});return w.useCallback(X=>{if(Bb(X,l)){X.preventDefault();let C=s!==void 0?s:Nl(N)===Nl(L),Y=()=>b(n,{replace:C,mask:u,state:d,preventScrollReset:f,relative:m,viewTransition:x,defaultShouldRevalidate:y});g?w.startTransition(()=>Y()):Y()}},[N,b,L,s,u,d,l,n,f,m,x,y,g])}function vy(n){_a(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 l=w.useRef(yd(n)),s=w.useRef(!1),u=Ha(),d=w.useMemo(()=>qb(u.search,s.current?null:l.current),[u.search]),f=zd(),m=w.useCallback((x,y)=>{const g=yd(typeof x=="function"?x(new URLSearchParams(d)):x);s.current=!0,f("?"+g,y)},[f,d]);return[d,m]}var u1=0,c1=()=>`__${String(++u1)}__`;function o1(){let{router:n}=yy("useSubmit"),{basename:l}=w.useContext(sa),s=kb(),u=n.fetch,d=n.navigate;return w.useCallback(async(f,m={})=>{let{action:x,method:y,encType:g,formData:b,body:N}=Yb(f,l);if(m.navigate===!1){let L=m.fetcherKey||c1();await u(L,s,m.action||x,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:N,formMethod:m.method||y,formEncType:m.encType||g,flushSync:m.flushSync})}else await d(m.action||x,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:N,formMethod:m.method||y,formEncType:m.encType||g,replace:m.replace,state:m.state,fromRouteId:s,flushSync:m.flushSync,viewTransition:m.viewTransition})},[u,d,l,s])}function d1(n,{relative:l}={}){let{basename:s}=w.useContext(sa),u=w.useContext(qa);nt(u,"useFormAction must be used inside a RouteContext");let[d]=u.matches.slice(-1),f={...Ds(n||".",{relative:l})},m=Ha();if(n==null){f.search=m.search;let x=new URLSearchParams(f.search),y=x.getAll("index");if(y.some(b=>b==="")){x.delete("index"),y.filter(N=>N).forEach(N=>x.append("index",N));let b=x.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:za([s,f.pathname])),Nl(f)}function f1(n,{relative:l}={}){let s=w.useContext(uy);nt(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=yy("useViewTransitionState"),d=Ds(n,{relative:l});if(!s.isTransitioning)return!1;let f=wn(s.currentLocation.pathname,u)||s.currentLocation.pathname,m=wn(s.nextLocation.pathname,u)||s.nextLocation.pathname;return su(d.pathname,m)!=null||su(d.pathname,f)!=null}var Ue;(function(n){n.assertEqual=d=>{};function l(d){}n.assertIs=l;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(x=>typeof d[d[x]]!="number"),m={};for(const x of f)m[x]=d[x];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})(Ue||(Ue={}));var ox;(function(n){n.mergeShapes=(l,s)=>({...l,...s})})(ox||(ox={}));const ae=Ue.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Pn=n=>{switch(typeof n){case"undefined":return ae.undefined;case"string":return ae.string;case"number":return Number.isNaN(n)?ae.nan:ae.number;case"boolean":return ae.boolean;case"function":return ae.function;case"bigint":return ae.bigint;case"symbol":return ae.symbol;case"object":return Array.isArray(n)?ae.array:n===null?ae.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?ae.promise:typeof Map<"u"&&n instanceof Map?ae.map:typeof Set<"u"&&n instanceof Set?ae.set:typeof Date<"u"&&n instanceof Date?ae.date:ae.object;default:return ae.unknown}},Q=Ue.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 Sn extends Error{get errors(){return this.issues}constructor(l){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=l}format(l){const s=l||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 x=u,y=0;for(;y<m.path.length;){const g=m.path[y];y===m.path.length-1?(x[g]=x[g]||{_errors:[]},x[g]._errors.push(s(m))):x[g]=x[g]||{_errors:[]},x=x[g],y++}}};return d(this),u}static assert(l){if(!(l instanceof Sn))throw new Error(`Not a ZodError: ${l}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ue.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(l=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(l(d))}else u.push(l(d));return{formErrors:u,fieldErrors:s}}get formErrors(){return this.flatten()}}Sn.create=n=>new Sn(n);const vd=(n,l)=>{let s;switch(n.code){case Q.invalid_type:n.received===ae.undefined?s="Required":s=`Expected ${n.expected}, received ${n.received}`;break;case Q.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(n.expected,Ue.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:s=`Unrecognized key(s) in object: ${Ue.joinValues(n.keys,", ")}`;break;case Q.invalid_union:s="Invalid input";break;case Q.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${Ue.joinValues(n.options)}`;break;case Q.invalid_enum_value:s=`Invalid enum value. Expected ${Ue.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}"`:Ue.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=l.defaultError,Ue.assertNever(n)}return{message:s}};let h1=vd;function m1(){return h1}const p1=n=>{const{data:l,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 x="";const y=u.filter(g=>!!g).slice().reverse();for(const g of y)x=g(m,{data:l,defaultError:x}).message;return{...d,path:f,message:x}};function P(n,l){const s=m1(),u=p1({issueData:l,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,s,s===vd?void 0:vd].filter(d=>!!d)});n.common.issues.push(u)}class qt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(l,s){const u=[];for(const d of s){if(d.status==="aborted")return pe;d.status==="dirty"&&l.dirty(),u.push(d.value)}return{status:l.value,value:u}}static async mergeObjectAsync(l,s){const u=[];for(const d of s){const f=await d.key,m=await d.value;u.push({key:f,value:m})}return qt.mergeObjectSync(l,u)}static mergeObjectSync(l,s){const u={};for(const d of s){const{key:f,value:m}=d;if(f.status==="aborted"||m.status==="aborted")return pe;f.status==="dirty"&&l.dirty(),m.status==="dirty"&&l.dirty(),f.value!=="__proto__"&&(typeof m.value<"u"||d.alwaysSet)&&(u[f.value]=m.value)}return{status:l.value,value:u}}}const pe=Object.freeze({status:"aborted"}),Ss=n=>({status:"dirty",value:n}),Aa=n=>({status:"valid",value:n}),dx=n=>n.status==="aborted",fx=n=>n.status==="dirty",Ni=n=>n.status==="valid",ru=n=>typeof Promise<"u"&&n instanceof Promise;var re;(function(n){n.errToObj=l=>typeof l=="string"?{message:l}:l||{},n.toString=l=>typeof l=="string"?l:l==null?void 0:l.message})(re||(re={}));class Ja{constructor(l,s,u,d){this._cachedPath=[],this.parent=l,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 hx=(n,l)=>{if(Ni(l))return{success:!0,data:l.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 Sn(n.common.issues);return this._error=s,this._error}}};function je(n){if(!n)return{};const{errorMap:l,invalid_type_error:s,required_error:u,description:d}=n;if(l&&(s||u))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return l?{errorMap:l,description:d}:{errorMap:(m,x)=>{const{message:y}=n;return m.code==="invalid_enum_value"?{message:y??x.defaultError}:typeof x.data>"u"?{message:y??u??x.defaultError}:m.code!=="invalid_type"?{message:x.defaultError}:{message:y??s??x.defaultError}},description:d}}class Ce{get description(){return this._def.description}_getType(l){return Pn(l.data)}_getOrReturnCtx(l,s){return s||{common:l.parent.common,data:l.data,parsedType:Pn(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}_processInputParams(l){return{status:new qt,ctx:{common:l.parent.common,data:l.data,parsedType:Pn(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}}_parseSync(l){const s=this._parse(l);if(ru(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(l){const s=this._parse(l);return Promise.resolve(s)}parse(l,s){const u=this.safeParse(l,s);if(u.success)return u.data;throw u.error}safeParse(l,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:l,parsedType:Pn(l)},d=this._parseSync({data:l,path:u.path,parent:u});return hx(u,d)}"~validate"(l){var u,d;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Pn(l)};if(!this["~standard"].async)try{const f=this._parseSync({data:l,path:[],parent:s});return Ni(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:l,path:[],parent:s}).then(f=>Ni(f)?{value:f.value}:{issues:s.common.issues})}async parseAsync(l,s){const u=await this.safeParseAsync(l,s);if(u.success)return u.data;throw u.error}async safeParseAsync(l,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:l,parsedType:Pn(l)},d=this._parse({data:l,path:u.path,parent:u}),f=await(ru(d)?d:Promise.resolve(d));return hx(u,f)}refine(l,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=l(d),x=()=>f.addIssue({code:Q.custom,...u(d)});return typeof Promise<"u"&&m instanceof Promise?m.then(y=>y?!0:(x(),!1)):m?!0:(x(),!1)})}refinement(l,s){return this._refinement((u,d)=>l(u)?!0:(d.addIssue(typeof s=="function"?s(u,d):s),!1))}_refinement(l){return new Rl({schema:this,typeName:ye.ZodEffects,effect:{type:"refinement",refinement:l}})}superRefine(l){return this._refinement(l)}constructor(l){this.spa=this.safeParseAsync,this._def=l,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 bn.create(this,this._def)}nullable(){return Cl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ka.create(this)}promise(){return hu.create(this,this._def)}or(l){return cu.create([this,l],this._def)}and(l){return ou.create(this,l,this._def)}transform(l){return new Rl({...je(this._def),schema:this,typeName:ye.ZodEffects,effect:{type:"transform",transform:l}})}default(l){const s=typeof l=="function"?l:()=>l;return new mu({...je(this._def),innerType:this,defaultValue:s,typeName:ye.ZodDefault})}brand(){return new Sy({typeName:ye.ZodBranded,type:this,...je(this._def)})}catch(l){const s=typeof l=="function"?l:()=>l;return new pu({...je(this._def),innerType:this,catchValue:s,typeName:ye.ZodCatch})}describe(l){const s=this.constructor;return new s({...this._def,description:l})}pipe(l){return Zd.create(this,l)}readonly(){return xu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const x1=/^c[^\s-]{8,}$/i,y1=/^[0-9a-z]+$/,v1=/^[0-9A-HJKMNP-TV-Z]{26}$/i,g1=/^[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,b1=/^[a-z0-9_-]{21}$/i,w1=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,S1=/^[-+]?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)?)??$/,j1=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,N1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Po;const _1=/^(?:(?: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])$/,A1=/^(?:(?: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])$/,E1=/^(([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]))$/,k1=/^(([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])$/,R1=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,C1=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gy="((\\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])))",T1=new RegExp(`^${gy}$`);function by(n){let l="[0-5]\\d";n.precision?l=`${l}\\.\\d{${n.precision}}`:n.precision==null&&(l=`${l}(\\.\\d+)?`);const s=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${l})${s}`}function O1(n){return new RegExp(`^${by(n)}$`)}function M1(n){let l=`${gy}T${by(n)}`;const s=[];return s.push(n.local?"Z?":"Z"),n.offset&&s.push("([+-]\\d{2}:?\\d{2})"),l=`${l}(${s.join("|")})`,new RegExp(`^${l}$`)}function D1(n,l){return!!((l==="v4"||!l)&&_1.test(n)||(l==="v6"||!l)&&E1.test(n))}function L1(n,l){if(!w1.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||l&&d.alg!==l)}catch{return!1}}function U1(n,l){return!!((l==="v4"||!l)&&A1.test(n)||(l==="v6"||!l)&&k1.test(n))}class Qa extends Ce{_parse(l){if(this._def.coerce&&(l.data=String(l.data)),this._getType(l)!==ae.string){const f=this._getOrReturnCtx(l);return P(f,{code:Q.invalid_type,expected:ae.string,received:f.parsedType}),pe}const u=new qt;let d;for(const f of this._def.checks)if(f.kind==="min")l.data.length<f.value&&(d=this._getOrReturnCtx(l,d),P(d,{code:Q.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!1,message:f.message}),u.dirty());else if(f.kind==="max")l.data.length>f.value&&(d=this._getOrReturnCtx(l,d),P(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=l.data.length>f.value,x=l.data.length<f.value;(m||x)&&(d=this._getOrReturnCtx(l,d),m?P(d,{code:Q.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}):x&&P(d,{code:Q.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}),u.dirty())}else if(f.kind==="email")j1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"email",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="emoji")Po||(Po=new RegExp(N1,"u")),Po.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"emoji",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="uuid")g1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"uuid",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="nanoid")b1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"nanoid",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid")x1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"cuid",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid2")y1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"cuid2",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="ulid")v1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"ulid",code:Q.invalid_string,message:f.message}),u.dirty());else if(f.kind==="url")try{new URL(l.data)}catch{d=this._getOrReturnCtx(l,d),P(d,{validation:"url",code:Q.invalid_string,message:f.message}),u.dirty()}else f.kind==="regex"?(f.regex.lastIndex=0,f.regex.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"regex",code:Q.invalid_string,message:f.message}),u.dirty())):f.kind==="trim"?l.data=l.data.trim():f.kind==="includes"?l.data.includes(f.value,f.position)||(d=this._getOrReturnCtx(l,d),P(d,{code:Q.invalid_string,validation:{includes:f.value,position:f.position},message:f.message}),u.dirty()):f.kind==="toLowerCase"?l.data=l.data.toLowerCase():f.kind==="toUpperCase"?l.data=l.data.toUpperCase():f.kind==="startsWith"?l.data.startsWith(f.value)||(d=this._getOrReturnCtx(l,d),P(d,{code:Q.invalid_string,validation:{startsWith:f.value},message:f.message}),u.dirty()):f.kind==="endsWith"?l.data.endsWith(f.value)||(d=this._getOrReturnCtx(l,d),P(d,{code:Q.invalid_string,validation:{endsWith:f.value},message:f.message}),u.dirty()):f.kind==="datetime"?M1(f).test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{code:Q.invalid_string,validation:"datetime",message:f.message}),u.dirty()):f.kind==="date"?T1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{code:Q.invalid_string,validation:"date",message:f.message}),u.dirty()):f.kind==="time"?O1(f).test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{code:Q.invalid_string,validation:"time",message:f.message}),u.dirty()):f.kind==="duration"?S1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"duration",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="ip"?D1(l.data,f.version)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"ip",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="jwt"?L1(l.data,f.alg)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"jwt",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="cidr"?U1(l.data,f.version)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"cidr",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="base64"?R1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"base64",code:Q.invalid_string,message:f.message}),u.dirty()):f.kind==="base64url"?C1.test(l.data)||(d=this._getOrReturnCtx(l,d),P(d,{validation:"base64url",code:Q.invalid_string,message:f.message}),u.dirty()):Ue.assertNever(f);return{status:u.value,value:l.data}}_regex(l,s,u){return this.refinement(d=>l.test(d),{validation:s,code:Q.invalid_string,...re.errToObj(u)})}_addCheck(l){return new Qa({...this._def,checks:[...this._def.checks,l]})}email(l){return this._addCheck({kind:"email",...re.errToObj(l)})}url(l){return this._addCheck({kind:"url",...re.errToObj(l)})}emoji(l){return this._addCheck({kind:"emoji",...re.errToObj(l)})}uuid(l){return this._addCheck({kind:"uuid",...re.errToObj(l)})}nanoid(l){return this._addCheck({kind:"nanoid",...re.errToObj(l)})}cuid(l){return this._addCheck({kind:"cuid",...re.errToObj(l)})}cuid2(l){return this._addCheck({kind:"cuid2",...re.errToObj(l)})}ulid(l){return this._addCheck({kind:"ulid",...re.errToObj(l)})}base64(l){return this._addCheck({kind:"base64",...re.errToObj(l)})}base64url(l){return this._addCheck({kind:"base64url",...re.errToObj(l)})}jwt(l){return this._addCheck({kind:"jwt",...re.errToObj(l)})}ip(l){return this._addCheck({kind:"ip",...re.errToObj(l)})}cidr(l){return this._addCheck({kind:"cidr",...re.errToObj(l)})}datetime(l){return typeof l=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:l}):this._addCheck({kind:"datetime",precision:typeof(l==null?void 0:l.precision)>"u"?null:l==null?void 0:l.precision,offset:(l==null?void 0:l.offset)??!1,local:(l==null?void 0:l.local)??!1,...re.errToObj(l==null?void 0:l.message)})}date(l){return this._addCheck({kind:"date",message:l})}time(l){return typeof l=="string"?this._addCheck({kind:"time",precision:null,message:l}):this._addCheck({kind:"time",precision:typeof(l==null?void 0:l.precision)>"u"?null:l==null?void 0:l.precision,...re.errToObj(l==null?void 0:l.message)})}duration(l){return this._addCheck({kind:"duration",...re.errToObj(l)})}regex(l,s){return this._addCheck({kind:"regex",regex:l,...re.errToObj(s)})}includes(l,s){return this._addCheck({kind:"includes",value:l,position:s==null?void 0:s.position,...re.errToObj(s==null?void 0:s.message)})}startsWith(l,s){return this._addCheck({kind:"startsWith",value:l,...re.errToObj(s)})}endsWith(l,s){return this._addCheck({kind:"endsWith",value:l,...re.errToObj(s)})}min(l,s){return this._addCheck({kind:"min",value:l,...re.errToObj(s)})}max(l,s){return this._addCheck({kind:"max",value:l,...re.errToObj(s)})}length(l,s){return this._addCheck({kind:"length",value:l,...re.errToObj(s)})}nonempty(l){return this.min(1,re.errToObj(l))}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(l=>l.kind==="datetime")}get isDate(){return!!this._def.checks.find(l=>l.kind==="date")}get isTime(){return!!this._def.checks.find(l=>l.kind==="time")}get isDuration(){return!!this._def.checks.find(l=>l.kind==="duration")}get isEmail(){return!!this._def.checks.find(l=>l.kind==="email")}get isURL(){return!!this._def.checks.find(l=>l.kind==="url")}get isEmoji(){return!!this._def.checks.find(l=>l.kind==="emoji")}get isUUID(){return!!this._def.checks.find(l=>l.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(l=>l.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(l=>l.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(l=>l.kind==="cuid2")}get isULID(){return!!this._def.checks.find(l=>l.kind==="ulid")}get isIP(){return!!this._def.checks.find(l=>l.kind==="ip")}get isCIDR(){return!!this._def.checks.find(l=>l.kind==="cidr")}get isBase64(){return!!this._def.checks.find(l=>l.kind==="base64")}get isBase64url(){return!!this._def.checks.find(l=>l.kind==="base64url")}get minLength(){let l=null;for(const s of this._def.checks)s.kind==="min"&&(l===null||s.value>l)&&(l=s.value);return l}get maxLength(){let l=null;for(const s of this._def.checks)s.kind==="max"&&(l===null||s.value<l)&&(l=s.value);return l}}Qa.create=n=>new Qa({checks:[],typeName:ye.ZodString,coerce:(n==null?void 0:n.coerce)??!1,...je(n)});function z1(n,l){const s=(n.toString().split(".")[1]||"").length,u=(l.toString().split(".")[1]||"").length,d=s>u?s:u,f=Number.parseInt(n.toFixed(d).replace(".","")),m=Number.parseInt(l.toFixed(d).replace(".",""));return f%m/10**d}class _l extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(l){if(this._def.coerce&&(l.data=Number(l.data)),this._getType(l)!==ae.number){const f=this._getOrReturnCtx(l);return P(f,{code:Q.invalid_type,expected:ae.number,received:f.parsedType}),pe}let u;const d=new qt;for(const f of this._def.checks)f.kind==="int"?Ue.isInteger(l.data)||(u=this._getOrReturnCtx(l,u),P(u,{code:Q.invalid_type,expected:"integer",received:"float",message:f.message}),d.dirty()):f.kind==="min"?(f.inclusive?l.data<f.value:l.data<=f.value)&&(u=this._getOrReturnCtx(l,u),P(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?l.data>f.value:l.data>=f.value)&&(u=this._getOrReturnCtx(l,u),P(u,{code:Q.too_big,maximum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),d.dirty()):f.kind==="multipleOf"?z1(l.data,f.value)!==0&&(u=this._getOrReturnCtx(l,u),P(u,{code:Q.not_multiple_of,multipleOf:f.value,message:f.message}),d.dirty()):f.kind==="finite"?Number.isFinite(l.data)||(u=this._getOrReturnCtx(l,u),P(u,{code:Q.not_finite,message:f.message}),d.dirty()):Ue.assertNever(f);return{status:d.value,value:l.data}}gte(l,s){return this.setLimit("min",l,!0,re.toString(s))}gt(l,s){return this.setLimit("min",l,!1,re.toString(s))}lte(l,s){return this.setLimit("max",l,!0,re.toString(s))}lt(l,s){return this.setLimit("max",l,!1,re.toString(s))}setLimit(l,s,u,d){return new _l({...this._def,checks:[...this._def.checks,{kind:l,value:s,inclusive:u,message:re.toString(d)}]})}_addCheck(l){return new _l({...this._def,checks:[...this._def.checks,l]})}int(l){return this._addCheck({kind:"int",message:re.toString(l)})}positive(l){return this._addCheck({kind:"min",value:0,inclusive:!1,message:re.toString(l)})}negative(l){return this._addCheck({kind:"max",value:0,inclusive:!1,message:re.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:0,inclusive:!0,message:re.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:0,inclusive:!0,message:re.toString(l)})}multipleOf(l,s){return this._addCheck({kind:"multipleOf",value:l,message:re.toString(s)})}finite(l){return this._addCheck({kind:"finite",message:re.toString(l)})}safe(l){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:re.toString(l)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:re.toString(l)})}get minValue(){let l=null;for(const s of this._def.checks)s.kind==="min"&&(l===null||s.value>l)&&(l=s.value);return l}get maxValue(){let l=null;for(const s of this._def.checks)s.kind==="max"&&(l===null||s.value<l)&&(l=s.value);return l}get isInt(){return!!this._def.checks.find(l=>l.kind==="int"||l.kind==="multipleOf"&&Ue.isInteger(l.value))}get isFinite(){let l=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"&&(l===null||u.value<l)&&(l=u.value)}return Number.isFinite(s)&&Number.isFinite(l)}}_l.create=n=>new _l({checks:[],typeName:ye.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...je(n)});class Al extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(l){if(this._def.coerce)try{l.data=BigInt(l.data)}catch{return this._getInvalidInput(l)}if(this._getType(l)!==ae.bigint)return this._getInvalidInput(l);let u;const d=new qt;for(const f of this._def.checks)f.kind==="min"?(f.inclusive?l.data<f.value:l.data<=f.value)&&(u=this._getOrReturnCtx(l,u),P(u,{code:Q.too_small,type:"bigint",minimum:f.value,inclusive:f.inclusive,message:f.message}),d.dirty()):f.kind==="max"?(f.inclusive?l.data>f.value:l.data>=f.value)&&(u=this._getOrReturnCtx(l,u),P(u,{code:Q.too_big,type:"bigint",maximum:f.value,inclusive:f.inclusive,message:f.message}),d.dirty()):f.kind==="multipleOf"?l.data%f.value!==BigInt(0)&&(u=this._getOrReturnCtx(l,u),P(u,{code:Q.not_multiple_of,multipleOf:f.value,message:f.message}),d.dirty()):Ue.assertNever(f);return{status:d.value,value:l.data}}_getInvalidInput(l){const s=this._getOrReturnCtx(l);return P(s,{code:Q.invalid_type,expected:ae.bigint,received:s.parsedType}),pe}gte(l,s){return this.setLimit("min",l,!0,re.toString(s))}gt(l,s){return this.setLimit("min",l,!1,re.toString(s))}lte(l,s){return this.setLimit("max",l,!0,re.toString(s))}lt(l,s){return this.setLimit("max",l,!1,re.toString(s))}setLimit(l,s,u,d){return new Al({...this._def,checks:[...this._def.checks,{kind:l,value:s,inclusive:u,message:re.toString(d)}]})}_addCheck(l){return new Al({...this._def,checks:[...this._def.checks,l]})}positive(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:re.toString(l)})}negative(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:re.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:re.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:re.toString(l)})}multipleOf(l,s){return this._addCheck({kind:"multipleOf",value:l,message:re.toString(s)})}get minValue(){let l=null;for(const s of this._def.checks)s.kind==="min"&&(l===null||s.value>l)&&(l=s.value);return l}get maxValue(){let l=null;for(const s of this._def.checks)s.kind==="max"&&(l===null||s.value<l)&&(l=s.value);return l}}Al.create=n=>new Al({checks:[],typeName:ye.ZodBigInt,coerce:(n==null?void 0:n.coerce)??!1,...je(n)});class uu extends Ce{_parse(l){if(this._def.coerce&&(l.data=!!l.data),this._getType(l)!==ae.boolean){const u=this._getOrReturnCtx(l);return P(u,{code:Q.invalid_type,expected:ae.boolean,received:u.parsedType}),pe}return Aa(l.data)}}uu.create=n=>new uu({typeName:ye.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...je(n)});class _i extends Ce{_parse(l){if(this._def.coerce&&(l.data=new Date(l.data)),this._getType(l)!==ae.date){const f=this._getOrReturnCtx(l);return P(f,{code:Q.invalid_type,expected:ae.date,received:f.parsedType}),pe}if(Number.isNaN(l.data.getTime())){const f=this._getOrReturnCtx(l);return P(f,{code:Q.invalid_date}),pe}const u=new qt;let d;for(const f of this._def.checks)f.kind==="min"?l.data.getTime()<f.value&&(d=this._getOrReturnCtx(l,d),P(d,{code:Q.too_small,message:f.message,inclusive:!0,exact:!1,minimum:f.value,type:"date"}),u.dirty()):f.kind==="max"?l.data.getTime()>f.value&&(d=this._getOrReturnCtx(l,d),P(d,{code:Q.too_big,message:f.message,inclusive:!0,exact:!1,maximum:f.value,type:"date"}),u.dirty()):Ue.assertNever(f);return{status:u.value,value:new Date(l.data.getTime())}}_addCheck(l){return new _i({...this._def,checks:[...this._def.checks,l]})}min(l,s){return this._addCheck({kind:"min",value:l.getTime(),message:re.toString(s)})}max(l,s){return this._addCheck({kind:"max",value:l.getTime(),message:re.toString(s)})}get minDate(){let l=null;for(const s of this._def.checks)s.kind==="min"&&(l===null||s.value>l)&&(l=s.value);return l!=null?new Date(l):null}get maxDate(){let l=null;for(const s of this._def.checks)s.kind==="max"&&(l===null||s.value<l)&&(l=s.value);return l!=null?new Date(l):null}}_i.create=n=>new _i({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:ye.ZodDate,...je(n)});class mx extends Ce{_parse(l){if(this._getType(l)!==ae.symbol){const u=this._getOrReturnCtx(l);return P(u,{code:Q.invalid_type,expected:ae.symbol,received:u.parsedType}),pe}return Aa(l.data)}}mx.create=n=>new mx({typeName:ye.ZodSymbol,...je(n)});class gd extends Ce{_parse(l){if(this._getType(l)!==ae.undefined){const u=this._getOrReturnCtx(l);return P(u,{code:Q.invalid_type,expected:ae.undefined,received:u.parsedType}),pe}return Aa(l.data)}}gd.create=n=>new gd({typeName:ye.ZodUndefined,...je(n)});class bd extends Ce{_parse(l){if(this._getType(l)!==ae.null){const u=this._getOrReturnCtx(l);return P(u,{code:Q.invalid_type,expected:ae.null,received:u.parsedType}),pe}return Aa(l.data)}}bd.create=n=>new bd({typeName:ye.ZodNull,...je(n)});class px extends Ce{constructor(){super(...arguments),this._any=!0}_parse(l){return Aa(l.data)}}px.create=n=>new px({typeName:ye.ZodAny,...je(n)});class wd extends Ce{constructor(){super(...arguments),this._unknown=!0}_parse(l){return Aa(l.data)}}wd.create=n=>new wd({typeName:ye.ZodUnknown,...je(n)});class al extends Ce{_parse(l){const s=this._getOrReturnCtx(l);return P(s,{code:Q.invalid_type,expected:ae.never,received:s.parsedType}),pe}}al.create=n=>new al({typeName:ye.ZodNever,...je(n)});class xx extends Ce{_parse(l){if(this._getType(l)!==ae.undefined){const u=this._getOrReturnCtx(l);return P(u,{code:Q.invalid_type,expected:ae.void,received:u.parsedType}),pe}return Aa(l.data)}}xx.create=n=>new xx({typeName:ye.ZodVoid,...je(n)});class Ka extends Ce{_parse(l){const{ctx:s,status:u}=this._processInputParams(l),d=this._def;if(s.parsedType!==ae.array)return P(s,{code:Q.invalid_type,expected:ae.array,received:s.parsedType}),pe;if(d.exactLength!==null){const m=s.data.length>d.exactLength.value,x=s.data.length<d.exactLength.value;(m||x)&&(P(s,{code:m?Q.too_big:Q.too_small,minimum:x?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&&(P(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&&(P(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,x)=>d.type._parseAsync(new Ja(s,m,s.path,x)))).then(m=>qt.mergeArray(u,m));const f=[...s.data].map((m,x)=>d.type._parseSync(new Ja(s,m,s.path,x)));return qt.mergeArray(u,f)}get element(){return this._def.type}min(l,s){return new Ka({...this._def,minLength:{value:l,message:re.toString(s)}})}max(l,s){return new Ka({...this._def,maxLength:{value:l,message:re.toString(s)}})}length(l,s){return new Ka({...this._def,exactLength:{value:l,message:re.toString(s)}})}nonempty(l){return this.min(1,l)}}Ka.create=(n,l)=>new Ka({type:n,minLength:null,maxLength:null,exactLength:null,typeName:ye.ZodArray,...je(l)});function wi(n){if(n instanceof yt){const l={};for(const s in n.shape){const u=n.shape[s];l[s]=bn.create(wi(u))}return new yt({...n._def,shape:()=>l})}else return n instanceof Ka?new Ka({...n._def,type:wi(n.element)}):n instanceof bn?bn.create(wi(n.unwrap())):n instanceof Cl?Cl.create(wi(n.unwrap())):n instanceof El?El.create(n.items.map(l=>wi(l))):n}class yt extends Ce{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const l=this._def.shape(),s=Ue.objectKeys(l);return this._cached={shape:l,keys:s},this._cached}_parse(l){if(this._getType(l)!==ae.object){const g=this._getOrReturnCtx(l);return P(g,{code:Q.invalid_type,expected:ae.object,received:g.parsedType}),pe}const{status:u,ctx:d}=this._processInputParams(l),{shape:f,keys:m}=this._getCached(),x=[];if(!(this._def.catchall instanceof al&&this._def.unknownKeys==="strip"))for(const g in d.data)m.includes(g)||x.push(g);const y=[];for(const g of m){const b=f[g],N=d.data[g];y.push({key:{status:"valid",value:g},value:b._parse(new Ja(d,N,d.path,g)),alwaysSet:g in d.data})}if(this._def.catchall instanceof al){const g=this._def.unknownKeys;if(g==="passthrough")for(const b of x)y.push({key:{status:"valid",value:b},value:{status:"valid",value:d.data[b]}});else if(g==="strict")x.length>0&&(P(d,{code:Q.unrecognized_keys,keys:x}),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 x){const N=d.data[b];y.push({key:{status:"valid",value:b},value:g._parse(new Ja(d,N,d.path,b)),alwaysSet:b in d.data})}}return d.common.async?Promise.resolve().then(async()=>{const g=[];for(const b of y){const N=await b.key,L=await b.value;g.push({key:N,value:L,alwaysSet:b.alwaysSet})}return g}).then(g=>qt.mergeObjectSync(u,g)):qt.mergeObjectSync(u,y)}get shape(){return this._def.shape()}strict(l){return re.errToObj,new yt({...this._def,unknownKeys:"strict",...l!==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:re.errToObj(l).message??d}:{message:d}}}:{}})}strip(){return new yt({...this._def,unknownKeys:"strip"})}passthrough(){return new yt({...this._def,unknownKeys:"passthrough"})}extend(l){return new yt({...this._def,shape:()=>({...this._def.shape(),...l})})}merge(l){return new yt({unknownKeys:l._def.unknownKeys,catchall:l._def.catchall,shape:()=>({...this._def.shape(),...l._def.shape()}),typeName:ye.ZodObject})}setKey(l,s){return this.augment({[l]:s})}catchall(l){return new yt({...this._def,catchall:l})}pick(l){const s={};for(const u of Ue.objectKeys(l))l[u]&&this.shape[u]&&(s[u]=this.shape[u]);return new yt({...this._def,shape:()=>s})}omit(l){const s={};for(const u of Ue.objectKeys(this.shape))l[u]||(s[u]=this.shape[u]);return new yt({...this._def,shape:()=>s})}deepPartial(){return wi(this)}partial(l){const s={};for(const u of Ue.objectKeys(this.shape)){const d=this.shape[u];l&&!l[u]?s[u]=d:s[u]=d.optional()}return new yt({...this._def,shape:()=>s})}required(l){const s={};for(const u of Ue.objectKeys(this.shape))if(l&&!l[u])s[u]=this.shape[u];else{let f=this.shape[u];for(;f instanceof bn;)f=f._def.innerType;s[u]=f}return new yt({...this._def,shape:()=>s})}keyof(){return wy(Ue.objectKeys(this.shape))}}yt.create=(n,l)=>new yt({shape:()=>n,unknownKeys:"strip",catchall:al.create(),typeName:ye.ZodObject,...je(l)});yt.strictCreate=(n,l)=>new yt({shape:()=>n,unknownKeys:"strict",catchall:al.create(),typeName:ye.ZodObject,...je(l)});yt.lazycreate=(n,l)=>new yt({shape:n,unknownKeys:"strip",catchall:al.create(),typeName:ye.ZodObject,...je(l)});class cu extends Ce{_parse(l){const{ctx:s}=this._processInputParams(l),u=this._def.options;function d(f){for(const x of f)if(x.result.status==="valid")return x.result;for(const x of f)if(x.result.status==="dirty")return s.common.issues.push(...x.ctx.common.issues),x.result;const m=f.map(x=>new Sn(x.ctx.common.issues));return P(s,{code:Q.invalid_union,unionErrors:m}),pe}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 y of u){const g={...s,common:{...s.common,issues:[]},parent:null},b=y._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 x=m.map(y=>new Sn(y));return P(s,{code:Q.invalid_union,unionErrors:x}),pe}}get options(){return this._def.options}}cu.create=(n,l)=>new cu({options:n,typeName:ye.ZodUnion,...je(l)});const gn=n=>n instanceof jd?gn(n.schema):n instanceof Rl?gn(n.innerType()):n instanceof fu?[n.value]:n instanceof kl?n.options:n instanceof Nd?Ue.objectValues(n.enum):n instanceof mu?gn(n._def.innerType):n instanceof gd?[void 0]:n instanceof bd?[null]:n instanceof bn?[void 0,...gn(n.unwrap())]:n instanceof Cl?[null,...gn(n.unwrap())]:n instanceof Sy||n instanceof xu?gn(n.unwrap()):n instanceof pu?gn(n._def.innerType):[];class Vd extends Ce{_parse(l){const{ctx:s}=this._processInputParams(l);if(s.parsedType!==ae.object)return P(s,{code:Q.invalid_type,expected:ae.object,received:s.parsedType}),pe;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}):(P(s,{code:Q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[u]}),pe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(l,s,u){const d=new Map;for(const f of s){const m=gn(f.shape[l]);if(!m.length)throw new Error(`A discriminator value for key \`${l}\` could not be extracted from all schema options`);for(const x of m){if(d.has(x))throw new Error(`Discriminator property ${String(l)} has duplicate value ${String(x)}`);d.set(x,f)}}return new Vd({typeName:ye.ZodDiscriminatedUnion,discriminator:l,options:s,optionsMap:d,...je(u)})}}function Sd(n,l){const s=Pn(n),u=Pn(l);if(n===l)return{valid:!0,data:n};if(s===ae.object&&u===ae.object){const d=Ue.objectKeys(l),f=Ue.objectKeys(n).filter(x=>d.indexOf(x)!==-1),m={...n,...l};for(const x of f){const y=Sd(n[x],l[x]);if(!y.valid)return{valid:!1};m[x]=y.data}return{valid:!0,data:m}}else if(s===ae.array&&u===ae.array){if(n.length!==l.length)return{valid:!1};const d=[];for(let f=0;f<n.length;f++){const m=n[f],x=l[f],y=Sd(m,x);if(!y.valid)return{valid:!1};d.push(y.data)}return{valid:!0,data:d}}else return s===ae.date&&u===ae.date&&+n==+l?{valid:!0,data:n}:{valid:!1}}class ou extends Ce{_parse(l){const{status:s,ctx:u}=this._processInputParams(l),d=(f,m)=>{if(dx(f)||dx(m))return pe;const x=Sd(f.value,m.value);return x.valid?((fx(f)||fx(m))&&s.dirty(),{status:s.value,value:x.data}):(P(u,{code:Q.invalid_intersection_types}),pe)};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}))}}ou.create=(n,l,s)=>new ou({left:n,right:l,typeName:ye.ZodIntersection,...je(s)});class El extends Ce{_parse(l){const{status:s,ctx:u}=this._processInputParams(l);if(u.parsedType!==ae.array)return P(u,{code:Q.invalid_type,expected:ae.array,received:u.parsedType}),pe;if(u.data.length<this._def.items.length)return P(u,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),pe;!this._def.rest&&u.data.length>this._def.items.length&&(P(u,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());const f=[...u.data].map((m,x)=>{const y=this._def.items[x]||this._def.rest;return y?y._parse(new Ja(u,m,u.path,x)):null}).filter(m=>!!m);return u.common.async?Promise.all(f).then(m=>qt.mergeArray(s,m)):qt.mergeArray(s,f)}get items(){return this._def.items}rest(l){return new El({...this._def,rest:l})}}El.create=(n,l)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new El({items:n,typeName:ye.ZodTuple,rest:null,...je(l)})};class du extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(l){const{status:s,ctx:u}=this._processInputParams(l);if(u.parsedType!==ae.object)return P(u,{code:Q.invalid_type,expected:ae.object,received:u.parsedType}),pe;const d=[],f=this._def.keyType,m=this._def.valueType;for(const x in u.data)d.push({key:f._parse(new Ja(u,x,u.path,x)),value:m._parse(new Ja(u,u.data[x],u.path,x)),alwaysSet:x in u.data});return u.common.async?qt.mergeObjectAsync(s,d):qt.mergeObjectSync(s,d)}get element(){return this._def.valueType}static create(l,s,u){return s instanceof Ce?new du({keyType:l,valueType:s,typeName:ye.ZodRecord,...je(u)}):new du({keyType:Qa.create(),valueType:l,typeName:ye.ZodRecord,...je(s)})}}class yx extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(l){const{status:s,ctx:u}=this._processInputParams(l);if(u.parsedType!==ae.map)return P(u,{code:Q.invalid_type,expected:ae.map,received:u.parsedType}),pe;const d=this._def.keyType,f=this._def.valueType,m=[...u.data.entries()].map(([x,y],g)=>({key:d._parse(new Ja(u,x,u.path,[g,"key"])),value:f._parse(new Ja(u,y,u.path,[g,"value"]))}));if(u.common.async){const x=new Map;return Promise.resolve().then(async()=>{for(const y of m){const g=await y.key,b=await y.value;if(g.status==="aborted"||b.status==="aborted")return pe;(g.status==="dirty"||b.status==="dirty")&&s.dirty(),x.set(g.value,b.value)}return{status:s.value,value:x}})}else{const x=new Map;for(const y of m){const g=y.key,b=y.value;if(g.status==="aborted"||b.status==="aborted")return pe;(g.status==="dirty"||b.status==="dirty")&&s.dirty(),x.set(g.value,b.value)}return{status:s.value,value:x}}}}yx.create=(n,l,s)=>new yx({valueType:l,keyType:n,typeName:ye.ZodMap,...je(s)});class Rs extends Ce{_parse(l){const{status:s,ctx:u}=this._processInputParams(l);if(u.parsedType!==ae.set)return P(u,{code:Q.invalid_type,expected:ae.set,received:u.parsedType}),pe;const d=this._def;d.minSize!==null&&u.data.size<d.minSize.value&&(P(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&&(P(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(y){const g=new Set;for(const b of y){if(b.status==="aborted")return pe;b.status==="dirty"&&s.dirty(),g.add(b.value)}return{status:s.value,value:g}}const x=[...u.data.values()].map((y,g)=>f._parse(new Ja(u,y,u.path,g)));return u.common.async?Promise.all(x).then(y=>m(y)):m(x)}min(l,s){return new Rs({...this._def,minSize:{value:l,message:re.toString(s)}})}max(l,s){return new Rs({...this._def,maxSize:{value:l,message:re.toString(s)}})}size(l,s){return this.min(l,s).max(l,s)}nonempty(l){return this.min(1,l)}}Rs.create=(n,l)=>new Rs({valueType:n,minSize:null,maxSize:null,typeName:ye.ZodSet,...je(l)});class jd extends Ce{get schema(){return this._def.getter()}_parse(l){const{ctx:s}=this._processInputParams(l);return this._def.getter()._parse({data:s.data,path:s.path,parent:s})}}jd.create=(n,l)=>new jd({getter:n,typeName:ye.ZodLazy,...je(l)});class fu extends Ce{_parse(l){if(l.data!==this._def.value){const s=this._getOrReturnCtx(l);return P(s,{received:s.data,code:Q.invalid_literal,expected:this._def.value}),pe}return{status:"valid",value:l.data}}get value(){return this._def.value}}fu.create=(n,l)=>new fu({value:n,typeName:ye.ZodLiteral,...je(l)});function wy(n,l){return new kl({values:n,typeName:ye.ZodEnum,...je(l)})}class kl extends Ce{_parse(l){if(typeof l.data!="string"){const s=this._getOrReturnCtx(l),u=this._def.values;return P(s,{expected:Ue.joinValues(u),received:s.parsedType,code:Q.invalid_type}),pe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(l.data)){const s=this._getOrReturnCtx(l),u=this._def.values;return P(s,{received:s.data,code:Q.invalid_enum_value,options:u}),pe}return Aa(l.data)}get options(){return this._def.values}get enum(){const l={};for(const s of this._def.values)l[s]=s;return l}get Values(){const l={};for(const s of this._def.values)l[s]=s;return l}get Enum(){const l={};for(const s of this._def.values)l[s]=s;return l}extract(l,s=this._def){return kl.create(l,{...this._def,...s})}exclude(l,s=this._def){return kl.create(this.options.filter(u=>!l.includes(u)),{...this._def,...s})}}kl.create=wy;class Nd extends Ce{_parse(l){const s=Ue.getValidEnumValues(this._def.values),u=this._getOrReturnCtx(l);if(u.parsedType!==ae.string&&u.parsedType!==ae.number){const d=Ue.objectValues(s);return P(u,{expected:Ue.joinValues(d),received:u.parsedType,code:Q.invalid_type}),pe}if(this._cache||(this._cache=new Set(Ue.getValidEnumValues(this._def.values))),!this._cache.has(l.data)){const d=Ue.objectValues(s);return P(u,{received:u.data,code:Q.invalid_enum_value,options:d}),pe}return Aa(l.data)}get enum(){return this._def.values}}Nd.create=(n,l)=>new Nd({values:n,typeName:ye.ZodNativeEnum,...je(l)});class hu extends Ce{unwrap(){return this._def.type}_parse(l){const{ctx:s}=this._processInputParams(l);if(s.parsedType!==ae.promise&&s.common.async===!1)return P(s,{code:Q.invalid_type,expected:ae.promise,received:s.parsedType}),pe;const u=s.parsedType===ae.promise?s.data:Promise.resolve(s.data);return Aa(u.then(d=>this._def.type.parseAsync(d,{path:s.path,errorMap:s.common.contextualErrorMap})))}}hu.create=(n,l)=>new hu({type:n,typeName:ye.ZodPromise,...je(l)});class Rl extends Ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ye.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(l){const{status:s,ctx:u}=this._processInputParams(l),d=this._def.effect||null,f={addIssue:m=>{P(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 x=>{if(s.value==="aborted")return pe;const y=await this._def.schema._parseAsync({data:x,path:u.path,parent:u});return y.status==="aborted"?pe:y.status==="dirty"||s.value==="dirty"?Ss(y.value):y});{if(s.value==="aborted")return pe;const x=this._def.schema._parseSync({data:m,path:u.path,parent:u});return x.status==="aborted"?pe:x.status==="dirty"||s.value==="dirty"?Ss(x.value):x}}if(d.type==="refinement"){const m=x=>{const y=d.refinement(x,f);if(u.common.async)return Promise.resolve(y);if(y instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return x};if(u.common.async===!1){const x=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});return x.status==="aborted"?pe:(x.status==="dirty"&&s.dirty(),m(x.value),{status:s.value,value:x.value})}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(x=>x.status==="aborted"?pe:(x.status==="dirty"&&s.dirty(),m(x.value).then(()=>({status:s.value,value:x.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(!Ni(m))return pe;const x=d.transform(m.value,f);if(x instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:x}}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(m=>Ni(m)?Promise.resolve(d.transform(m.value,f)).then(x=>({status:s.value,value:x})):pe);Ue.assertNever(d)}}Rl.create=(n,l,s)=>new Rl({schema:n,typeName:ye.ZodEffects,effect:l,...je(s)});Rl.createWithPreprocess=(n,l,s)=>new Rl({schema:l,effect:{type:"preprocess",transform:n},typeName:ye.ZodEffects,...je(s)});class bn extends Ce{_parse(l){return this._getType(l)===ae.undefined?Aa(void 0):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}bn.create=(n,l)=>new bn({innerType:n,typeName:ye.ZodOptional,...je(l)});class Cl extends Ce{_parse(l){return this._getType(l)===ae.null?Aa(null):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}Cl.create=(n,l)=>new Cl({innerType:n,typeName:ye.ZodNullable,...je(l)});class mu extends Ce{_parse(l){const{ctx:s}=this._processInputParams(l);let u=s.data;return s.parsedType===ae.undefined&&(u=this._def.defaultValue()),this._def.innerType._parse({data:u,path:s.path,parent:s})}removeDefault(){return this._def.innerType}}mu.create=(n,l)=>new mu({innerType:n,typeName:ye.ZodDefault,defaultValue:typeof l.default=="function"?l.default:()=>l.default,...je(l)});class pu extends Ce{_parse(l){const{ctx:s}=this._processInputParams(l),u={...s,common:{...s.common,issues:[]}},d=this._def.innerType._parse({data:u.data,path:u.path,parent:{...u}});return ru(d)?d.then(f=>({status:"valid",value:f.status==="valid"?f.value:this._def.catchValue({get error(){return new Sn(u.common.issues)},input:u.data})})):{status:"valid",value:d.status==="valid"?d.value:this._def.catchValue({get error(){return new Sn(u.common.issues)},input:u.data})}}removeCatch(){return this._def.innerType}}pu.create=(n,l)=>new pu({innerType:n,typeName:ye.ZodCatch,catchValue:typeof l.catch=="function"?l.catch:()=>l.catch,...je(l)});class vx extends Ce{_parse(l){if(this._getType(l)!==ae.nan){const u=this._getOrReturnCtx(l);return P(u,{code:Q.invalid_type,expected:ae.nan,received:u.parsedType}),pe}return{status:"valid",value:l.data}}}vx.create=n=>new vx({typeName:ye.ZodNaN,...je(n)});class Sy extends Ce{_parse(l){const{ctx:s}=this._processInputParams(l),u=s.data;return this._def.type._parse({data:u,path:s.path,parent:s})}unwrap(){return this._def.type}}class Zd extends Ce{_parse(l){const{status:s,ctx:u}=this._processInputParams(l);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"?pe:f.status==="dirty"?(s.dirty(),Ss(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"?pe:d.status==="dirty"?(s.dirty(),{status:"dirty",value:d.value}):this._def.out._parseSync({data:d.value,path:u.path,parent:u})}}static create(l,s){return new Zd({in:l,out:s,typeName:ye.ZodPipeline})}}class xu extends Ce{_parse(l){const s=this._def.innerType._parse(l),u=d=>(Ni(d)&&(d.value=Object.freeze(d.value)),d);return ru(s)?s.then(d=>u(d)):u(s)}unwrap(){return this._def.innerType}}xu.create=(n,l)=>new xu({innerType:n,typeName:ye.ZodReadonly,...je(l)});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=_l.create;Al.create;const He=uu.create;_i.create;const jy=wd.create;al.create;const ne=Ka.create,H=yt.create,B1=cu.create,Ny=Vd.create;ou.create;El.create;const Cs=du.create,ja=fu.create,de=kl.create;hu.create;bn.create;Cl.create;const gx={string:(n=>Qa.create({...n,coerce:!0})),number:(n=>_l.create({...n,coerce:!0})),boolean:(n=>uu.create({...n,coerce:!0})),bigint:(n=>Al.create({...n,coerce:!0})),date:(n=>_i.create({...n,coerce:!0}))},q1=pe,H1=p().regex(/^github\.com\/[^/]+\/[^/]+$/,"Expected github.com/<owner>/<repo>"),$1=/^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?$/;function Y1(n){const l=n.trim();return l?!!(l.startsWith("/")||l.startsWith("~")||l.startsWith(".")||/^[A-Za-z]:[\\/]/.test(l)||l.startsWith("\\\\")):!1}function Gd(n){const l=n.trim();if(!l)throw new Error("Repository is required");if(Y1(l))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=$1.exec(l);if(d&&!l.includes("://")&&!l.toLowerCase().includes("github.com"))s=d[1],u=d[2];else{let m=l;/^[a-z][a-z0-9+.-]*:\/\//i.test(m)||(m.startsWith("git@")?m=m.replace(/^git@([^:]+):/,"https://$1/"):m=`https://${m}`);let x;try{x=new URL(m)}catch{throw new Error(`Unrecognized GitHub repository reference: ${n}`)}if(!/^([^.]+\.)?github\.com$/i.test(x.hostname))throw new Error(`Only github.com repositories are supported (got host ${x.hostname})`);const y=x.pathname.replace(/^\/+|\/+$/g,"").split("/");if(y.length<2||!y[0]||!y[1])throw new Error(`Unrecognized GitHub repository reference: ${n}`);s=y[0],u=y[1].replace(/\.git$/i,"")}if(!s||!u||s.includes("..")||u.includes(".."))throw new Error(`Unrecognized GitHub repository reference: ${n}`);const f=H1.parse(`github.com/${s}/${u}`);return{owner:s,repo:u,identity:f,cloneUrl:`https://github.com/${s}/${u}.git`}}const _y=p().min(1).transform((n,l)=>{try{return Gd(n).identity}catch(s){return l.addIssue({code:Q.custom,message:s.message}),q1}}),Ay="repo:",V1=de(["resolved","unresolved","conflict","invalid"]),Z1=H({status:V1,repository:p().optional(),sourceLabel:p().optional(),labels:ne(p()).optional(),error:p().optional()});function G1(n){return n?n.filter(l=>l.toLowerCase().startsWith(Ay)):[]}const Q1=100,X1=H({label:p(),repository:p()});H({mappings:ne(X1).max(Q1+1)});function Ey(n){const l=G1(n);if(l.length===0)return{status:"unresolved",labels:[]};if(l.length>1)return{status:"conflict",labels:[...l]};const s=l[0],u=s.slice(Ay.length).trim();if(!u)return{status:"invalid",labels:[s],error:"Repository label has no value"};try{return{status:"resolved",repository:Gd(u).identity,sourceLabel:s,labels:[s]}}catch(d){return{status:"invalid",labels:[s],error:d.message}}}const Ht=de(["claude_code","cursor_local","codex_local","muse_code"]),Ba=H({maxTurns:E().positive().nullable().optional(),maxBudgetUsd:E().positive().nullable().optional()}),ky=H({plan:Ba.optional(),execute:Ba.optional(),reflect:Ba.optional()});function iu(n){if(!(n!=null&&n.trim()))return null;try{const l=Ba.parse(JSON.parse(n));return l.maxTurns==null&&l.maxBudgetUsd==null?null:l}catch{return null}}function K1(n){return!n||n.maxTurns==null&&n.maxBudgetUsd==null?null:JSON.stringify(n)}const Qd=de(["developer","reviewer","legacy"]),J1=de(["queued","running","done","failed","timed_out","cancelled"]);H({id:p().uuid(),issueId:p().uuid(),role:Qd,round:E().int().min(1),agentId:p().uuid().nullable(),runtime:Ht.nullable(),model:p().nullable(),budgetJson:p().nullable(),worktreePath:p().nullable(),inputSha:p().nullable(),status:J1,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(),deckCorrelationId:p().uuid().nullable(),createdAt:p(),startedAt:p().nullable(),heartbeatAt:p().nullable(),completedAt:p().nullable(),updatedAt:p()});H({issueId:p().uuid(),role:Qd,round:E().int().min(1),agentId:p().uuid().nullable(),runtime:Ht.nullable(),model:p().nullable().optional(),budgetJson:p().nullable().optional(),inputSha:p().nullable().optional(),metadataJson:p().nullable().optional(),profileSnapshotJson:p().nullable().optional()});const I1=H({worktreeWrite:He(),publishReview:He(),outboundMutation:He(),resolveHumanAction:He()}),Ry=H({worktreeWrite:He().optional(),outboundMutation:He().optional()}).strict(),_u=de(["low","medium","high"]);H({version:ja(1),agentId:p().nullable(),role:Qd,runtime:Ht.nullable(),model:p().nullable(),effort:_u.nullable().default(null),budgetJson:p().nullable(),permissionPolicy:I1,deckId:p().nullable(),purpose:p().nullable(),capturedAt:p()});const Cy="auto",F1="muse-spark-1.3-contributor",W1=H({code:de(["cli_missing","runtime_auth","runtime_unknown","runtime_capability","cursor_keychain","usage_capped","deck_offline","deck_unauthorized","workspace_missing","deck_missing","mcp_not_registered","github_cli_missing","github_auth","github_unreachable"]),message:p()}),P1=H({id:p().uuid(),name:p(),runtime:Ht,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:_u.nullable(),defaultBudgetJson:p().nullable(),purpose:p().nullable(),playbookIdsJson:p().nullable(),externalMemoryRefsJson:p().nullable(),permissionPolicyJson:p().nullable(),isBuiltin:He(),createdAt:p(),updatedAt:p()}),Ty=P1.extend({healthy:He(),issues:ne(W1)});H({name:p().min(1),runtime:Ht,deckId:p().uuid(),defaultModel:p().nullable().optional(),defaultEffort:_u.nullable().optional(),defaultBudget:Ba.nullable().optional(),purpose:p().nullable().optional(),permissionPolicy:Ry.nullable().optional()});H({name:p().min(1).optional(),runtime:Ht.optional(),deckId:p().uuid().nullable().optional(),defaultModel:p().nullable().optional(),defaultEffort:_u.nullable().optional(),defaultBudget:Ba.nullable().optional(),purpose:p().nullable().optional(),permissionPolicy:Ry.nullable().optional()});H({agents:ne(Ty),issueCount:E()});function bx(n){return n.defaultModel??n.defaultExecuteModel??n.defaultPlanModel??null}function ew(n){const l=iu(n.defaultBudgetJson)??iu(n.defaultExecuteBudgetJson)??iu(n.defaultPlanBudgetJson);return K1(l)}const tw=de(["slack_message","email","service_tool_call"]),aw=H({target:p().min(1).max(120),body:p().min(1).max(4e3)}),nw=H({serviceName:p().min(1).max(120),toolName:p().min(1).max(120),arguments:Cs(jy())}),lw=H({actionType:tw,summary:aw,toolCall:nw}),iw=de(["pending","sent","rejected"]);H({draft:lw,status:iw,sentAt:p().optional(),rejectedAt:p().optional(),bodyMismatch:He().optional(),deliveryAttempts:E().int().min(0).default(0)});H({draftArtifactId:p().uuid(),sentAt:p(),toolResult:Cs(jy()),permalink:p().url().optional()});const sw=H({failure_summary:p().min(1),user_feedback_excerpt:p().min(1),corrected_output_hint:p().optional()}),rw=Ny("op",[H({op:ja("add_item"),section:p().min(1),text:p().min(1)}),H({op:ja("amend_item"),section:p().min(1),anchor:p().min(1),text:p().min(1)}),H({op:ja("remove_item"),section:p().min(1),anchor:p().min(1)}),H({op:ja("set_triggers"),triggers:ne(p())}),H({op:ja("rewrite_body"),text:p()})]);H({rationale:p().min(1),ops:ne(rw).min(1),evidence:sw.optional()});const uw="v1",Oy=de(["feature","bug fix","refactor","investigation","split child"]);Oy.options;const cw=H({text:p(),evidence:p().nullable()}),ow=H({version:ja(uw),executionMode:Oy,nonGoals:ne(p()),exitPredicate:p(),onePrStoppingPoint:p(),acceptanceCriteria:ne(cw)}),My={executionMode:"Builder execution mode",nonGoals:"Non-goals",exitPredicate:"Exit predicate",onePrStoppingPoint:"One-PR stopping point",acceptanceCriteria:"Acceptance criteria"},dw=Object.keys(My);function fw(n){return n.trim().toLowerCase().replace(/[-_]+/g," ").replace(/\s+/g," ").trim()}Object.fromEntries(dw.map(n=>[fw(My[n]),n]));const hw=de(["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"]),mw=de(["human","developer","reviewer","system"]),Dy=de(["manual","linear","agent"]),pw=H({id:p().uuid(),source:Dy,externalId:p().nullable(),externalLabel:p().nullable(),externalUrl:p().nullable(),title:p(),description:p().nullable(),acceptanceCriteria:p().nullable(),executionContract:ow.nullable().optional(),repo:p(),baseBranch:p(),status:hw,currentOwner:mw,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),maxCiAttempts:E().int().min(0),ciAttempts:E().int().min(0),branch:p().nullable(),baseSha:p().nullable(),headSha:p().nullable(),prNumber:E().int().nullable(),prUrl:p().nullable(),autoMerge:He(),createdAt:p(),updatedAt:p()});H({title:p().min(1),description:p().optional(),acceptanceCriteria:p().optional(),repo:_y,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:He().default(!1),source:Dy.default("manual"),externalId:p().optional(),externalLabel:p().optional(),externalUrl:p().optional(),enqueue:He().default(!0)});H({title:p().min(1).optional(),description:p().nullable().optional(),acceptanceCriteria:p().nullable().optional(),repo:_y.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:He().optional()});const wx={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(wx).filter(n=>wx[n].length===0);const xw=de(["enqueued","already_queued","not_queued"]);pw.extend({created:He(),queue:xw,priorPasses:E().int().min(0)});H({id:p(),issueId:p().nullable(),workerSessionId:p().nullable(),kind:p(),contentJson:p().nullable(),blobPath:p().nullable(),author:de(["human","agent","system"]),createdAt:p()});const yw=de(["authentication_configuration","provider_capacity_rate_limit","agent_cli_crash","tool_test_timeout","muse_no_progress","coordinator_crash","validation_failure","publish_git_failure","agent_deck_unavailable","host_sleep_liveness","unknown"]),vw=de(["task","infrastructure","unknown"]),gw=de(["high","medium","low"]),bw=de(["outcome_kind","session_error","spawn_log","workflow_event","recovery"]),ww=de(["exact","inferred"]),_d=H({code:yw,domain:vw,primary:He(),confidence:gw,evidenceSource:bw,occurredAt:p().nullable(),eventCursor:E().int().nullable(),rawReason:p(),sessionId:p().nullable(),logPath:p().nullable(),eventId:p().nullable(),eventType:p().nullable(),quality:ww}),Sw=de(["commit","verification_receipt","branch_pushed"]),jw=de(["sampler","salvage","session_end"]),Xd=de(["worktree","commit","verification_receipt","publish_only"]);H({kind:Sw,observedSha:p().nullable(),observedAt:p(),origin:jw.nullable(),inputSha:p().nullable(),samplingPrecisionMs:E().int().nullable(),branch:p().nullable()});H({kinds:ne(Xd),retryReason:p().nullable()});const Nw=de(["done","closed","migrated"]);H({id:p().uuid(),issueId:p().uuid(),workflowVersion:p(),startedAt:p(),completedAt:p().nullable(),outcome:Nw.nullable()});const _w=de(["issue.created","issue.reassigned","workflow.started","worker.started","worker.completed","worker.failed","worker.deferred","worktree.ready","worktree.deps_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","auto_merge.conflict_sync","auto_merge.conflict_repair_queued","operator_verification.waived","legacy.imported"]);H({id:p().uuid(),issueId:p().uuid(),workflowInstanceId:p().uuid().nullable(),workerSessionId:p().uuid().nullable(),type:_w,actorType:de(["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 Aw=de(["product_scope_decision","policy_escalation","attempts_exhausted","final_review","deck_interaction_required","reflection_interaction_required","outbound_delivery_interaction_required","muse_capability","operator_verification"]),Ew=de(["open","resolved"]);H({id:p().uuid(),issueId:p().uuid().nullable(),runId:p().uuid().nullable(),workflowInstanceId:p().uuid().nullable(),actionType:Aw,reason:p(),question:p(),evidenceJson:p().nullable(),responseOptionsJson:p().nullable(),continuationPreviewJson:p().nullable(),requestId:p().nullable(),status:Ew,resolutionJson:p().nullable(),resolvedBy:p().nullable(),requestedAt:p(),resolvedAt:p().nullable()});function Au(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}function kw(n){const l=Au(n.responseOptionsJson);return Array.isArray(l)?l.filter(s=>typeof(s==null?void 0:s.choice)=="string"&&typeof(s==null?void 0:s.label)=="string"):[]}function Kd(n){return Au(n.evidenceJson)??{}}function Eu(n){const s=Kd(n).pushDivergence;return!s||typeof s!="object"?null:s}function Rw(n){const s=Kd(n).worktreeBlocker;return!!s&&typeof s=="object"&&typeof s.fingerprint=="string"}function Cw(n){return Kd(n).mergeFailure===!0}function Ly(n){const l=Au(n.continuationPreviewJson);return typeof(l==null?void 0:l.resumeRole)=="string"?l.resumeRole:null}const Tw=/worktree|unpushed|uncommitted|dirty|preserved|non-fast-forward|diverged|already used by|recovery:|force-with-lease/i,Ow=/could not be pushed|non-fast-forward|rejected.*push|push.*rejected/i,Mw=/uncommitted|dirty worktree|has uncommitted changes/i;function Uy(n){const l=/\n?Recovery:\s*\n?/,s=n.match(l);if(!s||s.index===void 0)return{head:n.trim(),commands:[]};const u=n.slice(0,s.index).trim(),f=n.slice(s.index+s[0].length).split(`
|
|
61
|
+
`).map(m=>m.trim()).filter(m=>m.length>0);return{head:u,commands:f}}function Dw(n){const s=Uy(n).head.replace(/\s+/g," ").trim(),u=s.match(/^(.+?[.!?])(\s|$)/);return(u?u[1]:s).trim()}const Lw=/(?:~|\/(?:[^/\s\\:"'*?<>|][^/\s\\:"'*?<>|]*))+(?:\/[^/\s\\:"'*?<>|]+)*/g;function Uw(n){const l=[],s=new Set,u=f=>{const m=f.trim().replace(/[.,;:!?)"'\]]+$/,"");m.length<2||s.has(m)||(s.add(m),l.push(m))};for(const f of[n.reason,n.question])for(const m of f.matchAll(Lw)){const x=m[0];/^\/\d+(\.\d+)*$/.test(x)||!x.includes("/")&&!x.startsWith("~")||u(x)}const d=Eu(n);return typeof(d==null?void 0:d.worktreePath)=="string"&&d.worktreePath&&u(d.worktreePath),l}function Sx(n){return n.length>12?n.slice(0,12):n}function zw(n){const l=[],s=Eu(n);if(s&&typeof s.localSha=="string"&&typeof s.remoteSha=="string"){const d=typeof s.branch=="string"?s.branch:"the branch",f=typeof s.ahead=="number"?` (+${s.ahead})`:"",m=typeof s.behind=="number"?` (+${s.behind})`:"";l.push(`Push: local ${s.localSha}${f} · origin/${d} ${s.remoteSha}${m}`),typeof s.observedRemoteSha=="string"&&s.observedRemoteSha!==s.remoteSha&&l.push(`Remote moved: origin/${d} is now at ${s.observedRemoteSha}`),typeof s.lastLeaseError=="string"&&s.lastLeaseError&&l.push(`Last lease attempt: ${s.lastLeaseError}`)}const u=Ly(n);return u&&l.push(`Continuation: resumes as ${u}`),l}function Bw(n){return n==="close"||n==="reject"||n==="abort"}function Fn(n){return n.length===0?null:n.some(l=>l.choice==="push_with_lease")?"push_with_lease":(n.find(l=>!Bw(l.choice))??n[0]).choice}function qw(n){if(n.actionType!=="policy_escalation")return"other";if(Cw(n))return"merge-failure";const l=Eu(n);if((l==null?void 0:l.relationship)==="diverged")return"diverged-push";if(l&&(l.relationship==="behind"||typeof l.localSha=="string"))return"unpushed";const s=`${n.reason}
|
|
62
|
+
${n.question}`;return Ow.test(s)?"unpushed":Ly(n)==="reviewer"?"reviewer-retry":Mw.test(s)?"dirty-worktree":Rw(n)||/already used by worktree/i.test(s)||/worktree/i.test(s)&&/Recovery:/.test(s)?"worktree-conflict":"ordinary-escalation"}const Hw="Resume safely";function zy(n){const l=qw(n),s=kw(n),{commands:u}=Uy(n.reason),d=Uw(n),f=zw(n),m=(()=>{const y=Au(n.evidenceJson);return y==null?null:JSON.stringify(y,null,2)})(),x={question:n.question,reason:n.reason,commands:u,paths:d,factLines:f,evidencePretty:m};switch(l){case"diverged-push":{const y=Eu(n),g=y&&typeof y.branch=="string"&&typeof y.localSha=="string"&&typeof y.remoteSha=="string"?` (origin/${y.branch}: local ${Sx(y.localSha)} against remote ${Sx(y.remoteSha)})`:"";return{kind:l,title:"Publish these finished commits with a pinned lease?",context:`Your branch diverged from the remote — confirm the pinned commits${g} under Details, then choose Push with lease.`,safeResume:!1,displayOptions:s,primaryChoice:Fn(s),details:x}}case"unpushed":return{kind:l,title:"The push was rejected — how should we proceed?",context:"Your commits are saved; resuming continues development without discarding them.",safeResume:!1,displayOptions:s,primaryChoice:Fn(s),details:x};case"worktree-conflict":return{kind:l,title:"A saved worktree still holds this branch — how should we proceed?",context:"Your work is preserved; check the worktree path and recovery steps under Details before choosing.",safeResume:!1,displayOptions:s,primaryChoice:Fn(s),details:x};case"dirty-worktree":return{kind:l,title:"Uncommitted changes were preserved — how should we proceed?",context:"Nothing was discarded; review the saved changes under Details before choosing.",safeResume:!1,displayOptions:s,primaryChoice:Fn(s),details:x};case"merge-failure":return{kind:l,title:"The merge failed after approval — retry it?",context:"The work is already approved; retrying the merge publishes the same commits without a new developer round.",safeResume:!1,displayOptions:s,primaryChoice:Fn(s),details:x};case"reviewer-retry":return{kind:l,title:"The review attempt failed — retry it?",context:"Nothing is wrong with the code itself; retrying re-queues the reviewer at the same pinned commit.",safeResume:!0,displayOptions:s,primaryChoice:Fn(s),details:x};case"ordinary-escalation":{const y=Dw(n.reason),g=!Tw.test(`${n.reason}
|
|
63
|
+
${n.question}`),b=g?s.map(N=>N.choice==="resume"&&N.label==="Resume development"?{...N,label:Hw}:N):s;return{kind:l,title:"Development is parked — resume or close?",context:y?`${y} Choose ${g?"Resume safely":"Resume"} to continue, or Close to stop.`:null,safeResume:g,displayOptions:b,primaryChoice:Fn(b),details:x}}case"other":default:return{kind:"other",title:n.question,context:null,safeResume:!1,displayOptions:s,primaryChoice:Fn(s),details:x}}}const $w=de(["blocking","non_blocking"]),Yw=de(["open","resolved","recurring","superseded"]);H({id:p().uuid(),issueId:p().uuid(),fingerprint:p(),severity:$w,title:p(),rationale:p(),evidenceRef:p().nullable(),file:p().nullable(),line:E().int().nullable(),status:Yw,firstRound:E().int().min(1),lastRound:E().int().min(1)});H({id:p().uuid(),issueId:p().uuid(),workerSessionId:p().uuid(),role:de(["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 Vw=H({available:ja(!0)}),Zw=H({available:ja(!1),until:p(),reason:p()});Ny("available",[Vw,Zw]);const Jd=de(["supported_protocol","observed_event","experimental_api","unavailable"]),ku=de(["unsupported","missing","expired","unparsable","stale"]),Gw=de(["five_hour","weekly"]),Qw=H({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:Jd,unavailableReason:ku.nullable(),criticalRole:Gw.nullable()}),Xw=H({runtime:Ht,windows:ne(Qw),unavailableReason:ku.nullable()});H({runtimes:ne(Xw),generatedAt:p()});H({configured:He(),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:Jd,unavailableReason:ku.nullable(),observedAt:p().nullable(),generatedAt:p()});H({enabled:He(),configured:He(),cycleLabel:p().nullable(),cycleStart:p().nullable(),cycleEnd:p().nullable(),usageValue:E().nullable(),usageUnit:p().nullable(),remainingPercent:E().min(0).max(100).nullable(),source:Jd,unavailableReason:ku.nullable(),observedAt:p().nullable(),generatedAt:p()});function By(n,l=Date.now()){if(n.remainingPercent===null||n.source==="unavailable"||n.unavailableReason!==null)return!1;if(n.resetAt!==null){const s=Date.parse(n.resetAt);if(!Number.isFinite(s)||s<=l)return!1}if(n.freshUntil!==null){const s=Date.parse(n.freshUntil);if(!Number.isFinite(s)||s<=l)return!1}if(n.expiresAt!==null){const s=Date.parse(n.expiresAt);if(!Number.isFinite(s)||s<=l)return!1}if(n.observedAt){const s=Date.parse(n.observedAt);if(!Number.isFinite(s)||s>l+6e4)return!1}return!0}const Kw=de(["queued","admitted","removed"]),Jw=H({id:p().uuid(),issueId:p().uuid(),position:E().int(),enqueuedAt:p(),state:Kw,waitReason:p().nullable(),waitReasonAt:p().nullable()});Jw.extend({title:p().optional(),issueStatus:p().optional()});H({issueId:p().uuid()});const Iw=B1([ja("top"),ja("bottom"),H({before:p().uuid()}).strict(),H({after:p().uuid()}).strict()]);H({to:Iw});const Fw=2;H({maxActiveIssues:E().int().min(1).max(Fw)});H({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:ne(E().int().min(1)),overCap:He()});const la=de(["exact","inferred","unavailable"]),Ru=H({quality:la,reasons:ne(p())}),qy=de(["queue_wait","coordinator_setup","agent_process","coordinator_validation_publish","coordinator_work"]),Es=H({phase:qy,startMs:E().int().nullable(),endMs:E().int().nullable(),durationMs:E().int().nullable(),quality:la,reasons:ne(p()),sessionId:p().nullable(),startCursor:E().int().nullable(),endCursor:E().int().nullable()}),Ww=Ru.extend({phase:qy,durationMs:E().int().nullable(),rawCount:E().int(),known:E().int(),total:E().int()}),Hy=H({kind:de(["admission_dependency_wait","runtime_health_preflight","unexplained_silence","human_wait"]),startMs:E().int().nullable(),endMs:E().int().nullable(),durationMs:E().int().nullable(),quality:la,reasons:ne(p()),category:p().nullable(),sessionId:p().nullable()}),Jt=Ru.extend({value:E().nullable(),known:E().int(),total:E().int()}),Xa=Ru.extend({p50:E().nullable(),p95:E().nullable(),n:E().int()}),Pw=H({sessionId:p(),role:p(),runtime:p().nullable(),model:p().nullable(),status:p(),round:E().int(),publishOnly:He(),setup:Es,agentProcess:Es,validationPublish:Es,spawnEnvelopeMs:E().int().nullable(),spawnEnvelopeQuality:la,spawnEnvelopeReasons:ne(p()),failureCauses:ne(_d),reuseKinds:ne(Xd).optional(),silence:ne(Hy),silenceQuality:la,silenceReasons:ne(p()),tokensIn:E().int().nullable(),tokensOut:E().int().nullable(),costUsd:E().nullable(),usageDurationMs:E().int().nullable(),usageQuality:la,usageReasons:ne(p())}),e2=H({kind:p().nullable(),observedSha:p().nullable(),msSinceWorkflowStart:E().int().nullable(),quality:la,reasons:ne(p())}),t2=H({attempts:E().int(),retries:E().int(),cold:E().int(),reused:E().int(),unknown:E().int(),publishOnly:E().int(),reuseRate:E().nullable(),preservedKinds:ne(Xd).optional(),quality:la,reasons:ne(p())}),a2=H({rounds:E().int(),verdicts:E().int(),changeRequests:E().int(),changeRequestRate:E().nullable(),quality:la,reasons:ne(p())});H({issueId:p(),elapsed:Es,rawIntervals:ne(Es),unionedDurations:ne(Ww),exclusiveTotalMs:E().int().nullable(),exclusiveTotalQuality:la,exclusiveTotalReasons:ne(p()),nested:ne(Hy),attempts:ne(Pw),primaryFailure:_d.nullable(),primaryFailureQuality:la,primaryFailureReasons:ne(p()),consequenceCauses:ne(_d),waste:H({failedAttempts:E().int(),publishOnlyAttempts:E().int(),runtimeMs:Jt,tokensIn:Jt,tokensOut:Jt,costUsd:Jt}),firstCheckpoint:e2,retry:t2,reviewer:a2,humanWaitMs:E().int().nullable(),humanWaitQuality:la,humanWaitReasons:ne(p()),interventionCount:E().int(),coverage:H({duration:Jt,tokens:Jt,cost:Jt})});H({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 ed=Ru.extend({numerator:E().int(),denominator:E().int(),rate:E().nullable()}),td=H({key:p(),attempts:E().int(),successes:E().int(),successRate:E().nullable(),retries:E().int(),retryRate:E().nullable(),wallTimeMs:Xa});H({window:H({from:p(),to:p(),defaultApplied:He()}),pagination:H({limit:E().int(),offset:E().int(),totalIssues:E().int()}),issueIds:ne(p()),phaseWallTime:Cs(p(),Xa),attemptSuccess:ed,issueSuccess:ed,primaryFailures:ne(H({code:p(),count:E().int(),rate:E().nullable()})),primaryFailureDenominator:E().int(),waste:H({failedAttempts:E().int(),runtimeMs:Jt,tokensIn:Jt,tokensOut:Jt,costUsd:Jt}),checkpointLatencyMs:Xa,retryReuse:ed,reviewer:H({rounds:E().int(),verdicts:E().int(),changeRequests:E().int(),changeRequestRate:E().nullable(),quality:la,reasons:ne(p())}),humanInterventions:H({totalActions:E().int(),issuesWithIntervention:E().int(),humanWaitMs:Xa}),byRole:ne(td),byRuntime:ne(td),byModel:ne(td),coverage:H({duration:Jt,tokens:Jt,cost:Jt})});const n2=100,$y=25,Yy=5,l2=de(["developer","reviewer","legacy"]),i2=de(["authentication_configuration","provider_capacity_rate_limit","agent_cli_crash","tool_test_timeout","muse_no_progress","coordinator_crash","validation_failure","publish_git_failure","agent_deck_unavailable","host_sleep_liveness","unknown"]),s2=de(["task","infrastructure","unknown"]);H({from:p().optional(),to:p().optional(),repo:p().optional(),role:l2.optional(),runtime:p().optional(),model:p().optional(),status:p().optional(),page:gx.number().int().min(1).default(1),limit:gx.number().int().min(1).max(n2).default($y)});const Vy=de(["exact","inferred","unavailable"]),ga=H({sum:E().nullable(),known:E().int().min(0),total:E().int().min(0),quality:Vy,reasons:ne(p())}),ad=H({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:Xa,spawnEnvelopeMs:Xa,retryRate:E().nullable(),tokensIn:ga,tokensOut:ga,costUsd:ga,durationMs:ga,failedDurationMs:ga,failedTokensIn:ga,failedTokensOut:ga,failedCostUsd:ga}),r2=H({code:i2,domain:s2,count:E().int().min(0),share:E().nullable(),issueIds:ne(p()),issueTotal:E().int().min(0)}),u2=H({id:p(),title:p(),status:p(),repo:p(),attempts:E().int().min(0),updatedAt:p()}),c2=H({window:H({from:p(),to:p()}),filters:H({repo:p().nullable(),role:p().nullable(),runtime:p().nullable(),model:p().nullable(),status:ne(p())}),summary:H({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:Vy,interventions:E().int().min(0),avgReviewerRounds:E().nullable(),reviewedIssues:E().int().min(0),changeRequestRate:E().nullable(),sessionWallMs:Xa,spawnEnvelopeMs:Xa,checkpointMs:Xa,phaseWallMs:ne(H({phase:p(),stat:Xa})),failedDurationMs:ga,failedTokensIn:ga,failedTokensOut:ga,failedCostUsd:ga}),byRole:ne(ad),byRuntime:ne(ad),byModel:ne(ad),failures:ne(r2),issues:ne(u2),pagination:H({page:E().int().min(1),limit:E().int().min(1),total:E().int().min(0),totalPages:E().int().min(0)}),meta:H({generatedAt:p(),partial:He(),partialReasons:ne(p())})});function Zy(n){const l=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($y)||l.set(s,d))}return l.sort(),l.toString()}function Wn(n,l){return n.sum===null||n.known===0?"Unavailable":n.known<n.total?`${l(n.sum)} (${n.known}/${n.total} known)`:l(n.sum)}function Gy(n){return n<Yy?`n=${n} (sparse)`:`n=${n}`}function Ad(n){return n<Yy}function jx(n,l){if(n.n===0||n.p50===null&&n.p95===null)return"Unavailable";const s=u=>u===null?"–":l(u);return`P50 ${s(n.p50)} · P95 ${s(n.p95)} (${Gy(n.n)})`}function js(n){return`$${n.toFixed(2)}`}function Ge(n){return n.toLocaleString("en-US")}function o2(n){if(!Number.isFinite(n))return Ge(n);const l=Math.abs(n);if(l<1e3)return Ge(n);const s=u=>u>=100?String(Math.round(u)):u.toFixed(1).replace(/\.0$/,"");return l<1e6?`${s(n/1e3)}K`:`${s(n/1e6)}M`}function Kt(n){if(n<1e3)return`${Math.round(n)} ms`;const l=n/1e3;if(l<60)return`${l.toFixed(1)} s`;const s=Math.floor(l/60),u=Math.round(l%60);return s<60?`${s}m ${u}s`:`${Math.floor(s/60)}h ${s%60}m`}function Cu(n){return n===null||!Number.isFinite(n)?"Unavailable":`${(n*100).toFixed(1)}%`}const d2=de(["queued","plan_pending","plan_approved","running","review","done","failed","cancelled"]),Qy=de(["code","communication","email","research","content","other"]),f2=de(["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","playbook_use_receipt","deck_feedback_signal","reflect_status","linear_sync","send_receipt","result_qa"]),Tu=de(["plan","execute","reflect","qa"]),Xy=de(["retry","approve"]);H({patchId:p(),playbookId:p().optional(),playbookTitle:p().optional(),rationale:p().optional(),status:ja("proposed"),trigger:Xy,dashboardUrl:p().optional()});H({status:de(["pending","completed","failed","skipped"]),trigger:Xy,error:p().optional()});const h2=H({type:de(["system","human","context","thinking","assistant","tool","rate_limit","result"]),text:p(),toolName:p().optional()});H({phase:Tu,runtime:Ht,entries:ne(h2)});const m2=H({phase:Tu,runtime:Ht,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()}),p2=H({label:p(),usage:m2,maxTurns:E().optional(),maxBudgetUsd:E().optional()});H({lines:ne(p2),total:H({totalCostUsd:E(),inputTokens:E(),outputTokens:E(),durationMs:E(),numTurns:E()})});H({phase:Tu,runtime:Ht,sessionId:p()});H({phase:Tu,exitCode:E(),resultText:p().optional(),isError:He().optional(),blocker:H({summary:p().optional()}).optional()});H({path:p(),title:p(),markdown:p()});H({markdown:p(),sessionId:p().optional()});const x2=de(["manual","linear"]);H({id:p(),title:p(),description:p().optional(),url:p().optional()});const vn=H({id:p().uuid(),source:x2,externalId:p().nullable(),externalLabel:p().nullable(),taskCategory:Qy,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:Ht.nullable(),planModel:p().nullable(),executeModel:p().nullable(),status:d2,lineageId:p().uuid().nullable(),acceptanceCriteria:p().nullable(),approvalGatesJson:p().nullable(),budgetJson:p().nullable(),createdAt:p(),updatedAt:p()});H({id:p().uuid(),runId:p().uuid(),kind:f2,contentJson:p().nullable(),blobPath:p().nullable(),author:de(["human","agent","system"]),createdAt:p()});H({id:p().uuid(),runId:p().uuid(),type:p(),payloadJson:p().nullable(),ts:p()});H({title:p().min(1),description:p().optional(),taskCategory:Qy.default("other"),repo:p().optional(),artifactWorkspace:p().optional(),acceptanceCriteria:p().optional(),status:de(["queued","plan_pending","plan_approved"]).default("plan_pending"),agentId:p().uuid(),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),budget:ky.optional()});H({runtime:Ht,deckId:p().uuid().optional(),playbookId:p().optional(),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),budget:ky.optional()});H({planMarkdown:p(),approve:He().default(!1),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),planBudget:Ba.nullable().optional(),executeBudget:Ba.nullable().optional()});H({runtime:Ht.optional(),deckId:p().uuid().optional(),playbookId:p().optional(),executeModel:p().nullable().optional(),executeBudget:Ba.nullable().optional()});H({feedback:p().min(1),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),executeBudget:Ba.nullable().optional()});H({outboundBody:p().min(1).max(4e3).optional()});H({id:p(),identifier:p(),title:p(),description:p().optional(),url:p(),state:p().optional(),labels:ne(p()).optional(),teamId:p().optional(),repoResolution:Z1.optional()});H({stateFilter:ne(p()),teamId:p().nullable(),assigneeMe:He(),syncEnabled:He()});H({host:p(),port:E().int().min(1).max(65535),envOverride:He()});const y2=de(["UNAUTHORIZED","DECK_UNAVAILABLE"]);H({connected:He(),apiUrl:p(),mcpUrl:p(),deckCount:E().optional(),envOverride:He(),error:p().optional(),deckAccessError:y2.optional(),deckAccessErrorMessage:p().optional()});H({agentId:p().uuid().optional(),autoAgent:He().optional(),planModel:p().nullable().optional()}).refine(n=>n.agentId!==void 0||n.autoAgent===!0,{message:"Provide agentId or autoAgent: true"});H({planModel:p().nullable().optional(),planBudget:Ba.nullable().optional(),feedback:p().optional(),editedMarkdown:p().optional()});const v2=H({id:p(),label:p()});H({runtime:Ht,models:ne(v2),source:de(["live","fallback"])});H({planReviewCount:E(),resultReviewCount:E(),maxConcurrent:E(),planningActiveRuns:ne(vn),planningQueuedRuns:ne(vn),runningRuns:ne(vn),waitingExecution:ne(vn),resultReviewRuns:ne(vn),recentDone:ne(vn),awaitingPlanReview:ne(vn),awaitingAnswerRuns:ne(vn),openQuestionCounts:Cs(p(),E()),pendingSendCounts:Cs(p(),E()),sentRunIds:ne(p()).optional(),autoApprovedRunIds:ne(p()),runs:ne(vn),agentDeckOnline:He(),agents:ne(Ty),agentIssueCount:E()});const Ky=new Map,nd=new Map;function Ed(n){return Ky.get(n)??null}function g2(n,l){l.models.length!==0&&Ky.set(n,l)}function b2(n,l){const s=Ed(n);if(s)return Promise.resolve(s);const u=nd.get(n);if(u)return u;const d=l().then(f=>(g2(n,f),f)).finally(()=>nd.delete(n));return nd.set(n,d),d}const Me="";async function et(n){const l=await n.text();try{const s=JSON.parse(l),u=s.error??s.message;if(typeof u=="string"&&u.trim())return u.replace(/^Error:\s*/i,"")}catch{}return l}async function w2(){const n=await fetch(`${Me}/api/intake/linear`);if(!n.ok)throw new Error(await n.text());return(await n.json()).candidates??[]}async function S2(n){const l=await fetch(`${Me}/api/intake/linear/lookup?q=${encodeURIComponent(n)}`),s=await l.json().catch(()=>({}));if(!l.ok)throw new Error(s.error??`Lookup failed (${l.status})`);if(!s.candidate)throw new Error("Linear issue not found");return s.candidate}async function j2(){const n=await fetch(`${Me}/api/settings/repository-mappings`);if(!n.ok)throw new Error(await et(n));return(await n.json()).mappings??[]}async function N2(n){const l=await fetch(`${Me}/api/settings/repository-mappings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({mappings:n})});if(!l.ok)throw new Error(await et(l));return(await l.json()).mappings??[]}async function _2(){const n=await fetch(`${Me}/api/agents`);if(!n.ok)throw new Error("Failed to fetch agents");return n.json()}async function A2(n){const l=await fetch(`${Me}/api/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw new Error(await l.text());return l.json()}async function E2(n,l){const s=await fetch(`${Me}/api/agents/${n}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!s.ok)throw new Error(await s.text());return s.json()}async function k2(n){const l=await fetch(`${Me}/api/agents/${n}`,{method:"DELETE"});if(!l.ok)throw new Error(await l.text())}async function R2(n,l){return b2(n,async()=>{const u=await fetch(`${Me}/api/runtimes/${n}/models`);if(!u.ok)throw new Error(await u.text());return u.json()})}async function Jy(){const n=await fetch(`${Me}/api/runtime-capacity`);if(!n.ok)throw new Error(await n.text());return n.json()}async function Iy(){const n=await fetch(`${Me}/api/agent-deck/status`);if(!n.ok)throw new Error(await n.text());return n.json()}async function C2(){try{const n=await fetch(`${Me}/api/agent-deck/decks`),l=await n.json().catch(()=>null);return n.ok?{ok:!0,decks:(l==null?void 0:l.data)??[]}:{ok:!1,code:l==null?void 0:l.code,message:(l==null?void 0:l.error)??`Agent Deck error (${n.status})`}}catch(n){return{ok:!1,message:n instanceof Error?n.message:String(n)}}}async function Nx(n){const l=new URLSearchParams,s=n.map(f=>f.trim()).filter(Boolean);s.length>0&&l.set("status",s.join(",")),l.set("page","1"),l.set("limit","1"),l.sort();const u=await fetch(`${Me}/api/issues?${l.toString()}`);if(!u.ok)throw new Error(await et(u));const d=await u.json();return typeof d.total=="number"?d.total:0}async function T2(n){var u,d,f;const l=new URLSearchParams;(u=n.q)!=null&&u.trim()&&l.set("q",n.q.trim()),(d=n.status)!=null&&d.trim()&&l.set("status",n.status.trim()),(f=n.repo)!=null&&f.trim()&&l.set("repo",n.repo.trim()),n.needsAttention&&l.set("needsAttention","1"),l.set("page",String(n.page&&n.page>1?Math.floor(n.page):1)),l.sort();const s=await fetch(`${Me}/api/issues?${l.toString()}`);if(!s.ok)throw new Error(await et(s));return s.json()}async function O2(){const n=await fetch(`${Me}/api/issues/recent-repos`);if(!n.ok)throw new Error(await et(n));return(await n.json()).repos??[]}async function Fy(n){const l=await fetch(`${Me}/api/issues/${n}`);if(!l.ok)throw new Error(await et(l));return l.json()}async function M2(n){const l=await fetch(`${Me}/api/issues/${n}/execution-analysis`);if(!l.ok)throw new Error(await et(l));return l.json()}async function D2(n){const l=await fetch(`${Me}/api/issues/${n}/evidence`);if(!l.ok)throw new Error(await et(l));return l.json()}async function L2(n,l){const s=await fetch(`${Me}/api/issues/${n}/artifacts/${l}/trace`);if(!s.ok)throw new Error(await et(s));return s.json()}async function U2(n){const l=await fetch(`${Me}/api/issues`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw new Error(await et(l));return l.json()}async function kd(n,l){const s=await fetch(`${Me}/api/issues/${n}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(l)});if(!s.ok)throw new Error(await et(s));return s.json()}async function Wy(n){const l=await fetch(`${Me}/api/issues/${n}/start`,{method:"POST"});if(!l.ok)throw new Error(await et(l));return l.json()}async function Py(n){const l=await fetch(`${Me}/api/issues/${n}/execute`,{method:"POST"});if(!l.ok)throw new Error(await et(l));return l.json()}async function z2(n,l="web"){const s=await fetch(`${Me}/api/issues/${n}/abort`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({resolvedBy:l})});if(!s.ok)throw new Error(await et(s));return s.json()}async function B2(n,l="web"){const s=await fetch(`${Me}/api/issues/${n}/close`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({closedBy:l})});if(!s.ok)throw new Error(await et(s));return s.json()}async function q2(n){const l=await fetch(`${Me}/api/queue`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({issueId:n})});if(!l.ok)throw new Error(await et(l));return l.json()}async function ev(n){const l=await fetch(`${Me}/api/queue/${n}`,{method:"DELETE"});if(!l.ok)throw new Error(await et(l));return l.json()}async function Fr(n,l){const s=await fetch(`${Me}/api/queue/${n}/move`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({to:l})});if(!s.ok)throw new Error(await et(s));return s.json()}async function ld(){const n=await fetch(`${Me}/api/queue`);if(!n.ok)throw new Error(await et(n));return n.json()}async function H2(){const n=await fetch(`${Me}/api/queue/status`);if(!n.ok)throw new Error(await et(n));return n.json()}async function $2(n){const l=await fetch(`${Me}/api/queue/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({maxActiveIssues:n})});if(!l.ok)throw new Error(await et(l));return l.json()}async function Y2(n,l){const s=await fetch(`${Me}/api/issues/${n}/guidance`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({markdown:l})});if(!s.ok)throw new Error(await et(s));return s.json()}async function V2(n){const l=Zy(n),s=await fetch(`${Me}/api/execution-report${l?`?${l}`:""}`);if(!s.ok)throw new Error(await et(s));const u=await s.json(),d=c2.safeParse(u);if(!d.success)throw new Error(`Unexpected report shape: ${d.error.message}`);return d.data}async function Z2(){const n=await fetch(`${Me}/api/human-actions`);if(!n.ok)throw new Error(await et(n));return n.json()}async function tv(n,l,s,u){const d=await fetch(`${Me}/api/human-actions/${n}/resolve`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(u!=null&&u.trim()?{resolvedBy:l,choice:s,note:u.trim()}:{resolvedBy:l,choice:s})});if(!d.ok)throw new Error(await et(d));return d.json()}function G2(n){return n||Cy}function Q2({runtime:n,label:l,value:s,onChange:u,defaultModelId:d,disabled:f,compact:m}){const x=Ed(n),[y,g]=w.useState((x==null?void 0:x.models)??[]),[b,N]=w.useState((x==null?void 0:x.source)??"fallback"),[L,X]=w.useState(!x);w.useEffect(()=>{const D=Ed(n);if(D){g(D.models),N(D.source),X(!1);return}X(!0),R2(n).then(B=>{g(B.models),N(B.source)}).catch(()=>g([])).finally(()=>X(!1))},[n]);const C=w.useMemo(()=>{var D,B;if(n==="cursor_local"){const Z=G2(d);return((D=y.find(W=>W.id===Z))==null?void 0:D.label)??"Auto (subscription pool)"}return d?((B=y.find(Z=>Z.id===d))==null?void 0:B.label)??d:"runtime default"},[n,d,y]),Y=n==="cursor_local"?L?"Loading models…":`Agent default (${C})`:L?"Loading models…":`Default (${C})`;return c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:l}),c.jsxs("select",{className:"field text-sm",disabled:f||L,value:s,onChange:D=>u(D.target.value),children:[c.jsx("option",{value:"",children:Y}),y.map(D=>c.jsx("option",{value:D.id,children:D.label},D.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"&&y.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 _x(n){const l={};return n.allowWorktreeWrite||(l.worktreeWrite=!1),Object.keys(l).length?l:null}function X2(n){let l={};try{n!=null&&n.trim()&&(l=JSON.parse(n))}catch{l={}}return{allowWorktreeWrite:l.worktreeWrite!==!1}}function Ax({value:n,onChange:l,agentDeckOnline:s,disabled:u}){const[d,f]=w.useState([]),[m,x]=w.useState(null);w.useEffect(()=>{C2().then(b=>{b.ok?(f(b.decks),x(null)):(f([]),x(b.message))})},[]);const y=b=>l({...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;y({runtime:N,defaultModel:N==="cursor_local"?Cy:N==="muse_code"?F1:"",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=>y({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=>y({purpose:b.target.value})})]}),c.jsxs("div",{className:`grid gap-2 ${g?"grid-cols-2":"grid-cols-1"}`,children:[c.jsx(Q2,{runtime:n.runtime,label:"Default model",value:n.defaultModel,onChange:b=>y({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=>y({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. The developer session receives the selected deck above. 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=>y({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=>y({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=>y({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 Na(n){return n==="claude_code"?"Claude":n==="cursor_local"?"Cursor":n==="codex_local"?"Codex":n==="muse_code"?"Muse Code":"No agent"}function K2(){return{maxTurns:"",maxBudgetUsd:""}}function Ex(n){const l=n.maxTurns.trim()?Number(n.maxTurns):null,s=n.maxBudgetUsd.trim()?Number(n.maxBudgetUsd):null;return l==null&&s==null||l!=null&&(!Number.isFinite(l)||l<=0)||s!=null&&(!Number.isFinite(s)||s<=0)?null:{maxTurns:l,maxBudgetUsd:s}}function J2(n){const l=iu(n);return{maxTurns:(l==null?void 0:l.maxTurns)!=null?String(l.maxTurns):"",maxBudgetUsd:(l==null?void 0:l.maxBudgetUsd)!=null?String(l.maxBudgetUsd):""}}function ws({children:n,className:l="",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 ${l}`,children:n})}function Wr(n,l){const s=n.find(d=>d.runtime===l);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==="runtime_capability"||d.code==="cursor_keychain");return u?{ok:!1,detail:u.message}:{ok:!0,detail:"CLI ready"}}function I2(n){const l=n.flatMap(s=>s.issues).find(s=>s.code==="github_cli_missing"||s.code==="github_auth"||s.code==="github_unreachable");return l?{ok:!1,detail:l.message}:n.length===0?{ok:!1,detail:"no agent"}:{ok:!0,detail:"gh ready"}}function bi({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 F2({agents:n,agentDeckOnline:l}){const[s,u]=w.useState(null);w.useEffect(()=>{Iy().then(b=>u(b.mcpUrl)).catch(()=>u(null))},[l]);const d=Wr(n,"claude_code"),f=Wr(n,"cursor_local"),m=Wr(n,"codex_local"),x=n.some(b=>b.runtime==="muse_code")?Wr(n,"muse_code"):null,y=I2(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(bi,{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(bi,{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(bi,{ok:m.ok}),c.jsx("span",{className:m.ok?"text-white/55":"text-amber-200/90",children:"Codex"})]}),x&&c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:x.detail,children:[c.jsx(bi,{ok:x.ok}),c.jsx("span",{className:x.ok?"text-white/55":"text-amber-200/90",children:"Muse Code"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:y.detail,children:[c.jsx(bi,{ok:y.ok}),c.jsx("span",{className:y.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(bi,{ok:l&&!g}),c.jsxs("span",{className:l&&!g?"text-[#92E4DD]/80":g?"text-amber-200/90":"text-white/35",children:["Agent Deck MCP",l?g?" (setup needed)":"":" (optional)"]})]})]})}function av(n){return n<10?"critical":n<30?"warning":"normal"}const Id={unsupported:"not reported by provider",missing:"no data yet",expired:"expired",unparsable:"provider data unparsable",stale:"stale"},W2={critical:"font-bold text-red-400",warning:"text-yellow-400",normal:"font-medium"},P2=new Set(["claude_code","codex_local","muse_code"]),eS="billing_cycle",tS="1M",aS="5H",nS="1W";function kx(n,l,s,u){if(n!==null)return nv(n,l,null);const d=s??"missing";return{key:u,label:l,kind:"unknown",reason:d,title:`${l}: N/A (${Id[d]})`}}function nv(n,l,s){if(n.unavailableReason===null&&n.remainingPercent!==null){const d=n.remainingPercent,f=n.resetAt?`, resets ${new Date(n.resetAt).toLocaleString()}`:"",m=s?`, ${s}`:"";return{key:n.windowKey,label:l,kind:"known",remaining:Math.round(d),rawRemaining:d,title:`${l}: ${Math.round(d)}% remaining${m}${f}`}}const u=n.unavailableReason??"missing";return{key:n.windowKey,label:l,kind:"unknown",reason:u,title:`${l}: N/A (${Id[u]})`}}function lS(n){if(n.runtime==="cursor_local"){const l=n.windows.find(s=>s.windowKey===eS)??null;return l===null?[]:[nv(l,tS,"current billing cycle")]}if(P2.has(n.runtime)){const l=n.windows.find(u=>u.criticalRole==="five_hour")??null,s=n.windows.find(u=>u.criticalRole==="weekly")??null;return[kx(l,aS,n.unavailableReason,"missing-5H"),kx(s,nS,n.unavailableReason,"missing-1W")]}return[]}function iS({row:n}){const l=n.kind==="known";return c.jsxs("span",{"data-testid":`capacity-window-${n.key}`,"data-reason":n.kind==="unknown"?n.reason:void 0,title:n.title,className:`inline-flex items-center gap-1 rounded border px-1.5 py-0.5 whitespace-nowrap ${l?"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.label}),n.kind==="known"?(()=>{const s=av(n.rawRemaining);return c.jsxs("span",{"data-severity":s,className:W2[s],children:[n.remaining,"%"]})})():c.jsx("span",{children:"N/A"})]})}function sS({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(l=>{const s=lS(l);return c.jsxs("span",{"data-testid":`capacity-entry-${l.runtime}`,className:"inline-flex min-w-0 flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"shrink-0 whitespace-nowrap font-medium text-white/55",children:Na(l.runtime)}),s.length===0?c.jsx("span",{"data-testid":`capacity-entry-${l.runtime}-na`,"data-reason":l.unavailableReason??"missing",title:`N/A (${Id[l.unavailableReason??"missing"]})`,className:"whitespace-nowrap text-white/35",children:"N/A"}):s.map(u=>c.jsx(iS,{row:u},u.key))]},l.runtime)})]})}function rS({refreshTick:n}){const[l,s]=w.useState(null);return w.useEffect(()=>{let u=!1;return Jy().then(d=>{u||s(d)}).catch(()=>{u||s(null)}),()=>{u=!0}},[n]),l?c.jsx(sS,{data:l}):null}const uS="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",cS="/assets/codex-YZSpL-SB.png",oS="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",dS="/assets/muse-CtdcC6ve.svg";function Ou({src:n,className:l}){return c.jsx("span",{className:`inline-flex items-center justify-center rounded-lg bg-white/[0.04] ${l??"h-8 w-8"}`,children:c.jsx("img",{src:n,alt:"",className:"h-[70%] w-[70%] object-contain",draggable:!1})})}function fS({className:n="h-8 w-8"}){return c.jsx(Ou,{src:uS,className:n})}function hS({className:n="h-8 w-8"}){return c.jsx(Ou,{src:oS,className:n})}function mS({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 pS({className:n="h-8 w-8"}){return c.jsx(Ou,{src:cS,className:n})}function xS({className:n="h-8 w-8"}){return c.jsx(Ou,{src:dS,className:n})}function lv({runtime:n,className:l="h-8 w-8 shrink-0"}){return n==="claude_code"?c.jsx(fS,{className:l}):n==="cursor_local"?c.jsx(hS,{className:l}):n==="codex_local"?c.jsx(pS,{className:l}):n==="muse_code"?c.jsx(xS,{className:l}):c.jsx(mS,{className:l})}const Pr=()=>({runtime:"claude_code",deckId:"",purpose:"",defaultModel:"",defaultEffort:"",defaultBudget:K2(),allowWorktreeWrite:!0});function yS({agents:n,agentDeckOnline:l,onRefresh:s}){const[u,d]=w.useState(!1),[f,m]=w.useState(""),[x,y]=w.useState(Pr()),[g,b]=w.useState(!1),[N,L]=w.useState(null),[X,C]=w.useState(""),[Y,D]=w.useState(Pr()),B=async J=>{if(J.preventDefault(),!(!f.trim()||!x.deckId)){b(!0);try{const be={name:f.trim(),runtime:x.runtime,deckId:x.deckId,defaultModel:x.defaultModel.trim()||null,defaultEffort:x.defaultEffort||null,defaultBudget:Ex(x.defaultBudget),purpose:x.purpose.trim()||null,permissionPolicy:_x(x)};await A2(be),m(""),y(Pr()),d(!1),s()}catch(be){alert(String(be))}finally{b(!1)}}},Z=J=>{L(J.id),C(J.name),D({runtime:J.runtime,deckId:J.deckId??"",purpose:J.purpose??"",defaultModel:bx(J)??"",defaultEffort:J.defaultEffort??"",defaultBudget:J2(ew(J)),...X2(J.permissionPolicyJson)})},W=()=>{L(null),D(Pr())},ce=async J=>{if(!(!X.trim()||!Y.deckId)){b(!0);try{const be={name:X.trim(),runtime:Y.runtime,deckId:Y.deckId,defaultModel:Y.defaultModel.trim()||null,defaultEffort:Y.defaultEffort||null,defaultBudget:Ex(Y.defaultBudget),purpose:Y.purpose.trim()||null,permissionPolicy:_x(Y)};await E2(J.id,be),W(),s()}catch(be){alert(String(be))}finally{b(!1)}}},K=async J=>{if(confirm(`Delete agent "${J.name}"?`)){b(!0);try{await k2(J.id),s()}catch(be){alert(String(be))}finally{b(!1)}}},Te=n.filter(J=>!J.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",Te>0&&c.jsxs("span",{className:"text-red-400 ml-2",children:["· ",Te," need",Te===1?"s":""," attention"]})]})]}),c.jsx(F2,{agents:n,agentDeckOnline:l})]}),c.jsx("div",{className:"mb-4 overflow-x-auto space-y-2",children:c.jsx(rS,{})}),c.jsx("div",{className:"space-y-3 mb-6",children:n.map(J=>{const be=bx(J);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(lv,{runtime:J.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:J.name}),!J.healthy&&c.jsx(ws,{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(ws,{className:"bg-white/5 text-white/55 border-white/15 normal-case",children:Na(J.runtime)}),J.deckName?c.jsxs(ws,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",J.deckName]}):c.jsx(ws,{className:"bg-white/5 text-white/40 border-white/10 normal-case",children:"No deck"}),be&&c.jsx(ws,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:be,children:be})]}),N===J.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:X,onChange:Ye=>C(Ye.target.value)})]}),c.jsx(Ax,{value:Y,onChange:D,agentDeckOnline:l}),c.jsxs("div",{className:"flex gap-2 pt-1",children:[c.jsx("button",{type:"button",disabled:g||!X.trim()||!Y.deckId,onClick:()=>ce(J),className:"btn-gold text-sm px-3 py-1.5",children:"Save"}),c.jsx("button",{type:"button",onClick:W,className:"btn-ghost text-sm px-3 py-1.5",children:"Cancel"})]})]}),J.issues.length>0&&c.jsx("ul",{className:"text-sm text-red-300/90 space-y-1",children:J.issues.map((Ye,vt)=>c.jsxs("li",{children:["· ",Ye.message]},vt))})]})]}),c.jsxs("div",{className:"flex gap-2 shrink-0",children:[N!==J.id&&c.jsx("button",{type:"button",disabled:g,onClick:()=>Z(J),className:"btn-ghost text-sm px-3 py-1.5",children:"Edit"}),c.jsx("button",{type:"button",disabled:g,onClick:()=>K(J),className:"btn-ghost text-sm px-3 py-1.5",children:"Delete"})]})]},J.id)})}),u?c.jsxs("form",{onSubmit:B,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:J=>m(J.target.value)})]}),c.jsx(Ax,{value:x,onChange:y,agentDeckOnline:l}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"submit",disabled:g||!f.trim()||!x.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 vS(n){try{return Gd(n).identity}catch{return null}}function gS(n,l){return n!=="linear"||!l?null:l.repoResolution??Ey(l.labels)}function bS(n,l){if(!l)return n;const s=l.repoResolution??Ey(l.labels);return s.status==="resolved"&&s.repository?s.repository:n}function wS(n,l){var u;const s=gS(n,l);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 Rx(n){return n.title.trim().length>0&&vS(n.repo)!=null&&n.developerAgentId.length>0&&n.reviewerAgentId.length>0}const id=["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"],SS={q:"",status:"",repo:"",needsAttention:!1};function Fd(n){return n.startsWith("?")?n.slice(1):n}function Cx(n){var s,u,d;const l=new URLSearchParams(Fd(n));return{q:((s=l.get("q"))==null?void 0:s.trim())??"",status:((u=l.get("status"))==null?void 0:u.trim())??"",repo:((d=l.get("repo"))==null?void 0:d.trim())??"",needsAttention:l.get("needsAttention")==="1"||l.get("needsAttention")==="true"}}function jS(n){const l=new URLSearchParams(Fd(n)),s=y=>{var b;const g=(b=l.get(y))==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),(l.get("needsAttention")==="1"||l.get("needsAttention")==="true")&&(u.needsAttention=!0);const x=Number(l.get("page"));return Number.isInteger(x)&&x>=1&&(u.page=x),u}function NS(n){var s,u,d;const l=new URLSearchParams;return(s=n.q)!=null&&s.trim()&&l.set("q",n.q.trim()),(u=n.status)!=null&&u.trim()&&l.set("status",n.status.trim()),(d=n.repo)!=null&&d.trim()&&l.set("repo",n.repo.trim()),n.needsAttention&&l.set("needsAttention","1"),n.page!==void 0&&Number.isInteger(n.page)&&n.page>1&&l.set("page",String(n.page)),l.sort(),l.toString()}function _S(n){const l={};return n.q.trim()&&(l.q=n.q.trim()),n.status.trim()&&(l.status=n.status.trim()),n.repo.trim()&&(l.repo=n.repo.trim()),n.needsAttention&&(l.needsAttention=!0),l}function AS(n,l){const s=new URLSearchParams(Fd(n));return l<=1?s.delete("page"):s.set("page",String(Math.floor(l))),s.sort(),s.toString()}function Tx(n){if(n.total===0)return"No issues match these filters";const l=(n.page-1)*n.limit+1,s=Math.min(n.total,n.page*n.limit);return`Showing ${l}–${s} of ${n.total} issues`}function Ox(n){return n.totalPages<=1?"":`Page ${n.page} of ${n.totalPages}`}function Mx(n){return!!(n.q||n.status||n.repo||n.needsAttention)}const ES={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"},kS={ready:"Ready",developing:"Developing",reviewing:"Reviewing",repairing:"Repairing",final_review:"Final review",needs_human:"Needs human",done:"Done",closed:"Closed"};function iv({status:n}){return c.jsx("span",{className:`text-xs leading-none px-2 py-1 rounded border tabular-nums ${ES[n]}`,children:kS[n]})}const sv="agent-dealer:first-issue-dismissed:v1";function RS(n){return n.healthy}function CS(n){return n.healthy&&n.runtime!=="muse_code"}function TS(n){const l=n.some(RS),s=n.some(CS);return l&&s?"new-issue":"agents"}function OS(n){return n.historyTotal===0&&!n.filtersActive&&!n.dismissed}function rv(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}function MS(n=rv()){try{return(n==null?void 0:n.getItem(sv))==="1"}catch{return!1}}function DS(n=rv()){try{n==null||n.setItem(sv,"1")}catch{}}function LS({agents:n,onStartIssue:l,onDismiss:s}){const u=TS(n);return c.jsx("section",{"aria-label":"Create your first issue","data-testid":"first-issue-strip",className:"mb-4 rounded border border-[#C4B643]/40 bg-[#C4B643]/5 px-4 py-3",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"font-ui-display text-sm font-medium text-white/90",children:"Create your first issue"}),c.jsx("p",{className:"mt-1 text-sm text-white/60",children:"Connect a developer and a reviewer agent, pick a GitHub repository, then create the issue. Capacity status in the header is informational — it never blocks creating an issue."}),c.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[u==="agents"?c.jsx(ia,{to:"/agents","data-testid":"first-issue-primary",className:"btn-gold px-4 py-2 text-sm",children:"Configure agents"}):c.jsx("button",{type:"button","data-testid":"first-issue-primary",className:"btn-gold px-4 py-2 text-sm",onClick:l,children:"New issue"}),u==="agents"&&c.jsx("span",{className:"text-xs text-white/40",children:"then pick a repository and create the issue"})]})]}),c.jsx("button",{type:"button","aria-label":"Dismiss first-issue guide",title:"Dismiss",onClick:s,className:"shrink-0 rounded px-2 py-1 text-sm text-white/40 hover:text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-cyber-teal/45",children:"✕"})]})})}function uv({value:n,onChange:l,recentRepos:s=[],id:u}){return c.jsxs("div",{className:"space-y-1",children:[s.length>0&&c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:s.includes(n)?n:"",onChange:d=>{d.target.value&&l(d.target.value)},"aria-label":"Recent repositories",children:[c.jsx("option",{value:"",children:"Recent repositories…"}),s.map(d=>c.jsx("option",{value:d,children:d},d))]}),c.jsx("input",{id:u,className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"GitHub URL or owner/repo",value:n,onChange:d=>l(d.target.value)})]})}function US(){return{label:"",repository:""}}function zS(n){const l=new Set;for(const s of n){const u=s.label.trim();if(!u)return"Labels must not be empty";if(u.length>100)return`Label "${u}" must be 1–100 characters`;const d=u.toLowerCase();if(l.has(d))return`Duplicate label "${u}"`;if(l.add(d),!s.repository.trim())return`Repository for "${u}" must not be empty`}return n.length>100?"At most 100 mappings are allowed":null}function BS({recentRepos:n=[],initialMappings:l,loadMappings:s=j2,saveMappings:u=N2,onClose:d}){const[f,m]=w.useState(l??[]),[x,y]=w.useState(l!==void 0),[g,b]=w.useState(null),[N,L]=w.useState(null),[X,C]=w.useState(!1);w.useEffect(()=>{if(l!==void 0)return;let B=!0;return s().then(Z=>{B&&(m(Z),y(!0))}).catch(Z=>{B&&(b(String(Z)),y(!0))}),()=>{B=!1}},[l,s]);const Y=(B,Z)=>{m(W=>W.map((ce,K)=>K===B?{...ce,...Z}:ce))},D=async()=>{b(null),L(null);const B=zS(f);if(B){b(B);return}C(!0);try{const Z=await u(f.map(W=>({label:W.label.trim(),repository:W.repository})));m(Z),L(Z.length===0?"Mappings cleared":`Saved ${Z.length} mapping${Z.length===1?"":"s"}`)}catch(Z){b(String(Z))}finally{C(!1)}};return c.jsxs("div",{className:"rounded border border-white/10 bg-black/20 px-3 py-2 space-y-2","aria-label":"Repository mappings",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("p",{className:"text-xs text-white/60",children:"Repository mappings"}),d&&c.jsx("button",{type:"button",className:"text-xs text-white/50 hover:text-white",onClick:d,children:"Close"})]}),x?f.length===0?c.jsx("p",{className:"text-xs text-white/40",children:"No mappings yet — add one to prefill the Repository field from a Linear label."}):f.map((B,Z)=>c.jsxs("div",{className:"flex gap-2 items-start","data-testid":"mapping-row",children:[c.jsx("input",{className:"w-40 shrink-0 bg-black/30 border border-white/10 rounded px-2 py-1.5 text-sm",placeholder:"Linear label","aria-label":`Linear label for mapping ${Z+1}`,value:B.label,onChange:W=>Y(Z,{label:W.target.value})}),c.jsx("div",{className:"flex-1 min-w-0",children:c.jsx(uv,{value:B.repository,onChange:W=>Y(Z,{repository:W}),recentRepos:n})}),c.jsx("button",{type:"button",className:"shrink-0 text-xs text-white/50 hover:text-white px-1 py-1.5",onClick:()=>m(W=>W.filter((ce,K)=>K!==Z)),children:"Remove"})]},Z)):c.jsx("p",{className:"text-xs text-white/40",children:"Loading…"}),g&&c.jsx("p",{className:"text-xs text-red-300","data-testid":"mappings-error",children:g}),N&&c.jsx("p",{className:"text-xs text-teal-200/80",children:N}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded border border-white/15 text-white/70 hover:text-white",onClick:()=>m(B=>[...B,US()]),children:"Add mapping"}),c.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded border border-teal/40 text-teal disabled:opacity-50",disabled:X||!x,onClick:()=>void D(),children:X?"Saving…":"Save changes"})]})]})}function cv(n){return n.issues.some(l=>l.code==="usage_capped")}function ov(n){return[...n].sort((l,s)=>Number(s.healthy)-Number(l.healthy))}function tl(n){var u;const l=`${n.name} · ${Na(n.runtime)}`,s=[];if(!n.healthy){const d=((u=n.issues[0])==null?void 0:u.message)??"unhealthy";s.push(`NEEDS FIX: ${d}`)}return cv(n)&&s.push("USAGE CAPPED"),s.length>0?`${l} — ${s.join(" · ")}`:l}function yu(n){var l;return n?n.healthy?cv(n)?"Usage capped — admission will refuse until the cap lifts":null:((l=n.issues[0])==null?void 0:l.message)??"Agent is unhealthy":null}function qS({agents:n,initialDeveloperId:l,initialReviewerId:s,busy:u,onSave:d,onCancel:f}){var D,B;const[m,x]=w.useState(l??""),[y,g]=w.useState(s??""),b=ov(n),N=n.find(Z=>Z.id===m),L=n.find(Z=>Z.id===y),X=yu(N),C=yu(L),Y=m===(l??"")&&y===(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} · ${Na(N.runtime)}${N.healthy?" · healthy":` · ${((D=N.issues[0])==null?void 0:D.message)??"unhealthy"}`}`:"Pick a developer agent",onChange:Z=>x(Z.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),b.map(Z=>c.jsx("option",{value:Z.id,title:tl(Z),children:(Z.healthy?"● ":"○ ")+tl(Z)},Z.id))]}),X&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:X})]}),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:y,disabled:u,title:L?`${L.name} · ${Na(L.runtime)}${L.healthy?" · healthy":` · ${((B=L.issues[0])==null?void 0:B.message)??"unhealthy"}`}`:"Pick a reviewer agent",onChange:Z=>g(Z.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),b.map(Z=>Z.runtime==="muse_code"?c.jsx("option",{value:Z.id,disabled:!0,title:"Muse Code cannot be a reviewer (developer role only)",children:`○ ${Z.name} · ${Na(Z.runtime)} — reviewer not supported`},Z.id):c.jsx("option",{value:Z.id,title:tl(Z),children:(Z.healthy?"● ":"○ ")+tl(Z)},Z.id))]}),C&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:C})]}),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||!y||Y,title:"Save via the issue PATCH contract — keeps queue position and rechecks the wait reason",onClick:()=>d(m,y),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 vu({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 HS={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",muse_capability:"Muse capability",operator_verification:"Operator verification"};function $S(n){return HS[n]??n}function YS(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}function VS(n){const l=YS(n.responseOptionsJson);return Array.isArray(l)?l.filter(s=>typeof(s==null?void 0:s.choice)=="string"&&typeof(s==null?void 0:s.label)=="string"):[]}function ZS(n){return n==="close"||n==="reject"||n==="abort"}function GS({options:n,disabled:l,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:`${ZS(u.choice)?"btn-ghost-danger":"btn-gold"} px-3 py-1 text-xs disabled:opacity-50`,disabled:l,onClick:()=>s(u.choice),children:u.label},u.choice))})}function ks({action:n,linkTo:l,onChoose:s,disabled:u,children:d,hideChoicesHint:f}){const m=zy(n),x=l?c.jsx(ia,{to:l,className:"text-sm text-white/85 hover:text-white hover:underline",children:m.title}):c.jsx("span",{className:"text-sm text-white/85",children:m.title});return c.jsxs("div",{className:"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:$S(n.actionType)}),c.jsx("span",{className:"text-xs text-white/35 shrink-0",children:new Date(n.requestedAt).toLocaleString()})]}),c.jsx("div",{children:x}),m.context&&c.jsx("p",{className:"text-xs text-white/55",children:m.context}),s?m.displayOptions.length>0?c.jsx(GS,{options:m.displayOptions,disabled:u,onChoose:s}):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"}),")."]}):!f&&m.displayOptions.length>0&&c.jsxs("p",{className:"text-xs text-white/50",children:["To decide: ",m.displayOptions.map(y=>y.label).join(" · ")]}),d,c.jsxs("details",{children:[c.jsx("summary",{className:"text-xs text-white/45 cursor-pointer hover:text-white/70",children:"Details"}),c.jsxs("div",{className:"mt-1.5 space-y-1.5 rounded border border-white/10 bg-black/20 px-3 py-2",children:[c.jsx("p",{className:"text-xs text-white/60 whitespace-pre-wrap",children:m.details.question}),m.details.question!==m.details.reason&&c.jsx("p",{className:"text-xs text-white/60 whitespace-pre-wrap",children:m.details.reason}),m.details.factLines.map(y=>c.jsx("p",{className:"text-xs text-white/60",children:y},y)),m.details.paths.length>0&&c.jsxs("div",{className:"text-xs text-white/60",children:[c.jsx("p",{className:"text-white/40",children:"Saved paths:"}),m.details.paths.map(y=>c.jsx("p",{className:"font-mono break-all",children:y},y))]}),m.details.commands.length>0&&c.jsxs("div",{className:"text-xs text-white/60",children:[c.jsx("p",{className:"text-white/40",children:"Recovery commands:"}),c.jsx("pre",{className:"font-mono whitespace-pre-wrap break-all",children:m.details.commands.join(`
|
|
64
|
+
`)})]}),m.details.evidencePretty&&c.jsxs("div",{className:"text-xs text-white/60",children:[c.jsx("p",{className:"text-white/40",children:"Evidence:"}),c.jsx("pre",{className:"font-mono whitespace-pre-wrap break-all",children:m.details.evidencePretty})]})]})]})]})}function QS({actions:n,busyActionId:l,onResolve:s}){const[u,d]=w.useState({});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(vu,{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(f=>{if(f.issueId)return c.jsx("div",{className:"px-4 py-3 hover:bg-white/5 transition-colors",children:c.jsx(ks,{action:f,linkTo:`/issues/${f.issueId}`})},f.id);const m=f.actionType==="operator_verification",x=u[f.id]??"";return c.jsx("div",{className:"px-4 py-3",children:c.jsx(ks,{action:f,disabled:l===f.id||m&&!x.trim(),onChoose:y=>s(f.id,y,m?x:void 0),children:m&&c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm text-white/85 placeholder:text-white/30",rows:2,placeholder:"Result note (required) — paste the probe output, waiver reason, or repair note",value:x,disabled:l===f.id,onChange:y=>d(g=>({...g,[f.id]:y.target.value}))})})},f.id)})})]})}const XS="web";function KS(n){const l=Date.now()-new Date(n).getTime(),s=Math.floor(l/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 JS({agents:n,humanActions:l,onHumanActionsChanged:s}){const[u,d]=w.useState(null),[f,m]=w.useState(null),[x,y]=vy(),g=x.toString(),b=jS(g),N=w.useRef(b);N.current=b;const[L,X]=w.useState(()=>Cx(g)),[C,Y]=w.useState(!1),D=Mx(b),[B,Z]=w.useState(!1),[W,ce]=w.useState(!1),[K,Te]=w.useState("manual"),[J,be]=w.useState([]),[Ye,vt]=w.useState(""),[ft,tt]=w.useState(""),[Lt,wt]=w.useState(!1),[Fe,U]=w.useState([]),[F,ie]=w.useState(""),[ee,Le]=w.useState(""),[_,$]=w.useState("main"),[I,te]=w.useState(""),[me,xe]=w.useState(""),[fe,st]=w.useState(""),[we,lt]=w.useState(""),[Ea,$a]=w.useState(!0),[ka,Ne]=w.useState(null),[Mt,Ia]=w.useState([]),[Ee,nl]=w.useState(null),[Ra,jn]=w.useState(!1),[Nn,_n]=w.useState(null),[Tl,St]=w.useState(()=>MS()),[ra,Fa]=w.useState(null),[Wa,Ut]=w.useState(null),rt=J.find(O=>O.id===Ye)??null,ll=K==="linear"&&rt!=null,Ol=wS(K,rt),Ml=Rx({title:F,repo:ee,developerAgentId:fe,reviewerAgentId:we}),Ca=O=>{T2(O).then(d).catch(ue=>Ne(String(ue)))},gt=()=>{Nx([...id]).then(_n).catch(()=>{})},ua=()=>{DS(),St(!0)},Et=OS({historyTotal:Nn,filtersActive:D,dismissed:Tl}),jt=()=>{Ca(N.current),ld().then(Ia).catch(()=>{}),H2().then(nl).catch(()=>{}),gt()},G=async O=>{jn(!0),Ne(null);try{const ue=await $2(O);nl(ue),jt()}catch(ue){Ne(String(ue))}finally{jn(!1)}},De=async O=>{Ut(O),Ne(null);try{const ue=await Fy(O);Fa({issueId:O,developerAgentId:ue.issue.developerAgentId,reviewerAgentId:ue.issue.reviewerAgentId})}catch(ue){Ne(String(ue))}finally{Ut(null)}},Ie=async(O,ue)=>{if(ra){Ut(ra.issueId);try{await kd(ra.issueId,{developerAgentId:O,reviewerAgentId:ue}),Fa(null),jt()}catch($e){Fa(null),Ne(String($e)),jt()}finally{Ut(null)}}},Nt=async O=>{Ut(O),Ne(null);try{await Wy(O),jt()}catch(ue){Ne(String(ue))}finally{Ut(null)}},Ta=async O=>{Ut(O),Ne(null);try{await Py(O),jt()}catch(ue){Ne(String(ue)),jt()}finally{Ut(null)}},it=O=>{const ue=NS(_S(O));y(ue?Object.fromEntries(new URLSearchParams(ue)):{})},zt=()=>{X(SS),y({})},An=O=>{const ue=AS(g,O);y(ue?Object.fromEntries(new URLSearchParams(ue)):{})},Dl=O=>X(ue=>({...ue,...O})),Ls=async(O,ue,$e)=>{m(O),Ne(null);try{await tv(O,XS,ue,$e),s(),jt()}catch(It){Ne(String(It))}finally{m(null)}};w.useEffect(()=>{X(Cx(g))},[g]),w.useEffect(()=>{Ca(N.current),ld().then(Ia).catch(()=>{}),Nx([...id]).then(_n).catch(()=>{});const O=setInterval(()=>{Ca(N.current),ld().then(Ia).catch(()=>{})},5e3);return()=>clearInterval(O)},[g]),w.useEffect(()=>{B&&(O2().then(U).catch(()=>U([])),K==="linear"&&w2().then(be).catch(O=>Ne(`Linear inbox: ${String(O)}`)))},[B,K]),w.useEffect(()=>{rt&&(ie(`${rt.identifier}: ${rt.title}`),te(rt.description??""),xe(""),Le(O=>bS(O,rt)))},[rt]);const Ll=()=>{ie(""),Le(""),te(""),xe(""),vt(""),tt(""),$a(!0),$("main")},il=O=>{be(ue=>[O,...ue.filter($e=>$e.id!==O.id)]),vt(O.id),tt(O.identifier)},Us=async()=>{const O=ft.trim();if(!O){Ne("Paste a Linear id (e.g. NOT-103) or issue URL");return}wt(!0),Ne(null);try{const ue=await S2(O);il(ue)}catch(ue){Ne(`Linear lookup: ${String(ue)}`)}finally{wt(!1)}},zs=async()=>{if(!Rx({title:F,repo:ee,developerAgentId:fe,reviewerAgentId:we})){Ne("Title, GitHub repository, developer, and reviewer are required");return}try{await U2({title:F.trim(),repo:ee.trim(),baseBranch:_.trim()||"main",description:I.trim()||void 0,acceptanceCriteria:me.trim()||void 0,developerAgentId:fe,reviewerAgentId:we,maxReviewRounds:3,maxInfraAttempts:3,autoMerge:Ea,source:K==="linear"&&rt?"linear":"manual",externalId:rt==null?void 0:rt.id,externalLabel:rt==null?void 0:rt.identifier,externalUrl:rt==null?void 0:rt.url}),Z(!1),Ll(),jt()}catch(O){Ne(String(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 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:()=>Z(O=>!O),children:"New issue"})]}),ka&&c.jsx("p",{className:"text-sm text-red-300 mb-3",children:ka}),Et&&c.jsx(LS,{agents:n,onStartIssue:()=>Z(!0),onDismiss:ua}),B&&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 → ",Ea?"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 ${K==="manual"?"border-teal/50 text-teal":"border-white/10 text-white/50"}`,onClick:()=>{Te("manual"),vt("")},children:"Manual"}),c.jsx("button",{type:"button",className:`font-ui-display px-3 py-1 rounded border ${K==="linear"?"border-teal/50 text-teal":"border-white/10 text-white/50"}`,onClick:()=>Te("linear"),children:"From Linear"})]}),K==="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:ft,onChange:O=>tt(O.target.value),onKeyDown:O=>{O.key==="Enter"&&(O.preventDefault(),Us())}}),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:Lt||!ft.trim(),onClick:()=>void Us(),children:Lt?"…":"Lookup"})]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:Ye,onChange:O=>{const ue=O.target.value;vt(ue);const $e=J.find(It=>It.id===ue);$e&&tt($e.identifier)},children:[c.jsx("option",{value:"",children:"Or pick from open inbox…"}),J.map(O=>c.jsxs("option",{value:O.id,children:[O.identifier,": ",O.title]},O.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:F,disabled:ll,onChange:O=>ie(O.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:I,disabled:ll,onChange:O=>te(O.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 (derived from the ticket when left empty)",value:me,onChange:O=>xe(O.target.value)}),c.jsxs("div",{className:"flex gap-2 items-stretch",children:[c.jsxs("div",{className:"flex-1 space-y-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"text-xs text-white/50",children:"Repository"}),c.jsx("button",{type:"button","aria-label":"Configure repository mappings",title:"Configure repository mappings","aria-expanded":W,onClick:()=>ce(O=>!O),className:"text-white/40 hover:text-white shrink-0 rounded focus-visible:outline focus-visible:outline-2 focus-visible:outline-cyber-teal/45",children:c.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[c.jsx("path",{d:"M8 5.2a2.8 2.8 0 1 0 0 5.6 2.8 2.8 0 0 0 0-5.6Z",stroke:"currentColor",strokeWidth:"1.3"}),c.jsx("path",{d:"M8 1.5v1.7M8 12.8v1.7M1.5 8h1.7M12.8 8h1.7M3.4 3.4l1.2 1.2M11.4 11.4l1.2 1.2M12.6 3.4l-1.2 1.2M4.6 11.4l-1.2 1.2",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})})]}),c.jsx(uv,{value:ee,onChange:Le,recentRepos:Fe}),W&&c.jsx(BS,{recentRepos:Fe,onClose:()=>ce(!1)}),Ol&&c.jsx("p",{className:"text-xs text-amber-200/80","data-testid":"repo-label-warning",children:Ol})]}),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:_,onChange:O=>$(O.target.value)})]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:fe,onChange:O=>st(O.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),n.map(O=>c.jsx("option",{value:O.id,children:O.name},O.id))]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:we,onChange:O=>lt(O.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),n.map(O=>c.jsx("option",{value:O.id,children:O.name},O.id))]}),c.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/70 cursor-pointer",children:[c.jsx("input",{type:"checkbox",checked:Ea,onChange:O=>$a(O.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:!Ml,title:Ml?void 0:"Title, GitHub repository, developer, and reviewer are required",onClick:zs,children:K==="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:()=>{Z(!1),Ll()},children:"Cancel"})]})]}),Mt.length>0?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:Ee?c.jsxs(c.Fragment,{children:[c.jsxs("span",{children:[Ee.active," active · ",Ee.waiting," waiting · limit"," ",Ee.limit,Ee.overCap?" · over capacity":""]}),Ee.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:Ee.options.includes(Ee.maxActiveIssues)?Ee.maxActiveIssues:Ee.limit,disabled:Ra,title:Ee.ceiling<2?`Capped by the worker/spawn ceiling (${Ee.ceiling})`:"How many issues may execute in parallel (max one per repository)",onChange:O=>void G(Number(O.target.value)),children:Ee.options.map(O=>c.jsx("option",{value:O,children:O},O))})]}):c.jsxs("span",{title:`Capped by the worker/spawn ceiling (${Ee.ceiling})`,children:["max ",Ee.ceiling]})]}):c.jsxs("span",{children:[Mt.length," waiting · sequential"]})})]}),c.jsx("div",{className:"divide-y divide-white/5",children:Mt.map((O,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:O.position}),c.jsxs(ia,{to:`/issues/${O.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:O.title??O.issueId.slice(0,8)}),O.waitReason?c.jsx("span",{className:"text-xs text-amber-200/80 block mt-0.5",children:O.waitReason}):c.jsxs("span",{className:"text-xs text-white/35 block mt-0.5",children:[O.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===O.issueId,title:"Change the developer/reviewer agents — keeps queue position and rechecks the wait reason",onClick:()=>void De(O.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===O.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 Nt(O.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===O.issueId,title:"Execute now — start immediately, skipping queue order; refuses (changing nothing) when capacity, readiness, blockers, or agent health prevents it",onClick:()=>void Ta(O.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:()=>{Fr(O.issueId,"top").then(jt).catch($e=>Ne(String($e)))},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 $e=Mt[ue-1];$e&&Fr(O.issueId,{before:$e.issueId}).then(jt).catch(It=>Ne(String(It)))},children:"↑"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:ue===Mt.length-1,title:"Move down",onClick:()=>{const $e=Mt[ue+1];$e&&Fr(O.issueId,{after:$e.issueId}).then(jt).catch(It=>Ne(String(It)))},children:"↓"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:ue===Mt.length-1,title:"Move to bottom",onClick:()=>{Fr(O.issueId,"bottom").then(jt).catch($e=>Ne(String($e)))},children:"Bottom"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-white",onClick:()=>{ev(O.issueId).then(jt).catch($e=>Ne(String($e)))},children:"Remove"})]})]}),(ra==null?void 0:ra.issueId)===O.issueId&&c.jsx("div",{className:"px-4 pb-3 pl-12",children:c.jsx(qS,{agents:n,initialDeveloperId:ra.developerAgentId,initialReviewerId:ra.reviewerAgentId,busy:Wa===O.issueId,onSave:($e,It)=>void Ie($e,It),onCancel:()=>Fa(null)})})]},O.id))})]}):Ee?c.jsxs("p",{"data-testid":"admission-idle-status",className:"mb-4 text-xs text-white/35 tabular-nums",children:["Admission: ",Ee.active," active · ",Ee.waiting," waiting · limit"," ",Ee.limit,Ee.overCap?" · over capacity":"",Ee.options.length>0&&c.jsxs("label",{className:"ml-2 inline-flex items-center gap-1",children:[c.jsx("span",{children:"limit"}),c.jsx("select",{className:"bg-black/30 border border-white/10 rounded px-1.5 py-0.5 text-xs text-white/60 disabled:opacity-50",value:Ee.options.includes(Ee.maxActiveIssues)?Ee.maxActiveIssues:Ee.limit,disabled:Ra,title:Ee.ceiling<2?`Capped by the worker/spawn ceiling (${Ee.ceiling})`:"How many issues may execute in parallel (max one per repository)",onChange:O=>void G(Number(O.target.value)),children:Ee.options.map(O=>c.jsx("option",{value:O,children:O},O))})]})]}):null,c.jsx(QS,{actions:l,busyActionId:f,onResolve:(O,ue,$e)=>void Ls(O,ue,$e)}),c.jsxs("div",{className:"mb-4 rounded border border-white/10 bg-panel-elevated/60",children:[c.jsxs("button",{type:"button","aria-expanded":C,"aria-controls":"issues-filter-form",onClick:()=>Y(O=>!O),className:"w-full flex items-center gap-2 px-4 py-2.5 text-sm text-white/70 hover:text-white",children:[c.jsx("span",{"aria-hidden":"true",className:"text-xs text-white/40 w-3 shrink-0",children:C?"▾":"▸"}),c.jsx("span",{className:"font-ui-display",children:C?"Hide filters":"Show filters"}),D&&c.jsx("span",{"data-testid":"filters-active-indicator",title:"The issue list is filtered",className:"text-xs px-2 py-0.5 rounded-full border border-[#C4B643]/50 text-[#C4B643]",children:"Filtered"})]}),C&&c.jsx("form",{id:"issues-filter-form","aria-label":"Issues filters",className:"px-4 pb-4",onSubmit:O=>{O.preventDefault(),it(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:O=>Dl({q:O.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:O=>Dl({status:O.target.value}),children:[c.jsx("option",{value:"",children:"All statuses"}),id.map(O=>c.jsx("option",{value:O,children:O},O))]})]}),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:O=>Dl({repo:O.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:O=>Dl({needsAttention:O.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:zt,children:"Reset"})]})]})})]}),u===null?c.jsx("p",{className:"text-white/50 text-sm",children:"Loading…"}):u.total===0&&!Mx(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:Tx(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:zt,children:"Reset filters"})]}):c.jsxs("div",{children:[c.jsx("div",{className:"flex justify-end mb-2",children:c.jsxs("p",{className:"text-xs text-white/40 tabular-nums",children:[Tx(u),Ox(u)?` · ${Ox(u)}`:""]})}),c.jsx("div",{className:"space-y-2",children:u.issues.map(O=>{const ue=Mt.find($e=>$e.issueId===O.id);return c.jsxs(ia,{to:`/issues/${O.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:[O.hasOpenHumanAction&&c.jsx(vu,{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:O.title}),ue!=null&&ue.waitReason?c.jsx("p",{className:"text-xs text-amber-200/80 truncate",title:ue.waitReason,children:ue.waitReason}):O.currentIntent&&c.jsx("p",{className:"text-xs text-white/50 truncate",children:O.currentIntent})]}),c.jsx("span",{className:"text-xs text-white/40 capitalize shrink-0",children:O.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(iv,{status:O.status}),c.jsx("span",{className:"text-xs text-white/35 shrink-0 w-16 text-right",children:KS(O.updatedAt)})]},O.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:()=>An(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:()=>An(u.page+1),children:"Next"})]})]})]})}const IS=["developer","reviewer","legacy"],Dx=["claude_code","cursor_local","codex_local"],FS=["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"];function Si(n,l){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:l(n.p50),p95Text:n.p95===null?null:l(n.p95),sampleText:Gy(n.n),sampleTitle:`Sample size ${n.n}${Ad(n.n)?" — fewer than 5 observations, compare with care":""}`,sparse:Ad(n.n)}}function ba(n,l,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=l(n.sum),d=s!=null&&s.compact?o2(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 Ts(n,l,s){return n===null||l===0?{available:!1,valueText:"N/A",evidenceCounts:null,evidenceNoun:null,title:`No ${s} in this cohort`}:{available:!0,valueText:Cu(n),evidenceCounts:`${Ge(Math.round(n*l))}/${Ge(l)}`,evidenceNoun:s,title:`Exact share over ${l} ${s}`}}function Lx(n,l,s){const u=Ts(n,l,s);return u.available?{text:`${u.valueText} (${u.evidenceCounts} ${u.evidenceNoun})`,title:u.title}:{text:u.valueText,title:u.title}}function sd(n){const l=Lx(n.issueSuccess,n.issueSuccessDenominator,"closed"),s=Lx(n.attemptSuccess,n.attemptSuccessDenominator,"terminal attempts");return{key:n.key,issuesText:Ge(n.issues),attemptsText:Ge(n.attempts),issueSuccessText:l.text,issueSuccessTitle:l.title,attemptSuccessText:s.text,attemptSuccessTitle:s.title,issueSuccessDisplay:Ts(n.issueSuccess,n.issueSuccessDenominator,"closed"),attemptSuccessDisplay:Ts(n.attemptSuccess,n.attemptSuccessDenominator,"terminal attempts"),wallText:jx(n.sessionWallMs,Kt),envelopeText:jx(n.spawnEnvelopeMs,Kt),retryText:n.retryRate===null?"N/A":Cu(n.retryRate),retryTitle:"Extra attempts after a terminal attempt in the same issue/role/round ÷ attempts",tokensInText:Wn(n.tokensIn,Ge),tokensOutText:Wn(n.tokensOut,Ge),costText:Wn(n.costUsd,js),costIncomplete:n.costUsd.known<n.costUsd.total,durationText:Wn(n.durationMs,Kt),failedCostText:Wn(n.failedCostUsd,js),failedTokensText:`${Wn(n.failedTokensIn,Ge)} in · ${Wn(n.failedTokensOut,Ge)} out`,failedDurationText:Wn(n.failedDurationMs,Kt),wall:Si(n.sessionWallMs,Kt),envelope:Si(n.spawnEnvelopeMs,Kt),tokensIn:ba(n.tokensIn,Ge,{compact:!0}),tokensOut:ba(n.tokensOut,Ge,{compact:!0}),cost:ba(n.costUsd,js),duration:ba(n.durationMs,Kt),failedCost:ba(n.failedCostUsd,js),failedTokensIn:ba(n.failedTokensIn,Ge,{compact:!0}),failedTokensOut:ba(n.failedTokensOut,Ge,{compact:!0}),failedDuration:ba(n.failedDurationMs,Kt),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&&Ad(n.attempts)}}function WS(n,l){const s=n.code==="unknown";return{code:n.code,domain:n.domain,countText:Ge(n.count),shareText:n.share===null?"N/A":Cu(n.share),shareTitle:l>0?`${Ge(n.count)} of ${Ge(l)} 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 PS(n){const l=n.reduce((s,u)=>s+u.count,0);return n.map(s=>WS(s,l))}function ej(n){return`/issues/${n}`}function Ux(n,l){if(n!=null&&n.trim()&&/^\d{4}-\d{2}-\d{2}$/.test(n.trim()))return l?`${n.trim()}T23:59:59.999Z`:`${n.trim()}T00:00:00.000Z`}function zx(n){if(!n)return"";const l=n.match(/^(\d{4}-\d{2}-\d{2})/);return l?l[1]:""}function Bx(n){const l=new URLSearchParams(n.startsWith("?")?n.slice(1):n),s=u=>{var d;return((d=l.get(u))==null?void 0:d.trim())??""};return{fromDate:zx(s("from")),toDate:zx(s("to")),repo:s("repo"),role:s("role"),runtime:s("runtime"),model:s("model"),status:s("status")}}function tj(n){const l=new URLSearchParams(n.startsWith("?")?n.slice(1):n),s=d=>{var m;const f=(m=l.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 aj(n,l,s){const u=new URLSearchParams(n.startsWith("?")?n.slice(1):n);u.set(l,s),u.delete("page"),u.delete("limit"),u.sort();const d=u.toString();return`/reports/execution${d?`?${d}`:""}`}function nj(n){return{from:Ux(n.fromDate,!1),to:Ux(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 rd(n){return n===null?"N/A":Cu(n)}function La({label:n,value:l,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:l}),u&&c.jsx("div",{className:"mt-0.5 font-ui-display text-xs text-white/40",children:u})]})}function gu({display:n,compact:l}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",title:n.title,children:"N/A"});const s=l?"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 Ns({display:n,compact:l}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",children:"N/A"});const s=l?"font-ui-display text-[11px] uppercase tracking-wide text-white/40":"font-ui-display text-xs uppercase tracking-wide text-white/40",u=l?"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 wa({display:n,compact:l}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",children:"N/A"});const s=n.exactText??n.valueText,u=l?"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 ud({caption:n,dimension:l,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(ia,{to:u(l,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 ${l} ${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(gu,{display:d.issueSuccessDisplay,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",title:d.attemptSuccessTitle,children:c.jsx(gu,{display:d.attemptSuccessDisplay,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(Ns,{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(wa,{display:d.tokensIn,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(wa,{display:d.tokensOut,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(wa,{display:d.cost,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(wa,{display:d.duration,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(wa,{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(wa,{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(wa,{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(wa,{display:d.failedDuration,compact:!0})})]},d.key))})]})})}const lj={fromDate:"",toDate:"",repo:"",role:"",runtime:"",model:"",status:""};function ij({loading:n,error:l,report:s,onRetry:u,cohortLink:d}){const f=(s==null?void 0:s.summary)??null,m=w.useMemo(()=>s?PS(s.failures):[],[s]),x=w.useMemo(()=>s?s.failures.reduce((y,g)=>y+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&&l&&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: ",l]}),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&&!l&&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(y=>c.jsx("li",{children:y},y))})]}),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(La,{label:"Issue success",value:c.jsx(gu,{display:Ts(f.issueSuccess,f.closedIssues,"closed")}),valueTitle:`done / (done + closed), denominator ${f.closedIssues}`,note:`${Ge(f.issues)} issues · ${Ge(f.closedIssues)} closed`}),c.jsx(La,{label:"Attempt success",value:c.jsx(gu,{display:Ts(f.attemptSuccess,f.terminalAttempts,"terminal")}),valueTitle:`done sessions / terminal sessions, denominator ${f.terminalAttempts}`,note:`${Ge(f.attempts)} attempts · ${Ge(f.terminalAttempts)} terminal`}),c.jsx(La,{label:"Retry rate",value:rd(f.retryRate),valueTitle:`${f.retryExtraAttempts} extra attempts after a terminal attempt in the same issue/role/round ÷ ${f.attempts} attempts`,note:`Reuse rate ${rd(f.reuseRate)} over ${Ge(f.reuseDenominator)} reviewer sessions with input SHA`}),c.jsx(La,{label:"Human wait",value:Kt(f.humanWaitMs),note:`${Ge(f.interventions)} interventions`}),c.jsx(La,{label:"Session wall P50/P95",value:c.jsx(Ns,{display:Si(f.sessionWallMs,Kt)}),note:"Session bookkeeping proxy — never CLI runtime"}),c.jsx(La,{label:"Spawn envelope P50/P95",value:c.jsx(Ns,{display:Si(f.spawnEnvelopeMs,Kt)}),note:"Coordinator-measured; includes slot wait + post-exit work"}),c.jsx(La,{label:"Checkpoint latency P50/P95",value:c.jsx(Ns,{display:Si(f.checkpointMs,Kt)}),note:"Session start → first heartbeat"}),c.jsx(La,{label:"Reviewer rounds (avg)",value:f.avgReviewerRounds===null?"N/A":f.avgReviewerRounds.toFixed(1),note:`Change-request rate ${rd(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(La,{label:"Failed cost",value:c.jsx(wa,{display:ba(f.failedCostUsd,js)})}),c.jsx(La,{label:"Failed tokens",value:c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",children:[c.jsx(wa,{display:ba(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(wa,{display:ba(f.failedTokensOut,Ge,{compact:!0})}),c.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"out"})]})}),c.jsx(La,{label:"Failed runtime",value:c.jsx(wa,{display:ba(f.failedDurationMs,Kt)})})]})]}),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(y=>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:y.phase}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(Ns,{display:Si(y.stat,Kt),compact:!0})}),c.jsx("td",{className:"font-ui-display px-3 py-2 text-xs text-white/45",children:y.stat.reasons.join(", ")})]},y.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(ud,{caption:"By role",dimension:"role",rows:s.byRole.map(sd),cohortLink:d}),c.jsx(ud,{caption:"By runtime",dimension:"runtime",rows:s.byRuntime.map(sd),cohortLink:d}),c.jsx(ud,{caption:"By model",dimension:"model",rows:s.byModel.map(sd),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(x)," failed ",x===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(y=>c.jsxs("tr",{className:y.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:y.code,children:y.displayCode}),c.jsx("span",{className:`font-ui-display block text-xs font-normal ${y.isUnknown?"text-amber-200/90":"text-white/40"}`,children:y.displayNote})]}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:y.domain}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:y.countText}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",title:y.shareTitle,children:y.shareText}),c.jsx("td",{className:"px-3 py-2",children:c.jsxs("span",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[y.issueIds.map(g=>c.jsx(ia,{to:ej(g),className:"text-cyber-teal hover:underline font-mono text-xs",children:g.slice(0,8)},g)),y.hiddenIssueCount>0&&c.jsxs("span",{className:"font-ui-display text-xs text-white/40",children:["+",y.hiddenIssueCount," more"]})]})})]},y.code))})]})})]})]})]})]})}function sj(){const[n,l]=vy(),s=n.toString(),u=w.useMemo(()=>tj(s),[s]),[d,f]=w.useState(()=>Bx(s)),[m,x]=w.useState(null),[y,g]=w.useState(!0),[b,N]=w.useState(null),[L,X]=w.useState(0);w.useEffect(()=>{f(Bx(s))},[s]),w.useEffect(()=>{let D=!1;return g(!0),N(null),V2(u).then(B=>{D||(x(B),g(!1))}).catch(B=>{D||(N(B instanceof Error?B.message:String(B)),g(!1))}),()=>{D=!0}},[s,L]);const C=D=>{const B=Zy(nj(D));l(B?Object.fromEntries(new URLSearchParams(B)):{})},Y=D=>f(B=>({...B,...D}));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:D=>{D.preventDefault(),C(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:D=>Y({fromDate:D.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:D=>Y({toDate:D.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:D=>Y({repo:D.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:D=>Y({role:D.target.value}),children:[c.jsx("option",{value:"",children:"All roles"}),IS.map(D=>c.jsx("option",{value:D,children:D},D))]})]}),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:D=>{Y({runtime:D.target.value})},children:[c.jsx("option",{value:"",children:"All runtimes"}),Dx.map(D=>c.jsx("option",{value:D,children:D},D)),c.jsx("option",{value:"unknown",children:"unknown (missing metadata)"}),d.runtime&&!Dx.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:D=>Y({model:D.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:D=>Y({status:D.target.value}),children:[c.jsx("option",{value:"",children:"All statuses"}),FS.map(D=>c.jsx("option",{value:D,children:D},D))]})]}),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(lj),l({})},children:"Reset"})]})]})}),c.jsx(ij,{loading:y,error:b,report:m,onRetry:()=>X(D=>D+1),cohortLink:(D,B)=>aj(s,D,B)})]})}function qx(n,l){var d;if(!n)return"Not assigned";const s=l.find(f=>f.id===n);if(!s)return"Unavailable — profile removed";const u=`${s.name} · ${Na(s.runtime)}`;return s.healthy?u:`${u} (unhealthy: ${((d=s.issues[0])==null?void 0:d.message)??"needs attention"})`}function Hx(n,l){var u;if(!n)return;const s=l.find(d=>d.id===n);return s?`${s.name} · ${Na(s.runtime)}${s.healthy?" · healthy":` · ${((u=s.issues[0])==null?void 0:u.message)??"unhealthy"}`}`:`Configured profile ${n} is not on record (deleted?)`}function rj({agents:n,initialRepo:l,initialDeveloperId:s,initialReviewerId:u,busy:d,onSave:f,onCancel:m}){var W,ce;const[x,y]=w.useState(l),[g,b]=w.useState(s??""),[N,L]=w.useState(u??""),X=ov(n),C=n.find(K=>K.id===g),Y=n.find(K=>K.id===N),D=yu(C),B=yu(Y),Z=x.trim()===l&&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:x,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:K=>y(K.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:C?`${C.name} · ${Na(C.runtime)}${C.healthy?" · healthy":` · ${((W=C.issues[0])==null?void 0:W.message)??"unhealthy"}`}`:"Pick a developer agent",onChange:K=>b(K.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),X.map(K=>c.jsx("option",{value:K.id,title:tl(K),children:(K.healthy?"● ":"○ ")+tl(K)},K.id))]}),D&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:D})]}),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:Y?`${Y.name} · ${Na(Y.runtime)}${Y.healthy?" · healthy":` · ${((ce=Y.issues[0])==null?void 0:ce.message)??"unhealthy"}`}`:"Pick a reviewer agent",onChange:K=>L(K.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),X.map(K=>K.runtime==="muse_code"?c.jsx("option",{value:K.id,disabled:!0,title:"Muse Code cannot be a reviewer (developer role only)",children:`○ ${K.name} · ${Na(K.runtime)} — reviewer not supported`},K.id):c.jsx("option",{value:K.id,title:tl(K),children:(K.healthy?"● ":"○ ")+tl(K)},K.id))]}),B&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:B})]}),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||!x.trim()||!g||!N||Z,title:"Save via the issue PATCH contract — keeps queue position, rechecks readiness and the wait reason",onClick:()=>f(x.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 uj({issue:n,agents:l,canEdit:s,editing:u,busy:d,onBeginEdit:f,onSave:m,onCancel:x}){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:Hx(n.developerAgentId,l),children:[c.jsx("span",{className:"text-white/45",children:"Developer "}),qx(n.developerAgentId,l)]}),c.jsxs("p",{className:"text-sm text-white/85",title:Hx(n.reviewerAgentId,l),children:[c.jsx("span",{className:"text-white/45",children:"Reviewer "}),qx(n.reviewerAgentId,l)]}),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(rj,{agents:l,initialRepo:n.repo,initialDeveloperId:n.developerAgentId,initialReviewerId:n.reviewerAgentId,busy:d,onSave:m,onCancel:x})]})}function cj({contract:n}){return c.jsxs("section",{"aria-label":"Execution contract",className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03] space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("p",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Execution contract"}),c.jsx("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-cyber-teal/40 text-cyber-teal",children:n.version}),c.jsx("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-white/15 text-white/70",children:n.executionMode})]}),c.jsxs("div",{className:"text-sm text-white/85 space-y-1.5",children:[c.jsxs("p",{children:[c.jsx("span",{className:"text-white/45",children:"Exit predicate: "}),n.exitPredicate]}),c.jsxs("p",{children:[c.jsx("span",{className:"text-white/45",children:"One-PR stopping point: "}),n.onePrStoppingPoint]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-white/45",children:"Non-goals:"}),c.jsx("ul",{className:"list-disc pl-5 text-white/75",children:n.nonGoals.map(l=>c.jsx("li",{children:l},l))})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-white/45",children:"Acceptance criteria:"}),c.jsx("ul",{className:"space-y-1",children:n.acceptanceCriteria.map(l=>c.jsxs("li",{children:[c.jsxs("p",{className:"text-white/80",children:["☐ ",l.text]}),l.evidence&&c.jsxs("p",{className:"pl-5 text-xs text-white/55",children:["Evidence: ",l.evidence]})]},l.text))})]})]}),c.jsx("p",{className:"text-[11px] text-white/35",children:"Compiled from the ticket description — edit the description to change it."})]})}function eu(n){return n==="developer"?"Developer":n==="reviewer"?"Reviewer":"Worker"}const cd={"issue.created":()=>"Issue created","issue.reassigned":()=>"Configuration updated","workflow.started":()=>"Workflow started","worker.started":n=>`${eu(n.actorType)} started${n.round?` (round ${n.round})`:""}`,"worker.completed":n=>`${eu(n.actorType)} finished${n.round?` (round ${n.round})`:""}`,"worker.failed":n=>`${eu(n.actorType)} failed${n.round?` (round ${n.round})`:""}`,"worker.deferred":n=>{var l;return((l=_s(n.payloadJson))==null?void 0:l.outcome)==="deck_unavailable"?`Waiting for Agent Deck${n.round?` (round ${n.round})`:""}`:`${eu(n.actorType)} deferred${n.round?` (round ${n.round})`:""}`},"worktree.ready":()=>"Worktree ready","worktree.deps_ready":()=>"Dependencies 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 _s(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}const oj={approved:"text-cyber-teal",changes_requested:"text-amber-300",escalated:"text-red-300"};function dj({e:n}){var l;if(n.type==="pull_request.opened"||n.type==="pull_request.updated"){const s=_s(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=_s(n.payloadJson);return s?c.jsxs("span",{className:"text-sm",children:[c.jsx("span",{className:oj[s.verdict]??"text-white/70",children:s.verdict.replace("_"," ")}),(l=s.findings)!=null&&l.length?` · ${s.findings.length} finding(s)`:""]}):null}if(n.type==="guidance.added"){const s=_s(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=_s(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 fj(n){var l;return((l=cd[n.type])==null?void 0:l.call(cd,n))??n.type}const $x={human:"You",system:"System",developer:"Developer",reviewer:"Reviewer"},hj={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 mj(n){return n.actorRef?`${$x[n.actorType]} · ${n.actorRef}`:$x[n.actorType]}function pj({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(l=>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(l.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 ${hj[l.actorType]}`,children:mj(l)}),c.jsx("span",{className:"text-sm text-white/80",children:fj(l)}),c.jsx(dj,{e:l})]},l.id))})}function Ua(n){if(n==null||!Number.isFinite(n))return null;if(n<1e3)return"<1s";const l=Math.round(n/1e3);if(l<60)return`${l}s`;const s=Math.floor(l/60);if(s<60){const f=l%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 Yx(n){return n==null||!Number.isFinite(n)?null:`${Math.round(n).toLocaleString("en-US")} tokens`}function xj(n){return n==null||!Number.isFinite(n)?null:`$${n.toFixed(2)}`}const yj={queue_wait:"Queue / admission wait",coordinator_setup:"Setup",agent_process:"Agent process",coordinator_validation_publish:"Validation / publish",coordinator_work:"Coordinator work"},Vx={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"},Rd={worktree:"worktree",commit:"commit",verification_receipt:"verification receipt",publish_only:"publish-only result"},vj=new Set(["failed","timed_out","error"]);function Wd(n){return n.replace(/_/g," ")}function Os(n,l){const s=`Evidence quality: ${n}`;return l.length>0?`${s} — ${l.join(", ")}`:s}function Sa({quality:n,reasons:l}){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:Os(n,l),children:["· ",n,l.length>0&&c.jsxs("span",{className:"sr-only",children:[" (",l.join(", "),")"]})]})}function el({reasons:n}){const l=n.length>0?n.join(", "):"no reason recorded";return c.jsxs("span",{className:"text-white/45 italic",title:`Unavailable — ${l}`,children:["Unavailable",c.jsxs("span",{className:"text-[11px]",children:[" — ",l]})]})}function tu({covered:n,format:l,unit:s}){if(n.value==null)return c.jsx(el,{reasons:n.reasons});const u=n.known<n.total;return c.jsxs("span",{title:`${Os(n.quality,n.reasons)} · known ${n.known} of ${n.total} ${s}`,children:[l(n.value),c.jsx(Sa,{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 Zx({cause:n,primary:l}){return c.jsxs("div",{className:l?"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:l?"text-sm font-medium text-red-200":"text-xs text-white/60",children:[l?"First failure: ":"Consequence: ",Wd(n.code)]}),c.jsx("p",{className:l?"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:Os(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 gj({interval:n}){const l=Vx[n.category??"unknown"]??Vx.unknown,s=Ua(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:l}),c.jsx("span",{className:"text-xs tabular-nums",children:s??c.jsx(el,{reasons:n.reasons})}),c.jsx(Sa,{quality:n.quality,reasons:n.reasons})]})}function bj({attempt:n}){const l=n.reuseKinds;return l===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"}):l.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:l.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 ${Rd[s]??s} instead of starting cold.`,children:["reused ",Rd[s]??s]},s))})}function wj({attempt:n,isRetry:l}){const s=Ua(n.setup.durationMs),u=Ua(n.agentProcess.durationMs),d=Ua(n.validationPublish.durationMs),f=l&&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(bj,{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(Sa,{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(Sa,{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(Sa,{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=>Wd(m.code)).join(", ")]})]})}function Sj({analysis:n}){const l=Ua(n.elapsed.durationMs),s=Ua(n.exclusiveTotalMs),u=Ua(n.firstCheckpoint.msSinceWorkflowStart),d=n.nested.filter(C=>C.kind!=="unexplained_silence"),f=n.attempts.flatMap(C=>C.silence),m=n.attempts.length>0&&n.attempts.every(C=>C.silence.length===0&&C.silenceQuality==="unavailable"),x=n.attempts.filter(C=>C.silence.length===0&&C.silenceQuality==="unavailable"),y=n.waste.failedAttempts>0||n.waste.publishOnlyAttempts>0||n.attempts.some(C=>C.failureCauses.length>0||vj.has(C.status)),g=Ua(n.humanWaitMs),b=n.retry.reuseRate==null?null:`${Math.round(n.retry.reuseRate*100)}% reused`,L=(n.retry.preservedKinds??[]).map(C=>Rd[C]??C),X=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 ",l??c.jsx(el,{reasons:n.elapsed.reasons}),c.jsx(Sa,{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(el,{reasons:n.exclusiveTotalReasons}),c.jsx(Sa,{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(C=>{const Y=Ua(C.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:yj[C.phase]??C.phase}),c.jsx("span",{className:"text-white/85 tabular-nums",children:Y??c.jsx(el,{reasons:C.reasons})}),c.jsx(Sa,{quality:C.quality,reasons:C.reasons}),C.known<C.total&&c.jsxs("span",{className:"text-[11px] text-white/60",children:["(known ",C.known," of ",C.total,")"]})]},C.phase)})}),c.jsxs("p",{className:"text-xs text-white/45 tabular-nums mt-1",children:["Human wait ",g??c.jsx(el,{reasons:n.humanWaitReasons}),c.jsx(Sa,{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((C,Y)=>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:["↳ ",C.kind==="human_wait"?"Human wait":C.category??C.kind]})," ",Ua(C.durationMs)??c.jsx(el,{reasons:C.reasons}),c.jsx(Sa,{quality:C.quality,reasons:C.reasons})]},Y))})]}),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((C,Y)=>c.jsx(wj,{attempt:C,isRetry:Y>0},C.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(Zx,{cause:n.primaryFailure,primary:!0}),n.consequenceCauses.length>0&&c.jsx("div",{className:"space-y-1 opacity-80",children:n.consequenceCauses.map((C,Y)=>c.jsx(Zx,{cause:C,primary:!1},`${C.code}-${Y}`))})]}):y?c.jsxs("p",{className:"text-sm text-white/60 italic",title:Os("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",")"]}),X?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(tu,{covered:n.waste.runtimeMs,format:C=>Ua(Math.round(C))??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt input tokens over known values only",children:["In ",c.jsx(tu,{covered:n.waste.tokensIn,format:C=>Yx(C)??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt output tokens over known values only",children:["Out ",c.jsx(tu,{covered:n.waste.tokensOut,format:C=>Yx(C)??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt known cost over known values only",children:["Cost ",c.jsx(tu,{covered:n.waste.costUsd,format:C=>xj(C)??"?",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:Os(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?Wd(n.firstCheckpoint.kind):"Checkpoint",n.firstCheckpoint.observedSha?` · ${n.firstCheckpoint.observedSha.slice(0,12)}`:"",u?` · ${u} after workflow start`:"",c.jsx(Sa,{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(el,{reasons:n.retry.reasons}),c.jsx(Sa,{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((C,Y)=>c.jsx(gj,{interval:C},Y))}),x.length>0&&c.jsx("ul",{"aria-label":"Attempts with unknown silence",className:"mt-1",children:x.map(C=>c.jsxs("li",{className:"text-[11px] text-white/60 italic py-0.5",children:["Silence unknown for attempt ",C.sessionId.length>12?`${C.sessionId.slice(0,8)}…`:C.sessionId," —"," ",C.silenceReasons.join(", ")||"no silence evidence recorded"]},C.sessionId))})]})]})]})}function jj({issueId:n}){const[l,s]=w.useState(null),[u,d]=w.useState(null),[f,m]=w.useState(!0);return w.useEffect(()=>{s(null),d(null),m(!0);let x=!1;return M2(n).then(y=>{x||(s(y),m(!1))}).catch(y=>{x||(/not found/i.test(String(y))?(s(null),d(null)):d(String(y).replace(/^Error:\s*/i,"")),m(!1))}),()=>{x=!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&&!l&&c.jsx("p",{className:"text-xs text-white/45",children:"No execution analysis yet — start the workflow to see where time goes."}),!f&&!u&&l&&c.jsx(Sj,{analysis:l})]})}const Nj="web";function _j(n){try{const l=JSON.parse(n);return typeof l.text=="string"?l.text:JSON.stringify(l,null,2)}catch{return n}}function od(n){const l=Math.floor(n/6e4);return l<60?`${l}m`:`${Math.floor(l/60)}h ${l%60}m`}function Aj(n){if(!n)return"no heartbeat yet";const l=Math.max(0,Math.floor((Date.now()-new Date(n).getTime())/1e3));return l<5?"just now":l<60?`${l}s ago`:`${Math.floor(l/60)}m ago`}function As(n){if(!n)return null;const l=n.split(/[/\\]/).filter(Boolean);return l.length<=2?n:l.slice(-2).join("/")}function dd(n){var l;return[n.branch,n.tipLabel,(l=n.worktree)!=null&&l.path?As(n.worktree.path):null].filter(Boolean).join(" · ")}function fd(n){var l;return[n.restartRisk?"restart risk":null,(l=n.worktree)!=null&&l.preserved?"dirty worktree preserved":null].filter(Boolean).map(s=>` · ${s}`).join("")}function hd(n){var l;return!!(n.restartRisk||(l=n.worktree)!=null&&l.preserved)}function Ej(n,l){return!n||!l?!1:n===l?!0:n.includes(l)}function kj({busy:n,onConfirm:l,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:l,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 Rj(n){const l=n.humanActions.find(s=>s.status==="open");if(l)return zy(l).title;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 Cj({issueId:n,detail:l,agents:s,onHumanActionsChanged:u,refresh:d,onError:f}){var jt;const[m,x]=w.useState(null),[y,g]=w.useState({}),[b,N]=w.useState(""),[L,X]=w.useState(!1),[C,Y]=w.useState(""),[D,B]=w.useState(""),[Z,W]=w.useState(""),[ce,K]=w.useState(!1),[Te,J]=w.useState(null),[be,Ye]=w.useState(!1),[vt,ft]=w.useState(!1),[tt,Lt]=w.useState(null),[wt,Fe]=w.useState({}),[U,F]=w.useState({}),ie=G=>f(String(G)),{issue:ee,timeline:Le,humanActions:_,usageSummary:$,readiness:I,humanWaitMs:te,interventionCount:me,latestWorkflowInstance:xe,activeWorkerSession:fe,liveProgress:st,latestSessionFailure:we,branchTipStatus:lt,queued:Ea,queueEntry:$a}=l,ka=s.find(G=>G.id===ee.developerAgentId),Ne=ka&&!ka.healthy,Mt=((jt=ka==null?void 0:ka.issues[0])==null?void 0:jt.message)??"Developer agent is unhealthy",Ia=xe?new Date(xe.completedAt??Date.now()).getTime()-new Date(xe.startedAt).getTime():0,Ee=_.filter(G=>G.status==="open"),nl=I.ok===!1||Ee.some(G=>G.actionType==="product_scope_decision"),Ra=xe!=null&&xe.completedAt===null,jn=ee.status==="ready"&&!Ra,Nn=ee.status==="ready"&&!Ra,_n=fe&&fe.status==="running"&&(ee.status==="developing"||ee.status==="reviewing"||ee.status==="repairing"),Tl=!!we&&!_n,St=async()=>{b.trim()&&(await Y2(n,b),N(""),d())},ra=()=>{Y(ee.title),B(ee.description??""),W(ee.acceptanceCriteria??""),X(!0)},Fa=async()=>{K(!0),f(null);try{await kd(n,{title:C.trim()||void 0,description:D.trim()||null,acceptanceCriteria:Z.trim()||null}),X(!1),d()}catch(G){ie(G)}finally{K(!1)}},Wa=async()=>{K(!0),f(null);try{const G=await Wy(n);J(G.state==="admitted"?null:`Queued at position ${G.position}${G.waitReason?` — ${G.waitReason}`:""}`),d()}catch(G){ie(G)}finally{K(!1)}},Ut=async()=>{K(!0),f(null);try{await q2(n),d()}catch(G){ie(G)}finally{K(!1)}},rt=async()=>{K(!0),f(null);try{await Py(n),J(null),Ye(!1),d()}catch(G){ie(G),d()}finally{K(!1)}},ll=async(G,De,Ie)=>{K(!0),f(null);try{await kd(n,{repo:G,developerAgentId:De,reviewerAgentId:Ie}),Ye(!1),d()}catch(Nt){Ye(!1),ie(Nt),d()}finally{K(!1)}},Ol=async()=>{K(!0),f(null);try{await ev(n),d()}catch(G){ie(G)}finally{K(!1)}},Ml=async()=>{K(!0),f(null);try{await B2(n),ft(!1),Lt("Issue closed — it will not execute. History is retained and can be found as closed work."),d()}catch(G){ie(G)}finally{K(!1)}},Ca=async()=>{if(confirm("Abort this workflow? The current worker will stop and the issue will close. History and evidence are kept.")){K(!0),f(null);try{await z2(n),d()}catch(G){ie(G)}finally{K(!1)}}},gt=async(G,De,Ie)=>{K(!0),f(null);try{await tv(G,Nj,De,Ie),u(),d()}catch(Nt){ie(Nt)}finally{K(!1)}},ua=()=>{m||D2(n).then(x).catch(G=>ie(G))},Et=G=>{y[G]||(g(De=>({...De,[G]:{content:"",loading:!0}})),L2(n,G).then(De=>g(Ie=>({...Ie,[G]:{content:De.content,loading:!1}}))).catch(De=>g(Ie=>({...Ie,[G]:{content:"",loading:!1,error:String(De)}}))))};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(ia,{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:ee.title}),c.jsxs("p",{className:"text-xs text-white/45 mt-1",children:["Owner: ",c.jsx("span",{className:"capitalize",children:ee.currentOwner}),ee.currentIntent?` · ${ee.currentIntent}`:""]}),c.jsxs("div",{className:"flex flex-wrap gap-3 mt-2 text-xs text-white/40",children:[ee.prUrl&&c.jsxs("a",{href:ee.prUrl,target:"_blank",rel:"noreferrer",className:"text-cyber-teal hover:underline",children:["PR #",ee.prNumber]}),ee.externalUrl&&c.jsx("a",{href:ee.externalUrl,target:"_blank",rel:"noreferrer",className:"text-cyber-teal hover:underline",children:ee.externalLabel??"External link"}),c.jsxs("span",{children:["Round ",ee.currentRound,"/",ee.maxReviewRounds]}),c.jsxs("span",{children:["Infra attempts ",ee.infraAttempts,"/",ee.maxInfraAttempts]}),c.jsxs("span",{title:"Wall-clock time from workflow start to completion (or now)",children:[od(Ia)," elapsed"]}),c.jsxs("span",{title:`${$.totalTokensIn} in / ${$.totalTokensOut} out tokens`,children:["$",$.totalCostUsd.toFixed(2)]}),te>0&&c.jsxs("span",{title:"Time spent waiting on a human, excluding autonomous processing",children:[od(te)," human wait"]}),me>0&&c.jsxs("span",{children:[me," intervention",me===1?"":"s"]})]})]}),c.jsx(iv,{status:ee.status})]}),tt&&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:tt})}),c.jsx(uj,{issue:ee,agents:s,canEdit:Nn,editing:be,busy:ce,onBeginEdit:()=>Ye(!0),onSave:(G,De,Ie)=>void ll(G,De,Ie),onCancel:()=>Ye(!1)}),ee.executionContract&&c.jsx(cj,{contract:ee.executionContract}),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:Rj(l)})]}),Ra&&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:ce,onClick:Ca,children:"Abort workflow"})]}),$a&&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 ",$a.position]}),c.jsx("p",{className:"text-sm text-white/80 mt-0.5",children:$a.waitReason??"Next up — starts as soon as the coordinator ticks"})]}),_n&&fe&&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:fe.role}),fe.runtime?` · ${fe.runtime}`:"",fe.model?` · ${fe.model}`:"",` · round ${fe.round}`]}),c.jsxs("p",{className:"text-sm text-[#C4B643] truncate",title:st??ee.currentIntent??"session started",children:["Last progress: ",st??ee.currentIntent??"session started"]}),lt&&c.jsxs("p",{className:`text-xs ${hd(lt)?"text-amber-300":"text-white/55"}`,title:dd(lt),children:["Branch tip: ",lt.tipLabel,fd(lt)]}),st&&ee.currentIntent&&!/session running/i.test(ee.currentIntent)&&!Ej(ee.currentIntent,st)&&c.jsx("p",{className:"text-xs text-white/45 truncate",title:ee.currentIntent,children:ee.currentIntent}),c.jsxs("p",{className:"text-xs text-white/45",children:["Heartbeat ",Aj(fe.heartbeatAt),As(fe.worktreePath)?` · ${As(fe.worktreePath)}`:""]}),fe.logPath&&c.jsxs("p",{className:"text-xs text-white/40 font-mono break-all",title:fe.logPath,children:["Log: ",As(fe.logPath)??fe.logPath]})]}),Tl&&we&&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:we.reason}),c.jsxs("p",{className:"text-xs text-white/45",children:[we.role?c.jsx("span",{className:"capitalize",children:we.role}):"Worker",we.outcome?` · ${we.outcome}`:"",` · ${new Date(we.when).toLocaleString()}`,` · infra ${we.infraAttempts}/${we.maxInfraAttempts}`]}),lt&&c.jsxs("p",{className:`text-xs ${hd(lt)?"text-amber-300":"text-white/55"}`,title:dd(lt),children:["Branch tip: ",lt.tipLabel,fd(lt)]}),we.logPath&&c.jsxs("p",{className:"text-xs text-white/40 font-mono break-all",title:we.logPath,children:["Log: ",As(we.logPath)??we.logPath]})]}),lt&&!_n&&!Tl&&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 ${hd(lt)?"text-amber-300":"text-white/80"}`,title:dd(lt),children:[lt.tipLabel,fd(lt)]})]}),!I.ok&&!Ee.some(G=>G.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: ",I.missing.join(", ")]})}),Ee.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"}),Ee.map(G=>{const De=G.actionType==="product_scope_decision";if(G.actionType==="operator_verification"){const Ie=VS(G),Nt=U[G.id]??"",Ta=Nt.trim().length>0;return c.jsx(ks,{action:G,hideChoicesHint:!0,children:c.jsxs("div",{className:"space-y-1",children:[c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm text-white/85 placeholder:text-white/30",rows:2,placeholder:"Result note (required) — paste the probe output, waiver reason, or repair note",value:Nt,disabled:ce,onChange:it=>F(zt=>({...zt,[G.id]:it.target.value}))}),c.jsx("div",{className:"flex flex-wrap gap-2",children:Ie.map(it=>c.jsx("button",{type:"button",className:"btn-gold px-3 py-1 text-xs disabled:opacity-50",disabled:ce||!Ta,title:Ta?void 0:"Enter the result note first — the server requires it",onClick:()=>gt(G.id,it.choice,Nt),children:it.label},it.choice))})]})},G.id)}return De?c.jsx(ks,{action:G,hideChoicesHint:!0,children:I.ok&&c.jsxs("div",{className:"space-y-1",children:[c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm text-white/85 placeholder:text-white/30",rows:2,placeholder:"Decision note (optional) — shown to the next developer round",value:wt[G.id]??"",disabled:ce,onChange:Ie=>Fe(Nt=>({...Nt,[G.id]:Ie.target.value}))}),c.jsx("button",{type:"button",className:"btn-gold px-3 py-1 text-xs",disabled:ce,onClick:()=>gt(G.id,"resume",wt[G.id]),children:"Resume"})]})},G.id):c.jsx(ks,{action:G,disabled:ce,onChoose:Ie=>gt(G.id,Ie)},G.id)})]}),nl&&!L&&c.jsx("button",{type:"button",className:"font-ui-display mb-4 text-xs text-cyber-teal hover:underline",onClick:ra,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:C,onChange:G=>Y(G.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:D,onChange:G=>B(G.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:Z,onChange:G=>W(G.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:ce,onClick:Fa,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:()=>X(!1),children:"Cancel"})]})]}),(ee.status==="ready"||ee.status==="needs_human"&&Ee.length===0)&&c.jsxs("div",{className:"mb-4 space-y-2",children:[Ne&&c.jsxs("p",{className:"text-sm text-amber-200/90",children:["Fix before Start: ",Mt]}),Te&&c.jsx("p",{className:"text-sm text-amber-200/90",children:Te}),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:!I.ok||ce||!!Ne,title:Ne?Mt:"Run next — move to the front of the admission queue; runs now if a slot is free, otherwise waits first with a reason",onClick:Wa,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:!I.ok||ce||!!Ne,title:Ne?Mt:"Execute now — start immediately, skipping queue order; refuses (changing nothing) when capacity, readiness, blockers, or agent health prevents it",onClick:rt,children:"Execute now"}),Ea?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:ce,onClick:Ol,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:ce||Ra,title:"Add to queue — append to the end of the admission queue; does not start anything now",onClick:Ut,children:"Add to queue"})]}),Ea&&Nn&&!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(jj,{issueId:n}),c.jsx("div",{className:"border-t border-white/10 pt-3",children:c.jsx(pj,{events:Le})}),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:G=>N(G.target.value),onKeyDown:G=>G.key==="Enter"&&St()}),c.jsx("button",{type:"button",className:"btn-gold px-4",onClick:St,children:"Send"})]}),jn&&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."}),vt?c.jsx(kj,{busy:ce,onConfirm:()=>void Ml(),onCancel:()=>ft(!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:ce,title:"Retire this issue without running it — removes any queue entry, keeps history as closed work",onClick:()=>ft(!0),children:"Close issue"})]})]}),c.jsxs("details",{className:"mt-6",onToggle:G=>G.currentTarget.open&&ua(),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(G=>{const De=m.usageEvents.filter(it=>it.workerSessionId===G.id),Ie=De.reduce((it,zt)=>it+(zt.costUsd??0),0),Nt=De.reduce((it,zt)=>it+(zt.tokensIn??0),0),Ta=De.reduce((it,zt)=>it+(zt.tokensOut??0),0);return c.jsxs("p",{children:[G.role," round ",G.round," · ",G.status,G.startedAt&&G.completedAt?` · ${od(new Date(G.completedAt).getTime()-new Date(G.startedAt).getTime())}`:"",De.length>0?` · $${Ie.toFixed(3)} · ${Nt}→${Ta} tok`:""]},G.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(G=>{const De=y[G.id];return c.jsxs("details",{className:"mb-1.5",onToggle:Ie=>Ie.currentTarget.open&&G.blobPath&&Et(G.id),children:[c.jsxs("summary",{className:"cursor-pointer hover:text-white/80",children:[G.kind," · ",new Date(G.createdAt).toLocaleString()]}),c.jsxs("div",{className:"mt-1 pl-3 border-l border-white/10 space-y-1",children:[G.contentJson&&c.jsx("pre",{className:"whitespace-pre-wrap break-words text-white/55",children:_j(G.contentJson)}),G.blobPath&&c.jsxs("div",{children:[c.jsxs("p",{className:"text-white/40",children:["Raw trace: ",G.blobPath]}),(De==null?void 0:De.loading)&&c.jsx("p",{className:"text-white/35",children:"Loading trace…"}),(De==null?void 0:De.error)&&c.jsx("p",{className:"text-red-300/80",children:De.error}),De&&!De.loading&&!De.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:De.content||"(empty)"})]}),!G.contentJson&&!G.blobPath&&c.jsx("p",{className:"text-white/35",children:"No content recorded."})]})]},G.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 Tj({issueId:n,agents:l,onHumanActionsChanged:s}){const[u,d]=w.useState(null),[f,m]=w.useState(null),[x,y]=w.useState(!1),g=()=>Fy(n).then(b=>{d(b),m(null),y(!1)}).catch(b=>{const N=String(b).replace(/^Error:\s*/i,"").trim();/^not found$/i.test(N)?(y(!0),m(null),d(null)):(m(N),y(!1))});return w.useEffect(()=>{d(null),m(null),y(!1),g();const b=setInterval(g,4e3);return()=>clearInterval(b)},[n]),x?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(ia,{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(ia,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]}):u?c.jsx(Cj,{issueId:n,detail:u,agents:l,onHumanActionsChanged:s,refresh:g,onError:b=>m(b)},n):c.jsx("div",{className:"p-6 text-white/50 text-sm",children:"Loading…"})}function Oj(){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(ia,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]})})}function Mj(){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 Dj({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 Lj="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 Uj({className:n="",size:l=36}){return c.jsx("img",{src:Lj,alt:"",width:l,height:l,className:`shrink-0 object-contain ${n}`,"aria-hidden":!0,draggable:!1})}const bu={unsupported:"not reported by provider",missing:"no data yet",expired:"expired",unparsable:"provider data unparsable",stale:"stale"},Gx="5H",Qx="1W",zj=new Set(["claude_code","codex_local","muse_code"]),Bj="billing_cycle",qj="1M",Hj=new Set(Ht.options),$j={critical:"font-medium text-red-300",warning:"font-medium text-yellow-300",normal:"font-medium text-white/75"};function Yj(n){return{fiveHour:n.find(l=>l.criticalRole==="five_hour")??null,weekly:n.find(l=>l.criticalRole==="weekly")??null}}function dv(n,l,s){if(n.unavailableReason!==null)return n.unavailableReason;if(n.remainingPercent===null||n.source==="unavailable")return s??"missing";if(n.resetAt!==null){const u=Date.parse(n.resetAt);if(!Number.isFinite(u)||u<=l)return"expired"}if(n.freshUntil!==null){const u=Date.parse(n.freshUntil);if(!Number.isFinite(u)||u<=l)return"stale"}if(n.expiresAt!==null){const u=Date.parse(n.expiresAt);if(!Number.isFinite(u)||u<=l)return"expired"}if(n.observedAt){const u=Date.parse(n.observedAt);if(!Number.isFinite(u)||u>l+6e4)return"stale"}return s??"missing"}function Xx(n,l,s,u,d=null){if(By(n,l)){const f=Math.round(n.remainingPercent??0),m=n.resetAt?`, resets ${new Date(n.resetAt).toLocaleString()}`:"",x=d?`, ${d}`:"";return`${u}: ${f}% available (${100-f}% used${x}${m})`}return`${u}: N/A (${bu[dv(n,l,s)]})`}function Cd(n,l,s,u,d,f=null){if(By(n,s)){const x=n.remainingPercent??0;return{key:n.windowKey,label:d,kind:"known",remaining:Math.round(x),rawRemaining:x,detail:Xx(n,s,l.unavailableReason,d,f),isCritical:u}}const m=dv(n,s,l.unavailableReason);return{key:n.windowKey,label:d,kind:"unknown",reason:m,detail:Xx(n,s,l.unavailableReason,d,f),isCritical:u}}function Kx(n,l){const s=l.unavailableReason??"missing";return{key:`missing:${n}`,label:n,kind:"unknown",reason:s,detail:`${n}: N/A (${bu[s]})`,isCritical:!0}}function Vj(n,l,s){return Cd(n,l,s,!0,qj,"current billing cycle")}function Zj(n,l=Date.now()){return n.runtimes.map(s=>{const u=Na(s.runtime),d=s.runtime;if(s.runtime==="cursor_local"){const f=s.windows.find(x=>x.windowKey===Bj)??null;if(f===null)return{runtime:u,runtimeKey:d,windows:[],exhausted:!1,detail:`N/A (${bu[s.unavailableReason??"missing"]})`};const m=Vj(f,s,l);return{runtime:u,runtimeKey:d,windows:[m],exhausted:m.kind==="known"&&m.rawRemaining===0,detail:m.detail}}if(zj.has(s.runtime)){const{fiveHour:f,weekly:m}=Yj(s.windows),x=f!==null?Cd(f,s,l,!0,Gx):Kx(Gx,s),y=m!==null?Cd(m,s,l,!0,Qx):Kx(Qx,s),g=[x,y],b=g.some(L=>L.kind==="known"&&L.rawRemaining===0),N=g.map(L=>L.detail).join("; ");return{runtime:u,runtimeKey:d,windows:g,exhausted:b,detail:N}}return{runtime:u,runtimeKey:d,windows:[],exhausted:!1,detail:`N/A (${bu[s.unavailableReason??"missing"]})`}})}function Jx(n){return n.exhausted?`${n.runtime} exhausted — a capacity window is at 0%: ${n.detail}`:`${n.runtime}: ${n.detail}`}function Gj({state:n,nowMs:l}){if(n.status==="loading")return c.jsxs("span",{"data-testid":"topbar-capacity","data-status":"loading",title:"Agent capacity is loading",className:"inline-flex min-w-0 max-w-full flex-wrap items-center gap-x-2 gap-y-1 whitespace-nowrap text-xs text-white/40",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),c.jsx("span",{"aria-live":"polite",children:"loading…"})]});if(n.status==="unavailable")return c.jsxs("span",{"data-testid":"topbar-capacity","data-status":"unavailable",title:"Agent capacity is unavailable — the capacity read failed",className:"inline-flex min-w-0 max-w-full flex-wrap items-center gap-x-2 gap-y-1 whitespace-nowrap text-xs text-white/40",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),c.jsx("span",{children:"unavailable"})]});const s=Zj(n.data,l),u=s.length===0||s.every(d=>!d.windows.some(f=>f.kind==="known"));return c.jsxs("span",{"data-testid":"topbar-capacity","data-status":u?"unknown":"ready",title:s.length===0?"Agent capacity: no runtime accounts reported":s.map(Jx).join(" · "),className:"inline-flex min-w-0 max-w-full flex-wrap items-center gap-x-3 gap-y-1 text-xs",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),s.length===0?c.jsx("span",{className:"whitespace-nowrap text-white/35",children:"N/A"}):s.map(d=>{const f=d.windows.some(m=>m.kind==="known");return c.jsxs("span",{"data-testid":`topbar-capacity-${d.runtime}`,"data-known":f?"true":"false","data-exhausted":d.exhausted?"true":"false",title:Jx(d),role:"group","aria-label":`${Hj.has(d.runtimeKey)?d.runtime:"Unknown runtime"} capacity`,className:d.exhausted?"inline-flex items-center gap-1.5 whitespace-nowrap rounded border border-red-400/40 bg-red-500/10 px-1.5 py-0.5":"inline-flex items-center gap-1.5 whitespace-nowrap",children:[c.jsx(lv,{runtime:d.runtimeKey,className:"h-4 w-4 shrink-0"}),d.windows.length===0?c.jsx("span",{className:"text-white/35",children:"N/A"}):c.jsx("span",{className:"inline-flex flex-col leading-tight",children:d.windows.map(m=>c.jsxs("span",{"data-window":m.label,"data-window-known":m.kind==="known"?"true":"false",className:"inline-flex items-center gap-1 whitespace-nowrap tabular-nums",children:[c.jsx("span",{className:"text-white/40",children:m.label}),m.kind==="known"?(()=>{const x=av(m.rawRemaining);return c.jsxs("span",{"data-severity":x,className:$j[x],children:[m.remaining,"%"]})})():c.jsx("span",{className:"text-white/35",children:"N/A"})]},m.key))})]},d.runtime)})]})}const Ix=5e3;function md({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 Qj({agents:n,onHumanActionsChanged:l}){const{issueId:s}=vb();return s?c.jsx(Tj,{issueId:s,agents:n,onHumanActionsChanged:l},s):c.jsx(py,{to:"/issues",replace:!0})}function Xj({openHumanActionCount:n,agentCount:l,agentIssueCount:s,capacity:u={status:"loading"}}){return c.jsxs("header",{className:"px-6 py-3 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(ia,{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(Uj,{size:40}),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.jsxs("nav",{className:"flex gap-1",children:[c.jsxs(lu,{to:"/issues",className:md,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(vu,{className:"w-3 h-3 shrink-0"}),n]})]}),c.jsx(lu,{to:"/reports/execution",className:md,children:"Reports"})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 min-w-0",children:[c.jsx(Gj,{state:u}),c.jsxs(lu,{to:"/agents",className:({isActive:d})=>`${md({isActive:d})} inline-flex items-center gap-1.5 transition-colors`,"aria-label":"Agents",title:"Agents",children:[c.jsx(Dj,{className:"w-6 h-6 shrink-0"}),c.jsx("span",{children:"Agents"}),l>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:`${l} configured agent${l===1?"":"s"}`,children:l}),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(vu,{className:"w-3 h-3 shrink-0"}),s]})]})]})]})}function Kj(){const[n,l]=w.useState([]),[s,u]=w.useState(0),[d,f]=w.useState(!1),[m,x]=w.useState([]),[y,g]=w.useState({status:"loading"}),b=w.useCallback(()=>{_2().then(({agents:C,issueCount:Y})=>{l(C),u(Y)}).catch(console.error),Iy().then(C=>f(C.connected)).catch(()=>f(!1)),Jy().then(C=>g({status:"ready",data:C})).catch(()=>g({status:"unavailable"}))},[]),N=w.useCallback(()=>Z2().then(x).catch(()=>{}),[]);w.useEffect(()=>{b();const C=setInterval(b,Ix);return()=>clearInterval(C)},[b]),w.useEffect(()=>{N();const C=setInterval(()=>void N(),Ix);return()=>clearInterval(C)},[N]);const L=m.length,X=n.length;return c.jsxs(c.Fragment,{children:[c.jsx(Mj,{}),c.jsxs("div",{className:"relative z-10 min-h-screen flex flex-col",children:[c.jsx(Xj,{openHumanActionCount:L,agentCount:X,agentIssueCount:s,capacity:y}),c.jsx("main",{className:"flex-1 flex overflow-hidden",children:c.jsxs(Mb,{children:[c.jsx(jl,{path:"/",element:c.jsx(py,{to:"/issues",replace:!0})}),c.jsx(jl,{path:"/issues",element:c.jsx(JS,{agents:n,humanActions:m,onHumanActionsChanged:N})}),c.jsx(jl,{path:"/issues/:issueId",element:c.jsx(Qj,{agents:n,onHumanActionsChanged:N})}),c.jsx(jl,{path:"/agents",element:c.jsx(yS,{agents:n,agentDeckOnline:d,onRefresh:b})}),c.jsx(jl,{path:"/reports/execution",element:c.jsx(sj,{})}),c.jsx(jl,{path:"*",element:c.jsx(Oj,{})})]})})]})]})}function Jj(){return typeof document>"u"?Promise.resolve():document.fonts.load('13px "Monaco"').then(()=>{}).catch(()=>{})}Jj();O0.createRoot(document.getElementById("root")).render(c.jsx(w.StrictMode,{children:c.jsx(l1,{children:c.jsx(Kj,{})})}));
|