{"id":774,"date":"2025-09-04T22:32:31","date_gmt":"2025-09-04T22:32:31","guid":{"rendered":"https:\/\/gen-t.science\/?page_id=774"},"modified":"2025-11-11T12:13:56","modified_gmt":"2025-11-11T12:13:56","slug":"cimatec","status":"publish","type":"page","link":"https:\/\/gen-t.science\/pt-br\/cimatec\/","title":{"rendered":"CIMATEC &#8211; Forms de interesse"},"content":{"rendered":"\n<div class=\"box-area-interesse mb-5\">\n\n<div class=\"container-text mb-3\">\n  <h3 class=\"mb-3\">\n    Nossa agenda lotou! Mas voc\u00ea ser\u00e1 chamado em breve!\n  <\/h3>\n  <p>\n    <strong> Preencha o formul\u00e1rio <\/strong> abaixo que vamos entrar em contato assim que novos hor\u00e1rios forem abertos.  \n    <br \/><br \/>\n    Logo mais voc\u00ea tamb\u00e9m ser\u00e1 <strong>gen-t do Brasil<\/strong>!\n  <\/p>\n<\/div>\n\n\n\n  <div class=\"container-form\">\n    <form id=\"formLocation\" action=\"javascript:void(0)\">\n      <div class=\"form-floating mb-3\">\n        <input\n          type=\"email\"\n          class=\"form-control\"\n          id=\"email\"\n          placeholder=\"seuemail@email.com\"\n          value=\"\"\n          name=\"email\"\n          required\n        \/>\n        <label for=\"email\">E-mail<\/label>\n        <div class=\"hint\">\n          <div class=\"icon ic-info\"><\/div>\n          <div class=\"text\">Insira o e-mail que voc\u00ea mais usa<\/div>\n        <\/div>\n      <\/div>\n      <div class=\"form-floating mb-4\">\n        <input\n          type=\"tel\"\n          class=\"form-control\"\n          id=\"phone\"\n          placeholder=\"(00) 00000-0000\"\n          value=\"\"\n          name=\"phone\"\n          maxlength=\"15\"\n          onkeyup=\"handlePhone(event)\"\n        \/>\n        <label for=\"phone\">Telefone celular<\/label>\n      <\/div>\n      <div class=\"form-floating mb-4\">\n        <select\n          id=\"state-select\"\n          name=\"estado\"\n          class=\"form-select\"\n          required\n        >\n          <option disabled selected>Selecione o seu estado<\/option>\n        <\/select>\n        <label for=\"state-select\">Seu estado<\/label>\n      <\/div>\n      <div class=\"form-floating mb-3\">\n        <select id=\"city-select\" name=\"cidade\" class=\"form-select\">\n          <option disabled selected>Selecione sua cidade<\/option>\n        <\/select>\n        <label for=\"city-select\">Sua cidade<\/label>\n      <\/div>\n      <div class=\"d-grid gap-2\">\n        <button type=\"submit\" class=\"btn btn-lg btn-primary\">\n          <span\n            class=\"spinner-border spinner-border-sm text-white d-none\"\n            role=\"status\"\n            aria-hidden=\"true\"\n          ><\/span>\n          <span class=\"text-white\">Enviar<\/span>\n        <\/button>\n      <\/div>\n    <\/form>\n    <div id=\"feedback-location\">\n      <div class=\"bg-email-sent mb-4\">\n        <img decoding=\"async\" src=\"https:\/\/gen-t.science\/wp-content\/uploads\/2023\/03\/feedback-email-sent.png\" alt=\"\" \/>\n      <\/div>\n      <h3 class=\"mb-2\">Agradecemos seu interesse!<\/h3>\n      <p>\n        Assim que a agenda for aberta, entraremos em contato atrav\u00e9s do e-mail que nos informou.\n      <\/p>\n    <\/div>\n  <\/div>\n<\/div>\n\n\n\n<script>\/* gent-interest-endpoint *\/\n\/*\n * Formul\u00e1rio #formLocation (lista de interesse) \u2014 substitui o <script> inline que chamava a gapi\n * com o token no HTML. Agora o envio vai para a rota do mu-plugin gent-interest-endpoint;\n * o navegador n\u00e3o v\u00ea token nem URL da gapi.\n *\n * Mesmo HTML de hoje (#formLocation, #feedback-location, #state-select, #city-select).\n * Carregamento dos estados\/cidades do IBGE e m\u00e1scara de telefone (handlePhone) sem mudan\u00e7a.\n *\/\n(function () {\n  const endpoint = \"\/wp-json\/gent\/v1\/interest\";\n  const form = document.querySelector(\"#formLocation\");\n  if (!form) return;\n  const feedbackElement = document.querySelector(\"#feedback-location\");\n  const formHeight = form.clientHeight;\n  const formBtn = document.querySelector(\"#formLocation button[type=submit]\");\n  const stateSelect = document.getElementById(\"state-select\");\n  const citySelect = document.getElementById(\"city-select\");\n  \/\/ Honeypot: campo invis\u00edvel para pessoas; bot que preenche tudo \u00e9 descartado no servidor.\n  const honeypot = document.createElement(\"input\");\n  honeypot.type = \"text\";\n  honeypot.name = \"gent_hp\";\n  honeypot.tabIndex = -1;\n  honeypot.autocomplete = \"off\";\n  honeypot.setAttribute(\"aria-hidden\", \"true\");\n  honeypot.style.cssText = \"position:absolute;left:-10000px;width:1px;height:1px;opacity:0;\";\n  form.appendChild(honeypot);\n  \/\/ Mensagem de erro (s\u00f3 aparece quando o envio \u00e9 recusado; antes o erro era silencioso).\n  const errorElement = document.createElement(\"p\");\n  errorElement.className = \"text-danger mb-3 d-none\";\n  errorElement.setAttribute(\"role\", \"alert\");\n  formBtn.parentElement.insertAdjacentElement(\"beforebegin\", errorElement);\n  const errorMessages = {\n    invalid: \"Confira o e-mail, o telefone (com DDD), o estado e a cidade.\",\n    rate_limited: \"Muitas tentativas seguidas. Tente de novo em alguns minutos.\",\n    unavailable: \"N\u00e3o foi poss\u00edvel enviar agora. Tente de novo em alguns minutos.\",\n  };\n  function setLoading(loading) {\n    formBtn.children[0].classList.toggle(\"d-none\", !loading);\n    formBtn.children[1].innerHTML = loading ? \"Processando\" : \"Enviar\";\n    formBtn.disabled = loading;\n  }\n  function showError(code) {\n    errorElement.textContent = Object.prototype.hasOwnProperty.call(errorMessages, code)\n      ? errorMessages[code]\n      : errorMessages.unavailable;\n    errorElement.classList.remove(\"d-none\");\n  }\n  form.addEventListener(\"submit\", async (event) => {\n    event.preventDefault();\n    errorElement.classList.add(\"d-none\");\n    const payload = {\n      email: form.elements.email.value,\n      phone: form.elements.phone.value.replace(\/\\D\/g, \"\"),\n      estado: form.elements.estado.value,\n      cidade: form.elements.cidade.value,\n      gent_hp: honeypot.value,\n    };\n    setLoading(true);\n    let result = { ok: false, error: \"unavailable\" };\n    try {\n      const response = await fetch(endpoint, {\n        method: \"POST\",\n        headers: { \"Content-Type\": \"application\/json\" },\n        credentials: \"omit\",\n        body: JSON.stringify(payload),\n      });\n      const body = await response.json().catch(() => null);\n      result = body && typeof body === \"object\" ? body : { ok: false, error: \"unavailable\" };\n      if (!response.ok) result.ok = false;\n    } catch (e) {\n      result = { ok: false, error: \"unavailable\" };\n    }\n    setTimeout(function () {\n      setLoading(false);\n      if (!result.ok) {\n        showError(result.error);\n        return;\n      }\n      form.classList.add(\"d-none\");\n      feedbackElement.style.height = formHeight + \"px\";\n      feedbackElement.classList.add(\"active\");\n    }, 1000);\n  });\n  citySelect.disabled = true;\n  fetch(\"https:\/\/servicodados.ibge.gov.br\/api\/v1\/localidades\/estados\")\n    .then((response) => response.json())\n    .then((states) => {\n      states.sort(function (a, b) {\n        if (a.nome < b.nome) { return -1; } else { return true; }\n      });\n      states.forEach((state) => {\n        const option = document.createElement(\"option\");\n        option.value = state.id;\n        option.textContent = state.nome;\n        stateSelect.appendChild(option);\n      });\n      const firstStateId = states[0].id;\n      fetch(`https:\/\/servicodados.ibge.gov.br\/api\/v1\/localidades\/estados\/${firstStateId}\/municipios`)\n        .then((response) => response.json())\n        .then((cities) => {\n          cities.sort(function (a, b) {\n            if (a.nome < b.nome) { return -1; } else { return true; }\n          });\n          cities.forEach((city) => {\n            const option = document.createElement(\"option\");\n            option.value = city.id;\n            option.textContent = city.nome;\n            citySelect.appendChild(option);\n          });\n        });\n    });\n  stateSelect.addEventListener(\"change\", (event) => {\n    citySelect.innerHTML = \"\";\n    const stateId = event.target.value;\n    if (stateId === \"\") {\n      citySelect.disabled = true;\n      return;\n    }\n    citySelect.disabled = false;\n    fetch(`https:\/\/servicodados.ibge.gov.br\/api\/v1\/localidades\/estados\/${stateId}\/municipios`)\n      .then((response) => response.json())\n      .then((cities) => {\n        \/\/ o innerHTML = \"\" acima j\u00e1 limpou o select; o remove(0) antigo apagava o 1\u00ba munic\u00edpio.\n        cities.forEach((city) => {\n          const option = document.createElement(\"option\");\n          option.value = city.id;\n          option.textContent = city.nome;\n          citySelect.appendChild(option);\n        });\n      });\n  });\n})();\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Nossa agenda lotou! Mas voc\u00ea ser\u00e1 chamado em breve! Preencha o formul\u00e1rio abaixo que vamos entrar em contato assim que novos hor\u00e1rios forem abertos. Logo mais voc\u00ea tamb\u00e9m ser\u00e1 gen-t do Brasil! E-mail Insira o e-mail que voc\u00ea mais usa Telefone celular Selecione o seu estado Seu estado Selecione sua cidade Sua cidade Enviar Agradecemos [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_canvas","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-774","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>CIMATEC - Forms de interesse - Gen-t Science<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gen-t.science\/pt-br\/cimatec\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CIMATEC - Forms de interesse - Gen-t Science\" \/>\n<meta property=\"og:description\" content=\"Nossa agenda lotou! Mas voc\u00ea ser\u00e1 chamado em breve! Preencha o formul\u00e1rio abaixo que vamos entrar em contato assim que novos hor\u00e1rios forem abertos. Logo mais voc\u00ea tamb\u00e9m ser\u00e1 gen-t do Brasil! E-mail Insira o e-mail que voc\u00ea mais usa Telefone celular Selecione o seu estado Seu estado Selecione sua cidade Sua cidade Enviar Agradecemos [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gen-t.science\/pt-br\/cimatec\/\" \/>\n<meta property=\"og:site_name\" content=\"Gen-t Science\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/gentscience\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-11T12:13:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/gen-t.science\/wp-content\/uploads\/2023\/03\/feedback-email-sent.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gen-t.science\\\/pt-br\\\/cimatec\\\/\",\"url\":\"https:\\\/\\\/gen-t.science\\\/pt-br\\\/cimatec\\\/\",\"name\":\"CIMATEC - Forms de interesse - Gen-t Science\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gen-t.science\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/gen-t.science\\\/pt-br\\\/cimatec\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/gen-t.science\\\/pt-br\\\/cimatec\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gen-t.science\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/feedback-email-sent.png\",\"datePublished\":\"2025-09-04T22:32:31+00:00\",\"dateModified\":\"2025-11-11T12:13:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gen-t.science\\\/pt-br\\\/cimatec\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gen-t.science\\\/pt-br\\\/cimatec\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/gen-t.science\\\/pt-br\\\/cimatec\\\/#primaryimage\",\"url\":\"https:\\\/\\\/gen-t.science\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/feedback-email-sent.png\",\"contentUrl\":\"https:\\\/\\\/gen-t.science\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/feedback-email-sent.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gen-t.science\\\/pt-br\\\/cimatec\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gen-t.science\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CIMATEC &#8211; Forms de interesse\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gen-t.science\\\/#website\",\"url\":\"https:\\\/\\\/gen-t.science\\\/\",\"name\":\"Gen-t Science\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gen-t.science\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CIMATEC - Forms de interesse - Gen-t Science","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gen-t.science\/pt-br\/cimatec\/","og_locale":"pt_BR","og_type":"article","og_title":"CIMATEC - Forms de interesse - Gen-t Science","og_description":"Nossa agenda lotou! Mas voc\u00ea ser\u00e1 chamado em breve! Preencha o formul\u00e1rio abaixo que vamos entrar em contato assim que novos hor\u00e1rios forem abertos. Logo mais voc\u00ea tamb\u00e9m ser\u00e1 gen-t do Brasil! E-mail Insira o e-mail que voc\u00ea mais usa Telefone celular Selecione o seu estado Seu estado Selecione sua cidade Sua cidade Enviar Agradecemos [&hellip;]","og_url":"https:\/\/gen-t.science\/pt-br\/cimatec\/","og_site_name":"Gen-t Science","article_publisher":"https:\/\/www.facebook.com\/gentscience\/","article_modified_time":"2025-11-11T12:13:56+00:00","og_image":[{"url":"https:\/\/gen-t.science\/wp-content\/uploads\/2023\/03\/feedback-email-sent.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/gen-t.science\/pt-br\/cimatec\/","url":"https:\/\/gen-t.science\/pt-br\/cimatec\/","name":"CIMATEC - Forms de interesse - Gen-t Science","isPartOf":{"@id":"https:\/\/gen-t.science\/#website"},"primaryImageOfPage":{"@id":"https:\/\/gen-t.science\/pt-br\/cimatec\/#primaryimage"},"image":{"@id":"https:\/\/gen-t.science\/pt-br\/cimatec\/#primaryimage"},"thumbnailUrl":"https:\/\/gen-t.science\/wp-content\/uploads\/2023\/03\/feedback-email-sent.png","datePublished":"2025-09-04T22:32:31+00:00","dateModified":"2025-11-11T12:13:56+00:00","breadcrumb":{"@id":"https:\/\/gen-t.science\/pt-br\/cimatec\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gen-t.science\/pt-br\/cimatec\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/gen-t.science\/pt-br\/cimatec\/#primaryimage","url":"https:\/\/gen-t.science\/wp-content\/uploads\/2023\/03\/feedback-email-sent.png","contentUrl":"https:\/\/gen-t.science\/wp-content\/uploads\/2023\/03\/feedback-email-sent.png"},{"@type":"BreadcrumbList","@id":"https:\/\/gen-t.science\/pt-br\/cimatec\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gen-t.science\/"},{"@type":"ListItem","position":2,"name":"CIMATEC &#8211; Forms de interesse"}]},{"@type":"WebSite","@id":"https:\/\/gen-t.science\/#website","url":"https:\/\/gen-t.science\/","name":"Gen-t Science","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gen-t.science\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"}]}},"_links":{"self":[{"href":"https:\/\/gen-t.science\/pt-br\/wp-json\/wp\/v2\/pages\/774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gen-t.science\/pt-br\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/gen-t.science\/pt-br\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/gen-t.science\/pt-br\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/gen-t.science\/pt-br\/wp-json\/wp\/v2\/comments?post=774"}],"version-history":[{"count":2,"href":"https:\/\/gen-t.science\/pt-br\/wp-json\/wp\/v2\/pages\/774\/revisions"}],"predecessor-version":[{"id":1016,"href":"https:\/\/gen-t.science\/pt-br\/wp-json\/wp\/v2\/pages\/774\/revisions\/1016"}],"wp:attachment":[{"href":"https:\/\/gen-t.science\/pt-br\/wp-json\/wp\/v2\/media?parent=774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}