!function(){var e={16432:function(e,t){t.config={type:"production",cdn:{enabled:{forAssets:!1,forApi:!1},assets:"assetscdn-",api:"apicdn-",domain:{production:"wchat.freshchat.com"},subDomain:"",protocol:{production:"https://"}}}}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}n.p="https://assetscdn-wchat.freshchat.com/static/assets/",function(){"use strict";var e={SAMPLE_TOKEN:"WEB_CHAT_TOKEN",frameDivId:"fc_frame",frameId:"fc_widget",pushFrameDivId:"fc_push_frame",pushFrameId:"fc_push",modalDivId:"fc_web_modal",classes:{fullscreenClass:"fc-widget-fullscreen"},FAQ_EXPAND_WIDTH:835,AJAX_URL:{canary:"/app/services/app/webchat/{token}/canary"},canaryRoutes:{feature:"canary",rts:"rtscanary"},config:{model:"config",url:"/app/services/app/webchat/{token}/config?domain={domainName}"},impostor:{getFreshChatConfigs:"get_freshchat_configs",activityEvents:["click","dblclick","mousemove","mouseover","mousewheel","mouseout","contextmenu","mousedown","mouseup","touchstart","touchmove","touchend","touchcancel","keydown","keypress","keyup","focus","blur","change","submit","scroll","resize"],timeoutForFetchingConfigInMillis:3e3,tagName:"freshchat-widget"},eagerLoadBetaFeature:"EAGER_LOAD_ENABLED"};var t=function(){!function(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}(this,undefined);var e=!1,t=!1,n=!1,i=!1,o=[],a={};return{isLoaded:function(){return e},loaded:function(t){e=t},isInitialized:function(){return t},initialized:function(e){t=e},isOpened:function(){return n},opened:function(e){n=e},doOpen:function(){return i},openOnLoad:function(e){i=e},getTags:function(){return o},setTags:function(e){o=e},getFaqTags:function(){return a},setFaqTags:function(e){a=e},reset:function(){e=!1,t=!1,n=!1,i=!1,o=[],a={}}}}.bind(void 0)();function i(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}var o=function(){i(this,undefined);var e=null,t=null,n=null,o=null,a=null,r=!1,s=null,d=null,c={},l={},u={},f=["firstName","lastName","email","phone","phoneCountry","locale"];return{getIntegrations:function(){return c},getcampaignRuleIds:function(){return d},setcampaignRuleIds:function(e){d=e},setIntegrations:function(e){c=e},getFlowId:function(){return n},setFlowId:function(e){n=e},getFlowVersionId:function(){return o},setFlowVersionId:function(e){o=e},getPreviewMode:function(){return a},setPreviewMode:function(e){a=e},getIsTemplateBot:function(){return s},setIsTemplateBot:function(e){s=e},getExternalId:function(){return e},setExternalId:function(t){e=t},getRestoreId:function(){return t},setRestoreId:function(e){t=e},setIdentifyByReferenceId:function(e){r=e},getIdentifyByReferenceId:function(){return r},getConfig:function(){return l},setConfig:function(e){l=e},getProperties:function(){return u},setProperties:function(e){var t=this;e&&(f.forEach(function(n){i(this,t),e[n]&&(u[n]=e[n])}.bind(this)),e.meta&&this.setUserMeta(e.meta))},setFirstName:function(e){u.firstName=e},setLastName:function(e){u.lastName=e},setEmail:function(e){u.email=e},setPhone:function(e){u.phone=e},setPhoneCountry:function(e){u.phoneCountry=e},setUserMeta:function(e){if(u.meta=u.meta||{},e)for(var t in e)e.hasOwnProperty(t)&&(u.meta[t]=e[t])},setLocale:function(e){u.locale=e},reset:function(){e=null,t=null,l={},u={}},getJSON:function(){return{externalId:e,restoreId:t,customConfig:l,properties:u}}}}.bind(void 0)();var a,r,s,d,c,l,u,f,h,p=function(){!function(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}(this,undefined);var e={},t={},n={},i={};return{setProperties:function(n){for(var o in n)"fc_override_bot_property"!==o&&(t[o]=n[o]);for(var a in i=n.fc_override_bot_property)e[a]=i[a];for(var r in e)for(var s in t)e[r].hasOwnProperty(s)||(e[r][s]=t[s]);e.commonBotsProperties=t},getProperties:function(){return e},reset:function(){e={},n={}},setConversationPropertiesMeta:function(e){n=e},getConversationPropertiesMeta:function(){return n}}}.bind(void 0)(),g=n(16432),v={url_domain:function(e){var t=document.createElement("a");return t.href=e,t.origin},getElementStyle:function(e,t){return window.getComputedStyle(e)[t]},setAttr:function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttribute(n,t[n]);return e},remove:function(e){var t=document,n=t.body,i=t.getElementById(e);i&&(this.purge(i),n.removeChild(i))},purge:function(e){var t,n,i,o=e.attributes;if(o)for(t=o.length-1;t>=0;t-=1)"function"==typeof e[i=o[t].name]&&(e[i]=null);if(o=e.childNodes)for(n=o.length,t=0;t2&&void 0!==arguments[2]&&arguments[2];window.addEventListener?window.addEventListener(e,t,n):window.attachEvent(e,t,n)},unbindEvent:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];window.removeEventListener?window.removeEventListener(e,t,n):window.detachEvent(e,t,n)},parseJSON:function(e){var t;if(e){try{t=JSON.parse(e)}catch(e){}return t}},stringifyJSON:function(e){var t=null;if(e){try{var n=window.ItilUtil&&window.ItilUtil.jsonStringifyWrapper;t=n&&"function"==typeof n&&n(e)||JSON.stringify(e)}catch(e){}return t}},storageAvailable:function(e){var t;try{var n="__storage_test__";return(t=window.localStorage).setItem(n,n),t.removeItem(n),!0}catch(e){return e instanceof DOMException&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&0!==t.length}}(),isPushSupportedByBrowser:function(){var e,t,n,i,o,a,r,s,d=!1,c=!1;i=window.chrome,o=window.navigator,a=o.vendor,r=o.userAgent.indexOf("OPR")>-1,s=o.userAgent.indexOf("Edge")>-1,null!=i&&"Google Inc."===a&&!1===r&&!1===s&&(e=!!(n=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./))&&parseInt(n[2],10))&&(d=e>=50),navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&(t=function(){var e=navigator.userAgent,t=e.indexOf("Firefox"),n=e.substring(t+8).split(".");return!(!n||!n.length)&&parseInt(n[0],10)}(),t&&(c=t>=44));var l="serviceWorker"in navigator,u=function(){var e=!1;try{ServiceWorkerRegistration&&"showNotification"in ServiceWorkerRegistration.prototype&&(e=!0)}catch(e){}return e}(),f="PushManager"in window;return l&&u&&f&&(d||c)},getAgent:(c=navigator.appVersion,l=navigator.userAgent,u=navigator.appName,f=""+parseFloat(c),h=parseInt(c,10),-1!==l.indexOf("Station")&&(d="Station"),-1!==(r=l.indexOf("Opera"))?(u="Opera",f=l.substring(r+6),-1!==(r=l.indexOf("Version"))&&(f=l.substring(r+8))):-1!==(r=l.indexOf("MSIE"))?(u="Microsoft Internet Explorer",f=l.substring(r+5)):-1!==(r=l.indexOf("Edge"))?(u="Edge",f=l.substring(r+5)):-1!==(r=l.indexOf("Trident"))?(u="Trident",f=l.substring(r+8)):-1!==(r=l.indexOf("Chrome"))?(u="Chrome",f=l.substring(r+7)):-1!==(r=l.indexOf("Safari"))?(u="Safari",f=l.substring(r+7),-1!==(r=l.indexOf("Version"))&&(f=l.substring(r+8))):-1!==(r=l.indexOf("Firefox"))?(u="Firefox",f=l.substring(r+8)):"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||-1!==l.indexOf("iPad")||-1!==l.indexOf("iPhone")||-1!==l.indexOf("iPod")||-1!==l.indexOf("wv")?(u="WebView",f=l.substring(r+8)):(a=l.lastIndexOf(" ")+1)<(r=l.lastIndexOf("/"))&&(u=l.substring(a,r),f=l.substring(r+1),u.toLowerCase()===u.toUpperCase()&&(u=navigator.appName)),-1!==(s=f.indexOf(";"))&&(f=f.substring(0,s)),-1!==(s=f.indexOf(" "))&&(f=f.substring(0,s)),h=parseInt(""+f,10),isNaN(h)&&(f=""+parseFloat(c),h=parseInt(c,10)),{name:u,appName:d,version:h,versionx:f,os:navigator.platform}),isSafariBrowser:function(){return!(!this.getAgent||"Safari"!==this.getAgent.name)}};function m(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}var w=function(){m(this,undefined);var t=null,n=null,i=null,a=null,r=null,s=null,d=null,c=!1,l=!1,u=null,f=!1,h=null,p=null,g=null,w=null,b=null,y=null,C=["get_user_uuid"],_=null,k=null,x=null;return{getHost:function(){return s},getToken:function(){return n},getWidgetUuid:function(){return i},getReferrer:function(){return a},getSiteId:function(){return r},getSettings:function(){return d},getJsFunctions:function(){return k},setSettings:function(e){c=!!((d=e).userAuthConfig&&d.userAuthConfig.jwtAuthEnabled&&d.userAuthConfig.strictModeEnabled),l=!(!d.userAuthConfig||!d.userAuthConfig.jwtAuthEnabled)},isJWTStrictMode:function(){return c},isJWTEnabled:function(){return l},getJWTAuthToken:function(){return u},setJWTAuthToken:function(e){u=e},isLoaded:function(){return f},loaded:function(e){f=e},loadingActions:function(){return C},getConversationRefId:function(){return x},init:function(e){n=e.token,i=e.widgetUuid,a=e.referrer,s=e.host,r=e.siteId,c=!1,l=!1,u=e.jwtAuthToken,f=!1,h=e.flowId,p=e.flowVersionId,w=e.isTemplateBot,g=e.previewMode,b=e.cspNonce,y=e.omniCookie,_=e.eagerLoad,k=e.jsFunctions||{},x=e.conversationReferenceId},reset:function(){n=i=a=s=r=c=l=u=f=h=p=g=y=w=x=void 0,d=null},getJSON:function(){return{token:n,flowId:h,widgetUuid:i,flowVersionId:p,previewMode:g,isTemplateBot:w,referrer:a,host:s,siteId:r,jwtStrictMode:c,jwtEnabled:l,jwtAuthToken:u,loaded:f,omniCookie:y,conversationReferenceId:x}},load:function(e,n,i){if(v.isSafariBrowser()&&b){var o=document.createElement("script");o.nonce=b,o.textContent='window.location = "'.concat(e,'"'),t=i.contentWindow,i.contentDocument.body.appendChild(o)}else t=window.open(e,n)},postMessage:function(e){t&&t.postMessage(e,s)},dispatch:function(e,t){e&&t&&"function"==typeof e&&e(t)},unload:function(){this.postMessage({action:"push_subscribe_destroy"})},add:function(){var t=document,n=t.body,i=t.getElementById(e.frameDivId),a=t.createElement("IFRAME"),r=o.getConfig(),s=r&&r.cssNames;i&&"DIV"===i.tagName||(i=t.createElement("DIV"),n.appendChild(i)),v.setAttr(i,{id:e.frameDivId,class:s&&s.widget||""}),i.classList.add("fc_dn"),r&&r.headerProperty?("ltr"===r.headerProperty.direction&&i.classList.add("fc_l2r"),r.headerProperty.hideChatButton||i.classList.remove("fc_dn")):i.classList.remove("fc_dn"),v.setAttr(a,{id:e.frameId,name:e.frameId,title:"Chat",frameborder:"0",allowFullScreen:"true",webkitallowfullscreen:"true",mozallowfullscreen:"true"}),i.appendChild(a);var d=r&&r.widgetCanary?e.canaryRoutes.feature:"";this.loadCanaryWidget(d,a)},loadRTSCanaryWidget:function(t){var i=this,o=new XMLHttpRequest,a=e.AJAX_URL.canary.replace("{token}",n);a=s+a,o.open("GET",a,!0),o.onreadystatechange=function(){if(m(this,i),4===o.readyState){var n=v.parseJSON(o.response),a=n&&n.canary_enabled?e.canaryRoutes.rts:"";this.loadCanaryWidget(a,t)}}.bind(this),o.send()},loadCanaryWidget:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1?arguments[1]:void 0,r="";r=!g||"botflow"!==g&&"autofaq"!==g?"".concat(s,"/widget/").concat(t,"?token=").concat(n,"&referrer=").concat(a):"".concat(s,"/widget/").concat(t,"?token=").concat(n,"&referrer=").concat(a,"&previewMode=").concat(g),i&&(r+="&widgetUuid=".concat(i)),_&&(r+="&eagerLoad=true"),this.load(r,e.frameId,o)},remove:function(e){v.remove(e),t=null},setFrameSize:function(){var t,n=this.getSettings(),i=o.getConfig();if(null===n)return"";var a=null==n||null===(t=n.appearanceConfig)||void 0===t?void 0:t.widgetSize,r=!(!i||!i.fullscreen)&&i.fullscreen,s="fc-widget-normal",d=document.getElementById(e.frameDivId);!0===r&&d.classList.add(e.classes.fullscreenClass),a&&a.length>0&&(s="fc-widget-"+a.toLowerCase()),d.classList.add(s)},setFramePosition:function(){var t,n,i,o,a=this.getSettings(),r=document.getElementById(e.frameDivId),s="BOTTOM_LEFT"===(null==a||null===(t=a.appearanceConfig)||void 0===t?void 0:t.widgetPosition),d=null==a||null===(n=a.appearanceConfig)||void 0===n?void 0:n.widgetBottomOffsetPx,c=null==a||null===(i=a.appearanceConfig)||void 0===i?void 0:i.widgetRightOffsetPx;if("TEXT"===(null==a||null===(o=a.appearanceConfig)||void 0===o?void 0:o.widgetLauncherStyle)){var l,u=document.createElement("span");u.innerText=null==a||null===(l=a.appearanceConfig)||void 0===l?void 0:l.widgetLauncherValue,u.id="fc-chat-temp-text",u.style.cssText='\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;\n font-size: 14px;\n font-weight:500;\n white-space: nowrap;\n visibility: hidden;\n position: absolute;\n bottom: 0px;\n ',r.parentNode.appendChild(u);var f=document.createElement("style");f.innerHTML="#fc_frame.fc-launcher-text{width: ".concat(u.offsetWidth+60,"px}"),r.parentNode.appendChild(f),r.parentNode.removeChild(u),r.classList.add("fc-launcher-text")}r.style.bottom="".concat(d||15,"px"),s?(r.classList.add("fc-widget-left"),r.style.left="".concat(c||15,"px")):r.style.right="".concat(c||15,"px")},setWidgetDisplayStyle:function(){var t=document.body,n=document.getElementById(e.frameDivId),i=v.getElementStyle(t,"display");i&&-1!==["flex"].indexOf(i)&&n.style.setProperty("display",i)}}}.bind(void 0)();var b=function(){!function(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}(this,undefined);var e=[],t=!1;return{enque:function(n){t||(void 0===e&&(e=[]),e.push(n))},deque:function(){if(e&&e.length)return e.shift()},toggleLock:function(e){t=e},isLocked:function(){return t},isEmpty:function(){return!e||!e.length}}}.bind(void 0)();var y=function(){!function(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}(this,undefined);var e={};return{subscribe:function(n,i,o){t.isLoaded()||w.isLoaded()&&-1!==w.loadingActions().indexOf("get_user_uuid")?(e[n+"_ack"]=o,w.postMessage({action:n,payload:i})):b.enque({action:n,payload:i,handler:o})},publish:function(t,n){w.dispatch(e[t],{success:n.success,status:n.status,data:n.data})}}}.bind(void 0)(),C=function(e,t){return new Promise((function(n,i){y.subscribe(e,t,(function(e){var t=e&&e.status,o=e&&e.success;200===t||o?n(e):i(e)}))}))},_=function(e,t,n){t&&"function"==typeof t&&(n=t,t=null),y.subscribe(e,t,n)},k=function(e){return!(!e||"function"!=typeof e)};var x=function(){!function(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}(this,undefined);var e={},t=["widget:opened","widget:closed","widget:loaded","dialog:opened","dialog:closed","widget:destroyed","frame:statechange","user:statechange","user:created","user:cleared","user:authenticated","message:sent","message:received","conversation:resolved","unreadCount:notify","push:subscribed","readReceipts:update","csat:received","csat:updated","csat:show","anchorLink:clicked","faq:clicked","download:file","rts:connected","rts:disconnected"];return{clear:function(){e={}},valid:function(e){return!(!e||!t)&&-1!==t.indexOf(e)},subscribe:function(t,n){this.valid(t)&&(void 0===e[t]&&(e[t]=[]),e[t].push(n))},unsubscribe:function(t,n){if(this.valid(t)){var i,o=e&&e[t];if(o)for(var a=0,r=o.length;at&&n0?(i=(e+i)%16|0,e=Math.floor(e/16)):(i=(t+i)%16|0,t=Math.floor(t/16)),("x"==n?i:7&i|8).toString(16)}))}};function W(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var R={onMessageCB:function(){var e;return function(){return e||(e=this.onMessage.bind(this))}}(),onCustomEventCB:function(){var e;return function(){return e||(e=this.onCustomMessage.bind(this))}}(),onVisibilityChangeCB:function(){var e;return function(){return e||(e=this.onVisibilityChange.bind(this))}}(),subscribe:function(){window.addEventListener?(window.addEventListener("message",this.onMessageCB(),!1),window.addEventListener("focus",this.onVisibilityChangeCB(),!1),window.addEventListener("blur",this.onVisibilityChangeCB(),!1)):(window.attachEvent("onmessage",this.onMessageCB()),window.attachEvent("focus",this.onVisibilityChangeCB()),window.attachEvent("blur",this.onVisibilityChangeCB())),this.subscribeSales360Event()},unsubscribe:function(){window.removeEventListener?(window.removeEventListener("message",this.onMessageCB(),!1),window.removeEventListener("focus",this.onVisibilityChangeCB(),!1),window.removeEventListener("blur",this.onVisibilityChangeCB(),!1)):(window.detachEvent("onmessage",this.onMessageCB()),window.detachEvent("focus",this.onVisibilityChangeCB()),window.detachEvent("blur",this.onVisibilityChangeCB())),this.unsubscribeSales360Event()},subscribeSales360Event:function(){window.addEventListener?window.addEventListener("fwcrm_event",this.onCustomEventCB(),!1):window.attachEvent("fwcrm_event",this.onCustomEventCB())},unsubscribeSales360Event:function(){window.removeEventListener?window.removeEventListener("fwcrm_event",this.onCustomEventCB(),!1):window.detachEvent("fwcrm_event",this.onCustomEventCB())},onVisibilityChange:function(e){switch(e.type){case"focus":w.postMessage({action:"widget_focus"});break;case"blur":w.postMessage({action:"widget_blur",payload:{title:document.title,location:window.location.href}}),E.postMessage({action:"widget_location",openWindow:!1,payload:window.location.href})}},onUserCreate:function(e){x.publish("user:created",e)},loadWidget:function(){if(!1===t.isInitialized()){t.initialized(!0);var e=w.getJSON(),n=o.getProperties(),i=o.getConfig(),a=t.getTags(),r=t.getFaqTags(),s=p.getProperties(),d=p.getConversationPropertiesMeta();if(e.integrations=o.getIntegrations(),e.campaignRuleIds=o.getcampaignRuleIds(),e.externalId=o.getExternalId(),e.restoreId=o.getRestoreId(),e.flowId=o.getFlowId(),e.flowVersionId=o.getFlowVersionId(),e.previewMode=o.getPreviewMode(),e.isTemplateBot=o.getIsTemplateBot(),e.identifyByReferenceId=o.getIdentifyByReferenceId(),n&&(e.properties=n),s&&(e.botsMeta=s),d&&(e.conversationPropertiesMeta=d),i&&(e.config=i),a&&(e.tags=a),r&&(e.faqTags=r),e.userAgent=v.getAgent,v.storageAvailable){var c=e.token,l=localStorage.getItem(c),u=e.siteId?"".concat(e.token,"_").concat(e.siteId):null,f=u?localStorage.getItem(u):null;if((l||u&&f)&&(e.storage={},e.storage[c]=l||JSON.stringify({}),u&&(e.storage[u]=f||JSON.stringify({}))),i&&i.overrideDS){var h="lsds_".concat(u||c),g=localStorage.getItem(h);g?e.lsds=A({},h,g):(e.lsds=A({},h,JSON.stringify({})),e.migrateLFDS=!0)}}w.setFrameSize(),w.setFramePosition(),w.setWidgetDisplayStyle(),w.postMessage({action:"load_widget",payload:e})}},unloadWidget:function(){E.isLoaded()&&E.unload(),t.reset(),o.reset(),p.reset(),B(),w.reset(),w.remove(e.frameDivId),this.unsubscribe(),x.publish("widget:destroyed",null,!0),x.clear()},updateFrameSettings:function(e){if(null!==w.getSettings()||void 0===e)return!1;w.setSettings(e)},onCustomMessage:function(e){},onMessage:function(n){var i=this,a=n.origin||n.originalEvent.origin,r=o.getConfig(),s=r&&r.cssNames;if(a===w.getHost()||a===E.getHostOrigin()){var d=n.data,c=d&&d.action;if(this.updateFrameSettings(d.settingsPayload),c){var l,u,f=document.getElementById(e.frameDivId),h=s&&s.expanded||"expanded",p=w.getSettings(),g=null==p||null===(l=p.appearanceConfig)||void 0===l?void 0:l.widgetRightOffsetPx,m="BOTTOM_LEFT"===(null==p||null===(u=p.appearanceConfig)||void 0===u?void 0:u.widgetPosition);switch(c){case"push_subscribe_destroy_response":this.unloadWidget();break;case"TRIGGER_JS_FUNCTION":var b,C=null===(b=d.data.functionName)||void 0===b?void 0:b.replace("options.",""),_=w.getJsFunctions()[C],k=_&&_.call(this,JSON.parse(d.data.params));d.data.value="string"==typeof k?k:JSON.stringify(k),w.postMessage(d);break;case"OPEN_URL":window.open(d.data.url,d.data.target);break;case"push_user_meta":x.publish("push:subscribed",d.data),w.postMessage(d);break;case"toggle_dialog":d.data?x.publish("dialog:opened"):x.publish("dialog:closed");break;case"reset_user_cookie":N.removeCookie(),w.postMessage({action:"update_cookie",payload:{omniCookie:N.getCookie()}});break;case"restore_user_cookie":N.removeCookie(),N.setCookie(d.alias),w.postMessage({action:"restore_cookie",payload:{alias:d.alias}});break;case"notify_frame":var L=d.data,T=document.getElementById(e.frameDivId),P=s&&s.open||"fc-open";"expand"===L?(T.style.removeProperty("max-height"),T.style.removeProperty("height"),T.classList.add("h-open-notify"),T.classList.add(P),T.classList.add(L)):"close"===L?(T.style.removeProperty("max-height"),T.style.removeProperty("height"),T.classList.remove("h-open-notify"),T.classList.remove(P),T.classList.remove("expand")):"mobile-view"===L?T.classList.add("fc-mobile-view"):(T.classList.add("h-open-notify"),T.classList.add(P));break;case"resize_frame":var O=document.getElementsByTagName("BODY")[0],B=s&&s.open||"fc-open";t.opened(d.isOpen),t.isOpened()?(f.classList.add("h-open-container"),f.classList.add(B),f.classList.add("widget-open-animate"),x.publish("widget:opened"),setTimeout(function(){W(this,i),f.classList.remove("widget-open-animate")}.bind(this),1e3),O&&O.classList.add("fc-widget-open")):(f.style.removeProperty("max-height"),f.style.removeProperty("height"),f.classList.remove("h-open-container"),f.classList.remove(B),x.publish("widget:closed"),O&&O.classList.remove("fc-widget-open"));break;case"toggle_frame":d.show?f.classList.remove("hide"):-1===f.className.trim().indexOf("hide")&&f.classList.add("hide");break;case"push_frame_loaded":E.loaded(!0),E.setSource(n&&n.source),E.postMessage({action:"widget_location",openWindow:!1,payload:window.location.href}),w.postMessage({action:"widget_location",payload:{title:document.title,location:window.location.href}});break;case"frame_state_change":var M=document.getElementById(e.frameDivId),A=d&&d.data,R=A&&A.frameState,j=w.getSettings()&&w.getSettings().enabledFeatures,U=o.getConfig();x.publish("frame:statechange",d),"initialized"===R&&(w.isJWTEnabled()&&w.isJWTStrictMode()&&M.classList.add("fc_dn"),null!=U&&U.eagerLoad&&M.style.setProperty("display","none"),this.loadWidget(),j&&-1!==j.indexOf("COBROWSING")&&F.init({host:w.getHost(),locale:o.getProperties().locale})),"loaded"===R&&w.loaded(!0),"authenticated"!==R&&"not_authenticated"!==R||w.isJWTEnabled()&&w.isJWTStrictMode()&&(d.success?M.classList.remove("fc_dn"):304!==d.status&&this.unloadWidget());break;case"widget_loaded":t.loaded(!0),x.publish("widget:loaded");var V=o.getConfig(),q=document.getElementById(e.frameDivId);null!=V&&V.eagerLoad&&q.style.removeProperty("display"),E.isLoaded()||E.init({host:d.pushDomain+"?ref="+btoa(window.location.origin),hostOrigin:v.url_domain(d.pushDomain),appLogoPath:d.appLogoPath,locale:d.locale,sales360App:d.sales360App}),t.doOpen()&&w.postMessage({action:"open_chat"}),w.postMessage({action:"widget_location",payload:{title:document.title,location:window.location.href}});break;case"datastore_loaded":w.postMessage({action:"load_rules"});break;case"rules_loaded":S(),D.start();break;case"enlarge_image":I.create(d.picUrl);break;case"expand_all":document.getElementById(e.frameDivId).classList.add("expanded-modal"),document.getElementById(e.frameDivId).classList.add(h);break;case"expand_article_view":window.innerWidth\n help-icon\n ').concat(r||"Help","\n "),n=r&&!a?'Freshchat Logo'):'
',{content:'\n
\n
\n
\n ').concat(a?h:n,'\n
\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n '),styles:"\n :host {\n --background: ".concat(i,";\n --foreground: ").concat(o,";\n }\n\n .d-hotline-text {\n border-radius: 24px 4px 16px 24px !important;\n height: 32px !important;\n padding: 0 10px;\n width: unset !important;\n }\n\n #fc-widget-chat-text {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Segoe UI Emoji', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Cantarell', 'Helvetica Neue', sans-serif;\n -webkit-font-smoothing: antialiased;\n display: flex;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n white-space: nowrap;\n margin: 5px 0px;\n }\n\n .fc-widget-help-icon {\n margin: 2px 5px 0 0;\n }\n\n .fc-widget-align-center {\n top: 50% !important;\n left: 50% !important;\n transform: translate(-50%, -50%);\n }\n\n .fc_widget_custom-icon {\n width: 38%;\n height: 17px;\n border-radius: 6px 6px 6px 2px;\n position: absolute;\n top: 37%;\n left: 32%;\n }\n\n .freshdesk_messaging .d-hotline {\n display: none;\n border-radius: 34px 8px 34px 34px;\n position: fixed !important;\n bottom: ").concat(l,"px;\n box-shadow: 0 5px 4px 0 rgba(0, 0, 0, 0.26) !important;\n color: #fff;\n cursor: pointer;\n display: table;\n position: absolute;\n right: ").concat(s?"auto":u+"px",";\n left: ").concat(s?u+"px":"auto",';\n z-index: 3147483602 !important;\n height: 60px;\n width: 60px;\n background-color: var(--background) !important;\n color: #ffffff !important;\n border-color: var(--background) !important;\n -webkit-animation: 0.5s zoomIn;\n animation: 0.5s zoomIn;\n }\n .freshdesk_messaging.fullscreen #static-bubble {\n bottom: 6px !important;\n }\n .freshdesk_messaging.fullscreen #loading {\n bottom: 62px;\n }\n .freshdesk_messaging.l2r #static-bubble {\n left: 20px;\n }\n .freshdesk_messaging.l2r #loading {\n left: 85px;\n }\n .freshdesk_messaging.l2r.fullscreen #static-bubble {\n left: 5px !important;\n }\n .freshdesk_messaging.r2l.fullscreen #static-bubble {\n right: 5px !important;\n }\n .freshdesk_messaging.r2l.fullscreen #loading {\n right: 64px;\n }\n .freshdesk_messaging.l2r.fullscreen #loading {\n left: 72px;\n }\n .freshdesk_messaging #fc-widget-chat-icon {\n width: 38%;\n height: 17px;\n border-radius: 6px 6px 6px 2px;\n position: absolute;\n background: var(--foreground) !important;\n top: 37%;\n left: 32%;\n }\n .freshdesk_messaging #fc-widget-chat-icon:before {\n border-radius: 2px 2px 2px 2px;\n height: 2px;\n content: "";\n border-top: 5px;\n background: var(--background) !important;\n width: 65%;\n position: absolute;\n top: 5px;\n left: 4px;\n }\n .freshdesk_messaging #fc-widget-chat-icon:after {\n border-radius: 2px 2px 2px 2px;\n height: 2px;\n content: "";\n border-top: 5px;\n background: var(--background) !important;\n width: 44%;\n position: absolute;\n top: 10px;\n left: 4px;\n }\n .freshdesk_messaging #loading {\n visibility: hidden;\n position: absolute;\n bottom: ').concat(a?"auto":"25px",";\n min-width: 55px !important;\n left: ").concat(a?"auto":"6px",";\n }\n .freshdesk_messaging .flexbox {\n opacity: 0.7;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n }\n .freshdesk_messaging .dot-loader {\n height: 8px;\n width: 8px;\n border-radius: 50%;\n background-color: var(--foreground) !important;\n position: relative;\n -webkit-animation: 1.2s scaleDown ease-in-out infinite;\n animation: 1.2s scaleDown ease-in-out infinite;\n }\n .freshdesk_messaging .dot-loader:nth-child(2) {\n margin: 0 10px;\n -webkit-animation: 1.2s scaleDown ease-in-out infinite 0.15555s;\n animation: 1.2s scaleDown ease-in-out infinite 0.15555s;\n }\n .freshdesk_messaging .dot-loader:nth-child(3) {\n -webkit-animation: 1.2s scaleDown ease-in-out infinite 0.3s;\n animation: 1.2s scaleDown ease-in-out infinite 0.3s;\n }\n @-webkit-keyframes scaleDown {\n 0%,\n 80%,\n 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n }\n 40% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n }\n @keyframes scaleDown {\n 0%,\n 80%,\n 100% {\n -webkit-transform: scale(0);\n transform: scale(0);\n }\n 40% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n }\n @-webkit-keyframes zoomIn {\n 0% {\n -webkit-transform: scale(0);\n transform: scale(0);\n }\n\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n }\n\n @keyframes zoomIn {\n 0% {\n -webkit-transform: scale(0);\n transform: scale(0);\n }\n\n 100% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n }\n\n @media only screen and (min-device-width: 320px) and (max-device-width: 480px) {\n .mobile .d-hotline {\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .2) !important;\n\n width: 50px;\n height: 50px;\n }\n\n .mobile #fc-widget-chat-icon {\n width: 43% !important;\n top: 32% !important;\n }\n ")});return function(t){var n=t.onDemandWidgetCB,i=t.fullscreen,o=t.l2r,a=t.isMobile;!function(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}(this,p);var r=e.impostor.tagName,s=function(){var e=document.createElement("template");return e.innerHTML='\n \n ").concat(g.content,"\n "),e}(),d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Y(e,t)}(l,e);var t,d,c=(t=l,d=K(),function(){var e,n=Z(t);if(d){var i=Z(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return z(this,e)});function l(){var e,t;$(this,l),ne(G(t=c.call(this)),"onDemandCB",void 0),t.attachShadow({mode:"open"}).appendChild(s.content.cloneNode(!0)),t.onDemandCB=t.onDemand.bind(G(t)),null===(e=t.shadowRoot)||void 0===e||e.querySelector("#static-bubble").addEventListener("mousedown",t.onDemandCB);var n,r,d=[];(i&&d.push("fullscreen"),o?d.push("l2r"):d.push("r2l"),a&&d.push("mobile"),d.length)&&(null===(n=t.shadowRoot)||void 0===n||(r=n.querySelector(".freshdesk_messaging").classList).add.apply(r,d));return t}return te(l,[{key:"onDemand",value:function(){this.removeMouseDownHandler(),this.showLoading(),n()}},{key:"removeMouseDownHandler",value:function(){var e,t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("#static-bubble");t&&t.removeEventListener("mousedown",this.onDemandCB)}},{key:"removeBubble",value:function(){this.shadowRoot.querySelector("#static-bubble").style.display="none",this.removeMouseDownHandler()}},{key:"removeImpostor",value:function(){this.removeLoading(),this.shadowRoot.querySelector(".freshdesk_messaging").style.display="none",document.querySelector(r).remove()}},{key:"removeLoading",value:function(){var e,t,n=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".freshdesk_messaging #loading"),i=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("#bubble-content");n.style.visibility="hidden",i.style.visibility="visible"}},{key:"showLoading",value:function(){var e,t,n=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".freshdesk_messaging #loading"),i=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("#bubble-content");n.style.visibility="visible",i.style.visibility="hidden"}}]),l}(X(HTMLElement));customElements.get(r)||customElements.define(r,d);var c=document.createElement(r,{is:r});return document.body.appendChild(c),c}.bind(this)(this.impostorConfig)}}]),t}(),oe=ie;function ae(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}var re=n.p+"help_icon.407f0467c911236190038c9631c321f8.svg",se=n.p+"help_icon_black.5668a2cc609a7b782f2ea0dab26bae20.svg";function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ce(e){for(var t=1;t0&&void 0!==arguments[0])||arguments[0];this.isWidgetBeingLoaded=!0,this.loadFreshChatCB(e),e&&(this.sendConfigsToFreshChatCB=this.sendConfigsToFreshChat.bind(this),window.addEventListener("message",this.sendConfigsToFreshChatCB))}},{key:"sendConfigsToFreshChat",value:function(t){t.data.action===e.impostor.getFreshChatConfigs&&(w.postMessage({action:"config_data",payload:ce({},this.appConfig)}),window.removeEventListener("message",this.sendConfigsToFreshChatCB))}},{key:"listenToWidgetAndBrowserEvents",value:function(){this.onWidgetOpenedCB=this.onWidgetOpened.bind(this),this.onWidgetLoadedCB=this.onWidgetLoaded.bind(this),window.fcWidget.on("widget:loaded",this.onWidgetLoadedCB),window.fcWidget.on("widget:opened",this.onWidgetOpenedCB),this.activityEvents=e.impostor.activityEvents,this.unbindBrowserEventsCB=this.unbindBrowserEvents.bind(this,!1),this.bindBrowserEvents.bind(this)()}},{key:"unbindBrowserEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.activityEvents.forEach(function(t){le(this,e),document.removeEventListener(t,this.unbindBrowserEventsCB,!0)}.bind(this)),t||this.loadFreshChat()}},{key:"bindBrowserEvents",value:function(){var e=this;this.activityEvents.forEach(function(t){le(this,e),document.addEventListener(t,this.unbindBrowserEventsCB,!0)}.bind(this))}},{key:"onWidgetOpened",value:function(){this.cleanUp()}},{key:"onWidgetLoaded",value:function(){this.openWidgetOnLoad?window.fcWidget.open():this.cleanUp()}},{key:"unbindFCEvents",value:function(){window.fcWidget.off("widget:opened",this.onWidgetOpenedCB),window.fcWidget.off("widget:loaded",this.onWidgetLoadedCB)}},{key:"cleanUp",value:function(){var e,t,n=this;this.appConfig=null,window.removeEventListener("message",this.sendConfigsToFreshChatCB),null===(e=this.impostor)||void 0===e||e.removeBubble(),this.isWidgetBeingLoaded=!1,this.unbindBrowserEvents(!0),null===(t=this.impostor)||void 0===t||t.removeImpostor(),this.eventUnbindTimer&&clearTimeout(this.eventUnbindTimer),this.eventUnbindTimer=setTimeout(function(){le(this,n),this.unbindFCEvents()}.bind(this))}}],i&&ue(n.prototype,i),o&&ue(n,o),t}(),pe=he;function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ve(e){for(var t=1;t