loki-mode 10.10.2 → 10.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/dashboard/__init__.py +1 -1
- package/docs/CLI-REFERENCE.md +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/docs/v10/BOARD.md +2 -0
- package/docs/v10/FAILURE-CLASSES.md +13 -0
- package/docs/v10/PROGRESS.md +9 -0
- package/docs/v10/cp-redesign/PARITY.md +188 -0
- package/docs/v10/cp-redesign/legacy/INDEX.md +1167 -0
- package/loki-ts/dist/loki.js +616 -614
- package/mcp/__init__.py +1 -1
- package/package.json +1 -1
- package/packages/control-plane/dist/server.js +417 -336
- package/packages/control-plane/src/server/diffstat.ts +77 -0
- package/packages/control-plane/src/server/repos.ts +5 -2
- package/packages/control-plane/src/server/routes/index.ts +1 -1
- package/packages/control-plane/src/server/runs.ts +3 -1
- package/packages/control-plane/ui/dist/assets/index-D27veKDf.js +152 -0
- package/packages/control-plane/ui/dist/index.html +1 -1
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/web-app/dist/assets/{AdminPage-BvbxMtZO.js → AdminPage-Dyx5OHmP.js} +1 -1
- package/web-app/dist/assets/{Avatar-Dc7Scg02.js → Avatar-WVxt-kYj.js} +1 -1
- package/web-app/dist/assets/{Badge-BmVuOqbM.js → Badge-16vWJ-6u.js} +1 -1
- package/web-app/dist/assets/{Button-DvzqhxRU.js → Button-CWVPIMTW.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-D8AZo7Ha.js → CockpitPage-D5WhogJK.js} +1 -1
- package/web-app/dist/assets/{ComparePage-NmqaTXDz.js → ComparePage-CjJfjxcT.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary-PGl8Kzoq.js → ErrorBoundary-CNnObh81.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-2NY4n9gv.js → EvidenceReceiptPanel-Cn1PE_JV.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-DBO_LHHM.js → GitHubIssuesPanel-CcH9neSU.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-K7m9uJ1N.js → GitHubPRsPanel-C-n6inCN.js} +1 -1
- package/web-app/dist/assets/{HomePage-qNQzAJxM.js → HomePage-BZ7PCPFR.js} +2 -2
- package/web-app/dist/assets/{LoginPage-esu3OK65.js → LoginPage-CJsigIUa.js} +1 -1
- package/web-app/dist/assets/{MagicPage-CCdVvXrA.js → MagicPage-ClZaKmXT.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-bEvugU2t.js → MetricsPage-ELQn9-cf.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-BlEjQ1wX.js → NotFoundPage-Dc_zp3RF.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-Bnug_Yzv.js → ProjectPage-B5K1NDuH.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-M8r1vfpn.js → ProjectsPage-C2l5SiIN.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-NqAJpB48.js → SettingsPage-DkDNp6Pd.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-8FggxL1P.js → ShowcasePage-1zasFSKz.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-3Sz3kFOO.js → SystemSettingsPage-hIm_4NUx.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-nV-6vdWM.js → TeamsPage-DUb_TA22.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-Brbc_VR9.js → TemplatesPage-B1mj-eA4.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-D1yta5ac.js → TerminalOutput-BX1UwelI.js} +1 -1
- package/web-app/dist/assets/{activity-oEeKuqFe.js → activity-B8APKMuh.js} +1 -1
- package/web-app/dist/assets/{bell-3NJtqBRR.js → bell-BS8WL-tI.js} +1 -1
- package/web-app/dist/assets/{bot-CuvJZ6x1.js → bot-e9I6yy12.js} +1 -1
- package/web-app/dist/assets/{check-n4289IZw.js → check-BbgR7Ovw.js} +1 -1
- package/web-app/dist/assets/{chevron-left-CmQeio7h.js → chevron-left-BcDqv7aX.js} +1 -1
- package/web-app/dist/assets/{circle-alert-CmmVW-Pd.js → circle-alert-BnDT8wxe.js} +1 -1
- package/web-app/dist/assets/{clock-QFqk7GlA.js → clock-LPz79lks.js} +1 -1
- package/web-app/dist/assets/{cloud-BNkSokmq.js → cloud-BcgBi5T1.js} +1 -1
- package/web-app/dist/assets/{code-xml-nWeketqj.js → code-xml-5zcykgva.js} +1 -1
- package/web-app/dist/assets/{database-C83MXTmJ.js → database-D9KLqhHq.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-Blg6TO4y.js → dollar-sign-CrINoZ4o.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-Tk11oUzm.js → file-code-corner-CA7G72ip.js} +1 -1
- package/web-app/dist/assets/{file-plus-DF_eyA6I.js → file-plus-D8tHdHn_.js} +1 -1
- package/web-app/dist/assets/{globe-D5hDqqmn.js → globe-CT0Ts5bO.js} +1 -1
- package/web-app/dist/assets/{hammer-C2hm9lzl.js → hammer-tUpu0LJk.js} +1 -1
- package/web-app/dist/assets/{index-pMxOIwXq.js → index-DdjeiWUI.js} +3 -3
- package/web-app/dist/assets/{layers-XWQKGXg0.js → layers-BzzJ7w3C.js} +1 -1
- package/web-app/dist/assets/{loader-circle-BRuvorm2.js → loader-circle-BBdMdxIV.js} +1 -1
- package/web-app/dist/assets/{lock-BSGvQf5v.js → lock-Cg9DkEh7.js} +1 -1
- package/web-app/dist/assets/{package-3FJYUYgJ.js → package-DHs8IEJR.js} +1 -1
- package/web-app/dist/assets/{plus-CeIx6g9P.js → plus-70JSAqB1.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-ChutW42g.js → refresh-cw-DjggkboT.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-BdSjUAk-.js → rotate-ccw-c1NNyyL5.js} +1 -1
- package/web-app/dist/assets/{scroll-text-BjFqxpw3.js → scroll-text-B49wQrJ2.js} +1 -1
- package/web-app/dist/assets/{server-C7UEKdol.js → server-BHKG-dDi.js} +1 -1
- package/web-app/dist/assets/{shield-alert-DY8fpEs7.js → shield-alert-Dx9MoBGm.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-Cz1san1g.js → thumbs-up-frEbS59j.js} +1 -1
- package/web-app/dist/assets/{trash-2-D2MvGYeP.js → trash-2-1Gd8pXFG.js} +1 -1
- package/web-app/dist/assets/{trending-down-CxO3OYOB.js → trending-down-BpUeO-FP.js} +1 -1
- package/web-app/dist/assets/{trending-up-DCHKPJLe.js → trending-up-CvhWp8qO.js} +1 -1
- package/web-app/dist/assets/{upload-CdPJpSHC.js → upload-DZuMugqd.js} +1 -1
- package/web-app/dist/assets/{usePolling-DAH6K3ST.js → usePolling-D5KUSkfs.js} +1 -1
- package/web-app/dist/assets/{user-Byyt01W4.js → user-BF9vws84.js} +1 -1
- package/web-app/dist/index.html +1 -1
- package/packages/control-plane/ui/dist/assets/index-BrA22FUs.js +0 -152
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const p of f)if(p.type==="childList")for(const m of p.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&o(m)}).observe(document,{childList:!0,subtree:!0});function c(f){const p={};return f.integrity&&(p.integrity=f.integrity),f.referrerPolicy&&(p.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?p.credentials="include":f.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function o(f){if(f.ep)return;f.ep=!0;const p=c(f);fetch(f.href,p)}})();var Mo={exports:{}},Yi={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var qp;function Tx(){if(qp)return Yi;qp=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function c(o,f,p){var m=null;if(p!==void 0&&(m=""+p),f.key!==void 0&&(m=""+f.key),"key"in f){p={};for(var g in f)g!=="key"&&(p[g]=f[g])}else p=f;return f=p.ref,{$$typeof:i,type:o,key:m,ref:f!==void 0?f:null,props:p}}return Yi.Fragment=r,Yi.jsx=c,Yi.jsxs=c,Yi}var $p;function Nx(){return $p||($p=1,Mo.exports=Tx()),Mo.exports}var s=Nx(),Uo={exports:{}},Vi={},Ho={exports:{}},ko={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* scheduler.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Yp;function Rx(){return Yp||(Yp=1,(function(i){function r(Y,te){var le=Y.length;Y.push(te);e:for(;0<le;){var we=le-1>>>1,_e=Y[we];if(0<f(_e,te))Y[we]=te,Y[le]=_e,le=we;else break e}}function c(Y){return Y.length===0?null:Y[0]}function o(Y){if(Y.length===0)return null;var te=Y[0],le=Y.pop();if(le!==te){Y[0]=le;e:for(var we=0,_e=Y.length,Pt=_e>>>1;we<Pt;){var jl=2*(we+1)-1,jn=Y[jl],_=jl+1,B=Y[_];if(0>f(jn,le))_<_e&&0>f(B,jn)?(Y[we]=B,Y[_]=le,we=_):(Y[we]=jn,Y[jl]=le,we=jl);else if(_<_e&&0>f(B,le))Y[we]=B,Y[_]=le,we=_;else break e}}return te}function f(Y,te){var le=Y.sortIndex-te.sortIndex;return le!==0?le:Y.id-te.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;i.unstable_now=function(){return p.now()}}else{var m=Date,g=m.now();i.unstable_now=function(){return m.now()-g}}var x=[],b=[],j=1,v=null,z=3,k=!1,Q=!1,Z=!1,U=!1,H=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function V(Y){for(var te=c(b);te!==null;){if(te.callback===null)o(b);else if(te.startTime<=Y)o(b),te.sortIndex=te.expirationTime,r(x,te);else break;te=c(b)}}function L(Y){if(Z=!1,V(Y),!Q)if(c(x)!==null)Q=!0,ce||(ce=!0,ie());else{var te=c(b);te!==null&&Pe(L,te.startTime-Y)}}var ce=!1,ee=-1,re=5,De=-1;function ht(){return U?!0:!(i.unstable_now()-De<re)}function Ie(){if(U=!1,ce){var Y=i.unstable_now();De=Y;var te=!0;try{e:{Q=!1,Z&&(Z=!1,W(ee),ee=-1),k=!0;var le=z;try{t:{for(V(Y),v=c(x);v!==null&&!(v.expirationTime>Y&&ht());){var we=v.callback;if(typeof we=="function"){v.callback=null,z=v.priorityLevel;var _e=we(v.expirationTime<=Y);if(Y=i.unstable_now(),typeof _e=="function"){v.callback=_e,V(Y),te=!0;break t}v===c(x)&&o(x),V(Y)}else o(x);v=c(x)}if(v!==null)te=!0;else{var Pt=c(b);Pt!==null&&Pe(L,Pt.startTime-Y),te=!1}}break e}finally{v=null,z=le,k=!1}te=void 0}}finally{te?ie():ce=!1}}}var ie;if(typeof $=="function")ie=function(){$(Ie)};else if(typeof MessageChannel<"u"){var mt=new MessageChannel,pt=mt.port2;mt.port1.onmessage=Ie,ie=function(){pt.postMessage(null)}}else ie=function(){H(Ie,0)};function Pe(Y,te){ee=H(function(){Y(i.unstable_now())},te)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(Y){Y.callback=null},i.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<Y?Math.floor(1e3/Y):5},i.unstable_getCurrentPriorityLevel=function(){return z},i.unstable_next=function(Y){switch(z){case 1:case 2:case 3:var te=3;break;default:te=z}var le=z;z=te;try{return Y()}finally{z=le}},i.unstable_requestPaint=function(){U=!0},i.unstable_runWithPriority=function(Y,te){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var le=z;z=Y;try{return te()}finally{z=le}},i.unstable_scheduleCallback=function(Y,te,le){var we=i.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?we+le:we):le=we,Y){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=le+_e,Y={id:j++,callback:te,priorityLevel:Y,startTime:le,expirationTime:_e,sortIndex:-1},le>we?(Y.sortIndex=le,r(b,Y),c(x)===null&&Y===c(b)&&(Z?(W(ee),ee=-1):Z=!0,Pe(L,le-we))):(Y.sortIndex=_e,r(x,Y),Q||k||(Q=!0,ce||(ce=!0,ie()))),Y},i.unstable_shouldYield=ht,i.unstable_wrapCallback=function(Y){var te=z;return function(){var le=z;z=te;try{return Y.apply(this,arguments)}finally{z=le}}}})(ko)),ko}var Vp;function zx(){return Vp||(Vp=1,Ho.exports=Rx()),Ho.exports}var Bo={exports:{}},ae={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* react.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Gp;function Cx(){if(Gp)return ae;Gp=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),m=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),z=Symbol.for("react.view_transition"),k=Symbol.iterator;function Q(_){return _===null||typeof _!="object"?null:(_=k&&_[k]||_["@@iterator"],typeof _=="function"?_:null)}var Z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},U=Object.assign,H={};function W(_,B,I){this.props=_,this.context=B,this.refs=H,this.updater=I||Z}W.prototype.isReactComponent={},W.prototype.setState=function(_,B){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,B,"setState")},W.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function $(){}$.prototype=W.prototype;function V(_,B,I){this.props=_,this.context=B,this.refs=H,this.updater=I||Z}var L=V.prototype=new $;L.constructor=V,U(L,W.prototype),L.isPureReactComponent=!0;var ce=Array.isArray;function ee(){}var re={H:null,A:null,T:null,S:null},De=Object.prototype.hasOwnProperty;function ht(_,B,I){var F=I.ref;return{$$typeof:i,type:_,key:B,ref:F!==void 0?F:null,props:I}}function Ie(_,B){return ht(_.type,B,_.props)}function ie(_){return typeof _=="object"&&_!==null&&_.$$typeof===i}function mt(_){var B={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(I){return B[I]})}var pt=/\/+/g;function Pe(_,B){return typeof _=="object"&&_!==null&&_.key!=null?mt(""+_.key):B.toString(36)}function Y(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(ee,ee):(_.status="pending",_.then(function(B){_.status==="pending"&&(_.status="fulfilled",_.value=B)},function(B){_.status==="pending"&&(_.status="rejected",_.reason=B)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function te(_,B,I,F,ve){var ye=typeof _;(ye==="undefined"||ye==="boolean")&&(_=null);var be=!1;if(_===null)be=!0;else switch(ye){case"bigint":case"string":case"number":be=!0;break;case"object":switch(_.$$typeof){case i:case r:be=!0;break;case j:return be=_._init,te(be(_._payload),B,I,F,ve)}}if(be)return ve=ve(_),be=F===""?"."+Pe(_,0):F,ce(ve)?(I="",be!=null&&(I=be.replace(pt,"$&/")+"/"),te(ve,B,I,"",function(_l){return _l})):ve!=null&&(ie(ve)&&(ve=Ie(ve,I+(ve.key==null||_&&_.key===ve.key?"":(""+ve.key).replace(pt,"$&/")+"/")+be)),B.push(ve)),1;be=0;var K=F===""?".":F+":";if(ce(_))for(var ne=0;ne<_.length;ne++)F=_[ne],ye=K+Pe(F,ne),be+=te(F,B,I,ye,ve);else if(ne=Q(_),typeof ne=="function")for(_=ne.call(_),ne=0;!(F=_.next()).done;)F=F.value,ye=K+Pe(F,ne++),be+=te(F,B,I,ye,ve);else if(ye==="object"){if(typeof _.then=="function")return te(Y(_),B,I,F,ve);throw B=String(_),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return be}function le(_,B,I){if(_==null)return _;var F=[],ve=0;return te(_,F,"","",function(ye){return B.call(I,ye,ve++)}),F}function we(_){if(_._status===-1){var B=_._result,I=B();I.then(function(F){(_._status===0||_._status===-1)&&(_._status=1,_._result=F,I.status===void 0&&(I.status="fulfilled",I.value=F))},function(F){(_._status===0||_._status===-1)&&(_._status=2,_._result=F,I.status===void 0&&(I.status="rejected",I.reason=F))}),_._status===-1&&(_._status=0,_._result=I)}if(_._status===1)return _._result.default;throw _._result}var _e=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)};function Pt(_){var B=re.T,I={};I.types=B!==null?B.types:null,re.T=I;try{var F=_(),ve=re.S;ve!==null&&ve(I,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(ee,_e)}catch(ye){_e(ye)}finally{B!==null&&I.types!==null&&(B.types=I.types),re.T=B}}function jl(_){var B=re.T;if(B!==null){var I=B.types;I===null?B.types=[_]:I.indexOf(_)===-1&&I.push(_)}else Pt(jl.bind(null,_))}var jn={map:le,forEach:function(_,B,I){le(_,function(){B.apply(this,arguments)},I)},count:function(_){var B=0;return le(_,function(){B++}),B},toArray:function(_){return le(_,function(B){return B})||[]},only:function(_){if(!ie(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return ae.Activity=v,ae.Children=jn,ae.Component=W,ae.Fragment=c,ae.Profiler=f,ae.PureComponent=V,ae.StrictMode=o,ae.Suspense=x,ae.ViewTransition=z,ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=re,ae.__COMPILER_RUNTIME={__proto__:null,c:function(_){return re.H.useMemoCache(_)}},ae.addTransitionType=jl,ae.cache=function(_){return function(){return _.apply(null,arguments)}},ae.cacheSignal=function(){return null},ae.cloneElement=function(_,B,I){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var F=U({},_.props),ve=_.key;if(B!=null)for(ye in B.key!==void 0&&(ve=""+B.key),B)!De.call(B,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&B.ref===void 0||(F[ye]=B[ye]);var ye=arguments.length-2;if(ye===1)F.children=I;else if(1<ye){for(var be=Array(ye),K=0;K<ye;K++)be[K]=arguments[K+2];F.children=be}return ht(_.type,ve,F)},ae.createContext=function(_){return _={$$typeof:m,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:p,_context:_},_},ae.createElement=function(_,B,I){var F,ve={},ye=null;if(B!=null)for(F in B.key!==void 0&&(ye=""+B.key),B)De.call(B,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(ve[F]=B[F]);var be=arguments.length-2;if(be===1)ve.children=I;else if(1<be){for(var K=Array(be),ne=0;ne<be;ne++)K[ne]=arguments[ne+2];ve.children=K}if(_&&_.defaultProps)for(F in be=_.defaultProps,be)ve[F]===void 0&&(ve[F]=be[F]);return ht(_,ye,ve)},ae.createRef=function(){return{current:null}},ae.forwardRef=function(_){return{$$typeof:g,render:_}},ae.isValidElement=ie,ae.lazy=function(_){return{$$typeof:j,_payload:{_status:-1,_result:_},_init:we}},ae.memo=function(_,B){return{$$typeof:b,type:_,compare:B===void 0?null:B}},ae.startTransition=Pt,ae.unstable_useCacheRefresh=function(){return re.H.useCacheRefresh()},ae.use=function(_){return re.H.use(_)},ae.useActionState=function(_,B,I){return re.H.useActionState(_,B,I)},ae.useCallback=function(_,B){return re.H.useCallback(_,B)},ae.useContext=function(_){return re.H.useContext(_)},ae.useDebugValue=function(){},ae.useDeferredValue=function(_,B){return re.H.useDeferredValue(_,B)},ae.useEffect=function(_,B){return re.H.useEffect(_,B)},ae.useEffectEvent=function(_){return re.H.useEffectEvent(_)},ae.useId=function(){return re.H.useId()},ae.useImperativeHandle=function(_,B,I){return re.H.useImperativeHandle(_,B,I)},ae.useInsertionEffect=function(_,B){return re.H.useInsertionEffect(_,B)},ae.useLayoutEffect=function(_,B){return re.H.useLayoutEffect(_,B)},ae.useMemo=function(_,B){return re.H.useMemo(_,B)},ae.useOptimistic=function(_,B){return re.H.useOptimistic(_,B)},ae.useReducer=function(_,B,I){return re.H.useReducer(_,B,I)},ae.useRef=function(_){return re.H.useRef(_)},ae.useState=function(_){return re.H.useState(_)},ae.useSyncExternalStore=function(_,B,I){return re.H.useSyncExternalStore(_,B,I)},ae.useTransition=function(){return re.H.useTransition()},ae.version="19.3.0",ae}var Qp;function id(){return Qp||(Qp=1,Bo.exports=Cx()),Bo.exports}var Lo={exports:{}},dt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Xp;function Ox(){if(Xp)return dt;Xp=1;var i=id();function r(j){var v="https://react.dev/errors/"+j;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var z=2;z<arguments.length;z++)v+="&args[]="+encodeURIComponent(arguments[z])}return"Minified React error #"+j+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var o={d:{f:c,r:function(){throw Error(r(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},f=Symbol.for("react.portal"),p=Symbol.for("react.recoverable"),m=Symbol.for("react.optimistic_key");function g(j,v,z){var k=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:k==null?null:k===m?m:""+k,children:j,containerInfo:v,implementation:z}}var x=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(j,v){if(j==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return dt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,dt.browser=function(j){return{$$typeof:p,_reason:j}},dt.createPortal=function(j,v){var z=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(r(299));return g(j,v,null,z)},dt.flushSync=function(j){var v=x.T,z=o.p;try{if(x.T=null,o.p=2,j)return j()}finally{x.T=v,o.p=z,o.d.f()}},dt.preconnect=function(j,v){typeof j=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,o.d.C(j,v))},dt.prefetchDNS=function(j){typeof j=="string"&&o.d.D(j)},dt.preinit=function(j,v){if(typeof j=="string"&&v&&typeof v.as=="string"){var z=v.as,k=b(z,v.crossOrigin),Q=typeof v.integrity=="string"?v.integrity:void 0,Z=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;z==="style"?o.d.S(j,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:k,integrity:Q,fetchPriority:Z}):z==="script"&&o.d.X(j,{crossOrigin:k,integrity:Q,fetchPriority:Z,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},dt.preinitModule=function(j,v){if(typeof j=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var z=b(v.as,v.crossOrigin);o.d.M(j,{crossOrigin:z,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}}else v==null&&o.d.M(j)},dt.preload=function(j,v){if(typeof j=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var z=v.as,k=b(z,v.crossOrigin);o.d.L(j,z,{crossOrigin:k,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},dt.preloadModule=function(j,v){if(typeof j=="string")if(v){var z=b(v.as,v.crossOrigin);o.d.m(j,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:z,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}else o.d.m(j)},dt.requestFormReset=function(j){o.d.r(j)},dt.unstable_batchedUpdates=function(j,v){return j(v)},dt.useFormState=function(j,v,z){return x.H.useFormState(j,v,z)},dt.useFormStatus=function(){return x.H.useHostTransitionStatus()},dt.version="19.3.0",dt}var Zp;function Ax(){if(Zp)return Lo.exports;Zp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(r){console.error(r)}}return i(),Lo.exports=Ox(),Lo.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Kp;function Dx(){if(Kp)return Vi;Kp=1;var i=zx(),r=id(),c=Ax();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function p(e){for(var t=e,l=t;l&&!l.alternate;)t=l,(t.flags&4098)!==0&&(e=t.return),l=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function x(e){if(p(e)!==e)throw Error(o(188))}function b(e){var t=e.alternate;if(!t){if(t=p(e),t===null)throw Error(o(188));return t!==e?null:e}for(var l=e,n=t;;){var a=l.return;if(a===null)break;var u=a.alternate;if(u===null){if(n=a.return,n!==null){l=n;continue}break}if(a.child===u.child){for(u=a.child;u;){if(u===l)return x(a),e;if(u===n)return x(a),t;u=u.sibling}throw Error(o(188))}if(l.return!==n.return)l=a,n=u;else{for(var d=!1,h=a.child;h;){if(h===l){d=!0,l=a,n=u;break}if(h===n){d=!0,n=a,l=u;break}h=h.sibling}if(!d){for(h=u.child;h;){if(h===l){d=!0,l=u,n=a;break}if(h===n){d=!0,n=u,l=a;break}h=h.sibling}if(!d)throw Error(o(189))}}if(l.alternate!==n)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}function v(e,t,l,n,a,u){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&l(e,n,a,u)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&v(e.child,t,l,n,a,u))return!0;e=e.sibling}return!1}function z(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function k(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function Q(e){var t=[null,null],l=z(e);return l===null||Z(t,e,l.child,{foundSelf:!1}),t}function Z(e,t,l,n){for(;l!==null;){if(l===t)n.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(n.foundSelf)return e[1]=l,!0;e[0]=l}else if((l.tag!==22||l.memoizedState===null)&&Z(e,t,l.child,n))return!0;l=l.sibling}return!1}function U(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(o(559))}}var H=null,W=null;function $(e,t,l){return e===l?!0:e===t?(H=e,!0):!1}function V(e,t,l){return e===l?(W=e,!1):e===t?(W!==null&&(H=e),!0):!1}function L(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function ce(e,t,l){for(var n=0,a=e;a;a=l(a))n++;a=0;for(var u=t;u;u=l(u))a++;for(;0<n-a;)e=l(e),n--;for(;0<a-n;)t=l(t),a--;for(;n--;){if(e===t||t!==null&&e===t.alternate)return e;e=l(e),t=l(t)}return null}var ee=Object.assign,re=Symbol.for("react.element"),De=Symbol.for("react.transitional.element"),ht=Symbol.for("react.portal"),Ie=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),mt=Symbol.for("react.profiler"),pt=Symbol.for("react.consumer"),Pe=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),we=Symbol.for("react.memo"),_e=Symbol.for("react.lazy"),Pt=Symbol.for("react.activity"),jl=Symbol.for("react.legacy_hidden"),jn=Symbol.for("react.memo_cache_sentinel"),_=Symbol.for("react.view_transition"),B=Symbol.for("react.recoverable"),I=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var ve=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ve?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ie:return"Fragment";case mt:return"Profiler";case ie:return"StrictMode";case te:return"Suspense";case le:return"SuspenseList";case Pt:return"Activity";case _:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case ht:return"Portal";case Pe:return e.displayName||"Context";case pt:return(e._context.displayName||"Context")+".Consumer";case Y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case we:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case _e:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var be=Array.isArray,K=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_l={pending:!1,data:null,method:null,action:null},Ws=[],Jn=-1;function sl(e){return{current:e}}function at(e){0>Jn||(e.current=Ws[Jn],Ws[Jn]=null,Jn--)}function Ue(e,t){Jn++,Ws[Jn]=e.current,e.current=t}var rl=sl(null),Ka=sl(null),Yl=sl(null),lu=sl(null);function nu(e,t){switch(Ue(Yl,t),Ue(Ka,e),Ue(rl,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Jm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Jm(t),e=Im(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}at(rl),Ue(rl,e)}function In(){at(rl),at(Ka),at(Yl)}function Ps(e){var t=e.memoizedState;t!==null&&(ka._currentValue=t.memoizedState,Ue(lu,e)),t=rl.current;var l=Im(t,e.type);t!==l&&(Ue(Ka,e),Ue(rl,l))}function au(e){Ka.current===e&&(at(rl),at(Ka)),lu.current===e&&(at(lu),ka._currentValue=_l)}var er,pd;function Vl(e){if(er===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);er=t&&t[1]||"",pd=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+er+e+pd}var tr=!1;function lr(e,t){if(!e||tr)return"";tr=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var w=function(){throw Error()};if(Object.defineProperty(w.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(w,[])}catch(q){var E=q}Reflect.construct(e,[],w)}else{try{w.call()}catch(q){E=q}w=!1;try{var O=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),w=!0,new e}finally{w&&(O!==void 0?Object.defineProperty(e.prototype,"props",O):delete e.prototype.props)}}}else{try{throw Error()}catch(q){E=q}(w=e())&&typeof w.catch=="function"&&w.catch(function(){})}}catch(q){if(q&&E&&typeof q.stack=="string")return[q.stack,E.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=n.DetermineComponentFrameRoot(),d=u[0],h=u[1];if(d&&h){var y=d.split(`
|
|
44
|
+
`),N=h.split(`
|
|
45
|
+
`);for(a=n=0;n<y.length&&!y[n].includes("DetermineComponentFrameRoot");)n++;for(;a<N.length&&!N[a].includes("DetermineComponentFrameRoot");)a++;if(n===y.length||a===N.length)for(n=y.length-1,a=N.length-1;1<=n&&0<=a&&y[n]!==N[a];)a--;for(;1<=n&&0<=a;n--,a--)if(y[n]!==N[a]){if(n!==1||a!==1)do if(n--,a--,0>a||y[n]!==N[a]){var A=`
|
|
46
|
+
`+y[n].replace(" at new "," at ");return e.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",e.displayName)),A}while(1<=n&&0<=a);break}}}finally{tr=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Vl(l):""}function Cv(e,t){switch(e.tag){case 26:case 27:case 5:return Vl(e.type);case 16:return Vl("Lazy");case 13:return e.child!==t&&t!==null?Vl("Suspense Fallback"):Vl("Suspense");case 19:return Vl("SuspenseList");case 0:case 15:return lr(e.type,!1);case 11:return lr(e.type.render,!1);case 1:return lr(e.type,!0);case 31:return Vl("Activity");case 30:return Vl("ViewTransition");default:return""}}function gd(e){try{var t="",l=null;do t+=Cv(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var nr=Object.prototype.hasOwnProperty,ar=i.unstable_scheduleCallback,ir=i.unstable_cancelCallback,Ov=i.unstable_shouldYield,Av=i.unstable_requestPaint,zt=i.unstable_now,Dv=i.unstable_getCurrentPriorityLevel,vd=i.unstable_ImmediatePriority,yd=i.unstable_UserBlockingPriority,iu=i.unstable_NormalPriority,wv=i.unstable_LowPriority,xd=i.unstable_IdlePriority,Mv=i.log,Uv=i.unstable_setDisableYieldValue,Ja=null,Ct=null;function Gl(e){if(typeof Mv=="function"&&Uv(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(Ja,e)}catch{}}var Ot=Math.clz32?Math.clz32:Bv,Hv=Math.log,kv=Math.LN2;function Bv(e){return e>>>=0,e===0?32:31-(Hv(e)/kv|0)|0}var uu=256,su=262144,ru=4194304;function _n(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function cu(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var a=0,u=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var h=n&134217727;return h!==0?(n=h&~u,n!==0?a=_n(n):(d&=h,d!==0?a=_n(d):l||(l=h&~e,l!==0&&(a=_n(l))))):(h=n&~u,h!==0?a=_n(h):d!==0?a=_n(d):l||(l=n&~e,l!==0&&(a=_n(l)))),a===0?0:t!==0&&t!==a&&(t&u)===0&&(u=a&-a,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:a}function Ia(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function bd(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var n=31-Ot(l),a=1<<n;t|=e[n],l&=~a}return t}function Lv(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Sd(){var e=ru;return ru<<=1,(ru&62914560)===0&&(ru=4194304),e}function ur(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Fa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qv(e,t,l,n,a,u){var d=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var h=e.entanglements,y=e.expirationTimes,N=e.hiddenUpdates;for(l=d&~l;0<l;){var A=31-Ot(l),w=1<<A;h[A]=0,y[A]=-1;var E=N[A];if(E!==null)for(N[A]=null,A=0;A<E.length;A++){var O=E[A];O!==null&&(O.lane&=-536870913)}l&=~w}n!==0&&jd(e,n,0),u!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=u&~(d&~t))}function jd(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Ot(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|l&261930}function _d(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var n=31-Ot(l),a=1<<n;a&t|e[n]&t&&(e[n]|=t),l&=~a}}function Ed(e,t){var l=t&-t;return l=(l&42)!==0?1:sr(l),(l&(e.suspendedLanes|t))!==0?0:l}function sr(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function rr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Td(){var e=ne.p;return e!==0?e:(e=window.event,e===void 0?32:wp(e.type))}function Nd(e,t){var l=ne.p;try{return ne.p=e,t()}finally{ne.p=l}}var El=Math.random().toString(36).slice(2),it="__reactFiber$"+El,jt="__reactProps$"+El,Fn="__reactContainer$"+El,Rd="__reactEvents$"+El,$v="__reactListeners$"+El,Yv="__reactHandles$"+El,zd="__reactResources$"+El,Wa="__reactMarker$"+El,ou="__reactLoad$"+El;function du(e){delete e[it],delete e[jt],delete e[$v],delete e[Yv]}function En(e){var t;if(t=e[it])return t;for(var l=e.parentNode;l;){if(t=l[Fn]||l[it]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=hp(e);e!==null;){if(l=e[it])return l;e=hp(e)}return t}e=l,l=e.parentNode}return null}function Wn(e){if(e=e[it]||e[Fn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Pa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Pn(e){var t=e[zd];return t||(t=e[zd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[Wa]=!0}function Cd(e){e[ou]=void 0}var Od=new Set,Ad={};function Tn(e,t){ea(e,t),ea(e+"Capture",t)}function ea(e,t){for(Ad[e]=t,e=0;e<t.length;e++)Od.add(t[e])}var Vv=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Dd={},wd={};function Gv(e){return nr.call(wd,e)?!0:nr.call(Dd,e)?!1:Vv.test(e)?wd[e]=!0:(Dd[e]=!0,!1)}var xe=!1;function Md(){var e=xe;return xe=!1,e}function fu(e,t,l){if(Gv(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,l)}}function hu(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,l)}}function Tl(e,t,l,n){if(n===null)e.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,n)}}function At(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ud(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qv(e,t,l){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(d){l=""+d,u.call(this,d)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(d){l=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cr(e){if(!e._valueTracker){var t=Ud(e)?"checked":"value";e._valueTracker=Qv(e,t,""+e[t])}}function Hd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=Ud(e)?e.checked?"true":"false":e.value),e=n,e!==l?(t.setValue(e),!0):!1}var Xv=/[\n"\\]/g;function Vt(e){return e.replace(Xv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function or(e,t,l,n,a,u,d,h){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+At(t)):e.value!==""+At(t)&&(e.value=""+At(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?d==="number"&&e.value==t?dr(e,At(e.value)):dr(e,At(t)):l!=null?dr(e,At(l)):n!=null&&e.removeAttribute("value"),a==null&&u!=null&&(e.defaultChecked=!!u),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+At(h):e.removeAttribute("name")}function kd(e,t,l,n,a,u,d,h){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){cr(e);return}l=l!=null?""+At(l):"",t=t!=null?""+At(t):l,h||t===e.value||(e.value=t),e.defaultValue=t}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=h?e.checked:!!n,e.defaultChecked=!!n,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),cr(e)}function dr(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function ta(e,t,l,n){if(e=e.options,t){t={};for(var a=0;a<l.length;a++)t["$"+l[a]]=!0;for(l=0;l<e.length;l++)a=t.hasOwnProperty("$"+e[l].value),e[l].selected!==a&&(e[l].selected=a),a&&n&&(e[l].defaultSelected=!0)}else{for(l=""+At(l),t=null,a=0;a<e.length;a++){if(e[a].value===l){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Bd(e,t,l){if(t!=null&&(t=""+At(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+At(l):""}function Ld(e,t,l,n){if(t==null){if(n!=null){if(l!=null)throw Error(o(92));if(be(n)){if(1<n.length)throw Error(o(93));n=n[0]}l=n}l==null&&(l=""),t=l}l=At(t),e.defaultValue=l,n=e.textContent,n===l&&n!==""&&n!==null&&(e.value=n),cr(e)}function la(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Zv=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function qd(e,t,l){var n=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,l):typeof l!="number"||l===0||Zv.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function $d(e,t,l){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="",xe=!0);for(var a in t)n=t[a],t.hasOwnProperty(a)&&l[a]!==n&&(qd(e,a,n),xe=!0)}else for(var u in t)t.hasOwnProperty(u)&&qd(e,u,t[u])}function fr(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Kv=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Jv=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function mu(e){return Jv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function cl(){}var hr=null;function mr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var na=null,aa=null;function Yd(e){var t=Wn(e);if(t&&(e=t.stateNode)){var l=e[jt]||null;e:switch(e=t.stateNode,t.type){case"input":if(or(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Vt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var n=l[t];if(n!==e&&n.form===e.form){var a=n[jt]||null;if(!a)throw Error(o(90));or(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<l.length;t++)n=l[t],n.form===e.form&&Hd(n)}break e;case"textarea":Bd(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ta(e,!!l.multiple,t,!1)}}}var pr=!1;function Vd(e,t,l){if(pr)return e(t,l);pr=!0;try{var n=e(t);return n}finally{if(pr=!1,(na!==null||aa!==null)&&(ms(),na&&(t=na,e=aa,aa=na=null,Yd(t),e)))for(t=0;t<e.length;t++)Yd(e[t])}}function ei(e,t){var l=e.stateNode;if(l===null)return null;var n=l[jt]||null;if(n===null)return null;l=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(o(231,t,typeof l));return l}var Nl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gr=!1;if(Nl)try{var ti={};Object.defineProperty(ti,"passive",{get:function(){gr=!0}}),window.addEventListener("test",ti,ti),window.removeEventListener("test",ti,ti)}catch{gr=!1}var Ql=null,vr=null,pu=null;function Gd(){if(pu)return pu;var e,t=vr,l=t.length,n,a="value"in Ql?Ql.value:Ql.textContent,u=a.length;for(e=0;e<l&&t[e]===a[e];e++);var d=l-e;for(n=1;n<=d&&t[l-n]===a[u-n];n++);return pu=a.slice(e,1<n?1-n:void 0)}function gu(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 vu(){return!0}function Qd(){return!1}function vt(e){function t(l,n,a,u,d){this._reactName=l,this._targetInst=a,this.type=n,this.nativeEvent=u,this.target=d,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(l=e[h],this[h]=l?l(u):u[h]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?vu:Qd,this.isPropagationStopped=Qd,this}return ee(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=vu)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=vu)},persist:function(){},isPersistent:vu}),t}var Xl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yu=vt(Xl),li=ee({},Xl,{view:0,detail:0}),Iv=vt(li),yr,xr,ni,xu=ee({},li,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sr,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!==ni&&(ni&&e.type==="mousemove"?(yr=e.screenX-ni.screenX,xr=e.screenY-ni.screenY):xr=yr=0,ni=e),yr)},movementY:function(e){return"movementY"in e?e.movementY:xr}}),Xd=vt(xu),Fv=ee({},xu,{dataTransfer:0}),Wv=vt(Fv),Pv=ee({},li,{relatedTarget:0}),br=vt(Pv),e0=ee({},Xl,{animationName:0,elapsedTime:0,pseudoElement:0}),t0=vt(e0),l0=ee({},Xl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),n0=vt(l0),a0=ee({},Xl,{data:0}),Zd=vt(a0),i0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},u0={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"},s0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function r0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=s0[e])?!!t[e]:!1}function Sr(){return r0}var c0=ee({},li,{key:function(e){if(e.key){var t=i0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=gu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?u0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sr,charCode:function(e){return e.type==="keypress"?gu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?gu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),o0=vt(c0),d0=ee({},xu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kd=vt(d0),f0=ee({},Xl,{submitter:0}),h0=vt(f0),m0=ee({},li,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sr}),p0=vt(m0),g0=ee({},Xl,{propertyName:0,elapsedTime:0,pseudoElement:0}),v0=vt(g0),y0=ee({},xu,{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}),x0=vt(y0),b0=ee({},Xl,{newState:0,oldState:0,source:0}),S0=vt(b0),j0=[9,13,27,32],jr=Nl&&"CompositionEvent"in window,ai=null;Nl&&"documentMode"in document&&(ai=document.documentMode);var _0=Nl&&"TextEvent"in window&&!ai,Jd=Nl&&(!jr||ai&&8<ai&&11>=ai),Id=" ",Fd=!1;function Wd(e,t){switch(e){case"keyup":return j0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ia=!1;function E0(e,t){switch(e){case"compositionend":return Pd(t);case"keypress":return t.which!==32?null:(Fd=!0,Id);case"textInput":return e=t.data,e===Id&&Fd?null:e;default:return null}}function T0(e,t){if(ia)return e==="compositionend"||!jr&&Wd(e,t)?(e=Gd(),pu=vr=Ql=null,ia=!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 Jd&&t.locale!=="ko"?null:t.data;default:return null}}var N0={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 ef(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!N0[e.type]:t==="textarea"}function tf(e,t,l,n){na?aa?aa.push(n):aa=[n]:na=n,t=bs(t,"onChange"),0<t.length&&(l=new yu("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var ii=null,ui=null;function R0(e){Vm(e,0)}function bu(e){var t=Pa(e);if(Hd(t))return e}function lf(e,t){if(e==="change")return t}var nf=!1;if(Nl){var _r;if(Nl){var Er="oninput"in document;if(!Er){var af=document.createElement("div");af.setAttribute("oninput","return;"),Er=typeof af.oninput=="function"}_r=Er}else _r=!1;nf=_r&&(!document.documentMode||9<document.documentMode)}function uf(){ii&&(ii.detachEvent("onpropertychange",sf),ui=ii=null)}function sf(e){if(e.propertyName==="value"&&bu(ui)){var t=[];tf(t,ui,e,mr(e)),Vd(R0,t)}}function z0(e,t,l){e==="focusin"?(uf(),ii=t,ui=l,ii.attachEvent("onpropertychange",sf)):e==="focusout"&&uf()}function C0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bu(ui)}function O0(e,t){if(e==="click")return bu(t)}function A0(e,t){if(e==="input"||e==="change")return bu(t)}function D0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dt=typeof Object.is=="function"?Object.is:D0;function si(e,t){if(Dt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),n=Object.keys(t);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var a=l[n];if(!nr.call(t,a)||!Dt(e[a],t[a]))return!1}return!0}function Tr(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 rf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cf(e,t){var l=rf(e);e=0;for(var n;l;){if(l.nodeType===3){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=rf(l)}}function of(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?of(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function df(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Tr(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Tr(e.document)}return t}function Nr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var w0=Nl&&"documentMode"in document&&11>=document.documentMode,ua=null,Rr=null,ri=null,zr=!1;function ff(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;zr||ua==null||ua!==Tr(n)||(n=ua,"selectionStart"in n&&Nr(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ri&&si(ri,n)||(ri=n,n=bs(Rr,"onSelect"),0<n.length&&(t=new yu("onSelect","select",null,t,l),e.push({event:t,listeners:n}),t.target=ua)))}function Nn(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var sa={animationend:Nn("Animation","AnimationEnd"),animationiteration:Nn("Animation","AnimationIteration"),animationstart:Nn("Animation","AnimationStart"),transitionrun:Nn("Transition","TransitionRun"),transitionstart:Nn("Transition","TransitionStart"),transitioncancel:Nn("Transition","TransitionCancel"),transitionend:Nn("Transition","TransitionEnd")},Cr={},hf={};Nl&&(hf=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);function Rn(e){if(Cr[e])return Cr[e];if(!sa[e])return e;var t=sa[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in hf)return Cr[e]=t[l];return e}var mf=Rn("animationend"),pf=Rn("animationiteration"),gf=Rn("animationstart"),M0=Rn("transitionrun"),U0=Rn("transitionstart"),H0=Rn("transitioncancel"),vf=Rn("transitionend"),yf=new Map,Or="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");Or.push("scrollEnd");function el(e,t){yf.set(e,t),Tn(t,[e])}var k0=0;function Rl(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=al.identifierPrefix;var l=k0++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function xf(e){if(e==null||typeof e=="string")return e;var t=null,l=Ra;if(l!==null)for(var n=0;n<l.length;n++){var a=e[l[n]];if(a!=null){if(a==="none")return"none";t=t==null?a:t+(" "+a)}}return t??e.default}function zl(e,t){return e=xf(e),t=xf(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Su=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Gt=[],ra=0,Ar=0;function ju(){for(var e=ra,t=Ar=ra=0;t<e;){var l=Gt[t];Gt[t++]=null;var n=Gt[t];Gt[t++]=null;var a=Gt[t];Gt[t++]=null;var u=Gt[t];if(Gt[t++]=null,n!==null&&a!==null){var d=n.pending;d===null?a.next=a:(a.next=d.next,d.next=a),n.pending=a}u!==0&&bf(l,a,u)}}function _u(e,t,l,n){Gt[ra++]=e,Gt[ra++]=t,Gt[ra++]=l,Gt[ra++]=n,Ar|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Dr(e,t,l,n){return _u(e,t,l,n),Eu(e)}function zn(e,t){return _u(e,null,null,t),Eu(e)}function bf(e,t,l){e.lanes|=l;var n=e.alternate;n!==null&&(n.lanes|=l);for(var a=!1,u=e.return;u!==null;)u.childLanes|=l,n=u.alternate,n!==null&&(n.childLanes|=l),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(a=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,a&&t!==null&&(a=31-Ot(l),e=u.hiddenUpdates,n=e[a],n===null?e[a]=[t]:n.push(t),t.lane=l|536870912),u):null}function Eu(e){if(50<Oi)throw Oi=0,hs=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ca={};function B0(e,t,l,n){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _t(e,t,l,n){return new B0(e,t,l,n)}function wr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Cl(e,t){var l=e.alternate;return l===null?(l=_t(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&1206910976,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Sf(e,t){e.flags&=1206910978;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Tu(e,t,l,n,a,u){var d=0;if(n=e,typeof n=="function")wr(n)&&(d=1);else if(typeof n=="string")d=fx(e,l,rl.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(n){case Pt:return e=_t(31,l,t,a),e.elementType=Pt,e.lanes=u,e;case Ie:return Cn(l.children,a,u,t);case ie:d=8,a|=24;break;case mt:return e=_t(12,l,t,a|2),e.elementType=mt,e.lanes=u,e;case te:return e=_t(13,l,t,a),e.elementType=te,e.lanes=u,e;case le:return e=_t(19,l,t,a),e.elementType=le,e.lanes=u,e;case jl:case _:return e=a|32,e=_t(30,l,t,e),e.elementType=_,e.lanes=u,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case Pe:d=10;break e;case pt:d=9;break e;case Y:d=11;break e;case we:d=14;break e;case _e:d=16,n=null;break e}d=29,l=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=_t(d,l,t,a),t.elementType=e,t.type=n,t.lanes=u,t}function Cn(e,t,l,n){return e=_t(7,e,n,t),e.lanes=l,e}function Mr(e,t,l){return e=_t(6,e,null,t),e.lanes=l,e}function jf(e){var t=_t(18,null,null,0);return t.stateNode=e,t}function Ur(e,t,l){return t=_t(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var _f=new WeakMap;function Qt(e,t){if(typeof e=="object"&&e!==null){var l=_f.get(e);return l!==void 0?l:(t={value:e,source:t,stack:gd(t)},_f.set(e,t),t)}return{value:e,source:t,stack:gd(t)}}var oa=[],da=0,Nu=null,ci=0,Xt=[],Zt=0,Zl=null,ol=1,dl="";function Ol(e,t){oa[da++]=ci,oa[da++]=Nu,Nu=e,ci=t}function Ef(e,t,l){Xt[Zt++]=ol,Xt[Zt++]=dl,Xt[Zt++]=Zl,Zl=e;var n=ol;e=dl;var a=32-Ot(n)-1;n&=~(1<<a),l+=1;var u=32-Ot(t)+a;if(30<u){var d=a-a%5;u=(n&(1<<d)-1).toString(32),n>>=d,a-=d,ol=1<<32-Ot(t)+a|l<<a|n,dl=u+e}else ol=1<<u|l<<a|n,dl=e}function Ru(e){e.return!==null&&(Ol(e,1),Ef(e,1,0))}function Hr(e){for(;e===Nu;)Nu=oa[--da],oa[da]=null,ci=oa[--da],oa[da]=null;for(;e===Zl;)Zl=Xt[--Zt],Xt[Zt]=null,dl=Xt[--Zt],Xt[Zt]=null,ol=Xt[--Zt],Xt[Zt]=null}function Tf(e,t){Xt[Zt++]=ol,Xt[Zt++]=dl,Xt[Zt++]=Zl,ol=t.id,dl=t.overflow,Zl=e}var tt=null,He=null,oe=!1,Kl=null,Kt=!1,kr=Error(o(519));function Jl(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw oi(Qt(t,e)),kr}function Nf(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[it]=e,t[jt]=n,l){case"dialog":fe("cancel",t),fe("close",t);break;case"iframe":case"object":case"embed":fe("load",t);break;case"video":case"audio":for(l=0;l<Di.length;l++)fe(Di[l],t);break;case"source":fe("error",t);break;case"img":case"image":case"link":fe("error",t),fe("load",t);break;case"details":fe("toggle",t);break;case"input":fe("invalid",t),kd(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":fe("invalid",t);break;case"textarea":fe("invalid",t),Ld(t,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||n.suppressHydrationWarning===!0||Zm(t.textContent,l)?(n.popover!=null&&(fe("beforetoggle",t),fe("toggle",t)),n.onScroll!=null&&fe("scroll",t),n.onScrollEnd!=null&&fe("scrollend",t),n.onClick!=null&&(t.onclick=cl),t=!0):t=!1,t||Jl(e,!0)}function zu(e){for(tt=e.return;tt;)switch(tt.tag){case 5:case 31:case 13:Kt=!1;return;case 27:case 3:Kt=!0;return;default:tt=tt.return}}function fa(e){if(e!==tt)return!1;if(!oe)return zu(e),oe=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||mo(e.type,e.memoizedProps)),l=!l),l&&He&&Jl(e),zu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));He=fp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));He=fp(e)}else t===27?(t=He,fn(e.type)?(e=_o,_o=null,He=e):He=t):He=tt?It(e.stateNode.nextSibling):null;return!0}function On(){He=tt=null,oe=!1}function Br(){var e=Kl;return e!==null&&(Nt===null?Nt=e:Nt.push.apply(Nt,e),Kl=null),e}function oi(e){Kl===null?Kl=[e]:Kl.push(e)}var Lr=sl(null),An=null,Al=null;function Il(e,t,l){Ue(Lr,t._currentValue),t._currentValue=l}function Dl(e){e._currentValue=Lr.current,at(Lr)}function Cu(e,t,l){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===l)break;e=e.return}}function qr(e,t,l,n){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var u=a.dependencies;if(u!==null){var d=a.child;u=u.firstContext;e:for(;u!==null;){var h=u;u=a;for(var y=0;y<t.length;y++)if(h.context===t[y]){u.lanes|=l,h=u.alternate,h!==null&&(h.lanes|=l),Cu(u.return,l,e),n||(d=null);break e}u=h.next}}else if(a.tag===18){if(d=a.return,d===null)throw Error(o(341));d.lanes|=l,u=d.alternate,u!==null&&(u.lanes|=l),Cu(d,l,e),d=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=l,d=a.alternate,d!==null&&(d.lanes|=l),Cu(a.return,l,e),d=a.child,d=d!==null?d.sibling:null):d=a.child;if(d!==null)d.return=a;else for(d=a;d!==null;){if(d===e){d=null;break}if(a=d.sibling,a!==null){a.return=d.return,d=a;break}d=d.return}a=d}}function Dn(e,t,l,n){e=null;for(var a=t,u=!1;a!==null;){if(!u){if((a.flags&524288)!==0)u=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var d=a.alternate;if(d===null)throw Error(o(387));if(d=d.memoizedProps,d!==null){var h=a.type;Dt(a.pendingProps.value,d.value)||(e!==null?e.push(h):e=[h])}}else if(a===lu.current){if(d=a.alternate,d===null)throw Error(o(387));d.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(ka):e=[ka])}a=a.return}return e!==null&&qr(t,e,l,n),t.flags|=262144,e!==null}function Ou(e){for(e=e.firstContext;e!==null;){if(!Dt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function wn(e){An=e,Al=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ut(e){return Rf(An,e)}function Au(e,t){return An===null&&wn(e),Rf(e,t)}function Rf(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Al===null){if(e===null)throw Error(o(308));Al=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Al=Al.next=t;return l}var L0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},q0=i.unstable_scheduleCallback,$0=i.unstable_NormalPriority,Xe={$$typeof:Pe,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $r(){return{controller:new L0,data:new Map,refCount:0}}function di(e){e.refCount--,e.refCount===0&&q0($0,function(){e.controller.abort()})}function zf(e,t){if((e.pendingLanes&4194048)!==0){var l=e.transitionTypes;for(l===null&&(l=e.transitionTypes=[]),e=0;e<t.length;e++){var n=t[e];l.indexOf(n)===-1&&l.push(n)}}}var fi=null;function Y0(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var hi=null,Yr=0,Mn=0,ha=null;function V0(e,t){if(hi===null){var l=hi=[];Yr=0,Mn=ao(),ha={status:"pending",value:void 0,then:function(n){l.push(n)}}}return Yr++,t.then(Cf,Cf),t}function Cf(){if(--Yr===0&&(fi=null,hi!==null)){ha!==null&&(ha.status="fulfilled");var e=hi;hi=null,Mn=0,ha=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function G0(e,t){var l=[],n={status:"pending",value:null,reason:null,then:function(a){l.push(a)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var a=0;a<l.length;a++)(0,l[a])(t)},function(a){for(n.status="rejected",n.reason=a,a=0;a<l.length;a++)(0,l[a])(void 0)}),n}var Of=K.S;K.S=function(e,t){if(jm=zt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&V0(e,t),fi!==null)for(var l=Aa;l!==null;)zf(l,fi),l=l.next;if(l=e.types,l!==null){for(var n=Aa;n!==null;)zf(n,l),n=n.next;if(Mn!==0){n=fi,n===null&&(n=fi=[]);for(var a=0;a<l.length;a++){var u=l[a];n.indexOf(u)===-1&&n.push(u)}}}Of!==null&&Of(e,t)};var Un=sl(null);function Vr(){var e=Un.current;return e!==null?e:Me.pooledCache}function Du(e,t){t===null?Ue(Un,Un.current):Ue(Un,t.pool)}function Af(){var e=Vr();return e===null?null:{parent:Xe._currentValue,pool:e}}var ma=Error(o(460)),Gr=Error(o(474)),wu=Error(o(542)),Mu={then:function(){}};function Df(e){return e=e.status,e==="fulfilled"||e==="rejected"}function wf(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(cl,cl),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uf(e),e===void 0&&!("reason"in t)?Error(o(600)):e;default:if(typeof t.status=="string")t.then(cl,cl);else{if(e=Me,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=n}},function(n){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uf(e),e}throw kn=t,ma}}function Hn(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(kn=l,ma):l}}var kn=null;function Mf(){if(kn===null)throw Error(o(459));var e=kn;return kn=null,e}function Uf(e){if(e===ma||e===wu)throw Error(o(483))}var pa=null,mi=0;function Uu(e){var t=mi;return mi+=1,pa===null&&(pa=[]),wf(pa,e,t)}function Fl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Hu(e,t){throw t.$$typeof===re?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Hf(e){function t(T,S){if(e){var C=T.deletions;C===null?(T.deletions=[S],T.flags|=16):C.push(S)}}function l(T,S){if(!e)return null;for(;S!==null;)t(T,S),S=S.sibling;return null}function n(T){for(var S=new Map;T!==null;)T.key===null?S.set(T.index,T):S.set(T.key,T),T=T.sibling;return S}function a(T,S){return T=Cl(T,S),T.index=0,T.sibling=null,T}function u(T,S,C){return T.index=C,e?(C=T.alternate,C!==null?(C=C.index,C<S?(T.flags|=2,S):C):(T.flags|=134217730,S)):(T.flags|=1048576,S)}function d(T){return e&&T.alternate===null&&(T.flags|=134217730),T}function h(T,S,C,D){return S===null||S.tag!==6?(S=Mr(C,T.mode,D),S.return=T,S):(S=a(S,C),S.return=T,S)}function y(T,S,C,D){var G=C.type;return G===Ie?(T=A(T,S,C.props.children,D,C.key),Fl(T,C),T):S!==null&&(S.elementType===G||typeof G=="object"&&G!==null&&G.$$typeof===_e&&Hn(G)===S.type)?(S=a(S,C.props),Fl(S,C),S.return=T,S):(S=Tu(C.type,C.key,C.props,null,T.mode,D),Fl(S,C),S.return=T,S)}function N(T,S,C,D){return S===null||S.tag!==4||S.stateNode.containerInfo!==C.containerInfo||S.stateNode.implementation!==C.implementation?(S=Ur(C,T.mode,D),S.return=T,S):(S=a(S,C.children||[]),S.return=T,S)}function A(T,S,C,D,G){return S===null||S.tag!==7?(S=Cn(C,T.mode,D,G),S.return=T,S):(S=a(S,C),S.return=T,S)}function w(T,S,C){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=Mr(""+S,T.mode,C),S.return=T,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case De:return C=Tu(S.type,S.key,S.props,null,T.mode,C),Fl(C,S),C.return=T,C;case ht:return S=Ur(S,T.mode,C),S.return=T,S;case _e:return S=Hn(S),w(T,S,C)}if(be(S)||F(S))return S=Cn(S,T.mode,C,null),S.return=T,S;if(typeof S.then=="function")return w(T,Uu(S),C);if(S.$$typeof===Pe)return w(T,Au(T,S),C);Hu(T,S)}return null}function E(T,S,C,D){var G=S!==null?S.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return G!==null?null:h(T,S,""+C,D);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case De:return C.key===G?y(T,S,C,D):null;case ht:return C.key===G?N(T,S,C,D):null;case _e:return C=Hn(C),E(T,S,C,D)}if(be(C)||F(C))return G!==null?null:A(T,S,C,D,null);if(typeof C.then=="function")return E(T,S,Uu(C),D);if(C.$$typeof===Pe)return E(T,S,Au(T,C),D);Hu(T,C)}return null}function O(T,S,C,D,G){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return T=T.get(C)||null,h(S,T,""+D,G);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case De:return T=T.get(D.key===null?C:D.key)||null,y(S,T,D,G);case ht:return T=T.get(D.key===null?C:D.key)||null,N(S,T,D,G);case _e:return D=Hn(D),O(T,S,C,D,G)}if(be(D)||F(D))return T=T.get(C)||null,A(S,T,D,G,null);if(typeof D.then=="function")return O(T,S,C,Uu(D),G);if(D.$$typeof===Pe)return O(T,S,C,Au(S,D),G);Hu(S,D)}return null}function q(T,S,C,D){for(var G=null,me=null,J=S,P=S=0,Je=null;J!==null&&P<C.length;P++){J.index>P?(Je=J,J=null):Je=J.sibling;var ge=E(T,J,C[P],D);if(ge===null){J===null&&(J=Je);break}e&&J&&ge.alternate===null&&t(T,J),S=u(ge,S,P),me===null?G=ge:me.sibling=ge,me=ge,J=Je}if(P===C.length)return l(T,J),oe&&Ol(T,P),G;if(J===null){for(;P<C.length;P++)J=w(T,C[P],D),J!==null&&(S=u(J,S,P),me===null?G=J:me.sibling=J,me=J);return oe&&Ol(T,P),G}for(J=n(J);P<C.length;P++)Je=O(J,T,P,C[P],D),Je!==null&&(e&&(ge=Je.alternate,ge!==null&&J.delete(ge.key===null?P:ge.key)),S=u(Je,S,P),me===null?G=Je:me.sibling=Je,me=Je);return e&&J.forEach(function(vn){return t(T,vn)}),oe&&Ol(T,P),G}function X(T,S,C,D){if(C==null)throw Error(o(151));for(var G=null,me=null,J=S,P=S=0,Je=null,ge=C.next();J!==null&&!ge.done;P++,ge=C.next()){J.index>P?(Je=J,J=null):Je=J.sibling;var vn=E(T,J,ge.value,D);if(vn===null){J===null&&(J=Je);break}e&&J&&vn.alternate===null&&t(T,J),S=u(vn,S,P),me===null?G=vn:me.sibling=vn,me=vn,J=Je}if(ge.done)return l(T,J),oe&&Ol(T,P),G;if(J===null){for(;!ge.done;P++,ge=C.next())ge=w(T,ge.value,D),ge!==null&&(S=u(ge,S,P),me===null?G=ge:me.sibling=ge,me=ge);return oe&&Ol(T,P),G}for(J=n(J);!ge.done;P++,ge=C.next())ge=O(J,T,P,ge.value,D),ge!==null&&(e&&(Je=ge.alternate,Je!==null&&J.delete(Je.key===null?P:Je.key)),S=u(ge,S,P),me===null?G=ge:me.sibling=ge,me=ge);return e&&J.forEach(function(Ex){return t(T,Ex)}),oe&&Ol(T,P),G}function se(T,S,C,D){if(typeof C=="object"&&C!==null&&C.type===Ie&&C.key===null&&C.props.ref===void 0&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case De:e:{for(var G=C.key;S!==null;){if(S.key===G){if(G=C.type,G===Ie){if(S.tag===7){l(T,S.sibling),D=a(S,C.props.children),Fl(D,C),D.return=T,T=D;break e}}else if(S.elementType===G||typeof G=="object"&&G!==null&&G.$$typeof===_e&&Hn(G)===S.type){l(T,S.sibling),D=a(S,C.props),Fl(D,C),D.return=T,T=D;break e}l(T,S);break}else t(T,S);S=S.sibling}C.type===Ie?(D=Cn(C.props.children,T.mode,D,C.key),Fl(D,C),D.return=T,T=D):(D=Tu(C.type,C.key,C.props,null,T.mode,D),Fl(D,C),D.return=T,T=D)}return d(T);case ht:e:{for(G=C.key;S!==null;){if(S.key===G)if(S.tag===4&&S.stateNode.containerInfo===C.containerInfo&&S.stateNode.implementation===C.implementation){l(T,S.sibling),D=a(S,C.children||[]),D.return=T,T=D;break e}else{l(T,S);break}else t(T,S);S=S.sibling}D=Ur(C,T.mode,D),D.return=T,T=D}return d(T);case _e:return C=Hn(C),se(T,S,C,D)}if(be(C))return q(T,S,C,D);if(F(C)){if(G=F(C),typeof G!="function")throw Error(o(150));return C=G.call(C),X(T,S,C,D)}if(typeof C.then=="function")return se(T,S,Uu(C),D);if(C.$$typeof===Pe)return se(T,S,Au(T,C),D);Hu(T,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,S!==null&&S.tag===6?(l(T,S.sibling),D=a(S,C),D.return=T,T=D):(l(T,S),D=Mr(C,T.mode,D),D.return=T,T=D),d(T)):l(T,S)}return function(T,S,C,D){try{mi=0;var G=se(T,S,C,D);return pa=null,G}catch(J){if(J===ma||J===wu)throw J;var me=_t(29,J,null,T.mode);return me.lanes=D,me.return=T,me}finally{}}}var Bn=Hf(!0),kf=Hf(!1),Wl=!1;function Qr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xr(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Pl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function en(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Se&2)!==0){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,t=Eu(e),bf(e,null,l),t}return _u(e,n,t,l),Eu(e)}function pi(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,_d(e,l)}}function Zr(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var d={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?a=u=d:u=u.next=d,l=l.next}while(l!==null);u===null?a=u=t:u=u.next=t}else a=u=t;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:u,shared:n.shared,callbacks:n.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Kr=!1;function gi(){if(Kr){var e=ha;if(e!==null)throw e}}function vi(e,t,l,n){Kr=!1;var a=e.updateQueue;Wl=!1;var u=a.firstBaseUpdate,d=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var y=h,N=y.next;y.next=null,d===null?u=N:d.next=N,d=y;var A=e.alternate;A!==null&&(A=A.updateQueue,h=A.lastBaseUpdate,h!==d&&(h===null?A.firstBaseUpdate=N:h.next=N,A.lastBaseUpdate=y))}if(u!==null){var w=a.baseState;d=0,A=N=y=null,h=u;do{var E=h.lane&-536870913,O=E!==h.lane;if(O?(he&E)===E:(n&E)===E){E!==0&&E===Mn&&(Kr=!0),A!==null&&(A=A.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var q=e,X=h;E=t;var se=l;switch(X.tag){case 1:if(q=X.payload,typeof q=="function"){w=q.call(se,w,E);break e}w=q;break e;case 3:q.flags=q.flags&-65537|128;case 0:if(q=X.payload,E=typeof q=="function"?q.call(se,w,E):q,E==null)break e;w=ee({},w,E);break e;case 2:Wl=!0}}E=h.callback,E!==null&&(e.flags|=64,O&&(e.flags|=8192),O=a.callbacks,O===null?a.callbacks=[E]:O.push(E))}else O={lane:E,tag:h.tag,payload:h.payload,callback:h.callback,next:null},A===null?(N=A=O,y=w):A=A.next=O,d|=E;if(h=h.next,h===null){if(h=a.shared.pending,h===null)break;O=h,h=O.next,O.next=null,a.lastBaseUpdate=O,a.shared.pending=null}}while(!0);A===null&&(y=w),a.baseState=y,a.firstBaseUpdate=N,a.lastBaseUpdate=A,u===null&&(a.shared.lanes=0),rn|=d,e.lanes=d,e.memoizedState=w}}function Bf(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Lf(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Bf(l[e],t)}var tn=sl(null),ku=sl(0);function qf(e,t){e=kl,Ue(ku,e),Ue(tn,t),kl=e|t.baseLanes}function Jr(){Ue(ku,kl),Ue(tn,tn.current)}function Ir(){kl=ku.current,at(tn),at(ku)}var st=sl(null),gt=null;function ln(e){var t=e.alternate;Ue(rt,rt.current&1),Ue(st,e),gt===null&&(t===null||tn.current!==null||t.memoizedState!==null)&&(gt=e)}function Fr(e){Ue(rt,rt.current),Ue(st,e),gt===null&&(gt=e)}function $f(e){e.tag===22?(Ue(rt,rt.current),Ue(st,e),gt===null&&(gt=e)):nn()}function nn(){Ue(rt,rt.current),Ue(st,st.current)}function wt(e){at(st),gt===e&&(gt=null),at(rt)}var rt=sl(0);function yi(e,t){Ue(st,st.current),Ue(rt,t)}function Wr(e){at(rt),at(st),gt===e&&(gt=null)}function Bu(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||So(l)||jo(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){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 wl=0,ue=null,Ae=null,Ze=null,Lu=!1,ga=!1,Ln=!1,qu=0,xi=0,va=null,Q0=0;function Ye(){throw Error(o(321))}function Pr(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Dt(e[l],t[l]))return!1;return!0}function ec(e,t,l,n,a,u){return wl=u,ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,K.H=e===null||e.memoizedState===null?Eh:Th,Ln=!1,u=l(n,a),Ln=!1,ga&&(u=Vf(t,l,n,a)),Yf(e),u}function Yf(e){K.H=Zu;var t=Ae!==null&&Ae.next!==null;if(wl=0,Ze=Ae=ue=null,Lu=!1,xi=0,va=null,t)throw Error(o(300));e===null||Ke||(e=e.dependencies,e!==null&&Ou(e)&&(Ke=!0))}function Vf(e,t,l,n){ue=e;var a=0;do{if(ga&&(va=null),xi=0,ga=!1,25<=a)throw Error(o(301));if(a+=1,Ze=Ae=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}K.H=P0,u=t(l,n)}while(ga);return u}function X0(){var e=K.H,t=e.useState()[0];return t=typeof t.then=="function"?bi(t):t,e=e.useState()[0],(Ae!==null?Ae.memoizedState:null)!==e&&(ue.flags|=1024),t}function tc(){var e=qu!==0;return qu=0,e}function lc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function nc(e){if(Lu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Lu=!1}wl=0,Ze=Ae=ue=null,ga=!1,xi=qu=0,va=null}function yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?ue.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function Ge(){if(Ae===null){var e=ue.alternate;e=e!==null?e.memoizedState:null}else e=Ae.next;var t=Ze===null?ue.memoizedState:Ze.next;if(t!==null)Ze=t,Ae=e;else{if(e===null)throw ue.alternate===null?Error(o(467)):Error(o(310));Ae=e,e={memoizedState:Ae.memoizedState,baseState:Ae.baseState,baseQueue:Ae.baseQueue,queue:Ae.queue,next:null},Ze===null?ue.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function $u(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bi(e){var t=xi;return xi+=1,va===null&&(va=[]),e=wf(va,e,t),t=ue,(Ze===null?t.memoizedState:Ze.next)===null&&(t=t.alternate,K.H=t===null||t.memoizedState===null?Eh:Th),e}function Yu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return bi(e);if(e.$$typeof===B)return;if(e.$$typeof===Pe)return ut(e)}throw Error(o(438,String(e)))}function ac(e){var t=null,l=ue.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var n=ue.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=$u(),ue.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),n=0;n<e;n++)l[n]=jn;return t.index++,l}function Ml(e,t){return typeof t=="function"?t(e):t}function Vu(e){var t=Ge();return ic(t,Ae,e)}function ic(e,t,l){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=l;var a=e.baseQueue,u=n.pending;if(u!==null){if(a!==null){var d=a.next;a.next=u.next,u.next=d}t.baseQueue=a=u,n.pending=null}if(u=e.baseState,a===null)e.memoizedState=u;else{t=a.next;var h=d=null,y=null,N=t,A=!1;do{var w=N.lane&-536870913;if(w!==N.lane?(he&w)===w:(wl&w)===w){var E=N.revertLane;if(E===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),w===Mn&&(A=!0);else if((wl&E)===E){N=N.next,E===Mn&&(A=!0);continue}else w={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},y===null?(h=y=w,d=u):y=y.next=w,ue.lanes|=E,rn|=E;w=N.action,Ln&&l(u,w),u=N.hasEagerState?N.eagerState:l(u,w)}else E={lane:w,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},y===null?(h=y=E,d=u):y=y.next=E,ue.lanes|=w,rn|=w;N=N.next}while(N!==null&&N!==t);if(y===null?d=u:y.next=h,!Dt(u,e.memoizedState)&&(Ke=!0,A&&(l=ha,l!==null)))throw l;e.memoizedState=u,e.baseState=d,e.baseQueue=y,n.lastRenderedState=u}return a===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function uc(e){var t=Ge(),l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=e;var n=l.dispatch,a=l.pending,u=t.memoizedState;if(a!==null){l.pending=null;var d=a=a.next;do u=e(u,d.action),d=d.next;while(d!==a);Dt(u,t.memoizedState)||(Ke=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),l.lastRenderedState=u}return[u,n]}function Gf(e,t,l){var n=ue,a=Ge(),u=oe;if(u){if(l===void 0)throw Error(o(407));l=l()}else l=t();var d=!Dt((Ae||a).memoizedState,l);if(d&&(a.memoizedState=l,Ke=!0),a=a.queue,cc(Zf.bind(null,n,a,e),[e]),e=a.getSnapshot!==t||d||Ze!==null&&(Ze.memoizedState.tag&1)!==0,ya(e?9:8,{destroy:void 0},Xf.bind(null,n,a,l,t),null),e){if(n.flags|=2048,Me===null)throw Error(o(349));u||(wl&127)!==0||Qf(n,t,l)}return l}function Qf(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ue.updateQueue,t===null?(t=$u(),ue.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Xf(e,t,l,n){t.value=l,t.getSnapshot=n,Kf(t)&&Jf(e)}function Zf(e,t,l){return l(function(){Kf(t)&&Jf(e)})}function Kf(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Dt(e,l)}catch{return!0}}function Jf(e){var t=zn(e,2);t!==null&&Rt(t,e,2)}function sc(e){var t=yt();if(typeof e=="function"){var l=e;if(e=l(),Ln){Gl(!0);try{l()}finally{Gl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:e},t}function If(e,t,l,n){return e.baseState=l,ic(e,Ae,typeof n=="function"?n:Ml)}function Z0(e,t,l,n,a){if(Xu(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){u.listeners.push(d)}};K.T!==null?l(!0):u.isTransition=!1,n(u),l=t.pending,l===null?(u.next=t.pending=u,Ff(t,u)):(u.next=l.next,t.pending=l.next=u)}}function Ff(e,t){var l=t.action,n=t.payload,a=e.state;if(t.isTransition){var u=K.T,d={};d.types=u!==null?u.types:null,K.T=d;try{var h=l(a,n),y=K.S;y!==null&&y(d,h),Wf(e,t,h)}catch(N){rc(e,t,N)}finally{u!==null&&d.types!==null&&(u.types=d.types),K.T=u}}else try{u=l(a,n),Wf(e,t,u)}catch(N){rc(e,t,N)}}function Wf(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){Pf(e,t,n)},function(n){return rc(e,t,n)}):Pf(e,t,l)}function Pf(e,t,l){t.status="fulfilled",t.value=l,eh(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Ff(e,l)))}function rc(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,eh(t),t=t.next;while(t!==n)}e.action=null}function eh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function th(e,t){return t}function lh(e,t){if(oe){var l=Me.formState;if(l!==null){e:{var n=ue;if(oe){if(He){t:{for(var a=He,u=Kt;a.nodeType!==8;){if(!u){a=null;break t}if(a=It(a.nextSibling),a===null){a=null;break t}}u=a.data,a=u==="F!"||u==="F"?a:null}if(a){He=It(a.nextSibling),n=a.data==="F!";break e}}Jl(n)}n=!1}n&&(t=l[0])}}return l=yt(),l.memoizedState=l.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:th,lastRenderedState:t},l.queue=n,l=Sh.bind(null,ue,n),n.dispatch=l,n=sc(!1),u=mc.bind(null,ue,!1,n.queue),n=yt(),a={state:t,dispatch:null,action:e,pending:null},n.queue=a,l=Z0.bind(null,ue,a,u,l),a.dispatch=l,n.memoizedState=e,[t,l,!1]}function nh(e){var t=Ge();return ah(t,Ae,e)}function ah(e,t,l){if(t=ic(e,t,th)[0],e=Vu(Ml)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=bi(t)}catch(d){throw d===ma?wu:d}else n=t;t=Ge();var a=t.queue,u=a.dispatch;return l!==t.memoizedState&&(ue.flags|=2048,ya(9,{destroy:void 0},K0.bind(null,a,l),null)),[n,u,e]}function K0(e,t){e.action=t}function ih(e){var t=Ge(),l=Ae;if(l!==null)return ah(t,l,e);Ge(),t=t.memoizedState,l=Ge();var n=l.queue.dispatch;return l.memoizedState=e,[t,n,!1]}function ya(e,t,l,n){return e={tag:e,create:l,deps:n,inst:t,next:null},t=ue.updateQueue,t===null&&(t=$u(),ue.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(n=l.next,l.next=e,e.next=n,t.lastEffect=e),e}function uh(){return Ge().memoizedState}function Gu(e,t,l,n){var a=yt();ue.flags|=e,a.memoizedState=ya(1|t,{destroy:void 0},l,n===void 0?null:n)}function Qu(e,t,l,n){var a=Ge();n=n===void 0?null:n;var u=a.memoizedState.inst;Ae!==null&&n!==null&&Pr(n,Ae.memoizedState.deps)?a.memoizedState=ya(t,u,l,n):(ue.flags|=e,a.memoizedState=ya(1|t,u,l,n))}function sh(e,t){Gu(8390656,8,e,t)}function cc(e,t){Qu(2048,8,e,t)}function J0(e){ue.flags|=4;var t=ue.updateQueue;if(t===null)t=$u(),ue.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function rh(e){var t=Ge().memoizedState;return J0({ref:t,nextImpl:e}),function(){if((Se&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function ch(e,t){return Qu(4,2,e,t)}function oh(e,t){return Qu(4,4,e,t)}function dh(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fh(e,t,l){l=l!=null?l.concat([e]):null,Qu(4,4,dh.bind(null,t,e),l)}function oc(){}function hh(e,t){var l=Ge();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&Pr(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function mh(e,t){var l=Ge();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&Pr(t,n[1]))return n[0];if(n=e(),Ln){Gl(!0);try{e()}finally{Gl(!1)}}return l.memoizedState=[n,t],n}function dc(e,t,l){return l===void 0||(wl&1073741824)!==0&&(he&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Em(),ue.lanes|=e,rn|=e,l)}function ph(e,t,l,n){return Dt(l,t)?l:tn.current!==null?(e=dc(e,l,n),Dt(e,t)||(Ke=!0),e):(wl&106)===0||(wl&1073741824)!==0&&(he&261930)===0?(Ke=!0,e.memoizedState=l):(e=Em(),ue.lanes|=e,rn|=e,t)}function gh(e,t,l,n,a){var u=ne.p;ne.p=u!==0&&8>u?u:8;var d=K.T,h={};h.types=d!==null?d.types:null,K.T=h,mc(e,!1,t,l);try{var y=a(),N=K.S;if(N!==null&&N(h,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){var A=G0(y,n);Si(e,t,A,kt(e))}else Si(e,t,n,kt(e))}catch(w){Si(e,t,{then:function(){},status:"rejected",reason:w},kt())}finally{ne.p=u,d!==null&&h.types!==null&&(d.types=h.types),K.T=d}}function I0(){}function fc(e,t,l,n){if(e.tag!==5)throw Error(o(476));var a=vh(e).queue;gh(e,a,t,_l,l===null?I0:function(){return yh(e),l(n)})}function vh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:_l,baseState:_l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:_l},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function yh(e){var t=vh(e);t.next===null&&(t=e.alternate.memoizedState),Si(e,t.next.queue,{},kt())}function hc(){return ut(ka)}function xh(){return Ge().memoizedState}function bh(){return Ge().memoizedState}function F0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=kt();e=Pl(l);var n=en(t,e,l);n!==null&&(Rt(n,t,l),pi(n,t,l)),t={cache:$r()},e.payload=t;return}t=t.return}}function W0(e,t,l){var n=kt();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Xu(e)?jh(t,l):(l=Dr(e,t,l,n),l!==null&&(Rt(l,e,n),_h(l,t,n)))}function Sh(e,t,l){var n=kt();Si(e,t,l,n)}function Si(e,t,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Xu(e))jh(t,a);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var d=t.lastRenderedState,h=u(d,l);if(a.hasEagerState=!0,a.eagerState=h,Dt(h,d))return _u(e,t,a,0),Me===null&&ju(),!1}catch{}finally{}if(l=Dr(e,t,a,n),l!==null)return Rt(l,e,n),_h(l,t,n),!0}return!1}function mc(e,t,l,n){if(n={lane:2,revertLane:ao(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Xu(e)){if(t)throw Error(o(479))}else t=Dr(e,l,n,2),t!==null&&Rt(t,e,2)}function Xu(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function jh(e,t){ga=Lu=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function _h(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,_d(e,l)}}var Zu={readContext:ut,use:Yu,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye,useEffectEvent:Ye},Eh={readContext:ut,use:Yu,useCallback:function(e,t){return yt().memoizedState=[e,t===void 0?null:t],e},useContext:ut,useEffect:sh,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Gu(4194308,4,dh.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Gu(4194308,4,e,t)},useInsertionEffect:function(e,t){Gu(4,2,e,t)},useMemo:function(e,t){var l=yt();t=t===void 0?null:t;var n=e();if(Ln){Gl(!0);try{e()}finally{Gl(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=yt();if(l!==void 0){var a=l(t);if(Ln){Gl(!0);try{l(t)}finally{Gl(!1)}}}else a=t;return n.memoizedState=n.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},n.queue=e,e=e.dispatch=W0.bind(null,ue,e),[n.memoizedState,e]},useRef:function(e){var t=yt();return e={current:e},t.memoizedState=e},useState:function(e){e=sc(e);var t=e.queue,l=Sh.bind(null,ue,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:oc,useDeferredValue:function(e,t){var l=yt();return dc(l,e,t)},useTransition:function(){var e=sc(!1);return e=gh.bind(null,ue,e.queue,!0,!1),yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=ue,a=yt();if(oe){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),Me===null)throw Error(o(349));(he&127)!==0||Qf(n,t,l)}a.memoizedState=l;var u={value:l,getSnapshot:t};return a.queue=u,sh(Zf.bind(null,n,u,e),[e]),n.flags|=2048,ya(9,{destroy:void 0},Xf.bind(null,n,u,l,t),null),l},useId:function(){var e=yt(),t=Me.identifierPrefix;if(oe){var l=dl,n=ol;l=(n&~(1<<32-Ot(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=qu++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Q0++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:hc,useFormState:lh,useActionState:lh,useOptimistic:function(e){var t=yt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=mc.bind(null,ue,!0,l),l.dispatch=t,[e,t]},useMemoCache:ac,useCacheRefresh:function(){return yt().memoizedState=F0.bind(null,ue)},useEffectEvent:function(e){var t=yt(),l={impl:e};return t.memoizedState=l,function(){if((Se&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},Th={readContext:ut,use:Yu,useCallback:hh,useContext:ut,useEffect:cc,useImperativeHandle:fh,useInsertionEffect:ch,useLayoutEffect:oh,useMemo:mh,useReducer:Vu,useRef:uh,useState:function(){return Vu(Ml)},useDebugValue:oc,useDeferredValue:function(e,t){var l=Ge();return ph(l,Ae.memoizedState,e,t)},useTransition:function(){var e=Vu(Ml)[0],t=Ge().memoizedState;return[typeof e=="boolean"?e:bi(e),t]},useSyncExternalStore:Gf,useId:xh,useHostTransitionStatus:hc,useFormState:nh,useActionState:nh,useOptimistic:function(e,t){var l=Ge();return If(l,Ae,e,t)},useMemoCache:ac,useCacheRefresh:bh,useEffectEvent:rh},P0={readContext:ut,use:Yu,useCallback:hh,useContext:ut,useEffect:cc,useImperativeHandle:fh,useInsertionEffect:ch,useLayoutEffect:oh,useMemo:mh,useReducer:uc,useRef:uh,useState:function(){return uc(Ml)},useDebugValue:oc,useDeferredValue:function(e,t){var l=Ge();return Ae===null?dc(l,e,t):ph(l,Ae.memoizedState,e,t)},useTransition:function(){var e=uc(Ml)[0],t=Ge().memoizedState;return[typeof e=="boolean"?e:bi(e),t]},useSyncExternalStore:Gf,useId:xh,useHostTransitionStatus:hc,useFormState:ih,useActionState:ih,useOptimistic:function(e,t){var l=Ge();return Ae!==null?If(l,Ae,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:ac,useCacheRefresh:bh,useEffectEvent:rh};function pc(e,t,l,n){t=e.memoizedState,l=l(n,t),l=l==null?t:ee({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var gc={enqueueSetState:function(e,t,l){e=e._reactInternals;var n=kt(),a=Pl(n);a.payload=t,l!=null&&(a.callback=l),t=en(e,a,n),t!==null&&(Rt(t,e,n),pi(t,e,n))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var n=kt(),a=Pl(n);a.tag=1,a.payload=t,l!=null&&(a.callback=l),t=en(e,a,n),t!==null&&(Rt(t,e,n),pi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=kt(),n=Pl(l);n.tag=2,t!=null&&(n.callback=t),t=en(e,n,l),t!==null&&(Rt(t,e,l),pi(t,e,l))}};function Nh(e,t,l,n,a,u,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,u,d):t.prototype&&t.prototype.isPureReactComponent?!si(l,n)||!si(a,u):!0}function Rh(e,t,l,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,n),t.state!==e&&gc.enqueueReplaceState(t,t.state,null)}function qn(e,t){var l=t;if("ref"in t){l={};for(var n in t)n!=="ref"&&(l[n]=t[n])}if(e=e.defaultProps){l===t&&(l=ee({},l));for(var a in e)l[a]===void 0&&(l[a]=e[a])}return l}function zh(e){Su(e)}function Ch(e){console.error(e)}function Oh(e){Su(e)}function Ku(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Ah(e,t,l){try{var n=e.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function vc(e,t,l){return l=Pl(l),l.tag=3,l.payload={element:null},l.callback=function(){Ku(e,t)},l}function Dh(e){return e=Pl(e),e.tag=3,e}function wh(e,t,l,n){var a=l.type.getDerivedStateFromError;if(typeof a=="function"){var u=n.value;e.payload=function(){return a(u)},e.callback=function(){Ah(t,l,n)}}var d=l.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Ah(t,l,n),typeof a!="function"&&(cn===null?cn=new Set([this]):cn.add(this));var h=n.stack;this.componentDidCatch(n.value,{componentStack:h!==null?h:""})})}function ey(e,t,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=l.alternate,t!==null&&Dn(t,l,a,!0),l=st.current,l!==null){switch(l.tag){case 31:case 13:case 19:return gt===null?ps():l.alternate===null&&Ve===0&&(Ve=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===Mu?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),to(e,n,a)),!1;case 22:return l.flags|=65536,n===Mu?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([n]):l.add(n)),to(e,n,a)),!1}throw Error(o(435,l.tag))}return to(e,n,a),ps(),!1}if(oe)return t=st.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,n!==kr&&(e=Error(o(422),{cause:n}),oi(Qt(e,l)))):(n!==kr&&(t=Error(o(423),{cause:n}),oi(Qt(t,l))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,n=Qt(n,l),a=vc(e.stateNode,n,a),Zr(e,a),Ve!==4&&(Ve=2)),!1;var u=Error(o(520),{cause:n});if(u=Qt(u,l),Ci===null?Ci=[u]:Ci.push(u),Ve!==4&&(Ve=2),t===null)return!0;n=Qt(n,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=a&-a,l.lanes|=e,e=vc(l.stateNode,n,e),Zr(l,e),!1;case 1:if(t=l.type,u=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(cn===null||!cn.has(u))))return l.flags|=65536,a&=-a,l.lanes|=a,a=Dh(a),wh(a,e,l,n),Zr(l,a),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var yc=Error(o(461)),Ke=!1;function Fe(e,t,l,n){t.child=e===null?kf(t,null,l,n):Bn(t,e.child,l,n)}function Mh(e,t,l,n,a){l=l.render;var u=t.ref;if("ref"in n){var d={};for(var h in n)h!=="ref"&&(d[h]=n[h])}else d=n;return wn(t),n=ec(e,t,l,d,u,a),h=tc(),e!==null&&!Ke?(lc(e,t,a),Ul(e,t,a)):(oe&&h&&Ru(t),t.flags|=1,Fe(e,t,n,a),t.child)}function Uh(e,t,l,n,a){if(e===null){var u=l.type;return typeof u=="function"&&!wr(u)&&u.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=u,Hh(e,t,u,n,a)):(e=Tu(l.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Nc(e,a)){var d=u.memoizedProps;if(l=l.compare,l=l!==null?l:si,l(d,n)&&e.ref===t.ref)return Ul(e,t,a)}return t.flags|=1,e=Cl(u,n),e.ref=t.ref,e.return=t,t.child=e}function Hh(e,t,l,n,a){if(e!==null){var u=e.memoizedProps;if(si(u,n)&&e.ref===t.ref)if(Ke=!1,t.pendingProps=n=u,Nc(e,a))(e.flags&131072)!==0&&(Ke=!0);else return t.lanes=e.lanes,Ul(e,t,a)}return xc(e,t,l,n,a)}function kh(e,t,l,n){var a=n.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|l:l,e!==null){for(n=t.child=e.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~u}else n=0,t.child=null;return Bh(e,t,u,l,n)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Du(t,u!==null?u.cachePool:null),u!==null?qf(t,u):Jr(),$f(t);else return n=t.lanes=536870912,Bh(e,t,u!==null?u.baseLanes|l:l,l,n)}else u!==null?(Du(t,u.cachePool),qf(t,u),nn(),t.memoizedState=null):(e!==null&&Du(t,null),Jr(),nn());return Fe(e,t,a,l),t.child}function ji(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bh(e,t,l,n,a){var u=Vr();return u=u===null?null:{parent:Xe._currentValue,pool:u},t.memoizedState={baseLanes:l,cachePool:u},e!==null&&Du(t,null),Jr(),$f(t),e!==null&&Dn(e,t,n,!0),t.childLanes=a,null}function Ju(e,t){return t=Iu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Lh(e,t,l){return Bn(t,e.child,null,l),e=Ju(t,t.pendingProps),e.flags|=2,wt(t),t.memoizedState=null,e}function ty(e,t,l){var n=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(oe){if(n.mode==="hidden")return e=Ju(t,n),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},ji(null,e);if(Fr(t),(e=He)?(e=dp(e,Kt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zl!==null?{id:ol,overflow:dl}:null,retryLane:536870912,hydrationErrors:null},l=jf(e),l.return=t,t.child=l,tt=t,He=null)):e=null,e===null)throw Jl(t);return t.lanes=536870912,null}return Ju(t,n)}var u=e.memoizedState;if(u!==null){var d=u.dehydrated;if(Fr(t),a)if(t.flags&256)t.flags&=-257,t=Lh(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ke||Dn(e,t,l,!1),a=(l&e.childLanes)!==0,Ke||a){if(tn.current===null){if(n=Me,n!==null&&(d=Ed(n,l),d!==0&&d!==u.retryLane))throw u.retryLane=d,zn(e,d),Rt(n,e,d),yc;ps()}t=Lh(e,t,l)}else e=u.treeContext,He=It(d.nextSibling),tt=t,oe=!0,Kl=null,Kt=!1,e!==null&&Tf(t,e),t=Ju(t,n),t.flags|=134221824;return t}return e=Cl(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function xa(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(o(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function xc(e,t,l,n,a){return wn(t),l=ec(e,t,l,n,void 0,a),n=tc(),e!==null&&!Ke?(lc(e,t,a),Ul(e,t,a)):(oe&&n&&Ru(t),t.flags|=1,Fe(e,t,l,a),t.child)}function qh(e,t,l,n,a,u){return wn(t),t.updateQueue=null,l=Vf(t,n,l,a),Yf(e),n=tc(),e!==null&&!Ke?(lc(e,t,u),Ul(e,t,u)):(oe&&n&&Ru(t),t.flags|=1,Fe(e,t,l,u),t.child)}function $h(e,t,l,n,a){if(wn(t),t.stateNode===null){var u=ca,d=l.contextType;typeof d=="object"&&d!==null&&(u=ut(d)),u=new l(n,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=gc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=n,u.state=t.memoizedState,u.refs={},Qr(t),d=l.contextType,u.context=typeof d=="object"&&d!==null?ut(d):ca,u.state=t.memoizedState,d=l.getDerivedStateFromProps,typeof d=="function"&&(pc(t,l,d,n),u.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(d=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),d!==u.state&&gc.enqueueReplaceState(u,u.state,null),vi(t,n,u,a),gi(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){u=t.stateNode;var h=t.memoizedProps,y=qn(l,h);u.props=y;var N=u.context,A=l.contextType;d=ca,typeof A=="object"&&A!==null&&(d=ut(A));var w=l.getDerivedStateFromProps;A=typeof w=="function"||typeof u.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,A||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h||N!==d)&&Rh(t,u,n,d),Wl=!1;var E=t.memoizedState;u.state=E,vi(t,n,u,a),gi(),N=t.memoizedState,h||E!==N||Wl?(typeof w=="function"&&(pc(t,l,w,n),N=t.memoizedState),(y=Wl||Nh(t,l,y,n,E,N,d))?(A||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=N),u.props=n,u.state=N,u.context=d,n=y):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{u=t.stateNode,Xr(e,t),d=t.memoizedProps,A=qn(l,d),u.props=A,w=t.pendingProps,E=u.context,N=l.contextType,y=ca,typeof N=="object"&&N!==null&&(y=ut(N)),h=l.getDerivedStateFromProps,(N=typeof h=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(d!==w||E!==y)&&Rh(t,u,n,y),Wl=!1,E=t.memoizedState,u.state=E,vi(t,n,u,a),gi();var O=t.memoizedState;d!==w||E!==O||Wl||e!==null&&e.dependencies!==null&&Ou(e.dependencies)?(typeof h=="function"&&(pc(t,l,h,n),O=t.memoizedState),(A=Wl||Nh(t,l,A,n,E,O,y)||e!==null&&e.dependencies!==null&&Ou(e.dependencies))?(N||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(n,O,y),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,O,y)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&E===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&E===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=O),u.props=n,u.state=O,u.context=y,n=A):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&E===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&E===e.memoizedState||(t.flags|=1024),n=!1)}return u=n,xa(e,t),n=(t.flags&128)!==0,u||n?(u=t.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&n?(t.child=Bn(t,e.child,null,a),t.child=Bn(t,null,l,a)):Fe(e,t,l,a),t.memoizedState=u.state,e=t.child):e=Ul(e,t,a),e}function Yh(e,t,l,n){return On(),t.flags|=256,Fe(e,t,l,n),t.child}var bc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Sc(e){return{baseLanes:e,cachePool:Af()}}function jc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ht),e}function Vh(e,t,l){var n=t.pendingProps,a=!1,u=(t.flags&128)!==0,d;if((d=u)||(d=e!==null&&e.memoizedState===null?!1:(rt.current&2)!==0),d&&(a=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(oe){if(a?ln(t):nn(),(e=He)?(e=dp(e,Kt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zl!==null?{id:ol,overflow:dl}:null,retryLane:536870912,hydrationErrors:null},l=jf(e),l.return=t,t.child=l,tt=t,He=null)):e=null,e===null)throw Jl(t);return jo(e)?t.lanes=32:t.lanes=536870912,null}return u=n.children,n=n.fallback,a?(nn(),a=t.mode,u=Iu({mode:"hidden",children:u},a),n=Cn(n,a,l,null),u.return=t,n.return=t,u.sibling=n,t.child=u,n=t.child,n.memoizedState=Sc(l),n.childLanes=jc(e,d,l),t.memoizedState=bc,ji(null,n)):(ln(t),_c(t,u))}var h=e.memoizedState;if(h!==null){var y=h.dehydrated;if(y!==null)return ly(e,t,u,d,n,y,h,l)}return a?(nn(),a=n.fallback,u=t.mode,h=e.child,y=h.sibling,n=Cl(h,{mode:"hidden",children:n.children}),n.subtreeFlags=h.subtreeFlags&1206910976,y!==null?a=Cl(y,a):(a=Cn(a,u,l,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,ji(null,n),n=t.child,a=e.child.memoizedState,a===null?a=Sc(l):(u=a.cachePool,u!==null?(h=Xe._currentValue,u=u.parent!==h?{parent:h,pool:h}:u):u=Af(),a={baseLanes:a.baseLanes|l,cachePool:u}),n.memoizedState=a,n.childLanes=jc(e,d,l),t.memoizedState=bc,ji(e.child,n)):(ln(t),l=e.child,e=l.sibling,l=Cl(l,{mode:"visible",children:n.children}),l.return=t,l.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=l,t.memoizedState=null,l)}function _c(e,t){return t=Iu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Iu(e,t){return e=_t(22,e,null,t),e.lanes=0,e}function Fu(e,t,l){return Bn(t,e.child,null,l),e=_c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ly(e,t,l,n,a,u,d,h){if(l)return t.flags&256?(ln(t),t.flags&=-257,Fu(e,t,h)):t.memoizedState!==null?(nn(),t.child=e.child,t.flags|=128,null):(nn(),u=a.fallback,d=t.mode,a=Iu({mode:"visible",children:a.children},d),u=Cn(u,d,h,null),u.flags|=2,a.return=t,u.return=t,a.sibling=u,t.child=a,Bn(t,e.child,null,h),a=t.child,a.memoizedState=Sc(h),a.childLanes=jc(e,n,h),t.memoizedState=bc,ji(null,a));if(ln(t),jo(u)){if(n=u.nextSibling&&u.nextSibling.dataset,n)var y=n.dgst;return n=y,n!==""&&(a=Error(o(419)),a.stack="",a.digest=n,oi({value:a,source:null,stack:null})),Fu(e,t,h)}if(Ke||Dn(e,t,h,!1),n=(h&e.childLanes)!==0,Ke||n){if(tn.current!==null)return Fu(e,t,h);if(n=Me,n!==null&&(a=Ed(n,h),a!==0&&a!==d.retryLane))throw d.retryLane=a,zn(e,a),Rt(n,e,a),yc;return So(u)||ps(),Fu(e,t,h)}return So(u)?(t.flags|=192,t.child=e.child,null):(e=d.treeContext,He=It(u.nextSibling),tt=t,oe=!0,Kl=null,Kt=!1,e!==null&&Tf(t,e),t=_c(t,a.children),t.flags|=134221824,t)}function Gh(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Cu(e.return,t,l)}function Qh(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&Bu(l)===null&&(t=e),e=e.sibling}return t}function Wu(e,t,l,n,a,u){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:a,treeForkCount:u}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=n,d.tail=l,d.tailMode=a,d.treeForkCount=u)}function Ec(e){var t=e.child;for(e.child=null;t!==null;){var l=t.sibling;t.sibling=e.child,e.child=t,t=l}}function Tc(e,t,l){var n=t.pendingProps,a=n.revealOrder,u=n.tail;n=n.children;var d=rt.current;if(t.flags&128)return yi(t,d),null;var h=(d&2)!==0;if(h?(d=d&1|2,t.flags|=128):d&=1,yi(t,d),a==="backwards"&&e!==null?(Ec(e),Fe(e,t,n,l),Ec(e)):Fe(e,t,n,l),n=oe?ci:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gh(e,l,t);else if(e.tag===19)Gh(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"backwards":l=Qh(t.child),l===null?(a=t.child,t.child=null):(a=l.sibling,l.sibling=null,Ec(t)),Wu(t,!0,a,null,u,n);break;case"unstable_legacy-backwards":for(l=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Bu(e)===null){t.child=a;break}e=a.sibling,a.sibling=l,l=a,a=e}Wu(t,!0,l,null,u,n);break;case"together":Wu(t,!1,null,null,void 0,n);break;case"independent":t.memoizedState=null;break;default:l=Qh(t.child),l===null?(a=t.child,t.child=null):(a=l.sibling,l.sibling=null),Wu(t,!1,a,l,u,n)}return t.child}function Xh(e,t,l){var n=t.pendingProps;return Il(t,t.type,n.value),Fe(e,t,n.children,l),t.child}function Ul(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),rn|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Dn(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,l=Cl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Cl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Nc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ou(e)))}function ny(e,t,l){switch(t.tag){case 3:nu(t,t.stateNode.containerInfo),Il(t,Xe,e.memoizedState.cache),On();break;case 27:case 5:Ps(t);break;case 4:nu(t,t.stateNode.containerInfo);break;case 10:Il(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Fr(t),null;break;case 13:var n=t.memoizedState;if(n!==null){if(n.dehydrated!==null)return ln(t),t.flags|=128,null;n=Dn(e,t,l,!1);var a=t.child.childLanes;return n||(l&a)!==0?Vh(e,t,l):(ln(t),e=Ul(e,t,l),e!==null?e.sibling:null)}ln(t);break;case 19:if(t.flags&128)return Tc(e,t,l);if(a=(e.flags&128)!==0,n=(l&t.childLanes)!==0,n||(Dn(e,t,l,!1),n=(l&t.childLanes)!==0),a){if(n)return Tc(e,t,l);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),yi(t,rt.current),n)break;return null;case 22:return t.lanes=0,kh(e,t,l,t.pendingProps);case 24:Il(t,Xe,e.memoizedState.cache)}return Ul(e,t,l)}function Zh(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ke=!0;else{if(!Nc(e,l)&&(t.flags&128)===0)return Ke=!1,ny(e,t,l);Ke=(e.flags&131072)!==0}else Ke=!1,oe&&(t.flags&1048576)!==0&&Ef(t,ci,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Hn(t.elementType),t.type=e,typeof e=="function")wr(e)?(n=qn(e,n),t.tag=1,t=$h(null,t,e,n,l)):(t.tag=0,t=xc(null,t,e,n,l));else{if(e!=null){var a=e.$$typeof;if(a===Y){t.tag=11,t=Mh(null,t,e,n,l);break e}else if(a===we){t.tag=14,t=Uh(null,t,e,n,l);break e}else if(a===Pe){t.tag=10,t.type=e,t=Xh(null,t,l);break e}}throw t=ye(e)||e,Error(o(306,t,""))}}return t;case 0:return xc(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,a=qn(n,t.pendingProps),$h(e,t,n,a,l);case 3:e:{if(nu(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var u=t.memoizedState;a=u.element,Xr(e,t),vi(t,n,null,l);var d=t.memoizedState;if(n=d.cache,Il(t,Xe,n),n!==u.cache&&qr(t,[Xe],l,!0),gi(),n=d.element,u.isDehydrated)if(u={element:n,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Yh(e,t,n,l);break e}else if(n!==a){a=Qt(Error(o(424)),t),oi(a),t=Yh(e,t,n,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(He=It(e.firstChild),tt=t,oe=!0,Kl=null,Kt=!0,l=kf(t,null,n,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(On(),n===a){t=Ul(e,t,l);break e}Fe(e,t,n,l)}t=t.child}return t;case 26:return xa(e,t),e===null?(l=yp(t.type,null,t.pendingProps,null))?t.memoizedState=l:oe||(t.stateNode=Fm(t.type,t.pendingProps,Yl.current,t)):t.memoizedState=yp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ps(t),e===null&&oe&&(n=t.stateNode=mp(t.type,t.pendingProps,Yl.current),tt=t,Kt=!0,a=He,fn(t.type)?(_o=a,He=It(n.firstChild)):He=a),Fe(e,t,t.pendingProps.children,l),xa(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&oe&&((a=n=He)&&(n=Fy(n,t.type,t.pendingProps,Kt),n!==null?(t.stateNode=n,tt=t,He=It(n.firstChild),Kt=!1,a=!0):a=!1),a||Jl(t)),Ps(t),a=t.type,u=t.pendingProps,d=e!==null?e.memoizedProps:null,n=u.children,mo(a,u)?n=null:d!==null&&mo(a,d)&&(t.flags|=32),t.memoizedState!==null&&(a=ec(e,t,X0,null,null,l),ka._currentValue=a),xa(e,t),Fe(e,t,n,l),t.child;case 6:return e===null&&oe&&((e=l=He)&&(l=Wy(l,t.pendingProps,Kt),l!==null?(t.stateNode=l,tt=t,He=null,e=!0):e=!1),e||Jl(t)),null;case 13:return Vh(e,t,l);case 4:return nu(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Bn(t,null,n,l):Fe(e,t,n,l),t.child;case 11:return Mh(e,t,t.type,t.pendingProps,l);case 7:return n=t.pendingProps,xa(e,t),Fe(e,t,n,l),t.child;case 8:return Fe(e,t,t.pendingProps.children,l),t.child;case 12:return Fe(e,t,t.pendingProps.children,l),t.child;case 10:return Xh(e,t,l);case 9:return a=t.type._context,n=t.pendingProps.children,wn(t),a=ut(a),n=n(a),t.flags|=1,Fe(e,t,n,l),t.child;case 14:return Uh(e,t,t.type,t.pendingProps,l);case 15:return Hh(e,t,t.type,t.pendingProps,l);case 19:return Tc(e,t,l);case 31:return ty(e,t,l);case 22:return kh(e,t,l,t.pendingProps);case 24:return wn(t),n=ut(Xe),e===null?(a=Vr(),a===null&&(a=Me,u=$r(),a.pooledCache=u,u.refCount++,u!==null&&(a.pooledCacheLanes|=l),a=u),t.memoizedState={parent:n,cache:a},Qr(t),Il(t,Xe,a)):((e.lanes&l)!==0&&(Xr(e,t),vi(t,null,null,l),gi()),a=e.memoizedState,u=t.memoizedState,a.parent!==n?(a={parent:n,cache:n},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Il(t,Xe,n)):(n=u.cache,Il(t,Xe,n),n!==a.cache&&qr(t,[Xe],l,!0))),Fe(e,t,t.pendingProps.children,l),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),n=t.pendingProps,n.name!=null&&n.name!=="auto"?t.flags|=e===null?18882560:18874368:oe&&Ru(t),e!==null&&e.memoizedProps.name!==n.name?t.flags|=4194816:xa(e,t),Fe(e,t,n.children,l),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Hl(e){e.flags|=4}function Rc(e,t,l,n,a){var u;if((u=(e.mode&32)!==0)&&(u=l===null?jp(t,n):jp(t,n)&&(n.src!==l.src||n.srcSet!==l.srcSet)),u){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(zm())e.flags|=8192;else throw kn=Mu,Gr}else e.flags&=-16777217}function Kh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!_p(t))if(zm())e.flags|=8192;else throw kn=Mu,Gr}function Pu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Sd():536870912,e.lanes|=t,Ea|=t)}function _i(e,t){if(!oe)switch(e.tailMode){case"visible":break;case"collapsed":for(var l=e.tail,n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null;break;default:for(t=e.tail,l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null}}function ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,n=0;if(t)for(var a=e.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags&1206910976,n|=a.flags&1206910976,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=l,t}function ay(e,t,l){var n=t.pendingProps;switch(Hr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ke(t),null;case 1:return ke(t),null;case 3:return l=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Dl(Xe),In(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(fa(t)?Hl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Br())),ke(t),null;case 26:var a=t.type,u=t.memoizedState;return e===null?(Hl(t),u!==null?(ke(t),Kh(t,u)):(ke(t),Rc(t,a,null,n,l))):u?u!==e.memoizedState?(Hl(t),ke(t),Kh(t,u)):(ke(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Hl(t),ke(t),Rc(t,a,e,n,l)),null;case 27:if(au(t),l=Yl.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Hl(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return ke(t),t.subtreeFlags&=-33554433,null}e=rl.current,fa(t)?Nf(t):(e=mp(a,n,l),t.stateNode=e,Hl(t))}return ke(t),t.subtreeFlags&=-33554433,null;case 5:if(au(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Hl(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return ke(t),t.subtreeFlags&=-33554433,null}if(u=rl.current,fa(t))Nf(t);else{var d=Mi(Yl.current);switch(u){case 1:u=d.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:u=d.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":u=d.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":u=d.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":u=d.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof n.is=="string"?d.createElement("select",{is:n.is}):d.createElement("select"),n.multiple?u.multiple=!0:n.size&&(u.size=n.size);break;default:u=typeof n.is=="string"?d.createElement(a,{is:n.is}):d.createElement(a)}}u[it]=t,u[jt]=n;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)u.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=u;e:switch(ot(u,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Hl(t)}}return ke(t),t.subtreeFlags&=-33554433,Rc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Hl(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=Yl.current,fa(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,a=tt,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}e[it]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||Zm(e.nodeValue,l)),e||Jl(t,!0)}else e=Mi(e).createTextNode(n),e[it]=t,t.stateNode=e}return ke(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=fa(t),l!==null){if(e===null){if(!n)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[it]=t}else On(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ke(t),e=!1}else l=Br(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(wt(t),t):(wt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ke(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=fa(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(o(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(317));a[it]=t}else On(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ke(t),a=!1}else a=Br(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(wt(t),t):(wt(t),null)}return wt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==a&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Pu(t,t.updateQueue),ke(t),null);case 4:return In(),e===null&&ro(t.stateNode.containerInfo),t.flags|=67108864,ke(t),null;case 10:return Dl(t.type),ke(t),null;case 19:if(Wr(t),n=t.memoizedState,n===null)return ke(t),null;if(a=(t.flags&128)!==0,u=n.rendering,u===null)if(a)_i(n,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Bu(e),u!==null){for(t.flags|=128,_i(n,!1),e=u.updateQueue,t.updateQueue=e,Pu(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Sf(l,e),l=l.sibling;return yi(t,rt.current&1|2),oe&&Ol(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&zt()>ds&&(t.flags|=128,a=!0,_i(n,!1),t.lanes=4194304)}else{if(!a)if(e=Bu(u),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Pu(t,e),_i(n,!0),n.tail===null&&n.tailMode!=="collapsed"&&n.tailMode!=="visible"&&!u.alternate&&!oe)return ke(t),null}else 2*zt()-n.renderingStartTime>ds&&l!==536870912&&(t.flags|=128,a=!0,_i(n,!1),t.lanes=4194304);n.isBackwards?(u.sibling=t.child,t.child=u):(e=n.last,e!==null?e.sibling=u:t.child=u,n.last=u)}if(n.tail!==null){e=n.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return n.rendering=e,n.tail=e.sibling,n.renderingStartTime=zt(),e.sibling=null,u=rt.current,u=a?u&1|2:u&1,n.tailMode==="visible"||n.tailMode==="collapsed"||!l||oe?yi(t,u):(l=u,Ue(st,t),Ue(rt,l),gt===null&&(gt=t)),oe&&Ol(t,n.treeForkCount),e}return ke(t),null;case 22:case 23:return wt(t),Ir(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(l&536870912)!==0&&(t.flags&128)===0&&(ke(t),t.subtreeFlags&6&&(t.flags|=8192)):ke(t),l=t.updateQueue,l!==null&&Pu(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==l&&(t.flags|=2048),e!==null&&at(Un),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Dl(Xe),ke(t),null;case 25:return null;case 30:return t.flags|=33554432,ke(t),null}throw Error(o(156,t.tag))}function iy(e,t){switch(Hr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Dl(Xe),In(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return au(t),null;case 31:if(t.memoizedState!==null){if(wt(t),t.alternate===null)throw Error(o(340));On()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));On()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Wr(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return In(),null;case 10:return Dl(t.type),null;case 22:case 23:return wt(t),Ir(),e!==null&&at(Un),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Dl(Xe),null;case 25:return null;default:return null}}function Jh(e,t){switch(Hr(t),t.tag){case 3:Dl(Xe),In();break;case 26:case 27:case 5:au(t);break;case 4:In();break;case 31:t.memoizedState!==null&&wt(t);break;case 13:wt(t);break;case 19:Wr(t);break;case 10:Dl(t.type);break;case 22:case 23:wt(t),Ir(),e!==null&&at(Un);break;case 24:Dl(Xe)}}function Ei(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&e)===e){n=void 0;var u=l.create,d=l.inst;n=u(),d.destroy=n}l=l.next}while(l!==a)}}catch(h){Re(t,t.return,h)}}function an(e,t,l){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var u=a.next;n=u;do{if((n.tag&e)===e){var d=n.inst,h=d.destroy;if(h!==void 0){d.destroy=void 0,a=t;var y=l,N=h;try{N()}catch(A){Re(a,y,A)}}}n=n.next}while(n!==u)}}catch(A){Re(t,t.return,A)}}function Ih(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Lf(t,l)}catch(n){Re(e,e.return,n)}}}function Fh(e,t,l){l.props=qn(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){Re(e,t,n)}}function fl(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:var a=e.stateNode,u=Rl(e.memoizedProps,a);(a.ref===null||a.ref.name!==u)&&(a.ref=ap(u)),n=a.ref;break;case 7:if(e.stateNode===null){var d=new Bt(e);v(e.child,!1,Jy,d,void 0,void 0),e.stateNode=d}n=e.stateNode;break;default:n=e.stateNode}typeof l=="function"?e.refCleanup=l(n):l.current=n}}catch(h){Re(e,t,h)}}function ct(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){Re(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){Re(e,t,a)}else l.current=null}function es(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l<t.length;l++)op(e.stateNode,t[l])}function Wh(e){for(var t=e.return;t!==null&&(Cc(t)&&op(e.stateNode,t.stateNode),!zc(t));)t=t.return}function Ti(e){for(var t=e.return;t!==null&&(Cc(t)&&Iy(e.stateNode,t.stateNode),!zc(t));)t=t.return}function zc(e){return e.tag===5||e.tag===3||e.tag===27}function Cc(e){return e&&e.tag===7&&e.stateNode!==null}function Oc(e){var t=e.type,l=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break e;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(a){Re(e,e.return,a)}}function Ac(e,t,l){try{var n=e.stateNode;Ay(n,e.type,l,t),n[jt]=t}catch(a){Re(e,e.return,a)}}function Ph(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&fn(e.type)||e.tag===4}function Dc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ph(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&fn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function wc(e,t,l,n){var a=e.tag;if(a===5||a===6)a=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(a,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(a),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=cl)),es(e,n),xe=!0;else if(a!==4&&(a===27&&(es(e,n),n=null,fn(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(wc(e,t,l,n),e=e.sibling;e!==null;)wc(e,t,l,n),e=e.sibling}function ts(e,t,l,n){var a=e.tag;if(a===5||a===6)a=e.stateNode,t?l.insertBefore(a,t):l.appendChild(a),es(e,n),xe=!0;else if(a!==4&&(a===27&&(es(e,n),n=null,fn(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(ts(e,t,l,n),e=e.sibling;e!==null;)ts(e,t,l,n),e=e.sibling}function em(e){var t=e.stateNode,l=e.memoizedProps;try{for(var n=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);ot(t,n,l),t[it]=e,t[jt]=l}catch(u){Re(e,e.return,u)}}var ls=!1,Mt=null;function tm(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(ls=!0)}var hl=null;function lm(){var e=hl;return hl=null,e}var Et=0;function ba(e,t,l,n,a){return Et=0,nm(e.child,t,l,n,a)}function nm(e,t,l,n,a){for(var u=!1;e!==null;){if(e.tag===5){var d=e.stateNode;if(n!==null){var h=vo(d);n.push(h),h.view&&(u=!0)}else u||vo(d).view&&(u=!0);ls=!0,lp(d,Et===0?t:t+"_"+Et,l),Et++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&a||nm(e.child,t,l,n,a)&&(u=!0));e=e.sibling}return u}function ml(e,t){for(;e!==null;)e.tag===5?np(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||ml(e.child,t)),e=e.sibling}function ns(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(ns(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(o(544));var l=t.name;t=zl(t.default,t.share),t!=="none"&&(ba(e,l,t,null,!1)||ml(e.child,!1))}e=e.sibling}}function Mc(e,t){if(e.tag===30){var l=e.stateNode,n=e.memoizedProps,a=Rl(n,l),u=zl(n.default,l.paired?n.share:n.enter);u!=="none"?ba(e,a,u,null,!1)?(ns(e),l.paired||t||za(e,n.onEnter)):ml(e.child,!1):ns(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Mc(e,t),e=e.sibling;else ns(e)}function Uc(e){if(Mt!==null&&Mt.size!==0){var t=Mt;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var l=e.memoizedProps,n=l.name;if(n!=null&&n!=="auto"){var a=t.get(n);if(a!==void 0){var u=zl(l.default,l.share);if(u!=="none"&&(ba(e,n,u,null,!1)?(u=e.stateNode,a.paired=u,u.paired=a,za(e,l.onShare)):ml(e.child,!1)),t.delete(n),t.size===0)break}}}Uc(e)}e=e.sibling}}}function Hc(e){if(e.tag===30){var t=e.memoizedProps,l=Rl(t,e.stateNode),n=Mt!==null?Mt.get(l):void 0,a=zl(t.default,n!==void 0?t.share:t.exit);a!=="none"&&(ba(e,l,a,null,!1)?n!==void 0?(a=e.stateNode,n.paired=a,a.paired=n,Mt.delete(l),za(e,t.onShare)):za(e,t.onExit):ml(e.child,!1)),Mt!==null&&Uc(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Hc(e),e=e.sibling;else Mt!==null&&Uc(e)}function am(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,l=Rl(t,e.stateNode);t=zl(t.default,t.update),e.flags&=-5,t!=="none"&&ba(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&am(e);e=e.sibling}}function kc(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,ml(e.child,!1))}kc(e)}e=e.sibling}}function as(e){if(e.tag===30)e.stateNode.paired=null,ml(e.child,!1),kc(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)as(e),e=e.sibling;else kc(e)}function im(e){for(e=e.child;e!==null;)e.tag===30?ml(e.child,!1):(e.subtreeFlags&33554432)!==0&&im(e),e=e.sibling}function Bc(e,t,l,n,a,u,d){for(var h=!1;t!==null;){if(t.tag===5){var y=t.stateNode;if(u!==null&&Et<u.length){var N=u[Et],A=vo(y);(N.view||A.view)&&(h=!0);var w;if(w=(e.flags&4)===0)if(A.clip)w=!0;else{w=N.rect;var E=A.rect;w=w.y!==E.y||w.x!==E.x||w.height!==E.height||w.width!==E.width}w&&(e.flags|=4),A.abs?A=!N.abs:(N=N.rect,A=A.rect,A=N.height!==A.height||N.width!==A.width),A&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&lp(y,Et===0?l:l+"_"+Et,a),h&&(e.flags&4)!==0||(hl===null&&(hl=[]),hl.push(y,Et===0?n:n+"_"+Et,t.memoizedProps)),Et++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&d?e.flags|=t.flags&32:Bc(e,t.child,l,n,a,u,d)&&(h=!0));t=t.sibling}return h}function um(e,t){for(e=e.child;e!==null;){if(e.tag===30){var l=e.memoizedProps,n=e.stateNode,a=Rl(l,n),u=zl(l.default,l.update),d;d=e.memoizedState,e.memoizedState=null,n=e;var h=e.child;Et=0,a=Bc(n,h,a,a,u,d,!1),(e.flags&4)!==0&&a&&za(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&um(e);e=e.sibling}}var lt=!1,Ee=!1,pl=!1,Lc=!1,sm=typeof WeakSet=="function"?WeakSet:Set,nt=null,gl=!1,Ni=!1,is=!1,qc=!1;function uy(e,t,l){if(e=e.containerInfo,fo=Ba,e=df(e),Nr(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var u=a.anchorOffset,d=a.focusNode;a=a.focusOffset;try{n.nodeType,d.nodeType}catch{n=null;break e}var h=0,y=-1,N=-1,A=0,w=0,E=e,O=null;t:for(;;){for(var q;E!==n||u!==0&&E.nodeType!==3||(y=h+u),E!==d||a!==0&&E.nodeType!==3||(N=h+a),E.nodeType===3&&(h+=E.nodeValue.length),(q=E.firstChild)!==null;)O=E,E=q;for(;;){if(E===e)break t;if(O===n&&++A===u&&(y=h),O===d&&++w===a&&(N=h),(q=E.nextSibling)!==null)break;E=O,O=E.parentNode}E=q}n=y===-1||N===-1?null:{start:y,end:N}}else n=null}n=n||{start:0,end:0}}else n=null;for(ho={focusedElem:e,selectionRange:n},Ba=!1,l=(l&335544064)===l,nt=t,t=l?9270:1024;nt!==null;){if(e=nt,l&&(n=e.deletions,n!==null))for(u=0;u<n.length;u++)l&&Hc(n[u]);if(e.alternate===null&&(e.flags&2)!==0)l&&tm(e),us(l);else{if(e.tag===22){if(n=e.alternate,e.memoizedState!==null){n!==null&&n.memoizedState===null&&l&&Hc(n),us(l);continue}else if(n!==null&&n.memoizedState!==null){l&&tm(e),us(l);continue}}n=e.child,(e.subtreeFlags&t)!==0&&n!==null?(n.return=e,nt=n):(l&&am(e),us(l))}}Mt=null}function us(e){for(;nt!==null;){var t=nt,l=e,n=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((a&1024)!==0&&n!==null){l=void 0,a=n.memoizedProps,n=n.memoizedState;var u=t.stateNode;try{var d=qn(t.type,a);l=u.getSnapshotBeforeUpdate(d,n),u.__reactInternalSnapshotBeforeUpdate=l}catch(h){Re(t,t.return,h)}}break;case 3:if((a&1024)!==0){if(n=t.stateNode.containerInfo,l=n.nodeType,l===9)bo(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":bo(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&n!==null&&(l=Rl(n.memoizedProps,n.stateNode),a=t.memoizedProps,a=zl(a.default,a.update),a!=="none"&&ba(n,l,a,n.memoizedState=[],!0));break;default:if((a&1024)!==0)throw Error(o(163))}if(n=t.sibling,n!==null){n.return=t.return,nt=n;break}nt=t.return}}function rm(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:vl(e,l),n&4&&Ei(5,l);break;case 1:if(vl(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(d){Re(l,l.return,d)}else{var a=qn(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Re(l,l.return,d)}}n&64&&Ih(l),n&512&&fl(l,l.return);break;case 3:if(vl(e,l),n&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Lf(e,t)}catch(d){Re(l,l.return,d)}}break;case 27:t===null&&n&4&&em(l);case 26:case 5:vl(e,l),t===null&&n&4&&Oc(l),n&512&&fl(l,l.return);break;case 12:vl(e,l);break;case 31:vl(e,l),n&4&&fm(e,l);break;case 13:vl(e,l),n&4&&hm(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=yy.bind(null,l),Py(e,l))));break;case 22:if(n=l.memoizedState!==null||lt,!n){var u=t!==null&&t.memoizedState!==null||Ee;t=lt,a=Ee,lt=n,(Ee=u)&&!a?(n=2,(l.subtreeFlags&8772)!==0&&(n|=1),nl(e,l,n)):vl(e,l),lt=t,Ee=a}break;case 30:vl(e,l),n&512&&fl(l,l.return);break;case 7:n&512&&fl(l,l.return);default:vl(e,l)}}function $c(e,t){for(e=e.child;e!==null;)cm(e,t),e=e.sibling}function cm(e,t){switch(e.tag){case 5:case 26:try{var l=e.stateNode;if(t){var n=l.style;typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none"}else{var a=e.stateNode,u=e.memoizedProps.style,d=u!=null&&u.hasOwnProperty("display")?u.display:null;a.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(y){Re(e,e.return,y)}Yc(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,xe=!0}catch(y){Re(e,e.return,y)}break;case 18:try{var h=e.stateNode;t?tp(h,!0):tp(e.stateNode,!1)}catch(y){Re(e,e.return,y)}break;case 22:case 23:e.memoizedState===null&&$c(e,t);break;default:$c(e,t)}}function Yc(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,n=t;switch(l.tag){case 4:cm(l,n);break e;case 22:l.memoizedState===null&&Yc(l,n);break e;default:Yc(l,n)}}e=e.sibling}}function om(e){var t=e.alternate;t!==null&&(e.alternate=null,om(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&du(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Be=null,Tt=!1;function tl(e,t,l){for(l=l.child;l!==null;)dm(e,t,l),l=l.sibling}function dm(e,t,l){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(Ja,l)}catch{}switch(l.tag){case 26:Ee||ct(l,t),tl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Ee&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ee||ct(l,t),Ti(l);var n=Be,a=Tt;fn(l.type)&&(Be=l.stateNode,Tt=!1),tl(e,t,l),pp(l.stateNode,l.type,l.memoizedProps),Be=n,Tt=a;break;case 5:Ee||ct(l,t),Ti(l);case 6:if(l.tag===6&&Ti(l),n=Be,a=Tt,Be=null,tl(e,t,l),Be=n,Tt=a,Be!==null)if(Tt)try{(Be.nodeType===9?Be.body:Be.nodeName==="HTML"?Be.ownerDocument.body:Be).removeChild(l.stateNode),xe=!0}catch(u){Re(l,t,u)}else try{Be.removeChild(l.stateNode),xe=!0}catch(u){Re(l,t,u)}break;case 18:Be!==null&&(Tt?(e=Be,ep(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),La(e)):ep(Be,l.stateNode));break;case 4:n=Be,a=Tt,Be=l.stateNode.containerInfo,Tt=!0,tl(e,t,l),Be=n,Tt=a;break;case 0:case 11:case 14:case 15:an(2,l,t),Ee||an(4,l,t),tl(e,t,l);break;case 1:Ee||(ct(l,t),n=l.stateNode,typeof n.componentWillUnmount=="function"&&Fh(l,t,n)),tl(e,t,l);break;case 21:tl(e,t,l);break;case 22:Ee=(n=Ee)||l.memoizedState!==null,tl(e,t,l),Ee=n;break;case 30:ct(l,t),tl(e,t,l);break;case 7:Ee||ct(l,t),tl(e,t,l);break;default:tl(e,t,l)}}function fm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{La(e)}catch(l){Re(t,t.return,l)}}}function hm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{La(e)}catch(l){Re(t,t.return,l)}}function sy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new sm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new sm),t;default:throw Error(o(435,e.tag))}}function ss(e,t){var l=sy(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var a=xy.bind(null,e,n);n.then(a,a)}})}function xt(e,t,l){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var u=n[a],d=e,h=t,y=h;e:for(;y!==null;){switch(y.tag){case 27:if(fn(y.type)){Be=y.stateNode,Tt=!1;break e}break;case 5:Be=y.stateNode,Tt=!1;break e;case 3:case 4:Be=y.stateNode.containerInfo,Tt=!0;break e}y=y.return}if(Be===null)throw Error(o(160));dm(d,h,u),Be=null,Tt=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)mm(t,e,l),t=t.sibling}var ll=null;function mm(e,t,l){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(n=e.updateQueue,n=n!==null?n.events:null,n!==null))for(var u=0;u<n.length;u++){var d=n[u];d.ref.impl=d.nextImpl}xt(t,e,l),bt(e),a&4&&(an(3,e,e.return),Ei(3,e),an(5,e,e.return));break;case 1:xt(t,e,l),bt(e),a&512&&(Ee||n===null||ct(n,n.return)),a&64&<&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?t:l.concat(t))));break;case 26:if(u=ll,xt(t,e,l),bt(e),a&512&&(Ee||n===null||ct(n,n.return)),a&4)if(a=n!==null?n.memoizedState:null,l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null)if(lt)e.stateNode=Fm(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,l=e.memoizedProps,a=u.ownerDocument||u;t:switch(t){case"title":n=a.getElementsByTagName("title")[0],(!n||n[Wa]||n[it]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=a.createElement(t),a.head.insertBefore(n,a.querySelector("head > title"))),ot(n,t,l),n[it]=e,et(n),t=n;break e;case"link":if(u=Sp("link","href",a).get(t+(l.href||""))){for(d=0;d<u.length;d++)if(n=u[d],n.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&n.getAttribute("rel")===(l.rel==null?null:l.rel)&&n.getAttribute("title")===(l.title==null?null:l.title)&&n.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){u.splice(d,1);break t}}n=a.createElement(t),ot(n,t,l),a.head.appendChild(n);break;case"meta":if(u=Sp("meta","content",a).get(t+(l.content||""))){for(d=0;d<u.length;d++)if(n=u[d],n.getAttribute("content")===(l.content==null?null:""+l.content)&&n.getAttribute("name")===(l.name==null?null:l.name)&&n.getAttribute("property")===(l.property==null?null:l.property)&&n.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&n.getAttribute("charset")===(l.charSet==null?null:l.charSet)){u.splice(d,1);break t}}n=a.createElement(t),ot(n,t,l),a.head.appendChild(n);break;default:throw Error(o(468,t))}n[it]=e,et(n),t=n}e.stateNode=t}else lt||Ro(u,e.type,e.stateNode);else e.stateNode=bp(u,l,e.memoizedProps);else a!==l?(a===null?(t=n.stateNode,t===null||Ee||t.parentNode.removeChild(t)):a.count--,l===null?lt||Ro(u,e.type,e.stateNode):bp(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Ac(e,e.memoizedProps,n.memoizedProps);break;case 27:xt(t,e,l),bt(e),a&512&&(Ee||n===null||ct(n,n.return)),n!==null&&a&4&&Ac(e,e.memoizedProps,n.memoizedProps);break;case 5:if(u=pl,pl=!1,xt(t,e,l),pl=u,bt(e),a&512&&(Ee||n===null||ct(n,n.return)),e.flags&32){t=e.stateNode;try{la(t,""),xe=!0}catch(A){Re(e,e.return,A)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ac(e,t,n!==null?n.memoizedProps:t)),a&1024&&(Lc=!0);break;case 6:if(xt(t,e,l),bt(e),a&4){if(e.stateNode===null)throw Error(o(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,xe=!0}catch(A){Re(e,e.return,A)}}break;case 3:if(xe=!1,js=null,u=ll,ll=Ui(t.containerInfo),xt(t,e,l),ll=u,bt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{La(t.containerInfo)}catch(A){Re(e,e.return,A)}Lc&&(Lc=!1,pm(e)),xe=!1;break;case 4:a=pl,pl=lt,n=Md(),u=ll,ll=Ui(e.stateNode.containerInfo),xt(t,e,l),bt(e),ll=u,xe&&Ni&&(is=!0),xe=n,pl=a;break;case 12:xt(t,e,l),bt(e);break;case 31:xt(t,e,l),bt(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ss(e,t)));break;case 13:xt(t,e,l),bt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(os=zt()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ss(e,t)));break;case 22:u=e.memoizedState!==null,d=n!==null&&n.memoizedState!==null;var h=lt,y=Ee,N=pl;lt=h||u,pl=N||u,Ee=y||d,xt(t,e,l),Ee=y,pl=N,lt=h,bt(e),a&8192&&(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,!u||n===null||d||lt||Ee||(t=d||Ee,l=lt,n=Ee,lt=u||lt,Ee=t,un(e,2),lt=l,Ee=n),!u&&pl||$c(e,u)),a&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,ss(e,l))));break;case 19:xt(t,e,l),bt(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ss(e,t)));break;case 30:a&512&&(Ee||n===null||ct(n,n.return)),a=Md(),u=Ni,d=(l&335544064)===l,h=e.memoizedProps,Ni=d&&zl(h.default,h.update)!=="none",xt(t,e,l),bt(e),d&&n!==null&&xe&&(e.flags|=4),Ni=u,xe=a;break;case 21:break;case 7:a&512&&(Ee||n===null||ct(n,n.return)),n&&n.stateNode!==null&&(n.stateNode._fragmentFiber=e);default:xt(t,e,l),bt(e)}}function bt(e){var t=e.flags;if(t&2){try{for(var l,n=e.return;n!==null;){if(Ph(n)){l=n;break}n=n.return}n=null;for(var a=e.return;a!==null;){if(Cc(a)){var u=a.stateNode;n===null?n=[u]:n.push(u)}if(zc(a))break;a=a.return}var d=n;if(l==null)throw Error(o(160));switch(l.tag){case 27:var h=l.stateNode,y=Dc(e);ts(e,y,h,d);break;case 5:var N=l.stateNode;l.flags&32&&(la(N,""),l.flags&=-33);var A=Dc(e);ts(e,A,N,d);break;case 3:case 4:var w=l.stateNode.containerInfo,E=Dc(e);wc(e,E,w,d);break;default:throw Error(o(161))}}catch(O){Re(e,e.return,O)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function pm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;pm(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Ba=!0,t.reset(),Ba=!1),e=e.sibling}}function Sa(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)gm(t,e),t=t.sibling;else um(t)}function gm(e,t){var l=e.alternate;if(l===null)Mc(e,!1);else switch(e.tag){case 3:if(qc=gl=!1,lm(),Sa(t,e),!gl&&!is){if(e=hl,e!==null)for(var n=0;n<e.length;n+=3){l=e[n];var a=e[n+1];np(l,e[n+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+a+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),qc=!0}hl=null;break;case 5:Sa(t,e);break;case 4:n=gl,gl=!1,Sa(t,e),gl&&(is=!0),gl=n;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?Mc(e,!1):Sa(t,e));break;case 30:n=gl,a=lm(),gl=!1,Sa(t,e),gl&&(e.flags|=4);var u=e.memoizedProps,d=e.stateNode;t=Rl(u,d),d=Rl(l.memoizedProps,d);var h=zl(u.default,u.update);h==="none"?t=!1:(u=l.memoizedState,l.memoizedState=null,l=e.child,Et=0,t=Bc(e,l,t,d,h,u,!0),Et!==(u===null?0:u.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(za(e,e.memoizedProps.onUpdate),hl=a):a!==null&&(a.push.apply(a,hl),hl=a),gl=(e.flags&32)!==0?!0:n;break;default:Sa(t,e)}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rm(e,t.alternate,t),t=t.sibling}function un(e,t){for(e=e.child;e!==null;){var l=e,n=t;switch(l.tag){case 0:case 11:case 14:case 15:an(4,l,l.return),un(l,n);break;case 1:ct(l,l.return);var a=l.stateNode;typeof a.componentWillUnmount=="function"&&Fh(l,l.return,a),un(l,n);break;case 27:(n&2)!==0&&pp(l.stateNode,l.type,l.memoizedProps);case 5:ct(l,l.return),l.tag!==5&&l.tag!==27||Ti(l),un(l,n);break;case 6:Ti(l);break;case 26:ct(l,l.return),a=l.stateNode,l.memoizedState!==null||a===null||Ee||a.parentNode.removeChild(a),un(l,n);break;case 22:l.memoizedState===null&&un(l,n);break;case 30:ct(l,l.return),un(l,n);break;case 7:ct(l,l.return);default:un(l,n)}e=e.sibling}}function nl(e,t,l){for(l=(t.subtreeFlags&8772)!==0?l:l&-2,t=t.child;t!==null;){var n=t.alternate,a=e,u=t,d=u.flags,h=(l&1)!==0;switch(u.tag){case 0:case 11:case 15:nl(a,u,l),Ei(4,u);break;case 1:if(nl(a,u,l),n=u,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(A){Re(n,n.return,A)}if(n=u,a=n.updateQueue,a!==null){var y=n.stateNode;try{var N=a.shared.hiddenCallbacks;if(N!==null)for(a.shared.hiddenCallbacks=null,a=0;a<N.length;a++)Bf(N[a],y)}catch(A){Re(n,n.return,A)}}h&&d&64&&Ih(u),fl(u,u.return);break;case 27:(l&2)!==0&&em(u);case 5:u.tag!==5&&u.tag!==27||Wh(u),nl(a,u,l),h&&n===null&&d&4&&Oc(u),fl(u,u.return);break;case 6:Wh(u);break;case 26:y=u.stateNode,u.memoizedState!==null||y===null||lt||Ro(Ui(y.ownerDocument),u.type,y),nl(a,u,l),h&&n===null&&d&4&&Oc(u),fl(u,u.return);break;case 12:nl(a,u,l);break;case 31:nl(a,u,l),h&&d&4&&fm(a,u);break;case 13:nl(a,u,l),h&&d&4&&hm(a,u);break;case 22:u.memoizedState===null&&nl(a,u,l),fl(u,u.return);break;case 30:nl(a,u,l),fl(u,u.return);break;case 7:fl(u,u.return);default:nl(a,u,l)}t=t.sibling}}function Vc(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&di(l))}function Gc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&di(e))}function Jt(e,t,l,n){var a=(l&335544064)===l;if(t.subtreeFlags&(a?10262:10256))for(t=t.child;t!==null;)vm(e,t,l,n),t=t.sibling;else a&&im(t)}function vm(e,t,l,n){var a=(l&335544064)===l;a&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&as(t);var u=t.flags;switch(t.tag){case 0:case 11:case 15:Jt(e,t,l,n),u&2048&&Ei(9,t);break;case 1:Jt(e,t,l,n);break;case 3:Jt(e,t,l,n),a&&qc&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),u&2048&&(u=null,t.alternate!==null&&(u=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==u&&(t.refCount++,u!=null&&di(u)));break;case 12:if(u&2048){Jt(e,t,l,n),u=t.stateNode;try{var d=t.memoizedProps,h=d.id,y=d.onPostCommit;typeof y=="function"&&y(h,t.alternate===null?"mount":"update",u.passiveEffectDuration,-0)}catch(N){Re(t,t.return,N)}}else Jt(e,t,l,n);break;case 31:Jt(e,t,l,n);break;case 13:Jt(e,t,l,n);break;case 23:break;case 22:d=t.stateNode,h=t.alternate,t.memoizedState!==null?(a&&h!==null&&h.memoizedState===null&&as(h),d._visibility&2?Jt(e,t,l,n):Ri(e,t)):(a&&h!==null&&h.memoizedState!==null&&as(t),d._visibility&2?Jt(e,t,l,n):(d._visibility|=2,ja(e,t,l,n,(t.subtreeFlags&10256)!==0||!1))),u&2048&&Vc(h,t);break;case 24:Jt(e,t,l,n),u&2048&&Gc(t.alternate,t);break;case 30:a&&(u=t.alternate,u!==null&&(ml(u.child,!0),ml(t.child,!0))),Jt(e,t,l,n);break;default:Jt(e,t,l,n)}}function ja(e,t,l,n,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,d=t,h=l,y=n,N=d.flags;switch(d.tag){case 0:case 11:case 15:ja(u,d,h,y,a),Ei(8,d);break;case 23:break;case 22:var A=d.stateNode;d.memoizedState!==null?A._visibility&2?ja(u,d,h,y,a):Ri(u,d):(A._visibility|=2,ja(u,d,h,y,a)),a&&N&2048&&Vc(d.alternate,d);break;case 24:ja(u,d,h,y,a),a&&N&2048&&Gc(d.alternate,d);break;default:ja(u,d,h,y,a)}t=t.sibling}}function Ri(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,n=t,a=n.flags;switch(n.tag){case 22:Ri(l,n),a&2048&&Vc(n.alternate,n);break;case 24:Ri(l,n),a&2048&&Gc(n.alternate,n);break;default:Ri(l,n)}t=t.sibling}}var $n=8192;function Yn(e,t,l){if(e.subtreeFlags&$n)for(e=e.child;e!==null;)ym(e,t,l),e=e.sibling}function ym(e,t,l){switch(e.tag){case 26:Yn(e,t,l),e.flags&$n&&(e.memoizedState!==null?hx(l,ll,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&Tp(l,e)));break;case 5:Yn(e,t,l),e.flags&$n&&(e=e.stateNode,(t&335544128)===t&&Tp(l,e));break;case 3:case 4:var n=ll;ll=Ui(e.stateNode.containerInfo),Yn(e,t,l),ll=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=$n,$n=16777216,Yn(e,t,l),$n=n):Yn(e,t,l));break;case 30:if((e.flags&$n)!==0&&(n=e.memoizedProps.name,n!=null&&n!=="auto")){var a=e.stateNode;a.paired=null,Mt===null&&(Mt=new Map),Mt.set(n,a)}Yn(e,t,l);break;default:Yn(e,t,l)}}function xm(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function zi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];nt=n,Sm(n,e)}xm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)bm(e),e=e.sibling}function bm(e){switch(e.tag){case 0:case 11:case 15:zi(e),e.flags&2048&&an(9,e,e.return);break;case 3:zi(e);break;case 12:zi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,rs(e)):zi(e);break;default:zi(e)}}function rs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];nt=n,Sm(n,e)}xm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:an(8,t,t.return),rs(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,rs(t));break;default:rs(t)}e=e.sibling}}function Sm(e,t){for(;nt!==null;){var l=nt;switch(l.tag){case 0:case 11:case 15:an(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:di(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,nt=n;else e:for(l=e;nt!==null;){n=nt;var a=n.sibling,u=n.return;if(om(n),n===l){nt=null;break e}if(a!==null){a.return=u,nt=a;break e}nt=u}}}var ry={getCacheForType:function(e){var t=ut(Xe),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return ut(Xe).controller.signal}},cy=typeof WeakMap=="function"?WeakMap:Map,Se=0,Me=null,de=null,he=0,Ne=0,Ut=null,sn=!1,_a=!1,Qc=!1,kl=0,Ve=0,rn=0,Vn=0,cs=0,Ht=0,Ea=0,Ci=null,Nt=null,Xc=!1,os=0,jm=0,ds=1/0,fs=null,cn=null,qe=0,al=null,Gn=null,yl=0,Zc=0,Kc=null,_m=null,Ta=null,Na=null,Ra=null,Oi=0,hs=null;function kt(){return(Se&2)!==0&&he!==0?he&-he:K.T!==null?ao():Td()}function Em(){if(Ht===0)if((he&536870912)===0||oe){var e=su;su<<=1,(su&3932160)===0&&(su=262144),Ht=e}else Ht=536870912;return e=st.current,e!==null&&(e.flags|=32),Ht}function za(e,t){if(t!=null){var l=e.stateNode,n=l.ref;n===null&&(n=l.ref=ap(Rl(e.memoizedProps,l))),Na===null&&(Na=[]),Na.push(t.bind(null,n))}}function Rt(e,t,l){(e===Me&&(Ne===2||Ne===9)||e.cancelPendingCommit!==null)&&(Ca(e,0),on(e,he,Ht,!1)),Fa(e,l),((Se&2)===0||e!==Me)&&(e===Me&&((Se&2)===0&&(Vn|=l),Ve===4&&on(e,he,Ht,!1)),xl(e))}function Tm(e,t,l){if((Se&6)!==0)throw Error(o(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Ia(e,t),a=n?fy(e,t):Ic(e,t,!0),u=n;do{if(a===0){_a&&!n&&on(e,t,0,!1);break}else{if(l=e.current.alternate,u&&!oy(l)){a=Ic(e,t,!1),u=!1;continue}if(a===2){if(u=t,e.errorRecoveryDisabledLanes&u)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var h=e;a=Ci;var y=h.current.memoizedState.isDehydrated;if(y&&(Ca(h,d).flags|=256),d=Ic(h,d,!1),d!==2&&d!==6){if(Qc&&!y){h.errorRecoveryDisabledLanes|=u,Vn|=u,a=4;break e}u=Nt,Nt=a,u!==null&&(Nt===null?Nt=u:Nt.push.apply(Nt,u))}a=d}if(u=!1,a!==2)continue}}if(a===1){Ca(e,0),on(e,t,0,!0);break}e:{switch(n=e,u=a,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:on(n,t,Ht,!sn);break e;case 2:Nt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(a=os+300-zt(),10<a)){if(on(n,t,Ht,!sn),cu(n,0,!0)!==0)break e;yl=t,n.timeoutHandle=go(Nm.bind(null,n,l,Nt,fs,Xc,t,Ht,Vn,Ea,sn,u,"Throttled",-0,0),a);break e}Nm(n,l,Nt,fs,Xc,t,Ht,Vn,Ea,sn,u,null,-0,0)}}break}while(!0);xl(e)}function Nm(e,t,l,n,a,u,d,h,y,N,A,w,E,O){e.timeoutHandle=-1;var q=t.subtreeFlags,X=(u&335544064)===u;if(w=null,(X||q&8192||(q&16785408)===16785408)&&(w={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:cl},Mt=null,ym(t,u,w),X&&(q=w,X=e.containerInfo,X=(X.nodeType===9?X:X.ownerDocument).__reactViewTransition,X!=null&&(q.count++,q.waitingForViewTransition=!0,q=Bi.bind(q),X.finished.then(q,q))),q=(u&62914560)===u?os-zt():(u&4194048)===u?jm-zt():0,q=mx(w,q),q!==null)){yl=u,e.cancelPendingCommit=q(Mm.bind(null,e,t,u,l,n,a,d,h,y,N,A,w,null,E,O)),on(e,u,d,!N);return}Mm(e,t,u,l,n,a,d,h,y,N,A,w)}function oy(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var a=l[n],u=a.getSnapshot;a=a.value;try{if(!Dt(u(),a))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function on(e,t,l,n){t=bd(e,t),t&=~cs,t&=~Vn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var a=t;0<a;){var u=31-Ot(a),d=1<<u;n[u]=-1,a&=~d}l!==0&&jd(e,l,t)}function ms(){return(Se&6)===0?(Ai(0),!1):!0}function Jc(){if(de!==null){if(Ne===0)var e=de.return;else e=de,Al=An=null,nc(e),pa=null,mi=0,e=de;for(;e!==null;)Jh(e.alternate,e),e=e.return;de=null}}function Ca(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,My(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),yl=0,Jc(),Me=e,de=l=Cl(e.current,null),he=t,Ne=0,Ut=null,sn=!1,_a=Ia(e,t),Qc=!1,Ea=Ht=cs=Vn=rn=Ve=0,Nt=Ci=null,Xc=!1,kl=bd(e,t),ju(),l}function Rm(e,t){ue=null,K.H=Zu,t===ma||t===wu?(t=Mf(),Ne=3):t===Gr?(t=Mf(),Ne=4):Ne=t===yc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ut=t,de===null&&(Ve=1,Ku(e,Qt(t,e.current)))}function zm(){var e=st.current;return e===null?!0:(he&4194048)===he?gt===null:(he&62914560)===he||(he&536870912)!==0?e===gt:!1}function Cm(){var e=K.H;return K.H=Zu,e===null?Zu:e}function Om(){var e=K.A;return K.A=ry,e}function ps(){Ve=4,sn||(he&4194048)!==he&&st.current!==null||(_a=!0),(rn&134217727)===0&&(Vn&134217727)===0||Me===null||on(Me,he,Ht,!1)}function Ic(e,t,l){var n=Se;Se|=2;var a=Cm(),u=Om();(Me!==e||he!==t)&&(fs=null,Ca(e,t)),t=!1;var d=Ve;e:do try{if(Ne!==0&&de!==null){var h=de,y=Ut;switch(Ne){case 8:Jc(),d=6;break e;case 3:case 2:case 9:case 6:st.current===null&&(t=!0);var N=Ne;if(Ne=0,Ut=null,Oa(e,h,y,N),l&&_a){d=0;break e}break;default:N=Ne,Ne=0,Ut=null,Oa(e,h,y,N)}}dy(),d=Ve;break}catch(A){Rm(e,A)}while(!0);return t&&e.shellSuspendCounter++,Al=An=null,Se=n,K.H=a,K.A=u,de===null&&(Me=null,he=0,ju()),d}function dy(){for(;de!==null;)Am(de)}function fy(e,t){var l=Se;Se|=2;var n=Cm(),a=Om();Me!==e||he!==t?(fs=null,ds=zt()+500,Ca(e,t)):_a=Ia(e,t);e:do try{if(Ne!==0&&de!==null){t=de;var u=Ut;t:switch(Ne){case 1:Ne=0,Ut=null,Oa(e,t,u,1);break;case 2:case 9:if(Df(u)){Ne=0,Ut=null,Dm(t);break}t=function(){Ne!==2&&Ne!==9||Me!==e||(Ne=7),xl(e)},u.then(t,t);break e;case 3:Ne=7;break e;case 4:Ne=5;break e;case 7:Df(u)?(Ne=0,Ut=null,Dm(t)):(Ne=0,Ut=null,Oa(e,t,u,7));break;case 5:var d=null;switch(de.tag){case 26:d=de.memoizedState;case 5:case 27:var h=de;if(d?_p(d):h.stateNode.complete){Ne=0,Ut=null;var y=h.sibling;if(y!==null)de=y;else{var N=h.return;N!==null?(de=N,gs(N)):de=null}break t}}Ne=0,Ut=null,Oa(e,t,u,5);break;case 6:Ne=0,Ut=null,Oa(e,t,u,6);break;case 8:Jc(),Ve=6;break e;default:throw Error(o(462))}}hy();break}catch(A){Rm(e,A)}while(!0);return Al=An=null,K.H=n,K.A=a,Se=l,de!==null?0:(Me=null,he=0,ju(),Ve)}function hy(){for(;de!==null&&!Ov();)Am(de)}function Am(e){var t=Zh(e.alternate,e,kl);e.memoizedProps=e.pendingProps,t===null?gs(e):de=t}function Dm(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=qh(l,t,t.pendingProps,t.type,void 0,he);break;case 11:t=qh(l,t,t.pendingProps,t.type.render,t.ref,he);break;case 5:nc(t);var n=t;n===tt&&(oe?(zu(n),n.tag===5&&n.stateNode!=null&&(He=n.stateNode)):(zu(n),oe=!0));default:Jh(l,t),t=de=Sf(t,kl),t=Zh(l,t,kl)}e.memoizedProps=e.pendingProps,t===null?gs(e):de=t}function Oa(e,t,l,n){Al=An=null,nc(t),pa=null,mi=0;var a=t.return;try{if(ey(e,a,t,l,he)){Ve=1,Ku(e,Qt(l,e.current)),de=null;return}}catch(u){if(a!==null)throw de=a,u;Ve=1,Ku(e,Qt(l,e.current)),de=null;return}t.flags&32768?(oe||n===1?e=!0:_a||(he&536870912)!==0?e=!1:(sn=e=!0,(n===2||n===9||n===3||n===6)&&(n=st.current,n!==null&&n.tag===13&&(n.flags|=16384))),wm(t,e)):gs(t)}function gs(e){var t=e;do{if((t.flags&32768)!==0){wm(t,sn);return}e=t.return;var l=ay(t.alternate,t,kl);if(l!==null){de=l;return}if(t=t.sibling,t!==null){de=t;return}de=t=e}while(t!==null);Ve===0&&(Ve=5)}function wm(e,t){do{var l=iy(e.alternate,e);if(l!==null){l.flags&=32767,de=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){de=e;return}de=e=l}while(e!==null);Ve=6,de=null}function Mm(e,t,l,n,a,u,d,h,y,N,A,w){e.cancelPendingCommit=null;do vs();while(qe!==0);if((Se&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));e===Me&&(de=Me=null,he=0),Gn=t,al=e,yl=l,Kc=a,_m=n,my(e,t,l,d,h,y,w)}}function my(e,t,l,n,a,u,d){var h=t.lanes|t.childLanes;if(Zc=h,h|=Ar,qv(e,l,h,n,a,u),Na=null,(l&335544064)===l?(Ra=Y0(e),n=10262):(Ra=null,n=10256),(t.subtreeFlags&n)!==0||(t.flags&n)!==0?(e.callbackNode=null,e.callbackPriority=0,by(iu,function(){return eo(),null})):(e.callbackNode=null,e.callbackPriority=0),ls=!1,n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=K.T,K.T=null,a=ne.p,ne.p=2,u=Se,Se|=4;try{uy(e,t,l)}finally{Se=u,ne.p=a,K.T=n}}qe=1,ls?Ta=qy(d,e.containerInfo,Ra,Fc,Wc,gy,Pc,eo,py):(Fc(),Wc(),Pc())}function py(e){if(qe!==0){var t=al.onRecoverableError;t(e,{componentStack:null})}}function gy(){qe===3&&(qe=0,gm(Gn,al),qe=4)}function Fc(){if(qe===1){qe=0;var e=al,t=Gn,l=yl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=K.T,K.T=null;var a=ne.p;ne.p=2;var u=Se;Se|=4;try{Ni=is=!1,mm(t,e,l),l=ho;var d=df(e.containerInfo),h=l.focusedElem,y=l.selectionRange;if(d!==h&&h&&h.ownerDocument&&of(h.ownerDocument.documentElement,h)){if(y!==null&&Nr(h)){var N=y.start,A=y.end;if(A===void 0&&(A=N),"selectionStart"in h)h.selectionStart=N,h.selectionEnd=Math.min(A,h.value.length);else{var w=h.ownerDocument||document,E=w&&w.defaultView||window;if(E.getSelection){var O=E.getSelection(),q=h.textContent.length,X=Math.min(y.start,q),se=y.end===void 0?X:Math.min(y.end,q);!O.extend&&X>se&&(d=se,se=X,X=d);var T=cf(h,X),S=cf(h,se);if(T&&S&&(O.rangeCount!==1||O.anchorNode!==T.node||O.anchorOffset!==T.offset||O.focusNode!==S.node||O.focusOffset!==S.offset)){var C=w.createRange();C.setStart(T.node,T.offset),O.removeAllRanges(),X>se?(O.addRange(C),O.extend(S.node,S.offset)):(C.setEnd(S.node,S.offset),O.addRange(C))}}}}for(w=[],O=h;O=O.parentNode;)O.nodeType===1&&w.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<w.length;h++){var D=w[h];D.element.scrollLeft=D.left,D.element.scrollTop=D.top}}Ba=!!fo,ho=fo=null}finally{Se=u,ne.p=a,K.T=n}}e.current=t,qe=2}}function Wc(){if(qe===2){qe=0;var e=al,t=Gn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=K.T,K.T=null;var n=ne.p;ne.p=2;var a=Se;Se|=4;try{rm(e,t.alternate,t)}finally{Se=a,ne.p=n,K.T=l}}qe=3}}function Pc(){if(qe===4||qe===3){qe=0;var e=Ta;Ta=null,Av();var t=al,l=Gn,n=yl,a=_m,u=(n&335544064)===n?10262:10256;if((l.subtreeFlags&u)!==0||(l.flags&u)!==0?qe=5:(qe=0,Gn=al=null,Um(t,t.pendingLanes)),u=t.pendingLanes,u===0&&(cn=null),rr(n),l=l.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(Ja,l,void 0,(l.current.flags&128)===128)}catch{}if(a!==null){l=K.T,u=ne.p,ne.p=2,K.T=null;try{for(var d=t.onRecoverableError,h=0;h<a.length;h++){var y=a[h];d(y.value,{componentStack:y.stack})}}finally{K.T=l,ne.p=u}}if(a=Na,d=Ra,Ra=null,a!==null&&(Na=null,d===null&&(d=[]),e!==null))for(y=0;y<a.length;y++)l=(0,a[y])(d),l!==void 0&&e.finished.finally(l);(yl&3)!==0&&vs(),xl(t),u=t.pendingLanes,(n&261930)!==0&&(u&42)!==0?t===hs?Oi++:(Oi=0,hs=t):(Oi=0,hs=null),Ai(0)}}function Um(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,di(t)))}function vs(){return Ta!==null&&(Ta.skipTransition(),Ta=null),Fc(),Wc(),Pc(),eo()}function eo(){if(qe!==5)return!1;var e=al,t=Zc;Zc=0;var l=rr(yl),n=K.T,a=ne.p;try{ne.p=32>l?32:l,K.T=null,l=Kc,Kc=null;var u=al,d=yl;if(qe=0,Gn=al=null,yl=0,(Se&6)!==0)throw Error(o(331));var h=Se;if(Se|=4,bm(u.current),vm(u,u.current,d,l),Se=h,Ai(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(Ja,u)}catch{}return!0}finally{ne.p=a,K.T=n,Um(e,t)}}function Hm(e,t,l){t=Qt(l,t),t=vc(e.stateNode,t,2),e=en(e,t,2),e!==null&&(Fa(e,2),xl(e))}function Re(e,t,l){if(e.tag===3)Hm(e,e,l);else for(;t!==null;){if(t.tag===3){Hm(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(cn===null||!cn.has(n))){e=Qt(l,e),l=Dh(2),n=en(t,l,2),n!==null&&(wh(l,n,t,e),Fa(n,2),xl(n));break}}t=t.return}}function to(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new cy;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(l)||(Qc=!0,a.add(l),e=vy.bind(null,e,t,l),t.then(e,e))}function vy(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Me===e&&(he&l)===l&&((Ve===4||Ve===3&&(he&62914560)===he&&300>zt()-os)&&(Se&2)===0?Ca(e,0):cs|=l,Ea===he&&(Ea=0)),xl(e)}function km(e,t){t===0&&(t=Sd()),e=zn(e,t),e!==null&&(Fa(e,t),xl(e))}function yy(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),km(e,l)}function xy(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),km(e,l)}function by(e,t){return ar(e,t)}var Aa=null,Da=null,lo=!1,ys=!1,no=!1,dn=0;function xl(e){e!==Da&&e.next===null&&(Da===null?Aa=Da=e:Da=Da.next=e),ys=!0,lo||(lo=!0,jy())}function Ai(e,t){if(!no&&ys){no=!0;do for(var l=!1,n=Aa;n!==null;){if(e!==0){var a=n.pendingLanes;if(a===0)var u=0;else{var d=n.suspendedLanes,h=n.pingedLanes;u=(1<<31-Ot(42|e)+1)-1,u&=a&~(d&~h),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,$m(n,u))}else u=he,u=cu(n,n===Me?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||Ia(n,u)||(l=!0,$m(n,u));n=n.next}while(l);no=!1}}function Sy(){Bm()}function Bm(){ys=lo=!1;var e=0;dn!==0&&wy()&&(e=dn);for(var t=zt(),l=null,n=Aa;n!==null;){var a=n.next,u=Lm(n,t);u===0?(n.next=null,l===null?Aa=a:l.next=a,a===null&&(Da=l)):(l=n,(e!==0||(u&3)!==0)&&(ys=!0)),n=a}qe!==0&&qe!==5||Ai(e),dn!==0&&(dn=0)}function Lm(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var d=31-Ot(u),h=1<<d,y=a[d];y===-1?((h&l)===0||(h&n)!==0)&&(a[d]=Lv(h,t)):y<=t&&(e.expiredLanes|=h),u&=~h}if(t=Me,l=he,l=cu(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&(Ne===2||Ne===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&ir(n),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Ia(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&ir(n),rr(l)){case 2:case 8:l=yd;break;case 32:l=iu;break;case 268435456:l=xd;break;default:l=iu}return n=qm.bind(null,e),l=ar(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&ir(n),e.callbackPriority=2,e.callbackNode=null,2}function qm(e,t){if(qe!==0&&qe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(vs()&&e.callbackNode!==l)return null;var n=he;return n=cu(e,e===Me?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Tm(e,n,t),Lm(e,zt()),e.callbackNode!=null&&e.callbackNode===l?qm.bind(null,e):null)}function $m(e,t){if(vs())return null;Tm(e,t,!0)}function jy(){Uy(function(){(Se&6)!==0?ar(vd,Sy):Bm()})}function ao(){if(dn===0){var e=Mn;e===0&&(e=uu,uu<<=1,(uu&261888)===0&&(uu=256)),dn=e}return dn}function Ym(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:mu(e)}function _y(e,t,l,n,a){if(t==="submit"&&l&&l.stateNode===a){var u=Ym((a[jt]||null).action),d=n.submitter;d&&(t=(t=d[jt]||null)?Ym(t.formAction):d.getAttribute("formAction"),t!==null&&(u=t,d=null));var h=new yu("action","action",null,n,a);e.push({event:h,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(dn!==0){var y=new FormData(a,d);fc(l,{pending:!0,data:y,method:a.method,action:u},null,y)}}else typeof u=="function"&&(h.preventDefault(),y=new FormData(a,d),fc(l,{pending:!0,data:y,method:a.method,action:u},u,y))},currentTarget:a}]})}}for(var io=0;io<Or.length;io++){var uo=Or[io],Ey=uo.toLowerCase(),Ty=uo[0].toUpperCase()+uo.slice(1);el(Ey,"on"+Ty)}el(mf,"onAnimationEnd"),el(pf,"onAnimationIteration"),el(gf,"onAnimationStart"),el("dblclick","onDoubleClick"),el("focusin","onFocus"),el("focusout","onBlur"),el(M0,"onTransitionRun"),el(U0,"onTransitionStart"),el(H0,"onTransitionCancel"),el(vf,"onTransitionEnd"),ea("onMouseEnter",["mouseout","mouseover"]),ea("onMouseLeave",["mouseout","mouseover"]),ea("onPointerEnter",["pointerout","pointerover"]),ea("onPointerLeave",["pointerout","pointerover"]),Tn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Tn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Tn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Tn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Tn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Tn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Di="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(" "),Ny=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Di));function Vm(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var n=e[l],a=n.event;n=n.listeners;e:{var u=void 0;if(t)for(var d=n.length-1;0<=d;d--){var h=n[d],y=h.instance,N=h.currentTarget;if(h=h.listener,y!==u&&a.isPropagationStopped())break e;u=h,a.currentTarget=N;try{u(a)}catch(A){Su(A)}a.currentTarget=null,u=y}else for(d=0;d<n.length;d++){if(h=n[d],y=h.instance,N=h.currentTarget,h=h.listener,y!==u&&a.isPropagationStopped())break e;u=h,a.currentTarget=N;try{u(a)}catch(A){Su(A)}a.currentTarget=null,u=y}}}}function fe(e,t){var l=t[Rd];l===void 0&&(l=t[Rd]=new Set);var n=e+"__bubble";l.has(n)||(Gm(t,e,2,!1),l.add(n))}function so(e,t,l){var n=0;t&&(n|=4),Gm(l,e,n,t)}var xs="_reactListening"+Math.random().toString(36).slice(2);function ro(e){if(!e[xs]){e[xs]=!0,Od.forEach(function(l){l!=="selectionchange"&&(Ny.has(l)||so(l,!1,e),so(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xs]||(t[xs]=!0,so("selectionchange",!1,t))}}function Gm(e,t,l,n){switch(wp(t)){case 2:var a=yx;break;case 8:a=xx;break;default:a=Co}l=a.bind(null,t,l,e),a=void 0,!gr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,l,{capture:!0,passive:a}):e.addEventListener(t,l,!0):a!==void 0?e.addEventListener(t,l,{passive:a}):e.addEventListener(t,l,!1)}function co(e,t,l,n,a){var u=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var d=n.tag;if(d===3||d===4){var h=n.stateNode.containerInfo;if(h===a)break;if(d===4)for(d=n.return;d!==null;){var y=d.tag;if((y===3||y===4)&&d.stateNode.containerInfo===a)return;d=d.return}for(;h!==null;){if(d=En(h),d===null)return;if(y=d.tag,y===5||y===6||y===26||y===27){n=u=d;continue e}h=h.parentNode}}n=n.return}Vd(function(){var N=u,A=mr(l),w=[];e:{var E=yf.get(e);if(E!==void 0){var O=yu,q=e;switch(e){case"keypress":if(gu(l)===0)break e;case"keydown":case"keyup":O=o0;break;case"focusin":q="focus",O=br;break;case"focusout":q="blur",O=br;break;case"beforeblur":case"afterblur":O=br;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=Xd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Wv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=p0;break;case mf:case pf:case gf:O=t0;break;case vf:O=v0;break;case"scroll":case"scrollend":O=Iv;break;case"wheel":O=x0;break;case"copy":case"cut":case"paste":O=n0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Kd;break;case"submit":O=h0;break;case"toggle":case"beforetoggle":O=S0}var X=(t&4)!==0,se=!X&&(e==="scroll"||e==="scrollend"),T=X?E!==null?E+"Capture":null:E;X=[];for(var S=N,C;S!==null;){var D=S;if(C=D.stateNode,D=D.tag,D!==5&&D!==26&&D!==27||C===null||T===null||(D=ei(S,T),D!=null&&X.push(wi(S,D,C))),se)break;S=S.return}0<X.length&&(E=new O(E,q,null,l,A),w.push({event:E,listeners:X}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",E=e==="mouseout"||e==="pointerout",O&&l!==hr&&(q=l.relatedTarget||l.fromElement)&&(En(q)||q[Fn]))break e;(E||O)&&(q=A.window===A?A:(O=A.ownerDocument)?O.defaultView||O.parentWindow:window,E?(O=l.relatedTarget||l.toElement,E=N,O=O?En(O):null,O!==null&&(se=p(O),X=O.tag,O!==se||X!==5&&X!==27&&X!==6)&&(O=null)):(E=null,O=N),E!==O&&(X=Xd,D="onMouseLeave",T="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(X=Kd,D="onPointerLeave",T="onPointerEnter",S="pointer"),se=E==null?q:Pa(E),C=O==null?q:Pa(O),q=new X(D,S+"leave",E,l,A),q.target=se,q.relatedTarget=C,D=null,En(A)===N&&(X=new X(T,S+"enter",O,l,A),X.target=C,X.relatedTarget=se,D=X),se=D,X=E&&O?ce(E,O,Ry):null,E!==null&&Qm(w,q,E,X,!1),O!==null&&se!==null&&Qm(w,se,O,X,!0)))}e:{if(E=N?Pa(N):window,O=E.nodeName&&E.nodeName.toLowerCase(),O==="select"||O==="input"&&E.type==="file")var G=lf;else if(ef(E))if(nf)G=A0;else{G=C0;var me=z0}else O=E.nodeName,!O||O.toLowerCase()!=="input"||E.type!=="checkbox"&&E.type!=="radio"?N&&fr(N.elementType)&&(G=lf):G=O0;if(G&&(G=G(e,N))){tf(w,G,l,A);break e}me&&me(e,E,N)}switch(me=N?Pa(N):window,e){case"focusin":(ef(me)||me.contentEditable==="true")&&(ua=me,Rr=N,ri=null);break;case"focusout":ri=Rr=ua=null;break;case"mousedown":zr=!0;break;case"contextmenu":case"mouseup":case"dragend":zr=!1,ff(w,l,A);break;case"selectionchange":if(w0)break;case"keydown":case"keyup":ff(w,l,A)}var J;if(jr)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else ia?Wd(e,l)&&(P="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(P="onCompositionStart");P&&(Jd&&l.locale!=="ko"&&(ia||P!=="onCompositionStart"?P==="onCompositionEnd"&&ia&&(J=Gd()):(Ql=A,vr="value"in Ql?Ql.value:Ql.textContent,ia=!0)),me=bs(N,P),0<me.length&&(P=new Zd(P,e,null,l,A),w.push({event:P,listeners:me}),J?P.data=J:(J=Pd(l),J!==null&&(P.data=J)))),(J=_0?E0(e,l):T0(e,l))&&(P=bs(N,"onBeforeInput"),0<P.length&&(me=new Zd("onBeforeInput","beforeinput",null,l,A),w.push({event:me,listeners:P}),me.data=J)),_y(w,e,N,l,A)}Vm(w,t)})}function wi(e,t,l){return{instance:e,listener:t,currentTarget:l}}function bs(e,t){for(var l=t+"Capture",n=[];e!==null;){var a=e,u=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||u===null||(a=ei(e,l),a!=null&&n.unshift(wi(e,a,u)),a=ei(e,t),a!=null&&n.push(wi(e,a,u))),e.tag===3)return n;e=e.return}return[]}function Ry(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Qm(e,t,l,n,a){for(var u=t._reactName,d=[];l!==null&&l!==n;){var h=l,y=h.alternate,N=h.stateNode;if(h=h.tag,y!==null&&y===n)break;h!==5&&h!==26&&h!==27||N===null||(y=N,a?(N=ei(l,u),N!=null&&d.unshift(wi(l,N,y))):a||(N=ei(l,u),N!=null&&d.push(wi(l,N,y)))),l=l.return}d.length!==0&&e.push({event:t,listeners:d})}var zy=/\r\n?/g,Cy=/\u0000|\uFFFD/g;function Xm(e){return(typeof e=="string"?e:""+e).replace(zy,`
|
|
49
|
+
`).replace(Cy,"")}function Zm(e,t){return t=Xm(t),Xm(e)===t}function ze(e,t,l,n,a,u){switch(l){case"children":if(typeof n=="string")t==="body"||t==="textarea"&&n===""||la(e,n);else if(typeof n=="number"||typeof n=="bigint")t!=="body"&&la(e,""+n);else return;break;case"className":hu(e,"class",n);break;case"tabIndex":hu(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":hu(e,l,n);break;case"style":$d(e,n,u);return;case"data":if(t!=="object"){hu(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=mu(n),e.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(l==="formAction"?(t!=="input"&&ze(e,t,"name",a.name,a,null),ze(e,t,"formEncType",a.formEncType,a,null),ze(e,t,"formMethod",a.formMethod,a,null),ze(e,t,"formTarget",a.formTarget,a,null)):(ze(e,t,"encType",a.encType,a,null),ze(e,t,"method",a.method,a,null),ze(e,t,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=mu(n),e.setAttribute(l,n);break;case"onClick":n!=null&&(e.onclick=cl);return;case"onScroll":n!=null&&fe("scroll",e);return;case"onScrollEnd":n!=null&&fe("scrollend",e);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(o(60));(u!=null?u.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}l=mu(n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":n===!0?e.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(l,n):e.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(l):e.setAttribute(l,n);break;case"popover":fe("beforetoggle",e),fe("toggle",e),fu(e,"popover",n);break;case"xlinkActuate":Tl(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Tl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Tl(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Tl(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Tl(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Tl(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Tl(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Tl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Tl(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":fu(e,"is",n);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=Kv.get(l)||l,fu(e,l,n);else return}xe=!0}function oo(e,t,l,n,a,u){switch(l){case"style":$d(e,n,u);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(o(60));(u!=null?u.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"children":if(typeof n=="string")la(e,n);else if(typeof n=="number"||typeof n=="bigint")la(e,""+n);else return;break;case"onScroll":n!=null&&fe("scroll",e);return;case"onScrollEnd":n!=null&&fe("scrollend",e);return;case"onClick":n!=null&&(e.onclick=cl);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Ad.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),u=l.slice(2,a?l.length-7:void 0),t=e[jt]||null,t=t!=null?t[l]:null,typeof t=="function"&&e.removeEventListener(u,t,a),typeof n=="function")){typeof t!="function"&&t!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(u,n,a);break e}xe=!0,l in e?e[l]=n:n===!0?e.setAttribute(l,""):fu(e,l,n)}return}xe=!0}function ot(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":fe("error",e),fe("load",e);var n=!1,a=!1,u;for(u in l)if(l.hasOwnProperty(u)){var d=l[u];if(d!=null)switch(u){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ze(e,t,u,d,l,null)}}a&&ze(e,t,"srcSet",l.srcSet,l,null),n&&ze(e,t,"src",l.src,l,null);return;case"input":fe("invalid",e);var h=u=d=a=null,y=null,N=null;for(n in l)if(l.hasOwnProperty(n)){var A=l[n];if(A!=null)switch(n){case"name":a=A;break;case"type":d=A;break;case"checked":y=A;break;case"defaultChecked":N=A;break;case"value":u=A;break;case"defaultValue":h=A;break;case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(o(137,t));break;default:ze(e,t,n,A,l,null)}}kd(e,u,h,y,N,d,a,!1);return;case"select":fe("invalid",e),n=d=u=null;for(a in l)if(l.hasOwnProperty(a)&&(h=l[a],h!=null))switch(a){case"value":u=h;break;case"defaultValue":d=h;break;case"multiple":n=h;default:ze(e,t,a,h,l,null)}t=u,l=d,e.multiple=!!n,t!=null?ta(e,!!n,t,!1):l!=null&&ta(e,!!n,l,!0);return;case"textarea":fe("invalid",e),u=a=n=null;for(d in l)if(l.hasOwnProperty(d)&&(h=l[d],h!=null))switch(d){case"value":n=h;break;case"defaultValue":a=h;break;case"children":u=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(o(91));break;default:ze(e,t,d,h,l,null)}Ld(e,n,a,u);return;case"option":for(y in l)if(l.hasOwnProperty(y)&&(n=l[y],n!=null))switch(y){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:ze(e,t,y,n,l,null)}return;case"dialog":fe("beforetoggle",e),fe("toggle",e),fe("cancel",e),fe("close",e);break;case"iframe":case"object":fe("load",e);break;case"video":case"audio":for(n=0;n<Di.length;n++)fe(Di[n],e);break;case"image":fe("error",e),fe("load",e);break;case"details":fe("toggle",e);break;case"embed":case"source":case"link":fe("error",e),fe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(N in l)if(l.hasOwnProperty(N)&&(n=l[N],n!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ze(e,t,N,n,l,null)}return;default:if(fr(t)){for(A in l)l.hasOwnProperty(A)&&(n=l[A],n!==void 0&&oo(e,t,A,n,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(n=l[h],n!=null&&ze(e,t,h,n,l,null))}var Oy={};function Ay(e,t,l,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,u=null,d=null,h=null,y=null,N=null,A=null;for(O in l){var w=l[O];if(l.hasOwnProperty(O)&&w!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":y=w;default:n.hasOwnProperty(O)||ze(e,t,O,null,n,w)}}for(var E in n){var O=n[E];if(w=l[E],n.hasOwnProperty(E)&&(O!=null||w!=null))switch(E){case"type":O!==w&&(xe=!0),u=O;break;case"name":O!==w&&(xe=!0),a=O;break;case"checked":O!==w&&(xe=!0),N=O;break;case"defaultChecked":O!==w&&(xe=!0),A=O;break;case"value":O!==w&&(xe=!0),d=O;break;case"defaultValue":O!==w&&(xe=!0),h=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(o(137,t));break;default:O!==w&&ze(e,t,E,O,n,w)}}or(e,d,h,y,N,A,u,a);return;case"select":O=d=h=E=null;for(u in l)if(y=l[u],l.hasOwnProperty(u)&&y!=null)switch(u){case"value":break;case"multiple":O=y;default:n.hasOwnProperty(u)||ze(e,t,u,null,n,y)}for(a in n)if(u=n[a],y=l[a],n.hasOwnProperty(a)&&(u!=null||y!=null))switch(a){case"value":u!==y&&(xe=!0),E=u;break;case"defaultValue":u!==y&&(xe=!0),h=u;break;case"multiple":u!==y&&(xe=!0),d=u;default:u!==y&&ze(e,t,a,u,n,y)}t=h,l=d,n=O,E!=null?ta(e,!!l,E,!1):!!n!=!!l&&(t!=null?ta(e,!!l,t,!0):ta(e,!!l,l?[]:"",!1));return;case"textarea":O=E=null;for(h in l)if(a=l[h],l.hasOwnProperty(h)&&a!=null&&!n.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:ze(e,t,h,null,n,a)}for(d in n)if(a=n[d],u=l[d],n.hasOwnProperty(d)&&(a!=null||u!=null))switch(d){case"value":a!==u&&(xe=!0),E=a;break;case"defaultValue":a!==u&&(xe=!0),O=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(o(91));break;default:a!==u&&ze(e,t,d,a,n,u)}Bd(e,E,O);return;case"option":for(var q in l)if(E=l[q],l.hasOwnProperty(q)&&E!=null&&!n.hasOwnProperty(q))switch(q){case"selected":e.selected=!1;break;default:ze(e,t,q,null,n,E)}for(y in n)if(E=n[y],O=l[y],n.hasOwnProperty(y)&&E!==O&&(E!=null||O!=null))switch(y){case"selected":E!==O&&(xe=!0),e.selected=E&&typeof E!="function"&&typeof E!="symbol";break;default:ze(e,t,y,E,n,O)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var X in l)E=l[X],l.hasOwnProperty(X)&&E!=null&&!n.hasOwnProperty(X)&&ze(e,t,X,null,n,E);for(N in n)if(E=n[N],O=l[N],n.hasOwnProperty(N)&&E!==O&&(E!=null||O!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(E!=null)throw Error(o(137,t));break;default:ze(e,t,N,E,n,O)}return;default:if(fr(t)){for(var se in l)E=l[se],l.hasOwnProperty(se)&&E!==void 0&&!n.hasOwnProperty(se)&&oo(e,t,se,void 0,n,E);for(A in n)E=n[A],O=l[A],!n.hasOwnProperty(A)||E===O||E===void 0&&O===void 0||oo(e,t,A,E,n,O);return}}for(var T in l)E=l[T],l.hasOwnProperty(T)&&E!=null&&!n.hasOwnProperty(T)&&ze(e,t,T,null,n,E);for(w in n)E=n[w],O=l[w],!n.hasOwnProperty(w)||E===O||E==null&&O==null||ze(e,t,w,E,n,O)}function Km(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Dy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var a=l[n],u=a.transferSize,d=a.initiatorType,h=a.duration;if(u&&h&&Km(d)){for(d=0,h=a.responseEnd,n+=1;n<l.length;n++){var y=l[n],N=y.startTime;if(N>h)break;var A=y.transferSize,w=y.initiatorType;A&&Km(w)&&(y=y.responseEnd,d+=A*(y<h?1:(h-N)/(y-N)))}if(--n,t+=8*(u+d)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var fo=null,ho=null;function Mi(e){return e.nodeType===9?e:e.ownerDocument}function Jm(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Im(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Fm(e,t,l,n){return l=Mi(l).createElement(e),l[it]=n,l[jt]=t,ot(l,e,t),et(l),l}function mo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var po=null;function wy(){var e=window.event;return e&&e.type==="popstate"?e===po?!1:(po=e,!0):(po=null,!1)}var go=typeof setTimeout=="function"?setTimeout:void 0,My=typeof clearTimeout=="function"?clearTimeout:void 0,Wm=typeof Promise=="function"?Promise:void 0,Pm=typeof requestAnimationFrame=="function"?requestAnimationFrame:go,Uy=typeof queueMicrotask=="function"?queueMicrotask:typeof Wm<"u"?function(e){return Wm.resolve(null).then(e).catch(Hy)}:go;function Hy(e){setTimeout(function(){throw e})}function fn(e){return e==="head"}function ep(e,t){var l=t,n=0;do{var a=l.nextSibling;if(e.removeChild(l),a&&a.nodeType===8)if(l=a.data,l==="/$"||l==="/&"){if(n===0){e.removeChild(a),La(t);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Eo(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Eo(l);for(var u=l.firstChild;u;){var d=u.nextSibling,h=u.nodeName;u[Wa]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&u.rel.toLowerCase()==="stylesheet"||l.removeChild(u),u=d}}else l==="body"&&Eo(e.ownerDocument.body);l=a}while(l);La(t)}function tp(e,t){var l=e;e=0;do{var n=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=n}while(l)}function lp(e,t,l){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,l!=null&&(e.style.viewTransitionClass=l),l=getComputedStyle(e),l.display==="inline"){if(t=e.getClientRects(),t.length===1)var n=1;else for(var a=n=0;a<t.length;a++){var u=t[a];0<u.width&&0<u.height&&n++}n===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+l.paddingTop,e.marginBottom="-"+l.paddingBottom)}}function np(e,t){e=e.style,t=t.style;var l=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(l=t.display,e.display=l==null||typeof l=="boolean"?"":l,l=t.margin,l!=null?e.margin=l:(l=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=l==null||typeof l=="boolean"?"":l,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function ky(e,t,l){return l=l.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=l.innerHeight&&e.left<=l.innerWidth}}function vo(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return ky(t,l,e)}function By(e){return e.documentElement.clientHeight}function Ly(e){this.addEventListener("load",e),this.addEventListener("error",e)}function qy(e,t,l,n,a,u,d,h,y){var N=t.nodeType===9?t:t.ownerDocument;try{var A=N.startViewTransition({update:function(){var E=N.defaultView,O=E.navigation&&E.navigation.transition,q=N.fonts.status;n();var X=[];if(q==="loaded"&&(By(N),N.fonts.status==="loading"&&X.push(N.fonts.ready)),q=X.length,e!==null)for(var se=e.suspenseyImages,T=0,S=0;S<se.length;S++){var C=se[S];if(!C.complete){var D=C.getBoundingClientRect();if(0<D.bottom&&0<D.right&&D.top<E.innerHeight&&D.left<E.innerWidth){if(T+=Ep(C),T>_s){X.length=q;break}C=new Promise(Ly.bind(C)),X.push(C)}}}if(0<X.length)return E=Promise.race([Promise.all(X),new Promise(function(G){return setTimeout(G,500)})]).then(a,a),(O?Promise.allSettled([O.finished,E]):E).then(u,u);if(a(),O)return O.finished.then(u,u);u()},types:l});N.__reactViewTransition=A;var w=[];return A.ready.then(function(){for(var E=N.documentElement.getAnimations({subtree:!0}),O=0;O<E.length;O++){var q=E[O],X=q.effect,se=X.pseudoElement;if(se!=null&&se.startsWith("::view-transition")){w.push(q),q=X.getKeyframes();for(var T=se=void 0,S=!0,C=0;C<q.length;C++){var D=q[C],G=D.width;if(se===void 0)se=G;else if(se!==G){S=!1;break}if(G=D.height,T===void 0)T=G;else if(T!==G){S=!1;break}delete D.width,delete D.height,D.transform==="none"&&delete D.transform}S&&se!==void 0&&T!==void 0&&(X.setKeyframes(q),S=getComputedStyle(X.target,X.pseudoElement),S.width!==se||S.height!==T)&&(S=q[0],S.width=se,S.height=T,S=q[q.length-1],S.width=se,S.height=T,X.setKeyframes(q))}}d()},function(E){N.__reactViewTransition===A&&(N.__reactViewTransition=null);try{if(typeof E=="object"&&E!==null)switch(E.name){case"InvalidStateError":(E.message==="View transition was skipped because document visibility state is hidden."||E.message==="Skipping view transition because document visibility state has become hidden."||E.message==="Skipping view transition because viewport size changed."||E.message==="Transition was aborted because of invalid state")&&(E=null)}E!==null&&y(E)}finally{n(),a(),d()}}),A.finished.finally(function(){for(var E=0;E<w.length;E++)w[E].cancel();N.__reactViewTransition===A&&(N.__reactViewTransition=null),h()}),A}catch{return n(),a(),d(),null}}function Qn(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Qn.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:ee({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Qn.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,l=e.getAnimations({subtree:!0}),n=[],a=0;a<l.length;a++){var u=l[a].effect;u!==null&&u.target===e&&u.pseudoElement===t&&n.push(l[a])}return n},Qn.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function ap(e){return{name:e,group:new Qn("group",e),imagePair:new Qn("image-pair",e),old:new Qn("old",e),new:new Qn("new",e)}}function Bt(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Bt.prototype.addEventListener=function(e,t,l){var n=null,a=null;if(!(l!=null&&typeof l!="boolean"&&(n=l.signal||null,n!==null&&n.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var u=this._eventListeners;if(up(u,e,t,l)===-1){var d=this,h=t;l!=null&&typeof l!="boolean"&&l.once===!0&&(h=function(y){d.removeEventListener(e,t,l),typeof t=="function"?t.call(this,y):t.handleEvent(y)}),n!==null&&(a=d.removeEventListener.bind(d,e,t,l),n.addEventListener("abort",a,{once:!0}),a=n.removeEventListener.bind(n,"abort",a)),n=wa(l),u.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:h,cleanup:a}),v(this._fragmentFiber.child,!1,$y,e,h,n)}this._eventListeners=u}};function $y(e,t,l,n){return U(e).addEventListener(t,l,n),!1}Bt.prototype.removeEventListener=function(e,t,l){var n=this._eventListeners;if(n!==null&&(t=up(n,e,t,l),t!==-1)){var a=n[t];l=a.attachedListener;var u=a.cleanup;a=wa(a.optionsOrUseCapture),v(this._fragmentFiber.child,!1,Yy,e,l,a),n.splice(t,1),u!==null&&u()}};function Yy(e,t,l,n){return U(e).removeEventListener(t,l,n),!1}function wa(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function ip(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function up(e,t,l,n){if(e.length===0)return-1;n=ip(n);for(var a=0;a<e.length;a++){var u=e[a];if(u.type===t&&u.listener===l&&ip(u.optionsOrUseCapture)===n)return a}return-1}Bt.prototype.dispatchEvent=function(e){var t=z(this._fragmentFiber);if(t===null)return!0;t=U(t);var l=this._eventListeners;if(l!==null&&0<l.length||!e.bubbles){var n=t.nodeType===9?t.createComment(""):document.createTextNode("");if(l)for(var a=0;a<l.length;a++){var u=l[a];n.addEventListener(u.type,u.attachedListener,wa(u.optionsOrUseCapture))}if(t.appendChild(n),e=n.dispatchEvent(e),l)for(a=0;a<l.length;a++)u=l[a],n.removeEventListener(u.type,u.attachedListener,wa(u.optionsOrUseCapture));return t.removeChild(n),e}return t.dispatchEvent(e)},Bt.prototype.focus=function(e){v(this._fragmentFiber.child,!0,sp,e,void 0,void 0)};function sp(e,t){return e.tag===6?!1:(e=U(e),ex(e,t))}Bt.prototype.focusLast=function(e){var t=[];v(this._fragmentFiber.child,!0,yo,t,void 0,void 0);for(var l=t.length-1;0<=l&&!sp(t[l],e);l--);};function yo(e,t){return t.push(e),!1}Bt.prototype.blur=function(){var e=z(this._fragmentFiber);e!==null&&(e=U(e),e=Mi(e).activeElement,e!==null&&v(this._fragmentFiber.child,!1,Vy,e,void 0,void 0))};function Vy(e,t){return e.tag===6?!1:(e=U(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Bt.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),v(this._fragmentFiber.child,!1,Gy,e,void 0,void 0)};function Gy(e,t){return e.tag===6||(e=U(e),t.observe(e)),!1}Bt.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),v(this._fragmentFiber.child,!1,Qy,e,void 0,void 0);for(var l=t=0;l<il.length;l++){var n=il[l];n.fragmentInstance===this&&n.observer===e?e.unobserve(n.instance):il[t++]=n}il.length=t}};function Qy(e,t){return e.tag===6||(e=U(e),t.unobserve(e)),!1}var il=[],xo=!1;function Xy(e,t,l){il.push({fragmentInstance:e,observer:t,instance:l}),xo||(xo=!0,tx(function(){xo=!1;var n=il;il=[];for(var a=0;a<n.length;a++){var u=n[a];u.observer.unobserve(u.instance)}}))}Bt.prototype.getClientRects=function(){var e=[];return v(this._fragmentFiber.child,!1,Zy,e,void 0,void 0),e};function Zy(e,t){if(e.tag===6){e=e.stateNode;var l=e.ownerDocument.createRange();l.selectNodeContents(e),t.push.apply(t,l.getClientRects())}else e=U(e),t.push.apply(t,e.getClientRects());return!1}Bt.prototype.getRootNode=function(e){var t=z(this._fragmentFiber);return t===null?this:U(t).getRootNode(e)},Bt.prototype.compareDocumentPosition=function(e){var t=z(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];v(this._fragmentFiber.child,!1,yo,l,void 0,void 0);var n=U(t);if(l.length===0){if(l=n,k(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(l=t)}t=this._fragmentFiber;var a=n=l.compareDocumentPosition(e);return l===e?a=Node.DOCUMENT_POSITION_CONTAINS:n&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=Q(t)[1],l===null?a=Node.DOCUMENT_POSITION_PRECEDING:(e=U(l).compareDocumentPosition(e),a=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),a|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=U(l[0]),a=U(l[l.length-1]);var u=k(this._fragmentFiber)?t.parentElement:n;if(u==null)return Node.DOCUMENT_POSITION_DISCONNECTED;n=u.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,u=u.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY;var d=t.compareDocumentPosition(e),h=a.compareDocumentPosition(e),y=d&Node.DOCUMENT_POSITION_CONTAINED_BY||h&Node.DOCUMENT_POSITION_CONTAINED_BY;return h=n&&u&&d&Node.DOCUMENT_POSITION_FOLLOWING&&h&Node.DOCUMENT_POSITION_PRECEDING,t=n&&t===e||u&&a===e||y||h?Node.DOCUMENT_POSITION_CONTAINED_BY:!n&&t===e||!u&&a===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:d,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Ky(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Ky(e,t,l,n,a){var u=En(a);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!u)e:{for(;u!==null;){if(u.tag===7&&(u===t||u.alternate===t)){l=!0;break e}u=u.return}l=!1}return l}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(u===null)return u=a.ownerDocument,a===u||a===u.documentElement||a===u.body;e:{for(u=t,t=z(t);u!==null;){if(!(u.tag!==5&&u.tag!==3&&u.tag!==27||u!==t&&u.alternate!==t)){u=!0;break e}u=u.return}u=!1}return u}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!u)&&!(t=u===l)&&(t=ce(l,u,L),t===null?t=!1:(v(t,!0,$,u,l),u=H,H=null,t=u!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!u)&&!(t=u===n)&&(t=ce(n,u,L),t===null?t=!1:(v(t,!0,V,u,n),u=H,W=H=null,t=u!==null)),t):!1}function rp(e,t){var l=e.ownerDocument.createRange();l.selectNodeContents(e),e=l.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Bt.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(o(566));var t=[];v(this._fragmentFiber.child,!1,yo,t,void 0,void 0);var l=e!==!1;if(t.length===0){var n=Q(this._fragmentFiber);if(n=l?n[1]||n[0]||z(this._fragmentFiber):n[0]||n[1],n===null)return;if(n.tag===6){e=U(n),rp(e,l);return}if(n=U(n),n.nodeType!==9){if(n.nodeType===11){l="host"in n?n.host:null,l!==null&&l.scrollIntoView(e);return}n.scrollIntoView(e)}}for(n=l?t.length-1:0;n!==(l?-1:t.length);){var a=t[n];a.tag===6?(a=U(a),rp(a,l)):U(a).scrollIntoView(e),n+=l?-1:1}};function Jy(e,t){return e=U(e),cp(e,t),!1}function cp(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function op(e,t){var l=t._eventListeners;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n];e.addEventListener(a.type,a.attachedListener,wa(a.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(u){for(var d=0,h=0;h<il.length;h++){var y=il[h];(y.fragmentInstance!==t||y.observer!==u||y.instance!==e)&&(il[d++]=y)}il.length=d,u.observe(e)}),cp(e,t))}function Iy(e,t){var l=t._eventListeners;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n];e.removeEventListener(a.type,a.attachedListener,wa(a.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(u){typeof u.rootMargin=="string"?Xy(t,u,e):u.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function bo(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":bo(l),du(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Fy(e,t,l,n){for(;e.nodeType===1;){var a=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Wa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=It(e.nextSibling),e===null)break}return null}function Wy(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=It(e.nextSibling),e===null))return null;return e}function dp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=It(e.nextSibling),e===null))return null;return e}function So(e){return e.data==="$?"||e.data==="$~"}function jo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Py(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var n=function(){t(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function It(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var _o=null;function fp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return It(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function hp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function ex(e,t){function l(){n=!0}if(e.ownerDocument.activeElement===e)return!0;var n=!1;try{e.ownerDocument.addEventListener("focus",l,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",l,!0)}return n}function tx(e){Pm(function(){Pm(function(t){return e(t)})})}function mp(e,t,l){switch(t=Mi(l),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function pp(e,t,l){for(var n in l){var a=l[n];l.hasOwnProperty(n)&&a!=null&&ze(e,t,n,null,Oy,a)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===cl&&(e.onclick=null),du(e)}function Eo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);du(e)}var Ft=new Map,gp=new Set;function Ui(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Bl=ne.d;ne.d={f:lx,r:nx,D:ax,C:ix,L:ux,m:sx,X:cx,S:rx,M:ox};function lx(){var e=Bl.f(),t=ms();return e||t}function nx(e){var t=Wn(e);t!==null&&t.tag===5&&t.type==="form"?yh(t):Bl.r(e)}var Ma=typeof document>"u"?null:document;function vp(e,t,l){var n=Ma;if(n&&typeof t=="string"&&t){var a=Vt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),gp.has(a)||(gp.add(a),e={rel:e,crossOrigin:l,href:t},n.querySelector(a)===null&&(t=n.createElement("link"),ot(t,"link",e),et(t),n.head.appendChild(t)))}}function ax(e){Bl.D(e),vp("dns-prefetch",e,null)}function ix(e,t){Bl.C(e,t),vp("preconnect",e,t)}function ux(e,t,l){Bl.L(e,t,l);var n=Ma;if(n&&e&&t){var a='link[rel="preload"][as="'+Vt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+Vt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+Vt(l.imageSizes)+'"]')):a+='[href="'+Vt(e)+'"]';var u=a;switch(t){case"style":u=Ua(e);break;case"script":u=Ha(e)}if(!(Ft.has(u)||(e=ee({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Ft.set(u,e),n.querySelector(a)!==null||t==="style"&&n.querySelector(Hi(u))||t==="script"&&n.querySelector(ki(u))))){var d=n.createElement("link");ot(d,"link",e),t==="style"&&(d[ou]=!0,d.onload=d.onerror=function(){Cd(d)}),et(d),n.head.appendChild(d)}}}function sx(e,t){Bl.m(e,t);var l=Ma;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Vt(n)+'"][href="'+Vt(e)+'"]',u=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ha(e)}if(!Ft.has(u)&&(e=ee({rel:"modulepreload",href:e},t),Ft.set(u,e),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ki(u)))return}n=l.createElement("link"),ot(n,"link",e),et(n),l.head.appendChild(n)}}}function rx(e,t,l){Bl.S(e,t,l);var n=Ma;if(n&&e){var a=Pn(n).hoistableStyles,u=Ua(e);t=t||"default";var d=a.get(u);if(!d){var h={loading:0,preload:null};if(d=n.querySelector(Hi(u)))h.loading=5;else{e=ee({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Ft.get(u))&&To(e,l);var y=d=n.createElement("link");et(y),ot(y,"link",e),y._p=new Promise(function(N,A){y.onload=N,y.onerror=A}),y.addEventListener("load",function(){h.loading|=1}),y.addEventListener("error",function(){h.loading|=2}),h.loading|=4,Ss(d,t,n)}d={type:"stylesheet",instance:d,count:1,state:h},a.set(u,d)}}}function cx(e,t){Bl.X(e,t);var l=Ma;if(l&&e){var n=Pn(l).hoistableScripts,a=Ha(e),u=n.get(a);u||(u=l.querySelector(ki(a)),u||(e=ee({src:e,async:!0},t),(t=Ft.get(a))&&No(e,t),u=l.createElement("script"),et(u),ot(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(a,u))}}function ox(e,t){Bl.M(e,t);var l=Ma;if(l&&e){var n=Pn(l).hoistableScripts,a=Ha(e),u=n.get(a);u||(u=l.querySelector(ki(a)),u||(e=ee({src:e,async:!0,type:"module"},t),(t=Ft.get(a))&&No(e,t),u=l.createElement("script"),et(u),ot(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(a,u))}}function yp(e,t,l,n){var a=(a=Yl.current)?Ui(a):null;if(!a)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Ua(l.href),t=Pn(a).hoistableStyles,n=t.get(l),n||(n={type:"style",instance:null,count:0,state:null},t.set(l,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Ua(l.href);var u=Pn(a).hoistableStyles,d=u.get(e);if(d||(a=a.ownerDocument||a,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=a.querySelector(Hi(e)))?u._p||(d.instance=u,d.state.loading=5):(u=Ft.get(e),u||(u={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ft.set(e,u)),dx(a,e,u,d.state))),t&&n===null)throw Error(o(528,""));return d}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=Ha(l),t=Pn(a).hoistableScripts,n=t.get(l),n||(n={type:"script",instance:null,count:0,state:null},t.set(l,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Ua(e){return'href="'+Vt(e)+'"'}function Hi(e){return'link[rel="stylesheet"]['+e+"]"}function xp(e){return ee({},e,{"data-precedence":e.precedence,precedence:null})}function dx(e,t,l,n){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[ou]!==!0){n.loading=1;return}}else t=e.createElement("link"),t[ou]=!0,t.onload=t.onerror=Cd.bind(null,t),ot(t,"link",l),et(t),e.head.appendChild(t);n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2})}function Ha(e){return'[src="'+Vt(e)+'"]'}function ki(e){return"script[async]"+e}function bp(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Vt(l.href)+'"]');if(n)return t.instance=n,et(n),n;var a=ee({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),et(n),ot(n,"style",a),Ss(n,l.precedence,e),t.instance=n;case"stylesheet":a=Ua(l.href);var u=e.querySelector(Hi(a));if(u)return t.state.loading|=4,t.instance=u,et(u),u;n=xp(l),(a=Ft.get(a))&&To(n,a),u=(e.ownerDocument||e).createElement("link"),et(u);var d=u;return d._p=new Promise(function(h,y){d.onload=h,d.onerror=y}),ot(u,"link",n),t.state.loading|=4,Ss(u,l.precedence,e),t.instance=u;case"script":return u=Ha(l.src),(a=e.querySelector(ki(u)))?(t.instance=a,et(a),a):(n=l,(a=Ft.get(u))&&(n=ee({},l),No(n,a)),e=e.ownerDocument||e,a=e.createElement("script"),et(a),ot(a,"link",n),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Ss(n,l.precedence,e));return t.instance}function Ss(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,u=a,d=0;d<n.length;d++){var h=n[d];if(h.dataset.precedence===t)u=h;else if(u!==a)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function To(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function No(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var js=null;function Sp(e,t,l){if(js===null){var n=new Map,a=js=new Map;a.set(l,n)}else a=js,n=a.get(l),n||(n=new Map,a.set(l,n));if(n.has(e))return n;for(n.set(e,null),l=l.getElementsByTagName(e),a=0;a<l.length;a++){var u=l[a];if(!(u[Wa]||u[it]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var d=u.getAttribute(t)||"";d=e+d;var h=n.get(d);h?h.push(u):n.set(d,[u])}}return n}function Ro(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function fx(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function jp(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function _p(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ep(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Tp(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Ep(t),e.suspenseyImages.push(t)),e=px.bind(e),t.decode().then(e,e))}function hx(e,t,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var a=Ua(n.href),u=t.querySelector(Hi(a));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Bi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,et(u);return}u=t.ownerDocument||t,n=xp(n),(a=Ft.get(a))&&To(n,a),u=u.createElement("link"),et(u);var d=u;d._p=new Promise(function(h,y){d.onload=h,d.onerror=y}),ot(u,"link",n),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Bi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var _s=0;function mx(e,t){return e.stylesheets&&e.count===0&&Ts(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&Ts(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&_s===0&&(_s=62500*Dy());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ts(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>_s?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function Np(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Ts(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Bi(){this.count--,Np(this)}function px(){this.imgCount--,Np(this)}var Es=null;function Ts(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Es=new Map,t.forEach(gx,e),Es=null,Bi.call(e))}function gx(e,t){if(!(t.state.loading&4)){var l=Es.get(e);if(l)var n=l.get(null);else{l=new Map,Es.set(e,l);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<a.length;u++){var d=a[u];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(l.set(d.dataset.precedence,d),n=d)}n&&l.set(null,n)}a=t.instance,d=a.getAttribute("data-precedence"),u=l.get(d)||n,u===n&&l.set(null,a),l.set(d,a),this.count++,n=Bi.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),u?u.parentNode.insertBefore(a,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var ka={$$typeof:Pe,Provider:null,Consumer:null,_currentValue:_l,_currentValue2:_l,_threadCount:0};function vx(e,t,l,n,a,u,d,h,y){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ur(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ur(0),this.hiddenUpdates=ur(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=u,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.transitionTypes=null,this.incompleteTransitions=new Map}function Rp(e,t,l,n,a,u,d,h,y,N,A,w){return e=new vx(e,t,l,d,y,N,A,w,h),t=1,u===!0&&(t|=24),u=_t(3,null,null,t),e.current=u,u.stateNode=e,t=$r(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:n,isDehydrated:l,cache:t},Qr(u),e}function zp(e){return e?(e=ca,e):ca}function Cp(e,t,l,n,a,u){a=zp(a),n.context===null?n.context=a:n.pendingContext=a,n=Pl(t),n.payload={element:l},u=u===void 0?null:u,u!==null&&(n.callback=u),l=en(e,n,t),l!==null&&(Rt(l,e,t),pi(l,e,t))}function Op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function zo(e,t){Op(e,t),(e=e.alternate)&&Op(e,t)}function Ap(e){if(e.tag===13||e.tag===31){var t=zn(e,67108864);t!==null&&Rt(t,e,67108864),zo(e,67108864)}}function Dp(e){if(e.tag===13||e.tag===31){var t=kt();t=sr(t);var l=zn(e,t);l!==null&&Rt(l,e,t),zo(e,t)}}var Ba=!0;function yx(e,t,l,n){var a=K.T;K.T=null;var u=ne.p;try{ne.p=2,Co(e,t,l,n)}finally{ne.p=u,K.T=a}}function xx(e,t,l,n){var a=K.T;K.T=null;var u=ne.p;try{ne.p=8,Co(e,t,l,n)}finally{ne.p=u,K.T=a}}function Co(e,t,l,n){if(Ba){var a=Oo(n);if(a===null)co(e,t,n,Ns,l),Mp(e,n);else if(Sx(a,e,t,l,n))n.stopPropagation();else if(Mp(e,n),t&4&&-1<bx.indexOf(e)){for(;a!==null;){var u=Wn(a);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var d=_n(u.pendingLanes);if(d!==0){var h=u;for(h.pendingLanes|=2,h.entangledLanes|=2;d;){var y=1<<31-Ot(d);h.entanglements[1]|=y,d&=~y}xl(u),(Se&6)===0&&(ds=zt()+500,Ai(0))}}break;case 31:case 13:h=zn(u,2),h!==null&&Rt(h,u,2),ms(),zo(u,2)}if(u=Oo(n),u===null&&co(e,t,n,Ns,l),u===a)break;a=u}a!==null&&n.stopPropagation()}else co(e,t,n,null,l)}}function Oo(e){return e=mr(e),Ao(e)}var Ns=null;function Ao(e){if(Ns=null,e=En(e),e!==null){var t=p(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=m(t),e!==null)return e;e=null}else if(l===31){if(e=g(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ns=e,null}function wp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Dv()){case vd:return 2;case yd:return 8;case iu:case wv:return 32;case xd:return 268435456;default:return 32}default:return 32}}var Do=!1,hn=null,mn=null,pn=null,Li=new Map,qi=new Map,gn=[],bx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Mp(e,t){switch(e){case"focusin":case"focusout":hn=null;break;case"dragenter":case"dragleave":mn=null;break;case"mouseover":case"mouseout":pn=null;break;case"pointerover":case"pointerout":Li.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qi.delete(t.pointerId)}}function $i(e,t,l,n,a,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:l,eventSystemFlags:n,nativeEvent:u,targetContainers:[a]},t!==null&&(t=Wn(t),t!==null&&Ap(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Sx(e,t,l,n,a){switch(t){case"focusin":return hn=$i(hn,e,t,l,n,a),!0;case"dragenter":return mn=$i(mn,e,t,l,n,a),!0;case"mouseover":return pn=$i(pn,e,t,l,n,a),!0;case"pointerover":var u=a.pointerId;return Li.set(u,$i(Li.get(u)||null,e,t,l,n,a)),!0;case"gotpointercapture":return u=a.pointerId,qi.set(u,$i(qi.get(u)||null,e,t,l,n,a)),!0}return!1}function Up(e){var t=En(e.target);if(t!==null){var l=p(t);if(l!==null){if(t=l.tag,t===13){if(t=m(l),t!==null){e.blockedOn=t,Nd(e.priority,function(){Dp(l)});return}}else if(t===31){if(t=g(l),t!==null){e.blockedOn=t,Nd(e.priority,function(){Dp(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Oo(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);hr=n,l.target.dispatchEvent(n),hr=null}else return t=Wn(l),t!==null&&Ap(t),e.blockedOn=l,!1;t.shift()}return!0}function Hp(e,t,l){Rs(e)&&l.delete(t)}function jx(){Do=!1,hn!==null&&Rs(hn)&&(hn=null),mn!==null&&Rs(mn)&&(mn=null),pn!==null&&Rs(pn)&&(pn=null),Li.forEach(Hp),qi.forEach(Hp)}function zs(e,t){e.blockedOn===t&&(e.blockedOn=null,Do||(Do=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,jx)))}var Cs=null;function kp(e){Cs!==e&&(Cs=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Cs===e&&(Cs=null);for(var t=0;t<e.length;t+=3){var l=e[t],n=e[t+1],a=e[t+2];if(typeof n!="function"){if(Ao(n||l)===null)continue;break}var u=Wn(l);u!==null&&(e.splice(t,3),t-=3,fc(u,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function La(e){function t(y){return zs(y,e)}hn!==null&&zs(hn,e),mn!==null&&zs(mn,e),pn!==null&&zs(pn,e),Li.forEach(t),qi.forEach(t);for(var l=0;l<gn.length;l++){var n=gn[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<gn.length&&(l=gn[0],l.blockedOn===null);)Up(l),l.blockedOn===null&&gn.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],u=l[n+1],d=a[jt]||null;if(typeof u=="function")d||kp(l);else if(d){var h=null;if(u&&u.hasAttribute("formAction")){if(a=u,d=u[jt]||null)h=d.formAction;else if(Ao(a)!==null)continue}else h=d.action;typeof h=="function"?l[n+1]=h:(l.splice(n,3),n-=3),kp(l)}}}function Bp(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(d){return a=d})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function wo(e){this._internalRoot=e}Os.prototype.render=wo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var l=t.current,n=kt();Cp(l,n,e,t,null,null)},Os.prototype.unmount=wo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cp(e.current,2,null,e,null,null),ms(),t[Fn]=null}};function Os(e){this._internalRoot=e}Os.prototype.unstable_scheduleHydration=function(e){if(e){var t=Td();e={blockedOn:null,target:e,priority:t};for(var l=0;l<gn.length&&t!==0&&t<gn[l].priority;l++);gn.splice(l,0,e),l===0&&Up(e)}};var Lp=r.version;if(Lp!=="19.3.0")throw Error(o(527,Lp,"19.3.0"));ne.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=b(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var _x={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:K,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var As=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!As.isDisabled&&As.supportsFiber)try{Ja=As.inject(_x),Ct=As}catch{}}return Vi.createRoot=function(e,t){if(!f(e))throw Error(o(299));var l=!1,n="",a=zh,u=Ch,d=Oh;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=Rp(e,1,!1,null,null,l,n,null,a,u,d,Bp),e[Fn]=t.current,ro(e),new wo(t)},Vi.hydrateRoot=function(e,t,l){if(!f(e))throw Error(o(299));var n=!1,a="",u=zh,d=Ch,h=Oh,y=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(d=l.onCaughtError),l.onRecoverableError!==void 0&&(h=l.onRecoverableError),l.formState!==void 0&&(y=l.formState)),t=Rp(e,1,!0,t,l??null,n,a,y,u,d,h,Bp),t.context=zp(null),l=t.current,n=kt(),n=sr(n),a=Pl(n),a.callback=null,en(l,a,n),l=n,t.current.lanes=l,Fa(t,l),xl(t),e[Fn]=t.current,ro(e),new Os(t)},Vi.version="19.3.0",Vi}var Jp;function wx(){if(Jp)return Uo.exports;Jp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(r){console.error(r)}}return i(),Uo.exports=Dx(),Uo.exports}var Mx=wx(),R=id();/**
|
|
50
|
+
* @license lucide-react v0.577.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const Tg=(...i)=>i.filter((r,c,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===c).join(" ").trim();/**
|
|
55
|
+
* @license lucide-react v0.577.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/const Ux=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
60
|
+
* @license lucide-react v0.577.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const Hx=i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,c,o)=>o?o.toUpperCase():c.toLowerCase());/**
|
|
65
|
+
* @license lucide-react v0.577.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const Ip=i=>{const r=Hx(i);return r.charAt(0).toUpperCase()+r.slice(1)};/**
|
|
70
|
+
* @license lucide-react v0.577.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/var kx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
75
|
+
* @license lucide-react v0.577.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const Bx=i=>{for(const r in i)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};/**
|
|
80
|
+
* @license lucide-react v0.577.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const Lx=R.forwardRef(({color:i="currentColor",size:r=24,strokeWidth:c=2,absoluteStrokeWidth:o,className:f="",children:p,iconNode:m,...g},x)=>R.createElement("svg",{ref:x,...kx,width:r,height:r,stroke:i,strokeWidth:o?Number(c)*24/Number(r):c,className:Tg("lucide",f),...!p&&!Bx(g)&&{"aria-hidden":"true"},...g},[...m.map(([b,j])=>R.createElement(b,j)),...Array.isArray(p)?p:[p]]));/**
|
|
85
|
+
* @license lucide-react v0.577.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const Sl=(i,r)=>{const c=R.forwardRef(({className:o,...f},p)=>R.createElement(Lx,{ref:p,iconNode:r,className:Tg(`lucide-${Ux(Ip(i))}`,`lucide-${i}`,o),...f}));return c.displayName=Ip(i),c};/**
|
|
90
|
+
* @license lucide-react v0.577.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const qx=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ng=Sl("external-link",qx);/**
|
|
95
|
+
* @license lucide-react v0.577.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const $x=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],Yx=Sl("git-pull-request",$x);/**
|
|
100
|
+
* @license lucide-react v0.577.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const Vx=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Gx=Sl("menu",Vx);/**
|
|
105
|
+
* @license lucide-react v0.577.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const Qx=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Xx=Sl("message-circle-question-mark",Qx);/**
|
|
110
|
+
* @license lucide-react v0.577.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const Zx=[["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"}]],Kx=Sl("moon",Zx);/**
|
|
115
|
+
* @license lucide-react v0.577.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const Jx=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Ix=Sl("rotate-ccw",Jx);/**
|
|
120
|
+
* @license lucide-react v0.577.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const Fx=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Wx=Sl("settings",Fx);/**
|
|
125
|
+
* @license lucide-react v0.577.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const Px=[["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"}]],e1=Sl("shield-check",Px);/**
|
|
130
|
+
* @license lucide-react v0.577.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const t1=[["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"}]],l1=Sl("sun",t1);/**
|
|
135
|
+
* @license lucide-react v0.577.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const n1=[["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"}]],Fp=Sl("triangle-alert",n1);function Wt(i){const r=Math.abs(i);return`$${r===0?"0.000":r<.01?i.toFixed(3):i.toFixed(2)}`}const Wp=new Set(["VERIFIED","ALREADY_SATISFIED"]),Zs=i=>{if(i.tampered)return"TAMPERED";if(typeof i.verdict!="string")return i.verdict;const r=i.verdict.trim().toUpperCase();return i.attested===!1?Wp.has(r)?"UNVERIFIED":`${i.verdict} (unattested)`:Wp.has(r)?i.sig_checked===!1?`${r} (signature not checked)`:r:i.verdict},Fi=()=>globalThis.LOKI_CONTROL_BASE??"",Pp="loki-control-token";function St(){var i,r;try{const c=/[#&]token=([^&]+)/.exec(((i=globalThis.location)==null?void 0:i.hash)??"");return c!=null&&c[1]&&(sessionStorage.setItem(Pp,decodeURIComponent(c[1])),(r=globalThis.history)==null||r.replaceState(null,"",globalThis.location.pathname+globalThis.location.search)),sessionStorage.getItem(Pp)}catch{return null}}const Wi=(i={})=>{const r=St();return r?{...i,authorization:`Bearer ${r}`}:i};async function ud(i){const r=await fetch(`${Fi()}${i}`,{headers:Wi()});if(!r.ok)throw new Error(`${i}: HTTP ${r.status}`);return await r.json()}function $l(i={}){const r=new URLSearchParams;for(const[o,f]of Object.entries(i))f&&r.set(o,f);const c=r.toString();return ud(`/v1/runs${c?`?${c}`:""}`)}function Pi(i,r){return ud(`/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`)}async function sd(i,r,c){const o=await fetch(`${Fi()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/answer`,{method:"POST",headers:Wi({"content-type":"application/json"}),body:JSON.stringify({answer:c})}),f=await o.json();if(!o.ok)throw new Error(f.error??`HTTP ${o.status}`);return{path:f.path??"",resume:f.resume??""}}async function Rg(i,r){const c=await fetch(`${Fi()}${i}`,{method:"POST",headers:Wi({"content-type":"application/json"}),body:JSON.stringify(r)}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??`HTTP ${c.status}`);return o}const a1=()=>Rg("/v1/import",{}),zg=()=>ud("/v1/repos");function Cg(i,r=3e3){const c=new AbortController,o=f=>new Promise(p=>{const m=setTimeout(p,f);c.signal.addEventListener("abort",()=>{clearTimeout(m),p()},{once:!0})});return(async()=>{for(;!c.signal.aborted;){try{const f=await fetch(`${Fi()}/v1/stream`,{headers:Wi({accept:"text/event-stream"}),signal:c.signal});if(f.ok&&f.body){const p=f.body.getReader(),m=new TextDecoder;let g="";for(;;){const{value:x,done:b}=await p.read();if(b)break;g+=m.decode(x,{stream:!0});const j=g.split(`
|
|
140
|
+
|
|
141
|
+
`);g=j.pop()??"",j.some(v=>/^event: run$/m.test(v))&&i()}}}catch{}await o(r)}})(),()=>c.abort()}const i1=(i,r)=>Rg("/v1/start",{target:i,repo:r});async function u1(i,r){const c=await fetch(`${Fi()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`,{method:"DELETE",headers:Wi({"content-type":"application/json"})}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??`HTTP ${c.status}`);return{ok:!0,removed:o.removed??{runs:0,events:0,sources:0},remaining_runs:o.remaining_runs??0}}const M=i=>`var(--cp-${i})`,s1=(...i)=>i.filter(Boolean).join(" ")||void 0,Og={success:M("success-muted"),warning:M("warning-muted"),error:M("error-muted"),info:M("info-muted"),neutral:M("bg-3")},rd={success:M("success-ink"),warning:M("warning-ink"),error:M("error-ink"),info:M("info-ink"),neutral:M("text-2")};function Qe({interactive:i,compact:r,style:c,className:o,children:f,...p}){return s.jsx("div",{...p,"data-cp":"card","data-interactive":i?"true":void 0,className:s1("cp-card",o),style:{background:M("card"),border:`1px solid ${M("border")}`,borderRadius:M("radius-lg"),padding:r?10:16,transition:`transform ${M("dur-fast")} ${M("ease")}, box-shadow ${M("dur-fast")} ${M("ease")}`,...i?{cursor:"pointer",boxShadow:M("shadow-sm")}:null,...c},children:f})}function $a({label:i,value:r,icon:c,trend:o,trendTone:f="neutral",series:p,compact:m}){const g=p&&p.length>1?p:null;let x=null;if(g){const b=Math.min(...g),j=Math.max(...g),v=j-b||1,z=g.map((k,Q)=>`${Q?"L":"M"}${(Q/(g.length-1)*80).toFixed(1)} ${(22-(k-b)/v*20).toFixed(1)}`).join(" ");x=s.jsx("svg",{"data-cp":"sparkline",width:80,height:24,viewBox:"0 0 80 24","aria-hidden":"true",children:s.jsx("path",{d:z,fill:"none",stroke:M("accent"),strokeWidth:1.5})})}return s.jsxs(Qe,{"data-cp-kind":"kpi",style:{padding:m?"10px 12px":"14px 16px",display:"flex",gap:10,alignItems:"center"},children:[c?s.jsx("span",{style:{width:28,height:28,borderRadius:6,background:M("accent-muted"),color:M("accent"),display:"inline-flex",alignItems:"center",justifyContent:"center"},children:c}):null,s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsx("div",{style:{fontSize:M("text-sm"),color:M("text-2")},children:i}),s.jsx("div",{style:{fontFamily:M("font-mono"),fontSize:m?20:28,fontWeight:500,lineHeight:1.2},children:r})]}),o?s.jsx("span",{style:{fontSize:11,borderRadius:3,padding:"1px 6px",background:Og[f],color:rd[f]},children:o}):null,x]})}const r1={VERIFIED:"success",PARTIAL:"warning",FAILED:"error",SPEC_CONFLICT:"info",BLOCKED:"info",running:"neutral",TAMPERED:"error",UNSIGNED:"warning",NOT_VERIFIED:"warning",UNCHECKED:"warning",UNVERIFIED:"warning","VERIFIED (signature not checked)":"info"},pe={VERIFIED:"VERIFIED",PARTIAL:"PARTIAL",FAILED:"FAILED",SPEC_CONFLICT:"SPEC_CONFLICT",BLOCKED:"BLOCKED",TAMPERED:"TAMPERED",UNVERIFIED:"UNVERIFIED",VERIFIED_UNCHECKED:"VERIFIED (signature not checked)",RUNNING:"running"},c1=[pe.VERIFIED,pe.VERIFIED_UNCHECKED,pe.UNVERIFIED,pe.TAMPERED,pe.PARTIAL,pe.FAILED,pe.SPEC_CONFLICT];function Yt(i){var r;return i?i.tampered===!0||i.integrity===pe.TAMPERED||((r=i.receipt)==null?void 0:r.verdict)===pe.TAMPERED||i.verdict===pe.TAMPERED?pe.TAMPERED:Zs({verdict:i.verdict??null,tampered:!1,attested:i.attested??void 0,sig_checked:i.sig_checked??void 0}):null}const Ga=i=>Yt(i)===pe.VERIFIED;function Oe({tone:i="neutral",pulse:r,children:c,...o}){return s.jsxs("span",{...o,"data-cp":"badge","data-tone":i,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 10px",borderRadius:M("radius-full"),fontSize:M("text-xs"),textTransform:"uppercase",letterSpacing:"0.025em",fontWeight:500,background:Og[i],color:rd[i],...o.style},children:[r?s.jsx("span",{className:"cp-pulse","aria-hidden":"true",style:{width:6,height:6,borderRadius:"50%",background:"currentColor"}}):null,c]})}function $t({verdict:i,run:r,style:c}){const o=r?Yt(r):i??null;return o?s.jsx(Oe,{tone:r1[o]??"neutral",pulse:o===pe.RUNNING,"data-verdict":o,title:c?o:void 0,style:c,children:o}):s.jsx(Oe,{pulse:!0,style:c,children:"running"})}const o1={active:M("success-fill"),idle:M("text-muted"),paused:M("warning-fill"),error:M("error-fill")};function Ag({state:i="idle",label:r}){return s.jsx("span",{role:"img","aria-label":r??i,"data-cp":"status-dot","data-state":i,className:i==="active"?"cp-pulse":void 0,style:{display:"inline-block",width:12,height:6,borderRadius:2,background:o1[i]}})}const d1={primary:{background:M("accent-solid"),color:"#ffffff",border:"1px solid transparent"},secondary:{background:M("bg-3"),color:M("text"),border:`1px solid ${M("border")}`},ghost:{background:"transparent",color:M("text-2"),border:"1px solid transparent"},danger:{background:M("error"),color:"#ffffff",border:"1px solid transparent"}};function Ce({variant:i="primary",size:r="md",style:c,type:o="button",...f}){const p=r==="sm"?"4px 12px":r==="lg"?"12px 24px":"8px 18px";return s.jsx("button",{...f,type:o,"data-cp":"button","data-variant":i,"data-size":r,style:{padding:p,borderRadius:M("radius-full"),fontSize:M(r==="sm"?"text-base":"text-md"),fontWeight:500,cursor:f.disabled?"not-allowed":"pointer",opacity:f.disabled?.5:1,...d1[i],...c}})}const Dg={background:M("bg-3"),border:`1px solid ${M("border")}`,borderRadius:M("radius-md"),padding:"8px 12px",fontSize:M("text-md"),color:M("text"),width:"100%",fontFamily:"inherit"};function Za({style:i,onFocus:r,onBlur:c,...o}){const[f,p]=R.useState(!1);return s.jsx("input",{...o,"data-cp":"input",onFocus:m=>{p(!0),r==null||r(m)},onBlur:m=>{p(!1),c==null||c(m)},style:{...Dg,...f?{borderColor:M("accent"),boxShadow:M("focus"),outline:"none"}:null,...i}})}function wg({style:i,onFocus:r,onBlur:c,...o}){const[f,p]=R.useState(!1);return s.jsx("textarea",{...o,"data-cp":"textarea",onFocus:m=>{p(!0),r==null||r(m)},onBlur:m=>{p(!1),c==null||c(m)},style:{...Dg,resize:"vertical",...f?{borderColor:M("accent"),boxShadow:M("focus"),outline:"none"}:null,...i}})}function bl({label:i,value:r,icon:c,options:o,onSelect:f}){const[p,m]=R.useState(!1),g=R.useId();return s.jsxs("span",{style:{position:"relative",display:"inline-block"},children:[s.jsxs("button",{type:"button","data-cp":"chip","aria-haspopup":o?"menu":void 0,"aria-expanded":o?p:void 0,"aria-controls":o&&p?g:void 0,onClick:()=>o&&m(x=>!x),style:{display:"inline-flex",alignItems:"center",gap:6,borderRadius:999,padding:"4px 10px",fontSize:M("text-base"),background:M("card"),border:`1px solid ${M("border")}`,color:M("text"),cursor:"pointer"},children:[c,s.jsx("span",{style:{color:M("text-2")},children:i}),r?s.jsx("span",{style:{fontWeight:500},children:r}):null]}),o&&p?s.jsx("div",{id:g,role:"menu",style:{position:"absolute",top:"100%",left:0,marginTop:4,minWidth:140,zIndex:400,background:M("bg"),border:`1px solid ${M("border")}`,borderRadius:M("radius-lg"),boxShadow:M("shadow-lg"),padding:4},children:o.map(x=>s.jsx("button",{role:"menuitem",type:"button",onClick:()=>{f==null||f(x.value),m(!1)},style:{display:"block",width:"100%",textAlign:"left",padding:"6px 10px",borderRadius:M("radius-md"),background:"transparent",border:0,color:M("text"),fontSize:M("text-base"),cursor:"pointer"},children:x.label},x.value))}):null]})}function Kn({columns:i,rows:r,caption:c}){return s.jsx(Qe,{style:{padding:0,overflow:"auto"},children:s.jsxs("table",{"data-cp":"table",style:{width:"100%",borderCollapse:"collapse",fontSize:M("text-base")},children:[c?s.jsx("caption",{style:{position:"absolute",left:-9999},children:c}):null,s.jsx("thead",{children:s.jsx("tr",{children:i.map(o=>s.jsx("th",{scope:"col",style:{textAlign:"left",padding:"10px 14px",fontSize:M("text-sm"),fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",color:M("text-2"),background:M("bg-3")},children:o},o))})}),s.jsx("tbody",{children:r.map((o,f)=>s.jsx("tr",{style:{borderTop:`1px solid ${M("border-light")}`},children:o.map((p,m)=>s.jsx("td",{style:{padding:"10px 14px"},children:p},m))},f))})]})})}function Mg({active:i,icon:r,children:c,href:o,onClick:f}){const p={position:"relative",display:"flex",alignItems:"center",gap:8,padding:"8px 12px",borderRadius:M("radius-nav"),fontSize:M("text-md"),fontWeight:500,textDecoration:"none",cursor:"pointer",border:0,width:"100%",textAlign:"left",background:i?M("accent-glow"):"transparent",color:M(i?"accent-ink":"text-2")},m=s.jsxs(s.Fragment,{children:[i?s.jsx("span",{"data-cp":"nav-bar","aria-hidden":"true",style:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",width:3,height:16,borderRadius:2,background:M("accent")}}):null,r,s.jsx("span",{children:c})]});return o?s.jsx("a",{"data-cp":"nav-item","data-active":i?"true":void 0,"aria-current":i?"page":void 0,href:o,onClick:f,style:p,children:m}):s.jsx("button",{type:"button","data-cp":"nav-item","data-active":i?"true":void 0,"aria-current":i?"page":void 0,onClick:f,style:p,children:m})}function Fo({children:i}){return s.jsx("div",{"data-cp":"group-head",style:{fontSize:9.5,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.09em",color:M("text-subtle"),padding:"4px 12px 5px"},children:i})}function f1({stages:i}){return s.jsx("ol",{"data-cp":"timeline",style:{listStyle:"none",margin:0,padding:0},children:i.map((r,c)=>s.jsxs("li",{"data-status":r.status,style:{display:"flex",gap:10,position:"relative",paddingBottom:c===i.length-1?0:14},children:[s.jsxs("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[s.jsx("span",{style:{width:10,height:10,borderRadius:"50%",background:r.status==="pending"?M("bg-3"):r.status==="neutral"?M("text-muted"):M(`${r.status}-fill`),border:`1px solid ${M("border")}`}}),c<i.length-1?s.jsx("span",{style:{flex:1,width:1,background:M("border")}}):null]}),s.jsxs("span",{style:{fontSize:M("text-base")},children:[r.label,r.duration?s.jsx("span",{style:{marginLeft:8,fontFamily:M("font-mono"),color:M("text-2")},children:r.duration}):null]})]},`${r.label}-${c}`))})}function h1({icon:i,title:r,meta:c,children:o,expandable:f,defaultOpen:p}){const[m,g]=R.useState(!!p),x=R.useId();return s.jsxs("div",{"data-cp":"message",style:{display:"flex",gap:12,padding:"8px 0"},children:[s.jsx("span",{style:{width:32,height:32,borderRadius:8,flex:"none",background:M("bg-3"),color:M("text-2"),display:"inline-flex",alignItems:"center",justifyContent:"center"},children:i}),s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsx("div",{style:{fontSize:M("text-md")},children:r}),c?s.jsx("div",{style:{fontFamily:M("font-mono"),fontSize:M("text-sm"),color:M("text-2")},children:c}):null,f?s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button","aria-expanded":m,"aria-controls":x,onClick:()=>g(b=>!b),style:{background:"transparent",border:0,padding:0,marginTop:4,color:M("accent"),fontSize:M("text-base"),cursor:"pointer"},children:m?"Hide details":"Show details"}),m?s.jsx(Qe,{id:x,style:{marginTop:6},children:o}):null]}):o]})]})}function $e({title:i,hint:r,action:c}){return s.jsxs("div",{"data-cp":"empty-state",style:{textAlign:"center",padding:"var(--cp-space-3xl) var(--cp-space-xl)",color:M("text-2")},children:[s.jsx("div",{style:{fontFamily:M("font-serif"),fontSize:M("text-2xl"),color:M("text")},children:i}),r?s.jsx("div",{style:{marginTop:8,fontSize:M("text-md")},children:r}):null,c?s.jsx("div",{style:{marginTop:16},children:c}):null]})}function We({size:i=16,label:r="Loading"}){return s.jsx("span",{role:"status","aria-label":r,"data-cp":"spinner",className:"cp-spinner",style:{display:"inline-block",width:i,height:i,borderRadius:"50%",border:`2px solid ${M("border")}`,borderTopColor:M("accent")}})}function m1({tone:i="neutral",children:r,onClose:c}){return s.jsxs("div",{role:i==="error"?"alert":"status","data-cp":"toast","data-tone":i,style:{position:"fixed",right:16,bottom:16,zIndex:600,display:"flex",gap:12,alignItems:"center",background:M("bg"),border:`1px solid ${M("border")}`,borderLeft:`3px solid ${rd[i]}`,borderRadius:M("radius-lg"),boxShadow:M("shadow-lg"),padding:"10px 14px",fontSize:M("text-md"),color:M("text")},children:[s.jsx("span",{children:r}),c?s.jsx("button",{type:"button","aria-label":"Dismiss",onClick:c,style:{background:"transparent",border:0,color:M("text-2"),cursor:"pointer"},children:"x"}):null]})}function p1(i,r){const c=R.useRef(null);return R.useEffect(()=>{var p;if(!i)return;const o=document.activeElement;(p=c.current)==null||p.focus();const f=m=>{m.key==="Escape"&&r()};return document.addEventListener("keydown",f),()=>{var m;document.removeEventListener("keydown",f),(m=o==null?void 0:o.focus)==null||m.call(o)}},[i,r]),c}function g1({open:i,title:r,onClose:c,side:o="right",children:f}){const p=p1(i,c),m=R.useId();return i?s.jsx("div",{"data-cp":"drawer-backdrop",onClick:c,style:{position:"fixed",inset:0,zIndex:300,background:"rgba(0,0,0,0.3)"},children:s.jsxs("aside",{ref:p,role:"dialog","aria-modal":"true","aria-labelledby":m,tabIndex:-1,"data-cp":"drawer","data-side":o,onClick:g=>g.stopPropagation(),style:{position:"absolute",top:0,bottom:0,[o]:0,width:"min(var(--cp-detail-w, 288px), 92vw)",background:M("bg"),color:M("text"),borderLeft:o==="right"?`1px solid ${M("border")}`:void 0,borderRight:o==="left"?`1px solid ${M("border")}`:void 0,boxShadow:M("shadow-lg"),padding:16,overflow:"auto"},children:[s.jsx("h2",{id:m,style:{margin:"0 0 12px",fontFamily:M("font-serif"),fontWeight:400,fontSize:"1.15rem"},children:r}),f]})}):null}function cd({children:i}){return s.jsx("kbd",{"data-cp":"kbd",style:{fontFamily:M("font-mono"),fontSize:M("text-sm"),padding:"1px 5px",borderRadius:M("radius-md"),background:M("bg-3"),border:`1px solid ${M("border")}`,color:M("text-2")},children:i})}const ql="unmeasured",eg=3e3,v1=["intake","plan","Wall","implement","verify","seal","PR"];function y1(i,r){const c=new Set,o=m=>i.find(g=>!c.has(g)&&g.stage.toLowerCase().includes(m.toLowerCase())),f=(m,g)=>{if(!g)return{name:m,status:"pending",elapsed_s:null};c.add(g);const x=g.started_at?Date.parse(g.started_at):NaN,b=g.ended_at?Date.parse(g.ended_at):g.status==="started"?r:NaN,j=Number.isNaN(x)||Number.isNaN(b)?null:Math.max(0,(b-x)/1e3),v=g.status==="started"?"running":g.status==="completed"?"done":"failed";return{name:m,status:v,elapsed_s:j}},p=v1.map(m=>f(m,o(m)));for(const m of i)c.has(m)||p.push(f(m.stage,m));return p}const x1=i=>i===null?ql:i>=60?`${Math.floor(i/60)}m ${Math.floor(i%60)}s`:`${i.toFixed(1)}s`,Ug=i=>i.cost_usd!==null&&i.cost_usd!==void 0?Wt(i.cost_usd):i.partial_usd?`at least ${Wt(i.partial_usd)} (rest ${ql})`:ql;function Hg(i,r,c){const[o,f]=R.useState({data:null,error:null});return R.useEffect(()=>{let p=!0,m;const g=()=>i().then(x=>{p&&(f({data:x,error:null}),c(x)&&(m=setTimeout(g,eg)))},x=>{p&&(f(b=>({data:b.data,error:x.message})),m=setTimeout(g,eg))});return g(),()=>{p=!1,clearTimeout(m)}},r),o}const Xn="rounded border border-slate-200 p-4 dark:border-slate-800",b1={pending:"text-slate-400",running:"text-sky-600 dark:text-sky-400",done:"text-emerald-600 dark:text-emerald-400",failed:"text-red-600"},S1=i=>i&&/^https?:\/\//.test(i)?i:null;function kg({source:i,run:r}){const{data:c,error:o}=Hg(()=>Pi(i,r),[i,r],b=>b.status==="running"),[,f]=R.useState(0),p=(c==null?void 0:c.status)==="running";if(R.useEffect(()=>{if(!p)return;const b=setInterval(()=>f(j=>j+1),1e3);return()=>clearInterval(b)},[p]),o&&!c)return s.jsxs("p",{role:"alert",className:"text-red-600",children:["Could not load run: ",o]});if(!c)return s.jsx("p",{className:"text-slate-500",children:"Loading run"});const m=y1(c.stages??[],Date.now()),g=c.files_touched??[],x=S1(c.pr_url);return s.jsxs("section",{"data-testid":"live-run",className:"space-y-4",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[s.jsx("h1",{className:"text-xl font-semibold",children:p?"Live run":"Run finished"}),s.jsx("span",{className:"break-all font-mono text-xs text-slate-500",children:c.run_id})]}),s.jsxs("div",{className:Xn,children:[s.jsx("h2",{className:"mb-2 text-sm font-semibold uppercase text-slate-500",children:"Stages"}),s.jsx("ol",{className:"space-y-2 text-sm",children:m.map(b=>s.jsxs("li",{"data-testid":"live-stage","data-status":b.status,className:"flex flex-wrap items-center justify-between gap-x-4",children:[s.jsx("span",{className:"font-medium",children:b.name}),s.jsxs("span",{className:b1[b.status],children:[b.status,", ",b.status==="pending"?"not started":x1(b.elapsed_s),", limit ",ql]})]},b.name))})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[s.jsxs("div",{className:Xn,children:[s.jsx("h2",{className:"mb-1 text-sm font-semibold uppercase text-slate-500",children:"Diff"}),s.jsxs("p",{"data-testid":"live-diff",children:[g.length," files, +/- ",ql]})]}),s.jsxs("div",{className:Xn,children:[s.jsx("h2",{className:"mb-1 text-sm font-semibold uppercase text-slate-500",children:"Cost so far"}),s.jsx("p",{"data-testid":"live-cost",children:Ug(c)})]}),s.jsxs("div",{className:Xn,children:[s.jsx("h2",{className:"mb-1 text-sm font-semibold uppercase text-slate-500",children:"Model"}),s.jsx("p",{"data-testid":"live-model",children:c.model??ql})]})]}),!p&&s.jsxs("div",{"data-testid":"live-outcome",className:Xn,children:[s.jsx("h2",{className:"mb-1 text-sm font-semibold uppercase text-slate-500",children:"Outcome"}),s.jsx("p",{className:`text-lg font-medium${c.tampered?" text-red-600":""}`,children:Yt(c)??ql}),s.jsxs("p",{className:"mt-1 flex flex-wrap gap-4 text-sm",children:[x?s.jsx("a",{"data-testid":"live-pr",href:x,target:"_blank",rel:"noreferrer",className:"text-sky-600 hover:underline dark:text-sky-400",children:"Pull request"}):s.jsx("span",{"data-testid":"live-pr",className:"text-slate-500",children:"no PR"}),c.receipt?s.jsxs("a",{"data-testid":"live-receipt",href:`#/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`,className:"text-sky-600 hover:underline dark:text-sky-400",children:["Receipt",c.receipt.signed?" (signed)":" (unsigned)"]}):s.jsx("span",{"data-testid":"live-receipt",className:"text-slate-500",children:"no receipt"})]})]}),s.jsx("a",{href:"#/overview",className:"inline-block py-2 text-sm text-sky-600 hover:underline dark:text-sky-400",children:"Overview"})]})}function j1(i,r){const c=new Date(r);c.setUTCHours(0,0,0,0);const o=c.getTime(),f={today:0,week:0,verified:0,unchecked:0,partial:0,failed:0,other:0,running:0,costUsd:0,unmeasuredRuns:0,prsOpened:0,last:[]};for(const p of i){const m=p.started_at?Date.parse(p.started_at):NaN;Number.isNaN(m)||(m>=o&&f.today++,m>=o-6*864e5&&f.week++);const g=Yt(p);g===pe.VERIFIED?f.verified++:g===pe.VERIFIED_UNCHECKED?f.unchecked++:g===pe.PARTIAL?f.partial++:g===pe.FAILED?f.failed++:g?f.other++:f.running++,p.cost_usd!==null&&p.cost_usd!==void 0?f.costUsd+=p.cost_usd:(f.unmeasuredRuns++,f.costUsd+=p.partial_usd??0),p.pr_url&&f.prsOpened++}return f.last=[...i].sort((p,m)=>Date.parse(m.started_at??"")-Date.parse(p.started_at??"")).slice(0,10),f}function Ll({id:i,label:r,value:c}){return s.jsxs("div",{className:Xn,children:[s.jsx("div",{className:"text-xs uppercase text-slate-500",children:r}),s.jsx("div",{"data-testid":i,className:"mt-1 text-lg font-semibold",children:c})]})}function _1({runs:i,now:r=Date.now()}){const c=j1(i,r),o=c.unmeasuredRuns===0?`${Wt(c.costUsd)}`:`${Wt(c.costUsd)} measured, ${c.unmeasuredRuns} run${c.unmeasuredRuns===1?"":"s"} ${ql}`;return s.jsxs("section",{"data-testid":"overview",className:"space-y-4",children:[s.jsx("h1",{className:"text-xl font-semibold",children:"Overview"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[s.jsx(Ll,{id:"ov-today",label:"Runs today",value:String(c.today)}),s.jsx(Ll,{id:"ov-week",label:"Runs, last 7 days",value:String(c.week)}),s.jsx(Ll,{id:"ov-verified",label:pe.VERIFIED,value:String(c.verified)}),s.jsx(Ll,{id:"ov-unchecked",label:"Signature not checked",value:String(c.unchecked)}),s.jsx(Ll,{id:"ov-partial",label:pe.PARTIAL,value:String(c.partial)}),s.jsx(Ll,{id:"ov-failed",label:pe.FAILED,value:String(c.failed)}),s.jsx(Ll,{id:"ov-cost",label:"Total cost",value:o}),s.jsx(Ll,{id:"ov-pr-opened",label:"PRs opened",value:String(c.prsOpened)}),s.jsx(Ll,{id:"ov-pr-merged",label:"PRs merged",value:ql})]}),s.jsxs("div",{className:Xn,children:[s.jsx("h2",{className:"mb-2 text-sm font-semibold uppercase text-slate-500",children:"Last 10 runs"}),s.jsx("ul",{className:"space-y-1 text-sm",children:c.last.map(f=>s.jsxs("li",{"data-testid":"ov-run",className:"flex flex-wrap justify-between gap-x-4",children:[s.jsx("a",{href:`#/runs/${encodeURIComponent(f.source_id)}/${encodeURIComponent(f.run_id)}`,className:"break-all py-1 font-mono text-xs text-sky-600 hover:underline dark:text-sky-400",children:f.run_id}),s.jsxs("span",{className:f.tampered?"text-red-600":void 0,children:[Yt(f)??"in progress",", ",Ug(f)]})]},`${f.source_id}/${f.run_id}`))})]})]})}function Bg({fallback:i,overview:r}){const{data:c}=Hg(()=>$l(),[],f=>f.runs.some(p=>p.status==="running"));if(!c)return s.jsx("p",{className:"text-slate-500",children:"Loading runs"});if(c.runs.length===0)return s.jsx(s.Fragment,{children:i});const o=c.runs.find(f=>f.status==="running");return o&&!r?s.jsx(kg,{source:o.source_id,run:o.run_id}):s.jsx(_1,{runs:c.runs})}const Ks=new Map,Wo=new Set;let Lg=0;const qg=()=>{Lg++;for(const i of Wo)i()};function qt(i){Ks.set(i.id,i),qg()}function tg(i){Ks.delete(i)&&qg()}const $g=()=>[...Ks.values()],E1=()=>$g().filter(i=>i.inSettings),Yg=i=>(Wo.add(i),()=>{Wo.delete(i)}),qs=()=>Lg;function Qa(i){const c=(i.replace(/^#/,"").split("?")[0]??"").replace(/\/+$/,"");return c===""?"/":c.startsWith("/")?c:`/${c}`}function T1(i,r){const c=i.split("/").filter(Boolean),o=r.split("/").filter(Boolean);if(c.length!==o.length)return null;const f={};for(let p=0;p<c.length;p++){const m=c[p];if(m.startsWith(":"))try{f[m.slice(1)]=decodeURIComponent(o[p])}catch{return null}else if(m!==o[p])return null}return f}function N1(i){const r=Qa(i);let c=null;for(const o of Ks.values()){const f=T1(o.path,r);if(!f)continue;const p=o.path.split("/").filter(m=>m&&!m.startsWith(":")).length;(!c||p>c.score)&&(c={page:o,params:f,score:p})}return c?{page:c.page,params:c.params}:null}async function R1(i){const r=globalThis.LOKI_CONTROL_BASE??"",c=St(),o=await fetch(`${r}/v1/stats/cost?group=${i}`,{headers:c?{authorization:`Bearer ${c}`}:{}});if(!o.ok)throw new Error(`/v1/stats/cost: HTTP ${o.status}`);return await o.json()}const Zn=Wt,Ds=i=>i.toLocaleString("en-US"),lg=[{value:"day",label:"Day"},{value:"model",label:"Model"},{value:"repo",label:"Repo"},{value:"provider",label:"Provider"}];function z1({budget:i}){const r=c=>`${c} run${c===1?"":"s"}`;return s.jsxs(Qe,{"data-testid":"cost-budget",style:{display:"flex",flexDirection:"column",gap:6},children:[s.jsxs("div",{"data-testid":"cost-budget-subscription",children:[s.jsx(Oe,{tone:"info",children:"Subscription runs"})," ","no cap (",r(i.subscription_runs),"): usage counts against your plan limits, no dollar figure is measured."]}),s.jsxs("div",{"data-testid":"cost-budget-api",children:[s.jsx(Oe,{tone:"warning",children:"API-key runs"})," ",Zn(i.api_key_default_cap_usd)," cap per run by default (",r(i.api_key_runs),"); ",s.jsx("code",{children:"--max-cost"})," and loki.yaml ",s.jsx("code",{children:"budgets.per_run"})," override it."]})]})}function C1({row:i,max:r}){const c=o=>r>0?`${o/r*100}%`:"0%";return s.jsxs("div",{"data-testid":"cost-bar",role:"img","aria-label":`measured ${Zn(i.measured_usd)}, partial ${Zn(i.partial_usd)}`,style:{display:"flex",height:8,minWidth:120,background:"var(--cp-bg-3)",borderRadius:4,overflow:"hidden"},children:[s.jsx("span",{"data-part":"measured",style:{width:c(i.measured_usd),background:"var(--cp-accent)"}}),s.jsx("span",{"data-part":"partial",style:{width:c(i.partial_usd),background:"var(--cp-warning-fill)"}})]})}function O1(){const[i,r]=R.useState("day"),[c,o]=R.useState(null),[f,p]=R.useState(null);if(R.useEffect(()=>{let b=!0;return o(null),p(null),R1(i).then(j=>{b&&o(j)},j=>{b&&p(j.message)}),()=>{b=!1}},[i]),f)return s.jsx($e,{title:"Cost unavailable",hint:f});if(!c)return s.jsx(We,{label:"Loading cost"});const m=c.totals,g=Math.max(0,...c.rows.map(b=>b.measured_usd+b.partial_usd)),x=lg.find(b=>b.value===i).label;return s.jsxs("div",{"data-testid":"cost-page",style:{display:"flex",flexDirection:"column",gap:16},children:[s.jsx("h1",{style:{margin:0,fontFamily:"var(--cp-font-serif)",fontWeight:400},children:"Cost and usage"}),s.jsx(z1,{budget:c.budget}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:12},children:[s.jsx($a,{label:"Measured",value:s.jsx("span",{"data-testid":"cost-measured",children:Zn(m.measured_usd)}),trend:`${m.measured_runs} runs`,trendTone:"success"}),s.jsx($a,{label:"Partial (priced sessions only)",value:s.jsx("span",{"data-testid":"cost-partial",children:Zn(m.partial_usd)}),trend:`${m.partial_runs} runs`,trendTone:"warning"}),s.jsx($a,{label:"Unmeasured",value:s.jsxs("span",{"data-testid":"cost-unmeasured",children:[m.unmeasured_runs," runs"]}),trend:"not measured"}),s.jsx($a,{label:"Tokens in / out",value:s.jsxs("span",{"data-testid":"cost-tokens",children:[Ds(m.input_tokens)," / ",Ds(m.output_tokens)]})})]}),s.jsx("div",{children:s.jsx(bl,{label:"Group by",value:x,options:lg,onSelect:b=>r(b)})}),c.rows.length===0?s.jsx($e,{title:"No runs yet",hint:"Cost appears here once a run has been ingested."}):s.jsx(Kn,{caption:`Cost by ${x}`,columns:[x,"Runs","Measured","Partial","Unmeasured","Tokens in","Tokens out","Spend"],rows:c.rows.map(b=>[b[i]??"unknown",b.runs,b.measured_runs?Zn(b.measured_usd):"not measured",b.partial_runs?`${Zn(b.partial_usd)} (partial)`:"none",b.unmeasured_runs?`${b.unmeasured_runs} not measured`:"none",Ds(b.input_tokens),Ds(b.output_tokens),s.jsx(C1,{row:b,max:g},"bar")])})]})}const A1={id:"cost",path:"/cost",title:"Cost and usage",component:O1};class Vg extends Error{constructor(r,c){super(c),this.status=r}}const D1=()=>globalThis.LOKI_CONTROL_BASE??"";async function od(i){const r=St(),c=await fetch(`${D1()}/v1/runs`,{method:"POST",headers:{"content-type":"application/json",...r?{authorization:`Bearer ${r}`}:{}},body:JSON.stringify(i)}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Vg(c.status,o.error??`HTTP ${c.status}`);return o}const Gg=async()=>{const i=await zg();return{repos:i.repos,defaultRepo:i.default_repo??null}},Qg=i=>i??"server directory",Xg=()=>globalThis.LOKI_CONTROL_BASE??"",Zg=(i={})=>{const r=St();return r?{...i,authorization:`Bearer ${r}`}:i};async function Kg(i,r){const c=await fetch(`${Xg()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/verify`,{method:"POST",headers:Zg({"content-type":"application/json"}),body:"{}"}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??`HTTP ${c.status}`);return o}async function w1(){const i=await fetch(`${Xg()}/v1/keys`,{headers:Zg()});if(i.status===404)return null;if(!i.ok)throw new Error(`/v1/keys: HTTP ${i.status}`);return await i.json()}function M1(i){const r=new Map;for(const c of i){if(!c.verdict||!c.started_at)continue;const o=c.started_at.slice(0,10),f=r.get(o)??{v:0,n:0};f.n++,Ga(c)&&f.v++,r.set(o,f)}return[...r.entries()].sort(([c],[o])=>c<o?-1:1).map(([c,o])=>({day:c,rate:o.v/o.n,total:o.n}))}const dd=()=>globalThis.LOKI_CONTROL_BASE??"",fd=()=>{const i=St();return i?{authorization:`Bearer ${i}`}:{}},hd=(i,r)=>`/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`;async function Jg(i,r,c){try{const o=await fetch(`${dd()}${hd(i,r)}/artifact/${c}`,{headers:fd()});return o.ok?await o.text():null}catch{return null}}async function U1(i,r,c=-1){const o=[];try{for(let f=c,p=0;p<200;p++){const m=f>=0?`?after=${f}&limit=1000`:"?limit=1000",g=await fetch(`${dd()}${hd(i,r)}/events${m}`,{headers:fd()});if(!g.ok)break;const x=await g.json(),b=x.events??[];if(o.push(...b),!x.has_more||b.length===0)break;f=b[b.length-1].seq}}catch{}return o}function H1(i,r){const c=i.split(`
|
|
142
|
+
|
|
143
|
+
`),o=c.pop()??"";for(const f of c){const p=f.split(`
|
|
144
|
+
`).filter(m=>m.startsWith("data:")).map(m=>m.slice(5).trim()).join("");if(!(!p||!/^event: event$/m.test(f)))try{r(JSON.parse(p))}catch{}}return o}async function k1(i,r,c,o,f){try{const p=await fetch(`${dd()}${hd(i,r)}/stream?after=${c()}`,{headers:{...fd(),accept:"text/event-stream"},signal:f});if(!p.ok||!p.body)return;const m=p.body.getReader(),g=new TextDecoder;let x="";for(;;){const{done:b,value:j}=await m.read();if(b)return;x=H1(x+g.decode(j,{stream:!0}),o)}}catch{}}const ng=i=>i&&typeof i=="object"?i:{},ag=i=>typeof i=="number"&&Number.isFinite(i)?i:null,ul=i=>typeof i=="string"&&i?i:null,qo=i=>{const r=i?Date.parse(i):NaN;return Number.isNaN(r)?null:r};function B1(i){const r=[],c=new Map,o=new Map,f=new Map;for(const m of i){const g=ng(m.data),x=m.stage??"";if(m.type==="session.started"&&x&&ul(g.model)&&f.set(x,ul(g.model)),m.type==="cost"&&x){const b=o.get(x)??{usd:0,unmeasured:!1,seen:!1},j=ag(g.usd);b.seen=!0,j===null?b.unmeasured=!0:b.usd+=j,o.set(x,b),ul(g.model)&&!f.has(x)&&f.set(x,ul(g.model))}}const p=m=>{const g=o.get(m);return g&&g.seen&&!g.unmeasured?g.usd:null};for(const m of i){const g=ng(m.data);if(m.type==="run.started")r.push({key:`s${m.seq}`,ts:m.ts??null,kind:"run",label:"Run started",duration_s:null,model:ul(g.model),cost_usd:null,outcome:"started",detail:ul(g.issue_ref)??void 0});else if(m.type==="stage.started"&&m.stage){const x={key:`s${m.seq}`,ts:m.ts??null,kind:"stage",label:m.stage,duration_s:null,model:f.get(m.stage)??null,cost_usd:p(m.stage),outcome:"running",startedMs:qo(m.ts)};c.set(m.stage,x),r.push(x)}else if((m.type==="stage.skipped"||m.type==="stage.failed")&&m.stage){const x=c.get(m.stage),b=ul(g.reason)??(m.type==="stage.skipped"?"no reason recorded":null),j=m.type==="stage.skipped"?"skipped":"failed";x?Object.assign(x,{outcome:j,detail:b??void 0,cost_usd:p(m.stage)}):r.push({key:`s${m.seq}`,ts:m.ts??null,kind:"stage",label:m.stage,duration_s:null,model:null,cost_usd:p(m.stage),outcome:j,detail:b??void 0}),c.delete(m.stage)}else if(m.type==="stage.completed"&&m.stage){const x=c.get(m.stage),b=ag(g.duration_s)??((x==null?void 0:x.startedMs)!=null&&qo(m.ts)!=null?(qo(m.ts)-x.startedMs)/1e3:null),j=ul(g.skipped_reason)??ul(g.reason),v=g.skipped===!0?"skipped":"completed";x?Object.assign(x,{duration_s:b,outcome:v,model:f.get(m.stage)??x.model,cost_usd:p(m.stage),detail:j??void 0}):r.push({key:`s${m.seq}`,ts:m.ts??null,kind:"stage",label:m.stage,duration_s:b,model:f.get(m.stage)??null,cost_usd:p(m.stage),outcome:v,detail:j??void 0}),c.delete(m.stage)}else m.type==="pr.opened"?r.push({key:`s${m.seq}`,ts:m.ts??null,kind:"pr",label:"Pull request opened",duration_s:null,model:null,cost_usd:null,outcome:g.draft===!0?"draft":"opened",detail:ul(g.url)??void 0}):m.type==="receipt.sealed"?r.push({key:`s${m.seq}`,ts:m.ts??null,kind:"receipt",label:"Receipt sealed",duration_s:null,model:null,cost_usd:null,outcome:g.signed===!0?"signed":"unsigned"}):m.type==="run.completed"&&r.push({key:`s${m.seq}`,ts:m.ts??null,kind:"verdict",label:"Run completed",duration_s:null,model:null,cost_usd:null,outcome:ul(g.verdict)??"no verdict"})}return r}const Te="unmeasured",L1={intake:"Read the issue and its comments",plan:"Named the files and tests in scope",implement:"Edited the code in an isolated worktree",fix:"Fixed what the failing checks reported",verify:"Ran the repo tests against the change",commit:"Committed the change to the run branch",wall:"Checked the run against its time budget",seal:"Signed a receipt with the diff hash","deep-verify":"Full suite and secret scan after the PR opens"};function q1(i){const r=i.detail?` (${i.detail})`:"";if(i.kind==="run")return`Run started${i.detail?` for ${i.detail}`:""}`;if(i.kind==="pr")return`Opened a ${i.outcome==="draft"?"draft ":""}pull request${r}`;if(i.kind==="receipt")return`Sealed the receipt, ${i.outcome}`;if(i.kind==="verdict")return`Run finished with verdict ${i.outcome}`;const c=L1[i.label]??`Stage ${i.label}`;return i.outcome==="failed"?`${c}: failed${r}`:i.outcome==="skipped"?`${c}: skipped${r}`:i.outcome==="running"?`${c}: in progress`:`${c}${r}`}function $1(i){const r=i?Date.parse(i):NaN;return Number.isNaN(r)?null:new Date(r).toISOString().slice(11,19)}function Y1(i){const r=[];let c=null;for(const o of i.split(`
|
|
145
|
+
`)){const f=/^diff --git a\/(.+?) b\/(.+)$/.exec(o);if(f){c={path:f[2],added:0,removed:0,kind:"modified"},r.push(c);continue}if(c)if(o.startsWith("new file mode"))c.kind="added";else if(o.startsWith("deleted file mode"))c.kind="deleted";else{if(o.startsWith("+++")||o.startsWith("---"))continue;o.startsWith("+")?c.added++:o.startsWith("-")&&c.removed++}}return r}function V1(i){const r=/^\s*\[([^\]]{1,40})\]\s*(.*)$/.exec(i);if(r)return{owner:r[1],text:r[2]};const c=/^(.*?)[\s,;(-]*\(?owner[:\s]+([A-Za-z0-9_@./-]{1,40})\)?\s*$/i.exec(i);return c?{owner:c[2],text:c[1]}:{owner:null,text:i}}function G1(i){const r=i.length,c=i.some(f=>f.status==="started"),o=i.filter(f=>f.status!=="started").length;return{n:Math.min(r,o+(c?1:0)),m:r,running:c}}function $s(i){return typeof i!="number"?Te:i>=3600?`${Math.floor(i/3600)}h ${Math.floor(i%3600/60)}m`:i>=60?`${Math.floor(i/60)}m ${Math.floor(i%60)}s`:`${i.toFixed(1)}s`}function Q1(i,r){const c=i?Y1(i):[];return c.length?{files:c,source:"patch"}:r&&r.files.length?{files:r.files.map(o=>({...o,kind:"modified"})),source:"git"}:null}const Ig=i=>i&&typeof i=="object"?i:{},bn=i=>typeof i=="string"&&i.trim()?i.trim():null,$o=(i,r=120)=>i.length>r?`${i.slice(0,r-3)}...`:i,X1=/time ?limit|timed out|time budget|over cap/i;function Z1(i){const r=new Map,c=[];let o=0;for(const g of i){const x=Ig(g.data);if(g.type==="test.result"){const b=bn(x.name);b&&r.set(b,{result:String(x.result??""),why:bn(x.first_error)??bn(x.reason)})}else if(g.type==="stage.completed"&&g.stage==="fix"&&x.killed===!0)o++;else if((g.type==="stage.failed"||g.type==="stage.skipped")&&g.stage){const b=bn(x.reason);b&&g.stage!=="fix"?c.push(`${g.stage}: ${$o(b)}`):b&&X1.test(b)&&o++}}const f=[],p=[...r].filter(([,g])=>g.result==="fail");p.length&&f.push(`verify: ${p.slice(0,3).map(([g,x])=>x.why?`${g} ${$o(x.why,90)}`:`${g} failed`).join("; ")}${p.length>3?`; ${p.length-3} more`:""}`);const m=[...r].filter(([,g])=>g.result==="not_run");!p.length&&m.length&&f.push(`verify: ${m.slice(0,3).map(([g,x])=>x.why?`${g} not run (${$o(x.why,60)})`:`${g} not run`).join("; ")}`);for(const g of c.slice(0,2))f.some(x=>x.includes(g))||f.push(g);return o&&f.push(`${o} fix round${o===1?"":"s"} hit time limits`),f.length?f.join("; "):null}function K1(i){if(!i)return null;let r;try{const f=JSON.parse(i);if(!f||typeof f!="object")return null;r=f}catch{return null}const c=Array.isArray(r.checks)?r.checks.map(Ig):null,o=f=>(c??[]).filter(p=>p.result===f).length;return{verdict:bn(r.verdict),diffSha:bn(r.diff_sha256),base:bn(r.base_sha),head:bn(r.head_sha),checks:c?{total:c.length,pass:o("pass")+o("flaky"),fail:o("fail"),notRun:o("not_run")}:null}}function J1(i,r){var f;const c=i.verdict?Zs(i)??i.verdict:null;if(!c||c.startsWith("VERIFIED")||c.startsWith("ALREADY_SATISFIED"))return null;const o=(f=i.integrity_reasons)==null?void 0:f[0];return((c==="TAMPERED"||c==="UNVERIFIED")&&o?`integrity: ${o}`:Z1(r))??`${Te}: the run's events name no failing check or stage reason`}const I1=Te;function F1(i){return i.cost_usd!==null&&i.cost_usd!==void 0?Wt(i.cost_usd):i.partial_usd?`at least ${Wt(i.partial_usd)} (${i.measured_sessions} of ${i.total_sessions} sessions measured)`:I1}function W1(i){const r=i.data,c=r==null?"":typeof r=="string"?r:JSON.stringify(r);return[i.type,i.stage,c.length>160?`${c.slice(0,160)}...`:c].filter(Boolean).join(" ")}function P1(i,r){const[c,o]=R.useState([]),f=R.useRef(-1);return R.useEffect(()=>{const p=new AbortController;f.current=-1;const m=g=>{const x=g.filter(b=>b.seq>f.current);x.length&&(f.current=x[x.length-1].seq,o(b=>[...b,...x].slice(-2e3)))};return(async()=>{for(m(await U1(i,r));!p.signal.aborted;)await k1(i,r,()=>f.current,g=>m([g]),p.signal),p.signal.aborted||await new Promise(g=>setTimeout(g,3e3))})(),()=>p.abort()},[i,r]),c}function Yo(i,r,c){const[o,f]=R.useState(void 0);return R.useEffect(()=>{let p=!0;return Jg(i,r,c).then(m=>{p&&f(m)}),()=>{p=!1}},[i,r,c]),o}const Po={completed:"var(--cp-term-green)",running:"var(--cp-term-purple)",failed:"var(--cp-term-red)",skipped:"var(--cp-term-amber)"},eb=i=>Po[i==="started"?"running":i]??"var(--cp-term-dim)";function Ya({color:i,pulse:r}){return s.jsx("span",{"aria-hidden":"true",className:r?"cp-pulse":void 0,style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:i,flexShrink:0}})}function tb({d:i}){return s.jsxs("aside",{className:"cp-term-side","data-testid":"run-stages","aria-label":"Stages",children:[s.jsx("div",{style:{color:"var(--cp-term-dim)",marginBottom:10,textTransform:"uppercase",letterSpacing:"0.12em",fontSize:10},children:"Stages"}),i.stages.length===0?s.jsx("div",{style:{color:"var(--cp-term-muted)"},children:"no stages recorded yet"}):null,i.stages.map((r,c)=>s.jsxs("div",{"data-testid":"run-stage","data-status":r.status,style:{display:"flex",alignItems:"center",gap:8,padding:"4px 0",color:r.status==="started"?"var(--cp-term-lilac)":"var(--cp-term-text)"},children:[s.jsx(Ya,{color:eb(r.status),pulse:r.status==="started"}),s.jsx("span",{className:"cp-trunc",style:{flex:1},children:r.stage}),r.reason?s.jsx("span",{"data-testid":"run-stage-reason",className:"cp-trunc",style:{maxWidth:80,color:"var(--cp-term-muted)"},title:r.reason,children:r.reason}):r.status==="skipped"?s.jsx("span",{"data-testid":"run-stage-reason",style:{color:"var(--cp-term-muted)"},children:"no reason recorded"}):null]},`${r.stage}-${c}`))]})}function lb({events:i,awaiting:r}){const c=B1(i);return c.length===0?s.jsx("div",{"data-testid":"run-timeline",style:{color:"var(--cp-term-muted)",fontSize:12},children:r?"Waiting for the first event":"No events recorded for this run."}):s.jsx("ol",{"data-testid":"run-timeline","aria-live":"polite",style:{listStyle:"none",margin:0,padding:0},children:c.map(o=>{const f=o.kind==="stage";return s.jsxs("li",{className:"cp-tl-row","data-testid":"timeline-line","data-outcome":o.outcome,children:[s.jsx("span",{"data-testid":"tl-time",style:{fontFamily:"var(--cp-font-mono)",color:"var(--cp-term-dim)"},children:$1(o.ts)??Te}),s.jsxs("span",{style:{display:"flex",alignItems:"flex-start",gap:6,fontFamily:"var(--cp-font-mono)",color:Po[o.outcome]??"var(--cp-term-lilac)"},children:[s.jsx("span",{style:{marginTop:6},children:s.jsx(Ya,{color:Po[o.outcome]??"var(--cp-term-purple)",pulse:o.outcome==="running"})}),s.jsx("strong",{"data-testid":"tl-label",className:"cp-trunc",style:{fontWeight:500},children:o.label})]}),s.jsx("span",{"data-testid":"tl-desc",style:{color:"var(--cp-term-text)"},children:q1(o)}),f?s.jsxs("span",{className:"cp-tl-meta",children:[s.jsx("span",{"data-testid":"tl-duration",children:typeof o.duration_s=="number"?$s(o.duration_s):o.outcome==="running"?"running":Te}),s.jsx("span",{"data-testid":"tl-model",children:o.model??Te}),s.jsx("span",{"data-testid":"tl-cost",children:o.cost_usd===null?Te:Wt(o.cost_usd)})]}):null]},o.key)})})}const nb={display:"flex",flexDirection:"column",gap:10};function eu({title:i,meta:r,children:c,testid:o}){return s.jsxs(Qe,{"data-testid":o,style:nb,children:[s.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,flexWrap:"wrap"},children:[s.jsx("h2",{className:"cp-display",style:{margin:0,fontSize:18},children:i}),r?s.jsx("span",{style:{color:"var(--cp-text-muted)",fontSize:"var(--cp-text-base)"},children:r}):null]}),c]})}function ab({d:i,patch:r}){const c=Q1(r,i.diff_stat),o=i.files_touched??[],f=(c==null?void 0:c.files)??null,p=(f==null?void 0:f.reduce((b,j)=>b+(j.added??0),0))??0,m=(f==null?void 0:f.reduce((b,j)=>b+(j.removed??0),0))??0,g={added:["+","var(--cp-success-ink)"],deleted:["-","var(--cp-error-ink)"],modified:["~","var(--cp-warning-ink)"]},x=(b,j)=>b===null?"binary":`${j}${b}`;return s.jsx(eu,{title:"Changed files",testid:"run-diff",meta:f&&f.length?`${f.length} files, +${p} -${m}${(c==null?void 0:c.source)==="git"?" (from the receipt's commit range)":""}`:o.length?`${o.length} files touched`:void 0,children:f&&f.length?s.jsx("ul",{style:{listStyle:"none",margin:0,padding:0,fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-base)"},children:f.map(b=>s.jsxs("li",{"data-testid":"changed-file",style:{display:"flex",gap:10,padding:"3px 0"},children:[s.jsx("span",{style:{color:g[b.kind][1],width:12},children:g[b.kind][0]}),s.jsx("span",{className:"cp-trunc",style:{flex:1},title:b.path,children:b.path}),s.jsx("span",{style:{color:"var(--cp-success-ink)"},children:x(b.added,"+")}),s.jsx("span",{style:{color:"var(--cp-error-ink)"},children:b.removed===null?"":x(b.removed,"-")})]},b.path))}):o.length?s.jsx("ul",{style:{listStyle:"none",margin:0,padding:0,fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-base)"},children:o.map(b=>s.jsxs("li",{"data-testid":"changed-file",className:"cp-trunc",title:b,children:[b," ",s.jsxs("span",{style:{color:"var(--cp-text-muted)"},children:["(line counts ",Te,")"]})]},b))}):s.jsx("span",{"data-testid":"changed-files-unmeasured",children:r===void 0?s.jsx(We,{label:"Loading diff"}):`Changed files ${Te}: no diff or commit range could be read for this run.`})})}const Vo=(i,r=12)=>i?i.slice(0,r):Te;function qa({k:i,children:r,testid:c}){return s.jsxs("div",{"data-testid":c,style:{display:"flex",gap:12,alignItems:"baseline",padding:"3px 0",borderBottom:"1px solid var(--cp-border)"},children:[s.jsx("span",{style:{width:120,flexShrink:0,color:"var(--cp-text-muted)"},children:i}),s.jsx("span",{style:{minWidth:0,overflowWrap:"anywhere"},children:r})]})}function ib({d:i,source:r,run:c,receipt:o,receiptJson:f}){var U,H,W,$,V;const[p,m]=R.useState({busy:!1}),[g,x]=R.useState(!1),b=((U=i.receipt)==null?void 0:U.sha256)??null,j=K1(f),v=async()=>{m({busy:!0});try{m({busy:!1,res:await Kg(r,c)})}catch(L){m({busy:!1,error:L.message})}},z=(j==null?void 0:j.base)??((H=i.diff_stat)==null?void 0:H.base)??null,k=(j==null?void 0:j.head)??((W=i.diff_stat)==null?void 0:W.head)??null,Q=i.receipt?i.receipt.signed?i.sig_checked?"signed, signature checked":"signed, signature not checked":"unsigned":Te,Z=j==null?void 0:j.checks;return s.jsxs(eu,{title:"Evidence and receipt",testid:"run-receipt",meta:b?`sha256 ${b.slice(0,16)}`:"no receipt",children:[s.jsxs("div",{"data-testid":"receipt-rows",style:{display:"flex",flexDirection:"column",fontSize:"var(--cp-text-base)"},children:[s.jsx(qa,{k:"Verdict",testid:"rr-verdict",children:(j==null?void 0:j.verdict)??(($=i.receipt)==null?void 0:$.verdict)?`receipt says ${(j==null?void 0:j.verdict)??((V=i.receipt)==null?void 0:V.verdict)}`:Te}),s.jsx(qa,{k:"Diff hash",testid:"rr-diff",children:s.jsx("code",{title:(j==null?void 0:j.diffSha)??void 0,children:Vo(j==null?void 0:j.diffSha,16)})}),s.jsx(qa,{k:"Base",testid:"rr-base",children:s.jsx("code",{title:z??void 0,children:Vo(z)})}),s.jsx(qa,{k:"Head",testid:"rr-head",children:s.jsx("code",{title:k??void 0,children:Vo(k)})}),s.jsx(qa,{k:"Signature",testid:"rr-sig",children:Q}),s.jsx(qa,{k:"Checks run",testid:"rr-checks",children:Z?Z.total===0?"none recorded":`${Z.total} run: ${Z.pass} passed, ${Z.fail} failed${Z.notRun?`, ${Z.notRun} not run`:""}`:Te})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[s.jsxs(Ce,{variant:"secondary",size:"sm","data-testid":"run-verify",disabled:!b||p.busy,onClick:()=>void v(),children:[s.jsx(e1,{size:13,"aria-hidden":"true"})," ",p.busy?"Verifying":"Verify"]}),s.jsx(Ce,{variant:"ghost",size:"sm","data-testid":"receipt-raw-toggle","aria-pressed":g,onClick:()=>x(L=>!L),children:g?"Hide raw":"Show raw"}),b?null:s.jsxs("span",{style:{color:"var(--cp-text-muted)"},children:["No receipt to verify ",Te,"."]}),p.res?s.jsxs("span",{"data-testid":"run-verify-result",role:"status",children:[s.jsx($t,{verdict:p.res.verdict})," ",p.res.reasons[0]??""]}):null,p.error?s.jsx("span",{role:"alert","data-testid":"run-verify-error",style:{color:"var(--cp-error-ink)"},children:p.error}):null]}),g?o===void 0?s.jsx(We,{label:"Loading receipt"}):o===null?s.jsx("div",{"data-testid":"receipt-raw",children:"Receipt text not available for this run."}):s.jsx("pre",{"data-testid":"receipt-raw",style:{margin:0,whiteSpace:"pre-wrap",fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-sm)",maxHeight:280,overflow:"auto",color:"var(--cp-text-2)"},children:o}):null]})}function ub({d:i}){return s.jsx(eu,{title:"NOT PROVEN",testid:"run-not-proven",meta:i.not_proven.length?`${i.not_proven.length} item${i.not_proven.length===1?"":"s"}`:void 0,children:i.not_proven.length?s.jsx("ul",{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:8},children:i.not_proven.map((r,c)=>{const o=V1(r);return s.jsxs("li",{"data-testid":"not-proven-item",style:{display:"flex",gap:10,alignItems:"flex-start",justifyContent:"space-between"},children:[s.jsx("span",{style:{minWidth:0},children:o.text}),s.jsxs(Oe,{tone:o.owner?"info":"neutral","data-testid":"not-proven-owner",style:{flexShrink:0,textTransform:"none"},children:["owner: ",o.owner??Te]})]},c)})}):s.jsx("span",{children:i.verdict?"Nothing listed as not proven.":"Not known until the run finishes."})})}function sb({source:i,run:r,question:c,onSent:o}){const[f,p]=R.useState(""),[m,g]=R.useState({busy:!1}),x=async()=>{g({busy:!0});try{await sd(i,r,f.trim()),g({busy:!1,sent:!0}),o()}catch(b){g({busy:!1,error:b.message})}};return s.jsxs(eu,{title:"Needs your answer",testid:"run-reply-card",meta:s.jsxs(Oe,{tone:"info",children:[s.jsx(Xx,{size:11,"aria-hidden":"true"})," BLOCKED"]}),children:[s.jsx("div",{children:c}),s.jsxs("div",{"data-testid":"run-reply",style:{display:"flex",flexDirection:"column",gap:8},children:[s.jsx(wg,{"aria-label":"Your reply",rows:3,value:f,onChange:b=>p(b.target.value),disabled:m.busy||m.sent}),s.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[s.jsx(Ce,{onClick:x,disabled:!f.trim()||m.busy||m.sent,children:"Send reply"}),m.sent?s.jsx("span",{role:"status",children:"Reply saved. Resume the run to continue."}):null,m.error?s.jsx("span",{role:"alert",style:{color:"var(--cp-error-ink)"},children:m.error}):null]})]})]})}function rb({d:i}){let r;return i.pr_url?r=/^https?:\/\//.test(i.pr_url)?s.jsxs("a",{href:i.pr_url,target:"_blank",rel:"noreferrer",style:{color:"var(--cp-accent-ink)",wordBreak:"break-all"},children:[i.pr_url," ",s.jsx(Ng,{size:12,"aria-hidden":"true"})]}):s.jsx("span",{children:i.pr_url}):i.verdict?i.verdict===pe.VERIFIED||i.verdict==="ALREADY_SATISFIED"?r=s.jsxs("span",{children:["No PR opened ",Te,": the run recorded no PR address."]}):r=s.jsxs("span",{children:["No PR opened: the run ended ",i.verdict,", and a PR opens only after the run verifies."]}):r=s.jsx("span",{children:"No PR yet: the run is still in progress."}),s.jsx(eu,{title:"Pull request",testid:"run-pr",meta:i.pr_draft?"draft":void 0,children:s.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[s.jsx(Yx,{size:14,"aria-hidden":"true"}),r]})})}function cb({source:i,run:r,slot:c,renderSlot:o}){const[f,p]=R.useState(null),[m,g]=R.useState(null),[x,b]=R.useState(!1),[j,v]=R.useState({busy:!1}),z=P1(i,r),k=Yo(i,r,"diff.patch"),Q=Yo(i,r,"receipt.md"),Z=Yo(i,r,"receipt.json"),U=R.useCallback(()=>{Pi(i,r).then(De=>{p(De),g(null)},De=>g(De.message))},[i,r]),H=!f||f.status==="running"||f.verdict===null;if(R.useEffect(()=>{if(U(),!H)return;const De=setInterval(U,4e3);return()=>clearInterval(De)},[U,H]),m&&!f)return s.jsx($e,{title:"Run not available",hint:m});if(!f)return s.jsx(We,{label:"Loading run"});const W=f.title??f.issue_ref??f.origin_repo??`Title ${Te}`,$=!!f.blocked_question,V=f.status==="running"||f.verdict===null&&!f.ended_at,L=G1(f.stages),ce=V?null:J1(f,z),ee=!V&&!!f.issue_ref,re=async()=>{v({busy:!0});try{await od({target:f.issue_ref}),v({busy:!1,msg:"Started a new run."})}catch(De){v({busy:!1,msg:De.message,error:!0})}};return s.jsxs("section",{"data-testid":"run-thread",style:{maxWidth:1100,margin:"0 auto",padding:"8px 0 32px",display:"flex",flexDirection:"column",gap:20},children:[s.jsxs("header",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:12},children:[s.jsxs("div",{style:{flex:"1 1 320px",minWidth:0},children:[s.jsxs("div",{className:"cp-eyebrow",children:[f.origin_repo??`repo ${Te}`,f.issue_ref&&f.title?` / ${f.issue_ref}`:""]}),s.jsx("h1",{"data-testid":"run-title",className:"cp-display",style:{margin:"4px 0 0",fontSize:30,overflowWrap:"anywhere"},children:W})]}),$?s.jsx($t,{verdict:pe.BLOCKED}):f.verdict?s.jsx($t,{run:f}):s.jsx(Oe,{pulse:!0,children:"running"}),s.jsx("span",{"data-testid":"run-elapsed",style:{fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-base)"},children:$s(f.elapsed_s??f.wall_s)}),s.jsx("span",{"data-testid":"run-cost",style:{fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-base)"},children:F1(f)}),s.jsxs("span",{"data-testid":"run-header-slot",style:{display:"inline-flex",gap:8},children:[c,o?o(f,U):null]}),o?null:s.jsxs(Ce,{variant:"secondary",size:"sm","data-testid":"run-retry",disabled:!ee||j.busy,title:V?"The run is still in progress":f.issue_ref?"Start this issue again":`No issue reference recorded ${Te}`,onClick:()=>void re(),children:[s.jsx(Ix,{size:13,"aria-hidden":"true"})," Retry"]}),j.msg?s.jsx("span",{role:j.error?"alert":"status","data-testid":"run-retry-msg",style:{color:j.error?"var(--cp-error-ink)":"var(--cp-text-2)",fontSize:"var(--cp-text-base)"},children:j.msg}):null]}),ce?s.jsxs("p",{"data-testid":"run-why",style:{margin:"-8px 0 0",fontSize:"var(--cp-text-md)",color:"var(--cp-text-2)",overflowWrap:"anywhere"},children:[s.jsx("strong",{style:{color:"var(--cp-text)"},children:"Why:"})," ",ce]}):null,f.blocked_question?s.jsx(sb,{source:i,run:r,question:f.blocked_question,onSent:U}):null,s.jsxs("div",{"data-testid":"run-summary",style:{display:"grid",gap:16,gridTemplateColumns:"repeat(auto-fit, minmax(min(100%, 440px), 1fr))",alignItems:"start"},children:[s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,minWidth:0},children:[s.jsx(ab,{d:f,patch:k}),s.jsx(ib,{d:f,source:i,run:r,receipt:Q,receiptJson:Z})]}),s.jsxs("div",{"data-testid":"run-aside",style:{display:"flex",flexDirection:"column",gap:16,minWidth:0},children:[s.jsx(ub,{d:f}),s.jsx(rb,{d:f})]})]}),s.jsxs("div",{className:"cp-term","data-testid":"run-panel",children:[s.jsxs("div",{className:"cp-term-bar",children:[s.jsxs("span",{style:{display:"inline-flex",gap:6},"aria-hidden":"true",children:[s.jsx(Ya,{color:"#FF5F57"}),s.jsx(Ya,{color:"#FEBC2E"}),s.jsx(Ya,{color:"#28C840"})]}),s.jsxs("span",{className:"cp-trunc",children:["Control Plane / ",f.model??`model ${Te}`]}),s.jsx("span",{children:f.provider??`provider ${Te}`})]}),s.jsxs("div",{className:"cp-term-body",children:[s.jsx(tb,{d:f}),s.jsx("div",{className:"cp-term-main",children:s.jsx(lb,{events:z,awaiting:V})})]}),s.jsxs("div",{className:"cp-term-foot",children:[s.jsx("span",{"data-testid":"run-progress",children:L.m?`stage ${L.n} / ${L.m}`:`stage ${Te}`}),V?s.jsxs("span",{"data-testid":"run-live",style:{display:"inline-flex",alignItems:"center",gap:8,color:"var(--cp-term-green)"},children:[s.jsx(Ya,{color:"var(--cp-term-green)",pulse:!0})," live"]}):s.jsx("span",{"data-testid":"run-ended",children:f.ended_at?"run ended":`end time ${Te}`})]})]}),s.jsxs("div",{children:[s.jsx(Ce,{variant:"ghost",size:"sm","data-testid":"run-raw-toggle","aria-pressed":x,onClick:()=>b(De=>!De),children:x?"Hide raw":"Show raw"}),x?s.jsxs("div",{"data-testid":"run-log",style:{marginTop:8},children:[s.jsx("pre",{"data-testid":"run-raw-json",style:{margin:0,padding:12,borderRadius:12,background:"var(--cp-term-bg)",color:"var(--cp-term-text)",fontFamily:"var(--cp-font-mono)",fontSize:11,maxHeight:360,overflow:"auto",whiteSpace:"pre-wrap"},children:JSON.stringify(f,null,2)}),s.jsx("div",{role:"log",style:{marginTop:8,maxHeight:280,overflow:"auto",fontFamily:"var(--cp-font-mono)",fontSize:11,color:"var(--cp-text-2)"},children:z.length===0?s.jsx("div",{children:"No events yet."}):z.map(De=>s.jsx("div",{children:`${De.seq} ${W1(De)}`},De.seq))})]}):null]})]})}function ob(){var r,c;const i=/\/runs?\/([^/]+)\/([^/?#]+)/.exec(((r=globalThis.location)==null?void 0:r.pathname)??"")??/#\/runs?\/([^/]+)\/([^/?#]+)/.exec(((c=globalThis.location)==null?void 0:c.hash)??"");return i?{source:decodeURIComponent(i[1]),run:decodeURIComponent(i[2])}:null}function db({source:i,run:r,slot:c,renderSlot:o}){const f=i&&r?{source:i,run:r}:ob();return f?s.jsx(cb,{source:f.source,run:f.run,slot:c,renderSlot:o}):s.jsx($e,{title:"No run selected",hint:"Open a run from Home or Runs."})}const Fg={id:"run",path:"/runs/:source/:run",title:"Run",component:db},ig=i=>Date.parse(i.started_at??i.last_event_at??""),fb=i=>{const r=new Date(i);return r.setHours(0,0,0,0),r.getTime()};function Wg(i,r){const c=fb(r),o={Today:[],Earlier:[]};for(const m of i){const g=ig(m),x=Number.isNaN(g)?"Earlier":g>=c?"Today":"Earlier";o[x].push(m)}const f=m=>{const g=ig(m);return Number.isNaN(g)?-1/0:g},p=[];for(const m of["Today","Earlier"])o[m].length&&p.push({name:m,runs:o[m].sort((g,x)=>f(x)-f(g))});return p}const Pg="loki-theme",Ys=new Set,hb=()=>{try{const i=localStorage.getItem(Pg);return i==="light"||i==="dark"?i:null}catch{return null}},ev=()=>{try{return typeof globalThis.matchMedia=="function"?globalThis.matchMedia("(prefers-color-scheme: dark)"):null}catch{return null}},tv=()=>{const i=ev();return i?i.matches?"dark":"light":"dark"};let Js=hb(),tu=Js??tv();function Is(i=tu){var c;const r=(c=globalThis.document)==null?void 0:c.documentElement;r&&(Js?r.setAttribute("data-theme",i):r.removeAttribute("data-theme"),r.classList.toggle("dark",i==="dark"))}function mb(i){tu=i,Js=i;try{localStorage.setItem(Pg,i)}catch{}Is(i);for(const r of Ys)r()}const Vs=()=>mb(tu==="dark"?"light":"dark");var Ls,Eg;(Eg=(Ls=ev())==null?void 0:Ls.addEventListener)==null||Eg.call(Ls,"change",()=>{if(!Js){tu=tv(),Is();for(const i of Ys)i()}});function lv(){return R.useSyncExternalStore(i=>(Ys.add(i),()=>{Ys.delete(i)}),()=>tu,()=>"dark")}const nv="min-h-11 rounded bg-sky-700 px-4 py-2 text-sm text-white disabled:opacity-50 md:min-h-0 md:px-3 md:py-1",ug="rounded border border-slate-300 bg-white px-2 py-2 text-sm md:py-1 dark:border-slate-700 dark:bg-slate-900",pb="loki start owner/repo#N";function av(){const[i,r]=R.useState(null),[c,o]=R.useState(!1),f=async()=>{o(!0);try{const p=await a1();r(p.failed.length?{ok:!1,text:`Imported ${p.runs} runs; ${p.failed.length} failed.`}:{ok:!0,text:p.runs===0?"No runs found in this folder.":`Imported ${p.runs} runs. Reload to see them.`})}catch(p){r({ok:!1,text:p.message})}o(!1)};return s.jsxs("div",{children:[s.jsx("button",{type:"button","data-testid":"import-runs",disabled:c,onClick:f,className:nv,children:"Import runs from this folder"}),i&&s.jsx("p",{role:i.ok?"status":"alert",className:`mt-2 text-sm ${i.ok?"text-emerald-600":"text-red-600"}`,children:i.text})]})}function iv({knownRepos:i}){const[r,c]=R.useState(""),[o,f]=R.useState(""),[p,m]=R.useState(i??[]),[g,x]=R.useState(null);R.useEffect(()=>{i||zg().then(j=>m(j.repos),()=>{})},[i]);const b=async()=>{try{const j=await i1(r.trim(),o);x({ok:!0,text:`Started: loki ${j.command}`}),c("")}catch(j){x({ok:!1,text:j.message})}};return s.jsxs("form",{"data-testid":"start-run",className:"mb-6 flex flex-col gap-2 sm:flex-row sm:items-end",onSubmit:j=>{j.preventDefault(),b()},children:[s.jsxs("label",{className:"flex flex-1 flex-col gap-1 text-sm",children:["Start a run",s.jsx("input",{"aria-label":"Issue or task",className:ug,value:r,onChange:j=>c(j.target.value),placeholder:"owner/repo#123 or a task",maxLength:500})]}),s.jsxs("label",{className:"flex flex-col gap-1 text-sm",children:["Repo",s.jsxs("select",{"aria-label":"Repo folder",className:ug,value:o,onChange:j=>f(j.target.value),children:[s.jsx("option",{value:"",children:"This folder"}),p.map(j=>s.jsx("option",{value:j,children:j},j))]})]}),s.jsx("button",{type:"submit",disabled:r.trim()==="",className:nv,children:"Start"}),g&&s.jsx("p",{role:g.ok?"status":"alert",className:`text-sm ${g.ok?"text-emerald-600":"text-red-600"}`,children:g.text})]})}function uv(){return s.jsxs("div",{"data-testid":"empty-state",className:"rounded border border-dashed border-slate-300 p-8 text-center dark:border-slate-700",children:[s.jsx("p",{className:"text-lg font-medium",children:"No runs yet"}),s.jsx("div",{className:"mt-4 flex justify-center",children:s.jsx(av,{})}),s.jsx("p",{className:"mt-6 text-sm text-slate-600 dark:text-slate-400",children:"Or start your first run from a terminal:"}),s.jsx("code",{className:"mt-2 inline-block rounded bg-slate-200 px-2 py-1 text-sm dark:bg-slate-800",children:pb})]})}function gb(){const i=lv();return s.jsxs("section",{children:[s.jsx("h2",{className:"mb-4 text-xl",style:{fontFamily:"var(--cp-font-serif)",fontWeight:400},children:"General"}),s.jsx("p",{className:"mb-2 text-sm",style:{color:"var(--cp-text-2)"},children:"Appearance"}),s.jsx(Ce,{variant:"secondary",onClick:Vs,children:i==="dark"?"Switch to light theme":"Switch to dark theme"}),s.jsx("div",{className:"mt-6",children:s.jsx(av,{})})]})}let ed=null;function sg(i){ed=i}function vb(){return ed?(ed(),!0):!1}function yb({active:i=!1,size:r=26}){const c=i?"var(--cp-accent)":"var(--cp-text)";return s.jsxs("svg",{"data-testid":"mascot","data-state":i?"active":"idle",role:"img","aria-label":i?"Loki, working":"Loki",width:r,height:r,viewBox:"0 0 32 32",children:[s.jsx("rect",{x:"3",y:"4",width:"26",height:"22",rx:"6",fill:"var(--cp-card)",stroke:"var(--cp-accent)",strokeWidth:"2"}),s.jsx("path",{d:"M3 10h26",stroke:"var(--cp-accent)",strokeWidth:"1.5",opacity:"0.5"}),s.jsx("circle",{cx:"12",cy:"17",r:"2",fill:c}),s.jsx("circle",{cx:"20",cy:"17",r:"2",fill:c}),s.jsx("path",{d:"M12.5 21.5c2 1.6 5 1.6 7 0",fill:"none",stroke:"var(--cp-text)",strokeWidth:"1.5",strokeLinecap:"round"}),s.jsx("path",{d:"M10 26v3M22 26v3",stroke:"var(--cp-accent)",strokeWidth:"2",strokeLinecap:"round"})]})}const je=i=>`var(--cp-${i})`;function xb(){var c;const[i,r]=R.useState(((c=globalThis.location)==null?void 0:c.hash)??"");return R.useEffect(()=>{const o=()=>r(location.hash);return o(),addEventListener("hashchange",o),()=>removeEventListener("hashchange",o)},[]),i}function sv(){const[i,r]=R.useState({runs:null,error:null}),c=R.useCallback(()=>{$l({}).then(o=>r({runs:o.runs,error:null}),o=>r(f=>({runs:f.runs,error:o.message})))},[]);return R.useEffect(()=>(c(),Cg(c)),[c]),i}const bb=i=>i.status==="running"||!i.verdict&&!i.ended_at?"active":i.verdict===pe.FAILED||Yt(i)===pe.TAMPERED?"error":"idle",rg=i=>i.title??i.issue_ref??i.run_id,Sb={display:"block",flex:"0 1 auto",minWidth:0,maxWidth:"46%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},rv=i=>`#/runs/${encodeURIComponent(i.source_id)}/${encodeURIComponent(i.run_id)}`;function jb({run:i,active:r,onNavigate:c}){const o={display:"flex",alignItems:"center",gap:8,padding:"7px 12px",borderRadius:je("radius-nav"),textDecoration:"none",color:je(r?"accent":"text"),background:r?je("accent-glow"):"transparent",fontSize:je("text-md")};return s.jsxs("a",{"data-testid":"session-row",href:rv(i),"aria-current":r?"page":void 0,onClick:c,style:o,children:[s.jsx(Ag,{state:bb(i)}),s.jsxs("span",{style:{minWidth:0,flex:1},children:[s.jsx("span",{title:rg(i),style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:rg(i)}),i.origin_repo||i.title&&i.issue_ref?s.jsx("span",{style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:je("text-sm"),color:je("text-muted")},children:[i.origin_repo,i.title?i.issue_ref:null].filter(Boolean).join(" · ")}):null]}),i.verdict?s.jsx($t,{run:i,style:Sb}):null]})}function _b({runs:i,error:r,now:c,activeHash:o,onNavigate:f}){if(!i)return r?s.jsxs("p",{role:"alert",style:{padding:"0 12px",color:je("error"),fontSize:je("text-sm")},children:["Could not load sessions: ",r]}):s.jsx("div",{style:{padding:12},children:s.jsx(We,{label:"Loading sessions"})});if(i.length===0)return s.jsx("p",{"data-testid":"sessions-empty",style:{padding:"0 12px",color:je("text-muted"),fontSize:je("text-sm")},children:"No sessions yet."});const p=Qa(o);return s.jsx("div",{"data-testid":"session-list",children:Wg(i,c).map(m=>s.jsxs("section",{"aria-label":m.name,style:{marginBottom:12},children:[s.jsx(Fo,{children:m.name}),m.runs.map(g=>s.jsx(jb,{run:g,active:Qa(rv(g))===p,onNavigate:f},`${g.source_id}/${g.run_id}`))]},m.name))})}function Eb(){const i=lv(),r=i==="dark"?"light":"dark";return s.jsxs("button",{type:"button","data-testid":"theme-toggle",onClick:Vs,"aria-label":`Switch to ${r} theme`,style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"7px 12px",marginTop:2,border:0,borderRadius:je("radius-nav"),background:"transparent",color:je("text-2"),cursor:"pointer",fontSize:je("text-md"),fontFamily:"inherit"},children:[i==="dark"?s.jsx(l1,{size:14,"aria-hidden":"true"}):s.jsx(Kx,{size:14,"aria-hidden":"true"}),i==="dark"?"Light theme":"Dark theme"]})}function cg({hash:i,onNavigate:r}){const{runs:c,error:o}=sv(),f=Qa(i);return s.jsxs(s.Fragment,{children:[s.jsxs("a",{href:"#/",onClick:r,style:{display:"flex",alignItems:"center",gap:8,padding:"4px 12px 12px",textDecoration:"none",color:je("text")},children:[s.jsx(yb,{active:!!(c!=null&&c.some(p=>p.status==="running"))}),s.jsx("span",{style:{fontFamily:je("font-serif"),fontSize:je("text-2xl")},children:"Loki Mode"})]}),s.jsx("div",{style:{flex:1,overflowY:"auto",padding:"0 8px"},children:s.jsx(_b,{runs:c,error:o,now:Date.now(),activeHash:i,onNavigate:r})}),s.jsxs("div",{style:{padding:8,borderTop:`1px solid ${je("border")}`},children:[s.jsx(Mg,{href:"#/settings",active:f.startsWith("/settings"),icon:s.jsx(Wx,{size:14,"aria-hidden":"true"}),onClick:r,children:"Settings"}),s.jsx(Eb,{})]})]})}const Tb={width:je("sidebar-w"),flexShrink:0,flexDirection:"column",height:"100vh",position:"sticky",top:0,paddingTop:16,background:je("glass"),borderRight:`1px solid ${je("glass-border")}`,boxShadow:je("glass-shadow")};function Nb({path:i}){const r=E1();if(r.length===0)return s.jsx($e,{title:"No settings available"});const c=r.find(f=>Qa(f.path)===i)??r[0],o=c.component;return s.jsxs("div",{"data-testid":"settings-area",style:{display:"flex",flexWrap:"wrap",gap:24},children:[s.jsxs("nav",{"aria-label":"Settings","data-testid":"settings-nav",style:{width:200,flexShrink:0},children:[s.jsx("h1",{style:{fontFamily:je("font-serif"),fontWeight:400,fontSize:je("text-2xl"),margin:"0 0 12px 12px"},children:"Settings"}),r.map(f=>s.jsx(Mg,{href:`#${f.path}`,active:f.id===c.id,children:f.title},f.id))]}),s.jsx("div",{style:{flex:1,minWidth:0},children:s.jsx(o,{params:{}})})]})}function Rb({hash:i}){R.useSyncExternalStore(Yg,qs,qs);const r=Qa(i);if(r==="/settings"||r.startsWith("/settings/"))return s.jsx(Nb,{path:r});const c=N1(i);if(!c)return s.jsx($e,{title:"Page not found",hint:s.jsx("a",{href:"#/",style:{color:je("accent")},children:"Back to home"})});const o=c.page.component;return s.jsx(o,{params:c.params})}function zb(){const i=xb(),[r,c]=R.useState(!1);return R.useEffect(()=>{Is()},[]),R.useEffect(()=>{const o=f=>{(f.metaKey||f.ctrlKey)&&f.key.toLowerCase()==="k"&&vb()&&f.preventDefault()};return addEventListener("keydown",o),()=>removeEventListener("keydown",o)},[]),s.jsxs("div",{"data-testid":"app-shell",className:"flex min-h-screen",style:{background:je("bg"),color:je("text"),fontFamily:je("font-sans")},children:[s.jsx("nav",{"data-testid":"nav","aria-label":"Sessions",className:"hidden md:flex",style:Tb,children:s.jsx(cg,{hash:i})}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsxs("header",{className:"flex items-center gap-2 p-2 md:hidden",style:{borderBottom:`1px solid ${je("border")}`},children:[s.jsx(Ce,{variant:"ghost","aria-label":"Open sessions","data-testid":"open-drawer",onClick:()=>c(!0),children:s.jsx(Gx,{size:16,"aria-hidden":"true"})}),s.jsx("span",{style:{fontFamily:je("font-serif"),fontSize:je("text-xl")},children:"Loki Mode"})]}),s.jsx("main",{"data-testid":"outlet",className:"min-w-0 flex-1 overflow-x-auto p-3 md:p-6",style:{maxWidth:"100%"},children:s.jsx(Rb,{hash:i})})]}),s.jsx(g1,{open:r,title:"Loki Mode",side:"left",onClose:()=>c(!1),children:s.jsx("div",{style:{display:"flex",flexDirection:"column",minHeight:"80vh"},children:s.jsx(cg,{hash:i,onNavigate:()=>c(!1)})})})]})}const Cb=()=>globalThis.LOKI_CONTROL_BASE??"";async function Ob(i){const r=St(),c=await fetch(`${Cb()}${i}`,{headers:r?{authorization:`Bearer ${r}`}:{}});if(!c.ok)throw new Error(`${i}: HTTP ${c.status}`);return await c.json()}const Ab=i=>Date.parse(i.started_at??i.last_event_at??""),Gi=i=>`${i.source_id}/${i.run_id}`,Gs=i=>i.title??i.issue_ref??i.run_id,Qs=i=>i.origin_repo??`repo ${Te}`;function cv(i,r){const c=Date.parse(i??"");if(Number.isNaN(c))return`time ${Te}`;const o=Math.max(0,Math.round((r-c)/1e3));return o<60?"just now":o<3600?`${Math.floor(o/60)}m ago`:o<86400?`${Math.floor(o/3600)}h ago`:`${Math.floor(o/86400)}d ago`}const Db=i=>i.cost_usd!==null&&i.cost_usd!==void 0?Wt(i.cost_usd):i.partial_usd?`at least ${Wt(i.partial_usd)}`:`cost ${Te}`,og=i=>{var o;const r=Array.isArray(i.files_touched)&&i.files_touched.length>0?i.files_touched.length:((o=i.diff_stat)==null?void 0:o.files.length)??0;if(r===0)return`files ${Te}`;const c=i.diff_stat&&i.diff_stat.files.length===r?`, +${i.diff_stat.added} -${i.diff_stat.removed}`:"";return`${r} file${r===1?"":"s"} touched${c}`};function wb(i,r){if(r!==void 0)return[`Blocked: needs answer. ${r??`question ${Te}`}`,`${Qs(i)}, waiting since ${cv(i.last_event_at??i.started_at,Date.now())}`];const c=Zs(i);if(c===null)return[`Running: stage ${i.current_stage??Te}`,`${$s(i.elapsed_s)} so far, ${og(i)}`];const o=`${og(i)}, ${Db(i)}, ${$s(i.wall_s)}`;return[{VERIFIED:"Done: the change was verified.",ALREADY_SATISFIED:"Done: already satisfied, nothing to change.",PARTIAL:"Partly done: some checks are not proven.",FAILED:"Failed: the run did not pass verification.",SPEC_CONFLICT:"Blocked: the spec conflicts, needs an answer.",TAMPERED:"Not trusted: the receipt failed its integrity check.",UNVERIFIED:"Done, but not verified: no attested receipt."}[c]??(c.startsWith("VERIFIED")?"Done: verified, signature not checked.":`Finished: ${c}`),o]}const Mb=[{value:"all",label:"All"},{value:"running",label:"Running"},{value:"VERIFIED",label:"Verified"},{value:"PARTIAL",label:"Partial"},{value:"FAILED",label:"Failed"},{value:"TAMPERED",label:"Tampered"}];function Ub(i,r,c){const o=Zs(i);if(c==="running"&&o!==null||c!=="all"&&c!=="running"&&o!==c)return!1;const f=r.trim().toLowerCase();return f?[Gs(i),i.origin_repo,i.issue_ref,i.run_id,i.provider,i.model].some(p=>(p??"").toLowerCase().includes(f)):!0}function Hb(i){const r=c=>{const o=Ab(c);return Number.isNaN(o)?-1/0:o};return[...i].sort((c,o)=>r(o)-r(c))}function kb(i){const r=new Map;for(const c of Hb(i)){const o=Qs(c);r.set(o,[...r.get(o)??[],c])}return[...r].map(([c,o])=>({repo:c,runs:o}))}const Bb=i=>`#/runs/${encodeURIComponent(i.source_id)}/${encodeURIComponent(i.run_id)}`,dg={display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",whiteSpace:"pre-line"};function Lb(i){return i.verdict===null?null:i.attested===!0&&i.sig_checked===!0?s.jsx(Oe,{tone:"success","data-testid":"badge-receipt",children:"Receipt signed"}):i.attested===!0&&i.sig_checked===!1?s.jsx(Oe,{tone:"warning","data-testid":"badge-receipt",children:"Receipt unchecked"}):i.attested===!1?s.jsx(Oe,{tone:"warning","data-testid":"badge-receipt",children:"No attested receipt"}):s.jsxs("span",{"data-testid":"badge-receipt",style:{fontSize:"var(--cp-text-sm)",color:"var(--cp-text-muted)"},children:["receipt ",Te]})}function td({run:i,now:r,question:c}){const[o,f]=wb(i,c);return s.jsx("a",{"data-testid":"session-card",href:Bb(i),style:{textDecoration:"none",color:"inherit",display:"block",minWidth:0},children:s.jsxs(Qe,{interactive:!0,style:{display:"flex",flexDirection:"column",gap:8,height:"100%"},children:[s.jsx("div",{"data-testid":"card-title",title:Gs(i),style:{fontWeight:600,fontSize:"var(--cp-text-md)",...dg,whiteSpace:"normal",overflowWrap:"anywhere"},children:Gs(i)}),s.jsxs("div",{"data-testid":"card-outcome",style:{...dg,fontSize:"var(--cp-text-base)",color:"var(--cp-text-2)",lineHeight:1.4},children:[o,`
|
|
146
|
+
`,f]}),s.jsxs("div",{style:{display:"flex",gap:6,flexWrap:"wrap",alignItems:"center"},children:[c!==void 0?s.jsx($t,{verdict:"BLOCKED"}):s.jsx($t,{run:i}),i.pr_url?s.jsx(Oe,{tone:"info","data-testid":"badge-pr",children:i.pr_draft?"Draft PR":"PR"}):null,Lb(i)]}),s.jsxs("div",{style:{display:"flex",gap:8,color:"var(--cp-text-muted)",fontSize:"var(--cp-text-sm)",marginTop:"auto",minWidth:0},children:[s.jsx("span",{title:Qs(i),style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:Qs(i)}),s.jsx("span",{style:{flexShrink:0},children:cv(i.last_event_at??i.started_at,r)})]})]})})}function qb({run:i,now:r}){const[c,o]=R.useState(void 0),[f,p]=R.useState(""),[m,g]=R.useState({});R.useEffect(()=>{let b=!0;return Pi(i.source_id,i.run_id).then(j=>b&&o(j.blocked_question??null),()=>b&&o(null)),()=>{b=!1}},[i.source_id,i.run_id]);const x=async()=>{if(!(!f.trim()||m.busy)){g({busy:!0});try{await sd(i.source_id,i.run_id,f.trim()),g({sent:!0})}catch(b){g({error:b.message})}}};return s.jsxs("div",{"data-testid":"needs-input-card",style:{display:"flex",flexDirection:"column",gap:6,minWidth:0},children:[s.jsx(td,{run:i,now:r,question:c===void 0?null:c}),c===null?null:s.jsxs("div",{style:{display:"flex",gap:6},children:[m.sent?s.jsx("span",{role:"status","data-testid":"answer-sent",style:{fontSize:"var(--cp-text-base)",color:"var(--cp-text-2)"},children:"Answer saved. Open the run to resume it."}):s.jsxs(s.Fragment,{children:[s.jsx("input",{"data-testid":"answer-input","aria-label":`Answer for ${Gs(i)}`,value:f,disabled:m.busy,placeholder:"Type your answer",onChange:b=>p(b.target.value),onKeyDown:b=>{b.key==="Enter"&&x()},style:{flex:1,minWidth:0,border:"1px solid var(--cp-border)",borderRadius:999,background:"var(--cp-card)",color:"var(--cp-text)",padding:"6px 12px",font:"inherit",fontSize:"var(--cp-text-base)"}}),s.jsx(Ce,{size:"sm","data-testid":"answer-send",disabled:!f.trim()||m.busy,onClick:()=>void x(),children:"Answer"})]}),m.error?s.jsx("span",{role:"alert","data-testid":"answer-error",style:{color:"var(--cp-error-ink)",fontSize:"var(--cp-text-sm)"},children:m.error}):null]})]})}const Go={display:"grid",gap:12,gridTemplateColumns:"repeat(auto-fill, minmax(260px, 1fr))"};function $b({runs:i,blocked:r,now:c}){const[o,f]=R.useState("recent"),[p,m]=R.useState(""),[g,x]=R.useState("all"),b=new Set(r.map(z=>`${z.source_id}/${z.run_id}`)),j=i.filter(z=>b.has(Gi(z))),v=R.useMemo(()=>i.filter(z=>!b.has(Gi(z))&&Ub(z,p,g)),[i,r,p,g]);return s.jsxs("section",{"data-testid":"cards",style:{display:"flex",flexDirection:"column",gap:20},children:[j.length>0?s.jsxs("div",{"data-testid":"needs-input",children:[s.jsxs("div",{className:"cp-eyebrow",style:{marginBottom:8},children:["NEEDS INPUT (",j.length,")"]}),s.jsx("div",{style:Go,children:j.map(z=>s.jsx(qb,{run:z,now:c},Gi(z)))})]}):null,s.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"center"},children:[s.jsx("div",{role:"tablist","aria-label":"Sessions view",style:{display:"inline-flex",gap:4},children:["recent","groups"].map(z=>s.jsx(Ce,{role:"tab","aria-selected":o===z,"data-testid":`tab-${z}`,size:"sm",variant:o===z?"primary":"ghost",onClick:()=>f(z),children:z==="recent"?"Recent":"Groups"},z))}),s.jsx("span",{style:{flex:1}}),s.jsx("input",{"data-testid":"card-search",type:"search","aria-label":"Search sessions",placeholder:"Search sessions",value:p,onChange:z=>m(z.target.value),style:{border:"1px solid var(--cp-border)",borderRadius:999,background:"var(--cp-card)",color:"var(--cp-text)",padding:"6px 12px",font:"inherit",fontSize:"var(--cp-text-base)",minWidth:160}}),s.jsx("div",{role:"group","aria-label":"Filter by verdict","data-testid":"card-filter",style:{display:"inline-flex",gap:4,flexWrap:"wrap"},children:Mb.map(z=>s.jsx(Ce,{size:"sm",variant:g===z.value?"primary":"ghost","aria-pressed":g===z.value,"data-testid":`filter-${z.value}`,onClick:()=>x(z.value),children:z.label},z.value))})]}),v.length===0?s.jsx("p",{"data-testid":"cards-empty",style:{color:"var(--cp-text-2)"},children:i.length===0?"No sessions yet.":"No sessions match."}):o==="recent"?Wg(v,c).map(z=>s.jsxs("div",{"data-testid":"card-group","aria-label":z.name,children:[s.jsx(Fo,{children:z.name}),s.jsx("div",{style:Go,children:z.runs.map(k=>s.jsx(td,{run:k,now:c},Gi(k)))})]},z.name)):kb(v).map(z=>s.jsxs("div",{"data-testid":"card-group","aria-label":z.repo,children:[s.jsx(Fo,{children:z.repo}),s.jsx("div",{style:Go,children:z.runs.map(k=>s.jsx(td,{run:k,now:c},Gi(k)))})]},z.repo))]})}function Yb(){const{runs:i,error:r}=sv(),[c,o]=R.useState([]);return R.useEffect(()=>{let f=!0;return Ob("/v1/notifications?kind=blocked&limit=50").then(p=>f&&o(p.notifications),()=>{}),()=>{f=!1}},[i]),i?i.length===0?s.jsx(uv,{}):s.jsx($b,{runs:i,blocked:c,now:Date.now()}):r?s.jsxs("p",{role:"alert","data-testid":"cards-error",children:["Could not load sessions: ",r]}):null}const ld="loki:composer-submit",Vb=8,Gb=()=>[{id:"action:new-run",kind:"Actions",label:"New run",hint:"Cmd+N",to:"/new",action:"new-run"},{id:"action:toggle-theme",kind:"Actions",label:"Toggle theme",hint:"Cmd+Shift+D",action:"toggle-theme"}],Qb=i=>i.filter(r=>!r.path.includes(":")).map(r=>({id:`page:${r.id}`,kind:"Pages",label:r.title,hint:r.path,to:r.path})),fg=i=>{const r=Date.parse(i.started_at??i.last_event_at??"");return Number.isNaN(r)?0:r},Xb=i=>[...i].sort((r,c)=>fg(c)-fg(r)).map(r=>({id:`run:${r.source_id}/${r.run_id}`,kind:"Runs",label:r.run_id,hint:[r.origin_repo,Yt(r)??r.status].filter(Boolean).join(" / ")||void 0,to:`/runs/${encodeURIComponent(r.source_id)}/${encodeURIComponent(r.run_id)}`})),Zb=(i,r)=>{const c=`${i.label} ${i.hint??""}`.toLowerCase();return r.split(/\s+/).filter(Boolean).every(o=>c.includes(o))};function Kb(i,r,c,o){const f=i.trim().toLowerCase(),p=m=>f?m.filter(g=>Zb(g,f)):m;return[...p(o),...p(r),...p(c).slice(0,Vb)]}const ov=["claude","codex","cline","aider","opencode"],dv=["opus","sonnet","haiku"],Jb=["1","5","10","25","50"],Ib=/^https:\/\/github\.com\/([A-Za-z0-9][A-Za-z0-9._-]*)\/([A-Za-z0-9._-]+)\/issues\/([1-9][0-9]*)\/?$/;function Fb(i){const r=i.trim(),c=Ib.exec(r);return c?`${c[1]}/${c[2]}#${c[3]}`:r}function fv(i,r){const c={target:Fb(i)};return r.repo&&(c.repo=r.repo),r.model&&(c.model=r.model),r.workspace?c.workspace=r.workspace:(r.provider&&(c.provider=r.provider),r.budget&&(c.budget=r.budget)),c}function hv(i){return i instanceof Vg?i.status===400?`The server refused this run: ${i.message}`:i.status===403?`Not allowed: ${i.message}. Starting runs works only from the machine running the control service.`:i.status===409?`${i.message}. Wait for it to finish, or pick another repo.`:i.message:i instanceof Error?i.message:"could not reach the control service"}const ws=(i,r)=>[{value:"",label:r},...i.map(c=>({value:c,label:c}))];function Wb(){const[i,r]=R.useState(""),[c,o]=R.useState({}),[f,p]=R.useState(null),[m,g]=R.useState(null),[x,b]=R.useState(!1),[j,v]=R.useState(null),[z,k]=R.useState(null),Q=R.useRef(null),Z=L=>ce=>o(ee=>({...ee,[L]:ce||void 0}));R.useEffect(()=>{var ce;let L=!0;return Gg().then(ee=>{L&&(p(ee.repos),g(ee.defaultRepo))}).catch(()=>L&&p([])),(ce=Q.current)==null||ce.focus(),()=>{L=!1}},[]);const U=j!==null,H=R.useRef(!1),W=async()=>{if(H.current||U||!i.trim())return;H.current=!0;const L=fv(i,c);k(null),v(L.target);try{await od(L),location.hash="#/runs"}catch(ce){v(null),k(hv(ce))}finally{H.current=!1}},$=R.useRef(W);$.current=W,R.useEffect(()=>{const L=()=>{$.current()};return window.addEventListener(ld,L),()=>window.removeEventListener(ld,L)},[]);const V=!!c.workspace;return s.jsxs("section",{"data-testid":"composer",style:{maxWidth:760,margin:"0 auto",padding:"var(--cp-space-2xl) var(--cp-space-xl)"},children:[j===null&&!i?s.jsx($e,{title:"What should Loki build?",hint:"Paste owner/repo#N or a GitHub issue URL, give a PRD path, or describe a task. Nothing starts until you press Cmd+Enter."}):null,j!==null?s.jsx("div",{"data-testid":"optimistic-row",children:s.jsx(h1,{icon:s.jsx(We,{size:14,label:"Starting"}),title:j,meta:"starting, waiting for the control service"})}):null,s.jsxs("div",{style:{border:"1px solid var(--cp-border)",borderRadius:"var(--cp-radius-lg)",background:"var(--cp-card)",padding:12,marginTop:16},children:[s.jsx("textarea",{ref:Q,"data-testid":"composer-input","aria-label":"Task, issue or PRD path",value:i,rows:4,disabled:U,placeholder:"owner/repo#123, an issue URL, a PRD path, or a task",onChange:L=>r(L.target.value),onKeyDown:L=>{L.key==="Enter"&&(L.metaKey||L.ctrlKey)&&(L.preventDefault(),W())},style:{width:"100%",resize:"vertical",border:0,outline:"none",background:"transparent",color:"var(--cp-text)",font:"inherit",fontSize:"var(--cp-text-md)"}}),s.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"center",marginTop:8},children:[s.jsx("span",{"data-testid":"chip-repo",children:s.jsx(bl,{label:"repo",value:c.repo??Qg(m),options:ws(f??[],m?`${m} (server directory)`:"server directory"),onSelect:Z("repo")})}),s.jsx("span",{"data-testid":"chip-model",children:s.jsx(bl,{label:"model",value:c.model??"default",options:ws(dv,"default"),onSelect:Z("model")})}),s.jsx("span",{"data-testid":"chip-provider",children:s.jsx(bl,{label:"provider",value:V?"set per repo":c.provider??"default",options:V?void 0:ws(ov,"default"),onSelect:Z("provider")})}),s.jsx("span",{"data-testid":"chip-budget",children:s.jsx(bl,{label:"budget",value:V?"set per repo":c.budget?`$${c.budget}`:"none",options:V?void 0:ws(Jb.map(String),"none").map(L=>({...L,label:L.value?`$${L.value}`:L.label})),onSelect:Z("budget")})}),s.jsx("span",{"data-testid":"chip-workspace",onClick:()=>b(L=>!L),children:s.jsx(bl,{label:"workspace",value:c.workspace??"none"})}),x?s.jsx("input",{"data-testid":"workspace-input","aria-label":"Workspace name from loki.yaml",placeholder:"name from loki.yaml",value:c.workspace??"",onChange:L=>Z("workspace")(L.target.value.trim()),style:{border:"1px solid var(--cp-border)",borderRadius:"var(--cp-radius-md)",background:"var(--cp-bg)",color:"var(--cp-text)",padding:"4px 8px",fontSize:"var(--cp-text-base)"}}):null,s.jsx("span",{style:{flex:1}}),s.jsxs(Ce,{"data-testid":"composer-submit",disabled:U||!i.trim(),onClick:()=>void W(),children:["Start ",s.jsx(cd,{children:"Cmd+Enter"})]})]})]}),f!==null&&f.length===0?s.jsx("p",{"data-testid":"no-repos",style:{color:"var(--cp-text-2)",fontSize:"var(--cp-text-base)",marginTop:8},children:"No repos discovered yet. The run starts in the directory the control service was launched from."}):null,z?s.jsx("div",{"data-testid":"composer-error",style:{marginTop:12},children:s.jsx(m1,{tone:"error",onClose:()=>k(null),children:z})}):null]})}const Pb={id:"compose",path:"/new",title:"New run",component:Wb},Qo=(i,r)=>[{value:"",label:r},...i.map(c=>({value:c,label:c}))];function eS({onStarted:i}){const[r,c]=R.useState(""),[o,f]=R.useState({}),[p,m]=R.useState(null),[g,x]=R.useState(null),[b,j]=R.useState(!1),[v,z]=R.useState(null),k=R.useRef(!1),Q=U=>H=>f(W=>({...W,[U]:H||void 0}));R.useEffect(()=>{let U=!0;return Gg().then(H=>{U&&(m(H.repos),x(H.defaultRepo))}).catch(()=>U&&m([])),()=>{U=!1}},[]);const Z=async()=>{if(!(k.current||!r.trim())){k.current=!0,j(!0),z(null);try{const U=fv(r,o);await od(U),c(""),z({tone:"ok",text:`Started: ${U.target}`}),i==null||i()}catch(U){z({tone:"error",text:hv(U)})}finally{k.current=!1,j(!1)}}};return s.jsxs("section",{"data-testid":"hero",style:{maxWidth:720,margin:"0 auto",padding:"var(--cp-space-2xl) 0 var(--cp-space-xl)",textAlign:"center"},children:[s.jsx("div",{className:"cp-eyebrow",style:{marginBottom:12},children:"Loki Mode"}),s.jsx("h1",{className:"cp-display",style:{fontSize:40,margin:"0 0 24px",color:"var(--cp-text)"},children:"What should Loki build?"}),s.jsxs("div",{style:{border:"1px solid var(--cp-border)",borderRadius:24,background:"var(--cp-card)",padding:"14px 16px",textAlign:"left"},children:[s.jsx("textarea",{"data-testid":"hero-input","aria-label":"Task, owner/repo#N or issue URL",value:r,rows:3,disabled:b,placeholder:"Describe a task, or paste owner/repo#123 or an issue URL",onChange:U=>c(U.target.value),onKeyDown:U=>{U.key==="Enter"&&!U.shiftKey&&!U.nativeEvent.isComposing&&(U.preventDefault(),Z())},style:{width:"100%",resize:"none",border:0,outline:"none",background:"transparent",color:"var(--cp-text)",font:"inherit",fontSize:"var(--cp-text-lg, 16px)"}}),s.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"center",marginTop:8},children:[s.jsx("span",{"data-testid":"pick-repo",children:s.jsx(bl,{label:"repo",value:o.repo??Qg(g),options:Qo(p??[],g?`${g} (server directory)`:"server directory"),onSelect:Q("repo")})}),s.jsx("span",{"data-testid":"pick-provider",children:s.jsx(bl,{label:"provider",value:o.provider??"default",options:Qo(ov,"default"),onSelect:Q("provider")})}),s.jsx("span",{"data-testid":"pick-model",children:s.jsx(bl,{label:"model",value:o.model??"default",options:Qo(dv,"default"),onSelect:Q("model")})}),s.jsx("span",{style:{flex:1}}),s.jsxs(Ce,{"data-testid":"hero-start",disabled:b||!r.trim(),onClick:()=>void Z(),children:["Start ",s.jsx(cd,{children:"Enter"})]})]})]}),v?s.jsx("p",{role:v.tone==="error"?"alert":"status","data-testid":"hero-note",style:{marginTop:12,fontSize:"var(--cp-text-base)",color:v.tone==="error"?"var(--cp-error)":"var(--cp-text-2)"},children:v.text}):null]})}function tS(){return s.jsxs("div",{"data-testid":"home-start",children:[s.jsx(eS,{}),s.jsx(Yb,{})]})}const lS={id:"home",path:"/home",title:"Home",component:tS};function nS(i){return i.verdict?Ga(i)?"verified":"notproven":i.pr_url?"pr":i.status==="running"||i.started_at?"running":"issue"}const hg={issue:"Issue",running:"Running",pr:"PR open",verified:"Verified",notproven:"Not proven"};function aS({r:i}){const r=i.issue_ref??i.run_id;return s.jsx("a",{href:`#/runs/${encodeURIComponent(i.source_id)}/${encodeURIComponent(i.run_id)}`,"data-testid":"board-card","data-run":i.run_id,style:{textDecoration:"none",color:"inherit"},children:s.jsxs(Qe,{interactive:!0,compact:!0,children:[s.jsx("div",{style:{fontWeight:600,fontSize:"var(--cp-text-md)",overflowWrap:"anywhere"},children:r}),s.jsx("div",{style:{color:"var(--cp-text-muted)",fontSize:"var(--cp-text-xs)",marginTop:2},children:i.origin_repo??"repo not recorded"}),s.jsxs("div",{style:{display:"flex",gap:6,marginTop:8,flexWrap:"wrap",alignItems:"center"},children:[i.verdict?s.jsx($t,{run:i}):i.pr_url?s.jsx(Oe,{tone:"info",children:i.pr_draft?"draft PR":"PR open"}):i.status==="running"?s.jsx($t,{verdict:pe.RUNNING}):s.jsx(Oe,{children:"queued"}),i.current_stage&&!i.verdict?s.jsx(Oe,{children:i.current_stage}):null]})]})})}function Qi({id:i,runs:r}){return s.jsxs("section",{"data-testid":`lane-${i}`,"aria-label":hg[i],style:{display:"flex",flexDirection:"column",gap:8},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"var(--cp-text-xs)",color:"var(--cp-text-2)",textTransform:"uppercase",letterSpacing:"0.05em"},children:[s.jsx("span",{children:hg[i]}),s.jsx("span",{children:r.length})]}),r.length===0?s.jsx("div",{style:{color:"var(--cp-text-muted)",fontSize:"var(--cp-text-xs)"},children:"none"}):r.map(c=>s.jsx(aS,{r:c},`${c.source_id}/${c.run_id}`))]})}function Ms({id:i,children:r}){return s.jsx("div",{"data-testid":`col-${i}`,style:{background:"var(--cp-bg-2)",borderRadius:"var(--cp-radius-lg)",padding:10,display:"flex",flexDirection:"column",gap:16,minWidth:220},children:r})}function iS(){const[i,r]=R.useState(null),[c,o]=R.useState(null),f=R.useCallback(()=>{$l().then(m=>{r(m.runs),o(null)}).catch(m=>o(m.message))},[]);if(R.useEffect(()=>(f(),Cg(f)),[f]),c&&!i)return s.jsx($e,{title:"Could not load runs",hint:c});if(!i)return s.jsx("div",{style:{padding:24},children:s.jsx(We,{label:"Loading runs"})});if(i.length===0)return s.jsx($e,{title:"No runs yet",hint:"Start a run and it will appear here."});const p=m=>i.filter(g=>nS(g)===m);return s.jsxs("div",{style:{padding:24},children:[s.jsx("h1",{style:{fontFamily:"var(--cp-font-serif)",fontSize:"var(--cp-text-2xl)",margin:"0 0 16px"},children:"Work"}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:12,alignItems:"start"},children:[s.jsx(Ms,{id:"issue",children:s.jsx(Qi,{id:"issue",runs:p("issue")})}),s.jsx(Ms,{id:"running",children:s.jsx(Qi,{id:"running",runs:p("running")})}),s.jsx(Ms,{id:"pr",children:s.jsx(Qi,{id:"pr",runs:p("pr")})}),s.jsxs(Ms,{id:"done",children:[s.jsx(Qi,{id:"verified",runs:p("verified")}),s.jsx(Qi,{id:"notproven",runs:p("notproven")})]})]})]})}const uS={id:"work",path:"/work",title:"Work",component:()=>s.jsx(iS,{})},Us=i=>`${i.source_id}/${i.run_id}`;function sS(){const[i,r]=R.useState(null),[c,o]=R.useState(null),[f,p]=R.useState({}),[m,g]=R.useState(void 0);R.useEffect(()=>{let z=!0;return $l().then(k=>z&&r(k.runs),k=>z&&o(k.message)),w1().then(k=>z&&g(k),()=>z&&g(null)),()=>{z=!1}},[]);const x=async z=>{p(k=>({...k,[Us(z)]:"pending"}));try{const k=await Kg(z.source_id,z.run_id);p(Q=>({...Q,[Us(z)]:k}))}catch(k){p(Q=>({...Q,[Us(z)]:{error:k.message}}))}};if(c)return s.jsx($e,{title:"Receipts unavailable",hint:c});if(!i)return s.jsx(We,{label:"Loading receipts"});const b=i.filter(z=>z.verdict),j=M1(b),v=b.length?Math.round(b.filter(z=>Ga(z)).length/b.length*100):null;return s.jsxs("div",{"data-testid":"receipts",style:{display:"flex",flexDirection:"column",gap:16},children:[s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(240px, 1fr))",gap:12},children:[s.jsx($a,{label:`Verified rate (${b.length} finished run${b.length===1?"":"s"}, by run outcome)`,value:v===null?"not measured":`${v}%`,series:j.map(z=>z.rate),trend:j.length>1?`${j.length} days`:void 0}),s.jsxs(Qe,{style:{padding:"14px 16px"},"data-testid":"public-key",children:[s.jsx("div",{style:{fontSize:"var(--cp-text-sm)",color:"var(--cp-text-2)"},children:"Public key (Ed25519)"}),m===void 0?s.jsx(We,{size:12}):m===null?s.jsx("div",{children:"not measured: no signing key on this machine yet"}):s.jsxs("div",{style:{fontFamily:"var(--cp-font-mono)",fontSize:12,wordBreak:"break-all"},children:[s.jsxs("div",{"data-testid":"key-kid",children:["kid ",m.kid]}),s.jsxs("div",{"data-testid":"key-x",children:["x ",m.x]})]})]})]}),b.length===0?s.jsx($e,{title:"No finished runs yet",hint:"A receipt appears here when a run completes."}):s.jsx(Kn,{caption:"Receipts",columns:["Run","Outcome","Started","Verify"],rows:b.map(z=>{const k=f[Us(z)];return[s.jsx("span",{style:{fontFamily:"var(--cp-font-mono)"},children:z.run_id},"run"),s.jsx($t,{run:z},"out"),z.started_at??"not measured",s.jsxs("span",{style:{display:"inline-flex",gap:8,alignItems:"center"},children:[s.jsx(Ce,{size:"sm",variant:"secondary",disabled:k==="pending",onClick:()=>void x(z),"data-testid":"verify-btn",children:k==="pending"?"Verifying":"Verify"}),k&&k!=="pending"?"error"in k?s.jsx(Oe,{tone:"error","data-testid":"verify-result",children:k.error}):s.jsxs("span",{"data-testid":"verify-result","data-verdict":k.verdict,children:[s.jsx($t,{run:{verdict:k.verdict,tampered:z.tampered}}),k.reasons[0]?s.jsx("span",{style:{marginLeft:8,color:"var(--cp-text-2)",fontSize:12},children:k.reasons[0]}):null]}):null]},"v")]})})]})}const rS={id:"receipts",path:"/receipts",title:"Receipts",component:sS},mg={status:"",verdict:"",repo:"",source:"",q:""},cS="no repo",Fs=i=>i.origin_repo??cS,Va=i=>i.status??(i.verdict?"completed":"running"),Xs=i=>i.task_source??i.source_id,oS=i=>Yt(i)??"none";function dS(i,r){const c=r.q.trim().toLowerCase();return i.filter(o=>!(r.status&&Va(o)!==r.status||r.verdict&&oS(o)!==r.verdict||r.repo&&Fs(o)!==r.repo||r.source&&Xs(o)!==r.source||c&&![o.run_id,o.source_id,o.origin_repo,o.issue_ref,o.provider,o.model,Yt(o)].some(f=>f&&f.toLowerCase().includes(c))))}const pg=(i,r)=>{switch(r){case"started":return i.started_at?Date.parse(i.started_at):null;case"repo":return Fs(i);case"source":return Xs(i);case"status":return Va(i);case"verdict":return Yt(i);case"cost":return i.cost_usd;case"elapsed":return i.elapsed_s??i.wall_s}};function fS(i,r,c){const o=c==="asc"?1:-1;return[...i].sort((f,p)=>{const m=pg(f,r),g=pg(p,r);return m===null&&g===null?0:m===null?1:g===null?-1:(typeof m=="number"&&typeof g=="number"?m-g:String(m).localeCompare(String(g)))*o})}function hS(i){const r=new Map;for(const c of i){const o=Fs(c),f=r.get(o)??{repo:o,runs:0,running:0,verified:0,cost:null,unpriced:0};f.runs++,Va(c)==="running"&&f.running++,Ga(c)&&f.verified++,c.cost_usd===null?f.unpriced++:f.cost=(f.cost??0)+c.cost_usd,r.set(o,f)}return[...r.values()].sort((c,o)=>o.runs-c.runs||c.repo.localeCompare(o.repo))}const Xo=i=>[...new Set(i)].sort(),mS=i=>{const r=new AbortController,c=globalThis.LOKI_CONTROL_BASE??"";return(async()=>{for(;!r.signal.aborted;){try{const o=St(),f=await fetch(`${c}/v1/stream`,{headers:o?{authorization:`Bearer ${o}`}:{},signal:r.signal});if(!f.ok||!f.body)throw new Error(`HTTP ${f.status}`);const p=f.body.getReader(),m=new TextDecoder;let g="";for(;;){const{done:x,value:b}=await p.read();if(x)break;g+=m.decode(b,{stream:!0});let j;for(;(j=g.indexOf(`
|
|
147
|
+
|
|
148
|
+
`))>=0;){const v=g.slice(0,j);g=g.slice(j+2),/^event: run$/m.test(v)&&i()}}}catch{}r.signal.aborted||await new Promise(o=>setTimeout(o,3e3))}})(),()=>r.abort()},gg=i=>i===null?"unpriced":Wt(i),pS=i=>i==null?"not measured":i<60?`${Math.round(i)}s`:i<3600?`${Math.floor(i/60)}m ${Math.round(i%60)}s`:`${Math.floor(i/3600)}h ${Math.floor(i%3600/60)}m`,gS=i=>i?i.replace("T"," ").slice(0,16):"not measured",vS=[{key:"started",label:"Started"},{key:"repo",label:"Repo"},{key:"source",label:"Source"},{key:"status",label:"Status"},{key:"verdict",label:"Verdict"},{key:"cost",label:"Cost"},{key:"elapsed",label:"Elapsed"}],Lt={padding:"6px 12px",whiteSpace:"nowrap"},vg={...Lt,textAlign:"left",fontSize:"var(--cp-text-sm)",textTransform:"uppercase",color:"var(--cp-text-2)",background:"var(--cp-bg-3)"};function Hs({label:i,value:r,options:c,onChange:o}){return s.jsx("span",{"data-testid":`filter-${i.toLowerCase()}`,"data-value":r,children:s.jsx(bl,{label:i,value:r||"all",options:[{value:"",label:"All"},...c.map(f=>({value:f,label:f}))],onSelect:o})})}function yS({subscribe:i=mS}){const[r,c]=R.useState(null),[o,f]=R.useState(null),[p,m]=R.useState(mg),[g,x]=R.useState({key:"started",dir:"desc"}),[b,j]=R.useState(!1),v=R.useCallback(()=>{$l({}).then(H=>{c(H.runs),f(null)},H=>f(H.message))},[]);R.useEffect(()=>{v()},[v]),R.useEffect(()=>i?i(v):void 0,[i,v]);const z=R.useMemo(()=>r??[],[r]),k=R.useMemo(()=>fS(dS(z,p),g.key,g.dir),[z,p,g]),Q=R.useMemo(()=>hS(k),[k]),Z=H=>W=>m($=>({...$,[H]:W})),U=JSON.stringify(p)!==JSON.stringify(mg);return o&&r===null?s.jsx($e,{title:"Could not load runs",hint:o}):r===null?s.jsx(We,{label:"Loading runs"}):s.jsxs("div",{"data-testid":"runs-page",style:{display:"flex",flexDirection:"column",gap:12},children:[s.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"center"},children:[s.jsx(Za,{"aria-label":"Search runs",placeholder:"Search runs",value:p.q,onChange:H=>Z("q")(H.target.value),style:{maxWidth:240}}),s.jsx(Hs,{label:"Status",value:p.status,options:["running","completed"],onChange:Z("status")}),s.jsx(Hs,{label:"Verdict",value:p.verdict,options:Xo(z.map(H=>H.verdict??"none")),onChange:Z("verdict")}),s.jsx(Hs,{label:"Repo",value:p.repo,options:Xo(z.map(Fs)),onChange:Z("repo")}),s.jsx(Hs,{label:"Source",value:p.source,options:Xo(z.map(Xs)),onChange:Z("source")}),s.jsxs("label",{style:{display:"inline-flex",gap:6,alignItems:"center",fontSize:"var(--cp-text-base)",color:"var(--cp-text-2)"},children:[s.jsx("input",{type:"checkbox","data-testid":"group-toggle",checked:b,onChange:H=>j(H.target.checked)}),"Group by repo"]}),s.jsxs("span",{"data-testid":"runs-count",style:{marginLeft:"auto",fontSize:"var(--cp-text-base)",color:"var(--cp-text-2)"},children:[k.length," of ",z.length," runs"]})]}),b&&k.length?s.jsx(Qe,{style:{padding:0,overflow:"auto"},children:s.jsxs("table",{"data-testid":"rollup",style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--cp-text-base)"},children:[s.jsx("thead",{children:s.jsx("tr",{children:["Repo","Runs","Running","Verified","Cost"].map(H=>s.jsx("th",{scope:"col",style:vg,children:H},H))})}),s.jsx("tbody",{children:Q.map(H=>s.jsxs("tr",{"data-testid":"rollup-row","data-repo":H.repo,style:{borderTop:"1px solid var(--cp-border-light)"},children:[s.jsx("td",{style:Lt,children:s.jsx("button",{type:"button",onClick:()=>Z("repo")(H.repo),style:{background:"none",border:0,color:"var(--cp-accent)",cursor:"pointer",padding:0,font:"inherit"},children:H.repo})}),s.jsx("td",{style:Lt,children:H.runs}),s.jsx("td",{style:Lt,children:H.running}),s.jsxs("td",{style:Lt,children:[H.verified," of ",H.runs]}),s.jsxs("td",{style:Lt,children:[gg(H.cost),H.cost!==null&&H.unpriced?` (+${H.unpriced} unpriced)`:""]})]},H.repo))})]})}):null,k.length===0?s.jsx($e,{title:U?"No runs match these filters":"No runs yet",hint:U?"Clear a filter or the search to see more.":"Start a run and it will appear here."}):s.jsx(Qe,{style:{padding:0,overflow:"auto"},children:s.jsxs("table",{"data-testid":"runs-table",style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--cp-text-base)"},children:[s.jsx("thead",{children:s.jsx("tr",{children:vS.map(H=>s.jsx("th",{scope:"col","aria-sort":g.key===H.key?g.dir==="asc"?"ascending":"descending":"none",style:vg,children:s.jsxs("button",{type:"button","data-testid":`sort-${H.key}`,onClick:()=>x(W=>({key:H.key,dir:W.key===H.key&&W.dir==="desc"?"asc":"desc"})),style:{background:"none",border:0,cursor:"pointer",font:"inherit",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",color:"inherit",padding:0},children:[H.label,g.key===H.key?g.dir==="asc"?" (asc)":" (desc)":""]})},H.key))})}),s.jsx("tbody",{children:k.map(H=>s.jsxs("tr",{"data-testid":"run-row","data-run":H.run_id,style:{borderTop:"1px solid var(--cp-border-light)"},children:[s.jsx("td",{style:Lt,children:s.jsx("a",{href:`#/runs/${encodeURIComponent(H.source_id)}/${encodeURIComponent(H.run_id)}`,style:{color:"var(--cp-accent)",textDecoration:"none"},children:gS(H.started_at)})}),s.jsxs("td",{style:Lt,children:[H.origin_repo??s.jsx("span",{style:{color:"var(--cp-text-2)"},children:"no repo"}),H.issue_ref?s.jsxs("span",{style:{color:"var(--cp-text-2)"},children:[" ",H.issue_ref]}):null]}),s.jsx("td",{style:Lt,children:Xs(H)}),s.jsx("td",{style:Lt,children:s.jsx(Oe,{tone:Va(H)==="running"?"info":"neutral",pulse:Va(H)==="running",children:Va(H)})}),s.jsx("td",{style:Lt,children:H.verdict?s.jsx($t,{run:H}):s.jsx("span",{style:{color:"var(--cp-text-2)"},children:"none yet"})}),s.jsx("td",{style:Lt,children:gg(H.cost_usd)}),s.jsx("td",{style:Lt,children:pS(H.elapsed_s??H.wall_s)})]},`${H.source_id}:${H.run_id}`))})]})})]})}const xS={id:"runs",path:"/runs",title:"Runs",component:yS,inSettings:!1};async function bS(){const i=globalThis.LOKI_CONTROL_BASE??"",r=St(),c=await fetch(`${i}/v1/providers`,{headers:r?{authorization:`Bearer ${r}`}:{}});if(!c.ok)throw new Error(`HTTP ${c.status}`);return await c.json()}const SS=i=>i.probe==="timeout"?"installed, version probe timed out":i.installed?i.version?`installed, ${i.version}`:"installed, version not reported":"not installed";function jS(){const[i,r]=R.useState(null),[c,o]=R.useState(null);if(R.useEffect(()=>{let p=!0;return bS().then(m=>p&&r(m)).catch(m=>p&&o(m instanceof Error?m.message:String(m))),()=>{p=!1}},[]),c)return s.jsx($e,{title:"Could not load providers",hint:c});if(!i)return s.jsx(We,{label:"Detecting provider CLIs"});const f=i.providers.map(p=>[s.jsxs("span",{style:{display:"inline-flex",gap:8,alignItems:"center"},children:[s.jsx(Ag,{state:p.installed?"active":"idle",label:p.installed?"installed":"not installed"}),s.jsx("strong",{children:p.id}),p.deprecated?s.jsx(Oe,{tone:"warning",children:"deprecated"}):null]},"n"),SS(p),p.auth_present?s.jsx(Oe,{tone:"success",children:"auth present"},"a"):s.jsx(Oe,{tone:"neutral",children:"no auth env set"},"a"),p.auth_env_names.length?`${p.auth_env_set.length?p.auth_env_set.join(", "):"none"} (of ${p.auth_env_names.join(", ")})`:"not measured",p.tiers.planning??"not measured",p.tiers.development??"not measured",p.tiers.fast??"not measured"]);return s.jsxs("div",{style:{display:"grid",gap:16},children:[s.jsx("h1",{style:{margin:0,fontSize:"var(--cp-text-xl, 20px)"},children:"Models and providers"}),s.jsx(Kn,{caption:"Provider CLIs",columns:["Provider","CLI","Auth","Env vars set","Planning","Development","Fast"],rows:f}),s.jsx(Qe,{compact:!0,children:s.jsxs("small",{children:["Auth shows only whether an environment variable is set, never its value. Model tiers come from the catalog",i.catalog_updated?` (updated ${i.catalog_updated})`:"",". Version probes stop after ",i.probe_timeout_ms," ms."]})})]})}const _S={id:"models",path:"/models",title:"Models and providers",component:jS,inSettings:!0},ES=()=>globalThis.LOKI_CONTROL_BASE??"";async function TS(i,r,c){const o=St(),f={"content-type":"application/json"};o&&(f.authorization=`Bearer ${o}`);const p=await fetch(`${ES()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/${c}`,{method:"POST",headers:f,body:"{}"}),m=await p.json().catch(()=>({}));if(!p.ok)throw new Error(m.error??`HTTP ${p.status}`)}const NS={stop:"Stopping...",retry:"Retrying...",resume:"Resuming..."},RS={stop:"Stop signal sent.",retry:"Retry started as a new run.",resume:"Resume started."};function zS({source:i,run:r,status:c,onChanged:o}){const[f,p]=R.useState(!1),[m,g]=R.useState(null),[x,b]=R.useState(!1),[j,v]=R.useState(!1),[z,k]=R.useState(null),Q=c.trim().toUpperCase(),Z=m==="stop"||x,U=!Z&&(m==="resume"||j||Q==="RUNNING"),H=Q==="BLOCKED"&&!U&&!Z,W=async $=>{if(!m){p(!1),k(null),g($);try{await TS(i,r,$),$==="stop"&&b(!0),$==="resume"&&v(!0),k({tone:"ok",text:RS[$]}),o==null||o()}catch(V){k({tone:"error",text:V.message})}finally{g(null)}}};return s.jsxs("div",{"data-testid":"run-controls","data-state":Z?"stopping":U?"running":Q.toLowerCase(),style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[U&&!m&&!f?s.jsx(Ce,{variant:"danger",size:"sm",onClick:()=>p(!0),children:"Stop"}):null,f?s.jsxs("span",{"data-testid":"stop-confirm",role:"group","aria-label":"Confirm stop",style:{display:"flex",gap:8,alignItems:"center"},children:[s.jsx("span",{children:"Stop this run?"}),s.jsx(Ce,{variant:"danger",size:"sm",onClick:()=>void W("stop"),children:"Confirm stop"}),s.jsx(Ce,{variant:"ghost",size:"sm",onClick:()=>p(!1),children:"Cancel"})]}):null,H&&!m?s.jsx(Ce,{size:"sm",onClick:()=>void W("resume"),children:"Resume"}):null,!U&&!Z&&!m&&Q!==""?s.jsx(Ce,{variant:"secondary",size:"sm",onClick:()=>void W("retry"),children:"Retry"}):null,m?s.jsx("span",{role:"status",children:NS[m]}):null,!m&&z?s.jsx("span",{role:z.tone==="error"?"alert":"status",style:z.tone==="error"?{color:"var(--cp-error)"}:void 0,children:z.text}):null]})}const CS=new Set(["that","this","with","from","when","should","must","will","have","into","then","than","each","which","their","there","about"]),Zi=i=>new Set((i.toLowerCase().match(/[a-z0-9]{4,}/g)??[]).filter(r=>!CS.has(r))),Xi=(i,r)=>{for(const c of i)if(r.has(c))return!0;return!1},Zo=i=>Zi(i.replace(/[/.]/g," "));function Ko(i){if(i===null)return null;try{return JSON.parse(i)}catch{return null}}function OS(i){const r=i&&typeof i=="object"?i:{},o=(typeof r.body=="string"?r.body:"").split(/\r?\n/),f=o.map(x=>{var b,j;return(j=(b=/^\s*[-*]\s*\[[ xX]\]\s*(.+)$/.exec(x))==null?void 0:b[1])==null?void 0:j.trim()}).filter(x=>!!x);if(f.length)return{list:f,source:"checklist"};const p=[];let m=!1;for(const x of o)if(/^\s*#{1,6}\s/.test(x)||/^\s*\*\*[^*]+\*\*:?\s*$/.test(x))m=/accept|requirement|criteri|expected|done when/i.test(x);else if(m){const b=/^\s*(?:[-*]|\d+[.)])\s+(.+)$/.exec(x);b!=null&&b[1]&&p.push(b[1].trim())}if(p.length)return{list:p,source:"checklist"};const g=typeof r.title=="string"?r.title.trim():"";return g?{list:[g],source:"title"}:{list:[],source:"none"}}function AS(i){const r=i,c=Array.isArray(i)?i:Array.isArray(r==null?void 0:r.steps)?r.steps:Array.isArray(r==null?void 0:r.plan)?r.plan:typeof(r==null?void 0:r.plan)=="string"?r.plan.split(/\r?\n/).filter(f=>f.trim()):[],o=[];for(const f of c){if(typeof f=="string"){const p=f.replace(/^\s*(?:[-*]|\d+[.)])\s*/,"").trim();p&&o.push({text:p,files:[],checks:[]});continue}if(f&&typeof f=="object"){const p=f,m=[p.title,p.step,p.description,p.text].find(b=>typeof b=="string"&&b.trim()!=="");if(!m)continue;const g=Array.isArray(p.files)?p.files.filter(b=>typeof b=="string"):[],x=Array.isArray(p.checks)?p.checks.filter(b=>typeof b=="string"):[];o.push({text:m.trim(),files:g,checks:x,...typeof p.criterion=="string"?{criterion:p.criterion}:{}})}}return o}function DS(i){if(!i)return[];const r=new Set;for(const c of i.matchAll(/^diff --git a\/(.+?) b\/(.+)$/gm))r.add(c[2]);return[...r]}function wS(i,r){return i?Yt({...i,verdict:i.verdict??(r==null?void 0:r.verdict)??null}):null}function MS(i){var v,z,k,Q,Z;const{list:r,source:c}=OS(i.issue),o=AS(i.plan),f=((v=i.receipt)==null?void 0:v.checks)??[],p=i.run?Yt({...i.run,verdict:i.run.verdict??((z=i.receipt)==null?void 0:z.verdict)??null}):null,m=(k=i.receipt)==null?void 0:k.verdict,g=p===pe.VERIFIED&&(m==null||m===pe.VERIFIED),x=[...new Set([...i.changedFiles,...((Z=(Q=i.receipt)==null?void 0:Q.wall)==null?void 0:Z.files)??[]])],b=new Set;return{rows:r.map(U=>{const H=Zi(U),W=o.filter(ie=>ie.criterion?ie.criterion.trim()===U:Xi(H,Zi(ie.text))),$=new Set;for(const ie of W){for(const pt of ie.files)$.add(pt);const mt=Zi(ie.text);for(const pt of x)Xi(mt,Zo(pt))&&$.add(pt)}for(const ie of x)Xi(H,Zo(ie))&&$.add(ie);const V=[...$];V.forEach(ie=>b.add(ie));const L=ie=>ie.name.trim().toLowerCase(),ce=ie=>!!L(ie)&&(U.toLowerCase().includes(L(ie))||W.some(mt=>mt.text.toLowerCase().includes(L(ie))||mt.checks.some(pt=>pt.trim().toLowerCase()===L(ie)))),ee=f.filter(ie=>{const mt=Zi(`${ie.name} ${ie.cmd??""}`);return ce(ie)||Xi(H,mt)||V.some(pt=>Xi(Zo(pt),mt))}),re=ee.filter(ce),De=ee.filter(ie=>!ce(ie));let ht="not proven",Ie=null;return i.receipt?re.some(ie=>ie.result==="fail")?(ht="failed",Ie="a linked check failed"):re.length===0?Ie=De.length?"link inferred":"no check linked to this criterion":re.every(ie=>ie.result==="pass")?g?ht="proven":Ie=`verdict is ${p!==pe.VERIFIED?p??"unknown (run record unavailable)":m}`:Ie="a linked check did not run":Ie="no receipt for this run",{criterion:U,steps:W.map(ie=>ie.text),files:V,evidence:re,inferred:De,status:ht,note:Ie}}),unmapped_files:x.filter(U=>!b.has(U)),criteria_source:c}}async function US(i,r,c,o){const[f,p,m,g]=await Promise.all(["issue.json","plan.json","receipt.json","diff.patch"].map(v=>Jg(i,r,v))),x=Ko(m??null),b=Ko(f??null),j=Ko(p??null);return{matrix:MS({issue:b,plan:j,receipt:x,changedFiles:DS(g??null),run:o}),stages:c,verdict:wS(o,x),have:{issue:b!==null,plan:j!==null,receipt:x!==null}}}const HS={proven:"success",failed:"error","not proven":"warning"},Ki={fontFamily:"var(--cp-font-mono)",fontSize:12,wordBreak:"break-all"},Jo=s.jsx("span",{style:{color:"var(--cp-text-2)"},children:"none"});function mv({params:i}){const r=i.source,c=i.run;return!r||!c?s.jsx(kS,{}):s.jsx(BS,{source:r,run:c})}function kS(){const[i,r]=R.useState(null),[c,o]=R.useState(null);return R.useEffect(()=>{let f=!0;return $l().then(p=>f&&r(p.runs),p=>f&&o(p.message)),()=>{f=!1}},[]),c?s.jsx($e,{title:"Plans unavailable",hint:c}):i?i.length?s.jsx("div",{"data-testid":"plans-picker",children:s.jsx(Kn,{caption:"Pick a run",columns:["Run","Outcome","Started"],rows:i.map(f=>[s.jsx("a",{href:`#/plans/${encodeURIComponent(f.source_id)}/${encodeURIComponent(f.run_id)}`,style:Ki,"data-testid":"plans-pick",children:f.run_id},"a"),f.verdict?s.jsx($t,{run:f},"v"):"running",f.started_at??"not measured"])})}):s.jsx($e,{title:"No runs yet",hint:"Start a run to see its plan and traceability here."}):s.jsx(We,{label:"Loading runs"})}function BS({source:i,run:r}){var j;const[c,o]=R.useState(null),[f,p]=R.useState(null);if(R.useEffect(()=>{let v=!0;return o(null),(async()=>{const z=await Pi(i,r).catch(()=>null);return US(i,r,(z==null?void 0:z.stages)??null,z)})().then(z=>v&&o(z),z=>v&&p(z.message)),()=>{v=!1}},[i,r]),f)return s.jsx($e,{title:"Plan unavailable",hint:f});if(!c)return s.jsx(We,{label:"Loading plan"});const{matrix:m,have:g}=c,x=["issue","plan","receipt"].filter(v=>!g[v]),b=m.rows.filter(v=>v.status==="proven").length;return s.jsxs("div",{"data-testid":"plans",style:{display:"flex",flexDirection:"column",gap:16},children:[s.jsxs(Qe,{style:{padding:"14px 16px"},children:[s.jsx("div",{style:{fontFamily:"var(--cp-font-mono)"},children:r}),s.jsxs("div",{"data-testid":"plans-summary",style:{color:"var(--cp-text-2)"},children:[m.rows.length?`${b} of ${m.rows.length} criteria proven`:"not measured: no criteria",c.verdict?` - verdict ${c.verdict}`:g.receipt?" - verdict unavailable":" - no receipt"]}),x.length?s.jsxs("div",{"data-testid":"plans-missing",style:{color:"var(--cp-text-2)"},children:["not available: ",x.map(v=>`${v}.json`).join(", ")]}):null]}),(j=c.stages)!=null&&j.length?s.jsx(f1,{stages:c.stages.map(v=>({label:v.stage,status:v.status==="completed"?"success":v.status==="failed"?"error":"pending"}))}):null,m.rows.length===0?s.jsx($e,{title:"No requirements found",hint:"issue.json has no title or acceptance criteria for this run."}):s.jsx(Kn,{caption:"Traceability matrix",columns:["Requirement","Plan step","Files changed","Evidence","Verdict"],rows:m.rows.map(v=>[v.criterion,v.steps.length?s.jsx("ol",{style:{margin:0,paddingLeft:16},children:v.steps.map(z=>s.jsx("li",{children:z},z))},"s"):Jo,v.files.length?s.jsx("div",{style:Ki,children:v.files.map(z=>s.jsx("div",{children:z},z))},"f"):Jo,v.evidence.length||v.inferred.length?s.jsxs("div",{children:[v.evidence.map(z=>s.jsxs("div",{style:Ki,children:[z.result,": ",z.name]},z.name)),v.inferred.map(z=>s.jsxs("div",{"data-testid":"inferred-hint",style:{...Ki,color:"var(--cp-text-2)"},children:["inferred, not recorded: ",z.result,": ",z.name]},`i-${z.name}`))]},"e"):Jo,s.jsxs("span",{"data-testid":"row-status","data-status":v.status,children:[s.jsx(Oe,{tone:HS[v.status],children:v.status==="not proven"?v.note==="link inferred"?"NOT PROVEN (link inferred)":"NOT PROVEN":v.status.toUpperCase()}),v.note?s.jsx("div",{style:{color:"var(--cp-text-2)",fontSize:12},children:v.note}):null]},"v")])}),m.unmapped_files.length?s.jsxs(Qe,{style:{padding:"14px 16px"},"data-testid":"plans-unmapped",children:[s.jsx("div",{style:{color:"var(--cp-text-2)"},children:"Changed files not tied to any requirement"}),s.jsx("div",{style:Ki,children:m.unmapped_files.map(v=>s.jsx("div",{children:v},v))})]}):null]})}const LS={id:"plans",path:"/plans/:source/:run",title:"Plans",component:mv},qS={id:"plans-picker",path:"/plans",title:"Plans",component:mv},pv=()=>globalThis.LOKI_CONTROL_BASE??"",nd=i=>{const r=St();return{...i?{"content-type":"application/json"}:{},...r?{authorization:`Bearer ${r}`}:{}}};async function yg(i,r){const c=await fetch(`${pv()}${i}`,r),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??`HTTP ${c.status}`);return o}async function $S(i){const r=await fetch(`${pv()}/v1/merge/run`,{method:"POST",headers:nd(!0),body:JSON.stringify({dryRun:i})}),c=await r.json().catch(()=>null);if(!c||!Array.isArray(c.lines))throw new Error((c==null?void 0:c.error)??`HTTP ${r.status}`);return{ok:!1,ran:!1,dryRun:i,exit:null,...c,lines:c.lines}}function ks(i){if(i.ran&&!i.partial&&!i.error)return null;const r=i.error??"the run did not finish cleanly";return i.timedOut?`Partial outcome: ${r}. Lines below show what completed before it stopped. PRs listed as merged are already merged, but the queue file is only rewritten when a run finishes, so they may still appear in the queue; PRs not listed may still be queued.`:`${i.partial?"Partial outcome":"Not completed"}: ${r}. Lines below show what completed before it stopped; PRs not listed as merged may still be queued.`}function YS(){const[i,r]=R.useState(null),[c,o]=R.useState(null),[f,p]=R.useState(""),[m,g]=R.useState(!1),[x,b]=R.useState(null),[j,v]=R.useState(null),[z,k]=R.useState(!1),[Q,Z]=R.useState(null),U=R.useCallback(async()=>{try{const L=await yg("/v1/merge/queue",{headers:nd(!1)});L.measured?(r(L.queue),o(null)):(r(null),o(L.error??"not measured"))}catch(L){r(null),o(L instanceof Error?L.message:String(L))}},[]);R.useEffect(()=>{U()},[U]);const H=/^[0-9]{1,7}$/.test(f.trim()),W=async()=>{g(!0),b(null);try{await yg("/v1/merge/queue",{method:"POST",headers:nd(!0),body:JSON.stringify({prs:[f.trim()]})}),b({tone:"success",text:`Queued PR #${f.trim()}`}),p(""),await U()}catch(L){b({tone:"error",text:L instanceof Error?L.message:String(L)})}g(!1)},$=async L=>{g(!0),b(null),k(!1);try{const ce=await $S(L);L?(v(ce),Z(null)):(Z(ce),v(null)),await U()}catch(ce){b({tone:"error",text:ce instanceof Error?ce.message:String(ce)})}g(!1)},V=i!==null&&i.length===0;return s.jsxs("div",{style:{display:"grid",gap:16,maxWidth:720},children:[s.jsx("h1",{style:{margin:0,fontSize:"var(--cp-text-xl, 20px)"},children:"Merge queue"}),s.jsx(Qe,{children:s.jsxs("div",{style:{display:"grid",gap:8},children:[s.jsx("strong",{children:"Queue"}),c?s.jsx($e,{title:"Queue not measured",hint:c}):i===null?s.jsx(We,{label:"Reading the queue"}):V?s.jsx("small",{children:"The merge queue is empty."}):s.jsx("ol",{"aria-label":"Queued pull requests",style:{margin:0,paddingLeft:20},children:i.map(L=>s.jsxs("li",{children:["PR #",L]},L))}),s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsx(Za,{"aria-label":"PR number",inputMode:"numeric",placeholder:"PR number",value:f,onChange:L=>p(L.target.value.replace(/[^0-9]/g,"").slice(0,7))}),s.jsx(Ce,{variant:"secondary",disabled:!H||m,onClick:W,children:"Add"})]})]})}),s.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[s.jsx(Ce,{variant:"secondary",disabled:m||V||i===null,onClick:()=>$(!0),children:"Preview"}),z?s.jsxs("span",{role:"alertdialog","aria-label":"Confirm merge",style:{display:"inline-flex",gap:8,alignItems:"center"},children:[s.jsx("small",{children:"Squash-merge each PR whose checks are green, one at a time. This cannot be undone."}),s.jsx(Ce,{variant:"danger",disabled:m,onClick:()=>$(!1),children:"Confirm merge"}),s.jsx(Ce,{variant:"ghost",onClick:()=>k(!1),children:"Cancel"})]}):s.jsx(Ce,{disabled:m||V||i===null,onClick:()=>k(!0),children:"Merge queue"}),m?s.jsx(We,{label:"Working"}):null]}),x?s.jsx(Oe,{tone:x.tone,children:x.text}):null,j?s.jsxs(Qe,{children:[s.jsx("strong",{children:"Plan (dry run, nothing changed)"}),ks(j)?s.jsx("p",{role:"alert",style:{margin:"4px 0"},children:ks(j)}):null,s.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap"},children:j.lines.join(`
|
|
149
|
+
`)||"not measured"})]}):null,Q?s.jsxs(Qe,{children:[s.jsx("strong",{children:"Merge result"})," ",s.jsx(Oe,{tone:Q.ok?"success":"warning",children:Q.ok?"all merged":Q.partial||!Q.ran?"partial result":"some PRs left in queue"}),ks(Q)?s.jsx("p",{role:"alert",style:{margin:"4px 0"},children:ks(Q)}):null,s.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap"},children:Q.lines.join(`
|
|
150
|
+
`)})]}):null]})}const VS={id:"merge",path:"/merge",title:"Merge queue",component:YS},GS=()=>globalThis.LOKI_CONTROL_BASE??"",QS=i=>i==="low"?"success":i==="medium"?"warning":i==="high"||i==="critical"?"error":"neutral";function XS(){const[i,r]=R.useState("pr"),[c,o]=R.useState(""),[f,p]=R.useState(!1),[m,g]=R.useState(null),x=i==="staged"||(i==="pr"?/^[0-9]{1,7}$/.test(c):/^[A-Za-z0-9._/][A-Za-z0-9._/-]{0,99}$/.test(c)),b=async()=>{p(!0);const j=i==="staged"?"staged=1":`${i}=${encodeURIComponent(c)}`;try{const v=St(),z=await fetch(`${GS()}/v1/review/risk?${j}`,{headers:v?{authorization:`Bearer ${v}`}:{}}),k=await z.json().catch(()=>null);g(z.ok&&k&&k.measured===!0&&typeof k.score=="number"?k:{measured:!1,reason:(k==null?void 0:k.error)??(k==null?void 0:k.reason)??`HTTP ${z.status}`})}catch(v){g({measured:!1,reason:v instanceof Error?v.message:String(v)})}p(!1)};return s.jsxs("div",{style:{display:"grid",gap:16,maxWidth:720},children:[s.jsx("h1",{style:{margin:0,fontSize:"var(--cp-text-xl, 20px)"},children:"PR risk"}),s.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[s.jsxs("select",{"aria-label":"Diff source",value:i,onChange:j=>{r(j.target.value),o(""),g(null)},children:[s.jsx("option",{value:"pr",children:"Pull request"}),s.jsx("option",{value:"staged",children:"Staged changes"}),s.jsx("option",{value:"since",children:"Since a ref"})]}),i!=="staged"?s.jsx(Za,{"aria-label":i==="pr"?"PR number":"Git ref",placeholder:i==="pr"?"PR number":"HEAD~5",value:c,onChange:j=>o(j.target.value)}):null,s.jsx(Ce,{disabled:!x||f,onClick:b,children:"Measure risk"}),f?s.jsx(We,{label:"Scoring"}):null]}),m&&m.measured?s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[s.jsx($a,{label:"Risk score",value:`${m.score}/100`}),s.jsx(Oe,{tone:QS(m.level),children:m.level}),s.jsx("small",{children:m.source}),s.jsx("small",{children:typeof m.files=="number"?`${m.files} files`:"files: not measured"})]}),s.jsx(Kn,{caption:"Risk factors",columns:["Factor","Points","Detail"],rows:m.factors.map(j=>[j.factor,`${j.points}/${j.max}`,j.detail])})]}):m?s.jsxs(Qe,{children:[s.jsx("strong",{children:"Risk score: not measured"}),s.jsx("br",{}),s.jsx("small",{children:m.reason??"no reason reported"})]}):null]})}const ZS={id:"risk",path:"/risk",title:"PR risk",component:XS},gv=()=>globalThis.LOKI_CONTROL_BASE??"",vv=(i={})=>{const r=St();return r?{...i,authorization:`Bearer ${r}`}:i};class Xa extends Error{constructor(r,c,o){super(r),this.status=c,this.details=o}}async function yv(){const i=await fetch(`${gv()}/v1/config`,{headers:vv()}),r=await i.json().catch(()=>({}));if(!i.ok)throw new Xa(r.error??`HTTP ${i.status}`,i.status,[]);return{exists:!!r.exists,etag:r.etag??"",config:r.config??{},errors:r.errors??[]}}async function xv(i,r){const c=await fetch(`${gv()}/v1/config`,{method:"PUT",headers:vv({"content-type":"application/json","if-match":r}),body:JSON.stringify({config:i})}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Xa(o.error??`HTTP ${c.status}`,c.status,o.errors??(o.paths?o.paths.map(f=>`${f}: looks like a secret`):[]));return{etag:o.etag??r,config:o.config??i}}const Le=i=>`var(--cp-${i})`,KS=[{id:"provider",title:"Provider",hint:"Default provider. A CLI flag or LOKI_PROVIDER overrides it.",fields:[{path:["provider"],label:"Provider",kind:"select",options:["claude","codex","cline","aider","opencode"]}]},{id:"models",title:"Models",hint:"Model names passed to the provider.",fields:[{path:["models","default"],label:"Default model",kind:"text"},{path:["models","cheap"],label:"Cheap model",kind:"text"}]},{id:"git",title:"Git",hint:"Name of the environment variable that holds your GitHub token. The token itself is never stored here.",fields:[{path:["git","token_env"],label:"Token variable name",kind:"env",hint:"For example GITHUB_TOKEN"}]},{id:"repos",title:"Repos",hint:"owner/repo, one per line. The UI offers these and headless runs may target them.",fields:[{path:["repos"],label:"Repos",kind:"lines"}]},{id:"concurrency",title:"Concurrency",hint:"Backlog runs in parallel, 1 to 32 (default 2).",fields:[{path:["concurrency"],label:"Parallel runs",kind:"number"}]},{id:"budgets",title:"Budgets",hint:"USD caps. Leave blank for no cap.",fields:[{path:["budgets","per_run_usd"],label:"Per run (USD)",kind:"number"},{path:["budgets","per_day_usd"],label:"Per day (USD)",kind:"number"}]},{id:"knowledge_sources",title:"Knowledge sources",hint:"Local paths of knowledge to give runs, one per line.",fields:[{path:["knowledge_sources"],label:"Paths",kind:"lines"}]},{id:"workspaces",title:"Workspaces",hint:"Named groups of repos for cross-repo runs. Edited as JSON; the server validates it against the schema.",fields:[{path:["workspaces"],label:"Workspaces (JSON)",kind:"json"}]},{id:"notifications",title:"Notifications",hint:"Name of the environment variable that holds the Slack webhook URL. The URL itself is never stored here.",fields:[{path:["notifications","slack_webhook_env"],label:"Webhook variable name",kind:"env",hint:"For example SLACK_WEBHOOK_URL"}]}],yn=i=>typeof i=="object"&&i!==null&&!Array.isArray(i);function Bs(i){const r={},c=yn(i)&&yn(i.workspaces)?i.workspaces:{};for(const[o,f]of Object.entries(c))yn(f)&&(yn(f.integration)&&"command"in f.integration&&(r[`${o} integration command`]=String(f.integration.command)),Array.isArray(f.repos)&&f.repos.forEach((p,m)=>{yn(p)&&"setup"in p&&(r[`${o} setup for repo ${m+1}`]=String(p.setup))}));return r}const JS=(i,r)=>r.reduce((c,o)=>yn(c)?c[o]:void 0,i);function bv(i,r,c){const o={...i},[f,...p]=r;if(f===void 0)return o;if(p.length===0)return c===void 0?delete o[f]:o[f]=c,o;const m=bv(yn(o[f])?o[f]:{},p,c);return Object.keys(m).length===0?delete o[f]:o[f]=m,o}function IS(i,r){return r==null?"":i.kind==="lines"?Array.isArray(r)?r.join(`
|
|
151
|
+
`):"":i.kind==="json"?JSON.stringify(r,null,2):String(r)}function FS(i,r){const c=r.trim();if(c==="")return{value:void 0};if(i.kind==="number"){const o=Number(c);return Number.isFinite(o)?{value:o}:{error:`${i.label} must be a number`}}if(i.kind==="lines")return{value:c.split(`
|
|
152
|
+
`).map(o=>o.trim()).filter(Boolean)};if(i.kind==="json")try{const o=JSON.parse(c);return yn(o)?{value:o}:{error:`${i.label} must be a JSON object`}}catch{return{error:`${i.label} is not valid JSON`}}return{value:c}}function WS({section:i,state:r,onSave:c}){const o=i.fields.map(U=>IS(U,JS(r.config,U.path))),[f,p]=R.useState(o),[m,g]=R.useState([]),[x,b]=R.useState(!1),[j,v]=R.useState(!1),z=R.useId(),k=JSON.stringify(o);R.useEffect(()=>{p(o),g([])},[k]);const Q=f.some((U,H)=>U!==o[H]),Z=async()=>{const U=[];let H=r.config;if(i.fields.forEach((W,$)=>{const V=FS(W,f[$]??"");V.error?U.push(V.error):H=bv(H,W.path,V.value)}),U.length){g(U);return}if(JSON.stringify(Bs(H))!==JSON.stringify(Bs(r.config))){g(["Edit shell commands in loki.yaml directly"]);return}b(!0),g([]),v(!1);try{await c(H),v(!0)}catch(W){g(W instanceof Xa?[W.message,...W.details]:[W.message])}finally{b(!1)}};return s.jsxs(Qe,{"data-testid":`settings-${i.id}`,"aria-labelledby":`${z}-h`,children:[s.jsx("h2",{id:`${z}-h`,style:{margin:0,fontFamily:Le("font-serif"),fontWeight:400,fontSize:Le("text-xl")},children:i.title}),s.jsx("p",{style:{margin:"4px 0 12px",color:Le("text-2"),fontSize:Le("text-md")},children:i.hint}),s.jsx("div",{style:{display:"grid",gap:12},children:i.fields.map((U,H)=>{const W=`${z}-${H}`,$=L=>{v(!1),p(ce=>ce.map((ee,re)=>re===H?L:ee))},V={id:W,value:f[H]??"","data-field":U.path.join(".")};return s.jsxs("div",{children:[s.jsx("label",{htmlFor:W,style:{display:"block",fontSize:Le("text-md"),marginBottom:4},children:U.label}),U.kind==="select"?s.jsxs("select",{...V,onChange:L=>$(L.target.value),style:{padding:"8px 10px",borderRadius:Le("radius-md"),border:`1px solid ${Le("border")}`,background:Le("bg"),color:Le("text"),font:"inherit"},children:[s.jsx("option",{value:"",children:"Not set"}),U.options.map(L=>s.jsx("option",{value:L,children:L},L))]}):U.kind==="lines"||U.kind==="json"?s.jsx(wg,{...V,rows:U.kind==="json"?8:4,spellCheck:!1,onChange:L=>$(L.target.value),style:U.kind==="json"?{fontFamily:Le("font-mono")}:void 0}):s.jsx(Za,{...V,type:U.kind==="number"?"number":"text",step:U.kind==="number"?"any":void 0,autoComplete:"off",spellCheck:!1,placeholder:U.kind==="env"?"ENV_VAR_NAME":void 0,onChange:L=>$(L.target.value),style:U.kind==="env"?{fontFamily:Le("font-mono")}:void 0}),U.hint?s.jsx("div",{style:{color:Le("text-3"),fontSize:Le("text-base"),marginTop:4},children:U.hint}):null]},U.path.join("."))})}),i.id==="workspaces"&&Object.keys(Bs(r.config)).length?s.jsxs("div",{"data-testid":"settings-shell-readonly",style:{marginTop:12},children:[s.jsx("div",{style:{fontSize:Le("text-md"),marginBottom:4},children:"Shell commands (read only, edit in loki.yaml directly)"}),s.jsx("ul",{style:{margin:0,paddingLeft:18,fontFamily:Le("font-mono"),fontSize:Le("text-base"),color:Le("text-2")},children:Object.entries(Bs(r.config)).map(([U,H])=>s.jsxs("li",{children:[U,": ",H]},U))})]}):null,m.length?s.jsx("ul",{role:"alert","data-testid":"settings-problems",style:{margin:"12px 0 0",paddingLeft:18,color:Le("error"),fontSize:Le("text-md")},children:m.map(U=>s.jsx("li",{children:U},U))}):null,s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:12},children:[s.jsx(Ce,{disabled:!Q||x,onClick:Z,children:x?"Saving":"Save"}),j&&!Q?s.jsx(Oe,{tone:"success",children:"Saved"}):null]})]})}function PS(){const[i,r]=R.useState(null),[c,o]=R.useState(null),f=()=>{o(null),yv().then(r,m=>o(m.message))};if(R.useEffect(f,[]),c)return s.jsx($e,{title:"Configuration unavailable",hint:c,action:s.jsx(Ce,{variant:"secondary",onClick:f,children:"Retry"})});if(!i)return s.jsx(We,{label:"Loading configuration"});const p=async m=>{try{const g=await xv(m,i.etag);r({exists:!0,etag:g.etag,config:g.config,errors:[]})}catch(g){throw g instanceof Xa&&g.status===409?new Xa("loki.yaml changed on disk since it was loaded. Reload to see the latest, then apply your edit again.",409,[]):g}};return s.jsxs("div",{"data-testid":"config-settings",style:{display:"grid",gap:16,maxWidth:720},children:[s.jsxs("div",{children:[s.jsx("h1",{style:{margin:0,fontFamily:Le("font-serif"),fontWeight:400,fontSize:Le("text-2xl")},children:"Configuration"}),s.jsxs("p",{style:{margin:"4px 0 0",color:Le("text-2"),fontSize:Le("text-md")},children:[i.exists?"Edits loki.yaml in this repo. Comments are kept.":"No loki.yaml in this repo yet. Saving a section creates it."," ","Credentials are environment variable names, never values."]})]}),i.errors.length?s.jsxs(Qe,{"data-testid":"config-file-errors",role:"alert",style:{borderColor:Le("error")},children:[s.jsx("strong",{children:"The current loki.yaml has problems"}),s.jsx("ul",{style:{margin:"6px 0 0",paddingLeft:18},children:i.errors.map(m=>s.jsx("li",{children:m},m))})]}):null,KS.map(m=>s.jsx(WS,{section:m,state:i,onSave:p},m.id)),s.jsx("div",{children:s.jsx(Ce,{variant:"ghost",size:"sm",onClick:f,children:"Reload from disk"})})]})}const ej={id:"settings-config",path:"/settings/config",title:"Configuration",component:PS,inSettings:!0},Io=i=>typeof i=="object"&&i!==null&&!Array.isArray(i),Ji=i=>i.replace(/[\\/]+$/,"").split(/[\\/]/).pop()??i;function tj(i){const r=Io(i)&&Io(i.workspaces)?i.workspaces:{};return Object.entries(r).map(([c,o])=>({name:c,def:Io(o)?o:{}}))}const lj=(i,r)=>{const c=r.origin_repo;return c?i.repo&&(c===i.repo||c.endsWith(`/${i.repo}`)||Ji(c)===Ji(i.repo))?!0:!!i.path&&Ji(c)===Ji(i.path):!1},xg=i=>i.started_at??"";function nj(i,r){return tj(i).map(({name:c,def:o})=>{const f=(Array.isArray(o.repos)?o.repos:[]).map(x=>{const b=r.filter(j=>lj(x,j)).sort((j,v)=>xg(v).localeCompare(xg(j)));return{name:x.repo??(x.path?Ji(x.path):"unnamed"),path:x.path??null,after:Array.isArray(x.after)?x.after:[],shell:typeof x.setup=="string",latest:b[0]??null,runs:b.length}}),p=f.filter(x=>x.latest),m=f.length&&p.length===f.length?{total:f.length,verified:p.filter(x=>Ga(x.latest)).length,failed:p.filter(x=>x.latest.verdict!==null&&!Ga(x.latest)).length,running:p.filter(x=>x.latest.verdict===null).length}:null,g=!!o.integration&&typeof o.integration.command=="string";return{name:c,repos:f,shell:g||f.some(x=>x.shell),integrationShell:g,status:m}})}const Sv=()=>globalThis.LOKI_CONTROL_BASE??"",aj=()=>{const i=St();return i?{"content-type":"application/json",authorization:`Bearer ${i}`}:{"content-type":"application/json"}};async function ij(){const i=St(),r=await fetch(`${Sv()}/v1/config`,{headers:i?{authorization:`Bearer ${i}`}:{}});if(!r.ok)throw new Error(`/v1/config: HTTP ${r.status}`);const c=await r.json();return{config:c.config??{},errors:c.errors??[]}}async function uj(i,r){const c=await fetch(`${Sv()}/v1/runs`,{method:"POST",headers:aj(),body:JSON.stringify({workspace:i,target:r})}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??`HTTP ${c.status}`);return{pid:o.pid??0,command:o.command??""}}function sj({name:i}){const[r,c]=R.useState(""),[o,f]=R.useState(null),[p,m]=R.useState(!1),g=async()=>{m(!0),f(null);try{const x=await uj(i,r.trim());f({ok:!0,text:`Started: ${x.command} (pid ${x.pid})`})}catch(x){f({ok:!1,text:x instanceof Error?x.message:String(x)})}finally{m(!1)}};return s.jsxs("div",{style:{display:"grid",gap:8},children:[s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsx(Za,{"aria-label":`Target for ${i}`,placeholder:"owner/repo#123 or a short task",value:r,onChange:x=>c(x.target.value)}),s.jsx(Ce,{disabled:p||!r.trim(),onClick:g,children:"Run workspace"})]}),o?s.jsxs("div",{role:o.ok?"status":"alert",children:[s.jsx(Oe,{tone:o.ok?"success":"error",children:o.ok?"started":"refused"})," ",o.text]}):null]})}function rj({w:i}){const r=i.repos.map(c=>[s.jsx("strong",{children:c.name},"n"),c.path??"not measured",c.after.length?c.after.join(", "):"none",c.latest?c.latest.verdict?s.jsx($t,{run:c.latest},"v"):s.jsx(Oe,{tone:"neutral",pulse:!0,children:"running"},"v"):"not measured",c.latest?String(c.runs):"not measured"]);return s.jsx(Qe,{children:s.jsxs("div",{style:{display:"grid",gap:12},children:[s.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[s.jsx("h2",{style:{margin:0,fontSize:16},children:i.name}),i.shell?s.jsx(Oe,{tone:"warning",children:"read-only: runs shell commands"}):null,s.jsx("span",{style:{marginLeft:"auto"},children:i.status?`Group: ${i.status.verified} of ${i.status.total} verified`+(i.status.failed?`, ${i.status.failed} not verified`:"")+(i.status.running?`, ${i.status.running} running`:""):"Group status: not measured"})]}),i.repos.length?s.jsx(Kn,{caption:`Repos in ${i.name}`,columns:["Repo","Path","After","Latest run","Runs"],rows:r}):s.jsx("div",{children:"No repos listed"}),i.shell?s.jsx("div",{children:"Edit shell commands in loki.yaml; the UI never changes them."}):null,s.jsx(sj,{name:i.name})]})})}function cj(){const[i,r]=R.useState(null),[c,o]=R.useState([]),[f,p]=R.useState(null);return R.useEffect(()=>{let m=!0;return(async()=>{try{const{config:g,errors:x}=await ij();let b=[];try{b=(await $l()).runs}catch{}m&&(r(nj(g,b)),o(x))}catch(g){m&&p(g instanceof Error?g.message:String(g))}})(),()=>{m=!1}},[]),f?s.jsx($e,{title:"Could not load workspaces",hint:f}):i?i.length?s.jsxs("div",{style:{display:"grid",gap:16},children:[c.length?s.jsxs("div",{role:"alert",children:[s.jsx(Oe,{tone:"warning",children:"loki.yaml has problems"})," ",c.join("; ")]}):null,i.map(m=>s.jsx(rj,{w:m},m.name))]}):s.jsx($e,{title:"No workspaces",hint:"Define workspaces in loki.yaml to run a group of repos together."}):s.jsx(We,{label:"Loading workspaces"})}const oj={id:"workspaces",path:"/workspaces",title:"Workspaces",component:cj},dj=()=>globalThis.LOKI_CONTROL_BASE??"";async function fj(){const i=St(),r=await fetch(`${dj()}/v1/integrations`,{headers:i?{authorization:`Bearer ${i}`}:{}});if(!r.ok)throw new Error(`HTTP ${r.status}`);return(await r.json()).integrations}const hj=i=>typeof i=="object"&&i!==null&&!Array.isArray(i);function jv(i,r,c){const[o,...f]=r;return o===void 0?i:{...i,[o]:f.length?jv(hj(i[o])?i[o]:{},f,c):c}}const mj={connected:"success",not_connected:"neutral",not_measured:"neutral"},pj={connected:"connected",not_connected:"not connected",not_measured:"not measured"};function gj({row:i,onChanged:r}){const[c,o]=R.useState(i.env_name??""),[f,p]=R.useState(!1),[m,g]=R.useState(null),x=/^[A-Z_][A-Z0-9_]*$/.test(c),b=async()=>{if(!(!i.config_path||!x)){p(!0),g(null);try{const j=await yv();await xv(jv(j.config,i.config_path.split("."),c),j.etag),g(`Saved ${c} to loki.yaml`),r()}catch(j){g(j instanceof Xa?[j.message,...j.details].join(": "):j.message)}finally{p(!1)}}};return s.jsxs(Qe,{"data-testid":`integration-${i.id}`,children:[s.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",justifyContent:"space-between"},children:[s.jsx("strong",{children:i.label}),s.jsx(Oe,{tone:mj[i.status],children:pj[i.status]})]}),s.jsx("p",{style:{margin:"4px 0 8px",color:"var(--cp-text-2)",fontSize:"var(--cp-text-md)"},children:i.detail}),i.config_path?s.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[s.jsx(Za,{"aria-label":`${i.label} variable name`,value:c,placeholder:"ENV_VAR_NAME",autoComplete:"off",spellCheck:!1,onChange:j=>{o(j.target.value.trim()),g(null)},style:{fontFamily:"var(--cp-font-mono)"}}),s.jsx(Ce,{onClick:b,disabled:f||!x||c===i.env_name,children:f?"Saving":"Connect"})]}):s.jsx("small",{style:{color:"var(--cp-text-3)"},children:i.id==="mcp"?"Managed in .mcp.json.":"loki.yaml has no setting for this service yet."}),i.config_path&&c&&!x?s.jsx("small",{role:"alert",children:"Use an environment variable name such as GITHUB_TOKEN, never the secret itself."}):null,m?s.jsx("small",{role:"status",style:{display:"block",marginTop:4},children:m}):null]})}function vj(){const[i,r]=R.useState(null),[c,o]=R.useState(null),f=R.useCallback(()=>{fj().then(r).catch(p=>o(p instanceof Error?p.message:String(p)))},[]);return R.useEffect(f,[f]),c?s.jsx($e,{title:"Could not load integrations",hint:c}):i?s.jsxs("div",{style:{display:"grid",gap:16},children:[s.jsx("h1",{style:{margin:0,fontSize:"var(--cp-text-xl, 20px)"},children:"Integrations"}),s.jsx("small",{style:{color:"var(--cp-text-3)"},children:"Status shows whether an environment variable is set or a CLI is signed in, never its value. Connect stores the variable name in loki.yaml."}),i.map(p=>s.jsx(gj,{row:p,onChanged:f},p.id))]}):s.jsx(We,{label:"Probing integrations"})}const yj={id:"integrations",path:"/integrations",title:"Integrations",component:vj,inSettings:!0},xj=Fg.component,bg={...Fg,component:({params:i})=>s.jsx(xj,{source:i.source,run:i.run,renderSlot:(r,c)=>s.jsx(zS,{source:i.source,run:i.run,status:r.blocked_question?"BLOCKED":r.status==="running"||r.verdict===null?"running":r.verdict??r.status??"",onChanged:c})})};function Sg(i){const r=i.component;return{...i,component:()=>s.jsx(r,{})}}function bj(){tg("run-detail"),tg("new-run"),qt(Sg({...lS,path:"/"})),qt({...bg,id:"run-short",path:"/r/:source/:run"}),qt(bg),qt(LS),qt(qS);for(const i of[A1,uS,rS,xS,_S,Pb,VS,ZS,ej,oj,yj])qt(Sg(i))}const ft=i=>`var(--cp-${i})`,jg=i=>{location.hash=`#${i}`};function Sj(){const[i,r]=R.useState(!1),[c,o]=R.useState(""),[f,p]=R.useState(0),[m,g]=R.useState([]),[x,b]=R.useState(null),j=R.useRef(null),v=R.useId(),z=R.useSyncExternalStore(Yg,qs,qs),k=()=>{r(!1),o(""),p(0)};R.useEffect(()=>(sg(()=>r($=>!$)),()=>sg(null)),[]),R.useEffect(()=>{if(!i)return;let $=!0;return b(null),$l().then(V=>{$&&g(V.runs)},V=>{$&&b(V.message)}),queueMicrotask(()=>{var V;return(V=j.current)==null?void 0:V.focus()}),()=>{$=!1}},[i]),R.useEffect(()=>{const $=V=>{const L=V.metaKey||V.ctrlKey,ce=V.key.toLowerCase();V.key==="Escape"&&i?(V.preventDefault(),k()):L&&V.key==="Enter"?(V.preventDefault(),window.dispatchEvent(new CustomEvent(ld)),i&&k()):L&&!V.shiftKey&&ce==="n"?(V.preventDefault(),jg("/new"),i&&k()):L&&V.shiftKey&&ce==="d"&&(V.preventDefault(),Vs())};return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[i]);const Q=R.useMemo(()=>Kb(c,Qb($g()),Xb(m),Gb()),[c,m,z]),Z=Math.min(f,Math.max(0,Q.length-1)),U=$=>{$.action==="toggle-theme"?Vs():$.to&&jg($.to),k()},H=$=>{if($.key==="ArrowDown")$.preventDefault(),p(Q.length?(Z+1)%Q.length:0);else if($.key==="ArrowUp")$.preventDefault(),p(Q.length?(Z-1+Q.length)%Q.length:0);else if($.key==="Home")$.preventDefault(),p(0);else if($.key==="End")$.preventDefault(),p(Math.max(0,Q.length-1));else if($.key==="Enter"&&!($.metaKey||$.ctrlKey)){$.preventDefault();const V=Q[Z];V&&U(V)}};if(!i)return null;let W="";return s.jsx("div",{"data-testid":"palette-backdrop",onClick:k,style:{position:"fixed",inset:0,zIndex:400,background:"rgba(0,0,0,0.4)",display:"flex",justifyContent:"center",alignItems:"flex-start",paddingTop:"14vh"},children:s.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Command palette",onClick:$=>$.stopPropagation(),style:{width:"min(560px, 92vw)",background:ft("bg"),color:ft("text"),border:`1px solid ${ft("border")}`,borderRadius:ft("radius-lg"),boxShadow:ft("shadow-lg"),overflow:"hidden",fontFamily:ft("font-sans")},children:[s.jsx("input",{ref:j,role:"combobox","aria-expanded":"true","aria-controls":v,"aria-autocomplete":"list","aria-label":"Search pages, runs and actions","aria-activedescendant":Q[Z]?`${v}-${Z}`:void 0,value:c,onChange:$=>{o($.target.value),p(0)},onKeyDown:H,placeholder:"Search pages, runs, actions",style:{width:"100%",boxSizing:"border-box",padding:"14px 16px",background:"transparent",color:ft("text"),border:"none",borderBottom:`1px solid ${ft("border")}`,outline:"none",fontSize:"1rem"}}),s.jsx("ul",{id:v,role:"listbox","aria-label":"Results",style:{listStyle:"none",margin:0,padding:6,maxHeight:"50vh",overflowY:"auto"},children:Q.map(($,V)=>{const L=$.kind!==W?$.kind:null;return W=$.kind,s.jsxs("li",{role:"presentation",children:[L&&s.jsx("div",{role:"presentation",style:{padding:"8px 10px 4px",fontSize:ft("text-sm"),color:ft("text-2")},children:L}),s.jsxs("div",{id:`${v}-${V}`,role:"option","aria-selected":V===Z,onMouseMove:()=>p(V),onClick:()=>U($),style:{display:"flex",justifyContent:"space-between",gap:12,padding:"8px 10px",borderRadius:ft("radius-md"),cursor:"pointer",background:V===Z?ft("bg-3"):"transparent"},children:[s.jsx("span",{children:$.label}),$.hint&&s.jsx("span",{style:{color:ft("text-2"),fontSize:ft("text-sm")},children:$.hint.startsWith("Cmd")?s.jsx(cd,{children:$.hint}):$.hint})]})]},$.id)})}),Q.length===0&&s.jsx("p",{role:"status",style:{margin:0,padding:"14px 16px",color:ft("text-2")},children:"No matches"}),x&&s.jsxs("p",{role:"alert",style:{margin:0,padding:"8px 16px",color:ft("error"),fontSize:ft("text-sm")},children:["Recent runs not loaded: ",x]})]})})}const Sn="not recorded";function _v(i){return i.cost_usd!==null&&i.cost_usd!==void 0?Wt(i.cost_usd):i.total_sessions>0&&i.measured_sessions<i.total_sessions?`unpriced (${i.measured_sessions} of ${i.total_sessions} sessions priced)`:"unpriced"}const jj=i=>i.started_at&&i.ended_at?(Date.parse(i.ended_at)-Date.parse(i.started_at))/1e3:null,Ev=i=>typeof i=="number"?`${i.toFixed(1)}s`:Sn,Tv=i=>i?i.replace("T"," ").replace(/\.\d+Z$/,"Z"):Sn,_j={[pe.VERIFIED]:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-300 ring-emerald-500/30",[pe.PARTIAL]:"bg-amber-500/15 text-amber-700 dark:text-amber-300 ring-amber-500/30",[pe.FAILED]:"bg-red-500/15 text-red-700 dark:text-red-300 ring-red-500/30",[pe.TAMPERED]:"bg-red-600/20 text-red-700 dark:text-red-300 ring-red-600/50",[pe.VERIFIED_UNCHECKED]:"bg-sky-500/15 text-sky-700 dark:text-sky-300 ring-sky-500/30",[pe.UNVERIFIED]:"bg-amber-500/15 text-amber-700 dark:text-amber-300 ring-amber-500/30",[pe.SPEC_CONFLICT]:"bg-violet-500/15 text-violet-700 dark:text-violet-300 ring-violet-500/30"};function ad({verdict:i,run:r}){const c=r?Yt(r):i??null,o=c?_j[c]??"bg-slate-500/15 text-slate-600 dark:text-slate-300 ring-slate-500/30":"bg-slate-500/15 text-slate-600 dark:text-slate-300 ring-slate-500/30";return s.jsx("span",{"data-testid":"verdict",className:`inline-block rounded px-2 py-0.5 text-xs font-medium ring-1 ${o}`,children:c??"in progress"})}function Nv({url:i}){return i?/^https?:\/\//.test(i)?s.jsxs("a",{href:i,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-sky-600 hover:underline dark:text-sky-400",children:["PR ",s.jsx(Ng,{size:12})]}):s.jsx("span",{className:"break-all font-mono text-xs",title:"local origin, no web URL",children:i}):s.jsx("span",{className:"text-slate-500",children:"no PR"})}const _g=3e3;function Rv(i,r,c){const[o,f]=R.useState({data:null,error:null});return R.useEffect(()=>{let p=!0,m;f({data:null,error:null});const g=()=>i().then(x=>{p&&(f({data:x,error:null}),c!=null&&c(x)&&(m=setTimeout(g,_g)))},x=>{p&&(f(b=>({data:b.data,error:x.message})),c&&(m=setTimeout(g,_g)))});return g(),()=>{p=!1,clearTimeout(m)}},r),o}const xn=i=>i.status==="running";function zv({run:i}){const[r]=R.useState(()=>({at:Date.now(),s:i.elapsed_s??0})),[,c]=R.useState(0),o=xn(i);R.useEffect(()=>{if(!o)return;const p=setInterval(()=>c(m=>m+1),1e3);return()=>clearInterval(p)},[o]);const f=o?Math.max(i.elapsed_s??0,r.s+(Date.now()-r.at)/1e3):i.elapsed_s??i.wall_s;return s.jsx("span",{"data-testid":"elapsed",children:typeof f=="number"?`${Math.floor(f)}s`:Sn})}function Ej({onOpen:i}){const[r,c]=R.useState(""),[o,f]=R.useState(""),[p,m]=R.useState(""),{data:g,error:x}=Rv(()=>$l({verdict:r,repo:o,since:p?`${p}T00:00:00Z`:""}),[r,o,p],v=>v.runs.some(xn)),b=!!(r||o||p),j="rounded border border-slate-300 bg-white px-2 py-2 text-sm md:py-1 dark:border-slate-700 dark:bg-slate-900";return s.jsxs("section",{children:[s.jsx("h1",{className:"mb-4 text-xl font-semibold",children:"Runs"}),s.jsxs("div",{className:"mb-4 grid grid-cols-1 gap-3 text-sm sm:flex sm:flex-wrap sm:items-end",children:[s.jsxs("label",{className:"flex flex-col gap-1",children:["Verdict",s.jsxs("select",{"aria-label":"Verdict",className:j,value:r,onChange:v=>c(v.target.value),children:[s.jsx("option",{value:"",children:"All"}),c1.map(v=>s.jsx("option",{children:v},v))]})]}),s.jsxs("label",{className:"flex flex-col gap-1",children:["Repo",s.jsx("input",{"aria-label":"Repo",className:j,value:o,onChange:v=>f(v.target.value),placeholder:"owner/name"})]}),s.jsxs("label",{className:"flex flex-col gap-1",children:["Since",s.jsx("input",{"aria-label":"Since",type:"date",className:j,value:p,onChange:v=>m(v.target.value)})]})]}),x&&s.jsxs("p",{role:"alert",className:"text-red-600",children:["Could not load runs: ",x]}),!g&&!x&&s.jsx("p",{className:"text-slate-500",children:"Loading runs"}),g&&g.runs.length===0&&(b?s.jsx("p",{children:"No runs match these filters."}):s.jsx(uv,{})),g&&g.runs.length>0&&s.jsx("div",{className:"overflow-x-auto rounded border border-slate-200 dark:border-slate-800",children:s.jsxs("table",{className:"w-full text-left text-sm",children:[s.jsx("thead",{className:"bg-slate-100 text-xs uppercase text-slate-500 dark:bg-slate-900",children:s.jsxs("tr",{children:[s.jsx("th",{className:"p-2",children:"Verdict"}),s.jsx("th",{className:"p-2",children:"Run"}),s.jsx("th",{className:"hidden p-2 md:table-cell",children:"Repo"}),s.jsx("th",{className:"hidden p-2 md:table-cell",children:"Started"}),s.jsx("th",{className:"p-2",children:"Progress"}),s.jsx("th",{className:"p-2",children:"Cost"}),s.jsx("th",{className:"p-2",children:"PR"})]})}),s.jsx("tbody",{children:g.runs.map(v=>s.jsxs("tr",{"data-testid":"run-row",className:"border-t border-slate-200 dark:border-slate-800",children:[s.jsx("td",{className:"p-2",children:s.jsx(ad,{run:v})}),s.jsx("td",{className:"p-2 font-mono text-xs",children:s.jsx("a",{href:`#/runs/${encodeURIComponent(v.source_id)}/${encodeURIComponent(v.run_id)}`,onClick:()=>i==null?void 0:i(v),className:"inline-block break-all py-2 text-sky-600 hover:underline md:py-0 dark:text-sky-400",children:v.run_id})}),s.jsx("td",{className:"hidden p-2 md:table-cell",children:v.origin_repo??Sn}),s.jsx("td",{className:"hidden p-2 md:table-cell",children:Tv(v.started_at)}),s.jsx("td",{className:"p-2 text-xs","data-testid":"progress",children:xn(v)?s.jsxs(s.Fragment,{children:[v.current_stage??"starting",", ",s.jsx(zv,{run:v}),", ",(v.files_touched??[]).length," files"]}):""}),s.jsx("td",{className:"p-2","data-testid":"cost",children:_v(v)}),s.jsx("td",{className:"p-2",children:s.jsx(Nv,{url:v.pr_url})})]},`${v.source_id}/${v.run_id}`))})]})})]})}function Ii({title:i,children:r}){return s.jsxs("div",{className:"rounded border border-slate-200 p-4 dark:border-slate-800",children:[s.jsx("h2",{className:"mb-2 text-sm font-semibold uppercase text-slate-500",children:i}),r]})}function Tj({stages:i}){return i.length===0?s.jsx("p",{className:"text-slate-500",children:"No stages ingested for this run."}):s.jsx("ol",{className:"space-y-1 text-sm",children:i.map(r=>s.jsxs("li",{"data-testid":"stage",className:"flex items-center justify-between gap-4",children:[s.jsx("span",{className:"font-medium",children:r.stage}),s.jsx("span",{className:"text-slate-500",children:r.status==="started"?"running":Ev(jj(r))})]},r.stage))})}function Nj({source:i,run:r,question:c}){const[o,f]=R.useState(""),[p,m]=R.useState(null),g=async()=>{try{const x=await sd(i,r,o);m({ok:!0,text:`Saved to ${x.path}. Resume: ${x.resume}`})}catch(x){m({ok:!1,text:x.message})}};return s.jsxs(Ii,{title:"Blocked: your answer is needed",children:[s.jsx("p",{"data-testid":"blocked-question",className:"mb-2 text-sm",children:c}),s.jsx("textarea",{"data-testid":"answer-input","aria-label":"Answer",maxLength:4e3,value:o,onChange:x=>f(x.target.value),className:"w-full rounded border border-slate-300 p-2 text-sm dark:border-slate-700 dark:bg-slate-900",rows:3}),s.jsx("button",{type:"button","data-testid":"answer-submit",disabled:o.trim()==="",onClick:g,className:"mt-2 min-h-11 rounded bg-sky-600 px-4 py-2 text-sm md:min-h-0 md:px-3 md:py-1 text-white disabled:opacity-50",children:"Submit answer"}),p&&s.jsx("p",{role:p.ok?"status":"alert",className:`mt-2 break-all text-sm ${p.ok?"text-emerald-600":"text-red-600"}`,children:p.text})]})}function Rj({source:i,run:r}){const[c,o]=R.useState(!1),[f,p]=R.useState(!1),[m,g]=R.useState(null),x=async()=>{p(!0),g(null);try{await u1(i,r),location.hash="#/runs"}catch(j){g(j.message),p(!1)}},b="min-h-11 rounded px-4 py-2 text-sm md:min-h-0 md:px-3 md:py-1";return s.jsxs(Ii,{title:"Remove run",children:[c?s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsx("p",{"data-testid":"remove-confirm-text",children:"Permanently delete this run and its events from the local control database? This cannot be undone."}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{type:"button","data-testid":"remove-confirm",disabled:f,onClick:x,className:`${b} bg-red-600 text-white disabled:opacity-50`,children:f?"Removing":"Yes, remove"}),s.jsx("button",{type:"button","data-testid":"remove-cancel",disabled:f,onClick:()=>{o(!1),g(null)},className:`${b} border border-slate-300 dark:border-slate-700`,children:"Cancel"})]})]}):s.jsx("button",{type:"button","data-testid":"remove-run",onClick:()=>o(!0),className:`${b} border border-red-500/50 text-red-600`,children:"Remove"}),m&&s.jsxs("p",{role:"alert","data-testid":"remove-error",className:"mt-2 break-all text-sm text-red-600",children:["Could not remove run: ",m]})]})}function zj({source:i,run:r}){const{data:c,error:o}=Rv(()=>Pi(i,r),[i,r],xn);if(o)return s.jsxs("p",{role:"alert",className:"text-red-600",children:["Could not load run: ",o]});if(!c)return s.jsx("p",{className:"text-slate-500",children:"Loading run"});const f=c;return s.jsxs("section",{className:"space-y-4",children:[s.jsx("a",{href:"#/runs",className:"text-sm text-sky-600 hover:underline dark:text-sky-400",children:"Back to runs"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[s.jsx("h1",{className:"font-mono text-lg font-semibold",children:f.run_id}),s.jsx(ad,{run:f}),f.tampered&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-sm text-red-600",children:[s.jsx(Fp,{size:14}),"event log tampered"]}),f.conflict&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-sm text-amber-600",children:[s.jsx(Fp,{size:14}),"conflicting events ingested"]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsx(Ii,{title:"Summary",children:s.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm",children:[s.jsx("dt",{className:"text-slate-500",children:"Repo"}),s.jsx("dd",{children:f.origin_repo??Sn}),s.jsx("dt",{className:"text-slate-500",children:"Issue"}),s.jsx("dd",{children:f.issue_ref??Sn}),s.jsx("dt",{className:"text-slate-500",children:"Provider"}),s.jsx("dd",{children:f.provider??Sn}),s.jsx("dt",{className:"text-slate-500",children:"Model"}),s.jsx("dd",{children:f.model??Sn}),s.jsx("dt",{className:"text-slate-500",children:"Started"}),s.jsx("dd",{children:Tv(f.started_at)}),xn(f)&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{className:"text-slate-500",children:"Current stage"}),s.jsx("dd",{"data-testid":"current-stage",children:f.current_stage??"starting"})]}),s.jsx("dt",{className:"text-slate-500",children:xn(f)?"Elapsed":"Wall time"}),s.jsx("dd",{children:xn(f)?s.jsx(zv,{run:f}):Ev(f.wall_s)}),xn(f)&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{className:"text-slate-500",children:"Files touched"}),s.jsx("dd",{"data-testid":"files-touched",children:(f.files_touched??[]).join(", ")||"none yet"})]}),s.jsx("dt",{className:"text-slate-500",children:"Cost"}),s.jsx("dd",{"data-testid":"cost",children:_v(f)}),s.jsx("dt",{className:"text-slate-500",children:"PR"}),s.jsx("dd",{children:s.jsx(Nv,{url:f.pr_url})})]})}),s.jsx(Ii,{title:"Stage timeline",children:s.jsx(Tj,{stages:c.stages})})]}),c.blocked_question&&s.jsx(Nj,{source:i,run:r,question:c.blocked_question}),s.jsx(Ii,{title:"Receipt",children:s.jsxs("div",{className:"space-y-3 text-sm",children:[c.receipt?s.jsxs("p",{children:["Receipt verdict: ",s.jsx(ad,{run:{verdict:c.receipt.verdict,tampered:f.tampered,attested:f.attested,sig_checked:f.sig_checked}})," ",s.jsx("span",{className:"ml-2 font-mono text-xs text-slate-500",children:c.receipt.sha256})]}):s.jsx("p",{className:"text-slate-500",children:"No receipt ingested for this run."}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"NOT PROVEN"}),c.not_proven.length===0?s.jsx("p",{className:"text-slate-500",children:"Nothing listed as not proven."}):s.jsx("ul",{className:"list-disc pl-5",children:c.not_proven.map(p=>s.jsx("li",{"data-testid":"not-proven",children:p},p))})]})]})}),s.jsx(Rj,{source:i,run:r})]})}const md=s.jsxs(s.Fragment,{children:[s.jsx(iv,{}),s.jsx(Ej,{})]});qt({id:"home",path:"/",title:"Home",component:()=>s.jsx(Bg,{fallback:md})});qt({id:"overview",path:"/overview",title:"Overview",component:()=>s.jsx(Bg,{overview:!0,fallback:md})});qt({id:"new-run",path:"/new",title:"New run",component:()=>s.jsxs("section",{children:[s.jsx("h1",{className:"mb-4 text-xl font-semibold",children:"New run"}),s.jsx(iv,{})]})});qt({id:"runs",path:"/runs",title:"Runs",component:()=>md});qt({id:"run-detail",path:"/runs/:source/:run",title:"Run",component:({params:i})=>s.jsx(zj,{source:i.source,run:i.run})});qt({id:"live-run",path:"/live/:source/:run",title:"Live run",component:({params:i})=>s.jsx(kg,{source:i.source,run:i.run})});qt({id:"settings-general",path:"/settings/general",title:"General",inSettings:!0,component:gb});bj();function Cj(){return s.jsxs(s.Fragment,{children:[s.jsx(zb,{}),s.jsx(Sj,{})]})}Is();Mx.createRoot(document.getElementById("root")).render(s.jsx(Cj,{}));
|