
{"id":68950,"date":"2025-10-22T15:16:13","date_gmt":"2025-10-22T13:16:13","guid":{"rendered":"https:\/\/demo.we-com.info\/basesito\/?page_id=68950"},"modified":"2025-10-22T15:16:13","modified_gmt":"2025-10-22T13:16:13","slug":"chat-2","status":"publish","type":"page","link":"https:\/\/demo.we-com.info\/basesito\/chat-2\/","title":{"rendered":"Chat"},"content":{"rendered":"<div class='mwai-chatbot-container' data-params='{&quot;aiName&quot;:&quot;Comune: &quot;,&quot;userName&quot;:&quot;Utente: &quot;,&quot;guestName&quot;:&quot;Ospite:&quot;,&quot;aiAvatar&quot;:true,&quot;userAvatar&quot;:true,&quot;aiAvatarUrl&quot;:&quot;chat-robot-1.svg&quot;,&quot;textSend&quot;:&quot;Invia&quot;,&quot;textClear&quot;:&quot;Cancella&quot;,&quot;imageUpload&quot;:false,&quot;fileUpload&quot;:false,&quot;multiUpload&quot;:false,&quot;maxUploads&quot;:1,&quot;fileUploads&quot;:0,&quot;mode&quot;:&quot;chat&quot;,&quot;textInputPlaceholder&quot;:&quot;Scrivi il tuo messsaggio&quot;,&quot;textInputMaxLength&quot;:512,&quot;textCompliance&quot;:&quot;&quot;,&quot;startSentence&quot;:&quot;Come posso aiutarti?&quot;,&quot;localMemory&quot;:true,&quot;themeId&quot;:&quot;timeless&quot;,&quot;window&quot;:true,&quot;icon&quot;:&quot;&quot;,&quot;iconText&quot;:&quot;&quot;,&quot;iconTextDelay&quot;:1,&quot;iconAlt&quot;:&quot;AI Engine Chatbot&quot;,&quot;iconPosition&quot;:&quot;bottom-right&quot;,&quot;centerOpen&quot;:false,&quot;width&quot;:&quot;&quot;,&quot;openDelay&quot;:&quot;&quot;,&quot;iconBubble&quot;:false,&quot;windowAnimation&quot;:&quot;zoom&quot;,&quot;fullscreen&quot;:false,&quot;copyButton&quot;:false,&quot;headerSubtitle&quot;:&quot;Parla con&quot;,&quot;containerType&quot;:&quot;standard&quot;,&quot;headerType&quot;:&quot;standard&quot;,&quot;messagesType&quot;:&quot;standard&quot;,&quot;inputType&quot;:&quot;standard&quot;,&quot;footerType&quot;:&quot;standard&quot;}' data-system='{&quot;botId&quot;:&quot;default&quot;,&quot;customId&quot;:null,&quot;userData&quot;:null,&quot;sessionId&quot;:&quot;69d4dcd3eac36&quot;,&quot;restNonce&quot;:null,&quot;contextId&quot;:68950,&quot;pluginUrl&quot;:&quot;https:\\\/\\\/demo.we-com.info\\\/basesito\\\/wp-content\\\/plugins\\\/ai-engine\\\/&quot;,&quot;restUrl&quot;:&quot;https:\\\/\\\/demo.we-com.info\\\/basesito\\\/wp-json&quot;,&quot;stream&quot;:true,&quot;debugMode&quot;:false,&quot;eventLogs&quot;:false,&quot;speech_recognition&quot;:false,&quot;speech_synthesis&quot;:false,&quot;typewriter&quot;:false,&quot;crossSite&quot;:false,&quot;actions&quot;:[],&quot;blocks&quot;:[{&quot;id&quot;:&quot;mwai_gdpr_69d4dcd69a887&quot;,&quot;type&quot;:&quot;content&quot;,&quot;data&quot;:{&quot;id&quot;:&quot;mwai_gdpr_69d4dcd69a887&quot;,&quot;html&quot;:&quot;&lt;div&gt;\\n                              &lt;p&gt;By using this chatbot, you agree to the recording and processing of your data by our website and the external services it might use (LLMs, vector databases, etc.).&lt;\\\/p&gt;\\n                              &lt;div class=\\&quot;mwai-gdpr-buttons\\&quot;&gt;\\n                              &lt;button id=\\&quot;mwai_gdpr_69d4dcd69a887-button\\&quot; type=\\&quot;button\\&quot; style=\\&quot;width: 100%;\\&quot;&gt;I understand&lt;\\\/button&gt;\\n                              &lt;\\\/div&gt;\\n                              &lt;\\\/div&gt;&quot;,&quot;script&quot;:&quot;\\n                              (function() {\\n                                    \\\/\\\/ Handle GDPR consent button click\\n                                    document.addEventListener(\\&quot;click\\&quot;, function(event) {\\n                                      if (event.target.id === \\&quot;mwai_gdpr_69d4dcd69a887-button\\&quot;) {\\n                                        event.preventDefault();\\n                                        \\n                                        \\\/\\\/ Set GDPR acceptance cookie for 1 year\\n                                        const date = new Date();\\n                                        date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000));\\n                                        document.cookie = \\&quot;mwai_gdpr_accepted=1; expires=\\&quot; + date.toUTCString() + \\&quot;; path=\\\/\\&quot;;\\n                                        \\n                                        \\\/\\\/ IMPORTANT: When multiple chatbots share the same botId, we must find\\n                                        \\\/\\\/ the specific chatbot instance that contains this GDPR block.\\n                                        \\\/\\\/ MwaiAPI.getChatbot() returns the first match, which may be wrong.\\n                                        let foundChatbot = null;\\n                                        const chatbotsWithSameBotId = MwaiAPI.chatbots.filter(cb =&gt; cb.botId === \\&quot;default\\&quot;);\\n                                        \\n                                        \\\/\\\/ Find the chatbot that actually has this GDPR block\\n                                        for (const chatbot of chatbotsWithSameBotId) {\\n                                          const blocks = chatbot.getBlocks ? chatbot.getBlocks() : [];\\n                                          if (blocks.some(block =&gt; block.id === \\&quot;mwai_gdpr_69d4dcd69a887\\&quot;)) {\\n                                            foundChatbot = chatbot;\\n                                            break;\\n                                          }\\n                                        }\\n                                        \\n                                        if (foundChatbot) {\\n                                          foundChatbot.unlock();\\n                                          foundChatbot.removeBlockById(\\&quot;mwai_gdpr_69d4dcd69a887\\&quot;);\\n                                        }\\n                                      }\\n                                    }, true); \\\/\\\/ Use capture phase for better popup\\\/modal support\\n                                    \\n                                    \\\/\\\/ Lock the chatbot when it has this GDPR block\\n                                    \\\/\\\/ Note: Using MwaiAPI.getChatbot() here is fine for locking\\n                                    \\\/\\\/ as we want to lock any chatbot with this botId initially\\n                                    const tryLock = setInterval(function() {\\n                                      const chatbot = MwaiAPI.getChatbot(\\&quot;default\\&quot;);\\n                                      if (chatbot &amp;&amp; chatbot.lock) {\\n                                        chatbot.lock();\\n                                        clearInterval(tryLock);\\n                                      }\\n                                    }, 100);\\n                                    \\n                                    \\\/\\\/ Stop trying after 5 seconds\\n                                    setTimeout(function() {\\n                                      clearInterval(tryLock);\\n                                    }, 5000);\\n                                  })();\\n                                &quot;}}],&quot;shortcuts&quot;:[]}' data-theme='{&quot;type&quot;:&quot;internal&quot;,&quot;name&quot;:&quot;Timeless&quot;,&quot;themeId&quot;:&quot;timeless&quot;,&quot;settings&quot;:[],&quot;style&quot;:&quot;&quot;}'><\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-68950","page","type-page","status-publish","hentry"],"publishpress_future_action":{"enabled":false,"date":"2026-04-14 12:30:46","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category","extraData":[]},"publishpress_future_workflow_manual_trigger":{"enabledWorkflows":[]},"_links":{"self":[{"href":"https:\/\/demo.we-com.info\/basesito\/wp-json\/wp\/v2\/pages\/68950","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demo.we-com.info\/basesito\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/demo.we-com.info\/basesito\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/demo.we-com.info\/basesito\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/demo.we-com.info\/basesito\/wp-json\/wp\/v2\/comments?post=68950"}],"version-history":[{"count":1,"href":"https:\/\/demo.we-com.info\/basesito\/wp-json\/wp\/v2\/pages\/68950\/revisions"}],"predecessor-version":[{"id":68951,"href":"https:\/\/demo.we-com.info\/basesito\/wp-json\/wp\/v2\/pages\/68950\/revisions\/68951"}],"wp:attachment":[{"href":"https:\/\/demo.we-com.info\/basesito\/wp-json\/wp\/v2\/media?parent=68950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/demo.we-com.info\/basesito\/wp-json\/wp\/v2\/categories?post=68950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demo.we-com.info\/basesito\/wp-json\/wp\/v2\/tags?post=68950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}