1const ENVIRONMENT="production";$(document).ready(function(){const o={development:{api:{basePath:"http://pdtp-chatbot/",endpoint:"openrouter_chat.php",debug:!1},chatbot:{websiteUrl:"https://tourismportdouglas.com.au/",systemPrompt:"You are a helpful chatbot for the Port Douglas Travel Planner website. Answer questions based ONLY on the information from https://tourismportdouglas.com.au/. If you cannot find the answer in the content, state that you cannot provide that information and suggest visiting the website directly. Do not make up information. Format responses using Markdown, including bolding and links where appropriate.",welcomeMessage:"Hi there! I'm your Port Douglas travel assistant. How can I help you plan your visit or answer questions about the area?"}},production:{api:{basePath:"https://tourismportdouglas.com.au/fileadmin/templates/modules/chatbot/",endpoint:"openrouter_chat.php",debug:!1},chatbot:{websiteUrl:"https://tourismportdouglas.com.au/",systemPrompt:"You are a helpful chatbot for the Port Douglas Travel Planner website. Answer questions based ONLY on the information from https://tourismportdouglas.com.au/. If you cannot find the answer in the content, state that you cannot provide that information and suggest visiting the website directly. Do not make up information. Format responses using Markdown, including bolding and links where appropriate.",welcomeMessage:"Hi there! I'm your Port Douglas travel assistant. How can I help you plan your visit or answer questions about the area?"}}}[ENVIRONMENT];var e=$("#chatbot-badge");const t=$("#chatbot-panel");var a=$(".close-btn");const n=$("#chatbot-input");var s=$("#chatbot-send-btn");const r=$("#chatbot-messages");let i=[{role:"system",content:o.chatbot.systemPrompt},{role:"assistant",content:o.chatbot.welcomeMessage}];function l(e,t){var o=$(`<div class="message ${"user"===t?"user-message":"bot-message"}"></div>`);"bot"===t?o.html(function(e){let t=e;return t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank">$1</a>')).replace(/\*\*([^\*]+)\*\*/g,"<strong>$1</strong>")).replace(/\*([^\*]+)\*/g,"<em>$1</em>")).replace(/^###### (.*$)/gm,"<h6>$1</h6>")).replace(/^##### (.*$)/gm,"<h5>$1</h5>")).replace(/^#### (.*$)/gm,"<h4>$1</h4>")).replace(/^### (.*$)/gm,"<h3>$1</h3>")).replace(/^## (.*$)/gm,"<h2>$1</h2>")).replace(/^# (.*$)/gm,"<h1>$1</h1>")).replace(/\n/g,"<br>")}(e)):o.text(e),r.append(o),r.scrollTop(r[0].scrollHeight)}async function c(){var e=n.val().trim();""!==e&&(l(e,"user"),i.push({role:"user",content:e}
1),n.val(""),async function(){var e=function(){var e=$(` 2 <div class="message bot-message loading-message"> 3 <div class="loading-dots"> 4 <span></span><span></span><span></span> 5 </div> 6 </div> 7 `);return r.append(e),r.scrollTop(r[0].scrollHeight),e}();try{var t=await $.ajax({url:""+o.api.basePath+o.api.endpoint+(o.api.debug?"?debug=true":""),type:"POST",contentType:"application/json",data:JSON.stringify({messages:i,website_url:o.chatbot.websiteUrl}),dataType:o.api.debug?"text":"json"});o.api.debug?(console.log("Debug Response:",t),p("Debug data has been logged to the console.")):t&&t.reply?(p(t.reply),i.push({role:"assistant",content:t.reply})):t&&t.error?(p(`Error: ${t.error}. Please try again or visit the website.`),console.error("PHP Backend Error:",t.error)):(p("I'm sorry, I couldn't get a response. Please try again later."),console.error("Unexpected PHP Backend response:",t))}catch(e){console.error("AJAX Error:",e.status,e.statusText,e.responseText),p("Oops! Something went wrong while connecting to the chat service. Please try again later.")}finally{e.remove()}}())}function p(e){l(e,"bot")}e.on("click",function(){t.toggleClass("chatbot-panel--hidden")}),a.on("click",function(){t.addClass("chatbot-panel--hidden")}),s.on("click",c),n.on("keypress",function(e){13===e.which&&c()})});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.