var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); /** * compiled: 2020-05-25 16:18:04 * version: 1.8.4 * commit: b6f8d4c89acc249bc1b113d98a03fa2849b52648 */ !function(){"use strict";function unwrapExports(e){return e&&e.__esModule?e.default:e}function createCommonjsModule(e,t){return t={exports:{}},e(t,t.exports),t.exports}function VNode(){}function h(e,t){var n=EMPTY_CHILDREN,i=void 0,o=void 0,a=void 0,r=void 0;for(r=arguments.length;r-- >2;)stack.push(arguments[r]);for(t&&null!=t.children&&(stack.length||stack.push(t.children),delete t.children);stack.length;)if((o=stack.pop())&&void 0!==o.pop)for(r=o.length;r--;)stack.push(o[r]);else!0!==o&&!1!==o||(o=null),(a="function"!=typeof e)&&(null==o?o="":"number"==typeof o?o=String(o):"string"!=typeof o&&(a=!1)),a&&i?n[n.length-1]+=o:n===EMPTY_CHILDREN?n=[o]:n.push(o),i=a;var s=new VNode;return s.nodeName=e,s.children=n,s.attributes=null==t?void 0:t,s.key=null==t?void 0:t.key,void 0!==options.vnode&&options.vnode(s),s}function extend(e,t){for(var n in t)e[n]=t[n];return e}function cloneElement(e,t){return h(e.nodeName,extend(extend({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}function enqueueRender(e){!e._dirty&&(e._dirty=!0)&&1==items.push(e)&&(options.debounceRendering||setTimeout)(rerender)}function rerender(){var e=void 0,t=items;for(items=[];e=t.pop();)e._dirty&&renderComponent(e)}function isSameNodeType(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&isNamedNode(e,t.nodeName):n||e._componentConstructor===t.nodeName}function isNamedNode(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function getNodeProps(e){var t=extend({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var i in n)void 0===t[i]&&(t[i]=n[i]);return t}function createNode(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}function removeNode(e){e.parentNode&&e.parentNode.removeChild(e)}function setAccessor(e,t,n,i,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),i&&i(e);else if("class"!==t||o)if("style"===t){if(i&&"string"!=typeof i&&"string"!=typeof n||(e.style.cssText=i||""),i&&"object"===(void 0===i?"undefined":_typeof(i))){if("string"!=typeof n)for(var a in n)a in i||(e.style[a]="");for(var r in i)e.style[r]="number"==typeof i[r]&&!1===IS_NON_DIMENSIONAL.test(r)?i[r]+"px":i[r]}}else if("dangerouslySetInnerHTML"===t)i&&(e.innerHTML=i.__html||"");else if("o"==t[0]&&"n"==t[1]){var s=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),i?n||e.addEventListener(t,eventProxy,s):e.removeEventListener(t,eventProxy,s),(e._listeners||(e._listeners={}))[t]=i}else if("list"!==t&&"type"!==t&&!o&&t in e)setProperty(e,t,null==i?"":i),null!=i&&!1!==i||e.removeAttribute(t);else{var d=o&&t!==(t=t.replace(/^xlink\:?/,""));null==i||!1===i?d?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof i&&(d?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),i):e.setAttribute(t,i))}else e.className=i||""}function setProperty(e,t,n){try{e[t]=n}catch(e){}}function eventProxy(e){return this._listeners[e.type](options.event&&options.event(e)||e)}function flushMounts(){for(var e=void 0;e=mounts.pop();)options.afterMount&&options.afterMount(e),e.componentDidMount&&e.componentDidMount()}function diff(e,t,n,i,o,a){diffLevel++||(isSvgMode=null!=o&&void 0!==o.ownerSVGElement,hydrating=null!=e&&!(ATTR_KEY in e));var r=idiff(e,t,n,i,a);return o&&r.parentNode!==o&&o.appendChild(r),--diffLevel||(hydrating=!1,a||flushMounts()),r}function idiff(e,t,n,i,o){var a=e,r=isSvgMode;if(null==t&&(t=""),"string"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||o)?e.nodeValue!=t&&(e.nodeValue=t):(a=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(a,e),recollectNodeTree(e,!0))),a[ATTR_KEY]=!0,a;if("function"==typeof t.nodeName)return buildComponentFromVNode(e,t,n,i);if(isSvgMode="svg"===t.nodeName||"foreignObject"!==t.nodeName&&isSvgMode,(!e||!isNamedNode(e,String(t.nodeName)))&&(a=createNode(String(t.nodeName),isSvgMode),e)){for(;e.firstChild;)a.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(a,e),recollectNodeTree(e,!0)}var s=a.firstChild,d=a[ATTR_KEY]||(a[ATTR_KEY]={}),c=t.children;return!hydrating&&c&&1===c.length&&"string"==typeof c[0]&&null!=s&&void 0!==s.splitText&&null==s.nextSibling?s.nodeValue!=c[0]&&(s.nodeValue=c[0]):(c&&c.length||null!=s)&&innerDiffNode(a,c,n,i,hydrating||null!=d.dangerouslySetInnerHTML),diffAttributes(a,t.attributes,d),isSvgMode=r,a}function innerDiffNode(e,t,n,i,o){var a=e.childNodes,r=[],s={},d=0,c=0,l=a.length,u=0,p=t?t.length:0,h=void 0,f=void 0,g=void 0,m=void 0;if(0!==l)for(var b=0;b=l?e.appendChild(m):m!==a[C]&&(m===a[C+1]?removeNode(a[C]):e.insertBefore(m,a[C]||null)))}if(d)for(var x in s)void 0!==s[x]&&recollectNodeTree(s[x],!1);for(;c<=u;)void 0!==(m=r[u--])&&recollectNodeTree(m,!1)}function recollectNodeTree(e,t){var n=e._component;n?unmountComponent(n):(null!=e[ATTR_KEY]&&e[ATTR_KEY].ref&&e[ATTR_KEY].ref(null),!1!==t&&null!=e[ATTR_KEY]||removeNode(e),removeChildren(e))}function removeChildren(e){for(e=e.lastChild;e;){var t=e.previousSibling;recollectNodeTree(e,!0),e=t}}function diffAttributes(e,t,n){var i=void 0;for(i in n)t&&null!=t[i]||null==n[i]||setAccessor(e,i,n[i],n[i]=void 0,isSvgMode);for(i in t)"children"===i||"innerHTML"===i||i in n&&t[i]===("value"===i||"checked"===i?e[i]:n[i])||setAccessor(e,i,n[i],n[i]=t[i],isSvgMode)}function collectComponent(e){var t=e.constructor.name;(components[t]||(components[t]=[])).push(e)}function createComponent(e,t,n){var i=components[e.name],o=void 0;if(e.prototype&&e.prototype.render?(o=new e(t,n),Component.call(o,t,n)):(o=new Component(t,n),o.constructor=e,o.render=doRender),i)for(var a=i.length;a--;)if(i[a].constructor===e){o.nextBase=i[a].nextBase,i.splice(a,1);break}return o}function doRender(e,t,n){return this.constructor(e,n)}function setComponentProps(e,t,n,i,o){e._disable||(e._disable=!0,(e.__ref=t.ref)&&delete t.ref,(e.__key=t.key)&&delete t.key,!e.base||o?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,i),i&&i!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=i),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,n!==NO_RENDER&&(n!==SYNC_RENDER&&!1===options.syncComponentUpdates&&e.base?enqueueRender(e):renderComponent(e,SYNC_RENDER,o)),e.__ref&&e.__ref(e))}function renderComponent(e,t,n,i){if(!e._disable){var o=e.props,a=e.state,r=e.context,s=e.prevProps||o,d=e.prevState||a,c=e.prevContext||r,l=e.base,u=e.nextBase,p=l||u,h=e._component,f=!1,g=void 0,m=void 0,b=void 0;if(l&&(e.props=s,e.state=d,e.context=c,t!==FORCE_RENDER&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(o,a,r)?f=!0:e.componentWillUpdate&&e.componentWillUpdate(o,a,r),e.props=o,e.state=a,e.context=r),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!f){g=e.render(o,a,r),e.getChildContext&&(r=extend(extend({},r),e.getChildContext()));var w=g&&g.nodeName,v=void 0,y=void 0;if("function"==typeof w){var C=getNodeProps(g);m=h,m&&m.constructor===w&&C.key==m.__key?setComponentProps(m,C,SYNC_RENDER,r,!1):(v=m,e._component=m=createComponent(w,C,r),m.nextBase=m.nextBase||u,m._parentComponent=e,setComponentProps(m,C,NO_RENDER,r,!1),renderComponent(m,SYNC_RENDER,n,!0)),y=m.base}else b=p,v=h,v&&(b=e._component=null),(p||t===SYNC_RENDER)&&(b&&(b._component=null),y=diff(b,g,r,n||!l,p&&p.parentNode,!0));if(p&&y!==p&&m!==h){var _=p.parentNode;_&&y!==_&&(_.replaceChild(y,p),v||(p._component=null,recollectNodeTree(p,!1)))}if(v&&unmountComponent(v),e.base=y,y&&!i){for(var x=e,S=e;S=S._parentComponent;)(x=S).base=y;y._component=x,y._componentConstructor=x.constructor}}if(!l||n?mounts.unshift(e):f||(flushMounts(),e.componentDidUpdate&&e.componentDidUpdate(s,d,c),options.afterUpdate&&options.afterUpdate(e)),null!=e._renderCallbacks)for(;e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);diffLevel||i||flushMounts()}}function buildComponentFromVNode(e,t,n,i){for(var o=e&&e._component,a=o,r=e,s=o&&e._componentConstructor===t.nodeName,d=s,c=getNodeProps(t);o&&!d&&(o=o._parentComponent);)d=o.constructor===t.nodeName;return o&&d&&(!i||o._component)?(setComponentProps(o,c,ASYNC_RENDER,n,i),e=o.base):(a&&!s&&(unmountComponent(a),e=r=null),o=createComponent(t.nodeName,c,n),e&&!o.nextBase&&(o.nextBase=e,r=null),setComponentProps(o,c,SYNC_RENDER,n,i),e=o.base,r&&e!==r&&(r._component=null,recollectNodeTree(r,!1))),e}function unmountComponent(e){options.beforeUnmount&&options.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?unmountComponent(n):t&&(t[ATTR_KEY]&&t[ATTR_KEY].ref&&t[ATTR_KEY].ref(null),e.nextBase=t,removeNode(t),collectComponent(e),removeChildren(t)),e.__ref&&e.__ref(null)}function Component(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{}}function render(e,t,n){return diff(n,e,{},!1,t,!1)}function partial(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;it}function uuid(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,uuid)}function onKeyDownWrapper(e){return function(t){var n=t.keyCode;n!==ENTER&&n!==SPACE||e(t)}}function getStringRealLength(e){if(!e)return 0;var t=void 0,n=void 0,i=[],o=e.length;for(t=0;t0&&n<=127?i.push(e.charAt(t)):n>=128&&n<=2047?i.push(String.fromCharCode(192|n>>6&31),String.fromCharCode(128|63&n)):n>=2048&&n<=65535&&i.push(String.fromCharCode(224|n>>12&15),String.fromCharCode(128|n>>6&63),String.fromCharCode(128|63&n));return i.join("").length}function getLanguages(e){return e.language}function writeMediaSection(e,t,n,i,o){var a=sdp.writeRtpDescription(e.kind,t);if(a+=sdp.writeIceParameters(e.iceGatherer.getLocalParameters()),a+=sdp.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":o||"active"),a+="a=mid:"+e.mid+"\r\n",e.rtpSender&&e.rtpReceiver?a+="a=sendrecv\r\n":e.rtpSender?a+="a=sendonly\r\n":e.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n",e.rtpSender){var r="msid:"+i.id+" "+e.rtpSender.track.id+"\r\n";a+="a="+r,a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+r,e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+r,a+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+sdp.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+sdp.localCName+"\r\n"),a}function filterIceServers(e,t){var n=!1;return e=JSON.parse(JSON.stringify(e)),e.filter(function(e){if(e&&(e.urls||e.url)){var i=e.urls||e.url;e.url&&e.urls;var o="string"==typeof i;return o&&(i=[i]),i=i.filter(function(e){return 0!==e.indexOf("turn:")||-1===e.indexOf("transport=udp")||-1!==e.indexOf("turn:[")||n?0===e.indexOf("stun:")&&t>=14393&&-1===e.indexOf("?transport=udp"):(n=!0,!0)}),delete e.url,e.urls=o?i[0]:i,!!i.length}})}function getCommonCapabilities(e,t){var n={codecs:[],headerExtensions:[],fecMechanisms:[]},i=function(e,t){e=parseInt(e,10);for(var n=0;n=100&&clearInterval(d)},2e4)},w.onmessage=function(e){var n=JSON.parse(e.data);null!=n.count?(0===g&&n.count>1&&(t(),a({start:1})),(g=n.count)<2&&(m=!1)):n.start?(t(),m=!0,o()):n.s?(n.s,null==s&&(s=n.d?n.d.iceServers||[]:[],s.push(y),p&&p(s))):c&&c(n)},w.onclose=function(){i()},w.onerror=function(e){i(),l&&l()};var y={urls:"stun:stun.l.google.com:19302"};this.send=a,this.close=r,this.onRemoteStart=function(e){u=e,o()},this.onMessage=function(e){c=e},this.onGetIceServers=function(e){p=e,s&&e&&e(s)},this.onError=function(e){l=e}}function DeviceMonitor(){function e(e){d=e,d?o().then(function(e){s=e,t(),r=setInterval(function(){o().then(i)},1e3)}):t()}function t(){r&&(clearInterval(r),r=null)}function n(e,t){for(var n=0;n0){var h=s[s.length-1];p=/[^a-zA-Z0-9!@#$%^&*~]/.test(h)}else if(i.length>o.length){var f=i[i.length-1],g=f[f-1];p=/[^a-zA-Z0-9!@#$%^&*~]/.test(g)}else i.length>0&&(p=!1,s=o.pop()+s);if(p&&(p=!/^\d/.test(t||"")),p)i.length>o.length?i[i.length-1]+=s:i.push(s),o.push(r);else{var m=s+r;i.length>o.length?i[i.length-1]+=m:i.push(m)}n=telPattern.exec(t)}return t?i.length===o.length?i.push(t):i[i.length-1]+=t:i.length===o.length&&i.push(""),[i,o]}function handleWithRegEx(e,t,n,i){var o=void 0,a=void 0;if(t instanceof RegExp)o=e.split(t),a=e.match(t);else{var r=t(e);o=r[0],a=r[1]}for(var s=new Array(2*o.length-1),d=0;d0?e[e.length-1].div_id:null;if(t&&document$2.body&&!document$2.getElementById(t)){var n=document$2.getElementsByTagName("head")[0];if(n)for(var i=n.getElementsByTagName("script"),o=0;o=t.length?n(new DiffArray(s,h,new DiffDeleted(void 0,e[h]))):deepDiff(e[h],t[h],n,i,s,h,r);for(;h=0?(deepDiff(e[o],t[o],n,i,s,o,r),g=arrayRemove(g,d)):deepDiff(e[o],void 0,n,i,s,o,r)}),g.forEach(function(e){deepDiff(void 0,t[e],n,i,s,e,r)})}r.length=r.length-1}else e!==t&&("number"===c&&isNaN(e)&&isNaN(t)||n(new DiffEdit(s,e,t)))}function accumulateDiff(e,t,n,i){return i=i||[],deepDiff(e,t,function(e){e&&i.push(e)},n),i.length?i:void 0}function applyArrayChange(e,t,n){if(n.path&&n.path.length){var i,o=e[t],a=n.path.length-1;for(i=0;i2&&void 0!==arguments[2])||arguments[2],i=e.getState(),o=getCustomVariableResult(i),a=_extends({},o,t);if(!customVariablesEqual(a,o)){n&&e.dispatch(updateConfig$1({customVariableResult:a}));var r=subMap(a,o);Object.keys(r).length>0&&e.dispatch(sendUpdateCustomVariables$1(r))}}function getRightAndBottom(e,t){var n=getWindowIframeStyle(e,t),i=getAdaptiveButtonOffset(e,t);if(!n)return i;var o={right:n.right||i.right,bottom:n.bottom||i.bottom},a=void 0!==n.top,r=void 0!==n.left;if((a||r)&&(o.right=n.right||0,o.bottom=n.bottom||0),a){var s=getHeight(e);o.bottom=s-n.top-n.height}if(r){var d=getWidth(e);o.right=d-n.left-n.width}return o}function translateHtmlCharater(e){var t=document.createElement("div");return t.innerHTML=e,t.textContent}function getBotFirstConfidenceAnswer(e){var t=e.content.intentAnswers[0];return t.type===text$3?translateHtmlCharater(t.content):t.type===image$1||t.type===file?t.content.name:t.type===video$1?"[Video]":t.type===complex?translateHtmlCharater(t.content.text):t.content.text}function xhrContentType(e){return e.contentType?e.contentType:e.getResponseHeader?e.getResponseHeader("content-type"):null}function xhrOnProgress(e,t){if(t){var n=function(){e.abort()};e.upload&&e.upload.addEventListener("progress",function(e){var i=e.lengthComputable?Math.round(100*e.loaded/e.total):void 0;t(i,n)},!1),t(void 0,n)}}function parseOutput(e){return/\bjson\b/gi.test(xhrContentType(e))?JSON.parse(e.responseText):e.responseText}function newXhr(){if("withCredentials"in new XMLHttpRequest)return new XMLHttpRequest;if(window.XDomainRequest)return new window.XDomainRequest;throw new Error("No CORS support.")}function xhrOpen(e,t,n){if(window.XDomainRequest&&e instanceof window.XDomainRequest&&/^https?:/.test(n)){var i=location$1.href.toString().match(/^(https?):/)[1];return void e.open(t,i+n.substr(n.indexOf(":")),!0)}e.open(t,n,!0)}function request(e,t,n,i){return new Promise(function(o,a){var r=newXhr(),s=function(){return o({url:t,input:n,output:parseOutput(r)})},d=function(e,i){return a({url:t,input:n,error:{code:e,message:i,statusCode:r.status}})},c=partial(d,networkError);xhrOpen(r,e,t),r.withCredentials=e!==GET,xhrOnProgress(r,i),r.onload=function(){null==r.status||r.status>=200&&r.status<300?s():c("http error "+r.status)},r.onabort=function(){return c("")},r.ontimeout=function(){return c("request timeout")},r.onerror=function(){return c("network error")},r.onprogress=function(){},null!=window.FormData&&n instanceof window.FormData?(r.timeout=networkTimeoutSubmitForm,r.send(n)):(r.timeout=networkTimeout,r.send(JSON.stringify(n)))})}function handleWebResponse(e,t,n){var i,o=e.dispatch,a=e.getState,r=t.input,s=t.output,d=a(),c=(i={},i[webActionTypes.getConfig]=function(e){e.features&&(setUseSessionCookie(!!e.features.useSessionCookie),e.features.disableCookie&&disableBrowserCookie()),o(updateConfig$1(e.customVaraibles?e:_extends({},e,{customVariableResult:isPoppedOut(d)?getCustomVariableResult(d):collectCustomVariables(e.customVariables)}))),o(sendPageVisit$1())},i[webActionTypes.getChatWindowConfig]=function(e){var t=e.messageLengthLimit||defaultMaxMessageLength;o(updateConfig$1(_extends({},e,{messageLengthLimit:t,features:_extends({},d.configuration.features,e.features)})))},i[webActionTypes.getCustomVariables]=function(e){var t="product service",n=["name","email","phone","company",t],i=splitObjectByKeys(e,n),a=i[0],r=i[1];a[t]&&(a.product=a[t],delete a[t]);var s=getPreChatCustomFields(d).map(function(e){return e.label}),c=splitObjectByKeys(r,s),l=c[0];o(updateFields$1(_extends({},a,{custom:l})))},i[webActionTypes.getChatButton]=function(e){var t=isDynamicCampaign(d);t&&o(setPageCampaignId$1(e.id)),o(updateButton$1({id:e.id,entity:_extends({},e,{divId:getChatButtonDivId(e.id)}),fetchStatus:done})),t&&emit("livechat.dynamicCampaign.change",e.id),getCampaign$1(o,a(),e.id).then(function(e){return o(ready$1()),new Promise(function(t){setTimeout(t,0,e)})}).then(function(e){var n=a();isPoppedOut(n)&&getWindowStatus(n)!==open&&(openType===chatWindowPopOut?o(getRestoreState$2()):(o(chatWindowOpen$1(getCampaignId(a()))),o(setWindowOpened()))),(t||r.alreadyCampaignId)&&o(setWindowId$1(e.id))})},i[webActionTypes.checkManualInvitation]=function(e){var t=0===r.campaignId,n=t?getCampaignId(d):r.campaignId;if(e&&e.agent&&!getInvitationObject(d)&&getWindowStatus(d)===close){var i=function(){var t=_extends({},e,{isManual:!0,campaignId:n});o(showInvitation$1(t)),emit("livechat.invitation.display",t)};e.type===embeddedWindow||e.type===bubble$1?o(sendGetChatWindowConfig$1()).then(i):i()}},i[webActionTypes.confirmAutoInvitation]=function(e){var t=0===r.campaignId,n=t?getCampaignId(d):r.campaignId;if(e&&!getInvitationObject(d)&&getWindowStatus(d)===close){var i=function(){var t=_extends({},e,{isManual:!1,campaignId:n});o(showInvitation$1(t)),emit("livechat.invitation.display",t)};e.type===embeddedWindow?o(sendGetChatWindowConfig$1()).then(i):i()}},i[webActionTypes.checkAutoInvitation]=function(e){null!=e&&e.forEach(function(e){var t=e.id,n=e.delay;setTimeout(function(){getWindowStatus(a())===close&&o(sendWebAction$1(getAgents(),confirmAutoInvitation(r.campaignId,t)))},1e3*n)})},i[webActionTypes.getIfOnline]=function(e){var t=e.campaignId,n=e.ifOnline;o(setButtonIsOnline$1(t,n))},i[webActionTypes.checkIfOnline]=function(e){var t=e.campaignId,n=e.ifOnline;o(setButtonIsOnline$1(t,n))},i[webActionTypes.batchAction]=function(e){for(var t=0;t0?i.custom[e.name]=e.value.split(splitter):i.custom[e.name]=e.value});else if("department"===o){var a=Object.keys(t).filter(function(n){return t[n].name===e.department});a.length>0?i[o]=Number(a[0]):i[o]=""}else"ssoId"===o&&"userId"===o&&"variables"===o||(i[o]=e[o])}),o(updateFields$1(i,sso))}},i[webActionTypes.refuseAutoInvitation]=function(){o(updatePageVisitorStatus$1(refusedByVisitor))},i[webActionTypes.refuseManualInvitation]=function(){o(updatePageVisitorStatus$1(refusedByVisitor))},i[webActionTypes.recoverVisitor]=function(e){o(updateChatVersion$1(e.baseVersion)),o(recoverSuccess$1())},i[webActionTypes.closeWindow]=function(){var e=getVisitorStatus(d);e!==waitingForChat&&e!==preChat&&e!==searchKB||o(updatePageVisitorStatus$1(inSite)),e===chatting$1&&o(updatePageVisitorStatus$1(chatEnded))},i);null!=r&&null!=c[r.type]&&c[r.type](s.payload)}function submit$2(e,t,n,i){var o=ownerDocument.defaultView,a=void 0,r=void 0,s=void 0,d=function(t){return r({url:e,input:n,output:t})},c=function(t,i){return s({url:e,input:n,error:{code:t,message:i}})},l=partial(c,networkError),u=t.formId,p=ownerDocument.getElementById(u),h=p.contentWindow.document,f=h.getElementById("form");f.action=e+"&formId="+u;var g=h.createElement("input");g.type="hidden",g.name="json",g.value=JSON.stringify(n),f.appendChild(g);var m=function(t){if(!(e.indexOf(t.origin)<0)){var n=void 0;try{n=JSON.parse(t.data)}catch(e){n={}}n.formId===u&&d(n.data)}};o.addEventListener("message",m);var b=function(){a=setTimeout(partial(l,"submit failed"),200)};p.addEventListener("load",b);var w=setTimeout(partial(l,"submit timeout"),networkTimeoutSubmitForm),v=function(e){return function(t){clearTimeout(a),clearTimeout(w),p.removeEventListener("load",b),o.removeEventListener("message",m),p.parentNode.removeChild(p),e(t)}};return new Promise(function(e,t){r=v(e),s=v(t),f.submit(),i&&i(null,function(){p.stop?p.stop():h.execCommand("stop"),l("")})})}function crossDomain(e,t,n){function i(t){e.postMessage(JSON.stringify(t),r)}function o(e){var t=function(t){t.origin===r&&e(t)};return(n?global$2:window).addEventListener("message",t),function(){return(n?global$2:window).removeEventListener("message",t)}}var a=/^file:\/\//i.test(t),r=a?"*":t.match(/^[^:]+:\/\/[^/]+/)[0];return{dispatch:i,subscribe:o}}function hasClass(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function addClass(e,t){hasClass(e,t)||(e.className=e.className+" "+t)}function removeClass(e,t){if(hasClass(e,t)){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}function getGlanceSessionInfo(){var e=get$1(glanceCookieKey);if(!e)return null;try{return JSON.parse(decodeURIComponent(e))}catch(e){return null}}function isDomainCookieWritable(e){var t="livechat-test-cookie-key";document$2.cookie=t+"=value;domain="+e;var n=document$2.cookie.indexOf(t+"=value")>=0;return document$2.cookie=t+"=;domain="+e+";expires=Thu, 01 Jan 1970 00:00:00 GMT;",n}function getPossibleDomain(e){if(!isDomainCookieWritable(e))return null;var t=e.split(".");if(t.length<=1)return e;t.shift();var n=t.join("."),i=getPossibleDomain(n);return i||e}function isCobrowseSupported(e){return!isPoppedOut(e)}function configureStore(e){return createStore(reducer,e,compose(enhancer,middleware$$1))}function proptype(){}function warning$1(e){try{throw new Error(e)}catch(e){}}function warnAboutReceivingStore(){didWarnAboutReceivingStore||(didWarnAboutReceivingStore=!0,warning$1(" does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/reactjs/react-redux/releases/tag/v2.0.0 for the migration instructions."))}function createProvider(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"store",n=arguments[1],i=n||t+"Subscription",o=function(e){function n(i,o){classCallCheck$1(this,n);var a=possibleConstructorReturn$1(this,e.call(this,i,o));return a[t]=i.store,a}return inherits$2(n,e),n.prototype.getChildContext=function(){var e;return e={},e[t]=this[t],e[i]=null,e},n.prototype.render=function(){return Children.only(this.props.children)},n}(Component);return o.prototype.componentWillReceiveProps=function(e){this[t]!==e.store&&warnAboutReceivingStore()},o.childContextTypes=(e={},e[t]=storeShape.isRequired,e[i]=subscriptionShape,e),o.displayName="Provider",o}function createListenerCollection(){var e=[],t=[];return{clear:function(){t=CLEARED,e=CLEARED},notify:function(){for(var n=e=t,i=0;i1&&void 0!==arguments[1]?arguments[1]:{},o=i.getDisplayName,a=void 0===o?function(e){return"ConnectAdvanced("+e+")"}:o,r=i.methodName,s=void 0===r?"connectAdvanced":r,d=i.renderCountProp,c=void 0===d?void 0:d,l=i.shouldHandleStateChanges,u=void 0===l||l,p=i.storeKey,f=void 0===p?"store":p,g=i.withRef,m=void 0!==g&&g,b=objectWithoutProperties$1(i,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),w=f+"Subscription",v=hotReloadingVersion++,y=(t={},t[f]=storeShape,t[w]=subscriptionShape,t),C=(n={},n[w]=subscriptionShape,n);return function(t){invariant("function"==typeof t,"You must pass a component to the function returned by connect. Instead received "+JSON.stringify(t));var n=t.displayName||t.name||"Component",i=a(n),o=_extends$2({},b,{getDisplayName:a,methodName:s,renderCountProp:c,shouldHandleStateChanges:u,storeKey:f,withRef:m,displayName:i,wrappedComponentName:n,WrappedComponent:t}),r=function(n){function a(e,t){classCallCheck$1(this,a);var o=possibleConstructorReturn$1(this,n.call(this,e,t));return o.version=v,o.state={},o.renderCount=0,o.store=e[f]||t[f],o.propsMode=Boolean(e[f]),o.setWrappedInstance=o.setWrappedInstance.bind(o),invariant(o.store,'Could not find "'+f+'" in either the context or props of "'+i+'". Either wrap the root component in a , or explicitly pass "'+f+'" as a prop to "'+i+'".'),o.initSelector(),o.initSubscription(),o}return inherits$2(a,n),a.prototype.getChildContext=function(){var e,t=this.propsMode?null:this.subscription;return e={},e[w]=t||this.context[w],e},a.prototype.componentDidMount=function(){u&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},a.prototype.componentWillReceiveProps=function(e){this.selector.run(e)},a.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},a.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=noop$2,this.store=null,this.selector.run=noop$2,this.selector.shouldComponentUpdate=!1},a.prototype.getWrappedInstance=function(){return invariant(m,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+s+"() call."),this.wrappedInstance},a.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},a.prototype.initSelector=function(){var t=e(this.store.dispatch,o);this.selector=makeSelectorStateful(t,this.store),this.selector.run(this.props)},a.prototype.initSubscription=function(){if(u){var e=(this.propsMode?this.props:this.context)[w];this.subscription=new Subscription(this.store,e,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},a.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(dummyState)):this.notifyNestedSubs()},a.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},a.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},a.prototype.addExtraProps=function(e){if(!(m||c||this.propsMode&&this.subscription))return e;var t=_extends$2({},e);return m&&(t.ref=this.setWrappedInstance),c&&(t[c]=this.renderCount++),this.propsMode&&this.subscription&&(t[w]=this.subscription),t},a.prototype.render=function(){var e=this.selector;if(e.shouldComponentUpdate=!1,e.error)throw e.error;return h(t,this.addExtraProps(e.props))},a}(Component);return r.WrappedComponent=t,r.displayName=i,r.childContextTypes=C,r.contextTypes=y,r.prototype.componentWillUpdate=function(){this.version!==v&&(this.version=v,this.initSelector(),this.subscription&&this.subscription.tryUnsubscribe(),this.initSubscription(),u&&this.subscription.trySubscribe())},index$1(r,t)}}function is$1(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function shallowEqual(e,t){if(is$1(e,t))return!0;if("object"!==(void 0===e?"undefined":_typeof$1(e))||null===e||"object"!==(void 0===t?"undefined":_typeof$1(t))||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var o=0;o=0;i--){var o=t[i](e);if(o)return o}return function(t,i){throw new Error("Invalid value of type "+(void 0===e?"undefined":_typeof$1(e))+" for "+n+" argument when connecting component "+i.wrappedComponentName+".")}}function strictEqual(e,t){return e===t}function createConnect(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.connectHOC,n=void 0===t?connectAdvanced:t,i=e.mapStateToPropsFactories,o=void 0===i?defaultMapStateToPropsFactories:i,a=e.mapDispatchToPropsFactories,r=void 0===a?defaultMapDispatchToPropsFactories:a,s=e.mergePropsFactories,d=void 0===s?defaultMergePropsFactories:s,c=e.selectorFactory,l=void 0===c?finalPropsSelectorFactory:c;return function(e,t,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=a.pure,c=void 0===s||s,u=a.areStatesEqual,p=void 0===u?strictEqual:u,h=a.areOwnPropsEqual,f=void 0===h?shallowEqual:h,g=a.areStatePropsEqual,m=void 0===g?shallowEqual:g,b=a.areMergedPropsEqual,w=void 0===b?shallowEqual:b,v=objectWithoutProperties$1(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),y=match(e,o,"mapStateToProps"),C=match(t,r,"mapDispatchToProps"),_=match(i,d,"mergeProps");return n(l,_extends$2({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:y,initMapDispatchToProps:C,initMergeProps:_,pure:c,areStatesEqual:p,areOwnPropsEqual:f,areStatePropsEqual:m,areMergedPropsEqual:w},v))}}function send$1(e){var t=global$2.GoogleAnalyticsObject;if(t){var n=global$2[t];try{for(var i=n.getAll(),o=0;o0)for(n=0;n0?"future":"past"];return isFunction(n)?n(t):n.replace(/%s/i,t)}function addUnitAlias(e,t){var n=e.toLowerCase();aliases[n]=aliases[n+"s"]=aliases[t]=e}function normalizeUnits(e){return"string"==typeof e?aliases[e]||aliases[e.toLowerCase()]:void 0}function normalizeObjectUnits(e){var t,n,i={};for(n in e)hasOwnProp(e,n)&&(t=normalizeUnits(n))&&(i[t]=e[n]);return i}function addUnitPriority(e,t){priorities[e]=t}function getPrioritizedUnits(e){var t=[];for(var n in e)t.push({unit:n,priority:priorities[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}function zeroFill(e,t,n){var i=""+Math.abs(e),o=t-i.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+i}function addFormatToken(e,t,n,i){var o=i;"string"==typeof i&&(o=function(){return this[i]()}),e&&(formatTokenFunctions[e]=o),t&&(formatTokenFunctions[t[0]]=function(){return zeroFill(o.apply(this,arguments),t[1],t[2])}),n&&(formatTokenFunctions[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function removeFormattingTokens(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function makeFormatFunction(e){var t,n,i=e.match(formattingTokens);for(t=0,n=i.length;t=0&&localFormattingTokens.test(e);)e=e.replace(localFormattingTokens,n),localFormattingTokens.lastIndex=0,i-=1;return e}function addRegexToken(e,t,n){regexes[e]=isFunction(t)?t:function(e,i){return e&&n?n:t}}function getParseRegexForToken(e,t){return hasOwnProp(regexes,e)?regexes[e](t._strict,t._locale):new RegExp(unescapeFormat(e))}function unescapeFormat(e){return regexEscape(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,i,o){return t||n||i||o}))}function regexEscape(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function addParseToken(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),isNumber(t)&&(i=function(e,n){n[t]=toInt(e)}),n=0;n=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function createUTCDate(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function firstWeekOffset(e,t,n){var i=7+t-n;return-(7+createUTCDate(e,0,i).getUTCDay()-t)%7+i-1}function dayOfYearFromWeeks(e,t,n,i,o){var a,r,s=(7+n-i)%7,d=firstWeekOffset(e,i,o),c=1+7*(t-1)+s+d;return c<=0?(a=e-1,r=daysInYear(a)+c):c>daysInYear(e)?(a=e+1,r=c-daysInYear(e)):(a=e,r=c),{year:a,dayOfYear:r}}function weekOfYear(e,t,n){var i,o,a=firstWeekOffset(e.year(),t,n),r=Math.floor((e.dayOfYear()-a-1)/7)+1;return r<1?(o=e.year()-1,i=r+weeksInYear(o,t,n)):r>weeksInYear(e.year(),t,n)?(i=r-weeksInYear(e.year(),t,n),o=e.year()+1):(o=e.year(),i=r),{week:i,year:o}}function weeksInYear(e,t,n){var i=firstWeekOffset(e,t,n),o=firstWeekOffset(e+1,t,n);return(daysInYear(e)-i+o)/7}function localeWeek(e){return weekOfYear(e,this._week.dow,this._week.doy).week}function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function getSetISOWeek(e){var t=weekOfYear(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function parseWeekday(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function parseIsoWeekday(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function localeWeekdays(e,t){return e?isArray$1(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:isArray$1(this._weekdays)?this._weekdays:this._weekdays.standalone}function localeWeekdaysShort(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function localeWeekdaysMin(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function handleStrictParse$1(e,t,n){var i,o,a,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)a=createUTC([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?(o=indexOf.call(this._weekdaysParse,r),-1!==o?o:null):"ddd"===t?(o=indexOf.call(this._shortWeekdaysParse,r),-1!==o?o:null):(o=indexOf.call(this._minWeekdaysParse,r),-1!==o?o:null):"dddd"===t?-1!==(o=indexOf.call(this._weekdaysParse,r))?o:-1!==(o=indexOf.call(this._shortWeekdaysParse,r))?o:(o=indexOf.call(this._minWeekdaysParse,r),-1!==o?o:null):"ddd"===t?-1!==(o=indexOf.call(this._shortWeekdaysParse,r))?o:-1!==(o=indexOf.call(this._weekdaysParse,r))?o:(o=indexOf.call(this._minWeekdaysParse,r),-1!==o?o:null):-1!==(o=indexOf.call(this._minWeekdaysParse,r))?o:-1!==(o=indexOf.call(this._weekdaysParse,r))?o:(o=indexOf.call(this._shortWeekdaysParse,r),-1!==o?o:null)}function localeWeekdaysParse(e,t,n){var i,o,a;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(o=createUTC([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(o,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(o,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(o,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[i]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}}function getSetDayOfWeek(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=parseWeekday(e,this.localeData()),this.add(e-t,"d")):t}function getSetLocaleDayOfWeek(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function getSetISODayOfWeek(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=parseIsoWeekday(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function weekdaysRegex(e){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(e){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(e){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function e(e,t){return t.length-e.length}var t,n,i,o,a,r=[],s=[],d=[],c=[];for(t=0;t<7;t++)n=createUTC([2e3,1]).day(t),i=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),a=this.weekdays(n,""),r.push(i),s.push(o),d.push(a),c.push(i),c.push(o),c.push(a);for(r.sort(e),s.sort(e),d.sort(e),c.sort(e),t=0;t<7;t++)s[t]=regexEscape(s[t]),d[t]=regexEscape(d[t]),c[t]=regexEscape(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}function meridiem(e,t){addFormatToken(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function matchMeridiem(e,t){return t._meridiemParse}function localeIsPM(e){return"p"===(e+"").toLowerCase().charAt(0)}function localeMeridiem(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function normalizeLocale(e){return e?e.toLowerCase().replace("_","-"):e}function chooseLocale(e){for(var t,n,i,o,a=0;a0;){if(i=loadLocale(o.slice(0,t).join("-")))return i;if(n&&n.length>=t&&compareArrays(o,n,!0)>=t-1)break;t--}a++}return null}function loadLocale(e){var t=null;if(!locales[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=globalLocale._abbr;require("./locale/"+e),getSetGlobalLocale(t)}catch(e){}return locales[e]}function getSetGlobalLocale(e,t){var n;return e&&(n=isUndefined(t)?getLocale(e):defineLocale(e,t))&&(globalLocale=n),globalLocale._abbr}function defineLocale(e,t){if(null!==t){var n=baseConfig;if(t.abbr=e,null!=locales[e])deprecateSimple("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=locales[e]._config;else if(null!=t.parentLocale){if(null==locales[t.parentLocale])return localeFamilies[t.parentLocale]||(localeFamilies[t.parentLocale]=[]),localeFamilies[t.parentLocale].push({name:e,config:t}),null;n=locales[t.parentLocale]._config}return locales[e]=new Locale(mergeConfigs(n,t)),localeFamilies[e]&&localeFamilies[e].forEach(function(e){defineLocale(e.name,e.config)}),getSetGlobalLocale(e),locales[e]}return delete locales[e],null}function updateLocale(e,t){if(null!=t){var n,i,o=baseConfig;i=loadLocale(e),null!=i&&(o=i._config),t=mergeConfigs(o,t),n=new Locale(t),n.parentLocale=locales[e],locales[e]=n,getSetGlobalLocale(e)}else null!=locales[e]&&(null!=locales[e].parentLocale?locales[e]=locales[e].parentLocale:null!=locales[e]&&delete locales[e]);return locales[e]}function getLocale(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return globalLocale;if(!isArray$1(e)){if(t=loadLocale(e))return t;e=[e]}return chooseLocale(e)}function listLocales(){return keys$2(locales)}function checkOverflow(e){var t,n=e._a;return n&&-2===getParsingFlags(e).overflow&&(t=n[MONTH]<0||n[MONTH]>11?MONTH:n[DATE]<1||n[DATE]>daysInMonth(n[YEAR],n[MONTH])?DATE:n[HOUR]<0||n[HOUR]>24||24===n[HOUR]&&(0!==n[MINUTE]||0!==n[SECOND]||0!==n[MILLISECOND])?HOUR:n[MINUTE]<0||n[MINUTE]>59?MINUTE:n[SECOND]<0||n[SECOND]>59?SECOND:n[MILLISECOND]<0||n[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(e)._overflowDayOfYear&&(tDATE)&&(t=DATE),getParsingFlags(e)._overflowWeeks&&-1===t&&(t=WEEK),getParsingFlags(e)._overflowWeekday&&-1===t&&(t=WEEKDAY),getParsingFlags(e).overflow=t),e}function defaults$2(e,t,n){return null!=e?e:null!=t?t:n}function currentDateArray(e){var t=new Date(hooks.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function configFromArray(e){var t,n,i,o,a,r=[];if(!e._d){for(i=currentDateArray(e),e._w&&null==e._a[DATE]&&null==e._a[MONTH]&&dayOfYearFromWeekInfo(e),null!=e._dayOfYear&&(a=defaults$2(e._a[YEAR],i[YEAR]),(e._dayOfYear>daysInYear(a)||0===e._dayOfYear)&&(getParsingFlags(e)._overflowDayOfYear=!0),n=createUTCDate(a,0,e._dayOfYear),e._a[MONTH]=n.getUTCMonth(),e._a[DATE]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[HOUR]&&0===e._a[MINUTE]&&0===e._a[SECOND]&&0===e._a[MILLISECOND]&&(e._nextDay=!0,e._a[HOUR]=0),e._d=(e._useUTC?createUTCDate:createDate).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[HOUR]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(getParsingFlags(e).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(e){var t,n,i,o,a,r,s,d;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)a=1,r=4,n=defaults$2(t.GG,e._a[YEAR],weekOfYear(createLocal(),1,4).year),i=defaults$2(t.W,1),((o=defaults$2(t.E,1))<1||o>7)&&(d=!0);else{a=e._locale._week.dow,r=e._locale._week.doy;var c=weekOfYear(createLocal(),a,r);n=defaults$2(t.gg,e._a[YEAR],c.year),i=defaults$2(t.w,c.week),null!=t.d?((o=t.d)<0||o>6)&&(d=!0):null!=t.e?(o=t.e+a,(t.e<0||t.e>6)&&(d=!0)):o=a}i<1||i>weeksInYear(n,a,r)?getParsingFlags(e)._overflowWeeks=!0:null!=d?getParsingFlags(e)._overflowWeekday=!0:(s=dayOfYearFromWeeks(n,i,o,a,r),e._a[YEAR]=s.year,e._dayOfYear=s.dayOfYear)}function configFromISO(e){var t,n,i,o,a,r,s=e._i,d=extendedIsoRegex.exec(s)||basicIsoRegex.exec(s);if(d){for(getParsingFlags(e).iso=!0,t=0,n=isoDates.length;t0&&getParsingFlags(e).unusedInput.push(a),r=r.slice(r.indexOf(n)+n.length),d+=n.length),formatTokenFunctions[o]?(n?getParsingFlags(e).empty=!1:getParsingFlags(e).unusedTokens.push(o),addTimeToArrayFromToken(o,n,e)):e._strict&&!n&&getParsingFlags(e).unusedTokens.push(o);getParsingFlags(e).charsLeftOver=s-d,r.length>0&&getParsingFlags(e).unusedInput.push(r),e._a[HOUR]<=12&&!0===getParsingFlags(e).bigHour&&e._a[HOUR]>0&&(getParsingFlags(e).bigHour=void 0),getParsingFlags(e).parsedDateParts=e._a.slice(0),getParsingFlags(e).meridiem=e._meridiem,e._a[HOUR]=meridiemFixWrap(e._locale,e._a[HOUR],e._meridiem),configFromArray(e),checkOverflow(e)}function meridiemFixWrap(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(i=e.isPM(n),i&&t<12&&(t+=12),i||12!==t||(t=0),t):t}function configFromStringAndArray(e){var t,n,i,o,a;if(0===e._f.length)return getParsingFlags(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;othis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted))return this._isDSTShifted;var e={};if(copyConfig(e,this),e=prepareConfig(e),e._a){var t=e._isUTC?createUTC(e._a):createLocal(e._a);this._isDSTShifted=this.isValid()&&compareArrays(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function isLocal(){return!!this.isValid()&&!this._isUTC}function isUtcOffset(){return!!this.isValid()&&this._isUTC}function isUtc(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function createDuration(e,t){var n,i,o,a=e,r=null;return isDuration(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:isNumber(e)?(a={},t?a[t]=e:a.milliseconds=e):(r=aspNetRegex.exec(e))?(n="-"===r[1]?-1:1,a={y:0,d:toInt(r[DATE])*n,h:toInt(r[HOUR])*n,m:toInt(r[MINUTE])*n,s:toInt(r[SECOND])*n,ms:toInt(absRound(1e3*r[MILLISECOND]))*n}):(r=isoRegex.exec(e))?(n="-"===r[1]?-1:(r[1],1),a={y:parseIso(r[2],n),M:parseIso(r[3],n),w:parseIso(r[4],n),d:parseIso(r[5],n),h:parseIso(r[6],n),m:parseIso(r[7],n),s:parseIso(r[8],n)}):null==a?a={}:"object"===(void 0===a?"undefined":_typeof(a))&&("from"in a||"to"in a)&&(o=momentsDifference(createLocal(a.from),createLocal(a.to)),a={},a.ms=o.milliseconds,a.M=o.months),i=new Duration(a),isDuration(e)&&hasOwnProp(e,"_locale")&&(i._locale=e._locale),i}function parseIso(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function positiveMomentsDifference(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function momentsDifference(e,t){var n;return e.isValid()&&t.isValid()?(t=cloneWithOffset(t,e),e.isBefore(t)?n=positiveMomentsDifference(e,t):(n=positiveMomentsDifference(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function createAdder(e,t){return function(n,i){var o,a;return null===i||isNaN(+i)||(deprecateSimple(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=i,i=a),n="string"==typeof n?+n:n,o=createDuration(n,i),addSubtract(this,o,e),this}}function addSubtract(e,t,n,i){var o=t._milliseconds,a=absRound(t._days),r=absRound(t._months);e.isValid()&&(i=null==i||i,r&&setMonth(e,get$3(e,"Month")+r*n),a&&set$3(e,"Date",get$3(e,"Date")+a*n),o&&e._d.setTime(e._d.valueOf()+o*n),i&&hooks.updateOffset(e,a||r)) }function getCalendarFormat(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function calendar$1(e,t){var n=e||createLocal(),i=cloneWithOffset(n,this).startOf("day"),o=hooks.calendarFormat(this,i)||"sameElse",a=t&&(isFunction(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,createLocal(n)))}function clone(){return new Moment(this)}function isAfter(e,t){var n=isMoment(e)?e:createLocal(e);return!(!this.isValid()||!n.isValid())&&(t=normalizeUnits(isUndefined(t)?"millisecond":t),"millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()9999?formatMoment(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",formatMoment(n,"Z")):formatMoment(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=t+'[")]';return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+o)}function format(e){e||(e=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var t=formatMoment(this,e);return this.localeData().postformat(t)}function from(e,t){return this.isValid()&&(isMoment(e)&&e.isValid()||createLocal(e).isValid())?createDuration({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function fromNow(e){return this.from(createLocal(),e)}function to(e,t){return this.isValid()&&(isMoment(e)&&e.isValid()||createLocal(e).isValid())?createDuration({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function toNow(e){return this.to(createLocal(),e)}function locale(e){var t;return void 0===e?this._locale._abbr:(t=getLocale(e),null!=t&&(this._locale=t),this)}function localeData(){return this._locale}function startOf(e){switch(e=normalizeUnits(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this}function endOf(e){return void 0===(e=normalizeUnits(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))}function valueOf(){return this._d.valueOf()-6e4*(this._offset||0)}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray$1(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function toObject$1(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend$1({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function addWeekYearFormatToken(e,t){addFormatToken(0,[e,e.length],0,t)}function getSetWeekYear(e){return getSetWeekYearHelper.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear(e){return getSetWeekYearHelper.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function getISOWeeksInYear(){return weeksInYear(this.year(),1,4)}function getWeeksInYear(){var e=this.localeData()._week;return weeksInYear(this.year(),e.dow,e.doy)}function getSetWeekYearHelper(e,t,n,i,o){var a;return null==e?weekOfYear(this,i,o).year:(a=weeksInYear(e,i,o),t>a&&(t=a),setWeekAll.call(this,e,t,n,i,o))}function setWeekAll(e,t,n,i,o){var a=dayOfYearFromWeeks(e,t,n,i,o),r=createUTCDate(a.year,0,a.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function getSetQuarter(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function getSetDayOfYear(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function parseMs(e,t){t[MILLISECOND]=toInt(1e3*("0."+e))}function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}function createUnix(e){return createLocal(1e3*e)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(e){return e}function get$4(e,t,n,i){var o=getLocale(),a=createUTC().set(i,t);return o[n](a,e)}function listMonthsImpl(e,t,n){if(isNumber(e)&&(t=e,e=void 0),e=e||"",null!=t)return get$4(e,t,n,"month");var i,o=[];for(i=0;i<12;i++)o[i]=get$4(e,i,n,"month");return o}function listWeekdaysImpl(e,t,n,i){"boolean"==typeof e?(isNumber(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,isNumber(t)&&(n=t,t=void 0),t=t||"");var o=getLocale(),a=e?o._week.dow:0;if(null!=n)return get$4(t,(n+a)%7,i,"day");var r,s=[];for(r=0;r<7;r++)s[r]=get$4(t,(r+a)%7,i,"day");return s}function listMonths(e,t){return listMonthsImpl(e,t,"months")}function listMonthsShort(e,t){return listMonthsImpl(e,t,"monthsShort")}function listWeekdays(e,t,n){return listWeekdaysImpl(e,t,n,"weekdays")}function listWeekdaysShort(e,t,n){return listWeekdaysImpl(e,t,n,"weekdaysShort")}function listWeekdaysMin(e,t,n){return listWeekdaysImpl(e,t,n,"weekdaysMin")}function abs(){var e=this._data;return this._milliseconds=mathAbs(this._milliseconds),this._days=mathAbs(this._days),this._months=mathAbs(this._months),e.milliseconds=mathAbs(e.milliseconds),e.seconds=mathAbs(e.seconds),e.minutes=mathAbs(e.minutes),e.hours=mathAbs(e.hours),e.months=mathAbs(e.months),e.years=mathAbs(e.years),this}function addSubtract$1(e,t,n,i){var o=createDuration(t,n);return e._milliseconds+=i*o._milliseconds,e._days+=i*o._days,e._months+=i*o._months,e._bubble()}function add$1(e,t){return addSubtract$1(this,e,t,1)}function subtract$1(e,t){return addSubtract$1(this,e,t,-1)}function absCeil(e){return e<0?Math.floor(e):Math.ceil(e)}function bubble$3(){var e,t,n,i,o,a=this._milliseconds,r=this._days,s=this._months,d=this._data;return a>=0&&r>=0&&s>=0||a<=0&&r<=0&&s<=0||(a+=864e5*absCeil(monthsToDays(s)+r),r=0,s=0),d.milliseconds=a%1e3,e=absFloor(a/1e3),d.seconds=e%60,t=absFloor(e/60),d.minutes=t%60,n=absFloor(t/60),d.hours=n%24,r+=absFloor(n/24),o=absFloor(daysToMonths(r)),s+=o,r-=absCeil(monthsToDays(o)),i=absFloor(s/12),s%=12,d.days=r,d.months=s,d.years=i,this}function daysToMonths(e){return 4800*e/146097}function monthsToDays(e){return 146097*e/4800}function as(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=normalizeUnits(e))||"year"===e)return t=this._days+i/864e5,n=this._months+daysToMonths(t),"month"===e?n:n/12;switch(t=this._days+Math.round(monthsToDays(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}}function valueOf$1(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*toInt(this._months/12):NaN}function makeAs(e){return function(){return this.as(e)}}function clone$1(){return createDuration(this)}function get$5(e){return e=normalizeUnits(e),this.isValid()?this[e+"s"]():NaN}function makeGetter(e){return function(){return this.isValid()?this._data[e]:NaN}}function weeks(){return absFloor(this.days()/7)}function substituteTimeAgo(e,t,n,i,o){return o.relativeTime(t||1,!!n,e,i)}function relativeTime$1(e,t,n){var i=createDuration(e).abs(),o=round(i.as("s")),a=round(i.as("m")),r=round(i.as("h")),s=round(i.as("d")),d=round(i.as("M")),c=round(i.as("y")),l=o<=thresholds.ss&&["s",o]||o0,l[4]=n,substituteTimeAgo.apply(null,l)}function getSetRelativeTimeRounding(e){return void 0===e?round:"function"==typeof e&&(round=e,!0)}function getSetRelativeTimeThreshold(e,t){return void 0!==thresholds[e]&&(void 0===t?thresholds[e]:(thresholds[e]=t,"s"===e&&(thresholds.ss=t-1),!0))}function humanize(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=relativeTime$1(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function sign(e){return(e>0)-(e<0)||+e}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,i=abs$1(this._milliseconds)/1e3,o=abs$1(this._days),a=abs$1(this._months);e=absFloor(i/60),t=absFloor(e/60),i%=60,e%=60,n=absFloor(a/12),a%=12;var r=n,s=a,d=o,c=t,l=e,u=i?i.toFixed(3).replace(/\.?0+$/,""):"",p=this.asSeconds();if(!p)return"P0D";var h=p<0?"-":"",f=sign(this._months)!==sign(p)?"-":"",g=sign(this._days)!==sign(p)?"-":"",m=sign(this._milliseconds)!==sign(p)?"-":"";return h+"P"+(r?f+r+"Y":"")+(s?f+s+"M":"")+(d?g+d+"D":"")+(c||l||u?"T":"")+(c?m+c+"H":"")+(l?m+l+"M":"")+(u?m+u+"S":"")}function formatDate(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"L",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";return hooks(e).locale(n).format(Array.isArray(t)?t[0]:t)}function parseDate(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"L",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en",i=hooks(e,t,n,!0);if(i.isValid())return i.toDate()}function formatDay$1(e){return e.toDateString()}function formatMonthTitle$1(e){return MONTHS[e.getMonth()]+" "+e.getFullYear()}function formatWeekdayShort$1(e){return WEEKDAYS_SHORT[e]}function formatWeekdayLong$1(e){return WEEKDAYS_LONG[e]}function getFirstDayOfWeek$1(){return 0}function getMonths$1(){return MONTHS}function toObject$2(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function shouldUseNative(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}function clone$2(e){return new Date(e.getTime())}function addMonths(e,t){var n=clone$2(e);return n.setMonth(e.getMonth()+t),n}function isSameDay(e,t){return!(!e||!t)&&(e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear())}function isDayBefore(e,t){return clone$2(e).setHours(0,0,0,0)clone$2(t).setHours(0,0,0,0)}function isPastDay(e){var t=new Date;return t.setHours(0,0,0,0),isDayBefore(e,t)}function isFutureDay(e){var t=new Date((new Date).getTime()+864e5);return t.setHours(0,0,0,0),e>=t}function isDayBetween(e,t,n){var i=clone$2(e);return i.setHours(0,0,0,0),isDayAfter(i,t)&&isDayBefore(i,n)||isDayAfter(i,n)&&isDayBefore(i,t)}function addDayToRange(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:null,to:null},n=t.from,i=t.to;return n?n&&i&&isSameDay(n,i)&&isSameDay(e,n)?(n=null,i=null):i&&isDayBefore(e,n)?n=e:i&&isSameDay(e,i)?(n=e,i=e):(i=e,isDayBefore(i,n)&&(i=n,n=e)):n=e,{from:n,to:i}}function isDayInRange(e,t){var n=t.from,i=t.to;return n&&isSameDay(e,n)||i&&isSameDay(e,i)||n&&i&&isDayBetween(e,n,i)}function getWeekNumber(e){var t=clone$2(e);return t.setHours(0,0,0),t.setDate(t.getDate()+4-(t.getDay()||7)),Math.ceil(((t-new Date(t.getFullYear(),0,1))/864e5+1)/7)}function cancelEvent(e){e.preventDefault(),e.stopPropagation()}function getFirstDayOfMonth(e){return new Date(e.getFullYear(),e.getMonth(),1,12)}function getDaysInMonth$1(e){var t=getFirstDayOfMonth(e);return t.setMonth(t.getMonth()+1),t.setDate(t.getDate()-1),t.getDate()}function getModifiersFromProps(e){var t=_extends({},e.modifiers);return e.selectedDays&&(t[e.classNames.selected]=e.selectedDays),e.disabledDays&&(t[e.classNames.disabled]=e.disabledDays),t}function getFirstDayOfWeekFromProps(e){var t=e.firstDayOfWeek,n=e.locale,i=void 0===n?"en":n,o=e.localeUtils,a=void 0===o?{}:o;return isNaN(t)?a.getFirstDayOfWeek?a.getFirstDayOfWeek(i):0:t}function isRangeOfDates(e){return!!(e&&e.from&&e.to)}function getMonthsDiff(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}function getWeekArray(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:getFirstDayOfWeek$1(),n=arguments[2],i=getDaysInMonth$1(e),o=[],a=[],r=[],s=1;s<=i;s+=1)o.push(new Date(e.getFullYear(),e.getMonth(),s,12));o.forEach(function(e){a.length>0&&e.getDay()===t&&(r.push(a),a=[]),a.push(e),o.indexOf(e)===o.length-1&&r.push(a)});for(var d=r[0],c=7-d.length;c>0;c-=1){var l=clone$2(d[0]);l.setDate(d[0].getDate()-1),d.unshift(l)}for(var u=r[r.length-1],p=u.length;p<7;p+=1){var h=clone$2(u[u.length-1]);h.setDate(u[u.length-1].getDate()+1),u.push(h)}if(n&&r.length<6)for(var f=void 0,g=r.length;g<6;g+=1){f=r[r.length-1];for(var m=f[f.length-1],b=[],w=0;w<7;w+=1){var v=clone$2(m);v.setDate(m.getDate()+w+1),b.push(v)}r.push(b)}return r}function startOfMonth(e){var t=clone$2(e);return t.setDate(1),t.setHours(12,0,0,0),t}function getDayNodes(e,t){var n=void 0;n=t===defaultClassNames?t.day+"--"+t.outside:""+t.outside;var i=t.day.replace(/ /g,"."),o=n.replace(/ /g,"."),a="."+i+":not(."+o+")";return e.querySelectorAll(a)}function nodeListToArray(e){return Array.prototype.slice.call(e,0)}function hasOwnProp$1(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function handleEvent(e,t,n){if(e)return function(i){e(t,n,i)}}function dayMatchesModifier(e,t){return!!t&&(Array.isArray(t)?t:[t]).some(function(t){return!!t&&(t instanceof Date?isSameDay(e,t):isRangeOfDates(t)?isDayInRange(e,t):t.after&&t.before&&isDayAfter(t.before,t.after)?isDayAfter(e,t.after)&&isDayBefore(e,t.before):t.after&&t.before&&(isDayAfter(t.after,t.before)||isSameDay(t.after,t.before))?isDayAfter(e,t.after)||isDayBefore(e,t.before):t.after?isDayAfter(e,t.after):t.before?isDayBefore(e,t.before):t.daysOfWeek?t.daysOfWeek.some(function(t){return e.getDay()===t}):"function"==typeof t&&t(e))})}function getModifiersForDay(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce(function(n,i){var o=t[i];return dayMatchesModifier(e,o)&&n.push(i),n},[])}function isDate$1(e){return e instanceof Date&&!isNaN(e.valueOf())}function defaultFormat(e){if(isDate$1(e)){return e.getFullYear()+"-"+(""+(e.getMonth()+1))+"-"+(""+e.getDate())}return""}function defaultParse(e){if("string"==typeof e){var t=e.split("-");if(3===t.length){var n=parseInt(t[0],10),i=parseInt(t[1],10)-1,o=parseInt(t[2],10);if(!(isNaN(n)||isNaN(i)||isNaN(o)||o<=0||o>31||i<0||i>=12))return new Date(n,i,o)}}}function updateErrorMessage(e,t){if(e.isRequired){if(!e.value&&!e.error)return Object.assign({},e,{error:t.promptRequired});if(e.value&&e.error)return Object.assign({},e,{error:""})}return e}function updateFields$2(e,t){return function(n){for(var i=arguments.length,o=Array(i>1?i-1:0),a=1;a0){var n=e[e.length-1];if(isVisitorMessage(n))return n.meta.isLast=!1,e.concat(Object.assign({},t,{meta:{isLast:!0}}))}return e.concat(Object.assign({},t,{meta:{isFirst:!0}}))}function hasClass$1(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function removeClass$1(e,t){if(hasClass$1(e,t)){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}function getVisitorMsgRestrictUnlockTime(){var e=getPersistent(visitorMsgRestritUnlockTimeKey);return void 0!==e&&null!==e&&""!==e?new Date(+e):null}function modifyPenaltyFactory(){return penaltyFactor*=2,penaltyFactor>Math.pow(2,config.repeat-1)&&(penaltyFactor=1),updateChatInfo(chatGUID,{frequencyLimit:updateFrequencyLimit(penaltyFactorKey,penaltyFactor)}),penaltyFactor}function setRecentMessageToCookie(){updateChatInfo(chatGUID,{frequencyLimit:updateFrequencyLimit(visitorMsgSentTimeKey,recentMsgSentTime.join(":"))})}function clearMessageTimeOutQueue(){messageTimeOutQueue.forEach(function(e){clearTimeout(e)}),messageTimeOutQueue=[]}function clearLimitTimer(){limitTimer&&clearTimeout(limitTimer),limitTimer=null}function clearLimit(){setLimitState(!1),recentMsgSentTime=[],clearMessageTimeOutQueue(),clearLimitTimer(),updateChatInfo(chatGUID,{frequencyLimit:updateFrequencyLimit(visitorMsgRestritUnlockTimeKey,"")}),updateChatInfo(chatGUID,{frequencyLimit:updateFrequencyLimit(visitorMsgSentTimeKey,"")})}function setLimit(){var e=config.penalty*penaltyFactor*1e3;updateChatInfo(chatGUID,{frequencyLimit:updateFrequencyLimit(visitorMsgRestritUnlockTimeKey,(new Date).getTime()+e)}),setLimitState(!0),limitTimer=setTimeout(clearLimit,e),modifyPenaltyFactory()}function ifShouldLimit(){return!!limitTimer||!(recentMsgSentTime.length<=config.count)&&(setLimit(),!0)}function clearMessage(){recentMsgSentTime.shift(),messageTimeOutQueue.shift(),setRecentMessageToCookie()}function addMessage(){if(!limitTimer){recentMsgSentTime.push((new Date).getTime()),setRecentMessageToCookie();var e=setTimeout(clearMessage,1e3*config.duration);messageTimeOutQueue.push(e)}}function timeClock(){timeClockHandler=setInterval(function(){var e=ifShouldLimit(),t=Math.max(0,Math.floor((getVisitorMsgRestrictUnlockTime()-(new Date).getTime())/1e3));e&&t>0?callback(t):(callback(0),stopTimeClock())},1e3)}function execute(e,t){var n=Math.random().toString();return getCrossDomain(t).then(function(t){return new Promise(function(i,o){var a=_extends({meta:n},e);cache$1[a.meta]={resolve:i,reject:o},t.dispatch(a)})})}function getIcons(e){if(!getIfDisplayChatTools(e))return[];if(getIsChatbot(e))return[];var t=getWindowId(e),n=isSendFileEnabled(e),i=getChatToolUpload(e,t),o=n&&i,a=getChatToolAudio(e,t),r=getChatToolVideo(e,t);return[o&&SendFile,a&&Audio$1,r&&Video$2].filter(function(e){return e})}function updateImage(e){if(e)for(var t=e.querySelectorAll("img"),n=0;n=maxStoreError&&errors.shift(),errors.push(e)}function getStoredErrors(){return errors}var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},_global=createCommonjsModule(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),_core=createCommonjsModule(function(e){var t=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=t)}),_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},_extends=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n},possibleConstructorReturn=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},_isObject=function(e){return"object"===(void 0===e?"undefined":_typeof(e))?null!==e:"function"==typeof e},_anObject=function(e){if(!_isObject(e))throw TypeError(e+" is not an object!");return e},_fails=function(e){try{return!!e()}catch(e){return!0}},_descriptors=!_fails(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),document$1=_global.document,is=_isObject(document$1)&&_isObject(document$1.createElement),_domCreate=function(e){return is?document$1.createElement(e):{}},_ie8DomDefine=!_descriptors&&!_fails(function(){return 7!=Object.defineProperty(_domCreate("div"),"a",{get:function(){return 7}}).a}),_toPrimitive=function(e,t){if(!_isObject(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!_isObject(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!_isObject(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!_isObject(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")},dP=Object.defineProperty,f=_descriptors?Object.defineProperty:function(e,t,n){if(_anObject(e),t=_toPrimitive(t,!0),_anObject(n),_ie8DomDefine)try{return dP(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e},_objectDp={f:f},_propertyDesc=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},_hide=_descriptors?function(e,t,n){return _objectDp.f(e,t,_propertyDesc(1,n))}:function(e,t,n){return e[t]=n,e},hasOwnProperty$1={}.hasOwnProperty,_has=function(e,t){return hasOwnProperty$1.call(e,t)},id=0,px=Math.random(),_uid=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++id+px).toString(36))},_redefine=createCommonjsModule(function(e){var t=_uid("src"),n=Function.toString,i=(""+n).split("toString");_core.inspectSource=function(e){return n.call(e)},(e.exports=function(e,n,o,a){var r="function"==typeof o;r&&(_has(o,"name")||_hide(o,"name",n)),e[n]!==o&&(r&&(_has(o,t)||_hide(o,t,e[n]?""+e[n]:i.join(String(n)))),e===_global?e[n]=o:a?e[n]?e[n]=o:_hide(e,n,o):(delete e[n],_hide(e,n,o)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[t]||n.call(this)})}),_aFunction=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},_ctx=function(e,t,n){if(_aFunction(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,o){return e.call(t,n,i,o)}}return function(){return e.apply(t,arguments)}},PROTOTYPE="prototype",$export=function e(t,n,i){var o,a,r,s,d=t&e.F,c=t&e.G,l=t&e.S,u=t&e.P,p=t&e.B,h=c?_global:l?_global[n]||(_global[n]={}):(_global[n]||{}).prototype,f=c?_core:_core[n]||(_core[n]={}),g=f.prototype||(f.prototype={});c&&(i=n);for(o in i)a=!d&&h&&void 0!==h[o],r=(a?h:i)[o],s=p&&a?_ctx(r,_global):u&&"function"==typeof r?_ctx(Function.call,r):r,h&&_redefine(h,o,r,t&e.U),f[o]!=r&&_hide(f,o,s),u&&g[o]!=r&&(g[o]=r)};_global.core=_core,$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128;var _export=$export,toString={}.toString,_cof=function(e){return toString.call(e).slice(8,-1)},_iobject=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==_cof(e)?e.split(""):Object(e)},_defined=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e},_toObject=function(e){return Object(_defined(e))},ceil=Math.ceil,floor=Math.floor,_toInteger=function(e){return isNaN(e=+e)?0:(e>0?floor:ceil)(e)},min=Math.min,_toLength=function(e){return e>0?min(_toInteger(e),9007199254740991):0},_isArray=Array.isArray||function(e){return"Array"==_cof(e)},SHARED="__core-js_shared__",store=_global["__core-js_shared__"]||(_global["__core-js_shared__"]={}),_shared=function(e){return store[e]||(store[e]={})},_wks=createCommonjsModule(function(e){var t=_shared("wks"),n=_global.Symbol,i="function"==typeof n;(e.exports=function(e){return t[e]||(t[e]=i&&n[e]||(i?n:_uid)("Symbol."+e))}).store=t}),SPECIES=_wks("species"),_arraySpeciesConstructor=function(e){var t;return _isArray(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!_isArray(t.prototype)||(t=void 0),_isObject(t)&&null===(t=t[SPECIES])&&(t=void 0)),void 0===t?Array:t},_arraySpeciesCreate=function(e,t){return new(_arraySpeciesConstructor(e))(t)},_arrayMethods=function(e,t){var n=1==e,i=2==e,o=3==e,a=4==e,r=6==e,s=5==e||r,d=t||_arraySpeciesCreate;return function(t,c,l){for(var u,p,h=_toObject(t),f=_iobject(h),g=_ctx(c,l,3),m=_toLength(f.length),b=0,w=n?d(t,m):i?d(t,0):void 0;m>b;b++)if((s||b in f)&&(u=f[b],p=g(u,b,h),e))if(n)w[b]=p;else if(p)switch(e){case 3:return!0;case 5:return u;case 6:return b;case 2:w.push(u)}else if(a)return!1;return r?-1:o||a?a:w}},UNSCOPABLES=_wks("unscopables"),ArrayProto=Array.prototype;void 0==ArrayProto[UNSCOPABLES]&&_hide(ArrayProto,UNSCOPABLES,{});var _addToUnscopables=function(e){ArrayProto[UNSCOPABLES][e]=!0},$find=_arrayMethods(6),KEY="findIndex",forced=!0;KEY in[]&&Array(1)[KEY](function(){forced=!1}),_export(_export.P+_export.F*forced,"Array",{findIndex:function(e){return $find(this,e,arguments.length>1?arguments[1]:void 0)}}),_addToUnscopables(KEY);var $find$1=_arrayMethods(5),KEY$1="find",forced$1=!0;"find"in[]&&Array(1).find(function(){forced$1=!1}),_export(_export.P+_export.F*forced$1,"Array",{find:function(e){return $find$1(this,e,arguments.length>1?arguments[1]:void 0)}}),_addToUnscopables("find"),_export(_export.S,"Number",{isNaN:function(e){return e!=e}});var _toIobject=function(e){return _iobject(_defined(e))},max=Math.max,min$1=Math.min,_toIndex=function(e,t){return e=_toInteger(e),e<0?max(e+t,0):min$1(e,t)},_arrayIncludes=function(e){return function(t,n,i){var o,a=_toIobject(t),r=_toLength(a.length),s=_toIndex(i,r);if(e&&n!=n){for(;r>s;)if((o=a[s++])!=o)return!0}else for(;r>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},shared=_shared("keys"),_sharedKey=function(e){return shared[e]||(shared[e]=_uid(e))},arrayIndexOf=_arrayIncludes(!1),IE_PROTO=_sharedKey("IE_PROTO"),_objectKeysInternal=function(e,t){var n,i=_toIobject(e),o=0,a=[];for(n in i)n!=IE_PROTO&&_has(i,n)&&a.push(n);for(;t.length>o;)_has(i,n=t[o++])&&(~arrayIndexOf(a,n)||a.push(n));return a},_enumBugKeys="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),_objectKeys=Object.keys||function(e){return _objectKeysInternal(e,_enumBugKeys)},f$1=Object.getOwnPropertySymbols,_objectGops={f:f$1},f$2={}.propertyIsEnumerable,_objectPie={f:f$2},$assign=Object.assign,_objectAssign=!$assign||_fails(function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[n]||Object.keys($assign({},t)).join("")!=i})?function(e,t){for(var n=_toObject(e),i=arguments.length,o=1,a=_objectGops.f,r=_objectPie.f;i>o;)for(var s,d=_iobject(arguments[o++]),c=a?_objectKeys(d).concat(a(d)):_objectKeys(d),l=c.length,u=0;l>u;)r.call(d,s=c[u++])&&(n[s]=d[s]);return n}:$assign;_export(_export.S+_export.F,"Object",{assign:_objectAssign});var promise=createCommonjsModule(function(e){!function(t){function n(){}function i(e,t){return function(){e.apply(t,arguments)}}function o(e){if("object"!==_typeof(this))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],l(e,this)}function a(e,t){for(;3===e._state;)e=e._value;if(0===e._state)return void e._deferreds.push(t);e._handled=!0,o._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._state?r:s)(t.promise,e._value);var i;try{i=n(e._value)}catch(e){return void s(t.promise,e)}r(t.promise,i)})}function r(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===(void 0===t?"undefined":_typeof(t))||"function"==typeof t)){var n=t.then;if(t instanceof o)return e._state=3,e._value=t,void d(e);if("function"==typeof n)return void l(i(n,t),e)}e._state=1,e._value=t,d(e)}catch(t){s(e,t)}}function s(e,t){e._state=2,e._value=t,d(e)} function d(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t-1){var i=o[n];return n>0&&(o.slice(n,1),o.unshift(i)),i.value}}function i(t,i){n(t)||(o.unshift({key:t,value:i}),o.length>e&&o.pop())}var o=[];return{get:n,put:i}}t.__esModule=!0,t.default=n}),singletonCache_1=createCommonjsModule(function(e,t){function n(e){var t=void 0;return{get:function(n){if(t&&e(n,t.key))return t.value},put:function(e,n){t={key:e,value:n}}}}t.__esModule=!0,t.default=n}),memoize_1=createCommonjsModule(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return 1===e?(0,d.default)(t):(0,s.default)(e,t)}function o(e,t){var n=t?(0,r.default)(e,t):e;return function(e,t){if(e.length!==t.length)return!1;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:e,i=arguments[1],o=t[i.type];return void 0===o?n:o(n,i.payload,i.config)}},getValueDeeply=function(e,t){for(var n=t.split("."),i=e,o=0;o1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e},s=n<.5?n*(1+t):n+t-n*t,d=2*n-s;i=r(d,s,e+1/3),o=r(d,s,e),a=r(d,s,e-1/3)}return[Math.round(255*i),Math.round(255*o),Math.round(255*a)]},rgbToHsl=function(e,t,n){var i=e/255,o=t/255,a=n/255,r=Math.max(i,o,a),s=Math.min(i,o,a),d=0,c=0,l=(r+s)/2;if(r!==s){var u=r-s;switch(c=l>.5?u/(2-r-s):u/(r+s),r){case i:d=(o-a)/u+(o=.1?(c=Math.min(s+.2,1),l=Math.max(d-.15,0)):(c=s,l=Math.max(0,d-.2));var u=hsbToRgb(r,c,l);return"linear-gradient(to right,"+e+",rgb("+u[0]+","+u[1]+","+u[2]+"))"},getAgentMessageBackground=function(e){var t=getRgbFormColor(e),n=t[0],i=t[1],o=t[2],a=void 0;if(n===i&&i===o&&(0!==o&&255!==o||(a=hsbToRgb(0,0,.98))),!a){var r=rgbToHsb(n,i,o),s=r[0];a=r[1]>=.1?hsbToRgb(s,.02,.98):hsbToRgb(s,0,.96)}var d=a;return"rgb("+d[0]+","+d[1]+","+d[2]+")"},colorLightness=function(e,t){var n=getRgbFormColor(e),i=rgbToHsl(n[0],n[1],n[2]);return 0===i[2]?"#212121":(i[2]*=t,hslToRgb(i[0],i[1],i[2]).reduce(function(e,t){var n=e,i=t.toString(16);return 1===i.length&&(i="0"+i),n+=i},"#"))},checkIfLightColor=function(e){if(!e)return!1;var t=hexToRgb(e);return(299*t[0]+587*t[1]+114*t[2])/1e3/255>.7},getVisitorMessageBackground=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=checkIfLightColor(e),i=getRgbFormColor(e),o=i[0],a=i[1],r=i[2],s=rgbToHsb(o,a,r),d=s[0],c=s[1],l=s[2],u=void 0,p=void 0;c>=.1?(u=Math.min(c+.2,1),p=l):(u=c,p=Math.max(0,l-.2));var h=hsbToRgb(d,u,p),f=h[0],g=h[1],m=h[2],b=t;0===t&&(b=n?.4:.7);var w=colorOpacityFromRGB(f,g,m,b);return"rgb("+w[0]+","+w[1]+","+w[2]+")"},getButtonColor=function(e){var t=getRgbFormColor(e),n=t[0],i=t[1],o=t[2],a=rgbToHsb(n,i,o),r=a[0],s=a[1],d=a[2],c=void 0,l=void 0;c=s>=.05&&s<=.4?.4:s,l=d>.8?.8:d,s<.05&&d>.6&&(c=s,l=.6);var u=hsbToRgb(r,c,l);return"rgb("+u[0]+","+u[1]+","+u[2]+")"},getAdaptiveButtonColor=function(e){var t=getRgbFormColor(e),n=t[0],i=t[1],o=t[2],a=rgbToHsb(n,i,o),r=a[0],s=a[1],d=a[2],c=void 0,l=void 0,u=void 0;r>=40&&r<=100?s>=.4?(c=0,l=0,u=1):d>=.9?(c=r,l=.5,u=.5):(c=0,l=0,u=1):s>=.2?(c=0,l=0,u=1):d>=.9?(c=r,l=.5,u=.5):(c=0,l=0,u=1),255===n&&255===i&&255===o&&(c=0,l=0,u=.5);var p=hsbToRgb(c,l,u);return"rgb("+p[0]+","+p[1]+","+p[2]+")"},getButtonHoverColor=function(e){var t=getRgbFormColor(e),n=t[0],i=t[1],o=t[2],a=rgbToHsb(n,i,o),r=a[0],s=a[1],d=a[2],c=void 0;c=d>.2?d-.1:d+.1;var l=hsbToRgb(r,s,c);return"rgb("+l[0]+","+l[1]+","+l[2]+")"},fix2=function(e){return e<10?"0"+e:""+e},formatMessageTime=function(e){var t=e.getHours(),n=e.getMinutes();return fix2(t)+":"+fix2(n)},isEnterKey=function(e){var t=e;return 13===(t.charCode||t.which||t.keyCode)&&!t.shiftKey},isBackspaceKey=function(e){var t=e;return 8===(t.charCode||t.which||t.keyCode)&&!t.shiftKey},isDelKey=function(e){var t=e;return 46===(t.charCode||t.which||t.keyCode)&&!t.shiftKey},getQueryString=function(e,t){var n=new RegExp("(&?)"+t+"=([^&]*)(&|$)","i"),i=e.match(n);return null!=i?decodeURIComponent(i[2]):null},getHost=function(e){var t=/:\/\/([^/]+)\/?/.exec(e);return t&&t[1]},htmlEncode=function(e){var t=document.createElement("div");void 0!==t.textContent?t.textContent=e:t.innerText=e;var n=t.innerHTML;return t=null,n},createLinkComponent=function(e){var t=e;return/^https:\/\/|http:\/\/|ftp:\/\//i.test(e)||(t="http://"+e),h("a",{href:t,target:"_blank",rel:"noopener noreferrer"},e)},isPromise=function(e){return!!e&&("function"==typeof e.then&&"function"==typeof e.catch)},throttle=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=void 0,o=void 0,a=void 0,r=null,s=0,d=!1,c=function(){s=!1===n.leading?0:Date.now(),r=null,a=e.apply(i,o),isPromise(a)&&(d=!0,a.then(function(){d=!1},function(){d=!1})),i=null,o=null};return function(){if(d)return a;for(var l=arguments.length,u=Array(l),p=0;pt?(clearTimeout(r),r=null,s=h,a=e.apply(i,o),isPromise(a)&&(d=!0,a.then(function(){d=!1},function(){d=!1})),o=null,i=null):r||!0!==n.trailing||(r=setTimeout(c,f)),a}},debounce=function(e,t,n){var i=void 0,o=void 0,a=void 0,r=void 0,s=void 0,d=function d(){var c=Date.now()-a;c0?s=setTimeout(d,t-c):(s=null,n||(r=e.apply(i,o),s||(i=null,o=null)))};return function(){i=this;for(var c=arguments.length,l=Array(c),u=0;u=0||ua.indexOf("trident/")>=0,isSafari=ua.indexOf("safari")>=0&&ua.indexOf("chrome")<0,isIE11=ua.indexOf("trident/7.0")>=0,isIE10=ua.indexOf("msie 10")>=0,isIE9=ua.indexOf("msie 9")>=0,isEdge=ua.indexOf("edge")>=0,isChrome=ua.indexOf("chrome")>=0,isFirefox=ua.indexOf("firefox")>=0,isIphone=ua.toLowerCase().indexOf("iphone")>=0,isAnimationSupported=function(){return void 0!==document.createElement("a").style.animationName||!1}(),splitObjectByKeys=function(e,t){var n={};t.forEach(function(e){n[e.toLowerCase()]=e});var i={},o={};return Object.keys(e).forEach(function(t){var a=n[t.toLowerCase()];a?i[a]=e[t]:o[t]=e[t]}),[i,o]},registerAnimationEnd=function(e,t){e&&(e.addEventListener("animationend",t,!1),e.addEventListener("webkitAnimationEnd",t,!1))},unregisterAnimationEnd=function(e,t){e&&(e.removeEventListener("animationend",t),e.removeEventListener("webkitAnimationEnd",t))},registerActivityListener=function(e,t,n){if(e)if(n)e.addEventListener("touchstart",t,!1);else if(e.addEventListener("mousemove",t,!1),e.addEventListener("mousedown",t,!1),e.addEventListener("keydown",t,!1),e.addEventListener("keyup",t,!1),isFirefox)e.addEventListener("DOMMouseScroll",t,!1);else{var i=e;i.onmousewheel=t}},removeActivityListener=function(e,t,n){if(e)if(n)e.removeEventListener("touchstart",t,!1);else if(e.removeEventListener("mousemove",t),e.removeEventListener("mousedown",t),e.removeEventListener("keydown",t),e.removeEventListener("keyup",t),isFirefox)e.removeEventListener("DOMMouseScroll",t);else{var i=e;i.onmousewheel=null}},keys={hidden:"visibilitychange",webkitHidden:"webkitvisibilitychange",mozHidden:"mozvisibilitychange",msHidden:"msvisibilitychange"},onWindowVisible=function(){var e=null,t=null;return Object.keys(keys).forEach(function(n){n in document&&(e=keys[n],t=n)}),function(n){return n&&document.addEventListener(e,n),!document[t]}}(),removeWindowVisible=function(){var e=null;return Object.keys(keys).forEach(function(t){t in document&&(e=keys[t])}),function(t){t&&document.removeEventListener(e,t)}}(),ommit=function(e,t,n){for(var i=0,o=e.length,a=e.split(""),r=-1,s=[],d=0;d=0&&r<=128?1:2)>=t&&i<=t+n&&s.push(a[d]);return s.join("")+" ..."},once=function(e){return function(){var t=!1,n=void 0;return function(){return t?n:(t=!0,n=e.apply(void 0,arguments))}}()},ENTER=13,SPACE=20,filterScriptTag=function(e){for(var t=/(<\/?script\b[^>]*>)/gm,n=e,i=t.exec(e);i;)n=n.replace(i[1],htmlEncode(i[1])),i=t.exec(e);return n},filterStyleTag=function(e){for(var t=/(<\/?style\b[^>]*>)/gm,n=e,i=t.exec(e);i;)n=n.replace(i[1],htmlEncode(i[1])),i=t.exec(e);return n},openWindowWithPost=function(e,t){var n=document.createElement("form");n.setAttribute("method","POST"),n.setAttribute("action",e),n.setAttribute("target","Transcript");var i=document.createElement("input");i.type="hidden",i.name="transcript",i.value=t,n.appendChild(i),document.body.appendChild(n),window.open(e,"Transcript"),n.submit(),document.body.removeChild(n)},isCopyKey=function(e){var t=e;return 86===(t.charCode||t.which||t.keyCode)&&(t.ctrlKey||isSafari&&t.metaKey) },centered="centered",topLeft="topLeft",topMiddle="topMiddle",topRight="topRight",bottomLeft="bottomLeft",bottomMiddle="bottomMiddle",bottomRight="bottomRight",leftMiddle="leftMiddle",rightMiddle="rightMiddle",leftBottom="leftBottom",rightBottom="rightBottom",mainColor="#000001",mainLightColor="#000002",buttonHoverColor="#000003",mainTextColor="#000004",mainHeavyTextColor="#000005",darkColor="#000006",linkBorderColor="#000007",linkBorderHeavyColor="#000008",visitorMessageLinkColor="#000009",buttonColor="#00000a",adaptiveButtonColor="#00000b",css='.DayPicker-wrapper,.btn{-moz-user-select:none;-ms-user-select:none}.btn,.select-box .select,button{-webkit-appearance:none}.btn,.buttonProgressBtnDefaultSize{width:100%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.btn,.buttonProgressContainer{position:relative;text-align:center}button{margin:0;padding:0;font-family:"SourceSans Pro",Arial;outline:0}.article-summary,.article-title,.btn{font-family:"SourceSans Pro"}.global-showFocus button:focus{outline:#000001 auto 5px}.btn{text-decoration:none;zoom:1;display:inline-block;margin-bottom:0;font-size:.93333rem;font-weight:400;cursor:pointer;background-image:none;border:1px solid transparent;line-height:1.7;padding:4px 10px;border-radius:5px;-webkit-user-select:none;user-select:none;background-color:inherit;max-width:270px}.container-checkbox,.control,.control .radioText{line-height:1.2rem}.window--mobile:not(.window--ipad) .btn{max-width:unset}.window--circular .btn{border-radius:20px}.disabled{opacity:.6;filter:alpha(opacity=60);cursor:default;box-shadow:none!important}.btn-primary{color:#000004;background:#00000a;border:1px solid #00000a}.btn-primary.disabled{background-color:#00000a!important;border:1px solid #00000a!important}.btn-primary:focus,.btn-primary:hover{background:#000003;border:1px solid #000003;text-decoration:none}.btn-primary:active{background:#000003;border:1px solid #000003;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-grey{color:#000;background:#c4c4c4;border:1px solid #c4c4c4}.btn-grey:focus,.btn-grey:hover{background:#afafaf;border:1px solid #afafaf;text-decoration:none}.btn-grey:active{background:#c4c4c4;border:1px solid #c4c4c4;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.buttonProgressBtnAnimated{-webkit-animation-fill-mode:both;animation-fill-mode:both}.buttonProgressContainerLoading .buttonProgressBtnAnimated,.buttonProgressContainerSuccess .buttonProgressBtnAnimated{-webkit-animation-name:form__submit--loading;animation-name:form__submit--loading;-webkit-animation-duration:.4s;animation-duration:.4s;cursor:default}.window--ie .buttonProgressContainerLoading .buttonProgressBtnAnimated{-webkit-animation:none;animation:none;opacity:.65}@-webkit-keyframes form__submit--loading{0%{border-radius:20px;text-indent:999em;background:#00000a;border:1px solid #00000a;width:128px;text-overflow:clip}99%{border-radius:32px;text-indent:999em;background:0 0;border:1px solid transparent;width:32px;text-overflow:clip}100%{border-radius:32px;text-indent:999em;background:0 0;border:1px solid transparent;width:32px;opacity:0;text-overflow:clip}}@keyframes form__submit--loading{0%{border-radius:20px;text-indent:999em;background:#00000a;border:1px solid #00000a;width:128px;text-overflow:clip}99%{border-radius:32px;text-indent:999em;background:0 0;border:1px solid transparent;width:32px;text-overflow:clip}100%{border-radius:32px;text-indent:999em;background:0 0;border:1px solid transparent;width:32px;opacity:0;text-overflow:clip}}.lds-css,.lds-rolling{width:32px;height:32px}.buttonProgress__layerCircle,.buttonProgress__layerLoading,.buttonProgress__layerSuccess,.lds-css{position:absolute;left:50%;top:50%;display:none}.buttonProgress__layerCircle,.buttonProgress__layerLoading,.lds-css{margin-top:-16px;margin-left:-16px}.buttonProgress__layerSuccess{margin-top:-8px;margin-left:-8px}.buttonProgressContainerLoading .buttonProgress__layerLoading,.buttonProgressContainerLoading .lds-css{display:block;-webkit-animation:fadeIn 0s cubic-bezier(.785,.135,.15,.86) .4s both;animation:fadeIn 0s cubic-bezier(.785,.135,.15,.86) .4s both;cursor:default}.buttonProgressContainerSuccess .buttonProgress__layerLoading,.buttonProgressContainerSuccess .lds-css,.window--ie .buttonProgressContainerLoading .lds-css{display:none}.buttonProgressContainerSuccess .buttonProgress__layerCircle,.buttonProgressContainerSuccess .buttonProgress__layerSuccess{display:block;cursor:default}.buttonProgress__submitLoadingPath{fill:#00000a}.buttonProgress__submitCirclePath{stroke:#00000a;stroke-width:3px;stroke-dasharray:100;stroke-dashoffset:0;fill:#fff;fill-opacity:0}.buttonProgressContainerSuccess .buttonProgress__submitCirclePath{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:buttonProgress__submitCirclePath-dash;animation-name:buttonProgress__submitCirclePath-dash;-webkit-animation-duration:.5s;animation-duration:.5s}@-webkit-keyframes buttonProgress__submitCirclePath-dash{from{stroke-dashoffset:100}to{stroke-dashoffset:0}}@keyframes buttonProgress__submitCirclePath-dash{from{stroke-dashoffset:100}to{stroke-dashoffset:0}}.buttonProgress__submitSuccessPath{fill:#00000a;stroke-width:1;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0}.buttonProgressContainerSuccess .buttonProgress__submitSuccessPath{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:buttonProgress__submitSuccessPath-animation;animation-name:buttonProgress__submitSuccessPath-animation;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-delay:542ms;animation-delay:542ms}@-webkit-keyframes buttonProgress__submitSuccessPath-animation{0%{-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;opacity:0}100%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;opacity:1}}@keyframes buttonProgress__submitSuccessPath-animation{0%{-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;opacity:0}100%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;opacity:1}}@-webkit-keyframes lds-rolling{0%{-webkit-transform:rotate(0) translateZ(0);transform:rotate(0) translateZ(0)}100%{-webkit-transform:rotate(360deg) translateZ(0);transform:rotate(360deg) translateZ(0)}}@keyframes lds-rolling{0%{-webkit-transform:rotate(0) translateZ(0);transform:rotate(0) translateZ(0)}100%{-webkit-transform:rotate(360deg) translateZ(0);transform:rotate(360deg) translateZ(0)}}.lds-rolling{position:absolute;border:3px solid #00000a;border-top-color:transparent;border-radius:50%;-webkit-animation:lds-rolling .75s linear infinite;animation:lds-rolling .75s linear infinite}.window--ie .lds-rolling{-webkit-animation:none;animation:none}.bubble-box--show .bubble,.window--mobile .bubble-box--show .bubble{-webkit-animation:showBubble 333ms cubic-bezier(.785,.135,.15,.86) both}.form-fields--horizonal .container-checkboxlist,.form-fields--horizonal .container-radiolist{width:calc(100% - 80px);max-width:calc(100% - 80px)}.container-checkboxlist{display:inline-block;width:100%;max-width:100%}.container-checkbox{display:inline-block;position:relative;color:#333;padding-left:26px;width:100%}.container-checkbox.disable{pointer-events:none}.container-checkbox i{display:inline-block;width:16px;height:16px;position:absolute;left:0;top:0;margin-top:1px}.container-checkbox i.selected{display:block}.container-checkbox i.unselected,.horizontal,.prepend,.prependContainer{display:inline-block}.checkbox:focus+.selected .checkbox2,.selected .checkbox2{fill:#00000a}.checkbox2{fill:#ddd}.checkbox3{fill:#fff}.checkbox:focus+.unselected .checkbox2,.container-checkbox:hover>.unselected .checkbox2{fill:#00000a}.checkbox{position:absolute;z-index:-1;opacity:0}.horizontal{margin-right:10px}.control,.vertical{display:block}.container-checkbox input[type=Checkbox]:disabled~.checkbox__text,.container-checkbox input[type=Checkbox]:disabled~i svg{opacity:.6;pointer-events:none;cursor:default}.container-checkbox input[type=Checkbox]~.checkbox__text{cursor:pointer}.container-checkbox input[type=Checkbox]~i svg{cursor:pointer;width:15px;height:15px}.global-showFocus .container-checkbox input[type=Checkbox]:focus~i svg{outline:#00000a auto 1px}.checkbox1{fill-rule:evenodd;clip-rule:evenodd;fill:#fff}.selected .checkbox1{fill:#00000a}.control{position:relative;padding-left:26px;margin-bottom:6px;cursor:pointer;font-size:.933333333333rem;color:#333}.control input[type=radio]{position:absolute;z-index:-1;opacity:0}.controlIndicator{position:absolute;top:0;left:0;margin-top:1px;height:16px;width:16px;border:1px solid #ddd;background-color:#fff}.controlRadio .controlIndicator{border-radius:50%}.control input[type=radio]:focus~.controlIndicator,.control:hover input[type=radio]~.controlIndicator{border-color:#00000a}.control input[type=radio]:checked~.controlIndicator{background:#00000a;border-color:#00000a}.control input[type=radio]:disabled~.controlIndicator{opacity:.6;pointer-events:none}.control:hover input[type=radio]:disabled~.controlIndicator{border:none}.controlIndicator::after{content:\'\';position:absolute;display:none}.controlRadio .controlIndicator::after{left:3px;top:3px;height:8px;width:8px;border-radius:50%;background:#fff}.control input[type=radio]:checked~.controlIndicator::after{display:block}.global-showFocus .control input[type=radio]:focus~.controlIndicator{outline:#000003 auto 1px;outline-color:-webkit-focus-ring-color}.controlRadio.horizontal{float:left;margin-right:20px}.select-box{position:relative;padding:3px;height:35px;background:#fff;border-radius:5px}.select-box svg{position:absolute;width:9px;height:6px;top:calc(50% - 3px);right:10px;color:#333}.window--ie9 .select-box svg{display:none}.select-box .select{position:absolute;left:0;right:0;top:0;bottom:0;z-index:9;padding:5px 25px 5px 10px;background:0 0;height:100%;width:100%;color:#333;cursor:pointer;border:1px solid #ddd;outline:0;font-size:1.066667rem;font-family:inherit;-moz-appearance:none;appearance:none;border-radius:5px}.select-box .select:disabled{background-color:#f5f5f5}.embedded-window:not(.window--mobile) .select-box .select{font-size:.934rem}.select-box .select::-ms-expand{display:none}.select-box .select:focus{border-color:#00000a}.svg{width:16px;height:16px}.svg--loading{width:18px;height:18px}.svg--loadingChat{display:block;width:28px;height:28px;margin:0 auto}.svg.disabled{opacity:.3}svg:hover{cursor:pointer}.svg.disabled:hover{cursor:default}.svgPath{fill:#000;width:16px;height:16px}.svgRatePath1{fill:none;stroke:#000;stroke-miterlimit:10}.svgPathSendFile1{fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}.svgPathVideo1{fill:none;stroke:#000;stroke-miterlimit:10}.svgPathVideo2{fill:none}.svgPathVoice1{fill:none;stroke:#000;stroke-miterlimit:10}.svgPathVoice2{fill:#000}.sendemail1{fill:none}.sendemail2{fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}.svg:not(.disabled):hover .sendemail1,.svg:not(.disabled):hover .svgPathSendFile1,.svg:not(.disabled):hover .svgPathVideo1,.svg:not(.disabled):hover .svgPathVoice1,.svg:not(.disabled):hover .svgRatePath1{fill:rgba(0,0,0,.3)}.svg.active .svgRatePath1{fill:#000}.svg-white .svgPathVoice2,.svgClosePath,.svgMinimizePath,.svgPopupPath{fill:#fff}.svg-white .sendemail2,.svg-white .svgPathSendFile1,.svg-white .svgPathVideo1,.svg-white .svgPathVoice1,.svg-white .svgRatePath1{stroke:#fff}.svg-white:not(.disabled):hover .sendemail1,.svg-white:not(.disabled):hover .svgPathSendFile1,.svg-white:not(.disabled):hover .svgPathVideo1,.svg-white:not(.disabled):hover .svgPathVoice1,.svg-white:not(.disabled):hover .svgRatePath1{fill:rgba(255,255,255,.3)}.svg-white.active .svgRatePath1{fill:#fff!important}.svg-white.active .svgPathSendFile1{fill:#fff!important;stroke:#000001!important}.svg-white.active .sendemail2{fill:none!important;stroke:transparent!important}.svg-white.active .sendemail1{fill:#fff!important}.svg-sidewindow-icon{width:25px;height:25px;fill:#a2a2a2;position:relative;border:1px solid transparent}.sideWindow:not(.sideWindow--mobile) .svg-sidewindow-icon:focus,.sideWindow:not(.sideWindow--mobile) .svg-sidewindow-icon:hover{border:1px solid #a2a2a2;border-radius:50%}.svg-sidewindow-icon-select-dark{border:1px solid #a2a2a2;border-radius:50%;fill:#000;background-color:#a2a2a2}.svg-sidewindow-icon-select-light{border:1px solid #a2a2a2;border-radius:50%;fill:#fff;background-color:#a2a2a2}.svg-sidewindow-icon-select-light-mobile{border:none;fill:#00000a;background-color:#fdfdfd}.svg-sidewindow-icon-select-dark-mobile{border:none;fill:#fdfdfd;background-color:#000}.window--circular .input{padding:5px 20px;border-radius:20px}.input,.multipleText{padding:5px 10px;outline:0}.input{border:1px solid #ddd;font-size:1.066667rem;-webkit-appearance:none;border-radius:5px}.embedded-window:not(.window--mobile) .input{font-size:.934rem}.input:disabled{background-color:#f5f5f5}.input[readOnly]{border:0}input.attachTicket{width:100px;margin-left:5px}.input:not(.input--effect01):focus{border-color:#00000a;outline:0}.prepend{line-height:18px;padding:5px 5px 4px;background-color:#fafafa}.prependContainer .input{border-top-left-radius:0;border-bottom-left-radius:0}.prependIcon{float:left;padding:0 6px 0 0}.defaultIcon{display:block;width:24px;height:24px}.inputContainer{position:relative;display:inline-block}.input.input--effect01{border:1px solid #ddd}.input__focusBorder{display:block}.input.input--effect01:focus{border-color:#00000a;transition:26ms;transition-delay:182ms}.window--circular .input.input--effect01~.input__focusBorder::after,.window--circular .input.input--effect01~.input__focusBorder::before{left:20px}.input.input--effect01~.input__focusBorder::after,.input.input--effect01~.input__focusBorder::before{content:"";position:absolute;top:0;left:5px;width:0;height:1px;background-color:#00000a}.input.input--effect01~.input__focusBorder::after{top:auto;bottom:0}.input.input--effect01~.input__focusBorder i::after,.input.input--effect01~.input__focusBorder i::before{content:"";position:absolute;top:50%;left:0;width:1px;height:0;background:#ddd}.window--circular .input.input--effect01~.input__focusBorder i::after{top:20px;height:calc(100% - 40px)}.input.input--effect01:not(.error):focus~.input__focusBorder i::before{background-color:#00000a}.input.input--effect01~.input__focusBorder i::after{left:auto;right:0;top:5px;bottom:0;height:calc(100% - 10px)}.window--circular .input.input--effect01:focus~.input__focusBorder::after,.window--circular .input.input--effect01:focus~.input__focusBorder::before{width:calc(100% - 40px)}.input.input--effect01:focus~.input__focusBorder::after,.input.input--effect01:focus~.input__focusBorder::before{width:calc(100% - 10px);transition:156ms;transition-delay:26ms}.window--circular .input.input--effect01:focus~.input__focusBorder i::after,.window--circular .input.input--effect01:focus~.input__focusBorder i::before{height:calc(100% - 40px);top:20px}.input.input--effect01:focus~.input__focusBorder i::after,.input.input--effect01:focus~.input__focusBorder i::before{height:calc(100% - 10px);transition:26ms;top:5px}.input.input--effect01:focus~.input__focusBorder i::after{height:0;transition-delay:182ms;top:50%}.window--circular .input.input--effect01~.input__cornerLeft,.window--circular .input.input--effect01~.input__cornerRight{border-radius:20px}.input.input--effect01~.input__cornerLeft,.input.input--effect01~.input__cornerRight{width:0;display:block;border:0 solid #00000a;top:0;bottom:0;position:absolute;border-radius:5px}.window--circular .input.input--effect01:not(.error):focus~.input__cornerLeft,.window--circular .input.input--effect01:not(.error):focus~.input__cornerRight{width:20px}.input.input--effect01:not(.error):focus~.input__cornerLeft,.input.input--effect01:not(.error):focus~.input__cornerRight{width:10px;border-width:1px}.input.input--effect01:not(.error):focus~.input__cornerLeft{left:0;border-top-right-radius:0;border-bottom-right-radius:0;transition-delay:26ms;border-right-color:transparent}.input.input--effect01:not(.error):focus~.input__cornerRight{right:0;border-top-left-radius:0;border-bottom-left-radius:0;transition-delay:182ms;border-left-color:transparent;border-right-color:transparent}.input.error,.input.error:focus,.input.error:hover{border-color:#d34747}.input.error~.input__focusBorder i::after,.input.error~.input__focusBorder i::before,.input.error~.input__focusBorder::after,.input.error~.input__focusBorder::before{background:#d34747}input,textarea{-webkit-transform:translate3d(0,0,0)}input[type=search]{-webkit-appearance:textfield}.multipleText,.window--mobile input[type=search]{-webkit-appearance:none}input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.multipleText{border:1px solid #ddd;transition:border-color .2s;border-radius:5px;width:100%;font-size:1.0666667rem;overflow:auto}:not(.window--mobile) .multipleText{font-size:.934rem}.multipleText:disabled{background-color:#f5f5f5}.multipleText:focus{border-color:#00000a;outline:0}.multipleText.error,.multipleText.error:focus,.multipleText.error:hover{border-color:#d34747}.window--circular .multipleText{border-radius:20px;padding:15px}.bubble-box{display:none;position:fixed;background:rgba(0,0,0,.5);z-index:2147483645;width:100%;height:100%;right:0;bottom:0}.bubble{position:relative;width:305px;background:#fff;padding:28px 18px;font-size:1rem;line-height:20px;border-radius:5px;box-shadow:0 0 10px rgba(0,0,0,.3);z-index:99}.window--ie .bubble{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.window--circular .bubble{border-radius:20px}.bubble-close,.rating .star{border:none;background:0 0;cursor:pointer}.bubble-box--show{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.window--ie .bubble-box--show{display:block}.bubble-box--show .bubble{animation:showBubble 333ms cubic-bezier(.785,.135,.15,.86) both}.window--ie .bubble-box--show .bubble{-webkit-animation:none;animation:none}@-webkit-keyframes showBubble{0%{-webkit-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes showBubble{0%{-webkit-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);transform:scale(1)}}.window--ie9 .bubble .bubble__operation .btn:first-child{margin-right:0}.bubble .bubble__operation .btn:first-child,.rating .star{margin-right:10px}.bubble-close{position:absolute;right:10px;top:10px}.bubble-close svg{width:10px;height:10px;fill:#a3a3a3}.bubble-close svg:hover{fill:#333}.bubble__operation{margin-top:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.embedded-end-chatConfirmAction .btn{max-width:50%}.bubble--title{color:#333;font-size:1rem;margin-bottom:13px;word-wrap:break-word}.bubble--desc{font-size:1rem;color:#333;margin-bottom:27px;text-align:center}.rating{position:relative;height:24px}.rating .star{display:inline-block;fill:#e2e2e2;position:relative}.rating .star svg{width:24px;height:24px}.rating .star:last-child{margin-right:0}.window--bubble .form-fields--horizonal .rating .star{font-size:1.066667rem;line-height:16px;margin-right:6px}.window--circle .form-fields--horizonal .rating .star{font-size:1.666667rem;line-height:25px}.rating .starColor{fill:#fbb03b}.window__headerContainer,.window__headerVessel{-ms-flex-negative:0;flex-shrink:0}.window__header{width:100%;min-height:25px;border-radius:5px 5px 0 0;transition:height 50ms linear}.window--circular .window__header{border-radius:20px 20px 20px 0}.window--mobile:not(.window--ipad) .window--circular .window__header{border-radius:0}.window--classic .window__header--fadeInDown{-webkit-animation:fadeInDown 292ms both cubic-bezier(.785,.135,.15,.86);animation:fadeInDown 292ms both cubic-bezier(.785,.135,.15,.86);-webkit-animation-delay:.3s;animation-delay:.3s}.window--ie .window--classic .window__header--fadeInDown{-webkit-animation:none;animation:none}.window__headerBox{padding:15px 27px 18px;width:100%}.window__header--hasAvatar .window__headerBox,.window__headerBox.window__headerBox--banner,.window__headerBox.window__headerBox--hasAvatars{padding:24px 27px 23px}.window__headerBox--onlylogo{min-height:85px}.window__headerBox--fadeInDown{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.title-buttons__operation{display:block;float:left;padding-left:10px;padding-right:10px}.window--circle:not(.window--embedded) .title-buttons__operation,.window--classic:not(.window--embedded) .title-buttons__operation{line-height:1}.window--mobile .title-buttons__operation{padding:0 9.5px}.title-buttons__operation .icon{cursor:pointer}.title-buttons__operation--text{border-left:2px solid rgba(255,255,255,.5)}.window--circle .title-buttons__operation--text{border-left-color:#a3a3a3;line-height:13px}.window--classic .title-buttons__operation--text{border-left-color:#000007;line-height:13px}.title-buttons__operation--text a{color:#fff;text-decoration:none;cursor:pointer;display:block;max-height:21px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.window--circle .title-buttons__operation--text a{color:#a3a3a3}.window--classic .window__headerBox{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.window--classic .window__headerBox.window__headerBox--banner{display:block}.window--classic .window__headerBox--team{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.window--classic .header__agent--withlogo{margin-right:10px}.window--classic .title-buttons__operation--text a{color:#000004}.header__teamAvatar--gray .header__teamAvatarImg{filter:gray;-webkit-filter:grayscale(100%)}.window__operation{height:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-pack:distribute;justify-content:space-around;padding-right:5px}.window__operation .icon-close,.window__operation .icon-endchat{width:12px}.window__operation>a,.window__operation>button{background:0 0;border:none;height:20px;margin:0 1px;padding:4px 4px 0;position:relative;display:inline-block}.window__operation>a:hover svg,.window__operation>button:hover svg{opacity:1}.window__operation>a:focus,.window__operation>button:focus{outline:0}.window__operation>a.window__operation-menu-icon{margin-left:30px;text-align:right}.window--bubble .window__operation>a.window__operation-menu-icon{margin-left:0}.window__operation-menu-icon{cursor:pointer}.window__operation-menu-icon:focus{outline:0}.window__operation-menu-icon>svg{width:20px}.body__dialog-menu .window__operation-menu,.window__menu-show.window__operation-menu{display:block;position:relative;z-index:11}.window__operation-menu{display:none}.window__operation-menu::before{content:\'\';background-color:transparent;display:block;width:135px;height:20px;position:absolute;right:0;top:-20px}.form__submit,.window--ie9 .window--bubble .window__operation-menu{width:160px}.window--bubble .window__operation-menu{position:absolute;right:0;top:20px}.window__operation-menu li{height:30px;line-height:30px}.window__operation-menu li a[role=menuitem]{margin:0;height:30px;padding-left:22px;padding-right:22px;display:block;cursor:pointer;color:#333;background:0 0;border:none;text-align:left}.window__operation-menu li a[role=menuitem]:focus,.window__operation-menu li a[role=menuitem]:hover{background-color:#eee;outline:0}.window__operation-menu li a[role=menuitem]>div.menu__text-container{float:left;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:170px;min-width:50px}.window--bubble .window__operation-menu li a[role=menuitem]{display:-webkit-box;display:-ms-flexbox;display:flex}.window--mobile .window__operation-menu li a[role=menuitem]>div.menu__text-container>span{width:100%}.body__dialog-menu .window__operation-menu li a[role=menuitem]:hover,.window--mobile .window__operation-menu li a[role=menuitem]:hover{background-color:initial}.window__operation .window__operation-menu ul{background:#fff;border-radius:5px 0 5px 5px;border:1px solid #ddd;z-index:2147483645;padding:10px 0}.header__avatarImage,.header__teamAvatarImg{background:#f4f5f6}.window__operation .window__operation-menu ul li>a>svg{fill:#333;margin-right:10px;float:left;margin-top:7px}.global-showFocus .window__operation>a:focus,.global-showFocus .window__operation>button:focus{border-bottom:1px solid #000004}.window--bubble .window__operation .window__operation-menu ul li>a>svg{-ms-flex-negative:0;flex-shrink:0}.window__operation>a>svg,.window__operation>button>svg{fill:#000004;opacity:.7}.main-container .window__title{position:absolute;right:0;top:0}.window--classic .icon-close,.window--classic .icon-embedded,.window--classic .icon-minimize,.window--classic .icon-popup{color:#000004;font-size:.8rem}.header__bannerImg{max-height:90px;width:auto;height:auto}.header__agentBio,.window--bubble .header__agentBio{max-height:80px;-webkit-box-orient:vertical;text-overflow:ellipsis}.window--classic .header__bannerImg{display:block;max-width:calc(100% + 54px);margin:0 -27px -23px}.window--classic .header__agentInfo{overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:100%}.window--classic .window__header--hasAvatar .header__agentInfo{height:45px}.window--classic .header__agentInfoNoAvatar{max-width:100%;width:100%;padding-left:0}.window--circle .header__agentInfo{width:100%}.window--classic .header__chatbot{height:50px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.window--classic .header__avatar{float:left;margin-right:17px;width:45px;height:45px;-ms-flex-item-align:start;align-self:flex-start}.window--classic .header__avatarImage{display:block;border-radius:100%;width:45px;height:45px}.header__agent{position:relative}.window--circle .header__agent--compact{height:21px}.window--circle .header__agent--compact.with__title{height:38px}.header__agent--compact:hover::before{content:\'\';position:absolute;z-index:99;width:calc(100% + 10px);height:calc(100% + 10px);background:rgba(0,0,0,.1);border-radius:4px;left:-5px;top:-5px;cursor:pointer}.window--circle .header__agent--compact:hover::before{width:100%;height:calc(100% + 6px);left:0;top:-3px;border-radius:10px}.window--classic .header__agent{-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:100%;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.window--classic .header__agent--fadeInUp{-webkit-animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both;animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both;-webkit-animation-delay:.3s;animation-delay:.3s}.window--ie .window--classic .header__agent--fadeInUp{-webkit-animation:none;animation:none}.window--classic .header__agent--withlogo{float:left;max-width:calc(100% - 110px);margin-top:11.5px;margin-bottom:11.5px}.window--classic .window__header--hasAvatar .header__agent--withlogo{margin-top:0;margin-bottom:0}.header__agentName,.header__agentTitle{max-width:100%;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.window--classic .header__agentName{font-size:1.133333rem;line-height:1.29;color:#000004;text-shadow:0 1px 0 rgba(0,0,0,.2)}.window--classic .header__agentTitle{font-size:.8rem;line-height:1.25;color:#000004;opacity:.5;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.header__agentBio{overflow:hidden;display:-webkit-box;-webkit-line-clamp:4;word-wrap:break-word}.window--classic .header__agentBio{font-size:.8rem;line-height:1.17;color:#000004;opacity:.8;margin-top:4px;padding-left:60px;padding-bottom:2px;margin-bottom:-2px;max-height:84px;overflow-y:auto}.window--classic .header__agentBio a{color:#000004;border-bottom:1px solid #000007}.window--classic .header__logo{margin-left:auto;margin-top:9px;margin-bottom:5px}.window--classic .header__logoImg{max-height:45px;max-width:100px;display:block;float:right;width:auto;height:auto}.window--classic .header__teamName{font-size:1.133333rem;line-height:1.29;color:#000004;text-align:center;text-shadow:0 1px 0 rgba(0,0,0,.2);width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:8px}.window--classic .header__teamName+.header__teamAvatar,.window--classic .header__teamName.header__teamNameNoAvatar,.window--classic .window__headerBox--hasAvatars .header__teamName{margin-bottom:0}.window--classic .window__headerBox.window__headerBox--empty{padding-top:12px;padding-bottom:13px}.window--classic .header__teamAvatar{position:relative;width:142px;height:40px;margin:9px auto}.window--classic .header__teamAvatarImg{position:absolute;width:40px;height:40px;border-radius:100%}.window--classic .header__teamAvatarImg:nth-child(1){left:0;z-index:9}.window--classic .header__teamAvatarImg:nth-child(2){left:49px;z-index:8}.window--classic .header__teamAvatarImg:nth-child(3){left:99px;z-index:7}.window--classic .window__header--prechatWithAvatar{height:126px}.window--classic .header--compact{height:55px}.window--classic .header--compact .header__teamAvatar,.window--classic.animation--chatting .header__teamAvatar{-webkit-transform:translateY(-105px);-ms-transform:translateY(-105px);transform:translateY(-105px)}.window--classic.animation--chatting .header__teamName{-webkit-transform:translateY(-60px);-ms-transform:translateY(-60px);transform:translateY(-60px)}.window--circle .header{border-top-left-radius:20px;border-top-right-radius:20px}.window--circle .header__bannerImg{display:block;max-width:calc(100% + 40px);margin:0 0 -15px -20px}.window--circle .header__avatar{position:absolute;top:-69.5px;left:50%;margin-left:-35px}.body__dialog .window--embedded.window--circle .header__avatar::before,.body__dialog-menu .window--embedded.window--circle .header__avatar::before{content:\'\';position:absolute;top:0;left:0;height:50%;width:100%;border-radius:70px 70px 0 0;background-color:rgba(0,0,0,.5)}.body__dialog .window--mobile:not(.window--ipad) .window--circle .header__avatar::before,.body__dialog-menu .window--mobile:not(.window--ipad) .window--circle .header__avatar::before{height:0}.window--mobile .window--circle .header__avatar--withSideWindow,.window--mobile .window--circle .window__headerBox .header__teamAvatar--withSideWindow{left:50%}.window--circle .header__avatar--fadeInDown{-webkit-animation:fadeInDown 292ms cubic-bezier(.785,.135,.15,.86) both;animation:fadeInDown 292ms cubic-bezier(.785,.135,.15,.86) both;-webkit-animation-delay:.3s;animation-delay:.3s}.window--ie .window--circle .header__avatar--fadeInDown{-webkit-animation:none;animation:none}.window--circle .header__avatarImage{display:block;border-radius:100%;width:65px;height:65px;margin:0 auto}.window--circle .header__agentInfo{text-align:center;margin-top:13px;display:-webkit-box;display:-ms-flexbox;display:flex;display:-webkit-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-ms-flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.window--circle .header__agentInfoNoAvatar{margin-top:0}.window--circle .header__agentName{max-width:calc(100% - 90px);margin:0 auto;font-size:1.13333333rem;color:#333;line-height:1.29;text-shadow:0 1px 0 rgba(0,0,0,.2)}.window--circle .header__agentTitle{font-size:.8rem;color:#333;margin-top:2px;line-height:1.25;opacity:.5}.window--circle .header__agentBio{text-align:center;margin-top:2px;margin-bottom:1px;padding-bottom:2px;font-size:.8rem;color:grey;line-height:1.17;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;max-height:70px;-webkit-line-clamp:4;-webkit-box-orient:vertical;width:100%;opacity:.8;overflow-y:auto}.window--circle .header__agentBio a{color:grey;border-bottom:1px solid grey}.window--circle .header__agentBio a:hover{border-bottom-color:grey}.window--circle .header__teamName{font-size:1.133333333333333rem;line-height:1.29;color:#333;margin-top:21px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.window--circle .header__teamNameNoAvatar{margin-top:0}.window--circle .header__teamAvatar{position:absolute;left:50%;top:-22px;width:112px;height:42px;margin-bottom:10px;margin-left:-56px;-webkit-animation:fadeInDown 292ms cubic-bezier(.785,.135,.15,.86) both;animation:fadeInDown 292ms cubic-bezier(.785,.135,.15,.86) both;-webkit-animation-delay:.3s;animation-delay:.3s}.window--ie .window--circle .header__teamAvatar{-webkit-animation:none;animation:none}.window--bubble .window__ssologin.window__ssologin--animation,.window__chat--animation,.window__form--animation{-webkit-animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both}.window--circle .header__teamAvatarImg{position:absolute;width:44px;height:44px;border:2px solid #fff;border-radius:100%;top:0}.window--circle .header__teamAvatarImg:nth-child(1){z-index:8}.window--circle .header__teamAvatarImg:nth-child(2){left:36px;z-index:9}.window--circle .header__teamAvatarImg:nth-child(3){right:0;z-index:10}.window--circle .icon-close,.window--circle .icon-embedded,.window--circle .icon-minimize,.window--circle .icon-popup{color:#a3a3a3;font-size:.8rem}.global-showFocus .window--circle .window__operation>a:focus,.global-showFocus .window--circle .window__operation>button:focus{border-bottom-color:#5d5d5d}.window--circle .window__operation>a>svg,.window--circle .window__operation>button>svg{fill:#5d5d5d}.window--circle .window__headerBox{border-bottom:1px solid #ddd;width:calc(100% - 40px);margin:0 auto;padding-left:0;padding-right:0;padding-bottom:15px}.window--circle .window__headerBox .header__agent,.window--circle .window__headerBox .header__teamName{padding:0 40px}.window--circle .window__headerBox.window__headerBox--hasAvatars.window__headerBox--team{padding-bottom:15px}.window--circle .window__headerBox.window__headerBox--hasAvatars{padding-bottom:21px}.window--circle .window__headerBox.window__headerBox--empty{border-bottom:none}.window--circle .header-operator{margin-bottom:17px}.window--bubble .window__title{visibility:hidden;opacity:0}.body__dialog .window--bubble .window__title,.body__dialog-menu .window--bubble .window__title,.window--bubble:hover .window__title,.window--mobile .window--bubble .window__title{visibility:visible;opacity:1}.window--bubble:hover .window__title{transition:opacity .4s cubic-bezier(.785,.135,.15,.86)}.window--bubble .header__avatar{position:absolute;top:-45px;left:50%;margin-left:-42px}.window--bubble .header__avatarImage{display:block;border-radius:100%;width:85px;height:85px;border:1px solid #000004}.window--bubble .header__agentInfo{text-align:center;margin-top:35px}.window--bubble .header__agentName{font-size:1.2rem;color:#000}.window--bubble .header__agentTitle{font-size:.933333rem;color:rgba(0,0,0,.3)}.window--bubble .header__agentBio{font-size:.933333rem;color:rgba(0,0,0,.5);margin-top:5px;overflow:hidden;display:-webkit-box;line-height:20px;-webkit-line-clamp:4}.window--bubble .icon-close,.window--bubble .icon-embedded,.window--bubble .icon-minimize,.window--bubble .icon-popup{color:#fff;font-size:.8rem}.window--bubble .window__operation{border-radius:10px;padding:0 5px}.window--bubble .window__operation>a,.window--bubble .window__operation>button{padding:2px 4px}.window--bubble .main-container .window__title{right:4px;z-index:2147483645}.window--bubble .window__headerBox{padding-bottom:0}.window--bubble .header-operator{border-bottom:1px solid #ddd;padding-bottom:28px}.window--ie .window--classic .window__headerBox--banner{display:block}.window--bubble .window__ssologin{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding:28px 40px}.window--bubble .window__ssologin.window__ssologin--animation{animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both;-webkit-animation-delay:.3s;animation-delay:.3s}.window--circle .window__ssologin,.window--classic .window__ssologin,.window--mobile:not(.window--ipad) .window--bubble .window__ssologin{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);padding-top:0}.window--circle .window__ssologin.window__ssologin--animation,.window--classic .window__ssologin.window__ssologin--animation,.window--mobile:not(.window--ipad) .window--bubble .window__ssologin.window__ssologin--animation{-webkit-animation:ssologinAnimate 458ms cubic-bezier(.785,.135,.15,.86) both;animation:ssologinAnimate 458ms cubic-bezier(.785,.135,.15,.86) both;-webkit-animation-delay:.3s;animation-delay:.3s}.window--ie .window__ssologin--animation{-webkit-animation:none!important;animation:none!important}@-webkit-keyframes ssologinAnimate{0%{opacity:0;-webkit-transform:translate(-50%,0);transform:translate(-50%,0)}to{opacity:1;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}}@keyframes ssologinAnimate{0%{opacity:0;-webkit-transform:translate(-50%,0);transform:translate(-50%,0)}to{opacity:1;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}}.window__ssologinError{font-size:.933333rem;line-height:18px;color:#de3939;margin-bottom:26px}.window__ssologinGreeting{font-size:.93333333rem;line-height:1.21;color:#333;margin-bottom:53px;text-align:center}.window__ssologinForm{text-align:center}.window__ssologinOperation{display:block;margin:0 auto 26px;overflow:hidden;text-overflow:ellipsis}.window__ssologinOperation:last-child{margin-bottom:0}.prechatForm__social{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.form-fields--horizonal .prechatForm__social{-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left}.prechatForm__social .prechatForm__socialBtn{border:none;color:#fff;fill:#fff;border-radius:5px;font-size:14px;line-height:18px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-right:12px;-webkit-box-flex:1;-ms-flex:1 1 350px;flex:1 1 350px;height:35px;max-width:130px;display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-wrap:wrap;flex-wrap:wrap;cursor:pointer}.prechatForm__social .prechatForm__socialBtn:last-child{margin-right:0}.prechatForm__socialBtn svg{-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0}.prechatForm__socialBtn span{display:block;-ms-flex-negative:1;flex-shrink:1;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;line-height:1.29;font-size:.9333333rem;-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}.prechatForm__socialBtn.socialBtn--simple{width:30px;height:30px;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;margin-right:10px;-ms-flex-preferred-size:30px;flex-basis:30px}.socialBtn--simple svg{height:30px}.socialBtn--simple span{display:none}.form-fields--horizonal .prechatForm__socialBtn span{line-height:1.25;font-size:.8rem}.corner-style .prechatForm__social .prechatForm__socialBtn{border-radius:20px}.prechatForm__socialBtn svg{height:35px;width:35px}.window--ie .form-fields--horizonal #social-login-icons{-webkit-box-flex:0;-ms-flex:0 0 70px;flex:0 0 70px}.prechatForm__login{color:#bbb}.prechatForm__divide{font-size:.8rem;position:relative;display:block;text-align:center;margin-top:10px;margin-bottom:20px}.prechatForm__divide::after,.prechatForm__divide::before{border-top:1px solid #ddd;width:40%;position:absolute;top:9px;content:\'\'}.prechatForm__divide::before{left:0}.prechatForm__divide::after{right:0}.loading{display:block;background-size:50px}.icon-facebook{margin-right:10px;color:#39599c}.window--rtl .icon-facebook{margin-left:10px}.ssologin .window__ssologinForm{margin-bottom:30px}.captcha{-webkit-perspective:100px;perspective:100px;-webkit-perspective-origin:left;perspective-origin:left}:not(.window--ie) .window--rtl .captcha{-webkit-perspective-origin:right;perspective-origin:right}.window--edge .window--rtl .captcha,.window--ie .window--rtl .captcha{-webkit-perspective-origin:0;perspective-origin:0}.captcha>:first-child{-webkit-transform:translateZ(-15px);transform:translateZ(-15px)}.window--bubble .captcha>:first-child{-webkit-transform:translateZ(-13px);transform:translateZ(-13px)}.window--bubble.window--rtl .captcha>:first-child{-webkit-transform:translateZ(-40px);transform:translateZ(-40px)}.form-fields--horizonal .captcha>:first-child{-webkit-transform:translateZ(-70px);transform:translateZ(-70px)}.window__form_popout .captcha>:first-child{-webkit-transform:translateZ(-8px);transform:translateZ(-8px)}.window__form_popout .form-fields--horizonal .captcha>:first-child{-webkit-transform:translateZ(-53px);transform:translateZ(-53px)}.window__formContainer--bubble{overflow:hidden;overflow-y:auto;padding:0 27px;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;margin-top:30px}.window__form{overflow:auto;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;width:100%;padding:25px 45px 0;overflow-x:hidden}.window__form--animation{animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both;-webkit-animation-delay:.3s;animation-delay:.3s}.window--ie .window__form--animation{-webkit-animation:none;animation:none}.window--bubble .window__form{padding:30px 17px 0 19px;border-radius:5px;-ms-flex-negative:0;flex-shrink:0;position:relative;margin-bottom:12px;overflow:visible}.window--circular .window--bubble .window__form{border-radius:20px}.window--mobile .window--bubble .icon-bubble-line{left:10px}.window--bubble .window__form .icon-bubble-line{position:absolute;left:-10px}.window--bubble .window__form .icon-bubble-line .bubbleline1{fill:#fff;stroke:#ddd;stroke-width:2px}.window--bubble .icon-bubble-line::before{color:#ddd}.window__formGreeting{font-size:.933333rem;line-height:18px;color:#666;margin-bottom:25px;word-wrap:break-word;word-break:break-word}.window__formGreeting a{color:#666;border-bottom:1px solid rgba(102,102,102,.6)!important}.window__chat .window__formGreeting{text-align:center}.window__formError{font-size:.933333rem;line-height:18px;color:#de3939;margin-bottom:26px}.form-fields .box-field{margin-bottom:15px}.form-fields .box-field input[type=file]{width:100%}.form-fields.form-fields--horizonal .box-field div.field-name+:not(.container-checkbox){-ms-flex-preferred-size:calc(100% - 80px);flex-basis:calc(100% - 80px)}#postchat-window .form-fields.form-fields--horizonal .box-field div.field-name+:not(.container-checkbox){max-width:calc(100% - 60px)}.form-fields.form-fields--horizonal .box-field input[type=file]{width:calc(100% - 80px)}.form-fields--horizonal .box-field{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:26px;position:relative}.form__inputContainer{position:relative;text-align:center}.fieldControl__Ticket{display:-webkit-box;display:-ms-flexbox;display:flex}.form-fields--horizonal .fieldControl__Ticket{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.form__ticketPrefix{-ms-flex-negative:0;flex-shrink:0;line-height:35px;font-size:.934rem}.window--bubble .form-fields:not(.form-fields--horizonal) .fieldControl__Ticket .form__input--ie10{width:120px}.fieldControl__Ticket .form__inputContainer,.form-fields--horizonal .form__inputContainer,.form-fields--horizonal .multipleText,.form-fields--horizonal .select-box{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.form-fields .field-name{margin-bottom:10px;color:#a6a6a6;word-wrap:break-word}.form-fields .checkbox__text{color:#a6a6a6;font-size:.8rem;font-family:"SourceSans Pro Bold";line-height:1rem}.form-fields .container-checkboxlist .container-checkbox{display:block}.form-fields .container-checkboxlist>div+div{margin-top:6px}.form-fields .container-checkboxlist .checkbox__text{color:#333;text-transform:none;font-weight:400;font-size:.933333rem;line-height:1.2rem;font-family:"SourceSans Pro",Arial}.form-fields .field-control{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.form-fields.form-fields--horizonal .field-control,.form-fields.form-fields--horizonal .fieldControl__Ticket,.window--ie10 .fieldControl__Ticket .field-control,.window--ie10 .form-fields--horizonal .select-box{-ms-flex-negative:1;flex-shrink:1}.form-fields--horizonal .field-name{margin-bottom:0;margin-right:10px;-webkit-box-flex:1;-ms-flex:1 0 80px;flex:1 0 80px;max-width:80px;display:-webkit-box;display:-ms-flexbox;display:flex}.form-fields--horizonal .field-name .field__label{display:inline-block;max-width:80px}.form-fields--horizonal .field-name.checkbox-label{-ms-flex-preferred-size:unset;flex-basis:unset;max-width:none;-ms-flex-negative:1;flex-shrink:1;display:none}.form-fields--horizonal .field-name.checkbox-label .field__label{max-width:none}.form-fields--horizonal .form__ticketPrefix{-ms-flex-negative:0;flex-shrink:0}.form-fields .field__requiredTag{margin-right:4px;margin-left:-7px;font-size:.8rem;line-height:1rem;fill:#ed1c24;vertical-align:middle;width:3px;height:15px;-ms-flex-negative:0;flex-shrink:0;float:left}.window--rtl .form-fields .field__requiredTag{margin-left:4px;margin-right:-7px;float:right}.form-fields .field__label{font-size:.8rem;line-height:1rem;float:left;font-family:"SourceSans Pro Bold"}.window--rtl .form-fields .field__label{float:right}.form-fields .field__requiredMsg{background:#ed1c24;padding:0 10px;color:#fff;position:relative;left:7px;font-size:.8rem;border-radius:20px;word-break:break-all;line-height:17px;float:left}.window--rtl .form-fields .field__requiredMsg{float:right}.form-fields .field__requiredMsg::before{content:\'\';position:absolute;left:-8px;top:3px;width:0;height:0;border:5px solid transparent;border-right-color:#ed1c24}.window--rtl .form-fields .field__requiredMsg,.window--rtl .form-fields .field__requiredMsg::before{left:auto;right:7px}.window--rtl .form-fields--horizonal .field__requiredMsg{right:0}.window--rtl .form-fields:not(.form-fields--horizonal) .field__requiredMsg::before{right:-8px;border-right-color:transparent;border-left-color:#ed1c24}.form-fields--horizonal .field__requiredMsg{position:absolute;left:0;bottom:-13px;z-index:9;border-radius:5px}.form-fields--horizonal .field__requiredMsg::before{left:7px;top:-10px;border-right-color:transparent;border-bottom-color:#ed1c24}.window--circular .form-fields--horizonal .field__requiredMsg{border-radius:20px}.window--circular .form-fields--horizonal .field__requiredMsg::before{left:20px;top:-10px}.form__input{height:35px;width:100%}.form__textarea{height:auto}.form__submitContainer{position:relative;text-align:center;margin-top:30px;padding-bottom:30px}.bubble .form__submitContainer{padding:0;margin-top:23px}.form__submitContainer--loading .form__submit{-webkit-animation-name:form__submit--loading;animation-name:form__submit--loading;-webkit-animation-duration:167ms;animation-duration:167ms}.form__layer-circle,.form__layer-success{position:absolute;left:50%;top:50%;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);display:none}.form__submitContainer--loading .form__layer-circle,.form__submitContainer--loading .form__layer-success{display:block}.form__submitContainer--loading .form__submitCirclePath{stroke:#000001;stroke-width:3px;stroke-dasharray:100;stroke-dashoffset:100;fill:#fff;fill-opacity:0;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:form__submitCirclePath-dash;animation-name:form__submitCirclePath-dash;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-delay:167ms;animation-delay:167ms}.window_botform{padding:0!important}.window_botform .botform_title{margin:0 0 10px;text-align:center;color:#444648;font-size:16px}.botform__submitContainer{text-align:center;margin:10px 0 20px}.botform__submitContainer button{padding:5px 18px;border:1px solid #00000a;border-radius:5px;color:#fff;margin:0 4px;cursor:pointer;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:160px}.botform__submitContainer button.btn-submit{background-color:#00000a;color:#000004}.botform__submitContainer button.btn-cancel{background-color:#fff;color:#00000a}.botform__submitContainer button.btn-submit:focus,.botform__submitContainer button.btn-submit:hover{background-color:#000003;border-color:#000003}.botform__submitContainer button.btn-cancel:focus,.botform__submitContainer button.btn-cancel:hover{color:#000003;border-color:#000003}.botform__submitContainer button[disabled]{background-color:#f5f5f5!important;color:#888!important;border-color:#b5b1b1!important;cursor:default}.botconfirm_list li p{font-family:"SourceSans Pro",Arial;color:#333}.botconfirm_list li p:first-child{font-family:SourceSans Pro Bold}@-webkit-keyframes form__submitCirclePath-dash{from{stroke-dashoffset:100}to{stroke-dashoffset:0}}@keyframes form__submitCirclePath-dash{from{stroke-dashoffset:100}to{stroke-dashoffset:0}}.form__submitContainer--loading .form__submitSuccessPath{fill:#00000a;stroke-width:1;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:form__submitSuccessPath-animation;animation-name:form__submitSuccessPath-animation;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-delay:542ms;animation-delay:542ms}@-webkit-keyframes form__submitSuccessPath-animation{0%{-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;opacity:0}100%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;opacity:1}}@keyframes form__submitSuccessPath-animation{0%{-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;opacity:0}100%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 50%;transform-origin:50% 50%;opacity:1}}.botForm__content{height:100%;overflow:auto}.form__gradient--white{position:absolute;height:25px;width:100%;bottom:0;background-image:linear-gradient(to bottom,transparent,rgba(255,255,255,.97) 86%,#fff)}.container-checkbox span,.control span{display:inline-block}.nps{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-pack:distribute;justify-content:space-around}.nps .npsItem{height:22px;width:22px;border:none;background:#e6e6e6;color:#383838;font-size:12px;font-family:"SourceSans Pro Bold",Arial;border-radius:100%;cursor:pointer}.nps .npsItem--selected,.nps .npsItem:hover{background:#00000a;color:#000004}.nps .npsItem:last-child{margin-right:0}.nps__label{font-size:11px;color:#adadad;word-wrap:break-word}.nps__label--left{float:left;margin-top:5px;width:50%;padding-right:8px}.nps__label--right{float:right;margin-top:5px;width:50%;padding-left:8px;text-align:right}.window--rtl .nps .npsItem:last-child{margin-right:2px}.window--rtl .nps__label--left{float:right;padding-right:0;padding-left:8px}.window--rtl .nps__label--right{float:left;text-align:left;padding-left:0;padding-right:8px}.window--mobile .nps .npsItem:hover{background:#e6e6e6;color:#383838}.window--mobile .nps .npsItem--selected{background:#00000a!important;color:#000004!important}.form-fields--horizonal .nps .npsItem{height:13px;width:13px;line-height:13px}.window__chat{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;overflow:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;width:100%;padding:18px 27px 0;margin-bottom:0}.chat__greetingContainer .window__chatSystemMessage,.chat__greetingContainer .window__formGreeting{margin-bottom:0;color:#666}.chat__greetingContainer .window__chatSystemMessage a[href],.chat__greetingContainer .window__formGreeting a[href]{color:#666;border-bottom:1px solid rgba(102,102,102,.6)!important}.window--mobile .window--bubble .chat__greetingContainer{margin-bottom:16px}.window__chat--animation{animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both;-webkit-animation-delay:.3s;animation-delay:.3s}.window--ie .window__chat--animation{-webkit-animation:none;animation:none}.window__chatSystemMessage{color:#bbb;font-size:1rem;text-align:center;-webkit-animation:message--show 458ms cubic-bezier(.785,.135,.15,.86);animation:message--show 458ms cubic-bezier(.785,.135,.15,.86);word-wrap:break-word}.window--bubble .window__chat .window__chatSystemMessageContent{display:inline-block;background:#f8f8f8;line-height:1.57;padding:8px 14px;border-radius:5px;max-width:240px}.window__chatAgentMessage,.window__chatMessageNoAvatar.window__chatAgentMessage{max-width:calc(100% - 67px)}.window__chatSystemMessage a,.window__chatSystemMessage a:hover,.window__chatSystemMessage a[href],.window__chatSystemMessage a[href]:hover{color:#bbb;border-bottom:solid 1px rgba(187,187,187,.6)}.window__chatAgent,.window__chatVisitor{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-animation:message--show 458ms cubic-bezier(.785,.135,.15,.86);animation:message--show 458ms cubic-bezier(.785,.135,.15,.86);position:relative}.window__chat>div{padding-bottom:16px}.window__chat>div>div.window__chatAgent+div.window__chatAgent,.window__chat>div>div.window__chatVisitor+div.window__chatVisitor{margin-top:8px}.window__chat>div>div+div{margin-top:16px}.window__chat>div>div.botConfidenceAnswerDiv>div.window__chatAgent+div.window__chatAgent,.window__chat>div>div.botConfidenceAnswerDiv>div.window__chatVisitor+div.window__chatVisitor{margin-top:8px}.window__chat>div>div.botConfidenceAnswerDiv>div+div{margin-top:16px}.window--ie .window__chatAgent,.window--ie .window__chatSystemMessage,.window--ie .window__chatVisitor{-webkit-animation:none;animation:none}.window__chatVisitor{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.agentMessage__avatar{margin-right:15px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end;-ms-flex-negative:0;flex-shrink:0}.agentMessage__avatarImg{display:block;width:30px;height:30px;border-radius:100%;background:#f4f5f6;margin-bottom:15px}.agentMessage__pci{background:#f0f0f0;border:1px solid #ddd;border-radius:4px;padding:23px 20px 12px}.agentMessage__pciField{margin-bottom:7px;color:#888}.agentMessage__pciControl{margin-bottom:12px}.agentMessage__pciControl .form__input{height:30px;line-height:30px;width:calc(100% - 20px)}.window__chatAgentMessage p{margin:0}.window__chatAgentMessage.chat-message--img.window__chatMessageNoAvatar .window__chatAgentName{padding:17px 22px 7px}.window--circular .window__chatAgentMessage,.window--circular .window__chatVisitorMessage{border-radius:20px}.window--circular .window__chatVisitorMessage{border-top-right-radius:0;border-bottom-right-radius:0}.window--circular .window__chatVisitorMessage.window__chatVisitorFirstMessage{border-top-right-radius:20px}.window--circular .window__chatVisitorMessage.window__chatVisitorLastMessage{border-bottom-right-radius:20px}.window--circular .window__chatAgentMessage{border-bottom-left-radius:0}.window__chatAgentMessage,.window__chatVisitorMessage{position:relative;font-size:.93333333rem;line-height:1.57;padding:17px 22px 19px;word-wrap:break-word;word-break:break-word;border-radius:5px}.window--mobile .window__chatAgentMessage{border:1px solid #ccc}.window__chatMessageNoAvatar.window__chatAgentMessage.chat-message--img{max-width:200px;max-height:none}.window__chatVisitorMessage{margin-left:67px;max-width:calc(100% - 67px);background-color:#000001;color:#000004;border-bottom-right-radius:0}.window--ie .window__chatVisitorMessage{margin-left:auto}.window__chatAgentMessage{border-bottom-left-radius:0}@-webkit-keyframes bounceOut{20%{width:5px;height:5px;border-radius:5px;opacity:1}50%,55%{width:8px;height:8px;border-radius:8px;opacity:1}to{width:2px;height:2px;border-radius:2px;opacity:0}}@keyframes bounceOut{20%{width:5px;height:5px;border-radius:5px;opacity:1}50%,55%{width:8px;height:8px;border-radius:8px;opacity:1}to{width:2px;height:2px;border-radius:2px;opacity:0}}.dot_container{width:20px;height:20px;position:absolute;left:-20px;bottom:19px}.message--notSeen,.message--seen{content:\'\';display:inlin-block;background:#00000a;width:6px;height:6px;border-radius:6px;position:relative;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.message--seen{-webkit-animation:bounceOut .5s linear forwards;animation:bounceOut .5s linear forwards}.window--rtl .dot_container{left:-35px}.window--ie9 .message--seen{display:none}.file__icon--cancel{float:right}.file__icon--cancel svg{width:12px;height:12px;fill:#000004}.window__chatMessageOrignal{display:block;opacity:.5}.window__chatMessageTranslatedTag{display:inline}.window__chatAgentMessage img{display:block}.window__chatAgentMessage .chatMessage__questionList li{color:#323dbf;line-height:1;margin-bottom:10px}.window__chatAgentMessage .chatMessage__questionList li span{margin-right:5px;display:inline-block;-ms-flex-negative:0;flex-shrink:0}.window__chatAgentMessage .chatMessage__questionList li:last-child{margin-bottom:0}.window__chatAgentMessage .chatMessage__questionList li a[href]{border-bottom-color:transparent}.window__chatAgentMessage .chatMessage__questionList li a[href]:active,.window__chatAgentMessage .chatMessage__questionList li a[href]:focus,.window__chatAgentMessage .chatMessage__questionList li a[href]:hover{border-bottom-color:rgba(50,61,191,.6)}.window__chatAgentMessage a[href]{color:#323dbf;border-bottom:solid 1px #323dbf}.window__chatAgentMessage a[href]:active,.window__chatAgentMessage a[href]:focus,.window__chatAgentMessage a[href]:hover{border-bottom-color:rgba(50,61,191,.6)}.chat-message--img a{max-width:200px!important;max-height:200px!important;min-width:60px!important;min-height:60px!important;overflow:hidden;display:block;border-bottom:none!important}.invitation__name,.pasteImage img,.window__chatAgentMessage a,.window__chatVisitorMessage a{max-width:100%}.chat-message--img .image-container{margin:0 auto;height:100%}.chat-message--img img{display:block;margin:0 auto;border:none}.window__chatVisitorMessage a{color:#000009;border-bottom:solid 1px #000009}.window__chatVisitorMessage button{border:none;background:0 0;margin:5px 0 0 9px;cursor:pointer}@-webkit-keyframes message--show{0%{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes message--show{0%{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.chat-time{opacity:0;color:#fff;font-size:.8rem;background:rgba(0,0,0,.6);padding:0 5px;line-height:17px;height:17px;border-radius:8px;transition:opacity 50ms linear;position:absolute;z-index:1}.invitation__name,.window__chatAgentName,.window__chatVisitorName{line-height:1.21;font-family:"SourceSans Pro Bold",Arial}.window__chatAgentName,.window__chatVisitorName{margin-bottom:3px;color:#333;font-size:.933333rem}.window--classic .window__chat.window__chat--showChatWithAgent{padding-bottom:40px}.chat-message--img{padding:0}.window__chatAgentMessage{background:#f5f7f9;color:#333}.window__chatAgentMessage--file .icon-sendfile,.window__chatVisitorMessage--file .icon-sendfile{position:relative;top:3px;margin-right:5px;font-size:15px}.window__chatAgentMessage--file a[href],.window__chatVisitorMessage--file a[href]{border:none}.window__chatVisitorMessage--file .icon-sendfile{color:#000009}.window__chatAgentMessage--file .icon-sendfile{color:#323dbf}.kbsearch__container .window_chatError,.window--mobile .kbsearch__container .window_chatError,.window--mobile .window--bubble .window__kb_formContainer .window_chatError{width:calc(100% - 88px)}.window_chatError{position:absolute;z-index:99;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);padding:10px 47px 10px 18px;box-shadow:0 0 5px rgba(0,0,0,.1);font-size:.8rem;line-height:1.17;text-align:left;bottom:0;width:calc(100% - 54px);border-radius:5px}.form-bottom .window_chatError{width:100%}.window--bubble .window__kb_formContainer .window_chatError{width:calc(100% - 38px)}.window--circular .window_chatError{border-radius:20px}.chatError__container{position:absolute;top:-20px;width:100%}.window_chatErrorClose{position:absolute;right:15px;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);line-height:12px;cursor:pointer;background:0 0;border:none}.window_chatErrorClose svg{width:12px;height:12px}.window_chatError--urgency .window_chatErrorClose svg{fill:#de3939}.window_chatError--mitigate .window_chatErrorClose svg{fill:#ee8835}.window_chatError i{vertical-align:bottom}.window_chatError--mitigate{background:#feefdd;border:1px solid #fde6de;color:#f7931e}.window_chatError--urgency{background:#fde8e9;border:1px solid #f9e9ea;color:#d83939}.invitation__message,.invitation__message a[href],.invitation__name,.window--bubble .window__chatAgentMessage--file,.window--circle .window__chatAgentMessage--file::before{color:#000004}.window--circle .window__chat.window__chat--showChatWithAgent{padding-bottom:40px}.window--circle .window__chatMessageNoAvatar{margin-left:0;display:block;min-height:auto}.window--bubble .window__chat>div{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.window--bubble .window__chatAgent{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.window--bubble .window__chatVisitor{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.window--bubble .chat-time{font-size:.8rem;padding:0 5px;left:0;top:0}.window--bubble .icon-bubble-line{position:absolute;width:10px;bottom:-1px}.window--bubble .icon-bubble-line .svgPath{width:auto;height:auto}.window--bubble .window__chatVisitorMessage{max-width:calc(100% - 50px)}.window__chatVisitorMessage .chat-message--loading{position:absolute;left:-30px;top:50%;margin-top:-11px}.window--bubble .window__chat{padding:30px 15px 0 27px;margin-bottom:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0}.window--bubble .window__chat.window__chat--showChatWithAgent{padding-bottom:40px}.window--bubble .window--bubble__messageNoAvatar{margin-left:0;padding-left:15px;display:block}.chatMessage__questionList{margin-top:19px}.chatMessage__questionList li>a{display:inline}.chatMessage__questionList--disc{list-style-type:disc;padding-left:20px}.window__chatAgentMessage .chatMessage__questionList.chatMessage__questionList--disc li{display:list-item}.window__chatAgentMessage .btn{margin-top:16px}.chatMessage__chatBotRate__wrapper{position:absolute;right:-50px;bottom:0;width:40px}.chatMessage__chatBotRate{margin-left:10px;-ms-flex-item-align:end;align-self:flex-end}.chatMessage__chatBotRate>button{width:20px;height:20px;border-radius:20px;background-color:#ccc;cursor:pointer;font-size:10px;border-width:0;display:block}.chatMessage__chatBotRate .icon{width:20px;line-height:20px;color:#fff}.chatMessage__chatBotRate>button:hover{background-color:#000003}.chatMessage__chatBotRate>button.chatMessage__chatBotRate--selected,.chatMessage__chatBotRate>button.chatMessage__chatBotRate--selected:hover{background-color:#000003;cursor:default}.chatMessage__chatBotRate>button.chatMessage__chatBotRate--disabled,.chatMessage__chatBotRate>button.chatMessage__chatBotRate--disabled:hover{background-color:#ccc;opacity:.7;cursor:default}.chatMessage__chatBotRate>button.chatMessage__chatBotRateLast{margin-top:5px}.window__chatWithAgent{z-index:9;display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:200px;height:23px;text-align:center;padding-right:15px;padding-left:15px;background:0 0;border:none;cursor:pointer}.window__chatWithAgent--above:focus,.window__chatWithAgent--above:hover{border:1px solid #000003;color:#000003}.window__chatWithAgent--above{padding:4.5px;font-size:.8rem;line-height:1.25;height:27px;width:175px;border-radius:5px;border:1px solid #00000a;color:#00000a;background-color:#fff;position:absolute;top:-37px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.window--circular .window__chatWithAgent--above{border-radius:20px}.window__chatWithAgent--bottom:focus,.window__chatWithAgent--bottom:hover{color:#000003}.window__chatWithAgent--bottom{color:#00000a;font-size:.8rem;line-height:1.12;height:1rem;padding-left:12px;float:left}.window__chat .dot{position:relative;top:-3px}.window__chat .dot__element{display:inline-block;width:4px;height:4px;border-radius:100%;margin-right:5px;background:#000005}.window__chat .dot__element:last-child{margin-right:0}.amimated-infinite{-webkit-animation-iteration-count:infinite}@-webkit-keyframes dot__element--loadingAnimation{0%,100%,50%{-webkit-transform:translateY(0);transform:translateY(0)}25%{-webkit-transform:translateY(-8px);transform:translateY(-8px)}}@keyframes dot__element--loadingAnimation{0%,100%,50%{-webkit-transform:translateY(0);transform:translateY(0)}25%{-webkit-transform:translateY(-8px);transform:translateY(-8px)}}.window__chat .dot__element--loadingAnimation{-webkit-animation-name:dot__element--loadingAnimation;animation-name:dot__element--loadingAnimation;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.window--ie .window__chat .dot__element--loadingAnimation{-webkit-animation:none;animation:none}.window--bubble .chat-message--imgLoading,.window--circle .chat-message--imgLoading,.window--classic .chat-message--imgLoading{width:62px;height:62px;text-align:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.chat-message__secure-form span{display:block;position:absolute;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);top:50%;left:50%}.postchatFormContainer{position:absolute;top:80px;bottom:30px;overflow:auto;overflow-x:hidden;padding:30px 50px;width:100%;-webkit-transform:translateY(450px);-ms-transform:translateY(450px);transform:translateY(450px);opacity:0}.postchatFormContainer__greeting{margin-bottom:20px}.postchatFormContainer__submitContainer{text-align:center}@-webkit-keyframes fadeInUp--windowFormContainer{0%{opacity:0;-webkit-transform:translateY(375px);transform:translateY(375px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeInUp--windowFormContainer{0%{opacity:0;-webkit-transform:translateY(375px);transform:translateY(375px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.window__ssoLogin{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;-webkit-overflow-scrolling:touch;overflow-y:scroll}.window__ssoLogin iframe{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;background-color:#fff}.window--bubble .window__ssoLogin{-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.window--bubble .window__ssoLogin iframe{display:block;width:100%;height:100%;min-height:456px;background-color:#fff}.window_buttons_container .window_buttons_item{margin:12px -22px -22px;padding:4px 0;text-align:center;cursor:pointer}.window_buttons_container .window_buttons_item li{min-width:150px;border-top:1px solid #fff}.window_buttons_container .window_buttons_item button{border:none;background:0 0;color:#328bd9;cursor:pointer;padding:7px 10px;width:100%}.window_buttons_container .window_buttons_item button:hover{background-color:#00000a!important;color:#fff}.window_buttons_container .window_buttons_item--disable button{color:#888}.window_buttons_container .window_buttons_item--disable button:hover{background:0 0!important;color:#888}.webView_background{position:absolute;top:0;width:100%;height:100%;background-color:rgba(0,0,0,.6);border-radius:5px 5px 0 0;z-index:1000}.webView_background .webView_scroll_container{width:100%;position:absolute;height:100%;bottom:0;max-height:100%;-webkit-animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both;animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both}.webView_background .webView_scroll_container--compact{max-height:300px}.webView_background .webView_scroll_container--full{max-height:530px}.webView_background .webView_scroll_container--tall{max-height:415px}.webView_background .webView--scroll{width:100%;position:relative;height:calc(100% - 40px);overflow:-moz-scrollbars-none;-ms-overflow-style:none}.webView_background .webView__title{width:100%;text-align:center;background-color:#fff;height:40px;border-bottom:1px solid #ddd;line-height:40px;border-radius:5px 5px 0 0}.webView_background .webView__title span{font-weight:400;width:200px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:inline-block}.webView_background .webView__close{position:absolute;right:10px;cursor:pointer;z-index:9999;fill:#5d5d5d;background:0 0;border:none;padding:6px 16px 0;width:44px;height:40px;top:0}.webView_background .webView__close svg{width:13px;height:13px}.webView_background .webView{background:#fff}.webView_background .webView .box-field{margin-top:15px;padding:0 30px}.webView_background .webView__content{height:100%}.window--ie .webView_background .webView_scroll_container{-webkit-animation:none;animation:none}.window--bubble .webView_scroll_container--compact{max-height:330px}.window--bubble .webView_scroll_container--full{max-height:560px}.window--bubble .webView_scroll_container--tall{max-height:445px}.window--bubble .webView_scroll_container{padding-top:30px}.window--bubble .webView__close{top:30px}.window_quick_reply_container_box{width:100%;text-align:center;padding:10px 0 5px}.window_quick_reply_container_box i{cursor:pointer}.window_quick_reply_container_box .window_quick_reply_control{padding:5px 5px 8px;display:inline-block;vertical-align:text-bottom}.window_quick_reply_container_box .window_quick_reply_control svg{fill:#00000a}.window_quick_reply_container_box .window_quick_reply_control:hover svg{fill:#000003}.window_quick_reply_container_box .window_quick_reply--botPreview{padding-bottom:12px}.window_quick_reply_container_box .window_quick_reply_buttons_item{width:auto;min-width:75px;height:30px;margin-right:5px;color:#00000a;border:1px solid #00000a;line-height:1;background-color:#fff}.window_quick_reply_container_box .window_quick_reply_buttons_item:hover{background-color:#00000a;color:#fff}.window_quick_reply_container_box .window_quick_reply{white-space:nowrap;width:100%;overflow:hidden;text-align:center;display:inline-block;position:relative;height:30px}.window_quick_reply_container_box .window_quick_reply_buttons{position:absolute;top:0;width:100%;overflow:auto}.window_quick_reply_container_box .window_quick_reply button:last-child{margin-right:0}.window_quick_reply_container_box .window_quick_reply_control+.window_quick_reply{width:calc(100% - 40px)}.botconfirm_list{padding:20px;min-width:190px}.botconfirm_list li{margin-bottom:10px}.botconfirm_list li p{margin:0}.botconfirm_list li p:first-child{color:#666;margin:0}.window__chatAgentMessage .window_botAnswer_richText--disable a[href^="intent:"]{color:#888}.chatInputContainer{position:relative;-ms-flex-negative:0;flex-shrink:0}.chatInputContainer--fadeInUp{-webkit-animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both;animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both;-webkit-animation-delay:.3;animation-delay:.3}.window--ie .chatInputContainer--fadeInUp{-webkit-animation:none;animation:none}.chat-input__controlbox{padding:10px 10px 10px 0;display:-webkit-box;display:-ms-flexbox;display:flex}.textareaContainer{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.window--rtl .chat-input__controlbox{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.window--rtl .chat-input__controlbox--noTool .window__chatInputControl{padding-right:76px}.window__chatInputControl{display:block;width:100%;padding-top:0;padding-bottom:0;font-size:1.06667rem;color:#333;outline:0}.embedded-window:not(.window--mobile) .window__chatInputControl{font-size:1rem}.chatInput--ripple{position:absolute;border-radius:50%;width:50px;height:50px;background:#ddd;-webkit-animation:chatInput--ripple 2s;animation:chatInput--ripple 2s}@-webkit-keyframes chatInput--ripple{from{-webkit-transform:scale(1);transform:scale(1);opacity:.4}to{-webkit-transform:scale(100);transform:scale(100);opacity:0}}@keyframes chatInput--ripple{from{-webkit-transform:scale(1);transform:scale(1);opacity:.4}to{-webkit-transform:scale(100);transform:scale(100);opacity:0}}.window__chatSender{position:absolute;right:26px;bottom:16px;width:20px;height:20px;border:none;background:0 0;-webkit-animation:fadeIn .5s;animation:fadeIn .5s}.window__chatSender svg{width:20px;height:20px;fill:#bbb}.chatInputContainer--typed .window__chatSender svg{fill:#00000a}.window__chatSenderSVG{margin-top:2px}.window__chatSenderSVGPath{fill-rule:evenodd;clip-rule:evenodd;fill:#bbb}.window__chatSender--active .window__chatSenderSVGPath{fill:#00000a}.window__chatSender .icon-input-send{color:#bbb;font-size:1.333333rem;margin-top:3px;margin-right:3px}.window__chatSender--active .icon-input-send{color:#00000a}.chatInputContainer{height:auto;padding-right:2px}.window--mobile .chatInputContainer--active .window__chatInputControl,.window--mobile .window__chatInputControl:focus{border-top:none;box-shadow:initial;transition:none}.window__chatInput--Drag::before{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;background:rgba(250,245,205,.85);z-index:99;text-align:center;color:#d2b067;font-size:2.133333rem}.chat-input__toolbox{-webkit-animation:fadeIn .5s;animation:fadeIn .5s;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-user-select:none;-ms-user-select:none;user-select:none;-moz-user-select:none}.chat-input__toolbox button{cursor:pointer;background:0 0;width:24px;height:24px;padding:3px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:100%;border:1px solid transparent}.chat-input__toolbox button.chat-input__icon--disabled,.chat-input__toolbox button.chat-input__icon--disabled:focus svg:hover,.chat-input__toolbox button.chat-input__icon--disabled:hover svg:hover{cursor:default}.chat-input__toolbox button:hover{background:#00000a;border-radius:100%}.chat-input__toolbox button:hover svg{fill:#000004}.chat-input__toolbox button svg,.chat-input__toolbox button.chat-input__icon--disabled:focus svg,.chat-input__toolbox button.chat-input__icon--disabled:hover svg{fill:#bbb}.chat-input__toolbox button:focus{border-radius:100%;outline:0}.chat-input__toolbox button.chat-input__icon--disabled:focus,.chat-input__toolbox button.chat-input__icon--disabled:hover{background:0 0}.chat-input__toolbox button:last-child{margin-right:0}.global-showFocus .chat-input__controlbox button:focus{border-color:#000003}.window--bubble .chatInputContainer{box-shadow:initial;background:#f8f8f8;border-radius:5px 5px 0 0}.window--bubble .chatInputContainer+div>.footer{background:#f8f8f8}.window--circular.window--bubble .chatInputContainer{border-radius:20px 20px 0 0}.window--mobile .window--circular.window--bubble .chatInputContainer{border-radius:0}.window--mobile.window--ipad .chatInputContainer{border-bottom-right-radius:5px;border-bottom-left-radius:5px}.window--mobile.window--ipad .window--circular .chatInputContainer{border-bottom-right-radius:20px;border-bottom-left-radius:20px}.window--mobile.window--ipad .window--bubble .bubble-box,.window--mobile.window--ipad .window--bubble .chatInputContainer,.window--mobile.window--ipad .window--circular.window--bubble .bubble-box,.window--mobile.window--ipad .window--circular.window--bubble .chatInputContainer{border-radius:0}.chatInputContainer--active .chat-input__controlbox{border-top-color:#000002}.chatInputContainer--typed .window__chatInputControl{padding-right:76px}.window__chatInputControl{border:none;background-color:transparent;padding:0 10px 0 25px;max-height:84px;min-height:27px;overflow-y:hidden;overflow-x:hidden;height:27px;line-height:1.27}.window--circular.window--bubble .window__chatInputControl{padding-left:20px}.chat-input__limitNumSpan{position:absolute;right:40px;color:red;padding:2px 2px 4px;bottom:-4px}.window--classic .chat-input__limitNumSpan{right:20px}.window--bubble .chat-input__controlbox--limit .window__chatInputControl,.window--circle .chat-input__controlbox--limit .window__chatInputControl,.window--classic .chat-input__controlbox--limit .window__chatInputControl{padding-bottom:8px}.window--mobile .window--bubble .chat-input__controlbox--limit .window__chatInputControl,.window--mobile .window--circle .chat-input__controlbox--limit .window__chatInputControl,.window--mobile .window--classic .chat-input__controlbox--limit .window__chatInputControl{padding-bottom:0}.window--mobile .chat-input__limitNumSpan,.window--mobile .window--classic .chat-input__limitNumSpan{right:4px;bottom:0}.window--mobile .window__chatInputControl{border-radius:0}.pasteImageContainer{padding:0 50px 0 25px;-ms-flex-negative:1;flex-shrink:1;width:100%;height:84px;overflow-y:auto;display:-webkit-box;display:-ms-flexbox;display:flex;ime-mode:disabled;outline:0}.invitation__message,.pasteImageClose{display:-webkit-box;-webkit-box-direction:normal;-webkit-box-orient:vertical}.pasteImageContainer::-webkit-scrollbar-thumb{background-color:#c8c8c8}.pasteImage{width:100%}.pasteImageClose{position:absolute;float:right;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;right:35px}.pasteImageClose svg{width:12px;height:12px;fill:#666;opacity:.7}.pasteImageClose:hover svg{opacity:1}.pasteImageTemp{position:absolute;width:1;height:1;left:-1}.footer-text-single-line{height:30px}.footer{-ms-flex-negative:0;flex-shrink:0;z-index:999;width:100%;padding-left:15px;padding-right:15px;font-size:.8rem;height:23px;background:0 0;border-radius:0 0 5px 5px}.window--bubble .footer{margin-top:12px}.window--bubble .window__chat+div>.footer.footer--empty,.window--bubble .window__formContainer+div>.footer.footer--empty,.window--bubble .window__kb_formContainer+div>.footer.footer--empty{margin-top:0;height:0}.window--bubble .chatInputContainer+div>.footer{margin-top:0}.window--circular .footer{border-radius:0 0 20px 20px}.poweredby{height:23px;float:right}.poweredby a[href]{line-height:15px}.poweredby a[href]:active,.poweredby a[href]:focus,.poweredby a[href]:hover{border-bottom:none}.poweredby a[href] svg{height:15px;vertical-align:text-bottom}.poweredby a[href] svg polygon{fill:#ffd928}.poweredby a[href] svg path{fill:#bbb}.invitation{position:fixed;bottom:0;cursor:pointer;width:270px;border:none;box-shadow:0 5px 12.5px 0 rgba(0,0,0,.15);margin:7.5px 12.5px 17.5px;border-radius:5px 5px 0}.invitation__message,.invitation__type{overflow:hidden;width:100%;text-overflow:ellipsis}.window--circular .invitation{border-radius:20px 20px 0}.window--chrome.invitation{box-shadow:0 5px 25px 0 rgba(0,0,0,.15)}.invitation__name{font-size:.933333333rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0}.invitation__message{font-size:.933333333rem;line-height:1.57;padding:20px 35px;max-height:250px;min-height:95px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:left;background:#000001;border:none;cursor:pointer;border-radius:5px 5px 0 0}.invitation__close svg,.window--ie9 .invitation__message,.window--mobile .window--bubble .window__chatOperationPlus,.window--mobile .window--bubble .window__chatSender,.window--mobile .window--circle .window__chatOperationPlus,.window--mobile .window--circle .window__chatSender,.window--mobile .window--classic .window__chatOperationPlus{display:block}a[href].invitation__message:focus,a[href].invitation__message:hover{border:none}.minimize-bar.window--circular,.window--circular .invitation__message{border-radius:20px 20px 0 0}.global-showFocus a[href].invitation__message:focus{background-color:#000006}.window--ie .invitation__message,.window--ie .invitation__name{-webkit-animation:none;animation:none}.invitation__type{height:50px;line-height:1;padding:17.5px 27px;background:#f8f8f8;color:#333;font-size:1rem;white-space:nowrap;border:none;text-align:left;border-radius:0 0 0 5px}button.invitation__type{cursor:pointer;padding:0 27px;color:#bbb}.invitation__type:focus{outline:0}.invitation__avatars{top:-15px;left:100px;position:absolute;z-index:99}.invitation__avatars img{width:28px;height:28px;border-radius:100%;border:1px solid #fff;margin-right:-5.5px}@-webkit-keyframes invitation-show{0%{-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transform-origin:calc(100% - 29px) calc(100% + 18px);transform-origin:calc(100% - 29px) calc(100% + 18px)}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1;-webkit-transform-origin:calc(100% - 29px) calc(100% + 18px);transform-origin:calc(100% - 29px) calc(100% + 18px)}}@keyframes invitation-show{0%{-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transform-origin:calc(100% - 29px) calc(100% + 18px);transform-origin:calc(100% - 29px) calc(100% + 18px)}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1;-webkit-transform-origin:calc(100% - 29px) calc(100% + 18px);transform-origin:calc(100% - 29px) calc(100% + 18px)}}@-webkit-keyframes invitation-showType{0%{-webkit-transform:translateY(35px);transform:translateY(35px);opacity:0}100%{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}@keyframes invitation-showType{0%{-webkit-transform:translateY(35px);transform:translateY(35px);opacity:0}100%{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}.window--ie .invitation-showType{-webkit-animation:none;animation:none}.invitation--coming .invitation:nth-child(2){-webkit-animation:fadeOutUp 374ms linear both;animation:fadeOutUp 374ms linear both;z-index:2147483636}@-webkit-keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.invitation--coming .invitation:nth-child(1){-webkit-animation:invitation-show 375ms cubic-bezier(.785,.135,.15,.86) both;animation:invitation-show 375ms cubic-bezier(.785,.135,.15,.86) both;z-index:2147483636}.invitation__close{position:absolute;top:4px;right:11px;background:0 0;border:none;z-index:1;width:19px;height:19px;cursor:pointer}.invitation__close svg{fill:#000004;width:9px;height:9px;margin:5px}.window--mobile .chatInputContainer{overflow:initial;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.window--mobile .chat-time{display:block}.window--mobile{background-color:rgba(0,0,0,.15);-webkit-backface-visibility:hidden}.window--mobileHorizontal .window--embedded,.window--mobileHorizontal .window--embedded .bubble-box,.window--mobileVertical .window--embedded,.window--mobileVertical .window--embedded .bubble-box{top:0;right:0;bottom:0;left:0;width:100%;height:100%}.window--rtl .container-checkbox i,.window--rtl .controlIndicator{left:auto;right:0}.window--mobileHorizontal .window--bio.window--circle,.window--mobileHorizontal .window--bio.window--circle .bubble-box,.window--mobileHorizontal .window--embedded .bubble-box.window--bio.window--circle,.window--mobileHorizontal .window--embedded .bubble-box.window--bio.window--circle .bubble-box,.window--mobileHorizontal .window--embedded.window--bio.window--circle,.window--mobileHorizontal .window--embedded.window--bio.window--circle .bubble-box,.window--mobileVertical .window--bio.window--circle,.window--mobileVertical .window--bio.window--circle .bubble-box,.window--mobileVertical .window--embedded .bubble-box.window--bio.window--circle,.window--mobileVertical .window--embedded .bubble-box.window--bio.window--circle .bubble-box,.window--mobileVertical .window--embedded.window--bio.window--circle,.window--mobileVertical .window--embedded.window--bio.window--circle .bubble-box{height:100%;top:0}.window--mobile .chat-input__controlbox{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding:20px 50px 20px 28px;border-top:solid;border-top-width:.5px;border-top-color:rgba(0,0,0,.2)}.window--mobile .chat-input__controlbox .textareaContainer{border-bottom:1px solid #787878}.window--mobile .chat-input__controlbox ::-webkit-input-placeholder{color:#787878}.window--mobile .chat-input__controlbox ::-moz-placeholder{color:#787878}.window--mobile .chat-input__controlbox :-ms-input-placeholder{color:#787878}.window--mobile .window__chatInputControl{padding:0 0 10px;height:30px;line-height:20px;min-height:30px;box-shadow:none}.window--mobile .window__chatSender .icon-input-send{color:#000004;font-size:1.5625rem;margin-top:5px}.window--mobile .window__chatSender--active .icon-input-send{color:#000004}.window--mobile .window--bubble .window__chatSender .icon-input-send,.window--mobile .window--circle .window__chatSender .icon-input-send{color:#bbb}.window--mobile .window--bubble .window__chatSender--active .icon-input-send,.window--mobile .window--circle .window__chatSender--active .icon-input-send{color:#000001}.window--mobile .window__chatSender{bottom:20.5px;right:12px;width:37px;height:37px;padding:5px}.window--mobile .window__chatSender svg{width:27px;height:27px;fill:#787878}.window--mobile .chatInputContainer--typed .window__chatSender svg{fill:#00000a}.window--mobile .window__chatSender.window__chatTools{bottom:unset;top:12px}.window--mobile .window__footer{display:none}.window--mobile .window__chatOperationPlusBox{-ms-flex-preferred-size:40px;flex-basis:40px}.window--mobile .window__chatOperationPlus{width:20px;height:20px;margin:0 auto}.window--mobile .window__chatOperationPlus .icon-plus{font-size:1.3125em;color:#fff}.window--mobile .window--classic .window__chatAgentMessage{max-width:calc(100% - 34px)}.window--mobile .window--classic .window__chatAgentMessage.chat-message--img{max-width:200px;max-height:none}.window--mobileHorizontal .window--bubble.whole-window,.window--mobileVertical .window--bubble.whole-window{top:0;height:calc(100% - 0px)}.window--mobile .window--circle .main-container{height:100%}.window--mobile:not(.window--ipad) .window--circle,.window--mobile:not(.window--ipad) .window--circle .bubble-box,.window--mobile:not(.window--ipad) .window--circle .main-container{border-radius:0;top:0;height:100%}.window--mobile:not(.window--ipad) .window--circle .header__avatar{position:static;margin:0}.window--mobile:not(.window--ipad) .window--circle .header__agentInfo{margin:0}.window--mobile:not(.window--ipad) .window--circle .window__headerBox:not(.window__headerBox--banner){display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.window--mobile:not(.window--ipad) .window--circle .header__teamAvatar{position:relative;left:auto;top:0;margin:10px 0 0}.window--mobile:not(.window--ipad) .window--circle .header__teamName{margin-top:10px}.window--mobile:not(.window--ipad) .window--circle .window__headerBox.window__headerBox--hasAvatars{padding-bottom:16px}.window--mobile:not(.window--ipad) .window--circle .header__agent{max-width:100%}.window--mobile:not(.window--ipad) .window--circle .header__agentName{max-width:100%;margin:0 45px}.window--mobile:not(.window--ipad) .window--bubble.whole-window .main-container{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1}.window--mobile .window__chatSender--active .window__chatSenderSVGPath{fill:#fff}.window--mobile .window_chatError{position:absolute;z-index:2147483000;width:calc(100% - 40px)}.window--mobile .window__chatWithAgent--bottom{display:none}.window--mobile .bubble-box--show .bubble{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);animation:showBubble 333ms cubic-bezier(.785,.135,.15,.86) both}.window--mobile .window--bubble.whole-window .main-container{overflow:initial;background-color:#f0f1f2}.window--mobile .window__formContainer--bubble{margin-top:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0}.window--mobile .window--ie10 .window__formContainer--bubble{-ms-flex-negative:1;flex-shrink:1}.window--mobile .window--bubble .window__form{padding-left:45px;padding-right:43px}.window--mobile .window--bubble .window__form .greeting-message-container{-ms-flex-negative:0;flex-shrink:0}.window--mobile .window--bubble .window__operation{background-color:transparent;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.window--mobile .window__operation{height:20px;padding-right:6px}.window--mobile .window__operation>a,.window--mobile .window__operation>button{margin:0 1px;height:20px}.window--mobile .window__operation>a>svg,.window--mobile .window__operation>button>svg{width:20px;height:16px}.window--mobile .window__operation>a>svg.icon-close,.window--mobile .window__operation>a>svg.icon-endchat,.window--mobile .window__operation>button>svg.icon-close,.window--mobile .window__operation>button>svg.icon-endchat{width:12px}.window--mobile .bubble-close{width:30px;height:30px;right:0;top:0}.global-showFocus .window--mobile .window--bubble a:focus{border-bottom-color:#787878}.window--mobile .window--bubble .window__operation>a>svg,.window--mobile .window--bubble .window__operation>button>svg{fill:#787878}.window--mobile .window--bubble .main-container .window__title{position:relative}.window--mobile .chatError__container{left:0}.window--mobile .window--bubble .window__chat{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding-left:25px;padding-right:27px}.window--mobile .window--bubble .window__form,.window__kb_formContainer{display:-webkit-box;display:-ms-flexbox;-webkit-box-orient:vertical;-webkit-box-direction:normal}.window--mobile .window--bubble .window__chat>div{-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.window--mobile .window--bubble .window__chat>div>div>div.window__chatAgent+div.window__chatAgent,.window--mobile .window--bubble .window__chat>div>div>div.window__chatVisitor+div.window__chatVisitor{margin-top:8px}.window--mobile .window--bubble .window__chat>div>div>div+div{margin-top:16px}.window--mobile .window--bubble .window__chat>div>div+div{margin-top:0}.window--mobile .window--bubble .chatInputContainer{background-color:#fff}.window--mobile .window--bubble .window__kb_formContainer{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.window--mobile .window--bubble .window__form{display:flex;-ms-flex-direction:column;flex-direction:column}.window--mobile.window--ipad .window--bubble .chatInputContainer{border:2px solid #f0f1f2;border-top:none}.window--mobile.window--ipad.withSideWin .window--bubble .chatInputContainer{border-bottom:none}.window--mobile.window--ipad.withSideWin .window--bubble .window__chat>div>div>div.botConfidenceAnswerDiv>div.window__chatAgent+div.window__chatAgent,.window--mobile.window--ipad.withSideWin .window--bubble .window__chat>div>div>div.botConfidenceAnswerDiv>div.window__chatVisitor+div.window__chatVisitor{margin-top:8px}.window--mobile.window--ipad.withSideWin .window--bubble .window__chat>div>div>div.botConfidenceAnswerDiv>div+div{margin-top:16px}.window--mobile .window_buttons_container .window_buttons_item li{border-top:1px solid #ccc}.window--mobile .main-container{background-color:#f0f1f2}.window--mobile .window__chatVisitorMessage{border-color:#ccc;border-width:.3px}.window--mobile .chat-input__toolbox{position:relative;width:100%;padding:25px 20px 25px 40px;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;top:unset;right:unset}.window--mobile .chat-input__toolbox button{width:45px;height:45px;border-radius:100%;border:1px solid #787878;margin-right:33px}.window--mobile .chat-input__toolbox button:hover{background:0 0}.window--mobile .chat-input__toolbox button:hover svg{fill:#787878}.window--mobile .chat-input__toolbox svg{width:20px;height:20px;fill:#787878}.window--mobile .whole-window:not(.window--classic) .window__header{background-color:transparent;box-shadow:none}.window--mobile .whole-window:not(.window--classic) .window__header .header__agentName{color:#333}.window--classic:not(.window--embedded) .window__header,.window--mobile:not(.window--ipad) .window__header{border-radius:0}html:not(.global-showFocus) button::-moz-focus-inner{border:0}.window--mobile ::-webkit-scrollbar{display:none}.window__kb_formContainer{display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:25px;margin-right:25px;margin-top:30px}.kbsearch__container{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:64px;height:100%;-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:hidden}.window--bubble .kbsearch__container,.window--mobile .window--bubble .kbsearch__container{margin-bottom:0;padding-bottom:98px}.window--embedded.window--bubble .kbsearch__container{border-radius:5px}.window--embedded.window--bubble .kbsearch-window__chatWithAgent .buttonProgressContainer{border-radius:0 0 5px 5px}.window--mobile .window--bubble .kbsearch-window__chatWithAgent .buttonProgressContainer,.window--mobile .window--bubble .kbsearch__container{border-radius:0}.article-title,.kbsearch-icon{background:0 0;border:none;cursor:pointer}.window--bubble .kbsearch-window__chatWithAgent .chatError__container{top:10px}.greeting-message__kb{margin-bottom:10px}.kbsearch-input__container{padding-bottom:25px;position:relative}.kbsearch-input{width:100%;height:35px;padding:7.5px 30px 7.5px 17px}.kbsearch-input::-ms-clear{display:none}input::-webkit-search-cancel-button{display:none}.kbsearch-icon{display:inline-block;position:absolute;right:8px;top:0;width:30px;height:35px}.window--rtl .kbsearch-icon{left:10px;right:auto}.kbsearch-icon i{position:absolute;top:50%;left:50%;-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);font-size:14px}.kbsearch-window__chatWithAgent{position:absolute;bottom:35px;left:0;right:0}.article-list-container,.kbsearch-window__form{position:relative}.kbsearch-window__chatWithAgent .buttonProgressContainer{padding:0 45px}.window--bubble .kbsearch-window__chatWithAgent{bottom:35px;right:unset;width:calc(100% - 54px);margin:0 27px}.window--bubble .kbsearch-window__chatWithAgent .buttonProgressContainer{padding:30px 19px 35px}.window--bubble .kbsearch--noFooter .kbsearch-window__chatWithAgent{bottom:0}.window--mobile .window--bubble .kbsearch-window__chatWithAgent{bottom:0;width:100%;margin:0}.window--mobile .window--bubble .kbsearch-window__chatWithAgent .buttonProgressContainer{padding:30px 45px 35px}.window--mobile .window--bubble .kbsearch-window__chatWithAgent.kbsearch-window__chatWithAgent-mobile-bubble .buttonProgressContainer{padding-top:20px;padding-bottom:45px}.window--mobile.withSideWin .window--bubble .kbsearch-window__chatWithAgent.kbsearch-window__chatWithAgent-mobile-bubble .buttonProgressContainer{padding-bottom:30px}.window--ie .window--bubble.window--ie9 .kbsearch-window__chatWithAgent{bottom:20px}.window--ie .window--embeddend.window--bubble.window--ie9 .kbsearch-window__chatWithAgent{bottom:50px}.mobileSidewindow.kbsearch-mobile .kbsearch-window__chatWithAgent{bottom:55px}.window__form.kbsearch-window__form{padding-top:20px;padding-bottom:0}.window__formContainer--bubble .kbsearch-window__form{height:auto}.kbsearch-window__form>div.article-list-container .article-list .article-item:last-child,.kbsearch-window__form>div.article-list-container .article-list .article-item:last-child .article-summary{margin-bottom:0}.article-item{margin-bottom:15px}.article-title{font-size:.93333333rem;color:#323dbf;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-text-size-adjust:100%;display:block;text-align:left;width:100%;border-bottom:1px solid transparent;height:20px;margin-bottom:5px}.window--rtl .article-title{text-align:right}.article-title>span{border-bottom:1px solid transparent;display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis}.article-summary,.kbsearch-window__form{display:-webkit-box;-webkit-box-orient:vertical}.article-title:hover>span{border-bottom-color:#2b72ef}.article-summary{margin-bottom:25px;font-size:12px;line-height:1.67;color:#666;max-height:40px;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-text-size-adjust:100%}.kb-highlight{color:#ed1c24}.window--bubble .window__form .icon-bubble-line__div{bottom:-1px;overflow:hidden;height:16px;position:absolute;width:10px;left:-10px}.window--bubble .window__form .icon-bubble-line__div .icon-bubble-line{left:0;bottom:0}.window--circle.window--ie10 .kbsearch__container,.window--classic.window--ie10 .kbsearch__container{max-height:calc(100% - 220px)}.window--mobile .window--bubble .kbsearch-window__chatWithAgent.kbsearch-window__chatWithAgent-mobile-bubble{bottom:45px}.window--mobile .kbsearch__container{overflow-y:hidden;margin-bottom:0;padding-bottom:95px}.kbsearch-window__form{display:-ms-flexbox;display:flex;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.article-list-container{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto}.window--ie .window--bubble:not(.window--mobile) .article-list-container{-webkit-box-flex:1;-ms-flex:auto;flex:auto}.window--mobile.withSideWin .kbsearch__container{margin-bottom:0;padding-bottom:125px}.window--mobile.withSideWin .kbsearch-window__chatWithAgent{bottom:75px}.DayPicker{display:inline-block}.DayPicker-wrapper{position:relative;-webkit-user-select:none;user-select:none;padding-bottom:1rem;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.DayPicker-Months{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.window--bubble .DayPicker-Months,.window--circle .DayPicker-Months{color:#666}.DayPicker-Month{display:table;border-collapse:collapse;border-spacing:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin:1rem .5rem 0}.DayPicker-NavButton{position:absolute;cursor:pointer;top:1rem;right:1.5rem;margin-top:2px;color:#8b9898;width:1.25rem;height:1.25rem;display:inline-block;background-size:50%;background-repeat:no-repeat;background-position:center}.DayPicker-NavButton--interactionDisabled,.window--minimized .window--bubble{display:none}.DayPicker-NavButton:hover{opacity:.8}.DayPicker-NavButton--prev{margin-right:1.5rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAwCAYAAAB5R9gVAAAABGdBTUEAALGPC/xhBQAAAVVJREFUWAnN2G0KgjAYwPHpGfRkaZeqvgQaK+hY3SUHrk1YzNLay/OiEFp92I+/Mp2F2Mh2lLISWnflFjzH263RQjzMZ19wgs73ez0o1WmtW+dgA01VxrE3p6l2GLsnBy1VYQOtVSEH/atCCgqpQgKKqYIOiq2CBkqtggLKqQIKgqgCBjpJ2Y5CdJ+zrT9A7HHSTA1dxUdHgzCqJIEwq0SDsKsEg6iqBIEoq/wEcVRZBXFV+QJxV5mBtlDFB5VjYTaGZ2sf4R9PM7U9ZU+lLuaetPP/5Die3ToO1+u+MKtHs06qODB2zBnI/jBd4MPQm1VkY79Tb18gB+C62FdBFsZR6yeIo1YQiLJWMIiqVjQIu1YSCLNWFgijVjYIuhYYCKoWKAiiFgoopxYaKLUWOii2FgkophYp6F3r42W5A9s9OcgNvva8xQaysKXlFytoqdYmQH6tF3toSUo0INq9AAAAAElFTkSuQmCC)}.DayPicker-NavButton--next{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAwCAYAAAB5R9gVAAAABGdBTUEAALGPC/xhBQAAAXRJREFUWAnN119ugjAcwPHWzJ1gnmxzB/BBE0n24m4xfNkTaOL7wOtsl3AXMMb+Vjaa1BG00N8fSEibPpAP3xAKKs2yjzTPH9RAjhEo9WzPr/Vm8zgE0+gXATAxxuxtqeJ9t5tIwv5AtQAApsfT6TPdbp+kUBcgVwvO51KqVhMkXKsVJFXrOkigVhCIs1Y4iKlWZxB1rX4gwlpRIIpa8SDkWmggrFq4IIRaJKCYWnSgnrXIQV1r8YD+1Vrn+bReagysIFfLABRt31v8oBu1xEBttfRbltmfjgEcWh9snUS2kNdBK6WN1vrOWxObWsz+fjxevsxmB1GQDfINWiev83nhaoiB/CoOU438oPrhXS0WpQ9xc1ZQWxWHqUYe0I0qrKCQKjygDlXIQV2r0IF6ViEBxVTBBSFUQQNhVYkHIVeJAtkNsbQ7c1LtzP6FsObhb2rCKv7NBIGoq4SDmKoEgTirXAcJVGkFSVVpgoSrXICGUMUH/QBZNSUy5XWUhwAAAABJRU5ErkJggg==)}.DayPicker-Caption{padding:0 .5rem;display:table-caption;text-align:left;margin-bottom:.5rem}.DayPicker-Caption>div{font-size:1.15rem;font-weight:500}.DayPicker-Weekdays{margin-top:1rem;display:table-header-group}.DayPicker-WeekdaysRow{display:table-row}.DayPicker-Weekday{display:table-cell;padding:.5rem;font-size:.875em;text-align:center;color:#8b9898}.DayPicker-Weekday abbr[title]{border-bottom:none;text-decoration:none}.DayPicker-Body{display:table-row-group}.DayPicker-Week{display:table-row}.DayPicker-Day,.DayPicker-WeekNumber{display:table-cell;padding:.5rem;cursor:pointer;vertical-align:middle}.DayPicker-Day{text-align:center;outline:0}.DayPicker-WeekNumber{text-align:right;min-width:1rem;font-size:.75em;color:#8b9898;border-right:1px solid #eaecec}.DayPicker--interactionDisabled .DayPicker-Day{cursor:default}.DayPicker-Footer{padding-top:.5rem}.DayPicker-TodayButton{border:none;background-image:none;background-color:transparent;box-shadow:none;cursor:pointer;color:#4a90e2;font-size:.875em}.DayPicker-Day--today{color:#d0021b;font-weight:700}.DayPicker-Day--outside{cursor:default;color:#8b9898}.DayPicker-Day--disabled{color:#dce0e0;cursor:default}.DayPicker-Day--sunday{background-color:#f7f8f8}.DayPicker-Day--sunday:not(.DayPicker-Day--today){color:#dce0e0}.DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside){position:relative;color:#666;background-color:#000001;border-radius:100%}.DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside):hover{background-color:#000002}.window--circle .DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside){background-color:#000001;color:#000004}.window--circle .DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside):hover{background-color:#000002;color:#000004}.window--bubble .DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside){background-color:#000001;color:#000004}.window--bubble .DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside):hover{background-color:#000002;color:#000004}.DayPicker:not(.DayPicker--interactionDisabled) .DayPicker-Day:not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not(.DayPicker-Day--outside):hover{background-color:#f0f8ff;border-radius:50%}.DayPickerInput{position:relative}.DayPickerInput .input[readOnly]{border:1px solid #ddd}.DayPickerInput .form__input[disabled]{color:#888}.DayPickerInput-OverlayWrapper{position:absolute;z-index:99;top:-265px;left:0;width:225px}.DayPickerInput-Overlay{background:#fff;box-shadow:0 2px 5px rgba(0,0,0,.15)}.minimize-bar{background-color:#000001;cursor:pointer;border:none;width:300px;height:30px;border-radius:5px 5px 0 0;padding:0 15px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-line-pack:center;align-content:center}.minimize-bar .minimize-bar__message{font-size:14px;line-height:30px;color:#000004;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;text-align:left;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.minimize-bar svg{width:16px;height:30px;fill:#000004;-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0}@media all and (-webkit-min-device-pixel-ratio:0){::-webkit-scrollbar{height:6px;width:6px}.window__chat:hover::-webkit-scrollbar-thumb,.window__form:hover::-webkit-scrollbar-thumb,.window__formContainer:hover::-webkit-scrollbar-thumb,textarea:hover::-webkit-scrollbar-thumb{background-color:#c8c8c8}.window__chat{width:calc(100% - 2px);padding:18px 25px 0 27px;margin-bottom:0}.window__form{width:calc(100% - 2px);padding-right:43px}.window__form.window__ssologin{padding-right:45px}.window--bubble .window__form.window__ssologin{padding-right:19px}.kbsearch-window__chatWithAgent .buttonProgressContainer{padding-right:43px}.window__formContainer--bubble{padding-right:25px;margin-right:2px}.window__formContainer--bubble .window__form{width:100%}.window--mobile .window--bubble .kbsearch-window__chatWithAgent{width:calc(100% - 2px)}.window--mobile .window--bubble .kbsearch-window__chatWithAgent .buttonProgressContainer{padding:30px 43px 35px 45px}.window--mobile .window--bubble .window__form{padding-left:45px;padding-right:43px}.window--mobile .window--bubble .window__form.kbsearch-window__form{padding-left:20px;padding-right:18px}::-webkit-scrollbar-button{height:4px;background-color:transparent;background-repeat:no-repeat;cursor:pointer}::-webkit-scrollbar-corner{background-color:#fff}::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::-webkit-scrollbar-track{background-color:transparent}.window--rtl .window__form{padding-right:45px;padding-left:43px}}body,html,ol,ul{margin:0}::-webkit-input-placeholder{color:#bbb}::-moz-placeholder{color:#bbb}:-ms-input-placeholder{color:#bbb}*{box-sizing:border-box;-webkit-overflow-scrolling:touch}::after,::before{box-sizing:border-box}html{position:fixed;left:0;right:0;top:0;bottom:0;font-size:15px;-webkit-text-size-adjust:100%}body{font-family:"SourceSans Pro",Arial;line-height:1.42857143;overflow:hidden}h1,h2,h3{font-weight:400;font-family:"SourceSans Pro Bold"}.clearfix::after{content:"";display:block;clear:both}.clear{clear:both}a{color:#000001;cursor:pointer;text-decoration:none}.global-showFocus .window__operation>a:focus{outline:0!important;border-bottom-width:1px;border-bottom-style:solid;text-decoration:none}a[href]:active,a[href]:focus,a[href]:hover{outline:0!important;border-bottom:1px solid #000007;text-decoration:none}input,textarea{font-family:inherit}ol,ul{list-style-type:none;padding:0}b,strong{font-family:SourceSans Pro Bold,Arial}textarea{resize:none}.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}.animated-delayFrames7{-webkit-animation-delay:292ms;animation-delay:292ms}.animated-delayFrames10{-webkit-animation-delay:417ms;animation-delay:417ms}.animated-delayFrames13{-webkit-animation-delay:542ms;animation-delay:542ms}.amimated-infinite{animation-iteration-count:infinite}.transform-origin-00{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes main-container--fadeOut{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}99%{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(620px);transform:translateY(620px)}}@keyframes main-container--fadeOut{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}99%{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(620px);transform:translateY(620px)}}@-webkit-keyframes main-container--fadeIn{0%{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes main-container--fadeIn{0%{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}.fadeInUp--window__form{-webkit-animation-duration:292ms;animation-duration:292ms;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:fadeInUp;animation-name:fadeInUp;-webkit-animation-delay:625ms;animation-delay:625ms}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes at-ripple{0%{box-shadow:0 0 0 0 #dadada}100%{box-shadow:0 0 0 25px rgba(218,218,218,0)}}@keyframes at-ripple{0%{box-shadow:0 0 0 0 #dadada}100%{box-shadow:0 0 0 25px rgba(218,218,218,0)}}.at-ripple{-webkit-animation-name:at-ripple;animation-name:at-ripple}@-webkit-keyframes yAxisWindow{100%{opacity:1}}@keyframes yAxisWindow{100%{opacity:1}}@-webkit-keyframes window--opening{0%{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}99.999999%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes window--opening{0%{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}99.999999%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes window--adaptive--opening{0%{opacity:.666667;-webkit-transform:scale(.666667);transform:scale(.666667)}99.999999%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}100%{opacity:1;-webkit-transform:none;transform:none}}@keyframes window--adaptive--opening{0%{opacity:.666667;-webkit-transform:scale(.666667);transform:scale(.666667)}99.999999%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}100%{opacity:1;-webkit-transform:none;transform:none}}@-webkit-keyframes window--minimizing{0%{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}100%{-webkit-transform:translateY(100%);transform:translateY(100%);opacity:0}}@keyframes window--minimizing{0%{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}100%{-webkit-transform:translateY(100%);transform:translateY(100%);opacity:0}}@-webkit-keyframes window--adaptive--minimizing{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.666667);transform:scale(.666667);opacity:0}}@keyframes window--adaptive--minimizing{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}100%{-webkit-transform:scale(.666667);transform:scale(.666667);opacity:0}}.animation--chatting.window--animated .header{transition:height 416ms cubic-bezier(.785,.135,.15,.86) .4s}.animation--chatting .prechatHeader,.animation--waiting .prechatHeader{opacity:0;-webkit-transform:translateY(-140px);-ms-transform:translateY(-140px);transform:translateY(-140px);transition:all 416ms cubic-bezier(.785,.135,.15,.86) 1.792s}@-webkit-keyframes animation-translateY-Up{0%{-webkit-transform:translateY(0);transform:translateY(0);overflow:hidden}100%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes animation-translateY-Up{0%{-webkit-transform:translateY(0);transform:translateY(0);overflow:hidden}100%{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.animation-translateY-Up{-webkit-animation-duration:458ms;animation-duration:458ms;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:cubic-bezier(.785,.135,.15,.86);animation-timing-function:cubic-bezier(.785,.135,.15,.86);-webkit-animation-name:animation-translateY-Up;animation-name:animation-translateY-Up;-webkit-animation-delay:1.209s;animation-delay:1.209s}.whole-window{position:absolute;z-index:10;width:100%;height:100%;box-shadow:0 5px 12.5px 0 rgba(0,0,0,.15);-webkit-animation:window--opening .3s linear none;animation:window--opening .3s linear none;border-radius:5px}.window--chrome .whole-window{box-shadow:0 5px 25px 0 rgba(0,0,0,.15)}.window--chrome .whole-window.window--bubble,.window--chrome .whole-window.window--bubble:not(.window--embedded){box-shadow:none}.window--chrome .whole-window:not(.window--embedded){box-shadow:7.5px 0 15px 0 rgba(0,0,0,.15)}.window--chrome .whole-window:not(.window--embedded).window--bubble{box-shadow:none}.whole-window:not(.window--embedded){box-shadow:7.5px 0 7.5px 0 rgba(0,0,0,.15)}.whole-window:not(.window--embedded).window--bubble,.window--bubble{box-shadow:none}.whole-window.window--circular{border-radius:20px}.whole-window.window--adaptive{-webkit-transform-origin:bottom right;-ms-transform-origin:bottom right;transform-origin:bottom right;-webkit-animation:window--adaptive--opening .2s linear none;animation:window--adaptive--opening .2s linear none}.window--ie .whole-window,.window--ie .whole-window.window--adaptive{-webkit-animation:none;animation:none}.window--minimized .whole-window{-webkit-animation:window--minimizing .3s linear forwards;animation:window--minimizing .3s linear forwards}.window--minimized .whole-window.window--adaptive{-webkit-transform-origin:bottom right;-ms-transform-origin:bottom right;transform-origin:bottom right;-webkit-animation:window--adaptive--minimizing .2s linear forwards;animation:window--adaptive--minimizing .2s linear forwards}.window--ie .window--minimized .whole-window,.window--ie .window--minimized .whole-window.window--adaptive{-webkit-animation:none;animation:none}.window--bubble.whole-window .main-container{position:relative;min-height:200px}.window--bubble,.window--ipad .window--embedded .bubble-box.bubble-box--minimize{position:absolute}.window--embedded,.window--embedded .bubble-box{right:12.5px;bottom:17.5px;width:calc(100% - 25px);height:calc(100% - 25px)}.window--circle--sidewindow,.window--classic--sidewindow{box-shadow:0 5px 12.5px 0 rgba(0,0,0,.15)}.window--chrome .window--circle--sidewindow,.window--chrome .window--classic--sidewindow{box-shadow:0 5px 25px 0 rgba(0,0,0,.15)}.window--embedded.window--circle--sidewindow,.window--embedded.window--circle--sidewindow .bubble-box,.window--embedded.window--classic--sidewindow,.window--embedded.window--classic--sidewindow .bubble-box{width:calc(100% - 25px)}.window--ipad .window--embedded,.window--ipad .window--embedded .bubble-box{right:12.5px;width:calc(100% - 25px)}.window--ipad .window--bubble.window--embedded,.window--ipad .window--bubble.window--embedded .bubble-box{bottom:0;height:100%}.window--bubble.window--embedded,.window--bubble.window--embedded .bubble-box{height:100%;width:100%;right:0;bottom:0}.window--bubble{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.main-container,.window--bubble .main-container{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-direction:normal}.main-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;height:100%;background-repeat:no-repeat;background-position:center bottom;background-color:#fff;background-size:cover}.loading-circle{fill:#a3a3a3}#comm100-audio-chat-window{transition:width .25s cubic-bezier(.785,.135,.15,.86)}.main-container,.main-container .bubble-box{border-radius:5px}.window--circular .main-container,.window--circular .main-container .bubble-box{border-radius:20px}.window--mobile:not(.window--ipad) .main-container,.window--mobile:not(.window--ipad) .main-container .bubble-box{border-radius:0}.window--embedded.window--circle,.window--embedded.window--circle .bubble-box{height:calc(100% - 25px);top:7.5px}.window--embedded.window--bio.window--circle,.window--embedded.window--bio.window--circle .bubble-box{height:calc(100% - 50px);top:unset}.window--embedded.window--circle.window-noavator,.window--embedded.window--circle.window-noavator .bubble-box{height:calc(100% - 7.5px)}.window--bio.window--circle{height:calc(100% - 32.5px);top:32.5px}.window--bio.window--circle .bubble-box,.window--circle.window-noavator,.window--circle.window-noavator .bubble-box{top:0;height:100%}.window--circle.window--embedded.window-noavator,.window--circle.window--embedded.window-noavator .bubble-box{top:unset}.window--bubble{background:0 0}.window--bubble:not(.window--embedded){padding-left:0;padding-right:0}.window--rtl .container-checkbox,.window--rtl .control{padding-left:0;padding-right:26px}.window--bubble .main-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background:0 0;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-negative:0;flex-shrink:0;position:static;bottom:0;height:auto}.window--bubble.window--rtl .window__chatSystemMessageContent,.window--rtl .bubble,.window--rtl .knowlegedbase__content,.window--rtl .window__chatAgentMessage,.window--rtl .window__chatInputControl,.window--rtl .window__chatSystemMessage,.window--rtl .window__chatVisitorMessage,.window--rtl .window__form,.window--rtl .window__formContainer,.window--rtl .window__formGreeting,.window--rtl .window_chatError{direction:rtl}.window--bubble.window--rtl .window__chatSystemMessage{direction:ltr}.window--rtl .rating{text-align:right}.window--rtl .rating .star:first-child{margin-right:0}.window--rtl .rating .star:last-child{margin-right:10px}.window--rtl .prechatForm__social .prechatForm__socialBtn{margin-right:0;margin-left:12px}.window--rtl .prechatForm__social .prechatForm__socialBtn:last-child{margin-left:0}.window--rtl .bubble .bubble__operation .btn:first-child,.window--rtl .form-fields--horizonal .field-name{margin-right:0;margin-left:10px}.window--rtl .invitation__message,.window--rtl .invitation__type,.window--rtl .minimize-bar__message{direction:rtl;text-align:right}.window--rtl .minimize-bar__message{padding-right:15px}.window--ie9.window--classic .header__agentInfo,.window--ie9.window--classic .header__avatar{float:left}.window--ie9.window--circle .window__form,.window--ie9.window--classic .window__form{height:calc(100% - 156px);padding-bottom:30px}.window--ie9.window--circle .window__form.window__ssologin,.window--ie9.window--classic .window__form.window__ssologin{height:auto}.window--ie9 .chat-time{margin-top:15px}.window--ie9.chat-time{padding-top:10px}.window--ie9.window--classic .header__avatar{float:left}.window--ie9 .chatInputContainer{position:absolute;bottom:23px;width:100%}.window--ie9.window--bubble .window__chat,.window--ie9.window--bubble .window_quick_reply_container_box{position:relative;bottom:75px}.window--ie9 .buttonProgressContainerSuccess .buttonProgressBtnAnimated{opacity:.65}.window--ie9 .buttonProgress__layerCircle,.window--ie9 .buttonProgress__layerLoading,.window--ie9 .buttonProgress__layerSuccess,.window--ie9 .lds-css{display:none!important}.window--ie9 .window__footer{position:absolute;bottom:0}.window--ie9 .multipleText{overflow:auto}.window--ie9.window--bubble .window__chatAgent{position:relative}.window--ie9 .rating .star.animate{color:#ffd051}.window--ie9 .select-box .select{padding:5px 10px}.window--ie9 .form-fields .box-field iframe{height:30px}.window--ie9 .window__formContainer--bubble{overflow-y:auto!important}.window--ie9.window--classic .header__agent--withlogo{max-width:calc(100% - 110px)}.window--ie9.window--classic .header__logo{float:right}.window--ie9.window--classic .header__agentInfo{max-width:calc(100% - 60px)}.window--ie9.window--classic .window__header--withBio{height:136px}.window--ie9.window--classic .window__header--noBio{height:126px;background-color:#000001}.window--ie9.window--circle .window__header--noBio,.window--ie9.window--circle .window__header--withBio,.window--ie9.window--circle .window__headerBox{height:136px}.window--ie9.window--classic .window__chat--withBio{max-height:calc(100% - 236px)}.window--ie9.window--classic .window__chat--withBio.window__chat--withQuickReply{height:calc(100% - 286px)}.window--ie9.window--classic .window__chat--noBio{height:calc(100% - 195px)}.window--ie9.window--classic .window__chat--noBio.window__chat--withQuickReply{height:calc(100% - 245px)}.window--ie9.window--circle .window__chat--withBio{max-height:calc(100% - 205px)}.window--ie9.window--circle .window__chat--withBio.window__chat--withQuickReply{height:calc(100% - 255px)}.window--ie9.window--circle .window__chat--noBio{height:calc(100% - 205px)}.window--ie9.window--circle .window__chat--noBio.window__chat--withQuickReply{height:calc(100% - 255px)}.window--ie9.window--bubble .main-container{overflow:auto;overflow-x:hidden}.window--ie9 .window__chatInputControl{padding:0 10px 0 25px}.window--ie9 .chat-input__toolbox{position:absolute;right:20px;bottom:10px}.window--ie9 .main-container{display:block}.window--ie9 .window--bubble.whole-window .main-container{position:fixed}.window--ie9 .window__kb_formContainer{margin-right:0;margin-left:0}.window--ie9 .agentMessage__avatar,.window--ie9 .window__chatAgentMessage{float:left}.window--ie9 .window--bubble .window__operation-menu{max-width:160px}.window--ie9 .window__operation-menu li a[role=menuitem]>div.menu__text-container{max-width:85px}.window--ie9 .window__operation-menu,.window--ie9 .window__operation-menu-icon{width:150px}.window--ie .window--embedded.window--circle .window__header--hasAvatar+.window__title .bubble-box{top:32.5px}#container~div>:last-child{max-height:580px;overflow-y:auto!important}#container~div>:last-child::-webkit-scrollbar-thumb{background-color:#c8c8c8}',iconcss='@font-face{font-family:icons;src:url({FONT_URL_PREFIX}/icons.7feec05d9664460b0865662a1285fe6b.eot?#iefix) format("embedded-opentype"),url({FONT_URL_PREFIX}/icons.7feec05d9664460b0865662a1285fe6b.woff) format("woff"),url({FONT_URL_PREFIX}/icons.7feec05d9664460b0865662a1285fe6b.ttf) format("truetype"),url({FONT_URL_PREFIX}/icons.7feec05d9664460b0865662a1285fe6b.svg#icons) format("svg")}.icon{font-family:icons!important;font-style:normal;font-weight:400!important;display:inline-block;vertical-align:baseline;text-align:center;text-transform:none;text-rendering:auto;line-height:1;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-bot-active:before{content:"\\f101"}.icon-bot:before{content:"\\f102"}.icon-bubble-line:before{content:"\\f103"}.icon-bubble-line1:before{content:"\\f104"}.icon-bubble:before{content:"\\f105"}.icon-close:before{content:"\\f106"}.icon-coBrowsing-active:before{content:"\\f107"}.icon-coBrowsing:before{content:"\\f108"}.icon-drag:before{content:"\\f109"}.icon-embedded:before{content:"\\f10a"}.icon-facebook:before{content:"\\f10b"}.icon-googleplus:before{content:"\\f10c"}.icon-helpful:before{content:"\\f10d"}.icon-input-send:before{content:"\\f10e"}.icon-kb-active:before{content:"\\f10f"}.icon-kb-search:before{content:"\\f110"}.icon-kb:before{content:"\\f111"}.icon-kbSearch-active:before{content:"\\f112"}.icon-kbSearch:before{content:"\\f113"}.icon-media-active:before{content:"\\f114"}.icon-media:before{content:"\\f115"}.icon-minimize:before{content:"\\f116"}.icon-not-helpful:before{content:"\\f117"}.icon-plus:before{content:"\\f118"}.icon-popup:before{content:"\\f119"}.icon-rating-full:before{content:"\\f11a"}.icon-rating-half:before{content:"\\f11b"}.icon-sendfile:before{content:"\\f11c"}.icon-video:before{content:"\\f11d"}.icon-voice-active:before{content:"\\f11e"}.icon-voice:before{content:"\\f11f"}',desktop="desktop",mobile="mobile",ipad="ipad",systemEndChat="systemEndChat",systemPromptOfflineMessage="systemPromoteOfflineMesage",systemVisitorNotRespond="visitorNotRespond",systemVisitorNotRespondAndEndChat="visitorNotRespondAndEndChat",systemStartChatbotChat="systemStartChatbot",systemSwitchToOffline="systemGotoOfflineMessage",visitorAddTextMessage="visitorAddTextMessage",visitorRequestChat="visitorRequestChat",visitorSetEmail="visitorSetEmail",visitorSendFile="visitorSendFile",visitorSendImage="visitorSendImage",visitorSubmitSecureForm="visitorSubmitSecureForm",visitorCancelSecureForm="visitorCancelSecureForm",visitorCreditCardMasking="visitorCreditCardMasked",visitorGetSecureFormFailure="visitorGetSecureFormFailure",visitorIsTyping="visitorTyping",agentAddTextMessage="agentSendText",agentAddTextMessageViaManualInvitation="agentAddInvitationText",agentAcceptChat="agentAcceptChat",agentRefuseChat="agentRefuseChat",agentEndChat="agentEndChat",agentJoinChat="agentJoinChat",agentTransferChat="agentTransferChat",agentSendUrl="agentSendUrl",agentIsTyping="agentTyping",agentTransferChatToDepartment="agentTransferChatToDepartment",agentAcceptTransfer="agentAcceptTransfer",agentRefuseTransfer="agentRefuseTransfer",agentSendFile="agentSendFile",agentSendImage="agentSendImage",agentSendImageStart="agentSendImageStart",agentRequestSecureForm="agentRequestSecureForm",agentVideoChatRequest="agentVideoChatRequest",agentVideoChatCancelRequest="agentVideoChatCancelRequest",agentVideoChatAccept="agentVideoChatAccept",agentVideoChatRefuse="agentVideoChatRefuse",agentVideoChatStop="agentVideoChatStop",visitorVideoChatRequest="visitorVideoChatRequest",visitorVideoChatCancelRequest="visitorVideoChatCancelRequest",visitorVideoChatAccept="visitorVideoChatAccept",visitorVideoChatRefuse="visitorVideoChatRefuse",visitorVideoChatStop="visitorVideoChatStop",serverVideoChatNoAnswer="systemVideoChatNoAnswer",serverVideoChatEnd="systemVideoChatEnd",cobrowseRequest="cobrowseRequest",cobrowseAccept="cobrowseAccept",cobrowseStart="cobrowseStart",cobrowseRefuse="cobrowseRefuse",cobrowseNoAnswer="cobrowseNoAnswer",cobrowseEnd="cobrowseEnd",cobrowseNotSupport="cobrowseNotSupport",cobrowseBrowserNotSupport="cobrowseBrowserNotSupport",cobrowseCancel="cobrowseCancel",cobrowseHttpNotSupport="cobrowseHttpNotSupport",agentAudioChatRequest="agentAudioChatRequest",agentAudioChatCancelRequest="agentAudioChatCancelRequest",agentAudioChatAccept="agentAudioChatAccept",agentAudioChatRefuse="agentAudioChatRefuse",agentAudioChatStop="agentAudioChatStop",visitorAudioChatRequest="visitorAudioChatRequest",visitorAudioChatCancelRequest="visitorAudioChatCancelRequest",visitorAudioChatAccept="visitorAudioChatAccept",visitorAudioChatRefuse="visitorAudioChatRefuse",visitorAudioChatStop="visitorAudioChatStop",serverAudioChatNoAnswer="systemAudioChatNoAnswer",serverAudioChatEnd="systemAudioChatEnd",systemIfSupportWebrtc="systemIfSupportWebrtc",chatbotReturnQuestionGuid="chatbotRequestQuestionGuid",chatbotConfidenceAnswer="chatbotHighConfidenceAnswer",chatbotPossibleAnswer="chatbotPossibleAnswer",chatbotBadAnswer="chatbotBadAnswer",chatbotJoinChat="chatbotJoinChat",chatbotGreeting="chatbotSendGreetingMessage",chatbotBotSignIn="botSignIn",chatbotBotForm="botForm",chatbotBotConfirmForm="botConfirmForm",visitorCancelBotForm="visitorCancelBotForm",visitorSubmitBotForm="visitorSubmitBotForm",visitorConfirmBotForm="visitorConfirmBotForm",botPrompt="botPrompt",botRequestLocation="botRequestLocation",agentAttachTicketFail="agentAttachTicketFail",agentPromoteToUser="agentPromoteToUser",agentPromoteToContact="agentPromoteToContact",chatbotSetAnswerIfHelpful="chatbotSetAnswerIfHelpful",visitorRequestChatExceedChatQueueLimit="visitorRequestChatExceedChatQueueLimit",visitorText="visitorText",visitorImage="visitorImage",visitorFile="visitorFile",systemPrompt="systemPrompt",startChatAgain="startChatAgain",downloadTranscript="downloadTranscript",postChatSubmitSuccess="postChatSuccess",creditCardMasked="creditCardMasked",autoInvitationMessage="autoInvMsg",pendingVisitorIsTyping="pendingVisitorIsTyping",pendingVideoRequesting="pendingVideoRequesting",pendingAudioRequesting="pendingAudioRequesting",pendingAccept="pendingAccept",pendingHangup="pendingHangup",pendingSubmitSecureForm="pendingSubmitSecureForm",pendingCancelSecureForm="pendingCancelSecureForm",pendingGetSecureFormFailure="pendingGetSecureFormFailure",pendingCobrowseAccept="pendingCobrowseAccept",pendingCobrowseStart="pendingCobrowseStart",pendingCobrowseRefuse="pendingCobrowseRefuse",pendingCobrowseNotSupport="pendingCobrowseNotSupport",pendingCobrowseBrowserNotSupport="pendingCobrowseBrowserNotSupport",pendingCobrowseEnd="pendingCobrowseEnd",pendingCobrowseHttpNotSupport="pendingCobrowseHttpNotSupport",logDisabled_=!0,deprecationWarnings_=!0,utils={ disableLog:function(e){return"boolean"!=typeof e?new Error("Argument type: "+(void 0===e?"undefined":_typeof(e))+". Please use a boolean."):(logDisabled_=e,e?"adapter.js logging disabled":"adapter.js logging enabled")},disableWarnings:function(e){return"boolean"!=typeof e?new Error("Argument type: "+(void 0===e?"undefined":_typeof(e))+". Please use a boolean."):(deprecationWarnings_=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))},log:function(){"undefined"==typeof window||_typeof(window)},deprecated:function(e,t){},extractVersion:function(e,t,n){var i=e.match(t);return i&&i.length>=n&&parseInt(i[n],10)},detectBrowser:function(e){var t=e&&e.navigator,n={};if(n.browser=null,n.version=null,void 0===e||!e.navigator)return n.browser="Not a browser.",n;if(t.mozGetUserMedia)n.browser="firefox",n.version=this.extractVersion(t.userAgent,/Firefox\/(\d+)\./,1);else if(t.webkitGetUserMedia)if(e.webkitRTCPeerConnection)n.browser="chrome",n.version=this.extractVersion(t.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!t.userAgent.match(/Version\/(\d+).(\d+)/))return n.browser="Unsupported webkit-based browser with GUM support but no WebRTC support.",n;n.browser="safari",n.version=this.extractVersion(t.userAgent,/AppleWebKit\/(\d+)\./,1)}else if(t.mediaDevices&&t.userAgent.match(/Edge\/(\d+).(\d+)$/))n.browser="edge",n.version=this.extractVersion(t.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!t.mediaDevices||!t.userAgent.match(/AppleWebKit\/(\d+)\./))return n.browser="Not a supported browser.",n;n.browser="safari",n.version=this.extractVersion(t.userAgent,/AppleWebKit\/(\d+)\./,1)}return n}},utils_1={log:utils.log,deprecated:utils.deprecated,disableLog:utils.disableLog,disableWarnings:utils.disableWarnings,extractVersion:utils.extractVersion,shimCreateObjectURL:utils.shimCreateObjectURL,detectBrowser:utils.detectBrowser.bind(utils)},logging$1=utils_1.log,getusermedia=function(e){var t=utils_1.detectBrowser(e),n=e&&e.navigator,i=function(e){if("object"!==(void 0===e?"undefined":_typeof(e))||e.mandatory||e.optional)return e;var t={};return Object.keys(e).forEach(function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var i="object"===_typeof(e[n])?e[n]:{ideal:e[n]};void 0!==i.exact&&"number"==typeof i.exact&&(i.min=i.max=i.exact);var o=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==i.ideal){t.optional=t.optional||[];var a={};"number"==typeof i.ideal?(a[o("min",n)]=i.ideal,t.optional.push(a),a={},a[o("max",n)]=i.ideal,t.optional.push(a)):(a[o("",n)]=i.ideal,t.optional.push(a))}void 0!==i.exact&&"number"!=typeof i.exact?(t.mandatory=t.mandatory||{},t.mandatory[o("",n)]=i.exact):["min","max"].forEach(function(e){void 0!==i[e]&&(t.mandatory=t.mandatory||{},t.mandatory[o(e,n)]=i[e])})}}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},o=function(e,o){if(t.version>=61)return o(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"===_typeof(e.audio)){var a=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};e=JSON.parse(JSON.stringify(e)),a(e.audio,"autoGainControl","googAutoGainControl"),a(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=i(e.audio)}if(e&&"object"===_typeof(e.video)){var r=e.video.facingMode;r=r&&("object"===(void 0===r?"undefined":_typeof(r))?r:{ideal:r});var s=t.version<66;if(r&&("user"===r.exact||"environment"===r.exact||"user"===r.ideal||"environment"===r.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||s)){delete e.video.facingMode;var d;if("environment"===r.exact||"environment"===r.ideal?d=["back","rear"]:"user"!==r.exact&&"user"!==r.ideal||(d=["front"]),d)return n.mediaDevices.enumerateDevices().then(function(t){t=t.filter(function(e){return"videoinput"===e.kind});var n=t.find(function(e){return d.some(function(t){return-1!==e.label.toLowerCase().indexOf(t)})});return!n&&t.length&&-1!==d.indexOf("back")&&(n=t[t.length-1]),n&&(e.video.deviceId=r.exact?{exact:n.deviceId}:{ideal:n.deviceId}),e.video=i(e.video),logging$1("chrome: "+JSON.stringify(e)),o(e)})}e.video=i(e.video)}return logging$1("chrome: "+JSON.stringify(e)),o(e)},a=function(e){return{name:{PermissionDeniedError:"NotAllowedError",InvalidStateError:"NotReadableError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotReadableError",MediaDeviceKillSwitchOn:"NotReadableError"}[e.name]||e.name,message:e.message,constraint:e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},r=function(e,t,i){o(e,function(e){n.webkitGetUserMedia(e,t,function(e){i&&i(a(e))})})};n.getUserMedia=r;var s=function(e){return new Promise(function(t,i){n.getUserMedia(e,t,i)})};if(n.mediaDevices||(n.mediaDevices={getUserMedia:s,enumerateDevices:function(){return new Promise(function(t){var n={audio:"audioinput",video:"videoinput"};return e.MediaStreamTrack.getSources(function(e){t(e.map(function(e){return{label:e.label,kind:n[e.kind],deviceId:e.id,groupId:""}}))})})},getSupportedConstraints:function(){return{deviceId:!0,echoCancellation:!0,facingMode:!0,frameRate:!0,height:!0,width:!0}}}),n.mediaDevices.getUserMedia){var d=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(e){return o(e,function(e){return d(e).then(function(t){if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length)throw t.getTracks().forEach(function(e){e.stop()}),new DOMException("","NotFoundError");return t},function(e){return Promise.reject(a(e))})})}}else n.mediaDevices.getUserMedia=function(e){return s(e)};void 0===n.mediaDevices.addEventListener&&(n.mediaDevices.addEventListener=function(){logging$1("Dummy mediaDevices.addEventListener called.")}),void 0===n.mediaDevices.removeEventListener&&(n.mediaDevices.removeEventListener=function(){logging$1("Dummy mediaDevices.removeEventListener called.")})},logging=utils_1.log,chromeShim={shimMediaStream:function(e){e.MediaStream=e.MediaStream||e.webkitMediaStream},shimOnTrack:function(e){if("object"===(void 0===e?"undefined":_typeof(e))&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var n=this;return n._ontrackpoly||(n._ontrackpoly=function(t){t.stream.addEventListener("addtrack",function(i){var o;o=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find(function(e){return e.track&&e.track.id===i.track.id}):{track:i.track};var a=new Event("track");a.track=i.track,a.receiver=o,a.transceiver={receiver:o},a.streams=[t.stream],n.dispatchEvent(a)}),t.stream.getTracks().forEach(function(i){var o;o=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find(function(e){return e.track&&e.track.id===i.id}):{track:i};var a=new Event("track");a.track=i,a.receiver=o,a.transceiver={receiver:o},a.streams=[t.stream],n.dispatchEvent(a)})},n.addEventListener("addstream",n._ontrackpoly)),t.apply(n,arguments)}}},shimGetSendersWithDtmf:function(e){if("object"===(void 0===e?"undefined":_typeof(e))&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){var t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,i){var o=this,a=n.apply(o,arguments);return a||(a=t(o,e),o._senders.push(a)),a};var i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){var t=this;i.apply(t,arguments);var n=t._senders.indexOf(e);-1!==n&&t._senders.splice(n,1)}}var o=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;n._senders=n._senders||[],o.apply(n,[e]),e.getTracks().forEach(function(e){n._senders.push(t(n,e))})};var a=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;t._senders=t._senders||[],a.apply(t,[e]),e.getTracks().forEach(function(e){var n=t._senders.find(function(t){return t.track===e});n&&t._senders.splice(t._senders.indexOf(n),1)})}}else if("object"===(void 0===e?"undefined":_typeof(e))&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){var r=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){var e=this,t=r.apply(e,[]);return t.forEach(function(t){t._pc=e}),t},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}},shimSourceObject:function(e){var t=e&&e.URL;"object"===(void 0===e?"undefined":_typeof(e))&&(!e.HTMLMediaElement||"srcObject"in e.HTMLMediaElement.prototype||Object.defineProperty(e.HTMLMediaElement.prototype,"srcObject",{get:function(){return this._srcObject},set:function(e){var n=this;if(this._srcObject=e,this.src&&t.revokeObjectURL(this.src),!e)return void(this.src="");this.src=t.createObjectURL(e),e.addEventListener("addtrack",function(){n.src&&t.revokeObjectURL(n.src),n.src=t.createObjectURL(e)}),e.addEventListener("removetrack",function(){n.src&&t.revokeObjectURL(n.src),n.src=t.createObjectURL(e)})}}))},shimAddTrackRemoveTrack:function(e){function t(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(function(t){var i=e._reverseStreams[t],o=e._streams[i.id];n=n.replace(new RegExp(o.id,"g"),i.id)}),new RTCSessionDescription({type:t.type,sdp:n})}function n(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach(function(t){var i=e._reverseStreams[t],o=e._streams[i.id];n=n.replace(new RegExp(i.id,"g"),o.id)}),new RTCSessionDescription({type:t.type,sdp:n})}var i=utils_1.detectBrowser(e);if(!(e.RTCPeerConnection.prototype.addTrack&&i.version>=64)){var o=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this,t=o.apply(this);return e._reverseStreams=e._reverseStreams||{},t.map(function(t){return e._reverseStreams[t.id]})};var a=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){var n=this;if(n._streams=n._streams||{},n._reverseStreams=n._reverseStreams||{},t.getTracks().forEach(function(e){if(n.getSenders().find(function(t){return t.track===e}))throw new DOMException("Track already exists.","InvalidAccessError")}),!n._reverseStreams[t.id]){var i=new e.MediaStream(t.getTracks());n._streams[t.id]=i,n._reverseStreams[i.id]=t,t=i}a.apply(n,[t])};var r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;t._streams=t._streams||{},t._reverseStreams=t._reverseStreams||{},r.apply(t,[t._streams[e.id]||e]),delete t._reverseStreams[t._streams[e.id]?t._streams[e.id].id:e.id],delete t._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){var i=this;if("closed"===i.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var o=[].slice.call(arguments,1);if(1!==o.length||!o[0].getTracks().find(function(e){return e===t}))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(i.getSenders().find(function(e){return e.track===t}))throw new DOMException("Track already exists.","InvalidAccessError");i._streams=i._streams||{},i._reverseStreams=i._reverseStreams||{};var a=i._streams[n.id];if(a)a.addTrack(t),Promise.resolve().then(function(){i.dispatchEvent(new Event("negotiationneeded"))});else{var r=new e.MediaStream([t]);i._streams[n.id]=r,i._reverseStreams[r.id]=n,i.addStream(r)}return i.getSenders().find(function(e){return e.track===t})},["createOffer","createAnswer"].forEach(function(n){var i=e.RTCPeerConnection.prototype[n];e.RTCPeerConnection.prototype[n]=function(){var e=this,n=arguments;return arguments.length&&"function"==typeof arguments[0]?i.apply(e,[function(i){var o=t(e,i);n[0].apply(null,[o])},function(e){n[1]&&n[1].apply(null,e)},arguments[2]]):i.apply(e,arguments).then(function(n){return t(e,n)})}});var s=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){var e=this;return arguments.length&&arguments[0].type?(arguments[0]=n(e,arguments[0]),s.apply(e,arguments)):s.apply(e,arguments)};var d=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get:function(){var e=this,n=d.get.apply(this);return""===n.type?n:t(e,n)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){var t=this;if("closed"===t.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(e._pc!==t)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");t._streams=t._streams||{};var n;Object.keys(t._streams).forEach(function(i){t._streams[i].getTracks().find(function(t){return e.track===t})&&(n=t._streams[i])}),n&&(1===n.getTracks().length?t.removeStream(t._reverseStreams[n.id]):n.removeTrack(e.track),t.dispatchEvent(new Event("negotiationneeded")))}}},shimPeerConnection:function(e){var t=utils_1.detectBrowser(e);if(e.RTCPeerConnection){var n=e.RTCPeerConnection;e.RTCPeerConnection=function(e,t){if(e&&e.iceServers){for(var i=[],o=0;o0&&"function"==typeof e)return i.apply(this,arguments);if(0===i.length&&(0===arguments.length||"function"!=typeof arguments[0]))return i.apply(this,[]);var r=function(e){var t={};return e.result().forEach(function(e){var n={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach(function(t){n[t]=e.stat(t)}),t[n.id]=n}),t},s=function(e){return new Map(Object.keys(e).map(function(t){return[t,e[t]]}))};if(arguments.length>=2){var d=function(e){a[1](s(r(e)))};return i.apply(this,[d,arguments[0]])}return new Promise(function(e,t){i.apply(o,[function(t){e(s(r(t)))},t])}).then(t,n)},t.version<51&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){var n=e.RTCPeerConnection.prototype[t];e.RTCPeerConnection.prototype[t]=function(){var e=arguments,t=this,i=new Promise(function(i,o){n.apply(t,[e[0],i,o])});return e.length<2?i:i.then(function(){e[1].apply(null,[])},function(t){e.length>=3&&e[2].apply(null,[t])})}}),t.version<52&&["createOffer","createAnswer"].forEach(function(t){var n=e.RTCPeerConnection.prototype[t];e.RTCPeerConnection.prototype[t]=function(){var e=this;if(arguments.length<1||1===arguments.length&&"object"===_typeof(arguments[0])){var t=1===arguments.length?arguments[0]:void 0;return new Promise(function(i,o){n.apply(e,[i,o,t])})}return n.apply(this,arguments)}}),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){var n=e.RTCPeerConnection.prototype[t];e.RTCPeerConnection.prototype[t]=function(){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}});var o=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?o.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}},chrome_shim={shimMediaStream:chromeShim.shimMediaStream,shimOnTrack:chromeShim.shimOnTrack,shimAddTrackRemoveTrack:chromeShim.shimAddTrackRemoveTrack,shimGetSendersWithDtmf:chromeShim.shimGetSendersWithDtmf,shimSourceObject:chromeShim.shimSourceObject,shimPeerConnection:chromeShim.shimPeerConnection,shimGetUserMedia:getusermedia},sdp=createCommonjsModule(function(e){var t={};t.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)},t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map(function(e){return e.trim()})},t.splitSections=function(e){return e.split("\nm=").map(function(e,t){return(t>0?"m="+e:e).trim()+"\r\n"})},t.matchPrefix=function(e,n){return t.splitLines(e).filter(function(e){return 0===e.indexOf(n)})},t.parseCandidate=function(e){var t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");for(var n={foundation:t[0],component:parseInt(t[1],10),protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],port:parseInt(t[5],10),type:t[7]},i=8;i0?t[0].split("/")[1]:"sendrecv",uri:t[1]}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},t.parseFmtp=function(e){for(var t,n={},i=e.substr(e.indexOf(" ")+1).split(";"),o=0;o-1?(n.attribute=e.substr(t+1,i-t-1),n.value=e.substr(i+1)):n.attribute=e.substr(t+1),n},t.getMid=function(e){var n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substr(6)},t.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1]}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){var n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(function(e){n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},t.getIceParameters=function(e,n){var i=t.splitLines(e);return i=i.concat(t.splitLines(n)),{usernameFragment:i.filter(function(e){return 0===e.indexOf("a=ice-ufrag:")})[0].substr(12),password:i.filter(function(e){return 0===e.indexOf("a=ice-pwd:")})[0].substr(10)}},t.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},t.parseRtpParameters=function(e){for(var n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},i=t.splitLines(e),o=i[0].split(" "),a=3;a0?"9":"0",i+=" UDP/TLS/RTP/SAVPF ",i+=n.codecs.map(function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType}).join(" ")+"\r\n",i+="c=IN IP4 0.0.0.0\r\n",i+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach(function(e){i+=t.writeRtpMap(e),i+=t.writeFmtp(e),i+=t.writeRtcpFb(e)});var o=0;return n.codecs.forEach(function(e){e.maxptime>o&&(o=e.maxptime)}),o>0&&(i+="a=maxptime:"+o+"\r\n"),i+="a=rtcp-mux\r\n",n.headerExtensions.forEach(function(e){i+=t.writeExtmap(e)}),i},t.parseRtpEncodingParameters=function(e){var n,i=[],o=t.parseRtpParameters(e),a=-1!==o.fecMechanisms.indexOf("RED"),r=-1!==o.fecMechanisms.indexOf("ULPFEC"),s=t.matchPrefix(e,"a=ssrc:").map(function(e){return t.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute}),d=s.length>0&&s[0].ssrc,c=t.matchPrefix(e,"a=ssrc-group:FID").map(function(e){var t=e.split(" ");return t.shift(),t.map(function(e){return parseInt(e,10)})});c.length>0&&c[0].length>1&&c[0][0]===d&&(n=c[0][1]),o.codecs.forEach(function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var t={ssrc:d,codecPayloadType:parseInt(e.parameters.apt,10),rtx:{ssrc:n}};i.push(t),a&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:n,mechanism:r?"red+ulpfec":"red"},i.push(t))}}),0===i.length&&d&&i.push({ssrc:d});var l=t.matchPrefix(e,"b=");return l.length&&(l=0===l[0].indexOf("b=TIAS:")?parseInt(l[0].substr(7),10):0===l[0].indexOf("b=AS:")?950*parseInt(l[0].substr(5),10)-16e3:void 0,i.forEach(function(e){e.maxBitrate=l})),i},t.parseRtcpParameters=function(e){var n={},i=t.matchPrefix(e,"a=ssrc:").map(function(e){return t.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];i&&(n.cname=i.value,n.ssrc=i.ssrc);var o=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=o.length>0,n.compound=0===o.length;var a=t.matchPrefix(e,"a=rtcp-mux");return n.mux=a.length>0,n},t.parseMsid=function(e){var n,i=t.matchPrefix(e,"a=msid:");if(1===i.length)return n=i[0].substr(7).split(" "),{stream:n[0],track:n[1]};var o=t.matchPrefix(e,"a=ssrc:").map(function(e){return t.parseSsrcMedia(e)}).filter(function(e){return"msid"===e.attribute});return o.length>0?(n=o[0].value.split(" "),{stream:n[0],track:n[1]}):void 0},t.generateSessionId=function(){return Math.random().toString().substr(2,21)},t.writeSessionBoilerplate=function(e,n){var i=void 0!==n?n:2;return"v=0\r\no=thisisadapterortc "+(e||t.generateSessionId())+" "+i+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.writeMediaSection=function(e,n,i,o){var a=t.writeRtpDescription(e.kind,n);if(a+=t.writeIceParameters(e.iceGatherer.getLocalParameters()),a+=t.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===i?"actpass":"active"),a+="a=mid:"+e.mid+"\r\n",e.direction?a+="a="+e.direction+"\r\n":e.rtpSender&&e.rtpReceiver?a+="a=sendrecv\r\n":e.rtpSender?a+="a=sendonly\r\n":e.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n",e.rtpSender){var r="msid:"+o.id+" "+e.rtpSender.track.id+"\r\n";a+="a="+r,a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+r,e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+r,a+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+t.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+t.localCName+"\r\n"),a},t.getDirection=function(e,n){for(var i=t.splitLines(e),o=0;o0;r--)this._iceGatherers=new e.RTCIceGatherer({iceServers:n.iceServers,gatherPolicy:n.iceTransportPolicy});else n.iceCandidatePoolSize=0;this._config=n,this.transceivers=[],this._sdpSessionId=sdp.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0};return n.prototype._emitGatheringStateChange=function(){var e=new Event("icegatheringstatechange");this.dispatchEvent(e),"function"==typeof this.onicegatheringstatechange&&this.onicegatheringstatechange(e)},n.prototype.getConfiguration=function(){return this._config},n.prototype.getLocalStreams=function(){return this.localStreams},n.prototype.getRemoteStreams=function(){return this.remoteStreams},n.prototype._createTransceiver=function(e){var t=this.transceivers.length>0,n={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:e,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&t)n.iceTransport=this.transceivers[0].iceTransport,n.dtlsTransport=this.transceivers[0].dtlsTransport;else{var i=this._createIceAndDtlsTransports();n.iceTransport=i.iceTransport,n.dtlsTransport=i.dtlsTransport}return this.transceivers.push(n),n},n.prototype.addTrack=function(t,n){for(var i,o=0;o=15025)e.getTracks().forEach(function(t){n.addTrack(t,e)});else{var i=e.clone();e.getTracks().forEach(function(e,t){var n=i.getTracks()[t];e.addEventListener("enabled",function(e){n.enabled=e.enabled})}),i.getTracks().forEach(function(e){n.addTrack(e,i)})}},n.prototype.removeTrack=function(t){if(!(t instanceof e.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var n=this.transceivers.find(function(e){return e.rtpSender===t});if(!n){var i=new Error("Sender was not created by this connection.");throw i.name="InvalidAccessError",i}var o=n.stream;n.rtpSender.stop(),n.rtpSender=null,n.track=null,n.stream=null,-1===this.transceivers.map(function(e){return e.stream}).indexOf(o)&&this.localStreams.indexOf(o)>-1&&this.localStreams.splice(this.localStreams.indexOf(o),1),this._maybeFireNegotiationNeeded()},n.prototype.removeStream=function(e){var t=this;e.getTracks().forEach(function(e){var n=t.getSenders().find(function(t){return t.track===e});n&&t.removeTrack(n)})},n.prototype.getSenders=function(){return this.transceivers.filter(function(e){return!!e.rtpSender}).map(function(e){return e.rtpSender})},n.prototype.getReceivers=function(){return this.transceivers.filter(function(e){return!!e.rtpReceiver}).map(function(e){return e.rtpReceiver})},n.prototype._createIceGatherer=function(t,n){var i=this;if(n&&t>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var o=new e.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(o,"state",{value:"new",writable:!0}),this.transceivers[t].candidates=[],this.transceivers[t].bufferCandidates=function(e){var n=!e.candidate||0===Object.keys(e.candidate).length;o.state=n?"completed":"gathering",null!==i.transceivers[t].candidates&&i.transceivers[t].candidates.push(e.candidate)},o.addEventListener("localcandidate",this.transceivers[t].bufferCandidates),o},n.prototype._gather=function(t,n){var i=this,o=this.transceivers[n].iceGatherer;if(!o.onlocalcandidate){var a=this.transceivers[n].candidates;this.transceivers[n].candidates=null,o.removeEventListener("localcandidate",this.transceivers[n].bufferCandidates),o.onlocalcandidate=function(e){if(!(i.usingBundle&&n>0)){var a=new Event("icecandidate");a.candidate={sdpMid:t,sdpMLineIndex:n};var r=e.candidate,s=!r||0===Object.keys(r).length;s?"new"!==o.state&&"gathering"!==o.state||(o.state="completed"):("new"===o.state&&(o.state="gathering"),r.component=1,a.candidate.candidate=sdp.writeCandidate(r));var d=sdp.splitSections(i.localDescription.sdp);d[a.candidate.sdpMLineIndex+1]+=s?"a=end-of-candidates\r\n":"a="+a.candidate.candidate+"\r\n", i.localDescription.sdp=d.join("");var c=i.transceivers.every(function(e){return e.iceGatherer&&"completed"===e.iceGatherer.state});"gathering"!==i.iceGatheringState&&(i.iceGatheringState="gathering",i._emitGatheringStateChange()),s||(i.dispatchEvent(a),"function"==typeof i.onicecandidate&&i.onicecandidate(a)),c&&(i.dispatchEvent(new Event("icecandidate")),"function"==typeof i.onicecandidate&&i.onicecandidate(new Event("icecandidate")),i.iceGatheringState="complete",i._emitGatheringStateChange())}},e.setTimeout(function(){a.forEach(function(e){var t=new Event("RTCIceGatherEvent");t.candidate=e,o.onlocalcandidate(t)})},0)}},n.prototype._createIceAndDtlsTransports=function(){var t=this,n=new e.RTCIceTransport(null);n.onicestatechange=function(){t._updateConnectionState()};var i=new e.RTCDtlsTransport(n);return i.ondtlsstatechange=function(){t._updateConnectionState()},i.onerror=function(){Object.defineProperty(i,"state",{value:"failed",writable:!0}),t._updateConnectionState()},{iceTransport:n,dtlsTransport:i}},n.prototype._disposeIceAndDtlsTransports=function(e){var t=this.transceivers[e].iceGatherer;t&&(delete t.onlocalcandidate,delete this.transceivers[e].iceGatherer);var n=this.transceivers[e].iceTransport;n&&(delete n.onicestatechange,delete this.transceivers[e].iceTransport);var i=this.transceivers[e].dtlsTransport;i&&(delete i.ondtlsstatechange,delete i.onerror,delete this.transceivers[e].dtlsTransport)},n.prototype._transceive=function(e,n,i){var o=getCommonCapabilities(e.localCapabilities,e.remoteCapabilities);n&&e.rtpSender&&(o.encodings=e.sendEncodingParameters,o.rtcp={cname:sdp.localCName,compound:e.rtcpParameters.compound},e.recvEncodingParameters.length&&(o.rtcp.ssrc=e.recvEncodingParameters[0].ssrc),e.rtpSender.send(o)),i&&e.rtpReceiver&&o.codecs.length>0&&("video"===e.kind&&e.recvEncodingParameters&&t<15019&&e.recvEncodingParameters.forEach(function(e){delete e.rtx}),o.encodings=e.recvEncodingParameters,o.rtcp={cname:e.rtcpParameters.cname,compound:e.rtcpParameters.compound},e.sendEncodingParameters.length&&(o.rtcp.ssrc=e.sendEncodingParameters[0].ssrc),e.rtpReceiver.receive(o))},n.prototype.setLocalDescription=function(e){var t=this,n=arguments;if(!isActionAllowedInSignalingState("setLocalDescription",e.type,this.signalingState))return new Promise(function(i,o){var a=new Error("Can not set local "+e.type+" in state "+t.signalingState);a.name="InvalidStateError",n.length>2&&"function"==typeof n[2]&&n[2].apply(null,[a]),o(a)});var i,o;if("offer"===e.type)i=sdp.splitSections(e.sdp),o=i.shift(),i.forEach(function(e,n){var i=sdp.parseRtpParameters(e);t.transceivers[n].localCapabilities=i}),this.transceivers.forEach(function(e,n){t._gather(e.mid,n)});else if("answer"===e.type){i=sdp.splitSections(t.remoteDescription.sdp),o=i.shift();var a=sdp.matchPrefix(o,"a=ice-lite").length>0;i.forEach(function(e,n){var i=t.transceivers[n],r=i.iceGatherer,s=i.iceTransport,d=i.dtlsTransport,c=i.localCapabilities,l=i.remoteCapabilities;if(!(sdp.isRejected(e)&&1===!sdp.matchPrefix(e,"a=bundle-only").length||i.isDatachannel)){var u=sdp.getIceParameters(e,o),p=sdp.getDtlsParameters(e,o);a&&(p.role="server"),t.usingBundle&&0!==n||(t._gather(i.mid,n),"new"===s.state&&s.start(r,u,a?"controlling":"controlled"),"new"===d.state&&d.start(p));var h=getCommonCapabilities(c,l);t._transceive(i,h.codecs.length>0,!1)}})}switch(this.localDescription={type:e.type,sdp:e.sdp},e.type){case"offer":this._updateSignalingState("have-local-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+e.type+'"')}var r=arguments.length>1&&"function"==typeof arguments[1]&&arguments[1];return new Promise(function(e){r&&r.apply(null),e()})},n.prototype.setRemoteDescription=function(n){var i=this,o=arguments;if(!isActionAllowedInSignalingState("setRemoteDescription",n.type,this.signalingState))return new Promise(function(e,t){var a=new Error("Can not set remote "+n.type+" in state "+i.signalingState);a.name="InvalidStateError",o.length>2&&"function"==typeof o[2]&&o[2].apply(null,[a]),t(a)});var a={};this.remoteStreams.forEach(function(e){a[e.id]=e});var r=[],s=sdp.splitSections(n.sdp),d=s.shift(),c=sdp.matchPrefix(d,"a=ice-lite").length>0,l=sdp.matchPrefix(d,"a=group:BUNDLE ").length>0;this.usingBundle=l;var u=sdp.matchPrefix(d,"a=ice-options:")[0];switch(this.canTrickleIceCandidates=!!u&&u.substr(14).split(" ").indexOf("trickle")>=0,s.forEach(function(o,s){var u=sdp.splitLines(o),p=sdp.getKind(o),h=sdp.isRejected(o)&&1===!sdp.matchPrefix(o,"a=bundle-only").length,f=u[0].substr(2).split(" ")[2],g=sdp.getDirection(o,d),m=sdp.parseMsid(o),b=sdp.getMid(o)||sdp.generateIdentifier();if("application"===p&&"DTLS/SCTP"===f)return void(i.transceivers[s]={mid:b,isDatachannel:!0});var w,v,y,C,_,x,S,k,A,M,T,I=sdp.parseRtpParameters(o);h||(M=sdp.getIceParameters(o,d),T=sdp.getDtlsParameters(o,d),T.role="client"),S=sdp.parseRtpEncodingParameters(o);var P=sdp.parseRtcpParameters(o),W=sdp.matchPrefix(o,"a=end-of-candidates",d).length>0,D=sdp.matchPrefix(o,"a=candidate:").map(function(e){return sdp.parseCandidate(e)}).filter(function(e){return 1===e.component});if(("offer"===n.type||"answer"===n.type)&&!h&&l&&s>0&&i.transceivers[s]&&(i._disposeIceAndDtlsTransports(s),i.transceivers[s].iceGatherer=i.transceivers[0].iceGatherer,i.transceivers[s].iceTransport=i.transceivers[0].iceTransport,i.transceivers[s].dtlsTransport=i.transceivers[0].dtlsTransport,i.transceivers[s].rtpSender&&i.transceivers[s].rtpSender.setTransport(i.transceivers[0].dtlsTransport),i.transceivers[s].rtpReceiver&&i.transceivers[s].rtpReceiver.setTransport(i.transceivers[0].dtlsTransport)),"offer"!==n.type||h)"answer"!==n.type||h||(w=i.transceivers[s],v=w.iceGatherer,y=w.iceTransport,C=w.dtlsTransport,_=w.rtpReceiver,x=w.sendEncodingParameters,k=w.localCapabilities,i.transceivers[s].recvEncodingParameters=S,i.transceivers[s].remoteCapabilities=I,i.transceivers[s].rtcpParameters=P,D.length&&"new"===y.state&&(!c&&!W||l&&0!==s?D.forEach(function(e){maybeAddCandidate(w.iceTransport,e)}):y.setRemoteCandidates(D)),l&&0!==s||("new"===y.state&&y.start(v,M,"controlling"),"new"===C.state&&C.start(T)),i._transceive(w,"sendrecv"===g||"recvonly"===g,"sendrecv"===g||"sendonly"===g),!_||"sendrecv"!==g&&"sendonly"!==g?delete w.rtpReceiver:(A=_.track,m?(a[m.stream]||(a[m.stream]=new e.MediaStream),addTrackToStreamAndFireEvent(A,a[m.stream]),r.push([A,_,a[m.stream]])):(a.default||(a.default=new e.MediaStream),addTrackToStreamAndFireEvent(A,a.default),r.push([A,_,a.default]))));else{w=i.transceivers[s]||i._createTransceiver(p),w.mid=b,w.iceGatherer||(w.iceGatherer=i._createIceGatherer(s,l)),D.length&&"new"===w.iceTransport.state&&(!W||l&&0!==s?D.forEach(function(e){maybeAddCandidate(w.iceTransport,e)}):w.iceTransport.setRemoteCandidates(D)),k=e.RTCRtpReceiver.getCapabilities(p),t<15019&&(k.codecs=k.codecs.filter(function(e){return"rtx"!==e.name})),x=w.sendEncodingParameters||[{ssrc:1001*(2*s+2)}];var R=!1;if("sendrecv"===g||"sendonly"===g){if(R=!w.rtpReceiver,_=w.rtpReceiver||new e.RTCRtpReceiver(w.dtlsTransport,p),R){var $;A=_.track,m?(a[m.stream]||(a[m.stream]=new e.MediaStream,Object.defineProperty(a[m.stream],"id",{get:function(){return m.stream}})),Object.defineProperty(A,"id",{get:function(){return m.track}}),$=a[m.stream]):(a.default||(a.default=new e.MediaStream),$=a.default),addTrackToStreamAndFireEvent(A,$),r.push([A,_,$]),w.associatedRemoteMediaStreams.push($)}}else w.rtpReceiver&&w.rtpReceiver.track&&(w.associatedRemoteMediaStreams.forEach(function(e){var t=e.getTracks().find(function(e){return e.id===w.rtpReceiver.track.id});t&&removeTrackFromStreamAndFireEvent(t,e)}),w.associatedRemoteMediaStreams=[]);w.localCapabilities=k,w.remoteCapabilities=I,w.rtpReceiver=_,w.rtcpParameters=P,w.sendEncodingParameters=x,w.recvEncodingParameters=S,i._transceive(i.transceivers[s],!1,R)}}),void 0===this._dtlsRole&&(this._dtlsRole="offer"===n.type?"active":"passive"),this.remoteDescription={type:n.type,sdp:n.sdp},n.type){case"offer":this._updateSignalingState("have-remote-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+n.type+'"')}return Object.keys(a).forEach(function(t){var n=a[t];if(n.getTracks().length){if(-1===i.remoteStreams.indexOf(n)){i.remoteStreams.push(n);var o=new Event("addstream");o.stream=n,e.setTimeout(function(){i.dispatchEvent(o),"function"==typeof i.onaddstream&&i.onaddstream(o)})}r.forEach(function(t){var o=t[0],a=t[1];if(n.id===t[2].id){var r=new Event("track");r.track=o,r.receiver=a,r.transceiver={receiver:a},r.streams=[n],e.setTimeout(function(){i.dispatchEvent(r),"function"==typeof i.ontrack&&i.ontrack(r)})}})}}),e.setTimeout(function(){i&&i.transceivers&&i.transceivers.forEach(function(e){e.iceTransport&&"new"===e.iceTransport.state&&e.iceTransport.getRemoteCandidates().length>0&&e.iceTransport.addRemoteCandidate({})})},4e3),new Promise(function(e){o.length>1&&"function"==typeof o[1]&&o[1].apply(null),e()})},n.prototype.close=function(){this.transceivers.forEach(function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()}),this._updateSignalingState("closed")},n.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this.dispatchEvent(t),"function"==typeof this.onsignalingstatechange&&this.onsignalingstatechange(t)},n.prototype._maybeFireNegotiationNeeded=function(){var t=this;"stable"===this.signalingState&&!0!==this.needNegotiation&&(this.needNegotiation=!0,e.setTimeout(function(){if(!1!==t.needNegotiation){t.needNegotiation=!1;var e=new Event("negotiationneeded");t.dispatchEvent(e),"function"==typeof t.onnegotiationneeded&&t.onnegotiationneeded(e)}},0))},n.prototype._updateConnectionState=function(){var e,t={new:0,closed:0,connecting:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(e){t[e.iceTransport.state]++,t[e.dtlsTransport.state]++}),t.connected+=t.completed,e="new",t.failed>0?e="failed":t.connecting>0||t.checking>0?e="connecting":t.disconnected>0?e="disconnected":t.new>0?e="new":(t.connected>0||t.completed>0)&&(e="connected"),e!==this.iceConnectionState){this.iceConnectionState=e;var n=new Event("iceconnectionstatechange");this.dispatchEvent(n),"function"==typeof this.oniceconnectionstatechange&&this.oniceconnectionstatechange(n)}},n.prototype.createOffer=function(){var n,i=this,o=arguments;1===arguments.length&&"function"!=typeof arguments[0]?n=arguments[0]:3===arguments.length&&(n=arguments[2]);var a=this.transceivers.filter(function(e){return"audio"===e.kind}).length,r=this.transceivers.filter(function(e){return"video"===e.kind}).length;if(n){if(n.mandatory||n.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==n.offerToReceiveAudio&&(a=!0===n.offerToReceiveAudio?1:!1===n.offerToReceiveAudio?0:n.offerToReceiveAudio),void 0!==n.offerToReceiveVideo&&(r=!0===n.offerToReceiveVideo?1:!1===n.offerToReceiveVideo?0:n.offerToReceiveVideo)}for(this.transceivers.forEach(function(e){"audio"===e.kind?--a<0&&(e.wantReceive=!1):"video"===e.kind&&--r<0&&(e.wantReceive=!1)});a>0||r>0;)a>0&&(this._createTransceiver("audio"),a--),r>0&&(this._createTransceiver("video"),r--);var s=sdp.writeSessionBoilerplate(this._sdpSessionId,this._sdpSessionVersion++);this.transceivers.forEach(function(n,o){var a=n.track,r=n.kind,s=sdp.generateIdentifier();n.mid=s,n.iceGatherer||(n.iceGatherer=i._createIceGatherer(o,i.usingBundle));var d=e.RTCRtpSender.getCapabilities(r);t<15019&&(d.codecs=d.codecs.filter(function(e){return"rtx"!==e.name})),d.codecs.forEach(function(e){"H264"===e.name&&void 0===e.parameters["level-asymmetry-allowed"]&&(e.parameters["level-asymmetry-allowed"]="1")});var c=n.sendEncodingParameters||[{ssrc:1001*(2*o+1)}];a&&t>=15019&&"video"===r&&!c[0].rtx&&(c[0].rtx={ssrc:c[0].ssrc+1}),n.wantReceive&&(n.rtpReceiver=new e.RTCRtpReceiver(n.dtlsTransport,r)),n.localCapabilities=d,n.sendEncodingParameters=c}),"max-compat"!==this._config.bundlePolicy&&(s+="a=group:BUNDLE "+this.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n"),s+="a=ice-options:trickle\r\n",this.transceivers.forEach(function(e,t){s+=writeMediaSection(e,e.localCapabilities,"offer",e.stream,i._dtlsRole),s+="a=rtcp-rsize\r\n",!e.iceGatherer||"new"===i.iceGatheringState||0!==t&&i.usingBundle||(e.iceGatherer.getLocalCandidates().forEach(function(e){e.component=1,s+="a="+sdp.writeCandidate(e)+"\r\n"}),"completed"===e.iceGatherer.state&&(s+="a=end-of-candidates\r\n"))});var d=new e.RTCSessionDescription({type:"offer",sdp:s});return new Promise(function(e){if(o.length>0&&"function"==typeof o[0])return o[0].apply(null,[d]),void e();e(d)})},n.prototype.createAnswer=function(){var n=this,i=arguments,o=sdp.writeSessionBoilerplate(this._sdpSessionId,this._sdpSessionVersion++);this.usingBundle&&(o+="a=group:BUNDLE "+this.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n");var a=sdp.splitSections(this.remoteDescription.sdp).length-1;this.transceivers.forEach(function(e,i){if(!(i+1>a)){if(e.isDatachannel)return void(o+="m=application 0 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=mid:"+e.mid+"\r\n");if(e.stream){var r;"audio"===e.kind?r=e.stream.getAudioTracks()[0]:"video"===e.kind&&(r=e.stream.getVideoTracks()[0]),r&&t>=15019&&"video"===e.kind&&!e.sendEncodingParameters[0].rtx&&(e.sendEncodingParameters[0].rtx={ssrc:e.sendEncodingParameters[0].ssrc+1})}var s=getCommonCapabilities(e.localCapabilities,e.remoteCapabilities);!s.codecs.filter(function(e){return"rtx"===e.name.toLowerCase()}).length&&e.sendEncodingParameters[0].rtx&&delete e.sendEncodingParameters[0].rtx,o+=writeMediaSection(e,s,"answer",e.stream,n._dtlsRole),e.rtcpParameters&&e.rtcpParameters.reducedSize&&(o+="a=rtcp-rsize\r\n")}});var r=new e.RTCSessionDescription({type:"answer",sdp:o});return new Promise(function(e){if(i.length>0&&"function"==typeof i[0])return i[0].apply(null,[r]),void e();e(r)})},n.prototype.addIceCandidate=function(e){var t,n;if(e&&""!==e.candidate){if(void 0===e.sdpMLineIndex&&!e.sdpMid)throw new TypeError("sdpMLineIndex or sdpMid required");if(this.remoteDescription){var i=e.sdpMLineIndex;if(e.sdpMid)for(var o=0;o0?sdp.parseCandidate(e.candidate):{};if("tcp"===r.protocol&&(0===r.port||9===r.port))return Promise.resolve();if(r.component&&1!==r.component)return Promise.resolve();if((0===i||i>0&&a.iceTransport!==this.transceivers[0].iceTransport)&&(maybeAddCandidate(a.iceTransport,r)||(t=new Error("Can not add ICE candidate"),t.name="OperationError")),!t){var s=e.candidate.trim();0===s.indexOf("a=")&&(s=s.substr(2)),n=sdp.splitSections(this.remoteDescription.sdp),n[i+1]+="a="+(r.type?s:"end-of-candidates")+"\r\n",this.remoteDescription.sdp=n.join("")}}else t=new Error("Can not add ICE candidate"),t.name="OperationError"}else t=new Error("Can not add ICE candidate without a remote description"),t.name="InvalidStateError"}else for(var d=0;d2&&"function"==typeof c[2]&&c[2].apply(null,[t]),n(t)):(c.length>1&&"function"==typeof c[1]&&c[1].apply(null),e())})},n.prototype.getStats=function(){var e=[];this.transceivers.forEach(function(t){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(n){t[n]&&e.push(t[n].getStats())})});var t=arguments.length>1&&"function"==typeof arguments[1]&&arguments[1],n=function(e){return{inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};return new Promise(function(i){var o=new Map;Promise.all(e).then(function(e){e.forEach(function(e){Object.keys(e).forEach(function(t){e[t].type=n(e[t]),o.set(t,e[t])})}),t&&t.apply(null,o),i(o)})})},n},getusermedia$2=function(e){var t=e&&e.navigator,n=function(e){return{name:{PermissionDeniedError:"NotAllowedError"}[e.name]||e.name,message:e.message,constraint:e.constraint,toString:function(){return this.name}}},i=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(e){return i(e).catch(function(e){return Promise.reject(n(e))})}},edge_shim={shimGetUserMedia:getusermedia$2,shimPeerConnection:function(e){var t=utils_1.detectBrowser(e);if(e.RTCIceGatherer&&(e.RTCIceCandidate||(e.RTCIceCandidate=function(e){return e}),e.RTCSessionDescription||(e.RTCSessionDescription=function(e){return e}),t.version<15025)){var n=Object.getOwnPropertyDescriptor(e.MediaStreamTrack.prototype,"enabled");Object.defineProperty(e.MediaStreamTrack.prototype,"enabled",{set:function(e){n.set.call(this,e);var t=new Event("enabled");t.enabled=e,this.dispatchEvent(t)}})}!e.RTCRtpSender||"dtmf"in e.RTCRtpSender.prototype||Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new e.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null)),this._dtmf}}),e.RTCPeerConnection=rtcpeerconnection(e,t.version)},shimReplaceTrack:function(e){!e.RTCRtpSender||"replaceTrack"in e.RTCRtpSender.prototype||(e.RTCRtpSender.prototype.replaceTrack=e.RTCRtpSender.prototype.setTrack)}},logging$2=utils_1.log,getusermedia$4=function(e){var t=utils_1.detectBrowser(e),n=e&&e.navigator,i=e&&e.MediaStreamTrack,o=function(e){return{name:{InternalError:"NotReadableError",NotSupportedError:"TypeError",PermissionDeniedError:"NotAllowedError",SecurityError:"NotAllowedError"}[e.name]||e.name,message:{"The operation is insecure.":"The request is not allowed by the user agent or the platform in the current context."}[e.message]||e.message,constraint:e.constraint,toString:function(){return this.name+(this.message&&": ")+this.message}}},a=function(e,i,a){var r=function(e){if("object"!==(void 0===e?"undefined":_typeof(e))||e.require)return e;var t=[];return Object.keys(e).forEach(function(n){if("require"!==n&&"advanced"!==n&&"mediaSource"!==n){var i=e[n]="object"===_typeof(e[n])?e[n]:{ideal:e[n]};if(void 0===i.min&&void 0===i.max&&void 0===i.exact||t.push(n),void 0!==i.exact&&("number"==typeof i.exact?i.min=i.max=i.exact:e[n]=i.exact,delete i.exact),void 0!==i.ideal){e.advanced=e.advanced||[];var o={};"number"==typeof i.ideal?o[n]={min:i.ideal,max:i.ideal}:o[n]=i.ideal,e.advanced.push(o),delete i.ideal,Object.keys(i).length||delete e[n]}}}),t.length&&(e.require=t),e};return e=JSON.parse(JSON.stringify(e)),t.version<38&&(logging$2("spec: "+JSON.stringify(e)),e.audio&&(e.audio=r(e.audio)),e.video&&(e.video=r(e.video)),logging$2("ff37: "+JSON.stringify(e))),n.mozGetUserMedia(e,i,function(e){a(o(e))})},r=function(e){return new Promise(function(t,n){a(e,t,n)})};if(n.mediaDevices||(n.mediaDevices={getUserMedia:r,addEventListener:function(){},removeEventListener:function(){}}),n.mediaDevices.enumerateDevices=n.mediaDevices.enumerateDevices||function(){return new Promise(function(e){e([{kind:"audioinput",deviceId:"default",label:"",groupId:""},{kind:"videoinput",deviceId:"default",label:"",groupId:""}])})},t.version<41){var s=n.mediaDevices.enumerateDevices.bind(n.mediaDevices);n.mediaDevices.enumerateDevices=function(){return s().then(void 0,function(e){if("NotFoundError"===e.name)return[];throw e})}}if(t.version<49){var d=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(e){return d(e).then(function(t){if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length)throw t.getTracks().forEach(function(e){e.stop()}),new DOMException("The object can not be found here.","NotFoundError");return t},function(e){return Promise.reject(o(e))})}}if(!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var c=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},l=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(e){return"object"===(void 0===e?"undefined":_typeof(e))&&"object"===_typeof(e.audio)&&(e=JSON.parse(JSON.stringify(e)),c(e.audio,"autoGainControl","mozAutoGainControl"),c(e.audio,"noiseSuppression","mozNoiseSuppression")),l(e)},i&&i.prototype.getSettings){var u=i.prototype.getSettings;i.prototype.getSettings=function(){var e=u.apply(this,arguments);return c(e,"mozAutoGainControl","autoGainControl"),c(e,"mozNoiseSuppression","noiseSuppression"),e}}if(i&&i.prototype.applyConstraints){var p=i.prototype.applyConstraints;i.prototype.applyConstraints=function(e){return"audio"===this.kind&&"object"===(void 0===e?"undefined":_typeof(e))&&(e=JSON.parse(JSON.stringify(e)),c(e,"autoGainControl","mozAutoGainControl"),c(e,"noiseSuppression","mozNoiseSuppression")),p.apply(this,[e])}}}n.getUserMedia=function(e,i,o){if(t.version<44)return a(e,i,o);utils_1.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(i,o)}},firefoxShim={shimOnTrack:function(e){"object"!==(void 0===e?"undefined":_typeof(e))||!e.RTCPeerConnection||"ontrack"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=e),this.addEventListener("addstream",this._ontrackpoly=function(e){e.stream.getTracks().forEach(function(t){var n=new Event("track");n.track=t,n.receiver={track:t},n.transceiver={receiver:n.receiver},n.streams=[e.stream],this.dispatchEvent(n)}.bind(this))}.bind(this))}}),"object"===(void 0===e?"undefined":_typeof(e))&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},shimSourceObject:function(e){"object"===(void 0===e?"undefined":_typeof(e))&&(!e.HTMLMediaElement||"srcObject"in e.HTMLMediaElement.prototype||Object.defineProperty(e.HTMLMediaElement.prototype,"srcObject",{get:function(){return this.mozSrcObject},set:function(e){this.mozSrcObject=e}}))},shimPeerConnection:function(e){var t=utils_1.detectBrowser(e);if("object"===(void 0===e?"undefined":_typeof(e))&&(e.RTCPeerConnection||e.mozRTCPeerConnection)){e.RTCPeerConnection||(e.RTCPeerConnection=function(n,i){if(t.version<38&&n&&n.iceServers){for(var o=[],a=0;a=0)){this._remoteStreams.push(t);var n=new Event("addstream");n.stream=e.streams[0],this.dispatchEvent(n)}}.bind(this))}}))},shimCallbacksAPI:function(e){if("object"===(void 0===e?"undefined":_typeof(e))&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype,n=t.createOffer,i=t.createAnswer,o=t.setLocalDescription,a=t.setRemoteDescription,r=t.addIceCandidate;t.createOffer=function(e,t){var i=arguments.length>=2?arguments[2]:arguments[0],o=n.apply(this,[i]);return t?(o.then(e,t),Promise.resolve()):o},t.createAnswer=function(e,t){var n=arguments.length>=2?arguments[2]:arguments[0],o=i.apply(this,[n]);return t?(o.then(e,t),Promise.resolve()):o};var s=function(e,t,n){var i=o.apply(this,[e]);return n?(i.then(t,n),Promise.resolve()):i};t.setLocalDescription=s,s=function(e,t,n){var i=a.apply(this,[e]);return n?(i.then(t,n),Promise.resolve()):i},t.setRemoteDescription=s,s=function(e,t,n){var i=r.apply(this,[e]);return n?(i.then(t,n),Promise.resolve()):i},t.addIceCandidate=s}},shimGetUserMedia:function(e){var t=e&&e.navigator;t.getUserMedia||(t.webkitGetUserMedia?t.getUserMedia=t.webkitGetUserMedia.bind(t):t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,i){t.mediaDevices.getUserMedia(e).then(n,i)}.bind(t)))},shimRTCIceServerUrls:function(e){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){for(var i=[],o=0;o=0,isSupportWebrtc=!!window.RTCPeerConnection&&!!getUserMedia&&!isEdge$1,actionTypes={batchAction:"batchAction",uploadFileAction:"uploadFileAction",getConfig:"getConfig",setCustomVariables:"setCustomVariables",newVisitor:"newVisitor",pageVisit:"pageVisit",getChatButton:"getChatButton",getIfOnline:"getIfOnline",checkIfOnline:"checkIfOnline",checkAutoInvitation:"checkAutoInvitation",confirmAutoInvitation:"confirmAutoInvitation",acceptAutoInvitation:"acceptAutoInvitation",refuseAutoInvitation:"refuseAutoInvitation",checkManualInvitation:"checkManualInvitation",refuseManualInvitation:"refuseManualInvitation",manualInvitationShowed:"manualInvitationShowed",submitSSOInfo:"submitSSOInfo",submitPrechat:"submitPrechat",socialLogin:"socialLogin",requestChat:"requestChat",requestChatFromChatbot:"requestChatFromChatbot",sendChatMessages:"sendChatMessages",getChatMessages:"getChatMessages",getChatQueue:"getChatQueue",setVisitorStatus:"setVisitorStatus",submitRating:"submitRating",emailTranscript:"emailTranscript",sendFile:"sendFile",uploadFile:"uploadFile",endChat:"endChat",submitPostChat:"submitPostChat",submitOfflineMessage:"submitOfflineMessage",chatBotAnswerHelpful:"chatBotAnswerHelpful",chatBotSelectQuestion:"chatBotSelectQuestion",prechatHeartbeat:"prechatHeartbeat",offlineMessageHeartbeat:"offlineMessageHeartbeat",enterOfflineMessage:"enterOfflineMessage",checkManuallyInvited:"checkManuallyInvited",closeWindow:"closeWindow",getDepartments:"getDepartments",getAgents:"getAgents",checkBan:"checkBan",systemProcessingHeartbeat:"systemProcessingHeartbeat",restoreChat:"restoreChat",checkBBSCode:"checkBBSCode",checkDynamicCampaign:"checkDynamicCampaign",getDynamicCampaign:"getDynamicCampaign",pageHeartbeat:"pageHeartbeat",getChatWindowConfig:"getChatWindowConfig",getCustomVariables:"getCustomVariables",visitorHandleBotForm:"visitorHandleBotForm",agentMsgSeenByVisitor:"agentMsgSeenByVisitor",visitorGetLatestMsgSeen:"visitorGetLatestMsgSeen",setLocation:"setLocation",getVisitorInfo:"getVisitorInfo",recoverVisitor:"recoverVisitor"},uploadFileAction=function(e,t){for(var n=arguments.length,i=Array(n>2?n-2:0),o=2;o2&&void 0!==arguments[2]?arguments[2]:"",i=arguments[3],o=arguments[4],a=arguments[5],r=arguments[6],s=arguments[7],d=arguments[8];return{type:actionTypes.newVisitor,campaignId:e,visitorId:t,visitorGuid:n||"",referrer:i,landingPage:o,timezone:a,screenResolution:r,ifSupportWebrtc:s,firstVisitTime:d.firstVisitTime||(new Date).getTime(),visitTimes:d.visitTimes||0,chatTimes:d.chatTimes||0,name:d.name||(d.form?d.form.name:""),email:d.email||(d.form?d.form.email:""),persistentVisitor:d.persistentVisitor||!1}},recoverVisitor=function(e,t,n,i,o,a,r,s,d,c,l,u){return _extends({},newVisitor(e,void 0,t,n,s,i,o,a,r),{status:d,ifSearchingKB:c,type:actionTypes.recoverVisitor,navigation:l},u)},pageVisit=function(e,t){return{type:actionTypes.pageVisit,campaignId:e,page:t}},getConfig=function(){return{type:actionTypes.getConfig}},setCustomVariables=function(e,t){return{type:actionTypes.setCustomVariables,customVariables:e,campaignId:t}},getIfOnline=function(e){return{type:actionTypes.getIfOnline,campaignId:e}},checkIfOnline=function(e){return{type:actionTypes.checkIfOnline,campaignId:e}},checkAutoInvitation=function(e){return{type:actionTypes.checkAutoInvitation,campaignId:e}},confirmAutoInvitation=function(e,t){return{type:actionTypes.confirmAutoInvitation,campaignId:e,invitationId:t}},checkManualInvitation=function(e){return{type:actionTypes.checkManualInvitation,campaignId:e}},refuseInvitation=function(e,t,n){return{type:t?actionTypes.refuseManualInvitation:actionTypes.refuseAutoInvitation,campaignId:e,invitationId:t?void 0:n}},manualInvitationShowed=function(e){return{type:actionTypes.manualInvitationShowed,invitationId:e}},getChatButton=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:actionTypes.getChatButton,campaignId:e,alreadyCampaignId:t}},submitSSOInfo=function(e,t){return{type:actionTypes.submitSSOInfo,token:e,campaignId:t}},submitPrechat=function(e,t){return{type:actionTypes.submitPrechat,form:e,campaignId:t}},prechatHeartbeat=function(){return{type:actionTypes.prechatHeartbeat}},offlineMessageHeartbeat=function(){return{type:actionTypes.offlineMessageHeartbeat}},enterOfflineMessage=function(){return{type:actionTypes.enterOfflineMessage}},checkManuallyInvited=function(e){return{type:actionTypes.checkManuallyInvited,chatGuid:e}},submitOfflineMessage=function(e,t,n){return{type:actionTypes.submitOfflineMessage,campaignId:e,form:t,source:n}},uploadOfflineMessageFile=function(e,t,n,i){var o=e.attachment;return uploadFileAction({siteId:t,fileServiceUrl:n,attachmentField:i},o)},sendFile=function(e,t,n,i,o){return uploadFileAction({type:actionTypes.sendFile,formId:e.formId,chatGuid:t,visitorGuid:i,siteId:n,fileServiceUrl:o},e)},submitPostChat=function(e,t,n){return{type:actionTypes.submitPostChat,chatGuid:e,form:t,campaignId:n}},submitRating=function(e,t){return{type:actionTypes.submitRating,chatGuid:e,rating:t}},emailTranscript=function(e,t){return{type:actionTypes.emailTranscript,chatGuid:e,email:t}},socialLogin=function(e){return{type:actionTypes.socialLogin,socialType:e.source,name:e.name,email:e.email,avatar:e.avatar,profileUrl:e.profile}},requestChat=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments[3],o=arguments[4];return{type:actionTypes.requestChat,campaignId:e,source:t,isPrechatDone:n,isSupportWebrtc:isSupportWebrtc,ticketId:i,departmentId:o}},closeWindow=function(){return{type:actionTypes.closeWindow}},endChat=function(e){return{type:actionTypes.endChat,chatGuid:e}},getChatMessages=function(e,t){return{type:actionTypes.getChatMessages,chatGuid:e,fromId:t}},getChatQueue=function(e){return{type:actionTypes.getChatQueue,chatGuid:e}},agentMsgSeenByVisitor=function(e,t){return{type:actionTypes.agentMsgSeenByVisitor,chatGuid:e,msgGuid:t}},visitorGetLatestMsgSeen=function(e){return{type:actionTypes.visitorGetLatestMsgSeen,chatGuid:e}},sendChatMessages=function(e,t){return{type:actionTypes.sendChatMessages,chatGuid:e,messages:t}},chatBotAnswerHelpful=function(e,t){return _extends({type:actionTypes.chatBotAnswerHelpful,chatGuid:e},t)},chatBotSelectQuestion=function(e,t){return{type:actionTypes.chatBotSelectQuestion,chatGuid:e,question:{questionId:t.id,questionName:t.name},clickType:t.clickType,agentId:t.agentId||0,botId:t.botId||0,senderType:t.agentId&&t.agentId>0?1:3,senderId:t.agentId||0}},chatBotVisitorCancelBotForm=function(e,t){return _extends({type:actionTypes.visitorHandleBotForm,chatGuid:e},t,{senderType:t.agentId&&t.agentId>0?1:3,senderId:t.agentId||0})},chatBotVisitorSubmitBotForm=function(e,t){return _extends({type:actionTypes.visitorHandleBotForm,chatGuid:e},t,{senderType:t.agentId&&t.agentId>0?1:3,senderId:t.agentId||0})},getDepartments=function(){return{type:actionTypes.getDepartments}},getAgents=function(){return{type:actionTypes.getAgents}},batchAction=function(e){var t=e.filter(function(e){return!!e});return 0===t.length?null:1===t.length?t[0]:{type:actionTypes.batchAction,actions:t}},walkActions=function e(t,n){null!=n&&(n.type===actionTypes.batchAction?n.actions?n.actions.forEach(function(n){return e(t,n)}):n.payload&&n.payload.forEach(function(n){return e(t,n)}):t(n))},findAction=function(e,t){var n=null;return walkActions(function(e){e.type===t&&(n=e)},e),n},mapActions=function e(t,n){if(null==n)return null;var i=t(n);if(i.type===actionTypes.batchAction){if(i.actions)return{type:i.type,actions:i.actions.map(function(n){return e(t,n)})};if(i.payload)return{type:i.type,payload:i.payload.map(function(n){return e(t,n)})}}return i},checkBan=function(e){var t=e.visitorGuid,n=e.visitorId;return{type:actionTypes.checkBan,visitorGuid:n?void 0:t,visitorId:n}},systemProcessingHeartbeat=function(){return{type:actionTypes.systemProcessingHeartbeat}},restoreChat=function(){return{type:actionTypes.restoreChat}},checkBBSCode=function(){return{type:actionTypes.checkBBSCode}},checkDynamicCampaign=function(){return{type:actionTypes.checkDynamicCampaign}},getDynamicCampaign=function(){return{type:actionTypes.getDynamicCampaign}},pageHeartbeat=function(){return{type:actionTypes.pageHeartbeat}},getChatWindowConfig=function(){return{type:actionTypes.getChatWindowConfig}},getCustomVariables=function(){return{type:actionTypes.getCustomVariables}},setLocation=function(e,t){return{type:actionTypes.setLocation,chatGuid:t,location:e}},getVisitorInfo=function(){return{type:actionTypes.getVisitorInfo}},name="name",email="email",phone="phone",company="company",product="product",department="department",ticket="ticket",rating="rating",comment="comment",subject="subject",content="content",attachment="attachment",text="text",textarea="textarea",radio="radio",checkbox="checkbox",select="select",checkboxList="checkbox-list",datepicker="datetime",nps="nps",custom="custom",captcha="captcha",captchaFieldId=-1,noDepartmentId=-1,splitter="\u2299",defaultMaxMessageLength=1e4,button="button",autoInvitation="autoInvitation",manualInvitation="manualInvitation",none="none",waiting="waiting",invited="invited",chatting="chatting",chatted="chatted",classic="classic",circle="circle",bubble="bubble",styleClassName=function(e){return"window--"+e},chatWindowStyles=Object.freeze({classic:classic,circle:"circle",bubble:bubble,styleClassName:styleClassName}),loading="loading",login="prelogin",ssoLogin="ssoLogin",prechat="prechat",chat="chat",postchat="postchat",offline="offline",kb="kb",agent="agent",banner="banner",logo="logo",monitor="monitor",text$1="text",image="image",float="float",adaptive="adaptive",open="open",restored="restored",minimized="minimized",close="close",popupImage="popupImage",embeddedWindow="embeddedWindow",bubble$1="bubble",mobile$1="mobile",prechat$1="prechat",postchat$1="postchat",offline$1="offline",sso="sso",formType=Object.freeze({prechat:"prechat",postchat:"postchat",offline:"offline",sso:sso}),horizontal="horizontal",none$1="none",requesting="requesting",running="running",getCampaignById=function(e,t){return getValueDeeply(e,"entities.campaigns.entities."+t)},getCampaign=function(e,t){return getValueDeeply(e,"entities.campaigns.entities."+t)},visitor="visitor",agent$1="agent",system="system",chatbot="chatbot",fetching="fetching",done="done",error$1="error",videoIncoming="videoIncoming",notStart="notStart",videoRequesting="videoRequesting",videoChatting="videoChatting",audioIncoming="audioIncoming",audioChatting="audioChatting",audioRequesting="audioRequesting",waitingForChat="waitingForChat",chatting$1="chatting",preChat="preChat",manuallyInvited="manuallyInvited",autoInvited="autoInvited",offlineMessage="offlineMessage",refusedByOperator="refusedByOperator",refusedByVisitor="refusedByVisitor",chatEnded="chatEnded",inSite="inSite",manuallyInvitedByWindow="manuallyInvitedByWindow",systemProcessing="systemProcessing",searchKB="searchKB",main$1="main",standby="standby",isReady=function(e){return e.app.isReady},isMainServer=function(e){return"main"===e.app.server},isPoppedOut=function(e){return e.app.isPoppedOut},isBanned=function(e){return e.app.banned},isActive=function(e){return e.app.isActive},isInactive=function(e){return!e.app.isActive},isOpenerExists=function(e){return e.app.isOpenerExists},getServer=function(e){return e.app.server},getRecoverFailedTimes=function(e){return e.app.recoverFailTimes},getIsRecovering=function(e){return e.app.isRecovering},getLastSuccessTime=function(e){return e.app.lastSuccessTime},debugUrl=function(e){return null},absoluteURL=function(e,t){return/^https?:/.test(t)?t:null==e.configuration?t:null==t?null:[isMainServer(e)?e.configuration.url:e.configuration.standbyUrl,t].join(/^\//.test(t)?"":"/")},resourceUrl=function(e,t){return/^https?:/.test(t)?t:null==e.configuration?t:null==t?null:[e.configuration.vue,t].join(/^\//.test(t)?"":"/")},getHost$1=function(e){return/^(https?:\/\/)?([^/]*)/gi.exec(e)[2]},getWebrtcUrl=function(e,t){if(/^https?:/.test(t))return t;if(null==e.configuration)return t;var n=isMainServer(e)?e.configuration.webrtcSignalingServiceUrl:e.configuration.standbyUrl;return[getHost$1(n),t].join(/^\//.test(t)?"":"/")},isMaxonEnabled=function(e){return e.configuration.features?e.configuration.features.maxon:e.configuration.standbyUrl},isDepartmentEnabled=function(e){return e.configuration.features.department},getHeartbeatConfig=function(e){return e.configuration.heartbeat.online},getHeartbeatOfflineConfig=function(e){return e.configuration.heartbeat.offline},getHeartbeatStopAfter=function(e){return e.configuration.heartbeat.stopAfter},getFacebookAppId=function(e){return e.configuration.facebookAppId},getFileSizeLimit=function(e){return e.configuration.attachmentMaxSize},getFileCountLimit=function(e){return e.configuration.attachmentMaxCount},getFrequencyLimit=function(e){return e.configuration.frequencyLimit},getMessageLengthLimit=function(e){return e.configuration.messageLengthLimit},getIsChinaIp=function(e){return e.configuration.isChinaIP},isRemovePoweredby=function(e){return e.configuration.features.removePoweredby},getKBAPIUrl=function(e){return e.configuration.kbAPIUrl},getFeatureEnabled=function(e){return function(t){var n=t.configuration.features;return void 0===n[e]||n[e]}},isSendFileEnabled=getFeatureEnabled("sendFile"),isHeartbeatEnabled=getFeatureEnabled("heartbeat"),isAutoInvitationEnabled=getFeatureEnabled("autoInvitation"),getIfHideAgentName=function(e){return!!e.configuration.features.hideAgentName&&e.configuration.features.hideAgentName},getEncoding=function(e){return e.configuration.encoding},getCaptchaSettings=function(e){return e.configuration.recaptchaSettings},getIfPartner=function(e){return e.configuration.ifPartner},getServerInstanceTag=function(e){return e.configuration.serverInstanceTag},goToIntent="goToIntent",contactAgent="contactAgent",text$2="text",getWindow=function(e){return getValueDeeply(e,"window")},safeGet=function(e,t){return function(n){var i=getWindow(n);return i?e(i,n):t}},getChatStatus=safeGet(function(e){return e.chatStatus},"none"),getChatAgent=function(e){var t=e.window;return t?t.tab!==chat&&t.tab!==postchat?null:t.chatStatus!==chatting&&t.chatStatus!==invited&&t.chatStatus!==chatted?null:t.isChatBot?null:0===t.involvedAgents.length?null:e.entities.agents.entities[t.involvedAgents[0]]:null},getChatBot=function(e){var t=e.window;return t&&(t.tab===chat||t.isChatBot&&t.tab===postchat)?t.chatStatus!==chatting&&t.chatStatus!==waiting&&t.chatStatus!==chatted?null:t.isChatBot?e.window.chatBot||{}:null:null},isWindowCampaignReady=safeGet(function(e,t){if(!t.entities)return!1;if(!t.entities.campaigns)return!1;var n=t.entities.campaigns;return n.fetchStatus[e.id]===done&&!!n.entities[e.id]},!1),getWindowTab=function(e){return getValueDeeply(e,"window.tab")},getWindowTabItems=safeGet(function(e){return e.sideWindowItems},[]),getWindowId=function(e){return getValueDeeply(e,"window.id")},getWindowCampaign=safeGet(function(e,t){return t.entities.campaigns.entities[t.window.id]},null),getWindowMainColor=safeGet(function(e,t){return t.entities.campaigns.entities[t.window.id].mainColor},""),getWindowBackground=function(e){var t=e.entities.campaigns.entities[e.window.id].chat.texture;return t?"url("+t+")":null},getSSOUrl=safeGet(function(e){return e.ssoUrl},""),getIfShowPreLogin=safeGet(function(e){return e.showPrelogin},!1),getIsChatbot=safeGet(function(e){return e.isChatBot},!1),getPendingMessage=safeGet(function(e){return e.pendingMessage},void 0),messageTransform=memoize(1)(function(e,t,n,i,o){return function(a){var r=t.entities[n];if("agent"===a.sender.type){var s=e.entities[a.sender.id];return _extends({},a,{sender:s||{name:r.languages.operatorDefaultName}})}if(a.type===chatbotReturnQuestionGuid||"chatbot"===a.sender.type)return _extends({},a,{sender:{name:o?o.name:"",avatar:o?o.avatar:""}});if("visitorRequestChat"===a.type)return _extends({},a,{queuePosition:i.position,estimatedWaitTime:i.waitTime});if("agentJoinChat"===a.type||"agentEndChat"===a.type||"agentTransferChat"===a.type){var d=e.entities[a.sender.id];return _extends({},a,{sender:d||{name:r.languages.operatorDefaultName}})}return a}}),messageFilter=function(e){return function(t){return t.type!==creditCardMasked&&t.type!==pendingAccept&&t.type!==pendingAudioRequesting&&t.type!==pendingHangup&&t.type!==pendingVideoRequesting&&"pendingSubmitSecureForm"!==t.type&&"pendingCancelSecureForm"!==t.type&&"pendingGetSecureFormFailure"!==t.type&&"visitorTyping"!==t.type&&"pendingVisitorIsTyping"!==t.type&&(("systemPromoteOfflineMesage"!==t.type||e===waiting)&&(!!t.content&&("string"==typeof t.content?t.content:"string"==typeof t.content.fileName?t.content.fileName:"string"==typeof t.content.name?t.content.name:"string"==typeof t.content.text?t.content.text:null!==t.content.text&&("object"===_typeof(t.content)&&Object.keys(t.content).length>0))))}},getTransformedMessages=memoize(1)(function(e,t,n,i,o,a,r){return o.map(messageTransform(e,t,n,i,r)).filter(messageFilter(a))}),getMessages=safeGet(function(e,t){var n=e.messages,i=t.entities,o=i.agents,a=i.campaigns,r=e.id,s=e.queue,d=e.chatStatus,c=e.chatBot;return getTransformedMessages(o,a,r,s,n,d,c)},[]),getWinMessages=safeGet(function(e){return e.messages},[]),getSourceMessages=safeGet(function(e){return e.sourceMessages},[]),getQueue=safeGet(function(e){return e.queue},{}),getInvolvedAgents=safeGet(function(e){return e.involvedAgents},[]),getAudioVideoAgentId=safeGet(function(e){return e.audioVideoAgentId},0),getChatGuid=safeGet(function(e){return e.chatGuid}),getVisitorTyping=safeGet(function(e){return e.visitorTyping},!1),getDraft=safeGet(function(e){return e.draft},""),getMaxMessageId=safeGet(function(e){return e.maxId},-1),getError=safeGet(function(e){return e.error}),getWarning=safeGet(function(e){return e.warning}),getMaxReadId=safeGet(function(e){return e.maxReadId},-1),getUnreadMessages=safeGet(function(e,t){for(var n=getMessages(t),i=e.maxReadId,o=0,a=n.length-1;a>=0;a-=1){var r=n[a];if(r.id<=i)break;if(void 0!==r.id&&isMessageNotifyRequired(r)&&(o+=1)>=99)return 99}return o},0),getLastMessage=safeGet(function(e,t){var n=getMessages(t);if(!(getUnreadMessages(t)<=0))for(var i=n.length-1;i>=0;i-=1){var o=n[i];if(isMessageNotifyRequired(o))return o}}),getLastMessageId=safeGet(function(e,t){var n=getMessages(t);if(getUnreadMessages(t)<=0)return 0;for(var i=n.length-1;i>=0;i-=1){var o=n[i];if(isMessageNotifyRequired(o))return o.id}return 0}),getPoweredByUrl=function(){var e=location$1.href;return"https://www.comm100.com/powered-by/?customer="+(getHost(e)||"")},isAgentRefuseChat=function(e){return e.window&&e.window.messages&&e.window.messages.find(function(e){return"agentRefuseChat"===e.type})},isChatInputVisible=safeGet(function(e){if(e.tab!==chat)return!1;switch(e.chatStatus){case chatting:return!e.isChatBot||!1!==e.isVisibleInputAreaWhenBotChatting;case waiting:return!!e.allowWaitingSendMessage&&!e.isChatBot;case chatted:return!1;case invited:return!0;default:return!1}},!1),isWebViewShow=safeGet(function(e){return!!e.webView},!1),getIsChatInputEnabled=safeGet(function(e){if(e.tab!==chat)return!1;switch(e.chatStatus){case chatting:return!0;case waiting:return!!e.allowWaitingSendMessage;case chatted:return!1;case invited:default:return!0}},!1),isPreChatEnabled=function(e){return!!getWindowCampaign(e).prechat},isSendingFile=function(e){return e.window&&e.window.messages&&e.window.messages.find(function(e){return e.type===visitorFile})},isTranscriptSent=function(e){return e.window&&e.window.messages&&e.window.messages.find(function(e){return"visitorSetEmail"===e.type})},hasAgentChating=function(e){var t=getValueDeeply(e,"window.involvedAgents");return t&&t.length>0},getIfChatting=safeGet(function(e){return e.chatStatus===chatting},!1),getIfInvited=safeGet(function(e){return e.chatStatus===invited},!1),getFirstInvolvedAgent=function(e){var t=getInvolvedAgents(e);if(0!==t.length){var n=t[0];return e.entities.agents.entities[n]}},getAudioVideoAgent=function(e){var t=getInvolvedAgents(e);if(0!==t.length){var n=getAudioVideoAgentId(e);if(n>0)return e.entities.agents.entities[n];if(t.length>1)return{avatar:absoluteURL(e,"/images/avatar.png"),name:""};var i=t[0];return e.entities.agents.entities[i]}},checkInvolvedAgent=function(e,t){var n=getInvolvedAgents(e);return 0!==n.length&&!!n.find(function(e){return e===t})},getChattingAgent=function(e){var t=getIfInvited(e);if(getIfChatting(e)||t){if(t){if("manualInvitation"!==e.page.requestChatAction.source.type)return;return getFirstInvolvedAgent(e)}var n=getChatBot(e);return n||getFirstInvolvedAgent(e)}},getChattingAvatar=function(e){var t=getChattingAgent(e);return t?t.avatar:t},getChattingAgentName=function(e){var t=getChattingAgent(e);return t?t.name:t},getAudioVideoAgentAvatar=function(e){var t=getAudioVideoAgent(e);return t?t.avatar:""},getAudioVideoAgentName=function(e){var t=getAudioVideoAgent(e);return t?t.name:""},getIfWaitingOrChatting=safeGet(function(e){return e.chatStatus===waiting||e.chatStatus===chatting},!1),isChattingWithBot=safeGet(function(e){return e.chatStatus===chatting&&e.isChatBot},!1),isWaitingFromChatBotToAgent=safeGet(function(e){return e.chatStatus===waiting&&e.isChatBot},!1),getIsChatted=safeGet(function(e){return e.chatStatus===chatted},!1),getifHideBio=safeGet(function(e){return e.ifHideBio},!1),getFileUploadCount=safeGet(function(e){return e.fileUploadCount},0),getWindowField=function(e,t){return getValueDeeply(e,"window.fields."+t)},getDisbaled=safeGet(function(e){return e.disabled},!1),isPopupNotificationEnabled=function(e){var t=getWindowCampaign(e);return t&&t.notification},getifShowSideWindow=function(e){var t=e.window,n=getValueDeeply(e,"page.windowStatus");return t&&(t.tab===chat||t.tab===kb||"loading"===t.tab||"ssoLogin"===t.tab||t.tab===login||t.tab===prechat||t.tab===offline)&&(n===open||n===restored)&&!!t.sideWindowSelectedTab},getAgentisSupportWebrtc=function(e){var t=getChatAgent(e);return!!t&&t.isSupportWebrtc},getSideWindowItems=function(e){return getValueDeeply(e,"window.sideWindowItems")},getIsVideoAudio=safeGet(function(e){return e.audio_video_disabled},!1),getShowChatWindowInSidewindow=function(e){return getValueDeeply(e,"window.showChatWindowInSidewindow")},getSideWindowTabSelected=function(e){return getValueDeeply(e,"window.sideWindowSelectedTab")},getCustomCss=function(e){return getWindowCampaign(e).customCSS},getCustomCssByCampaignId=function(e,t){var n=getCampaignById(e,t);return n?n.customCSS:""},getVideoStatus=safeGet(function(e){return e.vChatStatus},"notStart"),getAudioVideoChatStartTime=safeGet(function(e){return e.audioVideoChatStartTime},0),getIsChatWindowFocused=safeGet(function(e){return e.isFocused},!1),getIsFrequencyLimited=safeGet(function(e){return e.frequencyLimitState},!1),getAutoEjectTranscript=safeGet(function(e){return e.autoEjectTranscript},!1),isRightToLeft=function(e){var t=getWindowCampaign(e);return t&&t.isRTL},isRightToLeftByCampaignId=function(e,t){var n=getCampaignById(e,t);return n&&n.isRTL},getIfShowBio=function(e){var t=getChatAgent(e);return!(!t||!t.bio)&&(!safeGet(function(e){return e.ifHideBio},!1)(e)&&getWindowCampaign(e).header.showBio)},getIfKBChatwithAgentClicked=safeGet(function(e){return e.kbChatWithAgentClicked},!1),getActiveKnowledgebaseArticle=function(e){return getValueDeeply(e,"window.kb.activeArticle")},getActiveKnowledgebaseArticleById=function(e,t){return getValueDeeply(e,"entities.kbArticles.entities."+t)},getkbId=function(e){return getValueDeeply(e,"window.kbConfig.id")},getkbGreetingMessage=function(e){return getValueDeeply(e,"window.kbConfig.greetingMessage")},getkbRowcount=function(e){return getValueDeeply(e,"window.kbConfig.maxCount")},getkbNotFound=function(e){var t=getValueDeeply(e,"window.kb");if(!t)return!1;if(!1!==t.isLoading)return!1;var n=t.articles;return!(n&&n.length>0)},getkbIsLoading=function(e){return getValueDeeply(e,"window.kb.isLoading")},getkbNotShowContent=function(e){return getValueDeeply(e,"window.kbConfig.notShowContent")},getBotSideWindowContent=safeGet(function(e){return e.botSideWindow},null),getCobrowseStatus=function(e){return e.window?e.window.cobrowsing:"none"},isCobrowsing=function(e){return"running"===getCobrowseStatus(e)},isRequestingCobrowsing=function(e){return"requesting"===getCobrowseStatus(e)},getCobrowseSessionCode=function(e){return e.window.cobrowseSessionCode},getCobrowseGroupId=function(e){return e.window.cobrowseGroupId},getCobrowseCallId=function(e){return e.window.cobrowseCallId||""},getCobrowseAgentId=function(e){return e.window.cobrowseAgent},getBottom=safeGet(function(e){return e.bottom},0),getRight=safeGet(function(e){return e.right},0),getIfEnableVisitorSeeMsgSentSeen=function(e){var t=getWindowCampaign(e);return t&&t.ifEnableVisitorSeeMsgSentSeen},getMaxAgentReadId=safeGet(function(e){return e.maxAgentReadId},""),getMaxVisitorReadId=safeGet(function(e){return e.maxVisitorReadId},""),getQuickReply=function(e){return isChattingWithBot(e)?e.window.quickReply:getIfChatting(e)&&e.window.quickReply?_extends({},e.window.quickReply,{items:e.window.quickReply.items.filter(function(e){return"contactAgent"!==e.type})}):null},getWebView=safeGet(function(e){return e.webView},null),getWebViewIfLoading=function(e){var t=getWebView(e);return!t||t.ifLoading},getWebViewIfSuccess=function(e){var t=getWebView(e);return!!t&&t.success},getWebViewVisitorInfo=function(e){var t=getWebView(e);return t?t.visitorInfo:null},getShowToolbox=safeGet(function(e){return e.showToolbox},!1),getChatVersion=safeGet(function(e){return e.chatVersion},""),getChatIdentity=safeGet(function(e,t){return{chatGuid:getChatGuid(t),chatVersion:getChatVersion(t)}},{chatGuid:null,chatVersion:""}),getWinVisitorStatus=safeGet(function(e){return e.visitorStatus},inSite),getChatStartTime=function(e){var t=getSourceMessages(e).find(function(e){return"agentAcceptChat"===e.type||"systemStartChatbot"===e.type});return t?t.time:""},getChatEndTime=function(e){var t=getSourceMessages(e).find(function(e){return"systemEndChat"===e.type});return t?t.time:""},getMaxGuid=function(e){var t=getWinMessages(e);return t.length>0?t[t.length-1].guid:""},getEmailToSendTranscript=safeGet(function(e){return e.emailToSendTranscript},""),getIsSecureForm=function(e){var t=getWinMessages(e),n=!1;return t.forEach(function(e){"agentRequestSecureForm"===e.type?n=!0:"visitorCancelSecureForm"===e.type&&(n=!1)}),n&&getChatStatus(e)===chatting},upload=Math.pow(2,0),rating$1=Math.pow(2,1),email$1=Math.pow(2,2),audio=Math.pow(2,3),video=Math.pow(2,4),print=Math.pow(2,5),getMainCampaignId=function(e){return e.page.campaignId},getCampaignId=function(e){return e.window?e.window.id:e.page.campaignId},getPage=function(e){return e.page},getChatGroup=function(e){return e.page.chatGroup},getOnlineStatus=function(e){return e.page.buttons},getSiteId=function(e){return e.page.siteId},getWindowStatus=function(e){return e.page.windowStatus},getButtonIds=function(e){return Object.keys(e.page.buttons)},getVisitorGuid=function(e){return e.page.visitor.guid},getCurrentPage=function(e){var t=getPage(e).popout;return t?{url:t.url,title:t.title}:{url:location$1.href,title:document$2.title}},getRequestChatAction=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=getCurrentPage(e);return e.page.requestChatAction?_extends({},e.page.requestChatAction,{campaignId:t,source:_extends({},e.page.requestChatAction.source,{page:n})}):requestChat(t,{type:"button",page:n})},getRequestChatSource=function(e){var t=getRequestChatAction(e);return t&&t.source},getRequestChatSourceType=function(e){return(getRequestChatSource(e)||{}).type},getRequestChatFromChatbotAction=function(e){var t=getRequestChatSource(e),n=e.page.requestChatAction||{};return{type:actionTypes.requestChatFromChatbot,departmentId:n.departmentId,source:t}},getRequestChatInvitationId=function(e){return(getRequestChatSource(e)||{}).invitationId},isOnline=function(e,t){return e.page.buttons[t]},isMobile$1=function(e){return"mobile"===e.page.platform||"ipad"===e.page.platform},isIPad=function(e){return"ipad"===e.page.platform},getAllButtons=function(e){return Object.keys(e.page.buttons).map(function(t){var n=e.entities.buttons.entities[t];if(!n)return null;var i=getSiteId(e);return _extends({},n,{chatWindowLink:resourceUrl(e,getChatWindowLink(i,t))})}).filter(function(e){return e})},shouldHideOffline=function(e,t){return e.isHideOffline&&!t[e.id]},isWindowOpenned=function(e){return e!==close},shouldHideWhenWindowOpened=function(e,t){ var n=e.type;return("float"===n||"adaptive"===n)&&isWindowOpenned(t)},getAllButtonsInnerImpl=memoize(1)(function(e,t,n){return e.map(function(e){var i=!shouldHideOffline(e,t)&&!shouldHideWhenWindowOpened(e,n)&&!e.isHidden;return _extends({},e,{isHidden:!i})})}),getButtonsNotHiddenByApi=function(e){return getAllButtons(e).filter(function(e){return!e.isHidden})},getAllButtonsWithVisibility=function(e){var t=getAllButtons(e),n=getOnlineStatus(e),i=getWindowStatus(e);return getAllButtonsInnerImpl(t,n,i)},getIfSkipPreChat=function(e){return e.page.skipPreChat},getHeight=function(e){return e.page.height},getWidth=function(e){return e.page.width},getOrientation=function(e){return e.page.orientation},isDynamicCampaign=function(e){return e.page.isDynamicCampaign},getOwnHost=function(e){var t=getCurrentPage(e).url;return getHost(t)},getPageVisitorStatus=function(e){return e.page.visitorStatus},getChatTools=function(e,t){var n=getValueDeeply(e,"entities.campaigns.entities."+t+".chat.tools");return void 0===n?0:n},getChatToolEmail=function(e,t){return!(!(email$1&getChatTools(e,t))||e.window.chatStatus!==chatted&&e.window.chatStatus!==chatting)},getChatToolUpload=function(e,t){return!!(upload&getChatTools(e,t))&&e.window.chatStatus!==chatted},getChatToolRating=function(e,t){return!!(rating$1&getChatTools(e,t))&&e.window.chatStatus!==chatted},getChatToolAudio=function(e,t){return!!(audio&getChatTools(e,t))&&e.window.chatStatus!==chatted&&getValueDeeply(e,"configuration.features.audioVideoChat")&&isSupportWebrtc},getChatToolVideo=function(e,t){return!!(video&getChatTools(e,t))&&e.window.chatStatus!==chatted&&getValueDeeply(e,"configuration.features.audioVideoChat")&&isSupportWebrtc},getChatToolPrint=function(e,t){return!!(print&getChatTools(e,t))&&!isAgentRefuseChat(e)&&!isMobile$1(e)},getFieldByType=function(e,t){var n=getWindowCampaign(e);if(n&&n.postchat){return n.postchat.map(function(t){return e.entities.fields.entities[t]}).find(function(e){return e.type===t})}return null},getRatingField=function(e){return getFieldByType(e,"rating")},getCommentField=function(e){return getFieldByType(e,comment)},safeKeys=function(e){return e&&Object.keys(e)||[]},getAgent=function(e,t){return e.entities.agents.entities[t]},getAgentIds=function(e){return safeKeys(e.entities.agents.entities)},getAgentsCount=function(e){return getAgentIds(e).length},getAgents$1=function(e){return getAgentIds(e).reduce(function(t,n){return t.concat([getAgent(e,n)])},[])},getAgentAvatars=function(e){var t=getAgents$1(e).sort(function(e,t){return e.index-t.index}).map(function(e){return e.avatar}).filter(function(e){return e}),n=null;switch(t.length){case 0:return null;case 1:n=[t[0],absoluteURL(e,"/images/avatar-male.png"),absoluteURL(e,"/images/avatar-female.png")];break;case 2:n=[].concat(t,[absoluteURL(e,"/images/avatar-male.png")]).filter(function(e){return e});break;case 3:n=t.slice(0,3);break;default:n=t.slice(0,3)}return n},getButton=function(e,t){return e.entities.buttons.entities[t]},getCustomOffline=function(e,t){var n=getButton(e,t);return n&&n.customOffline},isEmbeddedWindow=function(e,t){return!!e.entities.buttons&&getButton(e,t).isEmbeddedWindow},getDepartments$1=function(e){return e.entities.departments.entities},windowSizeRegPattern=/#chat-window(?!-)\b[^{}]*?{([^}]*?)}/,widthRegPattern=/(?:;|\s|{)width\s*:\s*(?:-?\d+)/,heightRegPattern=/(?:;|\s|{)height\s*:\s*(?:-?\d+)/,getDefaultWidth=function(){return 385},getDefaultHeight=function(e){return e===classic?580:605},getWindowIframeStyle=function(e,t){var n=getCampaign(e,t),i=getButton(e,t);if(i){var o=i.iframeStyle;if(!o)return o;if(!n)return o;var a=n.style;if(a===bubble)return o;if(n.customCSS&&windowSizeRegPattern.test(n.customCSS)){var r=windowSizeRegPattern.exec(n.customCSS)[0],s=widthRegPattern.exec(r),d=heightRegPattern.exec(r);return s||(o.width=385),d||(o.height=getDefaultHeight(a)),o}return o.width=385,o.height=getDefaultHeight(a),o}},getAdaptiveButtonOffset=function(e,t){var n=getButton(e,t);return n&&"adaptive"===n.type&&n.offset?n.offset:{right:0,bottom:0}},getCustomJsById=function(e,t){var n=getButton(e,t);if(n)return n.customJs},getkbArticles=function(e){var t=getValueDeeply(e,"window.kb.articles");return t&&t.map(function(t){var n=e.entities.kbArticles.entities[t];return{id:n.id,title:n.title,summary:n.summary}})},getMainColorByCampaignId=function(e,t){var n=e.entities.campaigns.entities[t];return n?n.mainColor:""},bold=Math.pow(2,0),italic=Math.pow(2,1),underline=Math.pow(2,2),convertBubbleInvtation=memoize(1)(function(e){var t={};return t.id=e.id,t.isManual=e.isManual,t.type=bubble$1,t.campaignId=e.campaignId,t.message=e.text,t.textTypeHere=e.textTypeHere,t.messageCount=e.messageCount,e.agent&&(t.agentName=e.agent.name,t.avatar=e.agent.avatar),t.agent=e.agent,t}),convertMobileInvitation=memoize(1)(function(e){var t={};return t.id=e.id,t.type=mobile$1,t.campaignId=e.campaignId,t.message=e.text,t.acceptText=e.acceptText,t.refuseText=e.refuseText,t.themeColor=e.themeColor,t.title=e.title,t.agent=e.agent,t}),convertPopupImageInvitation=memoize(1)(function(e){var t={};if(t.id=e.id,t.type=popupImage,t.image=e.image,t.message=e.text,t.fontSize=e.fontSize,t.color=e.color,t.themeColor=e.themeColor,t.fontFamily=e.fontFamily,t.ifModal=e.ifModal,e.fontStyle){var n=e.fontStyle;t.fontWeight=n&bold?"bold":"",t.fontStyle=n&italic?"italic":"",t.textDecoration=n&underline?"underline":""}return t.messageArea={left:e.textArea[0],top:e.textArea[1],width:e.textArea[2],height:e.textArea[3]},t.closeArea={left:e.closeArea[0],top:e.closeArea[1],width:e.closeArea[2],height:e.closeArea[3]},t.textAlign=e.textAlign,e.position&&(t.position=e.position),t.isManual=e.isManual,t.campaignId=e.campaignId,t.agent=e.agent,t}),getInvitationObject=function(e){return e.page&&e.page.invitation},_getLanguageBasedOnFo,_getLanguageBasedOnFo2,_tabTextKeyMapping,getDepartmentOptions=memoize(1)(function(e){return Object.keys(e).sort(function(e,t){return e-t}).map(function(t){var n=e[t];return{value:n.id,label:n.name,isOnline:n.isOnline}})}),emptyFieldValues={custom:{}},filterFieldsByConfig=function(e,t,n,i){return t.configuration.features[n]?e:e.filter(function(e){return t.entities.fields.entities[e].type!==i})},getFields=function(e,t,n){var i=void 0;"prechat"===t?i="prechat":"postchat"===t?i="postchat":"offline"===t&&(i="offline");var o=e.entities.campaigns.entities[n];if(o&&o[i]){var a=o[i];return a=filterFieldsByConfig(a,e,"department","department"),a=filterFieldsByConfig(a,e,"ticket","ticket"),a.map(function(t){var n=e.entities.fields.entities[t],i="";if("department"===n.type){var a=e.entities.departments.entities;n=_extends({},n,{options:getDepartmentOptions(a)})}var r=e.window?e.window.fields:emptyFieldValues,s=void 0;if(s=n.type===name?r.name:n.type===email?r.email:"phone"===n.type?r.phone:"company"===n.type?r.company:"product"===n.type?r.product:"department"===n.type?r.department:"rating"===n.type?r.rating:n.type===comment?r.comment:"subject"===n.type?r.subject:"content"===n.type?r.content:"attachment"===n.type?r.attachment:"ticket"===n.type?r.ticketId:"captcha"===n.type?void 0:"nps"===n.type&&void 0===r.custom[n.label]?"":r.custom[n.label],s=null!=n.value?n.value:s,n.isRequired){var d=!1;d="nps"===n.type?""===s||void 0===s:!s||s.trim&&""===s.trim(),(d||Array.isArray(s)&&0===s.length||"department"===n.type&&-1===s)&&(i=o.languages.promptRequired)}if(n.type===email&&s&&!isEmail(s)&&(i=o.languages.promptInvalidEmail),"attachment"===n.type&&"undefined"!=typeof File&&s&&"undefined"!==s.size){var c=getFileSizeLimit(e);s.size>Math.pow(1024,2)*c&&(i=o.languages.promptFileSizeExceed.replace("{fileSize}",c))}return _extends({},n,{value:s,error:n.customError||i})})}return[]},getField=function(e,t,n,i){var o=getFields(e,t,n);if(o&&o.length>0){var a=o.filter(function(e){return e.type===i});if(a.length>0)return a[0]}return""},getSubmitStatus=function(e,t){return e.window.forms[t]},getPreChatFields=function(e){var t=e.entities.campaigns.entities[e.window.id];return t&&t.prechat?t.prechat.map(function(t){return e.entities.fields.entities[t]}):[]},getPreChatCustomFields=function(e){var t={text:!0,textarea:!0,radio:!0,checkbox:!0,select:!0,"checkbox-list":!0,attachment:!0,rating:!0};return getPreChatFields(e).filter(function(e){return t[e.type]})},getIfDisplayChatTools=function(e){var t=getCampaignId(e);if(getChatTools(e,t)<1)return!1;var n=e.window;return"postchat"!==getWindowTab(e)&&(n.chatStatus===chatting||n.chatStatus===chatted)},getIfEnableGoogleAnalytics=function(e){return e.configuration.features.ga},getWindowStyle=function(e,t){return getValueDeeply(e,"entities.campaigns.entities."+t+".style")},getCornerStyle=function(e,t){return getValueDeeply(e,"entities.campaigns.entities."+t+".cornerStyle")},getChatWindowIfCanDownloadChatDetail=function(e,t){return getValueDeeply(e,"entities.campaigns.entities."+t+".chatWindowIfCanDownloadChatDetail")},getCurrentWindowStyle=function(e){var t=getWindowId(e);return getWindowStyle(e,t)},getCurrentCornerStyle=function(e){var t=getWindowId(e);return getCornerStyle(e,t)},getCustomVariables$1=function(e){return e.configuration.customVariables},getCustomVariableResult=function(e){return e.configuration.customVariableResult},getHideCreditCard=function(e){return e.configuration.features.hideCreditCard},getShowTypingContent=function(e){return e.configuration.features.showTypingContent},getWindowLanguages=function(e){return e.entities.campaigns.entities[e.window.id].languages},hasWindowLanguagesData=function(e){var t=e.entities;if(!t)return!1;var n=t.campaigns.entities;if(!e.window||!n)return!1;var i=n[e.window.id];return!!i&&!!i.languages},getLanguageBasedOnForm=function(e){return function(t,n){var i=getWindowLanguages(t),o=e[n];if(o)return i[o]}},getGreeting=getLanguageBasedOnForm((_getLanguageBasedOnFo={},_getLanguageBasedOnFo.prechat="greetingPreChatWindow",_getLanguageBasedOnFo.postchat="greetingRating",_getLanguageBasedOnFo.offline="greetingOfflineMessageWindow",_getLanguageBasedOnFo)),isHorizontal=function(e){return"horizontal"===e.entities.campaigns.entities[e.window.id].formStyle},getButtonText=getLanguageBasedOnForm((_getLanguageBasedOnFo2={},_getLanguageBasedOnFo2.prechat="buttonStartChat",_getLanguageBasedOnFo2.postchat="buttonSubmit",_getLanguageBasedOnFo2.offline="buttonSubmit",_getLanguageBasedOnFo2)),getNewMessagesNotificationText=function(e,t){if(!(t<=0)){return getWindowLanguages(e).embeddedWindowNewMessages.replace("{count}",t)}},getLanguageWriteReply=function(e){return getWindowLanguages(e).writeReply},getFontColor=function(e){var t=getWindowId(e),n=getCampaign(e,t).mainColor;return getColor(n)},isFacebookEnabled=function(e){var t=e.entities.campaigns.entities[e.window.id];return!!t.socialLogin&&t.socialLogin.facebook},chatIfShowAvatar=function(e){return getValueDeeply(e,"entities.campaigns.entities."+(e.window&&e.window.id)+".chat.showAvatar")},chatHeaderIfShowAvatar=function(e){var t=getCampaignId(e),n=e.entities.campaigns.entities[t],i=n.header,o=i.showAvatar,a=i.type;return!!o||!(!getIsChatbot(e)||"banner"!==a)},getSounds=function(e){return e.entities.campaigns.entities[e.window.id].sounds},getSound=function(e,t){if(e.window){var n=getSounds(e);return n&&n[t]}},getModeratorUrl=function(e){return null==e.configuration?null:e.configuration.features&&!e.configuration.features.maxon?null:null==e.configuration.standbyUrl?null:e.configuration.standbyUrl+"/moderator.aspx?siteId="+getSiteId(e)},getMainServerStatusUrl=function(e){return null==e.configuration?null:null==e.configuration.url?null:e.configuration.url+"/status.ashx"},getVisitorUrl=function(e){var t=getChatGroup(e),n=getSiteId(e),i=getVisitorGuid(e);return absoluteURL(e,["/visitor.ashx?",n?"siteId="+n:"",t?"&chatGroup="+t:"",i?"&visitorGuid="+i:""].join(""))},isWindowManualInvited=function(e){return"manualInvitation"===getRequestChatSourceType(e)&&getChatStatus(e)===invited},isBubbleInvitation=function(e){return(getRequestChatSource(e)||{}).invitationType===bubble$1},getCustomJs=function(e){return getCustomJsById(e,getMainCampaignId(e))},isBBSCode=function(e){return isPoppedOut(e)&&null==getRequestChatSourceType(e)},canPopIn=function(e){return isOpenerExists(e)&&isPoppedOut(e)&&isEmbeddedWindow(e,getCampaignId(e))&&!isBBSCode(e)&&!getIsSecureForm(e)},getLanguages$1=function(e){return(e.entities.campaigns.entities[getCampaignId(e)]||{}).languages},getLanguageTag=function(e,t){return(e.entities.campaigns.entities[t||getCampaignId(e)]||{}).languageCode||"en"},getLanguage=function(e,t){var n=getLanguages$1(e);return n&&n[t]},getPDFUrl=function(e){return e.configuration?e.configuration.fileServiceUrl+"/download.ashx?siteId="+getSiteId(e)+"&chatGuid="+getChatGuid(e)+"&visitorGuid="+getVisitorGuid(e)+"&TranscriptPDF=1":""},getFileServiceUrl=function(e){return e.configuration.fileServiceUrl},getCobrowseAgentName=function(e){var t=getCobrowseAgentId(e);if(!t)return"";var n=getAgent(e,t);return n?n.name:""},genWindowLanguageGetter=function(e){return function(t){return getWindowLanguages(t)[e]}},getLanguageCobrowseAllowControl=genWindowLanguageGetter("cobrowseAllowControl"),getLanguageCobrowseStop=genWindowLanguageGetter("cobrowseStop"),getLanguageCobrowseAgentWait=function(e){var t=getWindowLanguages(e).cobrowseAgentWait,n=getCobrowseAgentName(e);return t.replace(/{name}/g,n)},getLanguageCobrowseNotes=genWindowLanguageGetter("cobrowseNotes"),getMainCampaign=function(e){return getCampaign(e,getMainCampaignId(e))},isCurrentAdaptiveButton=function(e){var t=getCampaignId(e);return"adaptive"===getButton(e,t).type},showAdaptiveMinimizeIcon=function(e){var t=isCurrentAdaptiveButton(e),n=isMobile$1(e)&&!isIPad(e),i=getWindowStatus(e);if(i===close)return!1;var o=!isPoppedOut(e)&&t;return o&&n&&(o=i===minimized),o},tabTextKeyMapping=(_tabTextKeyMapping={},_tabTextKeyMapping[kb]="kbWin",_tabTextKeyMapping.loading="loadingWin",_tabTextKeyMapping[login]="loginWin",_tabTextKeyMapping[offline]="offlineWin",_tabTextKeyMapping[postchat]="postWin",_tabTextKeyMapping[prechat]="preWin",_tabTextKeyMapping.ssoLogin="loginWin",_tabTextKeyMapping),getMinimizeIconText=function(e){var t=getWindowTab(e),n=languages[getLanguageTag(e)];if(t!==chat){return n[tabTextKeyMapping[t]]}var i=getChatStatus(e),o=getLanguages$1(e);if(i===waiting)return o.embeddedWindowWaitingForChat;if(i===invited)return n.invited;if(i===chatted)return o.embeddedWindowChatEnded;var a=getChattingAgentName(e);return o.embeddedWindowChattingWithOperator.replace(/{agent}/g,a)},getPreChatDepartment=function(e){if(!isPreChatEnabled(e))return"";var t=getWindowField(e,"department");if(t>0){var n=getDepartments$1(e)[t];return n?n.name:""}return""},getChattedAgents=function(e){var t=getInvolvedAgents(e),n=[];t&&t.length>0&&t.map(function(t){return getAgent(e,t)&&n.push(getAgent(e,t).name)});var i=e.window.chatBot;return i&&(n=n.concat(i.name)),n},getVisitorStatus=function(e){var t=getWindow(e),n=getWinVisitorStatus(e);return t||(n=getPageVisitorStatus(e)),n},getRestoreState=function(e,t){var n=_extends({},t.payload.window,{messages:t.payload.window.messages.map(function(e){return _extends({},e,{time:new Date(e.time)})})}),i=getSize(),o=_extends({},t.payload.page,{height:i.height,width:i.width});return _extends({},e,{configuration:t.payload.configuration,entities:t.payload.entities,page:o,window:n})},getChatWindowLink=function(e,t){var n="/ChatWindow.aspx?siteId="+e+"&planId="+t;return api$1.version&&(n+="&version="+api$1.version),n},collectCustomVariables=function(e){return e?Object.keys(e).reduce(function(t,n){try{var i=api$1.call(e[n]);if(void 0===i)return t;var o=t;return o[n]=null===i?i:i.toString(),o}catch(e){return t}},{}):null},getTimezone=function(){return(new Date).getTimezoneOffset()},getScreenResolution=function(){return screen.width+"x"+screen.height},urlPattern=/(?:www\.|(?:https?|ftp|news|rtsp|mms):\/\/)[\w$%][\w_!~*'();?:@&=+$,%#-./]*[\w_!~*'();?:@&=+$%#-]\/?/gi,telPattern=/(?:\+ ?)?\(?\d(?:[()]?[-]?[()]?\d){4,19}/,emailPattern=/^[A-Za-z0-9!#$%&'*+=?^_`{|}~-]+(?:\.[A-Za-z0-9!#$%&'*+=?^_`{|}~-]+)*@(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?$/,isEmail=function(e){return emailPattern.test(e)},americanExpress="3[4|7]\\d{2}\\s{0,1}\\d{6}\\s{0,1}\\d{1}",dinersClubAndCarteBlanche="3[0|6|8|9]\\d{3}\\s{0,1}\\d{4}\\s{0,1}\\d{1}",discover="(?:6011\\s{0,1}\\d{4}\\s{0,1}|65\\d{2}\\s{0,1}\\d{4}\\s{0,1}|622(?:(?:1\\s{0,1}2[6-9]|1\\s{0,1}[3-9]\\d|[2-8]\\d{2})\\d{2}\\s{0,1}|9\\s{0,1}2[0-5]\\d{2}\\s{0,1}|9\\s{0,1}[0-1]\\d{3}))\\d{4}\\s{0,1}",enRoute="(?:2014|2149)\\s{0,1}\\d{7}\\s{0,1}",jcb="(?:(?:3088|3096|3112|3158|3337)\\s{0,1}\\d{4}\\s{0,1}|35(?:2[89]\\s{0,1}\\d{4}\\s{0,1}|[3-8]\\d\\s{0,1}\\d{4}\\s{0,1}))\\d{4}\\s{0,1}",masterCard="5[1-5]\\d{2}\\s{0,1}\\d{4}\\s{0,1}\\d{4}\\s{0,1}",masterCard2017="2(22[1-9]|2[3-9][0-9]|[3-6]\\d{2}|7[0|1][0-9]|720)\\d{8}",visa="4\\d{8,14}",dankort="5019\\d{8}",maestro="(5[0|6-9]|6[0-9])\\d{6,13}",chinaTunion="31\\d{13}",chinaUnionPay="62|81\\d{10,13}",mir="220[0-4]\\d{8}",troy="9792[0-8][0-9]\\d{6}",replaceNumber=function(e){var t=["3[4|7]\\d{2}\\s{0,1}\\d{6}\\s{0,1}\\d{1}","3[0|6|8|9]\\d{3}\\s{0,1}\\d{4}\\s{0,1}\\d{1}","(?:6011\\s{0,1}\\d{4}\\s{0,1}|65\\d{2}\\s{0,1}\\d{4}\\s{0,1}|622(?:(?:1\\s{0,1}2[6-9]|1\\s{0,1}[3-9]\\d|[2-8]\\d{2})\\d{2}\\s{0,1}|9\\s{0,1}2[0-5]\\d{2}\\s{0,1}|9\\s{0,1}[0-1]\\d{3}))\\d{4}\\s{0,1}","(?:2014|2149)\\s{0,1}\\d{7}\\s{0,1}","(?:(?:3088|3096|3112|3158|3337)\\s{0,1}\\d{4}\\s{0,1}|35(?:2[89]\\s{0,1}\\d{4}\\s{0,1}|[3-8]\\d\\s{0,1}\\d{4}\\s{0,1}))\\d{4}\\s{0,1}","5[1-5]\\d{2}\\s{0,1}\\d{4}\\s{0,1}\\d{4}\\s{0,1}","2(22[1-9]|2[3-9][0-9]|[3-6]\\d{2}|7[0|1][0-9]|720)\\d{8}","4\\d{8,14}","5019\\d{8}","(5[0|6-9]|6[0-9])\\d{6,13}","31\\d{13}","62|81\\d{10,13}","220[0-4]\\d{8}","9792[0-8][0-9]\\d{6}"],n="^(?:"+t.join("|")+")(\\d{4})(?!\\d)",i=new RegExp(n,"g");if(e.replace(/\s/g,"").match(i)){for(var o=e.length-4,a="",r=0;r=0},useIframeSendFile=function(){return void 0===window.File},nonSystemMessage=[agentSendUrl,visitorAddTextMessage,agentAddTextMessage,agentAddTextMessageViaManualInvitation,autoInvitationMessage,"agentTyping","visitorTyping","pendingVisitorIsTyping",agentSendImage,agentSendFile,visitorSendFile,visitorSendImage,agentSendImageStart,"visitorRequestChat","systemPromoteOfflineMesage","systemStartChatbot",chatbotBadAnswer,chatbotConfidenceAnswer,chatbotGreeting,chatbotPossibleAnswer,chatbotReturnQuestionGuid,visitorText,visitorImage,visitorFile,"agentRequestSecureForm","systemIfSupportWebrtc","startChatAgain","downloadTranscript",chatbotBotSignIn,chatbotBotForm,visitorSubmitBotForm,botPrompt,botRequestLocation,visitorCancelBotForm,"systemEndChat"],ifMediaChatEnd=function(e){return isSupportWebrtc&&("systemAudioChatEnd"===e||"systemVideoChatEnd"===e||"systemAudioChatNoAnswer"===e||"systemVideoChatNoAnswer"===e||"visitorAudioChatAccept"===e||"visitorAudioChatCancelRequest"===e||"visitorAudioChatRefuse"===e||"visitorAudioChatStop"===e||"agentAudioChatAccept"===e||"agentAudioChatCancelRequest"===e||"agentAudioChatRefuse"===e||"agentAudioChatStop"===e||"visitorVideoChatAccept"===e||"visitorVideoChatCancelRequest"===e||"visitorVideoChatRefuse"===e||"visitorVideoChatStop"===e||"agentVideoChatAccept"===e||"agentVideoChatCancelRequest"===e||"agentVideoChatRefuse"===e||"agentVideoChatStop"===e)},isSystemMessage=function(e){return nonSystemMessage.indexOf(e.type)<0},getContentCss=function(e,t){return[fontCSS(t),replaceThemeColors(css,e)].join("")},genFormData=function(e){return e.filter(function(e){return"number"==typeof e.id}).reduce(function(e,t){var n,i=e;return t.type===name?i.name=t.value:t.type===email?i.email=t.value:"phone"===t.type?i.phone=t.value:"company"===t.type?i.company=t.value:"product"===t.type?i.product=t.value:"department"===t.type?i.department=t.value:"rating"===t.type?i.rating=t.value:t.type===comment?i.comment=t.value:"subject"===t.type?i.subject=t.value:"content"===t.type?i.content=t.value:"attachment"===t.type?i.attachment=t.value:"ticket"===t.type?i.ticketId=t.value:"captcha"===t.type?i.captcha=t.value:i.custom?i.custom[t.id]=t.value:i.custom=(n={},n[t.id]=t.value,n),i},{})},agentParts=function(e,t,n){return e&&{name:e.name,avatar:(n||t.showAvatar)&&e.avatar,title:t.showTitle&&e.title,bio:t.showBio&&("
 
"===e.bio?null:e.bio)}},headerTypeAgentNotChat=function(e,t){return{team:t.header.showTeam&&t.languages.teamName,avatars:t.header.showAvatars&&getAgentAvatars(e)}},headerTypeAgentChat=function(e,t,n){return{agent:agentParts(getChatAgent(e)||getChatBot(e),t.header,n)}},headerTypeBanner=function(e){return{banner:e.header.banner}},headerTypeLogoNotChat=function(e,t){return{logo:t.header.logo}},headerTypeLogoChat=function(e,t){return t.header.showAvatar||t.header.logo?{logo:t.header.logo,agent:headerTypeAgentChat(e,t).agent}:{ifViewHeaderBox:!1}},headerChat=function(e,t,n){var i=getIsChatbot(t);return"agent"===e?headerTypeAgentChat(t,n,!1):i&&"banner"===e?headerTypeAgentChat(t,n,!0):"logo"===e?headerTypeLogoChat(t,n):"banner"===e?headerTypeBanner(n):{}},headerNotChat=function(e,t,n){if("agent"===e){return"loading"===getWindow(t).tab?{}:headerTypeAgentNotChat(t,n)}return"logo"===e?headerTypeLogoNotChat(0,n):"banner"===e?headerTypeBanner(n):{}},headerParts=function(e,t,n){if(e===bubble)return{ifViewHeader:!1};var i=getWindow(t),o=hasAgentChating(t),a=n.header.type;return i.tab===chat&&(o||i.isChatBot)&&(i.chatStatus===chatting||i.chatStatus===chatted||i.chatStatus===invited&&"manualInvitation"===getRequestChatSourceType(t)||i.isChatBot)||i.tab===postchat?headerChat(a,t,n):headerNotChat(a,t,n)},getVisitorPendingMessages=memoize(1)(function(e){var t,n;if(null==e)return[];for(var i=[],o=(t={},t.audioIncoming="visitorAudioChatRefuse",t.audioChatting="visitorAudioChatStop",t.audioRequesting="visitorAudioChatCancelRequest",t.videoIncoming="visitorVideoChatRefuse",t.videoChatting="visitorVideoChatStop",t.videoRequesting="visitorVideoChatCancelRequest",t),a=(n={},n[visitorText]=visitorAddTextMessage,n[creditCardMasked]="visitorCreditCardMasked",n[pendingAudioRequesting]="visitorAudioChatRequest",n[pendingVideoRequesting]="visitorVideoChatRequest",n.pendingSubmitSecureForm="visitorSubmitSecureForm",n.pendingCancelSecureForm="visitorCancelSecureForm",n.pendingGetSecureFormFailure="visitorGetSecureFormFailure",n[pendingCobrowseAccept]="cobrowseAccept",n[pendingCobrowseStart]=cobrowseStart,n[pendingCobrowseRefuse]="cobrowseRefuse",n[pendingCobrowseNotSupport]="cobrowseNotSupport",n[pendingCobrowseBrowserNotSupport]="cobrowseBrowserNotSupport",n[pendingCobrowseEnd]="cobrowseEnd",n[pendingCobrowseHttpNotSupport]="cobrowseHttpNotSupport",n),r=e.length-1;r>=0;r-=1){var s=e[r],d=void 0;if(s.type===pendingAccept||s.type===pendingHangup){var c=s.content;s.type===pendingAccept&&(d="audioIncoming"===c?"visitorAudioChatAccept":"visitorVideoChatAccept"),s.type===pendingHangup&&(d=o[c])}else d=a[s.type];d&&i.push({type:d,guid:s.guid,sender:s.sender,content:s.content})}return i.reverse()}),getSendFileMessages=memoize(1)(function(e,t){if(null==t)return[];for(var n=[],i=t.length-1;i>=0;i-=1){var o=t[i];o.type===visitorFile&&o.content.fileUrl&&n.push({type:actionTypes.sendFile,chatGuid:e,fileName:o.content.fileName,fileUrl:o.content.fileUrl,fileGuid:o.content.fileGuid})}return n.reverse()}),isValidTextToSendOut=function(e){return!/^\s*$/.test(e)},getImageSize=function(e,t){return e/t>3.34?{height:"100%"}:e/t<.3?{width:"100%"}:e===t?{width:"100%",height:"100%"}:e>60&&t>60?e>t?{width:"100%"}:{height:"100%"}:e>t?{height:60}:e3.34?{width:200,height:60}:e/t<.3?{width:60,height:200}:e>=200&&e>t?{width:200}:t>=200&&t>e?{height:200}:null},getImageUrl=function(e,t,n,i){return t?e+"&maxWidth=200&maxHeight=200":n/i>3.34?e+"&maxHeight=60":n/i<.3?e+"&maxWidth=60":e+"&maxWidth=200&maxHeight=200"},isAfterMaxMessage=memoize(1)(function(e,t,n){return getItemIndexInArrary(n,"guid",e)>getItemIndexInArrary(n,"guid",t)}),isSentAndSeenAgentMessage=memoize(1)(function(e,t){var n=e.filter(function(e){return e.guid===t});if(n.length>0){var i=n[0];return i.type===agentAddTextMessage||i.type===agentAddTextMessageViaManualInvitation||i.type===agentSendFile||i.type===agentSendImage||i.type===agentSendImageStart}return!1}),getMaxAgentMessage=memoize(1)(function(e,t){for(var n=e.length-1;n>=0;n-=1){var i=e[n];if(i.guid===t)return t;if(i.type===agentAddTextMessage||i.type===agentAddTextMessageViaManualInvitation||i.type===agentSendFile||i.type===agentSendImage||i.type===agentSendImageStart)return i.guid}return t}),clientSideMessages=[visitorText,visitorImage,visitorFile,"systemPrompt","startChatAgain","downloadTranscript","postChatSuccess",creditCardMasked,autoInvitationMessage,"pendingVisitorIsTyping",pendingVideoRequesting,pendingAudioRequesting,pendingAccept,pendingHangup,"pendingSubmitSecureForm","pendingCancelSecureForm","pendingGetSecureFormFailure",pendingCobrowseAccept,pendingCobrowseStart,pendingCobrowseRefuse,pendingCobrowseNotSupport,pendingCobrowseBrowserNotSupport,pendingCobrowseEnd,pendingCobrowseHttpNotSupport],filterClientSideMessages=function(e){return e.filter(function(e){return e.guid&&!(clientSideMessages.indexOf(e.type)>=0)})},isImageFile=function(e){return 0===e.type.indexOf("image")},readAsDataURL=function(e){return new Promise(function(t,n){var i=new FileReader;i.onload=function(){t(i.result,e)},i.onerror=n,i.readAsDataURL(e)})},siteId=api$1.site_id,chatGroup=checkChatGroup(api$1.chatGroup),getChatButtons=function(){return api$1.chat_buttons},getCampaignIds=function(){return Array.prototype.map.call(getChatButtons(),function(e){return e.code_plan}).filter(function(e){return e}) },getChatButtonDivId=function(e){var t=Array.prototype.find.call(api$1.chat_buttons,function(t){return t.code_plan===e});if(t)return t.div_id;if(api$1.dynamic){var n=Array.prototype.find.call(api$1.chat_buttons,function(e){return null==e.code_plan});return n&&n.div_id}},openType=api$1.openType,onReadyDefinedOnPage=api$1.onReady,mainCampaignId=api$1.main_code_plan,main=function(e){return function(t,n,i){api$1.loaded||(api$1.loaded=!0,compatibleWithWordpress(api$1.chat_buttons),window.store=e({siteId:siteId,chatGroup:chatGroup,mainCampaignId:mainCampaignId,campaignIds:getCampaignIds(),isDynamicCampaign:!!api$1.dynamic,serverUrl:{url:t,standbyUrl:n,vue:i}}))}},freeGlobal="object"==("undefined"==typeof global?"undefined":_typeof(global))&&global&&global.Object===Object&&global,freeSelf="object"==("undefined"==typeof self?"undefined":_typeof(self))&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),_Symbol=root.Symbol,objectProto$1=Object.prototype,hasOwnProperty$3=objectProto$1.hasOwnProperty,nativeObjectToString=objectProto$1.toString,symToStringTag$1=_Symbol?_Symbol.toStringTag:void 0,objectProto$2=Object.prototype,nativeObjectToString$1=objectProto$2.toString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=_Symbol?_Symbol.toStringTag:void 0,getPrototype=overArg(Object.getPrototypeOf,Object),objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$2=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object),root$2;root$2="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")();var result=symbolObservablePonyfill(root$2),ActionTypes={INIT:"@@redux/INIT"},_extends$1=Object.assign||function(e){for(var t=1;t0||(currentListeners=nextListeners,nextListeners.forEach(function(e){return e()}))}return nextListeners=[],currentListeners=nextListeners,function(t,o,a){var r=e(t,o,a),s=middleware$1()(r.dispatch);return r.subscribe(i),_extends({},r,{dispatch:s,subscribe:n})}},updateConfig="config/updateConfig",setMaxMessageLength="config/setMaxMessageLength",updateServerInstanceTag="config/updateServerInstanceTag",setButtonIsOnline="page/setButtonIsOnline",updateVisitor="page/updateVisitor",showInvitation="page/showInvitation",addVisitorNavigation="addVisitorNavigation",emptyVisitorNavigation="emptyVisitorNavigation",chatWindowOpen="chatWindow/open",chatWindowPopOut="chatWindow/popOut",chatWindowPopIn="chatWindow/popIn",chatWindowShowTab="chatWindow/showTab",chatInputWarning="chatWindow/chatInputWarning",updateWindowPosition="chatWindow/update-position",toggleToolbox="chatWindow/toggle-toolbox",updateCampaign="entities/updateCampaign",updateButton="entities/updateButton",toggleButtonVisibility="entities/button/visible",updateAgent="entities/updateAgent",updateFieldsEntities="entities/updateFields",updateDepartment="entities/updateDepartment",chatToolRating="footer/chatToolRating",chatToolAudio="footer/chatToolAudio",chatToolVideo="footer/chatToolVideo",invitatonAccept="invitaton/accept",invitationRefuse="invitaton/refuse",buttonClick="page/buttonClick",setSkipPreChat="page/setSkipPreChat",updateSize="page/updateSize",updateOrientation="page/updateOrientation",updatePageVisitorStatus="page/updatePageVisitorStatus",updateUploadProgress="window/update-upload",uploadSuccess="window/sucess-file",uploadFail="window/fail-file",updateSSO="sso/updateSSO",updateMessages="window/update-messages",removeAgentIsTyping="window/remove-agent-is-typing",visitorSendText="window/sendText",visitorSendFile$1="window/sendFile",visitorSendImage$1="window/sendImage",startWaiting="window/startWaiting",startChatBot="window/startChatBot",updateChatBot="window/updateChatBot",addSystemMessage="window/addSystemMessage",updateChatIdentity="window/updateChatIdentity",updateMaxReadId="window/updateMaxReadId",updateWindowId="window/updateWindowId",closeMinimizedWindowBubble="window/closeMinimizeBubble",togglePopupBubble="window/togglePopupBubble",addPendingMessage="window/addPendingMessage",updateMaxAgentReadId="window/updateMaxAgentReadId",updateMaxVisitorReadId="window/updateMaxVisitorReadId",updateVisitorStatus="window/updateVisitorStatus",updateChatVersion="window/updateChatVersion",updateEmailToSendTranscript="window/updateEmailToSendTranscript",updateWindowStatus="page/update-window-status",toggleError="window/toggle-error",toggleWarning="window/toggle-warning",removeForm="window/removeForm",ready="app/ready",ban="app/ban",setIsActive="app/setIsActive",switchServer="app/switchServer",recoverSuccess="app/recoverSuccess",increaseRecoverTimes="app/increaseRecoverTimes",setIsRecovering="app/setIsRecovering",setLastSuccessTime="app/setLastSuccessTime",endChat$1="window/endchat",toggleFocus="window/toggleFocus",contentScrollStatusUpdate="window/contentScrollStatusUpdate",toggleDisableWindow="window/toggle-disable",sendWebAction="web/sendAction",sendPageHeartbeat="web/pageHeartbeat",sendChatHeartbeat="web/chatHeartbeat",sendPrechatHeartbeat="web/prechatHeartbeat",sendOfflineHeartbeat="web/offlineHeartbeat",sendSubmitRating="web/submitRating",sendEmailTranscript="web/emailTranscript",sendEndChat="web/endChat",sendSubmitOfflineMessage="web/submitOfflineMessage",sendSubmitPostChat="web/submitPostChat",sendSubmitPrechat="web/submitPrechat",sendSubmitSSOInfo="web/submitSSOInfo",sendSubmitSSOInfo4ChatBot="web/submitSSOInfo4ChatBot",sendSkipLogin="web/skipLogin",sendPageVisit="web/sendPageVisit",sendUpdateCurrentUrl="web/updateUrl",sendUpdateCustomVariables="web/updateCustomVariables",sendGetChatButton="web/getChatButton",sendGetConfig="web/getConfig",sendGetChatWindowConfig="web/getChatWindowConfig",sendAgentMsgSeenByVisitor="web/agentMsgSeenByVisitor",fromChatbotToAgent="web/fromChatbotToAgent",chatBotSelectQuestion$1="web/chatBotSelectQuestion",chatBotAnswerHelpful$1="web/chatBotAnswerHelpful",startChatAgain$1="web/startChatAgain",updateQueue="window/updateQueue",setVisitorIsTyping="chatinput/setVisitorIsTyping",sendChatMessages$1="window/sendChatMessages",updateVideoStatus="window/updateVideoStatus",prepareP2pChat="window/prepareP2pChat",hangupAudioVideoChat="window/hangupAudioVideoChat",acceptAudioVideoChat="window/acceptAudioVideoChat",hideAudioVideoChat="sideWindow/hideAudioVideoChat",sideWidowTabSelect="sideWindow/sideWidowTabSelect",toggleSideWindow="sideWindow/toggleSideWindow",setSideWindowTabs="sideWindow/setWindowTabs",closeKnowledgeBase="sideWindow/closeKnowledgeBase",showKnowledgeBaseInfo="sideWindow/showKnowledgeBaseInfo",replaceSideWindowTab="sideWindow/replaceSideWindowTab",setIsOpenerExists="app/setIsOpenerExists",closeWindowSliently="window/closeSliently",setFrequencyLimitState="window/setFrequencyLimitState",chatBotVisitorCancelBotForm$1="web/chatBotVisitorCancelBotForm",chatBotVisitorSubmitBotForm$1="web/chatBotVisitorSubmitBotForm",cleanPendingMessages="window/cleanPendingMessages",updateFieldValue="form/update-value",updateFieldError="form/update-error",focusField="form/focus",blurField="form/blur",submitFormStart="form/submit-start",submitFormSuccess="form/submit-success",submitFormFail="form/submit-fail",submitSocial="form/submit-social",validateAllFields="form/validate-all",updateFields="form/update",fillFieldsWithDefaultValue="form/fill-default",resetFields="form/reset",setPageCampaignId="page/setCampaignId",setWindowId="window/setId",windowMounted="window/mounted",chatbotTimeout="window/chatbotTimeout",resetMaxId="window/resetMaxId",sendGetArticles="web/getArticles",sendGetArticleByID="web/getArticleByID",getArticlesSuccess="window/success-articles",getArticleByIDSuccess="window/success-articleByID",fromKBToAgent="web/fromKBToAgent",articleClickTitile="window/articleClickTitile",getArticlesError="window/error-articles",getArticleByIDError="window/error-articleByID",updateKBConfig="window/updateKBConfig",openBotSideWindow="sideWindow/openBotSideWindow",closeBotSideWindow="sideWindow/closeBotSideWindow",cleanUpCobrowseRequest="window/cleanUpCobrowseRequest",endCobrowse="window/endCobrowse",openWebView="webView/open",closeWebView="webView/close",setWebViewLoading="webView/loading",setWebViewVisitorInfo="webView/visitorInfo",setLocation$1="web/setLocation",getVisitorInfo$1="web/getVisitorInfo",updateBotFormMessage="window/updateBotFormMessage",hideQuickReply="window/hideQuickReply",restoreState="state/restore",getRestoreState$1="state/get-restore",_stateMapping,defaultState={banned:!1},stateMapping=(_stateMapping={},_stateMapping["app/ready"]=function(e){return _extends({},e,{isReady:!0})},_stateMapping["app/ban"]=function(e){return _extends({},e,{banned:!0})},_stateMapping["app/switchServer"]=function(e,t){return _extends({},e,{server:t})},_stateMapping["app/setIsActive"]=function(e,t){return _extends({},e,{isActive:t})},_stateMapping["app/setIsOpenerExists"]=function(e,t){return _extends({},e,{isOpenerExists:t})},_stateMapping["app/recoverSuccess"]=function(e){return _extends({},e,{recoverFailTimes:0,isRecovering:!1})},_stateMapping["app/increaseRecoverTimes"]=function(e){var t=e.recoverFailTimes;return _extends({},e,{recoverFailTimes:t+1})},_stateMapping["app/setIsRecovering"]=function(e,t){return _extends({},e,{isRecovering:t})},_stateMapping["app/setLastSuccessTime"]=function(e,t){return _extends({},e,{lastSuccessTime:t})},_stateMapping),app=genReducerHandler(defaultState,stateMapping),landscape="landscape",portrait="portrait",_stateMapping$1,defaultState$1={platform:"desktop",buttons:{},windowStatus:close,dynamicCampaign:!1,campaignId:0,chatGroup:0,invitation:null,visitor:{},skipPreChat:!1,width:0,height:0,orientation:"portrait",visitorStatus:inSite},createRequestChatAction=function(e,t){return requestChat(e,{type:t.isManual?"manualInvitation":"autoInvitation",invitationId:t.id,invitationType:t.type})},stateMapping$1=(_stateMapping$1={},_stateMapping$1["page/setButtonIsOnline"]=function(e,t){var n,i,o=t.campaignId,a=t.ifOnline;if(e.buttons[o]===a)return e;var r=e.isDynamicCampaign?(n={},n[o]=a,n):_extends({},e.buttons,(i={},i[o]=a,i));return _extends({},e,{buttons:r})},_stateMapping$1[showInvitation]=function(e,t){if(t.type===embeddedWindow){var n=t.windowStatus||open;return _extends({},e,{requestChatAction:createRequestChatAction(e.campaignId,t),windowStatus:n,visitorStatus:t.isManual?"manuallyInvitedByWindow":"autoInvited"})}return t.isManual&&t.type===bubble$1?_extends({},e,{requestChatAction:createRequestChatAction(e.campaignId,t),windowStatus:minimized,visitorStatus:"manuallyInvitedByWindow"}):null==e.invitation?_extends({},e,{invitation:t,visitorStatus:t.isManual?"manuallyInvited":"autoInvited"}):e},_stateMapping$1["page/updateVisitor"]=function(e,t){var n=_extends({},e.visitor,t);return _extends({},e,{visitor:n})},_stateMapping$1["invitaton/refuse"]=function(e){return _extends({},e,{invitation:null,visitorStatus:refusedByVisitor})},_stateMapping$1["chatWindow/open"]=function(e,t){var n=t.campaignId;return _extends({},e,{windowStatus:open,invitation:null,requestChatAction:e.requestChatAction||requestChat(n,{type:"button"})})},_stateMapping$1[updateWindowStatus]=function(e,t){return _extends({},e,{windowStatus:t,invitation:t===open?null:e.invitation})},_stateMapping$1[chatWindowPopOut]=function(e){return _extends({},e,{windowStatus:close})},_stateMapping$1["invitaton/accept"]=function(e,t){var n=e.invitation;return n?_extends({},e,{invitation:null,requestChatAction:createRequestChatAction(t,n)}):e},_stateMapping$1["page/buttonClick"]=function(e,t){return _extends({},e,{invitation:null,requestChatAction:requestChat(t,{type:"button"})})},_stateMapping$1["web/startChatAgain"]=function(e){return _extends({},e,{requestChatAction:requestChat(e.requestChatAction.campaignId,{type:"button"})})},_stateMapping$1["page/setSkipPreChat"]=function(e,t){return e.skipPreChat===t?e:_extends({},e,{skipPreChat:t})},_stateMapping$1["page/updateSize"]=function(e,t){return e.width===t.width&&e.height===t.height?e:_extends({},e,t)},_stateMapping$1["window/closeMinimizeBubble"]=function(e,t,n){return n?_extends({},e,{windowStatus:close,visitorStatus:refusedByVisitor}):e},_stateMapping$1["page/updateOrientation"]=function(e,t){return e.orientation===t?e:_extends({},e,{orientation:t})},_stateMapping$1["page/setCampaignId"]=function(e,t){return e.campaignId===t?e:_extends({},e,{campaignId:t})},_stateMapping$1["page/updatePageVisitorStatus"]=function(e,t){return e.visitorStatus===t?e:_extends({},e,{visitorStatus:t})},_stateMapping$1),page=genReducerHandler(defaultState$1,stateMapping$1),_stateMapping$2,emptyEntity={entities:{},errors:{},fetchStatus:{}},defaultState$2={agents:emptyEntity,messages:emptyEntity,buttons:emptyEntity,campaigns:emptyEntity,fields:emptyEntity,departments:emptyEntity,kbArticles:emptyEntity},mergeEntity=function(e,t){var n,i,o,a=e.entities,r=e.errors,s=e.fetchStatus,d=t.id,c=t.entity,l=t.error,u=t.fetchStatus;return{entities:_extends({},a,(n={},n[d]=_extends({},a[d],c),n)),errors:_extends({},r,(i={},i[d]=l||r[d],i)),fetchStatus:_extends({},s,(o={},o[d]=u||s[d],o))}},stateMapping$2=(_stateMapping$2={},_stateMapping$2["entities/button/visible"]=function(e,t){var n=t.isHidden,i=t.campaignId,o=e.buttons.entities[i];return o?o.isHidden===n?e:_extends({},e,{buttons:mergeEntity(e.buttons,{id:i,entity:{isHidden:n}})}):e},_stateMapping$2["entities/updateFields"]=function(e,t){var n=t.fields,i=t.type,o=t.campaignId,a=n.reduce(function(e,t){var n=e;return n.entities[t.id]=t,n.errors[t.id]=null,n.fetchStatus[t.id]="done",n},{entities:_extends({},e.fields.entities),errors:_extends({},e.fields.errors),fetchStatus:_extends({},e.fields.fetchStatus)}),r=_extends({},e.campaigns.entities[o]);return r[i]=n.map(function(e){return e.id}),_extends({},e,{campaigns:mergeEntity(e.campaigns,{id:o,entity:r}),fields:a})},_stateMapping$2["entities/updateButton"]=function(e,t){return _extends({},e,{buttons:mergeEntity(e.buttons,t)})},_stateMapping$2["entities/updateCampaign"]=function(e,t){var n=t.entity;if(null==n)return _extends({},e,{campaigns:mergeEntity(e.campaigns,t)});n.prechat&&n.prechatCaptcha&&n.prechat.push({id:-1,type:"captcha",label:n.prechatCaptchaLabel,value:null,isRequired:!0});var i=["prechat","postchat","offline"],o=Array.prototype.concat.apply([],i.map(function(e){return t.entity[e]||[]})).map(function(e){return _extends({isErrorShowed:!1,isFocused:!1},e)}),a=t.entity?i.reduce(function(e,t){var n;return e[t]?_extends({},e,(n={},n[t]=e[t].map(function(e){return e.id}),n)):e},t.entity):null;return _extends({},e,{campaigns:mergeEntity(e.campaigns,_extends({},t,{entity:a})),fields:o.reduce(function(e,t){return mergeEntity(e,{id:t.id,entity:t,error:null,fetchStatus:done})},e.fields)})},_stateMapping$2["entities/updateAgent"]=function(e,t,n){var i=n.ifHideAgentName,o=n.agentDefaultName,a=t.entity,r=objectWithoutProperties(t,["entity"]);return a.name=i?o:a.name,_extends({},e,{agents:mergeEntity(e.agents,_extends({entity:a},r))})},_stateMapping$2["entities/updateDepartment"]=function(e,t){return _extends({},e,{departments:mergeEntity(e.departments,t)})},_stateMapping$2[showInvitation]=function(e,t,n){var i=t.agent,o=n.ifHideAgentName,a=n.agentDefaultName;if(i){var r=i.name,s=objectWithoutProperties(i,["name"]);return _extends({},e,{agents:mergeEntity(e.agents,{id:i.id,entity:_extends({name:o?a:r},s),fetchStatus:done})})}return e},_stateMapping$2["form/update-error"]=function(e,t){var n,i=e.fields.entities[t.id];if(i.customError===t.error&&i.isErrorShowed)return e;var o=_extends({},i,{customError:t.error,isErrorShowed:!0}),a=_extends({},e.fields,{entities:_extends({},e.fields.entities,(n={},n[t.id]=o,n))});return _extends({},e,{fields:a})},_stateMapping$2["form/update-value"]=function(e,t){var n,i=e.fields.entities[t.id];if(i.value===t.value&&i.isErrorShowed)return e;var o=_extends({},i,{value:t.value,isErrorShowed:!0,customError:""}),a=_extends({},e.fields,{entities:_extends({},e.fields.entities,(n={},n[t.id]=o,n))});return _extends({},e,{fields:a})},_stateMapping$2["form/focus"]=function(e,t){var n,i=e.fields.entities[t.id];if(!i)return e;var o=_extends({},i,{isFocused:!0}),a=_extends({},e.fields.entities,(n={},n[t.id]=o,n)),r=_extends({},e.fields,{entities:a});return _extends({},e,{fields:r})},_stateMapping$2["form/blur"]=function(e,t){var n,i=e.fields.entities[t.id],o=_extends({},i,{isErrorShowed:!0,isFocused:!1}),a=_extends({},e.fields.entities,(n={},n[t.id]=o,n)),r=_extends({},e.fields,{entities:a});return _extends({},e,{fields:r})},_stateMapping$2["form/validate-all"]=function(e,t){var n=!1,i=t.ids.reduce(function(e,t){var i=e[t],o=e;return o[t]=_extends({},i,{isErrorShowed:!0,isFocused:!n}),n=!0,o},_extends({},e.fields.entities)),o=_extends({},e.fields,{entities:i});return _extends({},e,{fields:o})},_stateMapping$2[updateMessages]=function(e,t,n){return t.reduce(function(e,t){if("agentJoinChat"!==t.type&&"agentAcceptChat"!==t.type&&"agentAcceptTransfer"!==t.type)return e;var i=t.content.agent,o=i.name,a=objectWithoutProperties(i,["name"]);return _extends({},e,{agents:mergeEntity(e.agents,{id:t.content.agent.id,entity:_extends({name:n&&n.ifHideAgentName?n.agentDefaultName:o},a),error:null,fetchStatus:done,index:Object.keys(e.agents).length})})},e)},_stateMapping$2["form/reset"]=resetFields$1,_stateMapping$2[updateWindowStatus]=function(e,t){return t!==close?e:resetFields$1(e)},_stateMapping$2[chatWindowPopOut]=function(e){return resetFields$1(e)},_stateMapping$2["window/closeMinimizeBubble"]=function(e,t,n){return n?resetFields$1(e):e},_stateMapping$2["window/success-articles"]=function(e,t){var n=t.reduce(function(e,t){var n=e;return n[t.id]=t,n},{});return _extends({},e,{kbArticles:{entities:n}})},_stateMapping$2),entities=genReducerHandler(defaultState$2,stateMapping$2),pending="pending",success="success",fail="fail",maxFileSize="maxFileSize",emptyFile="emptyFile",maxLength="maxLengh",limited="limited",maxFileCount="maxFileCount",notSupported="notSupported",kb$1="kb",bot="bot",media="media",voice="voice",bubble$2="bubble",kbSearch="kbSearch",coBrowsing="coBrowsing",ban$1=function(){return{type:"app/ban"}},switchServer$1=function(e){return{type:"app/switchServer",payload:e}},ready$1=function(){return{type:"app/ready"}},setIsOpenerExists$1=function(){return{type:"app/setIsOpenerExists"}},setIsActive$1=function(e){return{type:"app/setIsActive",payload:e}},recoverSuccess$1=function(){return{type:"app/recoverSuccess"}},increaseRecoverTimes$1=function(){return{type:"app/increaseRecoverTimes"}},setIsRecovering$1=function(e){return{type:"app/setIsRecovering",payload:e}},restoreState$1=function(e){return{type:"state/restore",payload:e}},getRestoreState$2=function(){return{type:"state/get-restore"}},setLastSuccessTime$1=function(){return{type:"app/setLastSuccessTime",payload:Date.now()}},setButtonIsOnline$1=function(e,t){return{type:"page/setButtonIsOnline",payload:{campaignId:e,ifOnline:t}}},showInvitation$1=function(e){return{type:showInvitation,payload:e}},updateVisitor$1=function(e){return{type:"page/updateVisitor",payload:e}},addVisitorNavigation$1=function(e){return{type:"addVisitorNavigation",payload:e}},emptyVisitorNavigation$1=function(){return{type:"emptyVisitorNavigation"}},invitatonAccept$1=function(e){return{type:"invitaton/accept",payload:e}},buttonClick$1=function(e){return{type:"page/buttonClick",payload:e}},invitationRefuse$1=function(){return{type:"invitaton/refuse"}},closeKnowledgeBase$1=function(){return{type:"sideWindow/closeKnowledgeBase"}},replaceSideWindowTab$1=function(e,t){return{type:"sideWindow/replaceSideWindowTab",payload:{targetTab:e,newTab:t}}},chatWindowOpen$1=function(e){return{type:"chatWindow/open",payload:{campaignId:e,isRestoreChat:arguments.length>1&&void 0!==arguments[1]&&arguments[1]}}},updateWindowStatus$1=function(e){return{type:updateWindowStatus,payload:e}},setWindowOpened=partial(updateWindowStatus$1,open),setWindowMinimized=partial(updateWindowStatus$1,minimized),closeWindow$1=partial(updateWindowStatus$1,close),setWindowRestored=partial(updateWindowStatus$1,restored),setSkipPreChat$1=function(e){return{type:"page/setSkipPreChat",payload:e}},updateSize$1=function(e){return{type:"page/updateSize",payload:e}},updateOrientation$1=function(e){return{type:"page/updateOrientation",payload:e}},setLandscape=partial(updateOrientation$1,"landscape"),setPortrait=partial(updateOrientation$1,"portrait"),setPageCampaignId$1=function(e){return{type:"page/setCampaignId",payload:e}},updatePageVisitorStatus$1=function(e){return{type:"page/updatePageVisitorStatus",payload:e}},updateConfig$1=function(e){return{type:"config/updateConfig",payload:e}},setMaxMessageLength$1=function(e){return{type:"config/setMaxMessageLength",payload:e}},updateServerInstanceTag$1=function(e){return{type:"config/updateServerInstanceTag",payload:e}},updateCampaign$1=function(e){return{type:"entities/updateCampaign",payload:e}},updateButton$1=function(e){return{type:"entities/updateButton",payload:e}},toggleButtonVisibility$1=function(e,t){return{type:"entities/button/visible",payload:{isHidden:!e,campaignId:t}}},updateAgent$1=function(e){return{type:"entities/updateAgent",payload:e}},updateDepartment$1=function(e){return{type:"entities/updateDepartment",payload:e}},updateFieldsEntities$1=function(e,t,n){return{type:"entities/updateFields",payload:{type:e,fields:t,campaignId:n}}},updateKBEntities=function(e,t){return{type:e,payload:t}},updateUploadProgress$1=function(e,t,n){return{type:"window/update-upload",payload:{name:e,percent:t,onCancel:n}}},uploadSuccess$1=function(e){return{type:"window/sucess-file",payload:e}},uploadFail$1=function(e){return{type:"window/fail-file",payload:e}},showTab=function(e){return{type:"chatWindow/showTab",payload:e}},chatWindowUpdateSSOInfo=function(e,t){return{type:"sso/updateSSO",payload:{ssoUrl:e,showPrelogin:t}}},chatWindowUpdateChatBotInfo=function(e,t){return{type:"window/updateChatBot",payload:t}},chatWindowUpdateKBConfig=function(e){return{type:"window/updateKBConfig",payload:e}},updateMessages$1=function(e){return{type:updateMessages,payload:e}},addSystemMessage$1=function(e){return{type:"window/addSystemMessage",payload:e}},visitorSendText$1=function(e,t){return{type:"window/sendText",payload:{message:e,guid:uuid(),ifCardMasking:t}}},visitorSendFile$2=function(e,t){return{type:"window/sendFile",payload:e,meta:t}},startWaiting$1=function(){return{type:"window/startWaiting"}},startChatBot4Invite$1=function(){return{type:"window/startChatBot"}},removeForm$1=function(e){return{type:"window/removeForm",payload:e}},cancelForm=removeForm$1,toggleWarning$1=function(e){return{type:"window/toggle-warning",payload:e}},toggleFocused=function(e){return{type:"window/toggleFocus",payload:e}},hideWarning=partial(toggleWarning$1,""),toggleError$1=function(e){return{type:"window/toggle-error",payload:e}},endChat$3=function(){return{type:"window/endchat"}},showError=toggleError$1,hideError=partial(toggleError$1,""),fromChatbotToAgent$1=function(){return{type:"web/fromChatbotToAgent"}},chatBotSelectQuestion$2=function(e){return{type:"web/chatBotSelectQuestion",payload:e}},chatBotAnswerHelpful$2=function(e,t,n,i,o){return{type:"web/chatBotAnswerHelpful",payload:{ifHelpful:e,actionGuid:t,intentId:n,question:i,botId:o}}},chatBotVisitorCancelBotForm$2=function(e,t,n,i){return{type:"web/chatBotVisitorCancelBotForm",payload:{formActionType:2,guid:e,intentId:t,agentId:n,botId:i,formName:""}}},chatBotVisitorSubmitBotForm$2=function(e,t,n,i,o,a,r){return{type:"web/chatBotVisitorSubmitBotForm",payload:{formActionType:0,guid:e,intentId:t,agentId:n,values:a,botId:i,question:o,message:r,formName:""}}},updateChatIdentity$1=function(e,t){return{type:"window/updateChatIdentity",payload:{chatGuid:e,serverTime:t}}},chatInputWarning$1=function(e,t){return{type:"chatWindow/chatInputWarning",payload:{type:e,params:t}}},setFrequencyLimitState$1=function(e){return{type:"window/setFrequencyLimitState",payload:e}},startChatAgain$2=function(){return{type:"web/startChatAgain"}},contentScrollStatusUpdate$1=function(e){return{type:"window/contentScrollStatusUpdate",payload:e}},toggleDisableWindow$1=function(e){return{type:"window/toggle-disable",payload:e}},disableWindow=partial(toggleDisableWindow$1,!0),enableWindow=partial(toggleDisableWindow$1,!1),chatWindowPopOut$1=function(){return{type:chatWindowPopOut}},chatWindowPopIn$1=function(){return{type:"chatWindow/popIn"}},updateQueue$1=function(e){return{type:"window/updateQueue",payload:e}},setVisitorIsTyping$1=function(e){return{type:"chatinput/setVisitorIsTyping",payload:{message:e}}},prepareP2pChat$1=function(e,t){return{type:"window/prepareP2pChat",payload:{localVideoContainer:e,remoteVideoContainer:t}}},hideAudioVideoChat$1=function(){return{type:"sideWindow/hideAudioVideoChat"}},acceptAudioVideoChat$1=function(e,t){return{type:"window/acceptAudioVideoChat",payload:{localVideoContainer:e,remoteVideoContainer:t}}},sideWidowTabSelect$1=function(e){return{type:"sideWindow/sideWidowTabSelect",payload:e}},toggleSideWindow$1=function(e){return{type:"sideWindow/toggleSideWindow",payload:e}},setWindowTabs=function(e){return{type:"sideWindow/setWindowTabs",payload:e}},updateMaxReadId$1=function(e){return{type:"window/updateMaxReadId",payload:e}},updateMaxAgentReadId$1=function(e){return{type:"window/updateMaxAgentReadId",payload:e}},agentMsgSeenByVisitor$1=function(e){return{type:"window/updateMaxVisitorReadId",payload:e}},closeMinimizedWindowBubble$1=function(){return{type:"window/closeMinimizeBubble"}},togglePopupBubble$1=function(e){return{type:"window/togglePopupBubble",payload:e}},closeWindowSliently$1=function(){return{type:"window/closeSliently"}},setWindowId$1=function(e){return{type:"window/setId",payload:e}},removeAgentIsTyping$1=function(){return{type:"window/remove-agent-is-typing"}},windowMounted$1=function(){return{type:"window/mounted"}},chatbotTimeout$1=function(e){return{type:"window/chatbotTimeout",payload:e}},resetMaxId$1=function(){return{type:"window/resetMaxId"}},fromKBToAgent$1=function(){return{type:"web/fromKBToAgent"}},articleOnClick=function(e){return{type:"window/articleClickTitile",payload:e}},getArticlesError$1=function(){return{type:"window/error-articles"}},openWebView$1=function(e){return{type:"webView/open",payload:e}},closeWebView$1=function(){return{type:"webView/close"}},setWebViewLoading$1=function(){return{type:"webView/loading"}},updateWebViewVisitorInfo=function(e){return{type:"webView/visitorInfo",payload:e}},openBotSideWindow$1=function(e,t,n,i){return{type:"sideWindow/openBotSideWindow",payload:{url:e,type:t,title:n,iframe:i}}},closeBotSideWindow$1=function(){return{type:"sideWindow/closeBotSideWindow"}},cleanUpCobrowseRequest$1=function(){return{type:"window/cleanUpCobrowseRequest"}},endCobrowseFromCrossDomain=function(){return{type:"window/endCobrowse"}},cleanPendingMessages$1=function(){return{type:"window/cleanPendingMessages"}},updateWindowPosition$1=function(e,t){return{type:"chatWindow/update-position",payload:{right:e,bottom:t}}},updatePendingMessage=function(e){return{type:"window/addPendingMessage",payload:e}},addPendingMessage$1=function(e,t){return updatePendingMessage({text:e,ifDirectlySendOut:t})},removePendingMessage=function(){return updatePendingMessage(void 0)},requestAudio=function(){return{type:"footer/chatToolAudio",payload:!0}},requestVideo=function(){return{type:"footer/chatToolVideo",payload:!0}},updateBotFormMessage$1=function(e,t){return{type:"window/updateBotFormMessage",payload:{guid:e,fieldsValue:t}}},toggleToolbox$1=function(e){return{type:"chatWindow/toggle-toolbox",payload:e}},updateVisitorStatus$1=function(e){return{type:"window/updateVisitorStatus",payload:e}},updateChatVersion$1=function(e){return{type:"window/updateChatVersion",payload:e}},updateEmailToSendTranscript$1=function(e){return{type:"window/updateEmailToSendTranscript",payload:e}},hideQuickReply$1=function(){return{type:"window/hideQuickReply"}},sendWebAction$1=function(){for(var e=arguments.length,t=Array(e),n=0;n1&&void 0!==arguments[1]&&arguments[1]}}},sendGetConfig$1=function(){return{type:"web/getConfig"}},sendGetChatWindowConfig$1=function(){return{type:"web/getChatWindowConfig"}},sendGetArticles$1=function(e){return{type:"web/getArticles",payload:e}},sendGetArticleByID$1=function(e){return{type:"web/getArticleByID",payload:e}},sendMessage=function(e,t){return{type:"window/sendChatMessages",payload:[{type:e,time:new Date,content:t,sender:{type:"visitor"},guid:uuid()}]}},acceptCobrowse=function(){ return sendMessage(pendingCobrowseAccept,uuid())},startCobrowse=function(e){return sendMessage(pendingCobrowseStart,e)},refuseCobrowse=function(){return sendMessage(pendingCobrowseRefuse)},notSupportCobrowse=function(){return sendMessage(pendingCobrowseNotSupport)},browserNotSupportCobrowse=function(){return sendMessage(pendingCobrowseBrowserNotSupport)},endCobrowse$1=function(){return sendMessage(pendingCobrowseEnd)},httpNotSupportCobrowse=function(){return sendMessage(pendingCobrowseHttpNotSupport)},sendAgentMsgSeenByVisitor$1=function(e){return{type:"web/agentMsgSeenByVisitor",payload:e}},setLocation$2=function(e){return{type:"web/setLocation",payload:e}},getVisitorInfo$2=function(){return{type:"web/getVisitorInfo"}},makeKey=function(e,t,n){return n+"_"+e+(t?"_"+t:"")},memoryCookie=function(){var e={};return{get:function(t){return e[t]||null},set:function(t,n){null!=n&&(e[t]=n)},setSession:function(t,n){e[t]=n},remove:function(t){delete e[t]}}}(),browserCookie={get:function(e){for(var t=document$2.cookie,n=t.split("; "),i=0;i2&&void 0!==arguments[2]&&arguments[2];null!==t&&(document$2.cookie=e+"="+t+";path=/;"+(n?"secure=true;":"")+"expires=Sat, 01 Jan 10000 00:00:00 GMT")},setSession:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];null!==t&&(document$2.cookie=e+"="+t+";path=/;"+(n?"secure=true;":""))},remove:function(e){document$2.cookie=e+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;"}},cookieLib=browserCookie,disableBrowserCookie=function(){cookieLib=memoryCookie},get$1=function(e){return cookieLib.get(e)},remove=function(e){return cookieLib.remove(e)},set$1=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return cookieLib.set(e,t,n)},setSession=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return cookieLib.setSession(e,t,n)},oldSession="comm100_session",oldSessionStandby="comm100standby_session",visitorId="comm100_visitor",visitorGuid="comm100_visitorguid",visitorInfo="comm100_visitor",chatInfo="comm100_chat",sessionInfo="comm100_session",pageInfo="comm100_page",cacheReturn=function(e){var t=void 0;return function(){return void 0===t&&(t=e()),t}},isPrivateBrowsing=cacheReturn(function(){var e="livechattestkey",t=global$2.sessionStorage;try{return t.setItem(e,"test"),t.removeItem(e),!1}catch(e){return e.code===DOMException.QUOTA_EXCEEDED_ERR&&0===t.length}}),memoryStorage=function(e){var t=window[e]||{};return window[e]=t,{getItem:function(e){return t[e]},setItem:function(e,n){t[e]=n.toString()},removeItem:function(e){delete t[e]}}},getSessionStorage=function(){try{return!window.sessionStorage||isPrivateBrowsing()?memoryStorage("sessionStorage"):global$2.sessionStorage}catch(e){return memoryStorage("session-storage")}},getLocalStorage=function(){try{return!window.localStorage||isPrivateBrowsing()?memoryStorage("localStorage"):global$2.localStorage}catch(e){return memoryStorage("local-storage")}},localStorage$1=getLocalStorage(),sessionStorage=getSessionStorage(),useSessionCookie=!1,setUseSessionCookie=function(e){useSessionCookie=e},toPositiveInt=function(e){return isNaN(+e)||0==+e?void 0:Math.floor(+e)},visitorIdKey=function(){return makeKey(siteId,chatGroup,"comm100_visitor")},getVisitorId=function(){return toPositiveInt(get$1(visitorIdKey()))},deleteVisitorId=function(){remove(visitorIdKey())},visitorGuidKey=function(){return makeKey(siteId,chatGroup,"comm100_visitorguid")},getVisitorGuid$2=function(){return get$1(visitorGuidKey())},setVisitorGuid=function(e){var t=useSessionCookie?setSession:set$1;e&&t(visitorGuidKey(),e)},visitorInfoKey=function(){return makeKey(siteId,chatGroup,"comm100_visitor")},localStorageSafeGetJson=function(e){try{return JSON.parse(localStorage$1.getItem(e))||{}}catch(e){return{}}},sessionStorageSafeGetJson=function(e){try{return JSON.parse(sessionStorage.getItem(e))||{}}catch(e){return{}}},getVisitorInfo$3=function(){return localStorageSafeGetJson(visitorInfoKey())},updateVisitorInfo=function(e){return localStorage$1.setItem(visitorInfoKey(),JSON.stringify(_extends({},getVisitorInfo$3(),e)))},getVisitorSessionId=function(){return localStorageSafeGetJson(visitorInfoKey()).sessionId},addNavigation=function(e){var t=localStorageSafeGetJson(visitorInfoKey()),n=t.navigation||[];localStorage$1.setItem(visitorInfoKey(),JSON.stringify(_extends({},getVisitorInfo$3(),{navigation:n.concat(e)})))},emptyNavigation=function(){return localStorage$1.setItem(visitorInfoKey(),JSON.stringify(_extends({},getVisitorInfo$3(),{navigation:[]})))},getNavigation=function(){var e=localStorageSafeGetJson(visitorInfoKey());return e.navigation?e.navigation.filter(function(e){return e}):[]},chatInfoKey=function(){return makeKey(siteId,chatGroup,"comm100_chat")},getChatInfo=function(e){var t=localStorageSafeGetJson(chatInfoKey());return t.chatGuid===e?t:{}},updateChatInfo=function(e,t){if(localStorage$1){var n=getChatInfo(e);localStorage$1.setItem(chatInfoKey(),JSON.stringify(n.chatGuid===e?_extends({},n,t):_extends({chatGuid:e},t)))}},sessionInfoKey=function(){return makeKey(siteId,chatGroup,"comm100_session")},getSessionInfo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:getVisitorGuid$2(),t=localStorageSafeGetJson(sessionInfoKey());return t.visitorGuid===e?t:{}},updateSessionInfo=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:getVisitorGuid$2(),n=getSessionInfo(t);localStorage$1.setItem(sessionInfoKey(),JSON.stringify(n.visitorGuid===t?_extends({},n,e):_extends({visitorGuid:t},e)))},pageInfoKey=function(){return makeKey(siteId,chatGroup,"comm100_page")},getPageInfo=function(){return sessionStorageSafeGetJson(pageInfoKey())},updatePageInfo=function(e){return sessionStorage&&sessionStorage.setItem(pageInfoKey(),JSON.stringify(_extends({},getPageInfo(),e)))},oldSessionIdKey=function(){return makeKey(siteId,chatGroup,"comm100_session")},oldStandbySessionIdKey=function(){return makeKey(siteId,chatGroup,"comm100standby_session")},migrateCookies=function(){remove(oldSessionIdKey()),remove(oldStandbySessionIdKey())},setMediaChatHash=function(){updatePageInfo({mediaChatHash:Date.now().toString()})},getMediaChatHash=function(){return getPageInfo().mediaChatHash},getMediaChat=function(e){return getChatInfo(e).mediaChatHash},setMediaChat=function(e){updateChatInfo(e,{mediaChatHash:getMediaChatHash()})},removeMediaChat=function(e){var t=getMediaChat(e);t&&t===getMediaChatHash()&&updateChatInfo(e,{mediaChatHash:null})},removeMediaChatWithNoCheck=function(e){updateChatInfo(e,{mediaChatHash:null}),updatePageInfo({mediaChatHash:null})},getLastChattedAgents=function(){return(getVisitorInfo$3()||{}).lastChattedAgents||[]},updateValue=function(e,t,n){return{type:"form/update-value",payload:{id:t,value:n},meta:{formType:e}}},updateError=function(e,t,n){return{type:"form/update-error",payload:{id:t,error:n},meta:{formType:e}}},focus=function(e,t){return{type:"form/focus",payload:{id:t},meta:{formType:e}}},blur=function(e,t){return{type:"form/blur",payload:{id:t},meta:{formType:e}}},submitStart=function(e){return{type:"form/submit-start",payload:e,meta:{formType:e}}},submitSuccess=function(e){return{type:"form/submit-success",payload:e,meta:{formType:e}}},submitFail=function(e){return{type:"form/submit-fail",payload:e,meta:{formType:e}}},updateFields$1=function(e,t){return{type:"form/update",payload:e,meta:t}},resetFields$2=function(e){return{type:"form/reset",meta:e}},fillFieldsWithDefaultValues=function(e){return{type:"form/fill-default",payload:e}},submitSocial$1=function(e,t){return{type:"form/submit-social",payload:t,meta:{formType:e}}},validateAll=function(e,t){return{type:"form/validate-all",payload:{ids:t},meta:{formType:e}}},submitBase=function(e,t){return function(n,i,o){return function(a){return new Promise(function(r,s){var d=o.filter(function(e){return""!==e.error});if(d.length>0){var c=d.map(function(e){return e.id});return a(validateAll(t,c)),void s(c)}var l=genFormData(o),u=getPageInfo(),p=u.popout;p&&p.ticketId&&!Number.isNaN(+p.ticketId)&&(l.ticketId=+p.ticketId),p&&p.departmentId&&!Number.isNaN(+p.departmentId)&&(l.department=+p.departmentId),a(submitStart(t)),emit(n+".submit",l),a(e(createSubmitForm(l),function(e){return new Promise(function(s){emit(n+".submit.success"),a(submitSuccess(t));var d=l;if(l.custom){var c=Object.keys(l.custom).reduce(function(e,t){var n=o.find(function(e){return e.id===+t}),i=e;return i[n.label]=l.custom[t],i},{});d=_extends({},l,{custom:c})}delete d.captcha,a(updateFields$1(d,t)),setTimeout(function(){a("offline"===t?disableWindow():resetFields$2(t)),s(e),r()},i)})},function(e){emit(n+".submit.fail",e),s(null,e)}))})}}},submitPreChat=submitBase(sendSubmitPrechat$1,"prechat"),submitPostChat$1=submitBase(sendSubmitPostChat$1,"postchat"),submitOfflineMessage$1=submitBase(sendSubmitOfflineMessage$1,"offline"),submit$1=function(e,t,n){return"prechat"===e?submitPreChat("livechat.prechat",t,n):"postchat"===e?submitPostChat$1("livechat.postChat",t,n):submitOfflineMessage$1("livechat.offlineMessage",t,n)},ms=1,seconds=1e3,minutes=6e4,networkTimeout=3e4,networkTimeoutSubmitForm=18e4,reportModeratorPeriod=6e4,checkModeratorThreadhold=2e4,customVariableCollectPeriod=1e3,closingMaxWaitTime=3e3,systemProcessingHeartbeatPeriod=2e3,customVariablesEqual=function(e,t){return e===t||(void 0===e?"undefined":_typeof(e))===(void 0===t?"undefined":_typeof(t))&&(null==e||null==t?e==t:Object.keys(e).reduce(function(n,i){return n&&e[i]===t[i]},!0)&&Object.keys(t).reduce(function(n,i){return n&&t[i]===e[i]},!0))},subMap=function(e,t){return Object.keys(e).reduce(function(n,i){if(e[i]===t[i])return n;var o=n;return o[i]=e[i],o},{})},customVariable=function(e){if(isPoppedOut(e.getState()))return null;var t=null,n=null,i=function(){if(null===t){var n=e.getState(),i=getCustomVariables$1(n),o=partial(update,e);t=setInterval(function(){var e=collectCustomVariables(i);o(e)},1e3)}},o=function(){t&&clearInterval(t),n&&clearTimeout(n),t=null,n=null},a=e.getState(),r=e.subscribe(function(){var t=e.getState();if(isBanned(t)||isInactive(t))o();else if(!isReady(a)&&isReady(t)){if(isBanned(t))return;if(null==getCustomVariables$1(t))return;i(),n=setTimeout(o,1e3*getHeartbeatStopAfter(t))}else isReady(t)&&getHeartbeatConfig(t)!==getHeartbeatConfig(a)&&(o(),i(),n=setTimeout(o,1e3*getHeartbeatStopAfter(t)));a=t});return function(){r(),o()}},dispatchGen=function(e){return function(){for(var t=arguments.length,n=Array(t),i=0;i0&&void 0!==arguments[0]?arguments[0]:getCampaignId(e.getState());return!!getButtonsNotHiddenByApi(e.getState()).find(function(e){return e.id===t})}},getButtonStatus=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:getCampaignId(e.getState());return getOnlineStatus(e.getState())[t]?"online":"offline"}},getIsSkip=function(e){return function(){return!!getIfSkipPreChat(e.getState())}},getIsSideWindowVisible=function(e){return function(){return getifShowSideWindow(e.getState())}},getFields$1=function(e,t){return function(n){var i=n;return void 0===i&&(i=getCampaignIds()[0]),getFields(t.getState(),e,i)}},getTabs=function(e){return function(){return getWindowTabItems(e.getState())}},getVisitorGuid$1=function(e){return function(){return getVisitorGuid(e.getState())}},getMaxMessageLength=function(e){return function(){return getMessageLengthLimit(e.getState())}},mapStoreToGetMapping=function(e){return{"livechat.siteId":getSiteId$1(e),"livechat.campaignIds":getCampaignIds,"livechat.isDynamicCampaign":getIsDynamicCampaign(e),"livechat.isMobile":getIsMobile(e),"livechat.button.isVisible":getIsButtonVisible(e),"livechat.button.status":getButtonStatus(e),"livechat.prechat.isSkip":getIsSkip(e),"livechat.prechat.fields":getFields$1("prechat",e),"livechat.postChat.fields":getFields$1("postchat",e),"livechat.offlineMessage.fields":getFields$1("offline",e),"livechat.sideWindow.isVisible":getIsSideWindowVisible(e),"livechat.sideWindow.tabs":getTabs(e),"livechat.visitor.guid":getVisitorGuid$1(e),"livechat.chat.maxMessageLength":getMaxMessageLength(e)}},setFields=function(e,t){return function(n,i){var o=i||getCampaignIds()[0];e.dispatch(updateFieldsEntities$1(t,n,o))}},mapStoreToSetMapping=function(e){var t=dispatchGen(e),n=t(toggleButtonVisibility$1);return{"livechat.customVariables":function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];update(e,Array.prototype.reduce.call(t,function(e,t){var n=e;return void 0===t.value?n:(n[t.name]=""+t.value,n)},{}),!1)},"livechat.button.isVisible":function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:getCampaignId(e.getState());n(t,i)},"livechat.prechat.isSkip":t(setSkipPreChat$1),"livechat.prechat.fields":setFields(e,"prechat"),"livechat.postChat.fields":setFields(e,"postchat"),"livechat.offlineMessage.fields":setFields(e,"offline"),"livechat.sideWindow.isVisible":t(toggleSideWindow$1),"livechat.sideWindow.tabs":t(setWindowTabs),"livechat.chat.maxMessageLength":t(setMaxMessageLength$1)}},submit$$1=function(e,t){return function(){return t.dispatch(submit$1(e,0,getFields(t.getState(),e,getWindowId(t.getState()))))}},mapStoreToDoMapping=function(e){function t(t,n,i){return function(){return new Promise(function(o,a){var r=e.getState();if(getChatStatus(r)!==chatting||isChattingWithBot(r))return a("not_chatting");if(!isSupportWebrtc||!1===getAgentisSupportWebrtc(r))return a("webrtc_not_supported");var s=getWindowId(r);return t(r,s)?getIsVideoAudio(r)?a("audio_video_chatting"):getIsFrequencyLimited(r)?a("frequency_limited"):(e.dispatch(i()),o()):a(n)})}}var n=dispatchGen(e),i=n(setWindowMinimized),o=n(setWindowRestored),a=n(closeWindow$1),r=n(sendEndChat$1),s=function(e){return n(partial(focus,e))},d=function(t){return function(n){var i=getInvitation(e.getState());i&&n===i.id&&t(getCampaignId(e.getState()))}},c=n(buttonClick$1,chatWindowOpen$1),l=t(getChatToolAudio,"audio_not_enabled",requestAudio),u=t(getChatToolVideo,"video_not_enabled",requestVideo);return{"livechat.button.click":function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:getCampaignId(e.getState());return c(t)},"livechat.invitation.accept":d(n(invitatonAccept$1,chatWindowOpen$1)),"livechat.invitation.refuse":d(n(invitationRefuse$1)),"livechat.prechat.minimize":i,"livechat.chat.minimize":i,"livechat.postChat.minimize":i,"livechat.offlineMessage.minimize":i,"livechat.prechat.restore":o,"livechat.chat.restore":o,"livechat.postChat.restore":o,"livechat.offlineMessage.restore":o,"livechat.prechat.close":a,"livechat.chat.close":a,"livechat.postChat.close":a,"livechat.offlineMessage.close":a,"livechat.chat.endChat":r,"livechat.prechat.field.focus":s("prechat"),"livechat.postChat.field.focus":s("postchat"),"livechat.offlineMessage.field.focus":s("offline"),"livechat.prechat.submit":submit$$1("prechat",e),"livechat.postChat.submit":submit$$1("postchat",e),"livechat.offlineMessage.submit":submit$$1("offline",e),"livechat.sideWindow.tabs.click":n(sideWidowTabSelect$1),"livechat.chat.audio.request":l,"livechat.chat.video.request":u}},render$2={},getRender=function(){return render$2},cache={},emit=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:getCampaignId(e.getState());return a(n)}),deprecateWarning("set_custom_variables",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return update(e,Array.prototype.reduce.call(t,function(e,t){var n=e;return n[t.name]=""+t.value,n},{}),!1)}),api$1.setCustomVariables=api$1.set_custom_variables;var r=e.getState(),s=e.subscribe(function(){if(!isReady(r)){var t=e.getState();isReady(t)&&(s(),onReady()),r=t}});return function(){delete api$1.get,delete api$1.set,delete api$1.do,delete api$1.render,delete api$1.on,s()}},text$3="text",image$1="image",video$1="video",button$1="button",quickReply="quickReply",file="file",complex="complex",loading$1="loading",ssoLogin$1="ssoLogin",location$2="location",customVariableLogin="customVariableLogin",link="link",botForm="botForm",_stateMapping$3,defaultState$3=null,ifActiveMediaChatWindow=function(e){var t=getMediaChat(e);return t?t===getMediaChatHash():(setMediaChat(e),!0)},insertMessage=function(e,t){return e.concat(t)},replace=function(e,t,n){for(var i=0;i0){if(r[0].type===autoInvitationMessage&&!r.find(function(e){return"chatbotJoinChat"===e.type}))return r.map(function(e,t){return 0===t?_extends({},e,{type:agentAddTextMessage,id:s.id},s):e});var h=r.filter(function(e){return"agentTyping"!==e.type});return insertMessage(h,s)}if("chatbotSetAnswerIfHelpful"===s.type){var f=r.map(function(e){return e.type===chatbotConfidenceAnswer&&e.content.GUID===s.content.guid?_extends({},e,{disableRate:!0,visitorRate:s.content.visitorRate}):e});return insertMessage(f,s)}return insertMessage(r,s)}},exist=function(e,t){return e.messages.filter(function(e){return e.type===t}).length>0},appendMessage=function(e){return function(t,n){var i=t.messages.concat({type:e,time:new Date,guid:n.guid,content:n.message||"",sender:{type:"visitor"}});return n.ifCardMasking&&(i=i.concat({type:creditCardMasked,time:new Date,guid:n.guid,content:"",sender:{type:"visitor"}})),_extends({},t,{messages:i})}},appendFileUploadMessage=function(e){return function(t,n){var i=removeBotLoadingAnswers(t.messages);return _extends({},t,{isUploading:!0,error:"",warning:"",messages:i.concat({type:e,time:new Date,content:{fileName:n.name,percent:0,onCancel:void 0},sender:{type:"visitor"}}),quickReply:null})}},startChatting=function(e,t){getMediaChatHash()||setMediaChatHash();var n=e.involvedAgents||[];return n.filter(function(e){return e===t}).length>0?_extends({},e,{chatStatus:chatting,visitorStatus:chatting$1}):(n=(e.involvedAgents||[]).concat([t]),_extends({},e,{involvedAgents:n,chatStatus:chatting,isChatBot:!1,webView:null,quickReply:null,visitorStatus:chatting$1}))},startChatBot$1=function(e,t){return _extends({},e,{isChatBot:!0,chatBot:_extends({},e.chatBot,function(){var e=t.content.bot;return e&&e.avatar&&-1!==e.avatar.indexOf("|")?(e.avatar=e.avatar.split("|")[1],e):e}()),chatStatus:chatting,visitorStatus:chatting$1})},startChatBot4Invite=function(e){return _extends({},e,{isChatBot:!0,chatStatus:chatting,messages:e.messages.filter(function(e){return"system"===e.sender.type}),maxId:-1,visitorStatus:chatting$1})},updateWindowField=function(e,t,n){var i=e.fields||{};return i[t]=n,{fields:i}},selectSideWindowItem=function(e,t){var n=e.disPlayPriority+1;e.sideWindowItems.some(function(e){var i=e.id===t;return i&&(e.disPlayPriority=n),i});var i="bubble"===t||"kbSearch"===t;return{sideWindowSelectedTab:t,disPlayPriority:n,showChatWindowInSidewindow:i,isFocused:i}},replaceSideWindowItem=function(e,t,n){var i=e.sideWindowItems;i&&i.some(function(e){var i=e.id===t;return i&&(e.id=n),i});var o=e.sideWindowSelectedTab;return{sideWindowItems:i,sideWindowSelectedTab:o===t?n:o}},addSideWindowItem=function(e,t){var n=e.disPlayPriority;n?n+=1:n=0;var i=e.sideWindowItems;return i&&i.some(function(e){var i=e.id===t.id;return i&&(e.disPlayPriority=n),i})?{sideWindowSelectedTab:t.id,showChatWindowInSidewindow:!1,isFocused:!1,disPlayPriority:n}:(t.disPlayPriority=n,i&&0!==i.length||(i=[],isMobile$$1()&&i.push({id:e.tab===kb?"kbSearch":"bubble",isSystem:!0,disPlayPriority:0})),i.push(t),{sideWindowItems:i,sideWindowSelectedTab:t.id,showChatWindowInSidewindow:!1,isFocused:!1,disPlayPriority:n})},removeSideWindowItem=function(e,t){var n=e.sideWindowItems;if(n){var i=-1;n.some(function(e,n){var o=e.id===t;return o&&(i=n),o});var o={};if(i>-1)return 1===n.length||2===n.length&&isMobile$$1()?(o.sideWindowSelectedTab=void 0,o.disPlayPriority=0,n=[]):e.sideWindowSelectedTab===t?(n.splice(i,1),o.sideWindowSelectedTab=n.reduce(function(e,t){return e.disPlayPriority>t.disPlayPriority?e:t}).id,"bubble"===o.sideWindowSelectedTab||"kbSearch"===o.sideWindowSelectedTab?(o.showChatWindowInSidewindow=!0,o.isFocused=!0,o.maxReadId=Math.max(e.maxReadId,e.maxId)):(o.showChatWindowInSidewindow=!1,o.isFocused=!1)):n.splice(i,1),o.sideWindowItems=n,o}return{}},updateSideWindowSystemItem=function(e,t,n){return t?addSideWindowItem(e,{id:n,isSystem:!0}):removeSideWindowItem(e,n)},updateVideoStatus$1=function(e,t){return _extends({},e,updateSideWindowSystemItem(e,"videoRequesting"===t.status||"videoIncoming"===t.status||"videoChatting"===t.status,"media"),updateSideWindowSystemItem(e,"audioRequesting"===t.status||"audioIncoming"===t.status||"audioChatting"===t.status,"voice"),{vChatStatus:t.status,audioVideoChatStartTime:t.startTime||0,audio_video_disabled:"notStart"!==t.status})},stop=function(e){return _extends({},updateVideoStatus$1(e,{status:"notStart",startTime:0}),{audioVideoAgentId:0})},endChat$2=function(e){var t=getLocalStorage();if(t.removeItem("pushpage_list"),t.removeItem("botConfidenceAnswerLoading_list"),!e)return e;var n=disableBotAnswers(e.messages.filter(messageFilter$1),!1);return _extends({},e,updateSideWindowSystemItem(e,!1,"kb"),updateSideWindowSystemItem(e,!1,"bot"),{disPlayPriority:0,chatStatus:chatted,autoEjectTranscript:!0,error:"",warning:"",messages:n,webView:null,quickReply:null,visitorStatus:chatEnded})},handlerVideoMessage=function(e,t){return ifActiveMediaChatWindow(e.chatGuid)?t():e},checkRateDisable=function(e){var t=e.messages.map(function(t){return t.type!==chatbotConfidenceAnswer||e.chatStatus===chatting&&e.isChatBot?t:_extends({},t,{disableRate:!0})});return _extends({},e,{messages:t})},updateCobrowsingStatus=function(e){return function(t,n){if(t.cobrowsing===e)return t;var i="requesting"===e,o="running"===e?n.content.sessionCode:void 0,a="running"===e?n.content.groupId:void 0,r="running"!==e?void 0:t.cobrowseCallId,s="requesting"===e?n.sender.id:0;return _extends({},t,updateSideWindowSystemItem(t,i,"coBrowsing"),{cobrowsing:e,cobrowseSessionCode:o,cobrowseGroupId:a,cobrowseAgent:s,cobrowseCallId:r})}},updateWebView=function(){return function(e,t){return e.webView&&e.webView.content&&e.webView.content.GUID&&t.content.GUID===e.webView.content.GUID?_extends({},e,{webView:_extends({},e.webView,{success:!0})}):e}},closeSigninWebView=function(){return function(e,t){if(e.webView&&"customVariableLogin"===e.webView.type){var n=e.messages.filter(function(e){return e.content.GUID===t.content.GUID&&e.type===chatbotBotSignIn});if(n.length>0&&1!==n[0].content.signInType)return _extends({},e,{webView:null})}return e}},updateQuickReply=function(){return function(e,t){if(t.type===botPrompt){var n=closeSigninWebView()(e,t);if(t.content.options&&t.content.options.length>0)return _extends({},n,{quickReply:{items:t.content.options.map(function(e){return{type:"text",name:e.label}}),botId:t.content.botId,agentId:t.content.agentId},isVisibleInputAreaWhenBotChatting:!0})}if(t.type===chatbotBadAnswer&&t.content.textChatWithAgent)return _extends({},e,{quickReply:{items:[{type:"contactAgent",name:t.content.textChatWithAgent}],contactAgentText:t.content.textChatWithAgent},isVisibleInputAreaWhenBotChatting:!0});if(t.type===chatbotConfidenceAnswer||t.type===chatbotGreeting){var i=e;if(t.type===chatbotConfidenceAnswer&&(i=closeSigninWebView()(e,t)),t.content.intentAnswers&&t.content.intentAnswers.length>0){var o=null,a=t.content.intentAnswers.filter(function(e){return"quickReply"===e.type});if(a.length>0&&(o=a[a.length-1]),o&&o.content&&o.content.quickReplyItems&&o.content.quickReplyItems.length>0)return _extends({},i,{quickReply:{items:o.content.quickReplyItems,contactAgentText:t.content.ifAgentOnline?o.content.agentOnlineText:o.content.agentOfflineText,botId:t.content.botId,agentId:t.content.agentId},isVisibleInputAreaWhenBotChatting:o.isAllowUseInputArea})}}return _extends({},e,{quickReply:null,isVisibleInputAreaWhenBotChatting:!0})}},handleMessage=function(e,t,n,i){var o,a=(o={},o.agentAcceptChat=function(e){return _extends({},startChatting(e,t.content.agent.id),{webView:null})},o.agentJoinChat=function(e){return startChatting(e,t.content.agent.id)},o.agentAcceptTransfer=function(e){return e.involvedAgents?e.involvedAgents.indexOf(t.sender.id)>=0?e:_extends({},e,{involvedAgents:e.involvedAgents.concat(t.sender.id)}):e},o.agentEndChat=function(e){var n=e.involvedAgents||[];return n.length<=1?e:_extends({},e,{involvedAgents:n.filter(function(e){return e!==t.sender.id})})},o.agentRefuseChat=function(e){return _extends({},e,updateSideWindowSystemItem(e,!1,"kb"),{chatStatus:chatted,visitorStatus:"refusedByOperator"})},o[visitorAddTextMessage]=function(e){return _extends({},e,{quickReply:null,isVisibleInputAreaWhenBotChatting:!0})},o.systemEndChat=function(t){var o=n.postchat;return o?o.every(function(t){var n=i[t].type;return"rating"===n?e.fields.rating:n===comment&&e.fields.comment})?endChat$2(t):_extends({},t,{error:""},updateSideWindowSystemItem(t,!1,"kb"),{chatStatus:chatted, tab:postchat,quickReply:null,webView:null,visitorStatus:chatEnded}):endChat$2(t)},o.visitorRequestChat=function(e){return _extends({},e,{chatStatus:waiting,quickReply:null,webView:null,visitorStatus:waitingForChat})},o.visitorRequestChatExceedChatQueueLimit=function(e){return _extends({},e,{chatStatus:waiting,quickReply:null,webView:null,visitorStatus:waitingForChat})},o.chatbotJoinChat=function(e,t){return startChatBot$1(e,t)},o.visitorVideoChatRequest=function(e){return handlerVideoMessage(e,function(){return updateVideoStatus$1(e,{status:"videoRequesting"})})},o.visitorVideoChatAccept=function(e,t){return handlerVideoMessage(e,function(){return updateVideoStatus$1(e,{status:"videoChatting",startTime:t.time-e.timeDelay})})},o.visitorAudioChatRequest=function(e){return handlerVideoMessage(e,function(){return updateVideoStatus$1(e,{status:"audioRequesting"})})},o.visitorAudioChatAccept=function(e,t){return handlerVideoMessage(e,function(){return updateVideoStatus$1(e,{status:"audioChatting",startTime:t.time-e.timeDelay})})},o.agentVideoChatRequest=function(e,t){return"notStart"!==e.vChatStatus?e:handlerVideoMessage(e,function(){return _extends({},updateVideoStatus$1(e,{status:"videoIncoming"}),{audioVideoAgentId:t.sender.id})})},o.agentVideoChatAccept=function(e,t){return handlerVideoMessage(e,function(){return _extends({},updateVideoStatus$1(e,{status:"videoChatting",startTime:t.time-e.timeDelay}),{audioVideoAgentId:t.sender.id})})},o.agentAudioChatRequest=function(e,t){return"notStart"!==e.vChatStatus?e:handlerVideoMessage(e,function(){return _extends({},updateVideoStatus$1(e,{status:"audioIncoming"}),{audioVideoAgentId:t.sender.id})})},o.agentAudioChatAccept=function(e,t){return handlerVideoMessage(e,function(){return _extends({},updateVideoStatus$1(e,{status:"audioChatting",startTime:t.time-e.timeDelay}),{audioVideoAgentId:t.sender.id})})},o.agentVideoChatCancelRequest=stop,o.agentVideoChatRefuse=stop,o.agentVideoChatStop=stop,o.agentAudioChatStop=stop,o.agentAudioChatRefuse=stop,o.agentAudioChatCancelRequest=stop,o.systemAudioChatNoAnswer=stop,o.systemAudioChatEnd=stop,o.systemVideoChatNoAnswer=stop,o.systemVideoChatEnd=stop,o.visitorAudioChatCancelRequest=stop,o.visitorAudioChatRefuse=stop,o.visitorAudioChatStop=stop,o.visitorVideoChatCancelRequest=stop,o.visitorVideoChatRefuse=stop,o.visitorVideoChatStop=stop,o.agentTyping=function(e){return e.limitClockerCount>0?_extends({},e,{warning:"",limitClockerCount:0,stopLimitClocker:!0}):e},o.cobrowseRequest=updateCobrowsingStatus("requesting"),o.cobrowseEnd=updateCobrowsingStatus("none"),o.cobrowseNotSupport=updateCobrowsingStatus("none"),o.cobrowseBrowserNotSupport=updateCobrowsingStatus("none"),o.cobrowseHttpNotSupport=updateCobrowsingStatus("none"),o.cobrowseCancel=updateCobrowsingStatus("none"),o.cobrowseNoAnswer=updateCobrowsingStatus("none"),o.cobrowseRefuse=updateCobrowsingStatus("none"),o.cobrowseAccept=updateCobrowsingStatus("running"),o[cobrowseStart]=function(){var n=t.content;return _extends({},e,{cobrowseCallId:n})},o[chatbotConfidenceAnswer]=updateQuickReply(),o[botPrompt]=updateQuickReply(),o[chatbotBadAnswer]=updateQuickReply(),o[chatbotGreeting]=updateQuickReply(),o[visitorSubmitBotForm]=updateWebView(),o[botRequestLocation]=closeSigninWebView(),o[chatbotBotForm]=closeSigninWebView(),o[agentAddTextMessageViaManualInvitation]=function(e){return _extends({},e,{visitorStatus:"manuallyInvitedByWindow"})},o),r=a[t.type],s=e;return r&&(s=r(e,t)),s.isFocused&&(s=_extends({},s,{maxReadId:Math.max(e.maxReadId,e.maxId)})),s},newWindow=function(e){return _extends({fields:{name:"",email:"",phone:"",company:"",product:"",department:void 0,ticketId:void 0,custom:{}},forms:{prechat:"none",postchat:"none",offline:"none"},chatStatus:"none",messages:[],sourceMessages:[],maxId:-1,involvedAgents:[],draft:"",maxReadId:-1,isFocused:!1,isFrequencyLimited:!1,showPrelogin:!1,ssoUrl:"",queue:{},error:"",warning:"",fileUploadCount:0,disabled:!1,vChatStatus:"notStart",audioVideoChatStartTime:0,stopLimitClocker:!1,limitClockerCount:0,popupBubble:!1,cobrowsing:"none",cobrowseAgent:0,bottom:0,right:0,pendingMessage:void 0,maxAgentReadId:"",maxVisitorReadId:"",showToolbox:!1,visitorStatus:inSite,chatVersion:""},e)},newWindowFromInvitation=function(e,t,n,i){var o=t.isManual,a=o&&(t.type===bubble$1||t.type===embeddedWindow),r=t.chat,s="autoInvited";return o&&(s=a?"manuallyInvitedByWindow":"manuallyInvited"),newWindow({id:e,tab:chat,chatStatus:invited,chatGuid:r&&r.guid,right:n,bottom:i,messages:a?[]:[{id:-1,time:new Date,type:autoInvitationMessage,sender:{id:t.agent?t.agent.id:0,type:"agent"},content:t.text,guid:uuid()}],sourceMessages:[],involvedAgents:t.agent?[t.agent.id]:[],visitorStatus:s})},existMessages=memoize$1(1)(function(e,t){return e.find(function(e){return e.guid===t.guid})}),stateMapping$3=(_stateMapping$3={},_stateMapping$3["window/addPendingMessage"]=function(e,t){return _extends({},e,{pendingMessage:t})},_stateMapping$3["chatWindow/open"]=function(e,t,n){var i=t.campaignId,o=n.right,a=n.bottom;return newWindow({id:i,tab:"loading",right:o,bottom:a})},_stateMapping$3["web/startChatAgain"]=function(e){return newWindow({id:e.id,tab:"loading",right:e.right,bottom:e.bottom})},_stateMapping$3[showInvitation]=function(e,t,n){var i=n.campaignId,o=n.right,a=n.bottom;return e||(t.type===embeddedWindow||t.type===bubble$1&&t.isManual?newWindowFromInvitation(i,t,o,a):e)},_stateMapping$3["chatWindow/update-position"]=function(e,t){return _extends({},e,{right:t.right,bottom:t.bottom})},_stateMapping$3["page/updateSize"]=function(e){return e?_extends({},e,{right:0,bottom:0}):e},_stateMapping$3["sso/updateSSO"]=function(e,t){return _extends({},e,t)},_stateMapping$3["window/updateChatBot"]=function(e,t){return _extends({},e,{chatBot:function(){var e=t;return e&&e.avatar&&-1!==e.avatar.indexOf("|")?(e.avatar=e.avatar.split("|")[1],e):e}()})},_stateMapping$3["window/updateKBConfig"]=function(e,t){return _extends({},e,{kbConfig:t})},_stateMapping$3[updateMessages]=function(e,t,n){var i=n.campaign,o=n.fields,a=n.downloadUrl,r=t.filter(function(t){return!existMessages(e.sourceMessages,t)}),s=t.find(function(e){return"visitorTyping"===e.type}),d=e.visitorTyping;s&&(d=!1);var c=t[t.length-1].guid,l=t.find(function(e){return"visitorRequestChat"===e.type})&&e.messages.find(function(e){return"visitorRequestChat"===e.type}),u=t.find(function(e){return"systemPromoteOfflineMesage"===e.type})&&e.messages.find(function(e){return"systemPromoteOfflineMesage"===e.type}),p=t.filter(function(e){var t=(void 0===e.id||existMessages(r,e))&&"visitorTyping"!==e.type;return(!t||!l||"visitorRequestChat"!==e.type)&&((!t||!u||"systemPromoteOfflineMesage"!==e.type)&&("botConfirmForm"!==e.type&&"visitorConfirmBotForm"!==e.type&&"agentAttachTicketFail"!==e.type&&t))}),h=p.reduce(messageHandler(i.languages,e.timeDelay||0,a),e.messages);if(h!==e.messages){var f=h.filter(function(e){return e.type===visitorImage||e.type===visitorFile});if(f.length>0){h=h.filter(function(e){return e.type!==visitorImage&&e.type!==visitorFile}).concat(f)}var g=p.reduce(function(e,t){return handleMessage(e,t,i,o)},_extends({},e,{messages:h,sourceMessages:e.sourceMessages.concat(r),visitorTyping:d,maxId:Math.max(e.maxId,t[t.length-1].id),chatVersion:c}));return g=checkRateDisable(g)}return d!==e.visitorTyping?_extends({},e,{visitorTyping:d,sourceMessages:e.sourceMessages.concat(r),maxId:Math.max(e.maxId,t[t.length-1].id),chatVersion:c}):_extends({},e,{sourceMessages:e.sourceMessages.concat(r),maxId:Math.max(e.maxId,t[t.length-1].id),chatVersion:c})},_stateMapping$3["window/sendText"]=function(e,t){var n=appendMessage(visitorText)(e,t),i=removeBotLoadingAnswers(n.messages);return _extends({},n,{messages:i,visitorTyping:!1,draft:"",quickReply:null})},_stateMapping$3["window/sendImage"]=appendFileUploadMessage(visitorImage),_stateMapping$3["window/sendFile"]=appendFileUploadMessage(visitorFile),_stateMapping$3["chatinput/setVisitorIsTyping"]=function(e,t){var n=_extends({},e);return e.chatStatus!==chatting?n:e.chatStatus===chatting&&e.isChatBot?n:(n.visitorTyping=!0,n.draft=t.message,n)},_stateMapping$3["window/update-upload"]=function(e,t){var n=!1,i=e.messages.map(function(e){return e.type===visitorFile||e.type===visitorImage?(n=!0,_extends({},e,{content:_extends({},e.content,{fileName:t.name,percent:t.percent,onCancel:t.onCancel})})):e});return n?_extends({},e,{messages:i}):e},_stateMapping$3["window/fail-file"]=function(e,t){var n=e.messages.filter(function(e){return e.type!==visitorFile&&e.type!==visitorImage}),i="";return"string"==typeof t?i=t:"object"===(void 0===t?"undefined":_typeof(t))&&null!==t&&(i=t.message||""),e.chatStatus===chatted&&(i=""),_extends({},e,{messages:n,error:i,isUploading:!1})},_stateMapping$3["window/sucess-file"]=function(e,t){var n=e.messages.map(function(e){return e.type===visitorFile||e.type===visitorImage?_extends({},e,{content:_extends({},e.content,{fileName:t.name,fileGuid:t.guid,fileUrl:t.url,percent:t.percent,onCancel:t.onCancel})}):e});return _extends({},e,{error:"",isUploading:!1,fileUploadCount:e.fileUploadCount+1,messages:n})},_stateMapping$3["form/submit-start"]=function(e,t){var n;return _extends({},e,{forms:_extends({},e.forms,(n={},n[t]="pending",n)),error:"",warning:""})},_stateMapping$3["form/submit-success"]=function(e,t,n){var i;return _extends({},e,{autoEjectTranscript:"postchat"===t,forms:_extends({},e.forms,(i={},i[t]="success",i)),messages:"postchat"!==t?e.messages:e.messages.concat({type:"postChatSuccess",content:n.eventRatingSubmitSuccess,sender:{type:"system"},guid:uuid()})})},_stateMapping$3["window/addSystemMessage"]=function(e,t){return _extends({},e,{messages:e.messages.concat([{type:"systemPrompt",sender:{type:"system"},content:t,guid:uuid()}])})},_stateMapping$3["form/submit-fail"]=function(e,t){var n;return _extends({},e,{forms:_extends({},e.forms,(n={},n[t]="fail",n))})},_stateMapping$3["form/update"]=function(e,t){var n=void 0;if(t.custom){var i=_extends({},e.fields.custom,t.custom);n=_extends({},e.fields,t,{custom:i})}else n=_extends({},e.fields,t);return _extends({},e,{fields:n})},_stateMapping$3["form/fill-default"]=function(e,t){var n=e.fields.custom;t.custom&&(n=_extends({},e.fields.custom,t.custom),Object.keys(e.fields.custom).forEach(function(t){e.fields.custom[t]&&(n[t]=e.fields.custom[t])}));var i=_extends({},e.fields,t,{custom:n});return Object.keys(e.fields).forEach(function(t){"custom"!==t&&e.fields[t]&&(i[t]=e.fields[t])}),_extends({},e,{fields:i})},_stateMapping$3["chatWindow/showTab"]=function(e,t,n){var i=e.visitorStatus;t===offline&&(i="offlineMessage");var o=_extends({},e,{tab:t,visitorStatus:i});if(t===offline&&n){var a=o.messages.filter(function(e){return e.type===visitorAddTextMessage}).map(function(e){return e.content}).join(",");o=_extends({},o,{fields:_extends({},o.fields,{content:a})})}return o},_stateMapping$3["window/startWaiting"]=function(e){return _extends({},e,{chatStatus:waiting,allowWaitingSendMessage:e.isChatBot||e.chatStatus===invited})},_stateMapping$3["window/removeForm"]=function(e,t){return _extends({},e,{messages:e.messages.map(function(e){return"agentRequestSecureForm"!==e.type?e:e.content.url.indexOf("otk="+t)>0?_extends({},e,{isHidden:!0}):e})})},_stateMapping$3["window/startChatBot"]=function(e){return startChatBot4Invite(e)},_stateMapping$3["window/toggle-error"]=function(e,t){return e&&e.error!==t?_extends({},e,{error:t}):e},_stateMapping$3["window/toggle-warning"]=function(e,t){return e&&e.warning!==t?_extends({},e,{warning:t,stopLimitClocker:""===t||e.stopLimitClocker,limitClockerCount:""===t?0:e.limitClockerCount}):e},_stateMapping$3["window/endchat"]=endChat$2,_stateMapping$3["window/updateChatIdentity"]=function(e,t){var n=0;return t.serverTime>0&&(n=getServerTimeDelay(t.serverTime)),_extends({},e,{chatGuid:t.chatGuid,requestTime:t.serverTime,timeDelay:n})},_stateMapping$3["window/toggleFocus"]=function(e,t){return null==e?e:e.isFocused===t?e:_extends({},e,{isFocused:t,maxReadId:t?Math.max(e.maxId,e.maxReadId):e.maxReadId})},_stateMapping$3[updateWindowStatus]=function(e,t){return t===close?null:t===minimized?_extends({},e,{isFocused:!1,maxReadId:Math.max(e.maxId,e.maxReadId)}):(t===restored&&isIE&&emit("livechat.chatwindow.restore"),t===open||t===restored?_extends({},e,{isFocused:!0,maxReadId:Math.max(e.maxId,e.maxReadId)}):e)},_stateMapping$3["window/contentScrollStatusUpdate"]=function(e,t){return _extends({},e,{ifHideBio:t})},_stateMapping$3["web/chatBotAnswerHelpful"]=function(e,t){if(e.chatStatus===chatting&&e.isChatBot){var n=e.messages.map(function(e){return e.type===chatbotConfidenceAnswer&&e.content.GUID===t.actionGuid?_extends({},e,{disableRate:!0}):e});return _extends({},e,{messages:n})}return e},_stateMapping$3["chatWindow/chatInputWarning"]=function(e,t,n){var i,o=n.maxLength,a=n.languages,r=(i={},i.maxLengh=function(){return a.promptInputLimit.replace(defaultMaxMessageLength,o)},i.emptyFile=function(){return"File must not be empty."},i.maxFileSize=function(){return a.promptFileSizeExceed.replace("{fileSize}",t.params.fileSize)},i.limited=function(){return"You're sending messages too frequently. Please wait for "+t.params.seconds+" second(s) and try again."},i.maxFileCount=function(){return a.promptSendFileCountLimit.replace("{fileCount}",t.params.fileCount)},i.notSupported=function(){return"This file type is not supported."},i);return"limited"===t.type&&t.params.fromClocker&&e.stopLimitClocker?e:"limited"===t.type&&e.limitClockerCount>=10?_extends({},e,{warning:"",limitClockerCount:0,stopLimitClocker:!0}):r[t.type]?_extends({},e,{warning:r[t.type](),stopLimitClocker:"limited"!==t.type&&e.stopLimitClocker,limitClockerCount:"limited"===t.type?e.limitClockerCount+1:e.limitClockerCount}):e},_stateMapping$3["web/fromChatbotToAgent"]=function(e){var t=e.messages;return t[0].type===autoInvitationMessage&&(t=t.map(function(e,t){return 0===t?_extends({},e,{type:agentAddTextMessage}):e})),_extends({},e,{chatWithAgentClicked:!0,messages:t,webView:null,quickReply:null})},_stateMapping$3["window/toggle-disable"]=function(e,t){return t===e.disabled?e:_extends({},e,{disabled:t})},_stateMapping$3[chatWindowPopOut]=function(){return null},_stateMapping$3["window/updateQueue"]=function(e,t){return 0===t.position&&0===t.waitTime?e:_extends({},e,{queue:{position:t.position,waitTime:Math.ceil(t.waitTime/60)}})},_stateMapping$3["window/updateVideoStatus"]=updateVideoStatus$1,_stateMapping$3["footer/chatToolVideo"]=function(e,t){return _extends({},e,{showChatWindowInSidewindow:e.showChatWindowInSidewindow&&!t,maxReadId:e.showChatWindowInSidewindow&&!t?Math.max(e.maxReadId,e.maxId):e.maxReadId,audio_video_disabled:!0,isFocused:e.showChatWindowInSidewindow&&!t})},_stateMapping$3["footer/chatToolAudio"]=function(e,t){return _extends({},e,{showChatWindowInSidewindow:e.showChatWindowInSidewindow&&!t,maxReadId:e.showChatWindowInSidewindow&&!t?Math.max(e.maxReadId,e.maxId):e.maxReadId,audio_video_disabled:!0,isFocused:e.showChatWindowInSidewindow&&!t})},_stateMapping$3["footer/chatToolRating"]=function(e,t){var n=_extends({},e.fields,{rating:t.score,comment:t.comment});return _extends({},e,{fields:n})},_stateMapping$3["window/sendChatMessages"]=function(e,t){var n=[];return t.forEach(function(t){(t.type!==pendingAccept||exist(e,pendingAccept))&&(t.type!==pendingHangup||exist(e,pendingHangup))&&("pendingGetSecureFormFailure"!==t.type||exist(e,"pendingGetSecureFormFailure"))&&(t.type!==pendingCobrowseStart||exist(e,pendingCobrowseEnd)||"none"===e.cobrowsing)?t.type!==pendingHangup&&t.type!==pendingAccept&&"pendingGetSecureFormFailure"!==t.type&&n.push(t):n.push(t)}),_extends({},e,{messages:e.messages.concat(n)})},_stateMapping$3["sideWindow/sideWidowTabSelect"]=function(e,t){var n={};return n.showChatWindowInSidewindow="bubble"===t,n.isFocused=n.showChatWindowInSidewindow,n.maxReadId=n.showChatWindowInSidewindow?Math.max(e.maxReadId,e.maxId):e.maxReadId,_extends({},e,n,selectSideWindowItem(e,t))},_stateMapping$3["sideWindow/toggleSideWindow"]=function(e,t){return t?e.sideWindowSelectedTab?e:e.sideWindowItems&&0!==e.sideWindowItems.length?_extends({},e,selectSideWindowItem(e,e.sideWindowItems[0].id)):e:e.sideWindowSelectedTab?_extends({},e,{sideWindowSelectedTab:void 0}):e},_stateMapping$3["window/hangupAudioVideoChat"]=function(e){return stop(e)},_stateMapping$3["sideWindow/closeKnowledgeBase"]=function(e){return _extends({},e,updateSideWindowSystemItem(e,!1,"kb"))},_stateMapping$3["sideWindow/showKnowledgeBaseInfo"]=function(e){return _extends({},e,updateSideWindowSystemItem(e,!0,"kb"))},_stateMapping$3["sideWindow/replaceSideWindowTab"]=function(e,t){return _extends({},e,replaceSideWindowItem(e,t.targetTab,t.newTab))},_stateMapping$3["window/updateMaxReadId"]=function(e,t){return _extends({},e,{maxReadId:t})},_stateMapping$3["window/updateWindowId"]=function(e,t){return _extends({},e,{id:t})},_stateMapping$3["window/closeMinimizeBubble"]=function(e,t,n){return n?null:e},_stateMapping$3["window/togglePopupBubble"]=function(e,t){return e?e.popupBubble===t?e:_extends({},e,{popupBubble:t,autoEjectTranscript:!1}):e},_stateMapping$3["sideWindow/setWindowTabs"]=function(e,t){var n=e;if(t&&t.length>0){[].concat(t).forEach(function(e){n=addSideWindowItem(n,e)})}return _extends({},e,n)},_stateMapping$3["window/setFrequencyLimitState"]=function(e,t){return e?e.frequencyLimitState===t?e:_extends({},e,{frequencyLimitState:t}):e},_stateMapping$3["web/emailTranscript"]=function(e,t){return _extends({},e,updateWindowField(e,email,t))},_stateMapping$3["window/setId"]=function(e,t){return null==e?e:e.id===t?e:_extends({},e,{id:t})},_stateMapping$3["window/remove-agent-is-typing"]=function(e){return e?_extends({},e,{messages:e.messages.filter(function(e){return"agentTyping"!==e.type})}):e},_stateMapping$3["window/chatbotTimeout"]=function(e){return e},_stateMapping$3["window/resetMaxId"]=function(e){var t=e.messages.length,n=e.messages.map(function(e,n){return _extends({},e,{id:n-t})});return _extends({},e,{maxId:-1,maxReadId:-1,messages:n})},_stateMapping$3["web/fromKBToAgent"]=function(e){return _extends({},e,{kbChatWithAgentClicked:!0})},_stateMapping$3["web/getArticles"]=function(e){return _extends({},e,{kb:_extends({},e.kb,{isLoading:!0})})},_stateMapping$3["window/success-articles"]=function(e,t){var n=t.map(function(e){return e.id});return _extends({},e,{kb:_extends({},e.kb,{articles:n,isLoading:!1}),error:""})},_stateMapping$3["window/success-articleByID"]=function(e,t){return _extends({},e,updateSideWindowSystemItem(e,!0,"kb"),{kb:_extends({},e.kd,{activeArticle:t}),error:""})},_stateMapping$3["window/articleClickTitile"]=function(e,t){return _extends({},e,updateSideWindowSystemItem(e,!0,"kb"),{kb:_extends({},e.kb,{activeArticle:t})})},_stateMapping$3["window/error-articles"]=function(e){return _extends({},e,{error:"Network error",kb:{isLoading:!1}})},_stateMapping$3["window/error-articleByID"]=function(e,t){return _extends({},e,{error:404===t?"Page not found":"Network error"})},_stateMapping$3["webView/open"]=function(e,t){return _extends({},e,{webView:t})},_stateMapping$3["webView/close"]=function(e){return _extends({},e,{webView:null})},_stateMapping$3["webView/loading"]=function(e){return _extends({},e,{webView:_extends({},e.webView,{ifLoading:!0})})},_stateMapping$3["webView/visitorInfo"]=function(e,t){return _extends({},e,{webView:_extends({},e.webView,{ifLoading:!1,visitorInfo:t})})},_stateMapping$3["sideWindow/openBotSideWindow"]=function(e,t){return _extends({},e,updateSideWindowSystemItem(e,!0,"bot"),{botSideWindow:t})},_stateMapping$3["sideWindow/closeBotSideWindow"]=function(e){return _extends({},e,updateSideWindowSystemItem(e,!1,"bot"),{botSideWindow:null})},_stateMapping$3["window/cleanUpCobrowseRequest"]=function(e){for(var t=e.messages,n=t.length-1;n>=0&&"cobrowseRequest"!==t[n].type;n-=1);return _extends({},updateCobrowsingStatus("none")(e),{messages:t.slice(0,n).concat(t.slice(n+1,t.length))})},_stateMapping$3["window/cleanPendingMessages"]=function(e){return _extends({},e,{messages:e&&e.messages?e.messages.filter(videoMessageFilter).filter(cobrowseMessageFilter):[]})},_stateMapping$3["window/updateMaxAgentReadId"]=function(e,t){return t!==e.maxAgentReadId?_extends({},e,{maxAgentReadId:t}):e},_stateMapping$3["window/updateMaxVisitorReadId"]=function(e,t){return _extends({},e,{maxVisitorReadId:t})},_stateMapping$3["window/updateBotFormMessage"]=function(e,t){return _extends({},e,{messages:e.messages.map(function(e){if(e.type===chatbotBotForm&&e.content.GUID===t.guid){var n=e.content.fields.map(function(e){var n=t.fieldsValue[e.id];return n?e.type===checkboxList&&n.value.indexOf(splitter)>-1?_extends({},e,{value:n.value.split(splitter)}):_extends({},e,{value:n.value}):e});return _extends({},e,{content:_extends({},e.content,{fields:n})})}return e})})},_stateMapping$3["chatWindow/toggle-toolbox"]=function(e,t){return e.showToolbox===t?e:_extends({},e,{showToolbox:t})},_stateMapping$3["window/updateVisitorStatus"]=function(e,t){return e.visitorStatus===t?e:_extends({},e,{visitorStatus:t})},_stateMapping$3["window/updateChatVersion"]=function(e,t){return e?e.chatVersion===t?e:_extends({},e,{chatVersion:t}):e},_stateMapping$3["window/updateEmailToSendTranscript"]=function(e,t){return e.emailToSendTranscript===t?e:_extends({},e,{emailToSendTranscript:t})},_stateMapping$3["window/hideQuickReply"]=function(e){return _extends({},e,{quickReply:null})},_stateMapping$3),chatWindow=genReducerHandler(null,stateMapping$3),_stateMapping$4,defaultState$4={},stateMapping$4=(_stateMapping$4={},_stateMapping$4["config/updateConfig"]=function(e,t){return _extends({},e,t)},_stateMapping$4["config/setMaxMessageLength"]=function(e,t){return _extends({},e,{messageLengthLimit:t})},_stateMapping$4["web/updateUrl"]=function(e){var t=[].concat(e.heartbeat.online);return t=0===t[0].duration&&0===t[0].timespan?t.filter(function(e,t){return 0!==t}):[{duration:0,timespan:0}].concat(t),_extends({},e,{heartbeat:_extends({},e.heartbeat,{online:t})})},_stateMapping$4["config/updateServerInstanceTag"]=function(e,t){return _extends({},e,{serverInstanceTag:t})},_stateMapping$4),configuration=genReducerHandler(defaultState$4,stateMapping$4),_preCookMapping,getLanguages$2=function(e){return e.entities.campaigns.entities[e.window.id].languages},addLanguages=function(e,t){return _extends({},t,{config:getLanguages$2(e)})},preCookMapping=(_preCookMapping={},_preCookMapping["chatWindow/open"]=function(e,t){var n=t.payload.campaignId,i=getRightAndBottom(e,n);return _extends({},t,{config:i})},_preCookMapping[showInvitation]=function(e,t){var n=getLanguages$1(e),i=t.payload.campaignId,o=getRightAndBottom(e,i),a=o.right,r=o.bottom;return _extends({},t,{config:{right:a,bottom:r,campaignId:i,ifHideAgentName:getIfHideAgentName(e),agentDefaultName:n&&n.operatorDefaultName||"Agent"}})},_preCookMapping["chatWindow/chatInputWarning"]=function(e,t){return _extends({},t,{config:{languages:getLanguages$2(e),maxLength:getMessageLengthLimit(e)}})},_preCookMapping["window/chatbotTimeout"]=function(e,t){return addLanguages(e,t)},_preCookMapping[updateMessages]=function(e,t){var n=getWindowCampaign(e),i=e.entities.fields.entities,o=getPDFUrl(e),a=getIfHideAgentName(e),r=n&&n.languages,s=r?r.operatorDefaultName:"Agent";return _extends({},t,{config:{campaign:n,fields:i,downloadUrl:o,ifHideAgentName:a,agentDefaultName:s}})},_preCookMapping["form/submit-success"]=addLanguages,_preCookMapping["window/closeMinimizeBubble"]=function(e,t){return _extends({},t,{config:isWindowManualInvited(e)})},_preCookMapping["window/closeSliently"]=function(){return closeWindow$1()},_preCookMapping["chatWindow/showTab"]=function(e,t){var n="autoInvitation"===getRequestChatSourceType(e);return _extends({},t,{config:n})},_preCookMapping["window/articleClickTitile"]=function(e,t){var n=getActiveKnowledgebaseArticleById(e,t.payload);return _extends({},t,{payload:n})},_preCookMapping["entities/updateAgent"]=function(e,t){var n=getIfHideAgentName(e),i=getMainCampaign(e),o=i&&i.languages,a=o?o.operatorDefaultName:"Agent";return _extends({},t,{config:{ifHideAgentName:n,agentDefaultName:a}})},_preCookMapping),preCookAction=function(e,t){return preCookMapping[t.type]?preCookMapping[t.type](e,t):t},rootReducers=combineReducers({app:app,page:page,entities:entities,window:chatWindow,configuration:configuration}),reducer=function(e,t){return t.payload&&t.payload.window&&"state/restore"===t.type?getRestoreState(e,t):rootReducers(e,preCookAction(e,t))},addLastChattedAgent=function(e){var t=getVisitorInfo$3()||{},n=t.lastChattedAgents||[];if(-1===n.indexOf(e)){var i=n.concat([e]);updateVisitorInfo({lastChattedAgents:i})}},removeLastChattedAgent=function(e){var t=getVisitorInfo$3()||{},n=t.lastChattedAgents||[];if(-1!==n.indexOf(e)){var i=n.filter(function(t){return t!==e});updateVisitorInfo({lastChattedAgents:i})}},clearLastChattedAgents=function(){updateVisitorInfo({lastChattedAgents:[]})},updateChatTimes=function(e){var t=getVisitorInfo$3()||{},n=t.chatTimes;t.lastChatGuid!==e&&updateVisitorInfo({chatTimes:(n||0)+1,lastChatGuid:e})},chatGuid="",getDefaultFieldsValueFromPopoutQueryString=function(){var e=getPageInfo().popout;if(e){var t={};return e.ticketId&&(t.ticketId=e.ticketId),e.departmentId&&(t.department=e.departmentId),t}return{}},persistent=function(e){var t=e.dispatch,n=e.getState;return function(e){return function(i){if(!n())return e(i);if("page/updateVisitor"===i.type){var o=i.payload,a=o.guid,r=o.ifNewVisitor,s=o.sessionId,d=o.migrationInfo,c=o.persistentVisitor;if(a&&(setVisitorGuid(a),deleteVisitorId()),s&&updateVisitorInfo({sessionId:s}),r){var l=getVisitorInfo$3(),u=l.firstVisitTime,p=l.visitTimes;updateVisitorInfo({firstVisitTime:u||(new Date).getTime(),visitTimes:(p||0)+1})}c&&updateVisitorInfo({persistentVisitor:c}),d&&updateVisitorInfo(_extends({},d))}if("addVisitorNavigation"===i.type&&i.payload&&addNavigation(i.payload),"emptyVisitorNavigation"===i.type&&emptyNavigation(),"web/emailTranscript"===i.type){var h=getVisitorInfo$3(),f=h&&h.form&&void 0!==h.form.email?_extends({},h.form,{email:i.payload}):{};updateVisitorInfo(void 0!==f.email?{email:i.payload,form:f}:{email:i.payload})}if("chatWindow/showTab"===i.type&&i.payload===prechat){var g=void 0,m=getButton(n(),getWindowId(n())),b=m.routeDepartment;b&&(g={department:b});var w=getVisitorInfo$3();g=_extends({},w?w.form:{},g,isPoppedOut(n())?getDefaultFieldsValueFromPopoutQueryString():{}),Object.keys(g).length>0&&e(fillFieldsWithDefaultValues(g))}if("chatWindow/showTab"===i.type&&i.payload===offline){var v=void 0,y=getButton(n(),getWindowId(n())),C=y.routeDepartment;C&&(v={department:C}),isPoppedOut(n())&&(v=_extends({},v,getDefaultFieldsValueFromPopoutQueryString())),v&&e(fillFieldsWithDefaultValues(v))}if(i.type===showInvitation){var _=i.payload;if(_.isManual&&_.chat){var x=_.chat.guid,S=getChatInfo(x),k=S.windowStatus,A=S.maxReadId;if(k){var M=e(_extends({},i,{payload:_extends({},i.payload,{windowStatus:k})}));return null!=A&&t(updateMaxReadId$1(A)),M}}}var T=n(),I=getIfWaitingOrChatting(T),P=e(i),W=n();if("form/submit-social"===i.type||"form/update"===i.type){var D=getVisitorInfo$3(),R=D||{},$=R.name,O=R.email,E=_extends({},i.payload);updateVisitorInfo(D&&D.form?{name:E.name&&E.name!==$?E.name:$||"",email:E.email&&E.email!==O?E.email:O||"",form:_extends({},D.form,{name:D.form.name&&E.name?E.name:$||"",email:D.form.email&&E.email?E.email:O||""})}:{name:E.name&&E.name!==$?E.name:$||"",email:E.email&&E.email!==O?E.email:O||""})}if("form/update"===i.type&&"prechat"===i.meta){if(!getWindowCampaign(W).isForgetPrechat){var N=_extends({},i.payload);delete N.department,delete N.ticketId,delete N.captcha,updateVisitorInfo({form:N})}}var F=getIfWaitingOrChatting(W),L=getChatGuid(W);if(!I&&F){var B=getWindowStatus(W);B!==open&&B!==minimized&&B!==restored||updateChatInfo(L,{windowStatus:B})}if(i.type===updateWindowStatus){var V=i.payload===minimized||i.payload===open||i.payload===restored,z=isWindowManualInvited(W);(F||z)&&V&&updateChatInfo(L,{windowStatus:i.payload})}if("window/toggleFocus"===i.type||i.type===updateWindowStatus||i.type===updateMessages||"window/resetMaxId"===i.type){var U=getMaxReadId(T),H=getMaxReadId(W);U!==H&&updateChatInfo(L,{maxReadId:H})}return i.type===updateMessages&&i.payload.forEach(function(e){var t=e.content,n=e.type;if("agentAcceptChat"===n||"chatbotJoinChat"===n){var i=getChatGuid(W);updateChatTimes(i)}if("agentJoinChat"===n||"agentAcceptChat"===n||"agentAcceptTransfer"===n){if(t.agent){var o=getChatGuid(W);chatGuid!==o&&(chatGuid=o,clearLastChattedAgents()),addLastChattedAgent(t.agent.id)}}else"agentEndChat"===n&&t.agent&&removeLastChattedAgent(t.agent.id)}),P}}},sound=function(){var e={},t=function(t){if(null==t)return Promise.reject("sound url is null");if(e[t])return Promise.resolve(e[t]);var n=new Promise(function(e,n){var i=new Audio(t);i.oncanplay=function(){i.oncanplay=null,e(i)},i.onerror=n});return e[t]=n,n};return{play:function(e,n){return t(e).then(function(e){return e.loop=n?"loop":"",e.play()})},stop:function(e){return t(e).then(function(e){e.loop=""})}}},PERMISSION_DEFAULT="default",PERMISSION_GRANTED="granted",PERMISSION_DENIED="denied",PERMISSION_NOTSUPPORTED="notsupported",PolyfillNotification=function(){function e(){var e=document$2.createElement("div");this.addEventListener=function(t,n){e.addEventListener(t,n.bind(this))},this.removeEventListener=function(t,n){e.removeEventListener(t,n.bind(this))},this.dispatchEvent=function(t){if("string"==typeof t)try{e.dispatchEvent(new Event(t))}catch(i){var n=document$2.createEvent("Event");n.initEvent(t,!1,!0),e.dispatchEvent(n)}}}function t(){}function n(){var t=this;e.call(this);var n=r;Object.defineProperties(this,{close:{value:function(){var e=this;n===r&&(window.external.msSiteModeClearIconOverlay(),s.forEach(function(t){global$2.removeEventListener(t,e.close)}),this.dispatchEvent("click"),this.dispatchEvent("close"),n=null)}.bind(this)}}),this.close(),this.icon&&window.external.msSiteModeSetIconOverlay(d(this.icon),this.description||this.title),window.external.msSiteModeActivate(),this.dispatchEvent("show"),s.forEach(function(e){global$2.addEventListener(e,t.close)}),r+=1,n=r}function i(e,t){var n=e;if(!arguments.length)throw TypeError('Failed to construct "Notification": 1 argument required, but only 0 present.');if(""===n&&(n="\b"),arguments.length>1&&"object"!==(void 0===t?"undefined":_typeof(t)))throw TypeError('Failed to construct "Notification": parameter 2 ("options") is not an object.');var i=Object(t),o=i.dir;if(void 0!==o&&-1===a.indexOf(o))throw TypeError('Failed to construct "Notification": The provided value "'+o+'" is not a valid enum value of type NotificationDirection.');var r=new c(n,i);return r.body||Object.defineProperty(r,"body",{value:String(i.body||"")}),r.data||Object.defineProperty(r,"data",{value:i.data||null}),r.dir||Object.defineProperty(r,"dir",{value:o||a[0]}),r.icon||Object.defineProperty(r,"icon",{value:String(i.icon||"")}),r.lang||Object.defineProperty(r,"lang",{value:String(i.lang||"")}),r.requireInteraction||Object.defineProperty(r,"requireInteraction",{value:Boolean(i.requireInteraction)}),r.silent||Object.defineProperty(r,"silent",{value:Boolean(i.silent)}),r.tag||Object.defineProperty(r,"tag",{value:String(i.tag||"")}),r.title||Object.defineProperty(r,"title",{value:String(n)}),r.timestamp||Object.defineProperty(r,"timestamp",{value:(new Date).getTime()}),r}var o=["granted","default","denied","notsupported"],a=["auto","ltr","rtl"],r=-1,s=["click","scroll","focus"],d=function(e){var t=e.lastIndexOf(".");return(-1!==t?e.substr(0,t):e)+".ico"},c=window.Notification||window.webkitNotifications&&t||"external"in window&&"msIsSiteMode"in window.external&&void 0!==window.external.msIsSiteMode()&&n||e;return Object.defineProperty(e,"permission",{enumerable:!0,get:function(){return"notsupported"}}),Object.defineProperty(e,"requestPermission",{enumerable:!0,writable:!0,value:function(e){e(this.permission)}}), Object.defineProperty(n,"permission",{enumerable:!0,get:function(){return window.external.msIsSiteMode()?"granted":"denied"}}),Object.defineProperty(n,"requestPermission",{enumerable:!0,writable:!0,value:function(){var e=this;return new Promise(function(t){t(e.permission)})}}),Object.defineProperty(n,"PERMISSION_REQUEST_MESSAGE",{writable:!0,value:"IE supports notifications in pinned mode only. Pin this page on your taskbar to receive notifications."}),Object.defineProperty(t,"permission",{enumerable:!0,get:function(){return o[window.webkitNotifications.checkPermission()]}}),Object.defineProperty(t,"requestPermission",{enumerable:!0,writable:!0,value:function(){return new Promise(function(e){window.webkitNotifications.requestPermission(function(t){e(t)})})}}),c.permission||Object.defineProperty(c,"permission",{enumerable:!0,get:function(){return c.permissionLevel&&c.permissionLevel()}}),Object.defineProperty(i,"permission",{enumerable:!0,get:function(){return c.permission}}),Object.defineProperty(i,"requestPermission",{enumerable:!0,value:function(){return new Promise(function(e,t){var n=c.requestPermission(function(t){e(t)});if(n)return"function"!=typeof n.then||"function"!=typeof n.catch?void t(n):void e(n)})}}),i}(),requestPermission=PolyfillNotification.requestPermission,notify$1=function(e,t){if("granted"===PolyfillNotification.permission){var n=new PolyfillNotification(location$1.host,{body:e,icon:t,tag:"livechat_notify"}),i=null;n.onclick=function(){global$2.focus(),n.close()},n.onshow=function(){i=setTimeout(function(){n.close(),i=null},5e3)},n.onclose=function(){i&&clearTimeout(i)}}},newResponse="new-response",videoRequest="video-request",videoEnd="video-end",player=sound(),play=throttle(player.play,500),notify$$1=debounce(notify$1,50),notification=function(e){return function(t){return function(n){var i=e.getState();n.type!==chatWindowPopOut&&"chatWindow/popIn"!==n.type||player.stop(getSound(i,"video-request"));var o=t(n),a=e.getState();if(!isReady(a))return null;var r=isPopupNotificationEnabled(a),s=getMaxReadId(i);if("window/endchat"===n.type&&emit("livechat.chat.end"),n.type===updateMessages){var d=getChatStatus(i),c=getChatStatus(a);d!==c&&(c===chatting?emit("livechat.chat.start",getChatGuid(a)):c===chatted&&emit("livechat.chat.end"));var l=0,u=0;n.payload.forEach(function(e){if(isMessageNotifyRequired(e)&&e.id&&!(e.id<=s)&&(ifMediaChatEnd(e.type)&&(u+=1),!isSupportWebrtc||"visitorAudioChatRequest"!==e.type&&"agentAudioChatRequest"!==e.type&&"visitorVideoChatRequest"!==e.type&&"agentVideoChatRequest"!==e.type?ifMediaChatEnd(e.type)&&"visitorAudioChatAccept"!==e.type&&"visitorVideoChatAccept"!==e.type&&"agentAudioChatAccept"!==e.type&&"agentVideoChatAccept"!==e.type?play(getSound(a,"video-end")):"cobrowseAccept"!==e.type&&"cobrowseRefuse"!==e.type&&"cobrowseEnd"!==e.type&&"cobrowseNoAnswer"!==e.type&&"cobrowseRequest"!==e.type&&"cobrowseCancel"!==e.type&&play(getSound(a,"new-response")):l+=1,"agentAcceptChat"!==e.type)){if("agent"===e.sender.type){var t=null;switch(e.type){case chatbotConfidenceAnswer:t=ommit(getBotFirstConfidenceAnswer(e),0,48);break;case chatbotBotSignIn:t=e.content.message+" "+e.content.signInText;break;case chatbotBotForm:case botRequestLocation:case botPrompt:t=e.content.message}if(null!=t){var n=absoluteURL(a,"Images/logo60.png");return getIfPartner(a)&&(n=""),void notify$$1(t,n)}}if(r){var i="string"==typeof e.content?e.content:e.content.text,o=absoluteURL(a,"Images/logo60.png");getIfPartner(a)&&(o=""),notify$$1(i,o)}}}),(l>0||u>0)&&(l>u?player.play(getSound(a,"video-request"),!0):player.stop(getSound(a,"video-request")))}var p=isRequestingCobrowsing(i),h=isRequestingCobrowsing(a),f=isCobrowsing(i),g=isCobrowsing(a)||h;if(!p&&h?player.play(getSound(a,"video-request"),!0):p&&!h&&player.stop(getSound(a,"video-request")),(f||p)&&!g&&a.window&&play(getSound(a,"video-end")),r&&getIfChatting(a)&&!getIfChatting(i)&&requestPermission(),"page/setButtonIsOnline"===n.type){var m=n.payload.campaignId;if(isOnline(i,m)!==isOnline(a,m)){var b=getButton(a,n.payload.campaignId),w=isOnline(a,m);emit(w?"livechat.button.online":"livechat.button.offline",b)}}if("window/updateQueue"===n.type){var v=getQueue(i),y=getQueue(a);y.position===v.position&&y.waitTime===v.waitTime||emit("livechat.chat.waitingQueue.update",y)}return o}}},base64=createCommonjsModule(function(module,exports){!function(global,factory){module.exports=function(global){var _Base64=global.Base64,version="2.5.0",buffer;if(module.exports)try{buffer=eval("require('buffer').Buffer")}catch(e){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(e){for(var t={},n=0,i=e.length;n>>6)+fromCharCode(128|63&t):fromCharCode(224|t>>>12&15)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t)}var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return fromCharCode(240|t>>>18&7)+fromCharCode(128|t>>>12&63)+fromCharCode(128|t>>>6&63)+fromCharCode(128|63&t)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(e){return e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,cb_utob)},cb_encode=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[b64chars.charAt(n>>>18),b64chars.charAt(n>>>12&63),t>=2?"=":b64chars.charAt(n>>>6&63),t>=1?"=":b64chars.charAt(63&n)].join("")},btoa=global.btoa?function(e){return global.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e)).toString("base64")}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e)).toString("base64")}:function(e){return btoa(utob(e))},encode=function(e,t){return t?_encode(String(e)).replace(/[+\/]/g,function(e){return"+"==e?"-":"_"}).replace(/=/g,""):_encode(String(e))},encodeURI=function(e){return encode(e,!0)},re_btou=new RegExp("[\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3}","g"),cb_btou=function(e){switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return fromCharCode(55296+(n>>>10))+fromCharCode(56320+(1023&n));case 3:return fromCharCode((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return fromCharCode((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=function(e){return e.replace(re_btou,cb_btou)},cb_decode=function(e){var t=e.length,n=t%4,i=(t>0?b64tab[e.charAt(0)]<<18:0)|(t>1?b64tab[e.charAt(1)]<<12:0)|(t>2?b64tab[e.charAt(2)]<<6:0)|(t>3?b64tab[e.charAt(3)]:0),o=[fromCharCode(i>>>16),fromCharCode(i>>>8&255),fromCharCode(255&i)];return o.length-=[0,0,2,1][n],o.join("")},_atob=global.atob?function(e){return global.atob(e)}:function(e){return e.replace(/\S{1,4}/g,cb_decode)},atob=function(e){return _atob(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(e){return(e.constructor===buffer.constructor?e:buffer.from(e,"base64")).toString()}:function(e){return(e.constructor===buffer.constructor?e:new buffer(e,"base64")).toString()}:function(e){return btou(_atob(e))},decode=function(e){return _decode(String(e).replace(/[-_]/g,function(e){return"-"==e?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var e=global.Base64;return global.Base64=_Base64,e};if(global.Base64={VERSION:"2.5.0",atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict,__buffer__:buffer},"function"==typeof Object.defineProperty){var noEnum=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(e){return encode(this,e)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}return global.Meteor&&(Base64=global.Base64),module.exports&&(module.exports.Base64=global.Base64),{Base64:global.Base64}}(global)}("undefined"!=typeof self?self:"undefined"!=typeof window?window:commonjsGlobal)}),base64_1=base64.Base64,prechat$2="prechat",chat$1="chat",chatbot$1="chatbot",offline$2="offline",sso$1="sso",systemProcessing$1="systemProcessing",kb$2="kb",_handlers,handlers=(_handlers={},_handlers.prechat=function(e){e(showTab(prechat)),e(updateVisitorStatus$1(preChat)),e(updatePageVisitorStatus$1(preChat))},_handlers.chat=function(e,t){getIfWaitingOrChatting(t)||(e(startWaiting$1()),e(showTab(chat)),e(updateVisitorStatus$1(waitingForChat)),e(updatePageVisitorStatus$1(waitingForChat)))},_handlers.chatbot=function(e,t,n){e(chatWindowUpdateChatBotInfo(n.url,n.bot)),e(startChatBot4Invite$1()),e(showTab(chat)),e(updateVisitorStatus$1(chatting$1)),e(updatePageVisitorStatus$1(chatting$1))},_handlers.offline=function(e){e(showTab(offline)),e(updateVisitorStatus$1("offlineMessage")),e(updatePageVisitorStatus$1("offlineMessage"))},_handlers.sso=function(e,t,n){e(chatWindowUpdateSSOInfo(n.url,n.showPrelogin)),e(n.showPrelogin?showTab(login):showTab("ssoLogin")),e(updateVisitorStatus$1(inSite)),e(updatePageVisitorStatus$1(inSite))},_handlers.kb=function(e){e(showTab(kb)),e(updateVisitorStatus$1(searchKB)),e(updatePageVisitorStatus$1(searchKB))},_handlers),requestChatHandler=function(e,t,n){if("chat"===n.next||"chatbot"===n.next){var i=n.chatGuid,o=n.serverTime;e(updateChatIdentity$1(i,o)),setTimeout(function(){return e(sendAgentMsgSeenByVisitor$1(),0)})}if("kb"===n.next){var a=n.ifOnline,r=n.id,s=n.greetingMessage,d=n.maxCount;e(setButtonIsOnline$1(getWindowId(t),a)),e(chatWindowUpdateKBConfig({id:r,greetingMessage:s,maxCount:d}))}else e(setButtonIsOnline$1(getWindowId(t),"offline"!==n.next));(handlers[n.next]||function(){})(e,t,n)},_handlers$1,handlers$1=(_handlers$1={},_handlers$1[chatbotGreeting]=function(e,t){try{var n=JSON.parse(e.content);return _extends({},e,{content:n})}catch(n){var i=[{type:complex,content:{text:e.content}}],o=getChatBot(t),a={ifAgentOnline:!0,ifRate:!1,intentAnswers:i,botId:o?o.id||0:0};return _extends({},e,{content:a})}},_handlers$1.visitorRequestChatExceedChatQueueLimit=function(e,t,n){return n(setIsActive$1(!1)),e},_handlers$1),chatMessageHandler=function(e,t,n){return e.map(function(e){var i=handlers$1[e.type];return i?i(e,t,n):e})},unexpected=1,visitorNotExist=1004,chatNotExist=1036,serverInactive=314,visitorBanned=1024,ipBanned=1032,liveChatNotAvaliable=1037,needRecoverChat=1050,illegalFile=7601,networkError=4342338,chatBotError=4342339,GET="GET",POST="POST",actualGet=partial(request,GET),actualPost=partial(request,"POST"),get$2=actualGet,post=actualPost,postForm=function(e,t,n,i){var o=new FormData;return o.append("file",t),o.append("json",JSON.stringify(n)),post(e,o,i)},email$2="{email}",error$2="{errorCode}",promptPressEnterToSend="promptPressEnterToSend",titleChatWindow="titleChatWindow",titleOfflineMessageWindow="titleOfflineMessageWindow",titlePreChatWindow="titlePreChatWindow",eventSendTranscript="eventSendTranscript",eventRatingSubmitSuccess="eventRatingSubmitSuccess",systemError="promptServerException",oopsError="errorVisitorNotExist",buttonKBChatWithAgent="buttonKBChatWithAgent",buttonKBLeaveMessage="buttonKBLeaveMessage",webActionTypes=actionTypes,getCampaign$1=function(e,t,n){var i=partial(absoluteURL,t),o=getSiteId(t),a=getButton(t,n).lastUpdateTime,r=getCampaignById(t,n);if(r)return Promise.resolve(r);var s=function(e){return _extends({},e,{sounds:e.sounds&&Object.keys(e.sounds).reduce(function(t,n){var o;return _extends({},t,(o={},o[n]=i(e.sounds[n]),o))},{}),chatBot:e.chatBot&&_extends({},e.chatBot,{avatar:i(e.chatBot.avatar)}),chat:e.chat&&_extends({},e.chat,{texture:i(e.chat.texture)}),header:e.header&&_extends({},e.header,{banner:e.header.banner&&i(e.header.banner),logo:e.header.logo&&i(e.header.logo)})})};return e(updateCampaign$1({id:n,entity:null,fetchStatus:"fetching"})),get$2(i("/campaign.ashx?siteId="+o+"&campaignId="+n+"&lastUpdateTime="+a)).then(function(t){var i=s(t.output);return e(updateCampaign$1({id:n,entity:i,error:null,fetchStatus:done})),i}).catch(function(t){throw e(updateCampaign$1({id:n,entity:null,error:t.error.message,fetchStatus:"error"})),t})},ContextProvider=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.getChildContext=function(){return this.props.context},t.prototype.render=function(){return this.props.children[0]},t}(Component),renderToContainer=function(e,t){return{unmount:function(){for(var e=0;e3&&void 0!==arguments[3]?arguments[3]:{};return n.some(function(n){var o=!1,a=getValueByPath(e[t],n),r=getValueByPath(i,n);r instanceof Date&&a instanceof Date?o=JSON.stringify(r)!==JSON.stringify(a):r!==a&&(o=!0);return o})},convertKeyToPath=function(e){var t=e.split(".");return 1===t.length?e:t},isSame=function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";return!t&&n?{isSame:!1,diff:i.concat(Object.keys(n))}:!n&&t?{isSame:!1,diff:i.concat(Object.keys(t))}:t||n?Object.keys(n).reduce(function(i,a){var r=i,s=n[a],d=t[a];if(s===d)return r;if(d instanceof Date&&s instanceof Date){if(JSON.stringify(d)===JSON.stringify(s))return r;i.diff.push(a),r.isSame=!0}if("object"===(void 0===d?"undefined":_typeof(d))&&d&&"object"===(void 0===s?"undefined":_typeof(s))&&s){var c=e(d,s,r.diff,o+"."+a);return r.diff=c.diff,r.isSame=r.isSame?c.isSame:r.isSame,r}return r.isSame=!1,r.diff.push(a),r},{isSame:!0,diff:i}):{isSame:!0,diff:i}},shouldComponentUpdateGen=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=t.map(convertKeyToPath),o=n.map(convertKeyToPath);return function(t,n){var a=compare(e,"props",i,t)||compare(e,"state",o,n);return a}},getRootNode=function e(t){return t.parentNode?e(t.parentNode):t},getIframeHtml=function(e){return["",e?'':"","",'','',"","",'
',"",""].join("")},fillIframeWithHtml=function(e,t){var n=e.contentDocument;return n.open(),n.write(t),n.close(),n.getElementById("container")},addInputListen=function(e){isIE9&&e.addEventListener("selectionchange",function(){var t=e.activeElement;if(t&&("TEXTAREA"===t.tagName||"INPUT"===t.tagName&&"text"===t.type)){var n=e.createEvent("CustomEvent");n.initCustomEvent("input",!0,!0,{}),t.dispatchEvent(n)}})},addFocusStyleForKeyDown=function(e,t){var n=new RegExp("\\bglobal-showFocus\\b"),i=function(){n.test(t.documentElement.className)||(t.documentElement.className+=" global-showFocus ")},o=function(){t.documentElement.className=t.documentElement.className.replace(n,"").trim()};e.addEventListener("keydown",i,!0),e.addEventListener("touchstart",o,!0),e.addEventListener("mousedown",o,!0)},Iframe=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.noIframe,i=t.languageTag,o=void 0,a=void 0;if(n)this.container=this.div,o=global$2,a=getRootNode(this.div);else{var r=getIframeHtml(i);this.container=fillIframeWithHtml(this.iframe,r),o=this.iframe.contentWindow,a=this.iframe.contentDocument}var s=renderToContainer(this,this.container),d=s.render,c=s.unmount,l=shouldComponentUpdateGen(this,["style","innerCss","className"]);this.shouldComponentUpdate=function(e){var t=l(e);return t||(n?e.callback&&e.callback(o,a):d(e.children,function(){return e.callback&&e.callback(o,a)})),t},this.componentDidUpdate=function(){n?e.props.callback&&e.props.callback(o,a):d(e.props.children,function(){return e.props.callback&&e.props.callback(o,a)})},this.componentWillUnmount=n?function(){}:c,n||d(this.props.children),this.props.onMounted&&this.props.onMounted(o,a),this.props.callback&&this.props.callback(o,a),addInputListen(a),addFocusStyleForKeyDown(o,a)},t.prototype.render=function(){var e=this,t=this.props,n=t.children,i=(t.innerCss,t.noIframe),o=objectWithoutProperties(t,["children","innerCss","noIframe"]);return i?h("div",_extends({},o,{ref:function(t){e.div=t}}),n):h("iframe",_extends({allowFullScreen:"1"},o,{ref:function(t){e.iframe=t}}))},t}(Component),getFileName=function(e){var t=e.split(/\/|\\/);return t[t.length-1]},ownerDocument=void 0,CrossDomainAttachment=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=Date.now().toString(),i=getLanguages(t);return h(Iframe,{id:n,src:"about:blank",style:e.style,frameborder:0,scrolling:"no",innerCss:"body{margin:0;padding:0}",title:i.uploadForm,onMounted:function(e){ownerDocument=e.ownerDocument}},h("form",{id:"form",method:"post",encType:"multipart/form-data",encoding:"multipart/form-data"},h("input",{ref:function(t){e.onMounted&&e.onMounted(t)},type:"file",name:"file",onChange:function(t){e.onChange&&e.onChange({formId:n,name:getFileName(t.target.value)})},onBlur:e.onBlur,onFocus:e.onFocus})))},t}(Component),create=function(e,t){render(h(CrossDomainAttachment,t),e)},times=0,lastSuccessTime=new Date,isConnected=function(){return 0===times||!(times>=3||checkTimeout(lastSuccessTime,2e4))},setSuccess=function(){times=0,lastSuccessTime=new Date},setError=function(){times+=1},webActionTypes$1=actionTypes,timer$1=0,queue=[],resolves={},rejects={},nextId=null,sendInner=function(e,t,n,i){if(null==t.type)throw new Error("action.type is required");return t.type===webActionTypes$1.uploadFileAction?new Promise(function(e,i){var o=t.action.fileServiceUrl+"/visitorupload.ashx?siteId="+t.action.siteId;(t.file.formId?submit$2:postForm)(o,t.file,t.action,n).then(function(n){var o=n.output,a=JSON.parse(o);if(a.code)return void i({input:t.action,error:a});e(t.action.fileServiceUrl?{input:t.action,output:a}:{input:t.action,output:o[0]})}).catch(function(e){if(e instanceof Error)throw e;i({input:t.action,error:e.error})})}):new Promise(function(n,o){null==nextId&&(nextId=genId());var a=nextId();queue.push(_extends({},t,{id:a})),resolves[a]=n,rejects[a]=o,clearTimeout(timer$1),timer$1=setTimeout(function(){post(e,queue.splice(0,queue.length)).then(function(e){var t=e.input,n=e.output;t.forEach(function(e,t){n[t].error?rejects[e.id]({input:e,error:n[t].error,serverInstanceTag:i}):resolves[e.id]({input:e,output:n[t],serverInstanceTag:i}),delete resolves[e.id],delete rejects[e.id]})}).catch(function(e){if(e instanceof Error)throw e;var t=e.input,n=e.error;t.forEach(function(e){rejects[e.id]({input:e,error:n}),delete resolves[e.id],delete rejects[e.id]})})},0)})},send=function(e,t,n,i){return sendInner(e,t,n,i).then(function(e){return setSuccess(),e})},webActionTypes$2=actionTypes,chatHeartbeatActions$1=function(e){var t=getMaxMessageId(e),n=getWinMessages(e),i=getVisitorPendingMessages(n),o=[].concat(i);if(getVisitorTyping(e)){var a=getDraft(e);o.push({type:"visitorTyping",content:a,sender:{type:"visitor"},id:n.length+t+1})}return[0===o.length?null:sendChatMessages(null,o),getChatMessages(null,-1)]},timer$2=null,checkSystemProcessingCallBack=function(e){var t=e.getState,n=e.resolve;return send(getVisitorUrl(t()),systemProcessingHeartbeat()).then(function(e){if(!e.output.payload){clearInterval(timer$2);var i=t(),o=getRequestChatAction(i,isDynamicCampaign(i)?0:getCampaignId(i)),a=getChatStatus(i),r=getLastChattedAgents(),s=null;s=a===invited?batchAction([_extends({},o,{isPrechatDone:!0,isProcessingDone:!0,lastChattedAgents:r})].concat(chatHeartbeatActions$1(i))):_extends({},o,{isProcessingDone:!0,lastChattedAgents:r}),send(getVisitorUrl(i),s).then(function(e){e.output.payload&&(clearInterval(timer$2),n(e))})}})},waitSystemProcessing=function(e){var t=e.getState,n=e.dispatch,i=function(){return new Promise(function(e){checkSystemProcessingCallBack({getState:t,resolve:e}),timer$2=setInterval(checkSystemProcessingCallBack,2e3,{getState:t,resolve:e})})},o=function(e,t){return _extends({},e,{output:mapActions(function(e){if(e.type===webActionTypes$2.requestChat){if(t.type===webActionTypes$2.batchAction){var n=t.payload.filter(function(e){return e.type===webActionTypes$2.requestChat});if(n.length>0)return _extends({},e,n[0])}return _extends({},e,t)}if(e.type===webActionTypes$2.getChatMessages&&t.type===webActionTypes$2.batchAction){var i=t.payload.filter(function(e){return e.type===webActionTypes$2.getChatMessages});if(i.length>0)return _extends({},e,i[0])}return e},e.output)})},a=function(e){return i().then(function(t){var n=t.output;return o(e,n)})};return function(e){var t=findAction(e.output,webActionTypes$2.requestChat);return t&&"systemProcessing"===t.payload.next?(n(showTab("loading")),n(updateVisitorStatus$1("systemProcessing")),n(updatePageVisitorStatus$1("systemProcessing")),a(e)):e}},checkBan$1=function(e){var t=e.dispatch,n=e.getState;return function(e){throw 1004===e.error.code&&send(getVisitorUrl(n()),checkBan({visitorGuid:getVisitorGuid(n()),visitorId:getVisitorId()})).catch(function(e){var n=e.error.code;throw 1024!==n&&1032!==n||t(ban$1()),e}),e}},currentServerTag="",pickoutActions=[actionTypes.checkBan,actionTypes.checkBBSCode,actionTypes.closeWindow,actionTypes.emailTranscript,actionTypes.getAgents,actionTypes.getChatButton,actionTypes.getConfig,actionTypes.getDepartments,actionTypes.submitPostChat,actionTypes.submitRating,actionTypes.recoverVisitor],updateLastSuccessTime=function(e,t){walkActions(function(t){pickoutActions.indexOf(t.type)<0&&e.dispatch(setLastSuccessTime$1()),t.type===actionTypes.recoverVisitor&&(e.dispatch(setIsRecovering$1(!1)),e.dispatch(updateServerInstanceTag$1(currentServerTag)))},t.input)},checkIfStartRecover=function(e,t){findAction(t,actionTypes.recoverVisitor)&&(e.dispatch(setIsActive$1(!0)),e.dispatch(setIsRecovering$1(!0)))},recordServerInstanceTag=function(){return function(e){throw-1!==[1004,1050].indexOf(e.error.code)&&(currentServerTag=e.error.serverInstanceTag),e}},maxRecoverFailTimes=20,handleRecoverError=function(e){var t=e.getState,n=e.dispatch;return function(e){var i=e.input;if(!findAction(i,actionTypes.recoverVisitor)||!e.error)throw e;20===getRecoverFailedTimes(t())&&(n(setIsActive$1(!1)),n(showError(getLanguage(t(),"errorVisitorNotExist")))),n(increaseRecoverTimes$1()),n(setIsRecovering$1(!1))}},showError$1=function(e){var t=e.getState,n=e.dispatch;return function(e){if(e.input.type===actionTypes.getVisitorInfo)n(updateWebViewVisitorInfo(null));else{var i=e.error.code;if(-1!==[314,1004,1036,1050].indexOf(i)){var o=t();getWindow(o)&&(getIfWaitingOrChatting(o)||getChatStatus(o)===invited)&&n(showError(getLanguage(t(),"errorVisitorNotExist"))),n(setIsActive$1(!1))}else if(1024===i||1032===i)n(ban$1());else if(7601===i)e.error.message&&n(showError(e.error.message));else if(4342339===i)n(showError("Oops.We're getting problems to the chatbot. Please refresh this page to chat with a live agent.")),n(setIsActive$1(!1));else if(1037===i)n(showError(e.error.message)),n(setIsActive$1(!1));else{if(findAction(e.input,actionTypes.recoverVisitor))throw e;if(i!==networkError){var a=getLanguage(t(),"promptServerException");a&&n(showError(a.replace("{errorCode}",i)))}else{var r=e.input;r.type===actionTypes.requestChat&&r.isFromKB&&n(showError(e.error.message))}}}throw e}},reportIntervalTimer=void 0,reportMainStatus=function(e,t,n){return get$2([e,"&action=4","&mainDisconnected="+(n?"0":"1"),"&visitorGuid="+t].join(""))},check=function(e){return get$2(e+"&action=1").then(function(e){return"0"===e.output?"standby":"main"}).catch(function(){return"main"})},startReportTimer=function(e,t,n){reportIntervalTimer=setInterval(function(){return get$2(t).then(function(){return reportMainStatus(e,n,!0)}).catch(function(){return reportMainStatus(e,n,!1)})},6e4)},stopReportTimer=function(){reportIntervalTimer&&clearInterval(reportIntervalTimer)},webActionTypes$3=actionTypes,waitingRecoverChat=!1,isOopseError=function(e){return 1004===e||1036===e},handleRecoverChat=function(){return function(e){return waitingRecoverChat&&findAction(e.output,webActionTypes$3.getChatMessages)&&(waitingRecoverChat=!1),e}},handleServerInactive=function(e,t){var n=e.dispatch,i=e.getState,o=function(e){return check(getModeratorUrl(i())).then(function(o){if(o!==getServer(i())){if(n(switchServer$1(o)),!isMainServer(i())&&isWaitingFromChatBotToAgent(i())&&n(resetMaxId$1()),getIfWaitingOrChatting(i()))return waitingRecoverChat=!0,null;if(findAction(e.input,webActionTypes$3.getConfig))return t(e.input)}if(314===e.error.code)return null;throw e})};return function(e){if(!isMaxonEnabled(i()))throw e;getWindowStatus(i())===close&&(waitingRecoverChat=!1);var t=e.error;if(t.code===networkError&&isMainServer(i())&&reportMainStatus(getModeratorUrl(i()),getVisitorGuid(i()),!1),isOopseError(t.code)&&waitingRecoverChat)throw e;if(314===t.code)return o(e);if(t.code===networkError){if(isMainServer(i())&&findAction(e.input,webActionTypes$3.getConfig))return o(e);if(setError(),!isConnected())return o(e)}throw e}},newVisitorActions=function(e){return[checkBan({visitorGuid:getVisitorGuid(e),visitorId:getVisitorId()}),newVisitor(getCampaignId(e),getVisitorId(),getVisitorGuid(e),document$2.referrer,getCurrentPage(e),getTimezone(),getScreenResolution(),isSupportWebrtc,getVisitorInfo$3())]},recoverVisitorActions=function(e,t){var n=getVisitorStatus(e),i=n===searchKB;n=i?preChat:n;var o=getNavigation();return[checkBan({visitorGuid:getVisitorGuid(e)}),recoverVisitor(getCampaignId(e),getVisitorGuid(e),document$2.referrer,getTimezone(),getScreenResolution(),isSupportWebrtc,getVisitorInfo$3(),getCurrentPage(e),n,i,o,t)]},pageVisitBatchAction=function(e){var t=getCampaignId(e),n=getVisitorGuid(e),i=!isPoppedOut(e)&&!getSessionInfo(getVisitorGuid(e)).isEmbeddedPoppedOut,o=getCustomVariableResult(e),a=isHeartbeatEnabled(e),r=isAutoInvitationEnabled(e);return batchAction([].concat(n?[]:newVisitorActions(e),[o&&setCustomVariables(o,t),0!==t||o?null:checkDynamicCampaign(),pageVisit(t,getCurrentPage(e)),getChatButton(t),checkIfOnline(t),i?restoreChat():null,a&&checkManualInvitation(t),r&&checkAutoInvitation(t)]))},updateCurrentUrlAction=function(e){var t=isDynamicCampaign(e),n=getCampaignId(e),i=getWindow(e),o=pageVisit(n,getCurrentPage(e));if(!i){var a=isAutoInvitationEnabled(e);return batchAction([o,t?checkDynamicCampaign():null,t?getDynamicCampaign():null,checkIfOnline(n),a&&checkAutoInvitation(n)])}return o},chatWindowOpenRequestChatAction=function(e,t,n){var i=getRequestChatAction(e,isDynamicCampaign(e)?0:t),o=i.source,a=void 0;return a="manualInvitation"===o.type||"button"!==o.type&&i.invitationtype===embeddedWindow,_extends({},i,{lastChattedAgents:n,isPrechatDone:a})},getSiteInfoActions=function(e){var t=[];return getAgentsCount(e)<3&&t.push(getAgents()),isDepartmentEnabled(e)&&t.push(getDepartments()),t},handleMessages=function(e,t){return e.map(function(e){var n=e.type,i=(e.content,e.translated),o=e.originalMessage,a=objectWithoutProperties(e,["type","content","translated","originalMessage"]);return!t||n!==agentAddTextMessage&&n!==visitorAddTextMessage&&"agentTyping"!==n&&"visitorTyping"!==n?_extends({},a,{type:n,translated:i,originalMessage:o}):_extends({type:n},a,{translated:base64_1.encode(i),originalMessage:base64_1.encode(o),encoding:t})})},getChatData=function(e){var t=getVisitorStatus(e),n=getEncoding(e),i="offlineMessage"===t?[]:handleMessages(getSourceMessages(e),n),o=getCurrentPage(e),a=getCampaignId(e),r=getFields(e,"prechat",a),s=getIsChatbot(e),d=getChatBot(e),c=getPageInfo(),l=c.popout,u=getVisitorInfo$3(),p=u.name,h=u.email,f=u.form,g=createSubmitForm(genFormData(r));f&&f.custom&&Object.keys(f.custom).forEach(function(e){var t=r.filter(function(t){return t.label===e});t.length>0&&(g.custom[t[0].id]=g.custom[t[0].id]||f.custom[e].join&&f.custom[e].join(splitter))});var m=_extends({},g,{name:p,email:h,phone:g.phone||f?f.phone:"",company:g.company||f?f.company:""});return l&&l.ticketId&&!Number.isNaN(+l.ticketId)&&(m.ticketId=+l.ticketId),l&&l.departmentId&&!Number.isNaN(+l.departmentId)&&(m.department=+l.departmentId),_extends({chatGuid:getChatGuid(e),messages:i,source:getRequestChatSource(e),requestingPageUrl:o.url,requestingPageTitle:o.title,botId:s&&d?d.id:0},m,{maxAgentReadGuid:getMaxAgentReadId(e),maxVisitorReadGuid:getMaxVisitorReadId(e),emailToSendTranscript:getEmailToSendTranscript(e)})},webActionTypes$4=actionTypes,isNeedRetryAction=function(e){return findAction(e,webActionTypes$4.pageVisit)||findAction(e,webActionTypes$4.requestChat)||findAction(e,webActionTypes$4.requestChatFromChatbot)||findAction(e,webActionTypes$4.submitOfflineMessage)},checkServerTag=function(e,t){var n=e.split("-"),i=n[0],o=n[1],a=t.split("-"),r=a[0],s=a[1];return i===r&&o!==s},checkIfRecoveringOrDone=function(e,t){var n=getServerInstanceTag(e),i=t.serverInstanceTag,o=t.error.serverInstanceTag;return getIsRecovering(e)||n&&o&&checkServerTag(i,o)&&n===o},checkIfNeedRecover=function(e,t){var n=getLastSuccessTime(e),i=Date.now()-n<12e4,o=getServerInstanceTag(e),a=t.error.serverInstanceTag;return i&&(!o||o&&a&&checkServerTag(o,a))},retryRequestChat=function(e){var t=getCampaignId(e),n=getCustomVariableResult(e),i=getCurrentPage(e);return[n&&setCustomVariables(n,t),pageVisit(t,i)]},getRecoverActions=function(e,t){if(findAction(t,actionTypes.recoverVisitor))return t;var n=t.type===webActionTypes$4.batchAction?t.actions:t,i=getChatData(e),o=recoverVisitorActions(e,i);if(findAction(t,webActionTypes$4.requestChat)){var a=retryRequestChat(e);return batchAction(o.concat(a).concat(n))}return batchAction(o.concat(n))},getRetryActions=function(e,t){var n=t.type===webActionTypes$4.batchAction?t.actions:t,i=newVisitorActions(e);if(findAction(t,webActionTypes$4.requestChat)){var o=retryRequestChat(e);return batchAction(i.concat(o).concat(n))}return batchAction(i.concat(n))},visitorWhenNotExist=function(e,t,n,i){var o=e.getState;e.dispatch;return function(e){var a=e.input,r=e.error.code,s=o(),d=findAction(a,webActionTypes$4.newVisitor);if(1004===r){if(checkIfRecoveringOrDone(s,e)&&!isNeedRetryAction(a))return e;if(d)throw e;if(checkIfNeedRecover(s,e)){var c=getRecoverActions(s,a);return t(c,n,i)}if(isNeedRetryAction(a)){var l=getRetryActions(s,a);return t(l,n,i)}}else if(1050===r){if(checkIfRecoveringOrDone(s,e)&&!isNeedRetryAction(a))return e;if(checkIfNeedRecover(s,e)||isNeedRetryAction(a)){var u=getRecoverActions(s,a);return t(u,n,i)}}throw e}},sendGetArticles$2=function(e,t,n){var i=getSiteId(n),o=getkbId(n),a=getkbRowcount(n),r=[getKBAPIUrl(n),"/client/articles?",""!==i?"siteid="+i:"",o?"&kbId="+o:"",a?"&rowcount="+a:"",t?"&keywords="+encodeURIComponent(t):""].join("");get$2(r).then(function(t){e(updateKBEntities("window/success-articles",t.output))}).catch(function(){e(getArticlesError$1())})},sendGetArticleByID$2=function(e,t,n){var i=getSiteId(n),o=[getKBAPIUrl(n),"/client/articles/",t,"?",i?"siteid="+i:""].join("");updateKBEntities("window/success-articleByID",void 0),get$2(o).then(function(t){e(updateKBEntities("window/success-articleByID",t.output)) }).catch(function(t){e(404===t.error.statusCode?updateKBEntities("window/success-articleByID",{}):updateKBEntities("window/success-articleByID",void 0))})},_preDispatchActionMap,_postDispatchActionMa,getChatMessagesAction=function(e){return getChatMessages(getChatGuid(e),getMaxMessageId(e))},chatHeartbeatActions=function(e){var t=getMaxMessageId(e),n=getChatGuid(e),i=getWinMessages(e),o=getVisitorPendingMessages(i),a=getSendFileMessages(n,i),r=[].concat(o),s=getVisitorTyping(e),d=getIfEnableVisitorSeeMsgSentSeen(e),c=getIfChatting(e),l=getIfWaitingOrChatting(e),u=getIfInvited(e),p=getMaxAgentReadId(e),h=getMaxGuid(e);if(s){var f=getDraft(e);r.push({type:"visitorTyping",content:f,sender:{type:"visitor"},id:i.length+t+1,guid:uuid()})}return a.concat([0===r.length?null:sendChatMessages(n,r),(l||u)&&getChatMessages(n,t),getIsChatted(e)&&pageHeartbeat(),d&&c&&!isAfterMaxMessage(p,h,getWinMessages(e))&&visitorGetLatestMsgSeen(n)])},preDispatchActionMappers=(_preDispatchActionMap={},_preDispatchActionMap["chatWindow/open"]=function(e,t){var n=e.campaignId,i=getIfSkipPreChat(t),o=void 0;if(i){var a=getFields(t,"prechat",n);if(!a.some(function(e){return""!==e.error})){var r=getPageInfo(),s=r.popout;o=createSubmitForm(genFormData(a)),s&&s.ticketId&&!Number.isNaN(+s.ticketId)&&(o.ticketId=+s.ticketId),s&&s.departmentId&&!Number.isNaN(+s.departmentId)&&(o.department=+s.departmentId)}}var d=getLastChattedAgents();return batchAction([isBBSCode(t)?checkBBSCode():null,getChatWindowConfig(),o&&chatWindowOpenRequestChatAction(t,n,d),o&&submitPrechat(o,n),_extends({},chatWindowOpenRequestChatAction(t,n,d),o?{isPrechatDone:!0}:{}),isDynamicCampaign(t)?getDynamicCampaign():null,getCustomVariables$1(t)?getCustomVariables():null].concat(getSiteInfoActions(t),[getChatMessages(null,-1)]))},_preDispatchActionMap["invitaton/refuse"]=function(e,t){var n=getCampaignId(t),i=getInvitationObject(t);return refuseInvitation(n,i.isManual,i.id)},_preDispatchActionMap["web/prechatHeartbeat"]=function(e,t){return isInactive(t)?null:prechatHeartbeat()},_preDispatchActionMap["web/offlineHeartbeat"]=function(e,t){return isInactive(t)?null:offlineMessageHeartbeat()},_preDispatchActionMap["web/chatHeartbeat"]=function(e,t){if(isInactive(t))return null;if(!getWindow(t))return null;if(getIsRecovering(t))return null;var n=getChatStatus(t);if(n===invited){var i=getRequestChatSourceType(t);if("autoInvitation"===i)return pageHeartbeat();if("manualInvitation"===i)return batchAction([checkManuallyInvited(getChatGuid(t)),getChatMessagesAction(t)])}var o=[];return n===waiting&&o.push(getChatQueue(getChatGuid(t))),batchAction(o.concat(chatHeartbeatActions(t)))},_preDispatchActionMap[updateWindowStatus]=function(e,t){if(e!==close)return null;if(isInactive(t))return null;var n=getWindowTab(t),i=getChatStatus(t),o=getWindowId(t);if(n===prechat||n===offline||n===kb)return closeWindow();if(n===chat){if(i===invited){var a=getRequestChatAction(t,o).source,r=a.type,s=a.invitationId;return emit("livechat.invitation.refuse",s),refuseInvitation(o,"manualInvitation"===r,s)}if(i===waiting)return batchAction([endChat(getChatGuid(t)),getChatMessagesAction(t)])}return null},_preDispatchActionMap["form/submit-social"]=function(e,t){return batchAction([socialLogin(e),_extends({},getRequestChatAction(t,getWindowId(t)),{lastChattedAgents:getLastChattedAgents(),isPrechatDone:!0,skipSSO:!0})])},_preDispatchActionMap["web/submitSSOInfo"]=function(e,t){var n=getRequestChatAction(t,getWindowId(t)),i=getLastChattedAgents();return batchAction([submitSSOInfo(e,getWindowId(t)),_extends({},n,{isFromKB:!0,lastChattedAgents:i})])},_preDispatchActionMap["web/submitSSOInfo4ChatBot"]=function(e,t){return submitSSOInfo(e,getWindowId(t))},_preDispatchActionMap["web/setLocation"]=function(e,t){return setLocation(e,getChatGuid(t))},_preDispatchActionMap["web/getVisitorInfo"]=function(){return getVisitorInfo()},_preDispatchActionMap[showInvitation]=function(e,t){return batchAction([e.isManual?manualInvitationShowed(e.id):null].concat(getSiteInfoActions(t)))},_preDispatchActionMap["web/skipLogin"]=function(e,t){var n=getRequestChatAction(t,getWindowId(t)),i=getLastChattedAgents();return _extends({},n,{skipSSO:!0,lastChattedAgents:i})},_preDispatchActionMap["web/startChatAgain"]=function(e,t){var n=requestChat(isDynamicCampaign(t)?0:getWindowId(t),{type:"button",page:getCurrentPage(t)}),i=getLastChattedAgents();return _extends({},n,{lastChattedAgents:i})},_preDispatchActionMap["web/fromChatbotToAgent"]=function(e,t){if(isChattingWithBot(t)){var n=getRequestChatFromChatbotAction(t,getWindowId(t));return batchAction([n,getChatQueue(getChatGuid(t))])}return null},_preDispatchActionMap["web/submitRating"]=function(e,t){var n=getChatGuid(t);return submitRating(n,e)},_preDispatchActionMap["web/emailTranscript"]=function(e,t){var n=getChatGuid(t);return emailTranscript(n,e)},_preDispatchActionMap["web/sendAction"]=function(e){return e},_preDispatchActionMap["web/endChat"]=function(e,t){return batchAction([endChat(getChatGuid(t)),getChatMessagesAction(t)])},_preDispatchActionMap["web/chatBotAnswerHelpful"]=function(e,t){return isChattingWithBot(t)?chatBotAnswerHelpful(getChatGuid(t),e):null},_preDispatchActionMap["web/chatBotSelectQuestion"]=function(e,t){return getIfChatting(t)?e.agentId<=0&&!isChattingWithBot(t)?null:e.agentId>0&&!checkInvolvedAgent(t,e.agentId)?null:chatBotSelectQuestion(getChatGuid(t),e):null},_preDispatchActionMap["web/chatBotVisitorCancelBotForm"]=function(e,t){return chatBotVisitorCancelBotForm(getChatGuid(t),e)},_preDispatchActionMap["web/chatBotVisitorSubmitBotForm"]=function(e,t){return chatBotVisitorSubmitBotForm(getChatGuid(t),e)},_preDispatchActionMap["chatWindow/showTab"]=function(e){return e===offline?enterOfflineMessage():null},_preDispatchActionMap["web/updateCustomVariables"]=function(e,t){var n=isDynamicCampaign(t)?0:getCampaignId(t);return batchAction([setCustomVariables(e,n),isDynamicCampaign(t)?getDynamicCampaign():null,checkIfOnline(n),checkAutoInvitation(n)])},_preDispatchActionMap["window/closeMinimizeBubble"]=function(e,t){return isWindowManualInvited(t)?(emit("livechat.invitation.refuse"),refuseInvitation(getWindowId(t),!0)):null},_preDispatchActionMap["web/getChatButton"]=function(e){var t=e.campaignId,n=e.alreadyCampaignId;return batchAction([getChatButton(t,n),checkIfOnline(t)])},_preDispatchActionMap["web/sendPageVisit"]=function(e,t){return pageVisitBatchAction(t)},_preDispatchActionMap["web/updateUrl"]=function(e,t){return updateCurrentUrlAction(t)},_preDispatchActionMap["web/getConfig"]=function(){return getConfig()},_preDispatchActionMap["web/getChatWindowConfig"]=function(){return getChatWindowConfig()},_preDispatchActionMap["web/fromKBToAgent"]=function(e,t){var n=getLastChattedAgents(),i=getRequestChatAction(t,getWindowId(t));return _extends({},i,{lastChattedAgents:n,isFromKB:!0})},_preDispatchActionMap["web/agentMsgSeenByVisitor"]=function(e,t){var n=getChatStatus(t)===chatting||getChatStatus(t)===invited||getChatStatus(t)===waiting,i=getMaxVisitorReadId(t),o=getWinMessages(t),a=getMaxGuid(t),r=e||a,s=getChatGuid(t);if(s){if(!isSentAndSeenAgentMessage(o,a)){var d=getMaxAgentMessage(o,i);return d&&d!==r&&d!==i&&n?agentMsgSeenByVisitor(s,d):null}if(r&&n&&r!==i&&!isAfterMaxMessage(i,a,o))return agentMsgSeenByVisitor(s,r)}return null},_preDispatchActionMap),postDispatchActionMappers=(_postDispatchActionMa={},_postDispatchActionMa["window/sendText"]=function(e,t){if(getChatStatus(t)===invited){isWindowManualInvited(t)?emit("livechat.invitation.accept"):emit("livechat.invitation.accept",getRequestChatInvitationId(t));var n=getRequestChatAction(t,getWindowId(t)),i=getLastChattedAgents();return batchAction([_extends({},n,{isPrechatDone:!0,lastChattedAgents:i})].concat(chatHeartbeatActions(t)))}return batchAction(chatHeartbeatActions(t))},_postDispatchActionMa),ignoreJsError=function(e){return function(t){if(t instanceof Error)throw t;return e(t)}},addChatVersionAndStatus=function(e,t){if(!e)return e;var n=getChatIdentity(t),i=n.chatVersion;return e.actions?(e.actions.forEach(function(e){return Object.assign(e,{chatVersion:i})}),e):Object.assign(e,{chatVersion:i})},encodeMessages=function(e,t){return e.map(function(e){var n=e.content,i=objectWithoutProperties(e,["content"]);return _extends({content:i.encoding?n:base64_1.encode(n),encoding:t},i)})},addSessionId=function(e){if(!e)return e;var t=getVisitorSessionId();return e.actions?(e.actions.forEach(function(e){return Object.assign(e,{sessionId:t})}),e):_extends({},e,{sessionId:t})},web=function(e){var t=e.getState;return function(n){var i=function n(i,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return Promise.resolve(e)},r=getEncoding(t()),s=findAction(i,actionTypes.sendChatMessages);r&&s&&(s.messages=encodeMessages(s.messages,r)),checkIfStartRecover(e,i);var d=getServerInstanceTag(t());return send(getVisitorUrl(t()),addSessionId(i),o,d).then(handleRecoverChat()).then(waitSystemProcessing(e)).then(a).then(function(t){return handleWebResponse(e,t,n),updateLastSuccessTime(e,t),t}).catch(ignoreJsError(handleServerInactive(e,n))).catch(ignoreJsError(recordServerInstanceTag())).catch(ignoreJsError(visitorWhenNotExist(e,n,o,a))).catch(ignoreJsError(showError$1(e))).catch(ignoreJsError(handleRecoverError(e))).catch(ignoreJsError(checkBan$1(e))).catch(ignoreJsError(function(t){throw 1===t.error.code&&e.dispatch(cleanPendingMessages$1()),t}))},o=function(e,t,o,a){return i(t,null,o).catch(function(t){var i=t.error.message;throw n(submitFail(e)),n(showError(i)),a&&a(i),t})};return function(e){"web/getArticles"===e.type?sendGetArticles$2(n,e.payload,t()):"web/getArticleByID"===e.type&&sendGetArticleByID$2(n,e.payload,t());var a=preDispatchActionMappers[e.type];if(a){var r=a(e.payload,t());if(r){addChatVersionAndStatus(r,t());var s=i(r);if("web/getConfig"===e.type||"web/sendPageVisit"===e.type||"web/prechatHeartbeat"===e.type||"web/getChatButton"===e.type||"web/getChatWindowConfig"===e.type)return s;if(e.type===updateWindowStatus&&e.payload===close&&isPoppedOut(t()))return s}return n(e)}if("web/pageHeartbeat"===e.type)return isInactive(t())?null:(i(checkManualInvitation(getCampaignId(t()))),getButtonIds(t()).forEach(function(e){return i(getIfOnline(+e))}),null);if("window/sendFile"===e.type){var d=e.payload;if(!d)return null;if(isSendingFile(t()))return null;var c=getFileSizeLimit(t()),l=getFileUploadCount(t()),u=getFileCountLimit(t()),p=getFileServiceUrl(t());return l>=u?(n(chatInputWarning$1("maxFileCount",{fileCount:u})),Promise.resolve()):d.size>c*Math.pow(2,20)?(n(chatInputWarning$1("maxFileSize",{fileSize:c})),Promise.resolve()):0===d.size?(n(chatInputWarning$1("emptyFile")),Promise.resolve()):(n(e),i(sendFile(d,e.meta,getSiteId(t()),getVisitorGuid(t()),p),function(e,t){return n(updateUploadProgress$1(d.name,e,t))}).then(function(e){var t=e.output;return n(uploadSuccess$1(t))}).catch(ignoreJsError(function(e){var t=e.error;return n(uploadFail$1(t))})).catch(function(e){return n(uploadFail$1({message:e.message}))}))}if("web/submitPrechat"===e.type){var h=e.payload,f=h.form,g=h.onSuccess,m=h.onError,b=getRequestChatAction(t(),getWindowId(t())),w=_extends({},b,{lastChattedAgents:getLastChattedAgents(),ticketId:f.ticketId||b.ticketId,departmentId:null==f.department?b.departmentId:void 0,isPrechatDone:!0,skipSSO:!0});o("prechat",batchAction([submitPrechat(f,getWindowId(t())),w]),g,m)}else if("web/submitOfflineMessage"===e.type){var v=getWindowId(t()),y=e.payload,C=y.form,_=y.onSuccess,x=y.onError,S=getChatGuid(t()),k=_extends({},getRequestChatSource(t()));S&&(k.chatGuid=S);var A=function(e){var t=e&&{name:e.name,guid:e.guid,url:e.url};o("offline",submitOfflineMessage(v,_extends({},C,{attachment:t}),k),_,x)};if(C.attachment){var M=getField(t(),"offline",v,"attachment");i(uploadOfflineMessageFile(C,getSiteId(t()),getFileServiceUrl(t()),M)).then(function(e){var t=e.output;return A(_extends({},t))}).catch(function(e){var t=e.input,i=e.error;n(submitFail("offline")),n(updateError("offline",t.attachmentField.id,i.message))})}else A()}else if("web/submitPostChat"===e.type){var T=getChatGuid(t()),I=e.payload,P=I.form,W=I.onSuccess,D=I.onError;o("postchat",submitPostChat(T,P,getWindowId(t())),W,D).then(function(){return n(showTab(chat))})}var R=n(e),$=postDispatchActionMappers[e.type];if($){var O=$(e.payload,t());addChatVersionAndStatus(O,t()),O&&i(O)}return R}}},openCustomOffline=function(e){var t=e.isNewWindow,n=e.url,i=addHttp(n);t?global$2.open(i):location$1.href=i},customOffline=function(e){var t=e.dispatch,n=e.getState;return function(e){return function(i){var o=n();if("chatWindow/open"===i.type&&!i.payload.isRestoreChat&&!isOnline(o,i.payload.campaignId)){var a=getCustomOffline(o,i.payload.campaignId);if(a)return openCustomOffline(a),null}if("chatWindow/showTab"===i.type&&i.payload===offline){var r=getWindowId(o),s=getCustomOffline(o,r);if(s)return openCustomOffline(s),s.isNewWindow&&t(closeWindowSliently$1()),t(sendPageHeartbeat$1()),null}return e(i)}}},removeOpener="removeOpener",popin="popin",cobrowseEnd$1="cobrowese-end",restoreState$2="restoreState",getRestoreState$3="getRestoreState",_windowTitleMapper,windowTitleMapper=(_windowTitleMapper={},_windowTitleMapper.loading="titleChatWindow",_windowTitleMapper[login]="titlePreChatWindow",_windowTitleMapper[prechat]="titlePreChatWindow",_windowTitleMapper[offline]="titleOfflineMessageWindow",_windowTitleMapper[chat]="titleChatWindow",_windowTitleMapper[postchat]="titleChatWindow",_windowTitleMapper.ssoLogin="titlePreChatWindow",_windowTitleMapper),setWindowTitle=function(e){null!=e&&(document$2.title=e)},measureWindowSize=function(){try{var e=document$2.getElementById("chat_window_container");if(!e)return null;var t=e.contentWindow.document,n=t.querySelector(".whole-window").getBoundingClientRect();return{width:n.width,height:n.height}}catch(e){return null}},getWindowSize=function(e,t){var n=getWindowIframeStyle(e,t);return n?measureWindowSize()||n:{width:360,height:600}},openChatWindow=function(e,t,n){var i=getSiteId(e),o=getChatGroup(e),a=getCurrentPage(e),r=a.title,s=a.url,d=getVisitorGuid(e),c=getRequestChatInvitationId(e),l=getRequestChatSourceType(e)||"button",u=resourceUrl(e,["chatWindow.aspx","?siteId="+i,o?"&chatGroup="+o:null,api$1.version?"&version="+api$1.version:null,"&planId="+t,"#","&chatSource="+l,c?"&invitationId="+c:null,d?"&visitorGuid="+d:null,isMainServer(e)?null:"&isStandbyServer=1",r?"&title="+encodeURIComponent(r):null,s?"&url="+encodeURIComponent(s):null,"&openType="+n].join("")),p=getWindowSize(e,t),h=p.width,f=p.height,g=Math.max(h,380);return{win:global$2.open(u,"Comm100ChatWindow"+i,"width="+g+",height="+f+",left=200,top=100,status=no,toolbar=no,menubar=no,resizable=yes,location=no,titlebar=no"),url:u}},closeByJs=!1,closeChatWindow=function(){global$2.opener&&(global$2.opener=null),closeByJs=!0,global$2.close()},popout=function(e){var t=e.getState;return function(e){var n=null,i=function(e){return function(t){return e(JSON.parse(t.data))}},o=function(o){var a=o.win,r=o.url;if(!n){n=crossDomain(a,r,!0);var s=n.subscribe(i(function(i){if("popin"===i.type)s(),n=null,global$2.focus(),e(restoreState$1(i.payload)),updateSessionInfo({isEmbeddedPoppedOut:!1},getVisitorGuid(t()));else if("cobrowese-end"===i.type)try{global$2.GLANCE.Cobrowse.Visitor.stopSession()}catch(e){}else if("getRestoreState"===i.type){var o=global$2.restoreState;n&&n.dispatch({type:"restoreState",payload:o})}}))}},a=function(e){n&&n.dispatch({type:"popin",payload:e})},r=function(){n&&n.dispatch({type:"cobrowese-end"})};return global$2.addEventListener("beforeunload",function(){var e=t();isPoppedOut(e)&&isEmbeddedWindow(e,getCampaignId(e))&&!closeByJs&&!getIsSecureForm(e)&&a(e)}),function(s){var d=t();if(!d)return e(s);if("app/ready"===s.type&&null==n&&canPopIn(d)){var c=getCurrentPage(d).url||document$2.referrer;n=crossDomain(global$2.opener,c,!0);var l=n.subscribe(i(function(t){"removeOpener"===t.type?(l(),global$2.opener=null,e(setIsOpenerExists$1())):"restoreState"===t.type&&e(restoreState$1(t.payload))}))}if("chatWindow/showTab"===s.type&&isPoppedOut(d)&&setWindowTitle(getLanguage(d,windowTitleMapper[s.payload])),"window/mounted"===s.type&&isPoppedOut(d)){var u=getWindowTab(d);setWindowTitle(getLanguage(d,windowTitleMapper[u]))}if("chatWindow/open"===s.type){var p=s.payload.campaignId,h=getSessionInfo(getVisitorGuid(d))||{},f=h.isEmbeddedPoppedOut,g=isEmbeddedWindow(d,p);if(!isPoppedOut(d)&&(f||!g)){var m=openChatWindow(d,p,"chatWindow/open");return f&&o(m),null}}if(s.type===chatWindowPopOut){var b=getWindowId(d);if(!isPoppedOut(d)&&isEmbeddedWindow(d,b)){o(openChatWindow(d,b,chatWindowPopOut)),updateSessionInfo({isEmbeddedPoppedOut:!0},getVisitorGuid(d));var w=getChatGuid(d);w&&removeMediaChatWithNoCheck(w),n&&global$2.addEventListener("beforeunload",function(){n.dispatch({type:"removeOpener"})}),global$2.restoreState=d}}if("chatWindow/popIn"===s.type&&isPoppedOut(d)){var v=getChatGuid(d);return v&&removeMediaChatWithNoCheck(v),a(d),closeChatWindow(),null}if("window/endCobrowse"===s.type)return r(),null;if(("window/closeSliently"===s.type||s.type===updateWindowStatus&&s.payload===close)&&isPoppedOut(d)){var y=e(s);return y&&y.catch?(Promise.race([y.catch(function(){}),delay(3e3)]).then(closeChatWindow),null):(closeChatWindow(),null)}return"state/get-restore"===s.type&&n&&n.dispatch({type:"getRestoreState"}),e(s)}}},_messageCodeMappers,_messageCodeAPIMapper,p2pChat=void 0,appendMessage$1=function(e,t){return{type:e,time:new Date,content:t,guid:uuid(),sender:{type:"visitor"}}},startP2PChat=function(e){var t=getWebrtcUrl(e,"/webrtcSignalingService/signaling.ashx");p2pChat&&t&&p2pChat.start(t)},stopP2PChat=function(){p2pChat&&(p2pChat.stop(),p2pChat=null)},messageCodeMappers=(_messageCodeMappers={},_messageCodeMappers.agentVideoChatAccept=startP2PChat,_messageCodeMappers.agentAudioChatAccept=startP2PChat,_messageCodeMappers.agentVideoChatCancelRequest=stopP2PChat,_messageCodeMappers.agentVideoChatRefuse=stopP2PChat,_messageCodeMappers.agentVideoChatStop=stopP2PChat,_messageCodeMappers.agentAudioChatStop=stopP2PChat,_messageCodeMappers.agentAudioChatRefuse=stopP2PChat,_messageCodeMappers.agentAudioChatCancelRequest=stopP2PChat,_messageCodeMappers.systemAudioChatNoAnswer=stopP2PChat,_messageCodeMappers.systemAudioChatEnd=stopP2PChat,_messageCodeMappers.systemVideoChatNoAnswer=stopP2PChat,_messageCodeMappers.systemVideoChatEnd=stopP2PChat,_messageCodeMappers.visitorAudioChatCancelRequest=stopP2PChat,_messageCodeMappers.visitorAudioChatRefuse=stopP2PChat,_messageCodeMappers.visitorAudioChatStop=stopP2PChat,_messageCodeMappers.visitorVideoChatCancelRequest=stopP2PChat,_messageCodeMappers.visitorVideoChatRefuse=stopP2PChat,_messageCodeMappers.visitorVideoChatStop=stopP2PChat,_messageCodeMappers.visitorAudioChatAccept=startP2PChat,_messageCodeMappers.visitorVideoChatAccept=startP2PChat,_messageCodeMappers),messageCodeAPIMappers=(_messageCodeAPIMapper={},_messageCodeAPIMapper.agentVideoChatAccept="livechat.chat.video.start",_messageCodeAPIMapper.agentAudioChatAccept="livechat.chat.audio.start",_messageCodeAPIMapper.agentVideoChatStop="livechat.chat.video.stop",_messageCodeAPIMapper.agentAudioChatStop="livechat.chat.audio.stop",_messageCodeAPIMapper.systemVideoChatEnd="livechat.chat.video.stop",_messageCodeAPIMapper.systemAudioChatEnd="livechat.chat.audio.stop",_messageCodeAPIMapper.visitorAudioChatStop="livechat.chat.audio.stop",_messageCodeAPIMapper.visitorVideoChatStop="livechat.chat.video.stop",_messageCodeAPIMapper.visitorAudioChatAccept="livechat.chat.audio.start",_messageCodeAPIMapper.visitorVideoChatAccept="livechat.chat.video.start",_messageCodeAPIMapper.agentAudioChatRequest="livechat.chat.audio.request",_messageCodeAPIMapper.agentVideoChatRequest="livechat.chat.video.request",_messageCodeAPIMapper.visitorAudioChatRequest="livechat.chat.audio.request",_messageCodeAPIMapper.visitorVideoChatRequest="livechat.chat.video.request",_messageCodeAPIMapper.agentVideoChatRefuse="livechat.chat.video.refuse",_messageCodeAPIMapper.agentAudioChatRefuse="livechat.chat.audio.refuse",_messageCodeAPIMapper.visitorVideoChatRefuse="livechat.chat.video.refuse",_messageCodeAPIMapper.visitorAudioChatRefuse="livechat.chat.audio.refuse",_messageCodeAPIMapper.agentVideoChatCancelRequest="livechat.chat.video.cancel",_messageCodeAPIMapper.visitorVideoChatCancelRequest="livechat.chat.video.cancel",_messageCodeAPIMapper.agentAudioChatCancelRequest="livechat.chat.audio.cancel",_messageCodeAPIMapper.visitorAudioChatCancelRequest="livechat.chat.audio.cancel",_messageCodeAPIMapper.systemAudioChatNoAnswer="livechat.chat.audio.noanswer",_messageCodeAPIMapper.systemVideoChatNoAnswer="livechat.chat.video.noanswer",_messageCodeAPIMapper),exist$1=function(e,t){return getMessages(e).filter(function(e){return e.type===t}).length>0},audioVideo=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(i){var o=function(e){var t=new P2PChat(e);return t.onevent(function(e,t){if("error"===e)n(hangupAudioVideoChat$1());else if("start"===e){if(!p2pChat)return;var i=p2pChat.getRemoteVideo();i&&addClass(i,"mediaChatWindow__remoteVideo--loading")}else if("remoteStreamReceived"===e){if(!p2pChat)return;var o=p2pChat.getRemoteVideo();o&&removeClass(o,"mediaChatWindow__remoteVideo--loading")}}),t},a=t();if("footer/chatToolAudio"===i.type)return p2pChat||(p2pChat=o({chat:getChatGuid(a)})),p2pChat.requirePermission(!1).then(function(){var t=appendMessage$1(pendingAudioRequesting,"");n(sendChatMessages$2([t])),e(i)}),null;if("footer/chatToolVideo"===i.type)return p2pChat||(p2pChat=o({chat:getChatGuid(a)})),p2pChat.requirePermission(!0).then(function(){var t=appendMessage$1(pendingVideoRequesting,"");n(sendChatMessages$2([t])),e(i)}),null;i.type===chatWindowPopOut?(stopP2PChat(),removeMediaChat(getChatGuid(a))):"chatWindow/popIn"===i.type&&stopP2PChat();var r=e(i),s=t(),d=getVideoStatus(s),c=getVideoStatus(a);if("sideWindow/hideAudioVideoChat"===i.type)p2pChat&&p2pChat.hideVideos();else if("window/prepareP2pChat"===i.type)setMediaChat(getChatGuid(s)),p2pChat&&p2pChat.setVideoContainers(i.payload.localVideoContainer,i.payload.remoteVideoContainer);else if(i.type===updateMessages){var l=void 0;i.payload.forEach(function(e){l=messageCodeAPIMappers[e.type]}),l&&emit(l),p2pChat&&i.payload.forEach(function(e){var t=messageCodeMappers[e.type];t&&t(s)}),p2pChat||"videoChatting"!==d&&"audioChatting"!==d||(p2pChat=o({chat:getChatGuid(s)}),p2pChat.requirePermission("videoChatting"===d).then(function(){return startP2PChat(s)}))}else if("window/acceptAudioVideoChat"===i.type)p2pChat||(p2pChat=o({chat:getChatGuid(s),localVideoContainer:i.payload.localVideoContainer,remoteVideoContainer:i.payload.remoteVideoContainer})),p2pChat.requirePermission("videoIncoming"===d).then(function(){var e=appendMessage$1(pendingAccept,d);n(sendChatMessages$2([e]))});else if("window/hangupAudioVideoChat"===i.type&&(stopP2PChat(),!exist$1(s,pendingHangup))){var u=appendMessage$1(pendingHangup,c);n(sendChatMessages$2([u]))}return r}}},messageHandler$1=function(e,t){var n=debounce(function(){return t(removeAgentIsTyping$1())},1e4,!1);return function(t){var i=t.type,o=t.sender,a=t.content,r=e();if("agentTyping"===i)n();else if("agentJoinChat"===i||"agentAcceptChat"===i||"agentAcceptTransfer"===i){var s=a.agent;emit("livechat.chat.agent.join",s)}else if("agentTransferChat"===i||"agentTransferChatToDepartment"===i){var d=getAgent(r,o.id);emit("livechat.chat.agent.transfer",d)}else if("agentEndChat"===i){var c=getAgent(r,o.id);emit("livechat.chat.agent.leave",c)}}},messages=function(e){var t=e.getState;return function(e){var n=messageHandler$1(t,e);return function(t){var i=e(t);return t.type===updateMessages&&t.payload.forEach(n),i}}},max$1=Math.pow(2,31),button$2=max$1-6,invitationMask=max$1-5,invitation=max$1-4,sidewindow=max$1-7,sidewindowMobile=max$1-5,cobrowseBtn=sidewindow+1,moveDiv=max$1-1,popupWindowContainer=2,popupSideWindowContainer=popupWindowContainer-1,popupMobileSideWindowContainer=popupWindowContainer+1,isBrowseSupportCobrowse=!isIE9,isHTTPS=0===global$2.location.href.indexOf("https://")||!1,glanceCookieKey="glance_ssn_info",getCss=function(e,t){var n=getButtonColor(e),i=checkIfLightColor(e);return"#glance_cobrowse_btn>:not(#glance_scrim):not(#glance_confirm):not(#glance_msg_box){display:none !important}#glance_cobrowse_btn{z-index:"+moveDiv+' !important}#glance_confirm{width:240px;padding:30px;color:#000 !important;border-radius:4px;background:#fff;font-size:14px;box-shadow:0px 0px 10px rgba(0,0,0,0.2);}#glance_confirm_msg{padding-bottom:20px;}#glance_confirm_msg::before{content:"'+t+'";}#glance_yes,#glance_no{padding:5px 10px;border-radius:3px;text-decoration:none !important;display:inline-block;margin:0 10px !important;font-weight:normal !important;}#glance_yes{background-color:'+n+";color:#"+(i?"#3c3c3c":"#fff")+" !important;border:none !important;}#glance_no,#glance_no:hover{border:1px solid #ccc !important;color:#000 !important;}"},remoteControlEnableColor="#cd0808",remoteControlDisableColor="#f1d00f",border=document$2.createElement("div");border.id="comm100-cobrowse-border",Object.assign(border.style,{position:"fixed",pointerEvents:"none",top:0,bottom:0,right:0,left:0,margin:"auto",borderStyle:"solid",borderWidth:"3px",borderColor:"#f1d00f"}),border.style.position="fixed";var cobrowseDebug=global$2.location.search.indexOf("cobrowseDebug")>=0,loadScript$1=function(e,t){var n={src:e,id:"cobrowsescript","data-groupid":t,"data-site":"production",charset:"UTF-8"},i=getPossibleDomain(global$2.location.host);return i?n["data-cookiedomain"]=i:n["data-cookietype"]="ls",loadResource("script",n,document$2.head,function(){return global$2.GLANCE})},cssContainer=void 0,loadCss=function(e,t){return cssContainer?(cssContainer.textContent=getCss(e,t),Promise.resolve()):loadResource("style",{textContent:getCss(e,t)},document$2.head,function(){return!0}).then(function(e){cssContainer=e})},loadScriptOnce=once(loadScript$1),glancePendingActions=[],pendingLoadingGlanceCss=!1,cobrowsing=function(e){var t=e.getState,n=e.dispatch,i=function(){var e=get$1(glanceCookieKey),t="";try{t=JSON.parse(decodeURIComponent(e)).ssnid.split(".")[2]}catch(e){}n(startCobrowse(t))},o=function(){n(endCobrowse$1())},a=function(e){var t=e&&e.enabled;border.style.borderColor=t?"#cd0808":"#f1d00f"},r=function e(r){var s=global$2.GLANCE.Cobrowse.Visitor;try{s.removeEventListener("sessionend",e),s.removeEventListener("sessionstart",i),s.removeEventListener("rc",a),s.removeEventListener("error",o),document$2.body.removeChild(border)}catch(e){}t().window&&n(endCobrowse$1())},s=function(e,t,n,s,d){var c=getGlanceSessionInfo(),l=!d;if(l&&!c){var u={ssnid:t+"."+n+"."+s,R:1,yb:!0,Od:!1,Fa:[getPossibleDomain(global$2.location.host)],boxstate:3,expanded:!1};set$1(glanceCookieKey,encodeURIComponent(JSON.stringify(u)))}return loadScriptOnce(e,t).then(function(){var e=global$2.GLANCE.Cobrowse,t=e.VisitorUI,s=e.Visitor;try{t.showButton(!0),l||s.startSession(n),s.addEventListener("sessionend",r),s.addEventListener("sessionstart",i),s.addEventListener("rc",a),s.addEventListener("error",o),glancePendingActions.forEach(function(t){try{var n,i=t[0],o=t[1],a=t.slice(2);(n=e[i])[o].apply(n,a)}catch(e){}}),document$2.body.appendChild(border)}catch(e){}glancePendingActions=[]})};return function(e){return function(i){var o=t(),a=isCobrowsing(o),r=isRequestingCobrowsing(o),d=e(i),c=t(),l=isCobrowsing(c),u=isRequestingCobrowsing(c),p=isCobrowseSupported(c),h=p&&isBrowseSupportCobrowse&&isHTTPS;if(pendingLoadingGlanceCss){if(hasWindowLanguagesData(c)){var f=getWindowMainColor(c),g=getLanguageCobrowseAllowControl(c);loadCss(f,g),pendingLoadingGlanceCss=!1}}if(!r&&u&&(h||(e(cleanUpCobrowseRequest$1()),isBrowseSupportCobrowse?p?isHTTPS||n(httpNotSupportCobrowse()):n(notSupportCobrowse()):n(browserNotSupportCobrowse()))),!a&&l){var m=getCobrowseSessionCode(c),b=getCobrowseGroupId(c),w=getCobrowseCallId(c),v=cobrowseDebug?absoluteURL(t(),"cobrowse/GlanceCobrowseLoader_3.3.0M.js"):"https://web.archive.org/web/20200712011611/https://www.glancecdn.net/cobrowse/CobrowseJS.ashx?group="+b+"&site=production";if(h){if(hasWindowLanguagesData(c)){var y=getWindowMainColor(c),C=getLanguageCobrowseAllowControl(c);loadCss(y,C)}else pendingLoadingGlanceCss=!0;s(v,b,m,w,r)}}if(a&&!l&&c.window)if(global$2.GLANCE){var _=global$2.GLANCE.Cobrowse.Visitor;try{_.stopSession()}catch(e){}}else isPoppedOut(c)&&canPopIn(o)?n(endCobrowseFromCrossDomain()):glancePendingActions.push(["Visitor","stopSession"]);return d}}},middleware$$1=void 0;middleware$$1=applyMiddleware(thunk,customOffline,popout,audioVideo,web,persistent,messages,notification,cobrowsing);var Children={only:function(e){return e&&e[0]||null}};proptype.isRequired=proptype;var PropTypes={element:proptype,func:proptype,shape:function(){return proptype},instanceOf:function(){return proptype}},subscriptionShape=PropTypes.shape({trySubscribe:PropTypes.func.isRequired,tryUnsubscribe:PropTypes.func.isRequired,notifyNestedSubs:PropTypes.func.isRequired,isSubscribed:PropTypes.func.isRequired}),storeShape=PropTypes.shape({subscribe:PropTypes.func.isRequired,dispatch:PropTypes.func.isRequired,getState:PropTypes.func.isRequired}),_typeof$1="function"==typeof Symbol&&"symbol"===_typeof(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof(e)},classCallCheck$1=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},_extends$2=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n},possibleConstructorReturn$1=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":_typeof(t))&&"function"!=typeof t?e:t},didWarnAboutReceivingStore=!1,Provider=createProvider(),REACT_STATICS={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},KNOWN_STATICS={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},isGetOwnPropertySymbolsAvailable="function"==typeof Object.getOwnPropertySymbols,index$1=function(e,t,n){if("string"!=typeof t){var i=Object.getOwnPropertyNames(t);isGetOwnPropertySymbolsAvailable&&(i=i.concat(Object.getOwnPropertySymbols(t)));for(var o=0;o0&&h("div",{ref:function(t){t&&(e.newMessageCount=t)},className:index$4("chatButton--newMessage",this.state.ifReceiveNewMessage&&"chatButton--newMessageAnimation"),onAnimationEnd:this.removeAnimationClass,"aria-label":y.unread},o)))},t}(Component),getStyle$1=function(e,t,n,i,o){return{border:"none",width:e,height:t,position:"fixed",right:n,bottom:i,zIndex:button$2,display:o?"none":"block"}},Adaptive=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.onClick=i.onClick.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){this.props.onMounted(this.props.button.id),this.props.button.isHidden||emit("livechat.button.show",this.props.button);var e=document$2.querySelector("#"+this.props.button.divId+" iframe");e&&e.getBoundingClientRect()},t.prototype.componentDidUpdate=function(e){var t=!!this.props.button.isHidden;if(t!==!!e.button.isHidden){emit("livechat.button."+(t?"hide":"show"),this.props.button)}},t.prototype.componentWillUnmount=function(){this.timer||clearTimeout(this.timer)},t.prototype.onClick=function(e){var t=this.props,n=t.invitation,i=t.onAccept,o=t.onClick;n?(e.preventDefault(),i(this.props.invitation)):o(e)},t.prototype.render=function(){var e=this.props,t=e.button,n=e.windowStatus,i=e.messageCount,o=e.isMobile,a=e.online,r=e.invitation,s=e.onTouchStart,d=e.onMouseEnter,c=this.props.button.chatWindowLink,l=!!r,u=this.props.button.offset||{right:0,bottom:0},p=getLanguages(this.context),f=void 0,g=void 0;return l?(f=p.acceptInv,g=p.invitation):a?(f=p.online,g=p.chatBtn):(f=p.offline,g=p.chatBtn),h(Iframe,{style:getStyle$1(110,110,u.right,u.bottom,t.isHidden),title:g},h(Adaptive$1,{"aria-label":f,isMobile:o,ifRipple:a&&!l,onClick:this.onClick,href:c,count:i,status:n,online:a,campaignId:t.id,iconStyle:t.svg,mainColor:t.color,customCSS:t.customCSS,onTouchStart:s,onMouseEnter:d}))},t}(Component),adaptive$1=migration(validation(render$4(language(Adaptive)))),isSameOnline=function(e,t){if(!e&&t)return!1;if(!t&&e)return!1;if(!t&&!e)return!0;var n=[].concat(e),i=[].concat(t);return n.length===i.length&&n.every(function(e,t){return e.timespan===i[t].timespan&&e.duration===i[t].duration})},heartbeat=function(e){return validation(function(t){function n(e){classCallCheck(this,n);var i=possibleConstructorReturn(this,t.call(this,e));return i.timer=null,i.stopTimer=null,i.hOnline=[].concat(e.hOnline),i.setTimespan=i.setTimespan.bind(i),i.heartbeat=i.heartbeat.bind(i),i.tick=i.tick.bind(i),i.registerStop=i.registerStop.bind(i),i.clean=i.clean.bind(i),i.initial=i.initial.bind(i),i}return inherits(n,t),n.prototype.componentDidMount=function(){this.props.hOnline&&this.initial()},n.prototype.componentDidUpdate=function(e){e.hOnline&&!this.props.hOnline&&this.clean(),!e.hOnline&&this.props.hOnline&&(this.hOnline=[].concat(this.props.hOnline),this.initial()),!isSameOnline(e.hOnline,this.props.hOnline)&&e.hOnline&&this.props.hOnline&&(this.clean(),this.hOnline=[].concat(this.props.hOnline),this.initial())},n.prototype.componentWillUnmount=function(){this.clean()},n.prototype.setTimespan=function(){var e=this.hOnline.shift();e&&(this.duration=e.duration,this.timespanTimer=setTimeout(this.setTimespan,1e3*e.timespan))},n.prototype.initial=function(){this.setTimespan(),this.tick(),this.registerStop(),this.props.hDelay||this.props.hCallback(this.props),this.props.hOnInit&&this.props.hOnInit.call()},n.prototype.heartbeat=function(){if(this.props.hCallback(this.props),!this.duration)return void(this.heartbeatTimer=null);this.tick()},n.prototype.tick=function(){var e=void 0!==this.props.hOffline?this.props.hOffline:this.duration;this.heartbeatTimer=setTimeout(this.heartbeat,1e3*e)},n.prototype.registerStop=function(){var e=this;void 0!==this.props.hStop&&(this.stopTimer=setTimeout(function(){e.clean.call(),e.props.hOnStopped&&e.props.hOnStopped.call()},1e3*this.props.hStop))},n.prototype.clean=function(){this.heartbeatTimer&&clearTimeout(this.heartbeatTimer),this.timespanTimer&&clearTimeout(this.timespanTimer),this.stopTimer&&clearTimeout(this.stopTimer),this.heartbeatTimer=null,this.timespanTimer=null,this.stopTimer=null},n.prototype.render=function(){var t=this.props,n=(t.hOnline,t.hOffline,t.hCallback,t.hStop,objectWithoutProperties(t,["hOnline","hOffline","hCallback","hStop"]));return h(e,n)},n}(Component))},_mapping,floatButtonIdMapping={},floatId=2,createButton=memoize(10)(function(e,t){return t(e)}),mapping=(_mapping={},_mapping.monitor=monitor$1,_mapping.text=text$4,_mapping.image=image$2,_mapping.float=float$1,_mapping.adaptive=adaptive$1,_mapping),buttonFactory=function(e){var t=e.divId;if("float"===e.type)if(void 0!==floatButtonIdMapping[t])t=floatButtonIdMapping[t];else{var n="comm100-float-button-"+floatId,i=document$2.createElement("div");i.id=n;var o=document$2.getElementById("comm100-container");o.appendChild(i),floatButtonIdMapping[t]=n,t=n,floatId+=1}return createButton(document$2.getElementById(t),mapping[e.type])},ChatButton=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.componentDidMount=function(){this.props.onMounted()},t.prototype.render=function(){var e=this,t=this.props,n=t.buttons,i=t.siteId,o=t.onClick,a=t.onEachMounted,r=t.status,s=t.windowStatus,d=t.width,c=t.height,l=t.invitation,u=t.onPreload,p=t.isMobile,f=t.messageCount,g=t.onAccept,m=t.onRefuse,b=t.windowStyle;return h("div",null,n.map(function(t){var n=buttonFactory(t),w=r[t.id];return h(n,{fontCSS:e.props.fontCSS,invitation:l,messageCount:f,onAccept:g,onRefuse:m,online:w,button:t,siteId:i,onClick:function(n){n.preventDefault(),o(t,e.props.windowStatus,w)},onTouchStart:u,onMouseEnter:u,onMounted:a,key:t.id, isMobile:p,windowStatus:s,windowStyle:b,width:d,height:c,languageTag:t.languageTag})}))},t}(Component),ChatButton$1=heartbeat(validation(ChatButton)),isWindowOpenned$1=function(e){return e!==close},removeAds=function(){Array.prototype.slice.call(document$2.querySelectorAll(".comm100-powered-by")).forEach(function(e){e.parentNode.removeChild(e)})},getOnPreload=memoize(1)(function(e){var t=void 0;return function(){t||(t=document$2.createElement("link"),t.rel="preload",t.href=e,t.as="font",t.crossOrigin="anonymous",document$2.head.appendChild(t))}}),mapStateToProps$1=function(e){var t=getWindowStatus(e),n=getOnlineStatus(e),i=getAllButtonsWithVisibility(e).map(function(t){var n=getLanguageTag(e,t.id);if(t.languageTag=n,(t.imageOnline||t.imageOffline)&&(t.imageOnline=absoluteURL(e,t.imageOnline),t.imageOffline=absoluteURL(e,t.imageOffline)),(t.mobileImageOnline||t.mobileImageOffline)&&(t.mobileImageOnline=absoluteURL(e,t.mobileImageOnline),t.mobileImageOffline=absoluteURL(e,t.mobileImageOffline)),!t||"adaptive"!==t.type)return t;var i=t.id,o=getCustomCssByCampaignId(e,i);return _extends({},t,{customCSS:o})}),o=void 0;!isWindowOpenned$1(t)&&isHeartbeatEnabled(e)&&(o=getHeartbeatConfig(e));var a=void 0;Object.keys(n).every(function(e){return!n[e]})&&(a=getHeartbeatOfflineConfig(e));var r=getHeartbeatStopAfter(e),s=getInvitation(e);return s&&s.type!==bubble$1&&(s=null),{fontCSS:fontCSS(partial(resourceUrl,e)),buttons:i,status:n,windowStatus:t,siteId:getSiteId(e),isMobile:isMobile$1(e),onMounted:removeAds,hOnline:o,hOffline:a,hStop:r,hDelay:!0,width:getWidth(e),height:getHeight(e),invitation:s,onPreload:getOnPreload(resourceUrl(e,"/fonts/SourceSansPro-Regular.woff"))}},mapDispatchToProps=function(e){return{onEachMounted:function(){e({type:"onMounted"})},onClick:function(t,n,i){n===close&&(e(buttonClick$1(t.id)),e(chatWindowOpen$1(t.id)),i?buttonOnline():buttonOffline(),emit("livechat.button.click",t))},onAccept:function(t){var n=t.campaignId,i=t.id;emit("livechat.invitation.accept",i),e(invitatonAccept$1()),e(chatWindowOpen$1(n))},hCallback:function(){e(sendPageHeartbeat$1())},hOnInit:function(){e(setIsActive$1(!0))},hOnStopped:function(){e(setIsActive$1(!1))}}},Button=connect(mapStateToProps$1,mapDispatchToProps)(ChatButton$1),Mobile=function(e){function t(){classCallCheck(this,t);var n=possibleConstructorReturn(this,e.call(this));return n.state={titleColor:"#fff"},n.ele=null,n}return inherits(t,e),t.prototype.componentWillMount=function(){var e=checkIfLightColor(this.props.invitation.themeColor)?"#3c3c3c":"#ffffff",t=getButtonColor(this.props.invitation.themeColor),n=checkIfLightColor(this.props.invitation.themeColor);this.setState({titleColor:n?"#000":"#fff",buttonColor:t,textColor:e})},t.prototype.render=function(){var e=this,t=this.props.invitation,n=getLanguages(this.context);return h("div",{style:{position:"fixed",zIndex:invitationMask,width:"auto",height:"auto",overflow:"hidden",top:"0px",bottom:"0px",left:"0px",right:"0px",fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, sans-serif',backgroundColor:"rgba(0, 0, 0, 0.65)"}},h("div",{ref:function(t){e.ele=t},style:{position:"absolute",width:"88%",zIndex:invitation,top:"50%",left:"50%",marginLeft:"0px",marginTop:"0px",boxSizing:"border-box",maxWidth:"380px",transform:"translate(-50%, -50%)"}},h("div",{style:{height:"30px",lineHeight:"30px",width:"auto",backgroundColor:t.themeColor,fontSize:"14px",color:"white",textShadow:"rgba(0, 0, 0, 0.3) 1px 1px",paddingLeft:"14px",borderTopLeftRadius:"5px",borderTopRightRadius:"5px"}},h("span",{style:{fontWeight:"bold",color:this.state.titleColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%",display:"block"}},t.title)),h("div",{style:{backgroundColor:"white",borderBottomLeftRadius:"5px",borderBottomRightRadius:"5px",borderWidth:"1px",borderColor:t.themeColor,borderStyle:"solid",width:"auto"}},h("span",{style:{margin:"30px",textAlign:"center",fontSize:"20px",lineHeight:"25px",color:"#333",fontWeight:"bold",whiteSpace:"pre-wrap",maxHeight:"220px",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",webkitLineClamp:"10",webkitBoxOrient:"vertical"}},t.message),h("div",{style:{margin:"0 auto",width:"260px",height:"65px"}},h("button",{style:{display:"block",width:"120px",height:"35px",fontSize:"14px",color:"#333",textAlign:"center",float:"left",borderRadius:"3px",lineHeight:"35px",backgroundColor:"#ddd",marginRight:"20px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%",border:"none",padding:0,cursor:"pointer"},onClick:function(){return e.props.onRefuse(t)},"aria-label":n.refuseInv},t.refuseText),h("button",{style:{display:"block",width:"120px",height:"35px",fontSize:"14px",color:this.state.textColor,textAlign:"center",float:"left",borderRadius:"3px",lineHeight:"35px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%",backgroundColor:this.state.buttonColor,border:"none",padding:0,cursor:"pointer"},onClick:function(){e.props.onAccept(t)},"aria-label":n.acceptInv},t.acceptText)))))},t}(Component),Mobile$1=render$3("livechat.invitation.popupImage","invitation")(Mobile),circular="circular",square="square",rating$2="rating",sendfile="sendfile",sendemail="sendemail",print$1="print",plus="plus",checkbox$1="checkbox",transcript="transcript",loading$2="loading",kb$3="kb",bot$1="bot",audio$1="audio",video$2="video",accept="accept",refuse="refuse",confirm="confirm",deny="deny",chat$3="chat",voice$1="voice",media$1="media",coBrowsing$1="coBrowsing",kbSearch$1="kbSearch",drag="drag",minimize="minimize",menu="menu",closechat="closechat",popout$1="popout",popin$1="popin",send$2="send",arrowup="arrowup",asterisk="asterisk",close$1="close",EnumSVGType=Object.freeze({rating:"rating",sendfile:"sendfile",sendemail:"sendemail",print:"print",plus:"plus",checkbox:"checkbox",transcript:"transcript",loading:"loading",kb:"kb",bot:"bot",audio:"audio",video:"video",accept:"accept",refuse:"refuse",confirm:"confirm",deny:"deny",chat:"chat",voice:"voice",media:"media",coBrowsing:"coBrowsing",kbSearch:"kbSearch",drag:"drag",minimize:"minimize",menu:"menu",closechat:"closechat",popout:"popout",popin:"popin",send:"send",arrowup:"arrowup",asterisk:"asterisk",close:"close"}),_mapping$2,mapping$2=(_mapping$2={},_mapping$2.close=[h("path",{d:"M15.7,14l-6-6l6-6c0.4-0.4,0.4-1.2,0-1.6c-0.4-0.4-1.2-0.4-1.6,0l-6,6l-6-6c-0.4-0.4-1.2-0.4-1.6,0c-0.4,0.4-0.4,1.2,0,1.6l6,6l-6,6c-0.4,0.4-0.4,1.2,0,1.6c0.4,0.4,1.2,0.4,1.6,0l6-6l6,6c0.4,0.4,1.2,0.4,1.6,0C16.1,15.2,16.1,14.5,15.7,14z"})],_mapping$2.rating=[h("path",{d:"M15.1,5.9L10.6,5L8.4,0.8C8.3,0.6,8.2,0.5,8,0.5S7.7,0.6,7.6,0.8L5.4,5L0.9,5.9C0.7,5.9,0.6,6,0.5,6.2c0,0.2,0,0.3,0.1,0.5l3.1,3.5L3.1,15c0,0.2,0.1,0.3,0.2,0.4c0.2,0.1,0.3,0.1,0.5,0l4.1-2l4.1,2h0.2c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.2-0.4l-0.6-4.8l3.1-3.5c0.3-0.1,0.3-0.2,0.3-0.4C15.4,6,15.3,5.9,15.1,5.9z M11.4,9.7c-0.1,0.1-0.1,0.2-0.1,0.4l0.5,4.2l-3.6-1.8c-0.1-0.1-0.3-0.1-0.4,0l-3.6,1.8l0.5-4.2c0-0.1,0-0.3-0.1-0.4L1.9,6.6l3.9-0.8c0.1,0,0.3-0.1,0.3-0.2L8,2l1.9,3.6c0.1,0.1,0.2,0.2,0.3,0.2l3.9,0.8L11.4,9.7z"})],_mapping$2.sendfile=[h("path",{d:"M13.2,8.3l-6.2,6c-2.1,1.9-4.4-0.5-4.4-0.5c-2.2-1.9-0.8-3.3-0.8-3.3L10,2.1c1.5-1.4,3.4,0,3.4,0c1.4,1.4,0.1,2.4,0.1,2.4L8.1,9.8c-0.9,1.6-1.9,0.5-1.9,0.5C5.5,9.6,6.9,8.6,6.9,8.6l3.4-3.4c0.6-0.5,0.3-0.9,0.2-1C10.2,4,9.8,4,9.5,4.3c0,0-3.5,3.6-3.7,3.7c0,0-1.8,1.8-0.3,3.1l0.1,0.1C6.5,12,8,11.9,8.8,11l5.5-5.4c2.6-2.6,0.2-4.7,0.2-4.7c-1.9-1.8-4.8-0.3-4.8-0.3L1.2,9.4c-1.9,2.7,0.6,5.2,0.6,5.2c1.5,1.2,3.4,1.7,5.3,1.3L14,9.4c0.4-0.3,0.5-0.8,0.4-1.2C14,7.9,13.5,8,13.2,8.3z"})],_mapping$2.video=[h("path",{d:"M2.4,5.1c-0.3,0-0.5,0.2-0.5,0.5s0.2,0.5,0.5,0.5s0.5-0.2,0.5-0.5S2.7,5.1,2.4,5.1z M4.3,5.1C4,5.1,3.8,5.3,3.8,5.6S4,6.1,4.3,6.1s0.5-0.2,0.5-0.5S4.6,5.1,4.3,5.1z M11.5,5.6V4.2c0-0.5-0.4-1-1-1H1c-0.5,0-1,0.4-1,1v7.7c0,0.5,0.4,1,1,1h9.6c0.5,0,1-0.4,1-1v-1.2l4.5,1.9V4L11.5,5.6zM15,11l-4.5-1.9l0,2.7H1l0-7.7l9.6,0v2.7L15,5.3V11z"})],_mapping$2.sendemail=[h("path",{d:"M3.3,4.9c-0.2-0.2-0.5-0.2-0.7,0c-0.2,0.2-0.2,0.5,0,0.7l5.2,4.2c0,0,0,0.1,0.1,0.1C8,10,8.3,10,8.4,9.8l6.8-6.9c0.2-0.1,0.3-0.2,0.3-0.4c0,0,0,0,0-0.1C15.5,2.2,15.3,2,15,2H1.5c0,0-0.1,0-0.1,0C0.9,2,0.5,2.5,0.5,3v10c0,0,0,0.1,0,0.1 c0,0.5,0.5,0.9,1,0.9h13c0,0,0.1,0,0.1,0c0.5,0,0.9-0.5,0.9-1V6.5C15.5,6.2,15.3,6,15,6s-0.5,0.2-0.5,0.5V12c0,0,0,0.1,0,0.1c0,0.5-0.5,0.9-1,0.9h-11c0,0-0.1,0-0.1,0c-0.5,0-0.9-0.5-0.9-1V4c0,0,0-0.1,0-0.1C1.5,3.4,2,3,2.5,3h11.3L8.1,8.8L3.3,4.9z"})],_mapping$2.checkbox=[h("rect",{key:"checkbox1",className:"checkbox1",width:"16",height:"16",rx:"4"}),h("path",{key:"checkbox2",className:"checkbox2",d:"M12,0H4C1.8,0,0,1.8,0,4v8c0,2.2,1.8,4,4,4h8c2.2,0,4-1.8,4-4V4C16,1.8,14.2,0,12,0z M15,12c0,1.7-1.3,3-3,3H4c-1.7,0-3-1.3-3-3V4c0-1.7,1.3-3,3-3h8c1.7,0,3,1.3,3,3V12z"}),h("path",{key:"checkbox3",className:"checkbox3",d:"M13.7,4.3c-0.4-0.4-1.1-0.4-1.5,0L6.9,9.5l-3-3c-0.4-0.4-1.1-0.4-1.5,0c0,0,0,0,0,0C1.9,7,1.9,7.6,2.3,8l3.8,3.7l0,0C6.3,11.9,6.6,12,6.9,12l0,0c0.3,0,0.6-0.1,0.8-0.3l6.1-5.9c0,0,0,0,0,0C14.1,5.4,14.1,4.7,13.7,4.3z"})],_mapping$2.loading=[h("g",{transform:"translate(80,50)"},h("g",{transform:"rotate(0)"},h("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",transform:"scale(0.981667 0.981667)"},h("animateTransform",{attributeName:"transform",type:"scale",begin:"-0.875s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),h("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"-0.875s"})))),h("g",{transform:"translate(71.21320343559643,71.21320343559643)"},h("g",{transform:"rotate(45)"},h("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",transform:"scale(0.956667 0.956667)"},h("animateTransform",{attributeName:"transform",type:"scale",begin:"-0.75s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),h("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"-0.75s"})))),h("g",{transform:"translate(50,80)"},h("g",{transform:"rotate(90)"},h("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",transform:"scale(0.931667 0.931667)"},h("animateTransform",{attributeName:"transform",type:"scale",begin:"-0.625s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),h("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"-0.625s"})))),h("g",{transform:"translate(28.786796564403577,71.21320343559643)"},h("g",{transform:"rotate(135)"},h("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",transform:"scale(0.906667 0.906667)"},h("animateTransform",{attributeName:"transform",type:"scale",begin:"-0.5s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),h("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"-0.5s"})))),h("g",{transform:"translate(20,50.00000000000001)"},h("g",{transform:"rotate(180)"},h("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",ransform:"scale(0.881667 0.881667)"},h("animateTransform",{attributeName:"transform",type:"scale",begin:"-0.375s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),h("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"-0.375s"})))),h("g",{transform:"translate(28.78679656440357,28.786796564403577)"},h("g",{transform:"rotate(225)"},h("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",transform:"scale(0.856667 0.856667)"},h("animateTransform",{attributeName:"transform",type:"scale",begin:"-0.25s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),h("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"-0.25s"})))),h("g",{transform:"translate(49.99999999999999,20)"},h("g",{transform:"rotate(270)"},h("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",transform:"scale(0.831667 0.831667)"},h("animateTransform",{attributeName:"transform",type:"scale",begin:"-0.125s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),h("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"-0.125s"})))),h("g",{transform:"translate(71.21320343559643,28.78679656440357)"},h("g",{transform:"rotate(315)"},h("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",transform:"scale(0.806667 0.806667)"},h("animateTransform",{attributeName:"transform",type:"scale",begin:"0s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),h("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"0s"}))))],_mapping$2.accept=[h("circle",{cx:"27.5",cy:"27.5",r:"27.5",fill:"#5DC149"}),h("path",{d:"M33.9,32.6c0,0-0.2,1-0.2,1.1c-0.1,0.5-0.2,0.3-0.4,0.3c0,0-4-1.3-6.4-3.8l-1.2-1.2c0,0-3.2-3.7-3.4-6.5c0-0.3-0.3-0.1,0.2-0.2c0.3-0.1,1.3-0.5,1.3-0.5L19.5,14l-0.8,0.4c0,0-5.7,0.6-4.6,4.7l0.9,3c6.1,10.9,18.6,18.6,18.6,18.6l2.5,1.2c3.8,1.2,5.4-4.6,5.4-4.6l0.5-1.6L33.9,32.6L33.9,32.6z",fill:"#ffffff"})],_mapping$2.refuse=[h("circle",{cx:"27.5",cy:"27.5",r:"27.5",fill:"#D34747"}),h("path",{d:"M19.8,30.3c0,0-0.5-0.8-0.6-0.9c-0.2-0.4-0.1-0.4,0.1-0.5c0,0,3.8-1.9,7.2-1.9h1.6c0,0,4.9,0.3,7,2.1c0.2,0.2,0.2-0.1,0.1,0.3c-0.1,0.3-0.5,1.3-0.5,1.3l8.5,2.4l0.3-0.8c0,0,3.7-4.4,0-6.5l-2.7-1.5c-12-3.2-26.3,0.2-26.3,0.2l-2.6,0.9c-3.6,1.9-0.6,7-0.6,7l0.7,1.4L19.8,30.3L19.8,30.3z",fill:"#ffffff"})],_mapping$2.confirm=[h("circle",{cx:"27.5",cy:"27.5",r:"27.5",fill:"#5DC149"}),h("path",{d:"M39.5,20.5c-0.6-0.6-1.5-0.6-2.1,0L25,32.8l-7.4-7.4c-0.6-0.6-1.5-0.6-2.1,0c-0.6,0.6-0.6,1.5,0,2.1L24,36c0.6,0.6,1.5,0.6,2.1,0l13.4-13.4C40.1,22,40.1,21.1,39.5,20.5z",fill:"#ffffff"})],_mapping$2.deny=[h("circle",{cx:"27.5",cy:"27.5",r:"27.5",fill:"#D34747"}),h("path",{d:"M29.6,27.5l6-6c0.6-0.6,0.6-1.5,0-2.1c-0.6-0.6-1.5-0.6-2.1,0l-6,6l-6-6c-0.6-0.6-1.5-0.6-2.1,0c-0.6,0.6-0.6,1.5,0,2.1l6,6l-6,6c-0.6,0.6-0.6,1.5,0,2.1c0.6,0.6,1.5,0.6,2.1,0l6-6l6,6c0.6,0.6,1.5,0.6,2.1,0c0.6-0.6,0.6-1.5,0-2.1L29.6,27.5z",fill:"#ffffff"})],_mapping$2.print=[h("path",{d:"M10.5,12.5h-5C5.2,12.5,5,12.7,5,13s0.2,0.5,0.5,0.5h5c0.3,0,0.5-0.2,0.5-0.5S10.8,12.5,10.5,12.5zM14,3.5h-2v-1c0-1.5-0.1-2-2-2H6c-1.8,0-2,0.5-2,2v1H2c-1.8,0-2,0.5-2,2v6c0,1.5,0.2,2,2,2h1c0,1.6,0.2,2,2,2h6c1.5,0,2-0.5,2-2h1c1.7,0,2-0.6,2-2v-6C16,3.8,15.5,3.5,14,3.5z M5,2.5c0-0.7,0.3-1,1-1h4c0.7,0,1,0.2,1,1v1H5V2.5z M12,13.5c0,0.9-0.3,1-1,1H5c-0.8,0-1-0.2-1-1v-4c0-0.6,0.1-1,1-1h6c0.7,0,1,0.1,1,1V13.5zM15,11.5c0,0.7-0.3,1-1,1h-1v-3c0-1.8-0.8-2-2-2H5C4,7.4,3.1,8.1,3,9.1c0,0.1,0,0.3,0,0.4v3H2c-0.7,0-1-0.2-1-1v-6c0-0.7,0.1-1,1-1h12c0.7,0,1,0.1,1,1V11.5z M10.5,10.5h-5C5.2,10.5,5,10.7,5,11s0.2,0.5,0.5,0.5h5c0.3,0,0.5-0.2,0.5-0.5S10.8,10.5,10.5,10.5z M2.6,5.5C2.5,5.5,2.5,5.5,2.6,5.5C2.2,5.5,2,5.7,2,5.9C2,6,2,6,2,6c0,0.3,0.2,0.5,0.4,0.5c0,0,0,0,0.1,0C2.8,6.5,3,6.3,3,6.1C3,6,3,6,3,6C3,5.7,2.8,5.5,2.6,5.5z"})],_mapping$2.drag=[h("path",{key:"drag",className:"svgPath drag",d:"M11.6,18c-2.5,0-3.8-1.7-4.6-2.5S4.7,13,3.5,12.2c0-0.5,0-1.1,1.5-1.1s2.8,1.3,2.8,1.3V5.8c0,0,0.3-0.9,1.3-0.9s1.3,0.9,1.3,0.9v3.4c0,0,0.3-0.6,1.5-0.6c0.5,0,2.5,1.3,3.3,1.7c0.8,0.5,0.8,1.1,0.8,1.6s0,1.3,0,2.5C16,15.7,14.2,18,11.6,18L11.6,18z M9.7,2.1v2H8.2v-2H6.8L9,0l2.2,2.1H9.7L9.7,2.1z M4.2,6.8v1.4L2,6.1L4.2,4v1.4h2.1v1.4H4.2L4.2,6.8z M16,6.1l-2.2,2.1V6.8h-2.1V5.4h2.1V4L16,6.1L16,6.1z"})],_mapping$2.menu=[h("path",{key:"menu",d:"M14.4,6.4c-0.9,0-1.6,0.7-1.6,1.6s0.7,1.6,1.6,1.6C15.3,9.6,16,8.9,16,8S15.3,6.4,14.4,6.4z M8,6.4 C7.1,6.4,6.4,7.1,6.4,8S7.1,9.6,8,9.6S9.6,8.9,9.6,8S8.9,6.4,8,6.4z M1.6,6.4C0.7,6.4,0,7.1,0,8s0.7,1.6,1.6,1.6 c0.9,0,1.6-0.7,1.6-1.6S2.5,6.4,1.6,6.4z"})],_mapping$2.minimize=[h("path",{d:"M12.6,6.9H3.3C2.6,7,2.1,7.4,2.1,8c0.1,0.7,0.6,1.1,1.3,1.1h9.3c0.7,0,1.3-0.4,1.3-1C14,7.5,13.5,7.1,12.6,6.9z"})],_mapping$2.closechat=[h("path",{d:"M8,9c0.3,0,0.5-0.2,0.5-0.5v-8C8.5,0.2,8.3,0,8,0S7.5,0.2,7.5,0.5v8C7.5,8.8,7.7,9,8,9zM10.8,1.5c-0.2-0.1-0.5,0.1-0.6,0.3c-0.1,0.2,0,0.5,0.2,0.6c2.5,1,4.1,3.3,4.1,6c0,3.6-2.9,6.5-6.4,6.6c-3.6,0-6.5-2.9-6.6-6.4c0-2.7,1.6-5.1,4-6.1c0,0,0.1,0,0.1,0C5.8,2.3,5.9,2,5.8,1.8c0,0,0-0.1,0-0.1C5.7,1.5,5.4,1.4,5.2,1.5c-2.8,1.1-4.7,3.9-4.7,7C0.5,12.6,3.8,16,8,16c3.1,0,5.8-1.9,7-4.7C16.5,7.4,14.7,3.1,10.8,1.5z"})],_mapping$2.popout=[h("path",{d:"M5.5,4.6C5.3,4.4,5,4.4,4.8,4.6c-0.2,0.2-0.2,0.5,0,0.7l8.2,8.3c0.3,0.1,0.6,0.1,0.8-0.1c0,0,0,0,0,0c0.2-0.2,0.2-0.5,0-0.7L5.5,4.6z M13.5,2.1H5.2C4.2,2.1,3.3,2.3,2.6,2.8C2.1,3.3,1.9,4,2,4.8v8.5c0,0.3,0.2,0.6,0.5,0.6c0.3,0,0.5-0.2,0.5-0.6V4.4C3,3.8,3.5,3.3,4.2,3.3h9.3c0.4,0,0.6-0.2,0.6-0.5C14.1,2.3,13.8,2.1,13.5,2.1z"})],_mapping$2.popin=[h("path",{d:"M10.6,11.4c0.2,0.2,0.5,0.2,0.7,0s0.2-0.5,0-0.7L3.1,2.4C2.8,2.3,2.5,2.3,2.3,2.5l0,0C2.1,2.7,2.1,3,2.3,3.2L10.6,11.4z M2.6,13.9h8.3c1,0,1.9-0.2,2.6-0.7c0.5-0.5,0.7-1.2,0.6-2V2.7c0-0.3-0.2-0.6-0.5-0.6c-0.3,0-0.5,0.2-0.5,0.6v8.9c0,0.6-0.5,1.1-1.2,1.1H2.6c-0.4,0-0.6,0.2-0.6,0.5C2,13.7,2.3,13.9,2.6,13.9z"})],_mapping$2.send=[h("polygon",{points:"16,8 0,0.9 4.9,15.1 8.5,13.2 11,14.5 11,11.4 5,5.1 12.2,10.1"})],_mapping$2.audio=[h("path",{d:"M12.6,7.5c-0.8,0-0.6,0.7-0.6,0.7c0,2.5-1.5,3.4-4,3.4s-4-1.2-4-3.7c0,0,0.2-0.5-0.6-0.5c-0.3,0-0.5,0.2-0.5,0.5c0,0,0,0,0,0c0,3,1.3,4.2,4.1,4.6v2H4.8c-0.4,0-0.8,0-0.8,0.5s0.5,0.5,0.9,0.5h6.4c0.4,0,0.8,0,0.8-0.5s-0.3-0.5-0.8-0.5H9v-2c2.8-0.5,4.1-1.4,4.1-4.3C13.1,8.2,13.3,7.5,12.6,7.5z M7.9,10.5c1.7,0,3-1.3,3-3v-4c0-1.7-1.3-3-3-3s-3,1.3-3,3v4C4.9,9.2,6.2,10.5,7.9,10.5z M5.9,3.5c0-1.1,0.9-2,2-2c1.1,0,2,0.9,2,2v4c0,1.1-0.9,2-2,2c-1.1,0-2-0.9-2-2V3.5z"})],_mapping$2.arrowup=[h("path",{d:"M0.2,12.1c0.5,0.4,1.3,0.3,1.7-0.2l6-6l6.2,6.1c0.6,0.5,1.3,0.6,1.7,0.2c0.3-0.5,0.3-1.2-0.2-1.7L9,4C8.8,3.8,8.6,3.7,8.4,3.6H8.3c-0.1,0-0.1,0-0.2,0C7.7,3.6,7.3,3.7,7,4l-6.6,6.6C0,11-0.2,11.6,0.2,12.1z"})],_mapping$2.asterisk=[h("polygon",{points:"16,6.9 15.5,4.8 9.6,6.4 9.1,0 6.9,0 6.4,6.4 0.5,4.8 0,6.9 5.9,9.1 2.1,14.9 3.7,16 8,10.7 12.3,16 13.3,14.9 10.1,9.1"})],_mapping$2.chat=[h("path",{d:"M12.7,2.7L3.3,1.6c-1,0-1.8,0.8-1.8,1.8v6.9c0,1,0.8,1.8,1.8,1.8l1.9-0.2l-0.1,2.4l3.5-3l4.3-0.6c1,0,1.8-0.8,1.8-1.8V4.5C14.6,3.5,13.8,2.7,12.7,2.7z"})],_mapping$2.kb=[h("path",{d:"M5.9,15.5h3.9v-1.8H5.9V15.5z M7.9,0.5C4.9,0.5,2.4,3,2.4,6h3.6c0-0.9,0.9-2,2-2c1.1,0,2,0.9,2,2S9,8,7.9,8c0,0-0.4,0-0.9,0S5.9,8.4,5.9,8.9v2.9h3.9v-0.4c2.1-0.7,3.6-2.9,3.6-5.4C13.4,3,10.9,0.5,7.9,0.5z"})],_mapping$2.voice=[h("path",{d:"M12.6,7.5c-0.8,0-0.6,0.7-0.6,0.7c0,2.5-1.5,3.4-4,3.4s-4-1.2-4-3.7c0,0,0.2-0.5-0.6-0.5c-0.3,0-0.5,0.2-0.5,0.5l0,0c0,3,1.3,4.2,4.1,4.6v2H4.8c-0.4,0-0.8,0-0.8,0.5s0.5,0.5,0.9,0.5h6.4c0.4,0,0.8,0,0.8-0.5s-0.3-0.5-0.8-0.5H9v-2c2.8-0.5,4.1-1.4,4.1-4.3C13.1,8.2,13.3,7.5,12.6,7.5z M7.9,10.5c1.7,0,3-1.3,3-3v-4c0-1.7-1.3-3-3-3s-3,1.3-3,3v4C4.9,9.2,6.2,10.5,7.9,10.5z"})],_mapping$2.media=[h("path",{d:"M13,11h-1v1c0,0.8-1,1-1,1L1,13c-0.9,0-1-1-1-1s0-8.2,0-9c0-0.7,0.6-1,1-1c0.8,0,10,0,10,0c0.9,0,1,1,1,1v1h1 l3-2v11L13,11L13,11z M5,5v5l4-2.5L5,5L5,5z"})],_mapping$2.bot=[h("path",{d:"M0,14c0,0,0-1.3,0-1.5C0,11.8,0.1,11,1,11c0,0.5,0,3,0,3H0L0,14z M15,14c0,0,0-2.5,0-3c1,0,1,0.8,1,1.5c0,0.2,0,1.5,0,1.5H15L15,14z M2,14c0-4.8,2.3-7,6-7c3.7,0,6,2.1,6,7C14,14,3.5,14,2,14L2,14z M8,8c-3.1,0-4.7,1.6-5,5H13C12.6,8.6,10,8,8,8L8,8zM5,13c-0.6,0-1-0.4-1-1s0.4-1,1-1c0.6,0,1,0.4,1,1S5.6,13,5,13L5,13z M11,13c-0.5,0-1-0.4-1-1s0.4-1,1-1c0.6,0,1,0.4,1,1S11.6,13,11,13L11,13z M8,3.9V6H7V3.9C6.4,3.7,6,3.2,6,2.5C6,1.7,6.7,1,7.5,1C8.3,1,9,1.7,9,2.5C9,3.2,8.6,3.7,8,3.9L8,3.9z M7.5,2C7.2,2,7,2.2,7,2.5C7,2.8,7.2,3,7.5,3C7.8,3,8,2.8,8,2.5C8,2.2,7.8,2,7.5,2L7.5,2z"})],_mapping$2.coBrowsing=[h("path",{d:"M15,1H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V2C16,1.4,15.6,1,15,1z M5.5,2C5.8,2,6,2.2,6,2.5C6,2.8,5.8,3,5.5,3C5.2,3,5,2.8,5,2.5C5,2.2,5.2,2,5.5,2z M3.5,2C3.8,2,4,2.2,4,2.5C4,2.8,3.8,3,3.5,3C3.2,3,3,2.8,3,2.5C3,2.2,3.2,2,3.5,2z M1.5,2C1.8,2,2,2.2,2,2.5C2,2.8,1.8,3,1.5,3C1.2,3,1,2.8,1,2.5C1,2.2,1.2,2,1.5,2z M15,14H1V4h14V14z"})],_mapping$2.kbSearch=[h("path",{d:"M15.8,14.8l-1,1c-0.3,0.3-0.7,0.3-1,0l-4.8-4.7C8.2,11.5,7,12,6,12c-3.4,0-6-3-6-6.3C0,2.4,2.6,0,6,0c3.4,0,6.5,2.4,6.5,5.7c0,1.4-0.8,2.8-1.5,3.8l4.8,4.3C16.1,14.1,16.1,14.5,15.8,14.8L15.8,14.8z M6.3,1.9C4,1.9,2.1,3.7,2.1,6s1.9,4,4.2,4c2.3,0,4.2-1.8,4.2-4S8.6,1.9,6.3,1.9L6.3,1.9z"})],_mapping$2),IconSVG=function(e){var t=e.disabled,n=e.color,i=e.className,o=e.type,a=e.active,r=e.onClick,s=objectWithoutProperties(e,["disabled","color","className","type","active","onClick"]);return h("svg",_extends({version:"1.1",className:index$4("svg",n&&"svg-"+n,i,t&&"disabled",a&&"active"),viewBox:"0 0 16 16",onClick:!t&&r,focusable:"false"},s),mapping$2[o])},Bubble=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.refuse=null,i.timer=null,i.updateHeight=i.updateHeight.bind(i),n.onHeightChange&&n.onHeightChange(1/0),i.shouldComponentUpdate=debug("shouldComponentUpdate")(shouldComponentUpdateGen(i,["invitation.messageId","invitation.message","invitation.textTypeHere"])),i.onKeyDown=i.onKeyDown.bind(i),i.onAccept=i.onAccept.bind(i),i.onRefuse=i.onRefuse.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this;registerAnimationEnd(this.element,this.updateHeight),this.props.onHeightChange&&!isAnimationSupported&&(this.cb=setTimeout(function(){e.cb=null;var t=e.element.getBoundingClientRect();0===t.height?e.cb=setInterval(function(){if(!e.element)return clearInterval(e.cb),void(e.cb=null);var t=e.element.getBoundingClientRect();t.height>0&&(e.props.onHeightChange(t.height),clearInterval(e.cb),e.cb=null)},100):e.props.onHeightChange(t.height)},375))},t.prototype.componentDidUpdate=function(){if(this.props.onHeightChange){var e=this.element.getBoundingClientRect();this.props.onHeightChange(e.height)}},t.prototype.componentWillUnmount=function(){this.props.onHeightChange&&!this.props.ifNewMessageComing&&this.props.onHeightChange(0),this.timer&&(clearTimeout(this.timer),this.timer=null),this.cb&&(clearTimeout(this.cb),this.cb=null),unregisterAnimationEnd(this.element,this.updateHeight)},t.prototype.onAccept=function(e){e.preventDefault();var t=this.input?this.input.value:void 0;this.props.onAccept(this.props.invitation,t,!1)},t.prototype.onRefuse=function(e){this.props.onRefuse(this.props.invitation),e.stopPropagation(),e.cancelBubble=!0},t.prototype.onKeyDown=function(e){if(13===e.keyCode){var t=e.target.value;if(!isValidTextToSendOut(t))return;e.preventDefault(),this.props.onAccept(this.props.invitation,t,!0)}},t.prototype.updateHeight=function(){var e=this.element.getBoundingClientRect().height;0!==e&&(clearTimeout(this.cb),clearInterval(this.cb),this.cb=null,this.props.onHeightChange&&this.props.onHeightChange(e))},t.prototype.render=function(){var e=this,t=this.props,n=t.invitation,i=t.cornerStyle,o=t.avatars,a=t.noInput,r="circular"===i,s=Math.min(this.props.maxHeight-50-40-25,210);n.agentName&&(s-=16),o&&(s-=7.5);var d=getLanguages(this.context),c=n.message?parseMessageTextToComponents(n.message,h("br",null)):n.message;return h("div",{className:index$4("invitation",r&&"window--circular",isIE&&"window--ie",!isSafari&&isChrome&&"window--chrome",isIE9&&"window--ie9"),ref:function(t){e.element=t},onAnimationEnd:this.props.onAnimationEnd},o&&h("div",{className:"invitation__avatars"},o.map(function(e){return h("img",{key:e,src:e,alt:d.avatar})})),h("button",{className:"invitation__close",onClick:this.onRefuse,"aria-label":this.props.xText},h(IconSVG,{type:"close"})),h("a",{role:"button",href:"",className:"invitation__message",onClick:this.onAccept,"aria-label":this.props.acceptText},n.agentName&&h("div",{className:"invitation__name"},n.agentName+":"),h("div",{style:{maxHeight:s,overflowY:"auto",wordWrap:"break-word"}},c)),a?h("button",{className:"invitation__type invitation-showType",onClick:this.onAccept},n.textTypeHere):h("input",{ref:function(t){e.input=t},className:"invitation__type invitation-showType",placeholder:n.textTypeHere,"aria-label":n.textTypeHere,onKeyDown:this.onKeyDown}))},t}(Component),adaptiveButtonHeight=60,adaptiveButtonOffset=25,heightOfAvatar=30,buttonBubbleDistance=20,BubbleAnimation=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n)),o=230+heightOfAvatar/2;return i.state={statePrevProps:null,height:o},i.onAnimationEnd=i.onAnimationEnd.bind(i),i.onHeightChange=i.onHeightChange.bind(i),i}return inherits(t,e),t.prototype.shouldComponentUpdate=function(e,t){return null===this.state.statePrevProps||e.invitation.messageId!==this.props.invitation.messageId||t.statePrevProps.invitation.messageId!==this.state.statePrevProps.invitation.messageId||this.state.height!==t.height||!1||!1},t.prototype.onAnimationEnd=function(){this.setState({statePrevProps:this.props})},t.prototype.onHeightChange=function(e){this.setState({height:e})},t.prototype.render=function(){var e=this.props,t=null===this.state.statePrevProps,n=!1;t||(n=this.props.invitation.messageId!==this.state.statePrevProps.invitation.messageId);var i=!!e.avatars,o=i?heightOfAvatar/2:0,a=Math.max(o,7.5),r=this.state.height+a+17.5,s=e.right+25-12.5,d=e.bottom+60+25+20-17.5,c=e.height-d,l={border:"none",right:s,bottom:d,position:"fixed",width:295,height:r,zIndex:invitation,maxHeight:c},u=isIE,p=[this.props.fontCSS,replaceThemeColors(css,this.props.mainColor),this.props.customCSS],f=getLanguages(this.context);return h(Iframe,{style:l,title:f.invitation},h(Style,{css:p}),h("div",{className:index$4((t||n)&&!u&&"invitation--coming",this.props.isRightToLeft&&"window--rtl")},h(Bubble,_extends({},this.props,{maxHeight:c,onAnimationEnd:this.onAnimationEnd,onHeightChange:this.onHeightChange})),n&&!u&&h(Bubble,_extends({},this.state.statePrevProps,{maxHeight:c,ifNewMessageComing:!0}))))},t}(Component),PopupImage=function(e){function t(){classCallCheck(this,t);var n=possibleConstructorReturn(this,e.call(this));return n.state={backgroundImageLoad:!1},n.isInvitationViewed=!1,n}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this,t=new Image;t.src=this.props.invitation.image,t.onload=function(){e.setState({backgroundImageLoad:!0,imgWidth:t.width,imgheight:t.height})}},t.prototype.render=function(){var e=this,t=this.props.invitation,n=getLanguages(this.context);return h("div",null,t.ifModal&&h("div",{style:{zIndex:invitationMask,position:"fixed",top:0,bottom:0,left:0,right:0,background:"rgba(0, 0, 0, 0.3)",display:this.state.backgroundImageLoad?"":"none"}}),h("div",{style:_extends({},getPositionStyle(t.position,invitationMask),{zIndex:invitation,position:"fixed",background:"url('"+t.image+"') no-repeat scroll 0% 0% transparent;",width:this.state.imgWidth,height:this.state.imgheight,display:this.state.backgroundImageLoad?"":"none"})},h("button",{onClick:function(){e.props.onAccept(t)},style:{visibility:"show",display:"inline",cursor:"pointer",background:"none",border:"none",padding:0},tabIndex:-1},h("img",{src:t.image,id:"invitationAcceptImg",alt:n.invitation})),h("button",{onClick:function(){e.props.onAccept(t)},style:{position:"absolute",cursor:"pointer",left:t.messageArea.left,top:t.messageArea.top,width:t.messageArea.width,height:t.messageArea.height,textAlign:t.textAlign,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,textDecoration:t.textDecoration,color:t.color,fontFamily:t.fontFamily,background:"rgba(0,0,0,0)",overflow:"hidden",whiteSpace:"pre-wrap",border:"none",padding:0},"aria-label":n.acceptInv},t.message),h("button",{onClick:function(n){e.props.onRefuse(t),n.stopPropagation(),n.cancelBubble=!0},style:{position:"absolute",cursor:"pointer",left:t.closeArea.left,top:t.closeArea.top,width:t.closeArea.width,height:t.closeArea.height,background:"rgba(0,0,0,0)",border:"none",padding:0},"aria-label":n.refuseInv})))},t}(Component),PopupImage$1=render$3("livechat.invitation.popupImage","invitation")(PopupImage),_mapping$1,mapping$1=(_mapping$1={},_mapping$1[mobile$1]=Mobile$1,_mapping$1[bubble$1]=BubbleAnimation,_mapping$1[popupImage]=PopupImage$1,_mapping$1),Invitation$1=function(e){var t=mapping$1[e.invitation.type];return t?h(t,e):null},Invitation$2=language(Invitation$1),mapStateToProps$2=function(e){var t=getInvitation(e),n=t.campaignId,i=getAdaptiveButtonOffset(e,n),o=i.right,a=i.bottom,r=getCornerStyle(e,n),s=void 0;t.type!==bubble$1||t.isManual||(s=getAgentAvatars(e));var d=getCustomCssByCampaignId(e,n),c=getLanguageTag(e,n);return{invitation:t,mainColor:getMainColorByCampaignId(e,n),bottom:a,right:o,cornerStyle:r,avatars:s,noInput:!0,customCSS:d,height:getHeight(e),languageTag:c,xText:languages[c].refuseInv,acceptText:languages[c].acceptInv,fontCSS:fontCSS(partial(resourceUrl,e)),isRightToLeft:isRightToLeftByCampaignId(e,n)}},mapDispatchToProps$1=function(e){return{onAccept:function(t){emit("livechat.invitation.accept",t.id),e(invitatonAccept$1(t.campaignId)),e(chatWindowOpen$1(t.campaignId))},onRefuse:function(t){emit("livechat.invitation.refuse",t.id),e(invitationRefuse$1())}}},Invitation=connect(mapStateToProps$2,mapDispatchToProps$1)(Invitation$2),FlashTitle=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));i.title=document$2.title,i.flag=!0,i.flashTitle=i.flashTitle.bind(i),i.resetTitle=i.resetTitle.bind(i);var o=i.updateTitle.bind(i);return i.componentDidMount=o,i.componentDidUpdate=o,i.shouldComponentUpdate=shouldComponentUpdateGen(i,["message"]),i}return inherits(t,e),t.prototype.componentWillUnmount=function(){this.timer&&this.resetTitle()},t.prototype.flashTitle=function(){var e=this;this.timer=setTimeout(function(){e.flag&&document$2.title!==e.title&&(e.title=document$2.title),document$2.title=e.flag?e.message+" - "+e.title:e.title,e.flag=!e.flag,e.flashTitle()},1e3)},t.prototype.updateTitle=function(){var e=this.props.message;if(-1===document$2.title.indexOf(this.message)&&this.title!==document$2.title&&(this.title=document$2.title),!e)return void this.resetTitle();this.timer||(this.flag=!0,this.flashTitle()),this.message=e},t.prototype.resetTitle=function(){clearTimeout(this.timer),this.timer=null,document$2.title=this.title},t.prototype.render=function(){return h("div",null)},t}(Component),Movediv=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={isMouseDown:!1},i.doDrag=i.doDrag.bind(i),i.stopDrag=i.stopDrag.bind(i),i.startDrag=i.startDrag.bind(i),i.mouseStart={x:0,y:0},i.divStart={x:0,y:0},i.benchmarkTopAndLeft=void 0!==n.left&&void 0!==n.top,i}return inherits(t,e),t.prototype.startDrag=function(e){var t=e;pauseEvent(t),this.mouseStart.x=t.clientX,this.mouseStart.y=t.clientY,this.setState({isMouseDown:!0});var n=this.props,i=n.left,o=n.top;this.benchmarkTopAndLeft?(this.divStart.x=i,this.divStart.y=o):(this.divStart.x=this.props.width-this.props.right-this.props.ifrWidth,this.divStart.y=this.props.height-this.props.bottom-this.props.ifrHeight),document$2.addEventListener("mousemove",this.doDrag),document$2.addEventListener("mouseup",this.stopDrag)},t.prototype.doDrag=function(e){var t=e;if(t||t.button){var n=t.clientX-this.mouseStart.x+this.divStart.x,i=t.clientY-this.mouseStart.y+this.divStart.y,o=this.props.width-this.props.ifrWidth,a=this.props.height-this.props.ifrHeight;n=n<0?0:n,i=i<0?0:i,n=n>o?o:n,i=i>a?a:i;var r=this.props.width-n-this.props.ifrWidth,s=this.props.height-i-this.props.ifrHeight,d=n,c=i;this.benchmarkTopAndLeft?this.props.ifrLeftAndTopPositionChanged(d,this.props.ifCanOnlyHorizontalDrag?this.props.top:c):this.props.ifrPositionChanged(r,s)}else this.stopDrag()},t.prototype.stopDrag=function(){this.setState({isMouseDown:!1}),document$2.removeEventListener("mousemove",this.doDrag),document$2.removeEventListener("mouseup",this.stopDrag)},t.prototype.render=function(){var e=void 0,t=this.props,n=t.id,i=t.left,o=t.top,a=t.width,r=t.height,s=t.barHeight,d=t.barWidth,c=t.ifrHeight,l=t.ifrWidth,u=t.ifrOffsetTop,p=t.ifrOffsetLeft;e=this.state.isMouseDown?this.benchmarkTopAndLeft?r-o-s:this.props.bottom:this.benchmarkTopAndLeft?r-o-s:this.props.bottom+c-(s+u) ;var f=void 0;return f=this.state.isMouseDown?this.benchmarkTopAndLeft?a-i-d-p:this.props.right:this.benchmarkTopAndLeft?a-i-d-p:this.props.right+l-(d+p),h("div",{id:n,className:"movediv",onMouseDown:this.startDrag,style:{height:this.state.isMouseDown?c:s,width:this.state.isMouseDown?l:d,backgroundColor:"rgba(0,0,0,0)",bottom:e,right:f,position:"fixed",cursor:"move",zIndex:moveDiv}})},t}(Component);Movediv.defaultProps={ifrOffsetLeft:30,ifrOffsetTop:30,barHeight:24,barWidth:315};var mobileHorizontal=1,mobileVertical=2,pc=3,sideWindowCss='.form-fields--horizonal .container-checkboxlist,.form-fields--horizonal .container-radiolist{width:calc(100% - 80px);max-width:calc(100% - 80px)}.container-checkboxlist{display:inline-block;width:100%;max-width:100%}.container-checkbox{display:inline-block;position:relative;color:#333;padding-left:26px;width:100%;line-height:1.2rem}.container-checkbox.disable{pointer-events:none}.container-checkbox i{display:inline-block;width:16px;height:16px;position:absolute;left:0;top:0;margin-top:1px}.container-checkbox i.selected{display:block}.container-checkbox i.unselected,.horizontal{display:inline-block}.checkbox:focus+.selected .checkbox2,.selected .checkbox2{fill:#00000a}.checkbox2{fill:#ddd}.checkbox3{fill:#fff}.checkbox:focus+.unselected .checkbox2,.container-checkbox:hover>.unselected .checkbox2{fill:#00000a}.checkbox{position:absolute;z-index:-1;opacity:0}.horizontal{margin-right:10px}.vertical{display:block}.container-checkbox input[type=Checkbox]:disabled~.checkbox__text,.container-checkbox input[type=Checkbox]:disabled~i svg{opacity:.6;pointer-events:none;cursor:default}.container-checkbox input[type=Checkbox]~.checkbox__text{cursor:pointer}.container-checkbox input[type=Checkbox]~i svg{cursor:pointer;width:15px;height:15px}.global-showFocus .container-checkbox input[type=Checkbox]:focus~i svg{outline:#00000a auto 1px}.checkbox1{fill-rule:evenodd;clip-rule:evenodd;fill:#fff}.selected .checkbox1{fill:#00000a}.svg{width:16px;height:16px}.svg--loading{width:18px;height:18px}.svg--loadingChat{display:block;width:28px;height:28px;margin:0 auto}.svg.disabled{opacity:.3}svg:hover{cursor:pointer}.svg.disabled:hover{cursor:default}.svgPath{fill:#000;width:16px;height:16px}.svgRatePath1{fill:none;stroke:#000;stroke-miterlimit:10}.svgPathSendFile1{fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}.svgPathVideo1{fill:none;stroke:#000;stroke-miterlimit:10}.svgPathVideo2{fill:none}.svgPathVoice1{fill:none;stroke:#000;stroke-miterlimit:10}.svgPathVoice2{fill:#000}.sendemail1{fill:none}.sendemail2{fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}.svg:not(.disabled):hover .sendemail1,.svg:not(.disabled):hover .svgPathSendFile1,.svg:not(.disabled):hover .svgPathVideo1,.svg:not(.disabled):hover .svgPathVoice1,.svg:not(.disabled):hover .svgRatePath1{fill:rgba(0,0,0,.3)}.svg.active .svgRatePath1{fill:#000}.svg-white .svgPathVoice2,.svgClosePath,.svgMinimizePath,.svgPopupPath{fill:#fff}.svg-white .sendemail2,.svg-white .svgPathSendFile1,.svg-white .svgPathVideo1,.svg-white .svgPathVoice1,.svg-white .svgRatePath1{stroke:#fff}.svg-white:not(.disabled):hover .sendemail1,.svg-white:not(.disabled):hover .svgPathSendFile1,.svg-white:not(.disabled):hover .svgPathVideo1,.svg-white:not(.disabled):hover .svgPathVoice1,.svg-white:not(.disabled):hover .svgRatePath1{fill:rgba(255,255,255,.3)}.svg-white.active .svgRatePath1{fill:#fff!important}.svg-white.active .svgPathSendFile1{fill:#fff!important;stroke:#000001!important}.svg-white.active .sendemail2{fill:none!important;stroke:transparent!important}.svg-white.active .sendemail1{fill:#fff!important}.svg-sidewindow-icon{width:25px;height:25px;fill:#a2a2a2;position:relative;border:1px solid transparent}.mediaChatWindow,.sideWindow{position:absolute;overflow:hidden}.sideWindow:not(.sideWindow--mobile) .svg-sidewindow-icon:focus,.sideWindow:not(.sideWindow--mobile) .svg-sidewindow-icon:hover{border:1px solid #a2a2a2;border-radius:50%}.svg-sidewindow-icon-select-dark{border:1px solid #a2a2a2;border-radius:50%;fill:#000;background-color:#a2a2a2}.svg-sidewindow-icon-select-light{border:1px solid #a2a2a2;border-radius:50%;fill:#fff;background-color:#a2a2a2}.svg-sidewindow-icon-select-light-mobile{border:none;fill:#00000a;background-color:#fdfdfd}.svg-sidewindow-icon-select-dark-mobile{border:none;fill:#fdfdfd;background-color:#000}html{margin:0;font-size:15px}*,::after,::before{box-sizing:border-box}body{margin:0;font-family:"SourceSans Pro",Arial;font-size:1rem;line-height:1.42857143}.clearfix::after{content:"";display:block;clear:both}.sideWindow{box-shadow:0 5px 12.5px 0 rgba(0,0,0,.15);width:100%;height:100%;right:0;bottom:0;border-radius:5px}.sideWindow.sideWindow--bar{border-radius:0}.window--chrome.sideWindow{box-shadow:0 5px 25px 0 rgba(0,0,0,.15)}.window--circular.sideWindow{border-radius:20px}.sideWindow--embedded{width:calc(100% - 25px);bottom:17.5px;height:calc(100% - 25px);right:12.5px}.sideWindow--bubble.sideWindow--embedded.sideWindow--mobile{width:100%}.mediaChatWindow{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:100%;height:100%;background-color:#333;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;text-align:center;left:0}.popup-window .mediaChatWindow{-webkit-box-flex:0;-ms-flex:0 0 500px;flex:0 0 500px;position:relative}.mediaChatWindow.hidden{display:none}.mediaChatWindow__avatarImg{width:127px;height:127px;background-color:#fff;border-radius:100%;border:2px #fff;padding:2px}.mediaChatWindow__agentName{max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0 auto}.mediaChatWindow--audioIncoming .mediaChatWindow__agentName,.mediaChatWindow--audioRequesting .mediaChatWindow__agentName,.mediaChatWindow--videoIncoming .mediaChatWindow__agentName,.mediaChatWindow--videoRequesting .mediaChatWindow__agentName{font-size:1.2rem;color:#fff;padding:20px 0 15px}.mediaChatWindow__waiting{font-size:.933333rem;color:#fff;opacity:.5;height:18px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@-webkit-keyframes blink{0%,100%{opacity:.2}50%{opacity:1}}@keyframes blink{0%,100%{opacity:.2}50%{opacity:1}}.mediaChatWindow__waitingAni span{animation:blink both 1.4s infinite;-webkit-animation:blink both 1.4s infinite}.mediaChatWindow__waitingAni span:nth-child(2){animation-delay:.2s;-webkit-animation-delay:.2s}.mediaChatWindow__waitingAni span:nth-child(3){animation-delay:.4s;-webkit-animation-delay:.4s}.mediaChatWindow__iconfont{font-size:.933333rem;padding-right:10px;position:relative;top:4px}.mediaChatWindow__textAudio,.mediaChatWindow__textVideo{display:-webkit-box;display:-ms-flexbox;display:flex}.mediaChatWindow__buttons{margin-top:40px;width:100%;left:1px}.mediaChatWindow__button,.mediaChatWindow__button svg{width:62px;height:62px;position:relative}.mediaChatWindow__button{border-radius:50%;font-size:2.333333rem;color:#fff;display:inline-block;margin:0 25px;line-height:55px;cursor:pointer;transition:opacity .3s;border:none;padding:0;background:0 0;z-index:666}.mediaChatWindow__button .mediaChatWindow__iconfont{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mediaChatWindow__button:hover{opacity:.8}.mediaChatWindow__button:active{box-shadow:inset 0 2px 5px rgba(0,0,0,.25)}.mediaChatWindow--audioIncoming .mediaChatWindow__textVideo,.mediaChatWindow--audioRequesting .mediaChatWindow__textVideo,.mediaChatWindow--videoIncoming .mediaChatWindow__textAudio,.mediaChatWindow--videoRequesting .mediaChatWindow__textAudio{display:none}.mediaChatWindow--audioChatting .mediaChatWindow__chatting,.mediaChatWindow--audioIncoming .mediaChatWindow__requesting,.mediaChatWindow--audioRequesting .mediaChatWindow__requesting,.mediaChatWindow--videoChatting .mediaChatWindow__chatting,.mediaChatWindow--videoIncoming .mediaChatWindow__requesting,.mediaChatWindow--videoRequesting .mediaChatWindow__requesting{display:block}.mediaChatWindow--audioChatting .mediaChatWindow__requesting,.mediaChatWindow--audioIncoming .mediaChatWindow__chatting,.mediaChatWindow--audioIncoming .mediaChatWindow__waitingAni,.mediaChatWindow--audioRequesting .mediaChatWindow__chatting,.mediaChatWindow--videoChatting .mediaChatWindow__requesting,.mediaChatWindow--videoIncoming .mediaChatWindow__chatting,.mediaChatWindow--videoIncoming .mediaChatWindow__waitingAni,.mediaChatWindow--videoRequesting .mediaChatWindow__chatting{display:none}.mediaChatWindow__requesting .mediaChatWindow__agentAvatar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mediaChatWindow--audioChatting .mediaChatWindow__agentAvatar{display:block}.mediaChatWindow__chatting{width:100%;height:100%;margin:45px 0;position:relative}.mediaChatWindow__chattingAgent{color:#fff;float:left}.mediaChatWindow__chatting .mediaChatWindow__agentName{font-size:1.2rem;color:#fff}.mediaChatWindow--videoChatting .mediaChatWindow__chatting{display:-webkit-box;display:-ms-flexbox;display:flex}.mediaChatWindow--videoChatting .mediaChatWindow__chattingAgent{position:absolute;left:20px;top:10px;text-align:left}.mediaChatWindow--videoChatting .mediaChatWindow__buttons{position:absolute;bottom:40px;width:100%}.popup-window .mediaChatWindow--videoChatting .mediaChatWindow__buttons{bottom:10px}.mediaChatWindow--videoChatting .icon-video,.mediaChatWindow--videoChatting .mediaChatWindow__agentImg,.mediaChatWindow--videoChatting .mediaChatWindow__chatTypeText{display:none}.mediaChatWindow__chattingDuration{font-size:.933333rem;float:left}.mediaChatWindow--audioChatting .mediaChatWindow__chatting{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mediaChatWindow--audioChatting .mediaChatWindow__chattingAgent{position:static}.mediaChatWindow--audioChatting .mediaChatWindow__agentName{padding:20px 0 15px}.mediaChatWindow__chattingTime{display:-webkit-box;display:-ms-flexbox;display:flex;opacity:.5;height:18px}.mediaChatWindow__localVideo video,.mediaChatWindow__remoteVideo,.mediaChatWindow__remoteVideo video{width:100%;height:100%}.mediaChatWindow--audioChatting .mediaChatWindow__chattingTime{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mediaChatWindow--audioChatting .mediaChatWindow__chattingDuration{float:none}.mediaChatWindow--audioChatting .mediaChatWindow__chatTypeText{font-size:.933333rem;padding-right:10px}.mediaChatWindow--audioChatting video{display:none}.mediaChatWindow__remoteVideo:hover .mediaChatWindow__buttons{display:block}.sideWindow--mobile .mediaChatWindow__remoteVideo{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mediaChatWindow__localVideo{position:absolute;right:36px;top:25px;width:80px}.sideWindow--bubble .mediaChatWindow__localVideo{right:20px}.mediaChatWindow__loading{display:none;width:32px;height:32px;position:absolute;top:50%;left:50%;margin-left:-16px;margin-top:-16px}.mediaChatWindow__remoteVideo--loading+.mediaChatWindow__loading{display:block}.mediaChatWindowSwitch{position:absolute;bottom:0;width:100%;height:45px}.mediaChatWindowSwitch .imgIcon{width:19px;height:19px;margin-top:6px}.mediaChatWindowSwitch__element{float:left;width:85px;background:rgba(0,0,0,.3);color:#fff;height:35px;cursor:pointer;text-align:center;border:none;padding:0}.mediaChatWindowSwitch__element:not(.mediaChatWindowSwitch__active):hover{background:rgba(0,0,0,.45)}.mediaChatWindowSwitch__element:last-child{border-top-right-radius:2px;border-bottom-right-radius:2px}.mediaChatWindowSwitch__element:first-child{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:0 solid rgba(0,0,0,.1)}.mediaChatWindowSwitch__messageCount{position:relative;left:18px;top:-28px;display:inline-block;width:auto;min-width:14px;height:14px;line-height:14px;font-size:.8rem;background:#fd9016;color:#fff;border-radius:14px}.mediaChatWindowSwitch__active{background:rgba(0,0,0,.6);cursor:default}.mediaChatWindowSwitch__element .icon{font-size:1.066667rem;line-height:35px}.sideWindow--mobile{width:100%;top:0;left:0;bottom:0;height:100%;overflow:hidden}.sideWindow--mobile:not(.sideWindow--ipad),.sideWindow:not(.sideWindow--embedded){border-radius:0}.sideWindow--mobile .mediaChatWindowSwitch{position:absolute;bottom:0;width:100%;right:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sideWindow--mobile.sideWindow--ipad.sideWindow--bubble .mediaChatWindowSwitch.sidetWindowSwitch-button-light{border:2px solid #f0f1f2;border-top:none}.sideWindow--mobile .mediaChatWindowSwitch__element{border-radius:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;background:#000006;color:#000004}.sideWindow--mobile .mediaChatWindowSwitch__active{background:#000001}.knowlegebase__no-page,.sideWindow__knowlegebase{top:0;background:#f2f2f2;position:absolute;right:0;left:0}.mediaChatWindow .sideWindow__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mediaChatWindow .sideWindow__content--cobrowsing{width:350px}.sideWindow__contentText{color:#fff;font-size:1.133333rem;line-height:1.6rem;margin-top:2rem;margin-bottom:1.333333rem}.sideWindow__contentSubText{color:#fff;line-height:1.466666rem;opacity:.3;font-size:.933333rem;margin-bottom:2rem}.sideWindow__contentSubText>div{width:100%}.sideWindow__contentSubText strong{font-weight:700}.sideWindow__contentSubText em{text-decoration:underline}.sideWindow__contentSubText a{color:#fff;text-decoration:underline}.sideWindow__btn{margin-top:2rem}@-webkit-keyframes slideInRight{from{-webkit-transform:translate3d(110%,0,0);transform:translate3d(110%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInRight{from{-webkit-transform:translate3d(110%,0,0);transform:translate3d(110%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInRight{-webkit-animation:slideInRight .4s cubic-bezier(.785,.135,.15,.86) both;animation:slideInRight .4s cubic-bezier(.785,.135,.15,.86) both}.sideWindow__knowlegebase{bottom:0;overflow:hidden}.knowlegebase__no-page{bottom:0;text-align:center;padding-top:100px;font-size:xx-large;font-family:"SourceSans Pro"}.window--rtl .webview__content{direction:rtl}.sideWindow--mobile .webview__content,.sideWindow--mobile .webview__iframe{margin-bottom:20px}.webview__content,.webview__iframe{width:99%;padding:0 43px;position:absolute;top:30px;margin-bottom:30px;overflow:auto;bottom:0;color:#000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;line-height:1.3}.webview__content h1.webview__title,.webview__iframe h1.webview__title{margin-top:21px;margin-bottom:22px;font-size:1.13333333rem;line-height:1.29;color:#000;font-family:"SourceSans Pro Bold"}.webview__content iframe,.webview__iframe iframe{width:100%;height:100%;border:none;position:absolute;right:0;bottom:0;padding-top:10px}.sideWindow--mobile .webview__content{top:0;padding:0 33px 38px}.sideWindow--mobile .webview__content h1.webview__title{margin-top:39px;margin-bottom:15px;font-size:1.46666666rem;line-height:1.27}.sideWindow--mobile .webview__content iframe{height:calc(100% + 38px)}.webview__error{text-align:center;color:#666;font-family:"SourceSans Pro"}.webview__error img{margin-top:82px;text-align:center}.webview__error .oops{margin-top:40px;font-size:35px;font-family:"SourceSans Pro Bold"}.webview__error .message{margin-top:20px;font-size:20px;font-family:"SourceSans Pro"}.webview__loading{width:6%;margin:164px auto}.webview__content:hover::-webkit-scrollbar-thumb{background-color:#c8c8c8}.sideWindow__webview,.webview__content--fill{background:#f2f2f2;bottom:0;position:absolute;right:0}.sideWindow__webview{top:0;left:0;overflow:hidden}.webview__content--fill{width:1%;top:30px}.sideWindow--mobile .webview__close{right:0;top:0;width:34px;height:38px;padding:13px 17px 13px 4px}.sideWindow--mobile .webview__close svg{width:12px;height:12px}.webview__close{position:absolute;right:0;top:0;z-index:9999;cursor:pointer;fill:#00000a;background:0 0;border:none;padding:16px 16px 0;width:44px;height:30px}.webview__close svg{width:13px;height:13px}.webview__close:active,.webview__close:hover{fill:#000003}::-webkit-scrollbar{height:6px;width:6px}::-webkit-scrollbar-button{height:4px;background-color:transparent;background-repeat:no-repeat;cursor:pointer}::-webkit-scrollbar-corner{background-color:transparent}::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::-webkit-scrollbar-track{background-color:transparent}#container:-webkit-full-screen-ancestor:not(iframe){height:100%}.sideWindow:-webkit-full-screen-ancestor:not(iframe){height:100%;width:auto}html:-webkit-full-screen-ancestor:not(iframe){height:100%}body:-webkit-full-screen-ancestor:not(iframe){height:100%}a{color:#000001;cursor:pointer;text-decoration:none}.sideWindow__webview a[href]{color:#323dbf;border-bottom:solid 1px #323dbf}.sideWindow__webview a[href]:active,.sideWindow__webview a[href]:focus,.sideWindow__webview a[href]:hover{border-bottom-color:rgba(50,61,191,.6)}.sidewindow-icons-div-dark{background-color:#000}.sidewindow-icons-div-dark::before{content:\'\';width:100%;height:100px;position:absolute;top:-100px;left:0;background-image:linear-gradient(to bottom,rgba(0,0,0,0),#000)}.sidewindow-icons-div-light{background-color:#fff}.sidetWindowSwitch-button{width:25px;height:25px;border:none;position:relative;padding:0}.sidetWindowSwitch-button-dark{background:rgba(0,0,0,.3)}.sidetWindowSwitch-button-light{background:rgba(255,255,255,.3)}.mediaChatWindowSwitch-box-show{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mediaChatWindowSwitch-div-box-show{width:80%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-pack:distribute;justify-content:space-around}.sideWindow--mobile #kb .webview__content{bottom:45px}html:not(.global-showFocus) button:focus{outline:0}.sideWindow--circle.sideWindow.sideWindow--embedded:not(.sideWindow--mobile),.sideWindow--classic.sideWindow.sideWindow--embedded:not(.sideWindow--mobile){right:0}',WindowBaseChildren=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.maxHandledMsgId=-1,i.bodyDisableScroll=n.onMount,i.bodyEnableScroll=n.onUnmount,i.onReadNewMsg=i.onReadNewMsg.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){this.props.show?this.bodyDisableScroll():this.bodyEnableScroll(),registerAnimationEnd(this.element.firstChild,this.props.onAnimated),registerActivityListener(this.element.firstChild,this.onReadNewMsg,this.props.isMobile)},t.prototype.componentDidUpdate=function(e){var t=this.props.show;!e.show&&t&&this.onReadNewMsg(),e.show!==t&&(t?this.bodyDisableScroll():this.bodyEnableScroll())},t.prototype.componentWillUnmount=function(){this.bodyEnableScroll(),registerAnimationEnd(this.element.firstChild,this.props.onAnimated),removeActivityListener(this.element.firstChild,this.onReadNewMsg,this.props.isMobile)},t.prototype.onReadNewMsg=function(){if(this.props.chatStatus===chatting||this.props.chatStatus===invited){(!this.props.maxVisitorReadId||this.props.maxVisitorReadId&&!isAfterMaxMessage(this.props.maxVisitorReadId,this.props.maxGuid,this.props.messages))&&this.props.maxGuid!==this.maxHandledMsgId&&(this.props.onReadNewMsg(this.props.maxGuid),this.maxHandledMsgId=this.props.maxGuid)}},t.prototype.render=function(){var e=this,t=this.props,n=t.isMobile,i=t.isRightToLeft,o=t.isPoppedOut,a=t.windowStyle,r=t.children,s=t.windowTab,d=t.chatStatus,c=t.env,l=t.isIPad,u=t.show,p=t.showAvatar,f=t.ifShowSideWindow,g=t.cornerStyle,m=t.isCurrentAdaptiveButton,b=t.width,w=index$4(s===chat&&index$4(d===waiting&&"animation--waiting",d===chatting&&"animation--chatting",d===chatted&&"animation-chatted")),v=index$4("embedded-window",n&&"window--mobile",f&&"withSideWin",l&&"window--ipad",n&&c===mobileVertical&&"window--mobileVertical",n&&c===mobileHorizontal&&"window--mobileHorizontal",isIE&&"window--ie",isEdge&&"window--edge",!isSafari&&isChrome&&"window--chrome"),y=void 0;"circular"===g?y="window--circular":"square"===g&&(y="window--square");var C=null;return n&&!l&&(C=b),h("div",{className:index$4(v,!u&&"window--minimized"),ref:function(t){e.element=t}},h("div",{id:"whole-window",className:index$4(p&&"window--bio","whole-window","window--animated",i?"window--rtl":"",o?"":"window--embedded",y,styleClassName(a),"circle"===a&&f&&!l&&!n&&"window--circle--sidewindow",a===classic&&f&&!l&&!n&&"window--classic--sidewindow",m&&"window--adaptive",w,isIE9?"window--ie9":"",isIE10&&"window--ie10"),style:{maxWidth:C}},h("div",{id:"main",className:"main-container",style:f&&n&&(s===chat||s===prechat||s===offline||s===login||"ssoLogin"===s)&&(a!==bubble?{height:"calc(100% - 45px)"}:{"margin-bottom":"45px"})},r)))},t}(Component),cobrowsingStopShowingButtonStyle='body{margin: 0;font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, sans-serif;overflow: hidden}.glance_cobrowse_btn{position: absolute;width: 100%;background-color: #1c2124;height: 30px;box-sizing: border-box;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow: hidden;}.glance_cobrowse_btn button{display:block;width: 135px;height: 30px;line-height: 30px;padding-left: 20px;padding-right: 20px;box-sizing: border-box;font-size: 15px;color: #fff;text-decoration: none;border: none;appearance:none;-moz-appearance:none; -webkit-appearance:none;outline: none;background: none;cursor: pointer;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}.glance_cobrowse_btn__drag{position: absolute;right: 8px;top: 5px;width: 20px;height: 20px;border-left: 1px solid rgba(255,255,255,0.2);padding-left: 8px;}.svgPath {fill: #000;width: 16px;height: 16px;}.glance_cobrowse_btn__drag .drag{fill: #fff}',defaultStyles=function(e){return{position:e?"absolute":"fixed",width:"100%",height:"100%",overflow:"hidden",top:0,bottom:0,right:0,left:0,margin:0,touchAction:"none"}},modalStyle=function(e,t){return{position:e?"absolute":"fixed",top:0,right:0,bottom:0,left:0,backgroundColor:"rgba(0,0,0,0.15)",zIndex:t?popupSideWindowContainer:sidewindow}},hiddenStyle$2={display:"none"},adaptiveButtonSize=60,adaptiveButtonOffset$1=25,buttonWindowDistance=20,blurRadius=25,blurYOffset=5,blurAtBottom=17.5,getBottomOffset=function(e){var t=e.showAdaptiveMinimizeIcon,n=e.windowStyle,i=105;return n===bubble||(i-=17.5),t?i:0},getSideWindowBottomExtraOffset=function(e){var t=e.windowStyle,n=e.isMobile,i=e.isIPad,o=e.isPoppedOut,a=t===bubble;return i?a?0:o?0:17.5:!a||n||o?0:-17.5},getRightOffset=function(e){return e.showAdaptiveMinimizeIcon?12.5:0},noop$4=function(){},eventKey=null,stateKey=null,keys$1={hidden:"visibilitychange",webkitHidden:"webkitvisibilitychange",mozHidden:"mozvisibilitychange",msHidden:"msvisibilitychange"};Object.keys(keys$1).forEach(function(e){e in document$2&&(eventKey=keys$1[e],stateKey=e)});var Window$2=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));i.state={showMessage:!0,cobrowsingStopShowingLeft:"undefined",cobrowsingStopShowingTop:0,windowBaseChildrenDidMount:!1,minimized:n.windowStatus===minimized,sideWindowAnimationEnd:!1,isBubbleMinimizing:!1,isBubbleRestoring:!1},i.setWinSize=function(){},i.getWinStyle=function(){},i.getSideWinStyle=function(){},i.getInnerCss=i.getInnerCss.bind(i),i.updateIframe=function(){return noop$4},i.shouldComponentUpdate=shouldComponentUpdateGen(i,["windowStatus","windowTab","children","windowStyle","unread","title","seed","sideWindow","width","height","cornerStyle","showToolbox"],["showMessage","right","bottom","windowBaseChildrenDidMount","cobrowsingStopShowingLeft","cobrowsingStopShowingTop","minimized","sideWindowAnimationEnd"]);var o=n.onFocusToggle;return i.onFocus=function(){var e=i.props.windowStatus;e!==open&&e!==restored||o(!0)},i.onFocusToggle=function(){var e=i.props.windowStatus;o(!document$2[stateKey]&&(e===open||e===restored))},i.getChildren=i.getChildren.bind(i),i.getSideWin=i.getSideWin.bind(i),i.getDragBar=i.getDragBar.bind(i),i.onAnimated=i.onAnimated.bind(i),i.onMount=i.onMount.bind(i),i.bodyEnableScroll=i.bodyEnableScroll.bind(i),i.bodyDisableScroll=i.bodyDisableScroll.bind(i),i.sideWindowOnAnimated=i.sideWindowOnAnimated.bind(i),i.updateSideWindowNoScroll=i.updateSideWindowNoScroll.bind(i),i.bubbleIframeHeight=0,i.onWindowVisibleChange=i.onWindowVisibleChange.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){if(this.props.isPoppedOut&&!this.props.showChatWindowInSidewindow){var e=getPageInfo(),t=e.popout;t&&t.SideWinWidth&&t.SideWinWidth>0&&global$2.resizeTo(global$2.outerWidth-t.SideWinWidth,global$2.outerHeight),updatePageInfo({popout:_extends({},t,{SideWinWidth:-1,isLarged:!1})})}var n=this.props,i=n.isMobile,o=n.isIPad,a=n.isPoppedOut;(i&&!o||a)&&onWindowVisible(this.onWindowVisibleChange)},t.prototype.componentWillReceiveProps=function(e){var t=this.props;e.width!==t.width||(e.height,t.height),e.unread>t.unread&&this.setState({showMessage:!0}),e.windowStatus!==this.props.windowStatus&&this.setState({minimized:!1}),(e.windowStatus===open||e.windowStatus===restored)&&e.windowStatus!==this.props.windowStatus&&this.props.onReadNewMsg(),this.setState({isBubbleMinimizing:e.windowStatus!==this.props.windowStatus&&e.windowStatus===minimized}),this.setState({isBubbleRestoring:e.windowStatus!==this.props.windowStatus&&e.windowStatus===restored})},t.prototype.componentWillUnmount=function(){var e=this.contentWindow;e&&e.removeEventListener&&(e.removeEventListener("focus",this.onFocus),e.removeEventListener("blur",this.onBlur)),document$2.removeEventListener(eventKey,this.onFocusToggle),this.timer&&(clearTimeout(this.timer),this.timer=null),this.bodyEnableScroll();var t=this.props,n=t.isMobile,i=t.isIPad,o=t.isPoppedOut;(n&&!i||o)&&removeWindowVisible(this.onWindowVisibleChange)},t.prototype.onAnimated=function(){this.props.windowStatus===minimized&&!this.state.minimized&&this.setState({minimized:!0})},t.prototype.onMount=function(e){this.contentWindow=e,e.addEventListener("focus",this.onFocus),e.addEventListener("blur",this.onBlur),this.props.onMounted&&(this.props.onMounted(),document$2.addEventListener(eventKey,this.onFocusToggle))},t.prototype.onWindowVisibleChange=function(){var e=this.props,t=e.windowStatus,n=e.chatStatus;!onWindowVisible()||t!==open&&t!==restored||n!==chatting&&n!==invited||this.props.onReadNewMsg()},t.prototype.getInnerCss=function(){var e=this.props,t=e.isMobile,n=e.windowStyle===bubble,i=void 0;i=e.background?"background-image:"+e.background:"background-color:#fff";var o="#fff";t||(o=n?"#f8f8f8":"#fafafa");var a=!(t||n),r=t||!n,s=[e.fontCSS,replaceThemeColors(css,e.mainColor),replaceThemeColors(buttonCss,e.mainColor),".online .chatButton:after{","background-color:"+e.mainColor,"}",".offline .chatButton:after{","background-color:#bbb","}",".main-container{"+i+"}",".chatInputContainer{","background:"+o+";",a?"opacity:0.9;":"",r?"border-top:1px solid rgba(0,0,0,.1);":"","}",".chatInputContainer+div>.footer{","background:"+o+";",a?"opacity:0.9;":"","}",".window--bubble .window__operation{background:"+colorOpacity(e.mainColor,.7)+"}",""].join(""),d=t?"#glance_gesture{position: fixed;}":"";return[s,e.customCss,d,""]},t.prototype.getChildren=function(e){var t=this.props,n=t.windowStatus,i=t.isMobile,o=t.title,a=t.isRightToLeft,r=t.isPoppedOut,s=t.windowStyle,d=t.children,c=t.windowTab,l=t.chatStatus,u=t.isIPad,p=t.showAvatar,f=t.ifShowSideWindow,g=t.cornerStyle,m=t.isCurrentAdaptiveButton,b=t.width,w=t.ifEnableVisitorSeeMsgSentSeen,v=t.maxVisitorReadId,y=t.maxMsgId,C=t.onReadNewMsg,_=t.maxGuid,x=t.messages,S=n===open,k=n===restored;return h(WindowBaseChildren,{show:S||k,isMobile:i,title:o,isRightToLeft:a,isPoppedOut:r,windowStyle:s,windowTab:c,chatStatus:l,isIPad:u,env:e,onUnmount:this.bodyEnableScroll,onMount:this.bodyDisableScroll,onAnimated:this.onAnimated,showAvatar:p,ifShowSideWindow:f,cornerStyle:g,isCurrentAdaptiveButton:m,width:b,ifEnableVisitorSeeMsgSentSeen:w,maxVisitorReadId:v,maxMsgId:y,maxGuid:_,onReadNewMsg:C,messages:x},d)},t.prototype.getSideWin=function(e,t,n,i){var o=this.props,a=o.sideWindow,r=o.fontCSS,s=o.onFocusToggle,d=this.props,c=hiddenStyle$2,l=void 0;if(a){if(n)c={display:"none"};else{c=this.getSideWinStyle(e,t,n),c.bottom+=getBottomOffset(d)+getSideWindowBottomExtraOffset(d),c.right+=getRightOffset(this.props);var u=0;c&&c.bottom&&(u=c.bottom),c.maxHeight="calc(100% - "+u+"px)"}l=h(a,{ToogleChatWinFocused:s,sideWindowOnAnimated:this.sideWindowOnAnimated,updateSideWindowNoScroll:this.updateSideWindowNoScroll})}d.isMobile||d.isPoppedOut||d.windowStyle===bubble||(c.zIndex=sidewindowMobile,c.right+=12);var p=getLanguages(this.context);return h(Iframe,{key:"sideWin",id:"side_window_container",style:c,languageTag:i,scrolling:this.state.sideWindowAnimationEnd?"auto":"no",title:p.sideWindow},h(Style,{ css:[r,replaceThemeColors('.form-fields--horizonal .container-checkboxlist,.form-fields--horizonal .container-radiolist{width:calc(100% - 80px);max-width:calc(100% - 80px)}.container-checkboxlist{display:inline-block;width:100%;max-width:100%}.container-checkbox{display:inline-block;position:relative;color:#333;padding-left:26px;width:100%;line-height:1.2rem}.container-checkbox.disable{pointer-events:none}.container-checkbox i{display:inline-block;width:16px;height:16px;position:absolute;left:0;top:0;margin-top:1px}.container-checkbox i.selected{display:block}.container-checkbox i.unselected,.horizontal{display:inline-block}.checkbox:focus+.selected .checkbox2,.selected .checkbox2{fill:#00000a}.checkbox2{fill:#ddd}.checkbox3{fill:#fff}.checkbox:focus+.unselected .checkbox2,.container-checkbox:hover>.unselected .checkbox2{fill:#00000a}.checkbox{position:absolute;z-index:-1;opacity:0}.horizontal{margin-right:10px}.vertical{display:block}.container-checkbox input[type=Checkbox]:disabled~.checkbox__text,.container-checkbox input[type=Checkbox]:disabled~i svg{opacity:.6;pointer-events:none;cursor:default}.container-checkbox input[type=Checkbox]~.checkbox__text{cursor:pointer}.container-checkbox input[type=Checkbox]~i svg{cursor:pointer;width:15px;height:15px}.global-showFocus .container-checkbox input[type=Checkbox]:focus~i svg{outline:#00000a auto 1px}.checkbox1{fill-rule:evenodd;clip-rule:evenodd;fill:#fff}.selected .checkbox1{fill:#00000a}.svg{width:16px;height:16px}.svg--loading{width:18px;height:18px}.svg--loadingChat{display:block;width:28px;height:28px;margin:0 auto}.svg.disabled{opacity:.3}svg:hover{cursor:pointer}.svg.disabled:hover{cursor:default}.svgPath{fill:#000;width:16px;height:16px}.svgRatePath1{fill:none;stroke:#000;stroke-miterlimit:10}.svgPathSendFile1{fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}.svgPathVideo1{fill:none;stroke:#000;stroke-miterlimit:10}.svgPathVideo2{fill:none}.svgPathVoice1{fill:none;stroke:#000;stroke-miterlimit:10}.svgPathVoice2{fill:#000}.sendemail1{fill:none}.sendemail2{fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}.svg:not(.disabled):hover .sendemail1,.svg:not(.disabled):hover .svgPathSendFile1,.svg:not(.disabled):hover .svgPathVideo1,.svg:not(.disabled):hover .svgPathVoice1,.svg:not(.disabled):hover .svgRatePath1{fill:rgba(0,0,0,.3)}.svg.active .svgRatePath1{fill:#000}.svg-white .svgPathVoice2,.svgClosePath,.svgMinimizePath,.svgPopupPath{fill:#fff}.svg-white .sendemail2,.svg-white .svgPathSendFile1,.svg-white .svgPathVideo1,.svg-white .svgPathVoice1,.svg-white .svgRatePath1{stroke:#fff}.svg-white:not(.disabled):hover .sendemail1,.svg-white:not(.disabled):hover .svgPathSendFile1,.svg-white:not(.disabled):hover .svgPathVideo1,.svg-white:not(.disabled):hover .svgPathVoice1,.svg-white:not(.disabled):hover .svgRatePath1{fill:rgba(255,255,255,.3)}.svg-white.active .svgRatePath1{fill:#fff!important}.svg-white.active .svgPathSendFile1{fill:#fff!important;stroke:#000001!important}.svg-white.active .sendemail2{fill:none!important;stroke:transparent!important}.svg-white.active .sendemail1{fill:#fff!important}.svg-sidewindow-icon{width:25px;height:25px;fill:#a2a2a2;position:relative;border:1px solid transparent}.mediaChatWindow,.sideWindow{position:absolute;overflow:hidden}.sideWindow:not(.sideWindow--mobile) .svg-sidewindow-icon:focus,.sideWindow:not(.sideWindow--mobile) .svg-sidewindow-icon:hover{border:1px solid #a2a2a2;border-radius:50%}.svg-sidewindow-icon-select-dark{border:1px solid #a2a2a2;border-radius:50%;fill:#000;background-color:#a2a2a2}.svg-sidewindow-icon-select-light{border:1px solid #a2a2a2;border-radius:50%;fill:#fff;background-color:#a2a2a2}.svg-sidewindow-icon-select-light-mobile{border:none;fill:#00000a;background-color:#fdfdfd}.svg-sidewindow-icon-select-dark-mobile{border:none;fill:#fdfdfd;background-color:#000}html{margin:0;font-size:15px}*,::after,::before{box-sizing:border-box}body{margin:0;font-family:"SourceSans Pro",Arial;font-size:1rem;line-height:1.42857143}.clearfix::after{content:"";display:block;clear:both}.sideWindow{box-shadow:0 5px 12.5px 0 rgba(0,0,0,.15);width:100%;height:100%;right:0;bottom:0;border-radius:5px}.sideWindow.sideWindow--bar{border-radius:0}.window--chrome.sideWindow{box-shadow:0 5px 25px 0 rgba(0,0,0,.15)}.window--circular.sideWindow{border-radius:20px}.sideWindow--embedded{width:calc(100% - 25px);bottom:17.5px;height:calc(100% - 25px);right:12.5px}.sideWindow--bubble.sideWindow--embedded.sideWindow--mobile{width:100%}.mediaChatWindow{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:100%;height:100%;background-color:#333;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;text-align:center;left:0}.popup-window .mediaChatWindow{-webkit-box-flex:0;-ms-flex:0 0 500px;flex:0 0 500px;position:relative}.mediaChatWindow.hidden{display:none}.mediaChatWindow__avatarImg{width:127px;height:127px;background-color:#fff;border-radius:100%;border:2px #fff;padding:2px}.mediaChatWindow__agentName{max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0 auto}.mediaChatWindow--audioIncoming .mediaChatWindow__agentName,.mediaChatWindow--audioRequesting .mediaChatWindow__agentName,.mediaChatWindow--videoIncoming .mediaChatWindow__agentName,.mediaChatWindow--videoRequesting .mediaChatWindow__agentName{font-size:1.2rem;color:#fff;padding:20px 0 15px}.mediaChatWindow__waiting{font-size:.933333rem;color:#fff;opacity:.5;height:18px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@-webkit-keyframes blink{0%,100%{opacity:.2}50%{opacity:1}}@keyframes blink{0%,100%{opacity:.2}50%{opacity:1}}.mediaChatWindow__waitingAni span{animation:blink both 1.4s infinite;-webkit-animation:blink both 1.4s infinite}.mediaChatWindow__waitingAni span:nth-child(2){animation-delay:.2s;-webkit-animation-delay:.2s}.mediaChatWindow__waitingAni span:nth-child(3){animation-delay:.4s;-webkit-animation-delay:.4s}.mediaChatWindow__iconfont{font-size:.933333rem;padding-right:10px;position:relative;top:4px}.mediaChatWindow__textAudio,.mediaChatWindow__textVideo{display:-webkit-box;display:-ms-flexbox;display:flex}.mediaChatWindow__buttons{margin-top:40px;width:100%;left:1px}.mediaChatWindow__button,.mediaChatWindow__button svg{width:62px;height:62px;position:relative}.mediaChatWindow__button{border-radius:50%;font-size:2.333333rem;color:#fff;display:inline-block;margin:0 25px;line-height:55px;cursor:pointer;transition:opacity .3s;border:none;padding:0;background:0 0;z-index:666}.mediaChatWindow__button .mediaChatWindow__iconfont{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mediaChatWindow__button:hover{opacity:.8}.mediaChatWindow__button:active{box-shadow:inset 0 2px 5px rgba(0,0,0,.25)}.mediaChatWindow--audioIncoming .mediaChatWindow__textVideo,.mediaChatWindow--audioRequesting .mediaChatWindow__textVideo,.mediaChatWindow--videoIncoming .mediaChatWindow__textAudio,.mediaChatWindow--videoRequesting .mediaChatWindow__textAudio{display:none}.mediaChatWindow--audioChatting .mediaChatWindow__chatting,.mediaChatWindow--audioIncoming .mediaChatWindow__requesting,.mediaChatWindow--audioRequesting .mediaChatWindow__requesting,.mediaChatWindow--videoChatting .mediaChatWindow__chatting,.mediaChatWindow--videoIncoming .mediaChatWindow__requesting,.mediaChatWindow--videoRequesting .mediaChatWindow__requesting{display:block}.mediaChatWindow--audioChatting .mediaChatWindow__requesting,.mediaChatWindow--audioIncoming .mediaChatWindow__chatting,.mediaChatWindow--audioIncoming .mediaChatWindow__waitingAni,.mediaChatWindow--audioRequesting .mediaChatWindow__chatting,.mediaChatWindow--videoChatting .mediaChatWindow__requesting,.mediaChatWindow--videoIncoming .mediaChatWindow__chatting,.mediaChatWindow--videoIncoming .mediaChatWindow__waitingAni,.mediaChatWindow--videoRequesting .mediaChatWindow__chatting{display:none}.mediaChatWindow__requesting .mediaChatWindow__agentAvatar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mediaChatWindow--audioChatting .mediaChatWindow__agentAvatar{display:block}.mediaChatWindow__chatting{width:100%;height:100%;margin:45px 0;position:relative}.mediaChatWindow__chattingAgent{color:#fff;float:left}.mediaChatWindow__chatting .mediaChatWindow__agentName{font-size:1.2rem;color:#fff}.mediaChatWindow--videoChatting .mediaChatWindow__chatting{display:-webkit-box;display:-ms-flexbox;display:flex}.mediaChatWindow--videoChatting .mediaChatWindow__chattingAgent{position:absolute;left:20px;top:10px;text-align:left}.mediaChatWindow--videoChatting .mediaChatWindow__buttons{position:absolute;bottom:40px;width:100%}.popup-window .mediaChatWindow--videoChatting .mediaChatWindow__buttons{bottom:10px}.mediaChatWindow--videoChatting .icon-video,.mediaChatWindow--videoChatting .mediaChatWindow__agentImg,.mediaChatWindow--videoChatting .mediaChatWindow__chatTypeText{display:none}.mediaChatWindow__chattingDuration{font-size:.933333rem;float:left}.mediaChatWindow--audioChatting .mediaChatWindow__chatting{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mediaChatWindow--audioChatting .mediaChatWindow__chattingAgent{position:static}.mediaChatWindow--audioChatting .mediaChatWindow__agentName{padding:20px 0 15px}.mediaChatWindow__chattingTime{display:-webkit-box;display:-ms-flexbox;display:flex;opacity:.5;height:18px}.mediaChatWindow__localVideo video,.mediaChatWindow__remoteVideo,.mediaChatWindow__remoteVideo video{width:100%;height:100%}.mediaChatWindow--audioChatting .mediaChatWindow__chattingTime{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mediaChatWindow--audioChatting .mediaChatWindow__chattingDuration{float:none}.mediaChatWindow--audioChatting .mediaChatWindow__chatTypeText{font-size:.933333rem;padding-right:10px}.mediaChatWindow--audioChatting video{display:none}.mediaChatWindow__remoteVideo:hover .mediaChatWindow__buttons{display:block}.sideWindow--mobile .mediaChatWindow__remoteVideo{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mediaChatWindow__localVideo{position:absolute;right:36px;top:25px;width:80px}.sideWindow--bubble .mediaChatWindow__localVideo{right:20px}.mediaChatWindow__loading{display:none;width:32px;height:32px;position:absolute;top:50%;left:50%;margin-left:-16px;margin-top:-16px}.mediaChatWindow__remoteVideo--loading+.mediaChatWindow__loading{display:block}.mediaChatWindowSwitch{position:absolute;bottom:0;width:100%;height:45px}.mediaChatWindowSwitch .imgIcon{width:19px;height:19px;margin-top:6px}.mediaChatWindowSwitch__element{float:left;width:85px;background:rgba(0,0,0,.3);color:#fff;height:35px;cursor:pointer;text-align:center;border:none;padding:0}.mediaChatWindowSwitch__element:not(.mediaChatWindowSwitch__active):hover{background:rgba(0,0,0,.45)}.mediaChatWindowSwitch__element:last-child{border-top-right-radius:2px;border-bottom-right-radius:2px}.mediaChatWindowSwitch__element:first-child{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:0 solid rgba(0,0,0,.1)}.mediaChatWindowSwitch__messageCount{position:relative;left:18px;top:-28px;display:inline-block;width:auto;min-width:14px;height:14px;line-height:14px;font-size:.8rem;background:#fd9016;color:#fff;border-radius:14px}.mediaChatWindowSwitch__active{background:rgba(0,0,0,.6);cursor:default}.mediaChatWindowSwitch__element .icon{font-size:1.066667rem;line-height:35px}.sideWindow--mobile{width:100%;top:0;left:0;bottom:0;height:100%;overflow:hidden}.sideWindow--mobile:not(.sideWindow--ipad),.sideWindow:not(.sideWindow--embedded){border-radius:0}.sideWindow--mobile .mediaChatWindowSwitch{position:absolute;bottom:0;width:100%;right:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sideWindow--mobile.sideWindow--ipad.sideWindow--bubble .mediaChatWindowSwitch.sidetWindowSwitch-button-light{border:2px solid #f0f1f2;border-top:none}.sideWindow--mobile .mediaChatWindowSwitch__element{border-radius:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;background:#000006;color:#000004}.sideWindow--mobile .mediaChatWindowSwitch__active{background:#000001}.knowlegebase__no-page,.sideWindow__knowlegebase{top:0;background:#f2f2f2;position:absolute;right:0;left:0}.mediaChatWindow .sideWindow__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mediaChatWindow .sideWindow__content--cobrowsing{width:350px}.sideWindow__contentText{color:#fff;font-size:1.133333rem;line-height:1.6rem;margin-top:2rem;margin-bottom:1.333333rem}.sideWindow__contentSubText{color:#fff;line-height:1.466666rem;opacity:.3;font-size:.933333rem;margin-bottom:2rem}.sideWindow__contentSubText>div{width:100%}.sideWindow__contentSubText strong{font-weight:700}.sideWindow__contentSubText em{text-decoration:underline}.sideWindow__contentSubText a{color:#fff;text-decoration:underline}.sideWindow__btn{margin-top:2rem}@-webkit-keyframes slideInRight{from{-webkit-transform:translate3d(110%,0,0);transform:translate3d(110%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInRight{from{-webkit-transform:translate3d(110%,0,0);transform:translate3d(110%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInRight{-webkit-animation:slideInRight .4s cubic-bezier(.785,.135,.15,.86) both;animation:slideInRight .4s cubic-bezier(.785,.135,.15,.86) both}.sideWindow__knowlegebase{bottom:0;overflow:hidden}.knowlegebase__no-page{bottom:0;text-align:center;padding-top:100px;font-size:xx-large;font-family:"SourceSans Pro"}.window--rtl .webview__content{direction:rtl}.sideWindow--mobile .webview__content,.sideWindow--mobile .webview__iframe{margin-bottom:20px}.webview__content,.webview__iframe{width:99%;padding:0 43px;position:absolute;top:30px;margin-bottom:30px;overflow:auto;bottom:0;color:#000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;line-height:1.3}.webview__content h1.webview__title,.webview__iframe h1.webview__title{margin-top:21px;margin-bottom:22px;font-size:1.13333333rem;line-height:1.29;color:#000;font-family:"SourceSans Pro Bold"}.webview__content iframe,.webview__iframe iframe{width:100%;height:100%;border:none;position:absolute;right:0;bottom:0;padding-top:10px}.sideWindow--mobile .webview__content{top:0;padding:0 33px 38px}.sideWindow--mobile .webview__content h1.webview__title{margin-top:39px;margin-bottom:15px;font-size:1.46666666rem;line-height:1.27}.sideWindow--mobile .webview__content iframe{height:calc(100% + 38px)}.webview__error{text-align:center;color:#666;font-family:"SourceSans Pro"}.webview__error img{margin-top:82px;text-align:center}.webview__error .oops{margin-top:40px;font-size:35px;font-family:"SourceSans Pro Bold"}.webview__error .message{margin-top:20px;font-size:20px;font-family:"SourceSans Pro"}.webview__loading{width:6%;margin:164px auto}.webview__content:hover::-webkit-scrollbar-thumb{background-color:#c8c8c8}.sideWindow__webview,.webview__content--fill{background:#f2f2f2;bottom:0;position:absolute;right:0}.sideWindow__webview{top:0;left:0;overflow:hidden}.webview__content--fill{width:1%;top:30px}.sideWindow--mobile .webview__close{right:0;top:0;width:34px;height:38px;padding:13px 17px 13px 4px}.sideWindow--mobile .webview__close svg{width:12px;height:12px}.webview__close{position:absolute;right:0;top:0;z-index:9999;cursor:pointer;fill:#00000a;background:0 0;border:none;padding:16px 16px 0;width:44px;height:30px}.webview__close svg{width:13px;height:13px}.webview__close:active,.webview__close:hover{fill:#000003}::-webkit-scrollbar{height:6px;width:6px}::-webkit-scrollbar-button{height:4px;background-color:transparent;background-repeat:no-repeat;cursor:pointer}::-webkit-scrollbar-corner{background-color:transparent}::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::-webkit-scrollbar-track{background-color:transparent}#container:-webkit-full-screen-ancestor:not(iframe){height:100%}.sideWindow:-webkit-full-screen-ancestor:not(iframe){height:100%;width:auto}html:-webkit-full-screen-ancestor:not(iframe){height:100%}body:-webkit-full-screen-ancestor:not(iframe){height:100%}a{color:#000001;cursor:pointer;text-decoration:none}.sideWindow__webview a[href]{color:#323dbf;border-bottom:solid 1px #323dbf}.sideWindow__webview a[href]:active,.sideWindow__webview a[href]:focus,.sideWindow__webview a[href]:hover{border-bottom-color:rgba(50,61,191,.6)}.sidewindow-icons-div-dark{background-color:#000}.sidewindow-icons-div-dark::before{content:\'\';width:100%;height:100px;position:absolute;top:-100px;left:0;background-image:linear-gradient(to bottom,rgba(0,0,0,0),#000)}.sidewindow-icons-div-light{background-color:#fff}.sidetWindowSwitch-button{width:25px;height:25px;border:none;position:relative;padding:0}.sidetWindowSwitch-button-dark{background:rgba(0,0,0,.3)}.sidetWindowSwitch-button-light{background:rgba(255,255,255,.3)}.mediaChatWindowSwitch-box-show{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.mediaChatWindowSwitch-div-box-show{width:80%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-pack:distribute;justify-content:space-around}.sideWindow--mobile #kb .webview__content{bottom:45px}html:not(.global-showFocus) button:focus{outline:0}.sideWindow--circle.sideWindow.sideWindow--embedded:not(.sideWindow--mobile),.sideWindow--classic.sideWindow.sideWindow--embedded:not(.sideWindow--mobile){right:0}',this.props.mainColor)]}),l)},t.prototype.getCobrowsingStopShowingButton=function(){var e=this,t=this.props,n="";t.isMobile&&(n="@media screen and (max-width: 767px) {.glance_cobrowse_btn button{width:100%;}.glance_cobrowse_btn__drag{display: none;}}");var i=getLanguages(this.context);return h(Iframe,{key:"cobrowsingStopShowing",id:"cobrowsing_stopshowing_container",style:function(){return t.ifCobrowsingShowing&&!t.isPoppedOut?{border:"none",width:t.isMobile?"135px":"172px",height:"30px",position:"fixed",top:0,left:"undefined"===e.state.cobrowsingStopShowingLeft?(t.width-(t.isMobile?135:172))/2:e.state.cobrowsingStopShowingLeft,zIndex:cobrowseBtn}:{display:"none"}}(),title:i.cobrowsingBtn},h(Style,{css:'body{margin: 0;font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, sans-serif;overflow: hidden}.glance_cobrowse_btn{position: absolute;width: 100%;background-color: #1c2124;height: 30px;box-sizing: border-box;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow: hidden;}.glance_cobrowse_btn button{display:block;width: 135px;height: 30px;line-height: 30px;padding-left: 20px;padding-right: 20px;box-sizing: border-box;font-size: 15px;color: #fff;text-decoration: none;border: none;appearance:none;-moz-appearance:none; -webkit-appearance:none;outline: none;background: none;cursor: pointer;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}.glance_cobrowse_btn__drag{position: absolute;right: 8px;top: 5px;width: 20px;height: 20px;border-left: 1px solid rgba(255,255,255,0.2);padding-left: 8px;}.svgPath {fill: #000;width: 16px;height: 16px;}.glance_cobrowse_btn__drag .drag{fill: #fff}'+n}),h("div",{className:"glance_cobrowse_btn"},t.ifCobrowsingShowing&&h("button",{onClick:function(){return global$2.GLANCE.Cobrowse.Visitor.stopSession()}},t.languageCobrowseStop),h("div",{className:"glance_cobrowse_btn__drag"},h(IconSVG,{type:"drag",className:"",viewBox:"0 0 19 28"}))))},t.prototype.getDragBar=function(){var e=this,t=this.props,n=t.windowStyle,i=t.windowStatus,o=t.isPoppedOut,a=t.width,r=t.height,s=t.showAvatar,d=i===open||i===restored,c=n===bubble;if(!d||o||c)return null;var l=Math.min(this.winWidth,a-this.props.right),u=Math.min(this.winHeight,r-this.props.bottom),p="circle"===n,f=7.5;return p&&s&&(f=32.5),h(Movediv,{key:"dragBar",barWidth:l-25-82,ifrOffsetTop:f,ifrOffsetLeft:12.5,width:a,height:r,right:this.props.right,bottom:this.props.bottom+getBottomOffset(this.props),ifrWidth:l,ifrHeight:u,ifrPositionChanged:function(t,n){var i=n-getBottomOffset(e.props);e.props.onPositionChange(t,Math.max(0,i))}})},t.prototype.getCobrowsingStopShowingDragBar=function(){var e=this,t=this.props,n=t.ifCobrowsingShowing,i=t.width,o=t.height,a=t.isPoppedOut,r=t.isMobile;if(!n||a||r)return null;var s="cobrowsingStopShowingDrag";return h(Movediv,{key:s,id:s,ifCanOnlyHorizontalDrag:!0,barWidth:37,barHeight:30,ifrOffsetTop:0,ifrOffsetLeft:135,width:i,height:o,left:"undefined"===this.state.cobrowsingStopShowingLeft?(i-172)/2:this.state.cobrowsingStopShowingLeft,top:this.state.cobrowsingStopShowingTop,ifrWidth:172,ifrHeight:30,ifrLeftAndTopPositionChanged:function(t,n){e.setState({cobrowsingStopShowingLeft:t,cobrowsingStopShowingTop:n})}})},t.prototype.sideWindowOnAnimated=function(){this.setState({sideWindowAnimationEnd:!0})},t.prototype.updateSideWindowNoScroll=function(){this.setState({sideWindowAnimationEnd:!1})},t.prototype.bodyDisableScroll=function(){if(this.props.isMobile){var e=document$2.body.style,t=!this.props.isIPad;this.style=Object.keys(defaultStyles(t)).reduce(function(n,i){var o=n;return o[i]=e[i],e[i]=defaultStyles(t)[i],o},{}),this.props.isPoppedOut||document$2.addEventListener("touchmove",pauseEvent),this.setState({windowBaseChildrenDidMount:!0})}},t.prototype.bodyEnableScroll=function(){var e=this;this.props.isMobile&&(Object.keys(this.style||{}).forEach(function(t){document$2.body.style[t]=e.style[t]}),this.props.isPoppedOut||document$2.removeEventListener("touchmove",pauseEvent),this.setState({windowBaseChildrenDidMount:!1}))},t.prototype.render=function(){var e=this,t=this.props,n=t.windowStatus,i=t.isMobile,o=t.width,a=t.height,r=t.orientation,s=t.isIPad,d=t.title,c=t.isPoppedOut,l=t.languageTag,u=t.windowStyle,p=pc;i&&("landscape"===r&&(!s||o<760)?p=mobileHorizontal:"portrait"===r&&(!s||a<760)&&(p=mobileVertical)),this.setWinSize(p,s);var f=n===minimized,g=p!==pc&&!f,m=this.getWinStyle(p,s),b=f&&(this.state.minimized||!isAnimationSupported||isIE||u===bubble);u===bubble&&this.state.isBubbleRestoring&&this.bubbleIframeHeight&&(m=_extends({},m,{height:this.bubbleIframeHeight})),b&&(m=_extends({},m,{width:0,height:0}),m.left="",m.top=""),!b&&c&&"circle"===u&&(m.backgroundColor="#d5d5d5"),m.bottom+=getBottomOffset(this.props),m.right+=getRightOffset(this.props);var w=0,v=0;!i||s?(m&&m.right&&(w=m.right),m&&m.bottom&&(v=m.bottom),m.maxWidth="calc(100% - "+w+"px)",m.maxHeight="calc(100% - "+v+"px)"):(m.right=0,m.bottom=0);var y=this.getInnerCss(),C=void 0,_=i&&!s;g&&(C=modalStyle(_,c));var x=i&&!c&&!s&&!f&&"html{width:100%!important;position:static!important}body>*:not(#comm100-container):not(#comm100-cobrowse-border){display:none!important}body{text-indent:-9999px!important}#comm100-container,#comm100-container>div{position:static!important}",S=getLanguages(this.context);return h("div",{style:C,onTouchMove:!c&&pauseEvent},this.state.windowBaseChildrenDidMount&&x&&h(Style,{css:x}),this.getSideWin(p,s,f,l),this.getDragBar(p),h(Iframe,{key:"win"+(c?1:0),id:"chat_window_container",ref:function(t){e.container=t},onMounted:this.onMount,style:m,callback:this.updateIframe(p,s),noIframe:c,languageTag:l,tabIndex:b?-1:void 0,title:S.chatWindow},h(Style,{css:y}),!c&&h(FlashTitle,{message:d}),this.getChildren(p)),this.getCobrowsingStopShowingButton(),this.getCobrowsingStopShowingDragBar())},t}(Component),getIframeInnerHeight=function(e,t){if(!e)return 0;var n=e.querySelector("#main");if(!n)return 0;var i=n.getBoundingClientRect().height;if(t){i+=45}return i},BubbleWindow=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));i.state=_extends({},i.state,{innerHeight:0}),i.updateIframe=memoize(1)(function(e,t){return function(n,o){var a=i.props,r=a.windowStatus,s=a.sideWindow;if(r===open||r===restored){var d=e===pc&&t&&s;i.setState({innerHeight:getIframeInnerHeight(o,d)}),i.timer&&clearTimeout(i.timer),i.timer=setTimeout(function(){i.setState({innerHeight:getIframeInnerHeight(o,d)}),i.timer=null},460)}r===minimized&&i.setState({innerHeight:0})}});i.setWinSize=function(e){e===pc&&(i.winWidth=i.props.isPoppedOut?380:360,i.props.windowStatus!==minimized||i.state.minimized?i.winHeight=Math.max(Math.min(i.props.height,i.state.innerHeight),500):("100%"!==i.winHeight&&(i.bubbleIframeHeight=i.winHeight),i.winHeight="100%")),e===mobileHorizontal&&(i.props.width>500?i.winWidth=500:i.winWidth="100%",i.winHeight="100%"),e===mobileVertical&&(i.winWidth="100%",i.winHeight="100%")},i.getWinStyle=function(e,t){var n=0,o=0,a=void 0,r=void 0;return e===pc&&(n=i.props.bottom,o=i.props.right,a=i.state.left,r=i.state.top),{position:e===pc||t||i.props.isMinimized?"fixed":"absolute",border:0,zIndex:i.props.isPoppedOut?popupWindowContainer:button$2,top:r,left:a,bottom:n,right:o,width:i.winWidth,height:i.winHeight}},i.getSideWinStyle=function(e,t){var n=i.props,o=n.isPoppedOut,a=n.width;if(e===pc&&!t){var r=i.props.right+i.winWidth,s=o?480:505,d=Math.max(0,Math.min(a-r,s));return{zIndex:o?popupSideWindowContainer:sidewindow,width:s,height:o?555:580,bottom:i.props.bottom,right:r,background:"transparent",position:"fixed",border:0,maxWidth:d}}var c=i.props.showChatWindowInSidewindow,l=o&&t,u=l?"100%":i.winWidth,p=l?"100%":i.winHeight;return{zIndex:sidewindowMobile,width:u,height:c?45:p,right:0,bottom:i.props.bottom,background:"transparent",position:"fixed",border:0}};var o=i.shouldComponentUpdate;return i.shouldComponentUpdate=function(e,t){return!!o(e,t)||t.innerHeight!==i.state.innerHeight},i}return inherits(t,e),t}(Window$2),windowTop=32.5,blurRadius$1=25,blurYOffset$1=5,blurOnTop=7.5,halfAvatarHeight=25,CircleWindow=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.setWinSize=function(e){var t=i.props.iframeStyle,n=t&&t.width,o=t&&t.height,a=n;e===pc&&(i.winWidth=a,i.sideWindowWidth=n,i.winHeight=o),e===mobileHorizontal&&(i.props.width>500?i.winWidth=500:i.winWidth="100%",i.winHeight="100%"),e===mobileVertical&&(i.winWidth="100%",i.winHeight="100%")},i.getWinStyle=function(e,t){var n=i.props.isMinimized,o=button$2;return{position:e===pc||t||n?"fixed":"absolute",border:0,zIndex:o,top:i.state.top,left:i.state.left,bottom:i.props.bottom,right:i.props.right,width:i.winWidth,height:i.winHeight}},i.getSideWinStyle=function(e,t){var n=i.props.showChatWindowInSidewindow;if(e===pc){var o=i.props.showAvatar,a=i.winHeight;o&&(a-=halfAvatarHeight),t&&(n?a=45:(a-=25,o&&(a+=halfAvatarHeight+7.5)));var r=t?i.props.right+12.5:i.winWidth+i.props.right-25,s=Math.max(i.props.width-r,0);return{zIndex:t?sidewindowMobile:sidewindow,width:t?i.winWidth-25:505,height:a,bottom:i.props.bottom,right:r,background:"transparent",position:"fixed",border:0,maxWidth:s}}return{zIndex:sidewindowMobile,width:i.winWidth,height:n?45:i.winHeight,right:0,bottom:i.props.bottom,background:"transparent",position:"fixed",border:0}},i}return inherits(t,e),t}(Window$2),ClassicWindow=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.setWinSize=function(e){var t=i.props.iframeStyle,n=t&&t.width,o=t&&t.height,a=n;e===pc&&(i.winWidth=a,i.winHeight=o),e===mobileHorizontal&&(i.props.width>500?i.winWidth=500:i.winWidth="100%",i.winHeight="100%"),e===mobileVertical&&(i.winWidth="100%",i.winHeight="100%")},i.getWinStyle=function(e,t){var n=e!==pc||t?button$2:sidewindow;return{position:e===pc||t||i.props.isMinimized?"fixed":"absolute",border:0,zIndex:n,top:i.state.top,left:i.state.left,bottom:i.props.bottom,right:i.props.right,width:i.winWidth,height:i.winHeight}},i.getSideWinStyle=function(e,t){if(e===pc){var n=i.winHeight;t&&(n=i.props.showChatWindowInSidewindow?45:i.winHeight-25);var o=t?i.props.right+12.5:i.winWidth+i.props.right-25,a=Math.max(0,i.props.width-o);return{zIndex:e===pc&&!t?sidewindow:sidewindowMobile,width:t?i.winWidth-25:505,height:n,bottom:i.props.bottom,right:o,background:"transparent",position:"fixed",border:0,maxWidth:a}}return{zIndex:sidewindowMobile,width:i.winWidth,height:i.props.showChatWindowInSidewindow?45:i.winHeight,right:0,bottom:i.props.bottom,background:"transparent",position:"fixed",border:0}},i}return inherits(t,e),t}(Window$2),PopupWindow=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.setWinSize=function(e,t){i.winHeight="100%";var n=i.props,o="100%",a="100%";if(n.sideWindow&&e===pc&&!t){var r=n.width;r>860?(o=r-480,a=480):(o="44.2%",a="55.8%")}i.winWidth=o,i.sideWinWidth=a,i.sideWinHeight=n.showChatWindowInSidewindow?45:i.winHeight},i.getSideWinStyle=function(e,t){var n=i.props.width-i.winWidth;return e!==pc||t||(n=Math.min(n,500)),{background:"transparent",position:"fixed",border:0,zIndex:e!==pc||t?popupMobileSideWindowContainer:popupSideWindowContainer,width:i.sideWinWidth,height:i.sideWinHeight,bottom:0,left:0,maxWidth:n}},i.getWinStyle=function(){return{position:"absolute",border:0,zIndex:popupWindowContainer,width:i.winWidth,height:i.winHeight,right:0,bottom:0}},i}return inherits(t,e),t}(Window$2),getElement=function(e,t){return e&&t!==bubble?PopupWindow:t===bubble?BubbleWindow:"circle"===t?CircleWindow:ClassicWindow},Window=function(e){var t=e.windowStyle,n=e.isPoppedOut;return h(getElement(n,t),e)},Window$1=heartbeat(language(Window)),ARROW_UP=38,ARROW_DOWN=40,HOME=36,END=35,Menu=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={focusKey:getKey(n.icons[0])},i.onFocus=i.onFocus.bind(i),i.onKeyDown=i.onKeyDown.bind(i),i.onDialogToggle=i.onDialogToggle.bind(i),i.hasModal=!1,i}return inherits(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.show||!e.show||this.hasModal?this.props.show&&!e.show&&this.setState({focusKey:void 0}):this.setState({focusKey:getKey(e.icons[0])})},t.prototype.onDialogToggle=function(e){e?this.setState({focusKey:void 0}):this.props.hideMenu(),this.hasModal=e},t.prototype.onFocus=function(e){this.hasModal||this.setState({focusKey:e})},t.prototype.onKeyDown=function(e){if(this.hasModal)return void e.stopPropagation();var t=this.props.icons.map(getKey),n=t.indexOf(this.state.focusKey);if(!(n<0)){var i=e.keyCode,o=n,a=!1;switch(i){case 40:a=!0,o=Math.min(n+1,t.length-1);break;case 38:a=!0,o=Math.max(n-1,0);break;case 36:a=!0,o=0;break;case 35:a=!0,o=t.length-1}a&&(e.preventDefault(),e.stopPropagation()),this.setState({focusKey:t[o]})}},t.prototype.render=function(){var e=this,t=this.props;return h("div",{className:index$4("window__operation-menu",t.show&&"window__menu-show"),onMouseLeave:t.hideMenu,onKeyDown:this.onKeyDown},h("ul",{role:"menu","aria-haspopup":!0,"aria-expanded":t.show.toString()},t.icons.map(function(t){var n=getKey(t),i=n===e.state.focusKey;return h("li",{key:n},h(t,{onDialogToggle:e.onDialogToggle,onFocus:e.onFocus,focusKey:n,focus:i}))})))},t}(Component),PopupBubble=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n)) ;return i.updateBodyCss=i.updateBodyCss.bind(i),i.focusOnClose=i.focusOnClose.bind(i),i.focusOnLastButton=i.focusOnLastButton.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this;this.updateBodyCss(),this.props.ifShow&&setTimeout(function(){return e.btn.focus()},100)},t.prototype.componentDidUpdate=function(e){var t=this;e.ifShow!==this.props.ifShow&&this.updateBodyCss(),!e.ifShow&&this.props.ifShow&&setTimeout(function(){return t.btn.focus()},100)},t.prototype.componentWillUnmount=function(){var e=this.props.globalClass,t=this.element.ownerDocument,n=new RegExp("\\b"+e+"\\b","g");n.test(t.body.className)&&(t.body.className=t.body.className.replace(n,"").trim())},t.prototype.focusOnClose=function(){this.btn.focus()},t.prototype.focusOnLastButton=function(){var e=this.element.querySelectorAll("button");e[e.length-1].focus()},t.prototype.updateBodyCss=function(){var e=this.props.ifShow,t=this.element.ownerDocument,n=this.props.globalClass,i=new RegExp("\\b"+n+"\\b"),o=i.test(t.body.className);e&&!o?t.body.className+=" "+n:!e&&o&&(t.body.className=t.body.className.replace(i,"").trim())},t.prototype.render=function(){var e=this,t=this.props,n=t.id,i=t.className,o=t.children,a=t.ifShow,r=t.onClose,s=t.title,d=getLanguages(this.context);return h("div",{id:n&&"bubble_box_"+n,ref:function(t){e.element=t},className:index$4("bubble-box",a&&"bubble-box--show",i),onClick:r},a&&[h("div",{tabIndex:0,onFocus:this.focusOnLastButton}),h("div",{id:n,className:"bubble",onClick:function(e){e.stopPropagation()},role:"dialog","aria-modal":"true"},h("button",{className:"bubble-close",onClick:r,"aria-label":d.closeDialog,ref:function(t){e.btn=t}},h(IconSVG,{type:"close"})),s&&h("div",{className:"bubble--title"},s),o),h("div",{tabIndex:0,onFocus:this.focusOnClose})])},t}(Component),EndChat=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={ifShowDialog:!1},i.show=i.toggle.bind(i,!0),i.hide=i.toggle.bind(i,!1),i}return inherits(t,e),t.prototype.toggle=function(e,t){t.stopPropagation(),this.setState({ifShowDialog:e})},t.prototype.render=function(){var e=this,t=this.props,n=t.languages;return h("a",{role:"button",tabIndex:0,onClick:this.show,ref:function(t){e.btn=t},onKeyDown:this.onKeyDown,title:n.buttonEndChat,"aria-label":n.buttonEndChat},h(IconSVG,{type:"close",className:"icon-endchat"}),h(PopupBubble,{globalClass:"body__dialog",ifShow:this.state.ifShowDialog,onClose:this.hide,className:t.windowStatus===minimized&&"bubble-box--minimize"},h("div",{className:"bubble--desc"},n.promptStopChat),h("div",{className:"embedded-end-chatConfirmAction bubble__operation"},h("button",{id:"embedded-end-chatConfirmLeave",className:"btn btn-primary",onClick:function(n){e.hide(n),t.onEndChat()}},n.buttonYes),h("button",{id:"embedded-end-chatConfirmCancel",className:"btn btn-grey",onClick:this.hide},n.buttonNo))))},t}(Component);EndChat.displayName="EndChat";var HeaderIcon$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={showEndChatConfirm:!1,showMenu:!1},i.onClickShowEndChatConfirm=i.onClickShowEndChatConfirm.bind(i),i.updateEndChatConfirmStatus=i.updateEndChatConfirmStatus.bind(i),i.showMenu=i.setMenuStatus.bind(i,!0),i.hideMenu=i.setMenuStatus.bind(i,!1),i.toggleMenuStatus=i.toggleMenuStatus.bind(i),i.onKeyDown=onKeyDownWrapper(i.toggleMenuStatus),i}return inherits(t,e),t.prototype.componentDidMount=function(){this.container&&this.container.ownerDocument.body.addEventListener("touchend",this.hideMenu,!1)},t.prototype.componentWillUnmount=function(){this.container&&this.container.ownerDocument.body.removeEventListener("touchend",this.hideMenu,!1)},t.prototype.onClickShowEndChatConfirm=function(e){this.props.ifViewConfirmBubble?this.state.showEndChatConfirm||(e.stopPropagation(),e.preventDefault(),this.updateEndChatConfirmStatus(!0)):this.props.onEndChat(this.props.passEventArgs)},t.prototype.setMenuStatus=function(e){this.setState({showMenu:e})},t.prototype.updateEndChatConfirmStatus=function(e){this.setState({showEndChatConfirm:e})},t.prototype.toggleMenuStatus=function(e){e&&e.stopPropagation(),this.setState({showMenu:!this.state.showMenu})},t.prototype.render=function(){var e=this,t=this.props,n=t.icons.length>0,i=t.languages.embeddedWindowMinimize,o=h("button",{title:t.languages.buttonClose,"aria-label":t.languages.buttonClose,onClick:function(){return t.onClose(t.tab)}},h(IconSVG,{type:"close",className:"icon-close"})),a=getLanguages(this.context);return h("div",{className:"title-buttons window__operation",ref:function(t){t&&(e.container=t)}},n&&h("a",{role:"menubar",className:"window__operation-menu-icon",onKeyDown:this.onKeyDown,onMouseEnter:!t.isMobile&&this.showMenu,onMouseLeave:!t.isMobile&&this.hideMenu,onClick:this.toggleMenuStatus,"aria-label":a.menu,tabIndex:0},h(IconSVG,{type:"menu"}),h(Menu,{icons:t.icons,show:this.state.showMenu,hideMenu:this.hideMenu})),t.hasMinimize&&h("button",{title:i,"aria-label":i,onClick:function(){return t.onMinimize(t.tab)}},h(IconSVG,{type:"minimize",className:"icon-minimize"})),t.hasEndChat?h(EndChat,{languages:t.languages,onEndChat:t.onEndChat,windowStatus:t.windowStatus}):o)},t}(Component),defaultAvatar="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAIAAAC2BqGFAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NTk1OENGMTMxRUZFMTFFNTlBMDdBNjRGRTU4NjdDNTAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTk1OENGMTQxRUZFMTFFNTlBMDdBNjRGRTU4NjdDNTAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo1OTU4Q0YxMTFFRkUxMUU1OUEwN0E2NEZFNTg2N0M1MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo1OTU4Q0YxMjFFRkUxMUU1OUEwN0E2NEZFNTg2N0M1MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PscdlE0AAAduSURBVHja7J3tUxJbHMeXheV5EQUBwUdEqGayrKhpanrf/9ubunlfVLc718xeiRL4rIgPmKRpINL9CjN25w6Q4J4nOt8XTdNMZ5fP/s7v9/3tnj1revHihSJFXqpEIEFL0FIStAQtQUtJ0BK0lAQtQUvQUhK0BC0lQUvQErSUBC1BS0nQErQELUVeFt4DQVW9Nbndbl3X7Xa7paZqtVqpVMrl8nFNX79+PTg4KJVKEnR7MplMgUAgEon09/cDa8MLYK0JF+DyH4vFYj6f39raOj09laB/dUIWy2hNNput3f/bU1M8Ht/Z2clkMghzCbpxFI+MjMRisQ4Q/2+cUE25XC6dTp+cnEjQP+XxeCYnJxGPBo4ZDoeDwSBYr66u/vjxQ4JWotFoIpFA2jV8ZLPZfOvWLUT33Nwc21LJ2N4B7t27d2/evEmC8qX6+vqePn1q7HQRCTTq3qNHj2AtKBwLvvDx48fwML8daFBOJpOINWpHRBp58OABK9Yqq4yB30yT8uVx79+/j/bndwGNAuXz+Zgcuh7XyCTdD3poaAh+mWFtgE8Ha6Lllz1op9OJcGZuKOFA0Bl1M+g7d+40vHdBXwBN0/BRBT04OEi/ALbo1GnOLXqgUYXQ/ik8CVcdTWO3gR4eHqZf63+pRDyO0O4e0PgxY2NjCn9y6zqdbEYJNGaow+FQuFSUSgRQAg3vrPCqQDBot9m7AbSmaX6/X+FYoYFQN4BG3qBTcDpWJBI5Pz8XHjTn4Qx5vV6VcCjQAM1Pk9KKdW+v2KCdTieH9rnBtPP5iD5XJA7a4/EoIqi3r69yVhEYtMvlEgI0AuKsciYwaG77lAbnKXTqsFqtiiAiev+WOGiz2SwKaFVVydVDVegwMfhUNU1g0AIJPYvAoKvVqiigiXbhqtBnb6zOzkS2d+VyWRTQ379/Fxg0h4vvG6pUKmHykbvLSBz0t2/fhABdfz1AYNBcvd/QQoeHh6pJFTuiK5UK/6ALhYJqJkiDOGg404ODA/5B7+TzRJtYlU6wcE4Z0+7o6Ejsex1QPp/nHPTm5ib+NIsO+uTk5MuXLzyDXl1dVVVV+NQBbWxs8Ow39nZ3NcK3cymB3t7e5rZFzGQyCvn75pRAw+GtrKzw2XZnMxkkDdK3c+ndJl1bWyN616YzpVIpdN7XfCmaL9CgnF5c5Iry8fExTgkNobWbQEPrGxtcdeQfZ2cvwtlhp7BijSpodImfPn1i/v77paWDF4Kro5A3FPqPstCApebneWgFP8zMKBcLqVxdteL/UvhVS8vLcHsMKVer1bdv3pRKJVg6zarROSiDh7PwUogmtAmsQP/9/v3+/j6ShpPiKio2T8HhWt+9fYuiz6AAfvwIR4+J5XK7aa7aZrfcwGT6c3qaMuvZ2dmFVOoiNbtclBecqOw4m0yq+urly8L+PoXDwcb99e7d4sIC/u5wOukvVGO5gAZZUrNap6ens9ksaY/xx6tX9XsArNZrM16vVa9Isx8+wIckk0kSCMAXtbdcLmMK4VisFl2aePieIVqY09qmaVNTU+OxmFE1qlgsIilv53L1K4rqx3AhIBcrEOuxhqCb+Wcmk80+f/78+mPOzc2h7tW7UEQxxmf7ZhhHSz0v2gdNM+oxR/HwEJQxGkofhmX+6/haU4ugM2oLILeuO3h6T4m7Zbu6rhsyjtfrNascrYHnDrRRW3j5/f5q9VyCbpo6jHr78yKizTKim4ehUQ4M12wgHJagG2t0dNTA0cajUU4eMvAFOhgMBgIBAwf0+f0RboKaC3vncrni8fjAwIDhI0/duxfa3k6n08yXaTMGbbPZJiYmhoeHybVtuH6YK+vr65lMhuEiHmag0a2Nj48jKVPwBqqq4kCDg4NLS0srKytM3l9iABpk8bNBmXJnDD+TSCRwaGSSzc1NynWSKmjkh6GhIaRjOk/4myWrycnJaDS6sLCwu7vbhaDD4TAQc7KrhNvtTiaThUJhcXGRzmNiGqD7+/tv3LjB4Q4pPp/vyZMnuVzu8+fPpG0JWdDog4GY1Z7cV59qoVCItC0hBVrXdVQe+CpFBFGwJcaDdjgcyMWRSITzve6a2ZKRkRFkEsNtiZGgrVZrLBbDiVLe1d1Y2e12ErbEYlQs4MzGxsYE2gaFsi25LhcEb/1LYgLtncTElnQOGikYiRjpWJR9wK5pS9bW1rLZbMe2pEPQODDqxn8/2tjdwsRFYoQtWV5e7syWWDqYTbDGTD7Ow1yapnVsS9oAjdYOiBl+14srW4IAhy3Z29szEjSy8MTEBCaOcNaYnNCRPXz4EKBTqdRVFh9bfjlZ6r5NoH0CaQrz+9mzZ2jfkUxa10lL64p3+/btrvRtBqr+qVw4k/n5+a2trabltMUQ+P+S8tXrZOsvramtuyNJ8Opy1RbEtg0azbQQO5nzI8z+Fh8KUFtUVcmu7TskLnfboGXe6MTz9Xia7cUqI9pI9Xg8zbpzGdFGytPTU20XtChfm+BKvb29501SR9OG5fXr18dHRxzuGcO/oW7bRwu09TM/Oq80hvavAAMAcWJ5ooQVnC0AAAAASUVORK5CYII=",AvatarImage=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={src:defaultAvatar},i.download=i.download.bind(i),i.download(n.src),i}return inherits(t,e),t.prototype.componentWillReceiveProps=function(e){e.src!==this.props.src&&(this.setState({src:defaultAvatar}),this.download(e.src))},t.prototype.shouldComponentUpdate=function(e,t){return t.src!==this.state.src},t.prototype.download=function(e){var t=this,n=new Image,i=function(){t.setState({src:e})};n.onload=i,n.onerror=i,n.src=e},t.prototype.render=function(){var e=this.props;return h("img",_extends({},e,{alt:e.alt,src:this.state.src}))},t}(Component),HeaderIcon=renderWindow("header.icons")(HeaderIcon$1),getGradientColor$1=memoize(1)(getGradientColor),Header$1=function(e){function t(){classCallCheck(this,t);var n=possibleConstructorReturn(this,e.call(this));return n.state={showEndChatConfirm:!1,headerHeight:0},n.header=null,n.shuoldUpdateHeaderHeight=!1,n.shouldComponentUpdate=shouldComponentUpdateGen(n,["passEventArgs","ifViewConfirmBubble","ifHideBio","ifViewHeaderBox","ifViewHeader","color","onMinimize","team","avatars","banner","avatar","name","title","bio","logo","tab","controls","languages","agent","windowDisabled","icons"],["showEndChatConfirm","headerHeight"]),n.onMinimize=n.onMinimize.bind(n),n.onClose=n.onClose.bind(n),n.showAnimation=!0,n}return inherits(t,e),t.prototype.componentWillReceiveProps=function(e){e.tab===chat&&this.props.tab!==chat&&(this.showAnimation=!0);var t=e.agent&&e.agent.bio,n=this.props.agent&&this.props.agent.bio;(e.ifHideBio!==this.props.ifHideBio||this.props.windowDisabled&&t!==n||this.agent&&this.props.agent.avatar!==e.agent.avatar||this.agent&&this.props.agent.title!==e.agent.title)&&(this.shuoldUpdateHeaderHeight=!0)},t.prototype.componentDidUpdate=function(){var e=this;isIE9||this.header&&this.shuoldUpdateHeaderHeight&&!this.props.isMobile&&(this.shuoldUpdateHeaderHeight=!1,this.props.agent&&this.props.agent.bio?this.props.ifHideBio?this.header.style.height="":this.props.windowDisabled?setTimeout(function(){e.header.style.height=""},400):this.header.style.height=this.header.scrollHeight+"px":(this.props.windowDisabled&&this.props.agent||!this.props.agent)&&(this.header.style.height=""))},t.prototype.onMinimize=function(){this.props.onMinimize(this.props.tab)},t.prototype.onClose=function(){return this.props.onClose(this.props.tab)},t.prototype.updateEndChatConfirmStatus=function(e){this.setState({showEndChatConfirm:e})},t.prototype.render=function(){var e=this,t=this.props,n=this.props.agent,i=this.showAnimation,o=t.chatWindowStyle===classic,a=getGradientColor$1(t.mainColor),r=t.avatars,s=!(t.team||r||t.banner||n||t.logo),d=getLanguages(this.context);return h("div",{className:"window__headerContainer",onTouchMove:pauseEvent},t.ifViewHeader&&h("div",{id:"branding",className:index$4("window__header","window__header--noBio",i&&"window__header--fadeInDown",n&&n.avatar&&"window__header--hasAvatar"),style:{background:o?a:"none"},ref:function(t){t&&(e.header=t)}},t.ifViewHeaderBox&&h("div",null,h("div",{className:index$4("window__headerBox","clearfix",t.team&&"window__headerBox--team",r&&"window__headerBox--hasAvatars",t.banner&&"window__headerBox--banner",s&&"window__headerBox--empty")},t.team&&h("div",{className:index$4("header__teamName",!r&&"header__teamNameNoAvatar")},t.team),r&&h("div",{className:index$4("header__teamAvatar",t.isAvatarGray&&"header__teamAvatar--gray",t.ifShowSideWindow&&"header__teamAvatar--withSideWindow")},r.map(function(e){return h(AvatarImage,{className:"header__teamAvatarImg",src:e,width:"50",height:"50",alt:d.avatar})})),t.banner&&h("img",{className:"header__bannerImg",src:t.banner,alt:d.banner}),n&&h("div",{className:index$4("header__agent",t.logo?"header__agent--withlogo":"",n.bio&&t.ifHideBio&&!t.isMobile?"header__agent--compact":"",n.title&&"with__title",i&&"header__agent--fadeInUp"),onClick:function(){t.ifHideBio&&e.props.onUpdateScrollStatus(!1)},onTouchEnd:function(){t.ifHideBio&&e.props.onUpdateScrollStatus(!1)}},n.avatar&&h("div",{id:"header-operator-avatar",className:index$4("header__avatar",this.props.ifShowSideWindow&&"header__avatar--withSideWindow",i&&"header__avatar--fadeInDown"),key:"avatar"},h(AvatarImage,{className:"header__avatarImage",src:n.avatar,alt:d.avatar,width:"50",height:"50"})),h("div",{className:index$4("header__agentInfo",!n.avatar&&"header__agentInfoNoAvatar")},n.name&&h("div",{className:"direction-ltr header__agentName"},n.name),n.title&&h("div",{className:"direction-ltr header__agentTitle"},n.title)),n.bio&&h("div",{className:"header__agentBio",style:{height:t.ifHideBio?"0":"auto",marginTop:t.ifHideBio?0:"4px",marginBottom:t.ifHideBio?0:"1px",paddingLeft:n.avatar&&t.chatWindowStyle===classic?"62px":0,paddingBottom:t.ifHideBio?0:"2px",overflow:"hidden"},dangerouslySetInnerHTML:{__html:n.bio}})),t.logo&&h("div",{className:"header__logo "+(n&&(n.avatar||n.name)?"header__logo--up":""),key:"logo"},h("img",{id:"logo-image",className:"header__logoImg",src:t.logo,alt:d.logo}))))),h("div",{className:"end-chat-top window__title"},h("span",{id:"embedded-window-title",className:"title-text embedded-only"}),h(HeaderIcon,{tab:t.tab,hasMinimize:t.hasMinimize,hasEndChat:t.hasEndChat,icons:t.icons,languages:t.languages,passEventArgs:t.passEventArgs,ifViewConfirmBubble:t.ifViewConfirmBubble,ifViewHeader:t.ifViewHeader,onMinimize:this.onMinimize,onPopIn:t.onPopIn,onClose:t.onClose,onEndChat:t.onEndChat,isMobile:t.isMobile,windowStatus:t.windowStatus})))},t}(Component),Header$2=renderWindow("header","window__headerVessel")(Header$1),error$3="error",warning$5="warning",AlertDialog=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.onFocus=i.onFocus.bind(i),i.componentDidMount=i.onFocus,i}return inherits(t,e),t.prototype.onFocus=function(){this.btn.focus()},t.prototype.render=function(){var e=this,t=this.props,n="error"===t.type,i="warning"===t.type,o=getLanguages(this.context);return h("div",{className:"chatError__container"},h("div",{className:index$4("window_chatError",n&&"window_chatError--urgency",i&&"window_chatError--mitigate"),role:"alertdialog"},t.message,h("div",{tabIndex:0,onFocus:this.onFocus}),h("button",{className:"window_chatErrorClose",onClick:t.onClose,ref:function(t){e.btn=t},"aria-label":o.closeAlert},h(IconSVG,{type:"close",className:"icon-close"})),h("div",{tabIndex:0,onFocus:this.onFocus})))},t}(Component),Checkbox$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.shouldCOmponentUpdate=shouldComponentUpdateGen(i,["input.value","isDisabled"]),i}return inherits(t,e),t.prototype.componentDidMount=function(){this.props.focused&&this.element&&this.element.focus()},t.prototype.componentDidUpdate=function(e){e.focused!==this.props.focused&&this.props.focused&&this.element&&this.element.focus()},t.prototype.render=function(){var e=this,t=this.props,n=!(!t.input.value&&!t.initialValue),i=t.uniqKey||t.id,o=t.isDisabled?"":"checkbox-"+i;return h("label",{className:index$4("container-checkbox",t.isDisabled&&"disable",t.className),htmlFor:o},h("span",{className:"checkbox__text",id:"checkbox-label-"+i},t.text||t.children),h("input",{id:o,type:"Checkbox",className:"checkbox",disabled:t.isDisabled,checked:n,onFocus:t.input.onFocus,onBlur:t.input.onBlur,onClick:t.isDisabled?void 0:function(){t.input.onChange(!n,t.text,t.id)},ref:function(t){e.element=t},"aria-labelledby":index$4(t["aria-labelledby"],"checkbox-label-"+i)}),h("i",{className:n?"selected":"unselected"},h(IconSVG,{type:"checkbox"})))},t}(Component),id$1=!1,base=!1,email$3=!1,comment$1=!1,subject$1=!1,content$1=!1,ticket$1=!1,text$5=!1,textarea$1=!1,checkbox$2=!1,captcha$1=!1,multiOptionsBase=!1,department$1=!1,rating$3=!1,select$1=!1,checkboxList$1=!1,radio$1=!1,custom$1=!1,file$1=!1,nps$1=!1,systemFields=[name,email,"phone","company","product","department","rating",comment,"subject","content","attachment","captcha"],isFieldSystem=function(e){return systemFields.indexOf(e)>=0},field=function(e){return validation(function(t){function n(e){classCallCheck(this,n);var i=possibleConstructorReturn(this,t.call(this,e));return i.params={onChange:i.onChange.bind(i),onBlur:i.onBlur.bind(i),onFocus:i.onFocus.bind(i),siteId:e.siteId,style:e.style,disabled:e.disabled,languages:e.languages,forceLabel:e.forceLabel,captchaSettings:e.captchaSettings,languageTag:e.languageTag,isHorizontal:e.isHorizontal},i.shouldComponentUpdate=shouldComponentUpdateGen(i,["field","disabled"]),i}return inherits(n,t),n.prototype.componentWillReceiveProps=function(e){var t=this.params;t.disabled===e.disabled&&t.languages===e.languages||(this.params.disabled=e.disabled,this.params.languages=e.languages)},n.prototype.onChange=function(e){this.props.onChange(this.props.field,e)},n.prototype.onBlur=function(){this.props.onBlur(this.props.field)},n.prototype.onFocus=function(){this.props.onFocus(this.props.field)},n.prototype.render=function(){var t=this.props.field,n=t.label,i=t.error,o=t.isErrorShowed,a=t.isHidden,r=t.isRequired,s=t.id,d=isFieldSystem(t.type);if(a)return null;var c="checkbox"===t.type,l=c;return h("div",{className:index$4("box-field",d&&"system-field")},h("div",{className:index$4("field-name clearfix",c&&"checkbox-label")},r&&!l&&h(IconSVG,{type:"asterisk",className:"field__requiredTag"}),l?"":h("span",{className:"field__label",id:"field-"+s},n),o&&i&&-1!==s&&h("span",{className:index$4("field__requiredMsg"),role:"alert",tabIndex:-1},i)),e(t,this.params))},n}(Component))},core=function(e,t){var n=t.onChange,i=t.onBlur,o=t.onFocus,a=t.disabled,r=e.value;if(Array.isArray(r)){var s=r.indexOf(e.label);r=s>=0?"true":"false",n(s>=0?"true":"false")}else r||(r="false",n("false"));return h(Checkbox$1,{input:{value:r&&"true"===r.toString(),onChange:function(e){n(e?"true":"false")},onFocus:o,onBlur:i},text:e.label,id:e.id,focused:e.isFocused,isDisabled:a})},CheckboxField=field(core),Checkbox=validation(CheckboxField),noop$5=function(){},CheckboxList$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));i.Change=i.Change.bind(i),i.shouldComponentUpdate=shouldComponentUpdateGen(i,["input.value","options"]);var o=i.validate.bind(i);return i.componentDidMount=o,i.componentDidUpdate=o,i.onFocus=i.onFocus.bind(i),i.onBlur=i.onBlur.bind(i),i.hasFocus=!1,i}return inherits(t,e),t.prototype.onBlur=function(){var e=this.props.input.onBlur;this.hasFocus=!1,e&&e()},t.prototype.onFocus=function(){var e=this.props.input.onFocus;this.hasFocus=!0,e&&e()},t.prototype.validate=function(){var e=this,t=this.props.input.value;0!==t.length&&t.every(function(t){return e.props.options.every(function(e){return e.id.toString()!==t.toString()})})&&this.props.input.onChange([])},t.prototype.Change=function(e,t,n){var i=this.props.input.value,o=this.props.input.onChange||noop$5;o(-1===i.indexOf(n)?i.concat(n):i.filter(function(e){return e!==n}))},t.prototype.render=function(){var e=this,t=this.props,n=t.className,i=t.options,o=(t.align,t.focused),a=objectWithoutProperties(t,["className","options","align","focused"]);return h("div",{className:index$4("container-checkboxlist",n)},i.map(function(t,n){return h("div",{key:t.id,className:"vertical"},h(Checkbox$1,_extends({},a,{focused:!e.hasFocus&&0===n&&o,id:t.id.toString(),uniqKey:e.props.input.id+"-"+n,text:t.text,input:{value:-1!==e.props.input.value.indexOf(t.id.toString()),onChange:e.Change,onBlur:e.onBlur,onFocus:e.onFocus}})))}))},t}(Component),core$1=function(e,t){var n=t.onChange,i=t.onBlur,o=t.onFocus,a=t.disabled,r=e.value,s=e.options;return s||(s=[]),Array.isArray(r)||(r?(r=s.find(function(e){return e.value===r})?[r]:[],n(r)):r=[]),h(CheckboxList$1,{input:{id:e.id,value:r,onChange:n,onFocus:o,onBlur:i},options:s.map(function(e){return{id:e.value,text:e.label}}),focused:e.isFocused,isDisabled:a,"aria-labelledby":"field-"+e.id})},CheckboxListField=field(core$1),CheckboxList=validation(CheckboxListField),CustomField=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.onChange=i.onChange.bind(i),i.onError=i.onError.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){this.element=this.props.field.element(this.onChange,this.onError),this.element&&this.container.appendChild(this.element)},t.prototype.componentWillUnmount=function(){this.container.removeChild(this.element)},t.prototype.onChange=function(e){this.props.onChange(this.props.field,e)},t.prototype.onError=function(e){this.props.onError(this.props.field,e)},t.prototype.render=function(){var e=this;return h("div",{ref:function(t){e.container=t}})},t}(Component),CustomField$1=validation(CustomField),getInputElement=function(e,t){var n=(e.isRequired,e.input),i=e.isReadOnly,o=e.isDisabled,a=e.className,r=e.meta,s=e.type,d=e.placeholder,c=e.autoComplete,l=e.maxLength,u=e.animationEffect,p=e.style,f=objectWithoutProperties(e,["isRequired","input","isReadOnly","isDisabled","className","meta","type","placeholder","autoComplete","maxLength","animationEffect","style"]);return h("input",_extends({},n,{readOnly:i,disabled:o,className:index$4("input","form__input",u&&"input--effect01",a,r&&r.touched&&r.invalid&&"error"),type:s,placeholder:d,"aria-label":d,autoComplete:c?"on":"off",maxLength:l,style:p,ref:t},f))},Input=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.refCallback=i.refCallback.bind(i),i.shouldComponentUpdate=shouldComponentUpdateGen(i,["input.value","meta.invalid","meta.touched","focused","isRequired","isDisabled","style"]),i.focus=i.focus.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){this.props.focused&&this.focus()},t.prototype.componentDidUpdate=function(e){this.props.focused!==e.focused&&this.props.focused&&this.focus()},t.prototype.focus=function(){var e=this.element;e&&e.focus()},t.prototype.refCallback=function(e){this.element=e},t.prototype.render=function(){var e=this.props;return e.animationEffect?h("div",{className:"form__inputContainer"},getInputElement(e,this.refCallback),h("span",{className:"input__focusBorder"},h("i",null)),h("span",{className:"input__cornerLeft"}),h("span",{className:"input__cornerRight"})):getInputElement(e,this.refCallback)},t}(Component),core$2=function(e,t){var n=t.onChange,i=t.onBlur,o=t.onFocus,a=t.style,r=t.disabled,s=e.value;return Array.isArray(s)&&(s=s.join(","),n(s)),h("div",{className:"field-control"},h(Input,{maxLength:64,type:"email",input:{value:e.value,onBlur:function(e){var t=e.target.value;t!==s&&n(t),i()},onFocus:o,disabled:r,onKeyDown:function(e){13===e.keyCode&&n(e.target.value)}},meta:{invalid:!!e.error,touched:e.isErrorShowed},isRequired:e.isRequired,isDisabled:r,animationEffect:classic===a,focused:e.isFocused,"aria-labelledby":"field-"+e.id}))},EmailField=field(core$2),EmailField$1=validation(EmailField),RadioButton=function(e){function t(){classCallCheck(this,t);var n=possibleConstructorReturn(this,e.call(this));return n.shouldComponentUpdate=shouldComponentUpdateGen(n,["radioOption","selectedVal"]),n}return inherits(t,e),t.prototype.componentDidMount=function(){this.props.focused&&this.first&&this.first.focus()},t.prototype.componentDidUpdate=function(e){e.focused!==this.props.focused&&this.props.focused&&!this.props.selectedVal&&this.first&&this.first.focus()},t.prototype.render=function(){var e=this;return h("div",{className:"clearfix container-radiolist"},this.props.radioOption.map(function(t,n){var i=e.props.disabled,o=i?"":"radio-"+e.props.id+"-"+n,a=i?"":"radio-"+e.props.id+"-"+e.props.label,r=i?"":"radio-label-"+e.props.id+"-"+n,s=i?"":o;return h("label",{key:t.id,className:index$4("control","controlRadio",e.props.className),htmlFor:s,id:r},h("input",{type:"radio",name:a,value:t.value,checked:e.props.selectedVal===t.value||t.checked,onChange:e.props.handleChange,onBlur:e.props.onBlur,onFocus:e.props.onFocus,id:o,disabled:e.props.disabled,ref:function(t){0===n&&(e.first=t)},"aria-labelledby":index$4(e.props["aria-labelledby"],r)}),h("span",{className:"radioText"},t.text),h("div",{className:"controlIndicator"}),t.component?t.component:"")}))},t}(Component),core$3=function(e,t){var n=t.onChange,i=t.onBlur,o=t.onFocus,a=t.disabled,r=e.value,s=e.options;return s||(s=[]),Array.isArray(r)&&(r=r.find(function(e){return s.some(function(t){return t.value===e})})||null,n(r)),h(RadioButton,{label:e.label,id:e.id,radioOption:s.map(function(t,n){return{id:n,text:t.label,value:t.value,checked:t.value===e.value}}),selectedVal:e.value,handleChange:function(e){var t=e.target.value;t!==r&&n(t)},onBlur:i,onFocus:o,focused:e.isFocused,disabled:a,"aria-labelledby":"field-"+e.id})},RadioList=field(core$3),RadioList$1=validation(RadioList),stopPropagation$1=function(e){e.stopPropagation()},TextArea$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.shouldComponentUpdate=shouldComponentUpdateGen(i,["input.value","meta.touched","meta.invalid","focused","isDisabled"]),i}return inherits(t,e),t.prototype.componentDidMount=function(){this.props.focused&&this.element&&this.element.focus()},t.prototype.componentDidUpdate=function(e){e.focused!==this.props.focused&&this.props.focused&&this.element&&this.element.focus()},t.prototype.render=function(){var e=this,t=this.props,n=t.input,i=t.rows,o=t.cols,a=t.style,r=t.isDisabled,s=t.placeholder,d=t.maxLength,c=t.className,l=t.meta,u=objectWithoutProperties(t,["input","rows","cols","style","isDisabled","placeholder","maxLength","className","meta"]);return h("textarea",_extends({onKeyDown:stopPropagation$1},n,{cols:o,rows:i,style:a,disabled:!!r&&"disabled",className:index$4(c,"multipleText",l.touched&&l.invalid&&"error"),placeholder:s,"aria-label":s,maxLength:d,ref:function(t){e.element=t}},u))},t}(Component),core$4=function(e,t){var n=t.onChange,i=t.onBlur,o=t.onFocus,a=t.disabled,r=e.value;return Array.isArray(r)&&(r=r.join(","),n(r)),h("div",{className:"field-control"},h(TextArea$1,{input:{value:e.value,onBlur:function(e){var t=e.target.value;r!==t&&n(t),i()},onFocus:o,"aria-labelledby":"field-"+e.id,onTouchMove:e.ontouchmove},rows:2,meta:{touched:e.isErrorShowed,invalid:!!e.error},maxLength:2048,focused:e.isFocused,isDisabled:a}))},TextAreaField=field(core$4),TextArea=validation(TextAreaField),text$6=function(e){return validation(field(function(t,n){var i=n.onChange,o=n.onBlur,a=n.onFocus,r=n.style,s=n.disabled,d=t.value;return Array.isArray(t.value)&&(d=d.join(","),i(d)),h("div",{className:"field-control"},h(Input,{maxLength:e,type:"text",input:{value:t.value,onBlur:function(e){var t=e.target.value;t!==d&&i(t),o()},onFocus:a,onKeyDown:function(e){13===e.keyCode&&i(e.target.value)}},meta:{invalid:!!t.error,touched:t.isErrorShowed},isRequired:t.isRequired,animationEffect:r===classic,focused:t.isFocused,isDisabled:s,"aria-labelledby":"field-"+t.id}))}))},TextField=text$6(128),NameField=text$6(64),PhoneField=text$6(32),CompanyField=text$6(64),eqEq=function(e,t){return e==t},Select$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.shouldComponentUpdate=shouldComponentUpdateGen(i,["options","disabled","className","width","selectedValue"]),i.handleChange=i.handleChange.bind(i),i.validate=i.validate.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){this.props.focused&&this.element&&this.element.focus(),this.validate()},t.prototype.componentDidUpdate=function(e){this.validate(),e.focused!==this.props.focused&&this.props.focused&&this.element&&this.element.focus()},t.prototype.handleChange=function(e){e.target.value!==this.props.selectedValue&&this.props.handleChange(e.target.value)},t.prototype.validate=function(){var e=this;this.props.selectedValue&&this.props.options.every(function(t){return!eqEq(t.value,e.props.selectedValue)})&&this.props.handleChange(this.props.options[0].value)},t.prototype.render=function(){var e=this,t=this.props,n=t.options,i=t.disabled,o=t.className,a=t.width,r=t.selectedValue,s=objectWithoutProperties(t,["options","disabled","className","width","selectedValue"]);return h("div",{className:"select-box",style:{width:a+"px"}},h("select",_extends({disabled:i,onChange:this.handleChange,className:"select "+(void 0!==o?o:""),ref:function(t){e.element=t}},s),n.map(function(e){return h("option",{index:e.id,style:{color:e.themeColor||"black"},value:e.value,selected:eqEq(r,e.value)},e.text)})),h("svg",{viewBox:"0 0 9 6",focusable:"false"},h("path",{d:"M5.2,5.7c-0.4,0.4-1,0.4-1.4,0L0.3,1.9c-0.4-0.4-0.4-1.1,0-1.6s1-0.4,1.4,0l2.8,3.1l2.8-3.1c0.4-0.4,1-0.4,1.4,0s0.4,1.1,0,1.6L5.2,5.7z"})))},t}(Component),core$5=function(e,t){var n=t.onChange,i=t.onBlur,o=t.onFocus,a=t.disabled,r=t.languages,s=e.value,d=e.options;return d||(d=[]),Array.isArray(s)&&(s=s.find(function(e){return d.some(function(t){return t.value===e})})||"",n(s)),h(Select$1,{options:[{id:-1,text:r.dropdownListDefault,value:""}].concat(d.map(function(e,t){return{id:t,value:e.value,text:e.label}})),selectedValue:s,handleChange:n,onFocus:o,onBlur:i,focused:e.isFocused,disabled:a,"aria-labelledby":"field-"+e.id})},SelectField=field(core$5),Select=validation(SelectField),Subject=text$6(32),core$6=function(e,t){var n=t.onChange,i=t.onBlur,o=t.onFocus,a=t.disabled,r=t.languages,s=e.value;return Array.isArray(s)?(s=s.find(function(t){return e.options.some(function(e){return e.value==t})})||"",n(s)):-1===s&&(s=""),h(Select$1,{options:[{id:-1,text:r.fieldNoDepartment,value:""}].concat(e.options.map(function(e,t){return{id:t,value:e.value,text:e.label+" "+(e.isOnline?r.fieldDepartmentStatusOnline:r.fieldDepartmentStatusOffline),themeColor:e.isOnline?"green":"red"}})),selectedValue:s,handleChange:n,onFocus:o,onBlur:i,focused:e.isFocused,disabled:a,"aria-labelledby":"field-"+e.id})},DepartmentField=field(core$6),Department=validation(DepartmentField),LEFT=37,UP=38,RIGHT=39,DOWN=40,TAB=9,Rating$4=function(e){function t(n){classCallCheck(this,t);for(var i=possibleConstructorReturn(this,e.call(this,n)),o=0,a=0;a0,o=0===this.state.hoverRateVal?n:this.state.hoverRateVal;return h("div",{ref:function(t){e.ratingDiv=t},className:"rating","aria-labelledby":t["aria-labelledby"],style:_extends({width:t.width,height:t.height},t.style),onFocus:t.onFocus,onBlur:t.onBlur,onMouseLeave:this.onClear,onKeyDown:this.onKeyDown,role:"radiogroup"},t.rateItems.map(function(t,a){var r=-1,s=a===n-1;return i?a===o-1&&(r=0):0===a&&(r=0),h("button",{key:t.value,type:"button",className:index$4("star",a>>0,i=0;i68?1900:2e3)};var getSetYear=makeGetSet("FullYear",!0),indexOf;indexOf=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;tthis?this:e:createInvalid()}),now=function(){return Date.now?Date.now():+new Date},ordering=["year","quarter","month","week","day","hour","minute","second","millisecond"];offset("Z",":"),offset("ZZ",""),addRegexToken("Z",matchShortOffset),addRegexToken("ZZ",matchShortOffset),addParseToken(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=offsetFromString(matchShortOffset,e)});var chunkOffset=/([\+\-]|\d\d)/gi;hooks.updateOffset=function(){};var aspNetRegex=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,isoRegex=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;createDuration.fn=Duration.prototype,createDuration.invalid=createInvalid$1;var add=createAdder(1,"add"),subtract=createAdder(-1,"subtract");hooks.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",hooks.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var lang=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});addFormatToken(0,["gg",2],0,function(){return this.weekYear()%100}),addFormatToken(0,["GG",2],0,function(){return this.isoWeekYear()%100}),addWeekYearFormatToken("gggg","weekYear"),addWeekYearFormatToken("ggggg","weekYear"),addWeekYearFormatToken("GGGG","isoWeekYear"),addWeekYearFormatToken("GGGGG","isoWeekYear"),addUnitAlias("weekYear","gg"),addUnitAlias("isoWeekYear","GG"),addUnitPriority("weekYear",1),addUnitPriority("isoWeekYear",1),addRegexToken("G",/[+-]?\d+/),addRegexToken("g",/[+-]?\d+/),addRegexToken("GG",/\d\d?/,/\d\d/),addRegexToken("gg",/\d\d?/,/\d\d/),addRegexToken("GGGG",/\d{1,4}/,/\d{4}/),addRegexToken("gggg",/\d{1,4}/,/\d{4}/),addRegexToken("GGGGG",/[+-]?\d{1,6}/,match6),addRegexToken("ggggg",/[+-]?\d{1,6}/,match6),addWeekParseToken(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,i){t[i.substr(0,2)]=toInt(e)}),addWeekParseToken(["gg","GG"],function(e,t,n,i){t[i]=hooks.parseTwoDigitYear(e)}),addFormatToken("Q",0,"Qo","quarter"),addUnitAlias("quarter","Q"),addUnitPriority("quarter",7),addRegexToken("Q",/\d/),addParseToken("Q",function(e,t){t[MONTH]=3*(toInt(e)-1)}),addFormatToken("D",["DD",2],"Do","date"),addUnitAlias("date","D"),addUnitPriority("date",9),addRegexToken("D",/\d\d?/),addRegexToken("DD",/\d\d?/,/\d\d/),addRegexToken("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),addParseToken(["D","DD"],DATE),addParseToken("Do",function(e,t){t[DATE]=toInt(e.match(/\d\d?/)[0])});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear"),addUnitAlias("dayOfYear","DDD"),addUnitPriority("dayOfYear",4),addRegexToken("DDD",/\d{1,3}/),addRegexToken("DDDD",/\d{3}/),addParseToken(["DDD","DDDD"],function(e,t,n){n._dayOfYear=toInt(e)}),addFormatToken("m",["mm",2],0,"minute"),addUnitAlias("minute","m"),addUnitPriority("minute",14),addRegexToken("m",/\d\d?/),addRegexToken("mm",/\d\d?/,/\d\d/),addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second"),addUnitAlias("second","s"),addUnitPriority("second",15),addRegexToken("s",/\d\d?/),addRegexToken("ss",/\d\d?/,/\d\d/),addParseToken(["s","ss"],SECOND);var getSetSecond=makeGetSet("Seconds",!1);addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)}),addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),addFormatToken(0,["SSS",3],0,"millisecond"),addFormatToken(0,["SSSS",4],0,function(){return 10*this.millisecond()}),addFormatToken(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),addFormatToken(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),addFormatToken(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),addFormatToken(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),addFormatToken(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),addUnitAlias("millisecond","ms"),addUnitPriority("millisecond",16),addRegexToken("S",/\d{1,3}/,/\d/),addRegexToken("SS",/\d{1,3}/,/\d\d/),addRegexToken("SSS",/\d{1,3}/,/\d{3}/);var token;for(token="SSSS";token.length<=9;token+="S")addRegexToken(token,/\d+/);for(token="S";token.length<=9;token+="S")addParseToken(token,parseMs);var getSetMillisecond=makeGetSet("Milliseconds",!1);addFormatToken("z",0,0,"zoneAbbr"),addFormatToken("zz",0,0,"zoneName");var proto=Moment.prototype;proto.add=add,proto.calendar=calendar$1,proto.clone=clone,proto.diff=diff$1,proto.endOf=endOf,proto.format=format,proto.from=from,proto.fromNow=fromNow,proto.to=to,proto.toNow=toNow,proto.get=stringGet,proto.invalidAt=invalidAt,proto.isAfter=isAfter,proto.isBefore=isBefore,proto.isBetween=isBetween,proto.isSame=isSame$1,proto.isSameOrAfter=isSameOrAfter,proto.isSameOrBefore=isSameOrBefore,proto.isValid=isValid$2,proto.lang=lang,proto.locale=locale,proto.localeData=localeData,proto.max=prototypeMax,proto.min=prototypeMin,proto.parsingFlags=parsingFlags,proto.set=stringSet,proto.startOf=startOf,proto.subtract=subtract,proto.toArray=toArray$1,proto.toObject=toObject$1,proto.toDate=toDate,proto.toISOString=toISOString,proto.inspect=inspect,proto.toJSON=toJSON,proto.toString=toString$1,proto.unix=unix,proto.valueOf=valueOf,proto.creationData=creationData,proto.year=getSetYear,proto.isLeapYear=getIsLeapYear,proto.weekYear=getSetWeekYear,proto.isoWeekYear=getSetISOWeekYear,proto.quarter=proto.quarters=getSetQuarter,proto.month=getSetMonth,proto.daysInMonth=getDaysInMonth,proto.week=proto.weeks=getSetWeek,proto.isoWeek=proto.isoWeeks=getSetISOWeek,proto.weeksInYear=getWeeksInYear,proto.isoWeeksInYear=getISOWeeksInYear,proto.date=getSetDayOfMonth,proto.day=proto.days=getSetDayOfWeek,proto.weekday=getSetLocaleDayOfWeek,proto.isoWeekday=getSetISODayOfWeek,proto.dayOfYear=getSetDayOfYear,proto.hour=proto.hours=getSetHour,proto.minute=proto.minutes=getSetMinute,proto.second=proto.seconds=getSetSecond,proto.millisecond=proto.milliseconds=getSetMillisecond,proto.utcOffset=getSetOffset,proto.utc=setOffsetToUTC,proto.local=setOffsetToLocal,proto.parseZone=setOffsetToParsedOffset,proto.hasAlignedHourOffset=hasAlignedHourOffset,proto.isDST=isDaylightSavingTime,proto.isLocal=isLocal,proto.isUtcOffset=isUtcOffset,proto.isUtc=isUtc,proto.isUTC=isUtc,proto.zoneAbbr=getZoneAbbr,proto.zoneName=getZoneName,proto.dates=deprecate("dates accessor is deprecated. Use date instead.",getSetDayOfMonth),proto.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth),proto.years=deprecate("years accessor is deprecated. Use year instead",getSetYear),proto.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone),proto.isDSTShifted=deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);var proto$1=Locale.prototype;proto$1.calendar=calendar,proto$1.longDateFormat=longDateFormat,proto$1.invalidDate=invalidDate,proto$1.ordinal=ordinal,proto$1.preparse=preParsePostFormat,proto$1.postformat=preParsePostFormat,proto$1.relativeTime=relativeTime,proto$1.pastFuture=pastFuture,proto$1.set=set$2,proto$1.months=localeMonths,proto$1.monthsShort=localeMonthsShort,proto$1.monthsParse=localeMonthsParse,proto$1.monthsRegex=monthsRegex,proto$1.monthsShortRegex=monthsShortRegex,proto$1.week=localeWeek,proto$1.firstDayOfYear=localeFirstDayOfYear,proto$1.firstDayOfWeek=localeFirstDayOfWeek,proto$1.weekdays=localeWeekdays,proto$1.weekdaysMin=localeWeekdaysMin,proto$1.weekdaysShort=localeWeekdaysShort,proto$1.weekdaysParse=localeWeekdaysParse,proto$1.weekdaysRegex=weekdaysRegex,proto$1.weekdaysShortRegex=weekdaysShortRegex,proto$1.weekdaysMinRegex=weekdaysMinRegex,proto$1.isPM=localeIsPM,proto$1.meridiem=localeMeridiem,getSetGlobalLocale("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===toInt(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale),hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var mathAbs=Math.abs,asMilliseconds=makeAs("ms"),asSeconds=makeAs("s"),asMinutes=makeAs("m"),asHours=makeAs("h"),asDays=makeAs("d"),asWeeks=makeAs("w"),asMonths=makeAs("M"),asYears=makeAs("y"),milliseconds=makeGetter("milliseconds"),seconds$1=makeGetter("seconds"),minutes$1=makeGetter("minutes"),hours=makeGetter("hours"),days=makeGetter("days"),months=makeGetter("months"),years=makeGetter("years"),round=Math.round,thresholds={ss:44,s:45,m:45,h:22,d:26,M:11},abs$1=Math.abs,proto$2=Duration.prototype;proto$2.isValid=isValid$1,proto$2.abs=abs,proto$2.add=add$1,proto$2.subtract=subtract$1,proto$2.as=as,proto$2.asMilliseconds=asMilliseconds,proto$2.asSeconds=asSeconds,proto$2.asMinutes=asMinutes,proto$2.asHours=asHours,proto$2.asDays=asDays,proto$2.asWeeks=asWeeks,proto$2.asMonths=asMonths,proto$2.asYears=asYears,proto$2.valueOf=valueOf$1,proto$2._bubble=bubble$3,proto$2.clone=clone$1,proto$2.get=get$5,proto$2.milliseconds=milliseconds,proto$2.seconds=seconds$1,proto$2.minutes=minutes$1,proto$2.hours=hours,proto$2.days=days,proto$2.weeks=weeks,proto$2.months=months,proto$2.years=years,proto$2.humanize=humanize,proto$2.toISOString=toISOString$1,proto$2.toString=toISOString$1,proto$2.toJSON=toISOString$1,proto$2.locale=locale,proto$2.localeData=localeData,proto$2.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1),proto$2.lang=lang,addFormatToken("X",0,0,"unix"),addFormatToken("x",0,0,"valueOf"),addRegexToken("x",/[+-]?\d+/),addRegexToken("X",/[+-]?\d+(\.\d{1,3})?/),addParseToken("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),addParseToken("x",function(e,t,n){n._d=new Date(toInt(e))}),hooks.version="2.20.1",setHookCallback(createLocal),hooks.fn=proto,hooks.min=min$2,hooks.max=max$2,hooks.now=now,hooks.utc=createUTC,hooks.unix=createUnix,hooks.months=listMonths,hooks.isDate=isDate,hooks.locale=getSetGlobalLocale,hooks.invalid=createInvalid,hooks.duration=createDuration,hooks.isMoment=isMoment,hooks.weekdays=listWeekdays,hooks.parseZone=createInZone,hooks.localeData=getLocale,hooks.isDuration=isDuration,hooks.monthsShort=listMonthsShort,hooks.weekdaysMin=listWeekdaysMin,hooks.defineLocale=defineLocale,hooks.updateLocale=updateLocale,hooks.locales=listLocales,hooks.weekdaysShort=listWeekdaysShort,hooks.normalizeUnits=normalizeUnits,hooks.relativeTimeRounding=getSetRelativeTimeRounding,hooks.relativeTimeThreshold=getSetRelativeTimeThreshold,hooks.calendarFormat=getCalendarFormat,hooks.prototype=proto,hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"};var WEEKDAYS_LONG=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],WEEKDAYS_SHORT=["Su","Mo","Tu","We","Th","Fr","Sa"],MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"],LocaleUtils={formatDay:formatDay$1,formatMonthTitle:formatMonthTitle$1,formatWeekdayShort:formatWeekdayShort$1,formatWeekdayLong:formatWeekdayLong$1,getFirstDayOfWeek:getFirstDayOfWeek$1,getMonths:getMonths$1},LocaleUtils$1=Object.freeze({formatDay:formatDay$1,formatMonthTitle:formatMonthTitle$1,formatWeekdayShort:formatWeekdayShort$1,formatWeekdayLong:formatWeekdayLong$1,getFirstDayOfWeek:getFirstDayOfWeek$1,getMonths:getMonths$1,default:LocaleUtils}),LEFT$1=37,UP$1=38,RIGHT$1=39,DOWN$1=40,ENTER$1=13,SPACE$1=32,ESC=27,TAB$1=9,Caption=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.handleKeyUp=i.handleKeyUp.bind(i),i}return inherits(t,e),t.prototype.shouldComponentUpdate=function(e){return e.locale!==this.props.locale||e.classNames!==this.props.classNames||e.date.getMonth()!==this.props.date.getMonth()||e.date.getFullYear()!==this.props.date.getFullYear()},t.prototype.handleKeyUp=function(e){13===e.keyCode&&this.props.onClick(e)},t.prototype.render=function(){var e=this.props,t=e.classNames,n=e.date,i=e.months,o=e.locale,a=e.localeUtils,r=e.onClick;return h("div",{className:t.caption,role:"heading"},h("div",{onClick:r,onKeyUp:this.handleKeyUp},i?i[n.getMonth()]+" "+n.getFullYear():a.formatMonthTitle(n,o)))},t}(Component);Caption.defaultProps={localeUtils:LocaleUtils};var defaultClassNames={container:"DayPicker",wrapper:"DayPicker-wrapper",interactionDisabled:"DayPicker--interactionDisabled",months:"DayPicker-Months",month:"DayPicker-Month",navBar:"DayPicker-NavBar",navButtonPrev:"DayPicker-NavButton DayPicker-NavButton--prev",navButtonNext:"DayPicker-NavButton DayPicker-NavButton--next",navButtonInteractionDisabled:"DayPicker-NavButton--interactionDisabled",caption:"DayPicker-Caption",weekdays:"DayPicker-Weekdays",weekdaysRow:"DayPicker-WeekdaysRow",weekday:"DayPicker-Weekday",body:"DayPicker-Body",week:"DayPicker-Week",weekNumber:"DayPicker-WeekNumber",day:"DayPicker-Day",footer:"DayPicker-Footer",todayButton:"DayPicker-TodayButton",today:"today",selected:"selected",disabled:"disabled",outside:"outside"},Navbar=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.handleNextClick=i.handleNextClick.bind(i),i.handlePreviousClick=i.handlePreviousClick.bind(i),i.handleNextKeyDown=i.handleNextKeyDown.bind(i),i.handlePreviousKeyDown=i.handlePreviousKeyDown.bind(i),i}return inherits(t,e),t.prototype.shouldComponentUpdate=function(e){return e.labels!==this.props.labels||e.dir!==this.props.dir||this.props.showPreviousButton!==e.showPreviousButton||this.props.showNextButton!==e.showNextButton},t.prototype.handleNextClick=function(){this.props.onNextClick&&this.props.onNextClick()},t.prototype.handlePreviousClick=function(){this.props.onPreviousClick&&this.props.onPreviousClick()},t.prototype.handleNextKeyDown=function(e){13!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),this.handleNextClick())},t.prototype.handlePreviousKeyDown=function(e){13!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),this.handlePreviousClick())},t.prototype.render=function(){var e=this.props,t=e.classNames,n=e.className,i=e.showPreviousButton,o=e.showNextButton,a=e.labels,r=e.dir,s=void 0,d=void 0,c=void 0,l=void 0,u=void 0,p=void 0;"rtl"===r?(s=this.handleNextClick,d=this.handlePreviousClick,c=this.handleNextKeyDown,l=this.handlePreviousKeyDown,p=i,u=o):(s=this.handlePreviousClick,d=this.handleNextClick,c=this.handlePreviousKeyDown,l=this.handleNextKeyDown,p=o,u=i);var f=u?t.navButtonPrev:t.navButtonPrev+" "+t.navButtonInteractionDisabled,g=p?t.navButtonNext:t.navButtonNext+" "+t.navButtonInteractionDisabled,m=h("span",{tabIndex:"0",role:"button","aria-label":a.previousMonth,key:"previous",className:f,onKeyDown:u?c:void 0,onClick:u?s:void 0}),b=h("span",{tabIndex:"0",role:"button","aria-label":a.nextMonth,key:"right",className:g,onKeyDown:p?l:void 0,onClick:p?d:void 0});return h("div",{className:n||t.navBar},"rtl"===r?[b,m]:[m,b])},t}(Component);Navbar.defaultProps={classNames:defaultClassNames,dir:"ltr",labels:{previousMonth:"Previous Month",nextMonth:"Next Month"},showPreviousButton:!0,showNextButton:!0};var Weekdays=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.shouldComponentUpdate=function(e){return this.props!==e},t.prototype.render=function(){for(var e=this.props,t=e.classNames,n=e.firstDayOfWeek,i=e.showWeekNumbers,o=e.weekdaysLong,a=e.weekdaysShort,r=e.locale,s=e.localeUtils,d=e.weekdayElement,c=[],l=0;l<7;l+=1){var u=(l+n)%7,p={key:l,className:t.weekday,weekday:u,weekdaysLong:o,weekdaysShort:a,localeUtils:s,locale:r},f=cloneElement(d,p);c.push(f)}return h("div",{className:t.weekdays,role:"rowgroup"},h("div",{className:t.weekdaysRow,role:"row"},i&&h("div",{className:t.weekday}),c))},t}(Component),getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty$5=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable,index$5=shouldUseNative()?Object.assign:function(e,t){for(var n,i,o=toObject$2(e),a=1;a-1,ariaSelected:i.indexOf("selected")>-1,onClick:this.props.onDayClick,onFocus:this.props.onDayFocus,onKeyDown:this.props.onDayKeyDown,onMouseEnter:this.props.onDayMouseEnter,onMouseLeave:this.props.onDayMouseLeave,onMouseDown:this.props.onDayMouseDown,onMouseUp:this.props.onDayMouseUp,onTouchEnd:this.props.onDayTouchEnd,onTouchStart:this.props.onDayTouchStart},this.props.renderDay(e,s))},t.prototype.render=function(){var e=this,t=this.props,n=t.classNames,i=t.month,o=t.months,a=t.fixedWeeks,r=t.captionElement,s=t.weekdayElement,d=t.locale,c=t.localeUtils,l=t.weekdaysLong,u=t.weekdaysShort,p=t.firstDayOfWeek,f=t.onCaptionClick,g=t.showWeekNumbers,m=t.showWeekDays,b=t.onWeekClick,w={date:i,classNames:n,months:o,localeUtils:c,locale:d,onClick:f?function(e){return f(i,e)}:void 0},v=cloneElement(r,w),y=getWeekArray(i,p,a);return h("div",{className:n.month,role:"grid"},v,m&&h(Weekdays,{classNames:n,weekdaysShort:u,weekdaysLong:l,firstDayOfWeek:p,showWeekNumbers:g,locale:d,localeUtils:c,weekdayElement:s}),h("div",{className:n.body,role:"rowgroup"},y.map(function(t){var o=void 0;return g&&(o=getWeekNumber(t[0])),h("div",{key:t[0].getTime(),className:n.week,role:"row"},g&&h("div",{className:n.weekNumber,tabIndex:0,role:"gridcell",onClick:b?function(e){return b(o,t,e)}:void 0,onKeyUp:b?function(e){return 13===e.keyCode&&b(o,t,e)}:void 0},e.props.renderWeek(o,t,i)),t.map(e.renderDay))})))},t}(Component),Weekday=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.shouldComponentUpdate=function(e){return this.props!==e},t.prototype.render=function(){var e=this.props,t=e.weekday,n=e.className,i=e.weekdaysLong,o=e.weekdaysShort,a=e.localeUtils,r=e.locale,s=void 0;s=i?i[t]:a.formatWeekdayLong(t,r);var d=void 0;return d=o?o[t]:a.formatWeekdayShort(t,r),h("div",{className:n,role:"columnheader"},h("abbr",{title:s},d))},t}(Component),DayPicker=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state=i.getStateFromProps(n),i.getNextNavigableMonth=i.getNextNavigableMonth.bind(i),i.getPreviousNavigableMonth=i.getPreviousNavigableMonth.bind(i),i.getPreviousNavigableMonth=i.getPreviousNavigableMonth.bind(i),i.allowPreviousMonth=i.allowPreviousMonth.bind(i),i.allowNextMonth=i.allowNextMonth.bind(i),i.allowMonth=i.allowMonth.bind(i),i.allowYearChange=i.allowYearChange.bind(i),i.showMonth=i.showMonth.bind(i),i.showNextMonth=i.showNextMonth.bind(i),i.showPreviousMonth=i.showPreviousMonth.bind(i),i.showNextYear=i.showNextYear.bind(i),i.showPreviousYear=i.showPreviousYear.bind(i),i.focusFirstDayOfMonth=i.focusFirstDayOfMonth.bind(i),i.focusLastDayOfMonth=i.focusLastDayOfMonth.bind(i),i.focusPreviousDay=i.focusPreviousDay.bind(i),i.focusNextDay=i.focusNextDay.bind(i),i.focusNextWeek=i.focusNextWeek.bind(i),i.focusPreviousWeek=i.focusPreviousWeek.bind(i),i.handleKeyDown=i.handleKeyDown.bind(i),i.handleDayKeyDown=i.handleDayKeyDown.bind(i),i.handleDayClick=i.handleDayClick.bind(i),i.handleOutsideDayClick=i.handleOutsideDayClick.bind(i),i.handleTodayButtonClick=i.handleTodayButtonClick.bind(i),i}return inherits(t,e),t.prototype.componentWillReceiveProps=function(e){this.props.month!==e.month&&this.setState(this.getStateFromProps(e))},t.prototype.getStateFromProps=function(e){var t=startOfMonth(e.month||e.initialMonth),n=t;if(e.pagedNavigation&&e.numberOfMonths>1&&e.fromMonth){var i=getMonthsDiff(e.fromMonth,n);n=addMonths(e.fromMonth,Math.floor(i/e.numberOfMonths)*e.numberOfMonths)}else e.toMonth&&e.numberOfMonths>1&&getMonthsDiff(n,e.toMonth)<=0&&(n=addMonths(e.toMonth,1-this.props.numberOfMonths));return{currentMonth:n}},t.prototype.getNextNavigableMonth=function(){return addMonths(this.state.currentMonth,this.props.numberOfMonths)},t.prototype.getPreviousNavigableMonth=function(){return addMonths(this.state.currentMonth,-1)},t.prototype.allowPreviousMonth=function(){var e=addMonths(this.state.currentMonth,-1);return this.allowMonth(e)},t.prototype.allowNextMonth=function(){var e=addMonths(this.state.currentMonth,this.props.numberOfMonths);return this.allowMonth(e)},t.prototype.allowMonth=function(e){var t=this.props,n=t.fromMonth,i=t.toMonth;return!(!t.canChangeMonth||n&&getMonthsDiff(n,e)<0||i&&getMonthsDiff(i,e)>0)},t.prototype.allowYearChange=function(){return this.props.canChangeMonth},t.prototype.showMonth=function(e,t){var n=this;this.allowMonth(e)&&this.setState({currentMonth:startOfMonth(e)},function(){t&&t(),n.props.onMonthChange&&n.props.onMonthChange(n.state.currentMonth)})},t.prototype.showNextMonth=function(e){if(this.allowNextMonth()){var t=this.props.pagedNavigation?this.props.numberOfMonths:1,n=addMonths(this.state.currentMonth,t);this.showMonth(n,e)}},t.prototype.showPreviousMonth=function(e){if(this.allowPreviousMonth()){var t=this.props.pagedNavigation?this.props.numberOfMonths:1,n=addMonths(this.state.currentMonth,-t);this.showMonth(n,e)}},t.prototype.showNextYear=function(){if(this.allowYearChange()){var e=addMonths(this.state.currentMonth,12);this.showMonth(e)}},t.prototype.showPreviousYear=function(){if(this.allowYearChange()){var e=addMonths(this.state.currentMonth,-12);this.showMonth(e)}},t.prototype.focusFirstDayOfMonth=function(){getDayNodes(this.dayPicker,this.props.classNames)[0].focus()},t.prototype.focusLastDayOfMonth=function(){var e=getDayNodes(this.dayPicker,this.props.classNames);e[e.length-1].focus()},t.prototype.focusPreviousDay=function(e){var t=this,n=getDayNodes(this.dayPicker,this.props.classNames),i=nodeListToArray(n).indexOf(e);0===i?this.showPreviousMonth(function(){return t.focusLastDayOfMonth()}):n[i-1].focus()},t.prototype.focusNextDay=function(e){var t=this,n=getDayNodes(this.dayPicker,this.props.classNames),i=nodeListToArray(n).indexOf(e);i===n.length-1?this.showNextMonth(function(){return t.focusFirstDayOfMonth()}):n[i+1].focus()},t.prototype.focusNextWeek=function(e){var t=this,n=getDayNodes(this.dayPicker,this.props.classNames),i=nodeListToArray(n).indexOf(e);i>n.length-8?this.showNextMonth(function(){var e=n.length-i,o=7-e;getDayNodes(t.dayPicker,t.props.classNames)[o].focus()}):n[i+7].focus()},t.prototype.focusPreviousWeek=function(e){var t=this,n=getDayNodes(this.dayPicker,this.props.classNames),i=nodeListToArray(n).indexOf(e);i<=6?this.showPreviousMonth(function(){var e=getDayNodes(t.dayPicker,t.props.classNames);e[e.length-7+i].focus()}):n[i-7].focus()},t.prototype.handleKeyDown=function(e){switch(e.keyCode){case 37:this.showPreviousMonth();break;case 39:this.showNextMonth();break;case 38:this.showPreviousYear();break;case 40:this.showNextYear()}this.props.onKeyDown&&this.props.onKeyDown(e)},t.prototype.handleDayKeyDown=function(e,t,n){switch(n.keyCode){case 37:cancelEvent(n),this.focusPreviousDay(n.target);break;case 39:cancelEvent(n),this.focusNextDay(n.target);break;case 38:cancelEvent(n),this.focusPreviousWeek(n.target);break;case 40:cancelEvent(n),this.focusNextWeek(n.target);break;case 13:case 32:cancelEvent(n),this.props.onDayClick&&this.handleDayClick(e,t,n)}this.props.onDayKeyDown&&this.props.onDayKeyDown(e,t,n)},t.prototype.handleDayClick=function(e,t,n){t[this.props.classNames.outside]&&this.handleOutsideDayClick(e),this.props.onDayClick&&this.props.onDayClick(e,t,n)},t.prototype.handleOutsideDayClick=function(e){var t=this.state.currentMonth,n=this.props.numberOfMonths,i=getMonthsDiff(t,e);i>0&&i>=n?this.showNextMonth():i<0&&this.showPreviousMonth()},t.prototype.handleTodayButtonClick=function(e){var t=new Date,n=new Date(t.getFullYear(),t.getMonth());this.showMonth(n),e.target.blur(),this.props.onTodayButtonClick&&this.props.onTodayButtonClick(new Date(t.getFullYear(),t.getMonth(),t.getDate()),getModifiersForDay(t,this.props.modifiers),e)},t.prototype.renderNavbar=function(){var e=this.props,t=e.labels,n=e.locale,i=e.localeUtils,o=e.canChangeMonth,a=e.navbarElement,r=objectWithoutProperties(e,["labels","locale","localeUtils","canChangeMonth","navbarElement"]);return o?cloneElement(a,{month:this.state.month,classNames:this.props.classNames,className:this.props.classNames.navBar,nextMonth:this.getNextNavigableMonth(),previousMonth:this.getPreviousNavigableMonth(),showPreviousButton:this.allowPreviousMonth(),showNextButton:this.allowNextMonth(),onNextClick:this.showNextMonth,onPreviousClick:this.showPreviousMonth,dir:r.dir,labels:t,locale:n,localeUtils:i}):null},t.prototype.renderMonths=function(){for(var e=[],t=getFirstDayOfWeekFromProps(this.props),n=0;n=0,o=-1===this.state.hoverRateVal?n:this.state.hoverRateVal,a=[],r=0;r<=10;r+=1)a.push({id:r,value:r,label:r});return h("div",{className:"clearfix"},h("div",{ref:function(t){e.npsContainer=t},className:"nps","aria-labelledby":t["aria-labelledby"],style:_extends({width:t.width,height:t.height},t.style),onFocus:t.onFocus,onBlur:t.onBlur,onKeyDown:this.onKeyDown,role:"radiogroup"},a.map(function(t,a){var r=-1,s=a===n;return i?a===o&&(r=0):0===a&&(r=0),h("button",{key:t.value,type:"button",className:index$4("npsItem",a===o&&"npsItem--selected"),onClick:function(){return e.clickChange(t.value)},onFocus:function(){return e.setState({hoverRateVal:a})},ref:function(t){e.npsOptions[a]=t},title:t.label,"aria-label":t.label,"aria-checked":s.toString(),role:"radio",tabIndex:r},t.label)})),h("span",{className:"nps__label nps__label--left"},t.options[0].value),h("span",{className:"nps__label nps__label--right"},t.options[1].value))},t}(Component),core$11=function(e,t){var n=t.onChange,i=t.onBlur,o=t.onFocus,a=t.disabled,r=e.value;return Array.isArray(r)&&(r=r.find(function(t){return e.options.some(function(e){return+e.value==+t})})||"",n(r)),h(NPS$1,{rateVal:r,rateChange:n,onBlur:i,onFocus:o,disabled:a,"aria-labelledby":"field-"+e.id,isFocused:e.isFocused,options:e.options})},NPSField=field(core$11),NPS=validation(NPSField),recaptchaWidgets={},setCss$1=function(e){var t=e.head;if(t){var n=t.querySelector("style#recaptch");n||(n=e.createElement("style"),n.id="recaptch",t.appendChild(n));n.innerHTML="#comm100-container ~ div > :last-child {max-height: 550px !important;overflow-y: auto !important;}#comm100-container ~ div > :last-child::-webkit-scrollbar-thumb {background-color: #c8c8c8;}#comm100-container ~ div:last-child {left: 0px !important;}#container ~ div:last-child {left: 0px !important;}"}},ReCaptcha=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.chatWindow(),n=getLanguages(this.context);this.captcha=h(IconSVG,{type:"loading",className:"svg--loading",viewBox:"0 0 100 100","aria-label":n.loading,"aria-busy":"true",style:{transform:"none"}}),t.recaptchaLoadedCallback=function(){e.renderRecaptcha(t.grecaptcha)}},t.prototype.componentDidMount=function(){var e=this.chatWindow();if(e.grecaptcha&&e.grecaptcha.reset)return void e.grecaptcha.reset(recaptchaWidgets[this.container.id]);setCss$1(e.document),e.document.body.appendChild(this.createRecaptchaApiScript())},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.createRecaptchaApiScript=function(){var e=this.chatWindow().document,t=e.createElement("script"),n=this.props,i=n.settings,o=n.language;return t.src="https://"+i.host+"/recaptcha/api.js?hl="+o+"&render=explicit&onload=recaptchaLoadedCallback",t.defer=!0,t.async=!0,t},t.prototype.chatWindow=function(){var e=window.parent||window,t=e.document.getElementById("chat_window_container");return t&&"iframe"===t.tagName.toLowerCase()?t.contentWindow:e},t.prototype.renderRecaptcha=function(e){var t=this.props,n=t.settings,i=t.onError,o=t.onExpired,a=t.onSuccess,r=n.siteKey,s=n.isCompact;this.container.innerHTML="",recaptchaWidgets[this.container.id]=e.render(this.container,{sitekey:r,size:s?"compact":"normal",callback:a,"expired-callback":o,"error-callback":i}),this.container.height=this.container.height+1},t.prototype.render=function(){var e=this;return h("div",{id:this.props.id,ref:function(t){e.container=t},className:index$4(!this.props.settings.isCompact&&"captcha")},this.captcha)},t}(Component),ReCaptcha$1=validation(ReCaptcha),Captcha=field(function(e,t){var n=t.isHorizontal,i=t.onChange,o=t.captchaSettings,a=t.languageTag;return h(ReCaptcha$1,{id:"captcha-"+e.id,isCompact:n,onSuccess:i,onExpired:function(){return i(null)},settings:o,language:a})}),Captcha$1=validation(Captcha),_mapping$4,mapping$4=(_mapping$4={},_mapping$4[name]=NameField,_mapping$4[email]=EmailField$1,_mapping$4.phone=PhoneField,_mapping$4.company=CompanyField,_mapping$4.product=Select,_mapping$4.department=Department,_mapping$4.rating=Rating$3,_mapping$4[comment]=TextArea,_mapping$4.content=TextArea,_mapping$4.subject=Subject,_mapping$4.ticket=Ticket,_mapping$4.checkbox=Checkbox,_mapping$4[checkboxList]=CheckboxList,_mapping$4.custom=CustomField$1,_mapping$4.radio=RadioList$1,_mapping$4.select=Select,_mapping$4.textarea=TextArea,_mapping$4.text=TextField,_mapping$4.datetime=DatePicker,_mapping$4.attachment=Attachment$1,_mapping$4.nps=NPS,_mapping$4.captcha=Captcha$1,_mapping$4),Form$2=function(e){var t=e.fields,n=objectWithoutProperties(e,["fields"]);return h("div",{className:"field-table form-style-hor"},t.map(function(e){return h(mapping$4[e.type],_extends({},n,{field:e,key:e.id}))}))},FormContent=renderWindow("form")(Form$2),sizeClassMapping={large:"btn-lg",small:"btn-sm"},buttonClassMapping={primary:"btn-primary",default:"btn-default",gray:"btn-grey",noborder:"btn-noborder"},Button$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.shouldComponentUpdate=shouldComponentUpdateGen(i,["disabled","text","className","loading","size","icon","iconPosition","type","children"]),i}return inherits(t,e),t.prototype.render=function(){var e=this.props,t=e.disabled,n=e.text,i=e.onClick,o=e.className,a=e.htmlType,r=(e.loading,e.size),s=e.icon,d=e.iconPosition,c=e.type,l=e.children,u=objectWithoutProperties(e,["disabled","text","onClick","className","htmlType","loading","size","icon","iconPosition","type","children"]),p=sizeClassMapping[r]||"",f=buttonClassMapping[c]||"btn-default",g=null;return s&&(g=s),h("button",_extends({},u,{className:index$4("btn",t&&"disabled",p,f,o),disabled:!!t&&"disabled",onClick:t?void 0:i,type:a,"aria-label":n,"aria-disabled":t}),"right"!==d&&g,"right"!==d&&l,n&&h("span",null,n),"right"===d&&l,"right"===d&&g)},t}(Component),ButtonProgress=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.componentDidUpdate=function(e){var t=this;if(this.props.success&&!e.success&&isSafari)var n=0,i=setInterval(function(){t.btn&&(t.btn.style.fontSize=n/50%2==0?"1rem":"1.0001rem"),(n+=50)>500&&clearInterval(i)},50)},t.prototype.render=function(){var e=this,t=this.props,n=t.isSubmitting,i=t.onClick,o=t.success,a=t.text,r=t.disabled,s=objectWithoutProperties(t,["isSubmitting","onClick","success","text","disabled"]),d=void 0,c=getLanguages(this.context);return o?d=c.submitted:n&&(d=c.uploading),h("div",_extends({className:index$4("buttonProgressContainer",n&&!o&&"buttonProgressContainerLoading",o&&"buttonProgressContainerSuccess"),"aria-live":"assertive","aria-atomic":"true","aria-label":d,ref:function(t){e.btn=t}},s),h(Button$1,{type:"primary",text:a,className:"buttonProgressBtnAnimated buttonProgressBtnDefaultSize",htmlType:"submit",onClick:i,disabled:r||n}),h("div",{className:"lds-css ng-scope"},h("div",{className:"lds-rolling"})),h("svg",{version:"1.1",className:"buttonProgress__layerCircle",id:"buttonProgress__layer-circle",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"32px",height:"32px",viewBox:"0 0 30 30",xmlSpace:"preserve",focusable:"false"},h("path",{className:"buttonProgress__submitCirclePath",d:"M15,1.5c7.4,0,13.5,6.1,13.5,13.5S22.4,28.5,15,28.5S1.5,22.4, 1.5,15S7.6,1.5,15,1.5L15,1.5z"})),h("svg",{version:"1.1",className:"buttonProgress__layerSuccess",id:"buttonProgress__layer-success",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"16px",height:"16px",viewBox:"0 0 16 16",xmlSpace:"preserve"},h("polygon",{className:"buttonProgress__submitSuccessPath",points:"16,3.5 12.8,1 6.5,9.2 2.5,6.1 0,9.3 6,14 7.3,15"})))},t}(Component),SubmitButton=function(e){return h(ButtonProgress,{onClick:e.onClick,isSubmitting:e.isSubmitting,success:e.success,text:e.text,disabled:e.disabled})},SubmitButton$1=renderWindow("submit")(SubmitButton),Form=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={reCaptchaError:""},i.onSubmit=i.onSubmit.bind(i),i.onReCaptchaErrorClose=i.onReCaptchaErrorClose.bind(i),i}return inherits(t,e),t.prototype.onSubmit=function(e){var t=this;e.preventDefault(),setTimeout(function(){var e=t.props.fields.filter(function(e){return""!==e.error});if(e.length>0){var n=e.map(function(e){return e.id});t.props.onValidateAll(n);for(var i=0;i0)return n[0];var i=t.getElementsByClassName("window__chatAgentMessage");return i.length>0?i[0]:null},calcTimePosition=function(e,t){for(var n=t.parentNode;n&&!/\bwindow__chat\b/.test(n.className);)n=n.parentNode;var i=n.getBoundingClientRect(),o=e.clientY+20+t.offsetHeightr?"message--notSeen":"message--seen",d=a>r?i:"";return h("div",{className:index$4("dot_container"),title:d,"aria-label":d},h("div",{className:s}))}return null},ifSendingFile=function(e){return e===visitorFile||e===visitorImage},getVisitorSubmitBotFormAnswer=function(e){return h("div",null,h("div",null,e.message),e.values.map(function(e){return h("div",null,e.label," : ",function(){return"checkbox"===e.type?translateHtmlCharater$1("true"===e.value?"\u2714":"\u2716"):"checkbox-list"===e.type?e.value.replace(/\u2299/gi,","):e.value}())}))},VisitorText=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={ifShowLoading:!1,imgWidth:0,imgHeight:0},i.timer=null,i}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.type===visitorText&&(this.timer=setTimeout(function(){e.setState({ifShowLoading:!0}),e.timer=null},1e3));var t=this.props.scrollDown;if(t(),registerAnimationEnd(this.container,t),this.props.type===visitorSendFile&&this.props.message.url&&/.*[.](jpg|gif|jpeg|png|bmp)$/i.test(this.props.message.name)){var n=new Image;n.src=getImageUrl(this.props.message.url,!0),n.onload=function(){e.setState({imgWidth:n.width,imgHeight:n.height})}}},t.prototype.componentWillReceiveProps=function(e){e.type!==visitorText&&(this.timer&&clearTimeout(this.timer),this.setState({ifShowLoading:!1}))},t.prototype.componentWillUnmount=function(){this.timer&&clearTimeout(this.timer),unregisterAnimationEnd(this.container,this.props.scrollDown)},t.prototype.render=function(){var e=this,t=this.props,n=void 0,i=!1,o="",a=t.isMobile&&!t.isIpad,r=getLanguages(this.context);return t.type===visitorText?n=parseMessageTextToComponents(t.message,h("br",null),t.KbHost,t.onKbLinkClick,t.siteId,a):t.type===visitorAddTextMessage?t.translated?(n=parseMessageTextToComponents(t.translated,h("br",null),t.KbHost,t.onKbLinkClick,t.siteId,a),n.push(h("i",{className:"window__chatMessageOrignal window__chatMessageTranslatedTag"},"(",t.translatedTag,")")),n.push(h("i",{className:"window__chatMessageOrignal"},parseMessageTextToComponents(t.message,h("br",null),t.KbHost,t.onKbLinkClick,t.siteId,a)," (",t.originalTag,")"))):n=parseMessageTextToComponents(t.message,h("br",null),t.KbHost,t.onKbLinkClick,t.siteId,a):t.type===visitorSendImage?(i=!0,o=/.*[.](gif)$/i.test(t.message.name)?t.message.url:t.message.url+"&maxWidth=200&maxHeight=200",n=h("a",{href:t.message.url+"&isImage",target:"_blank",rel:"noopener noreferrer"},h("img",{src:o,alt:t.message.name,style:{maxWidth:200,maxHeight:200},onLoad:t.scrollDown}))):t.type===visitorSendFile?/.*[.](jpg|gif|jpeg|png|bmp)$/i.test(t.message.name)?(i=!0,0===this.state.imgWidth?(i=!1,n=h("div",{className:"chat-visitor-message window__chatVisitorMessage--file"},h(Icon,{type:IconFonts.sendfile}),h("a",{href:t.message.url,target:"_blank",rel:"noopener noreferrer"},t.message.name))):(o=/.*[.](gif)$/i.test(t.message.name)?t.message.url:getImageUrl(t.message.url,!1,this.state.imgWidth,this.state.imgHeight),n=h("a",{href:t.message.url+"&isImage",target:"_blank",rel:"noopener noreferrer",style:getImageContainerSize(this.state.imgWidth,this.state.imgHeight)},h("div",{className:"image-container"},h("img",{src:o,alt:t.message.name,onLoad:t.scrollDown,style:getImageSize(this.state.imgWidth,this.state.imgHeight)}))))):(i=!1,n=h("div",{className:"chat-visitor-message window__chatVisitorMessage--file"},h(Icon,{type:IconFonts.sendfile}),h("a",{href:t.message.url,target:"_blank",rel:"noopener noreferrer"},t.message.name))):t.type===visitorFile||t.type===visitorImage?(n=[t.fileName],t.percent&&n.push(h("span",{role:"progressbar","aria-valuenow":t.percent,"aria-valuemin":"0","aria-valuemax":"100"},"(",t.percent,"%)")),t.onCloseClick&&n.push(h("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),t.onCloseClick()},"aria-label":r.cancelUpload,className:"file__icon--cancel"},h(IconSVG,{type:"close"}))),n.push(h("span",{className:"chat-message--loading","aria-label":r.uploading},h(IconSVG,{type:"loading",className:"svg--loading",viewBox:"0 0 100 100","aria-label":r.uploading,"aria-busy":"true"})))):t.type===visitorSubmitBotForm?n=getVisitorSubmitBotFormAnswer(t.message):t.type===visitorCancelBotForm&&(n=t.message.message),h("div",{className:"chat-visitor window__chatVisitor clearfix",ref:function(t){e.container=t}},h("div",{className:index$4("chat-visitor-message","window__chatVisitorMessage",i&&"chat-message--img",t.meta.isFirst&&"window__chatVisitorFirstMessage",t.meta.isLast&&"window__chatVisitorLastMessage"),style:{background:getVisitorMessageBackground(t.mainColor)}},!ifSendingFile(t.type)&&renderSeen(t.ifShowSeenDot,t.maxAgentReadId,t.msgGuid,t.tooltip,t.originalMessages),n,this.state.ifShowLoading&&h("span",{className:"chat-message--loading"},h(IconSVG,{type:"loading",className:"svg--loading",viewBox:"0 0 100 100","aria-label":r.uploading,"aria-busy":"true"}))),this.props.type!==visitorText&&t.time&&h(MessageTime,{time:t.time,isMobile:this.props.isMobile}),this.props.type===visitorText&&h(MessageTime,{time:t.time}))},t}(Component),AgentText=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={mobileShowTime:!1,imgWidth:0,imgHeight:0},i}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props;if(t.scrollDown(),emit("livechat.chat.agent.input",t.sender,t.message),registerAnimationEnd(this.container,t.scrollDown),t.type===agentSendFile&&t.message.url&&/.*[.](jpg|gif|jpeg|png|bmp)$/i.test(t.message.name)){var n=new Image;n.src=getImageUrl(t.message.url,!0),n.onload=function(){e.setState({imgWidth:n.width,imgHeight:n.height})}}},t.prototype.shouldComponentUpdate=function(e,t){return this.props.message!==e.message||e.sender.name!==this.props.sender.name||e.sender.avatar!==this.props.sender.avatar||e.time!==this.props.time||e.translated!==this.props.translated||e.ifShowName!==this.props.ifShowName||e.ifShowAvatar!==this.props.ifShowAvatar||e.isMobile!==this.props.isMobile||e.type!==this.props.type||t.mobileShowTime!==this.state.mobileShowTime||t.imgWidth!==this.state.imgWidth||t.imgHeight!==this.state.imgHeight},t.prototype.componentWillUnmount=function(){unregisterAnimationEnd(this.container,this.props.scrollDown)},t.prototype.render=function(){var e=this,t=this.props,n=void 0,i=!1,o="",a=t.isMobile&&!t.isIpad,r=getLanguages(this.context);t.type===agentAddTextMessage||t.type===autoInvitationMessage||t.type===agentAddTextMessageViaManualInvitation?t.translated?(n=parseMessageTextToComponents(t.translated,h("br",null),t.KbHost,t.onKbLinkClick,t.siteId,a),n.push(h("i",{className:"window__chatMessageOrignal window__chatMessageTranslatedTag"},"(",t.translatedTag,")")),n.push(h("i",{className:"window__chatMessageOrignal"},parseMessageTextToComponents(t.message,h("br",null),t.KbHost,t.onKbLinkClick,t.siteId,a)," (",t.originalTag,")"))):n=parseMessageTextToComponents(t.message,h("br",null),t.KbHost,t.onKbLinkClick,t.siteId,a):t.type===agentSendUrl?n=createLinkComponent(t.message):t.type===agentSendImage?(i=!0,o=/.*[.](gif)$/i.test(t.message.name)?t.message.url:t.message.url+"&maxWidth=200&maxHeight=200",n=h("a",{href:t.message.url+"&isImage",target:"_blank",rel:"noopener noreferrer"},h("img",{src:o,alt:t.message.name,style:{maxWidth:200,maxHeight:200},onLoad:t.scrollDown}))):t.type===agentSendFile&&(/.*[.](jpg|gif|jpeg|png|bmp)$/i.test(t.message.name)?(i=!0,o=t.message.url,0===this.state.imgWidth?(i=!1,n=h("div",{className:"chat-operator-message window__chatAgentMessage--file"},h("span",{className:"chat-message--loading","aria-label":r.uploading},h(IconSVG,{type:"loading",className:"svg--loading",viewBox:"0 0 100 100","aria-label":r.uploading,"aria-busy":"true"})),h("a",{href:o,target:"_blank",rel:"noopener noreferrer"},t.message.name))):(o=/.*[.](gif)$/i.test(t.message.name)?t.message.url:getImageUrl(t.message.url,!1,this.state.imgWidth,this.state.imgHeight),n=h("a",{href:t.message.url+"&isImage",target:"_blank",rel:"noopener noreferrer",style:getImageContainerSize(this.state.imgWidth,this.state.imgHeight)},h("div",{className:"image-container"},h("img",{src:o,alt:t.message.name,style:getImageSize(this.state.imgWidth,this.state.imgHeight),onLoad:t.scrollDown}))))):(i=!1,n=h("div",{className:"chat-operator-message window__chatAgentMessage--file"},h(Icon,{type:IconFonts.sendfile}),h("a",{href:t.message.url,target:"_blank",rel:"noopener noreferrer"},t.message.name))));var s=t.isMobile?"#fff":getAgentMessageBackground(t.mainColor);return h("div",{className:"window__chatAgent clearfix",ref:function(t){e.container=t}},t.ifShowAvatar&&t.sender.avatar&&h("div",{className:"agentMessage__avatar"},h(AvatarImage,{src:t.sender.avatar,alt:t.sender.name,className:"agentMessage__avatarImg"})),h("div",{className:index$4("chat-operator-message","window__chatAgentMessage",i&&"chat-message--img",t.type===agentSendImageStart&&"chat-message--imgLoading",(!t.ifShowAvatar||!t.sender.avatar)&&"window__chatMessageNoAvatar"),style:{background:s}},!t.ifShowAvatar&&t.ifShowName&&t.sender.name&&h("div",{className:"chat-operator-name window__chatAgentName"},t.sender.name,":"),t.type===agentSendImageStart&&h(IconSVG,{type:"loading",className:"svg--loading",viewBox:"0 0 100 100","aria-label":r.loading,"aria-busy":"true"}),n),h(MessageTime,{time:t.time,isMobile:t.isMobile}))},t}(Component),dotElement="dot__element",dotElementAnimation="dot__element--loadingAnimation",BotLoading=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){return h("div",{className:"dot"},h("div",{className:index$4("dot__element",!isIE&&"dot__element--loadingAnimation","animated-delayFrames7")}),h("div",{className:index$4("dot__element",!isIE&&"dot__element--loadingAnimation","animated-delayFrames10")}),h("div",{className:index$4("dot__element",!isIE&&"dot__element--loadingAnimation","animated-delayFrames13")}))},t}(Component),ChatbotPending=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this.props.scrollDown;e(),registerAnimationEnd(this.container,e)},t.prototype.componentWillUnmount=function(){unregisterAnimationEnd(this.container,this.props.scrollDown)},t.prototype.render=function(){var e=this,t=this.props,n=t.message,i=n.sender;if(!n.content)return null;var o=t.isMobile?"#fff":getAgentMessageBackground(t.mainColor);return h("div",{className:"window__chatAgent clearfix",ref:function(t){e.container=t}},t.ifShowAvatar&&i.avatar&&h("div",{className:"agentMessage__avatar"},h(AvatarImage,{src:i.avatar,alt:i.name,className:"agentMessage__avatarImg"})),h("div",{className:index$4("chat-operator-message","window__chatAgentMessage",!t.ifShowAvatar&&"window__chatMessageNoAvatar"),style:{background:o}},h(BotLoading,null)))},t}(Component),ChatbotBadAnswer=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this.props.scrollDown;e(),registerAnimationEnd(this.container,e)},t.prototype.componentWillUnmount=function(){unregisterAnimationEnd(this.container,this.props.scrollDown)},t.prototype.render=function(){var e=this,t=this.props,n=t.message,i=n.sender,o=n.content,a=n.time;if(!o||!o.message)return null;var r=t.isMobile?"#fff":getAgentMessageBackground(t.mainColor);return h("div",{className:"window__chatAgent clearfix",ref:function(t){e.container=t}},t.ifShowAvatar&&i.avatar&&h("div",{className:"agentMessage__avatar"},h(AvatarImage,{src:i.avatar,alt:i.name,className:"agentMessage__avatarImg"})),h("div",{className:index$4("chat-operator-message","window__chatAgentMessage",!t.ifShowAvatar&&"window__chatMessageNoAvatar"),style:{background:r}},!t.ifShowAvatar&&t.ifShowName&&i.name&&h("div",{className:"chat-operator-name window__chatAgentName"},i.name+":"),h("div",null,o.message)),h(MessageTime,{time:a,isMobile:t.isMobile}))},t}(Component),link$1=1,possibleAnswer=2,button$3=5,quickReply$1=6,ChatbotPossibleAnswer=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this.props.scrollDown;e(),registerAnimationEnd(this.container,e)},t.prototype.componentWillUnmount=function(){unregisterAnimationEnd(this.container,this.props.scrollDown)},t.prototype.render=function(){var e=this,t=this.props,n=t.message,i=n.sender,o=n.content,a=n.time,r=n.ifDisable,s=t.isMobile?"#fff":getAgentMessageBackground(t.mainColor);return h("div",{className:"window__chatAgent clearfix",ref:function(t){e.container=t}},t.ifShowAvatar&&i.avatar&&h("div",{className:"agentMessage__avatar"},h(AvatarImage,{src:i.avatar,alt:i.name,className:"agentMessage__avatarImg"})),h("div",{className:index$4("chat-operator-message","window__chatAgentMessage",!t.ifShowAvatar&&"window__chatMessageNoAvatar"),style:{background:s}},!t.ifShowAvatar&&t.ifShowName&&i.name&&h("div",{className:"chat-operator-name window__chatAgentName"},i.name+":"),o.message,h("ul",{className:index$4("chatMessage__questionList",r&&"window_botAnswer_richText--disable")},o.relatedQuestion.map(function(e,n){return h("li",{key:e.questionId},h("span",null,n+1+"."),h("a",{onClick:function(n){n.preventDefault(),n.stopPropagation(),r||t.onIntentLinkClick(e.questionId,e.questionName,2,0,o.botId)},href:"intent://"},e.questionName))}))),h(MessageTime,{time:a,isMobile:t.isMobile}))},t}(Component),goToIntent$1="goToIntent",link$2="link",webView="webView",ButtonsResponse=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.shouldComponentUpdate=function(e){return e.message!==this.props.message||e.ifDisable!==this.props.ifDisable},t.prototype.render=function(){var e=this.props,t=getVisitorMessageBackground(e.mainColor,.1);return h("div",{className:"window_buttons_container"},e.message.text&&h("div",{className:"window_buttons_text"},e.message.text),e.message.buttons&&e.message.buttons.length>0&&h("ul",{className:"window_buttons_item"},e.message.buttons.map(function(n){return h("li",{className:"link"!==n.type&&e.ifDisable&&"window_buttons_item--disable"},h("button",{style:{background:t},onClick:function(){"link"!==n.type&&e.ifDisable||e.onButtonResponseClick(n,e.message.formValues)}},n.text))})))},t}(Component),full="full",SignInResponse=function(e){var t=e.message,n=e.ifDisable,i=e.mainColor;return h(ButtonsResponse,{message:{buttons:[{type:"webView",text:t.signInText}],text:t.message},ifDisable:n,onButtonResponseClick:function(){e.onWebViewLinkClick({type:1===t.signInType?"ssoLogin":"customVariableLogin",title:t.signInText,size:"full",content:{url:t.url,customVariable:1===t.signInType?"":t.customVariable}})},mainColor:i})},FormResponse=function(e){var t=e.message,n=e.ifDisable,i=e.mainColor;return h(ButtonsResponse,{message:{buttons:[{type:"webView",text:t.formName}],text:t.message},ifDisable:n,onButtonResponseClick:function(){e.onWebViewLinkClick({type:"botForm",title:t.formName,size:"full",content:t})},mainColor:i})},LocationResponse=function(e){var t=e.message,n=e.ifDisable,i=e.mainColor;return h(ButtonsResponse,{message:{buttons:[{type:"webView",text:t.buttonText}],text:t.message},ifDisable:n,onButtonResponseClick:function(){e.onWebViewLinkClick({type:"location",title:t.buttonText,size:"full",content:{url:t.url}})},mainColor:i})},PureTextResponse=function(e){return h("div",null,e.text)},PromptResponse=function(e){var t=e.message;return h(PureTextResponse,{text:t.message})},FileResponse=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.shouldComponentUpdate=function(e){return e.message.name!==this.props.message.name||e.message.url!==this.props.message.url},t.prototype.render=function(){var e=this.props.message,t="File";return e.name&&(t=e.name),h("div",{className:"chat-operator-message window__chatAgentMessage--file"},h("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:{color:"transparent"}},t))},t}(Component),ImageResponse=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.shouldComponentUpdate=function(e){return e.message.name!==this.props.message.name||e.message.url!==this.props.message.url},t.prototype.render=function(){var e=this.props.message,t="Image";e.name&&(t=e.name);return h("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:{color:"transparent"}},h("img",{src:e.url,alt:t,style:{maxWidth:200,maxHeight:200}}))},t}(Component),link$3="link",video$3="video",videoIframe="videoIframe",PUSHPAGE_KEY="pushpage_list",RichTextResponse=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.handleLinkClick=i.handleLinkClick.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this;if(this.container){var t=this.container.querySelector('a[data-linktype="0"][data-pushpage=true][data-opentype="0"]');if(t){var n=getLocalStorage(),i=JSON.parse(n.getItem("pushpage_list")||"[]");i.some(function(t){return t===e.props.GUID})||this.props.chatStatus!==chatting||(this.handleLinkClick({target:t,preventDefault:function(){}}),i.push(this.props.GUID),n.setItem("pushpage_list",JSON.stringify(i)))}}},t.prototype.shouldComponentUpdate=function(e){return e.message!==this.props.message||e.GUID!==this.props.GUID||e.chatStatus!==this.props.chatStatus||e.ifDisable!==this.props.ifDisable},t.prototype.handleLinkClick=function(e){var t=e.target;if("A"===t.nodeName){if(this.props.KbHost&&this.props.onKbLinkClick){var n=this.props.KbHost,i=this.props.onKbLinkClick,o=t.href;if(new RegExp(n+"/kb/[\\d]+-[\\d]+-a[\\d]+","i").test(o)){return i(o.match(/\/kb\/[\d]+-[\d]+-a([\d]+)\/?/i)[1]), e.preventDefault(),!1}}var a=t.getAttribute("data-linktype");if(a){var r=t.getAttribute("href"),s=t.getAttribute("data-displaytext");if(e.preventDefault(),"0"===a){if(r){var d=t.getAttribute("data-opentype");"1"===d?global$2.open(r):"2"===d?global$2.location.href=r:this.props.onSideWindowLinkClick({url:r,type:"link",title:s})}}else if("1"===a){var c=t.getAttribute("data-intentid");this.props.onIntentLinkClick&&!this.props.ifDisable&&this.props.onIntentLinkClick(c,s,1)}return!1}}return!0},t.prototype.render=function(){var e=this,t=this.props,n=filterScriptTag(filterStyleTag(t.message));return h("div",{ref:function(t){e.container=t},className:t.ifDisable?"window_botAnswer_richText--disable":"",onClick:this.handleLinkClick,dangerouslySetInnerHTML:{__html:n}})},t}(Component),getQueryString$1=function(e,t){for(var n=e.toString(),i=n.indexOf("?"),o=n.substr(i+1),a=o.split("&"),r=0;r=e.data.length-1&&clearInterval(e.timer),e.state.showIndex===e.data.length-2){var t=e.props.scrollDown;t(),registerAnimationEnd(e.container,t)}e.setState({showIndex:e.state.showIndex+1})},1e3))}},t.prototype.componentWillUnmount=function(){this.timer&&(clearInterval(this.timer),unregisterAnimationEnd(this.container,this.props.scrollDown))},t.prototype.onRate=function(e){var t=this.props.message,n=t.content,i=n.GUID,o=n.intentId,a=n.question,r=n.botId;this.props.onRateClick(i,e,o,a,r)},t.prototype.onIntentLinkClick=function(e,t,n){var i=this.props.message,o=i.content,a=o.agentId,r=o.botId;this.props.onIntentLinkClick(e,t,n,a,r)},t.prototype.onButtonResponseClick=function(e,t){var n=e.type,i=e.text,o=e.intentId,a=e.linkUrl,r=e.openIn,s=e.openStyle,d=this.props.message,c=d.content,l=c.agentId,u=c.botId;"goToIntent"===n?this.props.onIntentLinkClick(o,i,5,l,u):"link"===n?"newWindow"===r?global$2.open(a):"currentWindow"===r?global$2.location.href=a:this.props.onSideWindowLinkClick({url:a,type:"link",title:i}):"webView"===n&&this.props.onWebViewLinkClick({type:"link",title:i,size:s,content:{url:a,botId:u,agentId:l,formValues:t},ifLoading:!0})},t.prototype.getComponents=function(){var e=this,t=this.props,n=t.message,i=objectWithoutProperties(t,["message"]),o=n.type,a=n.sender,r=n.content,s=n.time,d=n.disableRate,c=n.ifDisable,l=n.visitorRate,u=[],p=!1;return p=o!==chatbotGreeting&&r.ifRate,(u=r.intentAnswers)&&0!==u.length?(u=u.filter(function(e){return!("quickReply"===e.type&&!e.content.text)}),u.map(function(t,n){if(t.type===complex)return h(ChatbotHighConfidenceAnswer,_extends({type:chatbotConfidenceAnswer,message:{GUID:r.GUID,answer:t.content.text,ifSystem:!(p&&n===u.length-1)},sender:a,time:s},i,{onRateClick:e.onRate,onIntentLinkClick:e.onIntentLinkClick,ifDisable:c,disableRate:d,visitorRate:l}));var o={type:t.type,sender:a,content:t.content,time:s,ifDisable:c};return h(BotResponse,_extends({message:o,disableRate:d,visitorRate:l,showRate:p&&n===u.length-1},i,{onRateClick:e.onRate,onIntentLinkClick:e.onIntentLinkClick,onButtonResponseClick:e.onButtonResponseClick}))})):null},t.prototype.render=function(){var e=this;if(this.data=this.getComponents(),!this.data||0===this.data.length)return null;var t=this.props,n=t.message,i=t.ifShowAvatar,o=t.ifShowName,a=objectWithoutProperties(t,["message","ifShowAvatar","ifShowName"]),r=n.sender,s=n.time,d=n.notShowLoading,c=n.content,l=getLocalStorage(),u=JSON.parse(l.getItem("botConfidenceAnswerLoading_list")||"[]");if(d||1===this.data.length||isIE9||u.some(function(e){return e===c.GUID}))return h("div",{className:"botConfidenceAnswerDiv"},this.data);var p=this.data.filter(function(t,n){return n<=e.state.showIndex});return this.state.showIndex=0&&void 0===e.queuePosition)return null;if(a.indexOf("{estimatedWaitTime}")>=0&&(void 0===e.estimatedWaitTime||0===e.estimatedWaitTime))return null;for(;a.indexOf(queueSlot)>=0;)o===chatting||o===chatted?a=a.replace(queueSlot,lastQueuePosition):(a=a.replace(queueSlot,e.queuePosition),lastQueuePosition=e.queuePosition);for(;a.indexOf("{estimatedWaitTime}")>=0;)o===chatting||o===chatted?a=a.replace("{estimatedWaitTime}",lastEstimatedWaitTime):(a=a.replace("{estimatedWaitTime}",e.estimatedWaitTime),lastEstimatedWaitTime=e.estimatedWaitTime);return h(SystemText,{key:e.guid,type:e.type,message:a,windowStyle:n,scrollDown:i})}return null},renderPromptOfflineMessage=function(e,t){var n=t.gotoOfflineLinkText,i=t.onOfflineLinkClick,o=t.windowStyle,a=t.scrollDown;if(t.chatStatus===waiting){var r=[];if(e.content){for(var s=e.content.split(/{linkText}/gi),d=0;d0&&!this.props.ifHideBio&&this.props.onUpdateScrollStatus(!0),this.canUpdateHideBio&&0===t&&this.props.ifHideBio&&this.props.onUpdateScrollStatus(!1)}},t.prototype.beforeunload=function(){removeMediaChat(this.props.chatGuid)},t.prototype.scrollDown=function(){this.element&&(this.element.scrollTop=this.element.scrollHeight)},t.prototype.render=function(){var e=this,t=this.props,n=t.greeting,i=t.height,o=t.hasMobileSideWindow,a=t.isInputVisible,r=t.bottom,s=t.ifShowBio,d=(t.ifHideBio,objectWithoutProperties(t,["greeting","height","hasMobileSideWindow","isInputVisible","bottom","ifShowBio","ifHideBio"])),c=void 0,l=!1;if(d.windowStyle===bubble){l=!0;var u=0;if(this.element){var p=void 0,f=this.element.nextElementSibling;p=this.props.ifShowQuickReply?f.nextSibling:f,p&&"chat-input"===p.id&&(u=p.getBoundingClientRect().height)}if(d.isMobile){if(c=i-20,d.isIpad&&(c-=r),a&&(c-=Math.max(u,70)),o){c-=45}}else{c=i-(a?23:35)-r,a&&(c-=Math.max(u,47))}this.props.showAdaptiveMinimizeIcon&&(c-=105);this.props.ifShowQuickReply&&(c-=50)}d.isPrint&&(c="");var g=void 0;g="
 
"!==n&&!!n;var m=h("div",{className:"chat__greetingContainer"},h("div",{className:l?"chat-system-message window__chatSystemMessage":"greeting-message window__formGreeting"},h("div",{className:index$4(l&&"window__chatSystemMessageContent"),dangerouslySetInnerHTML:{__html:n}}))),b=h("div",null,g&&m,h(ChatContentMessages,_extends({},d,{scrollDown:this.scrollDown}))),w=h(ChatContentMessages,_extends({},d,{scrollDown:this.scrollDown}));return h("div",{ref:function(t){e.element=t},className:index$4("chat window__chat window__chat--animation",s?"window__chat--withBio":"window__chat--noBio",this.props.ifShowQuickReply&&"window__chat--withQuickReply"),onScroll:this.onScroll,onTouchEnd:this.onTouch,style:{maxHeight:c}},!(l&&d.isMobile)&&g&&m,l&&d.isMobile?b:w)},t}(Component),appendMessage$2=function(e,t){return{type:e,guid:uuid(),time:new Date,content:t,sender:{type:"visitor"}}},mapStateToProps$8=function(e){var t=getMessages(e),n=getInvolvedAgents(e).length,i=!0;t.filter(function(e){return"chatbotJoinChat"===e.type}).length>0&&(n+=1,i=!1);var o=isPoppedOut(e),a=getHeight(e),r=isMobile$1(e),s=getWindowId(e),d=getLanguage(e,"greetingChatWindow");!d||"
 
"!==d&&"
"!==d&&"
"!==d||(d="");var c=getOwnHost(e),l=getChatWindowIfCanDownloadChatDetail(e,s);return{siteId:getSiteId(e),KbHost:c,height:a,isPopout:o,isMobile:r,isIpad:isIPad(e),ifShowBio:getIfShowBio(e),hasMobileSideWindow:getifShowSideWindow(e)&&r,windowStyle:getWindowStyle(e,s),greeting:i?d||"":"",messages:t,ifShowName:n>1,gotoOfflineLinkText:getLanguage(e,"eventLinkText")||"here",startChatAgainText:getLanguage(e,"startChatAgain"),translatedTag:getLanguage(e,"translation"),originalTag:getLanguage(e,"original"),agentTypingText:getLanguage(e,"eventOperatorIsTyping"),chatStatus:getChatStatus(e),ifShowAvatar:getCurrentWindowStyle(e)===bubble||chatIfShowAvatar(e),chatGuid:getChatGuid(e),ifHideBio:getifHideBio(e),isInputVisible:isChatInputVisible(e),mainColor:getWindowMainColor(e),bottom:getBottom(e),showAdaptiveMinimizeIcon:showAdaptiveMinimizeIcon(e), showToolbox:getShowToolbox(e),onMounted:function(){emit("livechat.chat.display",s)},maxAgentReadId:getMaxAgentReadId(e),ifEnableVisitorSeeMsgSentSeen:getIfEnableVisitorSeeMsgSentSeen(e),msgNotSeenByAgent:getLanguage(e,"msgNotSeenByAgent"),isChattingWithAgent:getChatStatus(e)===chatting&&!getIsChatbot(e)||getChatStatus(e)===invited||getChatStatus(e)===waiting||getChatStatus(e)===chatted&&0!==getInvolvedAgents(e).length,languages:getLanguages$1(e),ifShowQuickReply:!!getQuickReply(e),agents:getChattedAgents(e),prechatDepartment:getPreChatDepartment(e),startTime:getChatStartTime(e),endTime:getChatEndTime(e),campaignId:getCampaignId(e),originalMessages:getWinMessages(e),chatWindowIfCanDownloadChatDetail:l}},mapDispatchToProps$6=function(e){return{submitSecureForm:function(t,n){var i=appendMessage$2("pendingSubmitSecureForm",""+t+splitter+n);e(sendChatMessages$2([i]))},cancelSecureForm:function(t){e(cancelForm(t));var n=appendMessage$2("pendingCancelSecureForm","");e(sendChatMessages$2([n]))},getSecureFormFailure:function(){var t=appendMessage$2("pendingGetSecureFormFailure","");e(sendChatMessages$2([t]))},onOfflineLinkClick:function(t){t.preventDefault(),e(showTab(offline))},onChatWithAgentClick:function(){e(fromChatbotToAgent$1())},onRateClick:function(t,n,i,o,a){e(chatBotAnswerHelpful$2(n,t,i,o,a))},onStartChatAgainClick:function(t){t.preventDefault(),e(startChatAgain$2())},onUpdateScrollStatus:function(t){e(contentScrollStatusUpdate$1(t))},onChatbotTimeout:function(t){e(chatbotTimeout$1(t))},onKbLinkClick:function(t){e(sendGetArticleByID$1(t))},onSideWindowLinkClick:function(t){var n=t.url,i=t.type,o=t.title,a=t.iframe;e(openBotSideWindow$1(n,i,o,a))},onCloseBotSignWindow:function(){e(closeBotSideWindow$1())},onWebViewLinkClick:function(t){e(openWebView$1(t))},onIntentLinkClick:function(t,n,i,o,a){e(chatBotSelectQuestion$2({id:t,name:n,clickType:i,agentId:o,botId:a}))}}},Content=connect(mapStateToProps$8,mapDispatchToProps$6)(Content$1),mapStateToProps$7=function(e){return{languages:getLanguages$1(e),content:Content,windowStyle:getCurrentWindowStyle(e),innerCss:getContentCss(getWindowMainColor(e),partial(resourceUrl,e))}},Print=connect(mapStateToProps$7,null)(Print$1),simpleIconGen$1=function(e,t){var n=function(t){function n(e){classCallCheck(this,n);var i=possibleConstructorReturn(this,t.call(this,e));i.onFocus=i.onFocus.bind(i);var o=function(){i.props.focus&&setTimeout(function(){return i.btn.focus()},0)};return i.componentDidMount=o,i.componentDidUpdate=o,i}return inherits(n,t),n.prototype.onFocus=function(){this.props.onFocus(this.props.focusKey)},n.prototype.render=function(){var t=this,n=this.props;return h("a",{role:"menuitem",onKeyDown:onKeyDownWrapper(n.onClick),onClick:n.onClick,tabIndex:n.focus?0:-1,onFocus:this.onFocus,onMouseEnter:this.onFocus,onTouchEnd:function(e){return e&&e.stopPropagation?(e.stopPropagation(),!0):(window.event.cancelBubble=!0,!1)},ref:function(e){t.btn=e}},h(IconSVG,{title:n.text,type:e}),h("div",{className:"menu__text-container"},n.text))},n}(Component);return n.displayName=t,n},config=void 0,chatGUID=void 0,recentMsgSentTime=[],visitorMsgRestritUnlockTimeKey="visitorMsgRestritUnlockTimeKey2",visitorMsgSentTimeKey="visitorMsgSentTimeKey",penaltyFactorKey="penaltyFactorKey",penaltyFactor=1,timeClockHandler=null,callback=void 0,messageTimeOutQueue=[],limitTimer=null,frequencyLimit={},setLimitState=void 0,getPersistent=function(e){var t=getChatInfo(chatGUID).frequencyLimit;return null==t?"":t[e]},updateFrequencyLimit=function(e,t){return frequencyLimit[visitorMsgRestritUnlockTimeKey]=getPersistent(visitorMsgRestritUnlockTimeKey),frequencyLimit[visitorMsgSentTimeKey]=getPersistent(visitorMsgSentTimeKey),frequencyLimit[penaltyFactorKey]=getPersistent(penaltyFactorKey),frequencyLimit[e]=t,frequencyLimit},stopTimeClock=function(){timeClockHandler&&(clearInterval(timeClockHandler),timeClockHandler=null)},init=function(){var e=(new Date).getTime(),t=getPersistent(visitorMsgSentTimeKey);if(void 0!==t&&null!==t&&""!==t){var n=!1;t.split(":").forEach(function(t){var i=new Date(+t);e-i<=1e3*config.penalty&&(recentMsgSentTime.push(+t),messageTimeOutQueue.push(setTimeout(clearMessage,1e3*config.penalty-(e-i))),n=!0)}),n&&setRecentMessageToCookie()}var i=getVisitorMsgRestrictUnlockTime();if(i&&e340,color:getFontColor(e),mainColor:getWindowMainColor(e),windowStatus:o,ifShowSideWindow:a,height:getHeight(e)},headerParts(i,e,n),{isMobile:v})},mapDispatchToProps$3=function(e){return{onMinimize:function(t){var n=prefixMapping[t];n&&emit(n+".minimize"),e(setWindowMinimized())},onClose:function(t){var n=prefixMapping[t];n&&emit(n+".close"),e(closeWindow$1())},onEndChat:function(){e(sendEndChat$1()),e(closeKnowledgeBase$1())},onUpdateScrollStatus:function(t){e(contentScrollStatusUpdate$1(t))}}},Header=connect(mapStateToProps$4,mapDispatchToProps$3)(Header$2),width={logo:"9.1,4.9 5.4,4.9 7.8,0.3 3,0.3 0,8 3.6,8 1.6,13.5",text:"M33.6,2.5c0.5,0.1,1,0.4,1.4,0.8c0.3-0.3,0.7-0.6,1-0.8c-0.5-0.6-1.3-1-2.1-1.2c-2.1-0.4-4.1,1-4.5,3c-0.4,2.1,1,4.1,3,4.5c0.9,0.2,1.7,0,2.4-0.3c-0.2-0.3-0.5-0.8-0.6-1.1c-0.5,0.1-1,0.2-1.6,0.1c-1.4-0.3-2.3-1.6-2-3C30.9,3.1,32.2,2.2,33.6,2.5z M23.1,6.2C23,6.6,22.9,7,22.8,7.3c-0.1-0.3-0.2-0.8-0.3-1.2l-1.1-3.4H20l2.1,5.6c0.1,0.2,0.1,0.2,0.1,0.3c0,0.2-0.5,1.4-1.8,1.9l0.3,1.1c0.3-0.1,0.9-0.3,1.4-0.8C22.8,10.1,23.3,9,24,7l1.4-4.2h-1.3L23.1,6.2zM38,3c-1.6,0-2.9,1.3-2.9,2.9c0,1.6,1.3,2.9,2.9,2.9s2.9-1.3,2.9-2.9C40.9,4.3,39.6,3,38,3z M38,7.7c-1,0-1.8-0.8-1.8-1.8S37,4.1,38,4.1s1.8,0.8,1.8,1.8S39.1,7.7,38,7.7z M17.7,2.6c-0.8,0-1.4,0.4-1.8,1L15.8,0h-1.3v8.8h1.1l0.1-0.9c0.4,0.7,1,1,1.8,1c1.2,0,2.5-1,2.5-3.2C20,3.8,19.1,2.6,17.7,2.6z M17.2,7.9c-0.9,0-1.4-0.7-1.4-1.5V5.2c0-0.8,0.6-1.6,1.4-1.6c1,0,1.5,1,1.5,2.1C18.7,7,18.2,7.9,17.2,7.9z M72.5,1.2c-1.1,0-2.6,0.8-2.6,3.8c0,3.1,1.6,3.8,2.6,3.8c1.2,0.1,2.6-0.7,2.6-3.8S73.6,1.2,72.5,1.2zM72.5,7.9C71.6,7.9,71,7,71,5s0.6-2.9,1.5-2.9S74,3,74,5S73.4,7.9,72.5,7.9z M66.4,1.2c-1.1,0-2.6,0.8-2.6,3.8c0,3.1,1.6,3.8,2.6,3.8C67.5,8.9,69,8.1,69,5S67.5,1.2,66.4,1.2z M66.3,7.9c-0.9,0-1.5-0.9-1.5-2.9s0.6-2.9,1.5-2.9c0.9,0,1.5,0.9,1.5,2.9S67.2,7.9,66.3,7.9z M57.7,3c-0.8,0-1.5,0.4-1.9,1.2c-0.1-0.4-0.2-0.7-0.5-0.9S54.7,3,54.3,3c-0.8,0-1.4,0.3-1.8,1V3.1h-1.2v5.8h1.2V5.8c0-0.6,0-1,0.3-1.3S53.3,4,53.7,4c0.7,0,1.1,0.5,1.1,1.6v3.2H56V5.7c0-0.5-0.1-0.9,0.2-1.2S56.8,4,57.1,4c0.4,0,0.7,0.1,0.9,0.4c0.2,0.3,0.3,0.7,0.3,1.3v3.1h1.2V5.4C59.5,3.8,59,3,57.7,3z M48.2,3c-0.8,0-1.5,0.4-1.9,1.2c-0.1-0.4-0.2-0.7-0.5-0.9S45.2,3,44.8,3C44,3,43.4,3.3,43,4V3.1h-1.2v5.7H43V5.7c0-0.5-0.1-0.9,0.2-1.2S43.7,4,44.1,4c0.7,0,1.1,0.5,1.1,1.6v3.2h1.2V5.7c0-0.5,0.2-0.9,0.4-1.2C47.1,4.2,47.4,4,47.7,4c0.4,0,0.7,0.1,0.9,0.4c0.2,0.3,0.3,0.7,0.3,1.3v3.1h1.2L50,5.4C50,3.8,49.5,3,48.2,3z M60.5,2.1h0.8v6.7h1V1.1h-1.8V2.1z",width:75.1}.width,PoweredBy$1=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.render=function(){var e=this.props,t=getLanguages(this.context);return h("div",{className:"poweredby"},h("a",{rel:"noopener noreferrer",target:"_blank",href:e.poweredByUrl,onClick:void 0,hrefLang:"en","aria-label":t.poweredBy},h("svg",{viewBox:"0 0 "+width+" 13.5",style:{width:width},focusable:"false"},h("polygon",{points:{logo:"9.1,4.9 5.4,4.9 7.8,0.3 3,0.3 0,8 3.6,8 1.6,13.5",text:"M33.6,2.5c0.5,0.1,1,0.4,1.4,0.8c0.3-0.3,0.7-0.6,1-0.8c-0.5-0.6-1.3-1-2.1-1.2c-2.1-0.4-4.1,1-4.5,3c-0.4,2.1,1,4.1,3,4.5c0.9,0.2,1.7,0,2.4-0.3c-0.2-0.3-0.5-0.8-0.6-1.1c-0.5,0.1-1,0.2-1.6,0.1c-1.4-0.3-2.3-1.6-2-3C30.9,3.1,32.2,2.2,33.6,2.5z M23.1,6.2C23,6.6,22.9,7,22.8,7.3c-0.1-0.3-0.2-0.8-0.3-1.2l-1.1-3.4H20l2.1,5.6c0.1,0.2,0.1,0.2,0.1,0.3c0,0.2-0.5,1.4-1.8,1.9l0.3,1.1c0.3-0.1,0.9-0.3,1.4-0.8C22.8,10.1,23.3,9,24,7l1.4-4.2h-1.3L23.1,6.2zM38,3c-1.6,0-2.9,1.3-2.9,2.9c0,1.6,1.3,2.9,2.9,2.9s2.9-1.3,2.9-2.9C40.9,4.3,39.6,3,38,3z M38,7.7c-1,0-1.8-0.8-1.8-1.8S37,4.1,38,4.1s1.8,0.8,1.8,1.8S39.1,7.7,38,7.7z M17.7,2.6c-0.8,0-1.4,0.4-1.8,1L15.8,0h-1.3v8.8h1.1l0.1-0.9c0.4,0.7,1,1,1.8,1c1.2,0,2.5-1,2.5-3.2C20,3.8,19.1,2.6,17.7,2.6z M17.2,7.9c-0.9,0-1.4-0.7-1.4-1.5V5.2c0-0.8,0.6-1.6,1.4-1.6c1,0,1.5,1,1.5,2.1C18.7,7,18.2,7.9,17.2,7.9z M72.5,1.2c-1.1,0-2.6,0.8-2.6,3.8c0,3.1,1.6,3.8,2.6,3.8c1.2,0.1,2.6-0.7,2.6-3.8S73.6,1.2,72.5,1.2zM72.5,7.9C71.6,7.9,71,7,71,5s0.6-2.9,1.5-2.9S74,3,74,5S73.4,7.9,72.5,7.9z M66.4,1.2c-1.1,0-2.6,0.8-2.6,3.8c0,3.1,1.6,3.8,2.6,3.8C67.5,8.9,69,8.1,69,5S67.5,1.2,66.4,1.2z M66.3,7.9c-0.9,0-1.5-0.9-1.5-2.9s0.6-2.9,1.5-2.9c0.9,0,1.5,0.9,1.5,2.9S67.2,7.9,66.3,7.9z M57.7,3c-0.8,0-1.5,0.4-1.9,1.2c-0.1-0.4-0.2-0.7-0.5-0.9S54.7,3,54.3,3c-0.8,0-1.4,0.3-1.8,1V3.1h-1.2v5.8h1.2V5.8c0-0.6,0-1,0.3-1.3S53.3,4,53.7,4c0.7,0,1.1,0.5,1.1,1.6v3.2H56V5.7c0-0.5-0.1-0.9,0.2-1.2S56.8,4,57.1,4c0.4,0,0.7,0.1,0.9,0.4c0.2,0.3,0.3,0.7,0.3,1.3v3.1h1.2V5.4C59.5,3.8,59,3,57.7,3z M48.2,3c-0.8,0-1.5,0.4-1.9,1.2c-0.1-0.4-0.2-0.7-0.5-0.9S45.2,3,44.8,3C44,3,43.4,3.3,43,4V3.1h-1.2v5.7H43V5.7c0-0.5-0.1-0.9,0.2-1.2S43.7,4,44.1,4c0.7,0,1.1,0.5,1.1,1.6v3.2h1.2V5.7c0-0.5,0.2-0.9,0.4-1.2C47.1,4.2,47.4,4,47.7,4c0.4,0,0.7,0.1,0.9,0.4c0.2,0.3,0.3,0.7,0.3,1.3v3.1h1.2L50,5.4C50,3.8,49.5,3,48.2,3z M60.5,2.1h0.8v6.7h1V1.1h-1.8V2.1z",width:75.1}.logo}),h("path",{d:{logo:"9.1,4.9 5.4,4.9 7.8,0.3 3,0.3 0,8 3.6,8 1.6,13.5",text:"M33.6,2.5c0.5,0.1,1,0.4,1.4,0.8c0.3-0.3,0.7-0.6,1-0.8c-0.5-0.6-1.3-1-2.1-1.2c-2.1-0.4-4.1,1-4.5,3c-0.4,2.1,1,4.1,3,4.5c0.9,0.2,1.7,0,2.4-0.3c-0.2-0.3-0.5-0.8-0.6-1.1c-0.5,0.1-1,0.2-1.6,0.1c-1.4-0.3-2.3-1.6-2-3C30.9,3.1,32.2,2.2,33.6,2.5z M23.1,6.2C23,6.6,22.9,7,22.8,7.3c-0.1-0.3-0.2-0.8-0.3-1.2l-1.1-3.4H20l2.1,5.6c0.1,0.2,0.1,0.2,0.1,0.3c0,0.2-0.5,1.4-1.8,1.9l0.3,1.1c0.3-0.1,0.9-0.3,1.4-0.8C22.8,10.1,23.3,9,24,7l1.4-4.2h-1.3L23.1,6.2zM38,3c-1.6,0-2.9,1.3-2.9,2.9c0,1.6,1.3,2.9,2.9,2.9s2.9-1.3,2.9-2.9C40.9,4.3,39.6,3,38,3z M38,7.7c-1,0-1.8-0.8-1.8-1.8S37,4.1,38,4.1s1.8,0.8,1.8,1.8S39.1,7.7,38,7.7z M17.7,2.6c-0.8,0-1.4,0.4-1.8,1L15.8,0h-1.3v8.8h1.1l0.1-0.9c0.4,0.7,1,1,1.8,1c1.2,0,2.5-1,2.5-3.2C20,3.8,19.1,2.6,17.7,2.6z M17.2,7.9c-0.9,0-1.4-0.7-1.4-1.5V5.2c0-0.8,0.6-1.6,1.4-1.6c1,0,1.5,1,1.5,2.1C18.7,7,18.2,7.9,17.2,7.9z M72.5,1.2c-1.1,0-2.6,0.8-2.6,3.8c0,3.1,1.6,3.8,2.6,3.8c1.2,0.1,2.6-0.7,2.6-3.8S73.6,1.2,72.5,1.2zM72.5,7.9C71.6,7.9,71,7,71,5s0.6-2.9,1.5-2.9S74,3,74,5S73.4,7.9,72.5,7.9z M66.4,1.2c-1.1,0-2.6,0.8-2.6,3.8c0,3.1,1.6,3.8,2.6,3.8C67.5,8.9,69,8.1,69,5S67.5,1.2,66.4,1.2z M66.3,7.9c-0.9,0-1.5-0.9-1.5-2.9s0.6-2.9,1.5-2.9c0.9,0,1.5,0.9,1.5,2.9S67.2,7.9,66.3,7.9z M57.7,3c-0.8,0-1.5,0.4-1.9,1.2c-0.1-0.4-0.2-0.7-0.5-0.9S54.7,3,54.3,3c-0.8,0-1.4,0.3-1.8,1V3.1h-1.2v5.8h1.2V5.8c0-0.6,0-1,0.3-1.3S53.3,4,53.7,4c0.7,0,1.1,0.5,1.1,1.6v3.2H56V5.7c0-0.5-0.1-0.9,0.2-1.2S56.8,4,57.1,4c0.4,0,0.7,0.1,0.9,0.4c0.2,0.3,0.3,0.7,0.3,1.3v3.1h1.2V5.4C59.5,3.8,59,3,57.7,3z M48.2,3c-0.8,0-1.5,0.4-1.9,1.2c-0.1-0.4-0.2-0.7-0.5-0.9S45.2,3,44.8,3C44,3,43.4,3.3,43,4V3.1h-1.2v5.7H43V5.7c0-0.5-0.1-0.9,0.2-1.2S43.7,4,44.1,4c0.7,0,1.1,0.5,1.1,1.6v3.2h1.2V5.7c0-0.5,0.2-0.9,0.4-1.2C47.1,4.2,47.4,4,47.7,4c0.4,0,0.7,0.1,0.9,0.4c0.2,0.3,0.3,0.7,0.3,1.3v3.1h1.2L50,5.4C50,3.8,49.5,3,48.2,3z M60.5,2.1h0.8v6.7h1V1.1h-1.8V2.1z",width:75.1}.text}))))},t}(Component),PoweredBy=renderWindow("footer.poweredby")(PoweredBy$1),Footer$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.focusInput=i.focusInput.bind(i),i}return inherits(t,e),t.prototype.focusInput=function(){var e=this.container.ownerDocument,t=e.querySelector("#chat-input textarea");t&&t.focus()},t.prototype.render=function(){var e=this,t=this.props;return h("div",{ref:function(t){e.container=t},className:index$4("footer window__footer",!t.poweredByUrl&&!t.showChatWithAgent&&"footer--empty"),style:t.style,onTouchMove:pauseEvent,onClick:this.focusInput},t.poweredByUrl&&h(PoweredBy,t),t.showChatWithAgent&&h("button",{onClick:t.onChatWithAgentClick,className:"window__chatWithAgent window__chatWithAgent--bottom"},t.chatWithAgentText))},t}(Component),Footer$2=renderWindow("footer")(Footer$1),mapStateToProps$11=function(e){var t=isMobile$1(e),n=t||isRemovePoweredby(e)?null:getPoweredByUrl();return{tab:getWindowTab(e),poweredByUrl:n,showChatWithAgent:!1,chatWithAgentText:getLanguage(e,"buttonChatbotChatWithAgent")}},mapDispatchToProps$9=function(e){return{onChatWithAgentClick:function(){e(fromChatbotToAgent$1())}}},Footer=connect(mapStateToProps$11,mapDispatchToProps$9)(Footer$2),facebookInit$1="facebook-init",facebookLogin$1="facebook-login",ssoLogin$2="sso-login",setLocation$3="setLocation",closeLocation="closeLocation",customVariableLogin$1="customVariableLogin",webViewLinkDone="webViewLinkDone",cache$1={},getCrossDomain=memoize(5)(function(e){return loadResource("iframe",{src:e,style:{display:"none"}},document.body).then(function(t){function n(e){var t=e.data,n=o(t);if(n&&cache$1[n.meta]){var i=cache$1[n.meta],a=i.reject,r=i.resolve;n.error?a(n.payload):r(n.payload)}}var i=crossDomain(t.contentWindow,e),o=function(e){try{return JSON.parse(e)}catch(e){return}};return i.subscribe(n),i})}),facebookInit$$1=function(e,t){return execute({type:"facebook-init",payload:e},t)},facebookLogin$$1=function(e){return execute({type:"facebook-login"},e)},loading$3=function(e,t){return function(n){function i(e){classCallCheck(this,i);var t=possibleConstructorReturn(this,n.call(this,e));return t.state={status:"loading"},t}return inherits(i,n),i.prototype.componentDidMount=function(){var t=this;e().then(function(){t.setState({status:"done"})},function(){t.setState({status:"error"})})},i.prototype.render=function(){var e=getLanguages(this.context);return"loading"===this.state.status?h(IconSVG,{type:"loading",className:"svg--loading",viewBox:"0 0 100 100","aria-label":e.loading,"aria-busy":"true"}):"done"===this.state.status?h(t,this.props):null},i}(Component)},facebook=1,_configMapping,configMapping=(_configMapping={},_configMapping[1]={text:"Facebook",color:"#39599C",svg:"M 7.5 4.6 h 1.2 V 2.2 H 6.8 c -2.3 0 -3.1 1.1 -3.1 3.1 v 1.4 H 2.3 v 2.4 h 1.4V 16 h 2.8 V 9.1 h 1.9 l 0.2 -2.4 H 6.6 V 5.5 C 6.6 4.9 6.6 4.6 7.5 4.6 Z",id:"fb-login"},_configMapping),SocialLoginButton=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.btn.style.backgroundColor;this.btn.style.backgroundColor="initital",setTimeout(function(){e.btn&&(e.btn.style.backgroundColor=t)},0)},t.prototype.render=function(){var e=this,t=this.props,n=configMapping[t.type];return h("button",{className:index$4("prechatForm__socialBtn",t.isSimpleIcon&&"socialBtn--simple"),onClick:t.onClick,id:n.id,style:{backgroundColor:n.color},title:n.text,"aria-label":n.text,ref:function(t){e.btn=t}},h("svg",{viewBox:"0 0 16 16",focusable:"false"},h("path",{d:n.svg})),h("span",null,n.text))},t}(Component),Greeting=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.shouldComponentUpdate=function(e){return e.prefix!==this.props.prefix||e.greeting!==this.props.greeting},t.prototype.render=function(){var e=this.props;return h("div",{className:"greeting-message window__formGreeting",id:e.prefix+"-greeting",dangerouslySetInnerHTML:{__html:e.greeting}})},t}(Component),Greeting$1=renderWindow("greeting")(Greeting),inputTypes=[name,email,"company","phone",comment,"content","subject","text","textarea"],getSocialCache=memoize(1)(function(e,t,n,i,o,a){if(!e)return null;var r=void 0,s=t+"&key="+i;if(e){var d=loading$3(partial(facebookInit$$1,e,s),SocialLoginButton);r=h(d,{type:1,onClick:function(){return facebookLogin$$1(s).then(n)},isSimpleIcon:a})}else r=null;return renderWindow("social")(function(){return h("div",{id:"social-logins",className:index$4("prechatForm__login",a&&"form-fields--horizonal","form-fields")},h("div",{className:"box-field"},h("div",{className:"field-name clearfix"},h("span",{className:"lang-sign-in-with system LanguagePreChatSocialMediaSignInWith prechatForm__signinwith field__label"},o.preChatSocialMediaSignInWith)),h("span",{id:"social-login-icons",className:"float-left box-icons prechatForm__social field-control"},r)),h("div",{className:"box-hor-or"},h("span",{className:"LanguagePreChatSocialMediaOr hor-or prechatForm__divide"},o.preChatSocialMediaOr)))})}),getSocial=function(e,t){var n=e.facebookAppId,i=e.iframeSrc,o=e.onLogin,a=e.languages,r=e.isHorizontal;return getSocialCache(n,i,o,t,a,r)},FormContainer=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={animated:!1,isAnimationEnd:!1},i.social=null,i.key=+new Date,i.social=getSocial(n,i.key),i.onAnimated=i.onAnimated.bind(i),i.onAnimationEnd=i.onAnimationEnd.bind(i),i.onScroll=i.onScroll.bind(i),i.canUpdateHideBio=!0,i}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.onMounted(),setTimeout(function(){e.element&&(e.element.scrollTop=0)},0),isIE&&this.onAnimationEnd(),registerAnimationEnd(this.animation,this.onAnimationEnd);var t=this.props.fields,n=t&&t.findIndex(function(e){return inputTypes.indexOf(e.type)>=0});n>=0&&!this.props.isMobile&&this.props.onFocus&&setTimeout(function(){e.props.onFocus(t[n])},1e3),registerAnimationEnd(this.animation,this.onAnimated)},t.prototype.componentWillReceiveProps=function(e){this.social=getSocial(e,this.key)},t.prototype.componentDidUpdate=function(e){var t=this,n=e.ifHideBio;this.props.ifHideBio!==n&&(this.canUpdateHideBio=!1,setTimeout(function(){t.canUpdateHideBio=!0},625))},t.prototype.componentWillUnmount=function(){unregisterAnimationEnd(this.animation,this.onAnimated),unregisterAnimationEnd(this.animation,this.onAnimationEnd)},t.prototype.onAnimated=function(){this.setState({animated:!0})},t.prototype.onAnimationEnd=function(){this.setState({isAnimationEnd:!0})},t.prototype.onScroll=function(e){if(!(window.navigator.userAgent.toLowerCase().indexOf("msie 9.0")>=0)&&this.props.tab!==prechat){var t=e.currentTarget.scrollTop;this.canUpdateHideBio&&t>0&&!this.props.ifHideBio&&this.props.onUpdateScrollStatus(!0),this.canUpdateHideBio&&0===t&&this.props.ifHideBio&&this.props.onUpdateScrollStatus(!1)}},t.prototype.render=function(){var e=this,t=this.props,n=t.prefix,i=t.greeting,o=t.submitStatus,a=t.onChange,r=t.onBlur,s=t.onFocus,d=t.isHorizontal,c=t.buttonText,l=t.siteId,u=t.style,p=t.error,f=t.windowStyle,g=t.disabled,m=t.tab,b=t.height,w=t.languages,v=t.isMobile,y=t.onError,C=t.onValidateAll,_=t.onSubmit,x=t.mainColor,S=t.bottom,k=t.showAdaptiveMinimizeIcon,A=t.isIPad,M=t.fields,T=t.isPopout,I=t.hasPoweredBy,P=t.ifShowSideWindow,W=t.captchaSettings,D=t.languageTag,R=t.isEmbeddedWindow,$=void 0,O=this.state.isAnimationEnd?"auto":"hidden";if(f===bubble){var E=v?20:30,N=I?35:0;if($=b-E,v||($-=N),!v||A){$-=S;k&&($-=105)}if(A){P&&($-=45)}v&&!A&&($="100%")}var F=getAgentMessageBackground(x),L=M;return isEdge&&(L=[{type:"text",isHidden:!0,value:"",error:""}].concat(L)),f===bubble?h("div",{className:"window__formContainer window__formContainer--bubble",style:{maxHeight:$,overflowY:O},ref:function(t){e.element=t}},h("div",{className:index$4("form window__form",!this.state.isAnimationEnd&&"window__form--animation"),id:n+"-window",ref:function(t){e.animation=t},style:!v&&{background:F}},p&&h("div",{className:"window__formError"},p),i&&h("div",{className:"greeting-message-container"},h(Greeting$1,{prefix:n,greeting:i,tab:m})),this.social&&h(this.social,{tab:m}),h(Form,{onSubmit:_,onChange:a,onError:y,onBlur:r,onFocus:s,onValidateAll:C,fieldId:n+"-fields",isHorizontal:d,tab:m,fields:L,siteId:l,disabled:g,windowStyle:u,languages:w,submitStatus:o,buttonText:c,style:{background:F},captchaSettings:W,languageTag:D}))):h("div",{onScroll:this.onScroll,className:index$4("form window__form",!this.state.isAnimationEnd&&"window__form--animation",(T||!R)&&"window__form_popout"),id:n+"-window",style:{maxHeight:$},ref:function(t){e.element=t,e.animation=t}},h("div",null,p&&h("div",{className:"window__formError"},p),i&&h(Greeting$1,{prefix:n,greeting:i,tab:m}),this.social&&h(this.social,{tab:m}),h(Form,{onSubmit:_,onChange:a,onError:y,onBlur:r,onFocus:s,onValidateAll:C,fieldId:n+"-fields",isHorizontal:d,tab:m,fields:L,siteId:l,disabled:g,windowStyle:u,languages:w,submitStatus:o,buttonText:c,captchaSettings:W,languageTag:D})))},t}(Component),Form$3=validation(FormContainer),form=function(e){var t="";return"prechat"===e?t="livechat.prechat":"postchat"===e?t="livechat.postChat":"offline"===e&&(t="livechat.offlineMessage"),connect(function(n){var i="prechat"===e,o=getIsChinaIp(n),a=i&&isFacebookEnabled(n),r=a&&!o?getFacebookAppId(n):void 0,s=void 0;"prechat"===e?s=prechat:"postchat"===e?s=postchat:"offline"===e&&(s=offline);var d=isPoppedOut(n),c=getHeight(n),l=getWindowId(n),u=getFields(n,e,l),p=getDisbaled(n);"offline"===e&&0===u.length&&(p=!0);var h=getLanguages$1(n),f=getWindowMainColor(n),g=isMobile$1(n),m=!g&&!isRemovePoweredby(n)&&!!getPoweredByUrl(),b=getLanguageTag(n),w=isEmbeddedWindow(n,l),v=isHorizontal(n),y=getWindowStyle(n,l),C=g&&isSafari&&getIfKBChatwithAgentClicked(n)||v&&y===bubble||getIfKBChatwithAgentClicked(n)&&isSafari&&isRightToLeft(n),_=Object.assign({},getCaptchaSettings(n),{isCompact:C});return{height:c,isPopout:d,tab:s,fields:u,prefix:e,facebookAppId:r,iframeSrc:resourceUrl(n,"/html/socialIframe.93bf3adc7e190efd5a6657dfb1b5d7a6e8907a08.html?origin="+location$1.origin+"&id="+(window.frameElement?window.frameElement.id:"id")),captchaSettings:_,submitStatus:getSubmitStatus(n,e),greeting:getGreeting(n,e),isHorizontal:v,buttonText:getButtonText(n,e),hCallback:void 0,siteId:getSiteId(n),style:getCurrentWindowStyle(n),error:getError(n),windowStyle:getWindowStyle(n,l),disabled:p,isMobile:g,isIPad:isIPad(n),languages:h,languageTag:b,ifHideBio:getifHideBio(n),mainColor:f,bottom:getBottom(n),hasPoweredBy:m,showAdaptiveMinimizeIcon:showAdaptiveMinimizeIcon(n),ifShowSideWindow:getifShowSideWindow(n),onMounted:function(){emit(t+".display",l)},isEmbeddedWindow:w}},function(n){return{onChange:function(i,o){n(updateValue(e,i.id,o)),emit(t+".field.change",_extends({},i,{value:o}))},onError:function(t,i){n(updateError(e,t.id,i))},onBlur:function(i){n(blur(e,i.id)),emit(t+".field.blur",_extends({},i,{isFocused:!1}))},onFocus:function(i){n(focus(e,i.id)),emit(t+".field.focus",_extends({},i,{isFocused:!0}))},onLogin:function(t){n(submitSocial$1(e,t))},onSubmit:function(t){return n(submit$1(e,1500,t))},onValidateAll:function(e){n(validateAll(formType,e))},onUpdateScrollStatus:function(e){n(contentScrollStatusUpdate$1(e))}}})(Form$3)},PreChatForm=form("prechat"),KBsearch$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={draft:"",isInputError:!1},i.ime=!1,i.trySearch=i.trySearch.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this;this.timer=setTimeout(function(){e.element&&!e.props.isMobile&&e.element.focus(),e.timer=null},1e3)},t.prototype.componentWillUnmount=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},t.prototype.onchange=function(e){this.state.draft!==e&&this.setState({draft:e,isInputError:!1})},t.prototype.trySearch=function(e){if(e&&e.preventDefault(),this.state.draft.match(/^\s*$/))return void this.setState({draft:"",isInputError:!0});this.props.onSearchKB(this.state.draft)},t.prototype.render=function(){var e=this,t=this.props.isMobile&&!this.props.showMobileSidewindow&&this.props.ifShowExpand,n=this.props.windowStyle===bubble,i=this.props,o=i.height,a=i.isMobile,r=i.isIPad,s=i.bottom,d=i.showAdaptiveMinimizeIcon,c=void 0;if(n){if(c=o-30,a||(c-=35),!a||r){c-=s;d&&(c-=105),r&&(c=Math.max(470,c))}}var l=n&&!a?getAgentMessageBackground(this.props.mainColor):void 0,u=n&&a?"#f0f1f2":l,p=n&&!a?"hidden":void 0,f=a&&!isIphone&&!r&&o<280,g=[this.props.ifShowChatwithAgent&&!f&&h("div",{className:index$4("form-bottom","kbsearch-window__chatWithAgent",this.props.showMobileSidewindow&&"kbsearch-window__chatWithAgent-mobile-bubble")},this.props.error&&h(AlertDialog,{message:this.props.error,type:"error",onClose:this.props.onErrorClose}),h(ButtonProgress,{onClick:this.props.kbOnChatwithAgent,text:this.props.kbChatwithAgent})),this.props.ifShowLeaveMessage&&!f&&h("div",{className:"form-bottom kbsearch-window__chatWithAgent"},this.props.error&&h(AlertDialog,{message:this.props.error,type:"error",onClose:this.props.onErrorClose}),h(ButtonProgress,{onClick:this.props.kbOnLeaveMessage,text:this.props.kbLeaveMessage}))],m=getLanguages(this.context),b=f?0:"",w=n&&!a?{overflowY:p,paddingBottom:b,maxHeight:c}:{overflowY:p,paddingBottom:b},v=function(){return h("div",{className:"kbsearch__container",style:w},h("div",{className:index$4("form","window__form","kbsearch-window__form",e.props.isMobile&&"kbsearch-mobile",e.props.showMobileSidewindow&&"mobileSidewindow")},h("div",{className:"greeting-message window__formGreeting greeting-message__kb"},e.props.greetingMessage),h("div",{className:"kbsearch-input__container"},h("form",{action:"",onSubmit:e.trySearch},h("input",{className:index$4("input","kbsearch-input",e.state.isInputError&&""===e.state.draft&&"error"),type:"search",value:e.state.draft,ref:function(t){e.element=t},onCompositionStart:function(){e.ime=!0},onCompositionEnd:function(t){e.ime=!1;var n=t.target.value;e.onchange(n)},onInput:function(t){if(!e.ime){var n=t.target.value;e.onchange(n)}},onKeyDown:function(t){isEnterKey(t)&&!e.props.isMobile&&(t.preventDefault(),e.trySearch())},"aria-label":m.kbSearchText})),h("button",{className:"kbsearch-icon","aria-label":m.search,onClick:e.trySearch},h(Icon,{disabled:!1,color:e.props.color,type:IconFonts.search}))),h("div",{className:"article-list-container"},!t&&h("div",{className:"article-list"},e.props.articles&&e.props.articles.map(function(t){return h("div",{className:"article-item"},h("button",{className:"article-title",onClick:function(){e.props.articleOnClick(t.id)}},h("span",{dangerouslySetInnerHTML:{__html:t.title}})),h("div",{className:"article-summary",dangerouslySetInnerHTML:{__html:t.summary}}))})),e.props.notFound&&h("div",null,m.noResult),e.props.isLoading&&h(IconSVG,{type:"loading",className:"svg--loadingChat",viewBox:"0 0 100 100","aria-label":m.loading,"aria-busy":"true"}))),!n&&g)};return n?function(){return h("div",{className:index$4("window__kb_formContainer",!e.props.hasPoweredBy&&"kbsearch--noFooter"),style:{background:u}},h("div",{className:"window__formContainer window__formContainer--bubble",style:{overflowY:"hidden",paddingLeft:0,paddingRight:0,marginTop:0}},v()),g)}():v()},t}(Component),mapStateToProps$12=function(e){var t=getCampaignId(e),n=getkbGreetingMessage(e),i=isOnline(e,t),o=getLanguage(e,"buttonKBChatWithAgent"),a=!isOnline(e,t),r=getLanguage(e,"buttonKBLeaveMessage"),s=getkbArticles(e),d=isMobile$1(e),c=getWindowStyle(e,getWindowId(e)),l=getError(e),u=getkbNotFound(e),p=getkbIsLoading(e),h=getkbNotShowContent(e),f=getHeight(e),g=isPoppedOut(e),m=getShowChatWindowInSidewindow(e),b=getifShowSideWindow(e),w=isIPad(e),v=getWindowMainColor(e),y=showAdaptiveMinimizeIcon(e),C=getBottom(e),_=!d&&!isRemovePoweredby(e)&&!!getPoweredByUrl();return _extends({},{height:f,isPopout:g,greetingMessage:n,ifShowChatwithAgent:i,kbChatwithAgent:o,ifShowLeaveMessage:a,kbLeaveMessage:r,articles:s,isMobile:d,color:"#bbb",windowStyle:c,error:l,notFound:u,isLoading:p,notShowContent:h,showMobileSidewindow:m,ifShowExpand:b,isIPad:w,mainColor:v,showAdaptiveMinimizeIcon:y,bottom:C,hasPoweredBy:_})},mapDispatchToProps$10=function(e){return{kbOnChatwithAgent:function(){e(replaceSideWindowTab$1("kbSearch","bubble")),e(fromKBToAgent$1())},kbOnLeaveMessage:function(){e(replaceSideWindowTab$1("kbSearch","bubble")),e(showTab(offline))},articleOnClick:function(t){e(articleOnClick(t))},onSearchKB:function(t){e(sendGetArticles$1(t))},onErrorClose:function(){e(hideError())}}},KBsearch=connect(mapStateToProps$12,mapDispatchToProps$10)(KBsearch$1),PostChatForm=form("postchat"),OfflineForm=form("offline"),PreLoginForm=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={animated:!1},i.animated=function(){i.setState({animated:!0})},i}return inherits(t,e),t.prototype.componentDidMount=function(){registerAnimationEnd(this.container,this.animated)},t.prototype.componentWillUnmount=function(){unregisterAnimationEnd(this.container,this.animated)},t.prototype.render=function(){var e=this,t=this.props,n=this.props.windowStyle===bubble,i=n&&!t.isMobile?getAgentMessageBackground(t.mainColor):void 0,o=h("div",{id:"prelogin-window",className:index$4("ssologin window__form",!this.state.animated&&"window__ssologin--animation","window__ssologin"),ref:function(t){e.container=t},style:{background:i}},t.errorMsg&&h("div",{className:"error ssologin__error window__ssologinError"},t.errorMsg),h("div",{id:"prelogin-login-greeing",className:"LanguagePromptIfLogin ssologin__greeting window__ssologinGreeting"},t.promptIfLogin),h("div",{className:"form-bottom window__ssologinForm"},h("button",{id:"sso-login",className:"btn btn-primary LanguageButtonLoginAsUser window__ssologinOperation",onClick:t.onLoginClick},t.buttonLogin),h("button",{id:"chat-as-visitor",className:"btn btn-primary LanguageButtonChatAsVisitor window__ssologinOperation",onClick:t.onNotNowClick},t.buttonNotNow)));return n?h("div",{className:"window__formContainer window__formContainer--bubble"},o):o},t}(Component),mapStateToProps$13=function(e){return{ windowStyle:getWindowStyle(e,getCampaignId(e)),errorMsg:getError(e),promptIfLogin:getLanguage(e,"promptIfLogin"),buttonLogin:getLanguage(e,"buttonLoginAsUser"),buttonNotNow:getLanguage(e,"buttonChatAsVisitor"),mainColor:getWindowMainColor(e),isMobile:isMobile$1(e)}},mergeProps$1=function(e,t){var n=t.dispatch;return _extends({},e,{onNotNowClick:function(){n(sendSkipLogin$1()),n(sendWebAction$1())},onLoginClick:function(){n(showTab("ssoLogin"))}})},PreLogin=connect(mapStateToProps$13,null,mergeProps$1)(PreLoginForm),tryParse$1=function(e){try{return JSON.parse(e)}catch(e){return}},SSOLogin$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));i.eventListener=i.eventListener.bind(i),i.state={reload:0},i.origin="";var o=getQueryString(n.url,"returnUrl");return o&&(i.origin=o.match(/^[^:]+:\/\/[^/]+/)[0]),i}return inherits(t,e),t.prototype.componentDidMount=function(){if(this.iframe){var e=crossDomain(this.iframe.contentWindow,this.origin,!0);this.unsubscribe=e.subscribe(this.eventListener)}},t.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe()},t.prototype.eventListener=function(e){if(e.data){var t=tryParse$1(e.data);if(!t)return;"sso-login"===t.type&&(t.payload?this.props.handleSSOInfo(t.payload):this.props.ifShowPreLogin?this.props.gotoPreLogin():this.setState({reload:this.state.reload+1}))}},t.prototype.render=function(){var e=this,t=this.props,n=this.props.targetUrl.match(/^[^:]+:\/\/[^/]+/)[0],i=t.url+encodeURIComponent("?target="+n),o=i+"&color=ffffff&r="+this.state.reload,a=getLanguages(this.context);return h("div",{className:"window__ssoLogin"},h("iframe",{ref:function(t){e.iframe=t},frameBorder:0,src:o,title:a.loginWin}))},t}(Component),mapStateToProps$14=function(e){return{url:getSSOUrl(e),ifShowPreLogin:getIfShowPreLogin(e),targetUrl:location$1.href}},mergeProps$2=function(e,t){var n=t.dispatch;return _extends({},e,{handleSSOInfo:function(e){n(sendSubmitSSOInfo$1(e))},gotoPreLogin:function(){n(showTab(login))}})},SSOLogin=connect(mapStateToProps$14,null,mergeProps$2)(SSOLogin$1),TextArea$3=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.ime=!1,i.refCallback=i.refCallback.bind(i),i}return inherits(t,e),t.prototype.shouldComponentUpdate=function(e){var t=this.props,n=!!this.textarea&&this.textarea.value===e.value,i=t.value!==e.value&&!n;return!this.ime&&(i||t.isMobile!==e.isMobile||t.isDisabled!==e.isDisabled||t.placeHolder!==e.placeHolder)},t.prototype.refCallback=function(e){this.textarea=e,this.props.refCb(e)},t.prototype.render=function(){var e=this,t=this.props;return h("div",{className:"textareaContainer"},h("textarea",{id:"chat-input-control",ref:t.refCb,className:"window__chatInputControl",autoFocus:!t.isMobile,value:t.value,disabled:t.isDisabled,placeholder:t.placeHolder,"aria-label":t.placeHolder,onFocus:t.onFocus,onBlur:t.onBlur,onCompositionStart:function(){e.ime=!0},onCompositionEnd:function(n){e.ime=!1;var i=n.target.value;t.update(i)},onInput:function(n){if(!e.ime){var i=n.target.value;t.update(i)}},onKeyDown:function(e){isEnterKey(e)&&!t.isMobile?(e.preventDefault(),t.onSend()):isCopyKey(e)&&!t.isMobile&&t.isDragEnabled&&t.onCopy()},onPaste:t.isDragEnabled&&t.onPaste,rows:1}))},t}(Component),Toolbox=function(e){return h("div",{className:"chat-input__toolbox"},e.icons.map(function(e){return h(e,{key:e&&e.displayName})}))},MobileToolbox=function(e){return 0===e.icons.length?h("div",null):h("div",null,h("button",{onClick:e.toggle,"aria-label":e.more,className:"window__chatSender window__chatTools"},h("svg",{viewBox:"0 0 27 27",focusable:"false"},h("path",{d:"M23.1,3.9c-2.6-2.6-6-4-9.6-3.9c-3.5-0.1-7,1.4-9.5,3.9S0,9.9,0,13.5c-0.1,3.6,1.4,7.1,3.9,9.6c2.5,2.6,5.9,3.9,9.4,3.9c0.1,0,0.3,0,0.4,0c3.5,0,6.9-1.5,9.3-3.9c2.6-2.6,4-6,3.9-9.6C27.2,9.9,25.7,6.4,23.1,3.9zM22.6,22.6c-2.4,2.5-5.7,3.7-9,3.7h-0.1c-3.3,0-6.6-1.4-8.9-3.7c-2.5-2.4-3.7-5.7-3.7-9s1.3-6.7,3.7-9c2.4-2.5,5.7-3.8,9-3.7c3.4,0,6.7,1.3,9,3.7c2.5,2.4,3.8,5.7,3.7,9l0,0C26.3,16.9,25,20.2,22.6,22.6z"}),h("path",{d:"M22,13.3h-8V5c0-0.5-0.2-0.7-0.4-0.7s-0.3,0.3-0.4,0.8v8.1h-8c-0.5,0-0.7,0.2-0.7,0.3s0.2,0.3,0.7,0.4h8v8c0,0.5,0.2,0.7,0.4,0.7c0.3,0,0.4-0.2,0.4-0.7v-8h8.1c0.5-0.1,0.7-0.2,0.7-0.4S22.5,13.3,22,13.3z"}))))},ImagePaste=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={src:""},i}return inherits(t,e),t.prototype.componentWillMount=function(){var e=this;readAsDataURL(this.props.imageFile).then(function(t){return e.setState({src:h("img",{src:t,alt:"paste temp"})})})},t.prototype.componentDidUpdate=function(){this.container&&!this.props.isMobile&&this.container.focus()},t.prototype.render=function(){var e=this;return h("div",{ref:function(t){e.container=t},className:"pasteImageContainer",contentEditable:!0,onKeyDown:function(t){return isBackspaceKey(t)||isDelKey(t)?e.props.onClose():isEnterKey(t)&&e.props.onSend(),t.preventDefault(),!1}},h("div",{className:"pasteImage",contentEditable:"false"},this.state.src),h("div",{className:"pasteImageClose",contentEditable:"false"},h("a",{role:"button",onClick:this.props.onClose,"aria-label":"Close",className:"",title:"Close"},h(IconSVG,{type:"close"}))))},t}(Component),ChatInput$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={isDragged:!1,draft:n.pendingMessage?n.pendingMessage.text:"",textareaFocused:!n.isDisabled&&!n.isMobile,isAnimationEnd:!1,show:!1,isShowPasteImage:!1,imageFile:null},i.container=null,i.checkVideoComing=!1,i.trySend=i.trySend.bind(i),i.trySendFile=i.trySendFile.bind(i),i.onBlur=i.onBlur.bind(i),i.onFocus=i.onFocus.bind(i),i.onAnimationEnd=i.onAnimationEnd.bind(i),i.update=i.update.bind(i),i.adjustScroll=i.adjustScroll.bind(i),i.toggle=i.toggle.bind(i),i.onPasteImage=i.onPasteImage.bind(i),i.onClosePasteImage=i.onClosePasteImage.bind(i),i.onCopy=i.onCopy.bind(i),initconfig(n.limits.frequency,n.chatGUID,n.frequencyLimitClocker,n.frequencyLimitState),i}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this;if(registerAnimationEnd(this.container,this.onAnimationEnd),this.onDragOver=function(t){t.preventDefault(),e.props.isDragEnabled&&e.setState({isDragged:!0})},this.onDragLeave=function(t){t.preventDefault(),e.props.isDragEnabled&&(e.container.contains(t.target)&&e.container!==t.target||e.setState({isDragged:!1}))},this.onDrop=function(t){if(t.preventDefault(),e.props.isDragEnabled){e.setState({isDragged:!1});var n=t.target.files||t.dataTransfer.files||t.dataTransfer.items;if(t.dataTransfer.items){var i=t.dataTransfer.items[0];if(i&&i.webkitGetAsEntry&&!i.webkitGetAsEntry().isFile)return void e.props.onError("notSupported")}n&&1===n.length&&e.trySendFile(n[0])}},!this.props.isMobile){var t=this.container.ownerDocument;t.addEventListener("dragover",this.onDragOver),t.addEventListener("dragleave",this.onDragLeave),t.addEventListener("drop",this.onDrop),this.timer=setTimeout(function(){e.inputElement&&!e.props.isMobile&&e.inputElement.focus(),e.timer=null},1e3)}this.props.pendingMessage&&(this.props.pendingMessage.ifDirectlySendOut&&this.trySend(),this.props.onRemovePending()),this.pasteTemp&&!this.props.isMobile&&this.pasteTemp.addEventListener("paste",this.onPasteImage)},t.prototype.componentWillReceiveProps=function(e){this.props.chatStatus!==chatted&&e.chatStatus===chatted&&(clear(),this.setState({draft:""})),this.props.pendingMessage!==e.pendingMessage&&e.pendingMessage&&this.setState({draft:e.pendingMessage.text||this.state.draft})},t.prototype.componentDidUpdate=function(e,t){var n=this,i=this.props;this.props.pendingMessage&&(this.props.pendingMessage.ifDirectlySendOut&&this.trySend(),this.props.onRemovePending()),e.chatGUID!==i.chatGUID&&initconfig(i.limits.frequency,i.chatGUID,i.frequencyLimitClocker,i.frequencyLimitState),t.draft===this.state.draft&&e.isMobile===i.isMobile||this.adjustScroll(),i.videoIncoming?this.checkVideoComing||(this.checkVideoComing=!0,setTimeout(function(){n.inputElement&&i.isMobile&&n.inputElement.blur()},50)):this.checkVideoComing=!1,this.props.onToolboxToggle(this.state.show)},t.prototype.componentWillUnmount=function(){if(this.container){var e=this.container.ownerDocument;e.removeEventListener("dragOver",this.onDragOver),e.removeEventListener("dragLeave",this.onDragLeave),e.removeEventListener("drop",this.onDrop)}this.pasteTemp&&this.pasteTemp.removeEventListener("paste",this.onPasteImage),this.timer&&clearTimeout(this.timer),stopTimeClock(),unregisterAnimationEnd(this.container,this.onAnimationEnd)},t.prototype.onFocus=function(){var e={textareaFocused:!0};this.state.textareaFocused||(e.show=!1),this.setState(e)},t.prototype.onBlur=function(){this.setState({textareaFocused:!1})},t.prototype.onAnimationEnd=function(){this.setState({isAnimationEnd:!0})},t.prototype.onPasteImage=function(e){var t=this;e.preventDefault();var n=null;if(!((n=isIE?global$2.clipboardData:e.clipboardData)&&n.getData))return!1;var i=null;if(i=isIE?n.getData("Text"):n.getData("text/plain")){var o=this.state.draft+i;setTimeout(function(){t.inputElement.focus(),t.update(o)},0)}else{var a=null;if(a=isIE?n.files[0]:n.items[0].getAsFile(),!isImageFile(a))return!1;this.setState({isShowPasteImage:!0,imageFile:a})}return!1},t.prototype.onClosePasteImage=function(){this.setState({isShowPasteImage:!1,imageFile:null})},t.prototype.onCopy=function(){this.pasteTemp.focus()},t.prototype.toggle=function(){this.setState({show:!this.state.show})},t.prototype.adjustScroll=function(){var e=this.inputElement,t=this.container.ownerDocument.querySelector(".window__chat"),n=!1;t&&(n=t.scrollTop+t.clientHeight===t.scrollHeight),e&&(e.style.overflowY="auto",e.style.height="auto",e.style.height=e.scrollHeight+"px"),n&&(t.scrollTop=t.scrollHeight)},t.prototype.trySend=function(){if(this.state.isShowPasteImage)return this.trySendFile(this.state.imageFile),void this.onClosePasteImage();var e=this.state.draft;if(isValidTextToSendOut(e)){var t=this.props;if(t.ifChattingWithBot){if(getStringRealLength(e)>256)return}if(e.length>t.maxLength)return void t.onError("maxLengh");var n=canSendMessage();if(n.isLimited)return void t.onError("limited",{seconds:n.waitSecond});var i=t.isCreditCardMasking?cardnumber(e):e;t.onSend(i,i!==e),this.setState({draft:""});var o=this.inputElement;o&&(o.value="",o.focus())}},t.prototype.trySendFile=function(e){var t=this.props,n=canSendMessage();if(n.isLimited)return void t.onError("limited",{seconds:n.waitSecond});t.isSendingFile||t.onSendFile(e,t.chatGUID)},t.prototype.update=function(e){if(this.state.draft!==e){var t=this.props,n="";if(t.isShowTypingContent){n=e,n.length>500&&(n=n.substr(0,500)+"..."),t.isCreditCardMasking&&(n=cardnumber(n))}t.onVisitorIsTyping(n),this.setState({draft:e})}},t.prototype.render=function(){var e=this,t=this.props,n=t.isMobile,i=""!==this.state.draft||this.state.isShowPasteImage,o=!1,a=!1,r=0;if(t.ifChattingWithBot){var s=getStringRealLength(this.state.draft);256-s<=10&&(a=!0,r=256-s),s>256&&(o=!0)}var d=i||0===t.icons.length,c=getLanguages(this.context);return h("div",{id:"chat-input",ref:function(t){e.container=t},className:index$4("window__chatInput","chatInputContainer",!this.state.isAnimationEnd&&"chatInputContainer--fadeInUp",t.mobileFootIcons&&"chatInputContainer--withplus",(i||this.state.textareaFocused)&&"chatInputContainer--active",i&&"chatInputContainer--typed",this.state.isDragged&&!t.isSendingFile&&"window__chatInput--Drag icon icon-drag")},h("div",{className:index$4("chat-input__controlbox",t.isDisabled&&"chat-input__controlbox--disabled",a&&"chat-input__controlbox--limit",0===t.icons.length?"chat-input__controlbox--noTool":"")},this.state.isShowPasteImage?h(ImagePaste,{imageFile:this.state.imageFile,onClose:this.onClosePasteImage,isMobile:t.isMobile,onSend:this.trySend}):h(TextArea$3,{refCb:function(t){e.inputElement=t},isMobile:t.isMobile,value:this.state.draft,isDisabled:t.isDisabled,placeHolder:t.placeHolder,onFocus:this.onFocus,onBlur:this.onBlur,update:this.update,onSend:this.trySend,onCopy:this.onCopy,onPaste:this.onPasteImage,isDragEnabled:t.isDragEnabled}),h("div",{ref:function(t){e.pasteTemp=t},className:"pasteImageTemp",contentEditable:!0}),d&&!o?h("div",null,h("button",{onClick:this.trySend,"aria-label":c.send,className:"window__chatSender window__chatSender--active"},h(IconSVG,{type:"send"}))):h(n?MobileToolbox:Toolbox,{icons:t.icons,toggle:this.toggle,more:c.more}),a&&h("span",{className:"chat-input__limitNumSpan"},r)),this.state.show&&n&&!d&&h("div",{className:"chat-input__toolbox"},t.icons.map(h)),t.warning&&h(AlertDialog,{message:t.warning,type:"warning",onClose:t.onWarningClose}),t.error&&h(AlertDialog,{message:t.error,type:"error",onClose:t.onErrorClose}))},t}(Component),SendFile$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={active:!1,file:null,disabled:!1},i.onFileChange=i.onFileChange.bind(i),i}return inherits(t,e),t.prototype.onFileChange=function(e){var t=this;e&&(this.tempfile=e,this.setState({disabled:!0}),this.props.onSubmit(this.tempfile,this.props.chatGuid).catch(function(e){return t.file&&(t.file.value=""),t.setState({disabled:!1}),""}).then(function(){t.file&&(t.file.value=""),t.setState({disabled:!1})}))},t.prototype.render=function(){var e=this,t=this.props,n=this.props.languages,i=useIframeSendFile(),o=this.state.disabled||t.disabled;return h("button",{className:o&&"chat-input__icon--disabled",title:n.buttonSendFile,"aria-label":n.buttonSendFile,onClick:function(){e.state.active||o||e.file.click()}},h(IconSVG,{id:"iconSendFile",type:"sendfile",active:this.state.active}),!i&&h("input",{type:"file",style:{display:"none"},onChange:function(t){return e.onFileChange(t.target.files[0])},ref:function(t){t&&(e.file=t)}}),i&&h(CrossDomainAttachment,{style:{display:"none"},onChange:function(t){return e.onFileChange(t)},onMounted:function(t){e.file=t}}))},t}(Component),mapStateToProps$16=function(e){return{languages:getLanguages$1(e),disabled:getIsFrequencyLimited(e)||isSendingFile(e),chatGuid:getChatGuid(e)}},mapDispatchToProps$12=function(e){return{onSubmit:function(t,n){return e(visitorSendFile$2(t,n))}}},SendFile=connect(mapStateToProps$16,mapDispatchToProps$12)(SendFile$1),simpleIconGen$3=function(e,t){var n=function(t){return h("button",{className:t.disabled&&"chat-input__icon--disabled",onClick:!t.disabled&&t.onClick,"aria-label":t.text,tabIndex:t.disabled?-1:0,title:t.text},h(IconSVG,{title:t.text,type:e}))};return n.displayName=t,n},AudioChat=simpleIconGen$3("audio","AudioChat"),mapStateToProps$17=function(e){return{disabled:getIsVideoAudio(e)||getIsFrequencyLimited(e)||!getAgentisSupportWebrtc(e),text:getLanguage(e,"buttonAudioChat")}},mapDispatchToProps$13=function(e){return{onClick:function(){e(requestAudio())}}},Audio$1=connect(mapStateToProps$17,mapDispatchToProps$13)(AudioChat),VideoChat=simpleIconGen$3("video","VideoChat"),mapStateToProps$18=function(e){return{disabled:getIsVideoAudio(e)||getIsFrequencyLimited(e)||!getAgentisSupportWebrtc(e),text:getLanguage(e,"buttonVideoChat")}},mapDispatchToProps$14=function(e){return{onClick:function(){e(requestVideo())}}},Video$2=connect(mapStateToProps$18,mapDispatchToProps$14)(VideoChat),mapStateToProps$15=function(e){var t=getWindowCampaign(e),n=getWindowId(e),i=getWindowTabItems(e),o=(i||[]).some(function(e){return"voice"===e.id||"media"===e.id}),a=isSendFileEnabled(e)&&!isSendingFile(e)&&!!getChatToolUpload(e,t.id)&&e.window.chatStatus===chatting,r=getWindowStyle(e,n),s=r===classic,d=isMobile$1(e),c=getifShowSideWindow(e)&&d,l=isChattingWithBot(e),u=getShowChatWindowInSidewindow(e),p=getifShowSideWindow(e),h=getPendingMessage(e);return{isMobile:d,videoIncoming:o,isClassic:s,hasMobileSideWindow:c,chatWindowType:t.style,placeHolder:getLanguage(e,"promptPressEnterToSend"),isCreditCardMasking:getHideCreditCard(e),isShowTypingContent:getShowTypingContent(e),isDragEnabled:a,isDisabled:!getIsChatInputEnabled(e),chatGUID:getChatGuid(e),limits:{fileSize:getFileSizeLimit(e)*Math.pow(2,20),frequency:getFrequencyLimit(e)},icons:getIcons(e),error:getError(e),warning:getWarning(e),chatStatus:getChatStatus(e),isSendingFile:isSendingFile(e),ifChattingWithBot:l,showMobileSidewindow:u,ifShowExpand:p,maxLength:getMessageLengthLimit(e),pendingMessage:h,hasBackground:!!getWindowBackground(e)}},mapDispatchToProps$11=function(e){return{onSend:function(t,n){emit("livechat.chat.visitor.input",t),e(visitorSendText$1(t,n))},onSendFile:function(t,n){return e(visitorSendFile$2(t,n))},onError:function(t,n){e(chatInputWarning$1(t,n))},frequencyLimitClocker:function(t){e(t<=0?hideWarning():chatInputWarning$1("limited",{seconds:t,fromClocker:!0}))},frequencyLimitState:function(t){e(setFrequencyLimitState$1(t))},onVisitorIsTyping:function(t){e(setVisitorIsTyping$1(t))},onChatWithAgentClick:function(){e(fromChatbotToAgent$1())},onWarningClose:function(){e(hideWarning())},onErrorClose:function(){e(hideError())},onRemovePending:function(){e(removePendingMessage())},onToolboxToggle:function(t){e(toggleToolbox$1(t))}}},ChatInput=connect(mapStateToProps$15,mapDispatchToProps$11)(ChatInput$1),getAddWithForSideWindow=function(){return window.outerWidth+480>screen.availWidth?screen.availWidth>window.outerWidth?screen.availWidth-window.outerWidth:0:480},SideWindow$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.tabs={},i.onReadNewMsg=i.onReadNewMsg.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this;if(this.props.isPoppedOut){var t=getPageInfo(),n=t.popout;if(!n||!n.isLarged){var i=getAddWithForSideWindow();i>0&&global$2.resizeTo(global$2.outerWidth+i,global$2.outerHeight),updatePageInfo({popout:_extends({},n,{SideWinWidth:i,isLarged:!0})})}}this.props.components.forEach(function(t){var n=t.key,i=t.callback;if(i){var o=e.tabs[n];o.innerHTML="",o.appendChild(i())}}),registerAnimationEnd(this.element,this.props.sideWindowOnAnimated),emit("livechat.sideWindow.show"),emit("livechat.sideWindow.tabs.switch",this.props.selectedTab),this.props.isMobile||registerActivityListener(this.element,this.onReadNewMsg,this.props.isMobile)},t.prototype.componentDidUpdate=function(e){var t=this;if(this.props.selectedTab!==e.selectedTab){emit("livechat.sideWindow.tabs.switch",this.props.selectedTab),this.props.components.forEach(function(e){var n=e.key,i=e.callback;if(i){var o=t.tabs[n];o.innerHTML="",o.appendChild(i())}});var n=this.tabs[this.props.selectedTab];if(n&&"bot"===this.props.selectedTab){var i=parseInt(n.style.width,10)-.1;n.style.width=i+"%",setTimeout(function(){n.style.width=i+.1+"%"},50)}}},t.prototype.componentWillUnmount=function(){if(this.props.isPoppedOut){var e=getPageInfo(),t=e.popout;t.SideWinWidth&&t.SideWinWidth>0&&global$2.resizeTo(global$2.outerWidth-t.SideWinWidth,global$2.outerHeight),updatePageInfo({popout:_extends({},t,{SideWinWidth:-1,isLarged:!1})})}this.props.updateSideWindowNoScroll&&this.props.updateSideWindowNoScroll(),unregisterAnimationEnd(this.element,this.props.sideWindowOnAnimated),emit("livechat.sideWindow.hide"),removeActivityListener(this.element,this.onReadNewMsg,this.props.isMobile)},t.prototype.onReadNewMsg=function(){this.props.chatStatus===chatting&&this.props.onReadNewMsg()},t.prototype.render=function(){var e=this,t=this.props,n="circular"===t.cornerStyle,i=t.components.length,o=getLanguages(this.context);if(!t.isMobile)for(var a=0;a1&&h("div",{className:index$4("mediaChatWindowSwitch","mediaChatWindowSwitch-box-show","voice"===t.selectedTab||"media"===t.selectedTab?"sidewindow-icons-div-dark":"sidewindow-icons-div-light")},h("div",{className:"mediaChatWindowSwitch-div-box-show"},t.components.map(function(n){var i=n.key,a=n.isSystem,r=n.iconActive,s=n.icon,d=n["aria-label"],c=i===e.props.selectedTab;return!t.isMobile&&i in chatWindowStyles?"":h("button",{className:index$4("sidetWindowSwitch-button","voice"===t.selectedTab||"media"===t.selectedTab?"sidetWindowSwitch-button-dark":"sidetWindowSwitch-button-light"),onClick:function(){e.props.onTabSelect(i),i in chatWindowStyles&&e.props.onReadNewMsg()},onTouchEnd:function(){e.props.onTabSelect(i)},"aria-label":d},a&&h(IconSVG,{type:t.isMobile&&i in chatWindowStyles?"chat":EnumSVGType[i],className:index$4("svg-sidewindow-icon",c&&(!t.isMobile||t.isIPad&&!t.isPoppedOut)&&("voice"===i||"media"===i?"svg-sidewindow-icon-select-dark":"svg-sidewindow-icon-select-light"),c&&(t.isMobile&&!t.isIPad||t.isIPad&&t.isPoppedOut)&&("voice"===i||"media"===i?"svg-sidewindow-icon-select-dark-mobile":"svg-sidewindow-icon-select-light-mobile")),viewBox:"-5 -5 25 25"}),!a&&h("span",null,h("img",{className:"imgIcon",alt:"tab icon",src:i===e.props.selectedTab?r:s})),"bubble"===i&&t.unread>0&&h("span",{className:"mediaChatWindowSwitch__messageCount","aria-label":o.unread},t.unread))}))))},t}(Component),Avatar=function(e){return h("div",null,h("div",{className:"mediaChatWindow__agentImg"},h(AvatarImage,{src:e.avatar,alt:e.name,className:"mediaChatWindow__avatarImg"})),h("div",{className:"mediaChatWindow__agentName"},e.name))},_classMapper,showAcceptButton=function(e){return"audioIncoming"===e||"videoIncoming"===e},isVideo=function(e){return"videoChatting"===e||"videoIncoming"===e||"videoRequesting"===e},isAudio=function(e){return"audioChatting"===e||"audioIncoming"===e||"audioRequesting"===e},isChatting=function(e){return"audioChatting"===e||"videoChatting"===e},diffTime=function(e,t){if(0===t)return"";if(e<=t)return"";var n=e-t,i=parseInt(n/1e3,10),o=parseInt(i/86400,10),a=parseInt(i%86400/3600,10),r=parseInt(i%86400%3600/60,10),s=parseInt(i%86400%3600%60,10);return(o>0?o+".":"")+(a>=10?a+":":a<10&&a>0?"0"+a+":":0===a&&o>0?"00":"")+(r<10?"0"+r+":":r+":")+(s<10?"0"+s:s)},classMapper=(_classMapper={},_classMapper.audioChatting="mediaChatWindow--audioChatting",_classMapper.audioIncoming="mediaChatWindow--audioIncoming",_classMapper.audioRequesting="mediaChatWindow--audioRequesting",_classMapper.videoChatting="mediaChatWindow--videoChatting",_classMapper.videoIncoming="mediaChatWindow--videoIncoming",_classMapper.videoRequesting="mediaChatWindow--videoRequesting",_classMapper),AudioVideoChat=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return isChatting(n.audioVideoChatStatus)?i.state={timespan:diffTime((new Date).getTime(),n.audioVideoChatStartTime)}:i.state={timespan:""},i}return inherits(t,e),t.prototype.componentWillMount=function(){this.startClock()},t.prototype.componentDidMount=function(){this.props.onMounted(this.localVideoContainer,this.remoteVideoContainer)},t.prototype.componentWillUnmount=function(){clearInterval(this.clock),this.props.onWillUnmount()},t.prototype.startClock=function(){var e=this;this.clock=setInterval(function(){return e.setState({timespan:diffTime((new Date).getTime(),e.props.audioVideoChatStartTime)})},1e3)},t.prototype.render=function(){var e=this,t=this.props,n=isVideo(t.audioVideoChatStatus),i=isAudio(t.audioVideoChatStatus),o=isChatting(t.audioVideoChatStatus),a=this.state.timespan,r=showAcceptButton(t.audioVideoChatStatus),s=i?t.audioChatText:t.videoChatText,d=getLanguages(this.context),c=void 0;c=r?n?d.refuseVideo:d.refuseAudio:n?d.stopVideo:d.stopAudio;var l=t.height>340;return h("div",{id:"media-chat-window",className:index$4("mediaChatWindow",classMapper[t.audioVideoChatStatus])},h("div",{className:"mediaChatWindow__requesting",style:{display:o?"none":"block"}},l&&h(Avatar,{name:t.name,avatar:t.avatar}),h("div",{className:"mediaChatWindow__waiting"},h("div",{className:i?"mediaChatWindow__textAudio":"mediaChatWindow__textVideo"},h("span",{className:index$4("mediaChatWindow__iconfont icon",i&&"icon-voice",n&&"icon-video")}),h("div",{className:"mediaChatWindow__chatTypeText"},s)),h("div",{className:"mediaChatWindow__waitingAni"},h("span",null,"."),h("span",null,"."),h("span",null,"."))),h("div",{className:"mediaChatWindow__buttons"},h("button",{className:"mediaChatWindow__button",onClick:t.onRefuseClick,"aria-label":c},h(IconSVG,{type:"refuse",viewBox:"0 0 55 55"})),r&&h("button",{className:"mediaChatWindow__button",onClick:function(){return t.onAcceptClick(e.localVideoContainer,e.remoteVideoContainer)},"aria-label":n?d.acceptVideo:d.acceptAudio},h(IconSVG,{type:"accept",viewBox:"0 0 55 55"})))),h("div",{className:"mediaChatWindow__chatting",style:{display:o?"flex":"none"}},h("div",{className:"mediaChatWindow__chattingAgent"},h(Avatar,{name:t.name,avatar:t.avatar}),h("div",{className:"mediaChatWindow__chattingTime"},h("span",{className:index$4("mediaChatWindow__iconfont icon",i&&"icon-voice",n&&"icon-video")}),h("div",{className:"mediaChatWindow__chatTypeText"},s),h("div",{className:"mediaChatWindow__chattingDuration"},a))),h("div",{style:{display:n?"block":"none",width:"100%"}},h("div",{ref:function(t){e.localVideoContainer=t},className:"mediaChatWindow__localVideo",id:"mediaChatWindow__localVideo","aria-label":d.video}),h("div",{ref:function(t){e.remoteVideoContainer=t},className:"mediaChatWindow__remoteVideo",id:"mediaChatWindow__remoteVideo","aria-label":d.video}),h(IconSVG,{className:"mediaChatWindow__loading",type:"loading",viewBox:"0 0 110 110","aria-busy":"true","aria-label":n?d.videoLoading:d.audioLoading})),h("div",{className:"mediaChatWindow__buttons"},h("button",{className:"mediaChatWindow__button",onClick:t.onRefuseClick,"aria-label":c},h(IconSVG,{type:"refuse",viewBox:"0 0 55 55"})))))},t}(Component),mapStateToProps$20=function(e){return{name:getAudioVideoAgentName(e),avatar:getAudioVideoAgentAvatar(e),audioVideoChatStartTime:getAudioVideoChatStartTime(e),audioVideoChatStatus:getVideoStatus(e),videoChatText:getLanguage(e,"videoChatCalling"),audioChatText:getLanguage(e,"audioChatCalling"),height:getHeight(e)}},mapDispatchToProps$16=function(e){return{onAcceptClick:function(t,n){e(acceptAudioVideoChat$1(t,n))},onRefuseClick:function(){e(hangupAudioVideoChat$1())},onMounted:function(t,n){e(prepareP2pChat$1(t,n))},onWillUnmount:function(){e(hideAudioVideoChat$1())}}},VideoChat$1=connect(mapStateToProps$20,mapDispatchToProps$16)(AudioVideoChat),Confirmation=function(e){return h("div",{className:"mediaChatWindow"},h("div",{className:"sideWindow__content sideWindow__content--cobrowsing"},e.height>340&&h("div",null,h("img",{src:e.icon,alt:e.type})),h("div",{className:"sideWindow__contentText"},h("span",null,e.text)),h("div",{className:"sideWindow__contentSubText",dangerouslySetInnerHTML:{__html:e.subhtml}}),h("div",{className:"sideWindow__btn"},h("button",{className:"mediaChatWindow__button",onClick:e.onRefuse,"aria-label":e.refuseText},h(IconSVG,{type:"deny",viewBox:"0 0 55 55"})),h("button",{className:"mediaChatWindow__button",onClick:e.onAccept,"aria-label":e.acceptText},h(IconSVG,{type:"confirm",viewBox:"0 0 55 55"})))))},mapStateToProps$21=function(e){var t=getLanguageTag(e);return{text:getLanguageCobrowseAgentWait(e),subhtml:getLanguageCobrowseNotes(e),icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH4AAABOCAMAAADRh1IXAAAAV1BMVEVHcEzm8eTW7Pcyn9nS0tL////S0tLS0tLS0tLS0tKCunng4N+Qk49/hINSVVKHk5lydHT6+vpNUVOhqajAyL6zxM3S5/DY6Obi6uGcnp7HyMfV2NpjaGhpq1JNAAAACnRSTlMA////Lv//9LYsld9DHwAAAUpJREFUaN7t2lFugzAQBFCg2NDGBlwAYej9z1nHnxGbxNaIVcTON9KLd1EYIYqibhsNSNN+FxmpIXj8AXUG32pY2gy+wfFNBq+BET6V/4JFeOGF/xS+gkV44QH8Mi4ks+wa1g4Jvvc95S8a2A4J/lf5nuB3ZDskeWUIXyPbIc1TPrQfPeEJ/zTeHfqn8crZA1//wPKCD/7MxztrBy7e+V2N/cwz/L916AflBiZ+7MbKbmqzPHy1VNU8bB3T6WPmg/v+RJ74zy9hEf7SvEoNwa/jyskbb1ZGvlPesPLKmEz+lhCaT/axp0/20XyiD+edNejdP1zwlA/+xHf6ezvk4mM7NBPP7kM7NPd2OPHsPrTDMrZDntOXa1lOoR0yDT9mSrnv8TzfIyeTTw+Sz3gXdm1ewSL8R/K39Mjwr7D7ty6Q4cvuZfjCM3xq8w/Z9YjcDdQmOAAAAABJRU5ErkJggg==",type:"cobrowsing",acceptText:languages[t].acceptCobrowsing,refuseText:languages[t].refuseCobrowsing,height:getHeight(e)}},mapDispatchToProps$17=function(e){return{onAccept:function(){e(acceptCobrowse())},onRefuse:function(){e(refuseCobrowse())}}},CoBrowsing=connect(mapStateToProps$21,mapDispatchToProps$17)(Confirmation),openLinkInNewTab=function(e){for(var t=e;t&&"BODY"!==t.nodeName;){if("A"===t.nodeName)return t.target="_blank",void(t.rel="noopener noreferrer");t=t.parentNode}},openImageInNewTab=function(e){if("IMG"===e.nodeName){for(var t=e.parentNode;t&&"BODY"!==t.nodeName;){if("A"===t.nodeName)return void openLinkInNewTab(t);t=t.parentNode}var n=e.src;window.open(n)}},handleLinkClick=function(e){var t=e.target;openLinkInNewTab(t),openImageInNewTab(t)},KB$1=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.componentDidMount=function(){updateImage(this.content)},t.prototype.componentDidUpdate=function(){updateImage(this.content)},t.prototype.render=function(){var e=this,t=this.props,n=getLanguages(this.context);return h("div",{className:"sideWindow__webview"},h("button",{className:"webview__close",onClick:t.onClose,"aria-label":n.closeSideWin},h(IconSVG,{type:"close"})),!t.isLoading&&h("div",{className:"webview__content",onScroll:this.onScroll,ref:function(t){e.content=t}},t.isKbAvailable?h("div",{onClick:handleLinkClick,dangerouslySetInnerHTML:{__html:t.content}}):h("div",{className:"webview__error"},h("img",{alt:n.kbNotFound,src:t.img404}),h("div",{className:"oops"},"Oops!"),h("div",{className:"message"},n.noPage))),t.isLoading&&h("div",{className:"webview__loading"},h(IconSVG,{type:"loading",className:"svg--loadingChat",viewBox:"0 0 100 100","aria-label":n.loading,"aria-busy":"true"})),h("div",{className:"webview__content--fill"}))},t}(Component),mapStateToProps$22=function(e){var t={};t.showChatWindowInSidewindow=getShowChatWindowInSidewindow(e);var n=getActiveKnowledgebaseArticle(e);if(n)if(t.isKbAvailable=n.title,t.isKbAvailable){var i=n.title?n.title.replace(/<\/?span[^>]*>/gi,""):"";t.content=i?"

"+i+"

"+n.body:n.body}else t.content="

404

",t.img404=images(partial(absoluteURL,e),"404.png");else t.isLoading=!0;return t},mapDispatchToProps$18=function(e){return{onClose:function(){e(closeKnowledgeBase$1())}}},KB=connect(mapStateToProps$22,mapDispatchToProps$18)(KB$1),BotSideWindowContent$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.updateIframe=i.updateIframe.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){this.updateIframe()},t.prototype.shouldComponentUpdate=function(e){return this.props.url!==e.url||this.props.type!==e.type||this.props.title!==e.title||this.props.iframe!==e.iframe},t.prototype.componentDidUpdate=function(){this.updateIframe(10)},t.prototype.componentWillUnmount=function(){this.iframe&&this.iframe.setAttribute("src","")},t.prototype.updateIframe=function(e){var t=this;this.iframe&&setTimeout(function(){t.iframe.setAttribute("src",t.props.url)},e||400)},t.prototype.render=function(){var e=this,t=this.props,n=getLanguages(this.context);return h("div",{className:"sideWindow__webview"},h("button",{className:"webview__close","aria-label":n.closeSideWin,onClick:t.onClose},h(IconSVG,{type:"close"})),h("div",null,"video"===t.type&&h("div",{ className:"webview__content"},h(Video,{url:t.url,canPlay:!0})),"link"===t.type&&h("div",{className:"webview__iframe"},h("iframe",{ref:function(t){e.iframe=t},frameBorder:0,title:n.extendedView,src:"",style:{width:"100%",height:"100%"}})),"videoIframe"===t.type&&h("div",{className:"webview__content"},h("div",{dangerouslySetInnerHTML:{__html:unescape(t.iframe)}}))),h("div",{className:"webview__content--fill"}))},t}(Component),mapStateToProps$23=function(e){return getBotSideWindowContent(e)},mapDispatchToProps$19=function(e){return{onClose:function(){e(closeBotSideWindow$1())}}},BotSideWindowContent=connect(mapStateToProps$23,mapDispatchToProps$19)(BotSideWindowContent$1),_systemTabMapping,_languageKeyMapping,systemTabMapping=(_systemTabMapping={},_systemTabMapping.media=VideoChat$1,_systemTabMapping.voice=VideoChat$1,_systemTabMapping.kb=KB,_systemTabMapping.bot=BotSideWindowContent,_systemTabMapping.coBrowsing=CoBrowsing,_systemTabMapping),languageKeyMapping=(_languageKeyMapping={},_languageKeyMapping.bubble="chatTab",_languageKeyMapping.media="videoTab",_languageKeyMapping.voice="audioTab",_languageKeyMapping.kb="kbTab",_languageKeyMapping.bot="botTab",_languageKeyMapping.coBrowsing="cobrowseTab",_languageKeyMapping.kbSearch="kbSearchTab",_languageKeyMapping),mapStateToProps$19=function(e){var t=isMobile$1(e),n=isIPad(e),i=getUnreadMessages(e),o=getCampaignId(e),a=getWindowStyle(e,o),r=getSideWindowTabSelected(e),s=getSideWindowItems(e),d=isPoppedOut(e),c=isRightToLeft(e),l=getCornerStyle(e,o),u=[],p={},h=getLanguageTag(e),f=getChatStatus(e);if(s){[].concat(s).forEach(function(e){e.isSystem?"bubble"===e.id||"kbSearch"===e.id?p=e:u.push({content:systemTabMapping[e.id],key:e.id,isSystem:e.isSystem,"aria-label":languages[h][languageKeyMapping[e.id]]}):u.push({callback:e.content,key:e.id,isSystem:e.isSystem,icon:e.icon,iconActive:e.iconActive?e.iconActive:e.icon,"aria-label":e["aria-label"]})})}return p.id&&u.push({content:systemTabMapping[p.id],key:p.id,isSystem:p.isSystem,"aria-label":languages[h][languageKeyMapping[p.id]]}),{components:u,isMobile:t,isIpad:n,unread:i,cornerStyle:l,windowStyle:a,selectedTab:r,isPoppedOut:d,chatStatus:f,showChatWindowInSidewindow:getShowChatWindowInSidewindow(e),isRightToLeft:c}},mapDispatchToProps$15=function(e){return{onTabSelect:function(t){e(sideWidowTabSelect$1(t))},onReadNewMsg:function(){e(sendAgentMsgSeenByVisitor$1())}}},SideWindow=connect(mapStateToProps$19,mapDispatchToProps$15)(SideWindow$1),WebView$1=function(e){function t(){return classCallCheck(this,t),possibleConstructorReturn(this,e.apply(this,arguments))}return inherits(t,e),t.prototype.render=function(){var e=this.props,t=getLanguages(this.context);return h("div",{className:"webView_background"},h("div",{className:index$4("webView_scroll_container","webView_scroll_container--"+e.size)},h("div",null,h("div",{className:index$4("webView__title")},h("span",null,e.title))),h("button",{className:"webView__close","aria-label":t.closeWebView,onClick:e.onClose},h(IconSVG,{type:"close"})),h("div",{className:index$4("webView","webView--"+e.size,"webView--scroll")},h("div",{style:{height:"100%"}},h("div",{className:"webView__content"},e.children)))))},t}(Component),BotForm=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={disabled:n.disabled},i.onSubmit=i.onSubmit.bind(i),i.onCancel=i.onCancel.bind(i),i}return inherits(t,e),t.prototype.onSubmit=function(){this.setState({disabled:!0}),this.props.onSubmit(this.props.values)},t.prototype.onCancel=function(){this.setState({disabled:!0}),this.props.onCancel()},t.prototype.render=function(){var e=this.props,t=e.disabled,n=e.values,i=n,o=this.state.disabled;return h("div",{className:index$4("form window__form window_botform"),id:"botform-window"},h("div",null,h("ul",{className:index$4("botconfirm_list")},Object.keys(i).map(function(e){var t=i[e];return h("li",{key:"botform-field"+e},h("p",null,t.label),h("p",null,function(){if("checkbox"===t.type)return translateHtmlCharater$2("true"===t.value?"\u2714":"\u2716");if(t.type===checkboxList){var e=new RegExp(splitter,"gi");return t.value.replace(e,",")}return t.value}()))}))),h("div",{className:"form-bottom botform__submitContainer"},h("button",{onClick:this.onSubmit,disabled:!!o||t,className:index$4("btn-submit")},this.props.buttons.confirm),h("button",{onClick:this.onCancel,disabled:!!o||t,className:index$4("btn-cancel")},this.props.buttons.cancel)))},t}(Component),BotConfirm=validation(BotForm),inputTypes$1=[name,email,"company","phone",comment,"content","subject","text","textarea","datetime"],BotForm$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={fields:n.fields,disabled:n.disabled},i.GUID=n.GUID,i.intentId=n.intentId,i.botId=n.botId,i.agentId=n.agentId,i.onChange=i.onChange.bind(i),i.onError=i.onError.bind(i),i.onBlur=i.onBlur.bind(i),i.onFocus=i.onFocus.bind(i),i.onSubmit=i.onSubmit.bind(i),i.onCancel=i.onCancel.bind(i),i.onValidate=i.onValidate.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this.state.fields,t=e.findIndex(function(e){return inputTypes$1.indexOf(e.type)>=0});t<0||this.props.isMobile||this.onFocus(e[t])},t.prototype.onChange=function(e,t){var n=this.state.fields,i=n.map(function(n){var i=n;return n.id===e.id?Object.assign({},n,{value:t}):i});this.setState({fields:i}),setTimeout(this.onValidate)},t.prototype.onError=function(e,t){var n=this.state.fields,i=n.map(function(n){var i=n;return n.id===e.id?n.customError===t&&n.isErrorShowed?i:Object.assign({},n,{customError:t,isErrorShowed:!0}):i});this.setState({fields:i})},t.prototype.onBlur=function(e){var t=this.state.fields,n=t.map(function(t){var n=t;return t.id===e.id?Object.assign({},t,{isFocused:!1,isErrorShowed:!0}):n});this.setState({fields:n}),setTimeout(this.onValidate)},t.prototype.onFocus=function(e){var t=this.state.fields,n=t.map(function(t){var n=t;return t.id===e.id?Object.assign({},t,{isFocused:!1}):n});this.setState({fields:n})},t.prototype.onSubmit=function(e){e.preventDefault(),this.onValidate(!0);var t={};this.state.fields.map(function(e){return!!e.error||(t[e.id]={label:e.label,id:e.id,value:function(){return Array.isArray(e.value)?e.value.join(splitter):e.value}(),type:e.type,isMasked:e.isMasked},null)}).some(function(e){return e})||(this.setState({disabled:!0}),this.props.onSubmit(t))},t.prototype.onResetField=function(){this.setState({fields:this.props.fields})},t.prototype.onCancel=function(){this.setState({disabled:!0}),this.onResetField(),this.props.onCancel()},t.prototype.onValidate=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.props.languages,n=this.state.fields.map(function(n){var i="",o=null!=n.value?n.value:"";return n.isRequired&&(!o||Array.isArray(o)&&0===o.length)&&(i=t.promptRequired),n.type===email&&o&&!isEmail(o)&&(i=t.promptInvalidEmail),_extends({},n,{value:o,error:n.customError||i,isErrorShowed:e})});this.setState({fields:n})},t.prototype.render=function(){var e=this.props,t=e.siteId,n=e.style,i=e.disabled,o=e.tab,a=e.languages,r=this.state.fields,s=this.state.disabled;return h("form",{className:index$4("form window__form window_botform"),id:"botform-window",onSubmit:this.onSubmit},h("div",{id:"botform-fields",className:index$4("form-fields",!1)},h(FormContent,{tab:o,fields:r,siteId:t,onError:this.onError,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,style:n,isHorizontal:!1,disabled:!!s||i,languages:a})),h("div",{className:"form-bottom botform__submitContainer"},h("button",{onClick:this.onSubmit,disabled:!!s||i,className:index$4("btn-submit")},this.props.buttons.submit),h("button",{onClick:this.onCancel,disabled:!!s||i,className:index$4("btn-cancel")},this.props.buttons.cancel)))},t}(Component),BotForm$2=validation(BotForm$1),Progress=function(e){return h("div",{className:e.ifLoading?"buttonProgressContainerLoading":"buttonProgressContainerSuccess","aria-live":"assertive","aria-atomic":"true","aria-label":e.ifLoading?"loading":"done"},h("div",{className:"lds-css ng-scope"},h("div",{className:"lds-rolling"})),h("svg",{version:"1.1",className:"buttonProgress__layerCircle",id:"buttonProgress__layer-circle",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"32px",height:"32px",viewBox:"0 0 30 30",xmlSpace:"preserve"},h("path",{className:"buttonProgress__submitCirclePath",d:"M15,1.5c7.4,0,13.5,6.1,13.5,13.5S22.4,28.5,15,28.5S1.5,22.4, 1.5,15S7.6,1.5,15,1.5L15,1.5z"})),h("svg",{version:"1.1",className:"buttonProgress__layerSuccess",id:"buttonProgress__layer-success",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"16px",height:"16px",viewBox:"0 0 16 16",xmlSpace:"preserve"},h("polygon",{className:"buttonProgress__submitSuccessPath",points:"16,3.5 12.8,1 6.5,9.2 2.5,6.1 0,9.3 6,14 7.3,15"})))},BotFormContent$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={showConfirm:!1},i.onSubmit=i.onSubmit.bind(i),i.onCancel=i.onCancel.bind(i),i.onConfirm=i.onConfirm.bind(i),i.param={guid:n.GUID,question:n.question,botId:n.botId,intentId:n.intentId,agentId:n.agentId},i}return inherits(t,e),t.prototype.componentDidUpdate=function(e){var t=this;this.props.success&&!e.success&&(this.timer=setTimeout(function(){t.props.onClose(),clearTimeout(t.timer)},1500))},t.prototype.componentWillUnmount=function(){this.timer&&clearTimeout(this.timer)},t.prototype.onSubmit=function(e){this.props.isNeedConfirm?(this.setState({showConfirm:!0}),this.confirmProps={values:e,buttons:this.props.buttons}):(this.param.message=this.props.buttons.submit,this.param.values=e,this.props.onSubmit(this.param))},t.prototype.onCancel=function(){this.props.onCancel(this.param)},t.prototype.onConfirm=function(e){this.param.message=this.props.buttons.confirm,this.param.values=e,this.props.onSubmit(this.param)},t.prototype.render=function(){var e=this.props,t=e.fields,n=e.ifLoading,i=e.success,o=objectWithoutProperties(e,["fields","ifLoading","success"]);return h("div",{className:"botForm__content"},!n&&!this.state.showConfirm&&h(BotForm$2,_extends({fields:t},o,{onSubmit:this.onSubmit,onCancel:this.onCancel})),!n&&this.state.showConfirm&&h(BotConfirm,_extends({},this.confirmProps,{onSubmit:this.onConfirm,onCancel:this.onCancel})),(n||i)&&h(Progress,{ifLoading:!i}))},t}(Component),mapStateToProps$25=function(e,t){var n=isPoppedOut(e),i=getWindowId(e),o=getLanguages$1(e);return _extends({isPopout:n,isHorizontal:isHorizontal(e),siteId:getSiteId(e),style:getCurrentWindowStyle(e),error:getError(e),windowStyle:getWindowStyle(e,i),isMobile:isMobile$1(e),languages:o,ifLoading:getWebViewIfLoading(e),success:getWebViewIfSuccess(e)},t)},mapDispatchToProps$20=function(e){return{onSubmit:function(t){var n=t.guid,i=t.intentId,o=t.agentId,a=t.botId,r=t.question,s=t.values,d=t.message;e(setWebViewLoading$1()),e(chatBotVisitorSubmitBotForm$2(n,i,o,a,r,s,d)),e(updateBotFormMessage$1(n,s))},onCancel:function(t){var n=t.guid,i=t.intentId,o=t.agentId,a=t.botId;e(closeWebView$1()),e(chatBotVisitorCancelBotForm$2(n,i,o,a))},onClose:function(){e(closeWebView$1())}}},BotFormContent=connect(mapStateToProps$25,mapDispatchToProps$20)(BotFormContent$1),tryParse$2=function(e){try{return JSON.parse(e)}catch(e){return}},CustomVariableLoginContent$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.eventListener=i.eventListener.bind(i),i.updateIframe=i.updateIframe.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){if(this.iframe){var e=crossDomain(this.iframe.contentWindow,this.props.url,!0);this.unsubscribe=e.subscribe(this.eventListener)}this.updateIframe()},t.prototype.shouldComponentUpdate=function(e){return this.props.url!==e.url||this.props.visitorGuid!==e.visitorGuid||this.props.siteId!==e.siteId||this.props.customVariable!==e.customVariable},t.prototype.componentDidUpdate=function(){this.updateIframe(10)},t.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe(),this.iframe&&this.iframe.setAttribute("src","")},t.prototype.updateIframe=function(e){var t=this;if(this.iframe){var n=this.props,i=n.url,o=location$1.href.match(/^[^:]+:\/\/[^/]+/)[0],a=encodeURIComponent(o);i=i+(-1===i.indexOf("?")?"?":"&")+"siteId="+n.siteId+"&visitorGuid="+n.visitorGuid+"&customVariable="+n.customVariable+"&target="+a,setTimeout(function(){t.iframe.setAttribute("src",i)},e||400)}},t.prototype.eventListener=function(e){if(e.data){var t=tryParse$2(e.data);if(!t)return;"customVariableLogin"===t.type&&this.props.onClose()}},t.prototype.render=function(){var e=this,t=getLanguages(this.context);return h("iframe",{ref:function(t){e.iframe=t},frameBorder:0,src:"",title:t.extendedView,style:{width:"100%",height:"100%"}})},t}(Component),mapStateToProps$26=function(e,t){return _extends({siteId:getSiteId(e),visitorGuid:getVisitorGuid(e)},t)},mapDispatchToProps$21=function(e){return{onClose:function(){e(closeWebView$1())}}},CustomVariableLoginContent=connect(mapStateToProps$26,mapDispatchToProps$21)(CustomVariableLoginContent$1),tryParse$3=function(e){try{return JSON.parse(e)}catch(e){return}},LinkContent$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.eventListener=i.eventListener.bind(i),i.updateIframe=i.updateIframe.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){if(this.iframe){var e=crossDomain(this.iframe.contentWindow,this.props.url,!0);this.unsubscribe=e.subscribe(this.eventListener)}this.props.onLoad()},t.prototype.shouldComponentUpdate=function(e){return this.props.url!==e.url||this.props.ifLoading!==e.ifLoading||this.props.botId!==e.botId||this.props.siteId!==e.siteId||this.props.agentId!==e.agentId||this.props.sessionId!==e.sessionId||this.props.visitorInfo!==e.visitorInfo},t.prototype.componentDidUpdate=function(){this.updateIframe(10)},t.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe(),this.iframe&&this.iframe.setAttribute("src","")},t.prototype.updateIframe=function(e){var t=this;if(this.iframe){var n=this.props,i=n.url,o=location$1.href.match(/^[^:]+:\/\/[^/]+/)[0],a=encodeURIComponent(o),r=encodeURIComponent(JSON.stringify(n.visitorInfo)),s=encodeURIComponent(JSON.stringify(n.formValues));i=i+(-1===i.indexOf("?")?"?":"&")+"channelType=livechat&siteId="+n.siteId+"&botId="+n.botId+"&agentId="+n.agentId+"&sessionId="+n.sessionId+"&visitorInfo="+r+"&formValues="+s+"&target="+a,setTimeout(function(){t.iframe.setAttribute("src",i)},e||400)}},t.prototype.eventListener=function(e){if(e.data){var t=tryParse$3(e.data);if(!t)return;"webViewLinkDone"===t.type&&this.props.onClose()}},t.prototype.render=function(){var e=this;if(this.props.ifLoading)return h(Progress,{ifLoading:this.props.ifLoading});var t=getLanguages(this.context);return h("iframe",{ref:function(t){e.iframe=t},frameBorder:0,src:"",title:t.extendedView,style:{width:"100%",height:"100%"}})},t}(Component),mapStateToProps$27=function(e,t){var n=getWebViewVisitorInfo(e);n||(n={visitorGuid:getVisitorGuid(e)});var i=getSiteId(e),o=getChatGuid(e),a=getWebViewIfLoading(e);return _extends({siteId:i,sessionId:o,ifLoading:a,visitorInfo:n},t)},mapDispatchToProps$22=function(e){return{onLoad:function(){e(setWebViewLoading$1()),e(getVisitorInfo$2())},onClose:function(){e(closeWebView$1())}}},LinkContent=connect(mapStateToProps$27,mapDispatchToProps$22)(LinkContent$1),tryParse$4=function(e){try{return JSON.parse(e)}catch(e){return}},LocationContent$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.eventListener=i.eventListener.bind(i),i.updateIframe=i.updateIframe.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){if(this.iframe){var e=crossDomain(this.iframe.contentWindow,this.props.url,!0);this.unsubscribe=e.subscribe(this.eventListener)}this.updateIframe()},t.prototype.shouldComponentUpdate=function(e){return this.props.url!==e.url},t.prototype.componentDidUpdate=function(){this.updateIframe(10)},t.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe(),this.iframe&&this.iframe.setAttribute("src","")},t.prototype.updateIframe=function(e){var t=this;if(this.iframe){var n=this.props,i=n.url,o=location$1.href.match(/^[^:]+:\/\/[^/]+/)[0],a=encodeURIComponent(o),r=(new Date).getTime();i=i+(-1===i.indexOf("?")?"?":"&")+"target="+a+"&hash="+r,setTimeout(function(){t.iframe.setAttribute("src",i)},e||400)}},t.prototype.eventListener=function(e){if(e.data){var t=tryParse$4(e.data);if(!t)return;"setLocation"===t.type?t.payload&&"object"===_typeof(t.payload)&&(this.props.handleLocation(t.payload),this.props.onClose()):"closeLocation"===t.type&&this.props.onClose()}},t.prototype.render=function(){var e=this,t=getLanguages(this.context);return h("iframe",{ref:function(t){e.iframe=t},frameBorder:0,src:"",title:t.extendedView,style:{width:"100%",height:"100%"},allow:"geolocation"})},t}(Component),mapStateToProps$28=function(e,t){return _extends({siteId:getSiteId(e)},t)},mapDispatchToProps$23=function(e){return{handleLocation:function(t){e(setLocation$2(t))},onClose:function(){e(closeWebView$1())}}},LocationContent=connect(mapStateToProps$28,mapDispatchToProps$23)(LocationContent$1),tryParse$5=function(e){try{return JSON.parse(e)}catch(e){return}},SSOLoginContent$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));i.eventListener=i.eventListener.bind(i),i.updateIframe=i.updateIframe.bind(i),i.origin="";var o=getQueryString(n.url,"returnUrl");return o&&(i.origin=o.match(/^[^:]+:\/\/[^/]+/)[0]),i}return inherits(t,e),t.prototype.componentDidMount=function(){if(this.iframe&&this.origin){var e=crossDomain(this.iframe.contentWindow,this.origin,!0);this.unsubscribe=e.subscribe(this.eventListener)}this.updateIframe()},t.prototype.shouldComponentUpdate=function(e){return this.props.url!==e.url},t.prototype.componentDidUpdate=function(){this.updateIframe(10)},t.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe(),this.iframe&&this.iframe.setAttribute("src","")},t.prototype.updateIframe=function(e){var t=this;if(this.iframe){var n=this.props,i=n.url,o=location$1.href.match(/^[^:]+:\/\/[^/]+/)[0],a=encodeURIComponent("?target="+o);i=""+i+a+"&color=ffffff",setTimeout(function(){t.iframe.setAttribute("src",i)},e||400)}},t.prototype.eventListener=function(e){if(e.data){var t=tryParse$5(e.data);if(!t)return;"sso-login"===t.type&&t.payload&&(this.props.handleSSOInfo(t.payload),this.props.onClose())}},t.prototype.render=function(){var e=this,t=getLanguages(this.context);return h("iframe",{ref:function(t){e.iframe=t},frameBorder:0,src:"",title:t.extendedView,style:{width:"100%",height:"100%"}})},t}(Component),mapStateToProps$29=function(e,t){return _extends({siteId:getSiteId(e)},t)},mapDispatchToProps$24=function(e){return{handleSSOInfo:function(t){e(sendSubmitSSOInfo4ChatBot$1(t))},onClose:function(){e(closeWebView$1())}}},SSOLoginContent=connect(mapStateToProps$29,mapDispatchToProps$24)(SSOLoginContent$1),_mapping$7,mapping$7=(_mapping$7={},_mapping$7.botForm=BotFormContent,_mapping$7.location=LocationContent,_mapping$7.ssoLogin=SSOLoginContent,_mapping$7.link=LinkContent,_mapping$7.customVariableLogin=CustomVariableLoginContent,_mapping$7),mapStateToProps$24=function(e){var t=getWebView(e),n=[h(mapping$7[t.type],t.content)];return _extends({},t,{children:n})},mergeProps$3=function(e,t){var n=t.dispatch;return _extends({},e,{onClose:function(){if("botForm"===e.type&&!e.ifLoading&&!e.success){var t=e.content,i=t.GUID,o=t.intentId,a=t.agentId,r=t.botId;n(chatBotVisitorCancelBotForm$2(i,o,a,r))}n(closeWebView$1())}})},WebView=connect(mapStateToProps$24,null,mergeProps$3)(WebView$1),QuickReply$1=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={showControl:!1},i.moveLeft=i.moveLeft.bind(i),i.moveRight=i.moveRight.bind(i),i.setControl=i.setControl.bind(i),i}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this;setTimeout(function(){e.setControl()},0)},t.prototype.shouldComponentUpdate=function(e,t){return e.items!==this.props.items||t.showControl!==this.state.showControl},t.prototype.componentDidUpdate=function(){var e=this;setTimeout(function(){e.setControl()},0)},t.prototype.componentWillUnmount=function(){this.leftInteval&&window.clearInterval(this.leftInteval),this.rightInterval&&window.clearInterval(this.rightInterval)},t.prototype.setControl=function(){this.container&&this.setState({showControl:this.container.scrollWidth>this.container.clientWidth})},t.prototype.moveLeft=function(){var e=this;if(this.container.scrollWidth){window.clearInterval(this.leftInteval);var t=Math.ceil(this.container.scrollWidth/4);t>=this.container.clientWidth&&(t=this.container.clientWidth);var n=t/10;n<1&&(n=1),this.leftInteval=window.setInterval(function(){e.container.scrollLeft=e.container.scrollLeft-n,(t-=n)<0&&window.clearInterval(e.leftInteval)},50)}},t.prototype.moveRight=function(){var e=this;if(this.container.scrollWidth){window.clearInterval(this.rightInterval);var t=Math.ceil(this.container.scrollWidth/4);t>=this.container.clientWidth&&(t=this.container.clientWidth);var n=t/10;n<1&&(n=1),this.rightInterval=window.setInterval(function(){e.container.scrollLeft=e.container.scrollLeft+n,(t-=n)<0&&window.clearInterval(e.rightInterval)},50)}},t.prototype.render=function(){var e=this,t=this.props.contactAgentText;return h("div",{className:"window_quick_reply_container_box"},this.state.showControl&&h("div",{className:index$4("window_quick_reply_control","window_quick_reply--left",!1),onClick:this.moveLeft},h("svg",{viewBox:"0 3 9 6",width:"10px",height:"10px"},h("path",{d:"M2.8,5.3l4.9-5c0.4-0.4,1.1-0.4,1.5,0s0.4,1.1,0,1.5L4.9,6.1L9,10.3c0.4,0.4,0.4,1,0,1.4s-1,0.4-1.4,0L2.8,6.9C2.4,6.5,2.4,5.7,2.8,5.3z"}))),h("div",{className:"window_quick_reply"},h("div",{ref:function(t){e.container=t},className:"window_quick_reply_buttons"},this.props.items.map(function(n){return"text"===n.type?h(Button$1,{type:"default",className:"window_quick_reply_buttons_item",text:n.name,onClick:function(){return e.props.onQuickReplyItemClick(n)}}):"goToIntent"===n.type?h(Button$1,{type:"default",className:"window_quick_reply_buttons_item",text:n.name,onClick:function(){return e.props.onQuickReplyItemClick(n)}}):"contactAgent"===n.type?h(Button$1,{type:"default",className:"window_quick_reply_buttons_item",text:t,onClick:function(){return e.props.onQuickReplyItemClick(n)}}):null}))),this.state.showControl&&h("div",{className:index$4("window_quick_reply_control","window_quick_reply--right",!1),onClick:this.moveRight},h("svg",{viewBox:"0 3 9 6",width:"10px",height:"10px"},h("path",{d:"M9.2,6.9l-4.8,4.8c-0.4,0.4-1,0.4-1.4,0s-0.4-1,0-1.4l4.1-4.2L2.8,1.8c-0.4-0.4-0.4-1.1,0-1.5s1.1-0.4,1.5,0l4.9,5C9.6,5.7,9.6,6.5,9.2,6.9z"}))))},t}(Component),mapStateToProps$30=function(e){var t=getQuickReply(e);return _extends({},t,{mainColor:getWindowMainColor(e),isMobile:isMobile$1(e)})},mergeProps$4=function(e,t){var n=t.dispatch;return _extends({},e,{onQuickReplyItemClick:function(t){var i=t.type,o=t.name,a=t.intentId;if(n(hideQuickReply$1()),"goToIntent"===i){var r=e.agentId,s=e.botId;n(chatBotSelectQuestion$2({id:a,name:o,clickType:6,agentId:r,botId:s}))}else"contactAgent"===i?n(fromChatbotToAgent$1()):"text"===i&&n(visitorSendText$1(o,!1))}})},QuickReply=connect(mapStateToProps$30,null,mergeProps$4)(QuickReply$1),Loading$1=function(e){function t(){classCallCheck(this,t);var n=possibleConstructorReturn(this,e.call(this));return n.state={showIcon:!1,animated:!1},n.animated=function(){n.setState({animated:!0})},n}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this;this.timer=setTimeout(function(){return e.setState({showIcon:!0})},200),registerAnimationEnd(this.element,this.animated)},t.prototype.componentWillUnmount=function(){clearTimeout(this.timer),unregisterAnimationEnd(this.element,this.animated)},t.prototype.render=function(){var e=this,t=this.props,n=getLanguages(this.context);return h("div",{className:index$4("window__form",this.state.animated&&"window__form--animation"),ref:function(t){e.element=t}},t.errorMessage&&h("div",{className:"window__formError"},t.errorMessage),this.state.showIcon&&!t.errorMessage&&h(IconSVG,{type:"loading",className:"svg--loadingChat",viewBox:"0 0 100 100","aria-label":n.loading,"aria-busy":"true"}))},t}(Component),Loading=connect(function(e){return{errorMessage:getError(e),windowStyle:getWindowStyle(e,getCampaignId(e))}})(Loading$1),_mapping$3,_heartbeatMapping,mapping$3=(_mapping$3={},_mapping$3[prechat]=PreChatForm,_mapping$3[postchat]=PostChatForm,_mapping$3[offline]=OfflineForm,_mapping$3[chat]=Content,_mapping$3[login]=PreLogin,_mapping$3.ssoLogin=SSOLogin,_mapping$3.loading=Loading,_mapping$3[kb]=KBsearch,_mapping$3),heartbeatMapping=(_heartbeatMapping={},_heartbeatMapping[prechat]={timespan:0,duration:20},_heartbeatMapping[postchat]={timespan:0,duration:20},_heartbeatMapping[offline]={timespan:0,duration:20},_heartbeatMapping[chat]={timespan:0,duration:2},_heartbeatMapping[login]=null,_heartbeatMapping.ssoLogin=null,_heartbeatMapping.loading=null,_heartbeatMapping[kb]={timespan:0,duration:20},_heartbeatMapping),staticSeed=0,mapStateToProps$3=function(e){var t=getWindowTab(e),n=mapping$3[t],i=void 0,o=getWindowStatus(e),a=o===minimized,r=isIPad(e);i="ssoLogin"===t?[h(n)]:[h(Header,null),h(n),getQuickReply(e)&&h(QuickReply,null),isChatInputVisible(e)&&h(ChatInput,{isIPad:r}),h(Footer,null),isWebViewShow(e)&&h(WebView,null)];var s=getChatStatus(e),d=s===chatting,c=getCurrentWindowStyle(e),l=getCurrentCornerStyle(e),u=getWarning(e),p=getError(e),f=getUnreadMessages(e),g=getNewMessagesNotificationText(e,f),m=getLanguageWriteReply(e),b=heartbeatMapping[t];s!==chatted||t!==chat&&t!==postchat||(b={timespan:0,duration:10});var w=s===chatted,v=s===chatted?180:void 0,y=getCustomCss(e),C=0,_=getifShowSideWindow(e),x=_?SideWindow:null;c===bubble&&(C=Math.random());var S=getWidth(e),k=getHeight(e),A=getCampaignId(e),M=getWindowIframeStyle(e,A),T=getButton(e,A),I=isRightToLeft(e),P=getOrientation(e),W=headerParts(c,e,getCampaignById(e,A)),D=getOnlineStatus(e),R=D[A],$=showAdaptiveMinimizeIcon(e),O=getRight(e),E=getBottom(e),N=getMessages(e),F=N.length>0?N[N.length-1].guid:"";return{isPoppedOut:isPoppedOut(e),fontCSS:fontCSS(partial(resourceUrl,e)),mainColor:getWindowMainColor(e),background:getWindowBackground(e),isFocused:getIsChatWindowFocused(e),children:i,windowTab:t,windowStatus:o,windowStyle:c,warning:u,error:p,isMobile:isMobile$1(e),isIPad:r,showChatWindowInSidewindow:getShowChatWindowInSidewindow(e),title:d?g:void 0,seed:C,hOnline:b,writeReply:m,ifShowSideWindow:_,sideWindow:x,customCss:y,width:S,height:k,isRightToLeft:I,iframeStyle:M,orientation:P,showAvatar:!!(W.avatars||W.avatar||W.agent&&W.agent.avatar),isMinimized:a,iconStyle:T.svg,ifCobrowsingShowing:isCobrowsing(e),languageCobrowseStop:getLanguageCobrowseStop(e),cornerStyle:l,languageTag:getLanguageTag(e),online:R,showAdaptiveMinimizeIcon:$,isCurrentAdaptiveButton:isCurrentAdaptiveButton(e),right:O,bottom:E,ifEnableVisitorSeeMsgSentSeen:getIfEnableVisitorSeeMsgSentSeen(e),maxVisitorReadId:getMaxVisitorReadId(e),maxMsgId:getMaxMessageId(e),maxGuid:F,messages:N,chatStatus:s,showToolbox:getShowToolbox(e),hDelay:w,hStop:v}},mapDispatchToProps$2=function(e){return{dispatch:e,onMounted:function(){e(windowMounted$1())},onErrorClose:function(){e(hideError())},onWarningClose:function(){e(hideWarning())},onFocusToggle:function(t){e(toggleFocused(t))},onPositionChange:function(t,n){e(updateWindowPosition$1(t,n))},onReadNewMsg:function(t){e(sendAgentMsgSeenByVisitor$1(t))},hOnInit:function(){e(setIsActive$1(!0))},hOnStopped:function(){e(setIsActive$1(!1))}}},noop$3=function(){},mergeProps=function(e,t){var n=e.windowTab,i=t.dispatch,o=noop$3;return n===chat?o=function(){return i(sendChatHeartbeat$1())}:n===prechat||n===kb?o=function(){return i(sendPrechatHeartbeat$1())}:n===postchat?o=function(){return i(sendChatHeartbeat$1())}:n===offline&&(o=function(){return i(sendOfflineHeartbeat$1())}),_extends({},e,t,{hCallback:o})},ChatWindow=connect(mapStateToProps$3,mapDispatchToProps$2,mergeProps)(Window$1),iframeStyle={width:110,height:110,position:"fixed",border:"none",zIndex:button$2},Minimize$2=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={showNotify:!0},i.onClick=i.onClick.bind(i),i.onAccept=i.onAccept.bind(i),i.onRefuse=i.onRefuse.bind(i),i}return inherits(t,e),t.prototype.componentWillReceiveProps=function(e){e.unread!==this.props.unread&&this.setState({showNotify:!0})},t.prototype.onAccept=function(e,t,n){this.props.onMaximize(this.props.windowTab),t&&this.props.onSend(t,n)},t.prototype.onRefuse=function(){this.setState({showNotify:!1}),this.props.isBubbleManualInvited&&this.props.onRefuse()},t.prototype.onClick=function(e){e.preventDefault(),(this.props.windowStatus===minimized?this.props.onMaximize:this.props.onMinimize)(this.props.windowTab)},t.prototype.render=function(){var e=this.props,t=e.windowStatus===minimized,n=this.state.showNotify&&e.NotifyBubble,i=this.props.isBubbleManualInvited?e.refuseText:e.closeText,o=this.props.isBubbleManualInvited?e.acceptText:e.openText,a=!1,r=getLanguages(this.context),s=r.maximize;t||(s=r.minimizeBar),t||(a=!0);var d=this.onAccept,c=this.onRefuse,l=e.right,u=e.isRightToLeft,p=e.fontCSS;return h("div",null,n&&h(e.NotifyBubble,{onAccept:d,onRefuse:c,xText:i,acceptText:o,fontCSS:p,isRightToLeft:u}),h(Iframe,{style:_extends({},iframeStyle,{right:l,bottom:e.bottom}),title:r.minimizeBtn},h(Adaptive$1,{isMobile:e.isMobile,avatar:e.avatar,onClick:this.onClick,count:e.unread,status:e.windowStatus,online:e.online,iconStyle:e.iconStyle,showArrowDown:a,mainColor:e.buttonColor,"aria-label":s,customCSS:e.customCSS})))},t}(Component),iframeStyle$1={border:"none",width:300,height:30,position:"fixed",zIndex:button$2},Bar=function(e){function t(n){classCallCheck(this,t);var i=possibleConstructorReturn(this,e.call(this,n));return i.state={text:n.text,styleOpacity:0,didMounted:!1},i.onClick=i.onClick.bind(i),i.startFlash=i.startFlash.bind(i),i.timer=null,i.showNotify=!1,i}return inherits(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.notification?this.startFlash():this.stopFlash(),setTimeout(function(){e.setState({styleOpacity:1,didMounted:!0})},300)},t.prototype.componentWillReceiveProps=function(e){e.text===this.props.text||this.timer||this.setState({text:e.text})},t.prototype.componentDidUpdate=function(){this.props.notification?this.startFlash():this.stopFlash()},t.prototype.componentWillUnmount=function(){this.timer&&clearTimeout(this.timer)},t.prototype.onClick=function(){this.props.onMaximize(this.props.windowTab)},t.prototype.startFlash=function(){var e=this;this.timer||(this.timer=setTimeout(function(){if(e.showNotify)e.setState({text:e.props.text});else{var t=e.props.notification;if(!t)return void e.stopFlash();e.setState({text:t})}e.showNotify=!e.showNotify,e.timer=null,e.startFlash()},1e3))},t.prototype.stopFlash=function(){this.timer&&clearTimeout(this.timer),this.setState({text:this.props.text}),this.timer=null,this.showNotify=!1},t.prototype.render=function(){var e=this.props,t=e.cornerStyle,n=void 0;"circular"===t?n="window--circular":"square"===t&&(n="window--square");var i=e.isMobile&&!e.isIPad,o=i?30:e.right+30,a=i?0:e.bottom,r=getLanguages(this.context),s=[e.fontCSS,replaceThemeColors(css,e.mainColor),e.customCSS];return h(Iframe,{style:_extends({},iframeStyle$1,{right:o,bottom:a,opacity:this.state.styleOpacity}),title:r.minimizeBtn},h(Style,{css:s}),h("button",{className:index$4("minimize-bar",n,e.isRightToLeft&&"window--rtl"), onClick:this.onClick,"aria-label":r.minimizeBar,style:{position:this.state.didMounted?"fixed":""}},h("div",{className:"minimize-bar__message"},this.state.text),h(IconSVG,{type:"arrowup"})))},t}(Component),MinimizeIcon=function(e){return h(e.showAdaptiveMinimizeIcon?Minimize$2:Bar,e)},Minimize$1=language(MinimizeIcon),mapStateToProps$32=function(e){var t=getLastMessage(e),n=void 0,i=void 0;t&&(n=t.content,t.type===chatbotConfidenceAnswer?n=ommit(getBotFirstConfidenceAnswer$1(t),0,48):t.type===chatbotBotForm||t.type===botRequestLocation||t.type===botPrompt?n=t.content.message:t.type===chatbotBotSignIn?n=t.content.message+" "+t.content.signInText:"string"!=typeof n&&n&&(n=n.text||n.name),isSystemMessage(t)||(i=t.sender.name));var o=getLastMessageId(e),a=getLanguageWriteReply(e),r=getRight(e),s=getBottom(e),d=getCurrentCornerStyle(e);return{invitation:{messageId:o,message:n,textTypeHere:a,agentName:i},mainColor:getWindowMainColor(e),right:r,bottom:s,cornerStyle:d,customCSS:getCustomCss(e),noInput:getChatStatus(e)===chatted||isMobile$1(e),height:getHeight(e)}},NotifyBubble=connect(mapStateToProps$32)(BubbleAnimation),_prefixMapping$1,mapStateToProps$31=function(e){var t=getAvatar(e),n=getWindowId(e),i=getWindowTab(e),o=getWindowStatus(e),a=getUnreadNumber(e),r=getOnlineStatus$1(e),s=getButtonIconStyle(e),d=getWindowMainColor(e),c=showAdaptiveMinimizeIcon(e),l=getButton(e,n),u=l.color,p=getCurrentCornerStyle(e),h=getMinimizeIconText(e),f=getNewMessagesNotificationText(e,a),g=getRight(e),m=getBottom(e),b=o===minimized,w=a>0,v=b&&w,y=isWindowManualInvited(e),C=isBubbleInvitation(e),_=getCustomCss(e),x=getLanguageTag(e),S=getCurrentWindowStyle(e);return{isMobile:isMobile$1(e),isIPad:isIPad(e),avatar:t,windowTab:i,windowStatus:o,unread:a,online:r,iconStyle:s,mainColor:d,buttonColor:u,showAdaptiveMinimizeIcon:c,cornerStyle:p,text:h,notification:f,right:g,bottom:m,isBubbleManualInvited:y&&C,customCSS:_,NotifyBubble:v?NotifyBubble:null,languageTag:x,languages:getLanguages$1(e),openText:languages[x].maximize,acceptText:languages[x].acceptInv,refuseText:languages[x].refuseInv,closeText:languages[x].closeNewMsg,chatWindowWidth:void 0,windowWidth:void 0,windowStyle:S,isPoppedOut:isPoppedOut(e),fontCSS:fontCSS(partial(resourceUrl,e)),isRightToLeft:isRightToLeft(e)}},prefixMapping$1=(_prefixMapping$1={},_prefixMapping$1[chat]="livechat.chat",_prefixMapping$1[prechat]="livechat.prechat",_prefixMapping$1[postchat]="livechat.postChat",_prefixMapping$1[offline]="livechat.offlineMessage",_prefixMapping$1),mapDispatchToProps$25=function(e){return{onMinimize:function(t){var n=prefixMapping$1[t];n&&emit(n+".minimize"),e(setWindowMinimized())},onMaximize:function(t){var n=prefixMapping$1[t];n&&emit(n+".restore"),e(setWindowRestored())},onRefuse:function(){e(closeMinimizedWindowBubble$1())},onSend:function(t,n){e(addPendingMessage$1(t,n))}}},Minimize=connect(mapStateToProps$31,mapDispatchToProps$25)(Minimize$1),mapStateToProps=function(e){var t=isReady(e);if(!t)return{isReady:t};var n=showAdaptiveMinimizeIcon(e);return{isReady:t,enableGa:getIfEnableGoogleAnalytics(e),tab:getWindowTab(e),invitation:getInvitation(e),guid:getChatGuid(e),ban:isBanned(e),isCampaignReady:isWindowCampaignReady(e),windowStatus:getWindowStatus(e),isPoppedOut:isPoppedOut(e),customJs:getCustomJs(e),chatStatus:getChatStatus(e),showAdaptiveMinimizeIcon:n}},RootElement=connect(mapStateToProps)(function(e){var t=e.isReady,n=e.windowStatus,i=e.tab,o=e.enableGa,a=e.customJs,r=e.chatStatus,s=e.invitation,d=e.guid,c=e.ban,l=e.isCampaignReady,u=e.isPoppedOut,p=e.showAdaptiveMinimizeIcon;if(!t)return null;if(c)return null;var f=n!==close,g=n===minimized,m=g;return g||(m=p),h("div",null,a&&h(Head,{key:"js",textContent:a,name:"script",type:"text/javascript"}),h(GoogleAnalytics$1,{enableGa:o,windowTab:i,invitation:s,guid:d,chatStatus:r}),!u&&h(Button,null),s&&h(Invitation,null),l&&f&&h(ChatWindow,null),m&&h(Minimize,null))}),Root=function(e){var t=e.store;return h(RenderProvider,{getRender:getRender},h(Provider,{store:t},h(RootElement,null)))},containerId="comm100-container",ui=function(e){var t=document$2.getElementById("comm100-container"),n=t||document$2.createElement("div");return t||(n.id="comm100-container",document$2.body.appendChild(n)),render(h(Root,{store:e}),n),function(){n.innerHTML=""}},events=function(e){var t=function(e){return e&&e.indexOf("landscape")>=0},n=function(){var e=global$2.screen,n=e.msOrientation||e.mozOrientation||e.orientation,i=void 0===n?"undefined":_typeof(n);return"undefined"===i?"orientation"in global$2&&90===Math.abs(global$2.orientation):t("string"===i?n:n.type)},i=function(){var t=e.getState(),n=getWidth(t),i=getHeight(t),o=getSize();o.width===n&&o.height===i||e.dispatch(updateSize$1(o))},o=function(){n()?e.dispatch(setLandscape()):e.dispatch(setPortrait())},a=debounce(function(){e.dispatch(sendUpdateCurrentUrl$1())},500);global$2.addEventListener("resize",i),global$2.addEventListener("orientationchange",debounce(o,50)),global$2.addEventListener("hashchange",a),global$2.addEventListener("popstate",a);var r=global$2.history.pushState,s=global$2.history.replaceState;return global$2.history.pushState=function(e,t,n){r.call(global$2.history,e,t,n),a()},global$2.history.replaceState=function(e,t,n){s.call(global$2.history,e,t,n),a()},i(),o(),function(){global$2.removeEventListener("resize",i),global$2.removeEventListener("orientationchange",o),global$2.removeEventListener("hashchange",a),global$2.addEventListener("popstate",a),global$2.history.pushState=r,global$2.history.replaceState=s}},withPrevState=function(e,t){var n=void 0;return function(){var i=e.getState();t(n,i),n=i}},isStart=function(e){return e.app.isActive&&e.app.isReady&&!e.app.isBanned&&null!=getModeratorUrl(e)&&null!=getMainServerStatusUrl(e)&&null!=getVisitorGuid(e)&&getWindow(e)},maxonReport=function(e){var t=e.subscribe(withPrevState(e,function(e,t){null!=e&&(!isStart(e)&&isStart(t)&&startReportTimer(getModeratorUrl(t),getMainServerStatusUrl(t),getVisitorGuid(t)),isStart(e)&&!isStart(t)&&stopReportTimer())}));return function(){t(),stopReportTimer()}},subscriptions=void 0;subscriptions=[ui,customVariable,api$2,events,maxonReport];var getVisitor=function(e){if(e){var t=e.visitorGuid;if(t)return{guid:t}}return{guid:getVisitorGuid$2()}},saveVisitor=function(e){e.guid&&setVisitorGuid(e.guid)},getServer$1=function(e){return e&&e.isStandbyServer?"standby":"main"},getRequestChatAction$1=function(e){return e?_extends({},requestChat(e.planId,{type:e.chatSource,invitationId:e.invitationId},!1,e.ticketId,e.departmentId),{lastChattedAgents:getLastChattedAgents()}):null},initStore=function(e){var t=e.siteId,n=e.chatGroup,i=e.mainCampaignId,o=e.campaignIds,a=e.isDynamicCampaign,r=e.serverUrl;migrateCookies();var s=api$1.popout,d=getRequestChatAction$1(s),c=parseCustomVariables(s),l=getVisitor(s);saveVisitor(l);var u=getServer$1(s),p=configureStore({app:{isReady:!1,isActive:!0,server:u,isPoppedOut:!!s,isOpenerExists:!!global$2.opener,banned:getVisitorInfo$3().isBanned,recoverFailTimes:0,isRecovering:!1,lastSuccessTime:0},page:{siteId:t,isDynamicCampaign:a,campaignId:a?0:i,buttons:o.reduce(function(e,t){var n;return _extends({},e,(n={},n[t]=!1,n))},{}),platform:getPlatform(),chatGroup:n,visitor:l,windowStatus:close,requestChatAction:d,popout:api$1.popout,visitorStatus:inSite},configuration:_extends({},r,{customVariableResult:c})});return create$1(p),p.dispatch(sendGetConfig$1()),p},maxStoreError=10,errors=[];window.getStoredErrors=getStoredErrors,main(initStore)(api$1.main,api$1.standby,api$1.vue),window.addEventListener("unhandledrejection",function(e){report(e.reason)}),window.addEventListener("error",function(e){report(e.error)})}(); //# sourceMappingURL=http://localhost:8000/bundle.968756fbcfe01603c32c1e0d9b0b9ab9.js.map } /* FILE ARCHIVED ON 01:16:11 Jul 12, 2020 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 05:01:34 Nov 06, 2023. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 216.624 exclusion.robots: 0.088 exclusion.robots.policy: 0.076 cdx.remote: 0.063 esindex: 0.011 LoadShardBlock: 174.754 (3) PetaboxLoader3.datanode: 235.053 (5) load_resource: 246.243 (2) PetaboxLoader3.resolve: 124.06 (2) */