@caddis/cli 0.4.113 → 0.4.115

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.
Files changed (33) hide show
  1. package/bundles/antigravity-plugin/plugin.json +1 -1
  2. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_exit.cpython-311.pyc +0 -0
  3. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_file_lock.cpython-311.pyc +0 -0
  4. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_frontmatter.cpython-311.pyc +0 -0
  5. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_redact.cpython-311.pyc +0 -0
  6. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_roadmap.cpython-311.pyc +0 -0
  7. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_rows.cpython-311.pyc +0 -0
  8. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_status.cpython-311.pyc +0 -0
  9. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_tidy.cpython-311.pyc +0 -0
  10. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_todo.cpython-311.pyc +0 -0
  11. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_workstreams.cpython-311.pyc +0 -0
  12. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc +0 -0
  13. package/bundles/antigravity-plugin/scripts/caddis_coordinate.py +107 -1
  14. package/bundles/antigravity-plugin/scripts/caddis_guide.json +34 -7
  15. package/bundles/antigravity-plugin/scripts/caddis_stories.py +760 -0
  16. package/bundles/antigravity-plugin/skills/_registry.md +1 -0
  17. package/bundles/antigravity-plugin/skills/coordinate/SKILL.md +6 -2
  18. package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +15 -0
  19. package/bundles/antigravity-plugin/skills/implement/SKILL.md +5 -0
  20. package/bundles/antigravity-plugin/skills/stories/SKILL.md +50 -0
  21. package/bundles/manifest.json +2 -2
  22. package/dist/cli.js +207 -113
  23. package/dist/ui/assets/{Activity-B816JVqx.js → Activity-CITEjSUJ.js} +1 -1
  24. package/dist/ui/assets/Benchmarks-B2_1oerW.css +1 -0
  25. package/dist/ui/assets/Benchmarks-ChQoYa0P.js +1 -0
  26. package/dist/ui/assets/{Guide-CnL1DiTr.js → Guide-9Ob-m7gx.js} +1 -1
  27. package/dist/ui/assets/{Palette-BKM_A64G.js → Palette-CinCoveU.js} +1 -1
  28. package/dist/ui/assets/{RoadmapTab-DhC4-kqv.js → RoadmapTab-BeD4-8IU.js} +2 -2
  29. package/dist/ui/assets/{external-link-DagTFCsV.js → external-link-D_rks7KV.js} +1 -1
  30. package/dist/ui/assets/index-CFKn_GzG.js +231 -0
  31. package/dist/ui/index.html +1 -1
  32. package/package.json +1 -1
  33. package/dist/ui/assets/index-Bj5qA-fq.js +0 -226
