(()=>{setCookie=function(e,n,o){var t="";if(void 0!==o){var r=new Date;r.setDate(r.getDate()+o),t="; expires="+r.toUTCString()}document.cookie=e+"="+escape(n)+"; path=/"+t},getCookie=function(e){var n=document.cookie,o=e+"=",t=n.indexOf("; "+o);if(-1==t){if(0!=(t=n.indexOf(o)))return null}else{t+=2;var r=document.cookie.indexOf(";",t);-1==r&&(r=n.length)}return decodeURI(n.substring(t+o.length,r))},getServerDomain=function(){let e=window.parent.location;try{return e.protocol+e.hostname}catch(e){return document.referrer.replace(/[\/]/g,"")}},b64EncodeStringWithUnicode=function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,n){return String.fromCharCode("0x"+n)})))},b64DecodeStringWithUnicode=function(e){return decodeURIComponent(Array.prototype.map.call(atob(e),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))},getVisitorIdCookieName=function(){return"LaVisitorId_"+b64EncodeStringWithUnicode(getServerDomain()).replace(/[+=\/]/g,"")};var e=document.location.hash.replace(/^#/,"")+"";e=decodeURIComponent(e.replace(/\+/g,"%20"));var n=JSON.parse(e),o=n.location,t=n.b,r=n.t;""!=r&&null!=r||null==getCookie(getVisitorIdCookieName())&&setCookie(getVisitorIdCookieName(),t);var i=function(){};i.prototype={start:function(){if(0!==arguments.length&&0!==arguments[0].length){var e=arguments[0],n=document.location.pathname.replace("/scripts/lib/bus.html","");""!=r&&null!=r&&(n+="/"+r+"/"+t);var i=new PushStream({messagesPublishedAfter:15e3,host:document.location.hostname,port:document.location.port,useSSL:"https:"==document.location.protocol,channelsByArgument:!0,reconnectOnChannelUnavailableInterval:5e3,messagesControlByArgument:!0,urlPrefixPublisher:n+"/event/publish",urlPrefixStream:n+"/event/sub",urlPrefixEventsource:n+"/event/ev",urlPrefixLongpolling:n+"/event/lp/v2",urlPrefixWebsocket:n+"/event/ws",modes:"longpolling"});i.onmessage=function(e,n,t){window.LiveAgentTrackerXD.postMessage(["processTrackerEvent",b64DecodeStringWithUnicode(e)],o,parent)},i.addChannel(e),i.setLongPollingTimeout(1e4),i.connect()}else window.console&&console.log&&console.log("Failed to start bus: Channel undefined.")}};var a=new i;window.LiveAgentTrackerXD.receiveMessageFun(a.start)})();