var boeiInstances={};function jivo_onLoadCallback(){let e=document.querySelectorAll("jdiv");e.length>0&&(e[0].style.display="none")}function jivo_onClose(){let e=document.querySelectorAll("jdiv");e.length>0&&(e[0].style.display="none")}if(window.BQ=window.BQ||[],window.Boei=window.Boei||function(e){BQ.push(e)},window.BoeiWidget=function(e){var t=e.key||"default";if(boeiInstances[t])return console.warn("Boei instance "+t+" already exists. Returning existing instance."),boeiInstances[t];window.BQ&&window.BQ.length&&(console.log("Processing queued settings"),window.BQ.forEach((function(o){if("function"==typeof o)o(e);else if("object"==typeof o)if(o.hasOwnProperty("instanceId")&&o.instanceId===t)Object.assign(e,o.settings);else if(o.hasOwnProperty("add_channel")){var i=o.add_channel,n=i.position;delete i.position,i.options=i.options||{},"number"==typeof n&&n>=0&&n<=e.helpers.length?(e.helpers.splice(n,0,i),console.log("Added channel at position",n,":",i)):(e.helpers.push(i),console.log("Added channel at the end:",i))}else Object.assign(e,o)})),window.BQ=[]),this.boeiOpenedCount=0,this.test_mode=e.test_mode,this.key=e.key,this.button_image=e.button_image,this.trigger_after_seconds=e.trigger_after_seconds,this.trigger_message=e.trigger_message,this.trigger_message_only_new_visitor=e.trigger_message_only_new_visitor,this.display_close_trigger_message=e.display_close_trigger_message,this.close_trigger_after_seconds=e.close_trigger_after_seconds,this.position=e.position,this.icon_svg=e.icon_svg,this.close_src=e.close_src,this.loading_src=e.loading_src,this.helpers=e.helpers,this.send_form_to_url=e.send_form_to_url,this.interaction_url=e.interaction_url,this.display_button_watermark=e.display_button_watermark,this.display_helper_watermark=e.display_helper_watermark,this.shape=e.shape,this.hide_on_pages=e.hide_on_pages,this.opacity=e.opacity,this.allow_identifiers=e.allow_identifiers,this.watermark_url_button=e.watermark_url_button,this.watermark_url_helper=e.watermark_url_helper,this.helper_watermark_text=e.helper_watermark_text,this.button_icon_size=e.button_icon_size,this.button_width=e.button_width,this.button_height=e.button_height,this.button_margin_x=e.button_margin_x,this.button_margin_y=e.button_margin_y,this.custom_css=e.custom_css,this.auto_open_after_seconds=e.auto_open_after_seconds,this.auto_open_only_new_visitor=e.auto_open_only_new_visitor,this.notification_badge_after_seconds=e.notification_badge_after_seconds,this.glow_after_seconds=e.glow_after_seconds,this.glow_duration_seconds=e.glow_duration_seconds,this.glow_color=e.glow_color,this.has_background_fade=e.has_background_fade,this.display_actions=e.display_actions,this.pageview_url=e.pageview_url,this.template=e.template,this.is_overlimits=e.is_overlimits,this.direct_open_when_one_channel=e.direct_open_when_one_channel,this.display_countdown_timer=e.display_countdown_timer,this.display_countdown_timer_seconds_left=e.display_countdown_timer_seconds_left,this.is_spa=e.is_spa,this.device=e.device,this.tags=e.tags,this.sdk_name=e.name,this.sdk_email=e.email,this.sdk_phone=e.phone,this.sdk_company=e.company,this.sdk_id=e.id,this.sdk_notes=e.notes;var o=["name","email","phone","company","id","notes","tags"].filter((function(t){return e[t]}));o.length&&console.log("[Boei] SDK identified — prefilled: "+o.join(", ")),this.hide_live_chat=e.hide_live_chat,this.use_google_analytics4=e.use_google_analytics4,this.use_plausible_analytics=e.use_plausible_analytics,this.use_google_tag_manager=e.use_google_tag_manager,this.use_simple_analytics=e.use_simple_analytics,this.use_facebook_pixel=e.use_facebook_pixel,this.event_name_opened=e.event_name_opened,this.event_name_conversion=e.event_name_conversion,this.integration_tawk_property_id=e.integration_tawk_property_id,this.integration_tawk_widget_id=e.integration_tawk_widget_id,this.dom_button_id=this.setId("boei_button"),this.dom_button_close_id=this.setId("boei_button_close"),this.dom_close_trigger_message_id=this.setId("boei_close_trigger_message"),this.dom_message_trigger_id=this.setId("boei_trigger_message"),this.dom_background_fade_id=this.setId("boei_background_fade"),this.helper_id_prefix=this.setId("boei_helper_id_"),this.helper_class=this.setId("boei-helper"),this.dom_notification_badge_id=this.setId("boei_notification_badge"),this.dom_watermark_button_id=this.setId("boei_watermark_button"),this.dom_form_email_id=this.setId("boei_form_email"),this.dom_form_name_id=this.setId("boei_form_name"),this.dom_form_subject_id=this.setId("boei_form_subject"),this.dom_form_company_id=this.setId("boei_form_company"),this.dom_form_last_name_id=this.setId("boei_form_last_name"),this.dom_form_container_id=this.setId("boei_container"),this.dom_form_loading_id=this.setId("boei_loading"),this.dom_form_success_id=this.setId("boei_form_success"),this.dom_form_helper_id=this.setId("boei_form_helper_id"),this.dom_contact_form_id=this.setId("boei_contact_form_form"),this.dom_form_message_id=this.setId("dom_form_message_id"),this.dom_call_me_back_form_id=this.setId("boei_call_me_back_form"),this.dom_call_me_back_phone_id=this.setId("boei_call_me_back_phone"),this.dom_call_me_back_when_id=this.setId("boei_call_me_back_when"),this.dom_form_custom1_id=this.setId("boei_custom1"),this.dom_form_custom2_id=this.setId("boei_custom2"),this.dom_form_custom3_id=this.setId("boei_custom3"),this.dom_form_custom4_id=this.setId("boei_custom4"),this.dom_form_custom5_id=this.setId("boei_custom5"),this.dom_form_custom_textarea1_id=this.setId("boei_custom_text1"),this.dom_form_custom_textarea2_id=this.setId("boei_custom_text2"),this.dom_iframe_container_id=this.setId("boei_iframe_container"),this.dom_html_container_id=this.setId("boei_html_container"),this.dom_markdown_container_id=this.setId("boei_markdown_container"),this.dom_youtube_container_id=this.setId("boei_youtube_container"),this.dom_form_thank_you_page_id=this.setId("boei_thank_you_page"),this.dom_whatsapp_chat_container_id=this.setId("boei_whatsapp_chat"),this.dom_feedback_form_id=this.setId("boei_feedback_form"),this.dom_feedback_selected_id=this.setId("boei_feedback_form_selected"),this.dom_feedback_comment_id=this.setId("boei_feedback_comment"),this.dom_newsletter_signup_id=this.setId("boei_newsletter_signup"),this.dom_gdpr_consent_checkbox=this.setId("boei_gdpr_consent_checkbox"),this.dom_gdpr_consent_label=this.setId("boei_gdpr_consent_label"),this.dom_input_customer_email_field="boei_prefill_customer_email",this.dom_input_customer_name_field="boei_prefill_customer_name",this.dom_input_customer_company_field="boei_prefill_customer_company",this.dom_input_customer_phone_field="boei_prefill_customer_phone",this.dom_input_customer_id_field="boei_prefill_customer_id",this.dom_input_customer_notes_field="boei_prefill_customer_notes",this.dom_set_locale="widget_set_locale",this.fontfamily="system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,Arial,sans-serif",this.fontsize="16px",this.fontsize_small="14px",this.z_index_base=999997,this.interaction_button_clicked=!1,this.interaction_helper_clicked=[],this.lastHelperHeight=null,this.lastHelperMargin=null,this.max_width=e.container_width||350,this.brandcolor=e.brandcolor,this.brand_background=e.brand_background,this.brandcolor_text=e.brandcolor_text,this.button_hover_label=e.button_hover_label,this.container_bordercolor=e.container_bordercolor,this.container_backgroundcolor=e.container_backgroundcolor,this.container_textcolor=e.container_textcolor,this.overall_border_radius=e.overall_border_radius+"px",this.border_radius_container=1.5*e.overall_border_radius+"px",this.helper_bordercolor=e.helper_bordercolor,this.helper_backgroundcolor=e.helper_backgroundcolor,this.helper_iconcolor=e.helper_iconcolor,this.helper_textcolor=e.helper_textcolor,this.helper_highlight_bordercolor=e.helper_highlight_bordercolor,this.helper_highlight_backgroundcolor=e.helper_highlight_backgroundcolor,this.helper_highlight_iconcolor=e.helper_highlight_iconcolor,this.helper_highlight_textcolor=e.helper_highlight_textcolor,this.helper_highlight_fontweight=e.helper_highlight_fontweight,this.input_textcolor=e.input_textcolor,this.input_bordercolor=e.input_bordercolor,this.input_backgroundcolor=e.input_backgroundcolor,this.cta_bordercolor=e.cta_bordercolor,this.cta_backgroundcolor=e.cta_backgroundcolor,this.cta_textcolor=e.cta_textcolor,this.cta_display_effect=e.cta_display_effect,this.is_out_of_office=e.is_out_of_office,this.dom_boei_open_handler=null,this.dom_boei_close_handler=null,this.test_mode&&(hostname=encodeURI(window.location.hostname),hostname.endsWith("boei.test")||hostname.endsWith("boei.help")||(this.test_mode=!1)),e.font_family&&(this.fontfamily=e.font_family+","+this.fontfamily,"inherit"==e.font_family&&(this.fontfamily="")),e.font_size&&(this.fontsize=e.font_size+"px",this.fontsize_small=e.font_size-2+"px"),this.loadCSS(),this.hide_live_chat&&(this.hasChatType("chat_botstar")&&this.hideBotstar(),this.hasChatType("chat_crisp")&&this.hideCrisp(),this.hasChatType("chat_intercom")&&this.hideIntercom(),this.hasChatType("chat_drift")&&this.hideDrift(),this.hasChatType("chat_froged")&&this.hideFroged(),this.hasChatType("chat_continually")&&this.hideContinually(),this.hasChatType("chat_liveagent")&&this.hideLiveAgent(),this.hasChatType("chat_jivochat")&&this.hideJivochat(),this.hasChatType("chat_tidio")&&this.hideTidiochat(),this.hasChatType("chat_shopify")&&this.hideShopifyChat(),this.hasChatType("chat_tawk")&&this.hideTawk()),this.integration_tawk_property_id&&this.loadTawkV2(this.integration_tawk_property_id,this.integration_tawk_widget_id),this.use_persistent_load_key=e.use_persistent_load_key||!1,this.load_key=this.use_persistent_load_key?this.getLoadKey():this.generateSessionLoadKey(),this.initializeAfterLoad()},BoeiWidget.prototype.getLoadKey=function(){if(!this.use_persistent_load_key)return null;var e="widget_load_key",t=document.cookie,o=t.indexOf(e+"=");if(-1!==o){o+=e.length+1;var i=t.indexOf(";",o);return-1===i&&(i=t.length),t.substring(o,i)}var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}));return document.cookie=e+"="+n+"; path=/; max-age=2592000; SameSite=Lax",n},BoeiWidget.prototype.generateSessionLoadKey=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},BoeiWidget.prototype.replaceLoadKeyPlaceholder=function(e){return e&&-1!==e.indexOf("{{LOAD_KEY}}")?e.replace(/\{\{LOAD_KEY\}\}/g,this.load_key):e},BoeiWidget.prototype.initializeAfterLoad=function(e){return this.createButton(),this.listenToBoeiTriggers(),this.displayBoei()&&(this.display_actions&&!this.shouldDisableGrabbersOnMobile()?this.triggerAttentionGrabbers():this.display_actions||(this.triggerMessage(),null!==this.auto_open_after_seconds&&this.autoOpenBoei(),null!==this.notification_badge_after_seconds&&this.animateNotificationBadge(),null!==this.glow_after_seconds&&this.animateGlow()),this.test_mode||this.pageview()),boeiInstances[e]=this,this},BoeiWidget.prototype.getActiveGrabbers=function(){if(!this.display_actions)return[];for(var e=window.location.pathname+window.location.search,t=this.display_actions.page_rules||[],o=0;o<t.length;o++){var i=t[o];if(this.matchesPageRule(i,e)&&"customize"===i.action)return i.attention_grabbers||[]}return this.display_actions.default&&this.display_actions.default.attention_grabbers||[]},BoeiWidget.prototype.shouldDisplayOnPage=function(){if(!this.display_actions)return!0;if(-1!==window.location.pathname.indexOf("view_test.php"))return!0;for(var e=window.location.pathname+window.location.search,t=this.display_actions.page_rules||[],o=0;o<t.length;o++){var i=t[o];if(this.matchesPageRule(i,e))return"hide"!==i.action}return"specific_pages"!==this.display_actions.show_on},BoeiWidget.prototype.matchesPageRule=function(e,t){switch(e.match_type){case"exact":return t===e.path;case"starts_with":return 0===t.indexOf(e.path);case"contains":return-1!==t.indexOf(e.path);case"ends_with":return t.slice(-e.path.length)===e.path;default:return!1}},BoeiWidget.prototype.shouldDisableGrabbersOnMobile=function(){if(!this.display_actions)return!1;if("mobile"!==this.device)return!1;for(var e=window.location.pathname+window.location.search,t=this.display_actions.page_rules||[],o=0;o<t.length;o++){var i=t[o];if(this.matchesPageRule(i,e))return i.disable_on_mobile||!1}return this.display_actions.default&&this.display_actions.default.disable_on_mobile||!1},BoeiWidget.prototype.getGrabberSettings=function(e){for(var t=this.getActiveGrabbers(),o=0;o<t.length;o++)if(t[o].type===e)return t[o].settings||{};return null},BoeiWidget.prototype.isGrabberActive=function(e){return null!==this.getGrabberSettings(e)},BoeiWidget.prototype.triggerAttentionGrabbers=function(){var e=this.getActiveGrabbers(),t=this;e.forEach((function(e){switch(e.type){case"cta":t.triggerCTA(e.settings);break;case"glow":t.triggerGlow(e.settings);break;case"badge":t.triggerBadge(e.settings);break;case"auto_open":t.triggerAutoOpen(e.settings)}}))},BoeiWidget.prototype.triggerCTA=function(e){if(e&&e.message){var t=this,o=1e3*(e.start_after_seconds||5);setTimeout((function(){t.isBoeiOpen()||e.only_new_visitors&&!t.isNewVisitor(e.message)||(t.trigger_message=e.message,t.close_trigger_after_seconds=e.close_after_seconds||0,t.display_close_trigger_message=e.show_close_button||!1,t.cta_display_effect=e.display_effect||"none",t.displayCtaMessage())}),o)}},BoeiWidget.prototype.displayCtaMessage=function(){var e=this;if(document.getElementsByClassName("boei-opened").length>0)return!0;e.markCtaMessageSeen(e.trigger_message);var t=document.createElement("div");t.className="boei-pre-opened",t.id=e.dom_message_trigger_id,t.style.cssText=`\n        animation: boei_fade_in 0.3s;\n        display: flex;\n        box-sizing: border-box;\n        border: 1px solid ${e.cta_bordercolor};\n        background-color: ${e.cta_backgroundcolor};\n        color: ${e.cta_textcolor};\n        z-index: ${e.z_index_base};\n        position: fixed;\n        padding: 0;\n        border-radius: ${e.overall_border_radius};\n        cursor: pointer;\n        font-family: ${e.fontfamily};\n        font-size: ${e.fontsize};\n        line-height: 1.4;\n        box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;\n        transition: transform .15s ease-in-out;\n        max-width: calc(100vw - 80px);\n        word-wrap: break-word;\n        white-space: normal;\n    `,t.setAttribute("data-no-lcp","true"),e.setPosition("trigger_message",t);let o=!1;if(e.display_countdown_timer){let i=document.createElement("div");i.style.cssText=`\n            background: ${e.brand_background};\n            color: ${e.brandcolor_text};\n            min-height: 38px;\n            vertical-align: top;\n            border-radius: ${e.overall_border_radius};\n            padding: 10px;\n        `,o=e.countdownTimer(e.display_countdown_timer_seconds_left,i),t.appendChild(i)}let i=o?"margin: 10px 20px 10px 10px;":"margin: 10px 20px;",n=document.createElement("div");n.style.cssText=`\n        background-color: ${e.cta_backgroundcolor};\n        color: ${e.cta_textcolor} !important;\n        min-height: 18px;\n        vertical-align: top;\n        ${i}\n        overflow: hidden;\n        min-width: 0;\n        flex: 1;\n        max-width: 100%;\n        word-break: break-word;\n        overflow-wrap: break-word;\n        white-space: normal;\n    `;let s=document.createElement("div");s.style.cssText="\n        white-space: normal !important;\n        word-break: break-word !important;\n        overflow-wrap: break-word !important;\n        display: block !important;\n        width: 100% !important;\n        max-width: 100% !important;\n    ";let a=e.replaceVariablesUnescaped(e.trigger_message);switch(a=e.simpleMarkdownToHtml(a),s.innerHTML=a,e.cta_display_effect){case"typing":s.innerHTML="",e.typeWriter(s,a,50);break;case"fade":s.style.opacity="0",s.style.transition="opacity 1s",setTimeout((()=>{s.style.opacity="1"}),100);break;case"slide":s.style.transform="translateX(-100%)",s.style.transition="transform 0.5s",setTimeout((()=>{s.style.transform="translateX(0)"}),100);break;case"pop":s.style.transform="scale(0)",s.style.transition="transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)",setTimeout((()=>{s.style.transform="scale(1)"}),100);break;case"streaming":s.innerHTML="",e.simulateStreamingMessage(s,a)}if(n.appendChild(s),t.appendChild(n),t.addEventListener("click",e.openBoei.bind(e)),t.addEventListener("mouseover",e.mouseoverBoei.bind(e,t)),t.addEventListener("mouseout",e.mouseoutBoei.bind(e,t)),e.display_close_trigger_message){let o=e.prepareCloseButton();o.id=e.dom_close_trigger_message_id,o.className="boei-pre-opened",o.style.position="absolute",o.style.top="-10px",o.style.right="-10px",o.style.bottom="auto",o.style.left="auto",o.addEventListener("click",(function(t){t.stopPropagation(),e.closeTriggerMessage(o)})),t.appendChild(o)}document.body.appendChild(t),e.close_trigger_after_seconds>0&&setTimeout((function(){e.closeTriggerMessage()}),1e3*e.close_trigger_after_seconds),e.revertStylingSubelements(e.dom_message_trigger_id)},BoeiWidget.prototype.triggerGlow=function(e){if(e){var t=this,o=1e3*(e.start_after_seconds||5),i=1e3*(e.duration_seconds||60),n=e.intensity||"medium",s=e.color||t.glow_color||t.brandcolor,a={light:{from:"0px 0px 5px 2px",to:"0px 0px 10px 3px"},medium:{from:"0px 0px 10px 3px",to:"0px 0px 20px 5px"},strong:{from:"0px 0px 15px 5px",to:"0px 0px 30px 8px"}},r=a[n]||a.medium;setTimeout((function(){if(!t.isBoeiOpen()){var e=document.getElementById(t.dom_button_id);if(e){var o="boei-glow-style-"+t.key,n=document.getElementById(o);n&&n.remove();var a=document.createElement("style");a.id=o,a.textContent="@keyframes boei_glow_dynamic { from { box-shadow: "+r.from+" "+s+"; } to { box-shadow: "+r.to+" "+s+"; } } .boei-glow-dynamic { animation: boei_glow_dynamic 0.5s infinite alternate; }",document.head.appendChild(a),e.classList.add("boei-glow-dynamic"),setTimeout((function(){e.classList.remove("boei-glow-dynamic");var t=document.getElementById(o);t&&t.remove()}),i)}}}),o)}},BoeiWidget.prototype.triggerBadge=function(e){if(e){var t=this,o=1e3*(e.start_after_seconds||0),i=e.count||1;setTimeout((function(){if(!t.isBoeiOpen()){var e=document.createElement("div");e.className="boei-pre-opened",e.id=t.dom_notification_badge_id,e.style="background-color: red; z-index: "+(t.z_index_base+1)+"; position: fixed; height: 19px; width: 19px; line-height: 19px; border-radius: 50%; cursor: pointer; font-size: 12px; text-align: center; color: #ffffff; animation: boei_shake 0.9s ease;",t.setPosition("notification_badge",e);var o=document.createTextNode(String(i));e.appendChild(o),e.addEventListener("click",(function(){t.openBoei()})),document.body.appendChild(e)}}),o)}},BoeiWidget.prototype.triggerAutoOpen=function(e){if(e){var t=this;if(!e.only_new_visitors||t.isNewVisitor("__auto_open__"))if("scroll"===e.trigger_type&&e.scroll_percentage){var o=!1;window.addEventListener("scroll",(function(){if(!o&&!t.isBoeiOpen()){var i=document.documentElement.scrollHeight-window.innerHeight;(i>0?window.scrollY/i*100:0)>=e.scroll_percentage&&(o=!0,t.markCtaMessageSeen("__auto_open__"),t.openBoei(null,null,!0))}}))}else{var i=1e3*(e.start_after_seconds||5);setTimeout((function(){t.isBoeiOpen()||(t.markCtaMessageSeen("__auto_open__"),t.openBoei(null,null,!0))}),i)}}},window.getBoeiInstance=function(e){return boeiInstances[e=e||"default"]},window.Boei=function(e,t){var o,i;"string"==typeof e?(o=e,i=t):(o="default",i=e),window.BQ[o]||(window.BQ[o]=[]);var n=boeiInstances[o];n?"function"==typeof i?i(n):"object"==typeof i&&Object.assign(n,i):window.BQ[o].push(i)},BoeiWidget.prototype.hasChatType=function(e){return!!Array.isArray(this.helpers)&&this.helpers.some((function(t){return t.type===e}))},BoeiWidget.prototype.setId=function(e){return this.allow_identifiers?e:"b"+Math.random().toString(36).substr(2,5)},BoeiWidget.prototype.pageview=function(){},BoeiWidget.prototype.loadCSS=function(){const e=document.head,t=document.createElement("style");e.appendChild(t);const o=`\n        /* Movement animations */\n        @keyframes boei_shake {\n            10%, 90% { transform: translate3d(-1px, 0, 0); }\n            20%, 80% { transform: translate3d(2px, 0, 0); }\n            30%, 50%, 70% { transform: translate3d(-2px, 0, 0); }\n            40%, 60% { transform: translate3d(2px, 0, 0); }\n        }\n\n        @keyframes boei_spin {\n            0% { transform: rotate(0deg); }\n            100% { transform: rotate(360deg); }\n        }\n\n        @keyframes boei_spin_reverse {\n            0% { transform: rotate(0deg); }\n            100% { transform: rotate(-360deg); }\n        }\n\n        /* Visual effects */\n        @keyframes boei_glow {\n            from { box-shadow: 0px 0px 10px 3px ${this.glow_color}; }\n            to { box-shadow: 0px 0px 20px 5px ${this.glow_color}; }\n        }\n\n        @keyframes boei_zoom_in {\n            from { transform: scale(0); }\n            to { transform: scale(1); }\n        }\n\n        /* Entrance/exit animations */\n        @keyframes boei_fade_in {\n            from { transform: translateY(+100%); opacity: 0; }\n            to { transform: translateY(0); opacity: 1; }\n        }\n\n        @keyframes boei_fade_out {\n            from { transform: translateY(0); opacity: 1; }\n            to { transform: translateY(+100%); opacity: 0; }\n        }\n\n        @keyframes boei_fold_down {\n            0% { transform: translateY(-100%); opacity: 0; }\n            1% { transform: translateY(-100%); opacity: 1; }\n            100% { transform: translateY(0); opacity: 1; }\n        }\n        \n        .boei-glow-animation {\n            animation: boei_glow 0.5s infinite alternate;\n        }\n        \n        .boei-spin {\n            animation: boei_spin 0.3s ease-in-out;\n        }\n        \n        .boei-spin-reverse {\n            animation: boei_spin_reverse 0.3s ease-in-out;\n        }\n\n        /* Interactive states */\n        .boei-hovered {\n            filter: brightness(80%);\n        }\n    `;t.appendChild(document.createTextNode(o)),null!==this.custom_css&&t.appendChild(document.createTextNode(this.custom_css))},BoeiWidget.prototype.isBoeiCreated=function(){return document.getElementById(this.dom_button_id)},BoeiWidget.prototype.createButton=function(){if(this.isBoeiCreated())return;var e=document.createElement("button");e.id=this.dom_button_id,e.setAttribute("data-generator","Powered by Boei - https://boei.help"),e.setAttribute("data-boei-key",this.key),e.setAttribute("tabindex","0");const t=this.button_width+8,o=this.button_height+8,i=t/this.button_width;let n=`\n        position: fixed;\n        outline: none !important;\n        border: 0;\n        opacity: ${this.opacity};\n        color: ${this.brandcolor_text};\n        z-index: ${this.z_index_base};\n        height: ${this.button_height}px;\n        width: ${this.button_width}px;\n        padding: 0;\n        cursor: pointer;\n        text-align: center;\n        font-family: ${this.fontfamily};\n        font-size: ${this.fontsize};\n        line-height: 1;\n        box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;\n        vertical-align: middle;\n        overflow: visible;\n        transition: width 0.3s, height 0.3s, margin 0.3s;\n        will-change: auto;\n        content-visibility: auto;\n    `,s="border-radius: 20px;";"round"==this.shape&&(s="border-radius: 50%;"),"square"==this.shape&&(s="border-radius: 0px;"),n+=s,null!==this.button_image?n+=`background-image: url("${this.button_image}"); background-size: cover; background-position: center; background-color: transparent;`:n+=`background-image: none; background: ${this.brand_background};`,e.setAttribute("data-no-lcp","true"),e.style.cssText=n;let a=!0;if(this.displayBoei()||(e.style.display="none",a=!1),void 0!==this.helpers[0]&&e.setAttribute("aria-label",this.helpers[0].title),this.setPosition("boei_button",e),e.addEventListener("mouseenter",this.mouseoverBoeiButton.bind(this,e),!1),e.addEventListener("mouseleave",this.mouseoutBoeiButton.bind(this,e),!1),null===this.button_image){var r=document.createElement("span");r.id=`${this.dom_button_id}-image`,r.innerHTML=`<span style="height: ${this.button_icon_size}px; width: ${this.button_icon_size}px; color: ${this.brand_textcolor}; display: flex; justify-content: center; align-items: center;">${this.icon_svg}</span>`,this.accessibilize("svg",r),r.style="\n            height: 100%; \n            width: 100%; \n            display: flex; \n            justify-content: center; \n            align-items: center;\n            transition: transform 0.3s;\n        ",e.appendChild(r)}if(this.use_plausible_analytics){let t="BoeiOpened";e.classList.add("plausible-event-name="+t)}document.body.appendChild(e);let l=document.createElement("style");l.textContent=`\n        #${this.dom_button_id}:hover {\n            width: ${t}px !important;\n            height: ${o}px !important;\n            margin: -4px;\n        }\n        #${this.dom_button_id}:hover #${this.dom_button_id}-image {\n            transform: scale(${i});\n        }\n    `,document.head.appendChild(l),a&&this.addBoeiWatermark(),this.dom_boei_open_handler=this.openBoei.bind(this),this.dom_boei_close_handler=this.closeBoei.bind(this,e),e.addEventListener("click",this.dom_boei_open_handler,!1)},BoeiWidget.prototype.showHelpers=function(e=null,t=!1){let o=1,i=null;const n=["contact_form","feedback_form","newsletter_signup","call_me_back","youtube_welcome","markdown_welcome"],s=["contact_form","feedback_form","newsletter_signup","call_me_back","youtube_welcome","markdown_welcome","iframe_widget","html","image","markdown","productlift_roadmap","productlift_sidebar","youtube"];"container"===this.template&&(i=this.createFormContainer(),i.className="boei-opened "+this.helper_class);let a,r=null,l=null;if(this.helpers.forEach((t=>{if(a=!1,l=t.type,r="youtube_welcome"===t.type||"markdown_welcome"===t.type?document.createElement("div"):null===t.url||"iframe_widget"===t.type||null!=t.options.display_type&&"single_image"===t.options.display_type?document.createElement("button"):document.createElement("a"),i?(r.style="position: static; display: block; box-sizing: border-box; background-color: "+this.helper_backgroundcolor+"; width: 100%; text-align: left; border: 1px solid "+this.helper_bordercolor+"; color: "+this.helper_textcolor+"; padding: 15px 10px 15px 10px; border-radius: "+this.overall_border_radius+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; text-decoration: none; font-weight: normal; letter-spacing: normal; text-transform: none; line-height: 1; margin: 0 0 5px 0;","markdown_welcome"===t.type&&(r.style.lineHeight="1.4")):r.style="animation: boei_fade_in 0.3s; box-sizing: border-box; border: 1px solid "+this.helper_bordercolor+"; background-color: "+this.helper_backgroundcolor+"; color: "+this.helper_textcolor+"; z-index: "+this.z_index_base+"; position: fixed; padding: 10px 20px 10px 20px; border-radius: "+this.overall_border_radius+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1; text-decoration: none;  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; transition: transform .15s ease-in-out; font-weight: normal; letter-spacing: normal; text-transform: none; margin: 0;",!i||"youtube_welcome"!==t.type&&"markdown_welcome"!==t.type||(r.style.background=this.container_backgroundcolor,r.style.color=this.container_textcolor,r.style.border="0",r.style.paddingLeft="0"),r.className="boei-opened "+this.helper_class,r.id=this.helper_id_prefix+o,"markdown_welcome"===t.type&&this.revertStylingSubelements(r.id),t.is_highlight&&(r.style.background=this.helper_highlight_backgroundcolor,r.style.color=this.helper_highlight_textcolor,r.style.borderColor=this.helper_highlight_bordercolor,r.style.fontWeight=this.helper_highlight_fontweight,r.style.borderRadius="5px",this.helper_highlight_backgroundcolor.includes("linear")&&(r.style.border="0")),i&&(1===o&&"markdown_welcome"===t.type&&(r.style.paddingTop=0),o===this.helpers.length&&(r.style.marginBottom=0)),r.options=t.options,r.interaction_url=t.interaction_url,this.setPosition("helper",r,o),null!=t.icon_url&&(r.style.backgroundImage="url('"+t.icon_url+"')",r.style.backgroundSize="18px 18px",r.style.backgroundRepeat="no-repeat",r.style.backgroundPosition="20px 50%",r.style.paddingLeft="50px"),"youtube_welcome"!==t.type&&"video_welcome"!==t.type&&"markdown_welcome"!==t.type&&(r.style.cursor="pointer",r.addEventListener("mouseover",this.mouseoverBoei.bind(this,r),!1),r.addEventListener("mouseleave",this.mouseoutBoei.bind(this,r),!1)),"youtube_welcome"!==t.type&&"video_welcome"!==t.type||(r.style.background="#000000",r.style.padding="0"),null!=t.options.display_type&&"single_image"===t.options.display_type?r.addEventListener("click",this.openHelperDisplay.bind(this,this.passVariablesToUrl(t.options.image),t.options),!1):(null!=t.url&&("phone"===t.type?r.href=t.url:r.href=this.passVariablesToUrl(t.url),r.setAttribute("rel","nofollow")),!("new_window"in t.options)||"true"!==t.options.new_window&&!0!==t.options.new_window||r.setAttribute("target","_blank")),"chat_botstar"===t.type&&r.addEventListener("click",this.openChatBotstar.bind(this,r),!1),"chat_drift"===t.type&&r.addEventListener("click",this.openChatDrift.bind(this,r),!1),"chat_continually"===t.type&&r.addEventListener("click",this.openChatContinually.bind(this,r),!1),"chat_quriobot"===t.type&&r.addEventListener("click",this.openChatQuriobot.bind(this,r),!1),"chat_liveagent"===t.type&&r.addEventListener("click",this.openChatLiveAgent.bind(this,r),!1),"chat_froged"===t.type&&r.addEventListener("click",this.openChatFroged.bind(this,r),!1),"chat_crisp"===t.type&&r.addEventListener("click",this.openChatCrisp.bind(this,r),!1),"chat_intercom"===t.type&&r.addEventListener("click",this.openChatIntercom.bind(this,r),!1),"chat_tawk"===t.type&&r.addEventListener("click",this.openChatTawk.bind(this,r),!1),"chat_tawk_v2"===t.type&&r.addEventListener("click",this.openChatTawkV2.bind(this,r),!1),"chat_jivochat"===t.type&&r.addEventListener("click",this.openChatJivochat.bind(this,r),!1),"chat_shopify"===t.type&&r.addEventListener("click",this.openChatShopify.bind(this,r),!1),"chat_tidio"===t.type&&r.addEventListener("click",this.openChatTidiochat.bind(this,r),!1),"contact_form"===t.type&&r.addEventListener("click",this.openMailForm.bind(this,r,t),!1),"newsletter_signup"===t.type&&r.addEventListener("click",this.openNewsletterSignupForm.bind(this,r,t),!1),"call_me_back"===t.type&&r.addEventListener("click",this.openCallMeBackForm.bind(this,r,t),!1),"feedback_form"===t.type&&r.addEventListener("click",this.openFeedbackForm.bind(this,r,t),!1),"markdown"===t.type&&r.addEventListener("click",this.openMarkdown.bind(this,r),!1),"html"===t.type&&r.addEventListener("click",this.openHtml.bind(this,r),!1),"youtube_widget"===t.type&&r.addEventListener("click",this.openYoutubeWidget.bind(this,r),!1),"iframe_widget"===t.type&&r.addEventListener("click",this.openIframeWidget.bind(this,r),!1),"productlift_sidebar"===t.type&&r.setAttribute("data-productlift-sidebar",t.options.key),"whatsapp"===t.type&&t.options.display_chat_widget&&(r.addEventListener("click",this.openWhatsAppChatWidget.bind(this,r),!1),a=!0),!n.includes(t.type)&&!a&&(r.addEventListener("click",this.interactionHelperClicked.bind(this,t),!1),this.use_plausible_analytics)){let e=this.getHelperConversionEventname(t);r.classList.add("plausible-event-name="+e)}if(void 0!==t.options.redirect_on_click&&t.options.redirect_on_click&&r.addEventListener("click",(function(){setTimeout((function(){window.location.href=t.options.redirect_on_click}),1e3)}),!1),"youtube_welcome"===t.type)r.innerHTML="<div style='position: relative; display: block; width: 100%; height: 100%; padding: 0; overflow: hidden;'><iframe style='width: 100%; height: 100%; border: 0; box-sizing: border-box;' src=\"https://www.youtube.com/embed/"+t.options.video_id+'?autoplay=1&mute=1" referrerpolicy="strict-origin-when-cross-origin" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>';else if("video_welcome"===t.type)r.innerHTML="<div style='position: relative; display: block; width: 100%; height: 100%; padding: 0; overflow: hidden;'><iframe style='width: 100%; height: 100%; border: 0; box-sizing: border-box;' src=\""+t.options.video_url+'" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>';else if("markdown_welcome"===t.type){let e=document.createElement("div");if(e.style.display="flex",e.style.alignItems="start",e.style.justifyContent="flex-start",t.options.avatar){let o=document.createElement("img");o.src=t.options.avatar,o.style.width="40px",o.style.height="40px",o.style.borderRadius="50%",o.style.marginRight="10px",o.style.flexShrink="0",e.appendChild(o)}let o=document.createElement("div");o.innerHTML=this.replaceVariablesUnescaped(t.options.body);let i=o.querySelector("p");i&&(i.style.marginTop="0"),o.style.flex="1",o.style.maxWidth=this.max_width-50+"px",t.options.avatar&&(o.style.minHeight="40px"),e.appendChild(o),r.appendChild(e),r.style.maxWidth=this.max_width+"px"}else{let e=document.createElement("div");if(e.style="display: flex; align-items: flex-start; line-height: 1.4; color: "+this.helper_textcolor+"; gap: 20px;",t.is_highlight&&(e.style.color=this.helper_highlight_textcolor),t.inline_svg_icon){let o=this.helper_iconcolor;t.is_highlight&&(o=this.helper_highlight_iconcolor);let i=document.createElement("div");i.style="display: flex; align-items: center; justify-content: center; height: 18px; width: 18px; flex-shrink: 0; align-self: center;",i.innerHTML='<span style="color: '+o+';">'+t.inline_svg_icon+"</span>",e.appendChild(i)}let o=document.createElement("div");o.style="display: flex; flex-direction: column; gap: 4px;";let i=document.createElement("div");if(i.textContent=t.title,i.style="font-weight: inherit; line-height: 1.2;",o.appendChild(i),t.description){let e=document.createElement("div");e.style="font-size: 0.875em; opacity: 0.6; line-height: 1.3;",e.textContent=t.description,o.appendChild(e)}e.appendChild(o),r.style.maxWidth=this.max_width+"px",r.appendChild(e)}if(e===t.key)return r.click(),void(n.includes(l)||a||this.closeBoei());null===e&&(i?i.appendChild(r):document.body.appendChild(r)),this.lastHelperHeight=r.offsetHeight,o++})),this.direct_open_when_one_channel&&2===o&&!e){let e=l&&this.helpers.length>0&&this.helpers[0].options&&"single_image"===this.helpers[0].options.display_type,o=!s.includes(l)&&!a&&!e;t&&o?(i&&!i.parentNode&&document.body.appendChild(i),i||r.parentNode||document.body.appendChild(r),i&&(i.style.opacity="1",i.style.visibility="visible",i.style.transform="translateY(0)"),r.style.opacity="1",r.style.visibility="visible",r.style.transform="translateY(0)"):(r.click(),o&&!t&&setTimeout((()=>{this.closeBoei()}),1e3))}else i&&!e&&document.body.appendChild(i)},BoeiWidget.prototype.openHelperDisplay=function(e,t={}){this.closeHelpers();let o=document.createElement("div");if(o.className="boei-opened",o.id=this.dom_form_container_id,o.style="box-sizing: border-box; max-width: "+this.max_width+"px; border: 1px solid "+this.helper_bordercolor+"; background-color: "+this.helper_backgroundcolor+"; color: "+this.helper_textcolor+"; z-index: "+this.z_index_base+"; position: fixed; padding: 20px; border-radius: "+this.overall_border_radius+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1.4; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; transition: transform .15s ease-in-out;",this.setPosition("widget",o),t.text_above_qr&&""!==t.text_above_qr.trim()){let e=document.createElement("div");e.innerHTML=this.replaceVariablesUnescaped(t.text_above_qr),e.style="margin-bottom: 15px; text-align: center; line-height: 1.4; color: "+this.helper_textcolor+";",o.appendChild(e),this.revertStylingSubelements(this.dom_form_container_id)}let i=document.createElement("img");return i.src=e,i.style="max-width: 100%; height: auto; min-height: 150px; display: block; margin: 0 auto;",o.appendChild(i),document.body.appendChild(o),o},BoeiWidget.prototype.animateBoeiButton=function(e="regular"){const t=document.getElementById(this.dom_button_id);t&&(t.classList.remove("boei-spin","boei-spin-reverse"),t.offsetWidth,t.classList.add("reverse"===e?"boei-spin-reverse":"boei-spin"),t.addEventListener("animationend",(function e(){t.classList.remove("boei-spin","boei-spin-reverse"),t.removeEventListener("animationend",e)})))},BoeiWidget.prototype.openBoei=function(e=null,t=null,o=!1){if(this.isBoeiOpen())return;this.showBoeiButton(),this.animateBoeiButton(),this.boeiOpenedCount++;for(var i=document.getElementsByClassName("boei-pre-opened");i.length>0;)i[0].parentNode.removeChild(i[0]);this.has_background_fade&&this.addBackgroundFade(),this.removeGlow();let n=this.prepareCloseButton();n.setAttribute("tabindex","0"),n.id=this.dom_button_close_id,n.className="boei-opened",n.setAttribute("aria-label","Close"),this.setPosition("close_button",n),n.addEventListener("click",this.closeBoei.bind(this,n),!1),this.addBoeiOpenedWatermark(),this.showHelpers(t,o);var s=document.getElementById(this.dom_button_id);s.removeEventListener("click",this.dom_boei_open_handler,!1),s.addEventListener("click",this.dom_boei_close_handler,!1),s.style.animation="",this.interactionButtonClicked()},BoeiWidget.prototype.revertStylingSubelements=function(e){let t=document.createElement("style");t.textContent=`\n                #${e},\n                #${e} * {\n                    all: revert;\n                }\n                #${e} a {\n                    color: inherit;\n                    text-decoration: underline;\n                    transition: text-decoration 0.3s ease;\n                }\n                #${e} a:hover {\n                    text-decoration: none;\n                }\n                #${e} p,\n                #${e} span,\n                #${e} div {\n                    white-space: normal !important;\n                    word-break: break-word !important;\n                    overflow-wrap: break-word !important;\n                }\n            `,document.head.appendChild(t)},BoeiWidget.prototype.isBoeiOpen=function(){return document.getElementsByClassName("boei-opened").length>0},BoeiWidget.prototype.autoOpenBoei=function(){if(this.auto_open_only_new_visitor&&this.isReferrerSameDomain())return!0;let e=this;setTimeout((function(){if(0!==e.boeiOpenedCount)return!1;e.openBoei()}),1e3*e.auto_open_after_seconds)},BoeiWidget.prototype.isReferrerSameDomain=function(){var e=window.location.hostname,t=document.referrer;if(""!==t&&e===new URL(t).hostname)return!0;return!1},BoeiWidget.prototype.isNewVisitor=function(e){try{var t="boei_cta_seen_"+this.key,o=JSON.parse(localStorage.getItem(t)||"[]");return e?-1===o.indexOf(e):0===o.length}catch(e){return!this.isReferrerSameDomain()}},BoeiWidget.prototype.markCtaMessageSeen=function(e){if(e)try{var t="boei_cta_seen_"+this.key,o=JSON.parse(localStorage.getItem(t)||"[]");-1===o.indexOf(e)&&(o.push(e),localStorage.setItem(t,JSON.stringify(o)))}catch(e){}},BoeiWidget.prototype.animateNotificationBadge=function(){let e=this;setTimeout((function(){if(e.isBoeiOpen())return!1;let t=document.createElement("div");t.className="boei-pre-opened",t.id=e.dom_notification_badge_id,t.style="background-color: red; z-index: "+e.z_index_base+"1; position: fixed; height: 19px; width: 19px; line-height: 19px; border-radius: 50%; cursor: pointer; font-size: 12px; text-align: center; color: #ffffff; animation: boei_shake 0.9s ease;",e.setPosition("notification_badge",t);let o=document.createTextNode("1");t.appendChild(o),document.body.appendChild(t)}),1e3*e.notification_badge_after_seconds)},BoeiWidget.prototype.removeGlow=function(){let e=document.getElementById(this.dom_button_id);e&&e.classList.remove("boei-glow-animation")},BoeiWidget.prototype.animateGlow=function(){let e=this;setTimeout((function(){if(e.isBoeiOpen())return;let t=document.getElementById(e.dom_button_id);t&&(t.classList.add("boei-glow-animation"),setTimeout((function(){e.removeGlow()}),1e3*e.glow_duration_seconds))}),1e3*e.glow_after_seconds)},BoeiWidget.prototype.addBoeiOpenedWatermark=function(){if(this.display_helper_watermark){var e=document.createElement("a");e.className="boei-opened",e.style="animation: boei_fold_down 0.5s ease-out forwards; animation-delay: 0.5s; opacity: 0; transform: translateY(-100%); z-index: "+(this.z_index_base-1)+"; color: #ffffff; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; background-color: #1e293b; text-decoration: none; position: fixed; padding: 6px; text-align: center; cursor: pointer; font-family: "+this.fontfamily+"; font-size: 10px; border: 0; line-height: 1; white-space: nowrap;";var t=window.location.hostname.replace(/^www\./,"");e.href=this.watermark_url_helper+"&domain="+t,e.setAttribute("target","_blank"),this.setPosition("watermark_helper",e);var o=document.createTextNode(this.helper_watermark_text);e.addEventListener("mouseover",this.mouseoverOpenedWatermark.bind(this,e),!1),e.addEventListener("mouseout",this.mouseoutOpenedWatermark.bind(this,e),!1),e.appendChild(o),document.body.appendChild(e)}},BoeiWidget.prototype.mouseoverOpenedWatermark=function(e){e.style.backgroundColor="#ffffff",e.style.color="#000000",e.style.border="1px solid #efefef",e.style.opacity=1},BoeiWidget.prototype.mouseoutOpenedWatermark=function(e){e.style.backgroundColor="#1e293b",e.style.color="#ffffff",e.style.border="0",e.style.opacity=1},BoeiWidget.prototype.addBoeiWatermark=function(){if(this.display_button_watermark){var e=document.createElement("a");e.id=this.dom_watermark_button_id,e.style="z-index: "+this.z_index_base+"1; color: #000000; opacity: 0.5; border-radius: 5px; text-decoration: none; position: fixed; padding: 6px; width: "+this.button_width+"px; text-align: center; cursor: pointer; font-family: "+this.fontfamily+"; font-size: 10px; border: 0; line-height: 1; white-space: nowrap;";var t=window.location.hostname.replace(/^www\./,"");e.href=this.watermark_url_button+"&domain="+t,e.setAttribute("target","_blank"),this.setPosition("watermark",e);var o=document.createTextNode("By Boei");e.addEventListener("mouseover",this.mouseoverWatermark.bind(this,e),!1),e.addEventListener("mouseout",this.mouseoutWatermark.bind(this,e),!1),e.appendChild(o),document.body.appendChild(e)}},BoeiWidget.prototype.mouseoverWatermark=function(e){e.style.backgroundColor="#1e293b",e.style.color="#ffffff",e.style.opacity=1},BoeiWidget.prototype.mouseoutWatermark=function(e){e.style.backgroundColor="transparent",e.style.color="#000000",e.style.border="0",e.style.opacity=.5},BoeiWidget.prototype.addBackgroundFade=function(){let e=document.createElement("div");e.id=this.dom_background_fade_id,e.className="boei-opened",e.style="background-color: #ffffff; opacity: 0.5; z-index: "+(this.z_index_base-2)+"; position: fixed; top: 0; left: 0; height: 100%; width: 100%;",e.addEventListener("click",this.closeBoei.bind(this,e),!1),document.body.appendChild(e)},BoeiWidget.prototype.listenToBoeiTriggers=function(){let e=this;const t=this.throttle((function(t){if(t.target.closest(".boei-embed-open")){t.preventDefault();const o=t.target.closest(".boei-embed-open").getAttribute("data-channel");o?e.openBoei(null,o):e.openBoei()}}),300);document.body.addEventListener("click",t,{passive:!1}),this._triggerHandler=t},BoeiWidget.prototype.throttle=function(e,t){let o;return function(){const i=arguments,n=this;o||(e.apply(n,i),o=!0,setTimeout((()=>o=!1),t))}},BoeiWidget.prototype.cleanup=function(){this._triggerHandler&&document.body.removeEventListener("click",this._triggerHandler)},BoeiWidget.prototype.elementHasClas=function(e,t){return void 0!==e.className&&void 0!==e.className.includes&&e.className.includes(t)},BoeiWidget.prototype.triggerMessage=function(){if(this.trigger_message_only_new_visitor&&this.isReferrerSameDomain())return!0;if(this.trigger_after_seconds>0){let e=this;setTimeout((function(){if(document.getElementsByClassName("boei-opened").length>0)return!0;var t=document.createElement("div");t.className="boei-pre-opened",t.id=e.dom_message_trigger_id,t.style.cssText=`\n                animation: boei_fade_in 0.3s;\n                display: flex;\n                box-sizing: border-box;\n                border: 1px solid ${e.cta_bordercolor};\n                background-color: ${e.cta_backgroundcolor};\n                color: ${e.cta_textcolor};\n                z-index: ${e.z_index_base};\n                position: fixed;\n                padding: 0;\n                border-radius: ${e.overall_border_radius};\n                cursor: pointer;\n                font-family: ${e.fontfamily};\n                font-size: ${e.fontsize};\n                line-height: 1.4;\n                box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;\n                transition: transform .15s ease-in-out;\n                max-width: calc(100vw - 80px);\n                word-wrap: break-word;\n                white-space: normal;\n            `,t.setAttribute("data-no-lcp","true"),e.setPosition("trigger_message",t);let o=!1;if(e.display_countdown_timer){let i=document.createElement("div");i.style.cssText=`\n                    background: ${e.brand_background};\n                    color: ${e.brandcolor_text};\n                    min-height: 38px;\n                    vertical-align: top;\n                    border-radius: ${e.overall_border_radius};\n                    padding: 10px;\n                `,o=e.countdownTimer(e.display_countdown_timer_seconds_left,i),t.appendChild(i)}let i=o?"margin: 10px 20px 10px 10px;":"margin: 10px 20px;",n=document.createElement("div");n.style.cssText=`\n        background-color: ${e.cta_backgroundcolor};\n        color: ${e.cta_textcolor} !important;\n        min-height: 18px;\n        vertical-align: top;\n        ${i}\n        overflow: hidden;\n        min-width: 0;\n        flex: 1;\n        max-width: 100%;\n        word-break: break-word;\n        overflow-wrap: break-word;\n        white-space: normal;\n    `;let s=document.createElement("div");s.style.cssText="\n                white-space: normal !important;\n                word-break: break-word !important;\n                overflow-wrap: break-word !important;\n                display: block !important;\n                width: 100% !important;\n                max-width: 100% !important;\n            ";let a=e.replaceVariablesUnescaped(e.trigger_message);switch(a=e.simpleMarkdownToHtml(a),s.innerHTML=a,e.cta_display_effect){case"typing":s.innerHTML="",e.typeWriter(s,a,50);break;case"fade":s.style.opacity="0",s.style.transition="opacity 1s",setTimeout((()=>{s.style.opacity="1"}),100);break;case"slide":s.style.transform="translateX(-100%)",s.style.transition="transform 0.5s",setTimeout((()=>{s.style.transform="translateX(0)"}),100);break;case"pop":s.style.transform="scale(0)",s.style.transition="transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)",setTimeout((()=>{s.style.transform="scale(1)"}),100);break;case"streaming":s.innerHTML="",e.simulateStreamingMessage(s,a)}if(n.appendChild(s),t.appendChild(n),t.addEventListener("click",e.openBoei.bind(e)),t.addEventListener("mouseover",e.mouseoverBoei.bind(e,t)),t.addEventListener("mouseout",e.mouseoutBoei.bind(e,t)),e.display_close_trigger_message){let o=e.prepareCloseButton();o.id=e.dom_close_trigger_message_id,o.className="boei-pre-opened",o.style.position="absolute",o.style.top="-10px",o.style.right="-10px",o.style.bottom="auto",o.style.left="auto",o.addEventListener("click",(function(t){t.stopPropagation(),e.closeTriggerMessage(o)})),t.appendChild(o)}document.body.appendChild(t),e.close_trigger_after_seconds>0&&setTimeout((function(){e.closeTriggerMessage()}),1e3*e.close_trigger_after_seconds),e.revertStylingSubelements(e.dom_message_trigger_id)}),1e3*this.trigger_after_seconds)}},BoeiWidget.prototype.simulateStreamingMessage=async function(e,t,o=50){e.innerHTML="";const i=document.createElement("div");i.style.width="20px",i.style.display="inline-block",e.appendChild(i);const n=document.createElement("span");n.textContent=".",i.appendChild(n);let s=0;const a=setInterval((()=>{s=(s+1)%4,n.textContent=".".repeat(s||1)}),300);await new Promise((e=>setTimeout(e,1500))),clearInterval(a),e.removeChild(i),e.innerHTML=t;let r=[],l=[];!function e(t){if(t.nodeType===Node.TEXT_NODE&&""!==t.textContent.trim())r.push({node:t,text:t.textContent}),l.push(t),t.textContent="";else if(t.nodeType===Node.ELEMENT_NODE)for(let o of t.childNodes)e(o)}(e);let d=0,c=0,p="";function h(e){return/[.,!?;:'"()[\]{}/-]/.test(e)}await async function e(){if(d<r.length){let t=r[d],i=t.text;for(;c<i.length;){let e=i[c];" "===e||h(e)?(p&&(t.node.textContent+=p,p=""),t.node.textContent+=e,c++,await new Promise((e=>setTimeout(e,o)))):c===i.length-1?(p+=e,t.node.textContent+=p,p="",c++,await new Promise((e=>setTimeout(e,o)))):(p+=e,c++)}d++,c=0,await e()}}()},BoeiWidget.prototype.typeWriter=function(e,t,o){e.innerHTML=t;let i=[],n=[];!function e(t){if(t.nodeType===Node.TEXT_NODE&&""!==t.textContent.trim())i.push({node:t,text:t.textContent}),n.push(t),t.textContent="";else if(t.nodeType===Node.ELEMENT_NODE)for(let o of t.childNodes)e(o)}(e);let s=0,a=0;!function e(){if(s<i.length){let t=i[s];a<t.text.length?(t.node.textContent+=t.text[a],a++,setTimeout(e,o)):(s++,a=0,e())}}()},BoeiWidget.prototype.countdownTimer=function(e,t){function o(){if(e<=0)return clearInterval(i),void(t.innerHTML="Expired");var o=Math.floor(e/86400),n=Math.floor(e%86400/3600),s=Math.floor(e%3600/60),a=Math.floor(e%60),r=String(o).padStart(2,"0"),l="";o>0&&(l+=r+"d "),l+=String(n).padStart(2,"0")+"h "+String(s).padStart(2,"0")+"m "+String(a).padStart(2,"0")+"s ",t.innerHTML=l,e--}o();var i=setInterval(o,1e3);return!0},BoeiWidget.prototype.closeTriggerMessage=function(){document.querySelectorAll(".boei-pre-opened").forEach((function(e){e.parentNode.removeChild(e)}))},BoeiWidget.prototype.removeWithAnimation=function(e){e&&(e.style.animation="boei_fade_out 0.3s",e.addEventListener("animationend",(function(){e.parentNode&&e.parentNode.removeChild(e)})))},BoeiWidget.prototype.closeHelpers=function(){let e=document.querySelectorAll("."+this.helper_class),t=this;e.forEach((function(e){t.removeWithAnimation(e)}))},BoeiWidget.prototype.closeBoei=function(){let e=document.querySelectorAll(".boei-opened,.boei-pre-opened"),t=this;e.forEach((function(e){e.id!==t.dom_background_fade_id?t.removeWithAnimation(e):e.remove()})),this.animateBoeiButton("reverse"),this.lastHelperMargin=null,this.lastHelperHeight=null;var o=document.getElementById(this.dom_button_id);o.addEventListener("click",this.dom_boei_open_handler,!1),o.removeEventListener("click",this.dom_boei_close_handler,!1)},BoeiWidget.prototype.prepareCloseButton=function(){let e=document.createElement("button");e.style="display: block; background-image: none; background-color: #494949; padding: 0; border: 2px solid #ffffff; z-index: "+this.z_index_base+"1; position: fixed; height: 32px; width: 32px; min-height: 32px; min-width: 32px; border-radius: 50%; cursor: pointer; font-size: 0; line-height: 0; text-align: center;";let t=document.createElement("img");return t.src=this.close_src,t.style="height: 12px; width: 12px; display: inline;",t.alt="Close",e.appendChild(t),document.body.appendChild(e),e.addEventListener("mouseover",this.mouseoverBoei.bind(this,e),!1),e.addEventListener("mouseout",this.mouseoutBoei.bind(this,e),!1),e},BoeiWidget.prototype.hideBoeiButton=function(){this.closeBoei(),document.getElementById(this.dom_button_id).style.visibility="hidden";let e=document.getElementById(this.dom_watermark_button_id);e&&(e.style.visibility="hidden")},BoeiWidget.prototype.showBoeiButton=function(){document.getElementById(this.dom_button_id).style.visibility="visible";let e=document.getElementById(this.dom_watermark_button_id);e&&(e.style.visibility="visible")},BoeiWidget.prototype.mouseoverBoeiButton=function(e){this.button_hover_label&&this.button_hover_label.length>0&&this.displayButtonHoverLabel()},BoeiWidget.prototype.mouseoutBoeiButton=function(e){this.button_hover_label&&this.button_hover_label.length>0&&this.hideButtonHoverLabel()},BoeiWidget.prototype.displayButtonHoverLabel=function(){if(document.getElementById(this.dom_button_hover_label_id))return!0;if(document.getElementsByClassName("boei-opened").length>0)return!0;let e=document.querySelectorAll(".boei-pre-opened"),t=this;e.forEach((function(e){e.id!==t.dom_background_fade_id?t.removeWithAnimation(e):e.remove()}));var o=document.createElement("div");o.className="boei-pre-opened",o.id=this.dom_button_hover_label_id,o.style.cssText=`\n        animation: boei_fade_in 0.3s;\n        display: flex;\n        box-sizing: border-box;\n        border: 1px solid ${this.cta_bordercolor};\n        background-color: ${this.cta_backgroundcolor};\n        color: ${this.cta_textcolor};\n        z-index: ${this.z_index_base};\n        position: fixed;\n        padding: 0;\n        border-radius: ${this.overall_border_radius};\n        cursor: pointer;\n        font-family: ${this.fontfamily};\n        font-size: ${this.fontsize};\n        line-height: 1;\n        box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;\n        transition: transform .15s ease-in-out;\n    `,this.setPosition("trigger_message",o);let i=document.createElement("div");i.style.cssText=`\n        background-color: ${this.cta_backgroundcolor};\n        color: ${this.cta_textcolor} !important;\n        min-height: 18px;\n        vertical-align: top;\n        margin: 10px 20px;\n        overflow: hidden; /* Add this to contain the sliding effect */\n    `;let n=document.createElement("div");n.innerHTML=this.button_hover_label,i.appendChild(n),o.appendChild(i),document.body.appendChild(o),this.revertStylingSubelements(this.dom_button_hover_label_id)},BoeiWidget.prototype.hideButtonHoverLabel=function(){let e=document.getElementById(this.dom_button_hover_label_id);e&&this.removeWithAnimation(e)},BoeiWidget.prototype.mouseoverBoei=function(e){e.classList.add("boei-hovered")},BoeiWidget.prototype.mouseoutBoei=function(e){e.classList.remove("boei-hovered")},BoeiWidget.prototype.accessibilize=function(e,t){"svg"==e&&(t.setAttribute("aria-hidden","true"),t.setAttribute("focusable","false"),t.setAttribute("role","img"))},BoeiWidget.prototype.setPosition=function(e,t,o=null){let i,n,s,a;"helper"==e&&null!==o&&(null===this.lastHelperMargin&&(window.innerWidth<1200?(this.lastHelperMargin=this.button_margin_y+this.button_height,this.display_helper_watermark&&(this.lastHelperMargin=this.lastHelperMargin+10)):this.lastHelperMargin=this.button_margin_y-10),i=this.lastHelperMargin+this.lastHelperHeight+10,n=this.button_margin_x+this.button_width+30,window.innerWidth<1200&&(n=this.button_margin_x),this.lastHelperMargin=i),window.innerWidth<1200?(a=this.button_margin_y+this.button_height+30,s=this.button_margin_x):(a=this.button_margin_y+10,s=this.button_margin_x+this.button_width+30),"trigger_message"!=e&&"watermark_helper"!=e&&"widget"!=e||(i=a,n=s,"widget"==e&&this.display_helper_watermark&&window.innerWidth<1200&&(i+=22)),"close_trigger_message"==e&&(i="bottom_right"==this.position||"bottom_left"==this.position?a+15:a-15,n=s-15),"bottom_right"==this.position&&("boei_button"==e&&(t.style.bottom=this.button_margin_y+"px",t.style.right=this.button_margin_x+"px"),"trigger_message"!=e&&"close_trigger_message"!=e||(t.style.bottom=i+"px",t.style.right=n+"px"),"close_button"==e&&(t.style.bottom=this.button_margin_y+this.button_width-15+"px",t.style.right=this.button_margin_x-10+"px"),"helper"==e&&(t.style.right=n+"px",t.style.marginLeft="10px",t.style.bottom=i+"px"),"widget"==e&&(t.style.right=n+"px",t.style.marginLeft="10px",t.style.bottom=i-10+"px"),"watermark"==e&&(t.style.bottom=this.button_margin_y-27+"px",t.style.right=this.button_margin_x+"px"),"watermark_helper"==e&&(window.innerWidth<1200?t.style.bottom=i-11+"px":t.style.bottom=i-22-10+"px",t.style.right=s+8+"px"),"notification_badge"===e&&("round"===this.shape?(t.style.bottom=this.button_margin_y+this.button_width-19+5+"px",t.style.right=this.button_margin_x+this.button_width/2-19-9.5+"px"):(t.style.bottom=this.button_margin_y+this.button_width-15+"px",t.style.right=this.button_margin_x-5+"px"))),"bottom_left"==this.position&&("boei_button"==e&&(t.style.bottom=this.button_margin_y+"px",t.style.left=this.button_margin_x+"px"),"trigger_message"!=e&&"close_trigger_message"!=e||(t.style.bottom=i+"px",t.style.left=n+"px"),"close_button"==e&&(t.style.bottom=this.button_margin_y+this.button_width-15+"px",t.style.left=this.button_margin_x-10+"px"),"helper"==e&&(t.style.left=n+"px",t.style.marginRight="10px",t.style.bottom=i+"px"),"widget"==e&&(t.style.left=n+"px",t.style.marginRight="10px",t.style.bottom=i-10+"px"),"watermark"==e&&(t.style.bottom=this.button_margin_y-25+"px",t.style.left=this.button_margin_x+"px"),"watermark_helper"==e&&(window.innerWidth<1200?t.style.bottom=i-11+"px":t.style.bottom=i-22-10+"px",t.style.left=s+8+"px"),"notification_badge"==e&&("round"===this.shape?(t.style.bottom=this.button_margin_y+this.button_height-19+5+"px",t.style.left=this.button_margin_x+this.button_width-19-9.5+"px"):(t.style.bottom=this.button_margin_y+this.button_height-15+"px",t.style.left=this.button_margin_x+this.button_width-19+"px"))),"top_right"==this.position&&("boei_button"==e&&(t.style.top=this.button_margin_y+"px",t.style.right=this.button_margin_x+"px"),"trigger_message"!=e&&"close_trigger_message"!=e||(t.style.top=i+"px",t.style.right=n+"px"),"close_button"==e&&(t.style.top=this.button_margin_y-15+"px",t.style.right=this.button_margin_x-10+"px"),"helper"==e&&(t.style.right=n+"px",t.style.marginLeft="10px",t.style.top=i+"px"),"widget"==e&&(t.style.right=n+"px",t.style.marginLeft="10px",t.style.top=i-10+"px"),"watermark"==e&&(t.style.top=this.button_margin_y-25+"px",t.style.right=this.button_margin_x+"px"),"watermark_helper"==e&&(t.style.top=this.lastHelperMargin+this.lastHelperHeight+"px",t.style.right=s+8+"px"),"notification_badge"==e&&("round"===this.shape?(t.style.top=this.button_margin_y+"px",t.style.right=this.button_margin_x+this.button_width/2-19-9.5+"px"):(t.style.top=this.button_margin_y-5+"px",t.style.right=this.button_margin_x-5+"px"))),"top_left"==this.position&&("boei_button"==e&&(t.style.top=this.button_margin_y+"px",t.style.left=this.button_margin_x+"px"),"trigger_message"!=e&&"close_trigger_message"!=e||(t.style.top=i+"px",t.style.left=n+"px"),"close_button"==e&&(t.style.top=this.button_margin_y-15+"px",t.style.left=this.button_margin_x+this.button_width-15+"px"),"helper"==e&&(t.style.left=n+"px",t.style.marginRight="10px",t.style.top=i+"px"),"widget"==e&&(t.style.left=n+"px",t.style.marginRight="10px",t.style.top=i-10+"px"),"watermark"==e&&(t.style.top=this.button_margin_y-25+"px",t.style.left=this.button_margin_x+"px"),"watermark_helper"==e&&(t.style.top=this.lastHelperMargin+this.lastHelperHeight+"px",t.style.left=s+8+"px"),"notification_badge"==e&&("round"===this.shape?(t.style.top=this.button_margin_y+"px",t.style.left=this.button_margin_x+this.button_width-19-9.5+"px"):(t.style.top=this.button_margin_y-5+"px",t.style.left=this.button_margin_x+this.button_width-19+"px"))),"container"===this.template&&"helper"===e&&(t.style.marginLeft="0",t.style.marginRight="0")},BoeiWidget.prototype.displayBoei=function(){path="/"+(window.location.pathname+window.location.search).substr(1).toLowerCase();try{var e=new RegExp(this.hide_on_pages)}catch(e){console.log("Boei: Hide on pages regex is not valid.")}let t=!(!Array.isArray(this.helpers)||0===this.helpers.length);return!!this.shouldDisplayOnPage()&&(!e.test(path)&&t)},BoeiWidget.prototype.replaceVariables=function(e){e=(e=e.split("%7B%7Bpage_title%7D%7D").join(encodeURI(document.title))).split("%7B%7Bpage_url%7D%7D").join(encodeURI(window.location.hostname+window.location.pathname));let t=this.sdk_name||"",o=document.getElementById(this.dom_input_customer_name_field);null!=o&&o.value&&(t=o.value),t&&(e=e.split("%7B%7Bname%7D%7D").join(encodeURI(t)));let i=this.sdk_email||"",n=document.getElementById(this.dom_input_customer_email_field);null!=n&&n.value&&(i=n.value),i&&(e=e.split("%7B%7Bemail%7D%7D").join(encodeURI(i)));let s=this.sdk_phone||"",a=document.getElementById(this.dom_input_customer_phone_field);null!=a&&a.value&&(s=a.value),s&&(e=e.split("%7B%7Bphone%7D%7D").join(encodeURI(s)));let r=this.sdk_company||"",l=document.getElementById(this.dom_input_customer_company_field);null!=l&&l.value&&(r=l.value),r&&(e=e.split("%7B%7Bcompany%7D%7D").join(encodeURI(r)));let d=this.sdk_id||"",c=document.getElementById(this.dom_input_customer_id_field);null!=c&&c.value&&(d=c.value),d&&(e=e.split("%7B%7Bid%7D%7D").join(encodeURI(d)));let p=this.sdk_notes||"",h=document.getElementById(this.dom_input_customer_notes_field);null!=h&&h.value&&(p=h.value),p&&(e=e.split("%7B%7Bnotes%7D%7D").join(encodeURI(p)));let m=this.tags||"",u=document.getElementById("boei_prefill_customer_tags");return null!=u&&u.value&&(m=u.value),m&&(e=e.split("%7B%7Btags%7D%7D").join(encodeURI(m))),e=(e=e.replace(/%7B%7B[^%]+%7D%7D/g,"")).replace(/[&?][^=]+=(?=&|$)/g,"")},BoeiWidget.prototype.replaceVariablesUnescaped=function(e){const t={en:{morning:"Good morning",afternoon:"Good afternoon",evening:"Good evening",night:"Good night"},nl:{morning:"Goedemorgen",afternoon:"Goedemiddag",evening:"Goedenavond",night:"Goedenavond"},es:{morning:"Buenos días",afternoon:"Buenas tardes",evening:"Buenas noches",night:"Buenas noches"},fr:{morning:"Bonjour",afternoon:"Bon après-midi",evening:"Bonsoir",night:"Bonsoir"},de:{morning:"Guten Morgen",afternoon:"Guten Tag",evening:"Guten Abend",night:"Gute Nacht"},it:{morning:"Buongiorno",afternoon:"Buon pomeriggio",evening:"Buonasera",night:"Buonanotte"},pt:{morning:"Bom dia",afternoon:"Boa tarde",evening:"Boa noite",night:"Boa noite"},ru:{morning:"Доброе утро",afternoon:"Добрый день",evening:"Добрый вечер",night:"Доброй ночи"},zh:{morning:"早上好",afternoon:"下午好",evening:"晚上好",night:"晚安"},ja:{morning:"おはようございます",afternoon:"こんにちは",evening:"こんばんは",night:"おやすみなさい"}};e=(e=e.split("{{page_title}}").join(document.title)).split("{{page_url}}").join(window.location.hostname+window.location.pathname);let o=this.sdk_name||"",i=document.getElementById(this.dom_input_customer_name_field);null!=i&&""!==i.value.trim()&&(o=i.value.trim()),e=o?e.replace(/{{name}}/,o):e.replace(/\s*{{name}}\s*/,"");let n=this.sdk_email||"",s=document.getElementById(this.dom_input_customer_email_field);null!=s&&""!==s.value.trim()&&(n=s.value.trim()),e=n?e.replace(/{{email}}/,n):e.replace(/\s*{{email}}\s*/,"");let a=this.sdk_phone||"",r=document.getElementById(this.dom_input_customer_phone_field);null!=r&&""!==r.value.trim()&&(a=r.value.trim()),e=a?e.replace(/{{phone}}/,a):e.replace(/\s*{{phone}}\s*/,"");let l=this.sdk_company||"",d=document.getElementById(this.dom_input_customer_company_field);null!=d&&""!==d.value.trim()&&(l=d.value.trim()),e=l?e.replace(/{{company}}/,l):e.replace(/\s*{{company}}\s*/,"");let c=this.sdk_id||"",p=document.getElementById(this.dom_input_customer_id_field);null!=p&&""!==p.value.trim()&&(c=p.value.trim()),e=c?e.replace(/{{id}}/,c):e.replace(/\s*{{id}}\s*/,"");let h=this.sdk_notes||"",m=document.getElementById(this.dom_input_customer_notes_field);null!=m&&""!==m.value.trim()&&(h=m.value.trim()),e=h?e.replace(/{{notes}}/,h):e.replace(/\s*{{notes}}\s*/,"");let u=this.tags||"",_=document.getElementById("boei_prefill_customer_tags");null!=_&&""!==_.value.trim()&&(u=_.value.trim()),e=u?e.replace(/{{tags}}/,u):e.replace(/\s*{{tags}}\s*/,"");let g,y,f=(new Date).getHours();return g=f>=6&&f<12?"morning":f>=12&&f<18?"afternoon":f>=18&&f<22?"evening":"night",e=e.replace(/{{greeting}}/,t.en[g]),Object.keys(t).forEach((o=>{let i=new RegExp(`{{greeting:${o}}}`,"g");i.test(e)&&(e=e.replace(i,t[o][g]))})),y="morning"===g?e.match(/{{morning:(.*?)}}/):"afternoon"===g?e.match(/{{afternoon:(.*?)}}/):"evening"===g?e.match(/{{evening:(.*?)}}/):e.match(/{{night:(.*?)}}/),y&&(e=e.replace(y[0],y[1])),e=(e=e.replace(/{{morning:.*?}}|{{afternoon:.*?}}|{{evening:.*?}}|{{night:.*?}}/g,"").replace(/ {2,}/g," ").trim()).replace(/[&?][^=]+=(?=&|$)/g,"")},BoeiWidget.prototype.simpleMarkdownToHtml=function(e){if(!e)return"";let t=(e=(e=(e=(e=(e=(e=e.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>")).replace(/__(.+?)__/g,"<strong>$1</strong>")).replace(/\*([^*]+)\*/g,"<em>$1</em>")).replace(/(?<![a-zA-Z])_([^_]+)_(?![a-zA-Z])/g,"<em>$1</em>")).replace(/~~(.+?)~~/g,"<del>$1</del>")).replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener">$1</a>')).split(/\n\n+/);return e=t.length>1?t.map((function(e){return"<p>"+e.replace(/\n/g,"<br>")+"</p>"})).join(""):e.replace(/\n/g,"<br>")},BoeiWidget.prototype.passVariablesToUrl=function(e){let t=document.getElementById(this.dom_input_customer_name_field);return t=null==t?"":t.value,(e=this.replaceVariables(e)).includes("/goto/")||e.includes("/bot/")||e.includes("boei.help")?e+"?page_title="+encodeURI(document.title)+"&page_url="+encodeURI(window.location.hostname+window.location.pathname)+"&name="+encodeURI(t):e},BoeiWidget.prototype.displayChatNotLoaded=function(e){const t=this.test_mode,o=document.createElement("div");o.id="boei-chat-not-loaded-error",this.revertStylingSubelements(o.id),o.style.cssText="\n        position: fixed;\n        top: 50%;\n        left: 50%;\n        transform: translate(-50%, -50%);\n        background-color: #fff3cd;\n        color: #856404;\n        border: 1px solid #ffeeba;\n        border-radius: 8px;\n        padding: 25px;\n        max-width: 400px;\n        width: 90%;\n        text-align: center;\n        font-family: Arial, sans-serif;\n        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);\n        z-index: 999999;\n    ";const i=document.createElement("div");i.innerHTML="⚠️",i.style.cssText="\n        font-size: 48px;\n        margin-bottom: 15px;\n    ";const n=document.createElement("h2");n.textContent="Chat Not Loaded",n.style.cssText="\n        margin: 0 0 15px;\n        font-size: 24px;\n        font-weight: bold;\n    ";const s=document.createElement("p");if(s.style.cssText="\n        margin-bottom: 20px;\n        line-height: 1.5;\n    ",o.appendChild(i),o.appendChild(n),t)s.textContent=`This is a demo environment. The "${e}" chat will be displayed on your actual website once installed.`,o.appendChild(s);else{s.textContent="We apologize, but our chat service is currently unavailable. Please use an alternative contact method to reach us.",o.appendChild(s);const t=document.createElement("p");t.style.cssText="\n            margin-top: 15px;\n            font-size: 0.9em;\n            opacity: 0.8;\n            border-top: 1px solid #ffeeba;\n            padding-top: 15px;\n        ",t.innerHTML=`<strong>Website Owner:</strong> The chat "${e}" is not loaded because it needs to be installed on your website. Please check your installation and configuration.`,o.appendChild(t)}const a=document.createElement("button");a.textContent="Close",a.style.cssText="\n        margin-top: 15px;\n        padding: 8px 16px;\n        background-color: #856404;\n        color: white;\n        border: none;\n        border-radius: 4px;\n        cursor: pointer;\n        font-size: 16px;\n        transition: background-color 0.3s;\n    ",a.onmouseover=function(){this.style.backgroundColor="#9e7705"},a.onmouseout=function(){this.style.backgroundColor="#856404"},a.onclick=function(){document.body.removeChild(o)},o.appendChild(a),document.body.appendChild(o),console.error(`Failed to load chat: ${e}`)},BoeiWidget.prototype.isLoadedCrisp=function(){return void 0!==window.$crisp},BoeiWidget.prototype.openChatCrisp=function(){if(!this.isLoadedCrisp())return this.displayChatNotLoaded("Crisp"),null;this.closeBoei(),window.$crisp.push(["do","chat:open"]),window.$crisp.push(["do","chat:show"]);window.$crisp.push(["on","chat:closed",this.hideCrisp.bind(this,this)])},BoeiWidget.prototype.hideCrisp=function(){if(!this.isLoadedCrisp())return null;window.$crisp.push(["do","chat:hide"])},BoeiWidget.prototype.isLoadedIntercom=function(){return"function"==typeof Intercom},BoeiWidget.prototype.openChatIntercom=function(){if(!this.isLoadedIntercom())return this.displayChatNotLoaded("Intercom"),null;Intercom("show")},BoeiWidget.prototype.hideIntercom=function(){if(!this.isLoadedIntercom())return null;Intercom("update",{hide_default_launcher:!0});let e=this;Intercom("onShow",(function(){e.closeBoei()}))},BoeiWidget.prototype.isLoadedDrift=function(){return!(void 0===window.drift)},BoeiWidget.prototype.hideDrift=function(){if(!this.isLoadedDrift())return null;let e=this;drift.on("ready",(function(t){t.widget.hide(),drift.on("message",(function(o){t.widget.show(),e.closeBoei(),e.hideBoeiButton()})),drift.on("chatClose",(function(o){t.widget.hide(),e.showBoeiButton()}))}))},BoeiWidget.prototype.openChatDrift=function(){if(!this.isLoadedDrift())return this.displayChatNotLoaded("Drift"),null;window.drift.api.widget.show(),window.drift.api.openChat(),this.closeBoei(),this.hideBoeiButton()},BoeiWidget.prototype.isLoadedFroged=function(){return!(void 0===window.frogedSettings)},BoeiWidget.prototype.openChatFroged=function(){if(!this.isLoadedFroged())return this.displayChatNotLoaded("Froged"),null;Froged("open")},BoeiWidget.prototype.hideFroged=function(){if(!this.isLoadedFroged())return null;let e=this;Froged("hook","onOpen",(()=>{e.closeBoei()}))},BoeiWidget.prototype.isLoadedContinually=function(){return"undefined"!=typeof continually},BoeiWidget.prototype.openChatContinually=function(e){if(!this.isLoadedContinually())return this.displayChatNotLoaded("Continually"),null;e.style.backgroundImage="url('"+this.loading_src+"')";let t=this;continually.on("startConversation",(function(e){t.closeBoei()})),continually.startConversation()},BoeiWidget.prototype.hideContinually=function(){},BoeiWidget.prototype.isLoadedLiveAgent=function(){return"undefined"!=typeof liveAgentChatButton},BoeiWidget.prototype.openChatLiveAgent=function(e){if(!this.isLoadedLiveAgent())return this.displayChatNotLoaded("Live Agent"),null;this.closeBoei(),liveAgentChatButton.onClick()},BoeiWidget.prototype.hideLiveAgent=function(){let e=document.querySelectorAll(".circleContactButtonWrap,.circleChatButtonWrap");var t;for(t=0;t<e.length;t++)e[t].style.display="none"},BoeiWidget.prototype.isLoadedQuriobot=function(){return"undefined"!=typeof quriobot},BoeiWidget.prototype.openChatQuriobot=function(e){if(!this.isLoadedQuriobot())return this.displayChatNotLoaded("Quriobot"),null;this.closeBoei(),void 0!==e.options.bot_path?quriobot.start(e.options.bot_path):quriobot.start()},BoeiWidget.prototype.hideQuriobot=function(){},BoeiWidget.prototype.isLoadedBotstar=function(){return"undefined"!=typeof BotStarApi},BoeiWidget.prototype.openChatBotstar=function(e){if(!this.isLoadedBotstar())return this.displayChatNotLoaded("Botstar"),null;BotStarApi("open"),this.closeBoei()},BoeiWidget.prototype.hideBotstar=function(){if(!this.isLoadedBotstar())return!1;var e=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.appendChild(document.createTextNode('[class^="bs-chatbot-fab"] { display: none !important; }')),e.appendChild(t);let o=this;BotStarApi("onOpen",(function(e){o.closeBoei()}))},BoeiWidget.prototype.isLoadedTawk=function(){return"undefined"!=typeof Tawk_API},BoeiWidget.prototype.openChatTawk=function(e){if(!this.isLoadedTawk())return this.displayChatNotLoaded("Tawk"),null;try{Tawk_API=Tawk_API||{},Tawk_API.showWidget(),Tawk_API.toggle(),this.closeBoei(),this.hideBoeiButton()}catch(e){alert("Sorry, chat is not loaded. Please select alternative."),console.log(e.message),this.showBoeiButton()}},BoeiWidget.prototype.hideTawk=function(){if(!this.isLoadedTawk())return!1;Tawk_API=Tawk_API||{};let e=this;Tawk_API.onLoad=function(){Tawk_API.hideWidget()},Tawk_API.onChatStarted=function(){Tawk_API.showWidget(),e.closeBoei(),e.hideBoeiButton()},Tawk_API.onChatMessageAgent=function(){Tawk_API.showWidget(),e.closeBoei(),e.hideBoeiButton()},Tawk_API.onChatMessageSystem=function(){Tawk_API.showWidget(),e.closeBoei(),e.hideBoeiButton()},Tawk_API.onChatEnded=function(){Tawk_API.hideWidget(),e.showBoeiButton()},Tawk_API.onChatMinimized=function(){Tawk_API.hideWidget(),e.showBoeiButton()},Tawk_API.onStatusChange=function(e){Tawk_API.hideWidget()}},BoeiWidget.prototype.isLoadedJivochat=function(){return void 0!==window.jivo_api},BoeiWidget.prototype.openChatJivochat=function(){if(!this.isLoadedJivochat())return this.displayChatNotLoaded("Jivochat"),null;let e=document.querySelectorAll("jdiv");e.length>0&&(e[0].style.display="inline-block"),this.closeBoei(),jivo_api.open()},BoeiWidget.prototype.hideJivochat=function(){},BoeiWidget.prototype.isLoadedShopifyChat=function(){return null!==document.querySelector("#ShopifyChat")},BoeiWidget.prototype.hideShopifyChat=function(){let e=0;const t=this;this.startShopifyChatObserver();const o=()=>{const i=document.querySelector("#shopify-chat"),n=document.querySelector("#ShopifyChat");i&&n?("true"===n.getAttribute("is-open")||!0===n.getAttribute("is-open")?t.hideBoeiButton():i.style.display="none",this.startShopifyChatObserver()):e<10&&(e++,setTimeout(o,500))};o()},BoeiWidget.prototype.openChatShopify=function(){try{const e=document.querySelector("#shopify-chat"),t=document.querySelector("#ShopifyChat");if(e&&t){e.style.display="block";const o=t.shadowRoot.querySelector(".chat-toggle");o&&o.click(),this.hide_live_chat&&this.hideBoeiButton()}else this.displayChatNotLoaded("Shopify")}catch(e){console.log("Error opening Shopify chat:",e.message),this.showBoeiButton()}},BoeiWidget.prototype.startShopifyChatObserver=function(){const e=this,t={attributes:!0,attributeFilter:["is-open"]},o=new MutationObserver((function(t,o){for(let o of t)if("attributes"===o.type&&"is-open"===o.attributeName){if("true"===o.target.getAttribute("is-open")||!0===o.target.getAttribute("is-open"))e.closeBoei(),e.hideBoeiButton();else{e.showBoeiButton();const t=document.querySelector("#shopify-chat");t&&(t.style.display="none")}}})),i=document.querySelector("#ShopifyChat");i&&o.observe(i,t)},BoeiWidget.prototype.isLoadedTawkV2=function(){return"undefined"!=typeof Tawk_API},BoeiWidget.prototype.loadTawkV2=function(e,t){if(!this.isLoadedTawkV2()){window.Tawk_API=o||{},window.Tawk_LoadStart=new Date;var o=o||{};new Date;let i=document.createElement("script"),n=document.getElementsByTagName("script")[0];i.async=!0,i.src="https://embed.tawk.to/"+e+"/"+t,i.setAttribute("crossorigin","*"),i.className="boei-tawk",i.setAttribute("tawk","yes"),n.parentNode.insertBefore(i,n)}this.hideTawkV2()},BoeiWidget.prototype.openChatTawkV2=function(e){try{let e=window.Tawk_API;e.showWidget(),e.maximize(),this.closeBoei(),this.hide_live_chat&&this.hideBoeiButton()}catch(e){this.displayChatNotLoaded("Tawk"),console.log(e.message),this.showBoeiButton()}},BoeiWidget.prototype.hideTawkV2=function(){if(!this.hide_live_chat)return!0;let e=window.Tawk_API,t=this;return e.onLoad=function(){e.hideWidget()},e.onChatStarted=function(){e.showWidget(),t.closeBoei(),t.hideBoeiButton()},e.onChatMessageAgent=function(){e.showWidget(),t.closeBoei(),t.hideBoeiButton()},e.onChatMessageSystem=function(){e.showWidget(),t.closeBoei(),t.hideBoeiButton()},e.onChatEnded=function(){e.hideWidget(),t.showBoeiButton()},e.onChatMinimized=function(){e.hideWidget(),t.showBoeiButton()},e.onStatusChange=function(t){e.hideWidget()},!0},BoeiWidget.prototype.isLoadedTidiochat=function(){return void 0!==window.tidioChatApi},BoeiWidget.prototype.openChatTidiochat=function(){if(!this.isLoadedTidiochat())return this.displayChatNotLoaded("Tidio"),null;this.closeBoei(),this.hideBoeiButton(),window.tidioChatApi.show(),window.tidioChatApi.open()},BoeiWidget.prototype.hideTidiochat=function(){var e=this;function t(){e.openBoeiOnCloseTidio()}function o(){e.closeTidioChatOnReady()}this.isLoadedTidiochat()?(window.tidioChatApi.on("ready",o),window.tidioChatApi.on("close",t)):(document.addEventListener("tidioChat-ready",o),document.addEventListener("tidioChat-close",t))},BoeiWidget.prototype.closeTidioChatOnReady=function(){window.tidioChatApi.hide(),document.body.style.overflow="visible",document.documentElement.style.overflow="visible"},BoeiWidget.prototype.openBoeiOnCloseTidio=function(){window.tidioChatApi.hide(),this.showBoeiButton(),document.body.style.overflow="visible",document.documentElement.style.overflow="visible"},BoeiWidget.prototype.interactionButtonClicked=function(){if(this.interaction_button_clicked)return!0;this.interaction_button_clicked=!0,this.saveInteraction(this.interaction_url),this.sendAnalyticsEvent("buttonClick")},BoeiWidget.prototype.interactionHelperClicked=function(e){let t=e.interaction_url;if(t in this.interaction_helper_clicked)return!0;this.interaction_helper_clicked[t]=!0,this.saveInteraction(t),this.sendAnalyticsEvent("helperClick",e)},BoeiWidget.prototype.saveInteraction=function(e){fetch(e,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify({url:document.URL,referrer:document.referrer,test_mode:this.test_mode||!1,load_key:this.load_key})}).catch((e=>{console.log("Error in saving interaction:",e)}))},BoeiWidget.prototype.getHelperConversionEventname=function(e){let t=this.event_name_conversion;return void 0!==e.options&&void 0!==e.options.custom_conversion_label&&null!==e.options.custom_conversion_label&&""!==e.options.custom_conversion_label.trim()&&(t=e.options.custom_conversion_label),t},BoeiWidget.prototype.sendAnalyticsEvent=function(e,t=null){if("buttonClick"===e){let e=this.event_name_opened;this.use_google_analytics4&&this.sendGA4Event(e),this.use_google_tag_manager&&this.sendGTMEvent(e),this.use_simple_analytics&&this.sendSimpleAnalyticsEvent(e),this.use_facebook_pixel&&this.sendFacebookPixelEvent(e)}if("helperClick"===e&&null!==t){let e=this.getHelperConversionEventname(t);this.use_google_analytics4&&this.sendGA4Event(e,t.type,t.title),this.use_google_tag_manager&&this.sendGTMEvent(e,t.type,t.title),this.use_simple_analytics&&this.sendSimpleAnalyticsEvent(e,t.type,t.title),this.use_facebook_pixel&&this.sendFacebookPixelEvent(e,t.type,t.title)}},BoeiWidget.prototype.sendFacebookPixelEvent=function(e,t="",o=""){if("function"==typeof fbq)if(t){e!==this.event_name_conversion?fbq("trackCustom",e,{channel_type:t,channel_title:o}):fbq("track","Lead",{content_name:t,channel_type:t,channel_title:o})}else fbq("track","ViewContent",{content_name:this.event_name_opened});else console.log("Boei: Facebook Pixel tracking function is not available.")},BoeiWidget.prototype.sendGA4Event=function(e,t="",o=""){"function"==typeof gtag?gtag("event",e,{event_category:"Boei Interaction",channel_type:t,channel_title:o}):console.log("Boei: GA4 tracking function (gtag) is not available.")},BoeiWidget.prototype.sendGTMEvent=function(e,t="",o=""){window.dataLayer&&"function"==typeof window.dataLayer.push?window.dataLayer.push({event:e,channel_type:t,channel_title:o}):console.log("Boei: Google Tag Manager event tracking function (dataLayer) is not available.")},BoeiWidget.prototype.sendSimpleAnalyticsEvent=function(e,t="",o=""){"function"==typeof sa_event?sa_event(e):console.log("Boei: Simple Analytics event tracking function (sa_event) is not available.")},BoeiWidget.prototype.getPageInfo=function(e){let t={};t.page_title=document.title,t.page_url=window.location.hostname+window.location.pathname,t.referer=document.referrer||"";const o=new URLSearchParams(window.location.search);t.utm_source=o.get("utm_source")||"",t.utm_medium=o.get("utm_medium")||"",t.utm_campaign=o.get("utm_campaign")||"",t.utm_term=o.get("utm_term")||"",t.utm_content=o.get("utm_content")||"",t.language=navigator.language||navigator.userLanguage,t.user_agent=navigator.userAgent;let i=document.getElementById(this.dom_input_customer_email_field);null!=i&&(t.prefilled_email=i.value);let n=document.getElementById(this.dom_input_customer_name_field);null!=n&&(t.prefilled_name=n.value);let s=document.getElementById(this.dom_input_customer_company_field);null!=s&&(t.prefilled_company=s.value);let a=document.getElementById(this.dom_input_customer_phone_field);null!=a&&(t.prefilled_phone=a.value);let r=document.getElementById(this.dom_input_customer_id_field);null!=r&&(t.prefilled_id=r.value);let l=document.getElementById(this.dom_input_customer_notes_field);return null!=l&&(t.prefilled_notes=l.value),t},BoeiWidget.prototype.processFormData=function(e,t){let o=document.getElementById(this.dom_form_loading_id),i=document.getElementById(this.dom_form_container_id);o.style.display="block";let n=document.createElement("p");const s=`boei_element_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;n.id=s,this.revertStylingSubelements(n.id);let a=document.createTextNode("Houston we have a problem. Sorry, an error occurred. Please use an alternative contact option.");n.appendChild(a),n.style.display="none",i.appendChild(n),fetch(e,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(t)}).then((e=>{e.ok?this.displayThankYou():n.style.display="block",o.style.display="none"})).catch((e=>{console.log("Error:",e),n.style.display="block",o.style.display="none"}))},BoeiWidget.prototype.displayThankYou=function(){let e=document.getElementById(this.dom_form_success_id),t=document.getElementById(this.dom_form_thank_you_page_id),o=document.getElementById(this.dom_form_container_id);t?(this.closeBoei(),this.createConfetti(o),window.location.href=t.value):(e.style.display="block",this.createConfetti(o))},BoeiWidget.prototype.createConfetti=function(e){const t=["#FFC700","#FF0000","#00FF00","#0000FF","#FF00FF"],o=e.getBoundingClientRect(),i=o.left+o.width/2,n=o.top+o.height/2,s=i,a=window.innerWidth-i,r=n,l=window.innerHeight-n;for(let e=0;e<100;e++){const e=document.createElement("div");e.style.position="fixed",e.style.width="5px",e.style.height="5px",e.style.backgroundColor=t[Math.floor(Math.random()*t.length)],e.style.left=`${i}px`,e.style.top=`${n}px`,e.style.borderRadius="50%",e.style.pointerEvents="none",e.style.zIndex="2147483647",document.body.appendChild(e);const o=2e3*Math.random()+500,d=Math.random()*a*.9-Math.random()*s*.9,c=Math.random()*l*.9-Math.random()*r*.9;e.animate([{transform:"translate(0, 0)",opacity:1},{transform:`translate(${d}px, ${c}px)`,opacity:0}],{duration:o,easing:"ease-out"}),setTimeout((()=>{document.body.removeChild(e)}),o)}},BoeiWidget.prototype.addAnalyticsClass=function(e,t){if(this.use_plausible_analytics){let o=this.getHelperConversionEventname(t);e.classList.add("plausible-event-name="+o)}},BoeiWidget.prototype.createFormContainer=function(e=!0,t=!0){this.closeHelpers();let o=document.createElement("div");o.className="boei-opened",o.id=this.dom_form_container_id;let i=["animation: boei_fade_in 0.3s","box-sizing: border-box","width: 100%","max-width: "+Math.min(this.max_width,window.innerWidth-40)+"px","color: "+this.container_textcolor,"z-index: "+this.z_index_base,"position: fixed","padding: 20px","border-radius: "+this.border_radius_container,"font-family: "+this.fontfamily,"font-size: "+this.fontsize,"line-height: 1","box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px","transition: transform .15s ease-in-out","overflow-y: auto"];e&&i.push("border: 1px solid "+this.container_bordercolor),t&&i.push("background-color: "+this.container_backgroundcolor),o.style=i.join("; "),this.setPosition("widget",o);let n=parseInt(o.style.bottom);return isNaN(n)&&(n=this.button_height+this.button_margin_y+10),n+=10,o.style.maxHeight=`calc(100vh - ${n}px)`,o},BoeiWidget.prototype.applyPlaceholderStyling=function(e){const t=document.createElement("style"),o=this.input_textcolor||"#999";t.innerHTML=`\n        #${e}::placeholder { /* Chrome, Firefox, Opera, Safari */\n            color: ${o} !important;\n            opacity: 0.7; \n        }\n        #${e}::-webkit-input-placeholder { /* WebKit browsers */\n            color: ${o} !important;\n            opacity: 0.7;\n        }\n        #${e}:-ms-input-placeholder { /* Internet Explorer */\n            color: ${o} !important;\n            opacity: 0.7;\n        }\n    `,document.head.appendChild(t)},BoeiWidget.prototype.createForm=function(e,t){let o=document.createElement("div");o.id=e;let i=document.createElement("input");return i.id=this.dom_form_helper_id,i.type="hidden",i.value=t,o.appendChild(i),o},BoeiWidget.prototype.setThankYouPage=function(e){let t=document.createElement("input");return t.id=this.dom_form_thank_you_page_id,t.type="hidden",t.value=e,t},BoeiWidget.prototype.createLoading=function(){let e=document.createElement("img");return this.accessibilize("svg",e),e.src=this.loading_src,e.style="height: 25px; width: 25px; margin: 0px; display: inline;",e.id=this.dom_form_loading_id,e.style.display="none",e},BoeiWidget.prototype.createSuccessMessage=function(e){let t=document.createElement("p");return t.innerHTML=e,t.id=this.dom_form_success_id,this.revertStylingSubelements(t.id),t.style="padding: 0; margin: 0; color: "+this.container_textcolor+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1.4; text-decoration: none; font-weight: normal; letter-spacing: normal; text-transform: none;",t.style.display="none",t},BoeiWidget.prototype.createSubmitButton=function(e){let t=document.createElement("button"),o=document.createTextNode(e);return t.style="background-image: none; box-sizing: border-box; border: 0; display: block; width: 100%; margin-top: 15px; background: "+this.brand_background+"; color: "+this.brandcolor_text+"; padding: 12px 12px; border-radius: "+this.overall_border_radius+"; cursor: pointer; text-align: center; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1; text-decoration: none; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; font-weight: normal; letter-spacing: normal; text-transform: none;",t.appendChild(o),t.addEventListener("mouseover",this.mouseoverBoei.bind(this,t),!1),t.addEventListener("mouseout",this.mouseoutBoei.bind(this,t),!1),t},BoeiWidget.prototype.createNameField=function(e){var t=document.createElement("div"),o=document.createElement("input");o.type="text",o.placeholder=e,o.required=!0,o.id=this.dom_form_name_id,o.setAttribute("autocomplete","name"),o.style="margin-bottom: 15px; width: 100%; box-sizing: border-box; border: 1px solid "+this.input_bordercolor+"; background-color: "+this.input_backgroundcolor+"; color: "+this.input_textcolor+"; padding: 8px; border-radius: "+this.overall_border_radius+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1; text-decoration: none; font-weight: normal; letter-spacing: normal; text-transform: none;",this.applyPlaceholderStyling(this.dom_form_name_id),t.appendChild(o);let i=document.getElementById(this.dom_input_customer_name_field);return null!=i&&(o.value=i.value),t},BoeiWidget.prototype.createEmailField=function(e){let t=document.createElement("div"),o=document.createElement("input");o.type="email",o.placeholder=e,o.required=!0,o.id=this.dom_form_email_id,o.setAttribute("autocomplete","email"),o.style="margin-bottom: 15px; width: 100%; box-sizing: border-box; border: 1px solid "+this.input_bordercolor+"; background-color: "+this.input_backgroundcolor+"; color: "+this.input_textcolor+"; padding: 8px; border-radius: "+this.overall_border_radius+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1; text-decoration: none; font-weight: normal; letter-spacing: normal; text-transform: none;",this.applyPlaceholderStyling(this.dom_form_email_id);let i=document.getElementById(this.dom_input_customer_email_field);return null!=i&&(o.value=i.value),t.appendChild(o),t},BoeiWidget.prototype.createInputField=function(e,t,o,i,n="",s=""){var a=document.createElement("div"),r=document.createElement("input");return r.type=t,r.placeholder=e,r.required=o,r.id=i,r.setAttribute("autocomplete",n),r.style="margin-bottom: 15px; width: 100%; box-sizing: border-box; border: 1px solid "+this.input_bordercolor+"; background-color: "+this.input_backgroundcolor+"; color: "+this.input_textcolor+"; padding: 8px; border-radius: "+this.overall_border_radius+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1; text-decoration: none; font-weight: normal; letter-spacing: normal; text-transform: none;"+s,this.applyPlaceholderStyling(i),a.appendChild(r),a},BoeiWidget.prototype.createTextareaField=function(e,t,o){var i=document.createElement("div"),n=document.createElement("textarea");return n.id=o,n.required=t,n.placeholder=e,n.style="margin-bottom: 15px; width: 100%; box-sizing: border-box; border: 1px solid "+this.input_bordercolor+"; background-color: "+this.input_backgroundcolor+"; color: "+this.input_textcolor+"; resize: none; height: 96px; padding: 8px; border-radius: "+this.overall_border_radius+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1; text-decoration: none; font-weight: normal; letter-spacing: normal; text-transform: none;",this.applyPlaceholderStyling(o),i.appendChild(n),i},BoeiWidget.prototype.createParagraph=function(e){let t=document.createElement("p");const o=`boei_element_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;return t.id=o,this.revertStylingSubelements(t.id),t.innerHTML=e,t.style="padding: 8px 0; margin: 0; color: "+this.container_textcolor+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1.4; text-decoration: none; font-weight: normal; letter-spacing: normal; text-transform: none;",t},BoeiWidget.prototype.createGDPRCheckbox=function(e){let t=document.createElement("div");t.style="width: 100%; box-sizing: border-box; margin-top: 10px; display: flex; align-items: center;";let o=document.createElement("input");o.type="checkbox",o.required=!0,o.id=this.dom_gdpr_consent_checkbox,o.style="margin-right: 8px; flex-shrink: 0; width: auto; appearance: checkbox; -webkit-appearance: checkbox; -moz-appearance: checkbox;",t.appendChild(o);let i=document.createElement("label");return i.id=this.dom_gdpr_consent_label,this.revertStylingSubelements(i.id),i.setAttribute("for",this.dom_gdpr_consent_checkbox),i.innerHTML=e,i.style="display: inline-block; padding: 8px; margin: 0; color: "+this.container_textcolor+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize_small+"; line-height: 1.4; text-decoration: none; font-weight: normal; letter-spacing: normal; text-transform: none; flex-grow: 1;",t.appendChild(i),t},BoeiWidget.prototype.validGDPRCheckbox=function(){var e=document.getElementById(this.dom_gdpr_consent_checkbox);if(null!=e){var t=document.getElementById(this.dom_gdpr_consent_label);return e.checked?(t.style.color="",!0):(t.style.color="red",!1)}return!0},BoeiWidget.prototype.validNameField=function(){let e=document.getElementById(this.dom_form_name_id);return e.value.length<2?(e.style.borderColor="red",e.focus(),!1):(e.style.borderColor="",!0)},BoeiWidget.prototype.validInputField=function(e,t=0,o=1e4){let i=document.getElementById(e);return i.value.length<t||i.value.length>o?(i.style.borderColor="red",i.focus(),!1):(i.style.borderColor="",!0)},BoeiWidget.prototype.validEmailField=function(){var e=document.getElementById(this.dom_form_email_id);return e.value.match(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)?(e.style.borderColor="",!0):(e.style.borderColor="red",e.focus(),!1)},BoeiWidget.prototype.validPhoneField=function(e){let t=e.replace(/\D/g,"").length;return t>=8&&t<=15},BoeiWidget.prototype.openCallMeBackForm=function(e,t){let o=this.createFormContainer(),i=this.createForm(this.dom_call_me_back_form_id,e.options.helper_id);void 0!==e.options.thank_you_page&&""!==e.options.thank_you_page&&null!=e.options.thank_you_page&&i.appendChild(this.setThankYouPage(e.options.thank_you_page)),i.appendChild(this.createParagraph(e.options.call_me_back_intro)),void 0!==e.options.label_name&&""!==e.options.label_name&&null!=e.options.label_name&&i.appendChild(this.createNameField(e.options.label_name));let n=document.createElement("div"),s=document.createElement("input");s.type="tel",s.placeholder=e.options.call_me_back_phone,s.required=!0,s.id=this.dom_call_me_back_phone_id,s.setAttribute("autocomplete","tel"),s.style="margin-bottom: 15px; width: 100%; box-sizing: border-box; border: 1px solid "+this.input_bordercolor+"; background-color: "+this.input_backgroundcolor+"; color: "+this.input_textcolor+"; padding: 8px; border-radius: "+this.overall_border_radius+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1; text-decoration: none; font-weight: normal; letter-spacing: normal; text-transform: none;",n.appendChild(s);let a=document.getElementById(this.dom_input_customer_phone_field);if(null!=a&&(s.value=a.value),this.applyPlaceholderStyling(this.dom_call_me_back_phone_id),i.appendChild(n),void 0!==e.options.label_custom1&&""!==e.options.label_custom1&&null!=e.options.label_custom1&&i.appendChild(this.createInputField(e.options.label_custom1,"text",!0,this.dom_form_custom1_id)),void 0!==e.options.label_custom2&&""!==e.options.label_custom2&&null!=e.options.label_custom2&&i.appendChild(this.createInputField(e.options.label_custom2,"text",!0,this.dom_form_custom2_id)),void 0!==e.options.label_custom3&&""!==e.options.label_custom3&&null!=e.options.label_custom3&&i.appendChild(this.createInputField(e.options.label_custom3,"text",!0,this.dom_form_custom3_id)),void 0!==e.options.label_custom4&&""!==e.options.label_custom4&&null!=e.options.label_custom4&&i.appendChild(this.createInputField(e.options.label_custom4,"text",!0,this.dom_form_custom4_id)),void 0!==e.options.label_custom5&&""!==e.options.label_custom5&&null!=e.options.label_custom5&&i.appendChild(this.createInputField(e.options.label_custom5,"text",!0,this.dom_form_custom5_id)),void 0!==e.options.label_custom_textarea1&&""!==e.options.label_custom_textarea1&&null!=e.options.label_custom_textarea1&&i.appendChild(this.createTextareaField(e.options.label_custom_textarea1,!0,this.dom_form_custom_textarea1_id)),void 0!==e.options.label_custom_textarea2&&""!==e.options.label_custom_textarea2&&null!=e.options.label_custom_textarea2&&i.appendChild(this.createTextareaField(e.options.label_custom_textarea2,!0,this.dom_form_custom_textarea2_id)),void 0!==e.options.call_me_back_when&&""!==e.options.call_me_back_when&&null!=e.options.call_me_back_when){var r=document.createElement("div"),l=document.createElement("textarea");l.id=this.dom_call_me_back_when_id,l.required=!0,l.placeholder=e.options.call_me_back_when,l.style="width: 100%; box-sizing: border-box; border: 1px solid "+this.input_bordercolor+"; background-color: "+this.input_backgroundcolor+"; color: "+this.input_textcolor+"; resize: none; height: 96px; padding: 8px; border-radius: "+this.overall_border_radius+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1; text-decoration: none; font-weight: normal; letter-spacing: normal; text-transform: none;",r.appendChild(l),i.appendChild(r)}void 0!==e.options.gdpr_message&&""!==e.options.gdpr_message&&null!=e.options.gdpr_message&&i.appendChild(this.createGDPRCheckbox(e.options.gdpr_message));let d=this.createSubmitButton(e.options.call_me_back_button);i.appendChild(d),d.addEventListener("click",this.sendCallMeBackForm.bind(this,d),!1),d.addEventListener("click",this.interactionHelperClicked.bind(this,t),!1),this.addAnalyticsClass(d,t),o.appendChild(i),o.appendChild(this.createLoading()),o.appendChild(this.createSuccessMessage(e.options.call_me_back_success)),document.body.appendChild(o)},BoeiWidget.prototype.sendCallMeBackForm=function(e){let t=document.getElementById(this.dom_call_me_back_form_id);t.style.display="none";let o={type:"call_me_back",helper_id:document.getElementById(this.dom_form_helper_id).value,page_info:this.getPageInfo()};if(null!=document.getElementById(this.dom_form_name_id)){if(!this.validNameField())return t.style.display="block",!1;o.name=document.getElementById(this.dom_form_name_id).value}let i=document.getElementById(this.dom_call_me_back_phone_id);if(null!=i){if(!this.validPhoneField(i.value))return i.style.borderColor="red",t.style.display="block",!1;i.style.borderColor="",o.phone=i.value}let n=document.getElementById(this.dom_call_me_back_when_id);if(null!=n){if(!this.validInputField(this.dom_call_me_back_when_id,2,180))return t.style.display="block",!1;o.when=n.value}let s=document.getElementById(this.dom_form_custom1_id);if(null!=s){if(!this.validInputField(this.dom_form_custom1_id,1,180))return t.style.display="block",!1;o.custom1=s.value}let a=document.getElementById(this.dom_form_custom2_id);if(null!=a){if(!this.validInputField(this.dom_form_custom2_id,1,180))return t.style.display="block",!1;o.custom2=a.value}let r=document.getElementById(this.dom_form_custom3_id);if(null!=r){if(!this.validInputField(this.dom_form_custom3_id,1,180))return t.style.display="block",!1;o.custom3=r.value}let l=document.getElementById(this.dom_form_custom4_id);if(null!=l){if(!this.validInputField(this.dom_form_custom4_id,1,180))return t.style.display="block",!1;o.custom4=l.value}let d=document.getElementById(this.dom_form_custom5_id);if(null!=d){if(!this.validInputField(this.dom_form_custom5_id,1,180))return t.style.display="block",!1;o.custom5=d.value}let c=document.getElementById(this.dom_form_custom_textarea1_id);null!=c&&(o.custom_text1=c.value);let p=document.getElementById(this.dom_form_custom_textarea2_id);if(null!=p&&(o.custom_text2=p.value),!this.validGDPRCheckbox())return t.style.display="block",!1;o.gdpr_checked="Checked",this.processFormData(this.send_form_to_url,o)},BoeiWidget.prototype.openMailForm=function(e,t){let o=this.createFormContainer(),i=this.createForm(this.dom_contact_form_id,e.options.helper_id);void 0!==e.options.thank_you_page&&""!==e.options.thank_you_page&&null!=e.options.thank_you_page&&i.appendChild(this.setThankYouPage(e.options.thank_you_page)),i.appendChild(this.createParagraph(e.options.contact_form_text_intro)),void 0!==e.options.label_subject&&""!==e.options.label_subject&&null!=e.options.label_subject&&i.appendChild(this.createInputField(e.options.label_subject,"text",!0,this.dom_form_subject_id)),void 0!==e.options.label_name&&""!==e.options.label_name&&null!=e.options.label_name&&i.appendChild(this.createNameField(e.options.label_name)),void 0!==e.options.contact_form_text_email&&""!==e.options.contact_form_text_email&&null!=e.options.contact_form_text_email&&i.appendChild(this.createEmailField(e.options.contact_form_text_email)),void 0!==e.options.label_custom1&&""!==e.options.label_custom1&&null!=e.options.label_custom1&&i.appendChild(this.createInputField(e.options.label_custom1,"text",!0,this.dom_form_custom1_id)),void 0!==e.options.label_custom2&&""!==e.options.label_custom2&&null!=e.options.label_custom2&&i.appendChild(this.createInputField(e.options.label_custom2,"text",!0,this.dom_form_custom2_id)),void 0!==e.options.label_custom3&&""!==e.options.label_custom3&&null!=e.options.label_custom3&&i.appendChild(this.createInputField(e.options.label_custom3,"text",!0,this.dom_form_custom3_id)),void 0!==e.options.label_custom4&&""!==e.options.label_custom4&&null!=e.options.label_custom4&&i.appendChild(this.createInputField(e.options.label_custom4,"text",!0,this.dom_form_custom4_id)),void 0!==e.options.label_custom5&&""!==e.options.label_custom5&&null!=e.options.label_custom5&&i.appendChild(this.createInputField(e.options.label_custom5,"text",!0,this.dom_form_custom5_id)),void 0!==e.options.label_custom_textarea1&&""!==e.options.label_custom_textarea1&&null!=e.options.label_custom_textarea1&&i.appendChild(this.createTextareaField(e.options.label_custom_textarea1,!0,this.dom_form_custom_textarea1_id)),void 0!==e.options.label_custom_textarea2&&""!==e.options.label_custom_textarea2&&null!=e.options.label_custom_textarea2&&i.appendChild(this.createTextareaField(e.options.label_custom_textarea2,!0,this.dom_form_custom_textarea2_id)),void 0!==e.options.contact_form_text_message&&""!==e.options.contact_form_text_message&&null!=e.options.contact_form_text_message&&i.appendChild(this.createTextareaField(e.options.contact_form_text_message,!0,this.dom_form_message_id)),void 0!==e.options.gdpr_message&&""!==e.options.gdpr_message&&null!=e.options.gdpr_message&&i.appendChild(this.createGDPRCheckbox(e.options.gdpr_message));let n=this.createSubmitButton(e.options.contact_form_text_send);i.appendChild(n),n.addEventListener("click",this.sendMailForm.bind(this,n),!1),n.addEventListener("click",this.interactionHelperClicked.bind(this,t),!1),this.addAnalyticsClass(n,t),o.appendChild(i),o.appendChild(this.createLoading()),o.appendChild(this.createSuccessMessage(e.options.contact_form_text_success)),document.body.appendChild(o)},BoeiWidget.prototype.sendMailForm=function(e){var t=document.getElementById(this.dom_contact_form_id);t.style.display="none";let o={type:"contact_form",helper_id:document.getElementById(this.dom_form_helper_id).value,page_info:this.getPageInfo()},i=document.getElementById(this.dom_form_subject_id);if(null!=i){if(!this.validInputField(this.dom_form_subject_id,2,100))return t.style.display="block",!1;o.subject=i.value}let n=document.getElementById(this.dom_form_name_id);if(null!=n){if(!this.validNameField())return t.style.display="block",!1;o.name=n.value}let s=document.getElementById(this.dom_form_email_id);if(null!=s){if(!this.validEmailField())return t.style.display="block",!1;o.email=s.value}let a=document.getElementById(this.dom_form_custom1_id);if(null!=a){if(!this.validInputField(this.dom_form_custom1_id,1,180))return t.style.display="block",!1;o.custom1=a.value}let r=document.getElementById(this.dom_form_custom2_id);if(null!=r){if(!this.validInputField(this.dom_form_custom2_id,1,180))return t.style.display="block",!1;o.custom2=r.value}let l=document.getElementById(this.dom_form_custom3_id);if(null!=l){if(!this.validInputField(this.dom_form_custom3_id,1,180))return t.style.display="block",!1;o.custom3=l.value}let d=document.getElementById(this.dom_form_custom4_id);if(null!=d){if(!this.validInputField(this.dom_form_custom4_id,1,180))return t.style.display="block",!1;o.custom4=d.value}let c=document.getElementById(this.dom_form_custom5_id);if(null!=c){if(!this.validInputField(this.dom_form_custom5_id,1,180))return t.style.display="block",!1;o.custom5=c.value}let p=document.getElementById(this.dom_form_custom_textarea1_id);null!=p&&(o.custom_text1=p.value);let h=document.getElementById(this.dom_form_custom_textarea2_id);null!=h&&(o.custom_text2=h.value);let m=document.getElementById(this.dom_form_message_id);if(null!=m){if(m.value.length<5)return m.style.borderColor="red",m.focus(),t.style.display="block",!1;m.style.borderColor="",o.message=m.value}if(!this.validGDPRCheckbox())return t.style.display="block",!1;o.gdpr_checked="Checked",this.processFormData(this.send_form_to_url,o)},BoeiWidget.prototype.openFeedbackForm=function(e,t){let o=this.createFormContainer(),i=this.createForm(this.dom_feedback_form_id,e.options.helper_id);void 0!==e.options.thank_you_page&&""!==e.options.thank_you_page&&null!=e.options.thank_you_page&&i.appendChild(this.setThankYouPage(e.options.thank_you_page)),i.appendChild(this.createParagraph(e.options.intro)),i.appendChild(this.createInputField("","hidden",!0,this.dom_feedback_selected_id));let n=document.createElement("div");n.style="margin-bottom: 20px; text-align: center;";let s=document.createElement("div"),a=e.options.feedback_type||"1-5",r=this;if("1-10"===a){s.style="display: flex; justify-content: center; gap: 4px; flex-wrap: wrap;";for(let e=1;e<=10;e++){let t=document.createElement("div");t.style="\n                display: inline-flex; \n                flex-direction: column; \n                align-items: center; \n                justify-content: center;\n                padding: 12px 8px; \n                border-radius: 8px; \n                cursor: pointer; \n                transition: all 0.2s ease;\n                border: 2px solid transparent;\n                background: rgba(0,0,0,0.02);\n                min-width: 36px;\n                height: 44px;\n                font-weight: 500;\n                font-size: 16px;\n                color: #333;\n            ",t.className="boei-feedback-image-wrapper",t.textContent=e,s.appendChild(t),t.addEventListener("mouseenter",(function(){this.classList.contains("selected")||(this.style.borderColor="#ddd",this.style.background="rgba(0,0,0,0.08)",this.style.transform="scale(1.1)")}),!1),t.addEventListener("mouseleave",(function(){this.classList.contains("selected")||(this.style.borderColor="transparent",this.style.background="rgba(0,0,0,0.02)",this.style.transform="scale(1)")}),!1),t.addEventListener("click",(function(){r.clickFeedbackImage(this,e.toString())}),!1)}}else if("happy-sad"===a){s.style="display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;",[{name:"sad",label:"Not Happy",color:"#ff6b6b",image:e.options.feedback_images&&e.options.feedback_images[4]?e.options.feedback_images[4].image:null},{name:"happy",label:"Happy",color:"#51cf66",image:e.options.feedback_images&&e.options.feedback_images[0]?e.options.feedback_images[0].image:null}].forEach((e=>{let t=document.createElement("div");if(t.style="\n                display: inline-flex; \n                flex-direction: column; \n                align-items: center; \n                padding: 16px 24px; \n                border-radius: 12px; \n                cursor: pointer; \n                transition: all 0.2s ease;\n                border: 2px solid transparent;\n                background: rgba(0,0,0,0.02);\n                min-width: 100px;\n            ",t.className="boei-feedback-image-wrapper",e.image){let o=document.createElement("img");o.src=e.image,o.style="\n                    height: 36px; \n                    width: 36px; \n                    border-radius: 4px;\n                    transition: transform 0.2s ease;\n                    pointer-events: none;\n                    margin-bottom: 8px;\n                ",t.appendChild(o)}let o=document.createElement("div");o.textContent=e.label,o.style="\n                font-size: 13px; \n                color: #666;\n                text-align: center;\n                pointer-events: none;\n                font-weight: 500;\n            ",t.appendChild(o),s.appendChild(t),t.addEventListener("mouseenter",(function(){this.classList.contains("selected")||(this.style.borderColor=e.color+"60",this.style.background=e.color+"15",this.style.transform="scale(1.05)",e.image&&(this.querySelector("img").style.transform="scale(1.1)"))}),!1),t.addEventListener("mouseleave",(function(){this.classList.contains("selected")||(this.style.borderColor="transparent",this.style.background="rgba(0,0,0,0.02)",this.style.transform="scale(1)",e.image&&(this.querySelector("img").style.transform="scale(1)"))}),!1),t.addEventListener("click",(function(){r.clickFeedbackImageHappySad(this,e.name,e.color)}),!1)}))}else s.style="display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;",e.options.feedback_images.forEach((e=>{let t=document.createElement("div");t.style="\n                display: inline-flex; \n                flex-direction: column; \n                align-items: center; \n                padding: 8px; \n                border-radius: 8px; \n                cursor: pointer; \n                transition: all 0.2s ease;\n                border: 2px solid transparent;\n                background: rgba(0,0,0,0.02);\n            ",t.className="boei-feedback-image-wrapper";let o=document.createElement("img");o.src=e.image,o.style="\n                height: 32px; \n                width: 32px; \n                border-radius: 4px;\n                transition: transform 0.2s ease;\n                pointer-events: none;\n            ",o.className="boei-feedback-form-image";let i=document.createElement("div");i.textContent=e.label||e.name||"",i.style="\n                font-size: 11px; \n                margin-top: 4px; \n                color: #666;\n                text-align: center;\n                pointer-events: none;\n            ",t.appendChild(o),i.textContent&&t.appendChild(i),s.appendChild(t),t.addEventListener("mouseenter",(function(){this.classList.contains("selected")||(this.style.borderColor="#ddd",this.style.background="rgba(0,0,0,0.08)",this.style.transform="scale(1.05)",this.querySelector("img").style.transform="scale(1.1)")}),!1),t.addEventListener("mouseleave",(function(){this.classList.contains("selected")||(this.style.borderColor="transparent",this.style.background="rgba(0,0,0,0.02)",this.style.transform="scale(1)",this.querySelector("img").style.transform="scale(1)")}),!1),t.addEventListener("click",(function(){r.clickFeedbackImage(this,e.name)}),!1)}));n.appendChild(s),i.appendChild(n),void 0!==e.options.comment_label&&""!==e.options.comment_label&&null!=e.options.comment_label&&i.appendChild(this.createTextareaField(e.options.comment_label,!1,this.dom_feedback_comment_id));let l=this.createSubmitButton(e.options.button_label);i.appendChild(l),l.addEventListener("click",this.sendFeedbackForm.bind(this,l),!1),l.addEventListener("click",this.interactionHelperClicked.bind(this,t),!1),this.addAnalyticsClass(l,t),o.appendChild(i),o.appendChild(this.createLoading()),o.appendChild(this.createSuccessMessage(e.options.success_message)),document.body.appendChild(o)},BoeiWidget.prototype.clickFeedbackImageHappySad=function(e,t,o){document.getElementById(this.dom_feedback_selected_id).value=t,Array.from(document.getElementsByClassName("boei-feedback-image-wrapper")).forEach((function(e){e.classList.remove("selected"),e.style.borderColor="transparent",e.style.background="rgba(0,0,0,0.02)",e.style.boxShadow="none",e.style.transform="scale(1)";let t=e.querySelector("img");t&&(t.style.transform="scale(1)")})),e.classList.add("selected"),e.style.borderColor=o,e.style.background=o+"20",e.style.boxShadow="0 0 0 2px "+o+"40",e.style.transform="scale(1.02)";let i=e.querySelector("img");i&&(i.style.transform="scale(1.1)")},BoeiWidget.prototype.clickFeedbackImage=function(e,t){document.getElementById(this.dom_feedback_selected_id).value=t,Array.from(document.getElementsByClassName("boei-feedback-image-wrapper")).forEach((function(e){e.classList.remove("selected"),e.style.borderColor="transparent",e.style.background="rgba(0,0,0,0.02)",e.style.boxShadow="none",e.style.transform="scale(1)";let t=e.querySelector("img");t&&(t.style.transform="scale(1)")})),e.classList.add("selected"),e.style.borderColor=this.brandcolor,e.style.background=this.brandcolor+"15",e.style.boxShadow="0 0 0 2px "+this.brandcolor+"40",e.style.transform="scale(1.1)";let o=e.querySelector("img");o&&(o.style.transform="scale(1.1)")},BoeiWidget.prototype.sendFeedbackForm=function(e){let t=document.getElementById(this.dom_feedback_form_id);t.style.display="none";let o={type:"feedback_form",helper_id:document.getElementById(this.dom_form_helper_id).value,page_info:this.getPageInfo()},i=document.getElementById(this.dom_feedback_selected_id);if(i.value.length<1){if(Array.from(document.getElementsByClassName("boei-feedback-image-wrapper")).forEach((function(e){e.style.borderColor="#ff4444",e.style.background="rgba(255, 68, 68, 0.05)",e.style.animation="boei-shake 0.5s ease-in-out"})),!document.querySelector(".boei-feedback-error")){let e=document.createElement("div");e.className="boei-feedback-error",e.textContent="Please select a feedback option",e.style="\n                color: #ff4444; \n                font-size: 12px; \n                text-align: center; \n                margin-top: 8px;\n                animation: boei-fadeIn 0.3s ease-in;\n            ",document.querySelector('div[style*="margin-bottom: 20px; text-align: center;"]').appendChild(e)}return t.style.display="block",!1}let n=document.querySelector(".boei-feedback-error");n&&n.remove(),o.feedback=i.value;let s=document.getElementById(this.dom_feedback_comment_id);if(null!=s){if(!this.validInputField(this.dom_feedback_comment_id,2,5e3))return t.style.display="block",!1;o.comment=s.value}this.processFormData(this.send_form_to_url,o)},!document.querySelector("#boei-feedback-animations")){let e=document.createElement("style");e.id="boei-feedback-animations",e.textContent="\n        @keyframes boei-shake {\n            0%, 100% { transform: translateX(0); }\n            25% { transform: translateX(-3px); }\n            75% { transform: translateX(3px); }\n        }\n        \n        @keyframes boei-fadeIn {\n            from { opacity: 0; transform: translateY(-5px); }\n            to { opacity: 1; transform: translateY(0); }\n        }\n    ",document.head.appendChild(e)}BoeiWidget.prototype.openHtml=function(e){let t=this.createFormContainer();t.id=this.dom_html_container_id+"_"+e.options.helper_id;const o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;o>512&&i>288&&(t.style.maxWidth="512px",t.style.width="512px",t.style.height="288px"),t.style.overflowY="auto",t.style.overflowX="hidden";let n=document.createElement("div");n.style="display: relative; width: 100%;  height: 100%; padding: 8px; margin: 0; color: "+this.helper_textcolor+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1.4; text-decoration: none; font-weight: normal; letter-spacing: normal; text-transform: none;",n.innerHTML=e.options.html,t.appendChild(n),document.body.appendChild(t)},BoeiWidget.prototype.openIframeWidget=function(e){let t=this.createFormContainer();t.id=this.dom_iframe_container_id+"_"+e.options.helper_id,t.style.padding="0",t.style.boxSizing="border-box";const o=window.visualViewport?window.visualViewport.width:window.innerWidth,i=(window.visualViewport?window.visualViewport.height:window.innerHeight,/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream),n=o<860;if(n||e.options.iframe_width&&"100%"===e.options.iframe_width){t.style.width="100%",t.style.maxWidth="100%",t.style.left="0",t.style.right="0",t.style.height="100%",t.style.maxHeight="100%",t.style.top="0",t.style.bottom="0",t.classList.add("boei-mobile-fullscreen"),this.currentFullscreenWidget=t,document.getElementById(this.dom_button_close_id)||this.isBoeiOpen()||this.openBoei();const e=document.getElementById(this.dom_button_close_id);if(e){e.dataset.originalStyles||(e.dataset.originalStyles=JSON.stringify({top:e.style.top,right:e.style.right,bottom:e.style.bottom,left:e.style.left,zIndex:e.style.zIndex})),e.style.position="fixed",e.style.top=i?"calc(env(safe-area-inset-top) + 10px)":"10px",e.style.right="10px",e.style.bottom="auto",e.style.left="auto",e.style.zIndex="1000000",e.classList.add("boei-fullscreen-close");const t=e.onclick;e.onclick=e=>{t&&t.call(this,e),this.closeFullscreenWidget()}}}else{let o,i;o=this.button_margin_x+this.button_width+40+20,i=this.button_margin_y+20,t.style.maxWidth=e.options.iframe_width?e.options.iframe_width:"800px",t.style.width="100%",t.style.height=e.options.iframe_height?e.options.iframe_height:"450px","function"==typeof this.setPosition&&this.setPosition("widget",t)}i&&n&&(this.addSafeAreaStyles(),t.style.paddingTop="env(safe-area-inset-top, 0px)",t.style.paddingBottom="env(safe-area-inset-bottom, 0px)",t.style.paddingLeft="env(safe-area-inset-left, 0px)",t.style.paddingRight="env(safe-area-inset-right, 0px)");const s=document.createElement("div");s.style.position="relative",s.style.display="block",s.style.width="100%",s.style.height="100%",s.style.padding="0",s.style.overflow="hidden";const a=document.createElement("iframe");a.style.width="100%",a.style.height="100%",a.style.border="0",a.style.boxSizing="border-box",a.src=this.replaceVariablesUnescaped(this.replaceLoadKeyPlaceholder(e.options.url)),a.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"),a.setAttribute("allowfullscreen",""),s.appendChild(a),t.appendChild(s),document.body.appendChild(t),n&&this.applyMobileFullscreenStyles(t)};const originalCloseBoei=BoeiWidget.prototype.closeBoei;BoeiWidget.prototype.closeBoei=function(e,t){return this.currentFullscreenWidget&&this.closeFullscreenWidget(),originalCloseBoei.call(this,e,t)};const originalSetPosition=BoeiWidget.prototype.setPosition;BoeiWidget.prototype.setPosition=function(e,t,o=null){if(originalSetPosition.call(this,e,t,o),"widget"===e&&window.innerWidth<860){/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&(this.addSafeAreaStyles(),"top_left"!==this.position&&"top_right"!==this.position||(t.style.top="calc("+t.style.top+" + env(safe-area-inset-top, 44px))"),"bottom_left"!==this.position&&"bottom_right"!==this.position||(t.style.bottom="calc("+t.style.bottom+" + env(safe-area-inset-bottom, 34px))"))}},BoeiWidget.prototype.closeFullscreenWidget=function(){this.currentFullscreenWidget&&this.currentFullscreenWidget.parentNode&&(this.currentFullscreenWidget.parentNode.removeChild(this.currentFullscreenWidget),this.currentFullscreenWidget=null);const e=document.getElementById(this.dom_button_close_id);if(e&&e.dataset.originalStyles)try{const t=JSON.parse(e.dataset.originalStyles);e.style.top=t.top,e.style.right=t.right,e.style.bottom=t.bottom,e.style.left=t.left,e.style.zIndex=t.zIndex,e.classList.remove("boei-fullscreen-close"),delete e.dataset.originalStyles}catch(e){console.error("Error restoring close button styles:",e)}document.body.style.overflow=""},BoeiWidget.prototype.addSafeAreaStyles=function(){if(document.getElementById("boei-safe-area-style"))return;const e=document.createElement("style");e.id="boei-safe-area-style",e.innerHTML="\n        :root {\n            --safe-area-inset-top: env(safe-area-inset-top, 0px);\n            --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);\n            --safe-area-inset-left: env(safe-area-inset-left, 0px);\n            --safe-area-inset-right: env(safe-area-inset-right, 0px);\n        }\n        \n        @supports (padding-top: env(safe-area-inset-top)) {\n            .boei-mobile-fullscreen {\n                padding-top: env(safe-area-inset-top) !important;\n                padding-bottom: env(safe-area-inset-bottom) !important;\n                padding-left: env(safe-area-inset-left) !important;\n                padding-right: env(safe-area-inset-right) !important;\n            }\n        }\n    ",document.head.appendChild(e)},BoeiWidget.prototype.applyMobileFullscreenStyles=function(e){e.style.position="fixed",e.style.zIndex="999999",e.style.margin="0",e.style.padding="0",e.style.backgroundColor="#fff",this.ensureViewportMeta(),document.body.style.overflow="hidden";const t=e.querySelector("div");t&&(t.style.overflow="auto",t.style.WebkitOverflowScrolling="touch")},BoeiWidget.prototype.ensureViewportMeta=function(){let e=document.querySelector('meta[name="viewport"]');e||(e=document.createElement("meta"),e.name="viewport",document.head.appendChild(e)),e.content.includes("viewport-fit=cover")||(e.content=e.content+", viewport-fit=cover")},BoeiWidget.prototype.openMarkdown=function(e){let t=this.createFormContainer();t.className+=" boei-markdown-container",t.id=this.dom_markdown_container_id+"_"+e.options.helper_id,this.revertStylingSubelements(t.id),t.style.overflowY="auto",t.style.overflowX="hidden";let o=document.createElement("div");o.style="display: relative; width: 100%; height: 100%; padding: 8px; margin: 0; color: "+this.helper_textcolor+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1.4; text-decoration: none; font-weight: normal; letter-spacing: normal; text-transform: none;",o.innerHTML=e.options.body,t.appendChild(o),document.body.appendChild(t)},BoeiWidget.prototype.openNewsletterSignupForm=function(e,t){this.helper=e;let o=this.createFormContainer(),i=this.createForm(this.dom_newsletter_signup_id,e.options.helper_id);e.options.thank_you_page&&i.appendChild(this.setThankYouPage(e.options.thank_you_page)),i.appendChild(this.createParagraph(e.options.newsletter_signup_intro)),e.options.label_last_name?(e.options.label_name&&i.appendChild(this.createInputField(e.options.label_name,"text",!0,this.dom_form_name_id,"given-name")),i.appendChild(this.createInputField(e.options.label_last_name,"text",!0,this.dom_form_last_name_id,"family-name"))):e.options.label_name&&i.appendChild(this.createNameField(e.options.label_name)),e.options.label_company&&i.appendChild(this.createInputField(e.options.label_company,"text",!0,this.dom_form_company_id,"organization")),i.appendChild(this.createEmailField(e.options.newsletter_signup_email)),e.options.gdpr_message&&i.appendChild(this.createGDPRCheckbox(e.options.gdpr_message));let n=this.createSubmitButton(e.options.newsletter_signup_button);i.appendChild(n),n.addEventListener("click",this.sendNewsletterSignupForm.bind(this,n),!1),n.addEventListener("click",this.interactionHelperClicked.bind(this,t),!1),this.addAnalyticsClass(n,t),o.appendChild(i),o.appendChild(this.createLoading()),o.appendChild(this.createSuccessMessage(e.options.newsletter_signup_success)),document.body.appendChild(o)},BoeiWidget.prototype.sendNewsletterSignupForm=function(e){var t=document.getElementById(this.dom_newsletter_signup_id);t.style.display="none";let o={type:"newsletter_signup",helper_id:document.getElementById(this.dom_form_helper_id).value,page_info:this.getPageInfo()};var i=document.getElementById(this.dom_form_name_id);if(null!=i){if(!this.validNameField())return t.style.display="block",!1;o.name=i.value}var n=document.getElementById(this.dom_form_last_name_id);if(null!=n){if(this.helper.options.label_last_name&&n.value.length<2)return n.style.borderColor="red",n.focus(),t.style.display="block",!1;n.style.borderColor="",o.last_name=n.value}var s=document.getElementById(this.dom_form_company_id);if(null!=s){if(this.helper.options.label_company&&s.value.length<2)return s.style.borderColor="red",s.focus(),t.style.display="block",!1;s.style.borderColor="",o.company=s.value}return this.validEmailField()?(o.email=document.getElementById(this.dom_form_email_id).value,this.validGDPRCheckbox()?(o.gdpr_checked="Checked",void this.processFormData(this.send_form_to_url,o)):(t.style.display="block",!1)):(t.style.display="block",!1)},BoeiWidget.prototype.openWhatsAppChatWidget=function(e){let t=this.createFormContainer(!1,!1);t.id=this.dom_whatsapp_chat_container_id+"_"+e.options.helper_id,t.style.overflow="hidden",t.style.padding="0",t.style.display="flex",t.style.flexDirection="column";let o=document.createElement("div");o.style.padding="20px",o.style.background=e.options.header_background,o.style.color=e.options.header_text_color,o.style.display="flex",o.style.alignItems="center",o.style.flexShrink="0";let i=document.createElement("img");i.src=e.options.avatar,i.style.width="40px",i.style.height="40px",i.style.borderRadius="50%",i.style.marginRight="20px";let n=document.createElement("div"),s=document.createElement("div");s.textContent=e.options.business_name,s.style.fontWeight="bold",s.style.marginBottom="5px";let a=document.createElement("div");a.textContent=e.options.online_text,a.style.fontSize="12px",a.style.fontStyle="italic",n.appendChild(s),n.appendChild(a),o.appendChild(i),o.appendChild(n);let r=document.createElement("div");r.style.background=e.options.chat_area_background||"#f0f2f5",r.style.padding="20px",r.style.paddingTop="20px",r.style.paddingBottom="20px",r.style.flex="1",r.style.overflowY="auto",r.style.display="flex",r.style.flexDirection="column";let l=document.createElement("div");l.style.padding="10px",l.style.background=e.options.chat_message_background,l.style.margin="0 0 20px 0",l.style.borderRadius="10px",l.style.maxWidth="80%",l.style.position="relative",l.style.boxShadow="0 1px .5px rgba(0,0,0,.13)";let d=document.createElement("div");d.textContent=e.options.support_agent_name,d.style.fontSize="12px",d.style.fontWeight="bold",d.style.marginBottom="10px",d.style.color=e.options.intro_text_color;let c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.height="20px";for(let e=0;e<3;e++){let t=document.createElement("div");t.style.width="8px",t.style.height="8px",t.style.background="#888",t.style.borderRadius="50%",t.style.margin="0 3px",t.style.animation="loadingAnimation 1.4s infinite",t.style.animationDelay=.2*e+"s",c.appendChild(t)}let p=document.createElement("div");p.textContent=e.options.intro_message,p.style.color=e.options.intro_text_color,p.style.display="none";let h=document.createElement("div");h.style.fontSize="12px",h.style.textAlign="right",h.style.marginTop="5px";let m=document.createElement("span");m.innerHTML="&#10004;&#10004;",m.style.color="#4fc3f7",m.style.marginRight="5px";let u=document.createElement("span");u.textContent=(new Date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),u.style.color=e.options.intro_text_color,h.appendChild(m),h.appendChild(u),l.appendChild(d),l.appendChild(c),l.appendChild(p),l.appendChild(h);let _=null;if(e.options.quick_buttons&&e.options.quick_buttons.length>0){_=document.createElement("div"),_.style.padding="0",_.style.marginBottom="20px";let t=document.createElement("div");t.style.display="flex",t.style.flexWrap="wrap",t.style.gap="8px",e.options.quick_buttons.forEach(((o,i)=>{let n=document.createElement("button");n.textContent=o.text,n.style.cssText=`\n            background: ${e.options.quick_button_background||"#f0f2f5"};\n            color: ${e.options.quick_button_text_color||"#128c7e"};\n            border: 1px solid ${e.options.quick_button_border_color||"#128c7e"};\n            padding: 6px 12px;\n            border-radius: ${this.overall_border_radius};\n            font-family: ${this.fontfamily};\n            font-size: 13px;\n            cursor: pointer;\n            transition: all 0.3s ease;\n            outline: none;\n        `,n.addEventListener("mouseenter",(function(){this.style.backgroundColor=e.options.quick_button_text_color||"#128c7e",this.style.color=e.options.quick_button_background||"#f0f2f5"})),n.addEventListener("mouseleave",(function(){this.style.backgroundColor=e.options.quick_button_background||"#f0f2f5",this.style.color=e.options.quick_button_text_color||"#128c7e"})),n.addEventListener("click",function(){if(!0===e.options.use_input_message||"true"===e.options.use_input_message){const t=document.getElementById("whatsapp_message_input_"+e.options.helper_id);if(t){t.value=o.message;const i=document.getElementById("whatsapp_message_error_"+e.options.helper_id);i&&(i.style.display="none");const n=document.querySelector(`#${this.dom_whatsapp_chat_container_id}_${e.options.helper_id} a`);n&&n.click()}}else{const t=e.options.text;e.options.text=o.message;const i=this.passVariablesToUrl(e.options.submit_url);"true"===e.options.new_window||!0===e.options.new_window?window.open(i,"_blank"):window.top.location.href=i,e.options.text=t,this.interactionHelperClicked(e),setTimeout((()=>{this.closeBoei()}),500)}}.bind(this)),t.appendChild(n)})),_.appendChild(t)}let g=document.createElement("div");g.style.cssText=`\n        padding: 20px;\n        background: ${e.options.chat_input_area_background||"#ffffff"};\n        flex-shrink: 0;\n    `;let y=!0===e.options.use_input_message||"true"===e.options.use_input_message;if(y){if((!0===e.options.collect_phone||"true"===e.options.collect_phone)&&e.options.label_phone){let t=document.createElement("div");t.style.marginBottom="10px";let o=document.createElement("input");o.type="tel",o.id="whatsapp_phone_input_"+e.options.helper_id,o.placeholder=e.options.label_phone,o.required=!0,o.setAttribute("autocomplete","tel"),o.style.cssText=`\n                width: 100%;\n                padding: 12px;\n                border: 1px solid #ddd;\n                border-radius: ${this.overall_border_radius};\n                font-family: ${this.fontfamily};\n                font-size: ${this.fontsize};\n                box-sizing: border-box;\n                background: #fff;\n                color: #333;\n                outline: none;\n            `;let i=document.createElement("div");i.id="whatsapp_phone_error_"+e.options.helper_id,i.style.cssText="\n                display: none;\n                margin-top: 6px;\n                font-size: 12px;\n                color: #d93025;\n            ",i.textContent="Please enter a valid phone number (8-15 digits)",o.addEventListener("focus",(function(){this.style.borderColor=e.options.submit_background||"#25d366"})),o.addEventListener("blur",(function(){this.style.borderColor="#ddd"})),o.addEventListener("input",(function(){this.value.trim().length>0&&(i.style.display="none")})),t.appendChild(o),t.appendChild(i),g.appendChild(t)}let t=document.createElement("div");t.style.marginBottom="10px";let o=document.createElement("textarea");o.id="whatsapp_message_input_"+e.options.helper_id,o.placeholder=e.options.input_placeholder||"Type your message here...",o.style.cssText=`\n            width: 100%;\n            min-height: 80px;\n            padding: 12px;\n            border: 1px solid #ddd;\n            border-radius: ${this.overall_border_radius};\n            font-family: ${this.fontfamily};\n            font-size: ${this.fontsize};\n            resize: vertical;\n            box-sizing: border-box;\n            background: #fff;\n            color: #333;\n            outline: none;\n        `;let i=document.createElement("div");if(i.id="whatsapp_message_error_"+e.options.helper_id,i.style.cssText="\n            display: none;\n            margin-top: 6px;\n            font-size: 12px;\n            color: #d93025;\n        ",i.textContent=e.options.message_required_text||"Please enter a message before sending.",o.addEventListener("focus",(function(){this.style.borderColor=e.options.submit_background||"#25d366"})),o.addEventListener("blur",(function(){this.style.borderColor="#ddd"})),o.addEventListener("input",(function(){this.value.trim().length>0&&(i.style.display="none")})),t.appendChild(o),t.appendChild(i),g.appendChild(t),!0===e.options.collect_contact_info||"true"===e.options.collect_contact_info){let o=document.createElement("input");o.type="text",o.id="whatsapp_name_input_"+e.options.helper_id,o.placeholder=e.options.name_placeholder||"Your name (optional)",o.style.cssText=`\n                width: 100%;\n                padding: 12px;\n                margin-bottom: 10px;\n                border: 1px solid #ddd;\n                border-radius: ${this.overall_border_radius};\n                font-family: ${this.fontfamily};\n                font-size: ${this.fontsize};\n                box-sizing: border-box;\n                background: #fff;\n                color: #333;\n                outline: none;\n            `,o.addEventListener("focus",(function(){this.style.borderColor=e.options.submit_background||"#25d366"})),o.addEventListener("blur",(function(){this.style.borderColor="#ddd"}));let i=document.createElement("input");i.type="email",i.id="whatsapp_email_input_"+e.options.helper_id,i.placeholder=e.options.email_placeholder||"Your email (optional)",i.style.cssText=o.style.cssText,i.addEventListener("focus",(function(){this.style.borderColor=e.options.submit_background||"#25d366"})),i.addEventListener("blur",(function(){this.style.borderColor="#ddd"})),g.insertBefore(o,t),g.insertBefore(i,t)}}let f=document.createElement("a"),b=document.createTextNode(e.options.start_chat_text);f.style="background-image: none; box-sizing: border-box; border: 0; display: block; width: 100%; margin-top: 0; background: "+e.options.submit_background+"; color: "+e.options.submit_text_color+"; padding: 12px 12px; border-radius: "+this.overall_border_radius+"; cursor: pointer; text-align: center; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1; text-decoration: none; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; font-weight: normal; letter-spacing: normal; text-transform: none;",f.appendChild(b),y?(f.href="#",f.addEventListener("click",(t=>{t.preventDefault();const o=document.getElementById("whatsapp_phone_input_"+e.options.helper_id),i=document.getElementById("whatsapp_phone_error_"+e.options.helper_id),n=document.getElementById("whatsapp_message_input_"+e.options.helper_id),s=document.getElementById("whatsapp_message_error_"+e.options.helper_id),a=document.getElementById("whatsapp_name_input_"+e.options.helper_id),r=document.getElementById("whatsapp_email_input_"+e.options.helper_id),l=o?o.value.trim():"",d=n?n.value.trim():"",c=a?a.value.trim():"",p=r?r.value.trim():"";if(o&&!this.validPhoneField(l))return o.style.borderColor="red",i&&(i.style.display="block"),void o.focus();if(o&&(o.style.borderColor="",i&&(i.style.display="none")),!d)return s&&(s.textContent=e.options.message_required_text||"Please enter a message before sending.",s.style.display="block"),void(n&&n.focus());s&&(s.style.display="none");const h=new URLSearchParams({type:"whatsapp_form",helper_id:e.options.helper_id,message:d,page_info:JSON.stringify(this.getPageInfo())});l&&h.append("phone",l),c&&h.append("name",c),p&&h.append("email",p);const m=`${this.send_form_to_url}?${h.toString()}`;!("new_window"in e.options)||"true"!==e.options.new_window&&!0!==e.options.new_window?window.top.location.href=m:window.open(m,"_blank"),this.interactionHelperClicked(e),setTimeout((()=>{this.closeBoei()}),500)}),!1)):(f.href=this.passVariablesToUrl(e.options.submit_url),!("new_window"in e.options)||"true"!==e.options.new_window&&!0!==e.options.new_window?f.setAttribute("target","_top"):f.setAttribute("target","_blank"),f.addEventListener("click",this.interactionHelperClicked.bind(this,e),!1)),this.addAnalyticsClass(f,e),f.addEventListener("mouseover",this.mouseoverBoei.bind(this,f),!1),f.addEventListener("mouseout",this.mouseoutBoei.bind(this,f),!1),f.style.background=e.options.submit_background,f.style.color=e.options.submit_text_color,g.appendChild(f),r.appendChild(l),_&&r.appendChild(_),t.appendChild(o),t.appendChild(r),t.appendChild(g),document.body.appendChild(t);let x=document.createElement("style");x.textContent="\n        @keyframes loadingAnimation {\n            0%, 80%, 100% { transform: scale(0); }\n            40% { transform: scale(1); }\n        }\n    ",document.head.appendChild(x),setTimeout((()=>{c.style.display="none",p.style.display="block"}),1e3)},BoeiWidget.prototype.handleWhatsAppFormSubmit=function(e){const t=document.getElementById("whatsapp_message_input_"+e.options.helper_id),o=document.getElementById("whatsapp_name_input_"+e.options.helper_id),i=document.getElementById("whatsapp_email_input_"+e.options.helper_id),n=document.getElementById("whatsapp_message_error_"+e.options.helper_id),s=t?t.value.trim():"",a=o?o.value.trim():"",r=i?i.value.trim():"";if(!s)return n&&(n.textContent=e.options.message_required_text||"Please enter a message before sending.",n.style.display="block"),void(t&&t.focus());n&&(n.style.display="none");const l={type:"whatsapp_form",helper_id:e.options.helper_id,page_info:this.getPageInfo(),message:s};a&&(l.name=a),r&&(l.email=r);const d=document.querySelector(`#${this.dom_whatsapp_chat_container_id}_${e.options.helper_id} a`),c=d.textContent;d.textContent=e.options.sending_text||"Sending...",d.style.opacity="0.7",d.style.pointerEvents="none";const p=this.send_form_to_url;fetch(p,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(l)}).then((e=>e.json())).then((t=>{d.textContent=c,d.style.opacity="1",d.style.pointerEvents="auto";document.getElementById(this.dom_form_container_id);t.whatsapp_url?("true"===e.options.new_window||!0===e.options.new_window?window.open(t.whatsapp_url,"_blank"):window.top.location.href=t.whatsapp_url,setTimeout((()=>{this.closeBoei()}),2e3)):this.closeBoei(),this.interactionHelperClicked(e)})).catch((t=>{console.log("Error:",t),d.textContent=c,d.style.opacity="1",d.style.pointerEvents="auto",alert(e.options.error_message||"Sorry, an error occurred. Please try again or use an alternative contact method.")}))},BoeiWidget.prototype.openYoutubeWidget=function(e){let t=this.createFormContainer();t.style.padding="0",t.id=this.dom_youtube_container_id+"_"+e.options.helper_id;const o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;o>532&&i>318&&(t.style.maxWidth="512px",t.style.width="512px",t.style.height="288px"),t.innerHTML="<div style='position: relative; display: block; width: 100%; height: 100%; padding: 0; overflow: hidden;'><iframe style='width: 100%; height: 100%; border: 0; box-sizing: border-box;' src=\"https://www.youtube.com/embed/"+e.options.video_id+'?autoplay=1" referrerpolicy="strict-origin-when-cross-origin" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>',document.body.appendChild(t)};
var boeiEmbed = new BoeiWidget({"key":"4c2c0004-5817-41c7-9107-3e2dcb06eb07","load_key":"1ac4f803-601d-49d0-bc2c-689ec35fe535","icon_svg":" <svg style=\"margin-left: auto; margin-right: auto;\" width=\"32px\" height=\"32px\" width=\"20px\" height=\"20px\" viewBox=\"0 0 20 20\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\"> <g id=\"Icons\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"> <g id=\"Outlined\" transform=\"translate(-850.000000, -376.000000)\"> <g id=\"Action\" transform=\"translate(100.000000, 100.000000)\"> <g id=\"Outlined-\/-Action-\/-question_answer\" transform=\"translate(748.000000, 274.000000)\"> <g> <polygon id=\"Path\" points=\"0 0 24 0 24 24 0 24\"><\/polygon> <path d=\"M15,4 L15,11 L5.17,11 L4.58,11.59 L4,12.17 L4,4 L15,4 Z M16,2 L3,2 C2.45,2 2,2.45 2,3 L2,17 L6,13 L16,13 C16.55,13 17,12.55 17,12 L17,3 C17,2.45 16.55,2 16,2 Z M21,6 L19,6 L19,15 L6,15 L6,17 C6,17.55 6.45,18 7,18 L18,18 L22,22 L22,7 C22,6.45 21.55,6 21,6 Z\" id=\"\ud83d\udd39-Icon-Color\" fill=\"currentColor\"><\/path> <\/g> <\/g> <\/g> <\/g> <\/g> <\/svg>","button_image":"https:\/\/boei-production.s3.eu-west-1.amazonaws.com\/images\/1738650853-5b83c3dc-141c-4f12-b891-d614d4d410c9.png","brand_background":"#713EEC","brandcolor":"#713EEC","brandcolor_text":"#ffffff","close_src":"https:\/\/app.boei.help\/close.svg","loading_src":"https:\/\/app.boei.help\/loading.svg","trigger_after_seconds":3,"trigger_message":"<p style=\"margin:0;\">Hi {{name}}! How can we help you today?<\/p>","trigger_message_only_new_visitor":0,"display_countdown_timer":false,"display_countdown_timer_seconds_left":0,"position":"bottom_right","font_family":null,"font_size":null,"shape":"round","send_form_to_url":"https:\/\/app.boei.help\/send_form\/4c2c0004-5817-41c7-9107-3e2dcb06eb07","interaction_url":"https:\/\/app.boei.help\/interaction\/4c2c0004-5817-41c7-9107-3e2dcb06eb07","hide_on_pages":null,"opacity":1,"is_out_of_office":false,"allow_identifiers":true,"display_close_trigger_message":false,"close_trigger_after_seconds":0,"display_button_watermark":false,"display_helper_watermark":false,"helper_watermark_text":"Made with Boei","watermark_url_button":"https:\/\/boei.help\/?utm_source=poweredby_button&utm_medium=banner&utm_campaign=4c2c0004-5817-41c7-9107-3e2dcb06eb07","watermark_url_helper":"https:\/\/boei.help\/?utm_source=poweredby_button&utm_medium=banner&utm_campaign=4c2c0004-5817-41c7-9107-3e2dcb06eb07","button_width":60,"button_height":60,"button_margin_x":30,"button_margin_y":30,"button_icon_size":32,"auto_open_after_seconds":null,"auto_open_only_new_visitor":0,"notification_badge_after_seconds":null,"glow_after_seconds":null,"glow_duration_seconds":null,"glow_color":"#713EEC","has_background_fade":1,"pageview_url":"","test_mode":false,"template":"list","is_overlimits":0,"direct_open_when_one_channel":1,"hide_live_chat":1,"brand_textcolor":"#ffffff","helper_bordercolor":"#efefef","helper_backgroundcolor":"#ffffff","helper_iconcolor":"#686868","helper_textcolor":"#686868","helper_highlight_bordercolor":"#713EEC","helper_highlight_backgroundcolor":"#713EEC","helper_highlight_iconcolor":"#ffffff","helper_highlight_textcolor":"#ffffff","helper_highlight_fontweight":"bold","container_bordercolor":"#efefef","container_backgroundcolor":"#ffffff","container_textcolor":"#686868","container_width":350,"overall_border_radius":7,"iframe_backgroundcolor":"#ffffff","input_bordercolor":"#e2e5ec","input_backgroundcolor":"#ffffff","input_textcolor":"#686868","cta_bordercolor":"#ffffff","cta_backgroundcolor":"#ffffff","cta_textcolor":"#686868","is_spa":false,"use_google_analytics4":false,"use_plausible_analytics":false,"use_google_tag_manager":false,"use_simple_analytics":false,"use_facebook_pixel":false,"cta_display_effect":"none","container_has_shadow":true,"custom_css":null,"device":"desktop","event_name_opened":"BoeiOpened","event_name_conversion":"BoeiConversion","display_actions":{"default":{"disable_on_mobile":false,"attention_grabbers":[{"type":"cta","settings":{"message":"Hi {{name}}! How can we help you today?","display_effect":"none","only_new_visitors":false,"show_close_button":false,"close_after_seconds":0,"start_after_seconds":3}}]},"show_on":"all_pages","page_rules":[]},"use_persistent_load_key":false,"helpers":[{"key":"a0b55014-cf2a-42e4-86da-9ac056c9a3fd","type":"whatsapp","title":"Ik heb een vraag","description":null,"url":"https:\/\/app.boei.help\/goto\/a0b55014-cf2a-42e4-86da-9ac056c9a3fd","options":{"helper_id":27726,"new_window":"true","display_chat_widget":false},"icon_url":null,"interaction_url":"https:\/\/app.boei.help\/interaction\/4c2c0004-5817-41c7-9107-3e2dcb06eb07\/27726","is_highlight":false,"inline_svg_icon":" <svg style=\"margin-left: auto; margin-right: auto;\" width=\"18px\" height=\"18px\" viewBox=\"0 0 123 123\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\"> <linearGradient id=\"linearGradient1\" x1=\"59.915\" y1=\"8.015\" x2=\"60.535\" y2=\"112.54\" gradientUnits=\"userSpaceOnUse\"> <stop offset=\"1e-05\" stop-color=\"#57d163\" stop-opacity=\"1\"\/> <stop offset=\"1\" stop-color=\"#23b33a\" stop-opacity=\"1\"\/> <\/linearGradient> <path id=\"Path\" fill=\"url(#linearGradient1)\" stroke=\"none\" d=\"M 61.183998 0.675003 C 27.451 0.675003 0.018 28.098 0.006001 61.805 C -0.010612 73.31498 3.230623 84.594643 9.355 94.339996 L 10.810001 96.653 L 4.631001 119.210999 L 27.777 113.141998 L 30.012001 114.466003 C 39.399002 120.037003 50.162003 122.983002 61.138 122.988998 L 61.161003 122.988998 C 94.867996 122.988998 122.300995 95.563004 122.313995 61.853996 C 122.365417 45.625504 115.921524 30.051079 104.419006 18.602997 C 92.980278 7.092316 77.41172 0.636597 61.183998 0.675003 Z\"\/> <path id=\"path1\" fill=\"#ffffff\" fill-rule=\"evenodd\" stroke=\"none\" d=\"M 42.772003 31.051003 C 41.393997 27.989998 39.944 27.928001 38.635002 27.875 L 35.111 27.832001 C 33.884998 27.832001 31.893002 28.292 30.209 30.131996 C 28.525002 31.972 23.773998 36.418999 23.773998 45.463997 C 23.773998 54.508995 30.362 63.249001 31.279999 64.476997 C 32.198002 65.705002 43.998001 84.858002 62.684998 92.227005 C 78.213997 98.350998 81.374001 97.132996 84.746002 96.826996 C 88.117996 96.520996 95.623001 92.380005 97.153999 88.087006 C 98.684998 83.793999 98.685997 80.115997 98.226997 79.347 C 97.767998 78.577995 96.542 78.120995 94.702003 77.200996 C 92.862 76.280998 83.824997 71.834 82.139999 71.220001 C 80.455002 70.605995 79.230003 70.300995 78.002998 72.140999 C 76.776001 73.980995 73.257004 78.119995 72.183998 79.347 C 71.111 80.573997 70.040001 80.727997 68.199997 79.808998 C 66.360001 78.889999 60.440002 76.947998 53.416 70.684998 C 47.950996 65.811996 44.262001 59.793999 43.188004 57.955002 C 42.113998 56.115997 43.073997 55.119995 43.996002 54.203995 C 44.820999 53.379997 45.834 52.056999 46.754997 50.984001 C 47.676003 49.910995 47.978996 49.143997 48.591003 47.918999 C 49.203003 46.694 48.898003 45.617996 48.438004 44.698997 C 47.977997 43.779999 44.405998 34.688004 42.772003 31.052002\"\/> <\/svg> "},{"key":"ab1ea2b4-8539-49fb-8e61-d0be61ad5551","type":"call_me_back","title":"Plan een afspraak in","description":null,"url":null,"options":{"helper_id":27725,"label_name":"Naam","gdpr_message":"<p style=\"margin:0;\">I agree with the <a target=\"_blank\" href=\"https:\/\/boei.help\/privacy\">Privacy Policy<\/a>.<\/p>","call_me_back_when":"Hoe laat wil je gebeld worden?","call_me_back_intro":"<p style=\"margin:0;\">Plan een afspraak.<\/p>","call_me_back_phone":"Telefoonnummer","call_me_back_button":"Maak een afspraak","call_me_back_success":"<p style=\"margin:0;\">Great! Your appointment has been setup.<\/p>"},"icon_url":null,"interaction_url":"https:\/\/app.boei.help\/interaction\/4c2c0004-5817-41c7-9107-3e2dcb06eb07\/27725","is_highlight":false,"inline_svg_icon":"<svg style=\"margin-left: auto; margin-right: auto;\" width=\"18px\" height=\"18px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 32 32\"> <mask id=\"hole\"> <rect width=\"100%\" height=\"100%\" fill=\"white\"\/> <g transform=\"translate(4, 4)\"> <path fill=\"black\" d=\"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z\"\/> <\/g> <\/mask> <circle cx=\"16\" cy=\"16\" r=\"16\" fill=\"currentColor\" mask=\"url(#hole)\" \/> <\/svg> "},{"key":"5baa014c-4fc0-49ba-967e-791e018eb024","type":"contact_form","title":"contactformulier","description":null,"url":null,"options":{"helper_id":27724,"label_name":"Name","gdpr_message":"<p style=\"margin:0;\">I agree with the <a target=\"_blank\" href=\"https:\/\/boei.help\/privacy\">Privacy Policy<\/a>.<\/p>","thank_you_page":null,"contact_form_text_send":"Send","contact_form_text_email":"Email","contact_form_text_intro":"<p style=\"margin:0;\">Waar kunnen we je mee helpen?<\/p>","contact_form_text_message":"schrijft een bericht.","contact_form_text_success":"<p style=\"margin:0;\">Bedankt voor je bericht!<\/p>"},"icon_url":null,"interaction_url":"https:\/\/app.boei.help\/interaction\/4c2c0004-5817-41c7-9107-3e2dcb06eb07\/27724","is_highlight":false,"inline_svg_icon":" <svg style=\"margin-left: auto; margin-right: auto;\" width=\"18px\" height=\"18px\" width=\"20px\" height=\"16px\" viewBox=\"0 0 20 16\" version=\"1.1\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\"> <g id=\"Icons\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"> <g id=\"Outlined\" transform=\"translate(-918.000000, -1220.000000)\"> <g id=\"Communication\" transform=\"translate(100.000000, 1162.000000)\"> <g id=\"Outlined-\/-Communication-\/-email\" transform=\"translate(816.000000, 54.000000)\"> <g> <polygon id=\"Path\" points=\"0 0 24 0 24 24 0 24\"><\/polygon> <path d=\"M22,6 C22,4.9 21.1,4 20,4 L4,4 C2.9,4 2,4.9 2,6 L2,18 C2,19.1 2.9,20 4,20 L20,20 C21.1,20 22,19.1 22,18 L22,6 Z M20,6 L12,11 L4,6 L20,6 Z M20,18 L4,18 L4,8 L12,13 L20,8 L20,18 Z\" id=\"\ud83d\udd39-Icon-Color\" fill=\"currentColor\"><\/path> <\/g> <\/g> <\/g> <\/g> <\/g> <\/svg>"},{"key":"fc906046-c7bf-42e8-8694-0ee950bf0a2b","type":"markdown_welcome","title":"Welcome message","description":null,"url":null,"options":{"helper_id":27722,"body":"<p><strong>Team Moyne Roberts<\/strong><\/p>\n<p style=\"margin:0;\">Welkom bij Moyne Roberts {{name}} \ud83d\udc4b<br \/>\nKunnen we je ergens mee helpen?<\/p>","avatar":null,"hide_out_of_office":null},"icon_url":null,"interaction_url":"https:\/\/app.boei.help\/interaction\/4c2c0004-5817-41c7-9107-3e2dcb06eb07\/27722","is_highlight":false}],"button_hover_label":""});