diff --git a/build/404.html b/build/404.html
index c1213c0..f43cd5c 100644
--- a/build/404.html
+++ b/build/404.html
@@ -1 +1 @@
-
404: This page could not be found.Chit-Chat404
This page could not be found.
\ No newline at end of file
+404: This page could not be found.Chit-Chat404
This page could not be found.
\ No newline at end of file
diff --git a/build/_next/static/chunks/app/trychatbot/page-5b75a28091e85186.js b/build/_next/static/chunks/app/trychatbot/page-5b75a28091e85186.js
new file mode 100644
index 0000000..901a9b2
--- /dev/null
+++ b/build/_next/static/chunks/app/trychatbot/page-5b75a28091e85186.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[819],{9837:function(e,t,a){Promise.resolve().then(a.bind(a,6011))},7832:function(e,t,a){"use strict";a.d(t,{Z:function(){return Components_Navbar}});var n=a(7437),s=a(1396),r=a.n(s);a(2265);var l=a(4606),i=a(1490),Components_Logout=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("li",{children:(0,n.jsx)("div",{onClick:()=>{i.Z.remove("UserId"),window.location.reload()},className:"block py-2 pr-4 pl-3 text-gray-700 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 md:dark:hover:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent",children:"Log Out"})})}),Components_Navbar=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{children:(0,n.jsx)("nav",{className:"fixed top-0 left-0 w-full border-gray-200 px-2 sm:px-4 py-2.5 rounded",children:(0,n.jsxs)("div",{className:"container flex flex-wrap justify-between items-center mx-auto",children:[(0,n.jsx)(r(),{href:"/dashboard",className:"flex items-center",children:(0,n.jsx)("span",{className:"self-center text-xl font-semibold font-serif px-3 whitespace-nowrap dark:text-white",children:"Chit-Chat"})}),(0,n.jsx)("div",{className:"w-full md:w-auto",id:"navbar-default",children:(0,n.jsxs)("ul",{className:"flex flex-row flex-wrap p-4 mt-4 rounded-lg border border-gray-100 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium md:border-0 dark:border-gray-400",children:[(0,n.jsx)("li",{children:(0,n.jsx)(r(),{href:"/organization",className:"block py-2 pr-4 pl-3 text-gray-700 hover:text-sky-600 rounded md:bg-transparent md:p-0",children:"Organizations"})}),(0,n.jsx)("li",{children:(0,n.jsx)(r(),{href:"/addAIData",className:"block py-2 pr-4 pl-3 text-gray-700 hover:text-sky-600 rounded md:bg-transparent md:p-0",children:"Train Data"})}),(0,n.jsx)("li",{children:(0,n.jsx)(r(),{href:"/docs",className:"block py-2 pr-4 pl-3 text-gray-700 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 dark:hover:text-white md:dark:hover:bg-transparent",children:"Docs"})}),(0,n.jsx)("li",{children:(0,n.jsx)(r(),{href:"https://github.com/apurvjha123",className:"block py-2 pr-4 pl-3 text-gray-700 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 dark:hover:text-white md:dark:hover:bg-transparent",children:"About"})}),(0,n.jsx)("li",{children:(0,n.jsx)(r(),{href:"https://github.com/apurvjha123/chit-chat-nextjs",className:"block py-2 pr-4 pl-3 text-gray-700 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 dark:hover:text-white md:dark:hover:bg-transparent",children:(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)(l.rFR,{className:"p-1 text-xl"}),"Contribute"]})})}),(0,n.jsx)(Components_Logout,{})]})})]})})})})},4608:function(e,t,a){"use strict";var n=a(7437);a(2265);var s=a(1396),r=a.n(s);t.Z=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"flex items-center justify-center h-screen",children:(0,n.jsxs)("div",{className:"bg-white bg-opacity-10 rounded-xl p-8 w-96 shadow-lg backdrop-blur-md",children:[(0,n.jsx)("h2",{className:"text-xl font-bold mb-4",children:"Login Is Require !"}),(0,n.jsx)(r(),{href:"/login",className:"px-4 py-2 rounded bg-white bg-opacity-20 hover:bg-opacity-30 focus:outline-none",children:"Sign Up"})]})})})},6011:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return page}});var n=a(7437),s=a(2265),r=a(1678),trychatbot_ChatBotComponent=e=>{let{initialMessage:t="Hello! How Can I Assist You ?",chatbotTitle:a="Chat bot",brandImage:l="https://www.kindpng.com/picc/m/179-1798038_chatbots-builder-pricing-crozdesk-free-chatbot-hd-png.png",apiKey:i,switchAPI:o=!1,suggestions:c=[],rateLimitDuration:d=5e3}=e,[h,u]=(0,s.useState)(!1),[p,m]=(0,s.useState)([]),[g,x]=(0,s.useState)(""),[b,f]=(0,s.useState)(!1),v=(0,s.useRef)(null),j=(0,s.useRef)(null),[y,w]=(0,s.useState)(!1),[k,C]=(0,s.useState)(c),handleSuggestionClick=e=>{x(e),sendMessage(),C([])};async function generateAnswers(e){try{let t="https://chit-chat.tech/api/v1/QnARetrieval?key=".concat(i);o&&(t="https://your-hosted-domain/api/v1/organization/generateCompletion?key=".concat(i));let a=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e})}),n=await a.json();m(e=>[...e,{type:"bot",text:n.message}]),f(!1)}catch(e){console.error(e),m(e=>[...e,{type:"bot",text:"OOPs! something went wrong"}]),f(!1)}}(0,s.useEffect)(()=>{t&&m([{type:"bot",text:t}])},[t]),(0,s.useEffect)(()=>{if(h){var e;null===(e=v.current)||void 0===e||e.focus()}},[h]),(0,s.useEffect)(()=>{var e;null===(e=j.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},[p]),(0,s.useEffect)(()=>{C(c)},[c]);let sendMessage=()=>{if(g.trim()&&!y){let e={type:"user",text:g};m(t=>[...t,e]),x(""),f(!0),C([]),generateAnswers(g),w(!0),setTimeout(()=>w(!1),d)}};return(0,n.jsx)("div",{className:"fixed bottom-10 right-10",children:h?(0,n.jsxs)("div",{className:"w-80 h-96 border p-4 bg-white rounded-lg flex flex-col shadow-lg",children:[(0,n.jsxs)("div",{className:"mb-4 font-bold flex justify-between items-center text-black p-2 rounded-t-lg",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("img",{src:l,alt:"brand",className:"w-6 h-6 rounded-full object-cover mr-2"}),(0,n.jsx)("span",{children:a})]}),(0,n.jsx)("button",{onClick:()=>u(!1),children:(0,n.jsx)(r.ZCS,{})})]}),(0,n.jsxs)("div",{className:"flex-1 overflow-y-auto mb-4",children:[p.map((e,t)=>(0,n.jsxs)("div",{className:"p-2 my-2 ".concat("user"===e.type?"ml-auto":""),children:["bot"===e.type&&(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("img",{src:l,alt:"Bot",className:"w-6 h-6 rounded-full mr-2"}),(0,n.jsx)("span",{className:"text-black bg-gray-300 rounded-md pr-4 p-2",children:e.text})]}),"user"===e.type&&(0,n.jsxs)("div",{className:"flex flex-col items-end",children:[(0,n.jsx)("span",{className:"text-gray-600 text-sm mb-1",children:"You"}),(0,n.jsx)("span",{className:"bg-gray-300 pr-4 p-2 rounded-md text-black",children:e.text})]})]},t)),b&&(0,n.jsx)("div",{className:"text-gray-600",children:"Bot is typing..."}),(0,n.jsx)("div",{ref:j}),k.length>0&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"flex overflow-y-auto",children:[(0,n.jsx)("img",{src:l,alt:"Bot",className:"w-6 h-6 rounded-full mr-2"}),(0,n.jsxs)("div",{className:"bg-gray-300 p-2 rounded-lg",children:[(0,n.jsx)("div",{className:"mt-2",children:"Here are Some Suggestions"}),k.map((e,t)=>(0,n.jsx)("div",{className:"flex items-center mt-2",children:(0,n.jsx)("button",{className:"chatbot-suggestion-label bg-white hover:bg-gray-500 text-black rounded-md px-2 py-1",onClick:()=>handleSuggestionClick(e),children:e})},t))]})]})})]}),(0,n.jsxs)("div",{className:"flex space-x-2",children:[(0,n.jsx)("input",{ref:v,type:"text",value:g,onChange:e=>x(e.target.value),onKeyPress:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),sendMessage())},className:"flex-1 p-2 border rounded-md"}),(0,n.jsx)("button",{onClick:sendMessage,disabled:b||y,className:"px-1 py-1 bg-blue-500 hover:bg-blue-600 active:bg-blue-700 text-white rounded-md",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:"30px",width:"30px",children:(0,n.jsx)("path",{fill:"#d7d7d7",d:"M22,11.7V12h-0.1c-0.1,1-17.7,9.5-18.8,9.1c-1.1-0.4,2.4-6.7,3-7.5C6.8,12.9,17.1,12,17.1,12H17c0,0,0-0.2,0-0.2c0,0,0,0,0,0c0-0.4-10.2-1-10.8-1.7c-0.6-0.7-4-7.1-3-7.5C4.3,2.1,22,10.5,22,11.7z"})})})]})]}):(0,n.jsx)("div",{onClick:()=>u(!0),className:"w-16 h-16 bg-white rounded-full flex items-center justify-center cursor-pointer shadow-lg",children:(0,n.jsx)("img",{src:l,alt:"Chat Icon",className:"w-full h-full rounded-full object-cover"})})})},l=a(7832),i=a(1490),o=a(4608);a(4741);var c=a(6820),d=a(2686),h=a.n(d),Docs_DocsModal=e=>{let{apiKey:t,initialMessage:a,chatbotTitle:r,brandImage:l,suggestions:i,rateLimitDuration:o,onClick:d}=e,u='async function generateAnswer(userQuestion, apiKey) { \nlet chatAPIUrl = "https://chit-chat.tech/api/v1/QnARetrieval?key='.concat(t,'";\n\nconst payloadBody = {\n prompt: userQuestion,\n};\n\nconst response = await fetch(chatAPIUrl, {\n method: "POST",\n headers: {\n "Content-Type": "application/json",\n },\n body: JSON.stringify(payloadBody),\n});\n\nconst jsonData = await response.json();\n}'),[p,m]=(0,s.useState)(u),handleButtonClick=e=>{switch(e){case"API":m("".concat(u));break;case"JS":m('\n\n\n \n \n \n Chat Bot\n\n\n \n\n\n\n\n\n\n\n "));break;case"REACTJS":m("\n`1. Install this Dependency:`\nnpm i chit-chat-react\n\n`2. Configuration & Usage:`\n\nimport ChatBot from 'chit-chat-react';\n\nexport default function YourComponent() {\n return ;\n}\n\n "));break;default:m("")}},g=(0,s.useRef)(null);return(0,s.useEffect)(()=>{g.current&&h().highlightAllUnder(g.current)},[p]),(0,n.jsx)("div",{onClick:d,className:"absolute inset-0 flex items-center justify-center p-4 sm:p-28 md:p-32 lg:p-16 xl:p-12",children:(0,n.jsxs)("div",{onClick:e=>{e.stopPropagation()},className:"relative bg-white bg-opacity-20 backdrop-blur-md p-4 sm:p-6 rounded-lg w-full max-w-2xl h-full max-h-screen overflow-y-auto",children:[(0,n.jsxs)("div",{className:"flex space-x-4 mb-4",children:[(0,n.jsx)("button",{onClick:()=>handleButtonClick("API"),className:"px-3 py-2 bg-pink-500 text-white rounded",children:"API"}),(0,n.jsx)("button",{onClick:()=>handleButtonClick("JS"),className:"px-3 py-2 bg-pink-500 text-white rounded",children:"JS"}),(0,n.jsx)("button",{onClick:()=>handleButtonClick("REACTJS"),className:"px-3 py-2 bg-pink-500 text-white rounded",children:"REACTJS"})]}),(0,n.jsx)("button",{onClick:()=>{if(g.current){let e=g.current.innerText;navigator.clipboard.writeText(e)}},className:"absolute top-2 right-2 bg-white p-2 rounded-full active:bg-pink-500 hover:bg-gray-200 transition duration-300 ease-in-out z-10",children:(0,n.jsx)(c.fwS,{className:"text-pink-200 active:text-black"})}),(0,n.jsx)("div",{className:"relative z-0",children:(0,n.jsx)("pre",{ref:g,className:"language-javascript overflow-x-auto rounded-lg shadow-xl hljs p-2 sm:text-base text-sm w-full",children:(0,n.jsx)("code",{children:p})})})]})})},page=()=>{let e=i.Z.get("UserId"),[t,a]=(0,s.useState)({apiKey:"",initialMessage:"Hello! How Can I Assist You ?",chatbotTitle:"Chat bot",brandImage:"https://www.kindpng.com/picc/m/179-1798038_chatbots-builder-pricing-crozdesk-free-chatbot-hd-png.png",suggestions:[],rateLimitDuration:5e3}),[r,c]=(0,s.useState)({apiKey:"",initialMessage:"Hello! How Can I Assist You ?",chatbotTitle:"Chat bot",brandImage:"https://www.kindpng.com/picc/m/179-1798038_chatbots-builder-pricing-crozdesk-free-chatbot-hd-png.png",suggestions:[],rateLimitDuration:5e3}),[d,h]=(0,s.useState)(!1),closeModal=()=>{h(!1)};return(0,s.useEffect)(()=>{let handleClickOutside=e=>{e.target.classList.contains("modal-background")&&closeModal()};return document.addEventListener("mousedown",handleClickOutside),()=>{document.removeEventListener("mousedown",handleClickOutside)}},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.Z,{}),e?(0,n.jsxs)(n.Fragment,{children:[d&&(0,n.jsx)(Docs_DocsModal,{onClick:closeModal,...r}),(0,n.jsxs)("div",{className:" sm:pt-20 pt-48 overflow-y-auto flex items-center justify-center",children:[(0,n.jsx)("div",{className:"bg-white bg-opacity-50 rounded p-8 w-96",children:(0,n.jsxs)("form",{className:"space-y-4",onSubmit:e=>{e.preventDefault(),console.log(t),h(!0),c(t)},children:[(0,n.jsxs)("label",{children:[(0,n.jsx)("div",{className:"font-sans font-semibold text-md p-2",children:"Chit Chat APIKEY :"}),(0,n.jsx)("input",{className:"block bg-pink-400 bg-opacity-10 rounded p-2 w-full",placeholder:"Enter your APIKEY",required:!0,value:t.apiKey,onChange:e=>a(t=>({...t,apiKey:e.target.value}))})]}),(0,n.jsxs)("label",{children:[(0,n.jsx)("div",{className:"font-sans font-semibold text-md p-2",children:"Initial Message:"}),(0,n.jsx)("input",{className:"block bg-pink-400 bg-opacity-10 rounded p-2 w-full",placeholder:"Initial Message",value:t.initialMessage,onChange:e=>a(t=>({...t,initialMessage:e.target.value}))})]}),(0,n.jsxs)("label",{children:[(0,n.jsx)("div",{className:"font-sans font-semibold text-md p-2",children:"Chatbot Title:"}),(0,n.jsx)("input",{className:"block bg-pink-400 bg-opacity-10 rounded p-2 w-full",placeholder:"Chatbot Title",value:t.chatbotTitle,onChange:e=>a(t=>({...t,chatbotTitle:e.target.value}))})]}),(0,n.jsxs)("label",{children:[(0,n.jsx)("div",{className:"font-sans font-semibold text-md p-2",children:"Brand Image URL:"}),(0,n.jsx)("input",{className:"block bg-pink-400 bg-opacity-10 rounded p-2 w-full",placeholder:"Brand Image URL",value:t.brandImage,onChange:e=>a(t=>({...t,brandImage:e.target.value}))})]}),(0,n.jsxs)("label",{children:[(0,n.jsx)("div",{className:"font-sans font-semibold text-md p-2",children:"Suggestions:"}),(0,n.jsx)("textarea",{className:"block bg-pink-400 bg-opacity-10 rounded p-2 w-full",placeholder:"Enter suggestions (one per line)",value:t.suggestions.join("\n"),onChange:e=>a(t=>({...t,suggestions:e.target.value.split("\n")}))})]}),(0,n.jsxs)("label",{children:[(0,n.jsx)("div",{className:"font-sans font-semibold text-md p-2",children:"Rate Limit Duration (in MS):"}),(0,n.jsx)("input",{className:"block bg-pink-400 bg-opacity-10 rounded p-2 w-full",placeholder:"Rate Limit Duration",type:"number",value:t.rateLimitDuration,onChange:e=>a(t=>({...t,rateLimitDuration:Number(e.target.value)}))})]}),(0,n.jsx)("button",{type:"submit",className:"mt-4 bg-pink-500 text-white rounded p-2",children:"Integrate"})]})}),(0,n.jsx)(trychatbot_ChatBotComponent,{...t})]})]}):(0,n.jsx)(o.Z,{})]})}}},function(e){e.O(0,[447,115,724,438,851,971,864,744],function(){return e(e.s=9837)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/build/_next/static/chunks/app/trychatbot/page-c4af4ab6e3341f0a.js b/build/_next/static/chunks/app/trychatbot/page-c4af4ab6e3341f0a.js
deleted file mode 100644
index 4e592e7..0000000
--- a/build/_next/static/chunks/app/trychatbot/page-c4af4ab6e3341f0a.js
+++ /dev/null
@@ -1 +0,0 @@
-(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[819],{9837:function(e,t,a){Promise.resolve().then(a.bind(a,6011))},7832:function(e,t,a){"use strict";a.d(t,{Z:function(){return Components_Navbar}});var n=a(7437),s=a(1396),r=a.n(s);a(2265);var l=a(4606),i=a(1490),Components_Logout=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("li",{children:(0,n.jsx)("div",{onClick:()=>{i.Z.remove("UserId"),window.location.reload()},className:"block py-2 pr-4 pl-3 text-gray-700 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 md:dark:hover:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent",children:"Log Out"})})}),Components_Navbar=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{children:(0,n.jsx)("nav",{className:"fixed top-0 left-0 w-full border-gray-200 px-2 sm:px-4 py-2.5 rounded",children:(0,n.jsxs)("div",{className:"container flex flex-wrap justify-between items-center mx-auto",children:[(0,n.jsx)(r(),{href:"/dashboard",className:"flex items-center",children:(0,n.jsx)("span",{className:"self-center text-xl font-semibold font-serif px-3 whitespace-nowrap dark:text-white",children:"Chit-Chat"})}),(0,n.jsx)("div",{className:"w-full md:w-auto",id:"navbar-default",children:(0,n.jsxs)("ul",{className:"flex flex-row flex-wrap p-4 mt-4 rounded-lg border border-gray-100 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium md:border-0 dark:border-gray-400",children:[(0,n.jsx)("li",{children:(0,n.jsx)(r(),{href:"/organization",className:"block py-2 pr-4 pl-3 text-gray-700 hover:text-sky-600 rounded md:bg-transparent md:p-0",children:"Organizations"})}),(0,n.jsx)("li",{children:(0,n.jsx)(r(),{href:"/addAIData",className:"block py-2 pr-4 pl-3 text-gray-700 hover:text-sky-600 rounded md:bg-transparent md:p-0",children:"Train Data"})}),(0,n.jsx)("li",{children:(0,n.jsx)(r(),{href:"/docs",className:"block py-2 pr-4 pl-3 text-gray-700 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 dark:hover:text-white md:dark:hover:bg-transparent",children:"Docs"})}),(0,n.jsx)("li",{children:(0,n.jsx)(r(),{href:"https://github.com/apurvjha123",className:"block py-2 pr-4 pl-3 text-gray-700 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 dark:hover:text-white md:dark:hover:bg-transparent",children:"About"})}),(0,n.jsx)("li",{children:(0,n.jsx)(r(),{href:"https://github.com/apurvjha123/chit-chat-nextjs",className:"block py-2 pr-4 pl-3 text-gray-700 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 dark:hover:text-white md:dark:hover:bg-transparent",children:(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)(l.rFR,{className:"p-1 text-xl"}),"Contribute"]})})}),(0,n.jsx)(Components_Logout,{})]})})]})})})})},6011:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return page}});var n=a(7437),s=a(2265),r=a(1678),trychatbot_ChatBotComponent=e=>{let{initialMessage:t="Hello! How Can I Assist You ?",chatbotTitle:a="Chat bot",brandImage:l="https://www.kindpng.com/picc/m/179-1798038_chatbots-builder-pricing-crozdesk-free-chatbot-hd-png.png",apiKey:i,switchAPI:o=!1,suggestions:c=[],rateLimitDuration:d=5e3}=e,[h,p]=(0,s.useState)(!1),[u,m]=(0,s.useState)([]),[g,x]=(0,s.useState)(""),[b,f]=(0,s.useState)(!1),v=(0,s.useRef)(null),j=(0,s.useRef)(null),[y,w]=(0,s.useState)(!1),[k,C]=(0,s.useState)(c),handleSuggestionClick=e=>{x(e),sendMessage(),C([])};async function generateAnswers(e){try{let t="https://chit-chat.tech/api/v1/QnARetrieval?key=".concat(i);o&&(t="https://your-hosted-domain/api/v1/organization/generateCompletion?key=".concat(i));let a=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e})}),n=await a.json();m(e=>[...e,{type:"bot",text:n.message}]),f(!1)}catch(e){console.error(e),m(e=>[...e,{type:"bot",text:"OOPs! something went wrong"}]),f(!1)}}(0,s.useEffect)(()=>{t&&m([{type:"bot",text:t}])},[t]),(0,s.useEffect)(()=>{if(h){var e;null===(e=v.current)||void 0===e||e.focus()}},[h]),(0,s.useEffect)(()=>{var e;null===(e=j.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},[u]),(0,s.useEffect)(()=>{C(c)},[c]);let sendMessage=()=>{if(g.trim()&&!y){let e={type:"user",text:g};m(t=>[...t,e]),x(""),f(!0),C([]),generateAnswers(g),w(!0),setTimeout(()=>w(!1),d)}};return(0,n.jsx)("div",{className:"fixed bottom-10 right-10",children:h?(0,n.jsxs)("div",{className:"w-80 h-96 border p-4 bg-white rounded-lg flex flex-col shadow-lg",children:[(0,n.jsxs)("div",{className:"mb-4 font-bold flex justify-between items-center text-black p-2 rounded-t-lg",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("img",{src:l,alt:"brand",className:"w-6 h-6 rounded-full object-cover mr-2"}),(0,n.jsx)("span",{children:a})]}),(0,n.jsx)("button",{onClick:()=>p(!1),children:(0,n.jsx)(r.ZCS,{})})]}),(0,n.jsxs)("div",{className:"flex-1 overflow-y-auto mb-4",children:[u.map((e,t)=>(0,n.jsxs)("div",{className:"p-2 my-2 ".concat("user"===e.type?"ml-auto":""),children:["bot"===e.type&&(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("img",{src:l,alt:"Bot",className:"w-6 h-6 rounded-full mr-2"}),(0,n.jsx)("span",{className:"text-black bg-gray-300 rounded-md pr-4 p-2",children:e.text})]}),"user"===e.type&&(0,n.jsxs)("div",{className:"flex flex-col items-end",children:[(0,n.jsx)("span",{className:"text-gray-600 text-sm mb-1",children:"You"}),(0,n.jsx)("span",{className:"bg-gray-300 pr-4 p-2 rounded-md text-black",children:e.text})]})]},t)),b&&(0,n.jsx)("div",{className:"text-gray-600",children:"Bot is typing..."}),(0,n.jsx)("div",{ref:j}),k.length>0&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"flex overflow-y-auto",children:[(0,n.jsx)("img",{src:l,alt:"Bot",className:"w-6 h-6 rounded-full mr-2"}),(0,n.jsxs)("div",{className:"bg-gray-300 p-2 rounded-lg",children:[(0,n.jsx)("div",{className:"mt-2",children:"Here are Some Suggestions"}),k.map((e,t)=>(0,n.jsx)("div",{className:"flex items-center mt-2",children:(0,n.jsx)("button",{className:"chatbot-suggestion-label bg-white hover:bg-gray-500 text-black rounded-md px-2 py-1",onClick:()=>handleSuggestionClick(e),children:e})},t))]})]})})]}),(0,n.jsxs)("div",{className:"flex space-x-2",children:[(0,n.jsx)("input",{ref:v,type:"text",value:g,onChange:e=>x(e.target.value),onKeyPress:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),sendMessage())},className:"flex-1 p-2 border rounded-md"}),(0,n.jsx)("button",{onClick:sendMessage,disabled:b||y,className:"px-1 py-1 bg-blue-500 hover:bg-blue-600 active:bg-blue-700 text-white rounded-md",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:"30px",width:"30px",children:(0,n.jsx)("path",{fill:"#d7d7d7",d:"M22,11.7V12h-0.1c-0.1,1-17.7,9.5-18.8,9.1c-1.1-0.4,2.4-6.7,3-7.5C6.8,12.9,17.1,12,17.1,12H17c0,0,0-0.2,0-0.2c0,0,0,0,0,0c0-0.4-10.2-1-10.8-1.7c-0.6-0.7-4-7.1-3-7.5C4.3,2.1,22,10.5,22,11.7z"})})})]})]}):(0,n.jsx)("div",{onClick:()=>p(!0),className:"w-16 h-16 bg-white rounded-full flex items-center justify-center cursor-pointer shadow-lg",children:(0,n.jsx)("img",{src:l,alt:"Chat Icon",className:"w-full h-full rounded-full object-cover"})})})},l=a(7832),i=a(1490);a(4741);var o=a(6820),c=a(2686),d=a.n(c),Docs_DocsModal=e=>{let{apiKey:t,initialMessage:a,chatbotTitle:r,brandImage:l,suggestions:i,rateLimitDuration:c,onClick:h}=e,p='async function generateAnswer(userQuestion, apiKey) { \nlet chatAPIUrl = "https://chit-chat.tech/api/v1/QnARetrieval?key='.concat(t,'";\n\nconst payloadBody = {\n prompt: userQuestion,\n};\n\nconst response = await fetch(chatAPIUrl, {\n method: "POST",\n headers: {\n "Content-Type": "application/json",\n },\n body: JSON.stringify(payloadBody),\n});\n\nconst jsonData = await response.json();\n}'),[u,m]=(0,s.useState)(p),handleButtonClick=e=>{switch(e){case"API":m("".concat(p));break;case"JS":m('\n\n\n \n \n \n Chat Bot\n\n\n \n\n\n\n\n\n\n\n "));break;case"REACTJS":m("\n`1. Install this Dependency:`\nnpm i chit-chat-react\n\n`2. Configuration & Usage:`\n\nimport ChatBot from 'chit-chat-react';\n\nexport default function YourComponent() {\n return ;\n}\n\n "));break;default:m("")}},g=(0,s.useRef)(null);return(0,s.useEffect)(()=>{g.current&&d().highlightAllUnder(g.current)},[u]),(0,n.jsx)("div",{onClick:h,className:"absolute inset-0 flex items-center justify-center p-4 sm:p-28 md:p-32 lg:p-16 xl:p-12",children:(0,n.jsxs)("div",{onClick:e=>{e.stopPropagation()},className:"relative bg-white bg-opacity-20 backdrop-blur-md p-4 sm:p-6 rounded-lg w-full max-w-2xl h-full max-h-screen overflow-y-auto",children:[(0,n.jsxs)("div",{className:"flex space-x-4 mb-4",children:[(0,n.jsx)("button",{onClick:()=>handleButtonClick("API"),className:"px-3 py-2 bg-pink-500 text-white rounded",children:"API"}),(0,n.jsx)("button",{onClick:()=>handleButtonClick("JS"),className:"px-3 py-2 bg-pink-500 text-white rounded",children:"JS"}),(0,n.jsx)("button",{onClick:()=>handleButtonClick("REACTJS"),className:"px-3 py-2 bg-pink-500 text-white rounded",children:"REACTJS"})]}),(0,n.jsx)("button",{onClick:()=>{if(g.current){let e=g.current.innerText;navigator.clipboard.writeText(e)}},className:"absolute top-2 right-2 bg-white p-2 rounded-full active:bg-pink-500 hover:bg-gray-200 transition duration-300 ease-in-out z-10",children:(0,n.jsx)(o.fwS,{className:"text-pink-200 active:text-black"})}),(0,n.jsx)("div",{className:"relative z-0",children:(0,n.jsx)("pre",{ref:g,className:"language-javascript overflow-x-auto rounded-lg shadow-xl hljs p-2 sm:text-base text-sm w-full",children:(0,n.jsx)("code",{children:u})})})]})})},page=()=>{i.Z.get("UserId");let[e,t]=(0,s.useState)({apiKey:"",initialMessage:"Hello! How Can I Assist You ?",chatbotTitle:"Chat bot",brandImage:"https://www.kindpng.com/picc/m/179-1798038_chatbots-builder-pricing-crozdesk-free-chatbot-hd-png.png",suggestions:[],rateLimitDuration:5e3}),[a,r]=(0,s.useState)({apiKey:"",initialMessage:"Hello! How Can I Assist You ?",chatbotTitle:"Chat bot",brandImage:"https://www.kindpng.com/picc/m/179-1798038_chatbots-builder-pricing-crozdesk-free-chatbot-hd-png.png",suggestions:[],rateLimitDuration:5e3}),[o,c]=(0,s.useState)(!1),closeModal=()=>{c(!1)};return(0,s.useEffect)(()=>{let handleClickOutside=e=>{e.target.classList.contains("modal-background")&&closeModal()};return document.addEventListener("mousedown",handleClickOutside),()=>{document.removeEventListener("mousedown",handleClickOutside)}},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.Z,{}),o&&(0,n.jsx)(Docs_DocsModal,{onClick:closeModal,...a}),(0,n.jsxs)("div",{className:" sm:pt-20 pt-48 overflow-y-auto flex items-center justify-center",children:[(0,n.jsx)("div",{className:"bg-white bg-opacity-50 rounded p-8 w-96",children:(0,n.jsxs)("form",{className:"space-y-4",onSubmit:t=>{t.preventDefault(),console.log(e),c(!0),r(e)},children:[(0,n.jsxs)("label",{children:[(0,n.jsx)("div",{className:"font-sans font-semibold text-md p-2",children:"Chit Chat APIKEY :"}),(0,n.jsx)("input",{className:"block bg-pink-400 bg-opacity-10 rounded p-2 w-full",placeholder:"Enter your APIKEY",required:!0,value:e.apiKey,onChange:e=>t(t=>({...t,apiKey:e.target.value}))})]}),(0,n.jsxs)("label",{children:[(0,n.jsx)("div",{className:"font-sans font-semibold text-md p-2",children:"Initial Message:"}),(0,n.jsx)("input",{className:"block bg-pink-400 bg-opacity-10 rounded p-2 w-full",placeholder:"Initial Message",value:e.initialMessage,onChange:e=>t(t=>({...t,initialMessage:e.target.value}))})]}),(0,n.jsxs)("label",{children:[(0,n.jsx)("div",{className:"font-sans font-semibold text-md p-2",children:"Chatbot Title:"}),(0,n.jsx)("input",{className:"block bg-pink-400 bg-opacity-10 rounded p-2 w-full",placeholder:"Chatbot Title",value:e.chatbotTitle,onChange:e=>t(t=>({...t,chatbotTitle:e.target.value}))})]}),(0,n.jsxs)("label",{children:[(0,n.jsx)("div",{className:"font-sans font-semibold text-md p-2",children:"Brand Image URL:"}),(0,n.jsx)("input",{className:"block bg-pink-400 bg-opacity-10 rounded p-2 w-full",placeholder:"Brand Image URL",value:e.brandImage,onChange:e=>t(t=>({...t,brandImage:e.target.value}))})]}),(0,n.jsxs)("label",{children:[(0,n.jsx)("div",{className:"font-sans font-semibold text-md p-2",children:"Suggestions:"}),(0,n.jsx)("textarea",{className:"block bg-pink-400 bg-opacity-10 rounded p-2 w-full",placeholder:"Enter suggestions (one per line)",value:e.suggestions.join("\n"),onChange:e=>t(t=>({...t,suggestions:e.target.value.split("\n")}))})]}),(0,n.jsxs)("label",{children:[(0,n.jsx)("div",{className:"font-sans font-semibold text-md p-2",children:"Rate Limit Duration (in MS):"}),(0,n.jsx)("input",{className:"block bg-pink-400 bg-opacity-10 rounded p-2 w-full",placeholder:"Rate Limit Duration",type:"number",value:e.rateLimitDuration,onChange:e=>t(t=>({...t,rateLimitDuration:Number(e.target.value)}))})]}),(0,n.jsx)("button",{type:"submit",className:"mt-4 bg-pink-500 text-white rounded p-2",children:"Integrate"})]})}),(0,n.jsx)(trychatbot_ChatBotComponent,{...e})]})]})}}},function(e){e.O(0,[447,115,724,438,851,971,864,744],function(){return e(e.s=9837)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/build/_next/static/N40XvyeKHVsIvBtwp94RD/_buildManifest.js b/build/_next/static/tX561EXahjjnQ73Ax4gKK/_buildManifest.js
similarity index 100%
rename from build/_next/static/N40XvyeKHVsIvBtwp94RD/_buildManifest.js
rename to build/_next/static/tX561EXahjjnQ73Ax4gKK/_buildManifest.js
diff --git a/build/_next/static/N40XvyeKHVsIvBtwp94RD/_ssgManifest.js b/build/_next/static/tX561EXahjjnQ73Ax4gKK/_ssgManifest.js
similarity index 100%
rename from build/_next/static/N40XvyeKHVsIvBtwp94RD/_ssgManifest.js
rename to build/_next/static/tX561EXahjjnQ73Ax4gKK/_ssgManifest.js
diff --git a/build/addAIData.html b/build/addAIData.html
index 23561a7..fedf5ce 100644
--- a/build/addAIData.html
+++ b/build/addAIData.html
@@ -1 +1 @@
-Chit-Chat
\ No newline at end of file
+Chit-Chat
\ No newline at end of file
diff --git a/build/addAIData.txt b/build/addAIData.txt
index ed1f5cc..84027b3 100644
--- a/build/addAIData.txt
+++ b/build/addAIData.txt
@@ -1,5 +1,5 @@
1:HL["/_next/static/css/2fe9c6d95e07df91.css","style",{"crossOrigin":""}]
-0:["N40XvyeKHVsIvBtwp94RD",[[["",{"children":["addAIData",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2fe9c6d95e07df91.css","precedence":"next","crossOrigin":""}]],"$L3"]]]]
+0:["tX561EXahjjnQ73Ax4gKK",[[["",{"children":["addAIData",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2fe9c6d95e07df91.css","precedence":"next","crossOrigin":""}]],"$L3"]]]]
4:I{"id":1443,"chunks":["272:static/chunks/webpack-e8aa2957d072fc4f.js","971:static/chunks/fd9d1056-b49804a1e6f1a9b7.js","864:static/chunks/864-126ae77cc240a619.js"],"name":"","async":false}
5:I{"id":8639,"chunks":["272:static/chunks/webpack-e8aa2957d072fc4f.js","971:static/chunks/fd9d1056-b49804a1e6f1a9b7.js","864:static/chunks/864-126ae77cc240a619.js"],"name":"","async":false}
7:I{"id":5146,"chunks":["272:static/chunks/webpack-e8aa2957d072fc4f.js","971:static/chunks/fd9d1056-b49804a1e6f1a9b7.js","864:static/chunks/864-126ae77cc240a619.js"],"name":"","async":false}
diff --git a/build/dashboard.html b/build/dashboard.html
index 2cf70fe..a8c848a 100644
--- a/build/dashboard.html
+++ b/build/dashboard.html
@@ -1 +1 @@
-Chit-Chat
\ No newline at end of file
+Chit-Chat
\ No newline at end of file
diff --git a/build/dashboard.txt b/build/dashboard.txt
index b3347bd..ebae5d5 100644
--- a/build/dashboard.txt
+++ b/build/dashboard.txt
@@ -1,5 +1,5 @@
1:HL["/_next/static/css/2fe9c6d95e07df91.css","style",{"crossOrigin":""}]
-0:["N40XvyeKHVsIvBtwp94RD",[[["",{"children":["dashboard",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2fe9c6d95e07df91.css","precedence":"next","crossOrigin":""}]],"$L3"]]]]
+0:["tX561EXahjjnQ73Ax4gKK",[[["",{"children":["dashboard",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L2",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2fe9c6d95e07df91.css","precedence":"next","crossOrigin":""}]],"$L3"]]]]
4:I{"id":1443,"chunks":["272:static/chunks/webpack-e8aa2957d072fc4f.js","971:static/chunks/fd9d1056-b49804a1e6f1a9b7.js","864:static/chunks/864-126ae77cc240a619.js"],"name":"","async":false}
5:I{"id":8639,"chunks":["272:static/chunks/webpack-e8aa2957d072fc4f.js","971:static/chunks/fd9d1056-b49804a1e6f1a9b7.js","864:static/chunks/864-126ae77cc240a619.js"],"name":"","async":false}
7:I{"id":5146,"chunks":["272:static/chunks/webpack-e8aa2957d072fc4f.js","971:static/chunks/fd9d1056-b49804a1e6f1a9b7.js","864:static/chunks/864-126ae77cc240a619.js"],"name":"","async":false}
diff --git a/build/docs.html b/build/docs.html
index 0292efc..01a891c 100644
--- a/build/docs.html
+++ b/build/docs.html
@@ -14,4 +14,4 @@
});
const jsonData = await response.json();
- }