1import{u as L,r as v,i as y,p as M,T,g as _,c as A,C as R,j as e,P as k}from"./index-D_2_SFfh.js";function S(t){if(Array.isArray(t))return t.flatMap(c=>S(c));if(typeof t!="string")return[];const a=[];let r=0,s,l,n,o,d;const u=()=>{for(;r<t.length&&/\s/.test(t.charAt(r));)r+=1;return r<t.length},p=()=>(l=t.charAt(r),l!=="="&&l!==";"&&l!==",");for(;r<t.length;){for(s=r,d=!1;u();)if(l=t.charAt(r),l===","){for(n=r,r+=1,u(),o=r;r<t.length&&p();)r+=1;r<t.length&&t.charAt(r)==="="?(d=!0,r=o,a.push(t.slice(s,n)),s=r):r=n+1}else r+=1;(!d||r>=t.length)&&a.push(t.slice(s))}return a}function V(t){return t instanceof Headers?t:Array.isArray(t)?new Headers(t):typeof t=="object"?new Headers(t):null}function P(...t){return t.reduce((a,r)=>{const s=V(r);if(!s)return a;for(const[l,n]of s.entries())l==="set-cookie"?S(n).forEach(o=>a.append("set-cookie",o)):a.set(l,n);return a},new Headers)}function H(t){const a=L();return v.useCallback(async(...r)=>{try{const s=await t(...r);if(y(s))throw s;return s}catch(s){if(y(s))return s.options._fromLocation=a.stores.location.get(),a.navigate(a.resolveRedirect(s).options);throw s}},[a,t])}function F(t){return t!=="__proto__"&&t!=="constructor"&&t!=="prototype"}function N(t,a){const r=Object.create(null);if(t)for(const s of Object.keys(t))F(s)&&(r[s]=t[s]);if(a&&typeof a=="object")for(const s of Object.keys(a))F(s)&&(r[s]=a[s]);return r}function q(t){return Object.create(null)}var E=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")},w=(t,a)=>{const r=a||t||{};return typeof r.method>"u"&&(r.method="GET"),Object.assign(n=>w(void 0,{...r,...n}),{options:r,middleware:n=>{const o=[...r.middleware||[]];n.map(u=>{T in u?u.options.middleware&&o.push(...u.options.middleware):o.push(u)});const d=w(void 0,{...r,middleware:o});return d[T]=!0,d},inputValidator:n=>w(void 0,{...r,inputValidator:n}),handler:(...n)=>{const[o,d]=n,u={...r,extractedFn:o,serverFn:d},p=[...u.middleware||[],G(u)];return o.method=r.method,Object.assign(async c=>{const i=await O(p,"client",{...o,...u,data:c?.data,headers:c?.headers,signal:c?.signal,fetch:c?.fetch,context:q()}),b=M(i.error);if(b)throw b;if(i.error)throw i.error;return i.result},{...o,method:r.method,__executeServer:async c=>{const i=E(),b=i.contextAfterGlobalMiddlewares;return await O(p,"server",{...o,...c,serverFnMeta:o.serverFnMeta,context:N(c.context,b),request:i.request}).then(m=>({result:m.result,error:m.error,context:m.sendContext}))}})}})};async function O(t,a,r){let s=I([..._()?.functionMiddleware||[],...t]);if(a==="server"){const n=E();n?.executedRequestMiddlewares&&(s=s.filter(o=>!n.executedRequestMiddlewares.has(o)))}const l=async n=>{const o=s.shift();if(!o)return n;try{"inputValidator"in o.options&&o.options.inputValidator&&a==="server"&&(n.data=await z(o.options.inputValidator,n.data));let d;if(a==="client"?"client"in o.options&&(d=o.options.client):"server"in o.options&&(d=o.options.server),d){const p=await d({...n,next:async(c={})=>{const i=await l({...n,...c,context:N(n.context,c.context),sendContext:N(n.sendContext,c.sendContext),headers:P(n.headers,c.headers),_callSiteFetch:n._callSiteFetch,fetch:n._callSiteFetch??c.fetch??n.fetch,result:c.result!==void 0?c.result:c instanceof Response?c:n.result,error:c.error??n.error});if(i.error)throw i.error;return i}});if(y(p))return{...n,error:p};if(p instanceof Response)return{...n,result:p};if(!p)throw new Error("User middleware returned undefined. You must call next() or return a result in your middlewares.");return p}return l(n)}catch(d){return{...n,error:d}}};return l({...r,headers:r.headers||{},sendContext:r.sendContext||{},context:r.context||q(),_callSiteFetch:r.fetch})}function I(t,a=100){const r=new Set,s=[],l=(n,o)=>{if(o>a)throw new Error(`Middleware nesting depth exceeded maximum of ${a}. Check for circular references.`);n.forEach(d=>{d.options.middleware&&l(d.options.middleware,o+1),r.has(d)||(r.add(d),s.push(d))})};return l(t,0),s}async function z(t,a){if(t==null)return{};if("~standard"in t){const r=await t["~standard"].validate(a);if(r.issues)throw new Error(JSON.stringify(r.issues,void 0,2));return r.value}if("parse"in t)return t.parse(a);if(typeof t=="function")return t(a);throw new Error("Invalid validator type!")}function G(t){return{"~types":void 0,options:{inputValidator:t.inputValidator,client:async({next:a,sendContext:r,fetch:s,...l})=>{const n={...l,context:r,fetch:s};return a(await t.extractedFn?.(n))},server:async({next:a,...r})=>{const s=await t.serverFn?.(r);return a({...r,result:s})}}}}const U=w({method:"POST"}).handler(A("251114e3fbe5e14dea4d3a329bdf36a2c48c1fd10ce685be81c57e80286542b6")),Y=["Orçamento de palestra","Orçamento de Treinamento","Compra de livros Corporativo","Programas de Consultoria","Imprensa","Parceria","Outros"],D="mt-2 w-full border-b border-border bg-transparent py-2 text-foreground outline-none transition-colors focus:border-[var(--amber-brand)]",C="mt-2 w-full border-b border-border bg-card py-2 text-foreground outline-none transition-colors focus:border-[var(--amber-brand)]",g="text-xs font-medium uppercase tracking-wider text-muted-foreground";function x({label:t,name:a,type:r="text",required:s,maxLength:l,placeholder:n}){return e.jsxs("div",{children:[e.jsx("label",{htmlFor:a,className:g,children:t}),e.jsx("input",{id:a,name:a,type:r,required:s,maxLength:l,placeholder:n,className:D})]})}function B(){const t=H(U),[a,r]=v.useState("Orçamento de palestra"),[s,l]=v.useState(!1),[n,o]=v.useState(!1),[d,u]=v.useState(null),p=R.map(i=>i.title);
1async function c(i){i.preventDefault(),u(null);const b=new FormData(i.currentTarget),m=j=>String(b.get(j)??"").trim(),h={topic:a,name:m("name"),email:m("email"),phone:m("phone"),company:m("company"),message:m("message"),eventLocation:m("eventLocation"),eventType:m("eventType"),expectedAudience:m("expectedAudience"),eventDate:m("eventDate"),desiredTheme:m("desiredTheme"),trainingTheme:m("trainingTheme"),trainingDate:m("trainingDate"),participants:m("participants")},f=[];if(a==="Orçamento de palestra"?(h.eventLocation||f.push("Local do evento"),h.eventType||f.push("Tipo de evento"),h.expectedAudience||f.push("Público esperado"),h.eventDate||f.push("Data prevista"),h.desiredTheme||f.push("Tema desejado")):a==="Orçamento de Treinamento"&&(h.trainingTheme||f.push("Tema do treinamento"),h.trainingDate||f.push("Data prevista"),h.participants||f.push("Número de participantes")),(h.eventDate.length>15||h.trainingDate.length>15)&&f.push("Data prevista (máx. 15 caracteres)"),f.length){u(`Preencha: ${f.join(", ")}.`);return}l(!0);try{const j=await t({data:h});j.ok?o(!0):u(j.error??"Falha ao enviar.")}catch{u("Falha ao enviar. Verifique os campos e tente novamente.")}finally{l(!1)}}return e.jsxs(e.Fragment,{children:[e.jsx(k,{eyebrow:"Fale Conosco",title:e.jsxs(e.Fragment,{children:["Vamos desenhar a ",e.jsx("em",{className:"text-[var(--amber-brand)]",children:"produtividade"})," da sua organização."]}),intro:e.jsx(e.Fragment,{children:"Conte um pouco sobre seu desafio â nossa equipe responde com uma proposta de diagnóstico e próximos passos."})}),e.jsx("section",{className:"py-20 md:py-28",children:e.jsxs("div",{className:"container-tight grid gap-16 md:grid-cols-12",children:[e.jsxs("div",{className:"md:col-span-5",children:[e.jsx("h2",{className:"font-serif text-3xl",children:"Canais diretos"}),e.jsxs("ul",{className:"mt-8 space-y-3 text-sm",children:[e.jsxs("li",{className:"text-foreground",children:["ð Telefone: ",e.jsx("a",{href:"tel:+551140620133",className:"hover:text-[var(--amber-brand)]",children:"(11) 4062-0133"})]}),e.jsx("li",{children:e.jsx("a",{href:"https://www.instagram.com/christiantriad/",target:"_blank",rel:"noreferrer",className:"block hover:text-[var(--amber-brand)]",children:"â Instagram @christiantriad"})}),e.jsx("li",{children:e.jsx("a",{href:"https://www.youtube.com/christianbarbosa",target:"_blank",rel:"noreferrer",className:"block hover:text-[var(--amber-brand)]",children:"â YouTube /christianbarbosa"})}),e.jsx("li",{children:e.jsx("a",{href:"https://www.facebook.com/triadps",target:"_blank",rel:"noreferrer",className:"block hover:text-[var(--amber-brand)]",children:"â Facebook /triadps"})})]}),e.jsxs("div",{className:"mt-12 rounded-2xl border border-border bg-card p-6",children:[e.jsx("p",{className:"eyebrow",children:"Diagnóstico gratuito"}),e.jsx("p",{className:"mt-3 font-serif text-2xl leading-snug",children:"Faça o teste da TrÃade do Tempo."}),e.jsx("a",{href:"http://teste.triadps.com/",target:"_blank",rel:"noreferrer",className:"mt-5 inline-flex items-center gap-2 rounded-full bg-[var(--amber-brand)] px-5 py-2.5 text-xs font-medium text-[var(--ink)] hover:opacity-90",children:"Fazer teste â"})]})]}),e.jsx("div",{className:"md:col-span-7",children:n?e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-10 text-center",children:[e.jsx("p",{className:"font-serif text-3xl",children:"Obrigado pelo contato!"}),e.jsx("p",{className:"mt-3 text-muted-foreground",children:"Recebemos sua mensagem e entraremos em contato pelo e-mail ou telefone em até 2 dias úteis."}),e.jsx("button",{onClick:()=>o(!1),className:"mt-6 rounded-full border border-border px-5 py-2.5 text-sm hover:bg-secondary",children:"Enviar outra"})]}):e.jsx("form",{className:"rounded-2xl border border-border bg-card p-8 md:p-10",onSubmit:c,children:e.jsxs("div",{className:"grid gap-5",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"topic",className:g,children:"O que deseja?"}),e.jsx("select",{id:"topic",value:a,onChange:i=>r(i.target.value),className:C,children:Y.map(i=>e.jsx("option",{value:i,children:i},i))})]}),e.jsx(x,{label:"Nome",name:"name",required:!0,maxLength:120}),e.jsx(x,{label:"E-mail corporativo",name:"email",type:"email",required:!0,maxLength:200}),e.jsx(x,{label:"Celular de contato",name:"phone",type:"tel",required:!0,maxLength:40,placeholder:"(11) 99999-9999"}),e.jsx(x,{label:"Empresa",name:"company",maxLength:160}),a==="Orçamento de palestra"&&e.jsxs("div",{className:"grid gap-5 rounded-xl border border-border/60 bg-background/40 p-5",children:[e.jsx("p",{className:"eyebrow",children:"Sobre a palestra"}),e.jsx(x,{label:"Local do evento",name:"eventLocation",required:!0,maxLength:200}),e.jsxs("div",{children:[e.jsx("span",{className:g,children:"Tipo de evento"}),e.jsxs("div",{className:"mt-3 flex gap-6 text-sm",children:[e.jsxs("label",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"radio",name:"eventType",value:"Aberto ao público",defaultChecked:!0,required:!0})," Aberto ao público"]}),e.jsxs("label",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"radio",name:"eventType",value:"Fechado"})," Fechado"]})]})]}),e.jsx(x,{label:"Público esperado",name:"expectedAudience",required:!0,maxLength:80,placeholder:"ex: 200 pessoas"}),e.jsx(x,{label:"Data prevista (máx. 15 caracteres)",name:"eventDate",required:!0,maxLength:15,placeholder:"ex: 12/05/2026"}),e.jsx(x,{label:"Tema desejado",name:"desiredTheme",required:!0,maxLength:200})]}),a==="Orçamento de Treinamento"&&e.jsxs("div",{className:"grid gap-5 rounded-xl border border-border/60 bg-background/40 p-5",children:[e.jsx("p",{className:"eyebrow",children:"Sobre o treinamento"}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"trainingTheme",className:g,children:"Tema do treinamento"}),e.jsxs("select",{id:"trainingTheme",name:"trainingTheme",required:!0,className:C,defaultValue:"",children:[e.jsx("option",{value:"",disabled:!0,children:"Selecione um tema"}),p.map(i=>e.jsx("option",{value:i,children:i},i)),e.jsx("option",{value:"Outro / personalizado",children:"Outro / personalizado"})]})]}),e.jsx(x,{label:"Data prevista (máx. 15 caracteres)",name:"trainingDate",required:!0,maxLength:15,placeholder:"ex: 12/05/2026"}),e.jsx(x,{label:"Número de participantes",name:"participants",type:"number",required:!0,maxLength:20,placeholder:"ex: 30"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"message",className:g,children:"Descreva aqui sua mensagem"}),e.jsx("textarea",{id:"message",name:"message",rows:5,required:!0,maxLength:4e3,className:`${D} resize-none`})]}),d&&e.jsx("p",{className:"text-sm text-destructive",children:d}),e.jsx("button",{type:"submit",disabled:s,className:"mt-3 inline-flex items-center justify-center gap-2 self
1-start rounded-full bg-[var(--amber-brand)] px-6 py-3 text-sm font-medium text-[var(--ink)] hover:opacity-90 disabled:opacity-60",children:s?"Enviando...":"Enviar mensagem â"})]})})})]})})]})}export{B as component};
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.