1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[40558],{62705:function(e,t,r){var o=r(55639).Symbol;e.exports=o},44239:function(e,t,r){var o=r(62705),n=r(89607),a=r(2333),s=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?n(e):a(e)}},27561:function(e,t,r){var o=r(67990),n=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(n,""):e}},31957:function(e,t,r){var o="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=o},89607:function(e,t,r){var o=r(62705),n=Object.prototype,a=n.hasOwnProperty,s=n.toString,i=o?o.toStringTag:void 0;e.exports=function(e){var t=a.call(e,i),r=e[i];try{e[i]=void 0;var o=!0}catch(e){}var n=s.call(e);return o&&(t?e[i]=r:delete e[i]),n}},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},55639:function(e,t,r){var o=r(31957),n="object"==typeof self&&self&&self.Object===Object&&self,a=o||n||Function("return this")();e.exports=a},67990:function(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},23279:function(e,t,r){var o=r(13218),n=r(7771),a=r(14841),s=Math.max,i=Math.min;e.exports=function(e,t,r){var l,c,d,u,p,f,g=0,h=!1,x=!1,m=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var r=l,o=c;return l=c=void 0,g=t,u=e.apply(o,r)}function b(e){var r=e-f,o=e-g;return void 0===f||r>=t||r<0||x&&o>=d}function v(){var e,r,o,a=n();if(b(a))return j(a);p=setTimeout(v,(e=a-f,r=a-g,o=t-e,x?i(o,d-r):o))}function j(e){return(p=void 0,m&&l)?y(e):(l=c=void 0,u)}function S(){var e,r=n(),o=b(r);if(l=arguments,c=this,f=r,o){if(void 0===p)return g=e=f,p=setTimeout(v,t),h?y(e):u;if(x)return clearTimeout(p),p=setTimeout(v,t),y(f)}return void 0===p&&(p=setTimeout(v,t)),u}return t=a(t)||0,o(r)&&(h=!!r.leading,d=(x="maxWait"in r)?s(a(r.maxWait)||0,t):d,m="trailing"in r?!!r.trailing:m),S.cancel=function(){void 0!==p&&clearTimeout(p),g=0,l=f=c=p=void 0},S.flush=function(){return void 0===p?u:j(n())},S}},13218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},8923:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},33448:function(e,t,r){var o=r(44239),n=r(8923);e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==o(e)}},7771:function(e,t,r){var o=r(55639);e.exports=function(){return o.Date.now()}},14841:function(e,t,r){var o=r(27561),n=r(13218),a=r(33448),s=0/0,i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return s;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var r=l.test(e);return r||c.test(e)?d(e.slice(2),r?2:8):i.test(e)?s:+e}},8884:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ChatHome",function(){return r(30635)}])},30635:function(e,t,r){"use strict";r.r(t);var o=r(85893),n=r(75164),a=r(63169),s=r.n(a),i=r(5872),l=r(67294),c=r(23057),d=r(5130),u=r(9008),p=r.n(u),f=r(73468),g=r(11163),h=r(79930),x=r(92677),m=r(32253),y=r(23991),b=r(7515),v=r(39719);r(67807);var j=r(9134),S=r(27519),w=r(10131),k=r(23279),E=r.n(k);r(51691),t.default=()=>{let{language:e,setLanguage:t}=(0,l.useContext)(b.dn),{account:r,isLoading:a,error:u}=(0,n.Mu)(),k=null==r?void 0:r.address,[T,C]=(0,l.useState)(null),[Z,A]=(0,l.useState)([]),[P,O]=(0,l.useState)([]),[F,R]=(0,l.useState)(null),[_,N]=(0,l.useState)(!1),[I,z]=(0,l.useState)(""),[q,W]=(0,l.useState)([]),{freeChatsLeft:D,setFreeChatsLeft:J,freeUploadsLeft:B,setFreeUploadsLeft:U,freeWebScrapeLeft:L,setFreeWebScrapeLeft:M}=(0,f.x)(),[K,X]=(0,l.useState)(!1),[$,Y]=(0,l.useState)(!1),[G,H]=(0,l.useState)(""),[V,Q]=(0,l.useState)(!1),ee=(0,g.useRouter)(),et=(0,l.useRef)(null),er=(0,l.useRef)(null),[eo,en]=(0,l.useState)(null);(0,l.useRef)(null);let[ea,es]=(0,l.useState)(!1),[ei,el]=(0,l.useState)(!1),[ec,ed]=(0,l.useState)(""),[eu,ep]=(0,l.useState)("English"),[ef,eg]=(0,l.useState)([]),[eh,ex]=(0,l.useState)(null),[em,ey]=(0,l.useState)(null),{process_payment:eb,isPaymentProcessing:ev}=(0,v.V)(),[ej,eS]=(0,l.useState)(!1),[ew,ek]=(0,l.useState)({top:0,left:0}),[eE,eT]=(0,l.useState)(!1),eC=(0,l.useRef)(null),[eZ,eA]=(0,l.useState)(null),[eP,eO]=(0,l.useState)(!1),[eF,eR]=(0,l.useState)({top:0,left:0}),[e_,eN]=(0,l.useState)(null),[eI,ez]=(0,l.useState)(null),eq=(0,l.useRef)(!1),[eW,eD]=(0,l.useState)(null),[eJ,eB]=(0,l.useState)(!1),[eU,eL]=(0,l.useState)(!1),[eM,eK]=(0,l.useState)([]),[eX,e$]=(0,l.useState)(!1),[eY,eG]=(0,l.useState)(!1),[eH,eV]=(0,l.useState)(!1),[eQ,e0]=(0,l.useState)(null),[e1,e2]=(0,l.useState)(null),e3=(0,l.useRef)(null),[e5,e9]=(0,l.useState)(!1),[e4,e7]=(0,l.useState)(!1),[e8,e6]=(0,l.useState)(""),[te,tt]=(0,l.useState)([]),[tr,to]=(0,l.useState)([]),[tn,ta]=(0,l.useState)(""),[ts,ti]=(0,l.useState)([]),tl=async()=>
1{if(k)try{let e=await fetch("/api/selectedSources/get?userAddress=".concat(k));if(e.ok){let t=await e.json();console.log("[fetchUserSelectedSources] Retrieved:",t.selectedSources),ti(t.selectedSources||[])}}catch(e){console.error("Error fetching selected sources:",e)}};(0,l.useEffect)(()=>{V&&k&&tl()},[V,k]);let tc=(0,l.useCallback)(async()=>{if(k)try{let e=await fetch("/api/get-user-perks?userAddress=".concat(encodeURIComponent(k)));if(e.ok){let t=await e.json();J(t.freeTrades),U(t.freeUploads),M(t.freeWebScrape)}else{let t=await e.json();j.Am.error(t.message||"Failed to retrieve perks.")}}catch(e){console.error("Error fetching user perks:",e),j.Am.error("An unexpected error occurred while fetching perks.")}},[k]);(0,l.useEffect)(()=>{V&&k&&fetch("/api/listEmbeddings?userAddress=".concat(k)).then(e=>e.json()).then(e=>{tt(e.embeddings||[])}).catch(e=>console.error("Error fetching embeddings list:",e))},[V,k]),(0,l.useEffect)(()=>{V&&k&&fetch("/api/selectedSources/get?userAddress=".concat(k)).then(e=>e.json()).then(e=>{to(e.selectedSources||[])}).catch(e=>console.error("Error fetching selected sources:",e))},[V,k]),(0,l.useEffect)(()=>{V&&k&&fetch("/api/get-scrape-status?userAddress=".concat(k)).then(e=>e.json()).then(e=>{W(e)}).catch(e=>{console.error("Error fetching scrape statuses:",e)})},[V,k]),(0,l.useEffect)(()=>{k?tc():(J(null),U(null),M(null))},[k,tc]);let td=(0,l.useCallback)(async e=>{if(k&&T&&!eM.includes(e))try{if(!(await fetch("/api/add-task-favorite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userAddress:k,department:T.department,role:T.role,task:e})})).ok)throw Error("Failed to add favorite task");eK(t=>[...t,e]),j.Am.info((0,o.jsx)(y.oZ,{name:"Task ".concat(e," Favorited")}),{style:{backgroundColor:"#4CAF50",color:"#fff"}})}catch(e){console.error("Error adding favorite task:",e),j.Am.error((0,o.jsx)(y.oZ,{name:"Failed To Update Favorite"}))}},[k,T,eM]),tu=async()=>{if(k&&T)try{let e=await fetch("/api/get-task-favorites",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userAddress:k,department:T.department,role:T.role})});if(!e.ok)throw Error("Failed to fetch favorite tasks");let t=await e.json();eK(t.favoriteTasks||[])}catch(e){console.error("Error fetching favorite tasks:",e)}finally{eB(!0)}};(0,l.useEffect)(()=>{tu()},[T,k]);let tp=(0,l.useCallback)(async e=>{if(!k||!T)return;let t=eM.includes(e);try{if(!(await fetch(t?"/api/remove-task-favorite":"/api/add-task-favorite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userAddress:k,department:T.department,role:T.role,task:e})})).ok)throw Error("Failed to update favorite task");t?eK(t=>t.filter(t=>t!==e)):eK(t=>[...t,e]),j.Am.info(t?(0,o.jsx)(y.oZ,{name:"Task ".concat(e," Unfavorited")}):(0,o.jsx)(y.oZ,{name:"Task ".concat(e," Favorited")}),{style:{backgroundColor:t?"#F44336":"#4CAF50",color:"#fff"}})}catch(e){console.error("Error updating favorite task:",e),j.Am.error((0,o.jsx)(y.oZ,{name:"Failed To Update Favorite"}))}},[k,T,eM]),tf=e=>{R(e),el(!1),eS(!1),eO(!1),eL(!1),e$(!1)},tg=async(e,t)=>{e.stopPropagation(),eO(!1),ex(null),eA(t);let r=e.currentTarget;if(!r){console.error("event.currentTarget is null");return}let o=r.getBoundingClientRect();if(ek({top:o.top+window.scrollY,left:o.right+10+window.scrollX}),eS(!0),!T){console.error("selectedRole is null");return}if(!eh||eZ!==t)try{let e=await fetch("/api/get_task_description",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({department:T.department,role:T.role,task:t,language:eu})});if(!e.ok)throw Error("Failed to fetch task description");let r=await e.json();ex(r.description)}catch(e){console.error("Error fetching task description:",e),ex("")}},th=async(e,t)=>{e.stopPropagation(),eN(null);let{department:r,role:o}=t;ez("".concat(r,":").concat(o));let n=e.currentTarget;if(!n){console.error("event.currentTarget is null");return}let a=n.getBoundingClientRect();eR({top:a.top-100+window.scrollY,left:a.left-465+window.scrollX}),eO(!0);try{let e=await fetch("/api/get_role_description",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({department:r,role:o,language:eu})});if(!e.ok)throw Error("Failed to fetch role description");let t=await e.json();eN(t.description)}catch(e){console.error("Error fetching role description:",e),eN("")}},tx=(0,l.useCallback)(e=>{er.current&&!er.current.contains(e.target)&&eC.current&&!eC.current.contains(e.target)&&tm()},[]),tm=()=>{el(!1),eS(!1),eA(null),ez(null),eO(!1)},ty=async()=>{let e=async()=>{try{let e=await fetch("/api/get_all_languages");if(e.ok){let t=await e.json();eg(Array.from(new Set(t)))}}catch(e){console.error("Error fetching languages:",e)}},r=async()=>
1{if(k)try{let e=await fetch("/api/get_user_language?userAddress=".concat(k));if(e.ok){let r=await e.json();r.language?(ep(r.language),t(r.language)):(ep("English"),t("English"))}}catch(e){console.error("Failed to fetch user language:",e),ep("English")}};await e(),await r()};(0,l.useEffect)(()=>{ty()},[k]),(0,l.useEffect)(()=>(document.addEventListener("mousedown",tx),()=>{document.removeEventListener("mousedown",tx)}),[tx]),(0,l.useEffect)(()=>{k&&tb(),tj()},[k]),(0,l.useEffect)(()=>{let e=async function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;try{let e=await fetch("/api/get_task_description",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({department:null==T?void 0:T.department,role:null==T?void 0:T.role,task:t,language:eu})});if(!e.ok)throw Error("Failed to fetch task description");let r=await e.json();ex(r.description)}catch(o){console.error("Error fetching task description:",o),r>0?setTimeout(()=>e(t,r-1),1e3):ex("Error fetching .")}};ej&&eZ&&!eh&&e(eZ)},[ej,eZ,T,eu,eh]),(0,l.useEffect)(()=>{(async()=>{if(ee.query.selectedRole&&ee.query.selectedCategory){let e={role:ee.query.selectedRole,department:ee.query.selectedCategory};if(C(e),await tv(e.department,e.role),ee.query.selectedTask){R(ee.query.selectedTask);try{if(!(await fetch("/api/add-role-mapping",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userAddress:k,department:e.department,role:e.role})})).ok)throw Error("Failed to add role mapping");if(ee.query.language&&"string"==typeof ee.query.language){let e=ee.query.language;ep(e),t(e)}}catch(e){console.error("Error adding role mapping:",e)}eL(!1)}else R(null)}if(ee.query.language&&"string"==typeof ee.query.language){let e=ee.query.language;ep(e),t(e)}})()},[ee.query]);let tb=async()=>{try{let e=await fetch("/api/get-role-by-address",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:k})});if(!e.ok)throw Error("Failed to fetch roles");let t=await e.json();A(t)}catch(e){console.error("Error fetching roles:",e)}},tv=async(e,t)=>{try{let r=await fetch("/api/get-tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({department:e,role:t})});if(!r.ok)throw Error("Failed to fetch tasks");let o=await r.json();O(o.tasks)}catch(e){console.error("Error fetching tasks:",e)}},tj=async()=>{try{let e=await fetch("/api/get_all_languages");if(!e.ok)throw Error("Failed to fetch languages");await e.json()}catch(e){console.error("Error fetching languages:",e)}},tS=e=>{C(e),R(null),tv(e.department,e.role),es(!1),eL(!1)};(0,l.useEffect)(()=>{T&&T.role&&T.department&&tw(T.department,T.role)},[T]);let tw=async(e,t)=>{try{let r=await fetch("/api/role-description?department=".concat(e,"&role=").concat(t));if(r.ok){let e=await r.json();eN(e.description)}else eN("The persona description is currently unavailable. Please try again later")}catch(e){console.error("Error fetching role description:",e),eN("Error fetching persona description")}},tk=()=>Q(!1),[tE,tT]=(0,l.useState)(!1),[tC,tZ]=(0,l.useState)("Type or paste your text here...");(0,l.useEffect)(()=>{(async()=>{tZ(await (0,y.Z)("Type or paste your text here...",eu))})()},[eu]);let[tA,tP]=(0,l.useState)("Please enter a unique upload name using only English characters");(0,l.useEffect)(()=>{(async()=>{tP(await (0,y.Z)("Please enter a unique upload name using only English characters",eu))})()},[eu]);let[tO,tF]=(0,l.useState)({cleanupSuccess:"Embedding segment cleaned up successfully",cleanupFailed:"Embedding segment not found or already clean up",cleanupError:"Error occurred while cleaning up embedding segment",translateFailed:"Failed to translate text. Uploading original text.",uploadSuccess:"Text uploaded successfully",uploadFailed:"Failed to upload text. Please try again."});(0,l.useEffect)(()=>{(async()=>{let e={};for(let[t,r]of Object.entries(tO))e[t]=await (0,y.Z)(r,eu);tF(t=>({...t,...e}))})()},[eu]),(0,l.useEffect)(()=>{(async()=>{F&&T&&eJ&&!eq.current&&!eM.includes(F)&&(await td(F),eq.current=!0)})()},[F,T,td,eJ]);let[tR,t_]=(0,l.useState)(""),[tN,tI]=(0,l.useState)(Date.now()),tz=(0,l.useCallback)(E()(t=>{(async t=>{if(t.stopPropagation(),e5){console.log("Payment already in progress, ignoring additional click");return}if(!eX){if(e$(!0),!T){j.Am.error(await (0,y.Z)("Please select a persona.",e)),e$(!1);return}try{e9(!0);let e=await fetch("/api/get-role-mappings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({department:T.department,role:T.role})});if(!e.ok)throw Error("Failed to get role mapping");(await e.json()).price,eL(!0)}catch(t){console.error("Error fetching role mapping:",t),j.Am.error(await (0,y.Z)("Error processing payment for role.",e)),e$(!1)}finally{setTimeout(()=>{e9(!1)},5e3)}}})(t)},500,{leading:!0,trailing:!1}),[e5,eX,T,k,e,eb]),tq=e=>{e.preventDefault(),tz(e)},[tW,tD]=(0,l.useState)([]),[tJ,tB]=(0,l.useState)("Are you sure you want to delete this embedding?");return(0,l.useEffect)(()=>{(async()=>{tB(await (0,y.Z)("confirmDeleteEmbedding",eu))})()},[eu]),(0,l.useEffect)(()=>{ep(e)},[e]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(p(),{children:[(0,o.jsx)("title",{children:"Web3AIstore"}),(0,o.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,o.jsxs)("main",{className:s().main,children:[(0,o.jsx)("div",{className:s().c
1ontainer,children:k?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.Z,{}),(0,o.jsxs)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"1px",width:"100%"},children:[(0,o.jsx)("h3",{style:{cursor:T?"pointer":"default",marginRight:"20px"},onClick:()=>T&&N(!0),children:T?(0,o.jsx)(y.oZ,{name:"Review"}):(0,o.jsx)(y.oZ,{name:"GPT Chat"})}),(0,o.jsxs)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%"},children:[(0,o.jsxs)("div",{ref:er,style:{flex:1,position:"relative",textAlign:"center",display:"flex",alignItems:"center"},children:[(0,o.jsxs)("div",{style:{border:"2px solid #444",padding:"0.5rem 1rem",borderRadius:"8px",cursor:"pointer",backgroundColor:"blue",position:"relative",maxWidth:"600px",flex:1,display:"flex",alignItems:"center",justifyContent:"space-between"},onClick:()=>{ei?tm():el(!0),es(!1)},children:[F&&(0,o.jsx)("span",{onClick:e=>{e.stopPropagation(),F&&tp(F)},style:{cursor:"pointer",color:eM.includes(F)?"gold":"grey",marginRight:"10px",fontSize:"24px"},children:"â
"}),(0,o.jsx)("p",{style:{fontSize:"18px",margin:0,flex:1,textAlign:"left"},children:F?(0,o.jsx)(y.oZ,{name:F}):(0,o.jsx)(y.oZ,{name:"Select a Task"})}),F&&(0,o.jsxs)("div",{className:s().tooltipWrapper,style:{position:"relative"},children:[(0,o.jsx)("button",{ref:e3,style:{marginRight:"0.2px",padding:"0.1rem 0.5rem",borderRadius:"4px",cursor:eX?"default":"pointer",backgroundColor:eX?"#rgba(0, 208, 255, 0.95)":"#0070f3",color:"white",border:"none",fontSize:"18px",fontWeight:"bold",boxShadow:eX?"none":"2px 4px red",transform:eX?"none":"scale(1)",transition:"transform 0.2s"},onClick:e=>{var t,r;(null===(t=e3.current)||void 0===t?void 0:t.getAttribute("data-processing"))==="true"||e5||(null===(r=e3.current)||void 0===r||r.setAttribute("data-processing","true"),tq(e),setTimeout(()=>{!eX&&e3.current&&e3.current.removeAttribute("data-processing")},3e3))},onMouseEnter:e=>{eX||(e.currentTarget.style.transform="scale(0.8)",e.currentTarget.style.backgroundColor="#1e0af3",e.currentTarget.style.boxShadow="1px 2px red")},onMouseLeave:e=>{eX||(e.currentTarget.style.transform="scale(1)",e.currentTarget.style.backgroundColor="#0070f3",e.currentTarget.style.boxShadow="2px 4px red")},disabled:eX,children:eU?(0,o.jsx)(y.oZ,{name:"In Progress"}):(0,o.jsx)(y.oZ,{name:"Execute"})}),(0,o.jsx)("span",{className:s().tooltip,children:(0,o.jsx)(y.oZ,{name:"Click to execute the task"})})]})]}),ei&&(0,o.jsx)("div",{style:{position:"absolute",top:"100%",left:0,width:"100%",maxWidth:"600px",backgroundColor:"blue",padding:"1rem",marginTop:"0px",borderRadius:"8px",boxShadow:"0 2px 10px rgba(0,0,0,0.2)",zIndex:1e3,fontSize:18},children:(P||[]).map(e=>(0,o.jsx)(S.Z,{task:e,handleTaskChange:tf,handleDescriptionClick:tg,selectedTask:F,activeButton:eZ,isFavorited:eM.includes(e),toggleFavorite:tp},e))})]}),(0,o.jsxs)("div",{className:s().tooltipWrapper,children:[(0,o.jsx)("button",{style:{marginRight:"2px",padding:"0.5rem 1rem",borderRadius:"8px",cursor:"pointer",backgroundColor:"darkblue",color:"white",border:"none",fontSize:"18px"},onClick:()=>{let e=m.Z.hashTo(k||"");window.open("/knowledge-base?userKey=".concat(e),"_blank")},"aria-label":"Knowledge Base",children:(0,o.jsx)(y.oZ,{name:"Knowledge Base"})}),(0,o.jsx)("span",{className:s().tooltip,children:(0,o.jsx)(y.oZ,{name:"Input or paste text to create a knowledge base, enabling AI to provide optimal answers"})})]}),V&&(0,o.jsx)("div",{onClick:e=>{e.target===e.currentTarget&&e.stopPropagation()},style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.92)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},children:(0,o.jsxs)("div",{style:{width:"90%",maxWidth:"1200px",height:"85vh",borderRadius:"12px",overflow:"hidden",position:"relative"},children:[(0,o.jsx)("button",{onClick:tk,style:{position:"absolute",top:"10px",right:"10px",zIndex:1001,background:"rgba(0,0,0,0.5)",border:"none",color:"#fff",fontSize:"24px",cursor:"pointer",borderRadius:"50%",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center"},children:"\xd7"}),(0,o.jsx)(x.Z,{userKey:m.Z.hashTo(k||""),onClose:tk,onSourcesSelected:e=>{console.log("Selected sources:",e),j.Am.success("Selected ".concat(e.length," source(s)")),tk()}})]})}),tE&&(0,o.jsx)("div",{className:s().modalOverlay1,children:(0,o.jsx)("div",{className:s().modalContent1,children:(0,o.jsx)("div",{style:{textAlign:"center"},children:(0,o.jsx)("p",{children:(0,o.jsx)(y.oZ,{name:"Loading..."})})})})}),(0,o.jsxs)("div",{ref:et,style:{position:"relative",width:"100%",maxWidth:"400px"},children:[(0,o.jsx)("div",{style:{marginLeft:"1rem",border:"2px s
1olid #444",padding:"0.5rem 1rem",borderRadius:"8px",cursor:"pointer",backgroundColor:"blue",position:"relative",zIndex:1e3,width:"100%",boxSizing:"border-box"},onClick:()=>{es(!ea),el(!1)},children:(0,o.jsx)("p",{style:{fontSize:"17px",margin:0},children:T?(0,o.jsx)(y.oZ,{name:T.role}):(0,o.jsx)(y.oZ,{name:"Select a Persona"})})}),ea&&(0,o.jsx)("div",{style:{position:"absolute",top:"100%",left:0,width:"100%",backgroundColor:"blue",padding:"1rem",marginTop:"0px",borderRadius:"8px",boxShadow:"0 2px 10px rgba(0,0,0,0.2)",zIndex:1e3,fontSize:"18px"},children:Z.map(e=>{var t;return(0,o.jsx)(w.Z,{role:e.role,department:e.department,handleRoleChange:tS,handleRoleDescriptionClick:th,selectedRole:null!==(t=null==T?void 0:T.role)&&void 0!==t?t:null,activeRoleButton:eI},e.role)})})]})]})]}),eU&&F&&T&&(0,o.jsx)(h.ZP,{role:(null==T?void 0:T.role)||"",task:F||"",department:(null==T?void 0:T.department)||"",selectedSources:tr},"".concat(null==T?void 0:T.role,"-").concat(F)),_&&(0,o.jsx)(d.Z,{tokenId:(null==T?void 0:T.role)||"",department:(null==T?void 0:T.department)||"",role:(null==T?void 0:T.role)||"",onClose:()=>N(!1)})]}):(0,o.jsx)(c.Z,{})}),ej&&(0,o.jsxs)("div",{ref:eC,style:{position:"absolute",top:ew.top,left:ew.left,backgroundColor:"blue",color:"white",padding:"15px",border:"1px solid #ccc",borderRadius:"8px",boxShadow:"2px 2px 5px darkred",width:"400px",zIndex:1e3},onClick:e=>e.stopPropagation(),children:[(0,o.jsx)("button",{style:{position:"absolute",top:"5px",right:"5px",background:"transparent",border:"none",fontSize:"16px",cursor:"pointer"},onClick:e=>{e.stopPropagation(),eS(!1)},children:"\xd7"}),(0,o.jsx)("h4",{style:{textAlign:"center",marginTop:"6px",marginBottom:"10px"},children:(0,o.jsx)(y.oZ,{name:"Task Description"})}),(0,o.jsx)("p",{style:{marginTop:"6px"},children:eh||(0,o.jsx)(y.oZ,{name:"Please wait, Still loading ...."})})]}),eP&&(0,o.jsxs)("div",{ref:eC,style:{position:"absolute",top:eF.top,left:eF.left,backgroundColor:"blue",color:"white",padding:"15px",border:"1px solid #ccc",borderRadius:"8px",boxShadow:"2px 2px 5px darkred",width:"450px",zIndex:1e3},onClick:e=>e.stopPropagation(),children:[(0,o.jsx)("button",{style:{position:"absolute",top:"5px",right:"5px",background:"transparent",border:"none",fontSize:"16px",cursor:"pointer"},onClick:e=>{e.stopPropagation(),eO(!1)},children:"\xd7"}),(0,o.jsx)("h4",{style:{textAlign:"center",marginTop:"6px",marginBottom:"10px"},children:(0,o.jsx)(y.oZ,{name:"Persona Description "})}),(0,o.jsx)("p",{style:{marginTop:"20px"},children:e_||(0,o.jsx)(y.oZ,{name:"Please wait, Still loading ...."})})]})]})]})}},9008:function(e,t,r){e.exports=r(6665)}},function(e){e.O(0,[57409,97948,32657,86013,75539,22252,33873,41664,59421,36118,45027,1371,61992,97010,76878,21580,12124,96292,271,50349,92677,79930,5872,92888,49774,40179],function(){return e(e.s=8884)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.