1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51095,e=>{"use strict";var t=e.i(71645);e.s(["default",0,function(){let[e,n]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{function e(e){n(e.detail?.open??!1)}return window.addEventListener("chatbot:toggle",e),()=>window.removeEventListener("chatbot:toggle",e)},[]),!function({isChatbotOpen:e=!1}={}){let n=(0,t.useRef)(0),r=(0,t.useRef)(0),s=(0,t.useRef)(!1);(0,t.useEffect)(()=>{if(!("getBattery"in navigator))return;let e=null;function t(){if(!e)return;let t=e.level<=.2&&!e.charging;document.body.classList.toggle("battery-saver",t)}return navigator.getBattery().then(n=>{e=n,t(),n.addEventListener("levelchange",t),n.addEventListener("chargingchange",t)}).catch(()=>{}),()=>{e&&(e.removeEventListener("levelchange",t),e.removeEventListener("chargingchange",t))}},[]),(0,t.useEffect)(()=>{document.body.classList.toggle("chatbot-active",e)},[e]),(0,t.useEffect)(()=>{function e(){if(s.current)return;let t=window.scrollY,a=window.innerHeight;Math.abs(t-r.current)>=a&&(n.current+=1,r.current=t,n.current>=3&&(s.current=!0,document.body.classList.add("power-user"),window.removeEventListener("scroll",e)))}return window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[]),(0,t.useEffect)(()=>{let e=document.querySelectorAll("[data-section]");if(!e.length)return;let t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?(e.target.classList.remove("section-sleeping"),e.target.classList.add("section-awake")):(e.target.classList.remove("section-awake"),e.target.classList.add("section-sleeping"))})},{threshold:.05,rootMargin:"0px 0px -5% 0px"});return e.forEach(e=>{e.classList.add("section-sleeping"),t.observe(e)}),()=>t.disconnect()},[]),(0,t.useEffect)(()=>()=>{document.body.classList.remove("battery-saver","chatbot-active","power-user")},[])}({isChatbotOpen:e}),null}],51095)},29065,e=>{"use strict";var t=e.i(71645);e.s(["default",0,function(){return(0,t.useEffect)(()=>{"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual"),window.scrollTo(0,0)},[]),null}])},60547,e=>{"use strict";var t=e.i(43476),n=e.i(46932);e.i(47167);var r=e.i(71645),s=e.i(31178),a=e.i(47414),i=e.i(74008),o=e.i(21476),l=e.i(72846),d=r,c=e.i(37806);function u(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class h extends d.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if((0,l.isHTMLElement)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,n=(0,l.isHTMLElement)(e)&&e.offsetWidth||0,r=(0,l.isHTMLElement)(e)&&e.offsetHeight||0,s=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(s.height),a.width=parseFloat(s.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function x({children:e,isPresent:n,anchorX:s,anchorY:a,root:i,pop:o}){let l=(0,d.useId)(),m=(0,d.useRef)(null),p=(0,d.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:f}=(0,d.useContext)(c.MotionConfigContext),g=function(...e){return r.useCallback(function(...e){return t=>{let n=!1,r=e.map(e=>{let r=u(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():u(e[t],null)}}}}(...e),e)}(m,e.props?.ref??e?.ref);return(0,d.useInsertionEffect)(()=>{let{width:e,height:t,top:r,left:d,right:c,bottom:u}=p.current;if(n||!1===o||!m.current||!e||!t)return;let h="left"===s?`left: ${d}`:`right: ${c}`,x="bottom"===a?`bottom: ${u}`:`top: ${r}`;m.current.dataset.motionPopId=l;let g=document.createElement("style");f&&(g.nonce=f);let b=i??document.head;return b.appendChild(g),g.sheet&&g.sheet.insertRule(` 2 [data-motion-pop-id="${l}"] { 3 position: absolute !important; 4 width: ${e}px !important; 5 height: ${t}px !important; 6 ${h}px !important; 7 ${x}px !important; 8 } 9 `),()=>{m.current?.removeAttribute("data-motion-pop-id"),b.contains(g)&&b.removeChild(g)}},[n]),(0,t.jsx)(h,{isPresent:n,childRef:m,sizeRef:p,pop:o,children:!1===o?e:d.cloneElement(e,{ref:g})})}let m=({children:e,initial:n,isPresent:s,onExitComplete:i,custom:l,presenceAffectsLayout:d,mode:c,anch
9orX:u,anchorY:h,root:m})=>{let f=(0,a.useConstant)(p),g=(0,r.useId)(),b=!0,y=(0,r.useMemo)(()=>(b=!1,{id:g,initial:n,isPresent:s,custom:l,onExitComplete:e=>{for(let t of(f.set(e,!0),f.values()))if(!t)return;i&&i()},register:e=>(f.set(e,!1),()=>f.delete(e))}),[s,f,i]);return d&&b&&(y={...y}),(0,r.useMemo)(()=>{f.forEach((e,t)=>f.set(t,!1))},[s]),r.useEffect(()=>{s||f.size||!i||i()},[s]),e=(0,t.jsx)(x,{pop:"popLayout"===c,isPresent:s,anchorX:u,anchorY:h,root:m,children:e}),(0,t.jsx)(o.PresenceContext.Provider,{value:y,children:e})};function p(){return new Map}var f=e.i(64978);let g=e=>e.key||"";function b(e){let t=[];return r.Children.forEach(e,e=>{(0,r.isValidElement)(e)&&t.push(e)}),t}let y=({children:e,custom:n,initial:o=!0,onExitComplete:l,presenceAffectsLayout:d=!0,mode:c="sync",propagate:u=!1,anchorX:h="left",anchorY:x="top",root:p})=>{let[y,w]=(0,f.usePresence)(u),v=(0,r.useMemo)(()=>b(e),[e]),j=u&&!y?[]:v.map(g),k=(0,r.useRef)(!0),M=(0,r.useRef)(v),N=(0,a.useConstant)(()=>new Map),C=(0,r.useRef)(new Set),[I,L]=(0,r.useState)(v),[E,A]=(0,r.useState)(v);(0,i.useIsomorphicLayoutEffect)(()=>{k.current=!1,M.current=v;for(let e=0;e<E.length;e++){let t=g(E[e]);j.includes(t)?(N.delete(t),C.current.delete(t)):!0!==N.get(t)&&N.set(t,!1)}},[E,j.length,j.join("-")]);let S=[];if(v!==I){let e=[...v];for(let t=0;t<E.length;t++){let n=E[t],r=g(n);j.includes(r)||(e.splice(t,0,n),S.push(n))}return"wait"===c&&S.length&&(e=S),A(b(e)),L(v),null}let{forceRender:$}=(0,r.useContext)(s.LayoutGroupContext);return(0,t.jsx)(t.Fragment,{children:E.map(e=>{let r=g(e),s=(!u||!!y)&&(v===E||j.includes(r));return(0,t.jsx)(m,{isPresent:s,initial:(!k.current||!!o)&&void 0,custom:n,presenceAffectsLayout:d,mode:c,root:p,onExitComplete:s?void 0:()=>{if(C.current.has(r)||!N.has(r))return;C.current.add(r),N.set(r,!0);let e=!0;N.forEach(t=>{t||(e=!1)}),e&&($?.(),A(M.current),u&&w?.(),l&&l())},anchorX:h,anchorY:x,children:e},r)})})};var w=e.i(63676);let v=(0,e.i(56420).default)("eraser",[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]]);var j=e.i(76525),k=e.i(15520);let M=["fuck","fucking","fucker","f**k","shit","shitting","bullshit","ass","asshole","arse","bitch","bastard","cunt","dick","cock","pussy","whore","slut","nigger","nigga","faggot","fag","retard","retarded","idiot","moron","stupid","kill yourself","kys","rape","rapist","à¤à¤¡à¤¼à¤µà¤¾","रà¤à¤¡à¥","मादरà¤à¥à¤¦","à¤à¥à¤¨à¤à¥à¤¦","à¤à¤¾à¤à¤¡","लà¤à¤¡","à¤à¥à¤¤","हरामà¥","à¤à¤®à¥à¤¨à¤¾","बà¤à¤µà¤¾à¤¸","à¤à¥à¤¤à¤¿à¤¯à¤¾","साला","बà¥à¤µà¤à¥à¤«","बहनà¤à¥à¤¦","madarchod","bhenchod","bhencho","gandu","lund","chut","randi","bhadwa","harami","chutiya","saala","bewakoof","bkl","bc","mc","mf","bcchod","mcchod","bhenchod","behanchod","gandu","lund","chut","bhosri","bhosdi","bhosdiwala","bakchodi","scheiÃe","scheisse","arsch","arschloch","fick","ficken","hurensohn","wichser","vollidiot","idiot","puta","puto","coño","joder","hostia","mierda","cabrón","cabron","pendejo","hijo de puta","hdp"],N=["MedhaMindsAI Automotive","MedhaMindsAI Pharmacy","MedhaMindsAI Institutions","MedhaMindsAI Enterprise","MedhaMindsAI Kids","All Products"];function C(e){let t=e.trim();return t?t.split(/\s+/).length:0}function I(e){let t={name:"",email:"",interest:"",suggestion:""},n=e.name.trim();n?n.length<2?t.name="Name must be at least 2 characters.":/^[a-zA-Z\u0900-\u097F\s]+$/.test(n)||(t.name="Name should contain letters only."):t.name="Please enter your name.";let r=e.email.trim().toLowerCase();if(r?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)||(t.email="Please enter a valid email address."):t.email="Please enter your work email.",e.interest&&N.includes(e.interest)||(t.interest="Please select your area of interest."),e.suggestion.trim()){let n=C(e.suggestion);n>500?t.suggestion=`Please keep your message under 500 words. You have ${n}.`:function(e){if(!e.trim())return!1;let t=e.toLowerCase().replace(/[^\w\s\u0900-\u097F]/g," ");return M.some(e=>{let n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return RegExp(`(?:^|\\s)${n}(?:\\s|$)`,"i").test(t)})}(e.suggestion)&&(t.suggestion="Your message contains language we are unable to process. Please revise and try again.")}return{valid:!t.name&&!t.email&&!t.interest&&!t.suggestion,errors:t}}e.s(["default",0,function(){let{isOpen:e,selectedProduct:s,closeWatchlist:a}=(0,k.useWatchlist)(),[i,o]=(0,r.useState)(""),[l,d]=(0,r.useState)(""),[c,u]=(0,r.useState)(""),[h,x]=(0,r.useState)(""),[m,p]=(0,r.useState)(!1),[f,g]=(0,r.useState)(!1),[b,M]=(0,r.useState)(5),[L,E]=(0,r.useState)(""),[A,S]=(0,r.useState)({name:"",email:"",interest:"",suggestion:""}),$=(0,r.useRef)(null),P=(0,r.useRef)(null);function R(e,t){let n=I({name:i,email:l,interest:c,suggestion:h,[e]:t});S(t=>({...t,[e]:n.errors[e]??""}))}(0,r.useEffect)(()=>{e?(u(s??""),o(""),d(""),x(""),E(""),g(!1),M(5),S({name:"",email:"",interest:"",suggestion:""}),setTimeout(()=>P.current?.focus(),150)):$.current&&clearInterval($.current)},[e,s]),(0,r.useEffect)(()=>()=>{$.current&&clearInterval($.current)},[]);let _=async()=>{E("");let e=I({name:i,email:l,interest:c,suggestion:h});if(!e.valid)return void S(e.errors);p(!0);try{await fetch("/api/watchlist-notify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,email:l,interest:c,suggestion:h})}).catch(e=>{console.warn("MedhaMindsAI â Email notify failed (non-blocking):",e)}),g(!0),p(!1),M(5);let e=5;$.current=setInterval(()=>{if(e-=1,M(e),e<=0){let e,t,n;$.current&&clearInterval($.current);let r=(e=new Date,n=(t=new Date(e.getTime()+6e4*e.getTimezoneOffset()+198e5).getHours())>=5&&t<12?"Good morning":t>=12&&t<17?"Good afternoon":t>=17&&t<21?"Good evening":"Hello",`${n}! I'm ${i.trim()}, interested in ${c}. I just submitted my details for founding access on medhaminds.ai. Looking forward to hearing more.`),s=`https://wa.me/917004010734?text=${encodeURIComponent(r)}`;window.open(s,"_blank","noopener,noreferrer"),a()}},1e3)}catch(e){console.error("MedhaMindsAI â WatchlistModal submit error:",e),E("Something went wrong. Please try again."),p(!1)}},T=C(h),z=T>500?"text-red-400":T>425?"text-amber-400":"text-white/40";return(0,t.jsx)(y,{children:e&&(0,t.jsx)(n.motion.div,{initial:{opacity:0}
9,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},onClick:a,className:"fixed inset-0 z-[100] flex items-center justify-center overflow-y-auto bg-black/70 px-4 py-8 backdrop-blur-sm","aria-modal":"true",role:"dialog","aria-label":"Join the MedhaMindsAI Watchlist",children:(0,t.jsxs)(n.motion.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},transition:{duration:.25,ease:"easeOut"},onClick:e=>e.stopPropagation(),className:"relative w-full max-w-xl overflow-hidden rounded-[36px] border border-white/10 bg-[#020617] shadow-2xl",children:[(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br from-cyan-400/5 via-transparent to-purple-500/5"}),(0,t.jsx)("div",{className:"pointer-events-none absolute left-1/2 top-0 h-[300px] w-[400px] -translate-x-1/2 rounded-full bg-cyan-500/8 blur-[100px]"}),(0,t.jsxs)("div",{className:"relative z-10 p-8 md:p-10",children:[(0,t.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,t.jsx)("div",{className:"inline-flex rounded-full border border-cyan-400/20 bg-cyan-400/10 px-4 py-1.5 text-sm text-cyan-300",children:"Early. Rare. Yours."}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(i||l||h)&&(0,t.jsx)("button",{onClick:function(){o(""),d(""),x(""),E(""),S({name:"",email:"",interest:"",suggestion:""}),s||u(""),P.current?.focus()},"aria-label":"Clear form fields",title:"Clear name, email and suggestion",className:"flex h-9 w-9 items-center justify-center rounded-full border border-white/10 bg-white/5 text-white/50 transition-all hover:border-amber-400/30 hover:bg-amber-400/10 hover:text-amber-300",children:(0,t.jsx)(v,{size:15})}),(0,t.jsx)("button",{onClick:a,"aria-label":"Close modal",className:"flex h-9 w-9 items-center justify-center rounded-full border border-white/10 bg-white/5 text-white/50 transition-all hover:border-red-400/30 hover:bg-red-400/10 hover:text-red-300",children:(0,t.jsx)(w.X,{size:15})})]})]}),(0,t.jsxs)("h2",{className:"text-3xl font-bold leading-tight text-white md:text-4xl",children:["The Intelligent Era",(0,t.jsxs)("span",{className:"bg-gradient-to-r from-cyan-400 via-blue-400 to-purple-500 bg-clip-text text-transparent",children:[" ","Is Almost Here."]})]}),(0,t.jsx)("p",{className:"mt-3 text-sm leading-relaxed text-white/65 md:text-base",children:"The businesses that get in early won't just use MedhaMindsAI â they'll help shape it. Founding access is limited, intentional, and built for the ones who saw it coming."}),(0,t.jsxs)("div",{className:"mt-7 grid gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("input",{ref:P,type:"text",placeholder:"Your Name",value:i,disabled:f,onChange:e=>{o(e.target.value),R("name",e.target.value)},className:`h-14 w-full rounded-2xl border bg-black/30 px-5 text-white outline-none transition-all placeholder:text-white/30 focus:border-cyan-400/40 disabled:opacity-50 ${A.name?"border-red-400/40":"border-white/10"}`}),A.name&&(0,t.jsx)("p",{className:"mt-1.5 px-1 text-xs text-red-400",children:A.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("input",{type:"email",placeholder:"Your Work Email",value:l,disabled:f,onChange:e=>{d(e.target.value),R("email",e.target.value)},className:`h-14 w-full rounded-2xl border bg-black/30 px-5 text-white outline-none transition-all placeholder:text-white/30 focus:border-cyan-400/40 disabled:opacity-50 ${A.email?"border-red-400/40":"border-white/10"}`}),A.email&&(0,t.jsx)("p",{className:"mt-1.5 px-1 text-xs text-red-400",children:A.email})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("select",{value:c,disabled:!!s||f,onChange:e=>{u(e.target.value),R("interest",e.target.value)},className:`h-14 w-full rounded-2xl border bg-black/30 px-5 outline-none transition-all focus:border-cyan-400/40 disabled:cursor-not-allowed disabled:opacity-70 ${A.interest?"border-red-400/40":"border-white/10"} ${!c?"text-white/30":"text-white"}`,children:[!s&&(0,t.jsx)("option",{value:"",disabled:!0,children:"Please select your area of interest"}),N.map(e=>(0,t.jsx)("option",{value:e,className:"bg-[#020617] text-white",children:e},e))]}),A.interest&&(0,t.jsx)("p",{className:"mt-1.5 px-1 text-xs text-red-400",children:A.interest})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"mb-2 block text-sm text-white/50",children:["Got a suggestion or specific need?"," ",(0,t.jsx)("span",{className:"text-white/30",children:"(Optional)"})]}),(0,t.jsx)("textarea",{rows:3,placeholder:"Tell us what your business needs â we're building this for you.",value:h,disabled:f,onChange:e=>{x(e.target.value),R("suggestion",e.target.value)},className:`w-full resize-none rounded-2xl border bg-black/30 px-5 py-4 text-sm text-white outline-none transition-all placeholder:text-white/30 focus:border-cyan-400/40 disabled:opacity-50 ${A.suggestion?"border-red-400/40":"border-white/10"}`}),(0,t.jsxs)("div",{className:"mt-1 flex items-center justify-between px-1",children:[A.suggestion?(0,t.jsx)("p",{className:"text-xs text-red-400",children:A.suggestion}):(0,t.jsx)("span",{}),(0,t.jsxs)("span",{className:`text-xs ${z}`,children:[T," / ",500," words"]})]})]}),L&&(0,t.jsx)("div",{className:"rounded-2xl border border-red-400/20 bg-red-400/10 p-4 text-sm text-red-300",children:L}),f&&(0,t.jsxs)("div",{className:"rounded-2xl border border-emerald-400/20 bg-emerald-400/10 p-4 text-sm text-emerald-300",children:[(0,t.jsx)("p",{className:"font-semibold",children:"You're in. Welcome to the founding era of MedhaMindsAI."}),(0,t.jsxs)("p",{className:"mt-1 text-emerald-300/80",children:["Opening WhatsApp in ",b,1===b?" second":" seconds","..."]})]}),(0,t.jsx)(j.default,{onClick:_,disabled:m||f,className:"h-14 text-base md:text-lg",children:m?"Submitting...":"Claim Founding Access"}),(0,t.jsx)("p",{className:"text-center text-xs text-white/30",children:"No spam, ever. Unsubscribe anytime."})]})]})]})})})}],60547)},48982,e=>{"use strict";var t=e.i(43476),n=e.i(71645),r=e.i(57688),s=e.i(18566),a=e.i(15520);let i="medha_session_id";function o(){return(0,t.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function l(){return(0,t.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"
9currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M12 0 L13.5 10.5 L24 12 L13.5 13.5 L12 24 L10.5 13.5 L0 12 L10.5 10.5 Z"})})}function d(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,t.jsx)("path",{d:"M3 3v5h5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function c({message:e,onAction:n}){let r="user"===e.role;return(0,t.jsx)("div",{className:`flex ${r?"justify-end":"justify-start"} mb-3`,children:(0,t.jsxs)("div",{className:`max-w-[85%] rounded-2xl px-4 py-3 text-sm leading-relaxed ${r?"bg-cyan-400 text-black rounded-br-sm":"bg-white/[0.08] text-white rounded-bl-sm border border-white/10"}`,children:[e.content.split("\n").map((e,n,r)=>(0,t.jsxs)("span",{children:[e,n<r.length-1&&(0,t.jsx)("br",{})]},n)),e.streaming&&(0,t.jsx)("span",{className:"ml-0.5 inline-block h-3.5 w-0.5 animate-pulse bg-cyan-400 align-middle"}),e.externalLinks?.map(e=>(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"mt-2 flex items-center gap-2 rounded-xl border border-cyan-400/20 bg-cyan-400/10 px-3 py-2 text-xs text-cyan-300 transition-colors hover:text-cyan-200",children:[e.name," â"]},e.name)),e.actionButton&&(0,t.jsx)("button",{onClick:()=>e.actionButton&&n?.(e.actionButton.productId),className:"mt-3 w-full rounded-xl border border-cyan-400/30 bg-cyan-400/10 px-4 py-2.5 text-xs font-semibold text-cyan-300 transition-all hover:border-cyan-400/60 hover:bg-cyan-400/20 hover:text-white",children:e.actionButton.label})]})})}function u(){return(0,t.jsx)("div",{className:"flex justify-start mb-3",children:(0,t.jsx)("div",{className:"rounded-2xl rounded-bl-sm border border-white/10 bg-white/[0.08] px-4 py-3",children:(0,t.jsx)("div",{className:"flex gap-1 items-center h-4",children:[0,1,2].map(e=>(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-cyan-400/70",style:{animation:"typing-dot 1.2s ease-in-out infinite",animationDelay:`${.2*e}s`}},e))})})})}function h({presets:e,onSelect:n}){return(0,t.jsx)("div",{className:"flex flex-wrap gap-2 px-4 pb-3",children:e.map(e=>(0,t.jsx)("button",{onClick:()=>n(e),className:"rounded-full border border-cyan-400/20 bg-cyan-400/8 px-3 py-1.5 text-xs text-cyan-300 transition-all hover:border-cyan-400/40 hover:bg-cyan-400/15 hover:text-white",children:e},e))})}e.s(["default",0,function(){let e=(0,s.usePathname)(),{openWatchlist:x}=(0,a.useWatchlist)(),[m,p]=(0,n.useState)(!1),[f,g]=(0,n.useState)([]),[b,y]=(0,n.useState)(""),[w,v]=(0,n.use
9State)(!1),[j,k]=(0,n.useState)(!1),[M,N]=(0,n.useState)([]),[C,I]=(0,n.useState)(!0),[L,E]=(0,n.useState)(0),[A]=(0,n.useState)(()=>{let e;return(e=localStorage.getItem(i))||(e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),localStorage.setItem(i,e)),e}),[S,$]=(0,n.useState)(!1),P=(0,n.useRef)(null),R=(0,n.useRef)(null),_=(0,n.useRef)(null);(0,n.useEffect)(()=>{P.current?.scrollIntoView({behavior:"smooth"})},[f,w]),(0,n.useEffect)(()=>{m&&(setTimeout(()=>R.current?.focus(),100),S||T())},[m]);let T=(0,n.useCallback)(async()=>{$(!0),v(!0);try{let t=await fetch(`/api/chat?sessionId=${encodeURIComponent(A)}&page=${encodeURIComponent(e)}`),n=await t.json();g([{role:"assistant",content:n.message}]),n.presets?.length&&(N(n.presets),I(!0))}catch{g([{role:"assistant",content:"Good evening. I'm Medha â the conversational intelligence of MedhaMindsAI. What would you like to explore?"}]),N(["What is MedhaMindsAI?","Which product is right for me?","How is this different?","Do you have any clients?"]),I(!0)}finally{v(!1)}},[A,e,S]),z=(0,n.useCallback)(()=>{g([]),N([]),I(!0),$(!1),E(0),y(""),setTimeout(()=>T(),50)},[T]);(0,n.useEffect)(()=>{function e(e){"Escape"===e.key&&m&&p(!1)}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[m]);let W=(0,n.useCallback)(()=>{let e=R.current;e&&(e.style.height="auto",e.style.height=Math.min(e.scrollHeight,100)+"px")},[]);(0,n.useLayoutEffect)(()=>{W()},[b,W]);let B=(0,n.useCallback)(async t=>{if(!t.trim()||w)return;let n=[...f,{role:"user",content:t.trim()}];g(n),y(""),I(!1),v(!0),k(!1);let r=!1,s="",a=null,i=e=>{g(t=>{let n=[...t],r=n[n.length-1];return r?.role==="assistant"?[...n.slice(0,-1),{...r,content:e,streaming:!0}]:n})};try{let t=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:n.map(e=>({role:e.role,content:e.content})),sessionId:A,currentPage:e,offTopicCount:L})});if(!t.body)throw Error("No stream body");let o=t.body.getReader(),l=new TextDecoder,d="",c="";for(;;){let{done:e,value:t}=await o.read();if(e)break;let n=(d+=l.decode(t,{stream:!0})).split("\n\n");for(let e of(d=n.pop()??"",n)){if(!e.startsWith("data: "))continue;let t=e.slice(6);try{let e=JSON.parse(t);e.text&&(c+=e.text,r?(s=c,a||(a=setTimeout(()=>{i(s),a=null},80))):(r=!0,g(e=>[...e,{role:"assistant",content:c,streaming:!0}]))),e.done&&(g(t=>{let n=[...t],r=n[n.length-1];return r?.role==="assistant"?[...n.slice(0,-1),{...r,content:e.message||c,streaming:!1,externalLinks:e.externalLinks??null}]:n}),"number"==typeof e.offTopicCount&&E(e.offTopicCount),void 0!==e.triggerModal&&null!==e.triggerModal&&g(t=>{let n=[...t],r=n[n.length-1];return r?.role==="assistant"?[...n.slice(0,-1),{...r,actionButton:{label:"Join Founding Access â",productId:e.triggerModal??""}}]:n}),e.presets?.length&&(N(e.presets),I(!0)))}catch{}}}}catch{g(e=>{let t=e[e.length-1];return t?.role==="assistant"?[...e.slice(0,-1),{role:"assistant",content:"Something went wrong. Please try again.",streaming:!1}]:[...e,{role:"assistant",content:"Something went wrong. Please try again.",streaming:!1}]})}finally{v(!1)}},[f,w,A,e,L,x]),Y=(0,n.useCallback)(e=>{y(e.target.value),k(!0),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>k(!1),1500)},[]),H=(0,n.useCallback)(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),B(b))},[b,B]);return(0,t.jsxs)(t.Fragment,{children:[m&&(0,t.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>p(!1),"aria-hidden":"true"}),(0,t.jsxs)("div",{style:{position:"fixed",bottom:"80px",right:"20px",width:"min(390px, calc(100vw - 32px))",maxHeight:"min(560px, calc(100vh - 120px))",zIndex:50,display:"flex",flexDirection:"column",background:"rgba(3, 7, 18, 0.97)",border:"1px solid rgba(34,211,238,0.2)",borderRadius:"24px",boxShadow:"0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(34,211,238,0.06)",backdropFilter:"blur(16px)",WebkitBackdropFilter:"blur(16px)",opacity:+!!m,transform:m?"translateY(0) scale(1)":"translateY(12px) scale(0.97)",pointerEvents:m?"auto":"none",transition:"opacity 0.2s ease, transform 0.2s ease"},onClick:e=>e.stopPropagation(),role:"dialog","aria-label":"Medha AI chat","aria-hidden":!m,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-white/10 px-4 py-3.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsxs)("div",{className:"relative shrink-0",children:[(0,t.jsx)(r.default,{src:"/icon.png",alt:"MedhaMindsAI",width:32,height:32,className:"rounded-lg",priority:!0}),(0,t.jsx)("span",{className:"absolute -bottom-0.5 -right-0.5 h-2.5 w-2.5 rounded-full border-2 border-[#030712] transition-colors duration-500",style:{backgroundColor:j?"#10b981":"#f59e0b"}})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-white",children:"Medha"}),(0,t.jsx)("button",{title:"Medha â Human-Aware AI",className:"text-cyan-400/60 hover:text-cyan-300 transition-colors",tabIndex:-1,
9children:(0,t.jsx)(l,{})})]}),(0,t.jsx)("p",{className:"text-xs text-cyan-300/70",children:"MedhaMindsAI · Human-Aware Intelligence"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("button",{onClick:z,title:"Reset conversation","aria-label":"Reset chat",className:"flex h-8 w-8 items-center justify-center rounded-full border border-cyan-400/40 bg-cyan-400/10 text-cyan-400 shadow-[0_0_10px_rgba(34,211,238,0.25)] transition-all hover:border-cyan-400/70 hover:bg-cyan-400/20 hover:shadow-[0_0_16px_rgba(34,211,238,0.45)]",children:(0,t.jsx)(d,{})}),(0,t.jsx)("button",{onClick:()=>p(!1),className:"rounded-full p-1.5 font-bold text-red-400 transition-colors hover:bg-red-500/10 hover:text-red-300","aria-label":"Close chat",children:(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,t.jsx)("path",{d:"M1 1l12 12M13 1L1 13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto overscroll-contain px-4 pt-4",children:[f.map((e,n)=>(0,t.jsx)(c,{message:e,onAction:e=>x(e||void 0)},n)),w&&f[f.length-1]?.role!=="assistant"&&(0,t.jsx)(u,{}),(0,t.jsx)("div",{ref:P})]}),C&&M.length>0&&!w&&(0,t.jsx)(h,{presets:M,onSelect:e=>B(e)}),(0,t.jsx)("div",{className:"border-t border-white/10 p-3",children:(0,t.jsxs)("div",{className:"flex items-end gap-2 rounded-2xl border border-white/10 bg-white/[0.05] px-4 py-2.5",children:[(0,t.jsx)("textarea",{ref:R,rows:1,value:b,onChange:Y,onKeyDown:H,placeholder:"Ask Medha anything...",className:"flex-1 resize-none bg-transparent text-sm text-white placeholder-white/30 outline-none",style:{maxHeight:"100px",overflowY:"auto"},"aria-label":"Message input"}),(0,t.jsx)("button",{onClick:()=>B(b),disabled:!b.trim()||w,className:"mb-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-cyan-400 text-black transition-all hover:bg-cyan-300 disabled:cursor-not-allowed disabled:opacity-40","aria-label":"Send message",children:(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,t.jsx)("path",{d:"M1 6h10M7 2l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})})]}),(0,t.jsx)("button",{onClick:()=>p(e=>!e),"aria-label":m?"Close Medha chat":"Open Medha chat","aria-expanded":m,className:"fixed bottom-5 right-5 z-50 flex h-14 w-14 items-center justify-center rounded-full border border-cyan-400/30 bg-[#020617] text-cyan-300 shadow-[0_0_24px_rgba(34,211,238,0.25)] transition-all duration-200 hover:border-cyan-400/60 hover:shadow-[0_0_32px_rgba(34,211,238,0.4)]",style:{transform:m?"scale(0.95)":"scale(1)",transition:"transform 0.15s ease",animation:m?"none":"chatbot-pulse 2s ease-in-out infinite"},children:m?(0,t.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:(0,t.jsx)("path",{d:"M2 2l14 14M16 2L2 16",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})}):(0,t.jsx)(o,{})}),!m&&!S&&(0,t.jsx)("div",{style:{position:"fixed",bottom:"22px",right:"76px",zIndex:50,background:"rgba(3,7,18,0.95)",border:"1px solid rgba(34,211,238,0.2)",borderRadius:"20px",padding:"8px 14px",pointerEvents:"none"},children:(0,t.jsxs)("p",{className:"text-xs font-medium text-white whitespace-nowrap",children:["Hi, I'm Medha ",(0,t.jsx)("span",{className:"text-cyan-300",children:"â"})," what would you like to explore?"]})}),(0,t.jsx)("style",{children:` 10 @keyframes typing-dot { 11 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 12 30% { opacity: 1; transform: translateY(-3px); } 13 } 14 @keyframes chatbot-pulse { 15 0% { transform: scale(1); box-shadow: 0 0 24px rgba(34,211,238,0.25); } 16 14% { transform: scale(1.08); box-shadow: 0 0 38px rgba(34,211,238,0.55); } 17 28% { transform: scale(1); box-shadow: 0 0 24px rgba(34,211,238,0.25); } 18 42% { transform: scale(1.05); box-shadow: 0 0 32px rgba(34,211,238,0.42); } 19 60% { transform: scale(1); box-shadow: 0 0 24px rgba(34,211,238,0.25); } 20 100% { transform: scale(1); box-shadow: 0 0 24px rgba(34,211,238,0.25); } 21 } 22 `})]})}])},95848,e=>{"use strict";var t=e.i(43476),n=e.i(71645),r=e.i(18566);let s=(0,e.i(56420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),a={"/automotive":"MedhaMindsAI Automotive","/pharmacy":"MedhaMindsAI Pharmacy","/institutions":"MedhaMindsAI Institutions","/enterprise":"MedhaMindsAI Enterprise","/kids":"MedhaMindsAI Kids"};function i(){return(0,t.jsx)("svg",{viewBox:"0 0 24 24",width:"22",height:"22",fill:"white","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.
22198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})}function o(){return(0,t.jsxs)("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"2",y:"4",width:"20",height:"16",rx:"3"}),(0,t.jsx)("path",{d:"m2 7 10 7 10-7"})]})}e.s(["default",0,function(){let e=(0,r.usePathname)(),[l,d]=(0,n.useState)(!1);(0,n.useEffect)(()=>{d(!1)},[e]),(0,n.useEffect)(()=>{function e(e){"Escape"===e.key&&d(!1)}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);let{whatsapp:c,subject:u,body:h}=function(e){let t,n=(t=new Date(Date.now()+6e4*new Date().getTimezoneOffset()+198e5).getHours())>=5&&t<12?"Good morning":t>=12&&t<17?"Good afternoon":"Good evening",r=a[e];if(r){let e=`${n}. I visited medhaminds.ai and I'm exploring ${r} for my business. I'd like to connect with your team.`;return{whatsapp:e,subject:`Enquiry â ${r}`,body:`${n}, 23 24I visited medhaminds.ai and I'm exploring ${r} for my business. 25 26I'd like to connect with your team to understand how this can work for us. 27 28Please reach out at your earliest convenience. 29 30Thank you.`}}return{whatsapp:`${n}. I visited medhaminds.ai and would like to learn more about MedhaMindsAI. Please connect me with the right person.`,subject:"General Enquiry â MedhaMindsAI",body:`${n}, 31 32I visited medhaminds.ai and would like to learn more about MedhaMindsAI. 33 34Please connect me with the right person from your team. 35 36Thank you.`}}(e),x=`https://wa.me/917004010734?text=${encodeURIComponent(c)}`,m=`mailto:[email protected]?subject=${encodeURIComponent(u)}&body=${encodeURIComponent(h)}`;return(0,t.jsxs)("div",{className:"fixed bottom-[118px] right-7 z-40 flex flex-col items-center gap-3","aria-label":"Contact options",children:[(0,t.jsx)("a",{href:m,"aria-label":"Send us an email",title:"Email MedhaMindsAI",style:{transform:l?"translateY(0) scale(1)":"translateY(20px) scale(0.7)",opacity:+!!l,pointerEvents:l?"auto":"none",transition:"transform 0.25s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s ease",transitionDelay:l?"0.08s":"0s"},className:"flex h-12 w-12 items-center justify-center rounded-full border border-cyan-400/30 bg-cyan-500 shadow-[0_4px_20px_rgba(34,211,238,0.35)] transition-all duration-200 hover:bg-cyan-400 hover:shadow-[0_4px_24px_rgba(34,211,238,0.5)]",children:(0,t.jsx)(o,{})}),(0,t.jsx)("a",{href:x,target:"_blank",rel:"noopener noreferrer","aria-label":"Chat on WhatsApp",title:"WhatsApp MedhaMindsAI",style:{transform:l?"translateY(0) scale(1)":"translateY(12px) scale(0.7)",opacity:+!!l,pointerEvents:l?"auto":"none",transition:"transform 0.25s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s ease",transitionDelay:l?"0.04s":"0s",backgroundColor:"#25D366"},className:"flex h-12 w-12 items-center justify-center rounded-full border border-green-500/30 shadow-[0_4px_20px_rgba(37,211,102,0.35)] transition-all duration-200 hover:shadow-[0_4px_24px_rgba(37,211,102,0.5)]",children:(0,t.jsx)(i,{})}),(0,t.jsx)("button",{onClick:()=>d(e=>!e),"aria-label":l?"Close contact options":"Open contact options","aria-expanded":l,className:"flex h-12 w-12 items-center justify-center rounded-full border border-cyan-400/30 bg-[#020617] text-cyan-300 shadow-[0_4px_20px_rgba(34,211,238,0.2)] transition-all duration-200 hover:border-cyan-400/60 hover:shadow-[0_4px_24px_rgba(34,211,238,0.35)]",children:(0,t.jsx)("span",{style:{display:"flex",transform:l?"rotate(45deg)":"rotate(0deg)",transition:"transform 0.25s cubic-bezier(0.34,1.56,0.64,1)"},children:(0,t.jsx)(s,{size:22})})})]})}],95848)}]);
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.