PageSourceSearch

https://formazionelive.ai/assets/Preventivo-qpUr2OVR.js

js formazionelive.ai collected 2026-10-05 14:12:18 UTC 57,312 bytes, 33 lines download raw bytes

1import{r as s,j as e}from"./react-vendor-BGxiL5RC.js";import{i as re,b as A}from"./index-Bx6Vaqq1.js";import{L as _e}from"./router-vendor-BgisSgkK.js";import{aw as $e,ax as We,d as pe,h as ve,am as He,j as Ge,q as Qe,P as we,ay as Ke,az as Ue,_ as Ye,L as Xe,A as Je,a8 as ye,a0 as Ze}from"./icons-vendor-DT5FPRm5.js";import"./trpc-vendor-BB2h-vWV.js";import"./ui-vendor-CYsLLR_I.js";var et=Object.defineProperty,tt=Object.defineProperties,at=Object.getOwnPropertyDescriptors,ne=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Se=(a,t,l)=>t in a?et(a,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):a[t]=l,st=(a,t)=>{for(var l in t||(t={}))Me.call(t,l)&&Se(a,l,t[l]);if(ne)for(var l of ne(t))Re.call(t,l)&&Se(a,l,t[l]);return a},rt=(a,t)=>tt(a,at(t)),nt=(a,t)=>{var l={};for(var i in a)Me.call(a,i)&&t.indexOf(i)<0&&(l[i]=a[i]);if(a!=null&&ne)for(var i of ne(a))t.indexOf(i)<0&&Re.call(a,i)&&(l[i]=a[i]);return l};function lt(a){let t=setTimeout(a,0),l=setTimeout(a,10),i=setTimeout(a,50);return[t,l,i]}function it(a){let t=s.useRef();return s.useEffect(()=>{t.current=a}),t.current}var ot=18,Oe=40,ct=`${Oe}px`,dt=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function xt({containerRef:a,inputRef:t,pushPasswordManagerStrategy:l,isFocused:i}){let[d,n]=s.useState(!1),[m,f]=s.useState(!1),[o,y]=s.useState(!1),v=s.useMemo(()=>l==="none"?!1:(l==="increase-width"||l==="experimental-no-flickering")&&d&&m,[d,m,l]),S=s.useCallback(()=>{let r=a.current,b=t.current;if(!r||!b||o||l==="none")return;let j=r,w=j.getBoundingClientRect().left+j.offsetWidth,L=j.getBoundingClientRect().top+j.offsetHeight/2,g=w-ot,D=L;document.querySelectorAll(dt).length===0&&document.elementFromPoint(g,D)===r||(n(!0),y(!0))},[a,t,o,l]);return s.useEffect(()=>{let r=a.current;if(!r||l==="none")return;function b(){let w=window.innerWidth-r.getBoundingClientRect().right;f(w>=Oe)}b();let j=setInterval(b,1e3);return()=>{clearInterval(j)}},[a,l]),s.useEffect(()=>{let r=i||document.activeElement===t.current;if(l==="none"||!r)return;let b=setTimeout(S,0),j=setTimeout(S,2e3),w=setTimeout(S,5e3),L=setTimeout(()=>{y(!0)},6e3);return()=>{clearTimeout(b),clearTimeout(j),clearTimeout(w),clearTimeout(L)}},[t,i,l,S]),{hasPWMBadge:d,willPushPWMBadge:v,PWM_BADGE_SPACE_WIDTH:ct}}var Ie=s.createContext({}),Ae=s.forwardRef((a,t)=>{var l=a,{value:i,onChange:d,maxLength:n,textAlign:m="left",pattern:f,placeholder:o,inputMode:y="numeric",onComplete:v,pushPasswordManagerStrategy:S="increase-width",pasteTransformer:r,containerClassName:b,noScriptCSSFallback:j=ut,render:w,children:L}=l,g=nt(l,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),D,U,ae,Y,V;let[oe,ce]=s.useState(typeof g.defaultValue=="string"?g.defaultValue:""),P=i??oe,O=it(P),q=s.useCallback(c=>{d?.(c),ce(c)},[d]),u=s.useMemo(()=>f?typeof f=="string"?new RegExp(f):f:null,[f]),p=s.useRef(null),N=s.useRef(null),C=s.useRef({value:P,onChange:q,isIOS:typeof window<"u"&&((U=(D=window?.CSS)==null?void 0:D.supports)==null?void 0:U.call(D,"-webkit-touch-callout","none"))}),E=s.useRef({prev:[(ae=p.current)==null?void 0:ae.selectionStart,(Y=p.current)==null?void 0:Y.selectionEnd,(V=p.current)==null?void 0:V.selectionDirection]});s.useImperativeHandle(t,()=>p.current,[]),s.useEffect(()=>{let c=p.current,x=N.current;if(!c||!x)return;C.current.value!==c.value&&C.current.onChange(c.value),E.current.prev=[c.selectionStart,c.selectionEnd,c.selectionDirection];function k(){if(document.activeElement!==c){J(null),Z(null);return}let h=c.selectionStart,T=c.selectionEnd,se=c.selectionDirection,R=c.maxLength,$=c.value,I=E.current.prev,F=-1,z=-1,W;if($.length!==0&&h!==null&&T!==null){let Ve=h===T,qe=h===$.length&&$.length<R;if(Ve&&!qe){let H=h;if(H===0)F=0,z=1,W="forward";else if(H===R)F=H-1,z=H,W="backward";else if(R>1&&$.length>1){let ue=0;if(I[0]!==null&&I[1]!==null){W=H<I[1]?"backward":"forward";let Be=I[0]===I[1]&&I[0]<R;W==="backward"&&!Be&&(ue=-1)}F=ue+H,z=ue+H+1}}F!==-1&&z!==-1&&F!==z&&p.current.setSelectionRange(F,z,W)}let je=F!==-1?F:h,Ne=z!==-1?z:T,Le=W??se;J(je),Z(Ne),E.current.prev=[je,Ne,Le]}if(document.addEventListener("selectionchange",k,{capture:!0}),k(),document.activeElement===c&&de(!0),!document.getElementById("input-otp-style")){let h=document.createElement("style");if(h.id="input-otp-style",document.head.appendChild(h),h.sheet){let T="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";ee(h.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),ee(h.sheet,`[data-input-otp]:autofill { ${T} }`),ee(h.sheet,`[data-input-otp]:-webkit-autofill { ${T} }
1`),ee(h.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),ee(h.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let _=()=>{x&&x.style.setProperty("--root-height",`${c.clientHeight}px`)};_();let M=new ResizeObserver(_);return M.observe(c),()=>{document.removeEventListener("selectionchange",k,{capture:!0}),M.disconnect()}},[]);let[me,ge]=s.useState(!1),[X,de]=s.useState(!1),[B,J]=s.useState(null),[G,Z]=s.useState(null);s.useEffect(()=>{lt(()=>{var c,x,k,_;(c=p.current)==null||c.dispatchEvent(new Event("input"));let M=(x=p.current)==null?void 0:x.selectionStart,h=(k=p.current)==null?void 0:k.selectionEnd,T=(_=p.current)==null?void 0:_.selectionDirection;M!==null&&h!==null&&(J(M),Z(h),E.current.prev=[M,h,T])})},[P,X]),s.useEffect(()=>{O!==void 0&&P!==O&&O.length<n&&P.length===n&&v?.(P)},[n,v,O,P]);let Q=xt({containerRef:N,inputRef:p,pushPasswordManagerStrategy:S,isFocused:X}),he=s.useCallback(c=>{let x=c.currentTarget.value.slice(0,n);if(x.length>0&&u&&!u.test(x)){c.preventDefault();return}typeof O=="string"&&x.length<O.length&&document.dispatchEvent(new Event("selectionchange")),q(x)},[n,q,O,u]),fe=s.useCallback(()=>{var c;if(p.current){let x=Math.min(p.current.value.length,n-1),k=p.current.value.length;(c=p.current)==null||c.setSelectionRange(x,k),J(x),Z(k)}de(!0)},[n]),be=s.useCallback(c=>{var x,k;let _=p.current;if(!r&&(!C.current.isIOS||!c.clipboardData||!_))return;let M=c.clipboardData.getData("text/plain"),h=r?r(M):M;c.preventDefault();let T=(x=p.current)==null?void 0:x.selectionStart,se=(k=p.current)==null?void 0:k.selectionEnd,R=(T!==se?P.slice(0,T)+h+P.slice(se):P.slice(0,T)+h+P.slice(T)).slice(0,n);if(R.length>0&&u&&!u.test(R))return;_.value=R,q(R);let $=Math.min(R.length,n-1),I=R.length;_.setSelectionRange($,I),J($),Z(I)},[n,q,u,P]),De=s.useMemo(()=>({position:"relative",cursor:g.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[g.disabled]),Pe=s.useMemo(()=>({position:"absolute",inset:0,width:Q.willPushPWMBadge?`calc(100% + ${Q.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:Q.willPushPWMBadge?`inset(0 ${Q.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:m,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[Q.PWM_BADGE_SPACE_WIDTH,Q.willPushPWMBadge,m]),Fe=s.useMemo(()=>s.createElement("input",rt(st({autoComplete:g.autoComplete||"one-time-code"},g),{"data-input-otp":!0,"data-input-otp-placeholder-shown":P.length===0||void 0,"data-input-otp-mss":B,"data-input-otp-mse":G,inputMode:y,pattern:u?.source,"aria-placeholder":o,style:Pe,maxLength:n,value:P,ref:p,onPaste:c=>{var x;be(c),(x=g.onPaste)==null||x.call(g,c)},onChange:he,onMouseOver:c=>{var x;ge(!0),(x=g.onMouseOver)==null||x.call(g,c)},onMouseLeave:c=>{var x;ge(!1),(x=g.onMouseLeave)==null||x.call(g,c)},onFocus:c=>{var x;fe(),(x=g.onFocus)==null||x.call(g,c)},onBlur:c=>{var x;de(!1),(x=g.onBlur)==null||x.call(g,c)}})),[he,fe,be,y,Pe,n,G,B,g,u?.source,P]),xe=s.useMemo(()=>({slots:Array.from({length:n}).map((c,x)=>{var k;let _=X&&B!==null&&G!==null&&(B===G&&x===B||x>=B&&x<G),M=P[x]!==void 0?P[x]:null,h=P[0]!==void 0?null:(k=o?.[x])!=null?k:null;return{char:M,placeholderChar:h,isActive:_,hasFakeCaret:_&&M===null}}),isFocused:X,isHovering:!g.disabled&&me}),[X,me,n,G,B,g.disabled,P]),ze=s.useMemo(()=>w?w(xe):s.createElement(Ie.Provider,{value:xe},L),[L,xe,w]);return s.createElement(s.Fragment,null,j!==null&&s.createElement("noscript",null,s.createElement("style",null,j)),s.createElement("div",{ref:N,"data-input-otp-container":!0,style:De,className:b},ze,s.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Fe)))});Ae.displayName="Input";function ee(a,t){try{a.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var ut=`
2[data-input-otp] {
3  --nojs-bg: white !important;
4  --nojs-fg: black !important;
5
6  background-color: var(--nojs-bg) !important;
7  color: var(--nojs-fg) !important;
8  caret-color: var(--nojs-fg) !important;
9  letter-spacing: .25em !important;
10  text-align: center !important;
11  border: 1px solid var(--nojs-fg) !important;
12  border-radius: 4px !important;
13  width: 100% !important;
14}
15@media (prefers-color-scheme: dark) {
16  [data-input-otp] {
17    --nojs-bg: black !important;
18    --nojs-fg: white !important;
19  }
20}`;function pt({className:a,containerClassName:t,...l}){return e.jsx(Ae,{"data-loc":"client/src/components/ui/input-otp.tsx:15","data-slot":"input-otp",containerClassName:re("flex items-center gap-2 has-disabled:opacity-50",t),className:re("disabled:cursor-not-allowed",a),...l})}function Ce({className:a,...t}){return e.jsx("div",{"data-loc":"client/src/components/ui/input-otp.tsx:29","data-slot":"input-otp-group",className:re("flex items-center",a),...t})}function K({index:a,className:t,...l}){const i=s.useContext(Ie),{char:d,hasFakeCaret:n,isActive:m}=i?.slots[a]??{};return e.jsxs("div",{"data-loc":"client/src/components/ui/input-otp.tsx:48","data-slot":"input-otp-slot","data-active":m,className:re("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...l,children:[d,n&&e.jsx("div",{"data-loc":"client/src/components/ui/input-otp.tsx:59",className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:e.jsx("div",{"data-loc":"client/src/components/ui/input-otp.tsx:60",className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function vt({...a}){return e.jsx("div",{"data-loc":"client/src/components/ui/input-otp.tsx:69","data-slot":"input-otp-separator",role:"separator",...a,children:e.jsx($e,{"data-loc":"client/src/components/ui/input-otp.tsx:70"})})}
20const mt="hrF0XfkFQ0o",gt="6pwpoufe8O4",ke="https://d2xsxph8kpxj0f.cloudfront.net/310419663030180971/RqVKDBNKvEnQfx7cpeJ6uQ/sara-avatar-1-AXTYhTDmayHuv7nwwX53p2.webp",ht="https://d2xsxph8kpxj0f.cloudfront.net/310419663030180971/RqVKDBNKvEnQfx7cpeJ6uQ/logo-formazionelive_72dc4288.webp";function le(){return e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:54",className:"flex items-center gap-1 px-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Preventivo.tsx:55",className:"w-2 h-2 bg-[#e8722a] rounded-full animate-[bounce_1.4s_infinite_0ms]"}),e.jsx("span",{"data-loc":"client/src/pages/Preventivo.tsx:56",className:"w-2 h-2 bg-[#e8722a] rounded-full animate-[bounce_1.4s_infinite_200ms]"}),e.jsx("span",{"data-loc":"client/src/pages/Preventivo.tsx:57",className:"w-2 h-2 bg-[#e8722a] rounded-full animate-[bounce_1.4s_infinite_400ms]"})]})}function Ee({videoId:a=mt,title:t="Demo piattaforma in azione",subtitle:l="Traduzione simultanea in tempo reale"}){const[i,d]=s.useState(!1);return e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:66",className:"my-4 mx-auto max-w-md rounded-2xl overflow-hidden border border-slate-200 shadow-lg",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:67",className:"bg-gradient-to-r from-[#1e3a5f] to-[#2a4f7a] px-4 py-3 flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:68",className:"w-7 h-7 rounded-full bg-white/10 flex items-center justify-center",children:e.jsx(we,{"data-loc":"client/src/pages/Preventivo.tsx:69",className:"w-3.5 h-3.5 text-[#e8722a]"})}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:71",children:[e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:72",className:"text-white text-xs font-semibold",children:t}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:73",className:"text-white/60 text-[10px]",children:l})]})]}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:76",className:"relative aspect-video bg-black",children:i?e.jsx("iframe",{"data-loc":"client/src/pages/Preventivo.tsx:90",className:"w-full h-full",src:`https://www.youtube.com/embed/${a}?autoplay=1&rel=0&modestbranding=1`,allow:"autoplay; encrypted-media",allowFullScreen:!0,title:t}):e.jsxs("button",{"data-loc":"client/src/pages/Preventivo.tsx:78",onClick:()=>d(!0),className:"absolute inset-0 flex items-center justify-center group",children:[e.jsx("img",{"data-loc":"client/src/pages/Preventivo.tsx:79",src:`https://i.ytimg.com/vi/${a}/maxresdefault.jpg`,alt:t,className:"w-full h-full object-cover"}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:84",className:"absolute inset-0 bg-black/30 group-hover:bg-black/20 transition-all"}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:85",className:"absolute w-16 h-16 rounded-full bg-[#e8722a] flex items-center justify-center shadow-xl group-hover:scale-110 transition-transform",children:e.jsx(we,{"data-loc":"client/src/pages/Preventivo.tsx:86",className:"w-7 h-7 text-white ml-1"})})]})})]})}function ft({plan:a}){const l={flex:["Nessun canone fisso mensile","Paghi solo le ore effettive di traduzione","Ideale per corsi occasionali (1-2 al mese)","Tutte le 150+ lingue incluse","Attivazione immediata"],standard:["Canone mensile €99 (o annuale con 2 mesi gratis)","Tariffa oraria ridotta: €9.9/ora per lingua","Ideale per 2-4 corsi al mese","Report mensile utilizzo incluso","Supporto prioritario email"],pro:["Canone mensile €249 (o annuale con 2 mesi gratis)","Tariffa oraria minima: €7/ora per lingua","Ideale per formazione intensiva (5+ corsi/mese)","Account manager dedicato","Supporto telefonico diretto"],flat:["Canone mensile €699 (o annuale con 2 mesi gratis)","100 ore-lingua incluse al mese","Oltre le 100 ore: €5.9/ora per lingua","Ideale per grandi volumi e multi-sede","Formazione operatori inclusa","SLA garantito 99.5%"]}[a.slug]||["Contattaci per maggiori dettagli"];return e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:113",className:"mt-2 pl-2 border-l-2 border-[#e8722a]/30 space-y-1",children:l.map((i,d)=>e.jsxs("p",{"data-loc":"client/src/pages/Preventivo.tsx:115",className:"text-[11px] text-slate-600 flex items-start gap-1.5",children:[e.jsx("span",{"data-loc":"client/src/pages/Preventivo.tsx:116",className:"text-[#e8722a] mt-0.5",children:"•"})," ",i]},d))})}function bt(){const{data:a,isLoading:t}=A.sales.getPlans.useQuery(),{data:l}=A.sales.getServices.useQuery(),[i,d]=s.useState(null);return t?e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:128",className:"my-4 text-center text-sm text-slate-400",children:"Caricamento piani..."}):!a||a.length===0?null:e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:132",className:"my-4 mx-auto max-w-lg",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:133",className:"bg-gradient-to-r from-[#1e3a5f] to-[#2a4f7a] px-4 py-3 rounded-t-2xl flex items-center gap-2",children:[e.jsx(Ke,{"data-loc":"client/src/pages/Preventivo.tsx:134",className:"w-4 h-4 text-[#e8722a]"}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:135",className:"text-white text-xs font-semibold",children:"Piani e Prezzi"}),e.jsx("span",{"data-loc":"client/src/pages/Preventivo.tsx:136",className:"ml-auto text-white/50 text-[10px]",children:"Costo per ora × lingua attiva"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:138",className:"bg-white border border-t-0 border-slate-200 rounded-b-2xl overflow-hidden shadow-lg",children:[e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:139",className:"divide-y divide-slate-100",children:a.map(n=>e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:141",className:`p-4 transition-colors ${n.isRecommended?"bg-orange-50/50 border-l-4 border-l-[#e8722a]":""}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:142",className:"flex items-center gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:143",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:144",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/Preventivo.tsx:145",className:"font-bold text-[#1e3a5f] text-sm",children:n.name}),n.isRecommended&&e.jsx("span",{"data-loc":"client/src/pages/Preventivo.tsx:147",className:"px-2 py-0.5 bg-[#e8722a] text-white text-[9px] font-bold rounded-full uppercase",children:"Consigliato"})]}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:150",className:"text-xs text-slate-500 mt-0.5",children:n.description}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:151",className:"flex items-baseline gap-1 mt-1",children:[e.jsxs("span",{"data-loc":"client/src/pages/Preventivo.tsx:152",className:"text-lg font-bold text-[#1e3a5f]",children:["€",n.monthlyFeeEur]}),e.jsx("span",{"data-loc":"client/src/pages/Preventivo.tsx:153",className:"text-xs text-slate-400",children:"/mese"}),e.jsxs("span",{"data-loc":"client/src/pages/Preventivo.tsx:154",className:"text-xs text-slate-400 ml-2",children:["+ €",n.hourlyRateEur,"/ora×lingua"]})]})]}),e.jsx("button",{"data-loc":"client/src/pages/Preventivo.tsx:157",onClick:()=>d(i===n.slug?null:n.slug),className:"shrink-0 text-[11px] text-[#e8722a] font-medium hover:underline cursor-pointer",children:i===n.slug?"Chiudi ▲":"Dettagli ▼"})]}),i===n.slug&&e.jsx(ft,{"data-loc":"client/src/pages/Preventivo.tsx:164",plan:n})]},n.id))}),l&&l.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:171",className:"px-4 py-3 border-t border-slate-100 bg-slate-50/50",children:[e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:172",className:"text-[11px] font-semibold text-[#1e3a5f] uppercase tracking-wide mb-2",children:"Servizi accessori"}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:173",className:"space-y-1",children:l.map(n=>e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:175",className:"flex items-center justify-between text-xs",children:[e.jsx("span",{"data-loc":"client/src/pages/Preventivo.tsx:176",className:"text-slate-600",children:n.name}),e.jsxs("span",{"data-loc":"client/src/pages/Preventivo.tsx:177",className:"font-medium text-[#1e3a5f]",children:["€",n.priceEur,n.unit?`/${n.unit}`:""]})]},n.id))})]}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:184",className:"px-4 py-2.5 bg-slate-50 border-t border-slate-100",children:e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:185",className:"text-[10px] text-slate-400 text-center",children:"Tutte le 150+ lingue incluse in ogni piano. Canone mensile o annuale (2 mesi gratis)."})})]})]})}function Pt(){const a=[{flag:"🇬🇧",name:"English"},{flag:"🇫🇷",name:"Français"},{flag:"🇷🇴",name:"Română"},{flag:"🇦🇱",name:"Shqip"},{flag:"🇪🇬",name:"العربية"},{flag:"🇵🇰",name:"اردو"},{flag:"🇧🇩",name:"বাংলা"},{flag:"🇨🇳",name:"中文"},{flag:"🇪🇸",name:"Español"},{flag:"🇩🇪",name:"Deutsch"},{flag:"🇵🇱",name:"Polski"},{flag:"🇺🇦",name:"Українська"},{flag:"🇵🇹",name:"Português"},{flag:"🇷🇺",name:"Русский"},{flag:"🇮🇳",name:"हिन्दी"},{flag:"🇹🇷",name:"Türkçe"}];return e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:206",className:"my-4 mx-auto max-w-md rounded-2xl overflow-hidden border border-slate-200 shadow-lg",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:207",className:"bg-gradient-to-r from-[#1e3a5f] to-[#2a4f7a] px-4 py-3 flex items-center gap-2",children:[e.jsx(Xe,{"data-loc":"client/src/pages/Preventivo.tsx:208",className:"w-4 h-4 text-[#e8722a]"}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:209",className:"text-white text-xs font-semibold",children:"150+ lingue disponibili"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:211",className:"bg-white p-4",children:[e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:212",className:"grid grid-cols-4 gap-2",children:a.map(t=>e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:214",className:"flex flex-col items-center gap-1 p-2 rounded-xl hover:bg-slate-50 transition-colors",children:[e.jsx("span",{"data-loc":"client/src/pages/Preventivo.tsx:215",className:"text-xl",children:t.flag}),e.jsx("span",{"data-loc":"client/src/pages/Preventivo.tsx:216",className:"text-[9px] text-slate-600 text-center leading-tight truncate w-full",children:t.name})]},t.name))}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:220",className:"mt-3 pt-3 border-t border-slate-100 text-center",children:e.jsxs(_e,{"data-loc":"client/src/pages/Preventivo.tsx:221",href:"/lingue",className:"text-xs text-[#e8722a] font-medium hover:underline inline-flex items-center gap-1",children:["Vedi tutte le 150+ lingue ",e.jsx(Je,{"data-loc":"client/src/pages/Preventivo.tsx:222",className:"w-3 h-3"})]})})]})]})}function jt({onCalculate:a}){const[t,l]=s.useState(15),[i,d]=s.useState(2),[n,m]=s.useState(8),f=i*n*300,o=i*n*9.9+99,y=f-o,v=Math.round(y/f*100),S=(o/t).toFixed(2);return e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:243",className:"mx-auto max-w-md my-4 roun
20ded-2xl overflow-hidden border border-slate-200 shadow-lg",children:[e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:244",className:"bg-gradient-to-r from-[#1e3a5f] to-[#2a4f7a] px-5 py-4",children:e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:245",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:246",className:"w-8 h-8 rounded-full bg-white/10 flex items-center justify-center",children:e.jsx(Ue,{"data-loc":"client/src/pages/Preventivo.tsx:247",className:"w-4 h-4 text-[#e8722a]"})}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:249",children:[e.jsx("h3",{"data-loc":"client/src/pages/Preventivo.tsx:250",className:"font-semibold text-white text-sm",children:"Calcolatore Risparmio"}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:251",className:"text-white/60 text-xs",children:"Confronta con un interprete umano"})]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:255",className:"bg-white p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:256",className:"grid grid-cols-3 gap-3 mb-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:257",children:[e.jsx("label",{"data-loc":"client/src/pages/Preventivo.tsx:258",className:"text-[11px] font-medium text-slate-500 uppercase tracking-wide block mb-1.5",children:"Lavoratori"}),e.jsx("input",{"data-loc":"client/src/pages/Preventivo.tsx:259",type:"number",value:t,onChange:r=>l(Math.max(1,parseInt(r.target.value)||1)),className:"w-full px-3 py-2.5 rounded-xl border border-slate-200 text-center text-lg font-semibold text-[#1e3a5f] focus:ring-2 focus:ring-[#e8722a]/30 focus:border-[#e8722a] transition-all"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:262",children:[e.jsx("label",{"data-loc":"client/src/pages/Preventivo.tsx:263",className:"text-[11px] font-medium text-slate-500 uppercase tracking-wide block mb-1.5",children:"Lingue"}),e.jsx("input",{"data-loc":"client/src/pages/Preventivo.tsx:264",type:"number",value:i,onChange:r=>d(Math.max(1,parseInt(r.target.value)||1)),className:"w-full px-3 py-2.5 rounded-xl border border-slate-200 text-center text-lg font-semibold text-[#1e3a5f] focus:ring-2 focus:ring-[#e8722a]/30 focus:border-[#e8722a] transition-all"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:267",children:[e.jsx("label",{"data-loc":"client/src/pages/Preventivo.tsx:268",className:"text-[11px] font-medium text-slate-500 uppercase tracking-wide block mb-1.5",children:"Ore/mese"}),e.jsx("input",{"data-loc":"client/src/pages/Preventivo.tsx:269",type:"number",value:n,onChange:r=>m(Math.max(1,parseInt(r.target.value)||1)),className:"w-full px-3 py-2.5 rounded-xl border border-slate-200 text-center text-lg font-semibold text-[#1e3a5f] focus:ring-2 focus:ring-[#e8722a]/30 focus:border-[#e8722a] transition-all"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:273",className:"grid grid-cols-2 gap-3 mb-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:274",className:"bg-red-50 border border-red-100 rounded-xl p-3 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:275",className:"text-[10px] uppercase tracking-wide text-red-400 font-medium mb-1",children:"Interprete umano"}),e.jsxs("p",{"data-loc":"client/src/pages/Preventivo.tsx:276",className:"text-xl font-bold text-red-600",children:["€",f.toLocaleString()]}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:277",className:"text-[10px] text-red-400",children:"/mese"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:279",className:"bg-emerald-50 border border-emerald-100 rounded-xl p-3 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:280",className:"text-[10px] uppercase tracking-wide text-emerald-500 font-medium mb-1",children:"FormazioneLive"}),e.jsxs("p",{"data-loc":"client/src/pages/Preventivo.tsx:281",className:"text-xl font-bold text-emerald-600",children:["€",o.toFixed(0)]}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:282",className:"text-[10px] text-emerald-400",children:"/mese"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:285",className:"bg-gradient-to-r from-[#e8722a]/5 to-[#e8722a]/10 border border-[#e8722a]/20 rounded-xl p-3 text-center mb-4",children:[e.jsxs("p",{"data-loc":"client/src/pages/Preventivo.tsx:286",className:"text-sm font-semibold text-[#1e3a5f]",children:["Risparmi ",e.jsxs("span",{"data-loc":"client/src/pages/Preventivo.tsx:287",className:"text-[#e8722a] text-lg",children:["€",y.toFixed(0),"/mese"]})," ",e.jsxs("span",{"data-loc":"client/src/pages/Preventivo.tsx:287",className:"text-slate-400",children:["(",v,"%)"]})]}),e.jsxs("p",{"data-loc":"client/src/pages/Preventivo.tsx:289",className:"text-xs text-slate-500 mt-0.5",children:["Solo €",S," per lavoratore al mese"]})]}),e.jsxs("button",{"data-loc":"client/src/pages/Preventivo.tsx:291",onClick:()=>a(`Ho ${t} lavoratori, ${i} lingue diverse, e faccio circa ${n} ore di formazione al mese. Quale piano mi consigliate?`),className:"w-full bg-[#e8722a] hover:bg-[#d4631f] text-white font-medium py-3 px-4 roun
20ded-xl transition-all duration-200 flex items-center justify-center gap-2 shadow-md shadow-[#e8722a]/20 hover:shadow-lg hover:shadow-[#e8722a]/30 active:scale-[0.98]",children:[e.jsx(Ye,{"data-loc":"client/src/pages/Preventivo.tsx:295",className:"w-4 h-4"}),"Chiedi consiglio a Sara"]})]})]})}function Nt({token:a,leadData:t,onSuccess:l}){const{data:i}=A.sales.getPlans.useQuery(),{data:d}=A.sales.getServices.useQuery(),n=A.sales.generateContract.useMutation(),[m,f]=s.useState(!1),[o,y]=s.useState({companyName:t?.companyName||"",legalAddress:t?.legalAddress||"",vatNumber:t?.vatNumber||"",fiscalCode:t?.fiscalCode||"",pecEmail:t?.pecEmail||"",sdiCode:t?.sdiCode||"",legalRepresentative:t?.legalRepresentative||"",contactName:t?.contactName||"",contactEmail:t?.contactEmail||"",contactPhone:t?.contactPhone||"",planSlug:"",selectedServices:[],deliveryMethod:"digital"}),v=(r,b)=>y(j=>({...j,[r]:b})),S=async r=>{r.preventDefault();try{const b=await n.mutateAsync({token:a,planSlug:o.planSlug,companyName:o.companyName,legalAddress:o.legalAddress,vatNumber:o.vatNumber,fiscalCode:o.fiscalCode||void 0,pecEmail:o.pecEmail,sdiCode:o.sdiCode||void 0,legalRepresentative:o.legalRepresentative,contactName:o.contactName,contactEmail:o.contactEmail,contactPhone:o.contactPhone,selectedServices:o.selectedServices.length>0?o.selectedServices:void 0,deliveryMethod:o.deliveryMethod});f(!0),l(b.contractId,o.deliveryMethod)}catch(b){alert("Errore nella generazione del contratto: "+(b.message||"Riprova"))}};return m?e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:432",className:"my-4 mx-auto max-w-md rounded-2xl border border-emerald-200 bg-emerald-50 p-5 text-center shadow-lg",children:[e.jsx(ve,{"data-loc":"client/src/pages/Preventivo.tsx:433",className:"w-10 h-10 text-emerald-500 mx-auto mb-2"}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:434",className:"font-semibold text-emerald-700 text-sm",children:"Contratto generato!"}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:435",className:"text-xs text-emerald-600 mt-1",children:o.deliveryMethod==="digital"?"Procedi con la firma digitale via OTP.":"Scarica il PDF e invialo firmato via PEC."})]}):e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:443",className:"my-4 mx-auto max-w-lg rounded-2xl overflow-hidden border border-slate-200 shadow-lg",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:444",className:"bg-gradient-to-r from-[#1e3a5f] to-[#2a4f7a] px-4 py-3 flex items-center gap-2",children:[e.jsx(ye,{"data-loc":"client/src/pages/Preventivo.tsx:445",className:"w-4 h-4 text-[#e8722a]"}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:446",className:"text-white text-xs font-semibold",children:"Dati per il contratto"})]}),e.jsxs("form",{"data-loc":"client/src/pages/Preventivo.tsx:448",onSubmit:S,className:"bg-white p-5 space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:450",className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:451",children:[e.jsx("label",{"data-loc":"client/src/pages/Preventivo.tsx:452",className:"text-[11px] font-medium text-slate-500 block mb-1",children:"Ragione Sociale *"}),e.jsx("input",{"data-loc":"client/src/pages/Preventivo.tsx:453",type:"text",value:o.companyName,onChange:r=>v("companyName",r.target.value),required:!0,className:"w-full px-3 py-2 rounded-lg border border-slate-200 text-sm focus:ring-2 focus:ring-[#e8722a]/30 focus:border-[#e8722a]"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:456",children:[e.jsx("label",{"data-loc":"client/src/pages/Preventivo.tsx:457",className:"text-[11px] font-medium text-slate-500 block mb-1",children:"P.IVA *"}),e.jsx("input",{"data-loc":"client/src/pages/Preventivo.tsx:458",type:"text",value:o.vatNumber,onChange:r=>v("vatNumber",r.target.value),required:!0,className:"w-full px-3 py-2 rounded-lg border border-slate-200 text-sm focus:ring-2 focus:ring-[#e8722a]/30 focus:border-[#e8722a]"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:462",children:[e.jsx("label",{"data-loc":"client/src/pages/Preventivo.tsx:463",className:"text-[11px] font-medium text-slate-500 block mb-1",children:"Sede Legale *"}),e.jsx("input",{"data-loc":"client/src/pages/Preventivo.tsx:464",type:"text",value:o.legalAddress,onChange:r=>v("legalAddress",r.target.value),required:!0,className:"w-full px-3 py-2 rounded-lg border border-slate-200 text-sm focus:ring-2 focus:ring-[#e8722a]/30 focus:border-[#e8722a]"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:467",className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:468",children:[e.jsx("label",{"data-loc":"client/src/pages/Preventivo.tsx:469",className:"text-[11px] font-medium text-slate-500 block mb-1",children:"Codice Fiscale"}),e.jsx("input",{"data-loc":"client/src/pages/Preventivo.tsx:470",type:"text",value:o.fiscalCode,onChange:r=>v("fiscalCode",r.target.value),className:"w-full px-3 py-2 rounded-lg border border-slate-200 text-sm focus:ring-2 focus:ring-[#e8722a]/30 focus:border-[#e8722a]"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:473",children:[e.jsx("label",{"data-loc":"client/src/pages/Preventivo.tsx:474",className:"text-[11px] font-medium text-slate-500 block mb-1",children:"PEC *"}),e.jsx("input",{"data-loc":"client/src/pages/Preventivo.tsx:475",type:"email",value:o.pecEmail,onChange:r=>v("pecEmail",r.target.value),required:!0,className:"w-full px-3 py-2 rounded-lg border border-slate-200 text-sm focus:ring-2 focus:ring-[#e8722a]/30 focus:border-[#e8722a]"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:479",className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:480",children:[e.jsx("label",{"data-loc":"client/src/pages/Preventivo.tsx:481",className:"text-[11px] font-medium text-slate-500 block mb-1",children:"Codice SDI"}),e.jsx("input",{"data-loc":"client/src/pages/Preventivo.tsx:482",type:"text",value:o.sdiCode,onChange:r=>v("sdiCode",r.target.value),className:"w-full px-3 py-2 rounded-lg border border-slate-200 text-sm focus:ring-2 focus:ring-[#e8722a]/30 focus:border-[#e8722a]"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:485",children:[e.jsx("label",{"data-loc":"client/src/pages/Preventivo.tsx:486",className:"text-[11px] font-medium text-slate-500 block mb-1",children:"Legale Rappresentante *"}),e.jsx("input",{"data-loc":"client/src/pages/Preventivo.tsx:487",type:"text",value:o.legalRepresentative,onChange:r=>v("legalRepresentative",r.target.value),required:!0,className:"w-full px-3 py-2 rounded-lg border border-slate-200 text-sm focus:ring-2 focus:ring-[#e8722a]/30 focus:border-[#e8722a]"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:493",className:"pt-2 border-t border-slate-100",children:[e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:494",className:"text-[11px] font-semibold text-[#1e3a5f] uppercase tracking-wide mb-2",children:"Referente operativo"}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:495",className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:496",children:[e.jsx("label",{"data-loc":"client/src/pages/Preventivo.tsx:497",className:"text-[11px] font-medium text-slate-500 block mb-1",children:"Nome *"}),e.jsx("input",{"data-loc":"client/src/pages/Preventivo.tsx:498",type:"text",value:o.contactName,onChange:r=>v("contactName",r.target.value),required:!0,className:"w-full px-3 py-2 rounded-lg border border-slate-200 text-sm focus:ring-2 focus:ring-[#e8722a]/30 focus:border-[#e8722a]"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:501",children:[e.jsx("label",{"data-loc":"client/src/pages/Preventivo.tsx:502",className:"text-[11px] font-medium text-slate-500 block mb-1",children:"Email *"}),e.jsx("input",{"data-loc":"client/src/pages/Preventivo.tsx:503",type:"email",value:o.contactEmail,onChange:r=>v("contactEmail",r.target.value),required:!0,className:"w-full px-3 py-2 rounded-lg border border-slate-200 text-sm focus:ring-2 focus:ring-[#e8722a]/30 focus:border-[#e8722a]"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:506",children:[e.jsx("label",{"data-loc":"client/src/pages/Preventivo.tsx:507",className:"text-[11px] font-medium text-slate-500 block mb-1",children:"Telefono *"}),e.jsx("input",{"data-loc":"client/src/pages/Preventivo.tsx:508",type:"tel",value:o.contactPhone,onChange:r=>v("contactPhone",r.target.value),required:!0,className:"w-full px-3 py-2 rounded-lg border border-slate-200 text-sm focus:ring-2 focus:ring-[#e8722a]/30 focus:border-[#e8722a]"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:515",className:"pt-2 border-t border-slate-100",children:[e.jsx("label",{"data-loc":"client/src/pages/Preventivo.tsx:516",className:"text-[11px] font-medium text-slate-500 block mb-1",children:"Piano scelto *"}),e.jsxs("select",{"data-loc":"client/src/pages/Preventivo.tsx:517",value:o.planSlug,onChange:r=>v("planSlug",r.target.value),required:!0,className:"w-full px-3 py-2 rounded-lg border border-slate-200 text-sm focus:ring-2 focus:ring-[#e8722a]/30 focus:border-[#e8722a]",children:[e.jsx("option",{"data-loc":"client/src/pages/Preventivo.tsx:519",value:"",children:"Seleziona piano"}),i?.map(r=>e.jsx("option",{"data-loc":"client/src/pages/Preventivo.tsx:520",value:r.slug,children:r.name},r.slug))]})]}),d&&d.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:526",className:"pt-2 border-t border-slate-100",children:[e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:527",className:"text-[11px] font-semibold text-[#1e3a5f] uppercase tracking-wide mb-2",children:"Servizi accessori (opzionali)"}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:528",className:"space-y-2",children:d.map(r=>e.jsxs("label",{"data-loc":"client/src/pages/Preventivo.tsx:530",className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{"data-loc":"client/src/pages/Preventivo.tsx:531",type:"checkbox",checked:o.selectedServices.includes(r.id),onChange:b=>{b.target.checked?v("selectedServices",[...o.selectedServices,r.id]):v("selectedServices",o.selectedServices.filter(j=>j!==r.id))},className:"w-4 h-4 rounded border-slate-300 text-[#e8722a] focus:ring-[#e8722a]"}),e.jsxs("span",{"data-loc":"client/src/pages/Preventivo.tsx:540",className:"text-xs text-slate-700",children:[r.name," — €",r.priceEur]})]},r.id))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:548",className:"pt-2 border-t border-slate-100",children:[e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:549",className:"text-[11px] font-semibold text-[#1e3a5f] uppercase tracking-wide mb-2",children:"Modalità firma"}),e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:550",className:"grid grid-cols-2 gap-2",children:[e.jsxs("button",{"data-loc":"client/src/pages/Preventivo.tsx:551",type:"button",onClick:()=>v("deliveryMethod","digital"),className:`p-3 rounded-xl border text-center transition-all ${o.deliveryMethod==="digital"?"border-[#e8722a] bg-[#e8722a]/5 ring-2 ring-[#e8722a]/20":"border-slate-200 hover:border-slate-300"}`,children:[e.jsx(pe,{"data-loc":"client/src/pages/Preventivo.tsx:553",className:"w-5 h-5 mx-auto mb-1 text-[#e8722a]"}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:554",className:"text-xs font-medium text-[#1e3a5f]",children:"Firma digitale"}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:555",className:"text-[10px] text-slate-400",children:"Via email OTP"})]}),e.jsxs("button",{"data-loc":"client/src/pages/Preventivo.tsx:557",type:"button",onClick:()=>v("deliveryMethod","paper"),className:`p-3 rounded-xl border text-center transition-all ${o.deliveryMethod==="paper"?"border-[#e8722a] bg-[#e8722a]/5 ring-2 ring-[#e8722a]/20":"border-slate-200 hover:border-slate-300"}`,children:[e.jsx(Ze,{"data-loc":"client/src/pages/Preventivo.tsx:559",className:"w-5 h-5 mx-auto mb-1 text-slate-500"}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:560",className:"text-xs font-medium text-[#1e3a5f]",children:"Firma cartacea"}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:561",className:"text-[10px] text-slate-400",children:"Stampa e invia PEC"})]})]})]}),e.jsx("button",{"data-loc":"client/src/pages/Preventivo.tsx:566",type:"submit",disabled:n.isPending,className:"w-full bg-[#e8722a] hover:bg-[#d4631f] disabled:bg-slate-300 text-white font-medium py-3 px-4 roun
20ded-xl transition-all flex items-center justify-center gap-2 shadow-md shadow-[#e8722a]/20 mt-3",children:n.isPending?e.jsx(le,{"data-loc":"client/src/pages/Preventivo.tsx:568"}):e.jsxs(e.Fragment,{children:[e.jsx(ye,{"data-loc":"client/src/pages/Preventivo.tsx:568",className:"w-4 h-4"})," Genera Contratto"]})})]})]})}function wt({token:a,contractId:t,onSuccess:l}){const i=A.sales.requestOTP.useMutation(),d=A.sales.verifyOTP.useMutation(),[n,m]=s.useState(""),[f,o]=s.useState(!1),[y,v]=s.useState(!1),[S,r]=s.useState(""),b=async()=>{r("");try{await i.mutateAsync({token:a,contractId:t}),o(!0)}catch(w){r(w.message||"Errore nell'invio del codice")}},j=async()=>{if(n.length===6){r("");try{await d.mutateAsync({token:a,contractId:t,otp:n}),v(!0),l()}catch(w){r(w.message||"Codice non valido"),m("")}}};return y?e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:609",className:"my-4 mx-auto max-w-md rounded-2xl border border-emerald-200 bg-emerald-50 p-6 text-center shadow-lg",children:[e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:610",className:"w-14 h-14 rounded-full bg-emerald-100 flex items-center justify-center mx-auto mb-3",children:e.jsx(ve,{"data-loc":"client/src/pages/Preventivo.tsx:611",className:"w-8 h-8 text-emerald-600"})}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:613",className:"font-bold text-emerald-700 text-lg",children:"Contratto firmato!"}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:614",className:"text-sm text-emerald-600 mt-2",children:"Riceverai una conferma via email. Il nostro team attiverà la piattaforma entro 24 ore."})]}):e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:620",className:"my-4 mx-auto max-w-md rounded-2xl overflow-hidden border border-slate-200 shadow-lg",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:621",className:"bg-gradient-to-r from-[#1e3a5f] to-[#2a4f7a] px-4 py-3 flex items-center gap-2",children:[e.jsx(pe,{"data-loc":"client/src/pages/Preventivo.tsx:622",className:"w-4 h-4 text-[#e8722a]"}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:623",className:"text-white text-xs font-semibold",children:"Firma digitale via OTP"})]}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:625",className:"bg-white p-5 text-center",children:f?e.jsxs(e.Fragment,{children:[e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:636",className:"text-sm text-slate-600 mb-4",children:"Inserisci il codice a 6 cifre ricevuto via email:"}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:637",className:"flex justify-center mb-4",children:e.jsxs(pt,{"data-loc":"client/src/pages/Preventivo.tsx:638",maxLength:6,value:n,onChange:w=>m(w),children:[e.jsxs(Ce,{"data-loc":"client/src/pages/Preventivo.tsx:639",children:[e.jsx(K,{"data-loc":"client/src/pages/Preventivo.tsx:640",index:0}),e.jsx(K,{"data-loc":"client/src/pages/Preventivo.tsx:641",index:1}),e.jsx(K,{"data-loc":"client/src/pages/Preventivo.tsx:642",index:2})]}),e.jsx(vt,{"data-loc":"client/src/pages/Preventivo.tsx:644"}),e.jsxs(Ce,{"data-loc":"client/src/pages/Preventivo.tsx:645",children:[e.jsx(K,{"data-loc":"client/src/pages/Preventivo.tsx:646",index:3}),e.jsx(K,{"data-loc":"client/src/pages/Preventivo.tsx:647",index:4}),e.jsx(K,{"data-loc":"client/src/pages/Preventivo.tsx:648",index:5})]})]})}),S&&e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:652",className:"text-xs text-red-500 mb-3",children:S}),e.jsx("button",{"data-loc":"client/src/pages/Preventivo.tsx:653",onClick:j,disabled:d.isPending||n.length!==6,className:"bg-[#e8722a] hover:bg-[#d4631f] disabled:bg-slate-300 text-white font-medium py-3 px-6 rounded-xl transition-all shadow-md shadow-[#e8722a]/20 inline-flex items-center gap-2",children:d.isPending?e.jsx(le,{"data-loc":"client/src/pages/Preventivo.tsx:655"}):e.jsxs(e.Fragment,{children:[e.jsx(Qe,{"data-loc":"client/src/pages/Preventivo.tsx:655",className:"w-4 h-4"})," Firma contratto"]})}),e.jsx("button",{"data-loc":"client/src/pages/Preventivo.tsx:657",onClick:b,disabled:i.isPending,className:"block mx-auto mt-3 text-xs text-slate-400 hover:text-[#e8722a] transition-colors",children:"Non hai ricevuto il codice? Reinvia"})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:628",className:"text-sm text-slate-600 mb-4",children:"Invieremo un codice di verifica a 6 cifre alla tua email per firmare il contratto."}),e.jsx("button",{"data-loc":"client/src/pages/Preventivo.tsx:629",onClick:b,disabled:i.isPending,className:"bg-[#e8722a] hover:bg-[#d4631f] disabled:bg-slate-300 text-white font-medium py-3 px-6 rounded-xl transition-all shadow-md shadow-[#e8722a]/20 inline-flex items-center gap-2",children:i.isPending?e.jsx(le,{"data-loc":"client/src/pages/Preventivo.tsx:631"}):e.jsxs(e.Fragment,{children:[e.jsx(Ge,{"data-loc":"client/src/pages/Preventivo.tsx:631",className:"w-4 h-4"})," Invia codice OTP"]})})]})})]})}function yt({onAction:a}){const t=[{label:"Preventivo gratuito",text:"Vorrei ricevere un preventivo personalizzato per la mia azienda."},{label:"Come funziona?",text:"Potete spiegarmi come funziona il servizio di traduzione simultanea?"},{label:"Quanto costa?",text:"Quali sono i costi e i piani disponibili?"},{label:"Maggiori informazioni",text:"Vorrei avere maggiori informazioni sul servizio e su 
20come può aiutare la mia azienda."}];return e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:678",className:"flex flex-wrap gap-2 justify-center my-3",children:t.map(l=>e.jsx("button",{"data-loc":"client/src/pages/Preventivo.tsx:680",onClick:()=>a(l.text),className:"px-3.5 py-1.5 bg-transparent border border-slate-200 rounded-full text-[11px] text-slate-500 hover:border-[#e8722a]/50 hover:text-[#e8722a] transition-all duration-200 active:scale-[0.97] cursor-pointer",children:l.label},l.label))})}function St(a){const t=[],l=/\[SHOW_(VIDEO|VIDEO_DEMO|PLANS|CALCULATOR|LANGUAGES|FORM_QUOTE|FORM_CONTRACT)\]/g;let i=0,d;for(;(d=l.exec(a))!==null;){if(d.index>i){const f=a.slice(i,d.index).trim();f&&t.push({type:"text",content:f})}const n=d[1].toLowerCase(),m=n==="form_quote"?"form_quote":n==="form_contract"?"form_contract":n==="video_demo"?"video_demo":n;t.push({type:m}),i=d.index+d[0].length}if(i<a.length){const n=a.slice(i).trim();n&&t.push({type:"text",content:n})}return t.length===0&&a.trim()&&t.push({type:"text",content:a.trim()}),t}function Ct(a){return a.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/\n/g,"<br/>")}const ie="sara_chat_token",te="sara_chat_token_ts",kt=14400*1e3;function Et(){try{const a=localStorage.getItem(ie),t=localStorage.getItem(te);return!a||!t?null:Date.now()-parseInt(t,10)>kt?(localStorage.removeItem(ie),localStorage.removeItem(te),null):a}catch{return null}}function Te(a){try{localStorage.setItem(ie,a),localStorage.setItem(te,Date.now().toString())}catch{}}function Tt(){try{localStorage.setItem(te,Date.now().toString())}catch{}}function _t(){try{localStorage.removeItem(ie),localStorage.removeItem(te)}catch{}}function Ft(){const[a,t]=s.useState([]),[l,i]=s.useState(""),[d,n]=s.useState(!1),[m,f]=s.useState(()=>Et()),[o,y]=s.useState(null),[v,S]=s.useState(!0),[r,b]=s.useState(null),[j,w]=s.useState(!1),[L,g]=s.useState(!1),D=s.useRef(null),U=s.useRef(null),ae=A.sales.startConversation.useMutation(),Y=A.sales.sendMessage.useMutation();s.useEffect(()=>{const u=m;ae.mutate({source:"chatbot",token:u||void 0},{onSuccess:p=>{p.token&&(f(p.token),Te(p.token)),t(p.messages),p.leadData&&y(p.leadData),g(!0)},onError:()=>{_t(),f(null),g(!0)}})},[]),s.useEffect(()=>{D.current?.scrollIntoView({behavior:"smooth"})},[a,d,j]);const V=s.useCallback(async u=>{const p=u||l.trim();if(!(!p||d)){i(""),S(!1),t(N=>[...N,{role:"user",content:p}]),n(!0);try{const N=await Y.mutateAsync({token:m||null,message:p,source:"chatbot"});N.token&&!m?(f(N.token),Te(N.token)):Tt(),t(C=>[...C,{role:"assistant",content:N.message}]),N.leadData&&y(N.leadData)}catch{t(N=>[...N,{role:"assistant",content:"Mi scuso, si è verificato un errore temporaneo. Riprova tra un momento."}])}finally{n(!1),U.current?.focus()}}},[l,m,d,Y]),oe=u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),V())},ce=u=>{i(u.target.value),u.target.style.height="auto",u.target.style.height=Math.min(u.target.scrollHeight,120)+"px"},P=(u,p)=>{b(u),p==="digital"?(w(!0),t(N=>[...N,{role:"assistant",content:"Contratto generato! Ora puoi firmarlo digitalmente con un codice OTP che invieremo alla tua email."}])):t(N=>[...N,{role:"assistant",content:"Contratto generato! Puoi scaricarlo dal link ricevuto via email, stamparlo e inviarcelo firmato via PEC."}])},O=()=>{t(u=>[...u,{role:"assistant",content:`🎉 **Contratto firmato con successo!**
21
22Riceverai una conferma via email. Il nostro team attiverà la piattaforma entro 24 ore lavorative.
23
24Grazie per aver scelto FormazioneLive!`}])},q=(u,p)=>{const N=u.role==="assistant"?St(u.content):[{type:"text",content:u.content}];return e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:936",className:`flex gap-2.5 ${u.role==="user"?"justify-end":"justify-start"} animate-[fadeIn_0.3s_ease-out]`,children:[u.role==="assistant"&&e.jsx("img",{"data-loc":"client/src/pages/Preventivo.tsx:938",src:ke,alt:"Sara",className:"w-8 h-8 rounded-xl object-cover shrink-0 mt-1 shadow-sm ring-1 ring-slate-200"}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:940",className:`max-w-[90%] sm:max-w-[80%] ${u.role==="user",""}`,children:N.map((C,E)=>C.type==="text"?e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:944",className:`px-4 py-3 mb-1 ${u.role==="user"?"bg-gradient-to-br from-[#e8722a] to-[#d4631f] text-white rounded-2xl rounded-br-md shadow-md shadow-[#e8722a]/15":"bg-white text-slate-800 rounded-2xl rounded-bl-md shadow-sm border border-slate-100"}`,children:e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:949",className:"text-sm leading-relaxed whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:Ct(C.content)}})},E):C.type==="video"?e.jsx(Ee,{"data-loc":"client/src/pages/Preventivo.tsx:953"},E):C.type==="video_demo"?e.jsx(Ee,{"data-loc":"client/src/pages/Preventivo.tsx:954",videoId:gt,title:"Demo tecnica della piattaforma",subtitle:"Guarda come funziona in tempo reale"},E):C.type==="plans"?e.jsx(bt,{"data-loc":"client/src/pages/Preventivo.tsx:955"},E):C.type==="calculator"?e.jsx(jt,{"data-loc":"client/src/pages/Preventivo.tsx:956",onCalculate:V},E):C.type==="languages"?e.jsx(Pt,{"data-loc":"client/src/pages/Preventivo.tsx:957"},E):C.type==="form_quote"?e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:959",className:"my-4 mx-auto max-w-md rounded-2xl border border-emerald-200 bg-emerald-50 p-5 text-center shadow-lg",children:[e.jsx(ve,{"data-loc":"client/src/pages/Preventivo.tsx:960",className:"w-10 h-10 text-emerald-500 mx-auto mb-2"}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:961",className:"font-semibold text-emerald-700 text-sm",children:"Il preventivo viene inv
24iato automaticamente via email!"}),e.jsx("p",{"data-loc":"client/src/pages/Preventivo.tsx:962",className:"text-xs text-emerald-600 mt-1",children:"Fornisci nome, azienda e email a Sara per riceverlo."})]},E):C.type==="form_contract"&&m?e.jsx(Nt,{"data-loc":"client/src/pages/Preventivo.tsx:965",token:m,leadData:o,onSuccess:P},E):null)}),u.role==="user"&&e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:970",className:"w-8 h-8 rounded-xl bg-slate-200 flex items-center justify-center shrink-0 mt-1",children:e.jsx(He,{"data-loc":"client/src/pages/Preventivo.tsx:971",className:"w-4 h-4 text-slate-500"})})]},p)};return e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:979",className:"min-h-screen bg-[#f8f9fb] flex flex-col",children:[e.jsx("header",{"data-loc":"client/src/pages/Preventivo.tsx:981",className:"bg-white border-b border-slate-200 sticky top-0 z-50 shadow-sm",children:e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:982",className:"max-w-3xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsx(_e,{"data-loc":"client/src/pages/Preventivo.tsx:983",href:"/",className:"flex items-center gap-2.5 group",children:e.jsx("img",{"data-loc":"client/src/pages/Preventivo.tsx:984",src:ht,alt:"FormazioneLive",className:"h-9 w-auto group-hover:scale-105 transition-transform"})}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:986",className:"flex items-center gap-3",children:e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:987",className:"flex items-center gap-2 px-3 py-1.5 bg-emerald-50 border border-emerald-200 rounded-full",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:988",className:"relative",children:[e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:989",className:"w-2 h-2 bg-emerald-500 rounded-full"}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:990",className:"absolute inset-0 w-2 h-2 bg-emerald-500 rounded-full animate-ping opacity-75"})]}),e.jsx("span",{"data-loc":"client/src/pages/Preventivo.tsx:992",className:"text-xs font-semibold text-emerald-700",children:"Sara online"})]})})]})}),e.jsxs("main",{"data-loc":"client/src/pages/Preventivo.tsx:999",className:"flex-1 max-w-3xl w-full mx-auto px-4 pt-14 sm:pt-6 pb-6 overflow-y-auto",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:1003",className:"space-y-4",children:[a.map((u,p)=>q(u,p)),d&&e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:1008",className:"flex gap-2.5 justify-start animate-[fadeIn_0.2s_ease-out]",children:[e.jsx("img",{"data-loc":"client/src/pages/Preventivo.tsx:1009",src:ke,alt:"Sara",className:"w-8 h-8 rounded-xl object-cover shrink-0 shadow-sm ring-1 ring-slate-200"}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:1010",className:"bg-white border border-slate-100 rounded-2xl rounded-bl-md px-4 py-3 shadow-sm",children:e.jsx(le,{"data-loc":"client/src/pages/Preventivo.tsx:1011"})})]}),j&&r&&m&&e.jsx(wt,{"data-loc":"client/src/pages/Preventivo.tsx:1018",token:m,contractId:r,onSuccess:O}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:1021",ref:D})]}),v&&a.length<=1&&e.jsx(yt,{"data-loc":"client/src/pages/Preventivo.tsx:1026",onAction:V})]}),e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:1031",className:"sticky bottom-0 bg-white/95 backdrop-blur-sm border-t border-slate-100 shadow-[0_-2px_12px_rgba(0,0,0,0.06)]",children:e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:1032",className:"max-w-3xl mx-auto px-4 py-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Preventivo.tsx:1033",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/Preventivo.tsx:1034",className:"flex-1 relative",children:e.jsx("textarea",{"data-loc":"client/src/pages/Preventivo.tsx:1035",ref:U,value:l,onChange:ce,onKeyDown:oe,placeholder:"Scrivi qui la tua domanda...",rows:1,className:"w-full resize-none pl-4 pr-4 py-3.5 rounded-xl border-2 border-[#e8722a]/60 bg-white focus:border-[#e8722a] focus:ring-2 focus:ring-[#e8722a]/20 transition-all text-[15px] placeholder:text-[#e8722a]/50 placeholder:font-medium leading-relaxed shadow-sm animate-[inputGlow_2s_ease-in-out_infinite]",style:{maxHeight:"120px"},disabled:d})}),e.jsxs("button",{"data-loc":"client/src/pages/Preventivo.tsx:1047",onClick:()=>V(),disabled:!l.trim()||d,className:"h-[46px] px-5 rounded-xl bg-gradient-to-br from-[#e8722a] to-[#d4631f] hover:from-[#d4631f] hover:to-[#c05a1a] disabled:from-slate-300 disabled:to-slate-300 disabled:cursor-not-allowed text-white flex items-center justify-center gap-2 transition-all duration-200 shrink-0 shadow-md shadow-[#e8722a]/20 hover:shadow-lg active:scale-[0.95] font-medium text-sm",children:[e.jsx(We,{"data-loc":"client/src/pages/Preventivo.tsx:1052",className:"w-4 h-4"}),e.jsx("span",{"data-loc":"client/src/pages/Preventivo.tsx:1053",className:"hidden sm:inline",children:"Invia"})]})]}),e.jsxs("p",{"data-loc":"client/src/pages/Preventivo.tsx:1056",className:"text-[10px] text-slate-400 text-center mt-2",children:[e.jsx(pe,{"data-loc":"client/src/pages/Preventivo.tsx:1057",className:"w-3 h-3 inline-block mr-1 -mt-0.5"}),"Conversazione registrata per migliorare il servizio — ",e.jsx("a",{"data-loc":"client/src/pages/Preventivo.tsx:1058",href:"/privacy",className:"underline hover:text-[#e8722a]",children:"Privacy"})]})]})}),e.jsx("style",{"data-loc":"client/src/pages/Preventivo.tsx:1064",children:`
25        @keyframes fadeIn {
26          from { opacity: 0; transform: translateY(8px); }
27          to { opacity: 1; transform: translateY(0); }
28        }
29        @keyframes inputGlow {
30          0%, 100% { box-shadow: 0 0 0 0 rgba(232, 114, 42, 0.1); }
31          50% { box-shadow: 0 0 12px 3px rgba(232, 114, 42, 0.15); }
32        }
33      `})]})}
33export{Ft as default};

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.