@axhub/genie 0.2.8 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/LICENSE +21 -675
  2. package/dist/api-docs.html +2 -2
  3. package/dist/assets/App-CYCCsgwf.js +264 -0
  4. package/dist/assets/ReviewApp-0srHIXwb.js +1 -0
  5. package/dist/assets/{_basePickBy-CqJbRZ9y.js → _basePickBy-DVVb07UV.js} +1 -1
  6. package/dist/assets/{_baseUniq-BS8YH8jO.js → _baseUniq-BtbziL5G.js} +1 -1
  7. package/dist/assets/{arc-BBmKEN-S.js → arc-BsCC8yBD.js} +1 -1
  8. package/dist/assets/{architectureDiagram-2XIMDMQ5-N5lcb82R.js → architectureDiagram-2XIMDMQ5-woFp6eNI.js} +1 -1
  9. package/dist/assets/{blockDiagram-WCTKOSBZ-DTMwHuLn.js → blockDiagram-WCTKOSBZ-ya8VAc2k.js} +1 -1
  10. package/dist/assets/{c4Diagram-IC4MRINW-BTKlkXI9.js → c4Diagram-IC4MRINW-CY1dZmIZ.js} +1 -1
  11. package/dist/assets/channel-BMhScXFe.js +1 -0
  12. package/dist/assets/{chunk-4BX2VUAB-DUdoTxAc.js → chunk-4BX2VUAB-CR1lAd74.js} +1 -1
  13. package/dist/assets/{chunk-55IACEB6-Bm_92xe4.js → chunk-55IACEB6-CP98WcFC.js} +1 -1
  14. package/dist/assets/{chunk-FMBD7UC4-CGW0g62g.js → chunk-FMBD7UC4-D9c7ijAB.js} +1 -1
  15. package/dist/assets/{chunk-JSJVCQXG-DYkTH3w1.js → chunk-JSJVCQXG-DQAGYOn-.js} +1 -1
  16. package/dist/assets/{chunk-KX2RTZJC-C9oTlISU.js → chunk-KX2RTZJC-BbTXiDq7.js} +1 -1
  17. package/dist/assets/{chunk-NQ4KR5QH-CM50ygWP.js → chunk-NQ4KR5QH-BI6AX0dr.js} +1 -1
  18. package/dist/assets/{chunk-QZHKN3VN-7dzpYeNJ.js → chunk-QZHKN3VN-DB3V2Ifo.js} +1 -1
  19. package/dist/assets/{chunk-WL4C6EOR-Cm9nQrsr.js → chunk-WL4C6EOR-DhzTthv6.js} +1 -1
  20. package/dist/assets/classDiagram-VBA2DB6C-CMIxlWcT.js +1 -0
  21. package/dist/assets/classDiagram-v2-RAHNMMFH-CMIxlWcT.js +1 -0
  22. package/dist/assets/clone-BPqOt4r3.js +1 -0
  23. package/dist/assets/{cose-bilkent-S5V4N54A-Ccp_p0JZ.js → cose-bilkent-S5V4N54A-BQ09ZE2j.js} +1 -1
  24. package/dist/assets/{dagre-KLK3FWXG-fBwTLUp9.js → dagre-KLK3FWXG-Dc2ueD_R.js} +1 -1
  25. package/dist/assets/{diagram-E7M64L7V-CeNVmFUp.js → diagram-E7M64L7V-DP-LsQoL.js} +1 -1
  26. package/dist/assets/{diagram-IFDJBPK2-CtavyLGa.js → diagram-IFDJBPK2-Cg6r42cB.js} +1 -1
  27. package/dist/assets/{diagram-P4PSJMXO-CpQTjQwc.js → diagram-P4PSJMXO-aHsfoUZE.js} +1 -1
  28. package/dist/assets/{erDiagram-INFDFZHY-B8R5vwhd.js → erDiagram-INFDFZHY-qBXJ4aAz.js} +1 -1
  29. package/dist/assets/{flowDiagram-PKNHOUZH-BvkVVwIQ.js → flowDiagram-PKNHOUZH-D_13emJM.js} +1 -1
  30. package/dist/assets/{ganttDiagram-A5KZAMGK-DOu3hSNa.js → ganttDiagram-A5KZAMGK-BvIcOLwz.js} +1 -1
  31. package/dist/assets/{gitGraphDiagram-K3NZZRJ6-C7zT67YE.js → gitGraphDiagram-K3NZZRJ6-ad0vvNcU.js} +1 -1
  32. package/dist/assets/{graph-D11wiwHo.js → graph-CeJCMjan.js} +1 -1
  33. package/dist/assets/{highlighted-body-TPN3WLV5-Babpthg-.js → highlighted-body-TPN3WLV5-B_novwSz.js} +1 -1
  34. package/dist/assets/index-C514cLyb.js +2 -0
  35. package/dist/assets/index-h1DBl_g3.css +1 -0
  36. package/dist/assets/{infoDiagram-LFFYTUFH-BmA7IpQG.js → infoDiagram-LFFYTUFH-lOxAqb3m.js} +1 -1
  37. package/dist/assets/{ishikawaDiagram-PHBUUO56-BEquZd3E.js → ishikawaDiagram-PHBUUO56-DIr-51gj.js} +1 -1
  38. package/dist/assets/{journeyDiagram-4ABVD52K-BfemGz7f.js → journeyDiagram-4ABVD52K-CYcIW0ZU.js} +1 -1
  39. package/dist/assets/{kanban-definition-K7BYSVSG-CWja3mln.js → kanban-definition-K7BYSVSG-C1ZK616a.js} +1 -1
  40. package/dist/assets/{layout-BLUNf-PJ.js → layout-CI2RM-v6.js} +1 -1
  41. package/dist/assets/{linear-DukIV_Xv.js → linear-DE7bISck.js} +1 -1
  42. package/dist/assets/{mermaid-O7DHMXV3-SgtM28qI.js → mermaid-O7DHMXV3-XxAJo8EK.js} +6 -6
  43. package/dist/assets/{mindmap-definition-YRQLILUH-4UjqXITU.js → mindmap-definition-YRQLILUH-Dz6EFjmn.js} +1 -1
  44. package/dist/assets/{pieDiagram-SKSYHLDU-8AxqJd0M.js → pieDiagram-SKSYHLDU-DPpEzUed.js} +1 -1
  45. package/dist/assets/{quadrantDiagram-337W2JSQ-D60m8V8r.js → quadrantDiagram-337W2JSQ-xdoXNet7.js} +1 -1
  46. package/dist/assets/{requirementDiagram-Z7DCOOCP-zqh9jBVf.js → requirementDiagram-Z7DCOOCP-DUq8H3CL.js} +1 -1
  47. package/dist/assets/{sankeyDiagram-WA2Y5GQK-CDZILTLI.js → sankeyDiagram-WA2Y5GQK-CmqEUxRu.js} +1 -1
  48. package/dist/assets/{sequenceDiagram-2WXFIKYE-7BReFd0L.js → sequenceDiagram-2WXFIKYE-DhtXRNiH.js} +1 -1
  49. package/dist/assets/{stateDiagram-RAJIS63D-HPTVdIG4.js → stateDiagram-RAJIS63D-Dj0HOlbN.js} +1 -1
  50. package/dist/assets/stateDiagram-v2-FVOUBMTO-C9utf5gv.js +1 -0
  51. package/dist/assets/{timeline-definition-YZTLITO2-CTVllFgr.js → timeline-definition-YZTLITO2-DUuJzZB5.js} +1 -1
  52. package/dist/assets/{treemap-KZPCXAKY-BtyxboJZ.js → treemap-KZPCXAKY-DpYBQ0qr.js} +1 -1
  53. package/dist/assets/vendor-codemirror-CMHSJ_9p.js +9 -0
  54. package/dist/assets/{vendor-react-Cpt6D04s.js → vendor-react-xmA_f8ig.js} +1 -1
  55. package/dist/assets/{vennDiagram-LZ73GAT5-D96ZI6Mg.js → vennDiagram-LZ73GAT5-DpePUyOd.js} +1 -1
  56. package/dist/assets/{xychartDiagram-JWTSCODW-eRk-39YO.js → xychartDiagram-JWTSCODW-Cfp1I4_U.js} +1 -1
  57. package/dist/index.html +5 -5
  58. package/package.json +8 -7
  59. package/server/acp-runtime/client.js +129 -16
  60. package/server/acp-runtime/index.js +54 -0
  61. package/server/acp-runtime/registry.js +2 -2
  62. package/server/acp-runtime/session-store.js +79 -5
  63. package/server/cli.js +55 -10
  64. package/server/database/db.js +20 -0
  65. package/server/external-agent/service.js +24 -6
  66. package/server/external-agent/ws.js +540 -27
  67. package/server/index.js +112 -151
  68. package/server/lan-access/core.js +79 -0
  69. package/server/lan-access/state.js +102 -0
  70. package/server/middleware/auth.js +57 -14
  71. package/server/projects.js +930 -667
  72. package/server/routes/auth.js +24 -4
  73. package/server/routes/cli-auth.js +21 -25
  74. package/server/routes/codex.js +84 -298
  75. package/server/routes/commands.js +322 -407
  76. package/server/routes/lan-access.js +231 -0
  77. package/server/routes/projects.js +154 -158
  78. package/server/routes/session-core.js +160 -91
  79. package/server/routes/settings.js +113 -99
  80. package/server/session-core/eventStore.js +60 -20
  81. package/server/session-core/providerAdapters.js +75 -38
  82. package/server/session-core/runtimeState.js +8 -0
  83. package/server/session-core/sessionListMerge.js +47 -0
  84. package/shared/conversationEvents.js +174 -15
  85. package/shared/modelConstants.js +79 -99
  86. package/dist/assets/App-CTKZtqB1.js +0 -460
  87. package/dist/assets/ReviewApp-DM6BNAzR.js +0 -1
  88. package/dist/assets/channel-1oJBvF-0.js +0 -1
  89. package/dist/assets/classDiagram-VBA2DB6C-d5TeKFM4.js +0 -1
  90. package/dist/assets/classDiagram-v2-RAHNMMFH-d5TeKFM4.js +0 -1
  91. package/dist/assets/clone-CinxIlEu.js +0 -1
  92. package/dist/assets/index-DFxzgWoO.js +0 -2
  93. package/dist/assets/index-YCFGDVKw.css +0 -1
  94. package/dist/assets/stateDiagram-v2-FVOUBMTO-DTUf5_gC.js +0 -1
  95. package/dist/assets/vendor-codemirror-Dz7_EqNA.js +0 -39
  96. package/server/_legacy-providers/README.md +0 -30
  97. package/server/_legacy-providers/claude-sdk.js +0 -956
  98. package/server/_legacy-providers/gemini-cli.js +0 -368
  99. package/server/_legacy-providers/openai-codex.js +0 -705
  100. package/server/_legacy-providers/opencode-cli.js +0 -674
  101. package/server/routes/git.js +0 -1110
  102. package/server/routes/mcp-utils.js +0 -48
  103. package/server/routes/mcp.js +0 -536
  104. package/server/routes/taskmaster.js +0 -1963
  105. package/server/utils/mcp-detector.js +0 -198
  106. package/server/utils/taskmaster-websocket.js +0 -129
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ReviewApp-0srHIXwb.js","assets/vendor-codemirror-CMHSJ_9p.js","assets/vendor-react-xmA_f8ig.js","assets/mermaid-O7DHMXV3-XxAJo8EK.js","assets/App-CYCCsgwf.js","assets/vendor-xterm-DfaPXD3y.js","assets/App-qxJ8_QYu.css"])))=>i.map(i=>d[i]);
2
+ import{j as R}from"./vendor-codemirror-CMHSJ_9p.js";import{b as qe,g as We,R as Te}from"./vendor-react-xmA_f8ig.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))s(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function t(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(n){if(n.ep)return;n.ep=!0;const i=t(n);fetch(n.href,i)}})();const ze="modulepreload",Ge=function(o){return"/"+o},de={},ue=function(e,t,s){let n=Promise.resolve();if(t&&t.length>0){let c=function(l){return Promise.all(l.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),r=a?.nonce||a?.getAttribute("nonce");n=c(t.map(l=>{if(l=Ge(l),l in de)return;de[l]=!0;const u=l.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const p=document.createElement("link");if(p.rel=u?"stylesheet":ze,u||(p.as="script"),p.crossOrigin="",p.href=l,r&&p.setAttribute("nonce",r),document.head.appendChild(p),u)return new Promise((f,h)=>{p.addEventListener("load",f),p.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(a){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=a,window.dispatchEvent(r),!r.defaultPrevented)throw a}return n.then(a=>{for(const r of a||[])r.status==="rejected"&&i(r.reason);return e().catch(i)})};var z={},pe;function Qe(){if(pe)return z;pe=1;var o=qe();return z.createRoot=o.createRoot,z.hydrateRoot=o.hydrateRoot,z}var _e=Qe();const De=We(_e),g=o=>typeof o=="string",H=()=>{let o,e;const t=new Promise((s,n)=>{o=s,e=n});return t.resolve=o,t.reject=e,t},he=o=>o==null?"":""+o,Je=(o,e,t)=>{o.forEach(s=>{e[s]&&(t[s]=e[s])})},Ye=/###/g,ge=o=>o&&o.indexOf("###")>-1?o.replace(Ye,"."):o,fe=o=>!o||g(o),B=(o,e,t)=>{const s=g(e)?e.split("."):e;let n=0;for(;n<s.length-1;){if(fe(o))return{};const i=ge(s[n]);!o[i]&&t&&(o[i]=new t),Object.prototype.hasOwnProperty.call(o,i)?o=o[i]:o={},++n}return fe(o)?{}:{obj:o,k:ge(s[n])}},me=(o,e,t)=>{const{obj:s,k:n}=B(o,e,Object);if(s!==void 0||e.length===1){s[n]=t;return}let i=e[e.length-1],a=e.slice(0,e.length-1),r=B(o,a,Object);for(;r.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),r=B(o,a,Object),r?.obj&&typeof r.obj[`${r.k}.${i}`]<"u"&&(r.obj=void 0);r.obj[`${r.k}.${i}`]=t},Ze=(o,e,t,s)=>{const{obj:n,k:i}=B(o,e,Object);n[i]=n[i]||[],n[i].push(t)},Q=(o,e)=>{const{obj:t,k:s}=B(o,e);if(t&&Object.prototype.hasOwnProperty.call(t,s))return t[s]},Xe=(o,e,t)=>{const s=Q(o,t);return s!==void 0?s:Q(e,t)},Re=(o,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in o?g(o[s])||o[s]instanceof String||g(e[s])||e[s]instanceof String?t&&(o[s]=e[s]):Re(o[s],e[s],t):o[s]=e[s]);return o},N=o=>o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var et={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const tt=o=>g(o)?o.replace(/[&<>"'\/]/g,e=>et[e]):o;class st{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const nt=[" ",",","?","!",";"],it=new st(20),ot=(o,e,t)=>{e=e||"",t=t||"";const s=nt.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(s.length===0)return!0;const n=it.getRegExp(`(${s.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!n.test(o);if(!i){const a=o.indexOf(t);a>0&&!n.test(o.substring(0,a))&&(i=!0)}return i},ne=(o,e,t=".")=>{if(!o)return;if(o[e])return Object.prototype.hasOwnProperty.call(o,e)?o[e]:void 0;const s=e.split(t);let n=o;for(let i=0;i<s.length;){if(!n||typeof n!="object")return;let a,r="";for(let c=i;c<s.length;++c)if(c!==i&&(r+=t),r+=s[c],a=n[r],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&c<s.length-1)continue;i+=c-i+1;break}n=a}return n},q=o=>o?.replace("_","-"),at={type:"logger",log(o){this.output("log",o)},warn(o){this.output("warn",o)},error(o){this.output("error",o)},output(o,e){console?.[o]?.apply?.(console,e)}};class _{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||at,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,n){return n&&!this.debug?null:(g(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new _(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new _(this.logger,e)}}var A=new _;class Z{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const n=this.observers[s].get(t)||0;this.observers[s].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([n,i])=>{for(let a=0;a<i;a++)n(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,i])=>{for(let a=0;a<i;a++)n.apply(n,[e,...t])})}}class ye extends Z{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s,n={}){const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,a=n.ignoreJSONStructure!==void 0?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let r;e.indexOf(".")>-1?r=e.split("."):(r=[e,t],s&&(Array.isArray(s)?r.push(...s):g(s)&&i?r.push(...s.split(i)):r.push(s)));const c=Q(this.data,r);return!c&&!t&&!s&&e.indexOf(".")>-1&&(e=r[0],t=r[1],s=r.slice(2).join(".")),c||!a||!g(s)?c:ne(this.data?.[e]?.[t],s,i)}addResource(e,t,s,n,i={silent:!1}){const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let r=[e,t];s&&(r=r.concat(a?s.split(a):s)),e.indexOf(".")>-1&&(r=e.split("."),n=t,t=r[1]),this.addNamespaces(t),me(this.data,r,n),i.silent||this.emit("added",e,t,s,n)}addResources(e,t,s,n={silent:!1}){for(const i in s)(g(s[i])||Array.isArray(s[i]))&&this.addResource(e,t,i,s[i],{silent:!0});n.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,n,i,a={silent:!1,skipCopy:!1}){let r=[e,t];e.indexOf(".")>-1&&(r=e.split("."),n=s,s=t,t=r[1]),this.addNamespaces(t);let c=Q(this.data,r)||{};a.skipCopy||(s=JSON.parse(JSON.stringify(s))),n?Re(c,s,i):c={...c,...s},me(this.data,r,c),a.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(n=>t[n]&&Object.keys(t[n]).length>0)}toJSON(){return this.data}}var Ie={processors:{},addPostProcessor(o){this.processors[o.name]=o},handle(o,e,t,s,n){return o.forEach(i=>{e=this.processors[i]?.process(e,t,s,n)??e}),e}};const Ee=Symbol("i18next/PATH_KEY");function rt(){const o=[],e=Object.create(null);let t;return e.get=(s,n)=>(t?.revoke?.(),n===Ee?o:(o.push(n),t=Proxy.revocable(s,e),t.proxy)),Proxy.revocable(Object.create(null),e).proxy}function ie(o,e){const{[Ee]:t}=o(rt());return t.join(e?.keySeparator??".")}const we={},X=o=>!g(o)&&typeof o!="boolean"&&typeof o!="number";class J extends Z{constructor(e,t={}){super(),Je(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=A.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const s={...t};if(e==null)return!1;const n=this.resolve(e,s);if(n?.res===void 0)return!1;const i=X(n.res);return!(s.returnObjects===!1&&i)}extractFromKey(e,t){let s=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const n=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const a=s&&e.indexOf(s)>-1,r=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!ot(e,s,n);if(a&&!r){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:g(i)?[i]:i};const l=e.split(s);(s!==n||s===n&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(n)}return{key:e,namespaces:g(i)?[i]:i}}translate(e,t,s){let n=typeof t=="object"?{...t}:t;if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";typeof e=="function"&&(e=ie(e,{...this.options,...n})),Array.isArray(e)||(e=[String(e)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:r,namespaces:c}=this.extractFromKey(e[e.length-1],n),l=c[c.length-1];let u=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const d=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return p?i?{res:`${l}${u}${r}`,usedKey:r,exactUsedKey:r,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${u}${r}`:i?{res:r,usedKey:r,exactUsedKey:r,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:r;const f=this.resolve(e,n);let h=f?.res;const y=f?.usedKey||r,S=f?.exactUsedKey||r,x=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,b=n.count!==void 0&&!g(n.count),j=J.hasDefaultValue(n),I=b?this.pluralResolver.getSuffix(d,n.count,n):"",E=n.ordinal&&b?this.pluralResolver.getSuffix(d,n.count,{ordinal:!1}):"",ae=b&&!n.ordinal&&n.count===0,O=ae&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${I}`]||n[`defaultValue${E}`]||n.defaultValue;let P=h;T&&!h&&j&&(P=O);const Be=X(P),Ke=Object.prototype.toString.apply(P);if(T&&P&&Be&&x.indexOf(Ke)<0&&!(g(w)&&Array.isArray(P))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const k=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,P,{...n,ns:c}):`key '${r} (${this.language})' returned an object instead of string.`;return i?(f.res=k,f.usedParams=this.getUsedParamsDetails(n),f):k}if(a){const k=Array.isArray(P),C=k?[]:{},re=k?S:y;for(const L in P)if(Object.prototype.hasOwnProperty.call(P,L)){const F=`${re}${a}${L}`;j&&!h?C[L]=this.translate(F,{...n,defaultValue:X(O)?O[L]:void 0,joinArrays:!1,ns:c}):C[L]=this.translate(F,{...n,joinArrays:!1,ns:c}),C[L]===F&&(C[L]=P[L])}h=C}}else if(T&&g(w)&&Array.isArray(h))h=h.join(w),h&&(h=this.extendTranslation(h,e,n,s));else{let k=!1,C=!1;!this.isValidLookup(h)&&j&&(k=!0,h=O),this.isValidLookup(h)||(C=!0,h=r);const L=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:h,F=j&&O!==h&&this.options.updateMissing;if(C||k||F){if(this.logger.log(F?"updateKey":"missingKey",d,l,r,F?O:h),a){const v=this.resolve(r,{...n,keySeparator:!1});v&&v.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 U=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let v=0;v<W.length;v++)U.push(W[v]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(n.lng||this.language):U.push(n.lng||this.language);const le=(v,D,V)=>{const ce=j&&V!==h?V:L;this.options.missingKeyHandler?this.options.missingKeyHandler(v,l,D,ce,F,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(v,l,D,ce,F,n),this.emit("missingKey",v,l,D,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?U.forEach(v=>{const D=this.pluralResolver.getSuffixes(v,n);ae&&n[`defaultValue${this.options.pluralSeparator}zero`]&&D.indexOf(`${this.options.pluralSeparator}zero`)<0&&D.push(`${this.options.pluralSeparator}zero`),D.forEach(V=>{le([v],r+V,n[`defaultValue${V}`]||O)})}):le(U,r,O))}h=this.extendTranslation(h,e,n,f,s),C&&h===r&&this.options.appendNamespaceToMissingKey&&(h=`${l}${u}${r}`),(C||k)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${r}`:r,k?h:void 0,n))}return i?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(e,t,s,n,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const c=g(e)&&(s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let l;if(c){const d=e.match(this.interpolator.nestingRegexp);l=d&&d.length}let u=s.replace&&!g(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,s.lng||this.language||n.usedLng,s),c){const d=e.match(this.interpolator.nestingRegexp),p=d&&d.length;l<p&&(s.nest=!1)}!s.lng&&n&&n.res&&(s.lng=this.language||n.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,(...d)=>i?.[0]===d[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`),null):this.translate(...d,t),s)),s.interpolation&&this.interpolator.reset()}const a=s.postProcess||this.options.postProcess,r=g(a)?[a]:a;return e!=null&&r?.length&&s.applyPostProcessor!==!1&&(e=Ie.handle(r,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,t={}){let s,n,i,a,r;return g(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(s))return;const l=this.extractFromKey(c,t),u=l.key;n=u;let d=l.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const p=t.count!==void 0&&!g(t.count),f=p&&!t.ordinal&&t.count===0,h=t.context!==void 0&&(g(t.context)||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach(S=>{this.isValidLookup(s)||(r=S,!we[`${y[0]}-${S}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(r)&&(we[`${y[0]}-${S}`]=!0,this.logger.warn(`key "${n}" for languages "${y.join(", ")}" won't get resolved as namespace "${r}" 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!!!")),y.forEach(x=>{if(this.isValidLookup(s))return;a=x;const w=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(w,u,x,S,t);else{let b;p&&(b=this.pluralResolver.getSuffix(x,t.count,t));const j=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&b.indexOf(I)===0&&w.push(u+b.replace(I,this.options.pluralSeparator)),w.push(u+b),f&&w.push(u+j)),h){const E=`${u}${this.options.contextSeparator||"_"}${t.context}`;w.push(E),p&&(t.ordinal&&b.indexOf(I)===0&&w.push(E+b.replace(I,this.options.pluralSeparator)),w.push(E+b),f&&w.push(E+j))}}let T;for(;T=w.pop();)this.isValidLookup(s)||(i=T,s=this.getResource(x,S,T,t))}))})}),{res:s,usedKey:n,exactUsedKey:i,usedLng:a,usedNS:r}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s,n={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,s,n):this.resourceStore.getResource(e,t,s,n)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!g(e.replace);let n=s?e.replace:e;if(s&&typeof e.count<"u"&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!s){n={...n};for(const i of t)delete n[i]}return n}static hasDefaultValue(e){const t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&e[s]!==void 0)return!0;return!1}}class Se{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=A.create("languageUtils")}getScriptPartFromCode(e){if(e=q(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=q(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(g(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(s=>{if(t)return;const n=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const n=this.getScriptPartFromCode(s);if(this.isSupportedCode(n))return t=n;const i=this.getLanguagePartFromCode(s);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),g(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),n=[],i=a=>{a&&(this.isSupportedCode(a)?n.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return g(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):g(e)&&i(this.formatLanguageCode(e)),s.forEach(a=>{n.indexOf(a)<0&&i(this.formatLanguageCode(a))}),n}}const ve={zero:0,one:1,two:2,few:3,many:4,other:5},be={select:o=>o===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class lt{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=A.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const s=q(e==="dev"?"en":e),n=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:s,type:n});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(s,{type:n})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),be;if(!e.match(/-|_/))return be;const c=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(c,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,s={}){return this.getSuffixes(e,s).map(n=>`${t}${n}`)}getSuffixes(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?s.resolvedOptions().pluralCategories.sort((n,i)=>ve[n]-ve[i]).map(n=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${n}`):[]}getSuffix(e,t,s={}){const n=this.getRule(e,s);return n?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}}const xe=(o,e,t,s=".",n=!0)=>{let i=Xe(o,e,t);return!i&&n&&g(t)&&(i=ne(o,t,s),i===void 0&&(i=ne(e,t,s))),i},ee=o=>o.replace(/\$/g,"$$$$");class Ce{constructor(e={}){this.logger=A.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(t=>t),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:n,prefix:i,prefixEscaped:a,suffix:r,suffixEscaped:c,formatSeparator:l,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:p,nestingPrefixEscaped:f,nestingSuffix:h,nestingSuffixEscaped:y,nestingOptionsSeparator:S,maxReplaces:x,alwaysFormat:w}=e.interpolation;this.escape=t!==void 0?t:tt,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=n!==void 0?n:!1,this.prefix=i?N(i):a||"{{",this.suffix=r?N(r):c||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=p?N(p):f||N("$t("),this.nestingSuffix=h?N(h):y||N(")"),this.nestingOptionsSeparator=S||",",this.maxReplaces=x||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,s)=>t?.source===s?(t.lastIndex=0,t):new RegExp(s,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,s,n){let i,a,r;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=f=>{if(f.indexOf(this.formatSeparator)<0){const x=xe(t,c,f,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,s,{...n,...t,interpolationkey:f}):x}const h=f.split(this.formatSeparator),y=h.shift().trim(),S=h.join(this.formatSeparator).trim();return this.format(xe(t,c,y,this.options.keySeparator,this.options.ignoreJSONStructure),S,s,{...n,...t,interpolationkey:y})};this.resetRegExp();const u=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:f=>ee(f)},{regex:this.regexp,safeValue:f=>this.escapeValue?ee(this.escape(f)):ee(f)}].forEach(f=>{for(r=0;i=f.regex.exec(e);){const h=i[1].trim();if(a=l(h),a===void 0)if(typeof u=="function"){const S=u(e,i,n);a=g(S)?S:""}else if(n&&Object.prototype.hasOwnProperty.call(n,h))a="";else if(d){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${h} for interpolating ${e}`),a="";else!g(a)&&!this.useRawValueToEscape&&(a=he(a));const y=f.safeValue(a);if(e=e.replace(i[0],y),d?(f.regex.lastIndex+=a.length,f.regex.lastIndex-=i[0].length):f.regex.lastIndex=0,r++,r>=this.maxReplaces)break}}),e}nest(e,t,s={}){let n,i,a;const r=(c,l)=>{const u=this.nestingOptionsSeparator;if(c.indexOf(u)<0)return c;const d=c.split(new RegExp(`${u}[ ]*{`));let p=`{${d[1]}`;c=d[0],p=this.interpolate(p,a);const f=p.match(/'/g),h=p.match(/"/g);((f?.length??0)%2===0&&!h||h.length%2!==0)&&(p=p.replace(/'/g,'"'));try{a=JSON.parse(p),l&&(a={...l,...a})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,y),`${c}${u}${p}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c};for(;n=this.nestingRegexp.exec(e);){let c=[];a={...s},a=a.replace&&!g(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(l!==-1&&(c=n[1].slice(l).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),i=t(r.call(this,n[1].trim(),a),a),i&&n[0]===e&&!g(i))return i;g(i)||(i=he(i)),i||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),i=""),c.length&&(i=c.reduce((u,d)=>this.format(u,d,s.lng,{...s,interpolationkey:n[1].trim()}),i.trim())),e=e.replace(n[0],i),this.regexp.lastIndex=0}return e}}const ct=o=>{let e=o.toLowerCase().trim();const t={};if(o.indexOf("(")>-1){const s=o.split("(");e=s[0].toLowerCase().trim();const n=s[1].substring(0,s[1].length-1);e==="currency"&&n.indexOf(":")<0?t.currency||(t.currency=n.trim()):e==="relativetime"&&n.indexOf(":")<0?t.range||(t.range=n.trim()):n.split(";").forEach(a=>{if(a){const[r,...c]=a.split(":"),l=c.join(":").trim().replace(/^'+|'+$/g,""),u=r.trim();t[u]||(t[u]=l),l==="false"&&(t[u]=!1),l==="true"&&(t[u]=!0),isNaN(l)||(t[u]=parseInt(l,10))}})}return{formatName:e,formatOptions:t}},Pe=o=>{const e={};return(t,s,n)=>{let i=n;n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]&&(i={...i,[n.interpolationkey]:void 0});const a=s+JSON.stringify(i);let r=e[a];return r||(r=o(q(s),n),e[a]=r),r(t)}},dt=o=>(e,t,s)=>o(q(t),s)(e);class ut{constructor(e={}){this.logger=A.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const s=t.cacheInBuiltFormats?Pe:dt;this.formats={number:s((n,i)=>{const a=new Intl.NumberFormat(n,{...i});return r=>a.format(r)}),currency:s((n,i)=>{const a=new Intl.NumberFormat(n,{...i,style:"currency"});return r=>a.format(r)}),datetime:s((n,i)=>{const a=new Intl.DateTimeFormat(n,{...i});return r=>a.format(r)}),relativetime:s((n,i)=>{const a=new Intl.RelativeTimeFormat(n,{...i});return r=>a.format(r,i.range||"day")}),list:s((n,i)=>{const a=new Intl.ListFormat(n,{...i});return r=>a.format(r)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Pe(t)}format(e,t,s,n={}){const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(r=>r.indexOf(")")>-1)){const r=i.findIndex(c=>c.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,r)].join(this.formatSeparator)}return i.reduce((r,c)=>{const{formatName:l,formatOptions:u}=ct(c);if(this.formats[l]){let d=r;try{const p=n?.formatParams?.[n.interpolationkey]||{},f=p.locale||p.lng||n.locale||n.lng||s;d=this.formats[l](r,f,{...u,...n,...p})}catch(p){this.logger.warn(p)}return d}else this.logger.warn(`there was no format function for ${l}`);return r},e)}}const pt=(o,e)=>{o.pending[e]!==void 0&&(delete o.pending[e],o.pendingCount--)};class ht extends Z{constructor(e,t,s,n={}){super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=n,this.logger=A.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,n.backend,n)}queueLoad(e,t,s,n){const i={},a={},r={},c={};return e.forEach(l=>{let u=!0;t.forEach(d=>{const p=`${l}|${d}`;!s.reload&&this.store.hasResourceBundle(l,d)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?a[p]===void 0&&(a[p]=!0):(this.state[p]=1,u=!1,a[p]===void 0&&(a[p]=!0),i[p]===void 0&&(i[p]=!0),c[d]===void 0&&(c[d]=!0)))}),u||(r[l]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(c)}}loaded(e,t,s){const n=e.split("|"),i=n[0],a=n[1];t&&this.emit("failedLoading",i,a,t),!t&&s&&this.store.addResourceBundle(i,a,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const r={};this.queue.forEach(c=>{Ze(c.loaded,[i],a),pt(c,e),t&&c.errors.push(t),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(l=>{r[l]||(r[l]={});const u=c.loaded[l];u.length&&u.forEach(d=>{r[l][d]===void 0&&(r[l][d]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",r),this.queue=this.queue.filter(c=>!c.done)}read(e,t,s,n=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:n,wait:i,callback:a});return}this.readingCalls++;const r=(l,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(l&&u&&n<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,s,n+1,i*2,a)},i);return}a(l,u)},c=this.backend[s].bind(this.backend);if(c.length===2){try{const l=c(e,t);l&&typeof l.then=="function"?l.then(u=>r(null,u)).catch(r):r(null,l)}catch(l){r(l)}return}return c(e,t,r)}prepareLoading(e,t,s={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();g(e)&&(e=this.languageUtils.toResolveHierarchy(e)),g(t)&&(t=[t]);const i=this.queueLoad(e,t,s,n);if(!i.toLoad.length)return i.pending.length||n(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){const s=e.split("|"),n=s[0],i=s[1];this.read(n,i,"read",void 0,void 0,(a,r)=>{a&&this.logger.warn(`${t}loading namespace ${i} for language ${n} failed`,a),!a&&r&&this.logger.log(`${t}loaded namespace ${i} for language ${n}`,r),this.loaded(e,a,r)})}saveMissing(e,t,s,n,i,a={},r=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${s}" as the namespace "${t}" 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(!(s==null||s==="")){if(this.backend?.create){const c={...a,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let u;l.length===5?u=l(e,t,s,n,c):u=l(e,t,s,n),u&&typeof u.then=="function"?u.then(d=>r(null,d)).catch(r):r(null,u)}catch(u){r(u)}else l(e,t,s,n,r,c)}!e||!e[0]||this.store.addResource(e[0],t,s,n)}}}const te=()=>({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:o=>{let e={};if(typeof o[1]=="object"&&(e=o[1]),g(o[1])&&(e.defaultValue=o[1]),g(o[2])&&(e.tDescription=o[2]),typeof o[2]=="object"||typeof o[3]=="object"){const t=o[3]||o[2];Object.keys(t).forEach(s=>{e[s]=t[s]})}return e},interpolation:{escapeValue:!0,format:o=>o,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ke=o=>(g(o.ns)&&(o.ns=[o.ns]),g(o.fallbackLng)&&(o.fallbackLng=[o.fallbackLng]),g(o.fallbackNS)&&(o.fallbackNS=[o.fallbackNS]),o.supportedLngs?.indexOf?.("cimode")<0&&(o.supportedLngs=o.supportedLngs.concat(["cimode"])),typeof o.initImmediate=="boolean"&&(o.initAsync=o.initImmediate),o),G=()=>{},gt=o=>{Object.getOwnPropertyNames(Object.getPrototypeOf(o)).forEach(t=>{typeof o[t]=="function"&&(o[t]=o[t].bind(o))})};class K extends Z{constructor(e={},t){if(super(),this.options=ke(e),this.services={},this.logger=A,this.modules={external:[]},gt(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(g(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const s=te();this.options={...s,...this.options,...ke(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler);const n=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?A.init(n(this.modules.logger),this.options):A.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=ut;const u=new Se(this.options);this.store=new ye(this.options.resources,this.options);const d=this.services;d.logger=A,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new lt(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.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"),l&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=n(l),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new Ce(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new ht(n(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(f,...h)=>{this.emit(f,...h)}),this.modules.languageDetector&&(d.languageDetector=n(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=n(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new J(this.services,this.options),this.translator.on("*",(f,...h)=>{this.emit(f,...h)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,t||(t=G),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[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(l=>{this[l]=(...u)=>this.store[l](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...u)=>(this.store[l](...u),this)});const r=H(),c=()=>{const l=(u,d)=>{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),r.resolve(d),t(u,d)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),r}loadResources(e,t=G){let s=t;const n=g(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(n?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const i=[],a=r=>{if(!r||r==="cimode")return;this.services.languageUtils.toResolveHierarchy(r).forEach(l=>{l!=="cimode"&&i.indexOf(l)<0&&i.push(l)})};n?a(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload?.forEach?.(r=>a(r)),this.services.backendConnector.load(i,this.options.ns,r=>{!r&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(r)})}else s(null)}reloadResources(e,t,s){const n=H();return typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=G),this.services.backendConnector.reload(e,t,i=>{n.resolve(),s(i)}),n}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Ie.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const s=this.languages[t];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const s=H();this.emit("languageChanging",e);const n=r=>{this.language=r,this.languages=this.services.languageUtils.toResolveHierarchy(r),this.resolvedLanguage=void 0,this.setResolvedLanguage(r)},i=(r,c)=>{c?this.isLanguageChangingTo===e&&(n(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,s.resolve((...l)=>this.t(...l)),t&&t(r,(...l)=>this.t(...l))},a=r=>{!e&&!r&&this.services.languageDetector&&(r=[]);const c=g(r)?r:r&&r[0],l=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(g(r)?[r]:r);l&&(this.language||n(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector?.cacheUserLanguage?.(l)),this.loadResources(l,u=>{i(u,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),s}getFixedT(e,t,s){const n=(i,a,...r)=>{let c;typeof a!="object"?c=this.options.overloadTranslationOptionHandler([i,a].concat(r)):c={...a},c.lng=c.lng||n.lng,c.lngs=c.lngs||n.lngs,c.ns=c.ns||n.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||s||n.keyPrefix);const l=this.options.keySeparator||".";let u;return c.keyPrefix&&Array.isArray(i)?u=i.map(d=>(typeof d=="function"&&(d=ie(d,{...this.options,...a})),`${c.keyPrefix}${l}${d}`)):(typeof i=="function"&&(i=ie(i,{...this.options,...a})),u=c.keyPrefix?`${c.keyPrefix}${l}${i}`:i),this.t(u,c)};return g(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=s,n}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){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 s=t.lng||this.resolvedLanguage||this.languages[0],n=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const a=(r,c)=>{const l=this.services.backendConnector.state[`${r}|${c}`];return l===-1||l===0||l===2};if(t.precheck){const r=t.precheck(this,a);if(r!==void 0)return r}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(s,e)&&(!n||a(i,e)))}loadNamespaces(e,t){const s=H();return this.options.ns?(g(e)&&(e=[e]),e.forEach(n=>{this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}),this.loadResources(n=>{s.resolve(),t&&t(n)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=H();g(e)&&(e=[e]);const n=this.options.preload||[],i=e.filter(a=>n.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=n.concat(i),this.loadResources(a=>{s.resolve(),t&&t(a)}),s):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const n=new Intl.Locale(e);if(n&&n.getTextInfo){const i=n.getTextInfo();if(i&&i.direction)return i.direction}}catch{}const t=["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"],s=this.services?.languageUtils||new Se(te());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const s=new K(e,t);return s.createInstance=K.createInstance,s}cloneInstance(e={},t=G){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},i=new K(n);if((e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(r=>{i[r]=this[r]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},s){const r=Object.keys(this.store.data).reduce((c,l)=>(c[l]={...this.store.data[l]},c[l]=Object.keys(c[l]).reduce((u,d)=>(u[d]={...c[l][d]},u),c[l]),c),{});i.store=new ye(r,n),i.services.resourceStore=i.store}if(e.interpolation){const c={...te().interpolation,...this.options.interpolation,...e.interpolation},l={...n,interpolation:c};i.services.interpolator=new Ce(l)}return i.translator=new J(i.services,n),i.translator.on("*",(r,...c)=>{i.emit(r,...c)}),i.init(n,t),i.translator.options=n,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const m=K.createInstance();m.createInstance;m.dir;m.init;m.loadResources;m.reloadResources;m.use;m.changeLanguage;m.getFixedT;m.t;m.exists;m.setDefaultNamespace;m.hasLoadedNamespace;m.loadNamespaces;m.loadLanguages;const ft=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,mt={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},yt=o=>mt[o],wt=o=>o.replace(ft,yt);let oe={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:wt,transDefaultProps:void 0};const St=(o={})=>{oe={...oe,...o}},gi=()=>oe;let Ne;const vt=o=>{Ne=o},fi=()=>Ne,bt={type:"3rdParty",init(o){St(o.options.react),vt(o)}},{slice:xt,forEach:Ct}=[];function Pt(o){return Ct.call(xt.call(arguments,1),e=>{if(e)for(const t in e)o[t]===void 0&&(o[t]=e[t])}),o}function kt(o){return typeof o!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(o))}const Le=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Lt=function(o,e){const s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},n=encodeURIComponent(e);let i=`${o}=${n}`;if(s.maxAge>0){const a=s.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(a)}`}if(s.domain){if(!Le.test(s.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${s.domain}`}if(s.path){if(!Le.test(s.path))throw new TypeError("option path is invalid");i+=`; Path=${s.path}`}if(s.expires){if(typeof s.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${s.expires.toUTCString()}`}if(s.httpOnly&&(i+="; HttpOnly"),s.secure&&(i+="; Secure"),s.sameSite)switch(typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s.partitioned&&(i+="; Partitioned"),i},Ae={create(o,e,t,s){let n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(n.expires=new Date,n.expires.setTime(n.expires.getTime()+t*60*1e3)),s&&(n.domain=s),document.cookie=Lt(o,e,n)},read(o){const e=`${o}=`,t=document.cookie.split(";");for(let s=0;s<t.length;s++){let n=t[s];for(;n.charAt(0)===" ";)n=n.substring(1,n.length);if(n.indexOf(e)===0)return n.substring(e.length,n.length)}return null},remove(o,e){this.create(o,"",-1,e)}};var At={name:"cookie",lookup(o){let{lookupCookie:e}=o;if(e&&typeof document<"u")return Ae.read(e)||void 0},cacheUserLanguage(o,e){let{lookupCookie:t,cookieMinutes:s,cookieDomain:n,cookieOptions:i}=e;t&&typeof document<"u"&&Ae.create(t,o,s,n,i)}},Ft={name:"querystring",lookup(o){let{lookupQuerystring:e}=o,t;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const i=s.substring(1).split("&");for(let a=0;a<i.length;a++){const r=i[a].indexOf("=");r>0&&i[a].substring(0,r)===e&&(t=i[a].substring(r+1))}}return t}},jt={name:"hash",lookup(o){let{lookupHash:e,lookupFromHashIndex:t}=o,s;if(typeof window<"u"){const{hash:n}=window.location;if(n&&n.length>2){const i=n.substring(1);if(e){const a=i.split("&");for(let r=0;r<a.length;r++){const c=a[r].indexOf("=");c>0&&a[r].substring(0,c)===e&&(s=a[r].substring(c+1))}}if(s)return s;if(!s&&t>-1){const a=n.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?a[typeof t=="number"?t:0]?.replace("/",""):void 0}}}return s}};let $=null;const Fe=()=>{if($!==null)return $;try{if($=typeof window<"u"&&window.localStorage!==null,!$)return!1;const o="i18next.translate.boo";window.localStorage.setItem(o,"foo"),window.localStorage.removeItem(o)}catch{$=!1}return $};var Ot={name:"localStorage",lookup(o){let{lookupLocalStorage:e}=o;if(e&&Fe())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(o,e){let{lookupLocalStorage:t}=e;t&&Fe()&&window.localStorage.setItem(t,o)}};let M=null;const je=()=>{if(M!==null)return M;try{if(M=typeof window<"u"&&window.sessionStorage!==null,!M)return!1;const o="i18next.translate.boo";window.sessionStorage.setItem(o,"foo"),window.sessionStorage.removeItem(o)}catch{M=!1}return M};var Tt={name:"sessionStorage",lookup(o){let{lookupSessionStorage:e}=o;if(e&&je())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(o,e){let{lookupSessionStorage:t}=e;t&&je()&&window.sessionStorage.setItem(t,o)}},Dt={name:"navigator",lookup(o){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:s,language:n}=navigator;if(t)for(let i=0;i<t.length;i++)e.push(t[i]);s&&e.push(s),n&&e.push(n)}return e.length>0?e:void 0}},Rt={name:"htmlTag",lookup(o){let{htmlTag:e}=o,t;const s=e||(typeof document<"u"?document.documentElement:null);return s&&typeof s.getAttribute=="function"&&(t=s.getAttribute("lang")),t}},It={name:"path",lookup(o){let{lookupFromPathIndex:e}=o;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof e=="number"?e:0]?.replace("/",""):void 0}},Et={name:"subdomain",lookup(o){let{lookupFromSubdomainIndex:e}=o;const t=typeof e=="number"?e+1:1,s=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s[t]}};let $e=!1;try{document.cookie,$e=!0}catch{}const Me=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];$e||Me.splice(1,1);const Nt=()=>({order:Me,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:o=>o});class Ue{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Pt(t,this.options||{},Nt()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=n=>n.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=s,this.addDetector(At),this.addDetector(Ft),this.addDetector(Ot),this.addDetector(Tt),this.addDetector(Dt),this.addDetector(Rt),this.addDetector(It),this.addDetector(Et),this.addDetector(jt)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(s=>{if(this.detectors[s]){let n=this.detectors[s].lookup(this.options);n&&typeof n=="string"&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(s=>s!=null&&!kt(s)).map(s=>this.options.convertDetectedLanguage(s)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(s=>{this.detectors[s]&&this.detectors[s].cacheUserLanguage(e,this.options)}))}}Ue.type="languageDetector";const $t={save:"Save",cancel:"Cancel",delete:"Delete",create:"Create",edit:"Edit",close:"Close",confirm:"Confirm",submit:"Submit",retry:"Retry",refresh:"Refresh",search:"Search",clear:"Clear",copy:"Copy",download:"Download",upload:"Upload",browse:"Browse"},Mt={chat:"Chat",shell:"Shell",files:"Files",git:"Source Control",tasks:"Tasks"},Ut={loading:"Loading...",success:"Success",error:"Error",failed:"Failed",pending:"Pending",completed:"Completed",inProgress:"In Progress"},Vt={savedSuccessfully:"Saved successfully",deletedSuccessfully:"Deleted successfully",updatedSuccessfully:"Updated successfully",operationFailed:"Operation failed",networkError:"Network error. Please check your connection.",unauthorized:"Unauthorized. Please log in.",notFound:"Not found",invalidInput:"Invalid input",requiredField:"This field is required",unknownError:"An unknown error occurred"},Ht={settings:"Settings",home:"Home",back:"Back",next:"Next",previous:"Previous",logout:"Logout"},Bt={language:"Language",theme:"Theme",darkMode:"Dark Mode",lightMode:"Light Mode",name:"Name",description:"Description",enabled:"Enabled",disabled:"Disabled",optional:"Optional",version:"Version",select:"Select",selectAll:"Select All",deselectAll:"Deselect All"},Kt={justNow:"Just now",minutesAgo:"{{count}} mins ago",hoursAgo:"{{count}} hours ago",daysAgo:"{{count}} days ago",yesterday:"Yesterday"},qt={newFile:"New File",newFolder:"New Folder",rename:"Rename",move:"Move",copyPath:"Copy Path",openInEditor:"Open in Editor"},Wt={loading:"Loading Axhub Genie",settingUpWorkspace:"Setting up your workspace...",chooseProject:"Choose Your Project",selectProjectDescription:"Select a project from the sidebar to start coding with Claude. Each project contains your chat sessions and file history.",tip:"Tip",createProjectMobile:"Tap the menu button above to access projects",createProjectDesktop:"Create a new project by clicking the folder icon in the sidebar",newSession:"New Session",untitledSession:"Untitled Session",projectFiles:"Project Files",openInCodexClient:"Open in Codex client",openInOpencodeApp:"Open in OpenCode app"},zt={loading:"Loading files...",files:"Files",simpleView:"Simple view",compactView:"Compact view",detailedView:"Detailed view",searchPlaceholder:"Search files and folders...",clearSearch:"Clear search",name:"Name",size:"Size",modified:"Modified",permissions:"Permissions",noFilesFound:"No files found",checkProjectPath:"Check if the project path is accessible",noMatchesFound:"No matches found",tryDifferentSearch:"Try a different search term or clear the search",justNow:"just now",minAgo:"{{count}} min ago",hoursAgo:"{{count}} hours ago",daysAgo:"{{count}} days ago"},Gt={title:"Create New Project",steps:{type:"Type",configure:"Configure",confirm:"Confirm"},step1:{question:"Do you already have a workspace, or would you like to create a new one?",existing:{title:"Existing Workspace",description:"I already have a workspace on my server and just need to add it to the project list"},new:{title:"New Workspace",description:"Create a new empty workspace"}},step2:{existingPath:"Workspace Path",newPath:"Workspace Path",existingPlaceholder:"Enter the existing workspace path",newPlaceholder:"Enter the new workspace path",existingHelp:"Full path to your existing workspace directory",newHelp:"Full path to your workspace directory"},step3:{reviewConfig:"Review Your Configuration",workspaceType:"Workspace Type:",existingWorkspace:"Existing Workspace",newWorkspace:"New Workspace",path:"Path:",existingInfo:"The workspace will be added to your project list and will be available for Claude/Codex/Gemini/OpenCode sessions.",newEmpty:"The workspace will be added to your project list and will be available for Claude/Codex/Gemini/OpenCode sessions."},buttons:{cancel:"Cancel",back:"Back",next:"Next",createProject:"Create Project",creating:"Creating..."},folderBrowser:{title:"Select Folder",browseFolders:"Browse folders",browseDrives:"Browse drives",browseRoots:"Browse allowed roots",showHiddenFolders:"Show hidden folders",hideHiddenFolders:"Hide hidden folders",createFolder:"Create new folder",newFolderPlaceholder:"Enter a new folder name",noSubfolders:"No subfolders found",currentPath:"Path:",drivesRoot:"This PC",workspaceRoots:"Allowed workspace roots",useCurrentFolder:"Use this folder"},errors:{selectType:"Please select whether you have an existing workspace or want to create a new one",providePath:"Please provide a workspace path",failedToCreate:"Failed to create workspace",failedToCreateFolder:"Failed to create folder"}},Qt={title:"Update Available",newVersionReady:"A new version is ready",currentVersion:"Current Version",latestVersion:"Latest Version",whatsNew:"What's New:",viewFullRelease:"View full release",updateProgress:"Update Progress:",manualUpgrade:"Manual upgrade:",manualUpgradeHint:'Or click "Update Now" to run the update automatically.',updateCompleted:"Update completed successfully!",restartServer:"Please restart the server to apply changes.",updateFailed:"Update failed",buttons:{close:"Close",later:"Later",copyCommand:"Copy Command",updateNow:"Update Now",updating:"Updating..."},ariaLabels:{closeModal:"Close version upgrade modal",showSidebar:"Show sidebar",settings:"Settings",updateAvailable:"Update available",closeSidebar:"Close sidebar"}},_t={title:"Enter access password",subtitle:"Continue after verification.",placeholder:"Access password",submit:"Continue",hint:"If you do not have a password yet, set one from the local connection entry first.",submitting:"Checking..."},Jt={buttons:$t,tabs:Mt,status:Ut,messages:Vt,navigation:Ht,common:Bt,time:Kt,fileOperations:qt,mainContent:Wt,fileTree:zt,projectWizard:Gt,versionUpdate:Qt,lanAccess:_t},Yt="Settings",Zt={account:"Account",permissions:"Permissions",mcpServers:"MCP Servers",appearance:"Appearance"},Xt={title:"Account",language:"Language",languageLabel:"Display Language",languageDescription:"Choose your preferred language for the interface",username:"Username",email:"Email",profile:"Profile",changePassword:"Change Password"},es={title:"MCP Servers",addServer:"Add Server",editServer:"Edit Server",deleteServer:"Delete Server",serverName:"Server Name",serverType:"Server Type",config:"Configuration",testConnection:"Test Connection",status:"Status",connected:"Connected",disconnected:"Disconnected",scope:{label:"Scope",user:"User",project:"Project"}},ts={title:"Appearance",theme:"Theme"},ss={saveChanges:"Save Changes",resetToDefaults:"Reset to Defaults",cancelChanges:"Cancel Changes"},ns={title:"Quick Settings",sections:{appearance:"Appearance",toolDisplay:"Tool Display",viewOptions:"View Options",inputSettings:"Input Settings",whisperDictation:"Whisper Dictation"},darkMode:"Dark Mode",autoExpandTools:"Auto-expand tools",showRawParameters:"Show raw parameters",showThinking:"Show thinking",autoScrollToBottom:"Auto-scroll to bottom",sendByCtrlEnter:"Send by Ctrl+Enter",sendByCtrlEnterDescription:"When enabled, pressing Ctrl+Enter will send the message instead of just Enter. This is useful for IME users to avoid accidental sends.",dragHandle:{dragging:"Dragging handle",closePanel:"Close settings panel",openPanel:"Open settings panel",draggingStatus:"Dragging...",toggleAndMove:"Click to toggle, drag to move"},whisper:{modes:{default:"Default Mode",defaultDescription:"Direct transcription of your speech",prompt:"Prompt Enhancement",promptDescription:"Transform rough ideas into clear, detailed AI prompts",vibe:"Vibe Mode",vibeDescription:"Format ideas as clear agent instructions with details"}}},is={appearance:"Appearance",git:"Git",apiTokens:"API & Tokens",channels:"Channels"},os={title:"Channels",description:"Configure bot connectivity, default execution context, and user ID whitelist access control.",platforms:{lark:"Lark / Feishu",dingtalk:"DingTalk"},platformDescriptions:{lark:"Configure Lark bot connectivity, default execution context, and user ID whitelist access control.",dingtalk:"Configure DingTalk bot connectivity, default execution context, and user ID whitelist access control."},optional:"Optional",connection:{title:"Connection Settings"},defaults:{backend:"Default Backend",model:"Default Model (Optional)",modelPlaceholder:"Leave empty to use backend default",project:"Default Project",projectPlaceholder:"Select a project"},runtime:{title:"Runtime Status",currentStatus:"Current status"},allowedUsers:{title:"Allowed User IDs (Whitelist)",userId:"User ID",displayName:"Display Name (Optional)",note:"Note (Optional)",add:"Add",empty:"No allowed users yet.",active:"Active",inactive:"Inactive",enable:"Enable",disable:"Disable",delete:"Delete"},help:{title:"How it works",lark:{step1:"When an unbound user messages the bot, the bot replies with that user's Lark user ID.",step2:"After the admin adds that ID to whitelist, the user can chat normally.",step3:"Set a default project first, otherwise the bot will not execute tasks."},dingtalk:{step1:"When an unbound user messages the bot, the bot replies with that user's DingTalk user ID.",step2:"After the admin adds that ID to whitelist, the user can chat normally.",step3:"Set a default project first, otherwise the bot will not execute tasks."}},actions:{saveConfig:"Save Config",test:"Test Connection",testing:"Testing...",start:"Start",starting:"Starting...",stop:"Stop",stopping:"Stopping...",refresh:"Refresh"},messages:{lark:{configSaved:"Lark configuration saved.",testSuccess:"Lark connection test succeeded.",started:"Lark started.",stopped:"Lark stopped."},dingtalk:{configSaved:"DingTalk configuration saved.",testSuccess:"DingTalk connection test succeeded.",started:"DingTalk started.",stopped:"DingTalk stopped."},userAdded:"User added."},errors:{loadFailed:"Failed to load channel settings.",saveFailed:"Failed to save channel settings.",testNeedCredentials:"App ID and App Secret are required for testing.",testNeedCredentialsDingTalk:"Client ID and Client Secret are required for testing.",testFailed:"Connection test failed.",startFailed:"Failed to start channel.",stopFailed:"Failed to stop channel.",userIdRequired:"User ID is required.",addUserFailed:"Failed to add allowed user.",toggleUserFailed:"Failed to update user status.",deleteUserFailed:"Failed to delete user."},confirmDeleteUser:"Delete this user ID?"},as={darkMode:{label:"Dark Mode",description:"Toggle between light and dark themes"},projectSorting:{label:"Project Sorting",description:"How projects are ordered in the sidebar",alphabetical:"Alphabetical",recentActivity:"Recent Activity"}},rs={title:{add:"Add MCP Server",edit:"Edit MCP Server"},importMode:{form:"Form Input",json:"JSON Import"},scope:{label:"Scope",userGlobal:"User (Global)",projectLocal:"Project (Local)",userDescription:"User scope: Available across all projects on your machine",projectDescription:"Local scope: Only available in the selected project",cannotChange:"Scope cannot be changed when editing an existing server"},fields:{serverName:"Server Name",transportType:"Transport Type",command:"Command",arguments:"Arguments (one per line)",jsonConfig:"JSON Configuration",url:"URL",envVars:"Environment Variables (KEY=value, one per line)",headers:"Headers (KEY=value, one per line)",selectProject:"Select a project..."},placeholders:{serverName:"my-server"},validation:{missingType:"Missing required field: type",stdioRequiresCommand:"stdio type requires a command field",httpRequiresUrl:"{{type}} type requires a url field",invalidJson:"Invalid JSON format",jsonHelp:"Paste your MCP server configuration in JSON format. Example formats:",jsonExampleStdio:'• stdio: {"type":"stdio","command":"npx","args":["@upstash/context7-mcp"]}',jsonExampleHttp:'• http/sse: {"type":"http","url":"https://api.example.com/mcp"}'},configDetails:"Configuration Details (from {{configFile}})",projectPath:"Path: {{path}}",actions:{cancel:"Cancel",saving:"Saving...",addServer:"Add Server",updateServer:"Update Server"}},ls={success:"Settings saved successfully!",error:"Failed to save settings",saving:"Saving..."},cs={save:"Save Settings",cancel:"Cancel"},ds={title:"Git Configuration",description:"Configure your git identity for commits. These settings will be applied globally via git config --global",name:{label:"Git Name",help:"Your name for git commits"},email:{label:"Git Email",help:"Your email for git commits"},actions:{save:"Save Configuration",saving:"Saving..."},status:{success:"Saved successfully"}},us={title:"API Keys",description:"Generate API keys to access the external API from other applications.",newKey:{alertTitle:"⚠️ Save Your API Key",alertMessage:"This is the only time you'll see this key. Store it securely.",iveSavedIt:"I've saved it"},form:{placeholder:"API Key Name (e.g., Production Server)",createButton:"Create",cancelButton:"Cancel"},newButton:"New API Key",empty:"No API keys created yet.",list:{created:"Created:",lastUsed:"Last used:"},confirmDelete:"Are you sure you want to delete this API key?",status:{active:"Active",inactive:"Inactive"},apiDocsLink:"API Documentation",documentation:{title:"External API Documentation",description:"Learn how to use the external API to trigger Claude/Codex/Gemini/OpenCode sessions from your applications.",viewLink:"View API Documentation →"},loading:"Loading...",version:{updateAvailable:"Update available: v{{version}}"}},ps={title:"Permission Settings",skipPermissions:{label:"Skip permission prompts (use with caution)",claudeDescription:"Equivalent to --dangerously-skip-permissions flag",cursorDescription:"Equivalent to the CLI force flag"},allowedTools:{title:"Allowed Tools",description:"Tools that are automatically allowed without prompting for permission",placeholder:'e.g., "Bash(git log:*)" or "Write"',quickAdd:"Quick add common tools:",empty:"No allowed tools configured"},blockedTools:{title:"Blocked Tools",description:"Tools that are automatically blocked without prompting for permission",placeholder:'e.g., "Bash(rm:*)"',empty:"No blocked tools configured"},allowedCommands:{title:"Allowed Shell Commands",description:"Shell commands that are automatically allowed without prompting",placeholder:'e.g., "Shell(ls)" or "Shell(git status)"',quickAdd:"Quick add common commands:",empty:"No allowed commands configured"},blockedCommands:{title:"Blocked Shell Commands",description:"Shell commands that are automatically blocked",placeholder:'e.g., "Shell(rm -rf)" or "Shell(sudo)"',empty:"No blocked commands configured"},toolExamples:{title:"Tool Pattern Examples:",bashGitLog:"- Allow all git log commands",bashGitDiff:"- Allow all git diff commands",write:"- Allow all Write tool usage",bashRm:"- Block all rm commands (dangerous)"},shellExamples:{title:"Shell Command Examples:",ls:"- Allow ls command",gitStatus:"- Allow git status",npmInstall:"- Allow npm install",rmRf:"- Block recursive delete"},codex:{permissionMode:"Permission Mode",description:"Controls how Codex handles file modifications and command execution",modes:{default:{title:"Default",description:"All commands run automatically within the workspace. Recommended for code editing tasks."},acceptEdits:{title:"Accept Edits",description:"All commands run automatically within the workspace. Full auto mode with sandboxed execution."},bypassPermissions:{title:"Bypass Permissions",description:"Full system access with no restrictions. All commands run automatically with full disk and network access. Use with caution."}},technicalDetails:"Technical details",technicalInfo:{default:"sandboxMode=workspace-write, approvalPolicy=never. All commands auto-execute within project directory.",acceptEdits:"sandboxMode=workspace-write, approvalPolicy=never. All commands auto-execute within project directory.",bypassPermissions:"sandboxMode=danger-full-access, approvalPolicy=never. Full system access, use only in trusted environments.",overrideNote:"You can override this per-session using the mode button in the chat interface."}},actions:{add:"Add"}},hs={title:"MCP Servers",description:{claude:"Model Context Protocol servers provide additional tools and data sources to Claude",cursor:"Model Context Protocol servers provide additional tools and data sources to supported CLIs",codex:"Model Context Protocol servers provide additional tools and data sources to Codex"},addButton:"Add MCP Server",empty:"No MCP servers configured",serverType:"Type",scope:{local:"local",user:"user"},config:{command:"Command",url:"URL",args:"Args",environment:"Environment"},tools:{title:"Tools",count:"({{count}}):",more:"+{{count}} more"},actions:{edit:"Edit server",delete:"Delete server"},help:{title:"About Codex MCP",description:"Codex supports stdio-based MCP servers. You can add servers that extend Codex's capabilities with additional tools and resources."}},gs={title:Yt,tabs:Zt,account:Xt,mcp:es,appearance:ts,actions:ss,quickSettings:ns,mainTabs:is,channels:os,appearanceSettings:as,mcpForm:rs,saveStatus:ls,footerActions:cs,git:ds,apiKeys:us,permissions:ps,mcpServers:hs},fs={title:"Projects",newProject:"New Project",deleteProject:"Delete Project",renameProject:"Rename Project",noProjects:"No projects found",loadingProjects:"Loading projects...",searchPlaceholder:"Search projects...",projectNamePlaceholder:"Project name",starred:"Starred",all:"All",untitledSession:"Untitled Session",newSession:"New Session",codexSession:"Codex Session",opencodeSession:"OpenCode Session",fetchingProjects:"Fetching your Claude projects and sessions",projects:"projects",noMatchingProjects:"No matching projects",tryDifferentSearch:"Try adjusting your search term",runClaudeCli:"Run Claude CLI in a project directory to get started"},ms={title:"Axhub Genie",subtitle:"AI coding assistant interface"},ys={title:"Sessions",newSession:"New Session",deleteSession:"Delete Session",renameSession:"Rename Session",noSessions:"No sessions yet",loadingSessions:"Loading sessions...",unnamed:"Unnamed",loading:"Loading...",showMore:"Show more sessions"},ws={viewEnvironments:"View Environments",hideSidebar:"Hide sidebar",createProject:"Create new project",refresh:"Refresh projects and sessions (Ctrl+R)",renameProject:"Rename project (F2)",deleteProject:"Delete empty project (Delete)",addToFavorites:"Add to favorites",removeFromFavorites:"Remove from favorites",editSessionName:"Manually edit session name",deleteSession:"Delete this session permanently",save:"Save",cancel:"Cancel"},Ss={chat:"Chat",files:"Files",git:"Git",terminal:"Terminal",tasks:"Tasks"},vs={refresh:"Refresh",settings:"Settings",collapseAll:"Collapse All",expandAll:"Expand All",cancel:"Cancel",save:"Save",delete:"Delete",rename:"Rename"},bs={active:"Active",inactive:"Inactive",thinking:"Thinking...",error:"Error",aborted:"Aborted",unknown:"Unknown"},xs={justNow:"Just now",oneMinuteAgo:"1 min ago",minutesAgo:"{{count}} mins ago",oneHourAgo:"1 hour ago",hoursAgo:"{{count}} hours ago",oneDayAgo:"1 day ago",daysAgo:"{{count}} days ago"},Cs={deleteConfirm:"Are you sure you want to delete this?",renameSuccess:"Renamed successfully",deleteSuccess:"Deleted successfully",errorOccurred:"An error occurred",deleteSessionConfirm:"Are you sure you want to delete this session? This action cannot be undone.",deleteProjectConfirm:"Are you sure you want to delete this empty project? This action cannot be undone.",enterProjectPath:"Please enter a project path",deleteSessionFailed:"Failed to delete session. Please try again.",deleteSessionError:"Error deleting session. Please try again.",deleteProjectFailed:"Failed to delete project. Please try again.",deleteProjectError:"Error deleting project. Please try again.",createProjectFailed:"Failed to create project. Please try again.",createProjectError:"Error creating project. Please try again."},Ps={updateAvailable:"Update available"},ks={deleteProject:"Delete Project",deleteSession:"Delete Session",confirmDelete:"Are you sure you want to delete",sessionCount_one:"This project contains {{count}} conversation.",sessionCount_other:"This project contains {{count}} conversations.",allConversationsDeleted:"All conversations will be permanently deleted.",cannotUndo:"This action cannot be undone."},Ls={title:"Connections",subtitle:"Manage QR connections and LAN access in one place.",loading:"Loading connection status...",project:{label:"AI default work project",description:"Choose the project this platform should route messages into by default.",connectedDescription:"You can update the default project after connecting without scanning again.",placeholder:"Select a project",empty:"No projects are available yet. Add a project from the sidebar first.",appliedBadge:"Applied",pendingBadge:"Pending",appliedHint:"This platform is already using the selected project.",pendingHint:"Save to switch this platform to the newly selected default project."},install:{title:"Install cc-connect first",description:"Platform connections require the cc-connect CLI. Install the beta build to continue.",action:"Install cc-connect",installing:"Installing..."},platforms:{weixin:{title:"Weixin",description:"Scan a QR code and route Weixin messages to your current AI provider.",qrTitle:"Connect with QR code",qrDescription:"Open Weixin on your phone, scan the QR code, and confirm the login."},feishu:{title:"Feishu",description:"Connect Feishu through the QR onboarding flow and route messages to the active AI provider.",qrTitle:"QR onboarding",qrDescription:"Use QR onboarding when you want cc-connect to guide the initial Feishu setup."},lan:{title:"LAN access",description:"Generate LAN links and phone QR codes.",passwordTitle:"Access password",passwordDescription:"Set a password so devices on the LAN can enter with a password or QR code.",passwordPlaceholder:"Enter a new access password",linksTitle:"Access links",linksDescription:"Each LAN address gets its own link and QR code.",linkPending:"Save the access password to generate links.",qrTitle:"Phone QR code",qrHint:"The QR link stays valid for 8 minutes and then opens the app directly.",noAddresses:"No LAN addresses are available right now."}},status:{connected:"Connected",notConnected:"Not connected",starting:"Starting setup...",awaitingScan:"Scan the QR code to continue",scanned:"QR code scanned",confirmOnDevice:"Confirm on your device to finish setup.",expired:"The QR code expired. Refresh to try again."},actions:{open:"Connections",shortOpen:"Connect",back:"Back",cancel:"Cancel",unbind:"Unbind",refreshQr:"Refresh QR",connectWeixin:"Connect Weixin",startQrSetup:"Start QR setup",saveLanPassword:"Save password",copyLink:"Copy link",openLink:"Open",showLanQr:"QR code",saveProject:"Save default project",savingProject:"Saving..."},labels:{activeProvider:"Active provider:",providerSwitcher:"Provider routing",connectedTitle:"{{platform}} is connected",connectedHint:"You can switch the active provider or unbind this platform at any time.",qrAlt:"Connection QR code",countdown:"Expires in {{time}}"},messages:{selectProjectFirst:"Select a project here before starting platform setup.",connected:"Connection updated successfully.",setupFailed:"Failed to start the setup flow.",refreshFailed:"Failed to refresh the setup session.",installFailed:"Failed to install cc-connect.",installSuccess:"cc-connect installed successfully.",lanPasswordUpdated:"LAN access password updated.",lanCopied:"LAN access link copied.",lanCopyFailed:"Failed to copy the LAN access link.",projectUpdateFailed:"Failed to update the default project.",projectUpdateSuccess:"Default project updated successfully.",switchFailed:"Failed to switch the active provider.",switchSuccess:"Provider switched successfully.",unbindFailed:"Failed to remove the platform connection.",unbindSuccess:"Platform connection removed."}},As={projects:fs,app:ms,sessions:ys,tooltips:ws,navigation:Ss,actions:vs,status:bs,time:xs,messages:Cs,version:Ps,deleteConfirmation:ks,ccConnect:Ls},Fs={copy:"Copy",copied:"Copied",copyCode:"Copy code"},js={user:"U",error:"Error",tool:"Tool",claude:"Claude",codex:"Codex",opencode:"OpenCode",gemini:"Gemini"},Os={settings:"Tool Settings",error:"Tool Error",result:"Tool Result",viewParams:"View input parameters",viewRawParams:"View raw parameters",viewDiff:"View edit diff for",creatingFile:"Creating new file:",updatingTodo:"Updating Todo List",read:"Read",readFile:"Read file",updateTodo:"Update todo list",readTodo:"Read todo list",searchResults:"results"},Ts={found:"Found {{count}} {{type}}",file:"file",files:"files",pattern:"pattern:",in:"in:"},Ds={updated:"File updated successfully",created:"File created successfully",written:"File written successfully",diff:"Diff",newFile:"New File",viewContent:"View file content",viewFullOutput:"View full output ({{count}} chars)",contentDisplayed:"The file content is displayed in the diff view above"},Rs={title:"Interactive Prompt",waiting:"Waiting for your response in the CLI",instruction:"Please select an option in your terminal where Claude is running.",selectedOption:"✓ Claude selected option {{number}}",instructionDetail:"In the CLI, you would select this option interactively using arrow keys or by typing the number."},Is={title:"Thinking...",emoji:"💭 Thinking..."},Es={response:"JSON Response"},Ns={grant:"Grant permission for {{tool}}",added:"Permission added",addTo:"Adds {{entry}} to Allowed Tools.",retry:"Permission saved. Retry the request to use the tool.",error:"Unable to update permissions. Please try again.",openSettings:"Open settings"},$s={updated:"Todo list has been updated successfully",current:"Current Todo List"},Ms={viewPlan:"📋 View implementation plan",title:"Implementation Plan"},Us={resetAt:"Claude usage limit reached. Your limit will reset at **{{time}} {{timezone}}** - {{date}}"},Vs={permissionMode:"Permission Mode",modes:{default:"Default Mode",acceptEdits:"Accept Edits",bypassPermissions:"Bypass Permissions",plan:"Plan Mode"},descriptions:{default:"All commands run automatically within the workspace. Recommended for code editing tasks.",acceptEdits:"All commands run automatically within the workspace. Full auto mode with sandboxed execution.",bypassPermissions:"Full system access with no restrictions. All commands run automatically with full disk and network access. Use with caution.",plan:"Planning mode - no commands are executed"},technicalDetails:"Technical details"},Hs={placeholder:"Type / for commands, @ for files, or ask {{provider}} anything...",placeholderDefault:"Type your message...",providerNotInstalled:"Provider is not installed",providerNotInstalledWithName:"{{provider}} is not installed",recheckInstallation:"Re-check installation",checkingInstallation:"Checking...",loadingModels:"Loading models...",disabled:"Input disabled",attachFiles:"Attach files",attachImages:"Attach images",send:"Send",stop:"Stop",hintText:{ctrlEnter:"Ctrl+Enter to send • Shift+Enter for new line • Tab to change modes • / for slash commands",enter:"Enter to send • Shift+Enter for new line • Tab to change modes • / for slash commands"},clickToChangeMode:"Click to change permission mode (or press Tab in input)",showAllCommands:"Show all commands",dynamicContext:{systemChip:"System Context",removeSystem:"Remove system context",removeCurrentFile:"Remove current file",removeElement:"Remove selected element",elementFallback:"Element"}},Bs={selector:{title:"Thinking Mode",description:"Extended thinking gives the model more time to evaluate alternatives",active:"Active",tip:"Higher thinking modes take more time but provide more thorough analysis"},modes:{none:{name:"Standard",description:"Regular response",prefix:""},think:{name:"Think",description:"Basic extended thinking",prefix:"think"},thinkHard:{name:"Think Hard",description:"More thorough evaluation",prefix:"think hard"},thinkHarder:{name:"Think Harder",description:"Deep analysis with alternatives",prefix:"think harder"},ultrathink:{name:"Ultrathink",description:"Maximum thinking budget",prefix:"ultrathink"}},buttonTitle:"Thinking mode: {{mode}}"},Ks={title:"Choose Your AI Assistant",description:"Select a provider to start a new conversation",selectModel:"Select Model",providerInfo:{anthropic:"by Anthropic",openai:"by OpenAI",google:"by Google",cursorEditor:"AI Code Editor"},readyPrompt:{claude:"Ready to use Claude with {{model}}. Start typing your message below.",codex:"Ready to use Codex with {{model}}. Start typing your message below.",opencode:"Ready to use OpenCode with {{model}}. Start typing your message below.",gemini:"Ready to use Gemini with {{model}}. Start typing your message below.",default:"Select a provider above to begin"}},qs={continue:{title:"Continue your conversation",description:"Ask questions about your code, request changes, or get help with development tasks"},loading:{olderMessages:"Loading older messages...",sessionMessages:"Loading session messages...",waitingForFirstReply:"Waiting for the first reply..."},messages:{showingOf:"Showing {{shown}} of {{total}} messages",scrollToLoad:"Scroll up to load more",showingLast:"Showing last {{count}} messages ({{total}} total)",loadEarlier:"Load earlier messages"}},Ws={selectProject:{title:"Select a Project",description:"Choose a project to open an interactive shell in that directory"},status:{newSession:"New Session",initializing:"Initializing...",restarting:"Restarting..."},actions:{disconnect:"Disconnect",disconnectTitle:"Disconnect from shell",restart:"Restart",restartTitle:"Restart Shell (disconnect first)",connect:"Continue in Shell",connectTitle:"Connect to shell"},loading:"Loading terminal...",connecting:"Connecting to shell...",startSession:"Start a new Claude session",resumeSession:"Resume session: {{displayName}}...",runCommand:"Run {{command}} in {{projectName}}",startCli:"Starting Claude CLI in {{projectName}}",defaultCommand:"command"},zs={actions:{runCommand:"Run command",commandPending:"Waiting for command",searchContent:"Search content",searchPending:"Waiting for search parameters",readFile:"Read file",readPending:"Waiting for file path",updateFile:"Update file",createFile:"Create file",filePending:"Waiting for file path",updateTodo:"Update todo",readTodo:"Read todo",todoSummary:"Sync current todo state",generatePlan:"Generate plan",planSummary:"Organize implementation plan",runTool:"Run tool"},status:{running:"Running",completed:"Completed",failed:"Failed"},labels:{file:"File",command:"Command",output:"Output",input:"Input",matchedFiles:"Matched files"},stage:{thinking:"Thinking",searching:"Searching",runningCommand:"Running command",editingFile:"Editing file",readingFile:"Reading file",updatingTodo:"Updating todo",waitingPermission:"Waiting for permission",generatingReply:"Generating reply",toolFailed:"Tool failed",working:"Working"},detail:{preparingReply:"Preparing response",executing:"Syncing latest execution progress"},requestTool:"Request to run tool: {{tool}}",permission:{title:"Permission request",rule:"Rule:",viewInput:"View tool input",allowOnce:"Allow once",remember:"Always allow",rememberSaved:"Always allow (saved)",deny:"Deny",deniedMessage:"User denied this tool execution"}},Gs={codeBlock:Fs,messageTypes:js,tools:Os,search:Ts,fileOperations:Ds,interactive:Rs,thinking:Is,json:Es,permissions:Ns,todo:$s,plan:Ms,usageLimit:Us,codex:Vs,input:Hs,thinkingMode:Bs,providerSelection:Ks,session:qs,shell:Ws,activity:zs},Qs={save:"保存",cancel:"取消",delete:"删除",create:"创建",edit:"编辑",close:"关闭",confirm:"确认",submit:"提交",retry:"重试",refresh:"刷新",search:"搜索",clear:"清除",copy:"复制",download:"下载",upload:"上传",browse:"浏览"},_s={chat:"聊天",shell:"终端",files:"文件",git:"源代码管理",tasks:"任务"},Js={loading:"加载中...",success:"成功",error:"错误",failed:"失败",pending:"待处理",completed:"已完成",inProgress:"进行中"},Ys={savedSuccessfully:"保存成功",deletedSuccessfully:"删除成功",updatedSuccessfully:"更新成功",operationFailed:"操作失败",networkError:"网络错误,请检查您的连接。",unauthorized:"未授权,请登录。",notFound:"未找到",invalidInput:"输入无效",requiredField:"此字段为必填项",unknownError:"发生未知错误"},Zs={settings:"设置",home:"首页",back:"返回",next:"下一步",previous:"上一步",logout:"退出登录"},Xs={language:"语言",theme:"主题",darkMode:"深色模式",lightMode:"浅色模式",name:"名称",description:"描述",enabled:"已启用",disabled:"已禁用",optional:"可选",version:"版本",select:"选择",selectAll:"全选",deselectAll:"取消全选"},en={justNow:"刚刚",minutesAgo:"{{count}} 分钟前",hoursAgo:"{{count}} 小时前",daysAgo:"{{count}} 天前",yesterday:"昨天"},tn={newFile:"新建文件",newFolder:"新建文件夹",rename:"重命名",move:"移动",copyPath:"复制路径",openInEditor:"在编辑器中打开"},sn={loading:"正在加载 Axhub Genie",settingUpWorkspace:"正在设置您的工作空间...",chooseProject:"选择您的项目",selectProjectDescription:"从侧边栏选择一个项目以开始对话吧",tip:"提示",createProjectMobile:"点击上方的菜单按钮以访问项目",createProjectDesktop:"点击侧边栏中的文件夹图标以创建新项目",newSession:"新会话",untitledSession:"未命名会话",projectFiles:"项目文件",openInCodexClient:"在 Codex 客户端打开",openInOpencodeApp:"在 OpenCode 应用打开"},nn={loading:"正在加载文件...",files:"文件",simpleView:"简单视图",compactView:"紧凑视图",detailedView:"详细视图",searchPlaceholder:"搜索文件和文件夹...",clearSearch:"清除搜索",name:"名称",size:"大小",modified:"修改时间",permissions:"权限",noFilesFound:"未找到文件",checkProjectPath:"检查项目路径是否可访问",noMatchesFound:"未找到匹配项",tryDifferentSearch:"尝试不同的搜索词或清除搜索",justNow:"刚刚",minAgo:"{{count}} 分钟前",hoursAgo:"{{count}} 小时前",daysAgo:"{{count}} 天前"},on={title:"创建新项目",steps:{type:"类型",configure:"配置",confirm:"确认"},step1:{question:"您已经有工作区,还是想创建一个新的工作区?",existing:{title:"现有工作区",description:"我的服务器上已经有工作区,只需要将其添加到项目列表中"},new:{title:"新建工作区",description:"创建一个新的空工作区"}},step2:{existingPath:"工作区路径",newPath:"工作区路径",existingPlaceholder:"请输入现有工作区路径",newPlaceholder:"请输入新工作区路径",existingHelp:"您现有工作区目录的完整路径",newHelp:"工作区目录的完整路径"},step3:{reviewConfig:"查看您的配置",workspaceType:"工作区类型:",existingWorkspace:"现有工作区",newWorkspace:"新建工作区",path:"路径:",existingInfo:"工作区将被添加到您的项目列表中,并可用于 Claude/Codex/Gemini/OpenCode 会话。",newEmpty:"工作区将被添加到您的项目列表中,并可用于 Claude/Codex/Gemini/OpenCode 会话。"},buttons:{cancel:"取消",back:"返回",next:"下一步",createProject:"创建项目",creating:"创建中..."},folderBrowser:{title:"选择文件夹",browseFolders:"浏览文件夹",browseDrives:"浏览磁盘",browseRoots:"浏览可用根目录",showHiddenFolders:"显示隐藏文件夹",hideHiddenFolders:"不显示隐藏文件夹",createFolder:"新建文件夹",newFolderPlaceholder:"输入新文件夹名称",noSubfolders:"未找到子文件夹",currentPath:"当前路径:",drivesRoot:"此电脑",workspaceRoots:"允许的工作区根目录",useCurrentFolder:"使用当前文件夹"},errors:{selectType:"请选择您已有现有工作区还是想创建新工作区",providePath:"请提供工作区路径",failedToCreate:"创建工作区失败",failedToCreateFolder:"创建文件夹失败"}},an={title:"有可用更新",newVersionReady:"新版本已准备就绪",currentVersion:"当前版本",latestVersion:"最新版本",whatsNew:"新内容:",viewFullRelease:"查看完整发布",updateProgress:"更新进度:",manualUpgrade:"手动升级:",manualUpgradeHint:"或点击'立即更新'以自动运行更新。",updateCompleted:"更新成功完成!",restartServer:"请重启服务器以应用更改。",updateFailed:"更新失败",buttons:{close:"关闭",later:"稍后",copyCommand:"复制命令",updateNow:"立即更新",updating:"更新中..."},ariaLabels:{closeModal:"关闭版本升级模态框",showSidebar:"显示侧边栏",settings:"设置",updateAvailable:"有可用更新",closeSidebar:"关闭侧边栏"}},rn={title:"输入访问密码",subtitle:"验证后即可继续使用。",placeholder:"访问密码",submit:"继续访问",hint:"如果你还没有访问密码,请先在本机的连接入口里设置。",submitting:"验证中..."},ln={buttons:Qs,tabs:_s,status:Js,messages:Ys,navigation:Zs,common:Xs,time:en,fileOperations:tn,mainContent:sn,fileTree:nn,projectWizard:on,versionUpdate:an,lanAccess:rn},cn="设置",dn={account:"账户",permissions:"权限",mcpServers:"MCP 服务器",appearance:"外观"},un={title:"账户",language:"语言",languageLabel:"显示语言",languageDescription:"选择您偏好的界面语言",username:"用户名",email:"邮箱",profile:"个人资料",changePassword:"修改密码"},pn={title:"MCP 服务器",addServer:"添加服务器",editServer:"编辑服务器",deleteServer:"删除服务器",serverName:"服务器名称",serverType:"服务器类型",config:"配置",testConnection:"测试连接",status:"状态",connected:"已连接",disconnected:"未连接",scope:{label:"范围",user:"用户",project:"项目"}},hn={title:"外观",theme:"主题"},gn={saveChanges:"保存更改",resetToDefaults:"重置为默认值",cancelChanges:"取消更改"},fn={title:"快速设置",sections:{appearance:"外观",toolDisplay:"工具显示",viewOptions:"视图选项",inputSettings:"输入设置",whisperDictation:"Whisper 听写"},darkMode:"深色模式",autoExpandTools:"自动展开工具",showRawParameters:"显示原始参数",showThinking:"显示思考过程",autoScrollToBottom:"自动滚动到底部",sendByCtrlEnter:"使用 Ctrl+Enter 发送",sendByCtrlEnterDescription:"启用后,按 Ctrl+Enter 发送消息,而不是仅按 Enter。这对于使用输入法的用户可以避免意外发送。",dragHandle:{dragging:"正在拖拽手柄",closePanel:"关闭设置面板",openPanel:"打开设置面板",draggingStatus:"正在拖拽...",toggleAndMove:"点击切换,拖拽移动"},whisper:{modes:{default:"默认模式",defaultDescription:"直接转录您的语音",prompt:"提示词增强",promptDescription:"将粗略的想法转化为清晰、详细的 AI 提示词",vibe:"Vibe 模式",vibeDescription:"将想法格式化为带有详细说明的清晰智能体指令"}}},mn={appearance:"外观",git:"Git",apiTokens:"API 和令牌",channels:"第三方 IM"},yn={title:"第三方 IM",description:"配置机器人连接、默认执行环境,并通过用户ID白名单控制访问。",platforms:{lark:"Lark / 飞书",dingtalk:"DingTalk / 钉钉"},platformDescriptions:{lark:"配置飞书机器人连接、默认执行环境,并通过用户ID白名单控制访问。",dingtalk:"配置钉钉机器人连接、默认执行环境,并通过用户ID白名单控制访问。"},optional:"可选",connection:{title:"连接配置"},defaults:{backend:"默认后端",model:"默认模型(可选)",modelPlaceholder:"留空使用后端默认模型",project:"默认项目",projectPlaceholder:"请选择项目"},runtime:{title:"运行状态",currentStatus:"当前状态"},allowedUsers:{title:"允许用户ID(白名单)",userId:"用户ID",displayName:"显示名(可选)",note:"备注(可选)",add:"新增",empty:"暂无白名单用户",active:"启用",inactive:"停用",enable:"启用",disable:"停用",delete:"删除"},help:{title:"使用说明",lark:{step1:"未绑定用户给机器人发消息时,机器人会返回该用户的飞书用户ID。",step2:"管理员将该ID加入白名单后,用户即可正常对话。",step3:"请先配置默认项目,否则机器人不会执行任务。"},dingtalk:{step1:"未绑定用户给机器人发消息时,机器人会返回该用户的钉钉用户ID。",step2:"管理员将该ID加入白名单后,用户即可正常对话。",step3:"请先配置默认项目,否则机器人不会执行任务。"}},actions:{saveConfig:"保存配置",test:"测试连接",testing:"测试中...",start:"启动",starting:"启动中...",stop:"停止",stopping:"停止中...",refresh:"刷新"},messages:{lark:{configSaved:"Lark 配置已保存",testSuccess:"Lark 连接测试成功",started:"Lark 已启动",stopped:"Lark 已停止"},dingtalk:{configSaved:"DingTalk 配置已保存",testSuccess:"DingTalk 连接测试成功",started:"DingTalk 已启动",stopped:"DingTalk 已停止"},userAdded:"用户已添加"},errors:{loadFailed:"加载渠道设置失败",saveFailed:"保存渠道设置失败",testNeedCredentials:"测试连接需要填写 App ID 和 App Secret",testNeedCredentialsDingTalk:"测试连接需要填写 Client ID 和 Client Secret",testFailed:"连接测试失败",startFailed:"启动渠道失败",stopFailed:"停止渠道失败",userIdRequired:"请输入用户ID",addUserFailed:"新增允许用户失败",toggleUserFailed:"更新用户状态失败",deleteUserFailed:"删除用户失败"},confirmDeleteUser:"确定要删除这个用户ID吗?"},wn={darkMode:{label:"深色模式",description:"切换浅色和深色主题"},projectSorting:{label:"项目排序",description:"项目在侧边栏中的排列方式",alphabetical:"按字母顺序",recentActivity:"最近活动"}},Sn={title:{add:"添加 MCP 服务器",edit:"编辑 MCP 服务器"},importMode:{form:"表单输入",json:"JSON 导入"},scope:{label:"范围",userGlobal:"用户(全局)",projectLocal:"项目(本地)",userDescription:"用户范围:在您机器上的所有项目中可用",projectDescription:"本地范围:仅在选定项目中可用",cannotChange:"编辑现有服务器时无法更改范围"},fields:{serverName:"服务器名称",transportType:"传输类型",command:"命令",arguments:"参数(每行一个)",jsonConfig:"JSON 配置",url:"URL",envVars:"环境变量(KEY=值,每行一个)",headers:"请求头(KEY=值,每行一个)",selectProject:"选择项目..."},placeholders:{serverName:"我的服务"},validation:{missingType:"缺少必填字段:type",stdioRequiresCommand:"stdio 类型需要 command 字段",httpRequiresUrl:"{{type}} 类型需要 url 字段",invalidJson:"无效的 JSON 格式",jsonHelp:"粘贴您的 MCP 服务器配置(JSON 格式)。示例格式:",jsonExampleStdio:'• stdio: {"type":"stdio","command":"npx","args":["@upstash/context7-mcp"]}',jsonExampleHttp:'• http/sse: {"type":"http","url":"https://api.example.com/mcp"}'},configDetails:"配置详细信息(来自 {{configFile}})",projectPath:"路径:{{path}}",actions:{cancel:"取消",saving:"保存中...",addServer:"添加服务器",updateServer:"更新服务器"}},vn={success:"设置保存成功!",error:"保存设置失败",saving:"保存中..."},bn={save:"保存设置",cancel:"取消"},xn={title:"Git 配置",description:"配置您的 git 提交身份。这些设置将通过 git config --global 全局应用",name:{label:"Git 名称",help:"您的 git 提交名称"},email:{label:"Git 邮箱",help:"您的 git 提交邮箱"},actions:{save:"保存配置",saving:"保存中..."},status:{success:"保存成功"}},Cn={title:"API 密钥",description:"生成 API 密钥以从其他应用访问外部 API。",newKey:{alertTitle:"⚠️ 保存您的 API 密钥",alertMessage:"这是您唯一一次看到此密钥。请妥善保存。",iveSavedIt:"我已保存"},form:{placeholder:"API 密钥名称(例如:生产服务器)",createButton:"创建",cancelButton:"取消"},newButton:"新建 API 密钥",empty:"尚未创建 API 密钥。",list:{created:"创建时间:",lastUsed:"最后使用:"},confirmDelete:"确定要删除此 API 密钥吗?",status:{active:"激活",inactive:"未激活"},apiDocsLink:"API 文档",documentation:{title:"外部 API 文档",description:"了解如何使用外部 API 从您的应用程序触发 Claude/Codex/Gemini/OpenCode 会话。",viewLink:"查看 API 文档 →"},loading:"加载中...",version:{updateAvailable:"有可用更新:v{{version}}"}},Pn={title:"权限设置",skipPermissions:{label:"跳过权限提示(请谨慎使用)",claudeDescription:"等同于 --dangerously-skip-permissions 标志",cursorDescription:"等同于 Cursor CLI 中的 -f 标志"},allowedTools:{title:"允许的工具",description:"无需权限提示即可自动使用的工具",placeholder:'例如:"Bash(git log:*)" 或 "Write"',quickAdd:"快速添加常用工具:",empty:"未配置允许的工具"},blockedTools:{title:"禁用的工具",description:"无需权限提示即可自动禁用的工具",placeholder:'例如:"Bash(rm:*)"',empty:"未配置禁用的工具"},allowedCommands:{title:"允许的 Shell 命令",description:"无需权限提示即可自动执行的 Shell 命令",placeholder:'例如:"Shell(ls)" 或 "Shell(git status)"',quickAdd:"快速添加常用命令:",empty:"未配置允许的命令"},blockedCommands:{title:"阻止的 Shell 命令",description:"自动阻止的 Shell 命令",placeholder:'例如:"Shell(rm -rf)" 或 "Shell(sudo)"',empty:"未配置阻止的命令"},toolExamples:{title:"工具模式示例:",bashGitLog:"- 允许所有 git log 命令",bashGitDiff:"- 允许所有 git diff 命令",write:"- 允许所有 Write 工具使用",bashRm:"- 阻止所有 rm 命令(危险)"},shellExamples:{title:"Shell 命令示例:",ls:"- 允许 ls 命令",gitStatus:"- 允许 git status",npmInstall:"- 允许 npm install",rmRf:"- 阻止递归删除"},codex:{permissionMode:"权限模式",description:"控制 Codex 如何处理文件修改和命令执行",modes:{default:{title:"默认",description:"工作区内所有命令都会自动执行,适合代码修改任务。"},acceptEdits:{title:"接受编辑",description:"所有命令在工作区内自动运行。具有沙箱执行的全自动模式。"},bypassPermissions:{title:"绕过权限",description:"完全系统访问,无任何限制。所有命令自动运行,具有完整的磁盘和网络访问权限。请谨慎使用。"}},technicalDetails:"技术详情",technicalInfo:{default:"sandboxMode=workspace-write, approvalPolicy=never。所有命令在项目目录内自动执行。",acceptEdits:"sandboxMode=workspace-write, approvalPolicy=never。所有命令在项目目录内自动执行。",bypassPermissions:"sandboxMode=danger-full-access, approvalPolicy=never。完全系统访问权限,仅在可信环境中使用。",overrideNote:"您可以使用聊天界面中的模式按钮按会话覆盖此设置。"}},actions:{add:"添加"}},kn={title:"MCP 服务器",description:{claude:"Model Context Protocol 服务器为 Claude 提供额外的工具和数据源",cursor:"Model Context Protocol 服务器为受支持的 CLI 提供额外的工具和数据源",codex:"Model Context Protocol 服务器为 Codex 提供额外的工具和数据源"},addButton:"添加 MCP 服务器",empty:"未配置 MCP 服务器",serverType:"类型",scope:{local:"本地",user:"用户"},config:{command:"命令",url:"URL",args:"参数",environment:"环境变量"},tools:{title:"工具",count:"({{count}}):",more:"还有 {{count}} 个"},actions:{edit:"编辑服务器",delete:"删除服务器"},help:{title:"关于 Codex MCP",description:"Codex 支持基于 stdio 的 MCP 服务器。您可以添加服务器,通过额外的工具和资源来扩展 Codex 的功能。"}},Ln={title:cn,tabs:dn,account:un,mcp:pn,appearance:hn,actions:gn,quickSettings:fn,mainTabs:mn,channels:yn,appearanceSettings:wn,mcpForm:Sn,saveStatus:vn,footerActions:bn,git:xn,apiKeys:Cn,permissions:Pn,mcpServers:kn},An={title:"项目",newProject:"新建项目",deleteProject:"删除项目",renameProject:"重命名项目",noProjects:"未找到项目",loadingProjects:"加载项目中...",searchPlaceholder:"搜索项目...",projectNamePlaceholder:"项目名称",starred:"星标",all:"全部",untitledSession:"未命名会话",newSession:"新会话",codexSession:"Codex 会话",opencodeSession:"OpenCode 会话",fetchingProjects:"正在获取您的 Claude 项目和会话",projects:"项目",noMatchingProjects:"未找到匹配的项目",tryDifferentSearch:"尝试调整您的搜索词",runClaudeCli:"在项目目录中运行 Claude CLI 以开始使用"},Fn={title:"Axhub Genie",subtitle:"适合处理轻量级任务"},jn={title:"会话",newSession:"新建会话",deleteSession:"删除会话",renameSession:"重命名会话",noSessions:"暂无会话",loadingSessions:"加载会话中...",unnamed:"未命名",loading:"加载中...",showMore:"显示更多会话"},On={viewEnvironments:"查看环境",hideSidebar:"隐藏侧边栏",createProject:"创建新项目",refresh:"刷新项目和会话 (Ctrl+R)",renameProject:"重命名项目 (F2)",deleteProject:"删除空项目 (Delete)",addToFavorites:"添加到收藏",removeFromFavorites:"从收藏移除",editSessionName:"手动编辑会话名称",deleteSession:"永久删除此会话",save:"保存",cancel:"取消"},Tn={chat:"聊天",files:"文件",git:"Git",terminal:"终端",tasks:"任务"},Dn={refresh:"刷新",settings:"设置",collapseAll:"全部折叠",expandAll:"全部展开",cancel:"取消",save:"保存",delete:"删除",rename:"重命名"},Rn={active:"活动",inactive:"非活动",thinking:"思考中...",error:"错误",aborted:"已中止",unknown:"未知"},In={justNow:"刚刚",oneMinuteAgo:"1 分钟前",minutesAgo:"{{count}} 分钟前",oneHourAgo:"1 小时前",hoursAgo:"{{count}} 小时前",oneDayAgo:"1 天前",daysAgo:"{{count}} 天前"},En={deleteConfirm:"确定要删除吗?",renameSuccess:"重命名成功",deleteSuccess:"删除成功",errorOccurred:"发生错误",deleteSessionConfirm:"确定要删除此会话吗?此操作无法撤销。",deleteProjectConfirm:"确定要删除此空项目吗?此操作无法撤销。",enterProjectPath:"请输入项目路径",deleteSessionFailed:"删除会话失败,请重试。",deleteSessionError:"删除会话时出错,请重试。",deleteProjectFailed:"删除项目失败,请重试。",deleteProjectError:"删除项目时出错,请重试。",createProjectFailed:"创建项目失败,请重试。",createProjectError:"创建项目时出错,请重试。"},Nn={updateAvailable:"有可用更新"},$n={deleteProject:"删除项目",deleteSession:"删除会话",confirmDelete:"您确定要删除",sessionCount_one:"此项目包含 {{count}} 个对话。",sessionCount_other:"此项目包含 {{count}} 个对话。",allConversationsDeleted:"所有对话将被永久删除。",cannotUndo:"此操作无法撤销。"},Mn={title:"连接入口",subtitle:"在这里管理扫码连接和局域网访问。",loading:"正在加载连接状态...",project:{label:"AI 默认工作项目",description:"选择该平台接收到消息后默认绑定的项目。",connectedDescription:"已连接后也可以直接切换默认项目,无需重新扫码。",placeholder:"请选择项目",empty:"暂无可选项目,请先在侧边栏添加项目。",appliedBadge:"已生效",pendingBadge:"待保存",appliedHint:"当前平台已经绑定到这个项目。",pendingHint:"点击保存后,会把这个平台的默认项目切换到新的项目。"},install:{title:"需要先安装 cc-connect",description:"平台连接依赖 cc-connect CLI,请先安装 beta 版本后继续。",action:"安装 cc-connect",installing:"安装中..."},platforms:{weixin:{title:"微信",description:"通过二维码连接微信,并把消息路由到当前激活的 AI 供应商。",qrTitle:"扫码连接",qrDescription:"打开手机微信扫描二维码,并在手机上确认登录。"},feishu:{title:"飞书",description:"通过扫码向导完成飞书连接,并把消息路由到当前激活的 AI 供应商。",qrTitle:"二维码向导",qrDescription:"当你希望由 cc-connect 引导完成首次飞书接入时,使用二维码向导。"},lan:{title:"局域网访问",description:"生成局域网访问链接和手机二维码。",passwordTitle:"访问密码",passwordDescription:"设置后,局域网设备可通过密码或二维码直接进入。",passwordPlaceholder:"输入新的访问密码",linksTitle:"访问链接",linksDescription:"每个局域网地址都会生成自己的链接和二维码。",linkPending:"保存访问密码后会自动生成链接。",qrTitle:"手机二维码",qrHint:"二维码链接 8 分钟内有效,打开后可直接进入。",noAddresses:"暂未检测到可用的局域网地址。"}},status:{connected:"已连接",notConnected:"未连接",starting:"正在启动连接...",awaitingScan:"请扫描二维码继续",scanned:"已扫码",confirmOnDevice:"请在设备上确认以完成连接。",expired:"二维码已过期,请刷新后重试。"},actions:{open:"连接入口",shortOpen:"连接",back:"返回",cancel:"取消",unbind:"解除绑定",refreshQr:"刷新二维码",connectWeixin:"连接微信",startQrSetup:"开始扫码配置",saveLanPassword:"保存密码",copyLink:"复制链接",openLink:"新窗访问",showLanQr:"二维码",saveProject:"保存默认项目",savingProject:"保存中..."},labels:{activeProvider:"当前供应商:",providerSwitcher:"供应商路由",connectedTitle:"{{platform}} 已连接",connectedHint:"你可以随时切换当前生效的供应商,或解除当前平台绑定。",qrAlt:"连接二维码",countdown:"剩余 {{time}}"},messages:{selectProjectFirst:"请先在此处选择一个项目,再开始平台连接。",connected:"连接状态已更新。",setupFailed:"启动连接流程失败。",refreshFailed:"刷新连接会话失败。",installFailed:"安装 cc-connect 失败。",installSuccess:"cc-connect 安装成功。",lanPasswordUpdated:"局域网访问密码已更新。",lanCopied:"局域网访问链接已复制。",lanCopyFailed:"复制局域网访问链接失败。",projectUpdateFailed:"更新默认项目失败。",projectUpdateSuccess:"默认项目已更新。",switchFailed:"切换当前供应商失败。",switchSuccess:"已切换当前供应商。",unbindFailed:"解除平台绑定失败。",unbindSuccess:"平台绑定已解除。"}},Un={projects:An,app:Fn,sessions:jn,tooltips:On,navigation:Tn,actions:Dn,status:Rn,time:In,messages:En,version:Nn,deleteConfirmation:$n,ccConnect:Mn},Vn={copy:"复制",copied:"已复制",copyCode:"复制代码"},Hn={user:"U",error:"错误",tool:"工具",claude:"Claude",codex:"Codex",opencode:"OpenCode",gemini:"Gemini"},Bn={settings:"工具设置",error:"工具错误",result:"工具结果",viewParams:"查看输入参数",viewRawParams:"查看原始参数",viewDiff:"查看编辑差异",creatingFile:"创建新文件:",updatingTodo:"更新待办事项",read:"读取",readFile:"读取文件",updateTodo:"更新待办列表",readTodo:"读取待办列表",searchResults:"结果"},Kn={found:"找到 {{count}} 个{{type}}",file:"文件",files:"文件",pattern:"模式:",in:"在:"},qn={updated:"文件更新成功",created:"文件创建成功",written:"文件写入成功",diff:"差异",newFile:"新文件",viewContent:"查看文件内容",viewFullOutput:"查看完整输出({{count}} 个字符)",contentDisplayed:"文件内容显示在上面的差异视图中"},Wn={title:"交互式提示",waiting:"等待您在 CLI 中响应",instruction:"请在 Claude 运行的终端中选择一个选项。",selectedOption:"✓ Claude 选择了选项 {{number}}",instructionDetail:"在 CLI 中,您可以使用方向键或输入数字来交互式地选择此选项。"},zn={title:"思考中...",emoji:"💭 思考中..."},Gn={response:"JSON 响应"},Qn={grant:"授予 {{tool}} 权限",added:"权限已添加",addTo:"将 {{entry}} 添加到允许的工具。",retry:"权限已保存。重试请求以使用该工具。",error:"无法更新权限。请重试。",openSettings:"打开设置"},_n={updated:"待办列表已成功更新",current:"当前待办列表"},Jn={viewPlan:"📋 查看实施计划",title:"实施计划"},Yn={resetAt:"Claude 使用限制已达到。您的限制将在 **{{time}} {{timezone}}** - {{date}} 重置"},Zn={permissionMode:"权限模式",modes:{default:"默认模式",acceptEdits:"编辑模式",bypassPermissions:"无限制模式",plan:"计划模式"},descriptions:{default:"工作区内的所有命令都会自动运行,适合代码修改任务。",acceptEdits:"工作区内的所有命令自动运行。完全自动模式,具有沙盒执行功能。",bypassPermissions:"完全的系统访问,无限制。所有命令自动运行,具有完整的磁盘和网络访问权限。请谨慎使用。",plan:"计划模式 - 不执行任何命令"},technicalDetails:"技术细节"},Xn={placeholder:"输入 / 调用命令,@ 选择文件,或向 {{provider}} 提问...",placeholderDefault:"输入您的消息...",providerNotInstalled:"供应商未安装",providerNotInstalledWithName:"{{provider}} 未安装",recheckInstallation:"重新检查安装状态",checkingInstallation:"检查中...",loadingModels:"正在加载模型...",disabled:"输入已禁用",attachFiles:"附加文件",attachImages:"附加图片",send:"发送",stop:"停止",hintText:{ctrlEnter:"Ctrl+Enter 发送 • Shift+Enter 换行 • Tab 切换模式 • / 斜杠命令",enter:"Enter 发送 • Shift+Enter 换行 • Tab 切换模式 • / 斜杠命令"},clickToChangeMode:"点击更改权限模式(或在输入框中按 Tab)",showAllCommands:"显示所有命令",dynamicContext:{systemChip:"系统上下文",removeSystem:"移除系统上下文",removeCurrentFile:"移除当前文件",removeElement:"移除选中元素",elementFallback:"元素"}},ei={selector:{title:"思考模式",description:"扩展思考给模型更多时间来评估替代方案",active:"激活",tip:"更高的思考模式需要更多时间,但提供更彻底的分析"},modes:{none:{name:"标准",description:"常规响应",prefix:""},think:{name:"思考",description:"基本扩展思考",prefix:"思考"},thinkHard:{name:"深入思考",description:"更彻底的评估",prefix:"深入思考"},thinkHarder:{name:"更深入思考",description:"考虑替代方案的深度分析",prefix:"更深入思考"},ultrathink:{name:"超级思考",description:"最大思考预算",prefix:"超级思考"}},buttonTitle:"思考模式:{{mode}}"},ti={title:"选择你的 AI 助手",description:"需提前安装对应的软件",selectModel:"选择模型",providerInfo:{anthropic:"Anthropic",openai:"OpenAI",google:"Google",cursorEditor:"AI 代码编辑器"},readyPrompt:{claude:"已准备好使用 Claude {{model}}。在下方输入您的消息。",codex:"已准备好使用 Codex {{model}}。在下方输入您的消息。",opencode:"已准备好使用 OpenCode {{model}}。在下方输入您的消息。",gemini:"已准备好使用 Gemini {{model}}。在下方输入您的消息。",default:"请在上方选择一个供应商以开始"}},si={continue:{title:"继续您的对话",description:"询问有关代码的问题、请求更改或获取开发任务的帮助"},loading:{olderMessages:"正在加载更早的消息...",sessionMessages:"正在加载会话消息...",waitingForFirstReply:"正在等待第一条回复..."},messages:{showingOf:"显示 {{shown}} / {{total}} 条消息",scrollToLoad:"向上滚动以加载更多",showingLast:"显示最近 {{count}} 条消息(共 {{total}} 条)",loadEarlier:"加载更早的消息"}},ni={selectProject:{title:"选择项目",description:"选择一个项目以在该目录中打开交互式 Shell"},status:{newSession:"新会话",initializing:"初始化中...",restarting:"重启中..."},actions:{disconnect:"断开连接",disconnectTitle:"断开 Shell 连接",restart:"重启",restartTitle:"重启 Shell(请先断开连接)",connect:"在 Shell 中继续",connectTitle:"连接到 Shell"},loading:"正在加载终端...",connecting:"正在连接到 Shell...",startSession:"启动新的 Claude 会话",resumeSession:"恢复会话:{{displayName}}...",runCommand:"在 {{projectName}} 中运行 {{command}}",startCli:"在 {{projectName}} 中启动 Claude CLI",defaultCommand:"命令"},ii={actions:{runCommand:"执行命令",commandPending:"等待生成命令",searchContent:"搜索内容",searchPending:"等待检索参数",readFile:"读取文件",readPending:"等待文件路径",updateFile:"修改文件",createFile:"创建文件",filePending:"等待文件路径",updateTodo:"更新待办",readTodo:"读取待办",todoSummary:"同步当前待办状态",generatePlan:"生成计划",planSummary:"整理实施计划",runTool:"执行工具"},status:{running:"执行中",completed:"已完成",failed:"执行失败"},labels:{file:"文件",command:"命令",output:"输出",input:"输入参数",matchedFiles:"命中文件"},stage:{thinking:"思考中",searching:"检索中",runningCommand:"执行命令",editingFile:"修改文件",readingFile:"读取文件",updatingTodo:"更新待办",waitingPermission:"等待授权",generatingReply:"生成回复",toolFailed:"工具执行失败",working:"处理中"},detail:{preparingReply:"正在准备回复内容",executing:"正在同步最新执行进度"},requestTool:"请求执行工具:{{tool}}",permission:{title:"请求执行工具",rule:"授权规则:",viewInput:"查看工具输入",allowOnce:"本次允许",remember:"始终允许",rememberSaved:"始终允许(已保存)",deny:"拒绝",deniedMessage:"用户拒绝本次工具执行"}},oi={codeBlock:Vn,messageTypes:Hn,tools:Bn,search:Kn,fileOperations:qn,interactive:Wn,thinking:zn,json:Gn,permissions:Qn,todo:_n,plan:Jn,usageLimit:Yn,codex:Zn,input:Xn,thinkingMode:ei,providerSelection:ti,session:si,shell:ni,activity:ii},ai=[{value:"en",label:"English",nativeName:"English"},{value:"zh-CN",label:"Simplified Chinese",nativeName:"简体中文"}],Y="zh-CN",Ve=o=>{typeof document<"u"&&(document.documentElement.lang=o||Y)},ri=()=>{try{const o=localStorage.getItem("userLanguage");return o&&ai.some(e=>e.value===o)?o:Y}catch{return Y}};m.use(Ue).use(bt).init({resources:{en:{common:Jt,settings:gs,sidebar:As,chat:Gs},"zh-CN":{common:ln,settings:Ln,sidebar:Un,chat:oi}},lng:ri(),fallbackLng:Y,debug:!1,ns:["common","settings","sidebar","chat"],defaultNS:"common",keySeparator:".",nsSeparator:":",saveMissing:!1,interpolation:{escapeValue:!1},react:{useSuspense:!0,bindI18n:"languageChanged",bindI18nStore:!1},detection:{order:["localStorage"],lookupLocalStorage:"userLanguage",caches:["localStorage"]}});Ve(m.language);m.on("languageChanged",o=>{try{Ve(o),localStorage.setItem("userLanguage",o)}catch(e){console.error("Failed to save language preference:",e)}});async function He(){const o=[];"serviceWorker"in navigator&&o.push(navigator.serviceWorker.getRegistrations().then(e=>Promise.all(e.map(t=>t.unregister()))).catch(e=>{console.warn("Failed to unregister service workers:",e)})),"caches"in window&&o.push(caches.keys().then(e=>Promise.all(e.map(t=>caches.delete(t)))).catch(e=>{console.warn("Failed to clear caches:",e)})),await Promise.all(o)}const se=window.__ROUTER_BASENAME__||"",Oe=window.location.pathname,li=se.endsWith("/")?se.slice(0,-1):se,ci=`${li}/review`,di=Oe===ci||Oe==="/review";async function ui(){await He();const e=(di?await ue(()=>import("./ReviewApp-0srHIXwb.js"),__vite__mapDeps([0,1,2,3])):await ue(()=>import("./App-CYCCsgwf.js"),__vite__mapDeps([4,1,2,3,5,6]))).default;De.createRoot(document.getElementById("root")).render(R.jsx(Te.StrictMode,{children:R.jsx(e,{})}))}ui().catch(o=>{console.error("Failed to bootstrap application:",o);const e=o instanceof TypeError&&String(o.message||"").includes("Failed to fetch dynamically imported module"),t=async()=>{try{await He()}finally{window.location.reload()}};De.createRoot(document.getElementById("root")).render(R.jsx(Te.StrictMode,{children:R.jsxs("div",{style:{padding:24,fontFamily:"system-ui, sans-serif"},children:[R.jsx("h1",{style:{margin:0,fontSize:24},children:"Application failed to load"}),R.jsx("pre",{style:{marginTop:16,whiteSpace:"pre-wrap"},children:String(o)}),e&&R.jsx("button",{onClick:t,style:{marginTop:16,border:0,borderRadius:8,background:"#111827",color:"#fff",cursor:"pointer",fontSize:14,padding:"10px 14px"},children:"Clear cached app files and reload"})]})}))});export{ue as _,gi as a,fi as g,m as i,ai as l};