${T(b.note)}
`; const info = el("div","stack"); info.innerHTML = `${L?"我们随时回复关于产品、集成与合作的问题。":"We're here for questions about the product, integration, or partnership."}
hello@getchainiq.com
250 W 34th Street
New York, NY 10019
USA
${T(DISCLAIMER)}
`; g.appendChild(f); g.appendChild(info); setTimeout(()=>wireContactForm(f, b), 30); return g; } function wireContactForm(root, b){ const btn = root.querySelector("#ci-submit"); const status = root.querySelector("#ci-status"); if(!btn) return; const L = lang==="zh"; const msg = { invalid:{en:"Please enter your name and a valid email.",zh:"请填写姓名和有效的邮箱。"}, sending:{en:"Sending…",zh:"提交中…"}, ok:{en:"Thanks — we'll be in touch shortly.",zh:"已收到,我们会尽快与你联系。"}, err:{en:"Something went wrong. Please email hello@getchainiq.com.",zh:"提交失败,请直接邮件 hello@getchainiq.com。"} }; const emailOK = v => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(v); btn.addEventListener("click", async ()=>{ const name = root.querySelector("#ci-name").value.trim(); const email = root.querySelector("#ci-email").value.trim(); const risk = root.querySelector("#ci-risk").value; const hp = root.querySelector("#ci-hp"); // Honeypot: a hidden field no human sees. If a bot fills it, we silently // show success and send nothing — no error, so the bot gets no signal. if(hp && hp.value){ status.textContent = T(msg.ok); status.style.color = "var(--green-400)"; return; } if(!name || !emailOK(email)){ status.textContent = T(msg.invalid); status.style.color = "var(--amber-500)"; return; } btn.disabled = true; btn.style.opacity = ".6"; status.textContent = T(msg.sending); status.style.color = "var(--text-muted)"; try{ const res = await fetch(CIQ_SUPABASE.url + "/rest/v1/cicontact", { method:"POST", headers:{ "apikey": CIQ_SUPABASE.anon, "Authorization": "Bearer " + CIQ_SUPABASE.anon, "Content-Type": "application/json", "Prefer": "return=minimal" }, body: JSON.stringify({ name, email, risk, lang, user_agent: navigator.userAgent }) }); if(!res.ok) throw new Error("HTTP " + res.status); status.textContent = T(msg.ok); status.style.color = "var(--green-400)"; root.querySelector("#ci-name").value = ""; root.querySelector("#ci-email").value = ""; }catch(e){ status.textContent = T(msg.err); status.style.color = "var(--red-500)"; btn.disabled = false; btn.style.opacity = "1"; } }); } /* --- block dispatcher --- */ function renderBlock(b){ const s = el("section", b.ruled?"ruled":null); const w = el("div","wrap"); s.appendChild(w); switch(b.type){ case "hero":{ s.className = "hero"+(b.ruled?" ruled":""); if(b.small){ w.appendChild(el("span","eyebrow"+(b.tone?" "+b.tone:""),T(b.eyebrow))); w.appendChild(el("h1",null,T(b.h1))); const p = el("p","lead",T(b.lead)); p.style.marginTop="20px"; w.appendChild(p); if(b.note){const n=el("p","small disclaim",T(b.note)); w.appendChild(n);} } else { const g = el("div","herogrid"); const left = el("div"); left.appendChild(el("span","eyebrow b",T(b.eyebrow))); left.appendChild(el("h1","display",T(b.h1))); const p = el("p","lead",T(b.lead)); p.style.marginTop="22px"; left.appendChild(p); left.appendChild(btnRow(b.ctas)); if(b.note) left.appendChild(el("p","small disclaim",T(b.note))); g.appendChild(left); g.appendChild(b.visual==="gate"?gateVisual():el("div")); w.appendChild(g); } break; } case "stats":{ head(b,w); const g = el("div","stats"); g.style.marginTop="46px"; b.items.forEach(it=>{ const d = el("div","stat"); d.appendChild(el("span","v",it.v)); d.appendChild(el("p","c",T(it.c))); g.appendChild(d); }); w.appendChild(g); break; } case "cards":{ head(b,w); const g = el("div","grid "+(b.cols||"g3")); g.style.marginTop="40px"; b.items.forEach(it=>{ const c = el("div","card"+(it.tone?" "+it.tone:"")); c.appendChild(el("span","tone")); if(it.n) c.appendChild(el("span","num",it.n)); c.appendChild(el("h4",null,T(it.h))); c.appendChild(el("p",null,T(it.p))); if(it.go){ c.style.cursor="pointer"; c.dataset.go=it.go; } g.appendChild(c); }); w.appendChild(g); break; } case "pillars":{ head(b,w); const g = el("div","split"); g.style.marginTop="44px"; [b.a,b.b].forEach(pn=>{ const p = el("div","panel"+(pn.tone==="g"?" g":"")); p.appendChild(el("span","eyebrow "+pn.tone,T(pn.k))); p.appendChild(el("h3",null,T(pn.h))); const sub = el("p",null,T(pn.s)); sub.style.marginTop="10px"; p.appendChild(sub); const ul = el("ul"); pn.li.forEach(x=>ul.appendChild(el("li",null,T(x)))); p.appendChild(ul); p.appendChild(btnRow([{t:pn.cta,k:pn.tone==="g"?"green":"ghost",go:pn.go}])); g.appendChild(p); }); w.appendChild(g); break; } case "flywheel":{ head(b,w); const d=flywheelSVG(); d.style.marginTop="40px"; w.appendChild(d); break; } case "arch":{ head(b,w); const d=archSVG(); d.style.marginTop="40px"; w.appendChild(d); break; } case "gates":{ head(b,w); const d=gatesBlock(); d.style.marginTop="40px"; w.appendChild(d); break; } case "score":{ head(b,w); const d=scoreBlock(); d.style.marginTop="44px"; w.appendChild(d); break; } case "table":{ head(b,w); const tw = el("div","tablewrap"); tw.style.marginTop="38px"; const t = el("table"); const thead = el("thead"); const tr = el("tr"); b.head.forEach(h=>tr.appendChild(el("th",null,T(h)))); thead.appendChild(tr); t.appendChild(thead); const tb = el("tbody"); b.rows.forEach(r=>{ const row = el("tr"); r.forEach(c=>row.appendChild(el("td",null,T(c)))); tb.appendChild(row); }); t.appendChild(tb); tw.appendChild(t); w.appendChild(tw); break; } case "prose":{ head(b,w); const st = el("div","stack"); st.style.marginTop="26px"; (b.paras||[]).forEach(p=>st.appendChild(el("p",null,T(p)))); w.appendChild(st); if(b.bullets){ const ul = el("ul","bullets"); b.bullets.forEach(x=>ul.appendChild(el("li",null,T(x)))); w.appendChild(ul); } if(b.callout){ const c = el("div","callout"); c.appendChild(el("p",null,T(b.callout))); w.appendChild(c); } if(b.cta) w.appendChild(btnRow([{t:b.cta.t,k:"ghost",go:b.cta.go}])); break; } case "chips":{ head(b,w); const c = el("div","chips"); c.style.marginTop="30px"; b.items.forEach(x=>c.appendChild(el("span","chip",x))); w.appendChild(c); break; } case "progression":{ head(b,w); const g = el("div","prog"); g.style.marginTop="38px"; b.items.forEach(it=>{ const d = el("div","progitem"+(it.live?" live":"")); d.appendChild(el("span","s",T(it.s))); d.appendChild(el("span","n",T(it.n))); g.appendChild(d); }); w.appendChild(g); break; } case "beachhead":{ const g = el("div","split"); const left = el("div"); left.appendChild(el("span","eyebrow b",lang==="zh"?"切入点 · 智能体广告":"BEACHHEAD · AGENTIC ADVERTISING")); left.appendChild(el("h2",null,lang==="zh"?"我们从智能体已经在花钱的地方开始。":"We start where agents already spend.")); left.appendChild(el("p",null,lang==="zh" ?"广告是第一个由自主智能体每天大规模动用真实资金、且结果可归因的商业品类。这使它成为唯一能用真实行为、而非假设,来训练智能体信用模型的场景。我们在这里构建的原语——身份、策略、额度、结算、评分——正是其他每一个智能体商业品类都将需要的。" :"Advertising is the first commerce category where autonomous agents move real money daily, at scale, with attributable outcomes — which makes it the only place a credit model for agents can be trained on real behavior rather than assumption. The primitives we build here are the same ones every other category of agentic commerce will need.")); left.appendChild(btnRow([{t:{en:"See the advertising solution",zh:"查看广告解决方案"},k:"ghost",go:"advertising"}, {t:{en:"See where this goes",zh:"看看走向哪里"},k:"ghost",go:"commerce"}])); const right = el("div","diagram"); const items = lang==="zh" ? [["已落地","广告投放",1],["临近","采购与 B2B",0],["临近","差旅与预订",0],["萌芽","供应链与物流",0],["形成中","消费者结账",0]] : [["LIVE","Advertising",1],["NEAR","Procurement & B2B",0],["NEAR","Travel & booking",0],["EMERGING","Supply chain",0],["FORMING","Consumer checkout",0]]; right.innerHTML = items.map(([s,n,live])=>`