@customize-agent/server 4.0.71 → 4.0.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +22 -22
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/chunks/5247.js +44 -44
  5. package/.next/server/chunks/8204.js +1 -1
  6. package/.next/server/middleware-build-manifest.js +1 -1
  7. package/.next/server/pages/404.html +1 -1
  8. package/.next/server/pages/500.html +1 -1
  9. package/.next/server/pages/api/assets/generated/preview.js +1 -1
  10. package/.next/server/pages/api/assets/generated/preview.js.nft.json +1 -1
  11. package/.next/server/pages/api/assets/generated.js +1 -1
  12. package/.next/server/pages/api/assets/generated.js.nft.json +1 -1
  13. package/.next/server/pages/api/documents/export.js +2 -2
  14. package/.next/server/pages/api/documents/export.js.nft.json +1 -1
  15. package/.next/server/pages/api/documents/generate.js +2 -2
  16. package/.next/server/pages/api/documents/generate.js.nft.json +1 -1
  17. package/.next/server/pages/api/documents/generated/[id].js +1 -1
  18. package/.next/server/pages/api/documents/generated/[id].js.nft.json +1 -1
  19. package/.next/server/pages/api/documents/generated.js +1 -1
  20. package/.next/server/pages/api/documents/generated.js.nft.json +1 -1
  21. package/.next/server/pages/api/kb/files.js +1 -1
  22. package/.next/server/pages/asset-library.html +1 -1
  23. package/.next/server/pages/context/long-term.html +1 -1
  24. package/.next/server/pages/context/short-term.html +1 -1
  25. package/.next/server/pages/document-roles.html +1 -1
  26. package/.next/server/pages/documents.html +1 -1
  27. package/.next/server/pages/guide.html +1 -1
  28. package/.next/server/pages/index.html +1 -1
  29. package/.next/server/pages/knowledge/file-detail.html +1 -1
  30. package/.next/server/pages/knowledge/files.html +1 -1
  31. package/.next/server/pages/knowledge/manage.html +1 -1
  32. package/.next/server/pages/knowledge/search.html +1 -1
  33. package/.next/server/pages/knowledge.html +1 -1
  34. package/.next/server/pages/models.html +1 -1
  35. package/.next/server/pages/overview.html +1 -1
  36. package/.next/server/pages/prompt.html +1 -1
  37. package/.next/server/pages/settings.html +1 -1
  38. package/.next/server/pages/system/logs.html +1 -1
  39. package/.next/server/pages-manifest.json +22 -22
  40. package/.next/static/{G2viAcdgjbPEipVUbf4jw → FRXU8sqe4rxv-3Oans9xU}/_buildManifest.js +1 -1
  41. package/.next/static/chunks/375-f731e5ec66ab942c.js +1 -0
  42. package/.next/static/chunks/496-ceb2d8197d6335cf.js +1 -0
  43. package/.next/static/chunks/63-47dff441816f712f.js +4 -0
  44. package/.next/static/chunks/642-b325b80d595ec100.js +8 -0
  45. package/.next/static/chunks/694-b6ab4967c35bbcee.js +1 -0
  46. package/.next/static/chunks/{317-18aac52df5551e76.js → 767-4f3b0ae7bff68fde.js} +1 -1
  47. package/.next/static/chunks/788-db05269178a28c20.js +1 -0
  48. package/.next/static/chunks/795-262a7ef599d655f4.js +1 -0
  49. package/.next/static/chunks/pages/{_app-dd841161c7d0b39e.js → _app-1eef3e5fadd36ac2.js} +1 -1
  50. package/.next/static/chunks/pages/asset-library-37f844cb358f5457.js +1 -0
  51. package/.next/static/chunks/pages/document-roles-00219c0a0871daec.js +1 -0
  52. package/.next/static/chunks/pages/documents-e82261d18dfafc62.js +1 -0
  53. package/.next/static/chunks/pages/guide-c45dc4e0a02247c9.js +1 -0
  54. package/package.json +2 -2
  55. package/scripts/verify-next-static.js +20 -1
  56. package/.next/server/chunks/8661.js +0 -1
  57. package/.next/static/chunks/375-4a1c73eb22d653d2.js +0 -1
  58. package/.next/static/chunks/496-4fb9a063790e65ff.js +0 -1
  59. package/.next/static/chunks/63-dd8eeb8edd766bae.js +0 -4
  60. package/.next/static/chunks/642-708b928fbafc6c20.js +0 -8
  61. package/.next/static/chunks/694-2d545cfbb9779f2c.js +0 -1
  62. package/.next/static/chunks/788-7f7359a830e3f4fd.js +0 -1
  63. package/.next/static/chunks/795-d8fb7a0420512701.js +0 -1
  64. package/.next/static/chunks/pages/asset-library-91bd2baa09727e0a.js +0 -1
  65. package/.next/static/chunks/pages/document-roles-fd02980db151650c.js +0 -1
  66. package/.next/static/chunks/pages/documents-9209f54ac7717b41.js +0 -1
  67. package/.next/static/chunks/pages/guide-61bea94f27710467.js +0 -1
  68. /package/.next/static/{G2viAcdgjbPEipVUbf4jw → FRXU8sqe4rxv-3Oans9xU}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[694],{520:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(18200),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},2256:(e,t,a)=>{a.d(t,{A:()=>r});let r=a(25341).A},5450:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 00-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 000 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3 2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4-186.8-186.8 59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7 35.3 0 68.4 13.7 93.4 38.7 24.9 24.9 38.7 58.1 38.7 93.4 0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 00-11.3 0L501 613.3 410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 00-11.3 0L363 475.3l-43-43a7.85 7.85 0 00-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 000 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3 51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43 66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 01-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 01-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4 186.8 186.8-59.4 59.4z"}}]},name:"api",theme:"outlined"}},8579:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(95008),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},12887:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"}},13114:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(5450),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},14995:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"}},18200:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M704 446H320c-4.4 0-8 3.6-8 8v402c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8V454c0-4.4-3.6-8-8-8zm-328 64h272v117H376V510zm272 290H376V683h272v117z"}},{tag:"path",attrs:{d:"M424 748a32 32 0 1064 0 32 32 0 10-64 0zm0-178a32 32 0 1064 0 32 32 0 10-64 0z"}},{tag:"path",attrs:{d:"M811.4 368.9C765.6 248 648.9 162 512.2 162S258.8 247.9 213 368.8C126.9 391.5 63.5 470.2 64 563.6 64.6 668 145.6 752.9 247.6 762c4.7.4 8.7-3.3 8.7-8v-60.4c0-4-3-7.4-7-7.9-27-3.4-52.5-15.2-72.1-34.5-24-23.5-37.2-55.1-37.2-88.6 0-28 9.1-54.4 26.2-76.4 16.7-21.4 40.2-36.9 66.1-43.7l37.9-10 13.9-36.7c8.6-22.8 20.6-44.2 35.7-63.5 14.9-19.2 32.6-36 52.4-50 41.1-28.9 89.5-44.2 140-44.2s98.9 15.3 140 44.3c19.9 14 37.5 30.8 52.4 50 15.1 19.3 27.1 40.7 35.7 63.5l13.8 36.6 37.8 10c54.2 14.4 92.1 63.7 92.1 120 0 33.6-13.2 65.1-37.2 88.6-19.5 19.2-44.9 31.1-71.9 34.5-4 .5-6.9 3.9-6.9 7.9V754c0 4.7 4.1 8.4 8.8 8 101.7-9.2 182.5-94 183.2-198.2.6-93.4-62.7-172.1-148.6-194.9z"}}]},name:"cloud-server",theme:"outlined"}},24810:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(31738),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},26631:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(12887),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},29071:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(78847),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},31738:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"}},32632:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(68552),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},38770:(e,t,a)=>{a.d(t,{A:()=>r});let r=a(51916).A},53234:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM496 208H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 544h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm328 244a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"hdd",theme:"outlined"}},54849:(e,t,a)=>{a.d(t,{A:()=>y});var r=a(97109),n=a(42644),c=a(52690),l=a(3638),o=a(92162),s=a(26047),i=a(74567),f=a(88762);let v=e=>{let t,{value:a,formatter:n,precision:c,decimalSeparator:l,groupSeparator:o="",prefixCls:i,className:f,style:v}=e;if((0,s.Tn)(n))t=n(a);else{let e=String(a),n=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(n&&"-"!==e){let e=n[1],a=n[2]||"0",f=n[4]||"";a=a.replace(/\B(?=(\d{3})+(?!\d))/g,o),(0,s.Et)(c)&&(f=f.padEnd(c,"0").slice(0,c>0?c:0)),f&&(f=`${l}${f}`),t=[r.createElement("span",{key:"int",className:`${i}-content-value-int`},e,a),f&&r.createElement("span",{key:"decimal",className:`${i}-content-value-decimal`},f)]}else t=e}return r.createElement("span",{className:f,style:v},t)};var d=a(7961),u=a(10540),h=a(28403);let p=(0,u.OF)("Statistic",e=>(e=>{let{componentCls:t,marginXXS:a,padding:r,colorTextDescription:n,titleFontSize:c,colorTextHeading:l,contentFontSize:o,fontFamily:s}=e;return{[t]:{...(0,d.dF)(e),[`${t}-header`]:{paddingBottom:a,[`${t}-title`]:{color:n,fontSize:c}},[`${t}-skeleton`]:{paddingTop:r},[`${t}-content`]:{color:l,fontSize:o,fontFamily:s,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:a},[`${t}-content-suffix`]:{marginInlineStart:a}}}}})((0,h.oX)(e,{})),e=>{let{fontSizeHeading3:t,fontSize:a}=e;return{titleFontSize:a,contentFontSize:t}}),m=r.forwardRef((e,t)=>{let{prefixCls:a,className:c,rootClassName:d,style:u,valueStyle:h,value:m=0,title:g,valueRender:b,prefix:A,suffix:w,loading:y=!1,formatter:z,precision:O,decimalSeparator:E=".",groupSeparator:M=",",onMouseEnter:H,onMouseLeave:j,styles:$,classNames:x,...V}=e,{getPrefixCls:L,direction:N,className:S,style:R,classNames:B,styles:P}=(0,i.TP)("statistic"),k=L("statistic",a),[T,C]=p(k),I={...e,decimalSeparator:E,groupSeparator:M,loading:y,value:m},D=(0,o.XT)(R),_=(0,o.XT)(u),[F,X]=(0,o.AV)([B,x],[P,D,$,_],{props:I}),q=(0,l.$)(k,{[`${k}-rtl`]:"rtl"===N},S,c,d,F.root,T,C),K=(0,l.$)(`${k}-header`,F.header),Y=(0,l.$)(`${k}-title`,F.title),G=(0,l.$)(`${k}-content`,F.content),J=(0,l.$)(`${k}-content-value`,F.value),Q=(0,l.$)(`${k}-content-prefix`,F.prefix),U=(0,l.$)(`${k}-content-suffix`,F.suffix),W=r.createElement(v,{decimalSeparator:E,groupSeparator:M,prefixCls:k,formatter:z,precision:O,value:m,className:J,style:X.value}),Z=r.useRef(null);r.useImperativeHandle(t,()=>({nativeElement:Z.current}));let ee=(0,n.KE)(V,{aria:!0,data:!0});return r.createElement("div",{...ee,className:q,style:X.root,ref:Z,onMouseEnter:H,onMouseLeave:j},g&&r.createElement("div",{className:K,style:X.header},r.createElement("div",{className:Y,style:X.title},g)),r.createElement(f.A,{paragraph:!1,loading:y,className:`${k}-skeleton`,active:!0},r.createElement("div",{className:G,style:{...h,...X.content}},A&&r.createElement("span",{className:Q,style:X.prefix},A),(0,s.Tn)(b)?b(W):W,w&&r.createElement("span",{className:U,style:X.suffix},w))))}),g=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]],b=1e3/60,A=e=>{let{value:t,format:a="HH:mm:ss",onChange:l,onFinish:o,type:s,...i}=e,f="countdown"===s,[v,d]=r.useState(null),u=(0,n._q)(()=>{let e=Date.now(),a=new Date(t).getTime();d({});let r=f?a-e:e-a;return l?.(r),!f||!(a<e)||(o?.(),!1)});return r.useEffect(()=>{let e;return e=window.setInterval(()=>{u()||window.clearInterval(e)},b),()=>{window.clearInterval(e)}},[t,f]),r.useEffect(()=>{d({})},[]),r.createElement(m,{...i,value:t,valueRender:e=>(0,c.Ob)(e,{title:void 0}),formatter:(e,t)=>v?function(e,t,a){let{format:r=""}=t,n=new Date(e).getTime(),c=Date.now();return function(e,t){let a=e,r=/\[[^\]]*]/g,n=(t.match(r)||[]).map(e=>e.slice(1,-1)),c=t.replace(r,"[]"),l=g.reduce((e,[t,r])=>{if(e.includes(t)){let n=Math.floor(a/r);return a-=n*r,e.replace(RegExp(`${t}+`,"g"),e=>{let t=e.length;return n.toString().padStart(t,"0")})}return e},c),o=0;return l.replace(r,()=>{let e=n[o];return o+=1,e})}(a?Math.max(n-c,0):Math.max(c-n,0),r)}(e,{...t,format:a},f):"-"})},w=r.memo(e=>r.createElement(A,{...e,type:"countdown"}));m.Timer=A,m.Countdown=w;let y=m},68552:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-696 72h136v656H184V184zm656 656H384V384h456v456zM384 320V184h456v136H384z"}}]},name:"layout",theme:"outlined"}},75710:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M843.5 737.4c-12.4-75.2-79.2-129.1-155.3-125.4S550.9 676 546 752c-153.5-4.8-208-40.7-199.1-113.7 3.3-27.3 19.8-41.9 50.1-49 18.4-4.3 38.8-4.9 57.3-3.2 1.7.2 3.5.3 5.2.5 11.3 2.7 22.8 5 34.3 6.8 34.1 5.6 68.8 8.4 101.8 6.6 92.8-5 156-45.9 159.2-132.7 3.1-84.1-54.7-143.7-147.9-183.6-29.9-12.8-61.6-22.7-93.3-30.2-14.3-3.4-26.3-5.7-35.2-7.2-7.9-75.9-71.5-133.8-147.8-134.4-76.3-.6-140.9 56.1-150.1 131.9s40 146.3 114.2 163.9c74.2 17.6 149.9-23.3 175.7-95.1 9.4 1.7 18.7 3.6 28 5.8 28.2 6.6 56.4 15.4 82.4 26.6 70.7 30.2 109.3 70.1 107.5 119.9-1.6 44.6-33.6 65.2-96.2 68.6-27.5 1.5-57.6-.9-87.3-5.8-8.3-1.4-15.9-2.8-22.6-4.3-3.9-.8-6.6-1.5-7.8-1.8l-3.1-.6c-2.2-.3-5.9-.8-10.7-1.3-25-2.3-52.1-1.5-78.5 4.6-55.2 12.9-93.9 47.2-101.1 105.8-15.7 126.2 78.6 184.7 276 188.9 29.1 70.4 106.4 107.9 179.6 87 73.3-20.9 119.3-93.4 106.9-168.6zM329.1 345.2a83.3 83.3 0 11.01-166.61 83.3 83.3 0 01-.01 166.61zM695.6 845a83.3 83.3 0 11.01-166.61A83.3 83.3 0 01695.6 845z"}}]},name:"node-index",theme:"outlined"}},78847:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M848 359.3H627.7L825.8 109c4.1-5.3.4-13-6.3-13H436c-2.8 0-5.5 1.5-6.9 4L170 547.5c-3.1 5.3.7 12 6.9 12h174.4l-89.4 357.6c-1.9 7.8 7.5 13.3 13.3 7.7L853.5 373c5.2-4.9 1.7-13.7-5.5-13.7zM378.2 732.5l60.3-241H281.1l189.6-327.4h224.6L487 427.4h211L378.2 732.5z"}}]},name:"thunderbolt",theme:"outlined"}},93314:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(53234),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},95008:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"}},95118:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(75710),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))},99811:(e,t,a)=>{a.d(t,{A:()=>o});var r=a(97109),n=a(14995),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}let o=r.forwardRef((e,t)=>r.createElement(c.A,l({},e,{ref:t,icon:n.A})))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[788],{1611:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"}},2256:(e,t,a)=>{a.d(t,{A:()=>n});let n=a(25341).A},11100:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M567.1 512l318.5-319.3c5-5 1.5-13.7-5.6-13.7h-90.5c-2.1 0-4.2.8-5.6 2.3l-273.3 274-90.2-90.5c12.5-22.1 19.7-47.6 19.7-74.8 0-83.9-68.1-152-152-152s-152 68.1-152 152 68.1 152 152 152c27.7 0 53.6-7.4 75.9-20.3l90 90.3-90.1 90.3A151.04 151.04 0 00288 582c-83.9 0-152 68.1-152 152s68.1 152 152 152 152-68.1 152-152c0-27.2-7.2-52.7-19.7-74.8l90.2-90.5 273.3 274c1.5 1.5 3.5 2.3 5.6 2.3H880c7.1 0 10.7-8.6 5.6-13.7L567.1 512zM288 370c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80zm0 444c-44.1 0-80-35.9-80-80s35.9-80 80-80 80 35.9 80 80-35.9 80-80 80z"}}]},name:"scissor",theme:"outlined"}},14995:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"}},21247:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482.2 508.4L331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4a4.5 4.5 0 000-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4a4.52 4.52 0 000 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"}}]},name:"merge-cells",theme:"outlined"}},23216:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(29664),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},23830:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"}},26619:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(1611),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},29606:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(23830),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},29664:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"}},30960:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"}},35459:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(98995),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},38770:(e,t,a)=>{a.d(t,{A:()=>n});let n=a(51916).A},49484:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(11100),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},53234:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM496 208H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 544h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H312c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm328 244a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"hdd",theme:"outlined"}},54849:(e,t,a)=>{a.d(t,{A:()=>w});var n=a(97109),r=a(42644),c=a(52690),l=a(3638),s=a(92162),o=a(26047),i=a(74567),f=a(88762);let v=e=>{let t,{value:a,formatter:r,precision:c,decimalSeparator:l,groupSeparator:s="",prefixCls:i,className:f,style:v}=e;if((0,o.Tn)(r))t=r(a);else{let e=String(a),r=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(r&&"-"!==e){let e=r[1],a=r[2]||"0",f=r[4]||"";a=a.replace(/\B(?=(\d{3})+(?!\d))/g,s),(0,o.Et)(c)&&(f=f.padEnd(c,"0").slice(0,c>0?c:0)),f&&(f=`${l}${f}`),t=[n.createElement("span",{key:"int",className:`${i}-content-value-int`},e,a),f&&n.createElement("span",{key:"decimal",className:`${i}-content-value-decimal`},f)]}else t=e}return n.createElement("span",{className:f,style:v},t)};var h=a(7961),d=a(10540),u=a(28403);let m=(0,d.OF)("Statistic",e=>(e=>{let{componentCls:t,marginXXS:a,padding:n,colorTextDescription:r,titleFontSize:c,colorTextHeading:l,contentFontSize:s,fontFamily:o}=e;return{[t]:{...(0,h.dF)(e),[`${t}-header`]:{paddingBottom:a,[`${t}-title`]:{color:r,fontSize:c}},[`${t}-skeleton`]:{paddingTop:n},[`${t}-content`]:{color:l,fontSize:s,fontFamily:o,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:a},[`${t}-content-suffix`]:{marginInlineStart:a}}}}})((0,u.oX)(e,{})),e=>{let{fontSizeHeading3:t,fontSize:a}=e;return{titleFontSize:a,contentFontSize:t}}),p=n.forwardRef((e,t)=>{let{prefixCls:a,className:c,rootClassName:h,style:d,valueStyle:u,value:p=0,title:g,valueRender:b,prefix:A,suffix:H,loading:w=!1,formatter:y,precision:O,decimalSeparator:z=".",groupSeparator:V=",",onMouseEnter:E,onMouseLeave:$,styles:j,classNames:x,...M}=e,{getPrefixCls:N,direction:R,className:S,style:k,classNames:B,styles:P}=(0,i.TP)("statistic"),T=N("statistic",a),[C,I]=m(T),L={...e,decimalSeparator:z,groupSeparator:V,loading:w,value:p},D=(0,s.XT)(k),_=(0,s.XT)(d),[F,X]=(0,s.AV)([B,x],[P,D,j,_],{props:L}),q=(0,l.$)(T,{[`${T}-rtl`]:"rtl"===R},S,c,h,F.root,C,I),K=(0,l.$)(`${T}-header`,F.header),Y=(0,l.$)(`${T}-title`,F.title),G=(0,l.$)(`${T}-content`,F.content),J=(0,l.$)(`${T}-content-value`,F.value),Q=(0,l.$)(`${T}-content-prefix`,F.prefix),U=(0,l.$)(`${T}-content-suffix`,F.suffix),W=n.createElement(v,{decimalSeparator:z,groupSeparator:V,prefixCls:T,formatter:y,precision:O,value:p,className:J,style:X.value}),Z=n.useRef(null);n.useImperativeHandle(t,()=>({nativeElement:Z.current}));let ee=(0,r.KE)(M,{aria:!0,data:!0});return n.createElement("div",{...ee,className:q,style:X.root,ref:Z,onMouseEnter:E,onMouseLeave:$},g&&n.createElement("div",{className:K,style:X.header},n.createElement("div",{className:Y,style:X.title},g)),n.createElement(f.A,{paragraph:!1,loading:w,className:`${T}-skeleton`,active:!0},n.createElement("div",{className:G,style:{...u,...X.content}},A&&n.createElement("span",{className:Q,style:X.prefix},A),(0,o.Tn)(b)?b(W):W,H&&n.createElement("span",{className:U,style:X.suffix},H))))}),g=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]],b=1e3/60,A=e=>{let{value:t,format:a="HH:mm:ss",onChange:l,onFinish:s,type:o,...i}=e,f="countdown"===o,[v,h]=n.useState(null),d=(0,r._q)(()=>{let e=Date.now(),a=new Date(t).getTime();h({});let n=f?a-e:e-a;return l?.(n),!f||!(a<e)||(s?.(),!1)});return n.useEffect(()=>{let e;return e=window.setInterval(()=>{d()||window.clearInterval(e)},b),()=>{window.clearInterval(e)}},[t,f]),n.useEffect(()=>{h({})},[]),n.createElement(p,{...i,value:t,valueRender:e=>(0,c.Ob)(e,{title:void 0}),formatter:(e,t)=>v?function(e,t,a){let{format:n=""}=t,r=new Date(e).getTime(),c=Date.now();return function(e,t){let a=e,n=/\[[^\]]*]/g,r=(t.match(n)||[]).map(e=>e.slice(1,-1)),c=t.replace(n,"[]"),l=g.reduce((e,[t,n])=>{if(e.includes(t)){let r=Math.floor(a/n);return a-=r*n,e.replace(RegExp(`${t}+`,"g"),e=>{let t=e.length;return r.toString().padStart(t,"0")})}return e},c),s=0;return l.replace(n,()=>{let e=r[s];return s+=1,e})}(a?Math.max(r-c,0):Math.max(c-r,0),n)}(e,{...t,format:a},f):"-"})},H=n.memo(e=>n.createElement(A,{...e,type:"countdown"}));p.Timer=A,p.Countdown=H;let w=p},56768:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(30960),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},63663:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(21247),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},93314:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(53234),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))},98995:(e,t)=>{t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M856 376H648V168c0-8.8-7.2-16-16-16H168c-8.8 0-16 7.2-16 16v464c0 8.8 7.2 16 16 16h208v208c0 8.8 7.2 16 16 16h464c8.8 0 16-7.2 16-16V392c0-8.8-7.2-16-16-16zm-480 16v188H220V220h360v156H392c-8.8 0-16 7.2-16 16zm204 52v136H444V444h136zm224 360H444V648h188c8.8 0 16-7.2 16-16V444h156v360z"}}]},name:"block",theme:"outlined"}},99811:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(97109),r=a(14995),c=a(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}let s=n.forwardRef((e,t)=>n.createElement(c.A,l({},e,{ref:t,icon:r.A})))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[795],{27795:(e,l,s)=>{s.r(l),s.d(l,{default:()=>N});var t=s(65321),r=s(97109),i=s(79059),o=s(33442),n=s(85114),c=s(2256),a=s(38770),d=s(68787),x=s(99605),v=s(54849),u=s(11702),h=s(99811),m=s(520),j=s(93314),A=s(13114),y=s(29071),p=s(26631),g=s(84742),f=s(38762),k=s(8579),S=s(32632),w=s(95118),z=s(24810),T=s(6578);function N(){var e,l,s,N,b,C,P,D,M,O,F,I,B,E,_,W,U,L;let R=(0,i.Vr)(),[V,Z]=(0,r.useState)(null),[q,G]=(0,r.useState)(!0),[H,J]=(0,r.useState)(0),[K,Q]=(0,r.useState)(0),[X,Y]=(0,r.useState)(0),[$,ee]=(0,r.useState)(0),[el,es]=(0,r.useState)(null),et=(0,r.useCallback)(async()=>{G(!0);try{let[e,l,s,t,r]=await Promise.all([(0,T.FC)(),(0,T.Z3)().catch(()=>[]),(0,T.lv)().catch(()=>({roles:[],configs:[]})),(0,T.Dl)().catch(()=>({templates:[]})),(0,T.II)().catch(()=>null)]);Z(e),J(Array.isArray(l)?l.length:0);let i=Array.isArray(s.roles)?s.roles:[];Q(i.filter(e=>"file"===e.type).length),Y(i.filter(e=>"prompt"===e.type).length),ee(Array.isArray(t.templates)?t.templates.length:0),es(r)}catch(e){}finally{G(!1)}},[]);(0,r.useEffect)(()=>{et();let e=setInterval(()=>{et()},1e4);return()=>clearInterval(e)},[et]);let er=(null!=(l=null==V?void 0:V.cpu.usagePercent)?l:0)>80?"var(--colorDanger)":(null!=(s=null==V?void 0:V.cpu.usagePercent)?s:0)>50?"var(--colorWarning)":"var(--colorOk)",ei=(null!=(N=null==V?void 0:V.memory.usagePercent)?N:0)>80?"var(--colorDanger)":(null!=(b=null==V?void 0:V.memory.usagePercent)?b:0)>50?"var(--colorWarning)":"var(--colorOk)",eo=(null==V?void 0:V.tasks.total)?Math.round(V.tasks.success/V.tasks.total*100):0,en=null==V||null==(e=V.models)?void 0:e[0],ec=(null==V?void 0:V.logs.latestAt)?new Date(V.logs.latestAt).toLocaleString():"暂无日志";return(0,t.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"pageTitle",children:R("overview.title")}),(0,t.jsx)("p",{className:"pageDesc",children:R("overview.description")})]}),(0,t.jsxs)(o.A,{children:[(0,t.jsxs)("span",{style:{color:"var(--colorTextSecondary)",fontSize:12},children:["统计更新:",ec]}),(0,t.jsx)(n.Ay,{icon:(0,t.jsx)(h.A,{spin:q}),loading:q,onClick:()=>{et()},children:R("common.retry")})]})]}),(0,t.jsxs)(c.A,{gutter:[16,16],children:[(0,t.jsx)(a.A,{xs:24,sm:12,children:(0,t.jsx)(d.A,{size:"small",title:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.A,{})," CPU"]}),children:(0,t.jsxs)("div",{style:{textAlign:"center"},children:[(0,t.jsx)(x.A,{type:"circle",percent:null!=(C=null==V?void 0:V.cpu.usagePercent)?C:0,size:120,strokeColor:er,format:e=>"".concat(null==e?void 0:e.toFixed(1),"%")}),(0,t.jsxs)("div",{className:"text-xs mt-2",style:{color:"var(--colorTextSecondary)"},children:[null!=(P=null==V?void 0:V.cpu.cores)?P:0," ",R("overview.cores")]})]})})}),(0,t.jsx)(a.A,{xs:24,sm:12,children:(0,t.jsx)(d.A,{size:"small",title:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.A,{})," ",R("overview.memory")]}),children:(0,t.jsxs)("div",{style:{textAlign:"center"},children:[(0,t.jsx)(x.A,{type:"circle",percent:null!=(D=null==V?void 0:V.memory.usagePercent)?D:0,size:120,strokeColor:ei,format:e=>"".concat(e,"%")}),(0,t.jsxs)("div",{className:"text-xs mt-2",style:{color:"var(--colorTextSecondary)"},children:[null!=(M=null==V?void 0:V.memory.processMB)?M:0," MB / ",null!=(O=null==V?void 0:V.memory.totalMB)?O:0," MB"]})]})})})]}),(0,t.jsxs)(c.A,{gutter:[16,16],children:[(0,t.jsx)(a.A,{xs:12,sm:6,children:(0,t.jsx)(d.A,{size:"small",children:(0,t.jsx)(v.A,{title:"运行时间",value:V?Math.floor(V.uptime/3600):0,suffix:"小时",prefix:(0,t.jsx)(A.A,{})})})}),(0,t.jsx)(a.A,{xs:12,sm:6,children:(0,t.jsxs)(d.A,{size:"small",children:[(0,t.jsx)(v.A,{title:R("overview.tokensUsed"),value:null!=(F=null==V?void 0:V.tokens.total)?F:0,prefix:(0,t.jsx)(y.A,{})}),(0,t.jsxs)("div",{style:{color:"var(--colorTextSecondary)",fontSize:12},children:["Prompt ",null!=(I=null==V?void 0:V.tokens.prompt)?I:0," / Completion ",null!=(B=null==V?void 0:V.tokens.completion)?B:0]})]})}),(0,t.jsx)(a.A,{xs:12,sm:6,children:(0,t.jsxs)(d.A,{size:"small",children:[(0,t.jsx)(v.A,{title:R("overview.tasksTotal"),value:null!=(E=null==V?void 0:V.tasks.total)?E:0,prefix:(0,t.jsx)(p.A,{})}),(0,t.jsxs)("div",{style:{color:"var(--colorTextSecondary)",fontSize:12},children:["成功 ",null!=(_=null==V?void 0:V.tasks.success)?_:0," / 失败 ",null!=(W=null==V?void 0:V.tasks.failed)?W:0," / 运行中 ",null!=(U=null==V?void 0:V.tasks.running)?U:0]})]})}),(0,t.jsx)(a.A,{xs:12,sm:6,children:(0,t.jsx)(d.A,{size:"small",children:(0,t.jsx)(v.A,{title:R("overview.successRate"),value:eo,suffix:"%",prefix:eo>80?(0,t.jsx)(g.A,{style:{color:"var(--colorOk)"}}):(0,t.jsx)(f.A,{style:{color:"var(--colorDanger)"}})})})})]}),(0,t.jsx)(d.A,{size:"small",title:"资源概览",children:(0,t.jsxs)(c.A,{gutter:[16,16],children:[(0,t.jsx)(a.A,{xs:24,sm:12,md:8,lg:4,children:(0,t.jsx)(d.A,{size:"small",style:{height:"100%"},children:(0,t.jsx)(v.A,{title:"文件角色",value:K,prefix:(0,t.jsx)(p.A,{style:{color:"var(--colorAccent)"}})})})}),(0,t.jsx)(a.A,{xs:24,sm:12,md:8,lg:4,children:(0,t.jsx)(d.A,{size:"small",style:{height:"100%"},children:(0,t.jsx)(v.A,{title:"提示词角色",value:X,prefix:(0,t.jsx)(k.A,{style:{color:"var(--colorWarning)"}})})})}),(0,t.jsx)(a.A,{xs:24,sm:12,md:8,lg:4,children:(0,t.jsx)(d.A,{size:"small",style:{height:"100%"},children:(0,t.jsx)(v.A,{title:"模板",value:$,prefix:(0,t.jsx)(S.A,{style:{color:"var(--colorDanger)"}})})})}),(0,t.jsx)(a.A,{xs:24,sm:12,md:8,lg:4,children:(0,t.jsxs)(d.A,{size:"small",style:{height:"100%",overflow:"hidden"},children:[(0,t.jsx)(v.A,{title:"语义模型",value:(null==el?void 0:el.provider)==="openai-compatible"?"外部 Embedding":el?"本地语义模型":"—",prefix:(0,t.jsx)(w.A,{style:{color:"var(--colorAccent)"}}),valueStyle:{fontSize:18,whiteSpace:"nowrap"}}),(null==el?void 0:el.model)&&(0,t.jsxs)("div",{className:"text-xs mt-1",style:{color:"var(--colorTextSecondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:"".concat(el.model).concat(el.dimensions?" \xb7 ".concat(el.dimensions,"维"):""),children:[el.model,el.dimensions?" \xb7 ".concat(el.dimensions,"维"):""]})]})}),(0,t.jsx)(a.A,{xs:24,sm:12,md:8,lg:4,children:(0,t.jsx)(d.A,{size:"small",style:{height:"100%"},children:(0,t.jsx)(v.A,{title:"模型供应商",value:H,prefix:(0,t.jsx)(z.A,{style:{color:"var(--colorAccent)"}})})})}),(0,t.jsx)(a.A,{xs:24,sm:12,md:8,lg:4,children:(0,t.jsx)(d.A,{size:"small",style:{height:"100%"},children:(0,t.jsx)(v.A,{title:"审计日志",value:null!=(L=null==V?void 0:V.logs.events)?L:0,suffix:"条",prefix:(0,t.jsx)(A.A,{style:{color:"var(--colorOk)"}})})})})]})}),(0,t.jsxs)(c.A,{gutter:[16,16],children:[(0,t.jsx)(a.A,{xs:24,sm:12,children:(0,t.jsx)(d.A,{size:"small",title:R("overview.topModel"),style:{height:"100%"},children:en?(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(A.A,{style:{fontSize:24,color:"var(--colorAccent)"}}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-semibold",children:en.model}),(0,t.jsxs)("div",{style:{color:"var(--colorTextSecondary)",fontSize:12},children:["@",en.provider," — ",en.count," ",R("overview.calls")]})]})]}):(0,t.jsx)("span",{style:{color:"var(--colorTextSecondary)"},children:"暂无真实模型调用日志"})})}),(0,t.jsx)(a.A,{xs:24,sm:12,children:(0,t.jsx)(d.A,{size:"small",title:R("overview.taskTypes"),style:{height:"100%"},children:(null==V?void 0:V.tasks.types)&&Object.keys(V.tasks.types).length>0?(0,t.jsx)(o.A,{wrap:!0,children:Object.entries(V.tasks.types).sort((e,l)=>l[1]-e[1]).map(e=>{let[l,s]=e;return(0,t.jsxs)(u.A,{children:[l.slice(0,30),": ",s]},l)})}):(0,t.jsx)("span",{style:{color:"var(--colorTextSecondary)"},children:R("common.noData")})})})]})]})}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[958],{63806:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>I});var n=i(65321),l=i(97109),o=i(17807),a=i(25258),s=i(88762),r=i(2256),c=i(38770),d=i(68787),p=i(33442),x=i(85114),h=i(84253),g=i(71102),y=i(384),f=i(11702),m=i(58209),u=i(93051),j=i(81668),v=i(64254),w=i(26619),A=i(85855),b=i(75548),k=i(56768),S=i(79059),z=i(6578);let C={knowledge_base:"知识库",generated:"AI生成",uploaded:"上传",external_url:"外部URL"},_={cover:"magenta",reference:"blue",generated:"purple",attachment:"cyan",map:"orange",operator:"geekblue"};function I(){let e=(0,S.Vr)(),{message:t}=o.A.useApp(),[i,I]=(0,l.useState)([]),[R,N]=(0,l.useState)(new Set),[T,E]=(0,l.useState)(!0),[F,P]=(0,l.useState)(""),B=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F;try{I((await (0,z.f$)(e||void 0)).assets)}catch(e){I([])}};(0,l.useEffect)(()=>{let e=!1;return E(!0),(0,z.dx)().then(t=>{var i,n,l;if(e)return;let o=(null==(i=t.find(e=>e.selected))?void 0:i.projectRoot)||(null==(n=t.find(e=>e.isCurrent))?void 0:n.projectRoot)||(null==(l=t[0])?void 0:l.projectRoot)||"";return P(o),B(o)}).finally(()=>{e||E(!1)}),()=>{e=!0}},[]);let D=async e=>{var i;e&&(await (null==(i=navigator.clipboard)?void 0:i.writeText(e)),t.success("已复制路径"))},W=async(e,i)=>{try{"index"===i?(I((await (0,z.uc)(e,F||void 0)).assets),t.success("已加入知识库索引")):"openFile"===i?await (0,z.oS)(e,"file",F||void 0):"openDirectory"===i?await (0,z.oS)(e,"directory",F||void 0):"delete"===i&&(I((await (0,z.JU)(e,F||void 0)).assets),N(t=>{let i=new Set(t);return i.delete(e),i}))}catch(e){t.error(e instanceof Error?e.message:"操作失败")}},O=n=>{let l="selected"===n?[...R]:i.map(e=>e.id);0!==l.length&&a.A.confirm({title:"all"===n?"删除全部资源?":"删除已选 ".concat(l.length," 个资源?"),content:"此操作不可撤销。",okText:e("common.confirm"),cancelText:e("common.cancel"),okButtonProps:{danger:!0},onOk:async()=>{E(!0);try{await Promise.all(l.map(e=>(0,z.JU)(e,F||void 0))),await B(),N(new Set),t.success("已删除 ".concat(l.length," 个资源"))}catch(e){t.error("批量删除失败")}finally{E(!1)}}})},U=e=>{N(t=>{let i=new Set(t);return i.has(e)?i.delete(e):i.add(e),i})};return T?(0,n.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,n.jsx)(s.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,n.jsx)(r.A,{gutter:[12,12],children:Array.from({length:6}).map((e,t)=>(0,n.jsx)(c.A,{xs:24,sm:12,md:8,xl:6,children:(0,n.jsx)(d.A,{size:"small",children:(0,n.jsx)(s.A,{active:!0,paragraph:{rows:3}})})},t))})]}):(0,n.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"pageTitle",children:e("nav.assetLibrary")}),(0,n.jsx)("p",{className:"pageDesc",children:"管理模板运行生成的文档、图片和附件。生成结果默认不进入知识库,需要复用时可手动加入知识库。"})]}),(0,n.jsxs)(p.A,{size:8,children:[(0,n.jsxs)("span",{style:{color:"var(--colorTextSecondary)",fontSize:12},children:["共 ",i.length," 个资源"]}),(0,n.jsxs)(x.Ay,{danger:!0,size:"small",disabled:0===R.size,icon:(0,n.jsx)(m.A,{}),onClick:()=>O("selected"),children:["删除已选 ",R.size||""]}),(0,n.jsx)(x.Ay,{danger:!0,size:"small",disabled:0===i.length,onClick:()=>O("all"),children:"删除全部"})]})]}),0===i.length?(0,n.jsx)(h.A,{description:"暂无生成资源"}):(0,n.jsx)(r.A,{gutter:[12,12],children:i.map((t,i)=>{let l="image"===t.type&&t.path?"/api/assets/generated/preview?id=".concat(encodeURIComponent(t.id)).concat(F?"&projectRoot=".concat(encodeURIComponent(F)):""):void 0,o=R.has(t.id),a=[...t.path?[{key:"copy",icon:(0,n.jsx)(u.A,{}),label:"复制路径",onClick:()=>{D(t.path)}}]:[],...t.path?[{key:"open",icon:(0,n.jsx)(j.A,{}),label:"打开文件",onClick:()=>{W(t.id,"openFile")}}]:[],...t.path?[{key:"folder",icon:(0,n.jsx)(v.A,{}),label:"打开目录",onClick:()=>{W(t.id,"openDirectory")}}]:[],...!t.indexed&&t.path?[{key:"index",icon:(0,n.jsx)(w.A,{}),label:"加入知识库",onClick:()=>{W(t.id,"index")}}]:[],{type:"divider"},{key:"delete",icon:(0,n.jsx)(m.A,{}),label:e("common.delete"),danger:!0,onClick:()=>{W(t.id,"delete")}}];return(0,n.jsx)(c.A,{xs:24,sm:12,md:8,xl:6,children:(0,n.jsxs)(d.A,{size:"small",hoverable:!0,styles:{body:{padding:12}},style:{border:o?"2px solid #1677ff":void 0,cursor:"pointer",position:"relative"},onClick:()=>U(t.id),children:[(0,n.jsx)("div",{onClick:e=>{e.stopPropagation(),U(t.id)},style:{position:"absolute",top:8,left:8,zIndex:2,width:22,height:22,borderRadius:5,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.15s",background:o?"#1677ff":"rgba(0,0,0,0.6)",color:"#fff",fontSize:12,fontWeight:700},children:o?"✓":""}),(0,n.jsx)(g.A,{menu:{items:a},trigger:["click"],placement:"bottomRight",children:(0,n.jsx)(x.Ay,{type:"text",size:"small",icon:(0,n.jsx)(A.A,{}),style:{position:"absolute",top:6,right:6,zIndex:2,width:24,height:24,padding:0,background:"var(--colorBgContainer)",borderRadius:6,boxShadow:"0 1px 3px rgba(0,0,0,0.08)"},onClick:e=>e.stopPropagation()})}),l&&(0,n.jsx)("div",{style:{margin:"-12px -12px 10px -12px",borderRadius:"10px 10px 0 0",overflow:"hidden",height:140,display:"flex",alignItems:"center",justifyContent:"center",background:"var(--colorFillAlter)"},children:(0,n.jsx)(y.A,{src:l,alt:t.name,style:{width:"100%",height:"100%",objectFit:"cover"},onClick:e=>e.stopPropagation()})}),(0,n.jsx)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:6},children:(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0,flex:1},children:[!l&&("image"===t.type?(0,n.jsx)(b.A,{style:{color:"var(--colorWarning)",fontSize:15,flexShrink:0}}):(0,n.jsx)(k.A,{style:{color:"var(--colorAccent)",fontSize:15,flexShrink:0}})),(0,n.jsx)("span",{style:{fontWeight:600,fontSize:13,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.name})]})}),(0,n.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginBottom:8},children:[(0,n.jsx)(f.A,{color:t.indexed?"success":"default",style:{margin:0,fontSize:10,lineHeight:"16px"},children:t.indexed?"已入库":"未入库"}),(0,n.jsx)(f.A,{color:_[t.role]||"blue",style:{margin:0,fontSize:10,lineHeight:"16px"},children:t.role}),(0,n.jsx)(f.A,{style:{margin:0,fontSize:10,lineHeight:"16px"},children:t.type})]}),(0,n.jsxs)("div",{style:{fontSize:12,color:"var(--colorTextSecondary)",lineHeight:1.5,marginBottom:6},children:[t.path&&(0,n.jsx)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:"monospace",fontSize:11},children:t.path}),(0,n.jsxs)("div",{children:[C[t.source]||t.source," \xb7 ",t.usedByDocumentIds.length," 个文档 \xb7 ",new Date(t.updatedAt).toLocaleDateString()]})]})]})},t.id)})})]})}},85015:(e,t,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/asset-library",function(){return i(63806)}])}},e=>{e.O(0,[433,787,102,317,636,593,792],()=>e(e.s=85015)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[623],{23507:(e,l,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/document-roles",function(){return r(59889)}])},59889:(e,l,r)=>{"use strict";r.r(l),r.d(l,{default:()=>Y});var i=r(65321),n=r(97109),t=r(35292),s=r(17807),o=r(63455),a=r(11702),c=r(84253),d=r(68787),p=r(85114),x=r(26171),m=r(33442),h=r(57271),u=r(85493),f=r(34052),y=r(7576),g=r(2256),j=r(38770),A=r(58569),v=r(25345),b=r(43979),w=r(80042),I=r(75548),S=r(26631),z=r(84662),T=r(30486),R=r(99650),k=r(8263),C=r(84742),_=r(43094),B=r(8579),F=r(81668),N=r(58209),O=r(96091),W=r(54746),E=r(96651),D=r(60470),H=r(6578),P=r(79059);let{Paragraph:L}=t.A,U={rule:(0,i.jsx)(v.A,{}),project_fact:(0,i.jsx)(b.A,{}),table:(0,i.jsx)(w.A,{}),drawing:(0,i.jsx)(I.A,{}),specification:(0,i.jsx)(S.A,{}),reference:(0,i.jsx)(z.A,{})},q={fact_extraction:(0,i.jsx)(T.A,{}),chapter_generation:(0,i.jsx)(R.A,{}),llm_review:(0,i.jsx)(k.A,{}),validation:(0,i.jsx)(C.A,{}),formatting:(0,i.jsx)(_.A,{}),reference:(0,i.jsx)(z.A,{})},V={rule:"#fa8c16",project_fact:"#1677ff",table:"#52c41a",drawing:"#722ed1",specification:"#eb2f96",reference:"#13c2c2"},G={fact_extraction:"#fa8c16",chapter_generation:"#1677ff",llm_review:"#722ed1",validation:"#52c41a",formatting:"#eb2f96",reference:"#13c2c2"},Q={rule:"roles.ruleFile",project_fact:"roles.projectFactFile",table:"roles.tableFile",drawing:"roles.drawingFile",specification:"roles.specificationFile",reference:"roles.reference"},J={fact_extraction:"roles.factExtraction",chapter_generation:"roles.chapterGeneration",llm_review:"roles.llmReview",validation:"roles.validation",formatting:"roles.formatting",reference:"roles.reference"};function M(e,l){let r=new Blob([JSON.stringify(l,null,2)],{type:"application/json;charset=utf-8"}),i=URL.createObjectURL(r),n=document.createElement("a");n.href=i,n.download=e,n.click(),URL.revokeObjectURL(i)}function X(e){return e.trim().replace(/[\\/:*?"<>|]/g,"-").slice(0,80)||"untitled"}function K(e,l){return{type:"customize-agent.documentRoles",version:1,exportedAt:new Date().toISOString(),roles:e,configs:l}}function Y(){let e,l,r=(0,P.Vr)(),{message:t}=s.A.useApp(),[v]=o.A.useForm(),[b]=o.A.useForm(),[w,I]=(0,n.useState)([]),[z,T]=(0,n.useState)([]),[k,C]=(0,n.useState)([]),[_,Y]=(0,n.useState)(!1),[Z,$]=(0,n.useState)(!1),[ee,el]=(0,n.useState)(!1),[er,ei]=(0,n.useState)("file"),[en,et]=(0,n.useState)("custom"),[es,eo]=(0,n.useState)(!1),ea=(0,n.useRef)(null),ec=async()=>{let[e,l]=await Promise.all([(0,H.lv)(),(0,H.dx)()]);I(e.roles),T(e.configs),C(l)};(0,n.useEffect)(()=>{ec().catch(()=>t.error(r("common.error")))},[t,r]);let ed=()=>"all"===en||"custom"===en,ep=w.filter(ed),ex=z.filter(ed),em=ep.filter(e=>"file"===e.type),eh=ep.filter(e=>"prompt"===e.type),eu=w.filter(e=>"file"===e.type),ef=w.filter(e=>"prompt"===e.type),ey=async()=>{try{let e=await v.validateFields(),l="file"===e.type?{...e,resourceId:void 0,resourceIds:[]}:e,i=await (0,H.dg)(l);I(i.roles),T(i.configs),Y(!1),t.success(r("common.success"))}catch(e){t.error(r("common.error"))}},eg=async()=>{try{let e=await b.validateFields(),l=e=>(null!=e?e:[]).map((e,l)=>{var r;return{roleId:e.roleId,order:Number(null!=(r=e.order)?r:l)}}),i=await (0,H.NR)({...e,fileRoles:l(e.fileRoles),promptRoles:l(e.promptRoles)});I(i.roles),T(i.configs),$(!1),t.success(r("common.success"))}catch(e){t.error(r("common.error"))}},ej=async e=>{let l=await (0,H.FV)(e.type,e.id);I(l.roles),T(l.configs)},eA=async e=>{let l=await (0,H.dw)(e);I(l.roles),T(l.configs)},ev=async e=>{if(e){eo(!0);try{let l=JSON.parse(await e.text()),r=await fetch("/api/documents/roles?mode=import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!r.ok)throw Error(await r.text());let i=await r.json();I(i.roles),T(i.configs),t.success("已导入 ".concat(i.importedRoles," 个角色、").concat(i.importedConfigs," 个配置"))}catch(e){t.error("导入失败,请确认 JSON 文件格式正确")}finally{eo(!1),ea.current&&(ea.current.value="")}}},eb=function(e){var l;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"file";v.setFieldsValue(e?{...e,resourceIds:(null==(l=e.resourceIds)?void 0:l.length)?e.resourceIds:e.resourceId?[e.resourceId]:[]}:{id:"role-".concat(Date.now()),name:"",description:"",type:r,resourceIds:[],executionType:"prompt"===r?"reference":void 0,processingType:"file"===r?"reference":void 0}),Y(!0)},ew=e=>{b.setFieldsValue(null!=e?e:{id:"config-".concat(Date.now()),name:"",description:"",fileRoles:[],promptRoles:[],builtIn:!1}),$(!0)},eI=e=>w.find(l=>l.id===e),eS=e=>{var l;return(null==e?void 0:e.type)==="prompt"?(null==(l=e.resourceIds)?void 0:l.length)?e.resourceIds:e.resourceId?[e.resourceId]:[]:[]},ez=e=>{var l;return(null==(l=k.find(l=>l.id===e))?void 0:l.projectName)||e},eT=e=>(0,i.jsx)(a.A,{closable:e.closable,onClose:e.onClose,color:"purple",title:e.value,style:{margin:"1px 2px",fontSize:11,lineHeight:"18px"},children:ez(e.value)}),eR=(e,l)=>{let n="file"===l?"blue":"purple",t="file"===l?Q:J,s=[...e].sort((e,l)=>{var r,i;return Number(null!=(r=e.order)?r:0)-Number(null!=(i=l.order)?i:0)}).map(e=>eI(e.roleId)).filter(e=>!!e);return 0===s.length?(0,i.jsx)(c.A,{image:c.A.PRESENTED_IMAGE_SIMPLE,description:"file"===l?"暂未选择文件角色":"暂未选择提示词角色"}):(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:s.map((e,l)=>{var s,o;let c=eS(e),d="file"===e.type?null!=(s=e.processingType)?s:"":null!=(o=e.executionType)?o:"";return(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 8px",borderRadius:8,background:"var(--colorBgContainer)",border:"1px solid var(--colorBorderSecondary)"},children:[(0,i.jsxs)(a.A,{color:n,style:{margin:0},children:["#",l+1]}),(0,i.jsx)("span",{style:{fontWeight:600,flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,i.jsx)(a.A,{style:{margin:0},children:r(t[d]||"roles.reference")}),"prompt"===e.type&&(0,i.jsxs)("span",{style:{fontSize:12,color:"var(--colorTextSecondary)"},children:["绑定 ",c.length," 个提示词"]})]},e.id)})})},ek=e=>{if(!e)return null;let l=eS(e);return(0,i.jsxs)("div",{style:{marginTop:8,padding:8,borderRadius:8,background:"var(--colorFillQuaternary)",fontSize:12,color:"var(--colorTextSecondary)"},children:[e.description&&(0,i.jsx)("div",{style:{marginBottom:4*("prompt"===e.type)},children:e.description}),"prompt"===e.type&&(0,i.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:[l.slice(0,4).map(e=>(0,i.jsx)(a.A,{title:e,style:{margin:0,fontSize:10,lineHeight:"16px",maxWidth:180,overflow:"hidden",textOverflow:"ellipsis"},children:ez(e)},e)),l.length>4&&(0,i.jsxs)(a.A,{style:{margin:0,fontSize:10,lineHeight:"16px"},children:["+",l.length-4]}),0===l.length&&(0,i.jsx)("span",{children:"未绑定提示词"})]})]})};return(0,i.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h1",{className:"pageTitle",children:r("roles.title")}),(0,i.jsx)("p",{className:"pageDesc",children:r("roles.description")})]}),(0,i.jsxs)(m.A,{children:[(0,i.jsx)(h.A,{value:en,onChange:et,style:{width:170},options:[{label:"我的配置 (".concat(w.length+z.length,")"),value:"custom"},{label:"全部来源 (".concat(w.length+z.length,")"),value:"all"}]}),(0,i.jsx)("input",{ref:ea,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:e=>{var l;ev(null==(l=e.target.files)?void 0:l[0])}}),(0,i.jsx)(p.Ay,{icon:(0,i.jsx)(O.A,{}),loading:es,onClick:()=>{var e;return null==(e=ea.current)?void 0:e.click()},children:"导入"}),(0,i.jsx)(p.Ay,{icon:(0,i.jsx)(F.A,{}),disabled:w.length+z.length===0,onClick:()=>{M("customize-document-roles-".concat(new Date().toISOString().slice(0,10),".json"),K(w,z)),t.success("已导出 ".concat(w.length," 个角色、").concat(z.length," 个配置"))},children:"导出全部"}),(0,i.jsx)(p.Ay,{icon:(0,i.jsx)(W.A,{}),onClick:()=>eb(void 0,"file"),children:r("roles.newFileRole")}),(0,i.jsx)(p.Ay,{icon:(0,i.jsx)(W.A,{}),onClick:()=>eb(void 0,"prompt"),children:r("roles.newPromptRole")}),(0,i.jsx)(p.Ay,{type:"primary",icon:(0,i.jsx)(W.A,{}),onClick:()=>ew(),children:r("roles.newConfig")})]})]}),(0,i.jsx)(u.A,{type:"info",showIcon:!0,message:(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)("span",{children:r("roles.plainGuideTitle")}),(0,i.jsx)(p.Ay,{type:"link",size:"small",icon:ee?(0,i.jsx)(E.A,{}):(0,i.jsx)(D.A,{}),onClick:()=>el(!ee),style:{padding:"0 4px"},children:ee?"收起说明":"展开说明"})]}),description:ee?r("roles.plainGuideDesc"):void 0}),(0,i.jsx)(d.A,{size:"small",tabList:[{key:"file",label:"文件角色 (".concat(em.length,")")},{key:"prompt",label:"提示词角色 (".concat(eh.length,")")},{key:"configs",label:"项目角色配置 (".concat(ex.length,")")}],activeTabKey:er,onTabChange:ei,children:"configs"===er?0===ex.length?(0,i.jsx)(c.A,{description:r("common.noData")}):(0,i.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:12},children:ex.map(e=>{let l=e.fileRoles.map(e=>({...e,role:eI(e.roleId)})).filter(e=>e.role),n=e.promptRoles.map(e=>({...e,role:eI(e.roleId)})).filter(e=>e.role);return(0,i.jsxs)(d.A,{size:"small",hoverable:!0,style:{minWidth:0},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:8,marginBottom:6},children:[(0,i.jsx)("span",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:e.name}),(0,i.jsx)(a.A,{color:"cyan",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"我的配置"}),(0,i.jsxs)("div",{style:{display:"flex",gap:4,flexShrink:0},children:[(0,i.jsx)(p.Ay,{size:"small",icon:(0,i.jsx)(R.A,{}),onClick:()=>ew(e),children:"编辑"}),!e.builtIn&&(0,i.jsx)(p.Ay,{size:"small",icon:(0,i.jsx)(F.A,{}),onClick:()=>(e=>{let l=new Set([...e.fileRoles.map(e=>e.roleId),...e.promptRoles.map(e=>e.roleId)]);M("customize-role-config-".concat(X(e.name),"-").concat(new Date().toISOString().slice(0,10),".json"),K(w.filter(e=>l.has(e.id)&&!e.builtIn),[e])),t.success("已导出 1 个配置")})(e),children:"导出"}),(0,i.jsx)(x.A,{title:r("common.confirm"),onConfirm:()=>{eA(e.id)},children:(0,i.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,i.jsx)(N.A,{})})})]})]}),e.description&&(0,i.jsx)(L,{ellipsis:{rows:2},style:{fontSize:12,color:"var(--colorTextSecondary)",marginBottom:8},children:e.description}),(0,i.jsxs)("div",{style:{fontSize:12,color:"var(--colorTextSecondary)"},children:[(0,i.jsxs)("div",{style:{marginBottom:4},children:[(0,i.jsxs)("span",{children:["文件角色 (",e.fileRoles.length,"): "]}),l.length>0?(0,i.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginTop:2},children:[l.slice(0,4).map(e=>(0,i.jsx)(a.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px"},children:e.role.name},e.roleId)),l.length>4&&(0,i.jsxs)(a.A,{style:{margin:0,fontSize:10,lineHeight:"16px"},children:["+",l.length-4]})]}):(0,i.jsx)("span",{style:{color:"var(--colorTextQuaternary)"},children:"无"})]}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("span",{children:["提示词角色 (",e.promptRoles.length,"): "]}),n.length>0?(0,i.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginTop:2},children:[n.slice(0,4).map(e=>(0,i.jsx)(a.A,{color:"purple",style:{margin:0,fontSize:10,lineHeight:"16px"},children:e.role.name},e.roleId)),n.length>4&&(0,i.jsxs)(a.A,{style:{margin:0,fontSize:10,lineHeight:"16px"},children:["+",n.length-4]})]}):(0,i.jsx)("span",{style:{color:"var(--colorTextQuaternary)"},children:"无"})]})]})]},e.id)})}):(e="file"===er?em:eh,l=r,0===e.length?(0,i.jsx)(c.A,{description:r("common.noData")}):(0,i.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(270px, 1fr))",gap:12},children:e.map(e=>{var n,s,o,c,m,h,u,f,y;let g="prompt"===e.type?(null==(n=e.resourceIds)?void 0:n.length)?e.resourceIds:e.resourceId?[e.resourceId]:[]:[],j=g.slice(0,3),A=g.length-j.length,v="file"===e.type?null!=(o=U[null!=(s=e.processingType)?s:""])?o:(0,i.jsx)(S.A,{}):null!=(m=q[null!=(c=e.executionType)?c:""])?m:(0,i.jsx)(B.A,{}),b="file"===e.type?null!=(u=V[null!=(h=e.processingType)?h:""])?u:"var(--colorAccent)":null!=(y=G[null!=(f=e.executionType)?f:""])?y:"var(--colorWarning)";return(0,i.jsxs)(d.A,{size:"small",hoverable:!0,style:{minWidth:0},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:8,marginBottom:8},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0,flex:1},children:[(0,i.jsx)("span",{style:{color:b,fontSize:16,flexShrink:0,lineHeight:1},children:v}),(0,i.jsx)("span",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",lineHeight:"20px"},children:e.name})]}),(0,i.jsx)("div",{style:{display:"flex",gap:4,flexShrink:0},children:(0,i.jsx)(a.A,{color:"cyan",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"我的角色"})})]}),e.description&&(0,i.jsx)(L,{ellipsis:{rows:2},style:{fontSize:12,color:"var(--colorTextSecondary)",marginBottom:8},children:e.description}),(0,i.jsxs)("div",{style:{marginBottom:8,display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[(0,i.jsx)(a.A,{color:"file"===e.type?"blue":"purple",style:{margin:0},children:function(e,l){var r,i,n;let t="file"===e.type?Q[null!=(r=e.processingType)?r:""]:J[null!=(i=e.executionType)?i:""];return t?l(t):null!=(n="file"===e.type?e.processingType:e.executionType)?n:""}(e,l)}),g.length>0&&(0,i.jsxs)("span",{style:{fontSize:12,color:"var(--colorTextSecondary)"},children:["绑定 ",g.length," 个提示词"]})]}),j.length>0&&(0,i.jsx)("div",{style:{marginBottom:10},children:(0,i.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:[j.map(e=>(0,i.jsx)(a.A,{color:"purple",title:e,style:{margin:0,fontSize:10,lineHeight:"16px",maxWidth:140,overflow:"hidden",textOverflow:"ellipsis"},children:ez(e)},e)),A>0&&(0,i.jsxs)(a.A,{style:{margin:0,fontSize:10,lineHeight:"16px"},children:["+",A]})]})}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:6,paddingTop:4,borderTop:"1px solid var(--colorBorderSecondary)"},children:[(0,i.jsx)(p.Ay,{size:"small",icon:(0,i.jsx)(R.A,{}),onClick:()=>eb(e),children:"编辑"}),!e.builtIn&&(0,i.jsx)(p.Ay,{size:"small",icon:(0,i.jsx)(F.A,{}),onClick:()=>{M("customize-role-".concat(X(e.name),"-").concat(new Date().toISOString().slice(0,10),".json"),K([e],[])),t.success("已导出 1 个角色")},children:"导出"}),(0,i.jsx)(x.A,{title:r("common.confirm"),onConfirm:()=>{ej(e)},children:(0,i.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,i.jsx)(N.A,{})})})]})]},e.id)})}))}),(0,i.jsx)(f.A,{title:r("roles.roleEditor"),open:_,onClose:()=>Y(!1),width:800,maskClosable:!1,style:{borderRadius:"12px 0 0 12px"},styles:{body:{padding:"16px 24px"},header:{borderRadius:"12px 0 0 0",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,i.jsx)(p.Ay,{type:"primary",onClick:()=>{ey()},children:r("common.save")}),children:(0,i.jsxs)(o.A,{form:v,layout:"vertical",children:[(0,i.jsx)(o.A.Item,{name:"id",hidden:!0,children:(0,i.jsx)(y.A,{})}),(0,i.jsxs)(g.A,{gutter:16,children:[(0,i.jsx)(j.A,{span:12,children:(0,i.jsx)(o.A.Item,{name:"type",label:r("roles.roleType"),rules:[{required:!0}],children:(0,i.jsx)(h.A,{options:[{label:r("roles.fileRole"),value:"file"},{label:r("roles.promptRole"),value:"prompt"}]})})}),(0,i.jsx)(j.A,{span:12,children:(0,i.jsx)(o.A.Item,{name:"name",label:r("roles.roleName"),rules:[{required:!0}],children:(0,i.jsx)(y.A,{})})})]}),(0,i.jsx)(o.A.Item,{name:"description",label:r("roles.roleDescription"),children:(0,i.jsx)(y.A.TextArea,{rows:2})}),(0,i.jsx)(o.A.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.type!==l.type,children:e=>{let{getFieldValue:l}=e,n="prompt"===l("type");return(0,i.jsx)(d.A,{size:"small",title:n?"提示词角色配置":"文件角色配置",style:{border:"1px solid var(--colorBorderSecondary)"},children:n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.A.Item,{name:"executionType",label:r("roles.executionType"),rules:[{required:!0}],style:{marginBottom:12},children:(0,i.jsx)(h.A,{options:[{label:r("roles.factExtraction"),value:"fact_extraction"},{label:r("roles.chapterGeneration"),value:"chapter_generation"},{label:r("roles.validation"),value:"validation"},{label:r("roles.formatting"),value:"formatting"},{label:r("roles.reference"),value:"reference"}]})}),(0,i.jsx)(o.A.Item,{name:"resourceIds",label:r("roles.bindPrompt"),style:{marginBottom:0},help:(0,i.jsx)("span",{style:{fontSize:11,color:"var(--colorTextSecondary)"},children:r("roles.multiBindPromptHelp")}),children:(0,i.jsx)(h.A,{mode:"multiple",showSearch:!0,tagRender:eT,placeholder:"选择提示词",options:k.filter(e=>e.hasFile).map(e=>({label:e.projectName,value:e.id}))})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.A.Item,{name:"processingType",label:r("roles.processingType"),rules:[{required:!0}],style:{marginBottom:12},children:(0,i.jsx)(h.A,{options:[{label:r("roles.ruleFile"),value:"rule"},{label:r("roles.projectFactFile"),value:"project_fact"},{label:r("roles.tableFile"),value:"table"},{label:r("roles.drawingFile"),value:"drawing"},{label:r("roles.specificationFile"),value:"specification"},{label:r("roles.reference"),value:"reference"}]})}),(0,i.jsx)(u.A,{type:"info",showIcon:!0,message:"文件角色只定义处理类型",description:"具体项目文件由生成流程自动识别,或在模板的高级固定绑定资料中手动覆盖;这里不再绑定知识库文件,避免角色复用时混入其他项目资料。"})]})})}})]})}),(0,i.jsx)(f.A,{title:r("roles.configEditor"),open:Z,onClose:()=>$(!1),width:800,maskClosable:!1,style:{borderRadius:"12px 0 0 12px"},styles:{body:{padding:"16px 24px"},header:{borderRadius:"12px 0 0 0",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,i.jsx)(p.Ay,{type:"primary",onClick:()=>{eg()},children:r("common.save")}),children:(0,i.jsxs)(o.A,{form:b,layout:"vertical",children:[(0,i.jsx)(o.A.Item,{name:"id",hidden:!0,children:(0,i.jsx)(y.A,{})}),(0,i.jsxs)(g.A,{gutter:16,children:[(0,i.jsx)(j.A,{span:12,children:(0,i.jsx)(o.A.Item,{name:"name",label:r("roles.configName"),rules:[{required:!0}],children:(0,i.jsx)(y.A,{})})}),(0,i.jsx)(j.A,{span:12,children:(0,i.jsx)(o.A.Item,{name:"description",label:r("roles.configDescription"),children:(0,i.jsx)(y.A,{})})})]}),(0,i.jsx)(o.A.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.fileRoles!==l.fileRoles||e.promptRoles!==l.promptRoles,children:e=>{let{getFieldValue:l}=e,n=l("fileRoles")||[],t=l("promptRoles")||[];return(0,i.jsx)(A.A,{destroyInactiveTabPane:!1,items:[{key:"file",label:"文件角色 (".concat(n.length,"/").concat(eu.length,")"),children:(0,i.jsx)(o.A.List,{name:"fileRoles",children:(e,l)=>{let{add:t,remove:s}=l;return(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,i.jsx)(d.A,{size:"small",title:"已选文件角色",style:{background:"var(--colorFillQuaternary)"},children:eR(n,"file")}),0===e.length&&(0,i.jsx)(c.A,{description:"暂未添加文件角色"}),e.map((e,l)=>(0,i.jsxs)(d.A,{size:"small",style:{border:"1px solid var(--colorBorderSecondary)",position:"relative"},children:[(0,i.jsxs)("div",{style:{position:"absolute",top:-10,left:12,background:"#1677ff",color:"#fff",fontSize:11,fontWeight:700,padding:"1px 8px",borderRadius:10},children:["#",l+1]}),(0,i.jsx)(p.Ay,{danger:!0,size:"small",icon:(0,i.jsx)(N.A,{}),onClick:()=>s(e.name),style:{position:"absolute",top:8,right:8,zIndex:1}}),(0,i.jsxs)(g.A,{gutter:[16,8],align:"middle",style:{marginTop:4},children:[(0,i.jsxs)(j.A,{flex:"auto",children:[(0,i.jsx)(o.A.Item,{name:[e.name,"roleId"],label:"文件角色",rules:[{required:!0}],style:{marginBottom:0},children:(0,i.jsx)(h.A,{placeholder:"选择文件角色",size:"small",options:eu.map(e=>{var l;return{label:"".concat(e.name," (").concat(r(Q[null!=(l=e.processingType)?l:""]||"roles.reference"),")"),value:e.id}})})}),(0,i.jsx)(o.A.Item,{noStyle:!0,shouldUpdate:!0,children:l=>{let{getFieldValue:r}=l;return ek(eI(r(["fileRoles",e.name,"roleId"])))}})]}),(0,i.jsx)(j.A,{style:{width:90},children:(0,i.jsx)(o.A.Item,{name:[e.name,"order"],label:"排序",initialValue:l,style:{marginBottom:0},children:(0,i.jsx)(y.A,{type:"number",size:"small"})})})]})]},e.key)),(0,i.jsx)(p.Ay,{icon:(0,i.jsx)(W.A,{}),onClick:()=>t({order:e.length}),children:r("roles.addRole")})]})}})},{key:"prompt",label:"提示词角色 (".concat(t.length,"/").concat(ef.length,")"),children:(0,i.jsx)(o.A.List,{name:"promptRoles",children:(e,l)=>{let{add:n,remove:s}=l;return(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,i.jsx)(d.A,{size:"small",title:"已选提示词角色",style:{background:"var(--colorFillQuaternary)"},children:eR(t,"prompt")}),0===e.length&&(0,i.jsx)(c.A,{description:"暂未添加提示词角色"}),e.map((e,l)=>(0,i.jsxs)(d.A,{size:"small",style:{border:"1px solid var(--colorBorderSecondary)",position:"relative"},children:[(0,i.jsxs)("div",{style:{position:"absolute",top:-10,left:12,background:"#722ed1",color:"#fff",fontSize:11,fontWeight:700,padding:"1px 8px",borderRadius:10},children:["#",l+1]}),(0,i.jsx)(p.Ay,{danger:!0,size:"small",icon:(0,i.jsx)(N.A,{}),onClick:()=>s(e.name),style:{position:"absolute",top:8,right:8,zIndex:1}}),(0,i.jsxs)(g.A,{gutter:[16,8],align:"middle",style:{marginTop:4},children:[(0,i.jsxs)(j.A,{flex:"auto",children:[(0,i.jsx)(o.A.Item,{name:[e.name,"roleId"],label:"提示词角色",rules:[{required:!0}],style:{marginBottom:0},children:(0,i.jsx)(h.A,{placeholder:"选择提示词角色",size:"small",options:ef.map(e=>{var l;return{label:"".concat(e.name," (").concat(r(J[null!=(l=e.executionType)?l:""]||"roles.reference"),")"),value:e.id}})})}),(0,i.jsx)(o.A.Item,{noStyle:!0,shouldUpdate:!0,children:l=>{let{getFieldValue:r}=l;return ek(eI(r(["promptRoles",e.name,"roleId"])))}})]}),(0,i.jsx)(j.A,{style:{width:90},children:(0,i.jsx)(o.A.Item,{name:[e.name,"order"],label:"排序",initialValue:l,style:{marginBottom:0},children:(0,i.jsx)(y.A,{type:"number",size:"small"})})})]})]},e.key)),(0,i.jsx)(p.Ay,{icon:(0,i.jsx)(W.A,{}),onClick:()=>n({order:e.length}),children:r("roles.addRole")})]})}})}]})}})]})})]})}}},e=>{e.O(0,[433,787,576,195,455,496,636,593,792],()=>e(e.s=23507)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[298],{16403:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/documents",function(){return r(19562)}])},19562:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ec});var l=r(65321),n=r(97109),s=r(7576),a=r(35292),i=r(33442),o=r(11702),c=r(17807),d=r(63455),u=r(88762),p=r(85114),h=r(68787),m=r(84253),g=r(38332),x=r(26171),f=r(34052),j=r(42700),y=r(58569),v=r(2256),w=r(38770),A=r(76506),S=r(57271),b=r(49604),k=r(23216),I=r(16285),C=r(26619),T=r(8263),z=r(8579),B=r(75548),E=r(7851),M=r(84742),R=r(29071),_=r(63552),D=r(26631),F=r(29606),P=r(83914),L=r(58209),W=r(54746),G=r(71330),N=r(64068),O=r(93051),H=r(38762),q=r(64629),K=r(67547),V=r(76830),U=r(1310),X=r(6578),Q=r(79059);let{TextArea:J}=s.A,{Text:Y}=a.A;function Z(e){let{type:t="info",title:r,children:n,style:s}=e,a="error"===t?"var(--colorError)":"warning"===t?"var(--colorWarning)":"success"===t?"var(--colorSuccess)":"var(--colorInfo)";return(0,l.jsxs)("div",{style:{border:"1px solid ".concat(a),background:"error"===t?"var(--colorErrorBg)":"warning"===t?"var(--colorWarningBg)":"success"===t?"var(--colorSuccessBg)":"var(--colorInfoBg)",borderRadius:8,padding:"9px 12px",...s},children:[(0,l.jsx)(Y,{strong:!0,style:{color:a},children:r}),n&&(0,l.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:n})]})}function $(e){let{children:t,gap:r=12,style:n}=e;return(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:r,...n},children:t})}let ee=null;function et(){null==ee||ee.listeners.forEach(e=>e())}let er={role_binding:(0,l.jsx)(k.A,{}),context_recall:(0,l.jsx)(I.A,{}),knowledge_retrieval:(0,l.jsx)(C.A,{}),file_understanding:(0,l.jsx)(T.A,{}),fact_extraction:(0,l.jsx)(I.A,{}),chapter_generation:(0,l.jsx)(z.A,{}),asset_generation:(0,l.jsx)(B.A,{}),validation:(0,l.jsx)(E.A,{}),formatting:(0,l.jsx)(M.A,{}),llm_review:(0,l.jsx)(R.A,{}),export_ready:(0,l.jsx)(_.A,{}),reference:(0,l.jsx)(B.A,{})},el={施工组织设计:(0,l.jsx)(E.A,{}),投标文件:(0,l.jsx)(_.A,{}),技术方案:(0,l.jsx)(I.A,{}),报告:(0,l.jsx)(D.A,{}),自定义:(0,l.jsx)(z.A,{})};function en(e){return[...new Set(e.map(e=>e.trim()).filter(Boolean))]}function es(e){return e?e.split(/[\\/]/u).pop()||e:""}function ea(e){let t=[],r=e=>{for(let l of e)l.isFolder?l.children&&r(l.children):t.push(l.key)};return r(e),t}let ei={role_binding:"角色配置绑定",context_recall:"上下文召回",knowledge_retrieval:"知识库检索",file_understanding:"多模态文件理解",fact_extraction:"LLM 事实抽取",chapter_generation:"LLM 章节生成",asset_generation:"多模态资源生成",validation:"规则校验",formatting:"格式化排版",llm_review:"LLM 审查优化",export_ready:"导出就绪",reference:"参考资源处理"},eo={"knowledge-base":"知识库","document-readiness":"生成准备度检查","quality-repair":"质量补写","export-gate":"导出门禁","context-memory":"项目上下文","final-format":"正式排版","multimodal-files":"多模态文件理解",tender_announcement:"招标公告"};function ec(){var e,t,r,a,B;let ec=(0,Q.Vr)(),{message:ed}=c.A.useApp(),[eu]=d.A.useForm(),ep=(0,n.useRef)(null),[eh,em]=(0,n.useState)([]),[eg,ex]=(0,n.useState)("construction-organization-design"),[ef,ej]=(0,n.useState)([]),[ey,ev]=(0,n.useState)([]),[ew,eA]=(0,n.useState)([]),[eS,eb]=(0,n.useState)([]),[ek,eI]=(0,n.useState)(!1),[eC,eT]=(0,n.useState)(""),[ez,eB]=(0,n.useState)([]),[eE,eM]=(0,n.useState)(!0),[eR,e_]=(0,n.useState)(!1),[eD,eF]=(0,n.useState)(null),[eP,eL]=(0,n.useState)(""),[eW,eG]=(0,n.useState)([]),[eN,eO]=(0,n.useState)(null),[eH,eq]=(0,n.useState)(null),[eK,eV]=(0,n.useState)(""),[eU,eX]=(0,n.useState)(!1),[eQ,eJ]=(0,n.useState)("idle"),[eY,eZ]=(0,n.useState)(null),[e$,e0]=(0,n.useState)(null),[e1,e2]=(0,n.useState)({start:0,end:0}),[e6,e8]=(0,n.useState)([]),[e3,e4]=(0,n.useState)(!1),[e5,e7]=(0,n.useState)(!1),[e9,te]=(0,n.useState)({}),tt=ef.filter(e=>"file"===e.type).map(e=>({label:e.name,value:e.id})),tr=d.A.useWatch("fileBindingGroups",eu)||{},tl=(0,n.useMemo)(()=>(function(e){let t={};for(let n of[...e].sort((e,t)=>e.relativePath.localeCompare(t.relativePath,"zh-CN"))){let e=n.relativePath.split("/").filter(Boolean),s="";for(let a=0;a<e.length;a++){let o=e[a],c=s;s=s?"".concat(s,"/").concat(o):o;let d=a===e.length-1;if(!t[s]){var r;t[s]={key:s,rawTitle:o,title:d?(0,l.jsx)("span",{title:n.relativePath,children:o}):(0,l.jsxs)(i.A,{size:4,children:[(0,l.jsx)(F.A,{style:{color:"#faad14"}}),(0,l.jsx)("span",{children:o})]}),isFolder:!d,fileCount:+!!d,...d?{}:{children:[]}},c&&(null==(r=t[c])?void 0:r.children)&&t[c].children.push(t[s])}d&&(t[s].fileCount=1)}}let n=e=>{for(let r of e){var t;(null==(t=r.children)?void 0:t.length)&&(n(r.children),r.fileCount=r.children.reduce((e,t)=>e+t.fileCount,0),r.title=(0,l.jsxs)(i.A,{size:4,children:[(0,l.jsx)(F.A,{style:{color:"#faad14"}}),(0,l.jsx)("span",{children:r.rawTitle}),(0,l.jsx)(o.A,{style:{margin:0},children:r.fileCount})]}))}},s=Object.values(t).filter(e=>!e.key.includes("/"));return n(s),s.filter(e=>!e.isFolder||e.fileCount>0)})(eS),[eS]),tn=(0,n.useMemo)(()=>(function e(t,r){let l=r.trim().toLowerCase();return l?t.flatMap(t=>{let r=t.children?e(t.children,l):void 0;return t.key.toLowerCase().includes(l)||t.rawTitle.toLowerCase().includes(l)||(null==r?void 0:r.length)?[{...t,children:r}]:[]}):t})(tl,eC),[tl,eC]),ts=(0,n.useMemo)(()=>ea(tl),[tl]),ta=(0,n.useMemo)(()=>{var e,t,r;return(null==(e=ew.find(e=>e.selected))?void 0:e.projectRoot)||(null==(t=ew.find(e=>e.isCurrent))?void 0:t.projectRoot)||(null==(r=ew[0])?void 0:r.projectRoot)||""},[ew]),ti=(0,n.useMemo)(()=>{let e=[],t=r=>{for(let l of r)e.push(l.key),l.children&&t(l.children)};return t(tl),e},[tl]),[to,tc]=(0,n.useState)([]),[td,tu]=(0,n.useState)(null),[tp,th]=(0,n.useState)(null),[tm,tg]=(0,n.useState)("templates"),[tx,tf]=(0,n.useState)(!1),[tj,ty]=(0,n.useState)("workflow"),tv=(0,n.useRef)(null),tw=(0,n.useRef)(null),tA=(0,n.useRef)(0),tS=(0,n.useMemo)(()=>"activeGenDocId:".concat(ta||"default"),[ta]),tb=async()=>{try{eG((await (0,X.cQ)(ta||void 0)).documents)}catch(e){eG([])}};(0,n.useEffect)(()=>{let e=()=>{ee&&(tc(ee.flowSteps),tu(ee.activeFlowKey),e_(ee.loading),ee.documentId&&eO(ee.documentId),ee.draft&&eF(ee.draft),void 0!==ee.content&&eL(ee.content))},t=ee;return null==t||t.listeners.add(e),e(),()=>{null==t||t.listeners.delete(e)}},[]),(0,n.useEffect)(()=>{eM(!0),Promise.all([(0,X.Dl)().then(e=>{var t,r;em(e.templates),ex(null!=(r=null==(t=e.templates[0])?void 0:t.id)?r:"construction-organization-design")}),(0,X.lv)().then(e=>{ej(e.roles),ev(e.configs)}),(0,X.dx)().then(e=>eA(e))]).catch(()=>ed.error(ec("common.error"))).finally(()=>eM(!1))},[ed,ec]),(0,n.useEffect)(()=>{ta&&(localStorage.removeItem("activeGenDocId"),tb())},[ta]),(0,n.useEffect)(()=>{if(0===eW.length)return;let e=localStorage.getItem(tS);if(!e)return;if(!eW.find(t=>t.id===e&&"generating"===t.status))return void localStorage.removeItem(tS);let t=setInterval(()=>{(async()=>{try{let{document:r}=await (0,X.v7)(e,!1,ta||void 0);await tb(),"generating"!==r.status&&(localStorage.removeItem(tS),clearInterval(t))}catch(e){clearInterval(t)}})()},3e3);return()=>clearInterval(t)},[eW]);let tk=(0,n.useMemo)(()=>eh.find(e=>e.id===eg),[eh,eg]),tI=ey.map(e=>({label:e.name,value:e.id})),tC=Math.max(0,to.findIndex(e=>e.key===td)),tT=e=>{var t;return e?(null==(t=ef.find(t=>t.id===e))?void 0:t.name)||eo[e]||"未知角色":""},tz=e=>e.subtitle||e.roleName||tT(e.roleId)||ei[e.type]||e.type,tB=e=>{var t,r,l;return e.promptName||((t=e.promptId)?(null==(r=ew.find(e=>e.id===t))?void 0:r.projectName)||(null==(l=ef.find(e=>e.id===t))?void 0:l.name)||eo[t]||"未知提示词":"")},tE=()=>{tA.current+=1,eV(""),eZ(null),e0(null),e8([]),e4(!1),eX(!1),eJ("idle")},tM=e=>{ex(e),eO(null),eF(null),eL(""),tE(),ty("workflow"),tf(!0),tg("drafts")},tR=async e=>{eO(e.id),ex(e.templateId);let t=t_(e.status);if(t||"failed"===e.status||"aborted"===e.status){tE(),th(e),eF(null),eL(""),e_(t),ty("workflow"),tf(!0);try{let{document:t}=await (0,X.v7)(e.id,!1,e.projectRoot||ta||void 0);tP(t),t_(t.status)?tL(t.id,t.projectRoot||e.projectRoot||ta||void 0):await tb()}catch(t){tP(e)}return}ty("editor"),tc([]),tu(null),tE();try{let{document:t}=await (0,X.v7)(e.id,!1,e.projectRoot||ta||void 0);eF(t.draft||null),eL(t.editedMarkdown||t.markdown)}catch(e){ed.error(ec("common.error"))}tf(!0)},t_=e=>"completed"!==e&&"warning"!==e&&"failed"!==e&&"aborted"!==e,tD=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eR;(null==ee?void 0:ee.loading)&&(ee.flowSteps=e,ee.activeFlowKey=t,ee.loading=r,et())},tF=e=>{var t,r,n,s,a;let i=e.executionStages||(null==(t=e.draft)?void 0:t.executionStages)||[];if(i.length>0){let t=i.map((t,r)=>{var n;let s,a=("failed"===e.status||"aborted"===e.status)&&"running"===t.status||"failed"===(s=t.status)?"error":"running"===s?"process":"fallback"===s?"warning":"finish";return{key:"".concat(t.type,"-").concat(r),title:t.title||ei[t.type]||t.type,subtitle:tz(t),description:t.message||"",status:a,icon:"role_binding"===(n=t.type)?(0,l.jsx)(k.A,{}):"knowledge_retrieval"===n?(0,l.jsx)(C.A,{}):"context_recall"===n?(0,l.jsx)(I.A,{}):"file_understanding"===n?(0,l.jsx)(T.A,{}):"fact_extraction"===n?(0,l.jsx)(I.A,{}):"chapter_generation"===n?(0,l.jsx)(z.A,{}):"llm_review"===n?(0,l.jsx)(R.A,{}):"validation"===n?(0,l.jsx)(E.A,{}):"formatting"===n?(0,l.jsx)(M.A,{}):"export_ready"===n?(0,l.jsx)(_.A,{}):(0,l.jsx)(D.A,{}),subSteps:((e,t,r)=>{let l=Array.isArray(e.details)?e.details.filter(Boolean):[],n=e.progress?"".concat(e.progress.label||"进度",":").concat(e.progress.current,"/").concat(e.progress.total):"",s=[...n?[n]:[],...l];return 0===s.length?[{key:"stage-".concat(r),title:tB(e)?"提示词:".concat(tB(e)):tz(e),status:t}]:s.slice(0,8).map((e,l)=>({key:"stage-".concat(r,"-").concat(l),title:e,status:"process"===t&&0===l?"process":"error"===t&&0===l?"error":"warning"===t?"warning":"process"===t?"finish":t}))})(t,a,r)}});"generating"===e.status&&t.length>0&&(null==(r=t.at(-1))?void 0:r.status)==="finish"&&(t[t.length-1]={...t[t.length-1],status:"process"});let o="generating"===e.status?(null==(n=t.at(-1))?void 0:n.key)||"prepare":"failed"===e.status||"aborted"===e.status?(null==(s=t.find(e=>"error"===e.status))?void 0:s.key)||(null==(a=t.at(-1))?void 0:a.key)||"prepare":"done";return{steps:t,activeKey:o}}return{steps:[],activeKey:null}},tP=e=>{th(e);let{steps:t,activeKey:r}=tF(e);tc(t),tu(r),e_(t_(e.status)),tD(t,r,t_(e.status)),("failed"===e.status||"aborted"===e.status)&&ty("workflow"),("completed"===e.status||"warning"===e.status)&&e.draft&&(eF(e.draft),eL(e.editedMarkdown||e.markdown),ty("editor"),tc([]),tu(null))},tL=(e,t)=>{tv.current&&clearInterval(tv.current),tv.current=setInterval(()=>{(async()=>{try{let{document:r}=await (0,X.v7)(e,!0,t||ta||void 0);tP(r),await tb(),t_(r.status)||(tv.current&&clearInterval(tv.current),tv.current=null,localStorage.removeItem(tS))}catch(e){}})()},2e3)};(0,n.useEffect)(()=>()=>{tv.current&&(clearInterval(tv.current),tv.current=null),tw.current&&(clearTimeout(tw.current),tw.current=null)},[]),(0,n.useEffect)(()=>{if(!eR||!td)return;let e=window.setInterval(()=>tc(e=>{let t=e.map(e=>{if(e.key!==td||"process"!==e.status)return e;let t=e.subSteps.findIndex(e=>"process"===e.status),r=t<0?0:Math.min(t+1,e.subSteps.length-1);return{...e,subSteps:e.subSteps.map((e,t)=>t<r?{...e,status:"finish"}:t===r?{...e,status:"process"}:{...e,status:"wait"})}});return tD(t,td),t}),1400);return()=>window.clearInterval(e)},[td,eR]);let tW=async()=>{eI(!0);try{let e=await (0,X.HT)({limit:5e3,projectRoot:ta||void 0});eb(e.files)}catch(e){ed.error("知识库文件加载失败")}finally{eI(!1)}},tG=e=>{let t=null!=e?e:{id:"tpl-".concat(Date.now()),name:"",description:"",category:"自定义",outputTitle:"",projectRoleConfigId:void 0,chapters:[],fileBindings:[]};eu.resetFields(),eu.setFieldsValue({...t,fileBindingGroups:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce((e,t)=>(t.roleId&&t.filePath&&(e[t.roleId]=en([...e[t.roleId]||[],t.filePath])),e),{})}(t.fileBindings)}),eT(""),tW(),e7(!0)},tN=(e,t)=>{let r=eu.getFieldValue("fileBindingGroups")||{};eu.setFieldValue("fileBindingGroups",{...r,[e]:en(t)})},tO=async()=>{try{await eu.validateFields();let e=eu.getFieldsValue(!0),t=e.fileBindingGroups||{},r=Object.entries(t).flatMap(e=>{let[t,r]=e;return en(r||[]).map(e=>({roleId:t,filePath:e}))}),{fileBindingGroups:l,...n}=e,s={...n,chapters:[],fileBindings:r},a=await (0,X.l2)(s);em(a.templates),ex(a.template.id),e7(!1),await tb(),ed.success(ec("common.success"))}catch(e){e instanceof Error&&ed.error(e.message)}},tH=async e=>{try{let t=await (0,X.bV)(e);em(t.templates),ex(t.template.id),ed.success(ec("common.success"))}catch(e){ed.error(ec("common.error"))}},tq=async e=>{try{var t,r;let l=await (0,X.h0)(e);em(l.templates),ex(null!=(r=null==(t=l.templates[0])?void 0:t.id)?r:""),ed.success(ec("common.success"))}catch(e){ed.error(ec("common.error"))}},tK=async e=>{try{let{validation:t}=await (0,X.SM)(e,ta||void 0);te(r=>({...r,[e]:t}));let r=t.issues.filter(e=>"error"===e.level);if(ex(e),r.length>0)return void ed.warning("模板运行前检查未通过,请先处理阻断项");if(t.issues.length>0)return void ed.warning("模板存在警告,可在检查面板确认后继续运行");tM(e)}catch(e){ed.error(e instanceof Error?e.message:"模板运行前检查失败")}},tV=async e=>{try{await (0,X.QG)(e.id,e.projectRoot||ta||void 0),eN===e.id&&(eO(null),eF(null),eL("")),await tb(),ed.success(ec("common.success"))}catch(e){ed.error(ec("common.error"))}},tU=async(e,t)=>{let r=Date.now(),l=0,n=Date.now();for(;;){let s;if(null==t?void 0:t.aborted)throw Error("用户中止");let a=new AbortController;t&&(t.pollController=a);try{({document:s}=await (0,X.v7)(e,!0,ta||void 0,a.signal))}finally{(null==t?void 0:t.pollController)===a&&(t.pollController=void 0)}if(tP(s),s.updatedAt!==l&&(l=s.updatedAt,n=Date.now()),("completed"===s.status||"warning"===s.status)&&s.draft)return s;if("failed"===s.status||"aborted"===s.status)throw Error(s.error||("aborted"===s.status?"生成已中止":"生成失败"));if(Date.now()-r>75e5||Date.now()-n>96e4)throw Error("生成任务疑似卡住,请点击继续生成或重新生成");await new Promise(e=>window.setTimeout(e,1500))}},tX=async()=>{if(!eg)return;if((null==ee?void 0:ee.aborted)&&(ee=null),null==ee?void 0:ee.loading){tc(ee.flowSteps),tu(ee.activeFlowKey),e_(!0);return}if(!ta)return void ed.error("未识别当前项目,请先选择或打开项目后再生成文件");e_(!0);let e=(0,X.OX)({templateId:eg,projectRoot:ta});ee={id:Date.now(),templateId:eg,loading:!0,flowSteps:[],activeFlowKey:null,promise:e,listeners:new Set},tc([]),tu(null);let t=[];try{let r=await e;r.documentId&&(localStorage.setItem(tS,r.documentId),eO(r.documentId),(null==ee?void 0:ee.promise)===e&&(ee.documentId=r.documentId)),await tb();let l=r.documentId?await tU(r.documentId,(null==ee?void 0:ee.promise)===e?ee:void 0):void 0,n=r.draft||(null==l?void 0:l.draft);if(!n)throw Error("生成结果为空");(r.documentId||(null==l?void 0:l.id))&&eO(r.documentId||l.id),t.forEach(e=>window.clearTimeout(e)),eF(n),eL((null==l?void 0:l.editedMarkdown)||(null==l?void 0:l.markdown)||n.markdown),(null==ee?void 0:ee.promise)===e&&(ee.draft=n,ee.content=(null==l?void 0:l.editedMarkdown)||(null==l?void 0:l.markdown)||n.markdown);let s=l||{id:r.documentId||"draft-".concat(Date.now()),templateId:eg,title:n.title,requirement:n.requirement,projectRoot:n.projectRoot||ta,projectId:n.projectId,markdown:n.markdown,status:n.validationIssues.some(e=>"error"===e.level||"warning"===e.level)||!n.exportGate.passed?"warning":"completed",draft:n,executionStages:n.executionStages,assets:n.assets||[],createdAt:n.generatedAt,updatedAt:Date.now()},{steps:a}=tF(s);tc(a),tD(a,"done",!1),tu("done"),(null==ee?void 0:ee.promise)===e&&(ee.activeFlowKey="done",ee.loading=!1,et(),ee=null),localStorage.removeItem(tS),await tb(),ed.success(ec("common.success")),window.setTimeout(()=>{var e;return null==(e=ep.current)?void 0:e.scrollIntoView({behavior:"smooth",block:"start"})},200)}catch(l){localStorage.removeItem(tS);let t=l instanceof Error?l.message:ec("common.error"),r=/用户中止|abort|aborted/i.test(t);r||tc(e=>{let r=e.map(e=>"process"===e.status?{...e,status:"error",description:t,subSteps:((e,t)=>{if("wait"===t)return e.subSteps.map(e=>({...e,status:"wait"}));if("finish"===t)return e.subSteps.map(e=>({...e,status:"finish"}));if("error"===t)return e.subSteps.map((e,t)=>({...e,status:0===t?"error":e.status}));let r=e.subSteps.findIndex(e=>"wait"===e.status);return e.subSteps.map((e,t)=>t<r||-1===r?{...e,status:"finish"}:t===r?{...e,status:"process"}:e)})(e,"error")}:e);return tD(r,td,!1),r}),(null==ee?void 0:ee.promise)===e&&(ee.loading=!1,ee.error=t,et(),ee=null),await tb().catch(()=>void 0),r||ed.error(t)}finally{t.forEach(e=>window.clearTimeout(e)),e_(!1),(null==ee?void 0:ee.promise)===e&&(ee.loading=!1,et())}},tQ=(0,n.useRef)(!1);(0,n.useEffect)(()=>(tw.current&&(clearTimeout(tw.current),tw.current=null),!tx||"workflow"!==tj||eN||tQ.current||(null==ee?void 0:ee.loading)||null==tk||!tk.projectRoleConfigId||(tQ.current=!0,tw.current=setTimeout(()=>{tw.current=null,tx&&"workflow"===tj&&!eN&&eg==eg&&tX()},300)),tx||(tQ.current=!1),()=>{tw.current&&(clearTimeout(tw.current),tw.current=null)}),[tx,tj,eN,tk,eg]);let tJ=async e=>{try{eO(e.id),ex(e.templateId),ty("workflow"),tf(!0),e_(!0);let t=await (0,X.UQ)(e.id,e.projectRoot||ta||void 0);localStorage.setItem(tS,t.documentId),await tb();let r=await tU(t.documentId);r.draft&&(eF(r.draft),eL(r.editedMarkdown||r.markdown||r.draft.markdown),ty("editor")),localStorage.removeItem(tS),await tb(),ed.success("已继续生成并完成")}catch(e){ed.error(e instanceof Error?e.message:"继续生成失败")}finally{e_(!1)}},tY=async e=>{if((null==ee?void 0:ee.loading)&&ee.documentId===e.id){var t;ee.aborted=!0,null==(t=ee.pollController)||t.abort(),ee.loading=!1,ee.error="用户中止",et(),ee=null,e_(!1)}localStorage.removeItem(tS),tv.current&&(clearInterval(tv.current),tv.current=null);try{await (0,X.r)(e.id,e.projectRoot||ta||void 0),ed.success("已中止生成任务")}catch(e){ed.info("任务已不在运行,已刷新状态")}finally{await tb(),eN===e.id&&(eO(null),th(null),eF(null),eL(""))}},tZ=async e=>{if(eD){eq(e);try{eD.exportGate.passed||ed.warning("导出门禁存在风险项,已允许导出,请下载后人工复核。");let t={documentId:eN||void 0,title:eD.title,markdown:eP,format:e,enforceGate:!1,exportGate:eD.exportGate,useClientMarkdown:!0},r=await (0,X.UE)(t);((e,t,r)=>{let l=new Blob([e],{type:r}),n=URL.createObjectURL(l),s=document.createElement("a");s.href=n,s.download=t,s.target="_self",s.rel="noopener",s.style.display="none",document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),s.remove(),window.setTimeout(()=>URL.revokeObjectURL(n),1e3)})(r,"".concat(eD.title,".").concat("markdown"===e?"md":e),{markdown:"text/markdown;charset=utf-8",html:"text/html;charset=utf-8",pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}[e])}catch(e){ed.error(e instanceof Error?e.message:ec("common.error"))}finally{eq(null)}}},t$=async()=>{if(eD)try{if(eN)await (0,X.a6)(eN,{editedMarkdown:eP,markdown:eP},eD.projectRoot||ta||void 0);else{let e=await (0,X.Af)({...eD,markdown:eP});eF(e.draft)}await tb(),ed.success(ec("common.success"))}catch(e){ed.error(ec("common.error"))}},t0=(e,t)=>{e8(r=>[{id:"".concat(Date.now()),content:e,prompt:t,createdAt:Date.now()},...r].slice(0,12))},t1=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&eV(""),eZ(null),e0(null),e2({start:0,end:0})},t2=(e,t)=>{var r,l;return{title:(null==eD?void 0:eD.title)||"未命名文档",markdown:t,instruction:e,facts:null==eD||null==(r=eD.structuredFacts)?void 0:r.map(e=>"".concat(e.key,": ").concat(e.value)),chapters:null==eD||null==(l=eD.chapters)?void 0:l.map(e=>e.title),...(()=>{let e=e1.start,t=e1.end;return t>e?{selection:{start:e,end:t,text:eP.slice(e,t)},cursorOffset:e}:{cursorOffset:e}})()}},t6=async()=>{let e=eK.trim();if(!eD||!e||eU)return;let t=tA.current+1;tA.current=t,eX(!0),eJ("planning"),e0(null);try{let r=await (0,X.Gi)({mode:"plan",...t2(e,eP)});if(tA.current!==t||eN!=eN)return;if(!r.plan)throw Error("AI 未返回修改计划");eZ(r.plan)}catch(e){tA.current===t&&ed.error(e instanceof Error?e.message:ec("common.error"))}finally{tA.current===t&&(eX(!1),eJ("idle"))}},t8=async e=>{let t=eK.trim();if(!eD||!t||eU)return;let r=tA.current+1;tA.current=r,eX(!0),eJ("applying");try{let l=await (0,X.Gi)({mode:"apply",...t2(t,eP),plan:e});if(tA.current!==r||eN!=eN)return;if(!l.markdown)throw Error("AI 未返回修改结果");e0({plan:l.plan||e,markdown:l.markdown,beforeSnippet:l.beforeSnippet,afterSnippet:l.afterSnippet,summary:l.summary,changedChars:l.changedChars,prompt:t,before:eP})}catch(e){tA.current===r&&ed.error(e instanceof Error?e.message:ec("common.error"))}finally{tA.current===r&&(eX(!1),eJ("idle"))}};if(eE)return(0,l.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,l.jsx)(u.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,l.jsx)(u.A,{active:!0,paragraph:{rows:2}}),(0,l.jsx)(u.A,{active:!0,paragraph:{rows:8}})]});let t3="workflow"===tj?"工作流:".concat((null==tk?void 0:tk.name)||"选择模板"):"编辑:".concat((null==eD?void 0:eD.title)||(null==tk?void 0:tk.outputTitle)||"文档");return(0,l.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"pageTitle",children:ec("documents.title")}),(0,l.jsx)("p",{className:"pageDesc",children:ec("documents.description")})]}),(0,l.jsx)(p.Ay,{type:"primary",icon:(0,l.jsx)(W.A,{}),onClick:()=>tG(),children:ec("documents.newTemplate")})]}),(0,l.jsx)(h.A,{size:"small",tabList:[{key:"templates",label:"模板库 (".concat(eh.length,")")},{key:"drafts",label:"生成记录 (".concat(eW.length,")")}],activeTabKey:tm,onTabChange:tg,children:"templates"===tm?0===eh.length?(0,l.jsx)(m.A,{description:ec("common.noData")}):(0,l.jsx)(g.A,{dataSource:eh,renderItem:e=>(0,l.jsx)(g.A.Item,{style:{cursor:"pointer",padding:"10px 0"},actions:[(0,l.jsx)(p.Ay,{size:"small",icon:(0,l.jsx)(G.A,{}),onClick:t=>{t.stopPropagation(),tG(e)},children:"配置"},"cfg"),(0,l.jsx)(p.Ay,{size:"small",type:"primary",icon:(0,l.jsx)(N.A,{}),onClick:t=>{t.stopPropagation(),tK(e.id)},children:"运行"},"run"),(0,l.jsx)(p.Ay,{size:"small",icon:(0,l.jsx)(O.A,{}),onClick:t=>{t.stopPropagation(),tH(e.id)}},"copy"),(0,l.jsx)(x.A,{title:ec("documents.deleteTemplateConfirm"),onConfirm:t=>{null==t||t.stopPropagation(),tq(e.id)},children:(0,l.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,l.jsx)(L.A,{}),onClick:e=>e.stopPropagation()})},"del")],onClick:()=>ex(e.id),children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,minWidth:0,flex:1},children:[function(e,t){let r=el[e]||(0,l.jsx)(D.A,{});return(0,l.jsx)("span",{style:{color:t?"var(--colorAccent)":"var(--colorTextSecondary)",fontSize:16,marginTop:2,flexShrink:0},children:r})}(e.category,eg===e.id),(0,l.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:2},children:[(0,l.jsx)("span",{style:{fontWeight:eg===e.id?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),eg===e.id&&(0,l.jsx)(o.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:"当前"}),(0,l.jsx)(o.A,{style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:e.category}),e9[e.id]&&(0,l.jsxs)(o.A,{color:e9[e.id].issues.some(e=>"error"===e.level)?"error":e9[e.id].issues.length?"warning":"success",style:{margin:0,fontSize:10,lineHeight:"16px",flexShrink:0},children:["检查 ",e9[e.id].fileDiagnostics.length," 文件 / ",e9[e.id].promptDiagnostics.length," 提示词"]})]}),e.description&&(0,l.jsx)(Y,{type:"secondary",style:{fontSize:12,lineHeight:"18px"},children:e.description}),e9[e.id]&&(0,l.jsx)("div",{onClick:e=>e.stopPropagation(),style:{marginTop:8,padding:10,border:"1px solid ".concat(e9[e.id].issues.some(e=>"error"===e.level)?"var(--colorErrorBorder)":e9[e.id].issues.length?"var(--colorWarningBorder)":"var(--colorSuccessBorder)"),borderRadius:10,background:e9[e.id].issues.some(e=>"error"===e.level)?"var(--colorErrorBg)":e9[e.id].issues.length?"var(--colorWarningBg)":"var(--colorSuccessBg)"},children:(0,l.jsxs)($,{gap:6,style:{width:"100%"},children:[(0,l.jsxs)(i.A,{wrap:!0,children:[(0,l.jsx)(Y,{strong:!0,children:e9[e.id].issues.some(e=>"error"===e.level)?"运行前检查未通过":e9[e.id].issues.length?"运行前检查存在警告":"运行前检查通过"}),(0,l.jsxs)(o.A,{color:"blue",children:["文件角色 ",e9[e.id].fileDiagnostics.length]}),(0,l.jsxs)(o.A,{color:"purple",children:["提示词角色 ",e9[e.id].promptDiagnostics.length]})]}),e9[e.id].issues.length>0?e9[e.id].issues.map(e=>(0,l.jsx)(Z,{type:"error"===e.level?"error":"warning",title:e.message},e.message)):(0,l.jsx)(Z,{type:"success",title:"文件角色、提示词角色和后台自动规范检查通过,可以运行。"}),!e9[e.id].issues.some(e=>"error"===e.level)&&e9[e.id].issues.length>0&&(0,l.jsx)("div",{children:(0,l.jsx)(p.Ay,{size:"small",type:"primary",icon:(0,l.jsx)(N.A,{}),onClick:()=>tM(e.id),children:"忽略警告并继续运行"})})]})})]})]})})}):0===eW.length?(0,l.jsx)(m.A,{description:ec("common.noData")}):(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:eW.slice(0,15).map((e,t)=>{var r,n,s;let a,c;return(0,l.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:10,padding:"10px 12px",border:"1px solid var(--colorBorderSecondary)",borderRadius:10,cursor:"pointer",background:eN===e.id?"var(--colorFillAlter)":void 0,minWidth:0},onClick:()=>{tR(e)},children:["completed"===e.status?(0,l.jsx)(M.A,{style:{fontSize:18,color:"var(--colorOk)",flexShrink:0,marginTop:2}}):"failed"===e.status||"aborted"===e.status?(0,l.jsx)(H.A,{style:{fontSize:18,color:"var(--colorDanger)",flexShrink:0,marginTop:2}}):"warning"===e.status?(0,l.jsx)(E.A,{style:{fontSize:18,color:"var(--colorWarning)",flexShrink:0,marginTop:2}}):(0,l.jsx)(q.A,{spin:!0,style:{fontSize:18,color:"#1677ff",flexShrink:0,marginTop:2}}),(0,l.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,l.jsx)("div",{style:{fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginBottom:3},children:e.title}),(0,l.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px 10px",color:"var(--colorTextSecondary)",fontSize:11},children:[(0,l.jsx)("span",{children:new Date(e.updatedAt).toLocaleString()}),(0,l.jsxs)("span",{children:["耗时 ",(e=>{let t=Math.max(0,Math.round(((e.completedAt||e.updatedAt)-e.createdAt)/1e3));if(t<60)return"".concat(t," 秒");let r=Math.floor(t/60),l=t%60;if(r<60)return l?"".concat(r," 分 ").concat(l," 秒"):"".concat(r," 分");let n=Math.floor(r/60),s=r%60;return s?"".concat(n," 小时 ").concat(s," 分"):"".concat(n," 小时")})(e)]})]}),e.partialChapters&&e.partialChapters.length>0&&(0,l.jsxs)("div",{style:{marginTop:3,fontSize:11,color:"var(--colorTextSecondary)"},children:["已完成章节 ",e.partialChapters.filter(e=>"completed"===e.status||"cached"===e.status).length,"/",e.partialChapters.length," \xb7 ",e.partialChapters.reduce((e,t)=>e+t.chars,0).toLocaleString()," 字"]}),("warning"===e.status||"failed"===e.status||"aborted"===e.status)&&(0,l.jsx)("div",{style:{marginTop:3,color:"failed"===e.status||"aborted"===e.status?"var(--colorError)":"var(--colorWarning)",fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.error||(null==(r=e.warningIssues)?void 0:r[0])||(null==(s=e.draft)||null==(n=s.validationIssues.find(e=>"error"===e.level||"warning"===e.level))?void 0:n.message)||"需复核"})]}),(0,l.jsxs)(i.A,{size:4,align:"center",children:[(0,l.jsx)(o.A,{color:"completed"===(a=e.status)?"success":"warning"===a?"warning":"failed"===a?"error":"aborted"===a?"default":"processing",style:{margin:0,fontSize:10,lineHeight:"18px"},children:"completed"===(c=e.status)?"已完成":"warning"===c?"需复核":"failed"===c?"失败":"aborted"===c?"已中止":"生成中"}),(0,l.jsxs)(o.A,{style:{margin:0,fontSize:10,lineHeight:"18px"},children:["#",t+1]}),(0,l.jsx)(x.A,{title:"确认删除?",onConfirm:t=>{null==t||t.stopPropagation(),tV(e)},children:(0,l.jsx)(p.Ay,{size:"small",danger:!0,icon:(0,l.jsx)(L.A,{}),onClick:e=>e.stopPropagation()})}),t_(e.status)&&(0,l.jsx)(x.A,{title:"确定中止此生成任务?",onConfirm:t=>{null==t||t.stopPropagation(),tY(e)},children:(0,l.jsx)(p.Ay,{size:"small",danger:!0,onClick:e=>e.stopPropagation(),children:"中止"})}),("failed"===e.status||"aborted"===e.status)&&(0,l.jsx)(p.Ay,{size:"small",onClick:t=>{t.stopPropagation(),tJ(e)},children:"继续"}),(0,l.jsx)(p.Ay,{size:"small",type:"primary",icon:t_(e.status)?(0,l.jsx)(q.A,{spin:!0}):(0,l.jsx)(N.A,{}),onClick:t=>{t.stopPropagation(),tR(e)},children:"打开"})]})]},e.id)})})}),(0,l.jsx)(f.A,{title:t3,open:tx,onClose:()=>{tf(!1),tv.current&&(clearInterval(tv.current),tv.current=null)},size:800,mask:{closable:!1},style:{borderRadius:"12px 0 0 12px"},styles:{body:{padding:"16px 24px"},header:{borderRadius:"12px 0 0 0",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:eD?(0,l.jsxs)(i.A,{wrap:!0,children:[(0,l.jsx)(p.Ay,{icon:(0,l.jsx)(K.A,{}),disabled:eU,onClick:()=>{t$()},children:ec("documents.saveDraft")}),(0,l.jsx)(p.Ay,{icon:(0,l.jsx)(V.A,{}),disabled:eU,loading:"markdown"===eH,onClick:()=>{tZ("markdown")},children:"MD"}),(0,l.jsx)(p.Ay,{disabled:eU,loading:"html"===eH,onClick:()=>{tZ("html")},children:"HTML"}),(0,l.jsx)(p.Ay,{disabled:eU,loading:"docx"===eH,onClick:()=>{tZ("docx")},children:"DOCX"}),(0,l.jsx)(p.Ay,{type:"primary",disabled:eU,loading:"pdf"===eH,onClick:()=>{tZ("pdf")},children:"PDF"})]}):eR&&"workflow"===tj?(0,l.jsx)(p.Ay,{danger:!0,onClick:()=>{(async()=>{if(eN&&await (0,X.r)(eN,ta||void 0).catch(()=>void 0),ee){var e;ee.aborted=!0,null==(e=ee.pollController)||e.abort(),ee.loading=!1,ee.error="用户中止",et(),ee=null}localStorage.removeItem(tS),tv.current&&(clearInterval(tv.current),tv.current=null),e_(!1),tc([]),tu(null),tf(!1),await tb(),ed.info("已中止生成任务")})()},children:"中止任务"}):void 0,children:(0,l.jsxs)($,{style:{width:"100%"},gap:16,children:["workflow"===tj&&to.length>0&&(0,l.jsx)($,{gap:10,children:to.map((e,t)=>{let r;return(0,l.jsxs)("div",{style:{display:"flex",gap:10,padding:10,border:"1px solid var(--colorBorderSecondary)",borderRadius:10,background:t===tC?"var(--colorFillAlter)":"var(--colorBgContainer)"},children:[(0,l.jsx)("span",{children:"process"===e.status?(0,l.jsx)(P.A,{}):"warning"===e.status?(0,l.jsx)(E.A,{style:{color:"var(--colorWarning)"}}):e.icon}),(0,l.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,l.jsxs)(i.A,{wrap:!0,children:[(0,l.jsx)(Y,{strong:!0,children:e.title}),(0,l.jsx)(o.A,{color:"finish"===e.status?"success":"error"===e.status?"error":"warning"===e.status?"warning":"process"===e.status?"processing":"default",children:"warning"===(r=e.status)?"finish":r})]}),(0,l.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12,whiteSpace:"pre-wrap"},children:(0,l.jsxs)("div",{children:[e.subtitle&&(0,l.jsx)("div",{style:{marginBottom:4},children:(0,l.jsx)(o.A,{children:e.subtitle})}),(0,l.jsx)("div",{children:e.description}),(0,l.jsx)("div",{style:{marginTop:4},children:e.subSteps.map(e=>{var t;return(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,fontSize:12,color:"process"===e.status?"var(--colorPrimary)":"var(--colorTextSecondary)"},children:["process"===(t=e.status)?(0,l.jsx)(P.A,{}):"finish"===t?(0,l.jsx)(M.A,{}):"warning"===t?(0,l.jsx)(E.A,{style:{color:"var(--colorWarning)"}}):"error"===t?(0,l.jsx)(L.A,{}):(0,l.jsx)("span",{style:{display:"inline-block",height:6,width:6,borderRadius:"50%",background:"var(--colorTextTertiary)"}}),(0,l.jsx)("span",{children:e.title})]},e.key)})})]})})]})]},e.key)})}),"workflow"===tj&&(null==tp?void 0:tp.partialChapters)&&tp.partialChapters.length>0&&(0,l.jsx)(h.A,{size:"small",title:"章节进度",extra:(0,l.jsxs)(o.A,{color:"blue",children:[tp.partialChapters.filter(e=>"completed"===e.status||"cached"===e.status).length,"/",tp.partialChapters.length]}),children:(0,l.jsxs)($,{gap:6,style:{width:"100%"},children:[tp.partialChapters.slice(0,12).map(e=>(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:8,fontSize:12},children:[(0,l.jsx)(Y,{ellipsis:!0,style:{maxWidth:480},children:e.title}),(0,l.jsxs)(i.A,{size:6,children:[(0,l.jsx)(o.A,{color:"cached"===e.status?"purple":"failed"===e.status?"error":"success",children:"cached"===e.status?"缓存":"failed"===e.status?"失败":"完成"}),(0,l.jsxs)(Y,{type:"secondary",children:[e.chars.toLocaleString()," 字"]})]})]},e.id)),tp.partialChapters.length>12&&(0,l.jsxs)(Y,{type:"secondary",style:{fontSize:12},children:["其余 ",tp.partialChapters.length-12," 个章节将在完成后汇总展示"]})]})}),"workflow"===tj&&(null==tp||null==(e=tp.reviewMetadata)?void 0:e.diagnostics)&&(0,l.jsx)(Z,{type:"info",title:"后台自动优化",children:"策略:".concat(tp.reviewMetadata.diagnostics.strategy.mode,";LLM 调用 ").concat(tp.reviewMetadata.diagnostics.llm.calls," 次;缓存命中 ").concat(tp.reviewMetadata.diagnostics.cache.chapterHits," 章/").concat(tp.reviewMetadata.diagnostics.cache.sectionHits||0," 小节;噪声过滤 ").concat((null==(t=tp.reviewMetadata.diagnostics.evidence)?void 0:t.filteredNoise)||0," 条;质量门禁 阻断").concat((null==(r=tp.reviewMetadata.diagnostics.quality)?void 0:r.blockingCount)||0,"/重要").concat((null==(a=tp.reviewMetadata.diagnostics.quality)?void 0:a.importantCount)||0,"/轻微").concat((null==(B=tp.reviewMetadata.diagnostics.quality)?void 0:B.minorCount)||0,";自动限流调整 ").concat(tp.reviewMetadata.diagnostics.llm.limitAdjustments," 次。审查与诊断信息仅用于系统修复,不会写入正文或导出文件。")}),"workflow"===tj&&eR&&0===to.length&&(0,l.jsxs)("div",{style:{textAlign:"center",padding:40},children:[(0,l.jsx)(j.A,{}),(0,l.jsx)("div",{style:{marginTop:12,color:"var(--colorTextSecondary)"},children:"正在准备生成…"})]}),eD&&(0,l.jsx)("div",{ref:ep,children:(0,l.jsx)(y.A,{items:[{key:"edit",label:ec("documents.edit"),children:(0,l.jsxs)($,{gap:16,style:{width:"100%"},children:[(0,l.jsx)(J,{rows:28,value:eP,disabled:eU,onSelect:e=>{var t,r,l;return e2({start:null!=(t=e.currentTarget.selectionStart)?t:0,end:null!=(l=null!=(r=e.currentTarget.selectionEnd)?r:e.currentTarget.selectionStart)?l:0})},onChange:e=>{var t,r,l;eL(e.target.value),eZ(null),e0(null),e2({start:null!=(t=e.target.selectionStart)?t:0,end:null!=(l=null!=(r=e.target.selectionEnd)?r:e.target.selectionStart)?l:0})}}),(0,l.jsx)(h.A,{size:"small",style:{borderRadius:12,background:"linear-gradient(135deg, var(--colorFillAlter), var(--colorBgContainer))"},children:(0,l.jsxs)($,{gap:16,style:{width:"100%"},children:[(0,l.jsxs)(i.A,{align:"start",style:{width:"100%",justifyContent:"space-between"},children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)(i.A,{size:6,children:[(0,l.jsx)(R.A,{style:{color:"var(--colorAccent)"}}),(0,l.jsx)(Y,{strong:!0,children:"精准修改"}),(0,l.jsx)(o.A,{color:"blue",children:"AI 辅助"})]}),(0,l.jsx)("div",{style:{marginTop:4,color:"var(--colorTextSecondary)",fontSize:12},children:"针对当前编辑内容补充更具体的要求,AI 会保留文档结构并按你的提示细化修改。"})]}),(0,l.jsxs)(p.Ay,{size:"small",icon:(0,l.jsx)(U.A,{}),onClick:()=>e4(e=>!e),disabled:0===e6.length,children:["历史版本 ",e6.length>0?e6.length:""]})]}),(0,l.jsx)(Z,{type:"info",title:"系统只负责识别修改范围,不改写你的提示词;选中文字后优先只改选区,没有选区时按光标所在小节/章节定位。"}),(0,l.jsx)(J,{rows:4,value:eK,disabled:eU,onChange:e=>{eV(e.target.value),eZ(null),e0(null)},placeholder:"例如:写细一点;润色这段;第七章补充高处作业和临电安全措施;把安全检查频次改成每周一次。"}),(0,l.jsxs)(i.A,{wrap:!0,style:{width:"100%",justifyContent:"space-between"},children:[(0,l.jsx)(i.A,{wrap:!0,children:["写细一点","更专业","只润色选区","补充可执行措施"].map(e=>(0,l.jsx)(p.Ay,{size:"small",disabled:eU,onClick:()=>eV(t=>t?"".concat(t,";").concat(e):e),children:e},e))}),(0,l.jsx)(p.Ay,{type:"primary",icon:(0,l.jsx)(R.A,{}),loading:eU&&"planning"===eQ,disabled:!eK.trim()||eU,onClick:()=>{t6()},children:"识别修改范围"})]}),eY&&!e$&&(0,l.jsx)(h.A,{size:"small",style:{borderRadius:10,borderColor:"var(--colorAccent)"},children:(0,l.jsxs)($,{gap:8,style:{width:"100%"},children:[(0,l.jsxs)(i.A,{wrap:!0,children:[(0,l.jsx)(o.A,{color:"purple",children:eY.scope}),(0,l.jsx)(o.A,{color:"blue",children:eY.action}),(0,l.jsxs)(o.A,{color:eY.confidence>=.8?"green":"orange",children:["置信度 ",Math.round(100*eY.confidence),"%"]}),eY.targetTitle&&(0,l.jsx)(Y,{strong:!0,children:eY.targetTitle})]}),(0,l.jsx)(Y,{children:eY.summary}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:12},children:"将按你的原始提示词执行,不添加额外编辑任务。"}),(0,l.jsxs)(i.A,{children:[(0,l.jsx)(p.Ay,{type:"primary",loading:eU&&"applying"===eQ,onClick:()=>{t8(eY)},children:"执行并预览"}),(0,l.jsx)(p.Ay,{disabled:eU,onClick:()=>eZ(null),children:"取消"})]})]})}),e$&&(0,l.jsx)(h.A,{size:"small",style:{borderRadius:10,borderColor:"var(--colorSuccess)"},children:(0,l.jsxs)($,{gap:8,style:{width:"100%"},children:[(0,l.jsxs)(i.A,{wrap:!0,children:[(0,l.jsx)(o.A,{color:"green",children:"修改预览"}),(0,l.jsx)(Y,{children:e$.summary||e$.plan.summary}),(0,l.jsxs)(o.A,{children:[e$.changedChars&&e$.changedChars>0?"+".concat(e$.changedChars):e$.changedChars," 字符"]})]}),(0,l.jsxs)(v.A,{gutter:12,children:[(0,l.jsxs)(w.A,{span:12,children:[(0,l.jsx)(Y,{strong:!0,children:"修改前"}),(0,l.jsx)("div",{style:{marginTop:6,maxHeight:180,overflow:"auto",padding:10,borderRadius:8,background:"var(--colorFillAlter)",whiteSpace:"pre-wrap",fontSize:12},children:e$.beforeSnippet||"无片段预览"})]}),(0,l.jsxs)(w.A,{span:12,children:[(0,l.jsx)(Y,{strong:!0,children:"修改后"}),(0,l.jsx)("div",{style:{marginTop:6,maxHeight:180,overflow:"auto",padding:10,borderRadius:8,background:"var(--colorFillAlter)",whiteSpace:"pre-wrap",fontSize:12},children:e$.afterSnippet||"无片段预览"})]})]}),(0,l.jsxs)(i.A,{children:[(0,l.jsx)(p.Ay,{type:"primary",onClick:()=>{e$&&(t0(e$.before,e$.prompt),eL(e$.markdown),t1(!0),ed.success("已应用精准修改"))},children:"应用到文档"}),(0,l.jsx)(p.Ay,{onClick:()=>e0(null),children:"返回计划"}),(0,l.jsx)(p.Ay,{danger:!0,onClick:()=>{eZ(null),e0(null)},children:"放弃"})]})]})}),e3&&(0,l.jsx)("div",{style:{borderTop:"1px solid var(--colorBorderSecondary)",paddingTop:12},children:(0,l.jsx)(g.A,{size:"small",dataSource:e6,locale:{emptyText:"暂无历史版本"},renderItem:e=>(0,l.jsx)(g.A.Item,{actions:[(0,l.jsx)(p.Ay,{size:"small",disabled:eU,onClick:()=>{t0(eP,"恢复前版本"),eL(e.content),t1(!0),ed.success("已恢复历史版本")},children:"恢复"},"restore")],children:(0,l.jsx)(g.A.Item.Meta,{title:(0,l.jsxs)(i.A,{children:[(0,l.jsx)(Y,{children:new Date(e.createdAt).toLocaleString()}),(0,l.jsx)(o.A,{children:e.prompt})]}),description:(0,l.jsx)(Y,{type:"secondary",ellipsis:!0,children:e.content.replace(/\s+/gu," ").slice(0,120)})})})})})]})})]})},{key:"chapters-facts",label:"章节与事实",children:(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[eD.chapters.length>0&&(0,l.jsxs)("div",{children:[(0,l.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["章节 (",eD.chapters.length,")"]}),(0,l.jsx)(g.A,{size:"small",dataSource:eD.chapters,renderItem:e=>(0,l.jsx)(g.A.Item,{children:(0,l.jsx)(g.A.Item.Meta,{title:e.title,description:"证据: ".concat(e.evidence.length," \xb7 缺失: ").concat(e.missingFacts.length)})})})]}),eD.structuredFacts.length>0&&(0,l.jsxs)("div",{children:[(0,l.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["结构化事实 (",eD.structuredFacts.length,")"]}),(0,l.jsx)(A.A,{size:"small",column:1,bordered:!0,children:eD.structuredFacts.map((e,t)=>(0,l.jsxs)(A.A.Item,{label:e.key,children:[(0,l.jsx)("span",{children:e.value}),(0,l.jsx)(o.A,{style:{marginLeft:8},children:e.confidence.toFixed(2)}),(0,l.jsx)(Y,{type:"secondary",style:{fontSize:11,marginLeft:8},children:e.sourceFile})]},t))})]})]})},{key:"sources-missing",label:"来源与缺失",children:(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["引用来源 (",eD.sources.length,")"]}),0===eD.sources.length?(0,l.jsx)(m.A,{description:"暂无"}):(0,l.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:eD.sources.map(e=>(0,l.jsxs)(o.A,{color:"blue",children:[e.filePath," (",e.count,")"]},e.filePath))})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:["缺失项 (",eD.missingItems.length,")"]}),0===eD.missingItems.length?(0,l.jsx)(m.A,{description:"无缺失"}):(0,l.jsx)(g.A,{size:"small",dataSource:eD.missingItems,renderItem:e=>(0,l.jsx)(g.A.Item,{children:e})})]})]})},{key:"validation",label:"校验 (".concat(eD.validationIssues.length,")"),children:0===eD.validationIssues.length?(0,l.jsx)(m.A,{description:"校验通过"}):(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[eD.validationIssues.map(e=>(0,l.jsxs)("div",{style:{border:"1px solid var(--colorBorderSecondary)",borderRadius:8,padding:12},children:[(0,l.jsx)(o.A,{color:"error"===e.level?"error":"warning"===e.level?"warning":"blue",children:e.level}),(0,l.jsx)("div",{style:{marginTop:6,whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all",lineHeight:1.6},children:e.message}),e.suggestion&&(0,l.jsx)("div",{style:{marginTop:6,color:"var(--colorTextSecondary)",whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-all"},children:e.suggestion})]},"".concat(e.level,"-").concat(e.message))),eD.exportGate.checklist.length>0&&(0,l.jsxs)("div",{style:{marginTop:8},children:[(0,l.jsx)(Y,{strong:!0,style:{fontSize:13,marginBottom:8,display:"block"},children:"导出门禁"}),(0,l.jsx)(g.A,{size:"small",dataSource:eD.exportGate.checklist,renderItem:e=>(0,l.jsxs)(g.A.Item,{children:[(0,l.jsx)(Y,{style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:e.label}),(0,l.jsx)(o.A,{color:e.passed?"success":"error",children:e.passed?"PASS":"FAIL"})]})})]})]})},{key:"stages",label:"执行阶段 (".concat(eD.executionStages.length,")"),children:(0,l.jsx)(g.A,{size:"small",dataSource:eD.executionStages,renderItem:e=>(0,l.jsxs)(g.A.Item,{children:[(0,l.jsx)(g.A.Item.Meta,{avatar:er[e.type]||(0,l.jsx)(D.A,{}),title:(0,l.jsx)(Y,{title:e.roleId,style:{overflowWrap:"anywhere",wordBreak:"break-word"},children:"".concat(ei[e.type]||e.type," \xb7 ").concat(e.roleName||tT(e.roleId))}),description:(0,l.jsx)(Y,{type:"secondary",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",wordBreak:"break-word"},children:e.message})}),(0,l.jsx)(o.A,{color:"success"===e.status?"success":"failed"===e.status?"error":"skipped"===e.status?"default":"warning",children:e.status})]})})}]})})]})}),(0,l.jsx)(f.A,{title:ec("documents.templateEditor"),open:e5,onClose:()=>e7(!1),size:860,mask:{closable:!1},styles:{body:{padding:20,overflow:"auto"},header:{borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,l.jsxs)(i.A,{children:[(0,l.jsx)(p.Ay,{onClick:()=>e7(!1),children:ec("common.cancel")}),(0,l.jsx)(p.Ay,{type:"primary",onClick:()=>{tO()},children:ec("common.save")})]}),children:(0,l.jsxs)(d.A,{form:eu,layout:"vertical",requiredMark:"optional",children:[(0,l.jsxs)(v.A,{gutter:12,children:[(0,l.jsx)(d.A.Item,{name:"id",hidden:!0,children:(0,l.jsx)(s.A,{})}),(0,l.jsx)(w.A,{xs:24,md:8,children:(0,l.jsx)(d.A.Item,{name:"name",label:ec("documents.templateName"),rules:[{required:!0}],children:(0,l.jsx)(s.A,{})})}),(0,l.jsx)(w.A,{xs:24,md:8,children:(0,l.jsx)(d.A.Item,{name:"category",label:ec("documents.templateCategory"),children:(0,l.jsx)(s.A,{})})}),(0,l.jsx)(w.A,{xs:24,md:8,children:(0,l.jsx)(d.A.Item,{name:"outputTitle",label:ec("documents.outputTitle"),children:(0,l.jsx)(s.A,{})})}),(0,l.jsx)(w.A,{xs:24,md:12,children:(0,l.jsx)(d.A.Item,{name:"description",label:ec("documents.templateDescription"),children:(0,l.jsx)(s.A,{})})})]}),(0,l.jsx)(d.A.Item,{name:"projectRoleConfigId",label:ec("documents.projectRoleConfig"),rules:[{required:!0,message:ec("documents.projectRoleConfigRequired")}],children:(0,l.jsx)(S.A,{showSearch:!0,placeholder:ec("documents.projectRoleConfigRequired"),options:tI})}),(0,l.jsxs)("div",{style:{marginBottom:16},children:[(0,l.jsxs)(i.A,{style:{width:"100%",justifyContent:"space-between",marginBottom:8},children:[(0,l.jsx)(Y,{strong:!0,children:"项目文件绑定"}),(0,l.jsx)(o.A,{color:"blue",children:"按文件角色多选"})]}),(0,l.jsx)(Z,{type:"info",title:"每个文件角色可直接勾选文件或文件夹;勾选文件夹会自动绑定该文件夹下所有文件。保存时仍按具体文件路径绑定,兼容现有模板和生成流程。",style:{marginBottom:12}}),(0,l.jsx)(s.A.Search,{allowClear:!0,placeholder:"搜索文件或文件夹",value:eC,onChange:e=>eT(e.target.value),style:{marginBottom:12}}),ek?(0,l.jsxs)("div",{style:{textAlign:"center",padding:24},children:[(0,l.jsx)(j.A,{}),(0,l.jsx)("div",{style:{marginTop:12,color:"var(--colorTextSecondary)"},children:"正在加载知识库文件…"})]}):0===tt.length?(0,l.jsx)(m.A,{image:m.A.PRESENTED_IMAGE_SIMPLE,description:"暂无可用文件角色"}):0===tl.length?(0,l.jsx)(m.A,{image:m.A.PRESENTED_IMAGE_SIMPLE,description:"暂无知识库文件"}):tt.map(e=>{let t=en(tr[e.value]||[]).filter(e=>ts.includes(e)),r=new Set(ea(tn));return(0,l.jsxs)(h.A,{size:"small",style:{marginBottom:12},title:(0,l.jsxs)(i.A,{children:[(0,l.jsx)(Y,{children:e.label}),(0,l.jsxs)(o.A,{color:"blue",children:["已选 ",t.length]})]}),extra:(0,l.jsx)(p.Ay,{size:"small",disabled:0===t.length,onClick:()=>tN(e.value,[]),children:"清空"}),children:[(0,l.jsx)(d.A.Item,{name:["fileBindingGroups",e.value],hidden:!0,children:(0,l.jsx)(s.A,{})}),(0,l.jsx)("div",{style:{marginBottom:8,color:"var(--colorTextSecondary)",fontSize:12},children:t.length>0?t.slice(0,3).map(es).join("、")+(t.length>3?" 等 ".concat(t.length," 个文件"):""):"未选择文件"}),(0,l.jsx)(b.A,{checkable:!0,blockNode:!0,height:320,treeData:tn,checkedKeys:t,expandedKeys:eC.trim()?ti:ez,onExpand:e=>eB(e),onCheck:(l,n)=>{let s=new Set(t.filter(e=>!r.has(e)));for(let e of n.checkedNodes)e.isFolder?ea([e]).forEach(e=>s.add(e)):s.add(e.key);tN(e.value,Array.from(s))}})]},e.value)})]}),(0,l.jsx)(Z,{type:"info",title:"文档规范由后台根据模板、提示词和角色绑定自动生成,无需手动维护规范包。"})]})})]})}}},e=>{e.O(0,[433,787,576,195,375,455,506,63,636,593,792],()=>e(e.s=16403)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[920],{2548:(e,s,l)=>{"use strict";l.r(s),l.d(s,{default:()=>w});var i=l(65321),r=l(35292),c=l(68787),n=l(2256),d=l(38770),t=l(11702),x=l(9730),h=l(13399),j=l(55122),a=l(15622),o=l(71330),g=l(8579),m=l(66926),A=l(7851),p=l(84742),u=l(79059);let{Paragraph:k,Title:z,Text:N}=r.A,y=[{icon:(0,i.jsx)(o.A,{}),title:"准备阶段",color:"blue",items:["配置模型","上传知识库资料","创建提示词"]},{icon:(0,i.jsx)(g.A,{}),title:"编排阶段",color:"purple",items:["创建文件角色","创建提示词角色","创建项目角色配置并排序"]},{icon:(0,i.jsx)(m.A,{}),title:"生成阶段",color:"geekblue",items:["创建模板","上下文召回","知识库证据增强","动态执行状态"]},{icon:(0,i.jsx)(A.A,{}),title:"交付阶段",color:"green",items:["审查事实和来源","检查导出门禁","导出正式文件"]}],b=[{title:"第一步:配置模型",goal:"让系统具备 LLM JSON 事实抽取、章节生成和校验能力。",path:"左侧菜单 → 模型配置",steps:["点击新增供应商,选择 OpenAI、DeepSeek、OpenRouter、Ollama 或其他兼容 OpenAI 协议的服务。","填写 Base URL、API Key、供应商名称并保存。","添加模型名称,建议至少准备一个用于生成和推理的模型。","把模型设置为当前启用模型。","执行健康检查,确认模型可调用。"],checks:["模型健康检查通过","至少有一个启用模型","API Key 和 Base URL 正确"],tips:"如果模型不可用,系统会回退到本地确定性抽取,但事实抽取质量会下降。"},{title:"第二步:上传知识库资料",goal:"把项目资料放入系统,让后续文件角色可以绑定。",path:"左侧菜单 → 知识库 → 文件管理 / 管理",steps:["上传招标文件、工程概况、合同条件、技术要求等项目事实资料。","上传工程量清单、劳动力计划、机械设备计划、材料计划等表格资料。","上传图纸目录、图纸说明、设计说明等图纸类资料。","上传规范、规程、企业标准、评分办法、编制要求等规则类资料。","等待索引完成,并在知识库文件列表中确认文件可见。"],checks:["文件上传成功","索引完成","文件能在文件角色绑定下拉框中看到"],tips:"表格资料最好有清晰表头;图纸资料最好附带目录或文字说明。"},{title:"第三步:创建提示词",goal:"定义每个执行阶段的模型行为。",path:"左侧菜单 → 提示词管理",steps:["创建事实抽取提示词:要求只抽取资料中明确出现的事实,返回结构化 JSON,不允许编造。","创建章节生成提示词:定义文档类型、专业语气、章节风格、引用事实和禁止事项。","创建校验提示词:检查工程名称、工期、质量目标、数字、表格引用、章节完整性。","创建格式化提示词:定义封面、目录、编号、表格、分页和正式输出样式。","保存后确认提示词能在提示词角色绑定下拉框中看到。"],checks:["事实抽取提示词已创建","章节生成提示词已创建","校验或格式化提示词已创建"],tips:"提示词越明确,生成结果越稳定。建议明确写上“没有来源的数据不要写”。"},{title:"第四步:创建文件角色",goal:"告诉系统每个文件在生成流程中的用途。",path:"左侧菜单 → 角色配置 → 新建文件角色",steps:["填写角色名称,例如“招标文件事实源”“工程量清单表格”“图纸说明文件”。","选择处理类型:规则文件、项目事实文件、表格数据、图纸文件、规范文件或参考资料。","绑定对应知识库文件。","保存角色。","按文件用途创建多个文件角色,不建议把不同用途资料混在一个角色里。"],checks:["文件角色有名称","已选择处理类型","具体项目文件由生成流程自动识别"],tips:"处理类型很重要:系统会根据它决定是否进行表格解析、事实抽取、规则引用或来源追踪。"},{title:"第五步:创建提示词角色",goal:"告诉系统每条提示词在哪个执行阶段使用。",path:"左侧菜单 → 角色配置 → 新建提示词角色",steps:["填写角色名称,例如“施工组织设计事实抽取”“章节生成规则”“导出前校验规则”。","选择执行类型:事实抽取、章节生成、校验、格式化或参考。","绑定对应提示词。","保存角色。","一个执行阶段可以有多个提示词角色,后续在项目角色配置中排序。"],checks:["提示词角色有名称","已选择执行类型","已绑定提示词"],tips:"角色名称可以完全自定义,但执行类型必须选对。系统依赖执行类型驱动多阶段流程。"},{title:"第六步:创建项目角色配置并排序",goal:"把文件角色和提示词角色组合成一个可复用的项目生成方案。",path:"左侧菜单 → 角色配置 → 新建项目配置",steps:["填写配置名称,例如“某项目施工组织设计配置”。","添加文件角色,并设置顺序。推荐:规则文件 → 项目事实文件 → 表格数据 → 图纸文件 → 规范文件 → 参考资料。","添加提示词角色,并设置顺序。推荐:事实抽取 → 章节生成 → 校验 → 格式化 → 参考。","保存项目角色配置。","后续模板只绑定项目角色配置,不再重复绑定文件和提示词。"],checks:["至少包含一个文件角色","至少包含一个提示词角色","顺序符合业务流程"],tips:"排序决定系统读取资料和应用提示词的优先级,是生产级生成稳定性的关键。"},{title:"第七步:创建模板并绑定项目配置",goal:"定义要生成哪种文档,以及使用哪套项目角色配置。",path:"左侧菜单 → 生成编辑 → 新建模板",steps:["填写模板 ID。ID 由系统生成或保持唯一,不建议手动频繁修改。","填写模板名称,例如“施工组织设计”“技术标文件”“专项施工方案”。","填写分类、输出标题和模板说明。","选择第六步创建的项目角色配置。","为章节填写查询词和必需事实;系统会自动按章节检索知识库证据。","高级优先证据通常无需填写;只有必须指定某份官方资料、图纸或表格时才使用。","保存模板。"],checks:["模板名称清晰","输出标题正确","已绑定项目角色配置"],tips:"模板负责文档入口;项目角色配置负责资料、提示词和顺序。两者分离后更容易复用。"},{title:"第八步:执行生成并查看状态",goal:"让用户明确知道生成流程进行到哪一步。",path:"左侧菜单 → 生成编辑 → 选择模板 → 点击生成",steps:["点击生成按钮后,页面会出现“执行状态”卡片。","系统会先绑定文件角色和提示词角色,再按当前项目召回短期/长期上下文;上下文只作为偏好和历史纠偏参考,不覆盖知识库事实。","系统会按章节自动检索知识库证据;只有在必须指定官方资料、图纸或表格时,才需要使用高级优先证据。","执行状态会根据当前模板、后台自动规范、文件角色、提示词角色、上下文召回、证据增强和章节自动生成,不是固定工程流程。","当前执行节点会高亮显示,子状态会展示正在处理的章节、事实字段、文件角色、增强贡献或门禁规则。","生成任务在后台运行,页面通过 documentId 轮询;切换页面后回到生成编辑仍可恢复状态。","生成完成后,系统会用后端真实 executionStages 回填最终状态。","如果导出门禁未通过,生成完成节点会提示需要检查校验结果。"],checks:["执行状态 Card 出现","当前节点有高亮","生成完成后有执行阶段结果"],tips:"如果长时间停留在某一步,优先检查模型配置、知识库索引和文件角色绑定。"},{title:"第九步:审查结果并导出",goal:"确保文档可追溯、可校验、可交付,同时能区分阻断问题和可复核 warning。",path:"生成编辑 → 编辑器下方 Tabs → 导出按钮 / 草稿历史",steps:["查看“结构化事实”,确认事实字段是否按后台自动规范动态 schema 抽取,并检查冲突提示。","查看“来源”,确认事实来自后台自动规范要求的文件角色和绑定资料。","查看“缺失项”,补齐缺失资料或调整角色配置。","查看“校验”,优先处理 error;warning 表示可导出但建议复核。","查看“导出门禁”,真实 blockingIssues 会作为风险提示保留,但不阻断用户导出。","在草稿历史中确认生成状态、warning 原因、整体生成耗时,并可删除不需要的记录。","可以先导出 HTML 预览排版,再导出 DOCX/PDF。"],checks:["无真实阻断问题","关键事实有来源","章节有证据","warning 原因已复核","导出文件可打开"],tips:"导出不是简单放行:真实阻断仍会拦截;生成完成但存在可复核问题时显示 warning,用户可以继续导出并按原因优化资料。"}];function w(){let e=(0,u.Vr)();return(0,i.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,i.jsxs)(c.A,{className:"cardGlass",styles:{body:{padding:24}},children:[(0,i.jsx)(z,{level:2,className:"mb-2",children:e("guide.title")}),(0,i.jsx)(k,{className:"pageDesc mb-0",children:e("guide.description")})]}),(0,i.jsx)(n.A,{gutter:[16,16],children:y.map(e=>(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{className:"h-full",title:(0,i.jsxs)("span",{className:"flex items-center gap-2",children:[e.icon,e.title]}),children:(0,i.jsx)("div",{className:"space-y-2",children:e.items.map(s=>(0,i.jsx)("div",{children:(0,i.jsx)(t.A,{color:e.color,children:s})},s))})})},e.title))}),(0,i.jsx)(c.A,{title:e("guide.fullFlow"),children:(0,i.jsx)(x.A,{direction:"vertical",items:b.map(e=>({title:e.title,description:"".concat(e.goal,"(入口:").concat(e.path,")")}))})}),(0,i.jsx)(c.A,{title:"详细步骤说明:照着做即可跑通",children:(0,i.jsx)(h.A,{mode:"left",items:b.map(e=>({dot:(0,i.jsx)(p.A,{}),children:(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsx)(z,{level:4,className:"mb-0",children:e.title}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"目标:"}),e.goal]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"入口:"}),e.path]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(N,{strong:!0,children:"操作步骤:"}),(0,i.jsx)("ol",{className:"list-decimal pl-6 mt-2 space-y-1",children:e.steps.map(e=>(0,i.jsx)("li",{children:e},e))})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(N,{strong:!0,children:"完成检查:"}),(0,i.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:e.checks.map(e=>(0,i.jsx)(t.A,{color:"success",children:e},e))})]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"提示:"}),e.tips]}),(0,i.jsx)(j.A,{})]})}))})}),(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{title:e("guide.roleDesign"),children:[(0,i.jsx)(k,{children:e("guide.roleDesignDesc")}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(t.A,{color:"blue",children:"file"}),(0,i.jsx)(N,{strong:!0,children:e("guide.fileRole")}),(0,i.jsx)(k,{children:e("guide.fileRoleDesc")})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(t.A,{color:"purple",children:"prompt"}),(0,i.jsx)(N,{strong:!0,children:e("guide.promptRole")}),(0,i.jsx)(k,{children:e("guide.promptRoleDesc")})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(t.A,{color:"geekblue",children:"config"}),(0,i.jsx)(N,{strong:!0,children:e("guide.projectConfig")}),(0,i.jsx)(k,{children:e("guide.projectConfigDesc")})]})]})]})}),(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{title:e("guide.generationEngine"),children:[(0,i.jsx)(k,{children:e("guide.generationEngineDesc")}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsx)(t.A,{children:e("roles.factExtraction")}),(0,i.jsx)(t.A,{children:e("roles.chapterGeneration")}),(0,i.jsx)(t.A,{children:e("roles.validation")}),(0,i.jsx)(t.A,{children:e("roles.formatting")}),(0,i.jsx)(t.A,{children:e("documents.exportGate")})]})]})})]}),(0,i.jsx)(c.A,{title:"文件角色和提示词角色案例:它们在模板生成中到底起什么作用",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{size:"small",title:"案例 A:创建文件角色“招标文件事实源”",children:[(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"怎么创建:"}),"类型选择 file,处理类型选择“项目事实文件”,绑定招标文件、合同摘要或项目概况。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"生成时的作用:"}),"系统会从这个角色绑定的文件里抽取工程名称、建设地点、工期、质量目标、范围边界等事实,并把来源带入结构化事实和章节证据。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"带来的提升:"}),"模型不再凭空补项目事实;章节生成和导出校验都会追踪“这句话来自哪个文件角色、哪个文件”。"]})]})}),(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{size:"small",title:"案例 B:创建文件角色“工程量清单表格”",children:[(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"怎么创建:"}),"类型选择 file,处理类型选择“表格数据”,绑定 Excel、CSV、清单表或计划表。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"生成时的作用:"}),"系统会读取 Sheet、表头、行列和来源范围,把表格数据转换成可引用的结构化资源证据。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"带来的提升:"}),"章节中涉及数量、清单、计划、资源配置时,优先引用表格来源,减少数字编造和漏项。"]})]})}),(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{size:"small",title:"案例 C:创建提示词角色“章节生成规则”",children:[(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"怎么创建:"}),"先在提示词管理中写好生成规则,例如“必须引用来源、不要写无来源数据、输出正式报告语气”;再创建 prompt 角色,执行类型选择“章节生成”。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"生成时的作用:"}),"系统生成每个章节时会把这个提示词加入 LLM 上下文,用它约束语气、结构、引用方式和禁止事项。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"带来的提升:"}),"同一套资料可以生成更稳定的文档风格;不同模板只需替换提示词角色,就能调整写法而不改知识库文件。"]})]})}),(0,i.jsx)(d.A,{xs:24,lg:12,children:(0,i.jsxs)(c.A,{size:"small",title:"案例 D:创建提示词角色“导出前校验规则”",children:[(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"怎么创建:"}),"提示词内容写清楚必须检查的交付要求,例如“不能出现资料未提供、图片引用必须可访问、关键事实必须有来源”;prompt 角色执行类型选择“校验”或“格式化”。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"生成时的作用:"}),"生成完成后,系统会结合后台自动规范、证据来源和导出门禁检查文档是否可交付。"]}),(0,i.jsxs)(k,{children:[(0,i.jsx)(N,{strong:!0,children:"带来的提升:"}),"把人工审稿经验前置到生成流程,降低导出后才发现缺来源、缺图片、格式不合格的概率。"]})]})})]})}),(0,i.jsx)(c.A,{title:"我的数据和门禁规则说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"使用自己的数据",children:(0,i.jsx)(k,{children:"文件、提示词、角色配置和规范包都来自用户自己创建或上传的内容,生成流程会按当前项目配置读取并参与校验。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"自定义门禁类型会执行",children:(0,i.jsx)(k,{children:"门禁规则由后台根据模板、提示词和角色绑定自动形成,并与系统门禁一起参与生成校验,不需要用户手动维护规范包。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"上传后关注索引状态",children:(0,i.jsx)(k,{children:"文件上传完成后,知识库索引会继续在后台写入。请在文件管理页查看状态,如果失败,页面会展示原因,方便重新配置模型或重试。"})})})]})}),(0,i.jsx)(c.A,{title:"上下文、知识库证据和增强贡献说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"上下文召回不是事实来源",children:(0,i.jsx)(k,{children:"生成前会按当前项目召回短期/长期上下文,但它只用于用户偏好、历史纠偏和连续性参考。如果上下文与知识库证据冲突,系统提示词会要求以知识库证据、模板要求和规范包为准。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"自动检索为主",children:(0,i.jsx)(k,{children:"模板章节的查询词、章节目的和必需事实会驱动系统自动检索知识库证据。高级优先证据只是兜底能力,用于必须指定官方资料、图纸或表格的场景,不是日常必填项。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"增强贡献可追踪",children:(0,i.jsx)(k,{children:"生成流程会展示知识库证据、人工确认/固定证据、项目上下文和自动检索证据的数量,帮助判断本次增强是否真的参与生成,而不是增加用户维护成本。"})})})]})}),(0,i.jsx)(c.A,{title:"动态 schema、证据和执行状态说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"动态事实 schema",children:(0,i.jsx)(k,{children:"系统不会写死工程字段。后台自动规范会结合模板章节 requiredFacts、角色绑定和提示词形成抽取 schema,并驱动事实抽取、冲突检测和导出门禁。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"结构化资源证据",children:(0,i.jsx)(k,{children:"文本、PDF/Word、Excel/CSV、图片、地图图纸和其他附件都会被整理成资源证据,包含文件角色、处理类型、正文用途、关联事实和证据片段,模型据此理解资料关系。"})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"动态执行状态",children:(0,i.jsx)(k,{children:"生成编辑页的执行节点会随模板、规范包、文件角色、提示词角色、章节和门禁规则变化;用户生成不同项目文件时看到的是对应项目的流程,而不是固定示例流程。"})})})]})}),(0,i.jsx)(c.A,{title:"生成记录、warning 和导出门禁怎么理解",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,lg:8,children:(0,i.jsxs)(c.A,{size:"small",title:"草稿历史记录",children:[(0,i.jsxs)(k,{children:["每次后台生成都会写入全局项目目录 ",(0,i.jsxs)(N,{code:!0,children:["~/.customize-agent/projects/","{projectId}","/generatedDocuments"]}),"。记录会保存标题、模板、状态、创建时间、完成时间、生成耗时、正文、结构化结果和资源引用。"]}),(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"completed:生成完成且无需要关注的问题。"}),(0,i.jsx)("li",{children:"warning:生成完成,但存在可复核问题。"}),(0,i.jsx)("li",{children:"failed:生成失败,需要查看错误原因。"}),(0,i.jsx)("li",{children:"generating:后台任务仍在执行,可轮询恢复。"})]})]})}),(0,i.jsx)(d.A,{xs:24,lg:8,children:(0,i.jsxs)(c.A,{size:"small",title:"warning 不是失败",children:[(0,i.jsx)(k,{children:"warning 用于提醒用户“文档已经生成,但建议复核”。例如必需事实没有在最佳来源角色中抽到、部分来源需要人工确认、格式或内容有优化建议。warning 会显示在草稿历史和校验详情中,并保留导出能力。"}),(0,i.jsx)(k,{children:"如果存在明确风险问题,例如正文包含临时图片生成 URL、出现“资料未提供”占位、真实 blockingIssues 未解决,导出门禁会提示风险,但仍保留 DOCX/PDF 导出能力。"})]})}),(0,i.jsx)(d.A,{xs:24,lg:8,children:(0,i.jsxs)(c.A,{size:"small",title:"导出门禁规则",children:[(0,i.jsx)(k,{children:"门禁分为“高风险提示”和“复核建议”。系统不会禁止导出,但会在出现高风险问题时提醒用户复核交付质量。"}),(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"Markdown/HTML 更适合快速预览和人工调整。"}),(0,i.jsx)("li",{children:"DOCX/PDF 会启用真实门禁检查。"}),(0,i.jsx)("li",{children:"草稿历史可保留多个版本,便于对比和再次导出。"})]})]})})]})}),(0,i.jsx)(c.A,{title:"生成资源和知识库的关系",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsxs)(c.A,{size:"small",title:"生成资源手动加入知识库",children:[(0,i.jsx)(k,{children:"模板运行生成的文档、图片、封面或后处理资源会登记到生成资源管理页,默认不会自动回流知识库,避免模型产物污染事实来源。"}),(0,i.jsx)(k,{children:"确认资源可复用后,可在资源管理页点击“加入知识库”,再写入 knowledgeBase/生成资源 并完成索引。"})]})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsxs)(c.A,{size:"small",title:"资源预览和坏图处理",children:[(0,i.jsx)(k,{children:"资源预览会从全局 generatedDocuments 目录解析文件,不依赖当前页面临时路径。图片下载会识别“image is generating”等占位响应,并校验 PNG/JPEG/WebP 字节,避免把占位文本当成图片保存。"}),(0,i.jsx)(k,{children:"如果预览失败,优先查看资源管理页中的文件路径、资源状态和原始生成记录。"})]})})]})}),(0,i.jsx)(c.A,{title:"文件角色处理类型大白话说明",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"规则文件",children:(0,i.jsx)(k,{children:"用来告诉系统“必须怎么写、不能怎么写、按什么标准判断”。适合放评分办法、甲方编制要求、攻略写作要求、输出格式要求。生成时会优先作为约束使用。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"项目事实文件",children:(0,i.jsx)(k,{children:"用来告诉系统“真实情况是什么”。适合放项目概况、合同摘要、招标文件关键信息、游戏角色资料、产品资料。事实字段通常从这里抽取。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"表格数据",children:(0,i.jsx)(k,{children:"用来解析结构化数据。适合放 Excel、CSV、清单、计划表、评分表、推荐指数表。系统会读取 Sheet、表头、行列和来源范围。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"图纸文件",children:(0,i.jsx)(k,{children:"用来表达空间关系、路线、结构、站位或设计说明。可以是图纸目录、设计说明、路线示意、阵型图说明。没有 CAD 时也可以用文字图纸说明。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"规范文件",children:(0,i.jsx)(k,{children:"用来作为专业依据。适合放国家规范、行业标准、企业标准、攻略结构规范、质量标准。校验和生成时会把它当成依据。"})})}),(0,i.jsx)(d.A,{xs:24,md:12,children:(0,i.jsx)(c.A,{size:"small",title:"参考资料",children:(0,i.jsx)(k,{children:"只作为辅助阅读材料,不建议放关键事实。适合放图片来源、公开网页链接、背景资料、案例资料。系统可以参考,但不应把它当成强事实。"})})})]})}),(0,i.jsx)(c.A,{title:"推荐资料清单",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"必备资料",children:(0,i.jsxs)("ul",{className:"list-disc pl-5",children:[(0,i.jsx)("li",{children:"项目事实文件"}),(0,i.jsx)("li",{children:"招标或编制规则"}),(0,i.jsx)("li",{children:"章节生成提示词"})]})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"强烈建议",children:(0,i.jsxs)("ul",{className:"list-disc pl-5",children:[(0,i.jsx)("li",{children:"表格数据"}),(0,i.jsx)("li",{children:"图纸说明"}),(0,i.jsx)("li",{children:"规范或企业标准"})]})})}),(0,i.jsx)(d.A,{xs:24,md:8,children:(0,i.jsx)(c.A,{size:"small",title:"导出前确认",children:(0,i.jsxs)("ul",{className:"list-disc pl-5",children:[(0,i.jsx)("li",{children:"无 error 校验"}),(0,i.jsx)("li",{children:"事实有来源"}),(0,i.jsx)("li",{children:"导出门禁通过"})]})})})]})}),(0,i.jsx)(c.A,{title:"生产级生成前检查清单",children:(0,i.jsxs)(n.A,{gutter:[16,16],children:[(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{size:"small",title:"资料完整性",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"事实源、规则源、表格源、图片/图纸源分开绑定。"}),(0,i.jsx)("li",{children:"关键事实在知识库检索中可以搜索到。"}),(0,i.jsx)("li",{children:"表格有清晰表头,图片和图纸有说明文字。"}),(0,i.jsx)("li",{children:"只有必须指定资料时才维护高级优先证据。"})]})})}),(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{size:"small",title:"角色配置",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"文件角色处理类型选对。"}),(0,i.jsx)("li",{children:"提示词角色执行类型选对。"}),(0,i.jsx)("li",{children:"项目角色配置排序符合生成流程。"}),(0,i.jsx)("li",{children:"生成后查看增强贡献,确认上下文和证据是否真实参与。"})]})})}),(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{size:"small",title:"规范包",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"required fact 不要过度配置。"}),(0,i.jsx)("li",{children:"sourceRoleIds 只绑定真正应该提供该事实的角色。"}),(0,i.jsx)("li",{children:"gateRules 区分 error 和 warning。"})]})})}),(0,i.jsx)(d.A,{xs:24,md:12,xl:6,children:(0,i.jsx)(c.A,{size:"small",title:"交付检查",children:(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1",children:[(0,i.jsx)("li",{children:"草稿历史记录状态合理。"}),(0,i.jsx)("li",{children:"warning 原因已经阅读。"}),(0,i.jsx)("li",{children:"导出文件打开正常,图片和表格可读。"})]})})})]})}),(0,i.jsx)(c.A,{title:"常见问题和处理建议",children:(0,i.jsx)(a.A,{items:[{key:"warning-export",label:"为什么生成完成后显示 warning,但仍然可以导出?",children:(0,i.jsx)(k,{children:"warning 表示文档已生成,但存在建议复核的问题,例如来源角色不完全匹配、某些事实需要人工确认或格式可优化。它不是失败,也不会阻断导出;真实 blockingIssues 或 error 级门禁问题会作为高风险提示展示,导出后请人工复核。"})},{key:"missing-facts",label:"为什么提示必需事实缺失?",children:(0,i.jsx)(k,{children:"优先检查后台自动规范生成的事实字段、模板章节 requiredFacts 和文件角色绑定。很多情况下不是模型失败,而是资料没有被绑定到正确角色,或字段要求比资料实际内容更严格。"})},{key:"draft-duration",label:"草稿历史里的耗时怎么计算?",children:(0,i.jsx)(k,{children:"耗时使用生成记录的 createdAt 到 completedAt 计算;旧记录或未完成记录会使用 updatedAt 兜底。它用于判断本次生成链路整体成本,包括知识库检索、事实抽取、章节生成、资源处理、校验和格式化。"})},{key:"asset-index",label:"生成资源会如何进入知识库?",children:(0,i.jsx)(k,{children:"生成资源完成后会先进入生成资源管理页,默认不自动入库,避免生成内容再次被当作事实证据召回。确认需要复用时,可在资源管理页手动点击“加入知识库”,系统会写入 knowledgeBase/生成资源 并建立索引。"})},{key:"context-accuracy",label:"上下文召回会不会影响准确度?",children:(0,i.jsx)(k,{children:"上下文只作为当前项目的偏好、历史纠偏和连续性参考,不作为事实来源。生成和审查提示词都要求:如果上下文与知识库证据、模板要求或后台自动规范冲突,以知识库证据和后台自动规范为准。"})},{key:"priority-evidence",label:"什么时候需要维护高级优先证据?",children:(0,i.jsx)(k,{children:"日常不需要维护。只有当某章必须引用指定官方资料、图纸、表格,或自动检索结果不稳定时,才从知识库搜索页复制文件路径并填入章节高级优先证据。"})}]})}),(0,i.jsx)(a.A,{items:[{key:"prepare",label:e("guide.prepareTitle"),children:(0,i.jsx)(k,{children:e("guide.prepareContent")})},{key:"roles",label:e("guide.rolesTitle"),children:(0,i.jsx)(k,{children:e("guide.rolesContent")})},{key:"template",label:e("guide.templateTitle"),children:(0,i.jsx)(k,{children:e("guide.templateContent")})},{key:"generate",label:e("guide.generateTitle"),children:(0,i.jsx)(k,{children:e("guide.generateContent")})},{key:"qa",label:e("guide.qaTitle"),children:(0,i.jsx)(k,{children:e("guide.qaContent")})}]})]})}},34899:(e,s,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/guide",function(){return l(2548)}])}},e=>{e.O(0,[433,787,642,636,593,792],()=>e(e.s=34899)),_N_E=e.O()}]);