muryshev's picture
ui update
05a241e
raw
history blame
9.17 kB
import{s as pt,e as t,a as c,t as ut,c as l,l as _,g as o,b as h,d as it,f as r,m as a,i as We,h as e,p as k,u as ft,n as ht,r as vt,v as bt}from"../chunks/scheduler.OwA2AG0M.js";import{S as xt,i as _t}from"../chunks/index.JlSaLmPP.js";import{L as dt}from"../chunks/LogService.hUlSDADx.js";import{p as kt}from"../chunks/ProgressBar.svelte_svelte_type_style_lang.9muE4jOP.js";function mt(s){let w,v="Пользовательские логи",D,m,b,d,C,A,y,S,g,z,P,R,E,be=`Поля для экспорта
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 20" fill="currentColor" class="w-6 h-6"><path fill-rule="evenodd" d="M12 14.5a.75.75 0 01-.53-.22l-4.25-4.25a.75.75 0 011.06-1.06L12 12.69l3.72-3.72a.75.75 0 011.06 1.06l-4.25 4.25a.75.75 0 01-.53.22z" clip-rule="evenodd"></path></svg>`,de,N,le,n,T,I,pe,j,xe="Промпт",fe,U,B,_e,x,L="Ответ LLM",ve,f,V,Ue,ae,Xe="Результаты поиска",Be,F,q,De,ne,Ye="Выбранные результаты поиска",Ne,M,H,Ae,se,Ze="Параметры",Se,O,J,ze,ce,$e="Релевантные консультации",Re,G,K,je,oe,et="Запрос",Ve,Q,W,Fe,re,tt="Комментарий",qe,X,Y,Me,ue,lt="Дата создания",He,Z,$,Oe,ie,at="Дата обновления",Je,he,ee,nt="Экспорт Excel",Ge,st;return{c(){w=t("h1"),w.textContent=v,D=c(),m=t("div"),b=t("div"),d=t("div"),C=t("label"),A=ut(`Дата начала:
`),y=t("input"),S=c(),g=t("label"),z=ut(`Дата конца:
`),P=t("input"),R=c(),E=t("button"),E.innerHTML=be,de=c(),N=t("div"),le=t("div"),n=t("label"),T=t("div"),I=t("input"),pe=c(),j=t("p"),j.textContent=xe,fe=c(),U=t("label"),B=t("input"),_e=c(),x=t("p"),x.textContent=L,ve=c(),f=t("label"),V=t("input"),Ue=c(),ae=t("p"),ae.textContent=Xe,Be=c(),F=t("label"),q=t("input"),De=c(),ne=t("p"),ne.textContent=Ye,Ne=c(),M=t("label"),H=t("input"),Ae=c(),se=t("p"),se.textContent=Ze,Se=c(),O=t("label"),J=t("input"),ze=c(),ce=t("p"),ce.textContent=$e,Re=c(),G=t("label"),K=t("input"),je=c(),oe=t("p"),oe.textContent=et,Ve=c(),Q=t("label"),W=t("input"),Fe=c(),re=t("p"),re.textContent=tt,qe=c(),X=t("label"),Y=t("input"),Me=c(),ue=t("p"),ue.textContent=lt,He=c(),Z=t("label"),$=t("input"),Oe=c(),ie=t("p"),ie.textContent=at,Je=c(),he=t("div"),ee=t("button"),ee.textContent=nt,this.h()},l(u){w=l(u,"H1",{"data-svelte-h":!0}),_(w)!=="svelte-pofs8j"&&(w.textContent=v),D=o(u),m=l(u,"DIV",{});var p=h(m);b=l(p,"DIV",{class:!0});var ke=h(b);d=l(ke,"DIV",{class:!0});var te=h(d);C=l(te,"LABEL",{});var Ke=h(C);A=it(Ke,`Дата начала:
`),y=l(Ke,"INPUT",{type:!0}),Ke.forEach(r),S=o(te),g=l(te,"LABEL",{});var Qe=h(g);z=it(Qe,`Дата конца:
`),P=l(Qe,"INPUT",{type:!0}),Qe.forEach(r),R=o(te),E=l(te,"BUTTON",{class:!0,"data-svelte-h":!0}),_(E)!=="svelte-szcpq9"&&(E.innerHTML=be),de=o(te),N=l(te,"DIV",{class:!0,"data-popup":!0});var ct=h(N);le=l(ct,"DIV",{});var ot=h(le);n=l(ot,"LABEL",{class:!0,id:!0});var i=h(n);T=l(i,"DIV",{class:!0});var me=h(T);I=l(me,"INPUT",{class:!0,type:!0}),pe=o(me),j=l(me,"P",{"data-svelte-h":!0}),_(j)!=="svelte-1r1lhxs"&&(j.textContent=xe),me.forEach(r),fe=o(i),U=l(i,"LABEL",{class:!0});var Ce=h(U);B=l(Ce,"INPUT",{class:!0,type:!0}),_e=o(Ce),x=l(Ce,"P",{"data-svelte-h":!0}),_(x)!=="svelte-1t98vry"&&(x.textContent=L),Ce.forEach(r),ve=o(i),f=l(i,"LABEL",{class:!0});var ge=h(f);V=l(ge,"INPUT",{class:!0,type:!0}),Ue=o(ge),ae=l(ge,"P",{"data-svelte-h":!0}),_(ae)!=="svelte-15yeo0d"&&(ae.textContent=Xe),ge.forEach(r),Be=o(i),F=l(i,"LABEL",{class:!0});var Ee=h(F);q=l(Ee,"INPUT",{class:!0,type:!0}),De=o(Ee),ne=l(Ee,"P",{"data-svelte-h":!0}),_(ne)!=="svelte-2trpqh"&&(ne.textContent=Ye),Ee.forEach(r),Ne=o(i),M=l(i,"LABEL",{class:!0});var Le=h(M);H=l(Le,"INPUT",{class:!0,type:!0}),Ae=o(Le),se=l(Le,"P",{"data-svelte-h":!0}),_(se)!=="svelte-1fv4577"&&(se.textContent=Ze),Le.forEach(r),Se=o(i),O=l(i,"LABEL",{class:!0});var we=h(O);J=l(we,"INPUT",{class:!0,type:!0}),ze=o(we),ce=l(we,"P",{"data-svelte-h":!0}),_(ce)!=="svelte-1ajbauh"&&(ce.textContent=$e),we.forEach(r),Re=o(i),G=l(i,"LABEL",{class:!0});var ye=h(G);K=l(ye,"INPUT",{class:!0,type:!0}),je=o(ye),oe=l(ye,"P",{"data-svelte-h":!0}),_(oe)!=="svelte-1s3b98z"&&(oe.textContent=et),ye.forEach(r),Ve=o(i),Q=l(i,"LABEL",{class:!0});var Pe=h(Q);W=l(Pe,"INPUT",{class:!0,type:!0}),Fe=o(Pe),re=l(Pe,"P",{"data-svelte-h":!0}),_(re)!=="svelte-16cwydz"&&(re.textContent=tt),Pe.forEach(r),qe=o(i),X=l(i,"LABEL",{class:!0});var Te=h(X);Y=l(Te,"INPUT",{class:!0,type:!0}),Me=o(Te),ue=l(Te,"P",{"data-svelte-h":!0}),_(ue)!=="svelte-tv34i0"&&(ue.textContent=lt),Te.forEach(r),He=o(i),Z=l(i,"LABEL",{class:!0});var Ie=h(Z);$=l(Ie,"INPUT",{class:!0,type:!0}),Oe=o(Ie),ie=l(Ie,"P",{"data-svelte-h":!0}),_(ie)!=="svelte-1g2zmpw"&&(ie.textContent=at),Ie.forEach(r),i.forEach(r),ot.forEach(r),ct.forEach(r),te.forEach(r),Je=o(ke),he=l(ke,"DIV",{class:!0});var rt=h(he);ee=l(rt,"BUTTON",{class:!0,"data-svelte-h":!0}),_(ee)!=="svelte-77urvm"&&(ee.textContent=nt),rt.forEach(r),ke.forEach(r),p.forEach(r),this.h()},h(){a(y,"type","date"),a(P,"type","date"),a(E,"class","btn variant-outline-tertiary w-48 justify-between"),a(I,"class","checkbox accent-white"),a(I,"type","checkbox"),a(T,"class","flex items-center space-x-2 mx-2"),a(B,"class","checkbox accent-white"),a(B,"type","checkbox"),a(U,"class","flex items-center space-x-2"),a(V,"class","checkbox accent-white"),a(V,"type","checkbox"),a(f,"class","flex items-center space-x-2"),a(q,"class","checkbox accent-white"),a(q,"type","checkbox"),a(F,"class","flex items-center space-x-2"),a(H,"class","checkbox accent-white"),a(H,"type","checkbox"),a(M,"class","flex items-center space-x-2"),a(J,"class","checkbox accent-white"),a(J,"type","checkbox"),a(O,"class","flex items-center space-x-2"),a(K,"class","checkbox accent-white"),a(K,"type","checkbox"),a(G,"class","flex items-center space-x-2"),a(W,"class","checkbox accent-white"),a(W,"type","checkbox"),a(Q,"class","flex items-center space-x-2"),a(Y,"class","checkbox accent-white"),a(Y,"type","checkbox"),a(X,"class","flex items-center space-x-2"),a($,"class","checkbox accent-white"),a($,"type","checkbox"),a(Z,"class","flex items-center space-x-2"),a(n,"class","flex items-left space-x-2 svelte-1szjsif"),a(n,"id","fields_container"),a(N,"class","card p-4 w-150 shadow-xl z-10"),a(N,"data-popup","popupFeatured"),a(d,"class","filters svelte-1szjsif"),a(ee,"class","btn variant-filled"),a(he,"class","flex space-x-2 items-center"),a(b,"class","export_bar svelte-1szjsif")},m(u,p){We(u,w,p),We(u,D,p),We(u,m,p),e(m,b),e(b,d),e(d,C),e(C,A),e(C,y),e(d,S),e(d,g),e(g,z),e(g,P),e(d,R),e(d,E),e(d,de),e(d,N),e(N,le),e(le,n),e(n,T),e(T,I),I.checked=s[0],e(T,pe),e(T,j),e(n,fe),e(n,U),e(U,B),B.checked=s[1],e(U,_e),e(U,x),e(n,ve),e(n,f),e(f,V),V.checked=s[2],e(f,Ue),e(f,ae),e(n,Be),e(n,F),e(F,q),q.checked=s[3],e(F,De),e(F,ne),e(n,Ne),e(n,M),e(M,H),H.checked=s[4],e(M,Ae),e(M,se),e(n,Se),e(n,O),e(O,J),J.checked=s[5],e(O,ze),e(O,ce),e(n,Re),e(n,G),e(G,K),K.checked=s[6],e(G,je),e(G,oe),e(n,Ve),e(n,Q),e(Q,W),W.checked=s[7],e(Q,Fe),e(Q,re),e(n,qe),e(n,X),e(X,Y),Y.checked=s[8],e(X,Me),e(X,ue),e(n,He),e(n,Z),e(Z,$),$.checked=s[9],e(Z,Oe),e(Z,ie),e(b,Je),e(b,he),e(he,ee),Ge||(st=[k(y,"change",s[11]),k(P,"change",s[12]),ft(kt.call(null,E,s[13])),k(I,"change",s[14]),k(B,"change",s[15]),k(V,"change",s[16]),k(q,"change",s[17]),k(H,"change",s[18]),k(J,"change",s[19]),k(K,"change",s[20]),k(W,"change",s[21]),k(Y,"change",s[22]),k($,"change",s[23]),k(ee,"click",s[24])],Ge=!0)},p(u,[p]){p&1&&(I.checked=u[0]),p&2&&(B.checked=u[1]),p&4&&(V.checked=u[2]),p&8&&(q.checked=u[3]),p&16&&(H.checked=u[4]),p&32&&(J.checked=u[5]),p&64&&(K.checked=u[6]),p&128&&(W.checked=u[7]),p&256&&(Y.checked=u[8]),p&512&&($.checked=u[9])},i:ht,o:ht,d(u){u&&(r(w),r(D),r(m)),Ge=!1,vt(st)}}}function Ct(s,w,v){let D,m,b=!0,d=!0,C=!0,A=!0,y=!0,S=!0,g=!0,z=!0,P=!0,R=!0;async function E(x){if(x==="json")await dt.exportToJson(D,m);else if(x==="excel"){const L=await dt.exportToExcel(D,m,[b?"llmPrompt":"",d?"llmResponse":"",C?"searchResults":"",A?"selectedSearchResults":"",y?"uiSettings":"",S?"consultations":"",g?"userRequest":"",z?"userComment":"",P?"dateCreated":"",R?"dateUpdated":""]);if(L!=null){const ve=window.URL.createObjectURL(L),f=document.createElement("a");f.href=ve,f.download=`Журнал ответов с ${D?.toLocaleDateString()??"-"} по ${m?.toLocaleDateString()??"-"}.xlsx`,document.body.appendChild(f),f.click(),f.remove()}}}function be(x){const L=x.target;D=L.value?new Date(L.value):void 0}function de(x){const L=x.target;m=L.value?new Date(L.value):void 0}bt(async()=>{});const N={event:"click",target:"popupFeatured",placement:"bottom"};function le(){b=this.checked,v(0,b)}function n(){d=this.checked,v(1,d)}function T(){C=this.checked,v(2,C)}function I(){A=this.checked,v(3,A)}function pe(){y=this.checked,v(4,y)}function j(){S=this.checked,v(5,S)}function xe(){g=this.checked,v(6,g)}function fe(){z=this.checked,v(7,z)}function U(){P=this.checked,v(8,P)}function B(){R=this.checked,v(9,R)}return[b,d,C,A,y,S,g,z,P,R,E,be,de,N,le,n,T,I,pe,j,xe,fe,U,B,()=>E("excel")]}class yt extends xt{constructor(w){super(),_t(this,w,Ct,mt,pt,{})}}export{yt as component};