agent-dealer 1.2.12 → 1.2.13
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/linear-inbox.js +72 -16
- package/bundle/server/dist/adapters/linear-inbox.test.js +183 -1
- package/bundle/server/dist/repository/intake-settings.js +50 -0
- package/bundle/server/dist/repository/intake-settings.test.js +72 -0
- package/bundle/server/dist/routes/index.js +6 -3
- package/bundle/server/dist/routes/intake-linear-config.js +31 -0
- package/bundle/server/dist/routes/intake-linear.test.js +95 -5
- package/bundle/server/package.json +2 -2
- package/bundle/server/static-ui/assets/index-BzLjMBI9.js +64 -0
- package/bundle/server/static-ui/assets/index-COYJxD1y.css +1 -0
- package/bundle/server/static-ui/index.html +2 -2
- package/bundle/shared/dist/index.d.ts +303 -0
- package/bundle/shared/dist/index.js +47 -0
- package/bundle/shared/dist/linear-intake.d.ts +14 -0
- package/bundle/shared/dist/linear-intake.js +23 -0
- package/bundle/shared/dist/linear-intake.test.js +41 -2
- package/bundle/shared/package.json +1 -1
- package/package.json +1 -1
- package/bundle/server/static-ui/assets/index-CBdkhTI_.js +0 -64
- package/bundle/server/static-ui/assets/index-K_YcYkQU.css +0 -1
|
@@ -1,64 +0,0 @@
|
|
|
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 Zo={exports:{}},ws={};/**
|
|
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 N0(){if(Qp)return ws;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 ws.Fragment=l,ws.jsx=s,ws.jsxs=s,ws}var Xp;function _0(){return Xp||(Xp=1,Zo.exports=N0()),Zo.exports}var c=_0(),Go={exports:{}},ye={};/**
|
|
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 A0(){if(Kp)return ye;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"),v=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),L=Symbol.iterator;function G(w){return w===null||typeof w!="object"?null:(w=L&&w[L]||w["@@iterator"],typeof w=="function"?w:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$=Object.assign,D={};function B(w,Y,W){this.props=w,this.context=Y,this.refs=D,this.updater=W||R}B.prototype.isReactComponent={},B.prototype.setState=function(w,Y){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,Y,"setState")},B.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function F(){}F.prototype=B.prototype;function P(w,Y,W){this.props=w,this.context=Y,this.refs=D,this.updater=W||R}var J=P.prototype=new F;J.constructor=P,$(J,B.prototype),J.isPureReactComponent=!0;var Q=Array.isArray;function Oe(){}var K={H:null,A:null,T:null,S:null},we=Object.prototype.hasOwnProperty;function Ye(w,Y,W){var te=W.ref;return{$$typeof:n,type:w,key:Y,ref:te!==void 0?te:null,props:W}}function mt(w,Y){return Ye(w.type,Y,w.props)}function ot(w){return typeof w=="object"&&w!==null&&w.$$typeof===n}function nt(w){var Y={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(W){return Y[W]})}var Nt=/\/+/g;function wt(w,Y){return typeof w=="object"&&w!==null&&w.key!=null?nt(""+w.key):Y.toString(36)}function We(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(Oe,Oe):(w.status="pending",w.then(function(Y){w.status==="pending"&&(w.status="fulfilled",w.value=Y)},function(Y){w.status==="pending"&&(w.status="rejected",w.reason=Y)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function U(w,Y,W,te,de){var xe=typeof w;(xe==="undefined"||xe==="boolean")&&(w=null);var Ne=!1;if(w===null)Ne=!0;else switch(xe){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(w.$$typeof){case n:case l:Ne=!0;break;case b:return Ne=w._init,U(Ne(w._payload),Y,W,te,de)}}if(Ne)return de=de(w),Ne=te===""?"."+wt(w,0):te,Q(de)?(W="",Ne!=null&&(W=Ne.replace(Nt,"$&/")+"/"),U(de,Y,W,"",function(oa){return oa})):de!=null&&(ot(de)&&(de=mt(de,W+(de.key==null||w&&w.key===de.key?"":(""+de.key).replace(Nt,"$&/")+"/")+Ne)),Y.push(de)),1;Ne=0;var lt=te===""?".":te+":";if(Q(w))for(var ve=0;ve<w.length;ve++)te=w[ve],xe=lt+wt(te,ve),Ne+=U(te,Y,W,xe,de);else if(ve=G(w),typeof ve=="function")for(w=ve.call(w),ve=0;!(te=w.next()).done;)te=te.value,xe=lt+wt(te,ve++),Ne+=U(te,Y,W,xe,de);else if(xe==="object"){if(typeof w.then=="function")return U(We(w),Y,W,te,de);throw Y=String(w),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function I(w,Y,W){if(w==null)return w;var te=[],de=0;return U(w,te,"","",function(xe){return Y.call(W,xe,de++)}),te}function ce(w){if(w._status===-1){var Y=w._result;Y=Y(),Y.then(function(W){(w._status===0||w._status===-1)&&(w._status=1,w._result=W)},function(W){(w._status===0||w._status===-1)&&(w._status=2,w._result=W)}),w._status===-1&&(w._status=0,w._result=Y)}if(w._status===1)return w._result.default;throw w._result}var Me=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},pe={map:I,forEach:function(w,Y,W){I(w,function(){Y.apply(this,arguments)},W)},count:function(w){var Y=0;return I(w,function(){Y++}),Y},toArray:function(w){return I(w,function(Y){return Y})||[]},only:function(w){if(!ot(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return ye.Activity=_,ye.Children=pe,ye.Component=B,ye.Fragment=s,ye.Profiler=d,ye.PureComponent=P,ye.StrictMode=u,ye.Suspense=v,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,ye.__COMPILER_RUNTIME={__proto__:null,c:function(w){return K.H.useMemoCache(w)}},ye.cache=function(w){return function(){return w.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(w,Y,W){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var te=$({},w.props),de=w.key;if(Y!=null)for(xe in Y.key!==void 0&&(de=""+Y.key),Y)!we.call(Y,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&Y.ref===void 0||(te[xe]=Y[xe]);var xe=arguments.length-2;if(xe===1)te.children=W;else if(1<xe){for(var Ne=Array(xe),lt=0;lt<xe;lt++)Ne[lt]=arguments[lt+2];te.children=Ne}return Ye(w.type,de,te)},ye.createContext=function(w){return w={$$typeof:m,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:f,_context:w},w},ye.createElement=function(w,Y,W){var te,de={},xe=null;if(Y!=null)for(te in Y.key!==void 0&&(xe=""+Y.key),Y)we.call(Y,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(de[te]=Y[te]);var Ne=arguments.length-2;if(Ne===1)de.children=W;else if(1<Ne){for(var lt=Array(Ne),ve=0;ve<Ne;ve++)lt[ve]=arguments[ve+2];de.children=lt}if(w&&w.defaultProps)for(te in Ne=w.defaultProps,Ne)de[te]===void 0&&(de[te]=Ne[te]);return Ye(w,xe,de)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(w){return{$$typeof:x,render:w}},ye.isValidElement=ot,ye.lazy=function(w){return{$$typeof:b,_payload:{_status:-1,_result:w},_init:ce}},ye.memo=function(w,Y){return{$$typeof:g,type:w,compare:Y===void 0?null:Y}},ye.startTransition=function(w){var Y=K.T,W={};K.T=W;try{var te=w(),de=K.S;de!==null&&de(W,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(Oe,Me)}catch(xe){Me(xe)}finally{Y!==null&&W.types!==null&&(Y.types=W.types),K.T=Y}},ye.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},ye.use=function(w){return K.H.use(w)},ye.useActionState=function(w,Y,W){return K.H.useActionState(w,Y,W)},ye.useCallback=function(w,Y){return K.H.useCallback(w,Y)},ye.useContext=function(w){return K.H.useContext(w)},ye.useDebugValue=function(){},ye.useDeferredValue=function(w,Y){return K.H.useDeferredValue(w,Y)},ye.useEffect=function(w,Y){return K.H.useEffect(w,Y)},ye.useEffectEvent=function(w){return K.H.useEffectEvent(w)},ye.useId=function(){return K.H.useId()},ye.useImperativeHandle=function(w,Y,W){return K.H.useImperativeHandle(w,Y,W)},ye.useInsertionEffect=function(w,Y){return K.H.useInsertionEffect(w,Y)},ye.useLayoutEffect=function(w,Y){return K.H.useLayoutEffect(w,Y)},ye.useMemo=function(w,Y){return K.H.useMemo(w,Y)},ye.useOptimistic=function(w,Y){return K.H.useOptimistic(w,Y)},ye.useReducer=function(w,Y,W){return K.H.useReducer(w,Y,W)},ye.useRef=function(w){return K.H.useRef(w)},ye.useState=function(w){return K.H.useState(w)},ye.useSyncExternalStore=function(w,Y,W){return K.H.useSyncExternalStore(w,Y,W)},ye.useTransition=function(){return K.H.useTransition()},ye.version="19.2.7",ye}var Jp;function Td(){return Jp||(Jp=1,Go.exports=A0()),Go.exports}var S=Td(),Qo={exports:{}},Ss={},Xo={exports:{}},Ko={};/**
|
|
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 E0(){return Ip||(Ip=1,(function(n){function l(U,I){var ce=U.length;U.push(I);e:for(;0<ce;){var Me=ce-1>>>1,pe=U[Me];if(0<d(pe,I))U[Me]=I,U[ce]=pe,ce=Me;else break e}}function s(U){return U.length===0?null:U[0]}function u(U){if(U.length===0)return null;var I=U[0],ce=U.pop();if(ce!==I){U[0]=ce;e:for(var Me=0,pe=U.length,w=pe>>>1;Me<w;){var Y=2*(Me+1)-1,W=U[Y],te=Y+1,de=U[te];if(0>d(W,ce))te<pe&&0>d(de,W)?(U[Me]=de,U[te]=ce,Me=te):(U[Me]=W,U[Y]=ce,Me=Y);else if(te<pe&&0>d(de,ce))U[Me]=de,U[te]=ce,Me=te;else break e}}return I}function d(U,I){var ce=U.sortIndex-I.sortIndex;return ce!==0?ce:U.id-I.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 v=[],g=[],b=1,_=null,L=3,G=!1,R=!1,$=!1,D=!1,B=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function J(U){for(var I=s(g);I!==null;){if(I.callback===null)u(g);else if(I.startTime<=U)u(g),I.sortIndex=I.expirationTime,l(v,I);else break;I=s(g)}}function Q(U){if($=!1,J(U),!R)if(s(v)!==null)R=!0,Oe||(Oe=!0,nt());else{var I=s(g);I!==null&&We(Q,I.startTime-U)}}var Oe=!1,K=-1,we=5,Ye=-1;function mt(){return D?!0:!(n.unstable_now()-Ye<we)}function ot(){if(D=!1,Oe){var U=n.unstable_now();Ye=U;var I=!0;try{e:{R=!1,$&&($=!1,F(K),K=-1),G=!0;var ce=L;try{t:{for(J(U),_=s(v);_!==null&&!(_.expirationTime>U&&mt());){var Me=_.callback;if(typeof Me=="function"){_.callback=null,L=_.priorityLevel;var pe=Me(_.expirationTime<=U);if(U=n.unstable_now(),typeof pe=="function"){_.callback=pe,J(U),I=!0;break t}_===s(v)&&u(v),J(U)}else u(v);_=s(v)}if(_!==null)I=!0;else{var w=s(g);w!==null&&We(Q,w.startTime-U),I=!1}}break e}finally{_=null,L=ce,G=!1}I=void 0}}finally{I?nt():Oe=!1}}}var nt;if(typeof P=="function")nt=function(){P(ot)};else if(typeof MessageChannel<"u"){var Nt=new MessageChannel,wt=Nt.port2;Nt.port1.onmessage=ot,nt=function(){wt.postMessage(null)}}else nt=function(){B(ot,0)};function We(U,I){K=B(function(){U(n.unstable_now())},I)}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"):we=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 I=3;break;default:I=L}var ce=L;L=I;try{return U()}finally{L=ce}},n.unstable_requestPaint=function(){D=!0},n.unstable_runWithPriority=function(U,I){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ce=L;L=U;try{return I()}finally{L=ce}},n.unstable_scheduleCallback=function(U,I,ce){var Me=n.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?Me+ce:Me):ce=Me,U){case 1:var pe=-1;break;case 2:pe=250;break;case 5:pe=1073741823;break;case 4:pe=1e4;break;default:pe=5e3}return pe=ce+pe,U={id:b++,callback:I,priorityLevel:U,startTime:ce,expirationTime:pe,sortIndex:-1},ce>Me?(U.sortIndex=ce,l(g,U),s(v)===null&&U===s(g)&&($?(F(K),K=-1):$=!0,We(Q,ce-Me))):(U.sortIndex=pe,l(v,U),R||G||(R=!0,Oe||(Oe=!0,nt()))),U},n.unstable_shouldYield=mt,n.unstable_wrapCallback=function(U){var I=L;return function(){var ce=L;L=I;try{return U.apply(this,arguments)}finally{L=ce}}}})(Ko)),Ko}var Fp;function k0(){return Fp||(Fp=1,Xo.exports=E0()),Xo.exports}var Jo={exports:{}},zt={};/**
|
|
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 C0(){if(Wp)return zt;Wp=1;var n=Td();function l(v){var g="https://react.dev/errors/"+v;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+v+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var u={d:{f:s,r:function(){throw Error(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(v,g,b){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:_==null?null:""+_,children:v,containerInfo:g,implementation:b}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(v,g){if(v==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,zt.createPortal=function(v,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(l(299));return f(v,g,null,b)},zt.flushSync=function(v){var g=m.T,b=u.p;try{if(m.T=null,u.p=2,v)return v()}finally{m.T=g,u.p=b,u.d.f()}},zt.preconnect=function(v,g){typeof v=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,u.d.C(v,g))},zt.prefetchDNS=function(v){typeof v=="string"&&u.d.D(v)},zt.preinit=function(v,g){if(typeof v=="string"&&g&&typeof g.as=="string"){var b=g.as,_=x(b,g.crossOrigin),L=typeof g.integrity=="string"?g.integrity:void 0,G=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?u.d.S(v,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:_,integrity:L,fetchPriority:G}):b==="script"&&u.d.X(v,{crossOrigin:_,integrity:L,fetchPriority:G,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},zt.preinitModule=function(v,g){if(typeof v=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=x(g.as,g.crossOrigin);u.d.M(v,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&u.d.M(v)},zt.preload=function(v,g){if(typeof v=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,_=x(b,g.crossOrigin);u.d.L(v,b,{crossOrigin:_,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})}},zt.preloadModule=function(v,g){if(typeof v=="string")if(g){var b=x(g.as,g.crossOrigin);u.d.m(v,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else u.d.m(v)},zt.requestFormReset=function(v){u.d.r(v)},zt.unstable_batchedUpdates=function(v,g){return v(g)},zt.useFormState=function(v,g,b){return m.H.useFormState(v,g,b)},zt.useFormStatus=function(){return m.H.useHostTransitionStatus()},zt.version="19.2.7",zt}var Pp;function R0(){if(Pp)return Jo.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(),Jo.exports=C0(),Jo.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 T0(){if(ex)return Ss;ex=1;var n=k0(),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 v(e){if(f(e)!==e)throw Error(u(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,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 v(r),e;if(o===i)return v(r),t;o=o.sibling}throw Error(u(188))}if(a.return!==i.return)a=r,i=o;else{for(var h=!1,y=r.child;y;){if(y===a){h=!0,a=r,i=o;break}if(y===i){h=!0,i=r,a=o;break}y=y.sibling}if(!h){for(y=o.child;y;){if(y===a){h=!0,a=o,i=r;break}if(y===i){h=!0,i=o,a=r;break}y=y.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 _=Object.assign,L=Symbol.for("react.element"),G=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),F=Symbol.for("react.consumer"),P=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),Oe=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),we=Symbol.for("react.lazy"),Ye=Symbol.for("react.activity"),mt=Symbol.for("react.memo_cache_sentinel"),ot=Symbol.iterator;function nt(e){return e===null||typeof e!="object"?null:(e=ot&&e[ot]||e["@@iterator"],typeof e=="function"?e:null)}var Nt=Symbol.for("react.client.reference");function wt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Nt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $:return"Fragment";case B:return"Profiler";case D:return"StrictMode";case Q:return"Suspense";case Oe:return"SuspenseList";case Ye:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case P:return e.displayName||"Context";case F:return(e._context.displayName||"Context")+".Consumer";case J:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return t=e.displayName||null,t!==null?t:wt(e.type)||"Memo";case we:t=e._payload,e=e._init;try{return wt(e(t))}catch{}}return null}var We=Array.isArray,U=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},Me=[],pe=-1;function w(e){return{current:e}}function Y(e){0>pe||(e.current=Me[pe],Me[pe]=null,pe--)}function W(e,t){pe++,Me[pe]=e.current,e.current=t}var te=w(null),de=w(null),xe=w(null),Ne=w(null);function lt(e,t){switch(W(xe,t),W(de,e),W(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}}Y(te),W(te,e)}function ve(){Y(te),Y(de),Y(xe)}function oa(e){e.memoizedState!==null&&W(Ne,e);var t=te.current,a=xp(t,e.type);t!==a&&(W(de,e),W(te,a))}function it(e){de.current===e&&(Y(te),Y(de)),Ne.current===e&&(Y(Ne),ys._currentValue=ce)}var st,_n;function De(e){if(st===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);st=t&&t[1]||"",_n=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+st+e+_n}var _t=!1;function It(e,t){if(!e||_t)return"";_t=!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],y=o[1];if(h&&y){var j=h.split(`
|
|
44
|
-
`),C=y.split(`
|
|
45
|
-
`);for(r=i=0;i<j.length&&!j[i].includes("DetermineComponentFrameRoot");)i++;for(;r<C.length&&!C[r].includes("DetermineComponentFrameRoot");)r++;if(i===j.length||r===C.length)for(i=j.length-1,r=C.length-1;1<=i&&0<=r&&j[i]!==C[r];)r--;for(;1<=i&&0<=r;i--,r--)if(j[i]!==C[r]){if(i!==1||r!==1)do if(i--,r--,0>r||j[i]!==C[r]){var z=`
|
|
46
|
-
`+j[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{_t=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?De(a):""}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return De(e.type);case 16:return De("Lazy");case 13:return e.child!==t&&t!==null?De("Suspense Fallback"):De("Suspense");case 19:return De("SuspenseList");case 0:case 15:return It(e.type,!1);case 11:return It(e.type.render,!1);case 1:return It(e.type,!0);case 31:return De("Activity");default:return""}}function en(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 An=Object.prototype.hasOwnProperty,Ft=n.unstable_scheduleCallback,En=n.unstable_cancelCallback,Ml=n.unstable_shouldYield,kn=n.unstable_requestPaint,At=n.unstable_now,Wt=n.unstable_getCurrentPriorityLevel,Oa=n.unstable_ImmediatePriority,Za=n.unstable_UserBlockingPriority,Lt=n.unstable_NormalPriority,rt=n.unstable_LowPriority,rl=n.unstable_IdlePriority,Dl=n.log,Ll=n.unstable_setDisableYieldValue,Ma=null,Et=null;function da(e){if(typeof Dl=="function"&&Ll(e),Et&&typeof Et.setStrictMode=="function")try{Et.setStrictMode(Ma,e)}catch{}}var kt=Math.clz32?Math.clz32:Ti,Ct=Math.log,Ul=Math.LN2;function Ti(e){return e>>>=0,e===0?32:31-(Ct(e)/Ul|0)|0}var Ga=256,Cn=262144,Rn=4194304;function fa(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 Z(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 y=i&134217727;return y!==0?(i=y&~o,i!==0?r=fa(i):(h&=y,h!==0?r=fa(h):a||(a=y&~e,a!==0&&(r=fa(a))))):(y=i&~o,y!==0?r=fa(y):h!==0?r=fa(h):a||(a=i&~e,a!==0&&(r=fa(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 ge(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(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 Ut(){var e=Rn;return Rn<<=1,(Rn&62914560)===0&&(Rn=4194304),e}function Da(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function dt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ha(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 y=e.entanglements,j=e.expirationTimes,C=e.hiddenUpdates;for(a=h&~a;0<a;){var z=31-kt(a),V=1<<z;y[z]=0,j[z]=-1;var T=C[z];if(T!==null)for(C[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-kt(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-kt(a),r=1<<i;r&t|e[i]&t&&(e[i]|=t),a&=~r}}function re(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 Pt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Pd(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:qp(e.type))}function ef(e,t){var a=I.p;try{return I.p=e,t()}finally{I.p=a}}var Tn=Math.random().toString(36).slice(2),Rt="__reactFiber$"+Tn,$t="__reactProps$"+Tn,zl="__reactContainer$"+Tn,Du="__reactEvents$"+Tn,hv="__reactListeners$"+Tn,mv="__reactHandles$"+Tn,tf="__reactResources$"+Tn,Oi="__reactMarker$"+Tn;function Lu(e){delete e[Rt],delete e[$t],delete e[Du],delete e[hv],delete e[mv]}function Bl(e){var t=e[Rt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[zl]||a[Rt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=jp(e);e!==null;){if(a=e[Rt])return a;e=jp(e)}return t}e=a,a=e.parentNode}return null}function ql(e){if(e=e[Rt]||e[zl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Mi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Hl(e){var t=e[tf];return t||(t=e[tf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function St(e){e[Oi]=!0}var af=new Set,nf={};function ul(e,t){$l(e,t),$l(e+"Capture",t)}function $l(e,t){for(nf[e]=t,e=0;e<t.length;e++)af.add(t[e])}var pv=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 xv(e){return An.call(sf,e)?!0:An.call(lf,e)?!1:pv.test(e)?sf[e]=!0:(lf[e]=!0,!1)}function Bs(e,t,a){if(xv(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 tn(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 ma(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 yv(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 Uu(e){if(!e._valueTracker){var t=rf(e)?"checked":"value";e._valueTracker=yv(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 vv=/[\n"\\]/g;function pa(e){return e.replace(vv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function zu(e,t,a,i,r,o,h,y){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=""+ma(t)):e.value!==""+ma(t)&&(e.value=""+ma(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?Bu(e,h,ma(t)):a!=null?Bu(e,h,ma(a)):i!=null&&e.removeAttribute("value"),r==null&&o!=null&&(e.defaultChecked=!!o),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.name=""+ma(y):e.removeAttribute("name")}function cf(e,t,a,i,r,o,h,y){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)){Uu(e);return}a=a!=null?""+ma(a):"",t=t!=null?""+ma(t):a,y||t===e.value||(e.value=t),e.defaultValue=t}i=i??r,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=y?e.checked:!!i,e.defaultChecked=!!i,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Uu(e)}function Bu(e,t,a){t==="number"&&Hs(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Yl(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=""+ma(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=""+ma(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+ma(a):""}function df(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(u(92));if(We(i)){if(1<i.length)throw Error(u(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=ma(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),Uu(e)}function Vl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var gv=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||gv.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 qu(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 bv=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"]]),wv=/^[\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 wv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function an(){}var Hu=null;function $u(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zl=null,Gl=null;function mf(e){var t=ql(e);if(t&&(e=t.stateNode)){var a=e[$t]||null;e:switch(e=t.stateNode,t.type){case"input":if(zu(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="'+pa(""+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));zu(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&&Yl(e,!!a.multiple,t,!1)}}}var Yu=!1;function pf(e,t,a){if(Yu)return e(t,a);Yu=!0;try{var i=e(t);return i}finally{if(Yu=!1,(Zl!==null||Gl!==null)&&(kr(),Zl&&(t=Zl,e=Gl,Gl=Zl=null,mf(t),e)))for(t=0;t<e.length;t++)mf(e[t])}}function Di(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 nn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vu=!1;if(nn)try{var Li={};Object.defineProperty(Li,"passive",{get:function(){Vu=!0}}),window.addEventListener("test",Li,Li),window.removeEventListener("test",Li,Li)}catch{Vu=!1}var On=null,Zu=null,Ys=null;function xf(){if(Ys)return Ys;var e,t=Zu,a=t.length,i,r="value"in On?On.value:On.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 y in e)e.hasOwnProperty(y)&&(a=e[y],this[y]=a?a(o):o[y]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Zs:yf,this.isPropagationStopped=yf,this}return _(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 cl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gs=Yt(cl),Ui=_({},cl,{view:0,detail:0}),Sv=Yt(Ui),Gu,Qu,zi,Qs=_({},Ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ku,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!==zi&&(zi&&e.type==="mousemove"?(Gu=e.screenX-zi.screenX,Qu=e.screenY-zi.screenY):Qu=Gu=0,zi=e),Gu)},movementY:function(e){return"movementY"in e?e.movementY:Qu}}),vf=Yt(Qs),jv=_({},Qs,{dataTransfer:0}),Nv=Yt(jv),_v=_({},Ui,{relatedTarget:0}),Xu=Yt(_v),Av=_({},cl,{animationName:0,elapsedTime:0,pseudoElement:0}),Ev=Yt(Av),kv=_({},cl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Cv=Yt(kv),Rv=_({},cl,{data:0}),gf=Yt(Rv),Tv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ov={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"},Mv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Mv[e])?!!t[e]:!1}function Ku(){return Dv}var Lv=_({},Ui,{key:function(e){if(e.key){var t=Tv[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"?Ov[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ku,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}}),Uv=Yt(Lv),zv=_({},Qs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bf=Yt(zv),Bv=_({},Ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ku}),qv=Yt(Bv),Hv=_({},cl,{propertyName:0,elapsedTime:0,pseudoElement:0}),$v=Yt(Hv),Yv=_({},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}),Vv=Yt(Yv),Zv=_({},cl,{newState:0,oldState:0}),Gv=Yt(Zv),Qv=[9,13,27,32],Ju=nn&&"CompositionEvent"in window,Bi=null;nn&&"documentMode"in document&&(Bi=document.documentMode);var Xv=nn&&"TextEvent"in window&&!Bi,wf=nn&&(!Ju||Bi&&8<Bi&&11>=Bi),Sf=" ",jf=!1;function Nf(e,t){switch(e){case"keyup":return Qv.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 Ql=!1;function Kv(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 Jv(e,t){if(Ql)return e==="compositionend"||!Ju&&Nf(e,t)?(e=xf(),Ys=Zu=On=null,Ql=!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 Iv={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"?!!Iv[e.type]:t==="textarea"}function Ef(e,t,a,i){Zl?Gl?Gl.push(i):Gl=[i]:Zl=i,t=Lr(t,"onChange"),0<t.length&&(a=new Gs("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var qi=null,Hi=null;function Fv(e){cp(e,0)}function Xs(e){var t=Mi(e);if(uf(t))return e}function kf(e,t){if(e==="change")return t}var Cf=!1;if(nn){var Iu;if(nn){var Fu="oninput"in document;if(!Fu){var Rf=document.createElement("div");Rf.setAttribute("oninput","return;"),Fu=typeof Rf.oninput=="function"}Iu=Fu}else Iu=!1;Cf=Iu&&(!document.documentMode||9<document.documentMode)}function Tf(){qi&&(qi.detachEvent("onpropertychange",Of),Hi=qi=null)}function Of(e){if(e.propertyName==="value"&&Xs(Hi)){var t=[];Ef(t,Hi,e,$u(e)),pf(Fv,t)}}function Wv(e,t,a){e==="focusin"?(Tf(),qi=t,Hi=a,qi.attachEvent("onpropertychange",Of)):e==="focusout"&&Tf()}function Pv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xs(Hi)}function eg(e,t){if(e==="click")return Xs(t)}function tg(e,t){if(e==="input"||e==="change")return Xs(t)}function ag(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ea=typeof Object.is=="function"?Object.is:ag;function $i(e,t){if(ea(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(!An.call(t,r)||!ea(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 Wu(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 ng=nn&&"documentMode"in document&&11>=document.documentMode,Xl=null,Pu=null,Yi=null,ec=!1;function zf(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ec||Xl==null||Xl!==Hs(i)||(i=Xl,"selectionStart"in i&&Wu(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}),Yi&&$i(Yi,i)||(Yi=i,i=Lr(Pu,"onSelect"),0<i.length&&(t=new Gs("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=Xl)))}function ol(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Kl={animationend:ol("Animation","AnimationEnd"),animationiteration:ol("Animation","AnimationIteration"),animationstart:ol("Animation","AnimationStart"),transitionrun:ol("Transition","TransitionRun"),transitionstart:ol("Transition","TransitionStart"),transitioncancel:ol("Transition","TransitionCancel"),transitionend:ol("Transition","TransitionEnd")},tc={},Bf={};nn&&(Bf=document.createElement("div").style,"AnimationEvent"in window||(delete Kl.animationend.animation,delete Kl.animationiteration.animation,delete Kl.animationstart.animation),"TransitionEvent"in window||delete Kl.transitionend.transition);function dl(e){if(tc[e])return tc[e];if(!Kl[e])return e;var t=Kl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Bf)return tc[e]=t[a];return e}var qf=dl("animationend"),Hf=dl("animationiteration"),$f=dl("animationstart"),lg=dl("transitionrun"),ig=dl("transitionstart"),sg=dl("transitioncancel"),Yf=dl("transitionend"),Vf=new Map,ac="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(" ");ac.push("scrollEnd");function La(e,t){Vf.set(e,t),ul(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)},xa=[],Jl=0,nc=0;function Js(){for(var e=Jl,t=nc=Jl=0;t<e;){var a=xa[t];xa[t++]=null;var i=xa[t];xa[t++]=null;var r=xa[t];xa[t++]=null;var o=xa[t];if(xa[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){xa[Jl++]=e,xa[Jl++]=t,xa[Jl++]=a,xa[Jl++]=i,nc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function lc(e,t,a,i){return Is(e,t,a,i),Fs(e)}function fl(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-kt(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<os)throw os=0,mo=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Il={};function rg(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 ta(e,t,a,i){return new rg(e,t,a,i)}function ic(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ln(e,t){var a=e.alternate;return a===null?(a=ta(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")ic(e)&&(h=1);else if(typeof e=="string")h=f0(e,a,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Ye:return e=ta(31,a,t,r),e.elementType=Ye,e.lanes=o,e;case $:return hl(a.children,r,o,t);case D:h=8,r|=24;break;case B:return e=ta(12,a,t,r|2),e.elementType=B,e.lanes=o,e;case Q:return e=ta(13,a,t,r),e.elementType=Q,e.lanes=o,e;case Oe:return e=ta(19,a,t,r),e.elementType=Oe,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case P:h=10;break e;case F:h=9;break e;case J:h=11;break e;case K:h=14;break e;case we:h=16,i=null;break e}h=29,a=Error(u(130,e===null?"null":typeof e,"")),i=null}return t=ta(h,a,t,r),t.elementType=e,t.type=i,t.lanes=o,t}function hl(e,t,a,i){return e=ta(7,e,i,t),e.lanes=a,e}function sc(e,t,a){return e=ta(6,e,null,t),e.lanes=a,e}function Qf(e){var t=ta(18,null,null,0);return t.stateNode=e,t}function rc(e,t,a){return t=ta(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 ya(e,t){if(typeof e=="object"&&e!==null){var a=Xf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:en(t)},Xf.set(e,t),t)}return{value:e,source:t,stack:en(t)}}var Fl=[],Wl=0,Ps=null,Vi=0,va=[],ga=0,Mn=null,Qa=1,Xa="";function sn(e,t){Fl[Wl++]=Vi,Fl[Wl++]=Ps,Ps=e,Vi=t}function Kf(e,t,a){va[ga++]=Qa,va[ga++]=Xa,va[ga++]=Mn,Mn=e;var i=Qa;e=Xa;var r=32-kt(i)-1;i&=~(1<<r),a+=1;var o=32-kt(t)+r;if(30<o){var h=r-r%5;o=(i&(1<<h)-1).toString(32),i>>=h,r-=h,Qa=1<<32-kt(t)+r|a<<r|i,Xa=o+e}else Qa=1<<o|a<<r|i,Xa=e}function uc(e){e.return!==null&&(sn(e,1),Kf(e,1,0))}function cc(e){for(;e===Ps;)Ps=Fl[--Wl],Fl[Wl]=null,Vi=Fl[--Wl],Fl[Wl]=null;for(;e===Mn;)Mn=va[--ga],va[ga]=null,Xa=va[--ga],va[ga]=null,Qa=va[--ga],va[ga]=null}function Jf(e,t){va[ga++]=Qa,va[ga++]=Xa,va[ga++]=Mn,Qa=t.id,Xa=t.overflow,Mn=e}var Tt=null,Pe=null,Le=!1,Dn=null,ba=!1,oc=Error(u(519));function Ln(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Zi(ya(t,e)),oc}function If(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[Rt]=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<fs.length;a++)Ae(fs[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=an),t=!0):t=!1,t||Ln(e,!0)}function Ff(e){for(Tt=e.return;Tt;)switch(Tt.tag){case 5:case 31:case 13:ba=!1;return;case 27:case 3:ba=!0;return;default:Tt=Tt.return}}function Pl(e){if(e!==Tt)return!1;if(!Le)return Ff(e),Le=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Co(e.type,e.memoizedProps)),a=!a),a&&Pe&&Ln(e),Ff(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Pe=Sp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Pe=Sp(e)}else t===27?(t=Pe,Jn(e.type)?(e=Do,Do=null,Pe=e):Pe=t):Pe=Tt?Sa(e.stateNode.nextSibling):null;return!0}function ml(){Pe=Tt=null,Le=!1}function dc(){var e=Dn;return e!==null&&(Qt===null?Qt=e:Qt.push.apply(Qt,e),Dn=null),e}function Zi(e){Dn===null?Dn=[e]:Dn.push(e)}var fc=w(null),pl=null,rn=null;function Un(e,t,a){W(fc,t._currentValue),t._currentValue=a}function un(e){e._currentValue=fc.current,Y(fc)}function hc(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 mc(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 y=o;o=r;for(var j=0;j<t.length;j++)if(y.context===t[j]){o.lanes|=a,y=o.alternate,y!==null&&(y.lanes|=a),hc(o.return,a,e),i||(h=null);break e}o=y.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),hc(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 ei(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 y=r.type;ea(r.pendingProps.value,h.value)||(e!==null?e.push(y):e=[y])}}else if(r===Ne.current){if(h=r.alternate,h===null)throw Error(u(387));h.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(ys):e=[ys])}r=r.return}e!==null&&mc(t,e,a,i),t.flags|=262144}function er(e){for(e=e.firstContext;e!==null;){if(!ea(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xl(e){pl=e,rn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ot(e){return Wf(pl,e)}function tr(e,t){return pl===null&&xl(e),Wf(e,t)}function Wf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},rn===null){if(e===null)throw Error(u(308));rn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else rn=rn.next=t;return a}var ug=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()})}},cg=n.unstable_scheduleCallback,og=n.unstable_NormalPriority,pt={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pc(){return{controller:new ug,data:new Map,refCount:0}}function Gi(e){e.refCount--,e.refCount===0&&cg(og,function(){e.controller.abort()})}var Qi=null,xc=0,ti=0,ai=null;function dg(e,t){if(Qi===null){var a=Qi=[];xc=0,ti=bo(),ai={status:"pending",value:void 0,then:function(i){a.push(i)}}}return xc++,t.then(Pf,Pf),t}function Pf(){if(--xc===0&&Qi!==null){ai!==null&&(ai.status="fulfilled");var e=Qi;Qi=null,ti=0,ai=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function fg(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=At(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&dg(e,t),eh!==null&&eh(e,t)};var yl=w(null);function yc(){var e=yl.current;return e!==null?e:Ie.pooledCache}function ar(e,t){t===null?W(yl,yl.current):W(yl,t.pool)}function th(){var e=yc();return e===null?null:{parent:pt._currentValue,pool:e}}var ni=Error(u(460)),vc=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(an,an),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(an,an);else{if(e=Ie,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 gl=t,ni}}function vl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(gl=a,ni):a}}var gl=null;function lh(){if(gl===null)throw Error(u(459));var e=gl;return gl=null,e}function ih(e){if(e===ni||e===nr)throw Error(u(483))}var li=null,Xi=0;function ir(e){var t=Xi;return Xi+=1,li===null&&(li=[]),nh(li,e,t)}function Ki(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,N){if(e){var k=A.deletions;k===null?(A.deletions=[N],A.flags|=16):k.push(N)}}function a(A,N){if(!e)return null;for(;N!==null;)t(A,N),N=N.sibling;return null}function i(A){for(var N=new Map;A!==null;)A.key!==null?N.set(A.key,A):N.set(A.index,A),A=A.sibling;return N}function r(A,N){return A=ln(A,N),A.index=0,A.sibling=null,A}function o(A,N,k){return A.index=k,e?(k=A.alternate,k!==null?(k=k.index,k<N?(A.flags|=67108866,N):k):(A.flags|=67108866,N)):(A.flags|=1048576,N)}function h(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function y(A,N,k,q){return N===null||N.tag!==6?(N=sc(k,A.mode,q),N.return=A,N):(N=r(N,k),N.return=A,N)}function j(A,N,k,q){var ue=k.type;return ue===$?z(A,N,k.props.children,q,k.key):N!==null&&(N.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===we&&vl(ue)===N.type)?(N=r(N,k.props),Ki(N,k),N.return=A,N):(N=Ws(k.type,k.key,k.props,null,A.mode,q),Ki(N,k),N.return=A,N)}function C(A,N,k,q){return N===null||N.tag!==4||N.stateNode.containerInfo!==k.containerInfo||N.stateNode.implementation!==k.implementation?(N=rc(k,A.mode,q),N.return=A,N):(N=r(N,k.children||[]),N.return=A,N)}function z(A,N,k,q,ue){return N===null||N.tag!==7?(N=hl(k,A.mode,q,ue),N.return=A,N):(N=r(N,k),N.return=A,N)}function V(A,N,k){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=sc(""+N,A.mode,k),N.return=A,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case G:return k=Ws(N.type,N.key,N.props,null,A.mode,k),Ki(k,N),k.return=A,k;case R:return N=rc(N,A.mode,k),N.return=A,N;case we:return N=vl(N),V(A,N,k)}if(We(N)||nt(N))return N=hl(N,A.mode,k,null),N.return=A,N;if(typeof N.then=="function")return V(A,ir(N),k);if(N.$$typeof===P)return V(A,tr(A,N),k);sr(A,N)}return null}function T(A,N,k,q){var ue=N!==null?N.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return ue!==null?null:y(A,N,""+k,q);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case G:return k.key===ue?j(A,N,k,q):null;case R:return k.key===ue?C(A,N,k,q):null;case we:return k=vl(k),T(A,N,k,q)}if(We(k)||nt(k))return ue!==null?null:z(A,N,k,q,null);if(typeof k.then=="function")return T(A,N,ir(k),q);if(k.$$typeof===P)return T(A,N,tr(A,k),q);sr(A,k)}return null}function M(A,N,k,q,ue){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return A=A.get(k)||null,y(N,A,""+q,ue);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case G:return A=A.get(q.key===null?k:q.key)||null,j(N,A,q,ue);case R:return A=A.get(q.key===null?k:q.key)||null,C(N,A,q,ue);case we:return q=vl(q),M(A,N,k,q,ue)}if(We(q)||nt(q))return A=A.get(k)||null,z(N,A,q,ue,null);if(typeof q.then=="function")return M(A,N,k,ir(q),ue);if(q.$$typeof===P)return M(A,N,k,tr(N,q),ue);sr(N,q)}return null}function le(A,N,k,q){for(var ue=null,ze=null,ie=N,Se=N=0,Ce=null;ie!==null&&Se<k.length;Se++){ie.index>Se?(Ce=ie,ie=null):Ce=ie.sibling;var Be=T(A,ie,k[Se],q);if(Be===null){ie===null&&(ie=Ce);break}e&&ie&&Be.alternate===null&&t(A,ie),N=o(Be,N,Se),ze===null?ue=Be:ze.sibling=Be,ze=Be,ie=Ce}if(Se===k.length)return a(A,ie),Le&&sn(A,Se),ue;if(ie===null){for(;Se<k.length;Se++)ie=V(A,k[Se],q),ie!==null&&(N=o(ie,N,Se),ze===null?ue=ie:ze.sibling=ie,ze=ie);return Le&&sn(A,Se),ue}for(ie=i(ie);Se<k.length;Se++)Ce=M(ie,A,Se,k[Se],q),Ce!==null&&(e&&Ce.alternate!==null&&ie.delete(Ce.key===null?Se:Ce.key),N=o(Ce,N,Se),ze===null?ue=Ce:ze.sibling=Ce,ze=Ce);return e&&ie.forEach(function(el){return t(A,el)}),Le&&sn(A,Se),ue}function fe(A,N,k,q){if(k==null)throw Error(u(151));for(var ue=null,ze=null,ie=N,Se=N=0,Ce=null,Be=k.next();ie!==null&&!Be.done;Se++,Be=k.next()){ie.index>Se?(Ce=ie,ie=null):Ce=ie.sibling;var el=T(A,ie,Be.value,q);if(el===null){ie===null&&(ie=Ce);break}e&&ie&&el.alternate===null&&t(A,ie),N=o(el,N,Se),ze===null?ue=el:ze.sibling=el,ze=el,ie=Ce}if(Be.done)return a(A,ie),Le&&sn(A,Se),ue;if(ie===null){for(;!Be.done;Se++,Be=k.next())Be=V(A,Be.value,q),Be!==null&&(N=o(Be,N,Se),ze===null?ue=Be:ze.sibling=Be,ze=Be);return Le&&sn(A,Se),ue}for(ie=i(ie);!Be.done;Se++,Be=k.next())Be=M(ie,A,Se,Be.value,q),Be!==null&&(e&&Be.alternate!==null&&ie.delete(Be.key===null?Se:Be.key),N=o(Be,N,Se),ze===null?ue=Be:ze.sibling=Be,ze=Be);return e&&ie.forEach(function(j0){return t(A,j0)}),Le&&sn(A,Se),ue}function Je(A,N,k,q){if(typeof k=="object"&&k!==null&&k.type===$&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case G:e:{for(var ue=k.key;N!==null;){if(N.key===ue){if(ue=k.type,ue===$){if(N.tag===7){a(A,N.sibling),q=r(N,k.props.children),q.return=A,A=q;break e}}else if(N.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===we&&vl(ue)===N.type){a(A,N.sibling),q=r(N,k.props),Ki(q,k),q.return=A,A=q;break e}a(A,N);break}else t(A,N);N=N.sibling}k.type===$?(q=hl(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),Ki(q,k),q.return=A,A=q)}return h(A);case R:e:{for(ue=k.key;N!==null;){if(N.key===ue)if(N.tag===4&&N.stateNode.containerInfo===k.containerInfo&&N.stateNode.implementation===k.implementation){a(A,N.sibling),q=r(N,k.children||[]),q.return=A,A=q;break e}else{a(A,N);break}else t(A,N);N=N.sibling}q=rc(k,A.mode,q),q.return=A,A=q}return h(A);case we:return k=vl(k),Je(A,N,k,q)}if(We(k))return le(A,N,k,q);if(nt(k)){if(ue=nt(k),typeof ue!="function")throw Error(u(150));return k=ue.call(k),fe(A,N,k,q)}if(typeof k.then=="function")return Je(A,N,ir(k),q);if(k.$$typeof===P)return Je(A,N,tr(A,k),q);sr(A,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,N!==null&&N.tag===6?(a(A,N.sibling),q=r(N,k),q.return=A,A=q):(a(A,N),q=sc(k,A.mode,q),q.return=A,A=q),h(A)):a(A,N)}return function(A,N,k,q){try{Xi=0;var ue=Je(A,N,k,q);return li=null,ue}catch(ie){if(ie===ni||ie===nr)throw ie;var ze=ta(29,ie,null,A.mode);return ze.lanes=q,ze.return=A,ze}finally{}}}var bl=sh(!0),rh=sh(!1),zn=!1;function gc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bc(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 Bn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qn(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 Ji(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 wc(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 Sc=!1;function Ii(){if(Sc){var e=ai;if(e!==null)throw e}}function Fi(e,t,a,i){Sc=!1;var r=e.updateQueue;zn=!1;var o=r.firstBaseUpdate,h=r.lastBaseUpdate,y=r.shared.pending;if(y!==null){r.shared.pending=null;var j=y,C=j.next;j.next=null,h===null?o=C:h.next=C,h=j;var z=e.alternate;z!==null&&(z=z.updateQueue,y=z.lastBaseUpdate,y!==h&&(y===null?z.firstBaseUpdate=C:y.next=C,z.lastBaseUpdate=j))}if(o!==null){var V=r.baseState;h=0,z=C=j=null,y=o;do{var T=y.lane&-536870913,M=T!==y.lane;if(M?(ke&T)===T:(i&T)===T){T!==0&&T===ti&&(Sc=!0),z!==null&&(z=z.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});e:{var le=e,fe=y;T=t;var Je=a;switch(fe.tag){case 1:if(le=fe.payload,typeof le=="function"){V=le.call(Je,V,T);break e}V=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=fe.payload,T=typeof le=="function"?le.call(Je,V,T):le,T==null)break e;V=_({},V,T);break e;case 2:zn=!0}}T=y.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:y.tag,payload:y.payload,callback:y.callback,next:null},z===null?(C=z=M,j=V):z=z.next=M,h|=T;if(y=y.next,y===null){if(y=r.shared.pending,y===null)break;M=y,y=M.next,M.next=null,r.lastBaseUpdate=M,r.shared.pending=null}}while(!0);z===null&&(j=V),r.baseState=j,r.firstBaseUpdate=C,r.lastBaseUpdate=z,o===null&&(r.shared.lanes=0),Zn|=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 ii=w(null),rr=w(0);function oh(e,t){e=yn,W(rr,e),W(ii,t),yn=e|t.baseLanes}function jc(){W(rr,yn),W(ii,ii.current)}function Nc(){yn=rr.current,Y(ii),Y(rr)}var aa=w(null),wa=null;function Hn(e){var t=e.alternate;W(ft,ft.current&1),W(aa,e),wa===null&&(t===null||ii.current!==null||t.memoizedState!==null)&&(wa=e)}function _c(e){W(ft,ft.current),W(aa,e),wa===null&&(wa=e)}function dh(e){e.tag===22?(W(ft,ft.current),W(aa,e),wa===null&&(wa=e)):$n()}function $n(){W(ft,ft.current),W(aa,aa.current)}function na(e){Y(aa),wa===e&&(wa=null),Y(ft)}var ft=w(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||Oo(a)||Mo(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 cn=0,be=null,Xe=null,xt=null,cr=!1,si=!1,wl=!1,or=0,Wi=0,ri=null,hg=0;function ut(){throw Error(u(321))}function Ac(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ea(e[a],t[a]))return!1;return!0}function Ec(e,t,a,i,r,o){return cn=o,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Kh:Yc,wl=!1,o=a(i,r),wl=!1,si&&(o=hh(t,a,i,r)),fh(e),o}function fh(e){U.H=ts;var t=Xe!==null&&Xe.next!==null;if(cn=0,xt=Xe=be=null,cr=!1,Wi=0,ri=null,t)throw Error(u(300));e===null||yt||(e=e.dependencies,e!==null&&er(e)&&(yt=!0))}function hh(e,t,a,i){be=e;var r=0;do{if(si&&(ri=null),Wi=0,si=!1,25<=r)throw Error(u(301));if(r+=1,xt=Xe=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}U.H=Jh,o=t(a,i)}while(si);return o}function mg(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?Pi(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(be.flags|=1024),t}function kc(){var e=or!==0;return or=0,e}function Cc(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}cn=0,xt=Xe=be=null,si=!1,Wi=or=0,ri=null}function Bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?be.memoizedState=xt=e:xt=xt.next=e,xt}function ht(){if(Xe===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=xt===null?be.memoizedState:xt.next;if(t!==null)xt=t,Xe=e;else{if(e===null)throw be.alternate===null?Error(u(467)):Error(u(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},xt===null?be.memoizedState=xt=e:xt=xt.next=e}return xt}function dr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pi(e){var t=Wi;return Wi+=1,ri===null&&(ri=[]),e=nh(ri,e,t),t=be,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Kh:Yc),e}function fr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Pi(e);if(e.$$typeof===P)return Ot(e)}throw Error(u(438,String(e)))}function Tc(e){var t=null,a=be.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=be.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(),be.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]=mt;return t.index++,a}function on(e,t){return typeof t=="function"?t(e):t}function hr(e){var t=ht();return Oc(t,Xe,e)}function Oc(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 y=h=null,j=null,C=t,z=!1;do{var V=C.lane&-536870913;if(V!==C.lane?(ke&V)===V:(cn&V)===V){var T=C.revertLane;if(T===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null}),V===ti&&(z=!0);else if((cn&T)===T){C=C.next,T===ti&&(z=!0);continue}else V={lane:0,revertLane:C.revertLane,gesture:null,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},j===null?(y=j=V,h=o):j=j.next=V,be.lanes|=T,Zn|=T;V=C.action,wl&&a(o,V),o=C.hasEagerState?C.eagerState:a(o,V)}else T={lane:V,revertLane:C.revertLane,gesture:C.gesture,action:C.action,hasEagerState:C.hasEagerState,eagerState:C.eagerState,next:null},j===null?(y=j=T,h=o):j=j.next=T,be.lanes|=V,Zn|=V;C=C.next}while(C!==null&&C!==t);if(j===null?h=o:j.next=y,!ea(o,e.memoizedState)&&(yt=!0,z&&(a=ai,a!==null)))throw a;e.memoizedState=o,e.baseState=h,e.baseQueue=j,i.lastRenderedState=o}return r===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Mc(e){var t=ht(),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);ea(o,t.memoizedState)||(yt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,i]}function mh(e,t,a){var i=be,r=ht(),o=Le;if(o){if(a===void 0)throw Error(u(407));a=a()}else a=t();var h=!ea((Xe||r).memoizedState,a);if(h&&(r.memoizedState=a,yt=!0),r=r.queue,Uc(yh.bind(null,i,r,e),[e]),r.getSnapshot!==t||h||xt!==null&&xt.memoizedState.tag&1){if(i.flags|=2048,ui(9,{destroy:void 0},xh.bind(null,i,r,a,t),null),Ie===null)throw Error(u(349));o||(cn&127)!==0||ph(i,t,a)}return a}function ph(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=be.updateQueue,t===null?(t=dr(),be.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!ea(e,a)}catch{return!0}}function gh(e){var t=fl(e,2);t!==null&&Xt(t,e,2)}function Dc(e){var t=Bt();if(typeof e=="function"){var a=e;if(e=a(),wl){da(!0);try{a()}finally{da(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:on,lastRenderedState:e},t}function bh(e,t,a,i){return e.baseState=a,Oc(e,Xe,typeof i=="function"?i:on)}function pg(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 y=a(r,i),j=U.S;j!==null&&j(h,y),Sh(e,t,y)}catch(C){Lc(e,t,C)}finally{o!==null&&h.types!==null&&(o.types=h.types),U.T=o}}else try{o=a(r,i),Sh(e,t,o)}catch(C){Lc(e,t,C)}}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 Lc(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 Lc(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(Le){var a=Ie.formState;if(a!==null){e:{var i=be;if(Le){if(Pe){t:{for(var r=Pe,o=ba;r.nodeType!==8;){if(!o){r=null;break t}if(r=Sa(r.nextSibling),r===null){r=null;break t}}o=r.data,r=o==="F!"||o==="F"?r:null}if(r){Pe=Sa(r.nextSibling),i=r.data==="F!";break e}}Ln(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,be,i),i.dispatch=a,i=Dc(!1),o=$c.bind(null,be,!1,i.queue),i=Bt(),r={state:t,dispatch:null,action:e,pending:null},i.queue=r,a=pg.bind(null,be,r,o,a),r.dispatch=a,i.memoizedState=e,[t,a,!1]}function Eh(e){var t=ht();return kh(t,Xe,e)}function kh(e,t,a){if(t=Oc(e,t,_h)[0],e=hr(on)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Pi(t)}catch(h){throw h===ni?nr:h}else i=t;t=ht();var r=t.queue,o=r.dispatch;return a!==t.memoizedState&&(be.flags|=2048,ui(9,{destroy:void 0},xg.bind(null,r,a),null)),[i,o,e]}function xg(e,t){e.action=t}function Ch(e){var t=ht(),a=Xe;if(a!==null)return kh(t,a,e);ht(),t=t.memoizedState,a=ht();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function ui(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=be.updateQueue,t===null&&(t=dr(),be.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 Rh(){return ht().memoizedState}function mr(e,t,a,i){var r=Bt();be.flags|=e,r.memoizedState=ui(1|t,{destroy:void 0},a,i===void 0?null:i)}function pr(e,t,a,i){var r=ht();i=i===void 0?null:i;var o=r.memoizedState.inst;Xe!==null&&i!==null&&Ac(i,Xe.memoizedState.deps)?r.memoizedState=ui(t,o,a,i):(be.flags|=e,r.memoizedState=ui(1|t,o,a,i))}function Th(e,t){mr(8390656,8,e,t)}function Uc(e,t){pr(2048,8,e,t)}function yg(e){be.flags|=4;var t=be.updateQueue;if(t===null)t=dr(),be.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Oh(e){var t=ht().memoizedState;return yg({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 zc(){}function zh(e,t){var a=ht();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&Ac(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function Bh(e,t){var a=ht();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&Ac(t,i[1]))return i[0];if(i=e(),wl){da(!0);try{e()}finally{da(!1)}}return a.memoizedState=[i,t],i}function Bc(e,t,a){return a===void 0||(cn&1073741824)!==0&&(ke&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=qm(),be.lanes|=e,Zn|=e,a)}function qh(e,t,a,i){return ea(a,t)?a:ii.current!==null?(e=Bc(e,a,i),ea(e,t)||(yt=!0),e):(cn&42)===0||(cn&1073741824)!==0&&(ke&261930)===0?(yt=!0,e.memoizedState=a):(e=qm(),be.lanes|=e,Zn|=e,t)}function Hh(e,t,a,i,r){var o=I.p;I.p=o!==0&&8>o?o:8;var h=U.T,y={};U.T=y,$c(e,!1,t,a);try{var j=r(),C=U.S;if(C!==null&&C(y,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var z=fg(j,i);es(e,t,z,sa(e))}else es(e,t,i,sa(e))}catch(V){es(e,t,{then:function(){},status:"rejected",reason:V},sa())}finally{I.p=o,h!==null&&y.types!==null&&(h.types=y.types),U.T=h}}function vg(){}function qc(e,t,a,i){if(e.tag!==5)throw Error(u(476));var r=$h(e).queue;Hh(e,r,t,ce,a===null?vg:function(){return Yh(e),a(i)})}function $h(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:on,lastRenderedState:ce},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:on,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),es(e,t.next.queue,{},sa())}function Hc(){return Ot(ys)}function Vh(){return ht().memoizedState}function Zh(){return ht().memoizedState}function gg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=sa();e=Bn(a);var i=qn(t,e,a);i!==null&&(Xt(i,t,a),Ji(i,t,a)),t={cache:pc()},e.payload=t;return}t=t.return}}function bg(e,t,a){var i=sa();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},xr(e)?Qh(t,a):(a=lc(e,t,a,i),a!==null&&(Xt(a,e,i),Xh(a,t,i)))}function Gh(e,t,a){var i=sa();es(e,t,a,i)}function es(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,y=o(h,a);if(r.hasEagerState=!0,r.eagerState=y,ea(y,h))return Is(e,t,r,0),Ie===null&&Js(),!1}catch{}finally{}if(a=lc(e,t,r,i),a!==null)return Xt(a,e,i),Xh(a,t,i),!0}return!1}function $c(e,t,a,i){if(i={lane:2,revertLane:bo(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},xr(e)){if(t)throw Error(u(479))}else t=lc(e,a,i,2),t!==null&&Xt(t,e,2)}function xr(e){var t=e.alternate;return e===be||t!==null&&t===be}function Qh(e,t){si=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 ts={readContext:Ot,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};ts.useEffectEvent=ut;var Kh={readContext:Ot,use:fr,useCallback:function(e,t){return Bt().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,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(wl){da(!0);try{e()}finally{da(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=Bt();if(a!==void 0){var r=a(t);if(wl){da(!0);try{a(t)}finally{da(!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=bg.bind(null,be,e),[i.memoizedState,e]},useRef:function(e){var t=Bt();return e={current:e},t.memoizedState=e},useState:function(e){e=Dc(e);var t=e.queue,a=Gh.bind(null,be,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:zc,useDeferredValue:function(e,t){var a=Bt();return Bc(a,e,t)},useTransition:function(){var e=Dc(!1);return e=Hh.bind(null,be,e.queue,!0,!1),Bt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=be,r=Bt();if(Le){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Ie===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,ui(9,{destroy:void 0},xh.bind(null,i,o,a,t),null),a},useId:function(){var e=Bt(),t=Ie.identifierPrefix;if(Le){var a=Xa,i=Qa;a=(i&~(1<<32-kt(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=or++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=hg++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Hc,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=$c.bind(null,be,!0,a),a.dispatch=t,[e,t]},useMemoCache:Tc,useCacheRefresh:function(){return Bt().memoizedState=gg.bind(null,be)},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)}}},Yc={readContext:Ot,use:fr,useCallback:zh,useContext:Ot,useEffect:Uc,useImperativeHandle:Uh,useInsertionEffect:Mh,useLayoutEffect:Dh,useMemo:Bh,useReducer:hr,useRef:Rh,useState:function(){return hr(on)},useDebugValue:zc,useDeferredValue:function(e,t){var a=ht();return qh(a,Xe.memoizedState,e,t)},useTransition:function(){var e=hr(on)[0],t=ht().memoizedState;return[typeof e=="boolean"?e:Pi(e),t]},useSyncExternalStore:mh,useId:Vh,useHostTransitionStatus:Hc,useFormState:Eh,useActionState:Eh,useOptimistic:function(e,t){var a=ht();return bh(a,Xe,e,t)},useMemoCache:Tc,useCacheRefresh:Zh};Yc.useEffectEvent=Oh;var Jh={readContext:Ot,use:fr,useCallback:zh,useContext:Ot,useEffect:Uc,useImperativeHandle:Uh,useInsertionEffect:Mh,useLayoutEffect:Dh,useMemo:Bh,useReducer:Mc,useRef:Rh,useState:function(){return Mc(on)},useDebugValue:zc,useDeferredValue:function(e,t){var a=ht();return Xe===null?Bc(a,e,t):qh(a,Xe.memoizedState,e,t)},useTransition:function(){var e=Mc(on)[0],t=ht().memoizedState;return[typeof e=="boolean"?e:Pi(e),t]},useSyncExternalStore:mh,useId:Vh,useHostTransitionStatus:Hc,useFormState:Ch,useActionState:Ch,useOptimistic:function(e,t){var a=ht();return Xe!==null?bh(a,Xe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Tc,useCacheRefresh:Zh};Jh.useEffectEvent=Oh;function Vc(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:_({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Zc={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=sa(),r=Bn(i);r.payload=t,a!=null&&(r.callback=a),t=qn(e,r,i),t!==null&&(Xt(t,e,i),Ji(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=sa(),r=Bn(i);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=qn(e,r,i),t!==null&&(Xt(t,e,i),Ji(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=sa(),i=Bn(a);i.tag=2,t!=null&&(i.callback=t),t=qn(e,i,a),t!==null&&(Xt(t,e,a),Ji(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?!$i(a,i)||!$i(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&&Zc.enqueueReplaceState(t,t.state,null)}function Sl(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=_({},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 Gc(e,t,a){return a=Bn(a),a.tag=3,a.payload={element:null},a.callback=function(){yr(e,t)},a}function am(e){return e=Bn(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"&&(Gn===null?Gn=new Set([this]):Gn.add(this));var y=i.stack;this.componentDidCatch(i.value,{componentStack:y!==null?y:""})})}function wg(e,t,a,i,r){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&ei(t,a,r,!0),a=aa.current,a!==null){switch(a.tag){case 31:case 13:return wa===null?Cr():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),yo(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)),yo(e,i,r)),!1}throw Error(u(435,a.tag))}return yo(e,i,r),Cr(),!1}if(Le)return t=aa.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,i!==oc&&(e=Error(u(422),{cause:i}),Zi(ya(e,a)))):(i!==oc&&(t=Error(u(423),{cause:i}),Zi(ya(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,i=ya(i,a),r=Gc(e.stateNode,i,r),wc(e,r),ct!==4&&(ct=2)),!1;var o=Error(u(520),{cause:i});if(o=ya(o,a),cs===null?cs=[o]:cs.push(o),ct!==4&&(ct=2),t===null)return!0;i=ya(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=Gc(a.stateNode,i,e),wc(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"&&(Gn===null||!Gn.has(o))))return a.flags|=65536,r&=-r,a.lanes|=r,r=am(r),nm(r,e,a,i),wc(a,r),!1}a=a.return}while(a!==null);return!1}var Qc=Error(u(461)),yt=!1;function Mt(e,t,a,i){t.child=e===null?rh(t,null,a,i):bl(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 y in i)y!=="ref"&&(h[y]=i[y])}else h=i;return xl(t),i=Ec(e,t,a,h,o,r),y=kc(),e!==null&&!yt?(Cc(e,t,r),dn(e,t,r)):(Le&&y&&uc(t),t.flags|=1,Mt(e,t,i,r),t.child)}function im(e,t,a,i,r){if(e===null){var o=a.type;return typeof o=="function"&&!ic(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,!eo(e,r)){var h=o.memoizedProps;if(a=a.compare,a=a!==null?a:$i,a(h,i)&&e.ref===t.ref)return dn(e,t,r)}return t.flags|=1,e=ln(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($i(o,i)&&e.ref===t.ref)if(yt=!1,t.pendingProps=i=o,eo(e,r))(e.flags&131072)!==0&&(yt=!0);else return t.lanes=e.lanes,dn(e,t,r)}return Xc(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):jc(),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),$n(),t.memoizedState=null):(e!==null&&ar(t,null),jc(),$n());return Mt(e,t,r,a),t.child}function as(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=yc();return o=o===null?null:{parent:pt._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&ar(t,null),jc(),dh(t),e!==null&&ei(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 bl(t,e.child,null,a),e=vr(t,t.pendingProps),e.flags|=2,na(t),t.memoizedState=null,e}function Sg(e,t,a){var i=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Le){if(i.mode==="hidden")return e=vr(t,i),t.lanes=536870912,as(null,e);if(_c(t),(e=Pe)?(e=wp(e,ba),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mn!==null?{id:Qa,overflow:Xa}:null,retryLane:536870912,hydrationErrors:null},a=Qf(e),a.return=t,t.child=a,Tt=t,Pe=null)):e=null,e===null)throw Ln(t);return t.lanes=536870912,null}return vr(t,i)}var o=e.memoizedState;if(o!==null){var h=o.dehydrated;if(_c(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(yt||ei(e,t,a,!1),r=(a&e.childLanes)!==0,yt||r){if(i=Ie,i!==null&&(h=re(i,a),h!==0&&h!==o.retryLane))throw o.retryLane=h,fl(e,h),Xt(i,e,h),Qc;Cr(),t=cm(e,t,a)}else e=o.treeContext,Pe=Sa(h.nextSibling),Tt=t,Le=!0,Dn=null,ba=!1,e!==null&&Jf(t,e),t=vr(t,i),t.flags|=4096;return t}return e=ln(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 Xc(e,t,a,i,r){return xl(t),a=Ec(e,t,a,i,void 0,r),i=kc(),e!==null&&!yt?(Cc(e,t,r),dn(e,t,r)):(Le&&i&&uc(t),t.flags|=1,Mt(e,t,a,r),t.child)}function om(e,t,a,i,r,o){return xl(t),t.updateQueue=null,a=hh(t,i,a,r),fh(e),i=kc(),e!==null&&!yt?(Cc(e,t,o),dn(e,t,o)):(Le&&i&&uc(t),t.flags|=1,Mt(e,t,a,o),t.child)}function dm(e,t,a,i,r){if(xl(t),t.stateNode===null){var o=Il,h=a.contextType;typeof h=="object"&&h!==null&&(o=Ot(h)),o=new a(i,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Zc,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=i,o.state=t.memoizedState,o.refs={},gc(t),h=a.contextType,o.context=typeof h=="object"&&h!==null?Ot(h):Il,o.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(Vc(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&&Zc.enqueueReplaceState(o,o.state,null),Fi(t,i,o,r),Ii(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){o=t.stateNode;var y=t.memoizedProps,j=Sl(a,y);o.props=j;var C=o.context,z=a.contextType;h=Il,typeof z=="object"&&z!==null&&(h=Ot(z));var V=a.getDerivedStateFromProps;z=typeof V=="function"||typeof o.getSnapshotBeforeUpdate=="function",y=t.pendingProps!==y,z||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(y||C!==h)&&Fh(t,o,i,h),zn=!1;var T=t.memoizedState;o.state=T,Fi(t,i,o,r),Ii(),C=t.memoizedState,y||T!==C||zn?(typeof V=="function"&&(Vc(t,a,V,i),C=t.memoizedState),(j=zn||Ih(t,a,j,i,T,C,h))?(z||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=C),o.props=i,o.state=C,o.context=h,i=j):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{o=t.stateNode,bc(e,t),h=t.memoizedProps,z=Sl(a,h),o.props=z,V=t.pendingProps,T=o.context,C=a.contextType,j=Il,typeof C=="object"&&C!==null&&(j=Ot(C)),y=a.getDerivedStateFromProps,(C=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(h!==V||T!==j)&&Fh(t,o,i,j),zn=!1,T=t.memoizedState,o.state=T,Fi(t,i,o,r),Ii();var M=t.memoizedState;h!==V||T!==M||zn||e!==null&&e.dependencies!==null&&er(e.dependencies)?(typeof y=="function"&&(Vc(t,a,y,i),M=t.memoizedState),(z=zn||Ih(t,a,z,i,T,M,j)||e!==null&&e.dependencies!==null&&er(e.dependencies))?(C||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,M,j),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,M,j)),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=j,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=bl(t,e.child,null,r),t.child=bl(t,null,a,r)):Mt(e,t,a,r),t.memoizedState=o.state,e=t.child):e=dn(e,t,r),e}function fm(e,t,a,i){return ml(),t.flags|=256,Mt(e,t,a,i),t.child}var Kc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:th()}}function Ic(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=ia),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:(ft.current&2)!==0),h&&(r=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Le){if(r?Hn(t):$n(),(e=Pe)?(e=wp(e,ba),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mn!==null?{id:Qa,overflow:Xa}:null,retryLane:536870912,hydrationErrors:null},a=Qf(e),a.return=t,t.child=a,Tt=t,Pe=null)):e=null,e===null)throw Ln(t);return Mo(e)?t.lanes=32:t.lanes=536870912,null}var y=i.children;return i=i.fallback,r?($n(),r=t.mode,y=br({mode:"hidden",children:y},r),i=hl(i,r,a,null),y.return=t,i.return=t,y.sibling=i,t.child=y,i=t.child,i.memoizedState=Jc(a),i.childLanes=Ic(e,h,a),t.memoizedState=Kc,as(null,i)):(Hn(t),Fc(t,y))}var j=e.memoizedState;if(j!==null&&(y=j.dehydrated,y!==null)){if(o)t.flags&256?(Hn(t),t.flags&=-257,t=Wc(e,t,a)):t.memoizedState!==null?($n(),t.child=e.child,t.flags|=128,t=null):($n(),y=i.fallback,r=t.mode,i=br({mode:"visible",children:i.children},r),y=hl(y,r,a,null),y.flags|=2,i.return=t,y.return=t,i.sibling=y,t.child=i,bl(t,e.child,null,a),i=t.child,i.memoizedState=Jc(a),i.childLanes=Ic(e,h,a),t.memoizedState=Kc,t=as(null,i));else if(Hn(t),Mo(y)){if(h=y.nextSibling&&y.nextSibling.dataset,h)var C=h.dgst;h=C,i=Error(u(419)),i.stack="",i.digest=h,Zi({value:i,source:null,stack:null}),t=Wc(e,t,a)}else if(yt||ei(e,t,a,!1),h=(a&e.childLanes)!==0,yt||h){if(h=Ie,h!==null&&(i=re(h,a),i!==0&&i!==j.retryLane))throw j.retryLane=i,fl(e,i),Xt(h,e,i),Qc;Oo(y)||Cr(),t=Wc(e,t,a)}else Oo(y)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,Pe=Sa(y.nextSibling),Tt=t,Le=!0,Dn=null,ba=!1,e!==null&&Jf(t,e),t=Fc(t,i.children),t.flags|=4096);return t}return r?($n(),y=i.fallback,r=t.mode,j=e.child,C=j.sibling,i=ln(j,{mode:"hidden",children:i.children}),i.subtreeFlags=j.subtreeFlags&65011712,C!==null?y=ln(C,y):(y=hl(y,r,a,null),y.flags|=2),y.return=t,i.return=t,i.sibling=y,t.child=i,as(null,i),i=t.child,y=e.child.memoizedState,y===null?y=Jc(a):(r=y.cachePool,r!==null?(j=pt._currentValue,r=r.parent!==j?{parent:j,pool:j}:r):r=th(),y={baseLanes:y.baseLanes|a,cachePool:r}),i.memoizedState=y,i.childLanes=Ic(e,h,a),t.memoizedState=Kc,as(e.child,i)):(Hn(t),a=e.child,e=a.sibling,a=ln(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 Fc(e,t){return t=br({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function br(e,t){return e=ta(22,e,null,t),e.lanes=0,e}function Wc(e,t,a){return bl(t,e.child,null,a),e=Fc(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),hc(e.return,t,a)}function Pc(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=ft.current,y=(h&2)!==0;if(y?(h=h&1|2,t.flags|=128):h&=1,W(ft,h),Mt(e,t,i,a),i=Le?Vi:0,!y&&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),Pc(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}Pc(t,!0,a,null,o,i);break;case"together":Pc(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function dn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Zn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(ei(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=ln(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ln(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function eo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&er(e)))}function jg(e,t,a){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),Un(t,pt,e.memoizedState.cache),ml();break;case 27:case 5:oa(t);break;case 4:lt(t,t.stateNode.containerInfo);break;case 10:Un(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,_c(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Hn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?hm(e,t,a):(Hn(t),e=dn(e,t,a),e!==null?e.sibling:null);Hn(t);break;case 19:var r=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(ei(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),W(ft,ft.current),i)break;return null;case 22:return t.lanes=0,rm(e,t,a,t.pendingProps);case 24:Un(t,pt,e.memoizedState.cache)}return dn(e,t,a)}function xm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)yt=!0;else{if(!eo(e,a)&&(t.flags&128)===0)return yt=!1,jg(e,t,a);yt=(e.flags&131072)!==0}else yt=!1,Le&&(t.flags&1048576)!==0&&Kf(t,Vi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=vl(t.elementType),t.type=e,typeof e=="function")ic(e)?(i=Sl(e,i),t.tag=1,t=dm(null,t,e,i,a)):(t.tag=0,t=Xc(null,t,e,i,a));else{if(e!=null){var r=e.$$typeof;if(r===J){t.tag=11,t=lm(null,t,e,i,a);break e}else if(r===K){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 Xc(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,r=Sl(i,t.pendingProps),dm(e,t,i,r,a);case 3:e:{if(lt(t,t.stateNode.containerInfo),e===null)throw Error(u(387));i=t.pendingProps;var o=t.memoizedState;r=o.element,bc(e,t),Fi(t,i,null,a);var h=t.memoizedState;if(i=h.cache,Un(t,pt,i),i!==o.cache&&mc(t,[pt],a,!0),Ii(),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=ya(Error(u(424)),t),Zi(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(Pe=Sa(e.firstChild),Tt=t,Le=!0,Dn=null,ba=!0,a=rh(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(ml(),i===r){t=dn(e,t,a);break e}Mt(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:Le||(a=t.type,e=t.pendingProps,i=Ur(xe.current).createElement(a),i[Rt]=t,i[$t]=e,Dt(i,a,e),St(i),t.stateNode=i):t.memoizedState=Ep(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return oa(t),e===null&&Le&&(i=t.stateNode=Np(t.type,t.pendingProps,xe.current),Tt=t,ba=!0,r=Pe,Jn(t.type)?(Do=r,Pe=Sa(i.firstChild)):Pe=r),Mt(e,t,t.pendingProps.children,a),gr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Le&&((r=i=Pe)&&(i=Pg(i,t.type,t.pendingProps,ba),i!==null?(t.stateNode=i,Tt=t,Pe=Sa(i.firstChild),ba=!1,r=!0):r=!1),r||Ln(t)),oa(t),r=t.type,o=t.pendingProps,h=e!==null?e.memoizedProps:null,i=o.children,Co(r,o)?i=null:h!==null&&Co(r,h)&&(t.flags|=32),t.memoizedState!==null&&(r=Ec(e,t,mg,null,null,a),ys._currentValue=r),gr(e,t),Mt(e,t,i,a),t.child;case 6:return e===null&&Le&&((e=a=Pe)&&(a=e0(a,t.pendingProps,ba),a!==null?(t.stateNode=a,Tt=t,Pe=null,e=!0):e=!1),e||Ln(t)),null;case 13:return hm(e,t,a);case 4:return lt(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=bl(t,null,i,a):Mt(e,t,i,a),t.child;case 11:return lm(e,t,t.type,t.pendingProps,a);case 7:return Mt(e,t,t.pendingProps,a),t.child;case 8:return Mt(e,t,t.pendingProps.children,a),t.child;case 12:return Mt(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,Un(t,t.type,i.value),Mt(e,t,i.children,a),t.child;case 9:return r=t.type._context,i=t.pendingProps.children,xl(t),r=Ot(r),i=i(r),t.flags|=1,Mt(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 Sg(e,t,a);case 22:return rm(e,t,a,t.pendingProps);case 24:return xl(t),i=Ot(pt),e===null?(r=yc(),r===null&&(r=Ie,o=pc(),r.pooledCache=o,o.refCount++,o!==null&&(r.pooledCacheLanes|=a),r=o),t.memoizedState={parent:i,cache:r},gc(t),Un(t,pt,r)):((e.lanes&a)!==0&&(bc(e,t),Fi(t,null,null,a),Ii()),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),Un(t,pt,i)):(i=o.cache,Un(t,pt,i),i!==r.cache&&mc(t,[pt],a,!0))),Mt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function fn(e){e.flags|=4}function to(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 gl=lr,vc}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 gl=lr,vc}function wr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ut():536870912,e.lanes|=t,fi|=t)}function ns(e,t){if(!Le)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 et(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 Ng(e,t,a){var i=t.pendingProps;switch(cc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return et(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),un(pt),ve(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Pl(t)?fn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,dc())),et(t),null;case 26:var r=t.type,o=t.memoizedState;return e===null?(fn(t),o!==null?(et(t),ym(t,o)):(et(t),to(t,r,null,i,a))):o?o!==e.memoizedState?(fn(t),et(t),ym(t,o)):(et(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&fn(t),et(t),to(t,r,e,i,a)),null;case 27:if(it(t),a=xe.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&fn(t);else{if(!i){if(t.stateNode===null)throw Error(u(166));return et(t),null}e=te.current,Pl(t)?If(t):(e=Np(r,i,a),t.stateNode=e,fn(t))}return et(t),null;case 5:if(it(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&fn(t);else{if(!i){if(t.stateNode===null)throw Error(u(166));return et(t),null}if(o=te.current,Pl(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[Rt]=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(Dt(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&&fn(t)}}return et(t),to(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&fn(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(u(166));if(e=xe.current,Pl(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,r=Tt,r!==null)switch(r.tag){case 27:case 5:i=r.memoizedProps}e[Rt]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||hp(e.nodeValue,a)),e||Ln(t,!0)}else e=Ur(e).createTextNode(i),e[Rt]=t,t.stateNode=e}return et(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=Pl(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[Rt]=t}else ml(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),e=!1}else a=dc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(na(t),t):(na(t),null);if((t.flags&128)!==0)throw Error(u(558))}return et(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Pl(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[Rt]=t}else ml(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),r=!1}else r=dc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(na(t),t):(na(t),null)}return na(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),et(t),null);case 4:return ve(),e===null&&No(t.stateNode.containerInfo),et(t),null;case 10:return un(t.type),et(t),null;case 19:if(Y(ft),i=t.memoizedState,i===null)return et(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)ns(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,ns(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 W(ft,ft.current&1|2),Le&&sn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&At()>Ar&&(t.flags|=128,r=!0,ns(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),ns(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Le)return et(t),null}else 2*At()-i.renderingStartTime>Ar&&a!==536870912&&(t.flags|=128,r=!0,ns(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=At(),e.sibling=null,a=ft.current,W(ft,r?a&1|2:a&1),Le&&sn(t,i.treeForkCount),e):(et(t),null);case 22:case 23:return na(t),Nc(),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&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(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&&Y(yl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),un(pt),et(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function _g(e,t){switch(cc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return un(pt),ve(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return it(t),null;case 31:if(t.memoizedState!==null){if(na(t),t.alternate===null)throw Error(u(340));ml()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(na(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));ml()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(ft),null;case 4:return ve(),null;case 10:return un(t.type),null;case 22:case 23:return na(t),Nc(),e!==null&&Y(yl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return un(pt),null;case 25:return null;default:return null}}function vm(e,t){switch(cc(t),t.tag){case 3:un(pt),ve();break;case 26:case 27:case 5:it(t);break;case 4:ve();break;case 31:t.memoizedState!==null&&na(t);break;case 13:na(t);break;case 19:Y(ft);break;case 10:un(t.type);break;case 22:case 23:na(t),Nc(),e!==null&&Y(yl);break;case 24:un(pt)}}function ls(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(y){Ze(t,t.return,y)}}function Yn(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,y=h.destroy;if(y!==void 0){h.destroy=void 0,r=t;var j=a,C=y;try{C()}catch(z){Ze(r,j,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=Sl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){Ze(e,t,i)}}function is(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 Ka(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 ao(e,t,a){try{var i=e.stateNode;Xg(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&&Jn(e.type)||e.tag===4}function no(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&&Jn(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 lo(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=an));else if(i!==4&&(i===27&&Jn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(lo(e,t,a),e=e.sibling;e!==null;)lo(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&&Jn(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]);Dt(t,i,a),t[Rt]=e,t[$t]=a}catch(o){Ze(e,e.return,o)}}var hn=!1,vt=!1,io=!1,Nm=typeof WeakSet=="function"?WeakSet:Set,jt=null;function Ag(e,t){if(e=e.containerInfo,Eo=Vr,e=Uf(e),Wu(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,y=-1,j=-1,C=0,z=0,V=e,T=null;t:for(;;){for(var M;V!==a||r!==0&&V.nodeType!==3||(y=h+r),V!==o||i!==0&&V.nodeType!==3||(j=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&&++C===r&&(y=h),T===o&&++z===i&&(j=h),(M=V.nextSibling)!==null)break;V=T,T=V.parentNode}V=M}a=y===-1||j===-1?null:{start:y,end:j}}else a=null}a=a||{start:0,end:0}}else a=null;for(ko={focusedElem:e,selectionRange:a},Vr=!1,jt=t;jt!==null;)if(t=jt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,jt=e;else for(;jt!==null;){switch(t=jt,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=Sl(a.type,r);e=i.getSnapshotBeforeUpdate(le,o),i.__reactInternalSnapshotBeforeUpdate=e}catch(fe){Ze(a,a.return,fe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)To(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":To(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,jt=e;break}jt=t.return}}function _m(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:pn(e,a),i&4&&ls(5,a);break;case 1:if(pn(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){Ze(a,a.return,h)}else{var r=Sl(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&&is(a,a.return);break;case 3:if(pn(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:pn(e,a),t===null&&i&4&&wm(a),i&512&&is(a,a.return);break;case 12:pn(e,a);break;case 31:pn(e,a),i&4&&km(e,a);break;case 13:pn(e,a),i&4&&Cm(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Lg.bind(null,a),t0(e,a))));break;case 22:if(i=a.memoizedState!==null||hn,!i){t=t!==null&&t.memoizedState!==null||vt,r=hn;var o=vt;hn=i,(vt=t)&&!o?xn(e,a,(a.subtreeFlags&8772)!==0):pn(e,a),hn=r,vt=o}break;case 30:break;default:pn(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&&Lu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var tt=null,Vt=!1;function mn(e,t,a){for(a=a.child;a!==null;)Em(e,t,a),a=a.sibling}function Em(e,t,a){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(Ma,a)}catch{}switch(a.tag){case 26:vt||Ka(a,t),mn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:vt||Ka(a,t);var i=tt,r=Vt;Jn(a.type)&&(tt=a.stateNode,Vt=!1),mn(e,t,a),ms(a.stateNode),tt=i,Vt=r;break;case 5:vt||Ka(a,t);case 6:if(i=tt,r=Vt,tt=null,mn(e,t,a),tt=i,Vt=r,tt!==null)if(Vt)try{(tt.nodeType===9?tt.body:tt.nodeName==="HTML"?tt.ownerDocument.body:tt).removeChild(a.stateNode)}catch(o){Ze(a,t,o)}else try{tt.removeChild(a.stateNode)}catch(o){Ze(a,t,o)}break;case 18:tt!==null&&(Vt?(e=tt,gp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),bi(e)):gp(tt,a.stateNode));break;case 4:i=tt,r=Vt,tt=a.stateNode.containerInfo,Vt=!0,mn(e,t,a),tt=i,Vt=r;break;case 0:case 11:case 14:case 15:Yn(2,a,t),vt||Yn(4,a,t),mn(e,t,a);break;case 1:vt||(Ka(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&bm(a,t,i)),mn(e,t,a);break;case 21:mn(e,t,a);break;case 22:vt=(i=vt)||a.memoizedState!==null,mn(e,t,a),vt=i;break;default:mn(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{bi(e)}catch(a){Ze(t,t.return,a)}}}function Cm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{bi(e)}catch(a){Ze(t,t.return,a)}}function Eg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new 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=Eg(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var r=Ug.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,y=h;e:for(;y!==null;){switch(y.tag){case 27:if(Jn(y.type)){tt=y.stateNode,Vt=!1;break e}break;case 5:tt=y.stateNode,Vt=!1;break e;case 3:case 4:tt=y.stateNode.containerInfo,Vt=!0;break e}y=y.return}if(tt===null)throw Error(u(160));Em(o,h,r),tt=null,Vt=!1,o=r.alternate,o!==null&&(o.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Rm(t,e),t=t.sibling}var Ua=null;function Rm(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&&(Yn(3,e,e.return),ls(3,e),Yn(5,e,e.return));break;case 1:Zt(t,e),Gt(e),i&512&&(vt||a===null||Ka(a,a.return)),i&64&&hn&&(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=Ua;if(Zt(t,e),Gt(e),i&512&&(vt||a===null||Ka(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[Oi]||o[Rt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=r.createElement(i),r.head.insertBefore(o,r.querySelector("head > title"))),Dt(o,i,a),o[Rt]=e,St(o),i=o;break e;case"link":var h=Rp("link","href",r).get(i+(a.href||""));if(h){for(var y=0;y<h.length;y++)if(o=h[y],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(y,1);break t}}o=r.createElement(i),Dt(o,i,a),r.head.appendChild(o);break;case"meta":if(h=Rp("meta","content",r).get(i+(a.content||""))){for(y=0;y<h.length;y++)if(o=h[y],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(y,1);break t}}o=r.createElement(i),Dt(o,i,a),r.head.appendChild(o);break;default:throw Error(u(468,i))}o[Rt]=e,St(o),i=o}e.stateNode=i}else Tp(r,e.type,e.stateNode);else e.stateNode=Cp(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):Cp(r,i,e.memoizedProps)):i===null&&e.stateNode!==null&&ao(e,e.memoizedProps,a.memoizedProps)}break;case 27:Zt(t,e),Gt(e),i&512&&(vt||a===null||Ka(a,a.return)),a!==null&&i&4&&ao(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Zt(t,e),Gt(e),i&512&&(vt||a===null||Ka(a,a.return)),e.flags&32){r=e.stateNode;try{Vl(r,"")}catch(le){Ze(e,e.return,le)}}i&4&&e.stateNode!=null&&(r=e.memoizedProps,ao(e,r,a!==null?a.memoizedProps:r)),i&1024&&(io=!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=Ua,Ua=zr(t.containerInfo),Zt(t,e),Ua=r,Gt(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{bi(t.containerInfo)}catch(le){Ze(e,e.return,le)}io&&(io=!1,Tm(e));break;case 4:i=Ua,Ua=zr(e.stateNode.containerInfo),Zt(t,e),Gt(e),Ua=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=At()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,jr(e,i)));break;case 22:r=e.memoizedState!==null;var j=a!==null&&a.memoizedState!==null,C=hn,z=vt;if(hn=C||r,vt=z||j,Zt(t,e),vt=z,hn=C,Gt(e),i&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||j||hn||vt||jl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){j=a=t;try{if(o=j.stateNode,r)h=o.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{y=j.stateNode;var V=j.memoizedProps.style,T=V!=null&&V.hasOwnProperty("display")?V.display:null;y.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(le){Ze(j,j.return,le)}}}else if(t.tag===6){if(a===null){j=t;try{j.stateNode.nodeValue=r?"":j.memoizedProps}catch(le){Ze(j,j.return,le)}}}else if(t.tag===18){if(a===null){j=t;try{var M=j.stateNode;r?bp(M,!0):bp(j.stateNode,!1)}catch(le){Ze(j,j.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=no(e);Sr(e,o,r);break;case 5:var h=a.stateNode;a.flags&32&&(Vl(h,""),a.flags&=-33);var y=no(e);Sr(e,y,h);break;case 3:case 4:var j=a.stateNode.containerInfo,C=no(e);lo(e,C,j);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 pn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_m(e,t.alternate,t),t=t.sibling}function jl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Yn(4,t,t.return),jl(t);break;case 1:Ka(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&bm(t,t.return,a),jl(t);break;case 27:ms(t.stateNode);case 26:case 5:Ka(t,t.return),jl(t);break;case 22:t.memoizedState===null&&jl(t);break;case 30:jl(t);break;default:jl(t)}e=e.sibling}}function xn(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:xn(r,o,a),ls(4,o);break;case 1:if(xn(r,o,a),i=o,r=i.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(C){Ze(i,i.return,C)}if(i=o,r=i.updateQueue,r!==null){var y=i.stateNode;try{var j=r.shared.hiddenCallbacks;if(j!==null)for(r.shared.hiddenCallbacks=null,r=0;r<j.length;r++)uh(j[r],y)}catch(C){Ze(i,i.return,C)}}a&&h&64&&gm(o),is(o,o.return);break;case 27:jm(o);case 26:case 5:xn(r,o,a),a&&i===null&&h&4&&wm(o),is(o,o.return);break;case 12:xn(r,o,a);break;case 31:xn(r,o,a),a&&h&4&&km(r,o);break;case 13:xn(r,o,a),a&&h&4&&Cm(r,o);break;case 22:o.memoizedState===null&&xn(r,o,a),is(o,o.return);break;case 30:break;default:xn(r,o,a)}t=t.sibling}}function so(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&&Gi(a))}function ro(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gi(e))}function za(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:za(e,t,a,i),r&2048&&ls(9,t);break;case 1:za(e,t,a,i);break;case 3:za(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&&Gi(e)));break;case 12:if(r&2048){za(e,t,a,i),e=t.stateNode;try{var o=t.memoizedProps,h=o.id,y=o.onPostCommit;typeof y=="function"&&y(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Ze(t,t.return,j)}}else za(e,t,a,i);break;case 31:za(e,t,a,i);break;case 13:za(e,t,a,i);break;case 23:break;case 22:o=t.stateNode,h=t.alternate,t.memoizedState!==null?o._visibility&2?za(e,t,a,i):ss(e,t):o._visibility&2?za(e,t,a,i):(o._visibility|=2,ci(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),r&2048&&so(h,t);break;case 24:za(e,t,a,i),r&2048&&ro(t.alternate,t);break;default:za(e,t,a,i)}}function ci(e,t,a,i,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,h=t,y=a,j=i,C=h.flags;switch(h.tag){case 0:case 11:case 15:ci(o,h,y,j,r),ls(8,h);break;case 23:break;case 22:var z=h.stateNode;h.memoizedState!==null?z._visibility&2?ci(o,h,y,j,r):ss(o,h):(z._visibility|=2,ci(o,h,y,j,r)),r&&C&2048&&so(h.alternate,h);break;case 24:ci(o,h,y,j,r),r&&C&2048&&ro(h.alternate,h);break;default:ci(o,h,y,j,r)}t=t.sibling}}function ss(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:ss(a,i),r&2048&&so(i.alternate,i);break;case 24:ss(a,i),r&2048&&ro(i.alternate,i);break;default:ss(a,i)}t=t.sibling}}var rs=8192;function oi(e,t,a){if(e.subtreeFlags&rs)for(e=e.child;e!==null;)Mm(e,t,a),e=e.sibling}function Mm(e,t,a){switch(e.tag){case 26:oi(e,t,a),e.flags&rs&&e.memoizedState!==null&&h0(a,Ua,e.memoizedState,e.memoizedProps);break;case 5:oi(e,t,a);break;case 3:case 4:var i=Ua;Ua=zr(e.stateNode.containerInfo),oi(e,t,a),Ua=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=rs,rs=16777216,oi(e,t,a),rs=i):oi(e,t,a));break;default:oi(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 us(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];jt=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:us(e),e.flags&2048&&Yn(9,e,e.return);break;case 3:us(e);break;case 12:us(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)):us(e);break;default:us(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];jt=i,Um(i,e)}Dm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Yn(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(;jt!==null;){var a=jt;switch(a.tag){case 0:case 11:case 15:Yn(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:Gi(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,jt=i;else e:for(a=e;jt!==null;){i=jt;var r=i.sibling,o=i.return;if(Am(i),i===a){jt=null;break e}if(r!==null){r.return=o,jt=r;break e}jt=o}}}var kg={getCacheForType:function(e){var t=Ot(pt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Ot(pt).controller.signal}},Cg=typeof WeakMap=="function"?WeakMap:Map,qe=0,Ie=null,_e=null,ke=0,Ve=0,la=null,Vn=!1,di=!1,uo=!1,yn=0,ct=0,Zn=0,Nl=0,co=0,ia=0,fi=0,cs=null,Qt=null,oo=!1,_r=0,zm=0,Ar=1/0,Er=null,Gn=null,bt=0,Qn=null,hi=null,vn=0,fo=0,ho=null,Bm=null,os=0,mo=null;function sa(){return(qe&2)!==0&&ke!==0?ke&-ke:U.T!==null?bo():Pd()}function qm(){if(ia===0)if((ke&536870912)===0||Le){var e=Cn;Cn<<=1,(Cn&3932160)===0&&(Cn=262144),ia=e}else ia=536870912;return e=aa.current,e!==null&&(e.flags|=32),ia}function Xt(e,t,a){(e===Ie&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(mi(e,0),Xn(e,ke,ia,!1)),dt(e,a),((qe&2)===0||e!==Ie)&&(e===Ie&&((qe&2)===0&&(Nl|=a),ct===4&&Xn(e,ke,ia,!1)),Ja(e))}function Hm(e,t,a){if((qe&6)!==0)throw Error(u(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ge(e,t),r=i?Og(e,t):xo(e,t,!0),o=i;do{if(r===0){di&&!i&&Xn(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!Rg(a)){r=xo(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 y=e;r=cs;var j=y.current.memoizedState.isDehydrated;if(j&&(mi(y,h).flags|=256),h=xo(y,h,!1),h!==2){if(uo&&!j){y.errorRecoveryDisabledLanes|=o,Nl|=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){mi(e,0),Xn(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:Xn(i,t,ia,!Vn);break e;case 2:Qt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(r=_r+300-At(),10<r)){if(Xn(i,t,ia,!Vn),Z(i,0,!0)!==0)break e;vn=t,i.timeoutHandle=yp($m.bind(null,i,a,Qt,Er,oo,t,ia,Nl,fi,Vn,o,"Throttled",-0,0),r);break e}$m(i,a,Qt,Er,oo,t,ia,Nl,fi,Vn,o,null,-0,0)}}break}while(!0);Ja(e)}function $m(e,t,a,i,r,o,h,y,j,C,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:an},Mm(t,o,V);var le=(o&62914560)===o?_r-At():(o&4194048)===o?zm-At():0;if(le=m0(V,le),le!==null){vn=o,e.cancelPendingCommit=le(Jm.bind(null,e,t,o,a,i,r,h,y,j,z,V,null,T,M)),Xn(e,o,h,!C);return}}Jm(e,t,o,a,i,r,h,y,j)}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(!ea(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 Xn(e,t,a,i){t&=~co,t&=~Nl,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var r=t;0<r;){var o=31-kt(r),h=1<<o;i[o]=-1,r&=~h}a!==0&&zs(e,a,t)}function kr(){return(qe&6)===0?(ds(0),!1):!0}function po(){if(_e!==null){if(Ve===0)var e=_e.return;else e=_e,rn=pl=null,Rc(e),li=null,Xi=0,e=_e;for(;e!==null;)vm(e.alternate,e),e=e.return;_e=null}}function mi(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Ig(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),vn=0,po(),Ie=e,_e=a=ln(e.current,null),ke=t,Ve=0,la=null,Vn=!1,di=ge(e,t),uo=!1,fi=ia=co=Nl=Zn=ct=0,Qt=cs=null,oo=!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-kt(i),o=1<<r;t|=e[r],i&=~o}return yn=t,Js(),a}function Ym(e,t){be=null,U.H=ts,t===ni||t===nr?(t=lh(),Ve=3):t===vc?(t=lh(),Ve=4):Ve=t===Qc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,la=t,_e===null&&(ct=1,yr(e,ya(t,e.current)))}function Vm(){var e=aa.current;return e===null?!0:(ke&4194048)===ke?wa===null:(ke&62914560)===ke||(ke&536870912)!==0?e===wa:!1}function Zm(){var e=U.H;return U.H=ts,e===null?ts:e}function Gm(){var e=U.A;return U.A=kg,e}function Cr(){ct=4,Vn||(ke&4194048)!==ke&&aa.current!==null||(di=!0),(Zn&134217727)===0&&(Nl&134217727)===0||Ie===null||Xn(Ie,ke,ia,!1)}function xo(e,t,a){var i=qe;qe|=2;var r=Zm(),o=Gm();(Ie!==e||ke!==t)&&(Er=null,mi(e,t)),t=!1;var h=ct;e:do try{if(Ve!==0&&_e!==null){var y=_e,j=la;switch(Ve){case 8:po(),h=6;break e;case 3:case 2:case 9:case 6:aa.current===null&&(t=!0);var C=Ve;if(Ve=0,la=null,pi(e,y,j,C),a&&di){h=0;break e}break;default:C=Ve,Ve=0,la=null,pi(e,y,j,C)}}Tg(),h=ct;break}catch(z){Ym(e,z)}while(!0);return t&&e.shellSuspendCounter++,rn=pl=null,qe=i,U.H=r,U.A=o,_e===null&&(Ie=null,ke=0,Js()),h}function Tg(){for(;_e!==null;)Qm(_e)}function Og(e,t){var a=qe;qe|=2;var i=Zm(),r=Gm();Ie!==e||ke!==t?(Er=null,Ar=At()+500,mi(e,t)):di=ge(e,t);e:do try{if(Ve!==0&&_e!==null){t=_e;var o=la;t:switch(Ve){case 1:Ve=0,la=null,pi(e,t,o,1);break;case 2:case 9:if(ah(o)){Ve=0,la=null,Xm(t);break}t=function(){Ve!==2&&Ve!==9||Ie!==e||(Ve=7),Ja(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,la=null,Xm(t)):(Ve=0,la=null,pi(e,t,o,7));break;case 5:var h=null;switch(_e.tag){case 26:h=_e.memoizedState;case 5:case 27:var y=_e;if(h?Op(h):y.stateNode.complete){Ve=0,la=null;var j=y.sibling;if(j!==null)_e=j;else{var C=y.return;C!==null?(_e=C,Rr(C)):_e=null}break t}}Ve=0,la=null,pi(e,t,o,5);break;case 6:Ve=0,la=null,pi(e,t,o,6);break;case 8:po(),ct=6;break e;default:throw Error(u(462))}}Mg();break}catch(z){Ym(e,z)}while(!0);return rn=pl=null,U.H=i,U.A=r,qe=a,_e!==null?0:(Ie=null,ke=0,Js(),ct)}function Mg(){for(;_e!==null&&!Ml();)Qm(_e)}function Qm(e){var t=xm(e.alternate,e,yn);e.memoizedProps=e.pendingProps,t===null?Rr(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,yn),t=xm(a,t,yn)}e.memoizedProps=e.pendingProps,t===null?Rr(e):_e=t}function pi(e,t,a,i){rn=pl=null,Rc(t),li=null,Xi=0;var r=t.return;try{if(wg(e,r,t,a,ke)){ct=1,yr(e,ya(a,e.current)),_e=null;return}}catch(o){if(r!==null)throw _e=r,o;ct=1,yr(e,ya(a,e.current)),_e=null;return}t.flags&32768?(Le||i===1?e=!0:di||(ke&536870912)!==0?e=!1:(Vn=e=!0,(i===2||i===9||i===3||i===6)&&(i=aa.current,i!==null&&i.tag===13&&(i.flags|=16384))),Km(t,e)):Rr(t)}function Rr(e){var t=e;do{if((t.flags&32768)!==0){Km(t,Vn);return}e=t.return;var a=Ng(t.alternate,t,yn);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=_g(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,y,j){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|=nc,ha(e,a,o,h,y,j),e===Ie&&(_e=Ie=null,ke=0),hi=t,Qn=e,vn=a,fo=o,ho=r,Bm=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,zg(Lt,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=I.p,I.p=2,h=qe,qe|=4;try{Ag(e,t,a)}finally{qe=h,I.p=r,U.T=i}}bt=1,Im(),Fm(),Wm()}}function Im(){if(bt===1){bt=0;var e=Qn,t=hi,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var i=I.p;I.p=2;var r=qe;qe|=4;try{Rm(t,e);var o=ko,h=Uf(e.containerInfo),y=o.focusedElem,j=o.selectionRange;if(h!==y&&y&&y.ownerDocument&&Lf(y.ownerDocument.documentElement,y)){if(j!==null&&Wu(y)){var C=j.start,z=j.end;if(z===void 0&&(z=C),"selectionStart"in y)y.selectionStart=C,y.selectionEnd=Math.min(z,y.value.length);else{var V=y.ownerDocument||document,T=V&&V.defaultView||window;if(T.getSelection){var M=T.getSelection(),le=y.textContent.length,fe=Math.min(j.start,le),Je=j.end===void 0?fe:Math.min(j.end,le);!M.extend&&fe>Je&&(h=Je,Je=fe,fe=h);var A=Df(y,fe),N=Df(y,Je);if(A&&N&&(M.rangeCount!==1||M.anchorNode!==A.node||M.anchorOffset!==A.offset||M.focusNode!==N.node||M.focusOffset!==N.offset)){var k=V.createRange();k.setStart(A.node,A.offset),M.removeAllRanges(),fe>Je?(M.addRange(k),M.extend(N.node,N.offset)):(k.setEnd(N.node,N.offset),M.addRange(k))}}}}for(V=[],M=y;M=M.parentNode;)M.nodeType===1&&V.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y<V.length;y++){var q=V[y];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}Vr=!!Eo,ko=Eo=null}finally{qe=r,I.p=i,U.T=a}}e.current=t,bt=2}}function Fm(){if(bt===2){bt=0;var e=Qn,t=hi,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var i=I.p;I.p=2;var r=qe;qe|=4;try{_m(e,t.alternate,t)}finally{qe=r,I.p=i,U.T=a}}bt=3}}function Wm(){if(bt===4||bt===3){bt=0,kn();var e=Qn,t=hi,a=vn,i=Bm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?bt=5:(bt=0,hi=Qn=null,Pm(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Gn=null),Pt(a),t=t.stateNode,Et&&typeof Et.onCommitFiberRoot=="function")try{Et.onCommitFiberRoot(Ma,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=U.T,r=I.p,I.p=2,U.T=null;try{for(var o=e.onRecoverableError,h=0;h<i.length;h++){var y=i[h];o(y.value,{componentStack:y.stack})}}finally{U.T=t,I.p=r}}(vn&3)!==0&&Tr(),Ja(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===mo?os++:(os=0,mo=e):os=0,ds(0)}}function Pm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Gi(t)))}function Tr(){return Im(),Fm(),Wm(),ep()}function ep(){if(bt!==5)return!1;var e=Qn,t=fo;fo=0;var a=Pt(vn),i=U.T,r=I.p;try{I.p=32>a?32:a,U.T=null,a=ho,ho=null;var o=Qn,h=vn;if(bt=0,hi=Qn=null,vn=0,(qe&6)!==0)throw Error(u(331));var y=qe;if(qe|=4,Lm(o.current),Om(o,o.current,h,a),qe=y,ds(0,!1),Et&&typeof Et.onPostCommitFiberRoot=="function")try{Et.onPostCommitFiberRoot(Ma,o)}catch{}return!0}finally{I.p=r,U.T=i,Pm(e,t)}}function tp(e,t,a){t=ya(a,t),t=Gc(e.stateNode,t,2),e=qn(e,t,2),e!==null&&(dt(e,2),Ja(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"&&(Gn===null||!Gn.has(i))){e=ya(a,e),a=am(2),i=qn(t,a,2),i!==null&&(nm(a,i,t,e),dt(i,2),Ja(i));break}}t=t.return}}function yo(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new Cg;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)||(uo=!0,r.add(a),e=Dg.bind(null,e,t,a),t.then(e,e))}function Dg(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ie===e&&(ke&a)===a&&(ct===4||ct===3&&(ke&62914560)===ke&&300>At()-_r?(qe&2)===0&&mi(e,0):co|=a,fi===ke&&(fi=0)),Ja(e)}function ap(e,t){t===0&&(t=Ut()),e=fl(e,t),e!==null&&(dt(e,t),Ja(e))}function Lg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),ap(e,a)}function Ug(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 zg(e,t){return Ft(e,t)}var Or=null,xi=null,vo=!1,Mr=!1,go=!1,Kn=0;function Ja(e){e!==xi&&e.next===null&&(xi===null?Or=xi=e:xi=xi.next=e),Mr=!0,vo||(vo=!0,qg())}function ds(e,t){if(!go&&Mr){go=!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,y=i.pingedLanes;o=(1<<31-kt(42|e)+1)-1,o&=r&~(h&~y),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,sp(i,o))}else o=ke,o=Z(i,i===Ie?o:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(o&3)===0||ge(i,o)||(a=!0,sp(i,o));i=i.next}while(a);go=!1}}function Bg(){np()}function np(){Mr=vo=!1;var e=0;Kn!==0&&Jg()&&(e=Kn);for(var t=At(),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&&(xi=a)):(a=i,(e!==0||(o&3)!==0)&&(Mr=!0)),i=r}bt!==0&&bt!==5||ds(e),Kn!==0&&(Kn=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-kt(o),y=1<<h,j=r[h];j===-1?((y&a)===0||(y&i)!==0)&&(r[h]=Qe(y,t)):j<=t&&(e.expiredLanes|=y),o&=~y}if(t=Ie,a=ke,a=Z(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&&En(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ge(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&En(i),Pt(a)){case 2:case 8:a=Za;break;case 32:a=Lt;break;case 268435456:a=rl;break;default:a=Lt}return i=ip.bind(null,e),a=Ft(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&En(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=Z(e,e===Ie?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Hm(e,i,t),lp(e,At()),e.callbackNode!=null&&e.callbackNode===a?ip.bind(null,e):null)}function sp(e,t){if(Tr())return null;Hm(e,t,!0)}function qg(){Fg(function(){(qe&6)!==0?Ft(Oa,Bg):np()})}function bo(){if(Kn===0){var e=ti;e===0&&(e=Ga,Ga<<=1,(Ga&261888)===0&&(Ga=256)),Kn=e}return Kn}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 Hg(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 y=new Gs("action","action",null,i,r);e.push({event:y,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Kn!==0){var j=h?up(r,h):new FormData(r);qc(a,{pending:!0,data:j,method:r.method,action:o},null,j)}}else typeof o=="function"&&(y.preventDefault(),j=h?up(r,h):new FormData(r),qc(a,{pending:!0,data:j,method:r.method,action:o},o,j))},currentTarget:r}]})}}for(var wo=0;wo<ac.length;wo++){var So=ac[wo],$g=So.toLowerCase(),Yg=So[0].toUpperCase()+So.slice(1);La($g,"on"+Yg)}La(qf,"onAnimationEnd"),La(Hf,"onAnimationIteration"),La($f,"onAnimationStart"),La("dblclick","onDoubleClick"),La("focusin","onFocus"),La("focusout","onBlur"),La(lg,"onTransitionRun"),La(ig,"onTransitionStart"),La(sg,"onTransitionCancel"),La(Yf,"onTransitionEnd"),$l("onMouseEnter",["mouseout","mouseover"]),$l("onMouseLeave",["mouseout","mouseover"]),$l("onPointerEnter",["pointerout","pointerover"]),$l("onPointerLeave",["pointerout","pointerover"]),ul("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ul("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ul("onBeforeInput",["compositionend","keypress","textInput","paste"]),ul("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ul("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ul("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fs="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(" "),Vg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fs));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 y=i[h],j=y.instance,C=y.currentTarget;if(y=y.listener,j!==o&&r.isPropagationStopped())break e;o=y,r.currentTarget=C;try{o(r)}catch(z){Ks(z)}r.currentTarget=null,o=j}else for(h=0;h<i.length;h++){if(y=i[h],j=y.instance,C=y.currentTarget,y=y.listener,j!==o&&r.isPropagationStopped())break e;o=y,r.currentTarget=C;try{o(r)}catch(z){Ks(z)}r.currentTarget=null,o=j}}}}function Ae(e,t){var a=t[Du];a===void 0&&(a=t[Du]=new Set);var i=e+"__bubble";a.has(i)||(op(t,e,2,!1),a.add(i))}function jo(e,t,a){var i=0;t&&(i|=4),op(a,e,i,t)}var Dr="_reactListening"+Math.random().toString(36).slice(2);function No(e){if(!e[Dr]){e[Dr]=!0,af.forEach(function(a){a!=="selectionchange"&&(Vg.has(a)||jo(a,!1,e),jo(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Dr]||(t[Dr]=!0,jo("selectionchange",!1,t))}}function op(e,t,a,i){switch(qp(t)){case 2:var r=y0;break;case 8:r=v0;break;default:r=qo}a=r.bind(null,t,a,e),r=void 0,!Vu||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 _o(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 y=i.stateNode.containerInfo;if(y===r)break;if(h===4)for(h=i.return;h!==null;){var j=h.tag;if((j===3||j===4)&&h.stateNode.containerInfo===r)return;h=h.return}for(;y!==null;){if(h=Bl(y),h===null)return;if(j=h.tag,j===5||j===6||j===26||j===27){i=o=h;continue e}y=y.parentNode}}i=i.return}pf(function(){var C=o,z=$u(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=Uv;break;case"focusin":le="focus",M=Xu;break;case"focusout":le="blur",M=Xu;break;case"beforeblur":case"afterblur":M=Xu;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=Nv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=qv;break;case qf:case Hf:case $f:M=Ev;break;case Yf:M=$v;break;case"scroll":case"scrollend":M=Sv;break;case"wheel":M=Vv;break;case"copy":case"cut":case"paste":M=Cv;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=Gv}var fe=(t&4)!==0,Je=!fe&&(e==="scroll"||e==="scrollend"),A=fe?T!==null?T+"Capture":null:T;fe=[];for(var N=C,k;N!==null;){var q=N;if(k=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||k===null||A===null||(q=Di(N,A),q!=null&&fe.push(hs(N,q,k))),Je)break;N=N.return}0<fe.length&&(T=new M(T,le,null,a,z),V.push({event:T,listeners:fe}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",T&&a!==Hu&&(le=a.relatedTarget||a.fromElement)&&(Bl(le)||le[zl]))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=C,le=le?Bl(le):null,le!==null&&(Je=f(le),fe=le.tag,le!==Je||fe!==5&&fe!==27&&fe!==6)&&(le=null)):(M=null,le=C),M!==le)){if(fe=vf,q="onMouseLeave",A="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(fe=bf,q="onPointerLeave",A="onPointerEnter",N="pointer"),Je=M==null?T:Mi(M),k=le==null?T:Mi(le),T=new fe(q,N+"leave",M,a,z),T.target=Je,T.relatedTarget=k,q=null,Bl(z)===C&&(fe=new fe(A,N+"enter",le,a,z),fe.target=k,fe.relatedTarget=Je,q=fe),Je=q,M&&le)t:{for(fe=Zg,A=M,N=le,k=0,q=A;q;q=fe(q))k++;q=0;for(var ue=N;ue;ue=fe(ue))q++;for(;0<k-q;)A=fe(A),k--;for(;0<q-k;)N=fe(N),q--;for(;k--;){if(A===N||N!==null&&A===N.alternate){fe=A;break t}A=fe(A),N=fe(N)}fe=null}else fe=null;M!==null&&dp(V,T,M,fe,!1),le!==null&&Je!==null&&dp(V,Je,le,fe,!0)}}e:{if(T=C?Mi(C):window,M=T.nodeName&&T.nodeName.toLowerCase(),M==="select"||M==="input"&&T.type==="file")var ze=kf;else if(Af(T))if(Cf)ze=tg;else{ze=Pv;var ie=Wv}else M=T.nodeName,!M||M.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?C&&qu(C.elementType)&&(ze=kf):ze=eg;if(ze&&(ze=ze(e,C))){Ef(V,ze,a,z);break e}ie&&ie(e,T,C),e==="focusout"&&C&&T.type==="number"&&C.memoizedProps.value!=null&&Bu(T,"number",T.value)}switch(ie=C?Mi(C):window,e){case"focusin":(Af(ie)||ie.contentEditable==="true")&&(Xl=ie,Pu=C,Yi=null);break;case"focusout":Yi=Pu=Xl=null;break;case"mousedown":ec=!0;break;case"contextmenu":case"mouseup":case"dragend":ec=!1,zf(V,a,z);break;case"selectionchange":if(ng)break;case"keydown":case"keyup":zf(V,a,z)}var Se;if(Ju)e:{switch(e){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else Ql?Nf(e,a)&&(Ce="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ce="onCompositionStart");Ce&&(wf&&a.locale!=="ko"&&(Ql||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&Ql&&(Se=xf()):(On=z,Zu="value"in On?On.value:On.textContent,Ql=!0)),ie=Lr(C,Ce),0<ie.length&&(Ce=new gf(Ce,e,null,a,z),V.push({event:Ce,listeners:ie}),Se?Ce.data=Se:(Se=_f(a),Se!==null&&(Ce.data=Se)))),(Se=Xv?Kv(e,a):Jv(e,a))&&(Ce=Lr(C,"onBeforeInput"),0<Ce.length&&(ie=new gf("onBeforeInput","beforeinput",null,a,z),V.push({event:ie,listeners:Ce}),ie.data=Se)),Hg(V,e,C,a,z)}cp(V,t)})}function hs(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=Di(e,a),r!=null&&i.unshift(hs(e,r,o)),r=Di(e,t),r!=null&&i.push(hs(e,r,o))),e.tag===3)return i;e=e.return}return[]}function Zg(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 y=a,j=y.alternate,C=y.stateNode;if(y=y.tag,j!==null&&j===i)break;y!==5&&y!==26&&y!==27||C===null||(j=C,r?(C=Di(a,o),C!=null&&h.unshift(hs(a,C,j))):r||(C=Di(a,o),C!=null&&h.push(hs(a,C,j)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var Gg=/\r\n?/g,Qg=/\u0000|\uFFFD/g;function fp(e){return(typeof e=="string"?e:""+e).replace(Gg,`
|
|
49
|
-
`).replace(Qg,"")}function hp(e,t){return t=fp(t),fp(e)===t}function Ke(e,t,a,i,r,o){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Vl(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Vl(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"&&Ke(e,t,"name",r.name,r,null),Ke(e,t,"formEncType",r.formEncType,r,null),Ke(e,t,"formMethod",r.formMethod,r,null),Ke(e,t,"formTarget",r.formTarget,r,null)):(Ke(e,t,"encType",r.encType,r,null),Ke(e,t,"method",r.method,r,null),Ke(e,t,"target",r.target,r,null)));if(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=an);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":tn(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":tn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":tn(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":tn(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":tn(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":tn(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":tn(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":tn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":tn(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=bv.get(a)||a,Bs(e,a,i))}}function Ao(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"?Vl(e,i):(typeof i=="number"||typeof i=="bigint")&&Vl(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=an);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 Dt(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:Ke(e,t,o,h,a,null)}}r&&Ke(e,t,"srcSet",a.srcSet,a,null),i&&Ke(e,t,"src",a.src,a,null);return;case"input":Ae("invalid",e);var y=o=h=r=null,j=null,C=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":j=z;break;case"defaultChecked":C=z;break;case"value":o=z;break;case"defaultValue":y=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(u(137,t));break;default:Ke(e,t,i,z,a,null)}}cf(e,o,y,j,C,h,r,!1);return;case"select":Ae("invalid",e),i=h=o=null;for(r in a)if(a.hasOwnProperty(r)&&(y=a[r],y!=null))switch(r){case"value":o=y;break;case"defaultValue":h=y;break;case"multiple":i=y;default:Ke(e,t,r,y,a,null)}t=o,a=h,e.multiple=!!i,t!=null?Yl(e,!!i,t,!1):a!=null&&Yl(e,!!i,a,!0);return;case"textarea":Ae("invalid",e),o=r=i=null;for(h in a)if(a.hasOwnProperty(h)&&(y=a[h],y!=null))switch(h){case"value":i=y;break;case"defaultValue":r=y;break;case"children":o=y;break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(u(91));break;default:Ke(e,t,h,y,a,null)}df(e,i,r,o);return;case"option":for(j in a)if(a.hasOwnProperty(j)&&(i=a[j],i!=null))switch(j){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:Ke(e,t,j,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<fs.length;i++)Ae(fs[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(C in a)if(a.hasOwnProperty(C)&&(i=a[C],i!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ke(e,t,C,i,a,null)}return;default:if(qu(t)){for(z in a)a.hasOwnProperty(z)&&(i=a[z],i!==void 0&&Ao(e,t,z,i,a,void 0));return}}for(y in a)a.hasOwnProperty(y)&&(i=a[y],i!=null&&Ke(e,t,y,i,a,null))}function Xg(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,y=null,j=null,C=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":j=V;default:i.hasOwnProperty(M)||Ke(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":C=M;break;case"defaultChecked":z=M;break;case"value":h=M;break;case"defaultValue":y=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(u(137,t));break;default:M!==V&&Ke(e,t,T,M,i,V)}}zu(e,h,y,j,C,z,o,r);return;case"select":M=h=y=T=null;for(o in a)if(j=a[o],a.hasOwnProperty(o)&&j!=null)switch(o){case"value":break;case"multiple":M=j;default:i.hasOwnProperty(o)||Ke(e,t,o,null,i,j)}for(r in i)if(o=i[r],j=a[r],i.hasOwnProperty(r)&&(o!=null||j!=null))switch(r){case"value":T=o;break;case"defaultValue":y=o;break;case"multiple":h=o;default:o!==j&&Ke(e,t,r,o,i,j)}t=y,a=h,i=M,T!=null?Yl(e,!!a,T,!1):!!i!=!!a&&(t!=null?Yl(e,!!a,t,!0):Yl(e,!!a,a?[]:"",!1));return;case"textarea":M=T=null;for(y in a)if(r=a[y],a.hasOwnProperty(y)&&r!=null&&!i.hasOwnProperty(y))switch(y){case"value":break;case"children":break;default:Ke(e,t,y,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&&Ke(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:Ke(e,t,le,null,i,T)}for(j in i)if(T=i[j],M=a[j],i.hasOwnProperty(j)&&T!==M&&(T!=null||M!=null))switch(j){case"selected":e.selected=T&&typeof T!="function"&&typeof T!="symbol";break;default:Ke(e,t,j,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 fe in a)T=a[fe],a.hasOwnProperty(fe)&&T!=null&&!i.hasOwnProperty(fe)&&Ke(e,t,fe,null,i,T);for(C in i)if(T=i[C],M=a[C],i.hasOwnProperty(C)&&T!==M&&(T!=null||M!=null))switch(C){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(u(137,t));break;default:Ke(e,t,C,T,i,M)}return;default:if(qu(t)){for(var Je in a)T=a[Je],a.hasOwnProperty(Je)&&T!==void 0&&!i.hasOwnProperty(Je)&&Ao(e,t,Je,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||Ao(e,t,z,T,i,M);return}}for(var A in a)T=a[A],a.hasOwnProperty(A)&&T!=null&&!i.hasOwnProperty(A)&&Ke(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||Ke(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 Kg(){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,y=r.duration;if(o&&y&&mp(h)){for(h=0,y=r.responseEnd,i+=1;i<a.length;i++){var j=a[i],C=j.startTime;if(C>y)break;var z=j.transferSize,V=j.initiatorType;z&&mp(V)&&(j=j.responseEnd,h+=z*(j<y?1:(y-C)/(j-C)))}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 Eo=null,ko=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 Co(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 Jg(){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,Ig=typeof clearTimeout=="function"?clearTimeout:void 0,vp=typeof Promise=="function"?Promise:void 0,Fg=typeof queueMicrotask=="function"?queueMicrotask:typeof vp<"u"?function(e){return vp.resolve(null).then(e).catch(Wg)}:yp;function Wg(e){setTimeout(function(){throw e})}function Jn(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),bi(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")ms(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ms(a);for(var o=a.firstChild;o;){var h=o.nextSibling,y=o.nodeName;o[Oi]||y==="SCRIPT"||y==="STYLE"||y==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=h}}else a==="body"&&ms(e.ownerDocument.body);a=r}while(a);bi(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 To(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":To(a),Lu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Pg(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[Oi])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=Sa(e.nextSibling),e===null)break}return null}function e0(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Sa(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=Sa(e.nextSibling),e===null))return null;return e}function Oo(e){return e.data==="$?"||e.data==="$~"}function Mo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function t0(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 Sa(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 Do=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 Sa(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 ms(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Lu(e)}var ja=new Map,_p=new Set;function zr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var gn=I.d;I.d={f:a0,r:n0,D:l0,C:i0,L:s0,m:r0,X:c0,S:u0,M:o0};function a0(){var e=gn.f(),t=kr();return e||t}function n0(e){var t=ql(e);t!==null&&t.tag===5&&t.type==="form"?Yh(t):gn.r(e)}var yi=typeof document>"u"?null:document;function Ap(e,t,a){var i=yi;if(i&&typeof t=="string"&&t){var r=pa(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"),Dt(t,"link",e),St(t),i.head.appendChild(t)))}}function l0(e){gn.D(e),Ap("dns-prefetch",e,null)}function i0(e,t){gn.C(e,t),Ap("preconnect",e,t)}function s0(e,t,a){gn.L(e,t,a);var i=yi;if(i&&e&&t){var r='link[rel="preload"][as="'+pa(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+pa(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+pa(a.imageSizes)+'"]')):r+='[href="'+pa(e)+'"]';var o=r;switch(t){case"style":o=vi(e);break;case"script":o=gi(e)}ja.has(o)||(e=_({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),ja.set(o,e),i.querySelector(r)!==null||t==="style"&&i.querySelector(ps(o))||t==="script"&&i.querySelector(xs(o))||(t=i.createElement("link"),Dt(t,"link",e),St(t),i.head.appendChild(t)))}}function r0(e,t){gn.m(e,t);var a=yi;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+pa(i)+'"][href="'+pa(e)+'"]',o=r;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=gi(e)}if(!ja.has(o)&&(e=_({rel:"modulepreload",href:e},t),ja.set(o,e),a.querySelector(r)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(xs(o)))return}i=a.createElement("link"),Dt(i,"link",e),St(i),a.head.appendChild(i)}}}function u0(e,t,a){gn.S(e,t,a);var i=yi;if(i&&e){var r=Hl(i).hoistableStyles,o=vi(e);t=t||"default";var h=r.get(o);if(!h){var y={loading:0,preload:null};if(h=i.querySelector(ps(o)))y.loading=5;else{e=_({rel:"stylesheet",href:e,"data-precedence":t},a),(a=ja.get(o))&&Lo(e,a);var j=h=i.createElement("link");St(j),Dt(j,"link",e),j._p=new Promise(function(C,z){j.onload=C,j.onerror=z}),j.addEventListener("load",function(){y.loading|=1}),j.addEventListener("error",function(){y.loading|=2}),y.loading|=4,Br(h,t,i)}h={type:"stylesheet",instance:h,count:1,state:y},r.set(o,h)}}}function c0(e,t){gn.X(e,t);var a=yi;if(a&&e){var i=Hl(a).hoistableScripts,r=gi(e),o=i.get(r);o||(o=a.querySelector(xs(r)),o||(e=_({src:e,async:!0},t),(t=ja.get(r))&&Uo(e,t),o=a.createElement("script"),St(o),Dt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(r,o))}}function o0(e,t){gn.M(e,t);var a=yi;if(a&&e){var i=Hl(a).hoistableScripts,r=gi(e),o=i.get(r);o||(o=a.querySelector(xs(r)),o||(e=_({src:e,async:!0,type:"module"},t),(t=ja.get(r))&&Uo(e,t),o=a.createElement("script"),St(o),Dt(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=vi(a.href),a=Hl(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=vi(a.href);var o=Hl(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(ps(e)))&&!o._p&&(h.instance=o,h.state.loading=5),ja.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},ja.set(e,a),o||d0(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=gi(a),a=Hl(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 vi(e){return'href="'+pa(e)+'"'}function ps(e){return'link[rel="stylesheet"]['+e+"]"}function kp(e){return _({},e,{"data-precedence":e.precedence,precedence:null})}function d0(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}),Dt(t,"link",a),St(t),e.head.appendChild(t))}function gi(e){return'[src="'+pa(e)+'"]'}function xs(e){return"script[async]"+e}function Cp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+pa(a.href)+'"]');if(i)return t.instance=i,St(i),i;var r=_({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),St(i),Dt(i,"style",r),Br(i,a.precedence,e),t.instance=i;case"stylesheet":r=vi(a.href);var o=e.querySelector(ps(r));if(o)return t.state.loading|=4,t.instance=o,St(o),o;i=kp(a),(r=ja.get(r))&&Lo(i,r),o=(e.ownerDocument||e).createElement("link"),St(o);var h=o;return h._p=new Promise(function(y,j){h.onload=y,h.onerror=j}),Dt(o,"link",i),t.state.loading|=4,Br(o,a.precedence,e),t.instance=o;case"script":return o=gi(a.src),(r=e.querySelector(xs(o)))?(t.instance=r,St(r),r):(i=a,(r=ja.get(o))&&(i=_({},a),Uo(i,r)),e=e.ownerDocument||e,r=e.createElement("script"),St(r),Dt(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 y=i[h];if(y.dataset.precedence===t)o=y;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 Lo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Uo(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 Rp(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[Oi]||o[Rt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var h=o.getAttribute(t)||"";h=e+h;var y=i.get(h);y?y.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 f0(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 h0(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=vi(i.href),o=t.querySelector(ps(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,St(o);return}o=t.ownerDocument||t,i=kp(i),(r=ja.get(r))&&Lo(i,r),o=o.createElement("link"),St(o);var h=o;h._p=new Promise(function(y,j){h.onload=y,h.onerror=j}),Dt(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 zo=0;function m0(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&&zo===0&&(zo=62500*Kg());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>zo?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(p0,e),$r=null,Hr.call(e))}function p0(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 ys={$$typeof:P,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function x0(e,t,a,i,r,o,h,y,j){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=Da(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Da(0),this.hiddenUpdates=Da(null),this.identifierPrefix=i,this.onUncaughtError=r,this.onCaughtError=o,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function Mp(e,t,a,i,r,o,h,y,j,C,z,V){return e=new x0(e,t,a,h,j,C,z,V,y),t=1,o===!0&&(t|=24),o=ta(3,null,null,t),e.current=o,o.stateNode=e,t=pc(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:i,isDehydrated:a,cache:t},gc(o),e}function Dp(e){return e?(e=Il,e):Il}function Lp(e,t,a,i,r,o){r=Dp(r),i.context===null?i.context=r:i.pendingContext=r,i=Bn(t),i.payload={element:a},o=o===void 0?null:o,o!==null&&(i.callback=o),a=qn(e,i,t),a!==null&&(Xt(a,e,t),Ji(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 Bo(e,t){Up(e,t),(e=e.alternate)&&Up(e,t)}function zp(e){if(e.tag===13||e.tag===31){var t=fl(e,67108864);t!==null&&Xt(t,e,67108864),Bo(e,67108864)}}function Bp(e){if(e.tag===13||e.tag===31){var t=sa();t=$e(t);var a=fl(e,t);a!==null&&Xt(a,e,t),Bo(e,t)}}var Vr=!0;function y0(e,t,a,i){var r=U.T;U.T=null;var o=I.p;try{I.p=2,qo(e,t,a,i)}finally{I.p=o,U.T=r}}function v0(e,t,a,i){var r=U.T;U.T=null;var o=I.p;try{I.p=8,qo(e,t,a,i)}finally{I.p=o,U.T=r}}function qo(e,t,a,i){if(Vr){var r=Ho(i);if(r===null)_o(e,t,i,Zr,a),Hp(e,i);else if(b0(r,e,t,a,i))i.stopPropagation();else if(Hp(e,i),t&4&&-1<g0.indexOf(e)){for(;r!==null;){var o=ql(r);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var h=fa(o.pendingLanes);if(h!==0){var y=o;for(y.pendingLanes|=2,y.entangledLanes|=2;h;){var j=1<<31-kt(h);y.entanglements[1]|=j,h&=~j}Ja(o),(qe&6)===0&&(Ar=At()+500,ds(0))}}break;case 31:case 13:y=fl(o,2),y!==null&&Xt(y,o,2),kr(),Bo(o,2)}if(o=Ho(i),o===null&&_o(e,t,i,Zr,a),o===r)break;r=o}r!==null&&i.stopPropagation()}else _o(e,t,i,null,a)}}function Ho(e){return e=$u(e),$o(e)}var Zr=null;function $o(e){if(Zr=null,e=Bl(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(Wt()){case Oa:return 2;case Za:return 8;case Lt:case rt:return 32;case rl:return 268435456;default:return 32}default:return 32}}var Yo=!1,In=null,Fn=null,Wn=null,vs=new Map,gs=new Map,Pn=[],g0="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":In=null;break;case"dragenter":case"dragleave":Fn=null;break;case"mouseover":case"mouseout":Wn=null;break;case"pointerover":case"pointerout":vs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":gs.delete(t.pointerId)}}function bs(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=ql(t),t!==null&&zp(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function b0(e,t,a,i,r){switch(t){case"focusin":return In=bs(In,e,t,a,i,r),!0;case"dragenter":return Fn=bs(Fn,e,t,a,i,r),!0;case"mouseover":return Wn=bs(Wn,e,t,a,i,r),!0;case"pointerover":var o=r.pointerId;return vs.set(o,bs(vs.get(o)||null,e,t,a,i,r)),!0;case"gotpointercapture":return o=r.pointerId,gs.set(o,bs(gs.get(o)||null,e,t,a,i,r)),!0}return!1}function $p(e){var t=Bl(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=Ho(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);Hu=i,a.target.dispatchEvent(i),Hu=null}else return t=ql(a),t!==null&&zp(t),e.blockedOn=a,!1;t.shift()}return!0}function Yp(e,t,a){Gr(e)&&a.delete(t)}function w0(){Yo=!1,In!==null&&Gr(In)&&(In=null),Fn!==null&&Gr(Fn)&&(Fn=null),Wn!==null&&Gr(Wn)&&(Wn=null),vs.forEach(Yp),gs.forEach(Yp)}function Qr(e,t){e.blockedOn===t&&(e.blockedOn=null,Yo||(Yo=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,w0)))}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($o(i||a)===null)continue;break}var o=ql(a);o!==null&&(e.splice(t,3),t-=3,qc(o,{pending:!0,data:r,method:a.method,action:i},i,r))}}))}function bi(e){function t(j){return Qr(j,e)}In!==null&&Qr(In,e),Fn!==null&&Qr(Fn,e),Wn!==null&&Qr(Wn,e),vs.forEach(t),gs.forEach(t);for(var a=0;a<Pn.length;a++){var i=Pn[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Pn.length&&(a=Pn[0],a.blockedOn===null);)$p(a),a.blockedOn===null&&Pn.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 y=null;if(o&&o.hasAttribute("formAction")){if(r=o,h=o[$t]||null)y=h.formAction;else if($o(r)!==null)continue}else y=h.action;typeof y=="function"?a[i+1]=y:(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 Vo(e){this._internalRoot=e}Kr.prototype.render=Vo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,i=sa();Lp(a,i,e,t,null,null)},Kr.prototype.unmount=Vo.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[zl]=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<Pn.length&&t!==0&&t<Pn[a].priority;a++);Pn.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"));I.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 S0={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{Ma=Jr.inject(S0),Et=Jr}catch{}}return Ss.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[zl]=t.current,No(e),new Vo(t)},Ss.hydrateRoot=function(e,t,a){if(!d(e))throw Error(u(299));var i=!1,r="",o=Wh,h=Ph,y=em,j=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&&(y=a.onRecoverableError),a.formState!==void 0&&(j=a.formState)),t=Mp(e,1,!0,t,a??null,i,r,j,o,h,y,Zp),t.context=Dp(null),a=t.current,i=sa(),i=$e(i),r=Bn(i),r.callback=null,qn(a,r,i),a=i,t.current.lanes=a,dt(t,a),Ja(t),e[zl]=t.current,No(e),new Kr(t)},Ss.version="19.2.7",Ss}var tx;function O0(){if(tx)return Qo.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(),Qo.exports=T0(),Qo.exports}var M0=O0();/**
|
|
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 D0(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 L0(n={}){function l(u,d){var g;let f=(g=d.state)==null?void 0:g.masked,{pathname:m,search:x,hash:v}=f||u.location;return xd("",{pathname:m,search:x,hash:v},d.state&&d.state.usr||null,d.state&&d.state.key||"default",f?{pathname:u.location.pathname,search:u.location.search,hash:u.location.hash}:void 0)}function s(u,d){return typeof d=="string"?d:Al(d)}return z0(l,s,null,n)}function at(n,l){if(n===!1||n===null||typeof n>"u")throw new Error(l)}function Ra(n,l){if(!n){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function U0(){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 xd(n,l,s=null,u,d){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof l=="string"?ki(l):l,state:s,key:l&&l.key||u||U0(),mask:d}}function Al({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 ki(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 z0(n,l,s,u={}){let{window:d=document.defaultView,v5Compat:f=!1}=u,m=d.history,x="POP",v=null,g=b();g==null&&(g=0,m.replaceState({...m.state,idx:g},""));function b(){return(m.state||{idx:null}).idx}function _(){x="POP";let D=b(),B=D==null?null:D-g;g=D,v&&v({action:x,location:$.location,delta:B})}function L(D,B){x="PUSH";let F=nx(D)?D:xd($.location,D,B);g=b()+1;let P=lx(F,g),J=$.createHref(F.mask||F);try{m.pushState(P,"",J)}catch(Q){if(Q instanceof DOMException&&Q.name==="DataCloneError")throw Q;d.location.assign(J)}f&&v&&v({action:x,location:$.location,delta:1})}function G(D,B){x="REPLACE";let F=nx(D)?D:xd($.location,D,B);g=b();let P=lx(F,g),J=$.createHref(F.mask||F);m.replaceState(P,"",J),f&&v&&v({action:x,location:$.location,delta:0})}function R(D){return B0(d,D)}let $={get action(){return x},get location(){return n(d,m)},listen(D){if(v)throw new Error("A history only accepts one active listener");return d.addEventListener(ax,_),v=D,()=>{d.removeEventListener(ax,_),v=null}},createHref(D){return l(d,D)},createURL:R,encodeLocation(D){let B=R(D);return{pathname:B.pathname,search:B.search,hash:B.hash}},push:L,replace:G,go(D){return m.go(D)}};return $}function B0(n,l,s=!1){let u="http://localhost";n&&(u=n.location.origin!=="null"?n.location.origin:n.location.href),at(u,"No window.location.(origin|href) available to create URL");let d=typeof l=="string"?l:Al(l);return d=d.replace(/ $/,"%20"),!s&&Fx.test(d)&&(d=u+d),new URL(d,u)}function Wx(n,l,s="/"){return q0(n,l,s,!1)}function q0(n,l,s,u,d){let f=typeof l=="string"?ki(l):l,m=jn(f.pathname||"/",s);if(m==null)return null;let x=H0(n),v=null,g=F0(m);for(let b=0;v==null&&b<x.length;++b)v=I0(x[b],g,u);return v}function H0(n){let l=Px(n);return $0(l),l}function Px(n,l=[],s=[],u="",d=!1){let f=(m,x,v=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)&&v)return;at(b.relativePath.startsWith(u),`Absolute route path "${b.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(u.length)}let _=Ha([u,b.relativePath]),L=s.concat(b);m.children&&m.children.length>0&&(at(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${_}".`),Px(m.children,l,L,_,v)),!(m.path==null&&!m.index)&&l.push({path:_,score:K0(_,m.index),routesMeta:L.map((G,R)=>{let[$,D]=ay(G.relativePath,G.caseSensitive,R===L.length-1);return{...G,matcher:$,compiledParams:D}})})};return n.forEach((m,x)=>{var v;if(m.path===""||!((v=m.path)!=null&&v.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(v=>v===""?f:[f,v].join("/"))),d&&x.push(...m),x.map(v=>n.startsWith("/")&&v===""?"/":v)}function $0(n){n.sort((l,s)=>l.score!==s.score?s.score-l.score:J0(l.routesMeta.map(u=>u.childrenIndex),s.routesMeta.map(u=>u.childrenIndex)))}var Y0=/^:[\w-]+$/,V0=3,Z0=2,G0=1,Q0=10,X0=-2,ix=n=>n==="*";function K0(n,l){let s=n.split("/"),u=s.length;return s.some(ix)&&(u+=X0),l&&(u+=Z0),s.filter(d=>!ix(d)).reduce((d,f)=>d+(Y0.test(f)?V0:f===""?G0:Q0),u)}function J0(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 I0(n,l,s=!1){let{routesMeta:u}=n,d={},f="/",m=[];for(let x=0;x<u.length;++x){let v=u[x],g=x===u.length-1,b=f==="/"?l:l.slice(f.length)||"/",_={path:v.relativePath,caseSensitive:v.caseSensitive,end:g},L=v.matcher&&v.compiledParams?ty(_,b,v.matcher,v.compiledParams):ru(_,b),G=v.route;if(!L&&g&&s&&!u[u.length-1].route.index&&(L=ru({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},b)),!L)return null;Object.assign(d,L.params),m.push({params:d,pathname:Ha([f,L.pathname]),pathnameBase:eb(Ha([f,L.pathnameBase])),route:G}),L.pathnameBase!=="/"&&(f=Ha([f,L.pathnameBase]))}return m}function ru(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=_i(f,1),x=d.slice(1);return{params:u.reduce((g,{paramName:b,isOptional:_},L)=>{if(b==="*"){let R=x[L]||"";m=_i(f.slice(0,f.length-R.length),1)}const G=x[L];return _&&!G?g[b]=void 0:g[b]=(G||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:m,pattern:n}}function ay(n,l=!1,s=!0){Ra(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,v,g,b)=>{if(u.push({paramName:x,isOptional:v!=null}),v){let _=b.charAt(g+m.length);return _&&_!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}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 F0(n){try{return n.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Ra(!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 jn(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 W0(n,l="/"){let{pathname:s,search:u="",hash:d=""}=typeof n=="string"?ki(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:tb(u),hash:ab(d)}}function sx(n,l){let s=_i(l).split("/");return n.split("/").forEach(d=>{d===".."?s.length>1&&s.pop():d!=="."&&s.push(d)}),s.length>1?s.join("/"):"/"}function Io(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 P0(n){return n.filter((l,s)=>s===0||l.route.path&&l.route.path.length>0)}function Md(n){let l=P0(n);return l.map((s,u)=>u===l.length-1?s.pathname:s.pathnameBase)}function Su(n,l,s,u=!1){let d;typeof n=="string"?d=ki(n):(d={...n},at(!d.pathname||!d.pathname.includes("?"),Io("?","pathname","search",d)),at(!d.pathname||!d.pathname.includes("#"),Io("#","pathname","hash",d)),at(!d.search||!d.search.includes("#"),Io("#","search","hash",d)));let f=n===""||d.pathname==="",m=f?"/":d.pathname,x;if(m==null)x=s;else{let _=l.length-1;if(!u&&m.startsWith("..")){let L=m.split("/");for(;L[0]==="..";)L.shift(),_-=1;d.pathname=L.join("/")}x=_>=0?l[_]:"/"}let v=W0(d,x),g=m&&m!=="/"&&m.endsWith("/"),b=(f||m===".")&&s.endsWith("/");return!v.pathname.endsWith("/")&&(g||b)&&(v.pathname+="/"),v}var ny=n=>n.replace(/[\\/]{2,}/g,"/"),Ha=n=>ny(n.join("/"));function _i(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 eb=n=>_i(n).replace(/^\/*/,"/"),tb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,ab=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,nb=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 lb(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function ib(n){let l=n.map(s=>s.route.path).filter(Boolean);return Ha(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(D0(s,f.protocol)):new URL(s),x=jn(m.pathname,l);m.origin===f.origin&&x!=null?s=x+m.search+m.hash:d=!0}catch{Ra(!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 Fo(n,l){return n.origin===l.origin&&(n.origin!=="null"||n.protocol===l.protocol&&n.host===l.host)}function sb(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&&!Fo(d,s),x=!Fo(f,s);if(u==="reject"){if(m||x)throw new Error("External navigation is not allowed")}else if(x&&(d==null||!sb(n,d)||!Fo(d,f)))throw new Error("External navigation is not allowed")}var sy=["POST","PUT","PATCH","DELETE"];new Set(sy);var rb=["GET",...sy];new Set(rb);var ub=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function cb(n){try{return ub.includes(new URL(n).protocol)}catch{return!1}}var Ci=S.createContext(null);Ci.displayName="DataRouter";var ju=S.createContext(null);ju.displayName="DataRouterState";var ry=S.createContext(!1);function ob(){return S.useContext(ry)}var uy=S.createContext({isTransitioning:!1});uy.displayName="ViewTransition";var db=S.createContext(new Map);db.displayName="Fetchers";var fb=S.createContext(null);fb.displayName="Await";var ca=S.createContext(null);ca.displayName="Navigation";var Ls=S.createContext(null);Ls.displayName="Location";var Ya=S.createContext({outlet:null,matches:[],isDataRoute:!1});Ya.displayName="Route";var Ud=S.createContext(null);Ud.displayName="RouteError";var cy="REACT_ROUTER_ERROR",hb="REDIRECT",mb="ROUTE_ERROR_RESPONSE";function pb(n){if(n.startsWith(`${cy}:${hb}:{`))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 xb(n){if(n.startsWith(`${cy}:${mb}:{`))try{let l=JSON.parse(n.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new nb(l.status,l.statusText,l.data)}catch{}}function yb(n,{relative:l}={}){at(Ri(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:u}=S.useContext(ca),{hash:d,pathname:f,search:m}=Us(n,{relative:l}),x=f;return s!=="/"&&(x=f==="/"?s:Ha([s,f])),u.createHref({pathname:x,search:m,hash:d})}function Ri(){return S.useContext(Ls)!=null}function Va(){return at(Ri(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Ls).location}var oy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function dy(n){S.useContext(ca).static||S.useLayoutEffect(n)}function zd(){let{isDataRoute:n}=S.useContext(Ya);return n?Tb():vb()}function vb(){at(Ri(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Ci),{basename:l,navigator:s}=S.useContext(ca),{matches:u}=S.useContext(Ya),{pathname:d}=Va(),f=JSON.stringify(Md(u)),m=S.useRef(!1);return dy(()=>{m.current=!0}),S.useCallback((v,g={})=>{if(Ra(m.current,oy),!m.current)return;if(typeof v=="number"){s.go(v);return}let b=Su(v,JSON.parse(f),d,g.relative==="path");n==null&&l!=="/"&&(b.pathname=b.pathname==="/"?l:Ha([l,b.pathname])),Ld(typeof v=="string"?v:Al(v),s.createHref(b),Dd(s),"reject"),(g.replace?s.replace:s.push)(b,g.state,g)},[l,s,f,d,n])}S.createContext(null);function gb(){let{matches:n}=S.useContext(Ya),l=n[n.length-1];return(l==null?void 0:l.params)??{}}function Us(n,{relative:l}={}){let{matches:s}=S.useContext(Ya),{pathname:u}=Va(),d=JSON.stringify(Md(s));return S.useMemo(()=>Su(n,JSON.parse(d),u,l==="path"),[n,d,u,l])}function bb(n,l){return fy(n,l)}function fy(n,l,s){var D;at(Ri(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=S.useContext(ca),{matches:d}=S.useContext(Ya),f=d[d.length-1],m=f?f.params:{},x=f?f.pathname:"/",v=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=Va(),_;if(l){let B=typeof l=="string"?ki(l):l;at(v==="/"||((D=B.pathname)==null?void 0:D.startsWith(v)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${v}" but pathname "${B.pathname}" was given in the \`location\` prop.`),_=B}else _=b;let L=_.pathname||"/",G=L;if(v!=="/"){let B=v.replace(/^\//,"").split("/");G="/"+L.replace(/^\//,"").split("/").slice(B.length).join("/")}let R=s&&s.state.matches.length?s.state.matches.map(B=>Object.assign(B,{route:s.manifest[B.route.id]||B.route})):Wx(n,{pathname:G});Ra(g||R!=null,`No routes matched location "${_.pathname}${_.search}${_.hash}" `),Ra(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${_.pathname}${_.search}${_.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 $=_b(R&&R.map(B=>Object.assign({},B,{params:Object.assign({},m,B.params),pathname:Ha([v,u.encodeLocation?u.encodeLocation(B.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:B.pathname]),pathnameBase:B.pathnameBase==="/"?v:Ha([v,u.encodeLocation?u.encodeLocation(B.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:B.pathnameBase])})),d,s);return l&&$?S.createElement(Ls.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,..._},navigationType:"POP"}},$):$}function wb(){let n=Rb(),l=lb(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,u="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:u},f={padding:"2px 4px",backgroundColor:u},m=null;return console.error("Error handled by React Router default ErrorBoundary:",n),m=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:f},"ErrorBoundary")," or"," ",S.createElement("code",{style:f},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},l),s?S.createElement("pre",{style:d},s):null,m)}var Sb=S.createElement(wb,null),hy=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,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=xb(n.digest);s&&(n=s)}let l=n!==void 0?S.createElement(Ya.Provider,{value:this.props.routeContext},S.createElement(Ud.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(jb,{error:n},l):l}};hy.contextType=ry;var Wo=new WeakMap;function jb({children:n,error:l}){let{basename:s,navigator:u}=S.useContext(ca);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let d=pb(l.digest);if(d){let f=Wo.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"),cb(x))throw new Error("Invalid redirect location");if(ly&&!Wo.get(l))if(m.isExternal||d.reloadDocument)window.location.href=x;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:d.replace}));throw Wo.set(l,v),v}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x}`})}}return n}function Nb({routeContext:n,match:l,children:s}){let u=S.useContext(Ci);return u&&u.static&&u.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=l.route.id),S.createElement(Ya.Provider,{value:n},s)}function _b(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(_=>_.route.id&&(f==null?void 0:f[_.route.id])!==void 0);at(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,b+1))}let m=!1,x=-1;if(s&&u){m=u.renderFallback;for(let b=0;b<d.length;b++){let _=d[b];if((_.route.HydrateFallback||_.route.hydrateFallbackElement)&&(x=b),_.route.id){let{loaderData:L,errors:G}=u,R=_.route.loader&&!L.hasOwnProperty(_.route.id)&&(!G||G[_.route.id]===void 0);if(_.route.lazy||R){s.isStatic&&(m=!0),x>=0?d=d.slice(0,x+1):d=[d[0]];break}}}}let v=s==null?void 0:s.onError,g=u&&v?(b,_)=>{var L,G;v(b,{location:u.location,params:((G=(L=u.matches)==null?void 0:L[0])==null?void 0:G.params)??{},pattern:ib(u.matches),errorInfo:_})}:void 0;return d.reduceRight((b,_,L)=>{let G,R=!1,$=null,D=null;u&&(G=f&&_.route.id?f[_.route.id]:void 0,$=_.route.errorElement||Sb,m&&(x<0&&L===0?(my("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,D=null):x===L&&(R=!0,D=_.route.hydrateFallbackElement||null)));let B=l.concat(d.slice(0,L+1)),F=()=>{let P;return G?P=$:R?P=D:_.route.Component?P=S.createElement(_.route.Component,null):_.route.element?P=_.route.element:P=b,S.createElement(Nb,{match:_,routeContext:{outlet:b,matches:B,isDataRoute:u!=null},children:P})};return u&&(_.route.ErrorBoundary||_.route.errorElement||L===0)?S.createElement(hy,{location:u.location,revalidation:u.revalidation,component:$,error:G,children:F(),routeContext:{outlet:null,matches:B,isDataRoute:!0},onError:g}):F()},null)}function Bd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ab(n){let l=S.useContext(Ci);return at(l,Bd(n)),l}function Eb(n){let l=S.useContext(ju);return at(l,Bd(n)),l}function kb(n){let l=S.useContext(Ya);return at(l,Bd(n)),l}function qd(n){let l=kb(n),s=l.matches[l.matches.length-1];return at(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function Cb(){return qd("useRouteId")}function Rb(){var u;let n=S.useContext(Ud),l=Eb("useRouteError"),s=qd("useRouteError");return n!==void 0?n:(u=l.errors)==null?void 0:u[s]}function Tb(){let{router:n}=Ab("useNavigate"),l=qd("useNavigate"),s=S.useRef(!1);return dy(()=>{s.current=!0}),S.useCallback(async(d,f={})=>{Ra(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,Ra(!1,s))}S.memo(Ob);function Ob({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}){at(Ri(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d,navigator:f}=S.useContext(ca);Ra(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:m}=S.useContext(Ya),{pathname:x}=Va(),v=zd(),g=Su(n,Md(m),x,u==="path");Ld(typeof n=="string"?n:Al(n),f.createHref(g),Dd(f),"reject");let b=JSON.stringify(g);return S.useEffect(()=>{v(JSON.parse(b),{replace:l,state:s,relative:u})},[v,b,u,l,s]),null}function _l(n){at(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Mb({basename:n="/",children:l=null,location:s,navigationType:u="POP",navigator:d,static:f=!1,useTransitions:m}){at(!Ri(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let x=n.replace(/^\/*/,"/"),v=S.useMemo(()=>({basename:x,navigator:d,static:f,useTransitions:m,future:{}}),[x,d,f,m]);typeof s=="string"&&(s=ki(s));let{pathname:g="/",search:b="",hash:_="",state:L=null,key:G="default",mask:R}=s,$=S.useMemo(()=>{let D=jn(g,x);return D==null?null:{location:{pathname:D,search:b,hash:_,state:L,key:G,mask:R},navigationType:u}},[x,g,b,_,L,G,u,R]);return Ra($!=null,`<Router basename="${x}"> is not able to match the URL "${g}${b}${_}" because it does not start with the basename, so the <Router> won't render anything.`),$==null?null:S.createElement(ca.Provider,{value:v},S.createElement(Ls.Provider,{children:l,value:$}))}function Db({children:n,location:l}){return bb(yd(n),l)}function yd(n,l=[]){let s=[];return S.Children.forEach(n,(u,d)=>{if(!S.isValidElement(u))return;let f=[...l,d];if(u.type===S.Fragment){s.push.apply(s,yd(u.props.children,f));return}at(u.type===_l,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),at(!u.props.index||!u.props.children,"An index route cannot have child routes.");let m={id:u.props.id||f.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(m.children=yd(u.props.children,f)),s.push(m)}),s}var au="get",nu="application/x-www-form-urlencoded";function Nu(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Lb(n){return Nu(n)&&n.tagName.toLowerCase()==="button"}function Ub(n){return Nu(n)&&n.tagName.toLowerCase()==="form"}function zb(n){return Nu(n)&&n.tagName.toLowerCase()==="input"}function Bb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function qb(n,l){return n.button===0&&(!l||l==="_self")&&!Bb(n)}function vd(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 Hb(n,l){let s=vd(n);return l&&l.forEach((u,d)=>{s.has(d)||l.getAll(d).forEach(f=>{s.append(d,f)})}),s}var Ir=null;function $b(){if(Ir===null)try{new FormData(document.createElement("form"),0),Ir=!1}catch{Ir=!0}return Ir}var Yb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Po(n){return n!=null&&!Yb.has(n)?(Ra(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${nu}"`),null):n}function Vb(n,l){let s,u,d,f,m;if(Ub(n)){let x=n.getAttribute("action");u=x?jn(x,l):null,s=n.getAttribute("method")||au,d=Po(n.getAttribute("enctype"))||nu,f=new FormData(n)}else if(Lb(n)||zb(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 v=n.getAttribute("formaction")||x.getAttribute("action");if(u=v?jn(v,l):null,s=n.getAttribute("formmethod")||x.getAttribute("method")||au,d=Po(n.getAttribute("formenctype"))||Po(x.getAttribute("enctype"))||nu,f=new FormData(x,n),!$b()){let{name:g,type:b,value:_}=n;if(b==="image"){let L=g?`${g}.`:"";f.append(`${L}x`,"0"),f.append(`${L}y`,"0")}else g&&f.append(g,_)}}else{if(Nu(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&&jn(d.pathname,l)==="/"?d.pathname=`${_i(l)}/_root.${u}`:d.pathname=`${_i(d.pathname)}.${u}`,d}async function Zb(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 Gb(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 Qb(n,l,s){let u=await Promise.all(n.map(async d=>{let f=l.routes[d.route.id];if(f){let m=await Zb(f,s);return m.links?m.links():[]}return[]}));return Ib(u.flat(1).filter(Gb).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=(v,g)=>s[g]?v.route.id!==s[g].route.id:!0,x=(v,g)=>{var b;return s[g].pathname!==v.pathname||((b=s[g].route.path)==null?void 0:b.endsWith("*"))&&s[g].params["*"]!==v.params["*"]};return f==="assets"?l.filter((v,g)=>m(v,g)||x(v,g)):f==="data"?l.filter((v,g)=>{var _;let b=u.routes[v.route.id];if(!b||!b.hasLoader)return!1;if(m(v,g)||x(v,g))return!0;if(v.route.shouldRevalidate){let L=v.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((_=s[0])==null?void 0:_.params)||{},nextUrl:new URL(n,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof L=="boolean")return L}return!0}):[]}function Xb(n,l,{includeHydrateFallback:s}={}){return Kb(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 Kb(n){return[...new Set(n)]}function Jb(n){let l={},s=Object.keys(n).sort();for(let u of s)l[u]=n[u];return l}function Ib(n,l){let s=new Set;return new Set(l),n.reduce((u,d)=>{let f=JSON.stringify(Jb(d));return s.has(f)||(s.add(f),u.push({key:f,link:d})),u},[])}function $d(){let n=S.useContext(Ci);return Hd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Fb(){let n=S.useContext(ju);return Hd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Yd=S.createContext(void 0);Yd.displayName="FrameworkContext";function _u(){let n=S.useContext(Yd);return Hd(n,"You must render this element inside a <HydratedRouter> element"),n}function Wb(n,l){let s=S.useContext(Yd),[u,d]=S.useState(!1),[f,m]=S.useState(!1),{onFocus:x,onBlur:v,onMouseEnter:g,onMouseLeave:b,onTouchStart:_}=l,L=S.useRef(null);S.useEffect(()=>{if(n==="render"&&m(!0),n==="viewport"){let $=B=>{B.forEach(F=>{m(F.isIntersecting)})},D=new IntersectionObserver($,{threshold:.5});return L.current&&D.observe(L.current),()=>{D.disconnect()}}},[n]),S.useEffect(()=>{if(u){let $=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout($)}}},[u]);let G=()=>{d(!0)},R=()=>{d(!1),m(!1)};return s?n!=="intent"?[f,L,{}]:[f,L,{onFocus:js(x,G),onBlur:js(v,R),onMouseEnter:js(g,G),onMouseLeave:js(b,R),onTouchStart:js(_,G)}]:[!1,L,{}]}function js(n,l){return s=>{n&&n(s),s.defaultPrevented||l(s)}}function Pb({page:n,...l}){let s=ob(),{nonce:u}=_u(),{router:d}=$d(),f=S.useMemo(()=>Wx(d.routes,n,d.basename),[d.routes,n,d.basename]);return f?(l.nonce==null&&u&&(l={...l,nonce:u}),s?S.createElement(t1,{page:n,matches:f,...l}):S.createElement(a1,{page:n,matches:f,...l})):null}function e1(n){let{manifest:l,routeModules:s}=_u(),[u,d]=S.useState([]);return S.useEffect(()=>{let f=!1;return Qb(n,l,s).then(m=>{f||d(m)}),()=>{f=!0}},[n,l,s]),u}function t1({page:n,matches:l,...s}){let u=Va(),{future:d}=_u(),{basename:f}=$d(),m=S.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let x=xy(n,f,d.v8_trailingSlashAwareDataRequests,"rsc"),v=!1,g=[];for(let b of l)typeof b.route.shouldRevalidate=="function"?v=!0:g.push(b.route.id);return v&&g.length>0&&x.searchParams.set("_routes",g.join(",")),[x.pathname+x.search]},[f,d.v8_trailingSlashAwareDataRequests,n,u,l]);return S.createElement(S.Fragment,null,m.map(x=>S.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...s})))}function a1({page:n,matches:l,...s}){let u=Va(),{future:d,manifest:f,routeModules:m}=_u(),{basename:x}=$d(),{loaderData:v,matches:g}=Fb(),b=S.useMemo(()=>cx(n,l,g,f,u,"data"),[n,l,g,f,u]),_=S.useMemo(()=>cx(n,l,g,f,u,"assets"),[n,l,g,f,u]),L=S.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let $=new Set,D=!1;if(l.forEach(F=>{var J;let P=f.routes[F.route.id];!P||!P.hasLoader||(!b.some(Q=>Q.route.id===F.route.id)&&F.route.id in v&&((J=m[F.route.id])!=null&&J.shouldRevalidate)||P.hasClientLoader?D=!0:$.add(F.route.id))}),$.size===0)return[];let B=xy(n,x,d.v8_trailingSlashAwareDataRequests,"data");return D&&$.size>0&&B.searchParams.set("_routes",l.filter(F=>$.has(F.route.id)).map(F=>F.route.id).join(",")),[B.pathname+B.search]},[x,d.v8_trailingSlashAwareDataRequests,v,u,f,b,l,n,m]),G=S.useMemo(()=>Xb(_,f),[_,f]),R=e1(_);return S.createElement(S.Fragment,null,L.map($=>S.createElement("link",{key:$,rel:"prefetch",as:"fetch",href:$,...s})),G.map($=>S.createElement("link",{key:$,rel:"modulepreload",href:$,...s})),R.map(({key:$,link:D})=>S.createElement("link",{key:$,nonce:s.nonce,...D,crossOrigin:D.crossOrigin??s.crossOrigin})))}function n1(...n){return l=>{n.forEach(s=>{typeof s=="function"?s(l):s!=null&&(s.current=l)})}}var l1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{l1&&(window.__reactRouterVersion="7.18.4")}catch{}function i1({basename:n,children:l,useTransitions:s,window:u}){let d=S.useRef();d.current==null&&(d.current=L0({window:u,v5Compat:!0}));let f=d.current,[m,x]=S.useState({action:f.action,location:f.location}),v=S.useCallback(g=>{s===!1?x(g):S.startTransition(()=>x(g))},[s]);return S.useLayoutEffect(()=>f.listen(v),[f,v]),S.createElement(Mb,{basename:n,children:l,location:m.location,navigationType:m.action,navigator:f,useTransitions:s})}var ua=S.forwardRef(function({onClick:l,discover:s="render",prefetch:u="none",relative:d,reloadDocument:f,replace:m,mask:x,state:v,target:g,to:b,preventScrollReset:_,viewTransition:L,defaultShouldRevalidate:G,...R},$){let{basename:D,navigator:B,useTransitions:F}=S.useContext(ca),P=typeof b=="string"&&Od.test(b),J=iy(b,D);b=J.to;let Q=yb(b,{relative:d}),Oe=Va(),K=null;if(x){let We=Su(x,[],Oe.mask?Oe.mask.pathname:"/",!0);D!=="/"&&(We.pathname=We.pathname==="/"?D:Ha([D,We.pathname])),K=B.createHref(We)}let[we,Ye,mt]=Wb(u,R),ot=u1(b,{replace:m,mask:x,state:v,target:g,preventScrollReset:_,relative:d,viewTransition:L,defaultShouldRevalidate:G,useTransitions:F});function nt(We){l&&l(We),We.defaultPrevented||ot(We)}let Nt=!(J.isExternal||f),wt=S.createElement("a",{...R,...mt,href:(Nt?K:void 0)||J.absoluteURL||Q,onClick:Nt?nt:l,ref:n1($,Ye),target:g,"data-discover":!P&&s==="render"?"true":void 0});return we&&!P?S.createElement(S.Fragment,null,wt,S.createElement(Pb,{page:Q})):wt});ua.displayName="Link";var lu=S.forwardRef(function({"aria-current":l="page",caseSensitive:s=!1,className:u="",end:d=!1,style:f,to:m,viewTransition:x,children:v,...g},b){let _=Us(m,{relative:g.relative}),L=Va(),G=S.useContext(ju),{navigator:R,basename:$}=S.useContext(ca),D=G!=null&&h1(_)&&x===!0,B=R.encodeLocation?R.encodeLocation(_).pathname:_.pathname,F=L.pathname,P=G&&G.navigation&&G.navigation.location?G.navigation.location.pathname:null;s||(F=F.toLowerCase(),P=P?P.toLowerCase():null,B=B.toLowerCase()),P&&$&&(P=jn(P,$)||P);const J=B!=="/"&&B.endsWith("/")?B.length-1:B.length;let Q=F===B||!d&&F.startsWith(B)&&F.charAt(J)==="/",Oe=P!=null&&(P===B||!d&&P.startsWith(B)&&P.charAt(B.length)==="/"),K={isActive:Q,isPending:Oe,isTransitioning:D},we=Q?l:void 0,Ye;typeof u=="function"?Ye=u(K):Ye=[u,Q?"active":null,Oe?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let mt=typeof f=="function"?f(K):f;return S.createElement(ua,{...g,"aria-current":we,className:Ye,ref:b,style:mt,to:m,viewTransition:x},typeof v=="function"?v(K):v)});lu.displayName="NavLink";var s1=S.forwardRef(({discover:n="render",fetcherKey:l,navigate:s,reloadDocument:u,replace:d,state:f,method:m=au,action:x,onSubmit:v,relative:g,preventScrollReset:b,viewTransition:_,defaultShouldRevalidate:L,...G},R)=>{let{useTransitions:$}=S.useContext(ca),D=d1(),B=f1(x,{relative:g}),F=m.toLowerCase()==="get"?"get":"post",P=typeof x=="string"&&Od.test(x),J=Q=>{if(v&&v(Q),Q.defaultPrevented)return;Q.preventDefault();let Oe=Q.nativeEvent.submitter,K=(Oe==null?void 0:Oe.getAttribute("formmethod"))||m,we=()=>D(Oe||Q.currentTarget,{fetcherKey:l,method:K,navigate:s,replace:d,state:f,relative:g,preventScrollReset:b,viewTransition:_,defaultShouldRevalidate:L});$&&s!==!1?S.startTransition(()=>we()):we()};return S.createElement("form",{ref:R,method:F,action:B,onSubmit:u?v:J,...G,"data-discover":!P&&n==="render"?"true":void 0})});s1.displayName="Form";function r1(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=S.useContext(Ci);return at(l,r1(n)),l}function u1(n,{target:l,replace:s,mask:u,state:d,preventScrollReset:f,relative:m,viewTransition:x,defaultShouldRevalidate:v,useTransitions:g}={}){let b=zd(),_=Va(),L=Us(n,{relative:m});return S.useCallback(G=>{if(qb(G,l)){G.preventDefault();let R=s!==void 0?s:Al(_)===Al(L),$=()=>b(n,{replace:R,mask:u,state:d,preventScrollReset:f,relative:m,viewTransition:x,defaultShouldRevalidate:v});g?S.startTransition(()=>$()):$()}},[_,b,L,s,u,d,l,n,f,m,x,v,g])}function vy(n){Ra(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=S.useRef(vd(n)),s=S.useRef(!1),u=Va(),d=S.useMemo(()=>Hb(u.search,s.current?null:l.current),[u.search]),f=zd(),m=S.useCallback((x,v)=>{const g=vd(typeof x=="function"?x(new URLSearchParams(d)):x);s.current=!0,f("?"+g,v)},[f,d]);return[d,m]}var c1=0,o1=()=>`__${String(++c1)}__`;function d1(){let{router:n}=yy("useSubmit"),{basename:l}=S.useContext(ca),s=Cb(),u=n.fetch,d=n.navigate;return S.useCallback(async(f,m={})=>{let{action:x,method:v,encType:g,formData:b,body:_}=Vb(f,l);if(m.navigate===!1){let L=m.fetcherKey||o1();await u(L,s,m.action||x,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:_,formMethod:m.method||v,formEncType:m.encType||g,flushSync:m.flushSync})}else await d(m.action||x,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:_,formMethod:m.method||v,formEncType:m.encType||g,replace:m.replace,state:m.state,fromRouteId:s,flushSync:m.flushSync,viewTransition:m.viewTransition})},[u,d,l,s])}function f1(n,{relative:l}={}){let{basename:s}=S.useContext(ca),u=S.useContext(Ya);at(u,"useFormAction must be used inside a RouteContext");let[d]=u.matches.slice(-1),f={...Us(n||".",{relative:l})},m=Va();if(n==null){f.search=m.search;let x=new URLSearchParams(f.search),v=x.getAll("index");if(v.some(b=>b==="")){x.delete("index"),v.filter(_=>_).forEach(_=>x.append("index",_));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:Ha([s,f.pathname])),Al(f)}function h1(n,{relative:l}={}){let s=S.useContext(uy);at(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=Us(n,{relative:l});if(!s.isTransitioning)return!1;let f=jn(s.currentLocation.pathname,u)||s.currentLocation.pathname,m=jn(s.nextLocation.pathname,u)||s.nextLocation.pathname;return ru(d.pathname,m)!=null||ru(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"]),nl=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}},X=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 Nn 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,v=0;for(;v<m.path.length;){const g=m.path[v];v===m.path.length-1?(x[g]=x[g]||{_errors:[]},x[g]._errors.push(s(m))):x[g]=x[g]||{_errors:[]},x=x[g],v++}}};return d(this),u}static assert(l){if(!(l instanceof Nn))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()}}Nn.create=n=>new Nn(n);const gd=(n,l)=>{let s;switch(n.code){case X.invalid_type:n.received===ae.undefined?s="Required":s=`Expected ${n.expected}, received ${n.received}`;break;case X.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(n.expected,Ue.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:s=`Unrecognized key(s) in object: ${Ue.joinValues(n.keys,", ")}`;break;case X.invalid_union:s="Invalid input";break;case X.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${Ue.joinValues(n.options)}`;break;case X.invalid_enum_value:s=`Invalid enum value. Expected ${Ue.joinValues(n.options)}, received '${n.received}'`;break;case X.invalid_arguments:s="Invalid function arguments";break;case X.invalid_return_type:s="Invalid function return type";break;case X.invalid_date:s="Invalid date";break;case X.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 X.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 X.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 X.custom:s="Invalid input";break;case X.invalid_intersection_types:s="Intersection results could not be merged";break;case X.not_multiple_of:s=`Number must be a multiple of ${n.multipleOf}`;break;case X.not_finite:s="Number must be finite";break;default:s=l.defaultError,Ue.assertNever(n)}return{message:s}};let m1=gd;function p1(){return m1}const x1=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 v=u.filter(g=>!!g).slice().reverse();for(const g of v)x=g(m,{data:l,defaultError:x}).message;return{...d,path:f,message:x}};function ee(n,l){const s=p1(),u=x1({issueData:l,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,s,s===gd?void 0:gd].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 he;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 he;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 he=Object.freeze({status:"aborted"}),_s=n=>({status:"dirty",value:n}),Ta=n=>({status:"valid",value:n}),dx=n=>n.status==="aborted",fx=n=>n.status==="dirty",Ai=n=>n.status==="valid",uu=n=>typeof Promise<"u"&&n instanceof Promise;var se;(function(n){n.errToObj=l=>typeof l=="string"?{message:l}:l||{},n.toString=l=>typeof l=="string"?l:l==null?void 0:l.message})(se||(se={}));class Pa{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(Ai(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 Nn(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:v}=n;return m.code==="invalid_enum_value"?{message:v??x.defaultError}:typeof x.data>"u"?{message:v??u??x.defaultError}:m.code!=="invalid_type"?{message:x.defaultError}:{message:v??s??x.defaultError}},description:d}}class Re{get description(){return this._def.description}_getType(l){return nl(l.data)}_getOrReturnCtx(l,s){return s||{common:l.parent.common,data:l.data,parsedType:nl(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:nl(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}}_parseSync(l){const s=this._parse(l);if(uu(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:nl(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:nl(l)};if(!this["~standard"].async)try{const f=this._parseSync({data:l,path:[],parent:s});return Ai(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=>Ai(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:nl(l)},d=this._parse({data:l,path:u.path,parent:u}),f=await(uu(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:X.custom,...u(d)});return typeof Promise<"u"&&m instanceof Promise?m.then(v=>v?!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 Tl({schema:this,typeName:me.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 Sn.create(this,this._def)}nullable(){return Ol.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wa.create(this)}promise(){return mu.create(this,this._def)}or(l){return ou.create([this,l],this._def)}and(l){return du.create(this,l,this._def)}transform(l){return new Tl({...je(this._def),schema:this,typeName:me.ZodEffects,effect:{type:"transform",transform:l}})}default(l){const s=typeof l=="function"?l:()=>l;return new pu({...je(this._def),innerType:this,defaultValue:s,typeName:me.ZodDefault})}brand(){return new Sy({typeName:me.ZodBranded,type:this,...je(this._def)})}catch(l){const s=typeof l=="function"?l:()=>l;return new xu({...je(this._def),innerType:this,catchValue:s,typeName:me.ZodCatch})}describe(l){const s=this.constructor;return new s({...this._def,description:l})}pipe(l){return Zd.create(this,l)}readonly(){return yu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const y1=/^c[^\s-]{8,}$/i,v1=/^[0-9a-z]+$/,g1=/^[0-9A-HJKMNP-TV-Z]{26}$/i,b1=/^[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,w1=/^[a-z0-9_-]{21}$/i,S1=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,j1=/^[-+]?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)?)??$/,N1=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ed;const 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])$/,E1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,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]))$/,C1=/^(([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}=))?$/,T1=/^([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])))",O1=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 M1(n){return new RegExp(`^${by(n)}$`)}function D1(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 L1(n,l){return!!((l==="v4"||!l)&&A1.test(n)||(l==="v6"||!l)&&k1.test(n))}function U1(n,l){if(!S1.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 z1(n,l){return!!((l==="v4"||!l)&&E1.test(n)||(l==="v6"||!l)&&C1.test(n))}class Ia extends Re{_parse(l){if(this._def.coerce&&(l.data=String(l.data)),this._getType(l)!==ae.string){const f=this._getOrReturnCtx(l);return ee(f,{code:X.invalid_type,expected:ae.string,received:f.parsedType}),he}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),ee(d,{code:X.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),ee(d,{code:X.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?ee(d,{code:X.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}):x&&ee(d,{code:X.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}),u.dirty())}else if(f.kind==="email")N1.test(l.data)||(d=this._getOrReturnCtx(l,d),ee(d,{validation:"email",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="emoji")ed||(ed=new RegExp(_1,"u")),ed.test(l.data)||(d=this._getOrReturnCtx(l,d),ee(d,{validation:"emoji",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="uuid")b1.test(l.data)||(d=this._getOrReturnCtx(l,d),ee(d,{validation:"uuid",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="nanoid")w1.test(l.data)||(d=this._getOrReturnCtx(l,d),ee(d,{validation:"nanoid",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid")y1.test(l.data)||(d=this._getOrReturnCtx(l,d),ee(d,{validation:"cuid",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid2")v1.test(l.data)||(d=this._getOrReturnCtx(l,d),ee(d,{validation:"cuid2",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="ulid")g1.test(l.data)||(d=this._getOrReturnCtx(l,d),ee(d,{validation:"ulid",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="url")try{new URL(l.data)}catch{d=this._getOrReturnCtx(l,d),ee(d,{validation:"url",code:X.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),ee(d,{validation:"regex",code:X.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),ee(d,{code:X.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),ee(d,{code:X.invalid_string,validation:{startsWith:f.value},message:f.message}),u.dirty()):f.kind==="endsWith"?l.data.endsWith(f.value)||(d=this._getOrReturnCtx(l,d),ee(d,{code:X.invalid_string,validation:{endsWith:f.value},message:f.message}),u.dirty()):f.kind==="datetime"?D1(f).test(l.data)||(d=this._getOrReturnCtx(l,d),ee(d,{code:X.invalid_string,validation:"datetime",message:f.message}),u.dirty()):f.kind==="date"?O1.test(l.data)||(d=this._getOrReturnCtx(l,d),ee(d,{code:X.invalid_string,validation:"date",message:f.message}),u.dirty()):f.kind==="time"?M1(f).test(l.data)||(d=this._getOrReturnCtx(l,d),ee(d,{code:X.invalid_string,validation:"time",message:f.message}),u.dirty()):f.kind==="duration"?j1.test(l.data)||(d=this._getOrReturnCtx(l,d),ee(d,{validation:"duration",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="ip"?L1(l.data,f.version)||(d=this._getOrReturnCtx(l,d),ee(d,{validation:"ip",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="jwt"?U1(l.data,f.alg)||(d=this._getOrReturnCtx(l,d),ee(d,{validation:"jwt",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="cidr"?z1(l.data,f.version)||(d=this._getOrReturnCtx(l,d),ee(d,{validation:"cidr",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="base64"?R1.test(l.data)||(d=this._getOrReturnCtx(l,d),ee(d,{validation:"base64",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="base64url"?T1.test(l.data)||(d=this._getOrReturnCtx(l,d),ee(d,{validation:"base64url",code:X.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:X.invalid_string,...se.errToObj(u)})}_addCheck(l){return new Ia({...this._def,checks:[...this._def.checks,l]})}email(l){return this._addCheck({kind:"email",...se.errToObj(l)})}url(l){return this._addCheck({kind:"url",...se.errToObj(l)})}emoji(l){return this._addCheck({kind:"emoji",...se.errToObj(l)})}uuid(l){return this._addCheck({kind:"uuid",...se.errToObj(l)})}nanoid(l){return this._addCheck({kind:"nanoid",...se.errToObj(l)})}cuid(l){return this._addCheck({kind:"cuid",...se.errToObj(l)})}cuid2(l){return this._addCheck({kind:"cuid2",...se.errToObj(l)})}ulid(l){return this._addCheck({kind:"ulid",...se.errToObj(l)})}base64(l){return this._addCheck({kind:"base64",...se.errToObj(l)})}base64url(l){return this._addCheck({kind:"base64url",...se.errToObj(l)})}jwt(l){return this._addCheck({kind:"jwt",...se.errToObj(l)})}ip(l){return this._addCheck({kind:"ip",...se.errToObj(l)})}cidr(l){return this._addCheck({kind:"cidr",...se.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,...se.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,...se.errToObj(l==null?void 0:l.message)})}duration(l){return this._addCheck({kind:"duration",...se.errToObj(l)})}regex(l,s){return this._addCheck({kind:"regex",regex:l,...se.errToObj(s)})}includes(l,s){return this._addCheck({kind:"includes",value:l,position:s==null?void 0:s.position,...se.errToObj(s==null?void 0:s.message)})}startsWith(l,s){return this._addCheck({kind:"startsWith",value:l,...se.errToObj(s)})}endsWith(l,s){return this._addCheck({kind:"endsWith",value:l,...se.errToObj(s)})}min(l,s){return this._addCheck({kind:"min",value:l,...se.errToObj(s)})}max(l,s){return this._addCheck({kind:"max",value:l,...se.errToObj(s)})}length(l,s){return this._addCheck({kind:"length",value:l,...se.errToObj(s)})}nonempty(l){return this.min(1,se.errToObj(l))}trim(){return new Ia({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ia({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ia({...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}}Ia.create=n=>new Ia({checks:[],typeName:me.ZodString,coerce:(n==null?void 0:n.coerce)??!1,...je(n)});function B1(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 El extends Re{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 ee(f,{code:X.invalid_type,expected:ae.number,received:f.parsedType}),he}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),ee(u,{code:X.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),ee(u,{code:X.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),ee(u,{code:X.too_big,maximum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),d.dirty()):f.kind==="multipleOf"?B1(l.data,f.value)!==0&&(u=this._getOrReturnCtx(l,u),ee(u,{code:X.not_multiple_of,multipleOf:f.value,message:f.message}),d.dirty()):f.kind==="finite"?Number.isFinite(l.data)||(u=this._getOrReturnCtx(l,u),ee(u,{code:X.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,se.toString(s))}gt(l,s){return this.setLimit("min",l,!1,se.toString(s))}lte(l,s){return this.setLimit("max",l,!0,se.toString(s))}lt(l,s){return this.setLimit("max",l,!1,se.toString(s))}setLimit(l,s,u,d){return new El({...this._def,checks:[...this._def.checks,{kind:l,value:s,inclusive:u,message:se.toString(d)}]})}_addCheck(l){return new El({...this._def,checks:[...this._def.checks,l]})}int(l){return this._addCheck({kind:"int",message:se.toString(l)})}positive(l){return this._addCheck({kind:"min",value:0,inclusive:!1,message:se.toString(l)})}negative(l){return this._addCheck({kind:"max",value:0,inclusive:!1,message:se.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:0,inclusive:!0,message:se.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:0,inclusive:!0,message:se.toString(l)})}multipleOf(l,s){return this._addCheck({kind:"multipleOf",value:l,message:se.toString(s)})}finite(l){return this._addCheck({kind:"finite",message:se.toString(l)})}safe(l){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:se.toString(l)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:se.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)}}El.create=n=>new El({checks:[],typeName:me.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...je(n)});class kl extends Re{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),ee(u,{code:X.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),ee(u,{code:X.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),ee(u,{code:X.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 ee(s,{code:X.invalid_type,expected:ae.bigint,received:s.parsedType}),he}gte(l,s){return this.setLimit("min",l,!0,se.toString(s))}gt(l,s){return this.setLimit("min",l,!1,se.toString(s))}lte(l,s){return this.setLimit("max",l,!0,se.toString(s))}lt(l,s){return this.setLimit("max",l,!1,se.toString(s))}setLimit(l,s,u,d){return new kl({...this._def,checks:[...this._def.checks,{kind:l,value:s,inclusive:u,message:se.toString(d)}]})}_addCheck(l){return new kl({...this._def,checks:[...this._def.checks,l]})}positive(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:se.toString(l)})}negative(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:se.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:se.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:se.toString(l)})}multipleOf(l,s){return this._addCheck({kind:"multipleOf",value:l,message:se.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}}kl.create=n=>new kl({checks:[],typeName:me.ZodBigInt,coerce:(n==null?void 0:n.coerce)??!1,...je(n)});class cu extends Re{_parse(l){if(this._def.coerce&&(l.data=!!l.data),this._getType(l)!==ae.boolean){const u=this._getOrReturnCtx(l);return ee(u,{code:X.invalid_type,expected:ae.boolean,received:u.parsedType}),he}return Ta(l.data)}}cu.create=n=>new cu({typeName:me.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...je(n)});class Ei extends Re{_parse(l){if(this._def.coerce&&(l.data=new Date(l.data)),this._getType(l)!==ae.date){const f=this._getOrReturnCtx(l);return ee(f,{code:X.invalid_type,expected:ae.date,received:f.parsedType}),he}if(Number.isNaN(l.data.getTime())){const f=this._getOrReturnCtx(l);return ee(f,{code:X.invalid_date}),he}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),ee(d,{code:X.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),ee(d,{code:X.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 Ei({...this._def,checks:[...this._def.checks,l]})}min(l,s){return this._addCheck({kind:"min",value:l.getTime(),message:se.toString(s)})}max(l,s){return this._addCheck({kind:"max",value:l.getTime(),message:se.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}}Ei.create=n=>new Ei({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:me.ZodDate,...je(n)});class mx extends Re{_parse(l){if(this._getType(l)!==ae.symbol){const u=this._getOrReturnCtx(l);return ee(u,{code:X.invalid_type,expected:ae.symbol,received:u.parsedType}),he}return Ta(l.data)}}mx.create=n=>new mx({typeName:me.ZodSymbol,...je(n)});class bd extends Re{_parse(l){if(this._getType(l)!==ae.undefined){const u=this._getOrReturnCtx(l);return ee(u,{code:X.invalid_type,expected:ae.undefined,received:u.parsedType}),he}return Ta(l.data)}}bd.create=n=>new bd({typeName:me.ZodUndefined,...je(n)});class wd extends Re{_parse(l){if(this._getType(l)!==ae.null){const u=this._getOrReturnCtx(l);return ee(u,{code:X.invalid_type,expected:ae.null,received:u.parsedType}),he}return Ta(l.data)}}wd.create=n=>new wd({typeName:me.ZodNull,...je(n)});class px extends Re{constructor(){super(...arguments),this._any=!0}_parse(l){return Ta(l.data)}}px.create=n=>new px({typeName:me.ZodAny,...je(n)});class Sd extends Re{constructor(){super(...arguments),this._unknown=!0}_parse(l){return Ta(l.data)}}Sd.create=n=>new Sd({typeName:me.ZodUnknown,...je(n)});class sl extends Re{_parse(l){const s=this._getOrReturnCtx(l);return ee(s,{code:X.invalid_type,expected:ae.never,received:s.parsedType}),he}}sl.create=n=>new sl({typeName:me.ZodNever,...je(n)});class xx extends Re{_parse(l){if(this._getType(l)!==ae.undefined){const u=this._getOrReturnCtx(l);return ee(u,{code:X.invalid_type,expected:ae.void,received:u.parsedType}),he}return Ta(l.data)}}xx.create=n=>new xx({typeName:me.ZodVoid,...je(n)});class Wa extends Re{_parse(l){const{ctx:s,status:u}=this._processInputParams(l),d=this._def;if(s.parsedType!==ae.array)return ee(s,{code:X.invalid_type,expected:ae.array,received:s.parsedType}),he;if(d.exactLength!==null){const m=s.data.length>d.exactLength.value,x=s.data.length<d.exactLength.value;(m||x)&&(ee(s,{code:m?X.too_big:X.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&&(ee(s,{code:X.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&&(ee(s,{code:X.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 Pa(s,m,s.path,x)))).then(m=>qt.mergeArray(u,m));const f=[...s.data].map((m,x)=>d.type._parseSync(new Pa(s,m,s.path,x)));return qt.mergeArray(u,f)}get element(){return this._def.type}min(l,s){return new Wa({...this._def,minLength:{value:l,message:se.toString(s)}})}max(l,s){return new Wa({...this._def,maxLength:{value:l,message:se.toString(s)}})}length(l,s){return new Wa({...this._def,exactLength:{value:l,message:se.toString(s)}})}nonempty(l){return this.min(1,l)}}Wa.create=(n,l)=>new Wa({type:n,minLength:null,maxLength:null,exactLength:null,typeName:me.ZodArray,...je(l)});function Si(n){if(n instanceof gt){const l={};for(const s in n.shape){const u=n.shape[s];l[s]=Sn.create(Si(u))}return new gt({...n._def,shape:()=>l})}else return n instanceof Wa?new Wa({...n._def,type:Si(n.element)}):n instanceof Sn?Sn.create(Si(n.unwrap())):n instanceof Ol?Ol.create(Si(n.unwrap())):n instanceof Cl?Cl.create(n.items.map(l=>Si(l))):n}class gt extends Re{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 ee(g,{code:X.invalid_type,expected:ae.object,received:g.parsedType}),he}const{status:u,ctx:d}=this._processInputParams(l),{shape:f,keys:m}=this._getCached(),x=[];if(!(this._def.catchall instanceof sl&&this._def.unknownKeys==="strip"))for(const g in d.data)m.includes(g)||x.push(g);const v=[];for(const g of m){const b=f[g],_=d.data[g];v.push({key:{status:"valid",value:g},value:b._parse(new Pa(d,_,d.path,g)),alwaysSet:g in d.data})}if(this._def.catchall instanceof sl){const g=this._def.unknownKeys;if(g==="passthrough")for(const b of x)v.push({key:{status:"valid",value:b},value:{status:"valid",value:d.data[b]}});else if(g==="strict")x.length>0&&(ee(d,{code:X.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 _=d.data[b];v.push({key:{status:"valid",value:b},value:g._parse(new Pa(d,_,d.path,b)),alwaysSet:b in d.data})}}return d.common.async?Promise.resolve().then(async()=>{const g=[];for(const b of v){const _=await b.key,L=await b.value;g.push({key:_,value:L,alwaysSet:b.alwaysSet})}return g}).then(g=>qt.mergeObjectSync(u,g)):qt.mergeObjectSync(u,v)}get shape(){return this._def.shape()}strict(l){return se.errToObj,new gt({...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:se.errToObj(l).message??d}:{message:d}}}:{}})}strip(){return new gt({...this._def,unknownKeys:"strip"})}passthrough(){return new gt({...this._def,unknownKeys:"passthrough"})}extend(l){return new gt({...this._def,shape:()=>({...this._def.shape(),...l})})}merge(l){return new gt({unknownKeys:l._def.unknownKeys,catchall:l._def.catchall,shape:()=>({...this._def.shape(),...l._def.shape()}),typeName:me.ZodObject})}setKey(l,s){return this.augment({[l]:s})}catchall(l){return new gt({...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 gt({...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 gt({...this._def,shape:()=>s})}deepPartial(){return Si(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 gt({...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 Sn;)f=f._def.innerType;s[u]=f}return new gt({...this._def,shape:()=>s})}keyof(){return wy(Ue.objectKeys(this.shape))}}gt.create=(n,l)=>new gt({shape:()=>n,unknownKeys:"strip",catchall:sl.create(),typeName:me.ZodObject,...je(l)});gt.strictCreate=(n,l)=>new gt({shape:()=>n,unknownKeys:"strict",catchall:sl.create(),typeName:me.ZodObject,...je(l)});gt.lazycreate=(n,l)=>new gt({shape:n,unknownKeys:"strip",catchall:sl.create(),typeName:me.ZodObject,...je(l)});class ou extends Re{_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 Nn(x.ctx.common.issues));return ee(s,{code:X.invalid_union,unionErrors:m}),he}if(s.common.async)return Promise.all(u.map(async f=>{const m={...s,common:{...s.common,issues:[]},parent:null};return{result:await f._parseAsync({data:s.data,path:s.path,parent:m}),ctx:m}})).then(d);{let f;const m=[];for(const v of u){const g={...s,common:{...s.common,issues:[]},parent:null},b=v._parseSync({data:s.data,path:s.path,parent:g});if(b.status==="valid")return b;b.status==="dirty"&&!f&&(f={result:b,ctx:g}),g.common.issues.length&&m.push(g.common.issues)}if(f)return s.common.issues.push(...f.ctx.common.issues),f.result;const x=m.map(v=>new Nn(v));return ee(s,{code:X.invalid_union,unionErrors:x}),he}}get options(){return this._def.options}}ou.create=(n,l)=>new ou({options:n,typeName:me.ZodUnion,...je(l)});const wn=n=>n instanceof Nd?wn(n.schema):n instanceof Tl?wn(n.innerType()):n instanceof hu?[n.value]:n instanceof Rl?n.options:n instanceof _d?Ue.objectValues(n.enum):n instanceof pu?wn(n._def.innerType):n instanceof bd?[void 0]:n instanceof wd?[null]:n instanceof Sn?[void 0,...wn(n.unwrap())]:n instanceof Ol?[null,...wn(n.unwrap())]:n instanceof Sy||n instanceof yu?wn(n.unwrap()):n instanceof xu?wn(n._def.innerType):[];class Vd extends Re{_parse(l){const{ctx:s}=this._processInputParams(l);if(s.parsedType!==ae.object)return ee(s,{code:X.invalid_type,expected:ae.object,received:s.parsedType}),he;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}):(ee(s,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[u]}),he)}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=wn(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:me.ZodDiscriminatedUnion,discriminator:l,options:s,optionsMap:d,...je(u)})}}function jd(n,l){const s=nl(n),u=nl(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 v=jd(n[x],l[x]);if(!v.valid)return{valid:!1};m[x]=v.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],v=jd(m,x);if(!v.valid)return{valid:!1};d.push(v.data)}return{valid:!0,data:d}}else return s===ae.date&&u===ae.date&&+n==+l?{valid:!0,data:n}:{valid:!1}}class du extends Re{_parse(l){const{status:s,ctx:u}=this._processInputParams(l),d=(f,m)=>{if(dx(f)||dx(m))return he;const x=jd(f.value,m.value);return x.valid?((fx(f)||fx(m))&&s.dirty(),{status:s.value,value:x.data}):(ee(u,{code:X.invalid_intersection_types}),he)};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}))}}du.create=(n,l,s)=>new du({left:n,right:l,typeName:me.ZodIntersection,...je(s)});class Cl extends Re{_parse(l){const{status:s,ctx:u}=this._processInputParams(l);if(u.parsedType!==ae.array)return ee(u,{code:X.invalid_type,expected:ae.array,received:u.parsedType}),he;if(u.data.length<this._def.items.length)return ee(u,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),he;!this._def.rest&&u.data.length>this._def.items.length&&(ee(u,{code:X.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());const f=[...u.data].map((m,x)=>{const v=this._def.items[x]||this._def.rest;return v?v._parse(new Pa(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 Cl({...this._def,rest:l})}}Cl.create=(n,l)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Cl({items:n,typeName:me.ZodTuple,rest:null,...je(l)})};class fu extends Re{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 ee(u,{code:X.invalid_type,expected:ae.object,received:u.parsedType}),he;const d=[],f=this._def.keyType,m=this._def.valueType;for(const x in u.data)d.push({key:f._parse(new Pa(u,x,u.path,x)),value:m._parse(new Pa(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 Re?new fu({keyType:l,valueType:s,typeName:me.ZodRecord,...je(u)}):new fu({keyType:Ia.create(),valueType:l,typeName:me.ZodRecord,...je(s)})}}class yx extends Re{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 ee(u,{code:X.invalid_type,expected:ae.map,received:u.parsedType}),he;const d=this._def.keyType,f=this._def.valueType,m=[...u.data.entries()].map(([x,v],g)=>({key:d._parse(new Pa(u,x,u.path,[g,"key"])),value:f._parse(new Pa(u,v,u.path,[g,"value"]))}));if(u.common.async){const x=new Map;return Promise.resolve().then(async()=>{for(const v of m){const g=await v.key,b=await v.value;if(g.status==="aborted"||b.status==="aborted")return he;(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 v of m){const g=v.key,b=v.value;if(g.status==="aborted"||b.status==="aborted")return he;(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:me.ZodMap,...je(s)});class Ts extends Re{_parse(l){const{status:s,ctx:u}=this._processInputParams(l);if(u.parsedType!==ae.set)return ee(u,{code:X.invalid_type,expected:ae.set,received:u.parsedType}),he;const d=this._def;d.minSize!==null&&u.data.size<d.minSize.value&&(ee(u,{code:X.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&&(ee(u,{code:X.too_big,maximum:d.maxSize.value,type:"set",inclusive:!0,exact:!1,message:d.maxSize.message}),s.dirty());const f=this._def.valueType;function m(v){const g=new Set;for(const b of v){if(b.status==="aborted")return he;b.status==="dirty"&&s.dirty(),g.add(b.value)}return{status:s.value,value:g}}const x=[...u.data.values()].map((v,g)=>f._parse(new Pa(u,v,u.path,g)));return u.common.async?Promise.all(x).then(v=>m(v)):m(x)}min(l,s){return new Ts({...this._def,minSize:{value:l,message:se.toString(s)}})}max(l,s){return new Ts({...this._def,maxSize:{value:l,message:se.toString(s)}})}size(l,s){return this.min(l,s).max(l,s)}nonempty(l){return this.min(1,l)}}Ts.create=(n,l)=>new Ts({valueType:n,minSize:null,maxSize:null,typeName:me.ZodSet,...je(l)});class Nd extends Re{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})}}Nd.create=(n,l)=>new Nd({getter:n,typeName:me.ZodLazy,...je(l)});class hu extends Re{_parse(l){if(l.data!==this._def.value){const s=this._getOrReturnCtx(l);return ee(s,{received:s.data,code:X.invalid_literal,expected:this._def.value}),he}return{status:"valid",value:l.data}}get value(){return this._def.value}}hu.create=(n,l)=>new hu({value:n,typeName:me.ZodLiteral,...je(l)});function wy(n,l){return new Rl({values:n,typeName:me.ZodEnum,...je(l)})}class Rl extends Re{_parse(l){if(typeof l.data!="string"){const s=this._getOrReturnCtx(l),u=this._def.values;return ee(s,{expected:Ue.joinValues(u),received:s.parsedType,code:X.invalid_type}),he}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 ee(s,{received:s.data,code:X.invalid_enum_value,options:u}),he}return Ta(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 Rl.create(l,{...this._def,...s})}exclude(l,s=this._def){return Rl.create(this.options.filter(u=>!l.includes(u)),{...this._def,...s})}}Rl.create=wy;class _d extends Re{_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 ee(u,{expected:Ue.joinValues(d),received:u.parsedType,code:X.invalid_type}),he}if(this._cache||(this._cache=new Set(Ue.getValidEnumValues(this._def.values))),!this._cache.has(l.data)){const d=Ue.objectValues(s);return ee(u,{received:u.data,code:X.invalid_enum_value,options:d}),he}return Ta(l.data)}get enum(){return this._def.values}}_d.create=(n,l)=>new _d({values:n,typeName:me.ZodNativeEnum,...je(l)});class mu extends Re{unwrap(){return this._def.type}_parse(l){const{ctx:s}=this._processInputParams(l);if(s.parsedType!==ae.promise&&s.common.async===!1)return ee(s,{code:X.invalid_type,expected:ae.promise,received:s.parsedType}),he;const u=s.parsedType===ae.promise?s.data:Promise.resolve(s.data);return Ta(u.then(d=>this._def.type.parseAsync(d,{path:s.path,errorMap:s.common.contextualErrorMap})))}}mu.create=(n,l)=>new mu({type:n,typeName:me.ZodPromise,...je(l)});class Tl extends Re{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===me.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=>{ee(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 he;const v=await this._def.schema._parseAsync({data:x,path:u.path,parent:u});return v.status==="aborted"?he:v.status==="dirty"||s.value==="dirty"?_s(v.value):v});{if(s.value==="aborted")return he;const x=this._def.schema._parseSync({data:m,path:u.path,parent:u});return x.status==="aborted"?he:x.status==="dirty"||s.value==="dirty"?_s(x.value):x}}if(d.type==="refinement"){const m=x=>{const v=d.refinement(x,f);if(u.common.async)return Promise.resolve(v);if(v instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return x};if(u.common.async===!1){const x=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});return x.status==="aborted"?he:(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"?he:(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(!Ai(m))return he;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=>Ai(m)?Promise.resolve(d.transform(m.value,f)).then(x=>({status:s.value,value:x})):he);Ue.assertNever(d)}}Tl.create=(n,l,s)=>new Tl({schema:n,typeName:me.ZodEffects,effect:l,...je(s)});Tl.createWithPreprocess=(n,l,s)=>new Tl({schema:l,effect:{type:"preprocess",transform:n},typeName:me.ZodEffects,...je(s)});class Sn extends Re{_parse(l){return this._getType(l)===ae.undefined?Ta(void 0):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}Sn.create=(n,l)=>new Sn({innerType:n,typeName:me.ZodOptional,...je(l)});class Ol extends Re{_parse(l){return this._getType(l)===ae.null?Ta(null):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}Ol.create=(n,l)=>new Ol({innerType:n,typeName:me.ZodNullable,...je(l)});class pu extends Re{_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}}pu.create=(n,l)=>new pu({innerType:n,typeName:me.ZodDefault,defaultValue:typeof l.default=="function"?l.default:()=>l.default,...je(l)});class xu extends Re{_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 uu(d)?d.then(f=>({status:"valid",value:f.status==="valid"?f.value:this._def.catchValue({get error(){return new Nn(u.common.issues)},input:u.data})})):{status:"valid",value:d.status==="valid"?d.value:this._def.catchValue({get error(){return new Nn(u.common.issues)},input:u.data})}}removeCatch(){return this._def.innerType}}xu.create=(n,l)=>new xu({innerType:n,typeName:me.ZodCatch,catchValue:typeof l.catch=="function"?l.catch:()=>l.catch,...je(l)});class vx extends Re{_parse(l){if(this._getType(l)!==ae.nan){const u=this._getOrReturnCtx(l);return ee(u,{code:X.invalid_type,expected:ae.nan,received:u.parsedType}),he}return{status:"valid",value:l.data}}}vx.create=n=>new vx({typeName:me.ZodNaN,...je(n)});class Sy extends Re{_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 Re{_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"?he:f.status==="dirty"?(s.dirty(),_s(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"?he: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:me.ZodPipeline})}}class yu extends Re{_parse(l){const s=this._def.innerType._parse(l),u=d=>(Ai(d)&&(d.value=Object.freeze(d.value)),d);return uu(s)?s.then(d=>u(d)):u(s)}unwrap(){return this._def.innerType}}yu.create=(n,l)=>new yu({innerType:n,typeName:me.ZodReadonly,...je(l)});var me;(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"})(me||(me={}));const p=Ia.create,E=El.create;kl.create;const He=cu.create;Ei.create;const jy=Sd.create;sl.create;const ne=Wa.create,H=gt.create,q1=ou.create,Ny=Vd.create;du.create;Cl.create;const Os=fu.create,ka=hu.create,oe=Rl.create;mu.create;Sn.create;Ol.create;const gx={string:(n=>Ia.create({...n,coerce:!0})),number:(n=>El.create({...n,coerce:!0})),boolean:(n=>cu.create({...n,coerce:!0})),bigint:(n=>kl.create({...n,coerce:!0})),date:(n=>Ei.create({...n,coerce:!0}))},H1=he,$1=p().regex(/^github\.com\/[^/]+\/[^/]+$/,"Expected github.com/<owner>/<repo>"),Y1=/^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?$/;function V1(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(V1(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=Y1.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 v=x.pathname.replace(/^\/+|\/+$/g,"").split("/");if(v.length<2||!v[0]||!v[1])throw new Error(`Unrecognized GitHub repository reference: ${n}`);s=v[0],u=v[1].replace(/\.git$/i,"")}if(!s||!u||s.includes("..")||u.includes(".."))throw new Error(`Unrecognized GitHub repository reference: ${n}`);const f=$1.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:X.custom,message:s.message}),H1}}),Ay="repo:",Z1=oe(["resolved","unresolved","conflict","invalid"]),G1=H({status:Z1,repository:p().optional(),sourceLabel:p().optional(),labels:ne(p()).optional(),error:p().optional()});function Q1(n){return n?n.filter(l=>l.toLowerCase().startsWith(Ay)):[]}const X1=100,K1=H({label:p(),repository:p()});H({mappings:ne(K1).max(X1+1)});function Ey(n){const l=Q1(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=oe(["claude_code","cursor_local","codex_local","muse_code"]),$a=H({maxTurns:E().positive().nullable().optional(),maxBudgetUsd:E().positive().nullable().optional()}),ky=H({plan:$a.optional(),execute:$a.optional(),reflect:$a.optional()});function iu(n){if(!(n!=null&&n.trim()))return null;try{const l=$a.parse(JSON.parse(n));return l.maxTurns==null&&l.maxBudgetUsd==null?null:l}catch{return null}}function J1(n){return!n||n.maxTurns==null&&n.maxBudgetUsd==null?null:JSON.stringify(n)}const Qd=oe(["developer","reviewer","legacy"]),I1=oe(["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:I1,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 F1=H({worktreeWrite:He(),publishReview:He(),outboundMutation:He(),resolveHumanAction:He()}),Cy=H({worktreeWrite:He().optional(),outboundMutation:He().optional()}).strict(),Au=oe(["low","medium","high"]);H({version:ka(1),agentId:p().nullable(),role:Qd,runtime:Ht.nullable(),model:p().nullable(),effort:Au.nullable().default(null),budgetJson:p().nullable(),permissionPolicy:F1,deckId:p().nullable(),purpose:p().nullable(),capturedAt:p()});const Ry="auto",W1="muse-spark-1.3-contributor",P1=H({code:oe(["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()}),ew=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:Au.nullable(),defaultBudgetJson:p().nullable(),purpose:p().nullable(),playbookIdsJson:p().nullable(),externalMemoryRefsJson:p().nullable(),permissionPolicyJson:p().nullable(),isBuiltin:He(),createdAt:p(),updatedAt:p()}),Ty=ew.extend({healthy:He(),issues:ne(P1)});H({name:p().min(1),runtime:Ht,deckId:p().uuid(),defaultModel:p().nullable().optional(),defaultEffort:Au.nullable().optional(),defaultBudget:$a.nullable().optional(),purpose:p().nullable().optional(),permissionPolicy:Cy.nullable().optional()});H({name:p().min(1).optional(),runtime:Ht.optional(),deckId:p().uuid().nullable().optional(),defaultModel:p().nullable().optional(),defaultEffort:Au.nullable().optional(),defaultBudget:$a.nullable().optional(),purpose:p().nullable().optional(),permissionPolicy:Cy.nullable().optional()});H({agents:ne(Ty),issueCount:E()});function bx(n){return n.defaultModel??n.defaultExecuteModel??n.defaultPlanModel??null}function tw(n){const l=iu(n.defaultBudgetJson)??iu(n.defaultExecuteBudgetJson)??iu(n.defaultPlanBudgetJson);return J1(l)}const aw=oe(["slack_message","email","service_tool_call"]),nw=H({target:p().min(1).max(120),body:p().min(1).max(4e3)}),lw=H({serviceName:p().min(1).max(120),toolName:p().min(1).max(120),arguments:Os(jy())}),iw=H({actionType:aw,summary:nw,toolCall:lw}),sw=oe(["pending","sent","rejected"]);H({draft:iw,status:sw,sentAt:p().optional(),rejectedAt:p().optional(),bodyMismatch:He().optional(),deliveryAttempts:E().int().min(0).default(0)});H({draftArtifactId:p().uuid(),sentAt:p(),toolResult:Os(jy()),permalink:p().url().optional()});const rw=H({failure_summary:p().min(1),user_feedback_excerpt:p().min(1),corrected_output_hint:p().optional()}),uw=Ny("op",[H({op:ka("add_item"),section:p().min(1),text:p().min(1)}),H({op:ka("amend_item"),section:p().min(1),anchor:p().min(1),text:p().min(1)}),H({op:ka("remove_item"),section:p().min(1),anchor:p().min(1)}),H({op:ka("set_triggers"),triggers:ne(p())}),H({op:ka("rewrite_body"),text:p()})]);H({rationale:p().min(1),ops:ne(uw).min(1),evidence:rw.optional()});const cw="v1",Oy=oe(["feature","bug fix","refactor","investigation","split child"]);Oy.options;const ow=H({text:p(),evidence:p().nullable()}),dw=H({version:ka(cw),executionMode:Oy,nonGoals:ne(p()),exitPredicate:p(),onePrStoppingPoint:p(),acceptanceCriteria:ne(ow)}),My={executionMode:"Builder execution mode",nonGoals:"Non-goals",exitPredicate:"Exit predicate",onePrStoppingPoint:"One-PR stopping point",acceptanceCriteria:"Acceptance criteria"},fw=Object.keys(My);function hw(n){return n.trim().toLowerCase().replace(/[-_]+/g," ").replace(/\s+/g," ").trim()}Object.fromEntries(fw.map(n=>[hw(My[n]),n]));const mw=oe(["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"]),pw=oe(["human","developer","reviewer","system"]),Dy=oe(["manual","linear","agent"]),xw=H({id:p().uuid(),source:Dy,externalId:p().nullable(),externalLabel:p().nullable(),externalUrl:p().nullable(),title:p(),description:p().nullable(),acceptanceCriteria:p().nullable(),executionContract:dw.nullable().optional(),repo:p(),baseBranch:p(),status:mw,currentOwner:pw,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 yw=oe(["enqueued","already_queued","not_queued"]);xw.extend({created:He(),queue:yw,priorPasses:E().int().min(0)});H({id:p(),issueId:p().nullable(),workerSessionId:p().nullable(),kind:p(),contentJson:p().nullable(),blobPath:p().nullable(),author:oe(["human","agent","system"]),createdAt:p()});const vw=oe(["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"]),gw=oe(["task","infrastructure","unknown"]),bw=oe(["high","medium","low"]),ww=oe(["outcome_kind","session_error","spawn_log","workflow_event","recovery"]),Sw=oe(["exact","inferred"]),Ad=H({code:vw,domain:gw,primary:He(),confidence:bw,evidenceSource:ww,occurredAt:p().nullable(),eventCursor:E().int().nullable(),rawReason:p(),sessionId:p().nullable(),logPath:p().nullable(),eventId:p().nullable(),eventType:p().nullable(),quality:Sw}),jw=oe(["commit","verification_receipt","branch_pushed"]),Nw=oe(["sampler","salvage","session_end"]),Xd=oe(["worktree","commit","verification_receipt","publish_only"]);H({kind:jw,observedSha:p().nullable(),observedAt:p(),origin:Nw.nullable(),inputSha:p().nullable(),samplingPrecisionMs:E().int().nullable(),branch:p().nullable()});H({kinds:ne(Xd),retryReason:p().nullable()});const _w=oe(["done","closed","migrated"]);H({id:p().uuid(),issueId:p().uuid(),workflowVersion:p(),startedAt:p(),completedAt:p().nullable(),outcome:_w.nullable()});const Aw=oe(["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","base.probe","base.advanced","operator_verification.waived","legacy.imported"]);H({id:p().uuid(),issueId:p().uuid(),workflowInstanceId:p().uuid().nullable(),workerSessionId:p().uuid().nullable(),type:Aw,actorType:oe(["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 Ew=oe(["product_scope_decision","policy_escalation","attempts_exhausted","final_review","deck_interaction_required","reflection_interaction_required","outbound_delivery_interaction_required","muse_capability","operator_verification"]),kw=oe(["open","resolved"]);H({id:p().uuid(),issueId:p().uuid().nullable(),runId:p().uuid().nullable(),workflowInstanceId:p().uuid().nullable(),actionType:Ew,reason:p(),question:p(),evidenceJson:p().nullable(),responseOptionsJson:p().nullable(),continuationPreviewJson:p().nullable(),requestId:p().nullable(),status:kw,resolutionJson:p().nullable(),resolvedBy:p().nullable(),requestedAt:p(),resolvedAt:p().nullable()});function Eu(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}function Cw(n){const l=Eu(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 Eu(n.evidenceJson)??{}}function ku(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 Tw(n){return Kd(n).mergeFailure===!0}function Ly(n){const l=Eu(n.continuationPreviewJson);return typeof(l==null?void 0:l.resumeRole)=="string"?l.resumeRole:null}const Ow=/worktree|unpushed|uncommitted|dirty|preserved|non-fast-forward|diverged|already used by|recovery:|force-with-lease/i,Mw=/could not be pushed|non-fast-forward|rejected.*push|push.*rejected/i,Dw=/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 Lw(n){const s=Uy(n).head.replace(/\s+/g," ").trim(),u=s.match(/^(.+?[.!?])(\s|$)/);return(u?u[1]:s).trim()}const Uw=/(?:~|\/(?:[^/\s\\:"'*?<>|][^/\s\\:"'*?<>|]*))+(?:\/[^/\s\\:"'*?<>|]+)*/g;function zw(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(Uw)){const x=m[0];/^\/\d+(\.\d+)*$/.test(x)||!x.includes("/")&&!x.startsWith("~")||u(x)}const d=ku(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 Bw(n){const l=[],s=ku(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 qw(n){return n==="close"||n==="reject"||n==="abort"}function tl(n){return n.length===0?null:n.some(l=>l.choice==="push_with_lease")?"push_with_lease":(n.find(l=>!qw(l.choice))??n[0]).choice}function Hw(n){if(n.actionType!=="policy_escalation")return"other";if(Tw(n))return"merge-failure";const l=ku(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 Mw.test(s)?"unpushed":Ly(n)==="reviewer"?"reviewer-retry":Dw.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 $w="Resume safely";function zy(n){const l=Hw(n),s=Cw(n),{commands:u}=Uy(n.reason),d=zw(n),f=Bw(n),m=(()=>{const v=Eu(n.evidenceJson);return v==null?null:JSON.stringify(v,null,2)})(),x={question:n.question,reason:n.reason,commands:u,paths:d,factLines:f,evidencePretty:m};switch(l){case"diverged-push":{const v=ku(n),g=v&&typeof v.branch=="string"&&typeof v.localSha=="string"&&typeof v.remoteSha=="string"?` (origin/${v.branch}: local ${Sx(v.localSha)} against remote ${Sx(v.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:tl(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:tl(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:tl(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:tl(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:tl(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:tl(s),details:x};case"ordinary-escalation":{const v=Lw(n.reason),g=!Ow.test(`${n.reason}
|
|
63
|
-
${n.question}`),b=g?s.map(_=>_.choice==="resume"&&_.label==="Resume development"?{..._,label:$w}:_):s;return{kind:l,title:"Development is parked — resume or close?",context:v?`${v} Choose ${g?"Resume safely":"Resume"} to continue, or Close to stop.`:null,safeResume:g,displayOptions:b,primaryChoice:tl(b),details:x}}case"other":default:return{kind:"other",title:n.question,context:null,safeResume:!1,displayOptions:s,primaryChoice:tl(s),details:x}}}const Yw=oe(["blocking","non_blocking"]),Vw=oe(["open","resolved","recurring","superseded"]);H({id:p().uuid(),issueId:p().uuid(),fingerprint:p(),severity:Yw,title:p(),rationale:p(),evidenceRef:p().nullable(),file:p().nullable(),line:E().int().nullable(),status:Vw,firstRound:E().int().min(1),lastRound:E().int().min(1)});H({id:p().uuid(),issueId:p().uuid(),workerSessionId:p().uuid(),role:oe(["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 Zw=H({available:ka(!0)}),Gw=H({available:ka(!1),until:p(),reason:p()});Ny("available",[Zw,Gw]);const Jd=oe(["supported_protocol","observed_event","experimental_api","unavailable"]),Cu=oe(["unsupported","missing","expired","unparsable","stale"]),Qw=oe(["five_hour","weekly"]),Xw=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:Cu.nullable(),criticalRole:Qw.nullable()}),Kw=H({runtime:Ht,windows:ne(Xw),unavailableReason:Cu.nullable()});H({runtimes:ne(Kw),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:Cu.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:Cu.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 Jw=oe(["queued","admitted","removed"]),Iw=H({id:p().uuid(),issueId:p().uuid(),position:E().int(),enqueuedAt:p(),state:Jw,waitReason:p().nullable(),waitReasonAt:p().nullable()});Iw.extend({title:p().optional(),issueStatus:p().optional()});H({issueId:p().uuid()});const Fw=q1([ka("top"),ka("bottom"),H({before:p().uuid()}).strict(),H({after:p().uuid()}).strict()]);H({to:Fw});const Ww=2;H({maxActiveIssues:E().int().min(1).max(Ww)});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 ra=oe(["exact","inferred","unavailable"]),Ru=H({quality:ra,reasons:ne(p())}),qy=oe(["queue_wait","coordinator_setup","agent_process","coordinator_validation_publish","coordinator_work"]),Cs=H({phase:qy,startMs:E().int().nullable(),endMs:E().int().nullable(),durationMs:E().int().nullable(),quality:ra,reasons:ne(p()),sessionId:p().nullable(),startCursor:E().int().nullable(),endCursor:E().int().nullable()}),Pw=Ru.extend({phase:qy,durationMs:E().int().nullable(),rawCount:E().int(),known:E().int(),total:E().int()}),Hy=H({kind:oe(["admission_dependency_wait","runtime_health_preflight","unexplained_silence","human_wait"]),startMs:E().int().nullable(),endMs:E().int().nullable(),durationMs:E().int().nullable(),quality:ra,reasons:ne(p()),category:p().nullable(),sessionId:p().nullable()}),Jt=Ru.extend({value:E().nullable(),known:E().int(),total:E().int()}),Fa=Ru.extend({p50:E().nullable(),p95:E().nullable(),n:E().int()}),e2=H({sessionId:p(),role:p(),runtime:p().nullable(),model:p().nullable(),status:p(),round:E().int(),publishOnly:He(),setup:Cs,agentProcess:Cs,validationPublish:Cs,spawnEnvelopeMs:E().int().nullable(),spawnEnvelopeQuality:ra,spawnEnvelopeReasons:ne(p()),failureCauses:ne(Ad),reuseKinds:ne(Xd).optional(),silence:ne(Hy),silenceQuality:ra,silenceReasons:ne(p()),tokensIn:E().int().nullable(),tokensOut:E().int().nullable(),costUsd:E().nullable(),usageDurationMs:E().int().nullable(),usageQuality:ra,usageReasons:ne(p())}),t2=H({kind:p().nullable(),observedSha:p().nullable(),msSinceWorkflowStart:E().int().nullable(),quality:ra,reasons:ne(p())}),a2=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:ra,reasons:ne(p())}),n2=H({rounds:E().int(),verdicts:E().int(),changeRequests:E().int(),changeRequestRate:E().nullable(),quality:ra,reasons:ne(p())});H({issueId:p(),elapsed:Cs,rawIntervals:ne(Cs),unionedDurations:ne(Pw),exclusiveTotalMs:E().int().nullable(),exclusiveTotalQuality:ra,exclusiveTotalReasons:ne(p()),nested:ne(Hy),attempts:ne(e2),primaryFailure:Ad.nullable(),primaryFailureQuality:ra,primaryFailureReasons:ne(p()),consequenceCauses:ne(Ad),waste:H({failedAttempts:E().int(),publishOnlyAttempts:E().int(),runtimeMs:Jt,tokensIn:Jt,tokensOut:Jt,costUsd:Jt}),firstCheckpoint:t2,retry:a2,reviewer:n2,humanWaitMs:E().int().nullable(),humanWaitQuality:ra,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 td=Ru.extend({numerator:E().int(),denominator:E().int(),rate:E().nullable()}),ad=H({key:p(),attempts:E().int(),successes:E().int(),successRate:E().nullable(),retries:E().int(),retryRate:E().nullable(),wallTimeMs:Fa});H({window:H({from:p(),to:p(),defaultApplied:He()}),pagination:H({limit:E().int(),offset:E().int(),totalIssues:E().int()}),issueIds:ne(p()),phaseWallTime:Os(p(),Fa),attemptSuccess:td,issueSuccess:td,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:Fa,retryReuse:td,reviewer:H({rounds:E().int(),verdicts:E().int(),changeRequests:E().int(),changeRequestRate:E().nullable(),quality:ra,reasons:ne(p())}),humanInterventions:H({totalActions:E().int(),issuesWithIntervention:E().int(),humanWaitMs:Fa}),byRole:ne(ad),byRuntime:ne(ad),byModel:ne(ad),coverage:H({duration:Jt,tokens:Jt,cost:Jt})});const l2=100,$y=25,Yy=5,i2=oe(["developer","reviewer","legacy"]),s2=oe(["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"]),r2=oe(["task","infrastructure","unknown"]);H({from:p().optional(),to:p().optional(),repo:p().optional(),role:i2.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(l2).default($y)});const Vy=oe(["exact","inferred","unavailable"]),Na=H({sum:E().nullable(),known:E().int().min(0),total:E().int().min(0),quality:Vy,reasons:ne(p())}),nd=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:Fa,spawnEnvelopeMs:Fa,retryRate:E().nullable(),tokensIn:Na,tokensOut:Na,costUsd:Na,durationMs:Na,failedDurationMs:Na,failedTokensIn:Na,failedTokensOut:Na,failedCostUsd:Na}),u2=H({code:s2,domain:r2,count:E().int().min(0),share:E().nullable(),issueIds:ne(p()),issueTotal:E().int().min(0)}),c2=H({id:p(),title:p(),status:p(),repo:p(),attempts:E().int().min(0),updatedAt:p()}),o2=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:Fa,spawnEnvelopeMs:Fa,checkpointMs:Fa,phaseWallMs:ne(H({phase:p(),stat:Fa})),failedDurationMs:Na,failedTokensIn:Na,failedTokensOut:Na,failedCostUsd:Na}),byRole:ne(nd),byRuntime:ne(nd),byModel:ne(nd),failures:ne(u2),issues:ne(c2),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 al(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 Ed(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 As(n){return`$${n.toFixed(2)}`}function Ge(n){return n.toLocaleString("en-US")}function d2(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 Tu(n){return n===null||!Number.isFinite(n)?"Unavailable":`${(n*100).toFixed(1)}%`}const f2=oe(["queued","plan_pending","plan_approved","running","review","done","failed","cancelled"]),Qy=oe(["code","communication","email","research","content","other"]),h2=oe(["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"]),Ou=oe(["plan","execute","reflect","qa"]),Xy=oe(["retry","approve"]);H({patchId:p(),playbookId:p().optional(),playbookTitle:p().optional(),rationale:p().optional(),status:ka("proposed"),trigger:Xy,dashboardUrl:p().optional()});H({status:oe(["pending","completed","failed","skipped"]),trigger:Xy,error:p().optional()});const m2=H({type:oe(["system","human","context","thinking","assistant","tool","rate_limit","result"]),text:p(),toolName:p().optional()});H({phase:Ou,runtime:Ht,entries:ne(m2)});const p2=H({phase:Ou,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()}),x2=H({label:p(),usage:p2,maxTurns:E().optional(),maxBudgetUsd:E().optional()});H({lines:ne(x2),total:H({totalCostUsd:E(),inputTokens:E(),outputTokens:E(),durationMs:E(),numTurns:E()})});H({phase:Ou,runtime:Ht,sessionId:p()});H({phase:Ou,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 y2=oe(["manual","linear"]);H({id:p(),title:p(),description:p().optional(),url:p().optional()});const bn=H({id:p().uuid(),source:y2,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:f2,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:h2,contentJson:p().nullable(),blobPath:p().nullable(),author:oe(["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:oe(["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:$a.nullable().optional(),executeBudget:$a.nullable().optional()});H({runtime:Ht.optional(),deckId:p().uuid().optional(),playbookId:p().optional(),executeModel:p().nullable().optional(),executeBudget:$a.nullable().optional()});H({feedback:p().min(1),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),executeBudget:$a.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:G1.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 v2=oe(["UNAUTHORIZED","DECK_UNAVAILABLE"]);H({connected:He(),apiUrl:p(),mcpUrl:p(),deckCount:E().optional(),envOverride:He(),error:p().optional(),deckAccessError:v2.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:$a.nullable().optional(),feedback:p().optional(),editedMarkdown:p().optional()});const g2=H({id:p(),label:p()});H({runtime:Ht,models:ne(g2),source:oe(["live","fallback"])});H({planReviewCount:E(),resultReviewCount:E(),maxConcurrent:E(),planningActiveRuns:ne(bn),planningQueuedRuns:ne(bn),runningRuns:ne(bn),waitingExecution:ne(bn),resultReviewRuns:ne(bn),recentDone:ne(bn),awaitingPlanReview:ne(bn),awaitingAnswerRuns:ne(bn),openQuestionCounts:Os(p(),E()),pendingSendCounts:Os(p(),E()),sentRunIds:ne(p()).optional(),autoApprovedRunIds:ne(p()),runs:ne(bn),agentDeckOnline:He(),agents:ne(Ty),agentIssueCount:E()});const Ky=new Map,ld=new Map;function kd(n){return Ky.get(n)??null}function b2(n,l){l.models.length!==0&&Ky.set(n,l)}function w2(n,l){const s=kd(n);if(s)return Promise.resolve(s);const u=ld.get(n);if(u)return u;const d=l().then(f=>(b2(n,f),f)).finally(()=>ld.delete(n));return ld.set(n,d),d}const Te="";async function Fe(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 S2(){const n=await fetch(`${Te}/api/intake/linear`);if(!n.ok)throw new Error(await n.text());return(await n.json()).candidates??[]}async function j2(n){const l=await fetch(`${Te}/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 N2(){const n=await fetch(`${Te}/api/settings/repository-mappings`);if(!n.ok)throw new Error(await Fe(n));return(await n.json()).mappings??[]}async function _2(n){const l=await fetch(`${Te}/api/settings/repository-mappings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({mappings:n})});if(!l.ok)throw new Error(await Fe(l));return(await l.json()).mappings??[]}async function A2(){const n=await fetch(`${Te}/api/agents`);if(!n.ok)throw new Error("Failed to fetch agents");return n.json()}async function E2(n){const l=await fetch(`${Te}/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 k2(n,l){const s=await fetch(`${Te}/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 C2(n){const l=await fetch(`${Te}/api/agents/${n}`,{method:"DELETE"});if(!l.ok)throw new Error(await l.text())}async function R2(n,l){return w2(n,async()=>{const u=await fetch(`${Te}/api/runtimes/${n}/models`);if(!u.ok)throw new Error(await u.text());return u.json()})}async function Jy(){const n=await fetch(`${Te}/api/runtime-capacity`);if(!n.ok)throw new Error(await n.text());return n.json()}async function Iy(){const n=await fetch(`${Te}/api/agent-deck/status`);if(!n.ok)throw new Error(await n.text());return n.json()}async function T2(){try{const n=await fetch(`${Te}/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(`${Te}/api/issues?${l.toString()}`);if(!u.ok)throw new Error(await Fe(u));const d=await u.json();return typeof d.total=="number"?d.total:0}async function O2(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(`${Te}/api/issues?${l.toString()}`);if(!s.ok)throw new Error(await Fe(s));return s.json()}async function M2(){const n=await fetch(`${Te}/api/issues/recent-repos`);if(!n.ok)throw new Error(await Fe(n));return(await n.json()).repos??[]}async function Fy(n){const l=await fetch(`${Te}/api/issues/${n}`);if(!l.ok)throw new Error(await Fe(l));return l.json()}async function D2(n){const l=await fetch(`${Te}/api/issues/${n}/execution-analysis`);if(!l.ok)throw new Error(await Fe(l));return l.json()}async function L2(n){const l=await fetch(`${Te}/api/issues/${n}/evidence`);if(!l.ok)throw new Error(await Fe(l));return l.json()}async function U2(n,l){const s=await fetch(`${Te}/api/issues/${n}/artifacts/${l}/trace`);if(!s.ok)throw new Error(await Fe(s));return s.json()}async function z2(n){const l=await fetch(`${Te}/api/issues`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw new Error(await Fe(l));return l.json()}async function su(n,l){const s=await fetch(`${Te}/api/issues/${n}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(l)});if(!s.ok)throw new Error(await Fe(s));return s.json()}async function Wy(n){const l=await fetch(`${Te}/api/issues/${n}/start`,{method:"POST"});if(!l.ok)throw new Error(await Fe(l));return l.json()}async function Py(n){const l=await fetch(`${Te}/api/issues/${n}/execute`,{method:"POST"});if(!l.ok)throw new Error(await Fe(l));return l.json()}async function B2(n,l="web"){const s=await fetch(`${Te}/api/issues/${n}/abort`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({resolvedBy:l})});if(!s.ok)throw new Error(await Fe(s));return s.json()}async function q2(n){const l=await fetch(`${Te}/api/issues/${n}/park`,{method:"POST"});if(!l.ok)throw new Error(await Fe(l));return l.json()}async function H2(n,l="web"){const s=await fetch(`${Te}/api/issues/${n}/close`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({closedBy:l})});if(!s.ok)throw new Error(await Fe(s));return s.json()}async function $2(n){const l=await fetch(`${Te}/api/queue`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({issueId:n})});if(!l.ok)throw new Error(await Fe(l));return l.json()}async function ev(n){const l=await fetch(`${Te}/api/queue/${n}`,{method:"DELETE"});if(!l.ok)throw new Error(await Fe(l));return l.json()}async function Fr(n,l){const s=await fetch(`${Te}/api/queue/${n}/move`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({to:l})});if(!s.ok)throw new Error(await Fe(s));return s.json()}async function id(){const n=await fetch(`${Te}/api/queue`);if(!n.ok)throw new Error(await Fe(n));return n.json()}async function Y2(){const n=await fetch(`${Te}/api/queue/status`);if(!n.ok)throw new Error(await Fe(n));return n.json()}async function V2(n){const l=await fetch(`${Te}/api/queue/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({maxActiveIssues:n})});if(!l.ok)throw new Error(await Fe(l));return l.json()}async function Z2(n,l){const s=await fetch(`${Te}/api/issues/${n}/guidance`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({markdown:l})});if(!s.ok)throw new Error(await Fe(s));return s.json()}async function G2(n){const l=Zy(n),s=await fetch(`${Te}/api/execution-report${l?`?${l}`:""}`);if(!s.ok)throw new Error(await Fe(s));const u=await s.json(),d=o2.safeParse(u);if(!d.success)throw new Error(`Unexpected report shape: ${d.error.message}`);return d.data}async function Q2(){const n=await fetch(`${Te}/api/human-actions`);if(!n.ok)throw new Error(await Fe(n));return n.json()}async function tv(n,l,s,u){const d=await fetch(`${Te}/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 Fe(d));return d.json()}function X2(n){return n||Ry}function K2({runtime:n,label:l,value:s,onChange:u,defaultModelId:d,disabled:f,compact:m}){const x=kd(n),[v,g]=S.useState((x==null?void 0:x.models)??[]),[b,_]=S.useState((x==null?void 0:x.source)??"fallback"),[L,G]=S.useState(!x);S.useEffect(()=>{const D=kd(n);if(D){g(D.models),_(D.source),G(!1);return}G(!0),R2(n).then(B=>{g(B.models),_(B.source)}).catch(()=>g([])).finally(()=>G(!1))},[n]);const R=S.useMemo(()=>{var D,B;if(n==="cursor_local"){const F=X2(d);return((D=v.find(P=>P.id===F))==null?void 0:D.label)??"Auto (subscription pool)"}return d?((B=v.find(F=>F.id===d))==null?void 0:B.label)??d:"runtime default"},[n,d,v]),$=n==="cursor_local"?L?"Loading models…":`Agent default (${R})`:L?"Loading models…":`Default (${R})`;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:$}),v.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"&&v.length>0&&!L&&n==="cursor_local"&&!m&&c.jsx("p",{className:"text-xs text-white/40",children:"Run cursor-agent login to load the full model list."})]})}function _x(n){const l={};return n.allowWorktreeWrite||(l.worktreeWrite=!1),Object.keys(l).length?l:null}function J2(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]=S.useState([]),[m,x]=S.useState(null);S.useEffect(()=>{T2().then(b=>{b.ok?(f(b.decks),x(null)):(f([]),x(b.message))})},[]);const v=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 _=b.target.value;v({runtime:_,defaultModel:_==="cursor_local"?Ry:_==="muse_code"?W1:"",defaultEffort:_==="cursor_local"||_==="muse_code"?"":n.defaultEffort})},children:[c.jsx("option",{value:"claude_code",children:"Claude Code (claude -p)"}),c.jsx("option",{value:"cursor_local",children:"Cursor local (cursor-agent -p)"}),c.jsx("option",{value:"codex_local",children:"Codex local (codex exec)"}),c.jsx("option",{value:"muse_code",children:"Muse Code (muse exec) — developer only, trial"})]}),c.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Agent Deck (required)"}),c.jsxs("select",{className:"field",disabled:u||!s||!!m,value:n.deckId,onChange:b=>v({deckId:b.target.value}),required:!0,children:[c.jsx("option",{value:"",disabled:!!n.deckId,children:s?m?"Agent Deck error — see below":"Select a deck…":"Agent Deck offline"}),d.map(b=>c.jsxs("option",{value:b.id,children:["◆ ",b.name]},b.id))]}),s&&m&&c.jsx("p",{className:"text-xs text-amber-300/90",children:m}),c.jsxs("div",{className:"pt-2 mt-2 border-t border-white/10 space-y-2",children:[c.jsx("div",{className:"font-ui-display text-xs uppercase tracking-wide text-white/40",children:"Issue-centric session defaults"}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Purpose (optional)"}),c.jsx("input",{className:"field text-sm",placeholder:"e.g. backend refactors on the payments service",disabled:u,value:n.purpose,onChange:b=>v({purpose:b.target.value})})]}),c.jsxs("div",{className:`grid gap-2 ${g?"grid-cols-2":"grid-cols-1"}`,children:[c.jsx(K2,{runtime:n.runtime,label:"Default model",value:n.defaultModel,onChange:b=>v({defaultModel:b}),disabled:u,compact:!0}),g&&c.jsxs("label",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Reasoning effort"}),c.jsxs("select",{className:"field text-sm",disabled:u,value:n.defaultEffort,onChange:b=>v({defaultEffort:b.target.value}),children:[c.jsx("option",{value:"",children:"Runtime default"}),c.jsx("option",{value:"low",children:"Low"}),c.jsx("option",{value:"medium",children:"Medium"}),c.jsx("option",{value:"high",children:"High"})]})]})]}),n.runtime==="muse_code"&&c.jsx("p",{className:"text-xs text-white/40",children:"Developer role only — keep a Claude or Codex agent as the reviewer. 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=>v({defaultBudget:{...n.defaultBudget,maxTurns:b.target.value}})})]}),c.jsxs("label",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max $ / session"}),c.jsx("input",{className:"field text-sm",type:"number",min:0,step:"0.1",placeholder:"none",disabled:u,value:n.defaultBudget.maxBudgetUsd,onChange:b=>v({defaultBudget:{...n.defaultBudget,maxBudgetUsd:b.target.value}})})]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Developer capabilities"}),c.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm text-white/70",children:c.jsxs("label",{className:"flex items-center gap-1.5",children:[c.jsx("input",{type:"checkbox",disabled:u,checked:n.allowWorktreeWrite,onChange:b=>v({allowWorktreeWrite:b.target.checked})}),"Write files"]})}),c.jsx("p",{className:"text-xs text-white/40",children:"Unchecking runs the developer read-only (no Write/Edit/Bash grant), same as a reviewer. There is no separate push / open-PR toggle — a session with file-write access can already push and open PRs, and no mechanism here can restrict just that without also removing write access."})]})]})]})}function Ca(n){return n==="claude_code"?"Claude":n==="cursor_local"?"Cursor":n==="codex_local"?"Codex":n==="muse_code"?"Muse Code":"No agent"}function I2(){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 F2(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 Ns({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 W2(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 wi({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 P2({agents:n,agentDeckOnline:l}){const[s,u]=S.useState(null);S.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,v=W2(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(wi,{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(wi,{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(wi,{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(wi,{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:v.detail,children:[c.jsx(wi,{ok:v.ok}),c.jsx("span",{className:v.ok?"text-white/55":"text-amber-200/90",children:"GitHub"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:(g==null?void 0:g.message)??(s?`MCP ${s}`:"Agent Deck optional"),children:[c.jsx(wi,{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"},eS={critical:"font-bold text-red-400",warning:"text-yellow-400",normal:"font-medium"},tS=new Set(["claude_code","codex_local","muse_code"]),aS="billing_cycle",nS="1M",lS="5H",iS="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 sS(n){if(n.runtime==="cursor_local"){const l=n.windows.find(s=>s.windowKey===aS)??null;return l===null?[]:[nv(l,nS,"current billing cycle")]}if(tS.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,lS,n.unavailableReason,"missing-5H"),kx(s,iS,n.unavailableReason,"missing-1W")]}return[]}function rS({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:eS[s],children:[n.remaining,"%"]})})():c.jsx("span",{children:"N/A"})]})}function uS({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=sS(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:Ca(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(rS,{row:u},u.key))]},l.runtime)})]})}function cS({refreshTick:n}){const[l,s]=S.useState(null);return S.useEffect(()=>{let u=!1;return Jy().then(d=>{u||s(d)}).catch(()=>{u||s(null)}),()=>{u=!0}},[n]),l?c.jsx(uS,{data:l}):null}const oS="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",dS="/assets/codex-YZSpL-SB.png",fS="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",hS="/assets/muse-CtdcC6ve.svg";function Mu({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 mS({className:n="h-8 w-8"}){return c.jsx(Mu,{src:oS,className:n})}function pS({className:n="h-8 w-8"}){return c.jsx(Mu,{src:fS,className:n})}function xS({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 yS({className:n="h-8 w-8"}){return c.jsx(Mu,{src:dS,className:n})}function vS({className:n="h-8 w-8"}){return c.jsx(Mu,{src:hS,className:n})}function lv({runtime:n,className:l="h-8 w-8 shrink-0"}){return n==="claude_code"?c.jsx(mS,{className:l}):n==="cursor_local"?c.jsx(pS,{className:l}):n==="codex_local"?c.jsx(yS,{className:l}):n==="muse_code"?c.jsx(vS,{className:l}):c.jsx(xS,{className:l})}const Pr=()=>({runtime:"claude_code",deckId:"",purpose:"",defaultModel:"",defaultEffort:"",defaultBudget:I2(),allowWorktreeWrite:!0});function gS({agents:n,agentDeckOnline:l,onRefresh:s}){const[u,d]=S.useState(!1),[f,m]=S.useState(""),[x,v]=S.useState(Pr()),[g,b]=S.useState(!1),[_,L]=S.useState(null),[G,R]=S.useState(""),[$,D]=S.useState(Pr()),B=async K=>{if(K.preventDefault(),!(!f.trim()||!x.deckId)){b(!0);try{const we={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 E2(we),m(""),v(Pr()),d(!1),s()}catch(we){alert(String(we))}finally{b(!1)}}},F=K=>{L(K.id),R(K.name),D({runtime:K.runtime,deckId:K.deckId??"",purpose:K.purpose??"",defaultModel:bx(K)??"",defaultEffort:K.defaultEffort??"",defaultBudget:F2(tw(K)),...J2(K.permissionPolicyJson)})},P=()=>{L(null),D(Pr())},J=async K=>{if(!(!G.trim()||!$.deckId)){b(!0);try{const we={name:G.trim(),runtime:$.runtime,deckId:$.deckId,defaultModel:$.defaultModel.trim()||null,defaultEffort:$.defaultEffort||null,defaultBudget:Ex($.defaultBudget),purpose:$.purpose.trim()||null,permissionPolicy:_x($)};await k2(K.id,we),P(),s()}catch(we){alert(String(we))}finally{b(!1)}}},Q=async K=>{if(confirm(`Delete agent "${K.name}"?`)){b(!0);try{await C2(K.id),s()}catch(we){alert(String(we))}finally{b(!1)}}},Oe=n.filter(K=>!K.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",Oe>0&&c.jsxs("span",{className:"text-red-400 ml-2",children:["· ",Oe," need",Oe===1?"s":""," attention"]})]})]}),c.jsx(P2,{agents:n,agentDeckOnline:l})]}),c.jsx("div",{className:"mb-4 overflow-x-auto space-y-2",children:c.jsx(cS,{})}),c.jsx("div",{className:"space-y-3 mb-6",children:n.map(K=>{const we=bx(K);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:K.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:K.name}),!K.healthy&&c.jsx(Ns,{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(Ns,{className:"bg-white/5 text-white/55 border-white/15 normal-case",children:Ca(K.runtime)}),K.deckName?c.jsxs(Ns,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",K.deckName]}):c.jsx(Ns,{className:"bg-white/5 text-white/40 border-white/10 normal-case",children:"No deck"}),we&&c.jsx(Ns,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:we,children:we})]}),_===K.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:G,onChange:Ye=>R(Ye.target.value)})]}),c.jsx(Ax,{value:$,onChange:D,agentDeckOnline:l}),c.jsxs("div",{className:"flex gap-2 pt-1",children:[c.jsx("button",{type:"button",disabled:g||!G.trim()||!$.deckId,onClick:()=>J(K),className:"btn-gold text-sm px-3 py-1.5",children:"Save"}),c.jsx("button",{type:"button",onClick:P,className:"btn-ghost text-sm px-3 py-1.5",children:"Cancel"})]})]}),K.issues.length>0&&c.jsx("ul",{className:"text-sm text-red-300/90 space-y-1",children:K.issues.map((Ye,mt)=>c.jsxs("li",{children:["· ",Ye.message]},mt))})]})]}),c.jsxs("div",{className:"flex gap-2 shrink-0",children:[_!==K.id&&c.jsx("button",{type:"button",disabled:g,onClick:()=>F(K),className:"btn-ghost text-sm px-3 py-1.5",children:"Edit"}),c.jsx("button",{type:"button",disabled:g,onClick:()=>Q(K),className:"btn-ghost text-sm px-3 py-1.5",children:"Delete"})]})]},K.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:K=>m(K.target.value)})]}),c.jsx(Ax,{value:x,onChange:v,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 bS(n){try{return Gd(n).identity}catch{return null}}function wS(n,l){return n!=="linear"||!l?null:l.repoResolution??Ey(l.labels)}function SS(n,l){if(!l)return n;const s=l.repoResolution??Ey(l.labels);return s.status==="resolved"&&s.repository?s.repository:n}function jS(n,l){var u;const s=wS(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 Cx(n){return n.title.trim().length>0&&bS(n.repo)!=null&&n.developerAgentId.length>0&&n.reviewerAgentId.length>0}const sd=["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"],NS={q:"",status:"",repo:"",needsAttention:!1};function Fd(n){return n.startsWith("?")?n.slice(1):n}function Rx(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 _S(n){const l=new URLSearchParams(Fd(n)),s=v=>{var b;const g=(b=l.get(v))==null?void 0:b.trim();return g||void 0},u={},d=s("q");d!==void 0&&(u.q=d);const f=s("status");f!==void 0&&(u.status=f);const m=s("repo");m!==void 0&&(u.repo=m),(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 AS(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 ES(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 kS(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 CS={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"},RS={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 ${CS[n]}`,children:RS[n]})}const sv="agent-dealer:first-issue-dismissed:v1";function TS(n){return n.healthy}function OS(n){return n.healthy&&n.runtime!=="muse_code"}function MS(n){const l=n.some(TS),s=n.some(OS);return l&&s?"new-issue":"agents"}function DS(n){return n.historyTotal===0&&!n.filtersActive&&!n.dismissed}function rv(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}function LS(n=rv()){try{return(n==null?void 0:n.getItem(sv))==="1"}catch{return!1}}function US(n=rv()){try{n==null||n.setItem(sv,"1")}catch{}}function zS({agents:n,onStartIssue:l,onDismiss:s}){const u=MS(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(ua,{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 BS(){return{label:"",repository:""}}function qS(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 HS({recentRepos:n=[],initialMappings:l,loadMappings:s=N2,saveMappings:u=_2,onClose:d}){const[f,m]=S.useState(l??[]),[x,v]=S.useState(l!==void 0),[g,b]=S.useState(null),[_,L]=S.useState(null),[G,R]=S.useState(!1);S.useEffect(()=>{if(l!==void 0)return;let B=!0;return s().then(F=>{B&&(m(F),v(!0))}).catch(F=>{B&&(b(String(F)),v(!0))}),()=>{B=!1}},[l,s]);const $=(B,F)=>{m(P=>P.map((J,Q)=>Q===B?{...J,...F}:J))},D=async()=>{b(null),L(null);const B=qS(f);if(B){b(B);return}R(!0);try{const F=await u(f.map(P=>({label:P.label.trim(),repository:P.repository})));m(F),L(F.length===0?"Mappings cleared":`Saved ${F.length} mapping${F.length===1?"":"s"}`)}catch(F){b(String(F))}finally{R(!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,F)=>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 ${F+1}`,value:B.label,onChange:P=>$(F,{label:P.target.value})}),c.jsx("div",{className:"flex-1 min-w-0",children:c.jsx(uv,{value:B.repository,onChange:P=>$(F,{repository:P}),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(P=>P.filter((J,Q)=>Q!==F)),children:"Remove"})]},F)):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}),_&&c.jsx("p",{className:"text-xs text-teal-200/80",children:_}),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,BS()]),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:G||!x,onClick:()=>void D(),children:G?"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 il(n){var u;const l=`${n.name} · ${Ca(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 vu(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 dv({agents:n,initialDeveloperId:l,initialReviewerId:s,busy:u,onSave:d,onCancel:f,variant:m="queued"}){var F,P;const[x,v]=S.useState(l??""),[g,b]=S.useState(s??""),_=ov(n),L=n.find(J=>J.id===x),G=n.find(J=>J.id===g),R=vu(L),$=vu(G),D=x===(l??"")&&g===(s??""),B=m==="parked"?"Save via the issue PATCH contract — keeps the worktree and branch, records the change on the timeline; resume continues with the new agents":"Save via the issue PATCH contract — keeps queue position and rechecks the wait reason";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:m==="parked"?c.jsx(c.Fragment,{children:"Swap the developer and/or reviewer to another profile — the worktree, branch and review rounds are kept, the change is recorded on the timeline, and a resume continues with the new agents."}):c.jsx(c.Fragment,{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:x,disabled:u,title:L?`${L.name} · ${Ca(L.runtime)}${L.healthy?" · healthy":` · ${((F=L.issues[0])==null?void 0:F.message)??"unhealthy"}`}`:"Pick a developer agent",onChange:J=>v(J.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),_.map(J=>c.jsx("option",{value:J.id,title:il(J),children:(J.healthy?"● ":"○ ")+il(J)},J.id))]}),R&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:R})]}),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:g,disabled:u,title:G?`${G.name} · ${Ca(G.runtime)}${G.healthy?" · healthy":` · ${((P=G.issues[0])==null?void 0:P.message)??"unhealthy"}`}`:"Pick a reviewer agent",onChange:J=>b(J.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),_.map(J=>J.runtime==="muse_code"?c.jsx("option",{value:J.id,disabled:!0,title:"Muse Code cannot be a reviewer (developer role only)",children:`○ ${J.name} · ${Ca(J.runtime)} — reviewer not supported`},J.id):c.jsx("option",{value:J.id,title:il(J),children:(J.healthy?"● ":"○ ")+il(J)},J.id))]}),$&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:$})]}),c.jsxs("div",{className:"flex flex-wrap gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm disabled:opacity-50",disabled:u||!x||!g||D,title:B,onClick:()=>d(x,g),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 gu({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 $S={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 YS(n){return $S[n]??n}function VS(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}function ZS(n){const l=VS(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 GS(n){return n==="close"||n==="reject"||n==="abort"}function QS({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:`${GS(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 Rs({action:n,linkTo:l,onChoose:s,disabled:u,children:d,hideChoicesHint:f}){const m=zy(n),x=l?c.jsx(ua,{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:YS(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(QS,{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(v=>v.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(v=>c.jsx("p",{className:"text-xs text-white/60",children:v},v)),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(v=>c.jsx("p",{className:"font-mono break-all",children:v},v))]}),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 XS({actions:n,busyActionId:l,onResolve:s}){const[u,d]=S.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(gu,{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(Rs,{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(Rs,{action:f,disabled:l===f.id||m&&!x.trim(),onChoose:v=>s(f.id,v,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:v=>d(g=>({...g,[f.id]:v.target.value}))})})},f.id)})})]})}const KS="web";function JS(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 IS({agents:n,humanActions:l,onHumanActionsChanged:s}){const[u,d]=S.useState(null),[f,m]=S.useState(null),[x,v]=vy(),g=x.toString(),b=_S(g),_=S.useRef(b);_.current=b;const[L,G]=S.useState(()=>Rx(g)),[R,$]=S.useState(!1),D=Mx(b),[B,F]=S.useState(!1),[P,J]=S.useState(!1),[Q,Oe]=S.useState("manual"),[K,we]=S.useState([]),[Ye,mt]=S.useState(""),[ot,nt]=S.useState(""),[Nt,wt]=S.useState(!1),[We,U]=S.useState([]),[I,ce]=S.useState(""),[Me,pe]=S.useState(""),[w,Y]=S.useState("main"),[W,te]=S.useState(""),[de,xe]=S.useState(""),[Ne,lt]=S.useState(""),[ve,oa]=S.useState(""),[it,st]=S.useState(!0),[_n,De]=S.useState(null),[_t,It]=S.useState([]),[Ee,en]=S.useState(null),[An,Ft]=S.useState(!1),[En,Ml]=S.useState(null),[kn,At]=S.useState(()=>LS()),[Wt,Oa]=S.useState(null),[Za,Lt]=S.useState(null),rt=K.find(O=>O.id===Ye)??null,rl=Q==="linear"&&rt!=null,Dl=jS(Q,rt),Ll=Cx({title:I,repo:Me,developerAgentId:Ne,reviewerAgentId:ve}),Ma=O=>{O2(O).then(d).catch(re=>De(String(re)))},Et=()=>{Nx([...sd]).then(Ml).catch(()=>{})},da=()=>{US(),At(!0)},kt=DS({historyTotal:En,filtersActive:D,dismissed:kn}),Ct=()=>{Ma(_.current),id().then(It).catch(()=>{}),Y2().then(en).catch(()=>{}),Et()},Ul=async O=>{Ft(!0),De(null);try{const re=await V2(O);en(re),Ct()}catch(re){De(String(re))}finally{Ft(!1)}},Ti=async O=>{Lt(O),De(null);try{const re=await Fy(O);Oa({issueId:O,developerAgentId:re.issue.developerAgentId,reviewerAgentId:re.issue.reviewerAgentId})}catch(re){De(String(re))}finally{Lt(null)}},Ga=async(O,re)=>{if(Wt){Lt(Wt.issueId);try{await su(Wt.issueId,{developerAgentId:O,reviewerAgentId:re}),Oa(null),Ct()}catch($e){Oa(null),De(String($e)),Ct()}finally{Lt(null)}}},Cn=async O=>{Lt(O),De(null);try{await Wy(O),Ct()}catch(re){De(String(re))}finally{Lt(null)}},Rn=async O=>{Lt(O),De(null);try{await Py(O),Ct()}catch(re){De(String(re)),Ct()}finally{Lt(null)}},fa=O=>{const re=AS(ES(O));v(re?Object.fromEntries(new URLSearchParams(re)):{})},Z=()=>{G(NS),v({})},ge=O=>{const re=kS(g,O);v(re?Object.fromEntries(new URLSearchParams(re)):{})},Qe=O=>G(re=>({...re,...O})),Ut=async(O,re,$e)=>{m(O),De(null);try{await tv(O,KS,re,$e),s(),Ct()}catch(Pt){De(String(Pt))}finally{m(null)}};S.useEffect(()=>{G(Rx(g))},[g]),S.useEffect(()=>{Ma(_.current),id().then(It).catch(()=>{}),Nx([...sd]).then(Ml).catch(()=>{});const O=setInterval(()=>{Ma(_.current),id().then(It).catch(()=>{})},5e3);return()=>clearInterval(O)},[g]),S.useEffect(()=>{B&&(M2().then(U).catch(()=>U([])),Q==="linear"&&S2().then(we).catch(O=>De(`Linear inbox: ${String(O)}`)))},[B,Q]),S.useEffect(()=>{rt&&(ce(`${rt.identifier}: ${rt.title}`),te(rt.description??""),xe(""),pe(O=>SS(O,rt)))},[rt]);const Da=()=>{ce(""),pe(""),te(""),xe(""),mt(""),nt(""),st(!0),Y("main")},dt=O=>{we(re=>[O,...re.filter($e=>$e.id!==O.id)]),mt(O.id),nt(O.identifier)},ha=async()=>{const O=ot.trim();if(!O){De("Paste a Linear id (e.g. NOT-103) or issue URL");return}wt(!0),De(null);try{const re=await j2(O);dt(re)}catch(re){De(`Linear lookup: ${String(re)}`)}finally{wt(!1)}},zs=async()=>{if(!Cx({title:I,repo:Me,developerAgentId:Ne,reviewerAgentId:ve})){De("Title, GitHub repository, developer, and reviewer are required");return}try{await z2({title:I.trim(),repo:Me.trim(),baseBranch:w.trim()||"main",description:W.trim()||void 0,acceptanceCriteria:de.trim()||void 0,developerAgentId:Ne,reviewerAgentId:ve,maxReviewRounds:3,maxInfraAttempts:3,autoMerge:it,source:Q==="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}),F(!1),Da(),Ct()}catch(O){De(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:()=>F(O=>!O),children:"New issue"})]}),_n&&c.jsx("p",{className:"text-sm text-red-300 mb-3",children:_n}),kt&&c.jsx(zS,{agents:n,onStartIssue:()=>F(!0),onDismiss:da}),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 → ",it?"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 ${Q==="manual"?"border-teal/50 text-teal":"border-white/10 text-white/50"}`,onClick:()=>{Oe("manual"),mt("")},children:"Manual"}),c.jsx("button",{type:"button",className:`font-ui-display px-3 py-1 rounded border ${Q==="linear"?"border-teal/50 text-teal":"border-white/10 text-white/50"}`,onClick:()=>Oe("linear"),children:"From Linear"})]}),Q==="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:ot,onChange:O=>nt(O.target.value),onKeyDown:O=>{O.key==="Enter"&&(O.preventDefault(),ha())}}),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:Nt||!ot.trim(),onClick:()=>void ha(),children:Nt?"…":"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 re=O.target.value;mt(re);const $e=K.find(Pt=>Pt.id===re);$e&&nt($e.identifier)},children:[c.jsx("option",{value:"",children:"Or pick from open inbox…"}),K.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:I,disabled:rl,onChange:O=>ce(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:W,disabled:rl,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:de,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":P,onClick:()=>J(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:Me,onChange:pe,recentRepos:We}),P&&c.jsx(HS,{recentRepos:We,onClose:()=>J(!1)}),Dl&&c.jsx("p",{className:"text-xs text-amber-200/80","data-testid":"repo-label-warning",children:Dl})]}),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:w,onChange:O=>Y(O.target.value)})]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:Ne,onChange:O=>lt(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:ve,onChange:O=>oa(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:it,onChange:O=>st(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:!Ll,title:Ll?void 0:"Title, GitHub repository, developer, and reviewer are required",onClick:zs,children:Q==="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:()=>{F(!1),Da()},children:"Cancel"})]})]}),_t.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:An,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 Ul(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:[_t.length," waiting · sequential"]})})]}),c.jsx("div",{className:"divide-y divide-white/5",children:_t.map((O,re)=>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(ua,{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:Za===O.issueId,title:"Change the developer/reviewer agents — keeps queue position and rechecks the wait reason",onClick:()=>void Ti(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:Za===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 Cn(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:Za===O.issueId,title:"Execute now — start immediately, skipping queue order; refuses (changing nothing) when capacity, readiness, blockers, or agent health prevents it",onClick:()=>void Rn(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:re===0,title:"Move to top",onClick:()=>{Fr(O.issueId,"top").then(Ct).catch($e=>De(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:re===0,title:"Move up",onClick:()=>{const $e=_t[re-1];$e&&Fr(O.issueId,{before:$e.issueId}).then(Ct).catch(Pt=>De(String(Pt)))},children:"↑"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:re===_t.length-1,title:"Move down",onClick:()=>{const $e=_t[re+1];$e&&Fr(O.issueId,{after:$e.issueId}).then(Ct).catch(Pt=>De(String(Pt)))},children:"↓"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:re===_t.length-1,title:"Move to bottom",onClick:()=>{Fr(O.issueId,"bottom").then(Ct).catch($e=>De(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(Ct).catch($e=>De(String($e)))},children:"Remove"})]})]}),(Wt==null?void 0:Wt.issueId)===O.issueId&&c.jsx("div",{className:"px-4 pb-3 pl-12",children:c.jsx(dv,{agents:n,initialDeveloperId:Wt.developerAgentId,initialReviewerId:Wt.reviewerAgentId,busy:Za===O.issueId,onSave:($e,Pt)=>void Ga($e,Pt),onCancel:()=>Oa(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:An,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 Ul(Number(O.target.value)),children:Ee.options.map(O=>c.jsx("option",{value:O,children:O},O))})]})]}):null,c.jsx(XS,{actions:l,busyActionId:f,onResolve:(O,re,$e)=>void Ut(O,re,$e)}),c.jsxs("div",{className:"mb-4 rounded border border-white/10 bg-panel-elevated/60",children:[c.jsxs("button",{type:"button","aria-expanded":R,"aria-controls":"issues-filter-form",onClick:()=>$(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:R?"▾":"▸"}),c.jsx("span",{className:"font-ui-display",children:R?"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"})]}),R&&c.jsx("form",{id:"issues-filter-form","aria-label":"Issues filters",className:"px-4 pb-4",onSubmit:O=>{O.preventDefault(),fa(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=>Qe({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=>Qe({status:O.target.value}),children:[c.jsx("option",{value:"",children:"All statuses"}),sd.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=>Qe({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=>Qe({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:Z,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:Z,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 re=_t.find($e=>$e.issueId===O.id);return c.jsxs(ua,{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(gu,{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}),re!=null&&re.waitReason?c.jsx("p",{className:"text-xs text-amber-200/80 truncate",title:re.waitReason,children:re.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}),re&&c.jsxs("span",{className:"text-xs px-2 py-0.5 rounded border border-cyber-teal/40 text-cyber-teal shrink-0",title:re.waitReason??"Next up for admission",children:["Queued #",re.position]}),c.jsx(iv,{status:O.status}),c.jsx("span",{className:"text-xs text-white/35 shrink-0 w-16 text-right",children:JS(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:()=>ge(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:()=>ge(u.page+1),children:"Next"})]})]})]})}const FS=["developer","reviewer","legacy"],Dx=["claude_code","cursor_local","codex_local"],WS=["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"];function ji(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}${Ed(n.n)?" — fewer than 5 observations, compare with care":""}`,sparse:Ed(n.n)}}function _a(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?d2(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 Ms(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:Tu(n),evidenceCounts:`${Ge(Math.round(n*l))}/${Ge(l)}`,evidenceNoun:s,title:`Exact share over ${l} ${s}`}}function Lx(n,l,s){const u=Ms(n,l,s);return u.available?{text:`${u.valueText} (${u.evidenceCounts} ${u.evidenceNoun})`,title:u.title}:{text:u.valueText,title:u.title}}function rd(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:Ms(n.issueSuccess,n.issueSuccessDenominator,"closed"),attemptSuccessDisplay:Ms(n.attemptSuccess,n.attemptSuccessDenominator,"terminal attempts"),wallText:jx(n.sessionWallMs,Kt),envelopeText:jx(n.spawnEnvelopeMs,Kt),retryText:n.retryRate===null?"N/A":Tu(n.retryRate),retryTitle:"Extra attempts after a terminal attempt in the same issue/role/round ÷ attempts",tokensInText:al(n.tokensIn,Ge),tokensOutText:al(n.tokensOut,Ge),costText:al(n.costUsd,As),costIncomplete:n.costUsd.known<n.costUsd.total,durationText:al(n.durationMs,Kt),failedCostText:al(n.failedCostUsd,As),failedTokensText:`${al(n.failedTokensIn,Ge)} in · ${al(n.failedTokensOut,Ge)} out`,failedDurationText:al(n.failedDurationMs,Kt),wall:ji(n.sessionWallMs,Kt),envelope:ji(n.spawnEnvelopeMs,Kt),tokensIn:_a(n.tokensIn,Ge,{compact:!0}),tokensOut:_a(n.tokensOut,Ge,{compact:!0}),cost:_a(n.costUsd,As),duration:_a(n.durationMs,Kt),failedCost:_a(n.failedCostUsd,As),failedTokensIn:_a(n.failedTokensIn,Ge,{compact:!0}),failedTokensOut:_a(n.failedTokensOut,Ge,{compact:!0}),failedDuration:_a(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&&Ed(n.attempts)}}function PS(n,l){const s=n.code==="unknown";return{code:n.code,domain:n.domain,countText:Ge(n.count),shareText:n.share===null?"N/A":Tu(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 ej(n){const l=n.reduce((s,u)=>s+u.count,0);return n.map(s=>PS(s,l))}function tj(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 aj(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 nj(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 lj(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 ud(n){return n===null?"N/A":Tu(n)}function Ba({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 bu({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 Es({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 Aa({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 cd({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(ua,{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(bu,{display:d.issueSuccessDisplay,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",title:d.attemptSuccessTitle,children:c.jsx(bu,{display:d.attemptSuccessDisplay,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(Es,{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(Aa,{display:d.tokensIn,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(Aa,{display:d.tokensOut,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(Aa,{display:d.cost,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(Aa,{display:d.duration,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(Aa,{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(Aa,{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(Aa,{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(Aa,{display:d.failedDuration,compact:!0})})]},d.key))})]})})}const ij={fromDate:"",toDate:"",repo:"",role:"",runtime:"",model:"",status:""};function sj({loading:n,error:l,report:s,onRetry:u,cohortLink:d}){const f=(s==null?void 0:s.summary)??null,m=S.useMemo(()=>s?ej(s.failures):[],[s]),x=S.useMemo(()=>s?s.failures.reduce((v,g)=>v+g.count,0):0,[s]);return c.jsxs("div",{"aria-live":"polite",children:[n&&c.jsx("p",{role:"status",className:"text-sm text-white/50",children:"Loading execution report…"}),!n&&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(v=>c.jsx("li",{children:v},v))})]}),f.issues===0?c.jsx("p",{className:"font-ui-display text-sm text-white/45",children:"No issues match these filters in this window. Widen the date range or clear filters."}):c.jsxs(c.Fragment,{children:[c.jsx("section",{"aria-label":"Summary",children:c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-3",children:[c.jsx(Ba,{label:"Issue success",value:c.jsx(bu,{display:Ms(f.issueSuccess,f.closedIssues,"closed")}),valueTitle:`done / (done + closed), denominator ${f.closedIssues}`,note:`${Ge(f.issues)} issues · ${Ge(f.closedIssues)} closed`}),c.jsx(Ba,{label:"Attempt success",value:c.jsx(bu,{display:Ms(f.attemptSuccess,f.terminalAttempts,"terminal")}),valueTitle:`done sessions / terminal sessions, denominator ${f.terminalAttempts}`,note:`${Ge(f.attempts)} attempts · ${Ge(f.terminalAttempts)} terminal`}),c.jsx(Ba,{label:"Retry rate",value:ud(f.retryRate),valueTitle:`${f.retryExtraAttempts} extra attempts after a terminal attempt in the same issue/role/round ÷ ${f.attempts} attempts`,note:`Reuse rate ${ud(f.reuseRate)} over ${Ge(f.reuseDenominator)} reviewer sessions with input SHA`}),c.jsx(Ba,{label:"Human wait",value:Kt(f.humanWaitMs),note:`${Ge(f.interventions)} interventions`}),c.jsx(Ba,{label:"Session wall P50/P95",value:c.jsx(Es,{display:ji(f.sessionWallMs,Kt)}),note:"Session bookkeeping proxy — never CLI runtime"}),c.jsx(Ba,{label:"Spawn envelope P50/P95",value:c.jsx(Es,{display:ji(f.spawnEnvelopeMs,Kt)}),note:"Coordinator-measured; includes slot wait + post-exit work"}),c.jsx(Ba,{label:"Checkpoint latency P50/P95",value:c.jsx(Es,{display:ji(f.checkpointMs,Kt)}),note:"Session start → first heartbeat"}),c.jsx(Ba,{label:"Reviewer rounds (avg)",value:f.avgReviewerRounds===null?"N/A":f.avgReviewerRounds.toFixed(1),note:`Change-request rate ${ud(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(Ba,{label:"Failed cost",value:c.jsx(Aa,{display:_a(f.failedCostUsd,As)})}),c.jsx(Ba,{label:"Failed tokens",value:c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",children:[c.jsx(Aa,{display:_a(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(Aa,{display:_a(f.failedTokensOut,Ge,{compact:!0})}),c.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"out"})]})}),c.jsx(Ba,{label:"Failed runtime",value:c.jsx(Aa,{display:_a(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(v=>c.jsxs("tr",{className:"tabular-nums",children:[c.jsx("th",{scope:"row",className:"px-4 py-2 text-left font-mono font-medium text-white/85",children:v.phase}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(Es,{display:ji(v.stat,Kt),compact:!0})}),c.jsx("td",{className:"font-ui-display px-3 py-2 text-xs text-white/45",children:v.stat.reasons.join(", ")})]},v.phase))})]})})]}),c.jsxs("section",{"aria-label":"Comparisons",className:"space-y-4",children:[c.jsxs("h3",{className:"font-ui-display text-sm font-medium text-white/80",children:["Comparisons ",c.jsx("span",{className:"font-normal text-white/40",children:"— sorted by name, never by cost"})]}),c.jsx(cd,{caption:"By role",dimension:"role",rows:s.byRole.map(rd),cohortLink:d}),c.jsx(cd,{caption:"By runtime",dimension:"runtime",rows:s.byRuntime.map(rd),cohortLink:d}),c.jsx(cd,{caption:"By model",dimension:"model",rows:s.byModel.map(rd),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(v=>c.jsxs("tr",{className:v.isUnknown?"bg-amber-400/5 tabular-nums":"tabular-nums",children:[c.jsxs("th",{scope:"row",className:"px-4 py-2 text-left text-white/85",children:[c.jsx("span",{className:"font-ui-display block font-medium",title:v.code,children:v.displayCode}),c.jsx("span",{className:`font-ui-display block text-xs font-normal ${v.isUnknown?"text-amber-200/90":"text-white/40"}`,children:v.displayNote})]}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:v.domain}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:v.countText}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",title:v.shareTitle,children:v.shareText}),c.jsx("td",{className:"px-3 py-2",children:c.jsxs("span",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[v.issueIds.map(g=>c.jsx(ua,{to:tj(g),className:"text-cyber-teal hover:underline font-mono text-xs",children:g.slice(0,8)},g)),v.hiddenIssueCount>0&&c.jsxs("span",{className:"font-ui-display text-xs text-white/40",children:["+",v.hiddenIssueCount," more"]})]})})]},v.code))})]})})]})]})]})]})}function rj(){const[n,l]=vy(),s=n.toString(),u=S.useMemo(()=>aj(s),[s]),[d,f]=S.useState(()=>Bx(s)),[m,x]=S.useState(null),[v,g]=S.useState(!0),[b,_]=S.useState(null),[L,G]=S.useState(0);S.useEffect(()=>{f(Bx(s))},[s]),S.useEffect(()=>{let D=!1;return g(!0),_(null),G2(u).then(B=>{D||(x(B),g(!1))}).catch(B=>{D||(_(B instanceof Error?B.message:String(B)),g(!1))}),()=>{D=!0}},[s,L]);const R=D=>{const B=Zy(lj(D));l(B?Object.fromEntries(new URLSearchParams(B)):{})},$=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(),R(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=>$({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=>$({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=>$({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=>$({role:D.target.value}),children:[c.jsx("option",{value:"",children:"All roles"}),FS.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=>{$({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=>$({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=>$({status:D.target.value}),children:[c.jsx("option",{value:"",children:"All statuses"}),WS.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(ij),l({})},children:"Reset"})]})]})}),c.jsx(sj,{loading:v,error:b,report:m,onRetry:()=>G(D=>D+1),cohortLink:(D,B)=>nj(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} · ${Ca(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} · ${Ca(s.runtime)}${s.healthy?" · healthy":` · ${((u=s.issues[0])==null?void 0:u.message)??"unhealthy"}`}`:`Configured profile ${n} is not on record (deleted?)`}function uj({agents:n,initialRepo:l,initialDeveloperId:s,initialReviewerId:u,busy:d,onSave:f,onCancel:m}){var P,J;const[x,v]=S.useState(l),[g,b]=S.useState(s??""),[_,L]=S.useState(u??""),G=ov(n),R=n.find(Q=>Q.id===g),$=n.find(Q=>Q.id===_),D=vu(R),B=vu($),F=x.trim()===l&&g===(s??"")&&_===(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:Q=>v(Q.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:R?`${R.name} · ${Ca(R.runtime)}${R.healthy?" · healthy":` · ${((P=R.issues[0])==null?void 0:P.message)??"unhealthy"}`}`:"Pick a developer agent",onChange:Q=>b(Q.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),G.map(Q=>c.jsx("option",{value:Q.id,title:il(Q),children:(Q.healthy?"● ":"○ ")+il(Q)},Q.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:_,disabled:d,title:$?`${$.name} · ${Ca($.runtime)}${$.healthy?" · healthy":` · ${((J=$.issues[0])==null?void 0:J.message)??"unhealthy"}`}`:"Pick a reviewer agent",onChange:Q=>L(Q.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),G.map(Q=>Q.runtime==="muse_code"?c.jsx("option",{value:Q.id,disabled:!0,title:"Muse Code cannot be a reviewer (developer role only)",children:`○ ${Q.name} · ${Ca(Q.runtime)} — reviewer not supported`},Q.id):c.jsx("option",{value:Q.id,title:il(Q),children:(Q.healthy?"● ":"○ ")+il(Q)},Q.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||!_||F,title:"Save via the issue PATCH contract — keeps queue position, rechecks readiness and the wait reason",onClick:()=>f(x.trim(),g,_),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 cj({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(uj,{agents:l,initialRepo:n.repo,initialDeveloperId:n.developerAgentId,initialReviewerId:n.reviewerAgentId,busy:d,onSave:m,onCancel:x})]})}function oj({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 od={"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=Ni(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","base.probe":n=>{var s;const l=(s=Ni(n.payloadJson))==null?void 0:s.result;return l==="conflict"?"Base conflict found before publish":l==="skipped"?"Base conflict probe skipped":l==="deferred"?"Base conflict probe waiting on base fetch":l==="failed"?"Base conflict probe failed; not published":"Base conflict probe clean"},"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 Ni(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}const dj={approved:"text-cyber-teal",changes_requested:"text-amber-300",escalated:"text-red-300"};function fj({e:n}){var l;if(n.type==="pull_request.opened"||n.type==="pull_request.updated"){const s=Ni(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=Ni(n.payloadJson);return s?c.jsxs("span",{className:"text-sm",children:[c.jsx("span",{className:dj[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=Ni(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=Ni(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 hj(n){var l;return((l=od[n.type])==null?void 0:l.call(od,n))??n.type}const $x={human:"You",system:"System",developer:"Developer",reviewer:"Reviewer"},mj={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 pj(n){return n.actorRef?`${$x[n.actorType]} · ${n.actorRef}`:$x[n.actorType]}function xj({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 ${mj[l.actorType]}`,children:pj(l)}),c.jsx("span",{className:"text-sm text-white/80",children:hj(l)}),c.jsx(fj,{e:l})]},l.id))})}function qa(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 yj(n){return n==null||!Number.isFinite(n)?null:`$${n.toFixed(2)}`}const vj={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"},Cd={worktree:"worktree",commit:"commit",verification_receipt:"verification receipt",publish_only:"publish-only result"},gj=new Set(["failed","timed_out","error"]);function Wd(n){return n.replace(/_/g," ")}function Ds(n,l){const s=`Evidence quality: ${n}`;return l.length>0?`${s} — ${l.join(", ")}`:s}function Ea({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:Ds(n,l),children:["· ",n,l.length>0&&c.jsxs("span",{className:"sr-only",children:[" (",l.join(", "),")"]})]})}function ll({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(ll,{reasons:n.reasons});const u=n.known<n.total;return c.jsxs("span",{title:`${Ds(n.quality,n.reasons)} · known ${n.known} of ${n.total} ${s}`,children:[l(n.value),c.jsx(Ea,{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:Ds(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 bj({interval:n}){const l=Vx[n.category??"unknown"]??Vx.unknown,s=qa(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(ll,{reasons:n.reasons})}),c.jsx(Ea,{quality:n.quality,reasons:n.reasons})]})}function wj({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 ${Cd[s]??s} instead of starting cold.`,children:["reused ",Cd[s]??s]},s))})}function Sj({attempt:n,isRetry:l}){const s=qa(n.setup.durationMs),u=qa(n.agentProcess.durationMs),d=qa(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(wj,{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(Ea,{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(Ea,{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(Ea,{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 jj({analysis:n}){const l=qa(n.elapsed.durationMs),s=qa(n.exclusiveTotalMs),u=qa(n.firstCheckpoint.msSinceWorkflowStart),d=n.nested.filter(R=>R.kind!=="unexplained_silence"),f=n.attempts.flatMap(R=>R.silence),m=n.attempts.length>0&&n.attempts.every(R=>R.silence.length===0&&R.silenceQuality==="unavailable"),x=n.attempts.filter(R=>R.silence.length===0&&R.silenceQuality==="unavailable"),v=n.waste.failedAttempts>0||n.waste.publishOnlyAttempts>0||n.attempts.some(R=>R.failureCauses.length>0||gj.has(R.status)),g=qa(n.humanWaitMs),b=n.retry.reuseRate==null?null:`${Math.round(n.retry.reuseRate*100)}% reused`,L=(n.retry.preservedKinds??[]).map(R=>Cd[R]??R),G=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(ll,{reasons:n.elapsed.reasons}),c.jsx(Ea,{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(ll,{reasons:n.exclusiveTotalReasons}),c.jsx(Ea,{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(R=>{const $=qa(R.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:vj[R.phase]??R.phase}),c.jsx("span",{className:"text-white/85 tabular-nums",children:$??c.jsx(ll,{reasons:R.reasons})}),c.jsx(Ea,{quality:R.quality,reasons:R.reasons}),R.known<R.total&&c.jsxs("span",{className:"text-[11px] text-white/60",children:["(known ",R.known," of ",R.total,")"]})]},R.phase)})}),c.jsxs("p",{className:"text-xs text-white/45 tabular-nums mt-1",children:["Human wait ",g??c.jsx(ll,{reasons:n.humanWaitReasons}),c.jsx(Ea,{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((R,$)=>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:["↳ ",R.kind==="human_wait"?"Human wait":R.category??R.kind]})," ",qa(R.durationMs)??c.jsx(ll,{reasons:R.reasons}),c.jsx(Ea,{quality:R.quality,reasons:R.reasons})]},$))})]}),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((R,$)=>c.jsx(Sj,{attempt:R,isRetry:$>0},R.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((R,$)=>c.jsx(Zx,{cause:R,primary:!1},`${R.code}-${$}`))})]}):v?c.jsxs("p",{className:"text-sm text-white/60 italic",title:Ds("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",")"]}),G?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:R=>qa(Math.round(R))??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt input tokens over known values only",children:["In ",c.jsx(tu,{covered:n.waste.tokensIn,format:R=>Yx(R)??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt output tokens over known values only",children:["Out ",c.jsx(tu,{covered:n.waste.tokensOut,format:R=>Yx(R)??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt known cost over known values only",children:["Cost ",c.jsx(tu,{covered:n.waste.costUsd,format:R=>yj(R)??"?",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:Ds(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(Ea,{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(ll,{reasons:n.retry.reasons}),c.jsx(Ea,{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((R,$)=>c.jsx(bj,{interval:R},$))}),x.length>0&&c.jsx("ul",{"aria-label":"Attempts with unknown silence",className:"mt-1",children:x.map(R=>c.jsxs("li",{className:"text-[11px] text-white/60 italic py-0.5",children:["Silence unknown for attempt ",R.sessionId.length>12?`${R.sessionId.slice(0,8)}…`:R.sessionId," —"," ",R.silenceReasons.join(", ")||"no silence evidence recorded"]},R.sessionId))})]})]})]})}function Nj({issueId:n}){const[l,s]=S.useState(null),[u,d]=S.useState(null),[f,m]=S.useState(!0);return S.useEffect(()=>{s(null),d(null),m(!0);let x=!1;return D2(n).then(v=>{x||(s(v),m(!1))}).catch(v=>{x||(/not found/i.test(String(v))?(s(null),d(null)):d(String(v).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(jj,{analysis:l})]})}const _j="web";function Aj(n){try{const l=JSON.parse(n);return typeof l.text=="string"?l.text:JSON.stringify(l,null,2)}catch{return n}}function dd(n){const l=Math.floor(n/6e4);return l<60?`${l}m`:`${Math.floor(l/60)}h ${l%60}m`}function Ej(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 ks(n){if(!n)return null;const l=n.split(/[/\\]/).filter(Boolean);return l.length<=2?n:l.slice(-2).join("/")}function fd(n){var l;return[n.branch,n.tipLabel,(l=n.worktree)!=null&&l.path?ks(n.worktree.path):null].filter(Boolean).join(" · ")}function hd(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 md(n){var l;return!!(n.restartRisk||(l=n.worktree)!=null&&l.preserved)}function kj(n,l){return!n||!l?!1:n===l?!0:n.includes(l)}function Cj({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 Tj({issueId:n,detail:l,agents:s,onHumanActionsChanged:u,refresh:d,onError:f}){var fa;const[m,x]=S.useState(null),[v,g]=S.useState({}),[b,_]=S.useState(""),[L,G]=S.useState(!1),[R,$]=S.useState(""),[D,B]=S.useState(""),[F,P]=S.useState(""),[J,Q]=S.useState(!1),[Oe,K]=S.useState(null),[we,Ye]=S.useState(!1),[mt,ot]=S.useState(!1),[nt,Nt]=S.useState(!1),[wt,We]=S.useState(null),[U,I]=S.useState({}),[ce,Me]=S.useState({}),pe=Z=>f(String(Z)),{issue:w,timeline:Y,humanActions:W,usageSummary:te,readiness:de,humanWaitMs:xe,interventionCount:Ne,latestWorkflowInstance:lt,activeWorkerSession:ve,liveProgress:oa,latestSessionFailure:it,branchTipStatus:st,queued:_n,queueEntry:De,capWait:_t}=l,It=s.find(Z=>Z.id===w.developerAgentId),Ee=It&&!It.healthy,en=((fa=It==null?void 0:It.issues[0])==null?void 0:fa.message)??"Developer agent is unhealthy",An=lt?new Date(lt.completedAt??Date.now()).getTime()-new Date(lt.startedAt).getTime():0,Ft=W.filter(Z=>Z.status==="open"),En=w.status==="needs_human"&&Ft.some(Z=>Z.actionType==="attempts_exhausted"||Z.actionType==="policy_escalation"),Ml=de.ok===!1||Ft.some(Z=>Z.actionType==="product_scope_decision"),kn=lt!=null&<.completedAt===null,At=w.status==="ready"&&!kn,Wt=w.status==="ready"&&!kn,Oa=ve&&ve.status==="running"&&(w.status==="developing"||w.status==="reviewing"||w.status==="repairing"),Za=!!it&&!Oa,Lt=async()=>{b.trim()&&(await Z2(n,b),_(""),d())},rt=()=>{$(w.title),B(w.description??""),P(w.acceptanceCriteria??""),G(!0)},rl=async()=>{Q(!0),f(null);try{await su(n,{title:R.trim()||void 0,description:D.trim()||null,acceptanceCriteria:F.trim()||null}),G(!1),d()}catch(Z){pe(Z)}finally{Q(!1)}},Dl=async()=>{Q(!0),f(null);try{const Z=await Wy(n);K(Z.state==="admitted"?null:`Queued at position ${Z.position}${Z.waitReason?` — ${Z.waitReason}`:""}`),d()}catch(Z){pe(Z)}finally{Q(!1)}},Ll=async()=>{Q(!0),f(null);try{await $2(n),d()}catch(Z){pe(Z)}finally{Q(!1)}},Ma=async()=>{Q(!0),f(null);try{await Py(n),K(null),Ye(!1),d()}catch(Z){pe(Z),d()}finally{Q(!1)}},Et=async(Z,ge,Qe)=>{Q(!0),f(null);try{await su(n,{repo:Z,developerAgentId:ge,reviewerAgentId:Qe}),Ye(!1),d()}catch(Ut){Ye(!1),pe(Ut),d()}finally{Q(!1)}},da=async(Z,ge)=>{Q(!0),f(null);try{await su(n,{developerAgentId:Z,reviewerAgentId:ge}),ot(!1),d()}catch(Qe){ot(!1),pe(Qe),d()}finally{Q(!1)}},kt=async()=>{Q(!0),f(null);try{await q2(n),u(),d()}catch(Z){pe(Z)}finally{Q(!1)}},Ct=async()=>{Q(!0),f(null);try{await ev(n),d()}catch(Z){pe(Z)}finally{Q(!1)}},Ul=async()=>{Q(!0),f(null);try{await H2(n),Nt(!1),We("Issue closed — it will not execute. History is retained and can be found as closed work."),d()}catch(Z){pe(Z)}finally{Q(!1)}},Ti=async()=>{if(confirm("Abort this workflow? The current worker will stop and the issue will close. History and evidence are kept.")){Q(!0),f(null);try{await B2(n),d()}catch(Z){pe(Z)}finally{Q(!1)}}},Ga=async(Z,ge,Qe)=>{Q(!0),f(null);try{await tv(Z,_j,ge,Qe),u(),d()}catch(Ut){pe(Ut)}finally{Q(!1)}},Cn=()=>{m||L2(n).then(x).catch(Z=>pe(Z))},Rn=Z=>{v[Z]||(g(ge=>({...ge,[Z]:{content:"",loading:!0}})),U2(n,Z).then(ge=>g(Qe=>({...Qe,[Z]:{content:ge.content,loading:!1}}))).catch(ge=>g(Qe=>({...Qe,[Z]:{content:"",loading:!1,error:String(ge)}}))))};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(ua,{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:w.title}),c.jsxs("p",{className:"text-xs text-white/45 mt-1",children:["Owner: ",c.jsx("span",{className:"capitalize",children:w.currentOwner}),w.currentIntent?` · ${w.currentIntent}`:""]}),c.jsxs("div",{className:"flex flex-wrap gap-3 mt-2 text-xs text-white/40",children:[w.prUrl&&c.jsxs("a",{href:w.prUrl,target:"_blank",rel:"noreferrer",className:"text-cyber-teal hover:underline",children:["PR #",w.prNumber]}),w.externalUrl&&c.jsx("a",{href:w.externalUrl,target:"_blank",rel:"noreferrer",className:"text-cyber-teal hover:underline",children:w.externalLabel??"External link"}),c.jsxs("span",{children:["Round ",w.currentRound,"/",w.maxReviewRounds]}),c.jsxs("span",{children:["Infra attempts ",w.infraAttempts,"/",w.maxInfraAttempts]}),c.jsxs("span",{title:"Wall-clock time from workflow start to completion (or now)",children:[dd(An)," elapsed"]}),c.jsxs("span",{title:`${te.totalTokensIn} in / ${te.totalTokensOut} out tokens`,children:["$",te.totalCostUsd.toFixed(2)]}),xe>0&&c.jsxs("span",{title:"Time spent waiting on a human, excluding autonomous processing",children:[dd(xe)," human wait"]}),Ne>0&&c.jsxs("span",{children:[Ne," intervention",Ne===1?"":"s"]})]})]}),c.jsx(iv,{status:w.status})]}),wt&&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:wt})}),c.jsx(cj,{issue:w,agents:s,canEdit:Wt,editing:we,busy:J,onBeginEdit:()=>Ye(!0),onSave:(Z,ge,Qe)=>void Et(Z,ge,Qe),onCancel:()=>Ye(!1)}),En&&!mt&&c.jsx("button",{type:"button",className:"font-ui-display mb-4 text-xs text-cyber-teal hover:underline disabled:opacity-50",disabled:J,onClick:()=>ot(!0),children:"Swap developer / reviewer agents"}),En&&mt&&c.jsx("div",{className:"mb-4",children:c.jsx(dv,{variant:"parked",agents:s,initialDeveloperId:w.developerAgentId,initialReviewerId:w.reviewerAgentId,busy:J,onSave:(Z,ge)=>void da(Z,ge),onCancel:()=>ot(!1)})}),w.executionContract&&c.jsx(oj,{contract:w.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)})]}),kn&&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:J,onClick:Ti,children:"Abort workflow"})]}),De&&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 ",De.position]}),c.jsx("p",{className:"text-sm text-white/80 mt-0.5",children:De.waitReason??"Next up — starts as soon as the coordinator ticks"})]}),_t&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-amber-400/30 bg-amber-500/10 flex flex-wrap items-start justify-between gap-3",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"text-xs text-amber-300 font-medium uppercase tracking-wide",children:_t.kind==="usage_capped"?"Waiting on usage cap":"Waiting on Agent Deck"}),c.jsx("p",{className:"text-sm text-white/80 mt-0.5 break-words",children:_t.reason}),c.jsxs("p",{className:"text-xs text-white/45 mt-0.5",children:["Wait until ",new Date(_t.until).toLocaleString()]})]}),c.jsx("button",{type:"button",className:"btn-gold px-3 py-1.5 text-xs shrink-0 disabled:opacity-50",disabled:J,title:"Park this issue for a human — cancels the wait without touching the worktree; a resume continues with whichever agents are then set",onClick:kt,children:"Park for human"})]}),Oa&&ve&&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:ve.role}),ve.runtime?` · ${ve.runtime}`:"",ve.model?` · ${ve.model}`:"",` · round ${ve.round}`]}),c.jsxs("p",{className:"text-sm text-[#C4B643] truncate",title:oa??w.currentIntent??"session started",children:["Last progress: ",oa??w.currentIntent??"session started"]}),st&&c.jsxs("p",{className:`text-xs ${md(st)?"text-amber-300":"text-white/55"}`,title:fd(st),children:["Branch tip: ",st.tipLabel,hd(st)]}),oa&&w.currentIntent&&!/session running/i.test(w.currentIntent)&&!kj(w.currentIntent,oa)&&c.jsx("p",{className:"text-xs text-white/45 truncate",title:w.currentIntent,children:w.currentIntent}),c.jsxs("p",{className:"text-xs text-white/45",children:["Heartbeat ",Ej(ve.heartbeatAt),ks(ve.worktreePath)?` · ${ks(ve.worktreePath)}`:""]}),ve.logPath&&c.jsxs("p",{className:"text-xs text-white/40 font-mono break-all",title:ve.logPath,children:["Log: ",ks(ve.logPath)??ve.logPath]})]}),Za&&it&&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:it.reason}),c.jsxs("p",{className:"text-xs text-white/45",children:[it.role?c.jsx("span",{className:"capitalize",children:it.role}):"Worker",it.outcome?` · ${it.outcome}`:"",` · ${new Date(it.when).toLocaleString()}`,` · infra ${it.infraAttempts}/${it.maxInfraAttempts}`]}),st&&c.jsxs("p",{className:`text-xs ${md(st)?"text-amber-300":"text-white/55"}`,title:fd(st),children:["Branch tip: ",st.tipLabel,hd(st)]}),it.logPath&&c.jsxs("p",{className:"text-xs text-white/40 font-mono break-all",title:it.logPath,children:["Log: ",ks(it.logPath)??it.logPath]})]}),st&&!Oa&&!Za&&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 ${md(st)?"text-amber-300":"text-white/80"}`,title:fd(st),children:[st.tipLabel,hd(st)]})]}),!de.ok&&!Ft.some(Z=>Z.actionType==="product_scope_decision")&&c.jsx("div",{className:"mb-4 p-3 rounded border border-amber-400/30 bg-amber-500/10",children:c.jsxs("p",{className:"text-xs text-amber-300 font-medium",children:["Not startable yet — missing: ",de.missing.join(", ")]})}),Ft.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"}),Ft.map(Z=>{const ge=Z.actionType==="product_scope_decision";if(Z.actionType==="operator_verification"){const Qe=ZS(Z),Ut=ce[Z.id]??"",Da=Ut.trim().length>0;return c.jsx(Rs,{action:Z,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:Ut,disabled:J,onChange:dt=>Me(ha=>({...ha,[Z.id]:dt.target.value}))}),c.jsx("div",{className:"flex flex-wrap gap-2",children:Qe.map(dt=>c.jsx("button",{type:"button",className:"btn-gold px-3 py-1 text-xs disabled:opacity-50",disabled:J||!Da,title:Da?void 0:"Enter the result note first — the server requires it",onClick:()=>Ga(Z.id,dt.choice,Ut),children:dt.label},dt.choice))})]})},Z.id)}return ge?c.jsx(Rs,{action:Z,hideChoicesHint:!0,children:de.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:U[Z.id]??"",disabled:J,onChange:Qe=>I(Ut=>({...Ut,[Z.id]:Qe.target.value}))}),c.jsx("button",{type:"button",className:"btn-gold px-3 py-1 text-xs",disabled:J,onClick:()=>Ga(Z.id,"resume",U[Z.id]),children:"Resume"})]})},Z.id):c.jsx(Rs,{action:Z,disabled:J,onChoose:Qe=>Ga(Z.id,Qe)},Z.id)})]}),Ml&&!L&&c.jsx("button",{type:"button",className:"font-ui-display mb-4 text-xs text-cyber-teal hover:underline",onClick:rt,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:R,onChange:Z=>$(Z.target.value),placeholder:"Title"}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:2,value:D,onChange:Z=>B(Z.target.value),placeholder:"Description"}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:2,value:F,onChange:Z=>P(Z.target.value),placeholder:"Acceptance criteria"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm",disabled:J,onClick:rl,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:()=>G(!1),children:"Cancel"})]})]}),(w.status==="ready"||w.status==="needs_human"&&Ft.length===0)&&c.jsxs("div",{className:"mb-4 space-y-2",children:[Ee&&c.jsxs("p",{className:"text-sm text-amber-200/90",children:["Fix before Start: ",en]}),Oe&&c.jsx("p",{className:"text-sm text-amber-200/90",children:Oe}),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:!de.ok||J||!!Ee,title:Ee?en:"Run next — move to the front of the admission queue; runs now if a slot is free, otherwise waits first with a reason",onClick:Dl,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:!de.ok||J||!!Ee,title:Ee?en:"Execute now — start immediately, skipping queue order; refuses (changing nothing) when capacity, readiness, blockers, or agent health prevents it",onClick:Ma,children:"Execute now"}),_n?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:J,onClick:Ct,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:J||kn,title:"Add to queue — append to the end of the admission queue; does not start anything now",onClick:Ll,children:"Add to queue"})]}),_n&&Wt&&!we&&c.jsx("p",{className:"text-xs text-white/40",children:"Queued — edit repository / agents from the Configuration section above; position is kept."})]}),c.jsx(Nj,{issueId:n}),c.jsx("div",{className:"border-t border-white/10 pt-3",children:c.jsx(xj,{events:Y})}),c.jsxs("div",{className:"mt-4 flex gap-2",children:[c.jsx("input",{className:"flex-1 bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"Guide this issue…",value:b,onChange:Z=>_(Z.target.value),onKeyDown:Z=>Z.key==="Enter"&&Lt()}),c.jsx("button",{type:"button",className:"btn-gold px-4",onClick:Lt,children:"Send"})]}),At&&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."}),nt?c.jsx(Cj,{busy:J,onConfirm:()=>void Ul(),onCancel:()=>Nt(!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:J,title:"Retire this issue without running it — removes any queue entry, keeps history as closed work",onClick:()=>Nt(!0),children:"Close issue"})]})]}),c.jsxs("details",{className:"mt-6",onToggle:Z=>Z.currentTarget.open&&Cn(),children:[c.jsx("summary",{className:"text-xs text-white/45 cursor-pointer hover:text-white/70",children:"Evidence & raw trace"}),m?c.jsxs("div",{className:"mt-2 space-y-3 text-xs text-white/60",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-white/45 mb-1",children:"Worker sessions"}),m.workerSessions.map(Z=>{const ge=m.usageEvents.filter(dt=>dt.workerSessionId===Z.id),Qe=ge.reduce((dt,ha)=>dt+(ha.costUsd??0),0),Ut=ge.reduce((dt,ha)=>dt+(ha.tokensIn??0),0),Da=ge.reduce((dt,ha)=>dt+(ha.tokensOut??0),0);return c.jsxs("p",{children:[Z.role," round ",Z.round," · ",Z.status,Z.startedAt&&Z.completedAt?` · ${dd(new Date(Z.completedAt).getTime()-new Date(Z.startedAt).getTime())}`:"",ge.length>0?` · $${Qe.toFixed(3)} · ${Ut}→${Da} tok`:""]},Z.id)}),m.workerSessions.length===0&&c.jsx("p",{className:"text-white/35",children:"None yet."})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-white/45 mb-1",children:"Artifacts"}),m.artifacts.map(Z=>{const ge=v[Z.id];return c.jsxs("details",{className:"mb-1.5",onToggle:Qe=>Qe.currentTarget.open&&Z.blobPath&&Rn(Z.id),children:[c.jsxs("summary",{className:"cursor-pointer hover:text-white/80",children:[Z.kind," · ",new Date(Z.createdAt).toLocaleString()]}),c.jsxs("div",{className:"mt-1 pl-3 border-l border-white/10 space-y-1",children:[Z.contentJson&&c.jsx("pre",{className:"whitespace-pre-wrap break-words text-white/55",children:Aj(Z.contentJson)}),Z.blobPath&&c.jsxs("div",{children:[c.jsxs("p",{className:"text-white/40",children:["Raw trace: ",Z.blobPath]}),(ge==null?void 0:ge.loading)&&c.jsx("p",{className:"text-white/35",children:"Loading trace…"}),(ge==null?void 0:ge.error)&&c.jsx("p",{className:"text-red-300/80",children:ge.error}),ge&&!ge.loading&&!ge.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:ge.content||"(empty)"})]}),!Z.contentJson&&!Z.blobPath&&c.jsx("p",{className:"text-white/35",children:"No content recorded."})]})]},Z.id)}),m.artifacts.length===0&&c.jsx("p",{className:"text-white/35",children:"None yet."})]})]}):c.jsx("p",{className:"text-xs text-white/40 mt-2",children:"Loading…"})]})]})})}function Oj({issueId:n,agents:l,onHumanActionsChanged:s}){const[u,d]=S.useState(null),[f,m]=S.useState(null),[x,v]=S.useState(!1),g=()=>Fy(n).then(b=>{d(b),m(null),v(!1)}).catch(b=>{const _=String(b).replace(/^Error:\s*/i,"").trim();/^not found$/i.test(_)?(v(!0),m(null),d(null)):(m(_),v(!1))});return S.useEffect(()=>{d(null),m(null),v(!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(ua,{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(ua,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]}):u?c.jsx(Tj,{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 Mj(){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(ua,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]})})}function Dj(){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 Lj({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 Uj="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 zj({className:n="",size:l=36}){return c.jsx("img",{src:Uj,alt:"",width:l,height:l,className:`shrink-0 object-contain ${n}`,"aria-hidden":!0,draggable:!1})}const wu={unsupported:"not reported by provider",missing:"no data yet",expired:"expired",unparsable:"provider data unparsable",stale:"stale"},Gx="5H",Qx="1W",Bj=new Set(["claude_code","codex_local","muse_code"]),qj="billing_cycle",Hj="1M",$j=new Set(Ht.options),Yj={critical:"font-medium text-red-300",warning:"font-medium text-yellow-300",normal:"font-medium text-white/75"};function Vj(n){return{fiveHour:n.find(l=>l.criticalRole==="five_hour")??null,weekly:n.find(l=>l.criticalRole==="weekly")??null}}function fv(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 (${wu[fv(n,l,s)]})`}function Rd(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=fv(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 (${wu[s]})`,isCritical:!0}}function Zj(n,l,s){return Rd(n,l,s,!0,Hj,"current billing cycle")}function Gj(n,l=Date.now()){return n.runtimes.map(s=>{const u=Ca(s.runtime),d=s.runtime;if(s.runtime==="cursor_local"){const f=s.windows.find(x=>x.windowKey===qj)??null;if(f===null)return{runtime:u,runtimeKey:d,windows:[],exhausted:!1,detail:`N/A (${wu[s.unavailableReason??"missing"]})`};const m=Zj(f,s,l);return{runtime:u,runtimeKey:d,windows:[m],exhausted:m.kind==="known"&&m.rawRemaining===0,detail:m.detail}}if(Bj.has(s.runtime)){const{fiveHour:f,weekly:m}=Vj(s.windows),x=f!==null?Rd(f,s,l,!0,Gx):Kx(Gx,s),v=m!==null?Rd(m,s,l,!0,Qx):Kx(Qx,s),g=[x,v],b=g.some(L=>L.kind==="known"&&L.rawRemaining===0),_=g.map(L=>L.detail).join("; ");return{runtime:u,runtimeKey:d,windows:g,exhausted:b,detail:_}}return{runtime:u,runtimeKey:d,windows:[],exhausted:!1,detail:`N/A (${wu[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 Qj({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=Gj(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":`${$j.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:Yj[x],children:[m.remaining,"%"]})})():c.jsx("span",{className:"text-white/35",children:"N/A"})]},m.key))})]},d.runtime)})]})}const Ix=5e3;function pd({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 Xj({agents:n,onHumanActionsChanged:l}){const{issueId:s}=gb();return s?c.jsx(Oj,{issueId:s,agents:n,onHumanActionsChanged:l},s):c.jsx(py,{to:"/issues",replace:!0})}function Kj({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(ua,{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(zj,{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:pd,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(gu,{className:"w-3 h-3 shrink-0"}),n]})]}),c.jsx(lu,{to:"/reports/execution",className:pd,children:"Reports"})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 min-w-0",children:[c.jsx(Qj,{state:u}),c.jsxs(lu,{to:"/agents",className:({isActive:d})=>`${pd({isActive:d})} inline-flex items-center gap-1.5 transition-colors`,"aria-label":"Agents",title:"Agents",children:[c.jsx(Lj,{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(gu,{className:"w-3 h-3 shrink-0"}),s]})]})]})]})}function Jj(){const[n,l]=S.useState([]),[s,u]=S.useState(0),[d,f]=S.useState(!1),[m,x]=S.useState([]),[v,g]=S.useState({status:"loading"}),b=S.useCallback(()=>{A2().then(({agents:R,issueCount:$})=>{l(R),u($)}).catch(console.error),Iy().then(R=>f(R.connected)).catch(()=>f(!1)),Jy().then(R=>g({status:"ready",data:R})).catch(()=>g({status:"unavailable"}))},[]),_=S.useCallback(()=>Q2().then(x).catch(()=>{}),[]);S.useEffect(()=>{b();const R=setInterval(b,Ix);return()=>clearInterval(R)},[b]),S.useEffect(()=>{_();const R=setInterval(()=>void _(),Ix);return()=>clearInterval(R)},[_]);const L=m.length,G=n.length;return c.jsxs(c.Fragment,{children:[c.jsx(Dj,{}),c.jsxs("div",{className:"relative z-10 min-h-screen flex flex-col",children:[c.jsx(Kj,{openHumanActionCount:L,agentCount:G,agentIssueCount:s,capacity:v}),c.jsx("main",{className:"flex-1 flex overflow-hidden",children:c.jsxs(Db,{children:[c.jsx(_l,{path:"/",element:c.jsx(py,{to:"/issues",replace:!0})}),c.jsx(_l,{path:"/issues",element:c.jsx(IS,{agents:n,humanActions:m,onHumanActionsChanged:_})}),c.jsx(_l,{path:"/issues/:issueId",element:c.jsx(Xj,{agents:n,onHumanActionsChanged:_})}),c.jsx(_l,{path:"/agents",element:c.jsx(gS,{agents:n,agentDeckOnline:d,onRefresh:b})}),c.jsx(_l,{path:"/reports/execution",element:c.jsx(rj,{})}),c.jsx(_l,{path:"*",element:c.jsx(Mj,{})})]})})]})]})}function Ij(){return typeof document>"u"?Promise.resolve():document.fonts.load('13px "Monaco"').then(()=>{}).catch(()=>{})}Ij();M0.createRoot(document.getElementById("root")).render(c.jsx(S.StrictMode,{children:c.jsx(i1,{children:c.jsx(Jj,{})})}));
|