function boeiNormalizeSdkLocale(e){if(!e||"string"!=typeof e)return null;var t=e.replace(/[^a-zA-Z]/g,"").toLowerCase();return t.length>=2?t.slice(0,2):null}function boeiSanitizeCustomMap(e){var t={};return e&&"object"==typeof e?(Object.keys(e).forEach((function(o){var i=e[o];if(null!=i)if("string"==typeof i){if(i.length>500)return void console.warn("[Boei] custom."+o+" dropped: value exceeds 500 char limit ("+i.length+")");t[o]=i}else"number"==typeof i&&isFinite(i)?t[o]=String(i):console.warn("[Boei] custom."+o+" dropped: only string / number values supported (got "+typeof i+")")})),t):t}"undefined"!=typeof module&&module.exports&&(module.exports={boeiNormalizeSdkLocale:boeiNormalizeSdkLocale,boeiSanitizeCustomMap:boeiSanitizeCustomMap});var boeiInstances={};function boeiReservePopup(){if(window.top===window.self)return null;try{return window.open("about:blank","_blank")}catch(e){return null}}function boeiNavigateTopOrPopup(e,t){if(e)if(window.top!==window.self){if(t&&!t.closed)try{return void(t.location.href=e)}catch(e){}var o=null;try{o=window.open(e,"_blank")}catch(e){}if(!o)try{window.top.location.href=e}catch(t){window.location.href=e}}else window.location.href=e}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,this.sdk_custom=boeiSanitizeCustomMap(e.custom),this.sdk_locale=boeiNormalizeSdkLocale(e.locale),this.debug_context=!!e.debug_context;var o=["name","email","phone","company","id","notes","tags","custom"].filter((function(t){var o=e[t];return"custom"===t?o&&"object"==typeof o&&Object.keys(o).length>0:!!o}));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.listenForLeadEvents(),this.listenForChatbotReady(),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_form_phone_id=this.setId("boei_form_phone"),this.dom_form_dropdown1_id=this.setId("boei_dropdown1"),this.dom_form_dropdown2_id=this.setId("boei_dropdown2"),this.dom_form_dropdown3_id=this.setId("boei_dropdown3"),this.dom_form_file1_id=this.setId("boei_file1"),this.dom_form_file2_id=this.setId("boei_file2"),this.dom_form_honeypot_id=this.setId("boei_hp_website"),this.dom_form_success_download_id=this.setId("boei_success_download"),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.launcher_background=e.launcher_background||this.brand_background,this.launcher_textcolor=e.launcher_textcolor||this.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.container_shadow_style=e.container_shadow_style||"dreamy",this.widget_header_enabled=!1!==e.widget_header_enabled,this.widget_header_title=e.widget_header_title||null,this.widget_header_subtitle=e.widget_header_subtitle||null,this.widget_header_image=e.widget_header_image||null;var i=parseInt(e.widget_header_image_size,10);if(this.widget_header_image_size=!i||isNaN(i)?40:Math.min(200,Math.max(1,i)),this.colors_dark=e.colors_dark||null,this.theme_mode=e.theme_mode||null,this._darkModeActive=!1,this.colors_dark&&this.theme_mode){var n=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;if(("dark"===this.theme_mode||"auto"===this.theme_mode&&n)&&this._applyDarkColors(),"auto"===this.theme_mode&&window.matchMedia){var r=this;this._darkModeListener=function(t){t.matches?r._applyDarkColors():r._applyLightColors(e),r._updateLauncherColors()},window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this._darkModeListener)}}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-app.test")||hostname.endsWith("boei.help")||(this.test_mode=!1)),e.font_family&&"inherit"!==e.font_family&&(this.fontfamily=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.listenForLoadKeyUpdates(),this.initializeAfterLoad()};var _darkColorKeys=["container_bordercolor","container_backgroundcolor","container_textcolor","helper_bordercolor","helper_backgroundcolor","helper_textcolor","helper_iconcolor","helper_highlight_bordercolor","helper_highlight_backgroundcolor","helper_highlight_textcolor","helper_highlight_iconcolor","input_bordercolor","input_backgroundcolor","input_textcolor","cta_bordercolor","cta_backgroundcolor","cta_textcolor","brandcolor","brand_background","brandcolor_text","brand_textcolor"];BoeiWidget.prototype._applyDarkColors=function(){if(this.colors_dark){this._darkModeActive=!0;for(var e=0;e<_darkColorKeys.length;e++){var t=_darkColorKeys[e];void 0!==this.colors_dark[t]&&null!==this.colors_dark[t]&&(this[t]=this.colors_dark[t])}}},BoeiWidget.prototype._applyLightColors=function(e){this._darkModeActive=!1;for(var t=0;t<_darkColorKeys.length;t++){var o=_darkColorKeys[t];void 0!==e[o]&&(this[o]=e[o])}this.launcher_background=e.launcher_background||this.brand_background,this.launcher_textcolor=e.launcher_textcolor||this.brandcolor_text},BoeiWidget.prototype._updateLauncherColors=function(){var e=document.getElementById(this.dom_button_id);e&&(e.style.background=this.launcher_background,e.style.color=this.launcher_textcolor)},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.listenForLoadKeyUpdates=function(){var e=this;window.addEventListener("message",(function(t){var o=t.data;o&&"object"==typeof o&&"boei:load_key_updated"===o.type&&o.load_key&&(o.chatbot_id&&e.key&&o.chatbot_id!==e.key||(e.load_key=o.load_key,e.use_persistent_load_key&&(document.cookie="widget_load_key="+o.load_key+"; path=/; max-age=2592000; SameSite=Lax")))}))},BoeiWidget.prototype.getCustomerContextSnapshot=function(){var e={};return this.sdk_name&&(e.name=this.sdk_name),this.sdk_email&&(e.email=this.sdk_email),this.sdk_phone&&(e.phone=this.sdk_phone),this.sdk_company&&(e.company=this.sdk_company),this.sdk_id&&(e.id=this.sdk_id),this.sdk_notes&&(e.notes=this.sdk_notes),this.sdk_locale&&(e.locale=this.sdk_locale),this.tags&&(e.tags=this.tags),this.sdk_custom&&"object"==typeof this.sdk_custom&&Object.keys(this.sdk_custom).length>0&&(e.custom=this.sdk_custom),this.sdk_jwt&&(e.jwt=this.sdk_jwt),e},BoeiWidget.prototype.broadcastCustomerContext=function(e){var t={type:"boei_customer_context",context:this.getCustomerContextSnapshot()};if(e&&"function"==typeof e.postMessage)try{e.postMessage(t,"*")}catch(e){}else for(var o=document.querySelectorAll('iframe[data-boei-chat="1"]'),i=0;i<o.length;i++){var n=o[i];if(-1!==(n.getAttribute("src")||"").indexOf("/p/bot/")){var r=n.contentWindow;if(r)try{r.postMessage(t,"*")}catch(e){}}}},BoeiWidget.prototype.listenForChatbotReady=function(){var e=this;window.addEventListener("message",(function(t){var o=t.data;o&&"object"==typeof o&&"boei_chatbot_ready"===o.type&&e.broadcastCustomerContext(t.source)}))},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){let t=this;t.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());try{this.startEscalationPoller()}catch(e){}if(this.chatOpenCookieName="widget_chat_open_"+this.key,this.use_persistent_load_key){var o=document.cookie.match(new RegExp(this.chatOpenCookieName+"=([^;]+)"));if(o){var i=o[1];setTimeout((function(){t.openBoei(null,"1"!==i?i:null,!0)}),500)}}try{var n=new URLSearchParams(window.location.search).get("open-chat");"1"!==n&&"true"!==n||t.openBoei()}catch(e){}if(!window.__boeiPageChangeInstalled){window.__boeiPageChangeInstalled=!0;var r=function(){for(var e=document.querySelectorAll('iframe[data-boei-chat="1"]'),t=0;t<e.length;t++)try{e[t].contentWindow.postMessage({type:"boei-page-change",url:(window.location.hostname+window.location.pathname).slice(0,500),title:(document.title||"").slice(0,200)},"*")}catch(e){}};window.addEventListener("popstate",r);try{["pushState","replaceState"].forEach((function(e){var t=history[e];"function"==typeof t&&(history[e]=function(){var e=t.apply(this,arguments);return r(),e})}))}catch(e){}}return boeiInstances[e]=this,boeiInstances.default||(boeiInstances.default=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"))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||(console.warn('Boei: installed but not showing on this page. Reason: a page rule with action "hide" matches. Fix: edit or remove the matching rule in the Boei dashboard. Path:',e),!1)}return"specific_pages"!==this.display_actions.show_on||(console.warn('Boei: installed but not showing on this page. Reason: show_on is set to "specific pages" and no page rule matches. Fix: add a matching page rule or switch show_on back to "all pages" in the Boei dashboard. Path:',e),!1)},BoeiWidget.prototype.matchesPageRule=function(e,t){var o;switch(e.match_type){case"exact":o=t===e.path;break;case"starts_with":o=0===t.indexOf(e.path);break;case"contains":o=-1!==t.indexOf(e.path);break;case"ends_with":o=t.slice(-e.path.length)===e.path;break;default:return!1}if(!o)return!1;if(!this._urlParams)try{this._urlParams=new URLSearchParams(window.location.search)}catch(e){this._urlParams={get:function(){return null}}}for(var i=["utm_source","utm_medium","utm_campaign"],n=0;n<i.length;n++){var r=i[n];if(e[r]){var a=this._urlParams.get(r);if(!a||-1===a.toLowerCase().indexOf(String(e[r]).toLowerCase()))return!1}}if(e.referrer_contains&&-1===(document.referrer||"").toLowerCase().indexOf(String(e.referrer_contains).toLowerCase()))return!1;return!0},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.setupGrabberTrigger=function(e,t){var o=this,i=e&&e.trigger_type||"time",n=!1,r=function(){n||o.isBoeiOpen()||(n=!0,t())};if("scroll"===i){var a=e.scroll_percentage||50,s=function(){if(n||o.isBoeiOpen())return window.removeEventListener("scroll",s),void(n=!0);var e=document.documentElement.scrollHeight-window.innerHeight;(e>0?window.scrollY/e*100:0)>=a&&(window.removeEventListener("scroll",s),r())};window.addEventListener("scroll",s,{passive:!0})}else if("exit_intent"===i){if("mobile"===o.device)return;var l=function(e){if(n||o.isBoeiOpen())return document.removeEventListener("mouseleave",l),void(n=!0);e.clientY<10&&(document.removeEventListener("mouseleave",l),r())};document.addEventListener("mouseleave",l)}else if("inactivity"===i){var d=e.inactivity_seconds||30,c=null,p=["mousemove","keydown","scroll","touchstart"],h=function(){clearTimeout(c),p.forEach((function(e){document.removeEventListener(e,u)}))},u=function(){if(n||o.isBoeiOpen())return n=!0,void h();clearTimeout(c),c=setTimeout((function(){h(),r()}),1e3*d)};p.forEach((function(e){document.addEventListener(e,u,{passive:!0})})),u()}else{var _=1e3*(e&&e.start_after_seconds||5);setTimeout(r,_)}},BoeiWidget.prototype.triggerCTA=function(e){if(e&&e.message){var t=this;t.setupGrabberTrigger(e,(function(){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())}))}},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: ${e.getShadow()};\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 r=document.createElement("div");r.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),r.innerHTML=a,e.cta_display_effect){case"typing":r.innerHTML="",e.typeWriter(r,a,50);break;case"fade":r.style.opacity="0",r.style.transition="opacity 1s",setTimeout((()=>{r.style.opacity="1"}),100);break;case"slide":r.style.transform="translateX(-100%)",r.style.transition="transform 0.5s",setTimeout((()=>{r.style.transform="translateX(0)"}),100);break;case"pop":r.style.transform="scale(0)",r.style.transition="transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)",setTimeout((()=>{r.style.transform="scale(1)"}),100);break;case"streaming":r.innerHTML="",e.simulateStreamingMessage(r,a)}if(n.appendChild(r),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.duration_seconds||60),i=e.intensity||"medium",n=e.color||t.glow_color||t.launcher_background||t.brandcolor,r={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"}},a=r[i]||r.medium;t.setupGrabberTrigger(e,(function(){var e=document.getElementById(t.dom_button_id);if(e){var i="boei-glow-style-"+t.key,r=document.getElementById(i);r&&r.remove();var s=document.createElement("style");s.id=i,s.textContent="@keyframes boei_glow_dynamic { from { box-shadow: "+a.from+" "+n+"; } to { box-shadow: "+a.to+" "+n+"; } } .boei-glow-dynamic { animation: boei_glow_dynamic 0.5s infinite alternate; }",document.head.appendChild(s),e.classList.add("boei-glow-dynamic"),setTimeout((function(){e.classList.remove("boei-glow-dynamic");var t=document.getElementById(i);t&&t.remove()}),o)}}))}},BoeiWidget.prototype.triggerBadge=function(e){if(e){var t=this,o=e.count||1;t.setupGrabberTrigger(e,(function(){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 i=document.createTextNode(String(o));e.appendChild(i),e.addEventListener("click",(function(){t.openBoei()})),document.body.appendChild(e)}))}},BoeiWidget.prototype.triggerAutoOpen=function(e){if(e){var t=this;e.only_new_visitors&&!t.isNewVisitor("__auto_open__")||t.setupGrabberTrigger(e,(function(){t.markCtaMessageSeen("__auto_open__"),t.openBoei(null,null,!0)}))}},window.getBoeiInstance=function(e){return boeiInstances[e=e||"default"]};var BOEI_SDK_IDENTITY_KEYS={name:"sdk_name",email:"sdk_email",phone:"sdk_phone",company:"sdk_company",id:"sdk_id",notes:"sdk_notes",locale:"sdk_locale",tags:"tags",custom:"sdk_custom",jwt:"sdk_jwt"};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")}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];if(n){if("function"==typeof i)i(n);else if("object"==typeof i&&null!==i){var r=!1;Object.keys(i).forEach((function(e){if(Object.prototype.hasOwnProperty.call(BOEI_SDK_IDENTITY_KEYS,e)){var t=BOEI_SDK_IDENTITY_KEYS[e];if("custom"===e){var o=boeiSanitizeCustomMap(i[e]),a=n[t]&&"object"==typeof n[t]?n[t]:{};n[t]=Object.assign({},a,o)}else n[t]="locale"===e?boeiNormalizeSdkLocale(i[e]):i[e];r=!0}else n[e]=i[e]})),r&&"function"==typeof n.broadcastCustomerContext&&n.broadcastCustomerContext()}}else window.BQ[o].push(i)},function(){function e(e){var t=boeiInstances.default;if(t)return e(t);window.BQ.default||(window.BQ.default=[]),window.BQ.default.push(e)}window.Boei.open=function(t){e((function(e){e.openBoei(null,t||null)}))},window.Boei.close=function(){e((function(e){e.closeBoei()}))},window.Boei.isOpen=function(){var e=boeiInstances.default;return!!e&&!!e.isBoeiOpen()},window.Boei.hideLauncher=function(){e((function(e){e.hideBoeiButton()}))},window.Boei.showLauncher=function(){e((function(e){e.showBoeiButton()}))},window.Boei.ask=function(t,o){e((function(e){e.askBoei(t,o)}))}}(),BoeiWidget.prototype.hasChatType=function(e){return!!Array.isArray(this.helpers)&&this.helpers.some((function(t){return t.type===e}))},BoeiWidget.prototype.getShadow=function(){var e={none:"none",subtle:"0 1px 2px 0 rgba(0,0,0,0.05)",classic:"rgba(0,0,0,0.1) 0px 1px 3px 0px, rgba(0,0,0,0.06) 0px 1px 2px 0px",elevated:"0 4px 6px -1px rgba(0,0,0,0.07), 0 10px 15px -3px rgba(0,0,0,0.1)",bold:"0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.08)",dreamy:"0px 0px 0px 1px rgba(0,0,0,0.04), 0px 8px 40px rgba(0,0,0,0.07)"};return e[this.container_shadow_style]||e.dreamy},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\n        /* Defensive: host-site CSS often targets bare svg / svg:not(:root)\n           with width/height/overflow (e.g. PrestaShop themes set 300x300, overflow:hidden)\n           which clobbers our icons. Override under widget DOM. */\n        #${this.dom_button_id} svg,\n        [id^="boei_"] svg,\n        .boei-opened svg,\n        .boei-pre-opened svg {\n            overflow: visible !important;\n            max-width: none !important;\n            max-height: none !important;\n            box-sizing: content-box !important;\n        }\n        #${this.dom_button_id} svg[width],\n        [id^="boei_"] svg[width],\n        .boei-opened svg[width],\n        .boei-pre-opened svg[width] {\n            width: revert !important;\n        }\n        #${this.dom_button_id} svg[height],\n        [id^="boei_"] svg[height],\n        .boei-opened svg[height],\n        .boei-pre-opened svg[height] {\n            height: revert !important;\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.launcher_textcolor};\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        touch-action: manipulation;\n    `,r="border-radius: 20px;";"round"==this.shape&&(r="border-radius: 50%;"),"square"==this.shape&&(r="border-radius: 0px;"),n+=r,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.launcher_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 s=document.createElement("span");s.id=`${this.dom_button_id}-image`,s.innerHTML=`<span style="height: ${this.button_icon_size}px; width: ${this.button_icon_size}px; color: ${this.launcher_textcolor}; display: flex; justify-content: center; align-items: center;">${this.icon_svg}</span>`,this.accessibilize("svg",s),s.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(s)}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","contact_form_v2","feedback_form","newsletter_signup","call_me_back","search","youtube_welcome","markdown_welcome","iframe_widget","html","image","markdown","productlift_roadmap","productlift_sidebar","youtube","widget_header","widget_text","widget_divider"];if("container"===this.template&&(i=this.createFormContainer(),i.className="boei-opened "+this.helper_class),this.widget_header_enabled&&this.widget_header_title&&i){var r=document.createElement("div");if(r.style.cssText="display: flex; align-items: center; padding: 16px 20px; background: "+this.helper_highlight_backgroundcolor+"; color: "+this.helper_highlight_textcolor+"; font-family: "+this.fontfamily+"; border-radius: "+this.overall_border_radius+" "+this.overall_border_radius+" 0 0; margin: -20px -20px 12px -20px;",this.widget_header_image){var a=document.createElement("img");a.src=this.widget_header_image;var s=this.widget_header_image_size;a.style.cssText="width: "+s+"px; height: "+s+"px; border-radius: 50%; object-fit: cover; margin-right: 12px; flex-shrink: 0;",r.appendChild(a)}var l=document.createElement("div");l.style.cssText="flex: 1;";var d=document.createElement("div");if(d.style.cssText="font-weight: 600; font-size: "+this.fontsize+"; line-height: 1.3;",d.textContent=this.widget_header_title,l.appendChild(d),this.widget_header_subtitle){var c=document.createElement("div");c.style.cssText="font-size: "+this.fontsize_small+"; opacity: 0.85; line-height: 1.3; margin-top: 2px;",c.textContent=this.widget_header_subtitle,l.appendChild(c)}r.appendChild(l),i.appendChild(r)}let p,h=null,u=null,_=null,m=null;if(this.helpers.forEach((t=>{let n=t.options&&("compact"===t.options.display_style||"icon_only"===t.options.display_style),r=t.options&&"compact_block"===t.options.display_style,a=t.options&&"icon_only"===t.options.display_style,s=t.options&&("inline"===t.options.display_style||"inline_prompt"===t.options.display_style)&&t.options.url,l=["widget_header","widget_text","widget_divider"].includes(t.type);if((n||s||r)&&!l||(m=null),p=!1,u=t.type,_=t.options&&t.options.url,h=l||"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"),(n||r)&&i){h=null!=t.url?document.createElement("a"):document.createElement("button");var d=a?"20px":"16px",c=a?"6px":"6px 7px";if(h.style.cssText="display: inline-flex; align-items: center; gap: 8px; padding: "+c+"; text-decoration: none; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; color: "+this.helper_textcolor+"; background: none; border: none; cursor: pointer; line-height: 1; white-space: nowrap; border-radius: "+this.overall_border_radius+";",a&&(h.title=t.title||""),t.inline_svg_icon){var g=document.createElement("span");g.style.cssText="display: flex; align-items: center; justify-content: center; width: "+d+"; height: "+d+"; flex-shrink: 0; overflow: hidden; color: "+this.helper_iconcolor+";",g.innerHTML=t.inline_svg_icon;var f=g.querySelector("svg");f&&(f.setAttribute("width",d),f.setAttribute("height",d),f.style.maxWidth=d,f.style.maxHeight=d),h.appendChild(g)}else if(t.icon_url){var y=document.createElement("img");y.src=t.icon_url;var b=t.options&&t.options.icon_rounded;y.style.cssText="width: "+d+"; height: "+d+"; flex-shrink: 0; object-fit: "+(b?"cover":"contain")+";"+(b?" border-radius: 50%;":""),this.accessibilize("svg",y),h.appendChild(y)}if(!a){var x=document.createTextNode(t.title||"");h.appendChild(x)}(v=h).addEventListener("mouseover",(function(){v.style.opacity="0.6"}),!1),v.addEventListener("mouseleave",(function(){v.style.opacity="1"}),!1),r||m||(m=document.createElement("div"),m.className="boei-opened",m.style.cssText="display: flex; flex-wrap: wrap; align-items: center; gap: 2px 2px; padding: 2px 4px; box-sizing: border-box; width: 100%;",i.appendChild(m))}var v,w,k,B,C;if(l&&i)return"widget_header"===t.type?(h.style.cssText="display: block; width: 100%; border: 0; background: "+this.container_backgroundcolor+"; color: "+this.container_textcolor+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; font-weight: bold; line-height: 1.3; padding: 10px 10px 4px 10px; margin: 0; box-sizing: border-box;",h.textContent=t.title||""):"widget_text"===t.type?(h.style.cssText="display: block; width: 100%; border: 0; background: "+this.container_backgroundcolor+"; color: "+this.container_textcolor+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize_small+"; line-height: 1.4; padding: 4px 10px; margin: 0; box-sizing: border-box; opacity: 0.7;",h.innerHTML=t.options.body||"",this.revertStylingSubelements(this.helper_id_prefix+o)):"widget_divider"===t.type&&(h.style.cssText="display: block; width: 100%; border: 0; background: transparent; padding: 6px 10px; margin: 0; box-sizing: border-box;",h.innerHTML='<hr style="border: none; border-top: 1px solid '+this.helper_bordercolor+'; margin: 0; opacity: 0.3;">'),h.className="boei-opened "+this.helper_class,h.id=this.helper_id_prefix+o,i.appendChild(h),void o++;if(t.options&&"inline_prompt"===t.options.display_style){var E="boei_chat_started_"+(t.options.bot_key||"");-1!==document.cookie.indexOf(E+"=1")&&(s=!1)}if(s&&i){if(h=document.createElement("div"),"inline_prompt"===t.options.display_style){h.style.cssText="position: static; display: block; width: 100%; box-sizing: border-box; margin: 0 0 5px 0; border: 1px solid "+this.helper_bordercolor+"; border-radius: "+this.overall_border_radius+"; background: "+this.input_backgroundcolor+"; padding: 10px;";var L=document.createElement("div");L.style.cssText="display: flex; align-items: center; gap: 8px;";var I=document.createElement("input");I.type="text",I.placeholder=t.title||"Ask a question...",I.maxLength=250,I.style.cssText="flex: 1; border: none; outline: none; background: transparent; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; color: "+this.input_textcolor+"; line-height: 1; padding: 5px 0; margin: 0; cursor: text;",this.applyPlaceholderStyling("boei_inline_chat_"+o),I.id="boei_inline_chat_"+o,L.appendChild(I);var T=document.createElement("button");if(T.style.cssText="background: "+this.brandcolor+"; border: none; cursor: pointer; padding: 8px; color: "+this.brandcolor_text+"; line-height: 0; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;",t.inline_svg_icon){T.innerHTML='<span style="display: flex; width: 18px; height: 18px; color: '+this.brandcolor_text+';">'+t.inline_svg_icon+"</span>";var W=T.querySelector("svg");W&&(W.setAttribute("width","18"),W.setAttribute("height","18"))}else T.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" viewBox="0 0 16 16"><path d="M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.5.5 0 0 1-.928.086l-2.18-4.36L1.678 8.77a.5.5 0 0 1 .086-.928L16.31.023a.5.5 0 0 1 .544.123z"/></svg>';var S=this,z=function(e,t,o,i){return function(){var n=t.value.trim();if(n){t.value="";var r=e.options.url;r+=(-1!==r.indexOf("?")?"&":"?")+"prefill="+encodeURIComponent(n),e.options._originalUrl=e.options.url,e.options.url=r,S.openIframeWidget(o),e.options.url=e.options._originalUrl,document.cookie=i+"=1; path=/; max-age=604800; SameSite=Lax"}else t.focus()}}(t,I,h,E);return I.addEventListener("keydown",(function(e){"Enter"===e.key&&z()})),T.addEventListener("click",z),L.appendChild(T),h.appendChild(L),h.className="boei-opened "+this.helper_class,h.id=this.helper_id_prefix+o,h.options=t.options,h.helper_key=t.key,i.appendChild(h),setTimeout((function(){I.focus()}),100),void o++}if("search"===t.type){h.style.cssText="display: block; width: 100%; box-sizing: border-box; margin: 0 0 5px 0; border: 1px solid "+this.helper_bordercolor+"; border-radius: "+this.overall_border_radius+"; background: "+this.helper_backgroundcolor+"; padding: 14px 14px;";var A=document.createElement("div");A.style.cssText="display: flex; align-items: center; gap: 10px;";var M=document.createElement("input");M.type="text",M.placeholder=t.options.search_placeholder||t.title||"Search...",M.style.cssText="flex: 1; border: none; outline: none; background: transparent; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; color: "+this.helper_textcolor+"; line-height: 1.2; padding: 0; margin: 0;",M.id="boei_inline_search_"+o,this.applyPlaceholderStyling(M.id),A.appendChild(M);var F=document.createElement("button");if(F.style.cssText="background: "+this.brand_background+"; border: none; cursor: pointer; padding: 6px; color: "+this.brandcolor_text+"; line-height: 0; flex-shrink: 0; border-radius: "+this.overall_border_radius+"; display: flex; align-items: center; justify-content: center;",t.inline_svg_icon){F.innerHTML='<span style="display: flex; width: 18px; height: 18px; color: '+this.brandcolor_text+';">'+t.inline_svg_icon+"</span>";var P=F.querySelector("svg");P&&(P.setAttribute("width","18"),P.setAttribute("height","18"))}else F.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>';var N=(B=t,C=M,function(){var e=C.value.trim();if(e){var t=B.options.reference||"",o=encodeURIComponent(e),i=t.replace(/\{query\}/gi,o).replace(/%7Bquery%7D/gi,o);"true"===B.options.new_window||!0===B.options.new_window?window.open(i,"_blank"):boeiNavigateTopOrPopup(i)}else C.focus()});return M.addEventListener("keydown",(function(e){"Enter"===e.key&&N()})),F.addEventListener("click",N),A.appendChild(F),h.appendChild(A),h.className="boei-opened "+this.helper_class,h.id=this.helper_id_prefix+o,h.options=t.options,h.helper_key=t.key,i.appendChild(h),void o++}var O={contact_form_v2:450,chatbot:500,faq:300}[t.type]||Math.min(parseInt(t.options.iframe_height)||400,500);h.style.cssText="display: block; width: 100%; box-sizing: border-box; margin: 0 0 5px 0; overflow: hidden; border: 1px solid "+this.helper_bordercolor+"; border-radius: "+this.overall_border_radius+"; background: "+this.helper_backgroundcolor+";";var H=document.createElement("iframe");H.style.cssText="width: 100%; height: "+O+"px; border: 0; display: block;";var $=this.replaceVariablesUnescaped(this.replaceLoadKeyPlaceholder(t.options.url));return $+=(-1!==$.indexOf("?")?"&":"?")+"inline=1",this.debug_context&&"chatbot"===t.type&&($+="&debug_context=1"),H.src=$,"chatbot"===t.type&&(H.dataset.boeiChat="1"),H.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"),H.setAttribute("allowfullscreen",""),h.appendChild(H),w=H,k=O,window.addEventListener("message",(function(e){if(e.data&&e.source&&e.source===w.contentWindow){var t=null;"iframeHeight"===e.data.type&&(t=e.data.data&&e.data.data.height||e.data.height),"boei_iframe_resize"===e.data.type&&(t=e.data.data&&e.data.data.height),t&&(w.style.height=Math.min(t,k)+"px")}})),h.className="boei-opened "+this.helper_class,h.id=this.helper_id_prefix+o,h.options=t.options,h.helper_key=t.key,i.appendChild(h),isExcludedFromConversion(t)||this.interactionHelperClicked(t),void o++}if((n||r)&&i||(i?(h.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&&(h.style.lineHeight="1.4")):h.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: "+this.getShadow()+"; 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||(h.style.background=this.container_backgroundcolor,h.style.color=this.container_textcolor,h.style.border="0",h.style.paddingLeft="0"),h.className="boei-opened "+this.helper_class,h.id=this.helper_id_prefix+o,"markdown_welcome"===t.type&&this.revertStylingSubelements(h.id),t.is_highlight&&!n&&(h.style.background=this.helper_highlight_backgroundcolor,h.style.color=this.helper_highlight_textcolor,h.style.borderColor=this.helper_highlight_bordercolor,h.style.fontWeight=this.helper_highlight_fontweight,h.style.borderRadius="5px",this.helper_highlight_backgroundcolor.includes("linear")&&(h.style.border="0")),i&&(1===o&&"markdown_welcome"===t.type&&(h.style.paddingTop=0),o===this.helpers.length&&(h.style.marginBottom=0)),h.options=t.options,h.helper_key=t.key,h.interaction_url=t.interaction_url,n||this.setPosition("helper",h,o),"youtube_welcome"===t.type||"video_welcome"===t.type||"markdown_welcome"===t.type||l||n||(h.style.cursor="pointer",h.addEventListener("mouseover",this.mouseoverBoei.bind(this,h),!1),h.addEventListener("mouseleave",this.mouseoutBoei.bind(this,h),!1)),"youtube_welcome"!==t.type&&"video_welcome"!==t.type||(h.style.background="#000000",h.style.padding="0"),null!=t.options.display_type&&"single_image"===t.options.display_type)h.addEventListener("click",this.openHelperDisplay.bind(this,this.passVariablesToUrl(t.options.image),t.options),!1);else if(null!=t.url&&("phone"===t.type?h.href=t.url:h.href=this.passVariablesToUrl(t.url),h.setAttribute("rel","nofollow")),"new_window"in t.options&&("true"===t.options.new_window||!0===t.options.new_window)){var q=h.href||"";/^(sms|tel|mailto|skype|callto):/i.test(q)||h.setAttribute("target","_blank")}if("chat_botstar"===t.type&&h.addEventListener("click",this.openChatBotstar.bind(this,h),!1),"chat_drift"===t.type&&h.addEventListener("click",this.openChatDrift.bind(this,h),!1),"chat_continually"===t.type&&h.addEventListener("click",this.openChatContinually.bind(this,h),!1),"chat_quriobot"===t.type&&h.addEventListener("click",this.openChatQuriobot.bind(this,h),!1),"chat_liveagent"===t.type&&h.addEventListener("click",this.openChatLiveAgent.bind(this,h),!1),"chat_froged"===t.type&&h.addEventListener("click",this.openChatFroged.bind(this,h),!1),"chat_crisp"===t.type&&h.addEventListener("click",this.openChatCrisp.bind(this,h),!1),"chat_intercom"===t.type&&h.addEventListener("click",this.openChatIntercom.bind(this,h),!1),"chat_tawk"===t.type&&h.addEventListener("click",this.openChatTawk.bind(this,h),!1),"chat_tawk_v2"===t.type&&h.addEventListener("click",this.openChatTawkV2.bind(this,h),!1),"chat_jivochat"===t.type&&h.addEventListener("click",this.openChatJivochat.bind(this,h),!1),"chat_shopify"===t.type&&h.addEventListener("click",this.openChatShopify.bind(this,h),!1),"chat_tidio"===t.type&&h.addEventListener("click",this.openChatTidiochat.bind(this,h),!1),"search"===t.type&&h.addEventListener("click",this.openIframeWidget.bind(this,h),!1),"contact_form"===t.type&&h.addEventListener("click",this.openMailForm.bind(this,h,t),!1),"contact_form_v2"===t.type&&h.addEventListener("click",this.openIframeWidget.bind(this,h),!1),"chatbot"===t.type&&"inline_prompt"===t.options.display_style&&h.addEventListener("click",this.openIframeWidget.bind(this,h),!1),"newsletter_signup"===t.type&&h.addEventListener("click",this.openNewsletterSignupForm.bind(this,h,t),!1),"call_me_back"===t.type&&h.addEventListener("click",this.openCallMeBackForm.bind(this,h,t),!1),"feedback_form"===t.type&&h.addEventListener("click",this.openFeedbackForm.bind(this,h,t),!1),"markdown"===t.type&&h.addEventListener("click",this.openMarkdown.bind(this,h),!1),"html"===t.type&&h.addEventListener("click",this.openHtml.bind(this,h),!1),"youtube_widget"===t.type&&h.addEventListener("click",this.openYoutubeWidget.bind(this,h),!1),"iframe_widget"===t.type&&h.addEventListener("click",this.openIframeWidget.bind(this,h),!1),"productlift_sidebar"===t.type&&h.setAttribute("data-productlift-sidebar",t.options.key),"whatsapp"===t.type&&t.options.display_chat_widget&&(h.addEventListener("click",this.openWhatsAppChatWidget.bind(this,h),!1),p=!0),!isExcludedFromConversion(t)&&!p&&(h.addEventListener("click",this.interactionHelperClicked.bind(this,t),!1),this.use_plausible_analytics)){let e=this.getHelperConversionEventname(t);h.classList.add("plausible-event-name="+e)}if(void 0!==t.options.redirect_on_click&&t.options.redirect_on_click&&h.addEventListener("click",(function(){var e=h.href||"",o="_blank"===h.getAttribute("target"),i=/^(sms|tel|mailto|skype|callto):/i.test(e),n=o||i?null:boeiReservePopup();setTimeout((function(){boeiNavigateTopOrPopup(t.options.redirect_on_click,n)}),i?3e3:1e3)}),!1),n||r);else if("youtube_welcome"===t.type)h.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)h.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),h.appendChild(e),h.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)}else if(t.icon_url){let o=document.createElement("img");o.src=t.icon_url;var D=t.options&&t.options.icon_rounded;o.style="height: 18px; width: 18px; flex-shrink: 0; align-self: center; object-fit: "+(D?"cover":"contain")+";"+(D?" border-radius: 50%;":""),e.appendChild(o)}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),h.style.maxWidth=this.max_width+"px",h.appendChild(e)}if(e===t.key)return h.click(),void(excludeDirectConversion.includes(u)||isChatbotIframe(u,_)||p||this.closeBoei());if(null===e)if(n&&m)m.appendChild(h);else if(r&&i){var R=document.createElement("div");R.className="boei-opened",R.style.cssText="display: flex; padding: 2px 4px; box-sizing: border-box; width: 100%;",R.appendChild(h),i.appendChild(R)}else i?i.appendChild(h):document.body.appendChild(h);this.lastHelperHeight=h.offsetHeight,o++})),this.direct_open_when_one_channel&&2===o&&!e){let e=u&&this.helpers.length>0&&this.helpers[0].options&&"single_image"===this.helpers[0].options.display_type,o=!n.includes(u)&&!p&&!e;t&&o?(i&&!i.parentNode&&document.body.appendChild(i),i||h.parentNode||document.body.appendChild(h),i&&(i.style.opacity="1",i.style.visibility="visible",i.style.transform="translateY(0)"),h.style.opacity="1",h.style.visibility="visible",h.style.transform="translateY(0)"):(h.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: "+this.getShadow()+"; 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()&&!this._isOpeningBoei){this._isOpeningBoei=!0,this.showBoeiButton(),this.animateBoeiButton(),this.boeiOpenedCount++;for(var i=document.getElementsByClassName("boei-pre-opened");i.length>0;)i[0].parentNode.removeChild(i[0]);this.clearUnreadTitle(),this.stopEscalationPollers(),this.clearAllEscalationMarkers(),this.has_background_fade&&this.addBackgroundFade(),this.removeGlow();var n=document.getElementById(this.dom_button_id);n.style.animation="";var r=n.querySelector("span"),a='<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;"><svg xmlns="http://www.w3.org/2000/svg" width="'+Math.round(.6*this.button_icon_size)+'" height="'+Math.round(.6*this.button_icon_size)+'" fill="currentColor" viewBox="0 0 16 16"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/></svg></span>';if(r&&(this._savedButtonImageHTML=r.innerHTML,r.innerHTML=a),null!==this.button_image&&(this._savedButtonBgImage=n.style.backgroundImage,n.style.backgroundImage="none",n.style.backgroundColor=this.brandcolor||"#494949",!r)){var s=document.createElement("span");s.id=this.dom_button_id+"-image",s.innerHTML=a,s.style.cssText="height: 100%; width: 100%; display: flex; justify-content: center; align-items: center;",n.appendChild(s),this._createdCloseSpan=!0}n.removeEventListener("click",this.dom_boei_open_handler,!1),setTimeout((()=>{n.addEventListener("click",this.dom_boei_close_handler,!1)}),350),this.addBoeiOpenedWatermark(),this.showHelpers(t,o),this.interactionButtonClicked(),this._isOpeningBoei=!1}},BoeiWidget.prototype.askBoei=function(e,t){if(e&&"string"==typeof e)if(Array.isArray(this.helpers)){var o,i=function(e){return e&&e.options&&"string"==typeof e.options.url&&-1!==e.options.url.indexOf("/p/bot/")};if((o=t?this.helpers.find((function(e){return e.key===t})):this.helpers.find(i))&&i(o)){var n=o.options.url,r=-1!==n.indexOf("?")?"&":"?";o.options.url=n+r+"prefill="+encodeURIComponent(e),this.isBoeiOpen()?this.openIframeWidget({options:o.options,helper_key:o.key}):this.openBoei(null,o.key),o.options.url=n}else console.warn("Boei.ask: no chatbot channel found"+(t?" with key "+t:""))}else console.warn("Boei.ask: widget has no channels")},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.isFirstPageOfVisit())return!0;let e=this;setTimeout((function(){if(0!==e.boeiOpenedCount)return!1;e.markAutoOpenedThisVisit(),e.openBoei()}),1e3*e.auto_open_after_seconds)},BoeiWidget.prototype.isFirstPageOfVisit=function(){try{var e="boei_auto_opened_"+this.key;return"1"!==sessionStorage.getItem(e)}catch(e){return!this.isReferrerSameDomain()}},BoeiWidget.prototype.markAutoOpenedThisVisit=function(){try{var e="boei_auto_opened_"+this.key;sessionStorage.setItem(e,"1")}catch(e){}},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.showUnreadBadge=function(e){var t=document.getElementById(this.dom_notification_badge_id);if(t)t.textContent=String(e||1);else{var o=document.createElement("div");o.className="boei-pre-opened",o.id=this.dom_notification_badge_id,o.style="background-color: red; z-index: "+(this.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;",this.setPosition("notification_badge",o),o.appendChild(document.createTextNode(String(e||1)));var i=this;o.addEventListener("click",(function(){i.openBoei()})),document.body.appendChild(o)}},BoeiWidget.prototype.hideUnreadBadge=function(){var e=document.getElementById(this.dom_notification_badge_id);e&&e.parentNode&&e.parentNode.removeChild(e)},BoeiWidget.prototype.setUnreadTitle=function(e){try{null==this._savedDocTitle&&(this._savedDocTitle=(document.title||"").replace(/^\(\d+\)\s+/,""));var t=Math.max(1,parseInt(e,10)||1);document.title="("+t+") "+this._savedDocTitle}catch(e){}},BoeiWidget.prototype.clearUnreadTitle=function(){try{null!=this._savedDocTitle&&(document.title=this._savedDocTitle,this._savedDocTitle=null)}catch(e){}},BoeiWidget.ESCALATION_TTL_MS=12e5,BoeiWidget.ESCALATION_POLL_MS=3e4,BoeiWidget.prototype._escalationStorageKey=function(e){return"boei_active_chat_"+e},BoeiWidget.prototype._readEscalationMarker=function(e){try{var t=localStorage.getItem(this._escalationStorageKey(e));if(!t)return null;var o=JSON.parse(t);return o&&o.load_key?o:null}catch(e){return null}},BoeiWidget.prototype.writeEscalationMarker=function(e,t){try{localStorage.setItem(this._escalationStorageKey(e),JSON.stringify(t))}catch(e){}},BoeiWidget.prototype.touchEscalationMarker=function(e,t){var o=this._readEscalationMarker(e);o&&("number"==typeof t&&t>=0&&(o.last_seen_count=t),o.set_at=Date.now(),this.writeEscalationMarker(e,o))},BoeiWidget.prototype.removeEscalationMarker=function(e){try{localStorage.removeItem(this._escalationStorageKey(e))}catch(e){}},BoeiWidget.prototype._chatbotHelpers=function(){return(this.helpers||[]).filter((function(e){return e&&e.options&&"string"==typeof e.options.url&&-1!==e.options.url.indexOf("/p/bot/")}))},BoeiWidget.prototype._extractChatbotKey=function(e){var t=(e||"").match(/\/p\/bot\/([^\/\?#]+)/);return t?t[1]:null},BoeiWidget.prototype.startEscalationPoller=function(){var e=this;this.stopEscalationPollers(),this._escalationPollers=[],this._chatbotHelpers().forEach((function(t){var o=e._extractChatbotKey(t.options.url);if(o){var i=e._readEscalationMarker(o);if(i)if(Date.now()-(i.set_at||0)>BoeiWidget.ESCALATION_TTL_MS)e.removeEscalationMarker(o);else{var n;try{n=new URL(t.options.url,window.location.href).origin}catch(e){return}var r=n+"/api/chatbot-conversations/"+encodeURIComponent(o)+"/"+encodeURIComponent(i.load_key),a=i.last_seen_count||0,s=!1,l=null,d=function(){s=!0,l&&(clearInterval(l),l=null)},c=function(){if(!s){var t=e._readEscalationMarker(o);if(t){if(Date.now()-(t.set_at||0)>BoeiWidget.ESCALATION_TTL_MS)return e.removeEscalationMarker(o),e.hideUnreadBadge(),e.clearUnreadTitle(),void d();if(!e.isBoeiOpen()){var i=t.last_seen_count||0;fetch(r,{credentials:"omit",cache:"no-store"}).then((function(e){return e&&e.ok?e.json():null})).then((function(n){if(!s&&n&&!n.error&&Array.isArray(n.conversation)){for(var r=0,l=0;l<n.conversation.length;l++){var d=n.conversation[l];d&&d.role&&"user"!==d.role&&r++}var c=r-i;c<=0||(r>a&&(t.set_at=Date.now(),e.writeEscalationMarker(o,t),a=r),e.showUnreadBadge(c),e.setUnreadTitle(c))}})).catch((function(){}))}}else d()}};c(),l=setInterval(c,BoeiWidget.ESCALATION_POLL_MS),e._escalationPollers.push(d)}}}))},BoeiWidget.prototype.stopEscalationPollers=function(){this._escalationPollers&&(this._escalationPollers.forEach((function(e){try{e()}catch(e){}})),this._escalationPollers=[])},BoeiWidget.prototype.clearAllEscalationMarkers=function(){var e=this;this._chatbotHelpers().forEach((function(t){var o=e._extractChatbotKey(t.options.url);o&&e.removeEscalationMarker(o)}))},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+"&utm_campaign="+encodeURIComponent(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+"&utm_campaign="+encodeURIComponent(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),this._darkModeListener&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",this._darkModeListener)},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: ${e.getShadow()};\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 r=document.createElement("div");r.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),r.innerHTML=a,e.cta_display_effect){case"typing":r.innerHTML="",e.typeWriter(r,a,50);break;case"fade":r.style.opacity="0",r.style.transition="opacity 1s",setTimeout((()=>{r.style.opacity="1"}),100);break;case"slide":r.style.transform="translateX(-100%)",r.style.transition="transform 0.5s",setTimeout((()=>{r.style.transform="translateX(0)"}),100);break;case"pop":r.style.transform="scale(0)",r.style.transition="transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)",setTimeout((()=>{r.style.transform="scale(1)"}),100);break;case"streaming":r.innerHTML="",e.simulateStreamingMessage(r,a)}if(n.appendChild(r),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 r=0;const a=setInterval((()=>{r=(r+1)%4,n.textContent=".".repeat(r||1)}),300);await new Promise((e=>setTimeout(e,1500))),clearInterval(a),e.removeChild(i),e.innerHTML=t;let s=[],l=[];!function e(t){if(t.nodeType===Node.TEXT_NODE&&""!==t.textContent.trim())s.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<s.length){let t=s[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 r=0,a=0;!function e(){if(r<i.length){let t=i[r];a<t.text.length?(t.node.textContent+=t.text[a],a++,setTimeout(e,o)):(r++,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),r=Math.floor(e%3600/60),a=Math.floor(e%60),s=String(o).padStart(2,"0"),l="";o>0&&(l+=s+"d "),l+=String(n).padStart(2,"0")+"h "+String(r).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)})),setTimeout((function(){e.parentNode&&e.parentNode.removeChild(e)}),400))},BoeiWidget.prototype.closeHelpers=function(){let e=document.querySelectorAll("."+this.helper_class),t=this;e.forEach((function(e){t.removeWithAnimation(e)}))},BoeiWidget.prototype.closeBoei=function(){document.cookie=this.chatOpenCookieName+"=; path=/; max-age=0; SameSite=Lax",this.clearUnreadTitle();let e=document.querySelectorAll(".boei-opened,.boei-pre-opened"),t=this;e.forEach((function(e){if(e.getAttribute&&"1"===e.getAttribute("data-boei-chatbot-iframe")){e.classList.remove("boei-opened"),e.classList.add("boei-hibernated"),e.setAttribute("data-boei-hibernated","1"),e.style.display="none";var o=e.querySelector("iframe");if(o&&o.contentWindow)try{o.contentWindow.postMessage({type:"boei_panel_hidden"},"*")}catch(e){}}else e.id!==t.dom_background_fade_id?t.removeWithAnimation(e):e.remove()}));var o=document.getElementById(this.dom_button_id),i=o?o.querySelector("span"):null;this._createdCloseSpan&&i?(i.remove(),this._createdCloseSpan=!1):i&&this._savedButtonImageHTML&&(i.innerHTML=this._savedButtonImageHTML,this._savedButtonImageHTML=null),o&&void 0!==this._savedButtonBgImage&&(o.style.backgroundImage=this._savedButtonBgImage,o.style.backgroundColor="transparent",this._savedButtonBgImage=void 0),this.animateBoeiButton("reverse"),this.lastHelperMargin=null,this.lastHelperHeight=null,o&&(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: flex; align-items: center; justify-content: center; background-image: none; background-color: #494949; padding: 0; border: 2px solid #ffffff; z-index: "+this.z_index_base+"1; position: fixed; height: 36px; width: 36px; min-height: 36px; min-width: 36px; 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: 18px; width: 18px; display: inline;",t.alt="Close",e.appendChild(t),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: ${this.getShadow()};\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,r,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,r=this.button_margin_x):(a=this.button_margin_y+10,r=this.button_margin_x+this.button_width+30),"trigger_message"!=e&&"watermark_helper"!=e&&"widget"!=e||(i=a,n=r,"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=r-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=r+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=r+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=r+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=r+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(){var e="/"+(window.location.pathname+window.location.search).substr(1).toLowerCase();if(this.hide_on_pages)try{if(new RegExp(this.hide_on_pages).test(e))return console.warn('Boei: installed but not showing on this page. Reason: the URL matches the "hide on pages" regex. Fix: edit or clear the regex in the Boei dashboard. Regex:',this.hide_on_pages,"Path:",e),!1}catch(e){console.warn('Boei: "hide on pages" regex is invalid and was ignored. Fix: correct the regex in the Boei dashboard. Regex:',this.hide_on_pages)}let t=!(!Array.isArray(this.helpers)||0===this.helpers.length);return t||console.warn("Boei: installed but not showing on this page. Reason: no channels are configured on this button. Fix: add at least one channel (chatbot, WhatsApp, email, contact form, etc.) in the Boei dashboard."),!!this.shouldDisplayOnPage()&&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 r=this.sdk_phone||"",a=document.getElementById(this.dom_input_customer_phone_field);null!=a&&a.value&&(r=a.value),r&&(e=e.split("%7B%7Bphone%7D%7D").join(encodeURI(r)));let s=this.sdk_company||"",l=document.getElementById(this.dom_input_customer_company_field);null!=l&&l.value&&(s=l.value),s&&(e=e.split("%7B%7Bcompany%7D%7D").join(encodeURI(s)));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 u=this.tags||"",_=document.getElementById("boei_prefill_customer_tags");return null!=_&&_.value&&(u=_.value),u&&(e=e.split("%7B%7Btags%7D%7D").join(encodeURI(u))),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||"",r=document.getElementById(this.dom_input_customer_email_field);null!=r&&""!==r.value.trim()&&(n=r.value.trim()),e=n?e.replace(/{{email}}/,n):e.replace(/\s*{{email}}\s*/,"");let a=this.sdk_phone||"",s=document.getElementById(this.dom_input_customer_phone_field);null!=s&&""!==s.value.trim()&&(a=s.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||"",u=document.getElementById(this.dom_input_customer_notes_field);null!=u&&""!==u.value.trim()&&(h=u.value.trim()),e=h?e.replace(/{{notes}}/,h):e.replace(/\s*{{notes}}\s*/,"");let _=this.tags||"",m=document.getElementById("boei_prefill_customer_tags");null!=m&&""!==m.value.trim()&&(_=m.value.trim()),e=_?e.replace(/{{tags}}/,_):e.replace(/\s*{{tags}}\s*/,"");let g=this.sdk_locale||"";e=g?e.replace(/{{locale}}/,g):e.replace(/\s*&?locale=\{\{locale\}\}\s*/,"");let f,y,b=(new Date).getHours();return f=b>=6&&b<12?"morning":b>=12&&b<18?"afternoon":b>=18&&b<22?"evening":"night",e=e.replace(/{{greeting}}/,t.en[f]),Object.keys(t).forEach((o=>{let i=new RegExp(`{{greeting:${o}}}`,"g");i.test(e)&&(e=e.replace(i,t[o][f]))})),y="morning"===f?e.match(/{{morning:(.*?)}}/):"afternoon"===f?e.match(/{{afternoon:(.*?)}}/):"evening"===f?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 r=document.createElement("p");if(r.style.cssText="\n        margin-bottom: 20px;\n        line-height: 1.5;\n    ",o.appendChild(i),o.appendChild(n),t)r.textContent=`This is a demo environment. The "${e}" chat will be displayed on your actual website once installed.`,o.appendChild(r);else{r.textContent="We apologize, but our chat service is currently unavailable. Please use an alternative contact method to reach us.",o.appendChild(r);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}`)},"undefined"!=typeof module&&module.exports&&(module.exports={boeiNavigateTopOrPopup:boeiNavigateTopOrPopup,boeiReservePopup:boeiReservePopup}),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"};var excludeDirectConversion=["contact_form","contact_form_v2","feedback_form","newsletter_signup","call_me_back","youtube_welcome","markdown_welcome","widget_header","widget_text","widget_divider","search"];function isChatbotIframe(e,t){var o,i;return"string"==typeof e?(o=e,i=t):(o=e&&e.type,i=e&&e.options&&e.options.url),"iframe_widget"===o&&"string"==typeof i&&-1!==i.indexOf("/p/bot/")}function isExcludedFromConversion(e){return-1!==excludeDirectConversion.indexOf(e.type)||isChatbotIframe(e)}if("undefined"!=typeof module&&module.exports&&(module.exports={excludeDirectConversion:excludeDirectConversion,isChatbotIframe:isChatbotIframe,isExcludedFromConversion:isExcludedFromConversion}),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.sendLeadAnalyticsEvent=function(e){var t=this.event_name_conversion,o=e.email||"",i=e.phone||"",n=e.name||"",r=e.source||"",a=window.location.href;this.use_google_tag_manager&&window.dataLayer&&window.dataLayer.push({event:t,event_type:"lead_collected",lead_email:o,lead_phone:i,lead_name:n,lead_source:r,page_url:a,enhanced_conversion_data:{email:o,phone_number:i}}),this.use_google_analytics4&&"function"==typeof gtag&&gtag("event",t,{event_category:"Boei Interaction",event_type:"lead_collected",lead_email:o,lead_phone:i,lead_name:n,lead_source:r}),this.use_facebook_pixel&&"function"==typeof fbq&&fbq("track","Lead",{content_name:r||"lead_collected",em:o,ph:i,fn:n}),this.use_simple_analytics&&"function"==typeof sa_event&&sa_event(t)},BoeiWidget.prototype.sendChatAnalyticsEvent=function(e,t){if(t=t||{},this.use_google_tag_manager&&window.dataLayer&&"function"==typeof window.dataLayer.push){var o={event:e};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(o[i]=t[i]);window.dataLayer.push(o)}this.use_google_analytics4&&"function"==typeof gtag&&gtag("event",e,Object.assign({event_category:"Boei Interaction"},t)),this.use_facebook_pixel&&"function"==typeof fbq&&fbq("trackCustom",e,t),this.use_simple_analytics&&"function"==typeof sa_event&&sa_event(e)},BoeiWidget.prototype.listenForLeadEvents=function(){var e=this;window.addEventListener("message",(function(t){if(t.data&&t.data.type){if("boei_lead_collected"===t.data.type&&e.sendLeadAnalyticsEvent(t.data.data||{}),"boei_chat_consent_accepted"===t.data.type&&e.sendChatAnalyticsEvent("chat_consent_accepted",t.data.data||{}),"boei_chat_started"===t.data.type&&e.sendChatAnalyticsEvent("chat_started",t.data.data||{}),"boei_chat_escalated"===t.data.type&&e.sendChatAnalyticsEvent("chat_escalated",t.data.data||{}),"boei_chat_assigned"===t.data.type&&e.sendChatAnalyticsEvent("chat_assigned",t.data.data||{}),"boei_form_submitted"===t.data.type){((d=t.data.data||{}).email||d.phone)&&e.sendLeadAnalyticsEvent({email:d.email||"",phone:d.phone||"",name:d.name||"",source:"contact_form"});var o=document.querySelector(".boei-opened");o&&e.createConfetti(o)}if("boei_close_widget"===t.data.type&&e.closeBoei(),"boei_chat_unread"===t.data.type){var i=t.data.data||{};e.showUnreadBadge(i.count||1)}if("boei_chat_read"===t.data.type&&e.hideUnreadBadge(),"boei_set_title_unread"===t.data.type){var n=t.data.data||{};e.setUnreadTitle(n.count||1)}if("boei_clear_title_unread"===t.data.type&&e.clearUnreadTitle(),"boei_chat_escalation_active"===t.data.type){var r=t.data.data||{};r.chatbot_id&&r.load_key&&(e.writeEscalationMarker(r.chatbot_id,{load_key:r.load_key,last_seen_count:r.message_count||0,set_at:Date.now()}),"function"==typeof e.startEscalationPoller&&e.startEscalationPoller())}if("boei_chat_marker_update"===t.data.type){var a=t.data.data||{};a.chatbot_id&&e.touchEscalationMarker(a.chatbot_id,a.message_count)}if("boei_chat_escalation_cleared"===t.data.type){var s=t.data.data||{};s.chatbot_id&&e.removeEscalationMarker(s.chatbot_id)}if("boei_form_redirect"===t.data.type){var l=t.data.data&&t.data.data.url;l&&(e.closeBoei(),boeiNavigateTopOrPopup(l))}var d;if("boei_search_navigate"===t.data.type)(d=t.data.data||{}).url&&(e.closeBoei(),d.new_window?window.open(d.url,"_blank"):boeiNavigateTopOrPopup(d.url))}}))},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 r=document.getElementById(this.dom_input_customer_company_field);null!=r&&(t.prefilled_company=r.value);let a=document.getElementById(this.dom_input_customer_phone_field);null!=a&&(t.prefilled_phone=a.value);let s=document.getElementById(this.dom_input_customer_id_field);null!=s&&(t.prefilled_id=s.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);document.getElementById(this.dom_form_thank_you_page_id)&&(this._pendingRedirectPopup=boeiReservePopup()),o.style.display="block";let n=document.createElement("p");const r=`boei_element_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;n.id=r,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(),(t.email||t.phone)&&this.sendLeadAnalyticsEvent({email:t.email||"",phone:t.phone||"",name:t.name||"",source:t.type||""})):n.style.display="block",o.style.display="none"})).catch((e=>{console.log("Error:",e),n.style.display="block",o.style.display="none"}))},BoeiWidget.prototype.processFormDataMultipart=function(e,t){let o=document.getElementById(this.dom_form_loading_id),i=document.getElementById(this.dom_form_container_id);document.getElementById(this.dom_form_thank_you_page_id)&&(this._pendingRedirectPopup=boeiReservePopup()),o.style.display="block";let n=document.createElement("p");const r=`boei_element_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;n.id=r,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",redirect:"follow",referrerPolicy:"no-referrer",body:t}).then((e=>{if(e.ok){this.displayThankYou();var i=t.get("email"),r=t.get("phone");(i||r)&&this.sendLeadAnalyticsEvent({email:i||"",phone:r||"",name:t.get("name")||"",source:t.get("type")||""})}else 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);if(t){this.closeBoei(),this.createConfetti(o);var i=this._pendingRedirectPopup;this._pendingRedirectPopup=null,boeiNavigateTopOrPopup(t.value,i)}else{e.style.display="block";let t=document.getElementById(this.dom_form_success_download_id);if(t&&t.value){let o=document.createElement("a");o.href=t.value,o.target="_blank",o.rel="noopener noreferrer",o.textContent="Download",o.style="display: inline-block; margin-top: 12px; padding: 8px 16px; background: "+this.brand_background+"; color: "+this.brandcolor_text+"; border-radius: "+this.overall_border_radius+"; text-decoration: none; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; text-align: center;",e.parentNode.insertBefore(o,e.nextSibling)}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,r=i,a=window.innerWidth-i,s=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()*r*.9,c=Math.random()*l*.9-Math.random()*s*.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,o=!0){this.closeHelpers();let i=document.createElement("div");i.className="boei-opened",i.id=this.dom_form_container_id;let n=["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: "+this.getShadow(),"transition: transform .15s ease-in-out","overflow-y: auto"];e&&n.push("border: none"),t&&n.push("background-color: "+this.container_backgroundcolor),i.style=n.join("; "),this.setPosition("widget",i);let r=parseInt(i.style.bottom);if(isNaN(r)&&(r=this.button_height+this.button_margin_y+10),r+=10,i.style.maxHeight=`calc(100vh - ${r}px)`,!o)return i;i.style.position=i.style.position||"fixed";var a=document.createElement("button");a.setAttribute("aria-label","Close"),a.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16" style="width:20px;height:20px;max-width:none;max-height:none;overflow:visible;display:block;"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/></svg>';var s=this.widget_header_title?this.helper_highlight_textcolor:this.container_textcolor,l=this.widget_header_title?"rgba(255,255,255,0.38)":"rgba(0,0,0,0.18)";return a.style="position: absolute; top: 12px; right: 12px; background: transparent; border: none; border-radius: 50%; cursor: pointer; padding: 7px; color: "+s+"; z-index: 1; line-height: 0; display: inline-flex; align-items: center; justify-content: center; transition: background-color 0.15s ease;",a.addEventListener("mouseover",(function(){a.style.backgroundColor=l})),a.addEventListener("mouseout",(function(){a.style.backgroundColor="transparent"})),a.addEventListener("click",this.closeBoei.bind(this),!1),i.appendChild(a),i},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: "+this.getShadow()+"; 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="",r=""){var a=document.createElement("div"),s=document.createElement("input");return s.type=t,s.placeholder=e,s.required=o,s.id=i,s.setAttribute("autocomplete",n),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;"+r,this.applyPlaceholderStyling(i),a.appendChild(s),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,t){let o=document.createElement("div");o.style="width: 100%; box-sizing: border-box; margin-top: 10px; display: flex; align-items: center;";let i=document.createElement("input");i.type="checkbox",i.required=!0,i.id=this.dom_gdpr_consent_checkbox,i.style="margin-right: 8px; flex-shrink: 0; width: auto; appearance: checkbox; -webkit-appearance: checkbox; -moz-appearance: checkbox;",o.appendChild(i);let n=document.createElement("label");if(n.id=this.dom_gdpr_consent_label,this.revertStylingSubelements(n.id),n.setAttribute("for",this.dom_gdpr_consent_checkbox),n.innerHTML=e,t){let e=document.createElement("a");e.href=t,e.target="_blank",e.rel="noopener noreferrer",e.innerHTML=" &#8599;",e.style="color: inherit; text-decoration: underline; margin-left: 4px;",n.appendChild(e)}return n.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;",o.appendChild(n),o},BoeiWidget.prototype.createSelectField=function(e,t,o,i){var n=document.createElement("div"),r=document.createElement("select");r.id=i,r.required=o,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; appearance: auto; -webkit-appearance: auto;";var a=document.createElement("option");if(a.value="",a.textContent=e,a.disabled=!0,a.selected=!0,r.appendChild(a),t)for(var s=t.split(","),l=0;l<s.length;l++){var d=document.createElement("option"),c=s[l].trim();d.value=c,d.textContent=c,r.appendChild(d)}return n.appendChild(r),n},BoeiWidget.prototype.createFileUploadField=function(e,t,o){var i=document.createElement("div");i.style="margin-bottom: 15px;";var n=document.createElement("label");n.style="display: block; width: 100%; box-sizing: border-box; border: 1px dashed "+this.input_bordercolor+"; background-color: "+this.input_backgroundcolor+"; color: "+this.input_textcolor+"; padding: 12px 8px; border-radius: "+this.overall_border_radius+"; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1; text-align: center; cursor: pointer;",n.setAttribute("for",o);var r=document.createElement("span");r.textContent=e,n.appendChild(r);var a=document.createElement("small");a.textContent=" (Max 5MB)",a.style="opacity: 0.6;",n.appendChild(a);var s=document.createElement("span");s.id=o+"_name",s.style="display: block; margin-top: 4px; font-size: 12px; opacity: 0.7;",n.appendChild(s);var l=document.createElement("input");return l.type="file",l.id=o,l.required=t,l.style="display: none;",l.addEventListener("change",(function(){s.textContent=l.files.length?l.files[0].name:""})),i.appendChild(n),i.appendChild(l),i},BoeiWidget.prototype.createHoneypot=function(){var e=document.createElement("div");e.style="position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden;",e.setAttribute("aria-hidden","true");var t=document.createElement("input");return t.type="text",t.id=this.dom_form_honeypot_id,t.name="website_url",t.tabIndex=-1,t.autocomplete="off",e.appendChild(t),e},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.validSelectField=function(e){let t=document.getElementById(e);return!t||(t.value?(t.style.borderColor="",!0):(t.style.borderColor="red",t.focus(),!1))},BoeiWidget.prototype.validFileField=function(e,t){let o=document.getElementById(e);if(!o||!o.files||!o.files.length)return!0;if(o.files[0].size>(t||5242880)){var i=o.parentElement.querySelector("label");return i&&(i.style.borderColor="red"),!1}return!0},BoeiWidget.prototype.validPhoneFieldById=function(e){let t=document.getElementById(e);return!t||(0===t.value.length||(this.validPhoneField(t.value)?(t.style.borderColor="",!0):(t.style.borderColor="red",t.focus(),!1)))},BoeiWidget.prototype.isLowEffortMessage=function(e){if("string"!=typeof e)return!0;var t=e.replace(/\s+/g," ").trim();if(t.length<5)return!0;if(/(.)\1{4,}/u.test(t))return!0;if(!/[\p{L}\p{N}]/u.test(t))return!0;var o=/[\u3130-\u318F\u1100-\u11FF]/.test(t),i=/[\uAC00-\uD7A3]/.test(t);return!(!o||i)},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"),r=document.createElement("input");r.type="tel",r.placeholder=e.options.call_me_back_phone,r.required=!0,r.id=this.dom_call_me_back_phone_id,r.setAttribute("autocomplete","tel"),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;",n.appendChild(r);let a=document.getElementById(this.dom_input_customer_phone_field);if(null!=a&&(r.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 s=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;",s.appendChild(l),i.appendChild(s)}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 r=document.getElementById(this.dom_form_custom1_id);if(null!=r){if(!this.validInputField(this.dom_form_custom1_id,1,180))return t.style.display="block",!1;o.custom1=r.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 s=document.getElementById(this.dom_form_custom3_id);if(null!=s){if(!this.validInputField(this.dom_form_custom3_id,1,180))return t.style.display="block",!1;o.custom3=s.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);if(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)),e.options.success_download_url){let t=document.createElement("input");t.id=this.dom_form_success_download_id,t.type="hidden",t.value=e.options.success_download_url,i.appendChild(t)}if(i.appendChild(this.createParagraph(e.options.contact_form_text_intro)),e.options.contact_form_subtext){let t=document.createElement("p");const o=`boei_element_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;t.id=o,this.revertStylingSubelements(t.id),t.innerHTML=e.options.contact_form_subtext,t.style="padding: 0 0 8px 0; 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; opacity: 0.7;",i.appendChild(t)}i.appendChild(this.createHoneypot());var n=this,r=e.options.optional_fields||[];function a(e){return-1===r.indexOf(e)}for(var s={subject:function(){if(n._hasOption(e.options.label_subject))return n.createInputField(e.options.label_subject,"text",a("subject"),n.dom_form_subject_id)},name:function(){if(n._hasOption(e.options.label_name))return n.createNameField(e.options.label_name)},email:function(){if(n._hasOption(e.options.contact_form_text_email))return n.createEmailField(e.options.contact_form_text_email)},phone:function(){if(n._hasOption(e.options.label_phone))return n.createInputField(e.options.label_phone,"tel",!1,n.dom_form_phone_id,"tel")},custom1:function(){if(n._hasOption(e.options.label_custom1))return n.createInputField(e.options.label_custom1,"text",a("custom1"),n.dom_form_custom1_id)},custom2:function(){if(n._hasOption(e.options.label_custom2))return n.createInputField(e.options.label_custom2,"text",a("custom2"),n.dom_form_custom2_id)},custom3:function(){if(n._hasOption(e.options.label_custom3))return n.createInputField(e.options.label_custom3,"text",a("custom3"),n.dom_form_custom3_id)},custom4:function(){if(n._hasOption(e.options.label_custom4))return n.createInputField(e.options.label_custom4,"text",a("custom4"),n.dom_form_custom4_id)},custom5:function(){if(n._hasOption(e.options.label_custom5))return n.createInputField(e.options.label_custom5,"text",a("custom5"),n.dom_form_custom5_id)},dropdown1:function(){if(n._hasOption(e.options.label_dropdown1))return n.createSelectField(e.options.label_dropdown1,e.options.dropdown1_options||"",a("dropdown1"),n.dom_form_dropdown1_id)},dropdown2:function(){if(n._hasOption(e.options.label_dropdown2))return n.createSelectField(e.options.label_dropdown2,e.options.dropdown2_options||"",a("dropdown2"),n.dom_form_dropdown2_id)},dropdown3:function(){if(n._hasOption(e.options.label_dropdown3))return n.createSelectField(e.options.label_dropdown3,e.options.dropdown3_options||"",a("dropdown3"),n.dom_form_dropdown3_id)},custom_textarea1:function(){if(n._hasOption(e.options.label_custom_textarea1))return n.createTextareaField(e.options.label_custom_textarea1,a("custom_textarea1"),n.dom_form_custom_textarea1_id)},custom_textarea2:function(){if(n._hasOption(e.options.label_custom_textarea2))return n.createTextareaField(e.options.label_custom_textarea2,a("custom_textarea2"),n.dom_form_custom_textarea2_id)},file1:function(){if(n._hasOption(e.options.label_file1))return n.createFileUploadField(e.options.label_file1,!1,n.dom_form_file1_id)},file2:function(){if(n._hasOption(e.options.label_file2))return n.createFileUploadField(e.options.label_file2,!1,n.dom_form_file2_id)},message:function(){if(n._hasOption(e.options.contact_form_text_message))return n.createTextareaField(e.options.contact_form_text_message,a("message"),n.dom_form_message_id)}},l=e.options.field_order||["subject","name","email","phone","custom1","custom2","custom3","custom4","custom5","dropdown1","dropdown2","dropdown3","custom_textarea1","custom_textarea2","file1","file2","message"],d=0;d<l.length;d++){var c=s[l[d]];if(c){var p=c();p&&i.appendChild(p)}}void 0!==e.options.gdpr_message&&""!==e.options.gdpr_message&&null!=e.options.gdpr_message&&i.appendChild(this.createGDPRCheckbox(e.options.gdpr_message,e.options.gdpr_link||null));let h=this.createSubmitButton(e.options.contact_form_text_send);i.appendChild(h),h.addEventListener("click",this.sendMailForm.bind(this,h),!1),h.addEventListener("click",this.interactionHelperClicked.bind(this,t),!1),this.addAnalyticsClass(h,t),o.appendChild(i),o.appendChild(this.createLoading()),o.appendChild(this.createSuccessMessage(e.options.contact_form_text_success)),document.body.appendChild(o)},BoeiWidget.prototype._hasOption=function(e){return void 0!==e&&""!==e&&null!=e},BoeiWidget.prototype.sendMailForm=function(e){var t=document.getElementById(this.dom_contact_form_id);t.style.display="none";var o=document.getElementById(this.dom_form_honeypot_id);if(o&&o.value)return this.displayThankYou(),!1;let i={type:"contact_form",helper_id:document.getElementById(this.dom_form_helper_id).value,page_info:this.getPageInfo()},n=!1,r=document.getElementById(this.dom_form_subject_id);if(null!=r){if(r.required&&!this.validInputField(this.dom_form_subject_id,2,100))return t.style.display="block",!1;r.value&&(i.subject=r.value)}let a=document.getElementById(this.dom_form_name_id);if(null!=a){if(!this.validNameField())return t.style.display="block",!1;i.name=a.value}let s=document.getElementById(this.dom_form_email_id);if(null!=s){if(!this.validEmailField())return t.style.display="block",!1;i.email=s.value}let l=document.getElementById(this.dom_form_phone_id);if(null!=l&&l.value){if(!this.validPhoneFieldById(this.dom_form_phone_id))return t.style.display="block",!1;i.phone=l.value}let d=document.getElementById(this.dom_form_custom1_id);if(null!=d){if(d.required&&!this.validInputField(this.dom_form_custom1_id,1,180))return t.style.display="block",!1;d.value&&(i.custom1=d.value)}let c=document.getElementById(this.dom_form_custom2_id);if(null!=c){if(c.required&&!this.validInputField(this.dom_form_custom2_id,1,180))return t.style.display="block",!1;c.value&&(i.custom2=c.value)}let p=document.getElementById(this.dom_form_custom3_id);if(null!=p){if(p.required&&!this.validInputField(this.dom_form_custom3_id,1,180))return t.style.display="block",!1;p.value&&(i.custom3=p.value)}let h=document.getElementById(this.dom_form_custom4_id);if(null!=h){if(h.required&&!this.validInputField(this.dom_form_custom4_id,1,180))return t.style.display="block",!1;h.value&&(i.custom4=h.value)}let u=document.getElementById(this.dom_form_custom5_id);if(null!=u){if(u.required&&!this.validInputField(this.dom_form_custom5_id,1,180))return t.style.display="block",!1;u.value&&(i.custom5=u.value)}let _=document.getElementById(this.dom_form_dropdown1_id);if(null!=_){if(_.required&&!this.validSelectField(this.dom_form_dropdown1_id))return t.style.display="block",!1;_.value&&(i.dropdown1=_.value)}let m=document.getElementById(this.dom_form_dropdown2_id);if(null!=m){if(m.required&&!this.validSelectField(this.dom_form_dropdown2_id))return t.style.display="block",!1;m.value&&(i.dropdown2=m.value)}let g=document.getElementById(this.dom_form_dropdown3_id);if(null!=g){if(g.required&&!this.validSelectField(this.dom_form_dropdown3_id))return t.style.display="block",!1;g.value&&(i.dropdown3=g.value)}let f=document.getElementById(this.dom_form_custom_textarea1_id);null!=f&&(i.custom_text1=f.value);let y=document.getElementById(this.dom_form_custom_textarea2_id);null!=y&&(i.custom_text2=y.value);let b=document.getElementById(this.dom_form_file1_id);if(null!=b&&b.files&&b.files.length){if(!this.validFileField(this.dom_form_file1_id,5242880))return t.style.display="block",!1;n=!0}let x=document.getElementById(this.dom_form_file2_id);if(null!=x&&x.files&&x.files.length){if(!this.validFileField(this.dom_form_file2_id,5242880))return t.style.display="block",!1;n=!0}let v=document.getElementById(this.dom_form_message_id);if(null!=v){if(v.required&&v.value.length<5)return v.style.borderColor="red",v.focus(),t.style.display="block",!1;v.style.borderColor="",v.value&&(i.message=v.value)}if(!this.validGDPRCheckbox())return t.style.display="block",!1;if(i.gdpr_checked="Checked",n){var w=new FormData;for(var k in i)i.hasOwnProperty(k)&&("object"!=typeof i[k]||i[k]instanceof File?w.append(k,i[k]):w.append(k,JSON.stringify(i[k])));b&&b.files&&b.files.length&&w.append("file_upload_1",b.files[0]),x&&x.files&&x.files.length&&w.append("file_upload_2",x.files[0]),this.processFormDataMultipart(this.send_form_to_url,w)}else this.processFormData(this.send_form_to_url,i)},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 r=document.createElement("div"),a=e.options.feedback_type||"1-5",s=this;if("1-10"===a){r.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,r.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(){s.clickFeedbackImage(this,e.toString())}),!1)}}else if("happy-sad"===a){r.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),r.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(){s.clickFeedbackImageHappySad(this,e.name,e.color)}),!1)}))}else r.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),r.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(){s.clickFeedbackImage(this,e.name)}),!1)}));n.appendChild(r),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 r=document.getElementById(this.dom_feedback_comment_id);if(null!=r&&r.value.length>0){if(!this.validInputField(this.dom_feedback_comment_id,2,5e3))return t.style.display="block",!1;o.comment=r.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)}if(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){this.use_persistent_load_key&&(document.cookie=this.chatOpenCookieName+"="+(e.helper_key||"1")+"; path=/; max-age=86400; SameSite=Lax");var t=e.options&&"string"==typeof e.options.url&&-1!==e.options.url.indexOf("/p/bot/"),o=this.dom_iframe_container_id+"_"+e.options.helper_id,i=t?document.getElementById(o):null;if(i&&"1"===i.getAttribute("data-boei-hibernated")){this.closeHelpers(),i.classList.remove("boei-hibernated"),i.classList.add("boei-opened"),i.removeAttribute("data-boei-hibernated"),i.style.display="";var n=i.querySelector("iframe");if(n&&n.contentWindow)try{n.contentWindow.postMessage({type:"boei_panel_visible"},"*")}catch(e){}return}let r=this.createFormContainer(!0,!0,!1);r.id=o,r.style.padding="0",r.style.boxSizing="border-box",t&&r.setAttribute("data-boei-chatbot-iframe","1");const a=window.visualViewport?window.visualViewport.width:window.innerWidth,s=(window.visualViewport?window.visualViewport.height:window.innerHeight,/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream),l="desktop"===this.device,d=a<860&&!l;if(d||e.options.iframe_width&&"100%"===e.options.iframe_width)r.style.width="100%",r.style.maxWidth="100%",r.style.left="0",r.style.right="0",r.style.height="100%",r.style.maxHeight="100%",r.style.top="0",r.style.bottom="0",r.style.borderRadius="0",r.style.border="none",r.style.boxShadow="none",r.classList.add("boei-mobile-fullscreen"),this.currentFullscreenWidget=r,this.isBoeiOpen()||this.openBoei();else{let t,o;t=this.button_margin_x+this.button_width+40+20,o=this.button_margin_y+20,r.style.maxWidth=e.options.iframe_width?e.options.iframe_width:"800px",r.style.width="100%",r.style.height=e.options.iframe_height?e.options.iframe_height:"450px","function"==typeof this.setPosition&&this.setPosition("widget",r)}s&&d&&(this.addSafeAreaStyles(),r.style.paddingTop="env(safe-area-inset-top, 0px)",r.style.paddingBottom="env(safe-area-inset-bottom, 0px)",r.style.paddingLeft="env(safe-area-inset-left, 0px)",r.style.paddingRight="env(safe-area-inset-right, 0px)");const c=document.createElement("div");c.style.position="relative",c.style.display="block",c.style.width="100%",c.style.height="100%",c.style.padding="0",c.style.overflow="hidden";const p=document.createElement("iframe");p.style.width="100%",p.style.height="100%",p.style.border="0",p.style.boxSizing="border-box";var h=this.replaceVariablesUnescaped(this.replaceLoadKeyPlaceholder(e.options.url)),u=(window.location.hostname+window.location.pathname).slice(0,500),_=(document.title||"").slice(0,200),m=-1===h.indexOf("?")?"?":"&";if(p.src=h+m+"page_url="+encodeURIComponent(u)+"&page_title="+encodeURIComponent(_)+(this.debug_context?"&debug_context=1":""),p.dataset.boeiChat="1",p.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"),p.setAttribute("allowfullscreen",""),c.appendChild(p),r.appendChild(c),d&&(r.style.animation="none",this.applyMobileFullscreenStyles(r)),document.body.appendChild(r),d){var g=e.options&&e.options.url||"";if(!/\/p\/(bot|faq|form|search)\//.test(g)){var f=document.createElement("button");f.className="boei-opened",f.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" viewBox="0 0 16 16"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/></svg>',f.style="position: fixed; top: 12px; right: 12px; background: rgba(0,0,0,0.3); border: none; cursor: pointer; padding: 8px; color: #fff; z-index: 1000001; line-height: 0; border-radius: 50%;",f.addEventListener("click",this.closeBoei.bind(this),!1),document.body.appendChild(f)}}},!BoeiWidget.prototype.__iframeWidgetPatched){BoeiWidget.prototype.__iframeWidgetPatched=!0;const e=BoeiWidget.prototype.closeBoei;BoeiWidget.prototype.closeBoei=function(t,o){return this.currentFullscreenWidget&&this.closeFullscreenWidget(),e.call(this,t,o)};const t=BoeiWidget.prototype.setPosition;BoeiWidget.prototype.setPosition=function(e,o,i=null){if(t.call(this,e,o,i),"widget"===e&&window.innerWidth<860){/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&(this.addSafeAreaStyles(),"top_left"!==this.position&&"top_right"!==this.position||(o.style.top="calc("+o.style.top+" + env(safe-area-inset-top, 44px))"),"bottom_left"!==this.position&&"bottom_right"!==this.position||(o.style.bottom="calc("+o.style.bottom+" + env(safe-area-inset-bottom, 34px))"))}}}BoeiWidget.prototype.closeFullscreenWidget=function(){document.cookie=this.chatOpenCookieName+"=; path=/; max-age=0; SameSite=Lax",this.currentFullscreenWidget&&this.currentFullscreenWidget._boeiViewportCleanup&&this.currentFullscreenWidget._boeiViewportCleanup();for(var e=document.querySelectorAll("[data-boei-blurred]"),t=0;t<e.length;t++)e[t].style.filter="",e[t].removeAttribute("data-boei-blurred");this.currentFullscreenWidget&&this.currentFullscreenWidget.parentNode&&(this.currentFullscreenWidget.parentNode.removeChild(this.currentFullscreenWidget),this.currentFullscreenWidget=null),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";for(var t=document.body.children,o=0;o<t.length;o++)t[o]===e||t[o].classList.contains("boei-mobile-fullscreen")||(t[o].style.filter="blur(10px)",t[o].setAttribute("data-boei-blurred","1"));var i=e.querySelector("iframe");if(i&&window.visualViewport){var n=function(){var t=window.visualViewport;e.style.setProperty("top",t.offsetTop+"px","important"),e.style.setProperty("bottom","auto","important"),e.style.setProperty("height",t.height+"px","important"),e.style.setProperty("max-height",t.height+"px","important"),i.contentWindow.postMessage({type:"boei-viewport-resize",height:t.height,offsetTop:t.offsetTop},"*")};window.visualViewport.addEventListener("resize",n),window.visualViewport.addEventListener("scroll",n),e._boeiViewportCleanup=function(){window.visualViewport.removeEventListener("resize",n),window.visualViewport.removeEventListener("scroll",n)}}const r=e.querySelector("div");r&&(r.style.overflow="auto",r.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 r=document.getElementById(this.dom_form_company_id);if(null!=r){if(this.helper.options.label_company&&r.value.length<2)return r.style.borderColor="red",r.focus(),t.style.display="block",!1;r.style.borderColor="",o.company=r.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.openSearchForm=function(e,t){var o=this;let i=this.createFormContainer();t.options.search_intro&&i.appendChild(this.createParagraph(t.options.search_intro));let n=document.createElement("div");n.style="display: flex; align-items: stretch; border: 1px solid "+this.input_bordercolor+"; border-radius: "+this.overall_border_radius+"; overflow: hidden; background-color: "+this.input_backgroundcolor+";";let r="boei_search_input_"+Date.now(),a=document.createElement("input");a.type="text",a.id=r,a.required=!0,a.placeholder=t.options.search_placeholder||"Search...",a.autocomplete="off",a.style="flex: 1; border: none; background: transparent; color: "+this.input_textcolor+"; padding: 8px 12px; font-family: "+this.fontfamily+"; font-size: "+this.fontsize+"; line-height: 1; outline: none; text-decoration: none; font-weight: normal; letter-spacing: normal; text-transform: none; box-sizing: border-box;",n.appendChild(a),this.applyPlaceholderStyling(r);let s=document.createElement("button");s.innerHTML='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 14L14.71 14L14.43 13.73C15.41 12.59 16 11.11 16 9.5C16 5.91 13.09 3 9.5 3C5.91 3 3 5.91 3 9.5C3 13.09 5.91 16 9.5 16C11.11 16 12.59 15.41 13.73 14.43L14 14.71V15.5L19 20.49L20.49 19L15.5 14ZM9.5 14C7.01 14 5 11.99 5 9.5C5 7.01 7.01 5 9.5 5C11.99 5 14 7.01 14 9.5C14 11.99 11.99 14 9.5 14Z" fill="currentColor"/></svg>',s.style="display: flex; align-items: center; justify-content: center; border: none; background: "+this.brandcolor+"; color: "+this.brandcolor_text+"; padding: 8px 12px; cursor: pointer; flex-shrink: 0; transition: opacity 0.15s;",s.addEventListener("mouseover",(function(){s.style.opacity="0.85"})),s.addEventListener("mouseout",(function(){s.style.opacity="1"})),n.appendChild(s),i.appendChild(n);let l=t.options.reference||"",d="true"===t.options.new_window||!0===t.options.new_window;function c(){var e=a.value.trim();if(e){var i=encodeURIComponent(e),n=l.replace(/\{query\}/gi,i).replace(/%7Bquery%7D/gi,i);o.interactionHelperClicked(t),d?window.open(n,"_blank"):boeiNavigateTopOrPopup(n)}}s.addEventListener("click",c,!1),a.addEventListener("keydown",(function(e){"Enter"===e.key&&(e.preventDefault(),c())}),!1),this.addAnalyticsClass(s,t),document.body.appendChild(i)},BoeiWidget.prototype.openWhatsAppChatWidget=function(e){if(this._darkModeActive&&this.colors_dark){var t=this.colors_dark,o=e.options;(e=Object.assign({},e)).options=Object.assign({},o,{header_background:t.brandcolor||o.header_background,header_text_color:t.brand_textcolor||o.header_text_color,chat_area_background:t.container_backgroundcolor||o.chat_area_background,chat_message_background:t.helper_backgroundcolor||o.chat_message_background,intro_text_color:t.container_textcolor||o.intro_text_color,chat_input_area_background:t.input_backgroundcolor||o.chat_input_area_background,submit_background:t.brandcolor||o.submit_background,submit_text_color:t.brand_textcolor||o.submit_text_color,quick_button_background:t.helper_backgroundcolor||o.quick_button_background,quick_button_text_color:t.helper_textcolor||o.quick_button_text_color,quick_button_border_color:t.helper_bordercolor||o.quick_button_border_color})}let i=this.createFormContainer(!1,!1,!1);i.id=this.dom_whatsapp_chat_container_id+"_"+e.options.helper_id,i.style.overflow="hidden",i.style.padding="0",i.style.display="flex",i.style.flexDirection="column";let n=document.createElement("div");n.style.padding="20px",n.style.background=e.options.header_background,n.style.color=e.options.header_text_color,n.style.display="flex",n.style.alignItems="center",n.style.flexShrink="0";let r=document.createElement("img");r.src=e.options.avatar,r.style.width="40px",r.style.height="40px",r.style.borderRadius="50%",r.style.marginRight="20px";let a=document.createElement("div"),s=document.createElement("div");s.textContent=e.options.business_name,s.style.fontWeight="bold",s.style.marginBottom="5px";let l=document.createElement("div");l.textContent=e.options.online_text,l.style.fontSize="12px",l.style.fontStyle="italic",a.appendChild(s),a.appendChild(l);var d=document.createElement("button");d.setAttribute("aria-label","Close"),d.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/></svg>',d.style="background: transparent; border: none; border-radius: 50%; cursor: pointer; padding: 7px; color: "+(e.options.header_text_color||"#fff")+"; line-height: 0; margin-left: auto; display: inline-flex; align-items: center; justify-content: center; transition: background-color 0.15s ease;",d.addEventListener("mouseover",(function(){d.style.backgroundColor="rgba(255,255,255,0.38)"})),d.addEventListener("mouseout",(function(){d.style.backgroundColor="transparent"})),d.addEventListener("click",this.closeBoei.bind(this),!1),n.appendChild(r),n.appendChild(a),n.appendChild(d);let c=document.createElement("div");c.style.background=e.options.chat_area_background||"#f0f2f5",c.style.padding="20px",c.style.paddingTop="20px",c.style.paddingBottom="20px",c.style.flex="1",c.style.overflowY="auto",c.style.display="flex",c.style.flexDirection="column";let p=document.createElement("div");p.style.padding="10px",p.style.background=e.options.chat_message_background,p.style.margin="0 0 20px 0",p.style.borderRadius="10px",p.style.maxWidth="80%",p.style.position="relative",p.style.boxShadow="0 1px .5px rgba(0,0,0,.13)";let h=document.createElement("div");h.textContent=e.options.support_agent_name,h.style.fontSize="12px",h.style.fontWeight="bold",h.style.marginBottom="10px",h.style.color=e.options.intro_text_color;let u=document.createElement("div");u.style.display="flex",u.style.alignItems="center",u.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",u.appendChild(t)}let _=document.createElement("div");_.textContent=e.options.intro_message,_.style.color=e.options.intro_text_color,_.style.display="none";let m=document.createElement("div");m.style.fontSize="12px",m.style.textAlign="right",m.style.marginTop="5px";let g=document.createElement("span");g.innerHTML="&#10004;&#10004;",g.style.color="#4fc3f7",g.style.marginRight="5px";let f=document.createElement("span");f.textContent=(new Date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),f.style.color=e.options.intro_text_color,m.appendChild(g),m.appendChild(f),p.appendChild(h),p.appendChild(u),p.appendChild(_),p.appendChild(m);let y=null;if(e.options.quick_buttons&&e.options.quick_buttons.length>0){y=document.createElement("div"),y.style.padding="0",y.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"):boeiNavigateTopOrPopup(i),e.options.text=t,this.interactionHelperClicked(e),setTimeout((()=>{this.closeBoei()}),500)}}.bind(this)),t.appendChild(n)})),y.appendChild(t)}let b=document.createElement("div");b.style.cssText=`\n        padding: 20px;\n        background: ${e.options.chat_input_area_background||"#ffffff"};\n        flex-shrink: 0;\n    `;let x=!0===e.options.use_input_message||"true"===e.options.use_input_message;if(x){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),b.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),b.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"})),b.insertBefore(o,t),b.insertBefore(i,t)}}let v=document.createElement("a"),w=document.createTextNode(e.options.start_chat_text);v.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: "+this.getShadow()+"; font-weight: normal; letter-spacing: normal; text-transform: none;",v.appendChild(w),x?(v.href="#",v.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),r=document.getElementById("whatsapp_message_error_"+e.options.helper_id),a=document.getElementById("whatsapp_name_input_"+e.options.helper_id),s=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=s?s.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")),this.isLowEffortMessage(d))return r&&(r.textContent=e.options.message_required_text||"Please describe how we can help you (at least 5 characters).",r.style.display="block"),void(n&&n.focus());r&&(r.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 u=`${this.send_form_to_url}?${h.toString()}`;!("new_window"in e.options)||"true"!==e.options.new_window&&!0!==e.options.new_window?boeiNavigateTopOrPopup(u):window.open(u,"_blank"),this.interactionHelperClicked(e),setTimeout((()=>{this.closeBoei()}),500)}),!1)):(v.href=this.passVariablesToUrl(e.options.submit_url),!("new_window"in e.options)||"true"!==e.options.new_window&&!0!==e.options.new_window?v.setAttribute("target","_top"):v.setAttribute("target","_blank"),v.addEventListener("click",this.interactionHelperClicked.bind(this,e),!1)),this.addAnalyticsClass(v,e),v.addEventListener("mouseover",this.mouseoverBoei.bind(this,v),!1),v.addEventListener("mouseout",this.mouseoutBoei.bind(this,v),!1),v.style.background=e.options.submit_background,v.style.color=e.options.submit_text_color,b.appendChild(v),c.appendChild(p),y&&c.appendChild(y),i.appendChild(n),i.appendChild(c),i.appendChild(b),document.body.appendChild(i);let k=document.createElement("style");k.textContent="\n        @keyframes loadingAnimation {\n            0%, 80%, 100% { transform: scale(0); }\n            40% { transform: scale(1); }\n        }\n    ",document.head.appendChild(k),setTimeout((()=>{u.style.display="none",_.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),r=t?t.value.trim():"",a=o?o.value.trim():"",s=i?i.value.trim():"";if(!r)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:r};a&&(l.name=a),s&&(l.email=s);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"):boeiNavigateTopOrPopup(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":"ff4c04a9-2ade-4dde-b08e-75b2cb888873","icon_svg":" <svg style=\"margin-left: auto; margin-right: auto;\" width=\"32px\" height=\"32px\" fill=\"currentColor\" 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=widget&utm_medium=poweredby_button&utm_content=4c2c0004-5817-41c7-9107-3e2dcb06eb07","watermark_url_helper":"https:\/\/boei.help\/?utm_source=widget&utm_medium=poweredby_button&utm_content=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","launcher_background":null,"launcher_textcolor":null,"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,"container_shadow_style":"classic","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,"theme_name":null,"theme_mode":null,"theme_branded_header":null,"theme_gradient":null,"colors_dark":null,"widget_header_enabled":true,"widget_header_title":null,"widget_header_subtitle":null,"widget_header_image":null,"widget_header_image_size":null,"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\" fill=\"currentColor\" 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\" fill=\"currentColor\" 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\" fill=\"currentColor\" 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":""});