1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[550],{7736:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/chatdata/chatdata",function(){return a(4053)}])},3851:function(e,t,a){"use strict";a.d(t,{Z:function(){return m}});var r=a(5893),s=a(7294),n=a(9583),l=a(3299),i=a(1163),o=a(9828),u=a(7103),c=a(1664),d=a.n(c);function m(){let e=(0,s.useRef)(),[t,a]=(0,s.useState)(!1),[c,m]=(0,s.useState)("/"),[p,b]=(0,s.useState)([]),[h,x]=(0,s.useState)(""),[f,g]=(0,s.useState)(!1),[k,j]=(0,s.useState)(""),[w,y]=(0,s.useState)(""),[v,N]=(0,s.useState)(""),S=t=>{e.current&&!e.current.contains(t.target)&&g(!1)};(0,s.useEffect)(()=>(f?document.addEventListener("mousedown",S):document.removeEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}),[f]);let D=e=>{e.preventDefault()},E=[{name:"Home",link:"/",subTabs:[]},{name:"Builder",link:"/builder",subTabs:[{name:"ë§ë¤ê¸°",link:"/builder/builder"},{name:"목ë¡ë³´ê¸°",link:"/builder/build_list"}]},{name:"Prompt",link:"/prompt",subTabs:[{name:"ìì±ë²",link:"/prompt/guide"},{name:"ëíí´ë³´ê¸°",link:"/prompt/chat_test"},{name:"ëµë³ë¹êµ",link:"/prompt/reply_comp"}]},{name:"Chat Data",link:"/chatdata",subTabs:[]},{name:"Support",link:"/support",subTabs:[{name:"ê³µì§ì¬í",link:"/support/notice"},{name:"ì§ë¬¸ê²ìí",link:"/support/qna"},{name:"ê°ì ì ì",link:"/support/suggestion"}]}],I=(0,i.useRouter)();(0,s.useEffect)(()=>{let e=I.pathname;_(e),N(e)},[I.pathname]);let _=e=>{let t=E.find(t=>t.link===e);if(!t){for(let a of E)if(a.subTabs.find(t=>t.link===e)){t=a;break}}t?(N(t.link),m(t.link),b(t.subTabs)):b([])},{data:C}=(0,l.useSession)({required:!1,onUnchanged:"ignore"}),T=(0,o.hJ)(u.db,"aptLogs"),L=async()=>{try{await (0,l.signIn)()}catch(e){console.error("Error during sign in: ",e),alert("ë¡ê·¸ì¸ ìë¬. íì´ì§ì ë¤ì ì ìí´ì£¼ì¸ì\uD83D\uDE25 \nì¤ë¥ê° ì§ìëë©´ ê´ë¦¬ììê² ë§í´ì£¼ì¸ì\uD83E\uDD14")}};return(0,s.useEffect)(()=>{if(C&&!t){let e=async()=>{try{await (0,o.ET)(T,{userId:C.user.id,userName:C.user.name,timestamp:new Date().toLocaleString("ko-KR",{timeZone:"Asia/Seoul"})})}catch(e){console.error("Error adding login event: ",e),alert("ë¡ê·¸ì¸ ê¸°ë¡ ìë¬. íì´ì§ì ë¤ì ì ìí´ì£¼ì¸ì\uD83D\uDE25 \nì¤ë¥ê° ì§ìëë©´ ê´ë¦¬ììê² ë§í´ì£¼ì¸ì\uD83E\uDD14")}};e(),a(!0)}else C||a(!1);C&&C.user&&(j(C.user.name),y(C.user.id))},[C]),(0,r.jsxs)("header",{className:"flex flex-col w-full top-0 bg-white dark:bg-slate-800 text-slate-900 dark:text-slate-400 fixed",style:{height:"120px"},onMouseLeave:()=>_(v),children:[(0,r.jsx)("div",{className:"h-11 border-b justify-between items-center",children:(0,r.jsxs)("div",{className:"flex items-center left-0",children:[(0,r.jsxs)("form",{ref:e,onSubmit:D,className:"flex items-center relative z-20",children:[(0,r.jsx)("input",{type:"text",placeholder:"Search",className:"transition-all ease-out duration-500 border rounded-lg mr-4 p-2 ".concat(f?"w-60 sm:w-80 opacity-100":"w-0 opacity-0"),value:h,onChange:e=>x(e.target.value)}),(0,r.jsx)("button",{className:"absolute right-0 top-0 h-full bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold p-2 rounded-r inline-flex items-center",type:"submit",onClick:()=>g(!f),children:(0,r.jsx)(n.U41,{})})]}),C?(0,r.jsxs)("span",{className:"absolute right-2 z-10",children:[k,"ë, ìë
íì¸ì\uD83D\uDE00",(0,r.jsx)("button",{className:"bg-blue-500 hover:bg-blue-700 text-white text-xs md:text-base font-bold py-2 px-2 rounded ml-2 min-w-24",onClick:()=>(0,l.signOut)(),children:"ë¡ê·¸ìì"})]}):(0,r.jsx)("button",{className:"absolute right-2 bg-blue-500 hover:bg-blue-700 text-white text-xs md:text-base font-bold py-2 px-2 rounded ml-2 min-w-24",onClick:()=>L(),children:"ë¡ê·¸ì¸"})]})}),(0,r.jsx)("div",{className:"h-8 sm:h-10 border-b grid grid-cols-5 text-xs sm:text-lg font-bold text-center items-center justify-center pl-1 pr-1 sm:pl-10 sm:pr-10",children:E.map(e=>(0,r.jsx)("button",{name:e.name,onMouseEnter:()=>_(e.link),onClick:()=>_(e.link),className:"tab ".concat(c===e.link?"underline cursor-pointer":"cursor-pointer"),children:(0,r.jsx)(d(),{href:e.link,children:e.name})},e.link))}),(0,r.jsx)("div",{className:"h-8 sm:h-10 border-b grid grid-cols-4 justify-between text-xs sm:text-base font-bold text-center items-center justify-center pl-3 pr-3 sm:pl-10 sm:pr-10",children:p.map(e=>(0,r.jsx)("button",{name:e.name,className:"tab ".concat(v===e.link?"underline cursor-pointer":"cursor-pointer"),children:(0,r.jsx)(d(),{href:e.link,children:e.name})},e.link))})]})}},7103:function(e,t,a){"use strict";a.d(t,{db:function(){return i}});var r=a(3977),s=a(9828),n=a(1259);let l=(0,r.ZF)({apiKey:"AIzaSyAIXWBZmop345JjhO5hVlZYZkUvdDT12OU",authDomain:"chatapt2.firebaseapp.com",projectId:"chatapt2",storageBucket:"chatchatapt2.appspot.com",messagingSenderId:"873515338086",appId:"1:873515338086:web:fabb5ad575599b471aa0a7",measurementId:"G-QYH0Y63D6X"}),i=(0,s.ad)(l);(0,n.v0)(l)},4053:function(e,t,a){"use strict";a.r(t);var r=a(5893),s=a(7294),n=a(9828),l=a(7103),i=a(3851);
1t.default=function(){let[e,t]=(0,s.useState)([]),[a,o]=(0,s.useState)(""),[u,c]=(0,s.useState)("timestamp"),[d,m]=(0,s.useState)("asc"),[p,b]=(0,s.useState)({}),h=async()=>{let e=(0,n.hJ)(l.db,"aptChats"),a=(0,n.IO)(e,(0,n.Xo)(u,d)),r=await (0,n.PL)(a),s=r.docs.map(e=>e.data());t(s)};(0,s.useEffect)(()=>{h()},[]);let x=(0,s.useMemo)(()=>{let t=[...e];for(let[e,a]of(u&&t.sort((e,t)=>"asc"===d?e[u]-t[u]:t[u]-e[u]),Object.entries(p)))a&&(t=t.filter(t=>t[e]===a));return a&&(t=t.filter(e=>e.botId===a)),t},[e,u,d,p,a]),f=(0,s.useMemo)(()=>{let e={};for(let t of x)for(let[a,r]of Object.entries(t))e[a]||(e[a]=new Set),e[a].add(r);return e},[x]),g=Array.from(f.botId||[]),k=e=>{e===u?m("asc"===d?"desc":"asc"):(c(e),m("asc"))},j=(e,t)=>{b(a=>{if(""!==t)return{...a,[e]:t};{let{[e]:t,...r}=a;return r}})},w=e=>{let t=new Date(e).toLocaleString("ko-KR",{timeZone:"Asia/Seoul"});return t},y=[{para:"userId",name:"User ID",width:"100px",filterable:!0,sortable:!0},{para:"userName",name:"User Name",width:"100px",filterable:!0,sortable:!0},{para:"role",name:"Role",width:"100px",filterable:!0,sortable:!0},{para:"content",name:"Content",width:"300px",filterable:!1,sortable:!1},{para:"timestamp",name:"TimeStamp",width:"100.35px",wrap:"break-word",filterable:!1,sortable:!0}];return(0,r.jsxs)("div",{className:"justify-center min-h-screen py-2 bg-white dark:bg-slate-800 text-blue-500 dark:text-blue-200",children:[(0,r.jsx)(i.Z,{}),(0,r.jsxs)("div",{className:"flex flex-wrap justify-center items-center mt-32",children:["Select the Bot ID:",(0,r.jsxs)("select",{value:a,onChange:e=>o(e.target.value),className:"px-1 py-1 bg-white dark:bg-gray-700 text-blue-500 dark:text-blue-200",children:[(0,r.jsx)("option",{value:"",children:"All Bot IDs"}),g.map((e,t)=>(0,r.jsx)("option",{value:e,children:e},t))]})]}),(0,r.jsxs)("table",{className:"mx-2 table-auto border border-gray-200 dark:border-gray-700",children:[(0,r.jsx)("thead",{children:(0,r.jsx)("tr",{children:y.map((e,t)=>(0,r.jsxs)("th",{className:"".concat(e.width," border border-gray-200 dark:border-gray-700"),children:[(0,r.jsx)("div",{className:"text-center",children:e.name}),e.filterable&&(0,r.jsxs)("select",{value:p[e.para]||"",onChange:t=>j(e.para,t.target.value),style:{maxWidth:"100px"},className:"px-1 py-1 bg-white dark:bg-gray-700 text-blue-500 dark:text-blue-200",children:[(0,r.jsx)("option",{value:"",children:"All"}),f[e.para]&&[...f[e.para]].map((e,t)=>(0,r.jsx)("option",{value:e,children:e},t))]}),e.sortable&&(0,r.jsx)("div",{children:(0,r.jsx)("button",{className:"mr-1",onClick:()=>k(e.para),children:u===e.para&&(0,r.jsx)("span",{children:"asc"===d?"â":"â"})})})]},t))})}),(0,r.jsx)("tbody",{children:x.map((e,t)=>(0,r.jsx)("tr",{children:y.map((t,a)=>(0,r.jsx)("td",{className:"text-center border border-gray-200 dark:border-gray-700",children:"userId"===t.para?"".concat(e[t.para].slice(0,7),"..."):"timestamp"===t.para?w(e[t.para]):e[t.para]},a))},t))})]})]})}}},function(e){e.O(0,[445,16,551,345,774,888,179],function(){return e(e.s=7736)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.