
const obotaiChatBotJSScript = document.createElement('script');
obotaiChatBotJSScript.type = "text/javascript";
obotaiChatBotJSScript.src = 'https://hosting-for-customers.obotai.com/v2/common/latest/obotai-chatbot.js';
obotaiChatBotJSScript.async = !0;
obotaiChatBotJSScript.charset = 'utf-8';
obotaiChatBotJSScript.onload = function () {
    startObotaiChatBot()
}
document.body.appendChild(obotaiChatBotJSScript);

const obotaiChatBotStyleSheet = document.createElement('link');
obotaiChatBotStyleSheet.rel = "stylesheet";
obotaiChatBotStyleSheet.href = 'https://hosting-for-customers.obotai.com/v2/sakura-city/obotai-chatbot.css';
document.head.appendChild(obotaiChatBotStyleSheet);

function startObotaiChatBot() {
    const obotaiChatBotContainerDiv = document.createElement('div');
    obotaiChatBotContainerDiv.id = "obotai-chatbot-container";
    document.body.appendChild(obotaiChatBotContainerDiv);
    
    const obotaiChatBotControllerDiv = document.createElement('div');
    obotaiChatBotControllerDiv.className = "obotai-chatbot-controller";
    const obotaiChatBotControllerPopoverSpan = document.createElement('span');
    obotaiChatBotControllerPopoverSpan.className = 'bot-popover';
    obotaiChatBotControllerPopoverSpan.innerText = "コロナ感染症および防災Q&A Botです。ご質問にお答えします！";
    obotaiChatBotControllerDiv.appendChild(obotaiChatBotControllerPopoverSpan);
    const obotaiChatBotControllerIconSpan = document.createElement('span');
    obotaiChatBotControllerIconSpan.className = 'wc-bot-icon';
    const obotaiChatBotControllerTextSpan = document.createElement('span');
    obotaiChatBotControllerTextSpan.className = 'wc-bot-text';
    obotaiChatBotControllerTextSpan.innerText = "multilingual";
    obotaiChatBotControllerDiv.appendChild(obotaiChatBotControllerIconSpan);
    obotaiChatBotControllerDiv.appendChild(obotaiChatBotControllerTextSpan);
    document.body.appendChild(obotaiChatBotControllerDiv);
    const obotaiChatBotPropsStr = '{"header": {"title": "Sakura City", "subtitle": {"text": "Powered by ", "link": {"text": "ObotAI", "href": "https://obot-ai.com/"}}}, "iconUrl": "https://hosting-for-customers.obotai.com/v2/covid-19/ob_icon.png", "languages": ["ja", "zh-cn", "en", "zh-tw", "ko", "th"], "menu": {"ja": [{"sendingText": "\u30b3\u30ed\u30ca\u611f\u67d3\u75c7\u6700\u65b0\u60c5\u5831", "btnText": "\u30b3\u30ed\u30ca\u611f\u67d3\u75c7\u6700\u65b0\u60c5\u5831"}, {"sendingText": "\u4e88\u9632\u6cd5", "btnText": "\u4e88\u9632\u6cd5"}, {"sendingText": "\u5343\u8449\u770c\u306e\u52a9\u6210\u91d1\u7b49", "btnText": "\u5343\u8449\u770c\u306e\u52a9\u6210\u91d1\u7b49"}, {"sendingText": "\u75c7\u72b6\u304c\u3042\u308b\u5834\u5408\u306e\u76f8\u8ac7", "btnText": "\u75c7\u72b6\u304c\u3042\u308b\u5834\u5408\u306e\u76f8\u8ac7"}, {"sendingText": "\u4f01\u696d\u306e\u65b9", "btnText": "\u4f01\u696d\u306e\u65b9"}, {"sendingText": "\u9632\u707d\u5bb3\u60c5\u5831", "btnText": "\u9632\u707d\u5bb3\u60c5\u5831"}], "en": [{"sendingText": "Latest information", "btnText": "Latest information"}, {"sendingText": "Prevention method", "btnText": "Prevention method"}, {"sendingText": "Transmission route", "btnText": "Transmission route"}, {"sendingText": "Consultation if you have symptoms", "btnText": "Consultation if you have symptoms"}, {"sendingText": "For companies", "btnText": "For companies"}, {"sendingText": "Others", "btnText": "Others"}], "zh-cn": [{"sendingText": "\u6700\u65b0\u6d88\u606f", "btnText": "\u6700\u65b0\u6d88\u606f"}, {"sendingText": "\u9884\u9632\u65b9\u6cd5", "btnText": "\u9884\u9632\u65b9\u6cd5"}, {"sendingText": "\u611f\u67d3\u9014\u5f84", "btnText": "\u611f\u67d3\u9014\u5f84"}, {"sendingText": "\u51fa\u73b0\u75c7\u72b6\u65f6\u7684\u54a8\u8be2", "btnText": "\u51fa\u73b0\u75c7\u72b6\u65f6\u7684\u54a8\u8be2"}, {"sendingText": "\u5173\u4e8e\u4f01\u4e1a", "btnText": "\u5173\u4e8e\u4f01\u4e1a"}, {"sendingText": "\u5176\u4ed6", "btnText": "\u5176\u4ed6"}], "zh-tw": [{"sendingText": "\u6700\u65b0\u6d88\u606f", "btnText": "\u6700\u65b0\u6d88\u606f"}, {"sendingText": "\u9810\u9632\u65b9\u6cd5", "btnText": "\u9810\u9632\u65b9\u6cd5"}, {"sendingText": "\u611f\u67d3\u9014\u5f91", "btnText": "\u611f\u67d3\u9014\u5f91"}, {"sendingText": "\u51fa\u73fe\u75c7\u72c0\u6642\u7684\u8aee\u8a62", "btnText": "\u51fa\u73fe\u75c7\u72c0\u6642\u7684\u8aee\u8a62"}, {"sendingText": "\u95dc\u65bc\u4f01\u696d", "btnText": "\u95dc\u65bc\u4f01\u696d"}, {"sendingText": "\u5176\u4ed6", "btnText": "\u5176\u4ed6"}], "ko": [{"sendingText": "\ucd5c\uc2e0\uc815\ubcf4", "btnText": "\ucd5c\uc2e0\uc815\ubcf4"}, {"sendingText": "\uc608\ubc29\ubc95", "btnText": "\uc608\ubc29\ubc95"}, {"sendingText": "\uac10\uc5fc\uacbd\ub85c", "btnText": "\uac10\uc5fc\uacbd\ub85c"}, {"sendingText": "\uc99d\uc0c1 \uc2dc \uc0c1\ub2f4\ud558\uae30", "btnText": "\uc99d\uc0c1 \uc2dc \uc0c1\ub2f4\ud558\uae30"}, {"sendingText": "\uae30\uc5c5\uc6a9", "btnText": "\uae30\uc5c5\uc6a9"}, {"sendingText": "\uae30\ud0c0", "btnText": "\uae30\ud0c0"}], "th": [{"sendingText": "\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e25\u0e48\u0e32\u0e2a\u0e38\u0e14", "btnText": "\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e25\u0e48\u0e32\u0e2a\u0e38\u0e14"}, {"sendingText": "\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e1b\u0e49\u0e2d\u0e07\u0e01\u0e31\u0e19", "btnText": "\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e1b\u0e49\u0e2d\u0e07\u0e01\u0e31\u0e19"}, {"sendingText": "\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e40\u0e0a\u0e37\u0e49\u0e2d", "btnText": "\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e40\u0e0a\u0e37\u0e49\u0e2d"}, {"sendingText": "\u0e43\u0e2b\u0e49\u0e04\u0e33\u0e1b\u0e23\u0e36\u0e01\u0e29\u0e32\u0e2b\u0e32\u0e01\u0e04\u0e38\u0e13\u0e21\u0e35\u0e2d\u0e32\u0e01\u0e32\u0e23", "btnText": "\u0e43\u0e2b\u0e49\u0e04\u0e33\u0e1b\u0e23\u0e36\u0e01\u0e29\u0e32\u0e2b\u0e32\u0e01\u0e04\u0e38\u0e13\u0e21\u0e35\u0e2d\u0e32\u0e01\u0e32\u0e23"}, {"sendingText": "\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1a\u0e23\u0e34\u0e29\u0e31\u0e17", "btnText": "\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e1a\u0e23\u0e34\u0e29\u0e31\u0e17"}, {"sendingText": "\u0e2d\u0e37\u0e48\u0e19\u0e46", "btnText": "\u0e2d\u0e37\u0e48\u0e19\u0e46"}]}, "agentKey": "bc4f8f089e7d4a3ca1a44f10fe2a88eb", "inputCompletion": "Rp897qLKPPg.YiuEGWa8hFIfqBVtGYynU3thiU3IBS3QNvkV-N16olU", "user": {"id": "ticKXoOGdN", "name": "User"}}';
    const obotaiChatBotProps = JSON.parse(obotaiChatBotPropsStr);
    ObotAIChatBot.load(obotaiChatBotProps, 'obotai-chatbot-container', 'obotai-chatbot-controller');
}