@@ -0,0 +1,231 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Palette-CinCoveU.js","assets/external-link-D_rks7KV.js","assets/Palette-BIlBqNvr.css","assets/Guide-9Ob-m7gx.js","assets/Guide-Bict51LS.css","assets/Activity-CITEjSUJ.js","assets/Benchmarks-ChQoYa0P.js","assets/Benchmarks-B2_1oerW.css"])))=>i.map(i=>d[i]);
2
+ var si={exports:{}},Ar={},li={exports:{}},le={};/**
3
+ * @license React
4
+ * react.production.min.js
5
+ *
6
+ * Copyright (c) Facebook, Inc. and its affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var Ec;function jh(){if(Ec)return le;Ec=1;var o=Symbol.for("react.element"),l=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),j=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),$=Symbol.iterator;function C(k){return k===null||typeof k!="object"?null:(k=$&&k[$]||k["@@iterator"],typeof k=="function"?k:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,F={};function I(k,T,ne){this.props=k,this.context=T,this.refs=F,this.updater=ne||L}I.prototype.isReactComponent={},I.prototype.setState=function(k,T){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,T,"setState")},I.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function te(){}te.prototype=I.prototype;function X(k,T,ne){this.props=k,this.context=T,this.refs=F,this.updater=ne||L}var ke=X.prototype=new te;ke.constructor=X,_(ke,I.prototype),ke.isPureReactComponent=!0;var J=Array.isArray,se=Object.prototype.hasOwnProperty,ue={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function Y(k,T,ne){var oe,ce={},de=null,ve=null;if(T!=null)for(oe in T.ref!==void 0&&(ve=T.ref),T.key!==void 0&&(de=""+T.key),T)se.call(T,oe)&&!q.hasOwnProperty(oe)&&(ce[oe]=T[oe]);var pe=arguments.length-2;if(pe===1)ce.children=ne;else if(1<pe){for(var _e=Array(pe),nt=0;nt<pe;nt++)_e[nt]=arguments[nt+2];ce.children=_e}if(k&&k.defaultProps)for(oe in pe=k.defaultProps,pe)ce[oe]===void 0&&(ce[oe]=pe[oe]);return{$$typeof:o,type:k,key:de,ref:ve,props:ce,_owner:ue.current}}function ie(k,T){return{$$typeof:o,type:k.type,key:T,ref:k.ref,props:k.props,_owner:k._owner}}function Ne(k){return typeof k=="object"&&k!==null&&k.$$typeof===o}function tt(k){var T={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(ne){return T[ne]})}var M=/\/+/g;function re(k,T){return typeof k=="object"&&k!==null&&k.key!=null?tt(""+k.key):T.toString(36)}function ge(k,T,ne,oe,ce){var de=typeof k;(de==="undefined"||de==="boolean")&&(k=null);var ve=!1;if(k===null)ve=!0;else switch(de){case"string":case"number":ve=!0;break;case"object":switch(k.$$typeof){case o:case l:ve=!0}}if(ve)return ve=k,ce=ce(ve),k=oe===""?"."+re(ve,0):oe,J(ce)?(ne="",k!=null&&(ne=k.replace(M,"$&/")+"/"),ge(ce,T,ne,"",function(nt){return nt})):ce!=null&&(Ne(ce)&&(ce=ie(ce,ne+(!ce.key||ve&&ve.key===ce.key?"":(""+ce.key).replace(M,"$&/")+"/")+k)),T.push(ce)),1;if(ve=0,oe=oe===""?".":oe+":",J(k))for(var pe=0;pe<k.length;pe++){de=k[pe];var _e=oe+re(de,pe);ve+=ge(de,T,ne,_e,ce)}else if(_e=C(k),typeof _e=="function")for(k=_e.call(k),pe=0;!(de=k.next()).done;)de=de.value,_e=oe+re(de,pe++),ve+=ge(de,T,ne,_e,ce);else if(de==="object")throw T=String(k),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.");return ve}function Fe(k,T,ne){if(k==null)return k;var oe=[],ce=0;return ge(k,oe,"","",function(de){return T.call(ne,de,ce++)}),oe}function Le(k){if(k._status===-1){var T=k._result;T=T(),T.then(function(ne){(k._status===0||k._status===-1)&&(k._status=1,k._result=ne)},function(ne){(k._status===0||k._status===-1)&&(k._status=2,k._result=ne)}),k._status===-1&&(k._status=0,k._result=T)}if(k._status===1)return k._result.default;throw k._result}var ye={current:null},A={transition:null},G={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:A,ReactCurrentOwner:ue};function H(){throw Error("act(...) is not supported in production builds of React.")}return le.Children={map:Fe,forEach:function(k,T,ne){Fe(k,function(){T.apply(this,arguments)},ne)},count:function(k){var T=0;return Fe(k,function(){T++}),T},toArray:function(k){return Fe(k,function(T){return T})||[]},only:function(k){if(!Ne(k))throw Error("React.Children.only expected to receive a single React element child.");return k}},le.Component=I,le.Fragment=a,le.Profiler=f,le.PureComponent=X,le.StrictMode=u,le.Suspense=v,le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,le.act=H,le.cloneElement=function(k,T,ne){if(k==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+k+".");var oe=_({},k.props),ce=k.key,de=k.ref,ve=k._owner;if(T!=null){if(T.ref!==void 0&&(de=T.ref,ve=ue.current),T.key!==void 0&&(ce=""+T.key),k.type&&k.type.defaultProps)var pe=k.type.defaultProps;for(_e in T)se.call(T,_e)&&!q.hasOwnProperty(_e)&&(oe[_e]=T[_e]===void 0&&pe!==void 0?pe[_e]:T[_e])}var _e=arguments.length-2;if(_e===1)oe.children=ne;else if(1<_e){pe=Array(_e);for(var nt=0;nt<_e;nt++)pe[nt]=arguments[nt+2];oe.children=pe}return{$$typeof:o,type:k.type,key:ce,ref:de,props:oe,_owner:ve}},le.createContext=function(k){return k={$$typeof:h,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},k.Provider={$$typeof:p,_context:k},k.Consumer=k},le.createElement=Y,le.createFactory=function(k){var T=Y.bind(null,k);return T.type=k,T},le.createRef=function(){return{current:null}},le.forwardRef=function(k){return{$$typeof:g,render:k}},le.isValidElement=Ne,le.lazy=function(k){return{$$typeof:E,_payload:{_status:-1,_result:k},_init:Le}},le.memo=function(k,T){return{$$typeof:j,type:k,compare:T===void 0?null:T}},le.startTransition=function(k){var T=A.transition;A.transition={};try{k()}finally{A.transition=T}},le.unstable_act=H,le.useCallback=function(k,T){return ye.current.useCallback(k,T)},le.useContext=function(k){return ye.current.useContext(k)},le.useDebugValue=function(){},le.useDeferredValue=function(k){return ye.current.useDeferredValue(k)},le.useEffect=function(k,T){return ye.current.useEffect(k,T)},le.useId=function(){return ye.current.useId()},le.useImperativeHandle=function(k,T,ne){return ye.current.useImperativeHandle(k,T,ne)},le.useInsertionEffect=function(k,T){return ye.current.useInsertionEffect(k,T)},le.useLayoutEffect=function(k,T){return ye.current.useLayoutEffect(k,T)},le.useMemo=function(k,T){return ye.current.useMemo(k,T)},le.useReducer=function(k,T,ne){return ye.current.useReducer(k,T,ne)},le.useRef=function(k){return ye.current.useRef(k)},le.useState=function(k){return ye.current.useState(k)},le.useSyncExternalStore=function(k,T,ne){return ye.current.useSyncExternalStore(k,T,ne)},le.useTransition=function(){return ye.current.useTransition()},le.version="18.3.1",le}var Cc;function Ni(){return Cc||(Cc=1,li.exports=jh()),li.exports}/**
11
+ * @license React
12
+ * react-jsx-runtime.production.min.js
13
+ *
14
+ * Copyright (c) Facebook, Inc. and its affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var $c;function Eh(){if($c)return Ar;$c=1;var o=Ni(),l=Symbol.for("react.element"),a=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,f=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function h(g,v,j){var E,$={},C=null,L=null;j!==void 0&&(C=""+j),v.key!==void 0&&(C=""+v.key),v.ref!==void 0&&(L=v.ref);for(E in v)u.call(v,E)&&!p.hasOwnProperty(E)&&($[E]=v[E]);if(g&&g.defaultProps)for(E in v=g.defaultProps,v)$[E]===void 0&&($[E]=v[E]);return{$$typeof:l,type:g,key:C,ref:L,props:$,_owner:f.current}}return Ar.Fragment=a,Ar.jsx=h,Ar.jsxs=h,Ar}var Tc;function Ch(){return Tc||(Tc=1,si.exports=Eh()),si.exports}var c=Ch(),D=Ni(),ts={},ii={exports:{}},Je={},ai={exports:{}},ui={};/**
19
+ * @license React
20
+ * scheduler.production.min.js
21
+ *
22
+ * Copyright (c) Facebook, Inc. and its affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var Pc;function $h(){return Pc||(Pc=1,(function(o){function l(A,G){var H=A.length;A.push(G);e:for(;0<H;){var k=H-1>>>1,T=A[k];if(0<f(T,G))A[k]=G,A[H]=T,H=k;else break e}}function a(A){return A.length===0?null:A[0]}function u(A){if(A.length===0)return null;var G=A[0],H=A.pop();if(H!==G){A[0]=H;e:for(var k=0,T=A.length,ne=T>>>1;k<ne;){var oe=2*(k+1)-1,ce=A[oe],de=oe+1,ve=A[de];if(0>f(ce,H))de<T&&0>f(ve,ce)?(A[k]=ve,A[de]=H,k=de):(A[k]=ce,A[oe]=H,k=oe);else if(de<T&&0>f(ve,H))A[k]=ve,A[de]=H,k=de;else break e}}return G}function f(A,G){var H=A.sortIndex-G.sortIndex;return H!==0?H:A.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var p=performance;o.unstable_now=function(){return p.now()}}else{var h=Date,g=h.now();o.unstable_now=function(){return h.now()-g}}var v=[],j=[],E=1,$=null,C=3,L=!1,_=!1,F=!1,I=typeof setTimeout=="function"?setTimeout:null,te=typeof clearTimeout=="function"?clearTimeout:null,X=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ke(A){for(var G=a(j);G!==null;){if(G.callback===null)u(j);else if(G.startTime<=A)u(j),G.sortIndex=G.expirationTime,l(v,G);else break;G=a(j)}}function J(A){if(F=!1,ke(A),!_)if(a(v)!==null)_=!0,Le(se);else{var G=a(j);G!==null&&ye(J,G.startTime-A)}}function se(A,G){_=!1,F&&(F=!1,te(Y),Y=-1),L=!0;var H=C;try{for(ke(G),$=a(v);$!==null&&(!($.expirationTime>G)||A&&!tt());){var k=$.callback;if(typeof k=="function"){$.callback=null,C=$.priorityLevel;var T=k($.expirationTime<=G);G=o.unstable_now(),typeof T=="function"?$.callback=T:$===a(v)&&u(v),ke(G)}else u(v);$=a(v)}if($!==null)var ne=!0;else{var oe=a(j);oe!==null&&ye(J,oe.startTime-G),ne=!1}return ne}finally{$=null,C=H,L=!1}}var ue=!1,q=null,Y=-1,ie=5,Ne=-1;function tt(){return!(o.unstable_now()-Ne<ie)}function M(){if(q!==null){var A=o.unstable_now();Ne=A;var G=!0;try{G=q(!0,A)}finally{G?re():(ue=!1,q=null)}}else ue=!1}var re;if(typeof X=="function")re=function(){X(M)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,Fe=ge.port2;ge.port1.onmessage=M,re=function(){Fe.postMessage(null)}}else re=function(){I(M,0)};function Le(A){q=A,ue||(ue=!0,re())}function ye(A,G){Y=I(function(){A(o.unstable_now())},G)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(A){A.callback=null},o.unstable_continueExecution=function(){_||L||(_=!0,Le(se))},o.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ie=0<A?Math.floor(1e3/A):5},o.unstable_getCurrentPriorityLevel=function(){return C},o.unstable_getFirstCallbackNode=function(){return a(v)},o.unstable_next=function(A){switch(C){case 1:case 2:case 3:var G=3;break;default:G=C}var H=C;C=G;try{return A()}finally{C=H}},o.unstable_pauseExecution=function(){},o.unstable_requestPaint=function(){},o.unstable_runWithPriority=function(A,G){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var H=C;C=A;try{return G()}finally{C=H}},o.unstable_scheduleCallback=function(A,G,H){var k=o.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?k+H:k):H=k,A){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=H+T,A={id:E++,callback:G,priorityLevel:A,startTime:H,expirationTime:T,sortIndex:-1},H>k?(A.sortIndex=H,l(j,A),a(v)===null&&A===a(j)&&(F?(te(Y),Y=-1):F=!0,ye(J,H-k))):(A.sortIndex=T,l(v,A),_||L||(_=!0,Le(se))),A},o.unstable_shouldYield=tt,o.unstable_wrapCallback=function(A){var G=C;return function(){var H=C;C=G;try{return A.apply(this,arguments)}finally{C=H}}}})(ui)),ui}var Rc;function Th(){return Rc||(Rc=1,ai.exports=$h()),ai.exports}/**
27
+ * @license React
28
+ * react-dom.production.min.js
29
+ *
30
+ * Copyright (c) Facebook, Inc. and its affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var Lc;function Ph(){if(Lc)return Je;Lc=1;var o=Ni(),l=Th();function a(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 u=new Set,f={};function p(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(f[e]=t,e=0;e<t.length;e++)u.add(t[e])}var g=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v=Object.prototype.hasOwnProperty,j=/^[: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]*$/,E={},$={};function C(e){return v.call($,e)?!0:v.call(E,e)?!1:j.test(e)?$[e]=!0:(E[e]=!0,!1)}function L(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 _(e,t,n,r){if(t===null||typeof t>"u"||L(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 F(e,t,n,r,s,i,d){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=d}var I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){I[e]=new F(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];I[t]=new F(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){I[e]=new F(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){I[e]=new F(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){I[e]=new F(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){I[e]=new F(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){I[e]=new F(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){I[e]=new F(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){I[e]=new F(e,5,!1,e.toLowerCase(),null,!1,!1)});var te=/[\-:]([a-z])/g;function X(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(te,X);I[t]=new F(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(te,X);I[t]=new F(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(te,X);I[t]=new F(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){I[e]=new F(e,1,!1,e.toLowerCase(),null,!1,!1)}),I.xlinkHref=new F("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){I[e]=new F(e,1,!1,e.toLowerCase(),null,!0,!0)});function ke(e,t,n,r){var s=I.hasOwnProperty(t)?I[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(_(t,n,s,r)&&(n=null),r||s===null?C(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var J=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,se=Symbol.for("react.element"),ue=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),ie=Symbol.for("react.profiler"),Ne=Symbol.for("react.provider"),tt=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),ge=Symbol.for("react.suspense_list"),Fe=Symbol.for("react.memo"),Le=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),A=Symbol.iterator;function G(e){return e===null||typeof e!="object"?null:(e=A&&e[A]||e["@@iterator"],typeof e=="function"?e:null)}var H=Object.assign,k;function T(e){if(k===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);k=t&&t[1]||""}return`
35
+ `+k+e}var ne=!1;function oe(e,t){if(!e||ne)return"";ne=!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(N){var r=N}Reflect.construct(e,[],t)}else{try{t.call()}catch(N){r=N}e.call(t.prototype)}else{try{throw Error()}catch(N){r=N}e()}}catch(N){if(N&&r&&typeof N.stack=="string"){for(var s=N.stack.split(`
36
+ `),i=r.stack.split(`
37
+ `),d=s.length-1,m=i.length-1;1<=d&&0<=m&&s[d]!==i[m];)m--;for(;1<=d&&0<=m;d--,m--)if(s[d]!==i[m]){if(d!==1||m!==1)do if(d--,m--,0>m||s[d]!==i[m]){var y=`
38
+ `+s[d].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),y}while(1<=d&&0<=m);break}}}finally{ne=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?T(e):""}function ce(e){switch(e.tag){case 5:return T(e.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return e=oe(e.type,!1),e;case 11:return e=oe(e.type.render,!1),e;case 1:return e=oe(e.type,!0),e;default:return""}}function de(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 q:return"Fragment";case ue:return"Portal";case ie:return"Profiler";case Y:return"StrictMode";case re:return"Suspense";case ge:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case tt:return(e.displayName||"Context")+".Consumer";case Ne:return(e._context.displayName||"Context")+".Provider";case M:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fe:return t=e.displayName||null,t!==null?t:de(e.type)||"Memo";case Le:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}function ve(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 de(t);case 8:return t===Y?"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 pe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _e(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nt(e){var t=_e(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 s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(d){r=""+d,i.call(this,d)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(d){r=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vr(e){e._valueTracker||(e._valueTracker=nt(e))}function Li(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_e(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function br(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 fs(e,t){var n=t.checked;return H({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function zi(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=pe(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 Di(e,t){t=t.checked,t!=null&&ke(e,"checked",t,!1)}function ps(e,t){Di(e,t);var n=pe(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")?hs(e,t.type,n):t.hasOwnProperty("defaultValue")&&hs(e,t.type,pe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Oi(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 hs(e,t,n){(t!=="number"||br(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Jn=Array.isArray;function xn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+pe(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function ms(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(a(91));return H({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ii(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(a(92));if(Jn(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:pe(n)}}function Mi(e,t){var n=pe(t.value),r=pe(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 Ai(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Fi(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 gs(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Fi(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var qr,Ui=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(qr=qr||document.createElement("div"),qr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=qr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function er(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tr={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},Tf=["Webkit","ms","Moz","O"];Object.keys(tr).forEach(function(e){Tf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),tr[t]=tr[e]})});function Hi(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||tr.hasOwnProperty(e)&&tr[e]?(""+t).trim():t+"px"}function Bi(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Hi(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Pf=H({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 ys(e,t){if(t){if(Pf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(a(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(a(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(t.style!=null&&typeof t.style!="object")throw Error(a(62))}}function vs(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 ws=null;function ks(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xs=null,Sn=null,Nn=null;function Wi(e){if(e=Nr(e)){if(typeof xs!="function")throw Error(a(280));var t=e.stateNode;t&&(t=go(t),xs(e.stateNode,e.type,t))}}function Vi(e){Sn?Nn?Nn.push(e):Nn=[e]:Sn=e}function bi(){if(Sn){var e=Sn,t=Nn;if(Nn=Sn=null,Wi(e),t)for(e=0;e<t.length;e++)Wi(t[e])}}function qi(e,t){return e(t)}function Qi(){}var Ss=!1;function Ki(e,t,n){if(Ss)return e(t,n);Ss=!0;try{return qi(e,t,n)}finally{Ss=!1,(Sn!==null||Nn!==null)&&(Qi(),bi())}}function nr(e,t){var n=e.stateNode;if(n===null)return null;var r=go(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(a(231,t,typeof n));return n}var Ns=!1;if(g)try{var rr={};Object.defineProperty(rr,"passive",{get:function(){Ns=!0}}),window.addEventListener("test",rr,rr),window.removeEventListener("test",rr,rr)}catch{Ns=!1}function Rf(e,t,n,r,s,i,d,m,y){var N=Array.prototype.slice.call(arguments,3);try{t.apply(n,N)}catch(R){this.onError(R)}}var or=!1,Qr=null,Kr=!1,_s=null,Lf={onError:function(e){or=!0,Qr=e}};function zf(e,t,n,r,s,i,d,m,y){or=!1,Qr=null,Rf.apply(Lf,arguments)}function Df(e,t,n,r,s,i,d,m,y){if(zf.apply(this,arguments),or){if(or){var N=Qr;or=!1,Qr=null}else throw Error(a(198));Kr||(Kr=!0,_s=N)}}function on(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Yi(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 Gi(e){if(on(e)!==e)throw Error(a(188))}function Of(e){var t=e.alternate;if(!t){if(t=on(e),t===null)throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Gi(s),e;if(i===r)return Gi(s),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=s,r=i;else{for(var d=!1,m=s.child;m;){if(m===n){d=!0,n=s,r=i;break}if(m===r){d=!0,r=s,n=i;break}m=m.sibling}if(!d){for(m=i.child;m;){if(m===n){d=!0,n=i,r=s;break}if(m===r){d=!0,r=i,n=s;break}m=m.sibling}if(!d)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function Xi(e){return e=Of(e),e!==null?Zi(e):null}function Zi(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Zi(e);if(t!==null)return t;e=e.sibling}return null}var Ji=l.unstable_scheduleCallback,ea=l.unstable_cancelCallback,If=l.unstable_shouldYield,Mf=l.unstable_requestPaint,Pe=l.unstable_now,Af=l.unstable_getCurrentPriorityLevel,js=l.unstable_ImmediatePriority,ta=l.unstable_UserBlockingPriority,Yr=l.unstable_NormalPriority,Ff=l.unstable_LowPriority,na=l.unstable_IdlePriority,Gr=null,Nt=null;function Uf(e){if(Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(Gr,e,void 0,(e.current.flags&128)===128)}catch{}}var ht=Math.clz32?Math.clz32:Wf,Hf=Math.log,Bf=Math.LN2;function Wf(e){return e>>>=0,e===0?32:31-(Hf(e)/Bf|0)|0}var Xr=64,Zr=4194304;function sr(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 Jr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,d=n&268435455;if(d!==0){var m=d&~s;m!==0?r=sr(m):(i&=d,i!==0&&(r=sr(i)))}else d=n&~s,d!==0?r=sr(d):i!==0&&(r=sr(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&s)===0&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ht(t),s=1<<n,r|=e[n],t&=~s;return r}function Vf(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 bf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var d=31-ht(i),m=1<<d,y=s[d];y===-1?((m&n)===0||(m&r)!==0)&&(s[d]=Vf(m,t)):y<=t&&(e.expiredLanes|=m),i&=~m}}function Es(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ra(){var e=Xr;return Xr<<=1,(Xr&4194240)===0&&(Xr=64),e}function Cs(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function lr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ht(t),e[t]=n}function qf(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 s=31-ht(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function $s(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ht(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var he=0;function oa(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var sa,Ts,la,ia,aa,Ps=!1,eo=[],At=null,Ft=null,Ut=null,ir=new Map,ar=new Map,Ht=[],Qf="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 ua(e,t){switch(e){case"focusin":case"focusout":At=null;break;case"dragenter":case"dragleave":Ft=null;break;case"mouseover":case"mouseout":Ut=null;break;case"pointerover":case"pointerout":ir.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ar.delete(t.pointerId)}}function ur(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Nr(t),t!==null&&Ts(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Kf(e,t,n,r,s){switch(t){case"focusin":return At=ur(At,e,t,n,r,s),!0;case"dragenter":return Ft=ur(Ft,e,t,n,r,s),!0;case"mouseover":return Ut=ur(Ut,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return ir.set(i,ur(ir.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,ar.set(i,ur(ar.get(i)||null,e,t,n,r,s)),!0}return!1}function ca(e){var t=sn(e.target);if(t!==null){var n=on(t);if(n!==null){if(t=n.tag,t===13){if(t=Yi(n),t!==null){e.blockedOn=t,aa(e.priority,function(){la(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 to(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ls(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ws=r,n.target.dispatchEvent(r),ws=null}else return t=Nr(n),t!==null&&Ts(t),e.blockedOn=n,!1;t.shift()}return!0}function da(e,t,n){to(e)&&n.delete(t)}function Yf(){Ps=!1,At!==null&&to(At)&&(At=null),Ft!==null&&to(Ft)&&(Ft=null),Ut!==null&&to(Ut)&&(Ut=null),ir.forEach(da),ar.forEach(da)}function cr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ps||(Ps=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Yf)))}function dr(e){function t(s){return cr(s,e)}if(0<eo.length){cr(eo[0],e);for(var n=1;n<eo.length;n++){var r=eo[n];r.blockedOn===e&&(r.blockedOn=null)}}for(At!==null&&cr(At,e),Ft!==null&&cr(Ft,e),Ut!==null&&cr(Ut,e),ir.forEach(t),ar.forEach(t),n=0;n<Ht.length;n++)r=Ht[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ht.length&&(n=Ht[0],n.blockedOn===null);)ca(n),n.blockedOn===null&&Ht.shift()}var _n=J.ReactCurrentBatchConfig,no=!0;function Gf(e,t,n,r){var s=he,i=_n.transition;_n.transition=null;try{he=1,Rs(e,t,n,r)}finally{he=s,_n.transition=i}}function Xf(e,t,n,r){var s=he,i=_n.transition;_n.transition=null;try{he=4,Rs(e,t,n,r)}finally{he=s,_n.transition=i}}function Rs(e,t,n,r){if(no){var s=Ls(e,t,n,r);if(s===null)Ys(e,t,r,ro,n),ua(e,r);else if(Kf(s,e,t,n,r))r.stopPropagation();else if(ua(e,r),t&4&&-1<Qf.indexOf(e)){for(;s!==null;){var i=Nr(s);if(i!==null&&sa(i),i=Ls(e,t,n,r),i===null&&Ys(e,t,r,ro,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Ys(e,t,r,null,n)}}var ro=null;function Ls(e,t,n,r){if(ro=null,e=ks(r),e=sn(e),e!==null)if(t=on(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Yi(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 ro=e,null}function fa(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(Af()){case js:return 1;case ta:return 4;case Yr:case Ff:return 16;case na:return 536870912;default:return 16}default:return 16}}var Bt=null,zs=null,oo=null;function pa(){if(oo)return oo;var e,t=zs,n=t.length,r,s="value"in Bt?Bt.value:Bt.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var d=n-e;for(r=1;r<=d&&t[n-r]===s[i-r];r++);return oo=s.slice(e,1<r?1-r:void 0)}function so(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 lo(){return!0}function ha(){return!1}function rt(e){function t(n,r,s,i,d){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=d,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(n=e[m],this[m]=n?n(i):i[m]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?lo:ha,this.isPropagationStopped=ha,this}return H(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=lo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=lo)},persist:function(){},isPersistent:lo}),t}var jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ds=rt(jn),fr=H({},jn,{view:0,detail:0}),Zf=rt(fr),Os,Is,pr,io=H({},fr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:As,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!==pr&&(pr&&e.type==="mousemove"?(Os=e.screenX-pr.screenX,Is=e.screenY-pr.screenY):Is=Os=0,pr=e),Os)},movementY:function(e){return"movementY"in e?e.movementY:Is}}),ma=rt(io),Jf=H({},io,{dataTransfer:0}),ep=rt(Jf),tp=H({},fr,{relatedTarget:0}),Ms=rt(tp),np=H({},jn,{animationName:0,elapsedTime:0,pseudoElement:0}),rp=rt(np),op=H({},jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sp=rt(op),lp=H({},jn,{data:0}),ga=rt(lp),ip={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ap={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"},up={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=up[e])?!!t[e]:!1}function As(){return cp}var dp=H({},fr,{key:function(e){if(e.key){var t=ip[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=so(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ap[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:As,charCode:function(e){return e.type==="keypress"?so(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?so(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),fp=rt(dp),pp=H({},io,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ya=rt(pp),hp=H({},fr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:As}),mp=rt(hp),gp=H({},jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),yp=rt(gp),vp=H({},io,{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}),wp=rt(vp),kp=[9,13,27,32],Fs=g&&"CompositionEvent"in window,hr=null;g&&"documentMode"in document&&(hr=document.documentMode);var xp=g&&"TextEvent"in window&&!hr,va=g&&(!Fs||hr&&8<hr&&11>=hr),wa=" ",ka=!1;function xa(e,t){switch(e){case"keyup":return kp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sa(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var En=!1;function Sp(e,t){switch(e){case"compositionend":return Sa(t);case"keypress":return t.which!==32?null:(ka=!0,wa);case"textInput":return e=t.data,e===wa&&ka?null:e;default:return null}}function Np(e,t){if(En)return e==="compositionend"||!Fs&&xa(e,t)?(e=pa(),oo=zs=Bt=null,En=!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 va&&t.locale!=="ko"?null:t.data;default:return null}}var _p={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 Na(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!_p[e.type]:t==="textarea"}function _a(e,t,n,r){Vi(r),t=po(t,"onChange"),0<t.length&&(n=new Ds("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var mr=null,gr=null;function jp(e){Ba(e,0)}function ao(e){var t=Rn(e);if(Li(t))return e}function Ep(e,t){if(e==="change")return t}var ja=!1;if(g){var Us;if(g){var Hs="oninput"in document;if(!Hs){var Ea=document.createElement("div");Ea.setAttribute("oninput","return;"),Hs=typeof Ea.oninput=="function"}Us=Hs}else Us=!1;ja=Us&&(!document.documentMode||9<document.documentMode)}function Ca(){mr&&(mr.detachEvent("onpropertychange",$a),gr=mr=null)}function $a(e){if(e.propertyName==="value"&&ao(gr)){var t=[];_a(t,gr,e,ks(e)),Ki(jp,t)}}function Cp(e,t,n){e==="focusin"?(Ca(),mr=t,gr=n,mr.attachEvent("onpropertychange",$a)):e==="focusout"&&Ca()}function $p(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ao(gr)}function Tp(e,t){if(e==="click")return ao(t)}function Pp(e,t){if(e==="input"||e==="change")return ao(t)}function Rp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mt=typeof Object.is=="function"?Object.is:Rp;function yr(e,t){if(mt(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 s=n[r];if(!v.call(t,s)||!mt(e[s],t[s]))return!1}return!0}function Ta(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pa(e,t){var n=Ta(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=Ta(n)}}function Ra(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ra(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function La(){for(var e=window,t=br();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=br(e.document)}return t}function Bs(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 Lp(e){var t=La(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ra(n.ownerDocument.documentElement,n)){if(r!==null&&Bs(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 s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Pa(n,i);var d=Pa(n,r);s&&d&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==d.node||e.focusOffset!==d.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(d.node,d.offset)):(t.setEnd(d.node,d.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 zp=g&&"documentMode"in document&&11>=document.documentMode,Cn=null,Ws=null,vr=null,Vs=!1;function za(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vs||Cn==null||Cn!==br(r)||(r=Cn,"selectionStart"in r&&Bs(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}),vr&&yr(vr,r)||(vr=r,r=po(Ws,"onSelect"),0<r.length&&(t=new Ds("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Cn)))}function uo(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var $n={animationend:uo("Animation","AnimationEnd"),animationiteration:uo("Animation","AnimationIteration"),animationstart:uo("Animation","AnimationStart"),transitionend:uo("Transition","TransitionEnd")},bs={},Da={};g&&(Da=document.createElement("div").style,"AnimationEvent"in window||(delete $n.animationend.animation,delete $n.animationiteration.animation,delete $n.animationstart.animation),"TransitionEvent"in window||delete $n.transitionend.transition);function co(e){if(bs[e])return bs[e];if(!$n[e])return e;var t=$n[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Da)return bs[e]=t[n];return e}var Oa=co("animationend"),Ia=co("animationiteration"),Ma=co("animationstart"),Aa=co("transitionend"),Fa=new Map,Ua="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 Wt(e,t){Fa.set(e,t),p(t,[e])}for(var qs=0;qs<Ua.length;qs++){var Qs=Ua[qs],Dp=Qs.toLowerCase(),Op=Qs[0].toUpperCase()+Qs.slice(1);Wt(Dp,"on"+Op)}Wt(Oa,"onAnimationEnd"),Wt(Ia,"onAnimationIteration"),Wt(Ma,"onAnimationStart"),Wt("dblclick","onDoubleClick"),Wt("focusin","onFocus"),Wt("focusout","onBlur"),Wt(Aa,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),p("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),p("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),p("onBeforeInput",["compositionend","keypress","textInput","paste"]),p("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),p("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),p("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wr="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(" "),Ip=new Set("cancel close invalid load scroll toggle".split(" ").concat(wr));function Ha(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Df(r,t,void 0,e),e.currentTarget=null}function Ba(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var d=r.length-1;0<=d;d--){var m=r[d],y=m.instance,N=m.currentTarget;if(m=m.listener,y!==i&&s.isPropagationStopped())break e;Ha(s,m,N),i=y}else for(d=0;d<r.length;d++){if(m=r[d],y=m.instance,N=m.currentTarget,m=m.listener,y!==i&&s.isPropagationStopped())break e;Ha(s,m,N),i=y}}}if(Kr)throw e=_s,Kr=!1,_s=null,e}function xe(e,t){var n=t[tl];n===void 0&&(n=t[tl]=new Set);var r=e+"__bubble";n.has(r)||(Wa(t,e,2,!1),n.add(r))}function Ks(e,t,n){var r=0;t&&(r|=4),Wa(n,e,r,t)}var fo="_reactListening"+Math.random().toString(36).slice(2);function kr(e){if(!e[fo]){e[fo]=!0,u.forEach(function(n){n!=="selectionchange"&&(Ip.has(n)||Ks(n,!1,e),Ks(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fo]||(t[fo]=!0,Ks("selectionchange",!1,t))}}function Wa(e,t,n,r){switch(fa(t)){case 1:var s=Gf;break;case 4:s=Xf;break;default:s=Rs}n=s.bind(null,t,n,e),s=void 0,!Ns||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Ys(e,t,n,r,s){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var d=r.tag;if(d===3||d===4){var m=r.stateNode.containerInfo;if(m===s||m.nodeType===8&&m.parentNode===s)break;if(d===4)for(d=r.return;d!==null;){var y=d.tag;if((y===3||y===4)&&(y=d.stateNode.containerInfo,y===s||y.nodeType===8&&y.parentNode===s))return;d=d.return}for(;m!==null;){if(d=sn(m),d===null)return;if(y=d.tag,y===5||y===6){r=i=d;continue e}m=m.parentNode}}r=r.return}Ki(function(){var N=i,R=ks(n),z=[];e:{var P=Fa.get(e);if(P!==void 0){var U=Ds,W=e;switch(e){case"keypress":if(so(n)===0)break e;case"keydown":case"keyup":U=fp;break;case"focusin":W="focus",U=Ms;break;case"focusout":W="blur",U=Ms;break;case"beforeblur":case"afterblur":U=Ms;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":U=ma;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=ep;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=mp;break;case Oa:case Ia:case Ma:U=rp;break;case Aa:U=yp;break;case"scroll":U=Zf;break;case"wheel":U=wp;break;case"copy":case"cut":case"paste":U=sp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=ya}var V=(t&4)!==0,Re=!V&&e==="scroll",x=V?P!==null?P+"Capture":null:P;V=[];for(var w=N,S;w!==null;){S=w;var O=S.stateNode;if(S.tag===5&&O!==null&&(S=O,x!==null&&(O=nr(w,x),O!=null&&V.push(xr(w,O,S)))),Re)break;w=w.return}0<V.length&&(P=new U(P,W,null,n,R),z.push({event:P,listeners:V}))}}if((t&7)===0){e:{if(P=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",P&&n!==ws&&(W=n.relatedTarget||n.fromElement)&&(sn(W)||W[Tt]))break e;if((U||P)&&(P=R.window===R?R:(P=R.ownerDocument)?P.defaultView||P.parentWindow:window,U?(W=n.relatedTarget||n.toElement,U=N,W=W?sn(W):null,W!==null&&(Re=on(W),W!==Re||W.tag!==5&&W.tag!==6)&&(W=null)):(U=null,W=N),U!==W)){if(V=ma,O="onMouseLeave",x="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(V=ya,O="onPointerLeave",x="onPointerEnter",w="pointer"),Re=U==null?P:Rn(U),S=W==null?P:Rn(W),P=new V(O,w+"leave",U,n,R),P.target=Re,P.relatedTarget=S,O=null,sn(R)===N&&(V=new V(x,w+"enter",W,n,R),V.target=S,V.relatedTarget=Re,O=V),Re=O,U&&W)t:{for(V=U,x=W,w=0,S=V;S;S=Tn(S))w++;for(S=0,O=x;O;O=Tn(O))S++;for(;0<w-S;)V=Tn(V),w--;for(;0<S-w;)x=Tn(x),S--;for(;w--;){if(V===x||x!==null&&V===x.alternate)break t;V=Tn(V),x=Tn(x)}V=null}else V=null;U!==null&&Va(z,P,U,V,!1),W!==null&&Re!==null&&Va(z,Re,W,V,!0)}}e:{if(P=N?Rn(N):window,U=P.nodeName&&P.nodeName.toLowerCase(),U==="select"||U==="input"&&P.type==="file")var b=Ep;else if(Na(P))if(ja)b=Pp;else{b=$p;var Q=Cp}else(U=P.nodeName)&&U.toLowerCase()==="input"&&(P.type==="checkbox"||P.type==="radio")&&(b=Tp);if(b&&(b=b(e,N))){_a(z,b,n,R);break e}Q&&Q(e,P,N),e==="focusout"&&(Q=P._wrapperState)&&Q.controlled&&P.type==="number"&&hs(P,"number",P.value)}switch(Q=N?Rn(N):window,e){case"focusin":(Na(Q)||Q.contentEditable==="true")&&(Cn=Q,Ws=N,vr=null);break;case"focusout":vr=Ws=Cn=null;break;case"mousedown":Vs=!0;break;case"contextmenu":case"mouseup":case"dragend":Vs=!1,za(z,n,R);break;case"selectionchange":if(zp)break;case"keydown":case"keyup":za(z,n,R)}var K;if(Fs)e:{switch(e){case"compositionstart":var Z="onCompositionStart";break e;case"compositionend":Z="onCompositionEnd";break e;case"compositionupdate":Z="onCompositionUpdate";break e}Z=void 0}else En?xa(e,n)&&(Z="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Z="onCompositionStart");Z&&(va&&n.locale!=="ko"&&(En||Z!=="onCompositionStart"?Z==="onCompositionEnd"&&En&&(K=pa()):(Bt=R,zs="value"in Bt?Bt.value:Bt.textContent,En=!0)),Q=po(N,Z),0<Q.length&&(Z=new ga(Z,e,null,n,R),z.push({event:Z,listeners:Q}),K?Z.data=K:(K=Sa(n),K!==null&&(Z.data=K)))),(K=xp?Sp(e,n):Np(e,n))&&(N=po(N,"onBeforeInput"),0<N.length&&(R=new ga("onBeforeInput","beforeinput",null,n,R),z.push({event:R,listeners:N}),R.data=K))}Ba(z,t)})}function xr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function po(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=nr(e,n),i!=null&&r.unshift(xr(e,i,s)),i=nr(e,t),i!=null&&r.push(xr(e,i,s))),e=e.return}return r}function Tn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Va(e,t,n,r,s){for(var i=t._reactName,d=[];n!==null&&n!==r;){var m=n,y=m.alternate,N=m.stateNode;if(y!==null&&y===r)break;m.tag===5&&N!==null&&(m=N,s?(y=nr(n,i),y!=null&&d.unshift(xr(n,y,m))):s||(y=nr(n,i),y!=null&&d.push(xr(n,y,m)))),n=n.return}d.length!==0&&e.push({event:t,listeners:d})}var Mp=/\r\n?/g,Ap=/\u0000|\uFFFD/g;function ba(e){return(typeof e=="string"?e:""+e).replace(Mp,`
39
+ `).replace(Ap,"")}function ho(e,t,n){if(t=ba(t),ba(e)!==t&&n)throw Error(a(425))}function mo(){}var Gs=null,Xs=null;function Zs(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 Js=typeof setTimeout=="function"?setTimeout:void 0,Fp=typeof clearTimeout=="function"?clearTimeout:void 0,qa=typeof Promise=="function"?Promise:void 0,Up=typeof queueMicrotask=="function"?queueMicrotask:typeof qa<"u"?function(e){return qa.resolve(null).then(e).catch(Hp)}:Js;function Hp(e){setTimeout(function(){throw e})}function el(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),dr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);dr(t)}function Vt(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 Qa(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 Pn=Math.random().toString(36).slice(2),_t="__reactFiber$"+Pn,Sr="__reactProps$"+Pn,Tt="__reactContainer$"+Pn,tl="__reactEvents$"+Pn,Bp="__reactListeners$"+Pn,Wp="__reactHandles$"+Pn;function sn(e){var t=e[_t];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Tt]||n[_t]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Qa(e);e!==null;){if(n=e[_t])return n;e=Qa(e)}return t}e=n,n=e.parentNode}return null}function Nr(e){return e=e[_t]||e[Tt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Rn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(a(33))}function go(e){return e[Sr]||null}var nl=[],Ln=-1;function bt(e){return{current:e}}function Se(e){0>Ln||(e.current=nl[Ln],nl[Ln]=null,Ln--)}function we(e,t){Ln++,nl[Ln]=e.current,e.current=t}var qt={},Be=bt(qt),Ke=bt(!1),ln=qt;function zn(e,t){var n=e.type.contextTypes;if(!n)return qt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ye(e){return e=e.childContextTypes,e!=null}function yo(){Se(Ke),Se(Be)}function Ka(e,t,n){if(Be.current!==qt)throw Error(a(168));we(Be,t),we(Ke,n)}function Ya(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(a(108,ve(e)||"Unknown",s));return H({},n,r)}function vo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qt,ln=Be.current,we(Be,e),we(Ke,Ke.current),!0}function Ga(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Ya(e,t,ln),r.__reactInternalMemoizedMergedChildContext=e,Se(Ke),Se(Be),we(Be,e)):Se(Ke),we(Ke,n)}var Pt=null,wo=!1,rl=!1;function Xa(e){Pt===null?Pt=[e]:Pt.push(e)}function Vp(e){wo=!0,Xa(e)}function Qt(){if(!rl&&Pt!==null){rl=!0;var e=0,t=he;try{var n=Pt;for(he=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Pt=null,wo=!1}catch(s){throw Pt!==null&&(Pt=Pt.slice(e+1)),Ji(js,Qt),s}finally{he=t,rl=!1}}return null}var Dn=[],On=0,ko=null,xo=0,at=[],ut=0,an=null,Rt=1,Lt="";function un(e,t){Dn[On++]=xo,Dn[On++]=ko,ko=e,xo=t}function Za(e,t,n){at[ut++]=Rt,at[ut++]=Lt,at[ut++]=an,an=e;var r=Rt;e=Lt;var s=32-ht(r)-1;r&=~(1<<s),n+=1;var i=32-ht(t)+s;if(30<i){var d=s-s%5;i=(r&(1<<d)-1).toString(32),r>>=d,s-=d,Rt=1<<32-ht(t)+s|n<<s|r,Lt=i+e}else Rt=1<<i|n<<s|r,Lt=e}function ol(e){e.return!==null&&(un(e,1),Za(e,1,0))}function sl(e){for(;e===ko;)ko=Dn[--On],Dn[On]=null,xo=Dn[--On],Dn[On]=null;for(;e===an;)an=at[--ut],at[ut]=null,Lt=at[--ut],at[ut]=null,Rt=at[--ut],at[ut]=null}var ot=null,st=null,je=!1,gt=null;function Ja(e,t){var n=pt(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 eu(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,ot=e,st=Vt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ot=e,st=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=an!==null?{id:Rt,overflow:Lt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=pt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ot=e,st=null,!0):!1;default:return!1}}function ll(e){return(e.mode&1)!==0&&(e.flags&128)===0}function il(e){if(je){var t=st;if(t){var n=t;if(!eu(e,t)){if(ll(e))throw Error(a(418));t=Vt(n.nextSibling);var r=ot;t&&eu(e,t)?Ja(r,n):(e.flags=e.flags&-4097|2,je=!1,ot=e)}}else{if(ll(e))throw Error(a(418));e.flags=e.flags&-4097|2,je=!1,ot=e}}}function tu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ot=e}function So(e){if(e!==ot)return!1;if(!je)return tu(e),je=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Zs(e.type,e.memoizedProps)),t&&(t=st)){if(ll(e))throw nu(),Error(a(418));for(;t;)Ja(e,t),t=Vt(t.nextSibling)}if(tu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){st=Vt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}st=null}}else st=ot?Vt(e.stateNode.nextSibling):null;return!0}function nu(){for(var e=st;e;)e=Vt(e.nextSibling)}function In(){st=ot=null,je=!1}function al(e){gt===null?gt=[e]:gt.push(e)}var bp=J.ReactCurrentBatchConfig;function _r(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(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(d){var m=s.refs;d===null?delete m[i]:m[i]=d},t._stringRef=i,t)}if(typeof e!="string")throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function No(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ru(e){var t=e._init;return t(e._payload)}function ou(e){function t(x,w){if(e){var S=x.deletions;S===null?(x.deletions=[w],x.flags|=16):S.push(w)}}function n(x,w){if(!e)return null;for(;w!==null;)t(x,w),w=w.sibling;return null}function r(x,w){for(x=new Map;w!==null;)w.key!==null?x.set(w.key,w):x.set(w.index,w),w=w.sibling;return x}function s(x,w){return x=tn(x,w),x.index=0,x.sibling=null,x}function i(x,w,S){return x.index=S,e?(S=x.alternate,S!==null?(S=S.index,S<w?(x.flags|=2,w):S):(x.flags|=2,w)):(x.flags|=1048576,w)}function d(x){return e&&x.alternate===null&&(x.flags|=2),x}function m(x,w,S,O){return w===null||w.tag!==6?(w=Jl(S,x.mode,O),w.return=x,w):(w=s(w,S),w.return=x,w)}function y(x,w,S,O){var b=S.type;return b===q?R(x,w,S.props.children,O,S.key):w!==null&&(w.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Le&&ru(b)===w.type)?(O=s(w,S.props),O.ref=_r(x,w,S),O.return=x,O):(O=Qo(S.type,S.key,S.props,null,x.mode,O),O.ref=_r(x,w,S),O.return=x,O)}function N(x,w,S,O){return w===null||w.tag!==4||w.stateNode.containerInfo!==S.containerInfo||w.stateNode.implementation!==S.implementation?(w=ei(S,x.mode,O),w.return=x,w):(w=s(w,S.children||[]),w.return=x,w)}function R(x,w,S,O,b){return w===null||w.tag!==7?(w=yn(S,x.mode,O,b),w.return=x,w):(w=s(w,S),w.return=x,w)}function z(x,w,S){if(typeof w=="string"&&w!==""||typeof w=="number")return w=Jl(""+w,x.mode,S),w.return=x,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case se:return S=Qo(w.type,w.key,w.props,null,x.mode,S),S.ref=_r(x,null,w),S.return=x,S;case ue:return w=ei(w,x.mode,S),w.return=x,w;case Le:var O=w._init;return z(x,O(w._payload),S)}if(Jn(w)||G(w))return w=yn(w,x.mode,S,null),w.return=x,w;No(x,w)}return null}function P(x,w,S,O){var b=w!==null?w.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return b!==null?null:m(x,w,""+S,O);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case se:return S.key===b?y(x,w,S,O):null;case ue:return S.key===b?N(x,w,S,O):null;case Le:return b=S._init,P(x,w,b(S._payload),O)}if(Jn(S)||G(S))return b!==null?null:R(x,w,S,O,null);No(x,S)}return null}function U(x,w,S,O,b){if(typeof O=="string"&&O!==""||typeof O=="number")return x=x.get(S)||null,m(w,x,""+O,b);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case se:return x=x.get(O.key===null?S:O.key)||null,y(w,x,O,b);case ue:return x=x.get(O.key===null?S:O.key)||null,N(w,x,O,b);case Le:var Q=O._init;return U(x,w,S,Q(O._payload),b)}if(Jn(O)||G(O))return x=x.get(S)||null,R(w,x,O,b,null);No(w,O)}return null}function W(x,w,S,O){for(var b=null,Q=null,K=w,Z=w=0,Ae=null;K!==null&&Z<S.length;Z++){K.index>Z?(Ae=K,K=null):Ae=K.sibling;var fe=P(x,K,S[Z],O);if(fe===null){K===null&&(K=Ae);break}e&&K&&fe.alternate===null&&t(x,K),w=i(fe,w,Z),Q===null?b=fe:Q.sibling=fe,Q=fe,K=Ae}if(Z===S.length)return n(x,K),je&&un(x,Z),b;if(K===null){for(;Z<S.length;Z++)K=z(x,S[Z],O),K!==null&&(w=i(K,w,Z),Q===null?b=K:Q.sibling=K,Q=K);return je&&un(x,Z),b}for(K=r(x,K);Z<S.length;Z++)Ae=U(K,x,Z,S[Z],O),Ae!==null&&(e&&Ae.alternate!==null&&K.delete(Ae.key===null?Z:Ae.key),w=i(Ae,w,Z),Q===null?b=Ae:Q.sibling=Ae,Q=Ae);return e&&K.forEach(function(nn){return t(x,nn)}),je&&un(x,Z),b}function V(x,w,S,O){var b=G(S);if(typeof b!="function")throw Error(a(150));if(S=b.call(S),S==null)throw Error(a(151));for(var Q=b=null,K=w,Z=w=0,Ae=null,fe=S.next();K!==null&&!fe.done;Z++,fe=S.next()){K.index>Z?(Ae=K,K=null):Ae=K.sibling;var nn=P(x,K,fe.value,O);if(nn===null){K===null&&(K=Ae);break}e&&K&&nn.alternate===null&&t(x,K),w=i(nn,w,Z),Q===null?b=nn:Q.sibling=nn,Q=nn,K=Ae}if(fe.done)return n(x,K),je&&un(x,Z),b;if(K===null){for(;!fe.done;Z++,fe=S.next())fe=z(x,fe.value,O),fe!==null&&(w=i(fe,w,Z),Q===null?b=fe:Q.sibling=fe,Q=fe);return je&&un(x,Z),b}for(K=r(x,K);!fe.done;Z++,fe=S.next())fe=U(K,x,Z,fe.value,O),fe!==null&&(e&&fe.alternate!==null&&K.delete(fe.key===null?Z:fe.key),w=i(fe,w,Z),Q===null?b=fe:Q.sibling=fe,Q=fe);return e&&K.forEach(function(_h){return t(x,_h)}),je&&un(x,Z),b}function Re(x,w,S,O){if(typeof S=="object"&&S!==null&&S.type===q&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case se:e:{for(var b=S.key,Q=w;Q!==null;){if(Q.key===b){if(b=S.type,b===q){if(Q.tag===7){n(x,Q.sibling),w=s(Q,S.props.children),w.return=x,x=w;break e}}else if(Q.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Le&&ru(b)===Q.type){n(x,Q.sibling),w=s(Q,S.props),w.ref=_r(x,Q,S),w.return=x,x=w;break e}n(x,Q);break}else t(x,Q);Q=Q.sibling}S.type===q?(w=yn(S.props.children,x.mode,O,S.key),w.return=x,x=w):(O=Qo(S.type,S.key,S.props,null,x.mode,O),O.ref=_r(x,w,S),O.return=x,x=O)}return d(x);case ue:e:{for(Q=S.key;w!==null;){if(w.key===Q)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(x,w.sibling),w=s(w,S.children||[]),w.return=x,x=w;break e}else{n(x,w);break}else t(x,w);w=w.sibling}w=ei(S,x.mode,O),w.return=x,x=w}return d(x);case Le:return Q=S._init,Re(x,w,Q(S._payload),O)}if(Jn(S))return W(x,w,S,O);if(G(S))return V(x,w,S,O);No(x,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(x,w.sibling),w=s(w,S),w.return=x,x=w):(n(x,w),w=Jl(S,x.mode,O),w.return=x,x=w),d(x)):n(x,w)}return Re}var Mn=ou(!0),su=ou(!1),_o=bt(null),jo=null,An=null,ul=null;function cl(){ul=An=jo=null}function dl(e){var t=_o.current;Se(_o),e._currentValue=t}function fl(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 Fn(e,t){jo=e,ul=An=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ge=!0),e.firstContext=null)}function ct(e){var t=e._currentValue;if(ul!==e)if(e={context:e,memoizedValue:t,next:null},An===null){if(jo===null)throw Error(a(308));An=e,jo.dependencies={lanes:0,firstContext:e}}else An=An.next=e;return t}var cn=null;function pl(e){cn===null?cn=[e]:cn.push(e)}function lu(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,pl(t)):(n.next=s.next,s.next=n),t.interleaved=n,zt(e,r)}function zt(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 Kt=!1;function hl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function iu(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 Dt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Yt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(ae&2)!==0){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,zt(e,n)}return s=r.interleaved,s===null?(t.next=t,pl(r)):(t.next=s.next,s.next=t),r.interleaved=t,zt(e,n)}function Eo(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,$s(e,n)}}function au(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var d={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=d:i=i.next=d,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,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 Co(e,t,n,r){var s=e.updateQueue;Kt=!1;var i=s.firstBaseUpdate,d=s.lastBaseUpdate,m=s.shared.pending;if(m!==null){s.shared.pending=null;var y=m,N=y.next;y.next=null,d===null?i=N:d.next=N,d=y;var R=e.alternate;R!==null&&(R=R.updateQueue,m=R.lastBaseUpdate,m!==d&&(m===null?R.firstBaseUpdate=N:m.next=N,R.lastBaseUpdate=y))}if(i!==null){var z=s.baseState;d=0,R=N=y=null,m=i;do{var P=m.lane,U=m.eventTime;if((r&P)===P){R!==null&&(R=R.next={eventTime:U,lane:0,tag:m.tag,payload:m.payload,callback:m.callback,next:null});e:{var W=e,V=m;switch(P=t,U=n,V.tag){case 1:if(W=V.payload,typeof W=="function"){z=W.call(U,z,P);break e}z=W;break e;case 3:W.flags=W.flags&-65537|128;case 0:if(W=V.payload,P=typeof W=="function"?W.call(U,z,P):W,P==null)break e;z=H({},z,P);break e;case 2:Kt=!0}}m.callback!==null&&m.lane!==0&&(e.flags|=64,P=s.effects,P===null?s.effects=[m]:P.push(m))}else U={eventTime:U,lane:P,tag:m.tag,payload:m.payload,callback:m.callback,next:null},R===null?(N=R=U,y=z):R=R.next=U,d|=P;if(m=m.next,m===null){if(m=s.shared.pending,m===null)break;P=m,m=P.next,P.next=null,s.lastBaseUpdate=P,s.shared.pending=null}}while(!0);if(R===null&&(y=z),s.baseState=y,s.firstBaseUpdate=N,s.lastBaseUpdate=R,t=s.shared.interleaved,t!==null){s=t;do d|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);pn|=d,e.lanes=d,e.memoizedState=z}}function uu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(a(191,s));s.call(r)}}}var jr={},jt=bt(jr),Er=bt(jr),Cr=bt(jr);function dn(e){if(e===jr)throw Error(a(174));return e}function ml(e,t){switch(we(Cr,t),we(Er,e),we(jt,jr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gs(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gs(t,e)}Se(jt),we(jt,t)}function Un(){Se(jt),Se(Er),Se(Cr)}function cu(e){dn(Cr.current);var t=dn(jt.current),n=gs(t,e.type);t!==n&&(we(Er,e),we(jt,n))}function gl(e){Er.current===e&&(Se(jt),Se(Er))}var Ce=bt(0);function $o(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)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yl=[];function vl(){for(var e=0;e<yl.length;e++)yl[e]._workInProgressVersionPrimary=null;yl.length=0}var To=J.ReactCurrentDispatcher,wl=J.ReactCurrentBatchConfig,fn=0,$e=null,De=null,Ie=null,Po=!1,$r=!1,Tr=0,qp=0;function We(){throw Error(a(321))}function kl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mt(e[n],t[n]))return!1;return!0}function xl(e,t,n,r,s,i){if(fn=i,$e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,To.current=e===null||e.memoizedState===null?Gp:Xp,e=n(r,s),$r){i=0;do{if($r=!1,Tr=0,25<=i)throw Error(a(301));i+=1,Ie=De=null,t.updateQueue=null,To.current=Zp,e=n(r,s)}while($r)}if(To.current=zo,t=De!==null&&De.next!==null,fn=0,Ie=De=$e=null,Po=!1,t)throw Error(a(300));return e}function Sl(){var e=Tr!==0;return Tr=0,e}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?$e.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function dt(){if(De===null){var e=$e.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var t=Ie===null?$e.memoizedState:Ie.next;if(t!==null)Ie=t,De=e;else{if(e===null)throw Error(a(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},Ie===null?$e.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function Pr(e,t){return typeof t=="function"?t(e):t}function Nl(e){var t=dt(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=De,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var d=s.next;s.next=i.next,i.next=d}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var m=d=null,y=null,N=i;do{var R=N.lane;if((fn&R)===R)y!==null&&(y=y.next={lane:0,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),r=N.hasEagerState?N.eagerState:e(r,N.action);else{var z={lane:R,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null};y===null?(m=y=z,d=r):y=y.next=z,$e.lanes|=R,pn|=R}N=N.next}while(N!==null&&N!==i);y===null?d=r:y.next=m,mt(r,t.memoizedState)||(Ge=!0),t.memoizedState=r,t.baseState=d,t.baseQueue=y,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,$e.lanes|=i,pn|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _l(e){var t=dt(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var d=s=s.next;do i=e(i,d.action),d=d.next;while(d!==s);mt(i,t.memoizedState)||(Ge=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function du(){}function fu(e,t){var n=$e,r=dt(),s=t(),i=!mt(r.memoizedState,s);if(i&&(r.memoizedState=s,Ge=!0),r=r.queue,jl(mu.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ie!==null&&Ie.memoizedState.tag&1){if(n.flags|=2048,Rr(9,hu.bind(null,n,r,s,t),void 0,null),Me===null)throw Error(a(349));(fn&30)!==0||pu(n,t,s)}return s}function pu(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hu(e,t,n,r){t.value=n,t.getSnapshot=r,gu(t)&&yu(e)}function mu(e,t,n){return n(function(){gu(t)&&yu(e)})}function gu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mt(e,n)}catch{return!0}}function yu(e){var t=zt(e,1);t!==null&&kt(t,e,1,-1)}function vu(e){var t=Et();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pr,lastRenderedState:e},t.queue=e,e=e.dispatch=Yp.bind(null,$e,e),[t.memoizedState,e]}function Rr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.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 wu(){return dt().memoizedState}function Ro(e,t,n,r){var s=Et();$e.flags|=e,s.memoizedState=Rr(1|t,n,void 0,r===void 0?null:r)}function Lo(e,t,n,r){var s=dt();r=r===void 0?null:r;var i=void 0;if(De!==null){var d=De.memoizedState;if(i=d.destroy,r!==null&&kl(r,d.deps)){s.memoizedState=Rr(t,n,i,r);return}}$e.flags|=e,s.memoizedState=Rr(1|t,n,i,r)}function ku(e,t){return Ro(8390656,8,e,t)}function jl(e,t){return Lo(2048,8,e,t)}function xu(e,t){return Lo(4,2,e,t)}function Su(e,t){return Lo(4,4,e,t)}function Nu(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 _u(e,t,n){return n=n!=null?n.concat([e]):null,Lo(4,4,Nu.bind(null,t,e),n)}function El(){}function ju(e,t){var n=dt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&kl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Eu(e,t){var n=dt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&kl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Cu(e,t,n){return(fn&21)===0?(e.baseState&&(e.baseState=!1,Ge=!0),e.memoizedState=n):(mt(n,t)||(n=ra(),$e.lanes|=n,pn|=n,e.baseState=!0),t)}function Qp(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var r=wl.transition;wl.transition={};try{e(!1),t()}finally{he=n,wl.transition=r}}function $u(){return dt().memoizedState}function Kp(e,t,n){var r=Jt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Tu(e))Pu(t,n);else if(n=lu(e,t,n,r),n!==null){var s=Qe();kt(n,e,r,s),Ru(n,t,r)}}function Yp(e,t,n){var r=Jt(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Tu(e))Pu(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var d=t.lastRenderedState,m=i(d,n);if(s.hasEagerState=!0,s.eagerState=m,mt(m,d)){var y=t.interleaved;y===null?(s.next=s,pl(t)):(s.next=y.next,y.next=s),t.interleaved=s;return}}catch{}finally{}n=lu(e,t,s,r),n!==null&&(s=Qe(),kt(n,e,r,s),Ru(n,t,r))}}function Tu(e){var t=e.alternate;return e===$e||t!==null&&t===$e}function Pu(e,t){$r=Po=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ru(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$s(e,n)}}var zo={readContext:ct,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useInsertionEffect:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useSyncExternalStore:We,useId:We,unstable_isNewReconciler:!1},Gp={readContext:ct,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:ku,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ro(4194308,4,Nu.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ro(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ro(4,2,e,t)},useMemo:function(e,t){var n=Et();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Et();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=Kp.bind(null,$e,e),[r.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:vu,useDebugValue:El,useDeferredValue:function(e){return Et().memoizedState=e},useTransition:function(){var e=vu(!1),t=e[0];return e=Qp.bind(null,e[1]),Et().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=$e,s=Et();if(je){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Me===null)throw Error(a(349));(fn&30)!==0||pu(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,ku(mu.bind(null,r,i,e),[e]),r.flags|=2048,Rr(9,hu.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Et(),t=Me.identifierPrefix;if(je){var n=Lt,r=Rt;n=(r&~(1<<32-ht(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Tr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=qp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Xp={readContext:ct,useCallback:ju,useContext:ct,useEffect:jl,useImperativeHandle:_u,useInsertionEffect:xu,useLayoutEffect:Su,useMemo:Eu,useReducer:Nl,useRef:wu,useState:function(){return Nl(Pr)},useDebugValue:El,useDeferredValue:function(e){var t=dt();return Cu(t,De.memoizedState,e)},useTransition:function(){var e=Nl(Pr)[0],t=dt().memoizedState;return[e,t]},useMutableSource:du,useSyncExternalStore:fu,useId:$u,unstable_isNewReconciler:!1},Zp={readContext:ct,useCallback:ju,useContext:ct,useEffect:jl,useImperativeHandle:_u,useInsertionEffect:xu,useLayoutEffect:Su,useMemo:Eu,useReducer:_l,useRef:wu,useState:function(){return _l(Pr)},useDebugValue:El,useDeferredValue:function(e){var t=dt();return De===null?t.memoizedState=e:Cu(t,De.memoizedState,e)},useTransition:function(){var e=_l(Pr)[0],t=dt().memoizedState;return[e,t]},useMutableSource:du,useSyncExternalStore:fu,useId:$u,unstable_isNewReconciler:!1};function yt(e,t){if(e&&e.defaultProps){t=H({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Cl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:H({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Do={isMounted:function(e){return(e=e._reactInternals)?on(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Qe(),s=Jt(e),i=Dt(r,s);i.payload=t,n!=null&&(i.callback=n),t=Yt(e,i,s),t!==null&&(kt(t,e,s,r),Eo(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Qe(),s=Jt(e),i=Dt(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Yt(e,i,s),t!==null&&(kt(t,e,s,r),Eo(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Qe(),r=Jt(e),s=Dt(n,r);s.tag=2,t!=null&&(s.callback=t),t=Yt(e,s,r),t!==null&&(kt(t,e,r,n),Eo(t,e,r))}};function Lu(e,t,n,r,s,i,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,d):t.prototype&&t.prototype.isPureReactComponent?!yr(n,r)||!yr(s,i):!0}function zu(e,t,n){var r=!1,s=qt,i=t.contextType;return typeof i=="object"&&i!==null?i=ct(i):(s=Ye(t)?ln:Be.current,r=t.contextTypes,i=(r=r!=null)?zn(e,s):qt),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Do,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Du(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&&Do.enqueueReplaceState(t,t.state,null)}function $l(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},hl(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=ct(i):(i=Ye(t)?ln:Be.current,s.context=zn(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Cl(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Do.enqueueReplaceState(s,s.state,null),Co(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Hn(e,t){try{var n="",r=t;do n+=ce(r),r=r.return;while(r);var s=n}catch(i){s=`
40
+ Error generating stack: `+i.message+`
41
+ `+i.stack}return{value:e,source:t,stack:s,digest:null}}function Tl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Pl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Jp=typeof WeakMap=="function"?WeakMap:Map;function Ou(e,t,n){n=Dt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ho||(Ho=!0,bl=r),Pl(e,t)},n}function Iu(e,t,n){n=Dt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Pl(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Pl(e,t),typeof r!="function"&&(Xt===null?Xt=new Set([this]):Xt.add(this));var d=t.stack;this.componentDidCatch(t.value,{componentStack:d!==null?d:""})}),n}function Mu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Jp;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=ph.bind(null,e,t,n),t.then(e,e))}function Au(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 Fu(e,t,n,r,s){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Dt(-1,1),t.tag=2,Yt(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=s,e)}var eh=J.ReactCurrentOwner,Ge=!1;function qe(e,t,n,r){t.child=e===null?su(t,null,n,r):Mn(t,e.child,n,r)}function Uu(e,t,n,r,s){n=n.render;var i=t.ref;return Fn(t,s),r=xl(e,t,n,r,i,s),n=Sl(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ot(e,t,s)):(je&&n&&ol(t),t.flags|=1,qe(e,t,r,s),t.child)}function Hu(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Zl(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Bu(e,t,i,r,s)):(e=Qo(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&s)===0){var d=i.memoizedProps;if(n=n.compare,n=n!==null?n:yr,n(d,r)&&e.ref===t.ref)return Ot(e,t,s)}return t.flags|=1,e=tn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Bu(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(yr(i,r)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=r=i,(e.lanes&s)!==0)(e.flags&131072)!==0&&(Ge=!0);else return t.lanes=e.lanes,Ot(e,t,s)}return Rl(e,t,n,r,s)}function Wu(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},we(Wn,lt),lt|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,we(Wn,lt),lt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,we(Wn,lt),lt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,we(Wn,lt),lt|=r;return qe(e,t,s,n),t.child}function Vu(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Rl(e,t,n,r,s){var i=Ye(n)?ln:Be.current;return i=zn(t,i),Fn(t,s),n=xl(e,t,n,r,i,s),r=Sl(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ot(e,t,s)):(je&&r&&ol(t),t.flags|=1,qe(e,t,n,s),t.child)}function bu(e,t,n,r,s){if(Ye(n)){var i=!0;vo(t)}else i=!1;if(Fn(t,s),t.stateNode===null)Io(e,t),zu(t,n,r),$l(t,n,r,s),r=!0;else if(e===null){var d=t.stateNode,m=t.memoizedProps;d.props=m;var y=d.context,N=n.contextType;typeof N=="object"&&N!==null?N=ct(N):(N=Ye(n)?ln:Be.current,N=zn(t,N));var R=n.getDerivedStateFromProps,z=typeof R=="function"||typeof d.getSnapshotBeforeUpdate=="function";z||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(m!==r||y!==N)&&Du(t,d,r,N),Kt=!1;var P=t.memoizedState;d.state=P,Co(t,r,d,s),y=t.memoizedState,m!==r||P!==y||Ke.current||Kt?(typeof R=="function"&&(Cl(t,n,R,r),y=t.memoizedState),(m=Kt||Lu(t,n,m,r,P,y,N))?(z||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=y),d.props=r,d.state=y,d.context=N,r=m):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{d=t.stateNode,iu(e,t),m=t.memoizedProps,N=t.type===t.elementType?m:yt(t.type,m),d.props=N,z=t.pendingProps,P=d.context,y=n.contextType,typeof y=="object"&&y!==null?y=ct(y):(y=Ye(n)?ln:Be.current,y=zn(t,y));var U=n.getDerivedStateFromProps;(R=typeof U=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(m!==z||P!==y)&&Du(t,d,r,y),Kt=!1,P=t.memoizedState,d.state=P,Co(t,r,d,s);var W=t.memoizedState;m!==z||P!==W||Ke.current||Kt?(typeof U=="function"&&(Cl(t,n,U,r),W=t.memoizedState),(N=Kt||Lu(t,n,N,r,P,W,y)||!1)?(R||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(r,W,y),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(r,W,y)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||m===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=W),d.props=r,d.state=W,d.context=y,r=N):(typeof d.componentDidUpdate!="function"||m===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),r=!1)}return Ll(e,t,n,r,i,s)}function Ll(e,t,n,r,s,i){Vu(e,t);var d=(t.flags&128)!==0;if(!r&&!d)return s&&Ga(t,n,!1),Ot(e,t,i);r=t.stateNode,eh.current=t;var m=d&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&d?(t.child=Mn(t,e.child,null,i),t.child=Mn(t,null,m,i)):qe(e,t,m,i),t.memoizedState=r.state,s&&Ga(t,n,!0),t.child}function qu(e){var t=e.stateNode;t.pendingContext?Ka(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ka(e,t.context,!1),ml(e,t.containerInfo)}function Qu(e,t,n,r,s){return In(),al(s),t.flags|=256,qe(e,t,n,r),t.child}var zl={dehydrated:null,treeContext:null,retryLane:0};function Dl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ku(e,t,n){var r=t.pendingProps,s=Ce.current,i=!1,d=(t.flags&128)!==0,m;if((m=d)||(m=e!==null&&e.memoizedState===null?!1:(s&2)!==0),m?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),we(Ce,s&1),e===null)return il(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(d=r.children,e=r.fallback,i?(r=t.mode,i=t.child,d={mode:"hidden",children:d},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=d):i=Ko(d,r,0,null),e=yn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Dl(n),t.memoizedState=zl,e):Ol(t,d));if(s=e.memoizedState,s!==null&&(m=s.dehydrated,m!==null))return th(e,t,d,r,m,s,n);if(i){i=r.fallback,d=t.mode,s=e.child,m=s.sibling;var y={mode:"hidden",children:r.children};return(d&1)===0&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=y,t.deletions=null):(r=tn(s,y),r.subtreeFlags=s.subtreeFlags&14680064),m!==null?i=tn(m,i):(i=yn(i,d,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,d=e.child.memoizedState,d=d===null?Dl(n):{baseLanes:d.baseLanes|n,cachePool:null,transitions:d.transitions},i.memoizedState=d,i.childLanes=e.childLanes&~n,t.memoizedState=zl,r}return i=e.child,e=i.sibling,r=tn(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(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 Ol(e,t){return t=Ko({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Oo(e,t,n,r){return r!==null&&al(r),Mn(t,e.child,null,n),e=Ol(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function th(e,t,n,r,s,i,d){if(n)return t.flags&256?(t.flags&=-257,r=Tl(Error(a(422))),Oo(e,t,d,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Ko({mode:"visible",children:r.children},s,0,null),i=yn(i,s,d,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&Mn(t,e.child,null,d),t.child.memoizedState=Dl(d),t.memoizedState=zl,i);if((t.mode&1)===0)return Oo(e,t,d,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var m=r.dgst;return r=m,i=Error(a(419)),r=Tl(i,r,void 0),Oo(e,t,d,r)}if(m=(d&e.childLanes)!==0,Ge||m){if(r=Me,r!==null){switch(d&-d){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=(s&(r.suspendedLanes|d))!==0?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,zt(e,s),kt(r,e,s,-1))}return Xl(),r=Tl(Error(a(421))),Oo(e,t,d,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=hh.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,st=Vt(s.nextSibling),ot=t,je=!0,gt=null,e!==null&&(at[ut++]=Rt,at[ut++]=Lt,at[ut++]=an,Rt=e.id,Lt=e.overflow,an=t),t=Ol(t,r.children),t.flags|=4096,t)}function Yu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),fl(e.return,t,n)}function Il(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Gu(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(qe(e,t,r.children,n),r=Ce.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yu(e,n,t);else if(e.tag===19)Yu(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(we(Ce,r),(t.mode&1)===0)t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&$o(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Il(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&$o(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Il(t,!0,n,null,i);break;case"together":Il(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Io(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ot(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),pn|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=tn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=tn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function nh(e,t,n){switch(t.tag){case 3:qu(t),In();break;case 5:cu(t);break;case 1:Ye(t.type)&&vo(t);break;case 4:ml(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;we(_o,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(we(Ce,Ce.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Ku(e,t,n):(we(Ce,Ce.current&1),e=Ot(e,t,n),e!==null?e.sibling:null);we(Ce,Ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Gu(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),we(Ce,Ce.current),r)break;return null;case 22:case 23:return t.lanes=0,Wu(e,t,n)}return Ot(e,t,n)}var Xu,Ml,Zu,Ju;Xu=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}},Ml=function(){},Zu=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,dn(jt.current);var i=null;switch(n){case"input":s=fs(e,s),r=fs(e,r),i=[];break;case"select":s=H({},s,{value:void 0}),r=H({},r,{value:void 0}),i=[];break;case"textarea":s=ms(e,s),r=ms(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=mo)}ys(n,r);var d;n=null;for(N in s)if(!r.hasOwnProperty(N)&&s.hasOwnProperty(N)&&s[N]!=null)if(N==="style"){var m=s[N];for(d in m)m.hasOwnProperty(d)&&(n||(n={}),n[d]="")}else N!=="dangerouslySetInnerHTML"&&N!=="children"&&N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&N!=="autoFocus"&&(f.hasOwnProperty(N)?i||(i=[]):(i=i||[]).push(N,null));for(N in r){var y=r[N];if(m=s!=null?s[N]:void 0,r.hasOwnProperty(N)&&y!==m&&(y!=null||m!=null))if(N==="style")if(m){for(d in m)!m.hasOwnProperty(d)||y&&y.hasOwnProperty(d)||(n||(n={}),n[d]="");for(d in y)y.hasOwnProperty(d)&&m[d]!==y[d]&&(n||(n={}),n[d]=y[d])}else n||(i||(i=[]),i.push(N,n)),n=y;else N==="dangerouslySetInnerHTML"?(y=y?y.__html:void 0,m=m?m.__html:void 0,y!=null&&m!==y&&(i=i||[]).push(N,y)):N==="children"?typeof y!="string"&&typeof y!="number"||(i=i||[]).push(N,""+y):N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&(f.hasOwnProperty(N)?(y!=null&&N==="onScroll"&&xe("scroll",e),i||m===y||(i=[])):(i=i||[]).push(N,y))}n&&(i=i||[]).push("style",n);var N=i;(t.updateQueue=N)&&(t.flags|=4)}},Ju=function(e,t,n,r){n!==r&&(t.flags|=4)};function Lr(e,t){if(!je)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 s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function rh(e,t,n){var r=t.pendingProps;switch(sl(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 Ye(t.type)&&yo(),Ve(t),null;case 3:return r=t.stateNode,Un(),Se(Ke),Se(Be),vl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(So(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,gt!==null&&(Kl(gt),gt=null))),Ml(e,t),Ve(t),null;case 5:gl(t);var s=dn(Cr.current);if(n=t.type,e!==null&&t.stateNode!=null)Zu(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Ve(t),null}if(e=dn(jt.current),So(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[_t]=t,r[Sr]=i,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(s=0;s<wr.length;s++)xe(wr[s],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":zi(r,i),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},xe("invalid",r);break;case"textarea":Ii(r,i),xe("invalid",r)}ys(n,i),s=null;for(var d in i)if(i.hasOwnProperty(d)){var m=i[d];d==="children"?typeof m=="string"?r.textContent!==m&&(i.suppressHydrationWarning!==!0&&ho(r.textContent,m,e),s=["children",m]):typeof m=="number"&&r.textContent!==""+m&&(i.suppressHydrationWarning!==!0&&ho(r.textContent,m,e),s=["children",""+m]):f.hasOwnProperty(d)&&m!=null&&d==="onScroll"&&xe("scroll",r)}switch(n){case"input":Vr(r),Oi(r,i,!0);break;case"textarea":Vr(r),Ai(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=mo)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{d=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Fi(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=d.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=d.createElement(n,{is:r.is}):(e=d.createElement(n),n==="select"&&(d=e,r.multiple?d.multiple=!0:r.size&&(d.size=r.size))):e=d.createElementNS(e,n),e[_t]=t,e[Sr]=r,Xu(e,t,!1,!1),t.stateNode=e;e:{switch(d=vs(n,r),n){case"dialog":xe("cancel",e),xe("close",e),s=r;break;case"iframe":case"object":case"embed":xe("load",e),s=r;break;case"video":case"audio":for(s=0;s<wr.length;s++)xe(wr[s],e);s=r;break;case"source":xe("error",e),s=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),s=r;break;case"details":xe("toggle",e),s=r;break;case"input":zi(e,r),s=fs(e,r),xe("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=H({},r,{value:void 0}),xe("invalid",e);break;case"textarea":Ii(e,r),s=ms(e,r),xe("invalid",e);break;default:s=r}ys(n,s),m=s;for(i in m)if(m.hasOwnProperty(i)){var y=m[i];i==="style"?Bi(e,y):i==="dangerouslySetInnerHTML"?(y=y?y.__html:void 0,y!=null&&Ui(e,y)):i==="children"?typeof y=="string"?(n!=="textarea"||y!=="")&&er(e,y):typeof y=="number"&&er(e,""+y):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(f.hasOwnProperty(i)?y!=null&&i==="onScroll"&&xe("scroll",e):y!=null&&ke(e,i,y,d))}switch(n){case"input":Vr(e),Oi(e,r,!1);break;case"textarea":Vr(e),Ai(e);break;case"option":r.value!=null&&e.setAttribute("value",""+pe(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?xn(e,!!r.multiple,i,!1):r.defaultValue!=null&&xn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=mo)}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)Ju(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(a(166));if(n=dn(Cr.current),dn(jt.current),So(t)){if(r=t.stateNode,n=t.memoizedProps,r[_t]=t,(i=r.nodeValue!==n)&&(e=ot,e!==null))switch(e.tag){case 3:ho(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ho(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[_t]=t,t.stateNode=r}return Ve(t),null;case 13:if(Se(Ce),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(je&&st!==null&&(t.mode&1)!==0&&(t.flags&128)===0)nu(),In(),t.flags|=98560,i=!1;else if(i=So(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));i[_t]=t}else In(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),i=!1}else gt!==null&&(Kl(gt),gt=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Ce.current&1)!==0?Oe===0&&(Oe=3):Xl())),t.updateQueue!==null&&(t.flags|=4),Ve(t),null);case 4:return Un(),Ml(e,t),e===null&&kr(t.stateNode.containerInfo),Ve(t),null;case 10:return dl(t.type._context),Ve(t),null;case 17:return Ye(t.type)&&yo(),Ve(t),null;case 19:if(Se(Ce),i=t.memoizedState,i===null)return Ve(t),null;if(r=(t.flags&128)!==0,d=i.rendering,d===null)if(r)Lr(i,!1);else{if(Oe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=$o(e),d!==null){for(t.flags|=128,Lr(i,!1),r=d.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,d=i.alternate,d===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=d.childLanes,i.lanes=d.lanes,i.child=d.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=d.memoizedProps,i.memoizedState=d.memoizedState,i.updateQueue=d.updateQueue,i.type=d.type,e=d.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return we(Ce,Ce.current&1|2),t.child}e=e.sibling}i.tail!==null&&Pe()>Vn&&(t.flags|=128,r=!0,Lr(i,!1),t.lanes=4194304)}else{if(!r)if(e=$o(d),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"&&!d.alternate&&!je)return Ve(t),null}else 2*Pe()-i.renderingStartTime>Vn&&n!==1073741824&&(t.flags|=128,r=!0,Lr(i,!1),t.lanes=4194304);i.isBackwards?(d.sibling=t.child,t.child=d):(n=i.last,n!==null?n.sibling=d:t.child=d,i.last=d)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Pe(),t.sibling=null,n=Ce.current,we(Ce,r?n&1|2:n&1),t):(Ve(t),null);case 22:case 23:return Gl(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(lt&1073741824)!==0&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),null;case 24:return null;case 25:return null}throw Error(a(156,t.tag))}function oh(e,t){switch(sl(t),t.tag){case 1:return Ye(t.type)&&yo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Un(),Se(Ke),Se(Be),vl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return gl(t),null;case 13:if(Se(Ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));In()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(Ce),null;case 4:return Un(),null;case 10:return dl(t.type._context),null;case 22:case 23:return Gl(),null;case 24:return null;default:return null}}var Mo=!1,be=!1,sh=typeof WeakSet=="function"?WeakSet:Set,B=null;function Bn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Te(e,t,r)}else n.current=null}function Al(e,t,n){try{n()}catch(r){Te(e,t,r)}}var ec=!1;function lh(e,t){if(Gs=no,e=La(),Bs(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 s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var d=0,m=-1,y=-1,N=0,R=0,z=e,P=null;t:for(;;){for(var U;z!==n||s!==0&&z.nodeType!==3||(m=d+s),z!==i||r!==0&&z.nodeType!==3||(y=d+r),z.nodeType===3&&(d+=z.nodeValue.length),(U=z.firstChild)!==null;)P=z,z=U;for(;;){if(z===e)break t;if(P===n&&++N===s&&(m=d),P===i&&++R===r&&(y=d),(U=z.nextSibling)!==null)break;z=P,P=z.parentNode}z=U}n=m===-1||y===-1?null:{start:m,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(Xs={focusedElem:e,selectionRange:n},no=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var W=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(W!==null){var V=W.memoizedProps,Re=W.memoizedState,x=t.stateNode,w=x.getSnapshotBeforeUpdate(t.elementType===t.type?V:yt(t.type,V),Re);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(O){Te(t,t.return,O)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return W=ec,ec=!1,W}function zr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Al(t,n,i)}s=s.next}while(s!==r)}}function Ao(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 Fl(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 tc(e){var t=e.alternate;t!==null&&(e.alternate=null,tc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_t],delete t[Sr],delete t[tl],delete t[Bp],delete t[Wp])),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 nc(e){return e.tag===5||e.tag===3||e.tag===4}function rc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nc(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 Ul(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=mo));else if(r!==4&&(e=e.child,e!==null))for(Ul(e,t,n),e=e.sibling;e!==null;)Ul(e,t,n),e=e.sibling}function Hl(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(Hl(e,t,n),e=e.sibling;e!==null;)Hl(e,t,n),e=e.sibling}var Ue=null,vt=!1;function Gt(e,t,n){for(n=n.child;n!==null;)oc(e,t,n),n=n.sibling}function oc(e,t,n){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(Gr,n)}catch{}switch(n.tag){case 5:be||Bn(n,t);case 6:var r=Ue,s=vt;Ue=null,Gt(e,t,n),Ue=r,vt=s,Ue!==null&&(vt?(e=Ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ue.removeChild(n.stateNode));break;case 18:Ue!==null&&(vt?(e=Ue,n=n.stateNode,e.nodeType===8?el(e.parentNode,n):e.nodeType===1&&el(e,n),dr(e)):el(Ue,n.stateNode));break;case 4:r=Ue,s=vt,Ue=n.stateNode.containerInfo,vt=!0,Gt(e,t,n),Ue=r,vt=s;break;case 0:case 11:case 14:case 15:if(!be&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,d=i.destroy;i=i.tag,d!==void 0&&((i&2)!==0||(i&4)!==0)&&Al(n,t,d),s=s.next}while(s!==r)}Gt(e,t,n);break;case 1:if(!be&&(Bn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(m){Te(n,t,m)}Gt(e,t,n);break;case 21:Gt(e,t,n);break;case 22:n.mode&1?(be=(r=be)||n.memoizedState!==null,Gt(e,t,n),be=r):Gt(e,t,n);break;default:Gt(e,t,n)}}function sc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new sh),t.forEach(function(r){var s=mh.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function wt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,d=t,m=d;e:for(;m!==null;){switch(m.tag){case 5:Ue=m.stateNode,vt=!1;break e;case 3:Ue=m.stateNode.containerInfo,vt=!0;break e;case 4:Ue=m.stateNode.containerInfo,vt=!0;break e}m=m.return}if(Ue===null)throw Error(a(160));oc(i,d,s),Ue=null,vt=!1;var y=s.alternate;y!==null&&(y.return=null),s.return=null}catch(N){Te(s,t,N)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)lc(t,e),t=t.sibling}function lc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(wt(t,e),Ct(e),r&4){try{zr(3,e,e.return),Ao(3,e)}catch(V){Te(e,e.return,V)}try{zr(5,e,e.return)}catch(V){Te(e,e.return,V)}}break;case 1:wt(t,e),Ct(e),r&512&&n!==null&&Bn(n,n.return);break;case 5:if(wt(t,e),Ct(e),r&512&&n!==null&&Bn(n,n.return),e.flags&32){var s=e.stateNode;try{er(s,"")}catch(V){Te(e,e.return,V)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,d=n!==null?n.memoizedProps:i,m=e.type,y=e.updateQueue;if(e.updateQueue=null,y!==null)try{m==="input"&&i.type==="radio"&&i.name!=null&&Di(s,i),vs(m,d);var N=vs(m,i);for(d=0;d<y.length;d+=2){var R=y[d],z=y[d+1];R==="style"?Bi(s,z):R==="dangerouslySetInnerHTML"?Ui(s,z):R==="children"?er(s,z):ke(s,R,z,N)}switch(m){case"input":ps(s,i);break;case"textarea":Mi(s,i);break;case"select":var P=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var U=i.value;U!=null?xn(s,!!i.multiple,U,!1):P!==!!i.multiple&&(i.defaultValue!=null?xn(s,!!i.multiple,i.defaultValue,!0):xn(s,!!i.multiple,i.multiple?[]:"",!1))}s[Sr]=i}catch(V){Te(e,e.return,V)}}break;case 6:if(wt(t,e),Ct(e),r&4){if(e.stateNode===null)throw Error(a(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(V){Te(e,e.return,V)}}break;case 3:if(wt(t,e),Ct(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{dr(t.containerInfo)}catch(V){Te(e,e.return,V)}break;case 4:wt(t,e),Ct(e);break;case 13:wt(t,e),Ct(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Vl=Pe())),r&4&&sc(e);break;case 22:if(R=n!==null&&n.memoizedState!==null,e.mode&1?(be=(N=be)||R,wt(t,e),be=N):wt(t,e),Ct(e),r&8192){if(N=e.memoizedState!==null,(e.stateNode.isHidden=N)&&!R&&(e.mode&1)!==0)for(B=e,R=e.child;R!==null;){for(z=B=R;B!==null;){switch(P=B,U=P.child,P.tag){case 0:case 11:case 14:case 15:zr(4,P,P.return);break;case 1:Bn(P,P.return);var W=P.stateNode;if(typeof W.componentWillUnmount=="function"){r=P,n=P.return;try{t=r,W.props=t.memoizedProps,W.state=t.memoizedState,W.componentWillUnmount()}catch(V){Te(r,n,V)}}break;case 5:Bn(P,P.return);break;case 22:if(P.memoizedState!==null){uc(z);continue}}U!==null?(U.return=P,B=U):uc(z)}R=R.sibling}e:for(R=null,z=e;;){if(z.tag===5){if(R===null){R=z;try{s=z.stateNode,N?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(m=z.stateNode,y=z.memoizedProps.style,d=y!=null&&y.hasOwnProperty("display")?y.display:null,m.style.display=Hi("display",d))}catch(V){Te(e,e.return,V)}}}else if(z.tag===6){if(R===null)try{z.stateNode.nodeValue=N?"":z.memoizedProps}catch(V){Te(e,e.return,V)}}else if((z.tag!==22&&z.tag!==23||z.memoizedState===null||z===e)&&z.child!==null){z.child.return=z,z=z.child;continue}if(z===e)break e;for(;z.sibling===null;){if(z.return===null||z.return===e)break e;R===z&&(R=null),z=z.return}R===z&&(R=null),z.sibling.return=z.return,z=z.sibling}}break;case 19:wt(t,e),Ct(e),r&4&&sc(e);break;case 21:break;default:wt(t,e),Ct(e)}}function Ct(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(nc(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(er(s,""),r.flags&=-33);var i=rc(e);Hl(e,i,s);break;case 3:case 4:var d=r.stateNode.containerInfo,m=rc(e);Ul(e,m,d);break;default:throw Error(a(161))}}catch(y){Te(e,e.return,y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ih(e,t,n){B=e,ic(e)}function ic(e,t,n){for(var r=(e.mode&1)!==0;B!==null;){var s=B,i=s.child;if(s.tag===22&&r){var d=s.memoizedState!==null||Mo;if(!d){var m=s.alternate,y=m!==null&&m.memoizedState!==null||be;m=Mo;var N=be;if(Mo=d,(be=y)&&!N)for(B=s;B!==null;)d=B,y=d.child,d.tag===22&&d.memoizedState!==null?cc(s):y!==null?(y.return=d,B=y):cc(s);for(;i!==null;)B=i,ic(i),i=i.sibling;B=s,Mo=m,be=N}ac(e)}else(s.subtreeFlags&8772)!==0&&i!==null?(i.return=s,B=i):ac(e)}}function ac(e){for(;B!==null;){var t=B;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:be||Ao(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!be)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:yt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&uu(t,i,r);break;case 3:var d=t.updateQueue;if(d!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}uu(t,d,n)}break;case 5:var m=t.stateNode;if(n===null&&t.flags&4){n=m;var y=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":y.autoFocus&&n.focus();break;case"img":y.src&&(n.src=y.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var N=t.alternate;if(N!==null){var R=N.memoizedState;if(R!==null){var z=R.dehydrated;z!==null&&dr(z)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}be||t.flags&512&&Fl(t)}catch(P){Te(t,t.return,P)}}if(t===e){B=null;break}if(n=t.sibling,n!==null){n.return=t.return,B=n;break}B=t.return}}function uc(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var n=t.sibling;if(n!==null){n.return=t.return,B=n;break}B=t.return}}function cc(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ao(4,t)}catch(y){Te(t,n,y)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(y){Te(t,s,y)}}var i=t.return;try{Fl(t)}catch(y){Te(t,i,y)}break;case 5:var d=t.return;try{Fl(t)}catch(y){Te(t,d,y)}}}catch(y){Te(t,t.return,y)}if(t===e){B=null;break}var m=t.sibling;if(m!==null){m.return=t.return,B=m;break}B=t.return}}var ah=Math.ceil,Fo=J.ReactCurrentDispatcher,Bl=J.ReactCurrentOwner,ft=J.ReactCurrentBatchConfig,ae=0,Me=null,ze=null,He=0,lt=0,Wn=bt(0),Oe=0,Dr=null,pn=0,Uo=0,Wl=0,Or=null,Xe=null,Vl=0,Vn=1/0,It=null,Ho=!1,bl=null,Xt=null,Bo=!1,Zt=null,Wo=0,Ir=0,ql=null,Vo=-1,bo=0;function Qe(){return(ae&6)!==0?Pe():Vo!==-1?Vo:Vo=Pe()}function Jt(e){return(e.mode&1)===0?1:(ae&2)!==0&&He!==0?He&-He:bp.transition!==null?(bo===0&&(bo=ra()),bo):(e=he,e!==0||(e=window.event,e=e===void 0?16:fa(e.type)),e)}function kt(e,t,n,r){if(50<Ir)throw Ir=0,ql=null,Error(a(185));lr(e,n,r),((ae&2)===0||e!==Me)&&(e===Me&&((ae&2)===0&&(Uo|=n),Oe===4&&en(e,He)),Ze(e,r),n===1&&ae===0&&(t.mode&1)===0&&(Vn=Pe()+500,wo&&Qt()))}function Ze(e,t){var n=e.callbackNode;bf(e,t);var r=Jr(e,e===Me?He:0);if(r===0)n!==null&&ea(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ea(n),t===1)e.tag===0?Vp(fc.bind(null,e)):Xa(fc.bind(null,e)),Up(function(){(ae&6)===0&&Qt()}),n=null;else{switch(oa(r)){case 1:n=js;break;case 4:n=ta;break;case 16:n=Yr;break;case 536870912:n=na;break;default:n=Yr}n=kc(n,dc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function dc(e,t){if(Vo=-1,bo=0,(ae&6)!==0)throw Error(a(327));var n=e.callbackNode;if(bn()&&e.callbackNode!==n)return null;var r=Jr(e,e===Me?He:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=qo(e,r);else{t=r;var s=ae;ae|=2;var i=hc();(Me!==e||He!==t)&&(It=null,Vn=Pe()+500,mn(e,t));do try{dh();break}catch(m){pc(e,m)}while(!0);cl(),Fo.current=i,ae=s,ze!==null?t=0:(Me=null,He=0,t=Oe)}if(t!==0){if(t===2&&(s=Es(e),s!==0&&(r=s,t=Ql(e,s))),t===1)throw n=Dr,mn(e,0),en(e,r),Ze(e,Pe()),n;if(t===6)en(e,r);else{if(s=e.current.alternate,(r&30)===0&&!uh(s)&&(t=qo(e,r),t===2&&(i=Es(e),i!==0&&(r=i,t=Ql(e,i))),t===1))throw n=Dr,mn(e,0),en(e,r),Ze(e,Pe()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:gn(e,Xe,It);break;case 3:if(en(e,r),(r&130023424)===r&&(t=Vl+500-Pe(),10<t)){if(Jr(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Qe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Js(gn.bind(null,e,Xe,It),t);break}gn(e,Xe,It);break;case 4:if(en(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var d=31-ht(r);i=1<<d,d=t[d],d>s&&(s=d),r&=~i}if(r=s,r=Pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ah(r/1960))-r,10<r){e.timeoutHandle=Js(gn.bind(null,e,Xe,It),r);break}gn(e,Xe,It);break;case 5:gn(e,Xe,It);break;default:throw Error(a(329))}}}return Ze(e,Pe()),e.callbackNode===n?dc.bind(null,e):null}function Ql(e,t){var n=Or;return e.current.memoizedState.isDehydrated&&(mn(e,t).flags|=256),e=qo(e,t),e!==2&&(t=Xe,Xe=n,t!==null&&Kl(t)),e}function Kl(e){Xe===null?Xe=e:Xe.push.apply(Xe,e)}function uh(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 s=n[r],i=s.getSnapshot;s=s.value;try{if(!mt(i(),s))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 en(e,t){for(t&=~Wl,t&=~Uo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ht(t),r=1<<n;e[n]=-1,t&=~r}}function fc(e){if((ae&6)!==0)throw Error(a(327));bn();var t=Jr(e,0);if((t&1)===0)return Ze(e,Pe()),null;var n=qo(e,t);if(e.tag!==0&&n===2){var r=Es(e);r!==0&&(t=r,n=Ql(e,r))}if(n===1)throw n=Dr,mn(e,0),en(e,t),Ze(e,Pe()),n;if(n===6)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,gn(e,Xe,It),Ze(e,Pe()),null}function Yl(e,t){var n=ae;ae|=1;try{return e(t)}finally{ae=n,ae===0&&(Vn=Pe()+500,wo&&Qt())}}function hn(e){Zt!==null&&Zt.tag===0&&(ae&6)===0&&bn();var t=ae;ae|=1;var n=ft.transition,r=he;try{if(ft.transition=null,he=1,e)return e()}finally{he=r,ft.transition=n,ae=t,(ae&6)===0&&Qt()}}function Gl(){lt=Wn.current,Se(Wn)}function mn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Fp(n)),ze!==null)for(n=ze.return;n!==null;){var r=n;switch(sl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&yo();break;case 3:Un(),Se(Ke),Se(Be),vl();break;case 5:gl(r);break;case 4:Un();break;case 13:Se(Ce);break;case 19:Se(Ce);break;case 10:dl(r.type._context);break;case 22:case 23:Gl()}n=n.return}if(Me=e,ze=e=tn(e.current,null),He=lt=t,Oe=0,Dr=null,Wl=Uo=pn=0,Xe=Or=null,cn!==null){for(t=0;t<cn.length;t++)if(n=cn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var d=i.next;i.next=s,r.next=d}n.pending=r}cn=null}return e}function pc(e,t){do{var n=ze;try{if(cl(),To.current=zo,Po){for(var r=$e.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Po=!1}if(fn=0,Ie=De=$e=null,$r=!1,Tr=0,Bl.current=null,n===null||n.return===null){Oe=1,Dr=t,ze=null;break}e:{var i=e,d=n.return,m=n,y=t;if(t=He,m.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){var N=y,R=m,z=R.tag;if((R.mode&1)===0&&(z===0||z===11||z===15)){var P=R.alternate;P?(R.updateQueue=P.updateQueue,R.memoizedState=P.memoizedState,R.lanes=P.lanes):(R.updateQueue=null,R.memoizedState=null)}var U=Au(d);if(U!==null){U.flags&=-257,Fu(U,d,m,i,t),U.mode&1&&Mu(i,N,t),t=U,y=N;var W=t.updateQueue;if(W===null){var V=new Set;V.add(y),t.updateQueue=V}else W.add(y);break e}else{if((t&1)===0){Mu(i,N,t),Xl();break e}y=Error(a(426))}}else if(je&&m.mode&1){var Re=Au(d);if(Re!==null){(Re.flags&65536)===0&&(Re.flags|=256),Fu(Re,d,m,i,t),al(Hn(y,m));break e}}i=y=Hn(y,m),Oe!==4&&(Oe=2),Or===null?Or=[i]:Or.push(i),i=d;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var x=Ou(i,y,t);au(i,x);break e;case 1:m=y;var w=i.type,S=i.stateNode;if((i.flags&128)===0&&(typeof w.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Xt===null||!Xt.has(S)))){i.flags|=65536,t&=-t,i.lanes|=t;var O=Iu(i,m,t);au(i,O);break e}}i=i.return}while(i!==null)}gc(n)}catch(b){t=b,ze===n&&n!==null&&(ze=n=n.return);continue}break}while(!0)}function hc(){var e=Fo.current;return Fo.current=zo,e===null?zo:e}function Xl(){(Oe===0||Oe===3||Oe===2)&&(Oe=4),Me===null||(pn&268435455)===0&&(Uo&268435455)===0||en(Me,He)}function qo(e,t){var n=ae;ae|=2;var r=hc();(Me!==e||He!==t)&&(It=null,mn(e,t));do try{ch();break}catch(s){pc(e,s)}while(!0);if(cl(),ae=n,Fo.current=r,ze!==null)throw Error(a(261));return Me=null,He=0,Oe}function ch(){for(;ze!==null;)mc(ze)}function dh(){for(;ze!==null&&!If();)mc(ze)}function mc(e){var t=wc(e.alternate,e,lt);e.memoizedProps=e.pendingProps,t===null?gc(e):ze=t,Bl.current=null}function gc(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=rh(n,t,lt),n!==null){ze=n;return}}else{if(n=oh(n,t),n!==null){n.flags&=32767,ze=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Oe=6,ze=null;return}}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);Oe===0&&(Oe=5)}function gn(e,t,n){var r=he,s=ft.transition;try{ft.transition=null,he=1,fh(e,t,n,r)}finally{ft.transition=s,he=r}return null}function fh(e,t,n,r){do bn();while(Zt!==null);if((ae&6)!==0)throw Error(a(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(qf(e,i),e===Me&&(ze=Me=null,He=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Bo||(Bo=!0,kc(Yr,function(){return bn(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=ft.transition,ft.transition=null;var d=he;he=1;var m=ae;ae|=4,Bl.current=null,lh(e,n),lc(n,e),Lp(Xs),no=!!Gs,Xs=Gs=null,e.current=n,ih(n),Mf(),ae=m,he=d,ft.transition=i}else e.current=n;if(Bo&&(Bo=!1,Zt=e,Wo=s),i=e.pendingLanes,i===0&&(Xt=null),Uf(n.stateNode),Ze(e,Pe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Ho)throw Ho=!1,e=bl,bl=null,e;return(Wo&1)!==0&&e.tag!==0&&bn(),i=e.pendingLanes,(i&1)!==0?e===ql?Ir++:(Ir=0,ql=e):Ir=0,Qt(),null}function bn(){if(Zt!==null){var e=oa(Wo),t=ft.transition,n=he;try{if(ft.transition=null,he=16>e?16:e,Zt===null)var r=!1;else{if(e=Zt,Zt=null,Wo=0,(ae&6)!==0)throw Error(a(331));var s=ae;for(ae|=4,B=e.current;B!==null;){var i=B,d=i.child;if((B.flags&16)!==0){var m=i.deletions;if(m!==null){for(var y=0;y<m.length;y++){var N=m[y];for(B=N;B!==null;){var R=B;switch(R.tag){case 0:case 11:case 15:zr(8,R,i)}var z=R.child;if(z!==null)z.return=R,B=z;else for(;B!==null;){R=B;var P=R.sibling,U=R.return;if(tc(R),R===N){B=null;break}if(P!==null){P.return=U,B=P;break}B=U}}}var W=i.alternate;if(W!==null){var V=W.child;if(V!==null){W.child=null;do{var Re=V.sibling;V.sibling=null,V=Re}while(V!==null)}}B=i}}if((i.subtreeFlags&2064)!==0&&d!==null)d.return=i,B=d;else e:for(;B!==null;){if(i=B,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:zr(9,i,i.return)}var x=i.sibling;if(x!==null){x.return=i.return,B=x;break e}B=i.return}}var w=e.current;for(B=w;B!==null;){d=B;var S=d.child;if((d.subtreeFlags&2064)!==0&&S!==null)S.return=d,B=S;else e:for(d=w;B!==null;){if(m=B,(m.flags&2048)!==0)try{switch(m.tag){case 0:case 11:case 15:Ao(9,m)}}catch(b){Te(m,m.return,b)}if(m===d){B=null;break e}var O=m.sibling;if(O!==null){O.return=m.return,B=O;break e}B=m.return}}if(ae=s,Qt(),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(Gr,e)}catch{}r=!0}return r}finally{he=n,ft.transition=t}}return!1}function yc(e,t,n){t=Hn(n,t),t=Ou(e,t,1),e=Yt(e,t,1),t=Qe(),e!==null&&(lr(e,1,t),Ze(e,t))}function Te(e,t,n){if(e.tag===3)yc(e,e,n);else for(;t!==null;){if(t.tag===3){yc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Xt===null||!Xt.has(r))){e=Hn(n,e),e=Iu(t,e,1),t=Yt(t,e,1),e=Qe(),t!==null&&(lr(t,1,e),Ze(t,e));break}}t=t.return}}function ph(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Qe(),e.pingedLanes|=e.suspendedLanes&n,Me===e&&(He&n)===n&&(Oe===4||Oe===3&&(He&130023424)===He&&500>Pe()-Vl?mn(e,0):Wl|=n),Ze(e,t)}function vc(e,t){t===0&&((e.mode&1)===0?t=1:(t=Zr,Zr<<=1,(Zr&130023424)===0&&(Zr=4194304)));var n=Qe();e=zt(e,t),e!==null&&(lr(e,t,n),Ze(e,n))}function hh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vc(e,n)}function mh(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}r!==null&&r.delete(t),vc(e,n)}var wc;wc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ke.current)Ge=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ge=!1,nh(e,t,n);Ge=(e.flags&131072)!==0}else Ge=!1,je&&(t.flags&1048576)!==0&&Za(t,xo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Io(e,t),e=t.pendingProps;var s=zn(t,Be.current);Fn(t,n),s=xl(null,t,r,e,s,n);var i=Sl();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ye(r)?(i=!0,vo(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,hl(t),s.updater=Do,t.stateNode=s,s._reactInternals=t,$l(t,r,e,n),t=Ll(null,t,r,!0,i,n)):(t.tag=0,je&&i&&ol(t),qe(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Io(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=yh(r),e=yt(r,e),s){case 0:t=Rl(null,t,r,e,n);break e;case 1:t=bu(null,t,r,e,n);break e;case 11:t=Uu(null,t,r,e,n);break e;case 14:t=Hu(null,t,r,yt(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),Rl(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),bu(e,t,r,s,n);case 3:e:{if(qu(t),e===null)throw Error(a(387));r=t.pendingProps,i=t.memoizedState,s=i.element,iu(e,t),Co(t,r,null,n);var d=t.memoizedState;if(r=d.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:d.cache,pendingSuspenseBoundaries:d.pendingSuspenseBoundaries,transitions:d.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Hn(Error(a(423)),t),t=Qu(e,t,r,n,s);break e}else if(r!==s){s=Hn(Error(a(424)),t),t=Qu(e,t,r,n,s);break e}else for(st=Vt(t.stateNode.containerInfo.firstChild),ot=t,je=!0,gt=null,n=su(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(In(),r===s){t=Ot(e,t,n);break e}qe(e,t,r,n)}t=t.child}return t;case 5:return cu(t),e===null&&il(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,d=s.children,Zs(r,s)?d=null:i!==null&&Zs(r,i)&&(t.flags|=32),Vu(e,t),qe(e,t,d,n),t.child;case 6:return e===null&&il(t),null;case 13:return Ku(e,t,n);case 4:return ml(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Mn(t,null,r,n):qe(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),Uu(e,t,r,s,n);case 7:return qe(e,t,t.pendingProps,n),t.child;case 8:return qe(e,t,t.pendingProps.children,n),t.child;case 12:return qe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,d=s.value,we(_o,r._currentValue),r._currentValue=d,i!==null)if(mt(i.value,d)){if(i.children===s.children&&!Ke.current){t=Ot(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var m=i.dependencies;if(m!==null){d=i.child;for(var y=m.firstContext;y!==null;){if(y.context===r){if(i.tag===1){y=Dt(-1,n&-n),y.tag=2;var N=i.updateQueue;if(N!==null){N=N.shared;var R=N.pending;R===null?y.next=y:(y.next=R.next,R.next=y),N.pending=y}}i.lanes|=n,y=i.alternate,y!==null&&(y.lanes|=n),fl(i.return,n,t),m.lanes|=n;break}y=y.next}}else if(i.tag===10)d=i.type===t.type?null:i.child;else if(i.tag===18){if(d=i.return,d===null)throw Error(a(341));d.lanes|=n,m=d.alternate,m!==null&&(m.lanes|=n),fl(d,n,t),d=i.sibling}else d=i.child;if(d!==null)d.return=i;else for(d=i;d!==null;){if(d===t){d=null;break}if(i=d.sibling,i!==null){i.return=d.return,d=i;break}d=d.return}i=d}qe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Fn(t,n),s=ct(s),r=r(s),t.flags|=1,qe(e,t,r,n),t.child;case 14:return r=t.type,s=yt(r,t.pendingProps),s=yt(r.type,s),Hu(e,t,r,s,n);case 15:return Bu(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),Io(e,t),t.tag=1,Ye(r)?(e=!0,vo(t)):e=!1,Fn(t,n),zu(t,r,s),$l(t,r,s,n),Ll(null,t,r,!0,e,n);case 19:return Gu(e,t,n);case 22:return Wu(e,t,n)}throw Error(a(156,t.tag))};function kc(e,t){return Ji(e,t)}function gh(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 pt(e,t,n,r){return new gh(e,t,n,r)}function Zl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yh(e){if(typeof e=="function")return Zl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===M)return 11;if(e===Fe)return 14}return 2}function tn(e,t){var n=e.alternate;return n===null?(n=pt(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 Qo(e,t,n,r,s,i){var d=2;if(r=e,typeof e=="function")Zl(e)&&(d=1);else if(typeof e=="string")d=5;else e:switch(e){case q:return yn(n.children,s,i,t);case Y:d=8,s|=8;break;case ie:return e=pt(12,n,t,s|2),e.elementType=ie,e.lanes=i,e;case re:return e=pt(13,n,t,s),e.elementType=re,e.lanes=i,e;case ge:return e=pt(19,n,t,s),e.elementType=ge,e.lanes=i,e;case ye:return Ko(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ne:d=10;break e;case tt:d=9;break e;case M:d=11;break e;case Fe:d=14;break e;case Le:d=16,r=null;break e}throw Error(a(130,e==null?e:typeof e,""))}return t=pt(d,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function yn(e,t,n,r){return e=pt(7,e,r,t),e.lanes=n,e}function Ko(e,t,n,r){return e=pt(22,e,r,t),e.elementType=ye,e.lanes=n,e.stateNode={isHidden:!1},e}function Jl(e,t,n){return e=pt(6,e,null,t),e.lanes=n,e}function ei(e,t,n){return t=pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vh(e,t,n,r,s){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=Cs(0),this.expirationTimes=Cs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cs(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ti(e,t,n,r,s,i,d,m,y){return e=new vh(e,t,n,m,y),t===1?(t=1,i===!0&&(t|=8)):t=0,i=pt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},hl(i),e}function wh(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ue,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function xc(e){if(!e)return qt;e=e._reactInternals;e:{if(on(e)!==e||e.tag!==1)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ye(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(a(171))}if(e.tag===1){var n=e.type;if(Ye(n))return Ya(e,n,t)}return t}function Sc(e,t,n,r,s,i,d,m,y){return e=ti(n,r,!0,e,s,i,d,m,y),e.context=xc(null),n=e.current,r=Qe(),s=Jt(n),i=Dt(r,s),i.callback=t??null,Yt(n,i,s),e.current.lanes=s,lr(e,s,r),Ze(e,r),e}function Yo(e,t,n,r){var s=t.current,i=Qe(),d=Jt(s);return n=xc(n),t.context===null?t.context=n:t.pendingContext=n,t=Dt(i,d),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Yt(s,t,d),e!==null&&(kt(e,s,d,i),Eo(e,s,d)),d}function Go(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 Nc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ni(e,t){Nc(e,t),(e=e.alternate)&&Nc(e,t)}function kh(){return null}var _c=typeof reportError=="function"?reportError:function(e){console.error(e)};function ri(e){this._internalRoot=e}Xo.prototype.render=ri.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));Yo(e,t,null,null)},Xo.prototype.unmount=ri.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hn(function(){Yo(null,e,null,null)}),t[Tt]=null}};function Xo(e){this._internalRoot=e}Xo.prototype.unstable_scheduleHydration=function(e){if(e){var t=ia();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ht.length&&t!==0&&t<Ht[n].priority;n++);Ht.splice(n,0,e),n===0&&ca(e)}};function oi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Zo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function jc(){}function xh(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var N=Go(d);i.call(N)}}var d=Sc(t,r,e,0,null,!1,!1,"",jc);return e._reactRootContainer=d,e[Tt]=d.current,kr(e.nodeType===8?e.parentNode:e),hn(),d}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var m=r;r=function(){var N=Go(y);m.call(N)}}var y=ti(e,0,!1,null,null,!1,!1,"",jc);return e._reactRootContainer=y,e[Tt]=y.current,kr(e.nodeType===8?e.parentNode:e),hn(function(){Yo(t,y,n,r)}),y}function Jo(e,t,n,r,s){var i=n._reactRootContainer;if(i){var d=i;if(typeof s=="function"){var m=s;s=function(){var y=Go(d);m.call(y)}}Yo(t,d,e,s)}else d=xh(n,t,e,s,r);return Go(d)}sa=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=sr(t.pendingLanes);n!==0&&($s(t,n|1),Ze(t,Pe()),(ae&6)===0&&(Vn=Pe()+500,Qt()))}break;case 13:hn(function(){var r=zt(e,1);if(r!==null){var s=Qe();kt(r,e,1,s)}}),ni(e,1)}},Ts=function(e){if(e.tag===13){var t=zt(e,134217728);if(t!==null){var n=Qe();kt(t,e,134217728,n)}ni(e,134217728)}},la=function(e){if(e.tag===13){var t=Jt(e),n=zt(e,t);if(n!==null){var r=Qe();kt(n,e,t,r)}ni(e,t)}},ia=function(){return he},aa=function(e,t){var n=he;try{return he=e,t()}finally{he=n}},xs=function(e,t,n){switch(t){case"input":if(ps(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 s=go(r);if(!s)throw Error(a(90));Li(r),ps(r,s)}}}break;case"textarea":Mi(e,n);break;case"select":t=n.value,t!=null&&xn(e,!!n.multiple,t,!1)}},qi=Yl,Qi=hn;var Sh={usingClientEntryPoint:!1,Events:[Nr,Rn,go,Vi,bi,Yl]},Mr={findFiberByHostInstance:sn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Nh={bundleType:Mr.bundleType,version:Mr.version,rendererPackageName:Mr.rendererPackageName,rendererConfig:Mr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:J.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Xi(e),e===null?null:e.stateNode},findFiberByHostInstance:Mr.findFiberByHostInstance||kh,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 es=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!es.isDisabled&&es.supportsFiber)try{Gr=es.inject(Nh),Nt=es}catch{}}return Je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Sh,Je.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!oi(t))throw Error(a(200));return wh(e,t,null,n)},Je.createRoot=function(e,t){if(!oi(e))throw Error(a(299));var n=!1,r="",s=_c;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ti(e,1,!1,null,null,n,!1,r,s),e[Tt]=t.current,kr(e.nodeType===8?e.parentNode:e),new ri(t)},Je.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(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=Xi(t),e=e===null?null:e.stateNode,e},Je.flushSync=function(e){return hn(e)},Je.hydrate=function(e,t,n){if(!Zo(t))throw Error(a(200));return Jo(null,e,t,!0,n)},Je.hydrateRoot=function(e,t,n){if(!oi(e))throw Error(a(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",d=_c;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(d=n.onRecoverableError)),t=Sc(t,null,e,1,n??null,s,!1,i,d),e[Tt]=t.current,kr(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Xo(t)},Je.render=function(e,t,n){if(!Zo(t))throw Error(a(200));return Jo(null,e,t,!1,n)},Je.unmountComponentAtNode=function(e){if(!Zo(e))throw Error(a(40));return e._reactRootContainer?(hn(function(){Jo(null,null,e,!1,function(){e._reactRootContainer=null,e[Tt]=null})}),!0):!1},Je.unstable_batchedUpdates=Yl,Je.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Zo(n))throw Error(a(200));if(e==null||e._reactInternals===void 0)throw Error(a(38));return Jo(e,t,n,!1,r)},Je.version="18.3.1-next-f1338f8080-20240426",Je}var zc;function sd(){if(zc)return ii.exports;zc=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(l){console.error(l)}}return o(),ii.exports=Ph(),ii.exports}var Dc;function Rh(){if(Dc)return ts;Dc=1;var o=sd();return ts.createRoot=o.createRoot,ts.hydrateRoot=o.hydrateRoot,ts}var Lh=Rh();const zh=(function(){const l=typeof document<"u"&&document.createElement("link").relList;return l&&l.supports&&l.supports("modulepreload")?"modulepreload":"preload"})(),Dh=function(o){return"/"+o},Oc={},Br=function(l,a,u){let f=Promise.resolve();if(a&&a.length>0){let h=function(j){return Promise.all(j.map(E=>Promise.resolve(E).then($=>({status:"fulfilled",value:$}),$=>({status:"rejected",reason:$}))))};document.getElementsByTagName("link");const g=document.querySelector("meta[property=csp-nonce]"),v=(g==null?void 0:g.nonce)||(g==null?void 0:g.getAttribute("nonce"));f=h(a.map(j=>{if(j=Dh(j),j in Oc)return;Oc[j]=!0;const E=j.endsWith(".css"),$=E?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${j}"]${$}`))return;const C=document.createElement("link");if(C.rel=E?"stylesheet":zh,E||(C.as="script"),C.crossOrigin="",C.href=j,v&&C.setAttribute("nonce",v),document.head.appendChild(C),E)return new Promise((L,_)=>{C.addEventListener("load",L),C.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${j}`)))})}))}function p(h){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=h,window.dispatchEvent(g),!g.defaultPrevented)throw h}return f.then(h=>{for(const g of h||[])g.status==="rejected"&&p(g.reason);return l().catch(p)})},ld="caddis-hub-tab",Oh="X-Caddis-Hub-Tab",Ih="X-CSRF-Token";class gi extends Error{constructor(l,a){super(a),this.status=l}}function id(){try{return window.localStorage}catch{return null}}let yi=null;function Mh(o=window.location,l=window.history,a=id()){const u=/(?:^#|&)tab=([^&]+)/.exec(o.hash);if(!(u!=null&&u[1]))return;let f;try{f=decodeURIComponent(u[1])}catch{return}yi=f;try{a==null||a.setItem(ld,f)}catch{}l.replaceState(null,"",o.pathname+o.search)}function ad(o=id()){try{return(o==null?void 0:o.getItem(ld))||yi}catch{return yi}}function ud(o,l){const a={Accept:"application/json"};return o&&(a[Oh]=o),l&&(a[Ih]=l),a}async function us(o){const l=ad();if(!l)throw new gi(401,"no tab token");const a=await fetch(o,{headers:ud(l),credentials:"same-origin",cache:"no-store"});if(!a.ok)throw new gi(a.status,`${o} answered ${a.status}`);return await a.json()}const Ah=()=>us("/api/session"),Fh=()=>us("/api/state"),nv=()=>us("/api/benchmarks"),Uh=(o,l,a)=>us("/api/plan-phase?repo="+encodeURIComponent(o)+"&plan="+encodeURIComponent(l)+"&key="+encodeURIComponent(a));let ss=null;async function Hh(){return ss||(ss=(await Ah()).csrf_token),ss}async function Bh(o){const l=ad();if(!l)return{ok:!1,status:401,error:"unauthorized",reason:"Signed out. Run caddis hub open."};const a=async()=>fetch("/api/actions",{method:"POST",headers:{...ud(l,await Hh()),"Content-Type":"application/json"},body:JSON.stringify(o),credentials:"same-origin",cache:"no-store"});try{let u=await a();u.status===403&&(ss=null,u=await a());const f=await u.json().catch(()=>({}));return u.status===202&&f.request&&typeof f.request=="object"?{ok:!0,request:f.request}:{ok:!1,status:u.status,error:typeof f.error=="string"?f.error:"failed",reason:typeof f.reason=="string"?f.reason:`The hub answered ${u.status}.`}}catch{return{ok:!1,status:0,error:"network",reason:"The hub did not answer."}}}function Wh(o){const[l,a]=D.useState({}),u=(p,h)=>a(g=>({...g,[p]:h})),f=D.useCallback(p=>{u(p.key,{status:"sending",reason:null,requestId:null,at:Date.now()}),Bh(p.body).then(h=>{h.ok?u(p.key,{status:"sent",reason:null,requestId:h.request.id,at:Date.now()}):u(p.key,{status:"refused",reason:h.reason,requestId:null,at:Date.now()}),o()})},[o]);return{local:l,run:f}}/**
42
+ * @license lucide-react v1.61.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const Vh=o=>o==null?void 0:o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
47
+ * @license lucide-react v1.61.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */function bh(o,l,a=[]){if(l==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:Vh(o),size:24,node:l,...a.length>0?{aliases:a}:{}}}/**
52
+ * @license lucide-react v1.61.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const qh=o=>{let l="",a=!1;for(const u of o){if(u==="-"||u==="_"||u<=" "){a=l.length>0;continue}l.length===0?l+=u.toLowerCase():l+=a?u.toUpperCase():u,a=!1}return l};/**
57
+ * @license lucide-react v1.61.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const Qh=o=>{const l=qh(o);return l.charAt(0).toUpperCase()+l.slice(1)};/**
62
+ * @license lucide-react v1.61.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const vi=(...o)=>o.filter((l,a,u)=>!!l&&l.trim()!==""&&u.indexOf(l)===a).join(" ").trim();/**
67
+ * @license lucide-react v1.61.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const vn={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"};/**
72
+ * @license lucide-react v1.61.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */function ci(o){return o!=null}function Kh(o,l={}){var C,L;const a=l.attributeNames??{},u=_=>a[_]??_,f=o.size??o.width??vn.width,p=o.size??o.height??vn.height,h=((C=o.aliases)==null?void 0:C.filter(_=>typeof _=="string"&&_.trim()!=="").map(_=>`lucide-${_}`))??[],g=[...o.name?[`lucide-${o.name}`]:[],...h],v=((L=l.className)==null?void 0:L.split(" ").filter(Boolean))??[],j=l.includeDefaultClasses===!1?vi(...v):vi("lucide",...g,...v),E=l.absoluteStrokeWidth?Number(l.strokeWidth??vn["stroke-width"])*Number(o.size??o.width??vn.width)/Number(l.size??l.width??vn.width):l.strokeWidth??vn["stroke-width"];return["svg",{...Object.entries(vn).reduce((_,[F,I])=>(_[u(F)]=I,_),{}),..."color"in l&&l.color&&{[u("stroke")]:l.color},..."size"in l&&ci(l.size)&&{[u("width")]:l.size,[u("height")]:l.size},..."width"in l&&ci(l.width)&&{[u("width")]:l.width},..."height"in l&&ci(l.height)&&{[u("height")]:l.height},[u("stroke-width")]:E,...j&&{[u("class")]:j},[u("viewBox")]:`0 0 ${f} ${p}`,...l.hasA11yProp===!1?{[u("aria-hidden")]:"true"}:{},..."attributes"in l&&l.attributes},o.node.map(_=>{const[F,I,te]=_,X=l.nonScalingStroke?{[u("vector-effect")]:"non-scaling-stroke",...I}:I;return te?[F,X,te]:[F,X]})]}/**
77
+ * @license lucide-react v1.61.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */function Yh(o,l={}){return Kh(o,{...l,attributeNames:{...l.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
82
+ * @license lucide-react v1.61.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const Gh=o=>{for(const l in o)if(l.startsWith("aria-")||l==="role"||l==="title")return!0;return!1},Xh=D.createContext({}),Zh=()=>D.useContext(Xh),Jh=D.forwardRef(({color:o,size:l,width:a,height:u,strokeWidth:f,absoluteStrokeWidth:p,nonScalingStroke:h,className:g="",children:v,iconNode:j=[],icon:E={node:j,aliases:[],size:24},...$},C)=>{const{size:L=24,strokeWidth:_=2,absoluteStrokeWidth:F=!1,nonScalingStroke:I=!1,color:te="currentColor",className:X=""}=Zh()??{},ke=!!v||Gh($),[J,se,ue=[]]=Yh(E,{color:o??te,width:a??l??L,height:u??l??L,strokeWidth:f??_,absoluteStrokeWidth:p??F,nonScalingStroke:h??I,className:vi(X,g),hasA11yProp:ke,attributes:$});return D.createElement(J,{ref:C,...se},[...ue.map(([q,Y])=>D.createElement(q,Y)),...Array.isArray(v)?v:[v]])});/**
87
+ * @license lucide-react v1.61.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */function me(o,l=[],a=[]){const u=typeof o=="string"?bh(o,l,a):o,f=D.forwardRef(({className:p,...h},g)=>D.createElement(Jh,{ref:g,icon:u,className:p,...h}));return u.name&&(f.displayName=Qh(u.name)),f}/**
92
+ * @license lucide-react v1.61.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const cd={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};cd.node;const em=me(cd);/**
97
+ * @license lucide-react v1.61.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const dd={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};dd.node;const tm=me(dd);/**
102
+ * @license lucide-react v1.61.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const fd={name:"ban",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]};fd.node;const nm=me(fd);/**
107
+ * @license lucide-react v1.61.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const pd={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"}]]};pd.node;const rm=me(pd);/**
112
+ * @license lucide-react v1.61.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const hd={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};hd.node;const om=me(hd);/**
117
+ * @license lucide-react v1.61.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const md={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};md.node;const cs=me(md);/**
122
+ * @license lucide-react v1.61.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const gd={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};gd.node;const sm=me(gd);/**
127
+ * @license lucide-react v1.61.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const yd={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};yd.node;const _i=me(yd);/**
132
+ * @license lucide-react v1.61.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const vd={name:"folder-plus",size:24,node:[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};vd.node;const lm=me(vd);/**
137
+ * @license lucide-react v1.61.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const wd={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};wd.node;const im=me(wd);/**
142
+ * @license lucide-react v1.61.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const kd={name:"git-merge",size:24,node:[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]};kd.node;const am=me(kd);/**
147
+ * @license lucide-react v1.61.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const xd={name:"inbox",size:24,node:[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]};xd.node;const um=me(xd);/**
152
+ * @license lucide-react v1.61.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const Sd={name:"layout-dashboard",size:24,node:[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]};Sd.node;const cm=me(Sd);/**
157
+ * @license lucide-react v1.61.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const Nd={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};Nd.node;const dm=me(Nd);/**
162
+ * @license lucide-react v1.61.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */const _d={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};_d.node;const fm=me(_d);/**
167
+ * @license lucide-react v1.61.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ */const jd={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"}]]};jd.node;const pm=me(jd);/**
172
+ * @license lucide-react v1.61.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */const Ed={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],aliases:["alert-octagon"]};Ed.node;const hm=me(Ed);/**
177
+ * @license lucide-react v1.61.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */const Cd={name:"octagon-x",size:24,node:[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-octagon"]};Cd.node;const mm=me(Cd);/**
182
+ * @license lucide-react v1.61.0 - ISC
183
+ *
184
+ * This source code is licensed under the ISC license.
185
+ * See the LICENSE file in the root directory of this source tree.
186
+ */const $d={name:"pause",size:24,node:[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]};$d.node;const gm=me($d);/**
187
+ * @license lucide-react v1.61.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */const Td={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};Td.node;const ym=me(Td);/**
192
+ * @license lucide-react v1.61.0 - ISC
193
+ *
194
+ * This source code is licensed under the ISC license.
195
+ * See the LICENSE file in the root directory of this source tree.
196
+ */const Pd={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};Pd.node;const vm=me(Pd);/**
197
+ * @license lucide-react v1.61.0 - ISC
198
+ *
199
+ * This source code is licensed under the ISC license.
200
+ * See the LICENSE file in the root directory of this source tree.
201
+ */const Rd={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};Rd.node;const wm=me(Rd);/**
202
+ * @license lucide-react v1.61.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */const Ld={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};Ld.node;const km=me(Ld);/**
207
+ * @license lucide-react v1.61.0 - ISC
208
+ *
209
+ * This source code is licensed under the ISC license.
210
+ * See the LICENSE file in the root directory of this source tree.
211
+ */const zd={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"}]]};zd.node;const xm=me(zd);/**
212
+ * @license lucide-react v1.61.0 - ISC
213
+ *
214
+ * This source code is licensed under the ISC license.
215
+ * See the LICENSE file in the root directory of this source tree.
216
+ */const Dd={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};Dd.node;const Od=me(Dd);/**
217
+ * @license lucide-react v1.61.0 - ISC
218
+ *
219
+ * This source code is licensed under the ISC license.
220
+ * See the LICENSE file in the root directory of this source tree.
221
+ */const Id={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};Id.node;const Md=me(Id);/**
222
+ * @license lucide-react v1.61.0 - ISC
223
+ *
224
+ * This source code is licensed under the ISC license.
225
+ * See the LICENSE file in the root directory of this source tree.
226
+ */const Ad={name:"user",size:24,node:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]};Ad.node;const Sm=me(Ad);/**
227
+ * @license lucide-react v1.61.0 - ISC
228
+ *
229
+ * This source code is licensed under the ISC license.
230
+ * See the LICENSE file in the root directory of this source tree.
231
+ */const Fd={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};Fd.node;const Nm=me(Fd),ji={hotfix:"Mark hotfix",unhotfix:"Unmark hotfix",hold:"Hold",release:"Release",approve:"Approve",decline:"Decline"},ls={hotfix:"hotfix",unhotfix:"hotfix",hold:"hold",release:"hold",approve:"approve",decline:"approve"},Ud=o=>o.repo_id??null,Hd=(o,l,a)=>`${o}:${ls[l]}:${a}`;function Bd(o,l){const a=Ud(o),u=Vd(o,l.pr)??l.headSha;if(!a||!u)return[];const f=p=>({key:Hd(a,p,l.pr),label:ji[p],body:{repo_id:a,action:p,pr:l.pr,head_sha:u}});return[f(l.hotfix?"unhotfix":"hotfix"),f(l.held?"release":"hold")]}function Wd(o,l){const a=Ud(o);if(!a)return[];const u=l.pr!==null?Vd(o,l.pr)??l.head_sha:null;return["approve","decline"].map(f=>({key:Hd(a,f,l.what),label:ji[f],body:{repo_id:a,action:f,pr:l.pr,head_sha:u,what:l.what}}))}function Vd(o,l){var a,u,f;return((f=(u=(a=o.github)==null?void 0:a.prs)==null?void 0:u.find(p=>p.number===l))==null?void 0:f.head_sha)??null}function bd(o){return o.actions?o.actions.enabled?null:o.actions.reason??"Actions need a live coordinator.":"Actions need a live coordinator."}function qd(o,l){var f;const a=bd(o);return a||l.pr===null?a:(((f=o.coordinator)==null?void 0:f.queue)??[]).some(p=>(p==null?void 0:p.pr)===l.pr)?null:`PR #${l.pr} is not in the coordinator queue.`}function _m(o,l){var f;const a=((f=o.coordinator)==null?void 0:f.requests)??[],u=ls[l.body.action];for(let p=a.length-1;p>=0;p--){const h=a[p],g=h.action;if(!(!(g in ls)||ls[g]!==u)&&(l.body.what!==void 0?h.what===l.body.what&&h.pr===l.body.pr:h.pr===l.body.pr))return h}return null}function Qd(o){const l=ji[o.action]??o.action;switch(o.status){case"requested":return`${l}: requested. Waiting for the coordinator.`;case"done":return`${l}: done.`;case"rejected":return`${l}: rejected${o.reason?`: ${o.reason}`:""}.`;case"expired":return`${l}: expired before the coordinator read it.`;case"not_picked_up":return`${l}: not picked up. The coordinator has not read requests for 2 min.`}}const Kd=o=>o==="done"?"good":o==="requested"?"muted":o==="not_picked_up"?"warn":"bad";function jm(o,l,a){const u=_m(o,l);return(a==null?void 0:a.status)==="sending"?{text:`${l.label}: sending...`,tone:"muted"}:(a==null?void 0:a.status)==="refused"?{text:`${l.label}: refused. ${a.reason??""}`.trim(),tone:"bad"}:(a==null?void 0:a.status)==="sent"&&(!u||u.id!==a.requestId)?{text:`${l.label}: requested. Waiting for the coordinator.`,tone:"muted"}:u?{text:Qd(u),tone:Kd(u.status)}:null}function Ei({repo:o,specs:l,act:a,compact:u=!1,reason:f}){if(l.length===0)return null;const p=f!==void 0?f:bd(o),h=new Set,g=[];for(const v of l){if(h.has(v.key))continue;h.add(v.key);const j=jm(o,v,a.local[v.key]);j&&g.push({key:v.key,...j})}return c.jsxs("div",{className:`action-row${u?" compact":""}`,"data-testid":"actions",children:[c.jsx("div",{className:"action-buttons",children:l.map(v=>{var j;return c.jsx("button",{type:"button",className:"btn btn-act",disabled:p!==null||((j=a.local[v.key])==null?void 0:j.status)==="sending",title:p??void 0,onClick:()=>a.run(v),"data-testid":`act-${v.body.action}`,children:v.label},`${v.key}:${v.body.action}`)})}),p&&!u&&c.jsx("span",{className:"action-reason","data-testid":"action-reason",children:p}),g.map(v=>c.jsx("span",{className:`request-status tone-${v.tone}`,"data-testid":"request-status",role:"status",children:v.text},v.key))]})}function Yd({item:o}){const l=o.recommendation,a=o.from?`from ${o.from}`:o.source==="coordinator"?"from the coordinator":"from the asking session";return c.jsxs("div",{className:"detail-block recommendation","data-testid":"recommendation",children:[c.jsxs("span",{className:"detail-label",children:["Recommendation, ",a]}),l?c.jsxs(c.Fragment,{children:[c.jsxs("span",{children:[c.jsx("strong",{className:`rec-${l.decision}`,children:l.decision==="approve"?"Approve":"Hold"}),l.reason?`: ${l.reason}`:""]}),l.evidence&&c.jsxs("span",{className:"rec-evidence",children:["Evidence: ",l.evidence]})]}):c.jsx("span",{children:"No recommendation was recorded. Read the source before you decide."}),c.jsx("span",{className:"rec-note",children:"A recommendation is not an approval. Only your click approves."})]})}function Gd(o){var l,a;try{(a=(l=navigator.clipboard)==null?void 0:l.writeText(o))==null||a.catch(()=>{})}catch{}}async function rv(o){var l;try{return(l=navigator.clipboard)!=null&&l.writeText?(await navigator.clipboard.writeText(o),!0):!1}catch{return!1}}const Ic="caddis hub";function Em(o){return o>0?`(${o}) ${Ic}`:Ic}function xt(o,l){if(!o)return"unknown";const a=Date.parse(o);if(Number.isNaN(a))return"unknown";const u=Math.max(0,Math.round((l-a)/1e3));if(u<5)return"just now";if(u<60)return`${u} s ago`;const f=Math.floor(u/60);if(f<60)return`${f} min ago`;const p=Math.floor(f/60);return p<24?`${p} h ago`:`${Math.floor(p/24)} d ago`}const Cm=(o,l)=>`Updated ${xt(o,l)}`;function Fr(o){if(!o)return"unknown";const l=new Date(o);return Number.isNaN(l.getTime())?"unknown":l.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const $m=300;function Tm(o){const l=Number(o==null?void 0:o.advise_eur),a=Number(o==null?void 0:o.committed_eur),u=Number.isFinite(l)&&l>0?l:$m,f=Number.isFinite(a)?a:0;return{committedEur:f,adviseEur:u,advisory:(o==null?void 0:o.advisory)===!0||f>=u,pct:Math.min(100,Math.max(0,f/u*100))}}const Pm=o=>Number.isInteger(o)?String(o):o.toFixed(2),Xd=o=>Object.values(o.sources??{}).some(l=>!l.ok||l.stale),Rm=500;function Zd(o){const l=o==null?void 0:o.github_rate;if(!l||typeof l!="object")return null;let a=null;for(const[u,f]of Object.entries(l)){const p=f,h=typeof(p==null?void 0:p.remaining)=="number"&&Number.isFinite(p.remaining)?p.remaining:NaN;Number.isNaN(h)||(!a||h<a.remaining)&&(a={account:u,remaining:h,resetAt:typeof(p==null?void 0:p.reset_at)=="string"?p.reset_at:null})}return a}function Lm(o){const l=Zd(o);return l&&l.remaining<Rm?l:null}const zm=o=>o instanceof HTMLElement&&/^(INPUT|TEXTAREA|SELECT)$/.test(o.tagName),Mc={j:"next",J:"next",ArrowDown:"next",k:"prev",K:"prev",ArrowUp:"prev",Enter:"open",c:"copy",C:"copy"};function Dm(o,l,a,u){if(a||l.ctrl||l.meta||l.alt)return null;const f=Object.hasOwn(Mc,o)?Mc[o]:null;return f==="open"&&u?null:f}function Om(o,l,a){if(a<=0)return-1;const u=o==="next"?l+1:l-1;return Math.min(a-1,Math.max(0,u))}function Jd({page:o,head:l,stale:a,children:u}){return c.jsxs("header",{className:`page-head${a?" stale":""}`,"data-testid":"page-head","data-stale":a?"true":void 0,children:[c.jsxs("div",{className:"page-head-text",children:[c.jsx("h1",{className:"page-title page-eyebrow",children:o}),c.jsx("p",{className:"headline","data-testid":"headline",children:l.title}),c.jsx("p",{className:"headline-sub","data-testid":"headline-sub",children:l.sub})]}),u]})}var Im=sd();const Mm=150,Am=100,ns=8,rs=8;function Fm(o,l,a){const u=o.bottom+ns+l.height<=a.height-rs,f=o.top-ns-l.height>=rs,p=u||!f?"below":"above",h=p==="below"?o.bottom+ns:o.top-ns-l.height,g=Math.max(0,Math.min(h,a.height-l.height)),v=Math.max(0,a.width-l.width-rs),j=Math.max(rs,Math.min(o.left,v));return{top:g,left:Math.min(j,v),placement:p}}let qn=null;const Um=o=>o==null||o===!1||o==="";function wi({content:o,children:l}){const a=D.useId(),u=Um(o),[f,p]=D.useState(!1),[h,g]=D.useState(null),v=D.useRef(null),j=D.useRef(null),E=D.useRef(void 0),$=D.useCallback(()=>{window.clearTimeout(E.current),E.current=void 0},[]),C=D.useCallback(J=>{J&&(v.current=J),$(),E.current=window.setTimeout(()=>p(!0),Mm)},[$]),L=D.useCallback(()=>{$(),E.current=window.setTimeout(()=>p(!1),Am)},[$]),_=D.useCallback(()=>{$(),p(!0)},[$]),F=f&&!u,I=D.useCallback(()=>{$(),p(!1)},[$]);D.useEffect(()=>{if(F)return qn&&qn!==I&&qn(),qn=I,()=>{qn===I&&(qn=null)}},[F,I]),D.useEffect(()=>$,[$]),D.useEffect(()=>{u&&($(),p(!1))},[u,$]),D.useEffect(()=>{if(!F)return;const J=se=>{se.key==="Escape"&&($(),p(!1))};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[F,$]);const te=D.useCallback(()=>{const J=v.current,se=j.current;if(!J||!se)return;const ue=se.getBoundingClientRect();g(Fm(J.getBoundingClientRect(),{width:ue.width,height:ue.height},{width:window.innerWidth,height:window.innerHeight}))},[]);if(D.useLayoutEffect(()=>{if(!F){g(null);return}return te(),window.addEventListener("resize",te),window.addEventListener("scroll",te,!0),()=>{window.removeEventListener("resize",te),window.removeEventListener("scroll",te,!0)}},[F,o,te]),u)return l;const X=l.props,ke=D.cloneElement(l,{onPointerEnter:J=>{var se;(se=X.onPointerEnter)==null||se.call(X,J),f?_():C(J.currentTarget)},onPointerLeave:J=>{var se;(se=X.onPointerLeave)==null||se.call(X,J),L()},onFocus:J=>{var se;(se=X.onFocus)==null||se.call(X,J),f?_():C(J.currentTarget)},onBlur:J=>{var se;(se=X.onBlur)==null||se.call(X,J),L()},"aria-describedby":F?a:X["aria-describedby"]});return c.jsxs(c.Fragment,{children:[ke,F&&Im.createPortal(c.jsx("div",{ref:j,id:a,role:"tooltip",className:"tip","data-testid":"tip","data-placement":h==null?void 0:h.placement,style:{position:"fixed",top:(h==null?void 0:h.top)??0,left:(h==null?void 0:h.left)??0,visibility:h?"visible":"hidden"},onPointerEnter:_,onPointerLeave:L,children:o}),document.body)]})}function ef(o,l,a){if(!o)return"unknown";const u=new Date(o);if(Number.isNaN(u.getTime()))return"unknown";try{return new Intl.DateTimeFormat(l,{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hourCycle:"h23",timeZone:a,timeZoneName:"short"}).format(u)}catch{return u.toISOString()}}const et=o=>Array.isArray(o)?o:[],Hm={todo:"to do","in-progress":"in progress",done:"done",moved:"moved",blocked:"blocked"},rn=new Set(["done","not-needed"]),ov="No roadmap or plan",sv="/caddis:roadmap";function lv(o){const l=o.also.length>0?`; also ${o.also.map(a=>`#${a}`).join(", ")}`:"";return`on branch (${o.draft?"draft ":""}PR #${o.pr}${l})`}const Ac=o=>typeof o=="number"&&Number.isInteger(o)&&o>0;function Bm(o){const l=Ee(o);return Ac(l.pr)?{pr:l.pr,draft:l.draft===!0,also:et(l.also).filter(Ac)}:null}const iv=[{key:"todo",label:"To do"},{key:"in-progress",label:"In progress"},{key:"blocked",label:"Blocked"},{key:"done",label:"Done"}];function Wm(o){const l={todo:[],"in-progress":[],blocked:[],done:[]};for(const a of o.rows)l[a.state==="moved"?"done":a.state].push(a);return l}function av(o){const l=Wm(o),a=o.rows.length,u=l.done.length;return{total:a,done:u,inProgress:l["in-progress"].length,blocked:l.blocked.length,todo:l.todo.length,pct:a===0?0:Math.round(u/a*100)}}function uv(o){let l=null;for(const a of o)a.open===0||a.rows.length===0||(!l||(a.changedAt??-1)>(l.changedAt??-1))&&(l=a);return l?l.path:null}const cv=10,Ee=o=>o&&typeof o=="object"&&!Array.isArray(o)?o:{},ee=o=>typeof o=="string"?o:"",Mt=o=>typeof o=="string"&&o?o:null,Ur=o=>typeof o=="number"&&Number.isInteger(o)?o:0,tf=new Set(["todo","in-progress","done","moved","blocked"]);function Ci(o,l){const a=o.github;return[...new Set(et(l).filter(u=>typeof u=="number"&&Number.isInteger(u)))].map(u=>{var h,g;const f=(h=a==null?void 0:a.prs)==null?void 0:h.find(v=>v.number===u),p=((g=a==null?void 0:a.merges)==null?void 0:g.some(v=>v.number===u))??!1;return{number:u,url:a!=null&&a.repo?`https://github.com/${a.repo}/pull/${u}`:null,stage:f?"in review":p?"merged":null,detail:f?`required checks ${f.required_state}`:null}})}function nf(o,l){const a=o.filter(u=>u.stage).map(u=>`#${u.number} ${u.stage}${u.detail?` (${u.detail})`:""}`);return a.length?a.join(", "):Hm[l]}function dv(o){return[o.model&&`model ${o.model}`,o.lane&&`lane ${o.lane.split(" ")[0]}`,o.risk&&`risk ${o.risk}`].filter(Boolean).join(" · ")}function Vm(o,l){const a=Ee(l),u=ee(a.ref),f=u.lastIndexOf("#"),p=ee(a.state),h=tf.has(ee(a.tile))?ee(a.tile):p==="done"?"done":"todo",g=ee(a.risk),v=Ci(o,a.prs);return{ref:u,plan:ee(a.plan)||(f>0?u.slice(0,f):""),num:Ur(a.num)||f>0&&Number(u.slice(f+1))||0,name:ee(a.name)||u,model:ee(a.model),lane:ee(a.lane),risk:g,highRisk:g.toLowerCase().includes("high"),tracker:ee(a.tracker),tile:h,prs:v,stage:nf(v,h)}}const Fc=(o,l)=>{const a=Ee(l);return{milestone:o,type:ee(a.type),reason:ee(a.reason),check:ee(a.check)}};function rf(o,l){return rn.has(o)?"done":l.some(a=>a.type==="owner-gate")?"wait":l.length||o==="blocked"?"block":o==="in-progress"?"prog":"todo"}const wn=o=>o==="done"||o==="moved";function bm(o,l){const a=Ee(o),u=Ee(a.lock),f=Ee(a.stale_lock),p=Ee(a.last_stop);let h=null;return ee(p.reason)==="running"?h="running now":ee(p.reason)&&(h=`${ee(p.reason)}${p.exit!==void 0&&p.exit!==null?` (exit ${String(p.exit)})`:""}`),{running:Object.keys(u).length?{batch:String(u.batch??""),since:Mt(u.started_utc),host:Mt(u.host),pid:u.pid===void 0?null:String(u.pid)}:null,staleBatch:Object.keys(f).length?String(f.batch??""):null,lastStop:h,lastStopAt:Mt(p.utc),stopReason:ee(p.reason)||null,errors:et(a.errors).map(String),next:l}}function of(o){const l=new Map(o.map(u=>[u.id,u.status])),a={now:[],next:[],later:[]};for(const u of o){if(rn.has(u.status))continue;const f=u.depends.every(p=>rn.has(l.get(p)??""));u.status==="in-progress"||f&&u.blockers.length===0?a.now.push(u):u.depends.some(p=>a.now.some(h=>h.id===p))?a.next.push(u):a.later.push(u)}return a}function qm(o,l){const a=Ee(l),u=et(a.milestones).map(E=>{const $=Ee(E),C=ee($.id),L=et($.blockers).map(I=>Fc(C,I)),_=et($.phases).map(I=>Vm(o,I)),F=ee($.status);return{id:C,status:F,owner:ee($.owner)||"runner",target:Mt($.target),depends:et($.depends).map(String),phases:_,blockers:L,done:_.filter(I=>wn(I.tile)).length,total:_.length,tone:rf(F,L)}}),f=u.flatMap(E=>E.phases),p=Ee(a.next),h=Object.keys(p).length?`${ee(p.milestone)} ${ee(p.plan)}#${String(p.phase)}`:null,g=(et(a.lanes).length?et(a.lanes).map(String):[...new Set(f.map(E=>E.plan))]).map(E=>({plan:E,done:f.filter($=>$.plan===E&&wn($.tile)).length,total:f.filter($=>$.plan===E).length})),v=u.flatMap(E=>E.blockers),j=Array.isArray(a.waiting)?et(a.waiting).map(E=>Fc(ee(Ee(E).milestone),{...Ee(E),type:"owner-gate"})):u.filter(E=>!rn.has(E.status)).flatMap(E=>E.blockers.filter($=>$.type==="owner-gate"));return{slug:ee(a.roadmap),kind:"roadmap",branch:Mt(a.branch),originCommit:Mt(a.origin_commit),milestones:u,lanes:g,gates:j,blockers:v,kpis:{phasesDone:f.filter(E=>wn(E.tile)).length,phasesTotal:f.length,milestonesDone:Ur(a.done)||u.filter(E=>rn.has(E.status)).length,milestonesTotal:Ur(a.total)||u.length,inProgress:f.filter(E=>E.tile==="in-progress").map(E=>E.ref),highRisk:f.filter(E=>E.highRisk).length,next:h??"none ready"},board:of(u),runner:bm(a.runner,h),detailError:Mt(a.detail_error)}}const Qm=o=>typeof o=="string"&&tf.has(o)?o:"todo",sf=o=>{var l;return((l=o.trim().split(/\s+/)[0])==null?void 0:l.toLowerCase())??""};function $i(o){return(o.split("/").pop()??"").replace(/\.md$/,"")}function fv(o,l){var E,$;const a=$i(l.path),u=[];let f=!1;for(const C of l.rows){const L=((E=C.milestone)==null?void 0:E.trim())||null;L?u.includes(L)||u.push(L):f=!0}(f||u.length===0)&&(u.includes("Phases")||u.push("Phases"));const p=new Map(u.map(C=>[C,[]])),h=l.rows.map((C,L)=>{var J,se;const _=C.key||sf(C.phase),F=Array.from(C.status.matchAll(/#(\d+)/g),ue=>Number(ue[1])),I=Ci(o,F),te=C.state,X={ref:`${a}#${_}`,plan:a,num:L+1,name:C.phase,model:"",lane:"",risk:"",highRisk:!1,tracker:C.status,tile:te,prs:I,stage:nf(I,te)},ke=((J=C.milestone)==null?void 0:J.trim())||"Phases";return(se=p.get(ke))==null||se.push(X),X}),g=u.map((C,L)=>{const _=p.get(C)??[],F=_.filter(X=>wn(X.tile)).length,I=_.length,te=I>0&&F===I?"done":_.some(X=>X.tile==="in-progress"||wn(X.tile))?"in-progress":"todo";return{id:C,status:te,owner:"",target:null,depends:L>0?[u[L-1]]:[],phases:_,blockers:[],done:F,total:I,tone:rf(te,[])}}),v=h.filter(C=>wn(C.tile)).length,j=h.length;return{slug:a,kind:"plan",branch:null,originCommit:null,milestones:g,lanes:[{plan:a,done:v,total:j}],gates:[],blockers:[],kpis:{phasesDone:v,phasesTotal:j,milestonesDone:g.filter(C=>rn.has(C.status)).length,milestonesTotal:g.length,inProgress:h.filter(C=>C.tile==="in-progress").map(C=>C.ref),highRisk:0,next:(($=h.find(C=>!wn(C.tile)))==null?void 0:$.name)??""},board:of(g),runner:{running:null,staleBatch:null,lastStop:null,lastStopAt:null,stopReason:null,errors:[],next:null},detailError:null}}function pv(o,l,a){const u=o.milestones.flatMap(j=>j.phases).find(j=>j.ref===a);if(!u)return null;const f=l.find(j=>$i(j.path)===u.plan),p=a.lastIndexOf("#"),h=(p>=0?a.slice(p+1):a).toLowerCase(),g=!!(f!=null&&f.phases&&Object.prototype.hasOwnProperty.call(f.phases,h)),v=g?f==null?void 0:f.phases[h]:void 0;return{title:v!=null&&v.title?v.title:u.name,text:typeof(v==null?void 0:v.text)=="string"&&v.text.length>0?v.text:null,hasSection:g,planPath:(f==null?void 0:f.path)??null,key:h,phase:u}}function Km(o){return et(Ee(o).plans).map(l=>Ee(l)).filter(l=>!l.error&&!["done","closed","archived"].includes(ee(l.status).toLowerCase())).map(l=>{const a={};for(const[u,f]of Object.entries(Ee(l.phases))){const p=Ee(f);a[u]=typeof p.text=="string"?{title:ee(p.title),text:p.text}:{title:ee(p.title)}}return{path:ee(l.path),title:ee(l.title)||ee(l.path),rows:et(l.tracker).map(u=>{const f=Ee(u),p=ee(f.phase);return{phase:p,status:ee(f.status),state:Qm(f.state),key:ee(f.key)||sf(p),milestone:ee(f.milestone).trim()||null}}),phases:a,open:Ur(l.open_rows),changedAt:typeof l.changed_at=="number"&&Number.isFinite(l.changed_at)?l.changed_at:null,overlay:Bm(l.overlay)}})}function Ym(o){return et(Ee(Ee(o.plans).done).plans).map(l=>Ee(l)).filter(l=>!l.error&&ee(l.path)).map(l=>({path:ee(l.path),title:ee(l.title)||ee(l.path),closedAt:typeof l.closed_at=="number"&&Number.isFinite(l.closed_at)?l.closed_at:null,phases:Ur(l.phases),pr:typeof l.pr=="number"&&Number.isInteger(l.pr)&&l.pr>0?Ci(o,[l.pr])[0]??null:null}))}function Zn(o){const l=Ee(o.roadmaps),a=Mt(o.error)??Mt(l.error),u=[],f=[];for(const j of et(l.roadmaps)){const E=Ee(j);ee(E.error)?f.push({slug:ee(E.roadmap),error:ee(E.error)}):ee(E.roadmap)&&u.push(qm(o,E))}const p=Km(o.plans),h=new Set(u.flatMap(j=>j.lanes.map(E=>E.plan))),g=p.filter(j=>j.rows.length>0&&j.open>0&&!h.has($i(j.path))),v={roadmaps:u,errors:f,plans:p,otherPlans:g,repoError:a,done:Ym(o)};return u.length||f.length?{mode:"roadmaps",...v}:a&&!o.roadmaps&&!o.plans?{mode:"error",...v}:p.length?{mode:"plans",...v}:{mode:a?"error":"none",...v}}const hv=o=>o.mode==="roadmaps"&&o.roadmaps.length===1&&o.errors.length===0;function lf(o){const l=o.milestones.flatMap(h=>h.phases).filter(h=>h.tile==="blocked").length,{phasesDone:a,phasesTotal:u}=o.kpis,f=o.gates.length?"wait":l?"block":u&&a>=u?"done":o.kpis.inProgress.length||a?"prog":"todo",p=o.runner;return{slug:o.slug,branch:o.branch,milestonesDone:o.kpis.milestonesDone,milestonesTotal:o.kpis.milestonesTotal,phasesDone:a,phasesTotal:u,pct:u?Math.round(100*a/u):0,next:o.runner.next??"none ready",runner:p.running||p.stopReason==="running"?"running":p.stopReason?`stopped: ${p.stopReason}`:"idle",gates:o.gates.length,dots:o.milestones.map(h=>({id:h.id,status:h.status})),tone:f}}function Gm(o){const l=[];for(const a of Zn(o).roadmaps){const u=new Map(a.milestones.map(f=>[f.id,f.status]));for(const f of a.milestones)rn.has(f.status)||!f.depends.every(p=>rn.has(u.get(p)??""))||f.blockers.filter(p=>p.type==="owner-gate").forEach((p,h)=>l.push({roadmap:a.slug,milestone:f.id,reason:p.reason,check:p.check,id:`${a.slug}:${f.id}:${h}`}))}return l}const Ti=o=>o.roadmaps.reduce((l,a)=>l+a.gates.length,0),Uc=(o,l)=>o.toLowerCase().includes(l);function mv(o,l){const a=l.trim().toLowerCase();if(!a)return null;const u={milestones:new Set,phases:new Set,count:0};for(const f of o.milestones){const p=Uc([f.id,f.status,f.owner,f.target??""].join(" "),a);let h=!1;for(const g of f.phases){const v=Uc([g.ref,g.name,g.model,g.lane,g.risk,g.tracker,g.prs.map(j=>`#${j.number}`).join(" ")].join(" "),a);(v||p)&&(u.phases.add(g.ref),h=!0),v&&(u.count+=1)}p&&(u.count+=1),(p||h)&&u.milestones.add(f.id)}return u}function Xm(o){const l=Ti(Zn(o));return l>0?`Roadmap · ${l} gate${l===1?"":"s"}`:"Roadmap"}const Zm=o=>!o.sources.collector.ok||o.sources.collector.stale,Jm=24*3600;function eg(o){if(!o)return"";const l=Ee(o),a=typeof l.count=="number"?l.count:0;return l.state==="on"?a===1?" · 1 plan from a PR branch":a>1?` · ${a} plans from PR branches`:"":l.state==="off"?` · branch progress off (${ee(l.reason)||"unknown"})`:""}function gv(o,l){const a=Ee(o),u=ee(a.source);if(!u)return null;if(u==="working-tree")return{text:"Plans from the working tree (no origin branch found)",old:!1};const f=ee(a.commit).slice(0,7),p=typeof a.commit_at=="number"?a.commit_at:null,h=typeof a.fetched_at=="number"?a.fetched_at:null;return{text:`Plans from ${u}`+(f?` @ ${f}`:"")+(p!==null?` · commit ${xt(new Date(p*1e3).toISOString(),l)}`:"")+(h===null?" · fetch time unknown":` · last fetch ${xt(new Date(h*1e3).toISOString(),l)}`)+eg(a.overlay),old:h!==null&&l/1e3-h>Jm}}const af="caddis.hub.roadmapView";function yv(o){if(!o)return"timeline";try{return o.getItem(af)==="board"?"board":"timeline"}catch{return"timeline"}}function vv(o,l){if(o)try{o.setItem(af,l)}catch{}}const ki={waiting:"Waiting","owner-gate":"Owner gate",blocked:"Blocked","blocked-merge":"Blocked merge",coordinator:"Coordinator",hub:"Hub"},tg={collector:"Roadmap and relay data",agents:"Session list",github:"GitHub data",coordinator:"Coordinator data"},Yn=o=>Array.isArray(o)?o:[],$t=o=>o&&typeof o=="object"&&!Array.isArray(o)?o:{},it=o=>typeof o=="string"&&o?o:null,Gn=o=>typeof o=="number"&&Number.isFinite(o)?o:null,kn=o=>{var l;return((l=o.github)==null?void 0:l.repo)??o.name},Hc=o=>o.replace(/\\/g,"/").replace(/\/+$/,"").toLowerCase(),ds=o=>o.agent&&o.agent!=="claude"?o.agent:null,St=(o,l)=>!!o&&!!l&&Hc(o)===Hc(l);function uf(o){var a;const l=[];for(const u of Yn((a=o.relays)==null?void 0:a.relays)){const f=$t(u),p=it(f.name),h=it(f.status);!p||!h||l.push({name:p,status:h,statusArg:it(f.status_arg)??"",updatedAt:it(f.updated_at),nextStep:it(f.next_step)})}return l}function cf(o){return Array.isArray(o.owner_items)?o.owner_items:uf(o).filter(l=>l.status==="OWNER-GATE"&&l.statusArg).map(l=>({id:`gate:${l.name}:${l.statusArg}`,what:`owner gate ${l.statusArg} (${l.name})`,pr:null,head_sha:null,source:"relay",recommendation:null,from:l.name,since:l.updatedAt,relay:l.name}))}function Hr(o){var a;const l=[];for(const u of Yn((a=o.coordinator)==null?void 0:a.queue)){const f=$t(u),p=Gn(f.pr);if(p===null)continue;const h=[];for(const g of Yn(f.waits_on)){const v=$t(g),j=Gn(v.pr);j!==null&&h.push({repo:it(v.repo)??"",pr:j})}l.push({pr:p,headSha:it(f.head_sha)??"",title:it(f.title)??"",state:it(f.state)??"waiting",whyWaiting:it(f.why_waiting)??"",waitsOn:h,hotfix:f.hotfix===!0,held:f.held===!0,since:it(f.entered_ready_at)})}return l}function df(o){var a;const l=(a=o.coordinator)==null?void 0:a.merging_now;return Gn(l)??Gn($t(l).pr)}function ng(o){const l=new Set,a=[];for(const u of o)u.waiting_class!=="owner"||l.has(u.session_id)||(l.add(u.session_id),a.push(u));return a}function rg(o,l){var p,h;let a=null;for(const g of o.repos){const v=kn(g);for(const j of Yn((p=g.coordinator)==null?void 0:p.deploy_checks)){const E=$t(j),$=Date.parse(it(E.at)??""),C=Gn(E.pr);if(Number.isNaN($)||C===null)continue;const L=it(E.health);(!a||$>a.at)&&(a={at:$,label:`${v} #${C}`,ok:L==="ok"?!0:L==="failed"?!1:null,how:`health ${L??"unknown"}`})}for(const j of((h=g.github)==null?void 0:h.merges)??[]){const E=Date.parse(j.merged_at);if(Number.isNaN(E)||a&&a.at>=E)continue;const $=j.runs??[],C=$.some(_=>_.conclusion==="failure"),L=$.length>0&&$.every(_=>_.conclusion==="success");a={at:E,label:`${v} #${j.number}`,ok:C?!1:L?!0:null,how:C?"deploy failed":L?"deploy pass":"merged"}}}if(!a)return null;const u=Math.max(0,Math.round((l-a.at)/6e4)),f=u<60?`${u} min ago`:u<1440?`${Math.floor(u/60)} h ago`:`${Math.floor(u/1440)} d ago`;return{label:a.label,sub:`${f} · ${a.how}`,ok:a.ok}}function og(o,l,a){var p;let u=0;for(const h of o.repos)(p=h.coordinator)!=null&&p.responding&&(u+=Hr(h).filter(g=>g.state!=="blocked").length);const f=o.sessions.filter(h=>!["idle","done","unknown"].includes(h.status)).length;return{waitingOnYou:a.filter(h=>h.folder==="needs").length,blockedMerges:a.filter(h=>h.kind==="blocked-merge").length,inQueue:u,workingSessions:f,lastDeploy:rg(o,l)}}function sg(o){const l=new Date(o);return Number.isNaN(l.getTime())?"unknown":l.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const Bc=(o,l)=>{var a;return(a=o.github)!=null&&a.repo?`gh pr checks ${l} -R ${o.github.repo}`:`gh pr checks ${l}`};function lg(o,l){var h,g;const a=[],u=new Set,f=v=>{u.has(v.id)||(u.add(v.id),a.push(v))},p=v=>o.repos.find(j=>St(j.path,v));for(const v of ng(o.sessions)){const j=p(v.repo_path),E=v.name??v.session_id.slice(0,8),$=ds(v);f({id:`waiting:${v.session_id}`,kind:"waiting",folder:"needs",repo:j?kn(j):"no repo",title:`${E}${$?` (${$})`:""} waits on ${v.waiting_for??"you"}`,why:"The session cannot continue until you answer.",next:"Open the session and answer.",cmd:E,since:v.waiting_since,source:"agents"})}for(const v of o.repos){const j=kn(v),E=uf(v);for(const _ of cf(v)){const F=_.relay?E.find(te=>te.name===_.relay):void 0,I=_.source==="relay"?(h=/^owner gate (\S+) /.exec(_.what))==null?void 0:h[1]:void 0;f({id:`owner:${v.path}:${_.id}`,kind:"owner-gate",folder:"approvals",repo:j,repoPath:v.path,title:I?`Gate ${I}: owner approval needed`:`${_.pr!==null?`PR #${_.pr}: `:""}${_.what}`,why:_.source==="relay"?"The plan stops at this owner gate. The next phase cannot start without you.":"This is on the owner-only list. Only your click approves it.",next:(F==null?void 0:F.nextStep)??(_.source==="relay"?"Read the relay, then decide.":"Read the recommendation, then decide."),cmd:_.relay?`.caddis/relay/${_.relay}.md`:_.what,since:_.since,owner:_,source:_.source==="relay"?"collector":"coordinator"})}for(const _ of Gm(v))f({id:`rmgate:${v.path}:${_.id}`,kind:"owner-gate",folder:"approvals",repo:j,repoPath:v.path,title:`Roadmap ${_.roadmap}, gate ${_.milestone}: ${_.reason}`,why:`Milestone ${_.milestone} of roadmap ${_.roadmap} waits for you. Everything before it is done.`,next:"Decide, then record the gate in the roadmap with /caddis:roadmap (a docs PR).",cmd:_.check||"/caddis:roadmap",since:null,source:"collector"});for(const _ of E)_.status==="BLOCKED"&&_.statusArg.toLowerCase().startsWith("owner")&&f({id:`blocked:${v.path}:${_.name}`,kind:"blocked",folder:"needs",repo:j,repoPath:v.path,title:`Relay ${_.name}: STATUS: BLOCKED owner`,why:"The relay says the owner must decide before the next step.",next:_.nextStep??"Read the relay and decide.",cmd:`.caddis/relay/${_.name}.md`,since:_.updatedAt,source:"collector"});const $=!!v.coordinator&&v.coordinator.responding;for(const _ of Hr(v))_.state==="blocked"&&f({id:`merge:${v.path}:${_.pr}`,kind:"blocked-merge",folder:"blocked",repo:j,repoPath:v.path,title:`PR #${_.pr}${_.title?` ${_.title}`:""}: blocked`,why:_.whyWaiting||"The coordinator skips it until it is unblocked.",next:"Ask the PR session to fix it, or hold the PR.",cmd:Bc(v,_.pr),since:_.since,queue:{pr:_.pr,headSha:_.headSha,hotfix:_.hotfix,held:_.held},source:"coordinator"});const C=new Map(Hr(v).map(_=>[_.pr,_]));for(const _ of((g=v.github)==null?void 0:g.prs)??[]){if(_.draft||_.required_state!=="fail")continue;const F=_.checks.filter(te=>te.required&&te.conclusion==="failure").map(te=>te.name),I=C.get(_.number);f({id:`merge:${v.path}:${_.number}`,kind:"blocked-merge",folder:"blocked",repo:j,repoPath:v.path,title:`PR #${_.number}: required check ${F.length>0?`${F.join(", ")} `:""}failed`,why:$?"The coordinator skips it until the check passes at the head.":"This repo has no live coordinator, so its session merges its own PRs.",next:"Fix the check in the PR session.",cmd:Bc(v,_.number),since:_.updated_at,...I?{queue:{pr:I.pr,headSha:I.headSha,hotfix:I.hotfix,held:I.held}}:{},source:"github"})}const L=v.coordinator;L&&!L.responding&&L.heartbeat_at&&L.status!=="stopped"&&f({id:`coordinator:${v.path}`,kind:"coordinator",folder:"needs",repo:j,repoPath:v.path,title:`Coordinator not responding since ${sg(L.heartbeat_at)}`,why:"No heartbeat for 3 min. Its queue is frozen; the lane shows GitHub data.",next:"Check the coordinator session, then restart it.",cmd:"/caddis:coordinate",since:L.heartbeat_at,source:"coordinator"})}for(const v of["collector","agents","github","coordinator"]){const j=o.sources[v];j.ok||!j.stale||f({id:`hub:${v}`,kind:"hub",folder:"needs",repo:"hub",title:`${tg[v]} has failed for over 3 min`,why:j.last_error??"The source has not answered.",next:"Read the error. The hub keeps the last good data.",cmd:"caddis hub status",since:j.last_ok_at})}return{items:a,tiles:og(o,l,a)}}const ig=24*36e5,ag=()=>({open:{},resolved:[]}),ug=(o,l)=>{var u;const a=(u=o.sources)==null?void 0:u[l];return!!a&&(!a.ok||a.stale)};function cg(o,l){var u;if(!l.repoPath)return!1;const a=(u=o.repos)==null?void 0:u.find(f=>St(f.path,l.repoPath));if(!a)return!1;if(l.source==="github"){const f=a.github;return!!f&&typeof f.error=="string"&&!Array.isArray(f.prs)}if(l.source==="collector"){const f=$t(a.relays);return(typeof a.error=="string"||typeof f.error=="string")&&!Array.isArray(f.relays)}return!1}function Wc(o,l,a){const u=new Set(l.map(p=>p.id)),f=l.map(p=>p.stale?{...p,stale:!1}:p);for(const[p,h]of Object.entries(o))u.has(p)||!h.source||!ug(a,h.source)&&!cg(a,h)||f.push({...h,stale:!0});return f}function dg(o,l,a){const u=new Map(l.map(p=>[p.id,p])),f=o.resolved.filter(p=>a-p.resolvedAt<ig&&!u.has(p.item.id));for(const[p,h]of Object.entries(o.open))!u.has(p)&&!f.some(g=>g.item.id===p)&&f.push({item:h,resolvedAt:a});return f.sort((p,h)=>h.resolvedAt-p.resolvedAt),{open:Object.fromEntries(u),resolved:f}}function Vc(o){const l=$t(o);return typeof l.id=="string"&&typeof l.title=="string"&&typeof l.kind=="string"&&typeof l.folder=="string"}function fg(o){const l=$t(o),a={};for(const[f,p]of Object.entries($t(l.open)))Vc(p)&&(a[f]=p);const u=[];for(const f of Yn(l.resolved)){const p=$t(f),h=Gn(p.resolvedAt);Vc(p.item)&&h!==null&&u.push({item:p.item,resolvedAt:h})}return{open:a,resolved:u}}const bc="Start a session in the folder: the hub adds it.";function ff(){return c.jsxs("section",{className:"first-run","data-testid":"first-run","aria-label":"Get started",children:[c.jsx("h2",{children:"No repos yet"}),c.jsxs("p",{children:[c.jsx(Od,{size:16,"aria-hidden":"true"})," Start a Claude Code session in a repo. The hub finds it by itself."]}),c.jsx("p",{children:"Or add a folder. The hub checks that it is a git repo."}),c.jsxs("button",{type:"button",className:"btn",disabled:!0,title:bc,"data-testid":"add-folder",children:[c.jsx(lm,{size:16,"aria-hidden":"true"}),"Add a folder"]}),c.jsxs("span",{className:"first-run-reason",children:[" ",bc]})]})}function pg(o){const l=o.replace(/^#\/?/,"").split("/"),a=l[0];if(a==="inbox")try{return{page:"inbox",item:l[1]?decodeURIComponent(l[1]):null}}catch{return{page:"inbox",item:null}}if(a==="overview")return{page:"overview"};if(a==="activity")return{page:"activity"};if(a==="benchmarks")return{page:"benchmarks"};if(a==="guide")try{const u=l[1]==="details"||l[1]==="wall"||l[1]==="map"?l[1]:"poster",f=l[2]?decodeURIComponent(l[2]):null;return{page:"guide",tab:u,item:f}}catch{return{page:"inbox",item:null}}if(a==="repo"&&l[1])try{const u=l[2]==="roadmap"||l[2]==="sessions"?l[2]:"flow",f=u==="roadmap"&&l[3]?decodeURIComponent(l[3]):null;return{page:"repo",id:decodeURIComponent(l[1]),tab:u,roadmap:f}}catch{return{page:"inbox",item:null}}return{page:"inbox",item:null}}const Wr=o=>o.repo_id??o.path,wv=o=>`#/inbox/${encodeURIComponent(o)}`,is=o=>`#/repo/${encodeURIComponent(o)}`;function pf(o,l,a){return l==="flow"?is(o):`${is(o)}/${l}${l==="roadmap"&&a?`/${encodeURIComponent(a)}`:""}`}function hg(o,l){return o==="poster"?"#/guide":o==="wall"?"#/guide/wall":o==="map"?"#/guide/map":`#/guide/details${l?`/${encodeURIComponent(l)}`:""}`}function hf(o,l,a=5){const u=[];for(const p of o.repos){const h=p.github;for(const g of(h==null?void 0:h.merges)??[])u.push({key:`${p.path}:${g.number}`,repo:kn(p),pr:g.number,title:`#${g.number} ${g.title}`,url:h!=null&&h.repo?`https://github.com/${h.repo}/pull/${g.number}`:null,at:g.merged_at,age:xt(g.merged_at,l)})}const f=p=>{const h=Date.parse(p);return Number.isNaN(h)?0:h};return u.sort((p,h)=>f(h.at)-f(p.at)).slice(0,a)}function mg(o,l=6){const a=[];for(const u of o.repos)for(const f of Zn(u).roadmaps){const p=lf(f),h=p.phasesTotal>0?` · ${p.phasesDone}/${p.phasesTotal} phases`:"";a.push({key:`${u.path}:${f.slug}`,slug:f.slug,repo:kn(u),href:pf(Wr(u),"roadmap",f.slug),label:`${p.milestonesDone} of ${p.milestonesTotal} milestones${h}`,segs:f.milestones.map(g=>({id:g.id,tone:g.tone}))})}return a.slice(0,l)}const gg=["busy","running","working"],Pi=o=>gg.includes(o),qc=(o,l,a)=>`${o} ${o===1?l:a}`;function mf(o,l,a){const u=l===0?"Nothing needs you.":l===1?"1 thing needs you.":`${l} things need you.`,f=o.sessions.filter(g=>Pi(g.status)).length,p=[qc(f,"agent working","agents working")],h=hf(o,a,1)[0];return h&&p.push(`last ship ${h.age} (${h.repo} #${h.pr})`),p.push(qc(o.repos.length,"repo watched","repos watched")),{title:u,sub:p.join(" · ")}}const yg={waiting:{Icon:Sm,tone:"cyan"},"owner-gate":{Icon:km,tone:"amber"},blocked:{Icon:nm,tone:"violet"},"blocked-merge":{Icon:am,tone:"pink"},coordinator:{Icon:hm,tone:"red"},hub:{Icon:Md,tone:"grey"},resolved:{Icon:cs,tone:"grey"}};function gf({kind:o}){const{Icon:l,tone:a}=yg[o];return c.jsx("span",{className:`kind-tile tile-${a}`,"aria-hidden":"true",children:c.jsx(l,{size:17,strokeWidth:2.2})})}function vg({state:o,nowMs:l}){const a=mg(o),u=hf(o,l);return a.length===0&&u.length===0?null:c.jsxs("section",{className:"inbox-strips","aria-label":"Roadmaps and recent ships",children:[a.length>0&&c.jsxs("div",{className:"strip-card","data-testid":"strip-roadmaps",children:[c.jsx("h2",{className:"strip-title",children:"Roadmaps"}),a.map(f=>c.jsxs("div",{className:"strip-rm",children:[c.jsxs("div",{className:"strip-rm-head",children:[c.jsxs("span",{className:"strip-rm-name",children:[c.jsx("a",{href:f.href,children:f.slug})," ",c.jsx("span",{className:"mono strip-repo",children:f.repo})]}),c.jsx("span",{className:"strip-rm-label",children:f.label})]}),c.jsx("div",{className:"seg-bar",children:f.segs.map(p=>c.jsx("span",{className:`seg seg-${p.tone}`,title:`${p.id}: ${p.tone}`},p.id))})]},f.key))]}),u.length>0&&c.jsxs("div",{className:"strip-card strip-ships","data-testid":"strip-shipped",children:[c.jsx("h2",{className:"strip-title",children:"Shipped"}),u.map(f=>c.jsxs("div",{className:"ship-row",children:[c.jsx(cs,{size:14,strokeWidth:2.6,"aria-hidden":"true",className:"ship-check"}),c.jsx("span",{className:"mono ship-repo",children:f.repo}),c.jsx("span",{className:"ship-title",children:f.url?c.jsx("a",{href:f.url,target:"_blank",rel:"noreferrer noopener",children:f.title}):f.title}),c.jsx("span",{className:"ship-age",children:f.age.replace(/ ago$/,"")})]},f.key))]})]})}const wg=[{id:"needs",label:"Needs you"},{id:"approvals",label:"Approvals"},{id:"blocked",label:"Blocked"},{id:"resolved",label:"Resolved"}];function Qc({iso:o,nowMs:l,focusable:a=!1}){const u=kg(o,l);return o?c.jsx(wi,{content:ef(o),children:c.jsx("time",{dateTime:o,tabIndex:a?0:void 0,children:u})}):c.jsx(c.Fragment,{children:u})}const kg=(o,l)=>o?xt(o,l).replace(/ ago$/,""):"unknown";function xg(o,l){return o?l.owner?Wd(o,l.owner):l.queue?Bd(o,l.queue):[]:[]}function Sg({state:o,nowMs:l,api:a,act:u,item:f=null}){const[p,h]=D.useState("needs"),[g,v]=D.useState(null),[j,E]=D.useState(!1),[$,C]=D.useState(!1),[L,_]=D.useState(!1),F=D.useRef(null),I=D.useRef(null),te=D.useRef(new Map),{model:X,resolved:ke,read:J}=a,se={needs:X.items.filter(M=>M.folder==="needs").length,approvals:X.items.filter(M=>M.folder==="approvals").length,blocked:X.items.filter(M=>M.folder==="blocked").length,resolved:ke.length},ue=p==="resolved"?ke.map(M=>({item:M.item,resolved:!0,since:new Date(M.resolvedAt).toISOString()})):X.items.filter(M=>M.folder===p).map(M=>({item:M,resolved:!1,since:M.since})),q=ue.find(M=>M.item.id===g)??ue[0]??null,Y=M=>{h(M),v(null),E(!1),_(!1)},ie=M=>{_(!1),v(M.item.id),E(!0),M.resolved||a.markRead(M.item.id)},Ne=M=>{Gd(M.item.cmd),C(!0),window.setTimeout(()=>C(!1),1500)};D.useEffect(()=>{if(!f){F.current=null,_(!1);return}if(F.current===f)return;F.current=f;const M=X.items.find(ge=>ge.id===f),re=M?void 0:ke.find(ge=>ge.item.id===f);if(!M&&!re){_(!0);return}_(!1),h(M?M.folder:"resolved"),v(f),E(!0),M&&a.markRead(f),I.current=f},[f,X.items,ke,a.markRead]),D.useEffect(()=>{var ge;const M=I.current,re=M?te.current.get(M):void 0;!M||!re||(I.current=null,(ge=re.scrollIntoView)==null||ge.call(re,{block:"nearest"}))});const tt=D.useRef({rows:ue,sel:q,pickItem:ie,copySel:Ne});return tt.current={rows:ue,sel:q,pickItem:ie,copySel:Ne},D.useEffect(()=>{const M=re=>{var k;const ge=re.target,Fe=ge instanceof HTMLButtonElement||ge instanceof HTMLAnchorElement,Le=Dm(re.key,{ctrl:re.ctrlKey,meta:re.metaKey,alt:re.altKey},zm(ge),Fe),{rows:ye,sel:A,pickItem:G,copySel:H}=tt.current;if(!(!Le||!A)){if(Le==="next"||Le==="prev"){const T=Om(Le,ye.findIndex(oe=>oe.item.id===A.item.id),ye.length),ne=ye[T];if(!ne)return;v(ne.item.id),(k=te.current.get(ne.item.id))==null||k.scrollIntoView({block:"nearest"})}else Le==="open"?G(A):H(A);re.preventDefault()}};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[]),c.jsxs(c.Fragment,{children:[c.jsx(Jd,{page:"Inbox",head:mf(o,X.items.length,l),stale:Xd(o),children:c.jsx("div",{className:"pill-group",role:"tablist","aria-label":"Folders",children:wg.map(({id:M,label:re})=>c.jsxs("button",{type:"button",role:"tab","aria-selected":p===M,className:`folder-btn pill${p===M?" sel":""}`,onClick:()=>Y(M),"data-testid":`folder-${M}`,children:[re,c.jsx("strong",{className:"pill-count",children:se[M]})]},M))})}),o.repos.length===0&&c.jsx(ff,{}),a.notify.supported&&c.jsxs("div",{className:"notify-row",children:[c.jsxs("button",{type:"button",className:"btn",onClick:a.notify.enable,disabled:a.notify.enabled,children:[c.jsx(rm,{size:16,"aria-hidden":"true"}),a.notify.enabled?"Notifications on":"Notify me"]}),c.jsx("span",{children:a.notify.enabled?"One browser notification per new item.":"Opt in to a browser notification for each new item."})]}),c.jsxs("div",{className:`mailbox${j&&q?" show-detail":""}`,children:[c.jsxs("div",{className:"mailbox-list","data-testid":"inbox-list",children:[L&&c.jsx("div",{className:"list-notice",role:"status","data-testid":"inbox-notice",children:"That item is no longer in the Inbox."}),ue.map(M=>{const re=!M.resolved&&!J.has(M.item.id),ge=(q==null?void 0:q.item.id)===M.item.id;return c.jsxs("button",{ref:Fe=>{Fe?te.current.set(M.item.id,Fe):te.current.delete(M.item.id)},type:"button",className:`item-btn${ge?" sel":""}`,"aria-current":ge?"true":void 0,onClick:()=>ie(M),"data-testid":"inbox-item",children:[c.jsx("span",{className:`unread-dot${re?" on":""}`,role:"img","aria-label":re?"Unread":"Read"}),c.jsx(gf,{kind:M.resolved?"resolved":M.item.kind}),c.jsxs("span",{className:"item-main",children:[c.jsx("span",{className:"item-title",children:M.item.title}),c.jsxs("span",{className:"item-meta",children:[c.jsx("span",{children:M.resolved?"Resolved":ki[M.item.kind]}),c.jsx("span",{"aria-hidden":"true",children:"·"}),c.jsx("span",{className:"mono",children:M.item.repo}),!M.resolved&&M.item.stale&&c.jsx("span",{className:"chip chip-stale","data-testid":"stale-chip",title:"Its source is failing. Last good data is shown.",children:"stale"})]})]}),c.jsx("span",{className:"item-age",children:c.jsx(Qc,{iso:M.since,nowMs:l})})]},M.item.id)}),ue.length===0&&c.jsxs("div",{className:"list-empty","data-testid":"inbox-empty",children:[c.jsx("strong",{children:p==="resolved"?"Nothing resolved in the last 24 h":"Nothing needs you"}),c.jsxs("div",{children:["Last check ",xt(o.generated_at,l),"."]})]})]}),q&&c.jsxs("article",{className:"mailbox-detail","data-testid":"inbox-detail","aria-label":"Item detail",children:[c.jsxs("button",{type:"button",className:"btn back-btn",onClick:()=>E(!1),children:[c.jsx(tm,{size:16,"aria-hidden":"true"}),"Back"]}),c.jsxs("span",{className:"item-meta detail-meta",children:[c.jsx("span",{className:`chip chip-${q.resolved?"resolved":q.item.kind}`,children:q.resolved?"Resolved":ki[q.item.kind]}),c.jsx("span",{className:"mono",children:q.item.repo}),c.jsxs("span",{children:["· ",q.resolved?"resolved":"since"," ",c.jsx(Qc,{iso:q.since,nowMs:l,focusable:!0})]}),!q.resolved&&q.item.stale&&c.jsx("span",{className:"chip chip-stale",children:"stale"})]}),c.jsx("h2",{children:q.item.title}),c.jsxs("div",{className:"detail-block",children:[c.jsx("span",{className:"detail-label",children:"Why it matters"}),c.jsx("span",{children:q.resolved?"The source cleared. No action is needed.":q.item.why})]}),!q.resolved&&q.item.owner&&c.jsx(Yd,{item:q.item.owner}),c.jsxs("div",{className:"detail-block",children:[c.jsx("span",{className:"detail-label",children:"Next step"}),c.jsx("span",{children:q.resolved?"Nothing.":q.item.next}),c.jsx("code",{className:"cmd",children:q.item.cmd})]}),c.jsxs("div",{className:"detail-actions",children:[c.jsxs("button",{type:"button",className:"btn btn-primary",onClick:()=>Ne(q),children:[$?c.jsx(cs,{size:16,"aria-hidden":"true"}):c.jsx(_i,{size:16,"aria-hidden":"true"}),q.item.kind==="waiting"?"Copy session name":"Copy command"]}),!q.resolved&&(()=>{const M=o.repos.find(Fe=>St(Fe.path,q.item.repoPath)),re=xg(M,q.item);if(!M||re.length===0)return null;const ge=q.item.owner?qd(M,q.item.owner):void 0;return c.jsx(Ei,{repo:M,specs:re,act:u,reason:ge})})()]}),c.jsxs("p",{className:"key-hints",children:[c.jsx("kbd",{children:"J"})," ",c.jsx("kbd",{children:"K"})," move · ",c.jsx("kbd",{children:"Enter"})," open · ",c.jsx("kbd",{children:"C"})," copy"]})]},q.item.id)]}),c.jsx(vg,{state:o,nowMs:l})]})}const yf="caddis-hub-inbox-history",Kc="caddis-hub-inbox-read",os="caddis-hub-inbox-notified",Yc="caddis-hub-inbox-notify";function Xn(){try{return window.localStorage}catch{return null}}function vf(o,l){try{const a=l==null?void 0:l.getItem(o);return a?JSON.parse(a):null}catch{return null}}function wf(o,l,a){try{a==null||a.setItem(o,JSON.stringify(l))}catch{}}const Ng=(o=Xn())=>{const l=vf(yf,o);return l?fg(l):ag()},_g=(o,l=Xn())=>wf(yf,o,l);function di(o,l=Xn()){const a=vf(o,l);return new Set(Array.isArray(a)?a.filter(u=>typeof u=="string"):[])}function fi(o,l,a=Xn()){wf(o,[...l].slice(-500),a)}const jg={items:[],tiles:{waitingOnYou:0,blockedMerges:0,inQueue:0,workingSessions:0,lastDeploy:null}},pi=()=>typeof window<"u"&&"Notification"in window;function Eg(o,l){const a=D.useMemo(()=>o?lg(o,l):jg,[o,l]),[u,f]=D.useState(()=>Ng()),p=D.useMemo(()=>{if(!o)return a;const C=Wc(u.open,a.items,o),L=_=>C.filter(_).length;return{items:C,tiles:{...a.tiles,waitingOnYou:L(_=>_.folder==="needs"),blockedMerges:L(_=>_.kind==="blocked-merge")}}},[o,a,u.open]),[h,g]=D.useState(()=>di(Kc)),[v,j]=D.useState(()=>{var C;try{return pi()&&((C=Xn())==null?void 0:C.getItem(Yc))==="1"&&Notification.permission==="granted"}catch{return!1}});D.useEffect(()=>{o&&f(C=>{const L=dg(C,Wc(C.open,a.items,o),Date.now());return _g(L),L})},[o,a]),D.useEffect(()=>{if(!v||!o)return;const C=di(os);let L=!1;for(const _ of p.items)if(!C.has(_.id)){C.add(_.id),L=!0;try{new Notification(`caddis hub: ${_.repo}`,{body:_.title,tag:_.id})}catch{}}L&&fi(os,C)},[v,o,p]);const E=D.useCallback(C=>{g(L=>{if(L.has(C))return L;const _=new Set(L).add(C);return fi(Kc,_),_})},[]),$=D.useCallback(()=>{pi()&&Notification.requestPermission().then(C=>{var _;if(C!=="granted")return;try{(_=Xn())==null||_.setItem(Yc,"1")}catch{}const L=di(os);for(const F of p.items)L.add(F.id);fi(os,L),j(!0)})},[p]);return{model:p,resolved:u.resolved,read:h,markRead:E,notify:{supported:pi(),enabled:v,enable:$}}}function Cg(o,l){const a=Number.isNaN(o)?0:Math.min(1,Math.max(0,o)),u=2*Math.PI*l;return`${(u*a).toFixed(1)} ${u.toFixed(1)}`}function kf({fraction:o,size:l,stroke:a=5,tone:u,label:f,text:p}){const h=l/2,g=h-a/2-1.5;return c.jsxs("svg",{className:`ring ring-${u}`,width:l,height:l,viewBox:`0 0 ${l} ${l}`,role:"img","aria-label":f,children:[c.jsx("circle",{className:"ring-track",cx:h,cy:h,r:g,fill:"none",strokeWidth:a}),c.jsx("circle",{className:"ring-fill",cx:h,cy:h,r:g,fill:"none",strokeWidth:a,strokeLinecap:"round",strokeDasharray:Cg(o,g),transform:`rotate(-90 ${h} ${h})`}),p!==void 0&&c.jsx("text",{className:"ring-text",x:h,y:h,textAnchor:"middle",dominantBaseline:"central",children:p})]})}function xf({slot:o,size:l}){const a=Tm(o),u=Pm(a.adviseEur);return c.jsxs("div",{className:"spend-block",children:[c.jsx(kf,{fraction:a.pct/100,size:l,tone:a.advisory?"warn":"good",label:`agy spend in the last 24 h: EUR ${a.committedEur.toFixed(2)}. Note level EUR ${u}.`}),c.jsxs("span",{className:"spend-text",children:[c.jsxs("span",{className:"spend-line",children:[c.jsxs("span",{className:"spend-amount",children:["€",a.committedEur.toFixed(2)]})," ",c.jsx("span",{className:"spend-label",children:"agy, 24 h"})]}),c.jsxs("span",{className:`spend-note${a.advisory?" hot":""}`,children:["Note at €",u]})]})]})}const $g=["busy","running","working"],Gc=(o,l,a)=>`${o} ${o===1?l:a}`;function Ri(o,l){return o.sessions.some(a=>St(a.repo_path,l.path)&&$g.includes(a.status))}function Tg(o,l){var f,p;const a=Ti(Zn(l));if(a>0)return Gc(a,"gate","gates");if(o.sessions.some(h=>St(h.repo_path,l.path)&&h.waiting_class==="owner"))return"waiting on you";if(Ri(o,l))return"working";const u=((p=(f=l.github)==null?void 0:f.prs)==null?void 0:p.length)??0;return u>0?Gc(u,"PR","PRs"):""}const Xc="No coordinator: each session merges its own PRs.",Pg="/caddis:coordinate",Rg="gh auth login -h github.com",Sf=o=>{const l=o?new Date(o):null;return l&&!Number.isNaN(l.getTime())?l.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"unknown"},Zc=o=>`Coordinator not responding since ${Sf(o)}`,Jc=o=>`Coordinator stopped at ${Sf(o)}`;function Lg(o,l){const a=o?Date.parse(o):NaN;if(Number.isNaN(a))return"unknown";const u=Math.max(0,Math.round((l-a)/6e4));return u<60?`${u} min ago`:u<1440?`${Math.floor(u/60)} h ago`:`${Math.floor(u/1440)} d ago`}const zg=(o,l,a)=>o==="waiting"?{sub:`waiting: ${l??"unknown"}`,tone:a==="peer"?"muted":"warn"}:o==="busy"||o==="running"||o==="working"?{sub:"busy",tone:"good"}:{sub:o,tone:"muted"},hi=(o,l)=>{const a=o.whyWaiting||o.state,u=[o.hotfix?"hotfix":"",o.held&&!a.includes("held")?"held":"",a].filter(Boolean);return{key:`q${o.pr}`,title:`#${o.pr} ${o.title}`.trim(),sub:l?"last known queue":u.join(" · "),tone:o.hotfix||o.held?"warn":"muted",grey:l,queue:{pr:o.pr,headSha:o.headSha,hotfix:o.hotfix,held:o.held}}};function Dg(o,l,a){var ke,J,se,ue,q;const u=l.coordinator,f=u?u.status==="stopped"?"stopped":u.responding?"coordinator":"down":"none",p=kn(l),h=o.sessions.filter(Y=>St(Y.repo_path,l.path)).map(Y=>{const ie=zg(Y.status,Y.waiting_for,Y.waiting_class),Ne=ds(Y);return{key:`s${Y.session_id}`,title:Y.name??Y.session_id.slice(0,8),sub:Ne?`${Ne} · ${ie.sub}`:ie.sub,tone:ie.tone}}),g=[],v=new Set;for(const Y of((ke=l.github)==null?void 0:ke.prs)??[]){if(Y.draft||Y.required_state!=="fail")continue;const ie=Y.checks.filter(Ne=>Ne.required&&Ne.conclusion==="failure").map(Ne=>Ne.name);v.add(Y.number),g.push({key:`b${Y.number}`,title:`#${Y.number} ${Y.title}`,sub:ie.length>0?`${ie.join(", ")} failed`:"required check failed",tone:"bad"})}const j=Hr(l),E=[],$=[];if(f==="coordinator"){const Y=df(l);for(const ie of j)ie.state==="blocked"?v.has(ie.pr)||(v.add(ie.pr),g.push({key:`b${ie.pr}`,title:`#${ie.pr} ${ie.title}`.trim(),sub:ie.whyWaiting||"blocked",tone:"bad"})):ie.state==="merging"||ie.pr===Y?$.push(hi(ie,!1)):E.push(hi(ie,!1))}else if(f==="down"||f==="stopped")for(const Y of j)Y.state!=="blocked"&&E.push(hi(Y,!0));const C=(((J=l.github)==null?void 0:J.merges)??[]).slice().sort((Y,ie)=>Date.parse(ie.merged_at)-Date.parse(Y.merged_at)).slice(0,3).map(Y=>{const ie=Y.runs??[],Ne=ie.some(re=>re.conclusion==="failure"),tt=ie.length>0&&ie.every(re=>re.conclusion==="success"),M=Lg(Y.merged_at,a);return{key:`d${Y.number}`,title:`#${Y.number} ${Y.title}`,sub:Ne?`deploy failed · ${M}`:tt?`deployed ${M}`:`merged ${M}`,tone:Ne?"bad":tt?"good":"muted"}});let L=null;f==="none"?L=`${Xc} Start one with ${Pg}.`:f==="down"?L=`${Zc((u==null?void 0:u.heartbeat_at)??null)}. The lane shows GitHub data; the last known queue is greyed.`:f==="stopped"&&(L=`${Jc((u==null?void 0:u.stopped_at)??null)}. Each session merges its own PRs until one starts again (/caddis:coordinate). The last known queue is greyed.`);const _=(se=o.sources)!=null&&se.agents?!o.sources.agents.ok:!1,F=(ue=l.github)!=null&&ue.error?{account:l.github.account??null,error:l.github.error,command:Rg}:null;let I;f==="down"?I=Zc((u==null?void 0:u.heartbeat_at)??null):f==="stopped"?I=Jc((u==null?void 0:u.stopped_at)??null):I=[f==="none"?"No coordinator":"",_?"sessions unknown":h.length>0?`${h.length} session${h.length===1?"":"s"}`:"no sessions running",g.length>0?`${g.length} blocked`:"",E.length>0?`${E.length} waiting`:"",$.length>0?`${$.length} merging`:"",C.length>0?`${C.length} deployed`:""].filter(Boolean).join(" · ");const te=o.sessions.some(Y=>St(Y.repo_path,l.path)&&Y.waiting_class==="owner"),X=f==="down"||l.error||(q=l.github)!=null&&q.error?"blocked":te?"attention":f==="none"||f==="stopped"?"idle":"ok";return{id:l.path,name:p,mode:f,tone:X,note:L,github:F,summary:I,columns:[{id:"sessions",title:"Sessions",cards:h,emptyText:_?'Sessions unknown: "claude agents" failed':"No sessions running"},{id:"blocked",title:"Blocked",cards:g,emptyText:"None"},{id:"waiting",title:"Waiting for its turn",cards:E,emptyText:f==="none"?Xc:"None"},{id:"merging",title:"Merging now",cards:$,emptyText:"None"},{id:"done",title:"Done and deployed",cards:C,emptyText:"None"}]}}const Kn=(o,l,a)=>`${o} ${o===1?l:a}`;function Og(o,l,a){var g;if(a.mode==="down")return{status:"Coordinator down",statusTone:"bad"};if(a.mode==="stopped")return{status:"Coordinator stopped",statusTone:"bad"};const u=Ti(Zn(l));if(u>0)return{status:Kn(u,"gate","gates"),statusTone:"warn"};const f=o.sessions.filter(v=>St(v.repo_path,l.path)&&v.waiting_class==="owner").length;if(f>0)return{status:`${f} waiting on you`,statusTone:"warn"};const p=((g=l.github)==null?void 0:g.prs)??[],h=p.filter(v=>v.required_state==="fail").length;return h>0?{status:Kn(h,"PR failing","PRs failing"),statusTone:"bad"}:Ri(o,l)?{status:"Agent working",statusTone:"good"}:p.length>0?{status:Kn(p.length,"PR waiting","PRs waiting"),statusTone:"muted"}:{status:"Quiet",statusTone:"muted"}}function Ig(o){const l=Zn(o),a=l.roadmaps[0];if(a){const f=lf(a);return`Roadmap ${f.slug}: ${f.milestonesDone} of ${f.milestonesTotal} milestones`}const u=l.plans.filter(f=>f.open>0).length;return u>0?Kn(u,"open plan","open plans"):"No roadmap"}function Mg(o){var a;let l=null;for(const u of((a=o.github)==null?void 0:a.merges)??[])!Number.isNaN(Date.parse(u.merged_at))&&(!l||Date.parse(u.merged_at)>Date.parse(l))&&(l=u.merged_at);return l}function Ag(o,l){return o.repos.map(a=>{var C;const u=Dg(o,a,l),f=u.columns.find(L=>L.id==="sessions"),p=o.sessions.filter(L=>St(L.repo_path,a.path)&&Pi(L.status)).length,h=f&&f.cards.length>0?`${Kn(f.cards.length,"session","sessions")} · ${p} busy`:(f==null?void 0:f.emptyText)??"",g=((C=a.github)==null?void 0:C.prs)??[],v=g.length,j=g.filter(L=>L.required_state==="pass").length,E=Mg(a),$=Wr(a);return{id:$,name:a.name,href:is($),tone:u.tone,mode:u.mode,...Og(o,a,u),line:Ig(a),sessions:h,note:u.note,github:u.github,prsOpen:v,prsPassing:j,ringLabel:v>0?`${j}/${v}`:"0",foot:`${v>0?Kn(v,"open PR","open PRs"):"No open PRs"} · ${E?`shipped ${xt(E,l)}`:"never shipped"}`}})}function Fg(o){const l=[],a=[];for(const u of o.sessions){const f=o.repos.find(g=>St(g.path,u.repo_path)),p=(u.repo_path??"").replace(/[\\/]+$/,"").split(/[\\/]/).pop()??"",h={key:u.key,name:u.name??u.session_id.slice(0,8),repo:(f==null?void 0:f.name)??p,status:u.status};(Pi(u.status)?l:a).push(h)}return{busy:l,other:a}}const Ug=3,mi=5,Hg=(o,l)=>o?xt(o,l).replace(/ ago$/,""):null;function Bg(o){return o.prsOpen===0?"muted":o.prsPassing===o.prsOpen?"good":"prog"}function Wg({item:o,primary:l,nowMs:a}){const[u,f]=D.useState(!1),p=Hg(o.since,a),h=o.kind==="waiting"?"Copy session name":"Copy command";return c.jsxs("li",{className:"ov-need","data-testid":"ov-need",children:[c.jsx(gf,{kind:o.kind}),c.jsxs("span",{className:"ov-need-main",children:[c.jsx("span",{className:"ov-need-title",children:o.title}),c.jsxs("span",{className:"ov-need-meta",children:[ki[o.kind]," · ",c.jsx("span",{className:"mono",children:o.repo}),p?` · ${p}`:""]})]}),c.jsxs("button",{type:"button",className:`btn ${l?"btn-primary":"btn-ghost"}`,onClick:()=>{Gd(o.cmd),f(!0),window.setTimeout(()=>f(!1),1500)},children:[u?c.jsx(cs,{size:15,"aria-hidden":"true"}):c.jsx(_i,{size:15,"aria-hidden":"true"}),u?"Copied":h]})]})}function Vg({c:o}){return c.jsxs("article",{className:`repo-card ${o.mode}`,"data-testid":"repo-card",children:[c.jsxs("div",{className:"repo-card-head",children:[c.jsxs("span",{className:"repo-card-id",children:[c.jsx("a",{className:"repo-card-link",href:o.href,children:o.name}),c.jsx("span",{className:`repo-card-status tone-${o.statusTone}`,"data-testid":"repo-card-status",children:o.status})]}),c.jsx(kf,{fraction:o.prsOpen>0?o.prsPassing/o.prsOpen:0,size:48,text:o.ringLabel,tone:Bg(o),label:o.prsOpen>0?`${o.prsPassing} of ${o.prsOpen} open PRs pass required checks`:"No open PRs"})]}),c.jsx("p",{className:"repo-card-line","data-testid":"repo-card-line",children:o.line}),c.jsx("p",{className:"repo-card-sessions","data-testid":"repo-card-sessions",children:o.sessions}),o.note&&c.jsx("p",{className:"lane-note repo-card-note","data-testid":"repo-card-note",children:o.note}),o.github&&c.jsxs("div",{className:"lane-note gh-fail","data-testid":"gh-fail",role:"status",children:["GitHub access failed for ",o.github.account?`account ${o.github.account}`:"this repo",o.github.error?` (${o.github.error})`:"",". Sign in again with ",c.jsx("code",{className:"cmd",children:o.github.command})]}),c.jsx("p",{className:"repo-card-foot",children:o.foot})]})}function bg({state:o,nowMs:l,api:a}){const u=a.model.items,f=Fg(o),p=Ag(o,l),h=f.other.slice(0,mi);return c.jsxs(c.Fragment,{children:[c.jsx(Jd,{page:"Overview",head:mf(o,u.length,l),stale:Xd(o)}),o.repos.length===0&&c.jsx(ff,{}),c.jsxs("div",{className:"ov-top",children:[c.jsxs("section",{className:"ov-needs glass-panel","aria-label":"Needs you","data-testid":"ov-needs",children:[c.jsxs("div",{className:"ov-panel-head",children:[c.jsx("h2",{children:"Needs you"}),c.jsxs("a",{className:"ov-all",href:"#/inbox",children:["All ",u.length," items"]})]}),u.length===0?c.jsx("p",{className:"ov-empty",children:"Nothing needs you."}):c.jsx("ul",{className:"ov-need-list",children:u.slice(0,Ug).map((g,v)=>c.jsx(Wg,{item:g,primary:v===0,nowMs:l},g.id))})]}),c.jsxs("section",{className:"ov-live glass-panel","aria-label":"Live now","data-testid":"ov-live",children:[c.jsx("div",{className:"ov-panel-head",children:c.jsx("h2",{children:"Live now"})}),f.busy.length===0?c.jsx("p",{className:"ov-empty",children:"No agent is working."}):f.busy.map(g=>c.jsxs("div",{className:"live-row","data-testid":"live-session",children:[c.jsxs("span",{className:"live-mark","aria-hidden":"true",children:[c.jsx("span",{className:"live-orb"}),c.jsx("span",{className:"live-core",children:c.jsx(Od,{size:20})})]}),c.jsxs("span",{className:"live-text",children:[c.jsx("span",{className:"live-name",children:g.name}),c.jsxs("span",{className:"live-where",children:["Working in ",g.repo]})]})]},g.key)),h.length>0&&c.jsxs("ul",{className:"live-idle",children:[h.map(g=>c.jsxs("li",{"data-testid":"idle-session",children:[c.jsx("span",{className:"live-idle-dot","aria-hidden":"true"}),c.jsx("span",{className:"live-idle-name",children:g.name}),c.jsx("span",{className:"mono live-idle-repo",children:g.repo})]},g.key)),f.other.length>mi&&c.jsxs("li",{className:"live-more",children:["+",f.other.length-mi," more"]})]}),c.jsx("div",{className:"ov-spend",children:c.jsx(xf,{slot:o.spend,size:44})})]})]}),c.jsxs("section",{className:"ov-repos","aria-label":"Repos",children:[c.jsxs("div",{className:"ov-repos-head",children:[c.jsx("h2",{children:"Repos"}),c.jsxs("span",{children:[p.length," watched"]})]}),c.jsx("div",{className:"repo-cards","data-testid":"repo-cards",children:p.map(g=>c.jsx(Vg,{c:g},g.id))})]})]})}const qg=D.lazy(()=>Br(()=>import("./Palette-CinCoveU.js"),__vite__mapDeps([0,1,2]))),Qg=o=>(o.ctrlKey||o.metaKey)&&!o.altKey&&(o.key==="k"||o.key==="K");function Kg(){const[o,l]=D.useState(!1),a=D.useRef(!1),u=D.useRef(null),f=D.useCallback(h=>{if(a.current)return;const g=document.activeElement;u.current=h??(g instanceof HTMLElement?g:null),a.current=!0,l(!0)},[]),p=D.useCallback(()=>{if(!a.current)return;a.current=!1,l(!1);const h=u.current;u.current=null,h!=null&&h.isConnected&&h.focus()},[]);return D.useEffect(()=>{const h=g=>{Qg(g)&&(g.preventDefault(),f())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[f]),{open:o,show:f,hide:p}}function Yg({pal:o,state:l,inbox:a,nowMs:u}){return!o.open||!l?null:c.jsx(D.Suspense,{fallback:null,children:c.jsx(qg,{state:l,inbox:a,nowMs:u,onClose:o.hide})})}const Gg=["D1","D2","D3","D4","D5"],as=o=>o&&typeof o=="object"&&!Array.isArray(o)?o:{};function Xg(o){const l=(a,u)=>{if(a.state==="merging")return[0,0,0,"",u];const f=a.hotfix?1:2;return a.state==="ready"&&!a.held?[f,0,a.since?0:1,a.since??"",u]:[f,1,0,"",u]};return o.map((a,u)=>({q:a,r:l(a,u)})).sort((a,u)=>{for(let f=0;f<a.r.length;f++){const p=a.r[f],h=u.r[f];if(p<h)return-1;if(p>h)return 1}return 0}).map(a=>a.q)}function Nf(o){const l=o.coordinator;return l?l.status==="stopped"?"stopped":l.responding?"live":"down":"none"}function Zg(o){const l=o.coordinator,a=typeof as(l==null?void 0:l.coordinator_session).name=="string"?String(as(l==null?void 0:l.coordinator_session).name):null;switch(Nf(o)){case"none":return"No coordinator: each session merges its own PRs. Start one with /caddis:coordinate.";case"stopped":return`Coordinator stopped at ${Fr(l==null?void 0:l.stopped_at)}. The last known queue is greyed.`;case"down":return`Coordinator not responding since ${Fr(l==null?void 0:l.heartbeat_at)}. The last known queue is greyed.`;case"live":return`Coordinator ${a??""} live, heartbeat ${Fr(l==null?void 0:l.heartbeat_at)}.`.replace(" "," ")}}function Jg(o){var a;const l=[];for(const u of Yn((a=o.coordinator)==null?void 0:a.deploy_checks)){const f=as(u);if(typeof f.pr!="number")continue;const p=as(f.checks),h=Object.keys(p).length?Gg.map(g=>({name:g,mark:typeof p[g]=="string"?String(p[g]):"skip"})):null;l.push({pr:f.pr,mergeSha:typeof f.merge_sha=="string"?f.merge_sha.slice(0,10):"",run:typeof f.deploy_run=="number"?f.deploy_run:null,health:typeof f.health=="string"?f.health:"unknown",at:typeof f.at=="string"?f.at:null,checks:h,reason:typeof f.reason=="string"&&f.reason?f.reason:null})}return l.reverse()}function ey(o,l){var h,g;const a=Nf(l),u=df(l),f=Xg(Hr(l)),p=new Set(f.map(v=>v.pr));return{mode:a,statusText:Zg(l),grey:a==="stopped"||a==="down",merging:a==="live"?u:null,queue:f.map((v,j)=>({...v,position:j+1,merging:v.state==="merging"||v.pr===u})),deploys:Jg(l),owner:cf(l),unqueued:(((h=l.github)==null?void 0:h.prs)??[]).filter(v=>!v.draft&&!p.has(v.number)).map(v=>({number:v.number,title:v.title,requiredState:v.required_state,headSha:v.head_sha})),requests:[...((g=l.coordinator)==null?void 0:g.requests)??[]].reverse()}}const ty=D.createContext(null),ed={waiting:0,busy:1,working:1,idle:2},ny=o=>({key:o.key,name:o.name??o.session_id,kind:o.kind,agent:ds(o),status:o.status,waitingFor:o.waiting_for,waitingClass:o.waiting_class,since:o.waiting_since,copies:o.copies,copyWarning:o.copies>1?`${o.copies} copies`:null});function _f(o,l){const a=o.sources.agents,u=!a.ok&&a.last_ok_at===null,f=o.sessions.filter(h=>St(h.repo_path,l.path)&&(!u||ds(h)!==null)).map(ny).sort((h,g)=>+(g.waitingClass==="owner")-+(h.waitingClass==="owner")||(ed[h.status]??3)-(ed[g.status]??3)||h.name.localeCompare(g.name));return{unknown:u&&f.length===0,error:a.ok?null:a.last_error,rows:f}}function ry(o,l){const a=_f(o,l).rows.length;return a>0?`Sessions · ${a}`:"Sessions"}async function oy(o){try{return await navigator.clipboard.writeText(o),!0}catch{return!1}}const td={owner:"you",peer:"a peer session"};function sy({state:o,repo:l,nowMs:a}){const u=_f(o,l),[f,p]=D.useState(null),h=async(g,v)=>{await oy(v)&&(p(g),window.setTimeout(()=>p(j=>j===g?null:j),2e3))};return c.jsxs("div",{className:"flow","data-testid":"sessions",children:[u.error&&c.jsxs("div",{className:"lane-note","data-testid":"sessions-error",children:[u.unknown?"Sessions unknown: ":"The last sessions read failed: ",u.error]}),u.unknown?c.jsx("p",{className:"col-empty",children:"The hub could not read the session list. PRs and deploys are on the Flow tab."}):u.rows.length===0?c.jsx("p",{className:"col-empty","data-testid":"sessions-empty",children:"No sessions running. PRs and deploys are on the Flow tab."}):c.jsx("ul",{className:"flow-list","data-testid":"sessions-table","aria-label":"Sessions of this repo",children:u.rows.map(g=>c.jsxs("li",{className:"flow-row","data-testid":"session-row",children:[c.jsxs("div",{className:"flow-row-head",children:[c.jsx("span",{className:"flow-title mono",children:g.name}),g.agent&&c.jsx("span",{className:"chip tone-muted","data-testid":"session-agent",children:g.agent}),c.jsx(wi,{content:g.waitingFor?`${g.status}: waiting for ${g.waitingClass?td[g.waitingClass]:"an answer"}: ${g.waitingFor}`:g.status,children:c.jsx("span",{className:`chip tone-${g.status==="waiting"?"warn":g.status==="busy"||g.status==="working"?"good":"muted"}`,tabIndex:0,children:g.status})}),g.copyWarning&&c.jsx("span",{className:"chip tone-bad","data-testid":"session-copies",children:g.copyWarning}),c.jsxs("button",{type:"button",className:"btn btn-act",onClick:()=>void h(g.key,g.name),"aria-label":`Copy session name ${g.name}`,children:[c.jsx(_i,{size:14,"aria-hidden":"true"}),f===g.key?"Copied":"Copy name"]})]}),c.jsxs("span",{className:"flow-why",children:[g.kind,g.waitingFor?` · waiting for ${g.waitingClass?td[g.waitingClass]:"an answer"}: ${g.waitingFor}`:"",g.since&&c.jsxs(c.Fragment,{children:[" · since ",c.jsx(wi,{content:ef(g.since),children:c.jsx("time",{dateTime:g.since,tabIndex:0,children:xt(g.since,a)})})]})]}),g.copyWarning&&c.jsxs("span",{className:"flow-why tone-bad",children:["The same session runs in ",g.copies," windows. Close the extra copy."]})]},g.key))})]})}const ly=D.lazy(()=>Br(()=>import("./RoadmapTab-BeD4-8IU.js"),[])),iy=[{id:"flow",label:"Flow"},{id:"roadmap",label:"Roadmap"},{id:"sessions",label:"Sessions"}],ay={ready:"good",merging:"good",blocked:"bad",held:"warn",ci:"muted",waiting:"muted"};function uy({repo:o,item:l,grey:a,act:u}){return c.jsxs("li",{className:`flow-row${a?" grey":""}`,"data-testid":"queue-item",children:[c.jsxs("div",{className:"flow-row-head",children:[c.jsx("span",{className:"flow-pos mono",children:l.position}),c.jsxs("span",{className:"flow-title",children:["#",l.pr," ",l.title]})]}),c.jsxs("div",{className:"flow-flags",children:[c.jsx("span",{className:`chip tone-${ay[l.state]??"muted"}`,children:l.state}),l.merging&&c.jsx("span",{className:"chip tone-good",children:"merging now"}),l.hotfix&&c.jsx("span",{className:"chip tone-warn","data-testid":"flag-hotfix",children:"hotfix"}),l.held&&c.jsx("span",{className:"chip tone-warn","data-testid":"flag-held",children:"held"})]}),l.whyWaiting&&c.jsx("span",{className:"flow-why",children:l.whyWaiting}),l.waitsOn.length>0&&c.jsxs("span",{className:"flow-why",children:["Waits on ",l.waitsOn.map(f=>`${f.repo.replace("__","/")}#${f.pr}`).join(", ")]}),c.jsx(Ei,{repo:o,specs:Bd(o,{pr:l.pr,headSha:l.headSha,hotfix:l.hotfix,held:l.held}),act:u})]})}function cy({state:o,repo:l,nowMs:a,act:u}){const f=ey(o,l);return c.jsxs("div",{className:"flow","data-testid":"flow",children:[c.jsx("div",{className:`lane-note flow-status ${f.mode}`,"data-testid":"flow-status",children:f.statusText}),f.owner.length>0&&c.jsxs("section",{className:"flow-section","aria-label":"Owner approvals",children:[c.jsxs("h2",{className:"flow-h",children:["Needs your approval · ",f.owner.length]}),c.jsx("ul",{className:"flow-list",children:f.owner.map(p=>c.jsxs("li",{className:"flow-row","data-testid":"owner-item",children:[c.jsxs("span",{className:"flow-title",children:[p.pr!==null?`#${p.pr} `:"",p.what]}),c.jsx(Yd,{item:p}),c.jsx(Ei,{repo:l,specs:Wd(l,p),act:u,reason:qd(l,p)})]},p.id))})]}),c.jsxs("section",{className:"flow-section","aria-label":"Merge queue",children:[c.jsxs("h2",{className:"flow-h",children:["Merge queue · ",f.queue.length,f.grey?" · last known":""]}),f.mode==="none"?c.jsx("p",{className:"col-empty",children:"No queue: this repo has no coordinator."}):f.queue.length===0?c.jsx("p",{className:"col-empty",children:"The queue is empty."}):c.jsx("ol",{className:"flow-list",children:f.queue.map(p=>c.jsx(uy,{repo:l,item:p,grey:f.grey,act:u},p.pr))})]}),c.jsxs("section",{className:"flow-section","aria-label":"Deploy checks",children:[c.jsx("h2",{className:"flow-h",children:"Deploy checks"}),f.deploys.length===0?c.jsx("p",{className:"col-empty",children:"No deploy check recorded."}):c.jsx("ul",{className:"flow-list",children:f.deploys.map(p=>c.jsxs("li",{className:"flow-row","data-testid":"deploy-check",children:[c.jsxs("div",{className:"flow-row-head",children:[c.jsxs("span",{className:"flow-title",children:["#",p.pr," ",c.jsx("span",{className:"mono",children:p.mergeSha})]}),c.jsxs("span",{className:`chip tone-${p.health==="ok"?"good":p.health==="failed"?"bad":"muted"}`,children:["health ",p.health]})]}),p.checks&&c.jsx("div",{className:"flow-flags","data-testid":"deploy-marks",children:p.checks.map(h=>c.jsxs("span",{className:`chip tone-${h.mark==="pass"?"good":h.mark==="fail"?"bad":"muted"}`,children:[h.name," ",h.mark]},h.name))}),c.jsxs("span",{className:"flow-why",children:[p.run!==null?`run ${p.run} · `:"",xt(p.at,a),p.reason?` · ${p.reason}`:""]})]},`${p.pr}-${p.mergeSha}`))})]}),f.unqueued.length>0&&c.jsxs("section",{className:"flow-section","aria-label":"Open PRs not in the queue",children:[c.jsxs("h2",{className:"flow-h",children:["Open PRs not in the queue · ",f.unqueued.length]}),c.jsx("ul",{className:"flow-list",children:f.unqueued.map(p=>c.jsxs("li",{className:"flow-row","data-testid":"unqueued-pr",children:[c.jsxs("span",{className:"flow-title",children:["#",p.number," ",p.title]}),c.jsxs("span",{className:`flow-why tone-${p.requiredState==="fail"?"bad":p.requiredState==="pass"?"good":"muted"}`,children:["required checks ",p.requiredState]})]},p.number))})]}),f.requests.length>0&&c.jsxs("section",{className:"flow-section","aria-label":"Your requests",children:[c.jsx("h2",{className:"flow-h",children:"Your requests"}),c.jsx("ul",{className:"flow-list",children:f.requests.slice(0,10).map(p=>c.jsxs("li",{className:"flow-row","data-testid":"request-log",children:[c.jsx("span",{className:`tone-${Kd(p.status)}`,children:Qd(p)}),c.jsxs("span",{className:"flow-why",children:[p.pr!==null?`PR #${p.pr}`:p.what," · ",xt(p.created_at,a)]})]},p.id))})]})]})}function dy({state:o,repo:l,nowMs:a,act:u,tab:f,roadmap:p}){const h=Wr(l);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"page-header",children:[c.jsx("h1",{className:"page-title",children:kn(l)}),c.jsx("span",{className:"page-subtitle",children:l.name})]}),c.jsx("nav",{className:"repo-tabs",role:"tablist","aria-label":"Repo views",children:iy.map(g=>c.jsx("a",{role:"tab","aria-selected":f===g.id,"aria-current":f===g.id?"page":void 0,className:`folder-btn${f===g.id?" sel":""}`,href:pf(h,g.id),"data-testid":`tab-${g.id}`,children:g.id==="roadmap"?Xm(l):g.id==="sessions"?ry(o,l):g.label},g.id))}),f==="flow"&&c.jsx(cy,{state:o,repo:l,nowMs:a,act:u}),f==="roadmap"&&c.jsx(D.Suspense,{fallback:c.jsx("p",{className:"page-subtitle",children:"Loading..."}),children:c.jsx(ty.Provider,{value:Uh,children:c.jsx(ly,{repo:l,slug:p,stale:Zm(o),lastOkAt:o.sources.collector.last_ok_at},p??"")})}),f==="sessions"&&c.jsx(sy,{state:o,repo:l,nowMs:a})]})}const fy=1e4,py=2e3;function hy(o,l){return o&&l&&l!==o?l:null}let xi=null;const Si=new Set,my=o=>(Si.add(o),()=>Si.delete(o));function gy(){return D.useSyncExternalStore(my,()=>xi)}function yy(){const[o,l]=D.useState(null),[a,u]=D.useState(null),[f,p]=D.useState(!0),h=D.useRef(void 0),g=D.useRef(!0),v=D.useRef(null),j=D.useCallback(async()=>{var $,C;try{const L=await Fh();if(!g.current)return;l(L),u(null),v.current??(v.current=(($=L.versions)==null?void 0:$.hub)||null);const _=hy(v.current,(C=L.versions)==null?void 0:C.hub);_&&xi===null&&(xi=_,Si.forEach(F=>F()),window.setTimeout(()=>window.location.reload(),py))}catch(L){if(!g.current)return;u(L instanceof gi&&L.status===401?"unauthorized":"network")}finally{g.current&&p(!1)}},[]);D.useEffect(()=>{g.current=!0;const $=()=>window.clearInterval(h.current),C=()=>{$(),h.current=window.setInterval(()=>void j(),fy)},L=()=>{document.hidden?$():(j(),C())};return j(),document.hidden||C(),document.addEventListener("visibilitychange",L),()=>{g.current=!1,$(),document.removeEventListener("visibilitychange",L)}},[j]);const E=D.useCallback(()=>void j(),[j]);return{state:o,error:a,loading:f,refresh:E}}const vy=1,nd={collector:"Plans and roadmaps",agents:"Claude sessions",github:"GitHub",coordinator:"Coordinator"};function wy(o){var u,f;const l=[];(o.schema>vy||o.update_needed)&&l.push({id:"schema",tone:"bad",text:"This hub is older than its data. Update the hub:",command:"npm i -g @caddis/cli@latest"});const a=(u=o.sources)==null?void 0:u.agents;a&&!a.ok&&l.push({id:"agents-failed",tone:"bad",text:`Session list unavailable: "claude agents" failed${a.last_error?` (${a.last_error})`:""}.`});for(const p of Object.keys(nd)){const h=(f=o.sources)==null?void 0:f[p];h!=null&&h.stale&&(p==="agents"&&!h.ok||l.push({id:`stale-${p}`,tone:"warn",text:`${nd[p]} data is stale. Last good read: ${h.last_ok_at?Fr(h.last_ok_at):"never"}.`}))}return l}function ky({state:o}){const l=wy(o),a=gy();return l.length===0&&!a?null:c.jsxs("div",{className:"banners",role:"region","aria-label":"Warnings",children:[a&&c.jsxs("div",{className:"banner warn",role:"status","data-testid":"banner-hub-updated",children:[c.jsx(vm,{size:16,"aria-hidden":"true"}),c.jsxs("span",{children:["caddis hub updated to ",a,", reloading"]})]}),l.map(u=>c.jsxs("div",{className:`banner ${u.tone}`,role:"status","data-testid":`banner-${u.id}`,children:[u.tone==="bad"?c.jsx(mm,{size:16,"aria-hidden":"true"}):c.jsx(Md,{size:16,"aria-hidden":"true"}),c.jsxs("span",{children:[u.text,u.command&&c.jsxs(c.Fragment,{children:[" ",c.jsx("code",{className:"cmd",children:u.command})]})]})]},u.id))]})}const jf="caddis-hub-motion",xy=["on","off"];function Ef(){try{return window.localStorage}catch{return null}}function Sy(o=Ef()){try{return(o==null?void 0:o.getItem(jf))==="off"?"off":"on"}catch{return"on"}}function Ny(o,l=Ef()){try{l==null||l.setItem(jf,o)}catch{}}const Cf="caddis-hub-theme",_y=["dark","light","system"];function $f(){try{return window.localStorage}catch{return null}}function jy(o=$f()){try{const l=o==null?void 0:o.getItem(Cf);return l==="dark"||l==="light"||l==="system"?l:"system"}catch{return"system"}}function Ey(o,l=$f()){try{l==null||l.setItem(Cf,o)}catch{}}function Cy(o,l){return o==="system"?l?"dark":"light":o}const $y={dark:pm,light:xm,system:fm},Ty={on:ym,off:gm},Py={on:"motion",off:"still"};function Ry({state:o,nowMs:l,theme:a,onTheme:u,motion:f,onMotion:p}){const h=o==null?void 0:o.versions,g=Lm(o),v=Zd(o);return c.jsx("footer",{className:"sidebar-footer",children:c.jsxs("div",{className:"footer-card",children:[c.jsx(xf,{slot:o==null?void 0:o.spend,size:36}),c.jsxs("div",{className:"updated-line",children:[c.jsx(sm,{size:13,"aria-hidden":"true"}),c.jsx("span",{"data-testid":"data-age",children:o?Cm(o.generated_at,l):"Waiting for data"})]}),v&&!g&&c.jsxs("div",{className:"quota-line mono","data-testid":"quota",children:["GitHub quota ",v.remaining," left (",v.account,")"]}),g&&c.jsxs("div",{className:"quota-low","data-testid":"quota-low",role:"status",children:["GitHub quota low: ",g.remaining," left (",g.account,")",g.resetAt?`, resets ${Fr(g.resetAt)}`:"",". Polling slows."]}),h&&c.jsxs("div",{className:"versions mono",children:[c.jsxs("span",{className:"versions-item",children:["hub ",h.hub]}),c.jsxs("span",{className:"versions-item",children:["pool ",h.pool??"-"]}),c.jsxs("span",{className:"versions-item",children:["plugin ",h.plugin??"-"]})]}),c.jsxs("div",{className:"footer-toggles",children:[c.jsx("div",{className:"theme-switch",role:"group","aria-label":"Theme",children:_y.map(j=>{const E=$y[j];return c.jsxs("button",{type:"button",className:`theme-btn${a===j?" active":""}`,"aria-pressed":a===j,title:j,onClick:()=>u(j),children:[c.jsx(E,{size:14,"aria-hidden":"true"}),c.jsx("span",{children:j})]},j)})}),c.jsx("div",{className:"theme-switch",role:"group","aria-label":"Motion",children:xy.map(j=>{const E=Ty[j];return c.jsxs("button",{type:"button",className:`theme-btn${f===j?" active":""}`,"aria-pressed":f===j,title:j==="on"?"Animations on":"Animations off",onClick:()=>p(j),children:[c.jsx(E,{size:14,"aria-hidden":"true"}),c.jsx("span",{children:Py[j]})]},j)})})]})]})})}function Ly(){return c.jsxs("div",{className:"skeleton","data-testid":"loading","aria-busy":"true","aria-label":"Loading",children:[c.jsx("div",{className:"sk-line sk-title"}),c.jsx("div",{className:"sk-block"}),c.jsx("div",{className:"sk-block"})]})}function zy({onRetry:o}){return c.jsxs("div",{className:"notice","data-testid":"load-error",role:"status",children:[c.jsx("p",{children:"The hub did not answer. Retrying."}),c.jsx("button",{type:"button",className:"btn",onClick:o,children:"Retry now"})]})}const Dy="/assets/mark-anim-DZa95SHo.webp",Oy="/assets/mark-still-CcPgBc_-.png",Iy="/assets/wordmark-CD0s2ofS.svg";function rd(){return c.jsxs("span",{className:"brand-logo",children:[c.jsx("img",{src:Dy,alt:"",width:36,height:36,className:"brand-mark brand-mark-anim"}),c.jsx("img",{src:Oy,alt:"",width:36,height:36,className:"brand-mark brand-mark-still"}),c.jsxs("span",{className:"brand-stack",children:[c.jsx("img",{src:Iy,alt:"CADDIS",width:100,height:20,className:"brand-wordmark"}),c.jsx("span",{className:"brand-sub",children:"hub"})]})]})}const My="a[href], button";function Ay(o,l,a){return a?l<=0?o-1:l-1:l>=o-1?0:l+1}function Fy(o,l,a,u){const f=D.useRef(!1),p=D.useRef(l);p.current=l,D.useEffect(()=>{var v,j;if(!o){f.current&&((v=u.current)==null||v.focus()),f.current=!1;return}f.current=!0;const h=()=>{var E;return[...((E=a.current)==null?void 0:E.querySelectorAll(My))??[]]};(j=h()[0])==null||j.focus();const g=E=>{var L;if(E.key==="Escape"){p.current();return}if(E.key!=="Tab")return;const $=h();if($.length===0)return;E.preventDefault();const C=$.indexOf(document.activeElement);(L=$[Ay($.length,C,E.shiftKey)])==null||L.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[o,a,u])}const Uy=[["poster","Poster"],["details","Details"],["wall","Wall poster"],["map","Map"]];function Hy(o,l){var f;return o.error||(f=o.github)!=null&&f.error?"blocked":l.sessions.some(p=>p.repo_path===o.path&&p.waiting_class==="owner")||o.coordinator&&l.sources.coordinator.stale?"attention":!o.coordinator&&!l.sessions.some(p=>p.repo_path===o.path)?"idle":"ok"}function Qn({href:o,active:l,icon:a,label:u,badge:f,hint:p,onGo:h}){return c.jsx("li",{children:c.jsxs("a",{className:`nav-link${l?" active":""}`,href:o,"aria-current":l?"page":void 0,onClick:h,children:[c.jsxs("span",{className:"nav-link-left",children:[a,c.jsx("span",{className:"nav-text",children:u})]}),p&&c.jsx("span",{className:"nav-hint",children:p}),f]})})}function By({route:o,state:l,inbox:a,open:u,onToggle:f,onJump:p,children:h}){const g=()=>f(!1),v=D.useRef(null),j=D.useRef(null);return Fy(u,g,v,j),c.jsxs(c.Fragment,{children:[c.jsxs("header",{className:"mobile-topbar",children:[c.jsxs("button",{ref:j,type:"button",className:"menu-btn","aria-label":u?"Close navigation menu":"Open navigation menu","aria-expanded":u,"aria-controls":"app-sidebar",onClick:()=>f(!u),children:[u?c.jsx(Nm,{size:18}):c.jsx(dm,{size:18}),c.jsx("span",{children:"Menu"})]}),c.jsx(rd,{})]}),c.jsx("div",{className:`drawer-backdrop${u?" open":""}`,onClick:g,"aria-hidden":"true"}),c.jsxs("aside",{ref:v,className:`sidebar${u?" drawer-open":""}`,id:"app-sidebar",role:u?"dialog":void 0,"aria-modal":u?!0:void 0,"aria-label":u?"Navigation":void 0,children:[c.jsxs("nav",{className:"sidebar-top","aria-label":"Main",children:[c.jsx("div",{className:"brand-row",children:c.jsx(rd,{})}),p&&c.jsxs("button",{type:"button",className:"jump-btn","aria-keyshortcuts":"Control+K Meta+K",onClick:E=>{const $=u?j.current:E.currentTarget;u&&g(),p($)},children:[c.jsx(wm,{size:15,"aria-hidden":"true"}),c.jsx("span",{className:"jump-text",children:"Jump to anything"}),c.jsx("kbd",{children:"Ctrl K"})]}),c.jsxs("ul",{className:"nav-list",children:[c.jsx(Qn,{href:"#/inbox",active:o.page==="inbox",icon:c.jsx(um,{size:18}),label:"Inbox",badge:a>0?c.jsx("span",{className:"inbox-badge",children:a}):void 0,onGo:g}),c.jsx(Qn,{href:"#/overview",active:o.page==="overview",icon:c.jsx(cm,{size:18}),label:"Overview",onGo:g}),c.jsx(Qn,{href:"#/activity",active:o.page==="activity",icon:c.jsx(em,{size:18}),label:"Activity",onGo:g}),c.jsx(Qn,{href:"#/benchmarks",active:o.page==="benchmarks",icon:c.jsx(im,{size:18}),label:"Benchmarks",onGo:g}),c.jsx(Qn,{href:"#/guide",active:o.page==="guide",icon:c.jsx(om,{size:18}),label:"caddis guide",onGo:g}),o.page==="guide"&&c.jsx("li",{children:c.jsx("ul",{className:"nav-sublist","aria-label":"caddis guide pages",children:Uy.map(([E,$])=>{const C=o.tab===E;return c.jsx("li",{children:c.jsx("a",{className:`nav-link nav-sublink${C?" active":""}`,href:hg(E),"aria-current":C?"true":void 0,onClick:g,children:c.jsx("span",{className:"nav-text",children:$})})},E)})})})]}),c.jsx("div",{className:"nav-section-label",children:"Repos"}),c.jsxs("ul",{className:"nav-list",children:[(l==null?void 0:l.repos.length)===0&&c.jsx("li",{className:"nav-empty",children:"No repos yet"}),l==null?void 0:l.repos.map(E=>{const $=Wr(E),C=o.page==="repo"&&o.id===$;return c.jsx(Qn,{href:is($),active:C,icon:c.jsx("span",{className:`repo-dot ${Hy(E,l)}${Ri(l,E)?" working":""}`,"aria-hidden":"true"}),label:E.name,hint:Tg(l,E),onGo:g},E.path)})]})]}),h]})]})}const Wy="/assets/favicon-DtHQyAC1.svg",Vy="/assets/favicon-dot-DHAVYP15.svg",by=o=>o?Vy:Wy;function qy(o){let l=document.querySelector('link[rel="icon"]');l||(l=document.createElement("link"),l.rel="icon",document.head.appendChild(l)),l.type="image/svg+xml",l.href=by(o)}const Qy=()=>{var o;return((o=window.matchMedia)==null?void 0:o.call(window,"(prefers-color-scheme: dark)").matches)??!0};function Ky(){const[o,l]=D.useState(()=>jy());return D.useEffect(()=>{const a=()=>{document.documentElement.dataset.theme=Cy(o,Qy())};if(a(),o!=="system"||!window.matchMedia)return;const u=window.matchMedia("(prefers-color-scheme: dark)");return u.addEventListener("change",a),()=>u.removeEventListener("change",a)},[o]),[o,a=>{Ey(a),l(a)}]}function Yy(){const[o,l]=D.useState(()=>Sy());return D.useEffect(()=>{document.documentElement.dataset.motion=o},[o]),[o,a=>{Ny(a),l(a)}]}const Gy=D.lazy(()=>Br(()=>import("./Guide-9Ob-m7gx.js"),__vite__mapDeps([3,4])).then(o=>({default:o.Guide}))),Xy=D.lazy(()=>Br(()=>import("./Activity-CITEjSUJ.js"),__vite__mapDeps([5,1]))),Zy=D.lazy(()=>Br(()=>import("./Benchmarks-ChQoYa0P.js"),__vite__mapDeps([6,7])));function Jy(o){const[l,a]=D.useState(()=>Date.now());return D.useEffect(()=>{const u=window.setInterval(()=>a(Date.now()),o);return()=>window.clearInterval(u)},[o]),l}function ev(){const[o,l]=D.useState(()=>window.location.hash);return D.useEffect(()=>{const a=()=>l(window.location.hash);return window.addEventListener("hashchange",a),()=>window.removeEventListener("hashchange",a)},[]),pg(o)}function tv(){const{state:o,error:l,loading:a,refresh:u}=yy(),f=Wh(u),p=Jy(5e3),h=ev(),[g,v]=Ky(),[j,E]=Yy(),[$,C]=D.useState(!1),L=Kg(),_=Eg(o,p),F=_.model.items.length;D.useEffect(()=>{document.title=Em(F),qy(F>0)},[F]);let I;if(l==="unauthorized")I=c.jsxs("div",{className:"notice","data-testid":"signin",children:[c.jsx("h1",{className:"page-title",children:"Signed out"}),c.jsxs("p",{children:["Run ",c.jsx("code",{className:"cmd",children:"caddis hub open"})," to sign in."]})]});else if(!o)I=a?c.jsx(Ly,{}):c.jsx(zy,{onRetry:u});else if(h.page==="inbox")I=c.jsx(Sg,{state:o,nowMs:p,api:_,act:f,item:h.item});else if(h.page==="overview")I=c.jsx(bg,{state:o,nowMs:p,api:_});else if(h.page==="repo"){const te=o.repos.find(X=>Wr(X)===h.id);I=te?c.jsx(dy,{state:o,repo:te,nowMs:p,act:f,tab:h.tab,roadmap:h.roadmap},h.id):c.jsxs("div",{className:"notice",children:[c.jsx("h1",{className:"page-title",children:h.id}),c.jsx("p",{children:"This repo is not in the hub registry."})]})}else h.page==="guide"?I=c.jsx(D.Suspense,{fallback:c.jsx("p",{className:"page-subtitle",children:"Loading..."}),children:c.jsx(Gy,{guide:o.guide,versions:o.versions,tab:h.tab,item:h.item})}):h.page==="benchmarks"?I=c.jsx(D.Suspense,{fallback:c.jsx("p",{className:"page-subtitle",children:"Loading..."}),children:c.jsx(Zy,{})}):I=c.jsx(D.Suspense,{fallback:c.jsx("p",{className:"page-subtitle",children:"Loading..."}),children:c.jsx(Xy,{state:o})});return c.jsxs("div",{className:"app-shell",children:[c.jsx(By,{route:h,state:o,inbox:F,open:$,onToggle:C,onJump:L.show,children:c.jsx(Ry,{state:o,nowMs:p,theme:g,onTheme:v,motion:j,onMotion:E})}),c.jsx("main",{className:"main-area",id:"main-content",children:c.jsxs("div",{className:"page-wrap",children:[o&&c.jsx(ky,{state:o}),l==="network"&&o&&c.jsx("div",{className:"banner warn",role:"status",children:"The hub did not answer. Showing the last data."}),I]})}),c.jsx(Yg,{pal:L,state:o,inbox:_.model.items,nowMs:p})]})}Mh();const od=document.getElementById("root");od&&Lh.createRoot(od).render(c.jsx(D.StrictMode,{children:c.jsx(tv,{})}));export{uv as A,lv as B,_i as C,Gg as D,fv as E,Zn as F,am as G,Fr as H,um as I,gv as J,ki as K,cm as L,hv as M,mv as N,hm as O,ty as P,ov as Q,sv as R,wm as S,Od as T,Zm as U,Yn as a,Wr as b,kn as c,pf as d,nv as e,me as f,hg as g,xt as h,wv as i,c as j,yv as k,ef as l,pv as m,zm as n,wi as o,dv as p,Hm as q,D as r,St as s,rv as t,lf as u,cv as v,vv as w,av as x,Wm as y,iv as z};