memory-eternal 0.18.2 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -3,17 +3,18 @@ window.__ModuleLoader__.load({
3
3
  factory: (require) => {
4
4
  var module = { exports: {} };
5
5
  var exports = module.exports;
6
- var ja=Object.create;var Gt=Object.defineProperty;var Pa=Object.getOwnPropertyDescriptor;var Fa=Object.getOwnPropertyNames;var Ha=Object.getPrototypeOf,Ea=Object.prototype.hasOwnProperty;var Oa=(t,a)=>{for(var i in a)Gt(t,i,{get:a[i],enumerable:!0})},pa=(t,a,i,g)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of Fa(a))!Ea.call(t,d)&&d!==i&&Gt(t,d,{get:()=>a[d],enumerable:!(g=Pa(a,d))||g.enumerable});return t};var Wa=(t,a,i)=>(i=t!=null?ja(Ha(t)):{},pa(a||!t||!t.__esModule?Gt(i,"default",{value:t,enumerable:!0}):i,t)),_a=t=>pa(Gt({},"__esModule",{value:!0}),t);var In={};Oa(In,{EN:()=>Ta,MemoryLibrary:()=>fn,ZH:()=>Ma,apply:()=>on,inject:()=>tn});module.exports=_a(In);var n=Wa(require("react"),1),Na=require("react-dom");var $a={"&":"&amp;","<":"&lt;",">":"&gt;"},Xt=t=>String(t).replace(/[&<>]/g,a=>$a[a]),Ua=[[/结论|总结|tl;?dr|summary|takeaway/i,"\u2705","ok"],[/风险|注意|警告|禁止|坑|踩坑|务必/i,"\u26A0\uFE0F","warn"],[/根因|原因|为什么|定位|复现/i,"\u{1F50D}","info"],[/修复|解决|变更|fix/i,"\u{1F527}","ok"],[/验证|测试|实测|回归/i,"\u{1F9EA}","ok"],[/方案|做法|实现|设计|思路|架构/i,"\u{1F6E0}\uFE0F","plan"],[/步骤|流程|操作|用法|命令/i,"\u{1F9E9}","plan"],[/背景|由来|context/i,"\u{1F9ED}","info"],[/目标|需求|要解决/i,"\u{1F3AF}","plan"],[/环境|依赖|前置|安装/i,"\u{1F4E6}","info"],[/收益|效果|性能|指标|数据|统计/i,"\u{1F4C8}","ok"],[/示例|例子|样例|demo/i,"\u{1F4A1}","idea"],[/参考|链接|相关/i,"\u{1F517}","info"]],Ga=["\u2728","info"],Ka=[[/风险|注意|警告|禁止|坑|务必/i,"\u26A0\uFE0F","warn"],[/提示|建议|tip|best practice/i,"\u{1F4A1}","idea"],[/结论|总结/i,"\u2705","ok"],[/错误|失败|报错/i,"\u2757","bad"]],Va=t=>{let a=String(t);for(let[i,g,d]of Ua)if(i.test(a))return[g,d];return Ga},qa=t=>{let a=t.join(" ");for(let[i,g,d]of Ka)if(i.test(a))return[g,d];return["\u{1F4CC}","info"]};function Bt(t){let a=String(t),i=/^([^::\s]{1,8})[::]\s*(.+)$/.exec(a);if(i&&!/[是为有了吗呢着过把被和与或于]/.test(i[1]))return'<span class="md-kv"><span class="md-k">'+Xt(i[1])+'</span><span class="md-v">'+Bt(i[2])+"</span></span>";let g=Xt(a);return g=g.replace(/^\[([ xX])\](?=\s|$)\s*/,(d,s)=>'<span class="md-task">'+(s.toLowerCase()==="x"?"\u2611":"\u2610")+"</span> "),g=g.replace(/`([^`\n]+)`/g,'<code class="md-code">$1</code>'),g=g.replace(/\*\*([^*]+)\*\*/g,'<strong class="md-b">$1</strong>'),g=g.replace(/(^|[^*])\*([^*\n]+)\*/g,"$1<em>$2</em>"),g=g.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(d,s,v)=>/^(https?:|\/|#)/i.test(v)?'<a class="md-link" href="'+v+'" target="_blank" rel="noopener noreferrer">'+s+"</a>":s),g}function Kt(t){let a=String(t||"").replace(/\r\n?/g,`
7
- `),i=/^---\n([\s\S]*?)\n---\n?/.exec(a);if(!i)return{meta:[],body:a};let g=[];for(let d of i[1].split(`
8
- `)){let s=d.indexOf(":");if(s<=0)continue;let v=d.slice(0,s).trim(),w=d.slice(s+1).trim().replace(/^["']|["']$/g,"");v&&g.push([v,w])}return{meta:g,body:a.slice(i[0].length)}}function ma(t){let a=String(t||"").trim().replace(/^\[|\]$/g,"");return a?a.split(",").map(i=>i.trim().replace(/^["']|["']$/g,"")).filter(Boolean):[]}function Zt(t){let a=Kt(String(t||"").replace(/\r\n?/g,`
9
- `)).body;if(!a.trim())return"";let i=[],g=a.replace(/```([\w+#.-]*)\n([\s\S]*?)```/g,(T,B,E)=>(i.push('<pre class="md-pre"><code>'+Xt(E.replace(/\n$/,""))+"</code></pre>"),"\0F"+(i.length-1)+"\0")),d=[],s=0,v=[],w=null,y=null,F=()=>{v.length&&(d.push('<p class="md-p">'+v.join("<br/>")+"</p>"),v=[])},N=()=>{if(!w)return;let T=w.type;d.push("<"+T+' class="md-'+T+'">'+w.items.map(B=>"<li>"+B+"</li>").join("")+"</"+T+">"),w=null},k=()=>{if(!y)return;let[T,B]=qa(y);d.push('<div class="md-callout md-c-'+B+'"><span class="md-ico">'+T+"</span>"+y.join("<br/>")+"</div>"),y=null},h=()=>{F(),N(),k()};for(let T of g.split(`
10
- `)){let B=T.trim();if(!B){h();continue}let E=/^\u0000F(\d+)\u0000$/.exec(B);if(E){h(),d.push(i[Number(E[1])]);continue}let z;if(z=/^(#{1,6})\s+(.+)$/.exec(B)){h();let[D,R]=Va(z[2]);s++,d.push('<div id="md-h-'+s+'" class="md-h md-h-'+(z[1].length<=2?"h1":"h2")+" md-c-"+R+'"><span class="md-ico">'+D+'</span><span class="md-hx">'+Bt(z[2])+"</span></div>");continue}if(/^(-{3,}|\*{3,}|_{3,})$/.test(B)){h(),d.push('<hr class="md-hr"/>');continue}if(z=/^>\s?(.*)$/.exec(B)){F(),N(),y=y||[],y.push(Bt(z[1]));continue}if(z=/^[-*+]\s+(.+)$/.exec(B)){F(),k(),(!w||w.type!=="ul")&&(N(),w={type:"ul",items:[]}),w.items.push(Bt(z[1]));continue}if(z=/^\d+[.)]\s+(.+)$/.exec(B)){F(),k(),(!w||w.type!=="ol")&&(N(),w={type:"ol",items:[]}),w.items.push(Bt(z[1]));continue}N(),k(),v.push(Bt(B))}return h(),d.join(`
11
- `)}var Vt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAABccElEQVR4nO19B3hcxdX2e+buriR3cAndFIPtXbmq7cpFphhMTUiQvzTSCSEkBMiXAAFiTAgtDUghBL4vyUcC/BaEhGowxXLRSrJkY1taGzDVtLiAu6TdvXP+59xdOStZsnW3S7vv8zjE17szd2fec2bmzClAHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555NGfQJl+gTySi5erqhzO0LaxHFSczHbJpSnkHPXOqbW14WS2m0dm4chw/3kkGYM7ts9QCs9op05quwqAq2P7OQBqk9pwHhlFXgEMIDBAryg6vZ25iJK8uzMZXKjodAaWkdVVHgMBotjzGChYAApBVyVb+AXSprQtfSS77Twyh7wCGEBYunTKMK0xPVXtS9vSR6razyP9yCuAAYTC9o4yJgxOVfvStvSRqvbzSD/yCmAAwUnGrIHQRx7pQ14BDByQSfCl4vy/v4NoH/nr44GDvAIYIHjX6y0kQsq359KH9JXqfvJID/IKYIDgQ9pZqRkpN9BJH9JXqvvJIz3IK4AE8HLV2MInSkoGIQvu/4loTpq25lZfnJ6+DgoZe5mDTL9Hf0ZeAcQBIX+Db9LsocGhS8cUtP2jpco9JAte6vQB2VcvkDGXsZc5kLnIBoXUH5EfNBsQkq2YOekEV1gvZPDnQWR5UhLw7PatHRees2lTBzKAOq/7cIPoDQZGpKM/AnaYzCdV1gc+RgbwzLhxBSNHFzzOwNnWA+YwgR4JOtSCmSvWv5X3VOw78juAvoFWVI4fuqrSc53LNNdpwpc6hV/AwLzRYwrvX+R2u5ABpcTE04DUn/9jMEz6zMSqK2MsYy1jvv8hkUPmROZG5kjmKr+49Q15BXAINJWUOBsrPBc62LlGM25h0OAertrIZP7yCSPUAy3V6VcCCmq2TqMwSl/SJ9IMGVsZYxnr7gIucyJzI3MkcyVzJnOX7nfsb8grgF4gq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+ds6Sj6bCaFP+alXhyQffUCGXMZe5kDmYu88MeH/A5ggKDBN/F0hlqShjllgp5b4d+QcSWQR+LI7wAGCI7k4XWKsCvV/Ugf0leq+8kjPcgrgAECq6gpY1Wq+5E+pK9U95NHepBXAAMHbDD8qUxCapVMY/izqCRZHgkirwAGEEJsLh8IfeSRPuQVwABCe2HBKmLsTVX70rb0kar280g/8gpgAGHOnLW7lMLqVLUvbUsfqWo/j/QjrwAGEhaCnVC1qbADSJvStvSR7LbzyBzy0YADCOIM06j5RafCDxOsenQAFAEhzS/mHW4GFvIKYIBhb8HIlc7QtskcUklVAeTSFCoY+U4y28wjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgDtvD/AXvCXhuljgbyAAAAAElFTkSuQmCC";function ua(t,a,i=48){if(!a||!t)return"";let g=String(t),d=g.toLowerCase(),s=String(a).toLowerCase();if(!s)return"";let v=d.indexOf(s);if(v<0)return"";let w=Math.max(0,v-i),y=Math.min(g.length,v+s.length+i),F=g.slice(w,y).replace(/\s+/g," ").trim();return(w>0?"\u2026":"")+F+(y<g.length?"\u2026":"")}function ga({hasVersion:t=!1,hostVersion:a="",onDisk:i="",residentServed:g="",residentPresent:d=!1,residentManaged:s=null,residentManagedKnown:v=null,residentManagedBy:w="",replaceBlocked:y=null}={}){let F=String(i||""),N=String(a||""),k=String(g||""),h=!!(t&&d&&!k),T=!!(F&&k&&k!==F),B=s===!1&&v===!1,E=w==="host",z=s===!1&&!B&&!E,D=!!(N&&F&&N!==F),R=!!(y&&y.fresh),de=T||h||z||B,ie=null;D?ie="hostProcessStale":h?ie="residentDown":R?ie="residentReplaceBlocked":B?ie="residentLockUnknown":z&&(ie="residentUnmanaged");let q;return h?q="restartStart":T?q="restartFixes":z||B?q="restartRepair":D?q="restartHostOnly":q="restartAnyway",{showButton:!!t,emphasis:de,warn:ie,hint:q,hostStale:D,residentDown:h,residentStale:T,residentUnmanaged:z,residentLockUnknown:B,residentHostManaged:E,needsRestart:de}}function fa(t={}){let a=t.repo||"EternalNight996/memory-eternal",i=String(t.title||"[Bug] ").slice(0,120),g=Array.isArray(t.labels)?t.labels:["bug"],d=Number(t.maxLength)>500?Number(t.maxLength):7e3,s=y=>{let F=new URLSearchParams;return F.set("title",i),F.set("body",y),g.length&&F.set("labels",g.join(",")),"https://github.com/"+a+"/issues/new?"+F.toString()},v=String(t.body||""),w=s(v);if(w.length>d){let y=`
12
-
13
- > \u5185\u5BB9\u8FC7\u957F\u5DF2\u622A\u65AD\uFF1A\u5B8C\u6574\u8BCA\u65AD\u8BF7\u5728\u63D2\u4EF6\u91CC\u70B9\u300C\u590D\u5236\u8BCA\u65AD\u4FE1\u606F\u300D\uFF0C\u518D\u8865\u5230 issue \u8BC4\u8BBA\u91CC\u3002`,F=N=>s(v.slice(0,N)+y);if(F(0).length>d)v=y;else{let N=0,k=v.length;for(;N<k;){let h=Math.ceil((N+k)/2);F(h).length<=d?N=h:k=h-1}v=v.slice(0,N)+y}w=s(v)}return w}function ba(t={}){return["## \u73B0\u8C61",String(t.description||"").trim()||"\uFF08\u8BF7\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF09","","## \u590D\u73B0\u6B65\u9AA4","1. ","2. ","","## \u671F\u671B\u884C\u4E3A","","## \u5B9E\u9645\u884C\u4E3A","","## \u73AF\u5883","- \u63D2\u4EF6\u7248\u672C: "+(t.version||"\uFF08\u89C1\u8BCA\u65AD\u4FE1\u606F\uFF09"),"",t.diagnostics||"","","---","> \u7531 memory-eternal \u63D2\u4EF6\u5185\u300C\u53CD\u9988\u5F02\u5E38\u300D\u751F\u6210\uFF08\u8BCA\u65AD\u4FE1\u606F\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E\u5404\u7C7B key/token \u5DF2\u66FF\u6362\uFF09\u3002"].join(`
14
- `)}var Qt="https://github.com/EternalNight996/memory-eternal",Ja=["\u6211\u5728\u4F7F\u7528 memory-eternal\uFF08DeepSeek Harness \u7684\u8BB0\u5FC6\u63D2\u4EF6\uFF09\u65F6\u9047\u5230\u4E86\u95EE\u9898\uFF0C\u8BF7\u4F60\u5E2E\u6211\u628A\u8FD9\u4E2A\u95EE\u9898\u63D0\u4EA4\u5230 GitHub\u3002","","\u4ED3\u5E93\uFF1A"+Qt,"","\u8BF7\u6309\u8FD9\u4E2A\u6D41\u7A0B\u505A\uFF1A","","1. \u5148\u8DD1 `gh issue list --repo EternalNight996/memory-eternal --state open --limit 50`\uFF0C\u770B\u662F\u5426\u5DF2\u6709\u76F8\u540C\u95EE\u9898\uFF1A"," - \u5DF2\u6709 \u2192 \u7528 `gh issue comment <\u7F16\u53F7> --body-file <\u6587\u4EF6>` \u8865\u5145\u73B0\u8C61\uFF0C\u4E0D\u8981\u91CD\u590D\u5F00\u65B0 issue\uFF1B"," - \u6CA1\u6709 \u2192 \u7EE7\u7EED\u7B2C 2 \u6B65\u3002",'2. \u628A\u6B63\u6587\u5199\u6210\u6587\u4EF6\uFF0C\u7136\u540E `gh issue create --repo EternalNight996/memory-eternal --title "[Bug] <\u4E00\u53E5\u8BDD\u6982\u62EC>" --body-file <\u6587\u4EF6>`\uFF1B\u6B63\u6587\u7528\u8FD9\u4E2A\u7ED3\u6784\uFF1A'," \u73B0\u8C61 / \u590D\u73B0\u6B65\u9AA4 / \u671F\u671B\u884C\u4E3A / \u5B9E\u9645\u884C\u4E3A / \u73AF\u5883\uFF08\u63D2\u4EF6\u7248\u672C / DSH \u7248\u672C / \u64CD\u4F5C\u7CFB\u7EDF / Node\uFF09/ \u8BCA\u65AD\u4FE1\u606F\u3002","3. \u5982\u679C `gh` \u6CA1\u767B\u5F55\u6216\u4E0D\u53EF\u7528\uFF0C\u4E0D\u8981\u5C1D\u8BD5\u63D0\u4EA4\uFF0C\u6539\u4E3A\u8F93\u51FA\u4E00\u6761\u300C\u6807\u9898\u4E0E\u6B63\u6587\u90FD\u5DF2\u9884\u586B\u300D\u7684 GitHub \u65B0\u5EFA issue \u94FE\u63A5\u7ED9\u6211\uFF0C\u6211\u81EA\u5DF1\u70B9\u63D0\u4EA4\u3002","4. \u63D0\u4EA4\u6210\u529F\u540E\uFF0C\u628A issue \u94FE\u63A5\u53D1\u7ED9\u6211\u3002","","\u6CE8\u610F\uFF1A\u6211\u7684\u95EE\u9898\u63CF\u8FF0\u8BF7\u539F\u6837\u7167\u5F55\uFF0C\u4E0D\u8981\u66FF\u6211\u7F8E\u5316\u6216\u7701\u7565\u7EC6\u8282\uFF1B\u8BCA\u65AD\u4FE1\u606F\u539F\u6837\u653E\u8FDB\u300C\u8BCA\u65AD\u4FE1\u606F\u300D\u4E00\u8282\u3002","","\u6211\u7684\u95EE\u9898\u63CF\u8FF0\uFF1A","<\u5728\u8FD9\u91CC\u5199\u4F60\u7684\u95EE\u9898>","","\u8BCA\u65AD\u4FE1\u606F\uFF1A","<\u628A\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5F39\u7A97\u91CC\u590D\u5236\u7684\u8BCA\u65AD\u4FE1\u606F\u7C98\u5230\u8FD9\u91CC>"].join(`
15
- `),Xa=["I hit a problem while using memory-eternal (a DeepSeek Harness memory plugin). Please file it on GitHub for me.","","Repo: "+Qt,"","Workflow:","","1. Run `gh issue list --repo EternalNight996/memory-eternal --state open --limit 50` first: if a matching issue exists, add a comment with `gh issue comment <n> --body-file <file>` instead of opening a duplicate.",'2. Otherwise create it with `gh issue create --repo EternalNight996/memory-eternal --title "[Bug] <one-line summary>" --body-file <file>`, using sections: Symptoms / Steps to reproduce / Expected / Actual / Environment (plugin, DSH, OS, Node) / Diagnostics.',"3. If `gh` is not authenticated or unavailable, do NOT try to submit: output a GitHub new-issue link with the title and body pre-filled instead, and I will click submit myself.","4. Report the resulting issue URL back to me.","","Keep my description verbatim - do not rewrite or summarise it. Put the diagnostics under the Diagnostics section as-is.","","My description:","<write your problem here>","","Diagnostics:","<paste the diagnostics copied from the in-app Report-a-bug dialog>"].join(`
16
- `);function ha(t={}){let a=t.lang==="en"?"en":"zh",i=a==="en"?Xa:Ja,g=t.repo||"EternalNight996/memory-eternal";return i=i.split(Qt).join("https://github.com/"+g),t.description&&(i=i.replace(a==="en"?"<write your problem here>":"<\u5728\u8FD9\u91CC\u5199\u4F60\u7684\u95EE\u9898>",String(t.description).trim())),t.diagnostics&&(i=i.replace(a==="en"?"<paste the diagnostics copied from the in-app Report-a-bug dialog>":"<\u628A\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5F39\u7A97\u91CC\u590D\u5236\u7684\u8BCA\u65AD\u4FE1\u606F\u7C98\u5230\u8FD9\u91CC>",String(t.diagnostics).trim())),i}function ya({panX:t=0,panY:a=0,zoom:i=1,w:g=0,h:d=0,margin:s=60}={}){let v=i||1;return{x0:(0-t)/v-s,y0:(0-a)/v-s,x1:(g-t)/v+s,y1:(d-a)/v+s}}function qt(t,a,i,g){return g?t+i>=g.x0&&t-i<=g.x1&&a+i>=g.y0&&a-i<=g.y1:!0}function va(t){let a=Number(t)||0;return a<=120?1/0:a<=300?160:a<=600?90:60}function xa(t,a={}){let i=Number.isFinite(a.limit)?a.limit:1/0,g=new Set,d=y=>{y&&g.size<i&&g.add(y)};if(d(a.focusId),d(a.hoverId),a.searchHits)for(let y of a.searchHits){if(g.size>=i)break;g.add(y)}let s=a.degree||{},v=y=>Number(s[y])||0,w=[];for(let y of Array.isArray(t)?t:[])y&&y.id&&!g.has(y.id)&&w.push(y);w.sort((y,F)=>v(F.id)-v(y.id));for(let y of w){if(g.size>=i)break;g.add(y.id)}return g}function wa(t){let a=Math.floor(Number(t)||0);return a<=0?0:a>1200?48:a>700?60:a>300?110:200}function Za(t,a){if(t===a)return!0;if(t===null||a===null||t===void 0||a===void 0||typeof t!="object"&&typeof a!="object")return t===a;try{return JSON.stringify(t)===JSON.stringify(a)}catch{return!1}}function ka(t,a){let i={...t||{}},g={};for(let[d,s]of Object.entries(a||{}))Za(t?t[d]:void 0,s)||(i[d]=s,g[d]=s);return{values:i,overlay:g}}var e=require("react/jsx-runtime"),jt="memory-eternal",$="/memory-eternal/api";async function na(t){try{let a=await fetch(`${$}/open-external?url=${encodeURIComponent(t)}`,{method:"POST"}),i=await a.json().catch(()=>null);if(a.ok&&i&&i.ok)return!0}catch{}try{if(window.open(t,"_blank","noopener,noreferrer"))return!0}catch{}try{let a=document.createElement("a");return a.href=t,a.target="_blank",a.rel="noopener noreferrer",a.click(),!0}catch{}return!1}var en=100,tn=["slots","locale"],Ma={nav:"\u8BB0\u5FC6",loading:"\u52A0\u8F7D\u4E2D\u2026",loadingGraph:"\u6B63\u5728\u52A0\u8F7D\u77E5\u8BC6\u661F\u56FE\u2026",refresh:"\u5237\u65B0",overview:"\u8BB0\u5FC6\u5E93\u6982\u89C8",total:"\u77E5\u8BC6\u5361",recent:"\u8FD1 7 \u5929\u65B0\u589E",tags:"\u6807\u7B7E",searchPlaceholder:"\u641C\u7D22\u8BB0\u5FC6\uFF08\u652F\u6301\u4E2D\u6587\u7247\u6BB5\uFF09\u2026",search:"\u641C\u7D22",all:"\u5168\u90E8",kindProject:"\u9879\u76EE",kindKnowledge:"\u77E5\u8BC6",kindContent:"\u5185\u5BB9",kindPrompt:"\u63D0\u793A\u8BCD",kindBusiness:"\u4E1A\u52A1",kindTool:"\u5DE5\u5177",kindMistake:"\u6559\u8BAD",kindCore:"\u6838\u5FC3\u8BB0\u5FC6",cardsTab:"\u77E5\u8BC6\u5361",webTab:"Web \u7248",webOpening:"\u6B63\u5728\u7528\u9ED8\u8BA4\u6D4F\u89C8\u5668\u6253\u5F00 Web \u7248\u2026",webOpened:"\u5DF2\u7528\u9ED8\u8BA4\u6D4F\u89C8\u5668\u6253\u5F00 Web \u7248",webOpenFail:"\u6253\u5F00\u6D4F\u89C8\u5668\u5931\u8D25\uFF0C\u53EF\u624B\u52A8\u8BBF\u95EE",terminalTab:"\u7EC8\u7AEF\u7248",terminalTitle:"\u7EC8\u7AEF\u5B8C\u6574\u7248",terminalIntro:"Web UI \u4E0D\u6E32\u67D3\u7EC8\u7AEF\u539F\u751F TUI\u3002\u8981\u5B8C\u6574\u6279\u5361\u3001\u957F\u6587\u6EDA\u52A8\u548C\u5168\u9009\uFF0C\u8BF7\u6253\u5F00\u672C\u673A\u7EC8\u7AEF\uFF1B\u6216\u8005\u76F4\u63A5\u5728 dsh-tui \u91CC\u7528 /audit\u3002",terminalRun:"\u53EA\u8BFB\u4F53\u9A8C\uFF08\u771F\u5B9E\u961F\u5217\uFF09",terminalTui:"\u5199\u5165\u6A21\u5F0F\uFF08\u771F\u5B9E\u6279\u9A73\uFF09",terminalWhy:"\u4E3A\u4EC0\u4E48\u4E0D\u76F4\u63A5\u5D4C\u8FDB\u7F51\u9875",terminalWhyBody:"\u7EC8\u7AEF TUI \u4F9D\u8D56 alternate screen\u3001\u539F\u59CB\u952E\u76D8\u4E8B\u4EF6\u548C\u5B57\u7B26\u7F51\u683C\uFF0C\u65E0\u6CD5\u7528 iframe \u5FE0\u5B9E\u5D4C\u5165\u3002\u8FD9\u91CC\u7ED9\u51FA\u771F\u5B9E\u547D\u4EE4\uFF0C\u6253\u5F00\u540E\u5C31\u662F\u540C\u4E00\u5957\u754C\u9762\u3002",terminalCopy:"\u590D\u5236\u547D\u4EE4",terminalCopied:"\u5DF2\u590D\u5236",terminalPreview:"\u7EC8\u7AEF\u9884\u89C8",graphTab:"\u77E5\u8BC6\u661F\u56FE",graph:"\u77E5\u8BC6\u56FE\u8C31",graphHint:"\u8282\u70B9=\u77E5\u8BC6\u5361\uFF1B\u8FDE\u7EBF=[[\u94FE\u63A5]] \u6216\u5171\u4EAB\u6807\u7B7E\u3002\u70B9\u51FB\u8282\u70B9\u9605\u8BFB\u5361\u7247\u3002",graphTip:"\u5DE6\u952E\u51F8\u663E \xB7 Shift+\u62D6\u62FD\u6846\u9009 \xB7 \u53F3\u952E\u83DC\u5355 \xB7 \u6EDA\u8F6E\u7F29\u653E \xB7 \u62D6\u62FD\u5E73\u79FB",rebuild:"\u91CD\u5EFA",reset:"\u91CD\u7F6E",expandAll:"\u5168\u90E8\u5C55\u5F00",capped:"\u5DF2\u5C55\u793A\u6700\u6838\u5FC3\u7684",clearFocus:"\u53D6\u6D88\u9AD8\u4EAE",empty:"\u8BB0\u5FC6\u5E93\u8FD8\u662F\u7A7A\u7684\u3002\u591A\u804A\u51E0\u8F6E\u540E\uFF0C\u503C\u5F97\u4FDD\u5B58\u7684\u5185\u5BB9\u4F1A\u81EA\u52A8\u6C89\u6DC0\u6210\u77E5\u8BC6\u5361\u3002",emptyGraph:"\u56FE\u8C31\u6682\u65E0\u6570\u636E\u3002",open:"\u9605\u8BFB",updated:"\u66F4\u65B0\u4E8E",created:"\u521B\u5EFA\u4E8E",source:"\u6765\u6E90",contents:"\u76EE\u5F55",related:"\u76F8\u5173\u8BB0\u5FC6",file:"\u6587\u4EF6",close:"\u5173\u95ED",vaultDir:"\u8BB0\u5FC6\u5E93\u76EE\u5F55",capture:"\u81EA\u52A8\u6C89\u6DC0",recall:"\u81EA\u52A8\u53EC\u56DE",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",error:"\u52A0\u8F7D\u5931\u8D25",back:"\u8FD4\u56DE\u5217\u8868",cardCount:"\u5F20\u5361",nodes:"\u8282\u70B9",edges:"\u8FDE\u7EBF",memoryTitle:"\u8BB0\u5FC6\u5E93",memoryHint:"\u4F60\u7684\u672C\u5730\u7B2C\u4E8C\u5927\u8111",zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",fit:"\u9002\u5E94",enterFullscreen:"\u5168\u5C4F",exitFullscreen:"\u9000\u51FA\u5168\u5C4F",exportGraph:"\u5BFC\u51FA",openCard:"\u6253\u5F00\u5361\u7247",focusNeighbors:"\u51F8\u663E\u5173\u8054",copyName:"\u590D\u5236\u540D\u79F0",noMatch:"\u6CA1\u6709\u5339\u914D\u7684\u8BB0\u5FC6",clearFilter:"\u6E05\u9664\u8FC7\u6EE4",filterLabel:"\u7B5B\u9009",sortRecent:"\u6700\u8FD1",sortTitle:"\u6807\u9898",sortHot:"\u70ED\u70B9",exportSel:"\u5BFC\u51FA\u9009\u4E2D",clearSelection:"\u6E05\u7A7A\u9009\u62E9",download:"\u4E0B\u8F7D",openNewTab:"\u65B0\u6807\u7B7E\u6253\u5F00",copyImage:"\u590D\u5236\u56FE\u7247",done:"\u5B8C\u6210",downloaded:"\u5DF2\u5F00\u59CB\u4E0B\u8F7D",openedTab:"\u5DF2\u5728\u65B0\u6807\u7B7E\u6253\u5F00",copied:"\u5DF2\u590D\u5236",exportedSel:"\u4E2A\u8282\u70B9\u5DF2\u5BFC\u51FA",fullscreen:"\u5168\u5C4F",exitFull:"\u9000\u51FA\u5168\u5C4F",copyFail:"\u590D\u5236\u5931\u8D25",timeDim:"\u65F6\u95F4\u7EF4",graphWarming:"\u6B63\u5728\u5E03\u5C40 {n} \u4E2A\u8282\u70B9\u2026",timeNew:"3 \u5929\u5185",timeRecent:"2 \u5468\u5185",timeMonth:"1 \u6708\u5185",timeOld:"\u66F4\u65E9",newBadge:"\u65B0",expand:"\u5C55\u5F00\u5168\u90E8",collapse:"\u6536\u8D77",copyBody:"\u590D\u5236\u6B63\u6587",clearFilter:"\u6E05\u9664\u6807\u7B7E\u7B5B\u9009",copyPath:"\u590D\u5236\u8DEF\u5F84",copied:"\u5DF2\u590D\u5236",copyFail:"\u590D\u5236\u5931\u8D25",readWidth:"\u9605\u8BFB\u5BBD\u5EA6",widthNarrow:"\u7A84",widthMid:"\u4E2D",widthWide:"\u5BBD",exportVault:"\u5BFC\u51FAMD",exportJson:"\u5BFC\u51FAJSON",exporting:"\u5BFC\u51FA\u4E2D\u2026",exportedVault:"\u8BB0\u5FC6\u5E93\u5DF2\u5BFC\u51FA",exportFail:"\u5BFC\u51FA\u5931\u8D25",importVault:"\u5BFC\u5165",importedVault:"\u5BFC\u5165\u5B8C\u6210",importedTotal:" \u5F20 / \u6587\u4EF6\u5171 ",importedTotalTail:" \u5F20",importedQuarantine:" \xB7 \u5F85\u5BA1\u6838 ",importedQuarantineTail:" \u5F20\uFF08\u9694\u79BB\u533A\uFF0C\u6279\u51C6\u540E\u624D\u53C2\u4E0E\u53EC\u56DE\uFF09",importedSkipped:" \xB7 \u8DF3\u8FC7 ",importedSkippedTail:" \u5F20\uFF08\u91CD\u590D\u6216\u7A7A\uFF09",importFail:"\u5BFC\u5165\u5931\u8D25",location:"\u81EA\u9009\u4F4D\u7F6E",saveAs:"\u53E6\u5B58\u4E3A",saveAsUnsupported:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u9009\u62E9\u4FDD\u5B58\u4F4D\u7F6E",exportedTo:"\u5DF2\u5BFC\u51FA\u5230",defaultDownloads:"\u9ED8\u8BA4\u4E0B\u8F7D\u6587\u4EF6\u5939",exportCancel:"\u5DF2\u53D6\u6D88\u5BFC\u51FA",manage:"\u7BA1\u7406",tabUsage:"\u8FD0\u884C\u72B6\u6001",tabOptimize:"\u6574\u7406\u5EFA\u8BAE",adminLoadFail:"\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF1A\u8BF7\u5F7B\u5E95\u91CD\u542F dsh-desktop\uFF08host \u9700\u52A0\u8F7D\u65B0\u7248 /memory-eternal \u8DEF\u7531\uFF09",retry:"\u91CD\u8BD5",mergeSimilar:"\u4E00\u952E\u5408\u5E76\u76F8\u4F3C",trendLabel:"\u8FD1 30 \u5929\u8D8B\u52BF",cleanStale:"\u{1F5D1}\uFE0F \u4E00\u952E\u6E05\u7406\u9648\u65E7",deletedStale:"\u4E2A\u9648\u65E7\u5361\u5DF2\u6E05\u7406",newCard:"\u65B0\u5EFA",tplDecision:"\u{1F4DD} \u6280\u672F\u51B3\u7B56",tplBug:"\u{1F41B} \u8E29\u5751",tplMeeting:"\u{1F4CB} \u4F1A\u8BAE\u7EAA\u8981",tplWeekly:"\u{1F4CA} \u5468\u62A5",createCard:"\u521B\u5EFA",cardTitle:"\u6807\u9898",cardBody:"\u6B63\u6587",fbUseful:"\u6709\u7528",fbIrr:"\u65E0\u5173",todayAdd:"\u4ECA\u65E5\u65B0\u589E",weekAdd:"\u8FD1 7 \u5929",byKind:"\u5206\u7C7B\u7EDF\u8BA1",todayList:"\u4ECA\u65E5\u6C89\u6DC0",budgetLabel:"\u4F1A\u8BDD\u9884\u7B97",budgetChars:"\u9884\u7B97\u5B57\u7B26",recallLimitLabel:"\u53EC\u56DE\u6761\u6570",embeddingLabel:"\u8BED\u4E49\u53EC\u56DE",mergePairs:"\u76F8\u4F3C\u5361\u5BF9\uFF08\u53EF\u5408\u5E76\uFF09",staleCards:"\u9648\u65E7\u5361\uFF08>90 \u5929\u672A\u66F4\u65B0\uFF09",noOptimize:"\u6682\u65E0\u53EF\u6574\u7406\u9879\uFF0C\u5F88\u5065\u5EB7 \u{1F389}",refineTitle:"\u77DB\u76FE\u626B\u63CF",refineScan:"\u5F00\u59CB\u626B\u63CF",refineHint:"\u76F8\u4F3C\u53EF\u4EE5\u5408\u5E76\uFF0C\u77DB\u76FE\u5FC5\u987B\u4EBA\u5224\u65AD \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u9009\u62E9\u540E\u624D\u52A8\u6570\u636E\uFF08\u4FDD\u7559\u4E00\u5F20\u4F1A\u628A\u53E6\u4E00\u5F20\u653E\u8FDB\u56DE\u6536\u7AD9\uFF0C\u53EF\u8FD8\u539F\uFF09",refineIdle:"\u70B9\u300C\u5F00\u59CB\u626B\u63CF\u300D\uFF1A\u5148\u5BBD\u53EC\u56DE\u53EF\u80FD\u6709\u5173\u7CFB\u7684\u5361\u7247\u5BF9\uFF0C\u518D\u8BA9\u6A21\u578B\u5224\u65AD\u662F\u91CD\u590D / \u8865\u5145 / \u77DB\u76FE / \u65E0\u5173",refineNone:"\u8FD9\u4E00\u8F6E\u6CA1\u6709\u53D1\u73B0\u9700\u8981\u4F60\u88C1\u51B3\u7684\u5361\u7247\u5BF9 \u{1F389}",refineFail:"\u77DB\u76FE\u626B\u63CF\u5931\u8D25",refineApplied:"\u5DF2\u8BB0\u5F55\u4F60\u7684\u88C1\u51B3\uFF08\u4E0D\u4F1A\u91CD\u590D\u6253\u6270\uFF09",refineRel_duplicate:"\u91CD\u590D\uFF08\u53EF\u5408\u5E76\uFF09",refineRel_complement:"\u8865\u5145\uFF08\u90FD\u7559\u7740\uFF09",refineRel_conflict:"\u77DB\u76FE\uFF08\u9700\u4F60\u88C1\u51B3\uFF09",refineRel_unrelated:"\u65E0\u5173",refineKeepA:"\u4FDD\u7559 A",refineKeepB:"\u4FDD\u7559 B",refineKeepBoth:"\u90FD\u4FDD\u7559",refineMerge:"\u5408\u5E76",junkTitle:"\u6CE8\u5165\u5783\u573E\u5361",junkScan:"\u626B\u63CF\u5B58\u91CF",junkHint:"\u6000\u7591\u662F\u8FD0\u884C\u65F6\u6CE8\u5165\u6587\u672C\uFF08\u6280\u80FD\u76EE\u5F55 / system-reminder\uFF09\u6C89\u6DC0\u6210\u7684\u5361 \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u56DE\u6536\u8D70\u56DE\u6536\u7AD9\u53EF\u8FD8\u539F",junkIdle:"\u70B9\u300C\u626B\u63CF\u5B58\u91CF\u300D\uFF1A\u627E\u51FA\u6B63\u6587\u5176\u5B9E\u662F\u88AB\u6CE8\u5165\u7684\u8FD0\u884C\u65F6\u6587\u672C\u3001\u5265\u6389\u540E\u51E0\u4E4E\u4E0D\u5269\u4EBA\u8BDD\u7684\u5361",junkNone:"\u6CA1\u53D1\u73B0\u8FD9\u7C7B\u5361 \u{1F389}",junkRecycle:"\u56DE\u6536",junkRecycleAll:"\u5168\u90E8\u56DE\u6536",junkRecycleAllConfirm:"\u786E\u8BA4\u628A\u8FD9\u4E9B\u5361\u9001\u8FDB\u56DE\u6536\u7AD9\uFF1F\uFF08\u4E0D\u662F\u6C38\u4E45\u5220\u9664\uFF0C\u53EF\u5728\u56DE\u6536\u4E2D\u5FC3\u8FD8\u539F\uFF09",junkDone:"\u5DF2\u9001\u56DE\u6536\u7AD9",junkFail:"\u626B\u63CF / \u56DE\u6536\u5931\u8D25",dbReadonlyTitle:"\u8BB0\u5FC6\u5E93\u5F53\u524D\u4E0D\u53EF\u5199",dbReadonlyBody:"\u5361\u7247\u8BFB\u5199 / \u5BA1\u6838 / \u56FE\u8C31\u4F1A\u5931\u8D25\uFF0C\u4F46**\u914D\u7F6E\u4ECD\u53EF\u4FDD\u5B58**\uFF08\u914D\u7F6E\u4E0D\u7ECF\u8FC7\u6570\u636E\u5E93\uFF09",dbReadonlyFix:"\u6392\u67E5\uFF1Adsh-memory doctor\uFF08\u770B journal \u6A21\u5F0F\u3001\u5199\u63A2\u9488\u3001\u5907\u4EFD\u6E05\u5355\u4E0E\u6062\u590D\u6B65\u9AA4\uFF09",goalTitle:"\u540C\u76EE\u6807\u4E0D\u540C\u505A\u6CD5",goalScan:"\u626B\u63CF\u76EE\u6807",goalHint:"\u6309\u300C\u8FD9\u5F20\u5361\u89E3\u51B3\u4EC0\u4E48\u95EE\u9898\u300D\u805A\u7C7B \u2014\u2014 \u6B63\u6587\u76F8\u4F3C\u5EA6\u6293\u4E0D\u5230\u7684\u505A\u6CD5\u5DEE\u5F02\uFF087z \u538B\u7F29 / tar \u5206\u53D1 / npm \u7626\u8EAB\uFF09\u4E5F\u80FD\u5F52\u5230\u4E00\u8D77",goalIdle:"\u70B9\u300C\u626B\u63CF\u76EE\u6807\u300D\uFF1A\u6A21\u578B\u5148\u7ED9\u6BCF\u5F20\u5361\u62BD\u4E00\u53E5\u76EE\u6807\uFF08\u9996\u6B21\u4F1A\u8C03\u6A21\u578B\uFF0C\u4E4B\u540E\u8D70\u7F13\u5B58\uFF09\uFF0C\u518D\u6309\u76EE\u6807\u805A\u7C7B",goalNone:"\u6CA1\u6709\u53D1\u73B0\u300C\u540C\u4E00\u76EE\u6807\u3001\u591A\u5F20\u5361\u300D\u7684\u7C07 \u{1F389}",goalStats:"\u5DF2\u7D22\u5F15 / \u672C\u6B21\u8C03\u7528",goalCards:"\u5F20\u5361",goalKeep:"\u90FD\u4FDD\u7559",goalMerge:"\u5408\u5E76\u8FD9\u4E00\u7EC4",goalMerged:"\u5DF2\u63D0\u4EA4\u5408\u5E76\uFF08\u65B0\u5361\u8FDB\u5BA1\u6838\u961F\u5217\uFF09",goalDone:"\u5DF2\u8BB0\u5F55\u300C\u90FD\u4FDD\u7559\u300D",goalFail:"\u76EE\u6807\u805A\u7C7B\u5931\u8D25",oneClickOptimize:"\u4E00\u952E\u4F18\u5316",oneClickOptimizeConfirm:"\u786E\u8BA4\u4E00\u952E\u4F18\u5316\uFF1F\u5C06\u5408\u5E76\u6240\u6709\u76F8\u4F3C\u5361\u5BF9\uFF08\u9ED8\u8BA4\u4E0D\u6E05\u7406\u9648\u65E7\u5361\uFF09\u3002",oneClickAlsoStale:"\u540C\u65F6\u6E05\u7406\u9648\u65E7\u5361",oneClickOptimizeDone:"\u4E00\u952E\u4F18\u5316\u5B8C\u6210",optimizedMerged:"\u5BF9\u5DF2\u5408\u5E76",optimizedStaleDeleted:"\u5F20\u9648\u65E7\u5361\u5DF2\u6E05\u7406",mcpSetupStatus:"Agent MCP \u6302\u8F7D\u72B6\u6001",rerunSetup:"\u8865\u5168 MCP",notInstalled:"\u672A\u5B89\u88C5",noMcpEntry:"\u914D\u7F6E\u7F3A\u5931",nodePathMismatch:"node \u8DEF\u5F84\u4E0D\u4E00\u81F4\uFF0C\u5EFA\u8BAE\u91CD\u8DD1 setup",nodePathNote:"node \u73AF\u5883\u4E0D\u540C\uFF08\u53EF\u7528\uFF09",mcpNeedsRepair:"\u26A0 \u9700\u4FEE\u590D\uFF08\u65E7\u914D\u7F6E\u4F1A\u62C9\u8D77 GUI\uFF09",repairMcp:"\u4FEE\u590D\u914D\u7F6E",healthy:"\u914D\u7F6E\u6B63\u5E38",mcpSetupHint:"\u300C\u81EA\u52A8\u6302\u8F7D MCP\u300D= \u8BA9 Claude Code / Codex / Cursor \u8FD9\u4E9B\u5DE5\u5177\u80FD\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002\u5F00\u542F\u540E\u81EA\u52A8\u628A\u5B83\u4EEC\u914D\u7F6E\u597D\uFF1B\u5173\u6389\u5C31\u4E0D\u52A8\u4F60\u7535\u8111\u4E0A\u4EFB\u4F55\u914D\u7F6E\u6587\u4EF6\uFF0C\u9700\u8981\u65F6\u624B\u52A8\u8DD1 dsh-memory setup\u3002",mcpManageHint:"\u6BCF\u4E2A agent \u7528\u4E0B\u65B9\u6309\u94AE\u5355\u72EC\u5B89\u88C5/\u5378\u8F7D MCP",tabConfig:"\u8BB0\u5FC6\u914D\u7F6E",configPageSub:"\u5199\u5165\u3001\u8DEF\u7531\u3001\u5BA1\u6838\u4E0E\u670D\u52A1\u7684\u672C\u5730\u914D\u7F6E",tabAudit:"\u5F85\u5BA1",statusApproved:"\u5DF2\u5BA1\u6838",statusPending:"\u5F85\u5BA1\u6838",statusRejected:"\u5DF2\u9A73\u56DE",allStatus:"\u5168\u90E8\u72B6\u6001",tabRecycle:"\u56DE\u6536\u4E2D\u5FC3",recyclePageSub:"\u5DF2\u5220\u9664\u7684\u5361\u4FDD\u7559 30 \u5929\uFF0C\u53EF\u6062\u590D\u6216\u6C38\u4E45\u5220\u9664",pending:"\u5F85\u5BA1\u6838",rejected:"\u5DF2\u9A73\u56DE",selectAll:"\u5168\u9009",approve:"\u6279\u51C6",approveAndCore:"\u6279\u51C6\u5E76\u8BBE\u4E3A\u6838\u5FC3",approveCore:"\u6279\u51C6\u4E3A\u6838\u5FC3\u8BB0\u5FC6",approveAsNormal:"\u6279\u51C6\u4E3A\u666E\u901A\u5361",coreSuggested:"\u6838\u5FC3\u8BB0\u5FC6\uFF08\u5F85\u5BA1\u6838\uFF09",reclassify:"\u91CD\u65B0\u8BC6\u522B\u7C7B\u578B",reject:"\u9A73\u56DE",allAgents:"\u5168\u90E8\u667A\u80FD\u4F53",noAuditItems:"\u6682\u65E0\u5BA1\u6838\u9879\u76EE",auditBodyFail:"\u6B63\u6587\u8BFB\u53D6\u5931\u8D25",deletedAt:"\u5220\u9664\u4E8E",restore:"\u6062\u590D",restoreDelete:"\u5220\u9664\u8FDB\u56DE\u6536\u7AD9",purge:"\u6C38\u4E45\u5220\u9664",emptyRecycle:"\u56DE\u6536\u7AD9\u4E3A\u7A7A",recycleHint:"\u5220\u9664\u7684\u5361\u7247\u5148\u8FDB\u56DE\u6536\u7AD9\uFF0C30 \u5929\u5185\u53EF\u6062\u590D\uFF0C\u8D85\u671F\u81EA\u52A8\u6C38\u4E45\u5220\u9664",purgeConfirm:"\u786E\u5B9A\u6C38\u4E45\u5220\u9664\uFF1F\u4E0D\u53EF\u6062\u590D\u3002",recycleDeleteConfirm:"\u786E\u5B9A\u5220\u9664\u8FDB\u56DE\u6536\u7AD9\uFF1F30 \u5929\u5185\u53EF\u6062\u590D\u3002",modeInit:"\u542F\u52A8\u65F6\u62C9\u4E00\u6B21",modeInterval:"\u5468\u671F\u4FDD\u6D3B",modeManual:"\u4EC5\u624B\u52A8",serviceConfig:"\u670D\u52A1\u81EA\u7BA1\u7406\u914D\u7F6E",auditConfig:"\u81EA\u52A8\u5BA1\u6838\u914D\u7F6E",auditHint:"\u547D\u4E2D\u514D\u5BA1\u7684\u65B0\u5361\u76F4\u63A5\u5165\u5E93\uFF0C\u5176\u4F59\u8FDB\u5F85\u5BA1\u6838",auditMode:"\u5BA1\u6838\u6A21\u5F0F",auditAll:"\u5168\u90E8\u8981\u5BA1\u6838",auditNone:"\u5168\u90E8\u514D\u5BA1",auditExemptAgents:"\u514D\u5BA1\u667A\u80FD\u4F53",auditExemptKinds:"\u514D\u5BA1\u7C7B\u578B",allExempt:"\u5168\u90E8\u514D\u5BA1",recycleDays:"\u56DE\u6536\u4FDD\u7559\u5929\u6570",editInSetting:"\u7F16\u8F91\u8BF7\u5230 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6",pendingSyncNote:"\u6B64\u9875\u662F\u72EC\u7ACB Web \u9875\uFF1A\u4FDD\u5B58\u540E\u7531 DSH \u5BBF\u4E3B\u5E94\u7528\uFF08\u65B0\u7248\u5BBF\u4E3B\u4F1A\u88AB\u76F4\u63A5\u53EB\u9192\u3001\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF0C\u70B9\u4FDD\u5B58\u5373\u751F\u6548\uFF09\uFF1B\u82E5\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5219\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\u3001\u7ACB\u5373\u751F\u6548\u3002\u53EA\u6709\u5728\u5BF9\u63A5\u65E7\u7248\u5BBF\u4E3B\u65F6\u624D\u4F1A\u9000\u56DE\u300C\u6392\u961F\u7B49\u5B83\u81EA\u5DF1\u540C\u6B65\u300D\uFF0C\u90A3\u65F6\u53EF\u5728 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u91CC\u6539\u540C\u4E00\u9879\u3002",readonlyTitle:"\u5F53\u524D\u9875\u9762\u53EA\u8BFB\uFF0C\u65E0\u6CD5\u4FDD\u5B58\u914D\u7F6E",readonlyBody:"\u8FD9\u4E2A\u8FDB\u7A0B\u6CA1\u6709 DSH \u7684\u8BBE\u7F6E\u670D\u52A1\uFF08settings.update \u4E0D\u5B58\u5728\uFF09\uFF0C\u914D\u7F6E\u53EA\u80FD\u5728\u672C\u673A DSH \u91CC\u4FEE\u6539\uFF1A\u684C\u9762\u7248 \u2192 \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u3002",readonlyBtn:"\u53EA\u8BFB",setupRunInTerminal:"\u8BF7\u590D\u5236\u4EE5\u4E0B\u547D\u4EE4\u5230\u7EC8\u7AEF\u6267\u884C\uFF1A",dshMemoryConfig:"DSH \u8BB0\u5FC6\u914D\u7F6E",coreMemory:"\u6838\u5FC3\u8BB0\u5FC6\uFF08\u524D\u7F6E\u5F3A\u5236\uFF09",coreMemoryHint:"\u6BCF\u6B21\u4F1A\u8BDD\u81EA\u52A8\u6CE8\u5165\uFF0C\u4E0D\u4F9D\u8D56\u6A21\u578B\u4E3B\u52A8\u53EC\u56DE\uFF1B\u53EA\u8BFB\u53D6\u5DF2\u6279\u51C6\u7684\u6838\u5FC3\u5361",coreMemoryEnabled:"\u542F\u7528\u6838\u5FC3\u8BB0\u5FC6\u6CE8\u5165",coreMemoryLimit:"\u6838\u5FC3\u8BB0\u5FC6\u4E0A\u9650\uFF08\u5F20\uFF09",coreMemoryMaxChars:"\u6838\u5FC3\u8BB0\u5FC6\u603B\u5B57\u7B26\u4E0A\u9650",setCore:"\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6",unsetCore:"\u53D6\u6D88\u6838\u5FC3\u8BB0\u5FC6",coreSetOk:"\u5DF2\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6",coreUnsetOk:"\u5DF2\u53D6\u6D88\u6838\u5FC3\u8BB0\u5FC6",coreSetFail:"\u8BBE\u7F6E\u5931\u8D25",coreActiveHint:"\u8FD9\u5F20\u5361\u6BCF\u6B21\u4F1A\u8BDD\u90FD\u4F1A\u5F3A\u5236\u6CE8\u5165\uFF1B\u4E0E\u666E\u901A\u8BB0\u5FC6\u51B2\u7A81\u65F6\u4EE5\u5B83\u4E3A\u51C6\u3002",coreInactiveHint:"\u666E\u901A\u77E5\u8BC6\u5361\u53EF\u4EE5\u63D0\u5347\u4E3A\u6838\u5FC3\u8BB0\u5FC6\uFF1B\u63D0\u5347\u540E\u6BCF\u6B21\u4F1A\u8BDD\u81EA\u52A8\u751F\u6548\u3002",coreNeedApproval:"\u5148\u6279\u51C6\u8FD9\u5F20\u5361\uFF0C\u624D\u80FD\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6\u3002",coreShort:"\u6838\u5FC3",setCoreShort:"\u8BBE\u6838\u5FC3",uiLayout:"\u5E03\u5C40\u5927\u5C0F",uiLayoutHint:"\u8C03\u6574\u8BB0\u5FC6\u754C\u9762\u6574\u4F53\u5927\u5C0F\uFF08\u53EA\u5F71\u54CD\u663E\u793A\uFF0C\u4E0D\u5F71\u54CD\u8BB0\u5FC6\u6570\u636E\uFF09",uiCompact:"\u7D27\u51D1",uiNormal:"\u6807\u51C6",uiLarge:"\u5927",autoCapture:"\u81EA\u52A8\u6C89\u6DC0",autoRecall:"\u81EA\u52A8\u53EC\u56DE",captureMinChars:"\u6355\u83B7\u6700\u5C0F\u957F\u5EA6",maxCardsPerDay:"\u65E5\u914D\u989D",dedupThreshold:"\u53BB\u91CD\u9608\u503C",recallLimit:"\u53EC\u56DE\u6761\u6570",vaultMulti:"\u591A\u5E93\uFF08\u6309\u9879\u76EE\u9694\u79BB\uFF09",vaultMultiHint:"\u7559\u7A7A\u5373\u5355\u5E93\uFF0C\u8001\u914D\u7F6E\u4E0D\u53D7\u5F71\u54CD",vaultNow:"\u5F53\u524D\u751F\u6548",vaultSource:"\u6765\u6E90",vaultWorkspace:"\u5F53\u524D workspace",vaultNamePh:"\u5E93\u540D\uFF0C\u5982 work",vaultPathPh:"\u76EE\u5F55\uFF0C\u5982 D:/vaults/work",vaultMatchPh:"\u9879\u76EE\u76EE\u5F55\uFF08\u53EF\u9009\uFF0C\u6309 workspace \u81EA\u52A8\u9009\u5E93\uFF09",vaultAdd:"\u6DFB\u52A0\u4E00\u4E2A\u5E93",vaultActive:"\u6FC0\u6D3B\u5E93",vaultActiveNone:"\u9ED8\u8BA4\u5E93\uFF08\u4E0D\u6307\u5B9A\uFF09",vaultSrcEnv:"\u73AF\u5883\u53D8\u91CF MEMORY_VAULT_DIR",vaultSrcProfile:"\u6FC0\u6D3B\u5E93\u914D\u7F6E",vaultSrcWorkspace:"\u6309\u9879\u76EE\u76EE\u5F55\u81EA\u52A8\u547D\u4E2D",vaultSrcVaultDir:"\u5355\u5E93\u914D\u7F6E vaultDir",vaultSrcDefault:"\u9ED8\u8BA4\u76EE\u5F55",fbNav:"\u53CD\u9988\u5F02\u5E38",fbTitle:"\u53CD\u9988\u5F02\u5E38\uFF08\u63D0\u4EA4\u5230 GitHub\uFF09",fbDesc:"\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF08\u73B0\u8C61 / \u590D\u73B0\u6B65\u9AA4 / \u671F\u671B\u884C\u4E3A\uFF09",fbDiag:"\u8BCA\u65AD\u4FE1\u606F\uFF08\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E key/token \u5DF2\u66FF\u6362\uFF09",fbCopyDiag:"\u590D\u5236\u8BCA\u65AD\u4FE1\u606F",fbOpenIssue:"\u5728 GitHub \u63D0\u4EA4\uFF08\u5DF2\u9884\u586B\uFF09",fbCopyPrompt:"\u590D\u5236\u7ED9 AI \u7684\u63D0\u793A\u8BCD",fbCopiedDiag:"\u8BCA\u65AD\u4FE1\u606F\u5DF2\u590D\u5236",fbCopiedPrompt:"\u63D0\u793A\u8BCD\u5DF2\u590D\u5236\uFF0C\u7C98\u8FDB AI \u5BF9\u8BDD\u6846\u5373\u53EF",fbCopyFail:"\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u9009\u4E2D\u590D\u5236",fbWhy:"GitHub \u4E0D\u5141\u8BB8\u533F\u540D\u521B\u5EFA issue\uFF0C\u63D2\u4EF6\u91CC\u4E5F\u4E0D\u5E94\u5185\u7F6E token\uFF1A\u6240\u4EE5\u8FD9\u91CC\u628A\u6807\u9898 / \u6B63\u6587 / \u8BCA\u65AD\u90FD\u9884\u586B\u597D\uFF0C\u4F60\u53EA\u9700\u518D\u70B9\u4E00\u6B21 Submit\u3002",fbNeedDesc:"\u8BF7\u5148\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898",fbLoading:"\u6B63\u5728\u6536\u96C6\u8BCA\u65AD\u4FE1\u606F\u2026",fbDiagFail:"\u8BCA\u65AD\u63A5\u53E3\u4E0D\u53EF\u7528\uFF08\u72EC\u7ACB web \u6216\u65E7\u7248\u5BBF\u4E3B\uFF09\uFF0C\u8BF7\u624B\u52A8\u8865\u5145\u73AF\u5883\u4FE1\u606F",fbOr:"\u6216\u8005",fbSelectAll:"\u5168\u9009",auditTypeLabel:"\u7C7B\u578B",auditInboxSub:"\u81EA\u52A8\u6C89\u6DC0\u7684\u5361\u5148\u5230\u8FD9\u91CC \xB7 \u6279\u51C6\u540E\u8FDB\u5165\u8BB0\u5FC6\u5E93",auditUndo:"\u6279\u51C6\u4E0E\u9A73\u56DE\u90FD\u53EF\u64A4\u9500",auditSelected:"\u5DF2\u9009",auditClearSelection:"\u6E05\u7A7A",preview:"\u9884\u89C8",supportGroup:"\u4EA4\u6D41\u7FA4",supportSponsor:"\u8D5E\u52A9",supportLegacy:"\u65E7\u7A0B\u5E8F",supportTitle:"\u652F\u6301\u4E0E\u4EA4\u6D41",clickToZoom:"\u70B9\u51FB\u653E\u5927",supportGroupHint:"\u626B\u7801\u8FDB\u4EA4\u6D41\u7FA4\uFF0C\u9047\u5230\u95EE\u9898\u53EF\u4EE5\u76F4\u63A5\u95EE\u3002",supportSponsorHint:"\u5982\u679C\u8FD9\u4E2A\u63D2\u4EF6\u5E2E\u4F60\u7701\u4E86\u65F6\u95F4\uFF0C\u53EF\u4EE5\u8BF7\u4F5C\u8005\u559D\u676F\u5496\u5561\u3002\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\u3002",supportLegacyTitle:"\u65E7\u7A0B\u5E8F\uFF08dsh-desktop\uFF09\u5DF2\u505C\u6B62\u7EF4\u62A4",supportLegacyBody:"\u4F5C\u8005\u81EA\u7814\u7684 dsh-desktop \u5DF2\u505C\u6B62\u7EF4\u62A4\uFF0C\u5B98\u65B9 DeepSeek Harness \u684C\u9762\u7248\u5DF2\u8986\u76D6\u540C\u6837\u80FD\u529B\uFF0C\u5EFA\u8BAE\u8FC1\u79FB\u3002\u65E7 profile \u91CC\u5982\u679C\u8FD8\u9489\u7740\u5DF2\u64A4\u4E0B\u7684 dsh-desktop-shell@0.3.0\uFF0C\u5148\u5220\u6389\u90A3\u5957\u4F9D\u8D56\uFF0C\u5426\u5219 pnpm install \u4F1A\u5931\u8D25\u3002",supportReadme:"\u6253\u5F00 README",supportReleases:"\u5386\u53F2\u7248\u672C",supportFeedback:"\u5F02\u5E38\u53CD\u9988",supportReplay:"\u91CD\u65B0\u67E5\u770B\u5F15\u5BFC",onboardTitle:"30 \u79D2\u8BA4\u8BC6\u8BB0\u5FC6\u6838\u5FC3",onboardSub:"\u4F60\u7684 AI \u4F1A\u5728\u6BCF\u8F6E\u5BF9\u8BDD\u540E\u81EA\u52A8\u6C89\u6DC0\u77E5\u8BC6\u5361\uFF0C\u5148\u5BA1\u540E\u5165\u3002",onboardSkip:"\u8DF3\u8FC7",onboardBack:"\u4E0A\u4E00\u6B65",onboardNext:"\u4E0B\u4E00\u6B65",onboardStart:"\u5F00\u59CB\u4F7F\u7528",onboardStep0Title:"\u5148\u53BB GitHub \u70B9\u4E2A Star",onboardStep0Body:"Star \u662F\u4F5C\u8005\u7EE7\u7EED\u7EF4\u62A4\u6700\u76F4\u63A5\u7684\u53CD\u9988\uFF1B\u60F3\u81EA\u5DF1\u6539\u4EE3\u7801\u6216\u90E8\u7F72\uFF0C\u5C31\u987A\u624B Fork \u4E00\u4EFD\u3002",onboardStar:"Star / \u70B9\u8D5E",onboardFork:"Fork",onboardStarred:"\u5DF2 Star\uFF0C\u7EE7\u7EED",onboardStarHint:"\u4E4B\u540E\u53EF\u4EE5\u968F\u65F6\u70B9\u9876\u680F\u7684 \u2605 Star \u56DE\u6765\u3002",onboardStep1Title:"\u81EA\u52A8\u6C89\u6DC0\uFF0C\u4E0D\u7528\u624B\u52A8\u8BB0",onboardStep1Body:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\uFF0C\u503C\u5F97\u7559\u4E0B\u7684\u51B3\u7B56\u3001\u6839\u56E0\u548C\u6559\u8BAD\u4F1A\u88AB\u5199\u6210\u4E00\u5F20\u5361\u3002\u5148\u751F\u6210\uFF0C\u518D\u5BA1\u6838\u3002",onboardStep2Title:"\u8BFB\u5230\u6709\u7528\u7684\u5361\uFF0C\u70B9\u4E2A \u{1F44D}",onboardStep2Body:"\u6253\u5F00\u4EFB\u610F\u5361\u7247\uFF0C\u70B9 \u{1F44D} \u6709\u7528 / \u{1F44E} \u6CA1\u7528\u3002\u4E0D\u7528\u5148\u641C\u7D22\uFF0C\u6309\u94AE\u73B0\u5728\u4E00\u76F4\u90FD\u5728\u3002\u5B83\u4F1A\u5E2E\u52A9\u53EC\u56DE\u6392\u5E8F\u3002",onboardStep3Title:"\u5DE6\u4FA7\u65B0\u589E\u652F\u6301\u5165\u53E3",onboardStep3Body:"\u4EA4\u6D41\u7FA4\u3001\u8D5E\u52A9\u3001\u65E7\u7A0B\u5E8F\u3001\u5F02\u5E38\u53CD\u9988\u90FD\u5728\u5DE6\u680F\u5E95\u90E8\uFF1B\u9700\u8981\u5E2E\u52A9\u65F6\u4E0D\u7528\u7FFB README\u3002",onboardTip:"\u63D0\u793A\uFF1A\u8FD9\u4E2A\u5F15\u5BFC\u53EF\u4EE5\u5728\u300C\u652F\u6301\u4E0E\u4EA4\u6D41\u300D\u91CC\u91CD\u65B0\u6253\u5F00\u3002",navWorkspace:"\u5DE5\u4F5C\u533A",navSystem:"\u7CFB\u7EDF",navSupport:"\u652F\u6301",v5Local:"\u672C\u5730\u8FD0\u884C",v5Star:"\u53BB GitHub \u70B9 Star",runtimeTitle:"\u8FD0\u884C\u72B6\u6001",runtimeSub:"\u77E5\u8BC6\u5E93\u3001\u5907\u4EFD\u3001\u81EA\u52A8\u6C89\u6DC0\u4E0E\u7248\u672C",dbTitle:"\u77E5\u8BC6\u5E93",backupTitle:"\u5907\u4EFD",captureTitle:"\u81EA\u52A8\u6C89\u6DC0",versionTitle:"\u7248\u672C",cardsUnit:"\u5F20\u5361",links:"\u8FDE\u63A5",todayReview:"\u4ECA\u65E5\u56DE\u770B",openArrow:"\u6253\u5F00 \u2192",reshuffle:"\u6362\u4E00\u5F20",insightDecision:"\u51B3\u7B56",insightRoot:"\u6839\u56E0",insightLesson:"\u6559\u8BAD",insightSummary:"\u6458\u8981",pinCard:"\u56FA\u5B9A\u8FD9\u5F20\u5361",unpinCard:"\u53D6\u6D88\u56FA\u5B9A",pinnedOnly:"\u5DF2\u56FA\u5B9A",toastApproved:"\u5DF2\u6279\u51C6",toastRejected:"\u5DF2\u9A73\u56DE",toastCardDeleted:"\u5DF2\u5220\u9664",toastRestored:"\u5DF2\u6062\u590D",toastPurged:"\u5DF2\u5F7B\u5E95\u5220\u9664",toastPurgedExpired:"\u5DF2\u6E05\u7406\u8FC7\u671F\u56DE\u6536\u7AD9",toastFailed:"\u64CD\u4F5C\u5931\u8D25",noSelection:"\u8BF7\u5148\u9009\u62E9\u8981\u5904\u7406\u7684\u5361\u7247",enabledLabel:"\u542F\u7528\u8BB0\u5FC6\u6838\u5FC3",vaultDirLabel:"\u8BB0\u5FC6\u5E93\u76EE\u5F55\uFF08\u5355\u5E93\uFF09",captureCooldownMs:"\u6C89\u6DC0\u51B7\u5374 (ms)",captureProvider:"\u84B8\u998F provider\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",routeAuto:"\u81EA\u52A8\uFF08\u6309\u6CE8\u518C\u987A\u5E8F\uFF09",routeListFail:"\u53D6\u4E0D\u5230\u6A21\u578B\u5217\u8868\uFF08{err}\uFF09\u2192 \u4E0B\u9762\u53EF\u76F4\u63A5\u624B\u586B provider / model\uFF1B\u684C\u9762\u7248\u5F39\u7A97\u4F1A\u81EA\u52A8\u5411\u5BBF\u4E3B\u4EE3\u7406\uFF0C\u82E5\u4ECD\u5931\u8D25\u8BF7\u4ECE DSH \u8BBE\u7F6E\u9875\u6253\u5F00",captureFollowSession:"\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\uFF08\u84B8\u998F\u7528\u4F1A\u8BDD\u7684 provider/model\uFF09",captureFirstOnly:"\u4EC5\u8BD5\u9996\u9009\uFF08\u5931\u8D25\u5373\u505C\uFF0C\u4E0D\u8F6E\u6362\u515C\u5E95\uFF09",llmTest:"\u6D4B\u8BD5\u84B8\u998F\u8DEF\u7531",llmTestOk:"\u2713 \u8C03\u7528\u6210\u529F",llmTestFail:"\u2717 \u8C03\u7528\u5931\u8D25",llmCandidates:"\u5019\u9009\u6570",captureModel:"\u84B8\u998F model\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",recallEmbedding:"\u8BED\u4E49\u53EC\u56DE provider\uFF08\u53EF\u9009\uFF09",sessionBudgetChars:"\u4F1A\u8BDD\u9884\u7B97 (\u5B57\u7B26)",saving:"\u4FDD\u5B58\u4E2D\u2026",savePending:"\u5DF2\u5199\u5165\u914D\u7F6E\u6587\u4EF6\uFF1B\u5BBF\u4E3B\u4ECD\u662F\u65E7\u7248\uFF0C\u91CD\u542F DSH \u540E\u5373\u4EE5\u65B0\u503C\u4E3A\u51C6\uFF08\u672C\u9762\u677F\u5DF2\u751F\u6548\uFF09",actionRunning:"\u5904\u7406\u4E2D\u2026",recycleEmptyHint:"\u56DE\u6536\u7AD9\u4E3A\u7A7A\uFF1A\u5220\u6389\u7684\u5361\u7247\u4F1A\u5148\u653E\u5230\u8FD9\u91CC\uFF0C\u4FDD\u7559 {days} \u5929\u540E\u81EA\u52A8\u6E05\u7406\u3002",recyclePurgeAll:"\u6E05\u7A7A\u56DE\u6536\u7AD9",fbCopyManual:"\u81EA\u52A8\u590D\u5236\u88AB\u6D4F\u89C8\u5668\u62E6\u622A\uFF0C\u5DF2\u628A\u5185\u5BB9\u653E\u5728\u4E0B\u9762\uFF1A\u70B9\u300C\u5168\u9009\u300D\u518D\u6309 Ctrl+C",vcPage:"\u9875\u9762\u811A\u672C",vcPageStale:"\u26A0 \u5F53\u524D\u9875\u9762\u4ECD\u5728\u8FD0\u884C\u65E7\u7248\u811A\u672C\uFF08\u9875\u9762 v{page} / \u78C1\u76D8 v{disk}\uFF09\uFF1A\u6309 Ctrl+F5 \u5237\u65B0\u9875\u9762\u5373\u751F\u6548\uFF1B\u82E5\u300C\u8FD0\u884C\u4E2D\u300D\u4ECD\u662F\u65E7\u7248\u53F7\uFF0C\u5219\u8FD8\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcLoaded:"\u8FD0\u884C\u4E2D\uFF08\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF09",vcResident:"\u5E38\u9A7B\u5B9E\u4F8B",vcOnDisk:"\u78C1\u76D8\u5B89\u88C5",vcLatest:"npm \u6700\u65B0",vcStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\u4ECD\u52A0\u8F7D v{loaded} \u2014\u2014 \u70B9\u300C\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u300D\u5373\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u542F\u5B83\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestart:"\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",vcRestarting:"\u91CD\u542F\u4E2D\u2026",vcRestartSent:"\u5DF2\u8C03\u5EA6\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\uFF1A\u7EA6 3-8 \u79D2\u540E\u65B0\u8FDB\u7A0B\u63A5\u7BA1\uFF0C\u8BF7\u7A0D\u7B49\u518D\u5237\u65B0\u9875\u9762\uFF08Ctrl+F5\uFF09",vcRestartCurrent:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u7ECF\u662F\u6700\u65B0\u7248\uFF0C\u65E0\u9700\u91CD\u542F",vcRestartAnyway:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{ver}\uFF1B\u901A\u5E38\u65E0\u9700\u91CD\u542F\uFF0C\u5361\u4F4F/\u884C\u4E3A\u5F02\u5E38\u65F6\u53EF\u5F3A\u5236\u91CD\u542F",vcHostProcessStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46**\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B**\uFF08DSH \u5BBF\u4E3B\uFF09\u52A0\u8F7D\u7684\u4ECD\u662F v{loaded} \u2014\u2014 \u5B83\u6765\u81EA\u5BBF\u4E3B\u542F\u52A8\u65F6\u7684\u90A3\u4EFD\u4EE3\u7801\uFF1A**\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u4F1A\u6539\u53D8\u672C\u9875**\uFF0C\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH\u3002",vcRestartFixes:"\u70B9\u51FB\u4F1A\u628A\u5E38\u9A7B\u5B9E\u4F8B\uFF08\u7AEF\u53E3\u4E0A\u90A3\u4E2A\uFF09\u6362\u6210 v{disk}\uFF08\u5F53\u524D v{served}\uFF09\uFF0C\u4E0D\u7528\u91CD\u542F DSH",vcRestartStart:"\u70B9\u51FB\u4F1A\u7528\u5F53\u524D\u78C1\u76D8\u7248\u672C v{disk} \u628A\u5E38\u9A7B\u5B9E\u4F8B\u62C9\u8D77\u6765\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartRepair:"\u70B9\u51FB\u4F1A\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\u5E76\u4FDD\u6D3B\uFF08\u7248\u672C\u5DF2\u662F v{disk}\uFF0C\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartHostOnly:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{disk}\uFF1B\u672C\u9875\u663E\u793A v{loaded} \u6765\u81EA DSH \u5BBF\u4E3B \u2014\u2014 \u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u5F71\u54CD\u672C\u9875\uFF0C\u8BF7\u91CD\u542F DSH",vcRestartFail:"\u91CD\u542F\u8BF7\u6C42\u5931\u8D25",vcRestartNoRoute:"\u5F53\u524D\u9875\u9762\u5BF9\u63A5\u7684\u8FDB\u7A0B\u8FD8\u662F\u65E7\u7248\uFF08\u6CA1\u6709\u8FD9\u4E2A\u63A5\u53E3\uFF09\uFF1A\u8BF7\u91CD\u542F\u684C\u9762\u7248 / DSH \u540E\u518D\u8BD5\uFF0C\u6216\u6267\u884C {cmd}",vcHostStale:"\u4E0A\u65B9\u7684\u300C\u8FD0\u884C\u4E2D\u300D\u6765\u81EA\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF1B\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F\u65B0\u7248 \u2014\u2014 \u8981\u8BA9\u5B83\u4E5F\u53D8\u6210\u65B0\u7248\u53F7\uFF0C\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcResidentDownShort:"\u672A\u8FD0\u884C",vcResidentDown:"\u5E38\u9A7B\u5B9E\u4F8B\u6CA1\u5728\u8FD0\u884C\uFF08\u7AEF\u53E3 {port} \u65E0\u54CD\u5E94\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u7528\u65B0\u4EE3\u7801\u628A\u5B83\u62C9\u8D77\u6765\uFF1B\u62C9\u4E0D\u8D77\u6765\u65F6\u6267\u884C {cmd}\uFF0C\u5E76\u8D34\u4E00\u4E0B dsh-memory status \u7684\u8F93\u51FA",vcResidentUnmanagedShort:"\u672A\u6258\u7BA1",vcResidentUnmanaged:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u6CA1\u6709\u770B\u95E8\u72D7\u4FDD\u6D3B**\uFF08\u505C\u6B62 / \u786C\u6740\u540E\u6B8B\u7559\u7684\u5B64\u513F\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\uFF08\u91CD\u65B0\u62C9\u4E00\u4E2A\u770B\u95E8\u72D7 + \u65B0\u5B9E\u4F8B\uFF09\uFF1B\u4E5F\u53EF\u4EE5\u6267\u884C {cmd}",vcResidentLockUnknownShort:"\u6258\u7BA1\u72B6\u6001\u672A\u77E5",vcResidentReplaceBlockedShort:"\u4E0D\u53EF\u66FF\u6362",vcResidentHostManagedShort:"\u5BBF\u4E3B\u6258\u7BA1",vcResidentReplaceBlocked:"\u5E38\u9A7B\u5B9E\u4F8B**\u4E0D\u53EF\u66FF\u6362**\uFF08\u73AF\u5883\u9650\u5236\uFF09\uFF1A\u770B\u95E8\u72D7\u9501\u76EE\u5F55\u4E0D\u53EF\u5199\uFF08{err}\uFF1B{path}\uFF09\u2192 \u7AEF\u53E3\u4E0A\u4F1A**\u957F\u671F**\u505C\u5728 v{served}\u3002\u8FD9\u4E0D\u662F\u300C\u6682\u65F6\u843D\u540E\u300D\uFF1A\u81EA\u52A8\u66FF\u6362\u88AB\u6B63\u786E\u5730\u62D2\u7EDD\uFF08\u907F\u514D\u7559\u4E0B\u5B64\u513F\uFF09\u3002\u51FA\u8DEF\uFF1A\u4FEE\u590D\u8BE5\u76EE\u5F55\u6743\u9650\u540E\u6267\u884C {cmd}\uFF0C\u6216\u524D\u53F0\u89C2\u5BDF dsh-memory watchdog --port 7999",vcResidentLockUnknown:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u770B\u95E8\u72D7\u9501\u6587\u4EF6\u5199\u4E0D\u8FDB\u53BB**\uFF08\u53D7\u9650\u73AF\u5883\uFF1A\u6C99\u7BB1\u7981\u5199 / ACL / \u975E\u7CFB\u7EDF\u76D8\uFF09\u2192 \u65E0\u6CD5\u5224\u65AD\u5B83\u6709\u6CA1\u6709\u88AB\u6258\u7BA1\uFF08\u4E0D\u662F\u300C\u672A\u6258\u7BA1\u300D\uFF09\u3002\u539F\u56E0\uFF1A{err}\uFF08{path}\uFF09\u3002\u4FDD\u6D3B\u901A\u5E38\u4ECD\u7136\u6709\u6548\uFF1B\u70B9\u4E0B\u9762\u7684\u6309\u94AE\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u65B0\u6258\u7BA1\u4E00\u6B21\u3002",vcOutdated:"\u6709\u65B0\u7248\u672C",vcUpToDate:"\u5DF2\u662F\u6700\u65B0",vcCheck:"\u68C0\u67E5\u66F4\u65B0",checking:"\u68C0\u67E5\u4E2D\u2026",vcCheckFail:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25",recallSummaryLen:"\u53EC\u56DE\u6458\u8981\u957F\u5EA6",recallBody:"\u53EC\u56DE\u542B\u6B63\u6587",secretHint:"\u51ED\u8BC1\u53D6\u7528\u63D0\u793A\uFF08\u6CE8\u5165\u6BCF\u4E2A\u4F1A\u8BDD\uFF09",autoWeb:"Web server",autoWebMode:"\u4FDD\u6D3B\u6A21\u5F0F",webPort:"Web \u7AEF\u53E3",webCheckIntervalMs:"\u63A2\u6D3B\u95F4\u9694(ms)",webMaxRestart:"\u6700\u5927\u91CD\u542F\u6B21\u6570",watchdogAutoSpawn:"\u770B\u95E8\u72D7\u8FDB\u7A0B",autoRestartOnDrift:"\u7248\u672C\u6F02\u79FB\u81EA\u52A8\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",autoMcpSetup:"\u81EA\u52A8\u6302\u8F7D MCP",saveConfig:"\u4FDD\u5B58\u914D\u7F6E",saveFail:"\u4FDD\u5B58\u5931\u8D25",savedOk:"\u5DF2\u4FDD\u5B58",savedDirect:"\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5DF2\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\uFF08hooks / MCP / \u72EC\u7ACB\u9875\u7ACB\u5373\u751F\u6548\uFF09",savedApplied:"\u5DF2\u4FDD\u5B58\u5E76\u751F\u6548\uFF08\u5BBF\u4E3B\u5DF2\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF09",saveQueued:"\u5DF2\u4EA4\u7ED9 DSH \u5BBF\u4E3B\u540C\u6B65\uFF0C\u5C1A\u672A\u786E\u8BA4\u751F\u6548",saveHostGuard:"\u8BE5\u5BBF\u4E3B\u4E0D\u5141\u8BB8\u63D2\u4EF6\u4ECE\u81EA\u5DF1\u7684\u56DE\u8C03\u4E0A\u4E0B\u6587\u91CC\u5199\u914D\u7F6E\uFF1B\u8BF7\u5728\u300CDSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u300D\u91CC\u6539\u540C\u4E00\u9879\uFF0C\u6216\u7F16\u8F91 profile \u7684\u914D\u7F6E\u8865\u4E01\u5C42",saveFailHint:"\u5BBF\u4E3B\u4FA7\u672A\u5E94\u7528\uFF0C\u8BE6\u89C1\u300C\u53CD\u9988\u5F02\u5E38\u300D\u91CC\u7684\u8BCA\u65AD\u4FE1\u606F",recallTool:"recall \u5DE5\u5177",costControl:"\u6210\u672C\u63A7\u5236",costHint:"\u7701 token\u3001\u63A7 LLM \u6D88\u8017",distillEnabled:"\u84B8\u998F\u77E5\u8BC6\u5361(\u5F00=LLM \u538B\u7F29, \u5173=\u539F\u6587\u5361\u96F6 LLM)",dedupByLLM:"\u8BED\u4E49\u53BB\u91CD\u5582 LLM(\u5173=\u7EAF\u8BCD\u6CD5\u66F4\u7701)",captureMaxTokens:"\u84B8\u998F\u8F93\u51FA\u4E0A\u9650(token)",captureTimeoutMs:"\u84B8\u998F\u8D85\u65F6(\u6BEB\u79D2\uFF1B\u672C\u5730\u5927\u6A21\u578B\u51B7\u542F\u52A8\u5EFA\u8BAE 120000+)",recallMinScore:"\u53EC\u56DE\u76F8\u5173\u6027\u9608\u503C(\u8D8A\u9AD8\u8D8A\u7701)",configNeedsDsh:"\u914D\u7F6E\u7F16\u8F91\u9700\u5728 DSH \u5185\u6253\u5F00\uFF08\u672C\u9875\u53EF\u80FD\u53EA\u8BFB\u6216\u6709\u90E8\u5206\u7F3A\u5931\uFF09",installMcp:"\u5B89\u88C5 MCP",uninstallMcp:"\u5378\u8F7D MCP",uninstallConfirm:"\u786E\u8BA4\u5378\u8F7D\u8BE5\u667A\u80FD\u4F53\u7684 MCP\uFF1FClaude Code/Codex \u5C06\u65E0\u6CD5\u518D\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002",presetConfig:"\u4E00\u952E\u63A8\u8350\u914D\u7F6E",presetHint:"\u70B9\u51FB\u586B\u5145\u5BF9\u5E94\u65B9\u6848\uFF0C\u70B9\u4FDD\u5B58\u751F\u6548",planApplied:"\u5DF2\u586B\u5165\u300C{plan}\u300D\xB7 \u70B9\u300C\u4FDD\u5B58\u914D\u7F6E\u300D\u751F\u6548",planDescA:"\u4E2A\u4EBA\u5F00\u53D1\u63A8\u8350 \xB7 \u84B8\u998F 4000 \xB7 \u5173\u770B\u95E8\u72D7",planDescB:"\u9884\u7B97\u654F\u611F \xB7 \u5173\u84B8\u998F \xB7 \u8FD1 0 \u6210\u672C",planDescC:"\u957F\u9879\u76EE \xB7 \u5F00\u770B\u95E8\u72D7 \xB7 \u9AD8\u8D28\u91CF",cfgSubCore:"\u81EA\u52A8\u6C89\u6DC0 / \u53EC\u56DE / \u5E93\u76EE\u5F55\u4E0E\u53BB\u91CD\u7B56\u7565",cfgSubMulti:"\u6309\u9879\u76EE\u9694\u79BB\u8BB0\u5FC6\u5E93\uFF0C\u5207\u6362\u540E CLI / MCP / hooks \u540C\u6B65\u751F\u6548",cfgSubCost:"\u63A7\u5236 LLM \u8C03\u7528\u4E0E\u53EC\u56DE\u89C4\u6A21\uFF0C\u76F4\u63A5\u51B3\u5B9A\u82B1\u591A\u5C11\u94B1",cfgSubAudit:"\u4EC0\u4E48\u5185\u5BB9\u9700\u8981\u4F60\u4EBA\u5DE5\u786E\u8BA4\u540E\u624D\u8FDB\u4E3B\u5E93",cfgSubService:"\u4FDD\u6D3B\u3001\u770B\u95E8\u72D7\u4E0E\u7248\u672C\u81EA\u6108\uFF0C\u4E00\u822C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF",cfgDirty:"\u6709\u672A\u4FDD\u5B58\u7684\u66F4\u6539",cfgClean:"\u5DF2\u540C\u6B65",unitChars:"\u5B57",unitPerDay:"\u5F20 / \u5929",unitTokens:"tokens",unitMs:"\u6BEB\u79D2",unitTimes:"\u6B21",unitDays:"\u5929",mcpAutoHint:"\u81EA\u52A8\u8BC6\u522B\u5DF2\u5B89\u88C5\u7684 Agent \u4E0E\u5176 MCP \u914D\u7F6E\uFF08\u53EA\u8BFB\u63A2\u6D4B\uFF0C\u4E0D\u6539\u4EFB\u4F55\u6587\u4EF6\uFF09",mcpRefresh:"\u91CD\u65B0\u68C0\u6D4B",mcpSummary:"\u8BC6\u522B\u5230 {agents} \u4E2A Agent \xB7 {servers} \u4E2A MCP \xB7 {mounted} \u4E2A\u5DF2\u6302\u8F7D\u672C\u63D2\u4EF6",mcpNoServers:"\u672A\u914D\u7F6E MCP",mcpDetectedOnly:"\u4EC5\u8BC6\u522B",planA:"A \u8F7B\u91CF\u7701\u5FC3",planB:"B \u6781\u81F4\u7701\u94B1",planC:"C \u9AD8\u8D28\u91CF",pluginInfo:"\u63D2\u4EF6\u4FE1\u606F",organizeTitle:"\u6574\u7406\u5EFA\u8BAE",scanAndOrganize:"\u4E00\u952E\u641C\u7D22\u548C\u6574\u7406",scanHint:"\u70B9\u300C\u{1F50D} \u4E00\u952E\u641C\u7D22\u548C\u6574\u7406\u300D\u626B\u63CF\u76F8\u4F3C\u5361/\u9648\u65E7\u5361\uFF0C\u518D\u7528\u300C\u26A1 \u4E00\u952E\u4F18\u5316\u300D\u6267\u884C\u3002",mergeNow:"\u5408\u5E76",delete:"\u5220\u9664",captureAlert:"\u81EA\u52A8\u6C89\u6DC0\u5F02\u5E38",captureAlertHint:"\u6253\u5F00\u5DE6\u680F\u300C\u7528\u91CF/\u4ECA\u65E5\u300D\u770B\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7\uFF1B\u82E5\u662F\u63A5\u53E3/\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u9700\u66F4\u65B0 memory-eternal \u63D2\u4EF6\u3002",captureLog:"\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7",captureLogHint:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\u540E\u81EA\u52A8\u8DD1\uFF1A\u76D1\u542C \u2192 \u5224\u5B9A \u2192 \u5199\u5361\u3002\u8FD9\u91CC\u663E\u793A\u6700\u8FD1 100 \u6761\uFF0C\u7528\u6765\u6392\u67E5\u300C\u4E3A\u4EC0\u4E48\u6CA1\u5199\u5361\u300D\u3002",captureLogEmpty:"\u8FD8\u6CA1\u6709\u8BB0\u5F55\u3002\u8DDF Agent \u804A\u4E00\u8F6E\uFF08> \u6355\u83B7\u6700\u5C0F\u957F\u5EA6\uFF09\u540E\u518D\u56DE\u6765\u770B\u3002",healthTitle:"\u5065\u5EB7\u6982\u89C8",healthHint:"\u5E93 / \u5907\u4EFD / \u6C89\u6DC0 / \u7248\u672C \u2014\u2014 \u4E00\u773C\u770B\u6E05\u6709\u6CA1\u6709\u9759\u9ED8\u574F\u6389\u7684\u4E1C\u897F",healthDb:"\u77E5\u8BC6\u5E93",healthDbBad:"\u5E93\u4E0D\u53EF\u5199\u6216\u635F\u574F",healthBackups:"\u5907\u4EFD",healthNoBackups:"\u6CA1\u6709\u5907\u4EFD\uFF08\u6267\u884C dsh-memory doctor \u53EF\u5EFA\uFF0C\u5BBF\u4E3B\u4E5F\u4F1A\u6BCF\u65E5\u5907\u4EFD\uFF09",healthBackupAge:"{n} \u4E2A \xB7 \u6700\u8FD1 {d} \u5929\u524D",healthBackupToday:"{n} \u4E2A \xB7 \u4ECA\u5929",healthCapture:"\u81EA\u52A8\u6C89\u6DC0",healthNoRecords:"\u6682\u65E0\u8BB0\u5F55\uFF08\u8FD8\u6CA1\u89E6\u53D1\u8FC7\u6C89\u6DC0\uFF09",healthCapOk:"\u6700\u8FD1\u4E00\u6B21\u6210\u529F\u5199\u5361",healthCapFail:"\u6700\u8FD1\u4E00\u6B21\u5931\u8D25",healthRunAlign:"\u8FD0\u884C\u300C\u7248\u672C\u5BF9\u9F50\u68C0\u67E5\u300D\u540E\u663E\u793A",healthVersion:"\u7248\u672C",ledgerTitle:"\u8BB0\u5FC6\u8D26\u672C\uFF08\u8FD1 7 \u5929\uFF09",ledgerHint:"\u53EC\u56DE\u6CE8\u5165\u4E86\u591A\u5C11\u3001\u84B8\u998F\u8C03\u7528\u4E86\u591A\u5C11\u6B21 \u2014\u2014 \u5224\u65AD\u300C\u5230\u5E95\u7701\u4E0D\u7701 token\u300D\u7684\u7B2C\u4E00\u5757\u6570\u636E",ledgerRecalls:"\u53EC\u56DE\u6B21\u6570",ledgerInjected:"\u6CE8\u5165",ledgerChars:"\u5B57\u7B26",ledgerCaptures:"\u6C89\u6DC0\u6B21\u6570",ledgerLlmCalls:"LLM \u8C03\u7528",ledgerEstimate:"\u4F30\u7B97 token",ledgerEstimateHint:"\u6309\u7EA6 2 \u5B57\u7B26 \u2248 1 token \u7C97\u4F30\uFF0C\u53EA\u770B\u91CF\u7EA7",ledgerUseful:"\u53EC\u56DE\u6709\u7528\u7387",ledgerUsefulHint:"\u6765\u81EA\u300C\u6709\u7528 / \u6CA1\u7528\u300D\u53CD\u9988\uFF1B\u4F4E\u4E8E 60% \u8BF4\u660E\u6CE8\u5165\u53EF\u80FD\u51C0\u4E8F",ledgerFormula:"\u51C0\u6536\u76CA \u2248 \u88AB\u907F\u514D\u7684\u4E0A\u4E0B\u6587\u5F00\u9500 \u2212\uFF08\u6CE8\u5165\u5B57\u7B26 + \u84B8\u998F\u8C03\u7528 \xD7 \u5355\u4EF7\uFF09\u3002\u8D26\u672C\u53EA\u8BB0\u300C\u82B1\u4E86\u591A\u5C11\u300D\uFF0C\u6536\u76CA\u4FA7\u8BF7\u7ED3\u5408\u4F60\u5B9E\u9645\u7701\u4E0B\u7684\u91CD\u8BFB / \u8FD4\u5DE5\u6765\u5224\u65AD\u3002",ledgerNoData:"\u8FD1 7 \u5929\u8FD8\u6CA1\u6709\u8BB0\u5F55\uFF1A\u804A\u51E0\u8F6E\u6216\u8BA9 agent recall \u4E00\u6B21\u540E\u518D\u770B\u3002",ledgerNeedRestart:"\u5BBF\u4E3B\u4ECD\u5728\u8DD1\u65E7\u7248 API\uFF08/ledger \u4E0D\u5B58\u5728\uFF09\uFF1A\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH \u540E\uFF0C\u8D26\u672C\u624D\u4F1A\u5F00\u59CB\u8BB0\u5F55\u3002",alignTitle:"\u7248\u672C\u5BF9\u9F50\u68C0\u67E5",alignRun:"\u5F00\u59CB\u68C0\u67E5",alignFix:"\u91CD\u5199\u63A5\u7EBF",alignFixConfirm:"\u91CD\u5199 MCP / hooks \u63A5\u7EBF\uFF1F\uFF08\u53EA\u78B0\u63D2\u4EF6\u81EA\u5DF1\u7684\u952E\uFF0C\u4E0D\u52A8\u4F60\u7684\u6570\u636E\u4E0E\u914D\u7F6E\uFF09",alignFixed:"\u63A5\u7EBF\u5DF2\u91CD\u5199\uFF1B\u82E5\u4E0A\u9762\u63D0\u793A\u300C\u5BBF\u4E3B\u8FDB\u7A0B\u65E7\u300D\uFF0C\u4ECD\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH",alignFail:"\u5BF9\u9F50\u68C0\u67E5\u5931\u8D25",alignHint:"\u63D2\u4EF6\u5347\u7EA7\u53EA\u6362\u78C1\u76D8\u6587\u4EF6 \u2014\u2014 \u5BBF\u4E3B\u5185\u5B58\u91CC\u7684\u4E8B\u4EF6\u8BA2\u9605\u4E0E MCP / hooks \u91CC\u7684\u65E7\u8DEF\u5F84\u4E0D\u4F1A\u81EA\u5DF1\u66F4\u65B0\uFF0C\u8FD9\u91CC\u4E00\u6B21\u67E5\u6E05",alignIdle:"\u70B9\u300C\u5F00\u59CB\u68C0\u67E5\u300D\uFF1A\u5BF9\u6BD4\u5BBF\u4E3B / \u5E38\u9A7B\u5B9E\u4F8B / npm \u7684\u7248\u672C\uFF0C\u5E76\u68C0\u67E5 MCP\u3001hooks \u91CC\u662F\u5426\u6709\u65E7\u8DEF\u5F84\u4E0E\u65E7\u53C2\u6570",alignDisk:"\u78C1\u76D8",alignResident:"\u5E38\u9A7B\u5B9E\u4F8B",alignHost:"\u5BBF\u4E3B\u8FDB\u7A0B",captureLogUnavailable:"\u65E5\u5FD7\u4EC5\u5728 DSH \u5BBF\u4E3B\u5185\u53EF\u7528\uFF08\u72EC\u7ACB Web \u9875\u6CA1\u6709 host \u8FD0\u884C\u65F6\uFF09\u3002",captureAgentCards:"Agent \u81EA\u52A8\u6C89\u6DC0\u7684\u5361",noCards:"\u6682\u65E0",loadMore:"\u52A0\u8F7D\u66F4\u591A",batchMerge:"\u4E00\u952E\u667A\u80FD\u5408\u5E76",mergeAllConfirm:"\u5C06\u6309\u76F8\u4F3C\u5EA6\u5206\u7EC4\u7684\u5361\u7247\u5404\u5408\u5E76\u4E3A\u4E00\u5F20\uFF08\u4FDD\u7559\u5404\u81EA kind\uFF09\uFF0C\u539F\u5361\u5220\u9664\uFF1F",crossVault:"\u8DE8\u5E93\u805A\u5408",deleteConfirm:"\u786E\u5B9A\u5220\u9664\u8BE5\u8BB0\u5FC6\u5361\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",deleted:"\u5DF2\u5220\u9664",deleteFail:"\u5220\u9664\u5931\u8D25",deleteSelected:"\u5220\u9664\u9009\u4E2D",deletedSelected:"\u5F20\u5361\u5DF2\u5220\u9664",merge:"\u5408\u5E76",mergeNeed:"\u81F3\u5C11\u9009 2 \u5F20\u5361",mergeConfirm:"\u5C06\u6240\u9009\u5361\u7247\u5408\u5E76\u4E3A\u4E00\u5F20\u5E76\u5220\u9664\u539F\u5361\uFF1F",merged:"\u5DF2\u5408\u5E76",mergeFail:"\u5408\u5E76\u5931\u8D25",mcpInstalled:"\u2705 {agent} MCP \u5DF2\u5B89\u88C5",mcpUninstalled:"\u2705 {agent} MCP \u5DF2\u5378\u8F7D",mcpActionFail:"\u274C {agent} MCP \u64CD\u4F5C\u5931\u8D25\uFF1A{error}",dshHostLabel:"DeepSeek Harness\uFF08\u5F53\u524D\u5BBF\u4E3B\uFF09",restartHint:"\u5DF2\u4FDD\u5B58\u3002autoWebMode/watchdogAutoSpawn \u7B49\u9700\u91CD\u542F DSH \u751F\u6548\uFF1B\u5DF2\u6709\u5E38\u9A7B watchdog \u4E0D\u4F1A\u88AB\u81EA\u52A8\u505C\u6389\uFF0C\u9700 dsh-memory stop / restart\uFF08#19\uFF09",conflictRefresh:"\u914D\u7F6E\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5",untitled:"\u65E0\u6807\u9898",tplBlank:"\u{1F4C4} \u7A7A\u767D",tagsHint:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",connCount:"{n} \u8FDE\u63A5",tplDecisionTags:"\u51B3\u7B56, \u65B9\u6848",tplBugTags:"\u8E29\u5751, \u6559\u8BAD",tplMeetingTags:"\u4F1A\u8BAE, \u7EAA\u8981",tplWeeklyTags:"\u5468\u62A5",tplDecisionBody:`# \u6280\u672F\u51B3\u7B56\uFF1A[\u6807\u9898]
6
+ var rn=Object.create;var Xt=Object.defineProperty;var sn=Object.getOwnPropertyDescriptor;var ln=Object.getOwnPropertyNames;var dn=Object.getPrototypeOf,cn=Object.prototype.hasOwnProperty;var pn=(t,a)=>{for(var o in a)Xt(t,o,{get:a[o],enumerable:!0})},Ta=(t,a,o,d)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of ln(a))!cn.call(t,c)&&c!==o&&Xt(t,c,{get:()=>a[c],enumerable:!(d=sn(a,c))||d.enumerable});return t};var mn=(t,a,o)=>(o=t!=null?rn(dn(t)):{},Ta(a||!t||!t.__esModule?Xt(o,"default",{value:t,enumerable:!0}):o,t)),un=t=>Ta(Xt({},"__esModule",{value:!0}),t);var ho={};pn(ho,{EN:()=>Ja,MemoryLibrary:()=>On,ZH:()=>qa,apply:()=>Dn,inject:()=>Tn});module.exports=un(ho);var n=mn(require("react"),1),Va=require("react-dom");var gn={"&":"&amp;","<":"&lt;",">":"&gt;"},da=t=>String(t).replace(/[&<>]/g,a=>gn[a]),fn=[[/结论|总结|tl;?dr|summary|takeaway/i,"\u2705","ok"],[/风险|注意|警告|禁止|坑|踩坑|务必/i,"\u26A0\uFE0F","warn"],[/根因|原因|为什么|定位|复现/i,"\u{1F50D}","info"],[/修复|解决|变更|fix/i,"\u{1F527}","ok"],[/验证|测试|实测|回归/i,"\u{1F9EA}","ok"],[/方案|做法|实现|设计|思路|架构/i,"\u{1F6E0}\uFE0F","plan"],[/步骤|流程|操作|用法|命令/i,"\u{1F9E9}","plan"],[/背景|由来|context/i,"\u{1F9ED}","info"],[/目标|需求|要解决/i,"\u{1F3AF}","plan"],[/环境|依赖|前置|安装/i,"\u{1F4E6}","info"],[/收益|效果|性能|指标|数据|统计/i,"\u{1F4C8}","ok"],[/示例|例子|样例|demo/i,"\u{1F4A1}","idea"],[/参考|链接|相关/i,"\u{1F517}","info"]],bn=["\u2728","info"],hn=[[/风险|注意|警告|禁止|坑|务必/i,"\u26A0\uFE0F","warn"],[/提示|建议|tip|best practice/i,"\u{1F4A1}","idea"],[/结论|总结/i,"\u2705","ok"],[/错误|失败|报错/i,"\u2757","bad"]],yn=t=>{let a=String(t);for(let[o,d,c]of fn)if(o.test(a))return[d,c];return bn},vn=t=>{let a=t.join(" ");for(let[o,d,c]of hn)if(o.test(a))return[d,c];return["\u{1F4CC}","info"]};function Pt(t){let a=String(t),o=/^([^::\s]{1,8})[::]\s*(.+)$/.exec(a);if(o&&!/[是为有了吗呢着过把被和与或于]/.test(o[1]))return'<span class="md-kv"><span class="md-k">'+da(o[1])+'</span><span class="md-v">'+Pt(o[2])+"</span></span>";let d=da(a);return d=d.replace(/^\[([ xX])\](?=\s|$)\s*/,(c,l)=>'<span class="md-task">'+(l.toLowerCase()==="x"?"\u2611":"\u2610")+"</span> "),d=d.replace(/`([^`\n]+)`/g,'<code class="md-code">$1</code>'),d=d.replace(/\*\*([^*]+)\*\*/g,'<strong class="md-b">$1</strong>'),d=d.replace(/(^|[^*])\*([^*\n]+)\*/g,"$1<em>$2</em>"),d=d.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(c,l,v)=>/^(https?:|\/|#)/i.test(v)?'<a class="md-link" href="'+v+'" target="_blank" rel="noopener noreferrer">'+l+"</a>":l),d}function Qt(t){let a=String(t||"").replace(/\r\n?/g,`
7
+ `),o=/^---\n([\s\S]*?)\n---\n?/.exec(a);if(!o)return{meta:[],body:a};let d=[];for(let c of o[1].split(`
8
+ `)){let l=c.indexOf(":");if(l<=0)continue;let v=c.slice(0,l).trim(),x=c.slice(l+1).trim().replace(/^["']|["']$/g,"");v&&d.push([v,x])}return{meta:d,body:a.slice(o[0].length)}}function Ra(t){let a=String(t||"").trim().replace(/^\[|\]$/g,"");return a?a.split(",").map(o=>o.trim().replace(/^["']|["']$/g,"")).filter(Boolean):[]}function _t(t){let a=Qt(String(t||"").replace(/\r\n?/g,`
9
+ `)).body;if(!a.trim())return"";let o=[],d=a.replace(/```([\w+#.-]*)\n([\s\S]*?)```/g,(z,H,O)=>(o.push('<pre class="md-pre"><code>'+da(O.replace(/\n$/,""))+"</code></pre>"),"\0F"+(o.length-1)+"\0")),c=[],l=0,v=[],x=null,k=null,I=()=>{v.length&&(c.push('<p class="md-p">'+v.join("<br/>")+"</p>"),v=[])},D=()=>{if(!x)return;let z=x.type;c.push("<"+z+' class="md-'+z+'">'+x.items.map(H=>"<li>"+H+"</li>").join("")+"</"+z+">"),x=null},M=()=>{if(!k)return;let[z,H]=vn(k);c.push('<div class="md-callout md-c-'+H+'"><span class="md-ico">'+z+"</span>"+k.join("<br/>")+"</div>"),k=null},y=()=>{I(),D(),M()};for(let z of d.split(`
10
+ `)){let H=z.trim();if(!H){y();continue}let O=/^\u0000F(\d+)\u0000$/.exec(H);if(O){y(),c.push(o[Number(O[1])]);continue}let F;if(F=/^(#{1,6})\s+(.+)$/.exec(H)){y();let[P,A]=yn(F[2]);l++,c.push('<div id="md-h-'+l+'" class="md-h md-h-'+(F[1].length<=2?"h1":"h2")+" md-c-"+A+'"><span class="md-ico">'+P+'</span><span class="md-hx">'+Pt(F[2])+"</span></div>");continue}if(/^(-{3,}|\*{3,}|_{3,})$/.test(H)){y(),c.push('<hr class="md-hr"/>');continue}if(F=/^>\s?(.*)$/.exec(H)){I(),D(),k=k||[],k.push(Pt(F[1]));continue}if(F=/^[-*+]\s+(.+)$/.exec(H)){I(),M(),(!x||x.type!=="ul")&&(D(),x={type:"ul",items:[]}),x.items.push(Pt(F[1]));continue}if(F=/^\d+[.)]\s+(.+)$/.exec(H)){I(),M(),(!x||x.type!=="ol")&&(D(),x={type:"ol",items:[]}),x.items.push(Pt(F[1]));continue}D(),M(),v.push(Pt(H))}return y(),c.join(`
11
+ `)}var Zt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAABccElEQVR4nO19B3hcxdX2e+buriR3cAndFIPtXbmq7cpFphhMTUiQvzTSCSEkBMiXAAFiTAgtDUghBL4vyUcC/BaEhGowxXLRSrJkY1taGzDVtLiAu6TdvXP+59xdOStZsnW3S7vv8zjE17szd2fec2bmzClAHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555JFHHnnkkUceeeSRRx555NGfQJl+gTySi5erqhzO0LaxHFSczHbJpSnkHPXOqbW14WS2m0dm4chw/3kkGYM7ts9QCs9op05quwqAq2P7OQBqk9pwHhlFXgEMIDBAryg6vZ25iJK8uzMZXKjodAaWkdVVHgMBotjzGChYAApBVyVb+AXSprQtfSS77Twyh7wCGEBYunTKMK0xPVXtS9vSR6razyP9yCuAAYTC9o4yJgxOVfvStvSRqvbzSD/yCmAAwUnGrIHQRx7pQ14BDByQSfCl4vy/v4NoH/nr44GDvAIYIHjX6y0kQsq359KH9JXqfvJID/IKYIDgQ9pZqRkpN9BJH9JXqvvJIz3IK4AE8HLV2MInSkoGIQvu/4loTpq25lZfnJ6+DgoZe5mDTL9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rWqVDh2UrjIoDeOIQV3xL+oqP1t+anudQUg5Z1uhen44/0JX2m8zfKmMrYyhgfah5krmTOZO5kDvPC3zvyCuAQEDfe8obWx8MUmqYINxBY8uBzjyv/Dv2t4pr015nT0Msk+Ue6+oskGtFpVQACGVsZ456UQOQ6kvfKHMlcyZzJ3KX7Hfsb8kZAG4jWrDvBFdYLGfx5RDPMEvDs9q0dF8Z6+aUTdV734QbRG6nOWhybdddkPqmyPmClLk83xFtw5OiCxxk423rAci1JjwQdasHMHL/Ws4u8AogDUV/1WQb4zjDpHUOcuKi4NrAHGULUe26lBvnS0Z8C+8v8gRmZFLSWKveQPSE86mA1wgT9uNy/fnle8O0jfwSIA0K0Cv/6Zbtdu+ds6Sj6bCaFP+alXhyQffUCGXMZe5kDmYu88MeH/A5ggKDBN/F0hlqShjllgp5b4d+QcSWQR+LI7wAGCI7k4XWKsCvV/Ugf0leq+8kjPcgrgAECq6gpY1Wq+5E+pK9U95NHepBXAAMHbDD8qUxCapVMY/izqCRZHgkirwAGEEJsLh8IfeSRPuQVwABCe2HBKmLsTVX70rb0kar280g/8gpgAGHOnLW7lMLqVLUvbUsfqWo/j/QjrwAGEhaCnVC1qbADSJvStvSR7LbzyBzy0YADCOIM06j5RafCDxOsenQAFAEhzS/mHW4GFvIKYIBhb8HIlc7QtskcUklVAeTSFCoY+U4y28wjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgjjzzyyCOPPPLII4888sgDtvD/AXvCXhuljgbyAAAAAElFTkSuQmCC";function za(t,a,o=48){if(!a||!t)return"";let d=String(t),c=d.toLowerCase(),l=String(a).toLowerCase();if(!l)return"";let v=c.indexOf(l);if(v<0)return"";let x=Math.max(0,v-o),k=Math.min(d.length,v+l.length+o),I=d.slice(x,k).replace(/\s+/g," ").trim();return(x>0?"\u2026":"")+I+(k<d.length?"\u2026":"")}function ca(t,a){let o=String(a||"").trim().toLowerCase();if(!o)return!0;let d=t||{},c=Array.isArray(d.tags)?d.tags.map(v=>String(v)):[],l=[d.title,d.summary,d.reason,d.path,d.submittedBy,...c].map(v=>String(v||"")).join(`
12
+ `).toLowerCase();return o.split(/\s+/).filter(Boolean).every(v=>l.includes(v))}function Da({hasVersion:t=!1,hostVersion:a="",onDisk:o="",residentServed:d="",residentPresent:c=!1,residentManaged:l=null,residentManagedKnown:v=null,residentManagedBy:x="",replaceBlocked:k=null}={}){let I=String(o||""),D=String(a||""),M=String(d||""),y=!!(t&&c&&!M),z=!!(I&&M&&M!==I),H=l===!1&&v===!1,O=x==="host",F=l===!1&&!H&&!O,P=!!(D&&I&&D!==I),A=!!(k&&k.fresh),G=z||y||F||H,re=null;P?re="hostProcessStale":y?re="residentDown":A?re="residentReplaceBlocked":H?re="residentLockUnknown":F&&(re="residentUnmanaged");let K;return y?K="restartStart":z?K="restartFixes":F||H?K="restartRepair":P?K="restartHostOnly":K="restartAnyway",{showButton:!!t,emphasis:G,warn:re,hint:K,hostStale:P,residentDown:y,residentStale:z,residentUnmanaged:F,residentLockUnknown:H,residentHostManaged:O,needsRestart:G}}var wn=/^\d{4}-\d{2}-\d{2}$/,ea=t=>String(t).padStart(2,"0");function Ut(t){if(t==null||t==="")return null;if(t instanceof Date)return Number.isNaN(t.getTime())?null:t;let a=String(t).trim();if(!a)return null;if(wn.test(a)){let[d,c,l]=a.split("-").map(Number),v=new Date(d,c-1,l);return Number.isNaN(v.getTime())?null:v}let o=new Date(a);return Number.isNaN(o.getTime())?null:o}var Aa=t=>`${t.getFullYear()}-${ea(t.getMonth()+1)}-${ea(t.getDate())}`,La=t=>`${ea(t.getHours())}:${ea(t.getMinutes())}`;function ta(t){let a=Ut(t);return a?Aa(a):""}function pa(t){let a=Ut(t);return a?Aa(a)+" "+La(a):""}function Fa(t){let a=Ut(t);return a?La(a):""}function Pa(t={}){let a=t.repo||"EternalNight996/memory-eternal",o=String(t.title||"[Bug] ").slice(0,120),d=Array.isArray(t.labels)?t.labels:["bug"],c=Number(t.maxLength)>500?Number(t.maxLength):7e3,l=k=>{let I=new URLSearchParams;return I.set("title",o),I.set("body",k),d.length&&I.set("labels",d.join(",")),"https://github.com/"+a+"/issues/new?"+I.toString()},v=String(t.body||""),x=l(v);if(x.length>c){let k=`
13
+
14
+ > \u5185\u5BB9\u8FC7\u957F\u5DF2\u622A\u65AD\uFF1A\u5B8C\u6574\u8BCA\u65AD\u8BF7\u5728\u63D2\u4EF6\u91CC\u70B9\u300C\u590D\u5236\u8BCA\u65AD\u4FE1\u606F\u300D\uFF0C\u518D\u8865\u5230 issue \u8BC4\u8BBA\u91CC\u3002`,I=D=>l(v.slice(0,D)+k);if(I(0).length>c)v=k;else{let D=0,M=v.length;for(;D<M;){let y=Math.ceil((D+M)/2);I(y).length<=c?D=y:M=y-1}v=v.slice(0,D)+k}x=l(v)}return x}function Ia(t={}){return["## \u73B0\u8C61",String(t.description||"").trim()||"\uFF08\u8BF7\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF09","","## \u590D\u73B0\u6B65\u9AA4","1. ","2. ","","## \u671F\u671B\u884C\u4E3A","","## \u5B9E\u9645\u884C\u4E3A","","## \u73AF\u5883","- \u63D2\u4EF6\u7248\u672C: "+(t.version||"\uFF08\u89C1\u8BCA\u65AD\u4FE1\u606F\uFF09"),"",t.diagnostics||"","","---","> \u7531 memory-eternal \u63D2\u4EF6\u5185\u300C\u53CD\u9988\u5F02\u5E38\u300D\u751F\u6210\uFF08\u8BCA\u65AD\u4FE1\u606F\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E\u5404\u7C7B key/token \u5DF2\u66FF\u6362\uFF09\u3002"].join(`
15
+ `)}var ma="https://github.com/EternalNight996/memory-eternal",kn=["\u6211\u5728\u4F7F\u7528 memory-eternal\uFF08DeepSeek Harness \u7684\u8BB0\u5FC6\u63D2\u4EF6\uFF09\u65F6\u9047\u5230\u4E86\u95EE\u9898\uFF0C\u8BF7\u4F60\u5E2E\u6211\u628A\u8FD9\u4E2A\u95EE\u9898\u63D0\u4EA4\u5230 GitHub\u3002","","\u4ED3\u5E93\uFF1A"+ma,"","\u8BF7\u6309\u8FD9\u4E2A\u6D41\u7A0B\u505A\uFF1A","","1. \u5148\u8DD1 `gh issue list --repo EternalNight996/memory-eternal --state open --limit 50`\uFF0C\u770B\u662F\u5426\u5DF2\u6709\u76F8\u540C\u95EE\u9898\uFF1A"," - \u5DF2\u6709 \u2192 \u7528 `gh issue comment <\u7F16\u53F7> --body-file <\u6587\u4EF6>` \u8865\u5145\u73B0\u8C61\uFF0C\u4E0D\u8981\u91CD\u590D\u5F00\u65B0 issue\uFF1B"," - \u6CA1\u6709 \u2192 \u7EE7\u7EED\u7B2C 2 \u6B65\u3002",'2. \u628A\u6B63\u6587\u5199\u6210\u6587\u4EF6\uFF0C\u7136\u540E `gh issue create --repo EternalNight996/memory-eternal --title "[Bug] <\u4E00\u53E5\u8BDD\u6982\u62EC>" --body-file <\u6587\u4EF6>`\uFF1B\u6B63\u6587\u7528\u8FD9\u4E2A\u7ED3\u6784\uFF1A'," \u73B0\u8C61 / \u590D\u73B0\u6B65\u9AA4 / \u671F\u671B\u884C\u4E3A / \u5B9E\u9645\u884C\u4E3A / \u73AF\u5883\uFF08\u63D2\u4EF6\u7248\u672C / DSH \u7248\u672C / \u64CD\u4F5C\u7CFB\u7EDF / Node\uFF09/ \u8BCA\u65AD\u4FE1\u606F\u3002","3. \u5982\u679C `gh` \u6CA1\u767B\u5F55\u6216\u4E0D\u53EF\u7528\uFF0C\u4E0D\u8981\u5C1D\u8BD5\u63D0\u4EA4\uFF0C\u6539\u4E3A\u8F93\u51FA\u4E00\u6761\u300C\u6807\u9898\u4E0E\u6B63\u6587\u90FD\u5DF2\u9884\u586B\u300D\u7684 GitHub \u65B0\u5EFA issue \u94FE\u63A5\u7ED9\u6211\uFF0C\u6211\u81EA\u5DF1\u70B9\u63D0\u4EA4\u3002","4. \u63D0\u4EA4\u6210\u529F\u540E\uFF0C\u628A issue \u94FE\u63A5\u53D1\u7ED9\u6211\u3002","","\u6CE8\u610F\uFF1A\u6211\u7684\u95EE\u9898\u63CF\u8FF0\u8BF7\u539F\u6837\u7167\u5F55\uFF0C\u4E0D\u8981\u66FF\u6211\u7F8E\u5316\u6216\u7701\u7565\u7EC6\u8282\uFF1B\u8BCA\u65AD\u4FE1\u606F\u539F\u6837\u653E\u8FDB\u300C\u8BCA\u65AD\u4FE1\u606F\u300D\u4E00\u8282\u3002","","\u6211\u7684\u95EE\u9898\u63CF\u8FF0\uFF1A","<\u5728\u8FD9\u91CC\u5199\u4F60\u7684\u95EE\u9898>","","\u8BCA\u65AD\u4FE1\u606F\uFF1A","<\u628A\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5F39\u7A97\u91CC\u590D\u5236\u7684\u8BCA\u65AD\u4FE1\u606F\u7C98\u5230\u8FD9\u91CC>"].join(`
16
+ `),Sn=["I hit a problem while using memory-eternal (a DeepSeek Harness memory plugin). Please file it on GitHub for me.","","Repo: "+ma,"","Workflow:","","1. Run `gh issue list --repo EternalNight996/memory-eternal --state open --limit 50` first: if a matching issue exists, add a comment with `gh issue comment <n> --body-file <file>` instead of opening a duplicate.",'2. Otherwise create it with `gh issue create --repo EternalNight996/memory-eternal --title "[Bug] <one-line summary>" --body-file <file>`, using sections: Symptoms / Steps to reproduce / Expected / Actual / Environment (plugin, DSH, OS, Node) / Diagnostics.',"3. If `gh` is not authenticated or unavailable, do NOT try to submit: output a GitHub new-issue link with the title and body pre-filled instead, and I will click submit myself.","4. Report the resulting issue URL back to me.","","Keep my description verbatim - do not rewrite or summarise it. Put the diagnostics under the Diagnostics section as-is.","","My description:","<write your problem here>","","Diagnostics:","<paste the diagnostics copied from the in-app Report-a-bug dialog>"].join(`
17
+ `);function Ba(t={}){let a=t.lang==="en"?"en":"zh",o=a==="en"?Sn:kn,d=t.repo||"EternalNight996/memory-eternal";return o=o.split(ma).join("https://github.com/"+d),t.description&&(o=o.replace(a==="en"?"<write your problem here>":"<\u5728\u8FD9\u91CC\u5199\u4F60\u7684\u95EE\u9898>",String(t.description).trim())),t.diagnostics&&(o=o.replace(a==="en"?"<paste the diagnostics copied from the in-app Report-a-bug dialog>":"<\u628A\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5F39\u7A97\u91CC\u590D\u5236\u7684\u8BCA\u65AD\u4FE1\u606F\u7C98\u5230\u8FD9\u91CC>",String(t.diagnostics).trim())),o}function ja({panX:t=0,panY:a=0,zoom:o=1,w:d=0,h:c=0,margin:l=60}={}){let v=o||1;return{x0:(0-t)/v-l,y0:(0-a)/v-l,x1:(d-t)/v+l,y1:(c-a)/v+l}}function aa(t,a,o,d){return d?t+o>=d.x0&&t-o<=d.x1&&a+o>=d.y0&&a-o<=d.y1:!0}function Ea(t){let a=Number(t)||0;return a<=120?1/0:a<=300?160:a<=600?90:60}function Ha(t,a={}){let o=Number.isFinite(a.limit)?a.limit:1/0,d=new Set,c=k=>{k&&d.size<o&&d.add(k)};if(c(a.focusId),c(a.hoverId),a.searchHits)for(let k of a.searchHits){if(d.size>=o)break;d.add(k)}let l=a.degree||{},v=k=>Number(l[k])||0,x=[];for(let k of Array.isArray(t)?t:[])k&&k.id&&!d.has(k.id)&&x.push(k);x.sort((k,I)=>v(I.id)-v(k.id));for(let k of x){if(d.size>=o)break;d.add(k.id)}return d}function Oa(t){let a=Math.floor(Number(t)||0);return a<=0?0:a>1200?48:a>700?60:a>300?110:200}function Nn(t,a){if(t===a)return!0;if(t===null||a===null||t===void 0||a===void 0||typeof t!="object"&&typeof a!="object")return t===a;try{return JSON.stringify(t)===JSON.stringify(a)}catch{return!1}}function Wa(t,a){let o={...t||{}},d={};for(let[c,l]of Object.entries(a||{}))Nn(t?t[c]:void 0,l)||(o[c]=l,d[c]=l);return{values:o,overlay:d}}var e=require("react/jsx-runtime"),It="memory-eternal",W="/memory-eternal/api";async function ha(t){try{let a=await fetch(`${W}/open-external?url=${encodeURIComponent(t)}`,{method:"POST"}),o=await a.json().catch(()=>null);if(a.ok&&o&&o.ok)return!0}catch{}try{if(window.open(t,"_blank","noopener,noreferrer"))return!0}catch{}try{let a=document.createElement("a");return a.href=t,a.target="_blank",a.rel="noopener noreferrer",a.click(),!0}catch{}return!1}var Mn=100,Tn=["slots","locale"],qa={nav:"\u8BB0\u5FC6",loading:"\u52A0\u8F7D\u4E2D\u2026",loadingGraph:"\u6B63\u5728\u52A0\u8F7D\u77E5\u8BC6\u661F\u56FE\u2026",refresh:"\u5237\u65B0",overview:"\u8BB0\u5FC6\u5E93\u6982\u89C8",total:"\u77E5\u8BC6\u5361",recent:"\u8FD1 7 \u5929\u65B0\u589E",tags:"\u6807\u7B7E",searchPlaceholder:"\u641C\u7D22\u8BB0\u5FC6\uFF08\u652F\u6301\u4E2D\u6587\u7247\u6BB5\uFF09\u2026",search:"\u641C\u7D22",all:"\u5168\u90E8",kindProject:"\u9879\u76EE",kindKnowledge:"\u77E5\u8BC6",kindContent:"\u5185\u5BB9",kindPrompt:"\u63D0\u793A\u8BCD",kindBusiness:"\u4E1A\u52A1",kindTool:"\u5DE5\u5177",kindMistake:"\u6559\u8BAD",kindCore:"\u6838\u5FC3\u8BB0\u5FC6",kindSkill:"\u6280\u80FD",newsTab:"\u65B0\u95FB",newsTitle:"\u65B0\u95FB",newsHint:"\u6BCF\u65E5 AI \u65B0\u95FB\u3001\u672C\u6708\u699C\u5355\uFF0C\u4EE5\u53CA\u4F60\u81EA\u5DF1\u7684\u53D1\u5E03\u3002",newsNew:"\u5199\u4E00\u6761",newsSearch:"\u641C\u7D22\u6807\u9898 / \u6B63\u6587 / \u6807\u7B7E\u2026",newsUnreadOnly:"\u53EA\u770B\u672A\u8BFB",newsEmpty:"\u8FD8\u6CA1\u6709\u65B0\u95FB\u3002\u5199\u7B2C\u4E00\u6761\u53D1\u5E03\u3001\u51B3\u7B56\u6216\u56E2\u961F\u7B80\u62A5\u3002",newsNoMatch:"\u6CA1\u6709\u5339\u914D\u7684\u65B0\u95FB",newsPinned:"\u7F6E\u9876",newsRead:"\u5DF2\u8BFB",newsUnread:"\u672A\u8BFB",newsMarkRead:"\u6807\u8BB0\u5DF2\u8BFB",newsMarkUnread:"\u6807\u8BB0\u672A\u8BFB",newsEdit:"\u7F16\u8F91",newsDeleteConfirm:"\u5220\u9664\u8FD9\u6761\u65B0\u95FB\uFF1F",newsDeleted:"\u5DF2\u5220\u9664",newsSave:"\u4FDD\u5B58",newsSaving:"\u4FDD\u5B58\u4E2D\u2026",newsSaved:"\u5DF2\u4FDD\u5B58",newsSaveFail:"\u4FDD\u5B58\u5931\u8D25",newsTitleField:"\u6807\u9898",newsBodyField:"\u6B63\u6587\uFF08Markdown\uFF09",newsCategoryField:"\u5206\u7C7B",newsSourceField:"\u6765\u6E90",newsUrlField:"\u94FE\u63A5",newsTagsField:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",newsDateField:"\u65E5\u671F",newsPinField:"\u7F6E\u9876",newsPreview:"\u9884\u89C8",newsEditBody:"\u7F16\u8F91\u6B63\u6587",newsOpenLink:"\u6253\u5F00\u94FE\u63A5",newsToday:"\u4ECA\u5929",newsYesterday:"\u6628\u5929",newsEarlier:"\u66F4\u65E9",newsTitlePlaceholder:"\u4F8B\u5982\uFF1Av0.20.0 \u53D1\u5E03\u8BF4\u660E",newsBodyPlaceholder:"\u5199\u70B9\u503C\u5F97\u7559\u4E0B\u7684\u5185\u5BB9\u2026\u652F\u6301 Markdown",newsCountUnit:"\u6761",cancel:"\u53D6\u6D88",newsDaily:"\u4ECA\u65E5\u65B0\u95FB",newsMonthly:"\u672C\u6708",newsMine:"\u6211\u7684\u65B0\u95FB",newsDailySub:"\u6BCF\u65E5\u6700\u65B0\u7684 AI \u65B0\u95FB\uFF0C\u4E2D\u6587\u4F18\u5148",newsMonthlySub:"\u672C\u6708 AI \u65B0\u95FB\uFF1A\u4E2D\u6587\u6309\u65F6\u95F4\u5F52\u6863\uFF0C\u82F1\u6587\u6309 Hacker News \u70ED\u5EA6",newsMineSub:"\u4F60\u81EA\u5B9A\u4E49\u7684\u53D1\u5E03\u3001\u51B3\u7B56\u548C\u56E2\u961F\u7B80\u62A5",newsLoading:"\u6B63\u5728\u62C9\u53D6\u8D44\u8BAF\u2026",newsFeedError:"\u8D44\u8BAF\u6E90\u6682\u65F6\u4E0D\u53EF\u7528",newsHeat:"\u70ED\u5EA6",newsComments:"\u8BC4\u8BBA",newsOriginal:"\u9605\u8BFB\u539F\u6587",newsUpdatedAt:"\u66F4\u65B0\u4E8E",newsPartialFail:"\u90E8\u5206\u6765\u6E90\u5931\u8D25",newsFeedEmpty:"\u4ECA\u5929\u8FD8\u6CA1\u6709\u6293\u5230\u8D44\u8BAF\uFF0C\u70B9\u5237\u65B0\u518D\u8BD5\u3002",newsFeedRefresh:"\u5237\u65B0\u8D44\u8BAF",newsLoadingHint:"\u9996\u6B21\u52A0\u8F7D\u4F1A\u6293\u53D6\u591A\u4E2A\u4E2D\u6587\u8D44\u8BAF\u6E90\uFF0C\u53EF\u80FD\u9700\u8981\u51E0\u79D2\u2026",newsRetry:"\u91CD\u8BD5",newsSearchGo:"\u641C\u7D22",newsSortRec:"\u4E3A\u4F60\u63A8\u8350",newsSortTime:"\u6700\u65B0",newsPersonalized:"\u5DF2\u6309\u4F60\u7684\u559C\u7231\u5B9A\u5236\u6392\u5E8F",newsLastQuery:"\u4E0A\u6B21\u641C\u7D22",newsResetPrefs:"\u91CD\u7F6E\u504F\u597D",newsHeroEye:"NEWSROOM \xB7 AI \u60C5\u62A5\u7AD9",newsHeroHint:"\u641C\u7D22\u4E00\u6B21\u5C31\u4F1A\u88AB\u8BB0\u4F4F\uFF0C\u4E0B\u6B21\u6253\u5F00\u81EA\u52A8\u6309\u4F60\u7684\u53E3\u5473\u6392\u5E8F\uFF1B\u53EA\u5728\u672C\u9875\u9996\u6B21\u6253\u5F00\u65F6\u62C9\u53D6\u4E00\u6B21\u6570\u636E\u3002",newsMatched:"\u6761\u547D\u4E2D",newsNoMatch:"\u6CA1\u6709\u5339\u914D\u7684\u8D44\u8BAF",newsNoMatchHint:"\u8FD9\u6279\u6570\u636E\u91CC\u6CA1\u6709\u547D\u4E2D\u5F53\u524D\u5173\u952E\u8BCD + \u5206\u7C7B + \u8BED\u8A00\u7684\u6761\u76EE\uFF0C\u6E05\u9664\u7B5B\u9009\u5C31\u80FD\u770B\u56DE\u5168\u90E8\u3002",newsClearFilters:"\u6E05\u9664\u7B5B\u9009",newsJustNow:"\u521A\u521A",newsMinutesAgo:"\u5206\u949F\u524D",newsHoursAgo:"\u5C0F\u65F6\u524D",newsDaysAgo:"\u5929\u524D",newsLangZh:"\u4E2D\u6587",newsLangEn:"\u82F1\u6587",newsLangAll:"\u4E0D\u9650",newsZhArchive:"\u4E2D\u6587\u6708\u699C\u6309\u65F6\u95F4\u5F52\u6863\uFF08\u4E2D\u6587\u6E90\u6682\u65E0\u516C\u5F00\u70ED\u5EA6\u5206\u6570\uFF09",newsEnRanking:"\u82F1\u6587\u6708\u699C\u6309 Hacker News \u5206\u6570\u6392\u540D",skillCards:"\u6280\u80FD\u5361",skillCardsHint:"\u4ECE\u672C\u673A\u5B9E\u9645\u5B89\u88C5/\u53EF\u7528\u7684\u6280\u80FD\u751F\u6210\u5361\u7247\uFF0C\u5F3A\u5236\u8FDB\u5165\u5BA1\u6838\uFF1B\u4E0D\u7531 Agent \u5BF9\u8BDD\u6C89\u6DC0\u3002",skillAutoSync:"\u81EA\u52A8\u540C\u6B65\u6280\u80FD\u5361",syncSkills:"\u540C\u6B65\u6280\u80FD",syncingSkills:"\u6B63\u5728\u540C\u6B65\u6280\u80FD\u2026",skillsSyncDone:"\u6280\u80FD\u5361\u540C\u6B65\u5B8C\u6210",skillsScanned:"\u626B\u63CF",skillsCreated:"\u65B0\u589E",skillsUpdated:"\u66F4\u65B0",skillsPendingUpdates:"\u5F85\u5BA1\u66F4\u65B0",skillsSyncFail:"\u6280\u80FD\u5361\u540C\u6B65\u5931\u8D25",cardsTab:"\u77E5\u8BC6\u5361",webTab:"Web \u7248",webOpening:"\u6B63\u5728\u7528\u9ED8\u8BA4\u6D4F\u89C8\u5668\u6253\u5F00 Web \u7248\u2026",webOpened:"\u5DF2\u7528\u9ED8\u8BA4\u6D4F\u89C8\u5668\u6253\u5F00 Web \u7248",webOpenFail:"\u6253\u5F00\u6D4F\u89C8\u5668\u5931\u8D25\uFF0C\u53EF\u624B\u52A8\u8BBF\u95EE",terminalTab:"\u7EC8\u7AEF\u7248",terminalTitle:"\u7EC8\u7AEF\u5B8C\u6574\u7248",terminalIntro:"Web UI \u4E0D\u6E32\u67D3\u7EC8\u7AEF\u539F\u751F TUI\u3002\u8981\u5B8C\u6574\u6279\u5361\u3001\u957F\u6587\u6EDA\u52A8\u548C\u5168\u9009\uFF0C\u8BF7\u6253\u5F00\u672C\u673A\u7EC8\u7AEF\uFF1B\u6216\u8005\u76F4\u63A5\u5728 dsh-tui \u91CC\u7528 /audit\u3002",terminalRun:"\u53EA\u8BFB\u4F53\u9A8C\uFF08\u771F\u5B9E\u961F\u5217\uFF09",terminalTui:"\u5199\u5165\u6A21\u5F0F\uFF08\u771F\u5B9E\u6279\u9A73\uFF09",terminalWhy:"\u4E3A\u4EC0\u4E48\u4E0D\u76F4\u63A5\u5D4C\u8FDB\u7F51\u9875",terminalWhyBody:"\u7EC8\u7AEF TUI \u4F9D\u8D56 alternate screen\u3001\u539F\u59CB\u952E\u76D8\u4E8B\u4EF6\u548C\u5B57\u7B26\u7F51\u683C\uFF0C\u65E0\u6CD5\u7528 iframe \u5FE0\u5B9E\u5D4C\u5165\u3002\u8FD9\u91CC\u7ED9\u51FA\u771F\u5B9E\u547D\u4EE4\uFF0C\u6253\u5F00\u540E\u5C31\u662F\u540C\u4E00\u5957\u754C\u9762\u3002",terminalCopy:"\u590D\u5236\u547D\u4EE4",terminalCopied:"\u5DF2\u590D\u5236",terminalPreview:"\u7EC8\u7AEF\u9884\u89C8",graphTab:"\u77E5\u8BC6\u661F\u56FE",graph:"\u77E5\u8BC6\u56FE\u8C31",graphHint:"\u8282\u70B9=\u77E5\u8BC6\u5361\uFF1B\u8FDE\u7EBF=[[\u94FE\u63A5]] \u6216\u5171\u4EAB\u6807\u7B7E\u3002\u70B9\u51FB\u8282\u70B9\u9605\u8BFB\u5361\u7247\u3002",graphTip:"\u5DE6\u952E\u51F8\u663E \xB7 Shift+\u62D6\u62FD\u6846\u9009 \xB7 \u53F3\u952E\u83DC\u5355 \xB7 \u6EDA\u8F6E\u7F29\u653E \xB7 \u62D6\u62FD\u5E73\u79FB",rebuild:"\u91CD\u5EFA",reset:"\u91CD\u7F6E",expandAll:"\u5168\u90E8\u5C55\u5F00",capped:"\u5DF2\u5C55\u793A\u6700\u6838\u5FC3\u7684",clearFocus:"\u53D6\u6D88\u9AD8\u4EAE",empty:"\u8BB0\u5FC6\u5E93\u8FD8\u662F\u7A7A\u7684\u3002\u591A\u804A\u51E0\u8F6E\u540E\uFF0C\u503C\u5F97\u4FDD\u5B58\u7684\u5185\u5BB9\u4F1A\u81EA\u52A8\u6C89\u6DC0\u6210\u77E5\u8BC6\u5361\u3002",emptyGraph:"\u56FE\u8C31\u6682\u65E0\u6570\u636E\u3002",open:"\u9605\u8BFB",updated:"\u66F4\u65B0\u4E8E",created:"\u521B\u5EFA\u4E8E",source:"\u6765\u6E90",contents:"\u76EE\u5F55",related:"\u76F8\u5173\u8BB0\u5FC6",file:"\u6587\u4EF6",close:"\u5173\u95ED",vaultDir:"\u8BB0\u5FC6\u5E93\u76EE\u5F55",capture:"\u81EA\u52A8\u6C89\u6DC0",recall:"\u81EA\u52A8\u53EC\u56DE",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",error:"\u52A0\u8F7D\u5931\u8D25",back:"\u8FD4\u56DE\u5217\u8868",cardCount:"\u5F20\u5361",nodes:"\u8282\u70B9",edges:"\u8FDE\u7EBF",memoryTitle:"\u8BB0\u5FC6\u5E93",memoryHint:"\u4F60\u7684\u672C\u5730\u7B2C\u4E8C\u5927\u8111",zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",fit:"\u9002\u5E94",enterFullscreen:"\u5168\u5C4F",exitFullscreen:"\u9000\u51FA\u5168\u5C4F",exportGraph:"\u5BFC\u51FA",openCard:"\u6253\u5F00\u5361\u7247",focusNeighbors:"\u51F8\u663E\u5173\u8054",copyName:"\u590D\u5236\u540D\u79F0",noMatch:"\u6CA1\u6709\u5339\u914D\u7684\u8BB0\u5FC6",clearFilter:"\u6E05\u9664\u8FC7\u6EE4",filterLabel:"\u7B5B\u9009",sortRecent:"\u6700\u8FD1",sortTitle:"\u6807\u9898",sortHot:"\u70ED\u70B9",exportSel:"\u5BFC\u51FA\u9009\u4E2D",clearSelection:"\u6E05\u7A7A\u9009\u62E9",download:"\u4E0B\u8F7D",openNewTab:"\u65B0\u6807\u7B7E\u6253\u5F00",copyImage:"\u590D\u5236\u56FE\u7247",done:"\u5B8C\u6210",downloaded:"\u5DF2\u5F00\u59CB\u4E0B\u8F7D",openedTab:"\u5DF2\u5728\u65B0\u6807\u7B7E\u6253\u5F00",copied:"\u5DF2\u590D\u5236",exportedSel:"\u4E2A\u8282\u70B9\u5DF2\u5BFC\u51FA",fullscreen:"\u5168\u5C4F",exitFull:"\u9000\u51FA\u5168\u5C4F",copyFail:"\u590D\u5236\u5931\u8D25",timeDim:"\u65F6\u95F4\u7EF4",graphWarming:"\u6B63\u5728\u5E03\u5C40 {n} \u4E2A\u8282\u70B9\u2026",timeNew:"3 \u5929\u5185",timeRecent:"2 \u5468\u5185",timeMonth:"1 \u6708\u5185",timeOld:"\u66F4\u65E9",newBadge:"\u65B0",expand:"\u5C55\u5F00\u5168\u90E8",collapse:"\u6536\u8D77",copyBody:"\u590D\u5236\u6B63\u6587",clearFilter:"\u6E05\u9664\u6807\u7B7E\u7B5B\u9009",copyPath:"\u590D\u5236\u8DEF\u5F84",copied:"\u5DF2\u590D\u5236",copyFail:"\u590D\u5236\u5931\u8D25",readWidth:"\u9605\u8BFB\u5BBD\u5EA6",widthNarrow:"\u7A84",widthMid:"\u4E2D",widthWide:"\u5BBD",exportVault:"\u5BFC\u51FAMD",exportJson:"\u5BFC\u51FAJSON",exporting:"\u5BFC\u51FA\u4E2D\u2026",exportedVault:"\u8BB0\u5FC6\u5E93\u5DF2\u5BFC\u51FA",exportFail:"\u5BFC\u51FA\u5931\u8D25",importVault:"\u5BFC\u5165",importedVault:"\u5BFC\u5165\u5B8C\u6210",importedTotal:" \u5F20 / \u6587\u4EF6\u5171 ",importedTotalTail:" \u5F20",importedQuarantine:" \xB7 \u5F85\u5BA1\u6838 ",importedQuarantineTail:" \u5F20\uFF08\u9694\u79BB\u533A\uFF0C\u6279\u51C6\u540E\u624D\u53C2\u4E0E\u53EC\u56DE\uFF09",importedSkipped:" \xB7 \u8DF3\u8FC7 ",importedSkippedTail:" \u5F20\uFF08\u91CD\u590D\u6216\u7A7A\uFF09",importFail:"\u5BFC\u5165\u5931\u8D25",location:"\u81EA\u9009\u4F4D\u7F6E",saveAs:"\u53E6\u5B58\u4E3A",saveAsUnsupported:"\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u9009\u62E9\u4FDD\u5B58\u4F4D\u7F6E",exportedTo:"\u5DF2\u5BFC\u51FA\u5230",defaultDownloads:"\u9ED8\u8BA4\u4E0B\u8F7D\u6587\u4EF6\u5939",exportCancel:"\u5DF2\u53D6\u6D88\u5BFC\u51FA",manage:"\u7BA1\u7406",tabUsage:"\u8FD0\u884C\u72B6\u6001",tabOptimize:"\u6574\u7406\u5EFA\u8BAE",adminLoadFail:"\u6570\u636E\u52A0\u8F7D\u5931\u8D25\uFF1A\u8BF7\u5F7B\u5E95\u91CD\u542F dsh-desktop\uFF08host \u9700\u52A0\u8F7D\u65B0\u7248 /memory-eternal \u8DEF\u7531\uFF09",retry:"\u91CD\u8BD5",mergeSimilar:"\u4E00\u952E\u5408\u5E76\u76F8\u4F3C",trendLabel:"\u8FD1 30 \u5929\u8D8B\u52BF",cleanStale:"\u{1F5D1}\uFE0F \u4E00\u952E\u6E05\u7406\u9648\u65E7",deletedStale:"\u4E2A\u9648\u65E7\u5361\u5DF2\u6E05\u7406",newCard:"\u65B0\u5EFA",tplDecision:"\u{1F4DD} \u6280\u672F\u51B3\u7B56",tplBug:"\u{1F41B} \u8E29\u5751",tplMeeting:"\u{1F4CB} \u4F1A\u8BAE\u7EAA\u8981",tplWeekly:"\u{1F4CA} \u5468\u62A5",createCard:"\u521B\u5EFA",cardTitle:"\u6807\u9898",cardBody:"\u6B63\u6587",fbUseful:"\u6709\u7528",fbIrr:"\u65E0\u5173",todayAdd:"\u4ECA\u65E5\u65B0\u589E",weekAdd:"\u8FD1 7 \u5929",byKind:"\u5206\u7C7B\u7EDF\u8BA1",todayList:"\u4ECA\u65E5\u6C89\u6DC0",budgetLabel:"\u4F1A\u8BDD\u9884\u7B97",budgetChars:"\u9884\u7B97\u5B57\u7B26",recallLimitLabel:"\u53EC\u56DE\u6761\u6570",embeddingLabel:"\u8BED\u4E49\u53EC\u56DE",mergePairs:"\u76F8\u4F3C\u5361\u5BF9\uFF08\u53EF\u5408\u5E76\uFF09",staleCards:"\u9648\u65E7\u5361\uFF08>90 \u5929\u672A\u66F4\u65B0\uFF09",noOptimize:"\u6682\u65E0\u53EF\u6574\u7406\u9879\uFF0C\u5F88\u5065\u5EB7 \u{1F389}",refineTitle:"\u77DB\u76FE\u626B\u63CF",refineScan:"\u5F00\u59CB\u626B\u63CF",refineHint:"\u76F8\u4F3C\u53EF\u4EE5\u5408\u5E76\uFF0C\u77DB\u76FE\u5FC5\u987B\u4EBA\u5224\u65AD \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u9009\u62E9\u540E\u624D\u52A8\u6570\u636E\uFF08\u4FDD\u7559\u4E00\u5F20\u4F1A\u628A\u53E6\u4E00\u5F20\u653E\u8FDB\u56DE\u6536\u7AD9\uFF0C\u53EF\u8FD8\u539F\uFF09",refineIdle:"\u70B9\u300C\u5F00\u59CB\u626B\u63CF\u300D\uFF1A\u5148\u5BBD\u53EC\u56DE\u53EF\u80FD\u6709\u5173\u7CFB\u7684\u5361\u7247\u5BF9\uFF0C\u518D\u8BA9\u6A21\u578B\u5224\u65AD\u662F\u91CD\u590D / \u8865\u5145 / \u77DB\u76FE / \u65E0\u5173",refineNone:"\u8FD9\u4E00\u8F6E\u6CA1\u6709\u53D1\u73B0\u9700\u8981\u4F60\u88C1\u51B3\u7684\u5361\u7247\u5BF9 \u{1F389}",refineFail:"\u77DB\u76FE\u626B\u63CF\u5931\u8D25",refineApplied:"\u5DF2\u8BB0\u5F55\u4F60\u7684\u88C1\u51B3\uFF08\u4E0D\u4F1A\u91CD\u590D\u6253\u6270\uFF09",refineRel_duplicate:"\u91CD\u590D\uFF08\u53EF\u5408\u5E76\uFF09",refineRel_complement:"\u8865\u5145\uFF08\u90FD\u7559\u7740\uFF09",refineRel_conflict:"\u77DB\u76FE\uFF08\u9700\u4F60\u88C1\u51B3\uFF09",refineRel_unrelated:"\u65E0\u5173",refineKeepA:"\u4FDD\u7559 A",refineKeepB:"\u4FDD\u7559 B",refineKeepBoth:"\u90FD\u4FDD\u7559",refineMerge:"\u5408\u5E76",junkTitle:"\u6CE8\u5165\u5783\u573E\u5361",junkScan:"\u626B\u63CF\u5B58\u91CF",junkHint:"\u6000\u7591\u662F\u8FD0\u884C\u65F6\u6CE8\u5165\u6587\u672C\uFF08\u6280\u80FD\u76EE\u5F55 / system-reminder\uFF09\u6C89\u6DC0\u6210\u7684\u5361 \u2014\u2014 \u626B\u63CF\u53EA\u8BFB\uFF0C\u56DE\u6536\u8D70\u56DE\u6536\u7AD9\u53EF\u8FD8\u539F",junkIdle:"\u70B9\u300C\u626B\u63CF\u5B58\u91CF\u300D\uFF1A\u627E\u51FA\u6B63\u6587\u5176\u5B9E\u662F\u88AB\u6CE8\u5165\u7684\u8FD0\u884C\u65F6\u6587\u672C\u3001\u5265\u6389\u540E\u51E0\u4E4E\u4E0D\u5269\u4EBA\u8BDD\u7684\u5361",junkNone:"\u6CA1\u53D1\u73B0\u8FD9\u7C7B\u5361 \u{1F389}",junkRecycle:"\u56DE\u6536",junkRecycleAll:"\u5168\u90E8\u56DE\u6536",junkRecycleAllConfirm:"\u786E\u8BA4\u628A\u8FD9\u4E9B\u5361\u9001\u8FDB\u56DE\u6536\u7AD9\uFF1F\uFF08\u4E0D\u662F\u6C38\u4E45\u5220\u9664\uFF0C\u53EF\u5728\u56DE\u6536\u4E2D\u5FC3\u8FD8\u539F\uFF09",junkDone:"\u5DF2\u9001\u56DE\u6536\u7AD9",junkFail:"\u626B\u63CF / \u56DE\u6536\u5931\u8D25",dbReadonlyTitle:"\u8BB0\u5FC6\u5E93\u5F53\u524D\u4E0D\u53EF\u5199",dbReadonlyBody:"\u5361\u7247\u8BFB\u5199 / \u5BA1\u6838 / \u56FE\u8C31\u4F1A\u5931\u8D25\uFF0C\u4F46**\u914D\u7F6E\u4ECD\u53EF\u4FDD\u5B58**\uFF08\u914D\u7F6E\u4E0D\u7ECF\u8FC7\u6570\u636E\u5E93\uFF09",dbReadonlyFix:"\u6392\u67E5\uFF1Adsh-memory doctor\uFF08\u770B journal \u6A21\u5F0F\u3001\u5199\u63A2\u9488\u3001\u5907\u4EFD\u6E05\u5355\u4E0E\u6062\u590D\u6B65\u9AA4\uFF09",goalTitle:"\u540C\u76EE\u6807\u4E0D\u540C\u505A\u6CD5",goalScan:"\u626B\u63CF\u76EE\u6807",goalHint:"\u6309\u300C\u8FD9\u5F20\u5361\u89E3\u51B3\u4EC0\u4E48\u95EE\u9898\u300D\u805A\u7C7B \u2014\u2014 \u6B63\u6587\u76F8\u4F3C\u5EA6\u6293\u4E0D\u5230\u7684\u505A\u6CD5\u5DEE\u5F02\uFF087z \u538B\u7F29 / tar \u5206\u53D1 / npm \u7626\u8EAB\uFF09\u4E5F\u80FD\u5F52\u5230\u4E00\u8D77",goalIdle:"\u70B9\u300C\u626B\u63CF\u76EE\u6807\u300D\uFF1A\u6A21\u578B\u5148\u7ED9\u6BCF\u5F20\u5361\u62BD\u4E00\u53E5\u76EE\u6807\uFF08\u9996\u6B21\u4F1A\u8C03\u6A21\u578B\uFF0C\u4E4B\u540E\u8D70\u7F13\u5B58\uFF09\uFF0C\u518D\u6309\u76EE\u6807\u805A\u7C7B",goalNone:"\u6CA1\u6709\u53D1\u73B0\u300C\u540C\u4E00\u76EE\u6807\u3001\u591A\u5F20\u5361\u300D\u7684\u7C07 \u{1F389}",goalStats:"\u5DF2\u7D22\u5F15 / \u672C\u6B21\u8C03\u7528",goalCards:"\u5F20\u5361",goalKeep:"\u90FD\u4FDD\u7559",goalMerge:"\u5408\u5E76\u8FD9\u4E00\u7EC4",goalMerged:"\u5DF2\u63D0\u4EA4\u5408\u5E76\uFF08\u65B0\u5361\u8FDB\u5BA1\u6838\u961F\u5217\uFF09",goalDone:"\u5DF2\u8BB0\u5F55\u300C\u90FD\u4FDD\u7559\u300D",goalFail:"\u76EE\u6807\u805A\u7C7B\u5931\u8D25",oneClickOptimize:"\u4E00\u952E\u4F18\u5316",oneClickOptimizeConfirm:"\u786E\u8BA4\u4E00\u952E\u4F18\u5316\uFF1F\u5C06\u5408\u5E76\u6240\u6709\u76F8\u4F3C\u5361\u5BF9\uFF08\u9ED8\u8BA4\u4E0D\u6E05\u7406\u9648\u65E7\u5361\uFF09\u3002",oneClickAlsoStale:"\u540C\u65F6\u6E05\u7406\u9648\u65E7\u5361",oneClickOptimizeDone:"\u4E00\u952E\u4F18\u5316\u5B8C\u6210",optimizedMerged:"\u5BF9\u5DF2\u5408\u5E76",optimizedStaleDeleted:"\u5F20\u9648\u65E7\u5361\u5DF2\u6E05\u7406",mcpSetupStatus:"Agent MCP \u6302\u8F7D\u72B6\u6001",rerunSetup:"\u8865\u5168 MCP",notInstalled:"\u672A\u5B89\u88C5",noMcpEntry:"\u914D\u7F6E\u7F3A\u5931",nodePathMismatch:"node \u8DEF\u5F84\u4E0D\u4E00\u81F4\uFF0C\u5EFA\u8BAE\u91CD\u8DD1 setup",nodePathNote:"node \u73AF\u5883\u4E0D\u540C\uFF08\u53EF\u7528\uFF09",mcpNeedsRepair:"\u26A0 \u9700\u4FEE\u590D\uFF08\u65E7\u914D\u7F6E\u4F1A\u62C9\u8D77 GUI\uFF09",repairMcp:"\u4FEE\u590D\u914D\u7F6E",healthy:"\u914D\u7F6E\u6B63\u5E38",mcpSetupHint:"\u300C\u81EA\u52A8\u6302\u8F7D MCP\u300D= \u8BA9 Claude Code / Codex / Cursor \u8FD9\u4E9B\u5DE5\u5177\u80FD\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002\u5F00\u542F\u540E\u81EA\u52A8\u628A\u5B83\u4EEC\u914D\u7F6E\u597D\uFF1B\u5173\u6389\u5C31\u4E0D\u52A8\u4F60\u7535\u8111\u4E0A\u4EFB\u4F55\u914D\u7F6E\u6587\u4EF6\uFF0C\u9700\u8981\u65F6\u624B\u52A8\u8DD1 dsh-memory setup\u3002",mcpManageHint:"\u6BCF\u4E2A agent \u7528\u4E0B\u65B9\u6309\u94AE\u5355\u72EC\u5B89\u88C5/\u5378\u8F7D MCP",tabConfig:"\u8BB0\u5FC6\u914D\u7F6E",configPageSub:"\u5199\u5165\u3001\u8DEF\u7531\u3001\u5BA1\u6838\u4E0E\u670D\u52A1\u7684\u672C\u5730\u914D\u7F6E",tabAudit:"\u5F85\u5BA1",statusApproved:"\u5DF2\u5BA1\u6838",statusPending:"\u5F85\u5BA1\u6838",statusRejected:"\u5DF2\u9A73\u56DE",allStatus:"\u5168\u90E8\u72B6\u6001",tabRecycle:"\u56DE\u6536\u4E2D\u5FC3",recyclePageSub:"\u5DF2\u5220\u9664\u7684\u5361\u4FDD\u7559 30 \u5929\uFF0C\u53EF\u6062\u590D\u6216\u6C38\u4E45\u5220\u9664",pending:"\u5F85\u5BA1\u6838",rejected:"\u5DF2\u9A73\u56DE",selectAll:"\u5168\u9009",approve:"\u6279\u51C6",approveAndCore:"\u6279\u51C6\u5E76\u8BBE\u4E3A\u6838\u5FC3",approveCore:"\u6279\u51C6\u4E3A\u6838\u5FC3\u8BB0\u5FC6",approveAsNormal:"\u6279\u51C6\u4E3A\u666E\u901A\u5361",coreSuggested:"\u6838\u5FC3\u8BB0\u5FC6\uFF08\u5F85\u5BA1\u6838\uFF09",reclassify:"\u91CD\u65B0\u8BC6\u522B\u7C7B\u578B",reject:"\u9A73\u56DE",allAgents:"\u5168\u90E8\u667A\u80FD\u4F53",noAuditItems:"\u6682\u65E0\u5BA1\u6838\u9879\u76EE",auditBodyFail:"\u6B63\u6587\u8BFB\u53D6\u5931\u8D25",deletedAt:"\u5220\u9664\u4E8E",restore:"\u6062\u590D",restoreDelete:"\u5220\u9664\u8FDB\u56DE\u6536\u7AD9",purge:"\u6C38\u4E45\u5220\u9664",emptyRecycle:"\u56DE\u6536\u7AD9\u4E3A\u7A7A",recycleHint:"\u5220\u9664\u7684\u5361\u7247\u5148\u8FDB\u56DE\u6536\u7AD9\uFF0C30 \u5929\u5185\u53EF\u6062\u590D\uFF0C\u8D85\u671F\u81EA\u52A8\u6C38\u4E45\u5220\u9664",purgeConfirm:"\u786E\u5B9A\u6C38\u4E45\u5220\u9664\uFF1F\u4E0D\u53EF\u6062\u590D\u3002",recycleDeleteConfirm:"\u786E\u5B9A\u5220\u9664\u8FDB\u56DE\u6536\u7AD9\uFF1F30 \u5929\u5185\u53EF\u6062\u590D\u3002",modeInit:"\u542F\u52A8\u65F6\u62C9\u4E00\u6B21",modeInterval:"\u5468\u671F\u4FDD\u6D3B",modeManual:"\u4EC5\u624B\u52A8",serviceConfig:"\u670D\u52A1\u81EA\u7BA1\u7406\u914D\u7F6E",auditConfig:"\u81EA\u52A8\u5BA1\u6838\u914D\u7F6E",auditHint:"\u547D\u4E2D\u514D\u5BA1\u7684\u65B0\u5361\u76F4\u63A5\u5165\u5E93\uFF0C\u5176\u4F59\u8FDB\u5F85\u5BA1\u6838",auditMode:"\u5BA1\u6838\u6A21\u5F0F",auditAll:"\u5168\u90E8\u8981\u5BA1\u6838",auditNone:"\u5168\u90E8\u514D\u5BA1",auditExemptAgents:"\u514D\u5BA1\u667A\u80FD\u4F53",auditExemptKinds:"\u514D\u5BA1\u7C7B\u578B",allExempt:"\u5168\u90E8\u514D\u5BA1",recycleDays:"\u56DE\u6536\u4FDD\u7559\u5929\u6570",editInSetting:"\u7F16\u8F91\u8BF7\u5230 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6",pendingSyncNote:"\u6B64\u9875\u662F\u72EC\u7ACB Web \u9875\uFF1A\u4FDD\u5B58\u540E\u7531 DSH \u5BBF\u4E3B\u5E94\u7528\uFF08\u65B0\u7248\u5BBF\u4E3B\u4F1A\u88AB\u76F4\u63A5\u53EB\u9192\u3001\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF0C\u70B9\u4FDD\u5B58\u5373\u751F\u6548\uFF09\uFF1B\u82E5\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5219\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\u3001\u7ACB\u5373\u751F\u6548\u3002\u53EA\u6709\u5728\u5BF9\u63A5\u65E7\u7248\u5BBF\u4E3B\u65F6\u624D\u4F1A\u9000\u56DE\u300C\u6392\u961F\u7B49\u5B83\u81EA\u5DF1\u540C\u6B65\u300D\uFF0C\u90A3\u65F6\u53EF\u5728 DSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u91CC\u6539\u540C\u4E00\u9879\u3002",readonlyTitle:"\u5F53\u524D\u9875\u9762\u53EA\u8BFB\uFF0C\u65E0\u6CD5\u4FDD\u5B58\u914D\u7F6E",readonlyBody:"\u8FD9\u4E2A\u8FDB\u7A0B\u6CA1\u6709 DSH \u7684\u8BBE\u7F6E\u670D\u52A1\uFF08settings.update \u4E0D\u5B58\u5728\uFF09\uFF0C\u914D\u7F6E\u53EA\u80FD\u5728\u672C\u673A DSH \u91CC\u4FEE\u6539\uFF1A\u684C\u9762\u7248 \u2192 \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u3002",readonlyBtn:"\u53EA\u8BFB",setupRunInTerminal:"\u8BF7\u590D\u5236\u4EE5\u4E0B\u547D\u4EE4\u5230\u7EC8\u7AEF\u6267\u884C\uFF1A",dshMemoryConfig:"DSH \u8BB0\u5FC6\u914D\u7F6E",coreMemory:"\u6838\u5FC3\u8BB0\u5FC6\uFF08\u524D\u7F6E\u5F3A\u5236\uFF09",coreMemoryHint:"\u6BCF\u6B21\u4F1A\u8BDD\u81EA\u52A8\u6CE8\u5165\uFF0C\u4E0D\u4F9D\u8D56\u6A21\u578B\u4E3B\u52A8\u53EC\u56DE\uFF1B\u53EA\u8BFB\u53D6\u5DF2\u6279\u51C6\u7684\u6838\u5FC3\u5361",coreMemoryEnabled:"\u542F\u7528\u6838\u5FC3\u8BB0\u5FC6\u6CE8\u5165",coreMemoryLimit:"\u6838\u5FC3\u8BB0\u5FC6\u4E0A\u9650\uFF08\u5F20\uFF09",coreMemoryMaxChars:"\u6838\u5FC3\u8BB0\u5FC6\u603B\u5B57\u7B26\u4E0A\u9650",setCore:"\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6",unsetCore:"\u53D6\u6D88\u6838\u5FC3\u8BB0\u5FC6",coreSetOk:"\u5DF2\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6",coreUnsetOk:"\u5DF2\u53D6\u6D88\u6838\u5FC3\u8BB0\u5FC6",coreSetFail:"\u8BBE\u7F6E\u5931\u8D25",coreActiveHint:"\u8FD9\u5F20\u5361\u6BCF\u6B21\u4F1A\u8BDD\u90FD\u4F1A\u5F3A\u5236\u6CE8\u5165\uFF1B\u4E0E\u666E\u901A\u8BB0\u5FC6\u51B2\u7A81\u65F6\u4EE5\u5B83\u4E3A\u51C6\u3002",coreInactiveHint:"\u666E\u901A\u77E5\u8BC6\u5361\u53EF\u4EE5\u63D0\u5347\u4E3A\u6838\u5FC3\u8BB0\u5FC6\uFF1B\u63D0\u5347\u540E\u6BCF\u6B21\u4F1A\u8BDD\u81EA\u52A8\u751F\u6548\u3002",coreNeedApproval:"\u5148\u6279\u51C6\u8FD9\u5F20\u5361\uFF0C\u624D\u80FD\u8BBE\u4E3A\u6838\u5FC3\u8BB0\u5FC6\u3002",coreShort:"\u6838\u5FC3",setCoreShort:"\u8BBE\u6838\u5FC3",uiLayout:"\u5E03\u5C40\u5927\u5C0F",uiLayoutHint:"\u8C03\u6574\u8BB0\u5FC6\u754C\u9762\u6574\u4F53\u5927\u5C0F\uFF08\u53EA\u5F71\u54CD\u663E\u793A\uFF0C\u4E0D\u5F71\u54CD\u8BB0\u5FC6\u6570\u636E\uFF09",uiCompact:"\u7D27\u51D1",uiNormal:"\u6807\u51C6",uiLarge:"\u5927",autoCapture:"\u81EA\u52A8\u6C89\u6DC0",autoRecall:"\u81EA\u52A8\u53EC\u56DE",captureMinChars:"\u6355\u83B7\u6700\u5C0F\u957F\u5EA6",maxCardsPerDay:"\u65E5\u914D\u989D",dedupThreshold:"\u53BB\u91CD\u9608\u503C",recallLimit:"\u53EC\u56DE\u6761\u6570",vaultMulti:"\u591A\u5E93\uFF08\u6309\u9879\u76EE\u9694\u79BB\uFF09",vaultMultiHint:"\u7559\u7A7A\u5373\u5355\u5E93\uFF0C\u8001\u914D\u7F6E\u4E0D\u53D7\u5F71\u54CD",vaultNow:"\u5F53\u524D\u751F\u6548",vaultSource:"\u6765\u6E90",vaultWorkspace:"\u5F53\u524D workspace",vaultNamePh:"\u5E93\u540D\uFF0C\u5982 work",vaultPathPh:"\u76EE\u5F55\uFF0C\u5982 D:/vaults/work",vaultMatchPh:"\u9879\u76EE\u76EE\u5F55\uFF08\u53EF\u9009\uFF0C\u6309 workspace \u81EA\u52A8\u9009\u5E93\uFF09",vaultAdd:"\u6DFB\u52A0\u4E00\u4E2A\u5E93",vaultActive:"\u6FC0\u6D3B\u5E93",vaultActiveNone:"\u9ED8\u8BA4\u5E93\uFF08\u4E0D\u6307\u5B9A\uFF09",vaultSrcEnv:"\u73AF\u5883\u53D8\u91CF MEMORY_VAULT_DIR",vaultSrcProfile:"\u6FC0\u6D3B\u5E93\u914D\u7F6E",vaultSrcWorkspace:"\u6309\u9879\u76EE\u76EE\u5F55\u81EA\u52A8\u547D\u4E2D",vaultSrcVaultDir:"\u5355\u5E93\u914D\u7F6E vaultDir",vaultSrcDefault:"\u9ED8\u8BA4\u76EE\u5F55",fbNav:"\u53CD\u9988\u5F02\u5E38",fbTitle:"\u53CD\u9988\u5F02\u5E38\uFF08\u63D0\u4EA4\u5230 GitHub\uFF09",fbDesc:"\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898\uFF08\u73B0\u8C61 / \u590D\u73B0\u6B65\u9AA4 / \u671F\u671B\u884C\u4E3A\uFF09",fbDiag:"\u8BCA\u65AD\u4FE1\u606F\uFF08\u5DF2\u81EA\u52A8\u8131\u654F\uFF1Ahome \u76EE\u5F55\u4E0E key/token \u5DF2\u66FF\u6362\uFF09",fbCopyDiag:"\u590D\u5236\u8BCA\u65AD\u4FE1\u606F",fbOpenIssue:"\u5728 GitHub \u63D0\u4EA4\uFF08\u5DF2\u9884\u586B\uFF09",fbCopyPrompt:"\u590D\u5236\u7ED9 AI \u7684\u63D0\u793A\u8BCD",fbCopiedDiag:"\u8BCA\u65AD\u4FE1\u606F\u5DF2\u590D\u5236",fbCopiedPrompt:"\u63D0\u793A\u8BCD\u5DF2\u590D\u5236\uFF0C\u7C98\u8FDB AI \u5BF9\u8BDD\u6846\u5373\u53EF",fbCopyFail:"\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u9009\u4E2D\u590D\u5236",fbWhy:"GitHub \u4E0D\u5141\u8BB8\u533F\u540D\u521B\u5EFA issue\uFF0C\u63D2\u4EF6\u91CC\u4E5F\u4E0D\u5E94\u5185\u7F6E token\uFF1A\u6240\u4EE5\u8FD9\u91CC\u628A\u6807\u9898 / \u6B63\u6587 / \u8BCA\u65AD\u90FD\u9884\u586B\u597D\uFF0C\u4F60\u53EA\u9700\u518D\u70B9\u4E00\u6B21 Submit\u3002",fbNeedDesc:"\u8BF7\u5148\u63CF\u8FF0\u4F60\u9047\u5230\u7684\u95EE\u9898",fbLoading:"\u6B63\u5728\u6536\u96C6\u8BCA\u65AD\u4FE1\u606F\u2026",fbDiagFail:"\u8BCA\u65AD\u63A5\u53E3\u4E0D\u53EF\u7528\uFF08\u72EC\u7ACB web \u6216\u65E7\u7248\u5BBF\u4E3B\uFF09\uFF0C\u8BF7\u624B\u52A8\u8865\u5145\u73AF\u5883\u4FE1\u606F",fbOr:"\u6216\u8005",fbSelectAll:"\u5168\u9009",auditTypeLabel:"\u7C7B\u578B",auditInboxSub:"\u81EA\u52A8\u6C89\u6DC0\u7684\u5361\u5148\u5230\u8FD9\u91CC \xB7 \u6279\u51C6\u540E\u8FDB\u5165\u8BB0\u5FC6\u5E93",auditSearchPlaceholder:"\u641C\u7D22\u6807\u9898 / \u6807\u7B7E / \u8DEF\u5F84\u2026",auditNoMatch:"\u6CA1\u6709\u5339\u914D\u7684\u5BA1\u6838\u5361",auditUndo:"\u6279\u51C6\u4E0E\u9A73\u56DE\u90FD\u53EF\u64A4\u9500",auditSelected:"\u5DF2\u9009",auditClearSelection:"\u6E05\u7A7A",preview:"\u9884\u89C8",supportGroup:"\u4EA4\u6D41\u7FA4",supportGroupQQ:"QQ \u4EA4\u6D41\u7FA4",supportGroupWechat:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",supportSponsor:"\u8D5E\u52A9",supportLegacy:"\u65E7\u7A0B\u5E8F",supportTitle:"\u652F\u6301\u4E0E\u4EA4\u6D41",clickToZoom:"\u70B9\u51FB\u653E\u5927",supportGroupHint:"\u626B\u7801\u8FDB\u4EA4\u6D41\u7FA4\uFF08QQ / \u5FAE\u4FE1\uFF09\uFF0C\u9047\u5230\u95EE\u9898\u53EF\u4EE5\u76F4\u63A5\u95EE\u3002",supportSponsorHint:"\u5982\u679C\u8FD9\u4E2A\u63D2\u4EF6\u5E2E\u4F60\u7701\u4E86\u65F6\u95F4\uFF0C\u53EF\u4EE5\u8BF7\u4F5C\u8005\u559D\u676F\u5496\u5561\u3002\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\u3002",supportLegacyTitle:"\u65E7\u7A0B\u5E8F\uFF08dsh-desktop\uFF09\u5DF2\u505C\u6B62\u7EF4\u62A4",supportLegacyBody:"\u4F5C\u8005\u81EA\u7814\u7684 dsh-desktop \u5DF2\u505C\u6B62\u7EF4\u62A4\uFF0C\u5B98\u65B9 DeepSeek Harness \u684C\u9762\u7248\u5DF2\u8986\u76D6\u540C\u6837\u80FD\u529B\uFF0C\u5EFA\u8BAE\u8FC1\u79FB\u3002\u65E7 profile \u91CC\u5982\u679C\u8FD8\u9489\u7740\u5DF2\u64A4\u4E0B\u7684 dsh-desktop-shell@0.3.0\uFF0C\u5148\u5220\u6389\u90A3\u5957\u4F9D\u8D56\uFF0C\u5426\u5219 pnpm install \u4F1A\u5931\u8D25\u3002",supportReadme:"\u6253\u5F00 README",supportReleases:"\u5386\u53F2\u7248\u672C",supportFeedback:"\u5F02\u5E38\u53CD\u9988",supportReplay:"\u91CD\u65B0\u67E5\u770B\u5F15\u5BFC",onboardTitle:"30 \u79D2\u8BA4\u8BC6\u8BB0\u5FC6\u6838\u5FC3",onboardSub:"\u4F60\u7684 AI \u4F1A\u5728\u6BCF\u8F6E\u5BF9\u8BDD\u540E\u81EA\u52A8\u6C89\u6DC0\u77E5\u8BC6\u5361\uFF0C\u5148\u5BA1\u540E\u5165\u3002",onboardSkip:"\u8DF3\u8FC7",onboardBack:"\u4E0A\u4E00\u6B65",onboardNext:"\u4E0B\u4E00\u6B65",onboardStart:"\u5F00\u59CB\u4F7F\u7528",onboardStep0Title:"\u5148\u53BB GitHub \u70B9\u4E2A Star",onboardStep0Body:"Star \u662F\u4F5C\u8005\u7EE7\u7EED\u7EF4\u62A4\u6700\u76F4\u63A5\u7684\u53CD\u9988\uFF1B\u60F3\u81EA\u5DF1\u6539\u4EE3\u7801\u6216\u90E8\u7F72\uFF0C\u5C31\u987A\u624B Fork \u4E00\u4EFD\u3002",onboardStar:"Star / \u70B9\u8D5E",onboardFork:"Fork",onboardStarred:"\u5DF2 Star\uFF0C\u7EE7\u7EED",onboardStarHint:"\u4E4B\u540E\u53EF\u4EE5\u968F\u65F6\u70B9\u9876\u680F\u7684 \u2605 Star \u56DE\u6765\u3002",onboardStep1Title:"\u81EA\u52A8\u6C89\u6DC0\uFF0C\u4E0D\u7528\u624B\u52A8\u8BB0",onboardStep1Body:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\uFF0C\u503C\u5F97\u7559\u4E0B\u7684\u51B3\u7B56\u3001\u6839\u56E0\u548C\u6559\u8BAD\u4F1A\u88AB\u5199\u6210\u4E00\u5F20\u5361\u3002\u5148\u751F\u6210\uFF0C\u518D\u5BA1\u6838\u3002",onboardStep2Title:"\u8BFB\u5230\u6709\u7528\u7684\u5361\uFF0C\u70B9\u4E2A \u{1F44D}",onboardStep2Body:"\u6253\u5F00\u4EFB\u610F\u5361\u7247\uFF0C\u70B9 \u{1F44D} \u6709\u7528 / \u{1F44E} \u6CA1\u7528\u3002\u4E0D\u7528\u5148\u641C\u7D22\uFF0C\u6309\u94AE\u73B0\u5728\u4E00\u76F4\u90FD\u5728\u3002\u5B83\u4F1A\u5E2E\u52A9\u53EC\u56DE\u6392\u5E8F\u3002",onboardStep3Title:"\u5DE6\u4FA7\u65B0\u589E\u652F\u6301\u5165\u53E3",onboardStep3Body:"\u4EA4\u6D41\u7FA4\u3001\u8D5E\u52A9\u3001\u65E7\u7A0B\u5E8F\u3001\u5F02\u5E38\u53CD\u9988\u90FD\u5728\u5DE6\u680F\u5E95\u90E8\uFF1B\u9700\u8981\u5E2E\u52A9\u65F6\u4E0D\u7528\u7FFB README\u3002",onboardTip:"\u63D0\u793A\uFF1A\u8FD9\u4E2A\u5F15\u5BFC\u53EF\u4EE5\u5728\u300C\u652F\u6301\u4E0E\u4EA4\u6D41\u300D\u91CC\u91CD\u65B0\u6253\u5F00\u3002",navWorkspace:"\u5DE5\u4F5C\u533A",navSystem:"\u7CFB\u7EDF",navSupport:"\u652F\u6301",v5Local:"\u672C\u5730\u8FD0\u884C",v5Star:"\u53BB GitHub \u70B9 Star",runtimeTitle:"\u8FD0\u884C\u72B6\u6001",runtimeSub:"\u77E5\u8BC6\u5E93\u3001\u5907\u4EFD\u3001\u81EA\u52A8\u6C89\u6DC0\u4E0E\u7248\u672C",dbTitle:"\u77E5\u8BC6\u5E93",backupTitle:"\u5907\u4EFD",captureTitle:"\u81EA\u52A8\u6C89\u6DC0",versionTitle:"\u7248\u672C",cardsUnit:"\u5F20\u5361",links:"\u8FDE\u63A5",todayReview:"\u4ECA\u65E5\u56DE\u770B",openArrow:"\u6253\u5F00 \u2192",reshuffle:"\u6362\u4E00\u5F20",insightDecision:"\u51B3\u7B56",insightRoot:"\u6839\u56E0",insightLesson:"\u6559\u8BAD",insightSummary:"\u6458\u8981",pinCard:"\u56FA\u5B9A\u8FD9\u5F20\u5361",unpinCard:"\u53D6\u6D88\u56FA\u5B9A",pinnedOnly:"\u5DF2\u56FA\u5B9A",toastApproved:"\u5DF2\u6279\u51C6",toastRejected:"\u5DF2\u9A73\u56DE",toastCardDeleted:"\u5DF2\u5220\u9664",toastRestored:"\u5DF2\u6062\u590D",toastPurged:"\u5DF2\u5F7B\u5E95\u5220\u9664",toastPurgedExpired:"\u5DF2\u6E05\u7406\u8FC7\u671F\u56DE\u6536\u7AD9",toastFailed:"\u64CD\u4F5C\u5931\u8D25",noSelection:"\u8BF7\u5148\u9009\u62E9\u8981\u5904\u7406\u7684\u5361\u7247",enabledLabel:"\u542F\u7528\u8BB0\u5FC6\u6838\u5FC3",vaultDirLabel:"\u8BB0\u5FC6\u5E93\u76EE\u5F55\uFF08\u5355\u5E93\uFF09",captureCooldownMs:"\u6C89\u6DC0\u51B7\u5374 (ms)",captureProvider:"\u84B8\u998F provider\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",routeAuto:"\u81EA\u52A8\uFF08\u6309\u6CE8\u518C\u987A\u5E8F\uFF09",routeListFail:"\u53D6\u4E0D\u5230\u6A21\u578B\u5217\u8868\uFF08{err}\uFF09\u2192 \u4E0B\u9762\u53EF\u76F4\u63A5\u624B\u586B provider / model\uFF1B\u684C\u9762\u7248\u5F39\u7A97\u4F1A\u81EA\u52A8\u5411\u5BBF\u4E3B\u4EE3\u7406\uFF0C\u82E5\u4ECD\u5931\u8D25\u8BF7\u4ECE DSH \u8BBE\u7F6E\u9875\u6253\u5F00",captureFollowSession:"\u8DDF\u968F\u5F53\u524D\u4F1A\u8BDD\uFF08\u84B8\u998F\u7528\u4F1A\u8BDD\u7684 provider/model\uFF09",captureFirstOnly:"\u4EC5\u8BD5\u9996\u9009\uFF08\u5931\u8D25\u5373\u505C\uFF0C\u4E0D\u8F6E\u6362\u515C\u5E95\uFF09",llmTest:"\u6D4B\u8BD5\u84B8\u998F\u8DEF\u7531",llmTestOk:"\u2713 \u8C03\u7528\u6210\u529F",llmTestFail:"\u2717 \u8C03\u7528\u5931\u8D25",llmCandidates:"\u5019\u9009\u6570",captureModel:"\u84B8\u998F model\uFF08\u7559\u7A7A\u81EA\u52A8\uFF09",recallEmbedding:"\u8BED\u4E49\u53EC\u56DE provider\uFF08\u53EF\u9009\uFF09",sessionBudgetChars:"\u4F1A\u8BDD\u9884\u7B97 (\u5B57\u7B26)",saving:"\u4FDD\u5B58\u4E2D\u2026",savePending:"\u5DF2\u5199\u5165\u914D\u7F6E\u6587\u4EF6\uFF1B\u5BBF\u4E3B\u4ECD\u662F\u65E7\u7248\uFF0C\u91CD\u542F DSH \u540E\u5373\u4EE5\u65B0\u503C\u4E3A\u51C6\uFF08\u672C\u9762\u677F\u5DF2\u751F\u6548\uFF09",actionRunning:"\u5904\u7406\u4E2D\u2026",recycleEmptyHint:"\u56DE\u6536\u7AD9\u4E3A\u7A7A\uFF1A\u5220\u6389\u7684\u5361\u7247\u4F1A\u5148\u653E\u5230\u8FD9\u91CC\uFF0C\u4FDD\u7559 {days} \u5929\u540E\u81EA\u52A8\u6E05\u7406\u3002",recyclePurgeAll:"\u6E05\u7A7A\u56DE\u6536\u7AD9",fbCopyManual:"\u81EA\u52A8\u590D\u5236\u88AB\u6D4F\u89C8\u5668\u62E6\u622A\uFF0C\u5DF2\u628A\u5185\u5BB9\u653E\u5728\u4E0B\u9762\uFF1A\u70B9\u300C\u5168\u9009\u300D\u518D\u6309 Ctrl+C",vcPage:"\u9875\u9762\u811A\u672C",vcPageStale:"\u26A0 \u5F53\u524D\u9875\u9762\u4ECD\u5728\u8FD0\u884C\u65E7\u7248\u811A\u672C\uFF08\u9875\u9762 v{page} / \u78C1\u76D8 v{disk}\uFF09\uFF1A\u6309 Ctrl+F5 \u5237\u65B0\u9875\u9762\u5373\u751F\u6548\uFF1B\u82E5\u300C\u8FD0\u884C\u4E2D\u300D\u4ECD\u662F\u65E7\u7248\u53F7\uFF0C\u5219\u8FD8\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcLoaded:"\u8FD0\u884C\u4E2D\uFF08\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF09",vcResident:"\u5E38\u9A7B\u5B9E\u4F8B",vcOnDisk:"\u78C1\u76D8\u5B89\u88C5",vcLatest:"npm \u6700\u65B0",vcStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\u4ECD\u52A0\u8F7D v{loaded} \u2014\u2014 \u70B9\u300C\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u300D\u5373\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u542F\u5B83\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestart:"\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",vcRestarting:"\u91CD\u542F\u4E2D\u2026",vcRestartSent:"\u5DF2\u8C03\u5EA6\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\uFF1A\u7EA6 3-8 \u79D2\u540E\u65B0\u8FDB\u7A0B\u63A5\u7BA1\uFF0C\u8BF7\u7A0D\u7B49\u518D\u5237\u65B0\u9875\u9762\uFF08Ctrl+F5\uFF09",vcRestartCurrent:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u7ECF\u662F\u6700\u65B0\u7248\uFF0C\u65E0\u9700\u91CD\u542F",vcRestartAnyway:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{ver}\uFF1B\u901A\u5E38\u65E0\u9700\u91CD\u542F\uFF0C\u5361\u4F4F/\u884C\u4E3A\u5F02\u5E38\u65F6\u53EF\u5F3A\u5236\u91CD\u542F",vcHostProcessStale:"\u78C1\u76D8\u5DF2\u5B89\u88C5 v{disk}\uFF0C\u4F46**\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B**\uFF08DSH \u5BBF\u4E3B\uFF09\u52A0\u8F7D\u7684\u4ECD\u662F v{loaded} \u2014\u2014 \u5B83\u6765\u81EA\u5BBF\u4E3B\u542F\u52A8\u65F6\u7684\u90A3\u4EFD\u4EE3\u7801\uFF1A**\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u4F1A\u6539\u53D8\u672C\u9875**\uFF0C\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH\u3002",vcRestartFixes:"\u70B9\u51FB\u4F1A\u628A\u5E38\u9A7B\u5B9E\u4F8B\uFF08\u7AEF\u53E3\u4E0A\u90A3\u4E2A\uFF09\u6362\u6210 v{disk}\uFF08\u5F53\u524D v{served}\uFF09\uFF0C\u4E0D\u7528\u91CD\u542F DSH",vcRestartStart:"\u70B9\u51FB\u4F1A\u7528\u5F53\u524D\u78C1\u76D8\u7248\u672C v{disk} \u628A\u5E38\u9A7B\u5B9E\u4F8B\u62C9\u8D77\u6765\uFF08\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartRepair:"\u70B9\u51FB\u4F1A\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\u5E76\u4FDD\u6D3B\uFF08\u7248\u672C\u5DF2\u662F v{disk}\uFF0C\u4E0D\u7528\u91CD\u542F DSH\uFF09",vcRestartHostOnly:"\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F v{disk}\uFF1B\u672C\u9875\u663E\u793A v{loaded} \u6765\u81EA DSH \u5BBF\u4E3B \u2014\u2014 \u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B\u4E0D\u5F71\u54CD\u672C\u9875\uFF0C\u8BF7\u91CD\u542F DSH",vcRestartFail:"\u91CD\u542F\u8BF7\u6C42\u5931\u8D25",vcRestartNoRoute:"\u5F53\u524D\u9875\u9762\u5BF9\u63A5\u7684\u8FDB\u7A0B\u8FD8\u662F\u65E7\u7248\uFF08\u6CA1\u6709\u8FD9\u4E2A\u63A5\u53E3\uFF09\uFF1A\u8BF7\u91CD\u542F\u684C\u9762\u7248 / DSH \u540E\u518D\u8BD5\uFF0C\u6216\u6267\u884C {cmd}",vcHostStale:"\u4E0A\u65B9\u7684\u300C\u8FD0\u884C\u4E2D\u300D\u6765\u81EA\u670D\u52A1\u672C\u9875\u7684\u8FDB\u7A0B\uFF1B\u5E38\u9A7B\u5B9E\u4F8B\u5DF2\u662F\u65B0\u7248 \u2014\u2014 \u8981\u8BA9\u5B83\u4E5F\u53D8\u6210\u65B0\u7248\u53F7\uFF0C\u9700\u91CD\u542F\u684C\u9762\u7248 / DSH",vcResidentDownShort:"\u672A\u8FD0\u884C",vcResidentDown:"\u5E38\u9A7B\u5B9E\u4F8B\u6CA1\u5728\u8FD0\u884C\uFF08\u7AEF\u53E3 {port} \u65E0\u54CD\u5E94\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u7528\u65B0\u4EE3\u7801\u628A\u5B83\u62C9\u8D77\u6765\uFF1B\u62C9\u4E0D\u8D77\u6765\u65F6\u6267\u884C {cmd}\uFF0C\u5E76\u8D34\u4E00\u4E0B dsh-memory status \u7684\u8F93\u51FA",vcResidentUnmanagedShort:"\u672A\u6258\u7BA1",vcResidentUnmanaged:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u6CA1\u6709\u770B\u95E8\u72D7\u4FDD\u6D3B**\uFF08\u505C\u6B62 / \u786C\u6740\u540E\u6B8B\u7559\u7684\u5B64\u513F\uFF09\u2014\u2014 \u70B9\u4E0B\u9762\u7684\u6309\u94AE\u628A\u5B83\u91CD\u65B0\u6258\u7BA1\uFF08\u91CD\u65B0\u62C9\u4E00\u4E2A\u770B\u95E8\u72D7 + \u65B0\u5B9E\u4F8B\uFF09\uFF1B\u4E5F\u53EF\u4EE5\u6267\u884C {cmd}",vcResidentLockUnknownShort:"\u6258\u7BA1\u72B6\u6001\u672A\u77E5",vcResidentReplaceBlockedShort:"\u4E0D\u53EF\u66FF\u6362",vcResidentHostManagedShort:"\u5BBF\u4E3B\u6258\u7BA1",vcResidentReplaceBlocked:"\u5E38\u9A7B\u5B9E\u4F8B**\u4E0D\u53EF\u66FF\u6362**\uFF08\u73AF\u5883\u9650\u5236\uFF09\uFF1A\u770B\u95E8\u72D7\u9501\u76EE\u5F55\u4E0D\u53EF\u5199\uFF08{err}\uFF1B{path}\uFF09\u2192 \u7AEF\u53E3\u4E0A\u4F1A**\u957F\u671F**\u505C\u5728 v{served}\u3002\u8FD9\u4E0D\u662F\u300C\u6682\u65F6\u843D\u540E\u300D\uFF1A\u81EA\u52A8\u66FF\u6362\u88AB\u6B63\u786E\u5730\u62D2\u7EDD\uFF08\u907F\u514D\u7559\u4E0B\u5B64\u513F\uFF09\u3002\u51FA\u8DEF\uFF1A\u4FEE\u590D\u8BE5\u76EE\u5F55\u6743\u9650\u540E\u6267\u884C {cmd}\uFF0C\u6216\u524D\u53F0\u89C2\u5BDF dsh-memory watchdog --port 7999",vcResidentLockUnknown:"\u5E38\u9A7B\u5B9E\u4F8B\u5728\u670D\u52A1 v{served}\uFF0C\u4F46**\u770B\u95E8\u72D7\u9501\u6587\u4EF6\u5199\u4E0D\u8FDB\u53BB**\uFF08\u53D7\u9650\u73AF\u5883\uFF1A\u6C99\u7BB1\u7981\u5199 / ACL / \u975E\u7CFB\u7EDF\u76D8\uFF09\u2192 \u65E0\u6CD5\u5224\u65AD\u5B83\u6709\u6CA1\u6709\u88AB\u6258\u7BA1\uFF08\u4E0D\u662F\u300C\u672A\u6258\u7BA1\u300D\uFF09\u3002\u539F\u56E0\uFF1A{err}\uFF08{path}\uFF09\u3002\u4FDD\u6D3B\u901A\u5E38\u4ECD\u7136\u6709\u6548\uFF1B\u70B9\u4E0B\u9762\u7684\u6309\u94AE\u53EF\u7528\u65B0\u4EE3\u7801\u91CD\u65B0\u6258\u7BA1\u4E00\u6B21\u3002",vcOutdated:"\u6709\u65B0\u7248\u672C",vcUpToDate:"\u5DF2\u662F\u6700\u65B0",vcCheck:"\u68C0\u67E5\u66F4\u65B0",checking:"\u68C0\u67E5\u4E2D\u2026",vcCheckFail:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25",recallSummaryLen:"\u53EC\u56DE\u6458\u8981\u957F\u5EA6",recallBody:"\u53EC\u56DE\u542B\u6B63\u6587",secretHint:"\u51ED\u8BC1\u53D6\u7528\u63D0\u793A\uFF08\u6CE8\u5165\u6BCF\u4E2A\u4F1A\u8BDD\uFF09",autoWeb:"Web server",autoWebMode:"\u4FDD\u6D3B\u6A21\u5F0F",webPort:"Web \u7AEF\u53E3",webCheckIntervalMs:"\u63A2\u6D3B\u95F4\u9694(ms)",webMaxRestart:"\u6700\u5927\u91CD\u542F\u6B21\u6570",watchdogAutoSpawn:"\u770B\u95E8\u72D7\u8FDB\u7A0B",autoRestartOnDrift:"\u7248\u672C\u6F02\u79FB\u81EA\u52A8\u91CD\u542F\u5E38\u9A7B\u5B9E\u4F8B",autoMcpSetup:"\u81EA\u52A8\u6302\u8F7D MCP",saveConfig:"\u4FDD\u5B58\u914D\u7F6E",saveFail:"\u4FDD\u5B58\u5931\u8D25",savedOk:"\u5DF2\u4FDD\u5B58",savedDirect:"\u672C\u673A\u6CA1\u6709 DSH \u5BBF\u4E3B\u5728\u8FD0\u884C\uFF0C\u5DF2\u76F4\u63A5\u5199\u5165\u5171\u4EAB\u914D\u7F6E\uFF08hooks / MCP / \u72EC\u7ACB\u9875\u7ACB\u5373\u751F\u6548\uFF09",savedApplied:"\u5DF2\u4FDD\u5B58\u5E76\u751F\u6548\uFF08\u5BBF\u4E3B\u5DF2\u5728\u8BF7\u6C42\u4E0A\u4E0B\u6587\u91CC\u5E94\u7528\uFF09",saveQueued:"\u5DF2\u4EA4\u7ED9 DSH \u5BBF\u4E3B\u540C\u6B65\uFF0C\u5C1A\u672A\u786E\u8BA4\u751F\u6548",saveHostGuard:"\u8BE5\u5BBF\u4E3B\u4E0D\u5141\u8BB8\u63D2\u4EF6\u4ECE\u81EA\u5DF1\u7684\u56DE\u8C03\u4E0A\u4E0B\u6587\u91CC\u5199\u914D\u7F6E\uFF1B\u8BF7\u5728\u300CDSH \u8BBE\u7F6E \u2192 \u8BB0\u5FC6\u300D\u91CC\u6539\u540C\u4E00\u9879\uFF0C\u6216\u7F16\u8F91 profile \u7684\u914D\u7F6E\u8865\u4E01\u5C42",saveFailHint:"\u5BBF\u4E3B\u4FA7\u672A\u5E94\u7528\uFF0C\u8BE6\u89C1\u300C\u53CD\u9988\u5F02\u5E38\u300D\u91CC\u7684\u8BCA\u65AD\u4FE1\u606F",recallTool:"recall \u5DE5\u5177",costControl:"\u6210\u672C\u63A7\u5236",costHint:"\u7701 token\u3001\u63A7 LLM \u6D88\u8017",distillEnabled:"\u84B8\u998F\u77E5\u8BC6\u5361(\u5F00=LLM \u538B\u7F29, \u5173=\u539F\u6587\u5361\u96F6 LLM)",dedupByLLM:"\u8BED\u4E49\u53BB\u91CD\u5582 LLM(\u5173=\u7EAF\u8BCD\u6CD5\u66F4\u7701)",captureMaxTokens:"\u84B8\u998F\u8F93\u51FA\u4E0A\u9650(token)",captureTimeoutMs:"\u84B8\u998F\u8D85\u65F6(\u6BEB\u79D2\uFF1B\u672C\u5730\u5927\u6A21\u578B\u51B7\u542F\u52A8\u5EFA\u8BAE 120000+)",recallMinScore:"\u53EC\u56DE\u76F8\u5173\u6027\u9608\u503C(\u8D8A\u9AD8\u8D8A\u7701)",configNeedsDsh:"\u914D\u7F6E\u7F16\u8F91\u9700\u5728 DSH \u5185\u6253\u5F00\uFF08\u672C\u9875\u53EF\u80FD\u53EA\u8BFB\u6216\u6709\u90E8\u5206\u7F3A\u5931\uFF09",installMcp:"\u5B89\u88C5 MCP",uninstallMcp:"\u5378\u8F7D MCP",uninstallConfirm:"\u786E\u8BA4\u5378\u8F7D\u8BE5\u667A\u80FD\u4F53\u7684 MCP\uFF1FClaude Code/Codex \u5C06\u65E0\u6CD5\u518D\u8C03\u7528\u8BB0\u5FC6\u5E93\u3002",presetConfig:"\u4E00\u952E\u63A8\u8350\u914D\u7F6E",presetHint:"\u70B9\u51FB\u586B\u5145\u5BF9\u5E94\u65B9\u6848\uFF0C\u70B9\u4FDD\u5B58\u751F\u6548",planApplied:"\u5DF2\u586B\u5165\u300C{plan}\u300D\xB7 \u70B9\u300C\u4FDD\u5B58\u914D\u7F6E\u300D\u751F\u6548",planDescA:"\u4E2A\u4EBA\u5F00\u53D1\u63A8\u8350 \xB7 \u84B8\u998F 4000 \xB7 \u5173\u770B\u95E8\u72D7",planDescB:"\u9884\u7B97\u654F\u611F \xB7 \u5173\u84B8\u998F \xB7 \u8FD1 0 \u6210\u672C",planDescC:"\u957F\u9879\u76EE \xB7 \u5F00\u770B\u95E8\u72D7 \xB7 \u9AD8\u8D28\u91CF",cfgSubCore:"\u81EA\u52A8\u6C89\u6DC0 / \u53EC\u56DE / \u5E93\u76EE\u5F55\u4E0E\u53BB\u91CD\u7B56\u7565",cfgSubMulti:"\u6309\u9879\u76EE\u9694\u79BB\u8BB0\u5FC6\u5E93\uFF0C\u5207\u6362\u540E CLI / MCP / hooks \u540C\u6B65\u751F\u6548",cfgSubCost:"\u63A7\u5236 LLM \u8C03\u7528\u4E0E\u53EC\u56DE\u89C4\u6A21\uFF0C\u76F4\u63A5\u51B3\u5B9A\u82B1\u591A\u5C11\u94B1",cfgSubAudit:"\u4EC0\u4E48\u5185\u5BB9\u9700\u8981\u4F60\u4EBA\u5DE5\u786E\u8BA4\u540E\u624D\u8FDB\u4E3B\u5E93",cfgSubService:"\u4FDD\u6D3B\u3001\u770B\u95E8\u72D7\u4E0E\u7248\u672C\u81EA\u6108\uFF0C\u4E00\u822C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF",cfgDirty:"\u6709\u672A\u4FDD\u5B58\u7684\u66F4\u6539",cfgClean:"\u5DF2\u540C\u6B65",unitChars:"\u5B57",unitPerDay:"\u5F20 / \u5929",unitTokens:"tokens",unitMs:"\u6BEB\u79D2",unitTimes:"\u6B21",unitDays:"\u5929",mcpAutoHint:"\u81EA\u52A8\u8BC6\u522B\u5DF2\u5B89\u88C5\u7684 Agent \u4E0E\u5176 MCP \u914D\u7F6E\uFF08\u53EA\u8BFB\u63A2\u6D4B\uFF0C\u4E0D\u6539\u4EFB\u4F55\u6587\u4EF6\uFF09",mcpRefresh:"\u91CD\u65B0\u68C0\u6D4B",mcpSummary:"\u8BC6\u522B\u5230 {agents} \u4E2A Agent \xB7 {servers} \u4E2A MCP \xB7 {mounted} \u4E2A\u5DF2\u6302\u8F7D\u672C\u63D2\u4EF6",mcpNoServers:"\u672A\u914D\u7F6E MCP",mcpDetectedOnly:"\u4EC5\u8BC6\u522B",planA:"A \u8F7B\u91CF\u7701\u5FC3",planB:"B \u6781\u81F4\u7701\u94B1",planC:"C \u9AD8\u8D28\u91CF",pluginInfo:"\u63D2\u4EF6\u4FE1\u606F",organizeTitle:"\u6574\u7406\u5EFA\u8BAE",scanAndOrganize:"\u4E00\u952E\u641C\u7D22\u548C\u6574\u7406",scanHint:"\u70B9\u300C\u{1F50D} \u4E00\u952E\u641C\u7D22\u548C\u6574\u7406\u300D\u626B\u63CF\u76F8\u4F3C\u5361/\u9648\u65E7\u5361\uFF0C\u518D\u7528\u300C\u26A1 \u4E00\u952E\u4F18\u5316\u300D\u6267\u884C\u3002",mergeNow:"\u5408\u5E76",delete:"\u5220\u9664",captureAlert:"\u81EA\u52A8\u6C89\u6DC0\u5F02\u5E38",captureAlertHint:"\u6253\u5F00\u5DE6\u680F\u300C\u7528\u91CF/\u4ECA\u65E5\u300D\u770B\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7\uFF1B\u82E5\u662F\u63A5\u53E3/\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u9700\u66F4\u65B0 memory-eternal \u63D2\u4EF6\u3002",captureLog:"\u81EA\u52A8\u6C89\u6DC0\u65E5\u5FD7",captureLogHint:"\u6BCF\u8F6E\u5BF9\u8BDD\u7ED3\u675F\u540E\u81EA\u52A8\u8DD1\uFF1A\u76D1\u542C \u2192 \u5224\u5B9A \u2192 \u5199\u5361\u3002\u8FD9\u91CC\u663E\u793A\u6700\u8FD1 100 \u6761\uFF0C\u7528\u6765\u6392\u67E5\u300C\u4E3A\u4EC0\u4E48\u6CA1\u5199\u5361\u300D\u3002",captureLogEmpty:"\u8FD8\u6CA1\u6709\u8BB0\u5F55\u3002\u8DDF Agent \u804A\u4E00\u8F6E\uFF08> \u6355\u83B7\u6700\u5C0F\u957F\u5EA6\uFF09\u540E\u518D\u56DE\u6765\u770B\u3002",healthTitle:"\u5065\u5EB7\u6982\u89C8",healthHint:"\u5E93 / \u5907\u4EFD / \u6C89\u6DC0 / \u7248\u672C \u2014\u2014 \u4E00\u773C\u770B\u6E05\u6709\u6CA1\u6709\u9759\u9ED8\u574F\u6389\u7684\u4E1C\u897F",healthDb:"\u77E5\u8BC6\u5E93",healthDbBad:"\u5E93\u4E0D\u53EF\u5199\u6216\u635F\u574F",healthBackups:"\u5907\u4EFD",healthNoBackups:"\u6CA1\u6709\u5907\u4EFD\uFF08\u6267\u884C dsh-memory doctor \u53EF\u5EFA\uFF0C\u5BBF\u4E3B\u4E5F\u4F1A\u6BCF\u65E5\u5907\u4EFD\uFF09",healthBackupAge:"{n} \u4E2A \xB7 \u6700\u8FD1 {d} \u5929\u524D",healthBackupToday:"{n} \u4E2A \xB7 \u4ECA\u5929",healthCapture:"\u81EA\u52A8\u6C89\u6DC0",healthNoRecords:"\u6682\u65E0\u8BB0\u5F55\uFF08\u8FD8\u6CA1\u89E6\u53D1\u8FC7\u6C89\u6DC0\uFF09",healthCapOk:"\u6700\u8FD1\u4E00\u6B21\u6210\u529F\u5199\u5361",healthCapFail:"\u6700\u8FD1\u4E00\u6B21\u5931\u8D25",healthRunAlign:"\u8FD0\u884C\u300C\u7248\u672C\u5BF9\u9F50\u68C0\u67E5\u300D\u540E\u663E\u793A",healthVersion:"\u7248\u672C",ledgerTitle:"\u8BB0\u5FC6\u8D26\u672C\uFF08\u8FD1 7 \u5929\uFF09",ledgerHint:"\u53EC\u56DE\u6CE8\u5165\u4E86\u591A\u5C11\u3001\u84B8\u998F\u8C03\u7528\u4E86\u591A\u5C11\u6B21 \u2014\u2014 \u5224\u65AD\u300C\u5230\u5E95\u7701\u4E0D\u7701 token\u300D\u7684\u7B2C\u4E00\u5757\u6570\u636E",ledgerRecalls:"\u53EC\u56DE\u6B21\u6570",ledgerInjected:"\u6CE8\u5165",ledgerChars:"\u5B57\u7B26",ledgerCaptures:"\u6C89\u6DC0\u6B21\u6570",ledgerLlmCalls:"LLM \u8C03\u7528",ledgerEstimate:"\u4F30\u7B97 token",ledgerEstimateHint:"\u6309\u7EA6 2 \u5B57\u7B26 \u2248 1 token \u7C97\u4F30\uFF0C\u53EA\u770B\u91CF\u7EA7",ledgerUseful:"\u53EC\u56DE\u6709\u7528\u7387",ledgerUsefulHint:"\u6765\u81EA\u300C\u6709\u7528 / \u6CA1\u7528\u300D\u53CD\u9988\uFF1B\u4F4E\u4E8E 60% \u8BF4\u660E\u6CE8\u5165\u53EF\u80FD\u51C0\u4E8F",ledgerFormula:"\u51C0\u6536\u76CA \u2248 \u88AB\u907F\u514D\u7684\u4E0A\u4E0B\u6587\u5F00\u9500 \u2212\uFF08\u6CE8\u5165\u5B57\u7B26 + \u84B8\u998F\u8C03\u7528 \xD7 \u5355\u4EF7\uFF09\u3002\u8D26\u672C\u53EA\u8BB0\u300C\u82B1\u4E86\u591A\u5C11\u300D\uFF0C\u6536\u76CA\u4FA7\u8BF7\u7ED3\u5408\u4F60\u5B9E\u9645\u7701\u4E0B\u7684\u91CD\u8BFB / \u8FD4\u5DE5\u6765\u5224\u65AD\u3002",ledgerNoData:"\u8FD1 7 \u5929\u8FD8\u6CA1\u6709\u8BB0\u5F55\uFF1A\u804A\u51E0\u8F6E\u6216\u8BA9 agent recall \u4E00\u6B21\u540E\u518D\u770B\u3002",ledgerNeedRestart:"\u5BBF\u4E3B\u4ECD\u5728\u8DD1\u65E7\u7248 API\uFF08/ledger \u4E0D\u5B58\u5728\uFF09\uFF1A\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH \u540E\uFF0C\u8D26\u672C\u624D\u4F1A\u5F00\u59CB\u8BB0\u5F55\u3002",alignTitle:"\u7248\u672C\u5BF9\u9F50\u68C0\u67E5",alignRun:"\u5F00\u59CB\u68C0\u67E5",alignFix:"\u91CD\u5199\u63A5\u7EBF",alignFixConfirm:"\u91CD\u5199 MCP / hooks \u63A5\u7EBF\uFF1F\uFF08\u53EA\u78B0\u63D2\u4EF6\u81EA\u5DF1\u7684\u952E\uFF0C\u4E0D\u52A8\u4F60\u7684\u6570\u636E\u4E0E\u914D\u7F6E\uFF09",alignFixed:"\u63A5\u7EBF\u5DF2\u91CD\u5199\uFF1B\u82E5\u4E0A\u9762\u63D0\u793A\u300C\u5BBF\u4E3B\u8FDB\u7A0B\u65E7\u300D\uFF0C\u4ECD\u9700\u5B8C\u5168\u9000\u51FA\u5E76\u91CD\u5F00 DSH",alignFail:"\u5BF9\u9F50\u68C0\u67E5\u5931\u8D25",alignHint:"\u63D2\u4EF6\u5347\u7EA7\u53EA\u6362\u78C1\u76D8\u6587\u4EF6 \u2014\u2014 \u5BBF\u4E3B\u5185\u5B58\u91CC\u7684\u4E8B\u4EF6\u8BA2\u9605\u4E0E MCP / hooks \u91CC\u7684\u65E7\u8DEF\u5F84\u4E0D\u4F1A\u81EA\u5DF1\u66F4\u65B0\uFF0C\u8FD9\u91CC\u4E00\u6B21\u67E5\u6E05",alignIdle:"\u70B9\u300C\u5F00\u59CB\u68C0\u67E5\u300D\uFF1A\u5BF9\u6BD4\u5BBF\u4E3B / \u5E38\u9A7B\u5B9E\u4F8B / npm \u7684\u7248\u672C\uFF0C\u5E76\u68C0\u67E5 MCP\u3001hooks \u91CC\u662F\u5426\u6709\u65E7\u8DEF\u5F84\u4E0E\u65E7\u53C2\u6570",alignDisk:"\u78C1\u76D8",alignResident:"\u5E38\u9A7B\u5B9E\u4F8B",alignHost:"\u5BBF\u4E3B\u8FDB\u7A0B",captureLogUnavailable:"\u65E5\u5FD7\u4EC5\u5728 DSH \u5BBF\u4E3B\u5185\u53EF\u7528\uFF08\u72EC\u7ACB Web \u9875\u6CA1\u6709 host \u8FD0\u884C\u65F6\uFF09\u3002",captureAgentCards:"Agent \u81EA\u52A8\u6C89\u6DC0\u7684\u5361",noCards:"\u6682\u65E0",loadMore:"\u52A0\u8F7D\u66F4\u591A",batchMerge:"\u4E00\u952E\u667A\u80FD\u5408\u5E76",mergeAllConfirm:"\u5C06\u6309\u76F8\u4F3C\u5EA6\u5206\u7EC4\u7684\u5361\u7247\u5404\u5408\u5E76\u4E3A\u4E00\u5F20\uFF08\u4FDD\u7559\u5404\u81EA kind\uFF09\uFF0C\u539F\u5361\u5220\u9664\uFF1F",crossVault:"\u8DE8\u5E93\u805A\u5408",deleteConfirm:"\u786E\u5B9A\u5220\u9664\u8BE5\u8BB0\u5FC6\u5361\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",deleted:"\u5DF2\u5220\u9664",deleteFail:"\u5220\u9664\u5931\u8D25",deleteSelected:"\u5220\u9664\u9009\u4E2D",deletedSelected:"\u5F20\u5361\u5DF2\u5220\u9664",merge:"\u5408\u5E76",mergeNeed:"\u81F3\u5C11\u9009 2 \u5F20\u5361",mergeConfirm:"\u5C06\u6240\u9009\u5361\u7247\u5408\u5E76\u4E3A\u4E00\u5F20\u5E76\u5220\u9664\u539F\u5361\uFF1F",merged:"\u5DF2\u5408\u5E76",mergeFail:"\u5408\u5E76\u5931\u8D25",mcpInstalled:"\u2705 {agent} MCP \u5DF2\u5B89\u88C5",mcpUninstalled:"\u2705 {agent} MCP \u5DF2\u5378\u8F7D",mcpActionFail:"\u274C {agent} MCP \u64CD\u4F5C\u5931\u8D25\uFF1A{error}",dshHostLabel:"DeepSeek Harness\uFF08\u5F53\u524D\u5BBF\u4E3B\uFF09",restartHint:"\u5DF2\u4FDD\u5B58\u3002autoWebMode/watchdogAutoSpawn \u7B49\u9700\u91CD\u542F DSH \u751F\u6548\uFF1B\u5DF2\u6709\u5E38\u9A7B watchdog \u4E0D\u4F1A\u88AB\u81EA\u52A8\u505C\u6389\uFF0C\u9700 dsh-memory stop / restart\uFF08#19\uFF09",conflictRefresh:"\u914D\u7F6E\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5",untitled:"\u65E0\u6807\u9898",tplBlank:"\u{1F4C4} \u7A7A\u767D",tagsHint:"\u6807\u7B7E\uFF08\u9017\u53F7\u5206\u9694\uFF09",connCount:"{n} \u8FDE\u63A5",tplDecisionTags:"\u51B3\u7B56, \u65B9\u6848",tplBugTags:"\u8E29\u5751, \u6559\u8BAD",tplMeetingTags:"\u4F1A\u8BAE, \u7EAA\u8981",tplWeeklyTags:"\u5468\u62A5",tplDecisionBody:`# \u6280\u672F\u51B3\u7B56\uFF1A[\u6807\u9898]
17
18
 
18
19
  ## \u80CC\u666F
19
20
  - \u95EE\u9898\u63CF\u8FF0
@@ -58,7 +59,7 @@ var ja=Object.create;var Gt=Object.defineProperty;var Pa=Object.getOwnPropertyDe
58
59
  -
59
60
 
60
61
  ## \u98CE\u9669/\u963B\u585E
61
- - `},Ta={nav:"Memory",loading:"Loading\u2026",loadingGraph:"Loading knowledge graph\u2026",refresh:"Refresh",overview:"Memory Overview",total:"Cards",recent:"Added (7d)",tags:"Tags",searchPlaceholder:"Search memory\u2026",search:"Search",all:"All",kindProject:"Projects",kindKnowledge:"Knowledge",kindContent:"Content",kindPrompt:"Prompts",kindBusiness:"Business",kindTool:"Tools",kindMistake:"Mistakes",kindCore:"Core memory",cardsTab:"Cards",webTab:"Web version",webOpening:"Opening the web version in your browser\u2026",webOpened:"Opened the web version in your browser",webOpenFail:"Could not open a browser; visit this URL manually",terminalTab:"Terminal",terminalTitle:"Full terminal UI",terminalIntro:"The Web UI does not render the native terminal TUI. For select-all, batch review and long-form scrolling, open a local terminal or use /audit inside dsh-tui.",terminalRun:"Read-only live queue",terminalTui:"Write mode (real review)",terminalWhy:"Why not embed it in the page",terminalWhyBody:"The terminal TUI relies on the alternate screen, raw key events and a character grid; an iframe cannot reproduce it faithfully. These are the real commands.",terminalCopy:"Copy command",terminalCopied:"Copied",terminalPreview:"Terminal preview",graphTab:"Star map",graph:"Knowledge Graph",graphHint:"Nodes = cards; edges = [[links]] or shared tags. Click a node to read.",graphTip:"Left-click highlights \xB7 Shift+drag box-select \xB7 right-click menu \xB7 scroll zoom \xB7 drag to pan",graphWarming:"Laying out {n} nodes\u2026",rebuild:"Rebuild",reset:"Reset",expandAll:"Expand all",capped:"Showing the",clearFocus:"Clear highlight",empty:"Memory is empty. After a few conversations, valuable content is auto-captured.",emptyGraph:"No graph data yet.",open:"Read",updated:"Updated",created:"Created",source:"Source",contents:"Contents",related:"Related",file:"File",close:"Close",vaultDir:"Vault directory",capture:"Auto capture",recall:"Auto recall",enabled:"on",disabled:"off",error:"Load failed",back:"Back to list",cardCount:"cards",nodes:"nodes",edges:"edges",memoryTitle:"Memory Library",memoryHint:"Your local second brain",zoomIn:"Zoom in",zoomOut:"Zoom out",fit:"Fit",enterFullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",exportGraph:"Export",openCard:"Open card",focusNeighbors:"Highlight links",copyName:"Copy name",noMatch:"No matching memory",clearFilter:"Clear filter",filterLabel:"Filter",sortRecent:"Recent",sortTitle:"Title",sortHot:"Hot",exportSel:"Export selected",clearSelection:"Clear selection",download:"Download",openNewTab:"Open in new tab",copyImage:"Copy image",done:"Done",downloaded:"Download started",openedTab:"Opened in new tab",copied:"Copied",exportedSel:" nodes exported",fullscreen:"Fullscreen",exitFull:"Exit fullscreen",copyFail:"Copy failed",timeDim:"Time",timeNew:"\u22643 days",timeRecent:"\u22642 weeks",timeMonth:"\u22641 month",timeOld:"Older",newBadge:"NEW",expand:"Expand",collapse:"Collapse",copyBody:"Copy body",clearFilter:"Clear tag filter",copyPath:"Copy path",copied:"Copied",copyFail:"Copy failed",readWidth:"Reading width",widthNarrow:"Narrow",widthMid:"Medium",widthWide:"Wide",exportVault:"Export MD",exportJson:"Export JSON",exporting:"Exporting\u2026",exportedVault:"Vault exported",exportFail:"Export failed",importVault:"Import",importedVault:"Import complete",importedTotal:" / of ",importedTotalTail:"",importedQuarantine:" \xB7 pending review ",importedQuarantineTail:" (quarantined until approved)",importedSkipped:" \xB7 skipped ",importedSkippedTail:" (duplicate or empty)",importFail:"Import failed",location:"Choose location",saveAs:"Save as",saveAsUnsupported:"Choose-save-location not supported here",exportedTo:"Exported to",defaultDownloads:"default Downloads folder",exportCancel:"Export cancelled",manage:"Manage",tabUsage:"Runtime",tabOptimize:"Optimize",adminLoadFail:"Load failed: fully restart dsh-desktop so the host picks up the new /memory-eternal routes",retry:"Retry",mergeSimilar:"Merge similar",trendLabel:"Last 30 days trend",cleanStale:"\u{1F5D1}\uFE0F Clean stale",deletedStale:" stale cards cleaned",newCard:"New",tplDecision:"\u{1F4DD} Decision",tplBug:"\u{1F41B} Bug",tplMeeting:"\u{1F4CB} Meeting",tplWeekly:"\u{1F4CA} Weekly",createCard:"Create",cardTitle:"Title",cardBody:"Body",fbUseful:"Useful",fbIrr:"Irrelevant",todayAdd:"Added today",weekAdd:"Last 7d",byKind:"By kind",todayList:"Captured today",budgetLabel:"Session budget",budgetChars:"Budget chars",recallLimitLabel:"Recall limit",embeddingLabel:"Semantic recall",mergePairs:"Similar pairs (mergeable)",staleCards:"Stale (>90d)",noOptimize:"Nothing to organize, healthy \u{1F389}",refineTitle:"Conflict scan",refineScan:"Scan now",refineHint:"Similar cards can be merged; conflicts must be judged by a human \u2014 the scan is read-only, and data only moves after you choose (keeping one moves the other to the recycle bin, recoverable)",refineIdle:'Hit "Scan now": recall possibly-related card pairs, then let the model classify each as duplicate / complement / conflict / unrelated',refineNone:"No card pairs need your ruling this round \u{1F389}",refineFail:"Conflict scan failed",refineApplied:"Your ruling was recorded (it will not ask again)",refineRel_duplicate:"Duplicate (mergeable)",refineRel_complement:"Complement (keep both)",refineRel_conflict:"Conflict (needs your ruling)",refineRel_unrelated:"Unrelated",refineKeepA:"Keep A",refineKeepB:"Keep B",refineKeepBoth:"Keep both",refineMerge:"Merge",junkTitle:"Injected junk cards",junkScan:"Scan existing",junkHint:"Cards suspected to be captured runtime injections (skill catalogs / system-reminders) \u2014 the scan is read-only and recycling goes to the recycle bin (recoverable)",junkIdle:'Hit "Scan existing": find cards whose body is really injected runtime text with almost no human content left after stripping',junkNone:"No such cards found \u{1F389}",junkRecycle:"Recycle",junkRecycleAll:"Recycle all",junkRecycleAllConfirm:"Send these cards to the recycle bin? (Not a permanent delete \u2014 recoverable from the recycle center)",junkDone:"Sent to recycle bin",junkFail:"Scan / recycle failed",dbReadonlyTitle:"The memory database is currently not writable",dbReadonlyBody:"Card reads/writes, auditing and the graph will fail, but **settings can still be saved** (they do not go through the database)",dbReadonlyFix:"Diagnose with: dsh-memory doctor (journal mode, write probe, backups and recovery steps)",goalTitle:"Same goal, different approach",goalScan:"Scan goals",goalHint:'Clusters by "what problem does this card solve" \u2014 approaches that differ in wording (7z vs tar vs npm slimming) still land together',goalIdle:'Hit "Scan goals": the model first writes a one-line goal per card (first run calls the model, later runs use the cache), then clusters by goal',goalNone:'No clusters of "one goal, several cards" found \u{1F389}',goalStats:"indexed / calls this run",goalCards:"cards",goalKeep:"Keep all",goalMerge:"Merge this group",goalMerged:"Merge submitted (the new card goes to the audit queue)",goalDone:'Recorded as "keep all"',goalFail:"Goal clustering failed",oneClickOptimize:"One-click optimize",oneClickOptimizeConfirm:"Confirm one-click optimize? This will merge all similar pairs (stale cards are NOT deleted by default).",oneClickAlsoStale:"Also clean stale cards",oneClickOptimizeDone:"One-click optimize done",optimizedMerged:"pairs merged",optimizedStaleDeleted:"stale cards cleaned",mcpSetupStatus:"Agent MCP mount status",rerunSetup:"Re-run setup",notInstalled:"not installed",noMcpEntry:"no MCP entry",nodePathMismatch:"node path mismatch, consider re-running setup",nodePathNote:"different node env (usable)",mcpNeedsRepair:"\u26A0 Needs repair (old config launches GUI)",repairMcp:"Repair",healthy:"healthy",mcpSetupHint:'"Auto-mount MCP" = lets Claude Code / Codex / Cursor use the memory vault. On = auto-configures them; Off = never touches your machine config, run dsh-memory setup manually when needed.',mcpManageHint:"Use each agent row to install/uninstall MCP individually",tabConfig:"Memory Config",configPageSub:"Local write, routing, audit and service settings",tabAudit:"Review",statusApproved:"Approved",statusPending:"Pending",statusRejected:"Rejected",allStatus:"All statuses",tabRecycle:"Recycle Bin",recyclePageSub:"Deleted cards stay for 30 days; restore or purge",pending:"Pending",rejected:"Rejected",selectAll:"Select all",approve:"Approve",approveAndCore:"Approve as core",approveCore:"Approve as core memory",approveAsNormal:"Approve as normal card",coreSuggested:"Core memory (pending review)",reclassify:"Reclassify types",reject:"Reject",allAgents:"All agents",noAuditItems:"No items to review",auditBodyFail:"Failed to load the card body",deletedAt:"deleted",restore:"Restore",restoreDelete:"Delete to recycle",purge:"Purge",emptyRecycle:"Recycle bin is empty",recycleHint:"Deleted cards go to the recycle bin \u2014 recover within 30 days, else auto-purged",purgeConfirm:"Permanently delete? This cannot be undone.",recycleDeleteConfirm:"Delete to recycle? Recoverable within 30 days.",modeInit:"Init once",modeInterval:"Interval keep-alive",modeManual:"Manual only",serviceConfig:"Service self-hosting config",auditConfig:"Auto-audit config",auditHint:"Cards matching an exemption go straight in; others await audit",auditMode:"Audit mode",auditAll:"Audit all",auditNone:"Skip all",auditExemptAgents:"Exempt agents",auditExemptKinds:"Exempt kinds",allExempt:"Exempt all",recycleDays:"Recycle retention days",editInSetting:"Edit in DSH Settings \u2192 Memory",pendingSyncNote:'This is the standalone web page: the DSH host applies a save (a current host is woken up and applies it in a request context, so saving takes effect immediately); when no DSH host is running here the change goes straight into the shared config. Only an older host falls back to "queued until it syncs on its own" \u2014 in that case change the same option under DSH Settings \u2192 Memory.',readonlyTitle:"This page is read-only; config cannot be saved here",readonlyBody:"This process has no DSH settings service (settings.update is unavailable). Edit the config in DSH: desktop app \u2192 Settings \u2192 Memory.",readonlyBtn:"Read-only",setupRunInTerminal:"Copy this command to your terminal:",dshMemoryConfig:"DSH Memory Config",coreMemory:"Core memory (always-on)",coreMemoryHint:"Injected into every session; only approved core cards are used",coreMemoryEnabled:"Enable core-memory injection",coreMemoryLimit:"Core-memory limit (cards)",coreMemoryMaxChars:"Core-memory total character limit",setCore:"Set as core memory",unsetCore:"Remove from core memory",coreSetOk:"Set as core memory",coreUnsetOk:"Removed from core memory",coreSetFail:"Failed to update",coreActiveHint:"This card is injected into every session; it wins conflicts with normal memory.",coreInactiveHint:"Any approved knowledge card can be promoted to core memory and applies to every session.",coreNeedApproval:"Approve this card before making it core memory.",coreShort:"Core",setCoreShort:"Set core",uiLayout:"Layout size",uiLayoutHint:"Scale the memory UI only; memory data is unchanged",uiCompact:"Compact",uiNormal:"Normal",uiLarge:"Large",autoCapture:"Auto capture",autoRecall:"Auto recall",captureMinChars:"Min capture chars",maxCardsPerDay:"Daily quota",dedupThreshold:"Dedup threshold",recallLimit:"Recall limit",vaultMulti:"Multiple vaults (per project)",vaultMultiHint:"Empty = single vault; existing setups unaffected",vaultNow:"Active now",vaultSource:"Source",vaultWorkspace:"Current workspace",vaultNamePh:"Name, e.g. work",vaultPathPh:"Directory, e.g. D:/vaults/work",vaultMatchPh:"Project dir (optional, auto-select by workspace)",vaultAdd:"Add a vault",vaultActive:"Active vault",vaultActiveNone:"Default vault (unset)",vaultSrcEnv:"env MEMORY_VAULT_DIR",vaultSrcProfile:"activeVault profile",vaultSrcWorkspace:"matched by project dir",vaultSrcVaultDir:"vaultDir setting",vaultSrcDefault:"default directory",fbNav:"Report a bug",fbTitle:"Report a bug (files on GitHub)",fbDesc:"Describe the problem (symptoms / steps / expected)",fbDiag:"Diagnostics (auto-redacted: home dir and keys/tokens replaced)",fbCopyDiag:"Copy diagnostics",fbOpenIssue:"Open prefilled issue on GitHub",fbCopyPrompt:"Copy AI prompt",fbCopiedDiag:"Diagnostics copied",fbCopiedPrompt:"Prompt copied \u2014 paste it into your AI chat",fbCopyFail:"Copy failed; please select and copy manually",fbWhy:"GitHub does not allow anonymous issue creation and the plugin must not ship a token: so the title, body and diagnostics are pre-filled \u2014 you just click Submit.",fbNeedDesc:"Please describe the problem first",fbLoading:"Collecting diagnostics\u2026",fbDiagFail:"Diagnostics endpoint unavailable (standalone web or older host); please add environment info manually",fbOr:"or",fbSelectAll:"Select all",auditTypeLabel:"Type",auditInboxSub:"Captured cards land here \xB7 approve to publish",auditUndo:"Approve and reject are both undoable",auditSelected:"Selected",auditClearSelection:"Clear",preview:"Preview",supportGroup:"Community",supportSponsor:"Sponsor",supportLegacy:"Legacy app",supportTitle:"Support & community",clickToZoom:"Click to enlarge",supportGroupHint:"Scan to join the community; ask questions directly.",supportSponsorHint:"If this plugin saved you time, you can buy the author a coffee. Completely optional.",supportLegacyTitle:"Legacy app (dsh-desktop) is discontinued",supportLegacyBody:"The author\u2019s dsh-desktop is discontinued; the official DeepSeek Harness desktop build covers the same capabilities. If an old profile still pins the withdrawn dsh-desktop-shell@0.3.0, remove that dependency or pnpm install will fail.",supportReadme:"Open README",supportReleases:"Releases",supportFeedback:"Report a bug",supportReplay:"Replay onboarding",onboardTitle:"30 seconds with memory-eternal",onboardSub:"After every conversation, the AI distills knowledge cards. Review first, keep the good ones.",onboardSkip:"Skip",onboardBack:"Back",onboardNext:"Next",onboardStart:"Start using",onboardStep0Title:"Star the project on GitHub first",onboardStep0Body:"A Star is the most direct signal to keep maintaining it; Fork it if you want to modify or self-host.",onboardStar:"Star",onboardFork:"Fork",onboardStarred:"Starred, continue",onboardStarHint:"You can always come back via \u2605 Star in the top bar.",onboardStep1Title:"Auto-capture, no manual notes",onboardStep1Body:"When a session ends, decisions, root causes and lessons become a card. Capture first, review second.",onboardStep2Title:"Found a useful card? Tap \u{1F44D}",onboardStep2Body:"Open any card and tap \u{1F44D} useful / \u{1F44E} not useful. No search needed: the buttons are always there. It helps recall ranking.",onboardStep3Title:"New support entries",onboardStep3Body:"Community, sponsor, legacy app and bug report live at the bottom of the left rail. No need to dig through the README.",onboardTip:"Tip: reopen this guide from Support & community.",navWorkspace:"Workspace",navSystem:"System",navSupport:"Support",v5Local:"Local",v5Star:"Star on GitHub",runtimeTitle:"Runtime status",runtimeSub:"Vault, backups, capture and version",dbTitle:"Vault",backupTitle:"Backups",captureTitle:"Auto capture",versionTitle:"Version",cardsUnit:"cards",links:"links",todayReview:"Today's resurface",openArrow:"Open \u2192",reshuffle:"Another",insightDecision:"Decision",insightRoot:"Root cause",insightLesson:"Lesson",insightSummary:"Summary",pinCard:"Pin this card",unpinCard:"Unpin",pinnedOnly:"Pinned",toastApproved:"approved",toastRejected:"rejected",toastCardDeleted:"deleted",toastRestored:"restored",toastPurged:"permanently deleted",toastPurgedExpired:"expired recycle entries purged",toastFailed:"Action failed",noSelection:"Select the cards to act on first",enabledLabel:"Enable memory core",vaultDirLabel:"Vault directory (single)",captureCooldownMs:"Capture cooldown (ms)",captureProvider:"Distill provider (auto if empty)",routeAuto:"Auto (registration order)",routeListFail:"Could not load the model list ({err}) \u2014 you can type provider / model below; the desktop popup proxies this to the host, so if it still fails open the settings from DSH",captureFollowSession:"Follow current session (distill with the session provider/model)",captureFirstOnly:"First candidate only (stop on failure, no fallback)",llmTest:"Test distill route",llmTestOk:"\u2713 Call succeeded",llmTestFail:"\u2717 Call failed",llmCandidates:"candidates",captureModel:"Distill model (auto if empty)",recallEmbedding:"Semantic recall provider (optional)",sessionBudgetChars:"Session budget (chars)",saving:"Saving\u2026",savePending:"Saved to the config file; the host half is still the old build, so restart DSH to make it effective (already applied in this panel)",saveInvalid:"Some field values are invalid; nothing was submitted",invalidField:'"{field}" must be a number between {min} and {max} (now: {value})',actionRunning:"Working\u2026",recycleEmptyHint:"Recycle bin is empty: deleted cards land here first and are purged automatically after {days} days.",recyclePurgeAll:"Empty recycle bin",fbCopyManual:"Auto-copy was blocked by the browser \u2014 the text is below: click Select all, then Ctrl+C",vcLoaded:"running (process serving this page)",vcResident:"resident instance",vcOnDisk:"on disk",vcLatest:"npm latest",vcStale:'v{disk} is installed on disk but the process serving this page still has v{loaded} loaded \u2014 click "Restart resident instance" to restart it on the new code (no DSH restart needed)',vcRestart:"Restart resident instance",vcRestarting:"Restarting\u2026",vcRestartSent:"Resident restart scheduled: the new process takes over in ~3-8s \u2014 refresh the page (Ctrl+F5) shortly",vcRestartCurrent:"The resident instance is already up to date \u2014 no restart needed",vcRestartAnyway:"Resident is already v{ver}; usually no restart needed \u2014 use this if it looks stuck",vcHostProcessStale:"Disk has v{disk}, but **the process serving this page** (the DSH host) still loads v{loaded} \u2014 that code was loaded when the host started, so **restarting the resident instance does not change this page**: fully quit and reopen DSH.",vcRestartFixes:"Restarts the resident instance (the process on the port) onto v{disk} (currently v{served}) without restarting DSH",vcRestartStart:"Starts the resident instance on the current disk version v{disk} (no DSH restart needed)",vcRestartRepair:"Re-registers it under a watchdog and keeps it alive (already v{disk}; no DSH restart needed)",vcRestartHostOnly:"The resident instance is already v{disk}; this page shows v{loaded} from the DSH host \u2014 restarting the resident does not affect it, please restart DSH",vcRestartFail:"Restart request failed",vcRestartNoRoute:"The process serving this page is still the old build (no such endpoint): restart the desktop app / DSH and retry, or run {cmd}",vcHostStale:'The "running" chip above comes from the process serving this page; the resident instance is already current \u2014 restart the desktop app / DSH to refresh that chip',vcResidentDownShort:"not running",vcResidentDown:"The resident instance is not running (no response on port {port}) \u2014 use the button below to bring it up on the new code; if that fails run {cmd} and share the output of dsh-memory status",vcResidentUnmanagedShort:"unmanaged",vcResidentUnmanaged:"The resident instance serves v{served} but has **no watchdog keeping it alive** (an orphan left by a stop or a hard kill) \u2014 use the button below to put it back under management (a fresh watchdog plus a new instance), or run {cmd}",vcResidentLockUnknownShort:"management unknown",vcResidentReplaceBlockedShort:"cannot replace",vcResidentHostManagedShort:"host-managed",vcResidentReplaceBlocked:'The resident instance **cannot be replaced** (environment limit): the watchdog lock directory is not writable ({err}; {path}) \u2192 the port will stay on v{served} **long-term**. This is not "temporarily behind": automatic replacement is refused on purpose to avoid leaving an orphan. Way out: fix that directory permissions and run {cmd}, or run dsh-memory watchdog --port 7999 in the foreground',vcResidentLockUnknown:'The resident instance serves v{served}, but the **watchdog lock file cannot be written** (restricted environment: sandbox, ACLs, non-system drive) \u2192 whether it is managed cannot be determined (this is not "unmanaged"). Cause: {err} ({path}). Keep-alive usually still works; the button below can put it back under management on the new code.',vcPage:"Page script",vcPageStale:"\u26A0 This page is still running an older script (page v{page} / disk v{disk}): press Ctrl+F5 to refresh. If the running version is still old, restart the desktop app / DSH as well",vcOutdated:"update available",vcUpToDate:"up to date",vcCheck:"Check for updates",checking:"Checking\u2026",vcCheckFail:"Update check failed",recallSummaryLen:"Recall summary len",recallBody:"Recall with body",secretHint:"Credential hint (injected into every session)",autoWeb:"Web server",autoWebMode:"Keep-alive mode",webPort:"Web port",webCheckIntervalMs:"Probe interval (ms)",webMaxRestart:"Max restart",watchdogAutoSpawn:"Watchdog process",autoRestartOnDrift:"Auto-restart resident on version drift",autoMcpSetup:"Auto-mount MCP",saveConfig:"Save config",saveFail:"Save failed",savedOk:"Saved",savedDirect:"No DSH host is running here, so the change went straight into the shared config (hooks / MCP / the standalone page pick it up immediately)",savedApplied:"Saved and applied (the host applied it in a request context)",saveQueued:"Handed to the DSH host for sync \u2014 not confirmed applied yet",saveHostGuard:"This host does not let a plugin write config from its own callback context; change the same option under DSH Settings \u2192 Memory, or edit the profile patch layer",saveFailHint:"the host did not apply it \u2014 see Diagnostics under Report a bug",recallTool:"recall tool",costControl:"Cost control",costHint:"save tokens, control LLM usage",distillEnabled:"Distill cards (on=LLM compress, off=raw cards zero LLM)",dedupByLLM:"Dedup feeds LLM (off=pure lexical, cheaper)",captureMaxTokens:"Distill output cap (tokens)",captureTimeoutMs:"Distill timeout (ms; use 120000+ for cold local models)",recallMinScore:"Recall min score (higher = cheaper)",configNeedsDsh:"Edit config inside DSH (this page may be read-only or partially missing)",installMcp:"Install MCP",uninstallMcp:"Uninstall MCP",uninstallConfirm:"Confirm uninstall MCP for this agent? Claude Code/Codex will lose access to the memory vault.",presetConfig:"One-click preset config",presetHint:"Click to fill a plan, then hit Save",planApplied:'Filled "{plan}" \u2014 hit "Save config" to apply',planDescA:"Personal dev \xB7 distill 4000 \xB7 watchdog off",planDescB:"Budget \xB7 no distill \xB7 ~zero cost",planDescC:"Long projects \xB7 watchdog on \xB7 high quality",cfgSubCore:"Capture / recall / vault dir and dedup strategy",cfgSubMulti:"Per-project vaults; CLI / MCP / hooks follow the active one",cfgSubCost:"Control LLM calls and recall size \u2014 this is your bill",cfgSubAudit:"What must be reviewed before entering the main vault",cfgSubService:"Keep-alive, watchdog and version self-heal \u2014 defaults are fine",cfgDirty:"Unsaved changes",cfgClean:"Synced",unitChars:"chars",unitPerDay:"cards / day",unitTokens:"tokens",unitMs:"ms",unitTimes:"times",unitDays:"days",mcpAutoHint:"Auto-detects installed agents and their MCP configs (read-only probe)",mcpRefresh:"Re-scan",mcpSummary:"{agents} agents \xB7 {servers} MCP servers \xB7 {mounted} mounting this plugin",mcpNoServers:"No MCP configured",mcpDetectedOnly:"detected only",planA:"A Light",planB:"B Budget",planC:"C Premium",pluginInfo:"Plugin info",organizeTitle:"Organize",scanAndOrganize:"Scan & organize",scanHint:'Click "\u{1F50D} Scan & organize" to find similar/stale cards, then "\u26A1 One-click optimize" to run.',mergeNow:"Merge",delete:"Delete",captureAlert:"Auto-capture failed",captureAlertHint:'Open "Usage / Today" for the capture log; if the cause is an API/version mismatch, update the memory-eternal plugin.',captureLog:"Auto-capture log",captureLogHint:"Runs after every turn: listen \u2192 judge \u2192 write. Last 100 entries, so you can see why a card was not written.",captureLogEmpty:"No entries yet. Chat one turn (> min capture chars) and come back.",healthTitle:"Health",healthHint:"Database / backups / capture / versions \u2014 spot anything that broke silently",healthDb:"Database",healthDbBad:"database is unwritable or corrupt",healthBackups:"Backups",healthNoBackups:"no backups yet (run dsh-memory doctor; the host also backs up daily)",healthBackupAge:"{n} files \xB7 newest {d} day(s) ago",healthBackupToday:"{n} files \xB7 newest today",healthCapture:"Auto capture",healthNoRecords:"no records yet (capture has not run)",healthCapOk:"last capture wrote a card",healthCapFail:"last capture failed",healthRunAlign:"run Version alignment check to show",healthVersion:"Versions",ledgerTitle:"Memory ledger (last 7 days)",ledgerHint:'How much recall injected and how many distillation calls ran \u2014 the first data point for the "does it save tokens?" question',ledgerRecalls:"Recalls",ledgerInjected:"injected",ledgerChars:"chars",ledgerCaptures:"Captures",ledgerLlmCalls:"LLM calls",ledgerEstimate:"Est. tokens",ledgerEstimateHint:"rough estimate at ~2 chars per token; order of magnitude only",ledgerUseful:"Recall usefulness",ledgerUsefulHint:"from useful / not-useful feedback; below 60% means injection may cost more than it saves",ledgerFormula:"Net benefit \u2248 avoided context cost \u2212 (injected chars + distillation calls \xD7 price). The ledger only records what we spent; weigh it against the re-reads and rework you actually avoided.",ledgerNoData:"No entries in the last 7 days: chat a few turns or let the agent recall once, then come back.",ledgerNeedRestart:"The host is still running the old API (/ledger missing): fully quit and reopen DSH to start recording.",alignTitle:"Version alignment check",alignRun:"Check now",alignFix:"Rewrite wiring",alignFixConfirm:"Rewrite the MCP / hooks wiring? (Only the plugin's own keys are touched; your data and config stay as they are)",alignFixed:"Wiring rewritten; if it still reports an old host process, you must fully quit and reopen DSH",alignFail:"Alignment check failed",alignHint:"Upgrading the plugin only replaces files on disk \u2014 the host's in-memory event subscriptions and stale paths inside MCP / hooks do not update themselves; this checks all of it at once",alignIdle:'Hit "Check now": compare the host / resident / npm versions and look for stale paths and arguments in MCP and hooks',alignDisk:"disk",alignResident:"resident",alignHost:"host process",captureLogUnavailable:"Log is available only inside the DSH host (the standalone web page has no host runtime).",captureAgentCards:"Cards auto-captured by the agent",noCards:"none",loadMore:"Load more",batchMerge:"Smart batch merge",mergeAllConfirm:"Merge similar-grouped cards into one each (keep kind), delete originals?",crossVault:"All vaults",deleteConfirm:"Delete this memory card? This cannot be undone.",deleted:"Deleted",deleteFail:"Delete failed",deleteSelected:"Delete selected",deletedSelected:" cards deleted",merge:"Merge",mergeNeed:"Select at least 2 cards",mergeConfirm:"Merge the selected cards into one and delete the originals?",merged:"Merged",mergeFail:"Merge failed",mcpInstalled:"\u2705 {agent} MCP installed",mcpUninstalled:"\u2705 {agent} MCP uninstalled",mcpActionFail:"\u274C {agent} MCP action failed: {error}",dshHostLabel:"DeepSeek Harness (current host)",restartHint:"Saved. autoWebMode/watchdogAutoSpawn take effect after restarting DSH; a resident watchdog is never stopped automatically \u2014 use dsh-memory stop / restart (#19)",conflictRefresh:"Config changed elsewhere \u2014 refresh and retry",untitled:"Untitled",tplBlank:"\u{1F4C4} Blank",tagsHint:"Tags (comma-separated)",connCount:"{n} connections",tplDecisionTags:"decision, plan",tplBugTags:"pitfall, lesson",tplMeetingTags:"meeting, minutes",tplWeeklyTags:"weekly report",tplDecisionBody:`# Tech decision: [title]
62
+ - `},Ja={nav:"Memory",loading:"Loading\u2026",loadingGraph:"Loading knowledge graph\u2026",refresh:"Refresh",overview:"Memory Overview",total:"Cards",recent:"Added (7d)",tags:"Tags",searchPlaceholder:"Search memory\u2026",search:"Search",all:"All",kindProject:"Projects",kindKnowledge:"Knowledge",kindContent:"Content",kindPrompt:"Prompts",kindBusiness:"Business",kindTool:"Tools",kindMistake:"Mistakes",kindCore:"Core memory",kindSkill:"Skills",newsTab:"News",newsTitle:"News",newsHint:"Your own updates, decisions and team briefs, kept separate from memory cards.",newsNew:"Write one",newsSearch:"Search title / body / tags\u2026",newsUnreadOnly:"Unread only",newsEmpty:"No news yet. Write the first update, decision or team brief here.",newsNoMatch:"No matching news",newsPinned:"Pinned",newsRead:"Read",newsUnread:"Unread",newsMarkRead:"Mark read",newsMarkUnread:"Mark unread",newsEdit:"Edit",newsDeleteConfirm:"Delete this news item?",newsDeleted:"Deleted",newsSave:"Save",newsSaving:"Saving\u2026",newsSaved:"Saved",newsSaveFail:"Save failed",newsTitleField:"Title",newsBodyField:"Body (Markdown)",newsCategoryField:"Category",newsSourceField:"Source",newsUrlField:"URL",newsTagsField:"Tags (comma separated)",newsDateField:"Date",newsPinField:"Pin to top",newsPreview:"Preview",newsEditBody:"Edit body",newsOpenLink:"Open link",newsToday:"Today",newsYesterday:"Yesterday",newsEarlier:"Earlier",newsTitlePlaceholder:"e.g. v0.20.0 release notes",newsBodyPlaceholder:"Write something worth keeping\u2026 Markdown supported",newsCountUnit:"items",cancel:"Cancel",newsDaily:"Daily AI",newsMonthly:"Monthly top",newsMine:"My updates",newsDailySub:"Latest AI news, aggregated by source",newsMonthlySub:"This month's AI discussion ranking (Hacker News points)",newsMineSub:"Your own releases, decisions and team briefs",newsLoading:"Fetching news\u2026",newsFeedError:"News sources are unavailable",newsHeat:"heat",newsComments:"comments",newsOriginal:"Read original",newsUpdatedAt:"Updated",newsPartialFail:"Some sources failed",newsFeedEmpty:"No news fetched today. Try refresh.",newsFeedRefresh:"Refresh news",newsLoadingHint:"First load fetches several Chinese sources; this can take a few seconds.",newsRetry:"Retry",newsSearchGo:"Search",newsSortRec:"For you",newsSortTime:"Latest",newsPersonalized:"Ordered by your taste",newsLastQuery:"Last search",newsResetPrefs:"Reset taste",newsHeroEye:"NEWSROOM \xB7 AI FEED",newsHeroHint:"One search is remembered \u2014 the next visit is ordered by your taste. Data is fetched once per page open.",newsMatched:"hits",newsNoMatch:"No matching news",newsNoMatchHint:"Nothing in this dataset matches the current keyword, category and language. Clear the filters to see everything.",newsClearFilters:"Clear filters",newsJustNow:"just now",newsMinutesAgo:"min ago",newsHoursAgo:"h ago",newsDaysAgo:"d ago",newsLangZh:"\u4E2D\u6587",newsLangEn:"English",newsLangAll:"All",newsZhArchive:"Chinese monthly archive by date (no public heat score)",newsEnRanking:"English monthly ranking by Hacker News points",skillCards:"Skill cards",skillCardsHint:"Generated from the skills actually installed/available on this machine; always reviewed. Never deposited by agent chat.",skillAutoSync:"Auto-sync skill cards",syncSkills:"Sync skills",syncingSkills:"Syncing skills\u2026",skillsSyncDone:"Skill cards synced",skillsScanned:"scanned",skillsCreated:"created",skillsUpdated:"updated",skillsPendingUpdates:"pending updates",skillsSyncFail:"Skill sync failed",cardsTab:"Cards",webTab:"Web version",webOpening:"Opening the web version in your browser\u2026",webOpened:"Opened the web version in your browser",webOpenFail:"Could not open a browser; visit this URL manually",terminalTab:"Terminal",terminalTitle:"Full terminal UI",terminalIntro:"The Web UI does not render the native terminal TUI. For select-all, batch review and long-form scrolling, open a local terminal or use /audit inside dsh-tui.",terminalRun:"Read-only live queue",terminalTui:"Write mode (real review)",terminalWhy:"Why not embed it in the page",terminalWhyBody:"The terminal TUI relies on the alternate screen, raw key events and a character grid; an iframe cannot reproduce it faithfully. These are the real commands.",terminalCopy:"Copy command",terminalCopied:"Copied",terminalPreview:"Terminal preview",graphTab:"Star map",graph:"Knowledge Graph",graphHint:"Nodes = cards; edges = [[links]] or shared tags. Click a node to read.",graphTip:"Left-click highlights \xB7 Shift+drag box-select \xB7 right-click menu \xB7 scroll zoom \xB7 drag to pan",graphWarming:"Laying out {n} nodes\u2026",rebuild:"Rebuild",reset:"Reset",expandAll:"Expand all",capped:"Showing the",clearFocus:"Clear highlight",empty:"Memory is empty. After a few conversations, valuable content is auto-captured.",emptyGraph:"No graph data yet.",open:"Read",updated:"Updated",created:"Created",source:"Source",contents:"Contents",related:"Related",file:"File",close:"Close",vaultDir:"Vault directory",capture:"Auto capture",recall:"Auto recall",enabled:"on",disabled:"off",error:"Load failed",back:"Back to list",cardCount:"cards",nodes:"nodes",edges:"edges",memoryTitle:"Memory Library",memoryHint:"Your local second brain",zoomIn:"Zoom in",zoomOut:"Zoom out",fit:"Fit",enterFullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",exportGraph:"Export",openCard:"Open card",focusNeighbors:"Highlight links",copyName:"Copy name",noMatch:"No matching memory",clearFilter:"Clear filter",filterLabel:"Filter",sortRecent:"Recent",sortTitle:"Title",sortHot:"Hot",exportSel:"Export selected",clearSelection:"Clear selection",download:"Download",openNewTab:"Open in new tab",copyImage:"Copy image",done:"Done",downloaded:"Download started",openedTab:"Opened in new tab",copied:"Copied",exportedSel:" nodes exported",fullscreen:"Fullscreen",exitFull:"Exit fullscreen",copyFail:"Copy failed",timeDim:"Time",timeNew:"\u22643 days",timeRecent:"\u22642 weeks",timeMonth:"\u22641 month",timeOld:"Older",newBadge:"NEW",expand:"Expand",collapse:"Collapse",copyBody:"Copy body",clearFilter:"Clear tag filter",copyPath:"Copy path",copied:"Copied",copyFail:"Copy failed",readWidth:"Reading width",widthNarrow:"Narrow",widthMid:"Medium",widthWide:"Wide",exportVault:"Export MD",exportJson:"Export JSON",exporting:"Exporting\u2026",exportedVault:"Vault exported",exportFail:"Export failed",importVault:"Import",importedVault:"Import complete",importedTotal:" / of ",importedTotalTail:"",importedQuarantine:" \xB7 pending review ",importedQuarantineTail:" (quarantined until approved)",importedSkipped:" \xB7 skipped ",importedSkippedTail:" (duplicate or empty)",importFail:"Import failed",location:"Choose location",saveAs:"Save as",saveAsUnsupported:"Choose-save-location not supported here",exportedTo:"Exported to",defaultDownloads:"default Downloads folder",exportCancel:"Export cancelled",manage:"Manage",tabUsage:"Runtime",tabOptimize:"Optimize",adminLoadFail:"Load failed: fully restart dsh-desktop so the host picks up the new /memory-eternal routes",retry:"Retry",mergeSimilar:"Merge similar",trendLabel:"Last 30 days trend",cleanStale:"\u{1F5D1}\uFE0F Clean stale",deletedStale:" stale cards cleaned",newCard:"New",tplDecision:"\u{1F4DD} Decision",tplBug:"\u{1F41B} Bug",tplMeeting:"\u{1F4CB} Meeting",tplWeekly:"\u{1F4CA} Weekly",createCard:"Create",cardTitle:"Title",cardBody:"Body",fbUseful:"Useful",fbIrr:"Irrelevant",todayAdd:"Added today",weekAdd:"Last 7d",byKind:"By kind",todayList:"Captured today",budgetLabel:"Session budget",budgetChars:"Budget chars",recallLimitLabel:"Recall limit",embeddingLabel:"Semantic recall",mergePairs:"Similar pairs (mergeable)",staleCards:"Stale (>90d)",noOptimize:"Nothing to organize, healthy \u{1F389}",refineTitle:"Conflict scan",refineScan:"Scan now",refineHint:"Similar cards can be merged; conflicts must be judged by a human \u2014 the scan is read-only, and data only moves after you choose (keeping one moves the other to the recycle bin, recoverable)",refineIdle:'Hit "Scan now": recall possibly-related card pairs, then let the model classify each as duplicate / complement / conflict / unrelated',refineNone:"No card pairs need your ruling this round \u{1F389}",refineFail:"Conflict scan failed",refineApplied:"Your ruling was recorded (it will not ask again)",refineRel_duplicate:"Duplicate (mergeable)",refineRel_complement:"Complement (keep both)",refineRel_conflict:"Conflict (needs your ruling)",refineRel_unrelated:"Unrelated",refineKeepA:"Keep A",refineKeepB:"Keep B",refineKeepBoth:"Keep both",refineMerge:"Merge",junkTitle:"Injected junk cards",junkScan:"Scan existing",junkHint:"Cards suspected to be captured runtime injections (skill catalogs / system-reminders) \u2014 the scan is read-only and recycling goes to the recycle bin (recoverable)",junkIdle:'Hit "Scan existing": find cards whose body is really injected runtime text with almost no human content left after stripping',junkNone:"No such cards found \u{1F389}",junkRecycle:"Recycle",junkRecycleAll:"Recycle all",junkRecycleAllConfirm:"Send these cards to the recycle bin? (Not a permanent delete \u2014 recoverable from the recycle center)",junkDone:"Sent to recycle bin",junkFail:"Scan / recycle failed",dbReadonlyTitle:"The memory database is currently not writable",dbReadonlyBody:"Card reads/writes, auditing and the graph will fail, but **settings can still be saved** (they do not go through the database)",dbReadonlyFix:"Diagnose with: dsh-memory doctor (journal mode, write probe, backups and recovery steps)",goalTitle:"Same goal, different approach",goalScan:"Scan goals",goalHint:'Clusters by "what problem does this card solve" \u2014 approaches that differ in wording (7z vs tar vs npm slimming) still land together',goalIdle:'Hit "Scan goals": the model first writes a one-line goal per card (first run calls the model, later runs use the cache), then clusters by goal',goalNone:'No clusters of "one goal, several cards" found \u{1F389}',goalStats:"indexed / calls this run",goalCards:"cards",goalKeep:"Keep all",goalMerge:"Merge this group",goalMerged:"Merge submitted (the new card goes to the audit queue)",goalDone:'Recorded as "keep all"',goalFail:"Goal clustering failed",oneClickOptimize:"One-click optimize",oneClickOptimizeConfirm:"Confirm one-click optimize? This will merge all similar pairs (stale cards are NOT deleted by default).",oneClickAlsoStale:"Also clean stale cards",oneClickOptimizeDone:"One-click optimize done",optimizedMerged:"pairs merged",optimizedStaleDeleted:"stale cards cleaned",mcpSetupStatus:"Agent MCP mount status",rerunSetup:"Re-run setup",notInstalled:"not installed",noMcpEntry:"no MCP entry",nodePathMismatch:"node path mismatch, consider re-running setup",nodePathNote:"different node env (usable)",mcpNeedsRepair:"\u26A0 Needs repair (old config launches GUI)",repairMcp:"Repair",healthy:"healthy",mcpSetupHint:'"Auto-mount MCP" = lets Claude Code / Codex / Cursor use the memory vault. On = auto-configures them; Off = never touches your machine config, run dsh-memory setup manually when needed.',mcpManageHint:"Use each agent row to install/uninstall MCP individually",tabConfig:"Memory Config",configPageSub:"Local write, routing, audit and service settings",tabAudit:"Review",statusApproved:"Approved",statusPending:"Pending",statusRejected:"Rejected",allStatus:"All statuses",tabRecycle:"Recycle Bin",recyclePageSub:"Deleted cards stay for 30 days; restore or purge",pending:"Pending",rejected:"Rejected",selectAll:"Select all",approve:"Approve",approveAndCore:"Approve as core",approveCore:"Approve as core memory",approveAsNormal:"Approve as normal card",coreSuggested:"Core memory (pending review)",reclassify:"Reclassify types",reject:"Reject",allAgents:"All agents",noAuditItems:"No items to review",auditBodyFail:"Failed to load the card body",deletedAt:"deleted",restore:"Restore",restoreDelete:"Delete to recycle",purge:"Purge",emptyRecycle:"Recycle bin is empty",recycleHint:"Deleted cards go to the recycle bin \u2014 recover within 30 days, else auto-purged",purgeConfirm:"Permanently delete? This cannot be undone.",recycleDeleteConfirm:"Delete to recycle? Recoverable within 30 days.",modeInit:"Init once",modeInterval:"Interval keep-alive",modeManual:"Manual only",serviceConfig:"Service self-hosting config",auditConfig:"Auto-audit config",auditHint:"Cards matching an exemption go straight in; others await audit",auditMode:"Audit mode",auditAll:"Audit all",auditNone:"Skip all",auditExemptAgents:"Exempt agents",auditExemptKinds:"Exempt kinds",allExempt:"Exempt all",recycleDays:"Recycle retention days",editInSetting:"Edit in DSH Settings \u2192 Memory",pendingSyncNote:'This is the standalone web page: the DSH host applies a save (a current host is woken up and applies it in a request context, so saving takes effect immediately); when no DSH host is running here the change goes straight into the shared config. Only an older host falls back to "queued until it syncs on its own" \u2014 in that case change the same option under DSH Settings \u2192 Memory.',readonlyTitle:"This page is read-only; config cannot be saved here",readonlyBody:"This process has no DSH settings service (settings.update is unavailable). Edit the config in DSH: desktop app \u2192 Settings \u2192 Memory.",readonlyBtn:"Read-only",setupRunInTerminal:"Copy this command to your terminal:",dshMemoryConfig:"DSH Memory Config",coreMemory:"Core memory (always-on)",coreMemoryHint:"Injected into every session; only approved core cards are used",coreMemoryEnabled:"Enable core-memory injection",coreMemoryLimit:"Core-memory limit (cards)",coreMemoryMaxChars:"Core-memory total character limit",setCore:"Set as core memory",unsetCore:"Remove from core memory",coreSetOk:"Set as core memory",coreUnsetOk:"Removed from core memory",coreSetFail:"Failed to update",coreActiveHint:"This card is injected into every session; it wins conflicts with normal memory.",coreInactiveHint:"Any approved knowledge card can be promoted to core memory and applies to every session.",coreNeedApproval:"Approve this card before making it core memory.",coreShort:"Core",setCoreShort:"Set core",uiLayout:"Layout size",uiLayoutHint:"Scale the memory UI only; memory data is unchanged",uiCompact:"Compact",uiNormal:"Normal",uiLarge:"Large",autoCapture:"Auto capture",autoRecall:"Auto recall",captureMinChars:"Min capture chars",maxCardsPerDay:"Daily quota",dedupThreshold:"Dedup threshold",recallLimit:"Recall limit",vaultMulti:"Multiple vaults (per project)",vaultMultiHint:"Empty = single vault; existing setups unaffected",vaultNow:"Active now",vaultSource:"Source",vaultWorkspace:"Current workspace",vaultNamePh:"Name, e.g. work",vaultPathPh:"Directory, e.g. D:/vaults/work",vaultMatchPh:"Project dir (optional, auto-select by workspace)",vaultAdd:"Add a vault",vaultActive:"Active vault",vaultActiveNone:"Default vault (unset)",vaultSrcEnv:"env MEMORY_VAULT_DIR",vaultSrcProfile:"activeVault profile",vaultSrcWorkspace:"matched by project dir",vaultSrcVaultDir:"vaultDir setting",vaultSrcDefault:"default directory",fbNav:"Report a bug",fbTitle:"Report a bug (files on GitHub)",fbDesc:"Describe the problem (symptoms / steps / expected)",fbDiag:"Diagnostics (auto-redacted: home dir and keys/tokens replaced)",fbCopyDiag:"Copy diagnostics",fbOpenIssue:"Open prefilled issue on GitHub",fbCopyPrompt:"Copy AI prompt",fbCopiedDiag:"Diagnostics copied",fbCopiedPrompt:"Prompt copied \u2014 paste it into your AI chat",fbCopyFail:"Copy failed; please select and copy manually",fbWhy:"GitHub does not allow anonymous issue creation and the plugin must not ship a token: so the title, body and diagnostics are pre-filled \u2014 you just click Submit.",fbNeedDesc:"Please describe the problem first",fbLoading:"Collecting diagnostics\u2026",fbDiagFail:"Diagnostics endpoint unavailable (standalone web or older host); please add environment info manually",fbOr:"or",fbSelectAll:"Select all",auditTypeLabel:"Type",auditInboxSub:"Captured cards land here \xB7 approve to publish",auditSearchPlaceholder:"Search title, tag or path\u2026",auditNoMatch:"No matching review cards",auditUndo:"Approve and reject are both undoable",auditSelected:"Selected",auditClearSelection:"Clear",preview:"Preview",supportGroup:"Community",supportGroupQQ:"QQ group",supportGroupWechat:"WeChat group",supportSponsor:"Sponsor",supportLegacy:"Legacy app",supportTitle:"Support & community",clickToZoom:"Click to enlarge",supportGroupHint:"Scan to join the QQ or WeChat community; ask questions directly.",supportSponsorHint:"If this plugin saved you time, you can buy the author a coffee. Completely optional.",supportLegacyTitle:"Legacy app (dsh-desktop) is discontinued",supportLegacyBody:"The author\u2019s dsh-desktop is discontinued; the official DeepSeek Harness desktop build covers the same capabilities. If an old profile still pins the withdrawn dsh-desktop-shell@0.3.0, remove that dependency or pnpm install will fail.",supportReadme:"Open README",supportReleases:"Releases",supportFeedback:"Report a bug",supportReplay:"Replay onboarding",onboardTitle:"30 seconds with memory-eternal",onboardSub:"After every conversation, the AI distills knowledge cards. Review first, keep the good ones.",onboardSkip:"Skip",onboardBack:"Back",onboardNext:"Next",onboardStart:"Start using",onboardStep0Title:"Star the project on GitHub first",onboardStep0Body:"A Star is the most direct signal to keep maintaining it; Fork it if you want to modify or self-host.",onboardStar:"Star",onboardFork:"Fork",onboardStarred:"Starred, continue",onboardStarHint:"You can always come back via \u2605 Star in the top bar.",onboardStep1Title:"Auto-capture, no manual notes",onboardStep1Body:"When a session ends, decisions, root causes and lessons become a card. Capture first, review second.",onboardStep2Title:"Found a useful card? Tap \u{1F44D}",onboardStep2Body:"Open any card and tap \u{1F44D} useful / \u{1F44E} not useful. No search needed: the buttons are always there. It helps recall ranking.",onboardStep3Title:"New support entries",onboardStep3Body:"Community, sponsor, legacy app and bug report live at the bottom of the left rail. No need to dig through the README.",onboardTip:"Tip: reopen this guide from Support & community.",navWorkspace:"Workspace",navSystem:"System",navSupport:"Support",v5Local:"Local",v5Star:"Star on GitHub",runtimeTitle:"Runtime status",runtimeSub:"Vault, backups, capture and version",dbTitle:"Vault",backupTitle:"Backups",captureTitle:"Auto capture",versionTitle:"Version",cardsUnit:"cards",links:"links",todayReview:"Today's resurface",openArrow:"Open \u2192",reshuffle:"Another",insightDecision:"Decision",insightRoot:"Root cause",insightLesson:"Lesson",insightSummary:"Summary",pinCard:"Pin this card",unpinCard:"Unpin",pinnedOnly:"Pinned",toastApproved:"approved",toastRejected:"rejected",toastCardDeleted:"deleted",toastRestored:"restored",toastPurged:"permanently deleted",toastPurgedExpired:"expired recycle entries purged",toastFailed:"Action failed",noSelection:"Select the cards to act on first",enabledLabel:"Enable memory core",vaultDirLabel:"Vault directory (single)",captureCooldownMs:"Capture cooldown (ms)",captureProvider:"Distill provider (auto if empty)",routeAuto:"Auto (registration order)",routeListFail:"Could not load the model list ({err}) \u2014 you can type provider / model below; the desktop popup proxies this to the host, so if it still fails open the settings from DSH",captureFollowSession:"Follow current session (distill with the session provider/model)",captureFirstOnly:"First candidate only (stop on failure, no fallback)",llmTest:"Test distill route",llmTestOk:"\u2713 Call succeeded",llmTestFail:"\u2717 Call failed",llmCandidates:"candidates",captureModel:"Distill model (auto if empty)",recallEmbedding:"Semantic recall provider (optional)",sessionBudgetChars:"Session budget (chars)",saving:"Saving\u2026",savePending:"Saved to the config file; the host half is still the old build, so restart DSH to make it effective (already applied in this panel)",saveInvalid:"Some field values are invalid; nothing was submitted",invalidField:'"{field}" must be a number between {min} and {max} (now: {value})',actionRunning:"Working\u2026",recycleEmptyHint:"Recycle bin is empty: deleted cards land here first and are purged automatically after {days} days.",recyclePurgeAll:"Empty recycle bin",fbCopyManual:"Auto-copy was blocked by the browser \u2014 the text is below: click Select all, then Ctrl+C",vcLoaded:"running (process serving this page)",vcResident:"resident instance",vcOnDisk:"on disk",vcLatest:"npm latest",vcStale:'v{disk} is installed on disk but the process serving this page still has v{loaded} loaded \u2014 click "Restart resident instance" to restart it on the new code (no DSH restart needed)',vcRestart:"Restart resident instance",vcRestarting:"Restarting\u2026",vcRestartSent:"Resident restart scheduled: the new process takes over in ~3-8s \u2014 refresh the page (Ctrl+F5) shortly",vcRestartCurrent:"The resident instance is already up to date \u2014 no restart needed",vcRestartAnyway:"Resident is already v{ver}; usually no restart needed \u2014 use this if it looks stuck",vcHostProcessStale:"Disk has v{disk}, but **the process serving this page** (the DSH host) still loads v{loaded} \u2014 that code was loaded when the host started, so **restarting the resident instance does not change this page**: fully quit and reopen DSH.",vcRestartFixes:"Restarts the resident instance (the process on the port) onto v{disk} (currently v{served}) without restarting DSH",vcRestartStart:"Starts the resident instance on the current disk version v{disk} (no DSH restart needed)",vcRestartRepair:"Re-registers it under a watchdog and keeps it alive (already v{disk}; no DSH restart needed)",vcRestartHostOnly:"The resident instance is already v{disk}; this page shows v{loaded} from the DSH host \u2014 restarting the resident does not affect it, please restart DSH",vcRestartFail:"Restart request failed",vcRestartNoRoute:"The process serving this page is still the old build (no such endpoint): restart the desktop app / DSH and retry, or run {cmd}",vcHostStale:'The "running" chip above comes from the process serving this page; the resident instance is already current \u2014 restart the desktop app / DSH to refresh that chip',vcResidentDownShort:"not running",vcResidentDown:"The resident instance is not running (no response on port {port}) \u2014 use the button below to bring it up on the new code; if that fails run {cmd} and share the output of dsh-memory status",vcResidentUnmanagedShort:"unmanaged",vcResidentUnmanaged:"The resident instance serves v{served} but has **no watchdog keeping it alive** (an orphan left by a stop or a hard kill) \u2014 use the button below to put it back under management (a fresh watchdog plus a new instance), or run {cmd}",vcResidentLockUnknownShort:"management unknown",vcResidentReplaceBlockedShort:"cannot replace",vcResidentHostManagedShort:"host-managed",vcResidentReplaceBlocked:'The resident instance **cannot be replaced** (environment limit): the watchdog lock directory is not writable ({err}; {path}) \u2192 the port will stay on v{served} **long-term**. This is not "temporarily behind": automatic replacement is refused on purpose to avoid leaving an orphan. Way out: fix that directory permissions and run {cmd}, or run dsh-memory watchdog --port 7999 in the foreground',vcResidentLockUnknown:'The resident instance serves v{served}, but the **watchdog lock file cannot be written** (restricted environment: sandbox, ACLs, non-system drive) \u2192 whether it is managed cannot be determined (this is not "unmanaged"). Cause: {err} ({path}). Keep-alive usually still works; the button below can put it back under management on the new code.',vcPage:"Page script",vcPageStale:"\u26A0 This page is still running an older script (page v{page} / disk v{disk}): press Ctrl+F5 to refresh. If the running version is still old, restart the desktop app / DSH as well",vcOutdated:"update available",vcUpToDate:"up to date",vcCheck:"Check for updates",checking:"Checking\u2026",vcCheckFail:"Update check failed",recallSummaryLen:"Recall summary len",recallBody:"Recall with body",secretHint:"Credential hint (injected into every session)",autoWeb:"Web server",autoWebMode:"Keep-alive mode",webPort:"Web port",webCheckIntervalMs:"Probe interval (ms)",webMaxRestart:"Max restart",watchdogAutoSpawn:"Watchdog process",autoRestartOnDrift:"Auto-restart resident on version drift",autoMcpSetup:"Auto-mount MCP",saveConfig:"Save config",saveFail:"Save failed",savedOk:"Saved",savedDirect:"No DSH host is running here, so the change went straight into the shared config (hooks / MCP / the standalone page pick it up immediately)",savedApplied:"Saved and applied (the host applied it in a request context)",saveQueued:"Handed to the DSH host for sync \u2014 not confirmed applied yet",saveHostGuard:"This host does not let a plugin write config from its own callback context; change the same option under DSH Settings \u2192 Memory, or edit the profile patch layer",saveFailHint:"the host did not apply it \u2014 see Diagnostics under Report a bug",recallTool:"recall tool",costControl:"Cost control",costHint:"save tokens, control LLM usage",distillEnabled:"Distill cards (on=LLM compress, off=raw cards zero LLM)",dedupByLLM:"Dedup feeds LLM (off=pure lexical, cheaper)",captureMaxTokens:"Distill output cap (tokens)",captureTimeoutMs:"Distill timeout (ms; use 120000+ for cold local models)",recallMinScore:"Recall min score (higher = cheaper)",configNeedsDsh:"Edit config inside DSH (this page may be read-only or partially missing)",installMcp:"Install MCP",uninstallMcp:"Uninstall MCP",uninstallConfirm:"Confirm uninstall MCP for this agent? Claude Code/Codex will lose access to the memory vault.",presetConfig:"One-click preset config",presetHint:"Click to fill a plan, then hit Save",planApplied:'Filled "{plan}" \u2014 hit "Save config" to apply',planDescA:"Personal dev \xB7 distill 4000 \xB7 watchdog off",planDescB:"Budget \xB7 no distill \xB7 ~zero cost",planDescC:"Long projects \xB7 watchdog on \xB7 high quality",cfgSubCore:"Capture / recall / vault dir and dedup strategy",cfgSubMulti:"Per-project vaults; CLI / MCP / hooks follow the active one",cfgSubCost:"Control LLM calls and recall size \u2014 this is your bill",cfgSubAudit:"What must be reviewed before entering the main vault",cfgSubService:"Keep-alive, watchdog and version self-heal \u2014 defaults are fine",cfgDirty:"Unsaved changes",cfgClean:"Synced",unitChars:"chars",unitPerDay:"cards / day",unitTokens:"tokens",unitMs:"ms",unitTimes:"times",unitDays:"days",mcpAutoHint:"Auto-detects installed agents and their MCP configs (read-only probe)",mcpRefresh:"Re-scan",mcpSummary:"{agents} agents \xB7 {servers} MCP servers \xB7 {mounted} mounting this plugin",mcpNoServers:"No MCP configured",mcpDetectedOnly:"detected only",planA:"A Light",planB:"B Budget",planC:"C Premium",pluginInfo:"Plugin info",organizeTitle:"Organize",scanAndOrganize:"Scan & organize",scanHint:'Click "\u{1F50D} Scan & organize" to find similar/stale cards, then "\u26A1 One-click optimize" to run.',mergeNow:"Merge",delete:"Delete",captureAlert:"Auto-capture failed",captureAlertHint:'Open "Usage / Today" for the capture log; if the cause is an API/version mismatch, update the memory-eternal plugin.',captureLog:"Auto-capture log",captureLogHint:"Runs after every turn: listen \u2192 judge \u2192 write. Last 100 entries, so you can see why a card was not written.",captureLogEmpty:"No entries yet. Chat one turn (> min capture chars) and come back.",healthTitle:"Health",healthHint:"Database / backups / capture / versions \u2014 spot anything that broke silently",healthDb:"Database",healthDbBad:"database is unwritable or corrupt",healthBackups:"Backups",healthNoBackups:"no backups yet (run dsh-memory doctor; the host also backs up daily)",healthBackupAge:"{n} files \xB7 newest {d} day(s) ago",healthBackupToday:"{n} files \xB7 newest today",healthCapture:"Auto capture",healthNoRecords:"no records yet (capture has not run)",healthCapOk:"last capture wrote a card",healthCapFail:"last capture failed",healthRunAlign:"run Version alignment check to show",healthVersion:"Versions",ledgerTitle:"Memory ledger (last 7 days)",ledgerHint:'How much recall injected and how many distillation calls ran \u2014 the first data point for the "does it save tokens?" question',ledgerRecalls:"Recalls",ledgerInjected:"injected",ledgerChars:"chars",ledgerCaptures:"Captures",ledgerLlmCalls:"LLM calls",ledgerEstimate:"Est. tokens",ledgerEstimateHint:"rough estimate at ~2 chars per token; order of magnitude only",ledgerUseful:"Recall usefulness",ledgerUsefulHint:"from useful / not-useful feedback; below 60% means injection may cost more than it saves",ledgerFormula:"Net benefit \u2248 avoided context cost \u2212 (injected chars + distillation calls \xD7 price). The ledger only records what we spent; weigh it against the re-reads and rework you actually avoided.",ledgerNoData:"No entries in the last 7 days: chat a few turns or let the agent recall once, then come back.",ledgerNeedRestart:"The host is still running the old API (/ledger missing): fully quit and reopen DSH to start recording.",alignTitle:"Version alignment check",alignRun:"Check now",alignFix:"Rewrite wiring",alignFixConfirm:"Rewrite the MCP / hooks wiring? (Only the plugin's own keys are touched; your data and config stay as they are)",alignFixed:"Wiring rewritten; if it still reports an old host process, you must fully quit and reopen DSH",alignFail:"Alignment check failed",alignHint:"Upgrading the plugin only replaces files on disk \u2014 the host's in-memory event subscriptions and stale paths inside MCP / hooks do not update themselves; this checks all of it at once",alignIdle:'Hit "Check now": compare the host / resident / npm versions and look for stale paths and arguments in MCP and hooks',alignDisk:"disk",alignResident:"resident",alignHost:"host process",captureLogUnavailable:"Log is available only inside the DSH host (the standalone web page has no host runtime).",captureAgentCards:"Cards auto-captured by the agent",noCards:"none",loadMore:"Load more",batchMerge:"Smart batch merge",mergeAllConfirm:"Merge similar-grouped cards into one each (keep kind), delete originals?",crossVault:"All vaults",deleteConfirm:"Delete this memory card? This cannot be undone.",deleted:"Deleted",deleteFail:"Delete failed",deleteSelected:"Delete selected",deletedSelected:" cards deleted",merge:"Merge",mergeNeed:"Select at least 2 cards",mergeConfirm:"Merge the selected cards into one and delete the originals?",merged:"Merged",mergeFail:"Merge failed",mcpInstalled:"\u2705 {agent} MCP installed",mcpUninstalled:"\u2705 {agent} MCP uninstalled",mcpActionFail:"\u274C {agent} MCP action failed: {error}",dshHostLabel:"DeepSeek Harness (current host)",restartHint:"Saved. autoWebMode/watchdogAutoSpawn take effect after restarting DSH; a resident watchdog is never stopped automatically \u2014 use dsh-memory stop / restart (#19)",conflictRefresh:"Config changed elsewhere \u2014 refresh and retry",untitled:"Untitled",tplBlank:"\u{1F4C4} Blank",tagsHint:"Tags (comma-separated)",connCount:"{n} connections",tplDecisionTags:"decision, plan",tplBugTags:"pitfall, lesson",tplMeetingTags:"meeting, minutes",tplWeeklyTags:"weekly report",tplDecisionBody:`# Tech decision: [title]
62
63
 
63
64
  ## Background
64
65
  - Problem
@@ -103,7 +104,7 @@ Option A, because:
103
104
  -
104
105
 
105
106
  ## Risks/blockers
106
- - `},ra=["all","core","project","knowledge","content","prompt","business","tool","mistake"],Ve={core:"#FF7A45",project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},ea=t=>Array.isArray(t&&t.tags)?t.tags:[],Rt={core:"\u2B50",project:"\u{1F4C1}",knowledge:"\u{1F4DA}",content:"\u{1F4DD}",prompt:"\u{1F4AC}",business:"\u{1F4BC}",tool:"\u{1F527}",mistake:"\u26A0\uFE0F",other:"\u{1F4CE}"},$e={core:"kindCore",project:"kindProject",knowledge:"kindKnowledge",content:"kindContent",prompt:"kindPrompt",business:"kindBusiness",tool:"kindTool",mistake:"kindMistake",other:"kindKnowledge"},Ot="deepseek-harness",Tt=t=>{let a=String(t||""),i=a.toLowerCase();return!a||a==="agent"||a==="unknown"||a.startsWith("session:")||i.startsWith("claude-code")?i.startsWith("claude-code")?"claude":Ot:i==="deepseek harness"?Ot:a.split(":")[0]||Ot},an=[Ot,"claude","codex","cursor","codex-desktop"],Ra=(t=[])=>[...new Set([...an,...(t||[]).map(Tt)])],nn={boot:["\u{1F680}","#8b5cf6"],listen:["\u{1F442}","inherit"],created:["\u2705","#10b981"],appended:["\u2795","#3b82f6"],skip:["\u23ED","#f59e0b"],warn:["\u26A0\uFE0F","#f59e0b"],fail:["\u274C","#ef4444"]},qe=`
107
+ - `},oa=["all","core","project","knowledge","skill","content","prompt","business","tool","mistake"],Xa=oa.filter(t=>t!=="all"&&t!=="core"),qe={core:"#FF7A45",skill:"#8B5CF6",project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},ua=t=>Array.isArray(t&&t.tags)?t.tags:[],Ct={core:"\u2B50",skill:"\u{1F9E9}",project:"\u{1F4C1}",knowledge:"\u{1F4DA}",content:"\u{1F4DD}",prompt:"\u{1F4AC}",business:"\u{1F4BC}",tool:"\u{1F527}",mistake:"\u26A0\uFE0F",other:"\u{1F4CE}"},Ge={core:"kindCore",skill:"kindSkill",project:"kindProject",knowledge:"kindKnowledge",content:"kindContent",prompt:"kindPrompt",business:"kindBusiness",tool:"kindTool",mistake:"kindMistake",other:"kindKnowledge"},Gt="deepseek-harness",Nt=t=>{let a=String(t||""),o=a.toLowerCase();return!a||a==="agent"||a==="unknown"||a.startsWith("session:")||o.startsWith("claude-code")?o.startsWith("claude-code")?"claude":Gt:o==="deepseek harness"?Gt:a.split(":")[0]||Gt},Rn=[Gt,"claude","codex","cursor","codex-desktop"],Qa=(t=[])=>[...new Set([...Rn,...(t||[]).map(Nt)])],zn={boot:["\u{1F680}","#8b5cf6"],listen:["\u{1F442}","inherit"],created:["\u2705","#10b981"],appended:["\u2795","#3b82f6"],skip:["\u23ED","#f59e0b"],warn:["\u26A0\uFE0F","#f59e0b"],fail:["\u274C","#ef4444"]},Je=`
107
108
  .memory-eternal-root { font-family: inherit; color: var(--dsw-alias-label-primary, #1f2937); }
108
109
  .mc-card { background: var(--dsw-alias-bg-layer-1, #fff); border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 12px; padding: 14px 16px; }
109
110
  .mc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
@@ -290,6 +291,121 @@ Option A, because:
290
291
  @media (max-width: 1180px) { .me-audit-main { flex-direction: row; } .me-audit-preview { display: flex; flex: 0 0 460px; width: 460px; max-height: calc(100vh - 130px); position: sticky; top: 0; } }
291
292
  @media (max-width: 900px) { .me-audit-main { gap: 8px; } .me-audit-preview { flex-basis: 360px; width: 360px; } }
292
293
  .me-audit-bulk { position: sticky; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 10px; background: var(--dsw-alias-bg-layer-1, #fff); box-shadow: 0 -8px 24px rgba(0,0,0,.12); }
294
+ /* ---- \u52A8\u6001 / News ---- */
295
+ .mc-news { display: flex; flex-direction: column; flex: 1; min-height: 0; }
296
+ .mc-news-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
297
+ .mc-news-search { flex: 1 1 220px; min-width: 160px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--dsw-alias-border-l2, #d1d5db); background: var(--dsw-alias-bg-layer-1, #fff); color: inherit; font-size: 12px; }
298
+ .mc-news-main { display: flex; gap: 10px; align-items: flex-start; }
299
+ .mc-news-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
300
+ .mc-news-group { display: flex; flex-direction: column; gap: 8px; }
301
+ .mc-news-group-label { margin: 10px 0 0; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dsw-alias-label-secondary, #6b7280); }
302
+ .mc-news-card { position: relative; background: var(--dsw-alias-bg-layer-1, #fff); border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 12px; padding: 13px 15px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .1s; }
303
+ .mc-news-card:hover { border-color: var(--dsw-alias-border-l2, #d1d5db); box-shadow: 0 10px 26px rgba(0,0,0,.08); }
304
+ .mc-news-card:active { transform: translateY(1px); }
305
+ .mc-news-card.pinned { border-color: rgba(255,122,69,.5); background: linear-gradient(135deg, rgba(255,122,69,.07), transparent 60%); }
306
+ .mc-news-card.unread { border-left: 3px solid var(--dsw-alias-accent, #2563eb); }
307
+ .mc-news-card.active { border-color: var(--dsw-alias-accent, #2563eb); box-shadow: 0 0 0 1px var(--dsw-alias-accent, #2563eb) inset; }
308
+ .mc-news-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
309
+ .mc-news-cat { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 650; color: var(--dsw-alias-accent, #2563eb); background: rgba(37,99,235,.10); border: 1px solid rgba(37,99,235,.18); }
310
+ .mc-news-pin { font-size: 10px; color: #f59e0b; font-weight: 650; }
311
+ .mc-news-time { margin-left: auto; font-size: 10px; color: var(--dsw-alias-label-secondary, #6b7280); white-space: nowrap; }
312
+ .mc-news-title { margin: 7px 0 0; font-size: 14.5px; font-weight: 650; line-height: 1.45; letter-spacing: -.01em; }
313
+ .mc-news-excerpt { margin: 5px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--dsw-alias-label-secondary, #6b7280); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
314
+ .mc-news-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 8px; font-size: 10px; color: var(--dsw-alias-label-secondary, #6b7280); }
315
+ .mc-news-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dsw-alias-accent, #2563eb); box-shadow: 0 0 0 3px rgba(37,99,235,.12); flex: none; }
316
+ .mc-news-actions { display: flex; align-items: center; gap: 4px; }
317
+ .mc-news-actions .mc-btn { padding: 2px 7px; font-size: 10.5px; }
318
+ .mc-news-reader { flex: 0 0 440px; width: 440px; max-height: calc(100vh - 170px); overflow: auto; position: sticky; top: 0; background: var(--dsw-alias-bg-layer-1, #fff); border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 12px; padding: 16px 18px; }
319
+ .mc-news-reader-head { display: flex; align-items: flex-start; gap: 8px; }
320
+ .mc-news-reader h2 { margin: 10px 0 0; font-size: 20px; line-height: 1.35; letter-spacing: -.02em; }
321
+ .mc-news-reader-meta { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; font-size: 10.5px; color: var(--dsw-alias-label-secondary, #6b7280); }
322
+ .mc-news-reader .md-doc { font-size: 12.5px; line-height: 1.8; }
323
+ .mc-news-reader-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--dsw-alias-border-l1, #e5e7eb); }
324
+ .mc-news-empty { padding: 30px 16px; text-align: center; color: var(--dsw-alias-label-secondary, #6b7280); font-size: 12.5px; line-height: 1.8; }
325
+ .mc-news-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
326
+ .mc-news-form .full { grid-column: 1 / -1; }
327
+ .mc-news-input, .mc-news-textarea { width: 100%; box-sizing: border-box; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--dsw-alias-border-l2, #d1d5db); background: var(--dsw-alias-bg-layer-1, #fff); color: inherit; font-size: 12px; }
328
+ .mc-news-textarea { min-height: 220px; resize: vertical; font-family: var(--mono, monospace); line-height: 1.7; }
329
+ .mc-news-preview { border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 8px; padding: 12px; max-height: 260px; overflow: auto; }
330
+ .mc-news-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--dsw-alias-label-secondary, #6b7280); }
331
+ .mc-news-form label > input, .mc-news-form label > textarea { font-size: 12px; color: var(--dsw-alias-label-primary, #1f2937); }
332
+ @media (max-width: 1100px) { .mc-news-main { flex-direction: column; } .mc-news-reader { position: static; width: 100%; flex-basis: auto; max-height: none; } }
333
+ @media (max-width: 720px) { .mc-news-form { grid-template-columns: 1fr; } }
334
+
335
+ /* ---- \u52A8\u6001 / News\uFF1A\u6A21\u5F0F\u5207\u6362 + \u8D44\u8BAF\u6D41 ---- */
336
+ .mc-news-modes { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
337
+ .mc-news-mode { border: 1px solid var(--dsw-alias-border-l2, #d1d5db); background: transparent; color: inherit; border-radius: 999px; padding: 6px 13px; font-size: 11.5px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
338
+ .mc-news-mode:hover { border-color: var(--dsw-alias-accent, #2563eb); }
339
+ .mc-news-mode.active { background: var(--dsw-alias-accent, #2563eb); border-color: transparent; color: #fff; font-weight: 650; }
340
+ .mc-news-feed-list { display: flex; flex-direction: column; gap: 8px; }
341
+ .mc-news-feed-card { display: flex; gap: 10px; align-items: flex-start; background: var(--dsw-alias-bg-layer-1, #fff); border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
342
+ .mc-news-feed-card:hover { border-color: var(--dsw-alias-accent, #2563eb); box-shadow: 0 8px 22px rgba(0,0,0,.08); }
343
+ .mc-news-rank { flex: 0 0 30px; text-align: center; font: 700 18px/1.2 var(--mono, monospace); color: var(--dsw-alias-accent, #2563eb); padding-top: 1px; }
344
+ .mc-news-feed-body { flex: 1; min-width: 0; }
345
+ .mc-news-feed-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 10px; color: var(--dsw-alias-label-secondary, #6b7280); }
346
+ .mc-news-feed-title { margin: 4px 0 0; font-size: 14px; font-weight: 650; line-height: 1.45; }
347
+ .mc-news-feed-summary { margin: 4px 0 0; font-size: 11.5px; line-height: 1.65; color: var(--dsw-alias-label-secondary, #6b7280); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
348
+ .mc-news-feed-bottom { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 7px; font-size: 10px; color: var(--dsw-alias-label-secondary, #6b7280); }
349
+ .mc-news-feed-heat { color: #d97706; font-weight: 650; }
350
+ .mc-news-feed-warn { margin-bottom: 10px; padding: 7px 10px; border-radius: 8px; font-size: 11px; color: #b45309; background: rgba(245,158,11,.10); border: 1px solid rgba(245,158,11,.28); }
351
+ .mc-news-feed-empty { padding: 28px 16px; text-align: center; color: var(--dsw-alias-label-secondary, #6b7280); font-size: 12.5px; }
352
+ .mc-news-loading-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 34px 16px; min-height: 120px; }
353
+ .mc-news-loading-card > span { font-size: 12.5px; color: var(--dsw-alias-label-primary, #1f2937); }
354
+ .mc-news-loading-card > small { max-width: 46ch; font-size: 10.5px; line-height: 1.6; color: var(--dsw-alias-label-secondary, #6b7280); }
355
+ .mc-news-feed-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
356
+ /* ---- \u65B0\u95FB\u7F8E\u672F\u589E\u5F3A\uFF1AHero \u641C\u7D22 / \u7F29\u7565\u56FE\u5361\u7247\u7F51\u683C / \u80F6\u56CA\u5206\u7C7B ---- */
357
+ .mc-news-hero, .mc-news-pref, .mc-news-feed-toolbar, .mc-news-feed-meta, .mc-news-grid, .mc-news-loading-card { flex: 0 0 auto; }
358
+ .mc-news-hero { position: relative; overflow: hidden; margin-bottom: 12px; padding: 15px 16px 13px; border-radius: 16px; border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); background: radial-gradient(120% 140% at 0% 0%, rgba(56,189,248,.16), transparent 58%), radial-gradient(120% 140% at 100% 0%, rgba(139,92,246,.16), transparent 58%), var(--dsw-alias-bg-layer-1, #fff); }
359
+ .mc-news-hero-eye { margin-bottom: 9px; font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--dsw-alias-accent, #2563eb); }
360
+ .mc-news-hero-search { position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 5px 4px 14px; border-radius: 999px; border: 1px solid var(--dsw-alias-border-l2, #d1d5db); background: var(--dsw-alias-bg-layer-1, #fff); transition: box-shadow .35s ease, border-color .25s ease, transform .25s ease; }
361
+ .mc-news-hero-search:focus-within { border-color: transparent; transform: translateY(-1px); box-shadow: 0 0 0 3px rgba(56,189,248,.20), 0 0 24px rgba(56,189,248,.38), 0 0 52px rgba(139,92,246,.26); }
362
+ .mc-news-hero-eye + .mc-news-hero-search, .mc-news-hero-search.is-focus { animation: mc-news-hero-glow 3.6s ease-in-out infinite; }
363
+ @keyframes mc-news-hero-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(56,189,248,0); } 50% { box-shadow: 0 0 22px rgba(139,92,246,.16); } }
364
+ .mc-news-hero-search input { flex: 1; min-width: 0; padding: 10px 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; }
365
+ .mc-news-hero-search input::placeholder { color: var(--dsw-alias-label-secondary, #6b7280); }
366
+ .mc-news-hero-go { flex: none; padding: 9px 18px; border: 0; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 650; color: #04101f; background: linear-gradient(120deg, #67e8f9, #38bdf8 45%, #a78bfa); box-shadow: 0 8px 20px -10px rgba(56,189,248,.9); transition: transform .18s ease, filter .2s ease; }
367
+ .mc-news-hero-go:hover { transform: translateY(-1px); filter: brightness(1.06); }
368
+ .mc-news-hero-go:active { transform: scale(.98); }
369
+ .mc-news-hero-clear { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); background: rgba(127,127,127,.08); color: var(--dsw-alias-label-secondary, #6b7280); font-size: 11px; line-height: 1; cursor: pointer; transition: all .2s ease; }
370
+ .mc-news-hero-clear:hover { color: var(--dsw-alias-label-primary, #111827); border-color: var(--dsw-alias-border-l2, #d1d5db); }
371
+ .mc-news-hero-hint { margin-top: 8px; font-size: 10.5px; line-height: 1.6; color: var(--dsw-alias-label-secondary, #6b7280); }
372
+ .mc-news-pref { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; padding: 7px 10px; border-radius: 10px; font-size: 10.5px; color: var(--dsw-alias-label-secondary, #6b7280); background: linear-gradient(96deg, rgba(56,189,248,.10), rgba(139,92,246,.10)); border: 1px solid rgba(56,189,248,.24); }
373
+ .mc-news-pref b { color: var(--dsw-alias-label-primary, #111827); font-weight: 650; }
374
+ .mc-news-pref .mc-news-pref-actions { margin-left: auto; display: flex; gap: 6px; }
375
+ .mc-news-pills { display: flex; gap: 6px; flex-wrap: wrap; }
376
+ .mc-news-pill { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); background: rgba(127,127,127,.06); color: var(--dsw-alias-label-secondary, #6b7280); font-family: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; transition: transform .2s ease, color .2s ease, background .25s ease, border-color .2s ease, box-shadow .25s ease; }
377
+ .mc-news-pill:hover { transform: translateY(-1px); color: var(--dsw-alias-label-primary, #111827); border-color: var(--dsw-alias-border-l2, #d1d5db); }
378
+ .mc-news-pill.on { color: #04101f; border-color: transparent; background: linear-gradient(120deg, #7dd3fc, #a78bfa); box-shadow: 0 6px 16px -8px rgba(125,211,252,.95); }
379
+ .mc-news-pill-count { font-size: 10px; opacity: .62; font-variant-numeric: tabular-nums; }
380
+ .mc-news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; transition: opacity .16s ease, transform .16s ease; }
381
+ .mc-news-grid.is-swapping { opacity: 0; transform: translateY(6px); }
382
+ .mc-news-tile { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 14px; border: 1px solid var(--dsw-alias-border-l1, #e5e7eb); background: var(--dsw-alias-bg-layer-1, #fff); color: inherit; text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,.06); transition: transform .34s cubic-bezier(.22,1,.36,1), box-shadow .34s ease, border-color .3s ease; animation: mc-news-tile-in .42s cubic-bezier(.22,1,.36,1) both; animation-delay: calc(var(--i, 0) * 38ms); }
383
+ @keyframes mc-news-tile-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
384
+ .mc-news-tile:hover { transform: translateY(-6px) scale(1.015); border-color: var(--dsw-alias-accent, #2563eb); box-shadow: 0 18px 38px -14px rgba(15,23,42,.45), 0 6px 16px rgba(15,23,42,.14); z-index: 2; }
385
+ .mc-news-tile:focus-visible { outline: 2px solid var(--dsw-alias-accent, #2563eb); outline-offset: 2px; }
386
+ .mc-news-tile-cover { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0b1024; }
387
+ .mc-news-tile-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22,1,.36,1), filter .4s ease; }
388
+ .mc-news-tile:hover .mc-news-tile-img { transform: scale(1.08); filter: saturate(1.1) brightness(1.03); }
389
+ .mc-news-tile-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,8,18,0) 45%, rgba(4,8,18,.72) 100%); pointer-events: none; }
390
+ .mc-news-tile-gen { position: absolute; inset: 0; display: grid; place-items: center; gap: 2px; background: radial-gradient(120% 120% at 18% 12%, hsl(var(--hue, 210) 92% 62% / .55), transparent 60%), radial-gradient(120% 120% at 82% 88%, hsl(calc(var(--hue, 210) + 46) 88% 58% / .45), transparent 58%), linear-gradient(150deg, #101a33 5%, #0a1024 92%); }
391
+ .mc-news-tile-gen b { font-size: 28px; font-weight: 800; color: rgba(255,255,255,.92); text-shadow: 0 6px 20px rgba(0,0,0,.4); }
392
+ .mc-news-tile-gen small { font-size: 9px; letter-spacing: .3em; color: rgba(255,255,255,.66); }
393
+ .mc-news-tile-gen em { position: absolute; left: 9px; bottom: 7px; display: inline-flex; align-items: center; gap: 5px; font-style: normal; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.62); }
394
+ .mc-news-tile-gen em i { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 5px; font-style: normal; font-size: 8.5px; font-weight: 700; letter-spacing: 0; color: #eaf6ff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); }
395
+ .mc-news-tile-badge { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; color: #04101f; background: linear-gradient(120deg, #7dd3fc, #a5b4fc); }
396
+ .mc-news-tile-badge.hot { background: linear-gradient(120deg, #fdba74, #f472b6); }
397
+ .mc-news-tile-time { position: absolute; right: 8px; bottom: 7px; z-index: 2; padding: 1px 7px; border-radius: 999px; font-size: 10px; color: #e8ecf8; background: rgba(6,10,20,.55); border: 1px solid rgba(255,255,255,.10); }
398
+ .mc-news-tile-body { display: flex; flex-direction: column; gap: 5px; flex: 1; padding: 10px 11px 9px; }
399
+ .mc-news-tile-title { font-size: 13px; font-weight: 650; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
400
+ .mc-news-tile-summary { font-size: 11px; line-height: 1.6; color: var(--dsw-alias-label-secondary, #6b7280); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
401
+ .mc-news-tile-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 3px; font-size: 10px; color: var(--dsw-alias-label-secondary, #6b7280); }
402
+ .mc-news-tile-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--dsw-alias-accent, #2563eb); flex: none; }
403
+ .mc-news-tile-open { margin-left: auto; color: var(--dsw-alias-accent, #2563eb); opacity: .7; transition: transform .2s ease, opacity .2s ease; }
404
+ .mc-news-tile:hover .mc-news-tile-open { opacity: 1; transform: translate(2px, -2px); }
405
+ @media (max-width: 760px) { .mc-news-grid { grid-template-columns: 1fr; } .mc-news-hero-search { flex-wrap: wrap; border-radius: 18px; } .mc-news-hero-go { width: 100%; } }
406
+
407
+ .mc-news-feed-meta { font-size: 10.5px; color: var(--dsw-alias-label-secondary, #6b7280); margin-left: auto; }
408
+
293
409
  /* ---- \u652F\u6301\u4E0E\u4EA4\u6D41 / \u9996\u6B21\u5F15\u5BFC ---- */
294
410
  .me-support { max-width: 720px; }
295
411
  .me-support-tabs { display: flex; gap: 6px; padding: 10px 18px 0; border-bottom: 1px solid var(--dsw-alias-border-l1, #e5e7eb); }
@@ -815,7 +931,7 @@ Option A, because:
815
931
  .mc-audit-batchcard > .mc-btn { width: 100%; }
816
932
  .mc-audit-batchcard > div[style*="flex: 1"] { display: none; }
817
933
  }
818
- `;function on(t){t.effect(()=>t.locale.register(jt,{zh:Ma,en:Ta}),"memory-eternal: locale");let a=t.locale.bind(jt);t.effect(()=>t.slots.inject("settings.section",()=>t.slots.register({name:"settings.section",id:jt,order:25,label:()=>a("nav"),locale:jt,inject:()=>({})},()=>n.default.createElement(sn,{t:a}))),"memory-eternal: settings section"),t.effect(()=>t.slots.inject("sidebar.footer.action",()=>t.slots.register({name:"sidebar.footer.action",id:`${jt}:footer`,order:100,label:()=>a("nav"),locale:jt,inject:()=>({})},i=>n.default.createElement(ln,{t:a,locale:t.locale,wide:!(i&&i.wide===!1)}))),"memory-eternal: sidebar footer action")}function rn(){let[t,a]=(0,n.useState)($+"/ui/app");return(0,n.useEffect)(()=>{let i=!0,g=()=>fetch("/memory-eternal/api/web-info").then(d=>d.json()).then(d=>{i&&d&&d.ok&&d.alive!==!1&&d.url&&a(d.url.endsWith("/")?d.url:d.url+"/")}).catch(()=>{});return fetch($+"/ui/app",{method:"HEAD"}).then(d=>{if(i&&!d.ok)return g()}).catch(()=>i?g():void 0),()=>{i=!1}},[]),t}function sn({t}){return(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[(0,e.jsx)("style",{children:qe}),(0,e.jsx)(Da,{t,onReload:()=>{},version:0})]})}function ln({t,locale:a,wide:i}){let[g,d]=(0,n.useState)(!1);return(0,e.jsxs)("div",{className:`me-footer${i?"":" rail"}`,children:[(0,e.jsx)("style",{children:qe}),(0,e.jsxs)("button",{type:"button",className:"me-footer-btn",onClick:()=>d(!0),"aria-label":t("nav"),title:t("nav"),children:[(0,e.jsx)("span",{className:"me-footer-ico","aria-hidden":"true",children:(0,e.jsx)(un,{})}),(0,e.jsx)("span",{className:"me-footer-label",children:t("nav")})]}),g&&(0,e.jsx)(mn,{t,locale:a,onClose:()=>d(!1)})]})}function dn(){return(0,e.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4","aria-hidden":"true",children:(0,e.jsx)("rect",{x:"2.9",y:"2.9",width:"10.2",height:"10.2",rx:"1.7"})})}function cn(){return(0,e.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4","aria-hidden":"true",children:[(0,e.jsx)("rect",{x:"2.6",y:"5.4",width:"8",height:"8",rx:"1.5"}),(0,e.jsx)("path",{d:"M5.6 5.4V4.1c0-.9.7-1.6 1.6-1.6h4.7c.9 0 1.6.7 1.6 1.6v4.7c0 .9-.7 1.6-1.6 1.6h-1.3"})]})}function pn(){return(0,e.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M3.9 3.9l8.2 8.2M12.1 3.9l-8.2 8.2"})})}function mn({t,locale:a,onClose:i,tab:g}){let[d,s]=(0,n.useState)(!1),[v,w]=(0,n.useState)(!1),y=(0,n.useRef)(null),F=rn(),N=(0,n.useCallback)(D=>a&&typeof a.subscribe=="function"?a.subscribe(D):()=>{},[a]),k=(0,n.useCallback)(()=>a&&typeof a.getSnapshot=="function"?a.getSnapshot():null,[a]),h=(0,n.useSyncExternalStore)(N,k),T=h&&(h.active==="zh"||h.active==="en")?h.active:null,B=(0,n.useRef)(null);B.current===null&&T&&(B.current=T);let E=(0,n.useMemo)(()=>{let D=B.current?`lang=${B.current}`:"";if(g==="config")return`${$}/ui/config?tab=config${D?`&${D}`:""}`;let R=F.replace(/\/$/,""),de=R.endsWith("/ui/app")?"?":"/?";return g?`${R}${de}tab=${g}${D?`&${D}`:""}`:D?`${R}${de}${D}`:F},[F,g]);(0,n.useEffect)(()=>{let D=y.current&&y.current.contentWindow;D&&T&&D.postMessage({source:"memory-eternal",type:"locale",lang:T},"*")},[T]),(0,n.useEffect)(()=>{let D=R=>{R.key==="Escape"&&i()};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[i]);let z=(0,e.jsxs)("div",{className:"me-overlay-top",onClick:i,children:[(0,e.jsx)("style",{children:qe}),(0,e.jsx)("div",{className:"me-modal"+(d?" me-modal-full":""),onClick:D=>D.stopPropagation(),children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0,position:"relative"},children:[(0,e.jsxs)("div",{className:"me-wctl",children:[(0,e.jsx)("button",{type:"button",className:"me-wctl-btn","data-me-wctl":d?"restore":"full","aria-pressed":d,onClick:()=>s(D=>!D),"aria-label":t(d?"exitFullscreen":"enterFullscreen"),title:t(d?"exitFullscreen":"enterFullscreen"),children:d?(0,e.jsx)(cn,{}):(0,e.jsx)(dn,{})}),(0,e.jsx)("button",{type:"button",className:"me-wctl-btn me-wctl-close","data-me-wctl":"close",onClick:i,"aria-label":t("close"),title:t("close"),children:(0,e.jsx)(pn,{})})]}),(0,e.jsx)("iframe",{ref:y,src:E,title:"memory-eternal",allow:"clipboard-write; clipboard-read",onLoad:()=>w(!0),style:{width:"100%",flex:1,border:0,borderRadius:"inherit",background:"transparent"}}),!v&&(0,e.jsxs)("div",{className:"me-frame-boot",role:"status","aria-live":"polite",children:[(0,e.jsx)(da,{}),(0,e.jsx)("span",{className:"me-loading-text",children:t("loading")})]})]})})]});return typeof document>"u"?z:(0,Na.createPortal)(z,document.body)}function un(){return(0,e.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,e.jsx)("defs",{children:(0,e.jsxs)("linearGradient",{id:"mg-brain",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,e.jsx)("stop",{offset:"0%",stopColor:"#FFC46B"}),(0,e.jsx)("stop",{offset:"50%",stopColor:"#F97316"}),(0,e.jsx)("stop",{offset:"100%",stopColor:"#EA580C"})]})}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 0-6.4.1 4.1 4.1 0 0 0-2.7 5.9 4.1 4.1 0 0 0 .6 6.7A4.2 4.2 0 0 0 12 18.2Z"}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 1 6.4.1 4.1 4.1 0 0 1 2.7 5.9 4.1 4.1 0 0 1-.6 6.7A4.2 4.2 0 0 1 12 18.2Z"}),(0,e.jsx)("path",{d:"M12 9.2c-.8-1.4-1.7-2-3.1-2.2M12 9.2c.8-1.4 1.7-2 3.1-2.2M12 12.4c-1.2 1-3.2 1.6-5 1.4M12 12.4c1.2 1 3.2 1.6 5 1.4M12 13.2v4",fill:"none",stroke:"rgba(255,255,255,0.62)",strokeWidth:"1",strokeLinecap:"round"}),(0,e.jsx)("circle",{cx:"12",cy:"8.6",r:"1.1",fill:"rgba(255,255,255,0.85)"})]})}var Pt="0.18.2";function gn({t}){let[a,i]=(0,n.useState)(""),g="dsh-memory tui",d="dsh-memory tui --write",s=async(F,N)=>{try{await navigator.clipboard.writeText(F),i(N),setTimeout(()=>i(""),1600)}catch{}},v={border:"1px solid #3a404a",borderRadius:14,background:"#22262d",padding:"16px 18px"},w={margin:"10px 0 0",padding:"12px 14px",borderRadius:10,background:"#171a1f",border:"1px solid #333943",color:"#f3f5f8",fontSize:12.5,lineHeight:1.7,overflowX:"auto",fontFamily:"ui-monospace, Consolas, monospace"},y={marginTop:10,border:"1px solid #4a515c",background:"transparent",color:"#ffb08a",borderRadius:9,padding:"7px 12px",fontSize:12,cursor:"pointer"};return(0,e.jsxs)("div",{style:{padding:"22px 26px 34px",maxWidth:1040,color:"#f3f5f8"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:12,flexWrap:"wrap"},children:[(0,e.jsx)("h2",{style:{margin:0,fontSize:24,letterSpacing:"-.02em"},children:t("terminalTitle")}),(0,e.jsx)("span",{style:{color:"#99a1ac",fontSize:12},children:"TUI \xB7 LIVE \xB7 dsh-tui"})]}),(0,e.jsx)("p",{style:{margin:"9px 0 20px",color:"#aeb5bf",fontSize:13.5,lineHeight:1.8},children:t("terminalIntro")}),(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1.1fr) minmax(0, .9fr)",gap:14},children:[(0,e.jsxs)("div",{style:v,children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalRun")]}),(0,e.jsx)("pre",{style:w,children:g}),(0,e.jsx)("button",{type:"button",style:y,onClick:()=>s(g,"run"),children:a==="run"?"\u2713 "+t("terminalCopied"):"\u29C9 "+t("terminalCopy")}),(0,e.jsxs)("div",{style:{marginTop:12,color:"#99a1ac",fontSize:12,lineHeight:1.7},children:["\u9ED8\u8BA4\u8BFB\u53D6\u771F\u5B9E\u8BB0\u5FC6\u5E93\u4E0E\u5F85\u5BA1\u961F\u5217\uFF1B\u53EA\u8BFB\uFF0C\u786E\u8BA4\u540E\u624D\u7528 `--write`\u3002\u793A\u4F8B\u6570\u636E\u7528 `--demo`\u3002",(0,e.jsx)("br",{}),"\u6CA1\u6709 `dsh-memory` \u547D\u4EE4\u65F6\uFF1A`npx -p memory-eternal dsh-memory tui`"]})]}),(0,e.jsxs)("div",{style:v,children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalTui")]}),(0,e.jsx)("pre",{style:w,children:d}),(0,e.jsx)("button",{type:"button",style:y,onClick:()=>s(d,"tui"),children:a==="tui"?"\u2713 "+t("terminalCopied"):"\u29C9 "+t("terminalCopy")}),(0,e.jsx)("div",{style:{marginTop:12,color:"#99a1ac",fontSize:12,lineHeight:1.7},children:"\u771F\u5B9E\u6279\u51C6/\u9A73\u56DE\uFF1B\u4E0D\u786E\u5B9A\u65F6\u5148\u7528\u53EA\u8BFB\u6A21\u5F0F\u3002"})]})]}),(0,e.jsxs)("div",{style:{...v,marginTop:14},children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalPreview")]}),(0,e.jsx)("pre",{style:{...w,marginTop:10,color:"#d7dce3",fontSize:12,lineHeight:1.5},children:`\u256D\u2500 MEMORY ATLAS / \u5F85\u5BA1 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E
934
+ `;function Dn(t){t.effect(()=>t.locale.register(It,{zh:qa,en:Ja}),"memory-eternal: locale");let a=t.locale.bind(It);t.effect(()=>t.slots.inject("settings.section",()=>t.slots.register({name:"settings.section",id:It,order:25,label:()=>a("nav"),locale:It,inject:()=>({})},()=>n.default.createElement(Ln,{t:a}))),"memory-eternal: settings section"),t.effect(()=>t.slots.inject("sidebar.footer.action",()=>t.slots.register({name:"sidebar.footer.action",id:`${It}:footer`,order:100,label:()=>a("nav"),locale:It,inject:()=>({})},o=>n.default.createElement(Fn,{t:a,locale:t.locale,wide:!(o&&o.wide===!1)}))),"memory-eternal: sidebar footer action")}function An(){let[t,a]=(0,n.useState)(W+"/ui/app");return(0,n.useEffect)(()=>{let o=!0,d=()=>fetch("/memory-eternal/api/web-info").then(c=>c.json()).then(c=>{o&&c&&c.ok&&c.alive!==!1&&c.url&&a(c.url.endsWith("/")?c.url:c.url+"/")}).catch(()=>{});return fetch(W+"/ui/app",{method:"HEAD"}).then(c=>{if(o&&!c.ok)return d()}).catch(()=>o?d():void 0),()=>{o=!1}},[]),t}function Ln({t}){return(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[(0,e.jsx)("style",{children:Je}),(0,e.jsx)(Za,{t,onReload:()=>{},version:0})]})}function Fn({t,locale:a,wide:o}){let[d,c]=(0,n.useState)(!1);return(0,e.jsxs)("div",{className:`me-footer${o?"":" rail"}`,children:[(0,e.jsx)("style",{children:Je}),(0,e.jsxs)("button",{type:"button",className:"me-footer-btn",onClick:()=>c(!0),"aria-label":t("nav"),title:t("nav"),children:[(0,e.jsx)("span",{className:"me-footer-ico","aria-hidden":"true",children:(0,e.jsx)(En,{})}),(0,e.jsx)("span",{className:"me-footer-label",children:t("nav")})]}),d&&(0,e.jsx)(jn,{t,locale:a,onClose:()=>c(!1)})]})}function Pn(){return(0,e.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4","aria-hidden":"true",children:(0,e.jsx)("rect",{x:"2.9",y:"2.9",width:"10.2",height:"10.2",rx:"1.7"})})}function In(){return(0,e.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4","aria-hidden":"true",children:[(0,e.jsx)("rect",{x:"2.6",y:"5.4",width:"8",height:"8",rx:"1.5"}),(0,e.jsx)("path",{d:"M5.6 5.4V4.1c0-.9.7-1.6 1.6-1.6h4.7c.9 0 1.6.7 1.6 1.6v4.7c0 .9-.7 1.6-1.6 1.6h-1.3"})]})}function Bn(){return(0,e.jsx)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M3.9 3.9l8.2 8.2M12.1 3.9l-8.2 8.2"})})}function jn({t,locale:a,onClose:o,tab:d}){let[c,l]=(0,n.useState)(!1),[v,x]=(0,n.useState)(!1),k=(0,n.useRef)(null),I=An(),D=(0,n.useCallback)(P=>a&&typeof a.subscribe=="function"?a.subscribe(P):()=>{},[a]),M=(0,n.useCallback)(()=>a&&typeof a.getSnapshot=="function"?a.getSnapshot():null,[a]),y=(0,n.useSyncExternalStore)(D,M),z=y&&(y.active==="zh"||y.active==="en")?y.active:null,H=(0,n.useRef)(null);H.current===null&&z&&(H.current=z);let O=(0,n.useMemo)(()=>{let P=H.current?`lang=${H.current}`:"";if(d==="config")return`${W}/ui/config?tab=config${P?`&${P}`:""}`;let A=I.replace(/\/$/,""),G=A.endsWith("/ui/app")?"?":"/?";return d?`${A}${G}tab=${d}${P?`&${P}`:""}`:P?`${A}${G}${P}`:I},[I,d]);(0,n.useEffect)(()=>{let P=k.current&&k.current.contentWindow;P&&z&&P.postMessage({source:"memory-eternal",type:"locale",lang:z},"*")},[z]),(0,n.useEffect)(()=>{let P=A=>{A.key==="Escape"&&o()};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[o]);let F=(0,e.jsxs)("div",{className:"me-overlay-top",onClick:o,children:[(0,e.jsx)("style",{children:Je}),(0,e.jsx)("div",{className:"me-modal"+(c?" me-modal-full":""),onClick:P=>P.stopPropagation(),children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0,position:"relative"},children:[(0,e.jsxs)("div",{className:"me-wctl",children:[(0,e.jsx)("button",{type:"button",className:"me-wctl-btn","data-me-wctl":c?"restore":"full","aria-pressed":c,onClick:()=>l(P=>!P),"aria-label":t(c?"exitFullscreen":"enterFullscreen"),title:t(c?"exitFullscreen":"enterFullscreen"),children:c?(0,e.jsx)(In,{}):(0,e.jsx)(Pn,{})}),(0,e.jsx)("button",{type:"button",className:"me-wctl-btn me-wctl-close","data-me-wctl":"close",onClick:o,"aria-label":t("close"),title:t("close"),children:(0,e.jsx)(Bn,{})})]}),(0,e.jsx)("iframe",{ref:k,src:O,title:"memory-eternal",allow:"clipboard-write; clipboard-read",onLoad:()=>x(!0),style:{width:"100%",flex:1,border:0,borderRadius:"inherit",background:"transparent"}}),!v&&(0,e.jsxs)("div",{className:"me-frame-boot",role:"status","aria-live":"polite",children:[(0,e.jsx)(ra,{}),(0,e.jsx)("span",{className:"me-loading-text",children:t("loading")})]})]})})]});return typeof document>"u"?F:(0,Va.createPortal)(F,document.body)}function En(){return(0,e.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,e.jsx)("defs",{children:(0,e.jsxs)("linearGradient",{id:"mg-brain",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,e.jsx)("stop",{offset:"0%",stopColor:"#FFC46B"}),(0,e.jsx)("stop",{offset:"50%",stopColor:"#F97316"}),(0,e.jsx)("stop",{offset:"100%",stopColor:"#EA580C"})]})}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 0-6.4.1 4.1 4.1 0 0 0-2.7 5.9 4.1 4.1 0 0 0 .6 6.7A4.2 4.2 0 0 0 12 18.2Z"}),(0,e.jsx)("path",{fill:"url(#mg-brain)",d:"M12 4.5a3.2 3.2 0 0 1 6.4.1 4.1 4.1 0 0 1 2.7 5.9 4.1 4.1 0 0 1-.6 6.7A4.2 4.2 0 0 1 12 18.2Z"}),(0,e.jsx)("path",{d:"M12 9.2c-.8-1.4-1.7-2-3.1-2.2M12 9.2c.8-1.4 1.7-2 3.1-2.2M12 12.4c-1.2 1-3.2 1.6-5 1.4M12 12.4c1.2 1 3.2 1.6 5 1.4M12 13.2v4",fill:"none",stroke:"rgba(255,255,255,0.62)",strokeWidth:"1",strokeLinecap:"round"}),(0,e.jsx)("circle",{cx:"12",cy:"8.6",r:"1.1",fill:"rgba(255,255,255,0.85)"})]})}var Bt="0.20.0";function Hn({t}){let[a,o]=(0,n.useState)(""),d="dsh-memory tui",c="dsh-memory tui --write",l=async(I,D)=>{try{await navigator.clipboard.writeText(I),o(D),setTimeout(()=>o(""),1600)}catch{}},v={border:"1px solid #3a404a",borderRadius:14,background:"#22262d",padding:"16px 18px"},x={margin:"10px 0 0",padding:"12px 14px",borderRadius:10,background:"#171a1f",border:"1px solid #333943",color:"#f3f5f8",fontSize:12.5,lineHeight:1.7,overflowX:"auto",fontFamily:"ui-monospace, Consolas, monospace"},k={marginTop:10,border:"1px solid #4a515c",background:"transparent",color:"#ffb08a",borderRadius:9,padding:"7px 12px",fontSize:12,cursor:"pointer"};return(0,e.jsxs)("div",{style:{padding:"22px 26px 34px",maxWidth:1040,color:"#f3f5f8"},children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:12,flexWrap:"wrap"},children:[(0,e.jsx)("h2",{style:{margin:0,fontSize:24,letterSpacing:"-.02em"},children:t("terminalTitle")}),(0,e.jsx)("span",{style:{color:"#99a1ac",fontSize:12},children:"TUI \xB7 LIVE \xB7 dsh-tui"})]}),(0,e.jsx)("p",{style:{margin:"9px 0 20px",color:"#aeb5bf",fontSize:13.5,lineHeight:1.8},children:t("terminalIntro")}),(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1.1fr) minmax(0, .9fr)",gap:14},children:[(0,e.jsxs)("div",{style:v,children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalRun")]}),(0,e.jsx)("pre",{style:x,children:d}),(0,e.jsx)("button",{type:"button",style:k,onClick:()=>l(d,"run"),children:a==="run"?"\u2713 "+t("terminalCopied"):"\u29C9 "+t("terminalCopy")}),(0,e.jsxs)("div",{style:{marginTop:12,color:"#99a1ac",fontSize:12,lineHeight:1.7},children:["\u9ED8\u8BA4\u8BFB\u53D6\u771F\u5B9E\u8BB0\u5FC6\u5E93\u4E0E\u5F85\u5BA1\u961F\u5217\uFF1B\u53EA\u8BFB\uFF0C\u786E\u8BA4\u540E\u624D\u7528 `--write`\u3002\u793A\u4F8B\u6570\u636E\u7528 `--demo`\u3002",(0,e.jsx)("br",{}),"\u6CA1\u6709 `dsh-memory` \u547D\u4EE4\u65F6\uFF1A`npx -p memory-eternal dsh-memory tui`"]})]}),(0,e.jsxs)("div",{style:v,children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalTui")]}),(0,e.jsx)("pre",{style:x,children:c}),(0,e.jsx)("button",{type:"button",style:k,onClick:()=>l(c,"tui"),children:a==="tui"?"\u2713 "+t("terminalCopied"):"\u29C9 "+t("terminalCopy")}),(0,e.jsx)("div",{style:{marginTop:12,color:"#99a1ac",fontSize:12,lineHeight:1.7},children:"\u771F\u5B9E\u6279\u51C6/\u9A73\u56DE\uFF1B\u4E0D\u786E\u5B9A\u65F6\u5148\u7528\u53EA\u8BFB\u6A21\u5F0F\u3002"})]})]}),(0,e.jsxs)("div",{style:{...v,marginTop:14},children:[(0,e.jsxs)("div",{style:{fontSize:13,fontWeight:700},children:["\u25B8 ",t("terminalPreview")]}),(0,e.jsx)("pre",{style:{...x,marginTop:10,color:"#d7dce3",fontSize:12,lineHeight:1.5},children:`\u256D\u2500 MEMORY ATLAS / \u5F85\u5BA1 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E
819
935
  \u2502 \u7C7B\u578B \u25CF \u5168\u90E8 7 \u25CB \u9879\u76EE 3 \u25CB \u77E5\u8BC6 1 \u25CB \u6559\u8BAD 1 \u2502
820
936
  \u2502 \u2502
821
937
  \u2502 \u25A3 \u5168\u9009 7 \u5DF2\u9009 3 s \u5168\u9009 \u2502
@@ -824,14 +940,14 @@ Option A, because:
824
940
  \u2502 \u25C9 [\u6559\u8BAD] shj-web \u7AEF\u53E3\u83DC\u5355\u9519\u4F4D \u2502
825
941
  \u2502 \u2502
826
942
  \u2502 [a] \u6279\u51C6 3 [r] \u9A73\u56DE [s] \u53CD\u9009 [Esc] \u6E05\u7A7A \u2502
827
- \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F`})]}),(0,e.jsxs)("div",{style:{marginTop:16,color:"#99a1ac",fontSize:12.5,lineHeight:1.8},children:[(0,e.jsx)("b",{style:{color:"#f3f5f8"},children:t("terminalWhy")}),(0,e.jsx)("br",{}),t("terminalWhyBody")]})]})}var oa=class extends n.default.Component{constructor(a){super(a),this.state={error:null}}static getDerivedStateFromError(a){return{error:a||new Error("unknown")}}componentDidCatch(a,i){try{console.warn("[memory-eternal] \u8BB0\u5FC6\u9762\u677F\u6E32\u67D3\u5F02\u5E38\uFF08\u5DF2\u515C\u5E95\uFF0C\u4E0D\u518D\u6574\u9875\u767D\u5C4F\uFF09",a,i&&i.componentStack)}catch{}}render(){if(!this.state.error)return this.props.children;let a=String(this.state.error&&this.state.error.message||this.state.error||"unknown");return(0,e.jsxs)("div",{style:{padding:"22px 24px",fontFamily:'system-ui, "Segoe UI", "Microsoft YaHei", sans-serif',color:"var(--dsw-alias-label-primary, #1f2937)"},children:[(0,e.jsx)("div",{style:{fontSize:15,fontWeight:700,marginBottom:6},children:"\u8BB0\u5FC6\u9762\u677F\u6E32\u67D3\u51FA\u9519"}),(0,e.jsx)("div",{style:{fontSize:12.5,opacity:.75,lineHeight:1.7,marginBottom:14,wordBreak:"break-all"},children:a}),(0,e.jsx)("div",{style:{fontSize:12,opacity:.6,marginBottom:14,lineHeight:1.7},children:"\u5DF2\u7ECF\u515C\u5E95\u4F4F\uFF0C\u4E0D\u4F1A\u518D\u6574\u9875\u767D\u5C4F\u3002\u70B9\u300C\u91CD\u65B0\u52A0\u8F7D\u300D\u53EF\u6062\u590D\uFF1B\u53CD\u590D\u51FA\u73B0\u8BF7\u7528\u5DE6\u680F\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5E26\u4E0A\u8FD9\u6BB5\u62A5\u9519\u3002"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{try{window.location.reload()}catch{}},children:"\u91CD\u65B0\u52A0\u8F7D"})]})}};function fn(t){return(0,e.jsx)(oa,{children:(0,e.jsx)(bn,{...t})})}function bn({t,inModal:a,onClose:i}){let g=typeof window<"u"&&(!!window.__DSH_BOOT__||String(location.pathname||"").includes("/memory-eternal/api/ui/app")),[d,s]=(0,n.useState)(null),[v,w]=(0,n.useState)(()=>{try{let b=localStorage.getItem("me-ui-scale");return["compact","normal","large"].includes(b)?b:"normal"}catch{return"normal"}}),[y,F]=(0,n.useState)([]),[N,k]=(0,n.useState)(!0),[h,T]=(0,n.useState)(null),[B,E]=(0,n.useState)(""),[z,D]=(0,n.useState)("all"),[R,de]=(0,n.useState)(""),[ie,q]=(0,n.useState)("all"),[re,ge]=(0,n.useState)("all"),[U,_]=(0,n.useState)(()=>{try{return new Set(JSON.parse(localStorage.getItem("me-pinned-v5")||"[]"))}catch{return new Set}}),[G,xe]=(0,n.useState)(!1),Ue=(0,n.useCallback)(b=>{_(A=>{let O=new Set(A);O.has(b)?O.delete(b):O.add(b);try{localStorage.setItem("me-pinned-v5",JSON.stringify([...O]))}catch{}return O})},[]),[X,je]=(0,n.useState)(""),[m,Pe]=(0,n.useState)(()=>{try{let b=new URLSearchParams(typeof location<"u"?location.search:"").get("tab"),A={cards:"cards",graph:"graph",usage:"stats",stats:"stats",audit:"audit",recycle:"optimize",optimize:"optimize",config:"config",terminal:"terminal"};if(b&&A[b])return A[b]}catch{}return"cards"}),[ce,ee]=(0,n.useState)(()=>new Set([m])),Ce=(0,n.useCallback)(b=>{ee(A=>A.has(b)?A:new Set(A).add(b)),Pe(b)},[]),[pe,ze]=(0,n.useState)("recent"),[Ae,M]=(0,n.useState)(null),p=(0,n.useRef)(null),j=(0,n.useRef)(null),[J,ke]=(0,n.useState)(!1),[le,fe]=(0,n.useState)(null),[ae,Xe]=(0,n.useState)(!1),[l,L]=(0,n.useState)(!1),[P,te]=(0,n.useState)(!1),[Ne,be]=(0,n.useState)("group"),[Z,De]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let b=A=>{let O=A&&A.detail;if(["compact","normal","large"].includes(O)){w(O);try{localStorage.setItem("me-ui-scale",O)}catch{}}};return window.addEventListener("me-ui-scale",b),()=>window.removeEventListener("me-ui-scale",b)},[]);let Me=(0,n.useCallback)(()=>{De(!1);try{localStorage.setItem("me-onboard-v2","1")}catch{}},[]),f=(0,n.useCallback)((b="group")=>{be(b),te(!0)},[]),u=(0,n.useRef)(!1),W=(0,n.useCallback)(async()=>{if(u.current)return;u.current=!0;let b=(A,O=!0)=>{p.current&&clearTimeout(p.current),M({ok:O,msg:A}),p.current=setTimeout(()=>M(null),3e3)};b(t("webOpening"));try{let A=await fetch(`${$}/open-web`,{method:"POST"}).then(C=>C.json()).catch(()=>null);if(A&&A.ok&&A.url){b(t("webOpened")+" \xB7 "+A.url);return}let O=await fetch(`${$}/web-info`).then(C=>C.json()).catch(()=>null),c=O&&O.ok&&O.url||"http://127.0.0.1:7999/",x=window.open(c,"_blank","noopener,noreferrer");b(x?t("webOpened")+" \xB7 "+c:t("webOpenFail")+" \xB7 "+c,!!x)}catch{b(t("webOpenFail"),!1)}finally{u.current=!1}},[t]);(0,n.useEffect)(()=>{try{if(localStorage.getItem("me-onboard-v2")||m!=="cards")return;let b=setTimeout(()=>De(!0),900);return()=>clearTimeout(b)}catch{}},[m]);let[Y,ve]=(0,n.useState)(!0),[We,o]=(0,n.useState)(null),[nt,At]=(0,n.useState)(0),ft=(0,n.useCallback)(()=>At(b=>b+1),[]),Fe=d?.quarantine?.pending??0,lt=d?.quarantine?.deleted??0,dt=(0,n.useRef)(null),[ct,ot]=(0,n.useState)(0),[Ye,bt]=(0,n.useState)(!1),Lt=(0,n.useRef)(null),kt=(0,n.useRef)(null),Qe=(0,n.useCallback)(async(b=z,A=R,O=re,c={})=>{let x=c.append===!0;try{x?bt(!0):(k(!0),E(""));let C=new URLSearchParams;b&&b!=="all"&&C.set("kind",b),A.trim()&&C.set("q",A.trim());let I=c.tag!==void 0?c.tag:X;I&&C.set("tag",I),C.set("status",O||"all"),C.set("limit",String(en)),C.set("offset",String(c.offset||0)),pe==="title"&&C.set("sort","title");let oe=await(await fetch(`${$}/cards?${C.toString()}`)).json();if(oe.ok){let se=oe.cards||[];F(me=>x?[...me,...se.filter(et=>!me.some(tt=>tt.path===et.path))]:se),ot(Number(oe.total)||se.length)}}catch(C){E(String(C&&C.message?C.message:C))}finally{x?bt(!1):k(!1)}},[z,R,re,pe,X]),Te=(0,n.useCallback)(async()=>{try{let[b,A,O]=await Promise.all([fetch(`${$}/overview`).then(x=>x.json()),fetch(`${$}/capture-log`).then(x=>x.json()).catch(()=>null),fetch(`${$}/config`).then(x=>x.json()).catch(()=>null)]);b.ok&&s(b);let c=O&&O.ok&&O.config&&O.config.uiScale;if(["compact","normal","large"].includes(c)){w(c);try{localStorage.setItem("me-ui-scale",c)}catch{}}T(A&&A.ok&&A.available&&A.health||null)}catch(b){E(String(b&&b.message?b.message:b))}finally{k(!1)}},[]),it=async b=>{try{let O=await(await fetch(`${$}/delete?path=${encodeURIComponent(b)}`)).json();O.ok?(M({ok:!0,msg:t("deleted")}),await Te(),ft()):M({ok:!1,msg:O.error||t("deleteFail")})}catch{M({ok:!1,msg:t("deleteFail")})}p.current&&clearTimeout(p.current),p.current=setTimeout(()=>M(null),2e3)};(0,n.useEffect)(()=>(Te(),()=>{dt.current&&clearTimeout(dt.current)}),[Te]);let Ge=b=>{de(b),dt.current&&clearTimeout(dt.current),dt.current=setTimeout(()=>Qe(z,b,re),280)},He=b=>{D(b),Qe(b,R,re)},St=b=>{let A=String(b||"");je(A),fe(null),Qe(z,R,re,{tag:A})};(0,n.useEffect)(()=>{m==="cards"&&Qe(z,R,re)},[re,m,nt,pe,X]),(0,n.useEffect)(()=>{if(m!=="cards"||N||Ye||y.length>=ct)return;let b=Lt.current,A=kt.current;if(!b)return;let O=new IntersectionObserver(c=>{c[0]&&c[0].isIntersecting&&Qe(z,R,re,{append:!0,offset:y.length})},{root:A||null,rootMargin:"400px"});return O.observe(b),()=>O.disconnect()},[m,y,ct,N,Ye,z,R,re,Qe]);let r=async(b,A)=>{try{let O=await fetch(`${$}/card-kind`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:b,kind:A})}).then(c=>c.json());!O||!O.ok?M({ok:!1,msg:O&&O.error||t("coreSetFail")}):(fe(c=>c&&c.path===b?{...c,kind:O.kind}:c),await Te(),ft(),M({ok:!0,msg:t(A==="core"?"coreSetOk":"coreUnsetOk")}))}catch(O){M({ok:!1,msg:String(O&&O.message||O)})}p.current&&clearTimeout(p.current),p.current=setTimeout(()=>M(null),2e3)},H=async b=>{try{let A=b.status;if(!A&&b.path)try{let I=((await fetch(`${$}/cards?status=all&q=${encodeURIComponent(b.title||"")}&limit=50`).then(K=>K.json())).cards||[]).find(K=>K.path===b.path);I&&(A=I.status)}catch{}let O=A&&A!=="approved"?`&status=${encodeURIComponent(A)}`:"",c=await fetch(`${$}/card?path=${encodeURIComponent(b.path||b.id)}${O}`),x=await c.json();x.ok?fe({path:x.path,title:b.title,text:x.text,kind:b.kind||"knowledge",status:A||"approved"}):E(x.error||`HTTP ${c.status}`)}catch(A){E(String(A&&A.message?A.message:A))}},V=async(b,A)=>{ke(!0);try{let O=await fetch(`${$}/export`);if(!O.ok)throw new Error("HTTP "+O.status);let c=await O.json();if(!c.ok)throw new Error(c.error||"export failed");let x,C,I;if(b==="json"){C="memory-vault.json",I="application/json";let se=c.cards.map(me=>({path:me.path,title:me.title,kind:me.kind,status:me.status,store:me.store,text:me.text}));x=JSON.stringify({format:c.format||"memory-eternal-vault",formatVersion:c.formatVersion||1,exportedAt:c.exportedAt||new Date().toISOString(),count:se.length,cards:se},null,2)}else C="memory-vault.md",I="text/markdown;charset=utf-8",x=c.cards.map(se=>se.text.trim()).filter(Boolean).join(`
943
+ \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F`})]}),(0,e.jsxs)("div",{style:{marginTop:16,color:"#99a1ac",fontSize:12.5,lineHeight:1.8},children:[(0,e.jsx)("b",{style:{color:"#f3f5f8"},children:t("terminalWhy")}),(0,e.jsx)("br",{}),t("terminalWhyBody")]})]})}var ya=class extends n.default.Component{constructor(a){super(a),this.state={error:null}}static getDerivedStateFromError(a){return{error:a||new Error("unknown")}}componentDidCatch(a,o){try{console.warn("[memory-eternal] \u8BB0\u5FC6\u9762\u677F\u6E32\u67D3\u5F02\u5E38\uFF08\u5DF2\u515C\u5E95\uFF0C\u4E0D\u518D\u6574\u9875\u767D\u5C4F\uFF09",a,o&&o.componentStack)}catch{}}render(){if(!this.state.error)return this.props.children;let a=String(this.state.error&&this.state.error.message||this.state.error||"unknown");return(0,e.jsxs)("div",{style:{padding:"22px 24px",fontFamily:'system-ui, "Segoe UI", "Microsoft YaHei", sans-serif',color:"var(--dsw-alias-label-primary, #1f2937)"},children:[(0,e.jsx)("div",{style:{fontSize:15,fontWeight:700,marginBottom:6},children:"\u8BB0\u5FC6\u9762\u677F\u6E32\u67D3\u51FA\u9519"}),(0,e.jsx)("div",{style:{fontSize:12.5,opacity:.75,lineHeight:1.7,marginBottom:14,wordBreak:"break-all"},children:a}),(0,e.jsx)("div",{style:{fontSize:12,opacity:.6,marginBottom:14,lineHeight:1.7},children:"\u5DF2\u7ECF\u515C\u5E95\u4F4F\uFF0C\u4E0D\u4F1A\u518D\u6574\u9875\u767D\u5C4F\u3002\u70B9\u300C\u91CD\u65B0\u52A0\u8F7D\u300D\u53EF\u6062\u590D\uFF1B\u53CD\u590D\u51FA\u73B0\u8BF7\u7528\u5DE6\u680F\u300C\u53CD\u9988\u5F02\u5E38\u300D\u5E26\u4E0A\u8FD9\u6BB5\u62A5\u9519\u3002"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{try{window.location.reload()}catch{}},children:"\u91CD\u65B0\u52A0\u8F7D"})]})}};function On(t){return(0,e.jsx)(ya,{children:(0,e.jsx)(Wn,{...t})})}function Wn({t,inModal:a,onClose:o}){let d=typeof window<"u"&&(!!window.__DSH_BOOT__||String(location.pathname||"").includes("/memory-eternal/api/ui/app")),[c,l]=(0,n.useState)(null),[v,x]=(0,n.useState)(()=>{try{let r=localStorage.getItem("me-ui-scale");return["compact","normal","large"].includes(r)?r:"normal"}catch{return"normal"}}),[k,I]=(0,n.useState)([]),[D,M]=(0,n.useState)(!0),[y,z]=(0,n.useState)(null),[H,O]=(0,n.useState)(""),[F,P]=(0,n.useState)("all"),[A,G]=(0,n.useState)(""),[re,K]=(0,n.useState)("all"),[ae,ne]=(0,n.useState)("all"),[J,j]=(0,n.useState)(()=>{try{return new Set(JSON.parse(localStorage.getItem("me-pinned-v5")||"[]"))}catch{return new Set}}),[Z,ce]=(0,n.useState)(!1),Se=(0,n.useCallback)(r=>{j(h=>{let C=new Set(h);C.has(r)?C.delete(r):C.add(r);try{localStorage.setItem("me-pinned-v5",JSON.stringify([...C]))}catch{}return C})},[]),[ie,De]=(0,n.useState)(""),[m,Ne]=(0,n.useState)(()=>{try{let r=new URLSearchParams(typeof location<"u"?location.search:"").get("tab"),h={cards:"cards",graph:"graph",news:"news",usage:"stats",stats:"stats",audit:"audit",recycle:"optimize",optimize:"optimize",config:"config",terminal:"terminal"};if(r&&h[r])return h[r]}catch{}return"cards"}),[de,Pe]=(0,n.useState)(()=>new Set([m])),ge=(0,n.useCallback)(r=>{Pe(h=>h.has(r)?h:new Set(h).add(r)),Ne(r)},[]),[$,ke]=(0,n.useState)("recent"),[Te,T]=(0,n.useState)(null),f=(0,n.useRef)(null),S=(0,n.useRef)(null),[g,Y]=(0,n.useState)(!1),[se,Re]=(0,n.useState)(!1),[ee,ze]=(0,n.useState)(0),[p,B]=(0,n.useState)(null),[E,le]=(0,n.useState)(!1),[N,L]=(0,n.useState)(!1),[X,fe]=(0,n.useState)(!1),[Ce,b]=(0,n.useState)("group"),[u,V]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let r=h=>{let C=h&&h.detail;if(["compact","normal","large"].includes(C)){x(C);try{localStorage.setItem("me-ui-scale",C)}catch{}}};return window.addEventListener("me-ui-scale",r),()=>window.removeEventListener("me-ui-scale",r)},[]);let me=(0,n.useCallback)(()=>{V(!1);try{localStorage.setItem("me-onboard-v2","1")}catch{}},[]),be=(0,n.useCallback)((r="group")=>{b(r),fe(!0)},[]),He=(0,n.useRef)(!1),i=(0,n.useCallback)(async()=>{if(He.current)return;He.current=!0;let r=(h,C=!0)=>{f.current&&clearTimeout(f.current),T({ok:C,msg:h}),f.current=setTimeout(()=>T(null),3e3)};r(t("webOpening"));try{let h=await fetch(`${W}/open-web`,{method:"POST"}).then(te=>te.json()).catch(()=>null);if(h&&h.ok&&h.url){r(t("webOpened")+" \xB7 "+h.url);return}let C=await fetch(`${W}/web-info`).then(te=>te.json()).catch(()=>null),U=C&&C.ok&&C.url||"http://127.0.0.1:7999/",Q=window.open(U,"_blank","noopener,noreferrer");r(Q?t("webOpened")+" \xB7 "+U:t("webOpenFail")+" \xB7 "+U,!!Q)}catch{r(t("webOpenFail"),!1)}finally{He.current=!1}},[t]);(0,n.useEffect)(()=>{try{if(localStorage.getItem("me-onboard-v2")||m!=="cards")return;let r=setTimeout(()=>V(!0),900);return()=>clearTimeout(r)}catch{}},[m]);let[Ae,Dt]=(0,n.useState)(!0),[At,Ke]=(0,n.useState)(null),[et,Lt]=(0,n.useState)(0),dt=(0,n.useCallback)(()=>Lt(r=>r+1),[]),tt=c?.quarantine?.pending??0,Xe=c?.quarantine?.deleted??0,ot=(0,n.useRef)(null),[ut,Mt]=(0,n.useState)(0),[gt,Ye]=(0,n.useState)(!1),st=(0,n.useRef)(null),Ve=(0,n.useRef)(null),Ie=(0,n.useCallback)(async(r=F,h=A,C=ae,U={})=>{let Q=U.append===!0;try{Q?Ye(!0):(M(!0),O(""));let te=new URLSearchParams;r&&r!=="all"&&te.set("kind",r),h.trim()&&te.set("q",h.trim());let Le=U.tag!==void 0?U.tag:ie;Le&&te.set("tag",Le),te.set("status",C||"all"),te.set("limit",String(Mn)),te.set("offset",String(U.offset||0)),$==="title"&&te.set("sort","title");let ye=await(await fetch(`${W}/cards?${te.toString()}`)).json();if(ye.ok){let ve=ye.cards||[];I(Fe=>Q?[...Fe,...ve.filter(it=>!Fe.some(nt=>nt.path===it.path))]:ve),Mt(Number(ye.total)||ve.length)}}catch(te){O(String(te&&te.message?te.message:te))}finally{Q?Ye(!1):M(!1)}},[F,A,ae,$,ie]),Oe=(0,n.useCallback)(async()=>{try{let[r,h,C,U]=await Promise.all([fetch(`${W}/overview`).then(te=>te.json()),fetch(`${W}/capture-log`).then(te=>te.json()).catch(()=>null),fetch(`${W}/config`).then(te=>te.json()).catch(()=>null),fetch(`${W}/news?unread=1&limit=1`).then(te=>te.json()).catch(()=>null)]);r.ok&&l(r),U&&U.ok&&ze(Number((U.counts||{}).unread)||0);let Q=C&&C.ok&&C.config&&C.config.uiScale;if(["compact","normal","large"].includes(Q)){x(Q);try{localStorage.setItem("me-ui-scale",Q)}catch{}}z(h&&h.ok&&h.available&&h.health||null)}catch(r){O(String(r&&r.message?r.message:r))}finally{M(!1)}},[]),s=async r=>{try{let C=await(await fetch(`${W}/delete?path=${encodeURIComponent(r)}`)).json();C.ok?(T({ok:!0,msg:t("deleted")}),await Oe(),dt()):T({ok:!1,msg:C.error||t("deleteFail")})}catch{T({ok:!1,msg:t("deleteFail")})}f.current&&clearTimeout(f.current),f.current=setTimeout(()=>T(null),2e3)};(0,n.useEffect)(()=>(Oe(),()=>{ot.current&&clearTimeout(ot.current)}),[Oe]);let q=r=>{G(r),ot.current&&clearTimeout(ot.current),ot.current=setTimeout(()=>Ie(F,r,ae),280)},oe=r=>{P(r),Ie(r,A,ae)},he=r=>{let h=String(r||"");De(h),B(null),Ie(F,A,ae,{tag:h})};(0,n.useEffect)(()=>{m==="cards"&&Ie(F,A,ae)},[ae,m,et,$,ie]),(0,n.useEffect)(()=>{if(m!=="cards"||D||gt||k.length>=ut)return;let r=st.current,h=Ve.current;if(!r)return;let C=new IntersectionObserver(U=>{U[0]&&U[0].isIntersecting&&Ie(F,A,ae,{append:!0,offset:k.length})},{root:h||null,rootMargin:"400px"});return C.observe(r),()=>C.disconnect()},[m,k,ut,D,gt,F,A,ae,Ie]);let ue=async(r,h)=>{try{let C=await fetch(`${W}/card-kind`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:r,kind:h})}).then(U=>U.json());!C||!C.ok?T({ok:!1,msg:C&&C.error||t("coreSetFail")}):(B(U=>U&&U.path===r?{...U,kind:C.kind}:U),await Oe(),dt(),T({ok:!0,msg:t(h==="core"?"coreSetOk":"coreUnsetOk")}))}catch(C){T({ok:!1,msg:String(C&&C.message||C)})}f.current&&clearTimeout(f.current),f.current=setTimeout(()=>T(null),2e3)},pe=async r=>{try{let h=r.status;if(!h&&r.path)try{let Le=((await fetch(`${W}/cards?status=all&q=${encodeURIComponent(r.title||"")}&limit=50`).then(_e=>_e.json())).cards||[]).find(_e=>_e.path===r.path);Le&&(h=Le.status)}catch{}let C=h&&h!=="approved"?`&status=${encodeURIComponent(h)}`:"",U=await fetch(`${W}/card?path=${encodeURIComponent(r.path||r.id)}${C}`),Q=await U.json();Q.ok?B({path:Q.path,title:r.title,text:Q.text,kind:r.kind||"knowledge",status:h||"approved"}):O(Q.error||`HTTP ${U.status}`)}catch(h){O(String(h&&h.message?h.message:h))}},Me=async(r,h)=>{Y(!0);try{let C=await fetch(`${W}/export`);if(!C.ok)throw new Error("HTTP "+C.status);let U=await C.json();if(!U.ok)throw new Error(U.error||"export failed");let Q,te,Le;if(r==="json"){te="memory-vault.json",Le="application/json";let ve=U.cards.map(Fe=>({path:Fe.path,title:Fe.title,kind:Fe.kind,status:Fe.status,store:Fe.store,text:Fe.text}));Q=JSON.stringify({format:U.format||"memory-eternal-vault",formatVersion:U.formatVersion||1,exportedAt:U.exportedAt||new Date().toISOString(),count:ve.length,cards:ve},null,2)}else te="memory-vault.md",Le="text/markdown;charset=utf-8",Q=U.cards.map(ve=>ve.text.trim()).filter(Boolean).join(`
828
944
 
829
945
  ---
830
946
 
831
- `);let K=new Blob([x],{type:I}),oe=await Ln(K,C,!1);if(!oe.ok){M({ok:!1,msg:t("exportFail")}),ke(!1);return}M({ok:!0,msg:t("exportedTo")+"\uFF1A"+t("defaultDownloads")+" \xB7 "+oe.name})}catch(O){M({ok:!1,msg:t("exportFail")+" \xB7 "+(O.message||"")})}finally{ke(!1)}p.current&&clearTimeout(p.current),p.current=setTimeout(()=>M(null),2600)},he=async b=>{let A=b.target.files&&b.target.files[0];if(b.target.value="",!!A){try{let O=await A.text(),x=await(await fetch(`${$}/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:O})).json();if(x.ok){await Te();let C=x.imported||0,I=t("importedVault")+"\uFF1A"+C;x.total&&(I+=t("importedTotal")+x.total+t("importedTotalTail")),x.quarantined&&(I+=t("importedQuarantine")+x.quarantined+t("importedQuarantineTail")),x.skipped&&(I+=t("importedSkipped")+x.skipped+t("importedSkippedTail")),x.warning&&(I+=" \xB7 "+x.warning),M({ok:C>0||!x.total,msg:I})}else M({ok:!1,msg:x.error||t("importFail")})}catch{M({ok:!1,msg:t("importFail")})}p.current&&clearTimeout(p.current),p.current=setTimeout(()=>M(null),2400)}},Q=(0,n.useMemo)(()=>{let b=y.slice();return ie!=="all"&&(b=b.filter(A=>Tt(A.submittedBy)===ie)),re!=="all"&&(b=b.filter(A=>(A.status||"approved")===re)),G&&(b=b.filter(A=>U.has(A.path))),pe==="title"?b.sort((A,O)=>String(A.title||"").localeCompare(String(O.title||""))):pe==="hot"?b.sort((A,O)=>(O.weight||O.links||0)-(A.weight||A.links||0)):b.sort((A,O)=>new Date(O.updated||0).getTime()-new Date(A.updated||0).getTime()),b},[y,pe,ie,re,G,U]),ne=(0,n.useMemo)(()=>[...new Set(y.map(b=>Tt(b.submittedBy)))],[y]),we=(0,n.useMemo)(()=>{let b={};for(let A of y){let O=new Set(A.tags||[]),c=0;for(let x of y)x.path!==A.path&&(x.tags||[]).some(C=>O.has(C))&&c++;b[A.path]=c}return b},[y]),[Ke,ht]=(0,n.useState)(null),Be=(0,n.useMemo)(()=>{if(!Q.length)return null;let b=Ke?Q.find(O=>O.path===Ke):null;return b||Q.find(O=>Date.now()-new Date(O.updated||0).getTime()>21*864e5)||Q[0]},[Q,Ke]),Wt=()=>{if(!Q.length)return;let b=Q.findIndex(A=>A.path===(Be&&Be.path));ht(Q[(b+1+Q.length)%Q.length].path)},Ct=!R&&z==="all"&&!X&&re==="all"&&!!Be;return(0,e.jsxs)("div",{className:"memory-eternal-root me-v5","data-ui-scale":v,style:{height:"100%",width:"100%",zoom:v==="large"?1.15:v==="compact"?.92:1.06,overflow:"hidden",display:"flex",flexDirection:"column"},children:[(0,e.jsx)("style",{children:qe}),!a&&(0,e.jsxs)("div",{className:`mc-v5-top${g?" in-host":""}`,children:[(0,e.jsx)("img",{className:"mc-v5-logo",src:Vt,alt:""}),(0,e.jsxs)("span",{className:"mc-v5-crumb",children:[(0,e.jsx)("b",{children:t("memoryTitle")}),(0,e.jsx)("i",{children:"/"}),(0,e.jsx)("span",{children:t(m==="cards"?"cardsTab":m==="graph"?"graphTab":m==="stats"?"tabUsage":m==="audit"?"tabAudit":m==="optimize"?"tabRecycle":m==="terminal"?"terminalTab":"tabConfig")})]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsxs)("div",{className:"mc-v5-top-actions",children:[(0,e.jsxs)("span",{className:"mc-v5-sys",children:[(0,e.jsx)("i",{}),t("v5Local")]}),(0,e.jsxs)("span",{className:"mc-v5-ver",children:["v",Pt]}),(0,e.jsxs)("button",{type:"button",className:"mc-v5-star",onClick:()=>na("https://github.com/EternalNight996/memory-eternal"),title:t("v5Star"),children:["\u2605 ",(0,e.jsx)("span",{className:"mc-v5-star-label",children:"Star"})]}),(0,e.jsx)("button",{type:"button",className:"mc-v5-help",onClick:()=>f("group"),title:t("supportTitle"),"aria-label":t("supportTitle"),children:"?"})]})]}),Ae&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(Ae.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:Ae.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:Ae.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{children:Ae.msg})]}),a&&(0,e.jsxs)("div",{className:"me-modal-head",children:[(0,e.jsxs)("div",{className:"me-modal-title",children:[(0,e.jsx)("span",{className:"me-wicon",children:(0,e.jsx)("img",{src:Vt,alt:""})}),(0,e.jsx)("h2",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:t("memoryHint")})]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("button",{type:"button",className:"me-modal-close me-modal-x",onClick:i,"aria-label":t("close"),title:t("close"),children:(0,e.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})})})]}),h&&h.ok===!1&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,margin:"0 0 8px",padding:"9px 14px",borderRadius:10,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.45)",borderLeft:"4px solid #ef4444",color:"var(--dsw-alias-label-primary, #e5e7eb)",fontSize:12.5,lineHeight:1.6},children:[(0,e.jsxs)("span",{style:{fontWeight:800},children:["\u26A0 ",t("captureAlert")]}),(0,e.jsxs)("span",{style:{flex:1},children:[h.reason,(0,e.jsx)("div",{style:{opacity:.68,fontSize:11.5,marginTop:2},children:t("captureAlertHint")})]}),(0,e.jsx)("span",{style:{opacity:.7},children:h.since?wt(new Date(h.since).toISOString()):""})]}),(0,e.jsxs)("div",{className:"me-modal-body",children:[(0,e.jsxs)("div",{className:`mc-rail${Y?" open":""}`,children:[(0,e.jsxs)("div",{className:"mc-v5-rail-top",children:[Y&&(0,e.jsxs)("div",{className:"mc-v5-railbrand",children:[(0,e.jsx)("img",{className:"mark",src:Vt,alt:""}),(0,e.jsxs)("div",{children:[(0,e.jsx)("b",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:"MEMORY ATLAS"})]})]}),(0,e.jsx)("button",{type:"button",className:"mc-rail-collapse",onClick:()=>ve(b=>!b),"aria-label":t(Y?"collapse":"expand"),title:t(Y?"collapse":"expand"),children:Y?"\xAB":"\xBB"})]}),Y&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navWorkspace")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="cards"?" active":""}`,onClick:()=>Ce("cards"),title:t("cardsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E0}"}),Y&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("cardsTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="graph"?" active":""}`,onClick:()=>Ce("graph"),title:t("graphTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F52E}"}),Y&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("graphTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="stats"?" active":""}`,onClick:()=>Ce("stats"),title:t("tabUsage"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4C8}"}),Y&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabUsage")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="audit"?" active":""}`,onClick:()=>Ce("audit"),title:t("tabAudit"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F50D}"}),Y&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabAudit")}),Fe>0&&(0,e.jsx)("span",{className:"mc-dot",children:Fe>99?"99+":Fe})]}),Y&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSystem")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="optimize"?" active":""}`,onClick:()=>Ce("optimize"),title:t("tabRecycle"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u267B\uFE0F"}),Y&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabRecycle")}),lt>0&&(0,e.jsx)("span",{className:"mc-dot",style:{background:"#6b7280"},children:lt>99?"99+":lt})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="terminal"?" active":""}`,onClick:()=>Ce("terminal"),title:t("terminalTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u25B8_"}),Y&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("terminalTab")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:W,title:t("webTab"),"aria-label":t("webTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F310}"}),Y&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("webTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="config"?" active":""}`,onClick:()=>Ce("config"),title:t("tabConfig"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2699\uFE0F"}),Y&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabConfig")})]}),Y&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSupport")}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>f("group"),title:t("supportGroup"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4AC}"}),Y&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportGroup")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>f("sponsor"),title:t("supportSponsor"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2615"}),Y&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportSponsor")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>f("legacy"),title:t("supportLegacy"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E9}"}),Y&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportLegacy")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>L(!0),title:t("fbNav"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F41E}"}),Y&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("fbNav")})]})]}),(0,e.jsxs)("div",{className:"mc-main",ref:kt,children:[d&&d.db&&d.db.writable===!1?(0,e.jsxs)("div",{style:{margin:"8px 10px 0",padding:"8px 12px",borderRadius:8,fontSize:12,lineHeight:1.7,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.35)",color:"#b91c1c"},children:["\u26A0\uFE0F ",t("dbReadonlyTitle"),"\uFF1A",d.db.error||"\u2014"," \u2014\u2014 ",t("dbReadonlyBody"),(0,e.jsx)("div",{style:{opacity:.85,marginTop:2},children:t("dbReadonlyFix")})]}):null,m==="cards"&&(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"MEMORY LIBRARY"}),(0,e.jsx)("h1",{children:t("memoryTitle")}),(0,e.jsx)("p",{children:t("memoryHint")}),(0,e.jsxs)("div",{className:"mc-v5-pagehead-stats",children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:d?.total??"\u2014"})," ",t("cardsUnit")]}),(0,e.jsxs)("span",{children:[t("recent")," +",d?.recent??0]}),(0,e.jsxs)("span",{children:[t("pending")," ",d?.quarantine?.pending??d?.status?.pending??0]}),(0,e.jsxs)("span",{children:[t("rejected")," ",d?.quarantine?.rejected??d?.status?.rejected??0]})]})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[y.length," / ",ct]})]}),m==="cards"&&(0,e.jsxs)("div",{className:"mc-toolbar",children:[(0,e.jsx)("input",{type:"text",placeholder:t("searchPlaceholder"),value:R,onChange:b=>Ge(b.target.value)}),X&&(0,e.jsxs)("button",{type:"button",className:"mc-chip active",title:t("clearFilter"),onClick:()=>St(""),children:["\u{1F3F7} ",X," ",(0,e.jsx)("span",{style:{opacity:.7},children:"\u2715"})]}),(0,e.jsx)("input",{ref:j,type:"file",accept:".json,application/json",style:{display:"none"},onChange:he}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>j.current&&j.current.click(),children:t("importVault")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>o({kind:"knowledge",title:"",body:"",tags:"",template:""}),children:["+ ",t("newCard")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:J,onClick:()=>V("md"),children:t(J?"exporting":"exportVault")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:J,onClick:()=>V("json"),children:t(J?"exporting":"exportJson")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Te(),children:t("refresh")})]}),m==="cards"&&(0,e.jsxs)("div",{className:"mc-chips",children:[ra.map(b=>(0,e.jsxs)("button",{type:"button",className:`mc-chip${z===b?" active":""}`,onClick:()=>He(b),children:[t(b==="all"?"all":$e[b]),(0,e.jsx)("span",{className:"mc-chip-n",children:b==="all"?d?.total??0:d?.byKind?.[b]??0})]},b)),(0,e.jsxs)("button",{type:"button",className:`mc-chip${G?" active":""}`,onClick:()=>xe(b=>!b),children:["\u{1F4CC} ",t("pinnedOnly"),(0,e.jsx)("span",{className:"mc-chip-n",children:U.size})]}),(0,e.jsxs)("select",{value:ie,onChange:b=>q(b.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsxs)("option",{value:"all",children:["\u{1F916} ",t("allAgents")]}),Ra(ne).map(b=>(0,e.jsx)("option",{value:b,children:b},b))]}),(0,e.jsxs)("select",{value:re,onChange:b=>ge(b.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allStatus")}),(0,e.jsx)("option",{value:"approved",children:t("statusApproved")}),(0,e.jsx)("option",{value:"pending",children:t("statusPending")}),(0,e.jsx)("option",{value:"rejected",children:t("statusRejected")})]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),[{key:"recent",label:t("sortRecent")},{key:"title",label:t("sortTitle")},{key:"hot",label:t("sortHot")}].map(b=>(0,e.jsx)("button",{type:"button",className:`mc-chip${pe===b.key?" active":""}`,onClick:()=>ze(b.key),children:b.label},b.key))]}),B&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",B]}),(0,e.jsx)("div",{style:{display:m==="cards"?"contents":"none"},children:N?(0,e.jsx)(Ba,{text:t("loading")}):B?(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",B," ",(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Te(),children:t("retry")})]}):y.length===0?(0,e.jsx)("div",{className:"mc-empty",children:t("empty")}):(0,e.jsxs)(e.Fragment,{children:[Ct&&(0,e.jsxs)("div",{className:"mc-v5-feature",onClick:()=>H(Be),children:[(0,e.jsxs)("div",{className:"mc-v5-feature-copy",children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:t("todayReview")}),(0,e.jsx)("h3",{children:Be.title}),(0,e.jsx)("p",{children:la(Be)}),(0,e.jsxs)("div",{className:"mc-v5-feature-meta",children:[(0,e.jsxs)("span",{children:[Rt[Be.kind]||"\u{1F4CE}"," ",t($e[Be.kind]||"kindKnowledge")]}),(0,e.jsxs)("span",{children:["\u{1F552} ",wt(Be.updated)]}),(Be.tags||[]).slice(0,3).map(b=>(0,e.jsxs)("span",{children:["#",b]},b))]})]}),(0,e.jsxs)("div",{className:"mc-v5-feature-side",children:[(0,e.jsx)(Ia,{n:we[Be.path]||0,color:Ve[Be.kind]||Ve.other,size:58}),(0,e.jsx)("b",{children:we[Be.path]||0}),(0,e.jsx)("span",{children:t("links")}),(0,e.jsx)("button",{type:"button",className:"mc-v5-feature-shuffle",onClick:b=>{b.stopPropagation(),Wt()},children:t("reshuffle")}),(0,e.jsx)("span",{className:"mc-v5-feature-open",children:t("openArrow")})]})]}),(0,e.jsx)("div",{className:"mc-grid",children:Q.filter(b=>!Ct||b.path!==Be.path).map(b=>(0,e.jsx)(wn,{card:b,t,query:R.trim(),onOpen:H,onDelete:it,onTagClick:St,pinned:U.has(b.path),onPin:Ue,onCore:r,links:we[b.path]||0},b.path))}),y.length<ct&&(0,e.jsx)("div",{ref:Lt,style:{height:1}}),Ye&&(0,e.jsxs)("div",{className:"mc-empty",style:{padding:"10px 0"},children:[t("loading"),"\uFF08",y.length," / ",ct,"\uFF09"]})]})}),(0,e.jsx)("div",{style:{display:m==="graph"?"flex":"none",flex:1,minHeight:0},children:ce.has("graph")&&(0,e.jsx)(Rn,{t,onOpen:H,all:ae,onAllChange:Xe,onMutate:ft,active:m==="graph",visible:m==="graph"})}),(0,e.jsx)("div",{style:{display:m==="terminal"?"contents":"none"},children:ce.has("terminal")&&(0,e.jsx)(gn,{t})}),(0,e.jsx)("div",{style:{display:m==="config"?"contents":"none"},children:ce.has("config")&&(0,e.jsx)(Da,{t,onReload:()=>Te(),version:nt})}),(0,e.jsx)("div",{style:{display:m==="stats"?"contents":"none"},children:ce.has("stats")&&(0,e.jsx)(kn,{t,tab:"stats",onReload:()=>Te(),version:nt})}),(0,e.jsx)("div",{style:{display:m==="audit"?"contents":"none"},children:ce.has("audit")&&(0,e.jsx)(yn,{t,onReload:()=>Te(),version:nt})}),(0,e.jsx)("div",{style:{display:m==="optimize"?"contents":"none"},children:ce.has("optimize")&&(0,e.jsx)(vn,{t,onReload:()=>Te(),version:nt})}),l&&(0,e.jsx)(Cn,{t,onClose:()=>L(!1)}),P&&(0,e.jsx)(Nn,{t,tab:Ne,onTab:be,onClose:()=>te(!1),onFeedback:()=>{te(!1),L(!0)},onReplay:()=>{te(!1),De(!0)}}),Z&&(0,e.jsx)(Mn,{t,onDone:Me}),le&&(0,e.jsx)(Tn,{t,card:le,query:R.trim(),onNavigate:b=>{let A=Q.findIndex(c=>c.path===le.path),O=Q[A+b];O&&H(O)},onTagClick:St,onClose:()=>fe(null),onDelete:b=>{fe(null),it(b)},onFeedback:b=>{let A=le.path;fetch(`${$}/feedback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:R.trim(),path:A,useful:b})}).then(()=>M({ok:!0,msg:t(b?"fbUseful":"fbIrr")})).catch(()=>{}),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>M(null),2e3)},allCards:Q,onOpenRelated:b=>H(b),onKindChange:r}),(0,e.jsx)(Sn,{t,newCard:We,setNewCard:o,onCreated:()=>{Te(),ft(),M({ok:!0,msg:t("created")}),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>M(null),2e3)}})]})]})]})}var za=({toast:t})=>t?(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"8px 12px",fontSize:12,borderLeft:"4px solid "+(t.ok?"#10b981":"#ef4444"),background:t.ok?"rgba(16,185,129,0.08)":"rgba(239,68,68,0.08)"},children:[t.ok?"\u2705":"\u26A0"," ",t.msg]}):null;var sa=(0,n.createContext)({form:null,set:()=>{}}),hn=new Set(["autoRestartOnDrift","coreMemoryEnabled"]);function Le({k:t,label:a,hint:i,type:g="text",step:d,min:s,max:v}){let{form:w,set:y}=(0,n.useContext)(sa);return(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:a||t}),(0,e.jsx)("input",{type:g,step:d,min:s,max:v,value:w?w[t]??"":"",onChange:F=>{let N=F.target.value;y(t,g==="number"?N===""?"":Number(N):N)}}),i?(0,e.jsx)("span",{className:"mc-field-hint",children:i}):null]})}function Ze({k:t,label:a}){let{form:i,set:g}=(0,n.useContext)(sa),d=i?i[t]:void 0,s=d===void 0?hn.has(t):!!d;return(0,e.jsxs)("label",{className:"mc-switch",children:[(0,e.jsx)("input",{type:"checkbox",checked:s,onChange:v=>g(t,v.target.checked)}),(0,e.jsx)("span",{children:a||t})]})}function Mt({icon:t,title:a,sub:i,children:g}){return(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:t}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:a}),i?(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:i}):null]})]}),(0,e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:13},children:g})]})}function Da({t,onReload:a,version:i,compact:g}){let[d,s]=(0,n.useState)(null),[v,w]=(0,n.useState)(0),[y,F]=(0,n.useState)(null),[N,k]=(0,n.useState)(null),[h,T]=(0,n.useState)(!1),[B,E]=(0,n.useState)(!1),z=(0,n.useRef)(!1),D=(0,n.useRef)(null),R=(0,n.useRef)({}),[de,ie]=(0,n.useState)(null),[q,re]=(0,n.useState)(null),[ge,U]=(0,n.useState)(""),[_,G]=(0,n.useState)(""),[xe,Ue]=(0,n.useState)(""),[X,je]=(0,n.useState)(null),[m,Pe]=(0,n.useState)(null),ce=(0,n.useCallback)(async(r,H=!1)=>{H||G("version");try{let V=await fetch($+"/version-check"+(r?"?force=1":"")).then(he=>he.json());V&&V.ok?(Pe(V),r&&ae(V.updateAvailable?t("vcLatest")+" v"+V.latest:t("vcUpToDate"))):r&&ae(t("vcCheckFail"),!1)}catch{r&&ae(t("vcCheckFail"),!1)}finally{H||G("")}},[t]);(0,n.useEffect)(()=>{ce(!1);let r=setInterval(()=>{ce(!1,!0)},6e4),H=()=>{typeof document<"u"&&!document.hidden&&ce(!1,!0)};return document.addEventListener("visibilitychange",H),()=>{clearInterval(r),document.removeEventListener("visibilitychange",H)}},[i,ce]);let[ee,Ce]=(0,n.useState)(""),[pe,ze]=(0,n.useState)(null),[Ae,M]=(0,n.useState)(""),[p,j]=(0,n.useState)(!1),J=(0,n.useRef)(null),ke=(0,n.useRef)(0),le=r=>{ke.current=r.currentTarget.scrollTop};(0,n.useLayoutEffect)(()=>{let r=J.current;r&&Math.abs(r.scrollTop-ke.current)>1&&(r.scrollTop=ke.current)});let fe=(0,n.useRef)(null),ae=(r,H=!0)=>{fe.current&&clearTimeout(fe.current),ze({msg:r,ok:H}),fe.current=setTimeout(()=>ze(null),1900)},Xe=async()=>{if(!_){G("restart");try{let r=await fetch($+"/restart-self",{method:"POST"});if(r.status===404||r.status===405){ae(W("vcRestartNoRoute",{cmd:m&&m.restartCommand||"dsh-memory restart --port 7999"}),!1);return}let H=await r.json().catch(()=>null);if(!H){ae(t("vcRestartFail")+"\uFF08HTTP "+r.status+"\uFF09",!1);return}if(!H.ok){ae(H.error||t("vcRestartFail"),!1);return}if(H.alreadyCurrent){ae(H.note||t("vcRestartCurrent"));return}ae(H.note||t("vcRestartSent")),H.alreadyRunning||setTimeout(()=>{ce(!0)},6e3)}catch(r){ae(t("vcRestartFail")+"\uFF1A"+String(r&&r.message||r),!1)}finally{G("")}}},l=m&&m.resident?String(m.resident.served||""):"",L=!!(m&&m.onDisk&&l&&l!==m.onDisk),P=!!(m&&m.resident&&m.resident.managed===!1&&m.resident.managedKnown===!1),te=m&&m.resident&&m.resident.replaceBlocked&&m.resident.replaceBlocked.fresh||null,Ne=!!(m&&m.resident&&m.resident.managedBy==="host"),be=!!(m&&m.resident&&m.resident.managed===!1&&!P&&!Ne),Z=!!(m&&m.resident&&!l),De=L||Z||be||P,Me=ga({hasVersion:!!m,hostVersion:m?m.loaded:"",onDisk:m?m.onDisk:"",residentServed:m&&m.resident?m.resident.served:"",residentPresent:!!(m&&m.resident),residentManaged:m&&m.resident?m.resident.managed:null,residentManagedKnown:m&&m.resident?m.resident.managedKnown:null,residentManagedBy:m&&m.resident?m.resident.managedBy:"",replaceBlocked:m&&m.resident?m.resident.replaceBlocked:null}),f={hostProcessStale:()=>W("vcHostProcessStale",{disk:m.onDisk,loaded:m.loaded}),residentDown:()=>W("vcResidentDown",{port:m.resident&&m.resident.port||"",cmd:m.restartCommand||"dsh-memory restart --port 7999"}),residentReplaceBlocked:()=>W("vcResidentReplaceBlocked",{served:l,err:te&&te.error||"",path:te&&te.lockPath||"",cmd:m.restartCommand||"dsh-memory restart --port "+(m.resident&&m.resident.port||7999)}),residentLockUnknown:()=>W("vcResidentLockUnknown",{served:l,path:m.resident&&m.resident.lock&&m.resident.lock.path||"",err:m.resident&&m.resident.lock&&m.resident.lock.error||""}),residentUnmanaged:()=>W("vcResidentUnmanaged",{served:l,cmd:m.restartCommand||"dsh-memory restart --port 7999"})},u={restartStart:()=>W("vcRestartStart",{disk:m&&m.onDisk||""}),restartRepair:()=>W("vcRestartRepair",{disk:m&&m.onDisk||""}),restartFixes:()=>W("vcRestartFixes",{served:l||"",disk:m&&m.onDisk||""}),restartHostOnly:()=>W("vcRestartHostOnly",{loaded:m&&m.loaded||"",disk:m&&m.onDisk||""}),restartAnyway:()=>W("vcRestartAnyway",{ver:m&&m.onDisk||""})},W=(r,H)=>Object.keys(H).reduce((V,he)=>V.split("{"+he+"}").join(H[he]),t(r)),Y=(0,n.useCallback)(async()=>{try{let[r,H,V,he]=await Promise.all([fetch(`${$}/config`).then(Q=>Q.json()).catch(()=>null),fetch(`${$}/setup-status`).then(Q=>Q.json()).catch(()=>null),fetch(`${$}/budget`).then(Q=>Q.json()).catch(()=>null),fetch(`${$}/llm-routes`).then(Q=>Q.json()).catch(()=>null)]);if(he&&he.ok&&je(he),r&&r.ok){s(r),w(r.revision??0),F(r.schema??null);let Q=ka(r.config??{},R.current);R.current=Q.overlay,k({...Q.values}),j(!1),ie(r.dsh??null),T(r.writable===!1),E(r.viaPending===!0),U(""),z.current=!1}else V&&V.ok?(k({...V}),j(!1),T(!0),U(t("configNeedsDsh"))):U(t("adminLoadFail"));H&&H.ok&&re(H),Ue("")}catch{U(t("adminLoadFail"))}},[t]);(0,n.useEffect)(()=>{Y()},[i,Y]);let ve=(r,H)=>{z.current=!0,j(!0),M(""),k(V=>({...V??{},[r]:H}))};(0,n.useEffect)(()=>{D.current=Y},[Y]),(0,n.useEffect)(()=>{if(typeof EventSource>"u")return;let r=null;try{r=new EventSource($+"/events")}catch{return}let H=()=>{!z.current&&typeof D.current=="function"&&D.current()};try{r.addEventListener("config",H)}catch{}return()=>{try{r.close()}catch{}}},[]);let We=new Set(["dedupThreshold","captureMinChars","captureCooldownMs","maxCardsPerDay","captureMaxTokens","recallMinScore","recallLimit","recallSummaryLen","recycleRetentionDays","webPort","webCheckIntervalMs","webMaxRestart","sessionBudgetChars","coreMemoryLimit","coreMemoryMaxChars"]),o=r=>({init:t("modeInit"),interval:t("modeInterval"),manual:t("modeManual")})[r]||r,nt=async()=>{if(!N)return;if(h){ae(t("editInSetting"),!1);return}let r={dedupThreshold:[0,1],captureMinChars:[0,1e6],captureCooldownMs:[0,1e9],maxCardsPerDay:[0,1e6],captureMaxTokens:[100,4e3],recallMinScore:[0,50],recallLimit:[1,20],recallSummaryLen:[40,400],recycleRetentionDays:[1,3650],webPort:[1,65535],webCheckIntervalMs:[1e3,6e5],webMaxRestart:[1,1e3],sessionBudgetChars:[0,1e9],coreMemoryLimit:[1,20],coreMemoryMaxChars:[200,1e4]},H=[];for(let[V,[he,Q]]of Object.entries(r)){if(!(V in N))continue;let ne=N[V],we=typeof ne=="number"?ne:Number(ne);(ne===""||ne===null||ne===void 0||!Number.isFinite(we)||we<he||we>Q)&&H.push(t("invalidField",{field:V,min:he,max:Q,value:String(ne===""?"\u7A7A":ne)}))}if(H.length){let V=t("saveInvalid")+"\uFF1A"+H.join("\uFF1B");U(V),ae(V,!1);return}G("save");try{let V={...N};for(let we of Object.keys(N))we in V&&typeof V[we]=="string"&&V[we].trim()!==""&&We.has(we)&&(V[we]=Number(V[we]));Array.isArray(V.vaultProfiles)&&(V.vaultProfiles=V.vaultProfiles.filter(we=>we&&(String(we.name||"").trim()||String(we.path||"").trim())));let he=await fetch(`${$}/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch:V,expectedRevision:v})}),Q=await he.text(),ne=null;try{ne=Q?JSON.parse(Q):null}catch{ne=null}if(ne||(ne={error:"HTTP "+he.status+(Q?"\uFF1A"+Q.slice(0,200):"\uFF08\u5BBF\u4E3B\u672A\u8FD4\u56DE\u539F\u56E0\uFF0C\u8BF7\u68C0\u67E5\u662F\u5426\u6709\u6570\u5B57\u5B57\u6BB5\u4E3A\u7A7A\u6216\u8D85\u51FA\u8303\u56F4\uFF09")}),ne&&ne.ok){let we=typeof ne.pendingOutcome=="string"?ne.pendingOutcome:"",Ke,ht=!0;if(we==="applied")Ke=t("savedApplied")+(Array.isArray(ne.applied)&&ne.applied.length?" \xB7 "+ne.applied.join("\u3001"):"");else if(we==="queued")ht=!1,Ke=t("saveQueued");else if(we==="failed")ht=!1,Ke=t("saveFail")+" \xB7 "+(ne.hostGuard?t("saveHostGuard"):t("saveFailHint"));else if(we==="applied-direct")Ke=t("savedOk")+" \xB7 "+t("savedDirect");else{let Be=Array.isArray(ne.pending)&&ne.pending.length?" \xB7 "+t("savePending"):ne.note?" \xB7 "+t("restartHint"):"";Ke=(ne.retried?"\u267B ":"")+t("savedOk")+Be}R.current={...R.current,...V},ht?(M(""),j(!1),Ue(Ke)):U(Ke),ae(Ke,ht),await Y()}else{let we=he.status===409?t("conflictRefresh"):ne?.error||t("saveFail");U(we),ae(we,!1)}}catch{U(t("saveFail")),ae(t("saveFail"),!1)}finally{G("")}},At=()=>{R.current={},k({...d?.config??{}}),M(""),j(!1),Ue("")},ft={env:"vaultSrcEnv",profile:"vaultSrcProfile",workspace:"vaultSrcWorkspace",vaultDir:"vaultSrcVaultDir",default:"vaultSrcDefault"},Fe=r=>Array.isArray(r?.vaultProfiles)?r.vaultProfiles:[],lt=(r,H,V)=>{z.current=!0,j(!0),k(he=>{let Q=Fe(he).map(we=>({...we||{}})),ne={...Q[r]||{}};return H==="match"?String(V).trim()?ne.match={...ne.match||{},workspace:V}:delete ne.match:ne[H]=V,Q[r]=ne,{...he??{},vaultProfiles:Q}})},dt=()=>{z.current=!0,j(!0),k(r=>({...r??{},vaultProfiles:[...Fe(r),{name:"",path:""}]}))},ct=r=>{z.current=!0,j(!0),k(H=>({...H??{},vaultProfiles:Fe(H).filter((V,he)=>he!==r)}))},ot={fontSize:11,padding:"2px 8px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:6},Ye={padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:12,minWidth:0},bt={A:{label:t("planA"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:4e3,recallMinScore:2,recallLimit:5,recallSummaryLen:130,recallIncludeBody:!1,captureCooldownMs:3e5},B:{label:t("planB"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!1,dedupByLLM:!1,captureMaxTokens:500,recallMinScore:3,recallLimit:3,recallSummaryLen:80,recallIncludeBody:!1,captureMinChars:300,maxCardsPerDay:40,captureCooldownMs:3e5},C:{label:t("planC"),autoWebMode:"interval",watchdogAutoSpawn:!0,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:1200,recallMinScore:1,recallLimit:8,recallSummaryLen:200,recallIncludeBody:!0,captureCooldownMs:12e4}},Lt=r=>{let H=bt[r];H&&(k(V=>({...V??{},...H})),z.current=!0,j(!0),M(r),ae(W("planApplied",{plan:H.label})))},kt=async()=>{try{let r=await fetch($+"/setup-status").then(H=>H.json());r&&r.ok&&re(r)}catch{}},Qe=async(r,H)=>{G(r+H);try{let he=await(await fetch(`${$}/mcp/action`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:r,action:H})})).json();he&&he.ok?ae(W(H==="install"?"mcpInstalled":"mcpUninstalled",{agent:r})):ae(W("mcpActionFail",{agent:r,error:he?.error||""}),!1);try{let Q=await fetch(`${$}/setup-status`).then(ne=>ne.json());Q&&Q.ok&&re(Q)}catch{}}catch{ae(t("mergeFail"),!1)}finally{G("")}},Te=q&&Array.isArray(q.agents)?q.agents:[],it=Te.filter(r=>r.installed),Ge=[...new Set(it.flatMap(r=>Array.isArray(r.servers)?r.servers:[]))],He=Te.filter(r=>r.mcpConfigured&&!r.isDsh).length,St=Te.some(r=>Array.isArray(r.servers));return(0,e.jsx)(sa.Provider,{value:{form:N,set:ve},children:(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"hidden",flex:g?"0 0 auto":1,minHeight:0,maxHeight:g?"52vh":void 0},children:[(0,e.jsx)("style",{children:qe}),pe&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(pe.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:pe.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:pe.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:pe.msg})]}),(0,e.jsxs)("div",{ref:J,onScroll:le,style:{flex:1,minHeight:0,overflow:"auto",overscrollBehavior:"contain",scrollbarGutter:"stable",padding:4},children:[!g&&(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"MEMORY CONFIG"}),(0,e.jsx)("h1",{children:t("tabConfig")}),(0,e.jsx)("p",{children:t("configPageSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-audit-trust",children:["\u{1F6E1} ",t("v5Local")]})]}),ge&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",ge]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:Y,children:["\u21BB ",t("retry")]})]}),B&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #3b82f6",background:"rgba(59,130,246,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#1d4ed8",lineHeight:1.7},children:["\u2139 ",t("pendingSyncNote")]}),h&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #f59e0b",background:"rgba(245,158,11,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#b45309"},children:["\u2139\uFE0F ",t("configNeedsDsh")," \u2014\u2014 ",t("editInSetting")]}),xe&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #10b981",background:"rgba(16,185,129,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#059669"},children:["\u2713 ",xe]}),d&&(d.version||d.dsh?.vaultDir)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F4E6} ",t("pluginInfo")]}),(0,e.jsx)("span",{style:{fontSize:12,opacity:.7},children:t("dshHostLabel")}),d.version&&(0,e.jsxs)("code",{style:ot,children:[t("vcLoaded")," v",d.version]}),m&&m.resident&&m.resident.served&&m.resident.served!==d.version&&(0,e.jsxs)("code",{style:ot,children:[t("vcResident")," v",m.resident.served]}),m&&m.resident&&!m.resident.served&&(0,e.jsxs)("code",{style:{...ot,color:"#b45309",fontWeight:600},children:[t("vcResident")," ",t("vcResidentDownShort")]}),m&&m.resident&&m.resident.served&&m.resident.managed===!1&&(0,e.jsxs)("code",{style:{...ot,color:"#b45309",fontWeight:600},children:[t("vcResident")," v",m.resident.served," \xB7 ",t(te?"vcResidentReplaceBlockedShort":Ne?"vcResidentHostManagedShort":P?"vcResidentLockUnknownShort":"vcResidentUnmanagedShort")]}),Pt&&(0,e.jsxs)("code",{style:ot,children:[t("vcPage")," v",Pt]}),m&&m.onDisk&&(0,e.jsxs)("code",{style:ot,children:[t("vcOnDisk")," v",m.onDisk]}),m&&m.latest&&(0,e.jsxs)("code",{style:ot,children:[t("vcLatest")," v",m.latest]}),d.dsh?.vaultDir&&(0,e.jsxs)("span",{style:{fontSize:11,opacity:.6},children:["\u{1F4C1} ",d.dsh.vaultDir]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:_==="version",onClick:()=>ce(!0),children:_==="version"?t("checking"):"\u{1F504} "+t("vcCheck")})]}),m&&Me.warn&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px"},children:(0,e.jsxs)("div",{children:["\u26A0\uFE0F ",f[Me.warn]?f[Me.warn]():""]})}),Me.showButton&&(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn"+(Me.emphasis?" me-on":""),disabled:!!_,onClick:Xe,children:_==="restart"?"\u23F3 "+t("vcRestarting"):"\u{1F504} "+t("vcRestart")}),m.restartCommand&&(0,e.jsx)("code",{style:{fontSize:11,opacity:.75},children:m.restartCommand}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.65},children:u[Me.hint]?u[Me.hint]():""})]}),Pt&&m&&m.onDisk&&Pt!==m.onDisk&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.7},children:t("vcPageStale",{page:Pt,disk:m.onDisk})}),m&&m.updateAvailable&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,opacity:.88},children:["\u2B06 ",t("vcOutdated")," \u2192 ",(0,e.jsx)("code",{children:m.updateCommand})]}),m&&m.checkError&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,color:"#b91c1c"},children:[t("vcCheckFail"),"\uFF1A",m.checkError]})]}),q&&q.agents&&(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:"\u{1F50C}"}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:t("mcpSetupStatus")}),(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:t("mcpAutoHint")})]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",flex:"none"},onClick:kt,children:t("mcpRefresh")})]}),St?(0,e.jsx)("div",{className:"mc-mcp-summary",children:W("mcpSummary",{agents:it.length,servers:Ge.length,mounted:He})}):null,Te.map(r=>{let H=Array.isArray(r.servers),V=H?r.servers:[],he=r.isDsh?t("dshHostLabel"):r.label||r.name;return(0,e.jsxs)("div",{className:"mc-mcp-row",style:{opacity:r.installed?1:.55},children:[(0,e.jsxs)("div",{className:"mc-mcp-main",children:[(0,e.jsxs)("div",{className:"mc-mcp-title",children:[(0,e.jsx)("b",{children:he}),r.isDsh&&r.version&&(0,e.jsxs)("span",{className:"mc-mcp-badge",children:["v",r.version]}),!r.installed&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("notInstalled")}),r.installed&&r.mcpConfigured===!1&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:t("noMcpEntry")}),r.mcpConfigured===!0&&(0,e.jsxs)("span",{className:"mc-mcp-badge",style:{color:"#10b981"},children:["\u2713 ",t("healthy")]}),r.mcpConfigured===!0&&r.mcpMatchesCurrentNode===!1&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("nodePathNote")}),(r.needsRepair||r.mcpNeedsRepair)&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:t("mcpNeedsRepair")}),r.isDsh&&(0,e.jsxs)("span",{className:"mc-mcp-badge",children:[t("recallTool"),": ",r.recallTool?t("enabled"):t("disabled")]}),r.detectedOnly&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("mcpDetectedOnly")}),r.reason&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:r.reason})]}),H?V.length?(0,e.jsx)("div",{className:"mc-mcp-servers",children:V.map(Q=>(0,e.jsx)("code",{className:Q==="memory"?"on":"",children:Q},Q))}):r.installed?(0,e.jsx)("div",{className:"mc-mcp-servers",children:(0,e.jsx)("span",{style:{fontSize:10.5,opacity:.45},children:t("mcpNoServers")})}):null:null,r.mcpPath&&(0,e.jsx)("div",{className:"mc-mcp-path",title:r.mcpPath,children:r.mcpPath})]}),(0,e.jsxs)("div",{className:"mc-mcp-actions",children:[r.hook&&(0,e.jsxs)("span",{style:{fontSize:10.5,opacity:.55},children:["hook: ",r.hook]}),!r.isDsh&&!r.detectedOnly&&r.installed&&r.mcpConfigured===!1&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!_,onClick:()=>Qe(r.name,"install"),children:t("installMcp")}),!r.isDsh&&!r.detectedOnly&&r.installed&&(r.needsRepair||r.mcpNeedsRepair||r.mcpMatchesCurrentNode===!1)&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",style:{padding:"2px 8px"},disabled:!!_,onClick:()=>Qe(r.name,"install"),children:t("repairMcp")}),!r.isDsh&&!r.detectedOnly&&r.installed&&r.mcpConfigured===!0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},disabled:!!_,onClick:()=>{window.confirm(t("uninstallConfirm"))&&Qe(r.name,"uninstall")},children:t("uninstallMcp")})]})]},r.name+(r.mcpPath||""))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:6},children:t("mcpSetupHint")}),ee&&(0,e.jsx)("div",{style:{fontSize:11,marginTop:6},children:(0,e.jsx)("code",{style:{padding:"2px 6px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:4},children:ee})})]}),N?(0,e.jsxs)("div",{className:"mc-cfg",children:[(0,e.jsxs)(Mt,{icon:"\u{1F3AF}",title:t("presetConfig"),sub:t("presetHint"),children:[(0,e.jsx)("div",{className:"mc-plan-grid",children:["A","B","C"].map(r=>(0,e.jsxs)("button",{type:"button",className:"mc-plan"+(Ae===r?" on":""),"aria-pressed":Ae===r,onClick:()=>Lt(r),disabled:!!_,children:[(0,e.jsxs)("b",{children:[Ae===r?"\u2705 ":r==="A"?"\u{1F7E2} ":r==="B"?"\u{1F4B0} ":"\u2B50 ",bt[r].label]}),(0,e.jsx)("span",{children:t("planDesc"+r)})]},r))}),Ae?(0,e.jsxs)("div",{style:{fontSize:11,color:"#10b981"},children:["\u2705 ",W("planApplied",{plan:bt[Ae].label})]}):null]}),(0,e.jsx)(Mt,{icon:"\u{1F9E0}",title:t("dshMemoryConfig"),sub:t("cfgSubCore"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Ze,{k:"enabled",label:t("enabledLabel")}),(0,e.jsx)(Ze,{k:"autoCapture",label:t("autoCapture")}),(0,e.jsx)(Ze,{k:"autoRecall",label:t("autoRecall")}),(0,e.jsx)(Le,{k:"vaultDir",label:t("vaultDirLabel")}),(0,e.jsx)(Le,{k:"captureMinChars",label:t("captureMinChars"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(Le,{k:"maxCardsPerDay",label:t("maxCardsPerDay"),hint:t("unitPerDay"),type:"number"}),(0,e.jsx)(Le,{k:"dedupThreshold",label:t("dedupThreshold"),type:"number",step:"0.01",min:"0",max:"1"}),(0,e.jsx)(Le,{k:"recallLimit",label:t("recallLimit"),type:"number"}),(0,e.jsx)(Le,{k:"recallSummaryLen",label:t("recallSummaryLen"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(Ze,{k:"recallIncludeBody",label:t("recallBody")}),(0,e.jsx)(Le,{k:"secretHint",label:t("secretHint")}),(0,e.jsx)(Le,{k:"recallEmbedding",label:t("recallEmbedding")})]})}),(0,e.jsx)(Mt,{icon:"\u2B50",title:t("coreMemory"),sub:t("coreMemoryHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Ze,{k:"coreMemoryEnabled",label:t("coreMemoryEnabled")}),(0,e.jsx)(Le,{k:"coreMemoryLimit",label:t("coreMemoryLimit"),type:"number"}),(0,e.jsx)(Le,{k:"coreMemoryMaxChars",label:t("coreMemoryMaxChars"),type:"number"})]})}),(0,e.jsx)(Mt,{icon:"\u{1F520}",title:t("uiLayout"),sub:t("uiLayoutHint"),children:(0,e.jsx)("div",{className:"mc-cfg-grid",children:(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("uiLayout")}),(0,e.jsxs)("select",{value:N&&N.uiScale||"normal",onChange:r=>{let H=r.target.value;ve("uiScale",H);try{window.dispatchEvent(new CustomEvent("me-ui-scale",{detail:H}))}catch{}},children:[(0,e.jsx)("option",{value:"compact",children:t("uiCompact")}),(0,e.jsx)("option",{value:"normal",children:t("uiNormal")}),(0,e.jsx)("option",{value:"large",children:t("uiLarge")})]})]})})}),(0,e.jsxs)(Mt,{icon:"\u{1F5C2}\uFE0F",title:t("vaultMulti"),sub:t("cfgSubMulti"),children:[(0,e.jsxs)("div",{style:{fontSize:11.5,opacity:.85,marginBottom:8,lineHeight:1.7},children:[t("vaultNow"),"\uFF1A",(0,e.jsx)("code",{children:de?.vaultDir||"\u2014"}),de?.vaultName?`\uFF08${de.vaultName}\uFF09`:""," \xB7 ",t("vaultSource"),"\uFF1A",t(ft[de?.vaultSource]||"vaultSrcDefault"),de?.workspace?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("br",{}),t("vaultWorkspace"),"\uFF1A",(0,e.jsx)("code",{children:de.workspace})]}):null]}),Fe(N).map((r,H)=>(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1.6fr 1.5fr auto",gap:6,marginBottom:6},children:[(0,e.jsx)("input",{value:r.name||"",placeholder:t("vaultNamePh"),onChange:V=>lt(H,"name",V.target.value),style:Ye,disabled:h}),(0,e.jsx)("input",{value:r.path||"",placeholder:t("vaultPathPh"),onChange:V=>lt(H,"path",V.target.value),style:Ye,disabled:h}),(0,e.jsx)("input",{value:r.match&&r.match.workspace||"",placeholder:t("vaultMatchPh"),onChange:V=>lt(H,"match",V.target.value),style:Ye,disabled:h}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>ct(H),disabled:h,title:t("delete"),children:"\u2715"})]},H)),(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginTop:4},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:dt,disabled:h,children:["\uFF0B ",t("vaultAdd")]}),(0,e.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("vaultActive")}),(0,e.jsxs)("select",{value:N.activeVault||"",onChange:r=>ve("activeVault",r.target.value),disabled:h,style:Ye,children:[(0,e.jsx)("option",{value:"",children:t("vaultActiveNone")}),Fe(N).filter(r=>r&&r.name).map(r=>(0,e.jsx)("option",{value:r.name,children:r.name},r.name))]})]})]})]}),(0,e.jsx)(Mt,{icon:"\u{1F4B0}",title:t("costControl"),sub:t("costHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Ze,{k:"distillEnabled",label:t("distillEnabled")}),(0,e.jsx)(Ze,{k:"dedupByLLM",label:t("dedupByLLM")}),(0,e.jsx)(Le,{k:"captureMaxTokens",label:t("captureMaxTokens"),type:"number"}),(0,e.jsx)(Le,{k:"captureTimeoutMs",label:t("captureTimeoutMs"),type:"number"}),(0,e.jsx)(Le,{k:"recallMinScore",label:t("recallMinScore"),type:"number"}),(0,e.jsx)(Le,{k:"captureCooldownMs",label:t("captureCooldownMs"),type:"number"}),X&&X.ok===!1&&(0,e.jsxs)("div",{style:{gridColumn:"1 / -1",fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.6},children:["\u26A0 ",W("routeListFail",{err:X.error||"\u672A\u77E5\u539F\u56E0"})]}),X&&X.providers&&X.providers.length?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("captureProvider")}),(0,e.jsxs)("select",{value:N.captureProvider||"",onChange:r=>{ve("captureProvider",r.target.value),ve("captureModel","")},children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),X.providers.map(r=>(0,e.jsx)("option",{value:r.id,children:r.label},r.id))]})]}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("captureModel")}),(0,e.jsxs)("select",{value:N.captureModel||"",onChange:r=>ve("captureModel",r.target.value),children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),((X.providers.find(r=>r.id===N.captureProvider)||{}).models||[]).map(r=>(0,e.jsx)("option",{value:r.id,children:r.label||r.id},r.id))]})]})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Le,{k:"captureProvider",label:t("captureProvider")}),(0,e.jsx)(Le,{k:"captureModel",label:t("captureModel")})]}),(0,e.jsx)(Ze,{k:"captureFollowSession",label:t("captureFollowSession")}),(0,e.jsx)(Ze,{k:"captureFirstOnly",label:t("captureFirstOnly")}),(0,e.jsx)(Le,{k:"sessionBudgetChars",label:t("sessionBudgetChars"),type:"number"}),(0,e.jsx)("div",{style:{display:"flex",alignItems:"flex-end"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!_,onClick:async()=>{G("llmtest");try{let r=await fetch($+"/llm-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:N.captureProvider||"",model:N.captureModel||"",firstOnly:N.captureFirstOnly===!0})}).then(H=>H.json());r&&r.ok?ae(t("llmTestOk")+"\uFF1A"+r.route.provider+(r.route.model?"/"+r.route.model:"")+" \xB7 "+r.ms+"ms \xB7 "+t("llmCandidates")+" "+r.candidates):ae(t("llmTestFail")+"\uFF1A"+(r&&(r.failure?r.failure.code+" "+r.failure.message:r.error)||"?"),!1)}catch(r){ae(t("llmTestFail")+"\uFF1A"+String(r&&r.message||r),!1)}finally{G("")}},children:_==="llmtest"?t("exporting"):"\u{1F50C} "+t("llmTest")})})]})}),(0,e.jsx)(Mt,{icon:"\u{1F6E1}\uFE0F",title:t("auditConfig"),sub:t("auditHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("auditMode")}),(0,e.jsxs)("select",{value:N.auditMode??"all",onChange:r=>ve("auditMode",r.target.value),children:[(0,e.jsx)("option",{value:"all",children:t("auditAll")}),(0,e.jsx)("option",{value:"none",children:t("auditNone")})]})]}),(0,e.jsx)(Ca,{label:t("auditExemptAgents"),value:N.auditExemptAgents||[],options:[{value:"__all__",label:t("allExempt")},...(q?.agents||[]).filter(r=>!r.isDsh).map(r=>({value:r.name,label:r.name}))],onChange:r=>ve("auditExemptAgents",r)}),(0,e.jsx)(Ca,{label:t("auditExemptKinds"),value:N.auditExemptKinds||[],options:[{value:"__all__",label:t("allExempt")},...ra.filter(r=>r!=="all").map(r=>({value:r,label:t($e[r])}))],onChange:r=>ve("auditExemptKinds",r)}),(0,e.jsx)(Le,{k:"recycleRetentionDays",label:t("recycleDays"),hint:t("unitDays"),type:"number"})]})}),(0,e.jsx)(Mt,{icon:"\u{1F6E0}",title:t("serviceConfig"),sub:t("cfgSubService"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Ze,{k:"autoWeb",label:t("autoWeb")}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("autoWebMode")}),(0,e.jsxs)("select",{value:N.autoWebMode??"init",onChange:r=>ve("autoWebMode",r.target.value),children:[(0,e.jsx)("option",{value:"init",children:t("modeInit")}),(0,e.jsx)("option",{value:"interval",children:t("modeInterval")}),(0,e.jsx)("option",{value:"manual",children:t("modeManual")})]})]}),(0,e.jsx)(Le,{k:"webPort",label:t("webPort"),type:"number"}),(0,e.jsx)(Le,{k:"webCheckIntervalMs",label:t("webCheckIntervalMs"),type:"number"}),(0,e.jsx)(Le,{k:"webMaxRestart",label:t("webMaxRestart"),hint:t("unitTimes"),type:"number"}),(0,e.jsx)(Ze,{k:"watchdogAutoSpawn",label:t("watchdogAutoSpawn")}),(0,e.jsx)(Ze,{k:"autoRestartOnDrift",label:t("autoRestartOnDrift")}),(0,e.jsx)(Ze,{k:"autoMcpSetup",label:t("autoMcpSetup")})]})}),(0,e.jsxs)("div",{className:"mc-cfg-actions",children:[p?(0,e.jsx)("span",{className:"mc-cfg-dirty",children:t("cfgDirty")}):(0,e.jsxs)("span",{className:"mc-cfg-clean",children:["\u2713 ",t("cfgClean")]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),_==="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,opacity:.75},children:["\u23F3 ",t("saving")]}),xe&&_!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#10b981"},children:["\u2705 ",xe]}),ge&&_!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#b91c1c"},children:["\u26A0 ",ge]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:At,disabled:!!_,children:t("reset")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:h?()=>ae(t("readonlyTitle")+"\uFF1A"+t("readonlyBody"),!1):nt,disabled:_==="save",title:t(h?"readonlyBody":"saveConfig"),children:_==="save"?"\u23F3 "+t("saving"):h?"\u{1F512} "+t("readonlyBtn"):"\u{1F4BE} "+t("saveConfig")})]})]}):(0,e.jsx)("div",{style:{fontSize:12,opacity:.6},children:t("loading")})]})]})})}function yn({t,onReload:a,version:i}){let[g,d]=(0,n.useState)([]),[s,v]=(0,n.useState)([]),[w,y]=(0,n.useState)("all"),[F,N]=(0,n.useState)("all"),[k,h]=(0,n.useState)(""),[T,B]=(0,n.useState)(new Set),[E,z]=(0,n.useState)(null),[D,R]=(0,n.useState)(""),[de,ie]=(0,n.useState)(null),[q,re]=(0,n.useState)("pending"),ge=(p,j=!0)=>{ie({msg:p,ok:j}),setTimeout(()=>ie(null),3e3)},U=[...new Set([...g,...s].map(p=>p.submittedBy).filter(Boolean))],_=(0,n.useCallback)(async()=>{try{let p=await fetch(`${$}/audit/list`).then(j=>j.json());p.ok&&(d(p.pending||[]),v(p.rejected||[]),B(new Set),m({}))}catch{}},[]);(0,n.useEffect)(()=>{_()},[i,_]);let G=(q==="pending"?g:s).filter(p=>{if(w!=="all"&&p.kind!==w||F!=="all"&&Tt(p.submittedBy)!==F)return!1;if(k){let j=(p.created||"").slice(0,10);if(j&&j!==k)return!1}return!0}),xe=(0,n.useMemo)(()=>{let p=q==="pending"?g:s,j={all:0};return p.forEach(J=>{if(!(F!=="all"&&Tt(J.submittedBy)!==F)){if(k){let ke=(J.created||"").slice(0,10);if(ke&&ke!==k)return}j.all++,j[J.kind||"other"]=(j[J.kind||"other"]||0)+1}}),j},[g,s,q,F,k]),Ue=p=>B(j=>{let J=new Set(j);return J.has(p)?J.delete(p):J.add(p),J}),X=async(p,j,J={})=>{let ke=j||[...T];if(!ke.length){ge(t("noSelection"),!1);return}R("apply");let le=p==="approved"?J.kind==="core"?t("approveCore"):t("toastApproved"):t(p==="rejected"?"toastRejected":"toastCardDeleted");try{let fe=0;for(let ae of ke){let Xe=p==="approved"?"audit/approve":p==="rejected"?"audit/reject":"delete";try{let l=p==="approved"&&J.kind?{path:ae,kind:J.kind}:null;(await fetch($+"/"+Xe+(l?"":"?path="+encodeURIComponent(ae)+(p==="delete"?"&permanent=0":"")),l?{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}:void 0)).ok||fe++}catch{fe++}}await _(),a&&a(),fe?ge(t("toastFailed")+"\uFF08"+fe+"/"+ke.length+"\uFF09",!1):ge(le+" "+ke.length+" \u5F20")}catch(fe){ge(t("toastFailed")+": "+String(fe&&fe.message||fe),!1)}finally{R("")}},[je,m]=(0,n.useState)({}),Pe=p=>je[p]||{},ce=[...T],ee=G.find(p=>p.path===E)||G[0]||null,Ce=ee?Pe(ee.path):{};(0,n.useEffect)(()=>{let p=ee;if(!p||je[p.path])return;let j=!0,J=p.path;m(le=>({...le,[J]:{loading:!0}}));let ke=p.status||(q==="pending"?"pending":"rejected");return fetch(`${$}/card?path=${encodeURIComponent(J)}&status=${ke}`).then(le=>le.json()).then(le=>{j&&(le&&le.ok?m(fe=>({...fe,[J]:{text:le.text||""}})):m(fe=>({...fe,[J]:{error:le&&le.error||"HTTP"}})))}).catch(le=>{j&&m(fe=>({...fe,[J]:{error:String(le&&le.message||le)}}))}),()=>{j=!1}},[ee&&ee.path,q]);let pe=async()=>{if(window.confirm(t("reclassify")+"\uFF1F\u53EA\u5904\u7406\u81EA\u52A8\u6C89\u6DC0\u7684\u5F85\u5BA1\u539F\u6587\u5361\uFF0C\u4E0D\u6539\u4EBA\u5DE5\u5361\u3002")){R("reclassify");try{let p=await fetch($+"/reclassify").then(j=>j.json());p&&p.ok?ge(t("reclassify")+"\uFF1A"+p.changed+" / "+p.scanned):ge(t("toastFailed")+": "+(p&&p.error||"HTTP"),!1),await _(),a&&a()}catch(p){ge(t("toastFailed")+": "+String(p&&p.message||p),!1)}finally{R("")}}},ze=()=>B(new Set),Ae=p=>{re(p),ze()},M=["all",...ra.filter(p=>p!=="all")];return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:qe}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(za,{toast:de}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-audithead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"REVIEW INBOX"}),(0,e.jsx)("h1",{children:t("tabAudit")}),(0,e.jsx)("p",{children:t("auditInboxSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[g.length," \u5F20"]}),(0,e.jsxs)("span",{className:"mc-v5-audit-trust",children:["\u{1F6E1} ",t("auditUndo")]})]}),(0,e.jsxs)("div",{className:"me-audit",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-filtercard",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{className:"me-audit-filter-row",children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F6E1}\uFE0F ",t("tabAudit")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("select",{value:F,onChange:p=>{N(p.target.value),ze()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allAgents")}),Ra(U).map(p=>(0,e.jsx)("option",{value:p,children:p},p))]}),(0,e.jsx)("input",{type:"date",value:k,onChange:p=>{h(p.target.value),ze()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"}})]}),(0,e.jsxs)("div",{className:"me-audit-types-top",children:[(0,e.jsx)("span",{className:"me-audit-types-label",children:t("auditTypeLabel")}),M.map(p=>{let j=p==="all"?"var(--dsw-alias-label-secondary, #9ca3af)":Ve[p]||"#6B7280";return(0,e.jsxs)("button",{type:"button",className:`me-audit-kind${w===p?" active":""}`,onClick:()=>{y(p),ze()},children:[(0,e.jsx)("span",{className:"me-audit-kind-dot",style:{background:j}}),(0,e.jsx)("span",{className:"me-audit-kind-name",children:t(p==="all"?"all":$e[p])}),(0,e.jsx)("span",{className:"me-audit-kind-count",children:xe[p]||0})]},p)})]})]}),(0,e.jsxs)("div",{className:"me-audit-main",children:[(0,e.jsxs)("div",{className:"me-audit-queue",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("button",{type:"button",className:`mc-btn${q==="pending"?" me-on":""}`,onClick:()=>Ae("pending"),children:[t("pending"),"\uFF08",g.length,"\uFF09"]}),(0,e.jsxs)("button",{type:"button",className:`mc-btn${q==="rejected"?" me-on":""}`,onClick:()=>Ae("rejected"),children:[t("rejected"),"\uFF08",s.length,"\uFF09"]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("label",{style:{fontSize:12},children:[(0,e.jsx)("input",{type:"checkbox",checked:G.length>0&&ce.length===G.length,onChange:p=>{p.target.checked?B(new Set(G.map(j=>j.path))):B(new Set)}})," ",t("selectAll"),"\uFF08",G.length,"\uFF09"]}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.65},children:[t("auditSelected")," ",ce.length]}),q==="pending"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!D,onClick:pe,children:["\u{1F527} ",t("reclassify")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!ce.length||!!D,onClick:()=>X("approved"),children:["\u2713 ",t(q==="rejected"?"restore":"approve")]}),q==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!ce.length||!!D,onClick:()=>X("rejected"),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!ce.length||!!D,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&X("delete")},children:["\u{1F5D1} ",t("restoreDelete")]}),ce.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ze,children:t("auditClearSelection")})]}),G.length?(0,e.jsx)("div",{className:"mc-card",style:{display:"flex",flexDirection:"column"},children:G.map(p=>{let j=Ve[p.kind]||"#6B7280";return(0,e.jsx)("div",{className:`me-audit-row${p.kind==="core"?" core":""}${ee&&ee.path===p.path?" active":""}`,children:(0,e.jsxs)("div",{className:"me-audit-row-main",onClick:()=>z(p.path),children:[(0,e.jsx)("input",{type:"checkbox",checked:T.has(p.path),onClick:J=>J.stopPropagation(),onChange:()=>Ue(p.path)}),(0,e.jsx)("span",{className:"me-audit-row-tile",style:{color:j,borderColor:j+"38",background:j+"18"},children:Rt[p.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"me-audit-row-copy",children:[(0,e.jsxs)("div",{className:"me-audit-row-top",children:[(0,e.jsx)("span",{className:`me-audit-row-kind${p.kind==="core"?" core":""}`,children:p.kind==="core"?"\u2B50 "+t("kindCore"):t($e[p.kind]||"kindKnowledge")}),(0,e.jsx)("span",{className:`me-audit-row-state ${q==="pending"?"pending":"rejected"}`,children:q==="pending"?"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"me-audit-row-time",children:p.created?p.created.slice(0,16).replace("T"," "):"-"})]}),(0,e.jsx)("button",{type:"button",className:"me-audit-row-title",title:p.title,onClick:()=>z(p.path),children:p.title}),(p.reason||p.summary)&&(0,e.jsx)("p",{className:"me-audit-row-reason",children:p.reason||p.summary}),(0,e.jsxs)("div",{className:"me-audit-row-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",Tt(p.submittedBy)]}),(Array.isArray(p.tags)?p.tags:[]).slice(0,3).map(J=>(0,e.jsxs)("span",{children:["#",J]},J))]})]}),(0,e.jsx)("div",{className:"me-audit-row-actions",onClick:J=>J.stopPropagation(),children:q==="pending"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>X("approved",[p.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},onClick:()=>X("rejected",[p.path]),children:"\u2715"})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},title:t("restore"),onClick:()=>X("approved",[p.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},title:t("restoreDelete"),onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&X("delete",[p.path])},children:"\u{1F5D1}"})]})})]})},p.path)})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:20,textAlign:"center"},children:t("noAuditItems")})]}),(0,e.jsx)("aside",{className:"me-audit-preview",children:ee?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"me-audit-preview-head",children:[(0,e.jsxs)("div",{className:"me-audit-preview-top",children:[(0,e.jsxs)("span",{className:"me-audit-kind-badge",style:{color:Ve[ee.kind]||"#6B7280",borderColor:(Ve[ee.kind]||"#6B7280")+"59",background:(Ve[ee.kind]||"#6B7280")+"1a"},children:[Rt[ee.kind]||"\u{1F4CE}"," ",t($e[ee.kind]||"kindKnowledge")]}),(0,e.jsx)("span",{className:`md-chip ${q==="pending"?"md-chip-st-warn":"md-chip-st-bad"}`,children:q==="pending"?ee.kind==="core"?"\u2B50 "+t("coreSuggested"):"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.55},children:ee.created?ee.created.slice(0,16).replace("T"," "):""})]}),(0,e.jsx)("h3",{children:ee.title}),(0,e.jsxs)("div",{className:"me-audit-preview-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",Tt(ee.submittedBy)]}),!!ee.reason&&(0,e.jsxs)("span",{className:"me-audit-preview-reason",children:["\u2691 ",ee.reason]}),(Array.isArray(ee.tags)?ee.tags:[]).slice(0,5).map(p=>(0,e.jsxs)("span",{children:["#",p]},p))]})]}),(0,e.jsxs)("div",{className:"me-audit-preview-body",children:[Ce.loading&&(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t("loading")}),Ce.error&&(0,e.jsxs)("div",{className:"me-audit-preview-empty",style:{color:"#f87171"},children:["\u26A0 ",t("auditBodyFail"),"\uFF1A",Ce.error]}),Ce.text!=null?(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:Zt(Aa(Kt(Ce.text).body,ee.title))}}):!Ce.loading&&(0,e.jsx)("p",{className:"me-audit-preview-summary",children:ee.summary||""})]}),(0,e.jsxs)("div",{className:"me-audit-preview-actions",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!!D,onClick:()=>X("approved",[ee.path]),children:["\u2713 ",q==="rejected"?t("restore"):ee.kind==="core"?t("approveCore"):t("approve")]}),q==="pending"&&ee.kind!=="core"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn me-core-btn",disabled:!!D,onClick:()=>X("approved",[ee.path],{kind:"core"}),children:["\u2B50 ",t("approveAndCore")]}),q==="pending"&&ee.kind==="core"&&(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!D,onClick:()=>X("approved",[ee.path],{kind:"knowledge"}),children:t("approveAsNormal")}),q==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!D,onClick:()=>X("rejected",[ee.path]),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!D,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&X("delete",[ee.path])},children:["\u{1F5D1} ",t("restoreDelete")]})]})]}):(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t("noAuditItems")})})]})]})]})]})}function vn({t,onReload:a,version:i}){let[g,d]=(0,n.useState)([]),[s,v]=(0,n.useState)(""),[w,y]=(0,n.useState)(null),F=(h,T=!0)=>{y({msg:h,ok:T}),setTimeout(()=>y(null),3200)},N=(0,n.useCallback)(async()=>{try{let h=await fetch(`${$}/recycle/list`).then(T=>T.json());h.ok&&d(h.items||[])}catch{}},[]);(0,n.useEffect)(()=>{N()},[i,N]);let k=async(h,T)=>{let B=(g.find(E=>E.path===T)||{}).title||T;v(h+T);try{let z=await fetch($+(h==="restore"?"/recycle/restore":"/recycle/purge")+"?path="+encodeURIComponent(T)),D=await z.json().catch(()=>null);await N(),a&&a(),z.ok&&(!D||D.ok!==!1)?F(t(h==="restore"?"toastRestored":"toastPurged")+"\uFF1A"+B):F(t("toastFailed")+"\uFF1A"+(D&&D.error||"HTTP "+z.status),!1)}catch(E){F(t("toastFailed")+"\uFF1A"+String(E&&E.message||E),!1)}finally{v("")}};return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:qe}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(za,{toast:w}),(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"RECYCLE CENTER"}),(0,e.jsx)("h1",{children:t("tabRecycle")}),(0,e.jsx)("p",{children:t("recyclePageSub")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:g.length}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!s||g.length===0,title:g.length?"":t("emptyRecycle"),onClick:async()=>{v("purgeAll");try{let h=await fetch($+"/recycle/purge-expired?days=0"),T=await h.json().catch(()=>null);await N(),F(h.ok?t("toastPurgedExpired")+(T&&T.purged!=null?"\uFF08"+T.purged+"\uFF09":""):t("toastFailed"),h.ok)}catch(h){F(t("toastFailed")+"\uFF1A"+String(h&&h.message||h),!1)}finally{v("")}},children:["\u{1F5D1} ",t("emptyRecycle")]})]}),(0,e.jsx)("div",{className:"mc-v5-recycle-hint",children:t("recycleHint")}),g.length?(0,e.jsx)("div",{className:"mc-card mc-v5-recycle",children:g.map(h=>{let T=Ve[h.kind]||"#6B7280";return(0,e.jsxs)("div",{className:"mc-v5-recycle-row",children:[(0,e.jsx)("span",{className:"mc-v5-recycle-tile",style:{color:T,background:T+"18",borderColor:T+"38"},children:Rt[h.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"mc-v5-recycle-copy",children:[(0,e.jsx)("b",{children:h.title}),(0,e.jsxs)("span",{children:[t($e[h.kind]||"kindKnowledge")," \xB7 ",t("deletedAt")," ",(h.deletedAt||"").slice(0,10)]})]}),(0,e.jsxs)("div",{className:"mc-v5-recycle-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!s,onClick:()=>k("restore",h.path),children:t("restore")}),(0,e.jsx)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!s,onClick:()=>{window.confirm(t("purgeConfirm"))&&k("purge",h.path)},children:t("purge")})]})]},h.path)})}):(0,e.jsxs)("div",{className:"mc-card mc-v5-empty-state",children:["\u{1F5D1}\uFE0F ",(0,e.jsx)("b",{children:t("emptyRecycle")}),(0,e.jsx)("span",{children:t("recycleEmptyHint").split("{days}").join("30")})]})]})]})}var Aa=(t,a)=>{let i=String(t||"").split(/\r?\n/),g=s=>String(s||"").replace(/[#*_`]/g,"").replace(/[\s::\-–—·]/g,"").trim(),d=g(a);for(;;){let s=0;for(;s<i.length&&!i[s].trim();)s++;let v=/^#{1,2}\s+(.+?)\s*$/.exec(i[s]||"");if(!v||g(v[1])!==d)break;for(i.splice(s,1);s<i.length&&!i[s].trim();)i.splice(s,1)}return i.join(`
832
- `)},xn=t=>{let a=[],i=!1,g=0;for(let d of String(t||"").split(/\r?\n/)){let s=d.trim();if(/^```/.test(s)){i=!i;continue}if(i)continue;let v=/^(#{1,6})\s+(.+)$/.exec(s);if(!v)continue;g++;let w=v[1].length;w<=3&&a.push({id:"md-h-"+g,level:w,text:v[2].replace(/[#*_`>\[\]()]/g,"").replace(/\s+/g," ").trim()})}return a},la=t=>{let a=String(t.summary||"").replace(/[#>*_`]/g," ").replace(/\s+/g," ").trim();return a.length>150?a.slice(0,148)+"\u2026":a},La=t=>{let a=String(t.summary||"").toLowerCase();return/决策|结论|决定|decision/.test(a)?"insightDecision":/根因|原因|root cause/.test(a)?"insightRoot":/教训|避免|lesson/.test(a)?"insightLesson":"insightSummary"},Ia=({n:t=0,color:a="#ff9a72",size:i=30})=>{let g=Math.max(2,Math.min(6,Number(t)||2)),d=Array.from({length:g},(s,v)=>{let w=-Math.PI/2+v*Math.PI*2/g,y=v%2?13:16;return[20+Math.cos(w)*y,20+Math.sin(w)*y]});return(0,e.jsxs)("svg",{className:"mc-v5-mini",width:i,height:i,viewBox:"0 0 40 40","aria-hidden":"true",children:[d.map(([s,v],w)=>(0,e.jsx)("line",{x1:"20",y1:"20",x2:s,y2:v,stroke:a,strokeOpacity:".35"},"l"+w)),d.map(([s,v],w)=>(0,e.jsx)("circle",{cx:s,cy:v,r:w%2?2.2:1.8,fill:a,fillOpacity:w%2?.8:.55},"c"+w)),(0,e.jsx)("circle",{cx:"20",cy:"20",r:"2.6",fill:a})]})},wn=({card:t,t:a,onOpen:i,query:g,onDelete:d,onTagClick:s,pinned:v,onPin:w,onCore:y,links:F})=>{let N=Ve[t.kind]||Ve.other,k=Number(F??t.links??t.weight??0),h=ea(t);return(0,e.jsxs)("article",{className:`mc-cardrow mc-card mc-v5-card${v?" pinned":""}${t.kind==="core"?" core":""}`,onClick:()=>i(t),children:[(0,e.jsxs)("div",{className:"mc-v5-card-top",children:[(0,e.jsx)("span",{className:"mc-v5-card-tile",style:{color:N,background:N+"18",borderColor:N+"38"},children:Rt[t.kind]||"\u{1F4CE}"}),(0,e.jsx)("span",{className:"mc-v5-card-kind-name",children:t.kind==="core"?"\u2B50 "+a("kindCore"):a($e[t.kind]||"kindKnowledge")}),t.kind==="core"&&(0,e.jsxs)("span",{className:"mc-v5-core-badge",children:["\u2B50 ",a("kindCore")]}),t.status==="pending"&&(0,e.jsxs)("span",{className:"mc-v5-card-status pending",children:["\u23F3 ",a("statusPending")]}),t.status==="rejected"&&(0,e.jsxs)("span",{className:"mc-v5-card-status rejected",children:["\u26D4 ",a("statusRejected")]}),An(t.updated)&&(0,e.jsx)("span",{className:"mc-new",children:a("newBadge")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{className:"mc-v5-card-time",children:wt(t.updated)}),y&&t.status!=="pending"&&t.status!=="rejected"&&(0,e.jsx)("button",{type:"button",className:`mc-v5-core${t.kind==="core"?" on":""}`,title:a(t.kind==="core"?"unsetCore":"setCore"),onClick:T=>{T.stopPropagation(),y(t.path,t.kind==="core"?"knowledge":"core")},children:t.kind==="core"?"\u2B50 "+a("coreShort"):"\u2606 "+a("setCoreShort")}),w&&(0,e.jsx)("button",{type:"button",className:`mc-v5-pin${v?" on":""}`,title:a(v?"unpinCard":"pinCard"),"aria-label":a(v?"unpinCard":"pinCard"),onClick:T=>{T.stopPropagation(),w(t.path)},children:"\u{1F4CC}"})]}),(0,e.jsx)("h4",{className:"mc-v5-card-title",children:g?aa(t.title,g):t.title}),(0,e.jsxs)("div",{className:"mc-v5-card-insight",children:[(0,e.jsx)("span",{className:"mc-v5-insight-k",children:a(La(t))}),(0,e.jsx)("span",{className:"mc-v5-card-lead",children:g?aa(t.summary||"",g):la(t)})]}),g&&(()=>{let T=ua(t.body||"",g);return T?(0,e.jsx)("p",{className:"mc-snippet",children:aa(T,g)}):null})(),ea(t).length>0&&(0,e.jsxs)("div",{className:"mc-tags mc-v5-card-tags",children:[ea(t).slice(0,2).map(T=>(0,e.jsxs)("button",{type:"button",className:"mc-tag mc-tag-click",title:T,onClick:B=>{B.stopPropagation(),s&&s(T)},children:["#",T]},T)),h.length>2&&(0,e.jsxs)("span",{className:"mc-tag more",children:["+",h.length-2]})]}),(0,e.jsxs)("footer",{className:"mc-v5-card-foot",children:[k>0&&(0,e.jsxs)("span",{className:"mc-v5-conn",children:[(0,e.jsx)(Ia,{n:k,color:N})," ",(0,e.jsx)("b",{children:k})," ",a("links")]}),(0,e.jsxs)("span",{className:"mc-v5-author",children:["\u{1F916} ",Tt(t.submittedBy)]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-card-del",title:a("delete"),onClick:T=>{T.stopPropagation(),window.confirm(a("deleteConfirm"))&&d&&d(t.path)},children:"\u{1F5D1}"})]})]})};function kn({t,tab:a,onReload:i,version:g}){let[d,s]=(0,n.useState)(null),[v,w]=(0,n.useState)(""),[y,F]=(0,n.useState)(null),[N,k]=(0,n.useState)(null),[h,T]=(0,n.useState)(null),[B,E]=(0,n.useState)(null),[z,D]=(0,n.useState)(null),[R,de]=(0,n.useState)(null),ie=(0,n.useCallback)(async()=>{_("align");try{let l=await fetch($+"/align").then(L=>L.json());l&&l.findings?de(l):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{_("")}},[t]),q=async()=>{if(window.confirm(t("alignFixConfirm"))){_("alignfix");try{let l=await fetch($+"/setup-run",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}).then(L=>L.json());l&&l.ok?(notify(t("alignFixed")),await ie()):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{_("")}}},[re,ge]=(0,n.useState)([]),[U,_]=(0,n.useState)(""),[G,xe]=(0,n.useState)(!1),Ue=(0,n.useCallback)(async()=>{if(!(!y||!y.merge||!y.merge.length)&&window.confirm(t("mergeAllConfirm"))){_("merge");try{let l={},L=Z=>l[Z]===void 0?Z:l[Z]=L(l[Z]),P=(Z,De)=>{l[L(Z)]=L(De)},te=new Set;for(let Z of y.merge)te.add(Z.a.path),te.add(Z.b.path),P(Z.a.path,Z.b.path);let Ne={};for(let Z of te){let De=L(Z);(Ne[De]=Ne[De]||[]).push(Z)}let be=0;for(let Z of Object.values(Ne)){if(Z.length<2)continue;(await fetch(`${$}/merge?paths=${encodeURIComponent(Z.join(","))}`).then(Me=>Me.json())).ok&&be++}await X(),i&&i()}catch{}_("")}},[y,X,i,t]);async function X(){try{let l=await Promise.all([fetch(`${$}/stats`),fetch(`${$}/budget`),fetch(`${$}/capture-log`),fetch(`${$}/cards?status=all&limit=30&agent=${Ot}`),fetch(`${$}/overview`),fetch(`${$}/ledger?days=7`)]),[L,P,te,Ne,be,Z]=await Promise.all(l.map(De=>De.json()));L&&L.ok&&s(L),P&&P.ok&&k(P),te&&te.ok&&T(te),Ne&&Ne.ok&&ge(Ne.cards||[]),be&&be.ok&&E({db:be.db,backups:be.backups,total:be.total,version:be.version,degraded:be.degraded===!0}),D(Z&&Z.ok?Z:{ok:!1,error:Z&&Z.error||""}),w(!L||!L.ok?t("adminLoadFail"):"")}catch{w(t("adminLoadFail"))}}let je=(0,n.useCallback)(async()=>{_("scan");try{let l=await fetch(`${$}/optimize`).then(L=>L.json());l.ok&&F(l)}catch{w(t("adminLoadFail"))}finally{_("")}},[t]),[m,Pe]=(0,n.useState)(null),ce=(0,n.useCallback)(async()=>{_("refine");try{let l=await fetch(`${$}/refine-scan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:8})}).then(L=>L.json());l&&l.ok?Pe(l):notify(l&&l.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{_("")}},[t]),ee=async(l,L)=>{if(!(L==="merge"&&!window.confirm(t("mergeConfirm")))){_("refineapply");try{let P=await fetch(`${$}/refine-apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({a:l.a.path,b:l.b.path,action:L,relation:l.relation})}).then(te=>te.json());P&&P.ok?(notify(t("refineApplied")),Pe(te=>te&&{...te,findings:(te.findings||[]).filter(Ne=>!(Ne.a.path===l.a.path&&Ne.b.path===l.b.path))}),await X(),i&&i()):notify(P&&P.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{_("")}}},[Ce,pe]=(0,n.useState)(null),ze=(0,n.useCallback)(async()=>{_("junk");try{let l=await fetch(`${$}/refine-junk`).then(L=>L.json());l&&l.ok?pe(l.items||[]):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{_("")}},[t]),Ae=async l=>{if(l.length&&window.confirm(t("junkRecycleAllConfirm"))){_("junkpurge");try{let L=await fetch(`${$}/refine-junk-purge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:l})}).then(P=>P.json());L&&L.removed?(notify(t("junkDone")+"\uFF1A"+L.removed.length+(L.failed?.length?"\uFF08\u5931\u8D25 "+L.failed.length+"\uFF09":"")),pe(P=>P&&P.filter(te=>!L.removed.includes(te.path))),await X(),i&&i()):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{_("")}}},[M,p]=(0,n.useState)(null),j=(0,n.useCallback)(async()=>{_("goals");try{let l=await fetch($+"/refine-goals",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:30})}).then(L=>L.json());l&&l.ok?p(l):notify(l&&l.error||t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{_("")}},[t]),J=async l=>{_("goalskeep");try{let L=await fetch($+"/refine-goals-keep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:l.members.map(P=>P.path)})}).then(P=>P.json());L&&L.ok?(notify(t("goalDone")),p(P=>P&&{...P,clusters:(P.clusters||[]).filter(te=>te.goal!==l.goal)})):notify(t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{_("")}},ke=async l=>{if(window.confirm(t("mergeConfirm"))){_("goalsmerge");try{let L=await fetch($+"/merge?paths="+encodeURIComponent(l.members.map(P=>P.path).join(","))).then(P=>P.json());L&&L.ok?(notify(t("goalMerged")),p(P=>P&&{...P,clusters:(P.clusters||[]).filter(te=>te.goal!==l.goal)}),await X(),i&&i()):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{_("")}}};(0,n.useEffect)(()=>{X()},[g]);let le=async(l,L)=>{if(window.confirm(t("mergeConfirm")))try{(await fetch(`${$}/merge?paths=${encodeURIComponent(l+","+L)}`).then(te=>te.json())).ok&&(await X(),i&&i())}catch{}},fe=async l=>{if(window.confirm(t("deleteConfirm")))try{(await fetch(`${$}/delete?path=${encodeURIComponent(l)}`).then(P=>P.json())).ok&&(await X(),i&&i())}catch{}},ae=["project","knowledge","content","prompt","business","tool","mistake"],Xe=({title:l,kind:L,updated:P,path:te})=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:gt.colors[L]||"#666"}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:wt(P)}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>fe(te),children:[t("delete")," \u2715"]})]});return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:qe}),(0,e.jsxs)("div",{style:{overflow:"auto"},children:[v&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",v]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:X,children:["\u21BB ",t("retry")]})]}),a==="stats"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"SYSTEM STATUS"}),(0,e.jsx)("h1",{children:t("runtimeTitle")}),(0,e.jsx)("p",{children:t("runtimeSub")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:B?`${B.total||0} ${t("cardsUnit")}`:""}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>X(),children:["\u21BB ",t("refresh")]})]}),(0,e.jsxs)("div",{className:"mc-v5-statusgrid",children:[(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F5C4}\uFE0F"}),(0,e.jsx)("b",{children:B?B.total||0:"\u2014"}),(0,e.jsx)("span",{children:t("dbTitle")}),(0,e.jsx)("small",{children:B?.db?.journalMode||B?.db?.journal_mode||"SQLite"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F4BE}"}),(0,e.jsx)("b",{children:B?.backups?.count??"\u2014"}),(0,e.jsx)("span",{children:t("backupTitle")}),(0,e.jsx)("small",{children:B?.backups?.newestAt?`${Math.max(0,Math.floor((Date.now()-Number(B.backups.newestAt))/864e5))} \u5929\u524D`:"\u2014"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u2728"}),(0,e.jsx)("b",{children:h?.available?h.health?.ok?"\u6B63\u5E38":"\u5F02\u5E38":"\u2014"}),(0,e.jsx)("span",{children:t("captureTitle")}),(0,e.jsx)("small",{children:h?.health?.lastAt?wt(new Date(h.health.lastAt).toISOString()):"\u2014"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F3F7}\uFE0F"}),(0,e.jsx)("b",{children:B?.version||"\u2014"}),(0,e.jsx)("span",{children:t("versionTitle")}),(0,e.jsx)("small",{children:t("v5Local")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FA7A} ",t("healthTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("healthHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>X(),children:["\u21BB ",t("refresh")]})]}),B?(()=>{let l=B.db||{},L=l.writable!==!1&&!l.corrupt,P=B.backups||{count:0,newestAt:0},te=P.newestAt?Math.floor((Date.now()-Number(P.newestAt))/864e5):-1,Ne=P.count?te>7?"warn":"ok":"bad",be=h&&h.available?h.health:null,Z=be?be.ok?"ok":"warn":"none",De=R&&R.findings?R.onDisk&&R.residentServed===R.onDisk&&R.hostVersion===R.onDisk?"ok":"warn":"none",Me={ok:["\u2705","#10b981"],warn:["\u26A0","#f59e0b"],bad:["\u2717","#ef4444"],none:["\u2022","inherit"]},f=[{label:t("healthDb"),level:L?"ok":"bad",text:L?"journal="+(l.journalMode||"?")+(l.checkedAt?" \xB7 "+new Date(l.checkedAt).toLocaleString():""):(l.error||t("healthDbBad"))+" \u2192 dsh-memory doctor"},{label:t("healthBackups"),level:Ne,text:P.count?(te<=0?t("healthBackupToday").replace("{n}",String(P.count)):t("healthBackupAge").replace("{n}",String(P.count)).replace("{d}",String(te)))+(P.files&&P.files.length?" \xB7 "+P.files[P.files.length-1]:""):t("healthNoBackups")},{label:t("healthCapture"),level:Z,text:be?be.ok?t("healthCapOk"):t("healthCapFail")+"\uFF1A"+(be.reason||""):t("healthNoRecords")},{label:t("healthVersion"),level:De,text:De==="none"?t("healthRunAlign"):t("vcOnDisk")+" v"+(R.onDisk||"?")+" \xB7 "+t("vcResident")+" v"+(R.residentServed||"?")+" \xB7 "+t("vcLoaded")+" v"+(R.hostVersion||"?"),action:De==="none"?{label:t("alignRun"),run:ie}:null}];return(0,e.jsx)("div",{style:{marginTop:6},children:f.map(u=>(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontSize:12,padding:"3px 0",borderTop:"1px solid rgba(127,127,127,0.10)"},children:[(0,e.jsx)("span",{style:{width:14,flex:"0 0 auto",color:Me[u.level][1]},children:Me[u.level][0]}),(0,e.jsx)("b",{style:{minWidth:62,flex:"0 0 auto",opacity:.85},children:u.label}),(0,e.jsx)("span",{style:{opacity:.82,wordBreak:"break-word"},children:u.text}),u.action&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{marginLeft:6,padding:"0 6px",fontSize:11},disabled:!!U,onClick:u.action.run,children:u.action.label})]},u.label))})})():(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9FE} ",t("ledgerTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("ledgerHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>X(),children:["\u21BB ",t("refresh")]})]}),z?z.ok===!1?(0,e.jsxs)("div",{style:{color:"#f59e0b",fontSize:12,padding:"8px 0",lineHeight:1.7},children:["\u26A0 ",/未知接口|404|not found/i.test(String(z.error||""))?t("ledgerNeedRestart"):z.error||t("adminLoadFail")]}):z.totals.recalls+z.totals.captures===0?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("ledgerNoData")}):(0,e.jsxs)("div",{style:{marginTop:8},children:[(0,e.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:8},children:[{k:t("ledgerRecalls"),v:String(z.totals.recalls),s:t("ledgerInjected")+" "+Number(z.totals.injectedChars||0).toLocaleString()+" "+t("ledgerChars")},{k:t("ledgerCaptures"),v:String(z.totals.captures),s:t("ledgerLlmCalls")+" "+z.totals.llmCalls+(z.totals.captureFail?" \xB7 \u2717 "+z.totals.captureFail:"")},{k:t("ledgerEstimate"),v:"\u2248 "+Number(z.totals.estTokens||0).toLocaleString(),s:t("ledgerEstimateHint")},{k:t("ledgerUseful"),v:z.feedback.rate==null?"\u2014":Math.round(z.feedback.rate*100)+"%",s:t("ledgerUsefulHint")}].map(l=>(0,e.jsxs)("div",{style:{border:"1px solid rgba(127,127,127,.16)",borderRadius:10,padding:"8px 10px"},children:[(0,e.jsx)("div",{style:{fontSize:11,opacity:.6},children:l.k}),(0,e.jsx)("div",{style:{fontSize:18,fontWeight:700,lineHeight:1.35},children:l.v}),(0,e.jsx)("div",{style:{fontSize:10.5,opacity:.55,lineHeight:1.5},children:l.s})]},l.k))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:8,lineHeight:1.7},children:t("ledgerFormula")})]}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F527} ",t("alignTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!U,onClick:ie,children:t(U==="align"?"exporting":"alignRun")}),R&&R.counts&&R.counts.fix>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!U,onClick:q,children:t(U==="alignfix"?"exporting":"alignFix")}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("alignHint")})]}),R&&R.findings?(0,e.jsxs)("div",{style:{marginTop:6},children:[(0,e.jsxs)("div",{style:{fontSize:12,opacity:.75,marginBottom:4},children:[t("alignDisk")," v",R.onDisk||"?",R.residentServed?" \xB7 "+t("alignResident")+" v"+R.residentServed:"",R.hostVersion?" \xB7 "+t("alignHost")+" v"+R.hostVersion:""]}),(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:R.findings.map((l,L)=>(0,e.jsxs)("li",{style:{padding:"4px 2px",borderTop:L?"1px solid rgba(127,127,127,0.12)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:l.level==="fix"?"#ef4444":l.level==="warn"?"#f59e0b":"#10b981"},children:l.level==="fix"?"\u2717":l.level==="warn"?"\u26A0":"\u2713"})," ",(0,e.jsx)("span",{children:l.title}),l.detail?(0,e.jsx)("div",{style:{opacity:.75,marginLeft:14},children:l.detail}):null,l.command?(0,e.jsxs)("div",{style:{marginLeft:14,opacity:.9},children:["\u2192 ",(0,e.jsx)("code",{children:l.command})]}):null]},L))})]}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginTop:4},children:t("alignIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FAB5} ",t("captureLog")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("captureLogHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>X(),children:["\u21BB ",t("refresh")]})]}),h?h.available===!1?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogUnavailable")}):(h.entries||[]).length===0?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogEmpty")}):(0,e.jsx)("div",{style:{maxHeight:260,overflow:"auto",marginTop:8},children:(0,e.jsx)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:(0,e.jsx)("tbody",{children:(h.entries||[]).map((l,L)=>{let P=nn[l.action]||["\u2022","inherit"];return(0,e.jsxs)("tr",{style:{borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:wt(l.time?new Date(l.time).toISOString():"")}),(0,e.jsxs)("td",{style:{padding:"4px 6px",whiteSpace:"nowrap",color:P[1],fontWeight:600},children:[P[0]," ",l.action]}),(0,e.jsx)("td",{style:{padding:"4px 6px"},children:l.reason||""}),(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:l.preview||"",children:l.preview||""})]},L)})})})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:["\u{1F916} ",t("captureAgentCards"),"\uFF08",re.length,"\uFF09"]}),re.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:re.map(l=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:Ve[l.kind]||Ve.other}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l.title}),l.status==="pending"&&(0,e.jsxs)("span",{className:"mc-status",style:{background:"#f59e0b"},children:["\u23F3 ",t("statusPending")]}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:wt(l.updated)})]},l.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noCards")})]}),d&&(0,e.jsxs)(e.Fragment,{children:[d.trend&&d.trend.length>0&&(()=>{let l=d.trend,L=Math.max(...l.map(be=>be.count),1),P=260,te=50,Ne=P/l.length;return(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{fontSize:11,opacity:.6,marginBottom:4},children:["\u{1F4C8} ",t("trendLabel")]}),(0,e.jsx)("svg",{width:P,height:te,style:{display:"block",width:"100%",height:50},children:l.map((be,Z)=>{let De=Math.round(be.count/L*(te-4));return(0,e.jsx)("rect",{x:Z*Ne+1,y:te-De,width:Math.max(Ne-2,2),height:De,rx:1.5,fill:be.count>0?"var(--dsw-alias-accent, #3b82f6)":"var(--dsw-alias-border-l1, #e5e7eb)",opacity:be.count>0?.85:.35},be.date)})})]})})(),(0,e.jsxs)("div",{className:"mc-stats",children:[(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:d.total}),(0,e.jsx)("span",{children:t("total")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:d.today}),(0,e.jsx)("span",{children:t("todayAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:d.week}),(0,e.jsx)("span",{children:t("weekAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:d.tags}),(0,e.jsx)("span",{children:t("tags")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("byKind")}),(0,e.jsx)("div",{style:{display:"flex",gap:10,flexWrap:"wrap"},children:ae.map(l=>(0,e.jsxs)("span",{style:{fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:gt.colors[l]||"#666"}}),t($e[l]),": ",d.byKind?.[l]||0]},l))})]}),N&&(N.budgetChars||N.recallLimit||N.embedding)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,fontSize:12},children:[(0,e.jsx)("b",{children:t("budgetLabel")}),"\uFF1A",t("budgetChars")," ",(0,e.jsx)("b",{children:N.budgetChars||8e4})," \xB7 ",t("recallLimitLabel")," ",(0,e.jsx)("b",{children:N.recallLimit||5})," \xB7 ",t("embeddingLabel")," ",N.embedding?"ON":"OFF"]}),(0,e.jsxs)("div",{className:"mc-card",children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("todayList"),"\uFF08",d.todayCards?.length||0,"\uFF09"]}),d.todayCards?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:d.todayCards.map(l=>(0,e.jsx)(Xe,{title:l.title,kind:l.kind,updated:l.updated,path:l.path},l.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})]})]}),a==="optimize"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("organizeTitle")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!U,onClick:je,children:U==="scan"?t("exporting"):"\u{1F50D} "+t("scanAndOrganize")}),y&&y.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!U,onClick:async()=>{if(window.confirm(t("oneClickOptimizeConfirm"))){_("oneclick");try{let l=JSON.stringify({cleanupStale:G}),P=await(await fetch(`${$}/optimize-execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:l})).json();P&&P.ok?(notify(`${t("oneClickOptimizeDone")}\uFF1A${P.plan.merged} ${t("optimizedMerged")}${G?` \xB7 ${P.plan.staleDeleted} ${t("optimizedStaleDeleted")}`:""}`),await X(),i&&i(),F(null)):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{_("")}}},children:U==="oneclick"?t("exporting"):"\u26A1 "+t("oneClickOptimize")}),y&&y.merge?.length>0&&(0,e.jsxs)("label",{style:{fontSize:11,opacity:.7,display:"flex",alignItems:"center",gap:4},children:[(0,e.jsx)("input",{type:"checkbox",checked:G,onChange:l=>xe(l.target.checked)}),t("oneClickAlsoStale")]})]}),!y&&(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:10},children:t("scanHint")}),y&&(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("mergePairs")}),(0,e.jsx)("div",{className:"spacer",style:{flex:1}}),y.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!U,onClick:Ue,children:t(U==="merge"?"exporting":"batchMerge")})]}),(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("mergePairs")}),y.merge?.length?(0,e.jsx)("ul",{style:{margin:"0 0 12px",padding:0,listStyle:"none"},children:y.merge.map((l,L)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsxs)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[l.a.title," \u21C4 ",l.b.title]}),(0,e.jsxs)("span",{style:{opacity:.6},children:[Math.round(l.sim*100),"%"]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>le(l.a.path,l.b.path),children:t("mergeNow")})]},L))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:12},children:t("noOptimize")}),(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("staleCards"),"\uFF08",y.stale?.length||0,"\uFF09"]}),y.stale?.length>0&&(0,e.jsx)("div",{style:{marginBottom:6},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!U,onClick:async()=>{if(!window.confirm(t("deleteConfirm")))return;_("clean");let l=0;for(let L of y.stale)try{await fetch(`${$}/delete?path=${encodeURIComponent(L.path)}`),l++}catch{}_(""),notify(`${l} ${t("deletedStale")}`),await X(),i&&i()},children:t("cleanStale")})}),y.stale?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:y.stale.map(l=>(0,e.jsx)(Xe,{title:l.title,kind:"other",updated:l.updated,path:l.path},l.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9ED} ",t("refineTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!U,onClick:ce,children:t(U==="refine"?"exporting":"refineScan")}),(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("refineHint")})]}),m?.findings?.length?m.findings.map((l,L)=>(0,e.jsxs)("div",{style:{borderTop:L?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:3},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:l.relation==="conflict"?"#ef4444":l.relation==="duplicate"?"#f59e0b":"#10b981"},children:t("refineRel_"+l.relation)}),(0,e.jsxs)("span",{style:{opacity:.55},children:[" \xB7 sim ",l.sim," \xB7 ",l.useModel||""]}),l.conflict?(0,e.jsx)("span",{style:{marginLeft:6},children:l.conflict}):null]}),(0,e.jsxs)("div",{style:{fontSize:12,opacity:.85,marginBottom:5},children:["A\uFF1A",l.a.title,(0,e.jsx)("br",{}),"B\uFF1A",l.b.title]}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>ee(l,"keepA"),children:t("refineKeepA")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>ee(l,"keepB"),children:t("refineKeepB")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>ee(l,"keepBoth"),children:t("refineKeepBoth")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>ee(l,"merge"),children:t("refineMerge")})]})]},L)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(m?"refineNone":"refineIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9F9} ",t("junkTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!U,onClick:ze,children:t(U==="junk"?"exporting":"junkScan")}),Ce?.length?(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!U,onClick:()=>Ae(Ce.map(l=>l.path)),children:t(U==="junkpurge"?"exporting":"junkRecycleAll")}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("junkHint")})]}),Ce?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:Ce.map((l,L)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 2px",borderTop:L?"1px solid rgba(127,127,127,0.14)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:l.reasons.join("\uFF1B"),children:l.title||l.path}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:l.reasons[0]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>Ae([l.path]),children:t("junkRecycle")})]},L))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(Ce?"junkNone":"junkIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F3AF} ",t("goalTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!U,onClick:j,children:t(U==="goals"?"exporting":"goalScan")}),M?(0,e.jsxs)("span",{style:{opacity:.6,fontSize:11},children:[t("goalStats"),"\uFF1A",M.cached," / ",M.calls]}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("goalHint")})]}),M?.clusters?.length?M.clusters.map((l,L)=>(0,e.jsxs)("div",{style:{borderTop:L?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:4},children:[(0,e.jsx)("b",{children:l.goal})," ",(0,e.jsxs)("span",{style:{opacity:.55},children:["\xB7 ",l.members.length," ",t("goalCards")]})]}),(0,e.jsx)("ul",{style:{margin:"0 0 5px",padding:"0 0 0 16px",fontSize:12,opacity:.85},children:l.members.map((P,te)=>(0,e.jsx)("li",{children:P.title},te))}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>J(l),children:t("goalKeep")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!U,onClick:()=>ke(l),children:t("goalMerge")})]})]},L)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(M?"goalNone":"goalIdle")})]})]})]})]})}var ta=[{key:"decision",label:"tplDecision",kind:"knowledge",tagKey:"tplDecisionTags",bodyKey:"tplDecisionBody"},{key:"bug",label:"tplBug",kind:"mistake",tagKey:"tplBugTags",bodyKey:"tplBugBody"},{key:"meeting",label:"tplMeeting",kind:"content",tagKey:"tplMeetingTags",bodyKey:"tplMeetingBody"},{key:"weekly",label:"tplWeekly",kind:"content",tagKey:"tplWeeklyTags",bodyKey:"tplWeeklyBody"}];function Sn({t,newCard:a,setNewCard:i,onCreated:g}){if(!a)return null;let d=ta.find(k=>k.key===a.template),s=a.body||(d?t(d.bodyKey):""),v=a.kind||(d?d.kind:"knowledge"),w=a.tags||(d?t(d.tagKey):""),y=a._creating,F=k=>{let h=ta.find(T=>T.key===k);i(T=>({...T,template:k,kind:h?h.kind:T.kind,body:h?t(h.bodyKey):T.body,tags:h?t(h.tagKey):T.tags}))},N=async()=>{if(!(!a.title&&!s)){i(k=>({...k,_creating:!0}));try{(await fetch(`${$}/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a.title||t("untitled"),kind:v,tags:w.split(",").map(h=>h.trim()).filter(Boolean),body:s,source:"manual"})}).then(h=>h.json())).ok?(i(null),g&&g()):i(h=>({...h,_creating:!1}))}catch{i(h=>({...h,_creating:!1}))}}};return(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>i(null),children:[(0,e.jsx)("style",{children:qe}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:600,width:"92vw",maxHeight:"85vh"},onClick:k=>k.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:t("newCard")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>i(null),children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10,overflow:"auto"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[ta.map(k=>(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===k.key?" me-on":""}`,onClick:()=>F(k.key),children:t(k.label)},k.key)),(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===""?" me-on":""}`,onClick:()=>i(k=>({...k,template:"",body:"",tags:"",kind:"knowledge"})),children:t("tplBlank")})]}),(0,e.jsx)("select",{className:"mc-btn",value:v,onChange:k=>i(h=>({...h,kind:k.target.value})),style:{maxWidth:180,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:["project","knowledge","content","prompt","business","tool","mistake"].map(k=>(0,e.jsx)("option",{value:k,style:{background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:k},k))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("cardTitle"),value:a.title||"",onChange:k=>i(h=>({...h,title:k.target.value}))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("tagsHint"),value:w,onChange:k=>i(h=>({...h,tags:k.target.value}))}),(0,e.jsx)("textarea",{className:"mc-btn",placeholder:t("cardBody"),value:s,onChange:k=>i(h=>({...h,body:k.target.value})),style:{minHeight:180,resize:"vertical",fontFamily:"inherit"}}),(0,e.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:y,onClick:N,children:t(y?"exporting":"createCard")})})]})]})]})}async function ia(t){let a=String(t||"");if(!a)return!1;try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(a),!0}catch{}try{let i=document.createElement("textarea");i.value=a,i.setAttribute("readonly",""),i.style.position="fixed",i.style.left="-9999px",i.style.top="0",document.body.appendChild(i),i.focus(),i.select();let g=!!(document.execCommand&&document.execCommand("copy"));return document.body.removeChild(i),g}catch{return!1}}function Cn({t,onClose:a}){let[i,g]=(0,n.useState)(""),[d,s]=(0,n.useState)(""),[v,w]=(0,n.useState)(""),[y,F]=(0,n.useState)(!0),[N,k]=(0,n.useState)(!1),[h,T]=(0,n.useState)(""),[B,E]=(0,n.useState)(""),z=(0,n.useRef)(null),D=(0,n.useRef)(null),R=()=>{let G=z.current;if(G)try{G.focus(),G.select()}catch{}},de=G=>{T(G),D.current&&clearTimeout(D.current),D.current=setTimeout(()=>T(""),2400)};(0,n.useEffect)(()=>{let G=!0;return fetch($+"/diagnostics").then(xe=>xe.json()).then(xe=>{G&&(xe&&xe.ok?(s(String(xe.diagnostics||"")),w(String(xe.version||""))):k(!0))}).catch(()=>{G&&k(!0)}).finally(()=>{G&&F(!1)}),()=>{G=!1}},[]),(0,n.useEffect)(()=>{let G=xe=>{xe.key==="Escape"&&a()};return window.addEventListener("keydown",G),()=>{window.removeEventListener("keydown",G),D.current&&clearTimeout(D.current)}},[a]);let ie=(()=>{try{return String(navigator.language||"").toLowerCase().startsWith("en")?"en":"zh"}catch{return"zh"}})(),q=()=>{let G=i.trim().split(`
833
- `)[0]||"",xe=fa({title:"[Bug] "+(G.slice(0,60)||"memory-eternal \u95EE\u9898"),body:ba({description:i,diagnostics:d,version:v})});try{window.open(xe,"_blank","noopener")}catch{de(t("fbCopyFail"))}},re=async()=>{await ia(d)?(E(""),de(t("fbCopiedDiag"))):(E(d),de(t("fbCopyManual")))},ge=async()=>{let G=ha({lang:ie,description:i,diagnostics:d});await ia(G)?(E(""),de(t("fbCopiedPrompt"))):(E(G),de(t("fbCopyManual")))},U={width:"100%",resize:"vertical",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13},_={margin:0,maxHeight:170,overflow:"auto",fontSize:11.5,lineHeight:1.55,padding:"8px 10px",borderRadius:10,background:"var(--dsw-alias-bg-layer-1, rgba(127,127,127,0.08))",whiteSpace:"pre-wrap",wordBreak:"break-word",overflowX:"hidden"};return(0,e.jsxs)("div",{className:"me-overlay",onClick:a,children:[(0,e.jsx)("style",{children:qe}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:720},onClick:G=>G.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F41E} ",t("fbTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:a,children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10},children:[(0,e.jsx)("div",{style:{fontSize:12,opacity:.72,lineHeight:1.6},children:t("fbWhy")}),(0,e.jsx)("textarea",{value:i,onChange:G=>g(G.target.value),placeholder:t("fbDesc"),rows:5,style:U}),(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("fbDiag")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:re,disabled:!d,children:t("fbCopyDiag")})]}),(0,e.jsx)("pre",{style:_,children:y?t("fbLoading"):N?t("fbDiagFail"):d})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>{if(!i.trim()){de(t("fbNeedDesc"));return}q()},style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:["\u{1F680} ",t("fbOpenIssue")]}),(0,e.jsx)("span",{style:{opacity:.5,fontSize:12},children:t("fbOr")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:ge,children:["\u{1F916} ",t("fbCopyPrompt")]})]}),h&&(0,e.jsx)("div",{style:{fontSize:12,color:"var(--dsw-alias-brand-primary, #3b82f6)"},children:h}),B&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsxs)("b",{style:{fontSize:12,color:"#b45309"},children:["\u26A0 ",t("fbCopyFail")]}),(0,e.jsx)("span",{style:{fontSize:11.5,opacity:.75},children:t("fbCopyManual")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:R,children:t("fbSelectAll")})]}),(0,e.jsx)("textarea",{ref:z,readOnly:!0,value:B,rows:7,style:U})]})]})]})]})}function Nn({t,tab:a,onTab:i,onClose:g,onFeedback:d,onReplay:s}){let[v,w]=(0,n.useState)(null);(0,n.useEffect)(()=>{if(!v)return;let k=h=>{h.key==="Escape"&&w(null)};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[v]);let y=[{id:"group",label:t("supportGroup")},{id:"sponsor",label:t("supportSponsor")},{id:"legacy",label:t("supportLegacy")}],F="https://github.com/EternalNight996/memory-eternal/blob/main/README.md",N=(k,h)=>(0,e.jsxs)("figure",{children:[(0,e.jsx)("img",{src:k,alt:h,loading:"lazy",title:t("clickToZoom"),onClick:T=>w(T.currentTarget.currentSrc||k),onError:T=>{let B=T.currentTarget;B.dataset.fb||(B.dataset.fb="1",B.src="https://raw.githubusercontent.com/EternalNight996/memory-eternal/main/assets/support/"+String(k).split("/").pop())}}),(0,e.jsx)("figcaption",{children:h})]});return(0,e.jsxs)("div",{className:"me-overlay",onClick:g,children:[(0,e.jsx)("style",{children:qe}),(0,e.jsxs)("div",{className:"me-dialog me-support",onClick:k=>k.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F4AC} ",t("supportTitle")]}),(0,e.jsx)("div",{className:"me-head-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:g,children:t("close")})})]}),(0,e.jsx)("div",{className:"me-support-tabs",children:y.map(k=>(0,e.jsx)("button",{type:"button",className:`me-support-tab${a===k.id?" active":""}`,onClick:()=>i(k.id),children:k.label},k.id))}),(0,e.jsxs)("div",{className:"me-support-body",children:[a==="group"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportGroupHint")}),(0,e.jsx)("div",{className:"me-support-qr",children:N("support/group-qr.jpg",t("supportGroup"))}),(0,e.jsx)("p",{className:"me-support-note",style:{marginTop:12},children:(0,e.jsxs)("a",{className:"me-support-link",href:F,target:"_blank",rel:"noreferrer",children:[t("supportReadme")," \u2197"]})})]}),a==="sponsor"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportSponsorHint")}),(0,e.jsxs)("div",{className:"me-support-qr",children:[N("support/wechat-pay.jpg","\u5FAE\u4FE1\u6536\u6B3E\u7801"),N("support/wechat-reward.jpg","\u5FAE\u4FE1\u8D5E\u8D4F\u7801")]}),(0,e.jsxs)("p",{className:"me-support-note",style:{marginTop:12},children:["\u6253\u8D4F\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\uFF1B\u63D2\u4EF6\u672C\u4F53\u59CB\u7EC8\u5F00\u6E90\u514D\u8D39\uFF08MIT\uFF09\u3002",(0,e.jsx)("br",{}),(0,e.jsx)("a",{className:"me-support-link",href:"https://github.com/EternalNight996/memory-eternal/blob/main/SPONSOR.md",target:"_blank",rel:"noreferrer",children:"SPONSOR.md \u2197"})]})]}),a==="legacy"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h3",{style:{margin:"0 0 8px",fontSize:14},children:t("supportLegacyTitle")}),(0,e.jsx)("p",{className:"me-support-note",children:t("supportLegacyBody")}),(0,e.jsxs)("div",{className:"me-support-actions",children:[(0,e.jsxs)("a",{className:"mc-btn",href:F,target:"_blank",rel:"noreferrer",children:["\u{1F4D6} ",t("supportReadme")," \u2197"]}),(0,e.jsxs)("a",{className:"mc-btn",href:"https://github.com/EternalNight996/memory-eternal/releases",target:"_blank",rel:"noreferrer",children:["\u{1F3F7} ",t("supportReleases")," \u2197"]})]})]})]}),(0,e.jsxs)("div",{className:"me-support-actions",style:{padding:"0 18px 16px",marginTop:0},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:d,children:["\u{1F41E} ",t("supportFeedback")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:s,children:["\u2728 ",t("supportReplay")]})]})]}),v&&(0,e.jsxs)("div",{className:"me-lightbox",role:"dialog","aria-modal":"true","aria-label":t("close"),onClick:k=>{k.stopPropagation(),w(null)},children:[(0,e.jsx)("button",{type:"button",className:"me-lightbox-close",onClick:k=>{k.stopPropagation(),w(null)},"aria-label":t("close"),children:"\u2715"}),(0,e.jsx)("img",{src:v,alt:"",onClick:k=>k.stopPropagation()})]})]})}function Mn({t,onDone:a}){let[i,g]=(0,n.useState)(0),d="https://github.com/EternalNight996/memory-eternal",s=[{title:t("onboardStep0Title"),body:t("onboardStep0Body")},{title:t("onboardStep1Title"),body:t("onboardStep1Body")},{title:t("onboardStep2Title"),body:t("onboardStep2Body")},{title:t("onboardStep3Title"),body:t("onboardStep3Body")}],v=i===s.length-1;return(0,n.useEffect)(()=>{let w=y=>{y.key==="Escape"&&a()};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[a]),(0,e.jsxs)("div",{className:"me-overlay",style:{zIndex:1006},children:[(0,e.jsx)("style",{children:qe}),(0,e.jsxs)("div",{className:"me-dialog me-guide",children:[(0,e.jsxs)("div",{className:"me-guide-head",children:[(0,e.jsxs)("b",{children:["\u2728 ",t("onboardTitle")]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.55},children:t("onboardSub")})]}),(0,e.jsx)("div",{className:"me-guide-dots",children:s.map((w,y)=>(0,e.jsx)("span",{className:`me-guide-dot${y<=i?" on":""}`},y))}),(0,e.jsxs)("div",{className:"me-guide-body",children:[(0,e.jsx)("h3",{children:s[i].title}),(0,e.jsx)("p",{children:s[i].body}),i===0&&(0,e.jsxs)("div",{className:"me-guide-github",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>na(d),children:["\u2605 ",t("onboardStar")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>na(d+"/fork"),children:["\u2442 ",t("onboardFork")]}),(0,e.jsx)("span",{className:"me-guide-github-hint",children:t("onboardStarHint")})]}),i===1&&(0,e.jsxs)("div",{className:"me-guide-chips",children:[(0,e.jsx)("span",{children:"\u81EA\u52A8\u6C89\u6DC0"}),(0,e.jsx)("span",{children:"\u5148\u5BA1\u540E\u5165"}),(0,e.jsx)("span",{children:"\u53EA\u53EC\u56DE\u76F8\u5173\u5C0F\u5757"})]}),i===2&&(0,e.jsxs)("div",{className:"me-guide-like",children:[(0,e.jsx)("span",{className:"me-guide-thumb",children:"\u{1F44D}"})," \u6709\u7528"]}),i===3&&(0,e.jsxs)("div",{className:"me-guide-chips",children:[(0,e.jsxs)("span",{children:["\u{1F4AC} ",t("supportGroup")]}),(0,e.jsxs)("span",{children:["\u2615 ",t("supportSponsor")]}),(0,e.jsxs)("span",{children:["\u{1F9E9} ",t("supportLegacy")]}),(0,e.jsxs)("span",{children:["\u{1F41E} ",t("supportFeedback")]})]})]}),(0,e.jsxs)("div",{className:"me-guide-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:a,children:t("onboardSkip")}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("span",{className:"me-guide-tip",children:t("onboardTip")}),i>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>g(w=>w-1),children:t("onboardBack")}),v?(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:a,children:t("onboardStart")}):(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:()=>g(w=>w+1),children:t(i===0?"onboardStarred":"onboardNext")})]})]})]})}function Tn({t,card:a,query:i,onClose:g,onDelete:d,onFeedback:s,onNavigate:v,onTagClick:w,allCards:y,onOpenRelated:F,onKindChange:N}){let[k,h]=(0,n.useState)(0),[T,B]=(0,n.useState)(""),[E,z]=(0,n.useState)(()=>{try{let M=localStorage.getItem("me-read-width");return["narrow","mid","wide"].includes(M)?M:"mid"}catch{return"mid"}}),D={narrow:720,mid:900,wide:1180};(0,n.useEffect)(()=>{let M=p=>{if(p.key==="Escape"){g();return}let j=String(p.target&&p.target.tagName||"").toLowerCase();j==="input"||j==="textarea"||j==="select"||p.target&&p.target.isContentEditable||(p.key==="j"&&v?(p.preventDefault(),v(1)):p.key==="k"&&v&&(p.preventDefault(),v(-1)))};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[g,v]);let R=async(M,p)=>{let j=await ia(String(M||""));B(j?t("copied")+" \xB7 "+p:t("copyFail")),setTimeout(()=>B(""),1500)},{meta:de,body:ie}=(0,n.useMemo)(()=>Kt(a.text||""),[a.text]),q=M=>{let p=de.find(([j])=>String(j).toLowerCase()===M);return p?p[1]:""},re=ma(q("tags")),ge=a.kind||q("kind")||"knowledge",U=String(a.status||q("status")||"approved").toLowerCase(),_=Ve[ge]||"#6B7280",G=(ie||"").length>460,xe=(0,n.useMemo)(()=>Aa(ie,a.title),[ie,a.title]),Ue=(0,n.useMemo)(()=>{let M=la(a);if(M)return M;let j=(xe.split(/\r?\n/).map(J=>J.trim()).find(J=>J&&!/^#{1,2}\s/.test(J))||"").replace(/[#>*_`]/g,"").replace(/\s+/g," ").trim();return j.length>150?j.slice(0,148)+"\u2026":j},[a,xe]),X=(0,n.useMemo)(()=>xn(xe),[xe]),je=(0,n.useMemo)(()=>{let M=new Set(re);return(y||[]).filter(p=>p.path!==a.path&&(p.tags||[]).some(j=>M.has(j))).slice(0,3)},[y,a.path,re.join("|")]),[m,Pe]=(0,n.useState)(!0),ce=(0,n.useRef)(null),[ee,Ce]=(0,n.useState)(""),pe=M=>{let p=ce.current;if(!p)return;let j=document.getElementById(M);if(!j||!p.contains(j))return;let J=j.getBoundingClientRect().top-p.getBoundingClientRect().top+p.scrollTop-12;p.scrollTo({top:Math.max(0,J),behavior:"smooth"})},ze=M=>{if(!m){Pe(!0),setTimeout(()=>pe(M),80);return}pe(M)},Ae=M=>{let p=M.currentTarget,j=p.scrollHeight-p.clientHeight;h(j<=0?100:Math.min(100,Math.max(0,p.scrollTop/j*100)));let J=p.querySelectorAll(".md-doc .md-h"),ke="",le=p.getBoundingClientRect().top+28;for(let fe of J)if(fe.getBoundingClientRect().top<=le)ke=fe.id;else break;Ce(ke)};return(0,e.jsxs)("div",{className:"me-overlay",onClick:g,children:[(0,e.jsx)("style",{children:qe}),(0,e.jsxs)("div",{className:"me-dialog me-reader-dialog",onClick:M=>M.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{title:a.title,children:[(0,e.jsx)("span",{style:{marginRight:6,flex:"none"},children:Rt[ge]||"\u{1F4CE}"}),a.title]}),(0,e.jsxs)("div",{className:"me-head-actions",children:[T&&(0,e.jsx)("span",{style:{fontSize:11.5,color:"#10b981",whiteSpace:"nowrap"},children:T}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyBody"),onClick:()=>R(ie,t("copyBody")),children:["\u{1F4CB} ",t("copyBody")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyPath"),onClick:()=>R(a.path,t("copyPath")),children:["\u{1F517} ",t("copyPath")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("readWidth"),onClick:()=>{let M=["narrow","mid","wide"],p=M[(M.indexOf(E)+1)%M.length];z(p);try{localStorage.setItem("me-read-width",p)}catch{}},children:[t("readWidth")," \xB7 ",t(E==="narrow"?"widthNarrow":E==="wide"?"widthWide":"widthMid")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>s&&s(!0),children:["\u{1F44D} ",t("fbUseful")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>s&&s(!1),children:["\u{1F44E} ",t("fbIrr")]}),G&&(0,e.jsx)("button",{type:"button",className:"mc-btn","aria-expanded":m,onClick:()=>Pe(M=>!M),children:t(m?"collapse":"expand")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{window.confirm(t("deleteConfirm"))&&d&&d(a.path)},children:t("delete")}),N&&U==="approved"&&(ge==="core"?(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>N(a.path,"knowledge"),children:t("unsetCore")}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>N(a.path,"core"),children:["\u2B50 ",t("setCore")]})),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:g,children:t("close")})]})]}),N&&(0,e.jsxs)("div",{className:"me-core-banner"+(ge==="core"?" on":""),children:[(0,e.jsxs)("div",{className:"me-core-banner-k",children:["\u2B50 ",t("kindCore")]}),(0,e.jsx)("div",{className:"me-core-banner-desc",children:t(ge==="core"?"coreActiveHint":"coreInactiveHint")}),U==="approved"?(0,e.jsx)("button",{type:"button",className:"mc-btn me-core-btn",onClick:()=>N(a.path,ge==="core"?"knowledge":"core"),children:ge==="core"?t("unsetCore"):"\u2B50 "+t("setCore")}):(0,e.jsx)("span",{className:"me-core-banner-desc",style:{flex:"none",opacity:.6},children:t("coreNeedApproval")})]}),(0,e.jsxs)("div",{className:"md-meta",children:[(0,e.jsxs)("span",{className:"md-chip md-chip-kind",style:{color:_,borderColor:_+"59",background:_+"1a"},children:[Rt[ge]||"\u{1F4CE}"," ",t($e[ge]||"kindKnowledge")]}),(0,e.jsxs)("span",{className:"md-chip "+(U==="approved"?"md-chip-st-ok":U==="pending"?"md-chip-st-warn":"md-chip-st-bad"),children:[U==="approved"?"\u2705":U==="pending"?"\u23F3":"\u26D4"," ",t(U==="approved"?"statusApproved":U==="pending"?"statusPending":"statusRejected")]}),(Array.isArray(re)?re:[]).slice(0,8).map(M=>(0,e.jsxs)("button",{type:"button",className:"md-chip md-chip-tag mc-tag-click",title:M,onClick:()=>w&&w(M),children:["\u{1F3F7} ",M]},M)),!!q("updated")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F552} ",t("updated")," ",wt(q("updated"))]}),!!q("source")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F4E5} ",q("source")]})]}),(0,e.jsx)("div",{className:"me-read-progress","aria-hidden":"true",children:(0,e.jsx)("i",{style:{width:k+"%"}})}),(0,e.jsxs)("div",{className:"me-reader-body",children:[(0,e.jsxs)("div",{className:"me-dialog-body me-reader-main",style:{maxWidth:D[E],margin:"0 auto",width:"100%",boxSizing:"border-box",...m?{}:{maxHeight:300,overflow:"hidden"}},ref:ce,onScroll:Ae,onClick:m?void 0:M=>{M.stopPropagation(),Pe(!0)},children:[!!Ue&&(0,e.jsxs)("div",{className:"me-reader-callout",children:[(0,e.jsx)("span",{className:"me-reader-callout-k",children:t(La(a))}),(0,e.jsx)("p",{children:Ue})]}),(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:Zt(xe)}})]}),(0,e.jsxs)("aside",{className:"me-reader-side",children:[X.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("contents")}),(0,e.jsx)("div",{className:"me-reader-toc",children:X.map((M,p)=>(0,e.jsxs)("button",{type:"button",className:`lv${M.level}${ee===M.id?" active":""}`,onClick:()=>ze(M.id),children:[(0,e.jsx)("span",{children:String(p+1).padStart(2,"0")}),M.text]},M.id))})]}),(0,e.jsx)("div",{className:"side-label",children:t("source")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:q("source")||a.submittedBy||"\u2014"}),(0,e.jsx)("div",{className:"side-label",children:t("updated")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:wt(q("updated")||a.updated)}),(0,e.jsx)("div",{className:"side-label",children:t("file")}),(0,e.jsx)("div",{className:"me-reader-side-val mono",children:a.path}),re.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("tags")}),(0,e.jsx)("div",{className:"me-reader-tags",children:re.slice(0,8).map(M=>(0,e.jsxs)("button",{type:"button",className:"mc-chip",onClick:()=>w&&w(M),children:["#",M]},M))})]}),je.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("related")}),(0,e.jsx)("div",{className:"me-reader-related",children:je.map(M=>(0,e.jsxs)("button",{type:"button",onClick:()=>F&&F(M),children:[(0,e.jsx)("span",{children:Rt[M.kind]||"\u{1F4CE}"}),(0,e.jsx)("b",{children:M.title})]},M.path))})]})]})]}),!m&&(0,e.jsxs)("div",{className:"md-collapsed-hint",onClick:M=>{M.stopPropagation(),Pe(!0)},children:[t("expand")," \u2304"]})]})]})}function Rn({t,onOpen:a,all:i,onAllChange:g,onMutate:d,active:s,visible:v}){let[w,y]=(0,n.useState)(null),[F,N]=(0,n.useState)(""),k=(0,n.useRef)(!1),h=(0,n.useRef)(0),T=(0,n.useRef)(t);T.current=t;let B=(0,n.useCallback)(async()=>{try{k.current=!1;let R=await(await fetch(`${$}/graph${i?"?all=1":""}`)).json();R.ok?(y(R),N(""),k.current=!0):(y(null),N(R.error||t("error")))}catch(D){N(String(D&&D.message?D.message:D))}},[i,t]);(0,n.useEffect)(()=>{if(!s||k.current)return;let D=!0;return fetch(`${$}/graph${i?"?all=1":""}`).then(R=>R.json()).then(R=>{D&&(R.ok?(y(R),N(""),k.current=!0):(y(null),N(R.error||t("error"))))}).catch(R=>{D&&N(String(R&&R.message?R.message:R))}),()=>{D=!1}},[i,t,s]),(0,n.useEffect)(()=>{v&&w&&h.current++},[v,w]);let E=(0,n.useCallback)(async D=>{try{let de=await(await fetch(`${$}/delete?path=${encodeURIComponent(D)}`)).json();return de&&de.ok?(await B(),d&&d(),!0):!1}catch{return!1}},[B]),z=(0,n.useCallback)(async D=>{if(!D||D.length<2)return!1;try{let R=await fetch(`${$}/merge?paths=${encodeURIComponent(D.join(","))}`).then(de=>de.json());return R&&R.ok?(await B(),d&&d(),!0):!1}catch{return!1}},[B,d]);return(0,e.jsxs)("div",{className:"me-graph me-v5-graph",children:[(0,e.jsx)("style",{children:qe}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-graphhead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"KNOWLEDGE GRAPH"}),(0,e.jsx)("h1",{children:t("graphTab")}),(0,e.jsx)("p",{children:t("graphHint")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:w?`${w.nodes.length} ${t("nodes")} \xB7 ${Sa(w.edges)} ${t("edges")}`:""})]}),F&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",F]}),!w&&!F&&(0,e.jsx)(Ba,{text:t("loadingGraph")}),w&&w.nodes.length===0&&(0,e.jsx)("div",{className:"mc-empty",children:t("emptyGraph")}),w&&w.nodes.length>0&&(0,e.jsx)(zn,{nodes:w.nodes,edges:w.edges,onOpen:a,onDelete:E,onMerge:z,t,all:i,onAllChange:g,countLabel:`${w.nodes.length} ${t("nodes")} \xB7 ${Sa(w.edges)} ${t("edges")}`,fitTrigger:h.current})]})}function Sa(t){let a=new Set;for(let i of t||[])a.add([i.source,i.target].sort().join("|"));return a.size}var gt={colors:{core:"#FF7A45",project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},shapes:{core:"diamond",project:"circle",knowledge:"circle",content:"rect",prompt:"diamond",business:"hexagon",tool:"circle",mistake:"diamond",other:"circle"}};function Dt(t,a){try{let i=globalThis;if(i.__meGraphDrawWarned)return;i.__meGraphDrawWarned=!0,console.warn("[memory-eternal] \u77E5\u8BC6\u56FE\u8C31\u7ED8\u5236\u5F02\u5E38\uFF08\u5DF2\u515C\u5E95\uFF0C\u4E0D\u518D\u6574\u9875\u767D\u5C4F\uFF09"+(a?" @ "+a:""),t)}catch{}}function da({value:t,small:a}){let i=typeof t=="number"&&Number.isFinite(t),g=i?Math.max(0,Math.min(100,t)):0;return(0,e.jsx)("div",{className:"me-progress"+(a?" me-progress-sm":"")+(i?" is-determinate":""),role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i?Math.round(g):void 0,"aria-label":"\u52A0\u8F7D\u8FDB\u5EA6",children:(0,e.jsx)("span",{className:"me-progress-fill",style:i?{width:Math.max(3,g)+"%"}:void 0})})}function Ba({text:t,value:a}){return(0,e.jsxs)("div",{className:"me-loading",role:"status","aria-live":"polite",children:[(0,e.jsx)(da,{value:a}),(0,e.jsx)("span",{className:"me-loading-text",children:t})]})}function zn({nodes:t,edges:a,onOpen:i,onDelete:g,onMerge:d,t:s,countLabel:v,all:w,onAllChange:y,fitTrigger:F}){let N=(0,n.useRef)(null),k=(0,n.useRef)(null),h=(0,n.useRef)(null),T=(0,n.useRef)(null),B=(0,n.useRef)(null),E=(0,n.useRef)(i);(0,n.useEffect)(()=>{E.current=i},[i]);let z=(0,n.useRef)(g);(0,n.useEffect)(()=>{z.current=g},[g]);let D=(0,n.useRef)(d);(0,n.useEffect)(()=>{D.current=d},[d]);let[R,de]=(0,n.useState)(""),[ie,q]=(0,n.useState)(null),[re,ge]=(0,n.useState)(null),U=(0,n.useRef)("");(0,n.useEffect)(()=>{U.current=R.trim().toLowerCase()},[R]),(0,n.useEffect)(()=>{let f=h.current;if(!f)return;let u=R.trim().toLowerCase();if(!u)return;let W=f.nodes.find(Y=>(Y.name||"").toLowerCase().includes(u));if(W){h.current.selectedId=W.id,q(W.id),f.panX=f.w/2-W.x*f.zoom,f.panY=f.h/2-W.y*f.zoom;try{f.render&&f.render()}catch(Y){Dt(Y,"search-center")}}},[R]);let[_,G]=(0,n.useState)("all"),[xe,Ue]=(0,n.useState)(!1),X=(0,n.useRef)("all"),[je,m]=(0,n.useState)(""),Pe=(0,n.useRef)(""),[ce,ee]=(0,n.useState)(!1),Ce=(0,n.useRef)(!1),[pe,ze]=(0,n.useState)(null);(0,n.useEffect)(()=>{X.current=_},[_]),(0,n.useEffect)(()=>{Pe.current=je},[je]),(0,n.useEffect)(()=>{Ce.current=ce},[ce]);let Ae=(0,n.useMemo)(()=>{let f=new Map;for(let u of t)for(let W of u.tags||[]){let Y=String(W).trim();Y&&f.set(Y,(f.get(Y)||0)+1)}return[...f.entries()].sort((u,W)=>W[1]-u[1]).slice(0,24).map(([u,W])=>({tag:u,n:W}))},[t]),M=(0,n.useMemo)(()=>{let f={};for(let u of t)f[u.kind||"other"]=(f[u.kind||"other"]||0)+1;return f},[t]),p=(()=>{let f=R.trim().toLowerCase();return!!f&&!t.some(u=>(u.title||u.name||"").toLowerCase().includes(f)||String(u.kind||"").toLowerCase().includes(f)||String($e[u.kind]||"").toLowerCase().includes(f))})();(0,n.useEffect)(()=>{let f=h.current;f&&f.wake&&f.wake()},[R]),(0,n.useEffect)(()=>{let f=h.current;if(!(!f||!f.render))try{f.render()}catch(u){Dt(u,"filter/timeDim")}},[_,je,ce]);let j=(0,n.useRef)(null),[J,ke]=(0,n.useState)([]),[le,fe]=(0,n.useState)(null),[ae,Xe]=(0,n.useState)(!1),[l,L]=(0,n.useState)(null),[P,te]=(0,n.useState)(""),Ne=(0,n.useRef)(null),be=(0,n.useRef)(null),Z=(f,u=!0)=>{Ne.current&&clearTimeout(Ne.current),L({msg:f,ok:u}),Ne.current=setTimeout(()=>L(null),1900)},De=f=>{te(f),be.current&&clearTimeout(be.current),be.current=setTimeout(()=>te(""),1600)};(0,n.useEffect)(()=>()=>{Ne.current&&clearTimeout(Ne.current),be.current&&clearTimeout(be.current)},[]);let Me=(0,n.useMemo)(()=>t.reduce((f,u)=>(f[u.id]=u,f),{}),[t]);return(0,n.useEffect)(()=>{let f=N.current;if(!f||t.length===0)return;let u=f.getContext("2d");if(!u)return;let W=Math.min(1.5,Math.max(1,window.devicePixelRatio||1)),Y=()=>document.documentElement.getAttribute("data-theme")==="dark",ve={};a.forEach(c=>{ve[c.source]=(ve[c.source]||0)+1,ve[c.target]=(ve[c.target]||0)+1});let We=Math.max(1,...Object.values(ve)),o={nodes:t.map(c=>({id:c.id,name:c.title||"",type:c.kind||"other",r:9+Math.min(10,(ve[c.id]||0)/We*8)+(c.kind==="core"?3:0),x:0,y:0,vx:0,vy:0})),edges:a.map(c=>({sourceNodeId:c.source,targetNodeId:c.target,weight:1})),panX:0,panY:0,zoom:1,running:!0,raf:0,tickCount:0,quietTicks:0,dragNode:null,selectedId:null,mouseX:0,mouseY:0,w:0,h:0,dpr:W,ctx:u,multi:[],marquee:null};o.domain=t,o.domainById=t.reduce((c,x)=>(c[x.id]=x,c),{}),o.nodes.forEach((c,x)=>{let C=x*2.399963229728653,I=12*Math.sqrt(x);c.x=Math.cos(C)*I,c.y=Math.sin(C)*I});let nt=[...new Set(o.nodes.map(c=>c.type))];o.clustered=nt.length>1,o.typeCenters={},nt.forEach((c,x)=>{let C=x/nt.length*Math.PI*2-Math.PI/2;o.typeCenters[c]={x:Math.cos(C)*160,y:Math.sin(C)*160}}),h.current=o;let At=0,ft=0,Fe=null,lt="",dt=()=>{let c=f.clientWidth,x=f.clientHeight;o.w=c,o.h=x,f.width=c*W,f.height=x*W,u.setTransform(W,0,0,W,0,0),(At===0||ft===0)&&c>0&&x>0&&o.tickCount>0&&requestAnimationFrame(()=>Te()),At=c,ft=x};dt();let ct=new ResizeObserver(dt);ct.observe(f.parentElement);let ot=(c,x)=>c&&c.length>x?c.slice(0,x)+"\u2026":c,Ye=(c,x,C,I)=>{if(u.beginPath(),I==="rect")u.rect(c-C,x-C*.75,C*2,C*1.5);else if(I==="diamond")u.moveTo(c,x-C),u.lineTo(c+C,x),u.lineTo(c,x+C),u.lineTo(c-C,x),u.closePath();else if(I==="hexagon"){for(let K=0;K<6;K++){let oe=Math.PI/3*K-Math.PI/2,se=c+C*Math.cos(oe),me=x+C*Math.sin(oe);K===0?u.moveTo(se,me):u.lineTo(se,me)}u.closePath()}else u.arc(c,x,C,0,Math.PI*2)},bt=new Map,Lt=(c,x)=>{let C=c+"|"+Math.round(x),I=bt.get(C);if(!I){let K=parseInt(c.slice(1,3),16),oe=parseInt(c.slice(3,5),16),se=parseInt(c.slice(5,7),16);I=u.createRadialGradient(-x*.3,-x*.3,0,0,0,x*1.2),I.addColorStop(0,"rgba("+Math.min(255,K+70)+","+Math.min(255,oe+70)+","+Math.min(255,se+70)+",0.95)"),I.addColorStop(1,c),bt.set(C,I)}return I},kt=1.1,Qe=3,Te=()=>{if(!o.nodes.length)return;let c=1/0,x=-1/0,C=1/0,I=-1/0;o.nodes.forEach(tt=>{c=Math.min(c,tt.x),x=Math.max(x,tt.x),C=Math.min(C,tt.y),I=Math.max(I,tt.y)});let K=20,oe=x-c+K*2,se=I-C+K*2,me=Math.min(o.w/oe,o.h/se),et=Math.pow(1/kt,Qe);o.zoom=Math.max(.35,Math.min(1.8,me*et)),o.panX=o.w/2-(c+x)/2*o.zoom,o.panY=o.h/2-(C+I)/2*o.zoom};T.current=Te;let it=()=>{u.clearRect(0,0,o.w,o.h),o.searchTerm=U.current,o.kindFilter=X.current,o.timeMode=Ce.current,o.tagFilter=Pe.current;let c=o.tagFilter,x=o.kindFilter,C=S=>String(S||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");u.save();let I=o.w+"x"+o.h;if(!Fe||lt!==I){Fe=new Path2D;for(let S=0;S<o.w;S+=24)Fe.moveTo(S,0),Fe.lineTo(S,o.h);for(let S=0;S<o.h;S+=24)Fe.moveTo(0,S),Fe.lineTo(o.w,S);lt=I}u.strokeStyle=Y()?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)",u.lineWidth=.5,u.stroke(Fe),u.restore(),u.save(),u.translate(o.panX,o.panY),u.scale(o.zoom,o.zoom);let K={};o.nodes.forEach(S=>K[S.id]=S);let oe=o.nodes.length>40,se=oe?1.5:.55,me=o.selectedId||o.hoverId,et=ya({panX:o.panX,panY:o.panY,zoom:o.zoom,w:o.w,h:o.h,margin:80}),tt=(()=>{let S=(o.searchTerm||"").toLowerCase();if(!S)return null;let ue=[];for(let ye of o.nodes){let Oe=(o.domainById[ye.id]||{}).kind||"other";if(((ye.name||"").toLowerCase().includes(S)||String($e[Oe]||"").toLowerCase().includes(S)||String(Oe).toLowerCase().includes(S))&&ue.push(ye.id),ue.length>200)break}return ue})(),Se=xa(o.nodes,{limit:va(o.nodes.length),focusId:me,hoverId:o.hoverId,searchHits:tt,degree:ve}),Re=new Map,_e=(S,ue)=>{let ye=S+"|"+ue,Ie=Re.get(ye);return Ie===void 0&&(u.font=S,Ie=u.measureText(ue).width,Re.set(ye,Ie)),Ie},pt=o.nodes.length<=250,rt=new Map,yt=o.nodes.length>1200&&o.zoom<.3;o.edges.forEach(S=>{if(yt)return;let ue=K[S.sourceNodeId],ye=K[S.targetNodeId];if(!ue||!ye||!qt(ue.x,ue.y,10,et)&&!qt(ye.x,ye.y,10,et))return;if(x!=="all"){let It=o.domainById[S.sourceNodeId]&&o.domainById[S.sourceNodeId].kind,ut=o.domainById[S.targetNodeId]&&o.domainById[S.targetNodeId].kind;if(It!==x&&ut!==x)return}if(c){let It=o.domainById[S.sourceNodeId]&&(o.domainById[S.sourceNodeId].tags||[]).includes(c),ut=o.domainById[S.targetNodeId]&&(o.domainById[S.targetNodeId].tags||[]).includes(c);if(!It&&!ut)return}let Ie=ye.x-ue.x,Oe=ye.y-ue.y,Je=Math.sqrt(Ie*Ie+Oe*Oe)||1,xt=oe?12:18,Nt=-Oe/Je*xt,_t=Ie/Je*xt,$t=(ue.x+ye.x)/2+Nt,Ut=(ue.y+ye.y)/2+_t,Ft=gt.colors[o.domainById[ue.id]&&o.domainById[ue.id].kind||"other"]||gt.colors.other,Ht=me&&(S.sourceNodeId===me||S.targetNodeId===me),Yt=me?Ht?.6:.08:oe?.14:.24,mt=parseInt(Ft.slice(1,3),16),Et=parseInt(Ft.slice(3,5),16),Jt=parseInt(Ft.slice(5,7),16),st=Ht?1.6+(S.weight||1):.8+(S.weight||1)*.5,zt=mt+","+Et+","+Jt+","+Yt+","+st,at=rt.get(zt);at||(at={path:new Path2D,stroke:"rgba("+mt+","+Et+","+Jt+","+Yt+")",width:st},rt.set(zt,at)),at.path.moveTo(ue.x,ue.y),at.path.quadraticCurveTo($t,Ut,ye.x,ye.y)}),rt.forEach(S=>{u.strokeStyle=S.stroke,u.lineWidth=S.width,u.stroke(S.path)});let Ee=null;me&&(Ee=new Set,o.edges.forEach(S=>{S.sourceNodeId===me?Ee.add(S.targetNodeId):S.targetNodeId===me&&Ee.add(S.sourceNodeId)}));let vt=[];if(o.nodes.forEach(S=>{if(!qt(S.x,S.y,S.r+2,et))return;let ue=o.domainById[S.id]||{},ye=ue.kind||"other",Ie=o.timeMode?Dn(ue.updated):gt.colors[ye]||gt.colors.other,Oe=gt.shapes[ye]||"circle",Je=o.selectedId===S.id,xt=o.hoverId===S.id,Nt=o.searchTerm||"",_t=!Nt||(S.name||"").toLowerCase().includes(Nt)||String($e[ye]||"").toLowerCase().includes(Nt)||String(ye).toLowerCase().includes(Nt),$t=x==="all"||ye===x,Ut=!c||(ue.tags||[]).includes(c),Ft=me&&S.id!==me&&!(Ee&&Ee.has(S.id))||Nt&&!_t||!$t||!Ut;u.save(),u.globalAlpha=Ft?.08:1,(Je||xt)&&pt&&(u.shadowColor=Ie,u.shadowBlur=Je?20:14),u.translate(S.x,S.y),Ye(0,0,S.r,Oe),u.fillStyle=Lt(Ie,S.r),u.fill(),ye==="core"&&(u.fillStyle="#1b120e",u.font="700 "+Math.max(10,Math.round(S.r*.95))+"px sans-serif",u.textAlign="center",u.textBaseline="middle",u.fillText("\u2605",0,0)),u.restore(),Je?(u.save(),Ye(S.x,S.y,S.r+3,Oe),u.strokeStyle=Ie,u.lineWidth=3,u.shadowColor=Ie,u.shadowBlur=12,u.stroke(),u.restore()):xt?(u.save(),Ye(S.x,S.y,S.r+2,Oe),u.strokeStyle=Ie,u.lineWidth=2,u.stroke(),u.restore()):Nt&&_t?(u.save(),Ye(S.x,S.y,S.r+2,Oe),u.strokeStyle="#e11d48",u.lineWidth=2,u.stroke(),u.restore()):o.multi.indexOf(S.id)>=0&&(u.save(),Ye(S.x,S.y,S.r+2,Oe),u.strokeStyle="#60a5fa",u.lineWidth=2,u.shadowColor="#60a5fa",u.shadowBlur=8,u.stroke(),u.restore());let Ht=ot(S.name,16);if((Je||xt||Se.has(S.id)&&o.zoom>se||!oe&&o.zoom>.6)&&$t&&Ut){let mt=1/o.zoom,Et="500 "+(12*mt).toFixed(1)+"px -apple-system,Segoe UI,sans-serif";u.font=Et;let st=_e(Et,Ht)+16*mt,zt=18*mt,at=S.y+S.r+8*mt,It=!0;for(let ut of vt)if(S.x-st/2<ut.x+ut.w&&S.x+st/2>ut.x&&at<ut.y+ut.h&&at+zt>ut.y){It=!1;break}if(!It&&!Je&&!xt)return;vt.push({x:S.x-st/2,y:at,w:st,h:zt}),u.fillStyle=Y()?"rgba(30,30,35,0.92)":"rgba(255,255,255,0.92)",u.beginPath(),u.roundRect?u.roundRect(S.x-st/2,at,st,zt,4*mt):u.rect(S.x-st/2,at,st,zt),u.fill(),u.strokeStyle=Y()?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)",u.lineWidth=1*mt,u.stroke(),u.fillStyle=Y()?Je||xt?"#eee":"#bbb":Je||xt?"#111":"#444",u.textAlign="center",u.fillText(Ht,S.x,at+13*mt)}}),u.restore(),o.marquee){let S=o.marquee,ue=Math.min(S.sx,S.ex),ye=Math.min(S.sy,S.ey),Ie=Math.abs(S.ex-S.sx),Oe=Math.abs(S.ey-S.sy);u.save(),u.setLineDash([4,4]),u.strokeStyle="rgba(96,165,250,0.9)",u.lineWidth=1,u.fillStyle="rgba(96,165,250,0.12)",u.fillRect(ue,ye,Ie,Oe),u.strokeRect(ue,ye,Ie,Oe),u.restore()}if(o.hoverId&&j.current){let S=o.domainById[o.hoverId],ue=o.nodes.find(function(ye){return ye.id===o.hoverId});if(S&&ue){let ye=o.edges.filter(function(Je){return Je.sourceNodeId===S.id||Je.targetNodeId===S.id}).length,Ie=ue.x*o.zoom+o.panX,Oe=ue.y*o.zoom+o.panY;j.current.style.display="block",j.current.style.left=Ie+14+"px",j.current.style.top=Oe-6+"px",j.current.innerHTML="<b>"+C(S.title||S.name||"")+'</b><br/><span style="opacity:.8">'+C(S.kind||"")+" \xB7 "+tRef.current("connCount").replace("{n}",ye)+"</span>"}}else j.current&&(j.current.style.display="none")},Ge=0,He=()=>{Ge>0||(o.running=!0,o.raf||(o.raf=requestAnimationFrame(r)))};o.wake=He,o.render=it;let St=()=>{let c=o.nodes.length;o.tickCount++;let C=.9-Math.min(.4,o.tickCount/1500),I=c>1e3?3e3:c>100?2e3:c>50?1200:800,K=c>100?.002:.005,oe=c>1e3?.012:c>100?.005:.01,se=c>1e3?6:c>200?12:24,me={};o.nodes.forEach(Se=>me[Se.id]=Se);for(let Se=0;Se<c;Se++){if(o.dragNode===o.nodes[Se])continue;let Re=o.nodes[Se],_e=0,pt=0;for(let Ee=0;Ee<c;Ee++){if(Se===Ee)continue;let vt=Re.x-o.nodes[Ee].x,S=Re.y-o.nodes[Ee].y,ue=Math.sqrt(vt*vt+S*S)||1,ye=I/(ue*ue);_e+=vt/ue*ye,pt+=S/ue*ye}if(o.clustered&&o.typeCenters[Re.type]){let Ee=o.typeCenters[Re.type];_e+=(Ee.x-Re.x)*.006,pt+=(Ee.y-Re.y)*.006}else _e-=Re.x*oe,pt-=Re.y*oe;let rt=(Re.vx+_e)*C,yt=(Re.vy+pt)*C;rt=Math.max(-se,Math.min(se,rt)),yt=Math.max(-se,Math.min(se,yt)),Re.vx=rt,Re.vy=yt}o.edges.forEach(Se=>{let Re=me[Se.sourceNodeId],_e=me[Se.targetNodeId];if(!Re||!_e)return;let pt=_e.x-Re.x,rt=_e.y-Re.y,yt=Math.sqrt(pt*pt+rt*rt)||1,Ee=(yt-100)*K,vt=pt/yt*Ee,S=rt/yt*Ee;o.dragNode!==Re&&(Re.vx+=vt,Re.vy+=S),o.dragNode!==_e&&(_e.vx-=vt,_e.vy-=S)});let et=0;o.nodes.forEach(Se=>{o.dragNode!==Se&&(Se.x+=Se.vx,Se.y+=Se.vy,et+=Se.vx*Se.vx+Se.vy*Se.vy)}),o.autoFitPending&&o.tickCount>45&&(o.autoFitPending=!1,Te()),(c?Math.sqrt(et/c):0)<.05&&o.tickCount>60&&!o.dragNode?o.quietTicks=(o.quietTicks|0)+1:o.quietTicks=0},r=()=>{if(o.running){try{St(),it()}catch(c){Dt(c,"step")}if(o.quietTicks>30){o.raf=0;return}o.raf=requestAnimationFrame(r)}},H=(c,x)=>{let C=f.getBoundingClientRect(),I=C.width?f.clientWidth/C.width:1,K=C.height?f.clientHeight/C.height:1;return{x:(c-C.left)*I,y:(x-C.top)*K}},V=(c,x)=>{let C=H(c,x);return{x:(C.x-o.panX)/o.zoom,y:(C.y-o.panY)/o.zoom}},he=c=>{let x=o.domainById[c];return!(!x||X.current!=="all"&&x.kind!==X.current||Pe.current&&!(x.tags||[]).includes(Pe.current))},Q=(c,x,C)=>Math.max(x,Math.min(C,c)),ne=c=>{o.mouseX=c.clientX,o.mouseY=c.clientY;let x=V(c.clientX,c.clientY),C=null;for(let I=o.nodes.length-1;I>=0;I--){let K=o.nodes[I];if(!he(K.id))continue;let oe=K.x-x.x,se=K.y-x.y;if(oe*oe+se*se<K.r*K.r+36){C=K.id;break}}C!==o.hoverId&&(o.hoverId=C,He())},we=c=>{if(c.button!==0)return;let x=V(c.clientX,c.clientY),C=null;for(let I=o.nodes.length-1;I>=0;I--){let K=o.nodes[I];if(!he(K.id))continue;let oe=K.x-x.x,se=K.y-x.y;if(oe*oe+se*se<K.r*K.r+25){C=K;break}}if(c.shiftKey){if(C){o.shiftClick=C.id;return}o.marquee={sx:c.clientX,sy:c.clientY,ex:c.clientX,ey:c.clientY};return}o.userTouched=!0,o.dragStart={x:c.clientX,y:c.clientY,px:o.panX,py:o.panY},o.dragging=!1,o.dragNode=C||null,C&&(o.dragOffset={dx:C.x-x.x,dy:C.y-x.y})},Ke=c=>{if(o.marquee){o.marquee.ex=c.clientX,o.marquee.ey=c.clientY,He();return}if(!o.dragStart)return;let x=c.clientX-o.dragStart.x,C=c.clientY-o.dragStart.y;if(Math.abs(x)+Math.abs(C)>3&&(o.dragging=!0),o.dragNode){let I=V(c.clientX,c.clientY);o.dragNode.x=I.x+o.dragOffset.dx,o.dragNode.y=I.y+o.dragOffset.dy,He()}else o.dragging&&(o.panX=Q(o.dragStart.px+x,-1e5,1e5),o.panY=Q(o.dragStart.py+C,-1e5,1e5),He())},ht=c=>{if(o.marquee){let C=o.marquee;o.marquee=null;let I=H(C.sx,C.sy),K=H(C.ex,C.ey),oe=Math.min(I.x,K.x),se=Math.max(I.x,K.x),me=Math.min(I.y,K.y),et=Math.max(I.y,K.y),tt=o.nodes.filter(Se=>{let Re=Se.x*o.zoom+o.panX,_e=Se.y*o.zoom+o.panY;return Re>=oe&&Re<=se&&_e>=me&&_e<=et}).map(Se=>Se.id);o.multi=tt,ke(tt),He();return}let x=o.dragStart&&!o.dragging;if(o.shiftClick){let C=o.shiftClick;o.shiftClick=null;let I=Array.isArray(o.multi)?o.multi.slice():[];I.includes(C)||I.push(C),o.multi=I,ke(I),He();return}if(x){let C=V(c.clientX,c.clientY),I=null;for(let K=o.nodes.length-1;K>=0;K--){let oe=o.nodes[K];if(!he(oe.id))continue;let se=oe.x-C.x,me=oe.y-C.y;if(se*se+me*me<oe.r*oe.r+20){I=oe;break}}I?(o.selectedId=I.id,q(I.id),He()):(o.selectedId=null,o.hoverId=null,c.shiftKey||(o.multi=[],ke([])),q(null),He())}o.dragStart=null,o.dragging=!1,o.dragNode=null},Be=c=>{c.preventDefault();let x=V(c.clientX,c.clientY),C=null;for(let I=o.nodes.length-1;I>=0;I--){let K=o.nodes[I];if(!he(K.id))continue;let oe=K.x-x.x,se=K.y-x.y;if(oe*oe+se*se<K.r*K.r+25){C=K;break}}if(C){let I=o.domainById[C.id];I&&ze({x:c.clientX,y:c.clientY,id:C.id,path:I.id,title:I.title})}else ze(null)},Wt=c=>{c.preventDefault();let x=H(c.clientX,c.clientY),C=(x.x-o.panX)/o.zoom,I=(x.y-o.panY)/o.zoom,K=Math.max(.3,Math.min(3,o.zoom*(c.deltaY<0?kt:1/kt)));o.panX=Q(o.panX+C*(o.zoom-K),-1e5,1e5),o.panY=Q(o.panY+I*(o.zoom-K),-1e5,1e5),o.zoom=K,o.userTouched=!0,He()};f.addEventListener("mousemove",ne),f.addEventListener("mousedown",we),window.addEventListener("mousemove",Ke),window.addEventListener("mouseup",ht),f.addEventListener("wheel",Wt,{passive:!1}),f.addEventListener("contextmenu",Be),B.current=()=>{o.selectedId=null,o.hoverId=null,o.multi=[],ke([]),o.userTouched=!1,Te(),He()},Ge=wa(o.nodes.length);let Ct=Ge,ca=()=>Ct>0?Math.round((Ct-Ge)/Ct*100):100;Ge>0&&ge(0);let b=Ct>0?[.75,.5,.25].map(c=>Math.round(Ct*c)):[],A=()=>{if(!o.running)return;let c=performance.now();for(;Ge>0&&performance.now()-c<12;)St(),Ge--;if(ge(Ge>0?Math.min(99,ca()):100),b.length&&Ge<=b[0]){b.shift(),o.userTouched||Te();try{it()}catch(x){Dt(x,"warm-frame")}}if(Ge>0){o.userTouched||Te(),o.warmRaf=requestAnimationFrame(A);return}o.warmRaf=0,o.userTouched||Te();try{it()}catch(x){Dt(x,"warm-final")}ge(null),He()};o.warmStep=A,Te();try{it()}catch(c){Dt(c,"first-frame")}Ge>0?o.warmRaf=requestAnimationFrame(A):(ge(0),He());let O=()=>Ue(!1);return window.addEventListener("mousedown",O),()=>{o.running=!1,o.raf&&cancelAnimationFrame(o.raf),o.warmRaf&&cancelAnimationFrame(o.warmRaf),ct.disconnect(),f.removeEventListener("mousemove",ne),f.removeEventListener("mousedown",we),window.removeEventListener("mousemove",Ke),window.removeEventListener("mouseup",ht),f.removeEventListener("wheel",Wt),f.removeEventListener("contextmenu",Be),window.removeEventListener("mousedown",O)}},[t,a]),(0,n.useEffect)(()=>{F!==void 0&&T.current&&requestAnimationFrame(()=>{try{T.current()}catch(f){Dt(f,"fit")}})},[F]),(0,e.jsxs)("div",{className:"me-graph",ref:k,children:[(0,e.jsxs)("div",{className:"me-graph-toolbar",children:[(0,e.jsxs)("span",{className:"me-graph-count",children:[t.length," ",s("nodes")," \xB7 ",a.length," ",s("edges")]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("input",{type:"text",placeholder:s("search"),value:R,onChange:f=>de(f.target.value)}),(0,e.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>Ue(f=>!f),"aria-expanded":xe,title:s("filterLabel"),style:{borderRadius:8},children:["\u{1F50D} ",s("filterLabel")," ",_!=="all"||ce||je?"\u25CF":"\u25BE"]}),xe&&(0,e.jsx)("div",{className:"me-graph-legend-pop",onMouseDown:f=>f.stopPropagation(),style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:50,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",border:"1px solid rgba(255,255,255,0.1)",borderRadius:10,padding:8,minWidth:240,boxShadow:"0 12px 34px rgba(0,0,0,.35)"},children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[(0,e.jsx)("button",{type:"button",className:`lg${_==="all"&&!ce?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>{G("all"),ee(!1)},children:s("all")}),Object.keys(Ve).map(f=>(0,e.jsxs)("button",{type:"button",className:`lg${_===f?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>G(u=>u===f?"all":f),children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:gt.colors[f]||Ve[f]}}),s($e[f])]},f)),(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsxs)("button",{type:"button",className:`lg${ce?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>ee(f=>!f),children:["\u23F1 ",s("timeDim")]}),Ae.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsx)("div",{style:{maxHeight:130,overflow:"auto",display:"flex",flexWrap:"wrap",gap:4},children:Ae.map(f=>(0,e.jsxs)("button",{type:"button",className:`lg${je===f.tag?" active":""}`,style:{color:"#ddd",padding:"2px 7px",fontSize:11},onClick:()=>m(u=>u===f.tag?"":f.tag),title:f.tag,children:["#",f.tag," ",(0,e.jsx)("span",{style:{opacity:.55},children:f.n})]},f.tag))})]}),(_!=="all"||ce||je)&&(0,e.jsxs)("button",{type:"button",className:"lg lg-clear",style:{justifyContent:"flex-start",color:"#f87171"},onClick:()=>{G("all"),ee(!1),m("")},children:[s("clearFilter")," \u2715"]})]})})]}),(0,e.jsxs)("label",{className:"mc-btn",style:{display:"inline-flex",alignItems:"center",gap:5,cursor:"pointer"},title:s("crossVault"),children:[(0,e.jsx)("input",{type:"checkbox",checked:!!w,onChange:f=>y&&y(f.target.checked)}),s("crossVault")]}),(0,e.jsx)("button",{type:"button",className:`mc-btn${ce?" me-on":""}`,onClick:()=>ee(f=>!f),children:s("timeDim")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let f=N.current;if(f)try{f.toBlob(u=>{u&&fe({url:URL.createObjectURL(u),blob:u})},"image/png")}catch{}},children:s("exportGraph")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>T.current&&T.current(),children:s("fit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{q(null),G("all"),B.current&&B.current()},children:s("reset")})]}),(0,e.jsxs)("div",{className:"me-graph-canvas",style:{position:"relative",overflow:"hidden"},children:[(0,e.jsx)("canvas",{ref:N,style:{width:"100%",height:"100%",display:"block",cursor:"grab"}}),re!==null&&(0,e.jsxs)("div",{role:"status","aria-live":"polite",style:{position:"absolute",left:"50%",top:10,transform:"translateX(-50%)",zIndex:3,display:"flex",alignItems:"center",gap:9,padding:"6px 12px",borderRadius:999,background:"rgba(28,28,32,0.86)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",color:"#eee",fontSize:11.5,fontWeight:600,letterSpacing:".02em",pointerEvents:"none",boxShadow:"0 6px 18px rgba(0,0,0,.22)"},children:[(0,e.jsx)(da,{value:re,small:!0}),(0,e.jsxs)("span",{children:[s("graphWarming").replace("{n}",t.length)," \xB7 ",Math.round(re),"%"]})]}),(0,e.jsxs)("div",{className:"mc-v5-graph-legend",children:[(0,e.jsx)("div",{className:"mc-v5-graph-legend-title",children:"\u8FDE\u63A5\u7C07"}),Object.keys(gt.colors).filter(f=>M[f]).map(f=>(0,e.jsxs)("div",{className:"mc-v5-graph-legend-row",children:[(0,e.jsx)("i",{style:{background:gt.colors[f]}}),(0,e.jsx)("span",{children:s($e[f]||"kindKnowledge")}),(0,e.jsx)("b",{children:M[f]})]},f))]}),(0,e.jsx)("div",{className:"me-graph-tooltip",ref:j,style:{display:"none",position:"absolute",zIndex:4,pointerEvents:"none",background:"rgba(28,28,32,0.88)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:8,padding:"7px 10px",fontSize:12,maxWidth:220,boxShadow:"0 8px 24px rgba(0,0,0,.2)"}}),p&&(0,e.jsx)("div",{className:"mc-empty",style:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)"},children:s("noMatch")}),pe&&(0,e.jsx)("div",{className:"me-graph-ctx-back",style:{position:"fixed",inset:0,zIndex:30},onMouseDown:()=>ze(null)}),pe&&(0,e.jsxs)("div",{className:"me-graph-ctxmenu",style:{position:"fixed",left:pe.x,top:pe.y,zIndex:31},onMouseDown:f=>f.stopPropagation(),children:[(0,e.jsx)("button",{type:"button",onClick:()=>{E.current({path:pe.path,title:pe.title}),ze(null)},children:s("openCard")}),(0,e.jsx)("button",{type:"button",onClick:()=>{pe.id&&(h.current.selectedId=pe.id,q(pe.id)),ze(null);let f=h.current;f&&f.wake&&f.wake()},children:s("focusNeighbors")}),(0,e.jsx)("button",{type:"button",onClick:()=>{try{navigator.clipboard&&navigator.clipboard.writeText(pe.title||"")}catch{}ze(null),Z(s("copied"))},children:s("copyName")}),(0,e.jsx)("button",{type:"button",onClick:()=>{let f=h.current,u=f&&Array.isArray(f.multi)?f.multi.slice():[],W=pe.id;if(W&&!u.includes(W)&&u.push(W),ze(null),u.length<2){Z(s("mergeNeed"),!1);return}if(!window.confirm(s("mergeConfirm")))return;let Y=D.current&&D.current(u);Y&&Y.then?Y.then(ve=>ve?Z(s("merged")):Z(s("mergeFail"),!1)).catch(()=>Z(s("mergeFail"),!1)):Y&&Z(s("merged"))},children:s("merge")}),(0,e.jsx)("button",{type:"button",style:{color:"#f87171"},onClick:()=>{let f=pe.path;ze(null),window.confirm(s("deleteConfirm"))&&(async()=>{try{(z.current?await z.current(f):!1)?Z(s("deleted")):Z(s("deleteFail"),!1)}catch{Z(s("deleteFail"),!1)}})()},children:s("delete")})]}),J.length>0&&(0,e.jsxs)("div",{style:{position:"absolute",left:10,top:10,zIndex:3,display:"flex",gap:8,alignItems:"center",background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:"6px 10px",fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsxs)("span",{style:{fontWeight:700},children:[J.length," ",s("nodes")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let u=J.map(We=>Me[We]).filter(Boolean).map(We=>We.title||We.name).join(`
834
- `),W=new Blob([u],{type:"text/plain;charset=utf-8"}),Y=URL.createObjectURL(W),ve=document.createElement("a");ve.href=Y,ve.download="memory-selected.txt",document.body.appendChild(ve),ve.click(),document.body.removeChild(ve),setTimeout(()=>URL.revokeObjectURL(Y),1e3),Z(J.length+s("exportedSel"))},children:s("exportSel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{if(J.length<2){Z(s("mergeNeed"),!1);return}let f=J.map(W=>Me[W]?Me[W].id:W);if(!window.confirm(s("mergeConfirm")))return;ke([]);let u=h.current;u&&(u.multi=[]),fetch(`${$}/merge?paths=${encodeURIComponent(f.join(","))}`).then(W=>W.json()).then(W=>{W&&W.ok?Z(s("merged")):Z(s("mergeFail"),!1)}).catch(()=>Z(s("mergeFail"),!1))},children:s("merge")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{if(!window.confirm(s("deleteConfirm")))return;let f=J.map(W=>Me[W]?Me[W].id:W);ke([]);let u=h.current;u&&(u.multi=[]),(async()=>{let W=0;for(let Y of f)try{(z.current?await z.current(Y):!1)&&W++}catch{}Z(W+s("deletedSelected"),W>0)})()},children:s("deleteSelected")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let f=h.current;f&&(f.multi=[]),ke([]);let u=h.current;u&&u.render&&u.render()},children:s("clearSelection")})]}),ie&&(0,e.jsxs)("div",{className:"me-graph-sidebar",style:{position:"absolute",right:10,top:10,zIndex:3,maxWidth:240,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:12,fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsx)("div",{style:{fontWeight:700,fontSize:13,marginBottom:4},children:Me[ie]?Me[ie].title||Me[ie].name:ie}),(0,e.jsx)("div",{style:{opacity:.8,marginBottom:8},children:Me[ie]?s($e[Me[ie].kind]||"kindKnowledge"):"\u2014"}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.65,letterSpacing:".04em",marginBottom:6},children:s("graphHint")}),(a.filter(f=>f.source===ie||f.target===ie)||[]).slice(0,8).map((f,u)=>{let W=f.source===ie?f.target:f.source,Y=Me[W];return(0,e.jsx)("div",{style:{padding:"4px 6px",cursor:"pointer",borderRadius:6},onMouseDown:ve=>{ve.preventDefault();let We=h.current;We&&(We.selectedId=W,We.hoverId=W,We.wake&&We.wake()),q(W)},children:Y?(Y.title||Y.name).slice(0,28):W},u)})]})]}),(0,e.jsx)("div",{className:"me-graph-tip",children:s("graphTip")}),l&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(l.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:l.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:l.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:l.msg})]}),le&&(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>{le.url&&URL.revokeObjectURL(le.url),fe(null),Xe(!1)},children:[(0,e.jsx)("style",{children:qe}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:ae?"100vw":900,width:ae?"100vw":"92vw",maxHeight:ae?"100%":"90vh",height:ae?"100%":void 0,borderRadius:ae?0:14},onClick:f=>f.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:s("exportGraph")}),(0,e.jsxs)("div",{className:"me-head-actions",children:[(0,e.jsx)("a",{className:"mc-btn",href:le.url,download:"memory-graph.png",onClick:()=>{De("download"),Z(s("downloaded")+" \xB7 "+s("defaultDownloads"))},style:{textDecoration:"none",display:"inline-flex",alignItems:"center"},children:s(P==="download"?"done":"download")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{De("full"),Xe(f=>!f),Z(s("fullscreen"))},children:s(P==="full"?"done":ae?"exitFull":"fullscreen")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let f=le.blob;f&&window.ClipboardItem&&navigator.clipboard?navigator.clipboard.write([new window.ClipboardItem({"image/png":f})]).then(()=>{De("copy"),Z(s("copied"))}).catch(()=>{Z(s("copyFail"),!1)}):Z(s("copyFail"),!1)},children:s(P==="copy"?"done":"copyImage")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{le.url&&URL.revokeObjectURL(le.url),fe(null),Xe(!1)},children:s("close")})]})]}),(0,e.jsx)("div",{className:"me-dialog-body",style:{display:"flex",justifyContent:"center",background:ae?"var(--dsw-alias-bg-base, #0b0d10)":"var(--dsw-alias-bg-base, #f3f4f6)"},children:(0,e.jsx)("img",{src:le.url,alt:s("exportGraph"),style:{maxWidth:"100%",maxHeight:ae?"calc(100% - 64px)":"70vh",borderRadius:ae?0:8,cursor:"zoom-in"},onClick:()=>Xe(f=>!f)})})]})]})]})}function Dn(t){let a=new Date(t||0).getTime();if(!a)return"#94a3b8";let i=(Date.now()-a)/864e5;return i<3?"#10b981":i<14?"#f59e0b":i<30?"#f97316":"#94a3b8"}function Ca({label:t,value:a=[],options:i,onChange:g,placeholder:d,z:s=20}){let[v,w]=(0,n.useState)(!1),y=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!v)return;let E=z=>{y.current&&!y.current.contains(z.target)&&w(!1)};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[v]);let F=Array.isArray(a)?a:[],N=F.includes("__all__"),k=N?i.find(E=>E.value==="__all__")?.label||"":F.length?F.map(E=>i.find(z=>z.value===E)?.label||E).join("\u3001"):"",h=(E,z)=>{if(E.value==="__all__"){g(z?["__all__"]:[]);return}let D=new Set(F);D.has("__all__")&&D.delete("__all__"),z?D.add(E.value):D.delete(E.value),g([...D])},T=i.find(E=>E.value==="__all__"),B=i.filter(E=>E.value!=="__all__");return(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t}),(0,e.jsxs)("div",{ref:y,style:{position:"relative",minWidth:0},children:[(0,e.jsxs)("button",{type:"button",onClick:()=>w(E=>!E),style:{width:"100%",textAlign:"left",padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",gap:6},children:[(0,e.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:k||d||"\u2014"}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.7},children:"\u25BE"})]}),v&&(0,e.jsxs)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:s,marginTop:2,borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",boxShadow:"0 6px 20px rgba(0,0,0,0.14)",maxHeight:180,overflow:"auto"},children:[T&&(0,e.jsxs)("label",{onClick:E=>E.stopPropagation(),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px",cursor:"pointer",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("input",{type:"checkbox",checked:N,onChange:E=>h(T,E.target.checked)}),(0,e.jsx)("span",{children:T.label})]}),B.map(E=>(0,e.jsxs)("label",{onClick:z=>z.stopPropagation(),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px",cursor:"pointer"},children:[(0,e.jsx)("input",{type:"checkbox",checked:F.includes(E.value),onChange:z=>h(E,z.target.checked)}),(0,e.jsx)("span",{children:E.label})]},E.value))]})]})]})}function An(t){let a=new Date(t||0).getTime();return!!a&&(Date.now()-a)/864e5<3}async function Ln(t,a,i){if(i&&typeof window.showSaveFilePicker=="function")try{let s=await window.showSaveFilePicker({suggestedName:a}),v=await s.createWritable();return await v.write(t),await v.close(),{ok:!0,picked:!0,name:s.name}}catch(s){return s&&s.name==="AbortError"?{ok:!1,aborted:!0}:{ok:!1,err:String(s.message||s)}}let g=URL.createObjectURL(t),d=document.createElement("a");return d.href=g,d.download=a,document.body.appendChild(d),d.click(),document.body.removeChild(d),setTimeout(()=>URL.revokeObjectURL(g),1e3),{ok:!0,picked:!1,name:a}}function aa(t,a){if(!a||!t)return t;let i=t.toLowerCase(),g=a.toLowerCase(),d=[],s=0;for(;s<t.length;){let v=i.indexOf(g,s);if(v<0){d.push(t.slice(s));break}v>s&&d.push(t.slice(s,v)),d.push((0,e.jsx)("mark",{className:"mc-hl",children:t.slice(v,v+g.length)},v)),s=v+g.length}return d}function wt(t){if(!t)return"";let a=new Date(t);if(Number.isNaN(a.getTime()))return"";let i=new Date,g=a.toDateString()===i.toDateString(),d=v=>String(v).padStart(2,"0"),s=`${d(a.getHours())}:${d(a.getMinutes())}`;return g?s:`${a.getMonth()+1}-${a.getDate()} ${s}`}
947
+ `);let _e=new Blob([Q],{type:Le}),ye=await bo(_e,te,!1);if(!ye.ok){T({ok:!1,msg:t("exportFail")}),Y(!1);return}T({ok:!0,msg:t("exportedTo")+"\uFF1A"+t("defaultDownloads")+" \xB7 "+ye.name})}catch(C){T({ok:!1,msg:t("exportFail")+" \xB7 "+(C.message||"")})}finally{Y(!1)}f.current&&clearTimeout(f.current),f.current=setTimeout(()=>T(null),2600)},at=async r=>{let h=r.target.files&&r.target.files[0];if(r.target.value="",!!h){try{let C=await h.text(),Q=await(await fetch(`${W}/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:C})).json();if(Q.ok){await Oe();let te=Q.imported||0,Le=t("importedVault")+"\uFF1A"+te;Q.total&&(Le+=t("importedTotal")+Q.total+t("importedTotalTail")),Q.quarantined&&(Le+=t("importedQuarantine")+Q.quarantined+t("importedQuarantineTail")),Q.skipped&&(Le+=t("importedSkipped")+Q.skipped+t("importedSkippedTail")),Q.warning&&(Le+=" \xB7 "+Q.warning),T({ok:te>0||!Q.total,msg:Le})}else T({ok:!1,msg:Q.error||t("importFail")})}catch{T({ok:!1,msg:t("importFail")})}f.current&&clearTimeout(f.current),f.current=setTimeout(()=>T(null),2400)}},ft=async()=>{if(!se){Re(!0);try{let r=await fetch(`${W}/skills/sync`,{method:"POST"}).then(h=>h.json()).catch(()=>null);if(r&&r.ok){let h=t("skillsSyncDone")+" \xB7 "+t("skillsScanned")+" "+(r.total||0)+" \xB7 "+t("skillsCreated")+" "+(r.created||0)+" \xB7 "+t("skillsUpdated")+" "+(r.updated||0)+" \xB7 "+t("skillsPendingUpdates")+" "+(r.pendingUpdates||0);T({ok:!0,msg:h}),await Oe(),dt()}else T({ok:!1,msg:r&&r.error||t("skillsSyncFail")})}catch{T({ok:!1,msg:t("skillsSyncFail")})}finally{Re(!1)}f.current&&clearTimeout(f.current),f.current=setTimeout(()=>T(null),3600)}},Ee=(0,n.useMemo)(()=>{let r=k.slice();return re!=="all"&&(r=r.filter(h=>Nt(h.submittedBy)===re)),ae!=="all"&&(r=r.filter(h=>(h.status||"approved")===ae)),Z&&(r=r.filter(h=>J.has(h.path))),$==="title"?r.sort((h,C)=>String(h.title||"").localeCompare(String(C.title||""))):$==="hot"?r.sort((h,C)=>(C.weight||C.links||0)-(h.weight||h.links||0)):r.sort((h,C)=>new Date(C.updated||0).getTime()-new Date(h.updated||0).getTime()),r},[k,$,re,ae,Z,J]),Kt=(0,n.useMemo)(()=>[...new Set(k.map(r=>Nt(r.submittedBy)))],[k]),bt=(0,n.useMemo)(()=>{let r={};for(let h of k){let C=new Set(h.tags||[]),U=0;for(let Q of k)Q.path!==h.path&&(Q.tags||[]).some(te=>C.has(te))&&U++;r[h.path]=U}return r},[k]),[jt,Et]=(0,n.useState)(null),We=(0,n.useMemo)(()=>{if(!Ee.length)return null;let r=jt?Ee.find(C=>C.path===jt):null;return r||Ee.find(C=>Date.now()-new Date(C.updated||0).getTime()>21*864e5)||Ee[0]},[Ee,jt]),Yt=()=>{if(!Ee.length)return;let r=Ee.findIndex(h=>h.path===(We&&We.path));Et(Ee[(r+1+Ee.length)%Ee.length].path)},w=!A&&F==="all"&&!ie&&ae==="all"&&!!We;return(0,e.jsxs)("div",{className:"memory-eternal-root me-v5","data-ui-scale":v,style:{height:"100%",width:"100%",zoom:v==="large"?1.15:v==="compact"?.92:1.06,overflow:"hidden",display:"flex",flexDirection:"column"},children:[(0,e.jsx)("style",{children:Je}),!a&&(0,e.jsxs)("div",{className:`mc-v5-top${d?" in-host":""}`,children:[(0,e.jsx)("img",{className:"mc-v5-logo",src:Zt,alt:""}),(0,e.jsxs)("span",{className:"mc-v5-crumb",children:[(0,e.jsx)("b",{children:t("memoryTitle")}),(0,e.jsx)("i",{children:"/"}),(0,e.jsx)("span",{children:t(m==="cards"?"cardsTab":m==="graph"?"graphTab":m==="news"?"newsTab":m==="stats"?"tabUsage":m==="audit"?"tabAudit":m==="optimize"?"tabRecycle":m==="terminal"?"terminalTab":"tabConfig")})]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsxs)("div",{className:"mc-v5-top-actions",children:[(0,e.jsxs)("span",{className:"mc-v5-sys",children:[(0,e.jsx)("i",{}),t("v5Local")]}),(0,e.jsxs)("span",{className:"mc-v5-ver",children:["v",Bt]}),(0,e.jsxs)("button",{type:"button",className:"mc-v5-star",onClick:()=>ha("https://github.com/EternalNight996/memory-eternal"),title:t("v5Star"),children:["\u2605 ",(0,e.jsx)("span",{className:"mc-v5-star-label",children:"Star"})]}),(0,e.jsx)("button",{type:"button",className:"mc-v5-help",onClick:()=>be("group"),title:t("supportTitle"),"aria-label":t("supportTitle"),children:"?"})]})]}),Te&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(Te.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:Te.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:Te.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{children:Te.msg})]}),a&&(0,e.jsxs)("div",{className:"me-modal-head",children:[(0,e.jsxs)("div",{className:"me-modal-title",children:[(0,e.jsx)("span",{className:"me-wicon",children:(0,e.jsx)("img",{src:Zt,alt:""})}),(0,e.jsx)("h2",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:t("memoryHint")})]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("button",{type:"button",className:"me-modal-close me-modal-x",onClick:o,"aria-label":t("close"),title:t("close"),children:(0,e.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})})})]}),y&&y.ok===!1&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,margin:"0 0 8px",padding:"9px 14px",borderRadius:10,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.45)",borderLeft:"4px solid #ef4444",color:"var(--dsw-alias-label-primary, #e5e7eb)",fontSize:12.5,lineHeight:1.6},children:[(0,e.jsxs)("span",{style:{fontWeight:800},children:["\u26A0 ",t("captureAlert")]}),(0,e.jsxs)("span",{style:{flex:1},children:[y.reason,(0,e.jsx)("div",{style:{opacity:.68,fontSize:11.5,marginTop:2},children:t("captureAlertHint")})]}),(0,e.jsx)("span",{style:{opacity:.7},children:y.since?kt(new Date(y.since).toISOString()):""})]}),(0,e.jsxs)("div",{className:"me-modal-body",children:[(0,e.jsxs)("div",{className:`mc-rail${Ae?" open":""}`,children:[(0,e.jsxs)("div",{className:"mc-v5-rail-top",children:[Ae&&(0,e.jsxs)("div",{className:"mc-v5-railbrand",children:[(0,e.jsx)("img",{className:"mark",src:Zt,alt:""}),(0,e.jsxs)("div",{children:[(0,e.jsx)("b",{children:t("memoryTitle")}),(0,e.jsx)("span",{children:"MEMORY ATLAS"})]})]}),(0,e.jsx)("button",{type:"button",className:"mc-rail-collapse",onClick:()=>Dt(r=>!r),"aria-label":t(Ae?"collapse":"expand"),title:t(Ae?"collapse":"expand"),children:Ae?"\xAB":"\xBB"})]}),Ae&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navWorkspace")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="cards"?" active":""}`,onClick:()=>ge("cards"),title:t("cardsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E0}"}),Ae&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("cardsTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="graph"?" active":""}`,onClick:()=>ge("graph"),title:t("graphTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F52E}"}),Ae&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("graphTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="news"?" active":""}`,onClick:()=>ge("news"),title:t("newsTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4F0}"}),Ae&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("newsTab")}),ee>0&&(0,e.jsx)("span",{className:"mc-dot",children:ee>99?"99+":ee})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="stats"?" active":""}`,onClick:()=>ge("stats"),title:t("tabUsage"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4C8}"}),Ae&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabUsage")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="audit"?" active":""}`,onClick:()=>ge("audit"),title:t("tabAudit"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F50D}"}),Ae&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabAudit")}),tt>0&&(0,e.jsx)("span",{className:"mc-dot",children:tt>99?"99+":tt})]}),Ae&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSystem")}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="optimize"?" active":""}`,onClick:()=>ge("optimize"),title:t("tabRecycle"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u267B\uFE0F"}),Ae&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabRecycle")}),Xe>0&&(0,e.jsx)("span",{className:"mc-dot",style:{background:"#6b7280"},children:Xe>99?"99+":Xe})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="terminal"?" active":""}`,onClick:()=>ge("terminal"),title:t("terminalTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u25B8_"}),Ae&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("terminalTab")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:i,title:t("webTab"),"aria-label":t("webTab"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F310}"}),Ae&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("webTab")})]}),(0,e.jsxs)("button",{type:"button",className:`mc-railbtn${m==="config"?" active":""}`,onClick:()=>ge("config"),title:t("tabConfig"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2699\uFE0F"}),Ae&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("tabConfig")})]}),Ae&&(0,e.jsx)("div",{className:"mc-rail-sec",children:t("navSupport")}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>be("group"),title:t("supportGroup"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F4AC}"}),Ae&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportGroup")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>be("sponsor"),title:t("supportSponsor"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u2615"}),Ae&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportSponsor")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>be("legacy"),title:t("supportLegacy"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F9E9}"}),Ae&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("supportLegacy")})]}),(0,e.jsxs)("button",{type:"button",className:"mc-railbtn",onClick:()=>L(!0),title:t("fbNav"),children:[(0,e.jsx)("span",{className:"mc-rail-ico",children:"\u{1F41E}"}),Ae&&(0,e.jsx)("span",{className:"mc-rail-label",children:t("fbNav")})]})]}),(0,e.jsxs)("div",{className:"mc-main",ref:Ve,children:[c&&c.db&&c.db.writable===!1?(0,e.jsxs)("div",{style:{margin:"8px 10px 0",padding:"8px 12px",borderRadius:8,fontSize:12,lineHeight:1.7,background:"rgba(239,68,68,0.10)",border:"1px solid rgba(239,68,68,0.35)",color:"#b91c1c"},children:["\u26A0\uFE0F ",t("dbReadonlyTitle"),"\uFF1A",c.db.error||"\u2014"," \u2014\u2014 ",t("dbReadonlyBody"),(0,e.jsx)("div",{style:{opacity:.85,marginTop:2},children:t("dbReadonlyFix")})]}):null,m==="cards"&&(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"MEMORY LIBRARY"}),(0,e.jsx)("h1",{children:t("memoryTitle")}),(0,e.jsx)("p",{children:t("memoryHint")}),(0,e.jsxs)("div",{className:"mc-v5-pagehead-stats",children:[(0,e.jsxs)("span",{children:[(0,e.jsx)("b",{children:c?.total??"\u2014"})," ",t("cardsUnit")]}),(0,e.jsxs)("span",{children:[t("recent")," +",c?.recent??0]}),(0,e.jsxs)("span",{children:[t("pending")," ",c?.quarantine?.pending??c?.status?.pending??0]}),(0,e.jsxs)("span",{children:[t("rejected")," ",c?.quarantine?.rejected??c?.status?.rejected??0]})]})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[k.length," / ",ut]})]}),m==="cards"&&(0,e.jsxs)("div",{className:"mc-toolbar",children:[(0,e.jsx)("input",{type:"text",placeholder:t("searchPlaceholder"),value:A,onChange:r=>q(r.target.value)}),ie&&(0,e.jsxs)("button",{type:"button",className:"mc-chip active",title:t("clearFilter"),onClick:()=>he(""),children:["\u{1F3F7} ",ie," ",(0,e.jsx)("span",{style:{opacity:.7},children:"\u2715"})]}),(0,e.jsx)("input",{ref:S,type:"file",accept:".json,application/json",style:{display:"none"},onChange:at}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>S.current&&S.current.click(),children:t("importVault")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>Ke({kind:"knowledge",title:"",body:"",tags:"",template:""}),children:["+ ",t("newCard")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:se,onClick:ft,title:t("skillCardsHint"),children:se?"\u23F3 "+t("syncingSkills"):"\u{1F9E9} "+t("syncSkills")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:g,onClick:()=>Me("md"),children:t(g?"exporting":"exportVault")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:g,onClick:()=>Me("json"),children:t(g?"exporting":"exportJson")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Oe(),children:t("refresh")})]}),m==="cards"&&(0,e.jsxs)("div",{className:"mc-chips",children:[oa.map(r=>(0,e.jsxs)("button",{type:"button",className:`mc-chip${F===r?" active":""}`,onClick:()=>oe(r),children:[t(r==="all"?"all":Ge[r]),(0,e.jsx)("span",{className:"mc-chip-n",children:r==="all"?c?.total??0:c?.byKind?.[r]??0})]},r)),(0,e.jsxs)("button",{type:"button",className:`mc-chip${Z?" active":""}`,onClick:()=>ce(r=>!r),children:["\u{1F4CC} ",t("pinnedOnly"),(0,e.jsx)("span",{className:"mc-chip-n",children:J.size})]}),(0,e.jsxs)("select",{value:re,onChange:r=>K(r.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsxs)("option",{value:"all",children:["\u{1F916} ",t("allAgents")]}),Qa(Kt).map(r=>(0,e.jsx)("option",{value:r,children:r},r))]}),(0,e.jsxs)("select",{value:ae,onChange:r=>ne(r.target.value),style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allStatus")}),(0,e.jsx)("option",{value:"approved",children:t("statusApproved")}),(0,e.jsx)("option",{value:"pending",children:t("statusPending")}),(0,e.jsx)("option",{value:"rejected",children:t("statusRejected")})]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),[{key:"recent",label:t("sortRecent")},{key:"title",label:t("sortTitle")},{key:"hot",label:t("sortHot")}].map(r=>(0,e.jsx)("button",{type:"button",className:`mc-chip${$===r.key?" active":""}`,onClick:()=>ke(r.key),children:r.label},r.key))]}),H&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",H]}),(0,e.jsx)("div",{style:{display:m==="cards"?"contents":"none"},children:D?(0,e.jsx)(on,{text:t("loading")}):H?(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",H," ",(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Oe(),children:t("retry")})]}):k.length===0?(0,e.jsx)("div",{className:"mc-empty",children:t("empty")}):(0,e.jsxs)(e.Fragment,{children:[w&&(0,e.jsxs)("div",{className:"mc-v5-feature",onClick:()=>pe(We),children:[(0,e.jsxs)("div",{className:"mc-v5-feature-copy",children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:t("todayReview")}),(0,e.jsx)("h3",{children:We.title}),(0,e.jsx)("p",{children:Ma(We)}),(0,e.jsxs)("div",{className:"mc-v5-feature-meta",children:[(0,e.jsxs)("span",{children:[Ct[We.kind]||"\u{1F4CE}"," ",t(Ge[We.kind]||"kindKnowledge")]}),(0,e.jsxs)("span",{children:["\u{1F552} ",kt(We.updated)]}),(We.tags||[]).slice(0,3).map(r=>(0,e.jsxs)("span",{children:["#",r]},r))]})]}),(0,e.jsxs)("div",{className:"mc-v5-feature-side",children:[(0,e.jsx)(nn,{n:bt[We.path]||0,color:qe[We.kind]||qe.other,size:58}),(0,e.jsx)("b",{children:bt[We.path]||0}),(0,e.jsx)("span",{children:t("links")}),(0,e.jsx)("button",{type:"button",className:"mc-v5-feature-shuffle",onClick:r=>{r.stopPropagation(),Yt()},children:t("reshuffle")}),(0,e.jsx)("span",{className:"mc-v5-feature-open",children:t("openArrow")})]})]}),(0,e.jsx)("div",{className:"mc-grid",children:Ee.filter(r=>!w||r.path!==We.path).map(r=>(0,e.jsx)(oo,{card:r,t,query:A.trim(),onOpen:pe,onDelete:s,onTagClick:he,pinned:J.has(r.path),onPin:Se,onCore:ue,links:bt[r.path]||0},r.path))}),k.length<ut&&(0,e.jsx)("div",{ref:st,style:{height:1}}),gt&&(0,e.jsxs)("div",{className:"mc-empty",style:{padding:"10px 0"},children:[t("loading"),"\uFF08",k.length," / ",ut,"\uFF09"]})]})}),(0,e.jsx)("div",{style:{display:m==="graph"?"flex":"none",flex:1,minHeight:0},children:de.has("graph")&&(0,e.jsx)(mo,{t,onOpen:pe,all:E,onAllChange:le,onMutate:dt,active:m==="graph",visible:m==="graph"})}),(0,e.jsx)("div",{style:{display:m==="news"?"contents":"none"},children:de.has("news")&&(0,e.jsx)(eo,{t,version:et,onUnreadChange:ze})}),(0,e.jsx)("div",{style:{display:m==="terminal"?"contents":"none"},children:de.has("terminal")&&(0,e.jsx)(Hn,{t})}),(0,e.jsx)("div",{style:{display:m==="config"?"contents":"none"},children:de.has("config")&&(0,e.jsx)(Za,{t,onReload:()=>Oe(),version:et})}),(0,e.jsx)("div",{style:{display:m==="stats"?"contents":"none"},children:de.has("stats")&&(0,e.jsx)(io,{t,tab:"stats",onReload:()=>Oe(),version:et})}),(0,e.jsx)("div",{style:{display:m==="audit"?"contents":"none"},children:de.has("audit")&&(0,e.jsx)(Un,{t,onReload:()=>Oe(),version:et})}),(0,e.jsx)("div",{style:{display:m==="optimize"?"contents":"none"},children:de.has("optimize")&&(0,e.jsx)(ao,{t,onReload:()=>Oe(),version:et})}),N&&(0,e.jsx)(so,{t,onClose:()=>L(!1)}),X&&(0,e.jsx)(lo,{t,tab:Ce,onTab:b,onClose:()=>fe(!1),onFeedback:()=>{fe(!1),L(!0)},onReplay:()=>{fe(!1),V(!0)}}),u&&(0,e.jsx)(co,{t,onDone:me}),p&&(0,e.jsx)(po,{t,card:p,query:A.trim(),onNavigate:r=>{let h=Ee.findIndex(U=>U.path===p.path),C=Ee[h+r];C&&pe(C)},onTagClick:he,onClose:()=>B(null),onDelete:r=>{B(null),s(r)},onFeedback:r=>{let h=p.path;fetch(`${W}/feedback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:A.trim(),path:h,useful:r})}).then(()=>T({ok:!0,msg:t(r?"fbUseful":"fbIrr")})).catch(()=>{}),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>T(null),2e3)},allCards:Ee,onOpenRelated:r=>pe(r),onKindChange:ue}),(0,e.jsx)(ro,{t,newCard:At,setNewCard:Ke,onCreated:()=>{Oe(),dt(),T({ok:!0,msg:t("created")}),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>T(null),2e3)}})]})]})]})}var ia=({toast:t})=>t?(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"8px 12px",fontSize:12,borderLeft:"4px solid "+(t.ok?"#10b981":"#ef4444"),background:t.ok?"rgba(16,185,129,0.08)":"rgba(239,68,68,0.08)"},children:[t.ok?"\u2705":"\u26A0"," ",t.msg]}):null;var Sa=(0,n.createContext)({form:null,set:()=>{}}),_n=new Set(["autoRestartOnDrift","coreMemoryEnabled","skillCardsAutoSync"]);function Be({k:t,label:a,hint:o,type:d="text",step:c,min:l,max:v}){let{form:x,set:k}=(0,n.useContext)(Sa);return(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:a||t}),(0,e.jsx)("input",{type:d,step:c,min:l,max:v,value:x?x[t]??"":"",onChange:I=>{let D=I.target.value;k(t,d==="number"?D===""?"":Number(D):D)}}),o?(0,e.jsx)("span",{className:"mc-field-hint",children:o}):null]})}function Ze({k:t,label:a}){let{form:o,set:d}=(0,n.useContext)(Sa),c=o?o[t]:void 0,l=c===void 0?_n.has(t):!!c;return(0,e.jsxs)("label",{className:"mc-switch",children:[(0,e.jsx)("input",{type:"checkbox",checked:l,onChange:v=>d(t,v.target.checked)}),(0,e.jsx)("span",{children:a||t})]})}function xt({icon:t,title:a,sub:o,children:d}){return(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:t}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:a}),o?(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:o}):null]})]}),(0,e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:13},children:d})]})}function Za({t,onReload:a,version:o,compact:d}){let[c,l]=(0,n.useState)(null),[v,x]=(0,n.useState)(0),[k,I]=(0,n.useState)(null),[D,M]=(0,n.useState)(null),[y,z]=(0,n.useState)(!1),[H,O]=(0,n.useState)(!1),F=(0,n.useRef)(!1),P=(0,n.useRef)(null),A=(0,n.useRef)({}),[G,re]=(0,n.useState)(null),[K,ae]=(0,n.useState)(null),[ne,J]=(0,n.useState)(""),[j,Z]=(0,n.useState)(""),[ce,Se]=(0,n.useState)(""),[ie,De]=(0,n.useState)(null),[m,Ne]=(0,n.useState)(null),de=(0,n.useCallback)(async(s,q=!1)=>{q||Z("version");try{let oe=await fetch(W+"/version-check"+(s?"?force=1":"")).then(he=>he.json());oe&&oe.ok?(Ne(oe),s&&ee(oe.updateAvailable?t("vcLatest")+" v"+oe.latest:t("vcUpToDate"))):s&&ee(t("vcCheckFail"),!1)}catch{s&&ee(t("vcCheckFail"),!1)}finally{q||Z("")}},[t]);(0,n.useEffect)(()=>{de(!1);let s=setInterval(()=>{de(!1,!0)},6e4),q=()=>{typeof document<"u"&&!document.hidden&&de(!1,!0)};return document.addEventListener("visibilitychange",q),()=>{clearInterval(s),document.removeEventListener("visibilitychange",q)}},[o,de]);let[Pe,ge]=(0,n.useState)(""),[$,ke]=(0,n.useState)(null),[Te,T]=(0,n.useState)(""),[f,S]=(0,n.useState)(!1),g=(0,n.useRef)(null),Y=(0,n.useRef)(0),se=s=>{Y.current=s.currentTarget.scrollTop};(0,n.useLayoutEffect)(()=>{let s=g.current;s&&Math.abs(s.scrollTop-Y.current)>1&&(s.scrollTop=Y.current)});let Re=(0,n.useRef)(null),ee=(s,q=!0)=>{Re.current&&clearTimeout(Re.current),ke({msg:s,ok:q}),Re.current=setTimeout(()=>ke(null),1900)},ze=async()=>{if(!j){Z("restart");try{let s=await fetch(W+"/restart-self",{method:"POST"});if(s.status===404||s.status===405){ee(V("vcRestartNoRoute",{cmd:m&&m.restartCommand||"dsh-memory restart --port 7999"}),!1);return}let q=await s.json().catch(()=>null);if(!q){ee(t("vcRestartFail")+"\uFF08HTTP "+s.status+"\uFF09",!1);return}if(!q.ok){ee(q.error||t("vcRestartFail"),!1);return}if(q.alreadyCurrent){ee(q.note||t("vcRestartCurrent"));return}ee(q.note||t("vcRestartSent")),q.alreadyRunning||setTimeout(()=>{de(!0)},6e3)}catch(s){ee(t("vcRestartFail")+"\uFF1A"+String(s&&s.message||s),!1)}finally{Z("")}}},p=m&&m.resident?String(m.resident.served||""):"",B=!!(m&&m.onDisk&&p&&p!==m.onDisk),E=!!(m&&m.resident&&m.resident.managed===!1&&m.resident.managedKnown===!1),le=m&&m.resident&&m.resident.replaceBlocked&&m.resident.replaceBlocked.fresh||null,N=!!(m&&m.resident&&m.resident.managedBy==="host"),L=!!(m&&m.resident&&m.resident.managed===!1&&!E&&!N),X=!!(m&&m.resident&&!p),fe=B||X||L||E,Ce=Da({hasVersion:!!m,hostVersion:m?m.loaded:"",onDisk:m?m.onDisk:"",residentServed:m&&m.resident?m.resident.served:"",residentPresent:!!(m&&m.resident),residentManaged:m&&m.resident?m.resident.managed:null,residentManagedKnown:m&&m.resident?m.resident.managedKnown:null,residentManagedBy:m&&m.resident?m.resident.managedBy:"",replaceBlocked:m&&m.resident?m.resident.replaceBlocked:null}),b={hostProcessStale:()=>V("vcHostProcessStale",{disk:m.onDisk,loaded:m.loaded}),residentDown:()=>V("vcResidentDown",{port:m.resident&&m.resident.port||"",cmd:m.restartCommand||"dsh-memory restart --port 7999"}),residentReplaceBlocked:()=>V("vcResidentReplaceBlocked",{served:p,err:le&&le.error||"",path:le&&le.lockPath||"",cmd:m.restartCommand||"dsh-memory restart --port "+(m.resident&&m.resident.port||7999)}),residentLockUnknown:()=>V("vcResidentLockUnknown",{served:p,path:m.resident&&m.resident.lock&&m.resident.lock.path||"",err:m.resident&&m.resident.lock&&m.resident.lock.error||""}),residentUnmanaged:()=>V("vcResidentUnmanaged",{served:p,cmd:m.restartCommand||"dsh-memory restart --port 7999"})},u={restartStart:()=>V("vcRestartStart",{disk:m&&m.onDisk||""}),restartRepair:()=>V("vcRestartRepair",{disk:m&&m.onDisk||""}),restartFixes:()=>V("vcRestartFixes",{served:p||"",disk:m&&m.onDisk||""}),restartHostOnly:()=>V("vcRestartHostOnly",{loaded:m&&m.loaded||"",disk:m&&m.onDisk||""}),restartAnyway:()=>V("vcRestartAnyway",{ver:m&&m.onDisk||""})},V=(s,q)=>Object.keys(q).reduce((oe,he)=>oe.split("{"+he+"}").join(q[he]),t(s)),me=(0,n.useCallback)(async()=>{try{let[s,q,oe,he]=await Promise.all([fetch(`${W}/config`).then(ue=>ue.json()).catch(()=>null),fetch(`${W}/setup-status`).then(ue=>ue.json()).catch(()=>null),fetch(`${W}/budget`).then(ue=>ue.json()).catch(()=>null),fetch(`${W}/llm-routes`).then(ue=>ue.json()).catch(()=>null)]);if(he&&he.ok&&De(he),s&&s.ok){l(s),x(s.revision??0),I(s.schema??null);let ue=Wa(s.config??{},A.current);A.current=ue.overlay,M({...ue.values}),S(!1),re(s.dsh??null),z(s.writable===!1),O(s.viaPending===!0),J(""),F.current=!1}else oe&&oe.ok?(M({...oe}),S(!1),z(!0),J(t("configNeedsDsh"))):J(t("adminLoadFail"));q&&q.ok&&ae(q),Se("")}catch{J(t("adminLoadFail"))}},[t]);(0,n.useEffect)(()=>{me()},[o,me]);let be=(s,q)=>{F.current=!0,S(!0),T(""),M(oe=>({...oe??{},[s]:q}))};(0,n.useEffect)(()=>{P.current=me},[me]),(0,n.useEffect)(()=>{if(typeof EventSource>"u")return;let s=null;try{s=new EventSource(W+"/events")}catch{return}let q=()=>{!F.current&&typeof P.current=="function"&&P.current()};try{s.addEventListener("config",q)}catch{}return()=>{try{s.close()}catch{}}},[]);let He=new Set(["dedupThreshold","captureMinChars","captureCooldownMs","maxCardsPerDay","captureMaxTokens","recallMinScore","recallLimit","recallSummaryLen","recycleRetentionDays","webPort","webCheckIntervalMs","webMaxRestart","sessionBudgetChars","coreMemoryLimit","coreMemoryMaxChars"]),i=s=>({init:t("modeInit"),interval:t("modeInterval"),manual:t("modeManual")})[s]||s,Ae=async()=>{if(!D)return;if(y){ee(t("editInSetting"),!1);return}let s={dedupThreshold:[0,1],captureMinChars:[0,1e6],captureCooldownMs:[0,1e9],maxCardsPerDay:[0,1e6],captureMaxTokens:[100,4e3],recallMinScore:[0,50],recallLimit:[1,20],recallSummaryLen:[40,400],recycleRetentionDays:[1,3650],webPort:[1,65535],webCheckIntervalMs:[1e3,6e5],webMaxRestart:[1,1e3],sessionBudgetChars:[0,1e9],coreMemoryLimit:[1,20],coreMemoryMaxChars:[200,1e4]},q=[];for(let[oe,[he,ue]]of Object.entries(s)){if(!(oe in D))continue;let pe=D[oe],Me=typeof pe=="number"?pe:Number(pe);(pe===""||pe===null||pe===void 0||!Number.isFinite(Me)||Me<he||Me>ue)&&q.push(t("invalidField",{field:oe,min:he,max:ue,value:String(pe===""?"\u7A7A":pe)}))}if(q.length){let oe=t("saveInvalid")+"\uFF1A"+q.join("\uFF1B");J(oe),ee(oe,!1);return}Z("save");try{let oe={...D};for(let Me of Object.keys(D))Me in oe&&typeof oe[Me]=="string"&&oe[Me].trim()!==""&&He.has(Me)&&(oe[Me]=Number(oe[Me]));Array.isArray(oe.vaultProfiles)&&(oe.vaultProfiles=oe.vaultProfiles.filter(Me=>Me&&(String(Me.name||"").trim()||String(Me.path||"").trim())));let he=await fetch(`${W}/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch:oe,expectedRevision:v})}),ue=await he.text(),pe=null;try{pe=ue?JSON.parse(ue):null}catch{pe=null}if(pe||(pe={error:"HTTP "+he.status+(ue?"\uFF1A"+ue.slice(0,200):"\uFF08\u5BBF\u4E3B\u672A\u8FD4\u56DE\u539F\u56E0\uFF0C\u8BF7\u68C0\u67E5\u662F\u5426\u6709\u6570\u5B57\u5B57\u6BB5\u4E3A\u7A7A\u6216\u8D85\u51FA\u8303\u56F4\uFF09")}),pe&&pe.ok){let Me=typeof pe.pendingOutcome=="string"?pe.pendingOutcome:"",at,ft=!0;if(Me==="applied")at=t("savedApplied")+(Array.isArray(pe.applied)&&pe.applied.length?" \xB7 "+pe.applied.join("\u3001"):"");else if(Me==="queued")ft=!1,at=t("saveQueued");else if(Me==="failed")ft=!1,at=t("saveFail")+" \xB7 "+(pe.hostGuard?t("saveHostGuard"):t("saveFailHint"));else if(Me==="applied-direct")at=t("savedOk")+" \xB7 "+t("savedDirect");else{let Ee=Array.isArray(pe.pending)&&pe.pending.length?" \xB7 "+t("savePending"):pe.note?" \xB7 "+t("restartHint"):"";at=(pe.retried?"\u267B ":"")+t("savedOk")+Ee}A.current={...A.current,...oe},ft?(T(""),S(!1),Se(at)):J(at),ee(at,ft),await me()}else{let Me=he.status===409?t("conflictRefresh"):pe?.error||t("saveFail");J(Me),ee(Me,!1)}}catch{J(t("saveFail")),ee(t("saveFail"),!1)}finally{Z("")}},Dt=()=>{A.current={},M({...c?.config??{}}),T(""),S(!1),Se("")},At={env:"vaultSrcEnv",profile:"vaultSrcProfile",workspace:"vaultSrcWorkspace",vaultDir:"vaultSrcVaultDir",default:"vaultSrcDefault"},Ke=s=>Array.isArray(s?.vaultProfiles)?s.vaultProfiles:[],et=(s,q,oe)=>{F.current=!0,S(!0),M(he=>{let ue=Ke(he).map(Me=>({...Me||{}})),pe={...ue[s]||{}};return q==="match"?String(oe).trim()?pe.match={...pe.match||{},workspace:oe}:delete pe.match:pe[q]=oe,ue[s]=pe,{...he??{},vaultProfiles:ue}})},Lt=()=>{F.current=!0,S(!0),M(s=>({...s??{},vaultProfiles:[...Ke(s),{name:"",path:""}]}))},dt=s=>{F.current=!0,S(!0),M(q=>({...q??{},vaultProfiles:Ke(q).filter((oe,he)=>he!==s)}))},tt={fontSize:11,padding:"2px 8px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:6},Xe={padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:12,minWidth:0},ot={A:{label:t("planA"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:4e3,recallMinScore:2,recallLimit:5,recallSummaryLen:130,recallIncludeBody:!1,captureCooldownMs:3e5},B:{label:t("planB"),autoWebMode:"init",watchdogAutoSpawn:!1,distillEnabled:!1,dedupByLLM:!1,captureMaxTokens:500,recallMinScore:3,recallLimit:3,recallSummaryLen:80,recallIncludeBody:!1,captureMinChars:300,maxCardsPerDay:40,captureCooldownMs:3e5},C:{label:t("planC"),autoWebMode:"interval",watchdogAutoSpawn:!0,distillEnabled:!0,dedupByLLM:!0,captureMaxTokens:1200,recallMinScore:1,recallLimit:8,recallSummaryLen:200,recallIncludeBody:!0,captureCooldownMs:12e4}},ut=s=>{let q=ot[s];q&&(M(oe=>({...oe??{},...q})),F.current=!0,S(!0),T(s),ee(V("planApplied",{plan:q.label})))},Mt=async()=>{try{let s=await fetch(W+"/setup-status").then(q=>q.json());s&&s.ok&&ae(s)}catch{}},gt=async(s,q)=>{Z(s+q);try{let he=await(await fetch(`${W}/mcp/action`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:s,action:q})})).json();he&&he.ok?ee(V(q==="install"?"mcpInstalled":"mcpUninstalled",{agent:s})):ee(V("mcpActionFail",{agent:s,error:he?.error||""}),!1);try{let ue=await fetch(`${W}/setup-status`).then(pe=>pe.json());ue&&ue.ok&&ae(ue)}catch{}}catch{ee(t("mergeFail"),!1)}finally{Z("")}},Ye=K&&Array.isArray(K.agents)?K.agents:[],st=Ye.filter(s=>s.installed),Ve=[...new Set(st.flatMap(s=>Array.isArray(s.servers)?s.servers:[]))],Ie=Ye.filter(s=>s.mcpConfigured&&!s.isDsh).length,Oe=Ye.some(s=>Array.isArray(s.servers));return(0,e.jsx)(Sa.Provider,{value:{form:D,set:be},children:(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"hidden",flex:d?"0 0 auto":1,minHeight:0,maxHeight:d?"52vh":void 0},children:[(0,e.jsx)("style",{children:Je}),$&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+($.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:$.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:$.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:$.msg})]}),(0,e.jsxs)("div",{ref:g,onScroll:se,style:{flex:1,minHeight:0,overflow:"auto",overscrollBehavior:"contain",scrollbarGutter:"stable",padding:4},children:[!d&&(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"MEMORY CONFIG"}),(0,e.jsx)("h1",{children:t("tabConfig")}),(0,e.jsx)("p",{children:t("configPageSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-audit-trust",children:["\u{1F6E1} ",t("v5Local")]})]}),ne&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",ne]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:me,children:["\u21BB ",t("retry")]})]}),H&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #3b82f6",background:"rgba(59,130,246,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#1d4ed8",lineHeight:1.7},children:["\u2139 ",t("pendingSyncNote")]}),y&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #f59e0b",background:"rgba(245,158,11,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#b45309"},children:["\u2139\uFE0F ",t("configNeedsDsh")," \u2014\u2014 ",t("editInSetting")]}),ce&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #10b981",background:"rgba(16,185,129,0.08)",padding:"10px 14px",marginBottom:10,fontSize:12,color:"#059669"},children:["\u2713 ",ce]}),c&&(c.version||c.dsh?.vaultDir)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F4E6} ",t("pluginInfo")]}),(0,e.jsx)("span",{style:{fontSize:12,opacity:.7},children:t("dshHostLabel")}),c.version&&(0,e.jsxs)("code",{style:tt,children:[t("vcLoaded")," v",c.version]}),m&&m.resident&&m.resident.served&&m.resident.served!==c.version&&(0,e.jsxs)("code",{style:tt,children:[t("vcResident")," v",m.resident.served]}),m&&m.resident&&!m.resident.served&&(0,e.jsxs)("code",{style:{...tt,color:"#b45309",fontWeight:600},children:[t("vcResident")," ",t("vcResidentDownShort")]}),m&&m.resident&&m.resident.served&&m.resident.managed===!1&&(0,e.jsxs)("code",{style:{...tt,color:"#b45309",fontWeight:600},children:[t("vcResident")," v",m.resident.served," \xB7 ",t(le?"vcResidentReplaceBlockedShort":N?"vcResidentHostManagedShort":E?"vcResidentLockUnknownShort":"vcResidentUnmanagedShort")]}),Bt&&(0,e.jsxs)("code",{style:tt,children:[t("vcPage")," v",Bt]}),m&&m.onDisk&&(0,e.jsxs)("code",{style:tt,children:[t("vcOnDisk")," v",m.onDisk]}),m&&m.latest&&(0,e.jsxs)("code",{style:tt,children:[t("vcLatest")," v",m.latest]}),c.dsh?.vaultDir&&(0,e.jsxs)("span",{style:{fontSize:11,opacity:.6},children:["\u{1F4C1} ",c.dsh.vaultDir]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:j==="version",onClick:()=>de(!0),children:j==="version"?t("checking"):"\u{1F504} "+t("vcCheck")})]}),m&&Ce.warn&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px"},children:(0,e.jsxs)("div",{children:["\u26A0\uFE0F ",b[Ce.warn]?b[Ce.warn]():""]})}),Ce.showButton&&(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn"+(Ce.emphasis?" me-on":""),disabled:!!j,onClick:ze,children:j==="restart"?"\u23F3 "+t("vcRestarting"):"\u{1F504} "+t("vcRestart")}),m.restartCommand&&(0,e.jsx)("code",{style:{fontSize:11,opacity:.75},children:m.restartCommand}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.65},children:u[Ce.hint]?u[Ce.hint]():""})]}),Bt&&m&&m.onDisk&&Bt!==m.onDisk&&(0,e.jsx)("div",{style:{marginTop:8,fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.7},children:t("vcPageStale",{page:Bt,disk:m.onDisk})}),m&&m.updateAvailable&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,opacity:.88},children:["\u2B06 ",t("vcOutdated")," \u2192 ",(0,e.jsx)("code",{children:m.updateCommand})]}),m&&m.checkError&&(0,e.jsxs)("div",{style:{marginTop:8,fontSize:11.5,color:"#b91c1c"},children:[t("vcCheckFail"),"\uFF1A",m.checkError]})]}),K&&K.agents&&(0,e.jsxs)("div",{className:"mc-card mc-cfg-sec",children:[(0,e.jsxs)("div",{className:"mc-cfg-sec-head",children:[(0,e.jsx)("div",{className:"mc-cfg-sec-ico",children:"\u{1F50C}"}),(0,e.jsxs)("div",{style:{minWidth:0},children:[(0,e.jsx)("div",{className:"mc-cfg-sec-title",children:t("mcpSetupStatus")}),(0,e.jsx)("div",{className:"mc-cfg-sec-sub",children:t("mcpAutoHint")})]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",flex:"none"},onClick:Mt,children:t("mcpRefresh")})]}),Oe?(0,e.jsx)("div",{className:"mc-mcp-summary",children:V("mcpSummary",{agents:st.length,servers:Ve.length,mounted:Ie})}):null,Ye.map(s=>{let q=Array.isArray(s.servers),oe=q?s.servers:[],he=s.isDsh?t("dshHostLabel"):s.label||s.name;return(0,e.jsxs)("div",{className:"mc-mcp-row",style:{opacity:s.installed?1:.55},children:[(0,e.jsxs)("div",{className:"mc-mcp-main",children:[(0,e.jsxs)("div",{className:"mc-mcp-title",children:[(0,e.jsx)("b",{children:he}),s.isDsh&&s.version&&(0,e.jsxs)("span",{className:"mc-mcp-badge",children:["v",s.version]}),!s.installed&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("notInstalled")}),s.installed&&s.mcpConfigured===!1&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:t("noMcpEntry")}),s.mcpConfigured===!0&&(0,e.jsxs)("span",{className:"mc-mcp-badge",style:{color:"#10b981"},children:["\u2713 ",t("healthy")]}),s.mcpConfigured===!0&&s.mcpMatchesCurrentNode===!1&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("nodePathNote")}),(s.needsRepair||s.mcpNeedsRepair)&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:t("mcpNeedsRepair")}),s.isDsh&&(0,e.jsxs)("span",{className:"mc-mcp-badge",children:[t("recallTool"),": ",s.recallTool?t("enabled"):t("disabled")]}),s.detectedOnly&&(0,e.jsx)("span",{className:"mc-mcp-badge",children:t("mcpDetectedOnly")}),s.reason&&(0,e.jsx)("span",{className:"mc-mcp-badge",style:{color:"#f59e0b"},children:s.reason})]}),q?oe.length?(0,e.jsx)("div",{className:"mc-mcp-servers",children:oe.map(ue=>(0,e.jsx)("code",{className:ue==="memory"?"on":"",children:ue},ue))}):s.installed?(0,e.jsx)("div",{className:"mc-mcp-servers",children:(0,e.jsx)("span",{style:{fontSize:10.5,opacity:.45},children:t("mcpNoServers")})}):null:null,s.mcpPath&&(0,e.jsx)("div",{className:"mc-mcp-path",title:s.mcpPath,children:s.mcpPath})]}),(0,e.jsxs)("div",{className:"mc-mcp-actions",children:[s.hook&&(0,e.jsxs)("span",{style:{fontSize:10.5,opacity:.55},children:["hook: ",s.hook]}),!s.isDsh&&!s.detectedOnly&&s.installed&&s.mcpConfigured===!1&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!j,onClick:()=>gt(s.name,"install"),children:t("installMcp")}),!s.isDsh&&!s.detectedOnly&&s.installed&&(s.needsRepair||s.mcpNeedsRepair||s.mcpMatchesCurrentNode===!1)&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",style:{padding:"2px 8px"},disabled:!!j,onClick:()=>gt(s.name,"install"),children:t("repairMcp")}),!s.isDsh&&!s.detectedOnly&&s.installed&&s.mcpConfigured===!0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},disabled:!!j,onClick:()=>{window.confirm(t("uninstallConfirm"))&&gt(s.name,"uninstall")},children:t("uninstallMcp")})]})]},s.name+(s.mcpPath||""))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:6},children:t("mcpSetupHint")}),Pe&&(0,e.jsx)("div",{style:{fontSize:11,marginTop:6},children:(0,e.jsx)("code",{style:{padding:"2px 6px",background:"var(--dsw-alias-bg-layer-2, #f3f4f6)",borderRadius:4},children:Pe})})]}),D?(0,e.jsxs)("div",{className:"mc-cfg",children:[(0,e.jsxs)(xt,{icon:"\u{1F3AF}",title:t("presetConfig"),sub:t("presetHint"),children:[(0,e.jsx)("div",{className:"mc-plan-grid",children:["A","B","C"].map(s=>(0,e.jsxs)("button",{type:"button",className:"mc-plan"+(Te===s?" on":""),"aria-pressed":Te===s,onClick:()=>ut(s),disabled:!!j,children:[(0,e.jsxs)("b",{children:[Te===s?"\u2705 ":s==="A"?"\u{1F7E2} ":s==="B"?"\u{1F4B0} ":"\u2B50 ",ot[s].label]}),(0,e.jsx)("span",{children:t("planDesc"+s)})]},s))}),Te?(0,e.jsxs)("div",{style:{fontSize:11,color:"#10b981"},children:["\u2705 ",V("planApplied",{plan:ot[Te].label})]}):null]}),(0,e.jsx)(xt,{icon:"\u{1F9E0}",title:t("dshMemoryConfig"),sub:t("cfgSubCore"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Ze,{k:"enabled",label:t("enabledLabel")}),(0,e.jsx)(Ze,{k:"autoCapture",label:t("autoCapture")}),(0,e.jsx)(Ze,{k:"autoRecall",label:t("autoRecall")}),(0,e.jsx)(Be,{k:"vaultDir",label:t("vaultDirLabel")}),(0,e.jsx)(Be,{k:"captureMinChars",label:t("captureMinChars"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(Be,{k:"maxCardsPerDay",label:t("maxCardsPerDay"),hint:t("unitPerDay"),type:"number"}),(0,e.jsx)(Be,{k:"dedupThreshold",label:t("dedupThreshold"),type:"number",step:"0.01",min:"0",max:"1"}),(0,e.jsx)(Be,{k:"recallLimit",label:t("recallLimit"),type:"number"}),(0,e.jsx)(Be,{k:"recallSummaryLen",label:t("recallSummaryLen"),hint:t("unitChars"),type:"number"}),(0,e.jsx)(Ze,{k:"recallIncludeBody",label:t("recallBody")}),(0,e.jsx)(Be,{k:"secretHint",label:t("secretHint")}),(0,e.jsx)(Be,{k:"recallEmbedding",label:t("recallEmbedding")})]})}),(0,e.jsx)(xt,{icon:"\u2B50",title:t("coreMemory"),sub:t("coreMemoryHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Ze,{k:"coreMemoryEnabled",label:t("coreMemoryEnabled")}),(0,e.jsx)(Be,{k:"coreMemoryLimit",label:t("coreMemoryLimit"),type:"number"}),(0,e.jsx)(Be,{k:"coreMemoryMaxChars",label:t("coreMemoryMaxChars"),type:"number"})]})}),(0,e.jsxs)(xt,{icon:"\u{1F9E9}",title:t("skillCards"),sub:t("skillCardsHint"),children:[(0,e.jsx)("div",{className:"mc-cfg-grid",children:(0,e.jsx)(Ze,{k:"skillCardsAutoSync",label:t("skillAutoSync")})}),(0,e.jsx)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!j,onClick:async()=>{Z("skills");try{let s=await fetch(W+"/skills/sync",{method:"POST"}).then(q=>q.json()).catch(()=>null);s&&s.ok?ee(t("skillsSyncDone")+"\uFF1A"+t("skillsScanned")+" "+(s.total||0)+" \xB7 "+t("skillsCreated")+" "+(s.created||0)+" \xB7 "+t("skillsUpdated")+" "+(s.updated||0)+" \xB7 "+t("skillsPendingUpdates")+" "+(s.pendingUpdates||0)):ee(s&&s.error||t("skillsSyncFail"),!1)}catch{ee(t("skillsSyncFail"),!1)}finally{Z("")}},children:j==="skills"?"\u23F3 "+t("syncingSkills"):"\u{1F9E9} "+t("syncSkills")})})]}),(0,e.jsx)(xt,{icon:"\u{1F520}",title:t("uiLayout"),sub:t("uiLayoutHint"),children:(0,e.jsx)("div",{className:"mc-cfg-grid",children:(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("uiLayout")}),(0,e.jsxs)("select",{value:D&&D.uiScale||"normal",onChange:s=>{let q=s.target.value;be("uiScale",q);try{window.dispatchEvent(new CustomEvent("me-ui-scale",{detail:q}))}catch{}},children:[(0,e.jsx)("option",{value:"compact",children:t("uiCompact")}),(0,e.jsx)("option",{value:"normal",children:t("uiNormal")}),(0,e.jsx)("option",{value:"large",children:t("uiLarge")})]})]})})}),(0,e.jsxs)(xt,{icon:"\u{1F5C2}\uFE0F",title:t("vaultMulti"),sub:t("cfgSubMulti"),children:[(0,e.jsxs)("div",{style:{fontSize:11.5,opacity:.85,marginBottom:8,lineHeight:1.7},children:[t("vaultNow"),"\uFF1A",(0,e.jsx)("code",{children:G?.vaultDir||"\u2014"}),G?.vaultName?`\uFF08${G.vaultName}\uFF09`:""," \xB7 ",t("vaultSource"),"\uFF1A",t(At[G?.vaultSource]||"vaultSrcDefault"),G?.workspace?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("br",{}),t("vaultWorkspace"),"\uFF1A",(0,e.jsx)("code",{children:G.workspace})]}):null]}),Ke(D).map((s,q)=>(0,e.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1.6fr 1.5fr auto",gap:6,marginBottom:6},children:[(0,e.jsx)("input",{value:s.name||"",placeholder:t("vaultNamePh"),onChange:oe=>et(q,"name",oe.target.value),style:Xe,disabled:y}),(0,e.jsx)("input",{value:s.path||"",placeholder:t("vaultPathPh"),onChange:oe=>et(q,"path",oe.target.value),style:Xe,disabled:y}),(0,e.jsx)("input",{value:s.match&&s.match.workspace||"",placeholder:t("vaultMatchPh"),onChange:oe=>et(q,"match",oe.target.value),style:Xe,disabled:y}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>dt(q),disabled:y,title:t("delete"),children:"\u2715"})]},q)),(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginTop:4},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:Lt,disabled:y,children:["\uFF0B ",t("vaultAdd")]}),(0,e.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12},children:[(0,e.jsx)("span",{style:{opacity:.6},children:t("vaultActive")}),(0,e.jsxs)("select",{value:D.activeVault||"",onChange:s=>be("activeVault",s.target.value),disabled:y,style:Xe,children:[(0,e.jsx)("option",{value:"",children:t("vaultActiveNone")}),Ke(D).filter(s=>s&&s.name).map(s=>(0,e.jsx)("option",{value:s.name,children:s.name},s.name))]})]})]})]}),(0,e.jsx)(xt,{icon:"\u{1F4B0}",title:t("costControl"),sub:t("costHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Ze,{k:"distillEnabled",label:t("distillEnabled")}),(0,e.jsx)(Ze,{k:"dedupByLLM",label:t("dedupByLLM")}),(0,e.jsx)(Be,{k:"captureMaxTokens",label:t("captureMaxTokens"),type:"number"}),(0,e.jsx)(Be,{k:"captureTimeoutMs",label:t("captureTimeoutMs"),type:"number"}),(0,e.jsx)(Be,{k:"recallMinScore",label:t("recallMinScore"),type:"number"}),(0,e.jsx)(Be,{k:"captureCooldownMs",label:t("captureCooldownMs"),type:"number"}),ie&&ie.ok===!1&&(0,e.jsxs)("div",{style:{gridColumn:"1 / -1",fontSize:11.5,color:"#b45309",background:"rgba(245,158,11,0.12)",border:"1px solid rgba(245,158,11,0.35)",borderRadius:8,padding:"6px 10px",lineHeight:1.6},children:["\u26A0 ",V("routeListFail",{err:ie.error||"\u672A\u77E5\u539F\u56E0"})]}),ie&&ie.providers&&ie.providers.length?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("captureProvider")}),(0,e.jsxs)("select",{value:D.captureProvider||"",onChange:s=>{be("captureProvider",s.target.value),be("captureModel","")},children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),ie.providers.map(s=>(0,e.jsx)("option",{value:s.id,children:s.label},s.id))]})]}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("captureModel")}),(0,e.jsxs)("select",{value:D.captureModel||"",onChange:s=>be("captureModel",s.target.value),children:[(0,e.jsx)("option",{value:"",children:t("routeAuto")}),((ie.providers.find(s=>s.id===D.captureProvider)||{}).models||[]).map(s=>(0,e.jsx)("option",{value:s.id,children:s.label||s.id},s.id))]})]})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Be,{k:"captureProvider",label:t("captureProvider")}),(0,e.jsx)(Be,{k:"captureModel",label:t("captureModel")})]}),(0,e.jsx)(Ze,{k:"captureFollowSession",label:t("captureFollowSession")}),(0,e.jsx)(Ze,{k:"captureFirstOnly",label:t("captureFirstOnly")}),(0,e.jsx)(Be,{k:"sessionBudgetChars",label:t("sessionBudgetChars"),type:"number"}),(0,e.jsx)("div",{style:{display:"flex",alignItems:"flex-end"},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!j,onClick:async()=>{Z("llmtest");try{let s=await fetch(W+"/llm-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:D.captureProvider||"",model:D.captureModel||"",firstOnly:D.captureFirstOnly===!0})}).then(q=>q.json());s&&s.ok?ee(t("llmTestOk")+"\uFF1A"+s.route.provider+(s.route.model?"/"+s.route.model:"")+" \xB7 "+s.ms+"ms \xB7 "+t("llmCandidates")+" "+s.candidates):ee(t("llmTestFail")+"\uFF1A"+(s&&(s.failure?s.failure.code+" "+s.failure.message:s.error)||"?"),!1)}catch(s){ee(t("llmTestFail")+"\uFF1A"+String(s&&s.message||s),!1)}finally{Z("")}},children:j==="llmtest"?t("exporting"):"\u{1F50C} "+t("llmTest")})})]})}),(0,e.jsx)(xt,{icon:"\u{1F6E1}\uFE0F",title:t("auditConfig"),sub:t("auditHint"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("auditMode")}),(0,e.jsxs)("select",{value:D.auditMode??"all",onChange:s=>be("auditMode",s.target.value),children:[(0,e.jsx)("option",{value:"all",children:t("auditAll")}),(0,e.jsx)("option",{value:"none",children:t("auditNone")})]})]}),(0,e.jsx)(Ya,{label:t("auditExemptAgents"),value:D.auditExemptAgents||[],options:[{value:"__all__",label:t("allExempt")},...(K?.agents||[]).filter(s=>!s.isDsh).map(s=>({value:s.name,label:s.name}))],onChange:s=>be("auditExemptAgents",s)}),(0,e.jsx)(Ya,{label:t("auditExemptKinds"),value:D.auditExemptKinds||[],options:[{value:"__all__",label:t("allExempt")},...oa.filter(s=>s!=="all"&&s!=="core"&&s!=="skill").map(s=>({value:s,label:t(Ge[s])}))],onChange:s=>be("auditExemptKinds",s)}),(0,e.jsx)(Be,{k:"recycleRetentionDays",label:t("recycleDays"),hint:t("unitDays"),type:"number"})]})}),(0,e.jsx)(xt,{icon:"\u{1F6E0}",title:t("serviceConfig"),sub:t("cfgSubService"),children:(0,e.jsxs)("div",{className:"mc-cfg-grid",children:[(0,e.jsx)(Ze,{k:"autoWeb",label:t("autoWeb")}),(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t("autoWebMode")}),(0,e.jsxs)("select",{value:D.autoWebMode??"init",onChange:s=>be("autoWebMode",s.target.value),children:[(0,e.jsx)("option",{value:"init",children:t("modeInit")}),(0,e.jsx)("option",{value:"interval",children:t("modeInterval")}),(0,e.jsx)("option",{value:"manual",children:t("modeManual")})]})]}),(0,e.jsx)(Be,{k:"webPort",label:t("webPort"),type:"number"}),(0,e.jsx)(Be,{k:"webCheckIntervalMs",label:t("webCheckIntervalMs"),type:"number"}),(0,e.jsx)(Be,{k:"webMaxRestart",label:t("webMaxRestart"),hint:t("unitTimes"),type:"number"}),(0,e.jsx)(Ze,{k:"watchdogAutoSpawn",label:t("watchdogAutoSpawn")}),(0,e.jsx)(Ze,{k:"autoRestartOnDrift",label:t("autoRestartOnDrift")}),(0,e.jsx)(Ze,{k:"autoMcpSetup",label:t("autoMcpSetup")})]})}),(0,e.jsxs)("div",{className:"mc-cfg-actions",children:[f?(0,e.jsx)("span",{className:"mc-cfg-dirty",children:t("cfgDirty")}):(0,e.jsxs)("span",{className:"mc-cfg-clean",children:["\u2713 ",t("cfgClean")]}),(0,e.jsx)("span",{className:"mc-cfg-spacer"}),j==="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,opacity:.75},children:["\u23F3 ",t("saving")]}),ce&&j!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#10b981"},children:["\u2705 ",ce]}),ne&&j!=="save"&&(0,e.jsxs)("span",{style:{fontSize:11.5,color:"#b91c1c"},children:["\u26A0 ",ne]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:Dt,disabled:!!j,children:t("reset")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:y?()=>ee(t("readonlyTitle")+"\uFF1A"+t("readonlyBody"),!1):Ae,disabled:j==="save",title:t(y?"readonlyBody":"saveConfig"),children:j==="save"?"\u23F3 "+t("saving"):y?"\u{1F512} "+t("readonlyBtn"):"\u{1F4BE} "+t("saveConfig")})]})]}):(0,e.jsx)("div",{style:{fontSize:12,opacity:.6},children:t("loading")})]})]})})}function Un({t,onReload:a,version:o}){let[d,c]=(0,n.useState)([]),[l,v]=(0,n.useState)([]),[x,k]=(0,n.useState)("all"),[I,D]=(0,n.useState)("all"),[M,y]=(0,n.useState)(""),[z,H]=(0,n.useState)(""),[O,F]=(0,n.useState)(new Set),[P,A]=(0,n.useState)(null),[G,re]=(0,n.useState)(""),[K,ae]=(0,n.useState)(null),[ne,J]=(0,n.useState)("pending"),j=(g,Y=!0)=>{ae({msg:g,ok:Y}),setTimeout(()=>ae(null),3e3)},Z=[...new Set([...d,...l].map(g=>g.submittedBy).filter(Boolean))],ce=(0,n.useCallback)(async()=>{try{let g=await fetch(`${W}/audit/list`).then(Y=>Y.json());g.ok&&(c(g.pending||[]),v(g.rejected||[]),F(new Set),de({}))}catch{}},[]);(0,n.useEffect)(()=>{ce()},[o,ce]);let Se=(ne==="pending"?d:l).filter(g=>{if(!ca(g,z)||x!=="all"&&g.kind!==x||I!=="all"&&Nt(g.submittedBy)!==I)return!1;if(M){let Y=ta(g.created);if(Y&&Y!==M)return!1}return!0}),ie=(0,n.useMemo)(()=>{let g=ne==="pending"?d:l,Y={all:0};return g.forEach(se=>{if(ca(se,z)&&!(I!=="all"&&Nt(se.submittedBy)!==I)){if(M){let Re=ta(se.created);if(Re&&Re!==M)return}Y.all++,Y[se.kind||"other"]=(Y[se.kind||"other"]||0)+1}}),Y},[d,l,ne,I,M,z]),De=g=>F(Y=>{let se=new Set(Y);return se.has(g)?se.delete(g):se.add(g),se}),m=async(g,Y,se={})=>{let Re=Y||[...O];if(!Re.length){j(t("noSelection"),!1);return}re("apply");let ee=g==="approved"?se.kind==="core"?t("approveCore"):t("toastApproved"):t(g==="rejected"?"toastRejected":"toastCardDeleted");try{let ze=0;for(let p of Re){let B=g==="approved"?"audit/approve":g==="rejected"?"audit/reject":"delete";try{let E=g==="approved"&&se.kind?{path:p,kind:se.kind}:null;(await fetch(W+"/"+B+(E?"":"?path="+encodeURIComponent(p)+(g==="delete"?"&permanent=0":"")),E?{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(E)}:void 0)).ok||ze++}catch{ze++}}await ce(),a&&a(),ze?j(t("toastFailed")+"\uFF08"+ze+"/"+Re.length+"\uFF09",!1):j(ee+" "+Re.length+" \u5F20")}catch(ze){j(t("toastFailed")+": "+String(ze&&ze.message||ze),!1)}finally{re("")}},[Ne,de]=(0,n.useState)({}),Pe=g=>Ne[g]||{},ge=[...O],$=Se.find(g=>g.path===P)||Se[0]||null,ke=$?Pe($.path):{};(0,n.useEffect)(()=>{let g=$;if(!g||Ne[g.path])return;let Y=!0,se=g.path;de(ee=>({...ee,[se]:{loading:!0}}));let Re=g.status||(ne==="pending"?"pending":"rejected");return fetch(`${W}/card?path=${encodeURIComponent(se)}&status=${Re}`).then(ee=>ee.json()).then(ee=>{Y&&(ee&&ee.ok?de(ze=>({...ze,[se]:{text:ee.text||""}})):de(ze=>({...ze,[se]:{error:ee&&ee.error||"HTTP"}})))}).catch(ee=>{Y&&de(ze=>({...ze,[se]:{error:String(ee&&ee.message||ee)}}))}),()=>{Y=!1}},[$&&$.path,ne]);let Te=async()=>{if(window.confirm(t("reclassify")+"\uFF1F\u53EA\u5904\u7406\u81EA\u52A8\u6C89\u6DC0\u7684\u5F85\u5BA1\u539F\u6587\u5361\uFF0C\u4E0D\u6539\u4EBA\u5DE5\u5361\u3002")){re("reclassify");try{let g=await fetch(W+"/reclassify").then(Y=>Y.json());g&&g.ok?j(t("reclassify")+"\uFF1A"+g.changed+" / "+g.scanned):j(t("toastFailed")+": "+(g&&g.error||"HTTP"),!1),await ce(),a&&a()}catch(g){j(t("toastFailed")+": "+String(g&&g.message||g),!1)}finally{re("")}}},T=()=>F(new Set),f=g=>{J(g),T()},S=["all",...oa.filter(g=>g!=="all")];return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Je}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(ia,{toast:K}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-audithead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"REVIEW INBOX"}),(0,e.jsx)("h1",{children:t("tabAudit")}),(0,e.jsx)("p",{children:t("auditInboxSub")})]}),(0,e.jsxs)("span",{className:"mc-v5-pagecount",children:[d.length," \u5F20"]}),(0,e.jsxs)("span",{className:"mc-v5-audit-trust",children:["\u{1F6E1} ",t("auditUndo")]})]}),(0,e.jsxs)("div",{className:"me-audit",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-filtercard",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{className:"me-audit-filter-row",children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F6E1}\uFE0F ",t("tabAudit")]}),(0,e.jsx)("input",{type:"text",value:z,onChange:g=>{H(g.target.value),T(),A(null)},placeholder:t("auditSearchPlaceholder"),"aria-label":t("auditSearchPlaceholder"),style:{flex:"1 1 220px",minWidth:160,padding:"5px 9px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",fontSize:12}}),z&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>{H(""),T(),A(null)},title:t("clearFilter"),children:"\u2715"}),(0,e.jsxs)("select",{value:I,onChange:g=>{D(g.target.value),T()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"},children:[(0,e.jsx)("option",{value:"all",children:t("allAgents")}),Qa(Z).map(g=>(0,e.jsx)("option",{value:g,children:g},g))]}),(0,e.jsx)("input",{type:"date",value:M,onChange:g=>{y(g.target.value),T()},style:{fontSize:12,padding:"4px 8px",borderRadius:8,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",border:"1px solid var(--dsw-alias-border-l2, #d1d5db)"}})]}),(0,e.jsxs)("div",{className:"me-audit-types-top",children:[(0,e.jsx)("span",{className:"me-audit-types-label",children:t("auditTypeLabel")}),S.map(g=>{let Y=g==="all"?"var(--dsw-alias-label-secondary, #9ca3af)":qe[g]||"#6B7280";return(0,e.jsxs)("button",{type:"button",className:`me-audit-kind${x===g?" active":""}`,onClick:()=>{k(g),T()},children:[(0,e.jsx)("span",{className:"me-audit-kind-dot",style:{background:Y}}),(0,e.jsx)("span",{className:"me-audit-kind-name",children:t(g==="all"?"all":Ge[g])}),(0,e.jsx)("span",{className:"me-audit-kind-count",children:ie[g]||0})]},g)})]})]}),(0,e.jsxs)("div",{className:"me-audit-main",children:[(0,e.jsxs)("div",{className:"me-audit-queue",children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("button",{type:"button",className:`mc-btn${ne==="pending"?" me-on":""}`,onClick:()=>f("pending"),children:[t("pending"),"\uFF08",d.length,"\uFF09"]}),(0,e.jsxs)("button",{type:"button",className:`mc-btn${ne==="rejected"?" me-on":""}`,onClick:()=>f("rejected"),children:[t("rejected"),"\uFF08",l.length,"\uFF09"]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("label",{style:{fontSize:12},children:[(0,e.jsx)("input",{type:"checkbox",checked:Se.length>0&&ge.length===Se.length,onChange:g=>{g.target.checked?F(new Set(Se.map(Y=>Y.path))):F(new Set)}})," ",t("selectAll"),"\uFF08",Se.length,"\uFF09"]}),(0,e.jsxs)("span",{style:{fontSize:11,opacity:.65},children:[t("auditSelected")," ",ge.length]}),ne==="pending"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!G,onClick:Te,children:["\u{1F527} ",t("reclassify")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!ge.length||!!G,onClick:()=>m("approved"),children:["\u2713 ",t(ne==="rejected"?"restore":"approve")]}),ne==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!ge.length||!!G,onClick:()=>m("rejected"),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!ge.length||!!G,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&m("delete")},children:["\u{1F5D1} ",t("restoreDelete")]}),ge.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:T,children:t("auditClearSelection")})]}),Se.length?(0,e.jsx)("div",{className:"mc-card",style:{display:"flex",flexDirection:"column"},children:Se.map(g=>{let Y=qe[g.kind]||"#6B7280";return(0,e.jsx)("div",{className:`me-audit-row${g.kind==="core"?" core":""}${$&&$.path===g.path?" active":""}`,children:(0,e.jsxs)("div",{className:"me-audit-row-main",onClick:()=>A(g.path),children:[(0,e.jsx)("input",{type:"checkbox",checked:O.has(g.path),onClick:se=>se.stopPropagation(),onChange:()=>De(g.path)}),(0,e.jsx)("span",{className:"me-audit-row-tile",style:{color:Y,borderColor:Y+"38",background:Y+"18"},children:Ct[g.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"me-audit-row-copy",children:[(0,e.jsxs)("div",{className:"me-audit-row-top",children:[(0,e.jsx)("span",{className:`me-audit-row-kind${g.kind==="core"?" core":""}`,children:g.kind==="core"?"\u2B50 "+t("kindCore"):t(Ge[g.kind]||"kindKnowledge")}),(0,e.jsx)("span",{className:`me-audit-row-state ${ne==="pending"?"pending":"rejected"}`,children:ne==="pending"?"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"me-audit-row-time",children:pa(g.created)||"-"})]}),(0,e.jsx)("button",{type:"button",className:"me-audit-row-title",title:g.title,onClick:()=>A(g.path),children:g.title}),(g.reason||g.summary)&&(0,e.jsx)("p",{className:"me-audit-row-reason",children:g.reason||g.summary}),(0,e.jsxs)("div",{className:"me-audit-row-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",Nt(g.submittedBy)]}),(Array.isArray(g.tags)?g.tags:[]).slice(0,3).map(se=>(0,e.jsxs)("span",{children:["#",se]},se))]})]}),(0,e.jsx)("div",{className:"me-audit-row-actions",onClick:se=>se.stopPropagation(),children:ne==="pending"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>m("approved",[g.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},onClick:()=>m("rejected",[g.path]),children:"\u2715"})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},title:t("restore"),onClick:()=>m("approved",[g.path]),children:"\u2713"}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px",color:"#f87171"},title:t("restoreDelete"),onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&m("delete",[g.path])},children:"\u{1F5D1}"})]})})]})},g.path)})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:20,textAlign:"center"},children:t(z?"auditNoMatch":"noAuditItems")})]}),(0,e.jsx)("aside",{className:"me-audit-preview",children:$?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"me-audit-preview-head",children:[(0,e.jsxs)("div",{className:"me-audit-preview-top",children:[(0,e.jsxs)("span",{className:"me-audit-kind-badge",style:{color:qe[$.kind]||"#6B7280",borderColor:(qe[$.kind]||"#6B7280")+"59",background:(qe[$.kind]||"#6B7280")+"1a"},children:[Ct[$.kind]||"\u{1F4CE}"," ",t(Ge[$.kind]||"kindKnowledge")]}),(0,e.jsx)("span",{className:`md-chip ${ne==="pending"?"md-chip-st-warn":"md-chip-st-bad"}`,children:ne==="pending"?$.kind==="core"?"\u2B50 "+t("coreSuggested"):"\u23F3 "+t("statusPending"):"\u26D4 "+t("statusRejected")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.55},children:pa($.created)})]}),(0,e.jsx)("h3",{children:$.title}),(0,e.jsxs)("div",{className:"me-audit-preview-meta",children:[(0,e.jsxs)("span",{children:["\u{1F916} ",Nt($.submittedBy)]}),!!$.reason&&(0,e.jsxs)("span",{className:"me-audit-preview-reason",children:["\u2691 ",$.reason]}),(Array.isArray($.tags)?$.tags:[]).slice(0,5).map(g=>(0,e.jsxs)("span",{children:["#",g]},g))]})]}),(0,e.jsxs)("div",{className:"me-audit-preview-body",children:[ke.loading&&(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t("loading")}),ke.error&&(0,e.jsxs)("div",{className:"me-audit-preview-empty",style:{color:"#f87171"},children:["\u26A0 ",t("auditBodyFail"),"\uFF1A",ke.error]}),ke.text!=null?(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:_t(Ca(Qt(ke.text).body,$.title))}}):!ke.loading&&(0,e.jsx)("p",{className:"me-audit-preview-summary",children:$.summary||""})]}),(0,e.jsxs)("div",{className:"me-audit-preview-actions",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",disabled:!!G,onClick:()=>m("approved",[$.path]),children:["\u2713 ",ne==="rejected"?t("restore"):$.kind==="core"?t("approveCore"):t("approve")]}),ne==="pending"&&$.kind!=="core"&&(0,e.jsxs)("button",{type:"button",className:"mc-btn me-core-btn",disabled:!!G,onClick:()=>m("approved",[$.path],{kind:"core"}),children:["\u2B50 ",t("approveAndCore")]}),ne==="pending"&&$.kind==="core"&&(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!G,onClick:()=>m("approved",[$.path],{kind:"knowledge"}),children:t("approveAsNormal")}),ne==="pending"?(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!G,onClick:()=>m("rejected",[$.path]),children:["\u2715 ",t("reject")]}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!G,onClick:()=>{window.confirm(t("recycleDeleteConfirm"))&&m("delete",[$.path])},children:["\u{1F5D1} ",t("restoreDelete")]})]})]}):(0,e.jsx)("div",{className:"me-audit-preview-empty",children:t(z?"auditNoMatch":"noAuditItems")})})]})]})]})]})}var $n={title:"",date:"",category:"",source:"",url:"",tags:"",pinned:!1,body:""};function va(){let t=new Date;return t.getFullYear()+"-"+String(t.getMonth()+1).padStart(2,"0")+"-"+String(t.getDate()).padStart(2,"0")}function xa(t){try{let a=new URL(String(t||""));return a.protocol==="http:"||a.protocol==="https:"?a.href:""}catch{return""}}function Gn(t,a){let o=String(t||"").slice(0,10);if(!o)return a("newsEarlier");if(o===va())return a("newsToday");let d=new Date;d.setDate(d.getDate()-1);let c=d.getFullYear()+"-"+String(d.getMonth()+1).padStart(2,"0")+"-"+String(d.getDate()).padStart(2,"0");return o===c?a("newsYesterday"):o}function _a({item:t,t:a,active:o,onOpen:d,onEdit:c,onToggleRead:l,onDelete:v}){return(0,e.jsxs)("article",{className:"mc-news-card"+(t.pinned?" pinned":"")+(t.read?"":" unread")+(o?" active":""),onClick:()=>d(t),children:[(0,e.jsxs)("div",{className:"mc-news-top",children:[!t.read&&(0,e.jsx)("span",{className:"mc-news-dot",title:a("newsUnread")}),(0,e.jsx)("span",{className:"mc-news-cat",children:t.category||a("newsCategoryField")}),t.pinned&&(0,e.jsxs)("span",{className:"mc-news-pin",children:["\u{1F4CC} ",a("newsPinned")]}),(0,e.jsx)("span",{className:"mc-news-time",children:t.date||(t.updated||"").slice(0,10)})]}),(0,e.jsx)("h3",{className:"mc-news-title",children:t.title}),t.excerpt&&(0,e.jsx)("p",{className:"mc-news-excerpt",children:t.excerpt}),(0,e.jsxs)("div",{className:"mc-news-meta",children:[t.source&&(0,e.jsx)("span",{children:t.source}),(t.tags||[]).slice(0,3).map(x=>(0,e.jsxs)("span",{children:["#",x]},x)),(0,e.jsx)("span",{style:{marginLeft:"auto",opacity:.72},children:t.read?a("newsRead"):a("newsUnread")}),(0,e.jsxs)("span",{className:"mc-news-actions",onClick:x=>x.stopPropagation(),children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>l(t),children:t.read?a("newsMarkUnread"):a("newsMarkRead")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>c(t),children:a("newsEdit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>v(t),title:a("delete"),children:"\u2715"})]})]})]})}function Kn(t,a){let o=Date.now()-Number(t||0);if(!Number.isFinite(o)||o<0)return"";let d=Math.floor(o/6e4);if(d<1)return a("newsJustNow");if(d<60)return d+" "+a("newsMinutesAgo");let c=Math.floor(d/60);if(c<24)return c+" "+a("newsHoursAgo");let l=Math.floor(c/24);return l<7?l+" "+a("newsDaysAgo"):new Date(Number(t)).toISOString().slice(0,10)}var Rt="me.news.lastQuery",$t="me.news.prefs",en="me.news.view",Yn={model:"\u6A21",product:"\u54C1",research:"\u7814",opensource:"\u6E90",industry:"\u4E1A",policy:"\u7B56",other:"\u8BAF"},Vn=new Set(["the","a","an","of","to","for","and","in","on","is","are","with","how","why","new","its","it","as","at","by","from"]);function Na(t,a){try{let o=localStorage.getItem(t);if(o===null)return a;try{return JSON.parse(o)}catch{return o}}catch{return a}}function wt(t,a){try{localStorage.setItem(t,JSON.stringify(a))}catch{}}function ga(t,a=""){let o=Na(t,a);return typeof o=="string"?o:a}function Ua(){let t=Na(en,null);return t&&typeof t=="object"?t:{}}function wa(){return{types:{},sources:{},terms:{},opens:0,updatedAt:0}}function qn(){let t=Na($t,null);return!t||typeof t!="object"?wa():{...wa(),...t,types:t.types||{},sources:t.sources||{},terms:t.terms||{}}}function tn(t){let a=[];for(let o of String(t||"").toLowerCase().split(/[^0-9a-z\u4e00-\u9fff]+/))!o||o.length<2||Vn.has(o)||a.push(o);return a}function na(t,a,o){a&&(t[a]=Math.min(60,(Number(t[a])||0)+o))}function Jn(t,a,o){let d={...o,types:{...o.types},sources:{...o.sources},terms:{...o.terms}};return t&&(na(d.types,t.type,a),na(d.sources,t.sourceId,a),tn(t.title).slice(0,6).forEach(c=>na(d.terms,c,1)),d.opens=(Number(o.opens)||0)+1),d.updatedAt=Date.now(),d}function $a(t,a){let o={...t,terms:{...t.terms}};return tn(a).forEach(d=>na(o.terms,d,3)),o.updatedAt=Date.now(),o}function Xn(t){let a=0;for(let o of String(t||""))a=(a*31+o.charCodeAt(0))%360;return a}function Qn(t){let a=String(t||"\u65B0\u95FB");if(/^[A-Za-z]/.test(a)){let o=a.split(/\s+/);return(o.length>1?o[0][0]+o[1][0]:a.slice(0,2)).toUpperCase()}return a.slice(0,1)}function Ga(t,a,o){let d=Math.max(0,(Date.now()-Number(t.publishedAt||0))/36e5),c=100-Math.min(60,d*.28);c+=(Number(a.types[t.type])||0)*1.6,c+=(Number(a.sources[t.sourceId])||0)*1.1;let l=(t.title+" "+(t.summary||"")).toLowerCase();for(let[x,k]of Object.entries(a.terms))l.includes(x)&&(c+=Math.min(8,Number(k)||0)*.9);let v=String(o||"").trim().toLowerCase();if(v)for(let x of v.split(/\s+/).filter(Boolean))String(t.title||"").toLowerCase().includes(x)?c+=16:l.includes(x)&&(c+=8);return c}function Zn({t,mode:a,version:o}){let[d,c]=(0,n.useState)([]),[l,v]=(0,n.useState)([]),[x,k]=(0,n.useState)(!0),[I,D]=(0,n.useState)(0),[M,y]=(0,n.useState)([]),[z,H]=(0,n.useState)(""),[O,F]=(0,n.useState)(null),[P,A]=(0,n.useState)(()=>ga(Rt)),[G,re]=(0,n.useState)(()=>ga(Rt).trim()),[K,ae]=(0,n.useState)(""),[ne,J]=(0,n.useState)(()=>{let N=Ua();return typeof N.lang=="string"?N.lang:"zh"}),[j,Z]=(0,n.useState)(()=>Ua().sort==="time"?"time":"rec"),[ce,Se]=(0,n.useState)(qn),[ie,De]=(0,n.useState)(!1),m=(N,L=!0)=>{F({msg:N,ok:L}),setTimeout(()=>F(null),3200)},Ne=(0,n.useRef)(!1),de=(0,n.useRef)(ga(Rt).trim());(0,n.useEffect)(()=>{let N=setTimeout(()=>{let L=P.trim();re(L),Ne.current&&(wt(Rt,L),!(!L||L===de.current)&&(de.current=L,Se(X=>{let fe=$a(X,L);return wt($t,fe),fe})))},260);return()=>clearTimeout(N)},[P]),(0,n.useEffect)(()=>{wt(en,{lang:ne,sort:j})},[ne,j]),(0,n.useEffect)(()=>{De(!0);let N=setTimeout(()=>De(!1),170);return()=>clearTimeout(N)},[K,ne,G,j]);let Pe=(0,n.useCallback)(async()=>{k(!0),H("");try{let N=new URLSearchParams({period:a==="month"?"month":"today",lang:"all"}),L=await fetch(W+"/news/feed?"+N.toString()).then(X=>X.json());if(!L||!L.ok)throw new Error(L&&L.error||t("newsFeedError"));c(L.items||[]),v(L.types||[]),D(Number(L.fetchedAt)||0),y(L.errors||[])}catch(N){let L=N&&N.message||t("newsFeedError");H(L),m(L,!1)}finally{k(!1)}},[a,t]);(0,n.useEffect)(()=>{Pe()},[o,Pe]);let ge=async()=>{k(!0);try{let N=await fetch(W+"/news/feed/refresh",{method:"POST"}).then(L=>L.json());if(!N||!N.ok)throw new Error(N&&N.error||t("newsFeedError"));await Pe(),m(t("newsUpdatedAt")+" "+new Date().toLocaleTimeString())}catch(N){let L=N&&N.message||t("newsFeedError");H(L),m(L,!1),k(!1)}},$=N=>(l.find(L=>L.id===N)||{}).label||t("all"),ke=(d||[]).filter(N=>!ne||N.lang===ne),Te={};for(let N of ke)Te[N.type]=(Te[N.type]||0)+1;let T=K?ke.filter(N=>N.type===K):ke;if(G){let N=G.toLowerCase().split(/\s+/).filter(Boolean);T=T.filter(L=>{let X=[L.title,L.summary,L.source,$(L.type)].join(" ").toLowerCase();return N.every(fe=>X.includes(fe))})}let f=N=>(Number(N.points)||0)+(Number(N.comments)||0)*2,S=a==="month",g=S?T.filter(N=>(N.points||0)>0):[],Y=S&&g.length>0,se=new Map;Y&&g.slice().sort((N,L)=>(L.points||0)-(N.points||0)||(L.comments||0)-(N.comments||0)).forEach((N,L)=>se.set(N.id||N.url||N.title,L+1)),T=T.slice().sort((N,L)=>j==="time"?(L.publishedAt||0)-(N.publishedAt||0):S&&Y?(L.points||0)-(N.points||0)||(L.comments||0)-(N.comments||0)||(L.publishedAt||0)-(N.publishedAt||0):Ga(L,ce,G)-Ga(N,ce,G));let Re=Object.keys(ce.types||{}).sort((N,L)=>(ce.types[L]||0)-(ce.types[N]||0)).slice(0,3),ee=Object.keys(ce.terms||{}).sort((N,L)=>(ce.terms[L]||0)-(ce.terms[N]||0)).slice(0,4),ze=!!G||Re.length>0||ee.length>0,p=N=>{Ne.current=!0;let L=String(N??"").trim();re(L),wt(Rt,L),!(!L||L===de.current)&&(de.current=L,Se(X=>{let fe=$a(X,L);return wt($t,fe),fe}))},B=()=>{Ne.current=!1,de.current="",ae(""),J(""),A(""),re(""),wt(Rt,"")},E=N=>Se(L=>{let X=Jn(N,4,L);return wt($t,X),X}),le=()=>{let N=wa();wt($t,N),wt(Rt,""),de.current="",Ne.current=!1,Se(N),A(""),re("")};return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)(ia,{toast:O}),(0,e.jsxs)("div",{className:"mc-news-hero",children:[(0,e.jsx)("div",{className:"mc-news-hero-eye",children:t("newsHeroEye")}),(0,e.jsxs)("div",{className:"mc-news-hero-search",children:[(0,e.jsx)("span",{"aria-hidden":"true",style:{fontSize:15,opacity:.75},children:"\u{1F50E}"}),(0,e.jsx)("input",{type:"text",value:P,onChange:N=>{Ne.current=!0,A(N.target.value)},onKeyDown:N=>{N.key==="Enter"&&p(P)},placeholder:t("newsSearch"),"aria-label":t("newsSearch")}),P?(0,e.jsx)("button",{type:"button",className:"mc-news-hero-clear",title:t("cancel"),onClick:()=>{A(""),p("")},children:"\u2715"}):null,(0,e.jsx)("button",{type:"button",className:"mc-news-hero-go",onClick:()=>p(P),children:t("newsSearchGo")})]}),(0,e.jsx)("div",{className:"mc-news-hero-hint",children:t("newsHeroHint")})]}),ze?(0,e.jsxs)("div",{className:"mc-news-pref",children:[(0,e.jsxs)("span",{children:["\u{1F3AF} ",t("newsPersonalized")]}),G?(0,e.jsxs)("span",{children:["\xB7 ",t("newsLastQuery")," ",(0,e.jsx)("b",{children:G})]}):null,ee.length>0?(0,e.jsxs)("span",{children:["\xB7 ",ee.join(" / ")]}):null,Re.length>0?(0,e.jsxs)("span",{children:["\xB7 ",Re.map($).join(" / ")]}):null,(0,e.jsx)("span",{className:"mc-news-pref-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:le,children:t("newsResetPrefs")})})]}):null,(0,e.jsxs)("div",{className:"mc-news-feed-toolbar",children:[(0,e.jsxs)("div",{className:"mc-news-pills",children:[(0,e.jsxs)("button",{type:"button",className:"mc-news-pill"+(K===""?" on":""),onClick:()=>ae(""),children:[t("all"),(0,e.jsx)("span",{className:"mc-news-pill-count",children:ke.length})]}),l.map(N=>Te[N.id]?(0,e.jsxs)("button",{type:"button",className:"mc-news-pill"+(K===N.id?" on":""),onClick:()=>ae(K===N.id?"":N.id),children:[N.label,(0,e.jsx)("span",{className:"mc-news-pill-count",children:Te[N.id]})]},N.id):null)]}),(0,e.jsxs)("span",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-chip"+(ne==="zh"?" active":""),onClick:()=>J("zh"),children:t("newsLangZh")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(ne==="en"?" active":""),onClick:()=>J("en"),children:t("newsLangEn")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(ne===""?" active":""),onClick:()=>J(""),children:t("newsLangAll")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(j==="rec"?" active":""),onClick:()=>Z("rec"),children:t("newsSortRec")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(j==="time"?" active":""),onClick:()=>Z("time"),children:t("newsSortTime")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:x,onClick:ge,children:t(x?"newsLoading":"newsFeedRefresh")})]})]}),(0,e.jsxs)("div",{className:"mc-news-feed-meta",style:{margin:"0 0 8px"},children:[I?t("newsUpdatedAt")+" "+new Date(I).toLocaleTimeString():"",x?"":" \xB7 "+T.length+" "+t("newsMatched")]}),a==="month"&&(0,e.jsx)("div",{className:"mc-news-feed-warn",style:{color:"var(--dsw-alias-label-secondary, #6b7280)",background:"transparent",borderColor:"var(--dsw-alias-border-l1, #e5e7eb)"},children:t(Y?"newsEnRanking":"newsZhArchive")}),z&&!x&&(0,e.jsxs)("div",{className:"mc-news-feed-warn",style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[(0,e.jsxs)("span",{children:["\u26A0 ",z]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ge,children:t("newsRetry")})]}),M.length>0&&(0,e.jsxs)("div",{className:"mc-news-feed-warn",children:["\u26A0 ",t("newsPartialFail"),"\uFF1A",M.slice(0,2).join("\uFF1B")]}),x?(0,e.jsxs)("div",{className:"mc-card mc-news-feed-empty mc-news-loading-card",role:"status","aria-live":"polite",children:[(0,e.jsx)(ra,{}),(0,e.jsx)("span",{children:t("newsLoading")}),(0,e.jsx)("small",{children:t("newsLoadingHint")})]}):d.length===0?(0,e.jsxs)("div",{className:"mc-card mc-news-feed-empty",children:[(0,e.jsx)("div",{children:t("newsFeedEmpty")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",style:{marginTop:10},onClick:ge,children:t("newsFeedRefresh")})]}):T.length===0?(0,e.jsxs)("div",{className:"mc-card mc-news-feed-empty mc-news-nomatch",children:[(0,e.jsx)("div",{children:t("newsNoMatch")}),(0,e.jsx)("p",{style:{margin:"6px 0 0",fontSize:11.5,lineHeight:1.6,opacity:.75},children:t("newsNoMatchHint")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",style:{marginTop:10},onClick:B,children:t("newsClearFilters")})]}):(0,e.jsx)("div",{className:"mc-news-grid"+(ie?" is-swapping":""),children:T.map((N,L)=>{let X=xa(N.url),fe=$(N.type),Ce=xa(N.image),b=Y&&se.get(N.id||N.url||N.title)||0,u=Y&&b>0&&b<=3;return(0,e.jsxs)("a",{className:"mc-news-tile",style:{"--i":Math.min(L,14)},href:X||void 0,target:X?"_blank":void 0,rel:"noopener noreferrer",onClick:()=>E(N),children:[(0,e.jsxs)("span",{className:"mc-news-tile-cover",children:[Ce?(0,e.jsx)("img",{className:"mc-news-tile-img",src:Ce,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:V=>{let me=V.currentTarget;me.style.display="none",me.nextElementSibling&&(me.nextElementSibling.style.display="grid")}}):null,(0,e.jsxs)("span",{className:"mc-news-tile-gen",style:{"--hue":Xn(N.title),display:Ce?"none":"grid"},children:[(0,e.jsx)("b",{children:Yn[N.type]||"\u8BAF"}),(0,e.jsx)("small",{children:fe}),(0,e.jsxs)("em",{children:[(0,e.jsx)("i",{children:Qn(N.source)}),N.source]})]}),(0,e.jsx)("span",{className:"mc-news-tile-badge"+(u?" hot":""),children:b?"#"+b:fe}),(0,e.jsx)("span",{className:"mc-news-tile-time",children:Kn(N.publishedAt,t)})]}),(0,e.jsxs)("span",{className:"mc-news-tile-body",children:[(0,e.jsx)("span",{className:"mc-news-tile-title",children:N.title}),N.summary?(0,e.jsx)("span",{className:"mc-news-tile-summary",children:N.summary}):null,(0,e.jsxs)("span",{className:"mc-news-tile-foot",children:[(0,e.jsx)("i",{className:"mc-news-tile-dot"}),(0,e.jsx)("span",{children:N.source}),b?(0,e.jsxs)("span",{children:["\xB7 \u{1F525} ",t("newsHeat")," ",f(N)]}):null,(0,e.jsxs)("span",{className:"mc-news-tile-open",children:[t("newsOriginal")," \u2197"]})]})]})]},N.id||N.url||N.title)})})]})}function eo({t,version:a,onUnreadChange:o}){let[d,c]=(0,n.useState)("daily"),l=d==="month"?"newsMonthlySub":d==="mine"?"newsMineSub":"newsDailySub";return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)("div",{className:"mc-v5-pagehead",children:(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"NEWSROOM"}),(0,e.jsx)("h1",{children:t("newsTitle")}),(0,e.jsx)("p",{children:t(l)})]})}),(0,e.jsxs)("div",{className:"mc-news-modes",children:[(0,e.jsx)("button",{type:"button",className:"mc-news-mode"+(d==="daily"?" active":""),onClick:()=>c("daily"),children:t("newsDaily")}),(0,e.jsx)("button",{type:"button",className:"mc-news-mode"+(d==="month"?" active":""),onClick:()=>c("month"),children:t("newsMonthly")}),(0,e.jsx)("button",{type:"button",className:"mc-news-mode"+(d==="mine"?" active":""),onClick:()=>c("mine"),children:t("newsMine")})]}),d==="mine"?(0,e.jsx)(to,{t,version:a,onUnreadChange:o}):(0,e.jsx)(Zn,{t,mode:d,version:a})]})}function to({t,version:a,onUnreadChange:o}){let[d,c]=(0,n.useState)([]),[l,v]=(0,n.useState)([]),[x,k]=(0,n.useState)({all:0,unread:0}),[I,D]=(0,n.useState)(""),[M,y]=(0,n.useState)(""),[z,H]=(0,n.useState)(""),[O,F]=(0,n.useState)(!1),[P,A]=(0,n.useState)(""),[G,re]=(0,n.useState)(null),[K,ae]=(0,n.useState)(null),[ne,J]=(0,n.useState)(!1),[j,Z]=(0,n.useState)(""),[ce,Se]=(0,n.useState)(null),ie=(f,S=!0)=>{Se({msg:f,ok:S}),setTimeout(()=>Se(null),2600)};(0,n.useEffect)(()=>{let f=setTimeout(()=>y(I.trim()),220);return()=>clearTimeout(f)},[I]);let De=(0,n.useCallback)(async()=>{let f=new URLSearchParams;M&&f.set("q",M),z&&f.set("category",z),O&&f.set("unread","1");try{let S=await fetch(W+"/news?"+f.toString()).then(g=>g.json());if(!S||!S.ok)throw new Error(S&&S.error||"load failed");c(S.items||[]),v(S.categories||[]),k(S.counts||{all:0,unread:0}),o&&o(Number((S.counts||{}).unread)||0)}catch{ie(t("newsSaveFail"),!1)}},[M,z,O,o,t]);(0,n.useEffect)(()=>{De()},[a,De]);let m=async f=>{A(f.id);try{let S=await fetch(W+"/news/item?id="+encodeURIComponent(f.id)).then(g=>g.json());if(!S||!S.ok)throw new Error(S&&S.error||"load failed");re(S.item),S.item.read||await Ne(f.id,!0)}catch{ie(t("newsSaveFail"),!1)}},Ne=async(f,S)=>{try{let g=await fetch(W+"/news/read",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:f,read:S})}).then(Y=>Y.json());if(!g||!g.ok)throw new Error(g&&g.error||"read failed");re(Y=>Y&&Y.id===f?{...Y,read:!!S}:Y),await De()}catch{ie(t("newsSaveFail"),!1)}},de=async f=>{if(J(!1),f){let S=f;if(!S.body)try{let g=await fetch(W+"/news/item?id="+encodeURIComponent(S.id)).then(Y=>Y.json());g&&g.ok&&(S=g.item)}catch{}ae({id:S.id,title:S.title||"",date:S.date||va(),category:S.category||"",source:S.source||"",url:S.url||"",tags:(S.tags||[]).join(", "),pinned:!!S.pinned,body:S.body||"",created:S.created||""})}else ae({...$n,date:va()})},Pe=async()=>{if(K){if(!String(K.title||"").trim()||!String(K.body||"").trim()){ie(t("newsSaveFail"),!1);return}Z("save");try{let f={id:K.id||void 0,title:K.title,date:K.date,category:K.category,source:K.source,url:K.url,tags:String(K.tags||"").split(",").map(g=>g.trim()).filter(Boolean),pinned:!!K.pinned,body:K.body,created:K.created},S=await fetch(W+"/news/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)}).then(g=>g.json());if(!S||!S.ok)throw new Error(S&&S.error||"save failed");ae(null),A(S.item.id),re(S.item),await De(),ie(t("newsSaved"))}catch(f){ie(f&&f.message||t("newsSaveFail"),!1)}finally{Z("")}}},ge=async f=>{if(window.confirm(t("newsDeleteConfirm"))){Z("delete");try{let S=await fetch(W+"/news/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:f.id})}).then(g=>g.json());if(!S||!S.ok)throw new Error(S&&S.error||"delete failed");P===f.id&&(A(""),re(null)),await De(),ie(t("newsDeleted"))}catch{ie(t("newsSaveFail"),!1)}finally{Z("")}}},$=d.filter(f=>f.pinned),ke=d.filter(f=>!f.pinned),Te=G?xa(G.url):"",T="";return(0,e.jsxs)("div",{className:"mc-news",children:[(0,e.jsx)(ia,{toast:ce}),(0,e.jsxs)("div",{className:"mc-news-toolbar",children:[(0,e.jsxs)("span",{className:"mc-news-feed-meta",style:{marginLeft:0},children:[x.all," ",t("newsCountUnit")," \xB7 ",x.unread," ",t("newsUnread")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>de(null),children:["\uFF0B ",t("newsNew")]}),(0,e.jsx)("input",{className:"mc-news-search",type:"text",value:I,onChange:f=>D(f.target.value),placeholder:t("newsSearch"),"aria-label":t("newsSearch")}),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(z===""?" active":""),onClick:()=>H(""),children:t("all")}),l.map(f=>(0,e.jsx)("button",{type:"button",className:"mc-chip"+(z===f?" active":""),onClick:()=>H(S=>S===f?"":f),children:f},f)),(0,e.jsx)("button",{type:"button",className:"mc-chip"+(O?" active":""),onClick:()=>F(f=>!f),children:t("newsUnreadOnly")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>De(),children:t("refresh")})]}),(0,e.jsxs)("div",{className:"mc-news-main",children:[(0,e.jsx)("div",{className:"mc-news-list",children:d.length===0?(0,e.jsxs)("div",{className:"mc-card mc-news-empty",children:[t(I||z||O?"newsNoMatch":"newsEmpty"),!I&&!z&&!O&&(0,e.jsx)("div",{style:{marginTop:10},children:(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>de(null),children:["\uFF0B ",t("newsNew")]})})]}):(0,e.jsxs)(e.Fragment,{children:[$.length>0&&(0,e.jsxs)("div",{className:"mc-news-group",children:[(0,e.jsxs)("div",{className:"mc-news-group-label",children:["\u{1F4CC} ",t("newsPinned")]}),$.map(f=>(0,e.jsx)(_a,{item:f,t,active:P===f.id,onOpen:m,onEdit:S=>de(S),onToggleRead:S=>Ne(S.id,!S.read),onDelete:ge},f.id))]}),(0,e.jsx)("div",{className:"mc-news-group",children:ke.map(f=>{let S=Gn(f.date,t),g=S!==T;return T=S,(0,e.jsxs)(n.default.Fragment,{children:[g&&(0,e.jsx)("div",{className:"mc-news-group-label",children:S}),(0,e.jsx)(_a,{item:f,t,active:P===f.id,onOpen:m,onEdit:Y=>de(Y),onToggleRead:Y=>Ne(Y.id,!Y.read),onDelete:ge})]},f.id)})})]})}),G&&(0,e.jsxs)("aside",{className:"mc-news-reader",children:[(0,e.jsxs)("div",{className:"mc-news-reader-head",children:[(0,e.jsx)("span",{className:"mc-news-cat",children:G.category||t("newsCategoryField")}),G.pinned&&(0,e.jsxs)("span",{className:"mc-news-pin",children:["\u{1F4CC} ",t("newsPinned")]}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>{re(null),A("")},title:t("close"),children:"\u2715"})]}),(0,e.jsx)("h2",{children:G.title}),(0,e.jsxs)("div",{className:"mc-news-reader-meta",children:[(0,e.jsx)("span",{children:G.date||""}),G.source&&(0,e.jsxs)("span",{children:["\xB7 ",G.source]}),(0,e.jsxs)("span",{children:["\xB7 ",G.read?t("newsRead"):t("newsUnread")]}),(G.tags||[]).map(f=>(0,e.jsxs)("span",{children:["#",f]},f))]}),Te&&(0,e.jsx)("div",{style:{marginTop:8},children:(0,e.jsxs)("a",{className:"mc-btn",style:{textDecoration:"none"},href:Te,target:"_blank",rel:"noopener noreferrer",children:["\u2197 ",t("newsOpenLink")]})}),(0,e.jsx)("div",{className:"md-doc",style:{marginTop:12},dangerouslySetInnerHTML:{__html:_t(Ca(G.body||"",G.title))}}),(0,e.jsxs)("div",{className:"mc-news-reader-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>de(G),children:t("newsEdit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>Ne(G.id,!G.read),children:G.read?t("newsMarkUnread"):t("newsMarkRead")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:j==="delete",onClick:()=>ge(G),children:t("delete")})]})]})]}),K&&(0,e.jsx)("div",{className:"me-overlay",onClick:()=>ae(null),children:(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:860,width:"94vw",maxHeight:"90vh"},onClick:f=>f.stopPropagation(),children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--dsw-alias-border-l1, #e5e7eb)"},children:[(0,e.jsx)("b",{children:K.id?t("newsEdit"):t("newsNew")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>ae(null),children:t("close")})]}),(0,e.jsxs)("div",{style:{padding:16,overflow:"auto",maxHeight:"calc(90vh - 60px)"},children:[(0,e.jsxs)("div",{className:"mc-news-form",children:[(0,e.jsxs)("label",{className:"full",children:[(0,e.jsx)("span",{children:t("newsTitleField")}),(0,e.jsx)("input",{className:"mc-news-input",value:K.title,onChange:f=>ae(S=>({...S,title:f.target.value})),placeholder:t("newsTitlePlaceholder")})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsDateField")}),(0,e.jsx)("input",{className:"mc-news-input",type:"date",value:K.date||"",onChange:f=>ae(S=>({...S,date:f.target.value}))})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsCategoryField")}),(0,e.jsx)("input",{className:"mc-news-input",list:"me-news-categories",value:K.category||"",onChange:f=>ae(S=>({...S,category:f.target.value}))})]}),(0,e.jsx)("datalist",{id:"me-news-categories",children:l.map(f=>(0,e.jsx)("option",{value:f},f))}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsSourceField")}),(0,e.jsx)("input",{className:"mc-news-input",value:K.source||"",onChange:f=>ae(S=>({...S,source:f.target.value}))})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsUrlField")}),(0,e.jsx)("input",{className:"mc-news-input",value:K.url||"",onChange:f=>ae(S=>({...S,url:f.target.value})),placeholder:"https://\u2026"})]}),(0,e.jsxs)("label",{children:[(0,e.jsx)("span",{children:t("newsTagsField")}),(0,e.jsx)("input",{className:"mc-news-input",value:K.tags||"",onChange:f=>ae(S=>({...S,tags:f.target.value}))})]}),(0,e.jsxs)("label",{style:{flexDirection:"row",alignItems:"center",gap:8,paddingTop:18},children:[(0,e.jsx)("input",{type:"checkbox",checked:!!K.pinned,onChange:f=>ae(S=>({...S,pinned:f.target.checked}))}),(0,e.jsx)("span",{children:t("newsPinField")})]}),(0,e.jsxs)("label",{className:"full",children:[(0,e.jsx)("span",{children:t("newsBodyField")}),(0,e.jsx)("textarea",{className:"mc-news-textarea",value:K.body||"",onChange:f=>ae(S=>({...S,body:f.target.value})),placeholder:t("newsBodyPlaceholder")})]}),ne&&(0,e.jsx)("div",{className:"full mc-news-preview",children:(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:_t(K.body||"")}})})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",marginTop:14},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>J(f=>!f),children:t(ne?"newsEditBody":"newsPreview")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>ae(null),children:t("cancel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:j==="save",onClick:Pe,children:t(j==="save"?"newsSaving":"newsSave")})]})]})]})})]})}function ao({t,onReload:a,version:o}){let[d,c]=(0,n.useState)([]),[l,v]=(0,n.useState)(""),[x,k]=(0,n.useState)(null),I=(y,z=!0)=>{k({msg:y,ok:z}),setTimeout(()=>k(null),3200)},D=(0,n.useCallback)(async()=>{try{let y=await fetch(`${W}/recycle/list`).then(z=>z.json());y.ok&&c(y.items||[])}catch{}},[]);(0,n.useEffect)(()=>{D()},[o,D]);let M=async(y,z)=>{let H=(d.find(O=>O.path===z)||{}).title||z;v(y+z);try{let F=await fetch(W+(y==="restore"?"/recycle/restore":"/recycle/purge")+"?path="+encodeURIComponent(z)),P=await F.json().catch(()=>null);await D(),a&&a(),F.ok&&(!P||P.ok!==!1)?I(t(y==="restore"?"toastRestored":"toastPurged")+"\uFF1A"+H):I(t("toastFailed")+"\uFF1A"+(P&&P.error||"HTTP "+F.status),!1)}catch(O){I(t("toastFailed")+"\uFF1A"+String(O&&O.message||O),!1)}finally{v("")}};return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Je}),(0,e.jsxs)("div",{style:{overflow:"auto",padding:4},children:[(0,e.jsx)(ia,{toast:x}),(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"RECYCLE CENTER"}),(0,e.jsx)("h1",{children:t("tabRecycle")}),(0,e.jsx)("p",{children:t("recyclePageSub")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:d.length}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",disabled:!!l||d.length===0,title:d.length?"":t("emptyRecycle"),onClick:async()=>{v("purgeAll");try{let y=await fetch(W+"/recycle/purge-expired?days=0"),z=await y.json().catch(()=>null);await D(),I(y.ok?t("toastPurgedExpired")+(z&&z.purged!=null?"\uFF08"+z.purged+"\uFF09":""):t("toastFailed"),y.ok)}catch(y){I(t("toastFailed")+"\uFF1A"+String(y&&y.message||y),!1)}finally{v("")}},children:["\u{1F5D1} ",t("emptyRecycle")]})]}),(0,e.jsx)("div",{className:"mc-v5-recycle-hint",children:t("recycleHint")}),d.length?(0,e.jsx)("div",{className:"mc-card mc-v5-recycle",children:d.map(y=>{let z=qe[y.kind]||"#6B7280";return(0,e.jsxs)("div",{className:"mc-v5-recycle-row",children:[(0,e.jsx)("span",{className:"mc-v5-recycle-tile",style:{color:z,background:z+"18",borderColor:z+"38"},children:Ct[y.kind]||"\u{1F4CE}"}),(0,e.jsxs)("div",{className:"mc-v5-recycle-copy",children:[(0,e.jsx)("b",{children:y.title}),(0,e.jsxs)("span",{children:[t(Ge[y.kind]||"kindKnowledge")," \xB7 ",t("deletedAt")," ",ta(y.deletedAt)||"-"]})]}),(0,e.jsxs)("div",{className:"mc-v5-recycle-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!l,onClick:()=>M("restore",y.path),children:t("restore")}),(0,e.jsx)("button",{type:"button",className:"mc-btn mc-danger",disabled:!!l,onClick:()=>{window.confirm(t("purgeConfirm"))&&M("purge",y.path)},children:t("purge")})]})]},y.path)})}):(0,e.jsxs)("div",{className:"mc-card mc-v5-empty-state",children:["\u{1F5D1}\uFE0F ",(0,e.jsx)("b",{children:t("emptyRecycle")}),(0,e.jsx)("span",{children:t("recycleEmptyHint").split("{days}").join("30")})]})]})]})}var Ca=(t,a)=>{let o=String(t||"").split(/\r?\n/),d=l=>String(l||"").replace(/[#*_`]/g,"").replace(/[\s::\-–—·]/g,"").trim(),c=d(a);for(;;){let l=0;for(;l<o.length&&!o[l].trim();)l++;let v=/^#{1,2}\s+(.+?)\s*$/.exec(o[l]||"");if(!v||d(v[1])!==c)break;for(o.splice(l,1);l<o.length&&!o[l].trim();)o.splice(l,1)}return o.join(`
948
+ `)},no=t=>{let a=[],o=!1,d=0;for(let c of String(t||"").split(/\r?\n/)){let l=c.trim();if(/^```/.test(l)){o=!o;continue}if(o)continue;let v=/^(#{1,6})\s+(.+)$/.exec(l);if(!v)continue;d++;let x=v[1].length;x<=3&&a.push({id:"md-h-"+d,level:x,text:v[2].replace(/[#*_`>\[\]()]/g,"").replace(/\s+/g," ").trim()})}return a},Ma=t=>{let a=String(t.summary||"").replace(/[#>*_`]/g," ").replace(/\s+/g," ").trim();return a.length>150?a.slice(0,148)+"\u2026":a},an=t=>{let a=String(t.summary||"").toLowerCase();return/决策|结论|决定|decision/.test(a)?"insightDecision":/根因|原因|root cause/.test(a)?"insightRoot":/教训|避免|lesson/.test(a)?"insightLesson":"insightSummary"},nn=({n:t=0,color:a="#ff9a72",size:o=30})=>{let d=Math.max(2,Math.min(6,Number(t)||2)),c=Array.from({length:d},(l,v)=>{let x=-Math.PI/2+v*Math.PI*2/d,k=v%2?13:16;return[20+Math.cos(x)*k,20+Math.sin(x)*k]});return(0,e.jsxs)("svg",{className:"mc-v5-mini",width:o,height:o,viewBox:"0 0 40 40","aria-hidden":"true",children:[c.map(([l,v],x)=>(0,e.jsx)("line",{x1:"20",y1:"20",x2:l,y2:v,stroke:a,strokeOpacity:".35"},"l"+x)),c.map(([l,v],x)=>(0,e.jsx)("circle",{cx:l,cy:v,r:x%2?2.2:1.8,fill:a,fillOpacity:x%2?.8:.55},"c"+x)),(0,e.jsx)("circle",{cx:"20",cy:"20",r:"2.6",fill:a})]})},oo=({card:t,t:a,onOpen:o,query:d,onDelete:c,onTagClick:l,pinned:v,onPin:x,onCore:k,links:I})=>{let D=qe[t.kind]||qe.other,M=Number(I??t.links??t.weight??0),y=ua(t);return(0,e.jsxs)("article",{className:`mc-cardrow mc-card mc-v5-card${v?" pinned":""}${t.kind==="core"?" core":""}`,onClick:()=>o(t),children:[(0,e.jsxs)("div",{className:"mc-v5-card-top",children:[(0,e.jsx)("span",{className:"mc-v5-card-tile",style:{color:D,background:D+"18",borderColor:D+"38"},children:Ct[t.kind]||"\u{1F4CE}"}),(0,e.jsx)("span",{className:"mc-v5-card-kind-name",children:t.kind==="core"?"\u2B50 "+a("kindCore"):a(Ge[t.kind]||"kindKnowledge")}),t.kind==="core"&&(0,e.jsxs)("span",{className:"mc-v5-core-badge",children:["\u2B50 ",a("kindCore")]}),t.status==="pending"&&(0,e.jsxs)("span",{className:"mc-v5-card-status pending",children:["\u23F3 ",a("statusPending")]}),t.status==="rejected"&&(0,e.jsxs)("span",{className:"mc-v5-card-status rejected",children:["\u26D4 ",a("statusRejected")]}),fo(t.updated)&&(0,e.jsx)("span",{className:"mc-new",children:a("newBadge")}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("span",{className:"mc-v5-card-time",children:kt(t.updated)}),k&&t.status!=="pending"&&t.status!=="rejected"&&(0,e.jsx)("button",{type:"button",className:`mc-v5-core${t.kind==="core"?" on":""}`,title:a(t.kind==="core"?"unsetCore":"setCore"),onClick:z=>{z.stopPropagation(),k(t.path,t.kind==="core"?"knowledge":"core")},children:t.kind==="core"?"\u2B50 "+a("coreShort"):"\u2606 "+a("setCoreShort")}),x&&(0,e.jsx)("button",{type:"button",className:`mc-v5-pin${v?" on":""}`,title:a(v?"unpinCard":"pinCard"),"aria-label":a(v?"unpinCard":"pinCard"),onClick:z=>{z.stopPropagation(),x(t.path)},children:"\u{1F4CC}"})]}),(0,e.jsx)("h4",{className:"mc-v5-card-title",children:d?ba(t.title,d):t.title}),(0,e.jsxs)("div",{className:"mc-v5-card-insight",children:[(0,e.jsx)("span",{className:"mc-v5-insight-k",children:a(an(t))}),(0,e.jsx)("span",{className:"mc-v5-card-lead",children:d?ba(t.summary||"",d):Ma(t)})]}),d&&(()=>{let z=za(t.body||"",d);return z?(0,e.jsx)("p",{className:"mc-snippet",children:ba(z,d)}):null})(),ua(t).length>0&&(0,e.jsxs)("div",{className:"mc-tags mc-v5-card-tags",children:[ua(t).slice(0,2).map(z=>(0,e.jsxs)("button",{type:"button",className:"mc-tag mc-tag-click",title:z,onClick:H=>{H.stopPropagation(),l&&l(z)},children:["#",z]},z)),y.length>2&&(0,e.jsxs)("span",{className:"mc-tag more",children:["+",y.length-2]})]}),(0,e.jsxs)("footer",{className:"mc-v5-card-foot",children:[M>0&&(0,e.jsxs)("span",{className:"mc-v5-conn",children:[(0,e.jsx)(nn,{n:M,color:D})," ",(0,e.jsx)("b",{children:M})," ",a("links")]}),(0,e.jsxs)("span",{className:"mc-v5-author",children:["\u{1F916} ",Nt(t.submittedBy)]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-card-del",title:a("delete"),onClick:z=>{z.stopPropagation(),window.confirm(a("deleteConfirm"))&&c&&c(t.path)},children:"\u{1F5D1}"})]})]})};function io({t,tab:a,onReload:o,version:d}){let[c,l]=(0,n.useState)(null),[v,x]=(0,n.useState)(""),[k,I]=(0,n.useState)(null),[D,M]=(0,n.useState)(null),[y,z]=(0,n.useState)(null),[H,O]=(0,n.useState)(null),[F,P]=(0,n.useState)(null),[A,G]=(0,n.useState)(null),re=(0,n.useCallback)(async()=>{j("align");try{let p=await fetch(W+"/align").then(B=>B.json());p&&p.findings?G(p):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{j("")}},[t]),K=async()=>{if(window.confirm(t("alignFixConfirm"))){j("alignfix");try{let p=await fetch(W+"/setup-run",{method:"POST",headers:{"Content-Type":"application/json"},body:"{}"}).then(B=>B.json());p&&p.ok?(notify(t("alignFixed")),await re()):notify(t("alignFail"),!1)}catch{notify(t("alignFail"),!1)}finally{j("")}}},[ae,ne]=(0,n.useState)([]),[J,j]=(0,n.useState)(""),[Z,ce]=(0,n.useState)(!1),Se=(0,n.useCallback)(async()=>{if(!(!k||!k.merge||!k.merge.length)&&window.confirm(t("mergeAllConfirm"))){j("merge");try{let p={},B=X=>p[X]===void 0?X:p[X]=B(p[X]),E=(X,fe)=>{p[B(X)]=B(fe)},le=new Set;for(let X of k.merge)le.add(X.a.path),le.add(X.b.path),E(X.a.path,X.b.path);let N={};for(let X of le){let fe=B(X);(N[fe]=N[fe]||[]).push(X)}let L=0;for(let X of Object.values(N)){if(X.length<2)continue;(await fetch(`${W}/merge?paths=${encodeURIComponent(X.join(","))}`).then(Ce=>Ce.json())).ok&&L++}await ie(),o&&o()}catch{}j("")}},[k,ie,o,t]);async function ie(){try{let p=await Promise.all([fetch(`${W}/stats`),fetch(`${W}/budget`),fetch(`${W}/capture-log`),fetch(`${W}/cards?status=all&limit=30&agent=${Gt}`),fetch(`${W}/overview`),fetch(`${W}/ledger?days=7`)]),[B,E,le,N,L,X]=await Promise.all(p.map(fe=>fe.json()));B&&B.ok&&l(B),E&&E.ok&&M(E),le&&le.ok&&z(le),N&&N.ok&&ne(N.cards||[]),L&&L.ok&&O({db:L.db,backups:L.backups,total:L.total,version:L.version,degraded:L.degraded===!0}),P(X&&X.ok?X:{ok:!1,error:X&&X.error||""}),x(!B||!B.ok?t("adminLoadFail"):"")}catch{x(t("adminLoadFail"))}}let De=(0,n.useCallback)(async()=>{j("scan");try{let p=await fetch(`${W}/optimize`).then(B=>B.json());p.ok&&I(p)}catch{x(t("adminLoadFail"))}finally{j("")}},[t]),[m,Ne]=(0,n.useState)(null),de=(0,n.useCallback)(async()=>{j("refine");try{let p=await fetch(`${W}/refine-scan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:8})}).then(B=>B.json());p&&p.ok?Ne(p):notify(p&&p.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{j("")}},[t]),Pe=async(p,B)=>{if(!(B==="merge"&&!window.confirm(t("mergeConfirm")))){j("refineapply");try{let E=await fetch(`${W}/refine-apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({a:p.a.path,b:p.b.path,action:B,relation:p.relation})}).then(le=>le.json());E&&E.ok?(notify(t("refineApplied")),Ne(le=>le&&{...le,findings:(le.findings||[]).filter(N=>!(N.a.path===p.a.path&&N.b.path===p.b.path))}),await ie(),o&&o()):notify(E&&E.error||t("refineFail"),!1)}catch{notify(t("refineFail"),!1)}finally{j("")}}},[ge,$]=(0,n.useState)(null),ke=(0,n.useCallback)(async()=>{j("junk");try{let p=await fetch(`${W}/refine-junk`).then(B=>B.json());p&&p.ok?$(p.items||[]):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{j("")}},[t]),Te=async p=>{if(p.length&&window.confirm(t("junkRecycleAllConfirm"))){j("junkpurge");try{let B=await fetch(`${W}/refine-junk-purge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:p})}).then(E=>E.json());B&&B.removed?(notify(t("junkDone")+"\uFF1A"+B.removed.length+(B.failed?.length?"\uFF08\u5931\u8D25 "+B.failed.length+"\uFF09":"")),$(E=>E&&E.filter(le=>!B.removed.includes(le.path))),await ie(),o&&o()):notify(t("junkFail"),!1)}catch{notify(t("junkFail"),!1)}finally{j("")}}},[T,f]=(0,n.useState)(null),S=(0,n.useCallback)(async()=>{j("goals");try{let p=await fetch(W+"/refine-goals",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:30})}).then(B=>B.json());p&&p.ok?f(p):notify(p&&p.error||t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{j("")}},[t]),g=async p=>{j("goalskeep");try{let B=await fetch(W+"/refine-goals-keep",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:p.members.map(E=>E.path)})}).then(E=>E.json());B&&B.ok?(notify(t("goalDone")),f(E=>E&&{...E,clusters:(E.clusters||[]).filter(le=>le.goal!==p.goal)})):notify(t("goalFail"),!1)}catch{notify(t("goalFail"),!1)}finally{j("")}},Y=async p=>{if(window.confirm(t("mergeConfirm"))){j("goalsmerge");try{let B=await fetch(W+"/merge?paths="+encodeURIComponent(p.members.map(E=>E.path).join(","))).then(E=>E.json());B&&B.ok?(notify(t("goalMerged")),f(E=>E&&{...E,clusters:(E.clusters||[]).filter(le=>le.goal!==p.goal)}),await ie(),o&&o()):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{j("")}}};(0,n.useEffect)(()=>{ie()},[d]);let se=async(p,B)=>{if(window.confirm(t("mergeConfirm")))try{(await fetch(`${W}/merge?paths=${encodeURIComponent(p+","+B)}`).then(le=>le.json())).ok&&(await ie(),o&&o())}catch{}},Re=async p=>{if(window.confirm(t("deleteConfirm")))try{(await fetch(`${W}/delete?path=${encodeURIComponent(p)}`).then(E=>E.json())).ok&&(await ie(),o&&o())}catch{}},ee=Xa,ze=({title:p,kind:B,updated:E,path:le})=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:mt.colors[B]||"#666"}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:kt(E)}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>Re(le),children:[t("delete")," \u2715"]})]});return(0,e.jsxs)("div",{className:"mc-admin",style:{display:"flex",flexDirection:"column",overflow:"auto",flex:1,minHeight:0},children:[(0,e.jsx)("style",{children:Je}),(0,e.jsxs)("div",{style:{overflow:"auto"},children:[v&&(0,e.jsxs)("div",{className:"mc-card",style:{borderLeft:"4px solid #ef4444",background:"rgba(239,68,68,0.08)",padding:"12px 14px",marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:13,color:"#b91c1c",fontWeight:600,marginBottom:6},children:["\u26A0 ",v]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:ie,children:["\u21BB ",t("retry")]})]}),a==="stats"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-v5-pagehead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"SYSTEM STATUS"}),(0,e.jsx)("h1",{children:t("runtimeTitle")}),(0,e.jsx)("p",{children:t("runtimeSub")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:H?`${H.total||0} ${t("cardsUnit")}`:""}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>ie(),children:["\u21BB ",t("refresh")]})]}),(0,e.jsxs)("div",{className:"mc-v5-statusgrid",children:[(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F5C4}\uFE0F"}),(0,e.jsx)("b",{children:H?H.total||0:"\u2014"}),(0,e.jsx)("span",{children:t("dbTitle")}),(0,e.jsx)("small",{children:H?.db?.journalMode||H?.db?.journal_mode||"SQLite"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F4BE}"}),(0,e.jsx)("b",{children:H?.backups?.count??"\u2014"}),(0,e.jsx)("span",{children:t("backupTitle")}),(0,e.jsx)("small",{children:H?.backups?.newestAt?`${Math.max(0,Math.floor((Date.now()-Number(H.backups.newestAt))/864e5))} \u5929\u524D`:"\u2014"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u2728"}),(0,e.jsx)("b",{children:y?.available?y.health?.ok?"\u6B63\u5E38":"\u5F02\u5E38":"\u2014"}),(0,e.jsx)("span",{children:t("captureTitle")}),(0,e.jsx)("small",{children:y?.health?.lastAt?kt(new Date(y.health.lastAt).toISOString()):"\u2014"})]}),(0,e.jsxs)("div",{className:"mc-v5-statuscard",children:[(0,e.jsx)("span",{className:"mc-v5-status-ico",children:"\u{1F3F7}\uFE0F"}),(0,e.jsx)("b",{children:H?.version||"\u2014"}),(0,e.jsx)("span",{children:t("versionTitle")}),(0,e.jsx)("small",{children:t("v5Local")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FA7A} ",t("healthTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("healthHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>ie(),children:["\u21BB ",t("refresh")]})]}),H?(()=>{let p=H.db||{},B=p.writable!==!1&&!p.corrupt,E=H.backups||{count:0,newestAt:0},le=E.newestAt?Math.floor((Date.now()-Number(E.newestAt))/864e5):-1,N=E.count?le>7?"warn":"ok":"bad",L=y&&y.available?y.health:null,X=L?L.ok?"ok":"warn":"none",fe=A&&A.findings?A.onDisk&&A.residentServed===A.onDisk&&A.hostVersion===A.onDisk?"ok":"warn":"none",Ce={ok:["\u2705","#10b981"],warn:["\u26A0","#f59e0b"],bad:["\u2717","#ef4444"],none:["\u2022","inherit"]},b=[{label:t("healthDb"),level:B?"ok":"bad",text:B?"journal="+(p.journalMode||"?")+(p.checkedAt?" \xB7 "+new Date(p.checkedAt).toLocaleString():""):(p.error||t("healthDbBad"))+" \u2192 dsh-memory doctor"},{label:t("healthBackups"),level:N,text:E.count?(le<=0?t("healthBackupToday").replace("{n}",String(E.count)):t("healthBackupAge").replace("{n}",String(E.count)).replace("{d}",String(le)))+(E.files&&E.files.length?" \xB7 "+E.files[E.files.length-1]:""):t("healthNoBackups")},{label:t("healthCapture"),level:X,text:L?L.ok?t("healthCapOk"):t("healthCapFail")+"\uFF1A"+(L.reason||""):t("healthNoRecords")},{label:t("healthVersion"),level:fe,text:fe==="none"?t("healthRunAlign"):t("vcOnDisk")+" v"+(A.onDisk||"?")+" \xB7 "+t("vcResident")+" v"+(A.residentServed||"?")+" \xB7 "+t("vcLoaded")+" v"+(A.hostVersion||"?"),action:fe==="none"?{label:t("alignRun"),run:re}:null}];return(0,e.jsx)("div",{style:{marginTop:6},children:b.map(u=>(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontSize:12,padding:"3px 0",borderTop:"1px solid rgba(127,127,127,0.10)"},children:[(0,e.jsx)("span",{style:{width:14,flex:"0 0 auto",color:Ce[u.level][1]},children:Ce[u.level][0]}),(0,e.jsx)("b",{style:{minWidth:62,flex:"0 0 auto",opacity:.85},children:u.label}),(0,e.jsx)("span",{style:{opacity:.82,wordBreak:"break-word"},children:u.text}),u.action&&(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{marginLeft:6,padding:"0 6px",fontSize:11},disabled:!!J,onClick:u.action.run,children:u.action.label})]},u.label))})})():(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9FE} ",t("ledgerTitle")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("ledgerHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>ie(),children:["\u21BB ",t("refresh")]})]}),F?F.ok===!1?(0,e.jsxs)("div",{style:{color:"#f59e0b",fontSize:12,padding:"8px 0",lineHeight:1.7},children:["\u26A0 ",/未知接口|404|not found/i.test(String(F.error||""))?t("ledgerNeedRestart"):F.error||t("adminLoadFail")]}):F.totals.recalls+F.totals.captures===0?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("ledgerNoData")}):(0,e.jsxs)("div",{style:{marginTop:8},children:[(0,e.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:8},children:[{k:t("ledgerRecalls"),v:String(F.totals.recalls),s:t("ledgerInjected")+" "+Number(F.totals.injectedChars||0).toLocaleString()+" "+t("ledgerChars")},{k:t("ledgerCaptures"),v:String(F.totals.captures),s:t("ledgerLlmCalls")+" "+F.totals.llmCalls+(F.totals.captureFail?" \xB7 \u2717 "+F.totals.captureFail:"")},{k:t("ledgerEstimate"),v:"\u2248 "+Number(F.totals.estTokens||0).toLocaleString(),s:t("ledgerEstimateHint")},{k:t("ledgerUseful"),v:F.feedback.rate==null?"\u2014":Math.round(F.feedback.rate*100)+"%",s:t("ledgerUsefulHint")}].map(p=>(0,e.jsxs)("div",{style:{border:"1px solid rgba(127,127,127,.16)",borderRadius:10,padding:"8px 10px"},children:[(0,e.jsx)("div",{style:{fontSize:11,opacity:.6},children:p.k}),(0,e.jsx)("div",{style:{fontSize:18,fontWeight:700,lineHeight:1.35},children:p.v}),(0,e.jsx)("div",{style:{fontSize:10.5,opacity:.55,lineHeight:1.5},children:p.s})]},p.k))}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.55,marginTop:8,lineHeight:1.7},children:t("ledgerFormula")})]}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F527} ",t("alignTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!J,onClick:re,children:t(J==="align"?"exporting":"alignRun")}),A&&A.counts&&A.counts.fix>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!J,onClick:K,children:t(J==="alignfix"?"exporting":"alignFix")}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("alignHint")})]}),A&&A.findings?(0,e.jsxs)("div",{style:{marginTop:6},children:[(0,e.jsxs)("div",{style:{fontSize:12,opacity:.75,marginBottom:4},children:[t("alignDisk")," v",A.onDisk||"?",A.residentServed?" \xB7 "+t("alignResident")+" v"+A.residentServed:"",A.hostVersion?" \xB7 "+t("alignHost")+" v"+A.hostVersion:""]}),(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:A.findings.map((p,B)=>(0,e.jsxs)("li",{style:{padding:"4px 2px",borderTop:B?"1px solid rgba(127,127,127,0.12)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:p.level==="fix"?"#ef4444":p.level==="warn"?"#f59e0b":"#10b981"},children:p.level==="fix"?"\u2717":p.level==="warn"?"\u26A0":"\u2713"})," ",(0,e.jsx)("span",{children:p.title}),p.detail?(0,e.jsx)("div",{style:{opacity:.75,marginLeft:14},children:p.detail}):null,p.command?(0,e.jsxs)("div",{style:{marginLeft:14,opacity:.9},children:["\u2192 ",(0,e.jsx)("code",{children:p.command})]}):null]},B))})]}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginTop:4},children:t("alignIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1FAB5} ",t("captureLog")]}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.6},children:t("captureLogHint")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>ie(),children:["\u21BB ",t("refresh")]})]}),y?y.available===!1?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogUnavailable")}):(y.entries||[]).length===0?(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("captureLogEmpty")}):(0,e.jsx)("div",{style:{maxHeight:260,overflow:"auto",marginTop:8},children:(0,e.jsx)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:(0,e.jsx)("tbody",{children:(y.entries||[]).map((p,B)=>{let E=zn[p.action]||["\u2022","inherit"];return(0,e.jsxs)("tr",{style:{borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:kt(p.time?new Date(p.time).toISOString():"")}),(0,e.jsxs)("td",{style:{padding:"4px 6px",whiteSpace:"nowrap",color:E[1],fontWeight:600},children:[E[0]," ",p.action]}),(0,e.jsx)("td",{style:{padding:"4px 6px"},children:p.reason||""}),(0,e.jsx)("td",{style:{padding:"4px 6px",opacity:.55,maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:p.preview||"",children:p.preview||""})]},B)})})})}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,padding:"8px 0"},children:t("loading")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:["\u{1F916} ",t("captureAgentCards"),"\uFF08",ae.length,"\uFF09"]}),ae.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:ae.map(p=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:qe[p.kind]||qe.other}}),(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.title}),p.status==="pending"&&(0,e.jsxs)("span",{className:"mc-status",style:{background:"#f59e0b"},children:["\u23F3 ",t("statusPending")]}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:kt(p.updated)})]},p.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noCards")})]}),c&&(0,e.jsxs)(e.Fragment,{children:[c.trend&&c.trend.length>0&&(()=>{let p=c.trend,B=Math.max(...p.map(L=>L.count),1),E=260,le=50,N=E/p.length;return(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,padding:"10px 14px"},children:[(0,e.jsxs)("div",{style:{fontSize:11,opacity:.6,marginBottom:4},children:["\u{1F4C8} ",t("trendLabel")]}),(0,e.jsx)("svg",{width:E,height:le,style:{display:"block",width:"100%",height:50},children:p.map((L,X)=>{let fe=Math.round(L.count/B*(le-4));return(0,e.jsx)("rect",{x:X*N+1,y:le-fe,width:Math.max(N-2,2),height:fe,rx:1.5,fill:L.count>0?"var(--dsw-alias-accent, #3b82f6)":"var(--dsw-alias-border-l1, #e5e7eb)",opacity:L.count>0?.85:.35},L.date)})})]})})(),(0,e.jsxs)("div",{className:"mc-stats",children:[(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.total}),(0,e.jsx)("span",{children:t("total")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.today}),(0,e.jsx)("span",{children:t("todayAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.week}),(0,e.jsx)("span",{children:t("weekAdd")})]}),(0,e.jsxs)("div",{className:"mc-stat mc-card",children:[(0,e.jsx)("b",{children:c.tags}),(0,e.jsx)("span",{children:t("tags")})]})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("byKind")}),(0,e.jsx)("div",{style:{display:"flex",gap:10,flexWrap:"wrap"},children:ee.map(p=>(0,e.jsxs)("span",{style:{fontSize:12},children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:mt.colors[p]||"#666"}}),t(Ge[p]),": ",c.byKind?.[p]||0]},p))})]}),D&&(D.budgetChars||D.recallLimit||D.embedding)&&(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,fontSize:12},children:[(0,e.jsx)("b",{children:t("budgetLabel")}),"\uFF1A",t("budgetChars")," ",(0,e.jsx)("b",{children:D.budgetChars||8e4})," \xB7 ",t("recallLimitLabel")," ",(0,e.jsx)("b",{children:D.recallLimit||5})," \xB7 ",t("embeddingLabel")," ",D.embedding?"ON":"OFF"]}),(0,e.jsxs)("div",{className:"mc-card",children:[(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("todayList"),"\uFF08",c.todayCards?.length||0,"\uFF09"]}),c.todayCards?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:c.todayCards.map(p=>(0,e.jsx)(ze,{title:p.title,kind:p.kind,updated:p.updated,path:p.path},p.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})]})]}),a==="optimize"&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"mc-card mc-audit-batchcard",style:{marginBottom:10,display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("organizeTitle")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!J,onClick:De,children:J==="scan"?t("exporting"):"\u{1F50D} "+t("scanAndOrganize")}),k&&k.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!J,onClick:async()=>{if(window.confirm(t("oneClickOptimizeConfirm"))){j("oneclick");try{let p=JSON.stringify({cleanupStale:Z}),E=await(await fetch(`${W}/optimize-execute`,{method:"POST",headers:{"Content-Type":"application/json"},body:p})).json();E&&E.ok?(notify(`${t("oneClickOptimizeDone")}\uFF1A${E.plan.merged} ${t("optimizedMerged")}${Z?` \xB7 ${E.plan.staleDeleted} ${t("optimizedStaleDeleted")}`:""}`),await ie(),o&&o(),I(null)):notify(t("mergeFail"),!1)}catch{notify(t("mergeFail"),!1)}finally{j("")}}},children:J==="oneclick"?t("exporting"):"\u26A1 "+t("oneClickOptimize")}),k&&k.merge?.length>0&&(0,e.jsxs)("label",{style:{fontSize:11,opacity:.7,display:"flex",alignItems:"center",gap:4},children:[(0,e.jsx)("input",{type:"checkbox",checked:Z,onChange:p=>ce(p.target.checked)}),t("oneClickAlsoStale")]})]}),!k&&(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:10},children:t("scanHint")}),k&&(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10,display:"flex",flexDirection:"column",gap:8},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("mergePairs")}),(0,e.jsx)("div",{className:"spacer",style:{flex:1}}),k.merge?.length>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:!!J,onClick:Se,children:t(J==="merge"?"exporting":"batchMerge")})]}),(0,e.jsx)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:t("mergePairs")}),k.merge?.length?(0,e.jsx)("ul",{style:{margin:"0 0 12px",padding:0,listStyle:"none"},children:k.merge.map((p,B)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 4px",borderBottom:"1px solid rgba(127,127,127,0.12)",fontSize:12},children:[(0,e.jsxs)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[p.a.title," \u21C4 ",p.b.title]}),(0,e.jsxs)("span",{style:{opacity:.6},children:[Math.round(p.sim*100),"%"]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},onClick:()=>se(p.a.path,p.b.path),children:t("mergeNow")})]},B))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12,marginBottom:12},children:t("noOptimize")}),(0,e.jsxs)("div",{style:{fontSize:12,fontWeight:700,marginBottom:6},children:[t("staleCards"),"\uFF08",k.stale?.length||0,"\uFF09"]}),k.stale?.length>0&&(0,e.jsx)("div",{style:{marginBottom:6},children:(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},disabled:!!J,onClick:async()=>{if(!window.confirm(t("deleteConfirm")))return;j("clean");let p=0;for(let B of k.stale)try{await fetch(`${W}/delete?path=${encodeURIComponent(B.path)}`),p++}catch{}j(""),notify(`${p} ${t("deletedStale")}`),await ie(),o&&o()},children:t("cleanStale")})}),k.stale?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:k.stale.map(p=>(0,e.jsx)(ze,{title:p.title,kind:"other",updated:p.updated,path:p.path},p.path))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t("noOptimize")})]})}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9ED} ",t("refineTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!J,onClick:de,children:t(J==="refine"?"exporting":"refineScan")}),(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("refineHint")})]}),m?.findings?.length?m.findings.map((p,B)=>(0,e.jsxs)("div",{style:{borderTop:B?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:3},children:[(0,e.jsx)("span",{style:{fontWeight:700,color:p.relation==="conflict"?"#ef4444":p.relation==="duplicate"?"#f59e0b":"#10b981"},children:t("refineRel_"+p.relation)}),(0,e.jsxs)("span",{style:{opacity:.55},children:[" \xB7 sim ",p.sim," \xB7 ",p.useModel||""]}),p.conflict?(0,e.jsx)("span",{style:{marginLeft:6},children:p.conflict}):null]}),(0,e.jsxs)("div",{style:{fontSize:12,opacity:.85,marginBottom:5},children:["A\uFF1A",p.a.title,(0,e.jsx)("br",{}),"B\uFF1A",p.b.title]}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!J,onClick:()=>Pe(p,"keepA"),children:t("refineKeepA")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!J,onClick:()=>Pe(p,"keepB"),children:t("refineKeepB")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!J,onClick:()=>Pe(p,"keepBoth"),children:t("refineKeepBoth")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!J,onClick:()=>Pe(p,"merge"),children:t("refineMerge")})]})]},B)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(m?"refineNone":"refineIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F9F9} ",t("junkTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!J,onClick:ke,children:t(J==="junk"?"exporting":"junkScan")}),ge?.length?(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!J,onClick:()=>Te(ge.map(p=>p.path)),children:t(J==="junkpurge"?"exporting":"junkRecycleAll")}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("junkHint")})]}),ge?.length?(0,e.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:ge.map((p,B)=>(0,e.jsxs)("li",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 2px",borderTop:B?"1px solid rgba(127,127,127,0.14)":"none",fontSize:12},children:[(0,e.jsx)("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:p.reasons.join("\uFF1B"),children:p.title||p.path}),(0,e.jsx)("span",{style:{opacity:.55,fontSize:11},children:p.reasons[0]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!J,onClick:()=>Te([p.path]),children:t("junkRecycle")})]},B))}):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(ge?"junkNone":"junkIdle")})]}),(0,e.jsxs)("div",{className:"mc-card",style:{marginBottom:10},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:6},children:[(0,e.jsxs)("b",{style:{fontSize:12},children:["\u{1F3AF} ",t("goalTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",disabled:!!J,onClick:S,children:t(J==="goals"?"exporting":"goalScan")}),T?(0,e.jsxs)("span",{style:{opacity:.6,fontSize:11},children:[t("goalStats"),"\uFF1A",T.cached," / ",T.calls]}):null,(0,e.jsx)("span",{style:{opacity:.6,fontSize:11},children:t("goalHint")})]}),T?.clusters?.length?T.clusters.map((p,B)=>(0,e.jsxs)("div",{style:{borderTop:B?"1px solid rgba(127,127,127,0.14)":"none",padding:"7px 2px"},children:[(0,e.jsxs)("div",{style:{fontSize:12,marginBottom:4},children:[(0,e.jsx)("b",{children:p.goal})," ",(0,e.jsxs)("span",{style:{opacity:.55},children:["\xB7 ",p.members.length," ",t("goalCards")]})]}),(0,e.jsx)("ul",{style:{margin:"0 0 5px",padding:"0 0 0 16px",fontSize:12,opacity:.85},children:p.members.map((E,le)=>(0,e.jsx)("li",{children:E.title},le))}),(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!J,onClick:()=>g(p),children:t("goalKeep")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{padding:"2px 8px"},disabled:!!J,onClick:()=>Y(p),children:t("goalMerge")})]})]},B)):(0,e.jsx)("div",{style:{opacity:.6,fontSize:12},children:t(T?"goalNone":"goalIdle")})]})]})]})]})}var fa=[{key:"decision",label:"tplDecision",kind:"knowledge",tagKey:"tplDecisionTags",bodyKey:"tplDecisionBody"},{key:"bug",label:"tplBug",kind:"mistake",tagKey:"tplBugTags",bodyKey:"tplBugBody"},{key:"meeting",label:"tplMeeting",kind:"content",tagKey:"tplMeetingTags",bodyKey:"tplMeetingBody"},{key:"weekly",label:"tplWeekly",kind:"content",tagKey:"tplWeeklyTags",bodyKey:"tplWeeklyBody"}];function ro({t,newCard:a,setNewCard:o,onCreated:d}){if(!a)return null;let c=fa.find(M=>M.key===a.template),l=a.body||(c?t(c.bodyKey):""),v=a.kind||(c?c.kind:"knowledge"),x=a.tags||(c?t(c.tagKey):""),k=a._creating,I=M=>{let y=fa.find(z=>z.key===M);o(z=>({...z,template:M,kind:y?y.kind:z.kind,body:y?t(y.bodyKey):z.body,tags:y?t(y.tagKey):z.tags}))},D=async()=>{if(!(!a.title&&!l)){o(M=>({...M,_creating:!0}));try{(await fetch(`${W}/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a.title||t("untitled"),kind:v,tags:x.split(",").map(y=>y.trim()).filter(Boolean),body:l,source:"manual"})}).then(y=>y.json())).ok?(o(null),d&&d()):o(y=>({...y,_creating:!1}))}catch{o(y=>({...y,_creating:!1}))}}};return(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>o(null),children:[(0,e.jsx)("style",{children:Je}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:600,width:"92vw",maxHeight:"85vh"},onClick:M=>M.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:t("newCard")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>o(null),children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10,overflow:"auto"},children:[(0,e.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[fa.map(M=>(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===M.key?" me-on":""}`,onClick:()=>I(M.key),children:t(M.label)},M.key)),(0,e.jsx)("button",{type:"button",className:`mc-btn${a.template===""?" me-on":""}`,onClick:()=>o(M=>({...M,template:"",body:"",tags:"",kind:"knowledge"})),children:t("tplBlank")})]}),(0,e.jsx)("select",{className:"mc-btn",value:v,onChange:M=>o(y=>({...y,kind:M.target.value})),style:{maxWidth:180,background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:Xa.map(M=>(0,e.jsx)("option",{value:M,style:{background:"var(--dsw-alias-bg-layer-1, #fff)",color:"var(--dsw-alias-label-primary, #111)"},children:t(Ge[M])||M},M))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("cardTitle"),value:a.title||"",onChange:M=>o(y=>({...y,title:M.target.value}))}),(0,e.jsx)("input",{type:"text",className:"mc-btn",placeholder:t("tagsHint"),value:x,onChange:M=>o(y=>({...y,tags:M.target.value}))}),(0,e.jsx)("textarea",{className:"mc-btn",placeholder:t("cardBody"),value:l,onChange:M=>o(y=>({...y,body:M.target.value})),style:{minHeight:180,resize:"vertical",fontFamily:"inherit"}}),(0,e.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",disabled:k,onClick:D,children:t(k?"exporting":"createCard")})})]})]})]})}async function ka(t){let a=String(t||"");if(!a)return!1;try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(a),!0}catch{}try{let o=document.createElement("textarea");o.value=a,o.setAttribute("readonly",""),o.style.position="fixed",o.style.left="-9999px",o.style.top="0",document.body.appendChild(o),o.focus(),o.select();let d=!!(document.execCommand&&document.execCommand("copy"));return document.body.removeChild(o),d}catch{return!1}}function so({t,onClose:a}){let[o,d]=(0,n.useState)(""),[c,l]=(0,n.useState)(""),[v,x]=(0,n.useState)(""),[k,I]=(0,n.useState)(!0),[D,M]=(0,n.useState)(!1),[y,z]=(0,n.useState)(""),[H,O]=(0,n.useState)(""),F=(0,n.useRef)(null),P=(0,n.useRef)(null),A=()=>{let Z=F.current;if(Z)try{Z.focus(),Z.select()}catch{}},G=Z=>{z(Z),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>z(""),2400)};(0,n.useEffect)(()=>{let Z=!0;return fetch(W+"/diagnostics").then(ce=>ce.json()).then(ce=>{Z&&(ce&&ce.ok?(l(String(ce.diagnostics||"")),x(String(ce.version||""))):M(!0))}).catch(()=>{Z&&M(!0)}).finally(()=>{Z&&I(!1)}),()=>{Z=!1}},[]),(0,n.useEffect)(()=>{let Z=ce=>{ce.key==="Escape"&&a()};return window.addEventListener("keydown",Z),()=>{window.removeEventListener("keydown",Z),P.current&&clearTimeout(P.current)}},[a]);let re=(()=>{try{return String(navigator.language||"").toLowerCase().startsWith("en")?"en":"zh"}catch{return"zh"}})(),K=()=>{let Z=o.trim().split(`
949
+ `)[0]||"",ce=Pa({title:"[Bug] "+(Z.slice(0,60)||"memory-eternal \u95EE\u9898"),body:Ia({description:o,diagnostics:c,version:v})});try{window.open(ce,"_blank","noopener")}catch{G(t("fbCopyFail"))}},ae=async()=>{await ka(c)?(O(""),G(t("fbCopiedDiag"))):(O(c),G(t("fbCopyManual")))},ne=async()=>{let Z=Ba({lang:re,description:o,diagnostics:c});await ka(Z)?(O(""),G(t("fbCopiedPrompt"))):(O(Z),G(t("fbCopyManual")))},J={width:"100%",resize:"vertical",padding:"8px 10px",borderRadius:10,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"transparent",color:"inherit",font:"inherit",fontSize:13},j={margin:0,maxHeight:170,overflow:"auto",fontSize:11.5,lineHeight:1.55,padding:"8px 10px",borderRadius:10,background:"var(--dsw-alias-bg-layer-1, rgba(127,127,127,0.08))",whiteSpace:"pre-wrap",wordBreak:"break-word",overflowX:"hidden"};return(0,e.jsxs)("div",{className:"me-overlay",onClick:a,children:[(0,e.jsx)("style",{children:Je}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:720},onClick:Z=>Z.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F41E} ",t("fbTitle")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:a,children:t("close")})]}),(0,e.jsxs)("div",{className:"me-dialog-body",style:{display:"flex",flexDirection:"column",gap:10},children:[(0,e.jsx)("div",{style:{fontSize:12,opacity:.72,lineHeight:1.6},children:t("fbWhy")}),(0,e.jsx)("textarea",{value:o,onChange:Z=>d(Z.target.value),placeholder:t("fbDesc"),rows:5,style:J}),(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsx)("b",{style:{fontSize:12},children:t("fbDiag")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:ae,disabled:!c,children:t("fbCopyDiag")})]}),(0,e.jsx)("pre",{style:j,children:k?t("fbLoading"):D?t("fbDiagFail"):c})]}),(0,e.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>{if(!o.trim()){G(t("fbNeedDesc"));return}K()},style:{borderColor:"var(--dsw-alias-brand-primary, #3b82f6)",color:"var(--dsw-alias-brand-primary, #3b82f6)",fontWeight:600},children:["\u{1F680} ",t("fbOpenIssue")]}),(0,e.jsx)("span",{style:{opacity:.5,fontSize:12},children:t("fbOr")}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:ne,children:["\u{1F916} ",t("fbCopyPrompt")]})]}),y&&(0,e.jsx)("div",{style:{fontSize:12,color:"var(--dsw-alias-brand-primary, #3b82f6)"},children:y}),H&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,e.jsxs)("b",{style:{fontSize:12,color:"#b45309"},children:["\u26A0 ",t("fbCopyFail")]}),(0,e.jsx)("span",{style:{fontSize:11.5,opacity:.75},children:t("fbCopyManual")}),(0,e.jsx)("div",{style:{flex:1}}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:A,children:t("fbSelectAll")})]}),(0,e.jsx)("textarea",{ref:F,readOnly:!0,value:H,rows:7,style:J})]})]})]})]})}function lo({t,tab:a,onTab:o,onClose:d,onFeedback:c,onReplay:l}){let[v,x]=(0,n.useState)(null);(0,n.useEffect)(()=>{if(!v)return;let M=y=>{y.key==="Escape"&&x(null)};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[v]);let k=[{id:"group",label:t("supportGroup")},{id:"sponsor",label:t("supportSponsor")},{id:"legacy",label:t("supportLegacy")}],I="https://github.com/EternalNight996/memory-eternal/blob/main/README.md",D=(M,y)=>(0,e.jsxs)("figure",{children:[(0,e.jsx)("img",{src:M,alt:y,loading:"lazy",title:t("clickToZoom"),onClick:z=>x(z.currentTarget.currentSrc||M),onError:z=>{let H=z.currentTarget;H.dataset.fb||(H.dataset.fb="1",H.src="https://raw.githubusercontent.com/EternalNight996/memory-eternal/main/assets/support/"+String(M).split("/").pop())}}),(0,e.jsx)("figcaption",{children:y})]});return(0,e.jsxs)("div",{className:"me-overlay",onClick:d,children:[(0,e.jsx)("style",{children:Je}),(0,e.jsxs)("div",{className:"me-dialog me-support",onClick:M=>M.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{children:["\u{1F4AC} ",t("supportTitle")]}),(0,e.jsx)("div",{className:"me-head-actions",children:(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:d,children:t("close")})})]}),(0,e.jsx)("div",{className:"me-support-tabs",children:k.map(M=>(0,e.jsx)("button",{type:"button",className:`me-support-tab${a===M.id?" active":""}`,onClick:()=>o(M.id),children:M.label},M.id))}),(0,e.jsxs)("div",{className:"me-support-body",children:[a==="group"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportGroupHint")}),(0,e.jsxs)("div",{className:"me-support-qr",children:[D("support/group-qr.jpg",t("supportGroupQQ")),D("support/group-wechat.jpg",t("supportGroupWechat"))]}),(0,e.jsx)("p",{className:"me-support-note",style:{marginTop:12},children:(0,e.jsxs)("a",{className:"me-support-link",href:I,target:"_blank",rel:"noreferrer",children:[t("supportReadme")," \u2197"]})})]}),a==="sponsor"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"me-support-note",children:t("supportSponsorHint")}),(0,e.jsxs)("div",{className:"me-support-qr",children:[D("support/wechat-pay.jpg","\u5FAE\u4FE1\u6536\u6B3E\u7801"),D("support/wechat-reward.jpg","\u5FAE\u4FE1\u8D5E\u8D4F\u7801")]}),(0,e.jsxs)("p",{className:"me-support-note",style:{marginTop:12},children:["\u6253\u8D4F\u5B8C\u5168\u81EA\u613F\uFF0C\u4E0D\u5F71\u54CD\u4EFB\u4F55\u529F\u80FD\uFF1B\u63D2\u4EF6\u672C\u4F53\u59CB\u7EC8\u5F00\u6E90\u514D\u8D39\uFF08MIT\uFF09\u3002",(0,e.jsx)("br",{}),(0,e.jsx)("a",{className:"me-support-link",href:"https://github.com/EternalNight996/memory-eternal/blob/main/SPONSOR.md",target:"_blank",rel:"noreferrer",children:"SPONSOR.md \u2197"})]})]}),a==="legacy"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h3",{style:{margin:"0 0 8px",fontSize:14},children:t("supportLegacyTitle")}),(0,e.jsx)("p",{className:"me-support-note",children:t("supportLegacyBody")}),(0,e.jsxs)("div",{className:"me-support-actions",children:[(0,e.jsxs)("a",{className:"mc-btn",href:I,target:"_blank",rel:"noreferrer",children:["\u{1F4D6} ",t("supportReadme")," \u2197"]}),(0,e.jsxs)("a",{className:"mc-btn",href:"https://github.com/EternalNight996/memory-eternal/releases",target:"_blank",rel:"noreferrer",children:["\u{1F3F7} ",t("supportReleases")," \u2197"]})]})]})]}),(0,e.jsxs)("div",{className:"me-support-actions",style:{padding:"0 18px 16px",marginTop:0},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:c,children:["\u{1F41E} ",t("supportFeedback")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:l,children:["\u2728 ",t("supportReplay")]})]})]}),v&&(0,e.jsxs)("div",{className:"me-lightbox",role:"dialog","aria-modal":"true","aria-label":t("close"),onClick:M=>{M.stopPropagation(),x(null)},children:[(0,e.jsx)("button",{type:"button",className:"me-lightbox-close",onClick:M=>{M.stopPropagation(),x(null)},"aria-label":t("close"),children:"\u2715"}),(0,e.jsx)("img",{src:v,alt:"",onClick:M=>M.stopPropagation()})]})]})}function co({t,onDone:a}){let[o,d]=(0,n.useState)(0),c="https://github.com/EternalNight996/memory-eternal",l=[{title:t("onboardStep0Title"),body:t("onboardStep0Body")},{title:t("onboardStep1Title"),body:t("onboardStep1Body")},{title:t("onboardStep2Title"),body:t("onboardStep2Body")},{title:t("onboardStep3Title"),body:t("onboardStep3Body")}],v=o===l.length-1;return(0,n.useEffect)(()=>{let x=k=>{k.key==="Escape"&&a()};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[a]),(0,e.jsxs)("div",{className:"me-overlay",style:{zIndex:1006},children:[(0,e.jsx)("style",{children:Je}),(0,e.jsxs)("div",{className:"me-dialog me-guide",children:[(0,e.jsxs)("div",{className:"me-guide-head",children:[(0,e.jsxs)("b",{children:["\u2728 ",t("onboardTitle")]}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("span",{style:{fontSize:11,opacity:.55},children:t("onboardSub")})]}),(0,e.jsx)("div",{className:"me-guide-dots",children:l.map((x,k)=>(0,e.jsx)("span",{className:`me-guide-dot${k<=o?" on":""}`},k))}),(0,e.jsxs)("div",{className:"me-guide-body",children:[(0,e.jsx)("h3",{children:l[o].title}),(0,e.jsx)("p",{children:l[o].body}),o===0&&(0,e.jsxs)("div",{className:"me-guide-github",children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn me-on",onClick:()=>ha(c),children:["\u2605 ",t("onboardStar")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>ha(c+"/fork"),children:["\u2442 ",t("onboardFork")]}),(0,e.jsx)("span",{className:"me-guide-github-hint",children:t("onboardStarHint")})]}),o===1&&(0,e.jsxs)("div",{className:"me-guide-chips",children:[(0,e.jsx)("span",{children:"\u81EA\u52A8\u6C89\u6DC0"}),(0,e.jsx)("span",{children:"\u5148\u5BA1\u540E\u5165"}),(0,e.jsx)("span",{children:"\u53EA\u53EC\u56DE\u76F8\u5173\u5C0F\u5757"})]}),o===2&&(0,e.jsxs)("div",{className:"me-guide-like",children:[(0,e.jsx)("span",{className:"me-guide-thumb",children:"\u{1F44D}"})," \u6709\u7528"]}),o===3&&(0,e.jsxs)("div",{className:"me-guide-chips",children:[(0,e.jsxs)("span",{children:["\u{1F4AC} ",t("supportGroup")]}),(0,e.jsxs)("span",{children:["\u2615 ",t("supportSponsor")]}),(0,e.jsxs)("span",{children:["\u{1F9E9} ",t("supportLegacy")]}),(0,e.jsxs)("span",{children:["\u{1F41E} ",t("supportFeedback")]})]})]}),(0,e.jsxs)("div",{className:"me-guide-actions",children:[(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:a,children:t("onboardSkip")}),(0,e.jsx)("div",{className:"spacer"}),(0,e.jsx)("span",{className:"me-guide-tip",children:t("onboardTip")}),o>0&&(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>d(x=>x-1),children:t("onboardBack")}),v?(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:a,children:t("onboardStart")}):(0,e.jsx)("button",{type:"button",className:"mc-btn me-on",onClick:()=>d(x=>x+1),children:t(o===0?"onboardStarred":"onboardNext")})]})]})]})}function po({t,card:a,query:o,onClose:d,onDelete:c,onFeedback:l,onNavigate:v,onTagClick:x,allCards:k,onOpenRelated:I,onKindChange:D}){let[M,y]=(0,n.useState)(0),[z,H]=(0,n.useState)(""),[O,F]=(0,n.useState)(()=>{try{let T=localStorage.getItem("me-read-width");return["narrow","mid","wide"].includes(T)?T:"mid"}catch{return"mid"}}),P={narrow:720,mid:900,wide:1180};(0,n.useEffect)(()=>{let T=f=>{if(f.key==="Escape"){d();return}let S=String(f.target&&f.target.tagName||"").toLowerCase();S==="input"||S==="textarea"||S==="select"||f.target&&f.target.isContentEditable||(f.key==="j"&&v?(f.preventDefault(),v(1)):f.key==="k"&&v&&(f.preventDefault(),v(-1)))};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[d,v]);let A=async(T,f)=>{let S=await ka(String(T||""));H(S?t("copied")+" \xB7 "+f:t("copyFail")),setTimeout(()=>H(""),1500)},{meta:G,body:re}=(0,n.useMemo)(()=>Qt(a.text||""),[a.text]),K=T=>{let f=G.find(([S])=>String(S).toLowerCase()===T);return f?f[1]:""},ae=Ra(K("tags")),ne=a.kind||K("kind")||"knowledge",J=String(a.status||K("status")||"approved").toLowerCase(),j=qe[ne]||"#6B7280",Z=(re||"").length>460,ce=(0,n.useMemo)(()=>Ca(re,a.title),[re,a.title]),Se=(0,n.useMemo)(()=>{let T=Ma(a);if(T)return T;let S=(ce.split(/\r?\n/).map(g=>g.trim()).find(g=>g&&!/^#{1,2}\s/.test(g))||"").replace(/[#>*_`]/g,"").replace(/\s+/g," ").trim();return S.length>150?S.slice(0,148)+"\u2026":S},[a,ce]),ie=(0,n.useMemo)(()=>no(ce),[ce]),De=(0,n.useMemo)(()=>{let T=new Set(ae);return(k||[]).filter(f=>f.path!==a.path&&(f.tags||[]).some(S=>T.has(S))).slice(0,3)},[k,a.path,ae.join("|")]),[m,Ne]=(0,n.useState)(!0),de=(0,n.useRef)(null),[Pe,ge]=(0,n.useState)(""),$=T=>{let f=de.current;if(!f)return;let S=document.getElementById(T);if(!S||!f.contains(S))return;let g=S.getBoundingClientRect().top-f.getBoundingClientRect().top+f.scrollTop-12;f.scrollTo({top:Math.max(0,g),behavior:"smooth"})},ke=T=>{if(!m){Ne(!0),setTimeout(()=>$(T),80);return}$(T)},Te=T=>{let f=T.currentTarget,S=f.scrollHeight-f.clientHeight;y(S<=0?100:Math.min(100,Math.max(0,f.scrollTop/S*100)));let g=f.querySelectorAll(".md-doc .md-h"),Y="",se=f.getBoundingClientRect().top+28;for(let Re of g)if(Re.getBoundingClientRect().top<=se)Y=Re.id;else break;ge(Y)};return(0,e.jsxs)("div",{className:"me-overlay",onClick:d,children:[(0,e.jsx)("style",{children:Je}),(0,e.jsxs)("div",{className:"me-dialog me-reader-dialog",onClick:T=>T.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsxs)("h3",{title:a.title,children:[(0,e.jsx)("span",{style:{marginRight:6,flex:"none"},children:Ct[ne]||"\u{1F4CE}"}),a.title]}),(0,e.jsxs)("div",{className:"me-head-actions",children:[z&&(0,e.jsx)("span",{style:{fontSize:11.5,color:"#10b981",whiteSpace:"nowrap"},children:z}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyBody"),onClick:()=>A(re,t("copyBody")),children:["\u{1F4CB} ",t("copyBody")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("copyPath"),onClick:()=>A(a.path,t("copyPath")),children:["\u{1F517} ",t("copyPath")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",title:t("readWidth"),onClick:()=>{let T=["narrow","mid","wide"],f=T[(T.indexOf(O)+1)%T.length];F(f);try{localStorage.setItem("me-read-width",f)}catch{}},children:[t("readWidth")," \xB7 ",t(O==="narrow"?"widthNarrow":O==="wide"?"widthWide":"widthMid")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>l&&l(!0),children:["\u{1F44D} ",t("fbUseful")]}),(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>l&&l(!1),children:["\u{1F44E} ",t("fbIrr")]}),Z&&(0,e.jsx)("button",{type:"button",className:"mc-btn","aria-expanded":m,onClick:()=>Ne(T=>!T),children:t(m?"collapse":"expand")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{window.confirm(t("deleteConfirm"))&&c&&c(a.path)},children:t("delete")}),D&&J==="approved"&&(ne==="core"?(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>D(a.path,"knowledge"),children:t("unsetCore")}):(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>D(a.path,"core"),children:["\u2B50 ",t("setCore")]})),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:d,children:t("close")})]})]}),D&&(0,e.jsxs)("div",{className:"me-core-banner"+(ne==="core"?" on":""),children:[(0,e.jsxs)("div",{className:"me-core-banner-k",children:["\u2B50 ",t("kindCore")]}),(0,e.jsx)("div",{className:"me-core-banner-desc",children:t(ne==="core"?"coreActiveHint":"coreInactiveHint")}),J==="approved"?(0,e.jsx)("button",{type:"button",className:"mc-btn me-core-btn",onClick:()=>D(a.path,ne==="core"?"knowledge":"core"),children:ne==="core"?t("unsetCore"):"\u2B50 "+t("setCore")}):(0,e.jsx)("span",{className:"me-core-banner-desc",style:{flex:"none",opacity:.6},children:t("coreNeedApproval")})]}),(0,e.jsxs)("div",{className:"md-meta",children:[(0,e.jsxs)("span",{className:"md-chip md-chip-kind",style:{color:j,borderColor:j+"59",background:j+"1a"},children:[Ct[ne]||"\u{1F4CE}"," ",t(Ge[ne]||"kindKnowledge")]}),(0,e.jsxs)("span",{className:"md-chip "+(J==="approved"?"md-chip-st-ok":J==="pending"?"md-chip-st-warn":"md-chip-st-bad"),children:[J==="approved"?"\u2705":J==="pending"?"\u23F3":"\u26D4"," ",t(J==="approved"?"statusApproved":J==="pending"?"statusPending":"statusRejected")]}),(Array.isArray(ae)?ae:[]).slice(0,8).map(T=>(0,e.jsxs)("button",{type:"button",className:"md-chip md-chip-tag mc-tag-click",title:T,onClick:()=>x&&x(T),children:["\u{1F3F7} ",T]},T)),!!K("updated")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F552} ",t("updated")," ",kt(K("updated"))]}),!!K("source")&&(0,e.jsxs)("span",{className:"md-chip md-date",children:["\u{1F4E5} ",K("source")]})]}),(0,e.jsx)("div",{className:"me-read-progress","aria-hidden":"true",children:(0,e.jsx)("i",{style:{width:M+"%"}})}),(0,e.jsxs)("div",{className:"me-reader-body",children:[(0,e.jsxs)("div",{className:"me-dialog-body me-reader-main",style:{maxWidth:P[O],margin:"0 auto",width:"100%",boxSizing:"border-box",...m?{}:{maxHeight:300,overflow:"hidden"}},ref:de,onScroll:Te,onClick:m?void 0:T=>{T.stopPropagation(),Ne(!0)},children:[!!Se&&(0,e.jsxs)("div",{className:"me-reader-callout",children:[(0,e.jsx)("span",{className:"me-reader-callout-k",children:t(an(a))}),(0,e.jsx)("p",{children:Se})]}),(0,e.jsx)("div",{className:"md-doc",dangerouslySetInnerHTML:{__html:_t(ce)}})]}),(0,e.jsxs)("aside",{className:"me-reader-side",children:[ie.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("contents")}),(0,e.jsx)("div",{className:"me-reader-toc",children:ie.map((T,f)=>(0,e.jsxs)("button",{type:"button",className:`lv${T.level}${Pe===T.id?" active":""}`,onClick:()=>ke(T.id),children:[(0,e.jsx)("span",{children:String(f+1).padStart(2,"0")}),T.text]},T.id))})]}),(0,e.jsx)("div",{className:"side-label",children:t("source")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:K("source")||a.submittedBy||"\u2014"}),(0,e.jsx)("div",{className:"side-label",children:t("updated")}),(0,e.jsx)("div",{className:"me-reader-side-val",children:kt(K("updated")||a.updated)}),(0,e.jsx)("div",{className:"side-label",children:t("file")}),(0,e.jsx)("div",{className:"me-reader-side-val mono",children:a.path}),ae.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("tags")}),(0,e.jsx)("div",{className:"me-reader-tags",children:ae.slice(0,8).map(T=>(0,e.jsxs)("button",{type:"button",className:"mc-chip",onClick:()=>x&&x(T),children:["#",T]},T))})]}),De.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"side-label",children:t("related")}),(0,e.jsx)("div",{className:"me-reader-related",children:De.map(T=>(0,e.jsxs)("button",{type:"button",onClick:()=>I&&I(T),children:[(0,e.jsx)("span",{children:Ct[T.kind]||"\u{1F4CE}"}),(0,e.jsx)("b",{children:T.title})]},T.path))})]})]})]}),!m&&(0,e.jsxs)("div",{className:"md-collapsed-hint",onClick:T=>{T.stopPropagation(),Ne(!0)},children:[t("expand")," \u2304"]})]})]})}function mo({t,onOpen:a,all:o,onAllChange:d,onMutate:c,active:l,visible:v}){let[x,k]=(0,n.useState)(null),[I,D]=(0,n.useState)(""),M=(0,n.useRef)(!1),y=(0,n.useRef)(0),z=(0,n.useRef)(t);z.current=t;let H=(0,n.useCallback)(async()=>{try{M.current=!1;let A=await(await fetch(`${W}/graph${o?"?all=1":""}`)).json();A.ok?(k(A),D(""),M.current=!0):(k(null),D(A.error||t("error")))}catch(P){D(String(P&&P.message?P.message:P))}},[o,t]);(0,n.useEffect)(()=>{if(!l||M.current)return;let P=!0;return fetch(`${W}/graph${o?"?all=1":""}`).then(A=>A.json()).then(A=>{P&&(A.ok?(k(A),D(""),M.current=!0):(k(null),D(A.error||t("error"))))}).catch(A=>{P&&D(String(A&&A.message?A.message:A))}),()=>{P=!1}},[o,t,l]),(0,n.useEffect)(()=>{v&&x&&y.current++},[v,x]);let O=(0,n.useCallback)(async P=>{try{let G=await(await fetch(`${W}/delete?path=${encodeURIComponent(P)}`)).json();return G&&G.ok?(await H(),c&&c(),!0):!1}catch{return!1}},[H]),F=(0,n.useCallback)(async P=>{if(!P||P.length<2)return!1;try{let A=await fetch(`${W}/merge?paths=${encodeURIComponent(P.join(","))}`).then(G=>G.json());return A&&A.ok?(await H(),c&&c(),!0):!1}catch{return!1}},[H,c]);return(0,e.jsxs)("div",{className:"me-graph me-v5-graph",children:[(0,e.jsx)("style",{children:Je}),(0,e.jsxs)("div",{className:"mc-v5-pagehead mc-v5-graphhead",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"mc-v5-eyebrow",children:"KNOWLEDGE GRAPH"}),(0,e.jsx)("h1",{children:t("graphTab")}),(0,e.jsx)("p",{children:t("graphHint")})]}),(0,e.jsx)("span",{className:"mc-v5-pagecount",children:x?`${x.nodes.length} ${t("nodes")} \xB7 ${Ka(x.edges)} ${t("edges")}`:""})]}),I&&(0,e.jsxs)("div",{className:"mc-empty",children:[t("error"),"\uFF1A",I]}),!x&&!I&&(0,e.jsx)(on,{text:t("loadingGraph")}),x&&x.nodes.length===0&&(0,e.jsx)("div",{className:"mc-empty",children:t("emptyGraph")}),x&&x.nodes.length>0&&(0,e.jsx)(uo,{nodes:x.nodes,edges:x.edges,onOpen:a,onDelete:O,onMerge:F,t,all:o,onAllChange:d,countLabel:`${x.nodes.length} ${t("nodes")} \xB7 ${Ka(x.edges)} ${t("edges")}`,fitTrigger:y.current})]})}function Ka(t){let a=new Set;for(let o of t||[])a.add([o.source,o.target].sort().join("|"));return a.size}var mt={colors:{core:"#FF7A45",skill:"#8B5CF6",project:"#3B82F6",knowledge:"#10B981",content:"#F59E0B",prompt:"#A855F7",business:"#EC4899",tool:"#06B6D4",mistake:"#EF4444",other:"#6B7280"},shapes:{core:"diamond",skill:"hexagon",project:"circle",knowledge:"circle",content:"rect",prompt:"diamond",business:"hexagon",tool:"circle",mistake:"diamond",other:"circle"}};function zt(t,a){try{let o=globalThis;if(o.__meGraphDrawWarned)return;o.__meGraphDrawWarned=!0,console.warn("[memory-eternal] \u77E5\u8BC6\u56FE\u8C31\u7ED8\u5236\u5F02\u5E38\uFF08\u5DF2\u515C\u5E95\uFF0C\u4E0D\u518D\u6574\u9875\u767D\u5C4F\uFF09"+(a?" @ "+a:""),t)}catch{}}function ra({value:t,small:a}){let o=typeof t=="number"&&Number.isFinite(t),d=o?Math.max(0,Math.min(100,t)):0;return(0,e.jsx)("div",{className:"me-progress"+(a?" me-progress-sm":"")+(o?" is-determinate":""),role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":o?Math.round(d):void 0,"aria-label":"\u52A0\u8F7D\u8FDB\u5EA6",children:(0,e.jsx)("span",{className:"me-progress-fill",style:o?{width:Math.max(3,d)+"%"}:void 0})})}function on({text:t,value:a}){return(0,e.jsxs)("div",{className:"me-loading",role:"status","aria-live":"polite",children:[(0,e.jsx)(ra,{value:a}),(0,e.jsx)("span",{className:"me-loading-text",children:t})]})}function uo({nodes:t,edges:a,onOpen:o,onDelete:d,onMerge:c,t:l,countLabel:v,all:x,onAllChange:k,fitTrigger:I}){let D=(0,n.useRef)(null),M=(0,n.useRef)(null),y=(0,n.useRef)(null),z=(0,n.useRef)(null),H=(0,n.useRef)(null),O=(0,n.useRef)(o);(0,n.useEffect)(()=>{O.current=o},[o]);let F=(0,n.useRef)(d);(0,n.useEffect)(()=>{F.current=d},[d]);let P=(0,n.useRef)(c);(0,n.useEffect)(()=>{P.current=c},[c]);let[A,G]=(0,n.useState)(""),[re,K]=(0,n.useState)(null),[ae,ne]=(0,n.useState)(null),J=(0,n.useRef)("");(0,n.useEffect)(()=>{J.current=A.trim().toLowerCase()},[A]),(0,n.useEffect)(()=>{let b=y.current;if(!b)return;let u=A.trim().toLowerCase();if(!u)return;let V=b.nodes.find(me=>(me.name||"").toLowerCase().includes(u));if(V){y.current.selectedId=V.id,K(V.id),b.panX=b.w/2-V.x*b.zoom,b.panY=b.h/2-V.y*b.zoom;try{b.render&&b.render()}catch(me){zt(me,"search-center")}}},[A]);let[j,Z]=(0,n.useState)("all"),[ce,Se]=(0,n.useState)(!1),ie=(0,n.useRef)("all"),[De,m]=(0,n.useState)(""),Ne=(0,n.useRef)(""),[de,Pe]=(0,n.useState)(!1),ge=(0,n.useRef)(!1),[$,ke]=(0,n.useState)(null);(0,n.useEffect)(()=>{ie.current=j},[j]),(0,n.useEffect)(()=>{Ne.current=De},[De]),(0,n.useEffect)(()=>{ge.current=de},[de]);let Te=(0,n.useMemo)(()=>{let b=new Map;for(let u of t)for(let V of u.tags||[]){let me=String(V).trim();me&&b.set(me,(b.get(me)||0)+1)}return[...b.entries()].sort((u,V)=>V[1]-u[1]).slice(0,24).map(([u,V])=>({tag:u,n:V}))},[t]),T=(0,n.useMemo)(()=>{let b={};for(let u of t)b[u.kind||"other"]=(b[u.kind||"other"]||0)+1;return b},[t]),f=(()=>{let b=A.trim().toLowerCase();return!!b&&!t.some(u=>(u.title||u.name||"").toLowerCase().includes(b)||String(u.kind||"").toLowerCase().includes(b)||String(Ge[u.kind]||"").toLowerCase().includes(b))})();(0,n.useEffect)(()=>{let b=y.current;b&&b.wake&&b.wake()},[A]),(0,n.useEffect)(()=>{let b=y.current;if(!(!b||!b.render))try{b.render()}catch(u){zt(u,"filter/timeDim")}},[j,De,de]);let S=(0,n.useRef)(null),[g,Y]=(0,n.useState)([]),[se,Re]=(0,n.useState)(null),[ee,ze]=(0,n.useState)(!1),[p,B]=(0,n.useState)(null),[E,le]=(0,n.useState)(""),N=(0,n.useRef)(null),L=(0,n.useRef)(null),X=(b,u=!0)=>{N.current&&clearTimeout(N.current),B({msg:b,ok:u}),N.current=setTimeout(()=>B(null),1900)},fe=b=>{le(b),L.current&&clearTimeout(L.current),L.current=setTimeout(()=>le(""),1600)};(0,n.useEffect)(()=>()=>{N.current&&clearTimeout(N.current),L.current&&clearTimeout(L.current)},[]);let Ce=(0,n.useMemo)(()=>t.reduce((b,u)=>(b[u.id]=u,b),{}),[t]);return(0,n.useEffect)(()=>{let b=D.current;if(!b||t.length===0)return;let u=b.getContext("2d");if(!u)return;let V=Math.min(1.5,Math.max(1,window.devicePixelRatio||1)),me=()=>document.documentElement.getAttribute("data-theme")==="dark",be={};a.forEach(w=>{be[w.source]=(be[w.source]||0)+1,be[w.target]=(be[w.target]||0)+1});let He=Math.max(1,...Object.values(be)),i={nodes:t.map(w=>({id:w.id,name:w.title||"",type:w.kind||"other",r:9+Math.min(10,(be[w.id]||0)/He*8)+(w.kind==="core"?3:0),x:0,y:0,vx:0,vy:0})),edges:a.map(w=>({sourceNodeId:w.source,targetNodeId:w.target,weight:1})),panX:0,panY:0,zoom:1,running:!0,raf:0,tickCount:0,quietTicks:0,dragNode:null,selectedId:null,mouseX:0,mouseY:0,w:0,h:0,dpr:V,ctx:u,multi:[],marquee:null};i.domain=t,i.domainById=t.reduce((w,_)=>(w[_.id]=_,w),{}),i.nodes.forEach((w,_)=>{let r=_*2.399963229728653,h=12*Math.sqrt(_);w.x=Math.cos(r)*h,w.y=Math.sin(r)*h});let Ae=[...new Set(i.nodes.map(w=>w.type))];i.clustered=Ae.length>1,i.typeCenters={},Ae.forEach((w,_)=>{let r=_/Ae.length*Math.PI*2-Math.PI/2;i.typeCenters[w]={x:Math.cos(r)*160,y:Math.sin(r)*160}}),y.current=i;let Dt=0,At=0,Ke=null,et="",Lt=()=>{let w=b.clientWidth,_=b.clientHeight;i.w=w,i.h=_,b.width=w*V,b.height=_*V,u.setTransform(V,0,0,V,0,0),(Dt===0||At===0)&&w>0&&_>0&&i.tickCount>0&&requestAnimationFrame(()=>Ye()),Dt=w,At=_};Lt();let dt=new ResizeObserver(Lt);dt.observe(b.parentElement);let tt=(w,_)=>w&&w.length>_?w.slice(0,_)+"\u2026":w,Xe=(w,_,r,h)=>{if(u.beginPath(),h==="rect")u.rect(w-r,_-r*.75,r*2,r*1.5);else if(h==="diamond")u.moveTo(w,_-r),u.lineTo(w+r,_),u.lineTo(w,_+r),u.lineTo(w-r,_),u.closePath();else if(h==="hexagon"){for(let C=0;C<6;C++){let U=Math.PI/3*C-Math.PI/2,Q=w+r*Math.cos(U),te=_+r*Math.sin(U);C===0?u.moveTo(Q,te):u.lineTo(Q,te)}u.closePath()}else u.arc(w,_,r,0,Math.PI*2)},ot=new Map,ut=(w,_)=>{let r=w+"|"+Math.round(_),h=ot.get(r);if(!h){let C=parseInt(w.slice(1,3),16),U=parseInt(w.slice(3,5),16),Q=parseInt(w.slice(5,7),16);h=u.createRadialGradient(-_*.3,-_*.3,0,0,0,_*1.2),h.addColorStop(0,"rgba("+Math.min(255,C+70)+","+Math.min(255,U+70)+","+Math.min(255,Q+70)+",0.95)"),h.addColorStop(1,w),ot.set(r,h)}return h},Mt=1.1,gt=3,Ye=()=>{if(!i.nodes.length)return;let w=1/0,_=-1/0,r=1/0,h=-1/0;i.nodes.forEach(_e=>{w=Math.min(w,_e.x),_=Math.max(_,_e.x),r=Math.min(r,_e.y),h=Math.max(h,_e.y)});let C=20,U=_-w+C*2,Q=h-r+C*2,te=Math.min(i.w/U,i.h/Q),Le=Math.pow(1/Mt,gt);i.zoom=Math.max(.35,Math.min(1.8,te*Le)),i.panX=i.w/2-(w+_)/2*i.zoom,i.panY=i.h/2-(r+h)/2*i.zoom};z.current=Ye;let st=()=>{u.clearRect(0,0,i.w,i.h),i.searchTerm=J.current,i.kindFilter=ie.current,i.timeMode=ge.current,i.tagFilter=Ne.current;let w=i.tagFilter,_=i.kindFilter,r=R=>String(R||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");u.save();let h=i.w+"x"+i.h;if(!Ke||et!==h){Ke=new Path2D;for(let R=0;R<i.w;R+=24)Ke.moveTo(R,0),Ke.lineTo(R,i.h);for(let R=0;R<i.h;R+=24)Ke.moveTo(0,R),Ke.lineTo(i.w,R);et=h}u.strokeStyle=me()?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)",u.lineWidth=.5,u.stroke(Ke),u.restore(),u.save(),u.translate(i.panX,i.panY),u.scale(i.zoom,i.zoom);let C={};i.nodes.forEach(R=>C[R.id]=R);let U=i.nodes.length>40,Q=U?1.5:.55,te=i.selectedId||i.hoverId,Le=ja({panX:i.panX,panY:i.panY,zoom:i.zoom,w:i.w,h:i.h,margin:80}),_e=(()=>{let R=(i.searchTerm||"").toLowerCase();if(!R)return null;let xe=[];for(let we of i.nodes){let $e=(i.domainById[we.id]||{}).kind||"other";if(((we.name||"").toLowerCase().includes(R)||String(Ge[$e]||"").toLowerCase().includes(R)||String($e).toLowerCase().includes(R))&&xe.push(we.id),xe.length>200)break}return xe})(),ye=Ha(i.nodes,{limit:Ea(i.nodes.length),focusId:te,hoverId:i.hoverId,searchHits:_e,degree:be}),ve=new Map,Fe=(R,xe)=>{let we=R+"|"+xe,je=ve.get(we);return je===void 0&&(u.font=R,je=u.measureText(xe).width,ve.set(we,je)),je},it=i.nodes.length<=250,nt=new Map,ht=i.nodes.length>1200&&i.zoom<.3;i.edges.forEach(R=>{if(ht)return;let xe=C[R.sourceNodeId],we=C[R.targetNodeId];if(!xe||!we||!aa(xe.x,xe.y,10,Le)&&!aa(we.x,we.y,10,Le))return;if(_!=="all"){let Ft=i.domainById[R.sourceNodeId]&&i.domainById[R.sourceNodeId].kind,pt=i.domainById[R.targetNodeId]&&i.domainById[R.targetNodeId].kind;if(Ft!==_&&pt!==_)return}if(w){let Ft=i.domainById[R.sourceNodeId]&&(i.domainById[R.sourceNodeId].tags||[]).includes(w),pt=i.domainById[R.targetNodeId]&&(i.domainById[R.targetNodeId].tags||[]).includes(w);if(!Ft&&!pt)return}let je=we.x-xe.x,$e=we.y-xe.y,Qe=Math.sqrt(je*je+$e*$e)||1,vt=U?12:18,St=-$e/Qe*vt,Vt=je/Qe*vt,qt=(xe.x+we.x)/2+St,Jt=(xe.y+we.y)/2+Vt,Ht=mt.colors[i.domainById[xe.id]&&i.domainById[xe.id].kind||"other"]||mt.colors.other,Ot=te&&(R.sourceNodeId===te||R.targetNodeId===te),sa=te?Ot?.6:.08:U?.14:.24,ct=parseInt(Ht.slice(1,3),16),Wt=parseInt(Ht.slice(3,5),16),la=parseInt(Ht.slice(5,7),16),lt=Ot?1.6+(R.weight||1):.8+(R.weight||1)*.5,Tt=ct+","+Wt+","+la+","+sa+","+lt,rt=nt.get(Tt);rt||(rt={path:new Path2D,stroke:"rgba("+ct+","+Wt+","+la+","+sa+")",width:lt},nt.set(Tt,rt)),rt.path.moveTo(xe.x,xe.y),rt.path.quadraticCurveTo(qt,Jt,we.x,we.y)}),nt.forEach(R=>{u.strokeStyle=R.stroke,u.lineWidth=R.width,u.stroke(R.path)});let Ue=null;te&&(Ue=new Set,i.edges.forEach(R=>{R.sourceNodeId===te?Ue.add(R.targetNodeId):R.targetNodeId===te&&Ue.add(R.sourceNodeId)}));let yt=[];if(i.nodes.forEach(R=>{if(!aa(R.x,R.y,R.r+2,Le))return;let xe=i.domainById[R.id]||{},we=xe.kind||"other",je=i.timeMode?go(xe.updated):mt.colors[we]||mt.colors.other,$e=mt.shapes[we]||"circle",Qe=i.selectedId===R.id,vt=i.hoverId===R.id,St=i.searchTerm||"",Vt=!St||(R.name||"").toLowerCase().includes(St)||String(Ge[we]||"").toLowerCase().includes(St)||String(we).toLowerCase().includes(St),qt=_==="all"||we===_,Jt=!w||(xe.tags||[]).includes(w),Ht=te&&R.id!==te&&!(Ue&&Ue.has(R.id))||St&&!Vt||!qt||!Jt;u.save(),u.globalAlpha=Ht?.08:1,(Qe||vt)&&it&&(u.shadowColor=je,u.shadowBlur=Qe?20:14),u.translate(R.x,R.y),Xe(0,0,R.r,$e),u.fillStyle=ut(je,R.r),u.fill(),we==="core"&&(u.fillStyle="#1b120e",u.font="700 "+Math.max(10,Math.round(R.r*.95))+"px sans-serif",u.textAlign="center",u.textBaseline="middle",u.fillText("\u2605",0,0)),u.restore(),Qe?(u.save(),Xe(R.x,R.y,R.r+3,$e),u.strokeStyle=je,u.lineWidth=3,u.shadowColor=je,u.shadowBlur=12,u.stroke(),u.restore()):vt?(u.save(),Xe(R.x,R.y,R.r+2,$e),u.strokeStyle=je,u.lineWidth=2,u.stroke(),u.restore()):St&&Vt?(u.save(),Xe(R.x,R.y,R.r+2,$e),u.strokeStyle="#e11d48",u.lineWidth=2,u.stroke(),u.restore()):i.multi.indexOf(R.id)>=0&&(u.save(),Xe(R.x,R.y,R.r+2,$e),u.strokeStyle="#60a5fa",u.lineWidth=2,u.shadowColor="#60a5fa",u.shadowBlur=8,u.stroke(),u.restore());let Ot=tt(R.name,16);if((Qe||vt||ye.has(R.id)&&i.zoom>Q||!U&&i.zoom>.6)&&qt&&Jt){let ct=1/i.zoom,Wt="500 "+(12*ct).toFixed(1)+"px -apple-system,Segoe UI,sans-serif";u.font=Wt;let lt=Fe(Wt,Ot)+16*ct,Tt=18*ct,rt=R.y+R.r+8*ct,Ft=!0;for(let pt of yt)if(R.x-lt/2<pt.x+pt.w&&R.x+lt/2>pt.x&&rt<pt.y+pt.h&&rt+Tt>pt.y){Ft=!1;break}if(!Ft&&!Qe&&!vt)return;yt.push({x:R.x-lt/2,y:rt,w:lt,h:Tt}),u.fillStyle=me()?"rgba(30,30,35,0.92)":"rgba(255,255,255,0.92)",u.beginPath(),u.roundRect?u.roundRect(R.x-lt/2,rt,lt,Tt,4*ct):u.rect(R.x-lt/2,rt,lt,Tt),u.fill(),u.strokeStyle=me()?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.08)",u.lineWidth=1*ct,u.stroke(),u.fillStyle=me()?Qe||vt?"#eee":"#bbb":Qe||vt?"#111":"#444",u.textAlign="center",u.fillText(Ot,R.x,rt+13*ct)}}),u.restore(),i.marquee){let R=i.marquee,xe=Math.min(R.sx,R.ex),we=Math.min(R.sy,R.ey),je=Math.abs(R.ex-R.sx),$e=Math.abs(R.ey-R.sy);u.save(),u.setLineDash([4,4]),u.strokeStyle="rgba(96,165,250,0.9)",u.lineWidth=1,u.fillStyle="rgba(96,165,250,0.12)",u.fillRect(xe,we,je,$e),u.strokeRect(xe,we,je,$e),u.restore()}if(i.hoverId&&S.current){let R=i.domainById[i.hoverId],xe=i.nodes.find(function(we){return we.id===i.hoverId});if(R&&xe){let we=i.edges.filter(function(Qe){return Qe.sourceNodeId===R.id||Qe.targetNodeId===R.id}).length,je=xe.x*i.zoom+i.panX,$e=xe.y*i.zoom+i.panY;S.current.style.display="block",S.current.style.left=je+14+"px",S.current.style.top=$e-6+"px",S.current.innerHTML="<b>"+r(R.title||R.name||"")+'</b><br/><span style="opacity:.8">'+r(R.kind||"")+" \xB7 "+tRef.current("connCount").replace("{n}",we)+"</span>"}}else S.current&&(S.current.style.display="none")},Ve=0,Ie=()=>{Ve>0||(i.running=!0,i.raf||(i.raf=requestAnimationFrame(s)))};i.wake=Ie,i.render=st;let Oe=()=>{let w=i.nodes.length;i.tickCount++;let r=.9-Math.min(.4,i.tickCount/1500),h=w>1e3?3e3:w>100?2e3:w>50?1200:800,C=w>100?.002:.005,U=w>1e3?.012:w>100?.005:.01,Q=w>1e3?6:w>200?12:24,te={};i.nodes.forEach(ye=>te[ye.id]=ye);for(let ye=0;ye<w;ye++){if(i.dragNode===i.nodes[ye])continue;let ve=i.nodes[ye],Fe=0,it=0;for(let Ue=0;Ue<w;Ue++){if(ye===Ue)continue;let yt=ve.x-i.nodes[Ue].x,R=ve.y-i.nodes[Ue].y,xe=Math.sqrt(yt*yt+R*R)||1,we=h/(xe*xe);Fe+=yt/xe*we,it+=R/xe*we}if(i.clustered&&i.typeCenters[ve.type]){let Ue=i.typeCenters[ve.type];Fe+=(Ue.x-ve.x)*.006,it+=(Ue.y-ve.y)*.006}else Fe-=ve.x*U,it-=ve.y*U;let nt=(ve.vx+Fe)*r,ht=(ve.vy+it)*r;nt=Math.max(-Q,Math.min(Q,nt)),ht=Math.max(-Q,Math.min(Q,ht)),ve.vx=nt,ve.vy=ht}i.edges.forEach(ye=>{let ve=te[ye.sourceNodeId],Fe=te[ye.targetNodeId];if(!ve||!Fe)return;let it=Fe.x-ve.x,nt=Fe.y-ve.y,ht=Math.sqrt(it*it+nt*nt)||1,Ue=(ht-100)*C,yt=it/ht*Ue,R=nt/ht*Ue;i.dragNode!==ve&&(ve.vx+=yt,ve.vy+=R),i.dragNode!==Fe&&(Fe.vx-=yt,Fe.vy-=R)});let Le=0;i.nodes.forEach(ye=>{i.dragNode!==ye&&(ye.x+=ye.vx,ye.y+=ye.vy,Le+=ye.vx*ye.vx+ye.vy*ye.vy)}),i.autoFitPending&&i.tickCount>45&&(i.autoFitPending=!1,Ye()),(w?Math.sqrt(Le/w):0)<.05&&i.tickCount>60&&!i.dragNode?i.quietTicks=(i.quietTicks|0)+1:i.quietTicks=0},s=()=>{if(i.running){try{Oe(),st()}catch(w){zt(w,"step")}if(i.quietTicks>30){i.raf=0;return}i.raf=requestAnimationFrame(s)}},q=(w,_)=>{let r=b.getBoundingClientRect(),h=r.width?b.clientWidth/r.width:1,C=r.height?b.clientHeight/r.height:1;return{x:(w-r.left)*h,y:(_-r.top)*C}},oe=(w,_)=>{let r=q(w,_);return{x:(r.x-i.panX)/i.zoom,y:(r.y-i.panY)/i.zoom}},he=w=>{let _=i.domainById[w];return!(!_||ie.current!=="all"&&_.kind!==ie.current||Ne.current&&!(_.tags||[]).includes(Ne.current))},ue=(w,_,r)=>Math.max(_,Math.min(r,w)),pe=w=>{i.mouseX=w.clientX,i.mouseY=w.clientY;let _=oe(w.clientX,w.clientY),r=null;for(let h=i.nodes.length-1;h>=0;h--){let C=i.nodes[h];if(!he(C.id))continue;let U=C.x-_.x,Q=C.y-_.y;if(U*U+Q*Q<C.r*C.r+36){r=C.id;break}}r!==i.hoverId&&(i.hoverId=r,Ie())},Me=w=>{if(w.button!==0)return;let _=oe(w.clientX,w.clientY),r=null;for(let h=i.nodes.length-1;h>=0;h--){let C=i.nodes[h];if(!he(C.id))continue;let U=C.x-_.x,Q=C.y-_.y;if(U*U+Q*Q<C.r*C.r+25){r=C;break}}if(w.shiftKey){if(r){i.shiftClick=r.id;return}i.marquee={sx:w.clientX,sy:w.clientY,ex:w.clientX,ey:w.clientY};return}i.userTouched=!0,i.dragStart={x:w.clientX,y:w.clientY,px:i.panX,py:i.panY},i.dragging=!1,i.dragNode=r||null,r&&(i.dragOffset={dx:r.x-_.x,dy:r.y-_.y})},at=w=>{if(i.marquee){i.marquee.ex=w.clientX,i.marquee.ey=w.clientY,Ie();return}if(!i.dragStart)return;let _=w.clientX-i.dragStart.x,r=w.clientY-i.dragStart.y;if(Math.abs(_)+Math.abs(r)>3&&(i.dragging=!0),i.dragNode){let h=oe(w.clientX,w.clientY);i.dragNode.x=h.x+i.dragOffset.dx,i.dragNode.y=h.y+i.dragOffset.dy,Ie()}else i.dragging&&(i.panX=ue(i.dragStart.px+_,-1e5,1e5),i.panY=ue(i.dragStart.py+r,-1e5,1e5),Ie())},ft=w=>{if(i.marquee){let r=i.marquee;i.marquee=null;let h=q(r.sx,r.sy),C=q(r.ex,r.ey),U=Math.min(h.x,C.x),Q=Math.max(h.x,C.x),te=Math.min(h.y,C.y),Le=Math.max(h.y,C.y),_e=i.nodes.filter(ye=>{let ve=ye.x*i.zoom+i.panX,Fe=ye.y*i.zoom+i.panY;return ve>=U&&ve<=Q&&Fe>=te&&Fe<=Le}).map(ye=>ye.id);i.multi=_e,Y(_e),Ie();return}let _=i.dragStart&&!i.dragging;if(i.shiftClick){let r=i.shiftClick;i.shiftClick=null;let h=Array.isArray(i.multi)?i.multi.slice():[];h.includes(r)||h.push(r),i.multi=h,Y(h),Ie();return}if(_){let r=oe(w.clientX,w.clientY),h=null;for(let C=i.nodes.length-1;C>=0;C--){let U=i.nodes[C];if(!he(U.id))continue;let Q=U.x-r.x,te=U.y-r.y;if(Q*Q+te*te<U.r*U.r+20){h=U;break}}h?(i.selectedId=h.id,K(h.id),Ie()):(i.selectedId=null,i.hoverId=null,w.shiftKey||(i.multi=[],Y([])),K(null),Ie())}i.dragStart=null,i.dragging=!1,i.dragNode=null},Ee=w=>{w.preventDefault();let _=oe(w.clientX,w.clientY),r=null;for(let h=i.nodes.length-1;h>=0;h--){let C=i.nodes[h];if(!he(C.id))continue;let U=C.x-_.x,Q=C.y-_.y;if(U*U+Q*Q<C.r*C.r+25){r=C;break}}if(r){let h=i.domainById[r.id];h&&ke({x:w.clientX,y:w.clientY,id:r.id,path:h.id,title:h.title})}else ke(null)},Kt=w=>{w.preventDefault();let _=q(w.clientX,w.clientY),r=(_.x-i.panX)/i.zoom,h=(_.y-i.panY)/i.zoom,C=Math.max(.3,Math.min(3,i.zoom*(w.deltaY<0?Mt:1/Mt)));i.panX=ue(i.panX+r*(i.zoom-C),-1e5,1e5),i.panY=ue(i.panY+h*(i.zoom-C),-1e5,1e5),i.zoom=C,i.userTouched=!0,Ie()};b.addEventListener("mousemove",pe),b.addEventListener("mousedown",Me),window.addEventListener("mousemove",at),window.addEventListener("mouseup",ft),b.addEventListener("wheel",Kt,{passive:!1}),b.addEventListener("contextmenu",Ee),H.current=()=>{i.selectedId=null,i.hoverId=null,i.multi=[],Y([]),i.userTouched=!1,Ye(),Ie()},Ve=Oa(i.nodes.length);let bt=Ve,jt=()=>bt>0?Math.round((bt-Ve)/bt*100):100;Ve>0&&ne(0);let Et=bt>0?[.75,.5,.25].map(w=>Math.round(bt*w)):[],We=()=>{if(!i.running)return;let w=performance.now();for(;Ve>0&&performance.now()-w<12;)Oe(),Ve--;if(ne(Ve>0?Math.min(99,jt()):100),Et.length&&Ve<=Et[0]){Et.shift(),i.userTouched||Ye();try{st()}catch(_){zt(_,"warm-frame")}}if(Ve>0){i.userTouched||Ye(),i.warmRaf=requestAnimationFrame(We);return}i.warmRaf=0,i.userTouched||Ye();try{st()}catch(_){zt(_,"warm-final")}ne(null),Ie()};i.warmStep=We,Ye();try{st()}catch(w){zt(w,"first-frame")}Ve>0?i.warmRaf=requestAnimationFrame(We):(ne(0),Ie());let Yt=()=>Se(!1);return window.addEventListener("mousedown",Yt),()=>{i.running=!1,i.raf&&cancelAnimationFrame(i.raf),i.warmRaf&&cancelAnimationFrame(i.warmRaf),dt.disconnect(),b.removeEventListener("mousemove",pe),b.removeEventListener("mousedown",Me),window.removeEventListener("mousemove",at),window.removeEventListener("mouseup",ft),b.removeEventListener("wheel",Kt),b.removeEventListener("contextmenu",Ee),window.removeEventListener("mousedown",Yt)}},[t,a]),(0,n.useEffect)(()=>{I!==void 0&&z.current&&requestAnimationFrame(()=>{try{z.current()}catch(b){zt(b,"fit")}})},[I]),(0,e.jsxs)("div",{className:"me-graph",ref:M,children:[(0,e.jsxs)("div",{className:"me-graph-toolbar",children:[(0,e.jsxs)("span",{className:"me-graph-count",children:[t.length," ",l("nodes")," \xB7 ",a.length," ",l("edges")]}),(0,e.jsx)("span",{className:"spacer",style:{flex:1}}),(0,e.jsx)("input",{type:"text",placeholder:l("search"),value:A,onChange:b=>G(b.target.value)}),(0,e.jsxs)("span",{style:{position:"relative",display:"inline-flex"},children:[(0,e.jsxs)("button",{type:"button",className:"mc-btn",onClick:()=>Se(b=>!b),"aria-expanded":ce,title:l("filterLabel"),style:{borderRadius:8},children:["\u{1F50D} ",l("filterLabel")," ",j!=="all"||de||De?"\u25CF":"\u25BE"]}),ce&&(0,e.jsx)("div",{className:"me-graph-legend-pop",onMouseDown:b=>b.stopPropagation(),style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:50,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",border:"1px solid rgba(255,255,255,0.1)",borderRadius:10,padding:8,minWidth:240,boxShadow:"0 12px 34px rgba(0,0,0,.35)"},children:(0,e.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[(0,e.jsx)("button",{type:"button",className:`lg${j==="all"&&!de?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>{Z("all"),Pe(!1)},children:l("all")}),Object.keys(qe).map(b=>(0,e.jsxs)("button",{type:"button",className:`lg${j===b?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>Z(u=>u===b?"all":b),children:[(0,e.jsx)("span",{className:"mc-kind",style:{background:mt.colors[b]||qe[b]}}),l(Ge[b])]},b)),(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsxs)("button",{type:"button",className:`lg${de?" active":""}`,style:{justifyContent:"flex-start"},onClick:()=>Pe(b=>!b),children:["\u23F1 ",l("timeDim")]}),Te.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{style:{height:1,background:"rgba(255,255,255,0.1)",margin:"4px 0"}}),(0,e.jsx)("div",{style:{maxHeight:130,overflow:"auto",display:"flex",flexWrap:"wrap",gap:4},children:Te.map(b=>(0,e.jsxs)("button",{type:"button",className:`lg${De===b.tag?" active":""}`,style:{color:"#ddd",padding:"2px 7px",fontSize:11},onClick:()=>m(u=>u===b.tag?"":b.tag),title:b.tag,children:["#",b.tag," ",(0,e.jsx)("span",{style:{opacity:.55},children:b.n})]},b.tag))})]}),(j!=="all"||de||De)&&(0,e.jsxs)("button",{type:"button",className:"lg lg-clear",style:{justifyContent:"flex-start",color:"#f87171"},onClick:()=>{Z("all"),Pe(!1),m("")},children:[l("clearFilter")," \u2715"]})]})})]}),(0,e.jsxs)("label",{className:"mc-btn",style:{display:"inline-flex",alignItems:"center",gap:5,cursor:"pointer"},title:l("crossVault"),children:[(0,e.jsx)("input",{type:"checkbox",checked:!!x,onChange:b=>k&&k(b.target.checked)}),l("crossVault")]}),(0,e.jsx)("button",{type:"button",className:`mc-btn${de?" me-on":""}`,onClick:()=>Pe(b=>!b),children:l("timeDim")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let b=D.current;if(b)try{b.toBlob(u=>{u&&Re({url:URL.createObjectURL(u),blob:u})},"image/png")}catch{}},children:l("exportGraph")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>z.current&&z.current(),children:l("fit")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{K(null),Z("all"),H.current&&H.current()},children:l("reset")})]}),(0,e.jsxs)("div",{className:"me-graph-canvas",style:{position:"relative",overflow:"hidden"},children:[(0,e.jsx)("canvas",{ref:D,style:{width:"100%",height:"100%",display:"block",cursor:"grab"}}),ae!==null&&(0,e.jsxs)("div",{role:"status","aria-live":"polite",style:{position:"absolute",left:"50%",top:10,transform:"translateX(-50%)",zIndex:3,display:"flex",alignItems:"center",gap:9,padding:"6px 12px",borderRadius:999,background:"rgba(28,28,32,0.86)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",color:"#eee",fontSize:11.5,fontWeight:600,letterSpacing:".02em",pointerEvents:"none",boxShadow:"0 6px 18px rgba(0,0,0,.22)"},children:[(0,e.jsx)(ra,{value:ae,small:!0}),(0,e.jsxs)("span",{children:[l("graphWarming").replace("{n}",t.length)," \xB7 ",Math.round(ae),"%"]})]}),(0,e.jsxs)("div",{className:"mc-v5-graph-legend",children:[(0,e.jsx)("div",{className:"mc-v5-graph-legend-title",children:"\u8FDE\u63A5\u7C07"}),Object.keys(mt.colors).filter(b=>T[b]).map(b=>(0,e.jsxs)("div",{className:"mc-v5-graph-legend-row",children:[(0,e.jsx)("i",{style:{background:mt.colors[b]}}),(0,e.jsx)("span",{children:l(Ge[b]||"kindKnowledge")}),(0,e.jsx)("b",{children:T[b]})]},b))]}),(0,e.jsx)("div",{className:"me-graph-tooltip",ref:S,style:{display:"none",position:"absolute",zIndex:4,pointerEvents:"none",background:"rgba(28,28,32,0.88)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:8,padding:"7px 10px",fontSize:12,maxWidth:220,boxShadow:"0 8px 24px rgba(0,0,0,.2)"}}),f&&(0,e.jsx)("div",{className:"mc-empty",style:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)"},children:l("noMatch")}),$&&(0,e.jsx)("div",{className:"me-graph-ctx-back",style:{position:"fixed",inset:0,zIndex:30},onMouseDown:()=>ke(null)}),$&&(0,e.jsxs)("div",{className:"me-graph-ctxmenu",style:{position:"fixed",left:$.x,top:$.y,zIndex:31},onMouseDown:b=>b.stopPropagation(),children:[(0,e.jsx)("button",{type:"button",onClick:()=>{O.current({path:$.path,title:$.title}),ke(null)},children:l("openCard")}),(0,e.jsx)("button",{type:"button",onClick:()=>{$.id&&(y.current.selectedId=$.id,K($.id)),ke(null);let b=y.current;b&&b.wake&&b.wake()},children:l("focusNeighbors")}),(0,e.jsx)("button",{type:"button",onClick:()=>{try{navigator.clipboard&&navigator.clipboard.writeText($.title||"")}catch{}ke(null),X(l("copied"))},children:l("copyName")}),(0,e.jsx)("button",{type:"button",onClick:()=>{let b=y.current,u=b&&Array.isArray(b.multi)?b.multi.slice():[],V=$.id;if(V&&!u.includes(V)&&u.push(V),ke(null),u.length<2){X(l("mergeNeed"),!1);return}if(!window.confirm(l("mergeConfirm")))return;let me=P.current&&P.current(u);me&&me.then?me.then(be=>be?X(l("merged")):X(l("mergeFail"),!1)).catch(()=>X(l("mergeFail"),!1)):me&&X(l("merged"))},children:l("merge")}),(0,e.jsx)("button",{type:"button",style:{color:"#f87171"},onClick:()=>{let b=$.path;ke(null),window.confirm(l("deleteConfirm"))&&(async()=>{try{(F.current?await F.current(b):!1)?X(l("deleted")):X(l("deleteFail"),!1)}catch{X(l("deleteFail"),!1)}})()},children:l("delete")})]}),g.length>0&&(0,e.jsxs)("div",{style:{position:"absolute",left:10,top:10,zIndex:3,display:"flex",gap:8,alignItems:"center",background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:"6px 10px",fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsxs)("span",{style:{fontWeight:700},children:[g.length," ",l("nodes")]}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let u=g.map(He=>Ce[He]).filter(Boolean).map(He=>He.title||He.name).join(`
950
+ `),V=new Blob([u],{type:"text/plain;charset=utf-8"}),me=URL.createObjectURL(V),be=document.createElement("a");be.href=me,be.download="memory-selected.txt",document.body.appendChild(be),be.click(),document.body.removeChild(be),setTimeout(()=>URL.revokeObjectURL(me),1e3),X(g.length+l("exportedSel"))},children:l("exportSel")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{if(g.length<2){X(l("mergeNeed"),!1);return}let b=g.map(V=>Ce[V]?Ce[V].id:V);if(!window.confirm(l("mergeConfirm")))return;Y([]);let u=y.current;u&&(u.multi=[]),fetch(`${W}/merge?paths=${encodeURIComponent(b.join(","))}`).then(V=>V.json()).then(V=>{V&&V.ok?X(l("merged")):X(l("mergeFail"),!1)}).catch(()=>X(l("mergeFail"),!1))},children:l("merge")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",style:{color:"#f87171"},onClick:()=>{if(!window.confirm(l("deleteConfirm")))return;let b=g.map(V=>Ce[V]?Ce[V].id:V);Y([]);let u=y.current;u&&(u.multi=[]),(async()=>{let V=0;for(let me of b)try{(F.current?await F.current(me):!1)&&V++}catch{}X(V+l("deletedSelected"),V>0)})()},children:l("deleteSelected")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let b=y.current;b&&(b.multi=[]),Y([]);let u=y.current;u&&u.render&&u.render()},children:l("clearSelection")})]}),re&&(0,e.jsxs)("div",{className:"me-graph-sidebar",style:{position:"absolute",right:10,top:10,zIndex:3,maxWidth:240,background:"rgba(28,28,32,0.92)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",color:"#eee",borderRadius:10,padding:12,fontSize:12,boxShadow:"0 10px 30px rgba(0,0,0,.25)"},children:[(0,e.jsx)("div",{style:{fontWeight:700,fontSize:13,marginBottom:4},children:Ce[re]?Ce[re].title||Ce[re].name:re}),(0,e.jsx)("div",{style:{opacity:.8,marginBottom:8},children:Ce[re]?l(Ge[Ce[re].kind]||"kindKnowledge"):"\u2014"}),(0,e.jsx)("div",{style:{fontSize:11,opacity:.65,letterSpacing:".04em",marginBottom:6},children:l("graphHint")}),(a.filter(b=>b.source===re||b.target===re)||[]).slice(0,8).map((b,u)=>{let V=b.source===re?b.target:b.source,me=Ce[V];return(0,e.jsx)("div",{style:{padding:"4px 6px",cursor:"pointer",borderRadius:6},onMouseDown:be=>{be.preventDefault();let He=y.current;He&&(He.selectedId=V,He.hoverId=V,He.wake&&He.wake()),K(V)},children:me?(me.title||me.name).slice(0,28):V},u)})]})]}),(0,e.jsx)("div",{className:"me-graph-tip",children:l("graphTip")}),p&&(0,e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,position:"fixed",left:"50%",transform:"translateX(-50%)",top:22,zIndex:70,background:"rgba(20,22,26,0.97)",backdropFilter:"blur(12px)",WebkitBackdropFilter:"blur(12px)",color:"#f5f5f5",borderRadius:12,padding:"10px 20px",fontSize:13.5,fontWeight:600,boxShadow:"0 14px 44px rgba(0,0,0,.5)",pointerEvents:"none",animation:"me-pop .22s ease",borderLeft:"4px solid "+(p.ok?"#22c55e":"#ef4444"),maxWidth:"90vw"},children:[(0,e.jsx)("span",{style:{color:p.ok?"#34d399":"#f87171",fontWeight:800,fontSize:15},children:p.ok?"\u2713":"\u2715"}),(0,e.jsx)("span",{style:{wordBreak:"break-all"},children:p.msg})]}),se&&(0,e.jsxs)("div",{className:"me-overlay",onClick:()=>{se.url&&URL.revokeObjectURL(se.url),Re(null),ze(!1)},children:[(0,e.jsx)("style",{children:Je}),(0,e.jsxs)("div",{className:"me-dialog",style:{maxWidth:ee?"100vw":900,width:ee?"100vw":"92vw",maxHeight:ee?"100%":"90vh",height:ee?"100%":void 0,borderRadius:ee?0:14},onClick:b=>b.stopPropagation(),children:[(0,e.jsxs)("div",{className:"me-dialog-head",children:[(0,e.jsx)("h3",{children:l("exportGraph")}),(0,e.jsxs)("div",{className:"me-head-actions",children:[(0,e.jsx)("a",{className:"mc-btn",href:se.url,download:"memory-graph.png",onClick:()=>{fe("download"),X(l("downloaded")+" \xB7 "+l("defaultDownloads"))},style:{textDecoration:"none",display:"inline-flex",alignItems:"center"},children:l(E==="download"?"done":"download")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{fe("full"),ze(b=>!b),X(l("fullscreen"))},children:l(E==="full"?"done":ee?"exitFull":"fullscreen")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{let b=se.blob;b&&window.ClipboardItem&&navigator.clipboard?navigator.clipboard.write([new window.ClipboardItem({"image/png":b})]).then(()=>{fe("copy"),X(l("copied"))}).catch(()=>{X(l("copyFail"),!1)}):X(l("copyFail"),!1)},children:l(E==="copy"?"done":"copyImage")}),(0,e.jsx)("button",{type:"button",className:"mc-btn",onClick:()=>{se.url&&URL.revokeObjectURL(se.url),Re(null),ze(!1)},children:l("close")})]})]}),(0,e.jsx)("div",{className:"me-dialog-body",style:{display:"flex",justifyContent:"center",background:ee?"var(--dsw-alias-bg-base, #0b0d10)":"var(--dsw-alias-bg-base, #f3f4f6)"},children:(0,e.jsx)("img",{src:se.url,alt:l("exportGraph"),style:{maxWidth:"100%",maxHeight:ee?"calc(100% - 64px)":"70vh",borderRadius:ee?0:8,cursor:"zoom-in"},onClick:()=>ze(b=>!b)})})]})]})]})}function go(t){let a=new Date(t||0).getTime();if(!a)return"#94a3b8";let o=(Date.now()-a)/864e5;return o<3?"#10b981":o<14?"#f59e0b":o<30?"#f97316":"#94a3b8"}function Ya({label:t,value:a=[],options:o,onChange:d,placeholder:c,z:l=20}){let[v,x]=(0,n.useState)(!1),k=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!v)return;let O=F=>{k.current&&!k.current.contains(F.target)&&x(!1)};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[v]);let I=Array.isArray(a)?a:[],D=I.includes("__all__"),M=D?o.find(O=>O.value==="__all__")?.label||"":I.length?I.map(O=>o.find(F=>F.value===O)?.label||O).join("\u3001"):"",y=(O,F)=>{if(O.value==="__all__"){d(F?["__all__"]:[]);return}let P=new Set(I);P.has("__all__")&&P.delete("__all__"),F?P.add(O.value):P.delete(O.value),d([...P])},z=o.find(O=>O.value==="__all__"),H=o.filter(O=>O.value!=="__all__");return(0,e.jsxs)("label",{className:"mc-field",children:[(0,e.jsx)("span",{className:"mc-field-label",children:t}),(0,e.jsxs)("div",{ref:k,style:{position:"relative",minWidth:0},children:[(0,e.jsxs)("button",{type:"button",onClick:()=>x(O=>!O),style:{width:"100%",textAlign:"left",padding:"6px 8px",borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",fontSize:12,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",gap:6},children:[(0,e.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:M||c||"\u2014"}),(0,e.jsx)("span",{style:{fontSize:10,opacity:.7},children:"\u25BE"})]}),v&&(0,e.jsxs)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:l,marginTop:2,borderRadius:8,border:"1px solid var(--dsw-alias-border-l2, #d1d5db)",background:"var(--dsw-alias-bg-layer-1, #fff)",color:"inherit",boxShadow:"0 6px 20px rgba(0,0,0,0.14)",maxHeight:180,overflow:"auto"},children:[z&&(0,e.jsxs)("label",{onClick:O=>O.stopPropagation(),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px",cursor:"pointer",borderBottom:"1px solid rgba(127,127,127,0.12)"},children:[(0,e.jsx)("input",{type:"checkbox",checked:D,onChange:O=>y(z,O.target.checked)}),(0,e.jsx)("span",{children:z.label})]}),H.map(O=>(0,e.jsxs)("label",{onClick:F=>F.stopPropagation(),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px",cursor:"pointer"},children:[(0,e.jsx)("input",{type:"checkbox",checked:I.includes(O.value),onChange:F=>y(O,F.target.checked)}),(0,e.jsx)("span",{children:O.label})]},O.value))]})]})]})}function fo(t){let a=new Date(t||0).getTime();return!!a&&(Date.now()-a)/864e5<3}async function bo(t,a,o){if(o&&typeof window.showSaveFilePicker=="function")try{let l=await window.showSaveFilePicker({suggestedName:a}),v=await l.createWritable();return await v.write(t),await v.close(),{ok:!0,picked:!0,name:l.name}}catch(l){return l&&l.name==="AbortError"?{ok:!1,aborted:!0}:{ok:!1,err:String(l.message||l)}}let d=URL.createObjectURL(t),c=document.createElement("a");return c.href=d,c.download=a,document.body.appendChild(c),c.click(),document.body.removeChild(c),setTimeout(()=>URL.revokeObjectURL(d),1e3),{ok:!0,picked:!1,name:a}}function ba(t,a){if(!a||!t)return t;let o=t.toLowerCase(),d=a.toLowerCase(),c=[],l=0;for(;l<t.length;){let v=o.indexOf(d,l);if(v<0){c.push(t.slice(l));break}v>l&&c.push(t.slice(l,v)),c.push((0,e.jsx)("mark",{className:"mc-hl",children:t.slice(v,v+d.length)},v)),l=v+d.length}return c}function kt(t){let a=Ut(t);if(!a)return"";let o=a.toDateString()===new Date().toDateString(),d=Fa(a);return o?d:`${a.getMonth()+1}-${a.getDate()} ${d}`}
835
951
 
836
952
  return module.exports;
837
953
  },