@kaitranntt/ccs 7.69.1-dev.1 → 7.69.1-dev.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/dist/ui/assets/accounts-DN0lP-yj.js +1 -0
- package/dist/ui/assets/{alert-dialog-QyEXocpn.js → alert-dialog-BA39vaYL.js} +1 -1
- package/dist/ui/assets/api-D2cjf1H4.js +4 -0
- package/dist/ui/assets/{auth-section-BszF77uT.js → auth-section-BNX8_9MJ.js} +1 -1
- package/dist/ui/assets/{backups-section-D6RgaOx1.js → backups-section-Bt0FA5zl.js} +1 -1
- package/dist/ui/assets/channels-FaDUjf3Y.js +1 -0
- package/dist/ui/assets/{checkbox-Dzwkj_Pg.js → checkbox-DHF-UBrH.js} +1 -1
- package/dist/ui/assets/claude-extension-D-skBToQ.js +1 -0
- package/dist/ui/assets/cliproxy-CD7z-_q8.js +3 -0
- package/dist/ui/assets/cliproxy-ai-providers-QSOOqh8F.js +15 -0
- package/dist/ui/assets/cliproxy-control-panel-D9dLU28p.js +1 -0
- package/dist/ui/assets/codex-CHO5_hku.js +27 -0
- package/dist/ui/assets/confirm-dialog-BICDz_zm.js +1 -0
- package/dist/ui/assets/copilot-BnQrRCuJ.js +3 -0
- package/dist/ui/assets/{cursor-BrcDgu6X.js → cursor-CXopLKfC.js} +1 -1
- package/dist/ui/assets/droid-CLFg9ELE.js +2 -0
- package/dist/ui/assets/{globalenv-section-DoX37DqB.js → globalenv-section-NPjCcYBN.js} +1 -1
- package/dist/ui/assets/{health-D_gdcxnc.js → health-B_3JpCrY.js} +1 -1
- package/dist/ui/assets/index-B5Egq7qY.js +1 -0
- package/dist/ui/assets/index-BY2j-o67.js +1 -0
- package/dist/ui/assets/{index-CTGpqIx6.js → index-BcUkpsGj.js} +1 -1
- package/dist/ui/assets/{index-DoVPk3vW.js → index-BgGHTjTd.js} +1 -1
- package/dist/ui/assets/index-DNmWbKbN.js +72 -0
- package/dist/ui/assets/index-DZddoGfE.js +1 -0
- package/dist/ui/assets/logs-Bb1OVYeK.js +1 -0
- package/dist/ui/assets/{masked-input-C2H-Ax0Z.js → masked-input-b4-lEKNq.js} +1 -1
- package/dist/ui/assets/proxy-status-widget-s89zaj3X.js +1 -0
- package/dist/ui/assets/{raw-json-settings-editor-panel-WxTn7-hS.js → raw-json-settings-editor-panel-Dr_BNQwQ.js} +1 -1
- package/dist/ui/assets/{searchable-select-1zOULoec.js → searchable-select-FJPe_YWv.js} +1 -1
- package/dist/ui/assets/{separator-BCfZ54mZ.js → separator-DJ0ku_ak.js} +1 -1
- package/dist/ui/assets/{shared-DlTbnc9n.js → shared-DyQlJnbj.js} +1 -1
- package/dist/ui/assets/{table-Bx2cnkWN.js → table-6Yg65ZZH.js} +1 -1
- package/dist/ui/assets/{updates-SiZKOnUD.js → updates-DSCXb6Au.js} +1 -1
- package/dist/ui/index.html +1 -1
- package/lib/mcp/ccs-browser-server.cjs +119 -27
- package/package.json +1 -1
- package/dist/ui/assets/accounts-D9eEaNx9.js +0 -1
- package/dist/ui/assets/api-7vQe0xOg.js +0 -4
- package/dist/ui/assets/channels-B1vgnNJX.js +0 -1
- package/dist/ui/assets/claude-extension-CKO4bJ22.js +0 -1
- package/dist/ui/assets/cliproxy-ai-providers-CmbFYVoR.js +0 -15
- package/dist/ui/assets/cliproxy-control-panel-M8ZfUq3C.js +0 -1
- package/dist/ui/assets/cliproxy-kHd-oC5W.js +0 -3
- package/dist/ui/assets/codex-BJ0RdMuh.js +0 -27
- package/dist/ui/assets/confirm-dialog-BlSaX2gK.js +0 -1
- package/dist/ui/assets/copilot-NJKZQXQ_.js +0 -3
- package/dist/ui/assets/droid-B9u9ZB-a.js +0 -2
- package/dist/ui/assets/index-BNU4Hhe_.js +0 -1
- package/dist/ui/assets/index-DFEMq3KP.js +0 -1
- package/dist/ui/assets/index-DOn6k1jF.js +0 -72
- package/dist/ui/assets/index-h08p9xL5.js +0 -1
- package/dist/ui/assets/logs-DtH4YMt4.js +0 -1
- package/dist/ui/assets/proxy-status-widget-BOrsn86w.js +0 -1
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-h08p9xL5.js","assets/radix-ui-Zb8sVEtn.js","assets/react-vendor-CNOkPC89.js","assets/masked-input-C2H-Ax0Z.js","assets/icons-KVCk4_U8.js","assets/tanstack-CrmUhA7Z.js","assets/notifications-B2HqRBj7.js","assets/utils-CzKF5WmX.js","assets/form-utils-Bcoyqxpq.js","assets/code-highlight-BRUf_pqB.js","assets/index-BNU4Hhe_.js","assets/channels-B1vgnNJX.js","assets/globalenv-section-DoX37DqB.js","assets/index-CTGpqIx6.js","assets/index-DoVPk3vW.js","assets/default-ports-1QQSffYX.js","assets/proxy-status-widget-BOrsn86w.js","assets/alert-dialog-QyEXocpn.js","assets/antigravity-responsibility-constants-Bvh4Ybz0.js","assets/auth-section-BszF77uT.js","assets/backups-section-D6RgaOx1.js","assets/index-DFEMq3KP.js","assets/charts-BBPXh0Ar.js","assets/api-7vQe0xOg.js","assets/confirm-dialog-BlSaX2gK.js","assets/cliproxy-kHd-oC5W.js","assets/checkbox-Dzwkj_Pg.js","assets/separator-BCfZ54mZ.js","assets/searchable-select-1zOULoec.js","assets/cliproxy-ai-providers-CmbFYVoR.js","assets/cliproxy-control-panel-M8ZfUq3C.js","assets/copilot-NJKZQXQ_.js","assets/cursor-BrcDgu6X.js","assets/claude-extension-CKO4bJ22.js","assets/codex-BJ0RdMuh.js","assets/table-Bx2cnkWN.js","assets/raw-json-settings-editor-panel-WxTn7-hS.js","assets/droid-B9u9ZB-a.js","assets/logs-DtH4YMt4.js","assets/accounts-D9eEaNx9.js","assets/health-D_gdcxnc.js","assets/shared-DlTbnc9n.js","assets/updates-SiZKOnUD.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as l,S as Ml,R as mb,C as pb,a as gb,T as yb,D as bb,P as xb,O as vb,b as BC,c as KC,d as qC,e as FC,f as GC,A as VC,g as YC,h as $C,i as WC,k as QC,l as XC,m as ZC,n as JC,I as eS,o as Cb,p as tS,q as Sb,r as wb,s as nS,t as Nb,V as aS,L as kb,u as Ab,v as iS,w as oS,x as Db,y as sS,z as rS,B as Tb,E as lS,F as cS,G as jb,H as uS,J as Mb,K as Eb,M as Ob,N as dS,Q as fS,U as hS,W as mS,X as pS,Y as Pb,Z as gS,_ as yS,$ as bS}from"./radix-ui-Zb8sVEtn.js";import{e as Zd,f as xS,r as C,u as El,O as Od,N as vS,h as Jd,L as Cl,R as CS,g as Lb,d as zg,i as SS,c as ce,B as wS,j as NS,k as Nt}from"./react-vendor-CNOkPC89.js";import{Q as kS,u as kt,a as rt,b as st,c as AS,d as DS}from"./tanstack-CrmUhA7Z.js";import{t as le,T as TS}from"./notifications-B2HqRBj7.js";import{L as kn,X as Ao,P as jS,C as Ol,H as MS,a as ES,K as Pd,G as OS,Z as Rb,b as _b,F as zb,U as Ib,c as PS,S as LS,A as Us,d as Ub,e as RS,f as Hb,M as Bb,E as Vs,g as Ys,B as _S,R as Hs,W as zS,h as IS,i as US,j as HS,k as Ig,l as Ug,m as wo,n as ef,o as Sl,p as Kb,q as qb,r as BS,s as Pl,t as tf,u as Fb,v as No,T as Gn,w as Bs,x as $s,y as Hg,z as KS,D as Gb,I as nf,J as qS,N as Ll,O as FS,Q as GS,V as VS,Y as YS,_ as Rl,$ as $S,a0 as WS,a1 as Vb,a2 as QS,a3 as XS,a4 as ZS,a5 as JS,a6 as ew,a7 as af,a8 as Yb,a9 as Bg,aa as tw,ab as nw,ac as aw,ad as iw,ae as ow,af as Kg,ag as sw,ah as dl,ai as qg,aj as Fg,ak as rw}from"./icons-KVCk4_U8.js";import{t as lw,c as cw,a as _l,e as ws,f as Ds,b as uw,d as dw,g as fw,h as hw,i as mw,j as pw,k as gw,l as yw,m as bw,n as xw,o as vw,p as Cw,q as Sw,r as ww,s as Nw,u as kw,v as Aw,w as Dw,x as Tw,y as jw,z as Mw,A as Ew,B as Ow,C as Pw,D as Lw,E as Rw,F as _w,G as zw,H as Iw,I as Uw,J as Hw}from"./utils-CzKF5WmX.js";import{o as Gg,s as Vg,p as Bw,a as Kw,$ as qw,b as $b,c as Za,d as Fw,_ as Gw,u as Vw,e as Yg}from"./form-utils-Bcoyqxpq.js";import{H as Yw,t as $g}from"./code-highlight-BRUf_pqB.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))r(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function o(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(c){if(c.ep)return;c.ep=!0;const d=o(c);fetch(c.href,d)}})();var ld={exports:{}},Ns={},cd={exports:{}},ud={};var Wg;function $w(){return Wg||(Wg=1,(function(n){function a(U,Z){var ne=U.length;U.push(Z);e:for(;0<ne;){var $=ne-1>>>1,oe=U[$];if(0<c(oe,Z))U[$]=Z,U[ne]=oe,ne=$;else break e}}function o(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var Z=U[0],ne=U.pop();if(ne!==Z){U[0]=ne;e:for(var $=0,oe=U.length,ue=oe>>>1;$<ue;){var he=2*($+1)-1,X=U[he],ae=he+1,de=U[ae];if(0>c(X,ne))ae<oe&&0>c(de,X)?(U[$]=de,U[ae]=ne,$=ae):(U[$]=X,U[he]=ne,$=he);else if(ae<oe&&0>c(de,ne))U[$]=de,U[ae]=ne,$=ae;else break e}}return Z}function c(U,Z){var ne=U.sortIndex-Z.sortIndex;return ne!==0?ne:U.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var f=Date,m=f.now();n.unstable_now=function(){return f.now()-m}}var p=[],g=[],S=1,b=null,x=3,j=!1,N=!1,E=!1,L=!1,O=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function k(U){for(var Z=o(g);Z!==null;){if(Z.callback===null)r(g);else if(Z.startTime<=U)r(g),Z.sortIndex=Z.expirationTime,a(p,Z);else break;Z=o(g)}}function T(U){if(E=!1,k(U),!N)if(o(p)!==null)N=!0,w||(w=!0,Q());else{var Z=o(g);Z!==null&&ve(T,Z.startTime-U)}}var w=!1,R=-1,I=5,z=-1;function F(){return L?!0:!(n.unstable_now()-z<I)}function ee(){if(L=!1,w){var U=n.unstable_now();z=U;var Z=!0;try{e:{N=!1,E&&(E=!1,D(R),R=-1),j=!0;var ne=x;try{t:{for(k(U),b=o(p);b!==null&&!(b.expirationTime>U&&F());){var $=b.callback;if(typeof $=="function"){b.callback=null,x=b.priorityLevel;var oe=$(b.expirationTime<=U);if(U=n.unstable_now(),typeof oe=="function"){b.callback=oe,k(U),Z=!0;break t}b===o(p)&&r(p),k(U)}else r(p);b=o(p)}if(b!==null)Z=!0;else{var ue=o(g);ue!==null&&ve(T,ue.startTime-U),Z=!1}}break e}finally{b=null,x=ne,j=!1}Z=void 0}}finally{Z?Q():w=!1}}}var Q;if(typeof A=="function")Q=function(){A(ee)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,te=ge.port2;ge.port1.onmessage=ee,Q=function(){te.postMessage(null)}}else Q=function(){O(ee,0)};function ve(U,Z){R=O(function(){U(n.unstable_now())},Z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(U){switch(x){case 1:case 2:case 3:var Z=3;break;default:Z=x}var ne=x;x=Z;try{return U()}finally{x=ne}},n.unstable_requestPaint=function(){L=!0},n.unstable_runWithPriority=function(U,Z){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ne=x;x=U;try{return Z()}finally{x=ne}},n.unstable_scheduleCallback=function(U,Z,ne){var $=n.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?$+ne:$):ne=$,U){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=ne+oe,U={id:S++,callback:Z,priorityLevel:U,startTime:ne,expirationTime:oe,sortIndex:-1},ne>$?(U.sortIndex=ne,a(g,U),o(p)===null&&U===o(g)&&(E?(D(R),R=-1):E=!0,ve(T,ne-$))):(U.sortIndex=oe,a(p,U),N||j||(N=!0,w||(w=!0,Q()))),U},n.unstable_shouldYield=F,n.unstable_wrapCallback=function(U){var Z=x;return function(){var ne=x;x=Z;try{return U.apply(this,arguments)}finally{x=ne}}}})(ud)),ud}var Qg;function Ww(){return Qg||(Qg=1,cd.exports=$w()),cd.exports}var Xg;function Qw(){if(Xg)return Ns;Xg=1;var n=Ww(),a=Zd(),o=xS();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function f(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 m(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 p(e){if(d(e)!==e)throw Error(r(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var i=e,s=t;;){var u=i.return;if(u===null)break;var h=u.alternate;if(h===null){if(s=u.return,s!==null){i=s;continue}break}if(u.child===h.child){for(h=u.child;h;){if(h===i)return p(u),e;if(h===s)return p(u),t;h=h.sibling}throw Error(r(188))}if(i.return!==s.return)i=u,s=h;else{for(var y=!1,v=u.child;v;){if(v===i){y=!0,i=u,s=h;break}if(v===s){y=!0,s=u,i=h;break}v=v.sibling}if(!y){for(v=h.child;v;){if(v===i){y=!0,i=h,s=u;break}if(v===s){y=!0,s=h,i=u;break}v=v.sibling}if(!y)throw Error(r(189))}}if(i.alternate!==s)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,x=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),A=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function Q(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Symbol.for("react.client.reference");function te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case O:return"Profiler";case L:return"StrictMode";case T:return"Suspense";case w:return"SuspenseList";case z:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case A:return e.displayName||"Context";case D:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R:return t=e.displayName||null,t!==null?t:te(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var ve=Array.isArray,U=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},$=[],oe=-1;function ue(e){return{current:e}}function he(e){0>oe||(e.current=$[oe],$[oe]=null,oe--)}function X(e,t){oe++,$[oe]=e.current,e.current=t}var ae=ue(null),de=ue(null),ie=ue(null),re=ue(null);function ye(e,t){switch(X(ie,t),X(de,e),X(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?sg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=sg(t),e=rg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}he(ae),X(ae,e)}function De(){he(ae),he(de),he(ie)}function ze(e){e.memoizedState!==null&&X(re,e);var t=ae.current,i=rg(t,e.type);t!==i&&(X(de,e),X(ae,i))}function Xe(e){de.current===e&&(he(ae),he(de)),re.current===e&&(he(re),xs._currentValue=ne)}var Ce,Oe;function Ge(e){if(Ce===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Ce=t&&t[1]||"",Oe=-1<i.stack.indexOf(`
|
|
3
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
-
`+Ce+e+Oe}var Dt=!1;function Ot(e,t){if(!e||Dt)return"";Dt=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={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(G){var q=G}Reflect.construct(e,[],W)}else{try{W.call()}catch(G){q=G}e.call(W.prototype)}}else{try{throw Error()}catch(G){q=G}(W=e())&&typeof W.catch=="function"&&W.catch(function(){})}}catch(G){if(G&&q&&typeof G.stack=="string")return[G.stack,q.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=s.DetermineComponentFrameRoot(),y=h[0],v=h[1];if(y&&v){var M=y.split(`
|
|
5
|
-
`),B=v.split(`
|
|
6
|
-
`);for(u=s=0;s<M.length&&!M[s].includes("DetermineComponentFrameRoot");)s++;for(;u<B.length&&!B[u].includes("DetermineComponentFrameRoot");)u++;if(s===M.length||u===B.length)for(s=M.length-1,u=B.length-1;1<=s&&0<=u&&M[s]!==B[u];)u--;for(;1<=s&&0<=u;s--,u--)if(M[s]!==B[u]){if(s!==1||u!==1)do if(s--,u--,0>u||M[s]!==B[u]){var V=`
|
|
7
|
-
`+M[s].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=s&&0<=u);break}}}finally{Dt=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Ge(i):""}function Yn(e,t){switch(e.tag){case 26:case 27:case 5:return Ge(e.type);case 16:return Ge("Lazy");case 13:return e.child!==t&&t!==null?Ge("Suspense Fallback"):Ge("Suspense");case 19:return Ge("SuspenseList");case 0:case 15:return Ot(e.type,!1);case 11:return Ot(e.type.render,!1);case 1:return Ot(e.type,!0);case 31:return Ge("Activity");default:return""}}function je(e){try{var t="",i=null;do t+=Yn(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
8
|
-
Error generating stack: `+s.message+`
|
|
9
|
-
`+s.stack}}var Jt=Object.prototype.hasOwnProperty,Pn=n.unstable_scheduleCallback,en=n.unstable_cancelCallback,Da=n.unstable_shouldYield,$n=n.unstable_requestPaint,yt=n.unstable_now,tn=n.unstable_getCurrentPriorityLevel,Wn=n.unstable_ImmediatePriority,ni=n.unstable_UserBlockingPriority,Ln=n.unstable_NormalPriority,Rn=n.unstable_LowPriority,Ei=n.unstable_IdlePriority,To=n.log,jo=n.unstable_setDisableYieldValue,Qn=null,J=null;function Pe(e){if(typeof To=="function"&&jo(e),J&&typeof J.setStrictMode=="function")try{J.setStrictMode(Qn,e)}catch{}}var Se=Math.clz32?Math.clz32:pe,Le=Math.log,dt=Math.LN2;function pe(e){return e>>>=0,e===0?32:31-(Le(e)/dt|0)|0}var Te=256,we=262144,Re=4194304;function lt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ke(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var u=0,h=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var v=s&134217727;return v!==0?(s=v&~h,s!==0?u=lt(s):(y&=v,y!==0?u=lt(y):i||(i=v&~e,i!==0&&(u=lt(i))))):(v=s&~h,v!==0?u=lt(v):y!==0?u=lt(y):i||(i=s&~e,i!==0&&(u=lt(i)))),u===0?0:t!==0&&t!==u&&(t&h)===0&&(h=u&-u,i=t&-t,h>=i||h===32&&(i&4194048)!==0)?t:u}function Ht(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xn(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 Tt(){var e=Re;return Re<<=1,(Re&62914560)===0&&(Re=4194304),e}function nn(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function An(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Mo(e,t,i,s,u,h){var y=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var v=e.entanglements,M=e.expirationTimes,B=e.hiddenUpdates;for(i=y&~i;0<i;){var V=31-Se(i),W=1<<V;v[V]=0,M[V]=-1;var q=B[V];if(q!==null)for(B[V]=null,V=0;V<q.length;V++){var G=q[V];G!==null&&(G.lane&=-536870913)}i&=~W}s!==0&&ai(e,s,0),h!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=h&~(y&~t))}function ai(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Se(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Eo(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-Se(i),u=1<<s;u&t|e[s]&t&&(e[s]|=t),i&=~u}}function mn(e,t){var i=t&-t;return i=(i&42)!==0?1:Zn(i),(i&(e.suspendedLanes|t))!==0?0:i}function Zn(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 Oi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Oo(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:Mg(e.type))}function Po(e,t){var i=Z.p;try{return Z.p=e,t()}finally{Z.p=i}}var Ta=Math.random().toString(36).slice(2),Pt="__reactFiber$"+Ta,Ft="__reactProps$"+Ta,Pi="__reactContainer$"+Ta,Jl="__reactEvents$"+Ta,Mv="__reactListeners$"+Ta,Ev="__reactHandles$"+Ta,Yf="__reactResources$"+Ta,Lo="__reactMarker$"+Ta;function ec(e){delete e[Pt],delete e[Ft],delete e[Jl],delete e[Mv],delete e[Ev]}function Li(e){var t=e[Pt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Pi]||i[Pt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=mg(e);e!==null;){if(i=e[Pt])return i;e=mg(e)}return t}e=i,i=e.parentNode}return null}function Ri(e){if(e=e[Pt]||e[Pi]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ro(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function _i(e){var t=e[Yf];return t||(t=e[Yf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function jt(e){e[Lo]=!0}var $f=new Set,Wf={};function ii(e,t){zi(e,t),zi(e+"Capture",t)}function zi(e,t){for(Wf[e]=t,e=0;e<t.length;e++)$f.add(t[e])}var Ov=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]*$"),Qf={},Xf={};function Pv(e){return Jt.call(Xf,e)?!0:Jt.call(Qf,e)?!1:Ov.test(e)?Xf[e]=!0:(Qf[e]=!0,!1)}function Js(e,t,i){if(Pv(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function er(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Jn(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function pn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lv(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var u=s.get,h=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(y){i=""+y,h.call(this,y)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(y){i=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tc(e){if(!e._valueTracker){var t=Zf(e)?"checked":"value";e._valueTracker=Lv(e,t,""+e[t])}}function Jf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Zf(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}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}}var Rv=/[\n"\\]/g;function gn(e){return e.replace(Rv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function nc(e,t,i,s,u,h,y,v){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+pn(t)):e.value!==""+pn(t)&&(e.value=""+pn(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?ac(e,y,pn(t)):i!=null?ac(e,y,pn(i)):s!=null&&e.removeAttribute("value"),u==null&&h!=null&&(e.defaultChecked=!!h),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+pn(v):e.removeAttribute("name")}function eh(e,t,i,s,u,h,y,v){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),t!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||t!=null)){tc(e);return}i=i!=null?""+pn(i):"",t=t!=null?""+pn(t):i,v||t===e.value||(e.value=t),e.defaultValue=t}s=s??u,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=v?e.checked:!!s,e.defaultChecked=!!s,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),tc(e)}function ac(e,t,i){t==="number"&&tr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ii(e,t,i,s){if(e=e.options,t){t={};for(var u=0;u<i.length;u++)t["$"+i[u]]=!0;for(i=0;i<e.length;i++)u=t.hasOwnProperty("$"+e[i].value),e[i].selected!==u&&(e[i].selected=u),u&&s&&(e[i].defaultSelected=!0)}else{for(i=""+pn(i),t=null,u=0;u<e.length;u++){if(e[u].value===i){e[u].selected=!0,s&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function th(e,t,i){if(t!=null&&(t=""+pn(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+pn(i):""}function nh(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(r(92));if(ve(s)){if(1<s.length)throw Error(r(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=pn(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),tc(e)}function Ui(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var _v=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 ah(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||_v.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function ih(e,t,i){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var u in t)s=t[u],t.hasOwnProperty(u)&&i[u]!==s&&ah(e,u,s)}else for(var h in t)t.hasOwnProperty(h)&&ah(e,h,t[h])}function ic(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 zv=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Iv=/^[\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 nr(e){return Iv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ea(){}var oc=null;function sc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hi=null,Bi=null;function oh(e){var t=Ri(e);if(t&&(e=t.stateNode)){var i=e[Ft]||null;e:switch(e=t.stateNode,t.type){case"input":if(nc(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+gn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var u=s[Ft]||null;if(!u)throw Error(r(90));nc(s,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Jf(s)}break e;case"textarea":th(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Ii(e,!!i.multiple,t,!1)}}}var rc=!1;function sh(e,t,i){if(rc)return e(t,i);rc=!0;try{var s=e(t);return s}finally{if(rc=!1,(Hi!==null||Bi!==null)&&(qr(),Hi&&(t=Hi,e=Bi,Bi=Hi=null,oh(t),e)))for(t=0;t<e.length;t++)oh(e[t])}}function _o(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Ft]||null;if(s===null)return null;i=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(r(231,t,typeof i));return i}var ta=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lc=!1;if(ta)try{var zo={};Object.defineProperty(zo,"passive",{get:function(){lc=!0}}),window.addEventListener("test",zo,zo),window.removeEventListener("test",zo,zo)}catch{lc=!1}var ja=null,cc=null,ar=null;function rh(){if(ar)return ar;var e,t=cc,i=t.length,s,u="value"in ja?ja.value:ja.textContent,h=u.length;for(e=0;e<i&&t[e]===u[e];e++);var y=i-e;for(s=1;s<=y&&t[i-s]===u[h-s];s++);return ar=u.slice(e,1<s?1-s:void 0)}function ir(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 or(){return!0}function lh(){return!1}function Gt(e){function t(i,s,u,h,y){this._reactName=i,this._targetInst=u,this.type=s,this.nativeEvent=h,this.target=y,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(i=e[v],this[v]=i?i(h):h[v]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?or:lh,this.isPropagationStopped=lh,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=or)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=or)},persist:function(){},isPersistent:or}),t}var oi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sr=Gt(oi),Io=b({},oi,{view:0,detail:0}),Uv=Gt(Io),uc,dc,Uo,rr=b({},Io,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hc,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!==Uo&&(Uo&&e.type==="mousemove"?(uc=e.screenX-Uo.screenX,dc=e.screenY-Uo.screenY):dc=uc=0,Uo=e),uc)},movementY:function(e){return"movementY"in e?e.movementY:dc}}),ch=Gt(rr),Hv=b({},rr,{dataTransfer:0}),Bv=Gt(Hv),Kv=b({},Io,{relatedTarget:0}),fc=Gt(Kv),qv=b({},oi,{animationName:0,elapsedTime:0,pseudoElement:0}),Fv=Gt(qv),Gv=b({},oi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Vv=Gt(Gv),Yv=b({},oi,{data:0}),uh=Gt(Yv),$v={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wv={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"},Qv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qv[e])?!!t[e]:!1}function hc(){return Xv}var Zv=b({},Io,{key:function(e){if(e.key){var t=$v[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ir(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Wv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hc,charCode:function(e){return e.type==="keypress"?ir(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ir(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Jv=Gt(Zv),e0=b({},rr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dh=Gt(e0),t0=b({},Io,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hc}),n0=Gt(t0),a0=b({},oi,{propertyName:0,elapsedTime:0,pseudoElement:0}),i0=Gt(a0),o0=b({},rr,{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}),s0=Gt(o0),r0=b({},oi,{newState:0,oldState:0}),l0=Gt(r0),c0=[9,13,27,32],mc=ta&&"CompositionEvent"in window,Ho=null;ta&&"documentMode"in document&&(Ho=document.documentMode);var u0=ta&&"TextEvent"in window&&!Ho,fh=ta&&(!mc||Ho&&8<Ho&&11>=Ho),hh=" ",mh=!1;function ph(e,t){switch(e){case"keyup":return c0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ki=!1;function d0(e,t){switch(e){case"compositionend":return gh(t);case"keypress":return t.which!==32?null:(mh=!0,hh);case"textInput":return e=t.data,e===hh&&mh?null:e;default:return null}}function f0(e,t){if(Ki)return e==="compositionend"||!mc&&ph(e,t)?(e=rh(),ar=cc=ja=null,Ki=!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 fh&&t.locale!=="ko"?null:t.data;default:return null}}var h0={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 yh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!h0[e.type]:t==="textarea"}function bh(e,t,i,s){Hi?Bi?Bi.push(s):Bi=[s]:Hi=s,t=Qr(t,"onChange"),0<t.length&&(i=new sr("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var Bo=null,Ko=null;function m0(e){eg(e,0)}function lr(e){var t=Ro(e);if(Jf(t))return e}function xh(e,t){if(e==="change")return t}var vh=!1;if(ta){var pc;if(ta){var gc="oninput"in document;if(!gc){var Ch=document.createElement("div");Ch.setAttribute("oninput","return;"),gc=typeof Ch.oninput=="function"}pc=gc}else pc=!1;vh=pc&&(!document.documentMode||9<document.documentMode)}function Sh(){Bo&&(Bo.detachEvent("onpropertychange",wh),Ko=Bo=null)}function wh(e){if(e.propertyName==="value"&&lr(Ko)){var t=[];bh(t,Ko,e,sc(e)),sh(m0,t)}}function p0(e,t,i){e==="focusin"?(Sh(),Bo=t,Ko=i,Bo.attachEvent("onpropertychange",wh)):e==="focusout"&&Sh()}function g0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lr(Ko)}function y0(e,t){if(e==="click")return lr(t)}function b0(e,t){if(e==="input"||e==="change")return lr(t)}function x0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var an=typeof Object.is=="function"?Object.is:x0;function qo(e,t){if(an(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var u=i[s];if(!Jt.call(t,u)||!an(e[u],t[u]))return!1}return!0}function Nh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kh(e,t){var i=Nh(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Nh(i)}}function Ah(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ah(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dh(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 i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=tr(e.document)}return t}function yc(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 v0=ta&&"documentMode"in document&&11>=document.documentMode,qi=null,bc=null,Fo=null,xc=!1;function Th(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;xc||qi==null||qi!==tr(s)||(s=qi,"selectionStart"in s&&yc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Fo&&qo(Fo,s)||(Fo=s,s=Qr(bc,"onSelect"),0<s.length&&(t=new sr("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=qi)))}function si(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Fi={animationend:si("Animation","AnimationEnd"),animationiteration:si("Animation","AnimationIteration"),animationstart:si("Animation","AnimationStart"),transitionrun:si("Transition","TransitionRun"),transitionstart:si("Transition","TransitionStart"),transitioncancel:si("Transition","TransitionCancel"),transitionend:si("Transition","TransitionEnd")},vc={},jh={};ta&&(jh=document.createElement("div").style,"AnimationEvent"in window||(delete Fi.animationend.animation,delete Fi.animationiteration.animation,delete Fi.animationstart.animation),"TransitionEvent"in window||delete Fi.transitionend.transition);function ri(e){if(vc[e])return vc[e];if(!Fi[e])return e;var t=Fi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in jh)return vc[e]=t[i];return e}var Mh=ri("animationend"),Eh=ri("animationiteration"),Oh=ri("animationstart"),C0=ri("transitionrun"),S0=ri("transitionstart"),w0=ri("transitioncancel"),Ph=ri("transitionend"),Lh=new Map,Cc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Cc.push("scrollEnd");function Dn(e,t){Lh.set(e,t),ii(t,[e])}var cr=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)},yn=[],Gi=0,Sc=0;function ur(){for(var e=Gi,t=Sc=Gi=0;t<e;){var i=yn[t];yn[t++]=null;var s=yn[t];yn[t++]=null;var u=yn[t];yn[t++]=null;var h=yn[t];if(yn[t++]=null,s!==null&&u!==null){var y=s.pending;y===null?u.next=u:(u.next=y.next,y.next=u),s.pending=u}h!==0&&Rh(i,u,h)}}function dr(e,t,i,s){yn[Gi++]=e,yn[Gi++]=t,yn[Gi++]=i,yn[Gi++]=s,Sc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function wc(e,t,i,s){return dr(e,t,i,s),fr(e)}function li(e,t){return dr(e,null,null,t),fr(e)}function Rh(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var u=!1,h=e.return;h!==null;)h.childLanes|=i,s=h.alternate,s!==null&&(s.childLanes|=i),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(u=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,u&&t!==null&&(u=31-Se(i),e=h.hiddenUpdates,s=e[u],s===null?e[u]=[t]:s.push(t),t.lane=i|536870912),h):null}function fr(e){if(50<fs)throw fs=0,Ou=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Vi={};function N0(e,t,i,s){this.tag=e,this.key=i,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function on(e,t,i,s){return new N0(e,t,i,s)}function Nc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function na(e,t){var i=e.alternate;return i===null?(i=on(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function _h(e,t){e.flags&=65011714;var i=e.alternate;return i===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=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function hr(e,t,i,s,u,h){var y=0;if(s=e,typeof e=="function")Nc(e)&&(y=1);else if(typeof e=="string")y=jC(e,i,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case z:return e=on(31,i,t,u),e.elementType=z,e.lanes=h,e;case E:return ci(i.children,u,h,t);case L:y=8,u|=24;break;case O:return e=on(12,i,t,u|2),e.elementType=O,e.lanes=h,e;case T:return e=on(13,i,t,u),e.elementType=T,e.lanes=h,e;case w:return e=on(19,i,t,u),e.elementType=w,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case A:y=10;break e;case D:y=9;break e;case k:y=11;break e;case R:y=14;break e;case I:y=16,s=null;break e}y=29,i=Error(r(130,e===null?"null":typeof e,"")),s=null}return t=on(y,i,t,u),t.elementType=e,t.type=s,t.lanes=h,t}function ci(e,t,i,s){return e=on(7,e,s,t),e.lanes=i,e}function kc(e,t,i){return e=on(6,e,null,t),e.lanes=i,e}function zh(e){var t=on(18,null,null,0);return t.stateNode=e,t}function Ac(e,t,i){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ih=new WeakMap;function bn(e,t){if(typeof e=="object"&&e!==null){var i=Ih.get(e);return i!==void 0?i:(t={value:e,source:t,stack:je(t)},Ih.set(e,t),t)}return{value:e,source:t,stack:je(t)}}var Yi=[],$i=0,mr=null,Go=0,xn=[],vn=0,Ma=null,_n=1,zn="";function aa(e,t){Yi[$i++]=Go,Yi[$i++]=mr,mr=e,Go=t}function Uh(e,t,i){xn[vn++]=_n,xn[vn++]=zn,xn[vn++]=Ma,Ma=e;var s=_n;e=zn;var u=32-Se(s)-1;s&=~(1<<u),i+=1;var h=32-Se(t)+u;if(30<h){var y=u-u%5;h=(s&(1<<y)-1).toString(32),s>>=y,u-=y,_n=1<<32-Se(t)+u|i<<u|s,zn=h+e}else _n=1<<h|i<<u|s,zn=e}function Dc(e){e.return!==null&&(aa(e,1),Uh(e,1,0))}function Tc(e){for(;e===mr;)mr=Yi[--$i],Yi[$i]=null,Go=Yi[--$i],Yi[$i]=null;for(;e===Ma;)Ma=xn[--vn],xn[vn]=null,zn=xn[--vn],xn[vn]=null,_n=xn[--vn],xn[vn]=null}function Hh(e,t){xn[vn++]=_n,xn[vn++]=zn,xn[vn++]=Ma,_n=t.id,zn=t.overflow,Ma=e}var Lt=null,ct=null,qe=!1,Ea=null,Cn=!1,jc=Error(r(519));function Oa(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vo(bn(t,e)),jc}function Bh(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[Pt]=e,t[Ft]=s,i){case"dialog":Ue("cancel",t),Ue("close",t);break;case"iframe":case"object":case"embed":Ue("load",t);break;case"video":case"audio":for(i=0;i<ms.length;i++)Ue(ms[i],t);break;case"source":Ue("error",t);break;case"img":case"image":case"link":Ue("error",t),Ue("load",t);break;case"details":Ue("toggle",t);break;case"input":Ue("invalid",t),eh(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ue("invalid",t);break;case"textarea":Ue("invalid",t),nh(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||ig(t.textContent,i)?(s.popover!=null&&(Ue("beforetoggle",t),Ue("toggle",t)),s.onScroll!=null&&Ue("scroll",t),s.onScrollEnd!=null&&Ue("scrollend",t),s.onClick!=null&&(t.onclick=ea),t=!0):t=!1,t||Oa(e,!0)}function Kh(e){for(Lt=e.return;Lt;)switch(Lt.tag){case 5:case 31:case 13:Cn=!1;return;case 27:case 3:Cn=!0;return;default:Lt=Lt.return}}function Wi(e){if(e!==Lt)return!1;if(!qe)return Kh(e),qe=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Yu(e.type,e.memoizedProps)),i=!i),i&&ct&&Oa(e),Kh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ct=hg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ct=hg(e)}else t===27?(t=ct,Va(e.type)?(e=Zu,Zu=null,ct=e):ct=t):ct=Lt?wn(e.stateNode.nextSibling):null;return!0}function ui(){ct=Lt=null,qe=!1}function Mc(){var e=Ea;return e!==null&&(Wt===null?Wt=e:Wt.push.apply(Wt,e),Ea=null),e}function Vo(e){Ea===null?Ea=[e]:Ea.push(e)}var Ec=ue(null),di=null,ia=null;function Pa(e,t,i){X(Ec,t._currentValue),t._currentValue=i}function oa(e){e._currentValue=Ec.current,he(Ec)}function Oc(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Pc(e,t,i,s){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var h=u.dependencies;if(h!==null){var y=u.child;h=h.firstContext;e:for(;h!==null;){var v=h;h=u;for(var M=0;M<t.length;M++)if(v.context===t[M]){h.lanes|=i,v=h.alternate,v!==null&&(v.lanes|=i),Oc(h.return,i,e),s||(y=null);break e}h=v.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(r(341));y.lanes|=i,h=y.alternate,h!==null&&(h.lanes|=i),Oc(y,i,e),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===e){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function Qi(e,t,i,s){e=null;for(var u=t,h=!1;u!==null;){if(!h){if((u.flags&524288)!==0)h=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var v=u.type;an(u.pendingProps.value,y.value)||(e!==null?e.push(v):e=[v])}}else if(u===re.current){if(y=u.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(xs):e=[xs])}u=u.return}e!==null&&Pc(t,e,i,s),t.flags|=262144}function pr(e){for(e=e.firstContext;e!==null;){if(!an(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function fi(e){di=e,ia=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return qh(di,e)}function gr(e,t){return di===null&&fi(e),qh(e,t)}function qh(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},ia===null){if(e===null)throw Error(r(308));ia=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ia=ia.next=t;return i}var k0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},A0=n.unstable_scheduleCallback,D0=n.unstable_NormalPriority,vt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lc(){return{controller:new k0,data:new Map,refCount:0}}function Yo(e){e.refCount--,e.refCount===0&&A0(D0,function(){e.controller.abort()})}var $o=null,Rc=0,Xi=0,Zi=null;function T0(e,t){if($o===null){var i=$o=[];Rc=0,Xi=Iu(),Zi={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Rc++,t.then(Fh,Fh),t}function Fh(){if(--Rc===0&&$o!==null){Zi!==null&&(Zi.status="fulfilled");var e=$o;$o=null,Xi=0,Zi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function j0(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(u){i.push(u)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var u=0;u<i.length;u++)(0,i[u])(t)},function(u){for(s.status="rejected",s.reason=u,u=0;u<i.length;u++)(0,i[u])(void 0)}),s}var Gh=U.S;U.S=function(e,t){Tp=yt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&T0(e,t),Gh!==null&&Gh(e,t)};var hi=ue(null);function _c(){var e=hi.current;return e!==null?e:it.pooledCache}function yr(e,t){t===null?X(hi,hi.current):X(hi,t.pool)}function Vh(){var e=_c();return e===null?null:{parent:vt._currentValue,pool:e}}var Ji=Error(r(460)),zc=Error(r(474)),br=Error(r(542)),xr={then:function(){}};function Yh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $h(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(ea,ea),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Qh(e),e;default:if(typeof t.status=="string")t.then(ea,ea);else{if(e=it,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=s}},function(s){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Qh(e),e}throw pi=t,Ji}}function mi(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(pi=i,Ji):i}}var pi=null;function Wh(){if(pi===null)throw Error(r(459));var e=pi;return pi=null,e}function Qh(e){if(e===Ji||e===br)throw Error(r(483))}var eo=null,Wo=0;function vr(e){var t=Wo;return Wo+=1,eo===null&&(eo=[]),$h(eo,e,t)}function Qo(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Cr(e,t){throw t.$$typeof===x?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Xh(e){function t(_,P){if(e){var H=_.deletions;H===null?(_.deletions=[P],_.flags|=16):H.push(P)}}function i(_,P){if(!e)return null;for(;P!==null;)t(_,P),P=P.sibling;return null}function s(_){for(var P=new Map;_!==null;)_.key!==null?P.set(_.key,_):P.set(_.index,_),_=_.sibling;return P}function u(_,P){return _=na(_,P),_.index=0,_.sibling=null,_}function h(_,P,H){return _.index=H,e?(H=_.alternate,H!==null?(H=H.index,H<P?(_.flags|=67108866,P):H):(_.flags|=67108866,P)):(_.flags|=1048576,P)}function y(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function v(_,P,H,Y){return P===null||P.tag!==6?(P=kc(H,_.mode,Y),P.return=_,P):(P=u(P,H),P.return=_,P)}function M(_,P,H,Y){var xe=H.type;return xe===E?V(_,P,H.props.children,Y,H.key):P!==null&&(P.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===I&&mi(xe)===P.type)?(P=u(P,H.props),Qo(P,H),P.return=_,P):(P=hr(H.type,H.key,H.props,null,_.mode,Y),Qo(P,H),P.return=_,P)}function B(_,P,H,Y){return P===null||P.tag!==4||P.stateNode.containerInfo!==H.containerInfo||P.stateNode.implementation!==H.implementation?(P=Ac(H,_.mode,Y),P.return=_,P):(P=u(P,H.children||[]),P.return=_,P)}function V(_,P,H,Y,xe){return P===null||P.tag!==7?(P=ci(H,_.mode,Y,xe),P.return=_,P):(P=u(P,H),P.return=_,P)}function W(_,P,H){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=kc(""+P,_.mode,H),P.return=_,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case j:return H=hr(P.type,P.key,P.props,null,_.mode,H),Qo(H,P),H.return=_,H;case N:return P=Ac(P,_.mode,H),P.return=_,P;case I:return P=mi(P),W(_,P,H)}if(ve(P)||Q(P))return P=ci(P,_.mode,H,null),P.return=_,P;if(typeof P.then=="function")return W(_,vr(P),H);if(P.$$typeof===A)return W(_,gr(_,P),H);Cr(_,P)}return null}function q(_,P,H,Y){var xe=P!==null?P.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return xe!==null?null:v(_,P,""+H,Y);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case j:return H.key===xe?M(_,P,H,Y):null;case N:return H.key===xe?B(_,P,H,Y):null;case I:return H=mi(H),q(_,P,H,Y)}if(ve(H)||Q(H))return xe!==null?null:V(_,P,H,Y,null);if(typeof H.then=="function")return q(_,P,vr(H),Y);if(H.$$typeof===A)return q(_,P,gr(_,H),Y);Cr(_,H)}return null}function G(_,P,H,Y,xe){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return _=_.get(H)||null,v(P,_,""+Y,xe);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case j:return _=_.get(Y.key===null?H:Y.key)||null,M(P,_,Y,xe);case N:return _=_.get(Y.key===null?H:Y.key)||null,B(P,_,Y,xe);case I:return Y=mi(Y),G(_,P,H,Y,xe)}if(ve(Y)||Q(Y))return _=_.get(H)||null,V(P,_,Y,xe,null);if(typeof Y.then=="function")return G(_,P,H,vr(Y),xe);if(Y.$$typeof===A)return G(_,P,H,gr(P,Y),xe);Cr(P,Y)}return null}function fe(_,P,H,Y){for(var xe=null,Ye=null,me=P,Ee=P=0,Ke=null;me!==null&&Ee<H.length;Ee++){me.index>Ee?(Ke=me,me=null):Ke=me.sibling;var $e=q(_,me,H[Ee],Y);if($e===null){me===null&&(me=Ke);break}e&&me&&$e.alternate===null&&t(_,me),P=h($e,P,Ee),Ye===null?xe=$e:Ye.sibling=$e,Ye=$e,me=Ke}if(Ee===H.length)return i(_,me),qe&&aa(_,Ee),xe;if(me===null){for(;Ee<H.length;Ee++)me=W(_,H[Ee],Y),me!==null&&(P=h(me,P,Ee),Ye===null?xe=me:Ye.sibling=me,Ye=me);return qe&&aa(_,Ee),xe}for(me=s(me);Ee<H.length;Ee++)Ke=G(me,_,Ee,H[Ee],Y),Ke!==null&&(e&&Ke.alternate!==null&&me.delete(Ke.key===null?Ee:Ke.key),P=h(Ke,P,Ee),Ye===null?xe=Ke:Ye.sibling=Ke,Ye=Ke);return e&&me.forEach(function(Xa){return t(_,Xa)}),qe&&aa(_,Ee),xe}function Ne(_,P,H,Y){if(H==null)throw Error(r(151));for(var xe=null,Ye=null,me=P,Ee=P=0,Ke=null,$e=H.next();me!==null&&!$e.done;Ee++,$e=H.next()){me.index>Ee?(Ke=me,me=null):Ke=me.sibling;var Xa=q(_,me,$e.value,Y);if(Xa===null){me===null&&(me=Ke);break}e&&me&&Xa.alternate===null&&t(_,me),P=h(Xa,P,Ee),Ye===null?xe=Xa:Ye.sibling=Xa,Ye=Xa,me=Ke}if($e.done)return i(_,me),qe&&aa(_,Ee),xe;if(me===null){for(;!$e.done;Ee++,$e=H.next())$e=W(_,$e.value,Y),$e!==null&&(P=h($e,P,Ee),Ye===null?xe=$e:Ye.sibling=$e,Ye=$e);return qe&&aa(_,Ee),xe}for(me=s(me);!$e.done;Ee++,$e=H.next())$e=G(me,_,Ee,$e.value,Y),$e!==null&&(e&&$e.alternate!==null&&me.delete($e.key===null?Ee:$e.key),P=h($e,P,Ee),Ye===null?xe=$e:Ye.sibling=$e,Ye=$e);return e&&me.forEach(function(HC){return t(_,HC)}),qe&&aa(_,Ee),xe}function nt(_,P,H,Y){if(typeof H=="object"&&H!==null&&H.type===E&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case j:e:{for(var xe=H.key;P!==null;){if(P.key===xe){if(xe=H.type,xe===E){if(P.tag===7){i(_,P.sibling),Y=u(P,H.props.children),Y.return=_,_=Y;break e}}else if(P.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===I&&mi(xe)===P.type){i(_,P.sibling),Y=u(P,H.props),Qo(Y,H),Y.return=_,_=Y;break e}i(_,P);break}else t(_,P);P=P.sibling}H.type===E?(Y=ci(H.props.children,_.mode,Y,H.key),Y.return=_,_=Y):(Y=hr(H.type,H.key,H.props,null,_.mode,Y),Qo(Y,H),Y.return=_,_=Y)}return y(_);case N:e:{for(xe=H.key;P!==null;){if(P.key===xe)if(P.tag===4&&P.stateNode.containerInfo===H.containerInfo&&P.stateNode.implementation===H.implementation){i(_,P.sibling),Y=u(P,H.children||[]),Y.return=_,_=Y;break e}else{i(_,P);break}else t(_,P);P=P.sibling}Y=Ac(H,_.mode,Y),Y.return=_,_=Y}return y(_);case I:return H=mi(H),nt(_,P,H,Y)}if(ve(H))return fe(_,P,H,Y);if(Q(H)){if(xe=Q(H),typeof xe!="function")throw Error(r(150));return H=xe.call(H),Ne(_,P,H,Y)}if(typeof H.then=="function")return nt(_,P,vr(H),Y);if(H.$$typeof===A)return nt(_,P,gr(_,H),Y);Cr(_,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,P!==null&&P.tag===6?(i(_,P.sibling),Y=u(P,H),Y.return=_,_=Y):(i(_,P),Y=kc(H,_.mode,Y),Y.return=_,_=Y),y(_)):i(_,P)}return function(_,P,H,Y){try{Wo=0;var xe=nt(_,P,H,Y);return eo=null,xe}catch(me){if(me===Ji||me===br)throw me;var Ye=on(29,me,null,_.mode);return Ye.lanes=Y,Ye.return=_,Ye}finally{}}}var gi=Xh(!0),Zh=Xh(!1),La=!1;function Ic(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Uc(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 Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _a(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Qe&2)!==0){var u=s.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),s.pending=t,t=fr(e),Rh(e,null,i),t}return dr(e,s,t,i),fr(e)}function Xo(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Eo(e,i)}}function Hc(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var u=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var y={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?u=h=y:h=h.next=y,i=i.next}while(i!==null);h===null?u=h=t:h=h.next=t}else u=h=t;i={baseState:s.baseState,firstBaseUpdate:u,lastBaseUpdate:h,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Bc=!1;function Zo(){if(Bc){var e=Zi;if(e!==null)throw e}}function Jo(e,t,i,s){Bc=!1;var u=e.updateQueue;La=!1;var h=u.firstBaseUpdate,y=u.lastBaseUpdate,v=u.shared.pending;if(v!==null){u.shared.pending=null;var M=v,B=M.next;M.next=null,y===null?h=B:y.next=B,y=M;var V=e.alternate;V!==null&&(V=V.updateQueue,v=V.lastBaseUpdate,v!==y&&(v===null?V.firstBaseUpdate=B:v.next=B,V.lastBaseUpdate=M))}if(h!==null){var W=u.baseState;y=0,V=B=M=null,v=h;do{var q=v.lane&-536870913,G=q!==v.lane;if(G?(Be&q)===q:(s&q)===q){q!==0&&q===Xi&&(Bc=!0),V!==null&&(V=V.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var fe=e,Ne=v;q=t;var nt=i;switch(Ne.tag){case 1:if(fe=Ne.payload,typeof fe=="function"){W=fe.call(nt,W,q);break e}W=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=Ne.payload,q=typeof fe=="function"?fe.call(nt,W,q):fe,q==null)break e;W=b({},W,q);break e;case 2:La=!0}}q=v.callback,q!==null&&(e.flags|=64,G&&(e.flags|=8192),G=u.callbacks,G===null?u.callbacks=[q]:G.push(q))}else G={lane:q,tag:v.tag,payload:v.payload,callback:v.callback,next:null},V===null?(B=V=G,M=W):V=V.next=G,y|=q;if(v=v.next,v===null){if(v=u.shared.pending,v===null)break;G=v,v=G.next,G.next=null,u.lastBaseUpdate=G,u.shared.pending=null}}while(!0);V===null&&(M=W),u.baseState=M,u.firstBaseUpdate=B,u.lastBaseUpdate=V,h===null&&(u.shared.lanes=0),Ba|=y,e.lanes=y,e.memoizedState=W}}function Jh(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function em(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Jh(i[e],t)}var to=ue(null),Sr=ue(0);function tm(e,t){e=ma,X(Sr,e),X(to,t),ma=e|t.baseLanes}function Kc(){X(Sr,ma),X(to,to.current)}function qc(){ma=Sr.current,he(to),he(Sr)}var sn=ue(null),Sn=null;function za(e){var t=e.alternate;X(bt,bt.current&1),X(sn,e),Sn===null&&(t===null||to.current!==null||t.memoizedState!==null)&&(Sn=e)}function Fc(e){X(bt,bt.current),X(sn,e),Sn===null&&(Sn=e)}function nm(e){e.tag===22?(X(bt,bt.current),X(sn,e),Sn===null&&(Sn=e)):Ia()}function Ia(){X(bt,bt.current),X(sn,sn.current)}function rn(e){he(sn),Sn===e&&(Sn=null),he(bt)}var bt=ue(0);function wr(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Qu(i)||Xu(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sa=0,Me=null,et=null,Ct=null,Nr=!1,no=!1,yi=!1,kr=0,es=0,ao=null,M0=0;function mt(){throw Error(r(321))}function Gc(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!an(e[i],t[i]))return!1;return!0}function Vc(e,t,i,s,u,h){return sa=h,Me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Um:ru,yi=!1,h=i(s,u),yi=!1,no&&(h=im(t,i,s,u)),am(e),h}function am(e){U.H=as;var t=et!==null&&et.next!==null;if(sa=0,Ct=et=Me=null,Nr=!1,es=0,ao=null,t)throw Error(r(300));e===null||St||(e=e.dependencies,e!==null&&pr(e)&&(St=!0))}function im(e,t,i,s){Me=e;var u=0;do{if(no&&(ao=null),es=0,no=!1,25<=u)throw Error(r(301));if(u+=1,Ct=et=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}U.H=Hm,h=t(i,s)}while(no);return h}function E0(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?ts(t):t,e=e.useState()[0],(et!==null?et.memoizedState:null)!==e&&(Me.flags|=1024),t}function Yc(){var e=kr!==0;return kr=0,e}function $c(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Wc(e){if(Nr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Nr=!1}sa=0,Ct=et=Me=null,no=!1,es=kr=0,ao=null}function Kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?Me.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function xt(){if(et===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=et.next;var t=Ct===null?Me.memoizedState:Ct.next;if(t!==null)Ct=t,et=e;else{if(e===null)throw Me.alternate===null?Error(r(467)):Error(r(310));et=e,e={memoizedState:et.memoizedState,baseState:et.baseState,baseQueue:et.baseQueue,queue:et.queue,next:null},Ct===null?Me.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function Ar(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ts(e){var t=es;return es+=1,ao===null&&(ao=[]),e=$h(ao,e,t),t=Me,(Ct===null?t.memoizedState:Ct.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Um:ru),e}function Dr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ts(e);if(e.$$typeof===A)return Rt(e)}throw Error(r(438,String(e)))}function Qc(e){var t=null,i=Me.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Me.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Ar(),Me.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=F;return t.index++,i}function ra(e,t){return typeof t=="function"?t(e):t}function Tr(e){var t=xt();return Xc(t,et,e)}function Xc(e,t,i){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=i;var u=e.baseQueue,h=s.pending;if(h!==null){if(u!==null){var y=u.next;u.next=h.next,h.next=y}t.baseQueue=u=h,s.pending=null}if(h=e.baseState,u===null)e.memoizedState=h;else{t=u.next;var v=y=null,M=null,B=t,V=!1;do{var W=B.lane&-536870913;if(W!==B.lane?(Be&W)===W:(sa&W)===W){var q=B.revertLane;if(q===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),W===Xi&&(V=!0);else if((sa&q)===q){B=B.next,q===Xi&&(V=!0);continue}else W={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},M===null?(v=M=W,y=h):M=M.next=W,Me.lanes|=q,Ba|=q;W=B.action,yi&&i(h,W),h=B.hasEagerState?B.eagerState:i(h,W)}else q={lane:W,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},M===null?(v=M=q,y=h):M=M.next=q,Me.lanes|=W,Ba|=W;B=B.next}while(B!==null&&B!==t);if(M===null?y=h:M.next=v,!an(h,e.memoizedState)&&(St=!0,V&&(i=Zi,i!==null)))throw i;e.memoizedState=h,e.baseState=y,e.baseQueue=M,s.lastRenderedState=h}return u===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Zc(e){var t=xt(),i=t.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var s=i.dispatch,u=i.pending,h=t.memoizedState;if(u!==null){i.pending=null;var y=u=u.next;do h=e(h,y.action),y=y.next;while(y!==u);an(h,t.memoizedState)||(St=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),i.lastRenderedState=h}return[h,s]}function om(e,t,i){var s=Me,u=xt(),h=qe;if(h){if(i===void 0)throw Error(r(407));i=i()}else i=t();var y=!an((et||u).memoizedState,i);if(y&&(u.memoizedState=i,St=!0),u=u.queue,tu(lm.bind(null,s,u,e),[e]),u.getSnapshot!==t||y||Ct!==null&&Ct.memoizedState.tag&1){if(s.flags|=2048,io(9,{destroy:void 0},rm.bind(null,s,u,i,t),null),it===null)throw Error(r(349));h||(sa&127)!==0||sm(s,t,i)}return i}function sm(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Me.updateQueue,t===null?(t=Ar(),Me.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function rm(e,t,i,s){t.value=i,t.getSnapshot=s,cm(t)&&um(e)}function lm(e,t,i){return i(function(){cm(t)&&um(e)})}function cm(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!an(e,i)}catch{return!0}}function um(e){var t=li(e,2);t!==null&&Qt(t,e,2)}function Jc(e){var t=Kt();if(typeof e=="function"){var i=e;if(e=i(),yi){Pe(!0);try{i()}finally{Pe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t}function dm(e,t,i,s){return e.baseState=i,Xc(e,et,typeof s=="function"?s:ra)}function O0(e,t,i,s,u){if(Er(e))throw Error(r(485));if(e=t.action,e!==null){var h={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){h.listeners.push(y)}};U.T!==null?i(!0):h.isTransition=!1,s(h),i=t.pending,i===null?(h.next=t.pending=h,fm(t,h)):(h.next=i.next,t.pending=i.next=h)}}function fm(e,t){var i=t.action,s=t.payload,u=e.state;if(t.isTransition){var h=U.T,y={};U.T=y;try{var v=i(u,s),M=U.S;M!==null&&M(y,v),hm(e,t,v)}catch(B){eu(e,t,B)}finally{h!==null&&y.types!==null&&(h.types=y.types),U.T=h}}else try{h=i(u,s),hm(e,t,h)}catch(B){eu(e,t,B)}}function hm(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){mm(e,t,s)},function(s){return eu(e,t,s)}):mm(e,t,i)}function mm(e,t,i){t.status="fulfilled",t.value=i,pm(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,fm(e,i)))}function eu(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,pm(t),t=t.next;while(t!==s)}e.action=null}function pm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gm(e,t){return t}function ym(e,t){if(qe){var i=it.formState;if(i!==null){e:{var s=Me;if(qe){if(ct){t:{for(var u=ct,h=Cn;u.nodeType!==8;){if(!h){u=null;break t}if(u=wn(u.nextSibling),u===null){u=null;break t}}h=u.data,u=h==="F!"||h==="F"?u:null}if(u){ct=wn(u.nextSibling),s=u.data==="F!";break e}}Oa(s)}s=!1}s&&(t=i[0])}}return i=Kt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gm,lastRenderedState:t},i.queue=s,i=_m.bind(null,Me,s),s.dispatch=i,s=Jc(!1),h=su.bind(null,Me,!1,s.queue),s=Kt(),u={state:t,dispatch:null,action:e,pending:null},s.queue=u,i=O0.bind(null,Me,u,h,i),u.dispatch=i,s.memoizedState=e,[t,i,!1]}function bm(e){var t=xt();return xm(t,et,e)}function xm(e,t,i){if(t=Xc(e,t,gm)[0],e=Tr(ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=ts(t)}catch(y){throw y===Ji?br:y}else s=t;t=xt();var u=t.queue,h=u.dispatch;return i!==t.memoizedState&&(Me.flags|=2048,io(9,{destroy:void 0},P0.bind(null,u,i),null)),[s,h,e]}function P0(e,t){e.action=t}function vm(e){var t=xt(),i=et;if(i!==null)return xm(t,i,e);xt(),t=t.memoizedState,i=xt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function io(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Me.updateQueue,t===null&&(t=Ar(),Me.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Cm(){return xt().memoizedState}function jr(e,t,i,s){var u=Kt();Me.flags|=e,u.memoizedState=io(1|t,{destroy:void 0},i,s===void 0?null:s)}function Mr(e,t,i,s){var u=xt();s=s===void 0?null:s;var h=u.memoizedState.inst;et!==null&&s!==null&&Gc(s,et.memoizedState.deps)?u.memoizedState=io(t,h,i,s):(Me.flags|=e,u.memoizedState=io(1|t,h,i,s))}function Sm(e,t){jr(8390656,8,e,t)}function tu(e,t){Mr(2048,8,e,t)}function L0(e){Me.flags|=4;var t=Me.updateQueue;if(t===null)t=Ar(),Me.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function wm(e){var t=xt().memoizedState;return L0({ref:t,nextImpl:e}),function(){if((Qe&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Nm(e,t){return Mr(4,2,e,t)}function km(e,t){return Mr(4,4,e,t)}function Am(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Dm(e,t,i){i=i!=null?i.concat([e]):null,Mr(4,4,Am.bind(null,t,e),i)}function nu(){}function Tm(e,t){var i=xt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&Gc(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function jm(e,t){var i=xt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&Gc(t,s[1]))return s[0];if(s=e(),yi){Pe(!0);try{e()}finally{Pe(!1)}}return i.memoizedState=[s,t],s}function au(e,t,i){return i===void 0||(sa&1073741824)!==0&&(Be&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Mp(),Me.lanes|=e,Ba|=e,i)}function Mm(e,t,i,s){return an(i,t)?i:to.current!==null?(e=au(e,i,s),an(e,t)||(St=!0),e):(sa&42)===0||(sa&1073741824)!==0&&(Be&261930)===0?(St=!0,e.memoizedState=i):(e=Mp(),Me.lanes|=e,Ba|=e,t)}function Em(e,t,i,s,u){var h=Z.p;Z.p=h!==0&&8>h?h:8;var y=U.T,v={};U.T=v,su(e,!1,t,i);try{var M=u(),B=U.S;if(B!==null&&B(v,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var V=j0(M,s);ns(e,t,V,un(e))}else ns(e,t,s,un(e))}catch(W){ns(e,t,{then:function(){},status:"rejected",reason:W},un())}finally{Z.p=h,y!==null&&v.types!==null&&(y.types=v.types),U.T=y}}function R0(){}function iu(e,t,i,s){if(e.tag!==5)throw Error(r(476));var u=Om(e).queue;Em(e,u,t,ne,i===null?R0:function(){return Pm(e),i(s)})}function Om(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:ne},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Pm(e){var t=Om(e);t.next===null&&(t=e.alternate.memoizedState),ns(e,t.next.queue,{},un())}function ou(){return Rt(xs)}function Lm(){return xt().memoizedState}function Rm(){return xt().memoizedState}function _0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=un();e=Ra(i);var s=_a(t,e,i);s!==null&&(Qt(s,t,i),Xo(s,t,i)),t={cache:Lc()},e.payload=t;return}t=t.return}}function z0(e,t,i){var s=un();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Er(e)?zm(t,i):(i=wc(e,t,i,s),i!==null&&(Qt(i,e,s),Im(i,t,s)))}function _m(e,t,i){var s=un();ns(e,t,i,s)}function ns(e,t,i,s){var u={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Er(e))zm(t,u);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var y=t.lastRenderedState,v=h(y,i);if(u.hasEagerState=!0,u.eagerState=v,an(v,y))return dr(e,t,u,0),it===null&&ur(),!1}catch{}finally{}if(i=wc(e,t,u,s),i!==null)return Qt(i,e,s),Im(i,t,s),!0}return!1}function su(e,t,i,s){if(s={lane:2,revertLane:Iu(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Er(e)){if(t)throw Error(r(479))}else t=wc(e,i,s,2),t!==null&&Qt(t,e,2)}function Er(e){var t=e.alternate;return e===Me||t!==null&&t===Me}function zm(e,t){no=Nr=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Im(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Eo(e,i)}}var as={readContext:Rt,use:Dr,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt};as.useEffectEvent=mt;var Um={readContext:Rt,use:Dr,useCallback:function(e,t){return Kt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:Sm,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,jr(4194308,4,Am.bind(null,t,e),i)},useLayoutEffect:function(e,t){return jr(4194308,4,e,t)},useInsertionEffect:function(e,t){jr(4,2,e,t)},useMemo:function(e,t){var i=Kt();t=t===void 0?null:t;var s=e();if(yi){Pe(!0);try{e()}finally{Pe(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Kt();if(i!==void 0){var u=i(t);if(yi){Pe(!0);try{i(t)}finally{Pe(!1)}}}else u=t;return s.memoizedState=s.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},s.queue=e,e=e.dispatch=z0.bind(null,Me,e),[s.memoizedState,e]},useRef:function(e){var t=Kt();return e={current:e},t.memoizedState=e},useState:function(e){e=Jc(e);var t=e.queue,i=_m.bind(null,Me,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:nu,useDeferredValue:function(e,t){var i=Kt();return au(i,e,t)},useTransition:function(){var e=Jc(!1);return e=Em.bind(null,Me,e.queue,!0,!1),Kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Me,u=Kt();if(qe){if(i===void 0)throw Error(r(407));i=i()}else{if(i=t(),it===null)throw Error(r(349));(Be&127)!==0||sm(s,t,i)}u.memoizedState=i;var h={value:i,getSnapshot:t};return u.queue=h,Sm(lm.bind(null,s,h,e),[e]),s.flags|=2048,io(9,{destroy:void 0},rm.bind(null,s,h,i,t),null),i},useId:function(){var e=Kt(),t=it.identifierPrefix;if(qe){var i=zn,s=_n;i=(s&~(1<<32-Se(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=kr++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=M0++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ou,useFormState:ym,useActionState:ym,useOptimistic:function(e){var t=Kt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=su.bind(null,Me,!0,i),i.dispatch=t,[e,t]},useMemoCache:Qc,useCacheRefresh:function(){return Kt().memoizedState=_0.bind(null,Me)},useEffectEvent:function(e){var t=Kt(),i={impl:e};return t.memoizedState=i,function(){if((Qe&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},ru={readContext:Rt,use:Dr,useCallback:Tm,useContext:Rt,useEffect:tu,useImperativeHandle:Dm,useInsertionEffect:Nm,useLayoutEffect:km,useMemo:jm,useReducer:Tr,useRef:Cm,useState:function(){return Tr(ra)},useDebugValue:nu,useDeferredValue:function(e,t){var i=xt();return Mm(i,et.memoizedState,e,t)},useTransition:function(){var e=Tr(ra)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:ts(e),t]},useSyncExternalStore:om,useId:Lm,useHostTransitionStatus:ou,useFormState:bm,useActionState:bm,useOptimistic:function(e,t){var i=xt();return dm(i,et,e,t)},useMemoCache:Qc,useCacheRefresh:Rm};ru.useEffectEvent=wm;var Hm={readContext:Rt,use:Dr,useCallback:Tm,useContext:Rt,useEffect:tu,useImperativeHandle:Dm,useInsertionEffect:Nm,useLayoutEffect:km,useMemo:jm,useReducer:Zc,useRef:Cm,useState:function(){return Zc(ra)},useDebugValue:nu,useDeferredValue:function(e,t){var i=xt();return et===null?au(i,e,t):Mm(i,et.memoizedState,e,t)},useTransition:function(){var e=Zc(ra)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:ts(e),t]},useSyncExternalStore:om,useId:Lm,useHostTransitionStatus:ou,useFormState:vm,useActionState:vm,useOptimistic:function(e,t){var i=xt();return et!==null?dm(i,et,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Qc,useCacheRefresh:Rm};Hm.useEffectEvent=wm;function lu(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:b({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var cu={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=un(),u=Ra(s);u.payload=t,i!=null&&(u.callback=i),t=_a(e,u,s),t!==null&&(Qt(t,e,s),Xo(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=un(),u=Ra(s);u.tag=1,u.payload=t,i!=null&&(u.callback=i),t=_a(e,u,s),t!==null&&(Qt(t,e,s),Xo(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=un(),s=Ra(i);s.tag=2,t!=null&&(s.callback=t),t=_a(e,s,i),t!==null&&(Qt(t,e,i),Xo(t,e,i))}};function Bm(e,t,i,s,u,h,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,h,y):t.prototype&&t.prototype.isPureReactComponent?!qo(i,s)||!qo(u,h):!0}function Km(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&cu.enqueueReplaceState(t,t.state,null)}function bi(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=b({},i));for(var u in e)i[u]===void 0&&(i[u]=e[u])}return i}function qm(e){cr(e)}function Fm(e){console.error(e)}function Gm(e){cr(e)}function Or(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Vm(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function uu(e,t,i){return i=Ra(i),i.tag=3,i.payload={element:null},i.callback=function(){Or(e,t)},i}function Ym(e){return e=Ra(e),e.tag=3,e}function $m(e,t,i,s){var u=i.type.getDerivedStateFromError;if(typeof u=="function"){var h=s.value;e.payload=function(){return u(h)},e.callback=function(){Vm(t,i,s)}}var y=i.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Vm(t,i,s),typeof u!="function"&&(Ka===null?Ka=new Set([this]):Ka.add(this));var v=s.stack;this.componentDidCatch(s.value,{componentStack:v!==null?v:""})})}function I0(e,t,i,s,u){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Qi(t,i,u,!0),i=sn.current,i!==null){switch(i.tag){case 31:case 13:return Sn===null?Fr():i.alternate===null&&pt===0&&(pt=3),i.flags&=-257,i.flags|=65536,i.lanes=u,s===xr?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Ru(e,s,u)),!1;case 22:return i.flags|=65536,s===xr?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Ru(e,s,u)),!1}throw Error(r(435,i.tag))}return Ru(e,s,u),Fr(),!1}if(qe)return t=sn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,s!==jc&&(e=Error(r(422),{cause:s}),Vo(bn(e,i)))):(s!==jc&&(t=Error(r(423),{cause:s}),Vo(bn(t,i))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,s=bn(s,i),u=uu(e.stateNode,s,u),Hc(e,u),pt!==4&&(pt=2)),!1;var h=Error(r(520),{cause:s});if(h=bn(h,i),ds===null?ds=[h]:ds.push(h),pt!==4&&(pt=2),t===null)return!0;s=bn(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=u&-u,i.lanes|=e,e=uu(i.stateNode,s,e),Hc(i,e),!1;case 1:if(t=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Ka===null||!Ka.has(h))))return i.flags|=65536,u&=-u,i.lanes|=u,u=Ym(u),$m(u,e,i,s),Hc(i,u),!1}i=i.return}while(i!==null);return!1}var du=Error(r(461)),St=!1;function _t(e,t,i,s){t.child=e===null?Zh(t,null,i,s):gi(t,e.child,i,s)}function Wm(e,t,i,s,u){i=i.render;var h=t.ref;if("ref"in s){var y={};for(var v in s)v!=="ref"&&(y[v]=s[v])}else y=s;return fi(t),s=Vc(e,t,i,y,h,u),v=Yc(),e!==null&&!St?($c(e,t,u),la(e,t,u)):(qe&&v&&Dc(t),t.flags|=1,_t(e,t,s,u),t.child)}function Qm(e,t,i,s,u){if(e===null){var h=i.type;return typeof h=="function"&&!Nc(h)&&h.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=h,Xm(e,t,h,s,u)):(e=hr(i.type,null,s,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!xu(e,u)){var y=h.memoizedProps;if(i=i.compare,i=i!==null?i:qo,i(y,s)&&e.ref===t.ref)return la(e,t,u)}return t.flags|=1,e=na(h,s),e.ref=t.ref,e.return=t,t.child=e}function Xm(e,t,i,s,u){if(e!==null){var h=e.memoizedProps;if(qo(h,s)&&e.ref===t.ref)if(St=!1,t.pendingProps=s=h,xu(e,u))(e.flags&131072)!==0&&(St=!0);else return t.lanes=e.lanes,la(e,t,u)}return fu(e,t,i,s,u)}function Zm(e,t,i,s){var u=s.children,h=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(h=h!==null?h.baseLanes|i:i,e!==null){for(s=t.child=e.child,u=0;s!==null;)u=u|s.lanes|s.childLanes,s=s.sibling;s=u&~h}else s=0,t.child=null;return Jm(e,t,h,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&yr(t,h!==null?h.cachePool:null),h!==null?tm(t,h):Kc(),nm(t);else return s=t.lanes=536870912,Jm(e,t,h!==null?h.baseLanes|i:i,i,s)}else h!==null?(yr(t,h.cachePool),tm(t,h),Ia(),t.memoizedState=null):(e!==null&&yr(t,null),Kc(),Ia());return _t(e,t,u,i),t.child}function is(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Jm(e,t,i,s,u){var h=_c();return h=h===null?null:{parent:vt._currentValue,pool:h},t.memoizedState={baseLanes:i,cachePool:h},e!==null&&yr(t,null),Kc(),nm(t),e!==null&&Qi(e,t,s,!0),t.childLanes=u,null}function Pr(e,t){return t=Rr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ep(e,t,i){return gi(t,e.child,null,i),e=Pr(t,t.pendingProps),e.flags|=2,rn(t),t.memoizedState=null,e}function U0(e,t,i){var s=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(qe){if(s.mode==="hidden")return e=Pr(t,s),t.lanes=536870912,is(null,e);if(Fc(t),(e=ct)?(e=fg(e,Cn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ma!==null?{id:_n,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},i=zh(e),i.return=t,t.child=i,Lt=t,ct=null)):e=null,e===null)throw Oa(t);return t.lanes=536870912,null}return Pr(t,s)}var h=e.memoizedState;if(h!==null){var y=h.dehydrated;if(Fc(t),u)if(t.flags&256)t.flags&=-257,t=ep(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(St||Qi(e,t,i,!1),u=(i&e.childLanes)!==0,St||u){if(s=it,s!==null&&(y=mn(s,i),y!==0&&y!==h.retryLane))throw h.retryLane=y,li(e,y),Qt(s,e,y),du;Fr(),t=ep(e,t,i)}else e=h.treeContext,ct=wn(y.nextSibling),Lt=t,qe=!0,Ea=null,Cn=!1,e!==null&&Hh(t,e),t=Pr(t,s),t.flags|=4096;return t}return e=na(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Lr(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(r(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function fu(e,t,i,s,u){return fi(t),i=Vc(e,t,i,s,void 0,u),s=Yc(),e!==null&&!St?($c(e,t,u),la(e,t,u)):(qe&&s&&Dc(t),t.flags|=1,_t(e,t,i,u),t.child)}function tp(e,t,i,s,u,h){return fi(t),t.updateQueue=null,i=im(t,s,i,u),am(e),s=Yc(),e!==null&&!St?($c(e,t,h),la(e,t,h)):(qe&&s&&Dc(t),t.flags|=1,_t(e,t,i,h),t.child)}function np(e,t,i,s,u){if(fi(t),t.stateNode===null){var h=Vi,y=i.contextType;typeof y=="object"&&y!==null&&(h=Rt(y)),h=new i(s,h),t.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=cu,t.stateNode=h,h._reactInternals=t,h=t.stateNode,h.props=s,h.state=t.memoizedState,h.refs={},Ic(t),y=i.contextType,h.context=typeof y=="object"&&y!==null?Rt(y):Vi,h.state=t.memoizedState,y=i.getDerivedStateFromProps,typeof y=="function"&&(lu(t,i,y,s),h.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(y=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),y!==h.state&&cu.enqueueReplaceState(h,h.state,null),Jo(t,s,h,u),Zo(),h.state=t.memoizedState),typeof h.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){h=t.stateNode;var v=t.memoizedProps,M=bi(i,v);h.props=M;var B=h.context,V=i.contextType;y=Vi,typeof V=="object"&&V!==null&&(y=Rt(V));var W=i.getDerivedStateFromProps;V=typeof W=="function"||typeof h.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,V||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(v||B!==y)&&Km(t,h,s,y),La=!1;var q=t.memoizedState;h.state=q,Jo(t,s,h,u),Zo(),B=t.memoizedState,v||q!==B||La?(typeof W=="function"&&(lu(t,i,W,s),B=t.memoizedState),(M=La||Bm(t,i,M,s,q,B,y))?(V||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(t.flags|=4194308)):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=B),h.props=s,h.state=B,h.context=y,s=M):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{h=t.stateNode,Uc(e,t),y=t.memoizedProps,V=bi(i,y),h.props=V,W=t.pendingProps,q=h.context,B=i.contextType,M=Vi,typeof B=="object"&&B!==null&&(M=Rt(B)),v=i.getDerivedStateFromProps,(B=typeof v=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==W||q!==M)&&Km(t,h,s,M),La=!1,q=t.memoizedState,h.state=q,Jo(t,s,h,u),Zo();var G=t.memoizedState;y!==W||q!==G||La||e!==null&&e.dependencies!==null&&pr(e.dependencies)?(typeof v=="function"&&(lu(t,i,v,s),G=t.memoizedState),(V=La||Bm(t,i,V,s,q,G,M)||e!==null&&e.dependencies!==null&&pr(e.dependencies))?(B||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(s,G,M),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(s,G,M)),typeof h.componentDidUpdate=="function"&&(t.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=G),h.props=s,h.state=G,h.context=M,s=V):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),s=!1)}return h=s,Lr(e,t),s=(t.flags&128)!==0,h||s?(h=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:h.render(),t.flags|=1,e!==null&&s?(t.child=gi(t,e.child,null,u),t.child=gi(t,null,i,u)):_t(e,t,i,u),t.memoizedState=h.state,e=t.child):e=la(e,t,u),e}function ap(e,t,i,s){return ui(),t.flags|=256,_t(e,t,i,s),t.child}var hu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mu(e){return{baseLanes:e,cachePool:Vh()}}function pu(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=cn),e}function ip(e,t,i){var s=t.pendingProps,u=!1,h=(t.flags&128)!==0,y;if((y=h)||(y=e!==null&&e.memoizedState===null?!1:(bt.current&2)!==0),y&&(u=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(qe){if(u?za(t):Ia(),(e=ct)?(e=fg(e,Cn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ma!==null?{id:_n,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},i=zh(e),i.return=t,t.child=i,Lt=t,ct=null)):e=null,e===null)throw Oa(t);return Xu(e)?t.lanes=32:t.lanes=536870912,null}var v=s.children;return s=s.fallback,u?(Ia(),u=t.mode,v=Rr({mode:"hidden",children:v},u),s=ci(s,u,i,null),v.return=t,s.return=t,v.sibling=s,t.child=v,s=t.child,s.memoizedState=mu(i),s.childLanes=pu(e,y,i),t.memoizedState=hu,is(null,s)):(za(t),gu(t,v))}var M=e.memoizedState;if(M!==null&&(v=M.dehydrated,v!==null)){if(h)t.flags&256?(za(t),t.flags&=-257,t=yu(e,t,i)):t.memoizedState!==null?(Ia(),t.child=e.child,t.flags|=128,t=null):(Ia(),v=s.fallback,u=t.mode,s=Rr({mode:"visible",children:s.children},u),v=ci(v,u,i,null),v.flags|=2,s.return=t,v.return=t,s.sibling=v,t.child=s,gi(t,e.child,null,i),s=t.child,s.memoizedState=mu(i),s.childLanes=pu(e,y,i),t.memoizedState=hu,t=is(null,s));else if(za(t),Xu(v)){if(y=v.nextSibling&&v.nextSibling.dataset,y)var B=y.dgst;y=B,s=Error(r(419)),s.stack="",s.digest=y,Vo({value:s,source:null,stack:null}),t=yu(e,t,i)}else if(St||Qi(e,t,i,!1),y=(i&e.childLanes)!==0,St||y){if(y=it,y!==null&&(s=mn(y,i),s!==0&&s!==M.retryLane))throw M.retryLane=s,li(e,s),Qt(y,e,s),du;Qu(v)||Fr(),t=yu(e,t,i)}else Qu(v)?(t.flags|=192,t.child=e.child,t=null):(e=M.treeContext,ct=wn(v.nextSibling),Lt=t,qe=!0,Ea=null,Cn=!1,e!==null&&Hh(t,e),t=gu(t,s.children),t.flags|=4096);return t}return u?(Ia(),v=s.fallback,u=t.mode,M=e.child,B=M.sibling,s=na(M,{mode:"hidden",children:s.children}),s.subtreeFlags=M.subtreeFlags&65011712,B!==null?v=na(B,v):(v=ci(v,u,i,null),v.flags|=2),v.return=t,s.return=t,s.sibling=v,t.child=s,is(null,s),s=t.child,v=e.child.memoizedState,v===null?v=mu(i):(u=v.cachePool,u!==null?(M=vt._currentValue,u=u.parent!==M?{parent:M,pool:M}:u):u=Vh(),v={baseLanes:v.baseLanes|i,cachePool:u}),s.memoizedState=v,s.childLanes=pu(e,y,i),t.memoizedState=hu,is(e.child,s)):(za(t),i=e.child,e=i.sibling,i=na(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=i,t.memoizedState=null,i)}function gu(e,t){return t=Rr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Rr(e,t){return e=on(22,e,null,t),e.lanes=0,e}function yu(e,t,i){return gi(t,e.child,null,i),e=gu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function op(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Oc(e.return,t,i)}function bu(e,t,i,s,u,h){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:u,treeForkCount:h}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=s,y.tail=i,y.tailMode=u,y.treeForkCount=h)}function sp(e,t,i){var s=t.pendingProps,u=s.revealOrder,h=s.tail;s=s.children;var y=bt.current,v=(y&2)!==0;if(v?(y=y&1|2,t.flags|=128):y&=1,X(bt,y),_t(e,t,s,i),s=qe?Go:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&op(e,i,t);else if(e.tag===19)op(e,i,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(u){case"forwards":for(i=t.child,u=null;i!==null;)e=i.alternate,e!==null&&wr(e)===null&&(u=i),i=i.sibling;i=u,i===null?(u=t.child,t.child=null):(u=i.sibling,i.sibling=null),bu(t,!1,u,i,h,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&wr(e)===null){t.child=u;break}e=u.sibling,u.sibling=i,i=u,u=e}bu(t,!0,i,null,h,s);break;case"together":bu(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function la(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Ba|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Qi(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,i=na(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=na(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function xu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&pr(e)))}function H0(e,t,i){switch(t.tag){case 3:ye(t,t.stateNode.containerInfo),Pa(t,vt,e.memoizedState.cache),ui();break;case 27:case 5:ze(t);break;case 4:ye(t,t.stateNode.containerInfo);break;case 10:Pa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Fc(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(za(t),t.flags|=128,null):(i&t.child.childLanes)!==0?ip(e,t,i):(za(t),e=la(e,t,i),e!==null?e.sibling:null);za(t);break;case 19:var u=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Qi(e,t,i,!1),s=(i&t.childLanes)!==0),u){if(s)return sp(e,t,i);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),X(bt,bt.current),s)break;return null;case 22:return t.lanes=0,Zm(e,t,i,t.pendingProps);case 24:Pa(t,vt,e.memoizedState.cache)}return la(e,t,i)}function rp(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)St=!0;else{if(!xu(e,i)&&(t.flags&128)===0)return St=!1,H0(e,t,i);St=(e.flags&131072)!==0}else St=!1,qe&&(t.flags&1048576)!==0&&Uh(t,Go,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=mi(t.elementType),t.type=e,typeof e=="function")Nc(e)?(s=bi(e,s),t.tag=1,t=np(null,t,e,s,i)):(t.tag=0,t=fu(null,t,e,s,i));else{if(e!=null){var u=e.$$typeof;if(u===k){t.tag=11,t=Wm(null,t,e,s,i);break e}else if(u===R){t.tag=14,t=Qm(null,t,e,s,i);break e}}throw t=te(e)||e,Error(r(306,t,""))}}return t;case 0:return fu(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,u=bi(s,t.pendingProps),np(e,t,s,u,i);case 3:e:{if(ye(t,t.stateNode.containerInfo),e===null)throw Error(r(387));s=t.pendingProps;var h=t.memoizedState;u=h.element,Uc(e,t),Jo(t,s,null,i);var y=t.memoizedState;if(s=y.cache,Pa(t,vt,s),s!==h.cache&&Pc(t,[vt],i,!0),Zo(),s=y.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){t=ap(e,t,s,i);break e}else if(s!==u){u=bn(Error(r(424)),t),Vo(u),t=ap(e,t,s,i);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(ct=wn(e.firstChild),Lt=t,qe=!0,Ea=null,Cn=!0,i=Zh(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ui(),s===u){t=la(e,t,i);break e}_t(e,t,s,i)}t=t.child}return t;case 26:return Lr(e,t),e===null?(i=bg(t.type,null,t.pendingProps,null))?t.memoizedState=i:qe||(i=t.type,e=t.pendingProps,s=Xr(ie.current).createElement(i),s[Pt]=t,s[Ft]=e,zt(s,i,e),jt(s),t.stateNode=s):t.memoizedState=bg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ze(t),e===null&&qe&&(s=t.stateNode=pg(t.type,t.pendingProps,ie.current),Lt=t,Cn=!0,u=ct,Va(t.type)?(Zu=u,ct=wn(s.firstChild)):ct=u),_t(e,t,t.pendingProps.children,i),Lr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&qe&&((u=s=ct)&&(s=gC(s,t.type,t.pendingProps,Cn),s!==null?(t.stateNode=s,Lt=t,ct=wn(s.firstChild),Cn=!1,u=!0):u=!1),u||Oa(t)),ze(t),u=t.type,h=t.pendingProps,y=e!==null?e.memoizedProps:null,s=h.children,Yu(u,h)?s=null:y!==null&&Yu(u,y)&&(t.flags|=32),t.memoizedState!==null&&(u=Vc(e,t,E0,null,null,i),xs._currentValue=u),Lr(e,t),_t(e,t,s,i),t.child;case 6:return e===null&&qe&&((e=i=ct)&&(i=yC(i,t.pendingProps,Cn),i!==null?(t.stateNode=i,Lt=t,ct=null,e=!0):e=!1),e||Oa(t)),null;case 13:return ip(e,t,i);case 4:return ye(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=gi(t,null,s,i):_t(e,t,s,i),t.child;case 11:return Wm(e,t,t.type,t.pendingProps,i);case 7:return _t(e,t,t.pendingProps,i),t.child;case 8:return _t(e,t,t.pendingProps.children,i),t.child;case 12:return _t(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Pa(t,t.type,s.value),_t(e,t,s.children,i),t.child;case 9:return u=t.type._context,s=t.pendingProps.children,fi(t),u=Rt(u),s=s(u),t.flags|=1,_t(e,t,s,i),t.child;case 14:return Qm(e,t,t.type,t.pendingProps,i);case 15:return Xm(e,t,t.type,t.pendingProps,i);case 19:return sp(e,t,i);case 31:return U0(e,t,i);case 22:return Zm(e,t,i,t.pendingProps);case 24:return fi(t),s=Rt(vt),e===null?(u=_c(),u===null&&(u=it,h=Lc(),u.pooledCache=h,h.refCount++,h!==null&&(u.pooledCacheLanes|=i),u=h),t.memoizedState={parent:s,cache:u},Ic(t),Pa(t,vt,u)):((e.lanes&i)!==0&&(Uc(e,t),Jo(t,null,null,i),Zo()),u=e.memoizedState,h=t.memoizedState,u.parent!==s?(u={parent:s,cache:s},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Pa(t,vt,s)):(s=h.cache,Pa(t,vt,s),s!==u.cache&&Pc(t,[vt],i,!0))),_t(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function ca(e){e.flags|=4}function vu(e,t,i,s,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Lp())e.flags|=8192;else throw pi=xr,zc}else e.flags&=-16777217}function lp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wg(t))if(Lp())e.flags|=8192;else throw pi=xr,zc}function _r(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Tt():536870912,e.lanes|=t,lo|=t)}function os(e,t){if(!qe)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var u=e.child;u!==null;)i|=u.lanes|u.childLanes,s|=u.subtreeFlags&65011712,s|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)i|=u.lanes|u.childLanes,s|=u.subtreeFlags,s|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function B0(e,t,i){var s=t.pendingProps;switch(Tc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return ut(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),oa(vt),De(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Wi(t)?ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Mc())),ut(t),null;case 26:var u=t.type,h=t.memoizedState;return e===null?(ca(t),h!==null?(ut(t),lp(t,h)):(ut(t),vu(t,u,null,s,i))):h?h!==e.memoizedState?(ca(t),ut(t),lp(t,h)):(ut(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&ca(t),ut(t),vu(t,u,e,s,i)),null;case 27:if(Xe(t),i=ie.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ca(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return ut(t),null}e=ae.current,Wi(t)?Bh(t):(e=pg(u,s,i),t.stateNode=e,ca(t))}return ut(t),null;case 5:if(Xe(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ca(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return ut(t),null}if(h=ae.current,Wi(t))Bh(t);else{var y=Xr(ie.current);switch(h){case 1:h=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:h=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":h=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":h=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":h=y.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof s.is=="string"?y.createElement("select",{is:s.is}):y.createElement("select"),s.multiple?h.multiple=!0:s.size&&(h.size=s.size);break;default:h=typeof s.is=="string"?y.createElement(u,{is:s.is}):y.createElement(u)}}h[Pt]=t,h[Ft]=s;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)h.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=h;e:switch(zt(h,u,s),u){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&ca(t)}}return ut(t),vu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&ca(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(r(166));if(e=ie.current,Wi(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,u=Lt,u!==null)switch(u.tag){case 27:case 5:s=u.memoizedProps}e[Pt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||ig(e.nodeValue,i)),e||Oa(t,!0)}else e=Xr(e).createTextNode(s),e[Pt]=t,t.stateNode=e}return ut(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Wi(t),i!==null){if(e===null){if(!s)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Pt]=t}else ui(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),e=!1}else i=Mc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(rn(t),t):(rn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return ut(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Wi(t),s!==null&&s.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[Pt]=t}else ui(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),u=!1}else u=Mc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(rn(t),t):(rn(t),null)}return rn(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,u=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(u=s.alternate.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==u&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),_r(t,t.updateQueue),ut(t),null);case 4:return De(),e===null&&Ku(t.stateNode.containerInfo),ut(t),null;case 10:return oa(t.type),ut(t),null;case 19:if(he(bt),s=t.memoizedState,s===null)return ut(t),null;if(u=(t.flags&128)!==0,h=s.rendering,h===null)if(u)os(s,!1);else{if(pt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(h=wr(e),h!==null){for(t.flags|=128,os(s,!1),e=h.updateQueue,t.updateQueue=e,_r(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)_h(i,e),i=i.sibling;return X(bt,bt.current&1|2),qe&&aa(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&yt()>Br&&(t.flags|=128,u=!0,os(s,!1),t.lanes=4194304)}else{if(!u)if(e=wr(h),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,_r(t,e),os(s,!0),s.tail===null&&s.tailMode==="hidden"&&!h.alternate&&!qe)return ut(t),null}else 2*yt()-s.renderingStartTime>Br&&i!==536870912&&(t.flags|=128,u=!0,os(s,!1),t.lanes=4194304);s.isBackwards?(h.sibling=t.child,t.child=h):(e=s.last,e!==null?e.sibling=h:t.child=h,s.last=h)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=yt(),e.sibling=null,i=bt.current,X(bt,u?i&1|2:i&1),qe&&aa(t,s.treeForkCount),e):(ut(t),null);case 22:case 23:return rn(t),qc(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),i=t.updateQueue,i!==null&&_r(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&he(hi),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),oa(vt),ut(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function K0(e,t){switch(Tc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oa(vt),De(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Xe(t),null;case 31:if(t.memoizedState!==null){if(rn(t),t.alternate===null)throw Error(r(340));ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(rn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return he(bt),null;case 4:return De(),null;case 10:return oa(t.type),null;case 22:case 23:return rn(t),qc(),e!==null&&he(hi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return oa(vt),null;case 25:return null;default:return null}}function cp(e,t){switch(Tc(t),t.tag){case 3:oa(vt),De();break;case 26:case 27:case 5:Xe(t);break;case 4:De();break;case 31:t.memoizedState!==null&&rn(t);break;case 13:rn(t);break;case 19:he(bt);break;case 10:oa(t.type);break;case 22:case 23:rn(t),qc(),e!==null&&he(hi);break;case 24:oa(vt)}}function ss(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var u=s.next;i=u;do{if((i.tag&e)===e){s=void 0;var h=i.create,y=i.inst;s=h(),y.destroy=s}i=i.next}while(i!==u)}}catch(v){Je(t,t.return,v)}}function Ua(e,t,i){try{var s=t.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var h=u.next;s=h;do{if((s.tag&e)===e){var y=s.inst,v=y.destroy;if(v!==void 0){y.destroy=void 0,u=t;var M=i,B=v;try{B()}catch(V){Je(u,M,V)}}}s=s.next}while(s!==h)}}catch(V){Je(t,t.return,V)}}function up(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{em(t,i)}catch(s){Je(e,e.return,s)}}}function dp(e,t,i){i.props=bi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Je(e,t,s)}}function rs(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(u){Je(e,t,u)}}function In(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(u){Je(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(u){Je(e,t,u)}else i.current=null}function fp(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(u){Je(e,e.return,u)}}function Cu(e,t,i){try{var s=e.stateNode;uC(s,e.type,i,t),s[Ft]=t}catch(u){Je(e,e.return,u)}}function hp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Va(e.type)||e.tag===4}function Su(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hp(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&&Va(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 wu(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=ea));else if(s!==4&&(s===27&&Va(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(wu(e,t,i),e=e.sibling;e!==null;)wu(e,t,i),e=e.sibling}function zr(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&Va(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(zr(e,t,i),e=e.sibling;e!==null;)zr(e,t,i),e=e.sibling}function mp(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);zt(t,s,i),t[Pt]=e,t[Ft]=i}catch(h){Je(e,e.return,h)}}var ua=!1,wt=!1,Nu=!1,pp=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function q0(e,t){if(e=e.containerInfo,Gu=il,e=Dh(e),yc(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var u=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var y=0,v=-1,M=-1,B=0,V=0,W=e,q=null;t:for(;;){for(var G;W!==i||u!==0&&W.nodeType!==3||(v=y+u),W!==h||s!==0&&W.nodeType!==3||(M=y+s),W.nodeType===3&&(y+=W.nodeValue.length),(G=W.firstChild)!==null;)q=W,W=G;for(;;){if(W===e)break t;if(q===i&&++B===u&&(v=y),q===h&&++V===s&&(M=y),(G=W.nextSibling)!==null)break;W=q,q=W.parentNode}W=G}i=v===-1||M===-1?null:{start:v,end:M}}else i=null}i=i||{start:0,end:0}}else i=null;for(Vu={focusedElem:e,selectionRange:i},il=!1,Mt=t;Mt!==null;)if(t=Mt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Mt=e;else for(;Mt!==null;){switch(t=Mt,h=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)u=e[i],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,i=t,u=h.memoizedProps,h=h.memoizedState,s=i.stateNode;try{var fe=bi(i.type,u);e=s.getSnapshotBeforeUpdate(fe,h),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ne){Je(i,i.return,Ne)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Wu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Wu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,Mt=e;break}Mt=t.return}}function gp(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:fa(e,i),s&4&&ss(5,i);break;case 1:if(fa(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(y){Je(i,i.return,y)}else{var u=bi(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Je(i,i.return,y)}}s&64&&up(i),s&512&&rs(i,i.return);break;case 3:if(fa(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{em(e,t)}catch(y){Je(i,i.return,y)}}break;case 27:t===null&&s&4&&mp(i);case 26:case 5:fa(e,i),t===null&&s&4&&fp(i),s&512&&rs(i,i.return);break;case 12:fa(e,i);break;case 31:fa(e,i),s&4&&xp(e,i);break;case 13:fa(e,i),s&4&&vp(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Z0.bind(null,i),bC(e,i))));break;case 22:if(s=i.memoizedState!==null||ua,!s){t=t!==null&&t.memoizedState!==null||wt,u=ua;var h=wt;ua=s,(wt=t)&&!h?ha(e,i,(i.subtreeFlags&8772)!==0):fa(e,i),ua=u,wt=h}break;case 30:break;default:fa(e,i)}}function yp(e){var t=e.alternate;t!==null&&(e.alternate=null,yp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ec(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 ft=null,Vt=!1;function da(e,t,i){for(i=i.child;i!==null;)bp(e,t,i),i=i.sibling}function bp(e,t,i){if(J&&typeof J.onCommitFiberUnmount=="function")try{J.onCommitFiberUnmount(Qn,i)}catch{}switch(i.tag){case 26:wt||In(i,t),da(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:wt||In(i,t);var s=ft,u=Vt;Va(i.type)&&(ft=i.stateNode,Vt=!1),da(e,t,i),gs(i.stateNode),ft=s,Vt=u;break;case 5:wt||In(i,t);case 6:if(s=ft,u=Vt,ft=null,da(e,t,i),ft=s,Vt=u,ft!==null)if(Vt)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(i.stateNode)}catch(h){Je(i,t,h)}else try{ft.removeChild(i.stateNode)}catch(h){Je(i,t,h)}break;case 18:ft!==null&&(Vt?(e=ft,ug(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),yo(e)):ug(ft,i.stateNode));break;case 4:s=ft,u=Vt,ft=i.stateNode.containerInfo,Vt=!0,da(e,t,i),ft=s,Vt=u;break;case 0:case 11:case 14:case 15:Ua(2,i,t),wt||Ua(4,i,t),da(e,t,i);break;case 1:wt||(In(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&dp(i,t,s)),da(e,t,i);break;case 21:da(e,t,i);break;case 22:wt=(s=wt)||i.memoizedState!==null,da(e,t,i),wt=s;break;default:da(e,t,i)}}function xp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{yo(e)}catch(i){Je(t,t.return,i)}}}function vp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{yo(e)}catch(i){Je(t,t.return,i)}}function F0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new pp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new pp),t;default:throw Error(r(435,e.tag))}}function Ir(e,t){var i=F0(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var u=J0.bind(null,e,s);s.then(u,u)}})}function Yt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var u=i[s],h=e,y=t,v=y;e:for(;v!==null;){switch(v.tag){case 27:if(Va(v.type)){ft=v.stateNode,Vt=!1;break e}break;case 5:ft=v.stateNode,Vt=!1;break e;case 3:case 4:ft=v.stateNode.containerInfo,Vt=!0;break e}v=v.return}if(ft===null)throw Error(r(160));bp(h,y,u),ft=null,Vt=!1,h=u.alternate,h!==null&&(h.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cp(t,e),t=t.sibling}var Tn=null;function Cp(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Yt(t,e),$t(e),s&4&&(Ua(3,e,e.return),ss(3,e),Ua(5,e,e.return));break;case 1:Yt(t,e),$t(e),s&512&&(wt||i===null||In(i,i.return)),s&64&&ua&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var u=Tn;if(Yt(t,e),$t(e),s&512&&(wt||i===null||In(i,i.return)),s&4){var h=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,u=u.ownerDocument||u;t:switch(s){case"title":h=u.getElementsByTagName("title")[0],(!h||h[Lo]||h[Pt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=u.createElement(s),u.head.insertBefore(h,u.querySelector("head > title"))),zt(h,s,i),h[Pt]=e,jt(h),s=h;break e;case"link":var y=Cg("link","href",u).get(s+(i.href||""));if(y){for(var v=0;v<y.length;v++)if(h=y[v],h.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){y.splice(v,1);break t}}h=u.createElement(s),zt(h,s,i),u.head.appendChild(h);break;case"meta":if(y=Cg("meta","content",u).get(s+(i.content||""))){for(v=0;v<y.length;v++)if(h=y[v],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){y.splice(v,1);break t}}h=u.createElement(s),zt(h,s,i),u.head.appendChild(h);break;default:throw Error(r(468,s))}h[Pt]=e,jt(h),s=h}e.stateNode=s}else Sg(u,e.type,e.stateNode);else e.stateNode=vg(u,s,e.memoizedProps);else h!==s?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,s===null?Sg(u,e.type,e.stateNode):vg(u,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Cu(e,e.memoizedProps,i.memoizedProps)}break;case 27:Yt(t,e),$t(e),s&512&&(wt||i===null||In(i,i.return)),i!==null&&s&4&&Cu(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Yt(t,e),$t(e),s&512&&(wt||i===null||In(i,i.return)),e.flags&32){u=e.stateNode;try{Ui(u,"")}catch(fe){Je(e,e.return,fe)}}s&4&&e.stateNode!=null&&(u=e.memoizedProps,Cu(e,u,i!==null?i.memoizedProps:u)),s&1024&&(Nu=!0);break;case 6:if(Yt(t,e),$t(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(fe){Je(e,e.return,fe)}}break;case 3:if(el=null,u=Tn,Tn=Zr(t.containerInfo),Yt(t,e),Tn=u,$t(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{yo(t.containerInfo)}catch(fe){Je(e,e.return,fe)}Nu&&(Nu=!1,Sp(e));break;case 4:s=Tn,Tn=Zr(e.stateNode.containerInfo),Yt(t,e),$t(e),Tn=s;break;case 12:Yt(t,e),$t(e);break;case 31:Yt(t,e),$t(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Ir(e,s)));break;case 13:Yt(t,e),$t(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Hr=yt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Ir(e,s)));break;case 22:u=e.memoizedState!==null;var M=i!==null&&i.memoizedState!==null,B=ua,V=wt;if(ua=B||u,wt=V||M,Yt(t,e),wt=V,ua=B,$t(e),s&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(i===null||M||ua||wt||xi(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){M=i=t;try{if(h=M.stateNode,u)y=h.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{v=M.stateNode;var W=M.memoizedProps.style,q=W!=null&&W.hasOwnProperty("display")?W.display:null;v.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(fe){Je(M,M.return,fe)}}}else if(t.tag===6){if(i===null){M=t;try{M.stateNode.nodeValue=u?"":M.memoizedProps}catch(fe){Je(M,M.return,fe)}}}else if(t.tag===18){if(i===null){M=t;try{var G=M.stateNode;u?dg(G,!0):dg(M.stateNode,!1)}catch(fe){Je(M,M.return,fe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Ir(e,i))));break;case 19:Yt(t,e),$t(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Ir(e,s)));break;case 30:break;case 21:break;default:Yt(t,e),$t(e)}}function $t(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(hp(s)){i=s;break}s=s.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var u=i.stateNode,h=Su(e);zr(e,h,u);break;case 5:var y=i.stateNode;i.flags&32&&(Ui(y,""),i.flags&=-33);var v=Su(e);zr(e,v,y);break;case 3:case 4:var M=i.stateNode.containerInfo,B=Su(e);wu(e,B,M);break;default:throw Error(r(161))}}catch(V){Je(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Sp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gp(e,t.alternate,t),t=t.sibling}function xi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ua(4,t,t.return),xi(t);break;case 1:In(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&dp(t,t.return,i),xi(t);break;case 27:gs(t.stateNode);case 26:case 5:In(t,t.return),xi(t);break;case 22:t.memoizedState===null&&xi(t);break;case 30:xi(t);break;default:xi(t)}e=e.sibling}}function ha(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,u=e,h=t,y=h.flags;switch(h.tag){case 0:case 11:case 15:ha(u,h,i),ss(4,h);break;case 1:if(ha(u,h,i),s=h,u=s.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(B){Je(s,s.return,B)}if(s=h,u=s.updateQueue,u!==null){var v=s.stateNode;try{var M=u.shared.hiddenCallbacks;if(M!==null)for(u.shared.hiddenCallbacks=null,u=0;u<M.length;u++)Jh(M[u],v)}catch(B){Je(s,s.return,B)}}i&&y&64&&up(h),rs(h,h.return);break;case 27:mp(h);case 26:case 5:ha(u,h,i),i&&s===null&&y&4&&fp(h),rs(h,h.return);break;case 12:ha(u,h,i);break;case 31:ha(u,h,i),i&&y&4&&xp(u,h);break;case 13:ha(u,h,i),i&&y&4&&vp(u,h);break;case 22:h.memoizedState===null&&ha(u,h,i),rs(h,h.return);break;case 30:break;default:ha(u,h,i)}t=t.sibling}}function ku(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Yo(i))}function Au(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yo(e))}function jn(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wp(e,t,i,s),t=t.sibling}function wp(e,t,i,s){var u=t.flags;switch(t.tag){case 0:case 11:case 15:jn(e,t,i,s),u&2048&&ss(9,t);break;case 1:jn(e,t,i,s);break;case 3:jn(e,t,i,s),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yo(e)));break;case 12:if(u&2048){jn(e,t,i,s),e=t.stateNode;try{var h=t.memoizedProps,y=h.id,v=h.onPostCommit;typeof v=="function"&&v(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(M){Je(t,t.return,M)}}else jn(e,t,i,s);break;case 31:jn(e,t,i,s);break;case 13:jn(e,t,i,s);break;case 23:break;case 22:h=t.stateNode,y=t.alternate,t.memoizedState!==null?h._visibility&2?jn(e,t,i,s):ls(e,t):h._visibility&2?jn(e,t,i,s):(h._visibility|=2,oo(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),u&2048&&ku(y,t);break;case 24:jn(e,t,i,s),u&2048&&Au(t.alternate,t);break;default:jn(e,t,i,s)}}function oo(e,t,i,s,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var h=e,y=t,v=i,M=s,B=y.flags;switch(y.tag){case 0:case 11:case 15:oo(h,y,v,M,u),ss(8,y);break;case 23:break;case 22:var V=y.stateNode;y.memoizedState!==null?V._visibility&2?oo(h,y,v,M,u):ls(h,y):(V._visibility|=2,oo(h,y,v,M,u)),u&&B&2048&&ku(y.alternate,y);break;case 24:oo(h,y,v,M,u),u&&B&2048&&Au(y.alternate,y);break;default:oo(h,y,v,M,u)}t=t.sibling}}function ls(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,u=s.flags;switch(s.tag){case 22:ls(i,s),u&2048&&ku(s.alternate,s);break;case 24:ls(i,s),u&2048&&Au(s.alternate,s);break;default:ls(i,s)}t=t.sibling}}var cs=8192;function so(e,t,i){if(e.subtreeFlags&cs)for(e=e.child;e!==null;)Np(e,t,i),e=e.sibling}function Np(e,t,i){switch(e.tag){case 26:so(e,t,i),e.flags&cs&&e.memoizedState!==null&&MC(i,Tn,e.memoizedState,e.memoizedProps);break;case 5:so(e,t,i);break;case 3:case 4:var s=Tn;Tn=Zr(e.stateNode.containerInfo),so(e,t,i),Tn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=cs,cs=16777216,so(e,t,i),cs=s):so(e,t,i));break;default:so(e,t,i)}}function kp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function us(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];Mt=s,Dp(s,e)}kp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ap(e),e=e.sibling}function Ap(e){switch(e.tag){case 0:case 11:case 15:us(e),e.flags&2048&&Ua(9,e,e.return);break;case 3:us(e);break;case 12:us(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ur(e)):us(e);break;default:us(e)}}function Ur(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];Mt=s,Dp(s,e)}kp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ua(8,t,t.return),Ur(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Ur(t));break;default:Ur(t)}e=e.sibling}}function Dp(e,t){for(;Mt!==null;){var i=Mt;switch(i.tag){case 0:case 11:case 15:Ua(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Yo(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,Mt=s;else e:for(i=e;Mt!==null;){s=Mt;var u=s.sibling,h=s.return;if(yp(s),s===i){Mt=null;break e}if(u!==null){u.return=h,Mt=u;break e}Mt=h}}}var G0={getCacheForType:function(e){var t=Rt(vt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Rt(vt).controller.signal}},V0=typeof WeakMap=="function"?WeakMap:Map,Qe=0,it=null,Ie=null,Be=0,Ze=0,ln=null,Ha=!1,ro=!1,Du=!1,ma=0,pt=0,Ba=0,vi=0,Tu=0,cn=0,lo=0,ds=null,Wt=null,ju=!1,Hr=0,Tp=0,Br=1/0,Kr=null,Ka=null,At=0,qa=null,co=null,pa=0,Mu=0,Eu=null,jp=null,fs=0,Ou=null;function un(){return(Qe&2)!==0&&Be!==0?Be&-Be:U.T!==null?Iu():Oo()}function Mp(){if(cn===0)if((Be&536870912)===0||qe){var e=we;we<<=1,(we&3932160)===0&&(we=262144),cn=e}else cn=536870912;return e=sn.current,e!==null&&(e.flags|=32),cn}function Qt(e,t,i){(e===it&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)&&(uo(e,0),Fa(e,Be,cn,!1)),An(e,i),((Qe&2)===0||e!==it)&&(e===it&&((Qe&2)===0&&(vi|=i),pt===4&&Fa(e,Be,cn,!1)),Un(e))}function Ep(e,t,i){if((Qe&6)!==0)throw Error(r(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Ht(e,t),u=s?W0(e,t):Lu(e,t,!0),h=s;do{if(u===0){ro&&!s&&Fa(e,t,0,!1);break}else{if(i=e.current.alternate,h&&!Y0(i)){u=Lu(e,t,!1),h=!1;continue}if(u===2){if(h=t,e.errorRecoveryDisabledLanes&h)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var v=e;u=ds;var M=v.current.memoizedState.isDehydrated;if(M&&(uo(v,y).flags|=256),y=Lu(v,y,!1),y!==2){if(Du&&!M){v.errorRecoveryDisabledLanes|=h,vi|=h,u=4;break e}h=Wt,Wt=u,h!==null&&(Wt===null?Wt=h:Wt.push.apply(Wt,h))}u=y}if(h=!1,u!==2)continue}}if(u===1){uo(e,0),Fa(e,t,0,!0);break}e:{switch(s=e,h=u,h){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Fa(s,t,cn,!Ha);break e;case 2:Wt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(u=Hr+300-yt(),10<u)){if(Fa(s,t,cn,!Ha),ke(s,0,!0)!==0)break e;pa=t,s.timeoutHandle=lg(Op.bind(null,s,i,Wt,Kr,ju,t,cn,vi,lo,Ha,h,"Throttled",-0,0),u);break e}Op(s,i,Wt,Kr,ju,t,cn,vi,lo,Ha,h,null,-0,0)}}break}while(!0);Un(e)}function Op(e,t,i,s,u,h,y,v,M,B,V,W,q,G){if(e.timeoutHandle=-1,W=t.subtreeFlags,W&8192||(W&16785408)===16785408){W={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ea},Np(t,h,W);var fe=(h&62914560)===h?Hr-yt():(h&4194048)===h?Tp-yt():0;if(fe=EC(W,fe),fe!==null){pa=h,e.cancelPendingCommit=fe(Hp.bind(null,e,t,h,i,s,u,y,v,M,V,W,null,q,G)),Fa(e,h,y,!B);return}}Hp(e,t,h,i,s,u,y,v,M)}function Y0(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var u=i[s],h=u.getSnapshot;u=u.value;try{if(!an(h(),u))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;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 Fa(e,t,i,s){t&=~Tu,t&=~vi,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var u=t;0<u;){var h=31-Se(u),y=1<<h;s[h]=-1,u&=~y}i!==0&&ai(e,i,t)}function qr(){return(Qe&6)===0?(hs(0),!1):!0}function Pu(){if(Ie!==null){if(Ze===0)var e=Ie.return;else e=Ie,ia=di=null,Wc(e),eo=null,Wo=0,e=Ie;for(;e!==null;)cp(e.alternate,e),e=e.return;Ie=null}}function uo(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,hC(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),pa=0,Pu(),it=e,Ie=i=na(e.current,null),Be=t,Ze=0,ln=null,Ha=!1,ro=Ht(e,t),Du=!1,lo=cn=Tu=vi=Ba=pt=0,Wt=ds=null,ju=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var u=31-Se(s),h=1<<u;t|=e[u],s&=~h}return ma=t,ur(),i}function Pp(e,t){Me=null,U.H=as,t===Ji||t===br?(t=Wh(),Ze=3):t===zc?(t=Wh(),Ze=4):Ze=t===du?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ln=t,Ie===null&&(pt=1,Or(e,bn(t,e.current)))}function Lp(){var e=sn.current;return e===null?!0:(Be&4194048)===Be?Sn===null:(Be&62914560)===Be||(Be&536870912)!==0?e===Sn:!1}function Rp(){var e=U.H;return U.H=as,e===null?as:e}function _p(){var e=U.A;return U.A=G0,e}function Fr(){pt=4,Ha||(Be&4194048)!==Be&&sn.current!==null||(ro=!0),(Ba&134217727)===0&&(vi&134217727)===0||it===null||Fa(it,Be,cn,!1)}function Lu(e,t,i){var s=Qe;Qe|=2;var u=Rp(),h=_p();(it!==e||Be!==t)&&(Kr=null,uo(e,t)),t=!1;var y=pt;e:do try{if(Ze!==0&&Ie!==null){var v=Ie,M=ln;switch(Ze){case 8:Pu(),y=6;break e;case 3:case 2:case 9:case 6:sn.current===null&&(t=!0);var B=Ze;if(Ze=0,ln=null,fo(e,v,M,B),i&&ro){y=0;break e}break;default:B=Ze,Ze=0,ln=null,fo(e,v,M,B)}}$0(),y=pt;break}catch(V){Pp(e,V)}while(!0);return t&&e.shellSuspendCounter++,ia=di=null,Qe=s,U.H=u,U.A=h,Ie===null&&(it=null,Be=0,ur()),y}function $0(){for(;Ie!==null;)zp(Ie)}function W0(e,t){var i=Qe;Qe|=2;var s=Rp(),u=_p();it!==e||Be!==t?(Kr=null,Br=yt()+500,uo(e,t)):ro=Ht(e,t);e:do try{if(Ze!==0&&Ie!==null){t=Ie;var h=ln;t:switch(Ze){case 1:Ze=0,ln=null,fo(e,t,h,1);break;case 2:case 9:if(Yh(h)){Ze=0,ln=null,Ip(t);break}t=function(){Ze!==2&&Ze!==9||it!==e||(Ze=7),Un(e)},h.then(t,t);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:Yh(h)?(Ze=0,ln=null,Ip(t)):(Ze=0,ln=null,fo(e,t,h,7));break;case 5:var y=null;switch(Ie.tag){case 26:y=Ie.memoizedState;case 5:case 27:var v=Ie;if(y?wg(y):v.stateNode.complete){Ze=0,ln=null;var M=v.sibling;if(M!==null)Ie=M;else{var B=v.return;B!==null?(Ie=B,Gr(B)):Ie=null}break t}}Ze=0,ln=null,fo(e,t,h,5);break;case 6:Ze=0,ln=null,fo(e,t,h,6);break;case 8:Pu(),pt=6;break e;default:throw Error(r(462))}}Q0();break}catch(V){Pp(e,V)}while(!0);return ia=di=null,U.H=s,U.A=u,Qe=i,Ie!==null?0:(it=null,Be=0,ur(),pt)}function Q0(){for(;Ie!==null&&!Da();)zp(Ie)}function zp(e){var t=rp(e.alternate,e,ma);e.memoizedProps=e.pendingProps,t===null?Gr(e):Ie=t}function Ip(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=tp(i,t,t.pendingProps,t.type,void 0,Be);break;case 11:t=tp(i,t,t.pendingProps,t.type.render,t.ref,Be);break;case 5:Wc(t);default:cp(i,t),t=Ie=_h(t,ma),t=rp(i,t,ma)}e.memoizedProps=e.pendingProps,t===null?Gr(e):Ie=t}function fo(e,t,i,s){ia=di=null,Wc(t),eo=null,Wo=0;var u=t.return;try{if(I0(e,u,t,i,Be)){pt=1,Or(e,bn(i,e.current)),Ie=null;return}}catch(h){if(u!==null)throw Ie=u,h;pt=1,Or(e,bn(i,e.current)),Ie=null;return}t.flags&32768?(qe||s===1?e=!0:ro||(Be&536870912)!==0?e=!1:(Ha=e=!0,(s===2||s===9||s===3||s===6)&&(s=sn.current,s!==null&&s.tag===13&&(s.flags|=16384))),Up(t,e)):Gr(t)}function Gr(e){var t=e;do{if((t.flags&32768)!==0){Up(t,Ha);return}e=t.return;var i=B0(t.alternate,t,ma);if(i!==null){Ie=i;return}if(t=t.sibling,t!==null){Ie=t;return}Ie=t=e}while(t!==null);pt===0&&(pt=5)}function Up(e,t){do{var i=K0(e.alternate,e);if(i!==null){i.flags&=32767,Ie=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Ie=e;return}Ie=e=i}while(e!==null);pt=6,Ie=null}function Hp(e,t,i,s,u,h,y,v,M){e.cancelPendingCommit=null;do Vr();while(At!==0);if((Qe&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(h=t.lanes|t.childLanes,h|=Sc,Mo(e,i,h,y,v,M),e===it&&(Ie=it=null,Be=0),co=t,qa=e,pa=i,Mu=h,Eu=u,jp=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,eC(Ln,function(){return Gp(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=U.T,U.T=null,u=Z.p,Z.p=2,y=Qe,Qe|=4;try{q0(e,t,i)}finally{Qe=y,Z.p=u,U.T=s}}At=1,Bp(),Kp(),qp()}}function Bp(){if(At===1){At=0;var e=qa,t=co,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=U.T,U.T=null;var s=Z.p;Z.p=2;var u=Qe;Qe|=4;try{Cp(t,e);var h=Vu,y=Dh(e.containerInfo),v=h.focusedElem,M=h.selectionRange;if(y!==v&&v&&v.ownerDocument&&Ah(v.ownerDocument.documentElement,v)){if(M!==null&&yc(v)){var B=M.start,V=M.end;if(V===void 0&&(V=B),"selectionStart"in v)v.selectionStart=B,v.selectionEnd=Math.min(V,v.value.length);else{var W=v.ownerDocument||document,q=W&&W.defaultView||window;if(q.getSelection){var G=q.getSelection(),fe=v.textContent.length,Ne=Math.min(M.start,fe),nt=M.end===void 0?Ne:Math.min(M.end,fe);!G.extend&&Ne>nt&&(y=nt,nt=Ne,Ne=y);var _=kh(v,Ne),P=kh(v,nt);if(_&&P&&(G.rangeCount!==1||G.anchorNode!==_.node||G.anchorOffset!==_.offset||G.focusNode!==P.node||G.focusOffset!==P.offset)){var H=W.createRange();H.setStart(_.node,_.offset),G.removeAllRanges(),Ne>nt?(G.addRange(H),G.extend(P.node,P.offset)):(H.setEnd(P.node,P.offset),G.addRange(H))}}}}for(W=[],G=v;G=G.parentNode;)G.nodeType===1&&W.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<W.length;v++){var Y=W[v];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}il=!!Gu,Vu=Gu=null}finally{Qe=u,Z.p=s,U.T=i}}e.current=t,At=2}}function Kp(){if(At===2){At=0;var e=qa,t=co,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=U.T,U.T=null;var s=Z.p;Z.p=2;var u=Qe;Qe|=4;try{gp(e,t.alternate,t)}finally{Qe=u,Z.p=s,U.T=i}}At=3}}function qp(){if(At===4||At===3){At=0,$n();var e=qa,t=co,i=pa,s=jp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?At=5:(At=0,co=qa=null,Fp(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Ka=null),Oi(i),t=t.stateNode,J&&typeof J.onCommitFiberRoot=="function")try{J.onCommitFiberRoot(Qn,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=U.T,u=Z.p,Z.p=2,U.T=null;try{for(var h=e.onRecoverableError,y=0;y<s.length;y++){var v=s[y];h(v.value,{componentStack:v.stack})}}finally{U.T=t,Z.p=u}}(pa&3)!==0&&Vr(),Un(e),u=e.pendingLanes,(i&261930)!==0&&(u&42)!==0?e===Ou?fs++:(fs=0,Ou=e):fs=0,hs(0)}}function Fp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Yo(t)))}function Vr(){return Bp(),Kp(),qp(),Gp()}function Gp(){if(At!==5)return!1;var e=qa,t=Mu;Mu=0;var i=Oi(pa),s=U.T,u=Z.p;try{Z.p=32>i?32:i,U.T=null,i=Eu,Eu=null;var h=qa,y=pa;if(At=0,co=qa=null,pa=0,(Qe&6)!==0)throw Error(r(331));var v=Qe;if(Qe|=4,Ap(h.current),wp(h,h.current,y,i),Qe=v,hs(0,!1),J&&typeof J.onPostCommitFiberRoot=="function")try{J.onPostCommitFiberRoot(Qn,h)}catch{}return!0}finally{Z.p=u,U.T=s,Fp(e,t)}}function Vp(e,t,i){t=bn(i,t),t=uu(e.stateNode,t,2),e=_a(e,t,2),e!==null&&(An(e,2),Un(e))}function Je(e,t,i){if(e.tag===3)Vp(e,e,i);else for(;t!==null;){if(t.tag===3){Vp(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ka===null||!Ka.has(s))){e=bn(i,e),i=Ym(2),s=_a(t,i,2),s!==null&&($m(i,s,t,e),An(s,2),Un(s));break}}t=t.return}}function Ru(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new V0;var u=new Set;s.set(t,u)}else u=s.get(t),u===void 0&&(u=new Set,s.set(t,u));u.has(i)||(Du=!0,u.add(i),e=X0.bind(null,e,t,i),t.then(e,e))}function X0(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,it===e&&(Be&i)===i&&(pt===4||pt===3&&(Be&62914560)===Be&&300>yt()-Hr?(Qe&2)===0&&uo(e,0):Tu|=i,lo===Be&&(lo=0)),Un(e)}function Yp(e,t){t===0&&(t=Tt()),e=li(e,t),e!==null&&(An(e,t),Un(e))}function Z0(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Yp(e,i)}function J0(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,u=e.memoizedState;u!==null&&(i=u.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(t),Yp(e,i)}function eC(e,t){return Pn(e,t)}var Yr=null,ho=null,_u=!1,$r=!1,zu=!1,Ga=0;function Un(e){e!==ho&&e.next===null&&(ho===null?Yr=ho=e:ho=ho.next=e),$r=!0,_u||(_u=!0,nC())}function hs(e,t){if(!zu&&$r){zu=!0;do for(var i=!1,s=Yr;s!==null;){if(e!==0){var u=s.pendingLanes;if(u===0)var h=0;else{var y=s.suspendedLanes,v=s.pingedLanes;h=(1<<31-Se(42|e)+1)-1,h&=u&~(y&~v),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(i=!0,Xp(s,h))}else h=Be,h=ke(s,s===it?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(h&3)===0||Ht(s,h)||(i=!0,Xp(s,h));s=s.next}while(i);zu=!1}}function tC(){$p()}function $p(){$r=_u=!1;var e=0;Ga!==0&&fC()&&(e=Ga);for(var t=yt(),i=null,s=Yr;s!==null;){var u=s.next,h=Wp(s,t);h===0?(s.next=null,i===null?Yr=u:i.next=u,u===null&&(ho=i)):(i=s,(e!==0||(h&3)!==0)&&($r=!0)),s=u}At!==0&&At!==5||hs(e),Ga!==0&&(Ga=0)}function Wp(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,u=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var y=31-Se(h),v=1<<y,M=u[y];M===-1?((v&i)===0||(v&s)!==0)&&(u[y]=Xn(v,t)):M<=t&&(e.expiredLanes|=v),h&=~v}if(t=it,i=Be,i=ke(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&en(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ht(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&en(s),Oi(i)){case 2:case 8:i=ni;break;case 32:i=Ln;break;case 268435456:i=Ei;break;default:i=Ln}return s=Qp.bind(null,e),i=Pn(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&en(s),e.callbackPriority=2,e.callbackNode=null,2}function Qp(e,t){if(At!==0&&At!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Vr()&&e.callbackNode!==i)return null;var s=Be;return s=ke(e,e===it?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Ep(e,s,t),Wp(e,yt()),e.callbackNode!=null&&e.callbackNode===i?Qp.bind(null,e):null)}function Xp(e,t){if(Vr())return null;Ep(e,t,!0)}function nC(){mC(function(){(Qe&6)!==0?Pn(Wn,tC):$p()})}function Iu(){if(Ga===0){var e=Xi;e===0&&(e=Te,Te<<=1,(Te&261888)===0&&(Te=256)),Ga=e}return Ga}function Zp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:nr(""+e)}function Jp(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function aC(e,t,i,s,u){if(t==="submit"&&i&&i.stateNode===u){var h=Zp((u[Ft]||null).action),y=s.submitter;y&&(t=(t=y[Ft]||null)?Zp(t.formAction):y.getAttribute("formAction"),t!==null&&(h=t,y=null));var v=new sr("action","action",null,s,u);e.push({event:v,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ga!==0){var M=y?Jp(u,y):new FormData(u);iu(i,{pending:!0,data:M,method:u.method,action:h},null,M)}}else typeof h=="function"&&(v.preventDefault(),M=y?Jp(u,y):new FormData(u),iu(i,{pending:!0,data:M,method:u.method,action:h},h,M))},currentTarget:u}]})}}for(var Uu=0;Uu<Cc.length;Uu++){var Hu=Cc[Uu],iC=Hu.toLowerCase(),oC=Hu[0].toUpperCase()+Hu.slice(1);Dn(iC,"on"+oC)}Dn(Mh,"onAnimationEnd"),Dn(Eh,"onAnimationIteration"),Dn(Oh,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(C0,"onTransitionRun"),Dn(S0,"onTransitionStart"),Dn(w0,"onTransitionCancel"),Dn(Ph,"onTransitionEnd"),zi("onMouseEnter",["mouseout","mouseover"]),zi("onMouseLeave",["mouseout","mouseover"]),zi("onPointerEnter",["pointerout","pointerover"]),zi("onPointerLeave",["pointerout","pointerover"]),ii("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ii("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ii("onBeforeInput",["compositionend","keypress","textInput","paste"]),ii("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ii("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ii("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ms="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(" "),sC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ms));function eg(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],u=s.event;s=s.listeners;e:{var h=void 0;if(t)for(var y=s.length-1;0<=y;y--){var v=s[y],M=v.instance,B=v.currentTarget;if(v=v.listener,M!==h&&u.isPropagationStopped())break e;h=v,u.currentTarget=B;try{h(u)}catch(V){cr(V)}u.currentTarget=null,h=M}else for(y=0;y<s.length;y++){if(v=s[y],M=v.instance,B=v.currentTarget,v=v.listener,M!==h&&u.isPropagationStopped())break e;h=v,u.currentTarget=B;try{h(u)}catch(V){cr(V)}u.currentTarget=null,h=M}}}}function Ue(e,t){var i=t[Jl];i===void 0&&(i=t[Jl]=new Set);var s=e+"__bubble";i.has(s)||(tg(t,e,2,!1),i.add(s))}function Bu(e,t,i){var s=0;t&&(s|=4),tg(i,e,s,t)}var Wr="_reactListening"+Math.random().toString(36).slice(2);function Ku(e){if(!e[Wr]){e[Wr]=!0,$f.forEach(function(i){i!=="selectionchange"&&(sC.has(i)||Bu(i,!1,e),Bu(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wr]||(t[Wr]=!0,Bu("selectionchange",!1,t))}}function tg(e,t,i,s){switch(Mg(t)){case 2:var u=LC;break;case 8:u=RC;break;default:u=ad}i=u.bind(null,t,i,e),u=void 0,!lc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),s?u!==void 0?e.addEventListener(t,i,{capture:!0,passive:u}):e.addEventListener(t,i,!0):u!==void 0?e.addEventListener(t,i,{passive:u}):e.addEventListener(t,i,!1)}function qu(e,t,i,s,u){var h=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var y=s.tag;if(y===3||y===4){var v=s.stateNode.containerInfo;if(v===u)break;if(y===4)for(y=s.return;y!==null;){var M=y.tag;if((M===3||M===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;v!==null;){if(y=Li(v),y===null)return;if(M=y.tag,M===5||M===6||M===26||M===27){s=h=y;continue e}v=v.parentNode}}s=s.return}sh(function(){var B=h,V=sc(i),W=[];e:{var q=Lh.get(e);if(q!==void 0){var G=sr,fe=e;switch(e){case"keypress":if(ir(i)===0)break e;case"keydown":case"keyup":G=Jv;break;case"focusin":fe="focus",G=fc;break;case"focusout":fe="blur",G=fc;break;case"beforeblur":case"afterblur":G=fc;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":G=ch;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":G=Bv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":G=n0;break;case Mh:case Eh:case Oh:G=Fv;break;case Ph:G=i0;break;case"scroll":case"scrollend":G=Uv;break;case"wheel":G=s0;break;case"copy":case"cut":case"paste":G=Vv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":G=dh;break;case"toggle":case"beforetoggle":G=l0}var Ne=(t&4)!==0,nt=!Ne&&(e==="scroll"||e==="scrollend"),_=Ne?q!==null?q+"Capture":null:q;Ne=[];for(var P=B,H;P!==null;){var Y=P;if(H=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||H===null||_===null||(Y=_o(P,_),Y!=null&&Ne.push(ps(P,Y,H))),nt)break;P=P.return}0<Ne.length&&(q=new G(q,fe,null,i,V),W.push({event:q,listeners:Ne}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",G=e==="mouseout"||e==="pointerout",q&&i!==oc&&(fe=i.relatedTarget||i.fromElement)&&(Li(fe)||fe[Pi]))break e;if((G||q)&&(q=V.window===V?V:(q=V.ownerDocument)?q.defaultView||q.parentWindow:window,G?(fe=i.relatedTarget||i.toElement,G=B,fe=fe?Li(fe):null,fe!==null&&(nt=d(fe),Ne=fe.tag,fe!==nt||Ne!==5&&Ne!==27&&Ne!==6)&&(fe=null)):(G=null,fe=B),G!==fe)){if(Ne=ch,Y="onMouseLeave",_="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(Ne=dh,Y="onPointerLeave",_="onPointerEnter",P="pointer"),nt=G==null?q:Ro(G),H=fe==null?q:Ro(fe),q=new Ne(Y,P+"leave",G,i,V),q.target=nt,q.relatedTarget=H,Y=null,Li(V)===B&&(Ne=new Ne(_,P+"enter",fe,i,V),Ne.target=H,Ne.relatedTarget=nt,Y=Ne),nt=Y,G&&fe)t:{for(Ne=rC,_=G,P=fe,H=0,Y=_;Y;Y=Ne(Y))H++;Y=0;for(var xe=P;xe;xe=Ne(xe))Y++;for(;0<H-Y;)_=Ne(_),H--;for(;0<Y-H;)P=Ne(P),Y--;for(;H--;){if(_===P||P!==null&&_===P.alternate){Ne=_;break t}_=Ne(_),P=Ne(P)}Ne=null}else Ne=null;G!==null&&ng(W,q,G,Ne,!1),fe!==null&&nt!==null&&ng(W,nt,fe,Ne,!0)}}e:{if(q=B?Ro(B):window,G=q.nodeName&&q.nodeName.toLowerCase(),G==="select"||G==="input"&&q.type==="file")var Ye=xh;else if(yh(q))if(vh)Ye=b0;else{Ye=g0;var me=p0}else G=q.nodeName,!G||G.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?B&&ic(B.elementType)&&(Ye=xh):Ye=y0;if(Ye&&(Ye=Ye(e,B))){bh(W,Ye,i,V);break e}me&&me(e,q,B),e==="focusout"&&B&&q.type==="number"&&B.memoizedProps.value!=null&&ac(q,"number",q.value)}switch(me=B?Ro(B):window,e){case"focusin":(yh(me)||me.contentEditable==="true")&&(qi=me,bc=B,Fo=null);break;case"focusout":Fo=bc=qi=null;break;case"mousedown":xc=!0;break;case"contextmenu":case"mouseup":case"dragend":xc=!1,Th(W,i,V);break;case"selectionchange":if(v0)break;case"keydown":case"keyup":Th(W,i,V)}var Ee;if(mc)e:{switch(e){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Ki?ph(e,i)&&(Ke="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ke="onCompositionStart");Ke&&(fh&&i.locale!=="ko"&&(Ki||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Ki&&(Ee=rh()):(ja=V,cc="value"in ja?ja.value:ja.textContent,Ki=!0)),me=Qr(B,Ke),0<me.length&&(Ke=new uh(Ke,e,null,i,V),W.push({event:Ke,listeners:me}),Ee?Ke.data=Ee:(Ee=gh(i),Ee!==null&&(Ke.data=Ee)))),(Ee=u0?d0(e,i):f0(e,i))&&(Ke=Qr(B,"onBeforeInput"),0<Ke.length&&(me=new uh("onBeforeInput","beforeinput",null,i,V),W.push({event:me,listeners:Ke}),me.data=Ee)),aC(W,e,B,i,V)}eg(W,t)})}function ps(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Qr(e,t){for(var i=t+"Capture",s=[];e!==null;){var u=e,h=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||h===null||(u=_o(e,i),u!=null&&s.unshift(ps(e,u,h)),u=_o(e,t),u!=null&&s.push(ps(e,u,h))),e.tag===3)return s;e=e.return}return[]}function rC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ng(e,t,i,s,u){for(var h=t._reactName,y=[];i!==null&&i!==s;){var v=i,M=v.alternate,B=v.stateNode;if(v=v.tag,M!==null&&M===s)break;v!==5&&v!==26&&v!==27||B===null||(M=B,u?(B=_o(i,h),B!=null&&y.unshift(ps(i,B,M))):u||(B=_o(i,h),B!=null&&y.push(ps(i,B,M)))),i=i.return}y.length!==0&&e.push({event:t,listeners:y})}var lC=/\r\n?/g,cC=/\u0000|\uFFFD/g;function ag(e){return(typeof e=="string"?e:""+e).replace(lC,`
|
|
10
|
-
`).replace(cC,"")}function ig(e,t){return t=ag(t),ag(e)===t}function tt(e,t,i,s,u,h){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Ui(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Ui(e,""+s);break;case"className":er(e,"class",s);break;case"tabIndex":er(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":er(e,i,s);break;case"style":ih(e,s,h);break;case"data":if(t!=="object"){er(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=nr(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"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 h=="function"&&(i==="formAction"?(t!=="input"&&tt(e,t,"name",u.name,u,null),tt(e,t,"formEncType",u.formEncType,u,null),tt(e,t,"formMethod",u.formMethod,u,null),tt(e,t,"formTarget",u.formTarget,u,null)):(tt(e,t,"encType",u.encType,u,null),tt(e,t,"method",u.method,u,null),tt(e,t,"target",u.target,u,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=nr(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=ea);break;case"onScroll":s!=null&&Ue("scroll",e);break;case"onScrollEnd":s!=null&&Ue("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(i=s.__html,i!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=nr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":Ue("beforetoggle",e),Ue("toggle",e),Js(e,"popover",s);break;case"xlinkActuate":Jn(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Jn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Jn(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Jn(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Jn(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Jn(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Jn(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Jn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Jn(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Js(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=zv.get(i)||i,Js(e,i,s))}}function Fu(e,t,i,s,u,h){switch(i){case"style":ih(e,s,h);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(i=s.__html,i!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Ui(e,s):(typeof s=="number"||typeof s=="bigint")&&Ui(e,""+s);break;case"onScroll":s!=null&&Ue("scroll",e);break;case"onScrollEnd":s!=null&&Ue("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ea);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wf.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(u=i.endsWith("Capture"),t=i.slice(2,u?i.length-7:void 0),h=e[Ft]||null,h=h!=null?h[i]:null,typeof h=="function"&&e.removeEventListener(t,h,u),typeof s=="function")){typeof h!="function"&&h!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,u);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Js(e,i,s)}}}function zt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",e),Ue("load",e);var s=!1,u=!1,h;for(h in i)if(i.hasOwnProperty(h)){var y=i[h];if(y!=null)switch(h){case"src":s=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:tt(e,t,h,y,i,null)}}u&&tt(e,t,"srcSet",i.srcSet,i,null),s&&tt(e,t,"src",i.src,i,null);return;case"input":Ue("invalid",e);var v=h=y=u=null,M=null,B=null;for(s in i)if(i.hasOwnProperty(s)){var V=i[s];if(V!=null)switch(s){case"name":u=V;break;case"type":y=V;break;case"checked":M=V;break;case"defaultChecked":B=V;break;case"value":h=V;break;case"defaultValue":v=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,t));break;default:tt(e,t,s,V,i,null)}}eh(e,h,v,M,B,y,u,!1);return;case"select":Ue("invalid",e),s=y=h=null;for(u in i)if(i.hasOwnProperty(u)&&(v=i[u],v!=null))switch(u){case"value":h=v;break;case"defaultValue":y=v;break;case"multiple":s=v;default:tt(e,t,u,v,i,null)}t=h,i=y,e.multiple=!!s,t!=null?Ii(e,!!s,t,!1):i!=null&&Ii(e,!!s,i,!0);return;case"textarea":Ue("invalid",e),h=u=s=null;for(y in i)if(i.hasOwnProperty(y)&&(v=i[y],v!=null))switch(y){case"value":s=v;break;case"defaultValue":u=v;break;case"children":h=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:tt(e,t,y,v,i,null)}nh(e,s,u,h);return;case"option":for(M in i)if(i.hasOwnProperty(M)&&(s=i[M],s!=null))switch(M){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:tt(e,t,M,s,i,null)}return;case"dialog":Ue("beforetoggle",e),Ue("toggle",e),Ue("cancel",e),Ue("close",e);break;case"iframe":case"object":Ue("load",e);break;case"video":case"audio":for(s=0;s<ms.length;s++)Ue(ms[s],e);break;case"image":Ue("error",e),Ue("load",e);break;case"details":Ue("toggle",e);break;case"embed":case"source":case"link":Ue("error",e),Ue("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(B in i)if(i.hasOwnProperty(B)&&(s=i[B],s!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:tt(e,t,B,s,i,null)}return;default:if(ic(t)){for(V in i)i.hasOwnProperty(V)&&(s=i[V],s!==void 0&&Fu(e,t,V,s,i,void 0));return}}for(v in i)i.hasOwnProperty(v)&&(s=i[v],s!=null&&tt(e,t,v,s,i,null))}function uC(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,h=null,y=null,v=null,M=null,B=null,V=null;for(G in i){var W=i[G];if(i.hasOwnProperty(G)&&W!=null)switch(G){case"checked":break;case"value":break;case"defaultValue":M=W;default:s.hasOwnProperty(G)||tt(e,t,G,null,s,W)}}for(var q in s){var G=s[q];if(W=i[q],s.hasOwnProperty(q)&&(G!=null||W!=null))switch(q){case"type":h=G;break;case"name":u=G;break;case"checked":B=G;break;case"defaultChecked":V=G;break;case"value":y=G;break;case"defaultValue":v=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,t));break;default:G!==W&&tt(e,t,q,G,s,W)}}nc(e,y,v,M,B,V,h,u);return;case"select":G=y=v=q=null;for(h in i)if(M=i[h],i.hasOwnProperty(h)&&M!=null)switch(h){case"value":break;case"multiple":G=M;default:s.hasOwnProperty(h)||tt(e,t,h,null,s,M)}for(u in s)if(h=s[u],M=i[u],s.hasOwnProperty(u)&&(h!=null||M!=null))switch(u){case"value":q=h;break;case"defaultValue":v=h;break;case"multiple":y=h;default:h!==M&&tt(e,t,u,h,s,M)}t=v,i=y,s=G,q!=null?Ii(e,!!i,q,!1):!!s!=!!i&&(t!=null?Ii(e,!!i,t,!0):Ii(e,!!i,i?[]:"",!1));return;case"textarea":G=q=null;for(v in i)if(u=i[v],i.hasOwnProperty(v)&&u!=null&&!s.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:tt(e,t,v,null,s,u)}for(y in s)if(u=s[y],h=i[y],s.hasOwnProperty(y)&&(u!=null||h!=null))switch(y){case"value":q=u;break;case"defaultValue":G=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==h&&tt(e,t,y,u,s,h)}th(e,q,G);return;case"option":for(var fe in i)if(q=i[fe],i.hasOwnProperty(fe)&&q!=null&&!s.hasOwnProperty(fe))switch(fe){case"selected":e.selected=!1;break;default:tt(e,t,fe,null,s,q)}for(M in s)if(q=s[M],G=i[M],s.hasOwnProperty(M)&&q!==G&&(q!=null||G!=null))switch(M){case"selected":e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:tt(e,t,M,q,s,G)}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 Ne in i)q=i[Ne],i.hasOwnProperty(Ne)&&q!=null&&!s.hasOwnProperty(Ne)&&tt(e,t,Ne,null,s,q);for(B in s)if(q=s[B],G=i[B],s.hasOwnProperty(B)&&q!==G&&(q!=null||G!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:tt(e,t,B,q,s,G)}return;default:if(ic(t)){for(var nt in i)q=i[nt],i.hasOwnProperty(nt)&&q!==void 0&&!s.hasOwnProperty(nt)&&Fu(e,t,nt,void 0,s,q);for(V in s)q=s[V],G=i[V],!s.hasOwnProperty(V)||q===G||q===void 0&&G===void 0||Fu(e,t,V,q,s,G);return}}for(var _ in i)q=i[_],i.hasOwnProperty(_)&&q!=null&&!s.hasOwnProperty(_)&&tt(e,t,_,null,s,q);for(W in s)q=s[W],G=i[W],!s.hasOwnProperty(W)||q===G||q==null&&G==null||tt(e,t,W,q,s,G)}function og(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dC(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var u=i[s],h=u.transferSize,y=u.initiatorType,v=u.duration;if(h&&v&&og(y)){for(y=0,v=u.responseEnd,s+=1;s<i.length;s++){var M=i[s],B=M.startTime;if(B>v)break;var V=M.transferSize,W=M.initiatorType;V&&og(W)&&(M=M.responseEnd,y+=V*(M<v?1:(v-B)/(M-B)))}if(--s,t+=8*(h+y)/(u.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 Gu=null,Vu=null;function Xr(e){return e.nodeType===9?e:e.ownerDocument}function sg(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 rg(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 Yu(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 $u=null;function fC(){var e=window.event;return e&&e.type==="popstate"?e===$u?!1:($u=e,!0):($u=null,!1)}var lg=typeof setTimeout=="function"?setTimeout:void 0,hC=typeof clearTimeout=="function"?clearTimeout:void 0,cg=typeof Promise=="function"?Promise:void 0,mC=typeof queueMicrotask=="function"?queueMicrotask:typeof cg<"u"?function(e){return cg.resolve(null).then(e).catch(pC)}:lg;function pC(e){setTimeout(function(){throw e})}function Va(e){return e==="head"}function ug(e,t){var i=t,s=0;do{var u=i.nextSibling;if(e.removeChild(i),u&&u.nodeType===8)if(i=u.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(u),yo(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")gs(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,gs(i);for(var h=i.firstChild;h;){var y=h.nextSibling,v=h.nodeName;h[Lo]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&h.rel.toLowerCase()==="stylesheet"||i.removeChild(h),h=y}}else i==="body"&&gs(e.ownerDocument.body);i=u}while(i);yo(t)}function dg(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function Wu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Wu(i),ec(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function gC(e,t,i,s){for(;e.nodeType===1;){var u=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Lo])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var h=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=wn(e.nextSibling),e===null)break}return null}function yC(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=wn(e.nextSibling),e===null))return null;return e}function fg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=wn(e.nextSibling),e===null))return null;return e}function Qu(e){return e.data==="$?"||e.data==="$~"}function Xu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function bC(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function wn(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 Zu=null;function hg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return wn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function mg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function pg(e,t,i){switch(t=Xr(i),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function gs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ec(e)}var Nn=new Map,gg=new Set;function Zr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ga=Z.d;Z.d={f:xC,r:vC,D:CC,C:SC,L:wC,m:NC,X:AC,S:kC,M:DC};function xC(){var e=ga.f(),t=qr();return e||t}function vC(e){var t=Ri(e);t!==null&&t.tag===5&&t.type==="form"?Pm(t):ga.r(e)}var mo=typeof document>"u"?null:document;function yg(e,t,i){var s=mo;if(s&&typeof t=="string"&&t){var u=gn(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof i=="string"&&(u+='[crossorigin="'+i+'"]'),gg.has(u)||(gg.add(u),e={rel:e,crossOrigin:i,href:t},s.querySelector(u)===null&&(t=s.createElement("link"),zt(t,"link",e),jt(t),s.head.appendChild(t)))}}function CC(e){ga.D(e),yg("dns-prefetch",e,null)}function SC(e,t){ga.C(e,t),yg("preconnect",e,t)}function wC(e,t,i){ga.L(e,t,i);var s=mo;if(s&&e&&t){var u='link[rel="preload"][as="'+gn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(u+='[imagesrcset="'+gn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(u+='[imagesizes="'+gn(i.imageSizes)+'"]')):u+='[href="'+gn(e)+'"]';var h=u;switch(t){case"style":h=po(e);break;case"script":h=go(e)}Nn.has(h)||(e=b({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Nn.set(h,e),s.querySelector(u)!==null||t==="style"&&s.querySelector(ys(h))||t==="script"&&s.querySelector(bs(h))||(t=s.createElement("link"),zt(t,"link",e),jt(t),s.head.appendChild(t)))}}function NC(e,t){ga.m(e,t);var i=mo;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+gn(s)+'"][href="'+gn(e)+'"]',h=u;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=go(e)}if(!Nn.has(h)&&(e=b({rel:"modulepreload",href:e},t),Nn.set(h,e),i.querySelector(u)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(bs(h)))return}s=i.createElement("link"),zt(s,"link",e),jt(s),i.head.appendChild(s)}}}function kC(e,t,i){ga.S(e,t,i);var s=mo;if(s&&e){var u=_i(s).hoistableStyles,h=po(e);t=t||"default";var y=u.get(h);if(!y){var v={loading:0,preload:null};if(y=s.querySelector(ys(h)))v.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Nn.get(h))&&Ju(e,i);var M=y=s.createElement("link");jt(M),zt(M,"link",e),M._p=new Promise(function(B,V){M.onload=B,M.onerror=V}),M.addEventListener("load",function(){v.loading|=1}),M.addEventListener("error",function(){v.loading|=2}),v.loading|=4,Jr(y,t,s)}y={type:"stylesheet",instance:y,count:1,state:v},u.set(h,y)}}}function AC(e,t){ga.X(e,t);var i=mo;if(i&&e){var s=_i(i).hoistableScripts,u=go(e),h=s.get(u);h||(h=i.querySelector(bs(u)),h||(e=b({src:e,async:!0},t),(t=Nn.get(u))&&ed(e,t),h=i.createElement("script"),jt(h),zt(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(u,h))}}function DC(e,t){ga.M(e,t);var i=mo;if(i&&e){var s=_i(i).hoistableScripts,u=go(e),h=s.get(u);h||(h=i.querySelector(bs(u)),h||(e=b({src:e,async:!0,type:"module"},t),(t=Nn.get(u))&&ed(e,t),h=i.createElement("script"),jt(h),zt(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(u,h))}}function bg(e,t,i,s){var u=(u=ie.current)?Zr(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=po(i.href),i=_i(u).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=po(i.href);var h=_i(u).hoistableStyles,y=h.get(e);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,y),(h=u.querySelector(ys(e)))&&!h._p&&(y.instance=h,y.state.loading=5),Nn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Nn.set(e,i),h||TC(u,e,i,y.state))),t&&s===null)throw Error(r(528,""));return y}if(t&&s!==null)throw Error(r(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=go(i),i=_i(u).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function po(e){return'href="'+gn(e)+'"'}function ys(e){return'link[rel="stylesheet"]['+e+"]"}function xg(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function TC(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),zt(t,"link",i),jt(t),e.head.appendChild(t))}function go(e){return'[src="'+gn(e)+'"]'}function bs(e){return"script[async]"+e}function vg(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+gn(i.href)+'"]');if(s)return t.instance=s,jt(s),s;var u=b({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),jt(s),zt(s,"style",u),Jr(s,i.precedence,e),t.instance=s;case"stylesheet":u=po(i.href);var h=e.querySelector(ys(u));if(h)return t.state.loading|=4,t.instance=h,jt(h),h;s=xg(i),(u=Nn.get(u))&&Ju(s,u),h=(e.ownerDocument||e).createElement("link"),jt(h);var y=h;return y._p=new Promise(function(v,M){y.onload=v,y.onerror=M}),zt(h,"link",s),t.state.loading|=4,Jr(h,i.precedence,e),t.instance=h;case"script":return h=go(i.src),(u=e.querySelector(bs(h)))?(t.instance=u,jt(u),u):(s=i,(u=Nn.get(h))&&(s=b({},i),ed(s,u)),e=e.ownerDocument||e,u=e.createElement("script"),jt(u),zt(u,"link",s),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Jr(s,i.precedence,e));return t.instance}function Jr(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=s.length?s[s.length-1]:null,h=u,y=0;y<s.length;y++){var v=s[y];if(v.dataset.precedence===t)h=v;else if(h!==u)break}h?h.parentNode.insertBefore(e,h.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Ju(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ed(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var el=null;function Cg(e,t,i){if(el===null){var s=new Map,u=el=new Map;u.set(i,s)}else u=el,s=u.get(i),s||(s=new Map,u.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),u=0;u<i.length;u++){var h=i[u];if(!(h[Lo]||h[Pt]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var y=h.getAttribute(t)||"";y=e+y;var v=s.get(y);v?v.push(h):s.set(y,[h])}}return s}function Sg(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function jC(e,t,i){if(i===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 wg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function MC(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var u=po(s.href),h=t.querySelector(ys(u));if(h){t=h._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=tl.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=h,jt(h);return}h=t.ownerDocument||t,s=xg(s),(u=Nn.get(u))&&Ju(s,u),h=h.createElement("link"),jt(h);var y=h;y._p=new Promise(function(v,M){y.onload=v,y.onerror=M}),zt(h,"link",s),i.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=tl.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var td=0;function EC(e,t){return e.stylesheets&&e.count===0&&al(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&al(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+t);0<e.imgBytes&&td===0&&(td=62500*dC());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&al(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>td?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(u)}}:null}function tl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)al(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var nl=null;function al(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,nl=new Map,t.forEach(OC,e),nl=null,tl.call(e))}function OC(e,t){if(!(t.state.loading&4)){var i=nl.get(e);if(i)var s=i.get(null);else{i=new Map,nl.set(e,i);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<u.length;h++){var y=u[h];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(i.set(y.dataset.precedence,y),s=y)}s&&i.set(null,s)}u=t.instance,y=u.getAttribute("data-precedence"),h=i.get(y)||s,h===s&&i.set(null,u),i.set(y,u),this.count++,s=tl.bind(this),u.addEventListener("load",s),u.addEventListener("error",s),h?h.parentNode.insertBefore(u,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var xs={$$typeof:A,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function PC(e,t,i,s,u,h,y,v,M){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=nn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nn(0),this.hiddenUpdates=nn(null),this.identifierPrefix=s,this.onUncaughtError=u,this.onCaughtError=h,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function Ng(e,t,i,s,u,h,y,v,M,B,V,W){return e=new PC(e,t,i,y,M,B,V,W,v),t=1,h===!0&&(t|=24),h=on(3,null,null,t),e.current=h,h.stateNode=e,t=Lc(),t.refCount++,e.pooledCache=t,t.refCount++,h.memoizedState={element:s,isDehydrated:i,cache:t},Ic(h),e}function kg(e){return e?(e=Vi,e):Vi}function Ag(e,t,i,s,u,h){u=kg(u),s.context===null?s.context=u:s.pendingContext=u,s=Ra(t),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=_a(e,s,t),i!==null&&(Qt(i,e,t),Xo(i,e,t))}function Dg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function nd(e,t){Dg(e,t),(e=e.alternate)&&Dg(e,t)}function Tg(e){if(e.tag===13||e.tag===31){var t=li(e,67108864);t!==null&&Qt(t,e,67108864),nd(e,67108864)}}function jg(e){if(e.tag===13||e.tag===31){var t=un();t=Zn(t);var i=li(e,t);i!==null&&Qt(i,e,t),nd(e,t)}}var il=!0;function LC(e,t,i,s){var u=U.T;U.T=null;var h=Z.p;try{Z.p=2,ad(e,t,i,s)}finally{Z.p=h,U.T=u}}function RC(e,t,i,s){var u=U.T;U.T=null;var h=Z.p;try{Z.p=8,ad(e,t,i,s)}finally{Z.p=h,U.T=u}}function ad(e,t,i,s){if(il){var u=id(s);if(u===null)qu(e,t,s,ol,i),Eg(e,s);else if(zC(u,e,t,i,s))s.stopPropagation();else if(Eg(e,s),t&4&&-1<_C.indexOf(e)){for(;u!==null;){var h=Ri(u);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var y=lt(h.pendingLanes);if(y!==0){var v=h;for(v.pendingLanes|=2,v.entangledLanes|=2;y;){var M=1<<31-Se(y);v.entanglements[1]|=M,y&=~M}Un(h),(Qe&6)===0&&(Br=yt()+500,hs(0))}}break;case 31:case 13:v=li(h,2),v!==null&&Qt(v,h,2),qr(),nd(h,2)}if(h=id(s),h===null&&qu(e,t,s,ol,i),h===u)break;u=h}u!==null&&s.stopPropagation()}else qu(e,t,s,null,i)}}function id(e){return e=sc(e),od(e)}var ol=null;function od(e){if(ol=null,e=Li(e),e!==null){var t=d(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=f(t),e!==null)return e;e=null}else if(i===31){if(e=m(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ol=e,null}function Mg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(tn()){case Wn:return 2;case ni:return 8;case Ln:case Rn:return 32;case Ei:return 268435456;default:return 32}default:return 32}}var sd=!1,Ya=null,$a=null,Wa=null,vs=new Map,Cs=new Map,Qa=[],_C="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 Eg(e,t){switch(e){case"focusin":case"focusout":Ya=null;break;case"dragenter":case"dragleave":$a=null;break;case"mouseover":case"mouseout":Wa=null;break;case"pointerover":case"pointerout":vs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cs.delete(t.pointerId)}}function Ss(e,t,i,s,u,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:h,targetContainers:[u]},t!==null&&(t=Ri(t),t!==null&&Tg(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function zC(e,t,i,s,u){switch(t){case"focusin":return Ya=Ss(Ya,e,t,i,s,u),!0;case"dragenter":return $a=Ss($a,e,t,i,s,u),!0;case"mouseover":return Wa=Ss(Wa,e,t,i,s,u),!0;case"pointerover":var h=u.pointerId;return vs.set(h,Ss(vs.get(h)||null,e,t,i,s,u)),!0;case"gotpointercapture":return h=u.pointerId,Cs.set(h,Ss(Cs.get(h)||null,e,t,i,s,u)),!0}return!1}function Og(e){var t=Li(e.target);if(t!==null){var i=d(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,Po(e.priority,function(){jg(i)});return}}else if(t===31){if(t=m(i),t!==null){e.blockedOn=t,Po(e.priority,function(){jg(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function sl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=id(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);oc=s,i.target.dispatchEvent(s),oc=null}else return t=Ri(i),t!==null&&Tg(t),e.blockedOn=i,!1;t.shift()}return!0}function Pg(e,t,i){sl(e)&&i.delete(t)}function IC(){sd=!1,Ya!==null&&sl(Ya)&&(Ya=null),$a!==null&&sl($a)&&($a=null),Wa!==null&&sl(Wa)&&(Wa=null),vs.forEach(Pg),Cs.forEach(Pg)}function rl(e,t){e.blockedOn===t&&(e.blockedOn=null,sd||(sd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,IC)))}var ll=null;function Lg(e){ll!==e&&(ll=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ll===e&&(ll=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],u=e[t+2];if(typeof s!="function"){if(od(s||i)===null)continue;break}var h=Ri(i);h!==null&&(e.splice(t,3),t-=3,iu(h,{pending:!0,data:u,method:i.method,action:s},s,u))}}))}function yo(e){function t(M){return rl(M,e)}Ya!==null&&rl(Ya,e),$a!==null&&rl($a,e),Wa!==null&&rl(Wa,e),vs.forEach(t),Cs.forEach(t);for(var i=0;i<Qa.length;i++){var s=Qa[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Qa.length&&(i=Qa[0],i.blockedOn===null);)Og(i),i.blockedOn===null&&Qa.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var u=i[s],h=i[s+1],y=u[Ft]||null;if(typeof h=="function")y||Lg(i);else if(y){var v=null;if(h&&h.hasAttribute("formAction")){if(u=h,y=h[Ft]||null)v=y.formAction;else if(od(u)!==null)continue}else v=y.action;typeof v=="function"?i[s+1]=v:(i.splice(s,3),s-=3),Lg(i)}}}function Rg(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function rd(e){this._internalRoot=e}cl.prototype.render=rd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var i=t.current,s=un();Ag(i,s,e,t,null,null)},cl.prototype.unmount=rd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ag(e.current,2,null,e,null,null),qr(),t[Pi]=null}};function cl(e){this._internalRoot=e}cl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Oo();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Qa.length&&t!==0&&t<Qa[i].priority;i++);Qa.splice(i,0,e),i===0&&Og(e)}};var _g=a.version;if(_g!=="19.2.1")throw Error(r(527,_g,"19.2.1"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=g(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var UC={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ul=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ul.isDisabled&&ul.supportsFiber)try{Qn=ul.inject(UC),J=ul}catch{}}return Ns.createRoot=function(e,t){if(!c(e))throw Error(r(299));var i=!1,s="",u=qm,h=Fm,y=Gm;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(h=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Ng(e,1,!1,null,null,i,s,null,u,h,y,Rg),e[Pi]=t.current,Ku(e),new rd(t)},Ns.hydrateRoot=function(e,t,i){if(!c(e))throw Error(r(299));var s=!1,u="",h=qm,y=Fm,v=Gm,M=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(y=i.onCaughtError),i.onRecoverableError!==void 0&&(v=i.onRecoverableError),i.formState!==void 0&&(M=i.formState)),t=Ng(e,1,!0,t,i??null,s,u,M,h,y,v,Rg),t.context=kg(null),i=t.current,s=un(),s=Zn(s),u=Ra(s),u.callback=null,_a(i,u,s),i=s,t.current.lanes=i,An(t,i),Un(t),e[Pi]=t.current,Ku(e),new cl(t)},Ns.version="19.2.1",Ns}var Zg;function Xw(){if(Zg)return ld.exports;Zg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),ld.exports=Qw(),ld.exports}var Zw=Xw();const Jw="modulepreload",eN=function(n){return"/"+n},Jg={},at=function(a,o,r){let c=Promise.resolve();if(o&&o.length>0){let p=function(g){return Promise.all(g.map(S=>Promise.resolve(S).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),m=f?.nonce||f?.getAttribute("nonce");c=p(o.map(g=>{if(g=eN(g),g in Jg)return;Jg[g]=!0;const S=g.endsWith(".css"),b=S?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${b}`))return;const x=document.createElement("link");if(x.rel=S?"stylesheet":Jw,S||(x.as="script"),x.crossOrigin="",x.href=g,m&&x.setAttribute("nonce",m),document.head.appendChild(x),S)return new Promise((j,N)=>{x.addEventListener("load",j),x.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${g}`)))})}))}function d(f){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=f,window.dispatchEvent(m),!m.defaultPrevented)throw f}return c.then(f=>{for(const m of f||[])m.status==="rejected"&&d(m.reason);return a().catch(d)})},tN=new kS({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!1,retry:1},mutations:{retry:!1}}}),Ae=n=>typeof n=="string",ks=()=>{let n,a;const o=new Promise((r,c)=>{n=r,a=c});return o.resolve=n,o.reject=a,o},ey=n=>n==null?"":""+n,nN=(n,a,o)=>{n.forEach(r=>{a[r]&&(o[r]=a[r])})},aN=/###/g,ty=n=>n&&n.indexOf("###")>-1?n.replace(aN,"."):n,ny=n=>!n||Ae(n),Ps=(n,a,o)=>{const r=Ae(a)?a.split("."):a;let c=0;for(;c<r.length-1;){if(ny(n))return{};const d=ty(r[c]);!n[d]&&o&&(n[d]=new o),Object.prototype.hasOwnProperty.call(n,d)?n=n[d]:n={},++c}return ny(n)?{}:{obj:n,k:ty(r[c])}},ay=(n,a,o)=>{const{obj:r,k:c}=Ps(n,a,Object);if(r!==void 0||a.length===1){r[c]=o;return}let d=a[a.length-1],f=a.slice(0,a.length-1),m=Ps(n,f,Object);for(;m.obj===void 0&&f.length;)d=`${f[f.length-1]}.${d}`,f=f.slice(0,f.length-1),m=Ps(n,f,Object),m?.obj&&typeof m.obj[`${m.k}.${d}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${d}`]=o},iN=(n,a,o,r)=>{const{obj:c,k:d}=Ps(n,a,Object);c[d]=c[d]||[],c[d].push(o)},wl=(n,a)=>{const{obj:o,k:r}=Ps(n,a);if(o&&Object.prototype.hasOwnProperty.call(o,r))return o[r]},oN=(n,a,o)=>{const r=wl(n,o);return r!==void 0?r:wl(a,o)},Wb=(n,a,o)=>{for(const r in a)r!=="__proto__"&&r!=="constructor"&&(r in n?Ae(n[r])||n[r]instanceof String||Ae(a[r])||a[r]instanceof String?o&&(n[r]=a[r]):Wb(n[r],a[r],o):n[r]=a[r]);return n},Ci=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var sN={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const rN=n=>Ae(n)?n.replace(/[&<>"'\/]/g,a=>sN[a]):n;class lN{constructor(a){this.capacity=a,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(a){const o=this.regExpMap.get(a);if(o!==void 0)return o;const r=new RegExp(a);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(a,r),this.regExpQueue.push(a),r}}const cN=[" ",",","?","!",";"],uN=new lN(20),dN=(n,a,o)=>{a=a||"",o=o||"";const r=cN.filter(f=>a.indexOf(f)<0&&o.indexOf(f)<0);if(r.length===0)return!0;const c=uN.getRegExp(`(${r.map(f=>f==="?"?"\\?":f).join("|")})`);let d=!c.test(n);if(!d){const f=n.indexOf(o);f>0&&!c.test(n.substring(0,f))&&(d=!0)}return d},Ld=(n,a,o=".")=>{if(!n)return;if(n[a])return Object.prototype.hasOwnProperty.call(n,a)?n[a]:void 0;const r=a.split(o);let c=n;for(let d=0;d<r.length;){if(!c||typeof c!="object")return;let f,m="";for(let p=d;p<r.length;++p)if(p!==d&&(m+=o),m+=r[p],f=c[m],f!==void 0){if(["string","number","boolean"].indexOf(typeof f)>-1&&p<r.length-1)continue;d+=p-d+1;break}c=f}return c},Ks=n=>n?.replace("_","-"),fN={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,a){console?.[n]?.apply?.(console,a)}};class Nl{constructor(a,o={}){this.init(a,o)}init(a,o={}){this.prefix=o.prefix||"i18next:",this.logger=a||fN,this.options=o,this.debug=o.debug}log(...a){return this.forward(a,"log","",!0)}warn(...a){return this.forward(a,"warn","",!0)}error(...a){return this.forward(a,"error","")}deprecate(...a){return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(a,o,r,c){return c&&!this.debug?null:(Ae(a[0])&&(a[0]=`${r}${this.prefix} ${a[0]}`),this.logger[o](a))}create(a){return new Nl(this.logger,{prefix:`${this.prefix}:${a}:`,...this.options})}clone(a){return a=a||this.options,a.prefix=a.prefix||this.prefix,new Nl(this.logger,a)}}var Kn=new Nl;class zl{constructor(){this.observers={}}on(a,o){return a.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const c=this.observers[r].get(o)||0;this.observers[r].set(o,c+1)}),this}off(a,o){if(this.observers[a]){if(!o){delete this.observers[a];return}this.observers[a].delete(o)}}emit(a,...o){this.observers[a]&&Array.from(this.observers[a].entries()).forEach(([c,d])=>{for(let f=0;f<d;f++)c(...o)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([c,d])=>{for(let f=0;f<d;f++)c.apply(c,[a,...o])})}}class iy extends zl{constructor(a,o={ns:["translation"],defaultNS:"translation"}){super(),this.data=a||{},this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(a){this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}removeNamespaces(a){const o=this.options.ns.indexOf(a);o>-1&&this.options.ns.splice(o,1)}getResource(a,o,r,c={}){const d=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,f=c.ignoreJSONStructure!==void 0?c.ignoreJSONStructure:this.options.ignoreJSONStructure;let m;a.indexOf(".")>-1?m=a.split("."):(m=[a,o],r&&(Array.isArray(r)?m.push(...r):Ae(r)&&d?m.push(...r.split(d)):m.push(r)));const p=wl(this.data,m);return!p&&!o&&!r&&a.indexOf(".")>-1&&(a=m[0],o=m[1],r=m.slice(2).join(".")),p||!f||!Ae(r)?p:Ld(this.data?.[a]?.[o],r,d)}addResource(a,o,r,c,d={silent:!1}){const f=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator;let m=[a,o];r&&(m=m.concat(f?r.split(f):r)),a.indexOf(".")>-1&&(m=a.split("."),c=o,o=m[1]),this.addNamespaces(o),ay(this.data,m,c),d.silent||this.emit("added",a,o,r,c)}addResources(a,o,r,c={silent:!1}){for(const d in r)(Ae(r[d])||Array.isArray(r[d]))&&this.addResource(a,o,d,r[d],{silent:!0});c.silent||this.emit("added",a,o,r)}addResourceBundle(a,o,r,c,d,f={silent:!1,skipCopy:!1}){let m=[a,o];a.indexOf(".")>-1&&(m=a.split("."),c=r,r=o,o=m[1]),this.addNamespaces(o);let p=wl(this.data,m)||{};f.skipCopy||(r=JSON.parse(JSON.stringify(r))),c?Wb(p,r,d):p={...p,...r},ay(this.data,m,p),f.silent||this.emit("added",a,o,r)}removeResourceBundle(a,o){this.hasResourceBundle(a,o)&&delete this.data[a][o],this.removeNamespaces(o),this.emit("removed",a,o)}hasResourceBundle(a,o){return this.getResource(a,o)!==void 0}getResourceBundle(a,o){return o||(o=this.options.defaultNS),this.getResource(a,o)}getDataByLanguage(a){return this.data[a]}hasLanguageSomeTranslations(a){const o=this.getDataByLanguage(a);return!!(o&&Object.keys(o)||[]).find(c=>o[c]&&Object.keys(o[c]).length>0)}toJSON(){return this.data}}var Qb={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,a,o,r,c){return n.forEach(d=>{a=this.processors[d]?.process(a,o,r,c)??a}),a}};const Xb=Symbol("i18next/PATH_KEY");function hN(){const n=[],a=Object.create(null);let o;return a.get=(r,c)=>(o?.revoke?.(),c===Xb?n:(n.push(c),o=Proxy.revocable(r,a),o.proxy)),Proxy.revocable(Object.create(null),a).proxy}function Rd(n,a){const{[Xb]:o}=n(hN());return o.join(a?.keySeparator??".")}const oy={},dd=n=>!Ae(n)&&typeof n!="boolean"&&typeof n!="number";class kl extends zl{constructor(a,o={}){super(),nN(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,this),this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Kn.create("translator")}changeLanguage(a){a&&(this.language=a)}exists(a,o={interpolation:{}}){const r={...o};if(a==null)return!1;const c=this.resolve(a,r);if(c?.res===void 0)return!1;const d=dd(c.res);return!(r.returnObjects===!1&&d)}extractFromKey(a,o){let r=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let d=o.ns||this.options.defaultNS||[];const f=r&&a.indexOf(r)>-1,m=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!dN(a,r,c);if(f&&!m){const p=a.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:a,namespaces:Ae(d)?[d]:d};const g=a.split(r);(r!==c||r===c&&this.options.ns.indexOf(g[0])>-1)&&(d=g.shift()),a=g.join(c)}return{key:a,namespaces:Ae(d)?[d]:d}}translate(a,o,r){let c=typeof o=="object"?{...o}:o;if(typeof c!="object"&&this.options.overloadTranslationOptionHandler&&(c=this.options.overloadTranslationOptionHandler(arguments)),typeof c=="object"&&(c={...c}),c||(c={}),a==null)return"";typeof a=="function"&&(a=Rd(a,{...this.options,...c})),Array.isArray(a)||(a=[String(a)]);const d=c.returnDetails!==void 0?c.returnDetails:this.options.returnDetails,f=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,{key:m,namespaces:p}=this.extractFromKey(a[a.length-1],c),g=p[p.length-1];let S=c.nsSeparator!==void 0?c.nsSeparator:this.options.nsSeparator;S===void 0&&(S=":");const b=c.lng||this.language,x=c.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(b?.toLowerCase()==="cimode")return x?d?{res:`${g}${S}${m}`,usedKey:m,exactUsedKey:m,usedLng:b,usedNS:g,usedParams:this.getUsedParamsDetails(c)}:`${g}${S}${m}`:d?{res:m,usedKey:m,exactUsedKey:m,usedLng:b,usedNS:g,usedParams:this.getUsedParamsDetails(c)}:m;const j=this.resolve(a,c);let N=j?.res;const E=j?.usedKey||m,L=j?.exactUsedKey||m,O=["[object Number]","[object Function]","[object RegExp]"],D=c.joinArrays!==void 0?c.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,k=c.count!==void 0&&!Ae(c.count),T=kl.hasDefaultValue(c),w=k?this.pluralResolver.getSuffix(b,c.count,c):"",R=c.ordinal&&k?this.pluralResolver.getSuffix(b,c.count,{ordinal:!1}):"",I=k&&!c.ordinal&&c.count===0,z=I&&c[`defaultValue${this.options.pluralSeparator}zero`]||c[`defaultValue${w}`]||c[`defaultValue${R}`]||c.defaultValue;let F=N;A&&!N&&T&&(F=z);const ee=dd(F),Q=Object.prototype.toString.apply(F);if(A&&F&&ee&&O.indexOf(Q)<0&&!(Ae(D)&&Array.isArray(F))){if(!c.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ge=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,F,{...c,ns:p}):`key '${m} (${this.language})' returned an object instead of string.`;return d?(j.res=ge,j.usedParams=this.getUsedParamsDetails(c),j):ge}if(f){const ge=Array.isArray(F),te=ge?[]:{},ve=ge?L:E;for(const U in F)if(Object.prototype.hasOwnProperty.call(F,U)){const Z=`${ve}${f}${U}`;T&&!N?te[U]=this.translate(Z,{...c,defaultValue:dd(z)?z[U]:void 0,joinArrays:!1,ns:p}):te[U]=this.translate(Z,{...c,joinArrays:!1,ns:p}),te[U]===Z&&(te[U]=F[U])}N=te}}else if(A&&Ae(D)&&Array.isArray(N))N=N.join(D),N&&(N=this.extendTranslation(N,a,c,r));else{let ge=!1,te=!1;!this.isValidLookup(N)&&T&&(ge=!0,N=z),this.isValidLookup(N)||(te=!0,N=m);const U=(c.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&te?void 0:N,Z=T&&z!==N&&this.options.updateMissing;if(te||ge||Z){if(this.logger.log(Z?"updateKey":"missingKey",b,g,m,Z?z:N),f){const ue=this.resolve(m,{...c,keySeparator:!1});ue&&ue.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ne=[];const $=this.languageUtils.getFallbackCodes(this.options.fallbackLng,c.lng||this.language);if(this.options.saveMissingTo==="fallback"&&$&&$[0])for(let ue=0;ue<$.length;ue++)ne.push($[ue]);else this.options.saveMissingTo==="all"?ne=this.languageUtils.toResolveHierarchy(c.lng||this.language):ne.push(c.lng||this.language);const oe=(ue,he,X)=>{const ae=T&&X!==N?X:U;this.options.missingKeyHandler?this.options.missingKeyHandler(ue,g,he,ae,Z,c):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ue,g,he,ae,Z,c),this.emit("missingKey",ue,g,he,N)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?ne.forEach(ue=>{const he=this.pluralResolver.getSuffixes(ue,c);I&&c[`defaultValue${this.options.pluralSeparator}zero`]&&he.indexOf(`${this.options.pluralSeparator}zero`)<0&&he.push(`${this.options.pluralSeparator}zero`),he.forEach(X=>{oe([ue],m+X,c[`defaultValue${X}`]||z)})}):oe(ne,m,z))}N=this.extendTranslation(N,a,c,j,r),te&&N===m&&this.options.appendNamespaceToMissingKey&&(N=`${g}${S}${m}`),(te||ge)&&this.options.parseMissingKeyHandler&&(N=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${S}${m}`:m,ge?N:void 0,c))}return d?(j.res=N,j.usedParams=this.getUsedParamsDetails(c),j):N}extendTranslation(a,o,r,c,d){if(this.i18nFormat?.parse)a=this.i18nFormat.parse(a,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||c.usedLng,c.usedNS,c.usedKey,{resolved:c});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const p=Ae(a)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(p){const b=a.match(this.interpolator.nestingRegexp);g=b&&b.length}let S=r.replace&&!Ae(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(S={...this.options.interpolation.defaultVariables,...S}),a=this.interpolator.interpolate(a,S,r.lng||this.language||c.usedLng,r),p){const b=a.match(this.interpolator.nestingRegexp),x=b&&b.length;g<x&&(r.nest=!1)}!r.lng&&c&&c.res&&(r.lng=this.language||c.usedLng),r.nest!==!1&&(a=this.interpolator.nest(a,(...b)=>d?.[0]===b[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${b[0]} in key: ${o[0]}`),null):this.translate(...b,o),r)),r.interpolation&&this.interpolator.reset()}const f=r.postProcess||this.options.postProcess,m=Ae(f)?[f]:f;return a!=null&&m?.length&&r.applyPostProcessor!==!1&&(a=Qb.handle(m,a,o,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...c,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),a}resolve(a,o={}){let r,c,d,f,m;return Ae(a)&&(a=[a]),a.forEach(p=>{if(this.isValidLookup(r))return;const g=this.extractFromKey(p,o),S=g.key;c=S;let b=g.namespaces;this.options.fallbackNS&&(b=b.concat(this.options.fallbackNS));const x=o.count!==void 0&&!Ae(o.count),j=x&&!o.ordinal&&o.count===0,N=o.context!==void 0&&(Ae(o.context)||typeof o.context=="number")&&o.context!=="",E=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);b.forEach(L=>{this.isValidLookup(r)||(m=L,!oy[`${E[0]}-${L}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(m)&&(oy[`${E[0]}-${L}`]=!0,this.logger.warn(`key "${c}" for languages "${E.join(", ")}" won't get resolved as namespace "${m}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(O=>{if(this.isValidLookup(r))return;f=O;const D=[S];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(D,S,O,L,o);else{let k;x&&(k=this.pluralResolver.getSuffix(O,o.count,o));const T=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(x&&(o.ordinal&&k.indexOf(w)===0&&D.push(S+k.replace(w,this.options.pluralSeparator)),D.push(S+k),j&&D.push(S+T)),N){const R=`${S}${this.options.contextSeparator||"_"}${o.context}`;D.push(R),x&&(o.ordinal&&k.indexOf(w)===0&&D.push(R+k.replace(w,this.options.pluralSeparator)),D.push(R+k),j&&D.push(R+T))}}let A;for(;A=D.pop();)this.isValidLookup(r)||(d=A,r=this.getResource(O,L,A,o))}))})}),{res:r,usedKey:c,exactUsedKey:d,usedLng:f,usedNS:m}}isValidLookup(a){return a!==void 0&&!(!this.options.returnNull&&a===null)&&!(!this.options.returnEmptyString&&a==="")}getResource(a,o,r,c={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(a,o,r,c):this.resourceStore.getResource(a,o,r,c)}getUsedParamsDetails(a={}){const o=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=a.replace&&!Ae(a.replace);let c=r?a.replace:a;if(r&&typeof a.count<"u"&&(c.count=a.count),this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),!r){c={...c};for(const d of o)delete c[d]}return c}static hasDefaultValue(a){const o="defaultValue";for(const r in a)if(Object.prototype.hasOwnProperty.call(a,r)&&o===r.substring(0,o.length)&&a[r]!==void 0)return!0;return!1}}class sy{constructor(a){this.options=a,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Kn.create("languageUtils")}getScriptPartFromCode(a){if(a=Ks(a),!a||a.indexOf("-")<0)return null;const o=a.split("-");return o.length===2||(o.pop(),o[o.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(o.join("-"))}getLanguagePartFromCode(a){if(a=Ks(a),!a||a.indexOf("-")<0)return a;const o=a.split("-");return this.formatLanguageCode(o[0])}formatLanguageCode(a){if(Ae(a)&&a.indexOf("-")>-1){let o;try{o=Intl.getCanonicalLocales(a)[0]}catch{}return o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o||(this.options.lowerCaseLng?a.toLowerCase():a)}return this.options.cleanCode||this.options.lowerCaseLng?a.toLowerCase():a}isSupportedCode(a){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(a=this.getLanguagePartFromCode(a)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(a)>-1}getBestMatchFromCodes(a){if(!a)return null;let o;return a.forEach(r=>{if(o)return;const c=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(c))&&(o=c)}),!o&&this.options.supportedLngs&&a.forEach(r=>{if(o)return;const c=this.getScriptPartFromCode(r);if(this.isSupportedCode(c))return o=c;const d=this.getLanguagePartFromCode(r);if(this.isSupportedCode(d))return o=d;o=this.options.supportedLngs.find(f=>{if(f===d)return f;if(!(f.indexOf("-")<0&&d.indexOf("-")<0)&&(f.indexOf("-")>0&&d.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===d||f.indexOf(d)===0&&d.length>1))return f})}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}getFallbackCodes(a,o){if(!a)return[];if(typeof a=="function"&&(a=a(o)),Ae(a)&&(a=[a]),Array.isArray(a))return a;if(!o)return a.default||[];let r=a[o];return r||(r=a[this.getScriptPartFromCode(o)]),r||(r=a[this.formatLanguageCode(o)]),r||(r=a[this.getLanguagePartFromCode(o)]),r||(r=a.default),r||[]}toResolveHierarchy(a,o){const r=this.getFallbackCodes((o===!1?[]:o)||this.options.fallbackLng||[],a),c=[],d=f=>{f&&(this.isSupportedCode(f)?c.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return Ae(a)&&(a.indexOf("-")>-1||a.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&d(this.formatLanguageCode(a)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&d(this.getScriptPartFromCode(a)),this.options.load!=="currentOnly"&&d(this.getLanguagePartFromCode(a))):Ae(a)&&d(this.formatLanguageCode(a)),r.forEach(f=>{c.indexOf(f)<0&&d(this.formatLanguageCode(f))}),c}}const ry={zero:0,one:1,two:2,few:3,many:4,other:5},ly={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class mN{constructor(a,o={}){this.languageUtils=a,this.options=o,this.logger=Kn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(a,o={}){const r=Ks(a==="dev"?"en":a),c=o.ordinal?"ordinal":"cardinal",d=JSON.stringify({cleanedCode:r,type:c});if(d in this.pluralRulesCache)return this.pluralRulesCache[d];let f;try{f=new Intl.PluralRules(r,{type:c})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),ly;if(!a.match(/-|_/))return ly;const p=this.languageUtils.getLanguagePartFromCode(a);f=this.getRule(p,o)}return this.pluralRulesCache[d]=f,f}needsPlural(a,o={}){let r=this.getRule(a,o);return r||(r=this.getRule("dev",o)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(a,o,r={}){return this.getSuffixes(a,r).map(c=>`${o}${c}`)}getSuffixes(a,o={}){let r=this.getRule(a,o);return r||(r=this.getRule("dev",o)),r?r.resolvedOptions().pluralCategories.sort((c,d)=>ry[c]-ry[d]).map(c=>`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${c}`):[]}getSuffix(a,o,r={}){const c=this.getRule(a,r);return c?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${c.select(o)}`:(this.logger.warn(`no plural rule found for: ${a}`),this.getSuffix("dev",o,r))}}const cy=(n,a,o,r=".",c=!0)=>{let d=oN(n,a,o);return!d&&c&&Ae(o)&&(d=Ld(n,o,r),d===void 0&&(d=Ld(a,o,r))),d},fd=n=>n.replace(/\$/g,"$$$$");class uy{constructor(a={}){this.logger=Kn.create("interpolator"),this.options=a,this.format=a?.interpolation?.format||(o=>o),this.init(a)}init(a={}){a.interpolation||(a.interpolation={escapeValue:!0});const{escape:o,escapeValue:r,useRawValueToEscape:c,prefix:d,prefixEscaped:f,suffix:m,suffixEscaped:p,formatSeparator:g,unescapeSuffix:S,unescapePrefix:b,nestingPrefix:x,nestingPrefixEscaped:j,nestingSuffix:N,nestingSuffixEscaped:E,nestingOptionsSeparator:L,maxReplaces:O,alwaysFormat:D}=a.interpolation;this.escape=o!==void 0?o:rN,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=c!==void 0?c:!1,this.prefix=d?Ci(d):f||"{{",this.suffix=m?Ci(m):p||"}}",this.formatSeparator=g||",",this.unescapePrefix=S?"":b||"-",this.unescapeSuffix=this.unescapePrefix?"":S||"",this.nestingPrefix=x?Ci(x):j||Ci("$t("),this.nestingSuffix=N?Ci(N):E||Ci(")"),this.nestingOptionsSeparator=L||",",this.maxReplaces=O||1e3,this.alwaysFormat=D!==void 0?D:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const a=(o,r)=>o?.source===r?(o.lastIndex=0,o):new RegExp(r,"g");this.regexp=a(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=a(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=a(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(a,o,r,c){let d,f,m;const p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=j=>{if(j.indexOf(this.formatSeparator)<0){const O=cy(o,p,j,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(O,void 0,r,{...c,...o,interpolationkey:j}):O}const N=j.split(this.formatSeparator),E=N.shift().trim(),L=N.join(this.formatSeparator).trim();return this.format(cy(o,p,E,this.options.keySeparator,this.options.ignoreJSONStructure),L,r,{...c,...o,interpolationkey:E})};this.resetRegExp();const S=c?.missingInterpolationHandler||this.options.missingInterpolationHandler,b=c?.interpolation?.skipOnVariables!==void 0?c.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:j=>fd(j)},{regex:this.regexp,safeValue:j=>this.escapeValue?fd(this.escape(j)):fd(j)}].forEach(j=>{for(m=0;d=j.regex.exec(a);){const N=d[1].trim();if(f=g(N),f===void 0)if(typeof S=="function"){const L=S(a,d,c);f=Ae(L)?L:""}else if(c&&Object.prototype.hasOwnProperty.call(c,N))f="";else if(b){f=d[0];continue}else this.logger.warn(`missed to pass in variable ${N} for interpolating ${a}`),f="";else!Ae(f)&&!this.useRawValueToEscape&&(f=ey(f));const E=j.safeValue(f);if(a=a.replace(d[0],E),b?(j.regex.lastIndex+=f.length,j.regex.lastIndex-=d[0].length):j.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),a}nest(a,o,r={}){let c,d,f;const m=(p,g)=>{const S=this.nestingOptionsSeparator;if(p.indexOf(S)<0)return p;const b=p.split(new RegExp(`${Ci(S)}[ ]*{`));let x=`{${b[1]}`;p=b[0],x=this.interpolate(x,f);const j=x.match(/'/g),N=x.match(/"/g);((j?.length??0)%2===0&&!N||(N?.length??0)%2!==0)&&(x=x.replace(/'/g,'"'));try{f=JSON.parse(x),g&&(f={...g,...f})}catch(E){return this.logger.warn(`failed parsing options string in nesting for key ${p}`,E),`${p}${S}${x}`}return f.defaultValue&&f.defaultValue.indexOf(this.prefix)>-1&&delete f.defaultValue,p};for(;c=this.nestingRegexp.exec(a);){let p=[];f={...r},f=f.replace&&!Ae(f.replace)?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;const g=/{.*}/.test(c[1])?c[1].lastIndexOf("}")+1:c[1].indexOf(this.formatSeparator);if(g!==-1&&(p=c[1].slice(g).split(this.formatSeparator).map(S=>S.trim()).filter(Boolean),c[1]=c[1].slice(0,g)),d=o(m.call(this,c[1].trim(),f),f),d&&c[0]===a&&!Ae(d))return d;Ae(d)||(d=ey(d)),d||(this.logger.warn(`missed to resolve ${c[1]} for nesting ${a}`),d=""),p.length&&(d=p.reduce((S,b)=>this.format(S,b,r.lng,{...r,interpolationkey:c[1].trim()}),d.trim())),a=a.replace(c[0],d),this.regexp.lastIndex=0}return a}}const pN=n=>{let a=n.toLowerCase().trim();const o={};if(n.indexOf("(")>-1){const r=n.split("(");a=r[0].toLowerCase().trim();const c=r[1].substring(0,r[1].length-1);a==="currency"&&c.indexOf(":")<0?o.currency||(o.currency=c.trim()):a==="relativetime"&&c.indexOf(":")<0?o.range||(o.range=c.trim()):c.split(";").forEach(f=>{if(f){const[m,...p]=f.split(":"),g=p.join(":").trim().replace(/^'+|'+$/g,""),S=m.trim();o[S]||(o[S]=g),g==="false"&&(o[S]=!1),g==="true"&&(o[S]=!0),isNaN(g)||(o[S]=parseInt(g,10))}})}return{formatName:a,formatOptions:o}},dy=n=>{const a={};return(o,r,c)=>{let d=c;c&&c.interpolationkey&&c.formatParams&&c.formatParams[c.interpolationkey]&&c[c.interpolationkey]&&(d={...d,[c.interpolationkey]:void 0});const f=r+JSON.stringify(d);let m=a[f];return m||(m=n(Ks(r),c),a[f]=m),m(o)}},gN=n=>(a,o,r)=>n(Ks(o),r)(a);class yN{constructor(a={}){this.logger=Kn.create("formatter"),this.options=a,this.init(a)}init(a,o={interpolation:{}}){this.formatSeparator=o.interpolation.formatSeparator||",";const r=o.cacheInBuiltFormats?dy:gN;this.formats={number:r((c,d)=>{const f=new Intl.NumberFormat(c,{...d});return m=>f.format(m)}),currency:r((c,d)=>{const f=new Intl.NumberFormat(c,{...d,style:"currency"});return m=>f.format(m)}),datetime:r((c,d)=>{const f=new Intl.DateTimeFormat(c,{...d});return m=>f.format(m)}),relativetime:r((c,d)=>{const f=new Intl.RelativeTimeFormat(c,{...d});return m=>f.format(m,d.range||"day")}),list:r((c,d)=>{const f=new Intl.ListFormat(c,{...d});return m=>f.format(m)})}}add(a,o){this.formats[a.toLowerCase().trim()]=o}addCached(a,o){this.formats[a.toLowerCase().trim()]=dy(o)}format(a,o,r,c={}){const d=o.split(this.formatSeparator);if(d.length>1&&d[0].indexOf("(")>1&&d[0].indexOf(")")<0&&d.find(m=>m.indexOf(")")>-1)){const m=d.findIndex(p=>p.indexOf(")")>-1);d[0]=[d[0],...d.splice(1,m)].join(this.formatSeparator)}return d.reduce((m,p)=>{const{formatName:g,formatOptions:S}=pN(p);if(this.formats[g]){let b=m;try{const x=c?.formatParams?.[c.interpolationkey]||{},j=x.locale||x.lng||c.locale||c.lng||r;b=this.formats[g](m,j,{...S,...c,...x})}catch(x){this.logger.warn(x)}return b}else this.logger.warn(`there was no format function for ${g}`);return m},a)}}const bN=(n,a)=>{n.pending[a]!==void 0&&(delete n.pending[a],n.pendingCount--)};class xN extends zl{constructor(a,o,r,c={}){super(),this.backend=a,this.store=o,this.services=r,this.languageUtils=r.languageUtils,this.options=c,this.logger=Kn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=c.maxParallelReads||10,this.readingCalls=0,this.maxRetries=c.maxRetries>=0?c.maxRetries:5,this.retryTimeout=c.retryTimeout>=1?c.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,c.backend,c)}queueLoad(a,o,r,c){const d={},f={},m={},p={};return a.forEach(g=>{let S=!0;o.forEach(b=>{const x=`${g}|${b}`;!r.reload&&this.store.hasResourceBundle(g,b)?this.state[x]=2:this.state[x]<0||(this.state[x]===1?f[x]===void 0&&(f[x]=!0):(this.state[x]=1,S=!1,f[x]===void 0&&(f[x]=!0),d[x]===void 0&&(d[x]=!0),p[b]===void 0&&(p[b]=!0)))}),S||(m[g]=!0)}),(Object.keys(d).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:c}),{toLoad:Object.keys(d),pending:Object.keys(f),toLoadLanguages:Object.keys(m),toLoadNamespaces:Object.keys(p)}}loaded(a,o,r){const c=a.split("|"),d=c[0],f=c[1];o&&this.emit("failedLoading",d,f,o),!o&&r&&this.store.addResourceBundle(d,f,r,void 0,void 0,{skipCopy:!0}),this.state[a]=o?-1:2,o&&r&&(this.state[a]=0);const m={};this.queue.forEach(p=>{iN(p.loaded,[d],f),bN(p,a),o&&p.errors.push(o),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(g=>{m[g]||(m[g]={});const S=p.loaded[g];S.length&&S.forEach(b=>{m[g][b]===void 0&&(m[g][b]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",m),this.queue=this.queue.filter(p=>!p.done)}read(a,o,r,c=0,d=this.retryTimeout,f){if(!a.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:a,ns:o,fcName:r,tried:c,wait:d,callback:f});return}this.readingCalls++;const m=(g,S)=>{if(this.readingCalls--,this.waitingReads.length>0){const b=this.waitingReads.shift();this.read(b.lng,b.ns,b.fcName,b.tried,b.wait,b.callback)}if(g&&S&&c<this.maxRetries){setTimeout(()=>{this.read.call(this,a,o,r,c+1,d*2,f)},d);return}f(g,S)},p=this.backend[r].bind(this.backend);if(p.length===2){try{const g=p(a,o);g&&typeof g.then=="function"?g.then(S=>m(null,S)).catch(m):m(null,g)}catch(g){m(g)}return}return p(a,o,m)}prepareLoading(a,o,r={},c){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),c&&c();Ae(a)&&(a=this.languageUtils.toResolveHierarchy(a)),Ae(o)&&(o=[o]);const d=this.queueLoad(a,o,r,c);if(!d.toLoad.length)return d.pending.length||c(),null;d.toLoad.forEach(f=>{this.loadOne(f)})}load(a,o,r){this.prepareLoading(a,o,{},r)}reload(a,o,r){this.prepareLoading(a,o,{reload:!0},r)}loadOne(a,o=""){const r=a.split("|"),c=r[0],d=r[1];this.read(c,d,"read",void 0,void 0,(f,m)=>{f&&this.logger.warn(`${o}loading namespace ${d} for language ${c} failed`,f),!f&&m&&this.logger.log(`${o}loaded namespace ${d} for language ${c}`,m),this.loaded(a,f,m)})}saveMissing(a,o,r,c,d,f={},m=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(o)){this.logger.warn(`did not save key "${r}" as the namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const p={...f,isUpdate:d},g=this.backend.create.bind(this.backend);if(g.length<6)try{let S;g.length===5?S=g(a,o,r,c,p):S=g(a,o,r,c),S&&typeof S.then=="function"?S.then(b=>m(null,b)).catch(m):m(null,S)}catch(S){m(S)}else g(a,o,r,c,m,p)}!a||!a[0]||this.store.addResource(a[0],o,r,c)}}}const hd=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let a={};if(typeof n[1]=="object"&&(a=n[1]),Ae(n[1])&&(a.defaultValue=n[1]),Ae(n[2])&&(a.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const o=n[3]||n[2];Object.keys(o).forEach(r=>{a[r]=o[r]})}return a},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),fy=n=>(Ae(n.ns)&&(n.ns=[n.ns]),Ae(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Ae(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs?.indexOf?.("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n),fl=()=>{},vN=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(o=>{typeof n[o]=="function"&&(n[o]=n[o].bind(n))})},Zb="__i18next_supportNoticeShown",CN=()=>typeof globalThis<"u"&&!!globalThis[Zb],SN=()=>{typeof globalThis<"u"&&(globalThis[Zb]=!0)},wN=n=>!!(n?.modules?.backend?.name?.indexOf("Locize")>0||n?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||n?.options?.backend?.backends&&n.options.backend.backends.some(a=>a?.name?.indexOf("Locize")>0||a?.constructor?.name?.indexOf("Locize")>0)||n?.options?.backend?.projectId||n?.options?.backend?.backendOptions&&n.options.backend.backendOptions.some(a=>a?.projectId));class Ls extends zl{constructor(a={},o){if(super(),this.options=fy(a),this.services={},this.logger=Kn,this.modules={external:[]},vN(this),o&&!this.isInitialized&&!a.isClone){if(!this.options.initAsync)return this.init(a,o),this;setTimeout(()=>{this.init(a,o)},0)}}init(a={},o){this.isInitializing=!0,typeof a=="function"&&(o=a,a={}),a.defaultNS==null&&a.ns&&(Ae(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const r=hd();this.options={...r,...this.options,...fy(a)},this.options.interpolation={...r.interpolation,...this.options.interpolation},a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!wN(this)&&!CN()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),SN());const c=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?Kn.init(c(this.modules.logger),this.options):Kn.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=yN;const S=new sy(this.options);this.store=new iy(this.options.resources,this.options);const b=this.services;b.logger=Kn,b.resourceStore=this.store,b.languageUtils=S,b.pluralResolver=new mN(S,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),g&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(b.formatter=c(g),b.formatter.init&&b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new uy(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new xN(c(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",(j,...N)=>{this.emit(j,...N)}),this.modules.languageDetector&&(b.languageDetector=c(this.modules.languageDetector),b.languageDetector.init&&b.languageDetector.init(b,this.options.detection,this.options)),this.modules.i18nFormat&&(b.i18nFormat=c(this.modules.i18nFormat),b.i18nFormat.init&&b.i18nFormat.init(this)),this.translator=new kl(this.services,this.options),this.translator.on("*",(j,...N)=>{this.emit(j,...N)}),this.modules.external.forEach(j=>{j.init&&j.init(this)})}if(this.format=this.options.interpolation.format,o||(o=fl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(g=>{this[g]=(...S)=>this.store[g](...S)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...S)=>(this.store[g](...S),this)});const m=ks(),p=()=>{const g=(S,b)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),m.resolve(b),o(S,b)};if(this.languages&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),m}loadResources(a,o=fl){let r=o;const c=Ae(a)?a:this.language;if(typeof a=="function"&&(r=a),!this.options.resources||this.options.partialBundledLanguages){if(c?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const d=[],f=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(g=>{g!=="cimode"&&d.indexOf(g)<0&&d.push(g)})};c?f(c):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(p=>f(p)),this.options.preload?.forEach?.(m=>f(m)),this.services.backendConnector.load(d,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(m)})}else r(null)}reloadResources(a,o,r){const c=ks();return typeof a=="function"&&(r=a,a=void 0),typeof o=="function"&&(r=o,o=void 0),a||(a=this.languages),o||(o=this.options.ns),r||(r=fl),this.services.backendConnector.reload(a,o,d=>{c.resolve(),r(d)}),c}use(a){if(!a)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!a.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return a.type==="backend"&&(this.modules.backend=a),(a.type==="logger"||a.log&&a.warn&&a.error)&&(this.modules.logger=a),a.type==="languageDetector"&&(this.modules.languageDetector=a),a.type==="i18nFormat"&&(this.modules.i18nFormat=a),a.type==="postProcessor"&&Qb.addPostProcessor(a),a.type==="formatter"&&(this.modules.formatter=a),a.type==="3rdParty"&&this.modules.external.push(a),this}setResolvedLanguage(a){if(!(!a||!this.languages)&&!(["cimode","dev"].indexOf(a)>-1)){for(let o=0;o<this.languages.length;o++){const r=this.languages[o];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(a)<0&&this.store.hasLanguageSomeTranslations(a)&&(this.resolvedLanguage=a,this.languages.unshift(a))}}changeLanguage(a,o){this.isLanguageChangingTo=a;const r=ks();this.emit("languageChanging",a);const c=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},d=(m,p)=>{p?this.isLanguageChangingTo===a&&(c(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,r.resolve((...g)=>this.t(...g)),o&&o(m,(...g)=>this.t(...g))},f=m=>{!a&&!m&&this.services.languageDetector&&(m=[]);const p=Ae(m)?m:m&&m[0],g=this.store.hasLanguageSomeTranslations(p)?p:this.services.languageUtils.getBestMatchFromCodes(Ae(m)?[m]:m);g&&(this.language||c(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector?.cacheUserLanguage?.(g)),this.loadResources(g,S=>{d(S,g)})};return!a&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!a&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(f):this.services.languageDetector.detect(f):f(a),r}getFixedT(a,o,r){const c=(d,f,...m)=>{let p;typeof f!="object"?p=this.options.overloadTranslationOptionHandler([d,f].concat(m)):p={...f},p.lng=p.lng||c.lng,p.lngs=p.lngs||c.lngs,p.ns=p.ns||c.ns,p.keyPrefix!==""&&(p.keyPrefix=p.keyPrefix||r||c.keyPrefix);const g=this.options.keySeparator||".";let S;return p.keyPrefix&&Array.isArray(d)?S=d.map(b=>(typeof b=="function"&&(b=Rd(b,{...this.options,...f})),`${p.keyPrefix}${g}${b}`)):(typeof d=="function"&&(d=Rd(d,{...this.options,...f})),S=p.keyPrefix?`${p.keyPrefix}${g}${d}`:d),this.t(S,p)};return Ae(a)?c.lng=a:c.lngs=a,c.ns=o,c.keyPrefix=r,c}t(...a){return this.translator?.translate(...a)}exists(...a){return this.translator?.exists(...a)}setDefaultNamespace(a){this.options.defaultNS=a}hasLoadedNamespace(a,o={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=o.lng||this.resolvedLanguage||this.languages[0],c=this.options?this.options.fallbackLng:!1,d=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const f=(m,p)=>{const g=this.services.backendConnector.state[`${m}|${p}`];return g===-1||g===0||g===2};if(o.precheck){const m=o.precheck(this,f);if(m!==void 0)return m}return!!(this.hasResourceBundle(r,a)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(r,a)&&(!c||f(d,a)))}loadNamespaces(a,o){const r=ks();return this.options.ns?(Ae(a)&&(a=[a]),a.forEach(c=>{this.options.ns.indexOf(c)<0&&this.options.ns.push(c)}),this.loadResources(c=>{r.resolve(),o&&o(c)}),r):(o&&o(),Promise.resolve())}loadLanguages(a,o){const r=ks();Ae(a)&&(a=[a]);const c=this.options.preload||[],d=a.filter(f=>c.indexOf(f)<0&&this.services.languageUtils.isSupportedCode(f));return d.length?(this.options.preload=c.concat(d),this.loadResources(f=>{r.resolve(),o&&o(f)}),r):(o&&o(),Promise.resolve())}dir(a){if(a||(a=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!a)return"rtl";try{const c=new Intl.Locale(a);if(c&&c.getTextInfo){const d=c.getTextInfo();if(d&&d.direction)return d.direction}}catch{}const o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new sy(hd());return a.toLowerCase().indexOf("-latn")>1?"ltr":o.indexOf(r.getLanguagePartFromCode(a))>-1||a.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(a={},o){const r=new Ls(a,o);return r.createInstance=Ls.createInstance,r}cloneInstance(a={},o=fl){const r=a.forkResourceStore;r&&delete a.forkResourceStore;const c={...this.options,...a,isClone:!0},d=new Ls(c);if((a.debug!==void 0||a.prefix!==void 0)&&(d.logger=d.logger.clone(a)),["store","services","language"].forEach(m=>{d[m]=this[m]}),d.services={...this.services},d.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},r){const m=Object.keys(this.store.data).reduce((p,g)=>(p[g]={...this.store.data[g]},p[g]=Object.keys(p[g]).reduce((S,b)=>(S[b]={...p[g][b]},S),p[g]),p),{});d.store=new iy(m,c),d.services.resourceStore=d.store}if(a.interpolation){const p={...hd().interpolation,...this.options.interpolation,...a.interpolation},g={...c,interpolation:p};d.services.interpolator=new uy(g)}return d.translator=new kl(d.services,c),d.translator.on("*",(m,...p)=>{d.emit(m,...p)}),d.init(c,o),d.translator.options=c,d.translator.backendConnector.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},d}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Fe=Ls.createInstance();Fe.createInstance;Fe.dir;Fe.init;Fe.loadResources;Fe.reloadResources;Fe.use;Fe.changeLanguage;Fe.getFixedT;Fe.t;Fe.exists;Fe.setDefaultNamespace;Fe.hasLoadedNamespace;Fe.loadNamespaces;Fe.loadLanguages;const NN=(n,a,o,r)=>{const c=[o,{code:a,...r||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(c,"warn","react-i18next::",!0);Di(c[0])&&(c[0]=`react-i18next:: ${c[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...c):console?.warn&&console.warn(...c)},hy={},Jb=(n,a,o,r)=>{Di(o)&&hy[o]||(Di(o)&&(hy[o]=new Date),NN(n,a,o,r))},ex=(n,a)=>()=>{if(n.isInitialized)a();else{const o=()=>{setTimeout(()=>{n.off("initialized",o)},0),a()};n.on("initialized",o)}},_d=(n,a,o)=>{n.loadNamespaces(a,ex(n,o))},my=(n,a,o,r)=>{if(Di(o)&&(o=[o]),n.options.preload&&n.options.preload.indexOf(a)>-1)return _d(n,o,r);o.forEach(c=>{n.options.ns.indexOf(c)<0&&n.options.ns.push(c)}),n.loadLanguages(a,ex(n,r))},kN=(n,a,o={})=>!a.languages||!a.languages.length?(Jb(a,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:a.languages}),!0):a.hasLoadedNamespace(n,{lng:o.lng,precheck:(r,c)=>{if(o.bindI18n&&o.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!c(r.isLanguageChangingTo,n))return!1}}),Di=n=>typeof n=="string",AN=n=>typeof n=="object"&&n!==null,DN=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,TN={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},jN=n=>TN[n],MN=n=>n.replace(DN,jN);let zd={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:MN,transDefaultProps:void 0};const EN=(n={})=>{zd={...zd,...n}},ON=()=>zd;let tx;const PN=n=>{tx=n},LN=()=>tx,RN={type:"3rdParty",init(n){EN(n.options.react),PN(n)}},_N=C.createContext();class zN{constructor(){this.usedNamespaces={}}addUsedNamespaces(a){a.forEach(o=>{this.usedNamespaces[o]||(this.usedNamespaces[o]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var md={exports:{}},pd={};var py;function IN(){if(py)return pd;py=1;var n=Zd();function a(b,x){return b===x&&(b!==0||1/b===1/x)||b!==b&&x!==x}var o=typeof Object.is=="function"?Object.is:a,r=n.useState,c=n.useEffect,d=n.useLayoutEffect,f=n.useDebugValue;function m(b,x){var j=x(),N=r({inst:{value:j,getSnapshot:x}}),E=N[0].inst,L=N[1];return d(function(){E.value=j,E.getSnapshot=x,p(E)&&L({inst:E})},[b,j,x]),c(function(){return p(E)&&L({inst:E}),b(function(){p(E)&&L({inst:E})})},[b]),f(j),j}function p(b){var x=b.getSnapshot;b=b.value;try{var j=x();return!o(b,j)}catch{return!0}}function g(b,x){return x()}var S=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:m;return pd.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:S,pd}var gy;function UN(){return gy||(gy=1,md.exports=IN()),md.exports}var HN=UN();const BN=(n,a)=>Di(a)?a:AN(a)&&Di(a.defaultValue)?a.defaultValue:Array.isArray(n)?n[n.length-1]:n,KN={t:BN,ready:!1},qN=()=>()=>{},Et=(n,a={})=>{const{i18n:o}=a,{i18n:r,defaultNS:c}=C.useContext(_N)||{},d=o||r||LN();d&&!d.reportNamespaces&&(d.reportNamespaces=new zN),d||Jb(d,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const f=C.useMemo(()=>({...ON(),...d?.options?.react,...a}),[d,a]),{useSuspense:m,keyPrefix:p}=f,g=c||d?.options?.defaultNS,S=Di(g)?[g]:g||["translation"],b=C.useMemo(()=>S,S);d?.reportNamespaces?.addUsedNamespaces?.(b);const x=C.useRef(0),j=C.useCallback(z=>{if(!d)return qN;const{bindI18n:F,bindI18nStore:ee}=f,Q=()=>{x.current+=1,z()};return F&&d.on(F,Q),ee&&d.store.on(ee,Q),()=>{F&&F.split(" ").forEach(ge=>d.off(ge,Q)),ee&&ee.split(" ").forEach(ge=>d.store.off(ge,Q))}},[d,f]),N=C.useRef(),E=C.useCallback(()=>{if(!d)return KN;const z=!!(d.isInitialized||d.initializedStoreOnce)&&b.every(ve=>kN(ve,d,f)),F=a.lng||d.language,ee=x.current,Q=N.current;if(Q&&Q.ready===z&&Q.lng===F&&Q.keyPrefix===p&&Q.revision===ee)return Q;const te={t:d.getFixedT(F,f.nsMode==="fallback"?b:b[0],p),ready:z,lng:F,keyPrefix:p,revision:ee};return N.current=te,te},[d,b,p,f,a.lng]),[L,O]=C.useState(0),{t:D,ready:A}=HN.useSyncExternalStore(j,E,E);C.useEffect(()=>{if(d&&!A&&!m){const z=()=>O(F=>F+1);a.lng?my(d,a.lng,b,z):_d(d,b,z)}},[d,a.lng,b,A,m,L]);const k=d||{},T=C.useRef(null),w=C.useRef(),R=z=>{const F=Object.getOwnPropertyDescriptors(z);F.__original&&delete F.__original;const ee=Object.create(Object.getPrototypeOf(z),F);if(!Object.prototype.hasOwnProperty.call(ee,"__original"))try{Object.defineProperty(ee,"__original",{value:z,writable:!1,enumerable:!1,configurable:!1})}catch{}return ee},I=C.useMemo(()=>{const z=k,F=z?.language;let ee=z;z&&(T.current&&T.current.__original===z?w.current!==F?(ee=R(z),T.current=ee,w.current=F):ee=T.current:(ee=R(z),T.current=ee,w.current=F));const Q=[D,ee,A];return Q.t=D,Q.i18n=ee,Q.ready=A,Q},[D,k,A,k.resolvedLanguage,k.language,k.languages]);if(d&&m&&!A)throw new Promise(z=>{const F=()=>z();a.lng?my(d,a.lng,b,F):_d(d,b,F)});return I},nx="ccs-ui-locale",FN=["en","zh-CN","vi","ja"];function Ws(n){return n?n.toLowerCase().startsWith("ja")?"ja":n.toLowerCase().startsWith("zh")?"zh-CN":n.toLowerCase().startsWith("vi")?"vi":"en":"en"}function ax(){if(typeof window>"u")return null;try{const n=window.localStorage.getItem(nx);return n?Ws(n):null}catch{return null}}function GN(){const n=ax();return n||(typeof navigator<"u"?Ws(navigator.language):"en")}function of(n){const a=ax();return a||(typeof navigator<"u"?Ws(navigator.language):"en")}function VN(n){const a=Ws(n);if(typeof window<"u")try{window.localStorage.setItem(nx,a)}catch{}return a}const YN={en:{translation:{locale:{en:"English","zh-CN":"Simplified Chinese",vi:"Vietnamese",ja:"Japanese"},layout:{languageSwitcher:"Language"},nav:{general:"General",home:"Home",analytics:"Analytics",identityAccess:"Identity & Access",apiProfiles:"Profiles",cliproxyPlus:"CLIProxy Plus",cliproxyOverview:"Overview",controlPanel:"Control Panel",githubCopilot:"GitHub Copilot",cursorIde:"Cursor IDE",claudeExtension:"Claude Extension",accounts:"Accounts",allAccounts:"All Accounts",sharedData:"Shared Data",compatibleClis:"Compatible",factoryDroid:"Factory Droid",system:"System",health:"Health",logs:"Logs",settings:"Settings",openrouterTooltip:"Featured: OpenRouter + Alibaba Coding Plan + Ollama"},home:{profiles:"Profiles",cliproxy:"CLIProxy",accounts:"Accounts",health:"Health",configurationRequired:"Configuration Required"},auth:{dashboardTitle:"CCS Dashboard",protectedAccessLabel:"Protected access",remoteGuardLabel:"Remote access guard",loading:"Checking dashboard access…",loginDescription:"Use the username and password configured on the host to access the dashboard.",username:"Username",password:"Password",usernamePlaceholder:"Enter username",passwordPlaceholder:"Enter password",signIn:"Sign In",signingIn:"Signing in...",loginFailed:"Login failed",lightMode:"Light",darkMode:"Dark",noDefaultCredentials:"No default credentials ship with CCS.",credentialsHint:"Credentials are created on the host with `ccs config auth setup`, then used here.",remoteSetupTitle:"Remote access needs host setup",remoteSetupDescription:"This dashboard was opened from a non-local address, but dashboard auth is not enabled on the host yet.",incompleteSetupDescription:"Dashboard auth is turned on, but the host setup is incomplete. Finish the host configuration before signing in.",safetyNoteRemote:"Remote management stays locked until the host owner enables dashboard auth.",safetyNoteLocal:"If you are on the same machine, the localhost URL remains the simplest path in.",safetyNoteSession:"Successful sign-ins create an HTTP-only session that stays scoped to this host.",hostStepTitle:"On the host machine",hostStepDescription:"Create or re-enable dashboard credentials, then reopen this page from the remote device.",localStepTitle:"If this is your machine",localStepDescription:"Open the localhost URL printed by `ccs config` instead of the LAN or Tailscale address.",showPassword:"Show password",hidePassword:"Hide password"},commonToast:{apiKeyRequired:"API key is required",accountAddedPresetFailed:"Account added, but failed to apply default preset",settingsCopied:"Settings copied to clipboard",enterPresetName:"Please enter a preset name to save",codeCopied:"Code copied to clipboard",copyCodeFailed:"Failed to copy code",appliedModelAllTiers:"Applied model to all tiers",settingsSaved:"Settings saved",defaultTargetUpdated:"Default target updated",failedUpdateDefaultTarget:"Failed to update default target to {{target}}{{suffix}}"},profileDialog:{editTitle:"Edit Profile",createTitle:"Create API Profile",name:"Name",namePlaceholder:"my-api",baseUrl:"Base URL",baseUrlPlaceholder:"https://api.example.com",apiKey:"API Key",defaultModel:"Default Model (ANTHROPIC_MODEL)",defaultModelHint:"Leave blank to use: {{model}}",modelMappingTitle:"Model Mapping (Opus/Sonnet/Haiku)",modelMappingDesc:"Configure different model IDs for each tier. Useful for API proxies that route different model types to different backends.",opusModel:"Opus Model (ANTHROPIC_DEFAULT_OPUS_MODEL)",sonnetModel:"Sonnet Model (ANTHROPIC_DEFAULT_SONNET_MODEL)",haikuModel:"Haiku Model (ANTHROPIC_DEFAULT_HAIKU_MODEL)",cancel:"Cancel",saving:"Saving...",update:"Update",create:"Create"},modelTierMapping:{title:"Model Tier Mapping",advanced:"Advanced",description:"Configure different models for Claude Code's opus/sonnet/haiku tiers.",autoSuggest:"Auto-suggest based on {{provider}}",opusPlaceholder:"e.g., anthropic/claude-opus-4",sonnetPlaceholder:"e.g., anthropic/claude-sonnet-4",haikuPlaceholder:"e.g., anthropic/claude-3.5-haiku",footer:"These set ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL."},envEditor:{sensitive:"sensitive",none:"No environment variables configured.",noneHint:"Add variables using the input below or edit the JSON directly.",addVariable:"Add Environment Variable",keyPlaceholder:"VARIABLE_NAME",valuePlaceholder:"value"},setupVariant:{using:"Using:",variantNameRequired:"Variant Name *",variantNamePlaceholder:"e.g., my-gemini, g3, flash",invokeHintPrefix:"Use this name to invoke:",model:"Model",modelPlaceholder:"e.g., gemini-2.5-pro, claude-opus-4-6-thinking",choosePresetInstead:"Choose from presets instead",selectModel:"Select a model",customModelName:"Custom model name...",enterAnyModel:"Enter any model name supported by CLIProxy",defaultModel:"Default: {{model}}",providerDefault:"provider default",back:"Back",skip:"Skip",creating:"Creating...",createVariant:"Create Variant",skipHint:"Skip if you just wanted to add an account without creating a variant"},customPresetDialog:{title:"Custom Preset",presetNameOptional:"Preset Name (optional)",presetNamePlaceholder:"e.g., My Custom Config",codexTipPrefix:"Codex tip: suffixes",codexTipSuffix:"pin effort. Unsuffixed models use Thinking settings.",defaultModel:"Default Model",defaultModelDesc:"Used when no specific tier is requested",opusModel:"Opus (Most capable)",opusModelDesc:"For complex reasoning tasks",sonnetModel:"Sonnet (Balanced)",sonnetModelDesc:"Balance of speed and capability",haikuModel:"Haiku (Fast)",haikuModelDesc:"Quick responses for simple tasks",cancel:"Cancel",savePreset:"Save Preset",applyPreset:"Apply Preset"},componentModelSelector:{selectModel:"Select model",availableModelsCount:"Available Models ({{count}})",preview:"Preview"},searchableSelect:{searchModels:"Search models...",noResults:"No results found."},copilotSettings:{enableCopilot:"Enable Copilot",enableCopilotDesc:"Allow using GitHub Copilot subscription",basicSettings:"Basic Settings",accountType:"Account Type",accountTypeIndividual:"Individual",accountTypeBusiness:"Business",accountTypeEnterprise:"Enterprise",rateLimiting:"Rate Limiting",rateLimitSeconds:"Rate Limit (seconds)",noLimit:"No limit",waitOnRateLimit:"Wait on Rate Limit",waitOnRateLimitDesc:"Wait instead of error when limit hit",daemonSettings:"Daemon Settings",autoStartDaemon:"Auto-start Daemon",autoStartDaemonDesc:"Start copilot-api when using profile"},providerModelSelector:{selectModel:"Select model",noModelsForProvider:"No models available for this provider",broken:"BROKEN",deprecated:"DEPRECATED",paid:"PAID",freeTier:"Free Tier",paidTier:"Paid Tier",modelKnownIssues:"This model has known issues",viewIssueDetails:"View issue details",modelDeprecated:"This model is deprecated",recommended:"Recommended",allModelsCount:"All Models ({{count}})",noModelsAvailable:"No models available"},createAuthProfileDialog:{title:"Create New Account",description:"Auth profiles require Claude CLI login. Run the command below in your terminal. You can edit sync mode, group, and continuity depth later from the Accounts table.",profileName:"Profile Name",profileNamePlaceholder:"e.g., work, personal, client",invalidProfileName:"Name must start with a letter and contain only letters, numbers, dashes, or underscores.",enableSharedHistory:"Enable shared history sync with other ccs auth accounts",historySyncGroupOptional:"History Sync Group (optional)",historySyncGroupPlaceholder:"default, sprint-a, client-x",historySyncGroupHint:"Leave empty to use the default shared group. Spaces are normalized to dashes.",deeperContinuity:"Advanced: deeper continuity mode",deeperContinuityHint:"Adds sync for session-env, file-history, shell-snapshots, and todos. Credentials stay isolated.",invalidContextGroup:"Group must start with a letter and use only letters, numbers, dashes, or underscores (max {{max}} chars).",command:"Command",commandFallback:"ccs auth create <name>",afterRunPrefix:"After running the command:",afterRunStep1:"Complete the Claude login in your browser",afterRunStep2:"Return here and refresh to see the new account",poolingHint:"Prefer pooled Claude OAuth routing instead? Use CLIProxy Claude pool from the Accounts page action button.",close:"Close",copied:"Copied!",copyCommand:"Copy Command"},cliproxyModelCategory:{google:"Google (Gemini)",openai:"OpenAI (GPT)",anthropic:"Anthropic (Claude)",antigravity:"Antigravity",other:"Other"},cliproxyOverviewComponents:{availableModels:"Available Models",noModelsAvailable:"No models available",startSessionHint:"Start a CLIProxy session to fetch available models",totalCount:"{{count}} total",availableThroughGroupedByProvider:"Models available through {{backendLabel}}, grouped by provider",moreCount:"+{{count}} more"},categorizedModelSelector:{selectModel:"Select a model",noModelsAvailable:"No models available",modelPlaceholder:"Model..."},openrouterQuickStart:{recommended:"Recommended",title:"Start with OpenRouter",description:"Access {{modelCountLabel}} models from OpenAI, Anthropic, Google, Meta and more - all through one API.",featureOneApi:"One API, all providers",profileSummaryCount:"{{count}} profile",profileSummaryCount_other:"{{count}} profiles",profileSummaryEmpty:"Premium quality + local control",summaryBadgeDefaultQuality:"Best quality by default",summaryBadgeLocalLane:"Local lane when task fit wins",summaryExistingTitle:"Choose a profile or add another lane",summaryEmptyTitle:"Choose your first profile lane",summaryExistingDescription:"You already have {{count}} profile in this workspace. Keep premium-quality providers for serious coding and add local runtimes when privacy, cost, or offline work matters.",summaryExistingDescription_other:"You already have {{count}} profiles in this workspace. Keep premium-quality providers for serious coding and add local runtimes when privacy, cost, or offline work matters.",summaryEmptyDescription:"Pick the lane that matches the work. Premium providers stay the default for reliable coding. Local runtimes are best for privacy, cheaper transforms, and experimentation.",qualityLanesTitle:"Best quality lanes",qualityLaneHighlightDefaultQuality:"Best default lane for high-stakes coding quality",alibabaLaneDescription:"Strong direct coding profile when you want a dedicated premium lane outside the OpenRouter catalog.",alibabaLaneHighlightQuality:"Good when you want premium quality with a dedicated endpoint",localRuntimesTitle:"Local runtimes",localOllamaTitle:"Ollama + Gemma 4",localOllamaLabel:"Ollama",localOllamaHighlight:"Best for private prompts, local cleanup, and cheap batch transforms",localLlamacppTitle:"llama.cpp",localLlamacppLabel:"llama.cpp",localLlamacppHighlight:"Best for custom GGUF setups and advanced self-hosted local workflows",localDetectedModels:"{{count}} local model detected",localDetectedModels_other:"{{count}} local models detected",localNoModelsDetected:"No local models detected yet",localWaitingServer:"Waiting for a local server and model list",localRuntimeCheckingBadge:"Checking",localRuntimeReadyBadge:"Ready",localRuntimeNeedsModelBadge:"Needs model",localRuntimeOfflineBadge:"Offline",localRuntimeCheckingDescription:"Checking the local runtime status before showing setup guidance.",localRuntimeReadyDescription:"Best for private prompts, offline workflows, and cheaper batch transforms.",localRuntimeNeedsModelDescription:"The runtime is up, but the recommended local model still needs to be pulled or loaded.",localRuntimeOfflineDescription:"Use this lane for privacy-sensitive work, cheap local transforms, and offline sessions.",localRuntimeCheckingFooter:"Checking the local runtime...",localRuntimeReadyFooter:"Endpoint ready at {{endpoint}}",localRuntimeMissingModelFooter:"Run `{{command}}` to finish local setup.",localRuntimeOfflineFooter:"Run `{{command}}` to bring the local endpoint online.",localRuntimeSetupAction:"Set up {{label}}",localRuntimeUseAction:"Use {{label}}",localRuntimeFinishAction:"Finish {{label}} setup",runtimeProviderBadge:"Runtime provider setup",runtimeProviderTitle:"Open AI Providers",runtimeProviderManagedDescription:"Use this when you need CLIProxy-managed connectors, provider secrets, and advanced routing controls.",runtimeProviderFeatureConnectors:"Gemini, Codex, Claude, Vertex, and OpenAI-compatible connectors",runtimeProviderFeatureSecrets:"Shared secrets stay outside individual API profiles",runtimeProviderFooter:"Best when multiple profiles should share one provider configuration.",createOpenRouterProfile:"Create OpenRouter Profile",getApiKeyAt:"Get your API key at",createCustomProfile:"Create Custom API Profile"},alibabaCodingPlanQuickStart:{recommended:"Recommended",title:"Try Alibaba Coding Plan",description:"Use Alibaba Cloud Coding Plan through an Anthropic-compatible endpoint for coding workloads.",featureEndpoint:"Anthropic-compatible endpoint",featureKeyFormat:"Dedicated sk-sp API keys",createAlibabaProfile:"Create Alibaba Coding Plan Profile",readGuideAt:"Read setup guide at"},alibabaCodingPlanPromo:{title:"Alibaba Coding Plan",subtitle:"Model Studio Coding Plan via Anthropic endpoint",add:"Add"},credentialHealth:{title:"Credential Health",ready:"Ready",noCredentialsConfigured:"No credentials configured. Use the login buttons above to authenticate.",neverUsed:"Never used",justNow:"Just now",unknown:"Unknown",daysAgo:"{{count}}d ago",hoursAgo:"{{count}}h ago",minutesAgo:"{{count}}m ago"},proxyStatusWidget:{justNow:"just now",minutesAgo:"{{count}}m ago",hoursAgo:"{{count}}h ago",syncReady:"Sync Ready",noConfig:"No Config",remoteProxy:"Remote Proxy",active:"Active",trafficAutoRouted:"Traffic auto-routed to remote server",tooltipSync:"Sync profiles to CLIProxy",tooltipRestart:"Restart",tooltipStop:"Stop",tooltipClose:"Close",tooltipVersionSettings:"Version settings",versionManagement:"Version Management",selectVersionPlaceholder:"Select version to install...",stable:"(stable)",install:"Install",versionsAboveUnstable:"Versions above {{version}} have known issues",versionsKnownIssues:"Version {{version}} has known issues",lastChecked:"Last checked {{time}}",notRunning:"Not running",start:"Start",port:"Port {{port}}",sessionCount:"{{count}} session",sessionCount_other:"{{count}} sessions",installFaultyTitle:"Install Version With Known Issues?",installFaultyDesc:"You are about to install <strong>v{{version}}</strong>, which falls inside the known faulty range <strong>{{range}}</strong>.",installFaultyWarning:"This version has known bugs and may fail or leave the proxy in a bad state.",installUnstableTitle:"Install Unstable Version?",installUnstableDesc:"You are about to install <strong>v{{version}}</strong>, which is above the maximum stable version <strong>v{{maxStable}}</strong>.",installUnstableWarning:"This version has known stability issues and may cause unexpected behavior.",installUnstableConfirm:"Are you sure you want to proceed?",cancel:"Cancel",installAnyway:"Install Anyway",clickToDowngrade:"Click to downgrade",clickToUpdate:"Click to update"},syncStatusCard:{profileSync:"Profile Sync",ready:"Ready",noConfig:"No Config",syncsProfilesDesc:"Syncs API profiles to local CLIProxy config",runDoctorHint:"Run <code>ccs doctor --fix</code> to generate config.",details:"Details",syncNow:"Sync Now"},syncDialog:{title:"Sync Profiles to Local CLIProxy",description:"Sync your CCS API profiles to the local CLIProxy config.yaml.",noProfiles:"No profiles configured to sync.",createProfilesFirst:"Create API profiles first using the Profiles tab.",modelLabel:"Model:",ready:"Ready",profilesToSync_one:"{{count}} profile to sync",profilesToSync_other:"{{count}} profiles to sync",cancel:"Cancel",syncing:"Syncing...",synced:"Synced!",syncNow:"Sync Now"},errorLogs:{title:"Error Logs",failedRequests_one:"{{count}} failed request",failedRequests_other:"{{count}} failed requests",cliproxyDiagnostics:"CLIProxy Diagnostics",showingCount:"Showing 50 of {{total}} logs",selectLog:"Select a log to view details",failedLoadContent:"Failed to load log content",copyAbsolutePath:"Copy absolute path",copyRawContent:"Copy raw log content",tabOverview:"Overview",tabHeaders:"Headers",tabRequest:"Request",tabResponse:"Response",tabRaw:"Raw",modelLabel:"Model:",quotaResetsIn:"Quota resets in ",method:"Method",provider:"Provider",version:"Version",endpoint:"Endpoint",url:"URL",timestamp:"Timestamp",na:"N/A",noHeaders:"No headers available",noRequestBody:"No request body",noResponseBody:"No response body",rateLimitedMsg:"Rate Limited. Switch to a different account or wait for quota reset. Model {{model}} has exhausted quota.",rateLimitedMsgNoModel:"Rate Limited. Switch to a different account or wait for quota reset.",authFailedMsg:"Authentication failed. Re-authenticate via CLIProxy Settings or check API key.",notFoundMsg:"Endpoint not found. This endpoint may not exist on this provider.",serverErrorMsg:"Server error from upstream. Retry later or check provider status page.",timeoutMsg:"Request timed out. Check network connection or increase timeout settings.",unknown:"unknown"},editAccountContext:{title:"Edit History Sync",description:'Configure how "{{name}}" shares history and continuity with other ccs auth accounts.',syncMode:"Sync Mode",selectContextMode:"Select context mode",isolatedOption:"Isolated",sharedOption:"Shared",sharedModeHint:"Reuses workspace context across accounts in the same history group.",isolatedModeHint:"Keeps this account fully separate from other ccs auth accounts.",historySyncGroup:"History Sync Group",groupPlaceholder:"default",groupHint:"Normalized to lowercase (spaces become dashes). Allowed: letters, numbers, _ , - (max {{max}} chars).",invalidGroup:"Enter a valid group name that starts with a letter.",continuityDepth:"Continuity Depth",selectContinuityDepth:"Select continuity depth",standardOption:"Standard",deeperOption:"Deeper",deeperHint:"Syncs comprehensive session-env, file-history, shell-snapshots, and todos.",standardHint:"Standard mode syncs project workspace context only.",credentialsIsolated:"Credentials and .anthropic remain isolated per account in all modes.",implicationTitle:"What this means after save",isolatedImplication:"This account stays separate. Other accounts will not be able to resume its continuity state.",sameGroupRule:'Accounts must use the same group "{{group}}" before they can share continuity with each other.',noSameGroupPeer:"No other account currently shares this group.",sameGroupPeerCount_one:"{{count}} other account already shares this group.",sameGroupPeerCount_other:"{{count}} other accounts already share this group.",deeperReady_one:"{{count}} same-group account already uses deeper continuity. This is the strongest available handoff setup.",deeperReady_other:"{{count}} same-group accounts already use deeper continuity. This is the strongest available handoff setup.",deeperNeedsPeers:"Deeper continuity is enabled here, but another account in this group still needs deeper continuity for stronger cross-account resume expectations.",standardWarning:"Standard shared mode is good for project context only. Cross-account resume expectations are stronger when both accounts use deeper continuity.",resumeOriginalWarning:"If the old conversation matters, resume it from the original account before you change the setup.",cancel:"Cancel",save:"Save",saving:"Saving..."},historySyncLearningMap:{title:"How History Sync Works",description:"Isolated -> Shared -> Deeper. Cross-account resume needs the same group on both accounts.",learningMap:"Learning Map",isolated:"Isolated",shared:"Shared",deeper:"Deeper",cliproxyManaged_one:"{{count}} CLIProxy Claude pool account is managed in Action Center / CLIProxy page.",cliproxyManaged_other:"{{count}} CLIProxy Claude pool accounts are managed in Action Center / CLIProxy page.",showDetails:"Show details: groups, switching, and legacy policy",modeSwitch:"Mode Switch",modeSwitchDesc:"Use Sync on each account to move between isolated/shared and choose deeper continuity.",historySyncGroup:"History Sync Group",historySyncGroupDesc:"Same group is required before accounts can share continuity. Default fallback is default.",sameGroupRule:"Right now, accounts only share continuity when both are shared in the same group.",deeperRecommendation:'Group "{{group}}" is shared, but deeper continuity is still the safer choice if users expect cross-account resume.',partialGroup:'Group "{{group}}" is in good shape, but other accounts or groups still need the same-group or deeper setup.',readyGroup:'Group "{{group}}" already has deeper continuity on multiple accounts. This is the strongest available handoff setup.',legacyConfirmation_one:"{{count}} legacy account still needs explicit confirmation.",legacyConfirmation_other:"{{count}} legacy accounts still need explicit confirmation."},continuityReadiness:{title:"Cross-Account Resume Check",description:"Use this card to see what is missing before users switch accounts.",state:{single:"single account",isolated:"resume off","shared-alone":"shared but incomplete","shared-standard":"projects only",partial:"partially ready",ready:"stronger handoff ready"},metrics:{isolated:"Isolated",sharedPeers:"Shared With Peer",deeperReady:"Deeper Ready"},messages:{single:{title:"Only one auth account is configured.",description:"Cross-account handoff does not apply yet. Add another auth account before configuring shared continuity."},isolated:{title:"Cross-account resume is off right now.",description:"All visible accounts are isolated, so a session created in one account will stay with that account."},"shared-alone":{title:"Shared mode exists, but no group has a peer yet.",description_one:"{{count}} shared account is still waiting for another account in the same group.",description_other:"{{count}} shared accounts are still waiting for another account in the same group."},"shared-standard":{title:'Group "{{group}}" shares project context, but deeper continuity is not paired yet.',description:"Users may still expect more than project sharing. Enable deeper continuity on both accounts in this group for stronger handoff expectations."},partial:{title:"One group is ready, but the overall setup is still mixed.",description:"At least one group already uses deeper continuity, but other accounts are still isolated, alone in a shared group, or missing deeper continuity."},ready:{title:'Group "{{group}}" has the strongest available continuity setup.',description:"Multiple accounts in this group already use deeper continuity. Resume behavior still depends on what Claude stores upstream."}},stepsTitle:"What users should do next",steps:{syncBoth:"Open Sync on both accounts, not just the one you are switching into.",sameGroup:'Use the same History Sync Group on both accounts. "{{group}}" is the current recommended group.',enableDeeper:"If users expect cross-account resume instead of project-only sharing, turn on deeper continuity on both accounts.",resumeOriginal:"If the original conversation is important, resume it from the original account before changing continuity settings."},singleSteps:{addAccount:"Create a second ccs auth account before planning any cross-account handoff.",sameGroupLater:"When that second account exists, put both accounts in the same History Sync Group.",enableDeeperLater:"If users will expect cross-account resume instead of project-only sharing, enable deeper continuity on both accounts.",resumeOriginal:"If the original conversation is important, keep resuming it from the original account until the second account is ready."}},continuityOverview:{plainLaneTitle:"Plain ccs is using a different resume lane",plainLaneDescription:"Plain ccs currently resumes from {{lane}}, not this account lane. Recover the original lane first before changing sync settings.",setDefaultHint:"Use the Set Default action on the account you want plain ccs to follow in future sessions.",recommendBadge:"Recommend {{group}}",partialBadge:"Partial sync {{group}}",lane:{native:"native Claude (~/.claude)",accountDefault:"account {{name}}",accountInherited:"account {{name}} via continuity inheritance",profileDefault:"default profile {{name}} via native Claude lane"}},accountsTable:{name:"Name",type:"Type",defaultBadge:"default",created:"Created",lastUsed:"Last Used",historySync:"History Sync",actions:"Actions",syncTitle:"Edit sync mode, group, and continuity depth",confirmLegacyTitle:"Confirm this legacy account's current mode as explicit",sync:"Sync",confirm:"Confirm",active:"Active",setDefault:"Set Default",deleteAccount:"Delete account",cannotDeleteDefault:"Cannot delete default account",noAccounts:"No CCS auth accounts found. Use ccs auth create to add accounts.",resetToDefault:"Reset to CCS Default",deleteDialogTitle:"Delete Account",deleteDialogDesc:'Are you sure you want to delete the account "{{name}}"? This will remove the profile and all its session data. This action cannot be undone.',cancel:"Cancel",delete:"Delete",sharedGroupStandard:"shared ({{group}}, projects only)",sharedGroupDeeper:"shared ({{group}}, deeper continuity)",sharedGroupLegacy:"shared ({{group}}, projects only, legacy)",isolatedLegacy:"isolated (legacy default)",isolated:"isolated",noSameGroupPeer:"No same-group peer yet",sameGroupPeerCount_one:"{{count}} same-group peer",sameGroupPeerCount_other:"{{count}} same-group peers",legacyReview:"Review and confirm this inferred default.",noHandoff:"Cross-account resume stays in the original account.",badges:{shared:"Shared",deeper:"Deeper",legacy:"Legacy",isolated:"Isolated"}},addAccountDialog:{title:"Add {{displayName}} Account",descKiro:"Choose a Kiro auth method, then authenticate via browser or import from Kiro IDE.",descDeviceCode:"Click Authenticate. A verification code will appear for you to enter on the provider website.",descOauth:"Click Authenticate to get an OAuth URL. Open it in any browser to sign in.",powerUserEnabled:"Power user mode enabled",powerUserSkipped:"Settings > Proxy power user mode is skipping the AGY responsibility checklist and Gemini dashboard risk phrase. You accept full responsibility for OAuth/account risk.",powerUserLoadFailed:"Failed to load power user mode settings. Check Settings > Proxy and try again.",powerUserLoading:"Loading power user safety settings. Please wait a moment and retry.",powerUserUnavailableRetry:"Power user mode is unavailable. Complete the required provider safety step and retry.",authMethod:"Auth Method",selectKiroAuthMethod:"Select Kiro auth method",nicknameRequired:"Nickname (required)",nicknameOptional:"Nickname (optional)",nicknamePlaceholder:"e.g., work, personal",nicknameRequiredHint:"Required for this provider. Use a unique friendly name (e.g., work, personal).",nicknameOptionalHint:"A friendly name to identify this account. Leave blank to use a safe generated identifier.",waitingForAuth:"Waiting for authentication...",deviceCodeHint:"A verification code dialog will appear shortly. Enter the code on the provider website.",browserHint:"Complete the authentication in your browser. This dialog closes automatically.",openUrlLabel:"Open this URL in any browser to sign in:",copied:"Copied",copy:"Copy",open:"Open",popupBlocked:"Popup blocked. Copy the URL above and open it manually in your browser.",redirectPasteLabel:"Redirect didn't work? Paste the callback URL:",callbackPlaceholder:"Paste the redirect URL here...",submitCallback:"Submit Callback",submitting:"Submitting...",preparingUrl:"Preparing sign-in URL...",cancel:"Cancel",importingToken:"Importing token from Kiro IDE...",authenticate:"Authenticate",importFromIde:"Import from IDE",importing:"Importing..."},flowViz:{backToProviders:"Back to providers",showDetails:"Show Details",hideDetails:"Hide Details",showPausedAccounts:"Show Paused ({{count}})",hidePausedAccounts:"Hide Paused ({{count}})",visibleTotalRequests:"Visible Requests",visibleAccounts:"Visible Accounts",excludingPausedAccounts:"Excluding {{count}} paused",resetLayout:"Reset layout",provider:"Provider",totalRequests:"Total Requests",accounts:"Accounts",connectionTimeline:"Connection Timeline",noRecentConnections:"No recent connections"},quickStats:{totalRequests:"Total Requests",successRate:"Success Rate",totalTokens:"Total Tokens",activeModels:"Active Models"},authMonitor:{accounts:"Accounts",accountsCount:"{{count}} accounts",success:"Success",failed:"Failed",successRate:"Success Rate"},accountCard:{resumeAccount:"Resume account",pauseAccount:"Pause account",quotaLoading:"Quota...",quota:"Quota",quotaUnavailable:"Quota limits unavailable",reauthNeeded:"Reauth needed",failureLabelReauth:"Reauth",failureLabelWorkspace:"Workspace",failureLabelNoAccess:"No Access",failureLabelRetry:"Retry",failureLabelReconnect:"Reconnect",failureLabelTemporary:"Temporary",failureLabelUnavailable:"Unavailable",failureHintReauth:"Refresh this account by running its auth flow again.",failureHintWorkspace:"Move this account back to an active workspace, then remove and re-add it.",failureHintNoAccess:"This account cannot access the provider quota endpoint.",failureHintRetry:"Wait a bit, then retry the quota request.",failureHintReconnect:"Remove the stale account and authenticate it again.",failureHintTemporary:"Retry later. This looks temporary.",removeAndReadd:"Remove and re-add account",autoRefreshFailed:"Auto-refresh failed"},antigravityChecklist:{title:"Antigravity OAuth Responsibility",subtitle:"Complete all 4 steps before you can authenticate.",mandatory:"Mandatory",completion:"Completion",stepsCount:"{{current}}/4 steps"},accountSafetyWarning:{title:"OAuth Account Safety Warning",subtitle:"Issue #509 · Gemini + AGY OAuth risk",firstLine:"Issue #509 documents suspension/ban reports tied to ccs agy and shared-account usage between ccs gemini and ccs agy.",secondLine:"Continue only if you accept full responsibility for OAuth and account-access risk.",issueLabel:"Read issue #509",proxySettingsLabel:"Gemini + AGY controls: Settings > Proxy"},cliproxyDialog:{name:"Name",provider:"Provider",account:"Account",accountOptional:"Account (optional)",model:"Model",modelOptional:"Model (optional)",defaultTarget:"Default Target",defaultTier:"Default Tier",tierConfig:"Tier Configuration",selectProvider:"Select provider...",useDefaultAccount:"Use default account",defaultSuffix:"(default)",opus:"Opus",sonnet:"Sonnet",haiku:"Haiku",claudeCode:"Claude Code",factoryDroid:"Factory Droid",cancel:"Cancel",create:"Create",creating:"Creating...",saveChanges:"Save Changes",saving:"Saving...",placeholderName:"my-gemini",placeholderModel:"gemini-2.5-pro",placeholderComposite:"my-composite",placeholderModelId:"model-id",placeholderAccountId:"account-id",editCompositeTitle:"Edit Composite Variant: {{name}}",editSingleTitle:"Edit Single Variant: {{name}}"},profileEditor:{profileInfo:"Profile Information",profileName:"Profile Name",filePath:"File Path",lastModified:"Last Modified",defaultTarget:"Default Target",quickUsage:"Quick Usage",runWithProfile:"Run with profile",runOnDroid:"Run on Droid",runOnDroidWithFlag:"Run on Droid (--target)",droidAliasExplicit:"Droid alias (explicit)",overrideToClaude:"Override to Claude",overrideToClaudeExplicit:"Override to Claude (explicit)",targetHintPreferredAlias:"Preferred explicit alias:",targetHintClaudeDefault:"Default command:",targetHintLegacyAlias:"Legacy shortcut still works:",targetHintOverride:"You can still override each run with",setAsDefault:"Set as default",provider:"Provider",custom:"Custom",providerChooserHint:"Start with a preset, then adjust the URL, API key, or model mapping as needed.",featuredProviders:"Featured Providers",scrollHint:"Scroll if your screen is narrow",customEndpoint:"Custom Endpoint",morePresets:"More Presets",customEndpointDescription:"Start from a blank Anthropic-compatible URL and configure everything manually."},settings:{sectionLoadFailed:"Failed to load section",unknownError:"Unknown error occurred",reloadPage:"Reload page",refresh:"Refresh",copy:"Copy",copied:"Copied",saved:"Saved",loading:"Loading...",configFileNotFound:"Config file not found"},settingsTabs:{web:"Web",env:"Env",think:"Think",proxy:"Proxy",auth:"Auth",backup:"Backup"},settingsAuth:{failedFetchTokens:"Failed to fetch auth tokens",failedSaveTokens:"Failed to save tokens",tokensUpdated:"Tokens updated. Restart CLIProxy to apply.",failedRegenerate:"Failed to regenerate secret",secretRegenerated:"New management secret generated. Restart CLIProxy to apply.",failedReset:"Failed to reset tokens",tokensReset:"Tokens reset to defaults. Restart CLIProxy to apply.",description:"Configure CLIProxy authentication tokens. Changes require CLIProxy restart.",apiKey:"API Key",custom:"Custom",apiKeyDesc:"Used by Claude Code to authenticate with CLIProxy",apiKeyPlaceholder:"API key",managementSecret:"Management Secret",managementSecretDesc:"Used by CCS dashboard to access CLIProxy management APIs",managementSecretPlaceholder:"Management secret",generateSecret:"Generate new secure secret",resetDefaults:"Reset to Defaults",resetDesc:"Resets both API key and management secret to their default values.",saving:"Saving...",save:"Save"},settingsGlobalEnv:{description:"Environment variables injected into all non-Claude subscription profiles (gemini, codex, agy, ghcp, etc.)",enabled:"Global Env enabled",disabled:"Global Env disabled",enabledDesc:"Env vars will be injected into third-party profiles",disabledDesc:"Env vars will not be injected",envVars:"Environment Variables",noneConfigured:"No environment variables configured",addNew:"Add New Variable",keyName:"KEY_NAME",value:"value",add:"Add",quickAdd:"Quick Add Common Variables",allConfigured:"All common variables are configured"},settingsBackups:{failedFetch:"Failed to fetch backups",failedRestore:"Failed to restore backup",restoreSuccess:"Backup restored successfully",title:"Settings Backups",description:"Restore previous versions of your settings.json file. Backups are created automatically when settings are modified.",none:"No backups available",noneHint:"Backups will appear here when you modify settings",latest:"Latest",restoring:"Restoring...",restore:"Restore",restoreConfirmTitle:"Restore Backup?",restoreConfirmPrefix:"This will replace your current settings with backup from",restoreConfirmSuffix:"This action cannot be undone.",cancel:"Cancel"},settingsWebsearch:{description:"CLI-based web search for third-party profiles (gemini, codex, agy, etc.)",enabled:"WebSearch enabled",disabled:"WebSearch disabled",checking:"Checking status...",providers:"Providers",noneConfigured:"No providers configured",noneConfiguredHint:"Install CLI tools to enable web search providers",checkProviders:"Check for providers",installed:"installed",notInstalled:"not installed",model:"Model:",howInstall:"How to install {{name}} CLI",installGlobally:"Install globally",requiresKey:"(requires xAI API key)",freeTier:"(FREE tier available)",viewDocs:"View documentation"},settingsProxy:{failedLoadAgyMode:"Failed to load power user mode",failedUpdateAgyMode:"Failed to update power user mode",failedVerifyAgyMode:"Failed to verify power user mode persistence",notPersistedAgyMode:"Power user mode was not persisted. Config may have been modified by another process.",agyModeEnabled:"Power user mode enabled.",agyModeDisabled:"Power user mode disabled.",typePhraseToContinue:'Type "{{value}}" to continue.',description:"Configure local or remote {{backend}} connection for proxy-based profiles",backendPlus:"CLIProxy Plus",backend:"CLIProxy",instanceStatus:"Instance Status",connectionMode:"Connection Mode",local:"Local",remote:"Remote",localDesc:"Run {{backend}} binary on this machine",remoteDesc:"Connect to a remote {{backend}} server",backendBinary:"Backend Binary",stopProxyToSwitch:"Stop the running proxy in Instance Status to switch backend.",default:"Default",plusDesc:"Full provider support including Kiro and GitHub Copilot",originalDesc:"Original binary (Gemini, Codex, Antigravity only)",variantsIncompatible:"Existing Kiro/Copilot variants will not work with CLIProxyAPI. Switch to CLIProxyAPIPlus or remove those variants.",safety:"Safety",agyModeTitle:"Antigravity + Gemini Power User Mode",agyModeDesc:"Skip the AGY responsibility checklist and the Gemini dashboard typed acknowledgement.",agyWarning:"Use only if you fully understand the OAuth suspension/ban risk pattern (#509). CCS cannot assume responsibility for account loss.",finalConfirm:"Final confirmation required",finalConfirmDesc:"Enabling this will skip AGY safety checkpoints and the Gemini dashboard risk phrase gate. Review issue #509 and type the exact phrase to proceed.",step1:"Step 1",readIssue:"Read issue #509",step2:"Step 2",typePrefix:"Type",typeSuffix:"to enable.",typePhraseAria:"Type I ACCEPT RISK to enable Antigravity + Gemini power user mode",exactPhrase:"Exact phrase required.",enableAgyMode:"Enable Antigravity + Gemini Power User Mode",toggleAgyMode:"Toggle Antigravity + Gemini power user mode",fallbackSettings:"Fallback Settings",enableFallback:"Enable fallback to local",enableFallbackDesc:"Use local proxy if remote is unreachable",autoStartLocal:"Auto-start local proxy",autoStartLocalDesc:"Automatically start local proxy on fallback",advanced:"Advanced",debugMode:"Debug Mode",debugModeDesc:"Enable developer diagnostics in browser console",debugModeEnabled:"Debug mode enabled. Check browser console for detailed logs.",localProxy:"Local Proxy",port:"Port",autoStart:"Auto-start",localAutoStartDesc:"Start local proxy automatically when needed",remoteConfigTitle:"Remote Server Configuration",host:"Host",hostPlaceholder:"192.168.1.100 or proxy.example.com",defaultPort:"default: {{value}}",portPlaceholder:"Leave empty for {{value}}",protocol:"Protocol",http:"HTTP",https:"HTTPS",apiKeyOptional:"API Key (optional)",apiKeyPlaceholder:"For /v1/* API endpoints",apiKeyDesc:"Used for API requests to /v1/chat/completions",managementKeyOptional:"Management Key (optional)",managementKeyPlaceholder:"For /v0/management/* endpoints",managementKeyDesc:"Used for dashboard management APIs. Falls back to API Key if not set.",testing:"Testing...",testConnection:"Test Connection",connectedLatency:"Connected ({{value}}ms)",connectionFailed:"Connection failed",invalidPortOrEmpty:"Port must be an integer between 1 and 65535, or empty for default",invalidLocalPort:"Local port must be an integer between 1 and 65535",backendPlusApi:"CLIProxyAPIPlus",backendApi:"CLIProxyAPI"},settingsThinking:{description:"Configure extended thinking/reasoning for supported models.",supportedProviders:"Supported Providers",modeTitle:"Thinking Mode",modeAutoDesc:"Automatically set thinking based on model tier",modeOffDesc:"Disable extended thinking",modeManualDesc:"Set a persistent override level or use CLI flags per run",tierDefaults:"Tier Defaults",tierDefaultsDesc:"Default thinking level for each model tier when in auto mode.",persistentOverride:"Persistent Override",persistentOverrideDesc:"Applied to all sessions. CLI flags still take priority.",enterCustomBudget:"Enter custom budget",apply:"Apply",providerOverrides:"Provider Overrides ({{count}})",providerOverridesDesc:"Override tier defaults for specific providers. Add custom provider keys as needed.",addProviderPlaceholder:"Add provider key (e.g. qwen)",showWarnings:"Show Warnings",showWarningsDesc:"Display warnings when thinking values are clamped or adjusted",cliEnvOverride:"CLI & Env Override",supportLine1Prefix:"Thinking budget:",supportLine1Suffix:"(token-based)",supportLine2Prefix:"Reasoning effort:",supportLine2SuffixPrefix:"(suffix or ",supportLine2SuffixPostfix:": minimal/low/medium/high/xhigh)",supportLine3Prefix:"Codex suffixes pin effort (for example ",supportLine3Suffix:"); unsuffixed models use Thinking mode."},analytics:{title:"Analytics",subtitle:"Track usage and insights",month:"Month",allTime:"All Time",updated:"Updated {{value}}"},analyticsSummary:{totalTokens:"Total Tokens",totalTokensSubtitle:"{{input}} in / {{output}} out",totalCost:"Total Cost",totalCostSubtitle:"${{value}}/day avg",cacheTokens:"Cache Tokens",cacheTokensSubtitle:"${{cost}} ({{percent}}% of cost)",inputCost:"Input Cost",outputCost:"Output Cost",tokensSubtitle:"{{value}} tokens"},apiProfiles:{title:"Profiles",new:"New",searchPlaceholder:"Search profiles...",loadingProfiles:"Loading profiles...",failedLoadTitle:"Failed to load profiles",failedLoadDesc:"Unable to fetch API profiles. Please try again.",retry:"Retry",noProfilesYet:"No API profiles yet",noProfilesDesc:"Create your first profile to connect to custom API endpoints",createProfile:"Create Profile",noProfileMatch:'No profiles match "{{query}}"',profileCount:"{{count}} profile",profileCount_other:"{{count}} profiles",configuredCount:"{{count}} configured",deleteProfileTitle:"Delete Profile",deleteProfileDesc:'Are you sure you want to delete "{{name}}"? This will remove the settings file and cannot be undone.',delete:"Delete",unsavedChangesTitle:"Unsaved Changes",unsavedChangesDesc:'You have unsaved changes in "{{current}}". Discard and switch to "{{next}}"?',discardSwitch:"Discard and Switch"},accountsPage:{title:"Accounts",managePrefix:"Manage",manageSuffix:"accounts and pool onboarding from one panel.",mobileManageSuffix:"continuity per account.",primaryActions:"Primary Actions",createAccount:"Create Account",authClaudeInPool:"Authenticate Claude in Pool",openClaudePoolSettings:"Open Claude Pool Settings",openCliProxyClaudePool:"Open CLIProxy Claude Pool",migrationFollowup:"Migration Follow-up",legacyContextPending:"{{count}} account still needs first-time mode confirmation.",legacyContextPending_other:"{{count}} accounts still need first-time mode confirmation.",legacyContinuityPending:"{{count}} shared account remains on standard legacy continuity depth.",legacyContinuityPending_other:"{{count}} shared accounts remain on standard legacy continuity depth.",confirmingLegacy:"Confirming Legacy Policies...",confirmLegacy:"Confirm Legacy Policies ({{count}})",noLegacyFollowup:"No legacy follow-up pending.",continuityGuide:"Continuity Guide",expandWhenNeeded:"Expand only when needed.",sharedStandard:"Shared Standard",sharedStandardDesc:"Shared workspace only. Put both accounts in the same group before expecting any handoff.",sharedDeeper:"Shared Deeper",sharedDeeperPrefix:"Adds",sharedDeeperDesc:"Adds session-env, file-history, shell-snapshots, and todos. Recommended when users expect cross-account resume.",isolated:"Isolated",isolatedDesc:"No link. Conversations stay with the original account.",quickCommands:"Quick Commands",quickCommandsDesc:"Copy and run in terminal.",workspaceBadge:"ccs auth Workspace",historySyncBadge:"History & Resume Controls",authAccounts:"Auth Accounts",tableScopePrefix:"This table is intentionally scoped to",tableScopeMiddle:"accounts. Use",tableScopeSuffix:"for mode/group/depth changes.",accountMatrix:"Account Matrix",sharedTotalDesc:"Shared total: {{count}}. Actions include Sync settings and legacy confirmation.",loadingAccounts:"Loading accounts..."},health:{justNow:"just now",secondsAgo:"{{count}}s ago",minutesAgo:"{{count}}m ago",hoursAgo:"{{count}}h ago",systemHealth:"System Health",build:"build {{version}}",lastScan:"Last scan:",autoRefresh:"Auto-refresh:",refresh:"Refresh",checks:"Checks",version:"Version",platform:"Platform",liveMonitoring:"Live monitoring active",copied:"Copied to clipboard",refreshing:"Refreshing health checks...",fix:"Fix",applyFix:"Apply Fix",healthLabel:"health"},updates:{actionRequired:"Action Required",done:"Done",all:"All",inboxTitle:"Updates Center",inboxSubtitle:"Focus on actions, then mark updates done or dismissed.",needsAction:"Needs Action",doneCount:"Done",searchPlaceholder:"Search actions or commands",noNotices:"No notices match this view.",noUpdates:"No updates available.",published:"Published {{date}}",markDone:"Mark done",dismiss:"Dismiss",reopen:"Reopen",doNext:"Do Next",impactedIntegrations:"Impacted Integrations",impactedDesc:"Related areas based on update scope and routing.",whyMatters:"Why It Matters",whyMattersDesc:"Short context only, no wall-of-text release notes.",open:"Open",progressNeedsAction:"Needs Action",progressInReview:"In Review",progressDone:"Done",progressDismissed:"Dismissed",statusNew:"New",statusStable:"Stable",statusPlanned:"Planned",dashboard:"Dashboard",cliUsage:"CLI Usage"},cliproxyPage:{connected:"Connected",notConnected:"Not connected",variant:"variant",parentNotConnected:"Parent not connected",viaProvider:"via {{provider}}",emptyTitle:"CCS Profile Manager",emptyDesc:"Manage OAuth authentication, account preferences, and model selection for CLIProxy providers. Configure how CCS routes requests to different AI backends.",emptyControlPanelPrefix:"For live usage stats and real-time monitoring, visit the",controlPanel:"Control Panel",quickSetup:"Quick Setup",accountManagement:"CCS-level account management",providers:"Providers",variants:"Variants",providerCount:"{{count}} provider",providerCount_other:"{{count}} providers",connectedCount:"{{count}} connected",variantDisplay:"{{name}} ({{provider}} variant)"},copilotPage:{title:"Copilot",subtitle:"GitHub Copilot proxy",setup:"Setup",auth:"Auth",daemon:"Daemon",unofficialTitle:"Unofficial API - Use at Your Own Risk",unofficialItem1:"Reverse-engineered API - may break anytime",unofficialItem2:"Excessive use may trigger account restrictions",unofficialItem3:"No warranty, no responsibility from CCS",yes:"Yes",no:"No",installed:"Installed",missing:"Missing",integration:"Integration",enabled:"Enabled",disabled:"Disabled",github:"GitHub",connected:"Connected",notConnected:"Not Connected",authenticate:"Authenticate",authenticating:"Authenticating...",status:"Status",running:"Running",stopped:"Stopped",port:"Port",stopping:"Stopping...",stop:"Stop",starting:"Starting...",start:"Start",installing:"Installing...",installCopilotApi:"Install copilot-api",proxy:"Proxy",active:"Active",inactive:"Inactive"},cursorPage:{title:"Cursor",beta:"Beta",subtitle:"Dedicated Cursor integration controls",unofficialTitle:"Unofficial API - Use at Your Own Risk",unofficialItem1:"Reverse-engineered integration may break anytime",unofficialItem2:"Abuse or excessive usage may risk account restrictions",unofficialItem3:"No warranty, no responsibility from CCS",integration:"Integration",authentication:"Authentication",daemon:"Daemon",enabled:"Enabled",disabled:"Disabled",expired:"Expired",connected:"Connected",notConnected:"Not connected",running:"Running",stopped:"Stopped",actions:"Actions",disableIntegration:"Disable Integration",enableIntegration:"Enable Integration",autoDetectAuth:"Auto-detect Auth",manualAuthImport:"Manual Auth Import",stopDaemon:"Stop Daemon",startDaemon:"Start Daemon",port:"Port",configuration:"Cursor Configuration",lastModified:"Last modified:",neverSaved:"Never saved",saving:"Saving...",save:"Save",modelConfig:"Model Config",settings:"Settings",info:"Info",presets:"Presets",presetsDesc:"Apply pre-configured model mappings",modelMapping:"Model Mapping",modelMappingDesc:"Configure which models to use for each tier",defaultModel:"Default Model",defaultModelDesc:"Used when no specific tier is requested.",opusModel:"Opus (Most capable)",opusModelDesc:"Complex reasoning and highest quality responses.",sonnetModel:"Sonnet (Balanced)",sonnetModelDesc:"General coding and day-to-day chat workloads.",haikuModel:"Haiku (Fast)",haikuModelDesc:"Low-latency and lightweight request paths.",runtimeSettings:"Runtime Settings",autoStartDaemon:"Auto-start Daemon",autoStartDesc:"Start Cursor daemon automatically when integration is used.",ghostMode:"Ghost Mode",ghostModeDesc:"Request x-ghost-mode to reduce telemetry.",provider:"Provider",filePath:"File Path",availableModels:"Available Models",loadingModels:"Loading models...",noModels:"No model metadata available yet. Start daemon and refresh.",default:"Default",rawConfiguration:"Raw Configuration (JSON)",manualImportTitle:"Manual Cursor Auth Import",manualImportDesc:"Provide Cursor access token and machine ID if auto-detect is unavailable.",accessToken:"Access Token",accessTokenPlaceholder:"Paste Cursor access token",machineId:"Machine ID",machineIdPlaceholder:"32-char hex (UUID without hyphens)",cancel:"Cancel",import:"Import",selectModel:"Select model",useDefaultModel:"Use Default Model",availableModelCount:"Available Models ({{count}})",invalidPort:"Port must be an integer between 1 and 65535",defaultModelRequired:"Default model is required",savedConfig:"Cursor config and model mapping saved",failedSaveConfig:"Failed to save config",modelsLoadingWait:"Models are still loading. Please wait before applying a preset.",noModelsAvailable:"No models available yet. Start the daemon and refresh first.",appliedCodexPreset:"Applied GPT-5.3 Codex preset",appliedClaudePreset:"Applied Claude 4.6 preset",appliedGeminiPreset:"Applied Gemini 3 preset",integrationEnabled:"Cursor integration enabled",integrationDisabled:"Cursor integration disabled",failedUpdateIntegration:"Failed to update integration state",credentialsImported:"Cursor credentials imported",autoDetectFailed:"Auto-detect failed",manualRequired:"Token and machine ID are required",manualImportFailed:"Manual import failed",failedStartDaemon:"Failed to start daemon",daemonStarted:"Daemon started",daemonStartedWithPid:"Daemon started (PID: {{pid}})",failedStopDaemon:"Failed to stop daemon",daemonStopped:"Daemon stopped",rawLoading:"Raw settings are still loading. Please wait and try again.",invalidJson:"Invalid JSON",rawSaved:"Raw settings saved",rawChanged:"Raw settings changed externally. Refresh and retry.",failedSaveRaw:"Failed to save raw settings",savedAll:"Cursor configuration saved",liveProbe:"Live Probe",runLiveProbe:"Run Live Probe",rerunLiveProbe:"Re-run Live Probe",probing:"Running probe...",probeNotRun:"Probe not run yet",probeLocalReadinessHint:"Local readiness checks can pass while live runtime access still fails. Use the live probe to verify the full Cursor path.",probeStage:"Stage",probeHttpStatus:"HTTP Status",probeDuration:"Duration",probeModel:"Model",probeMessage:"Message",probeSucceeded:"Probe succeeded",probeFailed:"Probe failed",probeSaveFirst:"Save or discard Cursor changes before running the live probe",refreshStatus:"Refresh Cursor status",refreshConfiguration:"Refresh Cursor configuration"},droidPage:{loadingDiagnostics:"Loading Droid diagnostics...",failedDiagnostics:"Failed to load Droid diagnostics.",overview:"Overview",byok:"BYOK",docs:"Docs",runtimeInstall:"Runtime and Installation",status:"Status",detected:"Detected",notFound:"Not Found",detectionSource:"Detection source",binaryPath:"Binary path",installDirectory:"Install directory",version:"Version",overridePath:"Override (CCS_DROID_PATH)",configFiles:"Config Files",path:"Path",resolved:"Resolved",size:"Size",lastModified:"Last modified",parseWarning:"Parse warning: {{value}}",readWarning:"Read warning: {{value}}",warnings:"Warnings",byokSummary:"BYOK Summary",activeModelSelector:"Active model selector",customModels:"Custom models",ccsManaged:"CCS-managed",userManaged:"User-managed",malformedEntries:"Malformed entries",providers:"Providers",none:"none",customModelsTitle:"Custom Models",modelName:"Name / Model",provider:"Provider",baseUrl:"Base URL",noCustomModels:"No custom models",docsAlignedNotes:"Docs-Aligned Notes",factoryDocs:"Factory Docs",providerFactCheckDocs:"Provider Fact-Check Docs",providerValues:"Provider values: {{value}}",settingsHierarchy:"Settings hierarchy: {{value}}",settingsTitle:"Droid BYOK Settings",fixJsonBeforeQuickSettings:"Fix JSON syntax before using quick settings controls.",fixJsonBeforeReasoning:"Fix JSON syntax before updating BYOK reasoning settings.",unableUpdateReasoning:"Unable to update selected BYOK model reasoning setting.",fixJsonBeforeBudget:"Fix JSON syntax before updating thinking budget.",anthropicOnlyBudget:"Thinking budget is only available for Anthropic BYOK models.",invalidJson:"Invalid JSON: {{value}}",saved:"Droid settings saved",changedExternally:"Droid settings changed externally. Refresh and retry.",failedSave:"Failed to save Droid settings"},sharedPage:{commands:"Commands",skills:"Skills",agents:"Agents",title:"Shared Data",subtitle:"Commands, skills, and agents shared across Claude instances",totalShared:"Total Shared",visible:"Visible",markdownDetail:"Markdown detail view",filterPrefix:"Filter:",configurationRequired:"Configuration Required",countsUnavailable:"Counts unavailable",retryCounts:"Retry counts",filterPlaceholder:"Filter {{tab}} by name, description, or path",showing:"Showing {{visible}} of {{total}} {{tab}}",showingQuery:' for "{{query}}"',refreshing:" (refreshing...)",loadingShared:"Loading shared {{tab}}...",failedLoadShared:"Failed to load shared {{tab}}",retry:"Retry",noSharedFound:"No shared {{tab}} found. Run `ccs sync` or add items in your shared directory.",noMatch:'No {{tab}} match "{{query}}".',selectOne:"Select a {{tab}} to view full content.",pathLabel:"Path",resolvedSource:"Resolved Source",loadingMarkdown:"Loading markdown content...",failedLoadContent:"Failed to load content",retryContent:"Retry content",noMarkdown:"No markdown content available."}}},"zh-CN":{translation:{locale:{en:"English","zh-CN":"简体中文",vi:"越南语",ja:"日语"},layout:{languageSwitcher:"语言"},nav:{general:"通用",home:"首页",analytics:"分析",identityAccess:"身份与访问",apiProfiles:"API 配置",cliproxyPlus:"CLIProxy Plus",cliproxyOverview:"概览",controlPanel:"控制面板",githubCopilot:"GitHub Copilot",cursorIde:"Cursor IDE",claudeExtension:"Claude Extension",accounts:"账号",allAccounts:"全部账号",sharedData:"共享数据",compatibleClis:"兼容",factoryDroid:"Factory Droid",system:"系统",health:"健康",settings:"设置",openrouterTooltip:"精选:OpenRouter + Alibaba Coding Plan + Ollama"},home:{profiles:"配置",cliproxy:"CLIProxy",accounts:"账号",health:"健康",configurationRequired:"需要配置"},auth:{dashboardTitle:"CCS 控制台",protectedAccessLabel:"受保护访问",remoteGuardLabel:"远程访问保护",loading:"正在检查控制台访问状态…",loginDescription:"使用主机上配置的用户名和密码访问控制台。",username:"用户名",password:"密码",usernamePlaceholder:"请输入用户名",passwordPlaceholder:"请输入密码",signIn:"登录",signingIn:"登录中...",loginFailed:"登录失败",lightMode:"浅色",darkMode:"深色",noDefaultCredentials:"CCS 不提供默认用户名或密码。",credentialsHint:"凭据需要在主机上通过 `ccs config auth setup` 创建,然后在这里使用。",remoteSetupTitle:"远程访问需要在主机上完成设置",remoteSetupDescription:"当前通过非本机地址打开控制台,但主机尚未启用控制台认证。",incompleteSetupDescription:"控制台认证已开启,但主机上的设置尚未完成。请先完成主机配置再登录。",safetyNoteRemote:"在主机所有者启用控制台认证前,远程管理会保持锁定。",safetyNoteLocal:"如果你就在这台机器上,使用 localhost 地址始终是最直接的方式。",safetyNoteSession:"登录成功后会创建仅限此主机的 HTTP-only 会话。",hostStepTitle:"在主机上操作",hostStepDescription:"创建或重新启用控制台凭据,然后再从远程设备重新打开此页面。",localStepTitle:"如果这就是你的机器",localStepDescription:"请使用 `ccs config` 输出的 localhost 地址,而不是局域网或 Tailscale 地址。",showPassword:"显示密码",hidePassword:"隐藏密码"},commonToast:{apiKeyRequired:"API key 为必填项",accountAddedPresetFailed:"账号已添加,但应用默认预设失败",settingsCopied:"设置已复制到剪贴板",enterPresetName:"请先输入预设名称再保存",codeCopied:"验证码已复制到剪贴板",copyCodeFailed:"复制验证码失败",appliedModelAllTiers:"已将模型应用到全部层级",settingsSaved:"设置已保存",defaultTargetUpdated:"默认目标已更新",failedUpdateDefaultTarget:"更新默认目标到 {{target}} 失败{{suffix}}"},profileDialog:{editTitle:"编辑配置",createTitle:"创建 API 配置",name:"名称",namePlaceholder:"my-api",baseUrl:"Base URL",baseUrlPlaceholder:"https://api.example.com",apiKey:"API Key",defaultModel:"默认模型(ANTHROPIC_MODEL)",defaultModelHint:"留空则使用:{{model}}",modelMappingTitle:"模型映射(Opus/Sonnet/Haiku)",modelMappingDesc:"为不同档位配置不同模型 ID,适合按模型类型路由到不同后端的 API 代理。",opusModel:"Opus 模型(ANTHROPIC_DEFAULT_OPUS_MODEL)",sonnetModel:"Sonnet 模型(ANTHROPIC_DEFAULT_SONNET_MODEL)",haikuModel:"Haiku 模型(ANTHROPIC_DEFAULT_HAIKU_MODEL)",cancel:"取消",saving:"保存中...",update:"更新",create:"创建"},modelTierMapping:{title:"模型档位映射",advanced:"高级",description:"为 Claude Code 的 opus/sonnet/haiku 档位配置不同模型。",autoSuggest:"基于 {{provider}} 自动建议",opusPlaceholder:"例如:anthropic/claude-opus-4",sonnetPlaceholder:"例如:anthropic/claude-sonnet-4",haikuPlaceholder:"例如:anthropic/claude-3.5-haiku",footer:"这些字段对应 ANTHROPIC_DEFAULT_OPUS_MODEL、ANTHROPIC_DEFAULT_SONNET_MODEL、ANTHROPIC_DEFAULT_HAIKU_MODEL。"},envEditor:{sensitive:"敏感",none:"尚未配置环境变量。",noneHint:"可在下方输入添加,或直接编辑 JSON。",addVariable:"添加环境变量",keyPlaceholder:"VARIABLE_NAME",valuePlaceholder:"value"},setupVariant:{using:"当前使用:",variantNameRequired:"变体名称 *",variantNamePlaceholder:"例如:my-gemini、g3、flash",invokeHintPrefix:"可通过该名称调用:",model:"模型",modelPlaceholder:"例如:gemini-2.5-pro、claude-opus-4-6-thinking",choosePresetInstead:"改为从预设中选择",selectModel:"选择模型",customModelName:"自定义模型名称...",enterAnyModel:"可输入 CLIProxy 支持的任意模型名",defaultModel:"默认:{{model}}",providerDefault:"提供商默认值",back:"返回",skip:"跳过",creating:"创建中...",createVariant:"创建变体",skipHint:"如果你只想添加账号而不创建变体,可以直接跳过"},customPresetDialog:{title:"自定义预设",presetNameOptional:"预设名称(可选)",presetNamePlaceholder:"例如:我的自定义配置",codexTipPrefix:"Codex 提示:后缀",codexTipSuffix:"会固定 effort。无后缀模型使用 Thinking 设置。",defaultModel:"默认模型",defaultModelDesc:"未指定档位时使用",opusModel:"Opus(最强)",opusModelDesc:"用于复杂推理任务",sonnetModel:"Sonnet(均衡)",sonnetModelDesc:"兼顾速度与能力",haikuModel:"Haiku(快速)",haikuModelDesc:"适合简单任务的快速响应",cancel:"取消",savePreset:"保存预设",applyPreset:"应用预设"},componentModelSelector:{selectModel:"选择模型",availableModelsCount:"可用模型({{count}})",preview:"预览"},searchableSelect:{searchModels:"搜索模型...",noResults:"未找到匹配结果。"},copilotSettings:{enableCopilot:"启用 Copilot",enableCopilotDesc:"允许使用 GitHub Copilot 订阅",basicSettings:"基础设置",accountType:"账户类型",accountTypeIndividual:"个人",accountTypeBusiness:"企业",accountTypeEnterprise:"组织",rateLimiting:"速率限制",rateLimitSeconds:"速率限制(秒)",noLimit:"不限制",waitOnRateLimit:"触发限速时等待",waitOnRateLimitDesc:"达到限制时等待而不是报错",daemonSettings:"守护进程设置",autoStartDaemon:"自动启动守护进程",autoStartDaemonDesc:"使用配置时自动启动 copilot-api"},providerModelSelector:{selectModel:"选择模型",noModelsForProvider:"该提供商暂无可用模型",broken:"故障",deprecated:"已弃用",paid:"付费",freeTier:"免费档",paidTier:"付费档",modelKnownIssues:"该模型存在已知问题",viewIssueDetails:"查看问题详情",modelDeprecated:"该模型已弃用",recommended:"推荐",allModelsCount:"全部模型({{count}})",noModelsAvailable:"暂无可用模型"},createAuthProfileDialog:{title:"创建新账号",description:"Auth 配置需要先完成 Claude CLI 登录。请在终端执行下方命令。稍后你仍可在 Accounts 表中编辑同步模式、分组与连续性深度。",profileName:"配置名称",profileNamePlaceholder:"例如:work、personal、client",invalidProfileName:"名称必须以字母开头,且只能包含字母、数字、短横线或下划线。",enableSharedHistory:"与其他 ccs auth 账号启用共享历史同步",historySyncGroupOptional:"历史同步分组(可选)",historySyncGroupPlaceholder:"default、sprint-a、client-x",historySyncGroupHint:"留空将使用默认共享分组。空格会自动规范为短横线。",deeperContinuity:"高级:更深连续性模式",deeperContinuityHint:"会同步 session-env、file-history、shell-snapshots 与 todos。凭据仍保持隔离。",invalidContextGroup:"分组必须以字母开头,且只能包含字母、数字、短横线或下划线(最多 {{max}} 个字符)。",command:"命令",commandFallback:"ccs auth create <name>",afterRunPrefix:"执行命令后:",afterRunStep1:"在浏览器中完成 Claude 登录",afterRunStep2:"返回此处并刷新,即可看到新账号",poolingHint:"如果更倾向于共享池化 Claude OAuth 路由,可在 Accounts 页面操作按钮中使用 CLIProxy Claude pool。",close:"关闭",copied:"已复制!",copyCommand:"复制命令"},cliproxyModelCategory:{google:"Google(Gemini)",openai:"OpenAI(GPT)",anthropic:"Anthropic(Claude)",antigravity:"Antigravity",other:"其他"},cliproxyOverviewComponents:{availableModels:"可用模型",noModelsAvailable:"暂无可用模型",startSessionHint:"启动 CLIProxy 会话后即可拉取可用模型",totalCount:"共 {{count}} 个",availableThroughGroupedByProvider:"通过 {{backendLabel}} 提供的模型,按提供商分组",moreCount:"另外 {{count}} 个"},categorizedModelSelector:{selectModel:"选择模型",noModelsAvailable:"暂无可用模型",modelPlaceholder:"模型..."},openrouterQuickStart:{recommended:"推荐",title:"从 OpenRouter 开始",description:"通过一个 API 即可访问来自 OpenAI、Anthropic、Google、Meta 等的 {{modelCountLabel}} 个模型。",featureOneApi:"一个 API,接入全部提供商",profileSummaryCount:"{{count}} 个配置",profileSummaryCount_other:"{{count}} 个配置",profileSummaryEmpty:"高级质量 + 本地控制",summaryBadgeDefaultQuality:"默认最佳质量",summaryBadgeLocalLane:"任务合适时使用本地通道",summaryExistingTitle:"选择一个配置,或添加新的通道",summaryEmptyTitle:"选择你的第一条配置通道",summaryExistingDescription:"此工作区中已存在 {{count}} 个配置。对于严肃编码工作请优先使用高质量提供商,而在隐私、成本或离线场景下再增加本地运行时。",summaryExistingDescription_other:"此工作区中已存在 {{count}} 个配置。对于严肃编码工作请优先使用高质量提供商,而在隐私、成本或离线场景下再增加本地运行时。",summaryEmptyDescription:"根据任务选择通道。高级提供商仍是可靠编码的默认选择;本地运行时更适合隐私、低成本转换和实验。",qualityLanesTitle:"高质量通道",qualityLaneHighlightDefaultQuality:"高风险编码任务的默认最佳通道",alibabaLaneDescription:"当你想要一个独立于 OpenRouter 目录之外的高级编码通道时,这是一个强力的直连配置。",alibabaLaneHighlightQuality:"适合需要独立端点的高级质量场景",localRuntimesTitle:"本地运行时",localOllamaTitle:"Ollama + Gemma 4",localOllamaLabel:"Ollama",localOllamaHighlight:"最适合隐私敏感提示、本地清理和低成本批处理转换",localLlamacppTitle:"llama.cpp",localLlamacppLabel:"llama.cpp",localLlamacppHighlight:"最适合自定义 GGUF 部署和高级自托管本地工作流",localDetectedModels:"已检测到 {{count}} 个本地模型",localDetectedModels_other:"已检测到 {{count}} 个本地模型",localNoModelsDetected:"尚未检测到本地模型",localWaitingServer:"正在等待本地服务和模型列表",localRuntimeCheckingBadge:"检测中",localRuntimeReadyBadge:"就绪",localRuntimeNeedsModelBadge:"缺少模型",localRuntimeOfflineBadge:"离线",localRuntimeCheckingDescription:"正在检查本地运行时状态,然后再显示设置引导。",localRuntimeReadyDescription:"最适合私有提示、离线工作流和更便宜的批量转换。",localRuntimeNeedsModelDescription:"运行时已启动,但推荐的本地模型仍需要拉取或加载。",localRuntimeOfflineDescription:"这个通道适合隐私敏感工作、低成本本地转换和离线会话。",localRuntimeCheckingFooter:"正在检查本地运行时...",localRuntimeReadyFooter:"端点已就绪:{{endpoint}}",localRuntimeMissingModelFooter:"运行 `{{command}}` 完成本地设置。",localRuntimeOfflineFooter:"运行 `{{command}}` 启动本地端点。",localRuntimeSetupAction:"设置 {{label}}",localRuntimeUseAction:"使用 {{label}}",localRuntimeFinishAction:"完成 {{label}} 设置",runtimeProviderBadge:"运行时提供商设置",runtimeProviderTitle:"打开 AI Providers",runtimeProviderManagedDescription:"当你需要 CLIProxy 管理的连接器、提供商密钥和高级路由控制时使用这里。",runtimeProviderFeatureConnectors:"Gemini、Codex、Claude、Vertex 以及 OpenAI 兼容连接器",runtimeProviderFeatureSecrets:"共享密钥与单个 API 配置分离存放",runtimeProviderFooter:"当多个配置需要共享同一提供商设置时最适合使用。",createOpenRouterProfile:"创建 OpenRouter 配置",getApiKeyAt:"在此获取 API Key:",createCustomProfile:"创建自定义 API 配置"},alibabaCodingPlanQuickStart:{recommended:"推荐",title:"试用阿里云 Coding Plan",description:"通过 Anthropic 兼容端点接入阿里云 Model Studio Coding Plan。",featureEndpoint:"Anthropic 兼容端点",featureKeyFormat:"专用 sk-sp API Key",createAlibabaProfile:"创建 Alibaba Coding Plan 配置",readGuideAt:"查看配置文档:"},alibabaCodingPlanPromo:{title:"Alibaba Coding Plan",subtitle:"通过 Anthropic 端点接入 Model Studio Coding Plan",add:"添加"},credentialHealth:{title:"凭据健康状态",ready:"就绪",noCredentialsConfigured:"尚未配置凭据。请使用上方登录按钮完成认证。",neverUsed:"从未使用",justNow:"刚刚",unknown:"未知",daysAgo:"{{count}} 天前",hoursAgo:"{{count}} 小时前",minutesAgo:"{{count}} 分钟前"},proxyStatusWidget:{justNow:"刚刚",minutesAgo:"{{count}} 分钟前",hoursAgo:"{{count}} 小时前",syncReady:"同步就绪",noConfig:"未配置",remoteProxy:"远程代理",active:"已连接",trafficAutoRouted:"流量已自动转发到远程服务器",tooltipSync:"同步配置到 CLIProxy",tooltipRestart:"重启",tooltipStop:"停止",tooltipClose:"关闭",tooltipVersionSettings:"版本设置",versionManagement:"版本管理",selectVersionPlaceholder:"选择要安装的版本...",stable:"(稳定版)",install:"安装",versionsAboveUnstable:"高于 {{version}} 的版本存在已知问题",versionsKnownIssues:"版本 {{version}} 存在已知问题",lastChecked:"上次检查 {{time}}",notRunning:"未运行",start:"启动",port:"端口 {{port}}",sessionCount:"{{count}} 个会话",sessionCount_other:"{{count}} 个会话",installFaultyTitle:"安装存在已知问题的版本?",installFaultyDesc:"即将安装 <strong>v{{version}}</strong>,该版本位于已知故障范围 <strong>{{range}}</strong> 内。",installFaultyWarning:"该版本存在已知缺陷,可能安装失败或让代理处于异常状态。",installUnstableTitle:"安装非稳定版本?",installUnstableDesc:"即将安装 <strong>v{{version}}</strong>,该版本高于当前最大稳定版 <strong>v{{maxStable}}</strong>。",installUnstableWarning:"该版本存在已知稳定性问题,可能导致异常行为。",installUnstableConfirm:"确定要继续吗?",cancel:"取消",installAnyway:"仍要安装",clickToDowngrade:"点击降级",clickToUpdate:"点击更新"},syncStatusCard:{profileSync:"配置同步",ready:"就绪",noConfig:"未配置",syncsProfilesDesc:"将 API 配置同步到本地 CLIProxy 配置",runDoctorHint:"运行 <code>ccs doctor --fix</code> 生成配置。",details:"详情",syncNow:"立即同步"},syncDialog:{title:"同步配置到本地 CLIProxy",description:"将 CCS API 配置同步到本地 CLIProxy 的 config.yaml。",noProfiles:"没有可同步的配置。",createProfilesFirst:"请先在「配置」页创建 API 配置。",modelLabel:"模型:",ready:"就绪",profilesToSync_one:"{{count}} 个配置待同步",profilesToSync_other:"{{count}} 个配置待同步",cancel:"取消",syncing:"同步中...",synced:"已同步!",syncNow:"立即同步"},errorLogs:{title:"错误日志",failedRequests_one:"{{count}} 个失败请求",failedRequests_other:"{{count}} 个失败请求",cliproxyDiagnostics:"CLIProxy 诊断",showingCount:"显示 50 / {{total}} 条",selectLog:"选择一条日志查看详情",failedLoadContent:"加载日志内容失败",copyAbsolutePath:"复制绝对路径",copyRawContent:"复制原始日志",tabOverview:"概览",tabHeaders:"请求头",tabRequest:"请求体",tabResponse:"响应体",tabRaw:"原始",modelLabel:"模型:",quotaResetsIn:"配额重置于 ",method:"方法",provider:"提供商",version:"版本",endpoint:"端点",url:"URL",timestamp:"时间戳",na:"无",noHeaders:"无请求头",noRequestBody:"无请求体内容",noResponseBody:"无响应体内容",rateLimitedMsg:"触发限速。请切换账号或等待配额重置。模型 {{model}} 配额已用尽。",rateLimitedMsgNoModel:"触发限速。请切换账号或等待配额重置。",authFailedMsg:"认证失败。请通过 CLIProxy 设置重新认证或检查 API Key。",notFoundMsg:"端点未找到,该提供商可能不存在此端点。",serverErrorMsg:"上游服务器错误。请稍后重试或查看提供商状态页。",timeoutMsg:"请求超时。请检查网络或增大超时设置。",unknown:"未知"},editAccountContext:{title:"编辑历史同步",description:"配置「{{name}}」与其他 ccs auth 账号共享历史与连续性的方式。",syncMode:"同步模式",selectContextMode:"选择同步模式",isolatedOption:"隔离(不同步)",sharedOption:"共享(启用同步)",sharedModeHint:"共享模式会为同一历史同步分组内的账号复用工作区上下文。",isolatedModeHint:"隔离模式使该账号与其他 ccs auth 账号完全独立。",historySyncGroup:"历史同步分组",groupPlaceholder:"default",groupHint:"会规范为小写(空格变为短横线)。允许:字母、数字、_、-(最多 {{max}} 字符)。",invalidGroup:"请输入以字母开头的有效分组名。",continuityDepth:"连续性深度",selectContinuityDepth:"选择连续性深度",standardOption:"标准(仅项目)",deeperOption:"更深连续性(高级)",deeperHint:"高级模式还会同步 session-env、file-history、shell-snapshots 和 todos。",standardHint:"标准模式仅同步项目工作区上下文。",credentialsIsolated:"凭据与 .anthropic 在所有模式下均按账号隔离。",implicationTitle:"保存后会发生什么",isolatedImplication:"该账号会继续保持隔离,其他账号无法续接它的连续性状态。",sameGroupRule:"只有账号都使用同一个分组“{{group}}”时,才会彼此共享连续性。",noSameGroupPeer:"当前没有其他账号使用这个分组。",sameGroupPeerCount_one:"已有 {{count}} 个其他账号使用这个分组。",sameGroupPeerCount_other:"已有 {{count}} 个其他账号使用这个分组。",deeperReady_one:"已有 {{count}} 个同组账号启用更深连续性。这是当前最强的交接设置。",deeperReady_other:"已有 {{count}} 个同组账号启用更深连续性。这是当前最强的交接设置。",deeperNeedsPeers:"此账号已启用更深连续性,但同组中的其他账号也需要启用更深连续性,才能更好满足跨账号续接的预期。",standardWarning:"标准共享更适合项目上下文。如果用户期望跨账号续接,两个账号都应启用更深连续性。",resumeOriginalWarning:"如果旧会话很重要,请先在原账号中恢复它,再调整设置。",cancel:"取消",save:"保存",saving:"保存中..."},historySyncLearningMap:{title:"历史同步说明",description:"隔离 -> 共享 -> 更深。在每行使用「同步」进行所有更改。",learningMap:"说明",isolated:"隔离",shared:"共享",deeper:"更深",cliproxyManaged_one:"{{count}} 个 CLIProxy Claude 池账号在操作中心 / CLIProxy 页面管理。",cliproxyManaged_other:"{{count}} 个 CLIProxy Claude 池账号在操作中心 / CLIProxy 页面管理。",showDetails:"显示详情:分组、切换与旧策略",modeSwitch:"模式切换",modeSwitchDesc:"同步对话框可让用户在隔离/共享间切换并选择更深连续性。",historySyncGroup:"历史同步分组",historySyncGroupDesc:"同一分组即共享项目上下文。默认回退为 default。",sameGroupRule:"只有两个账号都设为共享且使用同一分组时,才会共享连续性。",deeperRecommendation:"分组“{{group}}”已开启共享,但如果用户期望跨账号续接,更推荐同时启用更深连续性。",partialGroup:"分组“{{group}}”已经配置得不错,但其他账号或分组仍需要补齐同组或更深连续性设置。",readyGroup:"分组“{{group}}”已有多个账号启用更深连续性。这是当前最强的交接设置。",legacyConfirmation_one:"{{count}} 个旧账号仍需要显式确认。",legacyConfirmation_other:"{{count}} 个旧账号仍需要显式确认。"},continuityReadiness:{title:"跨账号续接检查",description:"在切换账号前,用这张卡快速确认还缺什么。",state:{single:"单账号",isolated:"续接关闭","shared-alone":"已共享但未完成","shared-standard":"仅项目共享",partial:"部分就绪",ready:"强交接已就绪"},metrics:{isolated:"隔离账号",sharedPeers:"有同组伙伴",deeperReady:"更深已就绪"},messages:{single:{title:"目前只配置了一个 auth 账号。",description:"现在还不涉及跨账号交接。请先再添加一个 auth 账号,再配置共享连续性。"},isolated:{title:"当前还没有开启跨账号续接。",description:"当前可见账号都处于隔离模式,因此在一个账号中创建的会话仍会留在原账号。"},"shared-alone":{title:"已经开启共享,但还没有任何分组拥有同组伙伴。",description_one:"{{count}} 个共享账号仍在等待另一个账号加入同一分组。",description_other:"{{count}} 个共享账号仍在等待另一个账号加入同一分组。"},"shared-standard":{title:"分组“{{group}}”已共享项目上下文,但尚未形成更深连续性的配对。",description:"用户可能期望的不只是项目共享。如果希望更稳妥地支持跨账号续接,请让这个分组中的两个账号都启用更深连续性。"},partial:{title:"已有一个分组准备就绪,但整体配置仍是混合状态。",description:"至少有一个分组已经启用更深连续性,但其他账号仍可能处于隔离、单独共享分组,或尚未启用更深连续性。"},ready:{title:"分组“{{group}}”已经具备当前最强的连续性设置。",description:"这个分组中已有多个账号启用更深连续性。是否能够恢复仍取决于 Claude 上游实际保存了什么。"}},stepsTitle:"下一步建议",steps:{syncBoth:"请在两个账号上都打开“同步”,而不是只调整要切换进去的那个账号。",sameGroup:"两个账号都使用同一个历史同步分组。“{{group}}”是当前推荐的分组。",enableDeeper:"如果用户期望的是跨账号续接,而不是仅共享项目上下文,请在两个账号上都启用更深连续性。",resumeOriginal:"如果原来的会话很重要,请先在原账号中恢复它,再修改连续性设置。"},singleSteps:{addAccount:"先再创建一个 ccs auth 账号,然后再考虑跨账号交接。",sameGroupLater:"当第二个账号准备好后,再把两个账号放到同一个历史同步分组。",enableDeeperLater:"如果未来会期望跨账号续接而不是仅共享项目上下文,请在两个账号上都启用更深连续性。",resumeOriginal:"在第二个账号配置完成之前,重要会话仍应从原账号继续恢复。"}},continuityOverview:{plainLaneTitle:"普通 ccs 正在使用不同的续接通道",plainLaneDescription:"普通 ccs 当前会从 {{lane}} 续接,而不是这个账号通道。请先恢复原通道中的会话,再修改同步设置。",setDefaultHint:"如果希望以后普通 ccs 跟随某个账号,请使用该账号行上的“设为默认”。",recommendBadge:"建议 {{group}}",partialBadge:"部分同步 {{group}}",lane:{native:"原生 Claude(~/.claude)",accountDefault:"账号 {{name}}",accountInherited:"通过连续性继承使用账号 {{name}}",profileDefault:"默认配置 {{name}}(仍走原生 Claude 通道)"}},accountsTable:{name:"名称",type:"类型",defaultBadge:"默认",created:"创建时间",lastUsed:"最后使用",historySync:"历史同步",actions:"操作",syncTitle:"编辑同步模式、分组与连续性深度",confirmLegacyTitle:"确认此旧账号的当前模式为显式",sync:"同步",confirm:"确认",active:"当前",setDefault:"设为默认",deleteAccount:"删除账号",cannotDeleteDefault:"不能删除默认账号",noAccounts:"未找到 CCS auth 账号。请使用 ccs auth create 添加。",resetToDefault:"恢复为 CCS 默认",deleteDialogTitle:"删除账号",deleteDialogDesc:"确定要删除账号「{{name}}」吗?将移除该配置及其所有会话数据,且无法撤销。",cancel:"取消",delete:"删除",sharedGroupStandard:"共享({{group}},标准)",sharedGroupDeeper:"共享({{group}},更深)",sharedGroupLegacy:"共享({{group}},标准旧策略)",isolatedLegacy:"隔离(旧默认)",isolated:"隔离",noSameGroupPeer:"同组中还没有其他账号",sameGroupPeerCount_one:"{{count}} 个同组账号",sameGroupPeerCount_other:"{{count}} 个同组账号",legacyReview:"请检查并确认这个推断出的默认状态。",noHandoff:"跨账号续接仍会回到原账号。",badges:{shared:"共享",deeper:"更深",legacy:"旧策略",isolated:"隔离"}},addAccountDialog:{title:"添加 {{displayName}} 账号",descKiro:"选择 Kiro 认证方式,然后通过浏览器或从 Kiro IDE 导入完成认证。",descDeviceCode:"点击认证后,验证码将显示,请在提供商网站输入。",descOauth:"点击认证获取 OAuth URL,在任意浏览器中打开即可登录。",powerUserEnabled:"已启用高级用户模式",powerUserSkipped:"设置 > 代理 中的高级用户模式会跳过 AGY 责任确认清单和 Gemini Dashboard 的风险短语。OAuth / 账号风险需自行承担。",powerUserLoadFailed:"加载高级用户模式设置失败。请检查“设置 > 代理”后重试。",powerUserLoading:"正在加载高级用户安全设置。请稍候后重试。",powerUserUnavailableRetry:"高级用户模式不可用。请完成当前提供商要求的安全步骤后重试。",authMethod:"认证方式",selectKiroAuthMethod:"选择 Kiro 认证方式",nicknameRequired:"昵称(必填)",nicknameOptional:"昵称(选填)",nicknamePlaceholder:"例如:工作、个人",nicknameRequiredHint:"该提供商必填。请使用唯一易记名称(如工作、个人)。",nicknameOptionalHint:"用于区分账号的友好名称。留空将自动生成安全标识。",waitingForAuth:"等待认证中...",deviceCodeHint:"验证码对话框即将出现,请在提供商网站输入验证码。",browserHint:"在浏览器中完成认证后,本对话框将自动关闭。",openUrlLabel:"在任意浏览器中打开此 URL 登录:",copied:"已复制",copy:"复制",open:"打开",popupBlocked:"弹窗被拦截。请复制上方 URL 在浏览器中手动打开。",redirectPasteLabel:"重定向未生效?请粘贴回调 URL:",callbackPlaceholder:"在此粘贴重定向 URL...",submitCallback:"提交回调",submitting:"提交中...",preparingUrl:"正在准备登录 URL...",cancel:"取消",importingToken:"正在从 Kiro IDE 导入令牌...",authenticate:"认证",importFromIde:"从 IDE 导入",importing:"导入中..."},flowViz:{backToProviders:"返回提供商",showDetails:"显示详情",hideDetails:"隐藏详情",showPausedAccounts:"显示已暂停 ({{count}})",hidePausedAccounts:"隐藏已暂停 ({{count}})",visibleTotalRequests:"可见请求数",visibleAccounts:"可见账号",excludingPausedAccounts:"已排除 {{count}} 个已暂停",resetLayout:"重置布局",provider:"提供商",totalRequests:"总请求数",accounts:"账号",connectionTimeline:"连接时间线",noRecentConnections:"暂无最近连接"},quickStats:{totalRequests:"总请求数",successRate:"成功率",totalTokens:"总 Token 数",activeModels:"活跃模型数"},authMonitor:{accounts:"账号",accountsCount:"{{count}} 个账号",success:"成功",failed:"失败",successRate:"成功率"},accountCard:{resumeAccount:"恢复账号",pauseAccount:"暂停账号",quotaLoading:"配额...",quota:"配额",quotaUnavailable:"配额限制不可用",reauthNeeded:"需要重新认证",failureLabelReauth:"重新认证",failureLabelWorkspace:"工作区",failureLabelNoAccess:"无权限",failureLabelRetry:"重试",failureLabelReconnect:"重新连接",failureLabelTemporary:"临时问题",failureLabelUnavailable:"不可用",failureHintReauth:"请重新运行该账号的认证流程以刷新访问权限。",failureHintWorkspace:"请将该账号移回可用的工作区,然后移除并重新添加。",failureHintNoAccess:"该账号无法访问提供商的配额接口。",failureHintRetry:"稍后再试一次。",failureHintReconnect:"请移除这个失效账号并重新认证。",failureHintTemporary:"这看起来是临时问题,请稍后重试。",removeAndReadd:"移除并重新添加账号",autoRefreshFailed:"自动刷新失败"},antigravityChecklist:{title:"Antigravity OAuth 责任须知",subtitle:"认证前请完成全部 4 步。",mandatory:"必读",completion:"完成度",stepsCount:"{{current}}/4 步"},accountSafetyWarning:{title:"OAuth 账号安全提示",subtitle:"Issue #509 · Gemini + AGY OAuth 风险",firstLine:"Issue #509 记录了与 ccs agy 及 ccs gemini 与 ccs agy 共享账号使用相关的封禁/停用报告。",secondLine:"仅在您愿意承担 OAuth 与账号访问风险的前提下继续。",issueLabel:"查看 issue #509",proxySettingsLabel:"Gemini + AGY 控制:设置 > 代理"},cliproxyDialog:{name:"名称",provider:"提供商",account:"账号",accountOptional:"账号(选填)",model:"模型",modelOptional:"模型(选填)",defaultTarget:"默认目标",defaultTier:"默认档位",tierConfig:"档位配置",selectProvider:"选择提供商...",useDefaultAccount:"使用默认账号",defaultSuffix:"(默认)",opus:"Opus",sonnet:"Sonnet",haiku:"Haiku",claudeCode:"Claude Code",factoryDroid:"Factory Droid",cancel:"取消",create:"创建",creating:"创建中...",saveChanges:"保存更改",saving:"保存中...",placeholderName:"my-gemini",placeholderModel:"gemini-2.5-pro",placeholderComposite:"my-composite",placeholderModelId:"model-id",placeholderAccountId:"account-id",editCompositeTitle:"编辑复合变体:{{name}}",editSingleTitle:"编辑单一样式:{{name}}"},profileEditor:{profileInfo:"配置信息",profileName:"配置名称",filePath:"文件路径",lastModified:"最后修改",defaultTarget:"默认目标",quickUsage:"快速使用",runWithProfile:"使用配置运行",runOnDroid:"在 Droid 上运行",runOnDroidWithFlag:"通过 --target 在 Droid 上运行",droidAliasExplicit:"Droid 别名(显式)",overrideToClaude:"切换为 Claude",overrideToClaudeExplicit:"切换为 Claude(显式)",targetHintPreferredAlias:"推荐显式别名:",targetHintClaudeDefault:"默认命令:",targetHintLegacyAlias:"旧快捷方式仍可用:",targetHintOverride:"你仍可在每次运行时用",setAsDefault:"设为默认",provider:"提供商",custom:"自定义",providerChooserHint:"先选择一个预设,之后仍可调整 URL、API key 和模型映射。",featuredProviders:"精选提供商",scrollHint:"屏幕较窄时可横向滚动",customEndpoint:"自定义端点",morePresets:"更多预设",customEndpointDescription:"从空白的 Anthropic 兼容 URL 开始,手动配置全部内容。"},settings:{sectionLoadFailed:"加载分区失败",unknownError:"发生未知错误",reloadPage:"重新加载页面",refresh:"刷新",copy:"复制",copied:"已复制",saved:"已保存",loading:"加载中...",configFileNotFound:"未找到配置文件"},settingsTabs:{web:"网页",env:"环境",think:"思考",proxy:"代理",auth:"认证",backup:"备份"},settingsAuth:{failedFetchTokens:"获取认证令牌失败",failedSaveTokens:"保存令牌失败",tokensUpdated:"令牌已更新,请重启 CLIProxy 生效。",failedRegenerate:"重新生成密钥失败",secretRegenerated:"新的管理密钥已生成,请重启 CLIProxy 生效。",failedReset:"重置令牌失败",tokensReset:"令牌已重置为默认值,请重启 CLIProxy 生效。",description:"配置 CLIProxy 认证令牌。修改后需要重启 CLIProxy。",apiKey:"API Key",custom:"自定义",apiKeyDesc:"Claude Code 通过该值向 CLIProxy 鉴权",apiKeyPlaceholder:"API key",managementSecret:"管理密钥",managementSecretDesc:"CCS Dashboard 使用该值访问 CLIProxy 管理接口",managementSecretPlaceholder:"管理密钥",generateSecret:"生成新的安全密钥",resetDefaults:"重置为默认值",resetDesc:"将 API key 和管理密钥都恢复为默认值。",saving:"保存中...",save:"保存"},settingsGlobalEnv:{description:"向所有非 Claude 订阅型配置注入环境变量(gemini、codex、agy、ghcp 等)",enabled:"全局环境变量已启用",disabled:"全局环境变量已禁用",enabledDesc:"环境变量将注入第三方配置",disabledDesc:"环境变量不会被注入",envVars:"环境变量",noneConfigured:"尚未配置环境变量",addNew:"新增变量",keyName:"KEY_NAME",value:"value",add:"添加",quickAdd:"快速添加常用变量",allConfigured:"常用变量已全部配置"},settingsBackups:{failedFetch:"获取备份失败",failedRestore:"恢复备份失败",restoreSuccess:"备份恢复成功",title:"设置备份",description:"恢复 settings.json 的历史版本。每次修改设置时会自动创建备份。",none:"暂无备份",noneHint:"修改设置后,备份会显示在这里",latest:"最新",restoring:"恢复中...",restore:"恢复",restoreConfirmTitle:"确认恢复备份?",restoreConfirmPrefix:"这将用以下备份替换当前设置:",restoreConfirmSuffix:"此操作不可撤销。",cancel:"取消"},settingsWebsearch:{description:"面向第三方配置(gemini、codex、agy 等)的 CLI 网页搜索",enabled:"WebSearch 已启用",disabled:"WebSearch 已禁用",checking:"正在检查状态...",providers:"提供商",noneConfigured:"未配置任何提供商",noneConfiguredHint:"请先安装 CLI 工具以启用网页搜索提供商",checkProviders:"检查可用提供商",installed:"已安装",notInstalled:"未安装",model:"模型:",howInstall:"如何安装 {{name}} CLI",installGlobally:"全局安装",requiresKey:"(需要 xAI API key)",freeTier:"(提供免费额度)",viewDocs:"查看文档"},settingsProxy:{failedLoadAgyMode:"加载高级模式失败",failedUpdateAgyMode:"更新高级模式失败",failedVerifyAgyMode:"校验高级模式持久化失败",notPersistedAgyMode:"高级模式未成功持久化,配置可能被其他进程修改。",agyModeEnabled:"高级模式已启用。",agyModeDisabled:"高级模式已关闭。",typePhraseToContinue:"请输入“{{value}}”后继续。",description:"为基于代理的配置设置本地或远程 {{backend}} 连接",backendPlus:"CLIProxy Plus",backend:"CLIProxy",instanceStatus:"实例状态",connectionMode:"连接模式",local:"本地",remote:"远程",localDesc:"在本机运行 {{backend}} 二进制",remoteDesc:"连接到远程 {{backend}} 服务器",backendBinary:"后端二进制",stopProxyToSwitch:"请先在实例状态中停止正在运行的代理,再切换后端。",default:"默认",plusDesc:"完整支持包括 Kiro 和 GitHub Copilot 在内的提供商",originalDesc:"原版二进制(仅 Gemini、Codex、Antigravity)",variantsIncompatible:"现有 Kiro/Copilot 变体与 CLIProxyAPI 不兼容。请切换到 CLIProxyAPIPlus 或移除这些变体。",safety:"安全",agyModeTitle:"Antigravity + Gemini 高级模式",agyModeDesc:"跳过 AGY 责任确认清单,以及 Gemini Dashboard 中输入风险短语的步骤。",agyWarning:"仅在你充分理解 OAuth 封禁风险模式(#509)后使用。CCS 不对账号损失承担责任。",finalConfirm:"需要最终确认",finalConfirmDesc:"启用后会跳过 Dashboard / CLI 中的 AGY 安全检查,以及 Gemini Dashboard 的风险短语确认。请先阅读 issue #509,并输入精确短语后继续。",step1:"步骤 1",readIssue:"阅读 issue #509",step2:"步骤 2",typePrefix:"输入",typeSuffix:"以启用。",typePhraseAria:"输入 I ACCEPT RISK 以启用 Antigravity + Gemini 高级模式",exactPhrase:"必须输入完全一致的短语。",enableAgyMode:"启用 Antigravity + Gemini 高级模式",toggleAgyMode:"切换 Antigravity + Gemini 高级模式",fallbackSettings:"回退设置",enableFallback:"启用本地回退",enableFallbackDesc:"远程不可达时使用本地代理",autoStartLocal:"自动启动本地代理",autoStartLocalDesc:"发生回退时自动启动本地代理",advanced:"高级",debugMode:"调试模式",debugModeDesc:"在浏览器控制台输出开发诊断信息",debugModeEnabled:"调试模式已开启,请在浏览器控制台查看详细日志。",localProxy:"本地代理",port:"端口",autoStart:"自动启动",localAutoStartDesc:"需要时自动启动本地代理",remoteConfigTitle:"远程服务器配置",host:"主机",hostPlaceholder:"192.168.1.100 或 proxy.example.com",defaultPort:"默认:{{value}}",portPlaceholder:"留空使用 {{value}}",protocol:"协议",http:"HTTP",https:"HTTPS",apiKeyOptional:"API Key(可选)",apiKeyPlaceholder:"用于 /v1/* API 接口",apiKeyDesc:"用于 /v1/chat/completions 接口请求",managementKeyOptional:"管理密钥(可选)",managementKeyPlaceholder:"用于 /v0/management/* 接口",managementKeyDesc:"用于 Dashboard 管理接口。未设置时回退使用 API Key。",testing:"测试中...",testConnection:"测试连接",connectedLatency:"已连接({{value}}ms)",connectionFailed:"连接失败",invalidPortOrEmpty:"端口必须是 1 到 65535 的整数,或留空使用默认值",invalidLocalPort:"本地端口必须是 1 到 65535 的整数",backendPlusApi:"CLIProxyAPIPlus",backendApi:"CLIProxyAPI"},settingsThinking:{description:"为支持的模型配置扩展思考/推理。",supportedProviders:"支持的提供商",modeTitle:"思考模式",modeAutoDesc:"根据模型档位自动设置思考级别",modeOffDesc:"关闭扩展思考",modeManualDesc:"设置持久覆盖级别,或按次使用 CLI 参数",tierDefaults:"档位默认值",tierDefaultsDesc:"自动模式下各模型档位的默认思考级别。",persistentOverride:"持久覆盖",persistentOverrideDesc:"应用到所有会话。CLI 参数仍具有更高优先级。",enterCustomBudget:"输入自定义预算",apply:"应用",providerOverrides:"提供商覆盖({{count}})",providerOverridesDesc:"为特定提供商覆盖档位默认值。可按需添加自定义提供商键。",addProviderPlaceholder:"添加提供商键(例如 qwen)",showWarnings:"显示告警",showWarningsDesc:"当思考值被限制或调整时显示告警",cliEnvOverride:"CLI 与环境变量覆盖",supportLine1Prefix:"思考预算:",supportLine1Suffix:"(基于 token)",supportLine2Prefix:"推理强度:",supportLine2SuffixPrefix:"(后缀或 ",supportLine2SuffixPostfix:":minimal/low/medium/high/xhigh)",supportLine3Prefix:"Codex 后缀会固定强度(例如 ",supportLine3Suffix:");无后缀模型使用 Thinking mode。"},analytics:{title:"分析",subtitle:"追踪使用情况与洞察",month:"本月",allTime:"全部时间",updated:"更新于 {{value}}"},analyticsSummary:{totalTokens:"总 Token",totalTokensSubtitle:"输入 {{input}} / 输出 {{output}}",totalCost:"总成本",totalCostSubtitle:"日均 ${{value}}",cacheTokens:"缓存 Token",cacheTokensSubtitle:"${{cost}}(占成本 {{percent}}%)",inputCost:"输入成本",outputCost:"输出成本",tokensSubtitle:"{{value}} 个 token"},apiProfiles:{title:"API 配置",new:"新建",searchPlaceholder:"搜索配置...",loadingProfiles:"正在加载配置...",failedLoadTitle:"加载配置失败",failedLoadDesc:"无法获取 API 配置,请稍后重试。",retry:"重试",noProfilesYet:"还没有 API 配置",noProfilesDesc:"创建你的第一个配置以连接自定义 API 端点",createProfile:"创建配置",noProfileMatch:"没有匹配“{{query}}”的配置",profileCount:"{{count}} 个配置",profileCount_other:"{{count}} 个配置",configuredCount:"{{count}} 个已配置",deleteProfileTitle:"删除配置",deleteProfileDesc:"确定要删除“{{name}}”吗?这会移除设置文件且无法恢复。",delete:"删除",unsavedChangesTitle:"未保存的更改",unsavedChangesDesc:"你在“{{current}}”中有未保存内容,是否丢弃并切换到“{{next}}”?",discardSwitch:"丢弃并切换"},accountsPage:{title:"账号",managePrefix:"统一管理",manageSuffix:"账号与池化接入流程。",mobileManageSuffix:"的连续性配置。",primaryActions:"主要操作",createAccount:"创建账号",authClaudeInPool:"在 Pool 中认证 Claude",openClaudePoolSettings:"打开 Claude Pool 设置",openCliProxyClaudePool:"打开 CLIProxy Claude Pool",migrationFollowup:"迁移后续处理",legacyContextPending:"{{count}} 个账号仍需首次模式确认。",legacyContextPending_other:"{{count}} 个账号仍需首次模式确认。",legacyContinuityPending:"{{count}} 个共享账号仍处于标准旧版连续性深度。",legacyContinuityPending_other:"{{count}} 个共享账号仍处于标准旧版连续性深度。",confirmingLegacy:"正在确认旧版策略...",confirmLegacy:"确认旧版策略({{count}})",noLegacyFollowup:"暂无待处理的迁移后续项。",continuityGuide:"连续性指南",expandWhenNeeded:"按需展开查看。",sharedStandard:"共享标准",sharedStandardDesc:"仅同步项目工作区。适合大多数团队。",sharedDeeper:"共享更深",sharedDeeperDesc:"会额外同步 session-env、file-history、shell-snapshots 和 todos。适合需要跨账号续接的场景。",sharedDeeperPrefix:"额外包含",isolated:"隔离",isolatedDesc:"不建立链接。适合严格隔离场景。",quickCommands:"快捷命令",quickCommandsDesc:"复制后在终端运行。",workspaceBadge:"ccs auth 工作区",historySyncBadge:"历史同步控制",authAccounts:"认证账号",tableScopePrefix:"该表仅展示",tableScopeMiddle:"账号。模式/分组/深度调整请使用",tableScopeSuffix:"。",accountMatrix:"账号矩阵",sharedTotalDesc:"共享总数:{{count}}。可执行 Sync 设置和旧版确认操作。",loadingAccounts:"正在加载账号..."},health:{justNow:"刚刚",secondsAgo:"{{count}} 秒前",minutesAgo:"{{count}} 分钟前",hoursAgo:"{{count}} 小时前",systemHealth:"系统健康",build:"构建 {{version}}",lastScan:"上次扫描:",autoRefresh:"自动刷新:",refresh:"刷新",checks:"检查项",version:"版本",platform:"平台",liveMonitoring:"实时监控已启用",copied:"已复制到剪贴板",refreshing:"正在刷新健康检查...",fix:"修复",applyFix:"应用修复",healthLabel:"健康"},updates:{actionRequired:"待处理",done:"已完成",all:"全部",inboxTitle:"更新中心",inboxSubtitle:"先处理操作,再将更新标记为完成或忽略。",needsAction:"需处理",doneCount:"已完成",searchPlaceholder:"搜索操作或命令",noNotices:"当前视图下没有通知。",noUpdates:"暂无更新。",published:"发布于 {{date}}",markDone:"标记完成",dismiss:"忽略",reopen:"重新打开",doNext:"下一步",impactedIntegrations:"受影响的集成",impactedDesc:"根据更新范围与路由匹配的相关区域。",whyMatters:"为什么重要",whyMattersDesc:"仅保留简要背景,不展示冗长发布说明。",open:"打开",progressNeedsAction:"需处理",progressInReview:"审阅中",progressDone:"已完成",progressDismissed:"已忽略",statusNew:"新",statusStable:"稳定",statusPlanned:"计划中",dashboard:"Dashboard",cliUsage:"CLI 用法"},cliproxyPage:{connected:"已连接",notConnected:"未连接",variant:"变体",parentNotConnected:"上游未连接",viaProvider:"通过 {{provider}}",emptyTitle:"CCS 配置管理",emptyDesc:"管理 CLIProxy 提供商的 OAuth 认证、账号偏好与模型选择,配置 CCS 的请求路由。",emptyControlPanelPrefix:"如需查看实时用量和监控,请前往",controlPanel:"控制面板",quickSetup:"快速设置",accountManagement:"CCS 级账号管理",providers:"提供商",variants:"变体",providerCount:"{{count}} 个提供商",providerCount_other:"{{count}} 个提供商",connectedCount:"{{count}} 个已连接",variantDisplay:"{{name}}({{provider}} 变体)"},copilotPage:{title:"Copilot",subtitle:"GitHub Copilot 代理",setup:"安装",auth:"认证",daemon:"守护进程",unofficialTitle:"非官方 API - 风险自负",unofficialItem1:"逆向接口,可能随时失效",unofficialItem2:"过度使用可能触发账号限制",unofficialItem3:"CCS 不提供担保,也不承担责任",yes:"是",no:"否",installed:"已安装",missing:"缺失",integration:"集成",enabled:"已启用",disabled:"已禁用",github:"GitHub",connected:"已连接",notConnected:"未连接",authenticate:"去认证",authenticating:"认证中...",status:"状态",running:"运行中",stopped:"已停止",port:"端口",stopping:"停止中...",stop:"停止",starting:"启动中...",start:"启动",installing:"安装中...",installCopilotApi:"安装 copilot-api",proxy:"代理",active:"活跃",inactive:"未激活"},cursorPage:{title:"Cursor",beta:"Beta",subtitle:"Cursor 集成专用控制面板",unofficialTitle:"非官方 API - 风险自负",unofficialItem1:"逆向集成可能随时失效",unofficialItem2:"滥用或过量使用可能导致账号受限",unofficialItem3:"CCS 不提供担保,也不承担责任",integration:"集成",authentication:"认证",daemon:"守护进程",enabled:"已启用",disabled:"已禁用",expired:"已过期",connected:"已连接",notConnected:"未连接",running:"运行中",stopped:"已停止",actions:"操作",disableIntegration:"禁用集成",enableIntegration:"启用集成",autoDetectAuth:"自动检测认证",manualAuthImport:"手动导入认证",stopDaemon:"停止守护进程",startDaemon:"启动守护进程",port:"端口",configuration:"Cursor 配置",lastModified:"最后修改:",neverSaved:"从未保存",saving:"保存中...",save:"保存",modelConfig:"模型配置",settings:"设置",info:"信息",presets:"预设",presetsDesc:"应用预设模型映射",modelMapping:"模型映射",modelMappingDesc:"为不同档位配置使用模型",defaultModel:"默认模型",defaultModelDesc:"未指定档位时使用。",opusModel:"Opus(最强)",opusModelDesc:"复杂推理与最高质量输出。",sonnetModel:"Sonnet(均衡)",sonnetModelDesc:"日常编码和通用对话。",haikuModel:"Haiku(快速)",haikuModelDesc:"低延迟与轻量请求。",runtimeSettings:"运行时设置",autoStartDaemon:"自动启动守护进程",autoStartDesc:"在使用集成时自动启动 Cursor 守护进程。",ghostMode:"Ghost 模式",ghostModeDesc:"请求时附带 x-ghost-mode 以减少遥测。",provider:"提供商",filePath:"文件路径",availableModels:"可用模型",loadingModels:"加载模型中...",noModels:"暂无模型元数据,请先启动守护进程后刷新。",default:"默认",rawConfiguration:"原始配置(JSON)",manualImportTitle:"手动导入 Cursor 认证",manualImportDesc:"若无法自动检测,请提供 Cursor access token 与 machine ID。",accessToken:"访问令牌",accessTokenPlaceholder:"粘贴 Cursor access token",machineId:"机器 ID",machineIdPlaceholder:"32 位十六进制(无连字符 UUID)",cancel:"取消",import:"导入",selectModel:"选择模型",useDefaultModel:"使用默认模型",availableModelCount:"可用模型({{count}})",invalidPort:"端口必须是 1 到 65535 之间的整数",defaultModelRequired:"默认模型必填",savedConfig:"Cursor 配置与模型映射已保存",failedSaveConfig:"保存配置失败",modelsLoadingWait:"模型仍在加载中,请稍后再应用预设。",noModelsAvailable:"暂无可用模型,请先启动守护进程并刷新。",appliedCodexPreset:"已应用 GPT-5.3 Codex 预设",appliedClaudePreset:"已应用 Claude 4.6 预设",appliedGeminiPreset:"已应用 Gemini 3 预设",integrationEnabled:"Cursor 集成已启用",integrationDisabled:"Cursor 集成已禁用",failedUpdateIntegration:"更新集成状态失败",credentialsImported:"Cursor 凭据已导入",autoDetectFailed:"自动检测失败",manualRequired:"Token 和 machine ID 为必填项",manualImportFailed:"手动导入失败",failedStartDaemon:"启动守护进程失败",daemonStarted:"守护进程已启动",daemonStartedWithPid:"守护进程已启动(PID: {{pid}})",failedStopDaemon:"停止守护进程失败",daemonStopped:"守护进程已停止",rawLoading:"原始设置仍在加载,请稍后重试。",invalidJson:"JSON 无效",rawSaved:"原始设置已保存",rawChanged:"原始设置已被外部修改,请刷新后重试。",failedSaveRaw:"保存原始设置失败",savedAll:"Cursor 配置已保存",liveProbe:"实时探测",runLiveProbe:"运行实时探测",rerunLiveProbe:"重新运行实时探测",probing:"正在运行探测...",probeNotRun:"尚未运行探测",probeLocalReadinessHint:"本地就绪检查可能通过,但实时运行链路仍可能失败。请使用实时探测验证完整的 Cursor 路径。",probeStage:"阶段",probeHttpStatus:"HTTP 状态",probeDuration:"耗时",probeModel:"模型",probeMessage:"消息",probeSucceeded:"探测成功",probeFailed:"探测失败",probeSaveFirst:"请先保存或放弃 Cursor 更改,再运行实时探测",refreshStatus:"刷新 Cursor 状态",refreshConfiguration:"刷新 Cursor 配置"},droidPage:{loadingDiagnostics:"加载 Droid 诊断中...",failedDiagnostics:"加载 Droid 诊断失败。",overview:"概览",byok:"BYOK",docs:"文档",runtimeInstall:"运行时与安装",status:"状态",detected:"已检测",notFound:"未找到",detectionSource:"检测来源",binaryPath:"二进制路径",installDirectory:"安装目录",version:"版本",overridePath:"覆盖路径(CCS_DROID_PATH)",configFiles:"配置文件",path:"路径",resolved:"解析结果",size:"大小",lastModified:"最后修改",parseWarning:"解析告警:{{value}}",readWarning:"读取告警:{{value}}",warnings:"告警",byokSummary:"BYOK 概览",activeModelSelector:"当前模型选择器",customModels:"自定义模型",ccsManaged:"CCS 管理",userManaged:"用户管理",malformedEntries:"异常条目",providers:"提供商",none:"无",customModelsTitle:"自定义模型",modelName:"名称 / 模型",provider:"提供商",baseUrl:"Base URL",noCustomModels:"没有自定义模型",docsAlignedNotes:"文档对齐说明",factoryDocs:"Factory 文档",providerFactCheckDocs:"Provider 校验文档",providerValues:"Provider 值:{{value}}",settingsHierarchy:"Settings 层级:{{value}}",settingsTitle:"Droid BYOK 设置",fixJsonBeforeQuickSettings:"请先修复 JSON 语法,再使用快速设置。",fixJsonBeforeReasoning:"请先修复 JSON 语法,再更新 BYOK 推理设置。",unableUpdateReasoning:"无法更新所选 BYOK 模型的推理设置。",fixJsonBeforeBudget:"请先修复 JSON 语法,再更新思考预算。",anthropicOnlyBudget:"思考预算仅适用于 Anthropic BYOK 模型。",invalidJson:"JSON 无效:{{value}}",saved:"Droid 设置已保存",changedExternally:"Droid 设置已被外部修改,请刷新后重试。",failedSave:"保存 Droid 设置失败"},sharedPage:{commands:"命令",skills:"技能",agents:"代理",title:"共享数据",subtitle:"在 Claude 实例间共享的命令、技能和代理",totalShared:"共享总数",visible:"可见",markdownDetail:"Markdown 详情视图",filterPrefix:"筛选:",configurationRequired:"需要配置",countsUnavailable:"统计不可用",retryCounts:"重试统计",filterPlaceholder:"按名称、描述或路径筛选 {{tab}}",showing:"显示 {{visible}} / {{total}} 个{{tab}}",showingQuery:"(关键字“{{query}}”)",refreshing:"(刷新中...)",loadingShared:"正在加载共享{{tab}}...",failedLoadShared:"加载共享{{tab}}失败",retry:"重试",noSharedFound:"未找到共享{{tab}}。请运行 `ccs sync` 或在共享目录添加内容。",noMatch:"没有匹配“{{query}}”的{{tab}}。",selectOne:"选择一个{{tab}}查看完整内容。",pathLabel:"路径",resolvedSource:"解析后来源",loadingMarkdown:"正在加载 Markdown 内容...",failedLoadContent:"加载内容失败",retryContent:"重试内容加载",noMarkdown:"暂无 Markdown 内容。"}}},vi:{translation:{locale:{en:"Tiếng Anh","zh-CN":"Tiếng Trung giản thể",vi:"Tiếng Việt",ja:"Tiếng Nhật"},layout:{languageSwitcher:"Ngôn ngữ"},nav:{general:"Chung",home:"Trang chủ",analytics:"Phân tích",identityAccess:"Nhận dạng & Quyền truy cập",apiProfiles:"Hồ sơ API",cliproxyPlus:"CLIProxy Plus",cliproxyOverview:"Tổng quan",controlPanel:"Bảng điều khiển",githubCopilot:"GitHub Copilot",cursorIde:"Cursor IDE",claudeExtension:"Claude Extension",accounts:"Tài khoản",allAccounts:"Tất cả tài khoản",sharedData:"Dữ liệu dùng chung",compatibleClis:"Tương thích",factoryDroid:"Factory Droid",system:"Hệ thống",health:"Sức khỏe",settings:"Cài đặt",openrouterTooltip:"Nổi bật: OpenRouter + Alibaba Coding Plan + Ollama"},home:{profiles:"Hồ sơ",cliproxy:"CLIProxy",accounts:"Tài khoản",health:"Sức khỏe",configurationRequired:"Cần cấu hình"},auth:{dashboardTitle:"Bảng điều khiển CCS",protectedAccessLabel:"Truy cập được bảo vệ",remoteGuardLabel:"Lớp bảo vệ truy cập từ xa",loading:"Đang kiểm tra quyền truy cập bảng điều khiển…",loginDescription:"Dùng tên người dùng và mật khẩu đã được cấu hình trên máy host để truy cập bảng điều khiển.",username:"Tên người dùng",password:"Mật khẩu",usernamePlaceholder:"Nhập tên người dùng",passwordPlaceholder:"Nhập mật khẩu",signIn:"Đăng nhập",signingIn:"Đang đăng nhập...",loginFailed:"Đăng nhập không thành công",lightMode:"Sáng",darkMode:"Tối",noDefaultCredentials:"CCS không có sẵn tài khoản hay mật khẩu mặc định.",credentialsHint:"Thông tin đăng nhập được tạo trên máy host bằng `ccs config auth setup`, rồi dùng tại đây.",remoteSetupTitle:"Truy cập từ xa cần được thiết lập trên máy host",remoteSetupDescription:"Bảng điều khiển này đang được mở từ một địa chỉ không phải localhost, nhưng máy host chưa bật dashboard auth.",incompleteSetupDescription:"Dashboard auth đã được bật nhưng cấu hình trên máy host vẫn chưa hoàn tất. Hãy hoàn thành cấu hình trước khi đăng nhập.",safetyNoteRemote:"Quản trị từ xa sẽ tiếp tục bị khóa cho tới khi chủ máy host bật dashboard auth.",safetyNoteLocal:"Nếu bạn đang ngồi ngay trên máy đó, đường localhost vẫn là cách đơn giản nhất để vào.",safetyNoteSession:"Sau khi đăng nhập thành công, phiên HTTP-only sẽ chỉ có hiệu lực trên đúng máy host này.",hostStepTitle:"Trên máy host",hostStepDescription:"Tạo hoặc bật lại thông tin đăng nhập cho dashboard, rồi mở lại trang này từ thiết bị từ xa.",localStepTitle:"Nếu đây là máy của bạn",localStepDescription:"Hãy mở URL localhost mà `ccs config` in ra, thay vì địa chỉ LAN hoặc Tailscale.",showPassword:"Hiện mật khẩu",hidePassword:"Ẩn mật khẩu"},commonToast:{apiKeyRequired:"Cần có khóa API",accountAddedPresetFailed:"Đã thêm tài khoản nhưng không áp dụng được preset mặc định",settingsCopied:"Đã sao chép cài đặt vào bảng nhớ tạm",enterPresetName:"Vui lòng nhập tên preset để lưu",codeCopied:"Đã sao chép mã vào bảng nhớ tạm",copyCodeFailed:"Không sao chép được mã",appliedModelAllTiers:"Đã áp dụng mô hình cho tất cả các tier",settingsSaved:"Đã lưu cài đặt",defaultTargetUpdated:"Đã cập nhật mục tiêu mặc định",failedUpdateDefaultTarget:"Không cập nhật được mục tiêu mặc định thành {{target}}{{suffix}}"},profileDialog:{editTitle:"Chỉnh sửa hồ sơ",createTitle:"Tạo hồ sơ API",name:"Tên",namePlaceholder:"my-api",baseUrl:"URL cơ sở",baseUrlPlaceholder:"https://api.example.com",apiKey:"Khóa API",defaultModel:"Mô hình mặc định (ANTHROPIC_MODEL)",defaultModelHint:"Để trống để sử dụng: {{model}}",modelMappingTitle:"Ánh xạ mô hình (Opus/Sonnet/Haiku)",modelMappingDesc:"Cấu hình ID mô hình riêng cho từng tier. Hữu ích với API proxy định tuyến từng loại mô hình đến backend khác nhau.",opusModel:"Mô hình Opus (ANTHROPIC_DEFAULT_OPUS_MODEL)",sonnetModel:"Mô hình Sonnet (ANTHROPIC_DEFAULT_SONNET_MODEL)",haikuModel:"Mô hình Haiku (ANTHROPIC_DEFAULT_HAIKU_MODEL)",cancel:"Hủy bỏ",saving:"Đang lưu...",update:"Cập nhật",create:"Tạo"},modelTierMapping:{title:"Ánh xạ tầng mô hình",advanced:"Nâng cao",description:"Định cấu hình các mô hình khác nhau cho các cấp độ opus/sonnet/haiku của Claude Code.",autoSuggest:"Tự động đề xuất dựa trên {{provider}}",opusPlaceholder:"vd: anthropic/claude-opus-4",sonnetPlaceholder:"ví dụ: anthropic/claude-sonnet-4",haikuPlaceholder:"vd: anthropic/claude-3.5-haiku",footer:"Các biến này thiết lập ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL."},envEditor:{sensitive:"nhạy cảm",none:"Không có biến môi trường nào được cấu hình.",noneHint:"Thêm biến bằng ô nhập bên dưới hoặc chỉnh sửa trực tiếp JSON.",addVariable:"Thêm biến môi trường",keyPlaceholder:"VARIABLE_NAME",valuePlaceholder:"giá trị"},setupVariant:{using:"Sử dụng:",variantNameRequired:"Tên biến thể *",variantNamePlaceholder:"ví dụ: my-gemini, g3, flash",invokeHintPrefix:"Sử dụng tên này để gọi:",model:"Mô hình",modelPlaceholder:"ví dụ: gemini-2.5-pro, claude-opus-4-5",choosePresetInstead:"Hoặc chọn từ preset có sẵn",selectModel:"Chọn mô hình",customModelName:"Tên mô hình tùy chỉnh...",enterAnyModel:"Nhập bất kỳ tên mô hình nào được CLIProxy hỗ trợ",defaultModel:"Mặc định: {{model}}",providerDefault:"mặc định theo nhà cung cấp",back:"Quay lại",skip:"Bỏ qua",creating:"Đang tạo...",createVariant:"Tạo biến thể",skipHint:"Bỏ qua nếu bạn chỉ muốn thêm tài khoản mà không tạo biến thể"},customPresetDialog:{title:"Preset tùy chỉnh",presetNameOptional:"Tên preset (tùy chọn)",presetNamePlaceholder:"ví dụ: Preset tùy chỉnh của tôi",codexTipPrefix:"Mẹo Codex: hậu tố",codexTipSuffix:"nỗ lực ghim. Các mô hình không có hậu tố sử dụng cài đặt Tư duy.",defaultModel:"Mô hình mặc định",defaultModelDesc:"Dùng khi không yêu cầu cấp mô hình cụ thể",opusModel:"Opus (Có khả năng nhất)",opusModelDesc:"Đối với các nhiệm vụ lý luận phức tạp",sonnetModel:"Sonnet (Cân bằng)",sonnetModelDesc:"Cân bằng giữa tốc độ và khả năng",haikuModel:"Haiku (Nhanh)",haikuModelDesc:"Phản hồi nhanh cho các tác vụ đơn giản",cancel:"Hủy bỏ",savePreset:"Lưu preset",applyPreset:"Áp dụng cài sẵn"},componentModelSelector:{selectModel:"Chọn mô hình",availableModelsCount:"Mô hình khả dụng ({{count}})",preview:"Xem trước"},searchableSelect:{searchModels:"Tìm mô hình...",noResults:"Không tìm thấy kết quả phù hợp."},copilotSettings:{enableCopilot:"Bật Copilot",enableCopilotDesc:"Cho phép sử dụng đăng ký GitHub Copilot",basicSettings:"Cài đặt cơ bản",accountType:"Loại tài khoản",accountTypeIndividual:"Cá nhân",accountTypeBusiness:"Business",accountTypeEnterprise:"Enterprise",rateLimiting:"Giới hạn tỷ lệ",rateLimitSeconds:"Giới hạn tốc độ (giây)",noLimit:"Không giới hạn",waitOnRateLimit:"Chờ giới hạn tỷ lệ",waitOnRateLimitDesc:"Chờ thay vì lỗi khi đạt đến giới hạn",daemonSettings:"Cài đặt Daemon",autoStartDaemon:"Daemon tự động khởi động",autoStartDaemonDesc:"Bắt đầu copilot-api khi sử dụng hồ sơ"},providerModelSelector:{selectModel:"Chọn mô hình",noModelsForProvider:"Không có mô hình nào cho nhà cung cấp này",broken:"BROKEN",deprecated:"DEPRECATED",paid:"PAID",freeTier:"Gói miễn phí",paidTier:"Gói trả phí",modelKnownIssues:"Mô hình này có vấn đề đã biết",viewIssueDetails:"Xem chi tiết vấn đề",modelDeprecated:"Mô hình này không được dùng nữa",recommended:"Đề xuất",allModelsCount:"Tất cả mô hình ({{count}})",noModelsAvailable:"Không có mô hình khả dụng"},createAuthProfileDialog:{title:"Tạo tài khoản mới",description:"Hồ sơ xác thực yêu cầu đăng nhập Claude CLI. Chạy lệnh dưới đây trong terminal của bạn. Bạn có thể chỉnh sửa chế độ đồng bộ hóa, nhóm và độ liên tục sau này từ bảng Tài khoản.",profileName:"Tên hồ sơ",profileNamePlaceholder:"ví dụ: công việc, cá nhân, khách hàng",invalidProfileName:"Tên phải bắt đầu bằng một chữ cái và chỉ chứa các chữ cái, số, dấu gạch ngang hoặc dấu gạch dưới.",enableSharedHistory:"Bật đồng bộ hóa lịch sử chia sẻ với các tài khoản xác thực ccs khác",historySyncGroupOptional:"Nhóm đồng bộ hóa lịch sử (tùy chọn)",historySyncGroupPlaceholder:"default, sprint-a, client-x",historySyncGroupHint:"Để trống để sử dụng nhóm chia sẻ mặc định. Dấu cách được chuẩn hóa thành dấu gạch ngang.",deeperContinuity:"Nâng cao: chế độ liên tục sâu hơn",deeperContinuityHint:"Thêm đồng bộ cho session-env, file-history, shell-snapshots và todos. Thông tin xác thực vẫn tách biệt.",invalidContextGroup:"Nhóm phải bắt đầu bằng một chữ cái và chỉ sử dụng các chữ cái, số, dấu gạch ngang hoặc dấu gạch dưới (tối đa {{max}} ký tự).",command:"Lệnh",commandFallback:"ccs auth create <name>",afterRunPrefix:"Sau khi chạy lệnh:",afterRunStep1:"Hoàn tất đăng nhập Claude trong trình duyệt của bạn",afterRunStep2:"Quay lại đây và làm mới để xem tài khoản mới",poolingHint:"Muốn dùng định tuyến Claude OAuth dạng pool? Dùng CLIProxy Claude pool từ nút hành động ở trang Tài khoản.",close:"Đóng",copied:"Đã sao chép!",copyCommand:"Sao chép lệnh"},cliproxyModelCategory:{google:"Google (Gemini)",openai:"OpenAI (GPT)",anthropic:"Anthropic (Claude)",antigravity:"Antigravity",other:"Khác"},cliproxyOverviewComponents:{availableModels:"Mô hình khả dụng",noModelsAvailable:"Không có mô hình khả dụng",startSessionHint:"Bắt đầu phiên CLIProxy để tải danh sách mô hình khả dụng",totalCount:"tổng cộng {{count}}",availableThroughGroupedByProvider:"Các mô hình khả dụng qua {{backendLabel}}, được nhóm theo nhà cung cấp",moreCount:"+{{count}} thêm"},categorizedModelSelector:{selectModel:"Chọn mô hình",noModelsAvailable:"Không có mô hình khả dụng",modelPlaceholder:"Mô hình..."},openrouterQuickStart:{recommended:"Đề xuất",title:"Bắt đầu với OpenRouter",description:"Truy cập các mô hình {{modelCountLabel}} từ OpenAI, Anthropic, Google, Meta, v.v. - tất cả đều thông qua một API.",featureOneApi:"Một API cho mọi nhà cung cấp",profileSummaryCount:"{{count}} hồ sơ",profileSummaryCount_other:"{{count}} hồ sơ",profileSummaryEmpty:"Chất lượng cao + kiểm soát cục bộ",summaryBadgeDefaultQuality:"Mặc định chất lượng tốt nhất",summaryBadgeLocalLane:"Dùng local khi đúng bài toán",summaryExistingTitle:"Chọn hồ sơ hoặc thêm một lane mới",summaryEmptyTitle:"Chọn lane hồ sơ đầu tiên của bạn",summaryExistingDescription:"Bạn đã có {{count}} hồ sơ trong workspace này. Hãy giữ các nhà cung cấp chất lượng cao cho công việc code nghiêm túc, và chỉ thêm runtime local khi cần quyền riêng tư, chi phí thấp hoặc làm việc offline.",summaryExistingDescription_other:"Bạn đã có {{count}} hồ sơ trong workspace này. Hãy giữ các nhà cung cấp chất lượng cao cho công việc code nghiêm túc, và chỉ thêm runtime local khi cần quyền riêng tư, chi phí thấp hoặc làm việc offline.",summaryEmptyDescription:"Chọn lane phù hợp với công việc. Nhà cung cấp premium vẫn là mặc định cho độ tin cậy khi code; runtime local phù hợp hơn cho quyền riêng tư, batch rẻ và thử nghiệm.",qualityLanesTitle:"Lane chất lượng cao",qualityLaneHighlightDefaultQuality:"Lane mặc định tốt nhất cho các tác vụ code quan trọng",alibabaLaneDescription:"Hồ sơ coding trực tiếp mạnh mẽ khi bạn muốn một lane premium riêng ngoài catalog OpenRouter.",alibabaLaneHighlightQuality:"Phù hợp khi bạn cần chất lượng premium với endpoint riêng",localRuntimesTitle:"Runtime local",localOllamaTitle:"Ollama + Gemma 4",localOllamaLabel:"Ollama",localOllamaHighlight:"Tốt nhất cho prompt riêng tư, dọn dẹp local và batch transform chi phí thấp",localLlamacppTitle:"llama.cpp",localLlamacppLabel:"llama.cpp",localLlamacppHighlight:"Tốt nhất cho thiết lập GGUF tùy biến và workflow local tự host nâng cao",localDetectedModels:"Đã phát hiện {{count}} mô hình local",localDetectedModels_other:"Đã phát hiện {{count}} mô hình local",localNoModelsDetected:"Chưa phát hiện mô hình local nào",localWaitingServer:"Đang chờ máy chủ local và danh sách mô hình",localRuntimeCheckingBadge:"Đang kiểm tra",localRuntimeReadyBadge:"Sẵn sàng",localRuntimeNeedsModelBadge:"Thiếu mô hình",localRuntimeOfflineBadge:"Ngoại tuyến",localRuntimeCheckingDescription:"Đang kiểm tra trạng thái runtime local trước khi hiển thị hướng dẫn thiết lập.",localRuntimeReadyDescription:"Phù hợp nhất cho prompt riêng tư, workflow offline và batch transform rẻ hơn.",localRuntimeNeedsModelDescription:"Runtime đã chạy, nhưng mô hình local được khuyến nghị vẫn cần được tải hoặc nạp.",localRuntimeOfflineDescription:"Lane này phù hợp cho công việc nhạy cảm về riêng tư, transform local giá rẻ và phiên offline.",localRuntimeCheckingFooter:"Đang kiểm tra runtime local...",localRuntimeReadyFooter:"Endpoint sẵn sàng tại {{endpoint}}",localRuntimeMissingModelFooter:"Chạy `{{command}}` để hoàn tất thiết lập local.",localRuntimeOfflineFooter:"Chạy `{{command}}` để đưa endpoint local lên.",localRuntimeSetupAction:"Thiết lập {{label}}",localRuntimeUseAction:"Dùng {{label}}",localRuntimeFinishAction:"Hoàn tất thiết lập {{label}}",runtimeProviderBadge:"Thiết lập nhà cung cấp runtime",runtimeProviderTitle:"Mở AI Providers",runtimeProviderManagedDescription:"Dùng mục này khi bạn cần connector do CLIProxy quản lý, secret nhà cung cấp và điều khiển routing nâng cao.",runtimeProviderFeatureConnectors:"Gemini, Codex, Claude, Vertex và các connector tương thích OpenAI",runtimeProviderFeatureSecrets:"Khóa dùng chung tách biệt khỏi từng API Profile",runtimeProviderFooter:"Phù hợp nhất khi nhiều hồ sơ cần dùng chung một cấu hình nhà cung cấp.",createOpenRouterProfile:"Tạo hồ sơ OpenRouter",getApiKeyAt:"Nhận khóa API của bạn tại",createCustomProfile:"Tạo hồ sơ API tùy chỉnh"},alibabaCodingPlanQuickStart:{recommended:"Đề xuất",title:"Dùng thử Alibaba Coding Plan",description:"Sử dụng Alibaba Cloud Coding Plan qua endpoint tương thích Anthropic cho tác vụ lập trình.",featureEndpoint:"Endpoint tương thích Anthropic",featureKeyFormat:"Khóa API sk-sp chuyên dụng",createAlibabaProfile:"Tạo hồ sơ Alibaba Coding Plan",readGuideAt:"Xem hướng dẫn tại"},alibabaCodingPlanPromo:{title:"Alibaba Coding Plan",subtitle:"Model Studio Coding Plan qua endpoint Anthropic",add:"Thêm"},credentialHealth:{title:"Tình trạng thông tin xác thực",ready:"Sẵn sàng",noCredentialsConfigured:"Không có thông tin xác thực nào được định cấu hình. Sử dụng các nút đăng nhập ở trên để xác thực.",neverUsed:"Chưa bao giờ sử dụng",justNow:"Vừa rồi",unknown:"Không xác định",daysAgo:"{{count}} ngày trước",hoursAgo:"{{count}} giờ trước",minutesAgo:"{{count}} phút trước"},proxyStatusWidget:{justNow:"vừa xong",minutesAgo:"{{count}} phút trước",hoursAgo:"{{count}} giờ trước",syncReady:"Sẵn sàng đồng bộ hóa",noConfig:"Không có cấu hình",remoteProxy:"Proxy từ xa",active:"Đang hoạt động",trafficAutoRouted:"Lưu lượng truy cập tự động được định tuyến đến máy chủ từ xa",tooltipSync:"Đồng bộ hóa hồ sơ với CLIProxy",tooltipRestart:"Khởi động lại",tooltipStop:"Dừng lại",tooltipClose:"Đóng",tooltipVersionSettings:"Cài đặt phiên bản",versionManagement:"Quản lý phiên bản",selectVersionPlaceholder:"Chọn phiên bản để cài đặt...",stable:"(ổn định)",install:"Cài đặt",versionsAboveUnstable:"Các phiên bản trên {{version}} có vấn đề đã biết",versionsKnownIssues:"Phiên bản {{version}} có vấn đề đã biết",lastChecked:"Đã kiểm tra lần cuối {{time}}",notRunning:"Không chạy",start:"Bắt đầu",port:"Cổng {{port}}",sessionCount:"{{count}} phiên",sessionCount_other:"{{count}} phiên",installFaultyTitle:"Cài đặt phiên bản có lỗi đã biết?",installFaultyDesc:"Bạn sắp cài đặt <strong>v{{version}}</strong>, phiên bản này nằm trong dải lỗi đã biết <strong>{{range}}</strong>.",installFaultyWarning:"Phiên bản này có lỗi đã biết và có thể cài đặt thất bại hoặc làm proxy ở trạng thái xấu.",installUnstableTitle:"Cài đặt phiên bản không ổn định?",installUnstableDesc:"Bạn sắp cài đặt <strong>v{{version}}</strong>, phiên bản này cao hơn phiên bản ổn định tối đa <strong>v{{maxStable}}</strong>.",installUnstableWarning:"Phiên bản này đã biết có vấn đề về độ ổn định và có thể gây ra hành vi không mong muốn.",installUnstableConfirm:"Bạn có chắc chắn muốn tiếp tục không?",cancel:"Hủy bỏ",installAnyway:"Vẫn cài đặt",clickToDowngrade:"Bấm để hạ cấp",clickToUpdate:"Bấm để cập nhật"},syncStatusCard:{profileSync:"Đồng bộ hồ sơ",ready:"Sẵn sàng",noConfig:"Không có cấu hình",syncsProfilesDesc:"Đồng bộ hóa cấu hình API với cấu hình CLIProxy cục bộ",runDoctorHint:"Chạy <code>ccs doctor --fix</code> để tạo cấu hình.",details:"Chi tiết",syncNow:"Đồng bộ ngay"},syncDialog:{title:"Đồng bộ hóa hồ sơ với CLIProxy cục bộ",description:"Đồng bộ hóa cấu hình API CCS của bạn với CLIProxy config.yaml cục bộ.",noProfiles:"Không có profile nào để đồng bộ.",createProfilesFirst:"Trước tiên hãy tạo hồ sơ API bằng tab Hồ sơ.",modelLabel:"Mô hình:",ready:"Sẵn sàng",profilesToSync_one:"{{count}} hồ sơ để đồng bộ hóa",profilesToSync_other:"{{count}} hồ sơ cần đồng bộ hóa",cancel:"Hủy bỏ",syncing:"Đang đồng bộ hóa...",synced:"Đã đồng bộ hóa!",syncNow:"Đồng bộ ngay"},errorLogs:{title:"Nhật ký lỗi",failedRequests_one:"{{count}} yêu cầu thất bại",failedRequests_other:"{{count}} yêu cầu thất bại",cliproxyDiagnostics:"Chẩn đoán CLIProxy",showingCount:"Hiển thị 50 trong số {{total}} nhật ký",selectLog:"Chọn nhật ký để xem chi tiết",failedLoadContent:"Không tải được nội dung nhật ký",copyAbsolutePath:"Sao chép đường dẫn tuyệt đối",copyRawContent:"Sao chép nội dung nhật ký thô",tabOverview:"Tổng quan",tabHeaders:"Tiêu đề",tabRequest:"Yêu cầu",tabResponse:"Phản hồi",tabRaw:"Raw",modelLabel:"Mô hình:",quotaResetsIn:"Quota sẽ được đặt lại sau",method:"Phương thức",provider:"Nhà cung cấp",version:"Phiên bản",endpoint:"Điểm cuối",url:"URL",timestamp:"Dấu thời gian",na:"không áp dụng",noHeaders:"Không có tiêu đề nào",noRequestBody:"Không có nội dung yêu cầu",noResponseBody:"Không có nội dung phản hồi",rateLimitedMsg:"Bị giới hạn tốc độ. Hãy chuyển sang tài khoản khác hoặc chờ reset hạn ngạch. Mô hình {{model}} đã hết quota.",rateLimitedMsgNoModel:"Bị giới hạn tốc độ. Hãy chuyển sang tài khoản khác hoặc chờ reset hạn ngạch.",authFailedMsg:"Xác thực không thành công. Xác thực lại thông qua Cài đặt CLIProxy hoặc kiểm tra khóa API.",notFoundMsg:"Không tìm thấy điểm cuối. Điểm cuối này có thể không tồn tại trên nhà cung cấp này.",serverErrorMsg:"Lỗi máy chủ từ upstream. Hãy thử lại sau hoặc kiểm tra trang trạng thái của nhà cung cấp.",timeoutMsg:"Yêu cầu hết thời gian chờ. Kiểm tra kết nối mạng hoặc tăng timeout.",unknown:"không rõ"},editAccountContext:{title:"Chỉnh sửa đồng bộ hóa lịch sử",description:'Định cấu hình cách "{{name}}" chia sẻ lịch sử và tính liên tục với các tài khoản xác thực ccs khác.',syncMode:"Chế độ đồng bộ",selectContextMode:"Chọn chế độ ngữ cảnh",isolatedOption:"tách biệt (không đồng bộ)",sharedOption:"chia sẻ (đã bật đồng bộ)",sharedModeHint:"Chế độ chia sẻ sử dụng lại ngữ cảnh không gian làm việc cho các tài khoản trong cùng một nhóm đồng bộ lịch sử.",isolatedModeHint:"Chế độ biệt lập giúp tài khoản này tách biệt hoàn toàn với các tài khoản xác thực ccs khác.",historySyncGroup:"Nhóm đồng bộ hóa lịch sử",groupPlaceholder:"mặc định",groupHint:"Chuẩn hóa thành chữ thường (dấu cách trở thành dấu gạch ngang). Được phép: chữ cái, số, _ , - (tối đa {{max}} ký tự).",invalidGroup:"Nhập tên nhóm hợp lệ bắt đầu bằng một chữ cái.",continuityDepth:"Độ sâu liên tục",selectContinuityDepth:"Chọn độ sâu liên tục",standardOption:"tiêu chuẩn (chỉ đồng bộ project)",deeperOption:"tính liên tục sâu hơn (nâng cao)",deeperHint:"Chế độ nâng cao cũng đồng bộ hóa phiên-env, lịch sử tệp, ảnh chụp nhanh shell và todos.",standardHint:"Chế độ tiêu chuẩn chỉ đồng bộ hóa bối cảnh không gian làm việc của dự án.",credentialsIsolated:"Thông tin xác thực và .anthropic vẫn được tách riêng cho mỗi tài khoản ở tất cả các chế độ.",implicationTitle:"Sau khi lưu sẽ như thế nào",isolatedImplication:"Tài khoản này sẽ tiếp tục tách biệt. Tài khoản khác sẽ không thể resume trạng thái continuity của nó.",sameGroupRule:'Các tài khoản phải dùng cùng nhóm "{{group}}" thì mới chia sẻ continuity cho nhau.',noSameGroupPeer:"Hiện chưa có tài khoản nào khác dùng nhóm này.",sameGroupPeerCount_one:"{{count}} tài khoản khác đã dùng nhóm này.",sameGroupPeerCount_other:"{{count}} tài khoản khác đã dùng nhóm này.",deeperReady_one:"{{count}} tài khoản cùng nhóm đã bật deeper continuity. Đây là thiết lập handoff mạnh nhất hiện có.",deeperReady_other:"{{count}} tài khoản cùng nhóm đã bật deeper continuity. Đây là thiết lập handoff mạnh nhất hiện có.",deeperNeedsPeers:"Tài khoản này đã bật deeper continuity, nhưng tài khoản khác trong cùng nhóm vẫn cần bật deeper continuity để hỗ trợ resume xuyên tài khoản tốt hơn.",standardWarning:"Chế độ shared tiêu chuẩn chỉ phù hợp cho ngữ cảnh project. Nếu người dùng mong resume xuyên tài khoản, cả hai tài khoản nên bật deeper continuity.",resumeOriginalWarning:"Nếu cuộc trò chuyện cũ quan trọng, hãy resume nó từ tài khoản gốc trước khi đổi cấu hình.",cancel:"Hủy bỏ",save:"Lưu",saving:"Đang lưu..."},historySyncLearningMap:{title:"Cách đồng bộ hóa lịch sử hoạt động",description:"Tách biệt -> Chia sẻ -> Sâu hơn. Dùng Sync trên từng dòng để áp dụng thay đổi.",learningMap:"Bản đồ học tập",isolated:"Tách biệt",shared:"Chia sẻ",deeper:"Sâu hơn",cliproxyManaged_one:"{{count}} Tài khoản nhóm CLIProxy Claude được quản lý trong trang Action Center / CLIProxy.",cliproxyManaged_other:"{{count}} Tài khoản CLIProxy Claude pool được quản lý trong trang Action Center / CLIProxy.",showDetails:"Hiển thị chi tiết: nhóm, chuyển đổi và chính sách kế thừa",modeSwitch:"Chuyển đổi chế độ",modeSwitchDesc:"Hộp thoại đồng bộ hóa cho phép người dùng di chuyển giữa cách ly/chia sẻ và chọn tính liên tục sâu hơn.",historySyncGroup:"Nhóm đồng bộ hóa lịch sử",historySyncGroupDesc:"Cùng một nhóm nghĩa là chia sẻ cùng bối cảnh project. Nếu để trống sẽ dùng nhóm mặc định.",sameGroupRule:"Hiện tại, các tài khoản chỉ chia sẻ continuity khi cả hai đều ở chế độ shared và dùng cùng một nhóm.",deeperRecommendation:'Nhóm "{{group}}" đã được chia sẻ, nhưng deeper continuity vẫn là lựa chọn an toàn hơn nếu người dùng mong resume xuyên tài khoản.',partialGroup:'Nhóm "{{group}}" đã ổn, nhưng các tài khoản hoặc nhóm khác vẫn cần hoàn thiện cấu hình cùng nhóm hoặc deeper continuity.',readyGroup:'Nhóm "{{group}}" đã có nhiều tài khoản bật deeper continuity. Đây là thiết lập handoff mạnh nhất hiện có.',legacyConfirmation_one:"{{count}} tài khoản cũ vẫn cần xác nhận rõ ràng.",legacyConfirmation_other:"{{count}} tài khoản cũ vẫn cần xác nhận rõ ràng."},continuityReadiness:{title:"Kiểm tra resume xuyên tài khoản",description:"Dùng thẻ này để biết còn thiếu gì trước khi người dùng chuyển tài khoản.",state:{single:"một tài khoản",isolated:"resume tắt","shared-alone":"đã shared nhưng chưa đủ","shared-standard":"chỉ project",partial:"mới sẵn sàng một phần",ready:"handoff mạnh đã sẵn sàng"},metrics:{isolated:"Tách biệt",sharedPeers:"Có bạn cùng nhóm",deeperReady:"Deeper sẵn sàng"},messages:{single:{title:"Hiện chỉ có một auth account.",description:"Cross-account handoff chưa áp dụng. Hãy thêm một auth account khác trước khi cấu hình shared continuity."},isolated:{title:"Hiện tại cross-account resume đang tắt.",description:"Tất cả tài khoản đang hiển thị đều ở chế độ isolated, nên phiên được tạo trong một tài khoản sẽ ở lại tài khoản đó."},"shared-alone":{title:"Đã có shared mode, nhưng chưa có nhóm nào có bạn cùng nhóm.",description_one:"{{count}} shared account vẫn đang chờ một tài khoản khác vào cùng nhóm.",description_other:"{{count}} shared accounts vẫn đang chờ một tài khoản khác vào cùng nhóm."},"shared-standard":{title:'Nhóm "{{group}}" đang chia sẻ ngữ cảnh project nhưng chưa ghép deeper continuity.',description:"Người dùng có thể mong nhiều hơn việc chia sẻ project. Hãy bật deeper continuity trên cả hai tài khoản trong nhóm này để có handoff mạnh hơn."},partial:{title:"Một nhóm đã sẵn sàng, nhưng cấu hình tổng thể vẫn còn lẫn lộn.",description:"Ít nhất một nhóm đã dùng deeper continuity, nhưng các tài khoản khác vẫn còn isolated, ở một mình trong nhóm shared, hoặc chưa bật deeper continuity."},ready:{title:'Nhóm "{{group}}" đã có thiết lập continuity mạnh nhất hiện có.',description:"Nhiều tài khoản trong nhóm này đã bật deeper continuity. Việc resume thực tế vẫn phụ thuộc vào dữ liệu mà Claude lưu ở upstream."}},stepsTitle:"Người dùng nên làm gì tiếp theo",steps:{syncBoth:"Mở Sync trên cả hai tài khoản, không chỉ tài khoản bạn sắp chuyển sang.",sameGroup:'Dùng cùng một History Sync Group trên cả hai tài khoản. "{{group}}" là nhóm được đề xuất hiện tại.',enableDeeper:"Nếu người dùng mong resume xuyên tài khoản thay vì chỉ chia sẻ project, hãy bật deeper continuity trên cả hai tài khoản.",resumeOriginal:"Nếu cuộc trò chuyện gốc quan trọng, hãy resume nó từ tài khoản gốc trước khi đổi cài đặt continuity."},singleSteps:{addAccount:"Hãy tạo thêm một ccs auth account thứ hai trước khi lên kế hoạch handoff xuyên tài khoản.",sameGroupLater:"Khi tài khoản thứ hai đã sẵn sàng, đặt cả hai vào cùng một History Sync Group.",enableDeeperLater:"Nếu sau này người dùng sẽ mong resume xuyên tài khoản, hãy bật deeper continuity trên cả hai tài khoản.",resumeOriginal:"Cho đến khi tài khoản thứ hai sẵn sàng, các cuộc trò chuyện quan trọng vẫn nên được resume từ tài khoản gốc."}},continuityOverview:{plainLaneTitle:"Plain ccs đang dùng một lane resume khác",plainLaneDescription:"Plain ccs hiện resume từ {{lane}}, không phải lane của tài khoản này. Hãy khôi phục lane gốc trước khi đổi cài đặt sync.",setDefaultHint:"Nếu muốn plain ccs theo một tài khoản trong các phiên sau, hãy dùng hành động Set Default trên dòng tài khoản đó.",recommendBadge:"Đề xuất {{group}}",partialBadge:"Đồng bộ một phần {{group}}",lane:{native:"Claude gốc (~/.claude)",accountDefault:"tài khoản {{name}}",accountInherited:"tài khoản {{name}} qua continuity inheritance",profileDefault:"profile mặc định {{name}} qua lane Claude gốc"}},accountsTable:{name:"Tên",type:"Kiểu",defaultBadge:"mặc định",created:"Ngày tạo",lastUsed:"Được sử dụng lần cuối",historySync:"Đồng bộ hóa lịch sử",actions:"Hành động",syncTitle:"Chỉnh sửa chế độ đồng bộ, nhóm và độ sâu liên tục",confirmLegacyTitle:"Xác nhận chế độ hiện tại của tài khoản cũ này là rõ ràng",sync:"Đồng bộ hóa",confirm:"Xác nhận",active:"Đang hoạt động",setDefault:"Đặt mặc định",deleteAccount:"Xóa tài khoản",cannotDeleteDefault:"Không thể xóa tài khoản mặc định",noAccounts:"Không tìm thấy tài khoản xác thực CCS nào. Sử dụng ccs auth create để thêm tài khoản.",resetToDefault:"Đặt lại về mặc định CCS",deleteDialogTitle:"Xóa tài khoản",deleteDialogDesc:'Bạn có chắc chắn muốn xóa tài khoản "{{name}}" không? Thao tác này sẽ xóa hồ sơ và tất cả dữ liệu phiên của nó. Không thể hoàn tác hành động này.',cancel:"Hủy bỏ",delete:"Xóa",sharedGroupStandard:"chia sẻ ({{group}}, tiêu chuẩn)",sharedGroupDeeper:"chia sẻ ({{group}}, sâu hơn)",sharedGroupLegacy:"chia sẻ ({{group}}, kế thừa tiêu chuẩn)",isolatedLegacy:"tách biệt (mặc định cũ)",isolated:"tách biệt",noSameGroupPeer:"Chưa có tài khoản cùng nhóm",sameGroupPeerCount_one:"{{count}} tài khoản cùng nhóm",sameGroupPeerCount_other:"{{count}} tài khoản cùng nhóm",legacyReview:"Hãy xem lại và xác nhận trạng thái suy ra này.",noHandoff:"Resume xuyên tài khoản vẫn sẽ quay về tài khoản gốc.",badges:{shared:"Chia sẻ",deeper:"Sâu hơn",legacy:"Kế thừa",isolated:"Tách biệt"}},addAccountDialog:{title:"Thêm tài khoản {{displayName}}",descKiro:"Chọn phương thức xác thực Kiro, sau đó xác thực qua trình duyệt hoặc nhập từ Kiro IDE.",descDeviceCode:"Nhấp vào Xác thực. Mã xác minh sẽ xuất hiện để bạn nhập vào trang web của nhà cung cấp.",descOauth:"Nhấp vào Xác thực để nhận URL OAuth. Mở nó trong bất kỳ trình duyệt nào để đăng nhập.",powerUserEnabled:"Đã bật chế độ power user",powerUserSkipped:"Chế độ power user trong Cài đặt > Proxy đang bỏ qua danh sách kiểm tra trách nhiệm AGY và bước nhập cụm từ rủi ro của Gemini trên dashboard. Bạn tự chịu hoàn toàn rủi ro OAuth/tài khoản.",powerUserLoadFailed:"Không thể tải cài đặt chế độ power user. Hãy kiểm tra Cài đặt > Proxy rồi thử lại.",powerUserLoading:"Đang tải cài đặt an toàn cho chế độ power user. Vui lòng đợi một chút rồi thử lại.",powerUserUnavailableRetry:"Chế độ power user hiện không khả dụng. Hãy hoàn tất bước an toàn bắt buộc của nhà cung cấp rồi thử lại.",authMethod:"Phương thức xác thực",selectKiroAuthMethod:"Chọn phương thức xác thực Kiro",nicknameRequired:"Biệt danh (bắt buộc)",nicknameOptional:"Biệt danh (tùy chọn)",nicknamePlaceholder:"ví dụ: công việc, cá nhân",nicknameRequiredHint:"Bắt buộc với nhà cung cấp này. Dùng tên thân thiện duy nhất (ví dụ: work, personal).",nicknameOptionalHint:"Tên thân thiện để nhận biết tài khoản này. Để trống để dùng mã nhận dạng an toàn do hệ thống tạo.",waitingForAuth:"Đang chờ xác thực...",deviceCodeHint:"Hộp thoại mã xác minh sẽ sớm xuất hiện. Nhập mã trên trang web của nhà cung cấp.",browserHint:"Hoàn tất xác thực trong trình duyệt của bạn. Hộp thoại này sẽ tự động đóng lại.",openUrlLabel:"Mở URL này trong bất kỳ trình duyệt nào để đăng nhập:",copied:"Đã sao chép",copy:"Sao chép",open:"Mở",popupBlocked:"Cửa sổ bật lên bị chặn. Sao chép URL ở trên và mở thủ công trong trình duyệt của bạn.",redirectPasteLabel:"Chuyển hướng không hoạt động? Dán URL gọi lại:",callbackPlaceholder:"Dán URL chuyển hướng vào đây...",submitCallback:"Gửi cuộc gọi lại",submitting:"Đang gửi...",preparingUrl:"Đang chuẩn bị URL đăng nhập...",cancel:"Hủy bỏ",importingToken:"Đang nhập token từ Kiro IDE...",authenticate:"Xác thực",importFromIde:"Nhập từ IDE",importing:"Đang nhập..."},flowViz:{backToProviders:"Quay lại nhà cung cấp",showDetails:"Hiển thị chi tiết",hideDetails:"Ẩn chi tiết",showPausedAccounts:"Hiện tạm dừng ({{count}})",hidePausedAccounts:"Ẩn tạm dừng ({{count}})",visibleTotalRequests:"Yêu cầu hiển thị",visibleAccounts:"Tài khoản hiển thị",excludingPausedAccounts:"Đang loại trừ {{count}} tài khoản tạm dừng",resetLayout:"Đặt lại bố cục",provider:"Nhà cung cấp",totalRequests:"Tổng số yêu cầu",accounts:"Tài khoản",connectionTimeline:"Dòng thời gian kết nối",noRecentConnections:"Không có kết nối gần đây"},quickStats:{totalRequests:"Tổng số yêu cầu",successRate:"Tỷ lệ thành công",totalTokens:"Tổng số token",activeModels:"Mô hình hoạt động"},authMonitor:{accounts:"Tài khoản",accountsCount:"{{count}} tài khoản",success:"Thành công",failed:"Thất bại",successRate:"Tỷ lệ thành công"},accountCard:{resumeAccount:"Tiếp tục tài khoản",pauseAccount:"Tạm dừng tài khoản",quotaLoading:"Hạn ngạch...",quota:"hạn ngạch",quotaUnavailable:"Thông tin quota chưa khả dụng",reauthNeeded:"Cần xác thực lại",failureLabelReauth:"Xác thực lại",failureLabelWorkspace:"Workspace",failureLabelNoAccess:"Không có quyền",failureLabelRetry:"Thử lại",failureLabelReconnect:"Kết nối lại",failureLabelTemporary:"Tạm thời",failureLabelUnavailable:"Chưa khả dụng",failureHintReauth:"Chạy lại luồng xác thực của tài khoản này để làm mới quyền truy cập.",failureHintWorkspace:"Chuyển tài khoản này về workspace còn hoạt động rồi xóa và thêm lại.",failureHintNoAccess:"Tài khoản này không thể truy cập endpoint quota của nhà cung cấp.",failureHintRetry:"Đợi một chút rồi thử lại yêu cầu quota.",failureHintReconnect:"Xóa tài khoản cũ rồi xác thực lại.",failureHintTemporary:"Có vẻ đây là lỗi tạm thời. Hãy thử lại sau.",removeAndReadd:"Xóa và thêm lại tài khoản",autoRefreshFailed:"Tự động làm mới không thành công"},antigravityChecklist:{title:"Trách nhiệm OAuth Antigravity",subtitle:"Hoàn thành tất cả 4 bước trước khi bạn có thể xác thực.",mandatory:"Bắt buộc",completion:"Hoàn thành",stepsCount:"{{current}}/4 bước"},accountSafetyWarning:{title:"Cảnh báo an toàn tài khoản OAuth",subtitle:"Vấn đề #509 · Rủi ro Gemini + AGY OAuth",firstLine:"Issue #509 ghi nhận các trường hợp bị đình chỉ/cấm liên quan đến ccs agy và việc dùng chung tài khoản giữa ccs gemini và ccs agy.",secondLine:"Chỉ tiếp tục nếu bạn chấp nhận hoàn toàn trách nhiệm về OAuth và rủi ro truy cập tài khoản.",issueLabel:"Đọc vấn đề #509",proxySettingsLabel:"Điều khiển Gemini + AGY: Cài đặt > Proxy"},cliproxyDialog:{name:"Tên",provider:"Nhà cung cấp",account:"Tài khoản",accountOptional:"Tài khoản (tùy chọn)",model:"Mô hình",modelOptional:"Mô hình (tùy chọn)",defaultTarget:"Mục tiêu mặc định",defaultTier:"Cấp mặc định",tierConfig:"Cấu hình cấp độ",selectProvider:"Chọn nhà cung cấp...",useDefaultAccount:"Sử dụng tài khoản mặc định",defaultSuffix:"(mặc định)",opus:"Opus",sonnet:"Sonnet",haiku:"Haiku",claudeCode:"Claude Code",factoryDroid:"Factory Droid",cancel:"Hủy bỏ",create:"Tạo",creating:"Đang tạo...",saveChanges:"Lưu thay đổi",saving:"Đang lưu...",placeholderName:"Gemini của tôi",placeholderModel:"gemini-2.5-pro",placeholderComposite:"my-composite",placeholderModelId:"model-id",placeholderAccountId:"account-id",editCompositeTitle:"Chỉnh sửa biến thể tổng hợp: {{name}}",editSingleTitle:"Chỉnh sửa biến thể: {{name}}"},profileEditor:{profileInfo:"Thông tin hồ sơ",profileName:"Tên hồ sơ",filePath:"Đường dẫn tệp",lastModified:"Sửa đổi lần cuối",defaultTarget:"Mục tiêu mặc định",quickUsage:"Sử dụng nhanh",runWithProfile:"Chạy với hồ sơ",runOnDroid:"Chạy trên Droid",runOnDroidWithFlag:"Chạy trên Droid (--target)",droidAliasExplicit:"Bí danh Droid (rõ ràng)",overrideToClaude:"Ghi đè lên Claude",overrideToClaudeExplicit:"Ghi đè lên Claude (rõ ràng)",targetHintPreferredAlias:"Bí danh rõ ràng nên dùng:",targetHintClaudeDefault:"Lệnh mặc định:",targetHintLegacyAlias:"Lối tắt cũ vẫn dùng được:",targetHintOverride:"Bạn vẫn có thể ghi đè mỗi lần chạy bằng",setAsDefault:"Đặt làm mặc định",provider:"Nhà cung cấp",custom:"Tùy chỉnh",providerChooserHint:"Bắt đầu với preset, sau đó bạn vẫn có thể chỉnh URL, API key và ánh xạ mô hình.",featuredProviders:"Nhà cung cấp nổi bật",scrollHint:"Có thể cuộn ngang trên màn hình hẹp",customEndpoint:"Endpoint tùy chỉnh",morePresets:"Thêm preset",customEndpointDescription:"Bắt đầu với URL tương thích Anthropic trống và tự cấu hình mọi thứ."},settings:{sectionLoadFailed:"Không tải được phần",unknownError:"Đã xảy ra lỗi không xác định",reloadPage:"Tải lại trang",refresh:"Làm mới",copy:"Sao chép",copied:"Đã sao chép",saved:"Đã lưu",loading:"Đang tải...",configFileNotFound:"Không tìm thấy tập tin cấu hình"},settingsTabs:{web:"Web",env:"Env",think:"Tư duy",proxy:"Proxy",auth:"Xác thực",backup:"Sao lưu"},settingsAuth:{failedFetchTokens:"Không thể tải token xác thực",failedSaveTokens:"Không thể lưu token",tokensUpdated:"Đã cập nhật token. Khởi động lại CLIProxy để áp dụng.",failedRegenerate:"Không thể tạo lại bí mật",secretRegenerated:"Bí mật quản lý mới được tạo. Khởi động lại CLIProxy để áp dụng.",failedReset:"Không thể đặt lại token",tokensReset:"Token đã được đặt lại về mặc định. Khởi động lại CLIProxy để áp dụng.",description:"Cấu hình token xác thực CLIProxy. Các thay đổi yêu cầu khởi động lại CLIProxy.",apiKey:"Khóa API",custom:"Tùy chỉnh",apiKeyDesc:"Được Claude Code dùng để xác thực qua CLIProxy",apiKeyPlaceholder:"Khóa API",managementSecret:"Bí mật quản lý",managementSecretDesc:"Được bảng điều khiển CCS sử dụng để truy cập API quản lý CLIProxy",managementSecretPlaceholder:"Bí mật quản lý",generateSecret:"Tạo bí mật an toàn mới",resetDefaults:"Đặt lại về mặc định",resetDesc:"Đặt lại cả khóa API và bí mật quản lý về giá trị mặc định.",saving:"Đang lưu...",save:"Lưu"},settingsGlobalEnv:{description:"Biến môi trường được áp dụng cho tất cả hồ sơ không dùng Claude subscription (gemini, codex, agy, ghcp, v.v.)",enabled:"Đã bật Env toàn cầu",disabled:"Env toàn cầu bị vô hiệu hóa",enabledDesc:"Biến Env sẽ được áp dụng cho các hồ sơ bên thứ ba",disabledDesc:"Biến Env sẽ không được áp dụng",envVars:"Biến môi trường",noneConfigured:"Không có biến môi trường nào được cấu hình",addNew:"Thêm biến mới",keyName:"KEY_NAME",value:"giá trị",add:"Thêm",quickAdd:"Thêm nhanh các biến phổ biến",allConfigured:"Tất cả biến phổ biến đã được cấu hình"},settingsBackups:{failedFetch:"Không tìm nạp được bản sao lưu",failedRestore:"Không thể khôi phục bản sao lưu",restoreSuccess:"Đã khôi phục bản sao lưu thành công",title:"Sao lưu cài đặt",description:"Khôi phục các phiên bản trước của tệp settings.json của bạn. Bản sao lưu được tạo tự động khi cài đặt được sửa đổi.",none:"Không có bản sao lưu nào",noneHint:"Bản sao lưu sẽ xuất hiện ở đây khi bạn sửa đổi cài đặt",latest:"Mới nhất",restoring:"Đang khôi phục...",restore:"Khôi phục",restoreConfirmTitle:"Khôi phục bản sao lưu?",restoreConfirmPrefix:"Điều này sẽ thay thế cài đặt hiện tại của bạn bằng bản sao lưu từ",restoreConfirmSuffix:"Không thể hoàn tác hành động này.",cancel:"Hủy bỏ"},settingsWebsearch:{description:"Tìm kiếm trên web dựa trên CLI cho hồ sơ của bên thứ ba (gemini, codex, agy, v.v.)",enabled:"Đã bật Tìm kiếm trên web",disabled:"Tìm kiếm trên web bị vô hiệu hóa",checking:"Đang kiểm tra trạng thái...",providers:"Nhà cung cấp",noneConfigured:"Không có nhà cung cấp nào được cấu hình",noneConfiguredHint:"Cài công cụ CLI để bật các nhà cung cấp WebSearch",checkProviders:"Kiểm tra các nhà cung cấp",installed:"đã cài đặt",notInstalled:"chưa được cài đặt",model:"Mô hình:",howInstall:"Cách cài đặt {{name}} CLI",installGlobally:"Cài đặt trên toàn cầu",requiresKey:"(cần khóa API xAI)",freeTier:"(Có sẵn cấp MIỄN PHÍ)",viewDocs:"Xem tài liệu"},settingsProxy:{failedLoadAgyMode:"Không thể tải chế độ power user",failedUpdateAgyMode:"Không thể cập nhật chế độ power user",failedVerifyAgyMode:"Không thể xác minh trạng thái lưu của chế độ power user",notPersistedAgyMode:"Chế độ power user chưa được lưu bền vững. Cấu hình có thể đã bị tiến trình khác sửa.",agyModeEnabled:"Đã bật chế độ power user.",agyModeDisabled:"Đã tắt chế độ power user.",typePhraseToContinue:'Nhập "{{value}}" để tiếp tục.',description:"Định cấu hình kết nối {{backend}} cục bộ hoặc từ xa cho cấu hình dựa trên proxy",backendPlus:"CLIProxy Plus",backend:"CLIProxy",instanceStatus:"Trạng thái phiên bản",connectionMode:"Chế độ kết nối",local:"Cục bộ",remote:"Từ xa",localDesc:"Chạy nhị phân {{backend}} trên máy này",remoteDesc:"Kết nối với máy chủ {{backend}} từ xa",backendBinary:"Tệp thực thi backend",stopProxyToSwitch:"Dừng proxy đang chạy trong Trạng thái phiên bản trước khi chuyển backend.",default:"Mặc định",plusDesc:"Hỗ trợ đầy đủ nhà cung cấp, bao gồm Kiro và GitHub Copilot",originalDesc:"Binary gốc (chỉ Gemini, Codex, Antigravity)",variantsIncompatible:"Các biến thể Kiro/Copilot hiện tại sẽ không hoạt động với CLIProxyAPI. Chuyển sang CLIProxyAPIPlus hoặc xóa các biến thể đó.",safety:"An toàn",agyModeTitle:"Chế độ power user Antigravity + Gemini",agyModeDesc:"Bỏ qua danh sách kiểm tra trách nhiệm AGY và bước nhập cụm từ xác nhận của Gemini trên dashboard.",agyWarning:"Chỉ bật nếu bạn hiểu rõ rủi ro bị đình chỉ/cấm OAuth (#509). CCS không chịu trách nhiệm khi mất tài khoản.",finalConfirm:"Xác nhận cuối cùng",finalConfirmDesc:"Việc bật tính năng này sẽ bỏ qua các điểm kiểm tra an toàn AGY và bước nhập cụm từ rủi ro của Gemini trên dashboard. Xem lại vấn đề #509 và nhập cụm từ chính xác để tiếp tục.",step1:"Bước 1",readIssue:"Đọc vấn đề #509",step2:"Bước 2",typePrefix:"Nhập",typeSuffix:"để kích hoạt.",typePhraseAria:"Nhập I ACCEPT RISK để bật chế độ power user Antigravity + Gemini",exactPhrase:"Phải nhập chính xác cụm từ.",enableAgyMode:"Bật chế độ power user Antigravity + Gemini",toggleAgyMode:"Chuyển đổi chế độ power user Antigravity + Gemini",fallbackSettings:"Cài đặt dự phòng",enableFallback:"Cho phép dự phòng về cục bộ",enableFallbackDesc:"Sử dụng proxy cục bộ nếu không thể truy cập được từ xa",autoStartLocal:"Tự động khởi động proxy cục bộ",autoStartLocalDesc:"Tự động khởi động proxy cục bộ khi dự phòng",advanced:"Nâng cao",debugMode:"Chế độ gỡ lỗi",debugModeDesc:"Bật chẩn đoán dành cho nhà phát triển trong bảng điều khiển trình duyệt",debugModeEnabled:"Đã bật chế độ gỡ lỗi. Kiểm tra bảng điều khiển trình duyệt để biết nhật ký chi tiết.",localProxy:"Proxy cục bộ",port:"Cổng",autoStart:"Tự động khởi động",localAutoStartDesc:"Tự động khởi động proxy cục bộ khi cần",remoteConfigTitle:"Cấu hình máy chủ từ xa",host:"Host",hostPlaceholder:"192.168.1.100 hoặc proxy.example.com",defaultPort:"mặc định {{value}}",portPlaceholder:"Để trống để dùng {{value}}",protocol:"Giao thức",http:"HTTP",https:"HTTPS",apiKeyOptional:"Khóa API (tùy chọn)",apiKeyPlaceholder:"Đối với điểm cuối API /v1/*",apiKeyDesc:"Dùng cho các yêu cầu API đến /v1/chat/completions",managementKeyOptional:"Khóa quản lý (tùy chọn)",managementKeyPlaceholder:"Đối với điểm cuối /v0/management/*",managementKeyDesc:"Dùng cho API quản lý dashboard. Nếu bỏ trống sẽ dùng Khóa API.",testing:"Đang thử nghiệm...",testConnection:"Kiểm tra kết nối",connectedLatency:"Đã kết nối ({{value}}ms)",connectionFailed:"Kết nối không thành công",invalidPortOrEmpty:"Cổng phải là số nguyên từ 1 đến 65535 hoặc để trống theo mặc định",invalidLocalPort:"Cổng cục bộ phải là số nguyên từ 1 đến 65535",backendPlusApi:"CLIProxyAPIPlus",backendApi:"CLIProxyAPI"},settingsThinking:{description:"Định cấu hình tư duy/lý luận mở rộng cho các mô hình được hỗ trợ.",supportedProviders:"Nhà cung cấp được hỗ trợ",modeTitle:"Chế độ Thinking",modeAutoDesc:"Tự động thiết lập tư duy dựa trên tầng mô hình",modeOffDesc:"Vô hiệu hóa suy nghĩ mở rộng",modeManualDesc:"Đặt mức ghi đè liên tục hoặc sử dụng cờ CLI mỗi lần chạy",tierDefaults:"Mặc định cấp độ",tierDefaultsDesc:"Mức độ tư duy mặc định cho từng tầng mô hình khi ở chế độ tự động.",persistentOverride:"Ghi đè liên tục",persistentOverrideDesc:"Áp dụng cho tất cả các buổi. Cờ CLI vẫn được ưu tiên.",enterCustomBudget:"Nhập ngân sách tùy chỉnh",apply:"Áp dụng",providerOverrides:"Ghi đè nhà cung cấp ({{count}})",providerOverridesDesc:"Ghi đè mặc định cấp độ cho các nhà cung cấp cụ thể. Thêm khóa nhà cung cấp tùy chỉnh nếu cần.",addProviderPlaceholder:"Thêm khóa nhà cung cấp (ví dụ: qwen)",showWarnings:"Hiển thị cảnh báo",showWarningsDesc:"Hiển thị cảnh báo khi các giá trị suy nghĩ bị hạn chế hoặc điều chỉnh",cliEnvOverride:"Ghi đè CLI & Env",supportLine1Prefix:"Ngân sách suy nghĩ:",supportLine1Suffix:"(dựa trên token)",supportLine2Prefix:"Nỗ lực lý luận:",supportLine2SuffixPrefix:"(hậu tố hoặc ",supportLine2SuffixPostfix:": minimal/low/medium/high/xhigh)",supportLine3Prefix:"Hậu tố Codex cố định mức effort (ví dụ ",supportLine3Suffix:"); model không hậu tố sẽ dùng chế độ Thinking."},analytics:{title:"Phân tích",subtitle:"Theo dõi việc sử dụng và thông tin chi tiết",month:"Tháng",allTime:"Tất cả thời gian",updated:"Đã cập nhật {{value}}"},analyticsSummary:{totalTokens:"Tổng số token",totalTokensSubtitle:"{{input}} vào / {{output}} ra",totalCost:"Tổng chi phí",totalCostSubtitle:"trung bình ${{value}}/ngày",cacheTokens:"Token bộ đệm",cacheTokensSubtitle:"${{cost}} ({{percent}}% chi phí)",inputCost:"Chi phí đầu vào",outputCost:"Chi phí đầu ra",tokensSubtitle:"{{value}} token"},apiProfiles:{title:"Hồ sơ API",new:"Mới",searchPlaceholder:"Tìm kiếm hồ sơ...",loadingProfiles:"Đang tải hồ sơ...",failedLoadTitle:"Không tải được hồ sơ",failedLoadDesc:"Không thể tìm nạp hồ sơ API. Vui lòng thử lại.",retry:"Thử lại",noProfilesYet:"Chưa có hồ sơ API nào",noProfilesDesc:"Tạo hồ sơ đầu tiên của bạn để kết nối với các điểm cuối API tùy chỉnh",createProfile:"Tạo hồ sơ",noProfileMatch:'Không có hồ sơ nào khớp với "{{query}}"',profileCount:"{{count}} hồ sơ",profileCount_other:"{{count}} hồ sơ",configuredCount:"{{count}} đã cấu hình",deleteProfileTitle:"Xóa hồ sơ",deleteProfileDesc:'Bạn có chắc chắn muốn xóa "{{name}}" không? Thao tác này sẽ xóa tệp cài đặt và không thể hoàn tác.',delete:"Xóa",unsavedChangesTitle:"Những thay đổi chưa được lưu",unsavedChangesDesc:'Bạn có những thay đổi chưa được lưu trong "{{current}}". Hủy và chuyển sang "{{next}}"?',discardSwitch:"Loại bỏ và chuyển đổi"},accountsPage:{title:"Tài khoản",managePrefix:"Quản lý",manageSuffix:"tài khoản và nhóm đồng bộ từ một nơi.",mobileManageSuffix:"tính liên tục cho mỗi tài khoản.",primaryActions:"Hành động chính",createAccount:"Tạo tài khoản",authClaudeInPool:"Xác thực Claude trong Pool",openClaudePoolSettings:"Mở cài đặt Claude pool",openCliProxyClaudePool:"Mở CLIProxy Claude Pool",migrationFollowup:"Theo dõi sau di chuyển",legacyContextPending:"{{count}} tài khoản vẫn cần xác nhận chế độ lần đầu.",legacyContextPending_other:"{{count}} tài khoản vẫn cần xác nhận chế độ lần đầu.",legacyContinuityPending:"{{count}} tài khoản được chia sẻ vẫn ở mức độ liên tục kế thừa tiêu chuẩn.",legacyContinuityPending_other:"{{count}} tài khoản được chia sẻ vẫn ở mức độ liên tục kế thừa tiêu chuẩn.",confirmingLegacy:"Đang xác nhận chính sách kế thừa...",confirmLegacy:"Xác nhận chính sách kế thừa ({{count}})",noLegacyFollowup:"Không có hoạt động theo dõi kế thừa nào đang chờ xử lý.",continuityGuide:"Hướng dẫn liên tục",expandWhenNeeded:"Chỉ mở rộng khi cần thiết.",sharedStandard:"Tiêu chuẩn chung",sharedStandardDesc:"Chỉ đồng bộ hóa không gian làm việc của dự án. Mặc định tốt nhất cho hầu hết các đội.",sharedDeeper:"Chia sẻ sâu hơn",sharedDeeperDesc:"Đồng bộ thêm session-env, file-history, shell-snapshots và todos. Nên dùng khi người dùng mong resume xuyên tài khoản.",sharedDeeperPrefix:"Thêm",isolated:"Tách biệt",isolatedDesc:"Không có liên kết. Tốt nhất cho sự tách biệt nghiêm ngặt.",quickCommands:"Lệnh nhanh",quickCommandsDesc:"Sao chép và chạy trong terminal.",workspaceBadge:"Không gian làm việc `ccs auth`",historySyncBadge:"Kiểm soát đồng bộ hóa lịch sử",authAccounts:"Tài khoản xác thực",tableScopePrefix:"Bảng này được cố ý đặt trong phạm vi",tableScopeMiddle:"tài khoản. Sử dụng",tableScopeSuffix:"để thay đổi chế độ/nhóm/độ sâu.",accountMatrix:"Ma trận tài khoản",sharedTotalDesc:"Tổng số tài khoản chia sẻ: {{count}}. Bao gồm thao tác Sync và xác nhận kế thừa.",loadingAccounts:"Đang tải tài khoản..."},health:{justNow:"vừa xong",secondsAgo:"{{count}} giây trước",minutesAgo:"{{count}} phút trước",hoursAgo:"{{count}} giờ trước",systemHealth:"Tình trạng hệ thống",build:"bản dựng {{version}}",lastScan:"Lần quét cuối cùng:",autoRefresh:"Tự động làm mới:",refresh:"Làm mới",checks:"Kiểm tra",version:"Phiên bản",platform:"Nền tảng",liveMonitoring:"Giám sát trực tiếp đang hoạt động",copied:"Đã sao chép vào bảng nhớ tạm",refreshing:"Đang làm mới kiểm tra trạng thái...",fix:"Sửa chữa",applyFix:"Áp dụng bản sửa lỗi",healthLabel:"trạng thái"},updates:{actionRequired:"Hành động bắt buộc",done:"Xong",all:"Tất cả",inboxTitle:"Trung tâm cập nhật",inboxSubtitle:"Tập trung vào các hành động, sau đó đánh dấu các cập nhật đã hoàn tất hoặc bị loại bỏ.",needsAction:"Cần hành động",doneCount:"Xong",searchPlaceholder:"Tìm kiếm hành động hoặc lệnh",noNotices:"Không có thông báo nào khớp với chế độ xem này.",noUpdates:"Hiện không có bản cập nhật nào.",published:"Đã xuất bản {{date}}",markDone:"Đánh dấu hoàn tất",dismiss:"Ẩn",reopen:"Mở lại",doNext:"Làm tiếp theo",impactedIntegrations:"Tích hợp bị ảnh hưởng",impactedDesc:"Các khu vực liên quan dựa trên phạm vi cập nhật và định tuyến.",whyMatters:"Tại sao nó quan trọng",whyMattersDesc:"Chỉ ngữ cảnh ngắn, không có ghi chú phát hành trên tường văn bản.",open:"Mở",progressNeedsAction:"Cần hành động",progressInReview:"Đang xem xét",progressDone:"Xong",progressDismissed:"Bị loại bỏ",statusNew:"Mới",statusStable:"Ổn định",statusPlanned:"Đã lên kế hoạch",dashboard:"Trang tổng quan",cliUsage:"Cách sử dụng CLI"},cliproxyPage:{connected:"Đã kết nối",notConnected:"Chưa kết nối",variant:"Biến thể",parentNotConnected:"Profile gốc chưa kết nối",viaProvider:"qua {{provider}}",emptyTitle:"Trình quản lý hồ sơ CCS",emptyDesc:"Quản lý xác thực OAuth, tùy chọn tài khoản và chọn mô hình cho nhà cung cấp CLIProxy. Cấu hình cách CCS định tuyến yêu cầu đến các backend AI khác nhau.",emptyControlPanelPrefix:"Để biết số liệu thống kê sử dụng trực tiếp và theo dõi thời gian thực, hãy truy cập",controlPanel:"Bảng điều khiển",quickSetup:"Thiết lập nhanh",accountManagement:"Quản lý tài khoản cấp CCS",providers:"Nhà cung cấp",variants:"Biến thể",providerCount:"{{count}} nhà cung cấp",providerCount_other:"{{count}} nhà cung cấp",connectedCount:"{{count}} đã kết nối",variantDisplay:"{{name}} (biến thể {{provider}})"},copilotPage:{title:"Copilot",subtitle:"Proxy GitHub Copilot",setup:"Cài đặt",auth:"Xác thực",daemon:"Daemon",unofficialTitle:"API không chính thức - Bạn phải tự chịu rủi ro khi sử dụng",unofficialItem1:"API được thiết kế ngược - có thể bị hỏng bất cứ lúc nào",unofficialItem2:"Việc sử dụng quá mức có thể gây ra hạn chế tài khoản",unofficialItem3:"Không bảo hành, không chịu trách nhiệm từ CCS",yes:"Có",no:"Không",installed:"Đã cài đặt",missing:"Thiếu",integration:"Tích hợp",enabled:"Đã bật",disabled:"Đã tắt",github:"GitHub",connected:"Đã kết nối",notConnected:"Chưa kết nối",authenticate:"Xác thực",authenticating:"Đang xác thực...",status:"Trạng thái",running:"Đang chạy",stopped:"Đã dừng",port:"Cổng",stopping:"Đang dừng...",stop:"Dừng lại",starting:"Đang bắt đầu...",start:"Bắt đầu",installing:"Đang cài đặt...",installCopilotApi:"Cài đặt copilot-api",proxy:"Proxy",active:"Đang hoạt động",inactive:"Không hoạt động"},cursorPage:{title:"Cursor",beta:"Beta",subtitle:"Bảng điều khiển tích hợp Cursor",unofficialTitle:"API không chính thức - Bạn phải tự chịu rủi ro khi sử dụng",unofficialItem1:"Tích hợp thiết kế ngược có thể bị hỏng bất cứ lúc nào",unofficialItem2:"Lạm dụng hoặc sử dụng quá mức có thể có nguy cơ bị hạn chế tài khoản",unofficialItem3:"Không bảo hành, không chịu trách nhiệm từ CCS",integration:"Tích hợp",authentication:"Xác thực",daemon:"Daemon",enabled:"Đã bật",disabled:"Đã tắt",expired:"Hết hạn",connected:"Đã kết nối",notConnected:"Chưa kết nối",running:"Đang chạy",stopped:"Đã dừng",actions:"Hành động",disableIntegration:"Vô hiệu hóa tích hợp",enableIntegration:"Kích hoạt tích hợp",autoDetectAuth:"Tự động phát hiện xác thực",manualAuthImport:"Nhập xác thực thủ công",stopDaemon:"Dừng Daemon",startDaemon:"Khởi động Daemon",port:"Cổng",configuration:"Cấu hình Cursor",lastModified:"Sửa đổi lần cuối:",neverSaved:"Chưa bao giờ lưu",saving:"Đang lưu...",save:"Lưu",modelConfig:"Cấu hình mô hình",settings:"Cài đặt",info:"Thông tin",presets:"Cài đặt sẵn",presetsDesc:"Áp dụng ánh xạ mô hình được cấu hình sẵn",modelMapping:"Ánh xạ mô hình",modelMappingDesc:"Định cấu hình mô hình nào sẽ sử dụng cho từng tầng",defaultModel:"Mô hình mặc định",defaultModelDesc:"Dùng khi không chỉ định tier cụ thể.",opusModel:"Opus (Có khả năng nhất)",opusModelDesc:"Lý luận phức tạp và phản hồi chất lượng cao nhất.",sonnetModel:"Sonnet (Cân bằng)",sonnetModelDesc:"Khối lượng công việc mã hóa chung và trò chuyện hàng ngày.",haikuModel:"Haiku (Nhanh)",haikuModelDesc:"Đường dẫn yêu cầu nhẹ, độ trễ thấp.",runtimeSettings:"Cài đặt thời gian chạy",autoStartDaemon:"Daemon tự động khởi động",autoStartDesc:"Tự động khởi động daemon Cursor khi dùng tích hợp.",ghostMode:"Chế độ ma",ghostModeDesc:"Gửi x-ghost-mode để giảm telemetry.",provider:"Nhà cung cấp",filePath:"Đường dẫn tệp",availableModels:"Mô hình khả dụng",loadingModels:"Đang tải mô hình...",noModels:"Chưa có siêu dữ liệu mô hình nào. Bắt đầu daemon và làm mới.",default:"Mặc định",rawConfiguration:"Cấu hình thô (JSON)",manualImportTitle:"Nhập xác thực Cursor thủ công",manualImportDesc:"Cung cấp access token và machine ID của Cursor nếu không tự phát hiện được.",accessToken:"Access token",accessTokenPlaceholder:"Dán access token của Cursor",machineId:"ID máy",machineIdPlaceholder:"Hex 32 ký tự (UUID không có dấu gạch nối)",cancel:"Hủy bỏ",import:"Nhập",selectModel:"Chọn mô hình",useDefaultModel:"Sử dụng mô hình mặc định",availableModelCount:"Mô hình khả dụng ({{count}})",invalidPort:"Cổng phải là số nguyên từ 1 đến 65535",defaultModelRequired:"Mô hình mặc định là bắt buộc",savedConfig:"Đã lưu cấu hình Cursor và ánh xạ mô hình",failedSaveConfig:"Không lưu được cấu hình",modelsLoadingWait:"Mô hình vẫn đang tải. Vui lòng đợi trước khi áp dụng preset.",noModelsAvailable:"Chưa có mô hình nào. Hãy khởi động daemon rồi làm mới.",appliedCodexPreset:"Đã áp dụng preset Codex GPT-5.3",appliedClaudePreset:"Đã áp dụng preset Claude 4.6",appliedGeminiPreset:"Đã áp dụng preset Gemini 3",integrationEnabled:"Đã bật tích hợp Cursor",integrationDisabled:"Đã tắt tích hợp Cursor",failedUpdateIntegration:"Không cập nhật được trạng thái tích hợp",credentialsImported:"Đã nhập thông tin xác thực Cursor",autoDetectFailed:"Tự động phát hiện không thành công",manualRequired:"Cần token và machine ID",manualImportFailed:"Nhập thủ công không thành công",failedStartDaemon:"Không thể khởi động daemon",daemonStarted:"Đã khởi động daemon",daemonStartedWithPid:"Daemon đã khởi động (PID: {{pid}})",failedStopDaemon:"Không thể dừng daemon",daemonStopped:"Đã dừng daemon",rawLoading:"Cài đặt thô vẫn đang tải. Vui lòng đợi và thử lại.",invalidJson:"JSON không hợp lệ",rawSaved:"Đã lưu cài đặt thô",rawChanged:"Cài đặt thô đã thay đổi bên ngoài. Làm mới và thử lại.",failedSaveRaw:"Không lưu được cài đặt thô",savedAll:"Đã lưu cấu hình Cursor",liveProbe:"Kiểm tra trực tiếp",runLiveProbe:"Chạy kiểm tra trực tiếp",rerunLiveProbe:"Chạy lại kiểm tra trực tiếp",probing:"Đang kiểm tra...",probeNotRun:"Chưa chạy kiểm tra",probeLocalReadinessHint:"Các kiểm tra sẵn sàng cục bộ có thể đạt, nhưng luồng chạy thực tế vẫn có thể lỗi. Hãy dùng kiểm tra trực tiếp để xác minh toàn bộ đường đi của Cursor.",probeStage:"Giai đoạn",probeHttpStatus:"Trạng thái HTTP",probeDuration:"Thời lượng",probeModel:"Mô hình",probeMessage:"Thông điệp",probeSucceeded:"Kiểm tra thành công",probeFailed:"Kiểm tra thất bại",probeSaveFirst:"Hãy lưu hoặc bỏ các thay đổi Cursor trước khi chạy kiểm tra trực tiếp",refreshStatus:"Làm mới trạng thái Cursor",refreshConfiguration:"Làm mới cấu hình Cursor"},droidPage:{loadingDiagnostics:"Đang tải chẩn đoán Droid...",failedDiagnostics:"Không tải được chẩn đoán Droid.",overview:"Tổng quan",byok:"BYOK",docs:"Tài liệu",runtimeInstall:"Thời gian chạy và cài đặt",status:"Trạng thái",detected:"Đã phát hiện",notFound:"Không tìm thấy",detectionSource:"Nguồn phát hiện",binaryPath:"Đường dẫn nhị phân",installDirectory:"Thư mục cài đặt",version:"Phiên bản",overridePath:"Ghi đè (CCS_DROID_PATH)",configFiles:"Tệp cấu hình",path:"Đường dẫn",resolved:"Đã giải quyết",size:"Kích cỡ",lastModified:"Sửa đổi lần cuối",parseWarning:"Cảnh báo phân tích cú pháp: {{value}}",readWarning:"Đọc cảnh báo: {{value}}",warnings:"Cảnh báo",byokSummary:"Tóm tắt BYOK",activeModelSelector:"Bộ chọn mô hình hoạt động",customModels:"Mô hình tùy chỉnh",ccsManaged:"do CCS quản lý",userManaged:"Do người dùng quản lý",malformedEntries:"Mục nhập không đúng định dạng",providers:"Nhà cung cấp",none:"không có",customModelsTitle:"Mô hình tùy chỉnh",modelName:"Tên/model",provider:"Nhà cung cấp",baseUrl:"URL cơ sở",noCustomModels:"Không có mô hình tùy chỉnh",docsAlignedNotes:"Ghi chú được căn chỉnh trong Tài liệu",factoryDocs:"Tài liệu Factory",providerFactCheckDocs:"Tài liệu kiểm tra thực tế của nhà cung cấp",providerValues:"Giá trị của nhà cung cấp: {{value}}",settingsHierarchy:"Phân cấp cài đặt: {{value}}",settingsTitle:"Cài đặt BYOK của Droid",fixJsonBeforeQuickSettings:"Sửa cú pháp JSON trước khi sử dụng các điều khiển cài đặt nhanh.",fixJsonBeforeReasoning:"Sửa cú pháp JSON trước khi cập nhật cài đặt lý luận BYOK.",unableUpdateReasoning:"Không thể cập nhật cài đặt lý luận mô hình BYOK đã chọn.",fixJsonBeforeBudget:"Sửa cú pháp JSON trước khi cập nhật ngân sách tư duy.",anthropicOnlyBudget:"Ngân sách tư duy chỉ có sẵn cho các mô hình BYOK của Anthropic.",invalidJson:"JSON không hợp lệ: {{value}}",saved:"Đã lưu cài đặt Droid",changedExternally:"Cài đặt Droid đã thay đổi bên ngoài. Làm mới và thử lại.",failedSave:"Không lưu được cài đặt Droid"},sharedPage:{commands:"Lệnh",skills:"Kỹ năng",agents:"Agent",title:"Dữ liệu dùng chung",subtitle:"Các lệnh, kỹ năng và agent được chia sẻ giữa các phiên Claude",totalShared:"Tổng số mục dùng chung",visible:"Hiển thị",markdownDetail:"Chế độ xem chi tiết Markdown",filterPrefix:"Lọc:",configurationRequired:"Cần cấu hình",countsUnavailable:"Không có số liệu",retryCounts:"Số lần thử lại",filterPlaceholder:"Lọc {{tab}} theo tên, mô tả hoặc đường dẫn",showing:"Đang hiển thị {{visible}} trong số {{total}} {{tab}}",showingQuery:'cho "{{query}}"',refreshing:"(đang làm mới...)",loadingShared:"Đang tải {{tab}} dùng chung...",failedLoadShared:"Không tải được danh sách {{tab}} dùng chung",retry:"Thử lại",noSharedFound:"Không tìm thấy {{tab}} dùng chung. Chạy `ccs sync` hoặc thêm mục trong thư mục dùng chung của bạn.",noMatch:'Không có {{tab}} khớp với "{{query}}".',selectOne:"Chọn {{tab}} để xem toàn bộ nội dung.",pathLabel:"Đường dẫn",resolvedSource:"Nguồn đã giải quyết",loadingMarkdown:"Đang tải nội dung Markdown...",failedLoadContent:"Không tải được nội dung",retryContent:"Thử lại nội dung",noMarkdown:"Không có nội dung Markdown khả dụng."}}},ja:{translation:{locale:{en:"英語","zh-CN":"簡体字中国語",vi:"ベトナム語",ja:"日本語"},layout:{languageSwitcher:"言語"},nav:{general:"全般",home:"ホーム",analytics:"分析",identityAccess:"認証とアクセス",apiProfiles:"API プロファイル",cliproxyPlus:"CLIProxy Plus",cliproxyOverview:"概要",controlPanel:"コントロールパネル",githubCopilot:"GitHub Copilot",cursorIde:"Cursor IDE",claudeExtension:"Claude Extension",accounts:"アカウント",allAccounts:"すべてのアカウント",sharedData:"共有データ",compatibleClis:"互換",factoryDroid:"Factory Droid",system:"システム",health:"ヘルス",settings:"設定",openrouterTooltip:"注目: OpenRouter + Alibaba Coding Plan + Ollama"},home:{profiles:"プロファイル",cliproxy:"CLIProxy",accounts:"アカウント",health:"ヘルス",configurationRequired:"設定が必要"},auth:{dashboardTitle:"CCS Dashboard",protectedAccessLabel:"保護されたアクセス",remoteGuardLabel:"リモートアクセス保護",loading:"ダッシュボードのアクセス状態を確認しています…",loginDescription:"ホストで設定されたユーザー名とパスワードを使ってダッシュボードにアクセスしてください。",username:"ユーザー名",password:"パスワード",usernamePlaceholder:"ユーザー名を入力",passwordPlaceholder:"パスワードを入力",signIn:"サインイン",signingIn:"サインイン中...",loginFailed:"ログインに失敗しました",lightMode:"ライト",darkMode:"ダーク",noDefaultCredentials:"CCS にデフォルトの認証情報はありません。",credentialsHint:"認証情報はホスト側で `ccs config auth setup` を実行して作成し、ここで使用します。",remoteSetupTitle:"リモートアクセスにはホスト側の設定が必要です",remoteSetupDescription:"このダッシュボードはローカル以外のアドレスから開かれていますが、ホストでダッシュボード認証がまだ有効になっていません。",incompleteSetupDescription:"ダッシュボード認証は有効ですが、ホスト側の設定が未完了です。サインイン前に設定を完了してください。",safetyNoteRemote:"ホスト管理者がダッシュボード認証を有効にするまで、リモート管理はロックされたままです。",safetyNoteLocal:"同じマシン上にいる場合は、localhost の URL を使うのが最も簡単です。",safetyNoteSession:"サインインに成功すると、このホストに限定された HTTP-only セッションが作成されます。",hostStepTitle:"ホスト側で行うこと",hostStepDescription:"ダッシュボード認証情報を作成または再有効化してから、このページをリモート端末で開き直してください。",localStepTitle:"もしこのマシンを使っているなら",localStepDescription:"`ccs config` が表示する localhost の URL を使い、LAN や Tailscale のアドレスは避けてください。",showPassword:"パスワードを表示",hidePassword:"パスワードを隠す"},commonToast:{apiKeyRequired:"API キーは必須です",accountAddedPresetFailed:"アカウントは追加されましたが、デフォルトプリセットの適用に失敗しました",settingsCopied:"設定をクリップボードにコピーしました",enterPresetName:"保存するプリセット名を入力してください",codeCopied:"コードをクリップボードにコピーしました",copyCodeFailed:"コードのコピーに失敗しました",appliedModelAllTiers:"すべてのティアにモデルを適用しました",settingsSaved:"設定を保存しました",defaultTargetUpdated:"デフォルトターゲットを更新しました",failedUpdateDefaultTarget:"デフォルトターゲットを {{target}}{{suffix}} に更新できませんでした"},profileDialog:{editTitle:"プロファイルを編集",createTitle:"API プロファイルを作成",name:"名前",namePlaceholder:"my-api",baseUrl:"ベース URL",baseUrlPlaceholder:"https://api.example.com",apiKey:"API キー",defaultModel:"デフォルトモデル (ANTHROPIC_MODEL)",defaultModelHint:"空欄の場合は {{model}} を使用",modelMappingTitle:"モデルマッピング (Opus/Sonnet/Haiku)",modelMappingDesc:"各ティアに異なるモデル ID を設定します。異なるモデル種別を別バックエンドへ振り分ける API プロキシで便利です。",opusModel:"Opus モデル (ANTHROPIC_DEFAULT_OPUS_MODEL)",sonnetModel:"Sonnet モデル (ANTHROPIC_DEFAULT_SONNET_MODEL)",haikuModel:"Haiku モデル (ANTHROPIC_DEFAULT_HAIKU_MODEL)",cancel:"キャンセル",saving:"保存中...",update:"更新",create:"作成"},modelTierMapping:{title:"モデルティアマッピング",advanced:"詳細",description:"Claude Code の opus/sonnet/haiku ティアごとに別のモデルを設定します。",autoSuggest:"{{provider}} に基づいて自動提案",opusPlaceholder:"例: anthropic/claude-opus-4",sonnetPlaceholder:"例: anthropic/claude-sonnet-4",haikuPlaceholder:"例: anthropic/claude-3.5-haiku",footer:"これにより ANTHROPIC_DEFAULT_OPUS_MODEL、ANTHROPIC_DEFAULT_SONNET_MODEL、ANTHROPIC_DEFAULT_HAIKU_MODEL を設定します。"},envEditor:{sensitive:"機密",none:"環境変数は設定されていません。",noneHint:"下の入力から追加するか、JSON を直接編集してください。",addVariable:"環境変数を追加",keyPlaceholder:"VARIABLE_NAME",valuePlaceholder:"値"},setupVariant:{using:"使用中:",variantNameRequired:"バリアント名 *",variantNamePlaceholder:"例: my-gemini, g3, flash",invokeHintPrefix:"この名前で呼び出せます:",model:"モデル",modelPlaceholder:"例: gemini-2.5-pro, claude-opus-4-6-thinking",choosePresetInstead:"代わりにプリセットから選択",selectModel:"モデルを選択",customModelName:"カスタムモデル名...",enterAnyModel:"CLIProxy がサポートする任意のモデル名を入力",defaultModel:"デフォルト: {{model}}",providerDefault:"プロバイダーのデフォルト",back:"戻る",skip:"スキップ",creating:"作成中...",createVariant:"バリアントを作成",skipHint:"アカウント追加だけが目的なら、バリアント作成はスキップできます"},customPresetDialog:{title:"カスタムプリセット",presetNameOptional:"プリセット名 (任意)",presetNamePlaceholder:"例: My Custom Config",codexTipPrefix:"Codex のヒント: サフィックス",codexTipSuffix:"で推論強度を固定できます。サフィックスなしのモデルは思考設定を使います。",defaultModel:"デフォルトモデル",defaultModelDesc:"特定のティア指定がない場合に使用",opusModel:"Opus (最上位)",opusModelDesc:"複雑な推論タスク向け",sonnetModel:"Sonnet (バランス)",sonnetModelDesc:"速度と性能のバランス",haikuModel:"Haiku (高速)",haikuModelDesc:"単純なタスクにすばやく応答",cancel:"キャンセル",savePreset:"プリセットを保存",applyPreset:"プリセットを適用"},componentModelSelector:{selectModel:"モデルを選択",availableModelsCount:"利用可能なモデル ({{count}})",preview:"プレビュー"},searchableSelect:{searchModels:"モデルを検索...",noResults:"一致する結果がありません。"},copilotSettings:{enableCopilot:"Copilot を有効化",enableCopilotDesc:"GitHub Copilot サブスクリプションを利用できるようにします",basicSettings:"基本設定",accountType:"アカウント種別",accountTypeIndividual:"個人",accountTypeBusiness:"ビジネス",accountTypeEnterprise:"エンタープライズ",rateLimiting:"レート制限",rateLimitSeconds:"レート制限 (秒)",noLimit:"制限なし",waitOnRateLimit:"レート制限時に待機",waitOnRateLimitDesc:"制限到達時にエラーではなく待機します",daemonSettings:"デーモン設定",autoStartDaemon:"デーモンを自動起動",autoStartDaemonDesc:"プロファイル使用時に copilot-api を起動します"},providerModelSelector:{selectModel:"モデルを選択",noModelsForProvider:"このプロバイダーで利用可能なモデルはありません",broken:"問題あり",deprecated:"非推奨",paid:"有料",freeTier:"無料ティア",paidTier:"有料ティア",modelKnownIssues:"このモデルには既知の問題があります",viewIssueDetails:"問題の詳細を見る",modelDeprecated:"このモデルは非推奨です",recommended:"推奨",allModelsCount:"すべてのモデル ({{count}})",noModelsAvailable:"利用可能なモデルはありません"},createAuthProfileDialog:{title:"新しいアカウントを作成",description:"認証プロファイルには Claude CLI へのログインが必要です。以下のコマンドをターミナルで実行してください。同期モード、グループ、継続性の深さは後でアカウント一覧から編集できます。",profileName:"プロファイル名",profileNamePlaceholder:"例: work, personal, client",invalidProfileName:"名前は英字で始め、英数字、ハイフン、アンダースコアのみ使用できます。",enableSharedHistory:"他の ccs 認証アカウントとの共有履歴同期を有効にする",historySyncGroupOptional:"履歴同期グループ (任意)",historySyncGroupPlaceholder:"default, sprint-a, client-x",historySyncGroupHint:"空欄の場合はデフォルトの共有グループを使用します。スペースはハイフンに正規化されます。",deeperContinuity:"詳細: より深い継続性モード",deeperContinuityHint:"session-env、file-history、shell-snapshots、todos の同期も追加します。認証情報は分離されたままです。",invalidContextGroup:"グループは英字で始め、英数字、ハイフン、アンダースコアのみ使用できます (最大 {{max}} 文字)。",command:"コマンド",commandFallback:"ccs auth create <name>",afterRunPrefix:"コマンド実行後:",afterRunStep1:"ブラウザで Claude のログインを完了します",afterRunStep2:"ここに戻って更新し、新しいアカウントを確認します",poolingHint:"Claude OAuth のプールルーティングを使う場合は、アカウントページのアクションボタンから CLIProxy Claude Pool を利用してください。",close:"閉じる",copied:"コピーしました!",copyCommand:"コマンドをコピー"},cliproxyModelCategory:{google:"Google (Gemini)",openai:"OpenAI (GPT)",anthropic:"Anthropic (Claude)",antigravity:"Antigravity",other:"その他"},cliproxyOverviewComponents:{availableModels:"利用可能なモデル",noModelsAvailable:"利用可能なモデルはありません",startSessionHint:"利用可能なモデルを取得するには CLIProxy セッションを開始してください",totalCount:"合計 {{count}}",availableThroughGroupedByProvider:"{{backendLabel}} 経由で利用可能なモデルをプロバイダー別に表示",moreCount:"+{{count}} 件"},categorizedModelSelector:{selectModel:"モデルを選択",noModelsAvailable:"利用可能なモデルはありません",modelPlaceholder:"モデル..."},openrouterQuickStart:{recommended:"推奨",title:"OpenRouter から始める",description:"OpenAI、Anthropic、Google、Meta などの {{modelCountLabel}} モデルを、1 つの API で利用できます。",featureOneApi:"1 つの API で全プロバイダー",profileSummaryCount:"{{count}} 件のプロファイル",profileSummaryCount_other:"{{count}} 件のプロファイル",profileSummaryEmpty:"高品質 + ローカル制御",summaryBadgeDefaultQuality:"既定で最高品質",summaryBadgeLocalLane:"タスクに合うときだけ local を使う",summaryExistingTitle:"プロファイルを選ぶか、新しいレーンを追加",summaryEmptyTitle:"最初のプロファイルレーンを選択",summaryExistingDescription:"このワークスペースには既に {{count}} 件のプロファイルがあります。重要なコーディング作業には高品質プロバイダーを使い、プライバシー・コスト・オフライン要件があるときだけローカルランタイムを追加してください。",summaryExistingDescription_other:"このワークスペースには既に {{count}} 件のプロファイルがあります。重要なコーディング作業には高品質プロバイダーを使い、プライバシー・コスト・オフライン要件があるときだけローカルランタイムを追加してください。",summaryEmptyDescription:"作業に合うレーンを選んでください。Premium プロバイダーは信頼性の高いコーディング向けの既定値で、ローカルランタイムはプライバシー、低コスト変換、実験向けです。",qualityLanesTitle:"高品質レーン",qualityLaneHighlightDefaultQuality:"重要なコーディング作業向けの既定ベストレーン",alibabaLaneDescription:"OpenRouter カタログの外で、専用の premium コーディングレーンが欲しいときに強い直接接続プロファイルです。",alibabaLaneHighlightQuality:"専用エンドポイントで premium 品質が必要なときに最適",localRuntimesTitle:"ローカルランタイム",localOllamaTitle:"Ollama + Gemma 4",localOllamaLabel:"Ollama",localOllamaHighlight:"プライベートなプロンプト、ローカル整理、低コストの一括変換に最適",localLlamacppTitle:"llama.cpp",localLlamacppLabel:"llama.cpp",localLlamacppHighlight:"カスタム GGUF 構成や高度なセルフホスト型ローカルワークフローに最適",localDetectedModels:"{{count}} 件のローカルモデルを検出",localDetectedModels_other:"{{count}} 件のローカルモデルを検出",localNoModelsDetected:"ローカルモデルはまだ検出されていません",localWaitingServer:"ローカルサーバーとモデル一覧を待機中",localRuntimeCheckingBadge:"確認中",localRuntimeReadyBadge:"準備完了",localRuntimeNeedsModelBadge:"モデルが必要",localRuntimeOfflineBadge:"オフライン",localRuntimeCheckingDescription:"セットアップ案内を表示する前に、ローカルランタイムの状態を確認しています。",localRuntimeReadyDescription:"プライベートなプロンプト、オフライン作業、より安価な一括変換に適しています。",localRuntimeNeedsModelDescription:"ランタイムは起動していますが、推奨ローカルモデルの取得または読み込みがまだ必要です。",localRuntimeOfflineDescription:"このレーンは、プライバシー重視の作業、安価なローカル変換、オフラインセッションに向いています。",localRuntimeCheckingFooter:"ローカルランタイムを確認しています...",localRuntimeReadyFooter:"{{endpoint}} でエンドポイント準備完了",localRuntimeMissingModelFooter:"ローカルセットアップを完了するには `{{command}}` を実行してください。",localRuntimeOfflineFooter:"ローカルエンドポイントを起動するには `{{command}}` を実行してください。",localRuntimeSetupAction:"{{label}} をセットアップ",localRuntimeUseAction:"{{label}} を使う",localRuntimeFinishAction:"{{label}} のセットアップを完了",runtimeProviderBadge:"ランタイムプロバイダー設定",runtimeProviderTitle:"AI Providers を開く",runtimeProviderManagedDescription:"CLIProxy 管理のコネクタ、プロバイダーシークレット、高度なルーティング制御が必要なときに使います。",runtimeProviderFeatureConnectors:"Gemini、Codex、Claude、Vertex、OpenAI 互換コネクタ",runtimeProviderFeatureSecrets:"共有シークレットを個別の API プロファイルから切り離して管理",runtimeProviderFooter:"複数のプロファイルで 1 つのプロバイダー設定を共有したい場合に最適です。",createOpenRouterProfile:"OpenRouter プロファイルを作成",getApiKeyAt:"API キー取得:",createCustomProfile:"カスタム API プロファイルを作成"},alibabaCodingPlanQuickStart:{recommended:"推奨",title:"Alibaba Coding Plan を試す",description:"コーディング用途向けに、Anthropic 互換エンドポイント経由で Alibaba Cloud Coding Plan を利用します。",featureEndpoint:"Anthropic 互換エンドポイント",featureKeyFormat:"専用の sk-sp API キー",createAlibabaProfile:"Alibaba Coding Plan プロファイルを作成",readGuideAt:"セットアップガイド:"},alibabaCodingPlanPromo:{title:"Alibaba Coding Plan",subtitle:"Anthropic エンドポイント経由の Model Studio Coding Plan",add:"追加"},credentialHealth:{title:"認証情報の状態",ready:"準備完了",noCredentialsConfigured:"認証情報が未設定です。上のログインボタンから認証してください。",neverUsed:"未使用",justNow:"たった今",unknown:"不明",daysAgo:"{{count}}日前",hoursAgo:"{{count}}時間前",minutesAgo:"{{count}}分前"},proxyStatusWidget:{justNow:"たった今",minutesAgo:"{{count}}分前",hoursAgo:"{{count}}時間前",syncReady:"同期準備完了",noConfig:"設定なし",remoteProxy:"リモートプロキシ",active:"稼働中",trafficAutoRouted:"トラフィックは自動でリモートサーバーにルーティングされます",tooltipSync:"CLIProxy にプロファイルを同期",tooltipRestart:"再起動",tooltipStop:"停止",tooltipClose:"閉じる",tooltipVersionSettings:"バージョン設定",versionManagement:"バージョン管理",selectVersionPlaceholder:"インストールするバージョンを選択...",stable:"(安定版)",install:"インストール",versionsAboveUnstable:"{{version}} より新しいバージョンには既知の問題があります",versionsKnownIssues:"バージョン {{version}} には既知の問題があります",lastChecked:"最終確認: {{time}}",notRunning:"停止中",start:"起動",port:"ポート {{port}}",sessionCount:"{{count}} セッション",sessionCount_other:"{{count}} セッション",installFaultyTitle:"既知の問題があるバージョンをインストールしますか?",installFaultyDesc:"既知の不具合範囲 <strong>{{range}}</strong> に含まれる <strong>v{{version}}</strong> をインストールしようとしています。",installFaultyWarning:"このバージョンには既知のバグがあり、失敗したりプロキシが不安定になる可能性があります。",installUnstableTitle:"不安定なバージョンをインストールしますか?",installUnstableDesc:"最大安定版 <strong>v{{maxStable}}</strong> を上回る <strong>v{{version}}</strong> をインストールしようとしています。",installUnstableWarning:"このバージョンには安定性の問題があり、予期しない動作を引き起こす可能性があります。",installUnstableConfirm:"このまま続行しますか?",cancel:"キャンセル",installAnyway:"このままインストール",clickToDowngrade:"クリックしてダウングレード",clickToUpdate:"クリックして更新"},syncStatusCard:{profileSync:"プロファイル同期",ready:"準備完了",noConfig:"設定なし",syncsProfilesDesc:"API プロファイルをローカルの CLIProxy 設定に同期します",runDoctorHint:"設定を生成するには <code>ccs doctor --fix</code> を実行してください。",details:"詳細",syncNow:"今すぐ同期"},syncDialog:{title:"プロファイルをローカル CLIProxy に同期",description:"CCS の API プロファイルをローカルの CLIProxy config.yaml に同期します。",noProfiles:"同期するプロファイルがありません。",createProfilesFirst:"先にプロファイルタブで API プロファイルを作成してください。",modelLabel:"モデル:",ready:"準備完了",profilesToSync_one:"{{count}} 件のプロファイルを同期",profilesToSync_other:"{{count}} 件のプロファイルを同期",cancel:"キャンセル",syncing:"同期中...",synced:"同期完了",syncNow:"今すぐ同期"},errorLogs:{title:"エラーログ",failedRequests_one:"{{count}} 件の失敗したリクエスト",failedRequests_other:"{{count}} 件の失敗したリクエスト",cliproxyDiagnostics:"CLIProxy 診断",showingCount:"{{total}} 件中 50 件のログを表示",selectLog:"詳細を表示するログを選択してください",failedLoadContent:"ログ内容の読み込みに失敗しました",copyAbsolutePath:"絶対パスをコピー",copyRawContent:"生のログ内容をコピー",tabOverview:"概要",tabHeaders:"ヘッダー",tabRequest:"リクエスト",tabResponse:"レスポンス",tabRaw:"生データ",modelLabel:"モデル:",quotaResetsIn:"クォータのリセットまで ",method:"メソッド",provider:"プロバイダー",version:"バージョン",endpoint:"エンドポイント",url:"URL",timestamp:"タイムスタンプ",na:"該当なし",noHeaders:"利用可能なヘッダーはありません",noRequestBody:"リクエストボディなし",noResponseBody:"レスポンスボディなし",rateLimitedMsg:"レート制限です。別のアカウントに切り替えるか、クォータのリセットを待ってください。モデル {{model}} のクォータは上限に達しています。",rateLimitedMsgNoModel:"レート制限です。別のアカウントに切り替えるか、クォータのリセットを待ってください。",authFailedMsg:"認証に失敗しました。CLIProxy 設定で再認証するか、API キーを確認してください。",notFoundMsg:"エンドポイントが見つかりません。このプロバイダーには存在しない可能性があります。",serverErrorMsg:"上流サーバーでエラーが発生しました。後でもう一度試すか、プロバイダーのステータスページを確認してください。",timeoutMsg:"リクエストがタイムアウトしました。ネットワーク接続を確認するか、タイムアウト設定を延長してください。",unknown:"不明"},editAccountContext:{title:"履歴同期の設定",description:'"{{name}}" が他の CCS auth アカウントと履歴や継続性を共有する方法を設定します。',syncMode:"同期モード",selectContextMode:"コンテキストモードを選択",isolatedOption:"分離(同期なし)",sharedOption:"共有(同期あり)",sharedModeHint:"共有モードでは、同じ履歴同期グループ内のアカウントでワークスペースコンテキストを再利用します。",isolatedModeHint:"分離モードでは、このアカウントを他の CCS auth アカウントから完全に切り離します。",historySyncGroup:"履歴同期グループ",groupPlaceholder:"default",groupHint:"小文字に正規化されます(スペースはダッシュに変換)。使用可能: 英字、数字、_、-(最大 {{max}} 文字)。",invalidGroup:"英字で始まる有効なグループ名を入力してください。",continuityDepth:"継続性レベル",selectContinuityDepth:"継続性レベルを選択",standardOption:"標準(プロジェクトのみ)",deeperOption:"拡張継続性(上級者向け)",deeperHint:"上級モードでは、session-env、file-history、shell-snapshots、todos も同期します。",standardHint:"標準モードでは、プロジェクトのワークスペースコンテキストのみ同期します。",credentialsIsolated:"どのモードでも、認証情報と .anthropic はアカウントごとに分離されます。",implicationTitle:"保存後の挙動",isolatedImplication:"このアカウントは分離されたままです。他のアカウントからこの継続状態を再開できません。",sameGroupRule:"アカウント同士で継続性を共有するには、両方が同じグループ「{{group}}」を使う必要があります。",noSameGroupPeer:"現在このグループを使っている他のアカウントはありません。",sameGroupPeerCount_one:"このグループを使う他のアカウントが {{count}} 件あります。",sameGroupPeerCount_other:"このグループを使う他のアカウントが {{count}} 件あります。",deeperReady_one:"同じグループの {{count}} 件のアカウントがすでに拡張継続性を使っています。これは現状で最も強い引き継ぎ設定です。",deeperReady_other:"同じグループの {{count}} 件のアカウントがすでに拡張継続性を使っています。これは現状で最も強い引き継ぎ設定です。",deeperNeedsPeers:"このアカウントでは拡張継続性が有効ですが、同じグループの他アカウントでも拡張継続性を有効にしないと、アカウント間再開の期待には十分ではありません。",standardWarning:"標準共有はプロジェクト文脈向けです。アカウント間再開を期待するなら、両方のアカウントで拡張継続性を有効にしてください。",resumeOriginalWarning:"古い会話が重要なら、設定を変える前に元のアカウントで再開してください。",cancel:"キャンセル",save:"保存",saving:"保存中..."},historySyncLearningMap:{title:"履歴同期の仕組み",description:"分離 -> 共有 -> 拡張共有。変更は各行の「同期」から行います。",learningMap:"概要図",isolated:"分離",shared:"共有",deeper:"拡張共有",cliproxyManaged_one:"{{count}} 件の CLIProxy Claude Pool アカウントは、CLIProxy ページで管理します。",cliproxyManaged_other:"{{count}} 件の CLIProxy Claude Pool アカウントは、CLIProxy ページで管理します。",showDetails:"詳細を表示: グループ、切り替え、レガシーポリシー",modeSwitch:"モード切り替え",modeSwitchDesc:"「同期」ダイアログでは、分離/共有の切り替えと、より深い継続性の選択ができます。",historySyncGroup:"履歴同期グループ",historySyncGroupDesc:"同じグループのアカウントは、同じプロジェクトのコンテキストレーンを共有します。未設定時は default を使います。",sameGroupRule:"現在、継続性を共有できるのは、両方のアカウントが共有モードかつ同じグループを使っている場合だけです。",deeperRecommendation:"グループ「{{group}}」は共有されていますが、アカウント間再開を期待するなら拡張継続性も有効にする方が安全です。",partialGroup:"グループ「{{group}}」は良い状態ですが、他のアカウントやグループでは同グループ設定や拡張継続性がまだ不足しています。",readyGroup:"グループ「{{group}}」では複数アカウントで拡張継続性が有効です。これは現状で最も強い引き継ぎ設定です。",legacyConfirmation_one:"{{count}} 件のレガシーアカウントで明示的な確認がまだ必要です。",legacyConfirmation_other:"{{count}} 件のレガシーアカウントで明示的な確認がまだ必要です。"},continuityReadiness:{title:"アカウント間再開チェック",description:"アカウントを切り替える前に、何が不足しているかをこのカードで確認できます。",state:{single:"単一アカウント",isolated:"再開オフ","shared-alone":"共有だが未完成","shared-standard":"プロジェクトのみ",partial:"一部のみ準備完了",ready:"強い引き継ぎ準備完了"},metrics:{isolated:"分離",sharedPeers:"同グループあり",deeperReady:"拡張準備完了"},messages:{single:{title:"現在は auth アカウントが 1 つだけです。",description:"アカウント間の引き継ぎはまだ関係ありません。共有継続性を設定する前に、もう 1 つ auth アカウントを追加してください。"},isolated:{title:"現在、アカウント間再開はオフです。",description:"表示中のアカウントはすべて分離モードのため、あるアカウントで作成したセッションはそのアカウントに残ります。"},"shared-alone":{title:"共有モードはありますが、どのグループにも相手がいません。",description_one:"{{count}} 件の共有アカウントが、同じグループに入る別アカウントを待っています。",description_other:"{{count}} 件の共有アカウントが、同じグループに入る別アカウントを待っています。"},"shared-standard":{title:"グループ「{{group}}」はプロジェクト文脈を共有していますが、拡張継続性のペアがまだありません。",description:"ユーザーはプロジェクト共有以上を期待する可能性があります。より強い引き継ぎのため、このグループ内の両アカウントで拡張継続性を有効にしてください。"},partial:{title:"1 つのグループは準備できていますが、全体の設定はまだ混在しています。",description:"少なくとも 1 つのグループでは拡張継続性が使われていますが、他のアカウントはまだ分離状態、共有グループ内で単独、または拡張継続性が未設定です。"},ready:{title:"グループ「{{group}}」は現状で最も強い継続性設定になっています。",description:"このグループでは複数アカウントがすでに拡張継続性を使っています。実際に再開できるかどうかは、Claude が上流で何を保存しているかにも依存します。"}},stepsTitle:"次にユーザーがやるべきこと",steps:{syncBoth:"切り替え先のアカウントだけでなく、両方のアカウントで「同期」を開いてください。",sameGroup:"両方のアカウントで同じ履歴同期グループを使ってください。現在の推奨グループは「{{group}}」です。",enableDeeper:"プロジェクト共有だけでなくアカウント間再開を期待するなら、両方のアカウントで拡張継続性を有効にしてください。",resumeOriginal:"元の会話が重要なら、継続性設定を変える前に元のアカウントで再開してください。"},singleSteps:{addAccount:"アカウント間引き継ぎを考える前に、まず 2 つ目の ccs auth アカウントを作成してください。",sameGroupLater:"2 つ目のアカウントができたら、両方を同じ履歴同期グループに入れてください。",enableDeeperLater:"将来アカウント間再開を期待するなら、両方のアカウントで拡張継続性を有効にしてください。",resumeOriginal:"2 つ目のアカウントが整うまでは、重要な会話は元のアカウントから再開し続けてください。"}},continuityOverview:{plainLaneTitle:"通常の ccs は別の再開レーンを使っています",plainLaneDescription:"通常の ccs は現在 {{lane}} から再開しており、このアカウントのレーンではありません。同期設定を変える前に元のレーンを先に復旧してください。",setDefaultHint:"今後の通常の ccs を特定のアカウントに合わせたい場合は、その行の「既定に設定」を使ってください。",recommendBadge:"推奨 {{group}}",partialBadge:"部分同期 {{group}}",lane:{native:"ネイティブ Claude(~/.claude)",accountDefault:"アカウント {{name}}",accountInherited:"継続性継承によるアカウント {{name}}",profileDefault:"既定プロファイル {{name}}(ネイティブ Claude レーン)"}},accountsTable:{name:"名前",type:"種別",defaultBadge:"既定",created:"作成日",lastUsed:"最終使用",historySync:"履歴同期",actions:"操作",syncTitle:"同期モード、グループ、継続性レベルを編集",confirmLegacyTitle:"このレガシーアカウントの現在のモードを明示的に確定する",sync:"同期",confirm:"確定",active:"有効",setDefault:"既定に設定",deleteAccount:"アカウントを削除",cannotDeleteDefault:"既定のアカウントは削除できません",noAccounts:"CCS auth アカウントが見つかりません。追加するには ccs auth create を使ってください。",resetToDefault:"CCS の既定値に戻す",deleteDialogTitle:"アカウントを削除",deleteDialogDesc:'アカウント "{{name}}" を削除しますか? この操作でプロファイルと関連するすべてのセッションデータが削除されます。この操作は元に戻せません。',cancel:"キャンセル",delete:"削除",sharedGroupStandard:"共有({{group}}、標準)",sharedGroupDeeper:"共有({{group}}、拡張)",sharedGroupLegacy:"共有({{group}}、標準・レガシー)",isolatedLegacy:"分離(旧既定値)",isolated:"分離",noSameGroupPeer:"同じグループの相手がまだいません",sameGroupPeerCount_one:"{{count}} 件の同グループアカウント",sameGroupPeerCount_other:"{{count}} 件の同グループアカウント",legacyReview:"この推定された既定状態を確認して明示的に確定してください。",noHandoff:"アカウント間再開は元のアカウントに残ります。",badges:{shared:"共有",deeper:"拡張",legacy:"レガシー",isolated:"分離"}},addAccountDialog:{title:"{{displayName}} アカウントを追加",descKiro:"Kiro の認証方法を選び、ブラウザーで認証するか Kiro IDE からインポートしてください。",descDeviceCode:"認証をクリックすると、プロバイダーのサイトで入力する確認コードが表示されます。",descOauth:"認証をクリックすると OAuth URL を取得します。任意のブラウザーで開いてサインインしてください。",powerUserEnabled:"上級者モードが有効です",powerUserSkipped:"設定 > プロキシのパワーユーザーモードにより、AGY の責任確認チェックと Gemini ダッシュボードのリスク文言入力をスキップしています。OAuth / アカウントに関するリスクはすべて自己責任です。",powerUserLoadFailed:"パワーユーザーモード設定を読み込めませんでした。設定 > プロキシを確認してから再試行してください。",powerUserLoading:"パワーユーザーモードの安全設定を読み込み中です。少し待ってから再試行してください。",powerUserUnavailableRetry:"パワーユーザーモードは利用できません。必要なプロバイダーの安全確認を完了してから再試行してください。",authMethod:"認証方法",selectKiroAuthMethod:"Kiro の認証方法を選択",nicknameRequired:"ニックネーム(必須)",nicknameOptional:"ニックネーム(任意)",nicknamePlaceholder:"例: work, personal",nicknameRequiredHint:"このプロバイダーでは必須です。重複しないわかりやすい名前を付けてください(例: work, personal)。",nicknameOptionalHint:"このアカウントを識別しやすい名前です。空欄の場合は安全な識別子を自動生成します。",waitingForAuth:"認証を待機中...",deviceCodeHint:"確認コードのダイアログがまもなく表示されます。プロバイダーのサイトでコードを入力してください。",browserHint:"ブラウザーで認証を完了してください。このダイアログは自動で閉じます。",openUrlLabel:"サインインするには、この URL を任意のブラウザーで開いてください:",copied:"コピー済み",copy:"コピー",open:"開く",popupBlocked:"ポップアップがブロックされました。上の URL をコピーして、ブラウザーで手動で開いてください。",redirectPasteLabel:"リダイレクトが機能しない場合は、コールバック URL を貼り付けてください:",callbackPlaceholder:"リダイレクト URL をここに貼り付け...",submitCallback:"コールバックを送信",submitting:"送信中...",preparingUrl:"サインイン URL を準備中...",cancel:"キャンセル",importingToken:"Kiro IDE からトークンをインポート中...",authenticate:"認証",importFromIde:"IDE からインポート",importing:"インポート中..."},flowViz:{backToProviders:"プロバイダーに戻る",showDetails:"詳細を表示",hideDetails:"詳細を隠す",showPausedAccounts:"一時停止を表示 ({{count}})",hidePausedAccounts:"一時停止を非表示 ({{count}})",visibleTotalRequests:"表示中のリクエスト",visibleAccounts:"表示中のアカウント",excludingPausedAccounts:"一時停止 {{count}} 件を除外中",resetLayout:"レイアウトをリセット",provider:"プロバイダー",totalRequests:"総リクエスト数",accounts:"アカウント",connectionTimeline:"接続タイムライン",noRecentConnections:"最近の接続はありません"},quickStats:{totalRequests:"総リクエスト数",successRate:"成功率",totalTokens:"総トークン数",activeModels:"アクティブなモデル"},authMonitor:{accounts:"アカウント",accountsCount:"{{count}} アカウント",success:"成功",failed:"失敗",successRate:"成功率"},accountCard:{resumeAccount:"アカウントを再開",pauseAccount:"アカウントを一時停止",quotaLoading:"クォータ...",quota:"クォータ",quotaUnavailable:"クォータ上限を取得できません",reauthNeeded:"再認証が必要",failureLabelReauth:"再認証",failureLabelWorkspace:"ワークスペース",failureLabelNoAccess:"アクセス不可",failureLabelRetry:"再試行",failureLabelReconnect:"再接続",failureLabelTemporary:"一時的",failureLabelUnavailable:"利用不可",failureHintReauth:"このアカウントの認証フローをもう一度実行して更新してください。",failureHintWorkspace:"このアカウントをアクティブなワークスペースに戻してから、削除して再追加してください。",failureHintNoAccess:"このアカウントでは、プロバイダーのクォータエンドポイントにアクセスできません。",failureHintRetry:"しばらく待ってから、クォータリクエストを再試行してください。",failureHintReconnect:"古いアカウントを削除し、再度認証してください。",failureHintTemporary:"一時的な問題のようです。後でもう一度試してください。",removeAndReadd:"削除して再追加",autoRefreshFailed:"自動更新に失敗しました"},antigravityChecklist:{title:"Antigravity OAuth の責任確認",subtitle:"認証する前に 4 ステップすべて完了してください。",mandatory:"必須",completion:"完了状況",stepsCount:"{{current}}/4 ステップ"},accountSafetyWarning:{title:"OAuth アカウント安全性の警告",subtitle:"Issue #509 · Gemini + AGY OAuth リスク",firstLine:"Issue #509 では、CCS AGY と、CCS Gemini と CCS AGY 間での共有アカウント利用に関連する停止・BAN 報告がまとめられています。",secondLine:"OAuth とアカウントアクセスのリスクをすべて自己責任で負う場合のみ続行してください。",issueLabel:"Issue #509 を読む",proxySettingsLabel:"Gemini + AGY の設定: 設定 > プロキシ"},cliproxyDialog:{name:"名前",provider:"プロバイダー",account:"アカウント",accountOptional:"アカウント(任意)",model:"モデル",modelOptional:"モデル(任意)",defaultTarget:"デフォルトターゲット",defaultTier:"デフォルトティア",tierConfig:"ティア設定",selectProvider:"プロバイダーを選択...",useDefaultAccount:"デフォルトのアカウントを使用",defaultSuffix:"(デフォルト)",opus:"Opus",sonnet:"Sonnet",haiku:"Haiku",claudeCode:"Claude Code",factoryDroid:"Factory Droid",cancel:"キャンセル",create:"作成",creating:"作成中...",saveChanges:"変更を保存",saving:"保存中...",placeholderName:"my-gemini",placeholderModel:"gemini-2.5-pro",placeholderComposite:"my-composite",placeholderModelId:"model-id",placeholderAccountId:"account-id",editCompositeTitle:"複合バリアントを編集: {{name}}",editSingleTitle:"単一バリアントを編集: {{name}}"},profileEditor:{profileInfo:"プロファイル情報",profileName:"プロファイル名",filePath:"ファイルパス",lastModified:"最終更新",defaultTarget:"デフォルトターゲット",quickUsage:"クイック実行",runWithProfile:"このプロファイルで実行",runOnDroid:"Droid で実行",runOnDroidWithFlag:"--target で Droid 実行",droidAliasExplicit:"Droid エイリアス(明示)",overrideToClaude:"Claude に切り替え",overrideToClaudeExplicit:"Claude に切り替え(明示)",targetHintPreferredAlias:"推奨の明示エイリアス:",targetHintClaudeDefault:"デフォルトコマンド:",targetHintLegacyAlias:"従来ショートカットも利用可能:",targetHintOverride:"実行ごとに次でも上書きできます",setAsDefault:"デフォルトに設定",provider:"プロバイダー",custom:"カスタム",providerChooserHint:"まずプリセットを選び、その後で URL、API Key、モデルマッピングを調整できます。",featuredProviders:"注目のプロバイダー",scrollHint:"画面が狭い場合は横にスクロールできます",customEndpoint:"カスタムエンドポイント",morePresets:"その他のプリセット",customEndpointDescription:"空の Anthropic 互換 URL から始め、すべて手動で設定します。"},settings:{sectionLoadFailed:"セクションの読み込みに失敗しました",unknownError:"不明なエラーが発生しました",reloadPage:"ページを再読み込み",refresh:"更新",copy:"コピー",copied:"コピーしました",saved:"保存しました",loading:"読み込み中...",configFileNotFound:"設定ファイルが見つかりません"},settingsTabs:{web:"Web検索",env:"環境変数",think:"思考",proxy:"プロキシ",auth:"認証",backup:"バックアップ"},settingsAuth:{failedFetchTokens:"認証トークンの取得に失敗しました",failedSaveTokens:"トークンの保存に失敗しました",tokensUpdated:"トークンを更新しました。反映するには CLIProxy を再起動してください。",failedRegenerate:"シークレットの再生成に失敗しました",secretRegenerated:"新しい Management Secret を生成しました。反映するには CLIProxy を再起動してください。",failedReset:"トークンのリセットに失敗しました",tokensReset:"トークンをデフォルトに戻しました。反映するには CLIProxy を再起動してください。",description:"CLIProxy の認証トークンを設定します。変更を反映するには CLIProxy の再起動が必要です。",apiKey:"API Key",custom:"カスタム",apiKeyDesc:"Claude Code が CLIProxy への認証に使用します",apiKeyPlaceholder:"API key",managementSecret:"Management Secret",managementSecretDesc:"CCS ダッシュボードが CLIProxy の管理 API にアクセスするために使用します",managementSecretPlaceholder:"Management secret",generateSecret:"新しい安全なシークレットを生成",resetDefaults:"デフォルトに戻す",resetDesc:"API Key と Management Secret の両方をデフォルト値に戻します。",saving:"保存中...",save:"保存"},settingsGlobalEnv:{description:"Claude 以外のサブスクリプション型プロファイル(gemini、codex、agy、ghcp など)に注入する環境変数",enabled:"グローバル環境変数を有効化",disabled:"グローバル環境変数を無効化",enabledDesc:"環境変数をサードパーティープロファイルに注入します",disabledDesc:"環境変数は注入されません",envVars:"環境変数",noneConfigured:"環境変数は未設定です",addNew:"変数を追加",keyName:"KEY_NAME",value:"値",add:"追加",quickAdd:"よく使う変数を追加",allConfigured:"主要な変数はすべて設定済みです"},settingsBackups:{failedFetch:"バックアップの取得に失敗しました",failedRestore:"バックアップの復元に失敗しました",restoreSuccess:"バックアップを復元しました",title:"設定バックアップ",description:"settings.json の以前のバージョンを復元します。設定を変更するとバックアップが自動作成されます。",none:"利用できるバックアップはありません",noneHint:"設定を変更すると、ここにバックアップが表示されます",latest:"最新",restoring:"復元中...",restore:"復元",restoreConfirmTitle:"バックアップを復元しますか?",restoreConfirmPrefix:"現在の設定を次のバックアップで置き換えます:",restoreConfirmSuffix:"この操作は元に戻せません。",cancel:"キャンセル"},settingsWebsearch:{description:"サードパーティープロファイル(gemini、codex、agy など)向けの CLI ベース Web 検索",enabled:"WebSearch を有効化",disabled:"WebSearch を無効化",checking:"状態を確認中...",providers:"プロバイダー",noneConfigured:"プロバイダーが設定されていません",noneConfiguredHint:"Web 検索プロバイダーを有効にするには CLI ツールをインストールしてください",checkProviders:"プロバイダーを確認",installed:"インストール済み",notInstalled:"未インストール",model:"モデル:",howInstall:"{{name}} CLI のインストール方法",installGlobally:"グローバルにインストール",requiresKey:"(xAI API Key が必要)",freeTier:"(無料枠あり)",viewDocs:"ドキュメントを見る"},settingsProxy:{failedLoadAgyMode:"パワーユーザーモードの読み込みに失敗しました",failedUpdateAgyMode:"パワーユーザーモードの更新に失敗しました",failedVerifyAgyMode:"パワーユーザーモードの永続化確認に失敗しました",notPersistedAgyMode:"パワーユーザーモードが保存されませんでした。別のプロセスが設定を変更した可能性があります。",agyModeEnabled:"パワーユーザーモードを有効にしました。",agyModeDisabled:"パワーユーザーモードを無効にしました。",typePhraseToContinue:"続行するには「{{value}}」と入力してください。",description:"プロキシベースのプロファイル用に、ローカルまたはリモートの {{backend}} 接続を設定します",backendPlus:"CLIProxy Plus",backend:"CLIProxy",instanceStatus:"インスタンス状態",connectionMode:"接続モード",local:"ローカル",remote:"リモート",localDesc:"このマシンで {{backend}} バイナリを実行します",remoteDesc:"リモートの {{backend}} サーバーに接続します",backendBinary:"バックエンドバイナリ",stopProxyToSwitch:"バックエンドを切り替える前に、インスタンス状態から実行中のプロキシを停止してください。",default:"デフォルト",plusDesc:"Kiro と GitHub Copilot を含むすべてのプロバイダーをサポート",originalDesc:"元のバイナリ(Gemini、Codex、Antigravity のみ)",variantsIncompatible:"既存の Kiro/Copilot バリアントは CLIProxyAPI では動作しません。CLIProxyAPIPlus に切り替えるか、それらのバリアントを削除してください。",safety:"安全設定",agyModeTitle:"Antigravity + Gemini パワーユーザーモード",agyModeDesc:"アカウント追加画面の AGY 責任確認チェックと、Gemini ダッシュボードの入力確認をスキップします。",agyWarning:"OAuth の停止/BAN リスクパターン (#509) を十分理解している場合にのみ使用してください。CCS はアカウント喪失の責任を負いません。",finalConfirm:"最終確認",finalConfirmDesc:"有効にすると、ダッシュボード / CLI の AGY 安全チェックと Gemini ダッシュボードのリスク文言確認をスキップします。続行する前に issue #509 を確認し、正確なフレーズを入力してください。",step1:"ステップ 1",readIssue:"Issue #509 を読む",step2:"ステップ 2",typePrefix:"有効にするには",typeSuffix:"と入力してください。",typePhraseAria:"Antigravity + Gemini パワーユーザーモードを有効にするには I ACCEPT RISK と入力してください",exactPhrase:"完全一致で入力してください。",enableAgyMode:"Antigravity + Gemini パワーユーザーモードを有効にする",toggleAgyMode:"Antigravity + Gemini パワーユーザーモードを切り替え",fallbackSettings:"フォールバック設定",enableFallback:"ローカルへのフォールバックを有効化",enableFallbackDesc:"リモートに接続できない場合はローカルプロキシを使用します",autoStartLocal:"ローカルプロキシを自動起動",autoStartLocalDesc:"フォールバック時にローカルプロキシを自動で起動します",advanced:"詳細設定",debugMode:"デバッグモード",debugModeDesc:"ブラウザコンソールで開発者向け診断を有効にします",debugModeEnabled:"デバッグモードを有効にしました。詳細ログはブラウザコンソールを確認してください。",localProxy:"ローカルプロキシ",port:"ポート",autoStart:"自動起動",localAutoStartDesc:"必要になったらローカルプロキシを自動起動します",remoteConfigTitle:"リモートサーバー設定",host:"ホスト",hostPlaceholder:"192.168.1.100 または proxy.example.com",defaultPort:"デフォルト: {{value}}",portPlaceholder:"{{value}} を使う場合は空欄",protocol:"プロトコル",http:"HTTP",https:"HTTPS",apiKeyOptional:"API Key(任意)",apiKeyPlaceholder:"/v1/* API エンドポイント用",apiKeyDesc:"/v1/chat/completions への API リクエストで使用します",managementKeyOptional:"Management Key(任意)",managementKeyPlaceholder:"/v0/management/* エンドポイント用",managementKeyDesc:"ダッシュボードの管理 API で使用します。未設定の場合は API Key を使用します。",testing:"テスト中...",testConnection:"接続をテスト",connectedLatency:"接続済み({{value}}ms)",connectionFailed:"接続に失敗しました",invalidPortOrEmpty:"ポートは 1〜65535 の整数で入力するか、デフォルトを使う場合は空欄にしてください",invalidLocalPort:"ローカルポートは 1〜65535 の整数で指定してください",backendPlusApi:"CLIProxyAPIPlus",backendApi:"CLIProxyAPI"},settingsThinking:{description:"対応モデルの高度な思考 / 推論設定を行います。",supportedProviders:"対応プロバイダー",modeTitle:"思考モード",modeAutoDesc:"モデルのティアに応じて思考レベルを自動設定します",modeOffDesc:"高度な思考を無効化します",modeManualDesc:"永続的な上書きレベルを設定するか、実行ごとに CLI フラグを使います",tierDefaults:"ティア別デフォルト",tierDefaultsDesc:"自動モード時に各モデルティアへ適用する既定の思考レベルです。",persistentOverride:"永続オーバーライド",persistentOverrideDesc:"すべてのセッションに適用されます。CLI フラグが優先されます。",enterCustomBudget:"カスタム予算を入力",apply:"適用",providerOverrides:"プロバイダー別オーバーライド({{count}})",providerOverridesDesc:"特定のプロバイダーに対してティア別デフォルトを上書きします。必要に応じてカスタムのプロバイダーキーを追加してください。",addProviderPlaceholder:"プロバイダーキーを追加(例: qwen)",showWarnings:"警告を表示",showWarningsDesc:"思考値が制限または調整された場合に警告を表示します",cliEnvOverride:"CLI / 環境変数の上書き",supportLine1Prefix:"思考予算:",supportLine1Suffix:"(トークンベース)",supportLine2Prefix:"推論強度:",supportLine2SuffixPrefix:"(サフィックス、または ",supportLine2SuffixPostfix:": minimal/low/medium/high/xhigh)",supportLine3Prefix:"Codex のサフィックスは推論強度を固定します(例: ",supportLine3Suffix:")。サフィックスなしのモデルは思考モードを使います。"},analytics:{title:"分析",subtitle:"利用状況とインサイトを確認",month:"月",allTime:"全期間",updated:"最終更新: {{value}}"},analyticsSummary:{totalTokens:"総トークン数",totalTokensSubtitle:"入力 {{input}} / 出力 {{output}}",totalCost:"総コスト",totalCostSubtitle:"1日平均 ${{value}}",cacheTokens:"キャッシュトークン",cacheTokensSubtitle:"${{cost}}(コストの{{percent}}%)",inputCost:"入力コスト",outputCost:"出力コスト",tokensSubtitle:"{{value}} トークン"},apiProfiles:{title:"API プロファイル",new:"新規",searchPlaceholder:"プロファイルを検索...",loadingProfiles:"プロファイルを読み込み中...",failedLoadTitle:"プロファイルを読み込めませんでした",failedLoadDesc:"API プロファイルを取得できませんでした。もう一度お試しください。",retry:"再試行",noProfilesYet:"API プロファイルがまだありません",noProfilesDesc:"最初のプロファイルを作成して、カスタム API エンドポイントに接続します",createProfile:"プロファイルを作成",noProfileMatch:'"{{query}}" に一致するプロファイルはありません',profileCount:"{{count}} 件のプロファイル",profileCount_other:"{{count}} 件のプロファイル",configuredCount:"{{count}} 件設定済み",deleteProfileTitle:"プロファイルを削除",deleteProfileDesc:'"{{name}}" を削除しますか?設定ファイルも削除され、この操作は元に戻せません。',delete:"削除",unsavedChangesTitle:"未保存の変更",unsavedChangesDesc:'"{{current}}" に未保存の変更があります。破棄して "{{next}}" に切り替えますか?',discardSwitch:"破棄して切り替え"},accountsPage:{title:"アカウント",managePrefix:"一つの画面で",manageSuffix:"のアカウント管理とプール導線をまとめて扱えます。",mobileManageSuffix:"の継続性設定をまとめて管理できます。",primaryActions:"主要アクション",createAccount:"アカウントを作成",authClaudeInPool:"Pool で Claude を認証",openClaudePoolSettings:"Claude Pool の設定を開く",openCliProxyClaudePool:"CLIProxy Claude Pool を開く",migrationFollowup:"移行フォローアップ",legacyContextPending:"{{count}} 件のアカウントで初回モード確認がまだ必要です。",legacyContextPending_other:"{{count}} 件のアカウントで初回モード確認がまだ必要です。",legacyContinuityPending:"{{count}} 件の共有アカウントが標準のレガシー継続深度のままです。",legacyContinuityPending_other:"{{count}} 件の共有アカウントが標準のレガシー継続深度のままです。",confirmingLegacy:"レガシーポリシーを確認中...",confirmLegacy:"レガシーポリシーを確認({{count}})",noLegacyFollowup:"保留中のレガシーフォローアップはありません。",continuityGuide:"継続性ガイド",expandWhenNeeded:"必要なときだけ展開。",sharedStandard:"共有標準",sharedStandardDesc:"プロジェクトワークスペースの同期のみ。ほとんどのチームに最適な既定値です。",sharedDeeper:"共有拡張",sharedDeeperDesc:"session-env、file-history、shell-snapshots、todos も同期します。アカウント間再開を期待するなら推奨です。",sharedDeeperPrefix:"追加で",isolated:"分離",isolatedDesc:"リンクなし。厳密な分離に最適です。",quickCommands:"クイックコマンド",quickCommandsDesc:"コピーしてターミナルで実行します。",workspaceBadge:"ccs auth ワークスペース",historySyncBadge:"履歴同期設定",authAccounts:"認証アカウント",tableScopePrefix:"この表では",tableScopeMiddle:"のアカウントのみを表示します。モード/グループ/継続性の変更は",tableScopeSuffix:"を使ってください。",accountMatrix:"アカウント一覧",sharedTotalDesc:"共有アカウント合計: {{count}}。ここから同期設定とレガシー確認を行えます。",loadingAccounts:"アカウントを読み込み中..."},health:{justNow:"たった今",secondsAgo:"{{count}}秒前",minutesAgo:"{{count}}分前",hoursAgo:"{{count}}時間前",systemHealth:"システムヘルス",build:"ビルド {{version}}",lastScan:"最終スキャン:",autoRefresh:"自動更新:",refresh:"更新",checks:"チェック",version:"バージョン",platform:"プラットフォーム",liveMonitoring:"ライブ監視中",copied:"クリップボードにコピーしました",refreshing:"ヘルスチェックを更新中...",fix:"修正",applyFix:"修正を適用",healthLabel:"ヘルス"},updates:{actionRequired:"対応が必要",done:"完了",all:"すべて",inboxTitle:"更新センター",inboxSubtitle:"対応を優先し、その後で完了または非表示にします。",needsAction:"要対応",doneCount:"完了",searchPlaceholder:"対応内容またはコマンドを検索",noNotices:"このビューに一致する通知はありません。",noUpdates:"利用可能な更新はありません。",published:"{{date}} 公開",markDone:"完了にする",dismiss:"非表示",reopen:"再表示",doNext:"次にやる",impactedIntegrations:"影響を受ける連携",impactedDesc:"更新範囲とルーティングに基づく関連領域です。",whyMatters:"重要な理由",whyMattersDesc:"長文のリリースノートではなく、要点だけを表示します。",open:"開く",progressNeedsAction:"要対応",progressInReview:"確認中",progressDone:"完了",progressDismissed:"非表示",statusNew:"新着",statusStable:"安定",statusPlanned:"予定",dashboard:"ダッシュボード",cliUsage:"CLI利用状況"},cliproxyPage:{connected:"接続済み",notConnected:"未接続",variant:"バリアント",parentNotConnected:"親が未接続",viaProvider:"{{provider}} 経由",emptyTitle:"CCS プロファイルマネージャー",emptyDesc:"CLIProxy プロバイダー向けの OAuth 認証、アカウント設定、モデル選択を管理します。CCS が各 AI バックエンドへのリクエストをどうルーティングするかを設定できます。",emptyControlPanelPrefix:"ライブ利用統計とリアルタイム監視は",controlPanel:"コントロールパネルで確認できます",quickSetup:"クイックセットアップ",accountManagement:"CCSレベルのアカウント管理",providers:"プロバイダー",variants:"バリアント",providerCount:"{{count}} 件のプロバイダー",providerCount_other:"{{count}} 件のプロバイダー",connectedCount:"{{count}} 件接続済み",variantDisplay:"{{name}}({{provider}} バリアント)"},copilotPage:{title:"Copilot",subtitle:"GitHub Copilot プロキシ",setup:"セットアップ",auth:"認証",daemon:"デーモン",unofficialTitle:"非公式API: 自己責任で利用してください",unofficialItem1:"リバースエンジニアリングされたAPIのため、いつでも動かなくなる可能性があります",unofficialItem2:"過度な利用でアカウントに制限がかかる可能性があります",unofficialItem3:"CCSは保証も責任も負いません",yes:"はい",no:"いいえ",installed:"インストール済み",missing:"未インストール",integration:"連携",enabled:"有効",disabled:"無効",github:"GitHub",connected:"接続済み",notConnected:"未接続",authenticate:"認証する",authenticating:"認証中...",status:"ステータス",running:"稼働中",stopped:"停止",port:"ポート",stopping:"停止中...",stop:"停止",starting:"起動中...",start:"起動",installing:"インストール中...",installCopilotApi:"copilot-api をインストール",proxy:"プロキシ",active:"有効",inactive:"無効"},cursorPage:{title:"Cursor",beta:"ベータ",subtitle:"Cursor 専用の連携設定",unofficialTitle:"非公式API - 自己責任で利用",unofficialItem1:"リバースエンジニアリング連携のため、いつでも利用不能になる可能性があります",unofficialItem2:"不正利用や過度な利用により、アカウントが制限されるおそれがあります",unofficialItem3:"CCSは保証も責任も負いません",integration:"連携",authentication:"認証",daemon:"デーモン",enabled:"有効",disabled:"無効",expired:"期限切れ",connected:"接続済み",notConnected:"未接続",running:"稼働中",stopped:"停止中",actions:"操作",disableIntegration:"連携を無効化",enableIntegration:"連携を有効化",autoDetectAuth:"認証を自動検出",manualAuthImport:"認証情報を手動インポート",stopDaemon:"デーモンを停止",startDaemon:"デーモンを起動",port:"ポート",configuration:"Cursor設定",lastModified:"最終更新:",neverSaved:"未保存",saving:"保存中...",save:"保存",modelConfig:"モデル設定",settings:"設定",info:"情報",presets:"プリセット",presetsDesc:"事前設定済みのモデルマッピングを適用します",modelMapping:"モデルマッピング",modelMappingDesc:"各ティアで使うモデルを設定します",defaultModel:"デフォルトモデル",defaultModelDesc:"特定のティア指定がない場合に使われます。",opusModel:"Opus(最高性能)",opusModelDesc:"複雑な推論と最高品質の応答向け。",sonnetModel:"Sonnet(バランス)",sonnetModelDesc:"一般的なコーディングや日常的なチャット向け。",haikuModel:"Haiku(高速)",haikuModelDesc:"低レイテンシで軽量なリクエスト向け。",runtimeSettings:"ランタイム設定",autoStartDaemon:"デーモンを自動起動",autoStartDesc:"連携使用時にCursorデーモンを自動で起動します。",ghostMode:"ゴーストモード",ghostModeDesc:"テレメトリ削減のため x-ghost-mode を要求します。",provider:"プロバイダー",filePath:"ファイルパス",availableModels:"利用可能なモデル",loadingModels:"モデルを読み込み中...",noModels:"モデルメタデータはまだありません。デーモンを起動して更新してください。",default:"デフォルト",rawConfiguration:"生の設定(JSON)",manualImportTitle:"Cursor 認証情報の手動インポート",manualImportDesc:"自動検出できない場合は、CursorのアクセストークンとマシンIDを入力してください。",accessToken:"アクセストークン",accessTokenPlaceholder:"Cursorのアクセストークンを貼り付け",machineId:"マシンID",machineIdPlaceholder:"32文字の16進数(ハイフンなしUUID)",cancel:"キャンセル",import:"インポート",selectModel:"モデルを選択",useDefaultModel:"デフォルトモデルを使用",availableModelCount:"利用可能なモデル({{count}})",invalidPort:"ポートは1から65535の整数で指定してください",defaultModelRequired:"デフォルトモデルは必須です",savedConfig:"Cursor設定とモデルマッピングを保存しました",failedSaveConfig:"設定の保存に失敗しました",modelsLoadingWait:"モデルの読み込み中です。プリセットの適用前にしばらくお待ちください。",noModelsAvailable:"まだ利用可能なモデルがありません。先にデーモンを起動して更新してください。",appliedCodexPreset:"GPT-5.3 Codexプリセットを適用しました",appliedClaudePreset:"Claude 4.6プリセットを適用しました",appliedGeminiPreset:"Gemini 3プリセットを適用しました",integrationEnabled:"Cursor連携を有効化しました",integrationDisabled:"Cursor連携を無効化しました",failedUpdateIntegration:"連携状態の更新に失敗しました",credentialsImported:"Cursor認証情報をインポートしました",autoDetectFailed:"自動検出に失敗しました",manualRequired:"トークンとマシンIDは必須です",manualImportFailed:"手動インポートに失敗しました",failedStartDaemon:"デーモンの起動に失敗しました",daemonStarted:"デーモンを起動しました",daemonStartedWithPid:"デーモンを起動しました(PID: {{pid}})",failedStopDaemon:"デーモンの停止に失敗しました",daemonStopped:"デーモンを停止しました",rawLoading:"生の設定をまだ読み込み中です。しばらく待ってから再試行してください。",invalidJson:"JSONが不正です",rawSaved:"生の設定を保存しました",rawChanged:"生の設定が外部で変更されました。更新して再試行してください。",failedSaveRaw:"生の設定の保存に失敗しました",savedAll:"Cursor設定を保存しました",liveProbe:"ライブプローブ",runLiveProbe:"ライブプローブを実行",rerunLiveProbe:"ライブプローブを再実行",probing:"プローブを実行中...",probeNotRun:"まだプローブを実行していません",probeLocalReadinessHint:"ローカルの準備チェックが通っても、実際のランタイム経路は失敗する場合があります。ライブプローブで Cursor の完全な経路を確認してください。",probeStage:"段階",probeHttpStatus:"HTTP ステータス",probeDuration:"所要時間",probeModel:"モデル",probeMessage:"メッセージ",probeSucceeded:"プローブ成功",probeFailed:"プローブ失敗",probeSaveFirst:"ライブプローブを実行する前に Cursor の変更を保存するか破棄してください",refreshStatus:"Cursor の状態を更新",refreshConfiguration:"Cursor の設定を更新"},droidPage:{loadingDiagnostics:"Droid診断を読み込み中...",failedDiagnostics:"Droid診断の読み込みに失敗しました。",overview:"概要",byok:"BYOK",docs:"ドキュメント",runtimeInstall:"ランタイムとインストール",status:"状態",detected:"検出済み",notFound:"未検出",detectionSource:"検出元",binaryPath:"バイナリパス",installDirectory:"インストール先",version:"バージョン",overridePath:"オーバーライド(CCS_DROID_PATH)",configFiles:"設定ファイル",path:"パス",resolved:"解決先",size:"サイズ",lastModified:"最終更新",parseWarning:"解析警告: {{value}}",readWarning:"読み取り警告: {{value}}",warnings:"警告",byokSummary:"BYOK概要",activeModelSelector:"現在のモデルセレクター",customModels:"カスタムモデル",ccsManaged:"CCS管理",userManaged:"ユーザー管理",malformedEntries:"不正なエントリ",providers:"プロバイダー",none:"なし",customModelsTitle:"カスタムモデル",modelName:"名前 / モデル",provider:"プロバイダー",baseUrl:"ベース URL",noCustomModels:"カスタムモデルはありません",docsAlignedNotes:"ドキュメント整合メモ",factoryDocs:"Factory Docs",providerFactCheckDocs:"プロバイダー検証ドキュメント",providerValues:"プロバイダー値: {{value}}",settingsHierarchy:"設定階層: {{value}}",settingsTitle:"Droid BYOK 設定",fixJsonBeforeQuickSettings:"クイック設定を使う前に JSON 構文を修正してください。",fixJsonBeforeReasoning:"BYOK 推論設定を更新する前に JSON 構文を修正してください。",unableUpdateReasoning:"選択した BYOK モデルの推論設定を更新できません。",fixJsonBeforeBudget:"思考予算を更新する前に JSON 構文を修正してください。",anthropicOnlyBudget:"思考予算は Anthropic の BYOK モデルでのみ利用できます。",invalidJson:"JSON が不正です: {{value}}",saved:"Droid 設定を保存しました",changedExternally:"Droid 設定が外部で変更されました。更新して再試行してください。",failedSave:"Droid 設定の保存に失敗しました"},sharedPage:{commands:"コマンド",skills:"スキル",agents:"エージェント",title:"共有データ",subtitle:"Claudeインスタンス間で共有されるコマンド、スキル、エージェント",totalShared:"共有数",visible:"表示中",markdownDetail:"Markdown詳細ビュー",filterPrefix:"フィルター:",configurationRequired:"設定が必要です",countsUnavailable:"件数を取得できません",retryCounts:"件数を再取得",filterPlaceholder:"{{tab}}を名前、説明、パスで絞り込み",showing:"{{visible}} / {{total}} 件の{{tab}}を表示",showingQuery:"(「{{query}}」で絞り込み)",refreshing:"(更新中...)",loadingShared:"共有{{tab}}を読み込み中...",failedLoadShared:"共有{{tab}}の読み込みに失敗しました",retry:"再試行",noSharedFound:"共有{{tab}}が見つかりません。`ccs sync` を実行するか、共有ディレクトリに項目を追加してください。",noMatch:"{{tab}}で「{{query}}」に一致するものはありません。",selectOne:"内容を表示する{{tab}}を選択してください。",pathLabel:"パス",resolvedSource:"解決後ソース",loadingMarkdown:"Markdownコンテンツを読み込み中...",failedLoadContent:"コンテンツの読み込みに失敗しました",retryContent:"再読み込み",noMarkdown:"Markdownコンテンツはありません。"}}}};Fe.isInitialized||Fe.use(RN).init({resources:YN,lng:GN(),fallbackLng:"en",interpolation:{escapeValue:!1}});const $N={theme:"system",setTheme:()=>null,isDark:!1},ix=C.createContext($N);function WN({children:n,defaultTheme:a="system",storageKey:o="vite-ui-theme"}){const[r,c]=C.useState(()=>localStorage.getItem(o)||a),[d,f]=C.useState(()=>typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1);C.useEffect(()=>{const g=window.matchMedia("(prefers-color-scheme: dark)"),S=b=>{f(b.matches)};return g.addEventListener("change",S),()=>g.removeEventListener("change",S)},[]);const m=r==="dark"||r==="system"&&d;C.useEffect(()=>{const g=window.document.documentElement;g.classList.remove("light","dark"),g.classList.add(m?"dark":"light")},[m]);const p={theme:r,setTheme:g=>{localStorage.setItem(o,g),c(g)},isDark:m};return l.jsx(ix.Provider,{value:p,children:n})}const ox=C.createContext(null),yy="ccs-privacy-mode";function QN({children:n}){const[a,o]=C.useState(()=>typeof window<"u"?localStorage.getItem(yy)==="true":!1);C.useEffect(()=>{localStorage.setItem(yy,String(a))},[a]);const r=C.useCallback(()=>o(d=>!d),[]),c=C.useMemo(()=>({privacyMode:a,togglePrivacyMode:r}),[a,r]);return l.jsx(ox.Provider,{value:c,children:n})}function sf(){const n=C.useContext(ox);if(!n)throw new Error("usePrivacy must be used within a PrivacyProvider");return n}const sx="blur-[4px] select-none hover:blur-none transition-all duration-200",XN="/api/auth";async function rf(n,a){const o=await fetch(`${XN}${n}`,{headers:{"Content-Type":"application/json"},credentials:"include",...a});if(!o.ok){const r=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(r.error||o.statusText)}return o.json()}function ZN(){return rf("/check")}function JN(n,a){return rf("/login",{method:"POST",body:JSON.stringify({username:n,password:a})})}function ek(){return rf("/logout",{method:"POST"})}const rx=C.createContext(null);function tk({children:n}){const[a,o]=C.useState(!1),[r,c]=C.useState(!1),[d,f]=C.useState(null),[m,p]=C.useState(!0),[g,S]=C.useState(!1),[b,x]=C.useState(!1),[j,N]=C.useState(!1),[E,L]=C.useState("login");C.useEffect(()=>{ZN().then(k=>{o(k.authRequired),c(k.authenticated),f(k.username),S(k.authEnabled),x(k.authConfigured),N(k.isLocalAccess),L(k.accessMode)}).catch(()=>{o(!0),c(!1),S(!0),x(!0),N(!1),L("login")}).finally(()=>p(!1))},[]);const O=C.useCallback(async(k,T)=>{const w=await JN(k,T);c(!0),f(w.username)},[]),D=C.useCallback(async()=>{await ek(),c(!1),f(null)},[]),A=C.useMemo(()=>({authRequired:a,isAuthenticated:r,username:d,loading:m,authEnabled:g,authConfigured:b,isLocalAccess:j,accessMode:E,login:O,logout:D}),[a,r,d,m,g,b,j,E,O,D]);return l.jsx(rx.Provider,{value:A,children:n})}function Il(){const n=C.useContext(rx);if(!n)throw new Error("useAuth must be used within an AuthProvider");return n}function nk(){const{authRequired:n,isAuthenticated:a,loading:o}=Il(),r=El();return o?l.jsx("div",{className:"flex h-screen items-center justify-center",children:l.jsx(kn,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):n?a?l.jsx(Od,{}):l.jsx(vS,{to:"/login",state:{from:r},replace:!0}):l.jsx(Od,{})}const gd=768;function ak(){const[n,a]=C.useState(void 0);return C.useEffect(()=>{const o=window.matchMedia(`(max-width: ${gd-1}px)`),r=()=>{a(window.innerWidth<gd)};return o.addEventListener("change",r),a(window.innerWidth<gd),()=>o.removeEventListener("change",r)},[]),!!n}const lx=C.createContext(null);function Ul(){const n=C.useContext(lx);if(!n)throw new Error("useSidebar must be used within a SidebarProvider.");return n}function K(...n){return lw(cw(n))}function lf(n){if(!Number.isFinite(n))return"0";const a=Math.max(0,Math.min(100,n));return`${Math.round(a)}`}const by=["#f94144","#f3722c","#f8961e","#f9844a","#f9c74f","#90be6d","#43aa8b","#4d908e","#577590","#277da1"],Zt={success:"#15803d",degraded:"#b45309",failed:"#b91c1c"};function vO(n){let a=2166136261;for(let o=0;o<n.length;o++)a^=n.charCodeAt(o),a=Math.imul(a,16777619);return by[(a>>>0)%by.length]}function Id(n){if(!n)return null;try{const a=new Date(n),o=new Date,r=a.getTime()-o.getTime();if(r<=0)return"soon";const c=Math.floor(r/(1e3*60*60));if(c>=24)return a.toLocaleDateString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"});const d=Math.floor(r%(1e3*60*60)/(1e3*60));return c>0?`in ${c}h ${d}m`:`in ${d}m`}catch{return null}}function cf(n){return n.filter(a=>{const o=(a.displayName||a.name||"").toLowerCase();return o.includes("claude")||o.includes("gpt")})}function ik(n){if(n.length===0)return null;const a=cf(n);if(a.length===0)return 0;const o=a.map(r=>r.percentage).filter(r=>typeof r=="number"&&isFinite(r));return o.length===0?0:Math.min(...o)}function ok(n){if(n.length===0)return null;const a=cf(n);return a.length===0?null:a.reduce((o,r)=>r.resetTime?o?new Date(r.resetTime)<new Date(o)?r.resetTime:o:r.resetTime:o,null)}const sk=/claude-(?:opus|sonnet)-4(?:[.-])5(?:-thinking)?(?=(?:$|[^a-z0-9]))/i;function CO(n){return sk.test((n||"").trim())}const rk=[{name:"claude-opus-4-6-thinking",displayName:"Claude Opus 4.6 (Thinking)"},{name:"claude-sonnet-4-6",displayName:"Claude Sonnet 4.6"},{name:"gpt-oss-120b",displayName:"GPT-OSS 120B (Medium)"}];function lk(n){const a=n.toLowerCase();return a.includes("claude")||a.includes("gpt")?"primary":a.includes("gemini 3")||a.includes("gemini-3")?"gemini-3":a.includes("gemini 2")||a.includes("gemini-2")?"gemini-2":"other"}function ck(n){if(n.length===0)return[];const a=cf(n),o=[];if(a.length===0)for(const c of rk)o.push({name:c.name,displayName:c.displayName,percentage:0,tier:"primary",exhausted:!0});for(const c of n){const d=c.displayName||c.name,f=lk(d);o.push({name:c.name,displayName:d,percentage:c.percentage,tier:f,exhausted:f==="primary"&&c.percentage===0})}const r=["primary","gemini-3","gemini-2","other"];return o.sort((c,d)=>{const f=r.indexOf(c.tier)-r.indexOf(d.tier);return f!==0?f:c.displayName.localeCompare(d.displayName)})}function uk(n){const a=new Map;for(const o of n){const r=a.get(o.tier)||[];r.push(o),a.set(o.tier,r)}return a}function Rs(n){const a=(n||"").toLowerCase(),o=a.includes("code review")||a.includes("code_review"),r=a.includes("primary"),c=a.includes("secondary");return o?r?"code-review-5h":c?"code-review-weekly":"code-review":r?"usage-5h":c?"usage-weekly":"unknown"}function dk(n,a){if(Rs(n.label)==="code-review-weekly")return"weekly";const r=n.resetAfterSeconds;if(typeof r!="number"||!isFinite(r)||r<=0)return null;const c=a.find(p=>Rs(p.label)==="usage-5h"&&typeof p.resetAfterSeconds=="number"&&isFinite(p.resetAfterSeconds)&&p.resetAfterSeconds>0),d=a.find(p=>Rs(p.label)==="usage-weekly"&&typeof p.resetAfterSeconds=="number"&&isFinite(p.resetAfterSeconds)&&p.resetAfterSeconds>0);if(!c||!d)return null;const f=Math.abs(r-c.resetAfterSeconds);return Math.abs(r-d.resetAfterSeconds)<=f?"weekly":"5h"}function fk(n,a=[]){const o=typeof n=="string"?n:n.label,r=typeof n=="string"?{label:o,resetAfterSeconds:null}:{label:o,resetAfterSeconds:n.resetAfterSeconds},c=a.length>0?a:[r];switch(Rs(o)){case"usage-5h":return"5h usage limit";case"usage-weekly":return"Weekly usage limit";case"code-review-5h":case"code-review-weekly":case"code-review":{const d=dk(r,c);return d==="5h"?"Code review (5h)":d==="weekly"?"Code review (weekly)":"Code review"}case"unknown":return o}}function Hl(n){if(!n||n.length===0)return{fiveHourWindow:null,weeklyWindow:null,codeReviewWindows:[],unknownWindows:[]};let a=null,o=null;const r=[],c=[],d=[];for(const f of n)switch(Rs(f.label)){case"usage-5h":a||(a=f),d.push(f);break;case"usage-weekly":o||(o=f),d.push(f);break;case"code-review-5h":case"code-review-weekly":case"code-review":r.push(f);break;case"unknown":c.push(f),d.push(f);break}if((!a||!o)&&d.length>0){const f=d.filter(m=>typeof m.resetAfterSeconds=="number"&&m.resetAfterSeconds>=0).sort((m,p)=>(m.resetAfterSeconds||0)-(p.resetAfterSeconds||0));a||(a=f[0]||d[0]||null),o||(o=f.length>1?f[f.length-1]:d.find(m=>m!==a)||null)}return{fiveHourWindow:a,weeklyWindow:o,codeReviewWindows:r,unknownWindows:c}}function hk(n){if(!n||n.length===0)return null;const{fiveHourWindow:a,weeklyWindow:o}=Hl(n),r=[a,o].filter((f,m,p)=>!!f&&p.indexOf(f)===m),d=(r.length>0?r:n).map(f=>f.remainingPercent);return Math.min(...d)}function mk(n){if(!n||n.length===0)return null;const{fiveHourWindow:a,weeklyWindow:o}=Hl(n),r=[a,o].filter((f,m,p)=>!!f&&p.indexOf(f)===m),d=(r.length>0?r:n).map(f=>f.resetAt).filter(f=>f!==null);return d.length===0?null:d.sort()[0]}function pk(n){if(!n.success)return null;const a=[n.coreUsage?.fiveHour,n.coreUsage?.weekly].filter(r=>!!r);if(a.length>0)return Math.min(...a.map(r=>r.remainingPercent));const o=n.windows.filter(r=>r.rateLimitType!=="overage");return o.length>0?Math.min(...o.map(r=>r.remainingPercent)):null}function gk(n){if(!n.success)return null;const a=[n.coreUsage?.fiveHour?.resetAt,n.coreUsage?.weekly?.resetAt].filter(r=>!!r);if(a.length>0)return a.sort()[0];const o=n.windows.filter(r=>r.rateLimitType!=="overage").map(r=>r.resetAt).filter(r=>r!==null);return o.length===0?null:o.sort()[0]}function yk(n){if(!n||n.length===0)return null;const a=n.map(o=>o.remainingPercent);return Math.min(...a)}function bk(n){if(!n||n.length===0)return null;const a=n.map(o=>o.resetTime).filter(o=>o!==null);return a.length===0?null:a.sort()[0]}function xk(n){if(!n)return null;const a=[n.premiumInteractions.percentRemaining,n.chat.percentRemaining,n.completions.percentRemaining].filter(o=>typeof o=="number"&&isFinite(o));return a.length===0?null:Math.min(...a)}function Fn(n){return typeof n=="object"&&n!==null}function Ti(n){return typeof n=="number"&&Number.isFinite(n)}function uf(n){if(!Fn(n))return!1;const a=n.models;return typeof n.success=="boolean"&&Array.isArray(a)}function Bl(n){if(!Fn(n))return!1;const a=n;return typeof a.success!="boolean"||!Array.isArray(a.windows)||!("planType"in a)?!1:a.windows.every(o=>Fn(o)&&typeof o.label=="string"&&Ti(o.usedPercent)&&Ti(o.remainingPercent))}function Kl(n){if(!Fn(n))return!1;const a=n;return typeof a.success!="boolean"||!Array.isArray(a.windows)||"planType"in a?!1:a.windows.every(o=>Fn(o)&&typeof o.rateLimitType=="string"&&Ti(o.remainingPercent)&&typeof o.status=="string")}function df(n){if(!Fn(n))return!1;const a=n;return typeof a.success!="boolean"||!Array.isArray(a.buckets)?!1:a.buckets.every(o=>Fn(o)&&typeof o.id=="string"&&Ti(o.remainingFraction)&&Ti(o.remainingPercent)&&Array.isArray(o.modelIds))}function ff(n){if(!Fn(n))return!1;const a=n,o=a.snapshots;return typeof a.success!="boolean"||!Fn(o)?!1:["premiumInteractions","chat","completions"].every(c=>{const d=o[c];return Fn(d)&&Ti(d.percentRemaining)&&Ti(d.percentUsed)})}function vk(n){const a=[];return typeof n.httpStatus=="number"&&a.push(`HTTP ${n.httpStatus}`),typeof n.errorCode=="string"&&n.errorCode.trim()&&a.push(n.errorCode.trim()),a.length>0?a.join(" | "):null}function Ck(n,a,o){const r=n.errorDetail?.trim()||null;if(!r)return null;const c=r.toLowerCase();return c===a.toLowerCase()||o&&c===o.toLowerCase()?null:r}function hf(n){if(!n||n.success)return null;const a=n.error?.trim()||"Quota information unavailable",o=n.actionHint?.trim()||null,r=n.errorCode?.trim().toLowerCase()||"",c=vk(n),d=Ck(n,a,c),f=a.toLowerCase(),m="entitlement"in n?n.entitlement:void 0;return n.errorCode==="capacity_exhausted"||m?.capacityState==="capacity_exhausted"||f.includes("no capacity available")||f.includes("capacity exhausted")?{label:"Capacity",summary:a,actionHint:o||"Retry later or switch to another model. This is a temporary provider capacity issue.",technicalDetail:c,rawDetail:d,tone:"warning"}:n.needsReauth||r==="token_expired"||r==="reauth_required"||f.includes("token expired")||f.includes("re-authenticate")||f.includes("reauth")||f.includes("expired or invalid")?{label:Fe.t("accountCard.failureLabelReauth"),summary:a,actionHint:o||Fe.t("accountCard.failureHintReauth"),technicalDetail:c,rawDetail:d,tone:"warning"}:r==="deactivated_workspace"||n.httpStatus===402||f.includes("workspace deactivated")||f.includes("payment or workspace access required")?{label:Fe.t("accountCard.failureLabelWorkspace"),summary:a,actionHint:o||Fe.t("accountCard.failureHintWorkspace"),technicalDetail:c,rawDetail:d,tone:"warning"}:m?.accessState==="not_entitled"||n.isForbidden||n.httpStatus===403||r==="quota_api_forbidden"||f.includes("forbidden")?{label:Fe.t("accountCard.failureLabelNoAccess"),summary:a,actionHint:o||Fe.t("accountCard.failureHintNoAccess"),technicalDetail:c,rawDetail:d,tone:"muted"}:n.httpStatus===429||r==="rate_limited"||f.includes("rate limited")?{label:Fe.t("accountCard.failureLabelRetry"),summary:a,actionHint:o||Fe.t("accountCard.failureHintRetry"),technicalDetail:c,rawDetail:d,tone:"warning"}:r==="auth_file_missing"||r==="missing_account_id"||f.includes("auth file not found")||f.includes("missing chatgpt-account-id")?{label:Fe.t("accountCard.failureLabelReconnect"),summary:a,actionHint:o||Fe.t("accountCard.failureHintReconnect"),technicalDetail:c,rawDetail:d,tone:"muted"}:n.retryable||r==="network_timeout"||r==="network_error"||r==="provider_unavailable"||f.includes("timeout")||f.includes("network")||f.includes("fetch failed")||f.includes("service unavailable")?{label:Fe.t("accountCard.failureLabelTemporary"),summary:a,actionHint:o||Fe.t("accountCard.failureHintTemporary"),technicalDetail:c,rawDetail:d,tone:"warning"}:{label:Fe.t("accountCard.failureLabelUnavailable"),summary:a,actionHint:o,technicalDetail:c,rawDetail:d,tone:"muted"}}function cx(n,a){if(!a?.success)return null;switch(n.trim().toLowerCase()){case"agy":return uf(a)?ik(a.models):null;case"codex":return Bl(a)?hk(a.windows):null;case"claude":case"anthropic":return Kl(a)?pk(a):null;case"gemini":return df(a)?yk(a.buckets):null;case"ghcp":case"github-copilot":return ff(a)?xk(a.snapshots):null;default:return null}}function ux(n,a){if(!a?.success)return null;switch(n.trim().toLowerCase()){case"agy":return uf(a)?ok(a.models):null;case"codex":return Bl(a)?mk(a.windows):null;case"claude":case"anthropic":return Kl(a)?gk(a):null;case"gemini":return df(a)?bk(a.buckets):null;case"ghcp":case"github-copilot":return ff(a)?a.quotaResetDate:null;default:return null}}const yl=_l("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-1 focus-visible:ring-ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function ot({className:n,variant:a,size:o,asChild:r=!1,...c}){const d=r?Ml:"button";return l.jsx(d,{"data-slot":"button",className:K(yl({variant:a,size:o,className:n})),...c})}function Hn({className:n,type:a,...o}){return l.jsx("input",{type:a,"data-slot":"input",className:K("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",n),...o})}function Sk({...n}){return l.jsx(mb,{"data-slot":"sheet",...n})}function wk({...n}){return l.jsx(xb,{"data-slot":"sheet-portal",...n})}function Nk({className:n,...a}){return l.jsx(vb,{"data-slot":"sheet-overlay",className:K("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",n),...a})}function kk({className:n,children:a,side:o="right",...r}){return l.jsxs(wk,{children:[l.jsx(Nk,{}),l.jsxs(pb,{"data-slot":"sheet-content",className:K("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",o==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",o==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",o==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",o==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",n),...r,children:[a,l.jsxs(gb,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[l.jsx(Ao,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Ak({className:n,...a}){return l.jsx("div",{"data-slot":"sheet-header",className:K("flex flex-col gap-1.5 p-4",n),...a})}function Dk({className:n,...a}){return l.jsx(yb,{"data-slot":"sheet-title",className:K("text-foreground font-semibold",n),...a})}function Tk({className:n,...a}){return l.jsx(bb,{"data-slot":"sheet-description",className:K("text-muted-foreground text-sm",n),...a})}function We({className:n,...a}){return l.jsx("div",{"data-slot":"skeleton",className:K("relative overflow-hidden bg-muted/50 before:absolute before:inset-0 before:-translate-x-full","before:bg-gradient-to-r before:from-transparent before:via-muted/30 before:to-transparent","before:animate-[shimmer_2s_infinite_ease-out] rounded-md",n),...a})}function ji({delayDuration:n=0,...a}){return l.jsx(BC,{"data-slot":"tooltip-provider",delayDuration:n,...a})}function Sa({...n}){return l.jsx(ji,{children:l.jsx(KC,{"data-slot":"tooltip",...n})})}function wa({...n}){return l.jsx(qC,{"data-slot":"tooltip-trigger",...n})}function Na({className:n,sideOffset:a=6,children:o,...r}){return l.jsx(FC,{children:l.jsxs(GC,{"data-slot":"tooltip-content",sideOffset:a,className:K("animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit max-w-[calc(100vw-2rem)] origin-(--radix-tooltip-content-transform-origin) rounded-lg border border-border/70 bg-popover px-3 py-2 text-left text-xs leading-relaxed text-popover-foreground shadow-xl shadow-black/10",n),...r,children:[o,l.jsx(VC,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 fill-popover stroke-border stroke-[0.75px]"})]})})}const jk="sidebar_state",Mk=3600*24*7,Ek="16rem",Ok="18rem",Pk="3rem",Lk="b";function Rk({defaultOpen:n=!0,open:a,onOpenChange:o,className:r,style:c,children:d,...f}){const m=ak(),[p,g]=C.useState(!1),[S,b]=C.useState(n),x=a??S,j=C.useCallback(O=>{const D=typeof O=="function"?O(x):O;o?o(D):b(D),document.cookie=`${jk}=${D}; path=/; max-age=${Mk}`},[o,x]),N=C.useCallback(()=>m?g(O=>!O):j(O=>!O),[m,j,g]);C.useEffect(()=>{const O=D=>{D.key===Lk&&(D.metaKey||D.ctrlKey)&&(D.preventDefault(),N())};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[N]);const E=x?"expanded":"collapsed",L=C.useMemo(()=>({state:E,open:x,setOpen:j,isMobile:m,openMobile:p,setOpenMobile:g,toggleSidebar:N}),[E,x,j,m,p,g,N]);return l.jsx(lx.Provider,{value:L,children:l.jsx(ji,{delayDuration:0,children:l.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Ek,"--sidebar-width-icon":Pk,...c},className:K("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-svh min-h-0 w-full overflow-hidden",r),...f,children:d})})})}function _k({side:n="left",variant:a="sidebar",collapsible:o="offcanvas",className:r,children:c,...d}){const{isMobile:f,state:m,openMobile:p,setOpenMobile:g}=Ul();return o==="none"?l.jsx("div",{"data-slot":"sidebar",className:K("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...d,children:c}):f?l.jsx(Sk,{open:p,onOpenChange:g,...d,children:l.jsxs(kk,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Ok},side:n,children:[l.jsxs(Ak,{className:"sr-only",children:[l.jsx(Dk,{children:"Sidebar"}),l.jsx(Tk,{children:"Displays the mobile sidebar."})]}),l.jsx("div",{className:"flex h-full w-full flex-col",children:c})]})}):l.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":m,"data-collapsible":m==="collapsed"?o:"","data-variant":a,"data-side":n,"data-slot":"sidebar",children:[l.jsx("div",{"data-slot":"sidebar-gap",className:K("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),l.jsx("div",{"data-slot":"sidebar-container",className:K("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",n==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...d,children:l.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:c})})]})}function zk({className:n,onClick:a,...o}){const{toggleSidebar:r}=Ul();return l.jsxs(ot,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:K("size-7",n),onClick:c=>{a?.(c),r()},...o,children:[l.jsx(jS,{}),l.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Ik({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:K("flex flex-col gap-2 p-2",n),...a})}function Uk({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:K("flex flex-col gap-2 p-2",n),...a})}function Hk({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:K("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),...a})}function Bk({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:K("relative flex w-full min-w-0 flex-col p-2",n),...a})}function Kk({className:n,asChild:a=!1,...o}){const r=a?Ml:"div";return l.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:K("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",n),...o})}function qk({className:n,...a}){return l.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:K("w-full text-sm",n),...a})}function Fk({className:n,...a}){return l.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:K("flex w-full min-w-0 flex-col gap-1 group-data-[collapsible=icon]:items-center",n),...a})}function Gk({className:n,...a}){return l.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:K("group/menu-item relative",n),...a})}const Vk=_l("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 group-data-[collapsible=icon]:justify-center",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function xy({asChild:n=!1,isActive:a=!1,variant:o="default",size:r="default",tooltip:c,className:d,...f}){const m=n?Ml:"button",{isMobile:p,state:g}=Ul(),S=l.jsx(m,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":a,className:K(Vk({variant:o,size:r}),d),...f});return c?(typeof c=="string"&&(c={children:c}),l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:S}),l.jsx(Na,{side:"right",align:"center",hidden:g!=="collapsed"||p,...c})]})):S}function Yk({className:n,...a}){return l.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:K("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",n),...a})}function $k({className:n,...a}){return l.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:K("group/menu-sub-item relative",n),...a})}function Wk({asChild:n=!1,size:a="md",isActive:o=!1,className:r,...c}){const d=n?Ml:"a";return l.jsx(d,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":o,className:K("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...c})}const Qk={sm:24,md:32,lg:48};function dx({size:n="md",className:a,showText:o=!0}){const r=Qk[n];return l.jsxs("div",{className:K("flex items-center gap-2",a),children:[l.jsx("img",{src:"/logo/ccs-logo-256.png",alt:"CCS Logo",width:r,height:r,className:"rounded"}),o&&l.jsx("span",{className:"font-bold text-lg",children:"CCS Config"})]})}const hl="/api",fx="CONFLICT";class SO extends Error{code=fx;constructor(a="Resource modified externally"){super(a),this.name="ApiConflictError"}}function wO(n){return n instanceof Error&&"code"in n&&n.code===fx}function Ts(n){return n?/^https?:\/\//i.test(n)||n===hl||n.startsWith(`${hl}/`)?n:`${hl}${n.startsWith("/")?n:`/${n}`}`:hl}async function Xk(n){const a=`Request failed (${n.status}${n.statusText?` ${n.statusText}`:""})`,o=await n.text();if(!o)return a;try{const r=JSON.parse(o);return r.error?.trim()?r.error:r.message?.trim()?r.message:a}catch{return o.trim()||a}}async function se(n,a){const o=await fetch(Ts(n),{headers:{"Content-Type":"application/json"},...a});if(!o.ok)throw new Error(await Xk(o));if(o.status===204)return;if((o.headers.get("content-type")?.toLowerCase()??"").includes("application/json"))return await o.json();const c=await o.text();if(c)try{return JSON.parse(c)}catch{return c}}const He={profiles:{list:()=>se("/profiles"),getLocalRuntimeReadiness:()=>se("/profiles/local-runtime-readiness"),create:n=>se("/profiles",{method:"POST",body:JSON.stringify(n)}),update:(n,a)=>se(`/profiles/${n}`,{method:"PUT",body:JSON.stringify(a)}),delete:n=>se(`/profiles/${n}`,{method:"DELETE"}),discoverOrphans:()=>se("/profiles/orphans"),registerOrphans:n=>se("/profiles/orphans/register",{method:"POST",body:JSON.stringify(n)}),copy:(n,a)=>se(`/profiles/${n}/copy`,{method:"POST",body:JSON.stringify(a)}),export:(n,a=!1)=>se(`/profiles/${n}/export`,{method:"POST",body:JSON.stringify({includeSecrets:a})}),import:n=>se("/profiles/import",{method:"POST",body:JSON.stringify(n)})},imageAnalysis:{get:()=>se("/image-analysis"),update:n=>se("/image-analysis",{method:"PUT",body:JSON.stringify(n)})},logs:{getConfig:()=>se("/logs/config"),updateConfig:n=>se("/logs/config",{method:"PUT",body:JSON.stringify(n)}),getSources:()=>se("/logs/sources"),getEntries:({source:n,level:a,search:o,limit:r}={})=>{const c=new URLSearchParams;n&&c.set("source",n),a&&c.set("level",a),o&&c.set("search",o),typeof r=="number"&&c.set("limit",String(r));const d=c.toString();return se(`/logs/entries${d?`?${d}`:""}`)}},cliproxy:{list:()=>se("/cliproxy"),getAuthStatus:()=>se("/cliproxy/auth"),create:n=>se("/cliproxy",{method:"POST",body:JSON.stringify(n)}),update:(n,a)=>se(`/cliproxy/${n}`,{method:"PUT",body:JSON.stringify(a)}),delete:n=>se(`/cliproxy/${n}`,{method:"DELETE"}),proxyStatus:()=>se("/cliproxy/proxy-status"),proxyStart:()=>se("/cliproxy/proxy-start",{method:"POST"}),proxyStop:()=>se("/cliproxy/proxy-stop",{method:"POST"}),updateCheck:()=>se("/cliproxy/update-check"),versions:()=>se("/cliproxy/versions"),install:(n,a)=>se("/cliproxy/install",{method:"POST",body:JSON.stringify({version:n,force:a})}),restart:()=>se("/cliproxy/restart",{method:"POST"}),stats:()=>se("/cliproxy/usage"),catalog:()=>se("/cliproxy/catalog"),models:()=>se("/cliproxy/models"),updateModel:(n,a)=>se(`/cliproxy/models/${n}`,{method:"PUT",body:JSON.stringify({model:a})}),getRoutingStrategy:()=>se("/cliproxy/routing/strategy"),updateRoutingStrategy:n=>se("/cliproxy/routing/strategy",{method:"PUT",body:JSON.stringify({value:n})}),aiProviders:{list:()=>se("/cliproxy/ai-providers"),create:(n,a)=>se(`/cliproxy/ai-providers/${encodeURIComponent(n)}`,{method:"POST",body:JSON.stringify(a)}),update:(n,a,o)=>se(`/cliproxy/ai-providers/${encodeURIComponent(n)}/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify(o)}),delete:(n,a)=>se(`/cliproxy/ai-providers/${encodeURIComponent(n)}/${encodeURIComponent(a)}`,{method:"DELETE"})},getConfigYaml:async()=>{const n=await fetch(Ts("/cliproxy/config.yaml"));if(!n.ok)throw new Error("Failed to load config");return n.text()},saveConfigYaml:async n=>{const a=await fetch(Ts("/cliproxy/config.yaml"),{method:"PUT",headers:{"Content-Type":"application/yaml"},body:n});if(!a.ok){const o=await a.json().catch(()=>({error:"Failed to save config"}));throw new Error(o.error||"Failed to save config")}},getAuthFiles:()=>se("/cliproxy/auth-files"),getAuthFile:async n=>{const a=await fetch(Ts(`/cliproxy/auth-files/download?name=${encodeURIComponent(n)}`));if(!a.ok)throw new Error("Failed to load auth file");return a.text()},accounts:{list:()=>se("/cliproxy/auth/accounts"),listByProvider:n=>se(`/cliproxy/auth/accounts/${n}`),setDefault:(n,a)=>se(`/cliproxy/auth/accounts/${n}/default`,{method:"POST",body:JSON.stringify({accountId:a})}),remove:(n,a)=>se(`/cliproxy/auth/accounts/${n}/${encodeURIComponent(a)}`,{method:"DELETE"}),pause:(n,a)=>se(`/cliproxy/auth/accounts/${n}/${encodeURIComponent(a)}/pause`,{method:"POST"}),resume:(n,a)=>se(`/cliproxy/auth/accounts/${n}/${encodeURIComponent(a)}/resume`,{method:"POST"}),solo:(n,a)=>se("/accounts/solo",{method:"POST",body:JSON.stringify({provider:n,accountId:a})}),bulkPause:(n,a)=>se("/accounts/bulk-pause",{method:"POST",body:JSON.stringify({provider:n,accountIds:a})}),bulkResume:(n,a)=>se("/accounts/bulk-resume",{method:"POST",body:JSON.stringify({provider:n,accountIds:a})})},auth:{start:(n,a)=>se(`/cliproxy/auth/${n}/start`,{method:"POST",body:JSON.stringify({nickname:a})}),cancel:n=>se(`/cliproxy/auth/${n}/cancel`,{method:"POST"}),kiroImport:()=>se("/cliproxy/auth/kiro/import",{method:"POST"})},errorLogs:{list:()=>se("/cliproxy/error-logs"),getContent:async n=>{const a=await fetch(Ts(`/cliproxy/error-logs/${encodeURIComponent(n)}`));if(!a.ok)throw new Error("Failed to load error log");return a.text()}}},accounts:{list:()=>se("/accounts"),setDefault:n=>se("/accounts/default",{method:"POST",body:JSON.stringify({name:n})}),resetDefault:()=>se("/accounts/reset-default",{method:"DELETE"}),delete:n=>se(`/accounts/${n}`,{method:"DELETE"}),updateContext:(n,a)=>se(`/accounts/${encodeURIComponent(n)}/context`,{method:"PUT",body:JSON.stringify(a)})},config:{format:()=>se("/config/format"),get:()=>se("/config"),update:n=>se("/config",{method:"PUT",body:JSON.stringify(n)}),migrate:(n=!1)=>se(`/config/migrate?dryRun=${n}`,{method:"POST"}),rollback:n=>se("/config/rollback",{method:"POST",body:JSON.stringify({backupPath:n})})},presets:{list:n=>se(`/settings/${n}/presets`),create:(n,a)=>se(`/settings/${n}/presets`,{method:"POST",body:JSON.stringify(a)}),delete:(n,a)=>se(`/settings/${n}/presets/${encodeURIComponent(a)}`,{method:"DELETE"})},cliproxyServer:{get:()=>se("/cliproxy-server"),update:n=>se("/cliproxy-server",{method:"PUT",body:JSON.stringify(n)}),getBackend:()=>se("/cliproxy-server/backend"),updateBackend:(n,a=!1)=>se("/cliproxy-server/backend",{method:"PUT",body:JSON.stringify({backend:n,force:a})}),test:n=>se("/cliproxy-server/test",{method:"POST",body:JSON.stringify(n)})},quota:{get:(n,a)=>se(`/cliproxy/quota/${n}/${encodeURIComponent(a)}`),getCodex:n=>se(`/cliproxy/quota/codex/${encodeURIComponent(n)}`),getClaude:n=>se(`/cliproxy/quota/claude/${encodeURIComponent(n)}`),getGemini:n=>se(`/cliproxy/quota/gemini/${encodeURIComponent(n)}`)}};function Zk(n){n.invalidateQueries({queryKey:["cliproxy-catalog"]}),n.invalidateQueries({queryKey:["cliproxy-models"]})}function ka(n){n.invalidateQueries({queryKey:["cliproxy-accounts"]}),n.invalidateQueries({queryKey:["cliproxy-auth"]}),Zk(n)}function NO(){return kt({queryKey:["cliproxy"],queryFn:()=>He.cliproxy.list()})}function Jk(){return kt({queryKey:["cliproxy-auth"],queryFn:()=>He.cliproxy.getAuthStatus()})}function kO(){return kt({queryKey:["cliproxy-catalog"],queryFn:()=>He.cliproxy.catalog(),staleTime:3e4,retry:1})}function AO(){return kt({queryKey:["cliproxy-routing"],queryFn:()=>He.cliproxy.getRoutingStrategy()})}function DO(){const n=rt();return st({mutationFn:a=>He.cliproxy.updateRoutingStrategy(a),onSuccess:a=>{n.invalidateQueries({queryKey:["cliproxy-routing"]}),le.success(a.message||`Routing strategy set to ${a.strategy}`)},onError:a=>{le.error(a.message)}})}function TO(){const n=rt();return st({mutationFn:a=>He.cliproxy.create(a),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy"]}),le.success("Variant created successfully")},onError:a=>{le.error(a.message)}})}function jO(){const n=rt();return st({mutationFn:a=>He.cliproxy.delete(a),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy"]}),le.success("Variant deleted successfully")},onError:a=>{le.error(a.message)}})}function MO(){const n=rt();return st({mutationFn:({provider:a,accountId:o})=>He.cliproxy.accounts.setDefault(a,o),onSuccess:()=>{ka(n),le.success("Default account updated")},onError:a=>{le.error(a.message)}})}function EO(){const n=rt();return st({mutationFn:({provider:a,accountId:o})=>He.cliproxy.accounts.remove(a,o),onSuccess:()=>{ka(n),le.success("Account removed")},onError:a=>{le.error(a.message)}})}function e1(){const n=rt();return st({mutationFn:({provider:a,accountId:o})=>He.cliproxy.accounts.pause(a,o),onSuccess:()=>{ka(n),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success("Account paused")},onError:a=>{le.error(a.message)}})}function t1(){const n=rt();return st({mutationFn:({provider:a,accountId:o})=>He.cliproxy.accounts.resume(a,o),onSuccess:()=>{ka(n),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success("Account resumed")},onError:a=>{le.error(a.message)}})}function OO(){const n=rt();return st({mutationFn:({provider:a,accountId:o})=>He.cliproxy.accounts.solo(a,o),onSuccess:a=>{ka(n),n.invalidateQueries({queryKey:["cliproxy-stats"]});const o=a.paused.length;le.success(`Solo mode: paused ${o} other account${o!==1?"s":""}`)},onError:a=>{le.error(a.message)}})}function n1(){const n=rt();return st({mutationFn:({provider:a,accountIds:o})=>He.cliproxy.accounts.bulkPause(a,o),onSuccess:a=>{ka(n),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success(`Paused ${a.succeeded.length} account${a.succeeded.length!==1?"s":""}`),a.failed.length>0&&le.warning(`${a.failed.length} account${a.failed.length!==1?"s":""} failed to pause`)},onError:a=>{le.error(a.message)}})}function a1(){const n=rt();return st({mutationFn:({provider:a,accountIds:o})=>He.cliproxy.accounts.bulkResume(a,o),onSuccess:a=>{ka(n),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success(`Resumed ${a.succeeded.length} account${a.succeeded.length!==1?"s":""}`),a.failed.length>0&&le.warning(`${a.failed.length} account${a.failed.length!==1?"s":""} failed to resume`)},onError:a=>{le.error(a.message)}})}function PO(){const n=rt();return st({mutationFn:({provider:a,nickname:o})=>He.cliproxy.auth.start(a,o),onSuccess:(a,o)=>{ka(n),le.success(`Account added for ${o.provider}`)},onError:a=>{le.error(a.message)}})}function LO(){return st({mutationFn:n=>He.cliproxy.auth.cancel(n),onError:n=>{le.error(n.message)}})}function RO(){const n=rt();return st({mutationFn:()=>He.cliproxy.auth.kiroImport(),onSuccess:a=>{ka(n),a.account?le.success(`Imported Kiro account: ${a.account.email||a.account.id}`):le.success("Kiro token imported")},onError:a=>{le.error(a.message)}})}function _O(){return kt({queryKey:["cliproxy-models"],queryFn:()=>He.cliproxy.models()})}function zO(n){return kt({queryKey:["presets",n],queryFn:()=>He.presets.list(n),enabled:!!n})}function IO(){const n=rt();return st({mutationFn:({profile:a,data:o})=>He.presets.create(a,o),onSuccess:(a,o)=>{n.invalidateQueries({queryKey:["presets",o.profile]}),le.success(`Preset "${o.data.name}" saved`)},onError:a=>{le.error(a.message)}})}function UO(){const n=rt();return st({mutationFn:({profile:a,name:o})=>He.presets.delete(a,o),onSuccess:(a,o)=>{n.invalidateQueries({queryKey:["presets",o.profile]}),le.success("Preset deleted")},onError:a=>{le.error(a.message)}})}function HO(){return kt({queryKey:["proxy-status"],queryFn:()=>He.cliproxy.proxyStatus(),refetchInterval:3e4})}function BO(){const n=rt();return st({mutationFn:()=>He.cliproxy.proxyStart(),onSuccess:a=>{n.invalidateQueries({queryKey:["proxy-status"]}),a.alreadyRunning?le.info("CLIProxy was already running"):a.started?le.success("CLIProxy started successfully"):le.error(a.error||"Failed to start CLIProxy")},onError:a=>{le.error(a.message)}})}function KO(){const n=rt();return st({mutationFn:()=>He.cliproxy.proxyStop(),onSuccess:a=>{n.invalidateQueries({queryKey:["proxy-status"]}),a.stopped?le.success(`CLIProxy stopped${a.sessionCount?` (${a.sessionCount} session(s) disconnected)`:""}`):le.error(a.error||"Failed to stop CLIProxy")},onError:a=>{le.error(a.message)}})}function i1(){return kt({queryKey:["cliproxy-update-check"],queryFn:()=>He.cliproxy.updateCheck(),staleTime:300*1e3,refetchInterval:300*1e3,refetchOnWindowFocus:!0})}function qO(){const n=rt();return st({mutationKey:["update-backend"],mutationFn:({backend:a,force:o=!1})=>He.cliproxyServer.updateBackend(a,o),onSuccess:()=>{n.invalidateQueries({queryKey:["cliproxy-update-check"],refetchType:"all"}),n.invalidateQueries({queryKey:["cliproxy-versions"],refetchType:"all"}),n.invalidateQueries({queryKey:["cliproxy-server-config"],refetchType:"all"}),n.invalidateQueries({queryKey:["proxy-status"]}),n.invalidateQueries({queryKey:["cliproxy-stats"]}),le.success("Backend updated")},onError:a=>{a.message.includes("Proxy is running")?le.error("Stop the proxy first to change backend"):le.error(a.message)}})}function FO(){return kt({queryKey:["cliproxy-versions"],queryFn:()=>He.cliproxy.versions(),staleTime:300*1e3,refetchOnWindowFocus:!0})}function GO(){const n=rt();return st({mutationFn:({version:a,force:o})=>He.cliproxy.install(a,o),onSuccess:a=>{a.requiresConfirmation||(n.invalidateQueries({queryKey:["cliproxy-versions"]}),n.invalidateQueries({queryKey:["cliproxy-update-check"]}),n.invalidateQueries({queryKey:["proxy-status"]}),a.success?le.success(a.message||`Installed v${a.version}`):le.error(a.error||"Installation failed"))},onError:a=>{le.error(a.message)}})}function VO(){const n=rt();return st({mutationFn:()=>He.cliproxy.restart(),onSuccess:a=>{n.invalidateQueries({queryKey:["proxy-status"]}),a.success?le.success(`Proxy restarted on port ${a.port}`):le.error(a.error||"Restart failed")},onError:a=>{le.error(a.message)}})}const o1=YC,s1=WC,r1=$C;function l1(n){return[{title:n("nav.general"),items:[{path:"/",icon:MS,label:n("nav.home")},{path:"/analytics",icon:ES,label:n("nav.analytics")}]},{title:n("nav.identityAccess"),items:[{path:"/providers",icon:Pd,label:n("nav.apiProfiles"),badge:{icons:["/icons/openrouter.svg","/assets/providers/alibabacloud-color.svg","/icons/ollama.svg"]}},{path:"/cliproxy",icon:Rb,label:n("nav.cliproxyPlus"),isCollapsible:!0,children:[{path:"/cliproxy",label:n("nav.cliproxyOverview")},{path:"/cliproxy/ai-providers",icon:Pd,label:"AI Providers"},{path:"/cliproxy/control-panel",icon:OS,label:n("nav.controlPanel")}]},{path:"/copilot",icon:_b,label:n("nav.githubCopilot")},{path:"/cursor",iconSrc:"/assets/sidebar/cursor.svg",label:n("nav.cursorIde")},{path:"/accounts",icon:Ib,label:n("nav.accounts"),isCollapsible:!0,children:[{path:"/accounts",label:n("nav.allAccounts")},{path:"/shared",icon:zb,label:n("nav.sharedData")}]}]},{title:n("nav.compatibleClis"),items:[{path:"/claude-extension",icon:PS,label:n("nav.claudeExtension")},{path:"/codex",iconSrc:"/assets/sidebar/codex.svg",label:"Codex CLI"},{path:"/droid",icon:LS,label:n("nav.factoryDroid")}]},{title:n("nav.system"),items:[{path:"/health",icon:Us,label:n("nav.health")},{path:"/logs",icon:Ub,label:n("nav.logs")},{path:"/settings",icon:RS,label:n("nav.settings")}]}]}function c1(){const{t:n}=Et(),a=El(),o=Jd(),{state:r}=Ul(),{data:c}=i1(),d=l1(n),f=c?.backendLabel??"CLIProxy",m=x=>x.path==="/cliproxy"?f:x.label,p=x=>a.pathname===x,g=x=>x.some(j=>p(j.path)||a.pathname.startsWith(j.path+"/")),S=x=>x.path==="/accounts"?"/shared":x.path,b=x=>{if(x.iconSrc)return l.jsx("img",{src:x.iconSrc,alt:"",className:"w-4 h-4 object-contain"});if(x.icon){const j=x.icon;return l.jsx(j,{className:"w-4 h-4"})}return null};return l.jsxs(_k,{collapsible:"icon",children:[l.jsx(Ik,{className:"h-12 flex items-center justify-center",children:l.jsx(dx,{size:"sm",showText:r==="expanded"})}),l.jsx(Hk,{children:d.map((x,j)=>l.jsxs(Bk,{children:[x.title&&l.jsx(Kk,{children:x.title}),l.jsx(qk,{children:l.jsx(Fk,{children:x.items.map(N=>l.jsx(Gk,{children:N.isCollapsible&&N.children?l.jsxs(o1,{defaultOpen:g(N.children)||p(N.path),className:"group/collapsible",children:[l.jsx(s1,{asChild:!0,children:l.jsxs(xy,{tooltip:m(N),isActive:g(N.children),onClick:()=>o(S(N)),children:[b(N),l.jsx("span",{className:"group-data-[collapsible=icon]:hidden",children:m(N)}),l.jsx(Ol,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90 group-data-[collapsible=icon]:hidden"})]})}),l.jsx(r1,{children:l.jsx(Yk,{children:N.children.map(E=>l.jsx($k,{children:l.jsx(Wk,{asChild:!0,isActive:p(E.path),children:l.jsx(Cl,{to:E.path,children:l.jsx("span",{children:E.label})})})},E.path))})})]}):l.jsx(xy,{asChild:!0,isActive:p(N.path),tooltip:m(N),children:l.jsxs(Cl,{to:N.path,children:[b(N),l.jsx("span",{className:"group-data-[collapsible=icon]:hidden flex-1",children:m(N)}),N.badge&&l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsxs("span",{className:K("group-data-[collapsible=icon]:hidden ml-auto flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-medium rounded transition-colors",p(N.path)?"bg-white/92 border border-white/65 shadow-sm":"bg-accent/15 text-accent border border-accent/30 group-hover/menu-item:bg-sidebar-accent-foreground/20 group-hover/menu-item:text-sidebar-accent-foreground group-hover/menu-item:border-sidebar-accent-foreground/30"),children:[(N.badge.icons&&N.badge.icons.length>0?N.badge.icons:N.badge.icon?[N.badge.icon]:[]).map(E=>l.jsx("span",{className:K("inline-flex h-4 w-4 items-center justify-center rounded-[3px] border",p(N.path)?"bg-white border-black/10":"bg-background/80 border-border/40 group-hover/menu-item:bg-white/90"),children:l.jsx("img",{src:E,alt:"",className:"h-3 w-3 object-contain"})},E)),N.badge.text&&l.jsx("span",{className:"hidden sm:inline",children:N.badge.text})]})}),l.jsx(Na,{side:"right",children:l.jsx("p",{children:n("nav.openrouterTooltip")})})]})]})})},N.path))})})]},x.title||j))}),l.jsx(Uk,{className:"p-4 border-t flex items-center justify-center",children:l.jsx(zk,{})})]})}const mf=()=>{const n=C.useContext(ix);if(n===void 0)throw new Error("useTheme must be used within a ThemeProvider");return n};function u1(){const{theme:n,setTheme:a}=mf();return l.jsxs(ot,{variant:"ghost",size:"icon",onClick:()=>a(n==="dark"?"light":"dark"),children:[l.jsx(Hb,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l.jsx(Bb,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function d1(){const{privacyMode:n,togglePrivacyMode:a}=sf();return l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsx(ot,{variant:"ghost",size:"icon",onClick:a,className:K("h-8 w-8 transition-colors",n&&"text-amber-600 hover:text-amber-700 dark:text-amber-400"),children:n?l.jsx(Vs,{className:"h-4 w-4"}):l.jsx(Ys,{className:"h-4 w-4"})})}),l.jsx(Na,{children:l.jsx("p",{children:n?"Privacy mode ON - Click to show data":"Privacy mode OFF - Click to hide data"})})]})}const f1="https://github.com/kaitranntt/ccs/issues";function h1(){return l.jsx(ot,{variant:"ghost",size:"icon",asChild:!0,title:"Report an issue on GitHub",children:l.jsx("a",{href:f1,target:"_blank",rel:"noopener noreferrer",children:l.jsx(_b,{className:"w-4 h-4"})})})}const m1="https://docs.ccs.kaitran.ca";function p1(){return l.jsx(ot,{variant:"ghost",size:"icon",asChild:!0,title:"View documentation",children:l.jsx("a",{href:m1,target:"_blank",rel:"noopener noreferrer",children:l.jsx(_S,{className:"w-4 h-4"})})})}function g1(){const[n,a]=C.useState("disconnected"),[o,r]=C.useState(!1),c=C.useRef(null),d=rt(),f=C.useRef(0),m=5,p=C.useRef(null),g=C.useRef(()=>{}),S=C.useCallback(j=>{switch(j.type){case"connected":console.log("[WS] Server acknowledged connection");break;case"config-changed":d.invalidateQueries({queryKey:["profiles"]}),d.invalidateQueries({queryKey:["cliproxy"]}),le.info("Configuration updated externally");break;case"settings-changed":d.invalidateQueries({queryKey:["profiles"]}),le.info("Settings file updated");break;case"profiles-changed":d.invalidateQueries({queryKey:["accounts"]}),le.info("Accounts updated");break;case"proxy-status-changed":d.invalidateQueries({queryKey:["proxy-status"]});break;case"pong":break;default:console.log(`[WS] Unknown message: ${j.type}`)}},[d]),b=C.useCallback(()=>{if(c.current?.readyState===WebSocket.OPEN)return;a("connecting");const j=window.location.protocol==="https:"?"wss:":"ws:",N=new WebSocket(`${j}//${window.location.host}/ws`);c.current=N,N.onopen=()=>{a("connected"),r(!1),f.current=0,console.log("[WS] Connected")},N.onmessage=E=>{try{const L=JSON.parse(E.data);S(L),window.dispatchEvent(new CustomEvent("ws-message",{detail:L}))}catch{console.log("[WS] Invalid message")}},N.onclose=()=>{if(a("disconnected"),c.current=null,f.current<m){r(!0);const E=Math.min(1e3*Math.pow(2,f.current),3e4);f.current++,console.log(`[WS] Reconnecting in ${E}ms (attempt ${f.current})`),p.current=setTimeout(()=>{g.current()},E)}else r(!1)},N.onerror=()=>{console.log("[WS] Connection error")}},[S]);g.current=b;const x=C.useCallback(()=>{f.current=m,r(!1),p.current&&(clearTimeout(p.current),p.current=null),c.current?.close()},[]);return C.useEffect(()=>(g.current(),()=>x()),[]),C.useEffect(()=>{const j=setInterval(()=>{c.current?.readyState===WebSocket.OPEN&&c.current.send(JSON.stringify({type:"ping"}))},3e4);return()=>clearInterval(j)},[]),C.useMemo(()=>({status:n,isReconnecting:o,connect:b,disconnect:x}),[n,o,b,x])}function y1(){const{status:n,isReconnecting:a}=g1(),r={connected:{icon:IS,color:"text-green-600",label:"Connected",animate:!1},connecting:{icon:Hs,color:"text-yellow-500",label:"Connecting...",animate:!0},disconnected:{icon:a?Hs:zS,color:a?"text-amber-500":"text-red-500",label:a?"Reconnecting...":"Disconnected",animate:a}}[n],c=r.icon;return l.jsxs("div",{className:`flex items-center gap-1 text-sm ${r.color}`,children:[l.jsx(c,{className:`w-4 h-4 ${r.animate?"animate-spin":""}`}),l.jsx("span",{className:"hidden sm:inline",children:r.label})]})}function b1(){const[n,a]=C.useState(!1),{authEnabled:o,authConfigured:r,isLocalAccess:c,loading:d}=Il(),f=!c&&!o;if(n&&!f||d)return null;const m=f?"w-full border-t border-amber-200 bg-amber-50 px-4 py-2 text-amber-900 transition-colors duration-200 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-200":"w-full border-t border-yellow-200 bg-yellow-50 px-4 py-2 text-yellow-800 transition-colors duration-200 dark:border-yellow-800 dark:bg-yellow-900/20 dark:text-yellow-200",p=f?"text-amber-600 hover:bg-amber-100 hover:text-amber-800 dark:text-amber-400 dark:hover:bg-amber-800/30":"text-yellow-600 hover:bg-yellow-100 hover:text-yellow-800 dark:text-yellow-400 dark:hover:bg-yellow-800/30",g=f?l.jsx(l.Fragment,{children:r?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"hidden sm:inline",children:"Remote dashboard access is read-only because dashboard auth is currently disabled on the host. Re-enable dashboard auth on the host to unlock remote changes."}),l.jsx("span",{className:"sm:hidden",children:"Remote dashboard is read-only until dashboard auth is re-enabled on the host."})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"hidden sm:inline",children:"Remote dashboard access is read-only until you run ccs config auth setup on the host."}),l.jsx("span",{className:"sm:hidden",children:"Remote dashboard is read-only until host auth is configured."})]})}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"hidden sm:inline",children:"This dashboard runs locally. All data stays on your machine."}),l.jsx("span",{className:"sm:hidden",children:"Local dashboard - data stays on your device."})]});return l.jsx("div",{className:m,children:l.jsxs("div",{className:"flex items-center justify-center gap-4",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx(US,{className:"w-4 h-4 flex-shrink-0"}),g]}),f?null:l.jsx("button",{onClick:()=>a(!0),className:`flex-shrink-0 rounded p-1 transition-colors ${p}`,"aria-label":"Dismiss disclaimer",children:l.jsx(Ao,{className:"w-4 h-4"})})]})})}const x1="https://claudekit.cc?ref=HMNKXOHN";function v1(){return l.jsxs("a",{href:x1,target:"_blank",rel:"noopener noreferrer",className:K("group inline-flex items-center gap-2 px-3 py-1.5 rounded-lg","bg-accent/10 border-2 border-accent/40","hover:bg-accent hover:border-accent","transition-all duration-200 shadow-sm hover:shadow-md"),title:"Powered by ClaudeKit Framework",children:[l.jsx("img",{src:"/logos/claudekit-logo.png",alt:"ClaudeKit",className:"w-5 h-5"}),l.jsxs("span",{className:"flex items-baseline gap-1.5 whitespace-nowrap",children:[l.jsx("span",{className:K("text-[10px] font-medium uppercase tracking-wide","text-muted-foreground group-hover:text-accent-foreground/80","transition-colors"),children:"Powered by"}),l.jsx("span",{className:K("text-xs font-bold text-foreground","group-hover:text-accent-foreground","transition-colors"),children:"ClaudeKit"})]})]})}const C1="https://github.com/sponsors/kaitranntt";function S1(){return l.jsxs("a",{href:C1,target:"_blank",rel:"noopener noreferrer",className:K("group inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg","bg-pink-500/10 border-2 border-pink-500/40","hover:bg-pink-400 hover:border-pink-400","transition-all duration-200 shadow-sm hover:shadow-md"),title:"Sponsor this project on GitHub",children:[l.jsx(HS,{className:K("w-4 h-4 text-pink-500","group-hover:text-white group-hover:fill-white","group-hover:animate-pulse","transition-colors")}),l.jsx("span",{className:K("text-xs font-bold text-pink-600 dark:text-pink-300","group-hover:text-white dark:group-hover:text-white","transition-colors"),children:"Sponsor"})]})}function pf({...n}){return l.jsx(mb,{"data-slot":"dialog",...n})}function w1({...n}){return l.jsx(xb,{"data-slot":"dialog-portal",...n})}function N1({className:n,...a}){return l.jsx(vb,{"data-slot":"dialog-overlay",className:K("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",n),...a})}function gf({className:n,children:a,showCloseButton:o=!0,...r}){return l.jsxs(w1,{"data-slot":"dialog-portal",children:[l.jsx(N1,{}),l.jsxs(pb,{"data-slot":"dialog-content",className:K("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",n),...r,children:[a,o&&l.jsxs(gb,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[l.jsx(Ao,{}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function yf({className:n,...a}){return l.jsx("div",{"data-slot":"dialog-header",className:K("flex flex-col gap-2 text-center sm:text-left",n),...a})}function k1({className:n,...a}){return l.jsx("div",{"data-slot":"dialog-footer",className:K("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",n),...a})}function bf({className:n,...a}){return l.jsx(yb,{"data-slot":"dialog-title",className:K("text-lg leading-none font-semibold",n),...a})}function xf({className:n,...a}){return l.jsx(bb,{"data-slot":"dialog-description",className:K("text-muted-foreground text-sm",n),...a})}function A1({open:n,onClose:a,sessionId:o,provider:r,projects:c,defaultProjectId:d,supportsAll:f,onSelect:m,timeoutSeconds:p=30}){const[g,S]=C.useState(d),[b,x]=C.useState(!1),[j,N]=C.useState(p);C.useEffect(()=>{if(!n){N(p);return}const O=setInterval(()=>{N(D=>D<=1?(clearInterval(O),E(!0),0):D-1)},1e3);return()=>clearInterval(O)},[n,p]),C.useEffect(()=>{n&&(S(d),x(!1),N(p))},[n,d,p]);const E=async(O=!1)=>{if(!b){x(!0);try{await m(O?"":g),a()}catch(D){console.error("Failed to submit project selection:",D);try{await m("")}catch{}a()}}},L=r.charAt(0).toUpperCase()+r.slice(1);return l.jsx(pf,{open:n,onOpenChange:O=>!O&&!b&&a(),children:l.jsxs(gf,{className:"sm:max-w-lg",children:[l.jsxs(yf,{children:[l.jsxs(bf,{className:"flex items-center gap-2",children:[l.jsx(zb,{className:"w-5 h-5"}),"Select Google Cloud Project"]}),l.jsxs(xf,{children:["Choose which project to use for ",L," authentication.",j>0&&l.jsxs("span",{className:"text-muted-foreground ml-1",children:["(Auto-selecting default in ",j,"s)"]})]})]}),l.jsxs("div",{className:"space-y-4 py-4",children:[l.jsxs("div",{className:"space-y-2",children:[c.map(O=>l.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border cursor-pointer transition-colors ${g===O.id?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,onClick:()=>!b&&S(O.id),children:[g===O.id?l.jsx(Ig,{className:"w-5 h-5 text-primary"}):l.jsx(Ug,{className:"w-5 h-5 text-muted-foreground"}),l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"font-medium",children:O.name}),l.jsx("div",{className:"text-sm text-muted-foreground font-mono",children:O.id})]}),O.id===d&&l.jsx("span",{className:"text-xs px-2 py-1 bg-secondary rounded",children:"Default"})]},O.id)),f&&l.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg border cursor-pointer transition-colors ${g==="ALL"?"border-primary bg-primary/5":"border-border hover:border-primary/50"}`,onClick:()=>!b&&S("ALL"),children:[g==="ALL"?l.jsx(Ig,{className:"w-5 h-5 text-primary"}):l.jsx(Ug,{className:"w-5 h-5 text-muted-foreground"}),l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"font-medium",children:"All Projects"}),l.jsxs("div",{className:"text-sm text-muted-foreground",children:["Onboard all ",c.length," listed projects"]})]})]})]}),l.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[l.jsx(ot,{variant:"ghost",onClick:()=>E(!0),disabled:b,children:"Use Default"}),l.jsx(ot,{onClick:()=>E(!1),disabled:b,children:b?l.jsxs(l.Fragment,{children:[l.jsx(kn,{className:"w-4 h-4 mr-2 animate-spin"}),"Selecting..."]}):l.jsxs(l.Fragment,{children:[l.jsx(wo,{className:"w-4 h-4 mr-2"}),"Confirm Selection"]})})]})]})]})})}const ko={gemini:{displayName:"Google Gemini",description:"Gemini Pro/Flash models",oauthFlow:"authorization_code",callbackPort:8085,callbackProviderName:"gemini",authUrlProviderName:"gemini-cli",refreshOwnership:"ccs",authFilePrefixes:["gemini-","google-"],tokenTypeValues:["gemini"],aliases:["gemini-cli"]},codex:{displayName:"OpenAI Codex",description:"GPT-4 and codex models",oauthFlow:"authorization_code",callbackPort:1455,callbackProviderName:"codex",authUrlProviderName:"codex",refreshOwnership:"cliproxy",authFilePrefixes:["codex-","openai-"],tokenTypeValues:["codex"],aliases:[]},agy:{displayName:"Antigravity",description:"Antigravity AI models",oauthFlow:"authorization_code",callbackPort:51121,callbackProviderName:"antigravity",authUrlProviderName:"antigravity",refreshOwnership:"cliproxy",authFilePrefixes:["antigravity-","agy-"],tokenTypeValues:["antigravity"],aliases:["antigravity"]},qwen:{displayName:"Alibaba Qwen",description:"Qwen Code models",oauthFlow:"device_code",callbackPort:null,callbackProviderName:"qwen",authUrlProviderName:"qwen",refreshOwnership:"cliproxy",authFilePrefixes:["qwen-"],tokenTypeValues:["qwen"],aliases:[]},iflow:{displayName:"iFlow",description:"iFlow AI models",oauthFlow:"authorization_code",callbackPort:11451,callbackProviderName:"iflow",authUrlProviderName:"iflow",refreshOwnership:"cliproxy",authFilePrefixes:["iflow-"],tokenTypeValues:["iflow"],aliases:[]},kiro:{displayName:"Kiro (AWS)",description:"AWS CodeWhisperer models",oauthFlow:"device_code",callbackPort:null,callbackProviderName:"kiro",authUrlProviderName:"kiro",refreshOwnership:"cliproxy",authFilePrefixes:["kiro-","aws-","codewhisperer-"],tokenTypeValues:["kiro","codewhisperer"],aliases:["codewhisperer"]},ghcp:{displayName:"GitHub Copilot (OAuth)",description:"GitHub Copilot via OAuth",oauthFlow:"device_code",callbackPort:null,callbackProviderName:"copilot",authUrlProviderName:"github",refreshOwnership:"cliproxy",authFilePrefixes:["github-copilot-","copilot-","gh-"],tokenTypeValues:["github-copilot","copilot"],aliases:["github-copilot","copilot"]},claude:{displayName:"Claude (Anthropic)",description:"Claude Opus/Sonnet models",oauthFlow:"authorization_code",callbackPort:54545,callbackProviderName:"anthropic",authUrlProviderName:"anthropic",refreshOwnership:"unsupported",authFilePrefixes:["claude-","anthropic-"],tokenTypeValues:["claude","anthropic"],aliases:["anthropic"]},kimi:{displayName:"Kimi (Moonshot)",description:"Moonshot AI K2/K2.5 models",oauthFlow:"device_code",callbackPort:null,callbackProviderName:"kimi",authUrlProviderName:"kimi",refreshOwnership:"cliproxy",authFilePrefixes:["kimi-"],tokenTypeValues:["kimi"],aliases:["moonshot"]}},vf=Object.freeze(Object.keys(ko)),Ud=Object.freeze(["agy","codex","claude","gemini","ghcp"]);new Set(Ud);const D1=Object.freeze([...Ud,...Ud.flatMap(n=>ko[n].aliases),"all"].filter((n,a,o)=>o.indexOf(n)===a));D1.join(", ");new Set(vf);function T1(n=ko){const a=new Map,o=Object.keys(n),r=(c,d)=>{const f=c.trim().toLowerCase();if(!f)return;const m=a.get(f);if(m&&m!==d)throw new Error(`Provider alias collision for "${f}": ${m} and ${d}`);a.set(f,d)};for(const c of o){r(c,c);for(const d of n[c].aliases)r(d,c)}return a}T1();function j1(n){return vf.filter(a=>ko[a].oauthFlow===n)}const Cf=vf;function Qs(n){return Cf.includes(n)}function Aa(n){return typeof n=="string"?n.trim().toLowerCase():""}const M1=["openai","vertex"];function ql(n){return Qs(n)||M1.includes(n)}const hx=Object.freeze(Object.fromEntries(Cf.map(n=>[n,{displayName:ko[n].displayName,description:ko[n].description}]))),E1={gemini:"/assets/providers/gemini-color.svg",agy:"/assets/providers/agy.png",codex:"/assets/providers/codex-color.svg",qwen:"/assets/providers/qwen-color.svg",iflow:"/assets/providers/iflow.png",kiro:"/assets/providers/kiro.png",ghcp:"/assets/providers/copilot.svg",claude:"/assets/providers/claude.svg",kimi:"/assets/providers/kimi.svg",openai:"/assets/providers/openai.svg",vertex:"/assets/providers/vertex.svg"},vy={textClass:"text-gray-600",letter:"?"},O1={gemini:{textClass:"text-blue-600",letter:"G"},claude:{textClass:"text-orange-600",letter:"C"},codex:{textClass:"text-emerald-600",letter:"X"},agy:{textClass:"text-violet-600",letter:"A"},qwen:{textClass:"text-cyan-600",letter:"Q"},iflow:{textClass:"text-indigo-600",letter:"i"},kiro:{textClass:"text-teal-600",letter:"K"},ghcp:{textClass:"text-green-600",letter:"C"},kimi:{textClass:"text-orange-500",letter:"K"},openai:{textClass:"text-slate-900",letter:"O"},vertex:{textClass:"text-blue-600",letter:"V"}},P1=new Set(["kimi"]),L1=new Set(["codex"]);function YO(n){switch(n){case"gemini-api-key":return"gemini";case"codex-api-key":return"codex";case"claude-api-key":return"claude";case"vertex-api-key":return"vertex";case"openai-compatibility":return"openai"}}function $O(n){return n.split(`
|
|
11
|
-
`).map(a=>a.trim()).filter(a=>a.length>0).map(a=>{const o=a.indexOf("=");if(o===-1)return{name:a.trim(),alias:""};const r=a.slice(0,o).trim(),c=a.slice(o+1).trim();return c?{name:c,alias:r}:{name:r,alias:""}}).filter(a=>a.name.length>0||a.alias.length>0)}function WO(n){return n.split(`
|
|
12
|
-
`).map((a,o)=>({line:a.trim(),lineNumber:o+1})).filter(({line:a})=>a.length>0&&a.includes("=")).flatMap(({line:a,lineNumber:o})=>{const r=a.indexOf("="),c=a.slice(0,r).trim(),d=a.slice(r+1).trim();return c&&d?[]:[`Line ${o}: use requested=upstream or a plain model name.`]})}function QO(n){return(n||[]).map(a=>{const o=a.alias?.trim()||"",r=a.name?.trim()||"";return o?`${o}=${r}`:r}).join(`
|
|
13
|
-
`)}function XO(n){return n.alias.trim()||n.name.trim()}function mx(n){const a=Aa(n);if(ql(a))return E1[a]}function R1(n){const a=Aa(n);return ql(a)?O1[a]:{...vy,letter:a[0]?.toUpperCase()||vy.letter}}function _1(n){const a=Aa(n);return ql(a)&&P1.has(a)}function z1(n){const a=Aa(n);return ql(a)&&L1.has(a)}const Sf={gemini:"#4285F4",agy:"#f3722c",codex:"#10a37f",openai:"#111827",vertex:"#4285F4",iflow:"#f94144",qwen:"#6236FF",kiro:"#4d908e",ghcp:"#43aa8b",claude:"#D97757",kimi:"#FF6B35"},I1={...Object.fromEntries(Cf.map(n=>[n,hx[n].displayName])),openai:"OpenAI",vertex:"Vertex AI"};function wf(n){const a=Aa(n);return a?I1[a]||String(n):"Unknown provider"}function U1(n){const a=Aa(n);return Qs(a)?hx[a].description:""}const H1=[...j1("device_code")],B1=Object.freeze({ghcp:"GitHub Copilot",kiro:"Kiro (AWS)",qwen:"Qwen Code"}),K1=Object.freeze({ghcp:"Sign in with your GitHub account that has Copilot access.",qwen:"Sign in with your Qwen account to authorize access.",kiro:"Sign in with your selected Kiro auth provider to continue.",kimi:"Sign in with your Kimi account and finish the device authorization."});function ZO(n){const a=Aa(n);return Qs(a)&&H1.includes(a)}function bl(n){const a=Aa(n);return a?Qs(a)?B1[a]||wf(a):String(n):"Unknown provider"}function q1(n){const a=Aa(n);return Qs(a)&&K1[a]||"Complete the authorization in your browser."}const F1=["authcode","device"],Hd="authcode",JO="aws",Cy=[{id:"aws",label:"AWS Builder ID (Recommended)",description:"Device code flow for AWS organizations and Builder ID accounts.",flowType:"device_code",startEndpoint:"start"},{id:"aws-authcode",label:"AWS Builder ID (Auth Code)",description:"Authorization code flow via CLI binary.",flowType:"authorization_code",startEndpoint:"start"},{id:"google",label:"Google OAuth",description:"Social OAuth flow with callback URL support.",flowType:"authorization_code",startEndpoint:"start-url"},{id:"github",label:"GitHub OAuth",description:"Social OAuth flow via management API callback.",flowType:"authorization_code",startEndpoint:"start-url"},{id:"idc",label:"AWS Identity Center (IDC)",description:"Use your organization start URL with auth code or device flow.",flowType:"authorization_code",startEndpoint:"start"}];function G1(n){return F1.includes(n)}function V1(n){if(!n)return Hd;const a=n.trim().toLowerCase();return G1(a)?a:Hd}function eP(n){return Cy.find(o=>o.id===n)||Cy[0]}function tP(n,a=Hd){return n==="aws"||n==="idc"&&V1(a)==="device"?"device_code":"authorization_code"}function nP(n){return n==="google"||n==="github"?"start-url":"start"}function aP(n){return n==="google"||n==="github"}function Y1({open:n,onClose:a,sessionId:o,provider:r,userCode:c,verificationUrl:d,expiresAt:f}){const[m,p]=C.useState(!1),[g,S]=C.useState(null);C.useEffect(()=>{if(!n)return;let D=null;const A=()=>{const k=Math.max(0,Math.floor((f-Date.now())/1e3));S(k),k===0&&D&&(clearInterval(D),D=null)};return A(),D=setInterval(A,1e3),()=>{D&&clearInterval(D)}},[n,f]);const b=C.useCallback(async()=>{try{await navigator.clipboard.writeText(c),p(!0),le.success(Fe.t("commonToast.codeCopied")),setTimeout(()=>p(!1),2e3)}catch{le.error(Fe.t("commonToast.copyCodeFailed"))}},[c]),x=C.useCallback(()=>{window.open(d,"_blank","noopener,noreferrer")},[d]),j=bl(r),N=q1(r),E=j==="Unknown provider"?"Open verification page":`Open ${j.split(" ")[0]}`,L=D=>{const A=Math.floor(D/60),k=D%60;return`${A}:${k.toString().padStart(2,"0")}`},O=g===0;return l.jsx(pf,{open:n,onOpenChange:D=>!D&&a(),children:l.jsxs(gf,{className:"sm:max-w-md","data-session-id":o,children:[l.jsxs(yf,{children:[l.jsxs(bf,{className:"flex items-center gap-2",children:[l.jsx(ef,{className:"w-5 h-5"}),"Authorize ",j]}),l.jsxs(xf,{children:["Enter the code below at the authorization page.",g!==null&&g>0&&l.jsxs("span",{className:"text-muted-foreground ml-1",children:["(Expires in ",L(g),")"]}),O&&l.jsx("span",{className:"text-destructive ml-1 font-medium",children:"(Code expired)"})]})]}),l.jsxs("div",{className:"space-y-6 py-4",children:[l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"bg-muted rounded-lg p-6 text-center",children:l.jsx("div",{className:"text-4xl font-mono font-bold tracking-[0.3em] text-foreground select-all",children:c})}),l.jsx(ot,{variant:"outline",size:"icon",className:"absolute top-2 right-2",onClick:b,"aria-label":m?"Code copied":"Copy verification code",children:m?l.jsx(wo,{className:"h-4 w-4 text-green-500"}):l.jsx(Sl,{className:"h-4 w-4"})})]}),l.jsx("div",{className:"text-sm text-muted-foreground text-center",children:l.jsx("p",{children:N})}),l.jsxs("div",{className:"flex flex-col gap-3",children:[l.jsxs(ot,{onClick:x,className:"w-full",children:[l.jsx(Kb,{className:"w-4 h-4 mr-2"}),E]}),l.jsx(ot,{variant:"outline",onClick:b,className:"w-full",children:m?l.jsxs(l.Fragment,{children:[l.jsx(wo,{className:"w-4 h-4 mr-2 text-green-500"}),"Copied!"]}):l.jsxs(l.Fragment,{children:[l.jsx(Sl,{className:"w-4 h-4 mr-2"}),"Copy Code"]})})]}),l.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[l.jsx(kn,{className:"h-4 w-4 animate-spin"}),l.jsx("span",{children:"Waiting for authorization..."})]})]})]})})}function $1({...n}){return l.jsx(QC,{"data-slot":"dropdown-menu",...n})}function W1({...n}){return l.jsx(XC,{"data-slot":"dropdown-menu-trigger",...n})}function Q1({className:n,sideOffset:a=4,...o}){return l.jsx(ZC,{children:l.jsx(JC,{"data-slot":"dropdown-menu-content",sideOffset:a,className:K("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md bg-white dark:bg-zinc-950",n),...o})})}function X1({className:n,inset:a,variant:o="default",...r}){return l.jsx(eS,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":o,className:K("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground focus:[&_svg:not([class*='text-'])]:text-current relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...r})}function Z1(){const{authRequired:n,isAuthenticated:a,username:o,logout:r}=Il();if(!n||!a)return null;const c=async()=>{await r()};return l.jsxs($1,{children:[l.jsx(W1,{asChild:!0,children:l.jsxs(ot,{variant:"ghost",size:"sm",className:"gap-2",children:[l.jsx(qb,{className:"h-4 w-4"}),l.jsx("span",{className:"hidden sm:inline",children:o})]})}),l.jsx(Q1,{align:"end",children:l.jsxs(X1,{onClick:c,className:"gap-2 text-destructive",children:[l.jsx(BS,{className:"h-4 w-4"}),"Sign Out"]})})]})}const px=sS,gx=rS,Nf=C.forwardRef(({className:n,children:a,...o},r)=>l.jsxs(Cb,{ref:r,className:K("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...o,children:[a,l.jsx(tS,{asChild:!0,children:l.jsx(Pl,{className:"h-4 w-4 opacity-50"})})]}));Nf.displayName=Cb.displayName;const yx=C.forwardRef(({className:n,...a},o)=>l.jsx(Sb,{ref:o,className:K("flex cursor-default items-center justify-center py-1",n),...a,children:l.jsx(tf,{className:"h-4 w-4"})}));yx.displayName=Sb.displayName;const bx=C.forwardRef(({className:n,...a},o)=>l.jsx(wb,{ref:o,className:K("flex cursor-default items-center justify-center py-1",n),...a,children:l.jsx(Pl,{className:"h-4 w-4"})}));bx.displayName=wb.displayName;const kf=C.forwardRef(({className:n,children:a,position:o="popper",...r},c)=>l.jsx(nS,{children:l.jsxs(Nb,{ref:c,className:K("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:o,...r,children:[l.jsx(yx,{}),l.jsx(aS,{className:K("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),l.jsx(bx,{})]})}));kf.displayName=Nb.displayName;const J1=C.forwardRef(({className:n,...a},o)=>l.jsx(kb,{ref:o,className:K("px-2 py-1.5 text-sm font-semibold",n),...a}));J1.displayName=kb.displayName;const _s=C.forwardRef(({className:n,children:a,...o},r)=>l.jsxs(Ab,{ref:r,className:K("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...o,children:[l.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(iS,{children:l.jsx(wo,{className:"h-4 w-4"})})}),l.jsx(oS,{children:a})]}));_s.displayName=Ab.displayName;const eA=C.forwardRef(({className:n,...a},o)=>l.jsx(Db,{ref:o,className:K("-mx-1 my-1 h-px bg-muted",n),...a}));eA.displayName=Db.displayName;function tA(){const{t:n,i18n:a}=Et(),o=Ws(a.resolvedLanguage??a.language??"en"),r=c=>{const d=VN(c);a.changeLanguage(d)};return l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Fb,{className:"h-4 w-4 text-muted-foreground"}),l.jsxs(px,{value:o,onValueChange:r,children:[l.jsx(Nf,{className:"h-8 w-[150px]",children:l.jsx(gx,{placeholder:n("layout.languageSwitcher")})}),l.jsx(kf,{children:FN.map(c=>l.jsx(_s,{value:c,children:n(`locale.${c}`)},c))})]})]})}function nA(){const[n,a]=C.useState({isOpen:!1,prompt:null});C.useEffect(()=>{const c=d=>{const f=d.detail;f.type==="projectSelectionRequired"?(console.log("[ProjectSelection] Received prompt:",f.sessionId),a({isOpen:!0,prompt:{sessionId:f.sessionId,provider:f.provider,projects:f.projects,defaultProjectId:f.defaultProjectId,supportsAll:f.supportsAll}})):f.type==="projectSelectionTimeout"?(console.log("[ProjectSelection] Timeout:",f.sessionId),a(m=>m.prompt?.sessionId===f.sessionId?{isOpen:!1,prompt:null}:m)):f.type==="projectSelectionSubmitted"&&(console.log("[ProjectSelection] Submitted:",f.sessionId),a(m=>m.prompt?.sessionId===f.sessionId?{isOpen:!1,prompt:null}:m))};return window.addEventListener("ws-message",c),()=>{window.removeEventListener("ws-message",c)}},[]);const o=C.useCallback(async c=>{if(!n.prompt)return;if(!(await fetch(`/api/cliproxy/auth/project-selection/${n.prompt.sessionId}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({selectedId:c})})).ok)throw new Error("Failed to submit project selection")},[n.prompt]),r=C.useCallback(()=>{a({isOpen:!1,prompt:null})},[]);return C.useMemo(()=>({isOpen:n.isOpen,prompt:n.prompt,onSelect:o,onClose:r}),[n.isOpen,n.prompt,o,r])}function aA(n){return typeof n!="string"?"unknown":n.trim().toLowerCase()||"unknown"}function iA(){const[n,a]=C.useState({isOpen:!1,prompt:null,error:null});C.useEffect(()=>{const d=f=>{const m=f.detail;if(m.type==="deviceCodeReceived"){console.log("[DeviceCode] Received prompt:",m.sessionId);const p=aA(m.provider),g=bl(p);le.info(`${g} authorization required`),a({isOpen:!0,prompt:{sessionId:m.sessionId,provider:p,userCode:m.userCode,verificationUrl:m.verificationUrl,expiresAt:m.expiresAt},error:null})}else m.type==="deviceCodeCompleted"?(console.log("[DeviceCode] Auth completed:",m.sessionId),a(p=>{if(p.prompt&&p.prompt.sessionId===m.sessionId){const g=bl(p.prompt.provider);return le.success(`${g} authentication successful!`),{isOpen:!1,prompt:null,error:null}}return p})):m.type==="deviceCodeFailed"?(console.log("[DeviceCode] Auth failed:",m.sessionId,m.error),a(p=>{if(p.prompt&&p.prompt.sessionId===m.sessionId){const g=bl(p.prompt.provider);return le.error(`${g} authentication failed`),{isOpen:!1,prompt:null,error:m.error}}return p})):m.type==="deviceCodeExpired"&&(console.log("[DeviceCode] Code expired:",m.sessionId),a(p=>p.prompt?.sessionId===m.sessionId?(le.error("Device code expired. Please try again."),{isOpen:!1,prompt:null,error:"Device code expired"}):p))};return window.addEventListener("ws-message",d),()=>{window.removeEventListener("ws-message",d)}},[]);const o=C.useCallback(()=>{a({isOpen:!1,prompt:null,error:null})},[]),r=C.useCallback(()=>{n.prompt?.verificationUrl&&window.open(n.prompt.verificationUrl,"_blank","noopener,noreferrer")},[n.prompt]),c=C.useCallback(async()=>{if(n.prompt?.userCode)try{await navigator.clipboard.writeText(n.prompt.userCode),le.success("Code copied to clipboard")}catch{le.error("Failed to copy code")}},[n.prompt]);return C.useMemo(()=>({isOpen:n.isOpen,prompt:n.prompt,error:n.error,onClose:o,onOpenUrl:r,onCopyCode:c}),[n.isOpen,n.prompt,n.error,o,r,c])}const oA="ccs-dashboard:last-route";function sA(n,a="",o=""){try{localStorage.setItem(oA,`${n}${a}${o}`)}catch{}}function rA(){return l.jsxs("div",{className:"p-6 space-y-4",children:[l.jsx(We,{className:"h-8 w-48"}),l.jsx(We,{className:"h-64 w-full"})]})}function lA(){const n=El(),{isOpen:a,prompt:o,onSelect:r,onClose:c}=nA(),d=iA();return C.useEffect(()=>{sA(n.pathname,n.search,n.hash)},[n.pathname,n.search,n.hash]),l.jsxs(Rk,{children:[l.jsx(c1,{}),l.jsxs("main",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-background",children:[l.jsxs("header",{className:"flex h-14 items-center justify-between px-6 border-b shrink-0 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(v1,{}),l.jsx(S1,{})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(y1,{}),l.jsx(tA,{}),l.jsx(p1,{}),l.jsx(h1,{}),l.jsx(d1,{}),l.jsx(u1,{}),l.jsx(Z1,{})]})]}),l.jsx("div",{className:"flex-1 overflow-auto min-h-0",children:l.jsx(C.Suspense,{fallback:l.jsx(rA,{}),children:l.jsx(Od,{})})}),l.jsx(b1,{})]}),o&&l.jsx(A1,{open:a,onClose:c,sessionId:o.sessionId,provider:o.provider,projects:o.projects,defaultProjectId:o.defaultProjectId,supportsAll:o.supportsAll,onSelect:r}),d.prompt&&l.jsx(Y1,{open:d.isOpen,onClose:d.onClose,sessionId:d.prompt.sessionId,provider:d.prompt.provider,userCode:d.prompt.userCode,verificationUrl:d.prompt.verificationUrl,expiresAt:d.prompt.expiresAt})]})}const cA=_l("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ut({className:n,variant:a,...o}){return l.jsx("div",{className:K(cA({variant:a}),n),...o})}function uA({version:n}){return l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx(dx,{size:"lg",showText:!1}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"CCS Config"}),n&&l.jsxs(Ut,{variant:"outline",className:"font-mono text-xs",children:["v",n]})]}),l.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Claude Code Switch Dashboard"})]})]})}const dA=100,Sy=["#3b3c36","#568203","#8d4557","#da9100","#3c6c82","#c96907"];function fA(n){return Sy[n%Sy.length]}function Bd(n){return n.replace(/@(gmail|yahoo|hotmail|outlook|icloud)\.com$/i,"")}function hA(n){const o=new Date().getTime()-n.getTime(),r=Math.floor(o/6e4);if(r<1)return"now";if(r<60)return`${r}m`;const c=Math.floor(r/60);return c<24?`${c}h`:`${Math.floor(c/24)}d`}function mA(n){const a=[],o=Date.now(),r=n.reduce((c,d)=>{const f=d.lastUsedAt?new Date(d.lastUsedAt).getTime():o;return Math.max(c,isNaN(f)?o:f)},o);return n.forEach(c=>{const d=new Date(r),f=(m,p)=>{for(let g=0;g<m;g++){const S=Math.floor(Math.random()*24*60*60*1e3*(g/(m||1))),b=new Date(d.getTime()-S),x=Math.floor((Math.random()-.5)*10*60*1e3);b.setTime(b.getTime()+x);const j=new Date;b>j&&b.setTime(j.getTime()),a.push({id:`${c.id}-${p}-${g}`,timestamp:b,accountEmail:c.email,status:p,latencyMs:p==="success"?50+Math.floor(Math.random()*150):200+Math.floor(Math.random()*4800)})}};f(c.successCount,"success"),f(c.failureCount,"failed")}),a.sort((c,d)=>d.timestamp.getTime()-c.timestamp.getTime())}function pA({containerRef:n,svgRef:a,accounts:o}){if(!n.current||!a.current)return[];const r=n.current,d=a.current.getBoundingClientRect(),f=r.querySelector("[data-provider-node]");if(!f)return[];const m=f.getBoundingClientRect(),p=[];return o.forEach((g,S)=>{const b=r.querySelector(`[data-account-index="${S}"]`);if(!b)return;const x=b.getBoundingClientRect(),j=b.getAttribute("data-zone")||"left";let N,E,L,O;switch(j){case"right":N=x.left-d.left,E=x.top+x.height/2-d.top,L=m.right-d.left,O=m.top+m.height/2-d.top;break;case"top":N=x.left+x.width/2-d.left,E=x.bottom-d.top,L=m.left+m.width/2-d.left,O=m.top-d.top;break;case"bottom":N=x.left+x.width/2-d.left,E=x.top-d.top,L=m.left+m.width/2-d.left,O=m.bottom-d.top;break;default:N=x.right-d.left,E=x.top+x.height/2-d.top,L=m.left-d.left,O=m.top+m.height/2-d.top}let D,A,k,T;j==="top"||j==="bottom"?(D=N,A=E+(O-E)*.5,k=L,T=O-(O-E)*.5):(D=N+(L-N)*.5,A=E,k=L-(L-N)*.5,T=O),p.push(`M ${N} ${E} C ${D} ${A}, ${k} ${T}, ${L} ${O}`)}),p}function gA(n){const a=n.length;if(a<=2)return{leftAccounts:n,rightAccounts:[],topAccounts:[],bottomAccounts:[]};if(a<=4){const r=Math.ceil(a/2);return{leftAccounts:n.slice(0,r),rightAccounts:n.slice(r),topAccounts:[],bottomAccounts:[]}}if(a<=8){const r=Math.ceil(a/3);return{leftAccounts:n.slice(0,r),rightAccounts:n.slice(r,r*2),topAccounts:n.slice(r*2),bottomAccounts:[]}}const o=Math.ceil(a/4);return{leftAccounts:n.slice(0,o),rightAccounts:n.slice(o,o*2),topAccounts:n.slice(o*2,o*3),bottomAccounts:n.slice(o*3)}}function yA(n){return n>=9?"w-64":n>=5?"w-60":n>=3?"w-56":"w-52"}function bA({storageKey:n,onDrag:a}){const[o,r]=C.useState(null),c=C.useRef(null),d=C.useRef(!1),f=C.useCallback(()=>{try{const N=localStorage.getItem(n);if(N)return JSON.parse(N)}catch{}return{}},[n]),[m,p]=C.useState(()=>f());C.useEffect(()=>{Object.keys(m).length>0&&localStorage.setItem(n,JSON.stringify(m))},[m,n]);const g=C.useCallback(()=>{p({}),localStorage.removeItem(n)},[n]),S=C.useCallback((N,E)=>{E.preventDefault(),E.stopPropagation(),E.target.setPointerCapture(E.pointerId);const L=m[N]||{x:0,y:0};c.current={x:E.clientX,y:E.clientY,offsetX:L.x,offsetY:L.y},d.current=!1,r(N)},[m]),b=C.useCallback(N=>{if(!o||!c.current)return;const E=c.current,L=N.clientX-E.x,O=N.clientY-E.y;(Math.abs(L)>3||Math.abs(O)>3)&&(d.current=!0),p(D=>({...D,[o]:{x:E.offsetX+L,y:E.offsetY+O}})),a&&requestAnimationFrame(a)},[o,a]),x=C.useCallback(()=>{r(null),c.current=null},[]);return{dragOffsets:m,draggingId:o,didDragRef:d,handlePointerDown:S,handlePointerMove:b,handlePointerUp:x,getOffset:N=>m[N]||{x:0,y:0},resetPositions:g,hasCustomPositions:Object.keys(m).length>0}}function xA(n){let a=0,o=0;return Object.values(n).forEach(r=>{a=Math.min(a,r.y),o=Math.max(o,r.y)}),{paddingTop:Math.max(0,-a),paddingBottom:Math.max(0,o),extraHeight:Math.max(0,Math.abs(a),Math.abs(o))*2}}function vA(n){const[a,o]=C.useState(new Set),r=C.useRef({});return C.useEffect(()=>{const c=new Set,d={};if(n.forEach(f=>{const m=f.successCount+f.failureCount;d[f.id]=m;const p=r.current[f.id];p!==void 0&&m>p&&c.add(f.id)}),r.current=d,c.size>0){o(c);const f=setTimeout(()=>o(new Set),2e3);return()=>clearTimeout(f)}},[n]),a}function CA({events:n,privacyMode:a}){const{t:o}=Et();return n.length===0?l.jsx("div",{className:"h-full flex items-center justify-center rounded-xl bg-muted/20 dark:bg-zinc-900/40 border border-border/30 dark:border-white/[0.05]",children:l.jsx("div",{className:"text-xs text-muted-foreground font-mono",children:o("flowViz.noRecentConnections")})}):l.jsxs("div",{className:"h-full flex flex-col",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-3 px-2",children:[l.jsx(Us,{className:"w-3.5 h-3.5 text-muted-foreground"}),l.jsx("span",{className:"text-[10px] text-muted-foreground font-medium uppercase tracking-wider",children:o("flowViz.connectionTimeline")})]}),l.jsx("div",{className:K("flex-1 rounded-xl p-4 overflow-y-auto","bg-muted/20 dark:bg-zinc-900/40 backdrop-blur-sm","border border-border/30 dark:border-white/[0.05]"),children:l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute left-[7px] top-2 bottom-2 w-px bg-border/50 dark:bg-white/[0.08]"}),l.jsx("div",{className:"space-y-3",children:n.map(r=>{const c=r.status==="success"?Zt.success:r.status==="failed"?Zt.failed:Zt.degraded;return l.jsxs("div",{className:"relative flex items-start gap-3 pl-1",children:[l.jsx("div",{className:K("relative z-10 w-3.5 h-3.5 rounded-full flex-shrink-0 mt-0.5","ring-2 ring-background dark:ring-zinc-950"),style:{backgroundColor:c}}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("span",{className:K("text-[10px] font-mono text-foreground truncate",a&&sx),children:Bd(r.accountEmail)}),l.jsx("span",{className:"text-[9px] text-muted-foreground font-mono flex-shrink-0",children:hA(r.timestamp)})]}),l.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[l.jsx("span",{className:"text-[9px] font-medium uppercase",style:{color:c},children:r.status}),r.latencyMs&&l.jsxs("span",{className:"text-[9px] text-muted-foreground font-mono",children:[r.latencyMs,"ms"]})]})]})]},r.id)})})]})})]})}const SA=new Set(["free","plus","pro"]),wA=new Set(["team"]);function wy(n){return n.trim().replace(/^[^a-z0-9]+|[^a-z0-9]+$/gi,"").replace(/[^a-z0-9._-]+/gi,"-").replace(/-+/g,"-").toLowerCase()}function js(n){const a=n.trim().toLowerCase();if(!a)return"";switch(a){case"team":return"Team";case"free":return"Free";case"plus":return"Plus";case"pro":return"Pro";default:return/^[a-f0-9]{8}$/i.test(a)?a:a.split(/[._-]+/).filter(Boolean).map(o=>o[0]?.toUpperCase()+o.slice(1)).join(" ")}}function xx(n){const a=n.split("#")[0]?.trim();return a&&a.includes("@")?a:null}function NA(n,a){if(!a)return null;const o=`${a}#`;return n.startsWith(o)?n.slice(o.length):null}function kA(n,a){if(!n||!a)return null;const r=(n.split(/[\\/]/).pop()??n).replace(/\.json$/i,"");if(!r.toLowerCase().startsWith("codex-"))return null;const c=r.indexOf("-"),d=c>0&&!r.slice(0,c).includes("@")?r.slice(c+1):r,f=d.toLowerCase().indexOf(a.toLowerCase());if(f===-1)return null;const m=wy(d.slice(0,f)),p=wy(d.slice(f+a.length)),g=[m,p].filter(Boolean);return g.length>0?g.join("-"):null}function AA(n){const a=n.find(r=>/^[a-f0-9]{8}$/i.test(r));if(a)return{detailLabel:`Workspace ${a.toLowerCase()}`,compactDetailLabel:a.toLowerCase()};const o=n.map(js).filter(Boolean).join(" · ");return{detailLabel:o||"Team",compactDetailLabel:o||"Team"}}function DA(n,a,o){const r=a?.trim()||xx(n)||void 0;return kA(o,r)??NA(n,r)}function Af(n,a,o){const r=a?.trim()||xx(n)||n,c=DA(n,r,o);if(!c)return{email:r,audience:"unknown",audienceLabel:null,detailLabel:null,compactDetailLabel:null,inlineLabel:null};const d=c.split("-").filter(Boolean);if(d.length===0)return{email:r,audience:"unknown",audienceLabel:null,detailLabel:null,compactDetailLabel:null,inlineLabel:null};const f=d[d.length-1]?.toLowerCase();if(f&&wA.has(f)){const p=AA(d.slice(0,-1)),g=["Business",p.detailLabel].filter(Boolean).join(" · ");return{email:r,audience:"business",audienceLabel:"Business",detailLabel:p.detailLabel,compactDetailLabel:p.compactDetailLabel,inlineLabel:g}}if(f&&SA.has(f)){const g=[js(f),...d.slice(0,-1).map(js)].filter(Boolean).join(" · ")||js(f),S=["Personal",g].filter(Boolean).join(" · ");return{email:r,audience:"personal",audienceLabel:"Personal",detailLabel:g,compactDetailLabel:g,inlineLabel:S}}const m=d.map(js).filter(Boolean).join(" · ");return{email:r,audience:"unknown",audienceLabel:null,detailLabel:m||null,compactDetailLabel:m||null,inlineLabel:m||null}}function TA(n,a,o){const r=Af(n,a,o);return r.inlineLabel?`${r.email} (${r.inlineLabel})`:r.email}const Si="text-red-700 dark:text-red-400";function jA(n){if(!n)return null;const a=n.split(/[\s_-]+/g).map(o=>o.trim()).filter(o=>o.length>0).map(o=>o.charAt(0).toUpperCase()+o.slice(1));return a.length>0?a.join(" "):n}function MA(n){if(!n)return null;try{const a=new Date(n);return Number.isNaN(a.getTime())?null:a.toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}catch{return null}}function EA(n,a){switch(n){case"five_hour":return"5h usage limit";case"seven_day":return"Weekly usage limit";case"seven_day_opus":return"Weekly usage (Opus)";case"seven_day_sonnet":return"Weekly usage (Sonnet)";case"seven_day_oauth_apps":return"Weekly usage (OAuth apps)";case"seven_day_cowork":return"Weekly usage (Cowork)";case"overage":return"Extra usage";default:return a}}function Ny(n){if(!n)return null;switch(n.trim().toLowerCase()){case"requests":return"Requests";case"input":return"Input tokens";case"output":return"Output tokens";default:return n.split(/[\s_-]+/g).map(a=>a.trim()).filter(a=>a.length>0).map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}}function OA(n){switch(n){case"Gemini Flash Lite Series":return"Flash Lite";case"Gemini Flash Series":return"Flash";case"Gemini Pro Series":return"Pro";default:return n}}function PA(n){const a=Array.from(new Set((n||[]).filter(Boolean)));return a.length>0?a.join(", "):null}function LA(n,a){if(n==null)return null;const o=n.toLocaleString();switch(a?.trim().toLowerCase()){case"requests":return`${o} requests remaining`;case"input":return`${o} input tokens remaining`;case"output":return`${o} output tokens remaining`;default:return`${o} remaining`}}function ky(n){if(!n)return null;const a=[];return n.rawTierLabel?a.push({label:"Tier",value:n.rawTierLabel}):n.normalizedTier!=="unknown"&&a.push({label:"Tier",value:n.normalizedTier}),n.rawTierId&&a.push({label:"Tier ID",value:n.rawTierId}),(n.accessState!=="entitled"||n.capacityState!=="available")&&a.push({label:"State",value:`${n.accessState.replaceAll("_"," ")} / ${n.capacityState.replaceAll("_"," ")}`}),a.length===0?null:a.map(o=>l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:"text-muted-foreground",children:o.label}),l.jsx("span",{className:"font-mono",children:o.value})]},o.label))}function Kd({quota:n,resetTime:a}){if(!n)return l.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading quota..."});if(!n.success){const o=hf(n),r=o?.tone==="destructive"?"text-destructive":o?.tone==="warning"?"text-amber-700 dark:text-amber-300":"text-foreground";return l.jsxs("div",{className:"max-w-sm space-y-2 text-xs",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:K("font-semibold tracking-tight",r),children:o?.label||n.error||"Failed to load quota"}),l.jsx("p",{className:"leading-relaxed text-foreground/90",children:o?.summary||n.error})]}),o?.actionHint&&l.jsx("div",{className:"rounded-md border border-border/70 bg-muted/35 px-2.5 py-2 text-foreground/80",children:o.actionHint}),o?.technicalDetail&&l.jsx("div",{className:"rounded-md border border-border/60 bg-muted/25 px-2 py-1.5 font-mono text-[11px] text-foreground/75",children:o.technicalDetail}),o?.rawDetail&&l.jsx("pre",{className:"max-h-56 overflow-auto whitespace-pre-wrap break-words rounded-md border border-border/70 bg-muted/55 px-2.5 py-2 font-mono text-[11px] leading-relaxed text-foreground/85",children:o.rawDetail})]})}if(uf(n)){const o=ck(n.models||[]),r=uk(o),c=["primary","gemini-3","gemini-2","other"];return l.jsxs("div",{className:"text-xs space-y-1.5",children:[ky(n.entitlement),l.jsx("p",{className:"font-medium",children:"Model Quotas:"}),c.map((d,f)=>{const m=r.get(d);if(!m||m.length===0)return null;const p=c.slice(0,f).every(g=>!r.get(g)?.length);return l.jsxs("div",{children:[!p&&l.jsx("div",{className:"my-1 border-t border-border/40"}),m.map(g=>l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:K("truncate",g.exhausted&&Si),children:g.displayName}),l.jsxs("span",{className:K("font-mono",g.exhausted&&Si),children:[g.percentage,"%"]})]},g.name))]},d)}),l.jsx(xl,{resetTime:a})]})}if(Bl(n)){const{fiveHourWindow:o,weeklyWindow:r,codeReviewWindows:c,unknownWindows:d}=Hl(n.windows),f=n.coreUsage?.fiveHour?.resetAt??o?.resetAt??null,m=n.coreUsage?.weekly?.resetAt??r?.resetAt??null,p=[o,r,...c,...d].filter(g=>!!g).filter((g,S,b)=>b.findIndex(x=>x.label===g.label&&x.resetAt===g.resetAt)===S);return l.jsxs("div",{className:"text-xs space-y-1.5",children:[l.jsx("p",{className:"font-medium",children:"Rate Limits:"}),n.planType&&l.jsxs("p",{className:"text-muted-foreground",children:["Plan: ",n.planType]}),p.map((g,S)=>l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:K(g.remainingPercent<20&&Si),children:fk(g,p)}),l.jsxs("span",{className:"font-mono",children:[g.remainingPercent,"%"]})]},`${g.label}-${g.resetAt??"no-reset"}-${S}`)),l.jsx(Ay,{fiveHourResetTime:f,weeklyResetTime:m,fallbackResetTime:a})]})}if(Kl(n)){const o=[n.coreUsage?.fiveHour,n.coreUsage?.weekly].filter(m=>!!m).map(m=>({rateLimitType:m.rateLimitType,label:m.label,remainingPercent:m.remainingPercent,resetAt:m.resetAt,status:m.status})),r=n.windows.map(m=>({rateLimitType:m.rateLimitType,label:m.label,remainingPercent:m.remainingPercent,resetAt:m.resetAt,status:m.status})),c=[...o,...r].filter((m,p,g)=>g.findIndex(S=>S.rateLimitType===m.rateLimitType&&S.resetAt===m.resetAt&&S.status===m.status)===p),d=n.coreUsage?.fiveHour?.resetAt??n.windows.find(m=>m.rateLimitType==="five_hour")?.resetAt??null,f=n.coreUsage?.weekly?.resetAt??n.windows.find(m=>["seven_day","seven_day_opus","seven_day_sonnet","seven_day_oauth_apps","seven_day_cowork"].includes(m.rateLimitType))?.resetAt??null;return l.jsxs("div",{className:"text-xs space-y-1.5",children:[l.jsx("p",{className:"font-medium",children:"Rate Limits:"}),c.map((m,p)=>l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:K(m.remainingPercent<20&&Si),children:EA(m.rateLimitType,m.label)}),l.jsxs("span",{className:"font-mono",children:[m.remainingPercent,"%"]})]},`${m.rateLimitType}-${m.resetAt??"no-reset"}-${m.status}-${p}`)),l.jsx(Ay,{fiveHourResetTime:d,weeklyResetTime:f,fallbackResetTime:a})]})}if(df(n)){const o=n.buckets.some(f=>!!f.resetTime),r=!!n.entitlement?.rawTierLabel||n.entitlement?.normalizedTier!=="unknown",c=Array.from(new Set(n.buckets.map(f=>Ny(f.tokenType)).filter(f=>!!f))),d=c.length===1?c[0]:null;return l.jsxs("div",{className:"text-xs space-y-1.5",children:[ky(n.entitlement),!r&&n.tierLabel&&l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:"text-muted-foreground",children:"Tier"}),l.jsx("span",{className:"font-mono",children:n.tierLabel})]}),n.creditBalance!==null&&n.creditBalance!==void 0&&l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:"text-muted-foreground",children:"Credits"}),l.jsx("span",{className:"font-mono",children:n.creditBalance.toLocaleString()})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"font-medium",children:"Model quotas:"}),d&&l.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["All buckets report ",d]})]}),n.buckets.map(f=>{const m=d?null:Ny(f.tokenType),p=PA(f.modelIds),g=LA(f.remainingAmount,f.tokenType);return l.jsxs("div",{className:"space-y-0.5",children:[l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsxs("div",{className:"min-w-0 space-y-0.5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:K(f.remainingPercent<20&&Si),children:OA(f.label)}),m&&l.jsx("span",{className:"rounded border border-border/60 px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:m})]}),p&&l.jsx("div",{className:"break-words text-[11px] text-muted-foreground",children:p})]}),l.jsxs("span",{className:"shrink-0 font-mono",children:[f.remainingPercent,"%"]})]}),(g||f.resetTime)&&l.jsxs("div",{className:"flex justify-between gap-4 text-[11px] text-muted-foreground",children:[l.jsx("span",{children:g??""}),l.jsx("span",{children:MA(f.resetTime)??""})]})]},f.id)}),!o&&l.jsx(xl,{resetTime:a})]})}if(ff(n)){const o=[{label:"Premium Interactions",snapshot:n.snapshots.premiumInteractions},{label:"Chat",snapshot:n.snapshots.chat},{label:"Completions",snapshot:n.snapshots.completions}],r=n.quotaResetDate??a,c=jA(n.planType);return l.jsxs("div",{className:"text-xs space-y-1.5",children:[l.jsx("p",{className:"font-medium",children:"Quota Snapshots:"}),c&&l.jsxs("p",{className:"text-muted-foreground",children:["Plan: ",c]}),o.map(({label:d,snapshot:f})=>{const m=f.percentRemaining<20;return l.jsxs("div",{className:"space-y-0.5",children:[l.jsxs("div",{className:"flex justify-between gap-4",children:[l.jsx("span",{className:K(m&&Si),children:d}),l.jsx("span",{className:K("font-mono",m&&Si),children:f.unlimited?"Unlimited":`${lf(f.percentRemaining)}%`})]}),!f.unlimited&&l.jsxs("div",{className:"text-[11px] text-muted-foreground",children:[f.remaining,"/",f.entitlement," remaining"]})]},d)}),l.jsx(xl,{resetTime:r})]})}return null}function xl({resetTime:n}){return n?l.jsxs("div",{className:"flex items-center gap-1.5 border-t border-border/60 pt-1",children:[l.jsx(No,{className:"h-3 w-3 text-sky-600 dark:text-sky-300"}),l.jsxs("span",{className:"font-medium text-sky-600 dark:text-sky-300",children:["Resets ",Id(n)]})]}):null}function Ay({fiveHourResetTime:n,weeklyResetTime:a,fallbackResetTime:o}){const r=!!n||!!a;return!r&&!o?null:l.jsxs("div",{className:"space-y-1 border-t border-border/60 pt-1",children:[n&&l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(No,{className:"h-3 w-3 text-sky-600 dark:text-sky-300"}),l.jsxs("span",{className:"font-medium text-sky-600 dark:text-sky-300",children:["5h resets ",Id(n)]})]}),a&&l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(No,{className:"h-3 w-3 text-indigo-600 dark:text-indigo-300"}),l.jsxs("span",{className:"font-medium text-indigo-600 dark:text-indigo-300",children:["Weekly resets ",Id(a)]})]}),!r&&o&&l.jsx(xl,{resetTime:o})]})}const qd=C.forwardRef(({className:n,value:a=0,max:o=100,indicatorClassName:r,...c},d)=>{const f=Math.min(Math.max(a/o*100,0),100);return l.jsx("div",{ref:d,role:"progressbar","aria-valuemin":0,"aria-valuemax":o,"aria-valuenow":a,className:K("relative h-2 w-full overflow-hidden rounded-full bg-secondary",n),...c,children:l.jsx("div",{className:K("h-full transition-all",r||"bg-primary"),style:{width:`${f}%`}})})});qd.displayName="Progress";function Dy(n){const a=Math.max(0,Math.min(100,n));return a<=20?"bg-destructive":a<=50?"bg-yellow-500":"bg-green-500"}function Ty(n){if(!n)return"";try{const a=new Date(n),o=Date.now()-a.getTime();if(o<0)return"just now";const r=Math.floor(o/(1e3*60)),c=Math.floor(o/(1e3*60*60)),d=Math.floor(o/(1e3*60*60*24));return d>0?`${d}d ago`:c>0?`${c}h ago`:r>0?`${r}m ago`:"just now"}catch{return""}}function RA(n){if(!n)return!1;try{return Date.now()-new Date(n).getTime()<3600*1e3}catch{return!1}}function _A({provider:n,quota:a,quotaLoading:o,runtimeLastUsed:r,mode:c,className:d}){const{t:f}=Et(),m=n.toLowerCase(),p=m==="codex",g=m==="claude"||m==="anthropic",S=cx(n,a),b=ux(n,a),x=S!==null?lf(S):null,j=x!==null?Number(x):null,N=hf(a),E=N?.label==="Reauth"?ef:N?.tone==="warning"?Gn:Bs,L=p&&a&&Bl(a)?Hl(a.windows):null,D=(p?[{label:"5h",value:L?.fiveHourWindow?.remainingPercent??null},{label:c==="compact"?"Wk":"Weekly",value:L?.weeklyWindow?.remainingPercent??null}]:g&&a&&Kl(a)?[{label:"5h",value:a.coreUsage?.fiveHour?.remainingPercent??a.windows.find(k=>k.rateLimitType==="five_hour")?.remainingPercent??null},{label:c==="compact"?"Wk":"Weekly",value:a.coreUsage?.weekly?.remainingPercent??a.windows.find(k=>["seven_day","seven_day_opus","seven_day_sonnet","seven_day_oauth_apps","seven_day_cowork"].includes(k.rateLimitType))?.remainingPercent??null}]:[]).filter(k=>k.value!==null);if(o)return l.jsxs("div",{className:K("flex items-center gap-1.5 text-xs text-muted-foreground",d),children:[l.jsx(kn,{className:"w-3 h-3 animate-spin"}),l.jsx("span",{children:c==="compact"?f("accountCard.quotaLoading"):"Loading quota..."})]});if(j!==null)return l.jsx("div",{className:K(c==="compact"?"px-0.5":"",d),children:l.jsx(ji,{children:l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:c==="compact"?l.jsxs("div",{className:"space-y-0.5 cursor-help",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-[8px] text-muted-foreground/70 uppercase font-bold tracking-tight",children:f("accountCard.quota")}),l.jsxs("span",{className:K("text-[10px] font-mono font-bold",j>50?"text-emerald-600 dark:text-emerald-400":j>20?"text-amber-500":"text-red-500"),children:[x,"%"]})]}),D.length>0&&l.jsx("div",{className:"flex items-center justify-between text-[7px] text-muted-foreground/70",children:D.map(k=>l.jsxs("span",{children:[k.label," ",k.value,"%"]},k.label))}),l.jsx("div",{className:"w-full bg-muted dark:bg-zinc-800/50 h-1 rounded-full overflow-hidden",children:l.jsx("div",{className:K("h-full rounded-full transition-all",j>50?"bg-emerald-500":j>20?"bg-amber-500":"bg-red-500"),style:{width:`${j}%`}})})]}):l.jsxs("div",{className:"space-y-1.5 cursor-help",children:[l.jsx("div",{className:"flex items-center gap-1.5 text-xs",children:RA(r)?l.jsxs(l.Fragment,{children:[l.jsx($s,{className:"w-3 h-3 text-emerald-500"}),l.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400",children:["Active · ",Ty(r)]})]}):r?l.jsxs(l.Fragment,{children:[l.jsx(No,{className:"w-3 h-3 text-muted-foreground"}),l.jsxs("span",{className:"text-muted-foreground",children:["Last used ",Ty(r)]})]}):l.jsxs(l.Fragment,{children:[l.jsx(Hg,{className:"w-3 h-3 text-muted-foreground"}),l.jsx("span",{className:"text-muted-foreground",children:"Not used yet"})]})}),D.length>0?l.jsx("div",{className:"space-y-1.5",children:D.map(k=>l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"w-10 text-[10px] text-muted-foreground",children:k.label}),l.jsx(qd,{value:Math.max(0,Math.min(100,k.value)),className:"h-2 flex-1",indicatorClassName:Dy(k.value)}),l.jsxs("span",{className:"text-xs font-medium w-10 text-right",children:[k.value,"%"]})]},k.label))}):l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(qd,{value:Math.max(0,Math.min(100,j)),className:"h-2 flex-1",indicatorClassName:Dy(j)}),l.jsxs("span",{className:"text-xs font-medium w-10 text-right",children:[x,"%"]})]})]})}),l.jsx(Na,{side:c==="compact"?"top":"bottom",className:"sm:max-w-sm",children:l.jsx(Kd,{quota:a,resetTime:b})})]})})});if(a?.success)return c==="compact"?l.jsx("div",{className:K("text-[8px] text-muted-foreground/60",d),children:f("accountCard.quotaUnavailable")}):l.jsx("div",{className:d,children:l.jsxs(Ut,{variant:"outline",className:"text-[10px] h-5 px-2 gap-1 border-muted-foreground/50 text-muted-foreground",children:[l.jsx(Hg,{className:"w-3 h-3"}),f("accountCard.quotaUnavailable")]})});if(!N)return null;const A=N.tone==="warning"?"text-amber-600 dark:text-amber-400 border-amber-500/50":N.tone==="destructive"?"text-destructive border-destructive/50":"text-muted-foreground/70 border-muted-foreground/50";return l.jsx(ji,{children:l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:c==="compact"?l.jsxs("div",{className:K("flex items-center gap-1 text-[8px]",A,d),children:[l.jsx(E,{className:"w-2.5 h-2.5"}),l.jsx("span",{children:N.label})]}):l.jsx("div",{className:d,children:l.jsxs(Ut,{variant:"outline",className:K("text-[10px] h-5 px-2 gap-1",A),children:[l.jsx(E,{className:"w-3 h-3"}),N.label]})})}),l.jsx(Na,{side:c==="compact"?"top":"bottom",className:"sm:max-w-sm",children:l.jsx(Kd,{quota:a,resetTime:b})})]})})}function zA(n){return n==="business"?"bg-sky-500/12 text-sky-700 dark:text-sky-300":n==="personal"?"bg-emerald-500/12 text-emerald-700 dark:text-emerald-300":"bg-muted text-muted-foreground"}function IA(n){return n==="ultra"?"bg-violet-500/15 text-violet-600 dark:bg-violet-500/25 dark:text-violet-300":"bg-yellow-500/15 text-yellow-700 dark:bg-yellow-500/20 dark:text-yellow-400"}function UA(n){return n==="business"?"Biz":n==="personal"?"Pers":"?"}function HA(n,a){if(a&&"entitlement"in a){const o=a.entitlement?.normalizedTier;if(o&&o!=="unknown")return o}return n}function BA({mode:n,provider:a,accountId:o,email:r,displayEmail:c,tokenFile:d,tier:f,isDefault:m,paused:p,privacyMode:g,showQuota:S,quota:b,quotaLoading:x,runtimeLastUsed:j,beforeIdentity:N,headerEnd:E,compactMetaBadges:L,bodySlot:O,footerSlot:D,quotaInsetClassName:A,className:k}){const T=Af(o,r,d),w=c||T.email||o,R=a.toLowerCase(),I=HA(f,b),z=(R==="agy"||R==="antigravity"||R==="gemini")&&I&&I!=="unknown"&&I!=="free",F=n==="compact",ee=l.jsxs(l.Fragment,{children:[z&&l.jsx("span",{className:K("text-[8px] font-semibold px-1.5 py-0.5 rounded-md shrink-0",IA(I)),children:I}),T.audienceLabel&&l.jsx("span",{title:T.audienceLabel,className:K("text-[8px] font-semibold px-1.5 py-0.5 rounded-md shrink-0",T.audience==="business"?"bg-sky-500/15 text-sky-700 dark:bg-sky-500/25 dark:text-sky-300":"bg-emerald-500/15 text-emerald-700 dark:bg-emerald-500/25 dark:text-emerald-300"),children:UA(T.audience)}),p&&l.jsx("span",{className:"text-[8px] font-semibold px-1.5 py-0.5 rounded-md shrink-0 bg-amber-500/15 text-amber-700 dark:bg-amber-500/25 dark:text-amber-300",children:"Paused"})]});return l.jsxs("div",{className:K("flex flex-col gap-2",k),children:[l.jsxs("div",{className:"flex items-start justify-between gap-2",children:[l.jsxs("div",{className:K("flex min-w-0 flex-1",F?"gap-2":"gap-3"),children:[N,!F&&l.jsxs("div",{className:"relative shrink-0",children:[l.jsx("div",{className:K("flex items-center justify-center w-8 h-8 rounded-full",m?"bg-primary/10":"bg-muted"),children:l.jsx(qb,{className:"w-4 h-4"})}),z&&l.jsx("span",{className:K("absolute -bottom-0.5 -right-0.5 text-[7px] font-bold uppercase px-1 py-px rounded ring-1 ring-background",I==="ultra"?"bg-violet-500/20 text-violet-600 dark:bg-violet-500/30 dark:text-violet-300":"bg-yellow-500/20 text-yellow-700 dark:bg-yellow-500/25 dark:text-yellow-400"),children:I==="ultra"?"U":"P"})]}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:K("flex items-center min-w-0",F?"gap-1.5":"gap-2 flex-wrap"),children:[l.jsx("span",{title:w,className:K(F?"flex-1 min-w-0 text-xs font-semibold tracking-tight truncate leading-none":"font-medium text-sm truncate",g&&sx),children:w}),F&&(L??ee),!F&&T.audienceLabel&&l.jsx(Ut,{variant:"outline",className:K("text-[10px] h-4 px-1.5 border-transparent",zA(T.audience)),children:T.audienceLabel}),!F&&T.detailLabel&&l.jsx(Ut,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:T.detailLabel}),!F&&m&&l.jsxs(Ut,{variant:"secondary",className:"text-[10px] h-4 px-1.5 gap-0.5",children:[l.jsx(KS,{className:"w-2.5 h-2.5 fill-current"}),"Default"]}),!F&&p&&l.jsxs(Ut,{variant:"outline",className:"text-[10px] h-4 px-1.5 border-yellow-500 text-yellow-600",children:[l.jsx(Gb,{className:"w-2 h-2 mr-0.5"}),"Paused"]})]}),O&&l.jsx("div",{className:"mt-1",children:O})]})]}),E&&l.jsx("div",{className:K("flex items-center shrink-0",F?"gap-0.5":"gap-1"),children:E})]}),D,S&&l.jsx(_A,{provider:a,quota:b,quotaLoading:x,runtimeLastUsed:j,mode:n,className:A})]})}async function KA(){const n=await fetch("/api/cliproxy/stats");if(!n.ok){const a=await n.json();throw new Error(a.message||"Failed to fetch stats")}return n.json()}async function qA(){const n=await fetch("/api/cliproxy/status");if(!n.ok)throw new Error("Failed to fetch status");return n.json()}function FA(){return kt({queryKey:["cliproxy-status"],queryFn:qA,refetchInterval:1e4,retry:1})}function GA(n=!0){return kt({queryKey:["cliproxy-stats"],queryFn:KA,enabled:n,refetchInterval:5e3,retry:1,staleTime:3e3})}async function VA(){const n=await fetch("/api/cliproxy/error-logs");if(!n.ok){const o=await n.json();throw new Error(o.message||"Failed to fetch error logs")}return(await n.json()).files??[]}async function YA(n){const a=await fetch(`/api/cliproxy/error-logs/${encodeURIComponent(n)}`);if(!a.ok)throw new Error("Failed to fetch error log content");return a.text()}function $A(n=!0){return kt({queryKey:["cliproxy-error-logs"],queryFn:VA,enabled:n,refetchInterval:3e4,retry:1,staleTime:1e4})}function WA(n){return kt({queryKey:["cliproxy-error-log-content",n],queryFn:()=>n?YA(n):Promise.resolve(""),enabled:!!n,staleTime:6e4})}const vx=["agy","codex","claude","gemini","ghcp"],QA={antigravity:"agy",anthropic:"claude","gemini-cli":"gemini",copilot:"ghcp","github-copilot":"ghcp"};function Cx(n){const a=n.trim().toLowerCase();return a?vx.includes(a)?a:QA[a]??null:null}async function jy(n,a){const o=await fetch(`/api/cliproxy/quota/${n}/${encodeURIComponent(a)}`);if(!o.ok){let r="Failed to fetch quota";try{r=(await o.json()).message||r}catch{}throw new Error(r)}return o.json()}async function XA(n){const a=await fetch(`/api/cliproxy/quota/codex/${encodeURIComponent(n)}`);if(!a.ok){let o="Failed to fetch Codex quota";try{o=(await a.json()).message||o}catch{}throw new Error(o)}return a.json()}async function ZA(n){const a=await fetch(`/api/cliproxy/quota/claude/${encodeURIComponent(n)}`);if(!a.ok){let o="Failed to fetch Claude quota";try{o=(await a.json()).message||o}catch{}throw new Error(o)}return a.json()}async function JA(n){const a=await fetch(`/api/cliproxy/quota/gemini/${encodeURIComponent(n)}`);if(!a.ok){let o="Failed to fetch Gemini quota";try{o=(await a.json()).message||o}catch{}throw new Error(o)}return a.json()}async function eD(n){const a=await fetch(`/api/cliproxy/quota/ghcp/${encodeURIComponent(n)}`);if(!a.ok){let o="Failed to fetch GitHub Copilot quota";try{o=(await a.json()).message||o}catch{}throw new Error(o)}return a.json()}function Sx(n,a,o=!0){const r=Cx(n);return{queryKey:["account-quota",r??n,a],queryFn:()=>tD(r??n,a),enabled:o&&!!r&&!!a,staleTime:6e4,refetchInterval:6e4,refetchOnWindowFocus:!1,refetchOnMount:!1,retry:1}}async function tD(n,a){const o=Cx(n);if(!o)return jy(n,a);switch(o){case"codex":return XA(a);case"claude":return ZA(a);case"gemini":return JA(a);case"ghcp":return eD(a);default:return jy(n,a)}}function nD(n,a,o=!0){return kt(Sx(n,a,o))}function aD(n,a=!0){return AS({queries:n.map(o=>Sx(o.provider,o.accountId,a))})}function iD({success:n,failure:a,showDetails:o}){const r=n+a,c=r>0?n/r*100:100;return l.jsxs("div",{className:"mt-2 space-y-2",children:[l.jsxs("div",{className:"flex items-end justify-between px-0.5",children:[l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-[8px] text-muted-foreground/70 uppercase font-bold tracking-tight",children:"Success Rate"}),l.jsxs("span",{className:K("text-sm font-mono font-bold leading-none mt-0.5",c===100?"text-emerald-600 dark:text-emerald-400":c>=90?"text-amber-500":"text-red-500"),children:[Math.round(c),"%"]})]}),l.jsxs("div",{className:"flex flex-col items-end",children:[l.jsx("span",{className:"text-[8px] text-muted-foreground/70 uppercase font-bold tracking-tight",children:"Volume"}),l.jsx("span",{className:"text-xs font-mono font-medium text-foreground/80 leading-none mt-0.5",children:r.toLocaleString()})]})]}),l.jsxs("div",{className:K("grid grid-cols-2 gap-2 overflow-hidden transition-all duration-300 ease-in-out",o?"max-h-20 opacity-100 mt-2":"max-h-0 opacity-0 mt-0"),children:[l.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-1 rounded-md bg-emerald-500/5 dark:bg-emerald-500/10 border border-emerald-500/10",children:[l.jsx($s,{className:"w-2.5 h-2.5 text-emerald-600 dark:text-emerald-400"}),l.jsx("span",{className:"text-[10px] font-mono font-bold text-emerald-600 dark:text-emerald-400",children:n})]}),l.jsxs("div",{className:K("flex items-center gap-1.5 px-1.5 py-1 rounded-md border",a>0?"bg-red-500/5 dark:bg-red-500/10 border-red-500/20":"bg-muted/10 border-transparent opacity-40"),children:[l.jsx(nf,{className:K("w-2.5 h-2.5",a>0?"text-red-500":"text-muted-foreground")}),l.jsx("span",{className:K("text-[10px] font-mono font-bold",a>0?"text-red-500":"text-muted-foreground"),children:a})]})]})]})}const oD=["antigravity","anthropic","gemini-cli","copilot","github-copilot"],sD={left:"border-l-2",right:"border-r-2",top:"border-t-2",bottom:"border-b-2"},rD={left:"top-1/2 -right-1.5 -translate-y-1/2",right:"top-1/2 -left-1.5 -translate-y-1/2",top:"left-1/2 -bottom-1.5 -translate-x-1/2",bottom:"left-1/2 -top-1.5 -translate-x-1/2"};function lD(n,a){switch(n){case"left":return{borderLeftColor:a};case"right":return{borderRightColor:a};case"top":return{borderTopColor:a};case"bottom":return{borderBottomColor:a}}}function cD(n){return n>50?"bg-emerald-500":n>20?"bg-amber-500":"bg-red-500"}function wx(n,a){return n==="business"?"Biz":n==="personal"?"Pers":a?.trim()?.[0]?.toUpperCase()??"?"}function uD(n){const a=new Set(n.map(o=>o.audience));if(a.size===2&&a.has("business")&&a.has("personal"))return"B|P";if(n.length===1){const[o]=n;return wx(o.audience,o.audienceLabel??o.detailLabel??null)}return null}function dD({account:n,zone:a,originalIndex:o,isHovered:r,isDragging:c,offset:d,showDetails:f,privacyMode:m,onMouseEnter:p,onMouseLeave:g,onPointerDown:S,onPointerMove:b,onPointerUp:x,onPauseToggle:j,isPausingAccount:N}){const{t:E}=Et(),L=sD[a],O=lD(a,n.color),D=rD[a],A=n.provider.toLowerCase(),k=vx.includes(A)||oD.includes(A),T=(n.variants?.length??0)>1,{data:w,isLoading:R}=nD(A,n.id,k&&!T),I=aD((n.variants??[]).map(te=>({provider:n.provider,accountId:te.id})),k&&T),z=T?Array.from(new Map((n.variants??[]).slice().sort((te,ve)=>{const U={business:0,personal:1,unknown:2};return U[te.audience]-U[ve.audience]}).map(te=>[te.audienceLabel??te.detailLabel??te.id,te])).values()):[],F=uD(z),ee=T?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"inline-flex shrink-0 items-center overflow-hidden rounded-md border border-border/60 bg-muted/60 shadow-sm shadow-black/5 dark:bg-zinc-900/80",title:z.map(te=>te.audienceLabel??te.detailLabel??"Variant").join(" • "),children:F?l.jsx("span",{className:"inline-flex min-w-[2.2rem] items-center justify-center px-1.5 py-1 text-[9px] font-semibold leading-none text-foreground/80",children:F}):z.map((te,ve)=>l.jsx("span",{className:K("inline-flex min-w-[1.9rem] items-center justify-center px-1.5 py-1 text-[9px] font-semibold leading-none",ve>0&&"border-l border-border/50",te.audience==="business"?"bg-sky-500/12 text-sky-700 dark:bg-sky-500/20 dark:text-sky-300":te.audience==="personal"?"bg-emerald-500/12 text-emerald-700 dark:bg-emerald-500/20 dark:text-emerald-300":"bg-muted text-muted-foreground"),children:wx(te.audience,te.audienceLabel??te.detailLabel??null)},te.id))}),n.paused&&l.jsx("span",{className:"text-[7px] font-bold uppercase tracking-wide px-1 py-px rounded shrink-0 bg-amber-500/15 text-amber-700 dark:bg-amber-500/25 dark:text-amber-300",children:"Paused"})]}):void 0,Q=T&&k?(n.variants??[]).map((te,ve)=>{const U=I[ve],Z=U?.data,ne=cx(n.provider,Z),$=ux(n.provider,Z),oe=ne!==null?lf(ne):null,ue=oe!==null?Number(oe):null,he=hf(Z),X=te.audienceLabel??te.detailLabel??Bd(te.email);return l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsxs("div",{className:"space-y-0.5 cursor-help",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 text-[8px]",children:[l.jsx("span",{className:"text-muted-foreground/80 truncate",children:X}),l.jsx("span",{className:"font-mono text-foreground/80 shrink-0",children:U?.isLoading?E("accountCard.quotaLoading"):ue!==null?`${oe}%`:he?.label||E("accountCard.quotaUnavailable")})]}),ue!==null&&l.jsx("div",{className:"w-full bg-muted dark:bg-zinc-800/50 h-1 rounded-full overflow-hidden",children:l.jsx("div",{className:K("h-full rounded-full transition-all",cD(ue)),style:{width:`${ue}%`}})})]})}),l.jsx(Na,{side:"top",className:"sm:max-w-sm",children:l.jsx(Kd,{quota:Z,resetTime:$})})]},te.id)}):null,ge=l.jsxs(l.Fragment,{children:[j&&l.jsx(ji,{children:l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsx(ot,{variant:"ghost",size:"icon",className:K("h-4 w-4 shrink-0 transition-all rounded-full",n.paused?"bg-amber-500/20 hover:bg-amber-500/30":"hover:bg-muted"),onClick:te=>{te.stopPropagation(),j(n.memberIds??[n.id],!n.paused)},disabled:N,children:N?l.jsx(kn,{className:"w-2.5 h-2.5 animate-spin"}):n.paused?l.jsx(qS,{className:"w-2.5 h-2.5 text-amber-600 dark:text-amber-400"}):l.jsx(Gb,{className:"w-2.5 h-2.5 text-muted-foreground/50 hover:text-foreground"})})}),l.jsx(Na,{side:"top",className:"text-xs",children:n.paused?E("accountCard.resumeAccount"):E("accountCard.pauseAccount")})]})}),l.jsx(Ll,{className:"w-4 h-4 text-muted-foreground/40 shrink-0"})]});return l.jsxs("div",{"data-account-index":o,"data-zone":a,onMouseEnter:p,onMouseLeave:g,onPointerDown:S,onPointerMove:b,onPointerUp:x,onPointerCancel:x,className:K("group/card relative rounded-lg p-3 w-44 cursor-grab transition-shadow duration-200","bg-muted/30 dark:bg-zinc-900/60 backdrop-blur-sm","border border-border/50 dark:border-white/[0.08]",L,"select-none touch-none",r&&"bg-muted/50 dark:bg-zinc-800/60",c&&"cursor-grabbing shadow-xl scale-105 z-50",n.paused&&"opacity-60"),style:{...O,transform:`translate(${d.x}px, ${d.y}px)${c?" scale(1.05)":""}`},children:[l.jsx(BA,{mode:"compact",provider:n.provider,accountId:n.id,email:n.email,displayEmail:Bd(n.email),tokenFile:n.tokenFile,tier:n.tier,isDefault:n.isDefault,paused:n.paused,privacyMode:m,showQuota:k&&!T,quota:w,quotaLoading:R,runtimeLastUsed:n.lastUsedAt,headerEnd:ge,compactMetaBadges:ee,footerSlot:l.jsxs(l.Fragment,{children:[l.jsx(iD,{success:n.successCount,failure:n.failureCount,showDetails:f}),Q&&l.jsx("div",{className:"mt-2 px-0.5 space-y-1",children:Q})]})}),l.jsx("div",{className:K("absolute w-3 h-3 rounded-full transform z-20 transition-colors border","bg-muted dark:bg-zinc-800 border-border dark:border-zinc-600",D,r&&"bg-foreground dark:bg-white border-transparent")})]})}function Df({provider:n,className:a,size:o=18,withBackground:r=!1}){const c=n.toLowerCase(),d=mx(n),f=Sf[c]||"#6b7280",m=r?Math.floor(o*.65):o,p=d?l.jsx("img",{src:d,alt:`${n} icon`,width:m,height:m,className:"shrink-0 object-contain"}):l.jsx("span",{className:"font-bold",style:{color:f,fontSize:m*.6},children:n.charAt(0).toUpperCase()});if(r)return l.jsx("div",{className:K("shrink-0 rounded-full bg-white border border-border flex items-center justify-center shadow-sm",a),style:{width:o,height:o},children:p});if(d)return l.jsx("img",{src:d,alt:`${n} icon`,width:o,height:o,className:K("shrink-0 rounded-sm object-contain",a)});const g=f;return l.jsx("div",{className:K("shrink-0 rounded-full flex items-center justify-center text-white font-bold",a),style:{width:o,height:o,backgroundColor:g,fontSize:o*.5},children:n.charAt(0).toUpperCase()})}function fD({providerData:n,providerColor:a,totalRequests:o,maxRequests:r,showVisibleMetrics:c=!1,hiddenPausedCount:d=0,isDragging:f,offset:m,hoveredAccount:p,hasRightAccounts:g,hasTopAccounts:S,hasBottomAccounts:b,onPointerDown:x,onPointerMove:j,onPointerUp:N}){const{t:E}=Et(),{accounts:L}=n,O=Math.max(1,r*Math.max(1,L.length));return l.jsxs("div",{"data-provider-node":!0,onPointerDown:x,onPointerMove:j,onPointerUp:N,onPointerCancel:N,className:K("group relative w-full rounded-xl p-4 cursor-grab transition-shadow duration-200","bg-muted/30 dark:bg-zinc-900/60 backdrop-blur-sm","border-2 border-border/50 dark:border-white/[0.08]",!f&&"animate-subtle-float animate-border-glow","select-none touch-none",p!==null&&"scale-[1.02]",f&&"cursor-grabbing shadow-2xl scale-105 z-50"),style:{"--glow-color":`${a}60`,borderColor:p!==null?`${a}80`:void 0,transform:`translate(${m.x}px, ${m.y}px)${f?" scale(1.05)":""}`},children:[l.jsx(Ll,{className:"absolute top-2 right-2 w-4 h-4 text-muted-foreground/40"}),l.jsx("div",{className:"absolute inset-0 rounded-xl animate-glow-pulse pointer-events-none",style:{"--glow-color":`${a}30`}}),l.jsx("div",{className:"absolute top-1/2 -left-1.5 w-3 h-3 rounded-full transform -translate-y-1/2",style:{backgroundColor:a,boxShadow:"0 0 0 4px var(--background)"}}),g&&l.jsx("div",{className:"absolute top-1/2 -right-1.5 w-3 h-3 rounded-full transform -translate-y-1/2",style:{backgroundColor:a,boxShadow:"0 0 0 4px var(--background)"}}),S&&l.jsx("div",{className:"absolute left-1/2 -top-1.5 w-3 h-3 rounded-full transform -translate-x-1/2",style:{backgroundColor:a,boxShadow:"0 0 0 4px var(--background)"}}),b&&l.jsx("div",{className:"absolute left-1/2 -bottom-1.5 w-3 h-3 rounded-full transform -translate-x-1/2",style:{backgroundColor:a,boxShadow:"0 0 0 4px var(--background)"}}),l.jsxs("div",{className:"flex items-center gap-3 mb-4 relative z-10",children:[l.jsx("div",{className:"animate-icon-breathe",children:l.jsx(Df,{provider:n.provider,size:36,withBackground:!0})}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground tracking-tight",children:n.displayName}),l.jsx("p",{className:"text-[10px] text-muted-foreground font-medium uppercase",children:E("flowViz.provider")})]})]}),l.jsxs("div",{className:"space-y-2 relative z-10",children:[l.jsxs("div",{className:"flex justify-between items-center text-xs",children:[l.jsx("span",{className:"text-muted-foreground",children:E(c?"flowViz.visibleTotalRequests":"flowViz.totalRequests")}),l.jsx("span",{className:"text-foreground font-mono",children:o.toLocaleString()})]}),l.jsxs("div",{className:"flex justify-between items-center text-xs",children:[l.jsx("span",{className:"text-muted-foreground",children:E(c?"flowViz.visibleAccounts":"flowViz.accounts")}),l.jsx("span",{className:"text-foreground font-mono",children:L.length})]}),l.jsx("div",{className:"w-full bg-muted dark:bg-zinc-800/50 h-1 rounded-full mt-2 overflow-hidden",children:l.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${Math.min(100,o/O*100)}%`,backgroundColor:a}})}),c&&d>0&&l.jsx("div",{className:"text-[10px] text-muted-foreground",children:E("flowViz.excludingPausedAccounts",{count:d})})]})]})}function hD({paths:n,accounts:a,maxRequests:o,hoveredAccount:r,pulsingAccounts:c}){return l.jsxs(l.Fragment,{children:[l.jsx("defs",{children:l.jsxs("filter",{id:"flow-glow",x:"-20%",y:"-20%",width:"140%",height:"140%",filterUnits:"userSpaceOnUse",children:[l.jsx("feGaussianBlur",{stdDeviation:"3",result:"blur"}),l.jsx("feComposite",{in:"SourceGraphic",in2:"blur",operator:"over"})]})}),n.map((d,f)=>{const m=a[f];if(!m)return null;const p=m.successCount+m.failureCount,g=Math.max(2,p/o*10),S=r===f,b=r!==null&&r!==f,x=c.has(m.id),j=fA(f);return l.jsxs("g",{children:[l.jsx("path",{d,fill:"none",stroke:j,strokeWidth:g,strokeOpacity:S?.8:b?.15:.4,strokeLinecap:"round",filter:S?"url(#flow-glow)":void 0,className:"transition-all duration-300"}),x&&l.jsxs(l.Fragment,{children:[l.jsx("path",{d,fill:"none",stroke:m.color,strokeWidth:g*2,strokeLinecap:"round",filter:"url(#flow-glow)",className:"animate-request-pulse"}),l.jsx("circle",{r:6,fill:m.color,filter:"url(#flow-glow)",style:{offsetPath:`path('${d}')`,offsetDistance:"0%",animation:"travel-dot 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards"}})]})]},f)})]})}function mD({onBack:n,showDetails:a,onToggleDetails:o,showPausedAccounts:r,pausedAccountsCount:c,onTogglePausedAccounts:d,hasCustomPositions:f,onResetPositions:m}){const{t:p}=Et();return l.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5",children:[n?l.jsxs("button",{onClick:n,className:"group flex items-center gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground transition-all duration-200 px-3 py-1.5 rounded-md hover:bg-muted/50 border border-transparent hover:border-border/50",children:[l.jsx(Ol,{className:"w-3.5 h-3.5 rotate-180 transition-transform group-hover:-translate-x-0.5"}),l.jsx("span",{children:p("flowViz.backToProviders")})]}):l.jsx("div",{}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("button",{onClick:o,className:K("flex items-center gap-1.5 text-xs font-medium transition-all duration-200 px-3 py-1.5 rounded-md border shadow-sm",a?"bg-primary text-primary-foreground border-primary hover:bg-primary/90":"bg-background text-muted-foreground hover:text-foreground border-border/60 hover:border-border hover:bg-muted/50"),children:[a?l.jsx(Vs,{className:"w-3.5 h-3.5"}):l.jsx(Ys,{className:"w-3.5 h-3.5"}),l.jsx("span",{children:p(a?"flowViz.hideDetails":"flowViz.showDetails")})]}),c>0&&l.jsxs("button",{onClick:d,className:K("flex items-center gap-1.5 text-xs font-medium transition-all duration-200 px-3 py-1.5 rounded-md border shadow-sm",r?"bg-background text-muted-foreground hover:text-foreground border-border/60 hover:border-border hover:bg-muted/50":"bg-amber-500/15 text-amber-700 border-amber-500/40 hover:bg-amber-500/20 dark:bg-amber-500/20 dark:text-amber-300 dark:border-amber-500/30"),children:[l.jsx(FS,{className:"w-3.5 h-3.5"}),l.jsx("span",{children:r?p("flowViz.hidePausedAccounts",{count:c}):p("flowViz.showPausedAccounts",{count:c})})]}),f&&l.jsxs("button",{onClick:m,className:"flex items-center gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground transition-all duration-200 px-3 py-1.5 rounded-md border border-border/60 hover:border-border bg-background hover:bg-muted/50 shadow-sm",children:[l.jsx(GS,{className:"w-3.5 h-3.5"}),l.jsx("span",{children:p("flowViz.resetLayout")})]})]})]})}const My="ccs-auth-monitor-show-paused";function pD({providerData:n,onBack:a,onPauseToggle:o,isPausingAccount:r}){const c=C.useRef(null),d=C.useRef(null),[f,m]=C.useState(null),[p,g]=C.useState(!1),[S,b]=C.useState(()=>{if(typeof window<"u"){const Ce=localStorage.getItem(My);return Ce!==null?Ce==="true":!0}return!0}),[x,j]=C.useState([]),{privacyMode:N}=sf(),{accounts:E}=n,L=C.useMemo(()=>E.filter(Ce=>Ce.paused).length,[E]),O=C.useMemo(()=>S?E:E.filter(Ce=>!Ce.paused),[E,S]),D=C.useMemo(()=>new Set(O.map(Ce=>Ce.id)),[O]),A=Math.max(...O.map(Ce=>Ce.successCount+Ce.failureCount),1),k=O.reduce((Ce,Oe)=>Ce+Oe.successCount+Oe.failureCount,0),T=C.useMemo(()=>({...n,accounts:O,totalRequests:k}),[n,O,k]),w=C.useCallback(()=>{const Ce=pA({containerRef:c,svgRef:d,accounts:O});j(Ce)},[O]),R=`ccs-flow-positions-${n.provider}`,{dragOffsets:I,draggingId:z,handlePointerDown:F,handlePointerMove:ee,handlePointerUp:Q,getOffset:ge,resetPositions:te,hasCustomPositions:ve}=bA({storageKey:R,onDrag:w}),U=C.useMemo(()=>Object.fromEntries(Object.entries(I).filter(([Ce])=>Ce==="provider"||D.has(Ce))),[I,D]),Z=xA(U),ne=Object.keys(U).length>0,$=vA(O),oe=C.useMemo(()=>mA(O).slice(0,dA),[O]);C.useEffect(()=>{const Ce=setTimeout(w,50);return window.addEventListener("resize",w),()=>{clearTimeout(Ce),window.removeEventListener("resize",w)}},[w]),C.useEffect(()=>{const Ce=setTimeout(w,10);return()=>clearTimeout(Ce)},[I,w]),C.useEffect(()=>{const Ce=Date.now(),Oe=350,Ge=()=>{w(),Date.now()-Ce<Oe&&requestAnimationFrame(Ge)};requestAnimationFrame(Ge)},[p,w]);const ue=Sf[n.provider.toLowerCase()]||"#6b7280",he=C.useMemo(()=>gA(O),[O]),{leftAccounts:X,rightAccounts:ae,topAccounts:de,bottomAccounts:ie}=he,re=ae.length>0,ye=de.length>0,De=ie.length>0,ze=C.useMemo(()=>yA(O.length),[O.length]),Xe=(Ce,Oe)=>Ce.map(Ge=>{const Dt=O.findIndex(Ot=>Ot.id===Ge.id);return l.jsx(dD,{account:Ge,zone:Oe,originalIndex:Dt,isHovered:f===Dt,isDragging:z===Ge.id,offset:ge(Ge.id),showDetails:p,privacyMode:N,onMouseEnter:()=>m(Dt),onMouseLeave:()=>m(null),onPointerDown:Ot=>F(Ge.id,Ot),onPointerMove:ee,onPointerUp:Q,onPauseToggle:o,isPausingAccount:r},Ge.id)});return l.jsxs("div",{className:"flex flex-col",ref:c,children:[l.jsx(mD,{onBack:a,showDetails:p,onToggleDetails:()=>g(!p),showPausedAccounts:S,pausedAccountsCount:L,onTogglePausedAccounts:()=>{m(null);const Ce=!S;b(Ce),typeof window<"u"&&localStorage.setItem(My,String(Ce))},hasCustomPositions:ve&&ne,onResetPositions:te}),l.jsxs("div",{className:"min-h-[320px] flex gap-4 px-4 py-6 self-stretch items-stretch transition-all duration-200",children:[l.jsxs("div",{className:"relative flex-1 flex flex-col items-stretch justify-center px-4",style:{paddingTop:`${24+Z.paddingTop}px`,paddingBottom:`${24+Z.paddingBottom}px`,minHeight:`${320+Z.extraHeight}px`},children:[l.jsx("svg",{ref:d,className:"absolute inset-0 w-full h-full pointer-events-none z-0 overflow-visible",children:l.jsx(hD,{paths:x,accounts:O,maxRequests:A,hoveredAccount:f,pulsingAccounts:$})}),ye&&l.jsx("div",{className:"flex flex-row gap-3 z-10 justify-center flex-wrap mb-8",children:Xe(de,"top")}),l.jsxs("div",{className:"flex items-center justify-between gap-8 flex-1",children:[l.jsx("div",{className:"flex flex-col gap-3 z-10 w-48 justify-center flex-shrink-0",children:Xe(X,"left")}),l.jsx("div",{className:K("z-10 flex items-center flex-shrink-0",ze),children:l.jsx(fD,{providerData:T,providerColor:ue,totalRequests:k,maxRequests:A,showVisibleMetrics:!S&&L>0,hiddenPausedCount:S?0:L,isDragging:z==="provider",offset:ge("provider"),hoveredAccount:f,hasRightAccounts:re,hasTopAccounts:ye,hasBottomAccounts:De,onPointerDown:Ce=>F("provider",Ce),onPointerMove:ee,onPointerUp:Q})}),re&&l.jsx("div",{className:"flex flex-col gap-3 z-10 w-48 justify-center flex-shrink-0",children:Xe(ae,"right")})]}),De&&l.jsx("div",{className:"flex flex-row gap-3 z-10 justify-center flex-wrap mt-8",children:Xe(ie,"bottom")})]}),l.jsx("div",{className:"w-56 flex-shrink-0 self-stretch relative",children:l.jsx("div",{className:"absolute inset-0",children:l.jsx(CA,{events:oe,privacyMode:N})})})]})]})}function gD(n,a){return`${n.trim().toLowerCase()}:${a.trim()}`}function yD(n,a){const o=Array.from(new Set([a.id,a.email].filter(r=>!!r?.trim())));for(const r of o){const c=gD(a.provider,r),d=n?.accountStats?.[c]??n?.accountStats?.[r];if(d)return d}}const Ey={business:0,personal:1,unknown:2};function bD(n,a){return a?n?new Date(a).getTime()>new Date(n).getTime()?a:n:a:n}function xD(n,a){const o=Af(n.id,n.email,n.tokenFile),r=yD(a,n);return{id:n.id,email:o.email||n.email||n.id,tokenFile:n.tokenFile,isDefault:n.isDefault,successCount:r?.successCount??0,failureCount:r?.failureCount??0,lastUsedAt:r?.lastUsedAt??n.lastUsedAt,paused:n.paused,tier:n.tier,audience:o.audience,audienceLabel:o.audienceLabel,detailLabel:o.detailLabel}}function vD(n){return[...n].sort((a,o)=>{const r=Ey[a.audience]-Ey[o.audience];if(r!==0)return r;const c=a.audienceLabel??a.detailLabel??a.id,d=o.audienceLabel??o.detailLabel??o.id;return c.localeCompare(d)})}function CD(n,a){const o=new Map,r=new Map;for(const c of n){const d=xD(c,a),m=c.provider.toLowerCase()==="codex"?`${c.provider}:${d.email}`:c.id;o.has(m)||o.set(m,[]),o.get(m)?.push(d),r.set(c.id,c)}return Array.from(o.entries()).map(([c,d])=>{if(d.length===1){const[g]=d,S=r.get(g.id);return{id:g.id,email:g.email,tokenFile:g.tokenFile,provider:S?.provider??"codex",isDefault:g.isDefault,successCount:g.successCount,failureCount:g.failureCount,lastUsedAt:g.lastUsedAt,paused:g.paused,tier:g.tier,projectId:S?.projectId}}const f=vD(d),m=f[0]?.email??c,p=r.get(f[0]?.id??"")?.provider??"codex";return{id:c,email:m,tokenFile:f[0]?.tokenFile??"",provider:p,isDefault:f.some(g=>g.isDefault),successCount:f.reduce((g,S)=>g+S.successCount,0),failureCount:f.reduce((g,S)=>g+S.failureCount,0),lastUsedAt:f.reduce((g,S)=>bD(g,S.lastUsedAt),void 0),paused:f.every(g=>!!g.paused),memberIds:f.map(g=>g.id),variants:f}})}function Nx(n,a){const o=n+a;return o===0?100:Math.round(n/o*100)}const Oy=["#1e6091","#2d8a6e","#d4a012","#c92a2d","#c45a1a","#6b9c4d","#3d5a73","#cc7614","#3a7371","#7c5fc4"];function SD(){const{data:n,isLoading:a,error:o}=Jk(),{data:r,isLoading:c,dataUpdatedAt:d}=GA(),[f,m]=C.useState("");C.useEffect(()=>{if(!d)return;const N=()=>{const L=Math.floor((Date.now()-d)/1e3);L<60?m(`${L}s ago`):m(`${Math.floor(L/60)}m ago`)};N();const E=setInterval(N,1e3);return()=>clearInterval(E)},[d]);const{accounts:p,totalSuccess:g,totalFailure:S,totalRequests:b,providerStats:x}=C.useMemo(()=>{if(!n?.authStatus)return{accounts:[],totalSuccess:0,totalFailure:0,totalRequests:0,providerStats:[]};const N=[],E=new Map;let L=0,O=0,D=0;n.authStatus.forEach(k=>{const T=k.provider;E.has(T)||E.set(T,{success:0,failure:0,accounts:[]});const w=E.get(T);if(!w)return;const R=(k.accounts??[]).map(I=>({...I,provider:I.provider||k.provider}));CD(R,r).forEach(I=>{L+=I.successCount,O+=I.failureCount,w.success+=I.successCount,w.failure+=I.failureCount;const z={id:I.id,email:I.email,tokenFile:I.tokenFile,provider:k.provider,displayName:k.displayName,isDefault:I.isDefault,successCount:I.successCount,failureCount:I.failureCount,lastUsedAt:I.lastUsedAt,color:Oy[D%Oy.length],projectId:I.projectId,paused:I.paused,tier:I.tier,memberIds:I.memberIds,variants:I.variants};N.push(z),w.accounts.push(z),D++})});const A=[];return E.forEach((k,T)=>{k.accounts.length!==0&&A.push({provider:T,displayName:wf(T),totalRequests:k.success+k.failure,successCount:k.success,failureCount:k.failure,accountCount:k.accounts.length,accounts:k.accounts})}),A.sort((k,T)=>T.totalRequests-k.totalRequests),{accounts:N,totalSuccess:L,totalFailure:O,totalRequests:L+O,providerStats:A}},[n?.authStatus,r]),j=b>0?Math.round(g/b*100):100;return{accounts:p,totalSuccess:g,totalFailure:S,totalRequests:b,providerStats:x,overallSuccessRate:j,isLoading:a||c,error:o??null,timeSinceUpdate:f}}function wD(){return l.jsxs("div",{className:"relative flex items-center justify-center w-5 h-5",children:[l.jsx("div",{className:"absolute w-4 h-4 rounded-full animate-ping opacity-20",style:{backgroundColor:Zt.success}}),l.jsx("div",{className:"absolute w-3 h-3 rounded-full animate-pulse opacity-40",style:{backgroundColor:Zt.success}}),l.jsx("div",{className:"relative w-2 h-2 rounded-full z-10",style:{backgroundColor:Zt.success}})]})}function ND({success:n,failure:a}){return n===0&&a===0?l.jsx("span",{className:"text-[9px] text-muted-foreground/50 font-mono",children:"no activity"}):l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("div",{className:"flex items-center gap-0.5",children:[l.jsx($s,{className:"w-3 h-3 text-emerald-700 dark:text-emerald-500"}),l.jsx("span",{className:"text-[10px] font-mono font-medium text-emerald-700 dark:text-emerald-500",children:n.toLocaleString()})]}),a>0&&l.jsxs("div",{className:"flex items-center gap-0.5",children:[l.jsx(nf,{className:"w-3 h-3 text-red-700 dark:text-red-500"}),l.jsx("span",{className:"text-[10px] font-mono font-medium text-red-700 dark:text-red-500",children:a.toLocaleString()})]})]})}function kD({stats:n,isHovered:a,privacyMode:o,onSelect:r,onMouseEnter:c,onMouseLeave:d}){const f=Nx(n.successCount,n.failureCount),m=Sf[n.provider.toLowerCase()]||"#6b7280";return l.jsxs("button",{onClick:r,onMouseEnter:c,onMouseLeave:d,className:K("group relative rounded-xl p-4 text-left transition-all duration-300","bg-muted/30 dark:bg-zinc-900/60 backdrop-blur-sm","border border-border/50 dark:border-white/[0.08]","hover:border-opacity-50 hover:scale-[1.02] hover:shadow-lg",a&&"ring-1"),style:{borderColor:a?m:void 0,"--ring-color":m},children:[l.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[l.jsx(Df,{provider:n.provider,size:36,withBackground:!0}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-semibold text-foreground tracking-tight",children:n.displayName}),l.jsxs("p",{className:"text-[10px] text-muted-foreground",children:[n.accountCount," account",n.accountCount!==1?"s":""]})]}),l.jsx(Ol,{className:K("w-4 h-4 ml-auto text-muted-foreground transition-all",a?"opacity-100 translate-x-0":"opacity-0 -translate-x-2")})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex justify-between items-center text-xs",children:[l.jsx("span",{className:"text-muted-foreground",children:"Stats"}),l.jsx(ND,{success:n.successCount,failure:n.failureCount})]}),l.jsxs("div",{className:"flex justify-between text-xs",children:[l.jsx("span",{className:"text-muted-foreground",children:"Success Rate"}),l.jsxs("span",{className:"font-mono font-semibold",style:{color:f===100?Zt.success:f>=95?Zt.degraded:Zt.failed},children:[f,"%"]})]}),l.jsx("div",{className:"w-full bg-muted dark:bg-zinc-800/50 h-1 rounded-full overflow-hidden",children:l.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${f}%`,backgroundColor:m}})})]}),l.jsxs("div",{className:"flex gap-1 mt-3 items-center",children:[n.accounts.slice(0,5).map(p=>{const g=n.provider==="agy"&&!p.projectId;return l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:K("w-2 h-2 rounded-full",p.paused&&"opacity-50"),style:{backgroundColor:p.color},title:o?"••••••":TA(p.id,p.email,p.tokenFile)}),g&&l.jsx(ji,{children:l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsx(Gn,{className:"absolute -top-1 -right-1 w-2.5 h-2.5 text-amber-500","aria-label":"Missing Project ID"})}),l.jsx(Na,{side:"top",className:"text-xs",children:"Missing Project ID - re-add account to fix"})]})})]},p.id)}),n.accounts.length>5&&l.jsxs("span",{className:"text-[10px] text-muted-foreground ml-1",children:["+",n.accounts.length-5]})]})]})}function ml({icon:n,label:a,value:o,color:r}){return l.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-card/50 dark:bg-zinc-900/50 border border-border/50 dark:border-white/[0.06]",children:[l.jsx("div",{className:"w-8 h-8 rounded-md flex items-center justify-center",style:{backgroundColor:r?`${r}15`:"var(--muted)",color:r||"var(--muted-foreground)"},children:n}),l.jsxs("div",{children:[l.jsx("div",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:a}),l.jsx("div",{className:"text-lg font-semibold font-mono leading-tight",style:{color:r||"var(--foreground)"},children:o})]})]})}const yd="auth-monitor-selected-provider";function AD(){const{t:n}=Et(),{accounts:a,totalSuccess:o,totalFailure:r,totalRequests:c,providerStats:d,overallSuccessRate:f,isLoading:m,error:p,timeSinceUpdate:g}=SD(),{privacyMode:S}=sf(),[b,x]=C.useState(()=>typeof window<"u"?localStorage.getItem(yd):null),j=Q=>{x(Q),Q?localStorage.setItem(yd,Q):localStorage.removeItem(yd)},N=C.useMemo(()=>b&&d.some(Q=>Q.provider===b)?b:null,[b,d]),[E,L]=C.useState(null),O=e1(),D=t1(),A=n1(),k=a1(),T=N?d.find(Q=>Q.provider===N):null,w=T?.accountCount??a.length,R=T?.successCount??o,I=T?.failureCount??r,z=T?.totalRequests??c,F=T?Nx(T.successCount,T.failureCount):f,ee=(Q,ge)=>{if(!N||O.isPending||D.isPending||A.isPending||k.isPending)return;if(Q.length>1){ge?A.mutate({provider:N,accountIds:Q}):k.mutate({provider:N,accountIds:Q});return}const[te]=Q;te&&(ge?O.mutate({provider:N,accountId:te}):D.mutate({provider:N,accountId:te}))};return m?l.jsxs("div",{className:"rounded-xl border border-border overflow-hidden font-mono text-[13px] bg-card/50 dark:bg-zinc-900/60 backdrop-blur-sm",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[l.jsx(We,{className:"h-4 w-32"}),l.jsx(We,{className:"h-4 w-20"})]}),l.jsxs("div",{className:"p-4 space-y-4",children:[l.jsx("div",{className:"flex gap-3",children:[1,2,3,4].map(Q=>l.jsx(We,{className:"h-16 flex-1 rounded-lg"},Q))}),l.jsx(We,{className:"h-48 w-full rounded-lg"})]})]}):p||a.length===0?null:l.jsxs("div",{className:"rounded-xl border border-border overflow-hidden font-mono text-[13px] text-foreground bg-card/50 dark:bg-zinc-900/60 backdrop-blur-sm",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-border bg-gradient-to-r from-emerald-500/5 via-transparent to-transparent dark:from-emerald-500/10",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(wD,{}),l.jsx("span",{className:"text-xs font-semibold tracking-tight text-foreground",children:"LIVE"}),l.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Account Monitor"})]}),l.jsxs("div",{className:"flex items-center gap-4 text-[10px] text-muted-foreground",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(VS,{className:"w-3 h-3 animate-pulse"}),l.jsxs("span",{children:["Updated ",g||"now"]})]}),l.jsx("span",{className:"text-muted-foreground/50",children:"|"}),l.jsx("span",{children:n("authMonitor.accountsCount",{count:w})}),l.jsxs("span",{className:"font-mono",children:[z.toLocaleString()," req"]})]})]}),l.jsxs("div",{className:"grid grid-cols-4 gap-3 p-4 border-b border-border bg-muted/20 dark:bg-zinc-900/30",children:[l.jsx(ml,{icon:l.jsx(Us,{className:"w-4 h-4"}),label:n("authMonitor.accounts"),value:w,color:"var(--accent)"}),l.jsx(ml,{icon:l.jsx($s,{className:"w-4 h-4"}),label:n("authMonitor.success"),value:R.toLocaleString(),color:Zt.success}),l.jsx(ml,{icon:l.jsx(nf,{className:"w-4 h-4"}),label:n("authMonitor.failed"),value:I.toLocaleString(),color:I>0?Zt.failed:void 0}),l.jsx(ml,{icon:l.jsx(Us,{className:"w-4 h-4"}),label:n("authMonitor.successRate"),value:`${F}%`,color:F===100?Zt.success:F>=95?Zt.degraded:Zt.failed})]}),l.jsx("div",{className:"relative overflow-hidden",children:T?l.jsx(pD,{providerData:T,onBack:()=>j(null),onPauseToggle:ee,isPausingAccount:O.isPending||D.isPending||A.isPending||k.isPending}):l.jsxs("div",{className:"p-6",children:[l.jsx("div",{className:"text-[10px] text-muted-foreground uppercase tracking-widest mb-4",children:"Request Distribution by Provider"}),l.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-3 gap-4",children:d.map(Q=>l.jsx(kD,{stats:Q,isHovered:E===Q.provider,privacyMode:S,onSelect:()=>j(Q.provider),onMouseEnter:()=>L(Q.provider),onMouseLeave:()=>L(null)},Q.provider))})]})})]})}const Fl=C.createContext(null);Fl.displayName="PanelGroupContext";const gt={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Tf=10,Ai=C.useLayoutEffect,Py=CS.useId,DD=typeof Py=="function"?Py:()=>null;let TD=0;function jf(n=null){const a=DD(),o=C.useRef(n||a||null);return o.current===null&&(o.current=""+TD++),n??o.current}function kx({children:n,className:a="",collapsedSize:o,collapsible:r,defaultSize:c,forwardedRef:d,id:f,maxSize:m,minSize:p,onCollapse:g,onExpand:S,onResize:b,order:x,style:j,tagName:N="div",...E}){const L=C.useContext(Fl);if(L===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:O,expandPanel:D,getPanelSize:A,getPanelStyle:k,groupId:T,isPanelCollapsed:w,reevaluatePanelConstraints:R,registerPanel:I,resizePanel:z,unregisterPanel:F}=L,ee=jf(f),Q=C.useRef({callbacks:{onCollapse:g,onExpand:S,onResize:b},constraints:{collapsedSize:o,collapsible:r,defaultSize:c,maxSize:m,minSize:p},id:ee,idIsFromProps:f!==void 0,order:x});C.useRef({didLogMissingDefaultSizeWarning:!1}),Ai(()=>{const{callbacks:te,constraints:ve}=Q.current,U={...ve};Q.current.id=ee,Q.current.idIsFromProps=f!==void 0,Q.current.order=x,te.onCollapse=g,te.onExpand=S,te.onResize=b,ve.collapsedSize=o,ve.collapsible=r,ve.defaultSize=c,ve.maxSize=m,ve.minSize=p,(U.collapsedSize!==ve.collapsedSize||U.collapsible!==ve.collapsible||U.maxSize!==ve.maxSize||U.minSize!==ve.minSize)&&R(Q.current,U)}),Ai(()=>{const te=Q.current;return I(te),()=>{F(te)}},[x,ee,I,F]),C.useImperativeHandle(d,()=>({collapse:()=>{O(Q.current)},expand:te=>{D(Q.current,te)},getId(){return ee},getSize(){return A(Q.current)},isCollapsed(){return w(Q.current)},isExpanded(){return!w(Q.current)},resize:te=>{z(Q.current,te)}}),[O,D,A,w,ee,z]);const ge=k(Q.current,c);return C.createElement(N,{...E,children:n,className:a,id:ee,style:{...ge,...j},[gt.groupId]:T,[gt.panel]:"",[gt.panelCollapsible]:r||void 0,[gt.panelId]:ee,[gt.panelSize]:parseFloat(""+ge.flexGrow).toFixed(1)})}const qs=C.forwardRef((n,a)=>C.createElement(kx,{...n,forwardedRef:a}));kx.displayName="Panel";qs.displayName="forwardRef(Panel)";let Fd=null,vl=-1,Ja=null;function jD(n,a,o){const r=(a&Mx)!==0,c=(a&Ex)!==0,d=(a&Ox)!==0,f=(a&Px)!==0;if(a){if(r)return d?"se-resize":f?"ne-resize":"e-resize";if(c)return d?"sw-resize":f?"nw-resize":"w-resize";if(d)return"s-resize";if(f)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function MD(){Ja!==null&&(document.head.removeChild(Ja),Fd=null,Ja=null,vl=-1)}function bd(n,a,o){var r,c;const d=jD(n,a);if(Fd!==d){if(Fd=d,Ja===null&&(Ja=document.createElement("style"),document.head.appendChild(Ja)),vl>=0){var f;(f=Ja.sheet)===null||f===void 0||f.removeRule(vl)}vl=(r=(c=Ja.sheet)===null||c===void 0?void 0:c.insertRule(`*{cursor: ${d} !important;}`))!==null&&r!==void 0?r:-1}}function Ax(n){return n.type==="keydown"}function Dx(n){return n.type.startsWith("pointer")}function Tx(n){return n.type.startsWith("mouse")}function Gl(n){if(Dx(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(Tx(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function ED(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function OD(n,a,o){return n.x<a.x+a.width&&n.x+n.width>a.x&&n.y<a.y+a.height&&n.y+n.height>a.y}function PD(n,a){if(n===a)throw new Error("Cannot compare node with itself");const o={a:_y(n),b:_y(a)};let r;for(;o.a.at(-1)===o.b.at(-1);)n=o.a.pop(),a=o.b.pop(),r=n;_e(r,"Stacking order can only be calculated for elements with a common ancestor");const c={a:Ry(Ly(o.a)),b:Ry(Ly(o.b))};if(c.a===c.b){const d=r.childNodes,f={a:o.a.at(-1),b:o.b.at(-1)};let m=d.length;for(;m--;){const p=d[m];if(p===f.a)return 1;if(p===f.b)return-1}}return Math.sign(c.a-c.b)}const LD=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function RD(n){var a;const o=getComputedStyle((a=jx(n))!==null&&a!==void 0?a:n).display;return o==="flex"||o==="inline-flex"}function _D(n){const a=getComputedStyle(n);return!!(a.position==="fixed"||a.zIndex!=="auto"&&(a.position!=="static"||RD(n))||+a.opacity<1||"transform"in a&&a.transform!=="none"||"webkitTransform"in a&&a.webkitTransform!=="none"||"mixBlendMode"in a&&a.mixBlendMode!=="normal"||"filter"in a&&a.filter!=="none"||"webkitFilter"in a&&a.webkitFilter!=="none"||"isolation"in a&&a.isolation==="isolate"||LD.test(a.willChange)||a.webkitOverflowScrolling==="touch")}function Ly(n){let a=n.length;for(;a--;){const o=n[a];if(_e(o,"Missing node"),_D(o))return o}return null}function Ry(n){return n&&Number(getComputedStyle(n).zIndex)||0}function _y(n){const a=[];for(;n;)a.push(n),n=jx(n);return a}function jx(n){const{parentNode:a}=n;return a&&a instanceof ShadowRoot?a.host:a}const Mx=1,Ex=2,Ox=4,Px=8,zD=ED()==="coarse";let On=[],So=!1,ei=new Map,Vl=new Map;const Fs=new Set;function ID(n,a,o,r,c){var d;const{ownerDocument:f}=a,m={direction:o,element:a,hitAreaMargins:r,setResizeHandlerState:c},p=(d=ei.get(f))!==null&&d!==void 0?d:0;return ei.set(f,p+1),Fs.add(m),Al(),function(){var S;Vl.delete(n),Fs.delete(m);const b=(S=ei.get(f))!==null&&S!==void 0?S:1;if(ei.set(f,b-1),Al(),b===1&&ei.delete(f),On.includes(m)){const x=On.indexOf(m);x>=0&&On.splice(x,1),Yl(),c("up",!0,null)}}}function UD(n){const{target:a}=n,{x:o,y:r}=Gl(n);So=!0,Mf({target:a,x:o,y:r}),Al(),On.length>0&&(Dl("down",n),Yl(),n.preventDefault(),Lx(a)||n.stopImmediatePropagation())}function xd(n){const{x:a,y:o}=Gl(n);if(So&&n.type!=="pointerleave"&&n.buttons===0&&(So=!1,Dl("up",n)),!So){const{target:r}=n;Mf({target:r,x:a,y:o})}Dl("move",n),Yl(),On.length>0&&n.preventDefault()}function vd(n){const{target:a}=n,{x:o,y:r}=Gl(n);Vl.clear(),So=!1,On.length>0&&(n.preventDefault(),Lx(a)||n.stopImmediatePropagation()),Dl("up",n),Mf({target:a,x:o,y:r}),Yl(),Al()}function Lx(n){let a=n;for(;a;){if(a.hasAttribute(gt.resizeHandle))return!0;a=a.parentElement}return!1}function Mf({target:n,x:a,y:o}){On.splice(0);let r=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(r=n),Fs.forEach(c=>{const{element:d,hitAreaMargins:f}=c,m=d.getBoundingClientRect(),{bottom:p,left:g,right:S,top:b}=m,x=zD?f.coarse:f.fine;if(a>=g-x&&a<=S+x&&o>=b-x&&o<=p+x){if(r!==null&&document.contains(r)&&d!==r&&!d.contains(r)&&!r.contains(d)&&PD(r,d)>0){let N=r,E=!1;for(;N&&!N.contains(d);){if(OD(N.getBoundingClientRect(),m)){E=!0;break}N=N.parentElement}if(E)return}On.push(c)}})}function Cd(n,a){Vl.set(n,a)}function Yl(){let n=!1,a=!1;On.forEach(r=>{const{direction:c}=r;c==="horizontal"?n=!0:a=!0});let o=0;Vl.forEach(r=>{o|=r}),n&&a?bd("intersection",o):n?bd("horizontal",o):a?bd("vertical",o):MD()}let Sd;function Al(){var n;(n=Sd)===null||n===void 0||n.abort(),Sd=new AbortController;const a={capture:!0,signal:Sd.signal};Fs.size&&(So?(On.length>0&&ei.forEach((o,r)=>{const{body:c}=r;o>0&&(c.addEventListener("contextmenu",vd,a),c.addEventListener("pointerleave",xd,a),c.addEventListener("pointermove",xd,a))}),ei.forEach((o,r)=>{const{body:c}=r;c.addEventListener("pointerup",vd,a),c.addEventListener("pointercancel",vd,a)})):ei.forEach((o,r)=>{const{body:c}=r;o>0&&(c.addEventListener("pointerdown",UD,a),c.addEventListener("pointermove",xd,a))}))}function Dl(n,a){Fs.forEach(o=>{const{setResizeHandlerState:r}=o,c=On.includes(o);r(n,c,a)})}function HD(){const[n,a]=C.useState(0);return C.useCallback(()=>a(o=>o+1),[])}function _e(n,a){if(!n)throw console.error(a),Error(a)}function Mi(n,a,o=Tf){return n.toFixed(o)===a.toFixed(o)?0:n>a?1:-1}function ya(n,a,o=Tf){return Mi(n,a,o)===0}function dn(n,a,o){return Mi(n,a,o)===0}function BD(n,a,o){if(n.length!==a.length)return!1;for(let r=0;r<n.length;r++){const c=n[r],d=a[r];if(!dn(c,d,o))return!1}return!0}function vo({panelConstraints:n,panelIndex:a,size:o}){const r=n[a];_e(r!=null,`Panel constraints not found for index ${a}`);let{collapsedSize:c=0,collapsible:d,maxSize:f=100,minSize:m=0}=r;if(Mi(o,m)<0)if(d){const p=(c+m)/2;Mi(o,p)<0?o=c:o=m}else o=m;return o=Math.min(f,o),o=parseFloat(o.toFixed(Tf)),o}function Ms({delta:n,initialLayout:a,panelConstraints:o,pivotIndices:r,prevLayout:c,trigger:d}){if(dn(n,0))return a;const f=[...a],[m,p]=r;_e(m!=null,"Invalid first pivot index"),_e(p!=null,"Invalid second pivot index");let g=0;if(d==="keyboard"){{const b=n<0?p:m,x=o[b];_e(x,`Panel constraints not found for index ${b}`);const{collapsedSize:j=0,collapsible:N,minSize:E=0}=x;if(N){const L=a[b];if(_e(L!=null,`Previous layout not found for panel index ${b}`),dn(L,j)){const O=E-L;Mi(O,Math.abs(n))>0&&(n=n<0?0-O:O)}}}{const b=n<0?m:p,x=o[b];_e(x,`No panel constraints found for index ${b}`);const{collapsedSize:j=0,collapsible:N,minSize:E=0}=x;if(N){const L=a[b];if(_e(L!=null,`Previous layout not found for panel index ${b}`),dn(L,E)){const O=L-j;Mi(O,Math.abs(n))>0&&(n=n<0?0-O:O)}}}}{const b=n<0?1:-1;let x=n<0?p:m,j=0;for(;;){const E=a[x];_e(E!=null,`Previous layout not found for panel index ${x}`);const O=vo({panelConstraints:o,panelIndex:x,size:100})-E;if(j+=O,x+=b,x<0||x>=o.length)break}const N=Math.min(Math.abs(n),Math.abs(j));n=n<0?0-N:N}{let x=n<0?m:p;for(;x>=0&&x<o.length;){const j=Math.abs(n)-Math.abs(g),N=a[x];_e(N!=null,`Previous layout not found for panel index ${x}`);const E=N-j,L=vo({panelConstraints:o,panelIndex:x,size:E});if(!dn(N,L)&&(g+=N-L,f[x]=L,g.toFixed(3).localeCompare(Math.abs(n).toFixed(3),void 0,{numeric:!0})>=0))break;n<0?x--:x++}}if(BD(c,f))return c;{const b=n<0?p:m,x=a[b];_e(x!=null,`Previous layout not found for panel index ${b}`);const j=x+g,N=vo({panelConstraints:o,panelIndex:b,size:j});if(f[b]=N,!dn(N,j)){let E=j-N,O=n<0?p:m;for(;O>=0&&O<o.length;){const D=f[O];_e(D!=null,`Previous layout not found for panel index ${O}`);const A=D+E,k=vo({panelConstraints:o,panelIndex:O,size:A});if(dn(D,k)||(E-=k-D,f[O]=k),dn(E,0))break;n>0?O--:O++}}}const S=f.reduce((b,x)=>x+b,0);return dn(S,100)?f:c}function KD({layout:n,panelsArray:a,pivotIndices:o}){let r=0,c=100,d=0,f=0;const m=o[0];_e(m!=null,"No pivot index found"),a.forEach((b,x)=>{const{constraints:j}=b,{maxSize:N=100,minSize:E=0}=j;x===m?(r=E,c=N):(d+=E,f+=N)});const p=Math.min(c,100-d),g=Math.max(r,100-f),S=n[m];return{valueMax:p,valueMin:g,valueNow:S}}function Gs(n,a=document){return Array.from(a.querySelectorAll(`[${gt.resizeHandleId}][data-panel-group-id="${n}"]`))}function Rx(n,a,o=document){const c=Gs(n,o).findIndex(d=>d.getAttribute(gt.resizeHandleId)===a);return c??null}function _x(n,a,o){const r=Rx(n,a,o);return r!=null?[r,r+1]:[-1,-1]}function qD(n){return n instanceof HTMLElement?!0:typeof n=="object"&&n!==null&&"tagName"in n&&"getAttribute"in n}function zx(n,a=document){if(qD(a)&&a.dataset.panelGroupId==n)return a;const o=a.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return o||null}function $l(n,a=document){const o=a.querySelector(`[${gt.resizeHandleId}="${n}"]`);return o||null}function FD(n,a,o,r=document){var c,d,f,m;const p=$l(a,r),g=Gs(n,r),S=p?g.indexOf(p):-1,b=(c=(d=o[S])===null||d===void 0?void 0:d.id)!==null&&c!==void 0?c:null,x=(f=(m=o[S+1])===null||m===void 0?void 0:m.id)!==null&&f!==void 0?f:null;return[b,x]}function GD({committedValuesRef:n,eagerValuesRef:a,groupId:o,layout:r,panelDataArray:c,panelGroupElement:d,setLayout:f}){C.useRef({didWarnAboutMissingResizeHandle:!1}),Ai(()=>{if(!d)return;const m=Gs(o,d);for(let p=0;p<c.length-1;p++){const{valueMax:g,valueMin:S,valueNow:b}=KD({layout:r,panelsArray:c,pivotIndices:[p,p+1]}),x=m[p];if(x!=null){const j=c[p];_e(j,`No panel data found for index "${p}"`),x.setAttribute("aria-controls",j.id),x.setAttribute("aria-valuemax",""+Math.round(g)),x.setAttribute("aria-valuemin",""+Math.round(S)),x.setAttribute("aria-valuenow",b!=null?""+Math.round(b):"")}}return()=>{m.forEach((p,g)=>{p.removeAttribute("aria-controls"),p.removeAttribute("aria-valuemax"),p.removeAttribute("aria-valuemin"),p.removeAttribute("aria-valuenow")})}},[o,r,c,d]),C.useEffect(()=>{if(!d)return;const m=a.current;_e(m,"Eager values not found");const{panelDataArray:p}=m,g=zx(o,d);_e(g!=null,`No group found for id "${o}"`);const S=Gs(o,d);_e(S,`No resize handles found for group id "${o}"`);const b=S.map(x=>{const j=x.getAttribute(gt.resizeHandleId);_e(j,"Resize handle element has no handle id attribute");const[N,E]=FD(o,j,p,d);if(N==null||E==null)return()=>{};const L=O=>{if(!O.defaultPrevented)switch(O.key){case"Enter":{O.preventDefault();const D=p.findIndex(A=>A.id===N);if(D>=0){const A=p[D];_e(A,`No panel data found for index ${D}`);const k=r[D],{collapsedSize:T=0,collapsible:w,minSize:R=0}=A.constraints;if(k!=null&&w){const I=Ms({delta:dn(k,T)?R-T:T-k,initialLayout:r,panelConstraints:p.map(z=>z.constraints),pivotIndices:_x(o,j,d),prevLayout:r,trigger:"keyboard"});r!==I&&f(I)}}break}}};return x.addEventListener("keydown",L),()=>{x.removeEventListener("keydown",L)}});return()=>{b.forEach(x=>x())}},[d,n,a,o,r,c,f])}function zy(n,a){if(n.length!==a.length)return!1;for(let o=0;o<n.length;o++)if(n[o]!==a[o])return!1;return!0}function Ix(n,a){const o=n==="horizontal",{x:r,y:c}=Gl(a);return o?r:c}function VD(n,a,o,r,c){const d=o==="horizontal",f=$l(a,c);_e(f,`No resize handle element found for id "${a}"`);const m=f.getAttribute(gt.groupId);_e(m,"Resize handle element has no group id attribute");let{initialCursorPosition:p}=r;const g=Ix(o,n),S=zx(m,c);_e(S,`No group element found for id "${m}"`);const b=S.getBoundingClientRect(),x=d?b.width:b.height;return(g-p)/x*100}function YD(n,a,o,r,c,d){if(Ax(n)){const f=o==="horizontal";let m=0;n.shiftKey?m=100:c!=null?m=c:m=10;let p=0;switch(n.key){case"ArrowDown":p=f?0:m;break;case"ArrowLeft":p=f?-m:0;break;case"ArrowRight":p=f?m:0;break;case"ArrowUp":p=f?0:-m;break;case"End":p=100;break;case"Home":p=-100;break}return p}else return r==null?0:VD(n,a,o,r,d)}function $D({panelDataArray:n}){const a=Array(n.length),o=n.map(d=>d.constraints);let r=0,c=100;for(let d=0;d<n.length;d++){const f=o[d];_e(f,`Panel constraints not found for index ${d}`);const{defaultSize:m}=f;m!=null&&(r++,a[d]=m,c-=m)}for(let d=0;d<n.length;d++){const f=o[d];_e(f,`Panel constraints not found for index ${d}`);const{defaultSize:m}=f;if(m!=null)continue;const p=n.length-r,g=c/p;r++,a[d]=g,c-=g}return a}function bo(n,a,o){a.forEach((r,c)=>{const d=n[c];_e(d,`Panel data not found for index ${c}`);const{callbacks:f,constraints:m,id:p}=d,{collapsedSize:g=0,collapsible:S}=m,b=o[p];if(b==null||r!==b){o[p]=r;const{onCollapse:x,onExpand:j,onResize:N}=f;N&&N(r,b),S&&(x||j)&&(j&&(b==null||ya(b,g))&&!ya(r,g)&&j(),x&&(b==null||!ya(b,g))&&ya(r,g)&&x())}})}function pl(n,a){if(n.length!==a.length)return!1;for(let o=0;o<n.length;o++)if(n[o]!=a[o])return!1;return!0}function WD({defaultSize:n,dragState:a,layout:o,panelData:r,panelIndex:c,precision:d=3}){const f=o[c];let m;return f==null?m=n!=null?n.toFixed(d):"1":r.length===1?m="1":m=f.toFixed(d),{flexBasis:0,flexGrow:m,flexShrink:1,overflow:"hidden",pointerEvents:a!==null?"none":void 0}}function QD(n,a=10){let o=null;return(...c)=>{o!==null&&clearTimeout(o),o=setTimeout(()=>{n(...c)},a)}}function Iy(n){try{if(typeof localStorage<"u")n.getItem=a=>localStorage.getItem(a),n.setItem=(a,o)=>{localStorage.setItem(a,o)};else throw new Error("localStorage not supported in this environment")}catch(a){console.error(a),n.getItem=()=>null,n.setItem=()=>{}}}function Ux(n){return`react-resizable-panels:${n}`}function Hx(n){return n.map(a=>{const{constraints:o,id:r,idIsFromProps:c,order:d}=a;return c?r:d?`${d}:${JSON.stringify(o)}`:JSON.stringify(o)}).sort((a,o)=>a.localeCompare(o)).join(",")}function Bx(n,a){try{const o=Ux(n),r=a.getItem(o);if(r){const c=JSON.parse(r);if(typeof c=="object"&&c!=null)return c}}catch{}return null}function XD(n,a,o){var r,c;const d=(r=Bx(n,o))!==null&&r!==void 0?r:{},f=Hx(a);return(c=d[f])!==null&&c!==void 0?c:null}function ZD(n,a,o,r,c){var d;const f=Ux(n),m=Hx(a),p=(d=Bx(n,c))!==null&&d!==void 0?d:{};p[m]={expandToSizes:Object.fromEntries(o.entries()),layout:r};try{c.setItem(f,JSON.stringify(p))}catch(g){console.error(g)}}function Uy({layout:n,panelConstraints:a}){const o=[...n],r=o.reduce((d,f)=>d+f,0);if(o.length!==a.length)throw Error(`Invalid ${a.length} panel layout: ${o.map(d=>`${d}%`).join(", ")}`);if(!dn(r,100)&&o.length>0)for(let d=0;d<a.length;d++){const f=o[d];_e(f!=null,`No layout data found for index ${d}`);const m=100/r*f;o[d]=m}let c=0;for(let d=0;d<a.length;d++){const f=o[d];_e(f!=null,`No layout data found for index ${d}`);const m=vo({panelConstraints:a,panelIndex:d,size:f});f!=m&&(c+=f-m,o[d]=m)}if(!dn(c,0))for(let d=0;d<a.length;d++){const f=o[d];_e(f!=null,`No layout data found for index ${d}`);const m=f+c,p=vo({panelConstraints:a,panelIndex:d,size:m});if(f!==p&&(c-=p-f,o[d]=p,dn(c,0)))break}return o}const JD=100,Es={getItem:n=>(Iy(Es),Es.getItem(n)),setItem:(n,a)=>{Iy(Es),Es.setItem(n,a)}},Hy={};function Kx({autoSaveId:n=null,children:a,className:o="",direction:r,forwardedRef:c,id:d=null,onLayout:f=null,keyboardResizeBy:m=null,storage:p=Es,style:g,tagName:S="div",...b}){const x=jf(d),j=C.useRef(null),[N,E]=C.useState(null),[L,O]=C.useState([]),D=HD(),A=C.useRef({}),k=C.useRef(new Map),T=C.useRef(0),w=C.useRef({autoSaveId:n,direction:r,dragState:N,id:x,keyboardResizeBy:m,onLayout:f,storage:p}),R=C.useRef({layout:L,panelDataArray:[],panelDataArrayChanged:!1});C.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),C.useImperativeHandle(c,()=>({getId:()=>w.current.id,getLayout:()=>{const{layout:X}=R.current;return X},setLayout:X=>{const{onLayout:ae}=w.current,{layout:de,panelDataArray:ie}=R.current,re=Uy({layout:X,panelConstraints:ie.map(ye=>ye.constraints)});zy(de,re)||(O(re),R.current.layout=re,ae&&ae(re),bo(ie,re,A.current))}}),[]),Ai(()=>{w.current.autoSaveId=n,w.current.direction=r,w.current.dragState=N,w.current.id=x,w.current.onLayout=f,w.current.storage=p}),GD({committedValuesRef:w,eagerValuesRef:R,groupId:x,layout:L,panelDataArray:R.current.panelDataArray,setLayout:O,panelGroupElement:j.current}),C.useEffect(()=>{const{panelDataArray:X}=R.current;if(n){if(L.length===0||L.length!==X.length)return;let ae=Hy[n];ae==null&&(ae=QD(ZD,JD),Hy[n]=ae);const de=[...X],ie=new Map(k.current);ae(n,de,ie,L,p)}},[n,L,p]),C.useEffect(()=>{});const I=C.useCallback(X=>{const{onLayout:ae}=w.current,{layout:de,panelDataArray:ie}=R.current;if(X.constraints.collapsible){const re=ie.map(Xe=>Xe.constraints),{collapsedSize:ye=0,panelSize:De,pivotIndices:ze}=wi(ie,X,de);if(_e(De!=null,`Panel size not found for panel "${X.id}"`),!ya(De,ye)){k.current.set(X.id,De);const Ce=xo(ie,X)===ie.length-1?De-ye:ye-De,Oe=Ms({delta:Ce,initialLayout:de,panelConstraints:re,pivotIndices:ze,prevLayout:de,trigger:"imperative-api"});pl(de,Oe)||(O(Oe),R.current.layout=Oe,ae&&ae(Oe),bo(ie,Oe,A.current))}}},[]),z=C.useCallback((X,ae)=>{const{onLayout:de}=w.current,{layout:ie,panelDataArray:re}=R.current;if(X.constraints.collapsible){const ye=re.map(Ge=>Ge.constraints),{collapsedSize:De=0,panelSize:ze=0,minSize:Xe=0,pivotIndices:Ce}=wi(re,X,ie),Oe=ae??Xe;if(ya(ze,De)){const Ge=k.current.get(X.id),Dt=Ge!=null&&Ge>=Oe?Ge:Oe,Yn=xo(re,X)===re.length-1?ze-Dt:Dt-ze,je=Ms({delta:Yn,initialLayout:ie,panelConstraints:ye,pivotIndices:Ce,prevLayout:ie,trigger:"imperative-api"});pl(ie,je)||(O(je),R.current.layout=je,de&&de(je),bo(re,je,A.current))}}},[]),F=C.useCallback(X=>{const{layout:ae,panelDataArray:de}=R.current,{panelSize:ie}=wi(de,X,ae);return _e(ie!=null,`Panel size not found for panel "${X.id}"`),ie},[]),ee=C.useCallback((X,ae)=>{const{panelDataArray:de}=R.current,ie=xo(de,X);return WD({defaultSize:ae,dragState:N,layout:L,panelData:de,panelIndex:ie})},[N,L]),Q=C.useCallback(X=>{const{layout:ae,panelDataArray:de}=R.current,{collapsedSize:ie=0,collapsible:re,panelSize:ye}=wi(de,X,ae);return _e(ye!=null,`Panel size not found for panel "${X.id}"`),re===!0&&ya(ye,ie)},[]),ge=C.useCallback(X=>{const{layout:ae,panelDataArray:de}=R.current,{collapsedSize:ie=0,collapsible:re,panelSize:ye}=wi(de,X,ae);return _e(ye!=null,`Panel size not found for panel "${X.id}"`),!re||Mi(ye,ie)>0},[]),te=C.useCallback(X=>{const{panelDataArray:ae}=R.current;ae.push(X),ae.sort((de,ie)=>{const re=de.order,ye=ie.order;return re==null&&ye==null?0:re==null?-1:ye==null?1:re-ye}),R.current.panelDataArrayChanged=!0,D()},[D]);Ai(()=>{if(R.current.panelDataArrayChanged){R.current.panelDataArrayChanged=!1;const{autoSaveId:X,onLayout:ae,storage:de}=w.current,{layout:ie,panelDataArray:re}=R.current;let ye=null;if(X){const ze=XD(X,re,de);ze&&(k.current=new Map(Object.entries(ze.expandToSizes)),ye=ze.layout)}ye==null&&(ye=$D({panelDataArray:re}));const De=Uy({layout:ye,panelConstraints:re.map(ze=>ze.constraints)});zy(ie,De)||(O(De),R.current.layout=De,ae&&ae(De),bo(re,De,A.current))}}),Ai(()=>{const X=R.current;return()=>{X.layout=[]}},[]);const ve=C.useCallback(X=>{let ae=!1;const de=j.current;return de&&window.getComputedStyle(de,null).getPropertyValue("direction")==="rtl"&&(ae=!0),function(re){re.preventDefault();const ye=j.current;if(!ye)return()=>null;const{direction:De,dragState:ze,id:Xe,keyboardResizeBy:Ce,onLayout:Oe}=w.current,{layout:Ge,panelDataArray:Dt}=R.current,{initialLayout:Ot}=ze??{},Yn=_x(Xe,X,ye);let je=YD(re,X,De,ze,Ce,ye);const Jt=De==="horizontal";Jt&&ae&&(je=-je);const Pn=Dt.map($n=>$n.constraints),en=Ms({delta:je,initialLayout:Ot??Ge,panelConstraints:Pn,pivotIndices:Yn,prevLayout:Ge,trigger:Ax(re)?"keyboard":"mouse-or-touch"}),Da=!pl(Ge,en);(Dx(re)||Tx(re))&&T.current!=je&&(T.current=je,!Da&&je!==0?Jt?Cd(X,je<0?Mx:Ex):Cd(X,je<0?Ox:Px):Cd(X,0)),Da&&(O(en),R.current.layout=en,Oe&&Oe(en),bo(Dt,en,A.current))}},[]),U=C.useCallback((X,ae)=>{const{onLayout:de}=w.current,{layout:ie,panelDataArray:re}=R.current,ye=re.map(Ge=>Ge.constraints),{panelSize:De,pivotIndices:ze}=wi(re,X,ie);_e(De!=null,`Panel size not found for panel "${X.id}"`);const Ce=xo(re,X)===re.length-1?De-ae:ae-De,Oe=Ms({delta:Ce,initialLayout:ie,panelConstraints:ye,pivotIndices:ze,prevLayout:ie,trigger:"imperative-api"});pl(ie,Oe)||(O(Oe),R.current.layout=Oe,de&&de(Oe),bo(re,Oe,A.current))},[]),Z=C.useCallback((X,ae)=>{const{layout:de,panelDataArray:ie}=R.current,{collapsedSize:re=0,collapsible:ye}=ae,{collapsedSize:De=0,collapsible:ze,maxSize:Xe=100,minSize:Ce=0}=X.constraints,{panelSize:Oe}=wi(ie,X,de);Oe!=null&&(ye&&ze&&ya(Oe,re)?ya(re,De)||U(X,De):Oe<Ce?U(X,Ce):Oe>Xe&&U(X,Xe))},[U]),ne=C.useCallback((X,ae)=>{const{direction:de}=w.current,{layout:ie}=R.current;if(!j.current)return;const re=$l(X,j.current);_e(re,`Drag handle element not found for id "${X}"`);const ye=Ix(de,ae);E({dragHandleId:X,dragHandleRect:re.getBoundingClientRect(),initialCursorPosition:ye,initialLayout:ie})},[]),$=C.useCallback(()=>{E(null)},[]),oe=C.useCallback(X=>{const{panelDataArray:ae}=R.current,de=xo(ae,X);de>=0&&(ae.splice(de,1),delete A.current[X.id],R.current.panelDataArrayChanged=!0,D())},[D]),ue=C.useMemo(()=>({collapsePanel:I,direction:r,dragState:N,expandPanel:z,getPanelSize:F,getPanelStyle:ee,groupId:x,isPanelCollapsed:Q,isPanelExpanded:ge,reevaluatePanelConstraints:Z,registerPanel:te,registerResizeHandle:ve,resizePanel:U,startDragging:ne,stopDragging:$,unregisterPanel:oe,panelGroupElement:j.current}),[I,N,r,z,F,ee,x,Q,ge,Z,te,ve,U,ne,$,oe]),he={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return C.createElement(Fl.Provider,{value:ue},C.createElement(S,{...b,children:a,className:o,id:d,ref:j,style:{...he,...g},[gt.group]:"",[gt.groupDirection]:r,[gt.groupId]:x}))}const Ef=C.forwardRef((n,a)=>C.createElement(Kx,{...n,forwardedRef:a}));Kx.displayName="PanelGroup";Ef.displayName="forwardRef(PanelGroup)";function xo(n,a){return n.findIndex(o=>o===a||o.id===a.id)}function wi(n,a,o){const r=xo(n,a),d=r===n.length-1?[r-1,r]:[r,r+1],f=o[r];return{...a.constraints,panelSize:f,pivotIndices:d}}function eT({disabled:n,handleId:a,resizeHandler:o,panelGroupElement:r}){C.useEffect(()=>{if(n||o==null||r==null)return;const c=$l(a,r);if(c==null)return;const d=f=>{if(!f.defaultPrevented)switch(f.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{f.preventDefault(),o(f);break}case"F6":{f.preventDefault();const m=c.getAttribute(gt.groupId);_e(m,`No group element found for id "${m}"`);const p=Gs(m,r),g=Rx(m,a,r);_e(g!==null,`No resize element found for id "${a}"`);const S=f.shiftKey?g>0?g-1:p.length-1:g+1<p.length?g+1:0;p[S].focus();break}}};return c.addEventListener("keydown",d),()=>{c.removeEventListener("keydown",d)}},[r,n,a,o])}function Of({children:n=null,className:a="",disabled:o=!1,hitAreaMargins:r,id:c,onBlur:d,onClick:f,onDragging:m,onFocus:p,onPointerDown:g,onPointerUp:S,style:b={},tabIndex:x=0,tagName:j="div",...N}){var E,L;const O=C.useRef(null),D=C.useRef({onClick:f,onDragging:m,onPointerDown:g,onPointerUp:S});C.useEffect(()=>{D.current.onClick=f,D.current.onDragging=m,D.current.onPointerDown=g,D.current.onPointerUp=S});const A=C.useContext(Fl);if(A===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:k,groupId:T,registerResizeHandle:w,startDragging:R,stopDragging:I,panelGroupElement:z}=A,F=jf(c),[ee,Q]=C.useState("inactive"),[ge,te]=C.useState(!1),[ve,U]=C.useState(null),Z=C.useRef({state:ee});Ai(()=>{Z.current.state=ee}),C.useEffect(()=>{if(o)U(null);else{const ue=w(F);U(()=>ue)}},[o,F,w]);const ne=(E=r?.coarse)!==null&&E!==void 0?E:15,$=(L=r?.fine)!==null&&L!==void 0?L:5;C.useEffect(()=>{if(o||ve==null)return;const ue=O.current;_e(ue,"Element ref not attached");let he=!1;return ID(F,ue,k,{coarse:ne,fine:$},(ae,de,ie)=>{if(!de){Q("inactive");return}switch(ae){case"down":{Q("drag"),he=!1,_e(ie,'Expected event to be defined for "down" action'),R(F,ie);const{onDragging:re,onPointerDown:ye}=D.current;re?.(!0),ye?.();break}case"move":{const{state:re}=Z.current;he=!0,re!=="drag"&&Q("hover"),_e(ie,'Expected event to be defined for "move" action'),ve(ie);break}case"up":{Q("hover"),I();const{onClick:re,onDragging:ye,onPointerUp:De}=D.current;ye?.(!1),De?.(),he||re?.();break}}})},[ne,k,o,$,w,F,ve,R,I]),eT({disabled:o,handleId:F,resizeHandler:ve,panelGroupElement:z});const oe={touchAction:"none",userSelect:"none"};return C.createElement(j,{...N,children:n,className:a,id:c,onBlur:()=>{te(!1),d?.()},onFocus:()=>{te(!0),p?.()},ref:O,role:"separator",style:{...oe,...b},tabIndex:x,[gt.groupDirection]:k,[gt.groupId]:T,[gt.resizeHandle]:"",[gt.resizeHandleActive]:ee==="drag"?"pointer":ge?"keyboard":void 0,[gt.resizeHandleEnabled]:!o,[gt.resizeHandleId]:F,[gt.resizeHandleState]:ee})}Of.displayName="PanelResizeHandle";const Do=C.forwardRef(({className:n,children:a,...o},r)=>l.jsxs(Tb,{ref:r,className:K("relative overflow-hidden",n),...o,children:[l.jsx(lS,{className:"h-full w-full rounded-[inherit]",children:a}),l.jsx(qx,{}),l.jsx(cS,{})]}));Do.displayName=Tb.displayName;const qx=C.forwardRef(({className:n,orientation:a="vertical",...o},r)=>l.jsx(jb,{ref:r,orientation:a,className:K("flex touch-none select-none transition-colors",a==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",a==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",n),...o,children:l.jsx(uS,{className:"relative flex-1 rounded-full bg-border"})}));qx.displayName=jb.displayName;function tT(n){const a={provider:"unknown",endpoint:"unknown",timestamp:new Date,raw:n},o=n.match(/error-api-provider-([^-]+)-/);o&&(a.provider=o[1]);const r=n.match(/error-api-provider-[^-]+-(.+?)-\d{4}-\d{2}-\d{2}T/);r&&(a.endpoint=r[1].replace(/-/g,"/"));const c=n.match(/(\d{4}-\d{2}-\d{2}T\d{6})/);if(c){const d=c[1],f=`${d.slice(0,10)}T${d.slice(11,13)}:${d.slice(13,15)}:${d.slice(15,17)}`;a.timestamp=new Date(f)}return a}function nT(n){const a={version:"",url:"",method:"",timestamp:"",statusCode:0,statusText:"",requestHeaders:{},requestBody:"",responseHeaders:{},responseBody:"",provider:"",endpoint:"",isClientError:!1,isServerError:!1,errorType:"unknown",model:null,quotaResetDelay:null,quotaResetTimestamp:null},o=n.split(/^===\s*(.+?)\s*===$/m);let r="";for(let c=0;c<o.length;c++){const d=o[c].trim();if(d==="REQUEST INFO"){r="request_info";continue}else if(d==="HEADERS"){r="headers";continue}else if(d==="REQUEST BODY"){r="request_body";continue}else if(d==="API RESPONSE"){r="";continue}else if(d==="RESPONSE"){r="response";continue}switch(r){case"request_info":aT(d,a);break;case"headers":a.requestHeaders=iT(d);break;case"request_body":a.requestBody=d;break;case"response":oT(d,a);break}}return sT(a),a}function aT(n,a){const o=n.split(`
|
|
14
|
-
`);for(const r of o){const[c,...d]=r.split(":"),f=d.join(":").trim();switch(c?.trim()?.toLowerCase()){case"version":a.version=f;break;case"url":a.url=f;break;case"method":a.method=f;break;case"timestamp":a.timestamp=f;break}}}function iT(n){const a={},o=n.split(`
|
|
15
|
-
`);for(const r of o){const c=r.indexOf(":");if(c>0){const d=r.slice(0,c).trim(),f=r.slice(c+1).trim();d&&(a[d]=f)}}return a}function oT(n,a){const o=n.split(`
|
|
16
|
-
`);let r=!1;const c=[];for(const d of o){if(d.startsWith("Status:")){const m=d.replace("Status:","").trim().split(/\s+/);a.statusCode=parseInt(m[0],10)||0,a.statusText=m.slice(1).join(" ")||cT(a.statusCode);continue}if(d.trim()===""&&!r){r=!0;continue}if(r)c.push(d);else{const f=d.indexOf(":");if(f>0){const m=d.slice(0,f).trim(),p=d.slice(f+1).trim();m&&(a.responseHeaders[m]=p)}}}a.responseBody=c.join(`
|
|
17
|
-
`).trim()}function sT(n){const a=n.url.match(/\/api\/provider\/([^/]+)/);a&&(n.provider=a[1]);const o=n.url.match(/\/api\/provider\/[^/]+\/(.+?)(?:\?|$)/);o&&(n.endpoint=o[1]),n.isClientError=n.statusCode>=400&&n.statusCode<500,n.isServerError=n.statusCode>=500,n.statusCode===429?n.errorType="rate_limit":n.statusCode===401||n.statusCode===403?n.errorType="auth":n.statusCode===404?n.errorType="not_found":n.statusCode>=500?n.errorType="server":(n.statusCode===408||n.statusCode===504)&&(n.errorType="timeout"),rT(n),n.statusCode===429&&lT(n)}function rT(n){if(n.requestBody)try{const a=JSON.parse(n.requestBody);typeof a.model=="string"&&(n.model=a.model)}catch{}}function lT(n){if(n.responseBody)try{const a=JSON.parse(n.responseBody),o=Gd(a);o!==null&&(n.quotaResetDelay=o);const r=Vd(a);r&&(n.quotaResetTimestamp=r)}catch{}}function Gd(n){if(typeof n!="object"||n===null)return null;const a=n;if("quotaResetDelay"in a){const o=a.quotaResetDelay;if(typeof o=="number")return o;if(typeof o=="string"){const r=o.match(/^(\d+)s?$/);if(r)return parseInt(r[1],10)}}if("error"in a&&typeof a.error=="object"){const o=Gd(a.error);if(o!==null)return o}if("details"in a&&Array.isArray(a.details))for(const o of a.details){const r=Gd(o);if(r!==null)return r}return null}function Vd(n){if(typeof n!="object"||n===null)return null;const a=n;for(const o of["quotaResetTimeStamp","quotaResetTimestamp","resetTime","reset_time"])if(o in a&&typeof a[o]=="string")return a[o];if("error"in a&&typeof a.error=="object"){const o=Vd(a.error);if(o)return o}if("details"in a&&Array.isArray(a.details))for(const o of a.details){const r=Vd(o);if(r)return r}return null}function cT(n){return{400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",408:"Request Timeout",429:"Too Many Requests",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"}[n]||""}function uT(n,a){const o=of(),r=o==="zh-CN",c=o==="vi",d=Date.now(),f=n*1e3,m=d-f,p=Math.floor(m/1e3),g=Math.floor(p/60),S=Math.floor(g/60),b=Math.floor(S/24);return p<60?r?"刚刚":c?"vừa xong":"just now":g<60?r?`${g} 分钟前`:c?`${g} phút trước`:`${g}m ago`:S<24?r?`${S} 小时前`:c?`${S} giờ trước`:`${S}h ago`:b<7?r?`${b} 天前`:c?`${b} ngày trước`:`${b}d ago`:new Date(f).toLocaleDateString(o,{month:"short",day:"numeric"})}function dT(n){return n>=500?"text-red-500":n===429?"text-orange-500":n>=400?"text-yellow-500":"text-gray-500"}function fT(n,a){const o=of();return o==="zh-CN"?{rate_limit:"限流",auth:"认证错误",not_found:"未找到",server:"服务错误",timeout:"超时",unknown:"错误"}[n]||"错误":o==="vi"?{rate_limit:"Quá giới hạn",auth:"Lỗi xác thực",not_found:"Không tìm thấy",server:"Lỗi máy chủ",timeout:"Hết thời gian chờ",unknown:"Lỗi"}[n]||"Lỗi":{rate_limit:"Rate Limited",auth:"Auth Error",not_found:"Not Found",server:"Server Error",timeout:"Timeout",unknown:"Error"}[n]||"Error"}function hT(n){if(n===null||n<=0)return null;if(n<60)return`${n}s`;if(n<3600)return`${Math.floor(n/60)}m`;const a=Math.floor(n/3600),o=Math.floor(n%3600/60);return o>0?`${a}h ${o}m`:`${a}h`}function mT(n,a){if(!n)return null;const o=of(),r=o==="zh-CN",c=o==="vi";try{const d=new Date(n),f=new Date,m=d.getTime()-f.getTime();if(m<=0)return r?"现在":c?"bây giờ":"now";const p=Math.floor(m/1e3);if(p<60)return r?`${p}秒`:c?`${p} giây`:`${p}s`;if(p<3600){const b=Math.floor(p/60);return r?`${b}分钟`:c?`${b} phút`:`${b}m`}const g=Math.floor(p/3600),S=Math.floor(p%3600/60);return r?S>0?`${g}小时 ${S}分钟`:`${g}小时`:c?S>0?`${g} giờ ${S} phút`:`${g} giờ`:S>0?`${g}h ${S}m`:`${g}h`}catch{return null}}function pT(n){return n?n===429?"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400":n>=500?"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400":n>=400?"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400":"bg-gray-100 text-gray-600":"bg-gray-100 text-gray-600"}function gT(n){return n||""}function yT({name:n,size:a,modified:o,isSelected:r,onClick:c,statusCode:d,model:f}){const m=C.useMemo(()=>tT(n),[n]),p=C.useMemo(()=>gT(f),[f]);return l.jsxs("button",{onClick:c,className:K("w-full px-2.5 py-2 flex items-center gap-2 text-left transition-colors","hover:bg-muted/40 border-l-[3px]",r?"bg-muted/50 border-l-red-500":"border-l-transparent"),children:[l.jsx("span",{className:K("shrink-0 text-[10px] font-bold px-1.5 py-0.5 rounded min-w-[32px] text-center",pT(d)),children:d||"???"}),l.jsx(Df,{provider:m.provider,size:18,withBackground:!0,className:"shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[l.jsx("span",{className:"text-[11px] font-medium text-foreground truncate",children:m.endpoint||"unknown"}),p&&l.jsx("span",{className:"text-[10px] text-muted-foreground truncate",title:p,children:p}),l.jsxs("div",{className:"flex items-center gap-1 text-[9px] text-muted-foreground/60",children:[l.jsx(No,{className:"w-2.5 h-2.5"}),l.jsx("span",{children:uT(o)})]})]})]})}function By({value:n,className:a,variant:o="outline",size:r="icon",label:c="Copy to clipboard"}){const[d,f]=C.useState(!1),m=()=>{navigator.clipboard.writeText(n),f(!0),setTimeout(()=>f(!1),2e3)};return l.jsx(ji,{children:l.jsxs(Sa,{children:[l.jsx(wa,{asChild:!0,children:l.jsxs(ot,{size:r,variant:o,className:K("relative z-10 text-muted-foreground hover:text-foreground",a),onClick:p=>{p.stopPropagation(),m()},children:[d?l.jsx(wo,{className:"h-3.5 w-3.5 text-green-500"}):l.jsx(Sl,{className:"h-3.5 w-3.5"}),l.jsx("span",{className:"sr-only",children:c})]})}),l.jsx(Na,{children:l.jsx("p",{children:d?"Copied!":c})})]})})}function As({active:n,onClick:a,children:o,icon:r}){return l.jsxs("button",{onClick:a,className:K("px-2.5 py-1.5 text-xs font-medium rounded transition-colors flex items-center gap-1.5",n?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[r&&l.jsx(r,{className:"w-3.5 h-3.5"}),o]})}function Fx({code:n}){const a=dT(n);return l.jsx("span",{className:K("inline-flex items-center justify-center min-w-[36px] px-2 py-0.5 rounded text-xs font-bold","bg-current/10 border border-current/20",a),children:n})}function bT({parsed:n}){const{t:a}=Et(),o=hT(n.quotaResetDelay)||mT(n.quotaResetTimestamp),r=a("errorLogs.na");return l.jsx(Do,{className:"h-full",children:l.jsxs("div",{className:"p-4 space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Fx,{code:n.statusCode}),l.jsx("span",{className:"text-sm font-medium",children:n.statusText}),l.jsx("span",{className:"text-xs text-muted-foreground px-2 py-0.5 rounded bg-muted/50",children:fT(n.errorType)})]}),n.model&&l.jsxs("div",{className:"flex items-center gap-2.5 p-3 rounded-lg bg-violet-500/10 border border-violet-500/20",children:[l.jsx(YS,{className:"w-4 h-4 text-violet-500 shrink-0"}),l.jsxs("div",{className:"text-sm",children:[l.jsx("span",{className:"text-muted-foreground",children:a("errorLogs.modelLabel")}),l.jsx("span",{className:"font-semibold text-violet-600 dark:text-violet-400",children:n.model})]})]}),n.errorType==="rate_limit"&&o&&l.jsxs("div",{className:"flex items-center gap-2.5 p-3 rounded-lg bg-amber-500/10 border border-amber-500/20",children:[l.jsx(No,{className:"w-4 h-4 text-amber-500 shrink-0"}),l.jsxs("div",{className:"text-sm",children:[l.jsx("span",{className:"text-muted-foreground",children:a("errorLogs.quotaResetsIn")}),l.jsx("span",{className:"font-semibold text-amber-600 dark:text-amber-400",children:o})]})]}),l.jsxs("div",{className:"grid grid-cols-4 gap-3 text-xs",children:[l.jsxs("div",{className:"p-2.5 rounded bg-muted/30 border border-border/50",children:[l.jsx("div",{className:"text-muted-foreground mb-1",children:a("errorLogs.method")}),l.jsx("div",{className:"font-medium",children:n.method||r})]}),l.jsxs("div",{className:"p-2.5 rounded bg-muted/30 border border-border/50",children:[l.jsx("div",{className:"text-muted-foreground mb-1",children:a("errorLogs.provider")}),l.jsx("div",{className:"font-medium",children:n.provider||r})]}),l.jsxs("div",{className:"p-2.5 rounded bg-muted/30 border border-border/50",children:[l.jsx("div",{className:"text-muted-foreground mb-1",children:a("errorLogs.version")}),l.jsx("div",{className:"font-medium",children:n.version||r})]}),l.jsxs("div",{className:"p-2.5 rounded bg-muted/30 border border-border/50",children:[l.jsx("div",{className:"text-muted-foreground mb-1",children:a("errorLogs.endpoint")}),l.jsx("div",{className:"font-medium truncate",title:n.endpoint,children:n.endpoint||r})]})]}),l.jsxs("div",{className:"text-xs",children:[l.jsx("div",{className:"text-muted-foreground mb-1.5",children:a("errorLogs.url")}),l.jsx("div",{className:"font-mono p-2.5 rounded bg-muted/30 border border-border/50 break-all leading-relaxed",children:n.url||r})]}),l.jsxs("div",{className:"text-xs",children:[l.jsx("div",{className:"text-muted-foreground mb-1.5",children:a("errorLogs.timestamp")}),l.jsx("div",{className:"font-mono",children:n.timestamp||r})]}),n.errorType!=="unknown"&&l.jsxs("div",{className:K("flex items-start gap-3 p-3 rounded text-xs",n.errorType==="rate_limit"?"bg-amber-500/10 border border-amber-500/20":n.errorType==="auth"?"bg-red-500/10 border border-red-500/20":"bg-blue-500/10 border border-blue-500/20"),children:[n.errorType==="rate_limit"?l.jsx(Gn,{className:"w-4 h-4 mt-0.5 text-amber-500 shrink-0"}):n.errorType==="auth"?l.jsx(Gn,{className:"w-4 h-4 mt-0.5 text-red-500 shrink-0"}):l.jsx(Rl,{className:"w-4 h-4 mt-0.5 text-blue-500 shrink-0"}),l.jsxs("div",{className:K("leading-relaxed",n.errorType==="rate_limit"?"text-amber-600 dark:text-amber-400":n.errorType==="auth"?"text-red-600 dark:text-red-400":"text-blue-600 dark:text-blue-400"),children:[n.errorType==="rate_limit"&&(n.model?a("errorLogs.rateLimitedMsg",{model:n.model}):a("errorLogs.rateLimitedMsgNoModel")),n.errorType==="auth"&&a("errorLogs.authFailedMsg"),n.errorType==="not_found"&&a("errorLogs.notFoundMsg"),n.errorType==="server"&&a("errorLogs.serverErrorMsg"),n.errorType==="timeout"&&a("errorLogs.timeoutMsg")]})]})]})})}function xT({headers:n}){const a=Object.entries(n);return a.length===0?l.jsx("div",{className:"p-4 text-xs text-muted-foreground",children:"No headers available"}):l.jsx(Do,{className:"h-full",children:l.jsx("div",{className:"p-4 space-y-1",children:a.map(([o,r])=>l.jsxs("div",{className:"flex gap-3 text-xs font-mono py-1.5 border-b border-border/30 last:border-0",children:[l.jsxs("span",{className:"text-muted-foreground shrink-0 min-w-[140px]",children:[o,":"]}),l.jsx("span",{className:"break-all",children:r})]},o))})})}function Ky({content:n,label:a}){const{t:o}=Et();if(!n||n.trim()===""){const d=a==="Request"?"errorLogs.noRequestBody":"errorLogs.noResponseBody";return l.jsx("div",{className:"p-4 text-xs text-muted-foreground",children:o(d)})}let r=n,c=!1;try{const d=JSON.parse(n);r=JSON.stringify(d,null,2),c=!0}catch{}return l.jsx(Do,{className:"h-full",children:l.jsx("pre",{className:K("p-4 text-xs font-mono whitespace-pre-wrap break-all leading-relaxed",c?"text-emerald-700 dark:text-green-400":"text-zinc-700 dark:text-muted-foreground"),children:r})})}function vT({content:n}){return l.jsx(Do,{className:"h-full",children:l.jsx("pre",{className:"p-4 text-xs font-mono text-zinc-700 dark:text-muted-foreground whitespace-pre-wrap break-all leading-relaxed",children:n})})}function CT({name:n,absolutePath:a}){const{t:o}=Et(),[r,c]=C.useState("overview"),{data:d,isLoading:f,error:m}=WA(n),p=C.useMemo(()=>d?nT(d):null,[d]);return n?f?l.jsxs("div",{className:"flex-1 p-6 space-y-3",children:[l.jsx(We,{className:"h-5 w-full"}),l.jsx(We,{className:"h-5 w-3/4"}),l.jsx(We,{className:"h-5 w-5/6"}),l.jsx(We,{className:"h-5 w-2/3"})]}):m||!d||!p?l.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:l.jsx("p",{className:"text-sm",children:o("errorLogs.failedLoadContent")})}):l.jsxs("div",{className:"flex-1 flex flex-col min-w-0 h-full",children:[l.jsxs("div",{className:"px-4 py-3 border-b border-border bg-muted/30 flex items-center justify-between gap-3 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[l.jsx(Fx,{code:p.statusCode}),l.jsxs("span",{className:"text-xs font-semibold truncate text-foreground",children:[p.provider,"/",p.endpoint||"unknown"]}),n&&l.jsx(By,{value:a||n,label:o("errorLogs.copyAbsolutePath"),size:"icon-sm",className:"ml-1 text-muted-foreground hover:text-foreground opacity-50 hover:opacity-100 transition-opacity"})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[d&&l.jsx(By,{value:d,label:o("errorLogs.copyRawContent"),variant:"ghost",size:"icon-sm",className:"text-muted-foreground hover:text-foreground"}),l.jsx("span",{className:"text-[10px] text-muted-foreground font-mono bg-muted px-1.5 py-0.5 rounded border border-border/50",children:p.method})]})]}),l.jsxs("div",{className:"px-3 py-2 border-b border-border flex items-center gap-1 bg-muted/10 shrink-0 overflow-x-auto",children:[l.jsx(As,{active:r==="overview",onClick:()=>c("overview"),icon:Rl,children:o("errorLogs.tabOverview")}),l.jsx(As,{active:r==="headers",onClick:()=>c("headers"),icon:WS,children:o("errorLogs.tabHeaders")}),l.jsx(As,{active:r==="request",onClick:()=>c("request"),icon:Vb,children:o("errorLogs.tabRequest")}),l.jsx(As,{active:r==="response",onClick:()=>c("response"),icon:QS,children:o("errorLogs.tabResponse")}),l.jsx(As,{active:r==="raw",onClick:()=>c("raw"),icon:XS,children:o("errorLogs.tabRaw")})]}),l.jsxs("div",{className:"flex-1 overflow-hidden bg-card/30",children:[r==="overview"&&l.jsx(bT,{parsed:p}),r==="headers"&&l.jsx(xT,{headers:p.requestHeaders}),r==="request"&&l.jsx(Ky,{content:p.requestBody,label:"Request"}),r==="response"&&l.jsx(Ky,{content:p.responseBody,label:"Response"}),r==="raw"&&l.jsx(vT,{content:d})]})]}):l.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:l.jsxs("div",{className:"text-center space-y-3",children:[l.jsx($S,{className:"w-10 h-10 mx-auto opacity-40"}),l.jsx("p",{className:"text-sm",children:o("errorLogs.selectLog")})]})})}function ST(){const{t:n}=Et(),{data:a,isLoading:o}=FA(),{data:r,isLoading:c,error:d}=$A(a?.running??!1),[f,m]=C.useState(500),[p,g]=C.useState(!1),S=C.useRef(null),b=C.useRef(null),x=()=>{b.current&&(clearInterval(b.current),b.current=null)};C.useEffect(()=>{if(!p)return;const k=w=>{const R=S.current;if(!R)return;const z=R.getBoundingClientRect().top+window.scrollY,F=w.pageY-z;m(Math.max(300,F));const Q=window.innerHeight-w.clientY,ge=15;x(),Q<50?b.current=setInterval(()=>{window.scrollBy(0,ge)},16):w.clientY<50&&(b.current=setInterval(()=>{window.scrollBy(0,-ge)},16))},T=()=>{g(!1),x(),document.body.style.cursor="default",document.body.style.userSelect="auto"};return document.addEventListener("mousemove",k),document.addEventListener("mouseup",T),document.body.style.cursor="row-resize",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",T),document.body.style.cursor="default",document.body.style.userSelect="auto",x()}},[p]);const j=k=>{k.preventDefault(),g(!0)},N=C.useMemo(()=>r?.[0]?.name??null,[r]),[E,L]=C.useState(null),O=E??N,D=C.useMemo(()=>!O||!r?void 0:r.find(T=>T.name===O)?.absolutePath,[O,r]);if(o||!a?.running)return null;if(c)return l.jsxs("div",{className:"rounded-xl border border-border overflow-hidden font-mono text-sm bg-card/50 dark:bg-zinc-900/60 backdrop-blur-sm h-[500px]",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[l.jsx(We,{className:"h-4 w-32"}),l.jsx(We,{className:"h-4 w-20"})]}),l.jsx("div",{className:"p-4 space-y-3",children:[1,2,3].map(k=>l.jsx(We,{className:"h-12 w-full rounded-lg"},k))})]});if(!r||r.length===0)return null;const A=r.length;return l.jsxs("div",{ref:S,className:"rounded-xl border border-border overflow-hidden font-mono text-sm text-foreground bg-card/50 dark:bg-zinc-900/60 backdrop-blur-sm flex flex-col shadow-sm transition-[height] duration-0 ease-linear relative group/container",style:{height:f},children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-gradient-to-r from-amber-500/10 via-transparent to-transparent dark:from-amber-500/15 shrink-0",children:[l.jsxs("div",{className:"flex items-center gap-2.5",children:[l.jsx(Gn,{className:"w-4 h-4 text-amber-500"}),l.jsx("span",{className:"text-sm font-semibold tracking-tight",children:n("errorLogs.title")}),l.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:n("errorLogs.failedRequests",{count:A})})]}),l.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[l.jsx(ZS,{className:"w-3.5 h-3.5"}),l.jsx("span",{children:n("errorLogs.cliproxyDiagnostics")})]})]}),l.jsx("div",{className:"flex-1 min-h-0",children:l.jsxs(Ef,{direction:"horizontal",children:[l.jsx(qs,{defaultSize:30,minSize:20,maxSize:50,className:"flex flex-col min-w-0",children:l.jsxs(Do,{className:"h-full",children:[l.jsx("div",{className:"divide-y divide-border/50",children:r.slice(0,50).map(k=>l.jsx(yT,{name:k.name,size:k.size,modified:k.modified,isSelected:O===k.name,onClick:()=>L(k.name),statusCode:k.statusCode,model:k.model},k.name))}),r.length>50&&l.jsx("div",{className:"px-3 py-3 text-center text-[10px] text-muted-foreground border-t border-border/50",children:n("errorLogs.showingCount",{total:r.length})})]})}),l.jsxs(Of,{className:"w-[1px] bg-border hover:bg-primary/50 transition-colors flex items-center justify-center group relative z-10 w-2 -ml-1 flex items-center justify-center outline-none",children:[l.jsx("div",{className:"w-[1px] h-full bg-border group-hover:bg-primary/50 transition-colors"}),l.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-4 h-8 rounded-sm flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-muted border border-border",children:l.jsx(Ll,{className:"h-4 w-4 text-muted-foreground"})})]}),l.jsx(qs,{className:"flex flex-col min-w-0 bg-background/50",children:l.jsx(CT,{name:O,absolutePath:D})})]})}),d?l.jsx("div",{className:"px-4 py-2 border-t border-border text-xs text-destructive bg-destructive/5 shrink-0",children:d.message}):l.jsx("div",{className:"h-2 bg-border/10 border-t border-border/30 hover:bg-primary/10 transition-colors cursor-row-resize flex items-center justify-center group/handle shrink-0",onMouseDown:j,children:l.jsx(JS,{className:"w-8 h-3 text-border group-hover:text-primary/50 transition-colors"})})]})}const wT=_l("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",warning:"border-yellow-200 bg-yellow-50 text-yellow-900 dark:border-yellow-900/50 dark:bg-yellow-900/20 dark:text-yellow-200 [&>svg]:text-yellow-600 dark:[&>svg]:text-yellow-500",info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-900/50 dark:bg-blue-900/20 dark:text-blue-200 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-500",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-900/50 dark:bg-green-900/20 dark:text-green-200 [&>svg]:text-green-600 dark:[&>svg]:text-green-500"}},defaultVariants:{variant:"default"}}),zs=C.forwardRef(({className:n,variant:a,...o},r)=>l.jsx("div",{ref:r,role:"alert",className:K(wT({variant:a}),n),...o}));zs.displayName="Alert";const Tl=C.forwardRef(({className:n,...a},o)=>l.jsx("h5",{ref:o,className:K("mb-1 font-medium leading-none tracking-tight",n),...a}));Tl.displayName="AlertTitle";const Is=C.forwardRef(({className:n,...a},o)=>l.jsx("div",{ref:o,className:K("text-sm [&_p]:leading-relaxed",n),...a}));Is.displayName="AlertDescription";function NT(){return kt({queryKey:["overview"],queryFn:async()=>(await fetch("/api/overview")).json()})}function Gx(n,a){return typeof n=="object"&&n!==null&&"error"in n&&typeof n.error=="string"?n.error:a}function Vx(n){const a=n.trim();if(!a)return null;try{return JSON.parse(a)}catch{return null}}function kT(n){const a=n.trim().toLowerCase();return a.startsWith("<!doctype html")||a.startsWith("<html")}function AT(n){if(!n||typeof n!="object")return!1;const a=n;return!(typeof a.content!="string"||"contentPath"in a&&typeof a.contentPath!="string")}async function Yx(n,a){const o=await n.text(),r=Vx(o);if(!n.ok){const c=Gx(r,a);throw new Error(c)}if(r===null)throw new Error(a);return r}function DT(){return kt({queryKey:["shared","summary"],queryFn:async()=>{const n=await fetch("/api/shared/summary");return Yx(n,"Failed to fetch shared summary")}})}function iP(n){return kt({queryKey:["shared",n],queryFn:async()=>{const a=await fetch(`/api/shared/${n}`);return Yx(a,`Failed to fetch shared ${n}`)}})}function oP(n,a){return kt({queryKey:["shared",n,"content",a],enabled:typeof a=="string"&&a.length>0,queryFn:async()=>{if(!a)throw new Error("Missing shared item path");const o=new URLSearchParams({type:n,path:a}),r=await fetch(`/api/shared/content?${o.toString()}`),c=await r.text(),d=Vx(c);if(!r.ok)throw new Error(Gx(d,`Failed to fetch shared ${n} content`));if(AT(d))return{content:d.content,contentPath:typeof d.contentPath=="string"&&d.contentPath.length>0?d.contentPath:a};if(c.trim().length>0){if(kT(c))throw new Error("Shared content endpoint unavailable. Restart `ccs config` and try again.");return{content:c,contentPath:a}}throw new Error(`Failed to fetch shared ${n} content`)}})}const TT={ok:"success",warning:"warning",error:"error"},jT={default:{iconBg:"bg-muted",iconColor:"text-muted-foreground"},success:{iconBg:"bg-green-600/15",iconColor:"text-green-700 dark:text-green-500"},warning:{iconBg:"bg-amber-500/15",iconColor:"text-amber-700 dark:text-amber-400"},error:{iconBg:"bg-red-600/15",iconColor:"text-red-700 dark:text-red-500"},accent:{iconBg:"bg-accent/15",iconColor:"text-accent"}};function gl({title:n,value:a,icon:o,variant:r="default",onClick:c}){const d=jT[r];return l.jsxs("button",{onClick:c,className:K("flex items-center gap-3 px-4 py-2.5 rounded-lg border bg-card/50","transition-all hover:bg-card hover:shadow-sm hover:-translate-y-0.5","active:scale-[0.98]"),children:[l.jsx("div",{className:K("flex items-center justify-center w-9 h-9 rounded-md",d.iconBg),children:l.jsx(o,{className:K("w-4 h-4",d.iconColor)})}),l.jsxs("div",{className:"text-left",children:[l.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:n}),l.jsx("p",{className:K("text-lg font-bold font-mono leading-tight",d.iconColor),children:a})]})]})}function MT(){const{t:n}=Et(),a=Jd(),{data:o,isLoading:r}=NT(),{data:c,isLoading:d}=DT();if(r||d)return l.jsxs("div",{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"rounded-xl border p-6 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx(We,{className:"h-12 w-12 rounded-lg"}),l.jsxs("div",{children:[l.jsx(We,{className:"h-7 w-[180px] mb-2"}),l.jsx(We,{className:"h-4 w-[220px]"})]})]}),l.jsx("div",{className:"flex items-center gap-3",children:[1,2,3,4].map(m=>l.jsx(We,{className:"h-14 w-28 rounded-lg"},m))})]}),l.jsxs("div",{className:"border rounded-xl overflow-hidden",children:[l.jsxs("div",{className:"px-4 py-2.5 border-b flex items-center justify-between",children:[l.jsx(We,{className:"h-4 w-32"}),l.jsx(We,{className:"h-4 w-20"})]}),l.jsx("div",{className:"px-4 py-3 border-b",children:l.jsx(We,{className:"h-2 w-full rounded-full"})}),[1,2,3].map(m=>l.jsxs("div",{className:"px-4 py-2.5 flex items-center gap-3 border-b last:border-b-0",children:[l.jsx(We,{className:"w-2.5 h-2.5 rounded-full"}),l.jsx(We,{className:"h-4 flex-1"}),l.jsx(We,{className:"h-1.5 w-24 rounded-full"}),l.jsx(We,{className:"h-4 w-16"})]},m))]})]});const f=o?.health?TT[o.health.status]:void 0;return l.jsxs("div",{className:"p-6 space-y-6",children:[l.jsxs("div",{className:"relative overflow-hidden rounded-xl border bg-gradient-to-br from-background via-background to-muted/30",children:[l.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",children:l.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0)",backgroundSize:"24px 24px"}})}),l.jsxs("div",{className:"relative p-6 flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4",children:[l.jsx(uA,{version:o?.version}),l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(gl,{title:n("home.profiles"),value:o?.profiles??0,icon:Pd,variant:"accent",onClick:()=>a("/providers")}),l.jsx(gl,{title:n("home.cliproxy"),value:o?.cliproxy??0,icon:Rb,variant:"accent",onClick:()=>a("/cliproxy")}),l.jsx(gl,{title:n("home.accounts"),value:o?.accounts??0,icon:Ib,variant:"default",onClick:()=>a("/accounts")}),l.jsx(gl,{title:n("home.health"),value:o?.health?`${o.health.passed}/${o.health.total}`:"-",icon:Us,variant:f,onClick:()=>a("/health")})]})]})]}),c?.symlinkStatus&&!c.symlinkStatus.valid&&l.jsxs(zs,{variant:"warning",children:[l.jsx(Gn,{className:"h-4 w-4"}),l.jsx(Tl,{children:n("home.configurationRequired")}),l.jsx(Is,{children:c.symlinkStatus.message})]}),l.jsx(AD,{}),l.jsx("div",{className:"rounded-xl border bg-card/70 p-5",children:l.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"rounded-xl bg-muted p-2.5",children:l.jsx(Ub,{className:"h-5 w-5 text-muted-foreground"})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("h2",{className:"text-lg font-semibold",children:"Logs moved to a dedicated workspace"}),l.jsx("p",{className:"max-w-2xl text-sm text-muted-foreground",children:"Use the unified logs page for source-level filtering, structured entry inspection, and retention policy edits without crowding the home dashboard."})]})]}),l.jsxs(ot,{variant:"outline",className:"gap-2",onClick:()=>a("/logs"),children:["Open logs",l.jsx(ew,{className:"h-4 w-4"})]})]})}),l.jsx(ST,{})]})}const $x=dS,Pf=C.forwardRef(({className:n,...a},o)=>l.jsx(Mb,{ref:o,className:K("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",n),...a}));Pf.displayName=Mb.displayName;const jl=C.forwardRef(({className:n,...a},o)=>l.jsx(Eb,{ref:o,className:K("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",n),...a}));jl.displayName=Eb.displayName;const Yd=C.forwardRef(({className:n,...a},o)=>l.jsx(Ob,{ref:o,className:K("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n),...a}));Yd.displayName=Ob.displayName;function qt({className:n,...a}){return l.jsx(fS,{"data-slot":"label",className:K("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",n),...a})}const Lf="ccs:openrouter-models",ET=1440*60*1e3,Wx="1";function $d(n){const a=parseFloat(n);return isNaN(a)||a===0?0:a*1e6}function qy(n){const a=$d(n);return a===0?"Free":a<.01?"<$0.01":a<1?`$${a.toFixed(2)}`:`$${a.toFixed(a<10?2:0)}`}function OT(n){const a=qy(n.prompt),o=qy(n.completion);return a==="Free"&&o==="Free"?"Free":`${a}/${o}`}function PT(n){const a=n.id.toLowerCase();return a.startsWith("anthropic/")?"anthropic":a.startsWith("openai/")?"openai":a.startsWith("google/")?"google":a.startsWith("meta-llama/")||a.startsWith("meta/")?"meta":a.startsWith("mistralai/")?"mistral":a.includes(":free")||a.includes("qwen")||a.includes("deepseek")?"opensource":"other"}function LT(n){return{...n,category:PT(n),pricePerMillionPrompt:$d(n.pricing.prompt),pricePerMillionCompletion:$d(n.pricing.completion),isFree:n.pricing.prompt==="0"&&n.pricing.completion==="0",isExacto:n.id.includes(":exacto")}}function RT(n,a,o){const r=a.toLowerCase().trim();return n.filter(c=>o?.category&&c.category!==o.category||o?.freeOnly&&!c.isFree||o?.minContext&&c.context_length<o.minContext?!1:r?c.id.toLowerCase().includes(r)||c.name.toLowerCase().includes(r)||c.description?.toLowerCase().includes(r):!0)}function sP(n){return[...n].sort((a,o)=>{if(a.isFree&&!o.isFree)return-1;if(!a.isFree&&o.isFree)return 1;if(!a.isFree&&!o.isFree){if(a.isExacto&&!o.isExacto)return-1;if(!a.isExacto&&o.isExacto)return 1}return a.name.localeCompare(o.name)})}function _T(){try{const n=localStorage.getItem(Lf);if(!n)return null;const a=JSON.parse(n);return a.version!==Wx||Date.now()-a.fetchedAt>ET?null:a.models}catch{return null}}function zT(n){try{localStorage.setItem(Lf,JSON.stringify({models:n,fetchedAt:Date.now(),version:Wx}))}catch{}}function IT(){localStorage.removeItem(Lf)}function rP(n,a){const[o]=n.split("/");if(!o)return{};const r=a.filter(f=>f.id.startsWith(`${o}/`));if(r.length===0)return{};const c=[...r].sort((f,m)=>m.pricePerMillionPrompt-f.pricePerMillionPrompt),d=Math.ceil(c.length/3);return{opus:c[0]?.id,sonnet:c[Math.min(d,c.length-1)]?.id,haiku:c[c.length-1]?.id}}function UT(n){return n>=1e6?`${(n/1e6).toFixed(1)}M`:n>=1e3?`${Math.round(n/1e3)}K`:String(n)}const lP={anthropic:"Anthropic (Claude)",openai:"OpenAI (GPT)",google:"Google (Gemini)",meta:"Meta (Llama)",mistral:"Mistral",opensource:"Open Source",other:"Other"},HT={anthropic:["anthropic/"],openai:["openai/"],google:["google/"],meta:["meta-llama/","meta/"],mistral:["mistralai/"],opensource:["deepseek/","qwen/","cohere/"],other:[]};function BT(n,a=2){const o=[],r=["anthropic","openai","google","meta","mistral","opensource"];for(const c of r){const d=HT[c];if(d.length===0)continue;const m=[...n.filter(p=>d.some(g=>p.id.toLowerCase().startsWith(g)))].sort((p,g)=>(g.created??0)-(p.created??0));o.push(...m.slice(0,a))}return o.sort((c,d)=>(d.created??0)-(c.created??0))}function KT(n){const o=Date.now()/1e3-n;return o<86400?"Today":o<172800?"Yesterday":o<604800?`${Math.floor(o/86400)}d ago`:o<2592e3?`${Math.floor(o/604800)}w ago`:o<31536e3?`${Math.floor(o/2592e3)}mo ago`:`${Math.floor(o/31536e3)}y ago`}const qT="https://openrouter.ai/api/v1/models",Qx=["openrouter-models"],Fy=1440*60*1e3;async function FT(){const n=await fetch(qT);if(!n.ok)throw new Error(`Failed to fetch OpenRouter models: ${n.status}`);const o=(await n.json()).data;return zT(o),o}function Xx(){return kt({queryKey:Qx,queryFn:FT,staleTime:Fy,gcTime:Fy,initialData:()=>_T()??void 0,refetchOnWindowFocus:!1})}function GT(){const n=Xx(),a=(n.data??[]).map(LT);return{...n,models:a}}function cP(){const n=rt();return()=>(IT(),n.invalidateQueries({queryKey:Qx}))}function uP(){const{data:n,isLoading:a,isError:o}=Xx();return{isReady:!!n&&n.length>0,isLoading:a,isError:o,modelCount:n?.length??0}}function Rf({profileEnv:n={}}){const[a,o]=C.useState(null),[r,c]=C.useState(!0),[d,f]=C.useState(!1);C.useEffect(()=>{m()},[]);const m=async()=>{try{c(!0);const x=await fetch("/api/global-env");if(!x.ok)throw new Error("Failed to load");const j=await x.json();o(j)}catch{o(null)}finally{c(!1)}};if(r||!a?.enabled)return null;const p=a.env||{},g=Object.keys(p);if(g.length===0)return null;const S=g.filter(x=>!(x in n)),b=g.filter(x=>x in n);return l.jsxs("div",{className:"border-t bg-muted/20",children:[l.jsxs("button",{onClick:()=>f(!d),className:"w-full px-4 py-2 flex items-center gap-2 hover:bg-muted/30 transition-colors",children:[l.jsx(Rl,{className:"w-4 h-4 text-blue-500"}),l.jsxs("span",{className:"text-xs text-muted-foreground flex-1 text-left",children:[l.jsx("span",{className:"font-medium text-foreground",children:S.length})," global env var",S.length!==1?"s":""," will be injected at runtime",b.length>0&&l.jsxs("span",{className:"text-amber-600 dark:text-amber-400 ml-1",children:["(",b.length," overridden by profile)"]})]}),d?l.jsx(tf,{className:"w-4 h-4 text-muted-foreground"}):l.jsx(Pl,{className:"w-4 h-4 text-muted-foreground"})]}),d&&l.jsxs("div",{className:"px-4 pb-3 space-y-2",children:[S.length>0&&l.jsx("div",{className:"space-y-1",children:S.map(x=>l.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono bg-green-500/10 text-green-700 dark:text-green-400 px-2 py-1 rounded",children:[l.jsx("span",{className:"text-green-500",children:"+"}),l.jsxs("span",{className:"truncate",children:[x,"=",p[x]]})]},x))}),b.length>0&&l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"Skipped (profile already defines):"}),b.map(x=>l.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono bg-amber-500/10 text-amber-700 dark:text-amber-400 px-2 py-1 rounded",children:[l.jsx("span",{className:"text-amber-500",children:"~"}),l.jsx("span",{className:"truncate",children:x})]},x))]}),l.jsx("div",{className:"pt-2 border-t border-border/50",children:l.jsx(ot,{variant:"ghost",size:"sm",asChild:!0,className:"h-7 text-xs gap-1.5 -ml-2",children:l.jsxs(Cl,{to:"/settings?tab=globalenv",children:[l.jsx(af,{className:"w-3.5 h-3.5"}),"Configure in Settings",l.jsx(Kb,{className:"w-3 h-3 opacity-50"})]})})})]})]})}function VT({className:n,...a}){return l.jsx(hS,{"data-slot":"switch",className:K("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n),...a,children:l.jsx(mS,{"data-slot":"switch-thumb",className:K("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const _f={claude:"Claude Code",droid:"Factory Droid",codex:"Codex CLI"};function YT(n,a){return a==="refreshing"?"Refreshing preview":a==="invalid"?"Saved status":n==="editor"?"Live preview":"Saved status"}function $T(n,a){return n.status==="disabled"?"Disabled globally":a!=="claude"?`${_f[a]} bypasses the hook`:n.nativeReadPreference?"Native image reading":n.status==="hook-missing"?"Setup needed":n.authReadiness==="missing"?"Needs auth":n.proxyReadiness==="unavailable"?"Needs proxy":n.effectiveRuntimeMode==="native-read"?"Native fallback":"Transformer ready"}function WT(n,a){return n.status==="disabled"?{label:"Disabled",className:"border-border/80 bg-background/85 text-muted-foreground"}:a!=="claude"?{label:"Bypassed",className:"border-sky-500/25 bg-sky-500/10 text-sky-800 dark:text-sky-200"}:n.nativeReadPreference?{label:"Native",className:"border-emerald-500/25 bg-emerald-500/10 text-emerald-800 dark:text-emerald-200"}:n.status==="hook-missing"||n.authReadiness==="missing"?{label:n.status==="hook-missing"?"Setup":"Auth",className:"border-amber-500/25 bg-amber-500/10 text-amber-800 dark:text-amber-200"}:n.proxyReadiness==="unavailable"?{label:"Proxy",className:"border-amber-500/25 bg-amber-500/10 text-amber-800 dark:text-amber-200"}:{label:"Ready",className:"border-emerald-500/25 bg-emerald-500/10 text-emerald-800 dark:text-emerald-200"}}function QT(n,a){if(n.nativeReadPreference)return n.profileModel&&n.nativeImageCapable?`${n.profileModel} looks image-ready. CCS will bypass the transformer here.`:n.profileModel?`CCS will prefer native reading for ${n.profileModel}.`:"CCS will prefer native image reading for this profile.";if(!n.backendDisplayName&&a==="claude")return"This profile currently stays on native file access.";if(!n.backendDisplayName)return`Saved Claude-side image routing is inactive while ${_f[a]} is selected.`;const o=n.model?` · ${n.model}`:"";return`Transformer route: ${n.backendDisplayName}${o}.`}function XT(n,a){return n.status==="disabled"?"Image is disabled globally in CCS settings.":a!=="claude"?`Current target ${_f[a]} bypasses the Claude Read hook.`:n.nativeReadPreference?n.nativeImageCapable===!0?null:n.nativeImageReason:n.status==="hook-missing"?"Persist the profile hook before transformer routing can run here.":n.authReadiness==="missing"?n.authReason:n.proxyReadiness==="unavailable"?n.proxyReason:null}function ZT({status:n,target:a="claude",source:o="saved",previewState:r="saved",nativeReadPreferenceOverride:c,onToggleNativeRead:d}){if(!n)return l.jsxs("div",{className:"rounded-2xl border bg-muted/20 px-4 py-3","aria-live":"polite",children:[l.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"}),l.jsx("div",{className:"mt-2 h-3 w-52 animate-pulse rounded bg-muted"})]});const f=c??n.nativeReadPreference,m={...n,nativeReadPreference:f},p=WT(m,a),g=XT(m,a),S=n.nativeImageCapable?"Verified":n.profileModel?"Unknown":null;return l.jsxs("section",{className:"rounded-2xl border bg-background/95 px-4 py-3 shadow-sm",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsx("div",{className:"min-w-0",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"inline-flex h-8 w-8 items-center justify-center rounded-xl border border-sky-500/20 bg-sky-500/10 text-sky-700 dark:text-sky-300",children:l.jsx(Yb,{className:"h-4 w-4"})}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("h3",{className:"text-sm font-semibold",children:"Image"}),l.jsx(Ut,{className:K("h-5 border px-1.5 text-[10px]",p.className),children:p.label})]}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:[YT(o,r)," · ",$T(m,a)]})]})]})}),l.jsx(ot,{size:"sm",variant:"outline",className:"h-8 shrink-0",asChild:!0,children:l.jsxs(Cl,{to:"/settings?tab=image",children:["Open Settings",l.jsx(Vb,{className:"ml-1 h-3.5 w-3.5"})]})})]}),l.jsx("div",{className:"mt-3 rounded-xl border bg-muted/15 px-3 py-3",children:l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("div",{className:"text-sm font-medium text-foreground",children:"Use native image reading"}),S&&l.jsx(Ut,{variant:"outline",className:"h-5 px-1.5 text-[10px]",children:S})]}),l.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground",children:QT(m,a)})]}),l.jsx(VT,{checked:f,onCheckedChange:d,disabled:!d,"aria-label":"Use native image reading"})]})}),g&&l.jsx("div",{className:"mt-2 rounded-lg border border-border/70 bg-muted/20 px-3 py-2 text-xs leading-5 text-muted-foreground",children:g})]})}const JT=C.lazy(()=>at(()=>Promise.resolve().then(()=>Ql),void 0).then(n=>({default:n.CodeEditor})));function dP({rawJsonContent:n,isRawJsonValid:a,rawJsonEdits:o,settings:r,profileTarget:c="claude",imageAnalysisStatus:d,imageAnalysisStatusSource:f="saved",imageAnalysisStatusPreviewState:m="saved",nativeReadPreferenceOverride:p,onToggleNativeRead:g,onChange:S,missingRequiredFields:b=[]}){const x=b.length>0;return l.jsx(C.Suspense,{fallback:l.jsxs("div",{className:"flex items-center justify-center h-full",children:[l.jsx(kn,{className:"w-6 h-6 animate-spin text-muted-foreground"}),l.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading editor..."})]}),children:l.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[!a&&o!==null&&l.jsxs("div",{className:"mb-2 px-3 py-2 bg-destructive/10 text-destructive text-sm rounded-md flex items-center gap-2 mx-6 mt-4 shrink-0",children:[l.jsx(Ao,{className:"w-4 h-4"}),"Invalid JSON syntax"]}),a&&x&&l.jsxs("div",{className:"mb-2 px-3 py-2 bg-warning/10 text-warning-foreground text-sm rounded-md flex items-start gap-2 mx-6 mt-4 shrink-0 border border-warning/20",children:[l.jsx(Gn,{className:"w-4 h-4 mt-0.5 text-amber-500 shrink-0"}),l.jsxs("div",{children:[l.jsx("span",{className:"font-medium text-amber-600 dark:text-amber-400",children:"Missing required fields:"})," ",l.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:b.join(", ")}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"These fields will use default values at runtime."})]})]}),l.jsx("div",{className:"min-h-0 flex-1 overflow-hidden px-6 pb-4 pt-4",children:l.jsx("div",{className:"h-full border rounded-md overflow-hidden bg-background",children:l.jsx(JT,{value:n,onChange:S,language:"json",minHeight:"100%",heightMode:"fill-parent"})})}),l.jsx("div",{className:"mx-6 mb-4",children:l.jsx(ZT,{status:d,target:c,source:f,previewState:m,nativeReadPreferenceOverride:p,onToggleNativeRead:g})}),l.jsx("div",{className:"mx-6 mb-4",children:l.jsx("div",{className:"border rounded-md overflow-hidden",children:l.jsx(Rf,{profileEnv:r?.env})})})]})})}function Gy(n,a){try{var o=n()}catch(r){return a(r)}return o&&o.then?o.then(void 0,a):o}function ej(n,a){for(var o={};n.length;){var r=n[0],c=r.code,d=r.message,f=r.path.join(".");if(!o[f])if("unionErrors"in r){var m=r.unionErrors[0].errors[0];o[f]={message:m.message,type:m.code}}else o[f]={message:d,type:c};if("unionErrors"in r&&r.unionErrors.forEach(function(S){return S.errors.forEach(function(b){return n.push(b)})}),a){var p=o[f].types,g=p&&p[r.code];o[f]=$b(f,a,o,c,g?[].concat(g,r.message):r.message)}n.shift()}return o}function tj(n,a){for(var o={};n.length;){var r=n[0],c=r.code,d=r.message,f=r.path.join(".");if(!o[f])if(r.code==="invalid_union"&&r.errors.length>0){var m=r.errors[0][0];o[f]={message:m.message,type:m.code}}else o[f]={message:d,type:c};if(r.code==="invalid_union"&&r.errors.forEach(function(S){return S.forEach(function(b){return n.push(b)})}),a){var p=o[f].types,g=p&&p[r.code];o[f]=$b(f,a,o,c,g?[].concat(g,r.message):r.message)}n.shift()}return o}function nj(n,a,o){if(o===void 0&&(o={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(n))return function(r,c,d){try{return Promise.resolve(Gy(function(){return Promise.resolve(n[o.mode==="sync"?"parse":"parseAsync"](r,a)).then(function(f){return d.shouldUseNativeValidation&&Gg({},d),{errors:{},values:o.raw?Object.assign({},r):f}})},function(f){if((function(m){return Array.isArray(m?.issues)})(f))return{values:{},errors:Vg(ej(f.errors,!d.shouldUseNativeValidation&&d.criteriaMode==="all"),d)};throw f}))}catch(f){return Promise.reject(f)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(n))return function(r,c,d){try{return Promise.resolve(Gy(function(){return Promise.resolve((o.mode==="sync"?Bw:Kw)(n,r,a)).then(function(f){return d.shouldUseNativeValidation&&Gg({},d),{errors:{},values:o.raw?Object.assign({},r):f}})},function(f){if((function(m){return m instanceof qw})(f))return{values:{},errors:Vg(tj(f.issues,!d.shouldUseNativeValidation&&d.criteriaMode==="all"),d)};throw f}))}catch(f){return Promise.reject(f)}};throw new Error("Invalid input: not a Zod schema")}const aj={sm:{container:"w-6 h-6",icon:"w-4 h-4",text:"text-xs"},md:{container:"w-8 h-8",icon:"w-5 h-5",text:"text-sm"},lg:{container:"w-12 h-12",icon:"w-8 h-8",text:"text-lg"}};function ij({provider:n,className:a,size:o="md"}){const r=R1(n),c=aj[o],d=mx(n),f=z1(n);return l.jsx("div",{className:K("flex items-center justify-center rounded-md",d&&!f&&(_1(n)?"bg-gray-900 p-1":"bg-white p-1"),c.container,a),children:d?l.jsx("img",{src:d,alt:`${n} logo`,className:K(f?c.container:c.icon,"object-contain")}):l.jsx("span",{className:K("font-semibold",r.textClass,c.text),children:r.letter})})}function fP(){return kt({queryKey:["profiles"],queryFn:()=>He.profiles.list()})}function oj(){const n=rt();return st({mutationFn:a=>He.profiles.create(a),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Profile created successfully")},onError:a=>{le.error(a.message)}})}function hP(){const n=rt();return st({mutationFn:a=>He.profiles.delete(a),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Profile deleted successfully")},onError:a=>{le.error(a.message)}})}function mP(){return st({mutationFn:()=>He.profiles.discoverOrphans()})}function pP(){const n=rt();return st({mutationFn:a=>He.profiles.registerOrphans(a),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Orphan profiles registration complete")}})}function gP(){const n=rt();return st({mutationFn:({name:a,data:o})=>He.profiles.copy(a,o),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Profile copied successfully")}})}function yP(){return st({mutationFn:({name:n,includeSecrets:a})=>He.profiles.export(n,a??!1)})}function bP(){const n=rt();return st({mutationFn:a=>He.profiles.import(a),onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),le.success("Profile imported successfully")}})}const sj="https://openrouter.ai/api",Zx=Object.freeze({glmt:"glm",kimi:"km",alibaba:"alibaba-coding-plan",acp:"alibaba-coding-plan",hf:"huggingface"}),Jx=[{id:"openrouter",name:"OpenRouter",description:"349+ models from OpenAI, Anthropic, Google, Meta",baseUrl:sj,defaultProfileName:"openrouter",defaultModel:"anthropic/claude-opus-4.5",apiKeyPlaceholder:"sk-or-...",apiKeyHint:"Get your API key at openrouter.ai/keys",category:"recommended",requiresApiKey:!0,badge:"349+ models",featured:!0,icon:"/icons/openrouter.svg"},{id:"alibaba-coding-plan",name:"Alibaba Coding Plan",description:"Alibaba Cloud Coding Plan via Anthropic-compatible endpoint",baseUrl:"https://coding-intl.dashscope.aliyuncs.com/apps/anthropic",defaultProfileName:"albb",defaultModel:"qwen3-coder-plus",apiKeyPlaceholder:"sk-sp-...",apiKeyHint:"Get your Coding Plan key from Alibaba Cloud Model Studio",category:"recommended",requiresApiKey:!0,badge:"Coding Plan",featured:!0,icon:"/assets/providers/alibabacloud-color.svg"},{id:"ollama",name:"Ollama (Local)",description:"Local open-source models via Ollama (32K+ context)",baseUrl:"http://localhost:11434",defaultProfileName:"ollama",defaultModel:"qwen3-coder",apiKeyPlaceholder:"ollama",apiKeyHint:"Install Ollama from ollama.com - no API key needed for local",category:"recommended",requiresApiKey:!1,badge:"Local",featured:!0,icon:"/icons/ollama.svg"},{id:"llamacpp",name:"llama.cpp (Local)",description:"Local inference via llama.cpp (LLaMA models)",baseUrl:"http://127.0.0.1:8080",defaultProfileName:"llamacpp",defaultModel:"llama3-8b",apiKeyPlaceholder:"llamacpp",apiKeyHint:"Run llama.cpp server: ./server --host 0.0.0.0 --port 8080 -m model.gguf",category:"recommended",requiresApiKey:!1,badge:"Local",featured:!0,icon:"/assets/providers/llama-cpp.svg"},{id:"anthropic",name:"Anthropic (Direct API)",description:"Use your own Anthropic API key (sk-ant-...)",baseUrl:"",defaultProfileName:"anthropic",defaultModel:"claude-sonnet-4-5-20250929",apiKeyPlaceholder:"sk-ant-api03-...",apiKeyHint:"Get key at console.anthropic.com/settings/keys",category:"recommended",requiresApiKey:!0,badge:"Direct",featured:!0,icon:"/assets/providers/claude.svg"},{id:"huggingface",name:"Hugging Face",description:"Inference Providers router via OpenAI-compatible chat completions",baseUrl:"https://router.huggingface.co/v1",defaultProfileName:"hf",defaultModel:"openai/gpt-oss-120b:fastest",apiKeyPlaceholder:"hf_...",apiKeyHint:"Create a User Access Token at hf.co/settings/tokens",category:"alternative",requiresApiKey:!0,defaultTarget:"droid",badge:"Router"},{id:"glm",name:"GLM",description:"Direct Z.AI Anthropic-compatible API profile",baseUrl:"https://api.z.ai/api/anthropic",defaultProfileName:"glm",defaultModel:"glm-5",apiKeyPlaceholder:"ghp_...",apiKeyHint:"Get your API key from Z.AI",category:"alternative",requiresApiKey:!0,badge:"Z.AI",icon:"/icons/zai.svg"},{id:"km",name:"Kimi",description:"Moonshot AI - Fast reasoning model",baseUrl:"https://api.kimi.com/coding/",defaultProfileName:"km",defaultModel:"kimi-k2-thinking-turbo",apiKeyPlaceholder:"sk-...",apiKeyHint:"Get your API key from Moonshot AI",category:"alternative",requiresApiKey:!0,alwaysThinkingEnabled:!0,badge:"Reasoning",icon:"/icons/kimi.svg"},{id:"foundry",name:"Azure Foundry",description:"Claude via Microsoft Azure AI Foundry",baseUrl:"https://<your-resource>.services.ai.azure.com/api/anthropic",defaultProfileName:"foundry",defaultModel:"claude-sonnet-4-5",apiKeyPlaceholder:"YOUR_AZURE_API_KEY",apiKeyHint:"Create resource at ai.azure.com, get API key from Keys tab",category:"alternative",requiresApiKey:!0,badge:"Azure",icon:"/icons/azure.svg"},{id:"mm",name:"Minimax",description:"M2.1/M2.1-lightning/M2 - multilang coding (1M context)",baseUrl:"https://api.minimax.io/anthropic",defaultProfileName:"mm",defaultModel:"MiniMax-M2.1",apiKeyPlaceholder:"YOUR_MINIMAX_API_KEY_HERE",apiKeyHint:"Get your API key at platform.minimax.io",category:"alternative",requiresApiKey:!0,badge:"1M context",icon:"/icons/minimax.svg"},{id:"deepseek",name:"DeepSeek",description:"V3.2 and R1 reasoning model (128K context)",baseUrl:"https://api.deepseek.com/anthropic",defaultProfileName:"deepseek",defaultModel:"deepseek-chat",apiKeyPlaceholder:"sk-...",apiKeyHint:"Get your API key at platform.deepseek.com",category:"alternative",requiresApiKey:!0,badge:"Reasoning",icon:"/icons/deepseek.svg"},{id:"qwen",name:"Qwen",description:"Alibaba Cloud - Qwen3 models (256K-1M context, thinking support)",baseUrl:"https://dashscope-intl.aliyuncs.com/apps/anthropic",defaultProfileName:"qwen-api",defaultModel:"qwen3-coder-plus",apiKeyPlaceholder:"sk-...",apiKeyHint:"Get your API key from Alibaba Cloud Model Studio",category:"alternative",requiresApiKey:!0,badge:"Alibaba",icon:"/assets/providers/qwen-color.svg"},{id:"ollama-cloud",name:"Ollama Cloud",description:"Ollama cloud models via direct API (glm-5:cloud, minimax-m2.1:cloud)",baseUrl:"https://ollama.com",defaultProfileName:"ollama-cloud",defaultModel:"glm-5:cloud",apiKeyPlaceholder:"YOUR_OLLAMA_CLOUD_API_KEY",apiKeyHint:"Get your API key at ollama.com",category:"alternative",requiresApiKey:!0,badge:"Cloud",icon:"/icons/ollama.svg"},{id:"novita",name:"Novita AI",description:"Anthropic-compatible API for Claude Code and CCS profiles",baseUrl:"https://api.novita.ai/anthropic",defaultProfileName:"novita",defaultModel:"deepseek/deepseek-v3.2",apiKeyPlaceholder:"YOUR_NOVITA_API_KEY",apiKeyHint:"Get your API key at novita.ai",category:"alternative",requiresApiKey:!0,badge:"Anthropic-compatible",icon:"/icons/novita.svg"}];function ev(n){return{...n,extraEnv:n.extraEnv?{...n.extraEnv}:void 0}}function rj(n){const a=ev(n);return a.extraEnv&&Object.freeze(a.extraEnv),Object.freeze(a)}function lj(n,a){const o=new Set;for(const c of n){const d=c.id.trim().toLowerCase();if(c.id!==d)throw new Error(`Preset ID must be normalized: "${c.id}"`);if(o.has(c.id))throw new Error(`Duplicate preset ID detected: "${c.id}"`);o.add(c.id)}const r=new Set;for(const[c,d]of Object.entries(a)){const f=c.trim().toLowerCase();if(!f)throw new Error("Preset alias keys cannot be empty");if(c!==f)throw new Error(`Preset alias must be normalized: "${c}"`);if(r.has(f))throw new Error(`Duplicate normalized preset alias detected: "${c}"`);if(r.add(f),!o.has(d))throw new Error(`Preset alias "${c}" points to unknown target "${d}"`);if(o.has(f))throw new Error(`Preset alias "${c}" collides with canonical preset ID "${f}"`)}}lj(Jx,Zx);const cj=Object.freeze(Jx.map(rj));function uj(){return cj.map(ev)}function dj(n){const a=n.trim().toLowerCase();return Zx[a]||a}const fj=uj(),zf=Object.freeze(fj.map(n=>({...n})));function hj(n,a){return a||(n?.requiresApiKey===!1?n.apiKeyPlaceholder||n.id:"")}function mj(n){return zf.filter(a=>a.category===n)}function wd(n){const a=dj(n);return zf.find(o=>o.id===a)}const pj=Za().refine(n=>n.trim().length===0||Za().url().safeParse(n).success,{message:"Invalid URL format"}),gj=Fw({name:Za().min(1,"Name is required").regex(/^[a-zA-Z][a-zA-Z0-9._-]*$/,"Must start with letter, only letters/numbers/.-_"),baseUrl:pj,apiKey:Za(),model:Za().optional(),opusModel:Za().optional(),sonnetModel:Za().optional(),haikuModel:Za().optional(),target:Gw(["claude","droid","codex"])}),yj=["/chat/completions","/v1/messages","/messages","/completions"],Ni="custom",Nd="openrouter",tv=new Set(["ollama","llamacpp"]),kd={name:"",baseUrl:"",apiKey:"",model:"",opusModel:"",sonnetModel:"",haikuModel:"",target:"claude"},nv=mj("recommended"),bj=nv.filter(n=>!tv.has(n.id)),xj=nv.filter(n=>tv.has(n.id)),vj=zf.filter(n=>n.category!=="recommended");function xP({open:n,onOpenChange:a,onSuccess:o,initialMode:r="openrouter"}){const{t:c}=Et(),d=oj(),[f,m]=C.useState("basic"),[p,g]=C.useState(null),[S,b]=C.useState(!1),[x,j]=C.useState(Nd),[N,E]=C.useState(""),{models:L}=GT(),{register:O,handleSubmit:D,formState:{errors:A},control:k,reset:T,setValue:w}=Vw({resolver:nj(gj),defaultValues:kd}),R=Yg({control:k,name:"baseUrl"}),I=Yg({control:k,name:"target"}),z=C.useCallback($=>{if(!$){T(kd);return}T({...kd,name:$.defaultProfileName,baseUrl:$.baseUrl,model:$.defaultModel,opusModel:$.defaultModel,sonnetModel:$.defaultModel,haikuModel:$.defaultModel,target:$.defaultTarget??"claude"})},[T]),F=C.useMemo(()=>x===Ni?null:wd(x)??null,[x]),ee=C.useMemo(()=>N.trim()?[...RT(L,N)].sort((oe,ue)=>(ue.created??0)-(oe.created??0)).slice(0,20):BT(L,2),[L,N]);C.useEffect(()=>{if(n)if(m("basic"),g(null),b(!1),E(""),r==="normal")j(Ni),z(null);else{const oe=wd(r==="openrouter"?Nd:r);if(oe){j(oe.id),z(oe);return}j(Ni),z(null)}},[n,r,z,T]);const Q=$=>{const oe=wd($);if(oe){j(oe.id),z(oe);return}j(Ni),z(null)},ge=$=>{w("model",$.id),w("opusModel",$.id),w("sonnetModel",$.id),w("haikuModel",$.id),E($.name),le.success(`Applied "${$.name}" to all model tiers`,{duration:2e3})};C.useEffect(()=>{if(R&&x===Ni){const oe=R.toLowerCase();for(const ue of yj)if(oe.endsWith(ue)){const he=R.replace(new RegExp(ue+"$","i"),"");g(`URL ends with "${ue}" - Claude appends this automatically. You likely want: ${he}`);return}}g(null)},[R,x]);const te=async $=>{if(F?.requiresApiKey!==!1&&!$.apiKey){le.error(Fe.t("commonToast.apiKeyRequired"));return}const oe={...$,apiKey:hj(F,$.apiKey)};try{await d.mutateAsync(oe),le.success(`Profile "${oe.name}" created`),o(oe.name),a(!1)}catch(ue){le.error(ue.message||"Failed to create profile")}},ve=!!A.name||!!A.baseUrl||!!A.apiKey,U=!!A.model||!!A.opusModel||!!A.sonnetModel||!!A.haikuModel,Z=d.isPending,ne=F?.id===Nd;return l.jsx(pf,{open:n,onOpenChange:a,children:l.jsxs(gf,{className:"sm:max-w-[700px] p-0 gap-0 overflow-hidden max-h-[90vh] !flex !flex-col",children:[l.jsxs(yf,{className:"p-6 pb-4 border-b",children:[l.jsxs(bf,{className:"flex items-center gap-2",children:[l.jsx(Bg,{className:"w-5 h-5 text-primary"}),"Create API Profile"]}),l.jsx(xf,{children:"Choose a provider preset or configure a custom API endpoint."})]}),l.jsxs("form",{onSubmit:D(te),className:"flex flex-col flex-1 min-h-0 overflow-hidden",children:[l.jsx("div",{className:"border-b bg-muted/10 px-6 py-3 space-y-3",children:l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx(qt,{className:"text-xs text-muted-foreground",children:c("profileEditor.provider")}),l.jsx("p",{className:"text-xs text-muted-foreground",children:c("profileEditor.providerChooserHint")})]}),l.jsx("span",{className:"pt-0.5 text-[11px] text-muted-foreground",children:c("profileEditor.scrollHint")})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(qt,{className:"text-xs font-medium uppercase tracking-[0.12em] text-foreground/70",children:c("profileEditor.featuredProviders")}),l.jsx("div",{className:"-mx-1 overflow-x-auto pb-1",children:l.jsxs("div",{className:"flex min-w-max items-stretch gap-2 px-1",children:[bj.map($=>l.jsx(Ad,{preset:$,isSelected:x===$.id,onClick:()=>Q($.id),density:"featured"},$.id)),l.jsx("div",{className:"mx-1 hidden w-px rounded-full bg-border/70 sm:block"}),l.jsx(Cj,{isSelected:x===Ni,onClick:()=>Q(Ni)})]})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(qt,{className:"text-xs font-medium uppercase tracking-[0.12em] text-foreground/70",children:c("profileEditor.morePresets")}),l.jsx("div",{className:"-mx-1 overflow-x-auto pb-1",children:l.jsx("div",{className:"flex min-w-max items-stretch gap-2 px-1",children:vj.map($=>l.jsx(Ad,{preset:$,isSelected:x===$.id,onClick:()=>Q($.id),density:"compact"},$.id))})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(qt,{className:"text-xs font-medium uppercase tracking-[0.12em] text-foreground/70",children:"Local Runtimes"}),l.jsx("div",{className:"flex flex-wrap gap-2",children:xj.map($=>l.jsx(Ad,{preset:$,isSelected:x===$.id,onClick:()=>Q($.id),density:"compact"},$.id))})]})]})}),l.jsxs($x,{value:f,onValueChange:m,className:"flex flex-col flex-1 min-h-0 overflow-hidden",children:[l.jsx("div",{className:"px-6 pt-4",children:l.jsxs(Pf,{className:"grid w-full grid-cols-2",children:[l.jsxs(jl,{value:"basic",className:"relative",children:["Basic Information",ve&&l.jsx("span",{className:"absolute top-1 right-2 w-2 h-2 rounded-full bg-destructive animate-pulse"})]}),l.jsxs(jl,{value:"models",className:"relative",children:["Model Configuration",U&&l.jsx("span",{className:"absolute top-1 right-2 w-2 h-2 rounded-full bg-destructive animate-pulse"})]})]})}),l.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[l.jsxs(Yd,{value:"basic",className:"p-6 space-y-4 mt-0",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs(qt,{htmlFor:"name",children:["Profile Name ",l.jsx("span",{className:"text-destructive",children:"*"})]}),l.jsx(Hn,{id:"name",...O("name"),placeholder:"my-api",className:"font-mono"}),A.name?l.jsx("p",{className:"text-xs text-destructive",children:A.name.message}):l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Used in CLI:"," ",l.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:'ccs my-api "prompt"'})]})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(qt,{htmlFor:"baseUrl",children:"API Base URL"}),l.jsx(Hn,{id:"baseUrl",...O("baseUrl"),placeholder:"https://api.example.com/v1"}),A.baseUrl?l.jsx("p",{className:"text-xs text-destructive",children:A.baseUrl.message}):p?l.jsxs("div",{className:"flex items-start gap-2 text-xs text-yellow-600 bg-yellow-50 dark:bg-yellow-900/20 p-2 rounded",children:[l.jsx(Gn,{className:"w-4 h-4 shrink-0 mt-0.5"}),l.jsx("span",{children:p})]}):F?l.jsx("p",{className:"text-xs text-muted-foreground",children:F.baseUrl?`Pre-filled from ${F.name}. You can customize if needed.`:`Optional for ${F.name}. Leave blank to use native Anthropic auth.`}):l.jsx("p",{className:"text-xs text-muted-foreground",children:"The endpoint that accepts OpenAI-compatible and Anthropic requests"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs(qt,{htmlFor:"apiKey",children:["API Key"," ",F?.requiresApiKey!==!1&&l.jsx("span",{className:"text-destructive",children:"*"}),F?.requiresApiKey===!1&&l.jsx("span",{className:"text-muted-foreground text-xs font-normal",children:"(optional)"})]}),l.jsxs("div",{className:"relative",children:[l.jsx(Hn,{id:"apiKey",type:S?"text":"password",...O("apiKey"),placeholder:F?.requiresApiKey===!1?"Optional - only if auth is enabled":F?.apiKeyPlaceholder??"sk-...",className:"pr-10"}),l.jsx(ot,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-9 w-9 text-muted-foreground hover:text-foreground",onClick:()=>b(!S),tabIndex:-1,children:S?l.jsx(Vs,{className:"h-4 w-4"}):l.jsx(Ys,{className:"h-4 w-4"})})]}),A.apiKey?l.jsx("p",{className:"text-xs text-destructive",children:A.apiKey.message}):F?.requiresApiKey===!1?l.jsx("p",{className:"text-xs text-muted-foreground",children:"Only needed if your local endpoint has authentication enabled"}):F?.apiKeyHint&&l.jsx("p",{className:"text-xs text-muted-foreground",children:F.apiKeyHint})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(qt,{htmlFor:"target",children:"Default Target CLI"}),l.jsxs(px,{value:I,onValueChange:$=>w("target",$),children:[l.jsx(Nf,{id:"target",children:l.jsx(gx,{})}),l.jsxs(kf,{children:[l.jsx(_s,{value:"claude",children:"Claude Code (default)"}),l.jsx(_s,{value:"droid",children:"Factory Droid"}),l.jsx(_s,{value:"codex",children:"Codex CLI"})]})]}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:[I==="droid"?l.jsxs(l.Fragment,{children:[c("profileEditor.targetHintPreferredAlias")," ",l.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:"ccs-droid"}),"."]}):I==="codex"?l.jsxs(l.Fragment,{children:[c("profileEditor.targetHintPreferredAlias")," ",l.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:"ccsx"}),"."]}):l.jsxs(l.Fragment,{children:[c("profileEditor.targetHintClaudeDefault")," ",l.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:"ccs"}),"."]}),I==="droid"?l.jsxs(l.Fragment,{children:[" ",c("profileEditor.targetHintLegacyAlias")," ",l.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:"ccsd"}),"."]}):I==="codex"?l.jsxs(l.Fragment,{children:[" ",c("profileEditor.targetHintLegacyAlias")," ",l.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:"ccs-codex"}),"."]}):null," ",c("profileEditor.targetHintOverride")," ",l.jsx("code",{className:"bg-muted px-1 rounded text-[10px]",children:"--target"}),"."]})]})]}),l.jsxs(Yd,{value:"models",className:"p-6 mt-0 space-y-4",children:[l.jsxs("div",{className:"flex items-start gap-3 p-3 bg-blue-50 dark:bg-blue-950/20 text-blue-800 dark:text-blue-300 rounded-md text-sm border border-blue-100 dark:border-blue-900/30",children:[l.jsx(Rl,{className:"w-5 h-5 shrink-0 mt-0.5"}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium mb-1",children:"Model Mapping"}),l.jsx("p",{className:"text-xs opacity-90",children:"Map Claude Code tiers (Opus/Sonnet/Haiku) to models supported by your provider."})]})]}),ne&&l.jsxs("div",{className:"space-y-2",children:[l.jsx(qt,{children:"Search Models"}),l.jsx(Hn,{value:N,onChange:$=>E($.target.value),placeholder:"Type to search (e.g., opus, sonnet, gpt-4o)...",onKeyDown:$=>{$.key==="Enter"&&ee.length>0&&($.preventDefault(),ge(ee[0]))}}),l.jsx("div",{className:"border rounded-md max-h-48 overflow-y-auto",children:ee.length===0?l.jsx("p",{className:"text-sm text-muted-foreground p-3 text-center",children:N?`No models found for "${N}"`:"Loading models..."}):l.jsxs("div",{className:"p-1",children:[!N&&l.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 text-xs text-muted-foreground",children:[l.jsx(tw,{className:"w-3 h-3 text-accent"}),l.jsx("span",{children:"Newest Models"})]}),ee.map($=>l.jsx(Sj,{model:$,onClick:()=>ge($),showAge:!N},$.id))]})})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs(qt,{htmlFor:"model",children:["Default Model",l.jsx(Ut,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"ANTHROPIC_MODEL"})]}),l.jsx(Hn,{id:"model",...O("model"),placeholder:F?.defaultModel??"claude-sonnet-4",className:"font-mono text-sm"})]}),l.jsxs("div",{className:"grid gap-3 pt-2 border-t",children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs(qt,{htmlFor:"sonnetModel",className:"text-sm",children:["Sonnet Mapping",l.jsx(Ut,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"DEFAULT_SONNET"})]}),l.jsx(Hn,{id:"sonnetModel",...O("sonnetModel"),placeholder:"e.g. gpt-4o, claude-sonnet-4",className:"font-mono text-sm h-9"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs(qt,{htmlFor:"opusModel",className:"text-sm",children:["Opus Mapping",l.jsx(Ut,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"DEFAULT_OPUS"})]}),l.jsx(Hn,{id:"opusModel",...O("opusModel"),placeholder:"e.g. o1, claude-opus-4.5",className:"font-mono text-sm h-9"})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsxs(qt,{htmlFor:"haikuModel",className:"text-sm",children:["Haiku Mapping",l.jsx(Ut,{variant:"outline",className:"ml-2 text-[10px] font-mono",children:"DEFAULT_HAIKU"})]}),l.jsx(Hn,{id:"haikuModel",...O("haikuModel"),placeholder:"e.g. gpt-4o-mini, claude-3.5-haiku",className:"font-mono text-sm h-9"})]})]})]})]})]}),l.jsxs(k1,{className:"p-6 pt-4 border-t bg-muted/10",children:[l.jsx(ot,{type:"button",variant:"outline",onClick:()=>a(!1),children:"Cancel"}),l.jsx(ot,{type:"submit",disabled:Z,className:K(Z&&"opacity-80"),children:Z?l.jsxs(l.Fragment,{children:[l.jsx(kn,{className:"w-4 h-4 mr-2 animate-spin"}),"Creating..."]}):l.jsxs(l.Fragment,{children:[l.jsx(Bg,{className:"w-4 h-4 mr-2"}),"Create Profile"]})})]})]})]})]})})}function Ad({preset:n,isSelected:a,onClick:o,density:r="compact"}){const c=n.id==="anthropic",d=r==="featured";return l.jsxs("button",{type:"button",onClick:o,className:K("flex flex-none items-center gap-3 rounded-xl border px-3 py-2.5 text-left transition-all",d?"h-[68px] w-[236px]":"h-[64px] w-[168px]",a?"border-primary bg-primary/8 shadow-sm ring-1 ring-primary/10":"border-border/60 bg-background hover:border-primary/40 hover:bg-accent/20"),children:[l.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-border/60 bg-background",children:c?l.jsx(ij,{provider:"claude",size:"md",className:"rounded-lg"}):n.icon?l.jsx("img",{src:n.icon,alt:"",className:"h-5 w-5 object-contain"}):l.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-muted/70 text-xs font-semibold text-foreground/70",children:n.name.charAt(0)})}),l.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("div",{className:"truncate text-[13px] font-semibold leading-tight tracking-[-0.01em]",children:n.name}),n.badge&&d&&l.jsx(Ut,{variant:"secondary",className:"inline-flex bg-muted px-1.5 py-0 text-[10px] text-muted-foreground",children:n.badge})]}),n.badge&&!d&&l.jsx(Ut,{variant:"secondary",className:"inline-flex w-fit bg-muted px-1.5 py-0 text-[10px] text-muted-foreground",children:n.badge})]})]})}function Cj({isSelected:n,onClick:a}){const{t:o}=Et();return l.jsxs("button",{type:"button",onClick:a,className:K("flex h-[68px] w-[236px] flex-none items-center gap-3 rounded-xl border border-dashed px-3 py-2.5 text-left transition-all",n?"border-primary bg-primary/8 shadow-sm ring-1 ring-primary/10":"border-muted-foreground/30 bg-background hover:border-primary/40 hover:bg-accent/20"),children:[l.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-dashed border-current/30 bg-muted/70",children:l.jsx(af,{className:"h-4 w-4 text-muted-foreground"})}),l.jsx("div",{className:"min-w-0 flex-1",children:l.jsx("div",{className:"text-sm font-semibold leading-tight",children:o("profileEditor.customEndpoint")})})]})}function Sj({model:n,onClick:a,showAge:o}){return l.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",children:[l.jsx("span",{className:"flex-1 truncate",children:n.name}),l.jsxs("span",{className:"text-muted-foreground group-hover:text-accent-foreground/80 ml-2 flex items-center gap-2 text-xs",children:[o&&n.created&&l.jsx(Ut,{variant:"outline",className:"text-[10px] text-accent group-hover:text-accent-foreground/80 group-hover:border-accent-foreground/30",children:KT(n.created)}),n.isFree?l.jsx(Ut,{variant:"secondary",className:"text-xs group-hover:bg-accent-foreground/20 group-hover:text-accent-foreground",children:"Free"}):l.jsx("span",{children:OT(n.pricing)}),l.jsx("span",{children:UT(n.context_length)})]})]})}function wj({className:n,...a}){return l.jsx("div",{"data-slot":"card",className:K("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",n),...a})}function Nj({className:n,...a}){return l.jsx("div",{"data-slot":"card-header",className:K("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",n),...a})}function kj({className:n,...a}){return l.jsx("div",{"data-slot":"card-title",className:K("leading-none font-semibold",n),...a})}function Aj({className:n,...a}){return l.jsx("div",{"data-slot":"card-description",className:K("text-muted-foreground text-sm",n),...a})}function Dj({className:n,...a}){return l.jsx("div",{"data-slot":"card-content",className:K("px-6",n),...a})}const If="[1m]",Uf=["ANTHROPIC_MODEL","ANTHROPIC_DEFAULT_OPUS_MODEL","ANTHROPIC_DEFAULT_SONNET_MODEL","ANTHROPIC_DEFAULT_HAIKU_MODEL"],Tj=new Set(Uf);function vP(n){return n.toLowerCase().startsWith("gemini-")}function Hf(n){return n.toLowerCase().endsWith(If.toLowerCase())}function jj(n){return!n||Hf(n)?n:`${n}${If}`}function av(n){return n&&(Hf(n)?n.slice(0,-If.length):n)}function CP(n){return Tj.has(n)}function Mj(n){return av(n.trim()).replace(/\([^)]+\)$/,"")}function SP(n){return Uf.some(a=>{const o=n[a];return typeof o=="string"&&Hf(o)})}function wP(n,a,o={}){const r={...n};for(const c of Uf){const d=r[c];if(typeof d!="string"||d.trim().length===0)continue;const f=Mj(d),m=o.supportsExtendedContext?.(f,c)??!0;r[c]=a&&m?jj(d):av(d)}return r}const Ej=["agy","claude","gemini","codex","qwen","kimi","iflow","kiro","ghcp"],NP=Ej.map(n=>({id:n,name:wf(n),description:U1(n)})),Oj=["provider","auth","variant","success"];function kP(n){return n==="account"?1:Oj.indexOf(n)}const AP=gS,DP=bS,TP=yS,Pj=C.forwardRef(({className:n,align:a="center",sideOffset:o=4,...r},c)=>l.jsx(pS,{children:l.jsx(Pb,{ref:c,align:a,sideOffset:o,className:K("z-50 w-80 max-w-[calc(100vw-2rem)] rounded-lg border border-border/70 bg-popover p-4 text-popover-foreground shadow-xl shadow-black/10 outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n),...r})}));Pj.displayName=Pb.displayName;const Lj=C.lazy(()=>at(()=>Promise.resolve().then(()=>Ql),void 0).then(n=>({default:n.CodeEditor})));function jP({rawJsonContent:n,isRawJsonValid:a,rawJsonEdits:o,onRawJsonChange:r,profileEnv:c,missingRequiredFields:d=[]}){const f=d.length>0;return l.jsx(C.Suspense,{fallback:l.jsxs("div",{className:"flex items-center justify-center h-full",children:[l.jsx(kn,{className:"w-6 h-6 animate-spin text-muted-foreground"}),l.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading editor..."})]}),children:l.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[!a&&o!==null&&l.jsxs("div",{className:"mb-2 px-3 py-2 bg-destructive/10 text-destructive text-sm rounded-md flex items-center gap-2 mx-6 mt-4 shrink-0",children:[l.jsx(Ao,{className:"w-4 h-4"}),"Invalid JSON syntax"]}),a&&f&&l.jsxs("div",{className:"mb-2 px-3 py-2 bg-warning/10 text-warning-foreground text-sm rounded-md flex items-start gap-2 mx-6 mt-4 shrink-0 border border-warning/20",children:[l.jsx(Gn,{className:"w-4 h-4 mt-0.5 text-amber-500 shrink-0"}),l.jsxs("div",{children:[l.jsx("span",{className:"font-medium text-amber-600 dark:text-amber-400",children:"Missing required fields:"})," ",l.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:d.join(", ")}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Apply a preset from Model Config tab or add these fields manually. Without them, Claude Code will fail with 404 errors."})]})]}),l.jsx("div",{className:"min-h-0 flex-1 overflow-hidden px-6 pb-4 pt-4",children:l.jsx("div",{className:"h-full border rounded-md overflow-hidden bg-background",children:l.jsx(Lj,{value:n,onChange:r,language:"json",minHeight:"100%",heightMode:"fill-parent"})})}),l.jsx("div",{className:"mx-6 mb-4",children:l.jsx("div",{className:"border rounded-md overflow-hidden",children:l.jsx(Rf,{profileEnv:c})})})]})})}var Xt={},Vy;function Rj(){if(Vy)return Xt;Vy=1;var n=Xt&&Xt.__assign||function(){return n=Object.assign||function(T){for(var w,R=1,I=arguments.length;R<I;R++){w=arguments[R];for(var z in w)Object.prototype.hasOwnProperty.call(w,z)&&(T[z]=w[z])}return T},n.apply(this,arguments)},a=Xt&&Xt.__createBinding||(Object.create?(function(T,w,R,I){I===void 0&&(I=R);var z=Object.getOwnPropertyDescriptor(w,R);(!z||("get"in z?!w.__esModule:z.writable||z.configurable))&&(z={enumerable:!0,get:function(){return w[R]}}),Object.defineProperty(T,I,z)}):(function(T,w,R,I){I===void 0&&(I=R),T[I]=w[R]})),o=Xt&&Xt.__setModuleDefault||(Object.create?(function(T,w){Object.defineProperty(T,"default",{enumerable:!0,value:w})}):function(T,w){T.default=w}),r=Xt&&Xt.__importStar||function(T){if(T&&T.__esModule)return T;var w={};if(T!=null)for(var R in T)R!=="default"&&Object.prototype.hasOwnProperty.call(T,R)&&a(w,T,R);return o(w,T),w},c=Xt&&Xt.__rest||function(T,w){var R={};for(var I in T)Object.prototype.hasOwnProperty.call(T,I)&&w.indexOf(I)<0&&(R[I]=T[I]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function")for(var z=0,I=Object.getOwnPropertySymbols(T);z<I.length;z++)w.indexOf(I[z])<0&&Object.prototype.propertyIsEnumerable.call(T,I[z])&&(R[I[z]]=T[I[z]]);return R};Object.defineProperty(Xt,"__esModule",{value:!0});var d=r(Zd()),f=89,m=90,p=77,g=57,S=219,b=222,x=192,j=100,N=3e3,E=typeof window<"u"&&"navigator"in window&&/Win/i.test(navigator.platform),L=typeof window<"u"&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),O="npm__react-simple-code-editor__textarea",D=`
|
|
18
|
-
/**
|
|
19
|
-
* Reset the text fill color so that placeholder is visible
|
|
20
|
-
*/
|
|
21
|
-
.`.concat(O,`:empty {
|
|
22
|
-
-webkit-text-fill-color: inherit !important;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Hack to apply on some CSS on IE10 and IE11
|
|
27
|
-
*/
|
|
28
|
-
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
|
|
29
|
-
/**
|
|
30
|
-
* IE doesn't support '-webkit-text-fill-color'
|
|
31
|
-
* So we use 'color: transparent' to make the text transparent on IE
|
|
32
|
-
* Unlike other browsers, it doesn't affect caret color in IE
|
|
33
|
-
*/
|
|
34
|
-
.`).concat(O,` {
|
|
35
|
-
color: transparent !important;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.`).concat(O,`::selection {
|
|
39
|
-
background-color: #accef7 !important;
|
|
40
|
-
color: transparent !important;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
`),A=d.forwardRef(function(w,R){var I=w.autoFocus,z=w.disabled,F=w.form,ee=w.highlight,Q=w.ignoreTabKey,ge=Q===void 0?!1:Q,te=w.insertSpaces,ve=te===void 0?!0:te,U=w.maxLength,Z=w.minLength,ne=w.name,$=w.onBlur,oe=w.onClick,ue=w.onFocus,he=w.onKeyDown,X=w.onKeyUp,ae=w.onValueChange,de=w.padding,ie=de===void 0?0:de,re=w.placeholder,ye=w.preClassName,De=w.readOnly,ze=w.required,Xe=w.style,Ce=w.tabSize,Oe=Ce===void 0?2:Ce,Ge=w.textareaClassName,Dt=w.textareaId,Ot=w.value,Yn=c(w,["autoFocus","disabled","form","highlight","ignoreTabKey","insertSpaces","maxLength","minLength","name","onBlur","onClick","onFocus","onKeyDown","onKeyUp","onValueChange","padding","placeholder","preClassName","readOnly","required","style","tabSize","textareaClassName","textareaId","value"]),je=d.useRef({stack:[],offset:-1}),Jt=d.useRef(null),Pn=d.useState(!0),en=Pn[0],Da=Pn[1],$n={paddingTop:typeof ie=="object"?ie.top:ie,paddingRight:typeof ie=="object"?ie.right:ie,paddingBottom:typeof ie=="object"?ie.bottom:ie,paddingLeft:typeof ie=="object"?ie.left:ie},yt=ee(Ot),tn=function(J,Pe){return J.substring(0,Pe).split(`
|
|
44
|
-
`)},Wn=d.useCallback(function(J,Pe){var Se,Le,dt;Pe===void 0&&(Pe=!1);var pe=je.current,Te=pe.stack,we=pe.offset;if(Te.length&&we>-1){je.current.stack=Te.slice(0,we+1);var Re=je.current.stack.length;if(Re>j){var lt=Re-j;je.current.stack=Te.slice(lt,Re),je.current.offset=Math.max(je.current.offset-lt,0)}}var ke=Date.now();if(Pe){var Ht=je.current.stack[je.current.offset];if(Ht&&ke-Ht.timestamp<N){var Xn=/[^a-z0-9]([a-z0-9]+)$/i,Tt=(Se=tn(Ht.value,Ht.selectionStart).pop())===null||Se===void 0?void 0:Se.match(Xn),nn=(Le=tn(J.value,J.selectionStart).pop())===null||Le===void 0?void 0:Le.match(Xn);if(Tt?.[1]&&(!((dt=nn?.[1])===null||dt===void 0)&&dt.startsWith(Tt[1]))){je.current.stack[je.current.offset]=n(n({},J),{timestamp:ke});return}}}je.current.stack.push(n(n({},J),{timestamp:ke})),je.current.offset++},[]),ni=d.useCallback(function(){var J=Jt.current;if(J){var Pe=J.value,Se=J.selectionStart,Le=J.selectionEnd;Wn({value:Pe,selectionStart:Se,selectionEnd:Le})}},[Wn]),Ln=function(J){var Pe=Jt.current;Pe&&(Pe.value=J.value,Pe.selectionStart=J.selectionStart,Pe.selectionEnd=J.selectionEnd,ae?.(J.value))},Rn=function(J){var Pe=Jt.current,Se=je.current.stack[je.current.offset];Se&&Pe&&(je.current.stack[je.current.offset]=n(n({},Se),{selectionStart:Pe.selectionStart,selectionEnd:Pe.selectionEnd})),Wn(J),Ln(J)},Ei=function(){var J=je.current,Pe=J.stack,Se=J.offset,Le=Pe[Se-1];Le&&(Ln(Le),je.current.offset=Math.max(Se-1,0))},To=function(){var J=je.current,Pe=J.stack,Se=J.offset,Le=Pe[Se+1];Le&&(Ln(Le),je.current.offset=Math.min(Se+1,Pe.length-1))},jo=function(J){if(!(he&&(he(J),J.defaultPrevented))){J.key==="Escape"&&J.currentTarget.blur();var Pe=J.currentTarget,Se=Pe.value,Le=Pe.selectionStart,dt=Pe.selectionEnd,pe=(ve?" ":" ").repeat(Oe);if(J.key==="Tab"&&!ge&&en)if(J.preventDefault(),J.shiftKey){var Te=tn(Se,Le),we=Te.length-1,Re=tn(Se,dt).length-1,lt=Se.split(`
|
|
45
|
-
`).map(function(Zn,Oi){return Oi>=we&&Oi<=Re&&Zn.startsWith(pe)?Zn.substring(pe.length):Zn}).join(`
|
|
46
|
-
`);if(Se!==lt){var ke=Te[we];Rn({value:lt,selectionStart:ke?.startsWith(pe)?Le-pe.length:Le,selectionEnd:dt-(Se.length-lt.length)})}}else if(Le!==dt){var Te=tn(Se,Le),Ht=Te.length-1,Xn=tn(Se,dt).length-1,ke=Te[Ht];Rn({value:Se.split(`
|
|
47
|
-
`).map(function(Oo,Po){return Po>=Ht&&Po<=Xn?pe+Oo:Oo}).join(`
|
|
48
|
-
`),selectionStart:ke&&/\S/.test(ke)?Le+pe.length:Le,selectionEnd:dt+pe.length*(Xn-Ht+1)})}else{var Tt=Le+pe.length;Rn({value:Se.substring(0,Le)+pe+Se.substring(dt),selectionStart:Tt,selectionEnd:Tt})}else if(J.key==="Backspace"){var nn=Le!==dt,An=Se.substring(0,Le);if(An.endsWith(pe)&&!nn){J.preventDefault();var Tt=Le-pe.length;Rn({value:Se.substring(0,Le-pe.length)+Se.substring(dt),selectionStart:Tt,selectionEnd:Tt})}}else if(J.key==="Enter"){if(Le===dt){var Mo=tn(Se,Le).pop(),ai=Mo?.match(/^\s+/);if(ai?.[0]){J.preventDefault();var Eo=`
|
|
49
|
-
`+ai[0],Tt=Le+Eo.length;Rn({value:Se.substring(0,Le)+Eo+Se.substring(dt),selectionStart:Tt,selectionEnd:Tt})}}}else if(J.keyCode===g||J.keyCode===S||J.keyCode===b||J.keyCode===x){var mn=void 0;J.keyCode===g&&J.shiftKey?mn=["(",")"]:J.keyCode===S?J.shiftKey?mn=["{","}"]:mn=["[","]"]:J.keyCode===b?J.shiftKey?mn=['"','"']:mn=["'","'"]:J.keyCode===x&&!J.shiftKey&&(mn=["`","`"]),Le!==dt&&mn&&(J.preventDefault(),Rn({value:Se.substring(0,Le)+mn[0]+Se.substring(Le,dt)+mn[1]+Se.substring(dt),selectionStart:Le,selectionEnd:dt+2}))}else(L?J.metaKey&&J.keyCode===m:J.ctrlKey&&J.keyCode===m)&&!J.shiftKey&&!J.altKey?(J.preventDefault(),Ei()):(L?J.metaKey&&J.keyCode===m&&J.shiftKey:E?J.ctrlKey&&J.keyCode===f:J.ctrlKey&&J.keyCode===m&&J.shiftKey)&&!J.altKey?(J.preventDefault(),To()):J.keyCode===p&&J.ctrlKey&&(!L||J.shiftKey)&&(J.preventDefault(),Da(function(Zn){return!Zn}))}},Qn=function(J){var Pe=J.currentTarget,Se=Pe.value,Le=Pe.selectionStart,dt=Pe.selectionEnd;Wn({value:Se,selectionStart:Le,selectionEnd:dt},!0),ae(Se)};return d.useEffect(function(){ni()},[ni]),d.useImperativeHandle(R,function(){return{get session(){return{history:je.current}},set session(J){je.current=J.history}}},[]),d.createElement("div",n({},Yn,{style:n(n({},k.container),Xe)}),d.createElement("pre",n({className:ye,"aria-hidden":"true",style:n(n(n({},k.editor),k.highlight),$n)},typeof yt=="string"?{dangerouslySetInnerHTML:{__html:yt+"<br />"}}:{children:yt})),d.createElement("textarea",{ref:function(J){return Jt.current=J},style:n(n(n({},k.editor),k.textarea),$n),className:O+(Ge?" ".concat(Ge):""),id:Dt,value:Ot,onChange:Qn,onKeyDown:jo,onClick:oe,onKeyUp:X,onFocus:ue,onBlur:$,disabled:z,form:F,maxLength:U,minLength:Z,name:ne,placeholder:re,readOnly:De,required:ze,autoFocus:I,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),d.createElement("style",{dangerouslySetInnerHTML:{__html:D}}))}),k={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}};return Xt.default=A,Xt}var _j=Rj();const zj=Lb(_j);var Dd={exports:{}},Yy;function Ij(){return Yy||(Yy=1,(function(n){var a=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};var o=(function(r){var c=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,d=0,f={},m={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function D(A){return A instanceof p?new p(A.type,D(A.content),A.alias):Array.isArray(A)?A.map(D):A.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(D){return Object.prototype.toString.call(D).slice(8,-1)},objId:function(D){return D.__id||Object.defineProperty(D,"__id",{value:++d}),D.__id},clone:function D(A,k){k=k||{};var T,w;switch(m.util.type(A)){case"Object":if(w=m.util.objId(A),k[w])return k[w];T={},k[w]=T;for(var R in A)A.hasOwnProperty(R)&&(T[R]=D(A[R],k));return T;case"Array":return w=m.util.objId(A),k[w]?k[w]:(T=[],k[w]=T,A.forEach(function(I,z){T[z]=D(I,k)}),T);default:return A}},getLanguage:function(D){for(;D;){var A=c.exec(D.className);if(A)return A[1].toLowerCase();D=D.parentElement}return"none"},setLanguage:function(D,A){D.className=D.className.replace(RegExp(c,"gi"),""),D.classList.add("language-"+A)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(T){var D=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(T.stack)||[])[1];if(D){var A=document.getElementsByTagName("script");for(var k in A)if(A[k].src==D)return A[k]}return null}},isActive:function(D,A,k){for(var T="no-"+A;D;){var w=D.classList;if(w.contains(A))return!0;if(w.contains(T))return!1;D=D.parentElement}return!!k}},languages:{plain:f,plaintext:f,text:f,txt:f,extend:function(D,A){var k=m.util.clone(m.languages[D]);for(var T in A)k[T]=A[T];return k},insertBefore:function(D,A,k,T){T=T||m.languages;var w=T[D],R={};for(var I in w)if(w.hasOwnProperty(I)){if(I==A)for(var z in k)k.hasOwnProperty(z)&&(R[z]=k[z]);k.hasOwnProperty(I)||(R[I]=w[I])}var F=T[D];return T[D]=R,m.languages.DFS(m.languages,function(ee,Q){Q===F&&ee!=D&&(this[ee]=R)}),R},DFS:function D(A,k,T,w){w=w||{};var R=m.util.objId;for(var I in A)if(A.hasOwnProperty(I)){k.call(A,I,A[I],T||I);var z=A[I],F=m.util.type(z);F==="Object"&&!w[R(z)]?(w[R(z)]=!0,D(z,k,null,w)):F==="Array"&&!w[R(z)]&&(w[R(z)]=!0,D(z,k,I,w))}}},plugins:{},highlightAll:function(D,A){m.highlightAllUnder(document,D,A)},highlightAllUnder:function(D,A,k){var T={callback:k,container:D,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};m.hooks.run("before-highlightall",T),T.elements=Array.prototype.slice.apply(T.container.querySelectorAll(T.selector)),m.hooks.run("before-all-elements-highlight",T);for(var w=0,R;R=T.elements[w++];)m.highlightElement(R,A===!0,T.callback)},highlightElement:function(D,A,k){var T=m.util.getLanguage(D),w=m.languages[T];m.util.setLanguage(D,T);var R=D.parentElement;R&&R.nodeName.toLowerCase()==="pre"&&m.util.setLanguage(R,T);var I=D.textContent,z={element:D,language:T,grammar:w,code:I};function F(Q){z.highlightedCode=Q,m.hooks.run("before-insert",z),z.element.innerHTML=z.highlightedCode,m.hooks.run("after-highlight",z),m.hooks.run("complete",z),k&&k.call(z.element)}if(m.hooks.run("before-sanity-check",z),R=z.element.parentElement,R&&R.nodeName.toLowerCase()==="pre"&&!R.hasAttribute("tabindex")&&R.setAttribute("tabindex","0"),!z.code){m.hooks.run("complete",z),k&&k.call(z.element);return}if(m.hooks.run("before-highlight",z),!z.grammar){F(m.util.encode(z.code));return}if(A&&r.Worker){var ee=new Worker(m.filename);ee.onmessage=function(Q){F(Q.data)},ee.postMessage(JSON.stringify({language:z.language,code:z.code,immediateClose:!0}))}else F(m.highlight(z.code,z.grammar,z.language))},highlight:function(D,A,k){var T={code:D,grammar:A,language:k};if(m.hooks.run("before-tokenize",T),!T.grammar)throw new Error('The language "'+T.language+'" has no grammar.');return T.tokens=m.tokenize(T.code,T.grammar),m.hooks.run("after-tokenize",T),p.stringify(m.util.encode(T.tokens),T.language)},tokenize:function(D,A){var k=A.rest;if(k){for(var T in k)A[T]=k[T];delete A.rest}var w=new b;return x(w,w.head,D),S(D,w,A,w.head,0),N(w)},hooks:{all:{},add:function(D,A){var k=m.hooks.all;k[D]=k[D]||[],k[D].push(A)},run:function(D,A){var k=m.hooks.all[D];if(!(!k||!k.length))for(var T=0,w;w=k[T++];)w(A)}},Token:p};r.Prism=m;function p(D,A,k,T){this.type=D,this.content=A,this.alias=k,this.length=(T||"").length|0}p.stringify=function D(A,k){if(typeof A=="string")return A;if(Array.isArray(A)){var T="";return A.forEach(function(F){T+=D(F,k)}),T}var w={type:A.type,content:D(A.content,k),tag:"span",classes:["token",A.type],attributes:{},language:k},R=A.alias;R&&(Array.isArray(R)?Array.prototype.push.apply(w.classes,R):w.classes.push(R)),m.hooks.run("wrap",w);var I="";for(var z in w.attributes)I+=" "+z+'="'+(w.attributes[z]||"").replace(/"/g,""")+'"';return"<"+w.tag+' class="'+w.classes.join(" ")+'"'+I+">"+w.content+"</"+w.tag+">"};function g(D,A,k,T){D.lastIndex=A;var w=D.exec(k);if(w&&T&&w[1]){var R=w[1].length;w.index+=R,w[0]=w[0].slice(R)}return w}function S(D,A,k,T,w,R){for(var I in k)if(!(!k.hasOwnProperty(I)||!k[I])){var z=k[I];z=Array.isArray(z)?z:[z];for(var F=0;F<z.length;++F){if(R&&R.cause==I+","+F)return;var ee=z[F],Q=ee.inside,ge=!!ee.lookbehind,te=!!ee.greedy,ve=ee.alias;if(te&&!ee.pattern.global){var U=ee.pattern.toString().match(/[imsuy]*$/)[0];ee.pattern=RegExp(ee.pattern.source,U+"g")}for(var Z=ee.pattern||ee,ne=T.next,$=w;ne!==A.tail&&!(R&&$>=R.reach);$+=ne.value.length,ne=ne.next){var oe=ne.value;if(A.length>D.length)return;if(!(oe instanceof p)){var ue=1,he;if(te){if(he=g(Z,$,D,ge),!he||he.index>=D.length)break;var ie=he.index,X=he.index+he[0].length,ae=$;for(ae+=ne.value.length;ie>=ae;)ne=ne.next,ae+=ne.value.length;if(ae-=ne.value.length,$=ae,ne.value instanceof p)continue;for(var de=ne;de!==A.tail&&(ae<X||typeof de.value=="string");de=de.next)ue++,ae+=de.value.length;ue--,oe=D.slice($,ae),he.index-=$}else if(he=g(Z,0,oe,ge),!he)continue;var ie=he.index,re=he[0],ye=oe.slice(0,ie),De=oe.slice(ie+re.length),ze=$+oe.length;R&&ze>R.reach&&(R.reach=ze);var Xe=ne.prev;ye&&(Xe=x(A,Xe,ye),$+=ye.length),j(A,Xe,ue);var Ce=new p(I,Q?m.tokenize(re,Q):re,ve,re);if(ne=x(A,Xe,Ce),De&&x(A,ne,De),ue>1){var Oe={cause:I+","+F,reach:ze};S(D,A,k,ne.prev,$,Oe),R&&Oe.reach>R.reach&&(R.reach=Oe.reach)}}}}}}function b(){var D={value:null,prev:null,next:null},A={value:null,prev:D,next:null};D.next=A,this.head=D,this.tail=A,this.length=0}function x(D,A,k){var T=A.next,w={value:k,prev:A,next:T};return A.next=w,T.prev=w,D.length++,w}function j(D,A,k){for(var T=A.next,w=0;w<k&&T!==D.tail;w++)T=T.next;A.next=T,T.prev=A,D.length-=w}function N(D){for(var A=[],k=D.head.next;k!==D.tail;)A.push(k.value),k=k.next;return A}if(!r.document)return r.addEventListener&&(m.disableWorkerMessageHandler||r.addEventListener("message",function(D){var A=JSON.parse(D.data),k=A.language,T=A.code,w=A.immediateClose;r.postMessage(m.highlight(T,m.languages[k],k)),w&&r.close()},!1)),m;var E=m.util.currentScript();E&&(m.filename=E.src,E.hasAttribute("data-manual")&&(m.manual=!0));function L(){m.manual||m.highlightAll()}if(!m.manual){var O=document.readyState;O==="loading"||O==="interactive"&&E&&E.defer?document.addEventListener("DOMContentLoaded",L):window.requestAnimationFrame?window.requestAnimationFrame(L):window.setTimeout(L,16)}return m})(a);n.exports&&(n.exports=o),typeof zg<"u"&&(zg.Prism=o),o.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},o.languages.markup.tag.inside["attr-value"].inside.entity=o.languages.markup.entity,o.languages.markup.doctype.inside["internal-subset"].inside=o.languages.markup,o.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(o.languages.markup.tag,"addInlined",{value:function(c,d){var f={};f["language-"+d]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:o.languages[d]},f.cdata=/^<!\[CDATA\[|\]\]>$/i;var m={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:f}};m["language-"+d]={pattern:/[\s\S]+/,inside:o.languages[d]};var p={};p[c]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return c}),"i"),lookbehind:!0,greedy:!0,inside:m},o.languages.insertBefore("markup","cdata",p)}}),Object.defineProperty(o.languages.markup.tag,"addAttribute",{value:function(r,c){o.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[c,"language-"+c],inside:o.languages[c]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),o.languages.html=o.languages.markup,o.languages.mathml=o.languages.markup,o.languages.svg=o.languages.markup,o.languages.xml=o.languages.extend("markup",{}),o.languages.ssml=o.languages.xml,o.languages.atom=o.languages.xml,o.languages.rss=o.languages.xml,(function(r){var c=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+c.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+c.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+c.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+c.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:c,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var d=r.languages.markup;d&&(d.tag.addInlined("style","css"),d.tag.addAttribute("style","css"))})(o),o.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},o.languages.javascript=o.languages.extend("clike",{"class-name":[o.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),o.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,o.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:o.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:o.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:o.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:o.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:o.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),o.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:o.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),o.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),o.languages.markup&&(o.languages.markup.tag.addInlined("script","javascript"),o.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),o.languages.js=o.languages.javascript,(function(){if(typeof o>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",c=function(E,L){return"✖ Error "+E+" while fetching file: "+L},d="✖ Error: File does not exist or is empty",f={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},m="data-src-status",p="loading",g="loaded",S="failed",b="pre[data-src]:not(["+m+'="'+g+'"]):not(['+m+'="'+p+'"])';function x(E,L,O){var D=new XMLHttpRequest;D.open("GET",E,!0),D.onreadystatechange=function(){D.readyState==4&&(D.status<400&&D.responseText?L(D.responseText):D.status>=400?O(c(D.status,D.statusText)):O(d))},D.send(null)}function j(E){var L=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(E||"");if(L){var O=Number(L[1]),D=L[2],A=L[3];return D?A?[O,Number(A)]:[O,void 0]:[O,O]}}o.hooks.add("before-highlightall",function(E){E.selector+=", "+b}),o.hooks.add("before-sanity-check",function(E){var L=E.element;if(L.matches(b)){E.code="",L.setAttribute(m,p);var O=L.appendChild(document.createElement("CODE"));O.textContent=r;var D=L.getAttribute("data-src"),A=E.language;if(A==="none"){var k=(/\.(\w+)$/.exec(D)||[,"none"])[1];A=f[k]||k}o.util.setLanguage(O,A),o.util.setLanguage(L,A);var T=o.plugins.autoloader;T&&T.loadLanguages(A),x(D,function(w){L.setAttribute(m,g);var R=j(L.getAttribute("data-range"));if(R){var I=w.split(/\r\n?|\n/g),z=R[0],F=R[1]==null?I.length:R[1];z<0&&(z+=I.length),z=Math.max(0,Math.min(z-1,I.length)),F<0&&(F+=I.length),F=Math.max(0,Math.min(F,I.length)),w=I.slice(z,F).join(`
|
|
50
|
-
`),L.hasAttribute("data-start")||L.setAttribute("data-start",String(z+1))}O.textContent=w,o.highlightElement(O)},function(w){L.setAttribute(m,S),O.textContent=w})}}),o.plugins.fileHighlight={highlight:function(L){for(var O=(L||document).querySelectorAll(b),D=0,A;A=O[D++];)o.highlightElement(A)}};var N=!1;o.fileHighlight=function(){N||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),N=!0),o.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(Dd)),Dd.exports}var Uj=Ij();const Hj=Lb(Uj);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(n){var a=/[*&][^\s[\]{},]+/,o=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+o.source+"(?:[ ]+"+a.source+")?|"+a.source+"(?:[ ]+"+o.source+")?)",c=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),d=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function f(m,p){p=(p||"").replace(/m/g,"")+"m";var g=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return m});return RegExp(g,p)}n.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+c+"|"+d+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:f(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:f(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:f(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:f(d),lookbehind:!0,greedy:!0},number:{pattern:f(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:o,important:a,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml})(Prism);(function(n){var a=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function o(r){return r.replace(/__/g,function(){return a})}n.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(o(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(o(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(Prism);function Bj(n,a){let o=n.slice(0,a).split(/\r\n|\n|\r/g);return[o.length,o.pop().length+1]}function Kj(n,a,o){let r=n.split(/\r\n|\n|\r/g),c="",d=(Math.log10(a+1)|0)+1;for(let f=a-1;f<=a+1;f++){let m=r[f-1];m&&(c+=f.toString().padEnd(d," "),c+=": ",c+=m,c+=`
|
|
51
|
-
`,f===a&&(c+=" ".repeat(d+o+2),c+=`^
|
|
52
|
-
`))}return c}class Ve extends Error{line;column;codeblock;constructor(a,o){const[r,c]=Bj(o.toml,o.ptr),d=Kj(o.toml,r,c);super(`Invalid TOML document: ${a}
|
|
53
|
-
|
|
54
|
-
${d}`,o),this.line=r,this.column=c,this.codeblock=d}}function qj(n,a){let o=0;for(;n[a-++o]==="\\";);return--o&&o%2}function Wd(n,a=0,o=n.length){let r=n.indexOf(`
|
|
55
|
-
`,a);return n[r-1]==="\r"&&r--,r<=o?r:-1}function Wl(n,a){for(let o=a;o<n.length;o++){let r=n[o];if(r===`
|
|
56
|
-
`)return o;if(r==="\r"&&n[o+1]===`
|
|
57
|
-
`)return o+1;if(r<" "&&r!==" "||r==="")throw new Ve("control characters are not allowed in comments",{toml:n,ptr:a})}return n.length}function Ca(n,a,o,r){let c;for(;;){for(;(c=n[a])===" "||c===" "||!o&&(c===`
|
|
58
|
-
`||c==="\r"&&n[a+1]===`
|
|
59
|
-
`);)a++;if(r||c!=="#")break;a=Wl(n,a)}return a}function Fj(n,a,o,r,c=!1){if(!r)return a=Wd(n,a),a<0?n.length:a;for(let d=a;d<n.length;d++){let f=n[d];if(f==="#")d=Wd(n,d);else{if(f===o)return d+1;if(f===r||c&&(f===`
|
|
60
|
-
`||f==="\r"&&n[d+1]===`
|
|
61
|
-
`))return d}}throw new Ve("cannot find end of structure",{toml:n,ptr:a})}function iv(n,a){let o=n[a],r=o===n[a+1]&&n[a+1]===n[a+2]?n.slice(a,a+3):o;a+=r.length-1;do a=n.indexOf(r,++a);while(a>-1&&o!=="'"&&qj(n,a));return a>-1&&(a+=r.length,r.length>1&&(n[a]===o&&a++,n[a]===o&&a++)),a}let Gj=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;class Co extends Date{#t=!1;#n=!1;#e=null;constructor(a){let o=!0,r=!0,c="Z";if(typeof a=="string"){let d=a.match(Gj);d?(d[1]||(o=!1,a=`0000-01-01T${a}`),r=!!d[2],r&&a[10]===" "&&(a=a.replace(" ","T")),d[2]&&+d[2]>23?a="":(c=d[3]||null,a=a.toUpperCase(),!c&&r&&(a+="Z"))):a=""}super(a),isNaN(this.getTime())||(this.#t=o,this.#n=r,this.#e=c)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let a=super.toISOString();if(this.isDate())return a.slice(0,10);if(this.isTime())return a.slice(11,23);if(this.#e===null)return a.slice(0,-1);if(this.#e==="Z")return a;let o=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return o=this.#e[0]==="-"?o:-o,new Date(this.getTime()-o*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(a,o="Z"){let r=new Co(a);return r.#e=o,r}static wrapAsLocalDateTime(a){let o=new Co(a);return o.#e=null,o}static wrapAsLocalDate(a){let o=new Co(a);return o.#n=!1,o.#e=null,o}static wrapAsLocalTime(a){let o=new Co(a);return o.#t=!1,o.#e=null,o}}let Vj=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,Yj=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,$j=/^[+-]?0[0-9_]/,Wj=/^[0-9a-f]{2,8}$/i,$y={b:"\b",t:" ",n:`
|
|
62
|
-
`,f:"\f",r:"\r",e:"\x1B",'"':'"',"\\":"\\"};function ov(n,a=0,o=n.length){let r=n[a]==="'",c=n[a++]===n[a]&&n[a]===n[a+1];c&&(o-=2,n[a+=2]==="\r"&&a++,n[a]===`
|
|
63
|
-
`&&a++);let d=0,f,m="",p=a;for(;a<o-1;){let g=n[a++];if(g===`
|
|
64
|
-
`||g==="\r"&&n[a]===`
|
|
65
|
-
`){if(!c)throw new Ve("newlines are not allowed in strings",{toml:n,ptr:a-1})}else if(g<" "&&g!==" "||g==="")throw new Ve("control characters are not allowed in strings",{toml:n,ptr:a-1});if(f){if(f=!1,g==="x"||g==="u"||g==="U"){let S=n.slice(a,a+=g==="x"?2:g==="u"?4:8);if(!Wj.test(S))throw new Ve("invalid unicode escape",{toml:n,ptr:d});try{m+=String.fromCodePoint(parseInt(S,16))}catch{throw new Ve("invalid unicode escape",{toml:n,ptr:d})}}else if(c&&(g===`
|
|
66
|
-
`||g===" "||g===" "||g==="\r")){if(a=Ca(n,a-1,!0),n[a]!==`
|
|
67
|
-
`&&n[a]!=="\r")throw new Ve("invalid escape: only line-ending whitespace may be escaped",{toml:n,ptr:d});a=Ca(n,a)}else if(g in $y)m+=$y[g];else throw new Ve("unrecognized escape sequence",{toml:n,ptr:d});p=a}else!r&&g==="\\"&&(d=a-1,f=!0,m+=n.slice(p,d))}return m+n.slice(p,o-1)}function Qj(n,a,o,r){if(n==="true")return!0;if(n==="false")return!1;if(n==="-inf")return-1/0;if(n==="inf"||n==="+inf")return 1/0;if(n==="nan"||n==="+nan"||n==="-nan")return NaN;if(n==="-0")return r?0n:0;let c=Vj.test(n);if(c||Yj.test(n)){if($j.test(n))throw new Ve("leading zeroes are not allowed",{toml:a,ptr:o});n=n.replace(/_/g,"");let f=+n;if(isNaN(f))throw new Ve("invalid number",{toml:a,ptr:o});if(c){if((c=!Number.isSafeInteger(f))&&!r)throw new Ve("integer value cannot be represented losslessly",{toml:a,ptr:o});(c||r===!0)&&(f=BigInt(n))}return f}const d=new Co(n);if(!d.isValid())throw new Ve("invalid value",{toml:a,ptr:o});return d}function Xj(n,a,o){let r=n.slice(a,o),c=r.indexOf("#");return c>-1&&(Wl(n,c),r=r.slice(0,c)),[r.trimEnd(),c]}function Bf(n,a,o,r,c){if(r===0)throw new Ve("document contains excessively nested structures. aborting.",{toml:n,ptr:a});let d=n[a];if(d==="["||d==="{"){let[p,g]=d==="["?eM(n,a,r,c):Jj(n,a,r,c);if(o){if(g=Ca(n,g),n[g]===",")g++;else if(n[g]!==o)throw new Ve("expected comma or end of structure",{toml:n,ptr:g})}return[p,g]}let f;if(d==='"'||d==="'"){f=iv(n,a);let p=ov(n,a,f);if(o){if(f=Ca(n,f),n[f]&&n[f]!==","&&n[f]!==o&&n[f]!==`
|
|
68
|
-
`&&n[f]!=="\r")throw new Ve("unexpected character encountered",{toml:n,ptr:f});f+=+(n[f]===",")}return[p,f]}f=Fj(n,a,",",o);let m=Xj(n,a,f-+(n[f-1]===","));if(!m[0])throw new Ve("incomplete key-value declaration: no value specified",{toml:n,ptr:a});return o&&m[1]>-1&&(f=Ca(n,a+m[1]),f+=+(n[f]===",")),[Qj(m[0],n,a,c),f]}let Zj=/^[a-zA-Z0-9-_]+[ \t]*$/;function Qd(n,a,o="="){let r=a-1,c=[],d=n.indexOf(o,a);if(d<0)throw new Ve("incomplete key-value: cannot find end of key",{toml:n,ptr:a});do{let f=n[a=++r];if(f!==" "&&f!==" ")if(f==='"'||f==="'"){if(f===n[a+1]&&f===n[a+2])throw new Ve("multiline strings are not allowed in keys",{toml:n,ptr:a});let m=iv(n,a);if(m<0)throw new Ve("unfinished string encountered",{toml:n,ptr:a});r=n.indexOf(".",m);let p=n.slice(m,r<0||r>d?d:r),g=Wd(p);if(g>-1)throw new Ve("newlines are not allowed in keys",{toml:n,ptr:a+r+g});if(p.trimStart())throw new Ve("found extra tokens after the string part",{toml:n,ptr:m});if(d<m&&(d=n.indexOf(o,m),d<0))throw new Ve("incomplete key-value: cannot find end of key",{toml:n,ptr:a});c.push(ov(n,a,m))}else{r=n.indexOf(".",a);let m=n.slice(a,r<0||r>d?d:r);if(!Zj.test(m))throw new Ve("only letter, numbers, dashes and underscores are allowed in keys",{toml:n,ptr:a});c.push(m.trimEnd())}}while(r+1&&r<d);return[c,Ca(n,d+1,!0,!0)]}function Jj(n,a,o,r){let c={},d=new Set,f;for(a++;(f=n[a++])!=="}"&&f;){if(f===",")throw new Ve("expected value, found comma",{toml:n,ptr:a-1});if(f==="#")a=Wl(n,a);else if(f!==" "&&f!==" "&&f!==`
|
|
69
|
-
`&&f!=="\r"){let m,p=c,g=!1,[S,b]=Qd(n,a-1);for(let N=0;N<S.length;N++){if(N&&(p=g?p[m]:p[m]={}),m=S[N],(g=Object.hasOwn(p,m))&&(typeof p[m]!="object"||d.has(p[m])))throw new Ve("trying to redefine an already defined value",{toml:n,ptr:a});!g&&m==="__proto__"&&Object.defineProperty(p,m,{enumerable:!0,configurable:!0,writable:!0})}if(g)throw new Ve("trying to redefine an already defined value",{toml:n,ptr:a});let[x,j]=Bf(n,b,"}",o-1,r);d.add(x),p[m]=x,a=j}}if(!f)throw new Ve("unfinished table encountered",{toml:n,ptr:a});return[c,a]}function eM(n,a,o,r){let c=[],d;for(a++;(d=n[a++])!=="]"&&d;){if(d===",")throw new Ve("expected value, found comma",{toml:n,ptr:a-1});if(d==="#")a=Wl(n,a);else if(d!==" "&&d!==" "&&d!==`
|
|
70
|
-
`&&d!=="\r"){let f=Bf(n,a-1,"]",o-1,r);c.push(f[0]),a=f[1]}}if(!d)throw new Ve("unfinished array encountered",{toml:n,ptr:a});return[c,a]}function Wy(n,a,o,r){let c=a,d=o,f,m=!1,p;for(let g=0;g<n.length;g++){if(g){if(c=m?c[f]:c[f]={},d=(p=d[f]).c,r===0&&(p.t===1||p.t===2))return null;if(p.t===2){let S=c.length-1;c=c[S],d=d[S].c}}if(f=n[g],(m=Object.hasOwn(c,f))&&d[f]?.t===0&&d[f]?.d)return null;m||(f==="__proto__"&&(Object.defineProperty(c,f,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(d,f,{enumerable:!0,configurable:!0,writable:!0})),d[f]={t:g<n.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(p=d[f],p.t!==r&&!(r===1&&p.t===3)||(r===2&&(p.d||(p.d=!0,c[f]=[]),c[f].push(c={}),p.c[p.i++]=p={t:1,d:!1,i:0,c:{}}),p.d))return null;if(p.d=!0,r===1)c=m?c[f]:c[f]={};else if(r===0&&m)return null;return[f,c,p.c]}function tM(n,{maxDepth:a=1e3,integersAsBigInt:o}={}){let r={},c={},d=r,f=c;for(let m=Ca(n,0);m<n.length;){if(n[m]==="["){let p=n[++m]==="[",g=Qd(n,m+=+p,"]");if(p){if(n[g[1]-1]!=="]")throw new Ve("expected end of table declaration",{toml:n,ptr:g[1]-1});g[1]++}let S=Wy(g[0],r,c,p?2:1);if(!S)throw new Ve("trying to redefine an already defined table or value",{toml:n,ptr:m});f=S[2],d=S[1],m=g[1]}else{let p=Qd(n,m),g=Wy(p[0],d,f,0);if(!g)throw new Ve("trying to redefine an already defined table or value",{toml:n,ptr:m});let S=Bf(n,p[1],void 0,a,o);g[1][g[0]]=S[0],m=S[1]}if(m=Ca(n,m,!0),n[m]&&n[m]!==`
|
|
71
|
-
`&&n[m]!=="\r")throw new Ve("each key-value declaration must be followed by an end-of-line",{toml:n,ptr:m});m=Ca(n,m)}return r}const nM=[/^ANTHROPIC_AUTH_TOKEN$/,/_API_KEY$/,/_AUTH_TOKEN$/,/_SECRET$/,/_SECRET_KEY$/,/^API_KEY$/,/^AUTH_TOKEN$/,/^SECRET$/,/_PASSWORD$/,/^PASSWORD$/,/_CREDENTIAL$/,/_PRIVATE_KEY$/];function aM(n){return nM.some(a=>a.test(n))}function iM(n){if(!n.trim())return{valid:!0};try{return JSON.parse(n),{valid:!0}}catch(a){const r=a.message,c=r.match(/position (\d+)/);if(c){const d=parseInt(c[1],10),f=n.substring(0,d).split(`
|
|
72
|
-
`);return{valid:!1,error:r,line:f.length}}return{valid:!1,error:r}}}function oM(n){if(!n.trim())return{valid:!0};try{return tM(n),{valid:!0}}catch(a){const o=a.message,r=o.match(/line\s+(\d+)/i);return{valid:!1,error:o,line:r?Number.parseInt(r[1],10):void 0}}}function sv({value:n,onChange:a,language:o="json",readonly:r=!1,className:c,minHeight:d="300px",heightMode:f="content"}){const{isDark:m}=mf(),[p,g]=C.useState(!1),[S,b]=C.useState(!0),x=f==="fill-parent",j=C.useMemo(()=>o==="json"?iM(n):o==="toml"?oM(n):{valid:!0},[n,o]),N=C.useCallback(E=>l.jsx(Yw,{prism:Hj,theme:m?$g.nightOwl:$g.github,code:E,language:o,children:({tokens:L,getLineProps:O,getTokenProps:D})=>{let A=!1;return l.jsx(l.Fragment,{children:L.map((k,T)=>l.jsx("div",{...O({line:k}),className:K(j.line===T+1&&"bg-destructive/20"),children:k.map((w,R)=>{let I=!1;if(w.types.includes("property")){const F=w.content.replace(/['"]/g,"");aM(F)?A=!0:A=!1}else(w.types.includes("string")||w.types.includes("number")||w.types.includes("boolean"))&&A?(I=!0,A=!1):w.types.includes("punctuation")&&w.content!==":"&&w.content!=="["&&w.content!=="{"&&(A=!1);const z=D({token:w});return I&&S&&(z.className=K(z.className,"blur-[3px] select-none opacity-70 transition-all duration-200")),l.jsx("span",{...z},R)})},T))})}}),[m,o,j.line,S]);return l.jsxs("div",{className:K("flex min-h-0 flex-col",x&&"h-full",c),style:x?{height:d==="auto"?void 0:d}:void 0,children:[l.jsxs("div",{className:K("relative rounded-md border overflow-hidden","bg-muted/30",x&&"flex min-h-0 flex-1 flex-col",p&&"ring-2 ring-ring ring-offset-2 ring-offset-background",r&&"opacity-70 cursor-not-allowed",!j.valid&&"border-destructive"),"data-slot":"code-editor-surface",children:[l.jsx("div",{className:K(x&&"scrollbar-editor min-h-0 flex-1 overflow-auto"),"data-slot":x?"code-editor-viewport":void 0,children:l.jsx(zj,{value:n,onValueChange:r?()=>{}:a,highlight:N,padding:12,disabled:r,onFocus:()=>g(!0),onBlur:()=>g(!1),textareaClassName:K("focus:outline-none font-mono text-sm",r&&"cursor-not-allowed"),preClassName:"font-mono text-sm",style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:"0.875rem",minHeight:d}},m?"dark-editor":"light-editor")}),l.jsx("div",{className:"absolute top-2 right-2 z-10 opacity-50 hover:opacity-100 transition-opacity",children:l.jsx(ot,{variant:"ghost",size:"icon",className:"h-6 w-6 bg-background/50 hover:bg-background border shadow-sm rounded-full",onClick:()=>b(!S),title:S?"Reveal sensitive values":"Mask sensitive values",children:S?l.jsx(Ys,{className:"h-3 w-3"}):l.jsx(Vs,{className:"h-3 w-3"})})})]}),l.jsxs("div",{className:"flex items-center gap-2 mt-2 text-xs",children:[j.valid?l.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[l.jsx($s,{className:"w-3 h-3 text-green-500"}),"Valid ",o.toUpperCase()]}):l.jsxs("span",{className:"flex items-center gap-1 text-destructive",children:[l.jsx(Bs,{className:"w-3 h-3"}),j.error,j.line&&` (line ${j.line})`]}),r&&l.jsx("span",{className:"ml-auto text-muted-foreground",children:"(Read-only)"})]})]})}const Ql=Object.freeze(Object.defineProperty({__proto__:null,CodeEditor:sv},Symbol.toStringTag,{value:"Module"})),sM={webSearchConfig:null,webSearchStatus:null,webSearchLoading:!0,webSearchStatusLoading:!0,webSearchSaving:!1,webSearchError:null,webSearchSuccess:!1,globalEnvConfig:null,globalEnvLoading:!0,globalEnvSaving:!1,globalEnvError:null,globalEnvSuccess:!1,proxyConfig:null,proxyLoading:!0,proxySaving:!1,proxyError:null,proxySuccess:!1,proxyTestResult:null,proxyTesting:!1,rawConfig:null,rawConfigLoading:!1};function rM(n,a){switch(a.type){case"SET_WEBSEARCH_CONFIG":return{...n,webSearchConfig:a.payload};case"SET_WEBSEARCH_STATUS":return{...n,webSearchStatus:a.payload};case"SET_WEBSEARCH_LOADING":return{...n,webSearchLoading:a.payload};case"SET_WEBSEARCH_STATUS_LOADING":return{...n,webSearchStatusLoading:a.payload};case"SET_WEBSEARCH_SAVING":return{...n,webSearchSaving:a.payload};case"SET_WEBSEARCH_ERROR":return{...n,webSearchError:a.payload};case"SET_WEBSEARCH_SUCCESS":return{...n,webSearchSuccess:a.payload};case"SET_GLOBALENV_CONFIG":return{...n,globalEnvConfig:a.payload};case"SET_GLOBALENV_LOADING":return{...n,globalEnvLoading:a.payload};case"SET_GLOBALENV_SAVING":return{...n,globalEnvSaving:a.payload};case"SET_GLOBALENV_ERROR":return{...n,globalEnvError:a.payload};case"SET_GLOBALENV_SUCCESS":return{...n,globalEnvSuccess:a.payload};case"SET_PROXY_CONFIG":return{...n,proxyConfig:a.payload};case"SET_PROXY_LOADING":return{...n,proxyLoading:a.payload};case"SET_PROXY_SAVING":return{...n,proxySaving:a.payload};case"SET_PROXY_ERROR":return{...n,proxyError:a.payload};case"SET_PROXY_SUCCESS":return{...n,proxySuccess:a.payload};case"SET_PROXY_TEST_RESULT":return{...n,proxyTestResult:a.payload};case"SET_PROXY_TESTING":return{...n,proxyTesting:a.payload};case"SET_RAW_CONFIG":return{...n,rawConfig:a.payload};case"SET_RAW_CONFIG_LOADING":return{...n,rawConfigLoading:a.payload};default:return n}}const rv=C.createContext(null);function lM({children:n}){const[a,o]=C.useReducer(rM,sM);return l.jsx(rv.Provider,{value:{state:a,dispatch:o},children:n})}function lv(){const n=C.useContext(rv);if(!n)throw new Error("useSettingsContext must be used within a SettingsProvider");return n}function cM(){const{dispatch:n}=lv(),a=C.useCallback(w=>n({type:"SET_WEBSEARCH_CONFIG",payload:w}),[n]),o=C.useCallback(w=>n({type:"SET_WEBSEARCH_STATUS",payload:w}),[n]),r=C.useCallback(w=>n({type:"SET_WEBSEARCH_LOADING",payload:w}),[n]),c=C.useCallback(w=>n({type:"SET_WEBSEARCH_STATUS_LOADING",payload:w}),[n]),d=C.useCallback(w=>n({type:"SET_WEBSEARCH_SAVING",payload:w}),[n]),f=C.useCallback(w=>n({type:"SET_WEBSEARCH_ERROR",payload:w}),[n]),m=C.useCallback(w=>n({type:"SET_WEBSEARCH_SUCCESS",payload:w}),[n]),p=C.useCallback(w=>n({type:"SET_GLOBALENV_CONFIG",payload:w}),[n]),g=C.useCallback(w=>n({type:"SET_GLOBALENV_LOADING",payload:w}),[n]),S=C.useCallback(w=>n({type:"SET_GLOBALENV_SAVING",payload:w}),[n]),b=C.useCallback(w=>n({type:"SET_GLOBALENV_ERROR",payload:w}),[n]),x=C.useCallback(w=>n({type:"SET_GLOBALENV_SUCCESS",payload:w}),[n]),j=C.useCallback(w=>n({type:"SET_PROXY_CONFIG",payload:w}),[n]),N=C.useCallback(w=>n({type:"SET_PROXY_LOADING",payload:w}),[n]),E=C.useCallback(w=>n({type:"SET_PROXY_SAVING",payload:w}),[n]),L=C.useCallback(w=>n({type:"SET_PROXY_ERROR",payload:w}),[n]),O=C.useCallback(w=>n({type:"SET_PROXY_SUCCESS",payload:w}),[n]),D=C.useCallback(w=>n({type:"SET_PROXY_TEST_RESULT",payload:w}),[n]),A=C.useCallback(w=>n({type:"SET_PROXY_TESTING",payload:w}),[n]),k=C.useCallback(w=>n({type:"SET_RAW_CONFIG",payload:w}),[n]),T=C.useCallback(w=>n({type:"SET_RAW_CONFIG_LOADING",payload:w}),[n]);return C.useMemo(()=>({setWebSearchConfig:a,setWebSearchStatus:o,setWebSearchLoading:r,setWebSearchStatusLoading:c,setWebSearchSaving:d,setWebSearchError:f,setWebSearchSuccess:m,setGlobalEnvConfig:p,setGlobalEnvLoading:g,setGlobalEnvSaving:S,setGlobalEnvError:b,setGlobalEnvSuccess:x,setProxyConfig:j,setProxyLoading:N,setProxySaving:E,setProxyError:L,setProxySuccess:O,setProxyTestResult:D,setProxyTesting:A,setRawConfig:k,setRawConfigLoading:T}),[a,o,r,c,d,f,m,p,g,S,b,x,j,N,E,L,O,D,A,k,T])}function uM(){const[n,a]=SS(),o=n.get("tab")?.toLowerCase(),r=o==="imageanalysis"||o==="image"?"image":o==="channels"?"channels":o==="globalenv"?"globalenv":o==="proxy"?"proxy":o==="auth"?"auth":o==="thinking"?"thinking":o==="backups"?"backups":"websearch",c=C.useCallback(d=>{a({tab:d},{replace:!0})},[a]);return{activeTab:r,setActiveTab:c}}function dM(){const{state:n}=lv(),a=cM(),[o,r]=C.useState(!1),c=C.useCallback(async()=>{try{a.setRawConfigLoading(!0);const f=await fetch("/api/config/raw");if(!f.ok){a.setRawConfig(null);return}const m=await f.text();a.setRawConfig(m)}catch{a.setRawConfig(null)}finally{a.setRawConfigLoading(!1)}},[a]),d=C.useCallback(async()=>{if(n.rawConfig)try{await navigator.clipboard.writeText(n.rawConfig),r(!0),setTimeout(()=>r(!1),2e3)}catch{}},[n.rawConfig]);return{rawConfig:n.rawConfig,loading:n.rawConfigLoading,copied:o,fetchRawConfig:c,copyToClipboard:d}}function Qy({activeTab:n,onTabChange:a}){const{t:o}=Et(),r=[{value:"websearch",label:o("settingsTabs.web"),icon:Fb},{value:"image",label:"Image",icon:Yb},{value:"channels",label:"Channels",icon:nw},{value:"globalenv",label:o("settingsTabs.env"),icon:af},{value:"thinking",label:o("settingsTabs.think"),icon:aw},{value:"proxy",label:o("settingsTabs.proxy"),icon:iw},{value:"auth",label:o("settingsTabs.auth"),icon:ef},{value:"backups",label:o("settingsTabs.backup"),icon:ow}];return l.jsx($x,{value:n,onValueChange:c=>a(c),children:l.jsx(Pf,{className:"grid w-full grid-cols-8",children:r.map(({value:c,label:d,icon:f})=>l.jsxs(jl,{value:c,className:"gap-1.5 px-2 text-xs",children:[l.jsx(f,{className:"h-3.5 w-3.5 shrink-0"}),l.jsx("span",{className:"truncate",children:d})]},c))})})}function Xy(){return l.jsxs("div",{className:"flex-1 p-5 space-y-6",children:[l.jsx(We,{className:"h-4 w-2/3"}),l.jsx("div",{className:"p-4 rounded-lg border",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(We,{className:"h-5 w-32"}),l.jsx(We,{className:"h-4 w-48"})]}),l.jsx(We,{className:"h-6 w-10 rounded-full"})]})}),l.jsxs("div",{className:"space-y-3",children:[l.jsx(We,{className:"h-5 w-24"}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(We,{className:"h-20 w-full rounded-lg"}),l.jsx(We,{className:"h-20 w-full rounded-lg"}),l.jsx(We,{className:"h-20 w-full rounded-lg"})]})]})]})}function cv(n,a=3,o=1e3){return n().catch(r=>{if(a<=0)throw r;return new Promise(c=>setTimeout(c,o)).then(()=>cv(n,a-1,o*2))})}function ti(n){return C.lazy(()=>cv(n))}const Zy=ti(()=>at(()=>import("./index-h08p9xL5.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),Jy=ti(()=>at(()=>import("./index-BNU4Hhe_.js"),__vite__mapDeps([10,1,2,4,5,6,7,8,9]))),eb=ti(()=>at(()=>import("./channels-B1vgnNJX.js"),__vite__mapDeps([11,1,2,4,5,6,7,8,9]))),tb=ti(()=>at(()=>import("./globalenv-section-DoX37DqB.js"),__vite__mapDeps([12,1,2,4,5,6,7,8,9]))),nb=ti(()=>at(()=>import("./index-CTGpqIx6.js"),__vite__mapDeps([13,1,2,4,5,6,7,8,9]))),ab=ti(()=>at(()=>import("./index-DoVPk3vW.js"),__vite__mapDeps([14,1,2,15,4,16,17,5,6,18,7,8,9]))),ib=ti(()=>at(()=>import("./auth-section-BszF77uT.js"),__vite__mapDeps([19,1,2,4,5,6,7,8,9]))),ob=ti(()=>at(()=>import("./backups-section-D6RgaOx1.js"),__vite__mapDeps([20,1,2,17,4,5,6,7,8,9])));class sb extends C.Component{constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}render(){return this.state.hasError?l.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:l.jsxs("div",{className:"text-center p-6 max-w-md",children:[l.jsx(Bs,{className:"w-12 h-12 mx-auto mb-4 text-destructive"}),l.jsx("p",{className:"font-medium text-foreground mb-2",children:Fe.t("settings.sectionLoadFailed")}),l.jsx("p",{className:"text-sm mb-4",children:this.state.error?.message||Fe.t("settings.unknownError")}),l.jsxs(ot,{variant:"outline",onClick:()=>window.location.reload(),className:"inline-flex items-center gap-2",children:[l.jsx(Hs,{className:"w-4 h-4"}),Fe.t("settings.reloadPage")]})]})}):this.props.children}}function fM(){const{t:n}=Et(),{activeTab:a,setActiveTab:o}=uM(),{rawConfig:r,loading:c,copied:d,fetchRawConfig:f,copyToClipboard:m}=dM();C.useEffect(()=>{f()},[f]);const p=g=>{C.startTransition(()=>{o(g)})};return l.jsxs("div",{className:"h-full min-h-0",children:[l.jsxs("div",{className:"md:hidden h-full flex flex-col",children:[l.jsx("div",{className:"border-b bg-background p-4",children:l.jsx(Qy,{activeTab:a,onTabChange:p})}),l.jsx(sb,{children:l.jsxs(C.Suspense,{fallback:l.jsx(Xy,{}),children:[a==="websearch"&&l.jsx(Zy,{}),a==="image"&&l.jsx(Jy,{}),a==="channels"&&l.jsx(eb,{}),a==="globalenv"&&l.jsx(tb,{}),a==="thinking"&&l.jsx(nb,{}),a==="proxy"&&l.jsx(ab,{}),a==="auth"&&l.jsx(ib,{}),a==="backups"&&l.jsx(ob,{})]})})]}),l.jsxs(Ef,{direction:"horizontal",className:"h-full hidden md:flex",children:[l.jsx(qs,{defaultSize:46,minSize:36,maxSize:62,children:l.jsxs("div",{className:"h-full border-r flex flex-col bg-muted/30 relative",children:[l.jsx("div",{className:"p-5 border-b bg-background",children:l.jsx(Qy,{activeTab:a,onTabChange:p})}),l.jsx(sb,{children:l.jsxs(C.Suspense,{fallback:l.jsx(Xy,{}),children:[a==="websearch"&&l.jsx(Zy,{}),a==="image"&&l.jsx(Jy,{}),a==="channels"&&l.jsx(eb,{}),a==="globalenv"&&l.jsx(tb,{}),a==="thinking"&&l.jsx(nb,{}),a==="proxy"&&l.jsx(ab,{}),a==="auth"&&l.jsx(ib,{}),a==="backups"&&l.jsx(ob,{})]})})]})}),l.jsx(Of,{className:"w-2 bg-border hover:bg-primary/20 transition-colors cursor-col-resize flex items-center justify-center group",children:l.jsx(Ll,{className:"w-3 h-3 text-muted-foreground group-hover:text-primary"})}),l.jsx(qs,{defaultSize:54,minSize:35,children:l.jsxs("div",{className:"h-full flex flex-col",children:[l.jsxs("div",{className:"p-4 border-b bg-background flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Kg,{className:"w-5 h-5 text-primary"}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-semibold",children:"config.yaml"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"~/.ccs/config.yaml"})]})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(ot,{variant:"outline",size:"sm",onClick:m,disabled:!r,children:d?l.jsxs(l.Fragment,{children:[l.jsx(wo,{className:"w-4 h-4 mr-1"}),n("settings.copied")]}):l.jsxs(l.Fragment,{children:[l.jsx(Sl,{className:"w-4 h-4 mr-1"}),n("settings.copy")]})}),l.jsx(ot,{variant:"outline",size:"sm",onClick:f,disabled:c,children:l.jsx(Hs,{className:`w-4 h-4 ${c?"animate-spin":""}`})})]})]}),l.jsx("div",{className:"flex-1 overflow-auto",children:r?l.jsx(sv,{value:r,onChange:()=>{},language:"yaml",readonly:!0,minHeight:"auto",className:"min-h-full"}):c?l.jsxs("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:[l.jsx(Hs,{className:"w-5 h-5 animate-spin mr-2"}),n("settings.loading")]}):l.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:l.jsxs("div",{className:"text-center",children:[l.jsx(Kg,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),l.jsx("p",{children:n("settings.configFileNotFound")}),l.jsx("code",{className:"text-sm bg-muted px-2 py-1 rounded mt-2 inline-block",children:"ccs migrate"})]})})})]})})]})]})}function hM(){return l.jsx(lM,{children:l.jsx(fM,{})})}const mM=Object.freeze(Object.defineProperty({__proto__:null,SettingsPage:hM},Symbol.toStringTag,{value:"Module"}));function pM(n,a,o="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:n,timeZoneName:o}).format(a).split(/\s/g).slice(2).join(" ")}const gM={},Os={};function ki(n,a){try{const r=(gM[n]||=new Intl.DateTimeFormat("en-US",{timeZone:n,timeZoneName:"longOffset"}).format)(a).split("GMT")[1];return r in Os?Os[r]:rb(r,r.split(":"))}catch{if(n in Os)return Os[n];const o=n?.match(yM);return o?rb(n,o.slice(1)):NaN}}const yM=/([+-]\d\d):?(\d\d)?/;function rb(n,a){const o=+(a[0]||0),r=+(a[1]||0),c=+(a[2]||0)/60;return Os[n]=o*60+r>0?o*60+r+c:o*60-r-c}class qn extends Date{constructor(...a){super(),a.length>1&&typeof a[a.length-1]=="string"&&(this.timeZone=a.pop()),this.internal=new Date,isNaN(ki(this.timeZone,this))?this.setTime(NaN):a.length?typeof a[0]=="number"&&(a.length===1||a.length===2&&typeof a[1]!="number")?this.setTime(a[0]):typeof a[0]=="string"?this.setTime(+new Date(a[0])):a[0]instanceof Date?this.setTime(+a[0]):(this.setTime(+new Date(...a)),uv(this),Xd(this)):this.setTime(Date.now())}static tz(a,...o){return o.length?new qn(...o,a):new qn(Date.now(),a)}withTimeZone(a){return new qn(+this,a)}getTimezoneOffset(){const a=-ki(this.timeZone,this);return a>0?Math.floor(a):Math.ceil(a)}setTime(a){return Date.prototype.setTime.apply(this,arguments),Xd(this),+this}[Symbol.for("constructDateFrom")](a){return new qn(+new Date(a),this.timeZone)}}const lb=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(n=>{if(!lb.test(n))return;const a=n.replace(lb,"$1UTC");qn.prototype[a]&&(n.startsWith("get")?qn.prototype[n]=function(){return this.internal[a]()}:(qn.prototype[n]=function(){return Date.prototype[a].apply(this.internal,arguments),bM(this),+this},qn.prototype[a]=function(){return Date.prototype[a].apply(this,arguments),Xd(this),+this}))});function Xd(n){n.internal.setTime(+n),n.internal.setUTCSeconds(n.internal.getUTCSeconds()-Math.round(-ki(n.timeZone,n)*60))}function bM(n){Date.prototype.setFullYear.call(n,n.internal.getUTCFullYear(),n.internal.getUTCMonth(),n.internal.getUTCDate()),Date.prototype.setHours.call(n,n.internal.getUTCHours(),n.internal.getUTCMinutes(),n.internal.getUTCSeconds(),n.internal.getUTCMilliseconds()),uv(n)}function uv(n){const a=ki(n.timeZone,n),o=a>0?Math.floor(a):Math.ceil(a),r=new Date(+n);r.setUTCHours(r.getUTCHours()-1);const c=-new Date(+n).getTimezoneOffset(),d=-new Date(+r).getTimezoneOffset(),f=c-d,m=Date.prototype.getHours.apply(n)!==n.internal.getUTCHours();f&&m&&n.internal.setUTCMinutes(n.internal.getUTCMinutes()+f);const p=c-o;p&&Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+p);const g=new Date(+n);g.setUTCSeconds(0);const S=c>0?g.getSeconds():(g.getSeconds()-60)%60,b=Math.round(-(ki(n.timeZone,n)*60))%60;(b||S)&&(n.internal.setUTCSeconds(n.internal.getUTCSeconds()+b),Date.prototype.setUTCSeconds.call(n,Date.prototype.getUTCSeconds.call(n)+b+S));const x=ki(n.timeZone,n),j=x>0?Math.floor(x):Math.ceil(x),E=-new Date(+n).getTimezoneOffset()-j,L=j!==o,O=E-p;if(L&&O){Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+O);const D=ki(n.timeZone,n),A=D>0?Math.floor(D):Math.ceil(D),k=j-A;k&&(n.internal.setUTCMinutes(n.internal.getUTCMinutes()+k),Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+k))}}class ba extends qn{static tz(a,...o){return o.length?new ba(...o,a):new ba(Date.now(),a)}toISOString(){const[a,o,r]=this.tzComponents(),c=`${a}${o}:${r}`;return this.internal.toISOString().slice(0,-1)+c}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[a,o,r,c]=this.internal.toUTCString().split(" ");return`${a?.slice(0,-1)} ${r} ${o} ${c}`}toTimeString(){const a=this.internal.toUTCString().split(" ")[4],[o,r,c]=this.tzComponents();return`${a} GMT${o}${r}${c} (${pM(this.timeZone,this)})`}toLocaleString(a,o){return Date.prototype.toLocaleString.call(this,a,{...o,timeZone:o?.timeZone||this.timeZone})}toLocaleDateString(a,o){return Date.prototype.toLocaleDateString.call(this,a,{...o,timeZone:o?.timeZone||this.timeZone})}toLocaleTimeString(a,o){return Date.prototype.toLocaleTimeString.call(this,a,{...o,timeZone:o?.timeZone||this.timeZone})}tzComponents(){const a=this.getTimezoneOffset(),o=a>0?"-":"+",r=String(Math.floor(Math.abs(a)/60)).padStart(2,"0"),c=String(Math.abs(a)%60).padStart(2,"0");return[o,r,c]}withTimeZone(a){return new ba(+this,a)}[Symbol.for("constructDateFrom")](a){return new ba(+new Date(a),this.timeZone)}}const cb=5,xM=4;function vM(n,a){const o=a.startOfMonth(n),r=o.getDay()>0?o.getDay():7,c=a.addDays(n,-r+1),d=a.addDays(c,cb*7-1);return a.getMonth(n)===a.getMonth(d)?cb:xM}function dv(n,a){const o=a.startOfMonth(n),r=o.getDay();return r===1?o:r===0?a.addDays(o,-6):a.addDays(o,-1*(r-1))}function CM(n,a){const o=dv(n,a),r=vM(n,a);return a.addDays(o,r*7-1)}const fv={...ws,labels:{labelDayButton:(n,a,o,r)=>{let c;r&&typeof r.format=="function"?c=r.format.bind(r):c=(f,m)=>Ds(f,m,{locale:ws,...o});let d=c(n,"PPPP");return a.today&&(d=`Today, ${d}`),a.selected&&(d=`${d}, selected`),d},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:n=>`Week ${n}`,labelYearDropdown:"Choose the Year",labelGrid:(n,a,o)=>{let r;return o&&typeof o.format=="function"?r=o.format.bind(o):r=(c,d)=>Ds(c,d,{locale:ws,...a}),r(n,"LLLL yyyy")},labelGridcell:(n,a,o,r)=>{let c;r&&typeof r.format=="function"?c=r.format.bind(r):c=(f,m)=>Ds(f,m,{locale:ws,...o});let d=c(n,"PPPP");return a?.today&&(d=`Today, ${d}`),d},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(n,a,o)=>{let r;return o&&typeof o.format=="function"?r=o.format.bind(o):r=(c,d)=>Ds(c,d,{locale:ws,...a}),r(n,"cccc")}}};class hn{constructor(a,o){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?ba.tz(this.options.timeZone):new this.Date,this.newDate=(r,c,d)=>this.overrides?.newDate?this.overrides.newDate(r,c,d):this.options.timeZone?new ba(r,c,d,this.options.timeZone):new Date(r,c,d),this.addDays=(r,c)=>this.overrides?.addDays?this.overrides.addDays(r,c):uw(r,c),this.addMonths=(r,c)=>this.overrides?.addMonths?this.overrides.addMonths(r,c):dw(r,c),this.addWeeks=(r,c)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,c):fw(r,c),this.addYears=(r,c)=>this.overrides?.addYears?this.overrides.addYears(r,c):hw(r,c),this.differenceInCalendarDays=(r,c)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,c):mw(r,c),this.differenceInCalendarMonths=(r,c)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,c):pw(r,c),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):gw(r),this.eachYearOfInterval=r=>{const c=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(r):yw(r),d=new Set(c.map(m=>this.getYear(m)));if(d.size===c.length)return c;const f=[];return d.forEach(m=>{f.push(new Date(m,0,1))}),f},this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):CM(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):bw(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):xw(r),this.endOfWeek=(r,c)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,c):vw(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):Cw(r),this.format=(r,c,d)=>{const f=this.overrides?.format?this.overrides.format(r,c,this.options):Ds(r,c,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(f):f},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):Sw(r),this.getMonth=(r,c)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):ww(r,this.options),this.getYear=(r,c)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):Nw(r,this.options),this.getWeek=(r,c)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):kw(r,this.options),this.isAfter=(r,c)=>this.overrides?.isAfter?this.overrides.isAfter(r,c):Aw(r,c),this.isBefore=(r,c)=>this.overrides?.isBefore?this.overrides.isBefore(r,c):Dw(r,c),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):Tw(r),this.isSameDay=(r,c)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,c):jw(r,c),this.isSameMonth=(r,c)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,c):Mw(r,c),this.isSameYear=(r,c)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,c):Ew(r,c),this.max=r=>this.overrides?.max?this.overrides.max(r):Ow(r),this.min=r=>this.overrides?.min?this.overrides.min(r):Pw(r),this.setMonth=(r,c)=>this.overrides?.setMonth?this.overrides.setMonth(r,c):Lw(r,c),this.setYear=(r,c)=>this.overrides?.setYear?this.overrides.setYear(r,c):Rw(r,c),this.startOfBroadcastWeek=(r,c)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):dv(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):_w(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):zw(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):Iw(r),this.startOfWeek=(r,c)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):Uw(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):Hw(r),this.options={locale:fv,...a},this.overrides=o}getDigitMap(){const{numerals:a="latn"}=this.options,o=new Intl.NumberFormat("en-US",{numberingSystem:a}),r={};for(let c=0;c<10;c++)r[c.toString()]=o.format(c);return r}replaceDigits(a){const o=this.getDigitMap();return a.replace(/\d/g,r=>o[r]||r)}formatNumber(a){return this.replaceDigits(a.toString())}getMonthYearOrder(){const a=this.options.locale?.code;return a&&hn.yearFirstLocales.has(a)?"year-first":"month-first"}formatMonthYear(a){const{locale:o,timeZone:r,numerals:c}=this.options,d=o?.code;if(d&&hn.yearFirstLocales.has(d))try{return new Intl.DateTimeFormat(d,{month:"long",year:"numeric",timeZone:r,numberingSystem:c}).format(a)}catch{}const f=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(a,f)}}hn.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Vn=new hn;class hv{constructor(a,o,r=Vn){this.date=a,this.displayMonth=o,this.outside=!!(o&&!r.isSameMonth(a,o)),this.dateLib=r,this.isoDate=r.format(a,"yyyy-MM-dd"),this.displayMonthId=r.format(o,"yyyy-MM"),this.dateMonthId=r.format(a,"yyyy-MM")}isEqualTo(a){return this.dateLib.isSameDay(a.date,this.date)&&this.dateLib.isSameMonth(a.displayMonth,this.displayMonth)}}class SM{constructor(a,o){this.date=a,this.weeks=o}}class wM{constructor(a,o){this.days=o,this.weekNumber=a}}function NM(n){return ce.createElement("button",{...n})}function kM(n){return ce.createElement("span",{...n})}function AM(n){const{size:a=24,orientation:o="left",className:r}=n;return ce.createElement("svg",{className:r,width:a,height:a,viewBox:"0 0 24 24"},o==="up"&&ce.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),o==="down"&&ce.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),o==="left"&&ce.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),o==="right"&&ce.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function DM(n){const{day:a,modifiers:o,...r}=n;return ce.createElement("td",{...r})}function TM(n){const{day:a,modifiers:o,...r}=n,c=ce.useRef(null);return ce.useEffect(()=>{o.focused&&c.current?.focus()},[o.focused]),ce.createElement("button",{ref:c,...r})}var be;(function(n){n.Root="root",n.Chevron="chevron",n.Day="day",n.DayButton="day_button",n.CaptionLabel="caption_label",n.Dropdowns="dropdowns",n.Dropdown="dropdown",n.DropdownRoot="dropdown_root",n.Footer="footer",n.MonthGrid="month_grid",n.MonthCaption="month_caption",n.MonthsDropdown="months_dropdown",n.Month="month",n.Months="months",n.Nav="nav",n.NextMonthButton="button_next",n.PreviousMonthButton="button_previous",n.Week="week",n.Weeks="weeks",n.Weekday="weekday",n.Weekdays="weekdays",n.WeekNumber="week_number",n.WeekNumberHeader="week_number_header",n.YearsDropdown="years_dropdown"})(be||(be={}));var ht;(function(n){n.disabled="disabled",n.hidden="hidden",n.outside="outside",n.focused="focused",n.today="today"})(ht||(ht={}));var En;(function(n){n.range_end="range_end",n.range_middle="range_middle",n.range_start="range_start",n.selected="selected"})(En||(En={}));var fn;(function(n){n.weeks_before_enter="weeks_before_enter",n.weeks_before_exit="weeks_before_exit",n.weeks_after_enter="weeks_after_enter",n.weeks_after_exit="weeks_after_exit",n.caption_after_enter="caption_after_enter",n.caption_after_exit="caption_after_exit",n.caption_before_enter="caption_before_enter",n.caption_before_exit="caption_before_exit"})(fn||(fn={}));function jM(n){const{options:a,className:o,components:r,classNames:c,...d}=n,f=[c[be.Dropdown],o].join(" "),m=a?.find(({value:p})=>p===d.value);return ce.createElement("span",{"data-disabled":d.disabled,className:c[be.DropdownRoot]},ce.createElement(r.Select,{className:f,...d},a?.map(({value:p,label:g,disabled:S})=>ce.createElement(r.Option,{key:p,value:p,disabled:S},g))),ce.createElement("span",{className:c[be.CaptionLabel],"aria-hidden":!0},m?.label,ce.createElement(r.Chevron,{orientation:"down",size:18,className:c[be.Chevron]})))}function MM(n){return ce.createElement("div",{...n})}function EM(n){return ce.createElement("div",{...n})}function OM(n){const{calendarMonth:a,displayIndex:o,...r}=n;return ce.createElement("div",{...r},n.children)}function PM(n){const{calendarMonth:a,displayIndex:o,...r}=n;return ce.createElement("div",{...r})}function LM(n){return ce.createElement("table",{...n})}function RM(n){return ce.createElement("div",{...n})}const mv=C.createContext(void 0);function Xs(){const n=C.useContext(mv);if(n===void 0)throw new Error("useDayPicker() must be used within a custom component.");return n}function _M(n){const{components:a}=Xs();return ce.createElement(a.Dropdown,{...n})}function zM(n){const{onPreviousClick:a,onNextClick:o,previousMonth:r,nextMonth:c,...d}=n,{components:f,classNames:m,labels:{labelPrevious:p,labelNext:g}}=Xs(),S=C.useCallback(x=>{c&&o?.(x)},[c,o]),b=C.useCallback(x=>{r&&a?.(x)},[r,a]);return ce.createElement("nav",{...d},ce.createElement(f.PreviousMonthButton,{type:"button",className:m[be.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":p(r),onClick:b},ce.createElement(f.Chevron,{disabled:r?void 0:!0,className:m[be.Chevron],orientation:"left"})),ce.createElement(f.NextMonthButton,{type:"button",className:m[be.NextMonthButton],tabIndex:c?void 0:-1,"aria-disabled":c?void 0:!0,"aria-label":g(c),onClick:S},ce.createElement(f.Chevron,{disabled:c?void 0:!0,orientation:"right",className:m[be.Chevron]})))}function IM(n){const{components:a}=Xs();return ce.createElement(a.Button,{...n})}function UM(n){return ce.createElement("option",{...n})}function HM(n){const{components:a}=Xs();return ce.createElement(a.Button,{...n})}function BM(n){const{rootRef:a,...o}=n;return ce.createElement("div",{...o,ref:a})}function KM(n){return ce.createElement("select",{...n})}function qM(n){const{week:a,...o}=n;return ce.createElement("tr",{...o})}function FM(n){return ce.createElement("th",{...n})}function GM(n){return ce.createElement("thead",{"aria-hidden":!0},ce.createElement("tr",{...n}))}function VM(n){const{week:a,...o}=n;return ce.createElement("th",{...o})}function YM(n){return ce.createElement("th",{...n})}function $M(n){return ce.createElement("tbody",{...n})}function WM(n){const{components:a}=Xs();return ce.createElement(a.Dropdown,{...n})}const QM=Object.freeze(Object.defineProperty({__proto__:null,Button:NM,CaptionLabel:kM,Chevron:AM,Day:DM,DayButton:TM,Dropdown:jM,DropdownNav:MM,Footer:EM,Month:OM,MonthCaption:PM,MonthGrid:LM,Months:RM,MonthsDropdown:_M,Nav:zM,NextMonthButton:IM,Option:UM,PreviousMonthButton:HM,Root:BM,Select:KM,Week:qM,WeekNumber:VM,WeekNumberHeader:YM,Weekday:FM,Weekdays:GM,Weeks:$M,YearsDropdown:WM},Symbol.toStringTag,{value:"Module"}));function xa(n,a,o=!1,r=Vn){let{from:c,to:d}=n;const{differenceInCalendarDays:f,isSameDay:m}=r;return c&&d?(f(d,c)<0&&([c,d]=[d,c]),f(a,c)>=(o?1:0)&&f(d,a)>=(o?1:0)):!o&&d?m(d,a):!o&&c?m(c,a):!1}function Kf(n){return!!(n&&typeof n=="object"&&"before"in n&&"after"in n)}function Xl(n){return!!(n&&typeof n=="object"&&"from"in n)}function qf(n){return!!(n&&typeof n=="object"&&"after"in n)}function Ff(n){return!!(n&&typeof n=="object"&&"before"in n)}function pv(n){return!!(n&&typeof n=="object"&&"dayOfWeek"in n)}function gv(n,a){return Array.isArray(n)&&n.every(a.isDate)}function va(n,a,o=Vn){const r=Array.isArray(a)?a:[a],{isSameDay:c,differenceInCalendarDays:d,isAfter:f}=o;return r.some(m=>{if(typeof m=="boolean")return m;if(o.isDate(m))return c(n,m);if(gv(m,o))return m.some(p=>c(n,p));if(Xl(m))return xa(m,n,!1,o);if(pv(m))return Array.isArray(m.dayOfWeek)?m.dayOfWeek.includes(n.getDay()):m.dayOfWeek===n.getDay();if(Kf(m)){const p=d(m.before,n),g=d(m.after,n),S=p>0,b=g<0;return f(m.before,m.after)?b&&S:S||b}return qf(m)?d(n,m.after)>0:Ff(m)?d(m.before,n)>0:typeof m=="function"?m(n):!1})}function XM(n,a,o,r,c){const{disabled:d,hidden:f,modifiers:m,showOutsideDays:p,broadcastCalendar:g,today:S=c.today()}=a,{isSameDay:b,isSameMonth:x,startOfMonth:j,isBefore:N,endOfMonth:E,isAfter:L}=c,O=o&&j(o),D=r&&E(r),A={[ht.focused]:[],[ht.outside]:[],[ht.disabled]:[],[ht.hidden]:[],[ht.today]:[]},k={};for(const T of n){const{date:w,displayMonth:R}=T,I=!!(R&&!x(w,R)),z=!!(O&&N(w,O)),F=!!(D&&L(w,D)),ee=!!(d&&va(w,d,c)),Q=!!(f&&va(w,f,c))||z||F||!g&&!p&&I||g&&p===!1&&I,ge=b(w,S);I&&A.outside.push(T),ee&&A.disabled.push(T),Q&&A.hidden.push(T),ge&&A.today.push(T),m&&Object.keys(m).forEach(te=>{const ve=m?.[te];ve&&va(w,ve,c)&&(k[te]?k[te].push(T):k[te]=[T])})}return T=>{const w={[ht.focused]:!1,[ht.disabled]:!1,[ht.hidden]:!1,[ht.outside]:!1,[ht.today]:!1},R={};for(const I in A){const z=A[I];w[I]=z.some(F=>F===T)}for(const I in k)R[I]=k[I].some(z=>z===T);return{...w,...R}}}function ZM(n,a,o={}){return Object.entries(n).filter(([,c])=>c===!0).reduce((c,[d])=>(o[d]?c.push(o[d]):a[ht[d]]?c.push(a[ht[d]]):a[En[d]]&&c.push(a[En[d]]),c),[a[be.Day]])}function JM(n){return{...QM,...n}}function eE(n){const a={"data-mode":n.mode??void 0,"data-required":"required"in n?n.required:void 0,"data-multiple-months":n.numberOfMonths&&n.numberOfMonths>1||void 0,"data-week-numbers":n.showWeekNumber||void 0,"data-broadcast-calendar":n.broadcastCalendar||void 0,"data-nav-layout":n.navLayout||void 0};return Object.entries(n).forEach(([o,r])=>{o.startsWith("data-")&&(a[o]=r)}),a}function tE(){const n={};for(const a in be)n[be[a]]=`rdp-${be[a]}`;for(const a in ht)n[ht[a]]=`rdp-${ht[a]}`;for(const a in En)n[En[a]]=`rdp-${En[a]}`;for(const a in fn)n[fn[a]]=`rdp-${fn[a]}`;return n}function yv(n,a,o){return(o??new hn(a)).formatMonthYear(n)}const nE=yv;function aE(n,a,o){return(o??new hn(a)).format(n,"d")}function iE(n,a=Vn){return a.format(n,"LLLL")}function oE(n,a,o){return(o??new hn(a)).format(n,"cccccc")}function sE(n,a=Vn){return n<10?a.formatNumber(`0${n.toLocaleString()}`):a.formatNumber(`${n.toLocaleString()}`)}function rE(){return""}function bv(n,a=Vn){return a.format(n,"yyyy")}const lE=bv,cE=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:yv,formatDay:aE,formatMonthCaption:nE,formatMonthDropdown:iE,formatWeekNumber:sE,formatWeekNumberHeader:rE,formatWeekdayName:oE,formatYearCaption:lE,formatYearDropdown:bv},Symbol.toStringTag,{value:"Module"}));function uE(n){return n?.formatMonthCaption&&!n.formatCaption&&(n.formatCaption=n.formatMonthCaption),n?.formatYearCaption&&!n.formatYearDropdown&&(n.formatYearDropdown=n.formatYearCaption),{...cE,...n}}function Gf(n,a,o,r){let c=(r??new hn(o)).format(n,"PPPP");return a.today&&(c=`Today, ${c}`),a.selected&&(c=`${c}, selected`),c}const dE=Gf;function Vf(n,a,o){return(o??new hn(a)).formatMonthYear(n)}const fE=Vf;function xv(n,a,o,r){let c=(r??new hn(o)).format(n,"PPPP");return a?.today&&(c=`Today, ${c}`),c}function vv(n){return"Choose the Month"}function Cv(){return""}const hE="Go to the Next Month";function Sv(n,a){return hE}function wv(n){return"Go to the Previous Month"}function Nv(n,a,o){return(o??new hn(a)).format(n,"cccc")}function kv(n,a){return`Week ${n}`}function Av(n){return"Week Number"}function Dv(n){return"Choose the Year"}const mE=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:fE,labelDay:dE,labelDayButton:Gf,labelGrid:Vf,labelGridcell:xv,labelMonthDropdown:vv,labelNav:Cv,labelNext:Sv,labelPrevious:wv,labelWeekNumber:kv,labelWeekNumberHeader:Av,labelWeekday:Nv,labelYearDropdown:Dv},Symbol.toStringTag,{value:"Module"})),Mn=(n,a,o)=>a||(o?typeof o=="function"?o:(...r)=>o:n);function pE(n,a){const o=a.locale?.labels??{};return{...mE,...n??{},labelDayButton:Mn(Gf,n?.labelDayButton,o.labelDayButton),labelMonthDropdown:Mn(vv,n?.labelMonthDropdown,o.labelMonthDropdown),labelNext:Mn(Sv,n?.labelNext,o.labelNext),labelPrevious:Mn(wv,n?.labelPrevious,o.labelPrevious),labelWeekNumber:Mn(kv,n?.labelWeekNumber,o.labelWeekNumber),labelYearDropdown:Mn(Dv,n?.labelYearDropdown,o.labelYearDropdown),labelGrid:Mn(Vf,n?.labelGrid,o.labelGrid),labelGridcell:Mn(xv,n?.labelGridcell,o.labelGridcell),labelNav:Mn(Cv,n?.labelNav,o.labelNav),labelWeekNumberHeader:Mn(Av,n?.labelWeekNumberHeader,o.labelWeekNumberHeader),labelWeekday:Mn(Nv,n?.labelWeekday,o.labelWeekday)}}function gE(n,a,o,r,c){const{startOfMonth:d,startOfYear:f,endOfYear:m,eachMonthOfInterval:p,getMonth:g}=c;return p({start:f(n),end:m(n)}).map(x=>{const j=r.formatMonthDropdown(x,c),N=g(x),E=a&&x<d(a)||o&&x>d(o)||!1;return{value:N,label:j,disabled:E}})}function yE(n,a={},o={}){let r={...a?.[be.Day]};return Object.entries(n).filter(([,c])=>c===!0).forEach(([c])=>{r={...r,...o?.[c]}}),r}function bE(n,a,o,r){const c=r??n.today(),d=o?n.startOfBroadcastWeek(c,n):a?n.startOfISOWeek(c):n.startOfWeek(c),f=[];for(let m=0;m<7;m++){const p=n.addDays(d,m);f.push(p)}return f}function xE(n,a,o,r,c=!1){if(!n||!a)return;const{startOfYear:d,endOfYear:f,eachYearOfInterval:m,getYear:p}=r,g=d(n),S=f(a),b=m({start:g,end:S});return c&&b.reverse(),b.map(x=>{const j=o.formatYearDropdown(x,r);return{value:p(x),label:j,disabled:!1}})}const Zs=n=>n instanceof HTMLElement?n:null,Td=n=>[...n.querySelectorAll("[data-animated-month]")??[]],vE=n=>Zs(n.querySelector("[data-animated-month]")),jd=n=>Zs(n.querySelector("[data-animated-caption]")),Md=n=>Zs(n.querySelector("[data-animated-weeks]")),CE=n=>Zs(n.querySelector("[data-animated-nav]")),SE=n=>Zs(n.querySelector("[data-animated-weekdays]"));function wE(n,a,{classNames:o,months:r,focused:c,dateLib:d}){const f=C.useRef(null),m=C.useRef(r),p=C.useRef(!1);C.useLayoutEffect(()=>{const g=m.current;if(m.current=r,!a||!n.current||!(n.current instanceof HTMLElement)||r.length===0||g.length===0||r.length!==g.length)return;const S=d.isSameMonth(r[0].date,g[0].date),b=d.isAfter(r[0].date,g[0].date),x=b?o[fn.caption_after_enter]:o[fn.caption_before_enter],j=b?o[fn.weeks_after_enter]:o[fn.weeks_before_enter],N=f.current,E=n.current.cloneNode(!0);if(E instanceof HTMLElement?(Td(E).forEach(A=>{if(!(A instanceof HTMLElement))return;const k=vE(A);k&&A.contains(k)&&A.removeChild(k);const T=jd(A);T&&T.classList.remove(x);const w=Md(A);w&&w.classList.remove(j)}),f.current=E):f.current=null,p.current||S||c)return;const L=N instanceof HTMLElement?Td(N):[],O=Td(n.current);if(O?.every(D=>D instanceof HTMLElement)&&L&&L.every(D=>D instanceof HTMLElement)){p.current=!0,n.current.style.isolation="isolate";const D=CE(n.current);D&&(D.style.zIndex="1"),O.forEach((A,k)=>{const T=L[k];if(!T)return;A.style.position="relative",A.style.overflow="hidden";const w=jd(A);w&&w.classList.add(x);const R=Md(A);R&&R.classList.add(j);const I=()=>{p.current=!1,n.current&&(n.current.style.isolation=""),D&&(D.style.zIndex=""),w&&w.classList.remove(x),R&&R.classList.remove(j),A.style.position="",A.style.overflow="",A.contains(T)&&A.removeChild(T)};T.style.pointerEvents="none",T.style.position="absolute",T.style.overflow="hidden",T.setAttribute("aria-hidden","true");const z=SE(T);z&&(z.style.opacity="0");const F=jd(T);F&&(F.classList.add(b?o[fn.caption_before_exit]:o[fn.caption_after_exit]),F.addEventListener("animationend",I));const ee=Md(T);ee&&ee.classList.add(b?o[fn.weeks_before_exit]:o[fn.weeks_after_exit]),A.insertBefore(T,A.firstChild)})}})}function NE(n,a,o,r){const c=n[0],d=n[n.length-1],{ISOWeek:f,fixedWeeks:m,broadcastCalendar:p}=o??{},{addDays:g,differenceInCalendarDays:S,differenceInCalendarMonths:b,endOfBroadcastWeek:x,endOfISOWeek:j,endOfMonth:N,endOfWeek:E,isAfter:L,startOfBroadcastWeek:O,startOfISOWeek:D,startOfWeek:A}=r,k=p?O(c,r):f?D(c):A(c),T=p?x(d):f?j(N(d)):E(N(d)),w=a&&(p?x(a):f?j(a):E(a)),R=w&&L(T,w)?w:T,I=S(R,k),z=b(d,c)+1,F=[];for(let ge=0;ge<=I;ge++){const te=g(k,ge);F.push(te)}const Q=(p?35:42)*z;if(m&&F.length<Q){const ge=Q-F.length;for(let te=0;te<ge;te++){const ve=g(F[F.length-1],1);F.push(ve)}}return F}function kE(n){const a=[];return n.reduce((o,r)=>{const c=r.weeks.reduce((d,f)=>d.concat(f.days.slice()),a.slice());return o.concat(c.slice())},a.slice())}function AE(n,a,o,r){const{numberOfMonths:c=1}=o,d=[];for(let f=0;f<c;f++){const m=r.addMonths(n,f);if(a&&m>a)break;d.push(m)}return d}function ub(n,a,o,r){const{month:c,defaultMonth:d,today:f=r.today(),numberOfMonths:m=1}=n;let p=c||d||f;const{differenceInCalendarMonths:g,addMonths:S,startOfMonth:b}=r;if(o&&g(o,p)<m-1){const x=-1*(m-1);p=S(o,x)}return a&&g(p,a)<0&&(p=a),b(p)}function DE(n,a,o,r){const{addDays:c,endOfBroadcastWeek:d,endOfISOWeek:f,endOfMonth:m,endOfWeek:p,getISOWeek:g,getWeek:S,startOfBroadcastWeek:b,startOfISOWeek:x,startOfWeek:j}=r,N=n.reduce((E,L)=>{const O=o.broadcastCalendar?b(L,r):o.ISOWeek?x(L):j(L),D=o.broadcastCalendar?d(L):o.ISOWeek?f(m(L)):p(m(L)),A=a.filter(R=>R>=O&&R<=D),k=o.broadcastCalendar?35:42;if(o.fixedWeeks&&A.length<k){const R=a.filter(I=>{const z=k-A.length;return I>D&&I<=c(D,z)});A.push(...R)}const T=A.reduce((R,I)=>{const z=o.ISOWeek?g(I):S(I),F=R.find(Q=>Q.weekNumber===z),ee=new hv(I,L,r);return F?F.days.push(ee):R.push(new wM(z,[ee])),R},[]),w=new SM(L,T);return E.push(w),E},[]);return o.reverseMonths?N.reverse():N}function TE(n,a){let{startMonth:o,endMonth:r}=n;const{startOfYear:c,startOfDay:d,startOfMonth:f,endOfMonth:m,addYears:p,endOfYear:g,newDate:S,today:b}=a,{fromYear:x,toYear:j,fromMonth:N,toMonth:E}=n;!o&&N&&(o=N),!o&&x&&(o=a.newDate(x,0,1)),!r&&E&&(r=E),!r&&j&&(r=S(j,11,31));const L=n.captionLayout==="dropdown"||n.captionLayout==="dropdown-years";return o?o=f(o):x?o=S(x,0,1):!o&&L&&(o=c(p(n.today??b(),-100))),r?r=m(r):j?r=S(j,11,31):!r&&L&&(r=g(n.today??b())),[o&&d(o),r&&d(r)]}function jE(n,a,o,r){if(o.disableNavigation)return;const{pagedNavigation:c,numberOfMonths:d=1}=o,{startOfMonth:f,addMonths:m,differenceInCalendarMonths:p}=r,g=c?d:1,S=f(n);if(!a)return m(S,g);if(!(p(a,n)<d))return m(S,g)}function ME(n,a,o,r){if(o.disableNavigation)return;const{pagedNavigation:c,numberOfMonths:d}=o,{startOfMonth:f,addMonths:m,differenceInCalendarMonths:p}=r,g=c?d??1:1,S=f(n);if(!a)return m(S,-g);if(!(p(S,a)<=0))return m(S,-g)}function EE(n){const a=[];return n.reduce((o,r)=>o.concat(r.weeks.slice()),a.slice())}function Zl(n,a){const[o,r]=C.useState(n);return[a===void 0?o:a,r]}function OE(n,a){const[o,r]=TE(n,a),{startOfMonth:c,endOfMonth:d}=a,f=ub(n,o,r,a),[m,p]=Zl(f,n.month?f:void 0);C.useEffect(()=>{const k=ub(n,o,r,a);p(k)},[n.timeZone]);const{months:g,weeks:S,days:b,previousMonth:x,nextMonth:j}=C.useMemo(()=>{const k=AE(m,r,{numberOfMonths:n.numberOfMonths},a),T=NE(k,n.endMonth?d(n.endMonth):void 0,{ISOWeek:n.ISOWeek,fixedWeeks:n.fixedWeeks,broadcastCalendar:n.broadcastCalendar},a),w=DE(k,T,{broadcastCalendar:n.broadcastCalendar,fixedWeeks:n.fixedWeeks,ISOWeek:n.ISOWeek,reverseMonths:n.reverseMonths},a),R=EE(w),I=kE(w),z=ME(m,o,n,a),F=jE(m,r,n,a);return{months:w,weeks:R,days:I,previousMonth:z,nextMonth:F}},[a,m.getTime(),r?.getTime(),o?.getTime(),n.disableNavigation,n.broadcastCalendar,n.endMonth?.getTime(),n.fixedWeeks,n.ISOWeek,n.numberOfMonths,n.pagedNavigation,n.reverseMonths]),{disableNavigation:N,onMonthChange:E}=n,L=k=>S.some(T=>T.days.some(w=>w.isEqualTo(k))),O=k=>{if(N)return;let T=c(k);o&&T<c(o)&&(T=c(o)),r&&T>c(r)&&(T=c(r)),p(T),E?.(T)};return{months:g,weeks:S,days:b,navStart:o,navEnd:r,previousMonth:x,nextMonth:j,goToMonth:O,goToDay:k=>{L(k)||O(k.date)}}}var Bn;(function(n){n[n.Today=0]="Today",n[n.Selected=1]="Selected",n[n.LastFocused=2]="LastFocused",n[n.FocusedModifier=3]="FocusedModifier"})(Bn||(Bn={}));function db(n){return!n[ht.disabled]&&!n[ht.hidden]&&!n[ht.outside]}function PE(n,a,o,r){let c,d=-1;for(const f of n){const m=a(f);db(m)&&(m[ht.focused]&&d<Bn.FocusedModifier?(c=f,d=Bn.FocusedModifier):r?.isEqualTo(f)&&d<Bn.LastFocused?(c=f,d=Bn.LastFocused):o(f.date)&&d<Bn.Selected?(c=f,d=Bn.Selected):m[ht.today]&&d<Bn.Today&&(c=f,d=Bn.Today))}return c||(c=n.find(f=>db(a(f)))),c}function LE(n,a,o,r,c,d,f){const{ISOWeek:m,broadcastCalendar:p}=d,{addDays:g,addMonths:S,addWeeks:b,addYears:x,endOfBroadcastWeek:j,endOfISOWeek:N,endOfWeek:E,max:L,min:O,startOfBroadcastWeek:D,startOfISOWeek:A,startOfWeek:k}=f;let w={day:g,week:b,month:S,year:x,startOfWeek:R=>p?D(R,f):m?A(R):k(R),endOfWeek:R=>p?j(R):m?N(R):E(R)}[n](o,a==="after"?1:-1);return a==="before"&&r?w=L([r,w]):a==="after"&&c&&(w=O([c,w])),w}function Tv(n,a,o,r,c,d,f,m=0){if(m>365)return;const p=LE(n,a,o.date,r,c,d,f),g=!!(d.disabled&&va(p,d.disabled,f)),S=!!(d.hidden&&va(p,d.hidden,f)),b=p,x=new hv(p,b,f);return!g&&!S?x:Tv(n,a,x,r,c,d,f,m+1)}function RE(n,a,o,r,c){const{autoFocus:d}=n,[f,m]=C.useState(),p=PE(a.days,o,r||(()=>!1),f),[g,S]=C.useState(d?p:void 0);return{isFocusTarget:E=>!!p?.isEqualTo(E),setFocused:S,focused:g,blur:()=>{m(g),S(void 0)},moveFocus:(E,L)=>{if(!g)return;const O=Tv(E,L,g,a.navStart,a.navEnd,n,c);O&&(n.disableNavigation&&!a.days.some(A=>A.isEqualTo(O))||(a.goToDay(O),S(O)))}}}function _E(n,a){const{selected:o,required:r,onSelect:c}=n,[d,f]=Zl(o,c?o:void 0),m=c?o:d,{isSameDay:p}=a,g=j=>m?.some(N=>p(N,j))??!1,{min:S,max:b}=n;return{selected:m,select:(j,N,E)=>{let L=[...m??[]];if(g(j)){if(m?.length===S||r&&m?.length===1)return;L=m?.filter(O=>!p(O,j))}else m?.length===b?L=[j]:L=[...L,j];return c||f(L),c?.(L,j,N,E),L},isSelected:g}}function zE(n,a,o=0,r=0,c=!1,d=Vn){const{from:f,to:m}=a||{},{isSameDay:p,isAfter:g,isBefore:S}=d;let b;if(!f&&!m)b={from:n,to:o>0?void 0:n};else if(f&&!m)p(f,n)?o===0?b={from:f,to:n}:c?b={from:f,to:void 0}:b=void 0:S(n,f)?b={from:n,to:f}:b={from:f,to:n};else if(f&&m)if(p(f,n)&&p(m,n))c?b={from:f,to:m}:b=void 0;else if(p(f,n))b={from:f,to:o>0?void 0:n};else if(p(m,n))b={from:n,to:o>0?void 0:n};else if(S(n,f))b={from:n,to:m};else if(g(n,f))b={from:f,to:n};else if(g(n,m))b={from:f,to:n};else throw new Error("Invalid range");if(b?.from&&b?.to){const x=d.differenceInCalendarDays(b.to,b.from);r>0&&x>r?b={from:n,to:void 0}:o>1&&x<o&&(b={from:n,to:void 0})}return b}function IE(n,a,o=Vn){const r=Array.isArray(a)?a:[a];let c=n.from;const d=o.differenceInCalendarDays(n.to,n.from),f=Math.min(d,6);for(let m=0;m<=f;m++){if(r.includes(c.getDay()))return!0;c=o.addDays(c,1)}return!1}function fb(n,a,o=Vn){return xa(n,a.from,!1,o)||xa(n,a.to,!1,o)||xa(a,n.from,!1,o)||xa(a,n.to,!1,o)}function UE(n,a,o=Vn){const r=Array.isArray(a)?a:[a];if(r.filter(m=>typeof m!="function").some(m=>typeof m=="boolean"?m:o.isDate(m)?xa(n,m,!1,o):gv(m,o)?m.some(p=>xa(n,p,!1,o)):Xl(m)?m.from&&m.to?fb(n,{from:m.from,to:m.to},o):!1:pv(m)?IE(n,m.dayOfWeek,o):Kf(m)?o.isAfter(m.before,m.after)?fb(n,{from:o.addDays(m.after,1),to:o.addDays(m.before,-1)},o):va(n.from,m,o)||va(n.to,m,o):qf(m)||Ff(m)?va(n.from,m,o)||va(n.to,m,o):!1))return!0;const f=r.filter(m=>typeof m=="function");if(f.length){let m=n.from;const p=o.differenceInCalendarDays(n.to,n.from);for(let g=0;g<=p;g++){if(f.some(S=>S(m)))return!0;m=o.addDays(m,1)}}return!1}function HE(n,a){const{disabled:o,excludeDisabled:r,selected:c,required:d,onSelect:f}=n,[m,p]=Zl(c,f?c:void 0),g=f?c:m;return{selected:g,select:(x,j,N)=>{const{min:E,max:L}=n,O=x?zE(x,g,E,L,d,a):void 0;return r&&o&&O?.from&&O.to&&UE({from:O.from,to:O.to},o,a)&&(O.from=x,O.to=void 0),f||p(O),f?.(O,x,j,N),O},isSelected:x=>g&&xa(g,x,!1,a)}}function BE(n,a){const{selected:o,required:r,onSelect:c}=n,[d,f]=Zl(o,c?o:void 0),m=c?o:d,{isSameDay:p}=a;return{selected:m,select:(b,x,j)=>{let N=b;return!r&&m&&m&&p(b,m)&&(N=void 0),c||f(N),c?.(N,b,x,j),N},isSelected:b=>m?p(m,b):!1}}function KE(n,a){const o=BE(n,a),r=_E(n,a),c=HE(n,a);switch(n.mode){case"single":return o;case"multiple":return r;case"range":return c;default:return}}function It(n,a){return n instanceof ba&&n.timeZone===a?n:new ba(n,a)}function hb(n,a){return typeof n=="boolean"||typeof n=="function"?n:n instanceof Date?It(n,a):Array.isArray(n)?n.map(o=>o instanceof Date?It(o,a):o):Xl(n)?{...n,from:n.from?It(n.from,a):n.from,to:n.to?It(n.to,a):n.to}:Kf(n)?{before:It(n.before,a),after:It(n.after,a)}:qf(n)?{after:It(n.after,a)}:Ff(n)?{before:It(n.before,a)}:n}function Ed(n,a){return n&&(Array.isArray(n)?n.map(o=>hb(o,a)):hb(n,a))}function qE(n){let a=n;const o=a.timeZone;if(o&&(a={...n,timeZone:o},a.today&&(a.today=It(a.today,o)),a.month&&(a.month=It(a.month,o)),a.defaultMonth&&(a.defaultMonth=It(a.defaultMonth,o)),a.startMonth&&(a.startMonth=It(a.startMonth,o)),a.endMonth&&(a.endMonth=It(a.endMonth,o)),a.mode==="single"&&a.selected?a.selected=It(a.selected,o):a.mode==="multiple"&&a.selected?a.selected=a.selected?.map(pe=>It(pe,o)):a.mode==="range"&&a.selected&&(a.selected={from:a.selected.from?It(a.selected.from,o):a.selected.from,to:a.selected.to?It(a.selected.to,o):a.selected.to}),a.disabled!==void 0&&(a.disabled=Ed(a.disabled,o)),a.hidden!==void 0&&(a.hidden=Ed(a.hidden,o)),a.modifiers)){const pe={};Object.keys(a.modifiers).forEach(Te=>{pe[Te]=Ed(a.modifiers?.[Te],o)}),a.modifiers=pe}const{components:r,formatters:c,labels:d,dateLib:f,locale:m,classNames:p}=C.useMemo(()=>{const pe={...fv,...a.locale},Te=new hn({locale:pe,weekStartsOn:a.broadcastCalendar?1:a.weekStartsOn,firstWeekContainsDate:a.firstWeekContainsDate,useAdditionalWeekYearTokens:a.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:a.useAdditionalDayOfYearTokens,timeZone:a.timeZone,numerals:a.numerals},a.dateLib);return{dateLib:Te,components:JM(a.components),formatters:uE(a.formatters),labels:pE(a.labels,Te.options),locale:pe,classNames:{...tE(),...a.classNames}}},[a.locale,a.broadcastCalendar,a.weekStartsOn,a.firstWeekContainsDate,a.useAdditionalWeekYearTokens,a.useAdditionalDayOfYearTokens,a.timeZone,a.numerals,a.dateLib,a.components,a.formatters,a.labels,a.classNames]);a.today||(a={...a,today:f.today()});const{captionLayout:g,mode:S,navLayout:b,numberOfMonths:x=1,onDayBlur:j,onDayClick:N,onDayFocus:E,onDayKeyDown:L,onDayMouseEnter:O,onDayMouseLeave:D,onNextClick:A,onPrevClick:k,showWeekNumber:T,styles:w}=a,{formatCaption:R,formatDay:I,formatMonthDropdown:z,formatWeekNumber:F,formatWeekNumberHeader:ee,formatWeekdayName:Q,formatYearDropdown:ge}=c,te=OE(a,f),{days:ve,months:U,navStart:Z,navEnd:ne,previousMonth:$,nextMonth:oe,goToMonth:ue}=te,he=XM(ve,a,Z,ne,f),{isSelected:X,select:ae,selected:de}=KE(a,f)??{},{blur:ie,focused:re,isFocusTarget:ye,moveFocus:De,setFocused:ze}=RE(a,te,he,X??(()=>!1),f),{labelDayButton:Xe,labelGridcell:Ce,labelGrid:Oe,labelMonthDropdown:Ge,labelNav:Dt,labelPrevious:Ot,labelNext:Yn,labelWeekday:je,labelWeekNumber:Jt,labelWeekNumberHeader:Pn,labelYearDropdown:en}=d,Da=C.useMemo(()=>bE(f,a.ISOWeek,a.broadcastCalendar,a.today),[f,a.ISOWeek,a.broadcastCalendar,a.today]),$n=S!==void 0||N!==void 0,yt=C.useCallback(()=>{$&&(ue($),k?.($))},[$,ue,k]),tn=C.useCallback(()=>{oe&&(ue(oe),A?.(oe))},[ue,oe,A]),Wn=C.useCallback((pe,Te)=>we=>{we.preventDefault(),we.stopPropagation(),ze(pe),!Te.disabled&&(ae?.(pe.date,Te,we),N?.(pe.date,Te,we))},[ae,N,ze]),ni=C.useCallback((pe,Te)=>we=>{ze(pe),E?.(pe.date,Te,we)},[E,ze]),Ln=C.useCallback((pe,Te)=>we=>{ie(),j?.(pe.date,Te,we)},[ie,j]),Rn=C.useCallback((pe,Te)=>we=>{const Re={ArrowLeft:[we.shiftKey?"month":"day",a.dir==="rtl"?"after":"before"],ArrowRight:[we.shiftKey?"month":"day",a.dir==="rtl"?"before":"after"],ArrowDown:[we.shiftKey?"year":"week","after"],ArrowUp:[we.shiftKey?"year":"week","before"],PageUp:[we.shiftKey?"year":"month","before"],PageDown:[we.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Re[we.key]){we.preventDefault(),we.stopPropagation();const[lt,ke]=Re[we.key];De(lt,ke)}L?.(pe.date,Te,we)},[De,L,a.dir]),Ei=C.useCallback((pe,Te)=>we=>{O?.(pe.date,Te,we)},[O]),To=C.useCallback((pe,Te)=>we=>{D?.(pe.date,Te,we)},[D]),jo=C.useCallback(pe=>Te=>{const we=Number(Te.target.value),Re=f.setMonth(f.startOfMonth(pe),we);ue(Re)},[f,ue]),Qn=C.useCallback(pe=>Te=>{const we=Number(Te.target.value),Re=f.setYear(f.startOfMonth(pe),we);ue(Re)},[f,ue]),{className:J,style:Pe}=C.useMemo(()=>({className:[p[be.Root],a.className].filter(Boolean).join(" "),style:{...w?.[be.Root],...a.style}}),[p,a.className,a.style,w]),Se=eE(a),Le=C.useRef(null);wE(Le,!!a.animate,{classNames:p,months:U,focused:re,dateLib:f});const dt={dayPickerProps:a,selected:de,select:ae,isSelected:X,months:U,nextMonth:oe,previousMonth:$,goToMonth:ue,getModifiers:he,components:r,classNames:p,styles:w,labels:d,formatters:c};return ce.createElement(mv.Provider,{value:dt},ce.createElement(r.Root,{rootRef:a.animate?Le:void 0,className:J,style:Pe,dir:a.dir,id:a.id,lang:a.lang,nonce:a.nonce,title:a.title,role:a.role,"aria-label":a["aria-label"],"aria-labelledby":a["aria-labelledby"],...Se},ce.createElement(r.Months,{className:p[be.Months],style:w?.[be.Months]},!a.hideNavigation&&!b&&ce.createElement(r.Nav,{"data-animated-nav":a.animate?"true":void 0,className:p[be.Nav],style:w?.[be.Nav],"aria-label":Dt(),onPreviousClick:yt,onNextClick:tn,previousMonth:$,nextMonth:oe}),U.map((pe,Te)=>ce.createElement(r.Month,{"data-animated-month":a.animate?"true":void 0,className:p[be.Month],style:w?.[be.Month],key:Te,displayIndex:Te,calendarMonth:pe},b==="around"&&!a.hideNavigation&&Te===0&&ce.createElement(r.PreviousMonthButton,{type:"button",className:p[be.PreviousMonthButton],tabIndex:$?void 0:-1,"aria-disabled":$?void 0:!0,"aria-label":Ot($),onClick:yt,"data-animated-button":a.animate?"true":void 0},ce.createElement(r.Chevron,{disabled:$?void 0:!0,className:p[be.Chevron],orientation:a.dir==="rtl"?"right":"left"})),ce.createElement(r.MonthCaption,{"data-animated-caption":a.animate?"true":void 0,className:p[be.MonthCaption],style:w?.[be.MonthCaption],calendarMonth:pe,displayIndex:Te},g?.startsWith("dropdown")?ce.createElement(r.DropdownNav,{className:p[be.Dropdowns],style:w?.[be.Dropdowns]},(()=>{const we=g==="dropdown"||g==="dropdown-months"?ce.createElement(r.MonthsDropdown,{key:"month",className:p[be.MonthsDropdown],"aria-label":Ge(),classNames:p,components:r,disabled:!!a.disableNavigation,onChange:jo(pe.date),options:gE(pe.date,Z,ne,c,f),style:w?.[be.Dropdown],value:f.getMonth(pe.date)}):ce.createElement("span",{key:"month"},z(pe.date,f)),Re=g==="dropdown"||g==="dropdown-years"?ce.createElement(r.YearsDropdown,{key:"year",className:p[be.YearsDropdown],"aria-label":en(f.options),classNames:p,components:r,disabled:!!a.disableNavigation,onChange:Qn(pe.date),options:xE(Z,ne,c,f,!!a.reverseYears),style:w?.[be.Dropdown],value:f.getYear(pe.date)}):ce.createElement("span",{key:"year"},ge(pe.date,f));return f.getMonthYearOrder()==="year-first"?[Re,we]:[we,Re]})(),ce.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},R(pe.date,f.options,f))):ce.createElement(r.CaptionLabel,{className:p[be.CaptionLabel],role:"status","aria-live":"polite"},R(pe.date,f.options,f))),b==="around"&&!a.hideNavigation&&Te===x-1&&ce.createElement(r.NextMonthButton,{type:"button",className:p[be.NextMonthButton],tabIndex:oe?void 0:-1,"aria-disabled":oe?void 0:!0,"aria-label":Yn(oe),onClick:tn,"data-animated-button":a.animate?"true":void 0},ce.createElement(r.Chevron,{disabled:oe?void 0:!0,className:p[be.Chevron],orientation:a.dir==="rtl"?"left":"right"})),Te===x-1&&b==="after"&&!a.hideNavigation&&ce.createElement(r.Nav,{"data-animated-nav":a.animate?"true":void 0,className:p[be.Nav],style:w?.[be.Nav],"aria-label":Dt(),onPreviousClick:yt,onNextClick:tn,previousMonth:$,nextMonth:oe}),ce.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":S==="multiple"||S==="range","aria-label":Oe(pe.date,f.options,f)||void 0,className:p[be.MonthGrid],style:w?.[be.MonthGrid]},!a.hideWeekdays&&ce.createElement(r.Weekdays,{"data-animated-weekdays":a.animate?"true":void 0,className:p[be.Weekdays],style:w?.[be.Weekdays]},T&&ce.createElement(r.WeekNumberHeader,{"aria-label":Pn(f.options),className:p[be.WeekNumberHeader],style:w?.[be.WeekNumberHeader],scope:"col"},ee()),Da.map(we=>ce.createElement(r.Weekday,{"aria-label":je(we,f.options,f),className:p[be.Weekday],key:String(we),style:w?.[be.Weekday],scope:"col"},Q(we,f.options,f)))),ce.createElement(r.Weeks,{"data-animated-weeks":a.animate?"true":void 0,className:p[be.Weeks],style:w?.[be.Weeks]},pe.weeks.map(we=>ce.createElement(r.Week,{className:p[be.Week],key:we.weekNumber,style:w?.[be.Week],week:we},T&&ce.createElement(r.WeekNumber,{week:we,style:w?.[be.WeekNumber],"aria-label":Jt(we.weekNumber,{locale:m}),className:p[be.WeekNumber],scope:"row",role:"rowheader"},F(we.weekNumber,f)),we.days.map(Re=>{const{date:lt}=Re,ke=he(Re);if(ke[ht.focused]=!ke.hidden&&!!re?.isEqualTo(Re),ke[En.selected]=X?.(lt)||ke.selected,Xl(de)){const{from:nn,to:An}=de;ke[En.range_start]=!!(nn&&An&&f.isSameDay(lt,nn)),ke[En.range_end]=!!(nn&&An&&f.isSameDay(lt,An)),ke[En.range_middle]=xa(de,lt,!0,f)}const Ht=yE(ke,w,a.modifiersStyles),Xn=ZM(ke,p,a.modifiersClassNames),Tt=!$n&&!ke.hidden?Ce(lt,ke,f.options,f):void 0;return ce.createElement(r.Day,{key:`${Re.isoDate}_${Re.displayMonthId}`,day:Re,modifiers:ke,className:Xn.join(" "),style:Ht,role:"gridcell","aria-selected":ke.selected||void 0,"aria-label":Tt,"data-day":Re.isoDate,"data-month":Re.outside?Re.dateMonthId:void 0,"data-selected":ke.selected||void 0,"data-disabled":ke.disabled||void 0,"data-hidden":ke.hidden||void 0,"data-outside":Re.outside||void 0,"data-focused":ke.focused||void 0,"data-today":ke.today||void 0},!ke.hidden&&$n?ce.createElement(r.DayButton,{className:p[be.DayButton],style:w?.[be.DayButton],type:"button",day:Re,modifiers:ke,disabled:!ke.focused&&ke.disabled||void 0,"aria-disabled":ke.focused&&ke.disabled||void 0,tabIndex:ye(Re)?0:-1,"aria-label":Xe(lt,ke,f.options,f),onClick:Wn(Re,ke),onBlur:Ln(Re,ke),onFocus:ni(Re,ke),onKeyDown:Rn(Re,ke),onMouseEnter:Ei(Re,ke),onMouseLeave:To(Re,ke)},I(lt,f.options,f)):!ke.hidden&&I(Re.date,f.options,f))})))))))),a.footer&&ce.createElement(r.Footer,{className:p[be.Footer],style:w?.[be.Footer],role:"status","aria-live":"polite"},a.footer)))}function FE({className:n,classNames:a,showOutsideDays:o=!0,...r}){return l.jsx(qE,{showOutsideDays:o,className:K("p-2",n),classNames:{root:"relative",months:"flex flex-col sm:flex-row gap-2 sm:gap-4",month:"flex flex-col gap-2",month_caption:"flex justify-center pt-1 relative items-center h-8",caption_label:"text-sm font-medium",nav:"absolute inset-x-0 top-2 flex items-center justify-between px-1 z-10",button_previous:K(yl({variant:"ghost"}),"h-7 w-7 bg-transparent p-0 opacity-70 hover:opacity-100 hover:bg-accent rounded-md"),button_next:K(yl({variant:"ghost"}),"h-7 w-7 bg-transparent p-0 opacity-70 hover:opacity-100 hover:bg-accent rounded-md"),month_grid:"w-full border-collapse",weekdays:"flex w-full",weekday:"text-muted-foreground w-8 font-normal text-xs text-center",weeks:"flex flex-col",week:"flex w-full",day:K("relative h-8 w-8 p-0 text-center text-xs font-normal focus-within:relative focus-within:z-20","hover:bg-accent hover:text-accent-foreground rounded-full select-none"),day_button:K(yl({variant:"ghost"}),"h-8 w-8 p-0 font-normal rounded-full text-xs","aria-selected:opacity-100"),range_start:K("aria-selected:bg-primary aria-selected:text-primary-foreground","aria-selected:rounded-l-full aria-selected:rounded-r-none","aria-selected:hover:bg-primary aria-selected:hover:text-primary-foreground"),range_end:K("aria-selected:bg-primary aria-selected:text-primary-foreground","aria-selected:rounded-r-full aria-selected:rounded-l-none","aria-selected:hover:bg-primary aria-selected:hover:text-primary-foreground"),range_middle:K("aria-selected:bg-accent aria-selected:text-accent-foreground","aria-selected:rounded-none"),selected:K("bg-primary text-primary-foreground rounded-full","hover:bg-primary hover:text-primary-foreground","focus:bg-primary focus:text-primary-foreground"),today:"bg-accent text-accent-foreground rounded-full",outside:"text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",disabled:"text-muted-foreground opacity-50",hidden:"invisible",...a},components:{Chevron:({orientation:c,className:d,...f})=>{const m=c==="left"?sw:c==="right"?Ol:c==="up"?tf:Pl;return l.jsx(m,{className:K("h-4 w-4",d),...f})}},...r})}FE.displayName="Calendar";const GE=C.lazy(()=>at(()=>Promise.resolve().then(()=>Ql),void 0).then(n=>({default:n.CodeEditor})));function MP({rawJsonContent:n,isRawJsonValid:a,rawJsonEdits:o,rawSettingsEnv:r,onChange:c,missingRequiredFields:d=[]}){const f=d.length>0;return l.jsx(C.Suspense,{fallback:l.jsxs("div",{className:"flex items-center justify-center h-full",children:[l.jsx(kn,{className:"w-6 h-6 animate-spin text-muted-foreground"}),l.jsx("span",{className:"ml-2 text-muted-foreground",children:"Loading editor..."})]}),children:l.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[!a&&o!==null&&l.jsxs("div",{className:"mb-2 px-3 py-2 bg-destructive/10 text-destructive text-sm rounded-md flex items-center gap-2 mx-6 mt-4 shrink-0",children:[l.jsx(Ao,{className:"w-4 h-4"}),"Invalid JSON syntax"]}),a&&f&&l.jsxs("div",{className:"mb-2 px-3 py-2 bg-warning/10 text-warning-foreground text-sm rounded-md flex items-start gap-2 mx-6 mt-4 shrink-0 border border-warning/20",children:[l.jsx(Gn,{className:"w-4 h-4 mt-0.5 text-amber-500 shrink-0"}),l.jsxs("div",{children:[l.jsx("span",{className:"font-medium text-amber-600 dark:text-amber-400",children:"Missing required fields:"})," ",l.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:d.join(", ")}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"These fields will use default values at runtime."})]})]}),l.jsx("div",{className:"min-h-0 flex-1 overflow-hidden px-6 pb-4 pt-4",children:l.jsx("div",{className:"h-full border rounded-md overflow-hidden bg-background",children:l.jsx(GE,{value:n,onChange:c,language:"json",minHeight:"100%",heightMode:"fill-parent"})})}),l.jsx("div",{className:"mx-6 mb-4",children:l.jsx("div",{className:"border rounded-md overflow-hidden",children:l.jsx(Rf,{profileEnv:r})})})]})})}const EP={target:"Target CLI",cliproxy:"CLIProxy Provider","api-profiles":"API Profile",websearch:"WebSearch"},OP=[{id:"codex-target-runtime-support",title:"Native Codex runtime support is live",summary:"Codex now participates as a first-class runtime target through ccs-codex, ccsx, ccsxp, or --target codex.",primaryAction:"Use Codex as a runtime target for native Codex sessions and Codex-routed CLIProxy flows.",publishedAt:"2026-03-28",status:"new",scopes:["target","cliproxy","api-profiles"],entryIds:["codex-target","codex-cliproxy"],highlights:["Use ccs-codex or ccsx for native Codex runs.","Use ccsxp for the built-in CCS Codex provider shortcut on native Codex.","Built-in Codex and Codex bridge profiles can run on native Codex with --target codex.","Saved default targets for API profiles and variants can now be claude, droid, or codex."],actions:[{id:"copy-codex-alias-command",label:"Open native Codex",description:"Launch Codex through the explicit CCS runtime alias.",type:"command",command:"ccs-codex"},{id:"copy-codex-provider-command",label:"Run built-in Codex on Codex",description:"Use the built-in Codex provider shortcut on native Codex.",type:"command",command:'ccsxp "your prompt"'},{id:"copy-codex-provider-command-explicit",label:"Run built-in Codex on Codex (explicit)",description:"Use the explicit built-in Codex provider route on native Codex.",type:"command",command:'ccs codex --target codex "your prompt"'},{id:"open-codex-dashboard",label:"Open Codex dashboard",description:"Review Codex runtime support, config layers, and dashboard setup flows.",type:"route",path:"/codex"}],routes:[{label:"Codex CLI",path:"/codex"}],commands:["ccs-codex","ccsx",'ccsxp "your prompt"','ccs codex --target codex "your prompt"']},{id:"droid-target-support",title:"Factory Droid support is live",summary:"API Profiles and CLIProxy variants now support Droid as a first-class execution target.",primaryAction:"Set Droid as your default execution target for non-Claude workflows.",publishedAt:"2026-02-25",status:"new",scopes:["target","api-profiles","cliproxy"],entryIds:["droid-target","custom-api-profiles","codex-cliproxy","agy-cliproxy"],highlights:["Set default target to Droid when creating or editing API Profiles.","Set default target to Droid for CLIProxy variants, including Codex and Antigravity flows.","Use ccs-droid as the explicit alias, with ccsd kept as the legacy shortcut."],actions:[{id:"open-api-profiles",label:"Set default target in API Profiles",description:"Open API Profiles and set Default Target to Droid for profiles you run often.",type:"route",path:"/providers"},{id:"open-cliproxy",label:"Set default target in CLIProxy variants",description:"Open CLIProxy variants and set target to Droid for Codex/Antigravity or custom variants.",type:"route",path:"/cliproxy"},{id:"copy-ccs-droid-command",label:"Run once with explicit Droid alias",description:"Use ccs-droid to force the Droid target with your current profile.",type:"command",command:"ccs-droid glm"},{id:"copy-target-override",label:"Run once with --target override",description:"Keep your default profile but force Droid for a single command.",type:"command",command:'ccs codex --target droid "your prompt"'}],routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs-droid glm",'ccs codex --target droid "your prompt"',"ccs cliproxy create mycodex --provider codex --target droid"]},{id:"updates-center-launch",title:"Updates Center is available for rollout tasks",summary:"A focused Updates Center exists for setup tasks and rollout guidance when you need it.",primaryAction:"Use this page only when needed for rollout tasks, then return to your normal workflow.",publishedAt:"2026-02-25",status:"new",scopes:["target","cliproxy","api-profiles","websearch"],entryIds:["droid-target","codex-cliproxy","custom-api-profiles","opencode-websearch"],highlights:["Single data source powers update content and integration mapping.","Notices can be tracked as new, seen, done, or dismissed.","Catalog covers target CLI, CLIProxy providers, and WebSearch integrations."],actions:[{id:"open-updates-page",label:"Open Updates Center when needed",description:"Review rollout tasks only when you want guided setup changes.",type:"route",path:"/updates"},{id:"copy-open-dashboard",label:"Open dashboard from terminal",description:"Re-open config dashboard anytime from CLI.",type:"command",command:"ccs config"}],routes:[{label:"Updates Center",path:"/updates"}],commands:["ccs config"]}],VE=[{id:"claude-target",name:"Claude Code",scope:"target",status:"stable",summary:"Default runtime target for all CCS profile types.",pillars:{baseUrl:"From profile settings (ANTHROPIC_BASE_URL)",auth:"From profile settings (ANTHROPIC_AUTH_TOKEN)",model:"From profile settings (ANTHROPIC_MODEL)"},routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs",'ccs glm "your prompt"']},{id:"droid-target",name:"Factory Droid",scope:"target",status:"new",summary:"First-class target for API Profiles and CLIProxy variants.",pillars:{baseUrl:"From profile or variant settings",auth:"From profile or variant settings",model:"From profile or variant settings"},routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs-droid glm","ccs km --target droid","ccs codex --target droid"],notes:"Use ccs-droid as the explicit runtime alias. Legacy ccsd still works."},{id:"codex-target",name:"Codex CLI",scope:"target",status:"new",summary:"First-class runtime target for native Codex sessions and Codex-routed CLIProxy flows.",pillars:{baseUrl:"Native ~/.codex config for default mode, transient -c overrides for CCS-backed routes",auth:"Native Codex auth for default mode, env_key injection for CCS-backed routes",model:"Native Codex config or routed Codex model mapping from CLIProxy"},routes:[{label:"Codex CLI",path:"/codex"}],commands:["ccs-codex","ccsx","ccs codex --target codex","ccs codex-api --target codex"],notes:"Saved default targets for API profiles and CLIProxy variants can now be claude, droid, or codex."},{id:"codex-cliproxy",name:"Codex via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed provider with configurable variant model and a native Codex shortcut.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:['ccsxp "your prompt"',"ccs codex --target codex","ccs codex","ccs cliproxy create mycodex --provider codex","ccs api create codex-api --cliproxy-provider codex"],notes:"Use ccsxp when you want the built-in Codex provider on native Codex without retyping --target codex."},{id:"gemini-cliproxy",name:"Gemini via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed Gemini provider with multi-account management.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:["ccs gemini","ccs cliproxy create mygem --provider gemini"]},{id:"agy-cliproxy",name:"Antigravity via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed Antigravity provider with variant target controls.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:["ccs agy","ccs cliproxy create myagy --provider agy --target droid"]},{id:"custom-api-profiles",name:"Custom API Profiles",scope:"api-profiles",status:"stable",summary:"Any Anthropic-compatible endpoint with per-profile target and model mapping.",pillars:{baseUrl:"User-defined endpoint",auth:"User-defined token/key",model:"User-defined model identifier"},routes:[{label:"API Profiles",path:"/providers"}],commands:["ccs api create myprofile",'ccs myprofile "your prompt"']},{id:"opencode-websearch",name:"OpenCode WebSearch",scope:"websearch",status:"stable",summary:"WebSearch provider surfaced in Settings for third-party profile workflows.",pillars:{baseUrl:"Managed by OpenCode CLI integration",auth:"Provider-specific (managed externally)",model:"Configurable in WebSearch settings"},routes:[{label:"Settings",path:"/settings"}],commands:["ccs config",'ccs codex "your prompt"'],notes:"Enable OpenCode in Settings > WebSearch to activate fallback search."}],YE=new Map(VE.map(n=>[n.id,n]));function PP(n){return n.entryIds.map(a=>YE.get(a)).filter(a=>!!a)}function LP(n){const a=new Date(`${n}T00:00:00Z`);return Number.isNaN(a.getTime())?n:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"}).format(a)}C.lazy(()=>at(()=>Promise.resolve().then(()=>Ql),void 0).then(n=>({default:n.CodeEditor})));function $E(){const{t:n}=Et(),{isDark:a,setTheme:o}=mf(),[r,c]=C.useState(""),[d,f]=C.useState(""),[m,p]=C.useState(!1),[g,S]=C.useState(null),[b,x]=C.useState(!1),{login:j,authRequired:N,isAuthenticated:E,loading:L,accessMode:O,authEnabled:D}=Il(),A=Jd(),k=El(),T=O==="setup",w=n(T?"auth.remoteGuardLabel":"auth.protectedAccessLabel"),R=n(T?D?"auth.incompleteSetupDescription":"auth.remoteSetupDescription":"auth.loginDescription"),I=k.state?.from?.pathname||"/";if(C.useEffect(()=>{L||(E||!N)&&A(I,{replace:!0})},[E,N,L,A,I]),L)return l.jsx("div",{className:"flex min-h-[100dvh] items-center justify-center bg-background px-4",children:l.jsxs("div",{className:"flex items-center gap-3 rounded-full border border-border/80 bg-card/90 px-5 py-3 text-sm text-muted-foreground shadow-sm",children:[l.jsx(kn,{className:"h-4 w-4 animate-spin"}),n("auth.loading")]})});if(E||!N)return null;const z=async F=>{F.preventDefault(),S(null),x(!0);try{await j(r,d),A(I,{replace:!0})}catch(ee){S(ee instanceof Error?ee.message:n("auth.loginFailed"))}finally{x(!1)}};return l.jsxs("div",{className:"relative min-h-[100dvh] overflow-hidden bg-background",children:[l.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_top_left,rgba(167,85,52,0.16),transparent_42%),radial-gradient(circle_at_bottom_right,rgba(39,39,42,0.12),transparent_48%)]"}),l.jsx("div",{className:"absolute inset-0 opacity-[0.18] [background-image:linear-gradient(rgba(127,117,107,0.14)_1px,transparent_1px),linear-gradient(90deg,rgba(127,117,107,0.14)_1px,transparent_1px)] [background-size:24px_24px]"}),l.jsx("div",{className:"relative mx-auto flex min-h-[100dvh] max-w-6xl items-center px-4 py-8 sm:px-6",children:l.jsxs("div",{className:"grid w-full items-stretch gap-6 lg:grid-cols-[minmax(0,1.05fr)_minmax(360px,430px)]",children:[l.jsxs("section",{className:"flex flex-col justify-between rounded-[28px] border border-border/70 bg-card/85 p-6 shadow-[0_24px_80px_-48px_rgba(68,48,34,0.55)] backdrop-blur sm:p-8",children:[l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[l.jsxs("span",{className:"inline-flex w-fit items-center gap-2 rounded-full border border-border/70 bg-background/75 px-3 py-1 text-xs font-semibold uppercase tracking-[0.24em] text-muted-foreground",children:[l.jsx(dl,{className:"h-3.5 w-3.5 text-accent"}),w]}),l.jsxs("div",{className:"inline-flex items-center gap-1 rounded-full border border-border/70 bg-background/75 p-1 shadow-sm backdrop-blur",children:[l.jsxs(ot,{type:"button",variant:"ghost",size:"sm",className:K("rounded-full px-3 text-xs font-semibold",!a&&"bg-card text-foreground shadow-sm"),"aria-pressed":!a,onClick:()=>o("light"),children:[l.jsx(Hb,{className:"h-3.5 w-3.5"}),n("auth.lightMode")]}),l.jsxs(ot,{type:"button",variant:"ghost",size:"sm",className:K("rounded-full px-3 text-xs font-semibold",a&&"bg-card text-foreground shadow-sm"),"aria-pressed":a,onClick:()=>o("dark"),children:[l.jsx(Bb,{className:"h-3.5 w-3.5"}),n("auth.darkMode")]})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsx("h1",{className:"max-w-xl text-4xl font-semibold tracking-[-0.04em] text-balance text-foreground sm:text-5xl",children:n(T?"auth.remoteSetupTitle":"auth.dashboardTitle")}),l.jsx("p",{className:"max-w-2xl text-base leading-7 text-muted-foreground sm:text-lg",children:R})]})]}),l.jsxs("div",{className:"mt-8 grid gap-3 text-sm text-muted-foreground sm:grid-cols-3",children:[l.jsxs("div",{className:"rounded-2xl border border-border/70 bg-background/70 p-4",children:[l.jsx(qg,{className:"mb-3 h-4 w-4 text-accent"}),l.jsx("p",{children:n("auth.safetyNoteRemote")})]}),l.jsxs("div",{className:"rounded-2xl border border-border/70 bg-background/70 p-4",children:[l.jsx(Fg,{className:"mb-3 h-4 w-4 text-accent"}),l.jsx("p",{children:n("auth.safetyNoteLocal")})]}),l.jsxs("div",{className:"rounded-2xl border border-border/70 bg-background/70 p-4",children:[l.jsx(dl,{className:"mb-3 h-4 w-4 text-accent"}),l.jsx("p",{children:n("auth.safetyNoteSession")})]})]})]}),l.jsxs(wj,{className:"justify-center rounded-[28px] border-border/70 bg-card/95 py-0 shadow-[0_24px_90px_-54px_rgba(34,24,16,0.62)]",children:[l.jsxs(Nj,{className:"space-y-3 border-b border-border/70 px-6 py-6",children:[l.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl border border-accent/20 bg-accent/10",children:T?l.jsx(qg,{className:"h-5 w-5 text-accent"}):l.jsx(Fg,{className:"h-5 w-5 text-accent"})}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx(kj,{className:"text-2xl tracking-[-0.03em]",children:n(T?"auth.remoteSetupTitle":"auth.dashboardTitle")}),l.jsx(Aj,{className:"text-sm leading-6 text-muted-foreground",children:T?R:n("auth.credentialsHint")})]})]}),l.jsx(Dj,{className:"space-y-5 px-6 py-6",children:T?l.jsxs(l.Fragment,{children:[l.jsxs(zs,{variant:"warning",className:"rounded-2xl border-yellow-300/70 bg-yellow-50/80",children:[l.jsx(Bs,{className:"h-4 w-4"}),l.jsx(Tl,{children:n("auth.noDefaultCredentials")}),l.jsx(Is,{children:n("auth.credentialsHint")})]}),l.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[l.jsxs("div",{className:"rounded-2xl border border-border/70 bg-background/75 p-4",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:[l.jsx(rw,{className:"h-4 w-4 text-accent"}),n("auth.hostStepTitle")]}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:n("auth.hostStepDescription")}),l.jsx("code",{className:"mt-4 block rounded-xl border border-border/70 bg-muted/60 px-3 py-2 font-mono text-[13px] text-foreground",children:"ccs config auth setup"})]}),l.jsxs("div",{className:"rounded-2xl border border-border/70 bg-background/75 p-4",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:[l.jsx(dl,{className:"h-4 w-4 text-accent"}),n("auth.localStepTitle")]}),l.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:n("auth.localStepDescription")})]})]})]}):l.jsxs("form",{onSubmit:z,className:"space-y-4",children:[g&&l.jsxs(zs,{variant:"destructive",className:"rounded-2xl",children:[l.jsx(Bs,{className:"h-4 w-4"}),l.jsx(Is,{children:g})]}),l.jsxs(zs,{variant:"info",className:"rounded-2xl border-blue-200/80 bg-blue-50/80",children:[l.jsx(dl,{className:"h-4 w-4"}),l.jsx(Tl,{children:n("auth.noDefaultCredentials")}),l.jsx(Is,{children:n("auth.credentialsHint")})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(qt,{htmlFor:"username",className:"text-sm font-semibold",children:n("auth.username")}),l.jsx(Hn,{id:"username",type:"text",value:r,onChange:F=>c(F.target.value),placeholder:n("auth.usernamePlaceholder"),autoComplete:"username",className:"h-12 rounded-2xl border-border/80 bg-background/85 px-4 text-base md:text-base",disabled:b,required:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(qt,{htmlFor:"password",className:"text-sm font-semibold",children:n("auth.password")}),l.jsxs("div",{className:"relative",children:[l.jsx(Hn,{id:"password",type:m?"text":"password",value:d,onChange:F=>f(F.target.value),placeholder:n("auth.passwordPlaceholder"),autoComplete:"current-password",className:"h-12 rounded-2xl border-border/80 bg-background/85 px-4 pr-14 text-base md:text-base",disabled:b,required:!0}),l.jsx(ot,{type:"button",variant:"ghost",size:"sm",className:"absolute inset-y-1 right-1 h-auto rounded-xl px-3 text-muted-foreground hover:text-foreground","aria-label":n(m?"auth.hidePassword":"auth.showPassword"),"aria-pressed":m,onClick:()=>p(F=>!F),disabled:b,children:m?l.jsx(Vs,{className:"h-4 w-4"}):l.jsx(Ys,{className:"h-4 w-4"})})]})]}),l.jsx(ot,{type:"submit",className:"h-12 w-full rounded-2xl text-sm font-semibold",disabled:b,children:b?l.jsxs(l.Fragment,{children:[l.jsx(kn,{className:"mr-2 h-4 w-4 animate-spin"}),n("auth.signingIn")]}):n("auth.signIn")})]})})]})]})})]})}const WE=C.lazy(()=>at(()=>import("./index-DFEMq3KP.js"),__vite__mapDeps([21,1,2,4,5,7,22,6,8,9])).then(n=>({default:n.AnalyticsPage}))),QE=C.lazy(()=>at(()=>import("./api-7vQe0xOg.js"),__vite__mapDeps([23,1,2,5,24,17,6,4,3,7,8,9])).then(n=>({default:n.ApiPage}))),XE=C.lazy(()=>at(()=>import("./cliproxy-kHd-oC5W.js"),__vite__mapDeps([25,1,2,5,15,6,4,18,26,24,17,27,28,16,7,8,9])).then(n=>({default:n.CliproxyPage}))),ZE=C.lazy(()=>at(()=>import("./cliproxy-ai-providers-CmbFYVoR.js"),__vite__mapDeps([29,1,2,16,17,5,6,4,24,7,8,9])).then(n=>({default:n.CliproxyAiProvidersPage}))),JE=C.lazy(()=>at(()=>import("./cliproxy-control-panel-M8ZfUq3C.js"),__vite__mapDeps([30,1,2,5,15,4,6,7,8,9])).then(n=>({default:n.CliproxyControlPanelPage}))),eO=C.lazy(()=>at(()=>import("./copilot-NJKZQXQ_.js"),__vite__mapDeps([31,1,2,5,24,17,4,27,28,6,7,8,9])).then(n=>({default:n.CopilotPage}))),tO=C.lazy(()=>at(()=>import("./cursor-BrcDgu6X.js"),__vite__mapDeps([32,1,2,6,5,15,27,28,4,7,8,9])).then(n=>({default:n.CursorPage}))),nO=C.lazy(()=>at(()=>import("./claude-extension-CKO4bJ22.js"),__vite__mapDeps([33,1,2,5,6,4,7,8,9])).then(n=>({default:n.ClaudeExtensionPage}))),aO=C.lazy(()=>at(()=>import("./codex-BJ0RdMuh.js"),__vite__mapDeps([34,1,2,6,4,27,5,9,7,35,36,8])).then(n=>({default:n.CodexPage}))),iO=C.lazy(()=>at(()=>import("./droid-B9u9ZB-a.js"),__vite__mapDeps([37,1,2,6,5,36,4,27,7,8,9])).then(n=>({default:n.DroidPage}))),oO=C.lazy(()=>at(()=>import("./logs-DtH4YMt4.js"),__vite__mapDeps([38,1,2,4,5,6,7,8,9])).then(n=>({default:n.LogsPage}))),sO=C.lazy(()=>at(()=>import("./accounts-D9eEaNx9.js"),__vite__mapDeps([39,1,2,5,35,17,6,4,26,7,8,9])).then(n=>({default:n.AccountsPage}))),rO=C.lazy(()=>at(()=>Promise.resolve().then(()=>mM),void 0).then(n=>({default:n.SettingsPage}))),lO=C.lazy(()=>at(()=>import("./health-D_gdcxnc.js"),__vite__mapDeps([40,1,2,5,6,4,7,8,9])).then(n=>({default:n.HealthPage}))),cO=C.lazy(()=>at(()=>import("./shared-DlTbnc9n.js"),__vite__mapDeps([41,1,2,4,5,6,7,8,9])).then(n=>({default:n.SharedPage}))),uO=C.lazy(()=>at(()=>import("./updates-SiZKOnUD.js"),__vite__mapDeps([42,1,2,4,5,6,7,8,9])).then(n=>({default:n.UpdatesPage})));function Bt(){return l.jsx("div",{className:"flex h-64 items-center justify-center",children:l.jsx(kn,{className:"h-8 w-8 animate-spin text-muted-foreground"})})}function dO(){return l.jsx(DS,{client:tN,children:l.jsx(WN,{defaultTheme:"system",storageKey:"vite-ui-theme",children:l.jsx(QN,{children:l.jsx(tk,{children:l.jsxs(wS,{children:[l.jsxs(NS,{children:[l.jsx(Nt,{path:"/login",element:l.jsx($E,{})}),l.jsx(Nt,{element:l.jsx(nk,{}),children:l.jsxs(Nt,{element:l.jsx(lA,{}),children:[l.jsx(Nt,{path:"/",element:l.jsx(MT,{})}),l.jsx(Nt,{path:"/analytics",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(WE,{})})}),l.jsx(Nt,{path:"/updates",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(uO,{})})}),l.jsx(Nt,{path:"/providers",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(QE,{})})}),l.jsx(Nt,{path:"/cliproxy",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(XE,{})})}),l.jsx(Nt,{path:"/cliproxy/ai-providers",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(ZE,{})})}),l.jsx(Nt,{path:"/cliproxy/control-panel",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(JE,{})})}),l.jsx(Nt,{path:"/copilot",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(eO,{})})}),l.jsx(Nt,{path:"/cursor",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(tO,{})})}),l.jsx(Nt,{path:"/claude-extension",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(nO,{})})}),l.jsx(Nt,{path:"/codex",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(aO,{})})}),l.jsx(Nt,{path:"/droid",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(iO,{})})}),l.jsx(Nt,{path:"/accounts",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(sO,{})})}),l.jsx(Nt,{path:"/settings",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(rO,{})})}),l.jsx(Nt,{path:"/health",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(lO,{})})}),l.jsx(Nt,{path:"/logs",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(oO,{})})}),l.jsx(Nt,{path:"/shared",element:l.jsx(C.Suspense,{fallback:l.jsx(Bt,{}),children:l.jsx(cO,{})})})]})})]}),l.jsx(TS,{position:"top-right"})]})})})})})}const jv=document.getElementById("root");if(!jv)throw new Error("Root element not found. Failed to mount React application.");Zw.createRoot(jv).render(l.jsx(C.StrictMode,{children:l.jsx(dO,{})}));export{fP as $,RT as A,Ut as B,wj as C,BT as D,sP as E,lP as F,OT as G,UT as H,Hn as I,KT as J,rP as K,qt as L,o1 as M,s1 as N,r1 as O,sx as P,$x as Q,Pf as R,We as S,Sa as T,jl as U,Yd as V,Fe as W,dP as X,He as Y,uP as Z,Aj as _,Et as a,OO as a$,hP as a0,mP as a1,pP as a2,gP as a3,yP as a4,bP as a5,Xx as a6,xP as a7,Mj as a8,Af as a9,wP as aA,CP as aB,k1 as aC,ij as aD,vP as aE,VT as aF,av as aG,nD as aH,yD as aI,ji as aJ,$1 as aK,W1 as aL,Q1 as aM,X1 as aN,BA as aO,vx as aP,_O as aQ,zO as aR,IO as aS,UO as aT,jP as aU,NO as aV,i1 as aW,MO as aX,EO as aY,e1 as aZ,t1 as a_,CO as aa,Jk as ab,kO as ac,TO as ad,PO as ae,LO as af,pf as ag,gf as ah,yf as ai,bf as aj,xf as ak,NP as al,Oj as am,kP as an,Qs as ao,ZO as ap,qd as aq,JO as ar,Hd as as,RO as at,eP as au,tP as av,aP as aw,Cy as ax,nP as ay,SP as az,Dj as b,n1 as b0,a1 as b1,jO as b2,wf as b3,YO as b4,WO as b5,QO as b6,$O as b7,sv as b8,Rf as b9,ON as bA,Rd as bB,Di as bC,NN as bD,AN as bE,MN as bF,_N as bG,FO as bH,AO as bI,DO as bJ,BO as bK,KO as bL,VO as bM,GO as bN,yl as bO,XO as ba,Ts as bb,SO as bc,wO as bd,zs as be,Tl as bf,Is as bg,MP as bh,Ef as bi,qs as bj,Of as bk,ST as bl,DT as bm,iP as bn,oP as bo,LP as bp,EP as bq,OP as br,PP as bs,lv as bt,cM as bu,dM as bv,qO as bw,HO as bx,Jb as by,LN as bz,K as c,ot as d,AP as e,DP as f,Pj as g,FE as h,vO as i,Nj as j,kj as k,FA as l,GA as m,Do as n,TP as o,wa as p,Na as q,px as r,Nf as s,gx as t,sf as u,kf as v,_s as w,By as x,GT as y,cP as z};
|