khoj 1.36.6.dev4__py3-none-any.whl → 1.36.6.dev5__py3-none-any.whl
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.
- khoj/interface/compiled/404/index.html +2 -2
- khoj/interface/compiled/_next/static/chunks/{4986-fde2ef8d6b568939.js → 4986-d19b9ab0079521d7.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/agents/{page-2f55f9d0da49bf31.js → page-fbe2c1c661cd14ac.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/{page-d0a630a2b4ecc41d.js → page-ad620b194fd508fe.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/{page-9c0a2df3e33c029b.js → page-4108f46796c1c606.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/{page-642bd02fc4f16606.js → page-f91e6a6a849baf5e.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/search/{layout-ff081947c70ea9b7.js → layout-ab5dbb69fb914900.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/search/{page-7c80e369ee1cdfad.js → page-30e231665f1f3796.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/{page-9939a20613b25901.js → page-924a7308250ed0eb.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/{layout-94a33aa0eae034fc.js → layout-2ce0cb95b1219d97.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-6253896a84300e9b.js → page-ffcb3ce5c6af9988.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/{webpack-63715907cbdf16c6.js → webpack-79b7e98c584222f7.js} +1 -1
- khoj/interface/compiled/_next/static/css/{804ceddd6c935d4a.css → 8051073dc55b92b3.css} +1 -1
- khoj/interface/compiled/_next/static/css/f29752d6e1be7624.css +1 -0
- khoj/interface/compiled/agents/index.html +2 -2
- khoj/interface/compiled/agents/index.txt +2 -2
- khoj/interface/compiled/automations/index.html +2 -2
- khoj/interface/compiled/automations/index.txt +3 -3
- khoj/interface/compiled/chat/index.html +2 -2
- khoj/interface/compiled/chat/index.txt +2 -2
- khoj/interface/compiled/index.html +2 -2
- khoj/interface/compiled/index.txt +2 -2
- khoj/interface/compiled/search/index.html +2 -2
- khoj/interface/compiled/search/index.txt +3 -3
- khoj/interface/compiled/settings/index.html +2 -2
- khoj/interface/compiled/settings/index.txt +5 -5
- khoj/interface/compiled/share/chat/index.html +2 -2
- khoj/interface/compiled/share/chat/index.txt +3 -3
- {khoj-1.36.6.dev4.dist-info → khoj-1.36.6.dev5.dist-info}/METADATA +1 -1
- {khoj-1.36.6.dev4.dist-info → khoj-1.36.6.dev5.dist-info}/RECORD +41 -41
- khoj/interface/compiled/_next/static/css/55d4a822f8d94b67.css +0 -1
- /khoj/interface/compiled/_next/static/chunks/{1915-233ac8a122732d6b.js → 1915-4b7980a58fb630d6.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{2117-ce1f0a4598f5e4fe.js → 2117-f99825f0a867a42d.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{4363-9870bda67c2cf031.js → 4363-ac51bce40b6fc313.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{4447-6e47461d1100c3cc.js → 4447-30959771ff58d99d.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{8667-8136f74e9a086fca.js → 8667-adbe6017a66cef10.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{9259-fa40e7cf2ca28e04.js → 9259-5be50737cfe989bc.js} +0 -0
- /khoj/interface/compiled/_next/static/{xF7GE1UTN2UBkRDAbvano → mj3LRaTV49NoToQFKNZbZ}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{xF7GE1UTN2UBkRDAbvano → mj3LRaTV49NoToQFKNZbZ}/_ssgManifest.js +0 -0
- {khoj-1.36.6.dev4.dist-info → khoj-1.36.6.dev5.dist-info}/WHEEL +0 -0
- {khoj-1.36.6.dev4.dist-info → khoj-1.36.6.dev5.dist-info}/entry_points.txt +0 -0
- {khoj-1.36.6.dev4.dist-info → khoj-1.36.6.dev5.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2797],{94114:function(e,s,t){Promise.resolve().then(t.bind(t,98537))},98537:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return el}});var l=t(57437),a=t(95186),n=t(2265),i=t(41816),r=t.n(i),c=t(19378),o=t(66070),d=t(73925),u=t(75216),h=t(91521),x=t(41648),m=t(41317),f=t(19841),j=t(45178),p=t(58619),N=t(2452),g=t(77168),v=t(87296),w=t(89203),b=t(11167),y=t(38513),S=t(35099),E=t(64697),T=t(74915),k=t(62869),C=t(27648),_=t(7436),D=t(60729),F=t(34124),I=t(6512),A=t(37104),O=t(14308),L=t(26110),R=t(77992),z=t(84190),M=t(92451),P=t(10407),Z=t(67782),W=t(94508);let U=e=>{let{className:s,...t}=e;return(0,l.jsx)("nav",{role:"navigation","aria-label":"pagination",className:(0,W.cn)("mx-auto flex w-full justify-center",s),...t})};U.displayName="Pagination";let Y=n.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,l.jsx)("ul",{ref:s,className:(0,W.cn)("flex flex-row items-center gap-1",t),...a})});Y.displayName="PaginationContent";let K=n.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,l.jsx)("li",{ref:s,className:(0,W.cn)("",t),...a})});K.displayName="PaginationItem";let B=e=>{let{className:s,isActive:t,size:a="icon",...n}=e;return(0,l.jsx)("a",{"aria-current":t?"page":void 0,className:(0,W.cn)((0,k.d)({variant:t?"outline":"ghost",size:a}),"no-underline",s),...n})};B.displayName="PaginationLink";let V=e=>{let{className:s,...t}=e;return(0,l.jsxs)(B,{"aria-label":"Go to previous page",size:"default",className:(0,W.cn)("gap-1 pl-2.5",s),...t,children:[(0,l.jsx)(M.Z,{className:"h-4 w-4"}),(0,l.jsx)("span",{children:"Previous"})]})};V.displayName="PaginationPrevious";let G=e=>{let{className:s,...t}=e;return(0,l.jsxs)(B,{"aria-label":"Go to next page",size:"default",className:(0,W.cn)("gap-1 pr-2.5",s),...t,children:[(0,l.jsx)("span",{children:"Next"}),(0,l.jsx)(P.Z,{className:"h-4 w-4"})]})};G.displayName="PaginationNext";let X=e=>{let{className:s,...t}=e;return(0,l.jsxs)("span",{"aria-hidden":!0,className:(0,W.cn)("flex h-9 w-9 items-center justify-center",s),...t,children:[(0,l.jsx)(Z.Z,{className:"h-4 w-4"}),(0,l.jsx)("span",{className:"sr-only",children:"More pages"})]})};X.displayName="PaginationEllipsis";var $=t(23518),q=t(57054),J=t(59199),H=t(32759);function Q(e){let{file:s,setSelectedFile:t,setSelectedFileFullText:a,handleDownload:n,handleDelete:i,isDeleting:r,selectedFileFullText:d}=e;return(0,l.jsxs)(o.Zb,{className:"animate-fade-in-up bg-secondary h-52",children:[(0,l.jsx)(o.Ol,{className:"p-2",children:(0,l.jsxs)(o.ll,{className:"flex items-center gap-2 justify-between",title:s.file_name,children:[(0,l.jsxs)(L.Vq,{children:[(0,l.jsx)(L.hg,{asChild:!0,children:(0,l.jsx)("div",{className:"text-sm font-medium truncate hover:text-clip hover:whitespace-normal cursor-pointer",onClick:()=>{a(""),t(s.file_name)},children:s.file_name.split("/").pop()})}),(0,l.jsxs)(L.cZ,{className:"max-w-fit",children:[(0,l.jsx)(L.fK,{children:(0,l.jsx)(L.$N,{children:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[s.file_name.split("/").pop(),(0,l.jsx)(k.z,{variant:"ghost",title:"Download as plaintext",onClick:()=>n(s.file_name,s.raw_text),children:(0,l.jsx)(x.U,{className:"h-4 w-4"})})]})})}),(0,l.jsx)(c.x,{className:"h-[50vh] w-[80vw]",children:(0,l.jsxs)("p",{className:"whitespace-pre-wrap break-words text-sm font-normal word-wrap",children:[!d&&(0,l.jsx)(O.l,{className:"mt-4",message:"Loading",iconClassName:"h-5 w-5"}),d]})})]})]}),(0,l.jsxs)(z.h_,{children:[(0,l.jsx)(z.$F,{children:(0,l.jsx)(k.z,{variant:"ghost",children:(0,l.jsx)(m.F,{className:"h-4 w-4"})})}),(0,l.jsx)(z.AW,{className:"flex flex-col gap-0 w-fit",children:(0,l.jsx)(z.Xi,{className:"p-0",children:(0,l.jsxs)(k.z,{variant:"ghost",className:"flex items-center gap-2 p-1 text-sm",onClick:()=>{i(s.file_name)},children:[(0,l.jsx)(f.r,{className:"h-4 w-4"}),(0,l.jsx)("span",{className:"text-xs",children:r?"Deleting...":"Delete"})]})})})]})]})}),(0,l.jsx)(o.aY,{className:"p-2",children:(0,l.jsx)(c.x,{className:"h-24 bg-background rounded-lg",children:(0,l.jsxs)("p",{className:"whitespace-pre-wrap break-words text-sm font-normal text-muted-foreground p-2 h-full",children:[s.raw_text.slice(0,100),"..."]})})}),(0,l.jsx)(o.eW,{className:"flex justify-end gap-2 p-2",children:(0,l.jsx)("div",{className:"text-muted-foreground text-xs",children:(0,_.o0)(s.updated_at)})})]})}function ee(e){var s;let t=e.note,a=(t.additional.file||"").startsWith("http"),n=a?t.additional.heading:t.additional.file.split("/").pop();return(0,l.jsxs)(o.Zb,{className:"bg-secondary h-full shadow-sm rounded-lg border border-muted mb-4 animate-fade-in-up",children:[(0,l.jsx)(o.Ol,{children:(0,l.jsxs)(o.ll,{className:"inline-flex gap-2",children:["notion"===(s=t.additional.source)?(0,l.jsx)(d.F,{className:"text-muted-foreground"}):"github"===s?(0,l.jsx)(u.b,{className:"text-muted-foreground"}):(0,l.jsx)(h.S,{className:"text-muted-foreground"}),n]})}),(0,l.jsxs)(o.aY,{children:[(0,l.jsx)("div",{className:"line-clamp-4 text-muted-foreground",children:t.entry}),(0,l.jsxs)(k.z,{onClick:()=>e.setFocusSearchResult(t),variant:"ghost",className:"p-0 mt-2 text-orange-400 hover:bg-inherit",children:["See content",(0,l.jsx)(j.o,{className:"inline ml-2"})]})]}),a&&(0,l.jsx)(o.eW,{children:(0,l.jsxs)("a",{href:t.additional.file,target:"_blank",className:"underline text-sm bg-muted p-1 rounded-lg text-muted-foreground",children:[(0,l.jsx)(p.a,{className:"inline m-2"}),t.additional.file]})})]})}let es=e=>{let{setUploadedFiles:s}=e,[t,a]=(0,n.useState)(!1),[i,r]=(0,n.useState)(null),[c,o]=(0,n.useState)(null),[d,u]=(0,n.useState)(!1),[h,x]=(0,n.useState)(0),m=(0,n.useRef)(null);function f(e){(0,J.ko)(e,r,u,o,s)}return(0,n.useEffect)(()=>{if(!d&&(x(0),!i&&!c)){let e=new KeyboardEvent("keydown",{key:"Escape"});document.dispatchEvent(e)}if(d){let e=setInterval(()=>{x(e=>{let s=e+(Math.floor(5*Math.random())+1);return s<100?s:100})},800);return()=>clearInterval(e)}},[d]),(0,l.jsxs)(L.Vq,{children:[(0,l.jsx)(L.hg,{asChild:!0,children:(0,l.jsxs)(k.z,{variant:"secondary",className:"mt-4",children:[(0,l.jsx)(N.a,{className:"h-4 w-4 mr-2"}),"Add Documents"]})}),(0,l.jsxs)(L.cZ,{children:[(0,l.jsxs)(L.fK,{children:[(0,l.jsx)(L.$N,{children:"Build Your Knowledge Base"}),(0,l.jsx)(L.Be,{children:"Add context for your Khoj knowledge base. Quickly search and get personalized answers from your documents."})]}),(0,l.jsxs)("div",{className:"flex flex-col h-full",onDragOver:function(e){e.preventDefault(),a(!0)},onDragLeave:function(e){e.preventDefault(),a(!1)},onDrop:function(e){e.preventDefault(),a(!1),e.dataTransfer.files&&f(e.dataTransfer.files)},onClick:function(){m&&m.current&&m.current.click()},children:[(0,l.jsx)("input",{type:"file",multiple:!0,ref:m,style:{display:"none"},onChange:function(e){e.target.files&&f(e.target.files)}}),(0,l.jsx)("div",{className:"flex-none p-4",children:d&&(0,l.jsx)(H.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:h})}),i&&(0,l.jsxs)("div",{className:"flex-none p-4 border-b rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(g.v,{className:"h-6 w-6"}),(0,l.jsx)("span",{children:i})]}),(0,l.jsx)(k.z,{onClick:()=>r(null),className:"mt-2",variant:"ghost",children:"Dismiss"})]}),c&&(0,l.jsxs)("div",{className:"flex-none p-4 border-b rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(g.v,{className:"h-6 w-6"}),(0,l.jsx)("span",{children:c})]}),(0,l.jsx)(k.z,{onClick:()=>o(null),className:"mt-2",variant:"ghost",children:"Dismiss"})]}),(0,l.jsx)("div",{className:"flex-none p-4 border-b ".concat(t?"animate-pulse border-blue-500 bg-blue-500 bg-opacity-25":"bg-secondary"," rounded-lg"),children:(0,l.jsx)("div",{className:"flex items-center justify-center w-full h-32 border-2 border-dashed border-gray-300 rounded-lg",children:t?(0,l.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,l.jsx)(v.u,{className:"h-6 w-6 mr-2"}),(0,l.jsx)("span",{children:"Drop files to upload"})]}):(0,l.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,l.jsx)(w.v,{className:"h-6 w-6 mr-2"}),(0,l.jsx)("span",{children:"Drag and drop files here"})]})})})]})]})]})};function et(e){let[s,t]=(0,n.useState)(!1),[a,i]=(0,n.useState)(e.inputText||""),[r,c]=(0,n.useState)(!1),[o,d]=(0,n.useState)("");return(0,n.useEffect)(()=>{e.inputText?"INITIALIZE"===e.inputText?(t(!0),d("")):(d(e.inputText),e.allFiles.includes(e.inputText)&&i(e.inputText)):d("")},[e.inputText]),(0,n.useEffect)(()=>{o&&!e.allFiles.includes(o)?(c(!0),i("")):o?(c(!1),i(o)):(c(!1),i(""))},[o,e.allFiles]),(0,n.useEffect)(()=>{s||e.onClose()},[s]),(0,l.jsxs)(q.J2,{open:s||r&&!!o,onOpenChange:t,children:[(0,l.jsx)(q.xo,{asChild:!0,children:(0,l.jsxs)(k.z,{variant:"outline",role:"combobox","aria-expanded":s,className:'justify-between" '.concat(e.isMobileWidth?"w-full":"w-[200px]"),children:[a?e.isMobileWidth?"✔️":"Selected":e.isMobileWidth?" ":"Select file",(0,l.jsx)(b.o,{className:"opacity-50"})]})}),(0,l.jsx)(q.yk,{className:"w-[200px] p-0",children:(0,l.jsxs)($.mY,{children:[(0,l.jsx)($.sZ,{placeholder:"Search files...",value:o,onInput:e=>d(e.currentTarget.value)}),(0,l.jsxs)($.e8,{children:[(0,l.jsx)($.rb,{children:"No files found."}),(0,l.jsx)($.fu,{children:e.allFiles.map(s=>(0,l.jsxs)($.di,{value:s,onSelect:s=>{i(s===a?"":s),t(!1),e.onChooseFile(s)},children:[s,(0,l.jsx)(y.J,{className:(0,W.cn)("ml-auto",a===s?"opacity-100":"opacity-0")})]},s))})]})]})})]})}function el(){let[e,s]=(0,n.useState)(""),[t,i]=(0,n.useState)(null),[d,u]=(0,n.useState)(!1),h=(0,n.useRef)(null),[x,m]=(0,n.useState)(null),[f,j]=(0,n.useState)([]),[N,g]=(0,n.useState)(null),[v,w]=(0,n.useState)(!0),[b,y]=(0,n.useState)([]),L=(0,n.useRef)(null),[z,M]=(0,n.useState)(null),[P,Z]=(0,n.useState)(void 0),[W,$]=(0,n.useState)(null),[q,J]=(0,n.useState)(!1),[H,el]=(0,n.useState)([]),[ea,en]=(0,n.useState)(0),[ei,er]=(0,n.useState)(1),{toast:ec}=(0,R.pm)(),eo=(0,_.IC)();function ed(e){if(s(e),!e.trim()){i(null);return}L.current&&clearTimeout(L.current),e.trim()&&(L.current=setTimeout(()=>{eu()},750))}function eu(){!d&&e.trim()&&(u(!0),fetch("/api/search?q=".concat(encodeURIComponent(e),"&client=web"),{method:"GET",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{i(e),u(!1)}).catch(e=>{console.error("Error:",e)}))}(0,n.useEffect)(()=>{fetch("/api/content/computer",{method:"GET",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{y(e)}).catch(e=>{console.error("Error loading files:",e)})},[]),(0,n.useEffect)(()=>{let s=e.match(/file:([^"\s]*|"[^"]*")?/);if(s){let e=s[1],t=null==e?void 0:e.replace(/"/g,"");t?Z(t):Z("INITIALIZE")}},[e]);let eh=async e=>{try{let s=await fetch("api/content/files?page=".concat(e));if(!s.ok)throw Error("Failed to fetch files");let t=await s.json(),l=t.files,a=t.num_pages;er(a),Array.isArray(l)&&j(l.toSorted())}catch(e){g("Failed to load files"),console.error("Error fetching files:",e)}finally{w(!1)}};(0,n.useEffect)(()=>{eh(ea)},[ea]);let ex=async e=>{try{let s=await fetch("/api/content/file?file_name=".concat(e));if(!s.ok)throw Error("Failed to fetch file");let t=await s.json();$(t.raw_text)}catch(e){g("Failed to load file"),console.error("Error fetching file:",e)}},em=(e,s)=>{let t=new Blob([s],{type:"text/plain"}),l=window.URL.createObjectURL(t),a=document.createElement("a");a.href=l,a.download="".concat(e.split("/").pop(),".txt"),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(l)};(0,n.useEffect)(()=>{z&&ex(z)},[z]),(0,n.useEffect)(()=>{eh(ea)},[]),(0,n.useEffect)(()=>{H.length>0&&(en(0),eh(0))},[H]);let ef=async e=>{J(!0);try{if(!(await fetch("/api/content/file?filename=".concat(e),{method:"DELETE"})).ok)throw Error("Failed to delete file");ec({title:"File deleted",description:"File ".concat(e," has been deleted"),variant:"default"}),eh(ea)}catch(s){ec({title:"Error deleting file",description:"Failed to delete file ".concat(e),variant:"destructive"})}finally{J(!1)}};return(0,l.jsxs)(D.Hn,{children:[(0,l.jsx)(F.S,{conversationId:""}),(0,l.jsxs)(D.kV,{children:[(0,l.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,l.jsx)(D.vP,{className:"-ml-1"}),(0,l.jsx)(I.Z,{orientation:"vertical",className:"mr-2 h-4"}),eo?(0,l.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,l.jsx)(A.VO,{className:"h-auto w-16"})}):(0,l.jsx)("h2",{className:"text-lg",children:"Search Your Knowledge Base"})]}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:"".concat(r().searchLayout),children:(0,l.jsx)("div",{className:"w-full md:w-5/6 mx-auto pt-6 md:pt-8",children:(0,l.jsxs)("div",{className:"p-4 w-full mx-auto",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center border-2 border-muted p-1 gap-1 rounded-lg flex-col md:flex-row",children:[(0,l.jsx)("div",{className:"relative flex-1 w-full",children:(0,l.jsx)(a.I,{autoFocus:!0,className:"border-none pl-4 focus-visible:ring-transparent focus-visible:ring-offset-transparent",onChange:e=>ed(e.currentTarget.value),onKeyDown:e=>{"Enter"===e.key&&eu()},ref:h,type:"search",placeholder:"Search Documents",value:e})}),(0,l.jsxs)("div",{id:"actions",className:"flex gap-2",children:[(0,l.jsx)(et,{allFiles:b,onChooseFile:t=>(function(t){var l;let a=e.replace(/file:([^"\s]*|"[^"]*")?/i,"").trim();s('file:"'.concat(t,'" ').concat(a)),null===(l=h.current)||void 0===l||l.focus(),eu()})(t),isMobileWidth:eo,inputText:P,onClose:()=>{var e;return null===(e=h.current)||void 0===e?void 0:e.focus()}}),(0,l.jsxs)(k.z,{className:"px-2 gap-2 inline-flex rounded-none items-center border-l border-gray-300 hover:text-gray-500",variant:"ghost",onClick:()=>eu(),children:[(0,l.jsx)(S.Y,{className:"h-4 w-4"}),(0,l.jsx)("span",{children:"Find"})]})]})]}),null===t&&(0,l.jsx)(es,{setUploadedFiles:el}),d&&(0,l.jsx)("div",{className:"mt-4 flex items-center justify-center",children:(0,l.jsx)(O.l,{className:"mt-4",message:"Searching",iconClassName:"h-5 w-5"})}),x&&(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsxs)(k.z,{onClick:()=>m(null),className:"mb-4",variant:"outline",children:[(0,l.jsx)(E.X,{className:"inline mr-2"}),"Back"]}),function(e){let s=(e.additional.file||"").startsWith("http"),t=s?e.additional.heading:e.additional.file.split("/").pop();return(0,l.jsxs)(o.Zb,{className:"bg-secondary h-full shadow-sm rounded-lg border border-muted mb-4 animate-fade-in-up",children:[(0,l.jsx)(o.Ol,{children:(0,l.jsx)(o.ll,{children:t})}),s&&(0,l.jsx)(o.eW,{children:(0,l.jsxs)("a",{href:e.additional.file,target:"_blank",className:"underline text-sm bg-muted p-3 rounded-lg text-muted-foreground flex items-center gap-2",children:[(0,l.jsx)(p.a,{className:"inline"}),e.additional.file]})}),(0,l.jsx)(o.aY,{children:(0,l.jsx)("div",{className:"text-m",children:e.entry})})]})}(x)]}),!x&&!d&&t&&t.length>0&&(0,l.jsxs)("div",{className:"mt-4 max-w-[92vw] break-all",children:[(0,l.jsxs)(k.z,{onClick:()=>ed(""),className:"mb-4",variant:"outline",children:[(0,l.jsx)(E.X,{className:"inline mr-2"}),"See All"]}),(0,l.jsx)(c.x,{className:"h-[80vh]",children:t.map((e,s)=>(0,l.jsx)(ee,{note:e,setFocusSearchResult:m},e["corpus-id"]))})]}),!d&&null===t&&!e.trim()&&(0,l.jsxs)("div",{className:"w-full mt-4",children:[v&&(0,l.jsx)("div",{className:"mt-4 flex items-center justify-center",children:(0,l.jsx)(O.l,{className:"mt-4",message:"Loading",iconClassName:"h-5 w-5"})}),N&&(0,l.jsx)("div",{className:"text-red-500",children:N}),!t&&!v&&0===f.length&&(0,l.jsxs)(o.Zb,{className:"flex flex-col items-center justify-center border-none shadow-none",children:[(0,l.jsxs)(o.Ol,{className:"flex flex-col items-center justify-center",children:[(0,l.jsx)(o.SZ,{className:"border-muted-foreground border w-fit rounded-lg mb-2 text-center text-lg p-4",children:(0,l.jsx)(T.D,{weight:"fill",className:"text-muted-foreground h-10 w-10"})}),(0,l.jsx)(o.ll,{className:"text-center",children:"Let's get started!"})]}),(0,l.jsxs)(o.aY,{children:[(0,l.jsx)("div",{className:"text-muted-foreground items-center justify-center text-center flex",children:'To use search, upload docs via the "Add Documents" button.'}),(0,l.jsx)(C.default,{href:"https://docs.khoj.dev/data-sources/share_your_data",className:"no-underline",children:(0,l.jsx)("div",{className:"mt-4 text-center text-secondary-foreground bg-secondary w-fit m-auto p-2 rounded-lg",children:"Learn More"})})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:f.map((e,s)=>(0,l.jsx)(Q,{file:e,index:s,setSelectedFile:M,setSelectedFileFullText:$,handleDownload:em,handleDelete:ef,isDeleting:q,selectedFileFullText:W},s))}),(0,l.jsx)(U,{children:(0,l.jsxs)(Y,{className:"p-0",children:[ea>0&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(V,{onClick:()=>en(ea-1)})}),ea>1&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(B,{onClick:()=>en(0),children:"1"})}),ea>2&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(X,{})}),ea>0&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(B,{onClick:()=>en(ea-1),children:ea})}),(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(B,{isActive:!0,children:ea+1})}),ea<ei-1&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(B,{onClick:()=>en(ea+1),children:ea+2})}),ea<ei-3&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(X,{})}),ea<ei-2&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(B,{onClick:()=>en(ei-1),children:ei})}),ea<ei-1&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(G,{onClick:()=>en(ea+1)})})]})})]})]})})})})]})]})}},32759:function(e,s,t){"use strict";t.d(s,{E:function(){return r}});var l=t(57437),a=t(2265),n=t(60610),i=t(94508);let r=a.forwardRef((e,s)=>{let{className:t,value:a,indicatorColor:r,...c}=e;return(0,l.jsx)(n.fC,{ref:s,className:(0,i.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...c,children:(0,l.jsx)(n.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(r),style:{transform:"translateX(-".concat(100-(a||0),"%)")}})})});r.displayName=n.fC.displayName},77992:function(e,s,t){"use strict";t.d(s,{pm:function(){return h}});var l=t(2265);let a=0,n=new Map,i=e=>{if(n.has(e))return;let s=setTimeout(()=>{n.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);n.set(e,s)},r=(e,s)=>{switch(s.type){case"ADD_TOAST":return{...e,toasts:[s.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===s.toast.id?{...e,...s.toast}:e)};case"DISMISS_TOAST":{let{toastId:t}=s;return t?i(t):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===t||void 0===t?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===s.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==s.toastId)}}},c=[],o={toasts:[]};function d(e){o=r(o,e),c.forEach(e=>{e(o)})}function u(e){let{...s}=e,t=(a=(a+1)%Number.MAX_SAFE_INTEGER).toString(),l=()=>d({type:"DISMISS_TOAST",toastId:t});return d({type:"ADD_TOAST",toast:{...s,id:t,open:!0,onOpenChange:e=>{e||l()}}}),{id:t,dismiss:l,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function h(){let[e,s]=l.useState(o);return l.useEffect(()=>(c.push(s),()=>{let e=c.indexOf(s);e>-1&&c.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},41816:function(e){e.exports={searchLayout:"search_searchLayout__fP3m0"}}},function(e){e.O(0,[2026,1607,3861,9259,8667,4363,6244,2509,2327,2971,2117,1744],function(){return e(e.s=94114)}),_N_E=e.O()}]);
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2797],{94114:function(e,s,t){Promise.resolve().then(t.bind(t,98537))},98537:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return el}});var l=t(57437),a=t(95186),n=t(2265),i=t(41816),r=t.n(i),c=t(19378),o=t(66070),d=t(73925),u=t(75216),h=t(91521),x=t(41648),m=t(41317),f=t(19841),j=t(45178),p=t(58619),N=t(2452),g=t(77168),v=t(87296),w=t(89203),b=t(11167),y=t(38513),S=t(35099),E=t(64697),T=t(74915),k=t(62869),C=t(27648),_=t(7436),D=t(60729),F=t(34124),I=t(6512),A=t(37104),O=t(14308),L=t(26110),R=t(77992),z=t(84190),M=t(92451),P=t(10407),Z=t(67782),W=t(94508);let U=e=>{let{className:s,...t}=e;return(0,l.jsx)("nav",{role:"navigation","aria-label":"pagination",className:(0,W.cn)("mx-auto flex w-full justify-center",s),...t})};U.displayName="Pagination";let Y=n.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,l.jsx)("ul",{ref:s,className:(0,W.cn)("flex flex-row items-center gap-1",t),...a})});Y.displayName="PaginationContent";let K=n.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,l.jsx)("li",{ref:s,className:(0,W.cn)("",t),...a})});K.displayName="PaginationItem";let B=e=>{let{className:s,isActive:t,size:a="icon",...n}=e;return(0,l.jsx)("a",{"aria-current":t?"page":void 0,className:(0,W.cn)((0,k.d)({variant:t?"outline":"ghost",size:a}),"no-underline",s),...n})};B.displayName="PaginationLink";let V=e=>{let{className:s,...t}=e;return(0,l.jsxs)(B,{"aria-label":"Go to previous page",size:"default",className:(0,W.cn)("gap-1 pl-2.5",s),...t,children:[(0,l.jsx)(M.Z,{className:"h-4 w-4"}),(0,l.jsx)("span",{children:"Previous"})]})};V.displayName="PaginationPrevious";let G=e=>{let{className:s,...t}=e;return(0,l.jsxs)(B,{"aria-label":"Go to next page",size:"default",className:(0,W.cn)("gap-1 pr-2.5",s),...t,children:[(0,l.jsx)("span",{children:"Next"}),(0,l.jsx)(P.Z,{className:"h-4 w-4"})]})};G.displayName="PaginationNext";let X=e=>{let{className:s,...t}=e;return(0,l.jsxs)("span",{"aria-hidden":!0,className:(0,W.cn)("flex h-9 w-9 items-center justify-center",s),...t,children:[(0,l.jsx)(Z.Z,{className:"h-4 w-4"}),(0,l.jsx)("span",{className:"sr-only",children:"More pages"})]})};X.displayName="PaginationEllipsis";var $=t(23518),q=t(57054),J=t(59199),H=t(32759);function Q(e){let{file:s,setSelectedFile:t,setSelectedFileFullText:a,handleDownload:n,handleDelete:i,isDeleting:r,selectedFileFullText:d}=e;return(0,l.jsxs)(o.Zb,{className:"animate-fade-in-up bg-secondary h-52",children:[(0,l.jsx)(o.Ol,{className:"p-2",children:(0,l.jsxs)(o.ll,{className:"flex items-center gap-2 justify-between",title:s.file_name,children:[(0,l.jsxs)(L.Vq,{children:[(0,l.jsx)(L.hg,{asChild:!0,children:(0,l.jsx)("div",{className:"text-sm font-medium truncate hover:text-clip hover:whitespace-normal cursor-pointer",onClick:()=>{a(""),t(s.file_name)},children:s.file_name.split("/").pop()})}),(0,l.jsxs)(L.cZ,{className:"max-w-fit",children:[(0,l.jsx)(L.fK,{children:(0,l.jsx)(L.$N,{children:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[s.file_name.split("/").pop(),(0,l.jsx)(k.z,{variant:"ghost",title:"Download as plaintext",onClick:()=>n(s.file_name,s.raw_text),children:(0,l.jsx)(x.U,{className:"h-4 w-4"})})]})})}),(0,l.jsx)(c.x,{className:"h-[50vh] w-[80vw]",children:(0,l.jsxs)("p",{className:"whitespace-pre-wrap break-words text-sm font-normal word-wrap",children:[!d&&(0,l.jsx)(O.l,{className:"mt-4",message:"Loading",iconClassName:"h-5 w-5"}),d]})})]})]}),(0,l.jsxs)(z.h_,{children:[(0,l.jsx)(z.$F,{children:(0,l.jsx)(k.z,{variant:"ghost",children:(0,l.jsx)(m.F,{className:"h-4 w-4"})})}),(0,l.jsx)(z.AW,{className:"flex flex-col gap-0 w-fit",children:(0,l.jsx)(z.Xi,{className:"p-0",children:(0,l.jsxs)(k.z,{variant:"ghost",className:"flex items-center gap-2 p-1 text-sm",onClick:()=>{i(s.file_name)},children:[(0,l.jsx)(f.r,{className:"h-4 w-4"}),(0,l.jsx)("span",{className:"text-xs",children:r?"Deleting...":"Delete"})]})})})]})]})}),(0,l.jsx)(o.aY,{className:"p-2",children:(0,l.jsx)(c.x,{className:"h-24 bg-background rounded-lg",children:(0,l.jsxs)("p",{className:"whitespace-pre-wrap break-words text-sm font-normal text-muted-foreground p-2 h-full",children:[s.raw_text.slice(0,100),"..."]})})}),(0,l.jsx)(o.eW,{className:"flex justify-end gap-2 p-2",children:(0,l.jsx)("div",{className:"text-muted-foreground text-xs",children:(0,_.o0)(s.updated_at)})})]})}function ee(e){var s;let t=e.note,a=(t.additional.file||"").startsWith("http"),n=a?t.additional.heading:t.additional.file.split("/").pop();return(0,l.jsxs)(o.Zb,{className:"bg-secondary h-full shadow-sm rounded-lg border border-muted mb-4 animate-fade-in-up",children:[(0,l.jsx)(o.Ol,{children:(0,l.jsxs)(o.ll,{className:"inline-flex gap-2",children:["notion"===(s=t.additional.source)?(0,l.jsx)(d.F,{className:"text-muted-foreground"}):"github"===s?(0,l.jsx)(u.b,{className:"text-muted-foreground"}):(0,l.jsx)(h.S,{className:"text-muted-foreground"}),n]})}),(0,l.jsxs)(o.aY,{children:[(0,l.jsx)("div",{className:"line-clamp-4 text-muted-foreground",children:t.entry}),(0,l.jsxs)(k.z,{onClick:()=>e.setFocusSearchResult(t),variant:"ghost",className:"p-0 mt-2 text-orange-400 hover:bg-inherit",children:["See content",(0,l.jsx)(j.o,{className:"inline ml-2"})]})]}),a&&(0,l.jsx)(o.eW,{children:(0,l.jsxs)("a",{href:t.additional.file,target:"_blank",className:"underline text-sm bg-muted p-1 rounded-lg text-muted-foreground",children:[(0,l.jsx)(p.a,{className:"inline m-2"}),t.additional.file]})})]})}let es=e=>{let{setUploadedFiles:s}=e,[t,a]=(0,n.useState)(!1),[i,r]=(0,n.useState)(null),[c,o]=(0,n.useState)(null),[d,u]=(0,n.useState)(!1),[h,x]=(0,n.useState)(0),m=(0,n.useRef)(null);function f(e){(0,J.ko)(e,r,u,o,s)}return(0,n.useEffect)(()=>{if(!d&&(x(0),!i&&!c)){let e=new KeyboardEvent("keydown",{key:"Escape"});document.dispatchEvent(e)}if(d){let e=setInterval(()=>{x(e=>{let s=e+(Math.floor(5*Math.random())+1);return s<100?s:100})},800);return()=>clearInterval(e)}},[d]),(0,l.jsxs)(L.Vq,{children:[(0,l.jsx)(L.hg,{asChild:!0,children:(0,l.jsxs)(k.z,{variant:"secondary",className:"mt-4",children:[(0,l.jsx)(N.a,{className:"h-4 w-4 mr-2"}),"Add Documents"]})}),(0,l.jsxs)(L.cZ,{children:[(0,l.jsxs)(L.fK,{children:[(0,l.jsx)(L.$N,{children:"Build Your Knowledge Base"}),(0,l.jsx)(L.Be,{children:"Add context for your Khoj knowledge base. Quickly search and get personalized answers from your documents."})]}),(0,l.jsxs)("div",{className:"flex flex-col h-full",onDragOver:function(e){e.preventDefault(),a(!0)},onDragLeave:function(e){e.preventDefault(),a(!1)},onDrop:function(e){e.preventDefault(),a(!1),e.dataTransfer.files&&f(e.dataTransfer.files)},onClick:function(){m&&m.current&&m.current.click()},children:[(0,l.jsx)("input",{type:"file",multiple:!0,ref:m,style:{display:"none"},onChange:function(e){e.target.files&&f(e.target.files)}}),(0,l.jsx)("div",{className:"flex-none p-4",children:d&&(0,l.jsx)(H.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:h})}),i&&(0,l.jsxs)("div",{className:"flex-none p-4 border-b rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(g.v,{className:"h-6 w-6"}),(0,l.jsx)("span",{children:i})]}),(0,l.jsx)(k.z,{onClick:()=>r(null),className:"mt-2",variant:"ghost",children:"Dismiss"})]}),c&&(0,l.jsxs)("div",{className:"flex-none p-4 border-b rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(g.v,{className:"h-6 w-6"}),(0,l.jsx)("span",{children:c})]}),(0,l.jsx)(k.z,{onClick:()=>o(null),className:"mt-2",variant:"ghost",children:"Dismiss"})]}),(0,l.jsx)("div",{className:"flex-none p-4 border-b ".concat(t?"animate-pulse border-blue-500 bg-blue-500 bg-opacity-25":"bg-secondary"," rounded-lg"),children:(0,l.jsx)("div",{className:"flex items-center justify-center w-full h-32 border-2 border-dashed border-gray-300 rounded-lg",children:t?(0,l.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,l.jsx)(v.u,{className:"h-6 w-6 mr-2"}),(0,l.jsx)("span",{children:"Drop files to upload"})]}):(0,l.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,l.jsx)(w.v,{className:"h-6 w-6 mr-2"}),(0,l.jsx)("span",{children:"Drag and drop files here"})]})})})]})]})]})};function et(e){let[s,t]=(0,n.useState)(!1),[a,i]=(0,n.useState)(e.inputText||""),[r,c]=(0,n.useState)(!1),[o,d]=(0,n.useState)("");return(0,n.useEffect)(()=>{e.inputText?"INITIALIZE"===e.inputText?(t(!0),d("")):(d(e.inputText),e.allFiles.includes(e.inputText)&&i(e.inputText)):d("")},[e.inputText]),(0,n.useEffect)(()=>{o&&!e.allFiles.includes(o)?(c(!0),i("")):o?(c(!1),i(o)):(c(!1),i(""))},[o,e.allFiles]),(0,n.useEffect)(()=>{s||e.onClose()},[s]),(0,l.jsxs)(q.J2,{open:s||r&&!!o,onOpenChange:t,children:[(0,l.jsx)(q.xo,{asChild:!0,children:(0,l.jsxs)(k.z,{variant:"outline",role:"combobox","aria-expanded":s,className:'justify-between" '.concat(e.isMobileWidth?"w-full":"w-[200px]"),children:[a?e.isMobileWidth?"✔️":"Selected":e.isMobileWidth?" ":"Select file",(0,l.jsx)(b.o,{className:"opacity-50"})]})}),(0,l.jsx)(q.yk,{className:"w-[200px] p-0",children:(0,l.jsxs)($.mY,{children:[(0,l.jsx)($.sZ,{placeholder:"Search files...",value:o,onInput:e=>d(e.currentTarget.value)}),(0,l.jsxs)($.e8,{children:[(0,l.jsx)($.rb,{children:"No files found."}),(0,l.jsx)($.fu,{children:e.allFiles.map(s=>(0,l.jsxs)($.di,{value:s,onSelect:s=>{i(s===a?"":s),t(!1),e.onChooseFile(s)},children:[s,(0,l.jsx)(y.J,{className:(0,W.cn)("ml-auto",a===s?"opacity-100":"opacity-0")})]},s))})]})]})})]})}function el(){let[e,s]=(0,n.useState)(""),[t,i]=(0,n.useState)(null),[d,u]=(0,n.useState)(!1),h=(0,n.useRef)(null),[x,m]=(0,n.useState)(null),[f,j]=(0,n.useState)([]),[N,g]=(0,n.useState)(null),[v,w]=(0,n.useState)(!0),[b,y]=(0,n.useState)([]),L=(0,n.useRef)(null),[z,M]=(0,n.useState)(null),[P,Z]=(0,n.useState)(void 0),[W,$]=(0,n.useState)(null),[q,J]=(0,n.useState)(!1),[H,el]=(0,n.useState)([]),[ea,en]=(0,n.useState)(0),[ei,er]=(0,n.useState)(1),{toast:ec}=(0,R.pm)(),eo=(0,_.IC)();function ed(e){if(s(e),!e.trim()){i(null);return}L.current&&clearTimeout(L.current),e.trim()&&(L.current=setTimeout(()=>{eu()},750))}function eu(){!d&&e.trim()&&(u(!0),fetch("/api/search?q=".concat(encodeURIComponent(e),"&client=web"),{method:"GET",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{i(e),u(!1)}).catch(e=>{console.error("Error:",e)}))}(0,n.useEffect)(()=>{fetch("/api/content/computer",{method:"GET",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{y(e)}).catch(e=>{console.error("Error loading files:",e)})},[]),(0,n.useEffect)(()=>{let s=e.match(/file:([^"\s]*|"[^"]*")?/);if(s){let e=s[1],t=null==e?void 0:e.replace(/"/g,"");t?Z(t):Z("INITIALIZE")}},[e]);let eh=async e=>{try{let s=await fetch("api/content/files?page=".concat(e));if(!s.ok)throw Error("Failed to fetch files");let t=await s.json(),l=t.files,a=t.num_pages;er(a),Array.isArray(l)&&j(l.toSorted())}catch(e){g("Failed to load files"),console.error("Error fetching files:",e)}finally{w(!1)}};(0,n.useEffect)(()=>{eh(ea)},[ea]);let ex=async e=>{try{let s=await fetch("/api/content/file?file_name=".concat(e));if(!s.ok)throw Error("Failed to fetch file");let t=await s.json();$(t.raw_text)}catch(e){g("Failed to load file"),console.error("Error fetching file:",e)}},em=(e,s)=>{let t=new Blob([s],{type:"text/plain"}),l=window.URL.createObjectURL(t),a=document.createElement("a");a.href=l,a.download="".concat(e.split("/").pop(),".txt"),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(l)};(0,n.useEffect)(()=>{z&&ex(z)},[z]),(0,n.useEffect)(()=>{eh(ea)},[]),(0,n.useEffect)(()=>{H.length>0&&(en(0),eh(0))},[H]);let ef=async e=>{J(!0);try{if(!(await fetch("/api/content/file?filename=".concat(e),{method:"DELETE"})).ok)throw Error("Failed to delete file");ec({title:"File deleted",description:"File ".concat(e," has been deleted"),variant:"default"}),eh(ea)}catch(s){ec({title:"Error deleting file",description:"Failed to delete file ".concat(e),variant:"destructive"})}finally{J(!1)}};return(0,l.jsxs)(D.Hn,{children:[(0,l.jsx)(F.S,{conversationId:""}),(0,l.jsxs)(D.kV,{children:[(0,l.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,l.jsx)(D.vP,{className:"-ml-1"}),(0,l.jsx)(I.Z,{orientation:"vertical",className:"mr-2 h-4"}),eo?(0,l.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,l.jsx)(A.VO,{className:"h-auto w-16"})}):(0,l.jsx)("h2",{className:"text-lg",children:"Search Your Knowledge Base"})]}),(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:"".concat(r().searchLayout),children:(0,l.jsx)("div",{className:"w-full md:w-5/6 mx-auto pt-6 md:pt-8",children:(0,l.jsxs)("div",{className:"p-4 w-full mx-auto",children:[(0,l.jsxs)("div",{className:"flex justify-between items-center border-2 border-muted p-1 gap-1 rounded-lg flex-col md:flex-row",children:[(0,l.jsx)("div",{className:"relative flex-1 w-full",children:(0,l.jsx)(a.I,{autoFocus:!0,className:"border-none pl-4 focus-visible:ring-transparent focus-visible:ring-offset-transparent",onChange:e=>ed(e.currentTarget.value),onKeyDown:e=>{"Enter"===e.key&&eu()},ref:h,type:"search",placeholder:"Search Documents",value:e})}),(0,l.jsxs)("div",{id:"actions",className:"flex gap-2",children:[(0,l.jsx)(et,{allFiles:b,onChooseFile:t=>(function(t){var l;let a=e.replace(/file:([^"\s]*|"[^"]*")?/i,"").trim();s('file:"'.concat(t,'" ').concat(a)),null===(l=h.current)||void 0===l||l.focus(),eu()})(t),isMobileWidth:eo,inputText:P,onClose:()=>{var e;return null===(e=h.current)||void 0===e?void 0:e.focus()}}),(0,l.jsxs)(k.z,{className:"px-2 gap-2 inline-flex rounded-none items-center border-l border-gray-300 hover:text-gray-500",variant:"ghost",onClick:()=>eu(),children:[(0,l.jsx)(S.Y,{className:"h-4 w-4"}),(0,l.jsx)("span",{children:"Find"})]})]})]}),null===t&&(0,l.jsx)(es,{setUploadedFiles:el}),d&&(0,l.jsx)("div",{className:"mt-4 flex items-center justify-center",children:(0,l.jsx)(O.l,{className:"mt-4",message:"Searching",iconClassName:"h-5 w-5"})}),x&&(0,l.jsxs)("div",{className:"mt-4",children:[(0,l.jsxs)(k.z,{onClick:()=>m(null),className:"mb-4",variant:"outline",children:[(0,l.jsx)(E.X,{className:"inline mr-2"}),"Back"]}),function(e){let s=(e.additional.file||"").startsWith("http"),t=s?e.additional.heading:e.additional.file.split("/").pop();return(0,l.jsxs)(o.Zb,{className:"bg-secondary h-full shadow-sm rounded-lg border border-muted mb-4 animate-fade-in-up",children:[(0,l.jsx)(o.Ol,{children:(0,l.jsx)(o.ll,{children:t})}),s&&(0,l.jsx)(o.eW,{children:(0,l.jsxs)("a",{href:e.additional.file,target:"_blank",className:"underline text-sm bg-muted p-3 rounded-lg text-muted-foreground flex items-center gap-2",children:[(0,l.jsx)(p.a,{className:"inline"}),e.additional.file]})}),(0,l.jsx)(o.aY,{children:(0,l.jsx)("div",{className:"text-m",children:e.entry})})]})}(x)]}),!x&&!d&&t&&t.length>0&&(0,l.jsxs)("div",{className:"mt-4 max-w-[92vw] break-all",children:[(0,l.jsxs)(k.z,{onClick:()=>ed(""),className:"mb-4",variant:"outline",children:[(0,l.jsx)(E.X,{className:"inline mr-2"}),"See All"]}),(0,l.jsx)(c.x,{className:"h-[80vh]",children:t.map((e,s)=>(0,l.jsx)(ee,{note:e,setFocusSearchResult:m},e["corpus-id"]))})]}),!d&&null===t&&!e.trim()&&(0,l.jsxs)("div",{className:"w-full mt-4",children:[v&&(0,l.jsx)("div",{className:"mt-4 flex items-center justify-center",children:(0,l.jsx)(O.l,{className:"mt-4",message:"Loading",iconClassName:"h-5 w-5"})}),N&&(0,l.jsx)("div",{className:"text-red-500",children:N}),!t&&!v&&0===f.length&&(0,l.jsxs)(o.Zb,{className:"flex flex-col items-center justify-center border-none shadow-none",children:[(0,l.jsxs)(o.Ol,{className:"flex flex-col items-center justify-center",children:[(0,l.jsx)(o.SZ,{className:"border-muted-foreground border w-fit rounded-lg mb-2 text-center text-lg p-4",children:(0,l.jsx)(T.D,{weight:"fill",className:"text-muted-foreground h-10 w-10"})}),(0,l.jsx)(o.ll,{className:"text-center",children:"Let's get started!"})]}),(0,l.jsxs)(o.aY,{children:[(0,l.jsx)("div",{className:"text-muted-foreground items-center justify-center text-center flex",children:'To use search, upload docs via the "Add Documents" button.'}),(0,l.jsx)(C.default,{href:"https://docs.khoj.dev/data-sources/share_your_data",className:"no-underline",children:(0,l.jsx)("div",{className:"mt-4 text-center text-secondary-foreground bg-secondary w-fit m-auto p-2 rounded-lg",children:"Learn More"})})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:f.map((e,s)=>(0,l.jsx)(Q,{file:e,index:s,setSelectedFile:M,setSelectedFileFullText:$,handleDownload:em,handleDelete:ef,isDeleting:q,selectedFileFullText:W},s))}),(0,l.jsx)(U,{children:(0,l.jsxs)(Y,{className:"p-0",children:[ea>0&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(V,{onClick:()=>en(ea-1)})}),ea>1&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(B,{onClick:()=>en(0),children:"1"})}),ea>2&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(X,{})}),ea>0&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(B,{onClick:()=>en(ea-1),children:ea})}),(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(B,{isActive:!0,children:ea+1})}),ea<ei-1&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(B,{onClick:()=>en(ea+1),children:ea+2})}),ea<ei-3&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(X,{})}),ea<ei-2&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(B,{onClick:()=>en(ei-1),children:ei})}),ea<ei-1&&(0,l.jsx)(K,{className:"list-none",children:(0,l.jsx)(G,{onClick:()=>en(ea+1)})})]})})]})]})})})})]})]})}},32759:function(e,s,t){"use strict";t.d(s,{E:function(){return r}});var l=t(57437),a=t(2265),n=t(60610),i=t(94508);let r=a.forwardRef((e,s)=>{let{className:t,value:a,indicatorColor:r,...c}=e;return(0,l.jsx)(n.fC,{ref:s,className:(0,i.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...c,children:(0,l.jsx)(n.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(r),style:{transform:"translateX(-".concat(100-(a||0),"%)")}})})});r.displayName=n.fC.displayName},77992:function(e,s,t){"use strict";t.d(s,{pm:function(){return h}});var l=t(2265);let a=0,n=new Map,i=e=>{if(n.has(e))return;let s=setTimeout(()=>{n.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);n.set(e,s)},r=(e,s)=>{switch(s.type){case"ADD_TOAST":return{...e,toasts:[s.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===s.toast.id?{...e,...s.toast}:e)};case"DISMISS_TOAST":{let{toastId:t}=s;return t?i(t):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===t||void 0===t?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===s.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==s.toastId)}}},c=[],o={toasts:[]};function d(e){o=r(o,e),c.forEach(e=>{e(o)})}function u(e){let{...s}=e,t=(a=(a+1)%Number.MAX_SAFE_INTEGER).toString(),l=()=>d({type:"DISMISS_TOAST",toastId:t});return d({type:"ADD_TOAST",toast:{...s,id:t,open:!0,onOpenChange:e=>{e||l()}}}),{id:t,dismiss:l,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function h(){let[e,s]=l.useState(o);return l.useEffect(()=>(c.push(s),()=>{let e=c.indexOf(s);e>-1&&c.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},41816:function(e){e.exports={searchLayout:"search_searchLayout__fP3m0"}}},function(e){e.O(0,[2026,2663,3861,9259,8667,4363,6244,2509,2327,2971,2117,1744],function(){return e(e.s=94114)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6938],{62960:function(e,t,s){Promise.resolve().then(s.bind(s,31537))},31537:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return ei}});var a,n,r=s(57437),i=s(917),o=s.n(i);s(97510);var l=s(2265),c=s(77992),d=s(56937),h=s(7436),m=s(67341),x=s(62869),p=s(26371),u=s(95186),j=s(66070),f=s(84190),g=s(94508);let b=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{className:"relative w-full overflow-auto",children:(0,r.jsx)("table",{ref:t,className:(0,g.cn)("w-full caption-bottom text-sm",s),...a})})});b.displayName="Table",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("thead",{ref:t,className:(0,g.cn)("[&_tr]:border-b",s),...a})}).displayName="TableHeader";let w=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tbody",{ref:t,className:(0,g.cn)("[&_tr:last-child]:border-0",s),...a})});w.displayName="TableBody",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tfoot",{ref:t,className:(0,g.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a})}).displayName="TableFooter";let N=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tr",{ref:t,className:(0,g.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...a})});N.displayName="TableRow",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("th",{ref:t,className:(0,g.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a})}).displayName="TableHead";let y=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("td",{ref:t,className:(0,g.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a})});y.displayName="TableCell",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("caption",{ref:t,className:(0,g.cn)("mt-4 text-sm text-muted-foreground",s),...a})}).displayName="TableCaption";var v=s(3894),_=s(81228),k=s(89203),S=s(94018),T=s(13272),C=s(88435),D=s(19841),F=s(37295),E=s(2049),P=s(50525),O=s(5147),A=s(80438),I=s(2452),Y=s(47615),z=s(35099),K=s(22345),R=s(75216),W=s(47020),Z=s(90483),B=s(73925),M=s(54271),U=s(95656),V=s(58717),H=s(87296),L=s(56777),G=s(57466),q=s(97525),J=s(45178),X=s(14308),$=s(34688),Q=s(60729),ee=s(34124),et=s(6512),es=s(37104);let ea=e=>{var t,s;let{items:a,selected:n,callbackFunc:i}=e,[o,c]=(0,l.useState)(null!==(s=null==n?void 0:n.toString())&&void 0!==s?s:"0");return!!n&&(0,r.jsx)("div",{className:"overflow-hidden shadow-md rounded-lg",children:(0,r.jsxs)(f.h_,{children:[(0,r.jsx)(f.$F,{asChild:!0,className:"w-full rounded-lg",children:(0,r.jsxs)(x.z,{variant:"outline",className:"justify-start py-6 rounded-lg",children:[null===(t=a.find(e=>e.id.toString()===o))||void 0===t?void 0:t.name," ",(0,r.jsx)(v.p,{className:"h-4 w-4 ml-auto text-muted-foreground"})]})}),(0,r.jsx)(f.AW,{style:{maxHeight:"200px",overflowY:"auto",minWidth:"var(--radix-dropdown-menu-trigger-width)"},children:(0,r.jsx)(f._x,{value:o,onValueChange:async e=>{c(e),await i(e)},children:a.map(e=>(0,r.jsx)(f.qB,{value:e.id.toString(),children:e.name},e.id.toString()))})})]})})},en=()=>{let[e,t]=(0,l.useState)([]),{toast:s}=(0,c.pm)(),a=async()=>{try{let e=await fetch("/auth/token",{method:"POST",headers:{"Content-Type":"application/json"}}),s=await e.json();t(e=>[...e,s])}catch(e){console.error("Error generating API key:",e)}},n=async e=>{try{await navigator.clipboard.writeText(e),s({title:"\uD83D\uDD11 API Key",description:"Copied to clipboard"})}catch(e){console.error("Error copying API key:",e)}},r=async e=>{try{(await fetch("/auth/token?token=".concat(e),{method:"DELETE"})).ok&&t(t=>t.filter(t=>t.token!==e))}catch(e){console.error("Error deleting API key:",e)}},i=async()=>{try{let e=await fetch("/auth/token"),s=await e.json();(null==s?void 0:s.length)>0&&t(s)}catch(e){console.error("Error listing API keys:",e)}};return(0,l.useEffect)(()=>{i()},[]),{apiKeys:e,generateAPIKey:a,copyAPIKey:n,deleteAPIKey:r}};function er(){let{apiKeys:e,generateAPIKey:t,copyAPIKey:s,deleteAPIKey:a}=en(),[n,i]=(0,l.useState)(new Set),{toast:o}=(0,c.pm)();return(0,r.jsxs)(j.Zb,{className:"grid grid-flow-column border border-gray-300 shadow-md rounded-lg dark:bg-muted dark:border-none border-opacity-50 lg:w-2/3",children:[(0,r.jsxs)(j.Ol,{className:"text-xl grid grid-flow-col grid-cols-[1fr_auto] pb-0",children:[(0,r.jsxs)("span",{className:"flex flex-wrap",children:[(0,r.jsx)(_.s,{className:"h-7 w-7 mr-2"}),"API Keys"]}),(0,r.jsxs)(x.z,{variant:"secondary",className:"!mt-0",onClick:t,children:[(0,r.jsx)(k.v,{weight:"bold",className:"h-5 w-5 mr-2"}),"Generate Key"]})]}),(0,r.jsxs)(j.aY,{className:"overflow-hidden grid gap-6",children:[(0,r.jsxs)("p",{className:"text-md text-gray-400",children:["Access Khoj from the"," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/desktop",target:"_blank",children:"Desktop"}),", ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/obsidian",children:"Obsidian"}),","," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/emacs",children:"Emacs"})," apps and more."]}),(0,r.jsx)(b,{children:(0,r.jsx)(w,{children:e.map(e=>(0,r.jsxs)(N,{children:[(0,r.jsx)(y,{className:"pl-0 py-3",children:e.name}),(0,r.jsxs)(y,{className:"grid grid-flow-col grid-cols-[1fr_auto] bg-secondary dark:bg-background rounded-xl p-3 m-1",children:[(0,r.jsx)("span",{className:"font-mono text-left w-[50px] md:w-[400px]",children:n.has(e.token)?e.token:"".concat(e.token.slice(0,6),"...").concat(e.token.slice(-4))}),(0,r.jsxs)("div",{className:"grid grid-flow-col",children:[n.has(e.token)?(0,r.jsx)(S.N,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>i(t=>{let s=new Set(t);return s.delete(e.token),s})}):(0,r.jsx)(T.b,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>i(new Set([...n,e.token]))}),(0,r.jsx)(C.C,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>{o({title:"\uD83D\uDD11 Copied API Key: ".concat(e.name),description:"Set this API key in the Khoj apps you want to connect to this Khoj account"}),s(e.token)}}),(0,r.jsx)(D.r,{weight:"bold",className:"h-4 w-4 mr-2 md:ml-4 text-red-400 hover:bg-primary/40",onClick:()=>{o({title:"\uD83D\uDD11 Deleted API Key: ".concat(e.name),description:"Apps using this API key will no longer connect to this Khoj account"}),a(e.token)}})]})]})]},e.token))})})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4"})]})}function ei(){let{data:e}=(0,d.h2)(!0),[t,s]=(0,l.useState)(null),[a,n]=(0,l.useState)(void 0),[i,f]=(0,l.useState)(null),[g,b]=(0,l.useState)(void 0),[w,N]=(0,l.useState)(""),[y,v]=(0,l.useState)("verified"),{toast:_}=(0,c.pm)(),k=(0,h.IC)(),S="w-full lg:w-5/12 grid grid-flow-column border border-gray-300 shadow-md rounded-lg border dark:border-none border-opacity-50 dark:bg-muted";(0,l.useEffect)(()=>{var t;s(e),b(null==e?void 0:e.phone_number),v((null==e?void 0:e.is_phone_number_verified)?"verified":(null==e?void 0:e.phone_number)?"otp":"setup"),n(null==e?void 0:e.given_name),f(null!==(t=null==e?void 0:e.notion_token)&&void 0!==t?t:null)},[e]);let T=async()=>{try{if(!(await fetch("/api/phone?phone_number=".concat(g),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to send OTP");v("verify")}catch(e){console.error("Error sending OTP:",e),_({title:"\uD83D\uDCF1 Phone",description:"Failed to send OTP. Try again or contact us at team@khoj.dev"})}},C=async()=>{try{if(!(await fetch("/api/phone/verify?code=".concat(w),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to verify OTP");v("verified"),_({title:"\uD83D\uDCF1 Phone",description:"Phone number verified"})}catch(e){console.error("Error verifying OTP:",e),_({title:"\uD83D\uDCF1 Phone",description:"Failed to verify OTP. Try again or contact us at team@khoj.dev"})}},D=async()=>{try{if(!(await fetch("/api/phone",{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect phone number");b(void 0),v("setup"),_({title:"\uD83D\uDCF1 Phone",description:"Phone number disconnected"})}catch(e){console.error("Error disconnecting phone number:",e),_({title:"\uD83D\uDCF1 Phone",description:"Failed to disconnect phone number. Try again or contact us at team@khoj.dev"})}},en=async e=>{try{if(!(await fetch("/api/subscription?operation=".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to change subscription");t&&(t.subscription_state="cancel"===e?d.o9.UNSUBSCRIBED:d.o9.SUBSCRIBED,s(t)),_({title:"\uD83D\uDCB3 Subscription",description:(null==t?void 0:t.subscription_state)==="unsubscribed"?"Your subscription was cancelled":"Your Futurist subscription has been renewed"})}catch(t){console.error("Error changing subscription:",t),_({title:"\uD83D\uDCB3 Subscription",description:"cancel"===e?"Failed to cancel subscription. Try again or contact us at team@khoj.dev":"Failed to renew subscription. Try again or contact us at team@khoj.dev"})}},ei=async()=>{try{let e=await fetch("/api/subscription/trial",{method:"POST"});if(!e.ok)throw Error("Failed to enable free trial");if((await e.json()).trial_enabled&&t){t.subscription_state=d.o9.TRIAL;let e=new Date(Date.now()+864e5*t.length_of_free_trial);t.subscription_renewal_date=(e=>{let t=new Date(e);return new Intl.DateTimeFormat("en-US",{day:"2-digit",month:"short",year:"numeric"}).format(t)})(e),t.subscription_enabled_trial_at=new Date().toISOString(),s(t),_({title:"\uD83C\uDF89 Trial Enabled",description:"Your free trial will end on ".concat(t.subscription_renewal_date)})}}catch(e){console.error("Error enabling free trial:",e),_({title:"⚠️ Failed to Enable Free Trial",description:"Failed to enable free trial. Try again or contact us at team@khoj.dev"})}},eo=async()=>{if(a)try{if(!(await fetch("/api/user/name?name=".concat(a),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update name");t&&(t.given_name=a,s(t)),_({title:"✅ Updated Profile",description:"You name has been updated to ".concat(a)})}catch(e){console.error("Error updating name:",e),_({title:"⚠️ Failed to Update Profile",description:"Failed to update name. Try again or contact team@khoj.dev"})}},el=e=>async s=>{if(!(null==t?void 0:t.is_active)){_({title:"Model Update",description:"You need to be subscribed to update ".concat(e," models"),variant:"destructive"});return}try{if(!(await fetch("/api/model/".concat(e,"?id=")+s,{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update model");_({title:"✅ Updated ".concat((0,h.LF)(e)," Model")})}catch(t){console.error("Failed to update ".concat(e," model:"),t),_({description:"❌ Failed to update ".concat((0,h.LF)(e)," model. Try again."),variant:"destructive"})}},ec=async()=>{if(i)try{if(!(await fetch("/api/content/notion",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:i})})).ok)throw Error("Failed to save Notion API key");t&&(t.notion_token=i,s(t)),_({title:"✅ Saved Notion Settings",description:"You Notion API key has been saved."})}catch(e){console.error("Error updating name:",e),_({title:"⚠️ Failed to Save Notion Settings",description:"Failed to save Notion API key. Try again or contact team@khoj.dev"})}},ed=async e=>{try{if(!(await fetch("/api/content?t=".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to sync content from ".concat(e));_({title:"\uD83D\uDD04 Syncing ".concat(e),description:"Your ".concat(e," content is being synced.")})}catch(t){console.error("Error syncing content:",t),_({title:"⚠️ Failed to Sync ".concat(e),description:"Failed to sync ".concat(e," content. Try again or contact team@khoj.dev")})}},eh=async e=>{try{if(!(await fetch("/api/content/".concat(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect ".concat(e));t&&("computer"===e?t.enabled_content_source.computer=!1:"notion"===e?(t.enabled_content_source.notion=!1,t.notion_token=null,f(t.notion_token)):"github"===e&&(t.enabled_content_source.github=!1),s(t)),"computer"===e?_({title:"✅ Deleted Synced Files",description:"Your synced documents have been deleted."}):_({title:"✅ Disconnected ".concat(e),description:"Your ".concat(e," integration to Khoj has been disconnected.")})}catch(t){console.error("Error disconnecting ".concat(e,":"),t),_({title:"⚠️ Failed to Disconnect ".concat(e),description:"Failed to disconnect from ".concat(e,". Try again or contact team@khoj.dev")})}};return t?(0,r.jsxs)(Q.Hn,{children:[(0,r.jsx)(ee.S,{conversationId:""}),(0,r.jsxs)(Q.kV,{children:[(0,r.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,r.jsx)(Q.vP,{className:"-ml-1"}),(0,r.jsx)(et.Z,{orientation:"vertical",className:"mr-2 h-4"}),k?(0,r.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,r.jsx)(es.VO,{className:"h-auto w-16"})}):(0,r.jsx)("h2",{className:"text-lg",children:"Settings"})]}),(0,r.jsxs)("div",{className:o().page,children:[(0,r.jsx)("title",{children:"Settings"}),(0,r.jsx)("div",{className:o().content,children:(0,r.jsx)("div",{className:"".concat(o().contentBody," mx-10 my-2"),children:(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(X.Z,{}),children:(0,r.jsxs)("div",{id:"content",className:"grid grid-flow-column sm:grid-flow-row gap-16 m-8",children:[(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Profile"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(F.Y,{className:"h-7 w-7 mr-2"}),"Name"]}),(0,r.jsxs)(j.aY,{className:"overflow-hidden",children:[(0,r.jsx)("p",{className:"pb-4 text-gray-400",children:"What should Khoj refer to you as?"}),(0,r.jsx)(u.I,{type:"text",onChange:e=>n(e.target.value),value:a,className:"w-full border border-gray-300 rounded-lg p-4 py-6"})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:eo,disabled:a===t.given_name,children:[(0,r.jsx)(E.B,{className:"h-5 w-5 inline mr-2"}),"Save"]})})]}),(0,r.jsxs)(j.Zb,{id:"subscription",className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(P.a,{className:"h-7 w-7 mr-2"}),"Subscription"]}),(0,r.jsxs)(j.aY,{className:"grid gap-2 overflow-hidden",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Current Plan"}),"trial"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist (Trial)"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["You are on a"," ",t.length_of_free_trial," ","day trial of the Khoj Futurist plan. Your trial ends on"," ",t.subscription_renewal_date,". Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/#pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})||"subscribed"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"renews"})," on"," ",(0,r.jsx)("b",{children:t.subscription_renewal_date})]})]})||"unsubscribed"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"ends"})," on"," ",(0,r.jsx)("b",{children:t.subscription_renewal_date})]})]})||"expired"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Humanist"}),t.subscription_renewal_date&&(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"expired"})," ","on"," ",(0,r.jsx)("b",{children:t.subscription_renewal_date})]})||(0,r.jsxs)("p",{className:"text-gray-400",children:["Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/#pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:"subscribed"==t.subscription_state&&(0,r.jsxs)(x.z,{variant:"outline",className:"hover:text-red-400",onClick:()=>en("cancel"),children:[(0,r.jsx)(O.b,{className:"h-5 w-5 mr-2"}),"Unsubscribe"]})||"unsubscribed"==t.subscription_state&&(0,r.jsxs)(x.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>en("resubscribe"),children:[(0,r.jsx)(A.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Resubscribe"]})||t.subscription_enabled_trial_at&&(0,r.jsxs)(x.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>window.open("".concat(t.khoj_cloud_subscription_url,"?prefilled_email=").concat(t.username),"_blank","noopener,noreferrer"),children:[(0,r.jsx)(A.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Subscribe"]})||(0,r.jsxs)(x.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:ei,children:[(0,r.jsx)(A.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Enable Trial"]})})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Content"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(j.Zb,{id:"computer",className:S,children:[(0,r.jsxs)(j.Ol,{className:"flex flex-row text-xl",children:[(0,r.jsx)(I.a,{className:"h-8 w-8 mr-2"}),"Knowledge Base",t.enabled_content_source.computer&&(0,r.jsx)(Y.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsx)(j.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Manage and search through your digital brain."}),(0,r.jsxs)(j.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsxs)(x.z,{variant:"outline",size:"sm",title:"Search thorugh files",onClick:()=>window.location.href="/search",children:[(0,r.jsx)(z.Y,{className:"h-5 w-5 inline mr-1"}),"Search"]}),(0,r.jsxs)(x.z,{variant:"outline",size:"sm",className:"".concat(t.enabled_content_source.computer||"hidden"),onClick:()=>eh("computer"),children:[(0,r.jsx)(K.u,{className:"h-5 w-5 inline mr-1"}),"Clear All"]})]})]}),(0,r.jsxs)(j.Zb,{id:"github",className:"".concat(S," hidden"),children:[(0,r.jsxs)(j.Ol,{className:"flex flex-row text-2xl",children:[(0,r.jsx)(R.b,{className:"h-8 w-8 mr-2"}),"Github"]}),(0,r.jsx)(j.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Set Github repositories to index"}),(0,r.jsxs)(j.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsx)(x.z,{variant:"outline",size:"sm",children:t.enabled_content_source.github&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(W.h,{className:"h-5 w-5 inline mr-1"}),"Manage"]})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Z.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]})}),(0,r.jsxs)(x.z,{variant:"outline",size:"sm",className:"".concat(t.enabled_content_source.github||"hidden"),children:[(0,r.jsx)(K.u,{className:"h-5 w-5 inline mr-1"}),"Disable"]})]})]}),(0,r.jsxs)(j.Zb,{id:"notion",className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(B.F,{className:"h-7 w-7 mr-2"}),"Notion",t.enabled_content_source.notion&&(0,r.jsx)(Y.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsxs)(j.aY,{className:"grid gap-4",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Sync your Notion workspace."}),!t.notion_oauth_url&&(0,r.jsx)(u.I,{onChange:e=>f(e.target.value),value:i||"",placeholder:"Enter API Key of your Khoj integration on Notion",className:"w-full border border-gray-300 rounded-lg px-4 py-6"})]}),(0,r.jsxs)(j.eW,{className:"flex flex-wrap gap-4",children:[t.notion_oauth_url&&!t.enabled_content_source.notion?(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:()=>{window.open(t.notion_oauth_url)},children:[(0,r.jsx)(Z.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]}):t.enabled_content_source.notion&&i===t.notion_token?(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:()=>ed("notion"),children:[(0,r.jsx)(M.t,{className:"h-5 w-5 inline mr-1"}),"Sync"]}):t.notion_oauth_url?(0,r.jsx)(r.Fragment,{}):(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:ec,disabled:i===t.notion_token,children:[(0,r.jsx)(E.B,{className:"h-5 w-5 inline mr-1"}),t.enabled_content_source.notion&&"Update API Key"||"Set API Key"]}),(0,r.jsxs)(x.z,{variant:"outline",size:"sm",className:"".concat(t.notion_token||"hidden"),onClick:()=>eh("notion"),children:[(0,r.jsx)(K.u,{className:"h-5 w-5 inline mr-1"}),"Disconnect"]})]})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Models"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[t.chat_model_options.length>0&&(0,r.jsxs)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(U.G,{className:"h-7 w-7 mr-2"}),"Chat"]}),(0,r.jsxs)(j.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the chat model to generate text responses"}),(0,r.jsx)(ea,{items:t.chat_model_options,selected:t.selected_chat_model_config,callbackFunc:el("chat")})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),t.paint_model_options.length>0&&(0,r.jsxs)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(V.Y,{className:"h-7 w-7 mr-2"}),"Paint"]}),(0,r.jsxs)(j.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the paint model to generate image responses"}),(0,r.jsx)(ea,{items:t.paint_model_options,selected:t.selected_paint_model_config,callbackFunc:el("paint")})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),t.voice_model_options.length>0&&(0,r.jsxs)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(H.u,{className:"h-7 w-7 mr-2"}),"Voice"]}),(0,r.jsxs)(j.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the voice model to generate speech responses"}),(0,r.jsx)(ea,{items:t.voice_model_options,selected:t.selected_voice_model_config,callbackFunc:el("voice")})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{id:"clients",className:"text-2xl",children:"Clients"}),(0,r.jsxs)("div",{className:"cards flex flex-col flex-wrap gap-8",children:[!t.anonymous_mode&&(0,r.jsx)(er,{}),(0,r.jsxs)(j.Zb,{className:"".concat(S," lg:w-2/3"),children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(L.V,{className:"h-7 w-7 mr-2"}),"Chat on Whatsapp","verified"===y&&(0,r.jsx)(Y.f,{weight:"bold",className:"h-4 w-4 ml-1 text-green-400"})||"setup"!==y&&(0,r.jsx)(G.C,{weight:"bold",className:"h-4 w-4 ml-1 text-yellow-400"})]}),(0,r.jsxs)(j.aY,{className:"grid gap-4",children:[(0,r.jsxs)("p",{className:"text-gray-400",children:["Connect your number to chat with Khoj on WhatsApp. Learn more about the integration"," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/whatsapp",children:"here"}),"."]}),(0,r.jsxs)("div",{children:[(0,r.jsx)($.Z,{initialValue:g||"",onChangeNumber:b,disabled:"verify"===y,initOptions:{separateDialCode:!0,initialCountry:"af",utilsScript:"https://assets.khoj.dev/intl-tel-input%4023.8.0_build_js_utils.js",containerClass:"".concat(o().phoneInput)}}),"verify"===y&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:"Enter the OTP sent to your number: ".concat(g)}),(0,r.jsx)(p.Zn,{autoFocus:!0,maxLength:6,value:w||"",onChange:N,onComplete:()=>v("verify"),children:(0,r.jsxs)(p.hf,{children:[(0,r.jsx)(p.cY,{index:0}),(0,r.jsx)(p.cY,{index:1}),(0,r.jsx)(p.cY,{index:2}),(0,r.jsx)(p.cY,{index:3}),(0,r.jsx)(p.cY,{index:4}),(0,r.jsx)(p.cY,{index:5})]})})]})]})]}),(0,r.jsxs)(j.eW,{className:"flex flex-wrap gap-4",children:["verify"===y&&(0,r.jsx)(x.z,{variant:"outline",onClick:C,children:"Verify"})||(0,r.jsx)(x.z,{variant:"outline",disabled:!g||g===t.phone_number&&"verified"===y||!(0,m.y)(g),onClick:T,children:t.phone_number?g&&(g!==t.phone_number||"verified"!==y)&&(0,m.y)(g)?(0,r.jsxs)(r.Fragment,{children:["Send OTP"," ",(0,r.jsx)(J.o,{className:"inline ml-2",weight:"bold"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(q.F,{className:"inline mr-2 text-green-400"}),"Switch Number"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Z.F,{className:"inline mr-2"}),"Setup Whatsapp"]})}),"verified"===y&&(0,r.jsxs)(x.z,{variant:"outline",onClick:()=>D(),children:[(0,r.jsx)(K.u,{className:"h-5 w-5 mr-2"}),"Disconnect"]})]})]})]})]})]})})})})]})]})]}):(0,r.jsx)(X.Z,{})}(a=n||(n={})).Setup="setup",a.SendOTP="otp",a.VerifyOTP="verify",a.Verified="verified"},77992:function(e,t,s){"use strict";s.d(t,{pm:function(){return m}});var a=s(2265);let n=0,r=new Map,i=e=>{if(r.has(e))return;let t=setTimeout(()=>{r.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);r.set(e,t)},o=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:s}=t;return s?i(s):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===s||void 0===s?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},l=[],c={toasts:[]};function d(e){c=o(c,e),l.forEach(e=>{e(c)})}function h(e){let{...t}=e,s=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>d({type:"DISMISS_TOAST",toastId:s});return d({type:"ADD_TOAST",toast:{...t,id:s,open:!0,onOpenChange:e=>{e||a()}}}),{id:s,dismiss:a,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:s}})}}function m(){let[e,t]=a.useState(c);return a.useEffect(()=>(l.push(t),()=>{let e=l.indexOf(t);e>-1&&l.splice(e,1)}),[e]),{...e,toast:h,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},917:function(e){e.exports={page:"settings_page__mP7qk",contentBody:"settings_contentBody__uZjue",phoneInput:"settings_phoneInput__j6xJN"}}},function(e){e.O(0,[6008,1607,3861,9259,8667,4363,6244,1199,2327,2971,2117,1744],function(){return e(e.s=62960)}),_N_E=e.O()}]);
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6938],{62960:function(e,t,s){Promise.resolve().then(s.bind(s,31537))},31537:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return ei}});var a,n,r=s(57437),i=s(917),o=s.n(i);s(97510);var l=s(2265),c=s(77992),d=s(56937),h=s(7436),m=s(67341),x=s(62869),p=s(26371),u=s(95186),j=s(66070),f=s(84190),g=s(94508);let b=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{className:"relative w-full overflow-auto",children:(0,r.jsx)("table",{ref:t,className:(0,g.cn)("w-full caption-bottom text-sm",s),...a})})});b.displayName="Table",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("thead",{ref:t,className:(0,g.cn)("[&_tr]:border-b",s),...a})}).displayName="TableHeader";let w=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tbody",{ref:t,className:(0,g.cn)("[&_tr:last-child]:border-0",s),...a})});w.displayName="TableBody",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tfoot",{ref:t,className:(0,g.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a})}).displayName="TableFooter";let N=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tr",{ref:t,className:(0,g.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...a})});N.displayName="TableRow",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("th",{ref:t,className:(0,g.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a})}).displayName="TableHead";let y=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("td",{ref:t,className:(0,g.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a})});y.displayName="TableCell",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("caption",{ref:t,className:(0,g.cn)("mt-4 text-sm text-muted-foreground",s),...a})}).displayName="TableCaption";var v=s(3894),_=s(81228),k=s(89203),S=s(94018),T=s(13272),C=s(88435),D=s(19841),F=s(37295),E=s(2049),P=s(50525),O=s(5147),A=s(80438),I=s(2452),Y=s(47615),z=s(35099),K=s(22345),R=s(75216),W=s(47020),Z=s(90483),B=s(73925),M=s(54271),U=s(95656),V=s(58717),H=s(87296),L=s(56777),G=s(57466),q=s(97525),J=s(45178),X=s(14308),$=s(34688),Q=s(60729),ee=s(34124),et=s(6512),es=s(37104);let ea=e=>{var t,s;let{items:a,selected:n,callbackFunc:i}=e,[o,c]=(0,l.useState)(null!==(s=null==n?void 0:n.toString())&&void 0!==s?s:"0");return!!n&&(0,r.jsx)("div",{className:"overflow-hidden shadow-md rounded-lg",children:(0,r.jsxs)(f.h_,{children:[(0,r.jsx)(f.$F,{asChild:!0,className:"w-full rounded-lg",children:(0,r.jsxs)(x.z,{variant:"outline",className:"justify-start py-6 rounded-lg",children:[null===(t=a.find(e=>e.id.toString()===o))||void 0===t?void 0:t.name," ",(0,r.jsx)(v.p,{className:"h-4 w-4 ml-auto text-muted-foreground"})]})}),(0,r.jsx)(f.AW,{style:{maxHeight:"200px",overflowY:"auto",minWidth:"var(--radix-dropdown-menu-trigger-width)"},children:(0,r.jsx)(f._x,{value:o,onValueChange:async e=>{c(e),await i(e)},children:a.map(e=>(0,r.jsx)(f.qB,{value:e.id.toString(),children:e.name},e.id.toString()))})})]})})},en=()=>{let[e,t]=(0,l.useState)([]),{toast:s}=(0,c.pm)(),a=async()=>{try{let e=await fetch("/auth/token",{method:"POST",headers:{"Content-Type":"application/json"}}),s=await e.json();t(e=>[...e,s])}catch(e){console.error("Error generating API key:",e)}},n=async e=>{try{await navigator.clipboard.writeText(e),s({title:"\uD83D\uDD11 API Key",description:"Copied to clipboard"})}catch(e){console.error("Error copying API key:",e)}},r=async e=>{try{(await fetch("/auth/token?token=".concat(e),{method:"DELETE"})).ok&&t(t=>t.filter(t=>t.token!==e))}catch(e){console.error("Error deleting API key:",e)}},i=async()=>{try{let e=await fetch("/auth/token"),s=await e.json();(null==s?void 0:s.length)>0&&t(s)}catch(e){console.error("Error listing API keys:",e)}};return(0,l.useEffect)(()=>{i()},[]),{apiKeys:e,generateAPIKey:a,copyAPIKey:n,deleteAPIKey:r}};function er(){let{apiKeys:e,generateAPIKey:t,copyAPIKey:s,deleteAPIKey:a}=en(),[n,i]=(0,l.useState)(new Set),{toast:o}=(0,c.pm)();return(0,r.jsxs)(j.Zb,{className:"grid grid-flow-column border border-gray-300 shadow-md rounded-lg dark:bg-muted dark:border-none border-opacity-50 lg:w-2/3",children:[(0,r.jsxs)(j.Ol,{className:"text-xl grid grid-flow-col grid-cols-[1fr_auto] pb-0",children:[(0,r.jsxs)("span",{className:"flex flex-wrap",children:[(0,r.jsx)(_.s,{className:"h-7 w-7 mr-2"}),"API Keys"]}),(0,r.jsxs)(x.z,{variant:"secondary",className:"!mt-0",onClick:t,children:[(0,r.jsx)(k.v,{weight:"bold",className:"h-5 w-5 mr-2"}),"Generate Key"]})]}),(0,r.jsxs)(j.aY,{className:"overflow-hidden grid gap-6",children:[(0,r.jsxs)("p",{className:"text-md text-gray-400",children:["Access Khoj from the"," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/desktop",target:"_blank",children:"Desktop"}),", ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/obsidian",children:"Obsidian"}),","," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/emacs",children:"Emacs"})," apps and more."]}),(0,r.jsx)(b,{children:(0,r.jsx)(w,{children:e.map(e=>(0,r.jsxs)(N,{children:[(0,r.jsx)(y,{className:"pl-0 py-3",children:e.name}),(0,r.jsxs)(y,{className:"grid grid-flow-col grid-cols-[1fr_auto] bg-secondary dark:bg-background rounded-xl p-3 m-1",children:[(0,r.jsx)("span",{className:"font-mono text-left w-[50px] md:w-[400px]",children:n.has(e.token)?e.token:"".concat(e.token.slice(0,6),"...").concat(e.token.slice(-4))}),(0,r.jsxs)("div",{className:"grid grid-flow-col",children:[n.has(e.token)?(0,r.jsx)(S.N,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>i(t=>{let s=new Set(t);return s.delete(e.token),s})}):(0,r.jsx)(T.b,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>i(new Set([...n,e.token]))}),(0,r.jsx)(C.C,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>{o({title:"\uD83D\uDD11 Copied API Key: ".concat(e.name),description:"Set this API key in the Khoj apps you want to connect to this Khoj account"}),s(e.token)}}),(0,r.jsx)(D.r,{weight:"bold",className:"h-4 w-4 mr-2 md:ml-4 text-red-400 hover:bg-primary/40",onClick:()=>{o({title:"\uD83D\uDD11 Deleted API Key: ".concat(e.name),description:"Apps using this API key will no longer connect to this Khoj account"}),a(e.token)}})]})]})]},e.token))})})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4"})]})}function ei(){let{data:e}=(0,d.h2)(!0),[t,s]=(0,l.useState)(null),[a,n]=(0,l.useState)(void 0),[i,f]=(0,l.useState)(null),[g,b]=(0,l.useState)(void 0),[w,N]=(0,l.useState)(""),[y,v]=(0,l.useState)("verified"),{toast:_}=(0,c.pm)(),k=(0,h.IC)(),S="w-full lg:w-5/12 grid grid-flow-column border border-gray-300 shadow-md rounded-lg border dark:border-none border-opacity-50 dark:bg-muted";(0,l.useEffect)(()=>{var t;s(e),b(null==e?void 0:e.phone_number),v((null==e?void 0:e.is_phone_number_verified)?"verified":(null==e?void 0:e.phone_number)?"otp":"setup"),n(null==e?void 0:e.given_name),f(null!==(t=null==e?void 0:e.notion_token)&&void 0!==t?t:null)},[e]);let T=async()=>{try{if(!(await fetch("/api/phone?phone_number=".concat(g),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to send OTP");v("verify")}catch(e){console.error("Error sending OTP:",e),_({title:"\uD83D\uDCF1 Phone",description:"Failed to send OTP. Try again or contact us at team@khoj.dev"})}},C=async()=>{try{if(!(await fetch("/api/phone/verify?code=".concat(w),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to verify OTP");v("verified"),_({title:"\uD83D\uDCF1 Phone",description:"Phone number verified"})}catch(e){console.error("Error verifying OTP:",e),_({title:"\uD83D\uDCF1 Phone",description:"Failed to verify OTP. Try again or contact us at team@khoj.dev"})}},D=async()=>{try{if(!(await fetch("/api/phone",{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect phone number");b(void 0),v("setup"),_({title:"\uD83D\uDCF1 Phone",description:"Phone number disconnected"})}catch(e){console.error("Error disconnecting phone number:",e),_({title:"\uD83D\uDCF1 Phone",description:"Failed to disconnect phone number. Try again or contact us at team@khoj.dev"})}},en=async e=>{try{if(!(await fetch("/api/subscription?operation=".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to change subscription");t&&(t.subscription_state="cancel"===e?d.o9.UNSUBSCRIBED:d.o9.SUBSCRIBED,s(t)),_({title:"\uD83D\uDCB3 Subscription",description:(null==t?void 0:t.subscription_state)==="unsubscribed"?"Your subscription was cancelled":"Your Futurist subscription has been renewed"})}catch(t){console.error("Error changing subscription:",t),_({title:"\uD83D\uDCB3 Subscription",description:"cancel"===e?"Failed to cancel subscription. Try again or contact us at team@khoj.dev":"Failed to renew subscription. Try again or contact us at team@khoj.dev"})}},ei=async()=>{try{let e=await fetch("/api/subscription/trial",{method:"POST"});if(!e.ok)throw Error("Failed to enable free trial");if((await e.json()).trial_enabled&&t){t.subscription_state=d.o9.TRIAL;let e=new Date(Date.now()+864e5*t.length_of_free_trial);t.subscription_renewal_date=(e=>{let t=new Date(e);return new Intl.DateTimeFormat("en-US",{day:"2-digit",month:"short",year:"numeric"}).format(t)})(e),t.subscription_enabled_trial_at=new Date().toISOString(),s(t),_({title:"\uD83C\uDF89 Trial Enabled",description:"Your free trial will end on ".concat(t.subscription_renewal_date)})}}catch(e){console.error("Error enabling free trial:",e),_({title:"⚠️ Failed to Enable Free Trial",description:"Failed to enable free trial. Try again or contact us at team@khoj.dev"})}},eo=async()=>{if(a)try{if(!(await fetch("/api/user/name?name=".concat(a),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update name");t&&(t.given_name=a,s(t)),_({title:"✅ Updated Profile",description:"You name has been updated to ".concat(a)})}catch(e){console.error("Error updating name:",e),_({title:"⚠️ Failed to Update Profile",description:"Failed to update name. Try again or contact team@khoj.dev"})}},el=e=>async s=>{if(!(null==t?void 0:t.is_active)){_({title:"Model Update",description:"You need to be subscribed to update ".concat(e," models"),variant:"destructive"});return}try{if(!(await fetch("/api/model/".concat(e,"?id=")+s,{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update model");_({title:"✅ Updated ".concat((0,h.LF)(e)," Model")})}catch(t){console.error("Failed to update ".concat(e," model:"),t),_({description:"❌ Failed to update ".concat((0,h.LF)(e)," model. Try again."),variant:"destructive"})}},ec=async()=>{if(i)try{if(!(await fetch("/api/content/notion",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:i})})).ok)throw Error("Failed to save Notion API key");t&&(t.notion_token=i,s(t)),_({title:"✅ Saved Notion Settings",description:"You Notion API key has been saved."})}catch(e){console.error("Error updating name:",e),_({title:"⚠️ Failed to Save Notion Settings",description:"Failed to save Notion API key. Try again or contact team@khoj.dev"})}},ed=async e=>{try{if(!(await fetch("/api/content?t=".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to sync content from ".concat(e));_({title:"\uD83D\uDD04 Syncing ".concat(e),description:"Your ".concat(e," content is being synced.")})}catch(t){console.error("Error syncing content:",t),_({title:"⚠️ Failed to Sync ".concat(e),description:"Failed to sync ".concat(e," content. Try again or contact team@khoj.dev")})}},eh=async e=>{try{if(!(await fetch("/api/content/".concat(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect ".concat(e));t&&("computer"===e?t.enabled_content_source.computer=!1:"notion"===e?(t.enabled_content_source.notion=!1,t.notion_token=null,f(t.notion_token)):"github"===e&&(t.enabled_content_source.github=!1),s(t)),"computer"===e?_({title:"✅ Deleted Synced Files",description:"Your synced documents have been deleted."}):_({title:"✅ Disconnected ".concat(e),description:"Your ".concat(e," integration to Khoj has been disconnected.")})}catch(t){console.error("Error disconnecting ".concat(e,":"),t),_({title:"⚠️ Failed to Disconnect ".concat(e),description:"Failed to disconnect from ".concat(e,". Try again or contact team@khoj.dev")})}};return t?(0,r.jsxs)(Q.Hn,{children:[(0,r.jsx)(ee.S,{conversationId:""}),(0,r.jsxs)(Q.kV,{children:[(0,r.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,r.jsx)(Q.vP,{className:"-ml-1"}),(0,r.jsx)(et.Z,{orientation:"vertical",className:"mr-2 h-4"}),k?(0,r.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,r.jsx)(es.VO,{className:"h-auto w-16"})}):(0,r.jsx)("h2",{className:"text-lg",children:"Settings"})]}),(0,r.jsxs)("div",{className:o().page,children:[(0,r.jsx)("title",{children:"Settings"}),(0,r.jsx)("div",{className:o().content,children:(0,r.jsx)("div",{className:"".concat(o().contentBody," mx-10 my-2"),children:(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(X.Z,{}),children:(0,r.jsxs)("div",{id:"content",className:"grid grid-flow-column sm:grid-flow-row gap-16 m-8",children:[(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Profile"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(F.Y,{className:"h-7 w-7 mr-2"}),"Name"]}),(0,r.jsxs)(j.aY,{className:"overflow-hidden",children:[(0,r.jsx)("p",{className:"pb-4 text-gray-400",children:"What should Khoj refer to you as?"}),(0,r.jsx)(u.I,{type:"text",onChange:e=>n(e.target.value),value:a,className:"w-full border border-gray-300 rounded-lg p-4 py-6"})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:eo,disabled:a===t.given_name,children:[(0,r.jsx)(E.B,{className:"h-5 w-5 inline mr-2"}),"Save"]})})]}),(0,r.jsxs)(j.Zb,{id:"subscription",className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(P.a,{className:"h-7 w-7 mr-2"}),"Subscription"]}),(0,r.jsxs)(j.aY,{className:"grid gap-2 overflow-hidden",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Current Plan"}),"trial"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist (Trial)"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["You are on a"," ",t.length_of_free_trial," ","day trial of the Khoj Futurist plan. Your trial ends on"," ",t.subscription_renewal_date,". Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/#pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})||"subscribed"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"renews"})," on"," ",(0,r.jsx)("b",{children:t.subscription_renewal_date})]})]})||"unsubscribed"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"ends"})," on"," ",(0,r.jsx)("b",{children:t.subscription_renewal_date})]})]})||"expired"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Humanist"}),t.subscription_renewal_date&&(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"expired"})," ","on"," ",(0,r.jsx)("b",{children:t.subscription_renewal_date})]})||(0,r.jsxs)("p",{className:"text-gray-400",children:["Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/#pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:"subscribed"==t.subscription_state&&(0,r.jsxs)(x.z,{variant:"outline",className:"hover:text-red-400",onClick:()=>en("cancel"),children:[(0,r.jsx)(O.b,{className:"h-5 w-5 mr-2"}),"Unsubscribe"]})||"unsubscribed"==t.subscription_state&&(0,r.jsxs)(x.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>en("resubscribe"),children:[(0,r.jsx)(A.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Resubscribe"]})||t.subscription_enabled_trial_at&&(0,r.jsxs)(x.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>window.open("".concat(t.khoj_cloud_subscription_url,"?prefilled_email=").concat(t.username),"_blank","noopener,noreferrer"),children:[(0,r.jsx)(A.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Subscribe"]})||(0,r.jsxs)(x.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:ei,children:[(0,r.jsx)(A.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Enable Trial"]})})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Content"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(j.Zb,{id:"computer",className:S,children:[(0,r.jsxs)(j.Ol,{className:"flex flex-row text-xl",children:[(0,r.jsx)(I.a,{className:"h-8 w-8 mr-2"}),"Knowledge Base",t.enabled_content_source.computer&&(0,r.jsx)(Y.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsx)(j.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Manage and search through your digital brain."}),(0,r.jsxs)(j.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsxs)(x.z,{variant:"outline",size:"sm",title:"Search thorugh files",onClick:()=>window.location.href="/search",children:[(0,r.jsx)(z.Y,{className:"h-5 w-5 inline mr-1"}),"Search"]}),(0,r.jsxs)(x.z,{variant:"outline",size:"sm",className:"".concat(t.enabled_content_source.computer||"hidden"),onClick:()=>eh("computer"),children:[(0,r.jsx)(K.u,{className:"h-5 w-5 inline mr-1"}),"Clear All"]})]})]}),(0,r.jsxs)(j.Zb,{id:"github",className:"".concat(S," hidden"),children:[(0,r.jsxs)(j.Ol,{className:"flex flex-row text-2xl",children:[(0,r.jsx)(R.b,{className:"h-8 w-8 mr-2"}),"Github"]}),(0,r.jsx)(j.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Set Github repositories to index"}),(0,r.jsxs)(j.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsx)(x.z,{variant:"outline",size:"sm",children:t.enabled_content_source.github&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(W.h,{className:"h-5 w-5 inline mr-1"}),"Manage"]})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Z.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]})}),(0,r.jsxs)(x.z,{variant:"outline",size:"sm",className:"".concat(t.enabled_content_source.github||"hidden"),children:[(0,r.jsx)(K.u,{className:"h-5 w-5 inline mr-1"}),"Disable"]})]})]}),(0,r.jsxs)(j.Zb,{id:"notion",className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(B.F,{className:"h-7 w-7 mr-2"}),"Notion",t.enabled_content_source.notion&&(0,r.jsx)(Y.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsxs)(j.aY,{className:"grid gap-4",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Sync your Notion workspace."}),!t.notion_oauth_url&&(0,r.jsx)(u.I,{onChange:e=>f(e.target.value),value:i||"",placeholder:"Enter API Key of your Khoj integration on Notion",className:"w-full border border-gray-300 rounded-lg px-4 py-6"})]}),(0,r.jsxs)(j.eW,{className:"flex flex-wrap gap-4",children:[t.notion_oauth_url&&!t.enabled_content_source.notion?(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:()=>{window.open(t.notion_oauth_url)},children:[(0,r.jsx)(Z.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]}):t.enabled_content_source.notion&&i===t.notion_token?(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:()=>ed("notion"),children:[(0,r.jsx)(M.t,{className:"h-5 w-5 inline mr-1"}),"Sync"]}):t.notion_oauth_url?(0,r.jsx)(r.Fragment,{}):(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:ec,disabled:i===t.notion_token,children:[(0,r.jsx)(E.B,{className:"h-5 w-5 inline mr-1"}),t.enabled_content_source.notion&&"Update API Key"||"Set API Key"]}),(0,r.jsxs)(x.z,{variant:"outline",size:"sm",className:"".concat(t.notion_token||"hidden"),onClick:()=>eh("notion"),children:[(0,r.jsx)(K.u,{className:"h-5 w-5 inline mr-1"}),"Disconnect"]})]})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Models"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[t.chat_model_options.length>0&&(0,r.jsxs)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(U.G,{className:"h-7 w-7 mr-2"}),"Chat"]}),(0,r.jsxs)(j.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the chat model to generate text responses"}),(0,r.jsx)(ea,{items:t.chat_model_options,selected:t.selected_chat_model_config,callbackFunc:el("chat")})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),t.paint_model_options.length>0&&(0,r.jsxs)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(V.Y,{className:"h-7 w-7 mr-2"}),"Paint"]}),(0,r.jsxs)(j.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the paint model to generate image responses"}),(0,r.jsx)(ea,{items:t.paint_model_options,selected:t.selected_paint_model_config,callbackFunc:el("paint")})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),t.voice_model_options.length>0&&(0,r.jsxs)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(H.u,{className:"h-7 w-7 mr-2"}),"Voice"]}),(0,r.jsxs)(j.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the voice model to generate speech responses"}),(0,r.jsx)(ea,{items:t.voice_model_options,selected:t.selected_voice_model_config,callbackFunc:el("voice")})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{id:"clients",className:"text-2xl",children:"Clients"}),(0,r.jsxs)("div",{className:"cards flex flex-col flex-wrap gap-8",children:[!t.anonymous_mode&&(0,r.jsx)(er,{}),(0,r.jsxs)(j.Zb,{className:"".concat(S," lg:w-2/3"),children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(L.V,{className:"h-7 w-7 mr-2"}),"Chat on Whatsapp","verified"===y&&(0,r.jsx)(Y.f,{weight:"bold",className:"h-4 w-4 ml-1 text-green-400"})||"setup"!==y&&(0,r.jsx)(G.C,{weight:"bold",className:"h-4 w-4 ml-1 text-yellow-400"})]}),(0,r.jsxs)(j.aY,{className:"grid gap-4",children:[(0,r.jsxs)("p",{className:"text-gray-400",children:["Connect your number to chat with Khoj on WhatsApp. Learn more about the integration"," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/whatsapp",children:"here"}),"."]}),(0,r.jsxs)("div",{children:[(0,r.jsx)($.Z,{initialValue:g||"",onChangeNumber:b,disabled:"verify"===y,initOptions:{separateDialCode:!0,initialCountry:"af",utilsScript:"https://assets.khoj.dev/intl-tel-input%4023.8.0_build_js_utils.js",containerClass:"".concat(o().phoneInput)}}),"verify"===y&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:"Enter the OTP sent to your number: ".concat(g)}),(0,r.jsx)(p.Zn,{autoFocus:!0,maxLength:6,value:w||"",onChange:N,onComplete:()=>v("verify"),children:(0,r.jsxs)(p.hf,{children:[(0,r.jsx)(p.cY,{index:0}),(0,r.jsx)(p.cY,{index:1}),(0,r.jsx)(p.cY,{index:2}),(0,r.jsx)(p.cY,{index:3}),(0,r.jsx)(p.cY,{index:4}),(0,r.jsx)(p.cY,{index:5})]})})]})]})]}),(0,r.jsxs)(j.eW,{className:"flex flex-wrap gap-4",children:["verify"===y&&(0,r.jsx)(x.z,{variant:"outline",onClick:C,children:"Verify"})||(0,r.jsx)(x.z,{variant:"outline",disabled:!g||g===t.phone_number&&"verified"===y||!(0,m.y)(g),onClick:T,children:t.phone_number?g&&(g!==t.phone_number||"verified"!==y)&&(0,m.y)(g)?(0,r.jsxs)(r.Fragment,{children:["Send OTP"," ",(0,r.jsx)(J.o,{className:"inline ml-2",weight:"bold"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(q.F,{className:"inline mr-2 text-green-400"}),"Switch Number"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Z.F,{className:"inline mr-2"}),"Setup Whatsapp"]})}),"verified"===y&&(0,r.jsxs)(x.z,{variant:"outline",onClick:()=>D(),children:[(0,r.jsx)(K.u,{className:"h-5 w-5 mr-2"}),"Disconnect"]})]})]})]})]})]})})})})]})]})]}):(0,r.jsx)(X.Z,{})}(a=n||(n={})).Setup="setup",a.SendOTP="otp",a.VerifyOTP="verify",a.Verified="verified"},77992:function(e,t,s){"use strict";s.d(t,{pm:function(){return m}});var a=s(2265);let n=0,r=new Map,i=e=>{if(r.has(e))return;let t=setTimeout(()=>{r.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);r.set(e,t)},o=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:s}=t;return s?i(s):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===s||void 0===s?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},l=[],c={toasts:[]};function d(e){c=o(c,e),l.forEach(e=>{e(c)})}function h(e){let{...t}=e,s=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>d({type:"DISMISS_TOAST",toastId:s});return d({type:"ADD_TOAST",toast:{...t,id:s,open:!0,onOpenChange:e=>{e||a()}}}),{id:s,dismiss:a,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:s}})}}function m(){let[e,t]=a.useState(c);return a.useEffect(()=>(l.push(t),()=>{let e=l.indexOf(t);e>-1&&l.splice(e,1)}),[e]),{...e,toast:h,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},917:function(e){e.exports={page:"settings_page__mP7qk",contentBody:"settings_contentBody__uZjue",phoneInput:"settings_phoneInput__j6xJN"}}},function(e){e.O(0,[6008,2663,3861,9259,8667,4363,6244,1199,2327,2971,2117,1744],function(){return e(e.s=62960)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7138,3317,
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7138,8459,3317,244],{34780:function(e,t,n){Promise.resolve().then(n.bind(n,85147))},7436:function(e,t,n){"use strict";n.d(t,{EK:function(){return i},Gv:function(){return l},IC:function(){return _},Iy:function(){return s},LF:function(){return u},Nr:function(){return m},k6:function(){return a},o0:function(){return f},xq:function(){return d}});var r=n(2265),o=n(63861);let c=()=>window.fetch("https://ipapi.co/json").then(e=>e.json()).catch(e=>console.log(e)),u=e=>e.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase());function i(){console.log("%c %s","font-family:monospace",'\n __ __ __ __ ______ __ _____ __\n/\\ \\/ / /\\ \\_\\ \\ /\\ __ \\ /\\ \\ /\\ __ \\ /\\ \\\n\\ \\ _"-. \\ \\ __ \\ \\ \\ \\/\\ \\ _\\_\\ \\ \\ \\ __ \\ \\ \\ \\\n \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\ \\_____\\ /\\_____\\ \\ \\_\\ \\_\\ \\ \\_\\\n \\/_/\\/_/ \\/_/\\/_/ \\/_____/ \\/_____/ \\/_/\\/_/ \\/_/\n\n\nGreetings traveller,\n\nI am ✨Khoj✨, your open-source, personal AI copilot.\n\nSee my source code at https://github.com/khoj-ai/khoj\nRead my operating manual at https://docs.khoj.dev\n')}function a(){let{data:e,error:t,isLoading:n}=(0,o.ZP)("/api/ip",c,{revalidateOnFocus:!1});return{locationData:e,locationDataError:t,locationDataLoading:n}}function _(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=()=>{window.innerWidth<=768?t(!0):t(!1)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let s=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{attributes:!0,characterData:!0,childList:!0,subtree:!0};r.useEffect(()=>{if(e.current){let r=new MutationObserver(t);return r.observe(e.current,n),()=>r.disconnect()}},[e,t,n])};function l(){let[e,t]=(0,r.useState)(!1),[n,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{"dark"===localStorage.getItem("theme")?(document.documentElement.classList.add("dark"),t(!0)):"light"===localStorage.getItem("theme")?(document.documentElement.classList.remove("dark"),t(!1)):window.matchMedia("(prefers-color-scheme: dark)").matches&&(document.documentElement.classList.add("dark"),t(!0)),o(!0)},[]),(0,r.useEffect)(()=>{n&&(e?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),localStorage.setItem("theme",e?"dark":"light"))},[e,n]),[e,t]}let d=e=>e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(2)," KB"):"".concat((e/1048576).toFixed(2)," MB");function m(e,t){let[n,o]=(0,r.useState)(e);return(0,r.useEffect)(()=>{let n=setTimeout(()=>{o(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}let f=e=>{try{let t=new Date(e),n=new Date,r=Math.floor((n.getTime()-t.getTime())/6e4);if(r<1)return"just now";if(r<60)return"".concat(r," minutes ago");if(r<120)return"1 hour ago";if(r<1440)return"".concat(Math.floor(r/60)," hours ago");return new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0,timeZoneName:"short"}).format(t)}catch(t){return console.error("Error formatting date:",t),e}}},85147:function(e,t,n){"use strict";n.d(t,{ThemeProvider:function(){return c}});var r=n(57437),o=n(7436);function c(e){let{children:t}=e,[n,c]=(0,o.Gv)();return(0,r.jsx)(r.Fragment,{children:t})}}},function(e){e.O(0,[3861,2971,2117,1744],function(){return e(e.s=34780)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3111],{91955:function(e,t,s){Promise.resolve().then(s.bind(s,41694))},41694:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return p}});var a=s(57437),o=s(22515),n=s.n(o),i=s(2265),l=s(74986),c=s(14308);s(2446);var r=s(7436),d=s(56937),h=s(5477),u=s(60729),g=s(34124),m=s(6512),x=s(37104);function f(e){let[t,s]=(0,i.useState)(""),[o,c]=(0,i.useState)([]),[r,d]=(0,i.useState)(!1),[u,g]=(0,i.useState)(null),m=(0,i.useRef)(null),x=e.setQueryToProcess,f=e.streamedMessages,p=e.isMobileWidth?"w-full":"w-4/6";return((0,i.useEffect)(()=>{if(o.length>0){let t=o.map(e=>encodeURIComponent(e));e.setImages(t)}},[o,e.setImages]),(0,i.useEffect)(()=>{t&&(d(!0),x(t))},[t,x]),(0,i.useEffect)(()=>{f&&f.length>0&&f[f.length-1].completed?d(!1):s("")},[f]),e.publicConversationSlug||e.conversationId)?(0,a.jsx)("div",{className:"flex flex-row h-full w-full",children:(0,a.jsxs)("div",{className:"flex flex-col h-full w-full",children:[(0,a.jsx)("div",{className:n().chatBodyFull,children:(0,a.jsx)(l.Z,{publicConversationSlug:e.publicConversationSlug,conversationId:e.conversationId||"",setAgent:g,setTitle:e.setTitle,pendingMessage:r?t:"",incomingMessages:e.streamedMessages,customClassName:p})}),(0,a.jsx)("div",{className:"".concat(n().inputBox," p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-2xl md:rounded-xl h-fit ").concat(p," mr-auto ml-auto mt-auto"),children:(0,a.jsx)(h.a,{isLoggedIn:e.isLoggedIn,sendMessage:e=>s(e),sendImage:e=>c(t=>[...t,e]),sendDisabled:r,chatOptionsData:e.chatOptionsData,conversationId:e.conversationId,agentColor:null==u?void 0:u.color,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles,setTriggeredAbort:()=>{},ref:m})})]})}):(0,a.jsx)("div",{className:n().suggestions,children:"Whoops, nothing to see here!"})}function p(){let[e,t]=(0,i.useState)(null),[s,o]=(0,i.useState)(!0),[l,h]=(0,i.useState)("Khoj AI - Chat"),[p,_]=(0,i.useState)(void 0),[v,j]=(0,i.useState)([]),[S,N]=(0,i.useState)(""),[C,I]=(0,i.useState)(null),[b,w]=(0,i.useState)(void 0),[y,B]=(0,i.useState)([]),{data:O,error:k,isLoading:M}=(0,d.GW)(),E=(0,r.IC)();return((0,i.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{o(!1),e&&t(e)}).catch(e=>{console.error(e)}),(0,r.EK)(),w(window.location.pathname.split("/").pop()||"")},[]),(0,i.useEffect)(()=>{C&&localStorage.setItem("uploadedFiles",JSON.stringify(C))},[C]),(0,i.useEffect)(()=>{if(S&&!p){fetch("/api/chat/share/fork?public_conversation_slug=".concat(b),{method:"POST",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{_(e.conversation_id),localStorage.setItem("message",S),y.length>0&&localStorage.setItem("images",JSON.stringify(y)),window.location.href="/chat?conversationId=".concat(e.conversation_id)}).catch(e=>{console.error(e)});return}},[S,p,b]),s)?(0,a.jsx)(c.Z,{}):b?(0,a.jsxs)(u.Hn,{children:[(0,a.jsx)(g.S,{conversationId:p||""}),(0,a.jsxs)(u.kV,{children:[(0,a.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,a.jsx)(u.vP,{className:"-ml-1"}),(0,a.jsx)(m.Z,{orientation:"vertical",className:"mr-2 h-4"}),b&&(0,a.jsx)("div",{className:"".concat(n().chatTitleWrapper," text-nowrap text-ellipsis overflow-hidden max-w-screen-md grid items-top font-bold mx-2 md:mr-8 col-auto h-fit"),children:E?(0,a.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,a.jsx)(x.VO,{className:"h-auto w-16"})}):l&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("h2",{className:"text-lg text-ellipsis whitespace-nowrap overflow-x-hidden mr-4",children:l})})})]}),(0,a.jsxs)("div",{className:"".concat(n().main," ").concat(n().chatLayout),children:[(0,a.jsx)("title",{children:l}),(0,a.jsx)("div",{className:n().chatBox,children:(0,a.jsx)("div",{className:n().chatBoxBody,children:(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(c.Z,{}),children:(0,a.jsx)(f,{conversationId:p,streamedMessages:v,setQueryToProcess:N,isLoggedIn:!!O,publicConversationSlug:b,chatOptionsData:e,setTitle:h,setUploadedFiles:I,isMobileWidth:E,setImages:B})})})})]})]})]}):(0,a.jsx)("div",{className:n().suggestions,children:"Whoops, nothing to see here!"})}},22515:function(e){e.exports={main:"sharedChat_main__7Nayy",suggestions:"sharedChat_suggestions__V8kr_",inputBox:"sharedChat_inputBox__wRW5A",chatBodyFull:"sharedChat_chatBodyFull__O1MOv",chatBody:"sharedChat_chatBody__OnHDL",chatLayout:"sharedChat_chatLayout__gutlc",chatBox:"sharedChat_chatBox__PmAPg",titleBar:"sharedChat_titleBar__vOHp_",chatBoxBody:"sharedChat_chatBoxBody__ef2Nl",agentIndicator:"sharedChat_agentIndicator__ORCl4"}}},function(e){e.O(0,[9346,
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3111],{91955:function(e,t,s){Promise.resolve().then(s.bind(s,41694))},41694:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return p}});var a=s(57437),o=s(22515),n=s.n(o),i=s(2265),l=s(74986),c=s(14308);s(2446);var r=s(7436),d=s(56937),h=s(5477),u=s(60729),g=s(34124),m=s(6512),x=s(37104);function f(e){let[t,s]=(0,i.useState)(""),[o,c]=(0,i.useState)([]),[r,d]=(0,i.useState)(!1),[u,g]=(0,i.useState)(null),m=(0,i.useRef)(null),x=e.setQueryToProcess,f=e.streamedMessages,p=e.isMobileWidth?"w-full":"w-4/6";return((0,i.useEffect)(()=>{if(o.length>0){let t=o.map(e=>encodeURIComponent(e));e.setImages(t)}},[o,e.setImages]),(0,i.useEffect)(()=>{t&&(d(!0),x(t))},[t,x]),(0,i.useEffect)(()=>{f&&f.length>0&&f[f.length-1].completed?d(!1):s("")},[f]),e.publicConversationSlug||e.conversationId)?(0,a.jsx)("div",{className:"flex flex-row h-full w-full",children:(0,a.jsxs)("div",{className:"flex flex-col h-full w-full",children:[(0,a.jsx)("div",{className:n().chatBodyFull,children:(0,a.jsx)(l.Z,{publicConversationSlug:e.publicConversationSlug,conversationId:e.conversationId||"",setAgent:g,setTitle:e.setTitle,pendingMessage:r?t:"",incomingMessages:e.streamedMessages,customClassName:p})}),(0,a.jsx)("div",{className:"".concat(n().inputBox," p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-2xl md:rounded-xl h-fit ").concat(p," mr-auto ml-auto mt-auto"),children:(0,a.jsx)(h.a,{isLoggedIn:e.isLoggedIn,sendMessage:e=>s(e),sendImage:e=>c(t=>[...t,e]),sendDisabled:r,chatOptionsData:e.chatOptionsData,conversationId:e.conversationId,agentColor:null==u?void 0:u.color,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles,setTriggeredAbort:()=>{},ref:m})})]})}):(0,a.jsx)("div",{className:n().suggestions,children:"Whoops, nothing to see here!"})}function p(){let[e,t]=(0,i.useState)(null),[s,o]=(0,i.useState)(!0),[l,h]=(0,i.useState)("Khoj AI - Chat"),[p,_]=(0,i.useState)(void 0),[v,j]=(0,i.useState)([]),[S,N]=(0,i.useState)(""),[C,I]=(0,i.useState)(null),[b,w]=(0,i.useState)(void 0),[y,B]=(0,i.useState)([]),{data:O,error:k,isLoading:M}=(0,d.GW)(),E=(0,r.IC)();return((0,i.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{o(!1),e&&t(e)}).catch(e=>{console.error(e)}),(0,r.EK)(),w(window.location.pathname.split("/").pop()||"")},[]),(0,i.useEffect)(()=>{C&&localStorage.setItem("uploadedFiles",JSON.stringify(C))},[C]),(0,i.useEffect)(()=>{if(S&&!p){fetch("/api/chat/share/fork?public_conversation_slug=".concat(b),{method:"POST",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{_(e.conversation_id),localStorage.setItem("message",S),y.length>0&&localStorage.setItem("images",JSON.stringify(y)),window.location.href="/chat?conversationId=".concat(e.conversation_id)}).catch(e=>{console.error(e)});return}},[S,p,b]),s)?(0,a.jsx)(c.Z,{}):b?(0,a.jsxs)(u.Hn,{children:[(0,a.jsx)(g.S,{conversationId:p||""}),(0,a.jsxs)(u.kV,{children:[(0,a.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,a.jsx)(u.vP,{className:"-ml-1"}),(0,a.jsx)(m.Z,{orientation:"vertical",className:"mr-2 h-4"}),b&&(0,a.jsx)("div",{className:"".concat(n().chatTitleWrapper," text-nowrap text-ellipsis overflow-hidden max-w-screen-md grid items-top font-bold mx-2 md:mr-8 col-auto h-fit"),children:E?(0,a.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,a.jsx)(x.VO,{className:"h-auto w-16"})}):l&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("h2",{className:"text-lg text-ellipsis whitespace-nowrap overflow-x-hidden mr-4",children:l})})})]}),(0,a.jsxs)("div",{className:"".concat(n().main," ").concat(n().chatLayout),children:[(0,a.jsx)("title",{children:l}),(0,a.jsx)("div",{className:n().chatBox,children:(0,a.jsx)("div",{className:n().chatBoxBody,children:(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(c.Z,{}),children:(0,a.jsx)(f,{conversationId:p,streamedMessages:v,setQueryToProcess:N,isLoggedIn:!!O,publicConversationSlug:b,chatOptionsData:e,setTitle:h,setUploadedFiles:I,isMobileWidth:E,setImages:B})})})})]})]})]}):(0,a.jsx)("div",{className:n().suggestions,children:"Whoops, nothing to see here!"})}},22515:function(e){e.exports={main:"sharedChat_main__7Nayy",suggestions:"sharedChat_suggestions__V8kr_",inputBox:"sharedChat_inputBox__wRW5A",chatBodyFull:"sharedChat_chatBodyFull__O1MOv",chatBody:"sharedChat_chatBody__OnHDL",chatLayout:"sharedChat_chatLayout__gutlc",chatBox:"sharedChat_chatBox__PmAPg",titleBar:"sharedChat_titleBar__vOHp_",chatBoxBody:"sharedChat_chatBoxBody__ef2Nl",agentIndicator:"sharedChat_agentIndicator__ORCl4"}}},function(e){e.O(0,[9346,4842,2663,3954,1919,3861,9259,8667,4363,4357,8155,2327,5477,4986,2971,2117,1744],function(){return e(e.s=91955)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
!function(){"use strict";var e,t,n,r,o,c,a,f,u,i={},d={};function b(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}},r=!0;try{i[e].call(n.exports,n,n.exports,b),r=!1}finally{r&&delete d[e]}return n.exports}b.m=i,e=[],b.O=function(t,n,r,o){if(n){o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,r,o];return}for(var a=1/0,c=0;c<e.length;c++){for(var n=e[c][0],r=e[c][1],o=e[c][2],f=!0,u=0;u<n.length;u++)a>=o&&Object.keys(b.O).every(function(e){return b.O[e](n[u])})?n.splice(u--,1):(f=!1,o<a&&(a=o));if(f){e.splice(c--,1);var i=r();void 0!==i&&(t=i)}}return t},b.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},b.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var o=Object.create(null);b.r(o);var c={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach(function(t){c[t]=function(){return e[t]}});return c.default=function(){return e},b.d(o,c),o},b.d=function(e,t){for(var n in t)b.o(t,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},b.f={},b.e=function(e){return Promise.all(Object.keys(b.f).reduce(function(t,n){return b.f[n](e,t),t},[]))},b.u=function(e){return"static/chunks/"+(({1264:"90542734",4692:"0d8bff65",6555:"964ecbae",7293:"94ca1967"})[e]||e)+"."+({58:"f4bd8a3c9d88f5fe",133:"392ae90c3b2a67f2",1243:"ea2826fb35adb15a",1264:"fecd4dc1a89ed166",1592:"b069bdb7aaddd2eb",2069:"f060659791c0c484",2170:"45431769330fa5b7",3237:"c4754f02f1a388cb",3305:"1fc7297ba154ee95",3332:"6313db5217bb1b67",3451:"421db0b49fdbd881",3460:"39c2b9b6a3898384",3727:"dcea8f2193111552",4299:"2aaa569416cfc208",4327:"238d15c09a039b8b",4415:"e0c0da5eedae4dd7",4610:"a1e7f40a759ed2aa",4650:"41f041da0ad365ad",4692:"4b1018183a8be7c2",4872:"5422e8324272ab40",5061:"79a660faed0e16a9",5279:"85d537880b8041ae",5402:"b9460f1b16b57e92",5555:"f7cf9795d675de51",5978:"ddc72cd73130aadc",6434:"7afea9648e238ad5",6555:"51d6faf8801d15e6",7140:"4be689873f6a2d1f",7293:"1d9b42d929a1ee8c",7836:"86884157d53d23a1",7890:"f681eb1d1f83bea2",7953:"f6fc335a23efb959",8254:"3145a4fbdcfdca46",8400:"c95e4e79bcd79a56",8673:"be44c4d9e4f1d084",8698:"a088118fef40d302",9022:"33974a513a281fd2",9433:"b1b5f5d050c43e3c",9597:"83583248dfbf6e73",9822:"34f293973c4e9b04"})[e]+".js"},b.miniCssF=function(e){},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="_N_E:",b.l=function(e,t,n,c){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var a,f,u=document.getElementsByTagName("script"),i=0;i<u.length;i++){var d=u[i];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==o+n){a=d;break}}a||(f=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,b.nc&&a.setAttribute("nonce",b.nc),a.setAttribute("data-webpack",o+n),a.src=b.tu(e)),r[e]=[t];var l=function(t,n){a.onerror=a.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=l.bind(null,a.onerror),a.onload=l.bind(null,a.onload),f&&document.head.appendChild(a)},b.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.tt=function(){return void 0===c&&(c={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(c=trustedTypes.createPolicy("nextjs#bundler",c))),c},b.tu=function(e){return b.tt().createScriptURL(e)},b.p="/_next/",a={2272:0,3254:0,3587:0,6250:0,
|
1
|
+
!function(){"use strict";var e,t,n,r,o,c,a,f,u,i={},d={};function b(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}},r=!0;try{i[e].call(n.exports,n,n.exports,b),r=!1}finally{r&&delete d[e]}return n.exports}b.m=i,e=[],b.O=function(t,n,r,o){if(n){o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,r,o];return}for(var a=1/0,c=0;c<e.length;c++){for(var n=e[c][0],r=e[c][1],o=e[c][2],f=!0,u=0;u<n.length;u++)a>=o&&Object.keys(b.O).every(function(e){return b.O[e](n[u])})?n.splice(u--,1):(f=!1,o<a&&(a=o));if(f){e.splice(c--,1);var i=r();void 0!==i&&(t=i)}}return t},b.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},b.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var o=Object.create(null);b.r(o);var c={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach(function(t){c[t]=function(){return e[t]}});return c.default=function(){return e},b.d(o,c),o},b.d=function(e,t){for(var n in t)b.o(t,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},b.f={},b.e=function(e){return Promise.all(Object.keys(b.f).reduce(function(t,n){return b.f[n](e,t),t},[]))},b.u=function(e){return"static/chunks/"+(({1264:"90542734",4692:"0d8bff65",6555:"964ecbae",7293:"94ca1967"})[e]||e)+"."+({58:"f4bd8a3c9d88f5fe",133:"392ae90c3b2a67f2",1243:"ea2826fb35adb15a",1264:"fecd4dc1a89ed166",1592:"b069bdb7aaddd2eb",2069:"f060659791c0c484",2170:"45431769330fa5b7",3237:"c4754f02f1a388cb",3305:"1fc7297ba154ee95",3332:"6313db5217bb1b67",3451:"421db0b49fdbd881",3460:"39c2b9b6a3898384",3727:"dcea8f2193111552",4299:"2aaa569416cfc208",4327:"238d15c09a039b8b",4415:"e0c0da5eedae4dd7",4610:"a1e7f40a759ed2aa",4650:"41f041da0ad365ad",4692:"4b1018183a8be7c2",4872:"5422e8324272ab40",5061:"79a660faed0e16a9",5279:"85d537880b8041ae",5402:"b9460f1b16b57e92",5555:"f7cf9795d675de51",5978:"ddc72cd73130aadc",6434:"7afea9648e238ad5",6555:"51d6faf8801d15e6",7140:"4be689873f6a2d1f",7293:"1d9b42d929a1ee8c",7836:"86884157d53d23a1",7890:"f681eb1d1f83bea2",7953:"f6fc335a23efb959",8254:"3145a4fbdcfdca46",8400:"c95e4e79bcd79a56",8673:"be44c4d9e4f1d084",8698:"a088118fef40d302",9022:"33974a513a281fd2",9433:"b1b5f5d050c43e3c",9597:"83583248dfbf6e73",9822:"34f293973c4e9b04"})[e]+".js"},b.miniCssF=function(e){},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="_N_E:",b.l=function(e,t,n,c){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var a,f,u=document.getElementsByTagName("script"),i=0;i<u.length;i++){var d=u[i];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==o+n){a=d;break}}a||(f=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,b.nc&&a.setAttribute("nonce",b.nc),a.setAttribute("data-webpack",o+n),a.src=b.tu(e)),r[e]=[t];var l=function(t,n){a.onerror=a.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=l.bind(null,a.onerror),a.onload=l.bind(null,a.onload),f&&document.head.appendChild(a)},b.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.tt=function(){return void 0===c&&(c={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(c=trustedTypes.createPolicy("nextjs#bundler",c))),c},b.tu=function(e){return b.tt().createScriptURL(e)},b.p="/_next/",a={2272:0,3254:0,3587:0,6250:0,4842:0,2663:0,6008:0,2026:0,9346:0},b.f.j=function(e,t){var n=b.o(a,e)?a[e]:void 0;if(0!==n){if(n)t.push(n[2]);else if(/^(2(026|272|663)|3254|3587|4842|6008|6250|9346)$/.test(e))a[e]=0;else{var r=new Promise(function(t,r){n=a[e]=[t,r]});t.push(n[2]=r);var o=b.p+b.u(e),c=Error();b.l(o,function(t){if(b.o(a,e)&&(0!==(n=a[e])&&(a[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",c.name="ChunkLoadError",c.type=r,c.request=o,n[1](c)}},"chunk-"+e,e)}}},b.O.j=function(e){return 0===a[e]},f=function(e,t){var n,r,o=t[0],c=t[1],f=t[2],u=0;if(o.some(function(e){return 0!==a[e]})){for(n in c)b.o(c,n)&&(b.m[n]=c[n]);if(f)var i=f(b)}for(e&&e(t);u<o.length;u++)r=o[u],b.o(a,r)&&a[r]&&a[r][0](),a[r]=0;return b.O(i)},(u=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(f.bind(null,0)),u.push=f.bind(null,u.push.bind(u)),b.nc=void 0}();
|
@@ -1 +1 @@
|
|
1
|
-
div.chat_main__8xQu5{height:100%;color:hsla(var(--foreground));margin-left:auto;margin-right:auto}.chat_suggestions__m8n2t{display:flex;overflow-x:none;height:50%;padding:10px;white-space:nowrap;gap:1rem}div.chat_inputBox__LOFws{border:1px solid var(--border-color);margin-bottom:20px;gap:12px;align-content:center}input.chat_inputBox__LOFws{border:none}input.chat_inputBox__LOFws:focus{outline:none;background-color:transparent}div.chat_inputBox__LOFws:focus{box-shadow:0 8px 16px 0 rgba(0,0,0,.2)}div.chat_chatBodyFull__FfKEK{display:grid;grid-template-columns:1fr;height:auto}button.chat_inputBox__LOFws{border:none;outline:none;background-color:transparent;cursor:pointer;border-radius:.5rem;padding:.5rem;background:linear-gradient(var(--calm-green),var(--calm-blue))}div.chat_chatBody__sS1LX{display:grid;grid-template-columns:1fr 1fr;height:100%}.chat_inputBox__LOFws{color:hsla(var(--foreground))}div.chat_chatLayout__pR203{display:grid;grid-template-columns:1fr;gap:1rem;width:100%}div.chat_chatBox__FBct_{display:grid;height:100%}div.chat_titleBar__R5QlK{display:grid;grid-template-columns:1fr auto}div.chat_chatBoxBody__qT_SC{display:grid;height:100%;width:100%;margin:auto}div.chat_agentIndicator__8V55w a{display:flex;text-align:center;align-content:center;align-items:center}div.chat_agentIndicator__8V55w{padding:10px}div.chat_chatTitleWrapper__6ChWq{grid-template-columns:1fr auto}@media screen and (max-width:768px){div.chat_inputBox__LOFws{margin-bottom:0}div.chat_chatBoxBody__qT_SC{width:100%}div.chat_chatBody__sS1LX{grid-template-columns:0fr 1fr}div.chat_chatBox__FBct_{padding:0;height:100%}div.chat_chatLayout__pR203{gap:0;grid-template-columns:1fr}}div.chatHistory_chatHistory__CoaVT{display:flex;flex-direction:column;height:100%;margin:auto}div.chatHistory_agentIndicator__wOU1f a{display:flex;text-align:center;align-content:center;align-items:center}div.chatHistory_trainOfThought__mMWSR{padding:8px 16px;margin:12px}div.chatMessage_chatMessageContainer__sAivf{display:flex;flex-direction:column;margin:12px;border-radius:16px;padding:8px 16px 0;word-break:break-word}div.chatMessage_chatMessageWrapper__u5m8A{padding-left:1rem;padding-bottom:1rem;max-width:80vw}div.chatMessage_chatMessageWrapper__u5m8A ol,div.chatMessage_chatMessageWrapper__u5m8A p:not(:last-child),div.chatMessage_chatMessageWrapper__u5m8A ul{margin-bottom:16px}div.chatMessage_chatMessageWrapper__u5m8A a span{display:revert!important}div.chatMessage_khojfullHistory__NPu2l{padding-left:4px}div.chatMessage_youfullHistory__ioyfH{max-width:100%}div.chatMessage_chatMessageContainer__sAivf.chatMessage_youfullHistory__ioyfH{padding-left:0}div.chatMessage_you__6GUC4{background-color:hsla(var(--secondary));align-self:flex-end;border-radius:16px}div.chatMessage_khoj__cjWON{background-color:transparent;color:hsl(var(--accent-foreground));align-self:flex-start}div.chatMessage_khojChatMessage__BabQz{padding-top:8px;padding-left:16px}div.chatMessage_emptyChatMessage__J9JRn{display:none}div.chatMessage_imagesContainer__HTRjT{display:flex;overflow-x:auto;padding-bottom:8px;margin-bottom:8px}div.chatMessage_imageWrapper__DF92M{flex:0 0 auto;margin-right:8px}div.chatMessage_imageWrapper__DF92M img{width:auto;height:128px;-o-object-fit:cover;object-fit:cover;border-radius:8px}div.chatMessage_khoj__cjWON div.chatMessage_imageWrapper__DF92M img{height:512px}div.chatMessage_khoj__cjWON div.chatMessage_imageWrapper__DF92M{flex:1 1 auto}div.chatMessage_khoj__cjWON div.chatMessage_imagesContainer__HTRjT{display:flex;flex-wrap:wrap;flex-direction:row;overflow-x:hidden}div.chatMessage_chatMessageContainer__sAivf>img{width:auto;height:auto;max-width:100%;max-height:80vh;-o-object-fit:contain;object-fit:contain;display:block;margin-top:.25rem;margin-right:auto}div.chatMessage_chatMessageContainer__sAivf h3 img{width:24px}div.chatMessage_you__6GUC4{color:hsla(var(--secondary-foreground))}div.chatMessage_author__muRtC{font-size:.75rem;color:grey;text-align:right}div.chatMessage_chatFooter__0vR8s{display:flex;justify-content:space-between;min-height:28px}div.chatMessage_chatButtons__Lbk8T{display:flex;justify-content:flex-end;width:-moz-min-content;width:min-content;border:1px solid var(--border-color);border-radius:16px;position:relative;bottom:-12px;background-color:hsla(var(--secondary))}div.chatMessage_chatFooter__0vR8s button{cursor:pointer;color:hsl(var(--muted-foreground));border:none;border-radius:16px;padding:4px;margin-left:4px;margin-right:4px}div.chatMessage_chatFooter__0vR8s button:hover{background-color:hsla(var(--frosted-background-color))}button.chatMessage_codeCopyButton__Y_Ujv{cursor:pointer;float:right;border-radius:8px}button.chatMessage_codeCopyButton__Y_Ujv:hover{color:hsla(var(--frosted-background-color))}button.chatMessage_codeCopyButton__Y_Ujv img,button.chatMessage_copyButton__jd7q7 img,div.chatMessage_feedbackButtons___Brdy img{width:24px}div.chatMessage_trainOfThought__mR2Gg strong{font-weight:500}div.chatMessage_trainOfThought__mR2Gg.chatMessage_primary__WYPEb strong{font-weight:500;color:hsla(var(--secondary-foreground))}div.chatMessage_trainOfThought__mR2Gg.chatMessage_primary__WYPEb p{color:inherit}div.chatMessage_trainOfThoughtElement__le_bC{display:grid;grid-template-columns:auto 1fr;align-items:start}div.chatMessage_trainOfThoughtElement__le_bC ol,div.chatMessage_trainOfThoughtElement__le_bC ul{margin:auto;word-break:break-word}@media screen and (max-width:768px){div.chatMessage_youfullHistory__ioyfH{max-width:90%}div.chatMessage_khoj__cjWON div.chatMessage_imageWrapper__DF92M img{width:100%;height:auto}}@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_AMS-Regular.a79f1c31.woff2) format("woff2"),url(/_next/static/media/KaTeX_AMS-Regular.1608a09b.woff) format("woff"),url(/_next/static/media/KaTeX_AMS-Regular.4aafdb68.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/_next/static/media/KaTeX_Caligraphic-Bold.ec17d132.woff2) format("woff2"),url(/_next/static/media/KaTeX_Caligraphic-Bold.b6770918.woff) format("woff"),url(/_next/static/media/KaTeX_Caligraphic-Bold.cce5b8ec.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Caligraphic-Regular.55fac258.woff2) format("woff2"),url(/_next/static/media/KaTeX_Caligraphic-Regular.dad44a7f.woff) format("woff"),url(/_next/static/media/KaTeX_Caligraphic-Regular.07ef19e7.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/_next/static/media/KaTeX_Fraktur-Bold.d42a5579.woff2) format("woff2"),url(/_next/static/media/KaTeX_Fraktur-Bold.9f256b85.woff) format("woff"),url(/_next/static/media/KaTeX_Fraktur-Bold.b18f59e1.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Fraktur-Regular.d3c882a6.woff2) format("woff2"),url(/_next/static/media/KaTeX_Fraktur-Regular.7c187121.woff) format("woff"),url(/_next/static/media/KaTeX_Fraktur-Regular.ed38e79f.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/_next/static/media/KaTeX_Main-Bold.c3fb5ac2.woff2) format("woff2"),url(/_next/static/media/KaTeX_Main-Bold.d181c465.woff) format("woff"),url(/_next/static/media/KaTeX_Main-Bold.b74a1a8b.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/_next/static/media/KaTeX_Main-BoldItalic.6f2bb1df.woff2) format("woff2"),url(/_next/static/media/KaTeX_Main-BoldItalic.e3f82f9d.woff) format("woff"),url(/_next/static/media/KaTeX_Main-BoldItalic.70d8b0a5.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/_next/static/media/KaTeX_Main-Italic.8916142b.woff2) format("woff2"),url(/_next/static/media/KaTeX_Main-Italic.9024d815.woff) format("woff"),url(/_next/static/media/KaTeX_Main-Italic.47373d1e.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Main-Regular.0462f03b.woff2) format("woff2"),url(/_next/static/media/KaTeX_Main-Regular.7f51fe03.woff) format("woff"),url(/_next/static/media/KaTeX_Main-Regular.b7f8fe9b.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/_next/static/media/KaTeX_Math-BoldItalic.572d331f.woff2) format("woff2"),url(/_next/static/media/KaTeX_Math-BoldItalic.f1035d8d.woff) format("woff"),url(/_next/static/media/KaTeX_Math-BoldItalic.a879cf83.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/_next/static/media/KaTeX_Math-Italic.f28c23ac.woff2) format("woff2"),url(/_next/static/media/KaTeX_Math-Italic.5295ba48.woff) format("woff"),url(/_next/static/media/KaTeX_Math-Italic.939bc644.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(/_next/static/media/KaTeX_SansSerif-Bold.8c5b5494.woff2) format("woff2"),url(/_next/static/media/KaTeX_SansSerif-Bold.bf59d231.woff) format("woff"),url(/_next/static/media/KaTeX_SansSerif-Bold.94e1e8dc.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(/_next/static/media/KaTeX_SansSerif-Italic.3b1e59b3.woff2) format("woff2"),url(/_next/static/media/KaTeX_SansSerif-Italic.7c9bc82b.woff) format("woff"),url(/_next/static/media/KaTeX_SansSerif-Italic.b4c20c84.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_SansSerif-Regular.ba21ed5f.woff2) format("woff2"),url(/_next/static/media/KaTeX_SansSerif-Regular.74048478.woff) format("woff"),url(/_next/static/media/KaTeX_SansSerif-Regular.d4d7ba48.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Script-Regular.03e9641d.woff2) format("woff2"),url(/_next/static/media/KaTeX_Script-Regular.07505710.woff) format("woff"),url(/_next/static/media/KaTeX_Script-Regular.fe9cbbe1.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Size1-Regular.eae34984.woff2) format("woff2"),url(/_next/static/media/KaTeX_Size1-Regular.e1e279cb.woff) format("woff"),url(/_next/static/media/KaTeX_Size1-Regular.fabc004a.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Size2-Regular.5916a24f.woff2) format("woff2"),url(/_next/static/media/KaTeX_Size2-Regular.57727022.woff) format("woff"),url(/_next/static/media/KaTeX_Size2-Regular.d6b476ec.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Size3-Regular.b4230e7e.woff2) format("woff2"),url(/_next/static/media/KaTeX_Size3-Regular.9acaf01c.woff) format("woff"),url(/_next/static/media/KaTeX_Size3-Regular.a144ef58.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Size4-Regular.10d95fd3.woff2) format("woff2"),url(/_next/static/media/KaTeX_Size4-Regular.7a996c9d.woff) format("woff"),url(/_next/static/media/KaTeX_Size4-Regular.fbccdabe.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Typewriter-Regular.a8709e36.woff2) format("woff2"),url(/_next/static/media/KaTeX_Typewriter-Regular.6258592b.woff) format("woff"),url(/_next/static/media/KaTeX_Typewriter-Regular.d97aaf4a.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.21"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.suggestions_card__fbiZo{border-radius:.5rem}.suggestions_title__vNozc{font-size:1rem}.suggestions_text__J_IfY{padding-top:.2rem;font-size:.9rem;white-space:wrap;padding-right:4px;color:#000}div.chatInputArea_actualInputArea__Ha6cN{display:grid;grid-template-columns:auto 1fr auto auto}
|
1
|
+
div.chat_main__8xQu5{height:100%;color:hsla(var(--foreground));margin-left:auto;margin-right:auto}.chat_suggestions__m8n2t{display:flex;overflow-x:none;height:50%;padding:10px;white-space:nowrap;gap:1rem}div.chat_inputBox__LOFws{border:1px solid var(--border-color);margin-bottom:20px;gap:12px;align-content:center}input.chat_inputBox__LOFws{border:none}input.chat_inputBox__LOFws:focus{outline:none;background-color:transparent}div.chat_inputBox__LOFws:focus{box-shadow:0 8px 16px 0 rgba(0,0,0,.2)}div.chat_chatBodyFull__FfKEK{display:grid;grid-template-columns:1fr;height:auto}button.chat_inputBox__LOFws{border:none;outline:none;background-color:transparent;cursor:pointer;border-radius:.5rem;padding:.5rem;background:linear-gradient(var(--calm-green),var(--calm-blue))}div.chat_chatBody__sS1LX{display:grid;grid-template-columns:1fr 1fr;height:100%}.chat_inputBox__LOFws{color:hsla(var(--foreground))}div.chat_chatLayout__pR203{display:grid;grid-template-columns:1fr;gap:1rem;width:100%}div.chat_chatBox__FBct_{display:grid;height:100%}div.chat_titleBar__R5QlK{display:grid;grid-template-columns:1fr auto}div.chat_chatBoxBody__qT_SC{display:grid;height:100%;width:100%;margin:auto}div.chat_agentIndicator__8V55w a{display:flex;text-align:center;align-content:center;align-items:center}div.chat_agentIndicator__8V55w{padding:10px}div.chat_chatTitleWrapper__6ChWq{grid-template-columns:1fr auto}@media screen and (max-width:768px){div.chat_inputBox__LOFws{margin-bottom:0}div.chat_chatBoxBody__qT_SC{width:100%}div.chat_chatBody__sS1LX{grid-template-columns:0fr 1fr}div.chat_chatBox__FBct_{padding:0;height:100%}div.chat_chatLayout__pR203{gap:0;grid-template-columns:1fr}}div.chatHistory_chatHistory__CoaVT{display:flex;flex-direction:column;height:100%;margin:auto}div.chatHistory_agentIndicator__wOU1f a{display:flex;text-align:center;align-content:center;align-items:center}div.chatHistory_trainOfThought__mMWSR{padding:8px 16px;margin:12px}div.chatMessage_chatMessageContainer__sAivf{display:flex;flex-direction:column;margin:12px;border-radius:16px;padding:8px 16px 0;word-break:break-word}div.chatMessage_chatMessageWrapper__u5m8A{padding-left:1rem;padding-bottom:1rem;max-width:80vw}div.chatMessage_chatMessageWrapper__u5m8A ol,div.chatMessage_chatMessageWrapper__u5m8A p:not(:last-child),div.chatMessage_chatMessageWrapper__u5m8A ul{margin-bottom:16px}div.chatMessage_chatMessageWrapper__u5m8A a span{display:revert!important}div.chatMessage_khojfullHistory__NPu2l{padding-left:4px}div.chatMessage_youfullHistory__ioyfH{max-width:100%}div.chatMessage_chatMessageContainer__sAivf.chatMessage_youfullHistory__ioyfH{padding-left:0}div.chatMessage_you__6GUC4{background-color:hsla(var(--secondary));align-self:flex-end;border-radius:16px}div.chatMessage_khoj__cjWON{background-color:transparent;color:hsl(var(--accent-foreground));align-self:flex-start}div.chatMessage_khojChatMessage__BabQz{padding-top:8px;padding-left:16px}div.chatMessage_emptyChatMessage__J9JRn{display:none}div.chatMessage_imagesContainer__HTRjT{display:flex;overflow-x:auto;padding-bottom:8px;margin-bottom:8px}div.chatMessage_imageWrapper__DF92M{flex:0 0 auto;margin-right:8px}div.chatMessage_imageWrapper__DF92M img{width:auto;height:128px;-o-object-fit:cover;object-fit:cover;border-radius:8px}div.chatMessage_khoj__cjWON div.chatMessage_imageWrapper__DF92M img{height:512px}div.chatMessage_khoj__cjWON div.chatMessage_imageWrapper__DF92M{flex:1 1 auto}div.chatMessage_khoj__cjWON div.chatMessage_imagesContainer__HTRjT{display:flex;flex-wrap:wrap;flex-direction:row;overflow-x:hidden}div.chatMessage_chatMessageContainer__sAivf>img{width:auto;height:auto;max-width:100%;max-height:80vh;-o-object-fit:contain;object-fit:contain;display:block;margin-top:.25rem;margin-right:auto}div.chatMessage_chatMessageContainer__sAivf h3 img{width:24px}div.chatMessage_you__6GUC4{color:hsla(var(--secondary-foreground))}div.chatMessage_author__muRtC{font-size:.75rem;color:grey;text-align:right}div.chatMessage_chatFooter__0vR8s{display:flex;justify-content:space-between;min-height:28px}div.chatMessage_chatButtons__Lbk8T{display:flex;justify-content:flex-end;width:-moz-min-content;width:min-content;border:1px solid var(--border-color);border-radius:16px;position:relative;bottom:-12px;background-color:hsla(var(--secondary))}div.chatMessage_chatFooter__0vR8s button{cursor:pointer;color:hsl(var(--muted-foreground));border:none;border-radius:16px;padding:4px;margin-left:4px;margin-right:4px}div.chatMessage_chatFooter__0vR8s button:hover{background-color:hsla(var(--frosted-background-color))}button.chatMessage_codeCopyButton__Y_Ujv{cursor:pointer;float:right;border-radius:8px}button.chatMessage_codeCopyButton__Y_Ujv:hover{color:hsla(var(--frosted-background-color))}button.chatMessage_codeCopyButton__Y_Ujv img,button.chatMessage_copyButton__jd7q7 img,div.chatMessage_feedbackButtons___Brdy img{width:24px}div.chatMessage_trainOfThought__mR2Gg strong{font-weight:500}div.chatMessage_trainOfThought__mR2Gg.chatMessage_primary__WYPEb strong{font-weight:500;color:hsla(var(--secondary-foreground))}div.chatMessage_trainOfThought__mR2Gg.chatMessage_primary__WYPEb p{color:inherit}div.chatMessage_trainOfThoughtElement__le_bC{display:grid;grid-template-columns:auto 1fr;align-items:start}div.chatMessage_trainOfThoughtElement__le_bC ol,div.chatMessage_trainOfThoughtElement__le_bC ul{margin:auto;word-break:break-word}@media screen and (max-width:768px){div.chatMessage_youfullHistory__ioyfH{max-width:90%}div.chatMessage_khoj__cjWON div.chatMessage_imageWrapper__DF92M img{width:100%;height:auto}}@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_AMS-Regular.a79f1c31.woff2) format("woff2"),url(/_next/static/media/KaTeX_AMS-Regular.1608a09b.woff) format("woff"),url(/_next/static/media/KaTeX_AMS-Regular.4aafdb68.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/_next/static/media/KaTeX_Caligraphic-Bold.ec17d132.woff2) format("woff2"),url(/_next/static/media/KaTeX_Caligraphic-Bold.b6770918.woff) format("woff"),url(/_next/static/media/KaTeX_Caligraphic-Bold.cce5b8ec.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Caligraphic-Regular.55fac258.woff2) format("woff2"),url(/_next/static/media/KaTeX_Caligraphic-Regular.dad44a7f.woff) format("woff"),url(/_next/static/media/KaTeX_Caligraphic-Regular.07ef19e7.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/_next/static/media/KaTeX_Fraktur-Bold.d42a5579.woff2) format("woff2"),url(/_next/static/media/KaTeX_Fraktur-Bold.9f256b85.woff) format("woff"),url(/_next/static/media/KaTeX_Fraktur-Bold.b18f59e1.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Fraktur-Regular.d3c882a6.woff2) format("woff2"),url(/_next/static/media/KaTeX_Fraktur-Regular.7c187121.woff) format("woff"),url(/_next/static/media/KaTeX_Fraktur-Regular.ed38e79f.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/_next/static/media/KaTeX_Main-Bold.c3fb5ac2.woff2) format("woff2"),url(/_next/static/media/KaTeX_Main-Bold.d181c465.woff) format("woff"),url(/_next/static/media/KaTeX_Main-Bold.b74a1a8b.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/_next/static/media/KaTeX_Main-BoldItalic.6f2bb1df.woff2) format("woff2"),url(/_next/static/media/KaTeX_Main-BoldItalic.e3f82f9d.woff) format("woff"),url(/_next/static/media/KaTeX_Main-BoldItalic.70d8b0a5.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/_next/static/media/KaTeX_Main-Italic.8916142b.woff2) format("woff2"),url(/_next/static/media/KaTeX_Main-Italic.9024d815.woff) format("woff"),url(/_next/static/media/KaTeX_Main-Italic.47373d1e.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Main-Regular.0462f03b.woff2) format("woff2"),url(/_next/static/media/KaTeX_Main-Regular.7f51fe03.woff) format("woff"),url(/_next/static/media/KaTeX_Main-Regular.b7f8fe9b.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/_next/static/media/KaTeX_Math-BoldItalic.572d331f.woff2) format("woff2"),url(/_next/static/media/KaTeX_Math-BoldItalic.f1035d8d.woff) format("woff"),url(/_next/static/media/KaTeX_Math-BoldItalic.a879cf83.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/_next/static/media/KaTeX_Math-Italic.f28c23ac.woff2) format("woff2"),url(/_next/static/media/KaTeX_Math-Italic.5295ba48.woff) format("woff"),url(/_next/static/media/KaTeX_Math-Italic.939bc644.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(/_next/static/media/KaTeX_SansSerif-Bold.8c5b5494.woff2) format("woff2"),url(/_next/static/media/KaTeX_SansSerif-Bold.bf59d231.woff) format("woff"),url(/_next/static/media/KaTeX_SansSerif-Bold.94e1e8dc.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(/_next/static/media/KaTeX_SansSerif-Italic.3b1e59b3.woff2) format("woff2"),url(/_next/static/media/KaTeX_SansSerif-Italic.7c9bc82b.woff) format("woff"),url(/_next/static/media/KaTeX_SansSerif-Italic.b4c20c84.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_SansSerif-Regular.ba21ed5f.woff2) format("woff2"),url(/_next/static/media/KaTeX_SansSerif-Regular.74048478.woff) format("woff"),url(/_next/static/media/KaTeX_SansSerif-Regular.d4d7ba48.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Script-Regular.03e9641d.woff2) format("woff2"),url(/_next/static/media/KaTeX_Script-Regular.07505710.woff) format("woff"),url(/_next/static/media/KaTeX_Script-Regular.fe9cbbe1.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Size1-Regular.eae34984.woff2) format("woff2"),url(/_next/static/media/KaTeX_Size1-Regular.e1e279cb.woff) format("woff"),url(/_next/static/media/KaTeX_Size1-Regular.fabc004a.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Size2-Regular.5916a24f.woff2) format("woff2"),url(/_next/static/media/KaTeX_Size2-Regular.57727022.woff) format("woff"),url(/_next/static/media/KaTeX_Size2-Regular.d6b476ec.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Size3-Regular.b4230e7e.woff2) format("woff2"),url(/_next/static/media/KaTeX_Size3-Regular.9acaf01c.woff) format("woff"),url(/_next/static/media/KaTeX_Size3-Regular.a144ef58.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Size4-Regular.10d95fd3.woff2) format("woff2"),url(/_next/static/media/KaTeX_Size4-Regular.7a996c9d.woff) format("woff"),url(/_next/static/media/KaTeX_Size4-Regular.fbccdabe.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/_next/static/media/KaTeX_Typewriter-Regular.a8709e36.woff2) format("woff2"),url(/_next/static/media/KaTeX_Typewriter-Regular.6258592b.woff) format("woff"),url(/_next/static/media/KaTeX_Typewriter-Regular.d97aaf4a.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.21"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.suggestions_card__fbiZo{border-radius:.5rem}.suggestions_title__vNozc{font-size:1rem}.suggestions_text__J_IfY{padding-top:.2rem;font-size:.9rem;white-space:wrap;padding-right:4px;color:#000}
|
@@ -0,0 +1 @@
|
|
1
|
+
div.agents_titleBar__FzYbY{padding:16px 0;text-align:left}.agents_agentPersonality__o0Ysz p{white-space:inherit;overflow:hidden;height:77px;line-height:1.5}div.agents_agentPersonality__o0Ysz{text-align:left;grid-column:span 3;overflow:hidden}div.agents_pageLayout__gR3S3{max-width:60vw;margin:auto auto 2rem}button.agents_infoButton__NqI7E{border:none;background-color:transparent!important;text-align:left;font-family:inherit;font-size:medium}div.agents_agentList__XVx4A{display:grid;gap:20px;padding-top:30px;margin-right:auto;grid-auto-flow:row;grid-template-columns:1fr 1fr;margin-left:auto}@media only screen and (max-width:768px){div.agents_agentList__XVx4A{width:100%;padding:0;margin-right:auto;margin-left:auto;grid-template-columns:1fr}div.agents_pageLayout__gR3S3{max-width:90vw}}div.chatInputArea_actualInputArea__Ha6cN{display:grid;grid-template-columns:auto 1fr auto auto}.loginPrompt_gsiMaterialButton__8QVFH{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-webkit-appearance:none;background-image:none;border-radius:20px;box-sizing:border-box;color:#1f1f1f;cursor:pointer;font-family:Roboto,arial,sans-serif;font-size:14px;height:40px;letter-spacing:.25px;outline:none;overflow:hidden;padding:0;position:relative;text-align:center;transition:background-color .218s,border-color .218s,box-shadow .218s;vertical-align:middle;white-space:nowrap;width:40px;max-width:400px;min-width:-moz-min-content;min-width:min-content}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonIcon__6TSC5{height:100%;min-width:20px;width:100%;margin:0;padding:9px}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonContentWrapper__9tahB{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;height:100%;justify-content:space-between;position:relative;width:100%}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonContents__3_YcB{flex-grow:1;font-family:Roboto,arial,sans-serif;font-weight:500;overflow:hidden;text-overflow:ellipsis;vertical-align:top}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonState__CDGQm{transition:opacity .218s;bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.loginPrompt_gsiMaterialButton__8QVFH:disabled{cursor:default;background-color:#ffffff61;border-color:#1f1f1f1f}.loginPrompt_gsiMaterialButton__8QVFH:disabled .loginPrompt_gsiMaterialButtonContents__3_YcB,.loginPrompt_gsiMaterialButton__8QVFH:disabled .loginPrompt_gsiMaterialButtonIcon__6TSC5{opacity:38%}.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):active .loginPrompt_gsiMaterialButton-State__mAfCZ,.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):focus .loginPrompt_gsiMaterialButtonState__CDGQm{background-color:#303030;opacity:12%}.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):hover{box-shadow:0 1px 2px 0 rgba(60,64,67,.3),0 1px 3px 1px rgba(60,64,67,.15)}.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):hover .loginPrompt_gsiMaterialButtonState__CDGQm{background-color:#303030;opacity:8%}div.sidePanel_session__EeNjH{padding:.5rem;margin-bottom:.25rem;border-radius:.5rem;cursor:pointer;max-width:14rem;font-size:medium;display:grid;grid-template-columns:minmax(auto,400px) 1fr;gap:0}div.sidePanel_compressed__CUgIn{grid-template-columns:minmax(12rem,100%) 1fr 1fr}div.sidePanel_sessionHover__cf_VO,div.sidePanel_session__EeNjH:hover{background-color:hsla(var(--popover))}div.sidePanel_session__EeNjH:hover{color:hsla(var(--popover-foreground))}div.sidePanel_session__EeNjH a{text-decoration:none}button.sidePanel_button__NzdN_{border:none;outline:none;background-color:transparent;cursor:pointer;color:var(--main-text-color);width:24px}button.sidePanel_showMoreButton__nDt4Z{border-radius:.5rem;padding:8px}div.sidePanel_panel__9offQ{display:flex;flex-direction:column;padding:1rem;overflow-y:auto;max-width:auto;transition:background-color .5s}div.sidePanel_expanded__aHnYV{gap:1rem;background-color:hsla(var(--muted));height:100%}div.sidePanel_collapsed__ewO3e{display:grid;grid-template-columns:1fr;height:-moz-fit-content;height:fit-content;padding:1rem 0 0 1rem}p.sidePanel_session__EeNjH{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-align:left;font-size:small}p.sidePanel_compressed__CUgIn{width:11rem}p.sidePanel_expanded__aHnYV{max-width:20rem}div.sidePanel_header__NCT_v{display:grid;grid-template-columns:1fr auto}div.sidePanel_profile__pfAJU{display:grid;grid-template-columns:auto 1fr;gap:1rem;align-items:center;margin-top:auto}div.sidePanel_panelWrapper__cDMvb{display:grid;grid-template-rows:1fr auto auto;height:100%}div.sidePanel_modalSessionsList___u3aa{position:fixed;top:0;left:0;width:100%;height:100%;background-color:hsla(var(--frosted-background-color));z-index:1;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}div.sidePanel_modalSessionsList___u3aa div.sidePanel_content__z60YO{max-width:80%;max-height:80%;background-color:hsla(var(--frosted-background-color));overflow:auto;padding:20px;border-radius:10px}div.sidePanel_modalSessionsList___u3aa div.sidePanel_session__EeNjH{max-width:100%;text-overflow:ellipsis}@media screen and (max-width:768px){div.sidePanel_panel__9offQ{padding:.25rem;width:100%}div.sidePanel_expanded__aHnYV{z-index:1}div.sidePanel_singleReference__vmXZr{padding:4px}div.sidePanel_panelWrapper__cDMvb{width:100%;padding:0 1rem}div.sidePanel_session__EeNjH.sidePanel_compressed__CUgIn{max-width:100%;display:grid;grid-template-columns:70vw auto;justify-content:space-between}div.sidePanel_session__EeNjH{max-width:100%;grid-template-columns:minmax(auto,70vw) 1fr}}.agentCard_agentPersonality__MmRlN p{white-space:inherit;overflow:hidden;height:77px;line-height:1.5}div.agentCard_agentPersonality__MmRlN{text-align:left;grid-column:span 3;overflow:hidden}button.agentCard_infoButton__heh_w{border:none;background-color:transparent!important;text-align:left;font-family:inherit;font-size:medium}div.automations_automationsLayout__Atoh_{display:grid;grid-template-columns:1fr 1fr;gap:1rem}div.automations_automationCard__BKidA{display:grid;grid-template-rows:auto 1fr auto}div.automations_pageLayout__OaoYA{max-width:60vw;margin:auto auto 2rem}@media screen and (max-width:768px){div.automations_automationsLayout__Atoh_{grid-template-columns:1fr}div.automations_pageLayout__OaoYA{max-width:90vw}}
|