cohorte 4.0.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,163 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function _f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ou={exports:{}},ls={},Fu={exports:{}},M={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its 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 Ur=Symbol.for("react.element"),Lf=Symbol.for("react.portal"),Rf=Symbol.for("react.fragment"),Df=Symbol.for("react.strict_mode"),zf=Symbol.for("react.profiler"),If=Symbol.for("react.provider"),Of=Symbol.for("react.context"),Ff=Symbol.for("react.forward_ref"),Mf=Symbol.for("react.suspense"),Af=Symbol.for("react.memo"),bf=Symbol.for("react.lazy"),ha=Symbol.iterator;function Uf(e){return e===null||typeof e!="object"?null:(e=ha&&e[ha]||e["@@iterator"],typeof e=="function"?e:null)}var Mu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Au=Object.assign,bu={};function Wn(e,t,n){this.props=e,this.context=t,this.refs=bu,this.updater=n||Mu}Wn.prototype.isReactComponent={};Wn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Wn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Uu(){}Uu.prototype=Wn.prototype;function lo(e,t,n){this.props=e,this.context=t,this.refs=bu,this.updater=n||Mu}var so=lo.prototype=new Uu;so.constructor=lo;Au(so,Wn.prototype);so.isPureReactComponent=!0;var pa=Array.isArray,Wu=Object.prototype.hasOwnProperty,io={current:null},Bu={key:!0,ref:!0,__self:!0,__source:!0};function Hu(e,t,n){var r,l={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Wu.call(t,r)&&!Bu.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];l.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)l[r]===void 0&&(l[r]=a[r]);return{$$typeof:Ur,type:e,key:i,ref:o,props:l,_owner:io.current}}function Wf(e,t){return{$$typeof:Ur,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function oo(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ur}function Bf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ma=/\/+/g;function Ls(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Bf(""+e.key):t.toString(36)}function gl(e,t,n,r,l){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Ur:case Lf:o=!0}}if(o)return o=e,l=l(o),e=r===""?"."+Ls(o,0):r,pa(l)?(n="",e!=null&&(n=e.replace(ma,"$&/")+"/"),gl(l,t,n,"",function(c){return c})):l!=null&&(oo(l)&&(l=Wf(l,n+(!l.key||o&&o.key===l.key?"":(""+l.key).replace(ma,"$&/")+"/")+e)),t.push(l)),1;if(o=0,r=r===""?".":r+":",pa(e))for(var a=0;a<e.length;a++){i=e[a];var u=r+Ls(i,a);o+=gl(i,t,n,u,l)}else if(u=Uf(e),typeof u=="function")for(e=u.call(e),a=0;!(i=e.next()).done;)i=i.value,u=r+Ls(i,a++),o+=gl(i,t,n,u,l);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Zr(e,t,n){if(e==null)return e;var r=[],l=0;return gl(e,r,"","",function(i){return t.call(n,i,l++)}),r}function Hf(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var we={current:null},yl={transition:null},Vf={ReactCurrentDispatcher:we,ReactCurrentBatchConfig:yl,ReactCurrentOwner:io};function Vu(){throw Error("act(...) is not supported in production builds of React.")}M.Children={map:Zr,forEach:function(e,t,n){Zr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Zr(e,function(){t++}),t},toArray:function(e){return Zr(e,function(t){return t})||[]},only:function(e){if(!oo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};M.Component=Wn;M.Fragment=Rf;M.Profiler=zf;M.PureComponent=lo;M.StrictMode=Df;M.Suspense=Mf;M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vf;M.act=Vu;M.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Au({},e.props),l=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=io.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)Wu.call(t,u)&&!Bu.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var c=0;c<u;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Ur,type:e.type,key:l,ref:i,props:r,_owner:o}};M.createContext=function(e){return e={$$typeof:Of,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:If,_context:e},e.Consumer=e};M.createElement=Hu;M.createFactory=function(e){var t=Hu.bind(null,e);return t.type=e,t};M.createRef=function(){return{current:null}};M.forwardRef=function(e){return{$$typeof:Ff,render:e}};M.isValidElement=oo;M.lazy=function(e){return{$$typeof:bf,_payload:{_status:-1,_result:e},_init:Hf}};M.memo=function(e,t){return{$$typeof:Af,type:e,compare:t===void 0?null:t}};M.startTransition=function(e){var t=yl.transition;yl.transition={};try{e()}finally{yl.transition=t}};M.unstable_act=Vu;M.useCallback=function(e,t){return we.current.useCallback(e,t)};M.useContext=function(e){return we.current.useContext(e)};M.useDebugValue=function(){};M.useDeferredValue=function(e){return we.current.useDeferredValue(e)};M.useEffect=function(e,t){return we.current.useEffect(e,t)};M.useId=function(){return we.current.useId()};M.useImperativeHandle=function(e,t,n){return we.current.useImperativeHandle(e,t,n)};M.useInsertionEffect=function(e,t){return we.current.useInsertionEffect(e,t)};M.useLayoutEffect=function(e,t){return we.current.useLayoutEffect(e,t)};M.useMemo=function(e,t){return we.current.useMemo(e,t)};M.useReducer=function(e,t,n){return we.current.useReducer(e,t,n)};M.useRef=function(e){return we.current.useRef(e)};M.useState=function(e){return we.current.useState(e)};M.useSyncExternalStore=function(e,t,n){return we.current.useSyncExternalStore(e,t,n)};M.useTransition=function(){return we.current.useTransition()};M.version="18.3.1";Fu.exports=M;var P=Fu.exports;const Rs=_f(P);/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its 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 Qf=P,Kf=Symbol.for("react.element"),Yf=Symbol.for("react.fragment"),Gf=Object.prototype.hasOwnProperty,Xf=Qf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,qf={key:!0,ref:!0,__self:!0,__source:!0};function Qu(e,t,n){var r,l={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Gf.call(t,r)&&!qf.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:Kf,type:e,key:i,ref:o,props:l,_owner:Xf.current}}ls.Fragment=Yf;ls.jsx=Qu;ls.jsxs=Qu;Ou.exports=ls;var s=Ou.exports,Ku={exports:{}},Ie={},Yu={exports:{}},Gu={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its 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
- */(function(e){function t($,I){var F=$.length;$.push(I);e:for(;0<F;){var ne=F-1>>>1,ae=$[ne];if(0<l(ae,I))$[ne]=I,$[F]=ae,F=ne;else break e}}function n($){return $.length===0?null:$[0]}function r($){if($.length===0)return null;var I=$[0],F=$.pop();if(F!==I){$[0]=F;e:for(var ne=0,ae=$.length,qr=ae>>>1;ne<qr;){var Vt=2*(ne+1)-1,_s=$[Vt],Qt=Vt+1,Jr=$[Qt];if(0>l(_s,F))Qt<ae&&0>l(Jr,_s)?($[ne]=Jr,$[Qt]=F,ne=Qt):($[ne]=_s,$[Vt]=F,ne=Vt);else if(Qt<ae&&0>l(Jr,F))$[ne]=Jr,$[Qt]=F,ne=Qt;else break e}}return I}function l($,I){var F=$.sortIndex-I.sortIndex;return F!==0?F:$.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var u=[],c=[],h=1,g=null,m=3,y=!1,k=!1,v=!1,O=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p($){for(var I=n(c);I!==null;){if(I.callback===null)r(c);else if(I.startTime<=$)r(c),I.sortIndex=I.expirationTime,t(u,I);else break;I=n(c)}}function x($){if(v=!1,p($),!k)if(n(u)!==null)k=!0,Ps(N);else{var I=n(c);I!==null&&Ts(x,I.startTime-$)}}function N($,I){k=!1,v&&(v=!1,f(L),L=-1),y=!0;var F=m;try{for(p(I),g=n(u);g!==null&&(!(g.expirationTime>I)||$&&!Ke());){var ne=g.callback;if(typeof ne=="function"){g.callback=null,m=g.priorityLevel;var ae=ne(g.expirationTime<=I);I=e.unstable_now(),typeof ae=="function"?g.callback=ae:g===n(u)&&r(u),p(I)}else r(u);g=n(u)}if(g!==null)var qr=!0;else{var Vt=n(c);Vt!==null&&Ts(x,Vt.startTime-I),qr=!1}return qr}finally{g=null,m=F,y=!1}}var T=!1,_=null,L=-1,te=5,A=-1;function Ke(){return!(e.unstable_now()-A<te)}function Xn(){if(_!==null){var $=e.unstable_now();A=$;var I=!0;try{I=_(!0,$)}finally{I?qn():(T=!1,_=null)}}else T=!1}var qn;if(typeof d=="function")qn=function(){d(Xn)};else if(typeof MessageChannel<"u"){var fa=new MessageChannel,Tf=fa.port2;fa.port1.onmessage=Xn,qn=function(){Tf.postMessage(null)}}else qn=function(){O(Xn,0)};function Ps($){_=$,T||(T=!0,qn())}function Ts($,I){L=O(function(){$(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function($){$.callback=null},e.unstable_continueExecution=function(){k||y||(k=!0,Ps(N))},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function($){switch(m){case 1:case 2:case 3:var I=3;break;default:I=m}var F=m;m=I;try{return $()}finally{m=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,I){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var F=m;m=$;try{return I()}finally{m=F}},e.unstable_scheduleCallback=function($,I,F){var ne=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?ne+F:ne):F=ne,$){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=F+ae,$={id:h++,callback:I,priorityLevel:$,startTime:F,expirationTime:ae,sortIndex:-1},F>ne?($.sortIndex=F,t(c,$),n(u)===null&&$===n(c)&&(v?(f(L),L=-1):v=!0,Ts(x,F-ne))):($.sortIndex=ae,t(u,$),k||y||(k=!0,Ps(N))),$},e.unstable_shouldYield=Ke,e.unstable_wrapCallback=function($){var I=m;return function(){var F=m;m=I;try{return $.apply(this,arguments)}finally{m=F}}}})(Gu);Yu.exports=Gu;var Jf=Yu.exports;/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its 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 Zf=P,ze=Jf;function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);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."}var Xu=new Set,wr={};function un(e,t){Dn(e,t),Dn(e+"Capture",t)}function Dn(e,t){for(wr[e]=t,e=0;e<t.length;e++)Xu.add(t[e])}var vt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),oi=Object.prototype.hasOwnProperty,eh=/^[: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]*$/,va={},ga={};function th(e){return oi.call(ga,e)?!0:oi.call(va,e)?!1:eh.test(e)?ga[e]=!0:(va[e]=!0,!1)}function nh(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function rh(e,t,n,r){if(t===null||typeof t>"u"||nh(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Se(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pe[e]=new Se(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pe[t]=new Se(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pe[e]=new Se(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pe[e]=new Se(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){pe[e]=new Se(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pe[e]=new Se(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pe[e]=new Se(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pe[e]=new Se(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pe[e]=new Se(e,5,!1,e.toLowerCase(),null,!1,!1)});var ao=/[\-:]([a-z])/g;function uo(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ao,uo);pe[t]=new Se(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ao,uo);pe[t]=new Se(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ao,uo);pe[t]=new Se(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pe[e]=new Se(e,1,!1,e.toLowerCase(),null,!1,!1)});pe.xlinkHref=new Se("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pe[e]=new Se(e,1,!1,e.toLowerCase(),null,!0,!0)});function co(e,t,n,r){var l=pe.hasOwnProperty(t)?pe[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(rh(t,n,l,r)&&(n=null),r||l===null?th(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var jt=Zf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,el=Symbol.for("react.element"),pn=Symbol.for("react.portal"),mn=Symbol.for("react.fragment"),fo=Symbol.for("react.strict_mode"),ai=Symbol.for("react.profiler"),qu=Symbol.for("react.provider"),Ju=Symbol.for("react.context"),ho=Symbol.for("react.forward_ref"),ui=Symbol.for("react.suspense"),ci=Symbol.for("react.suspense_list"),po=Symbol.for("react.memo"),St=Symbol.for("react.lazy"),Zu=Symbol.for("react.offscreen"),ya=Symbol.iterator;function Jn(e){return e===null||typeof e!="object"?null:(e=ya&&e[ya]||e["@@iterator"],typeof e=="function"?e:null)}var J=Object.assign,Ds;function ir(e){if(Ds===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ds=t&&t[1]||""}return`
34
- `+Ds+e}var zs=!1;function Is(e,t){if(!e||zs)return"";zs=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var l=c.stack.split(`
35
- `),i=r.stack.split(`
36
- `),o=l.length-1,a=i.length-1;1<=o&&0<=a&&l[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(l[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||l[o]!==i[a]){var u=`
37
- `+l[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=o&&0<=a);break}}}finally{zs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ir(e):""}function lh(e){switch(e.tag){case 5:return ir(e.type);case 16:return ir("Lazy");case 13:return ir("Suspense");case 19:return ir("SuspenseList");case 0:case 2:case 15:return e=Is(e.type,!1),e;case 11:return e=Is(e.type.render,!1),e;case 1:return e=Is(e.type,!0),e;default:return""}}function di(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case mn:return"Fragment";case pn:return"Portal";case ai:return"Profiler";case fo:return"StrictMode";case ui:return"Suspense";case ci:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ju:return(e.displayName||"Context")+".Consumer";case qu:return(e._context.displayName||"Context")+".Provider";case ho:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case po:return t=e.displayName||null,t!==null?t:di(e.type)||"Memo";case St:t=e._payload,e=e._init;try{return di(e(t))}catch{}}return null}function sh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return di(t);case 8:return t===fo?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function At(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ec(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ih(e){var t=ec(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tl(e){e._valueTracker||(e._valueTracker=ih(e))}function tc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ec(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function _l(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}}function fi(e,t){var n=t.checked;return J({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function xa(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=At(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function nc(e,t){t=t.checked,t!=null&&co(e,"checked",t,!1)}function hi(e,t){nc(e,t);var n=At(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pi(e,t.type,n):t.hasOwnProperty("defaultValue")&&pi(e,t.type,At(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ja(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function pi(e,t,n){(t!=="number"||_l(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var or=Array.isArray;function En(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+At(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function mi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(j(91));return J({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ka(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(j(92));if(or(n)){if(1<n.length)throw Error(j(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:At(n)}}function rc(e,t){var n=At(t.value),r=At(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function wa(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function lc(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function vi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?lc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var nl,sc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(nl=nl||document.createElement("div"),nl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=nl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Sr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},oh=["Webkit","ms","Moz","O"];Object.keys(cr).forEach(function(e){oh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),cr[t]=cr[e]})});function ic(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||cr.hasOwnProperty(e)&&cr[e]?(""+t).trim():t+"px"}function oc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=ic(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var ah=J({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gi(e,t){if(t){if(ah[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function yi(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 xi=null;function mo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ji=null,$n=null,Pn=null;function Sa(e){if(e=Hr(e)){if(typeof ji!="function")throw Error(j(280));var t=e.stateNode;t&&(t=us(t),ji(e.stateNode,e.type,t))}}function ac(e){$n?Pn?Pn.push(e):Pn=[e]:$n=e}function uc(){if($n){var e=$n,t=Pn;if(Pn=$n=null,Sa(e),t)for(e=0;e<t.length;e++)Sa(t[e])}}function cc(e,t){return e(t)}function dc(){}var Os=!1;function fc(e,t,n){if(Os)return e(t,n);Os=!0;try{return cc(e,t,n)}finally{Os=!1,($n!==null||Pn!==null)&&(dc(),uc())}}function Nr(e,t){var n=e.stateNode;if(n===null)return null;var r=us(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(j(231,t,typeof n));return n}var ki=!1;if(vt)try{var Zn={};Object.defineProperty(Zn,"passive",{get:function(){ki=!0}}),window.addEventListener("test",Zn,Zn),window.removeEventListener("test",Zn,Zn)}catch{ki=!1}function uh(e,t,n,r,l,i,o,a,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(h){this.onError(h)}}var dr=!1,Ll=null,Rl=!1,wi=null,ch={onError:function(e){dr=!0,Ll=e}};function dh(e,t,n,r,l,i,o,a,u){dr=!1,Ll=null,uh.apply(ch,arguments)}function fh(e,t,n,r,l,i,o,a,u){if(dh.apply(this,arguments),dr){if(dr){var c=Ll;dr=!1,Ll=null}else throw Error(j(198));Rl||(Rl=!0,wi=c)}}function cn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function hc(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 Na(e){if(cn(e)!==e)throw Error(j(188))}function hh(e){var t=e.alternate;if(!t){if(t=cn(e),t===null)throw Error(j(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return Na(l),e;if(i===r)return Na(l),t;i=i.sibling}throw Error(j(188))}if(n.return!==r.return)n=l,r=i;else{for(var o=!1,a=l.child;a;){if(a===n){o=!0,n=l,r=i;break}if(a===r){o=!0,r=l,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=l;break}if(a===r){o=!0,r=i,n=l;break}a=a.sibling}if(!o)throw Error(j(189))}}if(n.alternate!==r)throw Error(j(190))}if(n.tag!==3)throw Error(j(188));return n.stateNode.current===n?e:t}function pc(e){return e=hh(e),e!==null?mc(e):null}function mc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=mc(e);if(t!==null)return t;e=e.sibling}return null}var vc=ze.unstable_scheduleCallback,Ca=ze.unstable_cancelCallback,ph=ze.unstable_shouldYield,mh=ze.unstable_requestPaint,le=ze.unstable_now,vh=ze.unstable_getCurrentPriorityLevel,vo=ze.unstable_ImmediatePriority,gc=ze.unstable_UserBlockingPriority,Dl=ze.unstable_NormalPriority,gh=ze.unstable_LowPriority,yc=ze.unstable_IdlePriority,ss=null,st=null;function yh(e){if(st&&typeof st.onCommitFiberRoot=="function")try{st.onCommitFiberRoot(ss,e,void 0,(e.current.flags&128)===128)}catch{}}var Je=Math.clz32?Math.clz32:kh,xh=Math.log,jh=Math.LN2;function kh(e){return e>>>=0,e===0?32:31-(xh(e)/jh|0)|0}var rl=64,ll=4194304;function ar(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function zl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~l;a!==0?r=ar(a):(i&=o,i!==0&&(r=ar(i)))}else o=n&~l,o!==0?r=ar(o):i!==0&&(r=ar(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Je(t),l=1<<n,r|=e[n],t&=~l;return r}function wh(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Sh(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Je(i),a=1<<o,u=l[o];u===-1?(!(a&n)||a&r)&&(l[o]=wh(a,t)):u<=t&&(e.expiredLanes|=a),i&=~a}}function Si(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function xc(){var e=rl;return rl<<=1,!(rl&4194240)&&(rl=64),e}function Fs(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Je(t),e[t]=n}function Nh(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-Je(n),i=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~i}}function go(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Je(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var B=0;function jc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var kc,yo,wc,Sc,Nc,Ni=!1,sl=[],_t=null,Lt=null,Rt=null,Cr=new Map,Er=new Map,Ct=[],Ch="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 submit".split(" ");function Ea(e,t){switch(e){case"focusin":case"focusout":_t=null;break;case"dragenter":case"dragleave":Lt=null;break;case"mouseover":case"mouseout":Rt=null;break;case"pointerover":case"pointerout":Cr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Er.delete(t.pointerId)}}function er(e,t,n,r,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[l]},t!==null&&(t=Hr(t),t!==null&&yo(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Eh(e,t,n,r,l){switch(t){case"focusin":return _t=er(_t,e,t,n,r,l),!0;case"dragenter":return Lt=er(Lt,e,t,n,r,l),!0;case"mouseover":return Rt=er(Rt,e,t,n,r,l),!0;case"pointerover":var i=l.pointerId;return Cr.set(i,er(Cr.get(i)||null,e,t,n,r,l)),!0;case"gotpointercapture":return i=l.pointerId,Er.set(i,er(Er.get(i)||null,e,t,n,r,l)),!0}return!1}function Cc(e){var t=Xt(e.target);if(t!==null){var n=cn(t);if(n!==null){if(t=n.tag,t===13){if(t=hc(n),t!==null){e.blockedOn=t,Nc(e.priority,function(){wc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ci(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xi=r,n.target.dispatchEvent(r),xi=null}else return t=Hr(n),t!==null&&yo(t),e.blockedOn=n,!1;t.shift()}return!0}function $a(e,t,n){xl(e)&&n.delete(t)}function $h(){Ni=!1,_t!==null&&xl(_t)&&(_t=null),Lt!==null&&xl(Lt)&&(Lt=null),Rt!==null&&xl(Rt)&&(Rt=null),Cr.forEach($a),Er.forEach($a)}function tr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ni||(Ni=!0,ze.unstable_scheduleCallback(ze.unstable_NormalPriority,$h)))}function $r(e){function t(l){return tr(l,e)}if(0<sl.length){tr(sl[0],e);for(var n=1;n<sl.length;n++){var r=sl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(_t!==null&&tr(_t,e),Lt!==null&&tr(Lt,e),Rt!==null&&tr(Rt,e),Cr.forEach(t),Er.forEach(t),n=0;n<Ct.length;n++)r=Ct[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ct.length&&(n=Ct[0],n.blockedOn===null);)Cc(n),n.blockedOn===null&&Ct.shift()}var Tn=jt.ReactCurrentBatchConfig,Il=!0;function Ph(e,t,n,r){var l=B,i=Tn.transition;Tn.transition=null;try{B=1,xo(e,t,n,r)}finally{B=l,Tn.transition=i}}function Th(e,t,n,r){var l=B,i=Tn.transition;Tn.transition=null;try{B=4,xo(e,t,n,r)}finally{B=l,Tn.transition=i}}function xo(e,t,n,r){if(Il){var l=Ci(e,t,n,r);if(l===null)Ks(e,t,r,Ol,n),Ea(e,r);else if(Eh(l,e,t,n,r))r.stopPropagation();else if(Ea(e,r),t&4&&-1<Ch.indexOf(e)){for(;l!==null;){var i=Hr(l);if(i!==null&&kc(i),i=Ci(e,t,n,r),i===null&&Ks(e,t,r,Ol,n),i===l)break;l=i}l!==null&&r.stopPropagation()}else Ks(e,t,r,null,n)}}var Ol=null;function Ci(e,t,n,r){if(Ol=null,e=mo(r),e=Xt(e),e!==null)if(t=cn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=hc(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ol=e,null}function Ec(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(vh()){case vo:return 1;case gc:return 4;case Dl:case gh:return 16;case yc:return 536870912;default:return 16}default:return 16}}var $t=null,jo=null,jl=null;function $c(){if(jl)return jl;var e,t=jo,n=t.length,r,l="value"in $t?$t.value:$t.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===l[i-r];r++);return jl=l.slice(e,1<r?1-r:void 0)}function kl(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 il(){return!0}function Pa(){return!1}function Oe(e){function t(n,r,l,i,o){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?il:Pa,this.isPropagationStopped=Pa,this}return J(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=il)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=il)},persist:function(){},isPersistent:il}),t}var Bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ko=Oe(Bn),Br=J({},Bn,{view:0,detail:0}),_h=Oe(Br),Ms,As,nr,is=J({},Br,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wo,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!==nr&&(nr&&e.type==="mousemove"?(Ms=e.screenX-nr.screenX,As=e.screenY-nr.screenY):As=Ms=0,nr=e),Ms)},movementY:function(e){return"movementY"in e?e.movementY:As}}),Ta=Oe(is),Lh=J({},is,{dataTransfer:0}),Rh=Oe(Lh),Dh=J({},Br,{relatedTarget:0}),bs=Oe(Dh),zh=J({},Bn,{animationName:0,elapsedTime:0,pseudoElement:0}),Ih=Oe(zh),Oh=J({},Bn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fh=Oe(Oh),Mh=J({},Bn,{data:0}),_a=Oe(Mh),Ah={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bh={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"},Uh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Wh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Uh[e])?!!t[e]:!1}function wo(){return Wh}var Bh=J({},Br,{key:function(e){if(e.key){var t=Ah[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=kl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wo,charCode:function(e){return e.type==="keypress"?kl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?kl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Hh=Oe(Bh),Vh=J({},is,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),La=Oe(Vh),Qh=J({},Br,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wo}),Kh=Oe(Qh),Yh=J({},Bn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gh=Oe(Yh),Xh=J({},is,{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}),qh=Oe(Xh),Jh=[9,13,27,32],So=vt&&"CompositionEvent"in window,fr=null;vt&&"documentMode"in document&&(fr=document.documentMode);var Zh=vt&&"TextEvent"in window&&!fr,Pc=vt&&(!So||fr&&8<fr&&11>=fr),Ra=" ",Da=!1;function Tc(e,t){switch(e){case"keyup":return Jh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _c(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vn=!1;function ep(e,t){switch(e){case"compositionend":return _c(t);case"keypress":return t.which!==32?null:(Da=!0,Ra);case"textInput":return e=t.data,e===Ra&&Da?null:e;default:return null}}function tp(e,t){if(vn)return e==="compositionend"||!So&&Tc(e,t)?(e=$c(),jl=jo=$t=null,vn=!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 Pc&&t.locale!=="ko"?null:t.data;default:return null}}var np={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 za(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!np[e.type]:t==="textarea"}function Lc(e,t,n,r){ac(r),t=Fl(t,"onChange"),0<t.length&&(n=new ko("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var hr=null,Pr=null;function rp(e){Wc(e,0)}function os(e){var t=xn(e);if(tc(t))return e}function lp(e,t){if(e==="change")return t}var Rc=!1;if(vt){var Us;if(vt){var Ws="oninput"in document;if(!Ws){var Ia=document.createElement("div");Ia.setAttribute("oninput","return;"),Ws=typeof Ia.oninput=="function"}Us=Ws}else Us=!1;Rc=Us&&(!document.documentMode||9<document.documentMode)}function Oa(){hr&&(hr.detachEvent("onpropertychange",Dc),Pr=hr=null)}function Dc(e){if(e.propertyName==="value"&&os(Pr)){var t=[];Lc(t,Pr,e,mo(e)),fc(rp,t)}}function sp(e,t,n){e==="focusin"?(Oa(),hr=t,Pr=n,hr.attachEvent("onpropertychange",Dc)):e==="focusout"&&Oa()}function ip(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return os(Pr)}function op(e,t){if(e==="click")return os(t)}function ap(e,t){if(e==="input"||e==="change")return os(t)}function up(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var et=typeof Object.is=="function"?Object.is:up;function Tr(e,t){if(et(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!oi.call(t,l)||!et(e[l],t[l]))return!1}return!0}function Fa(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ma(e,t){var n=Fa(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Fa(n)}}function zc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ic(){for(var e=window,t=_l();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=_l(e.document)}return t}function No(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")}function cp(e){var t=Ic(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&zc(n.ownerDocument.documentElement,n)){if(r!==null&&No(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=Ma(n,i);var o=Ma(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var dp=vt&&"documentMode"in document&&11>=document.documentMode,gn=null,Ei=null,pr=null,$i=!1;function Aa(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$i||gn==null||gn!==_l(r)||(r=gn,"selectionStart"in r&&No(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),pr&&Tr(pr,r)||(pr=r,r=Fl(Ei,"onSelect"),0<r.length&&(t=new ko("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gn)))}function ol(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var yn={animationend:ol("Animation","AnimationEnd"),animationiteration:ol("Animation","AnimationIteration"),animationstart:ol("Animation","AnimationStart"),transitionend:ol("Transition","TransitionEnd")},Bs={},Oc={};vt&&(Oc=document.createElement("div").style,"AnimationEvent"in window||(delete yn.animationend.animation,delete yn.animationiteration.animation,delete yn.animationstart.animation),"TransitionEvent"in window||delete yn.transitionend.transition);function as(e){if(Bs[e])return Bs[e];if(!yn[e])return e;var t=yn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Oc)return Bs[e]=t[n];return e}var Fc=as("animationend"),Mc=as("animationiteration"),Ac=as("animationstart"),bc=as("transitionend"),Uc=new Map,ba="abort auxClick 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(" ");function Ut(e,t){Uc.set(e,t),un(t,[e])}for(var Hs=0;Hs<ba.length;Hs++){var Vs=ba[Hs],fp=Vs.toLowerCase(),hp=Vs[0].toUpperCase()+Vs.slice(1);Ut(fp,"on"+hp)}Ut(Fc,"onAnimationEnd");Ut(Mc,"onAnimationIteration");Ut(Ac,"onAnimationStart");Ut("dblclick","onDoubleClick");Ut("focusin","onFocus");Ut("focusout","onBlur");Ut(bc,"onTransitionEnd");Dn("onMouseEnter",["mouseout","mouseover"]);Dn("onMouseLeave",["mouseout","mouseover"]);Dn("onPointerEnter",["pointerout","pointerover"]);Dn("onPointerLeave",["pointerout","pointerover"]);un("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));un("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));un("onBeforeInput",["compositionend","keypress","textInput","paste"]);un("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));un("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));un("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ur="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(" "),pp=new Set("cancel close invalid load scroll toggle".split(" ").concat(ur));function Ua(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,fh(r,t,void 0,e),e.currentTarget=null}function Wc(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],u=a.instance,c=a.currentTarget;if(a=a.listener,u!==i&&l.isPropagationStopped())break e;Ua(l,a,c),i=u}else for(o=0;o<r.length;o++){if(a=r[o],u=a.instance,c=a.currentTarget,a=a.listener,u!==i&&l.isPropagationStopped())break e;Ua(l,a,c),i=u}}}if(Rl)throw e=wi,Rl=!1,wi=null,e}function V(e,t){var n=t[Ri];n===void 0&&(n=t[Ri]=new Set);var r=e+"__bubble";n.has(r)||(Bc(t,e,2,!1),n.add(r))}function Qs(e,t,n){var r=0;t&&(r|=4),Bc(n,e,r,t)}var al="_reactListening"+Math.random().toString(36).slice(2);function _r(e){if(!e[al]){e[al]=!0,Xu.forEach(function(n){n!=="selectionchange"&&(pp.has(n)||Qs(n,!1,e),Qs(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[al]||(t[al]=!0,Qs("selectionchange",!1,t))}}function Bc(e,t,n,r){switch(Ec(t)){case 1:var l=Ph;break;case 4:l=Th;break;default:l=xo}n=l.bind(null,t,n,e),l=void 0,!ki||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Ks(e,t,n,r,l){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===l||a.nodeType===8&&a.parentNode===l)break;if(o===4)for(o=r.return;o!==null;){var u=o.tag;if((u===3||u===4)&&(u=o.stateNode.containerInfo,u===l||u.nodeType===8&&u.parentNode===l))return;o=o.return}for(;a!==null;){if(o=Xt(a),o===null)return;if(u=o.tag,u===5||u===6){r=i=o;continue e}a=a.parentNode}}r=r.return}fc(function(){var c=i,h=mo(n),g=[];e:{var m=Uc.get(e);if(m!==void 0){var y=ko,k=e;switch(e){case"keypress":if(kl(n)===0)break e;case"keydown":case"keyup":y=Hh;break;case"focusin":k="focus",y=bs;break;case"focusout":k="blur",y=bs;break;case"beforeblur":case"afterblur":y=bs;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=Ta;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Rh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Kh;break;case Fc:case Mc:case Ac:y=Ih;break;case bc:y=Gh;break;case"scroll":y=_h;break;case"wheel":y=qh;break;case"copy":case"cut":case"paste":y=Fh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=La}var v=(t&4)!==0,O=!v&&e==="scroll",f=v?m!==null?m+"Capture":null:m;v=[];for(var d=c,p;d!==null;){p=d;var x=p.stateNode;if(p.tag===5&&x!==null&&(p=x,f!==null&&(x=Nr(d,f),x!=null&&v.push(Lr(d,x,p)))),O)break;d=d.return}0<v.length&&(m=new y(m,k,null,n,h),g.push({event:m,listeners:v}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",m&&n!==xi&&(k=n.relatedTarget||n.fromElement)&&(Xt(k)||k[gt]))break e;if((y||m)&&(m=h.window===h?h:(m=h.ownerDocument)?m.defaultView||m.parentWindow:window,y?(k=n.relatedTarget||n.toElement,y=c,k=k?Xt(k):null,k!==null&&(O=cn(k),k!==O||k.tag!==5&&k.tag!==6)&&(k=null)):(y=null,k=c),y!==k)){if(v=Ta,x="onMouseLeave",f="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(v=La,x="onPointerLeave",f="onPointerEnter",d="pointer"),O=y==null?m:xn(y),p=k==null?m:xn(k),m=new v(x,d+"leave",y,n,h),m.target=O,m.relatedTarget=p,x=null,Xt(h)===c&&(v=new v(f,d+"enter",k,n,h),v.target=p,v.relatedTarget=O,x=v),O=x,y&&k)t:{for(v=y,f=k,d=0,p=v;p;p=hn(p))d++;for(p=0,x=f;x;x=hn(x))p++;for(;0<d-p;)v=hn(v),d--;for(;0<p-d;)f=hn(f),p--;for(;d--;){if(v===f||f!==null&&v===f.alternate)break t;v=hn(v),f=hn(f)}v=null}else v=null;y!==null&&Wa(g,m,y,v,!1),k!==null&&O!==null&&Wa(g,O,k,v,!0)}}e:{if(m=c?xn(c):window,y=m.nodeName&&m.nodeName.toLowerCase(),y==="select"||y==="input"&&m.type==="file")var N=lp;else if(za(m))if(Rc)N=ap;else{N=ip;var T=sp}else(y=m.nodeName)&&y.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(N=op);if(N&&(N=N(e,c))){Lc(g,N,n,h);break e}T&&T(e,m,c),e==="focusout"&&(T=m._wrapperState)&&T.controlled&&m.type==="number"&&pi(m,"number",m.value)}switch(T=c?xn(c):window,e){case"focusin":(za(T)||T.contentEditable==="true")&&(gn=T,Ei=c,pr=null);break;case"focusout":pr=Ei=gn=null;break;case"mousedown":$i=!0;break;case"contextmenu":case"mouseup":case"dragend":$i=!1,Aa(g,n,h);break;case"selectionchange":if(dp)break;case"keydown":case"keyup":Aa(g,n,h)}var _;if(So)e:{switch(e){case"compositionstart":var L="onCompositionStart";break e;case"compositionend":L="onCompositionEnd";break e;case"compositionupdate":L="onCompositionUpdate";break e}L=void 0}else vn?Tc(e,n)&&(L="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(L="onCompositionStart");L&&(Pc&&n.locale!=="ko"&&(vn||L!=="onCompositionStart"?L==="onCompositionEnd"&&vn&&(_=$c()):($t=h,jo="value"in $t?$t.value:$t.textContent,vn=!0)),T=Fl(c,L),0<T.length&&(L=new _a(L,e,null,n,h),g.push({event:L,listeners:T}),_?L.data=_:(_=_c(n),_!==null&&(L.data=_)))),(_=Zh?ep(e,n):tp(e,n))&&(c=Fl(c,"onBeforeInput"),0<c.length&&(h=new _a("onBeforeInput","beforeinput",null,n,h),g.push({event:h,listeners:c}),h.data=_))}Wc(g,t)})}function Lr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fl(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,i=l.stateNode;l.tag===5&&i!==null&&(l=i,i=Nr(e,n),i!=null&&r.unshift(Lr(e,i,l)),i=Nr(e,t),i!=null&&r.push(Lr(e,i,l))),e=e.return}return r}function hn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Wa(e,t,n,r,l){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,u=a.alternate,c=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&c!==null&&(a=c,l?(u=Nr(n,i),u!=null&&o.unshift(Lr(n,u,a))):l||(u=Nr(n,i),u!=null&&o.push(Lr(n,u,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var mp=/\r\n?/g,vp=/\u0000|\uFFFD/g;function Ba(e){return(typeof e=="string"?e:""+e).replace(mp,`
38
- `).replace(vp,"")}function ul(e,t,n){if(t=Ba(t),Ba(e)!==t&&n)throw Error(j(425))}function Ml(){}var Pi=null,Ti=null;function _i(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Li=typeof setTimeout=="function"?setTimeout:void 0,gp=typeof clearTimeout=="function"?clearTimeout:void 0,Ha=typeof Promise=="function"?Promise:void 0,yp=typeof queueMicrotask=="function"?queueMicrotask:typeof Ha<"u"?function(e){return Ha.resolve(null).then(e).catch(xp)}:Li;function xp(e){setTimeout(function(){throw e})}function Ys(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),$r(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);$r(t)}function Dt(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==="$?")break;if(t==="/$")return null}}return e}function Va(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Hn=Math.random().toString(36).slice(2),rt="__reactFiber$"+Hn,Rr="__reactProps$"+Hn,gt="__reactContainer$"+Hn,Ri="__reactEvents$"+Hn,jp="__reactListeners$"+Hn,kp="__reactHandles$"+Hn;function Xt(e){var t=e[rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gt]||n[rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Va(e);e!==null;){if(n=e[rt])return n;e=Va(e)}return t}e=n,n=e.parentNode}return null}function Hr(e){return e=e[rt]||e[gt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function xn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function us(e){return e[Rr]||null}var Di=[],jn=-1;function Wt(e){return{current:e}}function Q(e){0>jn||(e.current=Di[jn],Di[jn]=null,jn--)}function H(e,t){jn++,Di[jn]=e.current,e.current=t}var bt={},ye=Wt(bt),Ee=Wt(!1),nn=bt;function zn(e,t){var n=e.type.contextTypes;if(!n)return bt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function $e(e){return e=e.childContextTypes,e!=null}function Al(){Q(Ee),Q(ye)}function Qa(e,t,n){if(ye.current!==bt)throw Error(j(168));H(ye,t),H(Ee,n)}function Hc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(j(108,sh(e)||"Unknown",l));return J({},n,r)}function bl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||bt,nn=ye.current,H(ye,e),H(Ee,Ee.current),!0}function Ka(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=Hc(e,t,nn),r.__reactInternalMemoizedMergedChildContext=e,Q(Ee),Q(ye),H(ye,e)):Q(Ee),H(Ee,n)}var ct=null,cs=!1,Gs=!1;function Vc(e){ct===null?ct=[e]:ct.push(e)}function wp(e){cs=!0,Vc(e)}function Bt(){if(!Gs&&ct!==null){Gs=!0;var e=0,t=B;try{var n=ct;for(B=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ct=null,cs=!1}catch(l){throw ct!==null&&(ct=ct.slice(e+1)),vc(vo,Bt),l}finally{B=t,Gs=!1}}return null}var kn=[],wn=0,Ul=null,Wl=0,Ae=[],be=0,rn=null,dt=1,ft="";function Yt(e,t){kn[wn++]=Wl,kn[wn++]=Ul,Ul=e,Wl=t}function Qc(e,t,n){Ae[be++]=dt,Ae[be++]=ft,Ae[be++]=rn,rn=e;var r=dt;e=ft;var l=32-Je(r)-1;r&=~(1<<l),n+=1;var i=32-Je(t)+l;if(30<i){var o=l-l%5;i=(r&(1<<o)-1).toString(32),r>>=o,l-=o,dt=1<<32-Je(t)+l|n<<l|r,ft=i+e}else dt=1<<i|n<<l|r,ft=e}function Co(e){e.return!==null&&(Yt(e,1),Qc(e,1,0))}function Eo(e){for(;e===Ul;)Ul=kn[--wn],kn[wn]=null,Wl=kn[--wn],kn[wn]=null;for(;e===rn;)rn=Ae[--be],Ae[be]=null,ft=Ae[--be],Ae[be]=null,dt=Ae[--be],Ae[be]=null}var De=null,Re=null,K=!1,qe=null;function Kc(e,t){var n=We(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ya(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,De=e,Re=Dt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,De=e,Re=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=rn!==null?{id:dt,overflow:ft}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=We(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,De=e,Re=null,!0):!1;default:return!1}}function zi(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ii(e){if(K){var t=Re;if(t){var n=t;if(!Ya(e,t)){if(zi(e))throw Error(j(418));t=Dt(n.nextSibling);var r=De;t&&Ya(e,t)?Kc(r,n):(e.flags=e.flags&-4097|2,K=!1,De=e)}}else{if(zi(e))throw Error(j(418));e.flags=e.flags&-4097|2,K=!1,De=e}}}function Ga(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;De=e}function cl(e){if(e!==De)return!1;if(!K)return Ga(e),K=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!_i(e.type,e.memoizedProps)),t&&(t=Re)){if(zi(e))throw Yc(),Error(j(418));for(;t;)Kc(e,t),t=Dt(t.nextSibling)}if(Ga(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Re=Dt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Re=null}}else Re=De?Dt(e.stateNode.nextSibling):null;return!0}function Yc(){for(var e=Re;e;)e=Dt(e.nextSibling)}function In(){Re=De=null,K=!1}function $o(e){qe===null?qe=[e]:qe.push(e)}var Sp=jt.ReactCurrentBatchConfig;function rr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(j(309));var r=n.stateNode}if(!r)throw Error(j(147,e));var l=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=l.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(j(284));if(!n._owner)throw Error(j(290,e))}return e}function dl(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Xa(e){var t=e._init;return t(e._payload)}function Gc(e){function t(f,d){if(e){var p=f.deletions;p===null?(f.deletions=[d],f.flags|=16):p.push(d)}}function n(f,d){if(!e)return null;for(;d!==null;)t(f,d),d=d.sibling;return null}function r(f,d){for(f=new Map;d!==null;)d.key!==null?f.set(d.key,d):f.set(d.index,d),d=d.sibling;return f}function l(f,d){return f=Ft(f,d),f.index=0,f.sibling=null,f}function i(f,d,p){return f.index=p,e?(p=f.alternate,p!==null?(p=p.index,p<d?(f.flags|=2,d):p):(f.flags|=2,d)):(f.flags|=1048576,d)}function o(f){return e&&f.alternate===null&&(f.flags|=2),f}function a(f,d,p,x){return d===null||d.tag!==6?(d=ni(p,f.mode,x),d.return=f,d):(d=l(d,p),d.return=f,d)}function u(f,d,p,x){var N=p.type;return N===mn?h(f,d,p.props.children,x,p.key):d!==null&&(d.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===St&&Xa(N)===d.type)?(x=l(d,p.props),x.ref=rr(f,d,p),x.return=f,x):(x=Pl(p.type,p.key,p.props,null,f.mode,x),x.ref=rr(f,d,p),x.return=f,x)}function c(f,d,p,x){return d===null||d.tag!==4||d.stateNode.containerInfo!==p.containerInfo||d.stateNode.implementation!==p.implementation?(d=ri(p,f.mode,x),d.return=f,d):(d=l(d,p.children||[]),d.return=f,d)}function h(f,d,p,x,N){return d===null||d.tag!==7?(d=tn(p,f.mode,x,N),d.return=f,d):(d=l(d,p),d.return=f,d)}function g(f,d,p){if(typeof d=="string"&&d!==""||typeof d=="number")return d=ni(""+d,f.mode,p),d.return=f,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case el:return p=Pl(d.type,d.key,d.props,null,f.mode,p),p.ref=rr(f,null,d),p.return=f,p;case pn:return d=ri(d,f.mode,p),d.return=f,d;case St:var x=d._init;return g(f,x(d._payload),p)}if(or(d)||Jn(d))return d=tn(d,f.mode,p,null),d.return=f,d;dl(f,d)}return null}function m(f,d,p,x){var N=d!==null?d.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return N!==null?null:a(f,d,""+p,x);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case el:return p.key===N?u(f,d,p,x):null;case pn:return p.key===N?c(f,d,p,x):null;case St:return N=p._init,m(f,d,N(p._payload),x)}if(or(p)||Jn(p))return N!==null?null:h(f,d,p,x,null);dl(f,p)}return null}function y(f,d,p,x,N){if(typeof x=="string"&&x!==""||typeof x=="number")return f=f.get(p)||null,a(d,f,""+x,N);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case el:return f=f.get(x.key===null?p:x.key)||null,u(d,f,x,N);case pn:return f=f.get(x.key===null?p:x.key)||null,c(d,f,x,N);case St:var T=x._init;return y(f,d,p,T(x._payload),N)}if(or(x)||Jn(x))return f=f.get(p)||null,h(d,f,x,N,null);dl(d,x)}return null}function k(f,d,p,x){for(var N=null,T=null,_=d,L=d=0,te=null;_!==null&&L<p.length;L++){_.index>L?(te=_,_=null):te=_.sibling;var A=m(f,_,p[L],x);if(A===null){_===null&&(_=te);break}e&&_&&A.alternate===null&&t(f,_),d=i(A,d,L),T===null?N=A:T.sibling=A,T=A,_=te}if(L===p.length)return n(f,_),K&&Yt(f,L),N;if(_===null){for(;L<p.length;L++)_=g(f,p[L],x),_!==null&&(d=i(_,d,L),T===null?N=_:T.sibling=_,T=_);return K&&Yt(f,L),N}for(_=r(f,_);L<p.length;L++)te=y(_,f,L,p[L],x),te!==null&&(e&&te.alternate!==null&&_.delete(te.key===null?L:te.key),d=i(te,d,L),T===null?N=te:T.sibling=te,T=te);return e&&_.forEach(function(Ke){return t(f,Ke)}),K&&Yt(f,L),N}function v(f,d,p,x){var N=Jn(p);if(typeof N!="function")throw Error(j(150));if(p=N.call(p),p==null)throw Error(j(151));for(var T=N=null,_=d,L=d=0,te=null,A=p.next();_!==null&&!A.done;L++,A=p.next()){_.index>L?(te=_,_=null):te=_.sibling;var Ke=m(f,_,A.value,x);if(Ke===null){_===null&&(_=te);break}e&&_&&Ke.alternate===null&&t(f,_),d=i(Ke,d,L),T===null?N=Ke:T.sibling=Ke,T=Ke,_=te}if(A.done)return n(f,_),K&&Yt(f,L),N;if(_===null){for(;!A.done;L++,A=p.next())A=g(f,A.value,x),A!==null&&(d=i(A,d,L),T===null?N=A:T.sibling=A,T=A);return K&&Yt(f,L),N}for(_=r(f,_);!A.done;L++,A=p.next())A=y(_,f,L,A.value,x),A!==null&&(e&&A.alternate!==null&&_.delete(A.key===null?L:A.key),d=i(A,d,L),T===null?N=A:T.sibling=A,T=A);return e&&_.forEach(function(Xn){return t(f,Xn)}),K&&Yt(f,L),N}function O(f,d,p,x){if(typeof p=="object"&&p!==null&&p.type===mn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case el:e:{for(var N=p.key,T=d;T!==null;){if(T.key===N){if(N=p.type,N===mn){if(T.tag===7){n(f,T.sibling),d=l(T,p.props.children),d.return=f,f=d;break e}}else if(T.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===St&&Xa(N)===T.type){n(f,T.sibling),d=l(T,p.props),d.ref=rr(f,T,p),d.return=f,f=d;break e}n(f,T);break}else t(f,T);T=T.sibling}p.type===mn?(d=tn(p.props.children,f.mode,x,p.key),d.return=f,f=d):(x=Pl(p.type,p.key,p.props,null,f.mode,x),x.ref=rr(f,d,p),x.return=f,f=x)}return o(f);case pn:e:{for(T=p.key;d!==null;){if(d.key===T)if(d.tag===4&&d.stateNode.containerInfo===p.containerInfo&&d.stateNode.implementation===p.implementation){n(f,d.sibling),d=l(d,p.children||[]),d.return=f,f=d;break e}else{n(f,d);break}else t(f,d);d=d.sibling}d=ri(p,f.mode,x),d.return=f,f=d}return o(f);case St:return T=p._init,O(f,d,T(p._payload),x)}if(or(p))return k(f,d,p,x);if(Jn(p))return v(f,d,p,x);dl(f,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,d!==null&&d.tag===6?(n(f,d.sibling),d=l(d,p),d.return=f,f=d):(n(f,d),d=ni(p,f.mode,x),d.return=f,f=d),o(f)):n(f,d)}return O}var On=Gc(!0),Xc=Gc(!1),Bl=Wt(null),Hl=null,Sn=null,Po=null;function To(){Po=Sn=Hl=null}function _o(e){var t=Bl.current;Q(Bl),e._currentValue=t}function Oi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function _n(e,t){Hl=e,Po=Sn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ce=!0),e.firstContext=null)}function Ve(e){var t=e._currentValue;if(Po!==e)if(e={context:e,memoizedValue:t,next:null},Sn===null){if(Hl===null)throw Error(j(308));Sn=e,Hl.dependencies={lanes:0,firstContext:e}}else Sn=Sn.next=e;return t}var qt=null;function Lo(e){qt===null?qt=[e]:qt.push(e)}function qc(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Lo(t)):(n.next=l.next,l.next=n),t.interleaved=n,yt(e,r)}function yt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Nt=!1;function Ro(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function pt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function zt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,b&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,yt(e,n)}return l=r.interleaved,l===null?(t.next=t,Lo(r)):(t.next=l.next,l.next=t),r.interleaved=t,yt(e,n)}function wl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,go(e,n)}}function qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Vl(e,t,n,r){var l=e.updateQueue;Nt=!1;var i=l.firstBaseUpdate,o=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var u=a,c=u.next;u.next=null,o===null?i=c:o.next=c,o=u;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==o&&(a===null?h.firstBaseUpdate=c:a.next=c,h.lastBaseUpdate=u))}if(i!==null){var g=l.baseState;o=0,h=c=u=null,a=i;do{var m=a.lane,y=a.eventTime;if((r&m)===m){h!==null&&(h=h.next={eventTime:y,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var k=e,v=a;switch(m=t,y=n,v.tag){case 1:if(k=v.payload,typeof k=="function"){g=k.call(y,g,m);break e}g=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=v.payload,m=typeof k=="function"?k.call(y,g,m):k,m==null)break e;g=J({},g,m);break e;case 2:Nt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[a]:m.push(a))}else y={eventTime:y,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(c=h=y,u=g):h=h.next=y,o|=m;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;m=a,a=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(h===null&&(u=g),l.baseState=u,l.firstBaseUpdate=c,l.lastBaseUpdate=h,t=l.shared.interleaved,t!==null){l=t;do o|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);sn|=o,e.lanes=o,e.memoizedState=g}}function Ja(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(j(191,l));l.call(r)}}}var Vr={},it=Wt(Vr),Dr=Wt(Vr),zr=Wt(Vr);function Jt(e){if(e===Vr)throw Error(j(174));return e}function Do(e,t){switch(H(zr,t),H(Dr,e),H(it,Vr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:vi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=vi(t,e)}Q(it),H(it,t)}function Fn(){Q(it),Q(Dr),Q(zr)}function Zc(e){Jt(zr.current);var t=Jt(it.current),n=vi(t,e.type);t!==n&&(H(Dr,e),H(it,n))}function zo(e){Dr.current===e&&(Q(it),Q(Dr))}var X=Wt(0);function Ql(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 Xs=[];function Io(){for(var e=0;e<Xs.length;e++)Xs[e]._workInProgressVersionPrimary=null;Xs.length=0}var Sl=jt.ReactCurrentDispatcher,qs=jt.ReactCurrentBatchConfig,ln=0,q=null,ie=null,ue=null,Kl=!1,mr=!1,Ir=0,Np=0;function me(){throw Error(j(321))}function Oo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!et(e[n],t[n]))return!1;return!0}function Fo(e,t,n,r,l,i){if(ln=i,q=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Sl.current=e===null||e.memoizedState===null?Pp:Tp,e=n(r,l),mr){i=0;do{if(mr=!1,Ir=0,25<=i)throw Error(j(301));i+=1,ue=ie=null,t.updateQueue=null,Sl.current=_p,e=n(r,l)}while(mr)}if(Sl.current=Yl,t=ie!==null&&ie.next!==null,ln=0,ue=ie=q=null,Kl=!1,t)throw Error(j(300));return e}function Mo(){var e=Ir!==0;return Ir=0,e}function nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ue===null?q.memoizedState=ue=e:ue=ue.next=e,ue}function Qe(){if(ie===null){var e=q.alternate;e=e!==null?e.memoizedState:null}else e=ie.next;var t=ue===null?q.memoizedState:ue.next;if(t!==null)ue=t,ie=e;else{if(e===null)throw Error(j(310));ie=e,e={memoizedState:ie.memoizedState,baseState:ie.baseState,baseQueue:ie.baseQueue,queue:ie.queue,next:null},ue===null?q.memoizedState=ue=e:ue=ue.next=e}return ue}function Or(e,t){return typeof t=="function"?t(e):t}function Js(e){var t=Qe(),n=t.queue;if(n===null)throw Error(j(311));n.lastRenderedReducer=e;var r=ie,l=r.baseQueue,i=n.pending;if(i!==null){if(l!==null){var o=l.next;l.next=i.next,i.next=o}r.baseQueue=l=i,n.pending=null}if(l!==null){i=l.next,r=r.baseState;var a=o=null,u=null,c=i;do{var h=c.lane;if((ln&h)===h)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var g={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(a=u=g,o=r):u=u.next=g,q.lanes|=h,sn|=h}c=c.next}while(c!==null&&c!==i);u===null?o=r:u.next=a,et(r,t.memoizedState)||(Ce=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do i=l.lane,q.lanes|=i,sn|=i,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Zs(e){var t=Qe(),n=t.queue;if(n===null)throw Error(j(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var o=l=l.next;do i=e(i,o.action),o=o.next;while(o!==l);et(i,t.memoizedState)||(Ce=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ed(){}function td(e,t){var n=q,r=Qe(),l=t(),i=!et(r.memoizedState,l);if(i&&(r.memoizedState=l,Ce=!0),r=r.queue,Ao(ld.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||ue!==null&&ue.memoizedState.tag&1){if(n.flags|=2048,Fr(9,rd.bind(null,n,r,l,t),void 0,null),de===null)throw Error(j(349));ln&30||nd(n,t,l)}return l}function nd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=q.updateQueue,t===null?(t={lastEffect:null,stores:null},q.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function rd(e,t,n,r){t.value=n,t.getSnapshot=r,sd(t)&&id(e)}function ld(e,t,n){return n(function(){sd(t)&&id(e)})}function sd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!et(e,n)}catch{return!0}}function id(e){var t=yt(e,1);t!==null&&Ze(t,e,1,-1)}function Za(e){var t=nt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:e},t.queue=e,e=e.dispatch=$p.bind(null,q,e),[t.memoizedState,e]}function Fr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=q.updateQueue,t===null?(t={lastEffect:null,stores:null},q.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function od(){return Qe().memoizedState}function Nl(e,t,n,r){var l=nt();q.flags|=e,l.memoizedState=Fr(1|t,n,void 0,r===void 0?null:r)}function ds(e,t,n,r){var l=Qe();r=r===void 0?null:r;var i=void 0;if(ie!==null){var o=ie.memoizedState;if(i=o.destroy,r!==null&&Oo(r,o.deps)){l.memoizedState=Fr(t,n,i,r);return}}q.flags|=e,l.memoizedState=Fr(1|t,n,i,r)}function eu(e,t){return Nl(8390656,8,e,t)}function Ao(e,t){return ds(2048,8,e,t)}function ad(e,t){return ds(4,2,e,t)}function ud(e,t){return ds(4,4,e,t)}function cd(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function dd(e,t,n){return n=n!=null?n.concat([e]):null,ds(4,4,cd.bind(null,t,e),n)}function bo(){}function fd(e,t){var n=Qe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hd(e,t){var n=Qe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function pd(e,t,n){return ln&21?(et(n,t)||(n=xc(),q.lanes|=n,sn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ce=!0),e.memoizedState=n)}function Cp(e,t){var n=B;B=n!==0&&4>n?n:4,e(!0);var r=qs.transition;qs.transition={};try{e(!1),t()}finally{B=n,qs.transition=r}}function md(){return Qe().memoizedState}function Ep(e,t,n){var r=Ot(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},vd(e))gd(t,n);else if(n=qc(e,t,n,r),n!==null){var l=je();Ze(n,e,r,l),yd(n,t,r)}}function $p(e,t,n){var r=Ot(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(vd(e))gd(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(l.hasEagerState=!0,l.eagerState=a,et(a,o)){var u=t.interleaved;u===null?(l.next=l,Lo(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=qc(e,t,l,r),n!==null&&(l=je(),Ze(n,e,r,l),yd(n,t,r))}}function vd(e){var t=e.alternate;return e===q||t!==null&&t===q}function gd(e,t){mr=Kl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,go(e,n)}}var Yl={readContext:Ve,useCallback:me,useContext:me,useEffect:me,useImperativeHandle:me,useInsertionEffect:me,useLayoutEffect:me,useMemo:me,useReducer:me,useRef:me,useState:me,useDebugValue:me,useDeferredValue:me,useTransition:me,useMutableSource:me,useSyncExternalStore:me,useId:me,unstable_isNewReconciler:!1},Pp={readContext:Ve,useCallback:function(e,t){return nt().memoizedState=[e,t===void 0?null:t],e},useContext:Ve,useEffect:eu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Nl(4194308,4,cd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Nl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Nl(4,2,e,t)},useMemo:function(e,t){var n=nt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=nt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ep.bind(null,q,e),[r.memoizedState,e]},useRef:function(e){var t=nt();return e={current:e},t.memoizedState=e},useState:Za,useDebugValue:bo,useDeferredValue:function(e){return nt().memoizedState=e},useTransition:function(){var e=Za(!1),t=e[0];return e=Cp.bind(null,e[1]),nt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=q,l=nt();if(K){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),de===null)throw Error(j(349));ln&30||nd(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,eu(ld.bind(null,r,i,e),[e]),r.flags|=2048,Fr(9,rd.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=nt(),t=de.identifierPrefix;if(K){var n=ft,r=dt;n=(r&~(1<<32-Je(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ir++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Np++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Tp={readContext:Ve,useCallback:fd,useContext:Ve,useEffect:Ao,useImperativeHandle:dd,useInsertionEffect:ad,useLayoutEffect:ud,useMemo:hd,useReducer:Js,useRef:od,useState:function(){return Js(Or)},useDebugValue:bo,useDeferredValue:function(e){var t=Qe();return pd(t,ie.memoizedState,e)},useTransition:function(){var e=Js(Or)[0],t=Qe().memoizedState;return[e,t]},useMutableSource:ed,useSyncExternalStore:td,useId:md,unstable_isNewReconciler:!1},_p={readContext:Ve,useCallback:fd,useContext:Ve,useEffect:Ao,useImperativeHandle:dd,useInsertionEffect:ad,useLayoutEffect:ud,useMemo:hd,useReducer:Zs,useRef:od,useState:function(){return Zs(Or)},useDebugValue:bo,useDeferredValue:function(e){var t=Qe();return ie===null?t.memoizedState=e:pd(t,ie.memoizedState,e)},useTransition:function(){var e=Zs(Or)[0],t=Qe().memoizedState;return[e,t]},useMutableSource:ed,useSyncExternalStore:td,useId:md,unstable_isNewReconciler:!1};function Ge(e,t){if(e&&e.defaultProps){t=J({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Fi(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:J({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fs={isMounted:function(e){return(e=e._reactInternals)?cn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=je(),l=Ot(e),i=pt(r,l);i.payload=t,n!=null&&(i.callback=n),t=zt(e,i,l),t!==null&&(Ze(t,e,l,r),wl(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=je(),l=Ot(e),i=pt(r,l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=zt(e,i,l),t!==null&&(Ze(t,e,l,r),wl(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=je(),r=Ot(e),l=pt(n,r);l.tag=2,t!=null&&(l.callback=t),t=zt(e,l,r),t!==null&&(Ze(t,e,r,n),wl(t,e,r))}};function tu(e,t,n,r,l,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Tr(n,r)||!Tr(l,i):!0}function xd(e,t,n){var r=!1,l=bt,i=t.contextType;return typeof i=="object"&&i!==null?i=Ve(i):(l=$e(t)?nn:ye.current,r=t.contextTypes,i=(r=r!=null)?zn(e,l):bt),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=fs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=i),t}function nu(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&fs.enqueueReplaceState(t,t.state,null)}function Mi(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Ro(e);var i=t.contextType;typeof i=="object"&&i!==null?l.context=Ve(i):(i=$e(t)?nn:ye.current,l.context=zn(e,i)),l.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Fi(e,t,i,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&fs.enqueueReplaceState(l,l.state,null),Vl(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function Mn(e,t){try{var n="",r=t;do n+=lh(r),r=r.return;while(r);var l=n}catch(i){l=`
39
- Error generating stack: `+i.message+`
40
- `+i.stack}return{value:e,source:t,stack:l,digest:null}}function ei(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ai(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Lp=typeof WeakMap=="function"?WeakMap:Map;function jd(e,t,n){n=pt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Xl||(Xl=!0,Gi=r),Ai(e,t)},n}function kd(e,t,n){n=pt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Ai(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Ai(e,t),typeof r!="function"&&(It===null?It=new Set([this]):It.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function ru(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Lp;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Vp.bind(null,e,t,n),t.then(e,e))}function lu(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function su(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=pt(-1,1),t.tag=2,zt(n,t,1))),n.lanes|=1),e)}var Rp=jt.ReactCurrentOwner,Ce=!1;function xe(e,t,n,r){t.child=e===null?Xc(t,null,n,r):On(t,e.child,n,r)}function iu(e,t,n,r,l){n=n.render;var i=t.ref;return _n(t,l),r=Fo(e,t,n,r,i,l),n=Mo(),e!==null&&!Ce?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,xt(e,t,l)):(K&&n&&Co(t),t.flags|=1,xe(e,t,r,l),t.child)}function ou(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!Yo(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,wd(e,t,i,r,l)):(e=Pl(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&l)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Tr,n(o,r)&&e.ref===t.ref)return xt(e,t,l)}return t.flags|=1,e=Ft(i,r),e.ref=t.ref,e.return=t,t.child=e}function wd(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(Tr(i,r)&&e.ref===t.ref)if(Ce=!1,t.pendingProps=r=i,(e.lanes&l)!==0)e.flags&131072&&(Ce=!0);else return t.lanes=e.lanes,xt(e,t,l)}return bi(e,t,n,r,l)}function Sd(e,t,n){var r=t.pendingProps,l=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},H(Cn,Le),Le|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,H(Cn,Le),Le|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,H(Cn,Le),Le|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,H(Cn,Le),Le|=r;return xe(e,t,l,n),t.child}function Nd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function bi(e,t,n,r,l){var i=$e(n)?nn:ye.current;return i=zn(t,i),_n(t,l),n=Fo(e,t,n,r,i,l),r=Mo(),e!==null&&!Ce?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,xt(e,t,l)):(K&&r&&Co(t),t.flags|=1,xe(e,t,n,l),t.child)}function au(e,t,n,r,l){if($e(n)){var i=!0;bl(t)}else i=!1;if(_n(t,l),t.stateNode===null)Cl(e,t),xd(t,n,r),Mi(t,n,r,l),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var u=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Ve(c):(c=$e(n)?nn:ye.current,c=zn(t,c));var h=n.getDerivedStateFromProps,g=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";g||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||u!==c)&&nu(t,o,r,c),Nt=!1;var m=t.memoizedState;o.state=m,Vl(t,r,o,l),u=t.memoizedState,a!==r||m!==u||Ee.current||Nt?(typeof h=="function"&&(Fi(t,n,h,r),u=t.memoizedState),(a=Nt||tu(t,n,a,r,m,u,c))?(g||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=r,t.memoizedState=u),o.props=r,o.state=u,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Jc(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Ge(t.type,a),o.props=c,g=t.pendingProps,m=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=Ve(u):(u=$e(n)?nn:ye.current,u=zn(t,u));var y=n.getDerivedStateFromProps;(h=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==g||m!==u)&&nu(t,o,r,u),Nt=!1,m=t.memoizedState,o.state=m,Vl(t,r,o,l);var k=t.memoizedState;a!==g||m!==k||Ee.current||Nt?(typeof y=="function"&&(Fi(t,n,y,r),k=t.memoizedState),(c=Nt||tu(t,n,c,r,m,k,u)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,k,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,k,u)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=k),o.props=r,o.state=k,o.context=u,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return Ui(e,t,n,r,i,l)}function Ui(e,t,n,r,l,i){Nd(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return l&&Ka(t,n,!1),xt(e,t,i);r=t.stateNode,Rp.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=On(t,e.child,null,i),t.child=On(t,null,a,i)):xe(e,t,a,i),t.memoizedState=r.state,l&&Ka(t,n,!0),t.child}function Cd(e){var t=e.stateNode;t.pendingContext?Qa(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Qa(e,t.context,!1),Do(e,t.containerInfo)}function uu(e,t,n,r,l){return In(),$o(l),t.flags|=256,xe(e,t,n,r),t.child}var Wi={dehydrated:null,treeContext:null,retryLane:0};function Bi(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ed(e,t,n){var r=t.pendingProps,l=X.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(l&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),H(X,l&1),e===null)return Ii(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=ms(o,r,0,null),e=tn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Bi(n),t.memoizedState=Wi,e):Uo(t,o));if(l=e.memoizedState,l!==null&&(a=l.dehydrated,a!==null))return Dp(e,t,o,r,a,l,n);if(i){i=r.fallback,o=t.mode,l=e.child,a=l.sibling;var u={mode:"hidden",children:r.children};return!(o&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Ft(l,u),r.subtreeFlags=l.subtreeFlags&14680064),a!==null?i=Ft(a,i):(i=tn(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Bi(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Wi,r}return i=e.child,e=i.sibling,r=Ft(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Uo(e,t){return t=ms({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function fl(e,t,n,r){return r!==null&&$o(r),On(t,e.child,null,n),e=Uo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dp(e,t,n,r,l,i,o){if(n)return t.flags&256?(t.flags&=-257,r=ei(Error(j(422))),fl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,l=t.mode,r=ms({mode:"visible",children:r.children},l,0,null),i=tn(i,l,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&On(t,e.child,null,o),t.child.memoizedState=Bi(o),t.memoizedState=Wi,i);if(!(t.mode&1))return fl(e,t,o,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(j(419)),r=ei(i,r,void 0),fl(e,t,o,r)}if(a=(o&e.childLanes)!==0,Ce||a){if(r=de,r!==null){switch(o&-o){case 4:l=2;break;case 16:l=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|o)?0:l,l!==0&&l!==i.retryLane&&(i.retryLane=l,yt(e,l),Ze(r,e,l,-1))}return Ko(),r=ei(Error(j(421))),fl(e,t,o,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Qp.bind(null,e),l._reactRetry=t,null):(e=i.treeContext,Re=Dt(l.nextSibling),De=t,K=!0,qe=null,e!==null&&(Ae[be++]=dt,Ae[be++]=ft,Ae[be++]=rn,dt=e.id,ft=e.overflow,rn=t),t=Uo(t,r.children),t.flags|=4096,t)}function cu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Oi(e.return,t,n)}function ti(e,t,n,r,l){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=l)}function $d(e,t,n){var r=t.pendingProps,l=r.revealOrder,i=r.tail;if(xe(e,t,r.children,n),r=X.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cu(e,n,t);else if(e.tag===19)cu(e,n,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}r&=1}if(H(X,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Ql(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ti(t,!1,l,n,i);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Ql(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ti(t,!0,n,null,i);break;case"together":ti(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function xt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),sn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,n=Ft(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ft(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function zp(e,t,n){switch(t.tag){case 3:Cd(t),In();break;case 5:Zc(t);break;case 1:$e(t.type)&&bl(t);break;case 4:Do(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;H(Bl,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(H(X,X.current&1),t.flags|=128,null):n&t.child.childLanes?Ed(e,t,n):(H(X,X.current&1),e=xt(e,t,n),e!==null?e.sibling:null);H(X,X.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return $d(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),H(X,X.current),r)break;return null;case 22:case 23:return t.lanes=0,Sd(e,t,n)}return xt(e,t,n)}var Pd,Hi,Td,_d;Pd=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Hi=function(){};Td=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Jt(it.current);var i=null;switch(n){case"input":l=fi(e,l),r=fi(e,r),i=[];break;case"select":l=J({},l,{value:void 0}),r=J({},r,{value:void 0}),i=[];break;case"textarea":l=mi(e,l),r=mi(e,r),i=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ml)}gi(n,r);var o;n=null;for(c in l)if(!r.hasOwnProperty(c)&&l.hasOwnProperty(c)&&l[c]!=null)if(c==="style"){var a=l[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(wr.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var u=r[c];if(a=l?.[c],r.hasOwnProperty(c)&&u!==a&&(u!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&a[o]!==u[o]&&(n||(n={}),n[o]=u[o])}else n||(i||(i=[]),i.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(i=i||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(i=i||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(wr.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&V("scroll",e),i||a===u||(i=[])):(i=i||[]).push(c,u))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};_d=function(e,t,n,r){n!==r&&(t.flags|=4)};function lr(e,t){if(!K)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ip(e,t,n){var r=t.pendingProps;switch(Eo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ve(t),null;case 1:return $e(t.type)&&Al(),ve(t),null;case 3:return r=t.stateNode,Fn(),Q(Ee),Q(ye),Io(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(cl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qe!==null&&(Ji(qe),qe=null))),Hi(e,t),ve(t),null;case 5:zo(t);var l=Jt(zr.current);if(n=t.type,e!==null&&t.stateNode!=null)Td(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(j(166));return ve(t),null}if(e=Jt(it.current),cl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[rt]=t,r[Rr]=i,e=(t.mode&1)!==0,n){case"dialog":V("cancel",r),V("close",r);break;case"iframe":case"object":case"embed":V("load",r);break;case"video":case"audio":for(l=0;l<ur.length;l++)V(ur[l],r);break;case"source":V("error",r);break;case"img":case"image":case"link":V("error",r),V("load",r);break;case"details":V("toggle",r);break;case"input":xa(r,i),V("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},V("invalid",r);break;case"textarea":ka(r,i),V("invalid",r)}gi(n,i),l=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&ul(r.textContent,a,e),l=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&ul(r.textContent,a,e),l=["children",""+a]):wr.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&V("scroll",r)}switch(n){case"input":tl(r),ja(r,i,!0);break;case"textarea":tl(r),wa(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Ml)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=lc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[rt]=t,e[Rr]=r,Pd(e,t,!1,!1),t.stateNode=e;e:{switch(o=yi(n,r),n){case"dialog":V("cancel",e),V("close",e),l=r;break;case"iframe":case"object":case"embed":V("load",e),l=r;break;case"video":case"audio":for(l=0;l<ur.length;l++)V(ur[l],e);l=r;break;case"source":V("error",e),l=r;break;case"img":case"image":case"link":V("error",e),V("load",e),l=r;break;case"details":V("toggle",e),l=r;break;case"input":xa(e,r),l=fi(e,r),V("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=J({},r,{value:void 0}),V("invalid",e);break;case"textarea":ka(e,r),l=mi(e,r),V("invalid",e);break;default:l=r}gi(n,l),a=l;for(i in a)if(a.hasOwnProperty(i)){var u=a[i];i==="style"?oc(e,u):i==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&sc(e,u)):i==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Sr(e,u):typeof u=="number"&&Sr(e,""+u):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(wr.hasOwnProperty(i)?u!=null&&i==="onScroll"&&V("scroll",e):u!=null&&co(e,i,u,o))}switch(n){case"input":tl(e),ja(e,r,!1);break;case"textarea":tl(e),wa(e);break;case"option":r.value!=null&&e.setAttribute("value",""+At(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?En(e,!!r.multiple,i,!1):r.defaultValue!=null&&En(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Ml)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ve(t),null;case 6:if(e&&t.stateNode!=null)_d(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(j(166));if(n=Jt(zr.current),Jt(it.current),cl(t)){if(r=t.stateNode,n=t.memoizedProps,r[rt]=t,(i=r.nodeValue!==n)&&(e=De,e!==null))switch(e.tag){case 3:ul(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ul(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[rt]=t,t.stateNode=r}return ve(t),null;case 13:if(Q(X),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(K&&Re!==null&&t.mode&1&&!(t.flags&128))Yc(),In(),t.flags|=98560,i=!1;else if(i=cl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(j(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(j(317));i[rt]=t}else In(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ve(t),i=!1}else qe!==null&&(Ji(qe),qe=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||X.current&1?oe===0&&(oe=3):Ko())),t.updateQueue!==null&&(t.flags|=4),ve(t),null);case 4:return Fn(),Hi(e,t),e===null&&_r(t.stateNode.containerInfo),ve(t),null;case 10:return _o(t.type._context),ve(t),null;case 17:return $e(t.type)&&Al(),ve(t),null;case 19:if(Q(X),i=t.memoizedState,i===null)return ve(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)lr(i,!1);else{if(oe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ql(e),o!==null){for(t.flags|=128,lr(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return H(X,X.current&1|2),t.child}e=e.sibling}i.tail!==null&&le()>An&&(t.flags|=128,r=!0,lr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ql(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),lr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!K)return ve(t),null}else 2*le()-i.renderingStartTime>An&&n!==1073741824&&(t.flags|=128,r=!0,lr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=le(),t.sibling=null,n=X.current,H(X,r?n&1|2:n&1),t):(ve(t),null);case 22:case 23:return Qo(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Le&1073741824&&(ve(t),t.subtreeFlags&6&&(t.flags|=8192)):ve(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function Op(e,t){switch(Eo(t),t.tag){case 1:return $e(t.type)&&Al(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fn(),Q(Ee),Q(ye),Io(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return zo(t),null;case 13:if(Q(X),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));In()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Q(X),null;case 4:return Fn(),null;case 10:return _o(t.type._context),null;case 22:case 23:return Qo(),null;case 24:return null;default:return null}}var hl=!1,ge=!1,Fp=typeof WeakSet=="function"?WeakSet:Set,C=null;function Nn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ee(e,t,r)}else n.current=null}function Vi(e,t,n){try{n()}catch(r){ee(e,t,r)}}var du=!1;function Mp(e,t){if(Pi=Il,e=Ic(),No(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,u=-1,c=0,h=0,g=e,m=null;t:for(;;){for(var y;g!==n||l!==0&&g.nodeType!==3||(a=o+l),g!==i||r!==0&&g.nodeType!==3||(u=o+r),g.nodeType===3&&(o+=g.nodeValue.length),(y=g.firstChild)!==null;)m=g,g=y;for(;;){if(g===e)break t;if(m===n&&++c===l&&(a=o),m===i&&++h===r&&(u=o),(y=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=y}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ti={focusedElem:e,selectionRange:n},Il=!1,C=t;C!==null;)if(t=C,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,C=e;else for(;C!==null;){t=C;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var v=k.memoizedProps,O=k.memoizedState,f=t.stateNode,d=f.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ge(t.type,v),O);f.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(x){ee(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,C=e;break}C=t.return}return k=du,du=!1,k}function vr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&Vi(t,n,i)}l=l.next}while(l!==r)}}function hs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Qi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ld(e){var t=e.alternate;t!==null&&(e.alternate=null,Ld(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rt],delete t[Rr],delete t[Ri],delete t[jp],delete t[kp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Rd(e){return e.tag===5||e.tag===3||e.tag===4}function fu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rd(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.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 Ki(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ml));else if(r!==4&&(e=e.child,e!==null))for(Ki(e,t,n),e=e.sibling;e!==null;)Ki(e,t,n),e=e.sibling}function Yi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Yi(e,t,n),e=e.sibling;e!==null;)Yi(e,t,n),e=e.sibling}var fe=null,Xe=!1;function wt(e,t,n){for(n=n.child;n!==null;)Dd(e,t,n),n=n.sibling}function Dd(e,t,n){if(st&&typeof st.onCommitFiberUnmount=="function")try{st.onCommitFiberUnmount(ss,n)}catch{}switch(n.tag){case 5:ge||Nn(n,t);case 6:var r=fe,l=Xe;fe=null,wt(e,t,n),fe=r,Xe=l,fe!==null&&(Xe?(e=fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):fe.removeChild(n.stateNode));break;case 18:fe!==null&&(Xe?(e=fe,n=n.stateNode,e.nodeType===8?Ys(e.parentNode,n):e.nodeType===1&&Ys(e,n),$r(e)):Ys(fe,n.stateNode));break;case 4:r=fe,l=Xe,fe=n.stateNode.containerInfo,Xe=!0,wt(e,t,n),fe=r,Xe=l;break;case 0:case 11:case 14:case 15:if(!ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Vi(n,t,o),l=l.next}while(l!==r)}wt(e,t,n);break;case 1:if(!ge&&(Nn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ee(n,t,a)}wt(e,t,n);break;case 21:wt(e,t,n);break;case 22:n.mode&1?(ge=(r=ge)||n.memoizedState!==null,wt(e,t,n),ge=r):wt(e,t,n);break;default:wt(e,t,n)}}function hu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Fp),t.forEach(function(r){var l=Kp.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Ye(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:fe=a.stateNode,Xe=!1;break e;case 3:fe=a.stateNode.containerInfo,Xe=!0;break e;case 4:fe=a.stateNode.containerInfo,Xe=!0;break e}a=a.return}if(fe===null)throw Error(j(160));Dd(i,o,l),fe=null,Xe=!1;var u=l.alternate;u!==null&&(u.return=null),l.return=null}catch(c){ee(l,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)zd(t,e),t=t.sibling}function zd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ye(t,e),tt(e),r&4){try{vr(3,e,e.return),hs(3,e)}catch(v){ee(e,e.return,v)}try{vr(5,e,e.return)}catch(v){ee(e,e.return,v)}}break;case 1:Ye(t,e),tt(e),r&512&&n!==null&&Nn(n,n.return);break;case 5:if(Ye(t,e),tt(e),r&512&&n!==null&&Nn(n,n.return),e.flags&32){var l=e.stateNode;try{Sr(l,"")}catch(v){ee(e,e.return,v)}}if(r&4&&(l=e.stateNode,l!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&nc(l,i),yi(a,o);var c=yi(a,i);for(o=0;o<u.length;o+=2){var h=u[o],g=u[o+1];h==="style"?oc(l,g):h==="dangerouslySetInnerHTML"?sc(l,g):h==="children"?Sr(l,g):co(l,h,g,c)}switch(a){case"input":hi(l,i);break;case"textarea":rc(l,i);break;case"select":var m=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!i.multiple;var y=i.value;y!=null?En(l,!!i.multiple,y,!1):m!==!!i.multiple&&(i.defaultValue!=null?En(l,!!i.multiple,i.defaultValue,!0):En(l,!!i.multiple,i.multiple?[]:"",!1))}l[Rr]=i}catch(v){ee(e,e.return,v)}}break;case 6:if(Ye(t,e),tt(e),r&4){if(e.stateNode===null)throw Error(j(162));l=e.stateNode,i=e.memoizedProps;try{l.nodeValue=i}catch(v){ee(e,e.return,v)}}break;case 3:if(Ye(t,e),tt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{$r(t.containerInfo)}catch(v){ee(e,e.return,v)}break;case 4:Ye(t,e),tt(e);break;case 13:Ye(t,e),tt(e),l=e.child,l.flags&8192&&(i=l.memoizedState!==null,l.stateNode.isHidden=i,!i||l.alternate!==null&&l.alternate.memoizedState!==null||(Ho=le())),r&4&&hu(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(ge=(c=ge)||h,Ye(t,e),ge=c):Ye(t,e),tt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(C=e,h=e.child;h!==null;){for(g=C=h;C!==null;){switch(m=C,y=m.child,m.tag){case 0:case 11:case 14:case 15:vr(4,m,m.return);break;case 1:Nn(m,m.return);var k=m.stateNode;if(typeof k.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,k.props=t.memoizedProps,k.state=t.memoizedState,k.componentWillUnmount()}catch(v){ee(r,n,v)}}break;case 5:Nn(m,m.return);break;case 22:if(m.memoizedState!==null){mu(g);continue}}y!==null?(y.return=m,C=y):mu(g)}h=h.sibling}e:for(h=null,g=e;;){if(g.tag===5){if(h===null){h=g;try{l=g.stateNode,c?(i=l.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=g.stateNode,u=g.memoizedProps.style,o=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=ic("display",o))}catch(v){ee(e,e.return,v)}}}else if(g.tag===6){if(h===null)try{g.stateNode.nodeValue=c?"":g.memoizedProps}catch(v){ee(e,e.return,v)}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===e)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===e)break e;for(;g.sibling===null;){if(g.return===null||g.return===e)break e;h===g&&(h=null),g=g.return}h===g&&(h=null),g.sibling.return=g.return,g=g.sibling}}break;case 19:Ye(t,e),tt(e),r&4&&hu(e);break;case 21:break;default:Ye(t,e),tt(e)}}function tt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Rd(n)){var r=n;break e}n=n.return}throw Error(j(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(Sr(l,""),r.flags&=-33);var i=fu(e);Yi(e,i,l);break;case 3:case 4:var o=r.stateNode.containerInfo,a=fu(e);Ki(e,a,o);break;default:throw Error(j(161))}}catch(u){ee(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ap(e,t,n){C=e,Id(e)}function Id(e,t,n){for(var r=(e.mode&1)!==0;C!==null;){var l=C,i=l.child;if(l.tag===22&&r){var o=l.memoizedState!==null||hl;if(!o){var a=l.alternate,u=a!==null&&a.memoizedState!==null||ge;a=hl;var c=ge;if(hl=o,(ge=u)&&!c)for(C=l;C!==null;)o=C,u=o.child,o.tag===22&&o.memoizedState!==null?vu(l):u!==null?(u.return=o,C=u):vu(l);for(;i!==null;)C=i,Id(i),i=i.sibling;C=l,hl=a,ge=c}pu(e)}else l.subtreeFlags&8772&&i!==null?(i.return=l,C=i):pu(e)}}function pu(e){for(;C!==null;){var t=C;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ge||hs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ge)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:Ge(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Ja(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Ja(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var h=c.memoizedState;if(h!==null){var g=h.dehydrated;g!==null&&$r(g)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}ge||t.flags&512&&Qi(t)}catch(m){ee(t,t.return,m)}}if(t===e){C=null;break}if(n=t.sibling,n!==null){n.return=t.return,C=n;break}C=t.return}}function mu(e){for(;C!==null;){var t=C;if(t===e){C=null;break}var n=t.sibling;if(n!==null){n.return=t.return,C=n;break}C=t.return}}function vu(e){for(;C!==null;){var t=C;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{hs(4,t)}catch(u){ee(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(u){ee(t,l,u)}}var i=t.return;try{Qi(t)}catch(u){ee(t,i,u)}break;case 5:var o=t.return;try{Qi(t)}catch(u){ee(t,o,u)}}}catch(u){ee(t,t.return,u)}if(t===e){C=null;break}var a=t.sibling;if(a!==null){a.return=t.return,C=a;break}C=t.return}}var bp=Math.ceil,Gl=jt.ReactCurrentDispatcher,Wo=jt.ReactCurrentOwner,Be=jt.ReactCurrentBatchConfig,b=0,de=null,se=null,he=0,Le=0,Cn=Wt(0),oe=0,Mr=null,sn=0,ps=0,Bo=0,gr=null,Ne=null,Ho=0,An=1/0,ut=null,Xl=!1,Gi=null,It=null,pl=!1,Pt=null,ql=0,yr=0,Xi=null,El=-1,$l=0;function je(){return b&6?le():El!==-1?El:El=le()}function Ot(e){return e.mode&1?b&2&&he!==0?he&-he:Sp.transition!==null?($l===0&&($l=xc()),$l):(e=B,e!==0||(e=window.event,e=e===void 0?16:Ec(e.type)),e):1}function Ze(e,t,n,r){if(50<yr)throw yr=0,Xi=null,Error(j(185));Wr(e,n,r),(!(b&2)||e!==de)&&(e===de&&(!(b&2)&&(ps|=n),oe===4&&Et(e,he)),Pe(e,r),n===1&&b===0&&!(t.mode&1)&&(An=le()+500,cs&&Bt()))}function Pe(e,t){var n=e.callbackNode;Sh(e,t);var r=zl(e,e===de?he:0);if(r===0)n!==null&&Ca(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ca(n),t===1)e.tag===0?wp(gu.bind(null,e)):Vc(gu.bind(null,e)),yp(function(){!(b&6)&&Bt()}),n=null;else{switch(jc(r)){case 1:n=vo;break;case 4:n=gc;break;case 16:n=Dl;break;case 536870912:n=yc;break;default:n=Dl}n=Bd(n,Od.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Od(e,t){if(El=-1,$l=0,b&6)throw Error(j(327));var n=e.callbackNode;if(Ln()&&e.callbackNode!==n)return null;var r=zl(e,e===de?he:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Jl(e,r);else{t=r;var l=b;b|=2;var i=Md();(de!==e||he!==t)&&(ut=null,An=le()+500,en(e,t));do try{Bp();break}catch(a){Fd(e,a)}while(!0);To(),Gl.current=i,b=l,se!==null?t=0:(de=null,he=0,t=oe)}if(t!==0){if(t===2&&(l=Si(e),l!==0&&(r=l,t=qi(e,l))),t===1)throw n=Mr,en(e,0),Et(e,r),Pe(e,le()),n;if(t===6)Et(e,r);else{if(l=e.current.alternate,!(r&30)&&!Up(l)&&(t=Jl(e,r),t===2&&(i=Si(e),i!==0&&(r=i,t=qi(e,i))),t===1))throw n=Mr,en(e,0),Et(e,r),Pe(e,le()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(j(345));case 2:Gt(e,Ne,ut);break;case 3:if(Et(e,r),(r&130023424)===r&&(t=Ho+500-le(),10<t)){if(zl(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){je(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Li(Gt.bind(null,e,Ne,ut),t);break}Gt(e,Ne,ut);break;case 4:if(Et(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var o=31-Je(r);i=1<<o,o=t[o],o>l&&(l=o),r&=~i}if(r=l,r=le()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*bp(r/1960))-r,10<r){e.timeoutHandle=Li(Gt.bind(null,e,Ne,ut),r);break}Gt(e,Ne,ut);break;case 5:Gt(e,Ne,ut);break;default:throw Error(j(329))}}}return Pe(e,le()),e.callbackNode===n?Od.bind(null,e):null}function qi(e,t){var n=gr;return e.current.memoizedState.isDehydrated&&(en(e,t).flags|=256),e=Jl(e,t),e!==2&&(t=Ne,Ne=n,t!==null&&Ji(t)),e}function Ji(e){Ne===null?Ne=e:Ne.push.apply(Ne,e)}function Up(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],i=l.getSnapshot;l=l.value;try{if(!et(i(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Et(e,t){for(t&=~Bo,t&=~ps,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Je(t),r=1<<n;e[n]=-1,t&=~r}}function gu(e){if(b&6)throw Error(j(327));Ln();var t=zl(e,0);if(!(t&1))return Pe(e,le()),null;var n=Jl(e,t);if(e.tag!==0&&n===2){var r=Si(e);r!==0&&(t=r,n=qi(e,r))}if(n===1)throw n=Mr,en(e,0),Et(e,t),Pe(e,le()),n;if(n===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Gt(e,Ne,ut),Pe(e,le()),null}function Vo(e,t){var n=b;b|=1;try{return e(t)}finally{b=n,b===0&&(An=le()+500,cs&&Bt())}}function on(e){Pt!==null&&Pt.tag===0&&!(b&6)&&Ln();var t=b;b|=1;var n=Be.transition,r=B;try{if(Be.transition=null,B=1,e)return e()}finally{B=r,Be.transition=n,b=t,!(b&6)&&Bt()}}function Qo(){Le=Cn.current,Q(Cn)}function en(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,gp(n)),se!==null)for(n=se.return;n!==null;){var r=n;switch(Eo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Al();break;case 3:Fn(),Q(Ee),Q(ye),Io();break;case 5:zo(r);break;case 4:Fn();break;case 13:Q(X);break;case 19:Q(X);break;case 10:_o(r.type._context);break;case 22:case 23:Qo()}n=n.return}if(de=e,se=e=Ft(e.current,null),he=Le=t,oe=0,Mr=null,Bo=ps=sn=0,Ne=gr=null,qt!==null){for(t=0;t<qt.length;t++)if(n=qt[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=l,r.next=o}n.pending=r}qt=null}return e}function Fd(e,t){do{var n=se;try{if(To(),Sl.current=Yl,Kl){for(var r=q.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}Kl=!1}if(ln=0,ue=ie=q=null,mr=!1,Ir=0,Wo.current=null,n===null||n.return===null){oe=1,Mr=t,se=null;break}e:{var i=e,o=n.return,a=n,u=t;if(t=he,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,h=a,g=h.tag;if(!(h.mode&1)&&(g===0||g===11||g===15)){var m=h.alternate;m?(h.updateQueue=m.updateQueue,h.memoizedState=m.memoizedState,h.lanes=m.lanes):(h.updateQueue=null,h.memoizedState=null)}var y=lu(o);if(y!==null){y.flags&=-257,su(y,o,a,i,t),y.mode&1&&ru(i,c,t),t=y,u=c;var k=t.updateQueue;if(k===null){var v=new Set;v.add(u),t.updateQueue=v}else k.add(u);break e}else{if(!(t&1)){ru(i,c,t),Ko();break e}u=Error(j(426))}}else if(K&&a.mode&1){var O=lu(o);if(O!==null){!(O.flags&65536)&&(O.flags|=256),su(O,o,a,i,t),$o(Mn(u,a));break e}}i=u=Mn(u,a),oe!==4&&(oe=2),gr===null?gr=[i]:gr.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var f=jd(i,u,t);qa(i,f);break e;case 1:a=u;var d=i.type,p=i.stateNode;if(!(i.flags&128)&&(typeof d.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(It===null||!It.has(p)))){i.flags|=65536,t&=-t,i.lanes|=t;var x=kd(i,a,t);qa(i,x);break e}}i=i.return}while(i!==null)}bd(n)}catch(N){t=N,se===n&&n!==null&&(se=n=n.return);continue}break}while(!0)}function Md(){var e=Gl.current;return Gl.current=Yl,e===null?Yl:e}function Ko(){(oe===0||oe===3||oe===2)&&(oe=4),de===null||!(sn&268435455)&&!(ps&268435455)||Et(de,he)}function Jl(e,t){var n=b;b|=2;var r=Md();(de!==e||he!==t)&&(ut=null,en(e,t));do try{Wp();break}catch(l){Fd(e,l)}while(!0);if(To(),b=n,Gl.current=r,se!==null)throw Error(j(261));return de=null,he=0,oe}function Wp(){for(;se!==null;)Ad(se)}function Bp(){for(;se!==null&&!ph();)Ad(se)}function Ad(e){var t=Wd(e.alternate,e,Le);e.memoizedProps=e.pendingProps,t===null?bd(e):se=t,Wo.current=null}function bd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Op(n,t),n!==null){n.flags&=32767,se=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{oe=6,se=null;return}}else if(n=Ip(n,t,Le),n!==null){se=n;return}if(t=t.sibling,t!==null){se=t;return}se=t=e}while(t!==null);oe===0&&(oe=5)}function Gt(e,t,n){var r=B,l=Be.transition;try{Be.transition=null,B=1,Hp(e,t,n,r)}finally{Be.transition=l,B=r}return null}function Hp(e,t,n,r){do Ln();while(Pt!==null);if(b&6)throw Error(j(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(j(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Nh(e,i),e===de&&(se=de=null,he=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||pl||(pl=!0,Bd(Dl,function(){return Ln(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Be.transition,Be.transition=null;var o=B;B=1;var a=b;b|=4,Wo.current=null,Mp(e,n),zd(n,e),cp(Ti),Il=!!Pi,Ti=Pi=null,e.current=n,Ap(n),mh(),b=a,B=o,Be.transition=i}else e.current=n;if(pl&&(pl=!1,Pt=e,ql=l),i=e.pendingLanes,i===0&&(It=null),yh(n.stateNode),Pe(e,le()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(Xl)throw Xl=!1,e=Gi,Gi=null,e;return ql&1&&e.tag!==0&&Ln(),i=e.pendingLanes,i&1?e===Xi?yr++:(yr=0,Xi=e):yr=0,Bt(),null}function Ln(){if(Pt!==null){var e=jc(ql),t=Be.transition,n=B;try{if(Be.transition=null,B=16>e?16:e,Pt===null)var r=!1;else{if(e=Pt,Pt=null,ql=0,b&6)throw Error(j(331));var l=b;for(b|=4,C=e.current;C!==null;){var i=C,o=i.child;if(C.flags&16){var a=i.deletions;if(a!==null){for(var u=0;u<a.length;u++){var c=a[u];for(C=c;C!==null;){var h=C;switch(h.tag){case 0:case 11:case 15:vr(8,h,i)}var g=h.child;if(g!==null)g.return=h,C=g;else for(;C!==null;){h=C;var m=h.sibling,y=h.return;if(Ld(h),h===c){C=null;break}if(m!==null){m.return=y,C=m;break}C=y}}}var k=i.alternate;if(k!==null){var v=k.child;if(v!==null){k.child=null;do{var O=v.sibling;v.sibling=null,v=O}while(v!==null)}}C=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,C=o;else e:for(;C!==null;){if(i=C,i.flags&2048)switch(i.tag){case 0:case 11:case 15:vr(9,i,i.return)}var f=i.sibling;if(f!==null){f.return=i.return,C=f;break e}C=i.return}}var d=e.current;for(C=d;C!==null;){o=C;var p=o.child;if(o.subtreeFlags&2064&&p!==null)p.return=o,C=p;else e:for(o=d;C!==null;){if(a=C,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:hs(9,a)}}catch(N){ee(a,a.return,N)}if(a===o){C=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,C=x;break e}C=a.return}}if(b=l,Bt(),st&&typeof st.onPostCommitFiberRoot=="function")try{st.onPostCommitFiberRoot(ss,e)}catch{}r=!0}return r}finally{B=n,Be.transition=t}}return!1}function yu(e,t,n){t=Mn(n,t),t=jd(e,t,1),e=zt(e,t,1),t=je(),e!==null&&(Wr(e,1,t),Pe(e,t))}function ee(e,t,n){if(e.tag===3)yu(e,e,n);else for(;t!==null;){if(t.tag===3){yu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(It===null||!It.has(r))){e=Mn(n,e),e=kd(t,e,1),t=zt(t,e,1),e=je(),t!==null&&(Wr(t,1,e),Pe(t,e));break}}t=t.return}}function Vp(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=je(),e.pingedLanes|=e.suspendedLanes&n,de===e&&(he&n)===n&&(oe===4||oe===3&&(he&130023424)===he&&500>le()-Ho?en(e,0):Bo|=n),Pe(e,t)}function Ud(e,t){t===0&&(e.mode&1?(t=ll,ll<<=1,!(ll&130023424)&&(ll=4194304)):t=1);var n=je();e=yt(e,t),e!==null&&(Wr(e,t,n),Pe(e,n))}function Qp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ud(e,n)}function Kp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(j(314))}r!==null&&r.delete(t),Ud(e,n)}var Wd;Wd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ee.current)Ce=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ce=!1,zp(e,t,n);Ce=!!(e.flags&131072)}else Ce=!1,K&&t.flags&1048576&&Qc(t,Wl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Cl(e,t),e=t.pendingProps;var l=zn(t,ye.current);_n(t,n),l=Fo(null,t,r,e,l,n);var i=Mo();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$e(r)?(i=!0,bl(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ro(t),l.updater=fs,t.stateNode=l,l._reactInternals=t,Mi(t,r,e,n),t=Ui(null,t,r,!0,i,n)):(t.tag=0,K&&i&&Co(t),xe(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Cl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Gp(r),e=Ge(r,e),l){case 0:t=bi(null,t,r,e,n);break e;case 1:t=au(null,t,r,e,n);break e;case 11:t=iu(null,t,r,e,n);break e;case 14:t=ou(null,t,r,Ge(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ge(r,l),bi(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ge(r,l),au(e,t,r,l,n);case 3:e:{if(Cd(t),e===null)throw Error(j(387));r=t.pendingProps,i=t.memoizedState,l=i.element,Jc(e,t),Vl(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=Mn(Error(j(423)),t),t=uu(e,t,r,n,l);break e}else if(r!==l){l=Mn(Error(j(424)),t),t=uu(e,t,r,n,l);break e}else for(Re=Dt(t.stateNode.containerInfo.firstChild),De=t,K=!0,qe=null,n=Xc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(In(),r===l){t=xt(e,t,n);break e}xe(e,t,r,n)}t=t.child}return t;case 5:return Zc(t),e===null&&Ii(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,_i(r,l)?o=null:i!==null&&_i(r,i)&&(t.flags|=32),Nd(e,t),xe(e,t,o,n),t.child;case 6:return e===null&&Ii(t),null;case 13:return Ed(e,t,n);case 4:return Do(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=On(t,null,r,n):xe(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ge(r,l),iu(e,t,r,l,n);case 7:return xe(e,t,t.pendingProps,n),t.child;case 8:return xe(e,t,t.pendingProps.children,n),t.child;case 12:return xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,H(Bl,r._currentValue),r._currentValue=o,i!==null)if(et(i.value,o)){if(i.children===l.children&&!Ee.current){t=xt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=pt(-1,n&-n),u.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?u.next=u:(u.next=h.next,h.next=u),c.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Oi(i.return,n,t),a.lanes|=n;break}u=u.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(j(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Oi(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}xe(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,_n(t,n),l=Ve(l),r=r(l),t.flags|=1,xe(e,t,r,n),t.child;case 14:return r=t.type,l=Ge(r,t.pendingProps),l=Ge(r.type,l),ou(e,t,r,l,n);case 15:return wd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ge(r,l),Cl(e,t),t.tag=1,$e(r)?(e=!0,bl(t)):e=!1,_n(t,n),xd(t,r,l),Mi(t,r,l,n),Ui(null,t,r,!0,e,n);case 19:return $d(e,t,n);case 22:return Sd(e,t,n)}throw Error(j(156,t.tag))};function Bd(e,t){return vc(e,t)}function Yp(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function We(e,t,n,r){return new Yp(e,t,n,r)}function Yo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gp(e){if(typeof e=="function")return Yo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ho)return 11;if(e===po)return 14}return 2}function Ft(e,t){var n=e.alternate;return n===null?(n=We(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pl(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")Yo(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case mn:return tn(n.children,l,i,t);case fo:o=8,l|=8;break;case ai:return e=We(12,n,t,l|2),e.elementType=ai,e.lanes=i,e;case ui:return e=We(13,n,t,l),e.elementType=ui,e.lanes=i,e;case ci:return e=We(19,n,t,l),e.elementType=ci,e.lanes=i,e;case Zu:return ms(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qu:o=10;break e;case Ju:o=9;break e;case ho:o=11;break e;case po:o=14;break e;case St:o=16,r=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=We(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function tn(e,t,n,r){return e=We(7,e,r,t),e.lanes=n,e}function ms(e,t,n,r){return e=We(22,e,r,t),e.elementType=Zu,e.lanes=n,e.stateNode={isHidden:!1},e}function ni(e,t,n){return e=We(6,e,null,t),e.lanes=n,e}function ri(e,t,n){return t=We(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xp(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fs(0),this.expirationTimes=Fs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fs(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Go(e,t,n,r,l,i,o,a,u){return e=new Xp(e,t,n,a,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=We(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ro(i),e}function qp(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:pn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Hd(e){if(!e)return bt;e=e._reactInternals;e:{if(cn(e)!==e||e.tag!==1)throw Error(j(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if($e(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(j(171))}if(e.tag===1){var n=e.type;if($e(n))return Hc(e,n,t)}return t}function Vd(e,t,n,r,l,i,o,a,u){return e=Go(n,r,!0,e,l,i,o,a,u),e.context=Hd(null),n=e.current,r=je(),l=Ot(n),i=pt(r,l),i.callback=t??null,zt(n,i,l),e.current.lanes=l,Wr(e,l,r),Pe(e,r),e}function vs(e,t,n,r){var l=t.current,i=je(),o=Ot(l);return n=Hd(n),t.context===null?t.context=n:t.pendingContext=n,t=pt(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=zt(l,t,o),e!==null&&(Ze(e,l,o,i),wl(e,l,o)),o}function Zl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function xu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Xo(e,t){xu(e,t),(e=e.alternate)&&xu(e,t)}function Jp(){return null}var Qd=typeof reportError=="function"?reportError:function(e){console.error(e)};function qo(e){this._internalRoot=e}gs.prototype.render=qo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));vs(e,t,null,null)};gs.prototype.unmount=qo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;on(function(){vs(null,e,null,null)}),t[gt]=null}};function gs(e){this._internalRoot=e}gs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Sc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ct.length&&t!==0&&t<Ct[n].priority;n++);Ct.splice(n,0,e),n===0&&Cc(e)}};function Jo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ys(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ju(){}function Zp(e,t,n,r,l){if(l){if(typeof r=="function"){var i=r;r=function(){var c=Zl(o);i.call(c)}}var o=Vd(t,r,e,0,null,!1,!1,"",ju);return e._reactRootContainer=o,e[gt]=o.current,_r(e.nodeType===8?e.parentNode:e),on(),o}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var a=r;r=function(){var c=Zl(u);a.call(c)}}var u=Go(e,0,!1,null,null,!1,!1,"",ju);return e._reactRootContainer=u,e[gt]=u.current,_r(e.nodeType===8?e.parentNode:e),on(function(){vs(t,u,n,r)}),u}function xs(e,t,n,r,l){var i=n._reactRootContainer;if(i){var o=i;if(typeof l=="function"){var a=l;l=function(){var u=Zl(o);a.call(u)}}vs(t,o,e,l)}else o=Zp(n,t,e,l,r);return Zl(o)}kc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ar(t.pendingLanes);n!==0&&(go(t,n|1),Pe(t,le()),!(b&6)&&(An=le()+500,Bt()))}break;case 13:on(function(){var r=yt(e,1);if(r!==null){var l=je();Ze(r,e,1,l)}}),Xo(e,1)}};yo=function(e){if(e.tag===13){var t=yt(e,134217728);if(t!==null){var n=je();Ze(t,e,134217728,n)}Xo(e,134217728)}};wc=function(e){if(e.tag===13){var t=Ot(e),n=yt(e,t);if(n!==null){var r=je();Ze(n,e,t,r)}Xo(e,t)}};Sc=function(){return B};Nc=function(e,t){var n=B;try{return B=e,t()}finally{B=n}};ji=function(e,t,n){switch(t){case"input":if(hi(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=us(r);if(!l)throw Error(j(90));tc(r),hi(r,l)}}}break;case"textarea":rc(e,n);break;case"select":t=n.value,t!=null&&En(e,!!n.multiple,t,!1)}};cc=Vo;dc=on;var em={usingClientEntryPoint:!1,Events:[Hr,xn,us,ac,uc,Vo]},sr={findFiberByHostInstance:Xt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},tm={bundleType:sr.bundleType,version:sr.version,rendererPackageName:sr.rendererPackageName,rendererConfig:sr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:jt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=pc(e),e===null?null:e.stateNode},findFiberByHostInstance:sr.findFiberByHostInstance||Jp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ml=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ml.isDisabled&&ml.supportsFiber)try{ss=ml.inject(tm),st=ml}catch{}}Ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=em;Ie.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Jo(t))throw Error(j(200));return qp(e,t,null,n)};Ie.createRoot=function(e,t){if(!Jo(e))throw Error(j(299));var n=!1,r="",l=Qd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Go(e,1,!1,null,null,n,!1,r,l),e[gt]=t.current,_r(e.nodeType===8?e.parentNode:e),new qo(t)};Ie.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=pc(t),e=e===null?null:e.stateNode,e};Ie.flushSync=function(e){return on(e)};Ie.hydrate=function(e,t,n){if(!ys(t))throw Error(j(200));return xs(null,e,t,!0,n)};Ie.hydrateRoot=function(e,t,n){if(!Jo(e))throw Error(j(405));var r=n!=null&&n.hydratedSources||null,l=!1,i="",o=Qd;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Vd(t,null,e,1,n??null,l,!1,i,o),e[gt]=t.current,_r(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new gs(t)};Ie.render=function(e,t,n){if(!ys(t))throw Error(j(200));return xs(null,e,t,!1,n)};Ie.unmountComponentAtNode=function(e){if(!ys(e))throw Error(j(40));return e._reactRootContainer?(on(function(){xs(null,null,e,!1,function(){e._reactRootContainer=null,e[gt]=null})}),!0):!1};Ie.unstable_batchedUpdates=Vo;Ie.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ys(n))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return xs(e,t,n,!1,r)};Ie.version="18.3.1-next-f1338f8080-20240426";function Kd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kd)}catch(e){console.error(e)}}Kd(),Ku.exports=Ie;var nm=Ku.exports,Yd,ku=nm;Yd=ku.createRoot,ku.hydrateRoot;function rm(){try{const e=/token=([0-9a-f]+)/.exec(location.hash);return e&&(sessionStorage.setItem("cohorte-token",e[1]),history.replaceState(null,"",location.pathname)),sessionStorage.getItem("cohorte-token")}catch{return null}}const es=rm();class Qr extends Error{constructor(t,n,r){super(t),this.status=n,this.body=r}}async function re(e,t={}){const n=await fetch(`/api${e}`,{method:t.method??"GET",headers:{Authorization:`Bearer ${es}`,...t.body!==void 0?{"Content-Type":"application/json"}:{}},body:t.body!==void 0?JSON.stringify(t.body):void 0}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Qr(String(r.error??`HTTP ${n.status}`),n.status,r);return r}const Z=(e,t={})=>re(e,{method:"POST",body:t}),R={state:()=>re("/state"),discover:()=>re("/discover"),commands:()=>re("/commands"),addProject:e=>Z("/projects",{path:e}),removeProject:e=>re(`/projects/${e}`,{method:"DELETE"}),project:e=>re(`/projects/${e}`),spec:(e,t)=>re(`/projects/${e}/specs/${encodeURIComponent(t)}`),git:e=>re(`/projects/${e}/git`),diffList:(e,t)=>re(`/projects/${e}/diff?worktree=${encodeURIComponent(t)}`),fileDiff:(e,t,n)=>re(`/projects/${e}/diff?worktree=${encodeURIComponent(t)}&file=${encodeURIComponent(n)}`),activity:()=>re("/activity"),metrics:e=>re(`/projects/${e}/metrics`),docker:e=>re(`/projects/${e}/docker`),dockerAct:(e,t)=>Z(`/projects/${e}/docker`,t),startDev:(e,t)=>Z(`/projects/${e}/dev`,t),createWorktree:(e,t)=>Z(`/projects/${e}/worktrees`,t),removeWorktree:(e,t)=>Z(`/projects/${e}/worktrees/remove`,t),jobLogs:(e,t,n)=>re(`/projects/${e}/jobs/${t}/logs?since=${n}`),stopJob:(e,t)=>Z(`/projects/${e}/jobs/${t}/stop`),startRun:(e,t)=>Z(`/projects/${e}/runs`,t),run:(e,t,n)=>re(`/projects/${e}/runs/${t}?since=${n}`),stopRun:(e,t)=>Z(`/projects/${e}/runs/${t}/stop`),reply:(e,t,n)=>Z(`/projects/${e}/runs/${t}/reply`,{text:n}),respond:(e,t,n)=>Z(`/projects/${e}/runs/${t}/respond`,n),inbox:()=>re("/inbox"),tickets:e=>re(`/projects/${e}/tickets`),createTicket:(e,t)=>Z(`/projects/${e}/tickets`,t),decideTicket:(e,t,n)=>Z(`/projects/${e}/tickets/${t}/decide`,{action:n}),takeTicket:(e,t,n={})=>Z(`/projects/${e}/tickets/${t}/take`,n),acceptance:(e,t,n)=>Z(`/projects/${e}/tickets/${t}/acceptance`,n),startPO:(e,t)=>Z(`/projects/${e}/po`,t),features:e=>re(`/projects/${e}/features`),feature:(e,t)=>re(`/projects/${e}/features/${t}`),checkpoint:(e,t,n)=>Z(`/projects/${e}/features/${t}/checkpoint`,n),replyLead:(e,t,n)=>Z(`/projects/${e}/features/${t}/lead`,{text:n}),merge:(e,t)=>Z(`/projects/${e}/features/${t}/merge`),contest:(e,t,n,r)=>Z(`/projects/${e}/features/${t}/decisions/${n}/contest`,{note:r}),settings:e=>re(`/projects/${e}/settings`),saveSettings:(e,t)=>Z(`/projects/${e}/settings`,t),connectObsidian:(e,t)=>Z(`/projects/${e}/tracker`,t),productMap:e=>Z(`/projects/${e}/product-map`),learning:e=>re(`/projects/${e}/learning`)},Mt=e=>e instanceof Error?e.message:String(e),lm=/^[0-9a-f]{10}$/;function Gd(e,t){const n=/^#\/p\/([^/?#]+)(?:\/([^/?#]+))?/.exec(e);return!n||!lm.test(n[1])?{projectId:null,tab:null}:{projectId:n[1],tab:n[2]&&t.includes(n[2])?n[2]:null}}function sm(e,t){return e?t&&t!=="overview"?`#/p/${e}/${t}`:`#/p/${e}`:"#/"}const wu=e=>{let t;const n=new Set,r=(c,h)=>{const g=typeof c=="function"?c(t):c;if(!Object.is(g,t)){const m=t;t=h??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(y=>y(t,m))}},l=()=>t,a={setState:r,getState:l,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c))},u=t=e(r,l,a);return a},im=e=>e?wu(e):wu,om=e=>e;function am(e,t=om){const n=Rs.useSyncExternalStore(e.subscribe,Rs.useCallback(()=>t(e.getState()),[e,t]),()=>t(e.getInitialState()));return Rs.useDebugValue(n),n}const Su=e=>{const t=im(e),n=r=>am(t,r);return Object.assign(n,t),n},Fe=e=>e?Su(e):Su,js=[["overview","Overview"],["tickets","Tickets"],["features","Features"],["specs","Specs"],["run","Run"],["worktrees","Worktrees"],["docker","Docker"],["health","Health"],["cost","Cost"],["settings","Settings"]],Xd=[],dn=e=>{Xd.push(e)},w=Fe((e,t)=>({version:"",projects:[],suggestions:[],sel:null,tab:"overview",detail:null,error:null,busy:!1,async guard(n){e({busy:!0});try{await n(),e({error:null})}catch(r){e({error:Mt(r)})}e({busy:!1})},async refresh(){const[n,r]=await Promise.all([R.state(),R.discover()]);let l=t().sel;l&&!n.projects.some(i=>i.id===l)&&(l=null),e({projects:n.projects,version:n.version,suggestions:r.suggestions,sel:l})},async loadDetail(){const n=t().sel;if(e({detail:null}),!!n)try{const r=await R.project(n);t().sel===n&&e({detail:r,error:null})}catch(r){e({error:Mt(r)})}},async reloadDetail(){const n=t().sel;if(n)try{const r=await R.project(n);t().sel===n&&e({detail:r})}catch(r){e({error:Mt(r)})}},async act(n){await t().guard(async()=>{await n(),await t().reloadDetail()})},setError:n=>e({error:n}),setTab:n=>e({tab:n})})),Kr=(e,t="overview")=>{Xd.forEach(n=>n()),w.setState({sel:e,tab:t,detail:null})},Zo=e=>!!e&&js.some(([t])=>t===e),Vn=(e,t="overview")=>w.getState().guard(async()=>{Kr(e,t),await w.getState().loadDetail()}),ea=()=>{w.getState().sel!==null&&Kr(null)},Nu=e=>w.getState().guard(async()=>{const t=await R.addProject(e);await w.getState().refresh(),Kr(t.project.id),await w.getState().loadDetail()}),um=e=>w.getState().guard(async()=>{await R.removeProject(e),Kr(null),await w.getState().refresh()}),cm=e=>w.getState().guard(async()=>{await w.getState().refresh();const{projects:t}=w.getState();e.projectId&&t.some(n=>n.id===e.projectId)&&(Kr(e.projectId,Zo(e.tab)?e.tab:"overview"),await w.getState().loadDetail())});function dm(e){const t=e.split(`
41
-
42
- `),n=t.pop()??"",r=[];for(const l of t){const i=l.split(`
43
- `).filter(o=>o.startsWith("data:")).map(o=>o.slice(5).trimStart()).join(`
44
- `);if(i)try{const o=JSON.parse(i);for(const a of Array.isArray(o)?o:[o])fm(a)&&r.push(a)}catch{}}return{events:r,rest:n}}function fm(e){if(!e||typeof e!="object")return!1;const t=e;return(t.type==="job"||t.type==="run")&&typeof t.id=="string"&&typeof t.projectId=="string"&&typeof t.status=="string"}const hm=e=>Math.min(15e3,1e3*2**Math.max(0,e));function pm({onEvents:e,onStatus:t}){let n=!1,r=null,l=0,i;const o=async()=>{r=new AbortController;try{const a=await fetch("/api/stream",{headers:{Authorization:`Bearer ${es}`,Accept:"text/event-stream"},signal:r.signal});if(!a.ok||!a.body)throw new Error(`HTTP ${a.status}`);l=0,t("live");const u=a.body.getReader(),c=new TextDecoder;let h="";for(;;){const{value:g,done:m}=await u.read();if(m)break;h+=c.decode(g,{stream:!0});const{events:y,rest:k}=dm(h);h=k,y.length&&e(y)}}catch{}n||(l+=1,t(l>=3?"polling":"reconnecting"),i=setTimeout(()=>{o()},hm(l)))};return t("connecting"),o(),()=>{n=!0,clearTimeout(i),r?.abort()}}function mm(e,t,n){return t.type!=="run"||!n?null:(t.pending??0)>(e?.pending??0)?"gate":e?.status==="running"&&(t.status==="done"||t.status==="failed")?"finished":null}const vm=(e,t,n,r)=>e==="gate"?{title:`${t} needs you`,body:`${n} is waiting for an approval or an answer`}:{title:`${t}: ${r==="failed"?"failed":"done"}`,body:n},gm=e=>e>0?`(${e}) Cohorte`:"Cohorte",bn=Fe(()=>({items:[]}));async function xr(){try{bn.setState({items:(await R.activity()).items})}catch{}}function qd(e){const t={};for(const n of e){const r=t[n.projectId]??={running:0,pending:0};r.running+=1,r.pending+=n.pending}return t}const ym=e=>e.reduce((t,n)=>t+n.pending,0),ts=Fe(()=>({git:null,error:null})),mt=Fe(()=>({wt:null,base:null,files:null,file:null,error:null}));dn(()=>{ts.setState({git:null,error:null}),mt.setState({wt:null,base:null,files:null,file:null,error:null})});async function Zi(){const e=w.getState().sel;if(e)try{const t=await R.git(e);w.getState().sel===e&&ts.setState({git:t,error:null})}catch(t){ts.setState({error:Mt(t)})}}async function xm(e){const t=w.getState().sel;if(t){mt.setState({wt:e,base:null,files:null,file:null,error:null});try{const n=await R.diffList(t,e);mt.setState({base:n.base,files:n.files})}catch(n){mt.setState({error:Mt(n)})}}}async function jm(e){const t=w.getState().sel,n=mt.getState().wt;if(!(!t||!n))try{mt.setState({file:await R.fileDiff(t,n,e),error:null})}catch(r){mt.setState({error:Mt(r)})}}const km=()=>mt.setState({wt:null,base:null,files:null,file:null,error:null}),Qn=["starting","running","ready"],Te=Fe((e,t)=>({job:null,watch:n=>e({job:{...n,lines:[],cursor:0}}),async poll(){const n=t().job,r=w.getState().sel;if(!n||!r)return!1;const l=await R.jobLogs(r,n.id,n.cursor),i=n.lines.concat(l.lines??[]).slice(-1500);e({job:{...l,lines:i,cursor:l.cursor??n.cursor}});const o=l.status!==n.status;return o&&await w.getState().reloadDetail(),Qn.includes(l.status)||o}}));dn(()=>Te.setState({job:null}));const Jd=e=>w.getState().act(async()=>{const t=w.getState().sel;t&&await R.stopJob(t,e)});function wm(e){return!e||e.needsConfirmation!==!0?null:{command:e.command??"",reason:e.reason??""}}const Sm=e=>`The project's gate asks before running:
45
-
46
- ${e.command}
47
-
48
- ${e.reason}
49
-
50
- Run it?`,Zd=(e,t)=>`${e}
51
-
52
- Fix: ${t||"run claude once in this folder and accept the trust dialog"}
53
-
54
- Run anyway?`,Nm=(e,t)=>`${e} usually takes an argument ${t}. Without one it may ask a free-text question this dashboard cannot answer.
55
-
56
- Run without?`;function Cm(e,t){return!!e&&!t.trim()}const eo=e=>({...e,events:e.events??[],cursor:e.cursor??0,pending:e.pending??[]}),ce=Fe((e,t)=>({commands:null,form:{},run:null,setForm:n=>e({form:{...t().form,...n}}),watch:n=>e({run:eo(n)}),async poll(){const n=t().run,r=w.getState().sel;if(!n||!r)return!1;const l=await R.run(r,n.id,n.cursor);return e({run:{...eo(l),events:n.events.concat(l.events??[]).slice(-1500),cursor:l.cursor??n.cursor}}),l.status!=="running"?(await w.getState().reloadDetail(),!1):!0}}));dn(()=>ce.setState({run:null,form:{}}));async function ta(){if(!ce.getState().commands)try{ce.setState({commands:(await R.commands()).commands})}catch{ce.setState({commands:[]})}}async function Em(e){const t=w.getState().sel;if(!t)return;const n=(ce.getState().commands??[]).find(l=>l.name===e.cmd);if(n&&Cm(n.argumentHint,e.args)&&!window.confirm(Nm(n.name,n.argumentHint)))return;const r={worktree:e.wt,command:e.cmd,args:e.args,permissionMode:e.mode};await w.getState().guard(async()=>{let l;try{l=await R.startRun(t,r)}catch(i){if(!(i instanceof Qr)||!i.body.untrusted)throw i;if(!window.confirm(Zd(i.message,i.body.fix)))throw new Error("cancelled");l=await R.startRun(t,{...r,acknowledgeUntrusted:!0})}ce.getState().watch(l.run)})}const $m=e=>w.getState().guard(async()=>{const t=w.getState().sel,n=ce.getState().run;if(!t||!n)return;const r=await R.reply(t,n.id,e);ce.setState({run:{...eo(r.run),events:n.events.concat(r.run.events?.slice(n.cursor)??[]),cursor:r.run.cursor??n.cursor}})});async function Pm(e,t,n){const r=w.getState().sel,l=ce.getState().run;if(!(!r||!l))try{await R.respond(r,l.id,{requestId:e,behavior:t,answers:n}),await ce.getState().poll()}catch(i){w.getState().setError(i instanceof Error?i.message:String(i))}}const ns=e=>w.getState().guard(async()=>{const t=w.getState().sel;t&&ce.getState().watch(await R.run(t,e,0))}),Cu=e=>{try{return localStorage.getItem(e)}catch{return null}},Eu=(e,t)=>{try{localStorage.setItem(e,t)}catch{}},He=Fe(e=>({paletteOpen:!1,helpOpen:!1,specView:Cu("cohorte-spec-view")==="board"?"board":"list",notify:Cu("cohorte-notify")==="1",setPalette:t=>e({paletteOpen:t}),setHelp:t=>e({helpOpen:t}),setSpecView:t=>{Eu("cohorte-spec-view",t),e({specView:t})},setNotify:t=>{Eu("cohorte-notify",t?"1":"0"),e({notify:t})}})),Yr=e=>({...e,events:e.events??[],cursor:e.cursor??0,pending:e.pending??[]}),z=Fe(()=>({tickets:null,features:null,ticketId:null,featureId:null,feature:null,chat:null,inbox:[],settings:null,learning:null}));dn(()=>z.setState({tickets:null,features:null,ticketId:null,featureId:null,feature:null,chat:null,settings:null,learning:null}));const G=()=>w.getState().sel,Me=e=>w.getState().guard(e);async function fn(){const e=G();if(e)try{const t=await R.tickets(e);G()===e&&z.setState({tickets:t})}catch(t){w.getState().setError(t instanceof Error?t.message:String(t))}}async function ks(){const e=G();if(e)try{const t=await R.features(e);G()===e&&z.setState({features:t.features})}catch{}}async function kt(){const e=G(),t=z.getState().featureId;if(!(!e||!t))try{const n=await R.feature(e,t);G()===e&&z.getState().featureId===t&&z.setState({feature:n})}catch(n){w.getState().setError(n instanceof Error?n.message:String(n))}}async function na(){try{z.setState({inbox:(await R.inbox()).items})}catch{}}async function ws(){const e=G();if(e)try{const[t,n]=await Promise.all([R.settings(e),R.learning(e)]);G()===e&&z.setState({settings:t,learning:n})}catch(t){w.getState().setError(t instanceof Error?t.message:String(t))}}const ra=e=>z.setState({ticketId:e});async function Ar(e){z.setState({featureId:e,feature:null}),e&&await kt()}async function Zt(e){const t=G();if(!t||!e){z.setState({chat:null});return}try{z.setState({chat:Yr(await R.run(t,e,0))})}catch{z.setState({chat:null})}}async function Kn(){const e=G(),t=z.getState().chat;if(!e||!t)return!1;const n=await R.run(e,t.id,t.cursor);return z.getState().chat?.id!==t.id?!1:(z.setState({chat:{...Yr(n),events:t.events.concat(n.events??[]).slice(-2e3),cursor:n.cursor??t.cursor}}),n.status==="running")}const Tm=e=>Me(async()=>{const t=G(),n=z.getState().chat;!t||!n||(await R.reply(t,n.id,e),await Kn())});async function _m(e,t,n){const r=G(),l=z.getState().chat;if(!(!r||!l))try{await R.respond(r,l.id,{requestId:e,behavior:t,answers:n}),await Kn()}catch(i){w.getState().setError(i instanceof Error?i.message:String(i))}}const Gr=async()=>{await Promise.all([fn(),ks(),kt(),na()])},Lm=(e,t,n)=>Me(async()=>{const r=G();if(!r)return;const l=await R.startPO(r,{text:e,requester:t,parent:n});z.setState({chat:Yr(l.run)}),await fn()}),$u=(e,t)=>Me(async()=>{const n=G();n&&(await R.decideTicket(n,e,t),await Gr())}),Rm=e=>Me(async()=>{const t=G();t&&(await R.createTicket(t,e),await fn())}),Pu=(e,t,n)=>Me(async()=>{const r=G();if(!r)return;const l=await R.acceptance(r,e,{action:t,text:n});l.run&&z.setState({chat:Yr(l.run)}),await Gr()}),Dm=e=>Me(async()=>{const t=G();if(!t)return;let n={};for(let r=0;r<3;r++)try{await R.takeTicket(t,e,n);break}catch(l){if(!(l instanceof Qr))throw l;if(l.body.needsConfirmation){if(!window.confirm(`The project's gate asks before running:
57
-
58
- ${l.body.command}
59
-
60
- ${l.body.reason??""}
61
-
62
- Run it?`))throw new Error("cancelled");n={...n,confirmed:!0}}else if(l.body.dockerPreflight){if(!window.confirm(`${l.message}
63
-
64
- Create the worktree anyway?`))throw new Error("cancelled");n={...n,skipDockerCheck:!0}}else if(l.body.untrusted){if(!window.confirm(Zd(l.message,l.body.fix)))throw new Error("cancelled");n={...n,confirmed:!0}}else throw l}await Gr(),z.setState({featureId:e}),w.getState().setTab("features"),await kt()}),Tu=(e,t)=>Me(async()=>{const n=G(),r=z.getState().featureId;!n||!r||(await R.checkpoint(n,r,{action:e,text:t}),await Gr())}),zm=e=>Me(async()=>{const t=G(),n=z.getState().featureId;!t||!n||(await R.replyLead(t,n,e),await Promise.all([kt(),Kn()]))}),Im=(e,t)=>Me(async()=>{const n=G(),r=z.getState().featureId;n&&r&&(await R.contest(n,r,e,t),await kt())}),Om=()=>Me(async()=>{const e=G(),t=z.getState().featureId;e&&t&&(await R.merge(e,t),await Gr())}),Fm=e=>Me(async()=>{const t=G();t&&z.setState({settings:await R.saveSettings(t,e)})}),Mm=(e,t)=>Me(async()=>{const n=G();n&&(await R.connectObsidian(n,{vault:e,board:t||void 0}),await Promise.all([ws(),fn()]))}),Am=()=>Me(async()=>{const e=G();if(!e)return;const t=await R.productMap(e);z.setState({chat:Yr(t.run)})});function li(){na();const e=w.getState().tab;e==="tickets"&&fn(),e==="features"&&(ks(),kt()),e==="settings"&&ws()}const Yn=Fe(()=>({status:"connecting"})),Ss=e=>e==="live",_u=new Map;let Lu={};const at=(e,t,n)=>{clearTimeout(Lu[e]),Lu[e]=setTimeout(n,t)};async function bm(e){const t=_u.get(e.id);if(e.type==="run"&&_u.set(e.id,{status:e.status,pending:e.pending??0}),!He.getState().notify||typeof Notification>"u"||Notification.permission!=="granted")return;const n=mm(t,e,document.hidden);if(!n)return;bn.getState().items.some(a=>a.id===e.id)||await xr();const r=w.getState().projects.find(a=>a.id===e.projectId),l=bn.getState().items.find(a=>a.id===e.id),{title:i,body:o}=vm(n,r?.title||r?.name||"Cohorte",l?.label??"a cohorte command",e.status);try{const a=new Notification(i,{body:o,tag:`cohorte-${e.id}-${n}`});a.onclick=()=>{window.focus(),location.hash=`#/p/${e.projectId}/run`,a.close()}}catch{}}function Um(e){const t=w.getState();for(const n of e){if(n.type==="flow"){at("flow",250,li);continue}if(bm(n),n.type==="run"&&z.getState().chat?.id===n.id&&at(`chat:${n.id}`,100,()=>{Kn()}),n.projectId!==t.sel){n.type==="run"&&at("flow",400,li);continue}if(n.type==="job"){const r=Te.getState().job;r&&r.id===n.id&&at(`job:${n.id}`,150,()=>{Te.getState().poll()}),at("detail",400,()=>{w.getState().reloadDetail(),w.getState().tab==="worktrees"&&Zi()})}else{const r=ce.getState().run;r&&r.id===n.id&&at(`run:${n.id}`,100,()=>{ce.getState().poll()}),n.status!=="running"&&at("detail",300,()=>{w.getState().reloadDetail()}),at("flow",400,li)}}at("activity",300,()=>{xr()})}let Ru=!1;function Wm(){Ru||(Ru=!0,xr(),pm({onEvents:Um,onStatus:e=>{Yn.setState({status:e}),e==="live"&&xr()}}),setInterval(()=>{xr()},2e4))}function S({variant:e="default",className:t="",...n}){return s.jsx("button",{type:"button",className:`btn btn-${e} ${t}`.trim(),...n})}function E({tone:e="",children:t}){return s.jsx("span",{className:`pill${e?` pill-${e}`:""}`,children:t})}function la({tone:e}){return s.jsx("span",{className:`dot dot-${e}`,"aria-hidden":"true"})}function W({children:e,tone:t,className:n=""}){return s.jsx("div",{className:`card${t?` card-${t}`:""} ${n}`.trim(),children:e})}function lt({value:e,label:t,tone:n,onClick:r}){const l=s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"stat-v",children:e}),s.jsx("div",{className:"muted",children:t})]});return r?s.jsx("button",{type:"button",className:`card stat link${n?` card-${n}`:""}`,onClick:r,children:l}):s.jsx("div",{className:`card stat${n?` card-${n}`:""}`,children:l})}const Ns=({children:e})=>s.jsx("div",{className:"cards",children:e}),U=({children:e,plain:t=!1})=>s.jsx("h3",{className:`section${t?" plain":""}`,children:e}),D=({children:e,mono:t=!1})=>s.jsx("div",{className:`muted${t?" mono":""}`,children:e}),_e=({children:e})=>s.jsx("div",{className:"empty",children:e}),br=({children:e})=>s.jsx("div",{className:"error",role:"alert",children:e}),Cs=({children:e,id:t,max:n})=>s.jsx("pre",{id:t,className:`pre${n===!1?"":" pre-max"}`,children:e});function ke({head:e,children:t}){return s.jsxs("table",{className:"table",children:[e?s.jsx("thead",{children:s.jsx("tr",{children:e.map((n,r)=>s.jsx("th",{scope:"col",children:n},r))})}):null,s.jsx("tbody",{children:t})]})}const Bm=e=>e.error||e.missing||!e.summary||e.summary.bad?"bad":e.summary.warn?"warn":"ok";function Hm(){const{projects:e,suggestions:t,sel:n,version:r}=w(),[l,i]=P.useState(""),o=qd(bn(u=>u.items)),a=u=>{u.preventDefault();const c=l.trim();c&&(Nu(c),i(""))};return s.jsxs("aside",{className:"sidebar",children:[s.jsxs("h1",{children:[s.jsx("button",{type:"button",className:"brand",onClick:ea,title:"Home","aria-label":"Cohorte home",children:"Cohorte"})," ",s.jsx("span",{className:"muted mono",children:r?`v${r}`:""})]}),s.jsxs("form",{className:"row-form",onSubmit:a,children:[s.jsx("input",{value:l,onChange:u=>i(u.target.value),placeholder:"/path/to/project","aria-label":"Project path"}),s.jsx(S,{type:"submit",children:"Add"})]}),s.jsx("nav",{"aria-label":"Projects",children:e.map(u=>s.jsxs("button",{type:"button",className:`proj${u.id===n?" sel":""}`,"aria-current":u.id===n?"true":void 0,onClick:()=>void Vn(u.id),children:[s.jsxs("span",{className:"proj-name",children:[s.jsx(la,{tone:Bm(u)}),u.title||u.name,o[u.id]?.pending?s.jsx("span",{className:"badge-attn",title:"Waiting for you",children:o[u.id].pending}):o[u.id]?.running?s.jsx("span",{className:"badge-run",title:"Something is running",children:o[u.id].running}):null]}),s.jsx("span",{className:"muted mono",children:u.missing?"folder missing":`${u.specTotal??0} spec${u.specTotal===1?"":"s"}`})]},u.id))}),t.length?s.jsx(U,{children:"Found on this machine"}):null,t.map(u=>s.jsxs("div",{className:"sug",children:[s.jsxs("span",{children:[s.jsx("div",{children:u.name}),s.jsx("div",{className:"muted mono",children:u.root})]}),s.jsx(S,{onClick:()=>void Nu(u.root),children:"Add"})]},u.root))]})}const to={o:"overview",h:"health",s:"specs",r:"run",w:"worktrees",d:"docker",c:"cost"},Vm=1200,Qm=[["⌘K / Ctrl+K","Command palette"],["?","This help"],["g o","Overview"],["g h","Health"],["g s","Specs"],["g r","Run"],["g w","Worktrees"],["g d","Docker"],["g c","Cost"],["Esc","Close a dialog"]];function Km(e,t){return(e.meta||e.ctrl)&&e.key.toLowerCase()==="k"?{kind:"palette"}:e.typing||e.meta||e.ctrl||e.alt?null:t&&to[e.key]?{kind:"tab",tab:to[e.key]}:e.key==="g"?{kind:"chord"}:e.key==="?"?{kind:"help"}:null}const Es=Fe(()=>({spec:null})),jr=Fe(()=>({metrics:null}));dn(()=>{Es.setState({spec:null}),jr.setState({metrics:null})});const rs=e=>w.getState().guard(async()=>{const t=w.getState().sel;t&&Es.setState({spec:await R.spec(t,e)})}),Ym=()=>Es.setState({spec:null});async function sa(){const e=w.getState().sel;if(!(!e||jr.getState().metrics))try{jr.setState({metrics:await R.metrics(e)})}catch(t){jr.setState({metrics:{error:Mt(t)}})}}function ia(e){w.getState().setTab(e),e==="run"&&ta(),e==="cost"&&sa(),ef(e)}function ef(e){e==="tickets"&&fn(),e==="features"&&(ks(),kt()),e==="settings"&&ws()}const tf=e=>{Zo(e)&&ia(e)};function nf(e){ce.getState().setForm(e),ia("run")}const Gm=e=>{const t=e;return!!t&&(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT"||t.isContentEditable)};function Xm(){return P.useEffect(()=>{let e=0;const t=n=>{const r=Km({key:n.key,meta:n.metaKey,ctrl:n.ctrlKey,alt:n.altKey,typing:Gm(n.target)},Date.now()-e<Vm);r&&(r.kind==="palette"?(n.preventDefault(),He.getState().setPalette(!He.getState().paletteOpen)):r.kind==="help"?(n.preventDefault(),He.getState().setHelp(!0)):r.kind==="chord"?e=Date.now():w.getState().sel&&(n.preventDefault(),e=0,tf(r.tab)))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[]),null}function qm({tabs:e,value:t,onChange:n,label:r}){const l=P.useRef([]),i=(o,a)=>{const u=o.key==="ArrowRight"?a+1:o.key==="ArrowLeft"?a-1:-1;if(u<0)return;const c=(u+e.length)%e.length;l.current[c]?.focus(),n(e[c].id)};return s.jsx("div",{className:"tabs",role:"tablist","aria-label":r,children:e.map((o,a)=>s.jsx("button",{ref:u=>{l.current[a]=u},type:"button",role:"tab",id:`tab-${o.id}`,"aria-selected":o.id===t,"aria-controls":"tabpanel",tabIndex:o.id===t?0:-1,className:`tab${o.id===t?" sel":""}`,onClick:()=>n(o.id),onKeyDown:u=>i(u,a),children:o.label},o.id))})}const ot=e=>typeof e=="number"?`$${e.toFixed(2)}`:"–",vl=e=>typeof e=="number"?e.toLocaleString():"–",rf=e=>e?`${Math.round(e/1e3)}s`:"";function Gn(e,t=Date.now()){const n=e?Date.parse(e):NaN;if(Number.isNaN(n))return"";const r=Math.max(0,Math.round((t-n)/1e3));return r<45?"just now":r<3600?`${Math.round(r/60)}m ago`:r<86400?`${Math.round(r/3600)}h ago`:`${Math.round(r/86400)}d ago`}function Jm(){const e=jr(r=>r.metrics);if(P.useEffect(()=>{sa()},[]),!e)return s.jsx(_e,{children:"Loading…"});if("error"in e&&typeof e.error=="string")return s.jsx(br,{children:e.error});const t=e,n=t.totals??{};return s.jsxs("div",{children:[s.jsxs(Ns,{children:[s.jsx(lt,{value:ot(n.cost),label:"Total"}),s.jsx(lt,{value:vl(n.runs),label:"Runs"}),s.jsx(lt,{value:vl(n.sessions),label:"Sessions"}),s.jsx(lt,{value:vl(n.agents),label:"Subagents"})]}),s.jsx(U,{children:"By command (last 30 days)"}),s.jsx(ke,{head:["Command","Runs","Cost"],children:(t.commands??[]).map(r=>s.jsxs("tr",{children:[s.jsx("td",{className:"mono",children:r.command}),s.jsx("td",{children:vl(r.runs)}),s.jsx("td",{children:ot(typeof r.cost=="object"?r.cost.total:r.cost)})]},r.command))})]})}function an(e,t,n,r){const l=P.useRef(e);l.current=e,P.useEffect(()=>{if(!n)return;let i=!1,o;const a=async()=>{let u=!0;try{u=await l.current()!==!1}catch{}!i&&u&&(o=setTimeout(a,t))};return o=setTimeout(a,t),()=>{i=!0,clearTimeout(o)}},[t,n,r])}async function $s(e,t=n=>window.confirm(n)){try{return await e(!1)}catch(n){const r=n instanceof Qr?wm(n.body):null;if(!r)throw n;if(!t(Sm(r)))throw new Error("cancelled");return e(!0)}}const kr=Fe(e=>({docker:null,async load(){const t=w.getState().sel;if(t)try{e({docker:await R.docker(t)})}catch(n){e({docker:{error:Mt(n)}})}}}));dn(()=>kr.setState({docker:null}));const Tt=(e,t)=>w.getState().act(async()=>{const n=w.getState().sel;if(!n||e==="down"&&!window.confirm(`Stop and remove the stack’s containers?
65
-
66
- Volumes (your data) are kept.`))return;const r=await $s(l=>R.dockerAct(n,{action:e,service:t,confirmed:l}));Te.getState().watch(r.job),setTimeout(()=>{w.getState().tab==="docker"&&kr.getState().load()},2500)});function lf({only:e}){const t=Te(r=>r.job),n=P.useRef(null);return P.useEffect(()=>{const r=n.current;r&&(r.scrollTop=r.scrollHeight)},[t?.lines.length]),!t||e&&!e.test(t.label)?null:s.jsxs(s.Fragment,{children:[s.jsxs(U,{children:[t.label," · ",s.jsx("span",{"aria-live":"polite",children:t.status}),Qn.includes(t.status)?s.jsxs(s.Fragment,{children:[" ",s.jsx(S,{onClick:()=>void Jd(t.id),children:"Stop"})]}):null]}),s.jsx(D,{mono:!0,children:t.command}),s.jsx("pre",{ref:n,className:"pre pre-max","aria-label":"Job output",children:t.lines.join(`
67
- `)})]})}const Zm={running:"ok",exited:"warn",dead:"bad",restarting:"warn"},ev=e=>e==="healthy"?"ok":e==="unhealthy"?"bad":"warn";function tv({v:e,up:t,busy:n}){return s.jsxs("tr",{children:[s.jsx("td",{className:"mono",children:e.name}),s.jsxs("td",{children:[s.jsx(E,{tone:Zm[e.state]??"",children:e.state}),e.health?s.jsxs(s.Fragment,{children:[" ",s.jsx(E,{tone:ev(e.health),children:e.health})]}):null]}),s.jsx("td",{className:"mono",children:e.ports.join(", ")}),s.jsx("td",{className:"muted",children:e.status}),s.jsx("td",{children:s.jsx("div",{className:"actions",children:t?s.jsxs(s.Fragment,{children:[e.state==="running"?s.jsx(S,{disabled:n,onClick:()=>void Tt("stop",e.name),children:"Stop"}):s.jsx(S,{disabled:n,onClick:()=>void Tt("up",e.name),children:"Start"}),s.jsx(S,{disabled:n,onClick:()=>void Tt("restart",e.name),children:"Restart"}),s.jsx(S,{onClick:()=>void Tt("logs",e.name),children:"Logs"})]}):null})})]})}function nv({d:e}){const t=kr(h=>h.docker),n=Te(h=>h.job),r=w(h=>h.tab);if(P.useEffect(()=>{kr.getState().load()},[]),an(async()=>{await kr.getState().load()},4e3,r==="docker","docker"),!e.docker)return s.jsx(_e,{children:"No compose file here. Declare isolation.compose_file in PIPELINE.md, or add a docker-compose.yml at the repo root."});if(!t)return s.jsx(_e,{children:"Loading…"});if("error"in t&&typeof t.error=="string")return s.jsx(br,{children:t.error});const l=t,i=l.daemon,o=l.services??[],a=!!i?.up,u=!!n&&Qn.includes(n.status)&&/^docker/.test(n.label),c=!a||u;return s.jsxs("div",{children:[s.jsxs(Ns,{children:[s.jsxs(W,{children:[s.jsxs("div",{className:"stat-v",children:[s.jsx(la,{tone:a?"ok":"bad"})," ",a?"Docker up":"Docker down"]}),s.jsx("div",{className:"muted",children:a?`engine ${i?.version??""}`:i?.error})]}),s.jsxs(W,{children:[s.jsx("div",{className:"stat-v",children:`${l.running??0}/${o.length}`}),s.jsx("div",{className:"muted",children:"services running"})]}),s.jsxs(W,{children:[s.jsx("div",{className:"stat-v mono small",children:l.file}),s.jsx("div",{className:"muted",children:"compose file"})]})]}),l.configError?s.jsx(br,{children:`compose: ${l.configError}`}):null,a?null:s.jsx(D,{children:"Start Docker Desktop (or the docker service). scripts/new-feature.sh needs it to create a worktree’s database."}),s.jsxs("div",{className:"toolbar",children:[s.jsx(S,{disabled:c,onClick:()=>void Tt("up"),children:"Start stack"}),s.jsx(S,{disabled:c,onClick:()=>void Tt("restart"),children:"Restart all"}),s.jsx(S,{disabled:c,onClick:()=>void Tt("stop"),children:"Stop all"}),s.jsx(S,{disabled:c,onClick:()=>void Tt("down"),children:"Down (keeps volumes)"})]}),s.jsx(ke,{head:["Service","State","Ports","Status",""],children:o.map(h=>s.jsx(tv,{v:h,up:a,busy:u},h.name))}),s.jsx(lf,{only:/^docker/})]})}const rv=e=>e==="ok"?"ok":e==="warn"?"warn":e==="bad"?"bad":"";function lv({d:e}){const t=e.doctor.summary;return s.jsxs("div",{children:[s.jsx(Ns,{children:["ok","warn","bad","skip"].map(n=>s.jsx(lt,{value:t[n],label:n},n))}),s.jsx(U,{children:"Checks"}),s.jsx(ke,{head:["Check","Status","Detail"],children:e.doctor.checks.map((n,r)=>s.jsxs("tr",{children:[s.jsx("td",{children:n.label}),s.jsx("td",{children:s.jsx(E,{tone:rv(n.status),children:n.status})}),s.jsxs("td",{children:[n.detail,n.fix?s.jsx("div",{className:"fix",children:`fix: ${n.fix}`}):null]})]},r))})]})}/**
68
- * @license lucide-react v1.75.0 - ISC
69
- *
70
- * This source code is licensed under the ISC license.
71
- * See the LICENSE file in the root directory of this source tree.
72
- */const sv=e=>e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
73
- * @license lucide-react v1.75.0 - ISC
74
- *
75
- * This source code is licensed under the ISC license.
76
- * See the LICENSE file in the root directory of this source tree.
77
- */function iv(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:sv(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}/**
78
- * @license lucide-react v1.75.0 - ISC
79
- *
80
- * This source code is licensed under the ISC license.
81
- * See the LICENSE file in the root directory of this source tree.
82
- */const ov=e=>{let t="",n=!1;for(const r of e){if(r==="-"||r==="_"||r<=" "){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t};/**
83
- * @license lucide-react v1.75.0 - ISC
84
- *
85
- * This source code is licensed under the ISC license.
86
- * See the LICENSE file in the root directory of this source tree.
87
- */const av=e=>{const t=ov(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
88
- * @license lucide-react v1.75.0 - ISC
89
- *
90
- * This source code is licensed under the ISC license.
91
- * See the LICENSE file in the root directory of this source tree.
92
- */const no=(...e)=>{const t=new Set;for(const n of e)if(typeof n=="string")for(const r of n.split(/\s+/))r&&t.add(r);return[...t].join(" ")};/**
93
- * @license lucide-react v1.75.0 - ISC
94
- *
95
- * This source code is licensed under the ISC license.
96
- * See the LICENSE file in the root directory of this source tree.
97
- */const Kt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
98
- * @license lucide-react v1.75.0 - ISC
99
- *
100
- * This source code is licensed under the ISC license.
101
- * See the LICENSE file in the root directory of this source tree.
102
- */function si(e){return e!=null}function uv(e,t={}){const n=t.attributeNames??{},r=m=>n[m]??m,l=e.size??e.width??Kt.width,i=e.size??e.height??Kt.height,o=e.aliases?.filter(m=>typeof m=="string"&&m.trim()!=="").map(m=>`lucide-${m}`)??[],a=[...e.name?[`lucide-${e.name}`]:[],...o],u=t.className?.split(" ").filter(Boolean)??[],c=t.includeDefaultClasses===!1?no(...u):no("lucide",...a,...u),h=t.absoluteStrokeWidth?Number(t.strokeWidth??Kt["stroke-width"])*Number(e.size??e.width??Kt.width)/Number(t.size??t.width??Kt.width):t.strokeWidth??Kt["stroke-width"];return["svg",{...Object.entries(Kt).reduce((m,[y,k])=>(m[r(y)]=k,m),{}),..."color"in t&&t.color&&{[r("stroke")]:t.color},..."size"in t&&si(t.size)&&{[r("width")]:t.size,[r("height")]:t.size},..."width"in t&&si(t.width)&&{[r("width")]:t.width},..."height"in t&&si(t.height)&&{[r("height")]:t.height},[r("stroke-width")]:h,...c&&{[r("class")]:c},[r("viewBox")]:`0 0 ${l} ${i}`,...t.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(m=>{const[y,k,v]=m,O=t.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...k}:k;return v?[y,O,v]:[y,O]})]}/**
103
- * @license lucide-react v1.75.0 - ISC
104
- *
105
- * This source code is licensed under the ISC license.
106
- * See the LICENSE file in the root directory of this source tree.
107
- */function cv(e,t={}){return uv(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
108
- * @license lucide-react v1.75.0 - ISC
109
- *
110
- * This source code is licensed under the ISC license.
111
- * See the LICENSE file in the root directory of this source tree.
112
- */const dv=e=>{if(e==null||typeof e!="object")return!1;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(t.startsWith("aria-")||t==="role"||t==="title")&&e[t]!=null)return!0;return!1},fv=P.createContext({}),hv=()=>P.useContext(fv),pv=P.forwardRef(({color:e,size:t,width:n,height:r,strokeWidth:l,absoluteStrokeWidth:i,nonScalingStroke:o,className:a="",children:u,iconNode:c=[],icon:h={node:c,aliases:[],size:24},...g},m)=>{const{size:y=24,strokeWidth:k=2,absoluteStrokeWidth:v=!1,nonScalingStroke:O=!1,color:f="currentColor",className:d=""}=hv()??{},p=!!u||dv(g),[x,N,T=[]]=cv(h,{color:e??f,width:n??t??y,height:r??t??y,strokeWidth:l??k,absoluteStrokeWidth:i??v,nonScalingStroke:o??O,className:no(d,a),hasA11yProp:p,attributes:g});return P.createElement(x,{ref:m,...N},[...T.map(([_,L])=>P.createElement(_,L)),...Array.isArray(u)?u:[u]])});/**
113
- * @license lucide-react v1.75.0 - ISC
114
- *
115
- * This source code is licensed under the ISC license.
116
- * See the LICENSE file in the root directory of this source tree.
117
- */function Ht(e,t=[],n=[]){const r=typeof e=="string"?iv(e,t,n):e,l=P.forwardRef(({className:i,...o},a)=>P.createElement(pv,{ref:a,icon:r,className:i,...o}));return r.name&&(l.displayName=av(r.name)),l}/**
118
- * @license lucide-react v1.75.0 - ISC
119
- *
120
- * This source code is licensed under the ISC license.
121
- * See the LICENSE file in the root directory of this source tree.
122
- */const sf={name:"bell-off",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]};sf.node;const mv=Ht(sf);/**
123
- * @license lucide-react v1.75.0 - ISC
124
- *
125
- * This source code is licensed under the ISC license.
126
- * See the LICENSE file in the root directory of this source tree.
127
- */const of={name:"bell",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]};of.node;const vv=Ht(of);/**
128
- * @license lucide-react v1.75.0 - ISC
129
- *
130
- * This source code is licensed under the ISC license.
131
- * See the LICENSE file in the root directory of this source tree.
132
- */const af={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9 9.5a3 2.5 0 016 0c0 2-2 2-3 3.5",key:"1awbb0"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};af.node;const gv=Ht(af);/**
133
- * @license lucide-react v1.75.0 - ISC
134
- *
135
- * This source code is licensed under the ISC license.
136
- * See the LICENSE file in the root directory of this source tree.
137
- */const uf={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};uf.node;const yv=Ht(uf);/**
138
- * @license lucide-react v1.75.0 - ISC
139
- *
140
- * This source code is licensed under the ISC license.
141
- * See the LICENSE file in the root directory of this source tree.
142
- */const cf={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};cf.node;const xv=Ht(cf);/**
143
- * @license lucide-react v1.75.0 - ISC
144
- *
145
- * This source code is licensed under the ISC license.
146
- * See the LICENSE file in the root directory of this source tree.
147
- */const df={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};df.node;const jv=Ht(df);/**
148
- * @license lucide-react v1.75.0 - ISC
149
- *
150
- * This source code is licensed under the ISC license.
151
- * See the LICENSE file in the root directory of this source tree.
152
- */const ff={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};ff.node;const kv=Ht(ff);/**
153
- * @license lucide-react v1.75.0 - ISC
154
- *
155
- * This source code is licensed under the ISC license.
156
- * See the LICENSE file in the root directory of this source tree.
157
- */const hf={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};hf.node;const wv=Ht(hf),Sv=[{key:"spec",label:"Spec"},{key:"build",label:"Build"},{key:"review",label:"Review"},{key:"verify",label:"Verify"},{key:"ship",label:"Ship"},{key:"done",label:"Closed"}];function Nv(e){return e.status==="abandoned"?"done":(e.pipeline?.stages??[]).find(r=>r.state!=="done"&&r.state!=="skipped")?.key??"done"}function pf(e,t){const n=e.pipeline?.next;if(!n)return null;const r=t.filter(i=>!i.bare),l=r.find(i=>i.branch&&e.branch&&i.branch===e.branch)??r.find(i=>i.main)??r[0];return l?{wt:l.path,cmd:n.command,args:n.args}:null}const Cv=e=>{const t=e.pipeline?.next;return t?`Run /${t.command} ${t.args}`:""};function oa({spec:e,worktrees:t,why:n=!1}){const r=pf(e,t),l=e.pipeline?.next;return!l||!r?null:s.jsxs("span",{className:"next",children:[s.jsx(S,{variant:"primary",title:l.why,onClick:i=>{i.stopPropagation(),nf(r)},children:Cv(e)}),n?s.jsxs("span",{className:"muted",children:[" — ",l.why]}):null]})}const aa=e=>e&&typeof e=="object"&&!Array.isArray(e)?e:null,Y=e=>typeof e=="string"?e:typeof e=="number"?String(e):"",Un=e=>Array.isArray(e)?e:[];function Ev(e){return Un(e.checks).map(t=>aa(t)).filter(t=>!!t).map(t=>({name:Y(t.name),status:Y(t.status),note:Y(t.note)}))}function ro(e){const t=aa(e.surfaces);return t?Object.entries(t).map(([n,r])=>({name:n,state:Y(r)})):Un(e.surfaces).map(n=>({name:Y(n),state:""}))}const mf=["CRITICAL","HIGH","MEDIUM","LOW"];function $v(e){const t=Object.fromEntries(mf.map(n=>[n,0]));for(const n of e)t[n.severity]=(t[n.severity]??0)+1;return t}const Pv={CRITICAL:"bad",HIGH:"bad",MEDIUM:"warn",LOW:""};function Du({rows:e,deferred:t}){return s.jsx(ke,{head:["Severity","Location","Category","Problem","Fix",...t?["Out of scope"]:[]],children:e.map((n,r)=>s.jsxs("tr",{children:[s.jsx("td",{children:s.jsx(E,{tone:Pv[n.severity]??"",children:n.severity.toLowerCase()})}),s.jsx("td",{className:"mono nowrap",children:n.file?`${n.file}${n.line!=null?`:${n.line}`:""}`:""}),s.jsx("td",{children:n.category}),s.jsx("td",{children:n.problem}),s.jsx("td",{children:n.fix}),t?s.jsx("td",{className:"muted",children:n.outOfScope}):null]},r))})}function Tv({rows:e}){const t=$v(e);return s.jsx("div",{className:"sev-strip","aria-label":"Findings by severity",children:mf.map(n=>s.jsxs("span",{className:`sev sev-${n.toLowerCase()}${t[n]?"":" zero"}`,children:[s.jsx("strong",{children:t[n]})," ",n.toLowerCase()]},n))})}function _v({review:e}){return e.findings.length||e.deferred.length||e.raw?s.jsxs("div",{children:[s.jsxs(U,{children:["Review findings",e.verdict?` · ${e.verdict}`:""]}),s.jsx(Tv,{rows:e.findings}),e.findings.length?s.jsx(Du,{rows:e.findings,deferred:!1}):s.jsx(D,{children:"None."}),e.deferred.length?s.jsxs(s.Fragment,{children:[s.jsxs(U,{children:["Deferred (",e.deferred.length,")"]}),s.jsx(Du,{rows:e.deferred,deferred:!0})]}):null,e.raw?s.jsxs("details",{className:"disclose",children:[s.jsx("summary",{children:"Raw review report"}),s.jsx(Cs,{children:e.raw})]}):null]}):s.jsxs(s.Fragment,{children:[s.jsx(U,{children:"Review findings"}),s.jsx(D,{children:"No review report yet — /cohorte-review writes specs/reports/<id>.md."})]})}const Lv={READY:"ok",SHIP:"ok",PASS:"ok",REVISE:"warn",SKIPPED:"",BLOCK:"bad",FAIL:"bad"},ua=e=>Lv[e]??"warn";function Xr({title:e,r:t}){return s.jsxs("div",{className:"rc-head",children:[s.jsx("strong",{children:e}),Y(t.ts)?s.jsx("span",{className:"muted mono",children:Y(t.ts)}):null]})}function Rv({r:e}){const t=Un(e.gaps).map(Y).filter(Boolean);return s.jsxs(W,{children:[s.jsx(Xr,{title:"Readiness",r:e}),s.jsx(E,{tone:ua(Y(e.verdict)),children:Y(e.verdict)||"–"}),ro(e).length?s.jsx("div",{className:"rc-row",children:ro(e).map(n=>s.jsx(E,{children:n.name},n.name))}):null,t.length?s.jsx("ul",{className:"rc-list",children:t.map((n,r)=>s.jsx("li",{children:n},r))}):s.jsx(D,{children:"No gaps."})]})}function Dv({r:e}){const t=Un(e.dead).map(Y).filter(Boolean);return s.jsxs(W,{children:[s.jsx(Xr,{title:"Build",r:e}),s.jsx("div",{className:"rc-row",children:ro(e).map(n=>s.jsx(E,{tone:n.state==="ok"?"ok":"bad",children:`${n.name}: ${n.state||"?"}`},n.name))}),t.length?s.jsxs(D,{children:["Agents that died: ",t.join(", ")]}):null]})}function zv({r:e}){const t=n=>typeof e[n]=="number"?String(e[n]):"–";return s.jsxs(W,{children:[s.jsx(Xr,{title:"Review verdict",r:e}),s.jsx(E,{tone:ua(Y(e.verdict)),children:Y(e.verdict)||"–"}),s.jsx("div",{className:"rc-row muted",children:`${t("blocking")} blocking · ${t("findings")} findings · ${t("security")} security · ${t("deferred")} deferred`}),Y(e.aborted)?s.jsxs(D,{children:["Aborted: ",Y(e.aborted)]}):null,Un(e.unreviewed).length?s.jsxs(D,{children:["Unreviewed surfaces: ",Un(e.unreviewed).map(Y).join(", ")]}):null]})}function Iv({r:e}){const t=Ev(e);return s.jsxs(W,{children:[s.jsx(Xr,{title:"Verify",r:e}),s.jsx(E,{tone:ua(Y(e.verdict)),children:Y(e.verdict)||"–"}),Y(e.reason)?s.jsx(D,{children:Y(e.reason)}):null,t.length?s.jsx("ul",{className:"rc-list",children:t.map((n,r)=>s.jsxs("li",{children:[s.jsx(E,{tone:n.status==="PASS"?"ok":n.status==="FAIL"?"bad":"",children:n.status||"–"})," ",s.jsx("span",{className:"mono",children:n.name}),n.note?s.jsxs("span",{className:"muted",children:[" — ",n.note]}):null]},r))}):null]})}function Ov({r:e}){return s.jsxs(W,{children:[s.jsx(Xr,{title:"Loop",r:e}),s.jsx(E,{tone:Y(e.outcome)?"bad":"warn",children:Y(e.outcome)||"resumable"}),Y(e.reason)?s.jsx(D,{children:Y(e.reason)}):null]})}const Fv=[["readiness",e=>s.jsx(Rv,{r:e})],["build",e=>s.jsx(Dv,{r:e})],["verdict",e=>s.jsx(zv,{r:e})],["verify",e=>s.jsx(Iv,{r:e})],["loop",e=>s.jsx(Ov,{r:e})]];function Mv({reports:e}){const t=Fv.map(([n,r])=>[n,aa(e[n]),r]).filter(n=>!!n[1]);return t.length?s.jsxs("div",{children:[s.jsx(U,{children:"Reports"}),s.jsx("div",{className:"cards rc",children:t.map(([n,r,l])=>s.jsx("div",{children:l(r)},n))}),s.jsxs("details",{className:"disclose",children:[s.jsx("summary",{children:"Raw JSON"}),t.map(([n,r])=>s.jsxs("div",{children:[s.jsx(U,{children:n}),s.jsx(Cs,{children:JSON.stringify(r,null,2)})]},n))]})]}):null}const Av={done:"✓",current:"●",blocked:"!",skipped:"–",todo:""};function vf({stages:e}){return s.jsx("ol",{className:"stepper","aria-label":"Pipeline stages",children:e.map(t=>s.jsxs("li",{className:`step step-${t.state}`,title:`${t.label}: ${t.state}`,children:[s.jsx("span",{className:"step-mark","aria-hidden":"true",children:Av[t.state]}),s.jsxs("span",{className:"step-label",children:[t.label,s.jsx("span",{className:"sr-only",children:` — ${t.state}`})]})]},t.key))})}const bv=(e,t)=>e==="SHIP"&&!t?"ok":e==="BLOCK"?"bad":e==="REVISE"?"warn":"";function ca({v:e}){if(!e)return null;const t=e.findings!=null?` · ${e.blocking??0} blocking / ${e.findings}`:"";return s.jsx(E,{tone:bv(e.verdict,e.blocking),children:`${e.verdict||"no verdict"}${t}`})}function Uv({spec:e,d:t}){const n=e.spec;return s.jsxs("div",{children:[s.jsx(S,{onClick:Ym,children:"← Specs"}),s.jsx("h2",{className:"spec-title",children:n.title||n.id}),s.jsx(D,{mono:!0,children:`${n.id} · ${n.status||"unknown"}${n.kind?` · ${n.kind}`:""}${n.branch?` · ${n.branch}`:""}`}),s.jsxs("div",{className:"spec-head",children:[s.jsx(vf,{stages:e.pipeline.stages}),s.jsx(ca,{v:e.pipeline.verdict})]}),s.jsx(oa,{spec:{...n,pipeline:e.pipeline},worktrees:t.worktrees,why:!0}),s.jsx(_v,{review:e.review}),s.jsx(Mv,{reports:e.reports}),s.jsx(U,{children:"Spec"}),s.jsx(Cs,{children:e.body})]})}const gf={shipped:"ok",merged:"ok",blocked:"bad",abandoned:"warn"},yf=e=>gf[e.status]??(e.tone==="warn"?"warn":""),xf=e=>({tabIndex:0,onClick:()=>void rs(e),onKeyDown:t=>{t.key==="Enter"&&rs(e)}});function Wv(){const{specView:e,setSpecView:t}=He(),n=(r,l,i)=>s.jsxs("button",{type:"button",className:`seg${e===r?" sel":""}`,"aria-pressed":e===r,onClick:()=>t(r),children:[i,l]});return s.jsxs("div",{className:"seg-group",role:"group","aria-label":"Spec layout",children:[n("list","List",s.jsx(xv,{size:13})),n("board","Board",s.jsx(yv,{size:13}))]})}function Bv({d:e}){return s.jsx(ke,{head:["Spec","Pipeline","Status","Next"],children:e.specs.map(t=>s.jsxs("tr",{className:"click",...xf(t.id),children:[s.jsxs("td",{children:[s.jsx("div",{className:"mono",children:t.id}),s.jsx("div",{children:t.title}),t.branch?s.jsx("div",{className:"muted mono",children:t.branch}):null]}),s.jsx("td",{children:t.pipeline?s.jsx(vf,{stages:t.pipeline.stages}):null}),s.jsxs("td",{children:[s.jsx(E,{tone:yf(t),children:t.status}),t.pipeline?.verdict?s.jsx("div",{className:"gap-top",children:s.jsx(ca,{v:t.pipeline.verdict})}):null]}),s.jsx("td",{children:s.jsx(oa,{spec:t,worktrees:e.worktrees})})]},t.id))})}function Hv({d:e}){return s.jsx("div",{className:"board",role:"list",children:Sv.map(t=>{const n=e.specs.filter(r=>Nv(r)===t.key);return s.jsxs("section",{className:"col",role:"listitem","aria-label":`${t.label}, ${n.length} specs`,children:[s.jsxs("h4",{className:"col-head",children:[t.label,s.jsx("span",{className:"count",children:n.length})]}),n.map(r=>s.jsxs("article",{className:"spec-card click",...xf(r.id),children:[s.jsx("div",{className:"mono",children:r.id}),s.jsx("div",{children:r.title}),s.jsxs("div",{className:"spec-card-meta",children:[s.jsx(E,{tone:yf(r),children:r.status}),s.jsx(ca,{v:r.pipeline?.verdict??null})]}),s.jsx(oa,{spec:r,worktrees:e.worktrees})]},r.id))]},t.key)})})}function Vv({d:e}){const t=Es(r=>r.spec),n=He(r=>r.specView);return t?s.jsx(Uv,{spec:t,d:e}):e.specs.length?s.jsxs("div",{children:[s.jsxs("div",{className:"toolbar between",children:[s.jsx("span",{className:"muted",children:`${e.specs.length} spec${e.specs.length===1?"":"s"}`}),s.jsx(Wv,{})]}),n==="board"?s.jsx(Hv,{d:e}):s.jsx(Bv,{d:e})]}):s.jsx(_e,{children:"No specs yet. Run /cohorte-brainstorm in Claude Code."})}function Qv({d:e}){const t=w(c=>c.setTab),n=Te(c=>c.watch),r=e.doctor.summary,l={};for(const c of e.specs)l[c.status||"unknown"]=(l[c.status||"unknown"]??0)+1;const i=e.worktrees.filter(c=>c.dev&&Qn.includes(c.dev.status)),o=(e.runs??[]).filter(c=>c.status==="running"),a=e.doctor.checks.filter(c=>c.status==="bad"||c.status==="warn"),u=Object.entries(l).map(([c,h])=>`${h} ${c}`).join(", ");return s.jsxs("div",{children:[s.jsxs(Ns,{children:[s.jsx(lt,{value:r.bad?`${r.bad} failing`:r.warn?`${r.warn} to review`:"Healthy",label:"pipeline health",tone:r.bad?"bad":r.warn?"warn":"ok",onClick:()=>t("health")}),s.jsx(lt,{value:e.specs.length,label:`specs${u?` · ${u}`:""}`,onClick:()=>t("specs")}),s.jsx(lt,{value:e.worktrees.length,label:`worktree${e.worktrees.length===1?"":"s"} · ${i.length} dev server${i.length===1?"":"s"} up`,onClick:()=>t("worktrees")}),s.jsx(lt,{value:o.length?`${o.length} running`:"Idle",label:"cohorte commands",onClick:()=>t("run")}),e.docker?s.jsx(lt,{value:"Docker",label:e.docker.file,onClick:()=>t("docker")}):null]}),s.jsx(U,{children:"Needs attention"}),a.length?s.jsx(ke,{children:a.map((c,h)=>s.jsxs("tr",{children:[s.jsx("td",{children:s.jsx(E,{tone:c.status==="bad"?"bad":"warn",children:c.status})}),s.jsx("td",{children:c.label}),s.jsxs("td",{children:[c.detail,c.fix?s.jsx("div",{className:"fix",children:`fix: ${c.fix}`}):null]})]},h))}):s.jsx(D,{children:"Nothing — every check passes."}),i.length?s.jsxs(s.Fragment,{children:[s.jsx(U,{children:"Running now"}),s.jsx(ke,{children:i.map(c=>s.jsxs("tr",{children:[s.jsx("td",{className:"mono",children:c.branch||c.path}),s.jsx("td",{children:s.jsx(E,{tone:c.dev?.status==="ready"?"ok":"",children:`dev · ${c.dev?.status}`})}),s.jsx("td",{children:s.jsx(S,{onClick:()=>{c.dev&&n(c.dev),t("worktrees")},children:"Logs"})})]},c.path))})]}):null,e.specs.length?s.jsxs(s.Fragment,{children:[s.jsx(U,{children:"Latest specs"}),s.jsx(ke,{children:e.specs.slice(0,5).map(c=>s.jsxs("tr",{className:"click",tabIndex:0,onClick:()=>{t("specs"),rs(c.id)},onKeyDown:h=>{h.key==="Enter"&&(t("specs"),rs(c.id))},children:[s.jsx("td",{className:"mono",children:c.id}),s.jsx("td",{children:c.title}),s.jsx("td",{children:s.jsx(E,{tone:gf[c.status]??"",children:c.status})})]},c.id))})]}):null]})}function Kv(e,t){for(let n=t-1;n>=0;n--){const r=e[n];if(r.kind==="text")return r.text}}const Yv=(e,t)=>!!e&&e!==t;function Gv({e,last:t}){switch(e.kind){case"text":return s.jsx("div",{className:"ev",children:e.text});case"tool":return s.jsx("div",{className:"ev muted mono",children:`▸ ${e.name} ${e.summary}`});case"tool_result":return e.error?s.jsx("div",{className:"ev error mono",children:`✗ ${e.text}`}):null;case"reply":return s.jsxs("div",{className:"ev reply",children:[s.jsx("span",{className:"muted",children:"you · "}),e.text]});case"resolved":return s.jsx("div",{className:"ev muted",children:`gate: ${e.decision}`});case"result":return s.jsxs("div",{className:`ev${e.ok?"":" error"}`,children:[s.jsx("strong",{children:e.ok?"Done":"Failed"}),e.costUsd!=null?` · ${ot(e.costUsd)}`:"",e.durationMs?` · ${rf(e.durationMs)}`:"",Yv(e.text,t)?s.jsx("div",{children:e.text}):null]});case"stderr":case"system":return s.jsx("div",{className:"ev error mono",children:e.text});default:return null}}function Xv({events:e}){return s.jsx("div",{className:"feed","aria-live":"polite",children:e.map((t,n)=>s.jsx(Gv,{e:t,last:Kv(e,n)},n))})}function qv({p:e,onRespond:t}){const[n,r]=P.useState(()=>{const i=e.questions?.[0];return e.advice?.choice&&i?{[i.question]:[e.advice.choice]}:{}}),l=(i,o)=>r(a=>({...a,[i]:o}));return e.deciding?s.jsxs(W,{className:"gate",children:[s.jsx(E,{tone:"info",children:"Decider"})," ",s.jsx("span",{className:"muted",children:"is checking whether what you already decided answers this…"}),(e.questions??[]).map(i=>s.jsx("div",{className:"gap-top",children:i.question},i.question))]}):s.jsxs(W,{tone:"warn",className:"gate",children:[s.jsx(E,{tone:"warn",children:"Question"}),e.advice?s.jsxs("div",{className:"advice",children:[s.jsx("span",{className:"muted",children:"Decider: "}),e.advice.choice?s.jsxs(s.Fragment,{children:["would pick ",s.jsx("strong",{children:e.advice.choice}),e.advice.rationale?` — ${e.advice.rationale}`:"",". "]}):null,s.jsx("span",{className:"muted",children:`Handed to you: ${e.advice.escalated}.`})]}):null,(e.questions??[]).map(i=>{const o=n[i.question]??[];return s.jsxs("fieldset",{className:"q",children:[s.jsxs("legend",{children:[i.header?`${i.header} — `:"",i.question]}),i.options.map(a=>s.jsxs("label",{className:"opt",children:[s.jsx("input",{type:i.multiSelect?"checkbox":"radio",name:i.question,checked:o.includes(a.label),onChange:u=>l(i.question,i.multiSelect?u.target.checked?o.concat(a.label):o.filter(c=>c!==a.label):[a.label])}),a.label,a.description?s.jsx("span",{className:"muted",children:` — ${a.description}`}):null]},a.label)),s.jsx("input",{className:"other",placeholder:"Other…","aria-label":"Other answer",onChange:a=>l(i.question,a.target.value?[a.target.value]:[])})]},i.question)}),s.jsx(S,{onClick:()=>void t(e.requestId,"allow",n),children:"Answer"})," ",s.jsx(S,{onClick:()=>void t(e.requestId,"deny"),children:"Skip"})]})}function jf({p:e,onRespond:t=Pm}){return e.kind==="question"?s.jsx(qv,{p:e,onRespond:t}):s.jsxs(W,{tone:"warn",className:"gate",children:[s.jsx(E,{tone:"warn",children:`Permission · ${e.tool}${e.via?` · ${e.via}`:""}`}),s.jsx(Cs,{children:e.summary}),e.reason?s.jsx("div",{className:"fix",children:e.reason}):null,s.jsx(S,{onClick:()=>void t(e.requestId,"allow"),children:"Allow"})," ",s.jsx(S,{onClick:()=>void t(e.requestId,"deny"),children:"Deny"})]})}const Jv=[["default","ask for edits"],["acceptEdits","accept edits"],["plan","plan only"]];function Zv({command:e}){const[t,n]=P.useState(""),r=l=>{l.preventDefault();const i=t.trim();i&&($m(i),n(""))};return s.jsxs("form",{className:"reply-box",onSubmit:r,children:[s.jsx("textarea",{rows:3,value:t,onChange:l=>n(l.target.value),placeholder:`Reply to ${e.split(" ")[0]} (same session)…`,"aria-label":"Reply to the command"}),s.jsx(S,{type:"submit",children:"Send"}),s.jsx(D,{children:"Goes to this Cohorte command only — it is not a general chat."})]})}const eg={done:"ok",failed:"bad",stopped:"warn",running:"info"};function tg({d:e,currentId:t}){const n=[...e.runs??[]].sort((r,l)=>l.startedAt.localeCompare(r.startedAt));return n.length?s.jsxs(s.Fragment,{children:[s.jsx(U,{children:"History"}),s.jsx(ke,{head:["Command","Status","Cost","Took","When"],children:n.map(r=>s.jsxs("tr",{className:`click${r.id===t?" current":""}`,tabIndex:0,"aria-current":r.id===t?"true":void 0,onClick:()=>void ns(r.id),onKeyDown:l=>{l.key==="Enter"&&ns(r.id)},children:[s.jsx("td",{className:"mono",children:r.command}),s.jsx("td",{children:s.jsx(E,{tone:eg[r.status]??"",children:r.status})}),s.jsx("td",{children:r.result?.costUsd!=null?ot(r.result.costUsd):""}),s.jsx("td",{children:rf(r.result?.durationMs)}),s.jsx("td",{className:"muted",children:Gn(r.startedAt)})]},r.id))})]}):null}function ng({d:e}){const{commands:t,form:n,run:r}=ce(),l=w(v=>v.tab),i=Ss(Yn(v=>v.status));P.useEffect(()=>{ta()},[]);const o=(e.runs??[]).find(v=>v.status==="running");P.useEffect(()=>{!r&&o&&ns(o.id)},[r,o?.id]),an(()=>ce.getState().poll(),1e3,l==="run"&&r?.status==="running"&&!i,`${r?.id}:${r?.status}`);const a=t??[],u=e.worktrees.filter(v=>!v.bare),c={wt:n.wt??u[0]?.path??"",cmd:n.cmd??a[0]?.name??"",args:n.args??"",mode:n.mode??"default"},h=a.find(v=>v.name===c.cmd),g=ce.getState().setForm,m=v=>{v.preventDefault(),Em(c)},y=r?.status==="running",k=()=>{const v=w.getState().sel;v&&r&&R.stopRun(v,r.id).then(()=>ce.getState().poll())};return s.jsxs("div",{children:[t&&!a.length?s.jsx(D,{children:"No /cohorte-* commands found in ~/.claude/commands — run `cohorte install`."}):null,s.jsxs("form",{className:"row-form wrap",onSubmit:m,children:[s.jsx("select",{"aria-label":"Worktree",value:c.wt,onChange:v=>g({wt:v.target.value}),children:u.map(v=>s.jsx("option",{value:v.path,children:`${v.main?"(main) ":""}${v.branch||v.path}`},v.path))}),s.jsx("select",{"aria-label":"Command",value:c.cmd,onChange:v=>g({cmd:v.target.value}),children:a.map(v=>s.jsx("option",{value:v.name,title:v.description,children:v.name},v.name))}),s.jsx("input",{"aria-label":"Argument",value:c.args,onChange:v=>g({args:v.target.value}),placeholder:"argument (feature id, text…)"}),s.jsx("select",{"aria-label":"Permission mode",value:c.mode,onChange:v=>g({mode:v.target.value}),children:Jv.map(([v,O])=>s.jsx("option",{value:v,children:O},v))}),s.jsx(S,{type:"submit",variant:"primary",disabled:y,children:"Run"})]}),s.jsx(D,{children:h?`${h.description}${h.argumentHint?` [${h.argumentHint}]`:""}`:""}),s.jsx(D,{children:"Headless run (claude -p): gates and questions appear below. Talking to the agent stays in Claude Code or Francois."}),r?s.jsxs(s.Fragment,{children:[s.jsxs(U,{plain:!0,children:[`${r.command} · ${r.status}`,y?s.jsxs(s.Fragment,{children:[" ",s.jsx(S,{onClick:k,children:"Stop"})]}):null]}),r.pending.map(v=>s.jsx(jf,{p:v},v.requestId)),s.jsx(Xv,{events:r.events}),!y&&r.sessionId?s.jsx(Zv,{command:r.command}):null]}):null,s.jsx(tg,{d:e,currentId:r?.id})]})}const Rn=Fe(()=>({preflight:null}));dn(()=>Rn.setState({preflight:null}));const da=()=>w.getState().sel,rg=e=>w.getState().act(async()=>{const t=da();if(!t)return;const n=await $s(r=>R.startDev(t,{worktree:e.path,confirmed:r}));Te.getState().watch(n.job)}),kf=(e,t=!1)=>w.getState().act(async()=>{const n=da();if(n){Rn.setState({preflight:null});try{const r=await $s(l=>R.createWorktree(n,{feature:e,confirmed:l,skipDockerCheck:t||void 0}));Te.getState().watch(r.job)}catch(r){if(!(r instanceof Qr)||!r.body.dockerPreflight)throw r;Rn.setState({preflight:{feature:e,...r.body.dockerPreflight,message:r.message}})}}}),lg=e=>w.getState().act(async()=>{const t=da();if(!t||!window.confirm(`Remove the worktree ${e.path}?
158
-
159
- Git refuses if it has uncommitted changes. The branch is kept.`))return;const n=await $s(r=>R.removeWorktree(t,{path:e.path,confirmed:r}));Te.getState().watch(n.job)});function sg(e){return e.startsWith("@@")?"hunk":e.startsWith("+++")||e.startsWith("---")||e.startsWith("diff ")||e.startsWith("index ")||e.startsWith("new file")||e.startsWith("deleted file")||e.startsWith("similarity")||e.startsWith("rename ")||e.startsWith("\\ No newline")?"meta":e.startsWith("+")?"add":e.startsWith("-")?"remove":"context"}const ig={added:"A",modified:"M",deleted:"D",renamed:"R",copied:"C",untracked:"?",changed:"T"};function og(){const{wt:e,base:t,files:n,file:r,error:l}=mt();if(!e)return null;const i=r?r.diff.split(`
160
- `):[];return s.jsxs("section",{className:"diff-panel","aria-label":"Diff",children:[s.jsxs(U,{children:[`Diff · ${e.split(/[\\/]/).pop()} vs ${t??"HEAD"} `,s.jsx(S,{onClick:km,children:"Close"})]}),l?s.jsx("div",{className:"error",role:"alert",children:l}):null,n?n.length?s.jsxs("div",{className:"diff-grid",children:[s.jsx("ul",{className:"file-list","aria-label":"Changed files",children:n.map(o=>s.jsx("li",{children:s.jsxs("button",{type:"button",className:`file${r?.file===o.path?" sel":""}`,onClick:()=>void jm(o.path),children:[s.jsx("span",{className:`badge badge-${o.status}`,title:o.status,children:ig[o.status]??"·"}),s.jsx("span",{className:"mono",children:o.path})]})},o.path))}),s.jsx("div",{className:"diff-view",children:r?s.jsxs("pre",{className:"diff","aria-label":`Diff of ${r.file}`,children:[i.map((o,a)=>s.jsx("div",{className:`dl dl-${sg(o)}`,children:o||" "},a)),r.truncated?s.jsx("div",{className:"dl dl-meta",children:"… diff truncated"}):null]}):s.jsx(D,{children:"Pick a file."})})]}):s.jsx(D,{children:"No changed files."}):s.jsx(D,{children:"Loading…"})]})}const ag=/^https?:\/\//i;function ug({g:e}){return e?e.error?s.jsx("div",{className:"muted",children:e.error}):s.jsxs("div",{className:"git-state",children:[e.ahead?s.jsx("span",{className:"mono",title:`${e.ahead} commit(s) ahead of ${e.upstream??"upstream"}`,children:`↑${e.ahead}`}):null,e.behind?s.jsx("span",{className:"mono",title:`${e.behind} commit(s) behind ${e.upstream??"upstream"}`,children:`↓${e.behind}`}):null,e.conflicted?s.jsx(E,{tone:"bad",children:`${e.conflicted} conflicted`}):null,e.clean?s.jsx("span",{className:"muted",children:"clean"}):s.jsx("span",{className:"muted mono",children:[e.staged&&`${e.staged} staged`,e.modified&&`${e.modified} modified`,e.untracked&&`${e.untracked} untracked`].filter(Boolean).join(" · ")})]}):null}function cg({g:e}){return e?.lastCommit?s.jsxs("div",{className:"muted last-commit",children:[s.jsx("span",{className:"mono",children:e.lastCommit.sha}),` ${e.lastCommit.subject} · ${e.lastCommit.when}`]}):null}function dg({g:e}){if(!e||e.error||!e.base)return s.jsx("span",{className:"muted",children:"–"});const t=e.diff;return t.files?s.jsxs("span",{className:"mono",title:`against ${e.base}`,children:[s.jsx("span",{className:"add",children:`+${t.insertions}`})," ",s.jsx("span",{className:"del",children:`−${t.deletions}`}),s.jsx("span",{className:"muted",children:` · ${t.files} file${t.files===1?"":"s"}`})]}):s.jsxs("span",{className:"muted",children:["no changes vs ",e.base]})}const fg=e=>e.state==="MERGED"?"info":e.state==="CLOSED"?"bad":e.draft?"":"ok";function hg({p:e}){if(!e)return null;const t=`#${e.number} ${e.draft?"draft":e.state.toLowerCase()}`,n=e.checks?` · checks ${e.checks==="success"?"✓":e.checks==="failure"?"✗":"…"}`:"",r=e.review?` · ${e.review.toLowerCase().replace(/_/g," ")}`:"",l=e.checks==="failure"?"bad":fg(e),i=`${t}${n}${r}`,o=`pill pill-${l||"idle"} pr-chip`;return ag.test(e.url)?s.jsx("a",{className:o,href:e.url,target:"_blank",rel:"noopener noreferrer",title:e.title,children:i}):s.jsx("span",{className:o,title:e.title,children:i})}const pg=/^https?:\/\/(localhost|127\.0\.0\.1|\[::1\]):\d+/;function mg({urls:e}){const t=(e??[]).filter(n=>pg.test(n));return t.length?s.jsx(s.Fragment,{children:t.map(n=>s.jsx("a",{className:"open-link mono",href:n,target:"_blank",rel:"noopener noreferrer",children:`Open ${n.replace(/^https?:\/\//,"")} ↗`},n))}):null}function vg(){const e=Rn(l=>l.preflight),t=w(l=>l.setTab),n=Te(l=>l.watch);if(!e)return null;const r=()=>void w.getState().act(async()=>{const l=w.getState().sel;Rn.setState({preflight:null}),l&&n((await R.dockerAct(l,{action:"up"})).job)});return s.jsxs(W,{tone:"warn",className:"gate",children:[s.jsx(E,{tone:"warn",children:"Docker is not ready"}),s.jsx("p",{children:e.message}),e.daemonUp?s.jsx(S,{onClick:r,children:"Start the stack"}):s.jsx(S,{onClick:()=>t("docker"),children:"Open the Docker tab"})," ",s.jsx(S,{onClick:()=>void kf(e.feature,!0),children:"Create anyway"})," ",s.jsx(S,{onClick:()=>Rn.setState({preflight:null}),children:"Cancel"}),e.daemonUp?null:s.jsx("div",{className:"fix",children:"Start Docker Desktop (or the docker service), then try again."})]})}function gg({d:e}){const[t,n]=P.useState(""),r=Te(a=>a.watch),l=ts(a=>a.git);P.useEffect(()=>{Zi()},[e.id,e.worktrees.length]),an(async()=>{await Zi()},2e4,!0,e.id);const i=a=>{a.preventDefault();const u=t.trim();u&&kf(u)},o=a=>!!a&&Qn.includes(a);return s.jsxs("div",{children:[s.jsx(D,{children:e.dev.command?s.jsxs(s.Fragment,{children:["Dev command: ",s.jsx("span",{className:"mono",children:e.dev.command})]}):"No commands.dev in this project’s profile — dev servers cannot be started from here."}),s.jsx(ke,{head:["Worktree","Branch","Changes","Dev server",""],children:e.worktrees.map(a=>{const u=l?.worktrees[a.path];return s.jsxs("tr",{children:[s.jsxs("td",{children:[s.jsx("span",{className:"mono",children:a.path}),a.main?s.jsxs(s.Fragment,{children:[" ",s.jsx(E,{children:"main"})]}):null,s.jsx(cg,{g:u})]}),s.jsxs("td",{children:[s.jsx("span",{className:"mono",children:a.branch||(a.bare?"bare":"detached")}),s.jsx(ug,{g:u})]}),s.jsxs("td",{children:[s.jsx(dg,{g:u}),u?.pull?s.jsx("div",{className:"gap-top",children:s.jsx(hg,{p:u.pull})}):null]}),s.jsxs("td",{children:[a.dev?s.jsx(E,{tone:a.dev.status==="ready"?"ok":a.dev.status==="failed"?"bad":"",children:a.dev.status}):s.jsx("span",{className:"muted",children:"stopped"}),s.jsx("div",{className:"open-links",children:s.jsx(mg,{urls:a.dev?.urls})})]}),s.jsx("td",{children:s.jsxs("div",{className:"actions",children:[o(a.dev?.status)&&a.dev?s.jsx(S,{onClick:()=>void Jd(a.dev.id),children:"Stop"}):e.dev.command&&!a.bare?s.jsx(S,{onClick:()=>void rg(a),children:"Start dev"}):null,a.dev?s.jsx(S,{onClick:()=>r(a.dev),children:"Logs"}):null,a.bare?null:s.jsx(S,{onClick:()=>void xm(a.path),children:"Diff"}),a.main?null:s.jsx(S,{onClick:()=>void lg(a),children:"Remove"})]})})]},a.path)})}),l&&!l.gh?s.jsx(D,{children:"Install and sign in to the GitHub CLI (gh) to see each branch’s pull request and checks here."}):null,s.jsx(og,{}),s.jsx(U,{children:"New worktree"}),s.jsxs("form",{className:"row-form",onSubmit:i,children:[s.jsx("input",{value:t,onChange:a=>n(a.target.value),placeholder:"feature-id (kebab-case)","aria-label":"Feature id"}),s.jsx(S,{type:"submit",children:"Create"})]}),s.jsx(D,{children:e.isolation.create?"Uses scripts/new-feature.sh (own DB and ports).":"Plain git worktree next to the repo, on a new branch."}),s.jsx(vg,{}),s.jsx(lf,{})]})}const yg=e=>e.error||e.missing||!e.summary||e.summary.bad?"bad":e.summary.warn?"warn":"ok",xg={dev:"worktrees",job:"worktrees",docker:"docker",run:"run"};function jg({p:e,running:t,pending:n}){const r=Object.entries(e.specCounts??{});return s.jsxs("button",{type:"button",className:"card home-card link",onClick:()=>void Vn(e.id),children:[s.jsxs("span",{className:"proj-name",children:[s.jsx(la,{tone:yg(e)}),e.title||e.name]}),s.jsx("span",{className:"muted home-line",children:e.missing?"folder missing":e.error?e.error:e.oneLiner||e.root}),e.summary?s.jsx("span",{className:"muted home-line",children:`${e.summary.ok} ok · ${e.summary.warn} to review · ${e.summary.bad} failing`}):null,s.jsxs("span",{className:"home-chips",children:[r.map(([l,i])=>s.jsx(E,{children:`${i} ${l}`},l)),t?s.jsx(E,{tone:"info",children:`${t} running`}):null,n?s.jsx(E,{tone:"warn",children:`${n} needs you`}):null]})]})}const zu={cp0:["CP0 · ticket to validate","tickets"],cp1:["CP1 · plan to approve","features"],cp2:["CP2 · course check","features"],cp3:["CP3 · ready to ship","features"],cp4:["CP4 · delivery to accept","tickets"],pr:["PR to merge","features"],question:["question","features"],permission:["permission","features"]};function kg(){const e=z(n=>n.inbox);P.useEffect(()=>{na()},[]);const t=async n=>{const[,r]=zu[n.kind];await Vn(n.projectId,n.kind==="question"||n.kind==="permission"?n.feature?"features":"overview":r),r==="tickets"?ra(n.ref):n.feature?await Ar(n.feature):(n.kind==="question"||n.kind==="permission")&&(await Zt(n.ref),z.getState().chat?.meta?.role==="po"?w.getState().setTab("tickets"):(w.getState().setTab("run"),await ns(n.ref)))};return s.jsxs(s.Fragment,{children:[s.jsx(U,{children:"Waiting for you"}),e.length?s.jsx("ul",{className:"activity",children:e.map(n=>s.jsx("li",{children:s.jsxs("button",{type:"button",className:"act-row",onClick:()=>void t(n),children:[s.jsx("span",{className:"mono act-proj",children:n.projectName}),s.jsx(E,{tone:"warn",children:zu[n.kind][0]}),s.jsxs("span",{className:"act-label",children:[n.title,s.jsx("span",{className:"muted",children:` — ${n.detail}`})]})]})},`${n.kind}:${n.projectId}:${n.ref}:${n.detail}`))}):s.jsx(D,{children:"Nothing waits on you."})]})}function wg(){const e=w(l=>l.projects),t=bn(l=>l.items),n=qd(t),r=[...t].sort((l,i)=>i.pending-l.pending||i.startedAt.localeCompare(l.startedAt));return e.length?s.jsxs("div",{children:[s.jsx("h2",{children:"Home"}),s.jsx(D,{children:`${e.length} project${e.length===1?"":"s"} on this machine`}),s.jsx(kg,{}),s.jsx(U,{children:"Projects"}),s.jsx("div",{className:"cards home-cards",children:e.map(l=>s.jsx(jg,{p:l,running:n[l.id]?.running??0,pending:n[l.id]?.pending??0},l.id))}),s.jsx(U,{children:"Activity"}),r.length?s.jsx("ul",{className:"activity",children:r.map(l=>s.jsx("li",{children:s.jsxs("button",{type:"button",className:"act-row",onClick:()=>void Vn(l.projectId,xg[l.kind]),children:[s.jsx("span",{className:"mono act-proj",children:l.projectName}),s.jsx(E,{tone:l.kind==="run"?"info":"",children:l.kind}),s.jsx("span",{className:"act-label",children:l.label}),s.jsx("span",{className:"muted",children:l.status}),l.pending?s.jsx(E,{tone:"warn",children:"needs you"}):null]})},`${l.kind}:${l.id}`))}):s.jsx(D,{children:"Nothing is running. Dev servers, Cohorte commands and Docker jobs show up here."})]}):s.jsxs(_e,{children:[s.jsx("h2",{children:"No project yet"}),"Add a repo that has a PIPELINE.md using the field on the left."]})}function ii(e,t){const n=[],r=new RegExp("```"+t+"[^\\n]*\\n([\\s\\S]*?)\\n?```","g");for(const l of e.matchAll(r))try{n.push(JSON.parse(l[1]))}catch{}return n}function Sg(e){return e.replace(/```cohorte-(ticket|plan|acceptance)[^\n]*\n[\s\S]*?\n?```/g,"").replace(/\n{3,}/g,`
161
-
162
- `).trim()}const Ue=(e,t=4e3)=>typeof e=="string"?e.trim().slice(0,t):"",ht=(e,t=40)=>Array.isArray(e)?e.map(n=>Ue(n,1e3)).filter(Boolean).slice(0,t):[],Tl=(e,t,n)=>typeof e=="string"&&t.includes(e)?e:n,Ng=["feature","bug","tech"],Cg=["high","medium","low"],wf=["S","M","L","?"];function Eg(e,t=48){return e.normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,t).replace(/-+$/,"")||"ticket"}function $g(e){if(!e||typeof e!="object")return null;const t=e,n=Ue(t.title,200);return n?{ref:Eg(Ue(t.ref,60)||n,60),title:n,type:Tl(t.type,Ng,"feature"),need:Ue(t.need),value:Ue(t.value),criteria:ht(t.criteria),outOfScope:ht(t.outOfScope??t.out_of_scope),priority:Tl(t.priority,Cg,"medium"),size:Tl(t.size,wf,"?"),parent:Ue(t.parent,100)||null}:null}function Pg(e){if(!e||typeof e!="object")return null;const t=e,n=Ue(t.summary);if(!n)return null;const r=(Array.isArray(t.criteria)?t.criteria:[]).map((i,o)=>{if(typeof i=="string")return{id:`C${o+1}`,text:i.trim()};const a=i||{};return{id:Ue(a.id,12)||`C${o+1}`,text:Ue(a.text,1e3)}}).filter(i=>i.text).slice(0,40),l=(Array.isArray(t.surfaces)?t.surfaces:[]).map(i=>{const o=i||{};return{key:Ue(o.key,60),tasks:ht(o.tasks)}}).filter(i=>i.key).slice(0,20);return{summary:n,criteria:r,contract:Ue(t.contract),surfaces:l,risks:ht(t.risks),assumptions:ht(t.assumptions),questions:ht(t.questions),size:Tl(t.size,wf,"?")}}function Tg(e){if(!e||typeof e!="object")return null;const t=e,n=Ue(t.summary);return n?{summary:n,changes:ht(t.changes),howToTest:ht(t.howToTest??t.how_to_test),outOfScope:ht(t.outOfScope??t.out_of_scope)}:null}function Sf({plan:e}){return s.jsxs(W,{className:"plan",children:[s.jsxs("div",{className:"plan-head",children:[s.jsx(E,{tone:"info",children:"Plan"}),s.jsx("span",{className:"muted",children:`size ${e.size}`})]}),s.jsx("p",{className:"pre-wrap",children:e.summary}),e.criteria.length?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"Acceptance criteria"}),s.jsx("ul",{className:"rc-list",children:e.criteria.map(t=>s.jsxs("li",{children:[s.jsx("span",{className:"mono",children:t.id})," ",t.text]},t.id))})]}):null,e.contract&&e.contract!=="none"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"Contract"}),s.jsx("p",{className:"pre-wrap",children:e.contract})]}):null,e.surfaces.length?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"Work by surface"}),e.surfaces.map(t=>s.jsxs("div",{children:[s.jsx("span",{className:"mono",children:t.key}),s.jsx("ul",{className:"rc-list",children:t.tasks.map((n,r)=>s.jsx("li",{children:n},r))})]},t.key))]}):null,e.risks.length?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"Risks"}),s.jsx("ul",{className:"rc-list",children:e.risks.map((t,n)=>s.jsx("li",{children:t},n))})]}):null,e.assumptions.length?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"Assumed without asking — veto any"}),s.jsx("ul",{className:"rc-list",children:e.assumptions.map((t,n)=>s.jsx("li",{children:t},n))})]}):null,e.questions.length?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"Still open"}),s.jsx("ul",{className:"rc-list",children:e.questions.map((t,n)=>s.jsx("li",{children:t},n))})]}):null]})}function _g({p:e,ticket:t}){const n=t?t.status==="validate"?"waiting for validation":t.status==="rejected"?"rejected":`validated · ${t.status}`:"proposed";return s.jsxs(W,{className:"proposal",children:[s.jsxs("div",{className:"plan-head",children:[s.jsx(E,{tone:t&&t.status!=="validate"&&t.status!=="rejected"?"ok":"warn",children:e.type==="bug"?"Bug":"Ticket"}),s.jsx("strong",{children:e.title}),s.jsx("span",{className:"muted",children:n})]}),e.need?s.jsx("p",{className:"pre-wrap",children:e.need}):null,e.criteria.length?s.jsx("ul",{className:"rc-list",children:e.criteria.map((r,l)=>s.jsx("li",{children:r},l))}):null,s.jsxs("div",{className:"rc-row",children:[s.jsx(E,{children:`priority ${e.priority}`}),s.jsx(E,{children:`size ${e.size}`})]})]})}function Lg({text:e,tickets:t,refs:n}){const r=[];return ii(e,"cohorte-ticket").forEach((l,i)=>{const o=$g(l);o&&r.push(s.jsx(_g,{p:o,ticket:t.find(a=>a.id===n[o.ref])??null},`t${i}`))}),ii(e,"cohorte-plan").forEach((l,i)=>{const o=Pg(l);o&&r.push(s.jsx(Sf,{plan:o},`p${i}`))}),ii(e,"cohorte-acceptance").forEach((l,i)=>{const o=Tg(l);o&&r.push(s.jsxs(W,{className:"proposal",children:[s.jsx(E,{tone:"info",children:"Acceptance note"}),s.jsx("p",{className:"pre-wrap",children:o.summary})]},`a${i}`))}),s.jsx(s.Fragment,{children:r})}function Rg({e,quiet:t,tickets:n,refs:r,agent:l}){switch(e.kind){case"text":{const i=Sg(e.text);return s.jsxs(s.Fragment,{children:[i?s.jsxs("div",{className:"bubble bubble-agent",children:[s.jsx("div",{className:"bubble-who",children:l}),s.jsx("div",{className:"pre-wrap",children:i})]}):null,s.jsx(Lg,{text:e.text,tickets:n,refs:r})]})}case"reply":return s.jsxs("div",{className:"bubble bubble-you",children:[s.jsx("div",{className:"bubble-who",children:"you"}),s.jsx("div",{className:"pre-wrap",children:e.text})]});case"tool":return t?null:s.jsx("div",{className:"ev muted mono",children:`▸ ${e.name} ${e.summary}`});case"tool_result":return!t&&e.error?s.jsx("div",{className:"ev error mono",children:`✗ ${e.text}`}):null;case"result":return e.ok?t?null:s.jsx("div",{className:"ev muted",children:`turn done${e.costUsd!=null?` · ${ot(e.costUsd)}`:""}`}):s.jsx("div",{className:"ev error",children:`The agent stopped: ${e.text}`});case"stderr":case"system":return t?null:s.jsx("div",{className:"ev error mono",children:e.text});default:return null}}function Nf({chat:e,agent:t,quiet:n=!1,tickets:r=[],refs:l={},onReply:i,replyHint:o,empty:a}){const[u,c]=P.useState(""),h=e.status==="running",g=m=>{m.preventDefault();const y=u.trim();y&&i&&(i(y),c(""))};return s.jsxs("div",{className:"chat",children:[s.jsxs("div",{className:"chat-feed","aria-live":"polite",children:[e.events.length?e.events.map((m,y)=>s.jsx(Rg,{e:m,quiet:n,tickets:r,refs:l,agent:t},y)):s.jsx(D,{children:a??"Starting…"}),h&&!e.pending.length?s.jsx("div",{className:"typing muted",children:`${t} is working…`}):null]}),e.pending.map(m=>s.jsx(jf,{p:m,onRespond:_m},m.requestId)),i?s.jsxs("form",{className:"reply-box",onSubmit:g,children:[s.jsx("textarea",{rows:3,value:u,onChange:m=>c(m.target.value),placeholder:o??"Your answer…","aria-label":"Your message",onKeyDown:m=>{m.key==="Enter"&&(m.metaKey||m.ctrlKey)&&g(m)}}),s.jsxs("div",{className:"actions",children:[s.jsx(S,{type:"submit",variant:"primary",disabled:h||!u.trim(),children:"Send"}),s.jsx(D,{children:h?"Wait for the answer to finish…":"⌘/Ctrl-Enter to send"})]})]}):null]})}const Dg=[{key:"validate",label:"To validate",statuses:["discussion","validate"],hint:"proposed by the PO — the requester validates (CP0)"},{key:"backlog",label:"Backlog",statuses:["backlog"],hint:"validated — a developer takes one"},{key:"framing",label:"Framing",statuses:["framing"],hint:"a developer and the lead plan it (CP1)"},{key:"building",label:"In progress",statuses:["building","checkpoint"],hint:"the autopilot builds; the developer signs off (CP3)"},{key:"pr",label:"PR open",statuses:["pr"],hint:"waiting for the merge"},{key:"acceptance",label:"Acceptance",statuses:["acceptance"],hint:"delivered — the requester checks it (CP4)"},{key:"done",label:"Done",statuses:["done"],hint:""}],zg={validate:"warn",acceptance:"warn",checkpoint:"warn",building:"info",pr:"info",done:"ok",rejected:"bad"};function Ig({t:e}){const[t,n]=P.useState(""),r=(z(o=>o.features)??[]).find(o=>o.id===e.id),l=e.conversation,i=()=>{w.getState().setTab("features"),Ar(e.id)};return s.jsxs(W,{className:"ticket-detail",children:[s.jsxs("div",{className:"plan-head",children:[s.jsx(E,{tone:zg[e.status]??"",children:e.status}),s.jsx("h3",{className:"ticket-title",children:e.title}),s.jsx("span",{className:"muted mono",children:e.id}),s.jsx(S,{className:"push-right",onClick:()=>ra(null),"aria-label":"Close",children:"Close"})]}),s.jsxs("div",{className:"rc-row",children:[s.jsx(E,{children:e.type}),s.jsx(E,{children:`priority ${e.priority}`}),s.jsx(E,{children:`size ${e.size}`}),e.requester?s.jsx(E,{children:`asked by ${e.requester}`}):null,e.parent?s.jsx(E,{children:`follows ${e.parent}`}):null,e.pr?s.jsx(E,{tone:"info",children:`PR ${e.pr}`}):null]}),e.need?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"Need"}),s.jsx("p",{className:"pre-wrap",children:e.need})]}):null,e.value?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"Value"}),s.jsx("p",{className:"pre-wrap",children:e.value})]}):null,e.criteria.length?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"Acceptance criteria"}),s.jsx("ul",{className:"rc-list",children:e.criteria.map((o,a)=>s.jsxs("li",{children:[s.jsx("span",{className:"mono",children:`C${a+1}`})," ",o]},a))})]}):null,e.outOfScope.length?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"Out of scope"}),s.jsx("ul",{className:"rc-list",children:e.outOfScope.map((o,a)=>s.jsx("li",{children:o},a))})]}):null,e.acceptance?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"Acceptance note"}),s.jsx("p",{className:"pre-wrap",children:e.acceptance.summary}),e.acceptance.changes.length?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"What changed"}),s.jsx("ul",{className:"rc-list",children:e.acceptance.changes.map((o,a)=>s.jsx("li",{children:o},a))})]}):null,e.acceptance.howToTest.length?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"How to check it"}),s.jsx("ol",{className:"rc-list",children:e.acceptance.howToTest.map((o,a)=>s.jsx("li",{children:o},a))})]}):null,e.acceptance.outOfScope.length?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"Not in this delivery"}),s.jsx("ul",{className:"rc-list",children:e.acceptance.outOfScope.map((o,a)=>s.jsx("li",{children:o},a))})]}):null]}):null,e.feedback.length?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"Feedback"}),s.jsx("ul",{className:"rc-list",children:e.feedback.map((o,a)=>s.jsx("li",{children:o},a))})]}):null,s.jsxs("div",{className:"checkpoint-actions",children:[e.status==="validate"||e.status==="discussion"?s.jsxs(s.Fragment,{children:[s.jsx(D,{children:"CP0 — is this ticket what was asked? Validating sends it to the backlog, where a developer picks it up."}),s.jsxs("div",{className:"actions",children:[s.jsx(S,{variant:"primary",onClick:()=>void $u(e.id,"validate"),children:"Validate"}),s.jsx(S,{onClick:()=>{window.confirm("Reject this ticket?")&&$u(e.id,"reject")},children:"Reject"}),l?s.jsx(S,{onClick:()=>void Zt(l),children:"Discuss it with the PO"}):null]})]}):null,e.status==="backlog"&&!r?s.jsxs(s.Fragment,{children:[s.jsx(D,{children:"For a developer: taking it creates its worktree and starts framing it with the lead."}),s.jsx("div",{className:"actions",children:s.jsx(S,{variant:"primary",onClick:()=>void Dm(e.id),children:"Take it"})})]}):null,r&&!["acceptance","done"].includes(e.status)?s.jsx("div",{className:"actions",children:s.jsx(S,{onClick:i,children:`Open the feature · ${r.phase}`})}):null,e.status==="acceptance"?s.jsxs(s.Fragment,{children:[s.jsx(D,{children:"CP4 — check the delivery against the note above. Is it what you asked for?"}),s.jsx("textarea",{rows:3,value:t,onChange:o=>n(o.target.value),placeholder:"What is not quite right (opens a follow-up with the PO)…","aria-label":"Acceptance feedback"}),s.jsxs("div",{className:"actions",children:[s.jsx(S,{variant:"primary",onClick:()=>void Pu(e.id,"accept",t.trim()||void 0),children:"It is what I asked for"}),s.jsx(S,{disabled:!t.trim(),onClick:()=>{Pu(e.id,"not-quite",t.trim()),n("")},children:"Not quite"})]})]}):null]})]})}function Og({tickets:e}){const t=z(n=>n.ticketId);return s.jsx("div",{className:"board board-flow",children:Dg.map(n=>{const r=e.filter(l=>n.statuses.includes(l.status));return s.jsxs("section",{className:"col","aria-label":n.label,title:n.hint,children:[s.jsxs("div",{className:"col-head",children:[s.jsx("span",{children:n.label}),s.jsx("span",{className:"count",children:r.length})]}),r.map(l=>s.jsxs("button",{type:"button",className:`spec-card ticket-card${t===l.id?" sel":""}`,onClick:()=>ra(l.id),children:[s.jsx("span",{className:"ticket-card-title",children:l.title}),s.jsxs("span",{className:"spec-card-meta",children:[s.jsx(E,{tone:l.type==="bug"?"bad":l.type==="tech"?"idle":"",children:l.type}),l.priority==="high"?s.jsx(E,{tone:"warn",children:"high"}):null,l.status==="checkpoint"?s.jsx(E,{tone:"warn",children:"to validate · dev"}):null]})]},l.id))]},n.key)})})}function Fg(){const e=z(o=>o.settings),[t,n]=P.useState(e?.settings.requester??""),[r,l]=P.useState(""),i=o=>{o.preventDefault();const a=r.trim();a&&(Lm(a,t.trim()),l(""))};return s.jsxs("form",{onSubmit:i,className:"new-request",children:[s.jsx("div",{className:"row-form",children:s.jsx("input",{value:t,onChange:o=>n(o.target.value),placeholder:"Your name (optional)","aria-label":"Your name"})}),s.jsx("textarea",{rows:4,value:r,onChange:o=>l(o.target.value),"aria-label":"Your request",placeholder:"Describe what you need, an idea, or a problem you hit — in your own words. The product owner will ask what it needs to know."}),s.jsx(S,{type:"submit",variant:"primary",disabled:!r.trim(),children:"Talk to the product owner"})]})}function Mg({onDone:e}){const[t,n]=P.useState(""),[r,l]=P.useState("tech"),[i,o]=P.useState(""),[a,u]=P.useState(""),c=h=>{h.preventDefault(),t.trim()&&Rm({title:t.trim(),type:r,need:i.trim(),criteria:a.split(`
163
- `).map(g=>g.trim()).filter(Boolean)}).then(e)};return s.jsxs("form",{onSubmit:c,className:"card new-ticket",children:[s.jsx(D,{children:"A ticket with nothing for the business to discuss (tech debt, an upgrade, a bug you found) goes straight to the backlog."}),s.jsxs("div",{className:"row-form",children:[s.jsx("input",{value:t,onChange:h=>n(h.target.value),placeholder:"Title","aria-label":"Title"}),s.jsxs("select",{value:r,onChange:h=>l(h.target.value),"aria-label":"Type",children:[s.jsx("option",{value:"tech",children:"tech"}),s.jsx("option",{value:"bug",children:"bug"}),s.jsx("option",{value:"feature",children:"feature"})]})]}),s.jsx("textarea",{rows:3,value:i,onChange:h=>o(h.target.value),placeholder:"Why, and what done looks like","aria-label":"Description"}),s.jsx("textarea",{rows:3,value:a,onChange:h=>u(h.target.value),placeholder:"Acceptance criteria, one per line (optional)","aria-label":"Acceptance criteria"}),s.jsxs("div",{className:"actions",children:[s.jsx(S,{type:"submit",variant:"primary",disabled:!t.trim(),children:"Add to the backlog"}),s.jsx(S,{onClick:e,children:"Cancel"})]})]})}function Ag({tickets:e}){const t=z(u=>u.tickets),n=z(u=>u.chat),r=Ss(Yn(u=>u.status)),l=w(u=>u.tab);an(()=>Kn(),1200,l==="tickets"&&n?.status==="running"&&!r,`${n?.id}:${n?.status}`);const i=t?.conversations??[],o=n&&n.meta?.role==="po"?n:null,a=o?i.find(u=>u.runId===o.id)?.tickets??{}:{};return s.jsxs("div",{className:"convo-grid",children:[s.jsxs("div",{children:[s.jsx(U,{children:"New request"}),s.jsx(Fg,{}),i.length?s.jsx(U,{children:"Conversations"}):null,s.jsx("ul",{className:"convo-list",children:i.map(u=>s.jsx("li",{children:s.jsxs("button",{type:"button",className:`act-row${o?.id===u.runId?" sel":""}`,onClick:()=>void Zt(u.runId),children:[s.jsx("span",{className:"act-label",children:u.title}),u.pending?s.jsx(E,{tone:"warn",children:"needs you"}):u.status==="running"?s.jsx(E,{tone:"info",children:"…"}):null,s.jsx("span",{className:"muted",children:`${Object.keys(u.tickets).length} ticket${Object.keys(u.tickets).length===1?"":"s"} · ${Gn(u.startedAt)}`})]})},u.runId))})]}),s.jsx("div",{children:o?s.jsx(Nf,{chat:o,agent:"Product owner",quiet:!0,tickets:e,refs:a,onReply:u=>void Tm(u),replyHint:"Answer the product owner…"}):s.jsx(_e,{children:"Start a request, or open a conversation."})})]})}function bg({d:e}){const t=z(h=>h.tickets),n=z(h=>h.ticketId),[r,l]=P.useState("board"),[i,o]=P.useState(!1);P.useEffect(()=>{fn()},[e.id]);const a=z(h=>h.chat);if(P.useEffect(()=>{a?.meta?.role==="po"&&l("talk")},[a?.id]),!t)return s.jsx(_e,{children:"Loading tickets…"});const u=t.tickets,c=n?u.find(h=>h.id===n):null;return s.jsxs("div",{children:[s.jsxs("div",{className:"toolbar between",children:[s.jsxs("div",{className:"seg-group",role:"tablist","aria-label":"Tickets view",children:[s.jsx("button",{type:"button",className:`seg${r==="board"?" sel":""}`,onClick:()=>l("board"),children:"Board"}),s.jsx("button",{type:"button",className:`seg${r==="talk"?" sel":""}`,onClick:()=>l("talk"),children:"Talk to the product owner"})]}),s.jsx("div",{className:"actions",children:s.jsx(S,{onClick:()=>o(h=>!h),children:"New tech ticket"})})]}),s.jsx(D,{children:t.tracker.kind==="obsidian"?`Tickets live in your Obsidian vault — ${t.tracker.dir}`:`Tickets live on this machine (${t.tracker.reason}).`}),i?s.jsx(Mg,{onDone:()=>o(!1)}):null,r==="board"?s.jsxs(s.Fragment,{children:[u.length?s.jsx(Og,{tickets:u.filter(h=>h.status!=="rejected")}):s.jsx(_e,{children:"No ticket yet. Talk to the product owner to create the first ones."}),c?s.jsx(Ig,{t:c}):null]}):s.jsx(Ag,{tickets:u})]})}const Cf={provisioning:["creating the worktree","info"],framing:["framing with the lead","info"],cp1:["CP1 · plan to validate","warn"],freezing:["freezing the spec","info"],autopilot:["autopilot","info"],cp2:["CP2 · course check","warn"],cp3:["CP3 · ready to ship","warn"],shipping:["opening the PR","info"],pr:["PR open","info"],merging:["merging","info"],closing:["closing (journal, acceptance note)","info"],acceptance:["waiting for acceptance","warn"],done:["done","ok"],abandoned:["abandoned","idle"],failed:["failed","bad"]};function Ug({f:e}){const t=["framing","cp1","autopilot","cp3","pr","acceptance","done"],r=(i=>({provisioning:0,framing:0,cp1:1,freezing:1,autopilot:2,cp2:2,cp3:3,shipping:3,pr:4,merging:4,closing:4,acceptance:5,done:6})[i]??-1)(e.phase),l=["Framing","CP1 Plan","Autopilot","CP3 Sign-off","PR","CP4 Acceptance","Done"];return s.jsx("ol",{className:"stepper timeline","aria-label":"Feature milestones",children:t.map((i,o)=>{const a=e.phase==="abandoned"||e.phase==="failed"?o<r?"done":"todo":o<r?"done":o===r?e.checkpoint?"blocked":"current":"todo";return s.jsxs("li",{className:`step step-${a==="blocked"?"current attn":a}`,children:[s.jsx("span",{className:"step-mark",children:a==="done"?"✓":o===r?"●":"○"}),l[o]]},i)})})}function Wg({f:e}){const[t,n]=P.useState(null),[r,l]=P.useState("");if(!e.decisions.length)return null;const i=o=>s.jsxs("tr",{children:[s.jsx("td",{children:s.jsx(E,{tone:o.by==="decider"?"info":"",children:o.by==="decider"?"decider":"you"})}),s.jsxs("td",{children:[o.question,o.header?s.jsx("span",{className:"muted",children:` · ${o.header}`}):null]}),s.jsxs("td",{children:[s.jsx("strong",{children:o.chosen}),o.source&&o.source.kind!=="none"?s.jsx("div",{className:"muted",children:`${o.source.kind}${o.source.ref?` · ${o.source.ref}`:""}${o.source.quote?` — “${o.source.quote}”`:""}`}):null]}),s.jsx("td",{children:o.contested?s.jsx(E,{tone:"bad",children:"contested"}):o.confirmed?s.jsx(E,{tone:"ok",children:"confirmed"}):o.by==="decider"?t===o.id?s.jsxs("div",{className:"contest",children:[s.jsx("textarea",{rows:2,value:r,onChange:a=>l(a.target.value),placeholder:"What you would have chosen, and why","aria-label":"Your note"}),s.jsxs("div",{className:"actions",children:[s.jsx(S,{onClick:()=>{Im(o.id,r.trim()),n(null),l("")},children:"Contest"}),s.jsx(S,{onClick:()=>n(null),children:"Cancel"})]})]}):s.jsx(S,{onClick:()=>n(o.id),children:"I would not have done that"}):null})]},o.id);return s.jsxs(s.Fragment,{children:[s.jsx(U,{children:"Decisions taken during the run"}),s.jsx(D,{children:"What the decider settled on your behalf (and why), and what you answered. Contesting teaches it; add a correction at CP3 to change the code."}),s.jsx(ke,{head:["By","Question","Answer",""],children:e.decisions.map(i)})]})}function Bg({f:e}){const[t,n]=P.useState(""),r=e.checkpoint;if(!r)return null;const l=(o,a=!1)=>{a&&!t.trim()||(Tu(o,t.trim()||void 0),n(""))},i=()=>{window.confirm("Abandon this feature? The worktree is kept; the ticket goes back to the backlog.")&&Tu("abandon")};return s.jsxs(W,{tone:"warn",className:"checkpoint",children:[s.jsxs("div",{className:"plan-head",children:[s.jsx(E,{tone:"warn",children:r.kind==="cp1"?"CP1 · Plan":r.kind==="cp2"?"CP2 · Course check":"CP3 · Ship sign-off"}),s.jsx("span",{children:r.reason}),s.jsx("span",{className:"muted push-right",children:Gn(r.openedAt)})]}),r.kind==="cp1"?s.jsxs(s.Fragment,{children:[e.plan?s.jsx(Sf,{plan:e.plan}):s.jsx(D,{children:"The lead has not posted a plan yet."}),s.jsx("textarea",{rows:2,value:t,onChange:o=>n(o.target.value),placeholder:"Optional: a last instruction with the approval, or what to change instead","aria-label":"Your note"}),s.jsxs("div",{className:"actions",children:[s.jsx(S,{variant:"primary",onClick:()=>l("approve"),children:"Approve the plan — build it"}),s.jsx(S,{disabled:!t.trim(),onClick:()=>l("reply",!0),children:"Ask the lead to change it"}),s.jsx(S,{onClick:i,children:"Abandon"})]}),s.jsx(D,{children:"After approval the lead freezes the spec and the autopilot builds, reviews, fixes and verifies. You are only asked again if something needs you."})]}):null,r.kind==="cp2"?s.jsxs(s.Fragment,{children:[s.jsx("textarea",{rows:3,value:t,onChange:o=>n(o.target.value),placeholder:"What should change (for Correct or Re-frame)","aria-label":"Your instruction"}),s.jsxs("div",{className:"actions",children:[s.jsx(S,{variant:"primary",onClick:()=>l("continue"),children:"Continue"}),s.jsx(S,{disabled:!t.trim(),onClick:()=>l("correct",!0),children:"Correct the code"}),s.jsx(S,{disabled:!t.trim(),onClick:()=>l("reframe",!0),children:"Re-frame with the lead"}),s.jsx(S,{onClick:i,children:"Abandon"})]})]}):null,r.kind==="cp3"?s.jsx(Hg,{f:e,text:t,setText:n,act:l,abandon:i}):null]})}function Hg({f:e,text:t,setText:n,act:r,abandon:l}){const i=e.dod.filter(a=>!a.done),o=e.decisions.filter(a=>a.by==="decider"&&!a.contested);return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"rc-row",children:[e.pipeline?.verdict?s.jsx(E,{tone:e.pipeline.verdict.verdict==="SHIP"?"ok":"bad",children:`review ${e.pipeline.verdict.verdict}`}):null,e.review?s.jsx(E,{children:`${e.review.findings.length} finding${e.review.findings.length===1?"":"s"} · ${e.review.deferred.length} deferred`}):null,e.diff?s.jsx(E,{children:`${e.diff.files} files · +${e.diff.insertions} −${e.diff.deletions}`}):null,s.jsx(E,{children:`${e.rounds} fix round${e.rounds===1?"":"s"}`}),s.jsx(E,{children:ot(e.costUsd)})]}),e.dod.length?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:`Definition of done — ${e.dod.length-i.length}/${e.dod.length}`}),s.jsx("ul",{className:"rc-list dod",children:e.dod.map((a,u)=>s.jsx("li",{className:a.done?"add":"muted",children:`${a.done?"✓":"○"} ${a.text}`},u))})]}):null,e.assumptions.length?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"label",children:"Assumed by the implementers — veto any"}),s.jsx("ul",{className:"rc-list",children:e.assumptions.map((a,u)=>s.jsx("li",{children:a},u))})]}):null,o.length?s.jsx(D,{children:`${o.length} decision${o.length===1?"":"s"} taken on your behalf — listed below. Shipping confirms them.`}):null,s.jsx("textarea",{rows:3,value:t,onChange:a=>n(a.target.value),placeholder:"What to correct before shipping","aria-label":"Correction"}),s.jsxs("div",{className:"actions",children:[s.jsx(S,{variant:"primary",onClick:()=>r("approve"),children:"Ship it — open the PR"}),s.jsx(S,{disabled:!t.trim(),onClick:()=>r("correct",!0),children:"Correct first"}),s.jsx(S,{onClick:l,children:"Abandon"})]})]})}function Vg({f:e}){return!e.pr||!["pr","merging"].includes(e.phase)?null:s.jsxs(W,{className:"checkpoint",children:[s.jsxs("div",{className:"plan-head",children:[s.jsx(E,{tone:"info",children:`PR #${e.pr.number}`}),s.jsx("a",{className:"open-link",href:e.pr.url,target:"_blank",rel:"noreferrer noopener",children:e.pr.url}),e.pr.checks?s.jsx(E,{tone:e.pr.checks==="success"?"ok":e.pr.checks==="failure"?"bad":"info",children:`checks ${e.pr.checks}`}):null]}),s.jsx(D,{children:"Merge it on the host when you are ready — cohorte notices — or let cohorte merge it now."}),s.jsx("div",{className:"actions",children:s.jsx(S,{disabled:e.phase==="merging"||e.pr.checks==="failure",onClick:()=>{window.confirm(`Merge PR #${e.pr?.number}?`)&&Om()},children:"Merge it"})})]})}function Qg({f:e}){const t=z(c=>c.chat),n=Ss(Yn(c=>c.status)),r=w(c=>c.tab),i=["framing","cp1","cp2","freezing","provisioning"].includes(e.phase)?e.leadRunId:e.currentRunId||e.leadRunId;P.useEffect(()=>{Zt(i)},[i]),an(()=>Kn(),1200,r==="features"&&t?.status==="running"&&!n,`${t?.id}:${t?.status}`),an(async()=>(await kt(),!0),5e3,r==="features"&&!n,e.id);const o=t?.meta?.role==="lead",[a,u]=Cf[e.phase]??[e.phase,""];return s.jsxs("div",{children:[s.jsxs("div",{className:"spec-head",children:[s.jsx(S,{onClick:()=>void Ar(null),children:"← All features"}),s.jsx("h2",{children:e.title}),s.jsx(E,{tone:u,children:a}),s.jsx("span",{className:"muted mono",children:e.branch??""}),s.jsx("span",{className:"muted",children:ot(e.costUsd)})]}),s.jsx(Ug,{f:e}),e.error?s.jsx(W,{tone:"bad",className:"gate",children:s.jsx("div",{className:"error pre-wrap",children:e.error})}):null,e.warning?s.jsx(W,{tone:"warn",className:"gate",children:s.jsx("div",{className:"pre-wrap",children:e.warning})}):null,s.jsx(Bg,{f:e}),s.jsx(Vg,{f:e}),e.stages.length?s.jsxs(s.Fragment,{children:[s.jsx(U,{children:"Stages"}),s.jsx(ke,{head:["Stage","Model","Status","Cost","When",""],children:e.stages.map(c=>s.jsxs("tr",{className:`click${t?.id===c.runId?" current":""}`,onClick:()=>void Zt(c.runId),tabIndex:0,onKeyDown:h=>{h.key==="Enter"&&Zt(c.runId)},children:[s.jsx("td",{className:"mono",children:c.stage}),s.jsx("td",{className:"mono",children:c.model}),s.jsx("td",{children:s.jsx(E,{tone:c.status==="done"?"ok":c.status==="running"?"info":"bad",children:c.status})}),s.jsx("td",{children:c.costUsd!=null?ot(c.costUsd):""}),s.jsx("td",{className:"muted",children:Gn(c.startedAt)}),s.jsx("td",{className:"muted",children:c.note??""})]},c.runId))})]}):null,s.jsx(Wg,{f:e}),s.jsxs("div",{className:"toolbar between",children:[s.jsx(U,{children:o?"Conversation with the lead":t?`Run · ${t.command}`:"Conversation"}),e.leadRunId&&!o?s.jsx(S,{onClick:()=>void Zt(e.leadRunId),children:"Open the lead conversation"}):null]}),t?s.jsx(Nf,{chat:t,agent:o?"Lead":"Agent",quiet:!1,onReply:o&&["framing","cp1","cp2"].includes(e.phase)?c=>void zm(c):void 0,replyHint:"Answer the lead, or tell it what you want…",empty:e.phase==="provisioning"?"Creating the worktree…":void 0}):s.jsx(D,{children:"No conversation yet."})]})}function Kg({features:e}){return e.length?s.jsx(ke,{head:["Feature","Where","Rounds","Cost","Updated"],children:e.map(t=>{const[n,r]=Cf[t.phase]??[t.phase,""];return s.jsxs("tr",{className:"click",tabIndex:0,onClick:()=>void Ar(t.id),onKeyDown:l=>{l.key==="Enter"&&Ar(t.id)},children:[s.jsxs("td",{children:[s.jsx("div",{children:t.title}),s.jsx("div",{className:"muted mono",children:t.id})]}),s.jsxs("td",{children:[s.jsx(E,{tone:r,children:n}),t.checkpoint?s.jsx("div",{className:"muted",children:t.checkpoint.reason}):null]}),s.jsx("td",{children:t.rounds}),s.jsx("td",{children:ot(t.costUsd)}),s.jsx("td",{className:"muted",children:Gn(t.updatedAt)})]},t.id)})}):s.jsx(_e,{children:"No feature in progress. Take a ticket from the backlog (Tickets tab) to start one."})}function Yg({d:e}){const t=z(l=>l.features),n=z(l=>l.featureId),r=z(l=>l.feature);return P.useEffect(()=>{ks(),n&&kt()},[e.id]),n?r?s.jsx(Qg,{f:r}):s.jsx(_e,{children:"Loading the feature…"}):t?s.jsx(Kg,{features:t}):s.jsx(_e,{children:"Loading features…"})}const Gg=[{v:"prudent",label:"Prudent",text:"The decider only settles internal, reversible choices that a written decision (plan, spec, decisions, your past answers) answers word for word — unanimously."},{v:"balanced",label:"Balanced",text:"Also choices only you would notice (a library, a layout) when something you already decided answers them, unanimously. The default."},{v:"autonomous",label:"Autonomous",text:"Also accepts a precedent in the code and a 2-out-of-3 vote. Behaviour, contracts, security, cost and irreversible steps are always yours, whatever the level."}],Xg=[{r:"po",label:"Product owner (business conversations)"},{r:"lead",label:"Lead (framing with you)"},{r:"build",label:"Build stage"},{r:"implementer",label:"Implementer agents"},{r:"review",label:"Review stage"},{r:"fix",label:"Fix stage"},{r:"verify",label:"Verify stage"},{r:"ship",label:"Ship stage"},{r:"learn",label:"Learning journal"},{r:"acceptance",label:"Acceptance note"},{r:"productMap",label:"Product map"},{r:"decider",label:"Decider — first vote"},{r:"deciderEscalation",label:"Decider — on a split vote"}];function qg(){const e=z(a=>a.settings),[t,n]=P.useState(""),[r,l]=P.useState("");if(!e)return null;const i=e.tracker,o=a=>{a.preventDefault(),t.trim()&&Mm(t.trim(),r.trim())};return s.jsxs(W,{children:[i.kind==="obsidian"?s.jsxs(s.Fragment,{children:[s.jsx(E,{tone:"ok",children:"Obsidian connected"}),s.jsx("div",{className:"mono gap-top",children:i.board}),s.jsx(D,{children:`Tickets are notes in ${i.dir}. The board is moved for you at every step.`})]}):s.jsxs(s.Fragment,{children:[s.jsx(E,{tone:"warn",children:"Local tickets"}),s.jsx(D,{children:i.reason})]}),s.jsxs("form",{onSubmit:o,className:"gap-top",children:[s.jsxs("div",{className:"row-form wrap",children:[s.jsx("input",{value:t,onChange:a=>n(a.target.value),placeholder:"Vault folder — the absolute path you open in Obsidian","aria-label":"Obsidian vault path"}),s.jsx("input",{value:r,onChange:a=>l(a.target.value),placeholder:`Board file in the vault (default ${i.projectName??"<project>"}/Tasks.md)`,"aria-label":"Board file"}),s.jsx(S,{type:"submit",disabled:!t.trim(),children:i.kind==="obsidian"?"Reconnect":"Connect Obsidian"})]}),s.jsx(D,{children:"Creates the board (company layout) if it does not exist, and a Tickets folder next to it. Needs the Obsidian Kanban plugin to show the board."})]})]})}function Jg(){const e=z(a=>a.settings),t=z(a=>a.learning),n=w(a=>a.sel),[r,l]=P.useState(null);if(P.useEffect(()=>{ws()},[n]),P.useEffect(()=>{e&&l(e.settings)},[e]),!e||!r)return s.jsx(_e,{children:"Loading settings…"});const i=a=>l({...r,...a}),o=JSON.stringify(r)!==JSON.stringify(e.settings);return s.jsxs("div",{children:[s.jsx(U,{children:"Where tickets live"}),s.jsx(qg,{}),s.jsx(U,{children:"Product map"}),s.jsxs(W,{children:[e.productMap.exists?s.jsxs(s.Fragment,{children:[s.jsx(E,{tone:"ok",children:"PRODUCT.md"})," ",s.jsx("span",{className:"muted",children:`updated ${Gn(e.productMap.updated??"")}`})]}):s.jsx(E,{tone:"warn",children:"No product map yet"}),s.jsx(D,{children:"What the product does, in business language, discovered from the code. The product owner reads it so it never proposes what already exists. Refresh it after a few merges."}),s.jsx("div",{className:"actions gap-top",children:s.jsx(S,{onClick:()=>void Am(),children:e.productMap.exists?"Refresh the product map":"Generate the product map"})})]}),s.jsx(U,{children:"Autopilot"}),s.jsxs(W,{children:[s.jsxs("label",{className:"opt",children:[s.jsx("input",{type:"checkbox",checked:r.autopilot,onChange:a=>i({autopilot:a.target.checked})}),"Run the stages between checkpoints on its own (build → review → fix → verify)"]}),s.jsxs("div",{className:"row-form wrap",children:[s.jsxs("label",{className:"field",children:["Fix rounds before asking you ",s.jsx("input",{type:"number",min:1,max:8,value:r.maxRounds,onChange:a=>i({maxRounds:Number(a.target.value)})})]}),s.jsxs("label",{className:"field",children:["Merge method ",s.jsxs("select",{value:r.mergeMethod,onChange:a=>i({mergeMethod:a.target.value}),children:[s.jsx("option",{value:"squash",children:"squash"}),s.jsx("option",{value:"merge",children:"merge"}),s.jsx("option",{value:"rebase",children:"rebase"})]})]}),s.jsxs("label",{className:"field",children:["Default requester name ",s.jsx("input",{value:r.requester,onChange:a=>i({requester:a.target.value}),placeholder:"who usually talks to the PO"})]})]})]}),s.jsx(U,{children:"Decider"}),s.jsxs(W,{children:[s.jsx(D,{children:"Questions an agent asks mid-run go to the decider first. It answers only what you already settled, cites its source, and hands you the rest with its reading. Everything it decided is listed at CP3."}),Gg.map(a=>s.jsxs("label",{className:"opt choice",children:[s.jsx("input",{type:"radio",name:"autonomy",checked:r.autonomy===a.v,onChange:()=>i({autonomy:a.v})}),s.jsx("strong",{children:a.label})," ",s.jsxs("span",{className:"muted",children:["— ",a.text]})]},a.v)),s.jsx("div",{className:"row-form",children:s.jsxs("label",{className:"field",children:["Votes per question ",s.jsx("input",{type:"number",min:1,max:7,value:r.deciderVotes,onChange:a=>i({deciderVotes:Number(a.target.value)})})]})})]}),s.jsx(U,{children:"Models"}),s.jsxs(W,{children:[s.jsx(D,{children:"Each role runs on its own model: the strongest where judgment is the product, a lighter one where a frozen spec already did the thinking. An alias (opus, sonnet, haiku, fable) or a full model id. A failed stage retries one model up."}),s.jsx(ke,{children:Xg.map(({r:a,label:u})=>s.jsxs("tr",{children:[s.jsx("td",{children:u}),s.jsx("td",{children:s.jsx("input",{className:"mono",value:r.models[a],onChange:c=>i({models:{...r.models,[a]:c.target.value}}),"aria-label":u})}),s.jsx("td",{className:"muted",children:r.models[a]!==e.defaults.models[a]?`default ${e.defaults.models[a]}`:""})]},a))})]}),s.jsxs("div",{className:"actions gap-top",children:[s.jsx(S,{variant:"primary",disabled:!o,onClick:()=>void Fm(r),children:"Save"}),s.jsx(S,{disabled:!o,onClick:()=>l(e.settings),children:"Discard"})]}),t?s.jsxs(s.Fragment,{children:[s.jsx(U,{children:"What it learned"}),s.jsxs("div",{className:"cards",children:[s.jsxs(W,{children:[s.jsx("div",{className:"stat-v",children:t.decisions.byDecider}),s.jsx("div",{className:"muted",children:"decided for you"})]}),s.jsxs(W,{children:[s.jsx("div",{className:"stat-v",children:t.decisions.confirmed}),s.jsx("div",{className:"muted",children:"confirmed at CP3"})]}),s.jsxs(W,{tone:t.decisions.contested?"warn":void 0,children:[s.jsx("div",{className:"stat-v",children:t.decisions.contested}),s.jsx("div",{className:"muted",children:"contested"})]}),s.jsxs(W,{children:[s.jsx("div",{className:"stat-v",children:t.preferences}),s.jsx("div",{className:"muted",children:"answers remembered"})]})]}),t.stages.length?s.jsx(ke,{head:["Stage","Model","Runs","Finished","Cost"],children:t.stages.map(a=>s.jsxs("tr",{children:[s.jsx("td",{className:"mono",children:a.stage}),s.jsx("td",{className:"mono",children:a.model}),s.jsx("td",{children:a.runs}),s.jsx("td",{children:`${a.ok}/${a.runs}`}),s.jsx("td",{children:ot(a.costUsd)})]},`${a.stage}|${a.model}`))}):null,s.jsx(D,{children:"Rules for the agents come from /cohorte-retro: it reads the journal every merged feature leaves, and you ratify each rule."})]}):null]})}const Ef="cohorte-theme";function $f(){try{const e=localStorage.getItem(Ef);if(e==="dark"||e==="light")return e}catch{}return typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}function Pf(e){document.documentElement.dataset.theme=e;try{localStorage.setItem(Ef,e)}catch{}}function Zg(){const[e,t]=P.useState(()=>document.documentElement.dataset.theme==="light"?"light":$f()),n=()=>{const r=e==="dark"?"light":"dark";Pf(r),t(r)};return s.jsx("button",{type:"button",className:"btn icon",onClick:n,"aria-label":`Switch to ${e==="dark"?"light":"dark"} theme`,title:"Toggle theme",children:e==="dark"?s.jsx(wv,{size:14}):s.jsx(jv,{size:14})})}const ey={connecting:"connecting",live:"live",reconnecting:"reconnecting",polling:"polling"},ty={connecting:"Connecting to the live update stream",live:"Live: changes are pushed as they happen",reconnecting:"The live stream dropped — reconnecting",polling:"Live stream unavailable — refreshing on a timer"};async function ny(){const{notify:e,setNotify:t}=He.getState();if(e){t(!1);return}try{if(typeof Notification>"u"){w.getState().setError("This browser has no notification support.");return}(Notification.permission==="granted"?"granted":await Notification.requestPermission())==="granted"?t(!0):w.getState().setError("Notifications are blocked for this page — allow them in the browser’s site settings.")}catch{w.getState().setError("Could not enable notifications here.")}}function Iu(){const e=Yn(l=>l.status),{notify:t,setPalette:n,setHelp:r}=He();return s.jsxs("div",{className:"topbar",children:[s.jsxs("span",{className:`live live-${e}`,title:ty[e],role:"status",children:[s.jsx("span",{className:"live-dot","aria-hidden":"true"}),ey[e]]}),s.jsxs("button",{type:"button",className:"btn icon",onClick:()=>n(!0),"aria-label":"Open the command palette",title:"Command palette (Ctrl/⌘ K)",children:[s.jsx(kv,{size:14}),s.jsx("span",{className:"kbd",children:"⌘K"})]}),s.jsx("button",{type:"button",className:"btn icon",onClick:()=>void ny(),"aria-pressed":t,"aria-label":t?"Turn notifications off":"Turn notifications on",title:t?"Notifications on: runs that need you or finish while this tab is hidden":"Notify me when a run needs me or finishes",children:t?s.jsx(vv,{size:14}):s.jsx(mv,{size:14})}),s.jsx("button",{type:"button",className:"btn icon",onClick:()=>r(!0),"aria-label":"Keyboard shortcuts",title:"Keyboard shortcuts (?)",children:s.jsx(gv,{size:14})}),s.jsx(Zg,{})]})}const ry={overview:e=>s.jsx(Qv,{d:e}),health:e=>s.jsx(lv,{d:e}),specs:e=>s.jsx(Vv,{d:e}),run:e=>s.jsx(ng,{d:e}),worktrees:e=>s.jsx(gg,{d:e}),docker:e=>s.jsx(nv,{d:e}),cost:()=>s.jsx(Jm,{}),tickets:e=>s.jsx(bg,{d:e}),features:e=>s.jsx(Yg,{d:e}),settings:()=>s.jsx(Jg,{})},ly=js.map(([e,t])=>({id:e,label:t}));function sy(){const{projects:e,sel:t,detail:n,tab:r,error:l,busy:i}=w(),o=u=>ia(u),a=e.find(u=>u.id===t);return!t||!a?s.jsxs("main",{className:"main",children:[s.jsx(Iu,{}),l?s.jsx(br,{children:l}):null,s.jsx(wg,{})]}):s.jsxs("main",{className:"main",children:[s.jsx(Iu,{}),l?s.jsx(br,{children:l}):null,a?s.jsxs("header",{children:[s.jsx("h2",{children:a.title||a.name}),s.jsx(D,{children:a.oneLiner??""}),s.jsx(D,{mono:!0,children:a.root}),s.jsx("div",{className:"head-actions",children:s.jsx(S,{onClick:()=>{window.confirm("Remove this project from the dashboard? Nothing on disk is touched.")&&um(a.id)},children:"Remove from dashboard"})})]}):null,s.jsx(qm,{tabs:ly,value:r,onChange:o,label:"Project sections"}),s.jsx("div",{id:"tabpanel",role:"tabpanel","aria-labelledby":`tab-${r}`,children:n?ry[r](n):s.jsx(_e,{children:i?"Loading…":"Nothing to show."})})]})}const iy={overview:"Overview",health:"Health",specs:"Specs",run:"Run",worktrees:"Worktrees",docker:"Docker",cost:"Cost"};function oy(e,t,n){const r=[{id:"home",group:"Go to",label:"Home",hint:"all projects and activity",action:{kind:"home"}}];if(t){for(const[l,i]of Object.entries(to))r.push({id:`tab:${i}`,group:"Go to",label:iy[i]??i,hint:`g ${l}`,action:{kind:"tab",tab:i}});for(const l of n?.specs??[]){const i=l.pipeline?.next;i&&r.push({id:`run:${l.id}`,group:"Run",label:`Run /${i.command} ${i.args}`,hint:i.why,action:{kind:"run",specId:l.id}})}}for(const l of e)r.push({id:`p:${l.id}`,group:"Projects",label:l.title||l.name,hint:l.root,action:{kind:"project",id:l.id}});return r}function ay(e,t){const n=t.toLowerCase().split(/\s+/).filter(Boolean);return n.length?e.filter(r=>{const l=`${r.label} ${r.hint}`.toLowerCase();return n.every(i=>l.includes(i))}):e}function uy(e){const t=e.action,n=w.getState();if(t.kind==="home")ea();else if(t.kind==="project")Vn(t.id);else if(t.kind==="tab")tf(t.tab);else{const r=n.detail?.specs.find(i=>i.id===t.specId),l=r&&n.detail?pf(r,n.detail.worktrees):null;l&&nf(l)}}function cy(){const e=He(v=>v.paletteOpen),t=He(v=>v.setPalette),{projects:n,sel:r,detail:l}=w(),[i,o]=P.useState(""),[a,u]=P.useState(0),c=P.useRef(null),h=P.useMemo(()=>oy(n,r,l),[n,r,l]),g=P.useMemo(()=>ay(h,i),[h,i]);if(P.useEffect(()=>{e&&(o(""),u(0),setTimeout(()=>c.current?.focus(),0))},[e]),P.useEffect(()=>{u(0)},[i]),!e)return null;const m=v=>{v&&(t(!1),uy(v))},y=v=>{v.key==="Escape"?(v.preventDefault(),t(!1)):v.key==="ArrowDown"?(v.preventDefault(),u(O=>Math.min(g.length-1,O+1))):v.key==="ArrowUp"?(v.preventDefault(),u(O=>Math.max(0,O-1))):v.key==="Enter"&&(v.preventDefault(),m(g[a]))};let k="";return s.jsx("div",{className:"overlay",onMouseDown:v=>{v.target===v.currentTarget&&t(!1)},children:s.jsxs("div",{className:"dialog palette",role:"dialog","aria-modal":"true","aria-label":"Command palette",onKeyDown:y,children:[s.jsx("input",{ref:c,value:i,onChange:v=>o(v.target.value),placeholder:"Jump to a project, a tab, or run a next step…","aria-label":"Search commands",role:"combobox","aria-expanded":"true","aria-controls":"palette-list","aria-activedescendant":g[a]?`pal-${g[a].id}`:void 0}),s.jsx("ul",{id:"palette-list",role:"listbox",className:"palette-list",children:g.length?g.map((v,O)=>{const f=v.group!==k?s.jsx("li",{className:"palette-group",role:"presentation",children:v.group},`g-${v.group}`):null;return k=v.group,[f,s.jsxs("li",{id:`pal-${v.id}`,role:"option","aria-selected":O===a,className:`palette-item${O===a?" sel":""}`,onMouseMove:()=>u(O),onClick:()=>m(v),children:[s.jsx("span",{children:v.label}),s.jsx("span",{className:"muted mono palette-hint",children:v.hint})]},v.id)]}):s.jsx("li",{className:"palette-empty",role:"presentation",children:"No match"})})]})})}function dy(){const e=w(r=>r.tab),t=Te(r=>r.job),n=Ss(Yn(r=>r.status));return an(()=>Te.getState().poll(),1200,!!t&&(e==="worktrees"||e==="docker")&&Qn.includes(t.status)&&!n,`${t?.id}:${t?.status}`),null}const fy=js.map(([e])=>e);function hy(){const e=w(n=>n.sel),t=w(n=>n.tab);return P.useEffect(()=>{const n=sm(e,t);location.hash!==n&&history.pushState(null,"",`${location.pathname}${n}`)},[e,t]),P.useEffect(()=>{const n=()=>{const r=Gd(location.hash,fy),l=w.getState();if(!r.projectId){ea();return}if(!l.projects.some(o=>o.id===r.projectId))return;const i=Zo(r.tab)?r.tab:"overview";r.projectId!==l.sel?Vn(r.projectId,i):i!==l.tab&&(l.setTab(i),i==="run"&&ta(),i==="cost"&&sa(),ef(i))};return window.addEventListener("hashchange",n),window.addEventListener("popstate",n),()=>{window.removeEventListener("hashchange",n),window.removeEventListener("popstate",n)}},[]),null}function py(){const e=He(n=>n.helpOpen),t=He(n=>n.setHelp);return P.useEffect(()=>{if(!e)return;const n=r=>{r.key==="Escape"&&t(!1)};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,t]),e?s.jsx("div",{className:"overlay",onMouseDown:n=>{n.target===n.currentTarget&&t(!1)},children:s.jsxs("div",{className:"dialog",role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",children:[s.jsx("h2",{children:"Keyboard shortcuts"}),s.jsx("dl",{className:"shortcuts",children:Qm.map(([n,r])=>s.jsxs("div",{children:[s.jsx("dt",{className:"kbd",children:n}),s.jsx("dd",{children:r})]},n))}),s.jsx(S,{onClick:()=>t(!1),children:"Close"})]})}):null}function my(){const e=bn(t=>ym(t.items));return P.useEffect(()=>{document.title=gm(e)},[e]),null}function vy(){return P.useEffect(()=>{es&&(cm(Gd(location.hash,js.map(([e])=>e))),Wm())},[]),es?s.jsxs("div",{className:"layout",children:[s.jsx(Hm,{}),s.jsx(sy,{}),s.jsx(dy,{}),s.jsx(hy,{}),s.jsx(Xm,{}),s.jsx(my,{}),s.jsx(cy,{}),s.jsx(py,{})]}):s.jsx(_e,{children:"Open the URL printed by `cohorte ui` — it carries this session’s token."})}Pf($f());Yd(document.getElementById("root")).render(s.jsx(P.StrictMode,{children:s.jsx(vy,{})}));