1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6676],{46676:(e,t,a)=>{a.r(t),a.d(t,{StepReport:()=>U});var s=a(95155),i=a(12115),l=a(28633),n=a(77504),r=a(70865),o=a(46967),c=a(40767),d=a(93518),x=a(43831),m=a(66889),h=a(31609),p=a(98867);function u(e){let{currentStep:t,totalSteps:a,stepLabels:i,onStepClick:l}=e,r=e=>{e<=t&&l&&l(e)};return(0,s.jsx)("div",{className:"w-full mb-6 px-2",children:(0,s.jsxs)("div",{className:"flex items-start justify-between relative",children:[(0,s.jsxs)("div",{className:"absolute top-5 left-0 right-0 h-1 mx-8",children:[(0,s.jsx)("div",{className:"w-full h-full bg-gray-200 rounded-full"}),(0,s.jsx)(n.P.div,{className:"absolute top-0 left-0 h-full bg-gradient-to-r from-[#06D6A0] to-[#1B9AAA] rounded-full",initial:{width:"0%"},animate:{width:"".concat((t-1)/(a-1)*100,"%")},transition:{duration:.5,ease:"easeOut"}})]}),Array.from({length:a}).map((e,l)=>{let o=l+1,c=o<t,d=o===t,x=o<=t;return(0,s.jsxs)("div",{className:"flex flex-col items-center z-10",style:{width:"".concat(100/a,"%")},children:[(0,s.jsxs)(n.P.button,{onClick:()=>r(o),disabled:!x,className:"relative w-10 h-10 rounded-full flex items-center justify-center font-black text-sm transition-all ".concat(c?"bg-[#06D6A0] text-white cursor-pointer hover:scale-110 hover:shadow-lg hover:shadow-[#06D6A0]/40":d?"bg-gradient-to-br from-[#1B9AAA] to-[#06D6A0] text-white shadow-lg shadow-[#1B9AAA]/40":"bg-gray-200 text-gray-400 cursor-not-allowed"),initial:!1,animate:d?{scale:[1,1.05,1]}:{},transition:{duration:.5},whileHover:x&&!d?{scale:1.15}:{},whileTap:x?{scale:.95}:{},children:[c?(0,s.jsx)(p.A,{className:"w-5 h-5",strokeWidth:3}):o,d&&(0,s.jsx)(n.P.div,{className:"absolute inset-0 rounded-full border-2 border-[#1B9AAA]",animate:{scale:[1,1.5],opacity:[.6,0]},transition:{duration:1.5,repeat:1/0}})]}),(0,s.jsx)("button",{onClick:()=>r(o),disabled:!x,className:"mt-2 text-[11px] sm:text-xs font-bold text-center leading-tight transition-all ".concat(d?"text-[#1B9AAA]":c?"text-[#06D6A0] hover:underline cursor-pointer":"text-gray-400 cursor-not-allowed"),children:i[l]})]},l)})]})})}let g=[{icon:"\uD83D\uDD0D",text:"Analizzando le tue recensioni...",color:"from-blue-500 to-cyan-500"},{icon:"â¡",text:"Calcolando la velocit\xe0 settimanale...",color:"from-cyan-500 to-teal-500"},{icon:"\uD83D\uDCCA",text:"Confrontando con i competitor...",color:"from-teal-500 to-emerald-500"},{icon:"\uD83C\uDFAF",text:"Preparando il tuo report...",color:"from-emerald-500 to-green-500"}];function f(e){let{onComplete:t,isComplete:a}=e,[l,r]=(0,i.useState)(0),[o,c]=(0,i.useState)(0);(0,i.useEffect)(()=>{if(a){c(100),r(g.length-1);return}let e=setInterval(()=>{r(e=>e<g.length-1?e+1:e)},2500),t=setInterval(()=>{c(e=>e<90?e+3*Math.random()+1:e)},200);return()=>{clearInterval(e),clearInterval(t)}},[a]),(0,i.useEffect)(()=>{if(a&&o>=100&&t){let e=setTimeout(t,500);return()=>clearTimeout(e)}},[a,o,t]);let d=g[l];return(0,s.jsxs)(n.P.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"fixed inset-0 z-50 flex items-center justify-center bg-gradient-to-br from-gray-900 via-gray-800 to-gray-900",children:[(0,s.jsx)("div",{className:"absolute inset-0 overflow-hidden",children:(0,s.jsx)(n.P.div,{animate:{scale:[1,1.2,1],rotate:[0,180,360]},transition:{duration:20,repeat:1/0,ease:"linear"},className:"absolute -top-1/2 -left-1/2 w-[200%] h-[200%] opacity-30",style:{background:"conic-gradient(from 0deg, #1B9AAA, #06D6A0, #FFD166, #EF476F, #1B9AAA)"}})}),(0,s.jsxs)("div",{className:"relative z-10 max-w-md mx-auto px-6 text-center",children:[(0,s.jsx)(n.P.div,{initial:{scale:0,rotate:-180},animate:{scale:1,rotate:0},transition:{type:"spring",damping:10,stiffness:100},className:"mb-8",children:(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-24 h-24 rounded-3xl bg-gradient-to-br ".concat(d.color," shadow-2xl"),children:(0,s.jsx)("span",{className:"text-5xl",children:d.icon})})},l),(0,s.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 -z-10",children:[1,2,3].map(e=>(0,s.jsx)(n.P.div,{animate:{scale:[1,2.5],opacity:[.5,0]},transition:{duration:2,repeat:1/0,delay:.4*e,ease:"easeOut"},className:"absolute w-24 h-24 rounded-full border-2 border-white/30",style:{left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},e))}),(0,s.jsx)(n.P.h2,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},transition:{duration:.5},className:"text-xl font-bold text-white mb-6",children:d.text},"text-".concat(l)),(0,s.jsxs)("div",{className:"relative h-2 bg-white/10 rounded-full overflow-hidden mb-4",children:[(0,s.jsx)(n.P.div,{initial:{width:0},animate:{width:"".concat(Math.min(o,100),"%")},transition:{duration:.3},className:"absolute inset-y-0 left-0 bg-gradient-to-r ".concat(d.color," rounded-full")}),(0,s.jsx)(n.P.div,{animate:{x:["-100%","200%"]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"},className:"absolute inset-y-0 w-1/3 bg-gradient-to-r from-transparent via-white/30 to-transparent"})]}),(0,s.jsxs)(n.P.p,{className:"text-sm text-white/60 font-medium",animate:{opacity:[.5,1,.5]},transition:{duration:2,repeat:1/0},children:[Math.round(Math.min(o,100)),"% completato"]}),(0,s.jsx)("p",{className:"mt-6 text-xs text-white/40",children:"Stiamo raccogliendo dati in tempo reale da Google Maps"}),[...Array(6)].map((e,t)=>(0,s.jsx)(n.P.div,{animate:{y:[-20,20,-20],x:[0,20*Math.random()-10,0],opacity:[.3,.7,.3]},transition:{duration:3+2*Math.random(),repeat:1/0,delay:.5*t},className:"absolute w-2 h-2 rounded-full bg-white/20",style:{left:"".concat(15+15*t,"%"),top:"".concat(20+60*Math.random(),"%")}},t))]})]})}var b=a(35765),j=a(36527),v=a(21773),N=a(51719);let y="https://menuchat-backend.onrender.com",w={chat_gpt:{label:"ChatGPT",short:"GPT",color:"#10A37F",bg:"#0F1A17"},perplexity:{label:"Perplexity",short:"PPLX",color:"#20B8CD",bg:"#0E1B1E"},gemini:{label:"Gemini",short:"GEM",color:"#4E8DF5",bg:"#101826"}},A=e=>w[e]||{label:e,short:e.slice(0,3).toUpperCase(),color:"#6B7280",bg:"#111827"};function k(e){return e.toLowerCase().normalize("NFD").replace(/[Ì-ͯ]/g,"").replace(/[^a-z0-9\s]/g," ").replace(/\s+/g," ").trim()}let D=new Set(["ristorante","trattoria","osteria","pizzeria","bar","caffe","bistrot","il","lo","la","i","gli","le","da","di","del","della","dei","delle","al","alla","the","restaurant","e","and"]);function C(e,t){let a=k(e),s=k(t);if(!a||!s)return!1;if(a===s||a.length>=6&&s.length>=6&&(a.includes(s)||s.includes(a)))return!0;let i=a.split(" ").filter(e=>e.length>1&&!D.has(e)),l=s.split(" ").filter(e=>e.length>1&&!D.has(e));if(!i.length||!l.length)return!1;let[n,r]=i.length<=l.length?[i,l]:[l,i];return n.filter(e=>r.includes(e)).length/n.length>=.6}function P(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function S(e){let{text:t,places:a,restaurantName:l,userPosition:n}=e,r=(0,i.useMemo)(()=>{let e=a.map(e=>e.name).filter(e=>e&&e.length>2),i=new Set;n&&a[n-1]&&i.add(a[n-1].name),e.forEach(e=>{C(e,l)&&i.add(e)});let r=Array.from(new Set([...e,l])).filter(Boolean).sort((e,t)=>t.length-e.length);if(!r.length)return[t];let o=RegExp("(".concat(r.map(P).join("|"),")"),"gi"),c=[];return t.split(o).forEach((e,t)=>{if(!e)return;let a=r.find(t=>t.toLowerCase()===e.toLowerCase());if(!a){c.push(e);return}let n=i.has(a)||C(a,l);c.push((0,s.jsx)("mark",{className:"rounded px-1 font-bold ".concat(n?"bg-emerald-400/30 text-emerald-200":"bg-[#EF476F]/25 text-[#FF8FA8]"),children:e},t))}),c},[t,a,l,n]);return(0,s.jsx)(s.Fragment,{children:r})}function I(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],[t,a]=(0,i.useState)(null),s=(0,i.useRef)(0),l=(0,i.useRef)(!1),n=!!t&&["completed","error","disabled"].includes(t.status),r=sessionStorage.getItem("rank_checker_token");(0,i.useEffect)(()=>{if(!e||!r||n)return;let t=!1,i=async()=>{try{let e=await fetch("".concat(y,"/api/rank-checker/ai-visibility/").concat(r)),s=await e.json();if(t)return;if(!s.success&&404===e.status){a({status:"error",error:"Lead non trovato"});return}a(s),"not_started"!==s.status||l.current||(l.current=!0,fetch("".concat(y,"/api/rank-checker/ai-visibility"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:r})}).catch(()=>{}))}catch(e){}};i();let o=setInterval(()=>{if(s.current+=1,s.current>=50){clearInterval(o),a(e=>e&&"completed"===e.status?e:{...e||{status:"error"},status:"error",error:"timeout"});return}i()},4e3);return()=>{t=!0,clearInterval(o)}},[e,r,n]);let o=async()=>
1{if(r){l.current=!0,a({status:"processing",prompts:null==t?void 0:t.prompts}),s.current=0;try{await fetch("".concat(y,"/api/rank-checker/ai-visibility"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:r,force:!0})})}catch(e){}}};return{data:t,retry:o}}function T(e){let{providerKey:t,small:a}=e,i=A(t);return(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full font-bold ".concat(a?"px-2 py-0.5 text-[10px]":"px-2.5 py-1 text-xs"),style:{backgroundColor:"".concat(i.color,"22"),color:i.color},children:[(0,s.jsx)("span",{className:"inline-block w-1.5 h-1.5 rounded-full",style:{backgroundColor:i.color}}),i.label]})}function E(){return(0,s.jsx)("span",{className:"inline-flex gap-1 items-center h-4","aria-label":"sta scrivendo",children:[0,1,2].map(e=>(0,s.jsx)(n.P.span,{className:"w-1.5 h-1.5 rounded-full bg-gray-400",animate:{opacity:[.3,1,.3]},transition:{duration:1,repeat:1/0,delay:.2*e}},e))})}function M(e){let{providerKey:t,question:a,answer:l,places:n=[],restaurantName:r,userPosition:o,datetime:c,model:d,animate:x=!0,loading:m,errorText:h,sources:p}=e,u=A(t),g=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:18,l=function(){let[e,t]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{var e;if(!window.matchMedia)return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");t(a.matches);let s=e=>t(e.matches);return null===(e=a.addEventListener)||void 0===e||e.call(a,"change",s),()=>{var e;return null===(e=a.removeEventListener)||void 0===e?void 0:e.call(a,"change",s)}},[]),e}(),[n,r]=(0,i.useState)(l||!t?e.length:0),o=(0,i.useRef)(e);return(0,i.useEffect)(()=>{if(o.current!==e&&(o.current=e,r(l||!t?e.length:0)),l||!t){r(e.length);return}if(n>=e.length)return;let i=setInterval(()=>r(t=>Math.min(e.length,t+a)),s);return()=>clearInterval(i)},[e,t,l,n,a,s]),{visible:e.slice(0,n),done:n>=e.length,skip:()=>r(e.length)}}((0,i.useMemo)(()=>(l||"").replace(/\(\[[^\]]*\]\([^)]*\)\)/g,"").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/\[\d+\]/g,"").replace(/\*\*([^*]+)\*\*/g,"$1").replace(/^#+\s*/gm,"").replace(/^\s*[-*]\s+/gm,"⢠").replace(/[ \t]+\n/g,"\n").replace(/\n{3,}/g,"\n\n").trim(),[l]),x&&!m),f=function(e){if(!e)return"";let t=new Date(e.replace(" +00:00","Z").replace(" ","T"));return isNaN(t.getTime())?"":t.toLocaleDateString("it-IT",{day:"numeric",month:"long"})+" alle "+t.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"})}(c);return(0,s.jsxs)("div",{className:"rounded-3xl overflow-hidden shadow-xl",style:{backgroundColor:u.bg},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-white/10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"w-6 h-6 rounded-full grid place-items-center text-[10px] font-black text-white",style:{backgroundColor:u.color},children:u.short.slice(0,1)}),(0,s.jsx)("span",{className:"text-sm font-bold text-white",children:u.label}),d&&(0,s.jsx)("span",{className:"text-[10px] text-white/40 font-mono hidden sm:inline",children:d})]}),(0,s.jsx)("span",{className:"text-[10px] text-white/50",children:m?"in corso":f?"risposta reale \xb7 ".concat(f):"risposta reale"})]}),(0,s.jsxs)("div",{className:"p-4 space-y-3",children:[(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)("div",{className:"max-w-[88%] rounded-2xl rounded-br-sm bg-white/10 text-white text-sm px-3.5 py-2.5 leading-relaxed",children:a})}),(0,s.jsx)("div",{className:"flex justify-start",children:(0,s.jsxs)("div",{className:"max-w-[94%] rounded-2xl rounded-bl-sm bg-white/5 text-white/90 text-sm px-3.5 py-2.5 leading-relaxed whitespace-pre-line",onClick:g.skip,children:[m&&(0,s.jsx)(E,{}),!m&&h&&(0,s.jsxs)("span",{className:"text-white/60 italic",children:["Nessuna risposta (",h,")"]}),!m&&!h&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(S,{text:g.visible,places:n,restaurantName:r,userPosition:o}),!g.done&&(0,s.jsx)("span",{className:"inline-block w-1.5 h-4 ml-0.5 align-middle bg-white/70 animate-pulse"})]})]})}),p&&p.length>0&&g.done&&(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5 pt-1",children:p.slice(0,4).map((e,t)=>(0,s.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[10px] text-white/50 hover:text-white/80 bg-white/5 rounded-full px-2 py-0.5",children:[(0,s.jsx)(b.A,{className:"w-3 h-3"}),(e.title||e.url).replace(/^https?:\/\/(www\.)?/,"").slice(0,28)]},t))})]})]})}function z(e){var t,a,i;let{restaurantName:l}=e,{data:r}=I(!0);if(!r||"disabled"===r.status||"error"===r.status)return null;let o=(null===(t=r.prompts)||void 0===t?void 0:t.find(e=>"generic"===e.id))||(null===(a=r.prompts)||void 0===a?void 0:a[0]),c=(null===(i=r.summary)||void 0===i?void 0:i.teaser)||null,d="completed"!==r.status;if(d&&!o)return null;let x=c?c.userMentioned?"Sei nella risposta".concat(c.userPosition?", al ".concat(c.userPosition,"\xb0 posto"):"","."):"".concat(A(c.provider).label," ha consigliato ").concat(c.places.length||"altri"," locali. Tu non ci sei."):null;return(0,s.jsxs)(n.P.div,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},transition:{duration:.5},className:"space-y-3",children:[(0,s.jsxs)("div",{className:"text-center px-2",children:[(0,s.jsx)("p",{className:"text-xs font-bold uppercase tracking-wider text-[#117D8C] mb-1",children:"Non solo Google Maps"}),(0,s.jsx)("h3",{className:"text-lg sm:text-xl font-black text-gray-900 leading-tight",children:"E chi lo chiede a ChatGPT?"}),(0,s.jsx)("p",{className:"text-xs text-gray-600 mt-1",children:"Abbiamo fatto la domanda che fanno i tuoi clienti. Questa \xe8 la risposta, parola per parola."})]}),(0,s.jsx)(M,{providerKey:(null==c?void 0:c.provider)||"chat_gpt",question:(null==c?void 0:c.question)||(null==o?void 0:o.text)||"",answer:null==c?void 0:c.text,places:(null==c?void 0:c.places)||[],restaurantName:l,userPosition:null==c?void 0:c.userPosition,datetime:null==c?void 0:c.datetime,model:null==c?void 0:c.model,loading:d}),x&&(0,s.jsxs)(n.P.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.3},className:"rounded-2xl px-4 py-3 text-center text-sm font-bold ".concat((null==c?void 0:c.userMentioned)?"bg-emerald-100 text-emerald-800":"bg-[#EF476F]/10 text-[#C2185B]"),children:[x,(0,s.jsx)("span",{className:"block text-[11px] font-medium opacity-80 mt-0.5",children:r.summary?"Su ".concat(r.summary.answeredCount," risposte di ").concat(r.summary.providers.filter(e=>e.answered).length," AI, sei citato ").concat(r.summary.userMentions," volte."):""})]}),d&&(0,s.jsx)("p",{className:"text-[11px] text-center text-gray-500",children:"Stiamo facendo 5 domande a ChatGPT, Perplexity e Gemini. Ci vuole circa un minuto."})]})}function L(e){let{status:t}=e;return"ok"===t?(0,s.jsx)("span",{className:"w-6 h-6 rounded-full bg-emerald-100 text-emerald-700 grid place-items-center",children:(0,s.jsx)(p.A,{className:"w-3.5 h-3.5"})}):"ko"===t?(0,s.jsx)("span",{className:"w-6 h-6 rounded-full bg-[#EF476F]/15 text-[#EF476F] grid place-items-center",children:(0,s.jsx)(c.A,{className:"w-3.5 h-3.5"})}):"warn"===t?(0,s.jsx)("span",{className:"w-6 h-6 rounded-full bg-amber-100 text-amber-700 grid place-items-center",children:(0,s.jsx)(j.A,{className:"w-3.5 h-3.5"})}):(0,s.jsx)("span",{className:"w-6 h-6 rounded-full bg-gray-100 text-gray-400 grid place-items-center text-[10px] font-black",children:"?"})}let F={invisible:{title:"Le AI non ti conoscono",gradient:"from-red-500 to-red-700",emoji:"\uD83E\uDEE5"},weak:{title:"Le AI ti citano di rado",gradient:"from-orange-500 to-red-600",emoji:"\uD83D\uDE2C"},partial:{title:"Le AI ti citano, ma non sempre",gradient:"from-amber-500 to-orange-600",emoji:"\uD83E\uDD14"},strong:{title:"Le AI ti consigliano",gradient:"from-emerald-500 to-green-600",emoji:"\uD83C\uDFC6"},unknown:{title:"Risposta non disponibile",gradient:"from-gray-500 to-gray-700",emoji:"\uD83E\uDD37"}};function B(e){var t,a;let{restaurantName:l}=e,{data:r,retry:o}=I(!0),[c,d]=(0,i.useState)(null),[x,m]=(0,i.useState)(null),h=(null==r?void 0:r.prompts)||[],p=c||(null===(t=h[0])||void 0===t?void 0:t.id)||null;if(!r||"processing"===r.status||"not_started"===r.status)return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"bg-gradient-to-br from-[#1B9AAA] to-[#06D6A0] rounded-3xl p-6 shadow-xl text-white text-center",children:[(0,s.jsx)(n.P.div,{className:"text-5xl mb-3",animate:{rotate:[0,10,-10,0]},transition:{duration:2,repeat:1/0},children:"\uD83E\uDD16"}),(0,s.jsx)("h2",{className:"text-xl font-black",children:"Stiamo interrogando le AI"}),(0,s.jsx)("p",{className:"text-sm opacity-90 mt-1",children:"5 domande \xd7 ChatGPT, Perplexity e Gemini. Circa un minuto."})]}),h.length>0&&(0,s.jsxs)("div",{className:"bg-white rounded-3xl p-4 shadow-xl space-y-2",children:[(0,s.jsxs)("p",{className:"text-xs font-bold text-gray-500 uppercase tracking-wider",children:["Le domande scelte per ",l]}),h.map(e=>(0,s.jsxs)("div",{className:"flex items-start gap-3 py-2 border-t border-gray-100 first:border-0",children:[(0,s.jsx)(E,{}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-gray-900",children:e.text}),(0,s.jsx)("p",{className:"text-[11px] text-gray-500 mt-0.5",children:e.reason})]})]},e.id))]})]});if("disabled"===r.status)return(0,s.jsx)("div",{className:"bg-white rounded-3xl p-6 shadow-xl text-center",children:(0,s.jsx)("p",{className:"text-sm text-gray-700",children:"L'analisi sulle AI non \xe8 attiva per questo report."})});if("error"===r.status||!r.summary)return(0,s.jsxs)("div",{className:"bg-white rounded-3xl p-6 shadow-xl text-center space-y-3",children:[(0,s.jsx)("div",{className:"text-4xl",children:"\uD83D\uDE35â\uD83D\uDCAB"}),(0,s.jsx)("p",{className:"text-sm font-bold text-gray-900",children:"Non siamo riusciti a interrogare le AI"}),(0,s.jsxs)("p",{className:"text-xs text-gray-500",children:["timeout"===r.error?"Le AI stanno rispondendo lentamente.":"Errore temporaneo."," Puoi riprovare, oppure continuare con il report."]}),(0,s.jsxs)("button",{onClick:o,className:"inline-flex items-center gap-2 text-sm font-bold text-[#1B9AAA]",children:[(0,s.jsx)(v.A,{className:"w-4 h-4"})," Riprova"]})]});let u=r.summary,g=F[u.verdict]||F.unknown,f=r.answers||[],b=r.checklist||[],j=f.filter(e=>e.promptId===p),y=h.find(e=>e.id===p),w=Math.max(1,...u.sources.map(e=>e.count));return(0,s.jsxs)("div",{className:"space-y-5",children:[(0,s.jsxs)(n.P.div,{initial:{scale:.95,opacity:0}
1,animate:{scale:1,opacity:1},className:"bg-gradient-to-br ".concat(g.gradient," rounded-3xl p-5 shadow-xl text-white text-center"),children:[(0,s.jsx)("div",{className:"text-6xl mb-2",children:g.emoji}),(0,s.jsx)("p",{className:"text-sm font-bold opacity-80",children:"Se lo chiedono a ChatGPT, Perplexity o Gemini"}),(0,s.jsx)("h2",{className:"text-2xl sm:text-3xl font-black mt-1 leading-tight",children:g.title}),(0,s.jsxs)("p",{className:"text-5xl font-black mt-4",children:[u.userMentions,(0,s.jsxs)("span",{className:"text-2xl opacity-80",children:["/",u.answeredCount]})]}),(0,s.jsxs)("p",{className:"text-xs opacity-80 mt-1",children:["risposte in cui compare ",l]}),r.fromCache&&(0,s.jsx)("p",{className:"text-[10px] opacity-60 mt-2",children:"Analisi degli ultimi 7 giorni sullo stesso locale"})]}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-2",children:u.providers.map(e=>{let t=A(e.key),a=e.mentioned>0;return(0,s.jsxs)("div",{className:"bg-white rounded-2xl p-3 shadow-lg text-center",children:[(0,s.jsx)(T,{providerKey:e.key,small:!0}),(0,s.jsx)("p",{className:"text-2xl font-black mt-2 ".concat(0===e.answered?"text-gray-300":a?"text-emerald-600":"text-[#EF476F]"),children:0===e.answered?"â":"".concat(e.mentioned,"/").concat(e.answered)}),(0,s.jsx)("p",{className:"text-[10px] text-gray-500 leading-tight",children:0===e.answered?"non ha risposto":a?e.bestPosition?"al meglio ".concat(e.bestPosition,"\xb0"):"citato":"mai citato"}),(0,s.jsx)("span",{className:"sr-only",children:t.label})]},e.key)})}),(0,s.jsxs)("div",{className:"bg-white rounded-3xl p-4 shadow-xl",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,s.jsx)("div",{className:"text-2xl",children:"\uD83E\uDD47"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"text-lg font-black text-gray-900",children:"Chi consigliano le AI"}),(0,s.jsxs)("p",{className:"text-xs text-gray-500",children:["Citazioni su ",u.answeredCount," risposte alle stesse 5 domande"]})]})]}),(0,s.jsx)("div",{className:"space-y-2",children:u.podium.map((e,t)=>(0,s.jsx)("div",{className:"rounded-2xl p-3 ".concat(e.isUser?"bg-gradient-to-r from-[#1B9AAA] to-[#06D6A0] shadow-lg":"bg-gray-50"),children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex-shrink-0 w-9 h-9 rounded-xl grid place-items-center font-black text-sm ".concat(e.isUser?"bg-white/20 text-white":0===e.mentions?"bg-gray-200 text-gray-500":"bg-gray-800 text-white"),children:0===e.mentions?"â":"#".concat(t+1)}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("p",{className:"font-bold text-sm truncate ".concat(e.isUser?"text-white":"text-gray-900"),children:e.name}),e.isUser&&(0,s.jsx)("span",{className:"flex-shrink-0 text-[10px] font-black bg-white text-[#1B9AAA] px-2 py-0.5 rounded-full uppercase",children:"Tu"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[e.providers.map(e=>(0,s.jsx)(T,{providerKey:e,small:!0},e)),0===e.providers.length&&(0,s.jsx)("span",{className:"text-[11px] ".concat(e.isUser?"text-white/80":"text-gray-400"),children:"nessuna AI ti ha nominato"})]})]}),(0,s.jsxs)("div",{className:"text-right flex-shrink-0",children:[(0,s.jsx)("p",{className:"text-xl font-black ".concat(e.isUser?"text-white":"text-gray-900"),children:e.mentions}),(0,s.jsx)("p",{className:"text-[10px] ".concat(e.isUser?"text-white/80":"text-gray-500"),children:"citazioni"})]})]})},"".concat(e.name,"-").concat(t)))})]}),(0,s.jsxs)("div",{className:"bg-white rounded-3xl p-4 shadow-xl space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"text-2xl",children:"\uD83D\uDCAC"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-black text-gray-900",children:"Cosa dicono di te"}),(0,s.jsx)("p",{className:"text-xs text-gray-500",children:"Parole delle AI, non nostre"})]})]}),u.userQuote?(0,s.jsxs)("blockquote",{className:"border-l-4 border-emerald-400 bg-emerald-50 rounded-r-2xl px-4 py-3",children:[(0,s.jsxs)("p",{className:"text-sm text-gray-900 italic",children:["â",u.userQuote.text,"â"]}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(T,{providerKey:u.userQuote.provider,small:!0})})]}
1):(0,s.jsxs)("div",{className:"border-l-4 border-[#EF476F] bg-[#EF476F]/5 rounded-r-2xl px-4 py-3",children:[(0,s.jsxs)("p",{className:"text-sm font-bold text-gray-900",children:["Di ",l," le AI non hanno niente da dire."]}),(0,s.jsx)("p",{className:"text-xs text-gray-600 mt-1",children:"Non \xe8 un giudizio: non trovano materiale recente su di te nelle fonti che leggono."})]}),u.leaderQuote&&!(null===(a=u.podium[0])||void 0===a?void 0:a.isUser)&&(0,s.jsxs)("div",{className:"pt-1",children:[(0,s.jsxs)("p",{className:"text-[11px] font-bold text-gray-500 uppercase tracking-wider mb-1",children:["Invece di ",u.leaderQuote.name," dicono"]}),(0,s.jsxs)("blockquote",{className:"border-l-4 border-gray-300 bg-gray-50 rounded-r-2xl px-4 py-3",children:[(0,s.jsxs)("p",{className:"text-sm text-gray-800 italic",children:["â",u.leaderQuote.text,"â"]}),u.leaderQuote.provider&&(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(T,{providerKey:u.leaderQuote.provider,small:!0})})]})]})]}),u.sources.length>0&&(0,s.jsxs)("div",{className:"bg-white rounded-3xl p-4 shadow-xl",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,s.jsx)("div",{className:"text-2xl",children:"\uD83D\uDCDA"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-black text-gray-900",children:"Da dove prendono i nomi"}),(0,s.jsxs)("p",{className:"text-xs text-gray-500",children:["Le fonti citate nelle ",u.answeredCount," risposte. \xc8 qui che devi essere forte."]})]})]}),(0,s.jsx)("div",{className:"space-y-2",children:u.sources.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("p",{className:"w-28 text-xs font-bold text-gray-800 truncate",children:e.label}),(0,s.jsx)("div",{className:"flex-1 h-2.5 bg-gray-100 rounded-full overflow-hidden",children:(0,s.jsx)(n.P.div,{className:"h-full bg-gradient-to-r from-[#1B9AAA] to-[#06D6A0] rounded-full",initial:{width:0},animate:{width:"".concat(e.count/w*100,"%")},transition:{duration:.6}})}),(0,s.jsx)("p",{className:"w-6 text-right text-xs font-black text-gray-700 tabular-nums",children:e.count})]},e.label))})]}),b.length>0&&(0,s.jsxs)("div",{className:"bg-white rounded-3xl p-4 shadow-xl",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,s.jsx)("div",{className:"text-2xl",children:"\uD83E\uDDFE"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-black text-gray-900",children:"Cosa manca perch\xe9 ti citino"}),(0,s.jsx)("p",{className:"text-xs text-gray-500",children:"Calcolato sui tuoi dati, non una lista generica"})]})]}),(0,s.jsx)("div",{className:"space-y-1",children:b.map(e=>(0,s.jsxs)("div",{className:"flex items-start gap-3 py-2.5 border-t border-gray-100 first:border-0",children:[(0,s.jsx)(L,{status:e.status}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("p",{className:"text-sm font-bold text-gray-900",children:e.label}),e.value&&(0,s.jsx)("span",{className:"text-[11px] font-mono bg-gray-100 text-gray-700 px-1.5 py-0.5 rounded",children:e.value}),e.menuchat&&"ok"!==e.status&&(0,s.jsx)("span",{className:"text-[10px] font-black uppercase text-[#1B9AAA] bg-[#1B9AAA]/10 px-1.5 py-0.5 rounded-full",children:"lo risolve MenuChat"})]}),(0,s.jsx)("p",{className:"text-xs text-gray-600 mt-0.5",children:e.why})]})]},e.id))})]}),h.length>0&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"text-center px-2",children:[(0,s.jsx)("h3",{className:"text-lg font-black text-gray-900",children:"Le 5 domande, risposta per risposta"}),(0,s.jsx)("p",{className:"text-xs text-gray-500",children:"Le rifaremo identiche tra 14 giorni: cos\xec si misura la differenza."})]}),(0,s.jsx)("div",{className:"flex gap-2 overflow-x-auto pb-1 -mx-1 px-1",children:h.map(e=>{let t=f.filter(t=>t.promptId===e.id&&t.userMentioned).length,a=e.id===p;return(0,s.jsxs)("button",{onClick:()=>{d(e.id),m(null)},className:"flex-shrink-0 rounded-full px-3 py-1.5 text-xs font-bold border-2 transition-all ".concat(a?"bg-[#1B9AAA] border-[#1B9AAA] text-white":"bg-white border-gray-200 text-gray-700"),children:["en"===e.language?"\uD83C\uDDEC\uD83C\uDDE7 ":"",e.intent,(0,s.jsxs)("span",{className:"ml-1.5 ".concat(a?"text-white/80":t?"text-emerald-600":"text-[#EF476F]"),children:[t,"/",f.filter(t=>t.promptId===e.id&&!t.error).length]})]},e.id)})}),y&&(0,s.jsxs)("div",{className:"bg-white rounded-2xl p-3.5 shadow-lg",children:[(0,s.jsxs)("p",{className:"text-sm font-bold text-gray-900",children:["â",y.text,"â"]}),(0,s.jsxs)("p",{className:"text-[11px] text-gray-500 mt-1",children:["Perch\xe9 questa domanda: ",y.reason]})]}),(0,s.jsx)("div",{className:"space-y-2",children:j.map(e=>{let t="".concat(e.promptId,"-").concat(e.provider),a=x===t,i=A(e.provider);return(0,s.jsxs)("div",{className:"rounded-2xl overflow-hidden shadow-lg",children:[(0,s.jsxs)("button",{onClick:()=>m(a?null:t),className:"w-full flex items-center justify-between px-4 py-3 bg-white",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(T,{providerKey:e.provider}),(0,s.jsx)("span",{className:"text-xs font-bold ".concat(e.error?"text-gray-400":e.userMentioned?"text-emerald-600":"text-[#EF476F]"),children:e.error?"nessuna risposta":e.userMentioned?"ti cita".concat(e.userPosition?" al ".concat(e.userPosition,"\xb0 posto"):""):"consiglia ".concat(e.places.length," locali, non te")})]}),(0,s.jsx)(N.A,{className:"w-4 h-4 text-gray-400 transition-transform ".concat(a?"rotate-180":"")})]}),a&&(0,s.jsx)("div",{className:"p-2 bg-gray-50",children:(0,s.jsx)(M,{providerKey:e.provider,question:(null==y?void 0:y.text)||"",answer:e.text,places:e.places,restaurantName:l,userPosition:e.userPosition,datetime:e.datetime,model:e.model,animate:!1,errorText:e.error,sources:e.sources})}),(0,s.jsx)("span",{className:"sr-only",children:i.label})]},t)})})]}),(0,s.jsx)("p",{className:"text-[10px] text-gray-400 text-center px-4",children:"Risposte generate dalle AI tramite le loro API ufficiali, con ricerca web attiva sull'Italia. Le risposte variano da una domanda all'altra: per questo mostriamo quante volte compari, non un verdetto assoluto."})]})}let R=["Classifica","Le AI","Perch\xe9","Recensioni","Soluzione","Offerta"],O=[{id:"volume",emoji:"\uD83D\uDCCA",title:"Volume: La Soglia Critica",gradient:"from-blue-500 to-indigo-600",keyPoint:"Minimo 10 recensioni per essere considerati",content:[{icon:"\uD83C\uDFAF",text:'Google usa 10 recensioni come "soglia di validit\xe0 minima"'},{icon:"\uD83D\uDCC8",text:'Sotto questa soglia, sei in un "limbo algoritmico"'},{icon:"\uD83C\uDFC6",text:"I ristoranti nel Local Pack hanno mediamente 400+ recensioni"},{icon:"â¡",text:'Il volume funge da "ammortizzatore" contro le negative'}]},{id:"frequency",emoji:"â±ï¸",title:"Frequenza: Il Battito Cardiaco",gradient:"from-emerald-500 to-teal-600",keyPoint:"2-5 nuove recensioni a settimana = segnale di salute",content:[{icon:"\uD83D\uDCC9",text:'Le recensioni "decadono": una di 3 anni fa pesa quasi zero'},{icon:"\uD83D\uDD04",text:"Un flusso costante previene il crollo del ranking"},{icon:"â ï¸",text:"Picchi improvvisi (50 in un giorno) = trigger antispam!"},{icon:"â
",text:"La costanza batte il volume totale nel 2024"}]},{id:"rating",emoji:"â",title:"Rating: La Soglia del 4.0",gradient:"from-
1amber-500 to-orange-600",keyPoint:"Sotto 4.0 stelle = escluso dai filtri utente",content:[{icon:"\uD83D\uDEAB",text:"71% degli utenti ignora attivit\xe0 sotto 3 stelle"},{icon:"\uD83C\uDF9Aï¸",text:'Filtro "4 stelle+" ti rende INVISIBILE se sei a 3.9'},{icon:"\uD83D\uDCA1",text:"La fascia ideale \xe8 4.2-4.8 (autentico ma eccellente)"},{icon:"\uD83D\uDD04",text:"Rating basso â meno clic â ranking peggiore (loop)"}]},{id:"keywords",emoji:"\uD83D\uDD24",title:"Keywords: Le Parole Contano",gradient:"from-purple-500 to-pink-600",keyPoint:"Le parole dei clienti diventano tue keyword",content:[{icon:"\uD83D\uDD0D",text:'"Miglior carbonara" nelle recensioni = ranking per quella ricerca'},{icon:"\uD83D\uDCDD",text:"Recensioni dettagliate valgono 10x quelle con solo stelle"},{icon:"\uD83C\uDFF7ï¸",text:'Google estrae "entit\xe0" (Cibo, Servizio) e le valuta'},{icon:"\uD83D\uDCAC",text:"Stimola menzioni di piatti specifici!"}]},{id:"photos",emoji:"\uD83D\uDCF8",title:"Foto: Il Fattore Emergente",gradient:"from-rose-500 to-red-600",keyPoint:"Recensioni con foto hanno priorit\xe0 di visualizzazione",content:[{icon:"\uD83D\uDC41ï¸",text:"Google mostra PRIMA le recensioni con foto"},{icon:"â°",text:"Le foto aumentano il tempo sul profilo (Dwell Time)"},{icon:"\uD83E\uDD16",text:"Vision AI riconosce i piatti e li collega al menu"},{icon:"\uD83D\uDCCD",text:"Le foto confermano la visita fisica (anti-spam)"}]},{id:"responses",emoji:"\uD83D\uDCAC",title:"Risposte: Segnale di Attivit\xe0",gradient:"from-cyan-500 to-blue-600",keyPoint:"+41% conversione se rispondi alle recensioni",content:[{icon:"â
",text:"Google raccomanda di rispondere per migliorare il ranking"},{icon:"â¡",text:"Risposta entro 24-48h = massima efficacia"},{icon:"\uD83D\uDEAB",text:"Le keyword nelle risposte NON influenzano il SEO"},{icon:"\uD83E\uDD1D",text:"Il valore \xe8 nella relazione, non nel testo"}]}];function U(e){var t,a;let{data:p,keyword:g,leadData:b,onBookCall:j,onNewSearch:v,analysisId:N}=e,[y,w]=(0,i.useState)(1),[A,k]=(0,i.useState)("main"),[D,C]=(0,i.useState)(b.phone),[P,S]=(0,i.useState)(""),[I,T]=(0,i.useState)(""),[E,M]=(0,i.useState)(!1),[L,F]=(0,i.useState)(0),[U,G]=(0,i.useState)("reviews"),[q,V]=(0,i.useState)(!1),[Q,_]=(0,i.useState)(0),[H,K]=(0,i.useState)(p),[Z,$]=(0,i.useState)(!!N&&!p.reviewVelocity),[W,J]=(0,i.useState)(!N||!!p.reviewVelocity);(0,i.useEffect)(()=>{if(!N||W){console.log("\uD83D\uDCCA Polling SKIP: analysisId=",N,"pollingComplete=",W);return}console.log("\uD83D\uDCCA Avvio polling per analysisId:",N);let e=0,t=setInterval(async()=>{e++;try{let a=await fetch("".concat("https://menuchat-backend.onrender.com","/api/rank-checker/analysis/").concat(N)),s=await a.json();console.log("\uD83D\uDCCA Polling attempt ".concat(e,":"),s.status),"complete"===s.status?(console.log("â
Polling COMPLETE - reviewVelocity:",s.reviewVelocity),K(e=>({...e,reviewVelocity:s.reviewVelocity})),$(!1),J(!0),clearInterval(t)):"error"===s.status&&(console.error("â Polling ERROR:",s.error),$(!1),J(!0),clearInterval(t)),e>=30&&(console.warn("â ï¸ Polling TIMEOUT - max attempts reached"),$(!1),J(!0),clearInterval(t))}catch(e){console.error("â Polling fetch error:",e)}},2e3);return()=>clearInterval(t)},[N,W]);let[X,Y]=(0,i.useState)({days:5,hours:0,minutes:0,seconds:0});(0,i.useEffect)(()=>{let e=new Date;e.setDate(e.getDate()+5);let t=setInterval(()=>{let t=new Date,a=e.getTime()-t.getTime();if(a>0){let e=Math.floor(a/864e5);Y({days:e,hours:Math.floor(a%864e5/36e5),minutes:Math.floor(a%36e5/6e4),seconds:Math.floor(a%6e4/1e3)})}},1e3);return()=>clearInterval(t)},[]);let{userRestaurant:ee,competitors:et,mainResult:ea,strategicResults:es=[]}=H,ei=[{id:"main",name:(null==ea?void 0:ea.searchPointName)||"Dal tuo locale",icon:"\uD83C\uDFEA",rank:(null==ea?void 0:ea.rank)||ee.rank},...es.map((e,t)=>({id:"strategic-".concat(t),name:e.searchPointName,icon:e.searchPointIcon||"\uD83D\uDCCD",rank:e.rank}))],el=()=>{var e;return"main"===A?et:(null===(e=es[parseInt(A.replace("strategic-",""))])||void 0===e?void 0:e.competitors)||et},en="main"===A?(null==ea?void 0:ea.rank)||ee.rank:(null===(a=es[parseInt(A.replace("strategic-",""))])||void 0===a?void 0:a.rank)||"N/D",er=Math.round(26*b.dailyCovers*.08),eo=()=>{y<6&&(w(y+1),window.scrollTo({top:0,behavior:"smooth"}))};return Z?(0,s.jsx)(l.N,{children:(0,s.jsx)(f,{isComplete:W,onComplete:()=>$(!1)})}):(0,s.jsxs)("div",{className:"w-full max-w-lg mx-auto pb-32",children:[(0,s.jsx)("div",{className:"fixed top-0 left-0 right-0 z-50 bg-gradient-to-r from-[#1B9AAA]/5 via-white to-[#06D6A0]/5 backdrop-blur-lg border-b border-[#1B9AAA]/10 shadow-sm",children:(0,s.jsxs)("div",{className:"max-w-lg mx-auto px-4 py-3",children:[(0,s.jsx)(u,{currentStep:y,totalSteps:6,stepLabels:R,onStepClick:e=>{w(e),window.scrollTo({top:0,behavior:"smooth"})}}),4===y&&(0,s.jsxs)("div",{className:"flex items-center justify-center gap-3 mt-3 pt-3 border-t border-gray-200/50",children:[(0,s.jsx)("span",{className:"text-lg",children:"\uD83C\uDFC5"}),(0,s.jsxs)("div",{className:"flex bg-gray-100 rounded-xl p-1",children:[(0,s.jsx)("button",{onClick:()=>G("reviews"),className:"px-4 py-2 rounded-lg text-sm font-bold transition-all ".concat("reviews"===U?"bg-[#1B9AAA] text-white shadow-md":"text-gray-600 hover:text-gray-900"),children:"\uD83D\uDCDD Recensioni"}),(0,s.jsx)("button",{onClick:()=>G("rating"),className:"px-4 py-2 rounded-lg text-sm font-bold transition-all ".concat("rating"===U?"bg-[#1B9AAA] text-white shadow-md":"text-gray-600 hover:text-gray-900"),children:"â Rating"})]})]})]})}),(0,s.jsx)("div",{className:4===y?"h-32":"h-20"}),(0,s.jsxs)(l.N,{mode:"wait",children:[1===y&&(0,s.jsxs)(n.P.div,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.4},className:"space-y-5",children:[(()=>{var e;let t="number"==typeof en?en:99,a=t>20||"number"!=typeof en;return(0,s.jsxs)(n.P.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},className:"".concat(a?"bg-gradient-to-br from-red-500 to-red-700":t<=3?"bg-gradient-to-br from-emerald-500 to-green-600":t<=7?"bg-gradient-to-br from-[#1B9AAA] to-[#06D6A0]":t<=15?"bg-gradient-to-br from-amber-500 to-orange-600":"bg-gradient-to-br from-orange-500 to-red-600"," rounded-3xl p-5 shadow-xl text-white text-center"),children:[(0,s.jsx)(n.P.div,{className:"text-6xl mb-3",animate:{scale:[1,1.1,1]},transition:{duration:.5},children:a?"\uD83D\uDE31":t<=3?"\uD83C\uDFC6":t<=7?"\uD83D\uDC40":t<=15?"\uD83D\uDE30":"\uD83D\uDEA8"},"emoji-".concat(en)),(0,s.jsxs)("p",{className:"text-sm font-bold opacity-80 mb-1",children:['La tua posizione per "',g,'"']}),(0,s.jsx)(n.P.p,{className:"text-5xl font-black",initial:{scale:.5},animate:{scale:1},children:a?"Fuori Top 20":"#".concat(t)},"rank-".concat(en)),(0,s.jsx)("p",{className:"text-xs opacity-75 mt-2",children:(null===(e=ei.find(e=>e.id===A))||void 0===e?void 0:e.name)||"Dal tuo locale"})]},"hero-".concat(A))})(),es.length>0&&(0,s.jsx)("div",{className:"bg-gradient-to-r from-amber-50 to-orange-50 rounded-2xl p-4 border-2 border-amber-200",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("div",{className:"text-2xl flex-shrink-0",children:"\uD83D\uDC47"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("h4",{className:"font-bold text-sm text-gray-900 mb-1",children:["Abbiamo analizzato ",es.length+1," punti strategici!"]}),(0,s.jsxs)("p",{className:"text-xs text-gray-700 font-medium",children:[(0,s.jsx)("span",{className:"text-amber-700 font-black",children:"CLICCA"})," sui pulsanti qui sotto per vedere come cambia la tua posizione in base a dove cercano i clienti"]})]})]})}),ei.length>1&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-xs font-bold text-gray-600 text-center",children:"\uD83D\uDCCD Seleziona un punto per vedere la classifica:"}),(0,s.jsx)("div",{className:"flex gap-2 overflow-x-auto pb-2 -mx-1 px-1",children:ei.map(e=>(0,s.jsxs)("button",{onClick:()=>k(e.id),className:"flex-shrink-0 px-3 py-2 rounded-xl text-xs font-bold transition-all flex items-center gap-1.5 ".concat(A===e.id?"bg-gradient-to-r from-[#1B9AAA] to-[#06D6A0] text-white shadow-lg":"bg-white border-2 border-gray-200 text-gray-600 hover:border-[#1B9AAA]"),children:[(0,s.jsx)("span",{children:e.icon}),(0,s.jsx)("span",{className:"max-w-[100px] truncate",children:e.name}),(0,s.jsx)("span",{className:"ml-1 px-1.5 py-0.5 rounded-full text-[10px] ".concat(A===e.id?"bg-white/20":"bg-gray-100"),children:"number"==typeof e.rank?"#".concat(e.rank):e.rank})]},e.id))})]}),(0,s.jsxs)(n.P.div,{initial:{opacity:.5,scale:.98},animate:{opacity:1,scale:1},transition:{duration:.3},className:"bg-white rounded-3xl p-4 shadow-xl",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,s.jsx)("div",{className:"text-2xl",children:"\uD83C\uDFC6"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"text-lg font-black text-gray-900",children:"Classifica Zona"}),(0,s.jsxs)("p",{className:"text-xs text-gray-500",children:['Ricerca "',(0,s.jsx)("span",{className:"font-semibold",children:g}),'" â¢',(0,s.jsx)("span",{className:"text-[#1B9AAA] font-bold ml-1",children:(null===(t=ei.find(e=>e.id===A))||void 0===t?void 0:t.name)||"Dal tuo locale"})]})]})]}),(0,s.jsx)("div",{className:"space-y-2",children:(()=>{let e="number"==typeof en?en:99,t=e>20||"number"!=typeof en,a=el(),i=()=>t?"bg-gradient-to-r from-red-500 to-red-600 shadow-lg":e<=3?"bg-gradient-to-r from-[#06D6A0] to-emerald-500 shadow-lg":e<=10?"bg-gradient-to-r from-amber-400 to-orange-500 shadow-lg":"bg-gradient-to-r from-orange-500 to-red-500 shadow-lg",l=[...a.map(e=>({...e,isUser:!1,sortRank:e.rank})),{name:ee.name,rank:en,rating:ee.rating,reviews:ee.reviews,isUser:!0,sortRank:t?99:e,realRank:e,isOutOfTop20:t}];return l.sort((e,t)=>
1e.sortRank-t.sortRank),l.map((e,t)=>{let a=t+1,l=e.isUser&&e.isOutOfTop20;return(0,s.jsx)(n.P.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:.05*t},className:"rounded-2xl overflow-hidden ".concat(e.isUser?i():"bg-gray-50"),children:(0,s.jsx)("div",{className:"p-3",children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center font-black text-sm ".concat(e.isUser?"bg-white/20 text-white":a<=3?"bg-gradient-to-br from-yellow-400 to-orange-500 text-white":"bg-gray-800 text-white"),children:l?">20":"#".concat(a)}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("h4",{className:"font-bold text-sm truncate ".concat(e.isUser?"text-white":"text-gray-900"),children:e.name}),e.isUser&&(0,s.jsx)("span",{className:"flex-shrink-0 text-[10px] font-black bg-white text-[#1B9AAA] px-2 py-0.5 rounded-full uppercase",children:"Tu"})]}),(e.rating||e.reviews)&&(0,s.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(r.A,{className:"w-3.5 h-3.5 ".concat(e.isUser?"text-yellow-300 fill-yellow-300":"text-yellow-400 fill-yellow-400")}),(0,s.jsx)("span",{className:"text-xs font-bold ".concat(e.isUser?"text-white":"text-gray-700"),children:e.rating||"-"})]}),e.reviews&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:e.isUser?"text-white/50":"text-gray-300",children:"â¢"}),(0,s.jsxs)("span",{className:"text-xs ".concat(e.isUser?"text-white/80":"text-gray-500"),children:[e.reviews.toLocaleString()," recensioni"]})]})]})]})]})})},"".concat(A,"-").concat(e.name))})})()})]},A),(0,s.jsx)(z,{restaurantName:ee.name})]},"step1"),1===y&&(0,s.jsx)("div",{className:"fixed bottom-0 left-0 right-0 z-40 bg-gradient-to-t from-white via-white to-[#1B9AAA]/5 backdrop-blur-lg border-t border-[#1B9AAA]/20 shadow-2xl px-4 py-4",children:(0,s.jsxs)("div",{className:"max-w-lg mx-auto",children:[(0,s.jsx)(h.S,{onClick:eo,className:"w-full h-14 text-base font-black shadow-xl",children:(0,s.jsxs)("span",{className:"flex items-center gap-2",children:["COSA DICONO LE AI DI TE?",(0,s.jsx)(o.A,{className:"w-5 h-5"})]})}),(0,s.jsx)("p",{className:"text-xs text-center text-gray-500 mt-2",children:"ChatGPT, Perplexity e Gemini: chi consigliano al posto tuo"})]})}),2===y&&(0,s.jsx)(n.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.4},className:"space-y-5",children:(0,s.jsx)(B,{restaurantName:ee.name})},"step2"),2===y&&(0,s.jsx)("div",{className:"fixed bottom-0 left-0 right-0 z-40 bg-gradient-to-t from-white via-white to-[#1B9AAA]/5 backdrop-blur-lg border-t border-[#1B9AAA]/20 shadow-2xl px-4 py-4",children:(0,s.jsxs)("div",{className:"max-w-lg mx-auto",children:[(0,s.jsx)(h.S,{onClick:eo,className:"w-full h-14 text-base font-black shadow-xl",children:(0,s.jsxs)("span",{className:"flex items-center gap-2",children:["PERCH\xc9 SEI SOTTO I COMPETITOR?",(0,s.jsx)(o.A,{className:"w-5 h-5"})]})}),(0,s.jsx)("p",{className:"text-xs text-center text-gray-500 mt-2",children:"Google e le AI guardano la stessa cosa. Scopri quale."})]})}),3===y&&(0,s.jsxs)(n.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.4},className:"space-y-5",children:[(0,s.jsx)("div",{className:"bg-gradient-to-br from-red-500 via-orange-500 to-amber-500 rounded-3xl p-6 shadow-2xl text-white",children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)(n.P.div,{className:"text-6xl mb-4",animate:{scale:[1,1.1,1]},transition:{duration:2,repeat:1/0},children:"\uD83D\uDCA1"}),(0,s.jsxs)("h2",{className:"text-2xl sm:text-3xl font-black mb-5 leading-tight",children:["Le ",(0,s.jsx)("span",{className:"underline decoration-4",children:"RECENSIONI"})," sono il fattore che DECIDE il tuo POSIZIONAMENTO su Google"]}),(0,s.jsx)("div",{className:"bg-white/15 rounded-2xl p-4 mb-5",children:(0,s.jsxs)("p",{className:"text-base sm:text-lg leading-relaxed",children:["Google ha dichiarato che ",(0,s.jsx)("span",{className:"font-black text-yellow-200",children:"numero, voto medio e frequenza"})," delle recensioni influenzano ",(0,s.jsx)("span",{className:"font-black underline",children:"PESANTEMENTE"})," i risultati della ricerca."]})}),(0,s.jsx)("div",{className:"bg-black/20 rounded-2xl p-4 mb-4",children:(0,s.jsx)("p",{className:"text-sm sm:text-base font-medium leading-relaxed",children:(()=>{let e="number"==typeof en?en:20;return e<=3?"Sei in una posizione forte, ma i concorrenti stanno raccogliendo recensioni pi\xf9 velocemente. Devi consolidare il tuo vantaggio.":e<=7?"Sei visibile, ma i ristoranti sopra di te hanno pi\xf9 recensioni recenti. Google premia chi ha un flusso costante di feedback.":"I tuoi concorrenti ricevono recensioni pi\xf9 frequentemente e questo li spinge in alto
1nella classifica. \xc8 il fattore #1 che decide il ranking."})()})}),(0,s.jsxs)(n.P.button,{onClick:()=>M(!0),className:"w-full mt-4 bg-white text-gray-900 rounded-2xl p-4 shadow-lg flex items-center justify-between",whileHover:{scale:1.02},whileTap:{scale:.98},children:[(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("div",{className:"w-12 h-12 bg-gradient-to-br from-amber-400 to-orange-500 rounded-xl flex items-center justify-center shadow-md",children:(0,s.jsx)("span",{className:"text-2xl",children:"\uD83E\uDDE0"})}),(0,s.jsxs)("div",{className:"text-left",children:[(0,s.jsx)("p",{className:"font-black text-base",children:"L'Algoritmo di Google"}),(0,s.jsx)("p",{className:"text-sm text-gray-500",children:'"Spiegato Bene" in 2 minuti'})]})]}),(0,s.jsx)("div",{className:"w-10 h-10 bg-gray-100 rounded-full flex items-center justify-center",children:(0,s.jsx)(o.A,{className:"w-5 h-5 text-gray-600"})})]})]})}),(0,s.jsx)("div",{className:"bg-gradient-to-r from-purple-50 to-blue-50 rounded-2xl p-4 border-2 border-purple-200",children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"text-3xl",children:"\uD83D\uDD0D"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("p",{className:"text-sm font-black text-gray-900 mb-1",children:"Vediamo i numeri nel dettaglio"}),(0,s.jsx)("p",{className:"text-xs text-gray-600",children:"Nel prossimo step ti mostriamo il confronto diretto con le recensioni dei tuoi competitor"})]})]})})]},"step3"),(0,s.jsx)(l.N,{children:E&&(0,s.jsx)(n.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] bg-black/60 backdrop-blur-sm",onClick:()=>M(!1),children:(0,s.jsxs)(n.P.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:25,stiffness:300},className:"absolute bottom-0 left-0 right-0 max-h-[90vh] bg-gradient-to-b from-gray-50 to-white rounded-t-3xl overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"sticky top-0 z-10 bg-gradient-to-r from-[#1B9AAA] to-[#06D6A0] text-white px-4 py-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"text-2xl",children:"\uD83E\uDDE0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-black text-lg",children:"Come Funziona l'Algoritmo"}),(0,s.jsx)("p",{className:"text-xs opacity-80",children:"I 6 fattori chiave delle recensioni"})]})]}),(0,s.jsx)("button",{onClick:()=>M(!1),className:"w-8 h-8 rounded-full bg-white/20 flex items-center justify-center",children:(0,s.jsx)(c.A,{className:"w-5 h-5"})})]}),(0,s.jsx)("div",{className:"flex justify-center gap-1.5 mt-3",children:O.map((e,t)=>(0,s.jsx)("button",{onClick:()=>F(t),className:"h-1.5 rounded-full transition-all ".concat(t===L?"w-6 bg-white":"w-1.5 bg-white/40")},t))})]}),(0,s.jsxs)("div",{className:"overflow-y-auto max-h-[calc(90vh-120px)] pb-8",children:[(0,s.jsxs)("div",{className:"px-4 py-5",children:[(0,s.jsx)("div",{className:"flex gap-4 overflow-x-auto snap-x snap-mandatory scrollbar-hide pb-4",style:{scrollbarWidth:"none",msOverflowStyle:"none"},onScroll:e=>{let t=Math.round(e.currentTarget.scrollLeft/(.85*e.currentTarget.offsetWidth));t!==L&&t>=0&&t<O.length&&F(t)},children:O.map((e,t)=>(0,s.jsx)(n.P.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.1*t},className:"flex-shrink-0 w-[85vw] max-w-sm snap-center",children:(0,s.jsxs)("div",{className:"bg-gradient-to-br ".concat(e.gradient," rounded-3xl p-5 text-white shadow-xl h-full"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,s.jsx)("span",{className:"text-4xl",children:e.emoji}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"font-black text-lg leading-tight",children:e.title}),(0,s.jsxs)("p",{className:"text-xs opacity-80 mt-0.5",children:[t+1," di ",O.length]})]})]}),(0,s.jsx)("div",{className:"bg-white/20 rounded-2xl p-3 mb-4",children:(0,s.jsxs)("p",{className:"text-sm font-bold text-center",children:["\uD83D\uDCA1 ",e.keyPoint]})}),(0,s.jsx)("div",{className:"space-y-2.5",children:e.content.map((e,t)=>(0,s.jsxs)(n.P.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:.2+.1*t},className:"flex items-start gap-2 bg-black/10 rounded-xl p-2.5",children:[(0,s.jsx)("span",{className:"text-lg flex-shrink-0",children:e.icon}),(0,s.jsx)("p",{className:"text-xs leading-relaxed",children:e.text})]},t))})]})},e.id))}),(0,s.jsxs)("p",{className:"text-xs text-center text-gray-400 mt-3 flex items-center justify-center gap-1",children:[(0,s.jsx)(d.A,{className:"w-3 h-3"}),"Scorri per vedere tutti i fattori",(0,s.jsx)(o.A,{className:"w-3 h-3"})]})]}),(0,s.jsx)("div",{className:"px-4",children:(0,s.jsxs)("div",{className:"bg-gradient-to-r from-gray-900 to-gray-800 rounded-2xl p-5 text-white",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,s.jsx)("span",{className:"text-xl",children:"\uD83C\uDFAF"}),(0,s.jsx)("h4",{className:"font-black",children:"La Formula del Successo"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-2 mb-4",children:[(0,s.jsxs)("div",{className:"bg-white/10 rounded-xl p-2 text-center",children:[(0,s.jsx)("p",{className:"text-2xl font-black text-emerald-400",children:"\uD83D\uDCCA"}),(0,s.jsx)("p",{className:"text-[10px] font-medium opacity-80",children:"Volume"})]}),(0,s.jsxs)("div",{className:"bg-white/10 rounded-xl p-2 text-center",children:[(0,s.jsx)("p",{className:"text-2xl font-black text-amber-400",children:"â"}),(0,s.jsx)("p",{className:"text-[10px] font-medium opacity-80",children:"Rating"})]}),(0,s.jsxs)("div",{className:"bg-white/10 rounded-xl p-2 text-center",children:[(0,s.jsx)("p",{className:"text-2xl font-black text-cyan-400",children:"â±ï¸"}),(0,s.jsx)("p",{className:"text-[10px] font-medium opacity-80",children:"Frequenza"})]})]}),(0,s.jsxs)("p",{className:"text-xs text-center opacity-80 leading-relaxed",children:["Questi 3 fattori, combinati con ",(0,s.jsx)("strong",{children:"contenuto semantico"})," e ",(0,s.jsx)("strong",{children:"foto"}),", determinano chi appare per primo su Google Maps."]})]})}),(0,s.jsx)("div",{className:"px-4 mt-5",children:(0,s.jsx)(h.S,{onClick:()=>M(!1),className:"w-full h-14 text-base font-black",children:"â
Ho capito, torna al report"})})]})]})})}),(0,s.jsx)(l.N,{children:q&&(()=>{let e=el(),t=ee.rating||0,a=ee.reviews||0,i=e.length>0?e.reduce((e,t)=>
1e+(t.rating||0),0)/e.length:0,l=e.length>0?e.reduce((e,t)=>e+(t.reviews||0),0)/e.length:0,r=e.length>0?Math.max(...e.map(e=>e.reviews||0)):0,o=Math.round(l-a),d=r-a,x=[];return t<4&&t>0?x.push({id:"rating",emoji:"\uD83D\uDEA8",title:"Il tuo Rating",gradient:"from-red-500 to-rose-600",status:"danger",mainStat:t.toFixed(1),mainLabel:"stelle",points:[{icon:"â",text:"Sei sotto il 4.0 â la soglia critica"},{icon:"\uD83D\uDC41ï¸",text:"Il 71% delle persone ignora chi ha meno di 4 stelle"},{icon:"\uD83D\uDD0D",text:'Chi filtra "4 stelle+" non ti vede proprio'},{icon:"\uD83D\uDCC9",text:"Meno click = ranking che peggiora"}],actionText:"Priorit\xe0 assoluta: raccogliere recensioni positive per alzare la media"}):t>=4&&t<i&&i>0?x.push({id:"rating",emoji:"â ï¸",title:"Il tuo Rating",gradient:"from-amber-500 to-orange-500",status:"warning",mainStat:t.toFixed(1),mainLabel:"stelle",points:[{icon:"\uD83D\uDCCA",text:"Media competitor: ".concat(i.toFixed(1)," stelle")},{icon:"\uD83D\uDC47",text:"Sei ".concat((i-t).toFixed(1)," punti sotto la media")},{icon:"\uD83D\uDDB1ï¸",text:"Rating pi\xf9 basso = meno click = ranking peggiore"},{icon:"\uD83D\uDD04",text:"\xc8 un circolo vizioso che si auto-alimenta"}],actionText:"Obiettivo: superare la media dei competitor"}):t>=4.2&&x.push({id:"rating",emoji:"â",title:"Il tuo Rating",gradient:"from-emerald-500 to-green-600",status:"success",mainStat:t.toFixed(1),mainLabel:"stelle",points:[{icon:"â
",text:"Sei nella fascia ideale (4.2 - 4.8)"},{icon:"\uD83C\uDFAF",text:"Il tuo punteggio ispira fiducia"},{icon:"\uD83D\uDCA1",text:'Un 5.0 perfetto pu\xf2 sembrare "troppo bello"'},{icon:"\uD83C\uDFC6",text:"Mantieni questo livello con costanza"}],actionText:"Continua cos\xec! Nuove recensioni mantengono alta la media"}),a<10?x.push({id:"volume",emoji:"\uD83D\uDD34",title:"Numero Recensioni",gradient:"from-red-600 to-red-800",status:"danger",mainStat:a.toString(),mainLabel:"recensioni totali",points:[{icon:"â ï¸",text:"Sotto la soglia minima di 10 recensioni"},{icon:"\uD83E\uDD16",text:'Google ti considera "non affidabile"'},{icon:"\uD83D\uDCC9",text:"Sei in un limbo algoritmico"},{icon:"\uD83C\uDFAF",text:"Prima urgenza: superare le 10 recensioni"}],actionText:"Devi raggiungere almeno 10 recensioni il prima possibile"}):o>0?x.push({id:"volume",emoji:"\uD83D\uDCC9",title:"Numero Recensioni",gradient:"from-amber-500 to-orange-600",status:"warning",mainStat:a.toLocaleString(),mainLabel:"recensioni",points:[{icon:"\uD83D\uDCCA",text:"Media competitor: ".concat(Math.round(l)," recensioni")},{icon:"\uD83D\uDCCF",text:"Ti mancano ".concat(o," recensioni per la media")},{icon:"\uD83D\uDEA7",text:'Il volume \xe8 una "barriera all\'ingresso"'},{icon:"â±ï¸",text:"Ci vuole tempo ma si pu\xf2 colmare"}],actionText:"Con 3 recensioni/settimana raggiungi la media in ".concat(Math.ceil(o/12)," mesi")}):a>=l&&a>0&&x.push({id:"volume",emoji:"\uD83D\uDCAA",title:"Numero Recensioni",gradient:"from-emerald-500 to-teal-600",status:"success",mainStat:a.toLocaleString(),mainLabel:"recensioni",points:[{icon:"â
",text:"Sei sopra la media dei competitor!"},{icon:"\uD83D\uDEE1ï¸",text:"Il volume ti protegge dalle negative"},{icon:"\uD83D\uDCCA",text:"Media competitor: ".concat(Math.round(l))},{icon:"â¡",text:"Ora la chiave \xe8 la frequenza"}],actionText:"Ottima base! Mantieni un flusso costante per non farti superare"}),d>50&&x.push({id:"leader",emoji:"\uD83C\uDFAF",title:"Il Tuo Obiettivo",gradient:"from-blue-500 to-indigo-600",status:"info",mainStat:r.toLocaleString(),mainLabel:"recensioni del leader",points:[{icon:"\uD83C\uDFC6",text:"Il primo in classifica ha ".concat(r," recensioni")},{icon:"\uD83D\uDCCF",text:"Gap da colmare: ".concat(d," recensioni")},{icon:"\uD83D\uDCA1",text:"La frequenza conta pi\xf9 del volume totale!"},{icon:"â¡",text:"2-5 nuove recensioni/settimana possono ribaltare tutto"}],actionText:"Non scoraggiarti: la costanza vince sulla quantit\xe0 accumulata"}),t>i&&a<l&&a>10&&x.push({id:"quality-volume",emoji:"\uD83D\uDC8E",title:"Potenziale Nascosto",gradient:"from-purple-500 to-pink-600",status:"info",mainStat:"".concat(t.toFixed(1),"â"),mainLabel:"rating superiore ai competitor",points:[{icon:"â
",text:"La qualit\xe0 c'\xe8: rating sopra la media!"},{icon:"\uD83D\uDCC9",text:"Ma poche recensioni = poca visibilit\xe0"},{icon:"\uD83D\uDD0D",text:'Google vuole "prove" della qualit\xe0'},{icon:"\uD83D\uDE80",text:"Pi\xf9 recensioni = esplodi nel ranking"}],actionText:"Hai tutte le carte per dominare: ti manca solo il volume"}),(0,s.jsx)(n.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] bg-black/60 backdrop-blur-sm",onClick:()=>V(!1),children:(0,s.jsxs)(n.P.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:25,stiffness:300},className:"absolute bottom-0 left-0 right-0 max-h-[85vh] bg-white rounded-t-3xl overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)("div",{className:"sticky top-0 z-10 bg-gradient-to-r from-indigo-600 to-purple-600 text-white px-5 py-4",children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"text-3xl",children:"\uD83D\uDD0D"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-black text-xl",children:"La Tua Situazione"}),(0,s.jsx)("p",{className:"text-sm opacity-80",children:"Basata sui dati reali"})]})]}),(0,s.jsx)("button",{onClick:()=>V(!1),className:"w-10 h-10 rounded-full bg-white/20 flex items-center justify-center",children:(0,s.jsx)(c.A,{className:"w-6 h-6"})})]})}),(0,s.jsxs)("div",{className:"overflow-y-auto max-h-[calc(85vh-80px)] p-5 space-y-4",children:[x.map((e,t)=>(0,s.jsxs)(n.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1*t},className:"rounded-2xl p-5 border-2 ".concat((()=>{switch(e.status){case"danger":return"border-red-300 bg-red-50";case"warning":return"border-amber-300 bg-amber-50";case"success":return"border-emerald-300 bg-emerald-50";case"info":return"border-blue-300 bg-blue-50";default:return"border-gray-300 bg-gray-50"}})()),children:[(0,s.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,s.jsx)("span",{className:"text-4xl",children:e.emoji}),(0,s.jsx)("div",{className:"flex-1",children:(0,s.jsx)("h4",{className:"font-black text-lg text-gray-900 leading-tight",children:e.title})}),(0,s.jsxs)("div",{className:"rounded-xl px-3 py-2 text-center ".concat((()=>{switch(e.status){case"danger":return"bg-red-500 text-white";case"warning":return"bg-amber-500 text-white";case"success":return"bg-emerald-500 text-white";case"info":return"bg-blue-500 text-white";default:return"bg-gray-500 text-white"}})()),children:[(0,s.jsx)("p",{className:"text-xl font-black",children:e.mainStat}),(0,s.jsx)("p",{className:"text-[10px] opacity-90",children:e.mainLabel})]})]}),(0,s.jsx)("div",{className:"space-y-2",children:e.points.map((e,t)=>(0,s.jsxs)("div",{className:"flex items-start gap-3 bg-white rounded-xl p-3 border border-gray-100",children:[(0,s.jsx)("span",{className:"text-lg flex-shrink-0",children:e.icon}),(0,s.jsx)("p",{className:"text-sm text-gray-700 leading-snug",children:e.text})]},t))}),(0,s.jsx)("div",{className:"mt-4 bg-gray-900 rounded-xl p-3",children:(0,s.jsxs)("p",{className:"text-sm font-bold text-center text-white",children:["\uD83D\uDC49 ",e.actionText]})})]},e.id)),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(h.S,{onClick:()=>V(!1),className:"w-full h-14 text-base font-black",children:"â
Ho capito, torna alla classifica"})})]})]})})})()}),3===y&&(0,s.jsx)("div",{className:"fixed bottom-0 left-0 right-0 z-40 bg-gradient-to-t from-white via-white to-[#1B9AAA]/5 backdrop-blur-lg border-t border-[#1B9AAA]/20 shadow-2xl px-4 py-4",children:(0,s.jsxs)("div",{className:"max-w-lg mx-auto",children:[(0,s.jsx)(h.S,{onClick:eo,className:"w-full h-14 text-base font-black shadow-xl",children:(0,s.jsxs)("span",{className:"flex items-center gap-2",children:["\uD83D\uDCCA SCOPRI IL CONFRONTO RECENSIONI",(0,s.jsx)(o.A,{className:"w-5 h-5"})]})}),(0,s.jsx)("p",{className:"text-xs text-center text-gray-500 mt-2",children:"Step 3 di 4 ⢠Analisi Competitor"})]})}),4===y&&(0,s.jsxs)(n.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.4},className:"space-y-5",children:[(0,s.jsx)("div",{className:"bg-white rounded-3xl p-4 shadow-xl",children:(0,s.jsx)("div",{className:"space-y-2",children:(()=>{var e,t;let a=null===(t=H.reviewVelocity)||void 0===t?void 0:null===(e=t.competitors)||void 0===e?void 0:e.find(e=>e.isUser),i=el();return console.log("\uD83D\uDCCA STEP 3 DEBUG - userRestaurant:",{name:ee.name,rating:ee.rating,reviews:ee.reviews,ratingType:typeof ee.rating,reviewsType:typeof ee.reviews}),console.log("\uD83D\uDCCA STEP 3 DEBUG - competitors:",i.map(e=>({name:e.name,rating:e.rating,reviews:e.reviews}))),console.log("\uD83D\uDCCA STEP 3 DEBUG - reviewVelocity user:",a),[{name:ee.name,rating:ee.rating||(null==a?void 0:a.avgRating)||0,reviews:ee.reviews||0,isUser:!0},...i.map(e=>({name:e.name,rating:e.rating||0,reviews:e.reviews||0,isUser:!1}))].sort((e,t)=>
1"reviews"===U?t.reviews-e.reviews:t.rating-e.rating).map((e,t)=>{let a=t+1,i=a<=3;return(0,s.jsxs)(n.P.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:.05*t},className:"rounded-2xl p-3 ".concat(e.isUser?"bg-gradient-to-r from-[#1B9AAA] to-[#06D6A0] text-white shadow-lg":i?"bg-gradient-to-r from-amber-50 to-orange-50 border border-amber-200":"bg-gray-50"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center font-black text-sm ".concat(e.isUser?"bg-white/20":i?"bg-gradient-to-br from-amber-400 to-orange-500 text-white":"bg-gray-200 text-gray-600"),children:(1===a?"\uD83E\uDD47":2===a?"\uD83E\uDD48":3===a?"\uD83E\uDD49":null)||"#".concat(a)}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("p",{className:"font-bold text-sm leading-tight ".concat(e.isUser?"text-white":"text-gray-900"),children:e.name}),e.isUser&&(0,s.jsx)("span",{className:"flex-shrink-0 text-[9px] font-black bg-white text-[#1B9AAA] px-1.5 py-0.5 rounded-full",children:"TU"})]})}),(0,s.jsx)("div",{className:"flex-shrink-0 text-right",children:"reviews"===U?(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-lg font-black ".concat(e.isUser?"text-white":"text-gray-900"),children:e.reviews>0?e.reviews.toLocaleString():"-"}),(0,s.jsx)("p",{className:"text-[10px] ".concat(e.isUser?"text-white/70":"text-gray-500"),children:"recensioni"})]}):(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(r.A,{className:"w-4 h-4 ".concat(e.isUser?"text-yellow-300 fill-yellow-300":"text-yellow-500 fill-yellow-500")}),(0,s.jsx)("p",{className:"text-lg font-black ".concat(e.isUser?"text-white":"text-gray-900"),children:e.rating>0?e.rating.toFixed(1):"-"})]})})]}),(0,s.jsx)("div",{className:"mt-2 pt-2 border-t ".concat(e.isUser?"border-white/20":"border-gray-200"),children:(0,s.jsx)("div",{className:"flex items-center justify-between text-xs",children:"reviews"===U?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:e.isUser?"text-white/70":"text-gray-500",children:"Rating"}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(r.A,{className:"w-3 h-3 ".concat(e.isUser?"text-yellow-300 fill-yellow-300":"text-yellow-500 fill-yellow-500")}),(0,s.jsx)("span",{className:"font-bold ".concat(e.isUser?"text-white":"text-gray-700"),children:e.rating>0?e.rating.toFixed(1):"-"})]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:e.isUser?"text-white/70":"text-gray-500",children:"Recensioni"}),(0,s.jsx)("span",{className:"font-bold ".concat(e.isUser?"text-white":"text-gray-700"),children:e.reviews>0?e.reviews.toLocaleString():"-"})]})})})]},"".concat(U,"-").concat(e.name))})})()},"list-".concat(U))}),(0,s.jsxs)(n.P.button,{onClick:()=>V(!0),className:"w-full bg-gradient-to-r from-indigo-600 via-purple-600 to-pink-600 rounded-2xl p-5 shadow-xl text-white text-left relative overflow-hidden",whileHover:{scale:1.02},whileTap:{scale:.98},children:[(0,s.jsx)("div",{className:"absolute -right-8 -top-8 w-32 h-32 bg-white/10 rounded-full"}),(0,s.jsx)("div",{className:"absolute -right-4 -bottom-4 w-20 h-20 bg-white/5 rounded-full"}),(0,s.jsxs)("div",{className:"flex items-center justify-between relative z-10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("div",{className:"w-14 h-14 bg-white/20 rounded-2xl flex items-center justify-center",children:(0,s.jsx)("span",{className:"text-3xl",children:"\uD83D\uDD0D"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-black leading-tight",children:"Analizza la tua Situazione"}),(0,s.jsx)("p",{className:"text-sm opacity-80 mt-1",children:"Scopri cosa dicono i numeri su di te"})]})]}),(0,s.jsx)(o.A,{className:"w-6 h-6 opacity-70"})]})]})]},"step4"),4===y&&(0,s.jsx)("div",{className:"fixed bottom-0 left-0 right-0 z-40 bg-gradient-to-t from-white via-white to-[#1B9AAA]/5 backdrop-blur-lg border-t border-[#1B9AAA]/20 shadow-2xl px-4 py-4",children:(0,s.jsx)("div",{className:"max-w-lg mx-auto",children:(0,s.jsx)(h.S,{onClick:eo,className:"w-full h-14 text-base font-black shadow-xl",children:(0,s.jsxs)("span",{className:"flex items-center gap-2",children:["SCOPRI LA TUA POTENZIALIT\xc0",(0,s.jsx)(o.A,{className:"w-5 h-5"})]})})})}),5===y&&(0,s.jsxs)(n.P.div,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.4},className:"space-y-5",children:[(0,s.jsx)("div",{className:"bg-gradient-to-br from-[#1B9AAA] to-[#06D6A0] rounded-3xl p-6 shadow-xl text-white",children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)(n.P.div,{className:"text-5xl mb-3",animate:{rotate:[0,10,-10,0],scale:[1,1.1,1]},transition:{duration:2,repeat:1/0},children:"â¡"}),(0,s.jsx)("p",{className:"text-sm font-bold uppercase tracking-wider opacity-80 mb-2",children:"Il segreto per dominare Google Maps"}),(0,s.jsx)("h3",{className:"text-2xl font-black mb-4",children:"Recensioni COSTANTI ogni settimana"}),(0,s.jsxs)("div",{className:"bg-white/20 rounded-2xl p-5 mb-4",children:[(0,s.jsx)("p",{className:"text-xs opacity-80 mb-2",children:"Con MenuChat riceverai"}),(0,s.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,s.jsx)(n.P.div,{className:"text-5xl font-black",initial:{scale:.5},animate:{scale:1},transition:{type:"spring",stiffness:200},children:Math.ceil(er/4)}),(0,s.jsxs)("div",{className:"text-left",children:[(0,s.jsx)("p",{className:"text-xl font-bold",children:"nuove recensioni"}),(0,s.jsx)("p",{className:"text-sm opacity-80",children:"ogni settimana"})]})]})]}),(0,s.jsx)("p",{className:"text-sm opacity-90 italic",children:'"La costanza batte il volume nel 2024" â Studio Google'})]})}),(0,s.jsxs)("div",{className:"bg-white rounded-3xl p-5 shadow-xl overflow-hidden relative",children:[(0,s.jsx)("div",{className:"absolute top-0 right-0 w-24 h-24 bg-gradient-to-bl from-amber-100 to-transparent rounded-bl-full opacity-50"}),(0,s.jsxs)("h4",{className:"text-base font-black text-gray-900 mb-4 flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-2xl",children:"\uD83C\uDF5E"}),"Perch\xe9 le recensioni fresche contano di pi\xf9"]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex gap-3",children:[(0,s.jsx)("div",{className:"w-10 h-10 bg-red-100 rounded-full flex items-center justify-center flex-shrink-0",children:(0,s.jsx)("span",{className:"text-lg",children:"\uD83D\uDCC9"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-bold text-gray-900",children:"Le recensioni vecchie perdono valore"}),(0,s.jsx)("p",{className:"text-xs text-gray-600",children:'Come il pane: dopo 3 mesi, Google le considera quasi "stantie"'})]})]}),(0,s.jsxs)("div",{className:"flex gap-3",children:[(0,s.jsx)("div",{className:"w-10 h-10 bg-amber-100 rounded-full flex items-center justify-center flex-shrink-0",children:(0,s.jsx)("span",{className:"text-lg",children:"\uD83D\uDC80"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-bold text-gray-900",children:"Se smetti, il ranking crolla"}),(0,s.jsx)("p",{className:"text-xs text-gray-600",children:"Anche con 500 recensioni: se non ne arrivano di nuove, Google ti fa scendere"})]})]}),(0,s.jsxs)("div",{className:"flex gap-3",children:[(0,s.jsx)("div",{className:"w-10 h-10 bg-emerald-100 rounded-full flex items-center justify-center flex-shrink-0",children:(0,s.jsx)("span",{className:"text-lg",children:"â
"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-bold text-gray-900",children:"Il ritmo ideale: 2-5 a settimana"}),(0,s.jsx)("p",{className:"text-xs text-gray-600",children:'\xc8 il segnale che dice a Google "questo ristorante \xe8 vivo e i clienti sono soddisfatti"'})]})]})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{className:"bg-gradient-to-br from-gray-100 to-gray-200 rounded-2xl p-4 relative overflow-hidden",children:[(0,s.jsx)("div",{className:"absolute -right-4 -top-4 text-6xl opacity-10",children:"\uD83D\uDE34"}),(0,s.jsx)("p",{className:"text-xs font-bold text-gray-500 uppercase tracking-wide mb-2",children:"Senza sistema"}),(0,s.jsx)("p",{className:"text-2xl font-black text-gray-400 mb-1",children:"0-1"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"rec. a settimana"}),(0,s.jsx)("div",{className:"bg-white/60 rounded-lg px-2 py-1.5",children:(0,s.jsx)("p",{className:"text-[10px] text-gray-600 font-medium",children:'\uD83D\uDCC9 Profilo che "si addormenta"'})})]}),(0,s.jsxs)("div",{className:"bg-gradient-to-br from-emerald-500 to-teal-600 rounded-2xl p-4 relative overflow-hidden text-white",children:[(0,s.jsx)("div",{className:"absolute -right-4 -top-4 text-6xl opacity-20",children:"\uD83D\uDD25"}),(0,s.jsx)("p",{className:"text-xs font-bold opacity-80 uppercase tracking-wide mb-2",children:"Con MenuChat"}),(0,s.jsx)("p",{className:"text-2xl font-black mb-1",children:Math.ceil(er/4)}),(0,s.jsx)("p",{className:"text-xs opacity-80 mb-3",children:"rec. a settimana"}),(0,s.jsx)("div",{className:"bg-white/20 rounded-lg px-2 py-1.5",children:(0,s.jsx)("p",{className:"text-[10px] font-medium",children:"\uD83D\uDE80 Profilo sempre in cima"})})]})]}),(0,s.jsxs)("div",{className:"bg-gradient-to-br from-blue-50 to-indigo-50 rounded-3xl p-5 shadow-lg border border-blue-100",children:[(0,s.jsx)("h4",{className:"text-base font-black text-gray-900 mb-4 text-center",children:"â±ï¸ Con recensioni costanti ogni settimana"}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3 bg-white rounded-xl p-3 shadow-sm",children:[(0,s.jsx)("div",{className:"w-8 h-8 bg-emerald-500 rounded-full flex items-center justify-center flex-shrink-0",children:(0,s.jsx)("span",{className:"text-sm",children:"\uD83D\uDCCD"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-bold text-gray-900",children:"Resti sempre visibile su Maps"}),(0,s.jsx)("p",{className:"text-xs text-gray-600",children:"Google ti mostra perch\xe9 vede che sei attivo e i clienti ti scelgono"})]})]}),(0,s.jsxs)("div",{className:"flex items-start gap-3 bg-white rounded-xl p-3 shadow-sm",children:[(0,s.jsx)("div",{className:"w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center flex-shrink-0",children:(0,s.jsx)("span",{className:"text-sm",children:"\uD83C\uDFC6"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-bold text-gray-900",children:"I competitor non ti superano"}),(0,s.jsx)("p",{className:"text-xs text-gray-600",children:"Il flusso costante ti protegge da chi cerca di scavalcarti"})]})]}),(0,s.jsxs)("div",{className:"flex items-start gap-3 bg-white rounded-xl p-3 shadow-sm",children:[(0,s.jsx)("div",{className:"w-8 h-8 bg-purple-500 rounded-full flex items-center justify-center flex-shrink-0",children:(0,s.jsx)("span",{className:"text-sm",children:"\uD83D\uDCCA"})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"text-sm font-bold text-gray-900",children:[12*er,"+ recensioni in un anno"]}),(0,s.jsx)("p",{className:"text-xs text-gray-600",children:"Mentre tu lavori in cucina, il sistema raccoglie feedback ogni giorno"})]})]})]})]})]},"step5"),6===y&&(0,s.jsxs)(n.P.div,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.4},className:"space-y-5",children:[(0,s.jsxs)("div",{className:"bg-white rounded-3xl p-6 shadow-xl space-y-4",children:[(0,s.jsxs)("p",{className:"text-base text-gray-800 leading-relaxed",children:["I nostri clienti raccolgono in media ",(0,s.jsx)("span",{className:"font-black text-[#1B9AAA]",children:"+100 recensioni ogni mese"}),", in modo completamente automatico."]}),(0,s.jsxs)("p",{className:"text-base text-gray-800 leading-relaxed",children:["Ogni mese selezioniamo ",(0,s.jsx)("span",{className:"font-black",children:"20 nuovi ristoranti"})," per provare il servizio gratuitamente."]}),(0,s.jsx)("p",{className:"text-base text-gray-800 leading-relaxed",children:"Se ti interessa, puoi prenotare una chiamata senza impegno: ti spieghiamo come funziona e sei tu a decidere se iniziare."}),(0,s.jsxs)("div",{className:"flex items-center gap-3 pt-1",children:[(0,s.jsx)("span",{className:"text-sm font-bold text-gray-700",children:"Posti rimanenti:"}),(0,s.jsx)(n.P.span,{className:"text-lg font-black text-red-500",animate:{opacity:[1,.2,1]},transition:{duration:1,repeat:1/0},children:"1"})]})]}),(0,s.jsxs)("div",{className:"bg-white rounded-3xl p-5 shadow-xl",children:[(0,s.jsx)("h4",{className:"text-lg font-black text-gray-900 mb-4 text-center",children:"\uD83D\uDCDE Ti chiamiamo senza impegno"}),(0,s.jsxs)("div",{className:"space-y-2 mb-4",children:[(0,s.jsxs)("label",{className:"text-sm font-bold text-gray-700 flex items-center gap-2",children:[(0,s.jsx)(x.A,{className:"w-4 h-4 text-[#1B9AAA]"}),"Il tuo numero diretto"]}),(0,s.jsx)("input",{type:"tel",value:D,onChange:e=>C(e.target.value),className:"w-full h-12 px-4 border-2 border-gray-200 rounded-xl text-sm focus:border-[#1B9AAA] focus:ring-2 focus:ring-[#1B9AAA]/20 outline-none transition font-medium"}),(0,s.jsx)("p",{className:"text-xs text-gray-500",children:"Modifica se preferisci un numero diverso"})]}),(0,s.jsxs)("div",{className:"space-y-2 mb-5",children:[(0,s.jsxs)("label",{className:"text-sm font-bold text-gray-700 flex items-center gap-2",children:[(0,s.jsx)(m.A,{className:"w-4 h-4 text-[#1B9AAA]"}),"Quando sei pi\xf9 libero?"]}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2",children:[{value:"mattina",label:"Mattina",sub:"9:00 - 12:00",icon:"\uD83C\uDF05"},{value:"pomeriggio",label:"Pomeriggio",sub:"15:00 - 18:00",icon:"\uD83C\uDF06"}].map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>S(e.value),className:"p-3 rounded-xl border-2 transition-all text-left ".concat(P===e.value?"border-[#1B9AAA] bg-[#1B9AAA]/5 shadow-lg":"border-gray-200 hover:border-gray-300"),children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xl",children:e.icon}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-bold text-sm text-gray-900",children:e.label}),(0,s.jsx)("p",{className:"text-xs text-gray-500",children:e.sub})]})]})},e.value))})]}),(0,s.jsxs)("div",{className:"space-y-1 mt-4",children:[(0,s.jsxs)("label",{className:"text-sm font-semibold text-gray-700",children:["Data e orario specifico ",(0,s.jsx)("span",{className:"font-normal text-gray-400",children:"(Facoltativo)"})]}),(0,s.jsx)("textarea",{value:I,onChange:e=>T(e.target.value),placeholder:"Vuoi essere chiamato una data e un orario specifico? Scrivicelo qui sotto.",rows:3,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl text-sm focus:border-[#1B9AAA] focus:ring-2 focus:ring-[#1B9AAA]/20 outline-none transition resize-none"})]}),(0,s.jsx)("p",{className:"text-xs text-center text-gray-500 mt-3",children:"Ti chiameremo entro 24 ore nell'orario selezionato"})]}),(0,s.jsx)("button",{onClick:v,className:"w-full text-center text-sm font-medium text-gray-500 hover:text-[#1B9AAA] transition-colors py-2",children:"â Fai una nuova analisi"})]},"step6"),5===y&&(0,s.jsx)("div",{className:"fixed bottom-0 left-0 right-0 z-40 bg-gradient-to-t from-white via-white to-[#06D6A0]/10 backdrop-blur-lg border-t border-[#06D6A0]/30 shadow-2xl px-4 py-4",children:(0,s.jsx)("div",{className:"max-w-lg mx-auto",children:(0,s.jsx)(h.S,{onClick:()=>w(6),className:"w-full h-14 text-base font-black shadow-xl",children:"VOGLIO MAGGIORI INFORMAZIONI"})})}),6===y&&(0,s.jsx)("div",{className:"fixed bottom-0 left-0 right-0 z-40 bg-gradient-to-t from-white via-white to-[#06D6A0]/10 backdrop-blur-lg border-t border-[#06D6A0]/30 shadow-2xl px-4 py-4",children:(0,s.jsx)("div",{className:"max-w-lg mx-auto",children:(0,s.jsx)(h.S,{onClick:()=>{D&&P&&j(D,P,I||void 0)},disabled:!D||!P,className:"w-full h-14 text-base font-black shadow-xl",children:"PRENOTA LA CHIAMATA"})})})]})]})}},51719:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(67401).A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},93518:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(67401).A)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},46967:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(67401).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},66889:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(67401).A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},35765:(e,t,a)=>{a.d(t,{A:()=>s});
1let s=(0,a(67401).A)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},36527:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(67401).A)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},43831:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(67401).A)("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]])},21773:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(67401).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},40767:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(67401).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])}}]);
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.