import{_ as C,d as B,r as k,o as l,c,F as z,a as S,b as o,i as q,u as T,w as U,e as F,f as s,g as t,h as _,j as D,t as x,n as L,k as j,p as E,l as O,S as K,D as A,M as W}from"./index-0o0s5f-c.js";const Z=B({components:{},props:["index"],setup(e,{emit:g}){return{list:k([{icon:new URL("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20width='16'%20height='16'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3cpath%20d='M13.333%2019.568v-0.083c0-3.344%202.688-6.157%206.337-6.977-0.485-3.069-3.725-5.575-7.804-5.575-4.427%200-7.867%202.951-7.867%206.373%200%201.292%200.48%202.533%201.387%203.597%200.043%200.051%200.111%200.125%200.203%200.22%200.758%200.778%201.252%201.816%201.335%202.969l0.001%200.015c0.691-0.406%201.523-0.647%202.41-0.647%200.261%200%200.518%200.021%200.768%200.061l-0.028-0.004c0.221%200.035%200.403%200.061%200.54%200.080%200.374%200.051%200.807%200.081%201.246%200.081%200.519%200%201.029-0.041%201.526-0.12l-0.055%200.007zM13.943%2022.169c-0.625%200.113-1.344%200.177-2.078%200.177-0.562%200-1.114-0.038-1.656-0.111l0.063%200.007c-0.341-0.044-0.547-0.076-0.753-0.109l0.147%200.020c-0.099-0.016-0.214-0.026-0.331-0.026-0.41%200-0.793%200.115-1.119%200.314l0.009-0.005-2.539%201.531c-0.16%200.1-0.355%200.16-0.564%200.16-0.032%200-0.063-0.001-0.094-0.004l0.004%200c-0.547-0.043-0.975-0.497-0.975-1.052%200-0.029%200.001-0.058%200.004-0.087l-0%200.004%200.2-2.375c0.005-0.052%200.007-0.113%200.007-0.174%200-0.567-0.226-1.081-0.593-1.457l0%200c-0.107-0.109-0.212-0.223-0.313-0.34l-0.008-0.009c-1.272-1.493-2.023-3.336-2.023-5.328%200-4.992%204.716-9.039%2010.533-9.039%205.413%200%209.871%203.503%2010.467%208.011%204.496%200.204%208.067%203.353%208.067%207.208%200%201.591-0.608%203.061-1.639%204.253-0.068%200.080-0.155%200.173-0.26%200.28-0.297%200.299-0.48%200.711-0.48%201.165%200%200.048%200.002%200.095%200.006%200.142l-0-0.006%200.161%201.897c0.001%200.019%200.002%200.040%200.002%200.062%200%200.447-0.347%200.814-0.786%200.845l-0.003%200c-0.021%200.002-0.047%200.003-0.072%200.003-0.169%200-0.327-0.048-0.461-0.13l0.004%200.002-2.057-1.223c-0.257-0.154-0.567-0.246-0.898-0.246-0.094%200-0.187%200.007-0.278%200.022l0.010-0.001c-0.196%200.031-0.36%200.053-0.491%200.071-0.421%200.053-0.853%200.083-1.292%200.083-3.592%200-6.664-1.877-7.924-4.535zM23.245%2023.916c0.203-0.033%200.436-0.052%200.674-0.052%200.561%200%201.097%200.104%201.591%200.294l-0.030-0.010c0.199-0.787%200.59-1.464%201.122-2.003l-0%200c0.067-0.067%200.116-0.12%200.141-0.149%200.652-0.753%200.991-1.617%200.991-2.511%200-2.405-2.537-4.552-5.867-4.552s-5.867%202.147-5.867%204.552%202.537%204.552%205.867%204.552c0.321%200%200.64-0.021%200.952-0.061%200.107-0.013%200.251-0.033%200.427-0.061z'%20fill='rgba(132.09,134.895,142.03500000000003,1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",import.meta.url).href,type:"wechat"},{icon:new URL("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20width='16'%20height='16'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3cpath%20d='M21.333%2022.667v-1.333h-4v-4h4v2.667h2.667v2.667h-1.333v2.667h-2.667v2.667h-2.667v-4h2.667v-1.333h1.333zM28%2028h-5.333v-2.667h2.667v-2.667h2.667v5.333zM4%204h10.667v10.667h-10.667v-10.667zM6.667%206.667v5.333h5.333v-5.333h-5.333zM17.333%204h10.667v10.667h-10.667v-10.667zM20%206.667v5.333h5.333v-5.333h-5.333zM4%2017.333h10.667v10.667h-10.667v-10.667zM6.667%2020v5.333h5.333v-5.333h-5.333zM24%2017.333h4v2.667h-4v-2.667zM8%208h2.667v2.667h-2.667v-2.667zM8%2021.333h2.667v2.667h-2.667v-2.667zM21.333%208h2.667v2.667h-2.667v-2.667z'%20fill='rgba(132.09,134.895,142.03500000000003,1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",import.meta.url).href,title:"qr"},{icon:new URL("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20width='16'%20height='16'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3cpath%20d='M16%2029.333c-7.364%200-13.333-5.969-13.333-13.333s5.969-13.333%2013.333-13.333%2013.333%205.969%2013.333%2013.333-5.969%2013.333-13.333%2013.333zM16%2026.667c5.891%200%2010.667-4.776%2010.667-10.667s-4.776-10.667-10.667-10.667v0c-5.891%200-10.667%204.776-10.667%2010.667s4.776%2010.667%2010.667%2010.667v0zM17.333%2016h5.333v2.667h-8v-9.333h2.667v6.667z'%20fill='rgba(132.09,134.895,142.03500000000003,1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",import.meta.url).href,title:"record"}]),chooseNav:p=>{g("choose-nav",p)}}}}),G=["onClick"],J=["src"];function P(e,g,v,d,p,m){return l(),c("main",null,[(l(!0),c(z,null,S(e.list,(r,u)=>(l(),c("div",{key:u,onClick:n=>e.chooseNav(u)},[o("img",{src:r.icon},null,8,J)],8,G))),128))])}const Q=C(Z,[["render",P],["__scopeId","data-v-88857596"]]),X="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2048%2048'%20width='12'%20height='12'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3cg%20fill='rgba(255,255,255,1)'%3e%3cg%20fill='rgba(255,255,255,1)'%3e%3crect%20fill-opacity='0.01'%20fill='rgba(255,255,255,1)'%20x='0'%20y='0'%20width='48'%20height='48'%20stroke-width='4'%20stroke='none'%20fill-rule='evenodd'%3e%3c/rect%3e%3cpolyline%20stroke='rgba(255,255,255,1)'%20stroke-width='4'%20stroke-linecap='round'%20stroke-linejoin='round'%20points='4%2030%209%206%209%206%2039%206%2044%2030'%20fill='none'%20fill-rule='evenodd'%3e%3c/polyline%3e%3cpolygon%20stroke='rgba(255,255,255,1)'%20stroke-width='4'%20fill='none'%20fill-rule='nonzero'%20stroke-linejoin='round'%20points='4%2030%2014.9090909%2030%2016.7272727%2036%2031.2727273%2036%2033.0909091%2030%2044%2030%2044%2043%204%2043'%3e%3c/polygon%3e%3cpolyline%20stroke='rgba(255,255,255,1)'%20stroke-width='4'%20stroke-linecap='round'%20stroke-linejoin='round'%20transform='translate(24.000000,%2017.000000)%20scale(1,%20-1)%20translate(-24.000000,%20-17.000000)%20'%20points='18%2014%2024%2020%2030%2014'%20fill='none'%20fill-rule='evenodd'%3e%3c/polyline%3e%3cpath%20d='M24,26%20L24,14'%20stroke='rgba(255,255,255,1)'%20stroke-width='4'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%20fill-rule='evenodd'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Y="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2048%2048'%20width='10'%20height='10'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3crect%20width='48'%20height='48'%20fill='rgba(153,153,153,1)'%20fill-opacity='0.01'%20stroke='none'%3e%3c/rect%3e%3cpath%20d='M8%206C8%204.89543%208.89543%204%2010%204H30L40%2014V42C40%2043.1046%2039.1046%2044%2038%2044H10C8.89543%2044%208%2043.1046%208%2042V6Z'%20fill='none'%20stroke='rgba(153,153,153,1)'%20stroke-width='4'%20stroke-linejoin='round'%3e%3c/path%3e%3cpath%20d='M16%2020H32'%20stroke='rgba(153,153,153,1)'%20stroke-width='4'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3c/path%3e%3cpath%20d='M16%2028H32'%20stroke='rgba(153,153,153,1)'%20stroke-width='4'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",e0="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20width='16'%20height='16'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3cpath%20d='M24.485%207.515l-1.885%201.885c-1.689-1.689-4.023-2.734-6.6-2.734-5.155%200-9.333%204.179-9.333%209.333s4.179%209.333%209.333%209.333c5.154%200%209.333-4.178%209.333-9.333v-0h2.667c-0%206.627-5.373%2012-12%2012s-12-5.373-12-12%205.373-12%2012-12c3.314%200%206.314%201.343%208.485%203.515v0z'%20fill='rgba(147.89999999999998,155.04,136.935,1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",o0="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20width='16'%20height='16'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3cpath%20d='M26.667%209.333v18.667c0%200.736-0.597%201.333-1.333%201.333v0h-18.667c-0.736%200-1.333-0.597-1.333-1.333v0-18.667h-2.667v-2.667h26.667v2.667h-2.667zM8%209.333v17.333h16v-17.333h-16zM9.333%202.667h13.333v2.667h-13.333v-2.667zM14.667%2013.333h2.667v9.333h-2.667v-9.333z'%20fill='rgba(147.89999999999998,155.04,136.935,1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",t0="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20width='16'%20height='16'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3cpath%20d='M10.667%2026.667v2.576c0%200%200%200.001%200%200.001%200%200.368-0.298%200.667-0.667%200.667-0.163%200-0.312-0.058-0.428-0.155l0.001%200.001-5.493-4.577c-0.147-0.123-0.24-0.307-0.24-0.512%200-0.368%200.298-0.667%200.667-0.667%200.001%200%200.002%200%200.003%200h19.491c1.473%200%202.667-1.194%202.667-2.667v0-10.667h2.667v10.667c0%202.946-2.388%205.333-5.333%205.333v0h-13.333zM21.333%205.333v-2.576c0-0%200-0.001%200-0.001%200-0.368%200.298-0.667%200.667-0.667%200.163%200%200.312%200.058%200.428%200.155l-0.001-0.001%205.493%204.577c0.147%200.123%200.24%200.307%200.24%200.512%200%200.368-0.298%200.667-0.667%200.667-0%200-0.001%200-0.001%200h-19.492c-1.473%200-2.667%201.194-2.667%202.667v0%2010.667h-2.667v-10.667c0-2.946%202.388-5.333%205.333-5.333v0h13.333z'%20fill='rgba(147.89999999999998,155.04,136.935,1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",n0=B({setup(){const{helper:e,ajax:g}=q("$global"),v=k({name:"未命名"}),d=T(),p=k([]),m=k(d.query.documentId),r=d.query.knowledgeId,u=h=>{const{status:a,id:w}=h;e.goLink("document",{documentId:w,knowledgeId:d.query.knowledgeId})};return U(()=>d.query,h=>{m.value=h.documentId}),F(async()=>{const h=await g.knowledge.getKnowledge(r);h&&(v.value=h);const a=await g.knowledge.getTask(r);a&&(p.value=a.files)}),{list:p,knowledgeInfo:v,goDocument:u,documentId:m}}}),y=e=>(E("data-v-dbfbced0"),e=e(),O(),e),s0={class:"knowledge-name"},l0=y(()=>o("span",null,null,-1)),c0=y(()=>o("div",{class:"upload-main"},[o("div",null,[o("img",{src:X,width:"12"}),o("p",null,"添加文件")])],-1)),r0=y(()=>o("p",{class:"knowledge-length"},"14个文件",-1)),a0={class:"knowledge-list"},i0=["onClick"],d0=y(()=>o("img",{src:Y,width:"10"},null,-1)),p0={key:0},h0=y(()=>o("img",{src:e0,width:"12",class:"rotate"},null,-1)),g0={key:1},u0=y(()=>o("img",{src:o0,width:"12",class:"method"},null,-1)),v0=y(()=>o("img",{src:t0,width:"12",class:"method"},null,-1));function w0(e,g,v,d,p,m){const r=s("a-typography-paragraph"),u=s("a-upload");return l(),c(z,null,[o("div",s0,[l0,t(r,{style:{flex:"1",margin:"0 0 0 8px","font-size":"14px",color:"rgba(16, 16, 16, 1)"},ellipsis:{rows:1,css:!0}},{default:_(()=>[D(x(e.knowledgeInfo.name),1)]),_:1})]),t(u,{multiple:!1,"show-file-list":!1,limit:1,"show-upload-button":{showOnExceedLimit:!0},accept:".pdf,.doc,.docx,.txt,.md,.ppt.pptx",style:{display:"block",width:"100%"}},{"upload-button":_(()=>[c0]),_:1}),r0,o("div",a0,[(l(!0),c(z,null,S(e.list,(n,h)=>(l(),c("div",{key:h,class:L([n.status==="5"?n.id===e.documentId?"active":"method":""]),onClick:a=>e.goDocument(n)},[d0,o("div",{class:L([n.status!==2?"opacity":""])},[t(r,{style:{flex:"1",margin:"0 0 0 8px","font-size":"14px",color:"rgba(16, 16, 16, 1)"},ellipsis:{rows:1,css:!0}},{default:_(()=>[D(x(n.fileName),1)]),_:2},1024)],2),n.status===4||n.status===5?(l(),c("section",p0,[o("p",null,x(n.status===4?"上传中":"解析中")+"...",1),h0])):j("",!0),n.status===1||![1,2,4,5].includes(n.status)?(l(),c("section",g0,[o("p",null,x(n.status===1?"上传":"解析")+"失败",1),u0,v0])):j("",!0)],10,i0))),128))])],64)}const _0=C(n0,[["render",w0],["__scopeId","data-v-dbfbced0"]]),m0=B({components:{},props:["open","data"],setup(){}}),H=e=>(E("data-v-4790771b"),e=e(),O(),e),f0=H(()=>o("p",null,"对话记录",-1)),b0={class:"input-wrap"},k0={class:"list-wrap"},y0={key:0},x0=["id"],$0={class:"menu"},M0=H(()=>o("span",{style:{"margin-left":"8px"}},"编辑",-1)),z0=H(()=>o("span",{style:{"margin-left":"8px"}},"删除",-1));function I0(e,g,v,d,p,m){const r=s("icon-close"),u=s("icon-search"),n=s("a-input"),h=s("a-typography-paragraph"),a=s("icon-more"),w=s("icon-edit"),f=s("a-doption"),V=s("icon-delete"),I=s("a-dropdown");return l(),c("div",{class:L(["record-wrap",e.open?"":"record-wrap-close"])},[o("header",null,[f0,o("p",{onClick:g[0]||(g[0]=i=>e.$emit("closeRecord"))},[t(r,{size:"18"})])]),o("div",b0,[t(n,{placeholder:"搜索关键词",style:{height:"40px",borderRadius:"4px"}},{prefix:_(()=>[t(u)]),_:1})]),o("div",k0,[(l(!0),c(z,null,S(e.data,(i,$)=>{var R;return l(),c("div",{key:$},[((R=i==null?void 0:i.list)==null?void 0:R.length)>0?(l(),c("div",y0,[o("p",null,x(i.name),1),(l(!0),c(z,null,S(i.list,(N,M)=>(l(),c("div",{key:M,id:`recod-item-${$}-${M}`},[t(h,{ellipsis:{rows:1,css:!0},style:{lineHeight:"36px",padding:"0 8px",marginBottom:"0",flex:"1"}},{default:_(()=>[D(x(N),1)]),_:2},1024),o("div",$0,[t(I,{onSelect:b=>e.$emit("handleSelect",b,$,M)},{content:_(()=>[t(f,{value:"edit"},{default:_(()=>[t(w),M0]),_:1}),t(f,{value:"delete"},{default:_(()=>[t(V),z0]),_:1})]),default:_(()=>[t(a)]),_:2},1032,["onSelect"])])],8,x0))),128))])):j("",!0)])}),128))])],2)}const R0=C(m0,[["render",I0],["__scopeId","data-v-4790771b"]]),S0=B({components:{Slider:K,DialogWrap:A,MessageInput:W,TopBar:Q,Directory:_0,RecordList:R0},setup(){const{helper:e}=q("$global"),g=["有没有关于AI agent的论文"],v=k(!1),d=k(!1),p=k([{name:"今天",list:["你必须知道的8种产品设计能力提升技巧","干货|学会写简历,轻松拿offer","探索了5种改善移动用户体验的绝佳做","通知必读,再不看就晚啦","最佳产品管理书籍在此,获取职场上升上"]},{name:"昨天",list:["探索了5种改善移动用户体验的绝佳做","面试攻略:超级加分的10个面试满分小技"]},{name:"过去7天",list:["你必须知道的8种产品设计能力提升技巧","干货|学会写简历,轻松拿offer","探索了5种改善移动用户体验的绝佳做","通知必读,再不看就晚啦","最佳产品管理书籍在此,获取职场上升上"]},{name:"过去半年",list:["探索了5种改善移动用户体验的绝佳做","面试攻略:超级加分的10个面试满分小技"]},{name:"更久以前",list:["你必须知道的8种产品设计能力提升技巧","干货|学会写简历,轻松拿offer","探索了5种改善移动用户体验的绝佳做","通知必读,再不看就晚啦","最佳产品管理书籍在此,获取职场上升上"]}]),m=(a,w,f,V)=>{switch(a){case"delete":p.value[w].list.splice(f,1);break;case"edit":const I=document.getElementById(`recod-item-${w}-${f}`),i=I.cloneNode(),{width:$,height:R,top:N,left:M}=I.getBoundingClientRect();i.style.width=`${$}px`,i.style.height=`${R}px`,i.style.top=`${N}px`,i.style.left=`${M}px`,i.style.position="absolute";const b=document.createElement("input");b.value=p.value[w].list[f],b.style="width: 100%;height: 100%",i.append(b),e.setDialog(!0,i,()=>{b.focus()},()=>{p.value[w].list[f]=b.value});break}},r=()=>d.value=!0;return{recordList:p,isOpenRecord:d,readonly:v,setReadonly:a=>{v.value=a},suggestions:g,handleSelect:m,openRecord:r,closeRecord:()=>d.value=!1,chooseNav:a=>{switch(a){case 2:r();break}}}}}),C0={id:"app"},B0={class:"main"};function N0(e,g,v,d,p,m){const r=s("Directory"),u=s("Slider"),n=s("top-bar"),h=s("dialog-wrap"),a=s("message-input"),w=s("record-list");return l(),c("div",C0,[t(u,null,{default:_(()=>[t(r)]),_:1}),o("div",B0,[o("header",null,[t(n,{onChooseNav:e.chooseNav},null,8,["onChooseNav"])]),o("section",null,[t(h,{suggestions:e.suggestions,isSetting:!1,readonly:e.readonly,onSetReadonly:e.setReadonly},null,8,["suggestions","readonly","onSetReadonly"])]),o("footer",null,[t(a,{readonly:e.readonly},null,8,["readonly"])])]),t(w,{data:e.recordList,open:e.isOpenRecord,onCloseRecord:e.closeRecord,onHandleSelect:e.handleSelect},null,8,["data","open","onCloseRecord","onHandleSelect"])])}const L0=C(S0,[["render",N0],["__scopeId","data-v-4cef9df8"]]);export{L0 as default};