PageSourceSearch

https://www.fatkun.net/_next/static/chunks/84443-9b1e39bd74a10dd9.js

js fatkun.net collected 2026-10-02 00:24:09 UTC 39,632 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[84443],{24043:(e,t,s)=>{s.d(t,{$n:()=>a.$n});var a=s(59285)},39882:(e,t,s)=>{s.d(t,{pd:()=>a.pd});var a=s(59285)},84443:(e,t,s)=>{s.d(t,{F:()=>z});var a=s(23732),r=s(92824),l=s(59285),n=s(24043),o=s(39882),d=s(88e3),i=s(2040),c=s(40823),x=s(31031),u=s(27568),m=s(87556),h=s(24266),g=s(19973),f=s(56508),p=s(8296),b=s(37861),j=s(72340),v=s(22354),N=s(51453),w=s(62813),y=s(96183),k=s(6422),C=s(52930),S=s(52885),A=s(39323),W=s(86697),L=s(75506);function z(e){var t,s,z;let{isOpen:E,onClose:$,pendingImages:I=[],targetLanguages:T=[],field:D,initialTab:M="list",onSuccess:P=()=>{}}=e,U=(0,A.c)("glossary"),B=(0,W.Ym)(),[R,q]=(0,r.useState)(M),[F,G]=(0,r.useState)([]),[V,K]=(0,r.useState)(!1),[O,_]=(0,r.useState)(""),[J,H]=(0,r.useState)(1),[Q,X]=(0,r.useState)(new Set),[Y,Z]=(0,r.useState)(!1),[ee,et]=(0,r.useState)(null),[es,ea]=(0,r.useState)({sourceWord:"",targetWord:"",sourceLanguage:"",targetLanguage:""}),[er,el]=(0,r.useState)(!1),[en,eo]=(0,r.useState)("all"),[ed,ei]=(0,r.useState)(null),[ec,ex]=(0,r.useState)("single"),[eu,em]=(0,r.useState)(""),[eh,eg]=(0,r.useState)(""),[ef,ep]=(0,r.useState)("auto"),[eb,ej]=(0,r.useState)("en"),[ev,eN]=(0,r.useState)(!1),[ew,ey]=(0,r.useState)(null),[ek,eC]=(0,r.useState)(""),[eS,eA]=(0,r.useState)(!1),eW=(0,r.useRef)(null),[eL,ez]=(0,r.useState)(!1),[eE,e$]=(0,r.useState)(null),[eI,eT]=(0,r.useState)(new Set),eD=(0,r.useRef)(null),[eM,eP]=(0,r.useState)([]),[eU,eB]=(0,r.useState)(!1),[eR,eq]=(0,r.useState)([]),[eF,eG]=(0,r.useState)(new Set),[eV,eK]=(0,r.useState)(new Set),[eO,e_]=(0,r.useState)(null),eJ=(0,r.useRef)(null),eH=(0,r.useMemo)(()=>{let e=new Set;return F.forEach(t=>{t.targetLanguage&&e.add(t.targetLanguage)}),Array.from(e).sort()},[F]),eQ=(0,r.useCallback)(async()=>{K(!0);try{let e=await d.i.userGlossary.getAll.query();G(e||[])}catch(e){console.error("Failed to fetch terms",e)}finally{K(!1)}},[]),eX=(0,r.useRef)(!1),eY=T.join(",");(0,r.useEffect)(()=>{if(E&&!eX.current){q(M);let e=eY.split(",").find(e=>e.trim());e&&ej(e)}eX.current=E},[E,M,eY]),(0,r.useEffect)(()=>{E&&eQ()},[E,eQ]),(0,r.useEffect)(()=>{"manual"===R&&"single"===ec&&setTimeout(()=>{var e;null==(e=eJ.current)||e.focus()},150)},[R,ec]);let eZ=(0,r.useMemo)(()=>{let e=F;if("all"!==en&&(e=e.filter(e=>e.targetLanguage===en)),O.trim()){let t=O.toLowerCase();e=e.filter(e=>e.sourceWord.toLowerCase().includes(t)||e.targetWord.toLowerCase().includes(t))}return e},[F,O,en]),e0=Math.max(1,Math.ceil(eZ.length/12)),e1=(0,r.useMemo)(()=>{let e=(J-1)*12;return eZ.slice(e,e+12)},[eZ,J]);(0,r.useEffect)(()=>{J>e0&&H(e0)},[e0,J]);let e5=(0,r.useMemo)(()=>{if(!ek.trim())return[];let e=ek.split("\n"),t=[];for(let d of e){var s,a,r,l,n,o;let e=d.trim();if(!e)continue;let i="",c="";if(e.includes("	")){let t=e.split("	");i=(null==(s=t[0])?void 0:s.trim())||"",c=(null==(a=t[1])?void 0:a.trim())||""}else if(e.includes("=")){let t=e.split("=");i=(null==(r=t[0])?void 0:r.trim())||"",c=t.slice(1).join("=").trim()}else if(e.includes(":")||e.includes(":")){let t=e.includes(":")?":":":",s=e.split(t);i=(null==(l=s[0])?void 0:l.trim())||"",c=s.slice(1).join(t).trim()}else if(e.includes("->")||e.includes("➔")||e.includes("→")){let t=e.split(/->|➔|→/);i=(null==(n=t[0])?void 0:n.trim())||"",c=(null==(o=t[1])?void 0:o.trim())||""}i&&c&&t.push({sourceWord:i,targetWord:c,targetLanguage:eb})}return t},[ek,eb]),e2=async e=>{let t=[],s=[],a=[];for(let r of e){let e=F.find(e=>e.sourceWord.toLowerCase()===r.sourceWord.toLowerCase()&&(e.targetLanguage===r.targetLanguage||!e.targetLanguage&&!r.targetLanguage));e?e.targetWord!==r.targetWord&&(s.push({sourceWord:r.sourceWord,targetLanguage:r.targetLanguage||"auto",oldWord:e.targetWord,newWord:r.targetWord}),a.push(r)):t.push(r)}if(0===t.length&&0===s.length)return!0;if(s.length>0){eT(new Set(s.map((e,t)=>t)));let e=await new Promise(e=>{e$({conflicts:s,pendingData:t,resolve:e})});if(!1!==e)for(let s of Array.from(e))t.push(a[s])}return 0===t.length||(await d.i.userGlossary.addMany.mutate(t),await eQ(),!0)},e3=async()=>{var e;if(0!==Q.size&&confirm((null==(e=U.has)?void 0:e.call(U,"confirmBatchDelete"))?U("confirmBatchDelete",{count:Q.size}):"确认删除选中的 ".concat(Q.size," 个术语吗?"))){Z(!0);try{await d.i.userGlossary.deleteMany.mutate({ids:Array.from(Q)}),X(new Set),await eQ(),P()}catch(e){console.error("Batch delete failed",e),alert(e.message||"删除失败")}finally{Z(!1)}}},e4=async(e,t)=>
1{if(confirm("确认删除术语「".concat(t,"」吗?")))try{await d.i.userGlossary.deleteMany.mutate({ids:[e]}),await eQ(),P()}catch(e){alert(e.message||"删除失败")}},e8=async()=>{var e;let t=prompt(U("promptClearLanguage")||"请输入要清空的语言代码(例如 zh, en):");if(t&&confirm((null==(e=U.has)?void 0:e.call(U,"confirmClearLanguage"))?U("confirmClearLanguage",{lang:t}):"警告:这将清空所有目标语言为 [".concat(t,"] 的术语!确认继续吗?"))){Z(!0);try{await d.i.userGlossary.clearByLanguage.mutate({targetLanguage:t}),X(new Set),await eQ(),P()}catch(e){console.error("Clear language failed",e),alert(e.message||"清空失败")}finally{Z(!1)}}},e6=()=>{et(null),ea({sourceWord:"",targetWord:"",sourceLanguage:"",targetLanguage:""})},e7=async e=>{if(es.sourceWord.trim()&&es.targetWord.trim()){el(!0);try{await d.i.userGlossary.update.mutate({id:e,sourceWord:es.sourceWord.trim(),targetWord:es.targetWord.trim(),sourceLanguage:es.sourceLanguage,targetLanguage:es.targetLanguage}),await eQ(),et(null),P()}catch(e){console.error("Update failed",e),alert(e.message||"更新失败")}finally{el(!1)}}},e9=async e=>{var t,s;let a=null==(t=e.target.files)?void 0:t[0];if(a){ez(!0);try{let e=(await a.text()).split("\n").filter(e=>e.trim()),t=[];for(let a=1;a<e.length;a++){let r=e[a].split(",").map(e=>e.replace(/^"|"$/g,"").replace(/""/g,'"'));r.length>=2&&t.push({sourceWord:r[0],targetWord:r[1],targetLanguage:r[2]||(null!=(s=T[0])?s:"en")})}t.length>0&&await e2(t)&&P()}catch(e){console.error("Failed to import CSV",e),alert("导入 CSV 失败,请检查文件格式")}finally{ez(!1),eW.current&&(eW.current.value="")}}},te=async e=>{if(eu.trim()&&eh.trim()){eN(!0);try{if(await e2([{sourceWord:eu.trim(),targetWord:eh.trim(),sourceLanguage:ef,targetLanguage:eb}])){let s=eu.trim();if(em(""),eg(""),P(),ey("已成功收录「".concat(s,"」")),setTimeout(()=>ey(null),2500),e){var t;null==(t=eJ.current)||t.focus()}else q("list")}}catch(e){console.error("Manual save failed",e),alert(e.message||"保存失败")}finally{eN(!1)}}},tt=async()=>{if(0!==e5.length){eA(!0);try{await e2(e5)&&(eC(""),P(),q("list"))}catch(e){console.error("Batch save failed",e),alert(e.message||"批量导入失败")}finally{eA(!1)}}},ts=(e,t)=>{let s=new Set(eF);if((null==t?void 0:t.shiftKey)&&eO){let t=[...eR.map(e=>e.id),...I.map(e=>e.id)],a=t.indexOf(eO),r=t.indexOf(e);if(-1!==a&&-1!==r){let e=Math.min(a,r),l=Math.max(a,r);for(let a=e;a<=l&&(!(s.size>=100)||s.has(t[a]));a++)s.add(t[a])}}else if(s.has(e))s.delete(e);else{if(s.size>=100){var a;alert((null==(a=U.has)?void 0:a.call(U,"maxImagesReached"))?U("maxImagesReached"):"最多只能选择100张图片");return}s.add(e)}eG(s),e_(e)},ta=async()=>{if(0!==eF.size){eB(!0);try{let e=Array.from(eF),t=[];for(let s=0;s<e.length;s+=5){let a=e.slice(s,s+5).map(async e=>{let t="",s=eR.find(t=>t.id===e);if(s){let e=new FormData;e.append("file",s.file);let a=await fetch("/api/upload",{method:"POST",body:e,credentials:"include"}),r=await a.json();if(!a.ok||!r.success)throw Error(r.error||"Upload failed");t=r.url}else{let s=I.find(t=>t.id===e);if(!s)return[];if(!(t=s.ossUrl||""))if(s.previewUrl.startsWith("data:"))t=s.previewUrl;else if(s.file){let e=new FormData;e.append("file",s.file);let a=await fetch("/api/upload",{method:"POST",body:e,credentials:"include"}),r=await a.json();if(!a.ok||!r.success)throw Error(r.error||"Upload failed");t=r.url}else throw Error("图片还在上传中,请稍后再试")}return await d.i.userGlossary.extractTerms.mutate({imageUrl:t,targetLanguages:T.length>0?T:["zh"],field:D})}),r=await Promise.all(a);t.push(...r)}let s=t.flat(),a=new Map;for(let e of s){let t="".concat(e.sourceWord.toLowerCase(),"-").concat(e.targetLanguage);a.has(t)||a.set(t,e)}eP(Array.from(a.values()).map(e=>({...e,selected:!0})))}catch(t){var e;console.error("Extract failed",t),alert(((null==(e=U.has)?void 0:e.call(U,"extractFailed"))?U("extractFailed"):"提取失败")+": "+(t.message||"未知错误"))}finally{eB(!1)}}},tr=async()=>{let e=eM.filter(e=>e.selected);if(0!==e.length){eB(!0);try{await e2(e.map(e=>({sourceWord:e.sourceWord,targetWord:e.targetWord,targetLanguage:e.targetLanguage})))&&(eK(e=>new Set([...e,...eF])),eP([]),eG(new Set),P(),q("list"))}catch(e){console.error("Save extracted failed",e),alert(e.message||"保存失败,请稍后重试")}finally{eB(!1)}}};return(0,a.jsx)(l.cj,{open:E,onOpenChange:e=>{e||(eE&&(eE.resolve(!1),e$(null)),$())},children:(0,a.jsxs)(l.h,{className:"sm:max-w-[760px] w-full flex flex-col p-6 overflow-hidden bg-background/95 backdrop-blur-xl border-l border-border/80 shadow-2xl",children:[(0,a.jsx)(l.Fm,{className:"shrink-0 mb-4 space-y-1",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 text-primary",children:[(0,a.jsxs)("div",{className:"p-2 rounded-xl bg-primary/10 border border-primary/20",children:["list"===R&&(0,a.jsx)(i.A,{className:"w-5 h-5"}),"manual"===R&&(0,a.jsx)(c.A,{className:"w-5 h-5"}),"smart"===R&&(0,a.jsx)(x.A,{className:"w-5 h-5"})]}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)(l.qp,{className:"text-lg font-bold text-foreground",children:["list"===R&&(U("myGlossary")||"我的专属词典"),"manual"===R&&(U("addWord")||"添加专属术语"),"smart"===R&&(U("smartExtract")||"AI 智能识图提取术语")]}),(0,a.jsx)(l.Ex,{variant:"outline",className:"text-[10px] font-normal px-2 py-0.5 bg-emerald-50 text-emerald-700 border-emerald-200 dark:bg-emerald-950/40 dark:text-emerald-300",children:"全店商品通用"})]}),(0,a.jsxs)(l.Qs,{className:"text-xs text-muted-foreground mt-0.5",children:["list"===R&&"账号全局通用词库:自动适用于全部商品的 出海 Listing 策划、SKU 变体转译与图片翻译,无需每个商品重复填写。","manual"===R&&(U("manualInputDesc")||"设定特定词汇的固定翻译,支持单条快录与多行批量粘贴导入"),"smart"===R&&(U("smartExtractDesc")||"由 AI 自动扫描分析图片中的专业术语与专有名词,一键批量收录")]})]})]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between p-1 bg-muted/60 rounded-2xl border border-border/60 shrink-0 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1 w-full sm:w-auto",children:[(0,a.jsxs)("button",{type:"button",className:(0,l.cn)("flex items-center gap-1.5 px-3.5 py-1.5 rounded-xl text-xs font-semibold transition-all","list"===R?"bg-background text-foreground shadow-xs":"text-muted-foreground hover:text-foreground hover:bg-background/40"),onClick:()=>q("list"),children:[(0,a.jsx)(i.A,{className:"w-3.5 h-3.5 text-primary"}),(0,a.jsx)("span",{children:U("myGlossary")||"我的词库"}),(0,a.jsx)(l.Ex,{variant:"secondary",className:"px-1.5 py-0 text-[10px] h-4 bg-primary/10 text-primary font-mono ml-0.5",children:F.length})]}),(0,a.jsxs)("button",{type:"button",className:(0,l.cn)("flex items-center gap-1.5 px-3.5 py-1.5 rounded-xl text-xs font-semibold transition-all","manual"===R?"bg-background text-foreground shadow-xs":"text-muted-foreground hover:text-foreground hover:bg-background/40"),onClick:()=>q("manual"),children:[(0,a.jsx)(u.A,{className:"w-3.5 h-3.5"}),(0,a.jsx)("span",{children:U("manualInput")||"手动录入"})]}),(0,a.jsxs)("button",{type:"button",className:(0,l.cn)("flex items-center gap-1.5 px-3.5 py-1.5 rounded-xl text-xs font-semibold transition-all","smart"===R?"bg-background text-foreground shadow-xs":"text-muted-foreground hover:text-foreground hover:bg-background/40"),onClick:()=>q("smart"),children:[(0,a.jsx)(x.A,{className:"w-3.5 h-3.5 text-amber-500"}),(0,a.jsx)("span",{children:U("smartExtract")||"智能提取"})]})]}),"list"===R&&(0,a.jsxs)("div",{className:"hidden sm:flex items-center gap-1.5 pr-1",children:[(0,a.jsxs)(n.$n,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs text-muted-foreground hover:text-foreground rounded-lg",onClick:()=>
1{if(0===F.length)return;let e=new Blob(["Source Word,Target Word,Target Language\n"+F.map(e=>'"'.concat(e.sourceWord.replace(/"/g,'""'),'","').concat(e.targetWord.replace(/"/g,'""'),'","').concat(e.targetLanguage||"",'"')).join("\n")],{type:"text/csv;charset=utf-8;"}),t=URL.createObjectURL(e),s=document.createElement("a");s.href=t,s.setAttribute("download","glossary.csv"),document.body.appendChild(s),s.click(),document.body.removeChild(s)},disabled:0===F.length,children:[(0,a.jsx)(m.A,{className:"w-3.5 h-3.5 mr-1"}),U("export")||"导出 CSV"]}),(0,a.jsxs)(n.$n,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs text-muted-foreground hover:text-foreground rounded-lg",onClick:()=>{var e;null==(e=eW.current)||e.click()},disabled:eL,children:[eL?(0,a.jsx)(h.A,{className:"w-3.5 h-3.5 animate-spin mr-1"}):(0,a.jsx)(g.A,{className:"w-3.5 h-3.5 mr-1"}),U("import")||"导入 CSV"]})]})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-hidden flex flex-col min-h-0",children:["list"===R&&(0,a.jsxs)("div",{className:"flex flex-col h-full space-y-3 min-h-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,a.jsxs)("div",{className:"relative flex-1",children:[(0,a.jsx)(f.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/70"}),(0,a.jsx)(o.pd,{className:"pl-9 pr-8 h-9 text-xs rounded-xl bg-card border-border/80",placeholder:(null==(t=U.has)?void 0:t.call(U,"searchPlaceholder"))?U("searchPlaceholder"):"搜索原词或目标翻译...",value:O,onChange:e=>{_(e.target.value),H(1)}}),O&&(0,a.jsx)("button",{type:"button",className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground p-0.5",onClick:()=>_(""),children:(0,a.jsx)(p.A,{className:"w-3.5 h-3.5"})})]}),eH.length>0&&(0,a.jsxs)(l.l6,{value:en,onValueChange:e=>{eo(e),H(1)},children:[(0,a.jsx)(l.bq,{className:"w-[130px] h-9 text-xs rounded-xl bg-card border-border/80 shrink-0",children:(0,a.jsx)(l.yv,{placeholder:(null==(s=U.has)?void 0:s.call(U,"filterByLanguage"))?U("filterByLanguage"):"语言筛选"})}),(0,a.jsxs)(l.gC,{children:[(0,a.jsx)(l.eb,{value:"all",children:(null==(z=U.has)?void 0:z.call(U,"allLanguages"))?U("allLanguages"):"全部语言"}),eH.map(e=>(0,a.jsx)(l.eb,{value:e,children:(0,L.rJI)(e,B)},e))]})]}),(0,a.jsxs)(n.$n,{size:"sm",className:"h-9 px-3 rounded-xl gap-1 text-xs shrink-0",onClick:()=>q("manual"),children:[(0,a.jsx)(u.A,{className:"w-3.5 h-3.5"}),(0,a.jsx)("span",{children:U("addWord")||"添加"})]}),(0,a.jsx)("input",{type:"file",accept:".csv",className:"hidden",ref:eW,onChange:e9})]}),Q.size>0&&(0,a.jsxs)("div",{className:"flex items-center justify-between bg-primary/10 border border-primary/20 px-3 py-2 rounded-xl shrink-0 text-xs",children:[(0,a.jsxs)("span",{className:"text-foreground font-medium flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-primary animate-pulse"}),U("selectedItems",{count:Q.size})||"已选中 ".concat(Q.size," 项"),Q.size>e1.length&&(0,a.jsx)("span",{className:"text-muted-foreground font-normal",children:U("crossPageSelected")||"(包含跨页)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsxs)(n.$n,{variant:"ghost",size:"sm",className:"h-7 text-xs text-destructive hover:bg-destructive/15 rounded-lg px-2",onClick:e3,disabled:Y,children:[(0,a.jsx)(b.A,{className:"w-3.5 h-3.5 mr-1"}),U("deleteSelected")||"删除选中"]}),(0,a.jsx)(n.$n,{variant:"ghost",size:"sm",className:"h-7 text-xs text-muted-foreground hover:text-foreground rounded-lg px-2",onClick:e8,disabled:Y,children:U("clearByLanguageBtn")||"按语言清空"})]})]}),V?(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center items-center gap-2",children:[(0,a.jsx)(h.A,{className:"w-7 h-7 animate-spin text-primary"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:U("loadingTerms")||"加载术语库中..."})]}):0===F.length?(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center items-center text-center p-8 bg-card/50 rounded-2xl border border-dashed border-border",children:[(0,a.jsx)("div",{className:"w-14 h-14 roun
1ded-2xl bg-primary/10 text-primary flex items-center justify-center mb-3.5 shadow-xs",children:(0,a.jsx)(i.A,{className:"w-7 h-7"})}),(0,a.jsx)("h3",{className:"text-sm font-bold mb-1 text-foreground",children:U("glossaryEmptyTitle")||"专属术语库暂无词汇"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground mb-5 max-w-sm leading-relaxed",children:U("glossaryEmptyDesc")||"录入品牌专有名词或特定翻译后,AI 在每次翻译时都将强制遵守您的统一译法规范。"}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)(n.$n,{size:"sm",className:"rounded-xl text-xs h-8.5",onClick:()=>q("manual"),children:[(0,a.jsx)(u.A,{className:"w-3.5 h-3.5 mr-1.5"}),U("manualInput")||"手动快速录入"]}),(0,a.jsxs)(n.$n,{size:"sm",variant:"outline",className:"rounded-xl text-xs h-8.5",onClick:()=>q("smart"),children:[(0,a.jsx)(x.A,{className:"w-3.5 h-3.5 mr-1.5 text-amber-500"}),U("smartExtract")||"AI 智能提取"]})]})]}):0===e1.length?(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center items-center text-xs text-muted-foreground p-8",children:[(0,a.jsx)(f.A,{className:"w-8 h-8 text-muted-foreground/40 mb-2"}),U("noMatchingTerms")||"未找到符合条件的术语"]}):(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto space-y-1.5 pr-1 min-h-0",children:[(0,a.jsxs)("div",{className:"flex items-center px-3 py-1.5 text-[11px] font-bold text-muted-foreground uppercase tracking-wider bg-muted/40 rounded-xl",children:[(0,a.jsx)("div",{className:"w-6 flex items-center justify-center",children:(0,a.jsx)(l.Sc,{checked:eZ.length>0&&Q.size===eZ.length,onCheckedChange:e=>{e?X(new Set(eZ.map(e=>e.id))):X(new Set)}})}),(0,a.jsx)("span",{className:"flex-1 pl-2",children:U("sourceWord")||"原词"}),(0,a.jsx)("span",{className:"w-6 text-center text-muted-foreground/40 shrink-0",children:"➔"}),(0,a.jsx)("span",{className:"flex-1 pl-2",children:U("targetWord")||"固定翻译"}),(0,a.jsx)("span",{className:"w-24 text-right pr-2",children:U("action")||"操作"})]}),e1.map(e=>(0,a.jsxs)("div",{className:(0,l.cn)("flex items-center gap-2 p-2.5 rounded-xl border text-xs transition-all group",Q.has(e.id)?"bg-primary/5 border-primary/40 shadow-xs":"bg-card border-border/70 hover:border-border hover:shadow-xs"),children:[(0,a.jsx)("div",{className:"w-6 flex items-center justify-center shrink-0",children:(0,a.jsx)(l.Sc,{checked:Q.has(e.id),onCheckedChange:t=>((e,t)=>{let s=new Set(Q);t?s.add(e):s.delete(e),X(s)})(e.id,!!t)})}),ee===e.id?(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 min-w-0",children:[(0,a.jsx)(o.pd,{className:"h-8 text-xs flex-1 rounded-lg",value:es.sourceWord,onChange:e=>ea(t=>({...t,sourceWord:e.target.value})),placeholder:U("sourceWord")||"原词",autoFocus:!0}),(0,a.jsx)("span",{className:"text-muted-foreground shrink-0",children:"→"}),(0,a.jsx)(o.pd,{className:"h-8 text-xs flex-1 rounded-lg",value:es.targetWord,onChange:e=>ea(t=>({...t,targetWord:e.target.value})),placeholder:U("targetWord")||"目标翻译"}),(0,a.jsxs)(l.l6,{value:es.targetLanguage,onValueChange:e=>ea(t=>({...t,targetLanguage:e})),children:[(0,a.jsx)(l.bq,{className:"h-8 text-xs w-[90px] shrink-0 rounded-lg",children:(0,a.jsx)(l.yv,{})}),(0,a.jsx)(l.gC,{children:L.kT3.map(e=>(0,a.jsx)(l.eb,{value:e.code,children:(0,L.rJI)(e.code,B)},e.code))})]}),(0,a.jsx)(n.$n,{size:"icon",variant:"ghost",className:"h-8 w-8 text-green-600 hover:bg-green-500/10 shrink-0 rounded-lg",onClick:()=>e7(e.id),disabled:er,children:er?(0,a.jsx)(h.A,{className:"w-3.5 h-3.5 animate-spin"}):(0,a.jsx)(j.A,{className:"w-3.5 h-3.5"})}),(0,a.jsx)(n.$n,{size:"icon",variant:"ghost",className:"h-8 w-8 text-muted-foreground hover:text-foreground shrink-0 rounded-lg",onClick:e6,disabled:er,children:(0,a.jsx)(p.A,{className:"w-3.5 h-3.5"})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-1.5 min-w-0 pl-2",children:[e.sourceLanguage&&"auto"!==e.sourceLanguage&&(0,a.jsx)(l.Ex,{variant:"outline",className:"px-1.5 py-0 text-[10px] uppercase font-mono text-muted-foreground shrink-0 rounded-md",children:e.sourceLanguage}),(0,a.jsx)("span",{className:"font-mono font-semibold text-foreground truncate min-w-0",title:e.sourceWord,children:e.sourceWord}),e.isAutoAdded&&(0,a.jsxs)("span",{className:"inline-flex items-center gap-0.5 text-[10px] text-amber-600 dar
1k:text-amber-400 bg-amber-500/10 px-1.5 py-0.2 rounded-md font-medium shrink-0",title:U("autoAddedTooltip")||"由 AI 自动提取收录",children:[(0,a.jsx)(x.A,{className:"w-2.5 h-2.5"}),"AI"]})]}),(0,a.jsx)("div",{className:"w-6 flex items-center justify-center text-muted-foreground/50 shrink-0",children:(0,a.jsx)(v.A,{className:"w-3.5 h-3.5"})}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-1.5 min-w-0 pl-2",children:[e.targetLanguage&&(0,a.jsx)(l.Ex,{variant:"secondary",className:"px-1.5 py-0 text-[10px] uppercase font-mono bg-primary/10 text-primary border border-primary/20 shrink-0 rounded-md",children:e.targetLanguage}),(0,a.jsx)("span",{className:"text-foreground font-medium truncate min-w-0",title:e.targetWord,children:e.targetWord})]}),(0,a.jsxs)("div",{className:"w-24 flex items-center justify-end gap-1 shrink-0 opacity-80 group-hover:opacity-100 transition-opacity",children:[(0,a.jsx)(n.$n,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground rounded-lg",title:U("copySuccess")||"复制词条",onClick:()=>{navigator.clipboard.writeText("".concat(e.sourceWord," = ").concat(e.targetWord)),ei(e.id),setTimeout(()=>ei(null),1500)},children:ed===e.id?(0,a.jsx)(N.A,{className:"w-3.5 h-3.5 text-green-600"}):(0,a.jsx)(w.A,{className:"w-3.5 h-3.5"})}),(0,a.jsx)(n.$n,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground rounded-lg",title:U("edit")||"编辑",onClick:()=>{et(e.id),ea({sourceWord:e.sourceWord,targetWord:e.targetWord,sourceLanguage:e.sourceLanguage||"auto",targetLanguage:e.targetLanguage||"en"})},children:(0,a.jsx)(y.A,{className:"w-3.5 h-3.5"})}),(0,a.jsx)(n.$n,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive rounded-lg",title:U("delete")||"删除",onClick:()=>e4(e.id,e.sourceWord),children:(0,a.jsx)(b.A,{className:"w-3.5 h-3.5"})})]})]})]},e.id))]}),e0>1&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/60 shrink-0",children:[(0,a.jsx)("div",{className:"text-xs text-muted-foreground font-mono",children:U("totalRecords",{count:eZ.length})||"共 ".concat(eZ.length," 条记录")}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(n.$n,{variant:"outline",size:"sm",className:"h-7 px-2.5 text-xs rounded-lg",onClick:()=>H(e=>Math.max(1,e-1)),disabled:1===J,children:U("prevPage")||"上一页"}),(0,a.jsxs)("span",{className:"text-xs px-2 text-muted-foreground font-mono",children:[J," / ",e0]}),(0,a.jsx)(n.$n,{variant:"outline",size:"sm",className:"h-7 px-2.5 text-xs rounded-lg",onClick:()=>H(e=>Math.min(e0,e+1)),disabled:J===e0,children:U("nextPage")||"下一页"})]})]})]}),"manual"===R&&(0,a.jsxs)("div",{className:"flex flex-col h-full space-y-4 min-h-0 overflow-y-auto pr-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"inline-flex p-1 bg-muted/70 rounded-xl border border-border/50",children:[(0,a.jsx)("button",{type:"button",className:(0,l.cn)("px-3 py-1 text-xs font-semibold rounded-lg transition-all","single"===ec?"bg-background text-foreground shadow-xs":"text-muted-foreground hover:text-foreground"),onClick:()=>ex("single"),children:U("singleInput")||"单条录入"}),(0,a.jsx)("button",{type:"button",className:(0,l.cn)("px-3 py-1 text-xs font-semibold rounded-lg transition-all","batch"===ec?"bg-background text-foreground shadow-xs":"text-muted-foreground hover:text-foreground"),onClick:()=>ex("batch"),children:U("batchInput")||"批量粘贴导入"})]}),ew&&(0,a.jsxs)("span",{className:"text-xs text-green-600 dark:text-green-400 font-medium flex items-center gap-1 animate-in fade-in slide-in-from-right-2",children:[(0,a.jsx)(j.A,{className:"w-3.5 h-3.5"}),ew]})]}),"single"===ec&&(0,a.jsxs)("div",{className:"space-y-4 bg-card p-4 sm:p-5 rounded-2xl border border-border/80 shadow-xs",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("div",{className:"flex-1 space-y-1.5",children:[(0,a.jsx)("label",{className:"text-xs font-bold text-muted-foreground",children:U("glossarySourceLang")||"源语言"}),(0,a.jsxs)(l.l6,{value:ef,onValueChange:ep,children:[(0,a.jsx)(l.bq,{className:"h-9 text-xs rounded-xl",children:(0,a.jsx)(l.yv,{})}),(0,a.jsx)(l.gC,{children:L.GKu.map(e=>(0,a.jsx)(l.eb,{value:e.code,children:"auto"===e.code?U("autoAny")||"自动 (不限)":(0,L.rJI)(e.code,B)},e.code))})]})]}),(0,a.jsx)("button",{type:"button",className:"mt-6 p-2 rounded-xl hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",title:"切换语言",onClick:()=>{"auto"!==ef&&(ep(eb),ej(ef))},children:(0,a.jsx)(k.A,{className:"w-4 h-4"})}),(0,a.jsxs)("div",{className:"flex-1 space-y-1.5",children:[(0,a.jsx)("label",{className:"text-xs font-bold text-muted-foreground",children:U("glossaryTargetLang")||"目标语言"}),(0,a.jsxs)(l.l6,{value:eb,onValueChange:ej,children:[(0,a.jsx)(l.bq,{className:"h-9 text-xs rounded-xl",children:(0,a.jsx)(l.yv,{})}),(0,a.jsx)(l.gC,{children:L.kT3.map(e=>(0,a.jsx)(l.eb,{value:e.code,children:(0,L.rJI)(e.code,B)},e.code))})]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3.5 pt-1",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("label",{className:"text-xs font-bold text-foreground flex items-center justify-between",children:[(0,a.jsx)("span",{children:U("sourceWord")||"原词 / 专有名词"}),(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground font-normal",children:"例: Cotton Blend"})]}),(0,a.jsx)(o.pd,{ref:eJ,className:"h-10 text-sm font-mono rounded-xl bg-background",value:eu,onChange:e=>em(e.target.value),placeholder:U("inputPlaceholderSource")||"输入需固定的原词...",onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),te(!0))}})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("label",{className:"text-xs font-bold text-foreground flex items-center justify-between",children:[(0,a.jsx)("span",{children:U("targetWord")||"固定翻译 / 统一译名"}),(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground font-normal",children:"例: 棉混纺"})]}),(0,a.jsx)(o.pd,{className:"h-10 text-sm font-medium rounded-xl bg-background text-primary",value:eh,onChange:e=>eg(e.target.value),placeholder:U("inputPlaceholderTarget")||"输入指定目标翻译...",onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),te(!0))}})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row items-center gap-2.5 pt-3",children:[(0,a.jsxs)(n.$n,{type:"button",className:"w-full sm:flex-1 h-10 rounded-xl text-xs font-semibold",disabled:!eu.trim()||!eh.trim()||ev,onClick:()=>te(!0),children:[ev?(0,a.jsx)(h.A,{className:"w-4 h-4 animate-spin mr-1.5"}):(0,a.jsx)(u.A,{className:"w-4 h-4 mr-1.5"}),U("saveAndAddAnother")||"保存并继续添加 (Enter)"]}),(0,a.jsx)(n.$n,{type:"button",variant:"outline",className:"w-full sm:w-auto h-10 px-4 roun
1ded-xl text-xs font-medium",disabled:!eu.trim()||!eh.trim()||ev,onClick:()=>te(!1),children:U("saveAndReturn")||"保存并返回列表"})]}),(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground/70 text-center pt-1",children:["\uD83D\uDCA1 ",U("enterShortcutTip")||"提示:输入完成后直接按 Enter 键即可秒级保存并录入下一条"]})]}),"batch"===ec&&(0,a.jsxs)("div",{className:"space-y-4 bg-card p-4 sm:p-5 rounded-2xl border border-border/80 shadow-xs",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("label",{className:"text-xs font-bold text-foreground",children:U("batchPasteTitle")||"多行文本粘贴(从 Excel / 笔记复制)"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:U("targetLangLabel")||"目标语种:"}),(0,a.jsxs)(l.l6,{value:eb,onValueChange:ej,children:[(0,a.jsx)(l.bq,{className:"h-7 text-xs w-[100px] rounded-lg",children:(0,a.jsx)(l.yv,{})}),(0,a.jsx)(l.gC,{children:L.kT3.map(e=>(0,a.jsx)(l.eb,{value:e.code,children:(0,L.rJI)(e.code,B)},e.code))})]})]})]}),(0,a.jsx)("textarea",{className:"w-full h-44 p-3 text-xs font-mono rounded-xl bg-background border border-input focus:outline-hidden focus:ring-2 focus:ring-ring resize-none leading-relaxed",placeholder:U("batchInputPlaceholder")||"支持格式(一行一条):\nCotton Blend = 棉混纺\nWaterproof : 防水\nBrandName [Tab] 品牌译名\nUltra-light -> 超轻便",value:ek,onChange:e=>eC(e.target.value)}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-1",children:[(0,a.jsx)("div",{className:"text-xs font-mono text-muted-foreground",children:e5.length>0?(0,a.jsxs)("span",{className:"text-green-600 dark:text-green-400 font-semibold",children:["✓ ",U("batchParsedCount",{count:e5.length})||"已识别 ".concat(e5.length," 条有效术语")]}):(0,a.jsx)("span",{children:U("batchSupportDelimiters")||"支持使用 =、:、-> 或 Tab 分隔"})}),(0,a.jsxs)(n.$n,{type:"button",className:"h-9 px-4 rounded-xl text-xs font-semibold",disabled:0===e5.length||eS,onClick:tt,children:[eS?(0,a.jsx)(h.A,{className:"w-4 h-4 animate-spin mr-1.5"}):(0,a.jsx)(C.A,{className:"w-4 h-4 mr-1.5"}),U("batchImportBtn",{count:e5.length})||"一键导入识别的 ".concat(e5.length," 条")]})]})]})]}),"smart"===R&&(0,a.jsx)("div",{className:"flex flex-col h-full space-y-3 min-h-0",children:0===eM.length?(0,a.jsxs)("div",{className:"flex flex-col h-full min-h-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between pb-2 shrink-0",children:[(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:U("smartExtractHint")||"选择工作区图片或上传新图,AI 将智能分析提取专有名词与高频术语。"}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,a.jsx)(n.$n,{variant:"outline",size:"sm",className:"h-7 px-2 text-xs rounded-lg",onClick:()=>{let e=[...eR.map(e=>e.id),...I.map(e=>e.id)],t=new Set(eF);for(let s of e){if(t.size>=100&&!t.has(s))break;t.add(s)}eG(t),e_(null)},children:U("selectAll")||"全选"}),(0,a.jsx)(n.$n,{variant:"outline",size:"sm",className:"h-7 px-2 text-xs rounded-lg",onClick:()=>{eG(new Set),e_(null)},children:U("clearSelection")||"清空"}),(0,a.jsx)("span",{className:"text-xs font-mono text-muted-foreground pl-1",children:U("selectedCount",{count:eF.size,total:eR.length+I.length})||"已选 ".concat(eF.size," / ").concat(eR.length+I.length)})]})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto grid grid-cols-3 sm:grid-cols-4 gap-3 content-start p-1 min-h-0",children:[(0,a.jsxs)("div",{className:"relative aspect-square rounded-2xl overflow-hidden border-2 border-dashed flex flex-col items-center justify-center cursor-pointer transition-all border-border/80 hover:border-primary/60 hover:bg-primary/5 bg-card/60",onClick:()=>{var e;return null==(e=eD.current)?void 0:e.click()},children:[(0,a.jsx)("input",{type:"file",accept:"image/*",multiple:!0,className:"hidden",ref:eD,onChange:e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let s=t.map(e=>({id:"local_upload_".concat(Date.now(),"_").concat(Math.random().toString(36).substring(7)),file:e,previewUrl:URL.createObjectURL(e)}));eq(e=>[...e,...s]);let a=new Set(eF);for(let e of s)a.size<100&&a.add(e.id);eG(a),eD.current&&(eD.current.value="")}}),(0,a.jsx)(S.A,{className:"w-7 h-7 text-muted-foreground mb-1.5"}),(0,a.jsx)("span",{className:"text-xs font-semibold text-foreground",children:U("uploadNewImages")||"上传新图"}),(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground",children:U("orPasteImage")||"或粘贴图片"})]}),eR.map(e=>(0,a.jsxs)("div",{className:(0,l.cn)("group relative aspect-square rounded-2xl overflow-hidden border-2 cursor-pointer transition-all bg-muted",eF.has(e.id)?"border-primary ring-2 ring-primary/30 shadow-md":"border-transparent hover:border-primary/50"),onClick:t=>ts(e.id,t),children:[(0,a.jsx)("img",{src:e.previewUrl,className:"w-full h-full object-cover",alt:"preview"}),eF.has(e.id)&&(0,a.jsx)("div",{className:"absolute top-1.5 right-1.5 bg-primary text-primary-foreground rounded-full p-1 shadow-md",children:(0,a.jsx)(j.A,{className:"w-3.5 h-3.5"})}),eV.has(e.id)&&!eF.has(e.id)&&(0,a.jsxs)("div",{className:"absolute top-1.5 left-1.5 bg-green-500/90 text-white rounded-md py-0.5 px-1.5 shadow-xs text-[10px] flex items-center font-medium",children:[(0,a.jsx)(j.A,{className:"w-2.5 h-2.5 mr-0.5"})," ",U("extractedStatus")||"已提取"]}),(0,a.jsx)("button",{type:"button",className:"absolute bottom-1.5 right-1.5 bg-black/60 hover:bg-black/90 text-white p-1 rounded-lg transition-colors opacity-0 group-hover:opacity-100",onClick:t=>{if(t.stopPropagation(),eq(t=>t.filter(t=>t.id!==e.id)),eF.has(e.id)){let t=new Set(eF);t.delete(e.id),eG(t)}},children:(0,a.jsx)(p.A,{className:"w-3.5 h-3.5"})})]},e.id)),I.map(e=>(0,a.jsxs)("div",{className:(0,l.cn)("relative aspect-square rounded-2xl overflow-hidden border-2 cursor-pointer transition-all bg-muted",eF.has(e.id)?"border-primary ring-2 ring-primary/30 shadow-md":"border-transparent hover:border-primary/50"),onClick:t=>ts(e.id,t),children:[(0,a.jsx)("img",{src:e.previewUrl,className:"w-full h-full object-cover",alt:"preview"}),eF.has(e.id)&&(0,a.jsx)("div",{className:"absolute top-1.5 right-1.5 bg-primary text-primary-foreground rounded-full p-1 shadow-md",children:(0,a.jsx)(j.A,{className:"w-3.5 h-3.5"})}),eV.has(e.id)&&!eF.has(e.id)&&(0,a.jsxs)("div",{className:"absolute top-1.5 left-1.5 bg-green-500/90 text-white rounded-md py-0.5 px-1.5 shadow-xs text-[10px] flex items-center font-medium",children:[(0,a.jsx)(j.A,{className:"w-2.5 h-2.5 mr-0.5"})," ",U("extractedStatus")||"已提取"]})]},e.id))]}),(0,a.jsx)("div",{className:"pt-3 mt-auto shrink-0 border-t border-border/60",children:(0,a.jsxs)(n.$n,{className:"w-full h-10 rounded-xl text-xs font-semibold shadow-xs",size:"lg",disabled:0===eF.size||eU,onClick:ta,children:[eU?(0,a.jsx)(h.A,{className:"w-4 h-4 animate-spin mr-2"}):(0,a.jsx)(x.A,{className:"w-4 h-4 mr-2 text-amber-300"}),U("startExtractBtn",{count:eF.size})||"开始 AI 智能识图提取 (".concat(eF.size," 张)")]})})]}):(0,a.jsxs)("div",{className:"flex flex-col h-full min-h-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between pb-2 shrink-0",children:[(0,a.jsxs)("p",{className:"text-xs font-bold text-foreground flex items-center gap-1.5",children:[(0,a.jsx)(x.A,{className:"w-3.5 h-3.5 text-primary"}),U("extractedTermsCount",{count:eM.length})||"已识别 ".concat(eM.length," 个术语,请勾选确认:")]}),(0,a.jsx)(n.$n,{variant:"ghost",size:"sm",className:"h-7 text-xs text-muted-foreground hover:text-foreground",onClick:()=>eP([]),children:U("reselectImage")||U("reselect")||"重新选图"})]}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 min-h-0",children:eM.map((e,t)=>(0,a.jsxs)("div",{className:(0,l.cn)("flex items-center gap-3 p-3 rounded-xl border transition-all",e.selected?"bg-card border-primary/40 shadow-xs":"bg-muted/30 border-transparent opacity-60"),children:[(0,a.jsx)(l.Sc,{checked:e.selected,onCheckedChange:e=>{let s=[...eM];s[t].selected=!!e,eP(s)}}),(0,a.jsxs)("div",{className:"flex-1 grid grid-cols-1 sm:grid-cols-2 gap-2 sm:gap-3 items-center",children:[(0,a.jsx)("div",{className:"font-mono text-xs font-semibold text-foreground break-words px-2 border-l-2 border-primary/40",children:e.sourceWord}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(l.Ex,{variant:"outline",className:"text-[10px] uppercase font-mono px-1.5 py-0 shrink-0",children:e.targetLanguage}),(0,a.jsx)(o.pd,{className:"h-8 text-xs font-medium text-primary bg-background rounded-lg",value:e.targetWord,onChange:e=>{let s=[...eM];s[t].targetWord=e.target.value,eP(s)}})]})]})]},t))}),(0,a.jsx)("div",{className:"pt-3 mt-auto shrink-0 border-t border-border/60 flex gap-3",children:(0,a.jsxs)(n.$n,{className:"flex-1 h-10 rounded-xl text-xs font-semibold",size:"lg",onClick:tr,disabled:eU||!eM.some(e=>e.selected),children:[eU?(0,a.jsx)(h.A,{className:"w-4 h-4 animate-spin mr-2"}):(0,a.jsx)(j.A,{className:"w-4 h-4 mr-2"}),U("saveSelectedCount",{count:eM.filter(e=>e.selected).length})||"保存勾选的 ".concat(eM.filter(e=>e.selected).length," 条术语至词库")]})})]})})]}),eE&&(0,a.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs p-4",onClick:()=>{eE.resolve(!1),e$(null)},children:(0,a.jsxs)("div",{className:"bg-card p-6 rounded-2xl shadow-2xl border border-border max-w-md w-full",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("h3",{className:"text-base font-bold text-foreground mb-1",children:U("conflictDetected")||"发现重复/冲突术语"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground mb-4",children:U("conflictDesc")||"以下术语已在词库中存在其他翻译,请选择是否覆盖更新:"}),(0,a.jsx)("div",{className:"max-h-60 overflow-y-auto space-y-2.5 mb-5 pr-1",children:eE.conflicts.map((e,t)=>(0,a.jsxs)("div",{className:(0,l.cn)("flex items-start gap-2.5 p-2.5 rounded-xl border text-xs transition-all",eI.has(t)?"bg-primary/5 border-primary/40":"bg-muted/30 border-transparent opacity-60"),children:[(0,a.jsx)(l.Sc,{checked:eI.has(t),onCheckedChange:e=>{let s=new Set(eI);e?s.add(t):s.delete(t),eT(s)},className:"mt-0.5"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"font-semibold text-foreground",children:[e.sourceWord," ",(0,a.jsxs)("span",{className:"text-[10px] text-muted-foreground font-mono uppercase",children:["(",e.targetLanguage,")"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 font-mono",children:[(0,a.jsx)("span",{className:"line-through text-destructive/80",children:e.oldWord}),(0,a.jsx)("span",{className:"text-muted-foreground",children:"➔"}),(0,a.jsx)("span",{className:"text-primary font-bold",children:e.newWord})]})]})]},t))}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2.5 pt-2 border-t border-border/60",children:[(0,a.jsx)(n.$n,{variant:"ghost",size:"sm",className:"rounded-xl text-xs h-8",onClick:()=>{eE.resolve(!1),e$(null)},children:U("skipConflicts")||"跳过冲突"}),(0,a.jsx)(n.$n,{size:"sm",className:"rounded-xl text-xs h-8 font-semibold",onClick:()=>{eE.resolve(eI),e$(null)},children:eI.size>
10?"".concat(U("overwriteUpdate")||"确认覆盖"," (").concat(eI.size,")"):U("saveNonConflicting")||"仅保存无冲突项"})]})]})})]})})}},88e3:(e,t,s)=>{s.d(t,{i:()=>l});var a=s(19197),r=s(13796);let l=(0,a.XT)({links:[(0,a.fu)({url:"/api/trpc",transformer:r.Ay})]})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.