{"title":"Trail Run Aventura","description":"\u003cp\u003e\u003cstrong\u003e💡 Tip:\u003c\/strong\u003e la forma más rápida de encontrar tus fotos es usando el \u003cstrong\u003eReconocimiento Facial\u003c\/strong\u003e. Usa foto donde su rostro se vea muy bien, tipo cedula, licencia, etc eso ayuda a que haya mas coincidencias en la busqueda.\u003c\/p\u003e\n\u003cstyle\u003e\n  .facial-button {\n    background-color: #000;\n    color: #fff;\n    border: 2px solid #000;\n    padding: 12px 20px;\n    font-size: 16px;\n    font-weight: bold;\n    border-radius: 12px;\n    display: inline-flex;\n    align-items: center;\n    gap: 10px;\n    cursor: pointer;\n    transition: background-color 0.3s ease, color 0.3s ease;\n    box-shadow: 0 3px 6px rgba(0,0,0,0.2);\n  }\n\n  .facial-button:hover {\n    background-color: #fff;\n    color: #000;\n  }\n\n  .facial-button img {\n    height: 20px;\n  }\n\u003c\/style\u003e\n\u003c!-- CAMBIA ESTE VALOR por el nombre del evento actual --\u003e\n\u003cp\u003e\u003cscript\u003e\n  const NOMBRE_EVENTO = \"69TrailRunAventura\";\n\u003c\/script\u003e \u003cinput style=\"display: none;\" accept=\"image\/*\" id=\"fileInput\" type=\"file\"\u003e \u003cbutton id=\"uploadButton\" class=\"facial-button\"\u003e 😄 Reconocimiento Facial \u003c\/button\u003e \u003cscript\u003e\n  const fileInput = document.getElementById('fileInput');\n  const uploadButton = document.getElementById('uploadButton');\n\n  uploadButton.addEventListener('click', () =\u003e {\n    fileInput.click();\n  });\n\n  fileInput.addEventListener('change', async () =\u003e {\n    const file = fileInput.files[0];\n    if (!file) return;\n\n    try {\n      const filename = `${Date.now()}_${file.name}`;\n      const carpeta = `selfies\/rf-evento-${NOMBRE_EVENTO}\/${filename}`;\n\n      const res = await fetch(\n        `https:\/\/0o8ptvnz12.execute-api.us-east-1.amazonaws.com\/prod\/presigned-url?filename=${encodeURIComponent(carpeta)}`\n      );\n      const data = await res.json();\n\n      if (!data.url) throw new Error(\"No se pudo obtener la URL prefirmada\");\n\n      await fetch(data.url, {\n        method: 'PUT',\n        headers: { 'Content-Type': file.type },\n        body: file\n      });\n\n      alert(\"✅ Selfie procesada. Vamos a buscar tus fotos.\");\n      const nombreSelfie = filename.split('\/').pop();\n      window.location.href = `\/pages\/resultados?selfieId=${encodeURIComponent(nombreSelfie)}`;\n\n    } catch (error) {\n      console.error(error);\n      alert(\"❌ Hubo un error al subir tu selfie. Intenta nuevamente.\");\n    }\n  });\n\u003c\/script\u003e\u003c\/p\u003e","products":[],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0715\/5692\/3628\/collections\/TrailRunAventura-oneflashphoto-78.jpg?v=1774964688","url":"https:\/\/rauldom.com\/collections\/trail-run-aventura-vhjhawwgunvuief2zw50dxjh.oembed","provider":"RaulDom Sport Images","version":"1.0","type":"link"}