{"id":1837,"date":"2025-07-19T15:24:59","date_gmt":"2025-07-19T15:24:59","guid":{"rendered":"https:\/\/alpinerecon.com\/?page_id=1837"},"modified":"2025-08-28T14:40:22","modified_gmt":"2025-08-28T14:40:22","slug":"ao","status":"publish","type":"page","link":"https:\/\/alpinerecon.com\/fr\/ao\/","title":{"rendered":"AI"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"1837\" class=\"elementor elementor-1837\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-421c8c0 e-flex e-con-boxed e-con e-parent\" data-id=\"421c8c0\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f33f730 elementor-widget elementor-widget-html\" data-id=\"f33f730\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;ekit_we_effect_on&quot;:&quot;none&quot;}\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\"\/>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\/>\n  <title>AlpineAI Chat<\/title>\n  <!-- Google Font -->\n  <link rel=\"preconnect\" href=\"https:\/\/fonts.googleapis.com\"\/>\n  <link rel=\"preconnect\" href=\"https:\/\/fonts.gstatic.com\" crossorigin>\n  <link href=\"https:\/\/fonts.googleapis.com\/css2?family=Inter:wght@400;500;700&display=swap\" rel=\"stylesheet\"\/>\n  <style>\n    :root {\n      --bg: #000;\n      --container-bg: #1e1e1e;\n      --ai-bubble: #333;\n      --user-bubble: #4f4f4f;\n      --ai-text: #fff;\n      --user-text: #eee;\n      --accent: #ffd700;\n      --radius: 24px;\n    }\n    html, body {\n      \/* allow page scroll if needed *\/\n      min-height: 100vh;\n      margin: 0;\n      font-family: 'Inter', sans-serif;\n      background: var(--bg);\n      color: var(--ai-text);\n      \/* no flex here to allow scrolling *\/\n    }\n    header, footer { }\n    #survival-chat-wrapper {\n      \/* fill available area but allow overflow *\/\n      display: flex;\n      flex-direction: column;\n      width: 100%;\n      background: var(--container-bg);\n      border-radius: var(--radius);\n      overflow: visible;\n      margin: 20px 0;\n      max-height: calc(100vh - 80px); \/* leave space for header\/footer *\/\n    }\n    #splash {\n      flex: 0 0 auto;\n      display: flex;\n      flex-direction: column;\n      align-items: center;\n      justify-content: center;\n      padding: 40px 20px;\n      gap: 16px;\n    }\n    #splash img {\n      width: 100px; height: 100px; object-fit: contain;\n    }\n    #splash .title {\n      font-size: 2rem; font-weight: 700; color: var(--accent);\n    }\n    #splash .subtitle {\n      font-size: 1rem; font-weight: 500; color: #aaa;\n    }\n    .chat-box {\n      flex: 1;\n      overflow-y: auto;\n      padding: 20px;\n    }\n    .message-row {\n      display: flex;\n      gap: 8px;\n      margin-bottom: 16px;\n    }\n    .message-row.user { justify-content: flex-end; }\n    .message-row.ai img {\n      width: 36px; height: 36px; border-radius: 50%;\n    }\n    .bubble {\n      max-width: 70%; padding: 12px 16px; border-radius: var(--radius);\n      line-height: 1.5; word-wrap: break-word; font-size: 14px;\n    }\n    .message-row.ai .bubble { background: var(--ai-bubble); color: var(--ai-text); }\n    .message-row.user .bubble { background: var(--user-bubble); color: var(--user-text); order: 1; }\n    .message-row.user img { display: none; }\n    #thinking-indicator {\n      padding: 8px 20px; font-style: italic; font-size: 13px;\n      color: #aaa; min-height: 24px; display: none;\n    }\n    #input-area {\n      display: flex; flex-direction: column; gap: 4px;\n      padding: 12px; background: var(--container-bg);\n      border-top: 1px solid #222;\n    }\n    #timeout-indicator {\n      font-size: 12px; color: #aaa; text-align: right; min-height: 16px;\n    }\n    #input-controls {\n      display: flex; gap: 8px;\n    }\n    #user-input {\n      flex: 1; padding: 12px; font-size: 15px;\n      border-radius: var(--radius); border: 1px solid #333;\n      background: #1e1e1e; color: var(--user-text);\n    }\n    #user-input::placeholder { color: #777; }\n    #user-input:focus { border-color: var(--accent); outline: none; }\n    #send-btn {\n      padding: 12px 20px; background: var(--accent); color: #000;\n      font-weight: 600; border: none; border-radius: var(--radius);\n      cursor: pointer; transition: opacity 0.2s;\n    }\n    #send-btn:disabled { opacity: 0.5; cursor: not-allowed; }\n    #send-btn:hover:not(:disabled) { opacity: 0.8; }\n    .duration {\n      font-size: 11px; color: #888; padding-left: 20px;\n      margin: -8px 0 8px;\n    }\n  <\/style>\n<\/head>\n<body>\n  <header><!-- existing header --><\/header>\n  <div id=\"survival-chat-wrapper\">\n    <div id=\"splash\">\n      <img decoding=\"async\" data-src=\"https:\/\/alpinerecon.com\/wp-content\/uploads\/2025\/06\/ChatGPT-Image-Jun-16-2025-03_15_32-PM.png\" alt=\"AlpineAI Logo\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/1024;\" \/>\n      <div class=\"title\">ALPINEAI<\/div>\n      <div class=\"subtitle\">1st survival AI<\/div>\n    <\/div>\n    <div id=\"chat-box\" class=\"chat-box\"><\/div>\n    <div id=\"thinking-indicator\">Thinking... 0s<\/div>\n    <div id=\"input-area\">\n      <div id=\"timeout-indicator\"><\/div>\n      <div id=\"input-controls\">\n        <input id=\"user-input\" type=\"text\" placeholder=\"ask anything\" autocomplete=\"off\"\/>\n        <button id=\"send-btn\">Send<\/button>\n      <\/div>\n    <\/div>\n  <\/div>\n  <footer><!-- existing footer --><\/footer>\n  <script>\n    (function(){\n      const splash=document.getElementById('splash');\n      const chatBox=document.getElementById('chat-box');\n      const thinking=document.getElementById('thinking-indicator');\n      const timeoutInd=document.getElementById('timeout-indicator');\n      const input=document.getElementById('user-input');\n      const sendBtn=document.getElementById('send-btn');\n      let startTime,count=0,intervalId;\n      let canSend=true;\n      const TIMEOUT=10;\n      const AI_AVATAR='https:\/\/alpinerecon.com\/wp-content\/uploads\/2025\/06\/ChatGPT-Image-Jun-16-2025-03_15_32-PM.png';\n\n      function hideSplash(){splash.style.display='none';}\n      function appendMessage(text,isAI){\n        const row=document.createElement('div');row.className='message-row '+(isAI?'ai':'user');\n        if(isAI){const img=document.createElement('img');img.src=AI_AVATAR;img.alt='AI';row.appendChild(img);}  \n        const bubble=document.createElement('div');bubble.className='bubble';bubble.textContent=text;row.appendChild(bubble);\n        chatBox.appendChild(row);chatBox.scrollTop=chatBox.scrollHeight;return row;\n      }\n      function startThinking(){thinking.style.display='block';count=0;thinking.textContent='Thinking... 0s';intervalId=setInterval(()=>{count++;thinking.textContent=`Thinking... ${count}s`;},1000);startTime=Date.now();}\n      function stopThinking(){clearInterval(intervalId);thinking.style.display='none';const duration=Math.round((Date.now()-startTime)\/1000);const note=document.createElement('div');note.className='duration';note.textContent=`Thought for ${duration} second${duration>1?'s':''}`;chatBox.appendChild(note);chatBox.scrollTop=chatBox.scrollHeight;}\n      function disableSend(){canSend=false;sendBtn.disabled=true;let remaining=TIMEOUT;timeoutInd.textContent=`Please wait ${remaining}s...`;const toInt=setInterval(()=>{remaining--;if(remaining>0){timeoutInd.textContent=`Please wait ${remaining}s...`}else{clearInterval(toInt);timeoutInd.textContent='';canSend=true;sendBtn.disabled=false;}},1000);}\n      async function sendMessage(){if(!canSend)return;const msg=input.value.trim();if(!msg)return;hideSplash();appendMessage(msg,false);input.value='';disableSend();startThinking();const delay=Math.floor(Math.random()*4000)+1000;await new Promise(r=>setTimeout(r,delay));try{const res=await fetch('https:\/\/74ace06d-2437-4ebf-b471-d6fe4c7a16f6-00-34p8vkf44691i.picard.replit.dev\/ask',{method:'POST',headers:{'Content-Type':'application\/json'},body:JSON.stringify({message:msg})});const data=await res.json();stopThinking();const row=appendMessage('',true);let idx=0;const txt=data.reply;const iv=setInterval(()=>{if(idx<=txt.length)row.querySelector('.bubble').textContent=txt.slice(0,idx++);else clearInterval(iv);},20);}catch(e){stopThinking();appendMessage('Sorry, an error occurred.',true);} }\n      sendBtn.addEventListener('click',sendMessage);\n      input.addEventListener('keypress',e=>{if(e.key==='Enter')sendMessage();});\n    })();\n  <\/script>\n<\/body>\n<\/html>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>AlpineAI Chat ALPINEAI 1st survival AI Thinking&#8230; 0s Send<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-1837","page","type-page","status-publish","hentry"],"blocksy_meta":[],"acf":[],"_links":{"self":[{"href":"https:\/\/alpinerecon.com\/fr\/wp-json\/wp\/v2\/pages\/1837","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alpinerecon.com\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/alpinerecon.com\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/alpinerecon.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alpinerecon.com\/fr\/wp-json\/wp\/v2\/comments?post=1837"}],"version-history":[{"count":44,"href":"https:\/\/alpinerecon.com\/fr\/wp-json\/wp\/v2\/pages\/1837\/revisions"}],"predecessor-version":[{"id":1891,"href":"https:\/\/alpinerecon.com\/fr\/wp-json\/wp\/v2\/pages\/1837\/revisions\/1891"}],"wp:attachment":[{"href":"https:\/\/alpinerecon.com\/fr\/wp-json\/wp\/v2\/media?parent=1837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}