/** * compiled: 2017-11-06 16:48:38 * version: 1.0.0 */ !function(){"use strict";function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}function t(){}function n(e,n){var i=Xt,o=void 0,r=void 0,a=void 0,s=void 0;for(s=arguments.length;s-- >2;)Jt.push(arguments[s]);for(n&&null!=n.children&&(Jt.length||Jt.push(n.children),delete n.children);Jt.length;)if((r=Jt.pop())&&void 0!==r.pop)for(s=r.length;s--;)Jt.push(r[s]);else!0!==r&&!1!==r||(r=null),(a="function"!=typeof e)&&(null==r?r="":"number"==typeof r?r=String(r):"string"!=typeof r&&(a=!1)),a&&o?i[i.length-1]+=r:i===Xt?i=[r]:i.push(r),o=a;var c=new t;return c.nodeName=e,c.children=i,c.attributes=null==n?void 0:n,c.key=null==n?void 0:n.key,void 0!==Qt.vnode&&Qt.vnode(c),c}function i(e,t){for(var n in t)e[n]=t[n];return e}function o(e){!e._dirty&&(e._dirty=!0)&&1==on.push(e)&&(Qt.debounceRendering||setTimeout)(r)}function r(){var e=void 0,t=on;for(on=[];e=t.pop();)e._dirty&&S(e)}function a(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&s(e,t.nodeName):n||e._componentConstructor===t.nodeName}function s(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function c(e){var t=i({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var o in n)void 0===t[o]&&(t[o]=n[o]);return t}function d(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}function l(e){e.parentNode&&e.parentNode.removeChild(e)}function u(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":Wt(i))){if("string"!=typeof n)for(var r in n)r in i||(e.style[r]="");for(var a in i)e.style[a]="number"==typeof i[a]&&!1===nn.test(a)?i[a]+"px":i[a]}}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,f,s):e.removeEventListener(t,f,s),(e._listeners||(e._listeners={}))[t]=i}else if("list"!==t&&"type"!==t&&!o&&t in e)p(e,t,null==i?"":i),null!=i&&!1!==i||e.removeAttribute(t);else{var c=o&&t!==(t=t.replace(/^xlink\:?/,""));null==i||!1===i?c?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof i&&(c?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),i):e.setAttribute(t,i))}else e.className=i||""}function p(e,t,n){try{e[t]=n}catch(e){}}function f(e){return this._listeners[e.type](Qt.event&&Qt.event(e)||e)}function h(){for(var e=void 0;e=rn.pop();)Qt.afterMount&&Qt.afterMount(e),e.componentDidMount&&e.componentDidMount()}function m(e,t,n,i,o,r){an++||(sn=null!=o&&void 0!==o.ownerSVGElement,cn=null!=e&&!(tn in e));var a=b(e,t,n,i,r);return o&&a.parentNode!==o&&o.appendChild(a),--an||(cn=!1,r||h()),a}function b(e,t,n,i,o){var r=e,a=sn;if(null==t&&(t=""),"string"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||o)?e.nodeValue!=t&&(e.nodeValue=t):(r=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(r,e),w(e,!0))),r[tn]=!0,r;if("function"==typeof t.nodeName)return A(e,t,n,i);if(sn="svg"===t.nodeName||"foreignObject"!==t.nodeName&&sn,(!e||!s(e,String(t.nodeName)))&&(r=d(String(t.nodeName),sn),e)){for(;e.firstChild;)r.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(r,e),w(e,!0)}var c=r.firstChild,l=r[tn]||(r[tn]={}),u=t.children;return!cn&&u&&1===u.length&&"string"==typeof u[0]&&null!=c&&void 0!==c.splitText&&null==c.nextSibling?c.nodeValue!=u[0]&&(c.nodeValue=u[0]):(u&&u.length||null!=c)&&g(r,u,n,i,cn||null!=l.dangerouslySetInnerHTML),y(r,t.attributes,l),sn=a,r}function g(e,t,n,i,o){var r=e.childNodes,s=[],c={},d=0,u=0,p=r.length,f=0,h=t?t.length:0,m=void 0,g=void 0,v=void 0,y=void 0;if(0!==p)for(var x=0;x=p?e.appendChild(y):y!==r[S]&&(y===r[S+1]?l(r[S]):e.insertBefore(y,r[S]||null)))}if(d)for(var T in c)void 0!==c[T]&&w(c[T],!1);for(;u<=f;)void 0!==(y=s[f--])&&w(y,!1)}function w(e,t){var n=e._component;n?T(n):(null!=e[tn]&&e[tn].ref&&e[tn].ref(null),!1!==t&&null!=e[tn]||l(e),v(e))}function v(e){for(e=e.lastChild;e;){var t=e.previousSibling;w(e,!0),e=t}}function y(e,t,n){var i=void 0;for(i in n)t&&null!=t[i]||null==n[i]||u(e,i,n[i],n[i]=void 0,sn);for(i in t)"children"===i||"innerHTML"===i||i in n&&t[i]===("value"===i||"checked"===i?e[i]:n[i])||u(e,i,n[i],n[i]=t[i],sn)}function x(e){var t=e.constructor.name;(dn[t]||(dn[t]=[])).push(e)}function _(e,t,n){var i=dn[e.name],o=void 0;if(e.prototype&&e.prototype.render?(o=new e(t,n),I.call(o,t,n)):(o=new I(t,n),o.constructor=e,o.render=C),i)for(var r=i.length;r--;)if(i[r].constructor===e){o.nextBase=i[r].nextBase,i.splice(r,1);break}return o}function C(e,t,n){return this.constructor(e,n)}function k(e,t,n,i,r){e._disable||(e._disable=!0,(e.__ref=t.ref)&&delete t.ref,(e.__key=t.key)&&delete t.key,!e.base||r?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!==Zt&&(n!==$t&&!1===Qt.syncComponentUpdates&&e.base?o(e):S(e,$t,r)),e.__ref&&e.__ref(e))}function S(e,t,n,o){if(!e._disable){var r=e.props,a=e.state,s=e.context,d=e.prevProps||r,l=e.prevState||a,u=e.prevContext||s,p=e.base,f=e.nextBase,b=p||f,g=e._component,v=!1,y=void 0,x=void 0,C=void 0;if(p&&(e.props=d,e.state=l,e.context=u,t!==Kt&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(r,a,s)?v=!0:e.componentWillUpdate&&e.componentWillUpdate(r,a,s),e.props=r,e.state=a,e.context=s),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!v){y=e.render(r,a,s),e.getChildContext&&(s=i(i({},s),e.getChildContext()));var A=y&&y.nodeName,I=void 0,R=void 0;if("function"==typeof A){var P=c(y);x=g,x&&x.constructor===A&&P.key==x.__key?k(x,P,$t,s,!1):(I=x,e._component=x=_(A,P,s),x.nextBase=x.nextBase||f,x._parentComponent=e,k(x,P,Zt,s,!1),S(x,$t,n,!0)),R=x.base}else C=b,I=g,I&&(C=e._component=null),(b||t===$t)&&(C&&(C._component=null),R=m(C,y,s,n||!p,b&&b.parentNode,!0));if(b&&R!==b&&x!==g){var M=b.parentNode;M&&R!==M&&(M.replaceChild(R,b),I||(b._component=null,w(b,!1)))}if(I&&T(I),e.base=R,R&&!o){for(var O=e,E=e;E=E._parentComponent;)(O=E).base=R;R._component=O,R._componentConstructor=O.constructor}}if(!p||n?rn.unshift(e):v||(h(),e.componentDidUpdate&&e.componentDidUpdate(d,l,u),Qt.afterUpdate&&Qt.afterUpdate(e)),null!=e._renderCallbacks)for(;e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);an||o||h()}}function A(e,t,n,i){for(var o=e&&e._component,r=o,a=e,s=o&&e._componentConstructor===t.nodeName,d=s,l=c(t);o&&!d&&(o=o._parentComponent);)d=o.constructor===t.nodeName;return o&&d&&(!i||o._component)?(k(o,l,en,n,i),e=o.base):(r&&!s&&(T(r),e=a=null),o=_(t.nodeName,l,n),e&&!o.nextBase&&(o.nextBase=e,a=null),k(o,l,$t,n,i),e=o.base,a&&e!==a&&(a._component=null,w(a,!1))),e}function T(e){Qt.beforeUnmount&&Qt.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?T(n):t&&(t[tn]&&t[tn].ref&&t[tn].ref(null),e.nextBase=t,l(t),x(e),v(t)),e.__ref&&e.__ref(null)}function I(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{}}function R(e,t,n){return m(n,e,{},!1,t,!1)}function P(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;it}function O(e,t){for(var n=e.split(Jn),i=e.match(Jn),o=new Array(2*n.length-1),r=0;r0?e[e.length-1].div_id:null;if(t&&document.body&&!document.getElementById(t)){var n=document.getElementsByTagName("head")[0];if(n)for(var i=n.getElementsByTagName("script"),o=0;o=t.length?n(new $(s,f,new Z(void 0,e[f]))):te(e[f],t[f],n,i,s,f,a);for(;f=0?(te(e[o],t[o],n,i,s,o,a),m=K(m,c)):te(e[o],void 0,n,i,s,o,a)}),m.forEach(function(e){te(void 0,t[e],n,i,s,e,a)})}a.length=a.length-1}else e!==t&&("number"===d&&isNaN(e)&&isNaN(t)||n(new J(s,e,t)))}function ne(e,t,n,i){return i=i||[],te(e,t,function(e){e&&i.push(e)},n),i.length?i:void 0}function ie(e,t,n){if(n.path&&n.path.length){var i,o=e[t],r=n.path.length-1;for(i=0;i2&&void 0!==arguments[2])||arguments[2],i=e.getState(),o=Wl(i),r=Object.assign({},o,t);if(!lf(r,o)){n&&e.dispatch(Nu({customVariableResult:r}));var a=uf(r,o);Object.keys(a).length>0&&e.dispatch(Jp(a))}}function pe(e){return e.contentType?e.contentType:e.getResponseHeader?e.getResponseHeader("content-type"):null}function fe(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 he(e){return/\bjson\b/gi.test(pe(e))?JSON.parse(e.responseText):e.responseText}function me(){if("withCredentials"in new XMLHttpRequest)return new XMLHttpRequest;if(window.XDomainRequest)return new window.XDomainRequest;throw new Error("No CORS support.")}function be(e,t,n){if(window.XDomainRequest&&e instanceof window.XDomainRequest&&/^https?:/.test(n)){var i=window.location.href.toString().match(/^(https?):/)[1];return void e.open(t,i+n.substr(n.indexOf(":")),!0)}e.open(t,n,!0)}function ge(e,t,n,i){return new Promise(function(o,r){var a=me(),s=function(){return o({url:t,input:n,output:he(a)})},c=function(e,i){return r({url:t,input:n,error:{code:e,message:i,statusCode:a.status}})},d=P(c,ph);be(a,e,t),a.withCredentials=e!==fh,fe(a,i),a.onload=function(){null==a.status||a.status>=200&&a.status<300?s():d("http error "+a.status)},a.onabort=function(){return d("")},a.ontimeout=function(){return d("request timeout")},a.onerror=function(){return d("network error")},a.onprogress=function(){},null!=window.FormData&&n instanceof window.FormData?(a.timeout=df,a.send(n)):(a.timeout=cf,a.send(JSON.stringify(n)))})}function we(e,t,n){var i,o=e.dispatch,r=e.getState,a=t.input,s=t.output,c=r(),d=(i={},i[yh.getConfig]=function(e){e.features&&fa(!!e.features.useSessionCookie),o(Nu(e.customVaraibles?e:pn(e,{customVariableResult:Os(c)?Wl(c):Vn(e.customVariables)}))),o(Gp()).then(function(){o(uu()),Os(c)&&(o(yu(ec(r()))),o(Cu()))})},i[yh.getChatWindowConfig]=function(e){o(Nu(pn(e,{features:pn(c.configuration.features,e.features)})))},i[yh.getCustomVariables]=function(e){var t="product service",n=["name","email","phone","company",t],i=Bn(e,n),r=i[0],a=i[1];r[t]&&(r.product=r[t],delete r[t]);var s=Rl(c).map(function(e){return e.label}),d=Bn(a,s),l=d[0];o(Vf(Dt({},r,{custom:l})))},i[yh.getChatButton]=function(e){var t=Ac(c);t&&o(Eu(e.id)),o(Bu({id:e.id,entity:pn(e,{divId:Pi(e.id)}),fetchStatus:jr})),t&&Of("livechat.dynamicCampaign.change",e.id),xh(o,r(),e.id).then(function(e){t&&o(Pp(e.id))})},i[yh.checkManualInvitation]=function(e){if(e&&!_l(c)&&oc(c)===No){var t=function(){var t=Dt({},e,{isManual:!0});o(mu(t)),Of("livechat.invitation.display",t)};e.type===Do||e.type===zo?o(ef()).then(t):t()}},i[yh.confirmAutoInvitation]=function(e){if(e&&!_l(c)&&oc(c)===No){var t=function(){var t=Dt({},e,{isManual:!1});o(mu(t)),Of("livechat.invitation.display",t)};e.type===Do?o(ef()).then(t):t()}},i[yh.checkAutoInvitation]=function(e){null!=e&&e.forEach(function(e){var t=e.id,n=e.delay;setTimeout(function(){oc(r())===No&&o(Wp(Jo(Ac(c)?0:ec(r()),t)))},1e3*n)})},i[yh.getIfOnline]=function(e){var t=e.campaignId,n=e.ifOnline;o(hu(t,n))},i[yh.checkIfOnline]=function(e){var t=e.campaignId,n=e.ifOnline;o(hu(t,n))},i[yh.batchAction]=function(e){for(var t=0;t=14393:(n=!0,!0)}),delete e.url,e.urls=o?i[0]:i,!!i.length}return!1})}function Se(e,t){var n={codecs:[],headerExtensions:[],fecMechanisms:[]},i=function(e,t){e=parseInt(e,10);for(var n=0;n=100&&clearInterval(c)},2e4)},w.onmessage=function(e){var n=JSON.parse(e.data);null!=n.count?(0===m&&n.count>1&&(t(),r({start:1})),(m=n.count)<2&&(b=!1)):n.start?(t(),b=!0,o()):n.s?(n.s,null==s&&(s=n.d?n.d.iceServers||[]:[],s.push(y),p&&p(s))):d&&d(n)},w.onclose=function(){i()},w.onerror=function(e){i(),l&&l()};var y={urls:"stun:stun.l.google.com:19302"};this.send=r,this.close=a,this.onRemoteStart=function(e){u=e,o()},this.onMessage=function(e){d=e},this.onGetIceServers=function(e){p=e,s&&e&&e(s)},this.onError=function(e){l=e}}function Ie(){function e(e){c=e,c?o().then(function(e){s=e,t(),a=setInterval(function(){o().then(i)},1e3)}):t()}function t(){a&&(clearInterval(a),a=null)}function n(e,t){for(var n=0;n 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 je(){var e=[],t=[];return{clear:function(){t=Gb,e=Gb},notify:function(){for(var n=e=t,i=0;i1&&void 0!==arguments[1]?arguments[1]:{},r=o.getDisplayName,a=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,s=o.methodName,c=void 0===s?"connectAdvanced":s,d=o.renderCountProp,l=void 0===d?void 0:d,u=o.shouldHandleStateChanges,p=void 0===u||u,f=o.storeKey,h=void 0===f?"store":f,m=o.withRef,b=void 0!==m&&m,g=Db(o,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),w=h+"Subscription",v=Jb++,y=(t={},t[h]=Ob,t[w]=Mb,t),x=(i={},i[w]=Mb,i);return function(t){Hb("function"==typeof t,"You must pass a component to the function returned by connect. Instead received "+JSON.stringify(t));var i=t.displayName||t.name||"Component",o=a(i),r=Wb({},g,{getDisplayName:a,methodName:c,renderCountProp:l,shouldHandleStateChanges:p,storeKey:h,withRef:b,displayName:o,wrappedComponentName:i,WrappedComponent:t}),s=function(i){function a(e,t){Nb(this,a);var n=zb(this,i.call(this,e,t));return n.version=v,n.state={},n.renderCount=0,n.store=e[h]||t[h],n.propsMode=Boolean(e[h]),n.setWrappedInstance=n.setWrappedInstance.bind(n),Hb(n.store,'Could not find "'+h+'" in either the context or props of "'+o+'". Either wrap the root component in a , or explicitly pass "'+h+'" as a prop to "'+o+'".'),n.initSelector(),n.initSubscription(),n}return Bb(a,i),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(){p&&(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=qe,this.store=null,this.selector.run=qe,this.selector.shouldComponentUpdate=!1},a.prototype.getWrappedInstance=function(){return Hb(b,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+c+"() call."),this.wrappedInstance},a.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},a.prototype.initSelector=function(){var t=e(this.store.dispatch,r);this.selector=Le(t,this.store),this.selector.run(this.props)},a.prototype.initSubscription=function(){if(p){var e=(this.propsMode?this.props:this.context)[w];this.subscription=new Qb(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(Xb)):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(!(b||l||this.propsMode&&this.subscription))return e;var t=Wb({},e);return b&&(t.ref=this.setWrappedInstance),l&&(t[l]=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 n(t,this.addExtraProps(e.props))},a}(I);return s.WrappedComponent=t,s.displayName=o,s.childContextTypes=x,s.contextTypes=y,s.prototype.componentWillUpdate=function(){this.version!==v&&(this.version=v,this.initSelector(),this.subscription&&this.subscription.tryUnsubscribe(),this.initSubscription(),p&&this.subscription.trySubscribe())},Ub(s,t)}}function Fe(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function Ue(e,t){if(Fe(e,t))return!0;if("object"!==(void 0===e?"undefined":Eb(e))||null===e||"object"!==(void 0===t?"undefined":Eb(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":Eb(e))+" for "+n+" argument when connecting component "+i.wrappedComponentName+".")}}function mt(e,t){return e===t}function bt(e){var t=window.ga;if(t)try{for(var n=t.getAll(),i=0;iMath.pow(2,X_.repeat-1)&&(nC=1),Pa(Z_,{frequencyLimit:lC(tC,nC)}),nC}function Ct(){Pa(Z_,{frequencyLimit:lC(eC,$_.join(":"))})}function kt(){iC&&(clearInterval(iC),iC=null)}function St(){rC.forEach(function(e){clearTimeout(e)}),rC=[]}function At(){aC&&clearTimeout(aC),aC=null}function Tt(){cC(!1),$_=[],St(),At(),Pa(Z_,{frequencyLimit:lC(K_,"")}),Pa(Z_,{frequencyLimit:lC(eC,"")})}function It(){var e=X_.penalty*nC*1e3;Pa(Z_,{frequencyLimit:lC(K_,(new Date).getTime()+e)}),cC(!0),aC=setTimeout(Tt,e),_t()}function Rt(){return!!aC||!($_.length<=X_.count)&&(It(),!0)}function Pt(){$_.shift(),rC.shift(),Ct()}function Mt(){if(!aC){$_.push((new Date).getTime()),Ct();var e=setTimeout(Pt,1e3*X_.duration);rC.push(e)}}function Ot(){iC=setInterval(function(){var e=Rt(),t=Math.max(0,Math.floor((xt()-(new Date).getTime())/1e3));e&&t>0?oC(t):(oC(0),kt())},1e3)}function Et(e){var t=sk.map(function(t){return t(e)});return function(){t.forEach(function(e){e()})}}!function(e){-1!==navigator.userAgent.indexOf("MSIE 9")&&e.addEventListener("selectionchange",function(){var t=e.activeElement;if("TEXTAREA"===t.tagName||"INPUT"===t.tagName&&"text"===t.type){var n=e.createEvent("CustomEvent");n.initCustomEvent("input",!0,!0,{}),t.dispatchEvent(n)}})}(document);var Nt="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Wt="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},Bt=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Dt=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n},qt=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},Lt=e(function(e){!function(t){function n(){}function i(e,t){return function(){e.apply(t,arguments)}}function o(e){if("object"!==Wt(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 r(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?a:s)(t.promise,e._value);var i;try{i=n(e._value)}catch(e){return void s(t.promise,e)}a(t.promise,i)})}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===(void 0===t?"undefined":Wt(t))||"function"==typeof t)){var n=t.then;if(t instanceof o)return e._state=3,e._value=t,void c(e);if("function"==typeof n)return void l(i(n,t),e)}e._state=1,e._value=t,c(e)}catch(t){s(e,t)}}function s(e,t){e._state=2,e._value=t,c(e)}function c(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;t0?o(i(e),9007199254740991):0}},function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},function(e,t,n){var i=n(0),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t,n){var i=n(13);e.exports=function(e){return Object(i(e))}},function(e,t,n){var i=n(10),o=n(7),r=n(17),a=n(14),s=n(42);e.exports=function(e,t){var n=1==e,c=2==e,d=3==e,l=4==e,u=6==e,p=5==e||u,f=t||s;return function(t,s,h){for(var m,b,g=r(t),w=o(g),v=i(s,h,3),y=a(w.length),x=0,_=n?f(t,y):c?f(t,0):void 0;y>x;x++)if((p||x in w)&&(m=w[x],b=v(m,x,g),e))if(n)_[x]=b;else if(b)switch(e){case 3:return!0;case 5:return m;case 6:return x;case 2:_.push(m)}else if(l)return!1;return u?-1:d||l?l:_}}},function(e,t,n){var i=n(16)("wks"),o=n(6),r=n(0).Symbol,a="function"==typeof r;(e.exports=function(e){return i[e]||(i[e]=a&&r[e]||(a?r:o)("Symbol."+e))}).store=i},function(e,t,n){var i=n(19)("unscopables"),o=Array.prototype;void 0==o[i]&&n(3)(o,i,{}),e.exports=function(e){o[i][e]=!0}},function(e,t,n){n(22),n(40),n(41),e.exports=n(45)},function(e,t,n){var i=n(1);i(i.S+i.F,"Object",{assign:n(31)})},function(e,t,n){var i=n(24),o=n(25),r=n(27),a=Object.defineProperty;t.f=n(4)?Object.defineProperty:function(e,t,n){if(i(e),t=r(t,!0),i(n),o)try{return a(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}},function(e,t,n){var i=n(2);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(4)&&!n(5)(function(){return 7!=Object.defineProperty(n(26)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var i=n(2),o=n(0).document,r=i(o)&&i(o.createElement);e.exports=function(e){return r?o.createElement(e):{}}},function(e,t,n){var i=n(2);e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!i(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var i=n(0),o=n(3),r=n(9),a=n(6)("src"),s=Function.toString,c=(""+s).split("toString");n(8).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var d="function"==typeof n;d&&(r(n,"name")||o(n,"name",t)),e[t]!==n&&(d&&(r(n,a)||o(n,a,e[t]?""+e[t]:c.join(String(t)))),e===i?e[t]=n:s?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var i=n(32),o=n(38),r=n(39),a=n(17),s=n(7),c=Object.assign;e.exports=!c||n(5)(function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=i})?function(e,t){for(var n=a(e),c=arguments.length,d=1,l=o.f,u=r.f;c>d;)for(var p,f=s(arguments[d++]),h=l?i(f).concat(l(f)):i(f),m=h.length,b=0;m>b;)u.call(f,p=h[b++])&&(n[p]=f[p]);return n}:c},function(e,t,n){var i=n(33),o=n(37);e.exports=Object.keys||function(e){return i(e,o)}},function(e,t,n){var i=n(9),o=n(11),r=n(34)(!1),a=n(36)("IE_PROTO");e.exports=function(e,t){var n,s=o(e),c=0,d=[];for(n in s)n!=a&&i(s,n)&&d.push(n);for(;t.length>c;)i(s,n=t[c++])&&(~r(d,n)||d.push(n));return d}},function(e,t,n){var i=n(11),o=n(14),r=n(35);e.exports=function(e){return function(t,n,a){var s,c=i(t),d=o(c.length),l=r(a,d);if(e&&n!=n){for(;d>l;)if((s=c[l++])!=s)return!0}else for(;d>l;l++)if((e||l in c)&&c[l]===n)return e||l||0;return!e&&-1}}},function(e,t,n){var i=n(15),o=Math.max,r=Math.min;e.exports=function(e,t){return e=i(e),e<0?o(e+t,0):r(e,t)}},function(e,t,n){var i=n(16)("keys"),o=n(6);e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var i=n(1);i(i.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var i=n(1),o=n(18)(5),r=!0;"find"in[]&&Array(1).find(function(){r=!1}),i(i.P+i.F*r,"Array",{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(20)("find")},function(e,t,n){var i=n(43);e.exports=function(e,t){return new(i(e))(t)}},function(e,t,n){var i=n(2),o=n(44),r=n(19)("species");e.exports=function(e){var t;return o(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!o(t.prototype)||(t=void 0),i(t)&&null===(t=t[r])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var i=n(12);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n){var i=n(1),o=n(18)(6),r="findIndex",a=!0;r in[]&&Array(1)[r](function(){a=!1}),i(i.P+i.F*a,"Array",{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(20)(r)}])}(1,1),window.Promise||(window.Promise=Lt);var Vt=e(function(e,t){function n(e,t){function n(r,a){if(e(r,a))return!0;if(Array.isArray(r))return!(!Array.isArray(a)||r.length!==a.length)&&!!r.every(function(e,t){return n(e,a[t])});if(Array.isArray(a))return!1;if("object"===(void 0===r?"undefined":i(r))){if("object"!==(void 0===a?"undefined":i(a)))return!1;var s=null===r,c=null===a;if(s||c)return s===c;var d=Object.keys(r),l=Object.keys(a);if(d.length!==l.length)return!1;var u=t?n:e;return!!d.every(function(e){return o(r,e)&&o(a,e)&&u(r[e],a[e])})}return!1}return n}t.__esModule=!0;var i="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};t.default=n;var o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}),Ft=e(function(e,t){function n(e,t){function n(e){var n=o.findIndex(function(n){return t(e,n.key)});if(n>-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}),Ut=e(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}),Ht=e(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return 1===e?(0,c.default)(t):(0,s.default)(e,t)}function o(e,t){var n=t?(0,a.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)}},pn=function(e,t){return Object.assign({},e,t)},fn=function(e,t){for(var n=t.split("."),i=e,o=0;o.7},xn=function(e){return e<10?"0"+e:""+e},_n=function(e){var t=e.getHours(),n=e.getMinutes();return xn(t)+":"+xn(n)},Cn=function(e){var t=e||window.event;return 13===(t.charCode||t.which||t.keyCode)&&!t.shiftKey},kn=function(e,t){var n=new RegExp("(&?)"+t+"=([^&]*)(&|$)","i"),i=e.match(n);return null!=i?decodeURIComponent(i[2]):null},Sn=function(e){var t=/:\/\/([^\/]+)\/?/.exec(e);return t&&t[1]},An=function(e){var t=e;return/^https:\/\/|http:\/\/|ftp:\/\//i.test(e)||(t="http://"+e),n("a",{href:t,target:"_blank",rel:"noopener noreferrer"},e)},Tn=function(e){return!!e&&("function"==typeof e.then&&"function"==typeof e.catch)},In=function(e,t,n){var i=void 0,o=void 0,r=void 0,a=void 0,s=void 0,c=function c(){var d=Date.now()-r;d0?s=setTimeout(c,t-d):(s=null,n||(a=e.apply(i,o),s||(i=null,o=null)))};return function(){i=this;for(var d=arguments.length,l=Array(d),u=0;u=0||Mn.indexOf("Trident/")>=0}(),En=function(){return Mn.indexOf("MSIE 10")>=0}(),Nn=function(){return Mn.toLowerCase().indexOf("iphone")}(),Wn=function(){return void 0!==document.createElement("a").style.animationName||!1}(),Bn=function(e,t){var n={};t.forEach(function(e){n[e.toLowerCase()]=e});var i={},o={};return Object.keys(e).forEach(function(t){var r=n[t.toLowerCase()];r?i[r]=e[t]:o[t]=e[t]}),[i,o] },Dn=".btn,.buttonProgressContainer{position:relative;text-align:center}.controlIndicator::after,.select-box::after,.select-box::before{content:''}.btn,.bubble__operation .btn{max-width:100%}.btn,.select-box .select{outline:0;font-size:1em;-webkit-appearance:none}*,::after,::before{box-sizing:border-box}button{margin:0;padding:0;font-family:\"SourceSans Pro\",Arial;-webkit-appearance:none}.btn{text-decoration:none;zoom:1;display:inline-block;margin-bottom:0;font-weight:500;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;line-height:1.5;padding:4px 10px;font-family:\"SourceSans Pro\";border-radius:2px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:inherit}.disabled{opacity:.6;filter:alpha(opacity=60);cursor:default;box-shadow:none!important}.btn-grey:active,.btn-primary:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-primary{color:#000004;background:#000001;border:1px solid #000001}.btn-primary.disabled{background-color:#000001!important;border:1px solid #000001!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}.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}.window--classic .btn{border-radius:2px}.window--circle .btn{border-radius:20px}.window--bubble .btn{border-radius:8px}.buttonProgressBtnAnimated{-webkit-animation-fill-mode:both;animation-fill-mode:both}.buttonProgressBtnDefaultSize{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%;width:128px}.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:#000001;border:1px solid #000001;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:#000001;border:1px solid #000001;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}.bubble__operation .btn,.header__agentBio,.header__agentName,.header__agentTitle,.title-buttons__operation--text a,.window--classic .header__agentTitle{text-overflow:ellipsis;overflow:hidden}.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}.container-checkbox,.container-checkboxlist,.horizontal{display:inline-block}.checkbox2,.control,.select-box .select,svg:hover{cursor:pointer}.buttonProgress__submitLoadingPath{fill:#000001}.buttonProgress__submitCirclePath{stroke:#000001;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:#000001;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 #000001;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}.container-checkbox{position:relative;color:#666;padding-left:18px}.container-checkbox.disable{pointer-events:none}.container-checkbox i{display:inline-block;width:14px;height:14px;position:absolute;left:0;top:50%;margin-top:-7px}.checkbox+.selected .checkbox3{fill:#000001;cursor:pointer}.checkbox:focus+.selected .checkbox2,.container-checkbox:hover>.selected .checkbox2{fill:#000001}.checkbox2{fill:#ddd}.unselected .checkbox3{fill:#fafafa}.checkbox:focus+.unselected .checkbox2,.container-checkbox:hover>.unselected .checkbox2{fill:#000001}.checkbox{position:absolute;z-index:-1;opacity:0}.horizontal{margin-right:10px}.control,.vertical{display:block}.container-checkbox input[type=Checkbox]:disabled~.text{opacity:.6;pointer-events:none}.checkbox1{fill-rule:evenodd;clip-rule:evenodd;fill:#fafafa}.control{position:relative;padding-left:20px;margin-bottom:5px;font-size:1em;color:#666}.control input[type=radio]{position:absolute;z-index:-1;opacity:0}.controlIndicator{position:absolute;top:50%;left:0;margin-top:-8px;height:16px;width:16px;border:1px solid #cdcdcd;background-color:#fff}.controlRadio .controlIndicator{border-radius:50%}.control input[type=radio]:focus~.controlIndicator,.control:hover input[type=radio]~.controlIndicator{border-color:#8a8a8a}.control input[type=radio]:checked~.controlIndicator{background:#fff}.control input[type=radio]:disabled~.controlIndicator{background:#e6e6e6;opacity:.6;pointer-events:none}.controlIndicator::after{position:absolute;display:none}.controlRadio .controlIndicator::after{left:3px;top:3px;height:8px;width:8px;border-radius:50%;background:#000001}.control input[type=radio]:checked~.controlIndicator::after{display:block}.controlRadio.horizontal{float:left;margin-right:20px}.select-box{position:relative;padding:3px;height:35px;background:#fff;border-radius:2px}.select-box::before{position:absolute;right:0;top:0;width:35px;height:34px;border-left:1px solid #ddd}.select-box::after{position:absolute;right:13px;top:15px;width:0;height:0;border:6px solid transparent;border-left-width:4px;border-right-width:4px;border-top-color:#a6a6a6}.select-box .select{position:absolute;left:0;right:0;top:0;bottom:0;z-index:9;padding:5px 40px 5px 10px;background:0 0;height:100%;width:100%;color:#000;border:1px solid #ddd;font-family:inherit;-moz-appearance:none;appearance:none}.input,.multipleText{-webkit-appearance:none;font-size:1em;outline:0}.select-box .select::-ms-expand{display:none}.select-box .select:focus{border-color:#000001}.window--classic .select-box,.window--classic .select-box .select{border-radius:2px}.window--circle .select-box,.window--circle .select-box .select{border-radius:20px}.window--bubble .select-box,.window--bubble .select-box .select{border-radius:8px}.svg{width:16px;height:16px}.svg--loading{width:22px;height:22px}.svg--loadingChat{display:block;width:28px;height:28px;margin:0 auto}.prepend,.prependContainer{display:inline-block}.bubble .btn:first-child,.rating .star{margin-right:10px}.svg.disabled{opacity:.3}.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}.input{border:1px solid #ddd;padding:5px 10px;border-radius:2px;transition:border-color ease-in-out .2s}.input:disabled{background-color:#f5f5f5}.input[readOnly]{border:0}input.attachTicket{width:100px;margin-left:5px}.input:not(.input--effect01):focus{border-color:#000001;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;border-right-color:#000001;padding:5px 10px;border-radius:0}.input__focusBorder{display:block}.input.input--effect01~.input__focusBorder::after,.input.input--effect01~.input__focusBorder::before{content:\"\";position:absolute;top:0;left:0;width:0;height:1px;background-color:#000001}.input.input--effect01~.input__focusBorder::after{top:auto;bottom:0;left: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-color:#000001}.input.input--effect01~.input__focusBorder i::after{left:auto;right:0;top:0;bottom:0;background:#ccc;height:100%}.input.input--effect01:focus~.input__focusBorder::after,.input.input--effect01:focus~.input__focusBorder::before{width:100%;transition:156ms;transition-delay:26ms}.input.input--effect01:focus~.input__focusBorder i::after,.input.input--effect01:focus~.input__focusBorder i::before{height:100%;transition:26ms;top:0}.input.input--effect01:focus~.input__focusBorder i::after{height:0;transition-delay:182ms;top:50%}.input--circle,.window--circle .input{border-radius:20px;padding:5px 15px}.input--bubble,.window--bubble .input{border-radius:8px}.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)}.multipleText{border:1px solid #ddd;padding:5px;transition:border-color .2s;border-radius:2px;width:100%;overflow:auto}.multipleText:disabled{background-color:#f5f5f5}.multipleText:focus{border-color:#000001;outline:0}.multipleText.error,.multipleText.error:focus,.multipleText.error:hover{border-color:#d34747}.window--classic .multipleText{border-radius:2px}.window--circle .multipleText{border-radius:20px;padding:15px}.window--bubble .multipleText{border-radius:8px;padding:5px 10px}.bubble-box{display:none}.bubble{position:absolute;width:280px;background:#fff;padding:20px 16px;text-align:center;font-size:1em;line-height:20px;border-radius:4px;box-shadow:0 0 10px rgba(0,0,0,.3);z-index:99}.window--circle .bubble{padding:20px}.window__footer .bubble{font-size:1.25em}.bubble::before,.bubble__arrowDown,.bubble__arrowDown::before{content:'';position:absolute;width:0;height:0;border:6px solid transparent;z-index:9}.bubble::after,.bubble__arrowDown::after{content:'';position:absolute;width:0;height:0;border:8px solid transparent;z-index:8}.bubble-up{left:-12px;bottom:35px;-webkit-transform-origin:20px calc(100% + 19px);-ms-transform-origin:20px calc(100% + 19px);transform-origin:20px calc(100% + 19px)}.window--bubble .bubble-up,.window--circle .bubble-up{-webkit-transform-origin:207px calc(100% + 19px);-ms-transform-origin:207px calc(100% + 19px);transform-origin:207px calc(100% + 19px)}.window--bubble .bubble-up{-webkit-transform-origin:177px calc(100% + 19px);-ms-transform-origin:177px calc(100% + 19px);transform-origin:177px calc(100% + 19px)}.window--bubble .chat-input__controlbox--disabled .bubble-up{-webkit-transform-origin:257px calc(100% + 19px);-ms-transform-origin:257px calc(100% + 19px);transform-origin:257px calc(100% + 19px)}.window--bubble.window--rtl .bubble-up,.window--circle.window--rtl .bubble-up{-webkit-transform-origin:42px calc(100% + 19px);-ms-transform-origin:42px calc(100% + 19px);transform-origin:42px calc(100% + 19px)}.window--bubble.window--rtl .chat-input__controlbox--disabled .bubble-up{-webkit-transform-origin:12px calc(100% + 19px);-ms-transform-origin:12px calc(100% + 19px);transform-origin:12px calc(100% + 19px)}.bubble-up .bubble__arrowDown,.window--classic .bubble-up::before{bottom:-12px;left:12px;border-top-color:#fff}.window--bubble .bubble-up::before,.window--circle .bubble-up::before{bottom:-12px;left:207px;border-top-color:#fff;display:none}.window--bubble .chat-input__controlbox--disabled .bubble-up::before{left:252px}.window--bubble.window--rtl .bubble-up::before,.window--circle.window--rtl .bubble-up::before{left:42px}.window--bubble.window--rtl .chat-input__controlbox--disabled .bubble-up::before{left:12px}.bubble__arrowDown::before{border-top-color:#fff;top:-7px;left:-6px}.bubble__arrowDown::after{border:6px solid transparent;border-top-color:rgba(0,0,0,.15);top:-6px;left:-6px}.bubble-down{right:-11px;top:30px;top:calc(100% + 10px);-webkit-transform-origin:calc(100% - 11px) -16px;-ms-transform-origin:calc(100% - 11px) -16px;transform-origin:calc(100% - 11px) -16px}.bubble-down::before{top:-12px;right:16px;border-bottom-color:#fff}.bubble-down::after{top:-16px;right:14px;border-bottom-color:rgba(0,0,0,.08)}.window--classic .bubble-up::after{bottom:-16px;left:10px;border-top-color:rgba(0,0,0,.08)}.window--classic .bubble-down{right:0}.window--classic .bubble-down::before{top:-12px;right:7px}.window--classic .bubble-down::after{top:-16px;right:5px}.window--circle .bubble-down::before{right:18px}.window--circle .bubble-down::after{right:16px}.window--bubble .bubble-down::before{right:7px}.window--bubble .bubble-down,.window--bubble .bubble-down::after{right:5px}.bubble-box--show{display:block}.bubble-box--show .bubble{-webkit-animation:showBubble 333ms cubic-bezier(.785,.135,.15,.86) both;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)}}.bubble-close{position:absolute;right:12px;top:10px}.bubble__operation{margin-top:10px}.window--bubble .bubble,.window--bubble .bubble__operation .btn{border-radius:8px}.window--circle .bubble,.window--circle .bubble__operation .btn{border-radius:20px}.embedded-end-chatConfirmAction.bubble__operation .btn{max-width:112px}.bubble--title{color:#666;font-size:1.13em;margin-bottom:13px;word-wrap:break-word}.bubble--desc{font-size:1em;color:#666;margin-bottom:10px}.bubble--textarea{position:relative;border-radius:4px;margin-top:15px}.bubble__required{color:#de3939}.rating .bubble__required{position:relative;top:-5px}.bubble--textarea .bubble__required{position:absolute;top:27px;right:-10px}.rating,.rating .star{position:relative}.window--mobile .bubble__arrowDown{display:none}.bubble .multipleText{display:block}.bubble .rating{height:30px}.rating .star{display:inline-block;font-size:2em;line-height:30px;color:#c8c8c8;cursor:pointer}.rating .star:last-child{margin-right:0}.window--bubble .form-fields--horizonal .rating .star{font-size:1.06em;line-height:16px;margin-right:6px}.window--circle .form-fields--horizonal .rating .star{font-size:1.66em;line-height:25px}.rating .star.animate{color:#ffd051;-webkit-animation:stretch-bounce 542ms ease-in-out both;animation:stretch-bounce 542ms ease-in-out both}.window--ie .rating .animate.star{-webkit-animation:none;animation:none}.rating .star.hidden{opacity:0}.rating .full::before{display:inline-block;position:relative;float:right;z-index:2}.rating .full{outline:0}.rating .half::before{position:absolute;float:left;z-index:3}.rating .starColour{color:#ffd051;outline:0}@-webkit-keyframes stretch-bounce{0%{-webkit-transform:scale(1);transform:scale(1);color:#c8c8c8}38.5%{-webkit-transform:scale(1.2);transform:scale(1.2);color:#c8c8c8}61.5%{-webkit-transform:scale(0);transform:scale(0);color:#c8c8c8}100%{-webkit-transform:scale(1);transform:scale(1);color:#ffd051}}@keyframes stretch-bounce{0%{-webkit-transform:scale(1);transform:scale(1);color:#c8c8c8}38.5%{-webkit-transform:scale(1.2);transform:scale(1.2);color:#c8c8c8}61.5%{-webkit-transform:scale(0);transform:scale(0);color:#c8c8c8}100%{-webkit-transform:scale(1);transform:scale(1);color:#ffd051}}.rating .selected::before{display:inline-block;position:absolute;top:0;left:0;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:1;z-index:1}.rating .selected.pulse::before{-webkit-transform:scale(3);-ms-transform:scale(3);transform:scale(3);opacity:0}.rating .selected.isAnimated::before{transition:1s ease-out}.window__headerContainer,.window__headerVessel{-ms-flex-negative:0;flex-shrink:0}.window__header{width:100%;min-height:30px;overflow:hidden;transition:height .4s cubic-bezier(.785,.135,.15,.86)}.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)}.window--ie .window--classic .window__header--fadeInDown{-webkit-animation:none;animation:none}.window__headerBox{padding:15px 25px;width:100%}.window__headerBox--onlylogo{min-height:85px}.window__headerBox--fadeInDown{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);transition:all 292ms cubic-bezier(.785,.135,.15,.86) 1.792s}.chat-time,.window--bubble:hover .window__title{transition:opacity .4s cubic-bezier(.785,.135,.15,.86)}.title-buttons__operation{display:block;float:left;padding-left:7px;padding-right:7px}.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}.window--classic .title-buttons__operation--text{border-left-color:#000004}.title-buttons__operation--text a{color:#fff;text-decoration:none;cursor:pointer;display:block;max-width:62px;max-height:21px;white-space:nowrap}.window--circle .title-buttons__operation--text a{color:#a3a3a3}.window--classic .title-buttons__operation--text a{color:#000004}.header__teamAvatar--gray .header__teamAvatarImg{filter:gray;-webkit-filter:grayscale(100%)}.window--classic .main-container .window__title{position:absolute;right:2px;top:5px}.window--classic .window__header{background:#000001;box-shadow:0 1px 5px rgba(0,0,0,.15)}.window--classic .icon-close,.window--classic .icon-embedded,.window--classic .icon-minimize,.window--classic .icon-popup{color:#000004;font-size:.8em}.header__bannerImg{max-height:90px}.window--classic .header__bannerImg{display:block;max-width:calc(100% + 50px);margin:15px -25px -15px}.window--classic .header__agentInfo{max-width:calc(100% - 60px)}.window--classic .header__agentInfoNoAvatar{max-width:100%;width:100%}.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{margin-right:10px;width:50px;height:50px;-ms-flex-item-align:start;align-self:flex-start}.chat-time,.window--bubble .chat-time{-ms-grid-row-align:center;align-self:center}.window--classic .header__avatarImage{display:block;border-radius:100%;width:50px;height:50px}.header__agent{position:relative}.header__agent--compact:hover::before{content:'';position:absolute;z-index:99;width:calc(100% + 20px);height:calc(100% - 10px);background:rgba(0,0,0,.1);border-radius:4px;left:-10px;top:-5px;cursor:pointer}.window--circle .header__agent--compact:hover::before{width:100%;height:100%;left:0;top:0}.window--classic .header__agent{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.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}.window--ie .window--classic .header__agent--fadeInUp{-webkit-animation:none;animation:none}.window--classic .header__agent--withlogo{float:left;max-width:calc(100% - 180px);height:50px}.header__agentName,.header__agentTitle{max-width:100%;white-space:nowrap}.header__agentName{font-family:\"SourceSans Pro Light\",Arial}.window--classic .header__agentName{font-size:1.2em;color:#000004;text-shadow:0 1px 1px rgba(0,0,0,.2)}.window--classic .header__agentTitle{margin-top:3px;font-size:.93em;color:#000004;opacity:.45;text-shadow:0 1px 1px rgba(0,0,0,.2);white-space:nowrap}.header__agentBio{max-height:80px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;word-wrap:break-word}.window--classic .header__agentBio{font-size:.93em;color:#000004;opacity:.7;text-shadow:0 1px 1px rgba(0,0,0,.2);margin-top:9px;margin-bottom:12px}.window--classic .header__agentBio a{color:#000004}.window--classic .header__logo{float:right;margin-top:17px}.window--classic .header__logoImg{max-height:53px;max-width:170px;display:block}.window--bubble .header__agentBio,.window--circle .header__agentBio{line-height:20px;max-height:80px;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.window--classic .header__teamName{font-size:1.2em;color:#000004;text-align:center;text-shadow:0 1px 1px rgba(0,0,0,.2)}.window--classic .header__teamAvatar{position:relative;width:110px;height:50px;margin:11px auto 10px}.window--classic .header__teamAvatarImg{position:absolute;border-radius:100%;box-shadow:0 1px 5px rgba(0,0,0,.3)}.window--classic .header__teamAvatarImg:nth-child(1){left:0;z-index:9}.window--classic .header__teamAvatarImg:nth-child(2){left:30px;z-index:8;opacity:.7}.window--classic .header__teamAvatarImg:nth-child(3){left:60px;z-index:7;opacity:.5}.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% + 80px);margin:25px -40px -15px}.window--circle .header__avatar{position:fixed;top:0;left:50%;margin-left:-42px}.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}.window--ie .window--circle .header__avatar--fadeInDown{-webkit-animation:none;animation:none}.window--circle .header__avatarImage{display:block;border-radius:100%;width:85px;height:85px;border:1px solid #ddd}.window--circle .header__agentInfo{text-align:center;margin-top:35px}.window--circle .header__agentInfoNoAvatar{margin-top:0}.window--circle .header__agentName{max-width:calc(100% - 90px);margin:0 auto;font-size:1.2em;color:#000}.window--circle .header__agentTitle{font-size:.93em;color:rgba(0,0,0,.3);margin-bottom:5px}.window--circle .header__agentBio{font-size:.93em;color:rgba(0,0,0,.5);display:-webkit-box}.window--circle .header__agentBio a{color:rgba(0,0,0,.5)}.window--circle .header__teamName{font-size:1.2em;color:#000;margin-top:38px;text-align:center}.window--circle .header__teamNameNoAvatar{margin-top:10px}.window--circle .header__teamAvatar{position:fixed;left:50%;top:0;width:165px;height:85px;margin-bottom:10px;margin-left:-82px;-webkit-animation:fadeInDown 292ms cubic-bezier(.785,.135,.15,.86) both;animation:fadeInDown 292ms cubic-bezier(.785,.135,.15,.86) both}.window--ie .window--circle .header__teamAvatar{-webkit-animation:none;animation:none}.window--circle.window--minimized .header__teamAvatar{top:-45px}.window--circle .header__teamAvatarImg{position:absolute;border-radius:100%;box-shadow:0 1px 5px rgba(0,0,0,.3)}.window--circle .header__teamAvatarImg:nth-child(1){width:75px;height:75px;z-index:8;top:5px}.window--circle .header__teamAvatarImg:nth-child(2){width:85px;height:85px;left:40px;z-index:9}.window--circle .header__teamAvatarImg:nth-child(3){width:75px;height:75px;left:90px;z-index:8;top:5px}.window--circle .icon-close,.window--circle .icon-embedded,.window--circle .icon-minimize,.window--circle .icon-popup{color:#a3a3a3;font-size:.8em}.window--circle .main-container .window__title{position:absolute;right:13px;top:16px}.window--circle .window__headerBox{min-height:55px;border-bottom:1px solid #ddd;width:calc(100% - 30px);margin:0 auto}.window--circle .header-operator{margin-bottom:17px}.window--bubble .window__title{visibility:hidden;opacity:0}.window--bubble:hover .window__title,.window--mobile .window--bubble .window__title{visibility:visible;opacity:1}.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.2em;color:#000}.window--bubble .header__agentTitle{font-size:.93em;color:rgba(0,0,0,.3)}.window--bubble .header__agentBio{font-size:.93em;color:rgba(0,0,0,.5);margin-top:5px;display:-webkit-box}.window__formError,.window__formGreeting,.window__ssologinError,.window__ssologinGreeting{line-height:18px;font-size:.93em}.window--bubble .icon-close,.window--bubble .icon-embedded,.window--bubble .icon-minimize,.window--bubble .icon-popup{color:#fff;font-size:.8em}.window--bubble .main-container .window__title{position:absolute;right:0;top:0;z-index:999;background:#7f7f7f;padding:2px 3px;border-radius:20px}.window--bubble:not(.window--embedded) .main-container .window__title{top:5px;right:15px}.window--bubble .window__headerBox{padding-bottom:0}.window--bubble .header-operator{border-bottom:1px solid #ddd;padding-bottom:28px}.window__ssologin{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding:28px 40px}.window__ssologinError{color:#de3939;margin-bottom:26px}.window__ssologinGreeting{color:#666;margin-bottom:28px;text-align:center}.window__ssologinForm{text-align:center}.window__ssologinOperation{display:block;margin:0 auto 20px;overflow:hidden;text-overflow:ellipsis}.window__ssologinOperation:last-child{margin-bottom:0}.prechatForm__signinwith,.prechatForm__social{float:left}.prechatForm__social{margin-left:15px;margin-top:2px}.prechatForm__social i{cursor:pointer}.prechatForm__login{color:#666}.prechatForm__divide{position:relative;display:block;text-align:center;margin-top:10px;margin-bottom:25px}.prechatForm__divide::after,.prechatForm__divide::before{border-top:1px solid #ddd;width:41%;position:absolute;top:11px;content:''}.prechatForm__divide::before{left:0}.prechatForm__divide::after{right:0}.window--bubble .window__form.window__ssologin{padding:28px 30px 30px;margin-top:35px}.loading{display:block;background-size:50px}.icon-facebook{margin-right:10px;color:#39599c}.window--rtl .icon-facebook{margin-left:10px}.icon-googleplus{color:#ce3829}.window__formContainer--bubble{overflow:hidden;overflow-y:auto;padding-right:5px;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;margin-top:35px}.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:27px 40px 0;overflow-x:hidden}.window__form--animation{-webkit-animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both;animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both}.window--ie .window__form--animation{-webkit-animation:none;animation:none}.window--mobile .window__form{padding:27px 25px 30px}.window--bubble .window__form{margin-left:10px;padding:28px 30px;border:1px solid #ddd;border-radius:8px 8px 8px 0;width:auto;background-color:#fff;-ms-flex-negative:0;flex-shrink:0;position:relative;overflow:visible}.window--mobile .window--bubble .window__form{margin-bottom:10px}.window--mobile .window--bubble .icon-bubble-content,.window--mobile .window--bubble .icon-bubble-line{left:10px}.window--bubble .window__form .icon-bubble-content,.window--bubble .window__form .icon-bubble-line{position:absolute}.window--bubble .window__form .icon-bubble-content{left:-9px}.window--bubble .window__form .icon-bubble-line{left:-10px}.window--bubble .icon-bubble-content::before{color:#fff}.window--bubble .window__form .icon-bubble-content .bubblecontent1{fill:#fff}.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{color:#666;margin-bottom:25px;word-wrap:break-word;word-break:break-word}.window__formGreeting a{color:#666}.window__chat .window__formGreeting{text-align:center}.window__formError{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 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:20px;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}.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:7px;color:#666;word-wrap:break-word;word-break:break-word}.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{-ms-flex-negative:1;flex-shrink:1}.form-fields--horizonal .field-name{margin-bottom:0;margin-right:10px;-ms-flex-preferred-size:80px;flex-basis:80px;-ms-flex-negative:0;flex-shrink:0}.form-fields--horizonal .form__ticketPrefix{-ms-flex-negative:0;flex-shrink:0}.form-fields .field__requiredTag{margin-left:7px;color:#de3939}.form-fields .field__requiredMsg{background:rgba(222,57,57,.9);padding:4px 10px;color:#fff;position:relative;left:7px;font-size:.93em;border-radius:2px}.form-fields .field__requiredMsg::before{content:'';position:absolute;left:-9px;top:8px;width:0;height:0;border:5px solid transparent;border-right-color:rgba(222,57,57,.9)}.window--rtl .form-fields .field__requiredMsg{left:0}.window--rtl .form-fields .field__requiredMsg::before{left:auto;right:-9px;border-right-color:transparent;border-left-color:rgba(222,57,57,.9)}.form-fields--horizonal .field__requiredMsg{position:absolute;left:0;bottom:-28px;z-index:9;border-radius:2px}.form-fields--horizonal .field__requiredMsg::before{left:14px;top:-10px;border-right-color:transparent;border-bottom-color:rgba(222,57,57,.9)}.form__input{height:35px;width:100%}.form__textarea{height:auto}.form__submitContainer{position:relative;text-align:center;margin-top:30px;padding-bottom:30px}.form__submit{width:160px}.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}@-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:#000001;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}}.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%}.window__chat--animation{-webkit-animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both;animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both}.window--ie .window__chat--animation{-webkit-animation:none;animation:none}.window__chatSystemMessage{color:#bbb;font-size:1em;margin-bottom:17px;text-align:center}.window__chatSystemMessage a{color:#bbb}.window__chatAgent,.window__chatVisitor{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:10px;-webkit-animation:message--show 458ms cubic-bezier(.785,.135,.15,.86);animation:message--show 458ms cubic-bezier(.785,.135,.15,.86)}.window--bubble .window__chatSystemMessage{-webkit-animation:message--show 458ms cubic-bezier(.785,.135,.15,.86);animation:message--show 458ms cubic-bezier(.785,.135,.15,.86)}.window--ie .window--bubble .window__chatSystemMessage,.window--ie .window__chatAgent,.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{float:left;margin-right:10px}.agentMessage__avatarImg{display:block;width:30px;height:30px;border-radius:100%}.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)}.agentMessage__pciSubmit{background:url(images/pci.svg) left center no-repeat;background-size:53px 34px;height:53px;text-align:center}.agentMessage__pciSubmit .form__submit{width:70px;margin-top:10px}.agentMessage__pciSubmit .btn-grey{margin-left:7px}.window__chatAgentMessage,.window__chatVisitorMessage{position:relative;font-size:1em;line-height:20px;padding:14px 15px;border-radius:4px;max-width:calc(100% - 45px);word-wrap:break-word;word-break:break-word}.window--circle .window__chatAgentMessage,.window--circle .window__chatVisitorMessage{max-width:calc(100% - 65px)}.window__chatMessageOrignal{display:block;opacity:.5}.window__chatMessageTranslatedTag{display:inline}.window__chatAgentMessage img{display:block;max-width:100%!important;max-height:100%!important}.window__chatAgentMessage a{color:#000005}.window--bubble .window__chatAgentMessage a,.window--circle .window__chatAgentMessage a{color:#000004}.chat-message--img{overflow:hidden;max-width:200px;max-height:200px}.chat-message--img img{display:block;max-width:100%!important;max-height:100%!important}.window__chatVisitorMessage{float:right;background:#fff;color:#3c3c3c}.window__chatVisitorMessage a{color:#3c3c3c}.window__chatAgentMessage a,.window__chatVisitorMessage a{word-break:break-all;display:inline-block;max-width:100%}.window__chatVisitorMessage .icon-close{float:right;margin-left:9px;margin-top:4px}@-webkit-keyframes message--show{0%{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes message--show{0%{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.chat-time{opacity:0;color:#fff;font-size:.866em;background:rgba(0,0,0,.5);padding:0 8px;line-height:18px;height:18px;border-radius:20px;-ms-flex-item-align:center}.window__chatAgent:hover .chat-time,.window__chatVisitor:hover .chat-time{opacity:1}.window__chatAgent .chat-time{float:left;margin-left:10px}.window__chatVisitor .chat-time{float:right;margin-right:10px}.window__chatAgentName,.window__chatVisitorName{margin-bottom:5px;font-family:'SourceSans Pro Bold'}.window--classic .window__chat{padding:20px}.window--classic .window__chatAgentMessage{float:left;max-width:calc(100% - 95px)}.window--classic .chat-message--img{padding:0}.window--circle .chat-message--sending::after,.window--classic .chat-message--sending::after{content:'';display:block;width:22px;height:22px;position:absolute;left:-32px;top:10px;background:url(images/loading.svg) left center no-repeat;background-size:100%}.window--classic .window__chatAgentMessage{background:#000002;color:#000005}.window__chatAgentMessage--file .icon-sendfile,.window__chatVisitorMessage--file .icon-sendfile{position:relative;top:3px;margin-right:5px}.window__chatAgentMessage--file .icon-sendfile{color:#000005}.window__chatVisitorMessage--file .icon-sendfile{color:#3c3c3c}.window--classic .window__chatAgentMessage::before{position:absolute;width:0;height:0;content:'';top:7px;border:4px solid transparent;border-right-color:#000002;left:-8px}.window--classic .window__chatVisitorMessage{float:right;border:1px solid #ddd;color:#3c3c3c}.window--classic .window__chatVisitorMessage::after,.window--classic .window__chatVisitorMessage::before{position:absolute;width:0;height:0;content:'';top:7px;border:4px solid transparent}.window--classic .window__chatVisitorMessage::before{border-left-color:#ccc;right:-9px}.window--classic .window__chatVisitorMessage::after{border-left-color:#fff;right:-8px}.window_chatError{position:absolute;z-index:99;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);padding:13px 38px 13px 15px;line-height:18px;border-radius:4px;box-shadow:0 0 5px rgba(0,0,0,.1)}.window--classic .window_chatError{bottom:90px;width:calc(100% - 40px)}.window--bubble .window_chatError,.window--circle .window_chatError{bottom:60px;width:100%;border-radius:20px}.window--bubble .window_chatError{border-radius:8px}.window_chatErrorClose{position:absolute;right:15px;top:50%;font-size:1.6em;margin-top:-9px;cursor:pointer}.window_chatError--mitigate{background:#ffe8c4;border:1px solid #ffdeb0;color:#ee8835}.window_chatError--urgency{background:#ffebeb;border:1px solid #fdd;color:#de3939}.window--circle .window__chatAgentMessage{background:#000001;float:left;margin-left:-40px;color:#000004;min-height:58px;padding-left:56px;border-radius:20px}.window--circle .window__chatVisitorMessage{border:1px solid #ddd;border-radius:20px}.window--circle .agentMessage__avatar{position:relative;z-index:9;top:15px;left:15px}.window--circle .window__chatAgentMessage.chat-message--img{padding:15px 15px 15px 56px}.window--circle .window__chatAgentMessage.window__chatMessageNoAvatar.chat-message--img{padding-left:15px}.window--circle .window__chat{padding:20px 15px}.window--circle .window__chatMessageNoAvatar{margin-left:0;padding-left:15px;display:block;min-height:auto}.window--bubble .window__chatMessageNoAvatar{margin-left:50px}.window--circle .window__chatAgentMessage--file::before{color:#000004}.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{-ms-flex-item-align:center;margin-top:0;font-size:.8em;padding:0 5px}.window--bubble .window__chatAgentMessage{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:center;-ms-flex-pack:center;justify-content:center;background:#000001;border:1px solid #000001;float:left;color:#000004;border-radius:8px 8px 8px 0;max-width:calc(100% - 100px)}.window--bubble .window__chatSystemMessage{display:-webkit-box;display:-ms-flexbox;display:flex;text-align:left;color:#3c3c3c;position:relative;left:50px;font-size:1em;line-height:20px;margin-top:0;margin-bottom:10px;word-wrap:break-word;word-break:break-word;max-width:calc(100% - 100px)}.window--bubble .window__chatSystemMessage a{color:#3c3c3c}.window--bubble .window__chatSystemMessageContent{background:#f0f0f0;border:1px solid #ddd;padding:14px 15px;border-radius:8px 8px 8px 0}.window--ie .window--bubble .window__chatSystemMessageContent{width:100%}.window--bubble .icon-bubble-content,.window--bubble .icon-bubble-line{position:absolute;width:10px}.window--bubble .chat-message--img .icon-bubble-content,.window--bubble .chat-message--img .icon-bubble-line,.window--bubble .chat-message--img .icon-bubble-line-right{display:none}.window--bubble .icon-bubble-content .svgPath,.window--bubble .icon-bubble-line .svgPath{width:auto;height:auto}.window--bubble .icon-bubble-line{bottom:-1px}.window--bubble .icon-bubble-content,.window--bubble .window__chatSystemMessage .icon-bubble-line{bottom:0}.window--bubble .window__chatAgentMessage .icon-bubble-content,.window--bubble .window__chatSystemMessage .icon-bubble-content{left:-9px}.window--bubble .window__chatAgentMessage .icon-bubble-line{left:-10px}.window--bubble .window__chatSystemMessage .icon-bubble-line{left:-9px}.window--bubble .window__chatVisitorMessage .icon-bubble-content{right:-9px}.window--bubble .window__chatVisitorMessage .icon-bubble-line{right:-10px}.window--bubble .window__chatVisitorMessage .icon-bubble-line-right{position:absolute;width:10px;right:-9px;bottom:-1px}.window--bubble .window__chatSystemMessage .icon-bubble-content::before{color:#f0f0f0}.window--bubble .window__chatSystemMessage .icon-bubble-content .bubblecontent1{fill:#f0f0f0}.window--bubble .window__chatSystemMessage .icon-bubble-line::before{color:#ddd}.window--bubble .window__chatSystemMessage .icon-bubble-line .bubbleline1{fill:#f0f0f0;stroke:#ddd;stroke-width:2px}.window--bubble .window__chatVisitorMessage .icon-bubble-line-right .bubblelineright1{fill:#fff;stroke:#ddd;stroke-width:2px}.window--bubble .window__chatVisitorMessage .icon-bubble-line-right .bubblelineright0{fill:#fff}.window--bubble .window__chatAgentMessage .icon-bubble-content::before,.window--bubble .window__chatAgentMessage .icon-bubble-line::before{color:#000001}.window--bubble .window__chatAgentMessage .icon-bubble-line .bubbleline1{fill:#000001;stroke:#000001;stroke-width:1px}.window--bubble .window__chatVisitorMessage .icon-bubble-content,.window--bubble .window__chatVisitorMessage .icon-bubble-line{left:auto;-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.window--bubble .window__chatVisitorMessage .icon-bubble-content::before{color:#fff}.window--bubble .window__chatVisitorMessage .icon-bubble-line::before{color:#ddd}.window--bubble .window__chatVisitorMessage .icon-bubble-content .bubblecontent1{fill:#fff}.window--bubble .window__chatVisitorMessage .icon-bubble-line .bubbleline1{fill:#fff;stroke:#ddd;stroke-width:2px}.window--bubble .window__chatVisitorMessage{border:1px solid #ddd;border-radius:8px 8px 0;max-width:calc(100% - 50px)}.window__chatVisitorMessage .chat-message--loading{position:absolute;left:-30px;top:50%;margin-top:-11px}.window--bubble .agentMessage__avatar{position:relative;z-index:9;margin-right:5px;margin-bottom:2px}.window--bubble .agentMessage__avatarImg{width:45px;height:45px}.window--bubble .window__chatAgentMessage.chat-message--img,.window--bubble .window__chatVisitorMessage.chat-message--img{padding:0;border-radius:8px;background:0 0;border:none}.window--bubble .window__chat{padding:0 15px 10px 0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0;margin-top:35px}.window--bubble .window--bubble__messageNoAvatar{margin-left:0;padding-left:15px;display:block}.window--bubble .window__chatAgentMessage--file{color:#000004}.chatMessage__questionList{margin-top:5px;padding-left:20px;list-style-type:decimal}.chatMessage__questionList a{color:#000}.chatMessage__questionList--disc{list-style-type:disc}.window__chatAgentMessage .btn{margin-top:5px;font-size:.86em;padding:2px 10px;max-width:180px;overflow:hidden;text-overflow:ellipsis}.window--mobile .window__chatAgentMessage .btn{max-width:100%}.chatMessage__chatBotRate{width:95px;height:25px;margin:10px 10px 15px 0;border:1px solid rgba(0,0,0,.2);box-sizing:border-box;float:left;text-align:center;line-height:25px;cursor:pointer;border-radius:2px;overflow:hidden;text-overflow:ellipsis}.window--circle .chatMessage__chatBotRate{width:110px;float:none;margin-bottom:0;margin-left:auto;margin-right:auto!important}.chatMessage__chatBotRate--disabled{opacity:.5;cursor:default}.chatMessage__chatBotRate--selected{opacity:1}.window--classic .chatMessage__chatBotRate--selected{border-color:#000}.chatMessage__chatBotRate:not(.chatMessage__chatBotRate--disabled):hover{box-shadow:0 0 10px rgba(0,0,0,.12)}.chatMessage__chatBotRate .icon{position:relative;top:2px;margin-right:6px;font-size:1em;color:#7f7d7c}.chatMessage__chatBotRate.chatMessage__chatBotRate--selected .icon{color:#000}.chatMessage__chatBotRate:not(.chatMessage__chatBotRate--disabled):hover .icon{color:#333232}.chatMessage__chatBotRateText{font-size:.86em;color:#000;height:20px;display:inline-block;vertical-align:top;max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chatMessage__chatBotRateSplitLine{margin:15px 0 10px;border-top:1px dashed #bbb;clear:both}.window__chatWithAgent{z-index:9;display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:150px;height:30px;line-height:30px;text-align:center;padding-right:15px;padding-left:15px;cursor:pointer}.window__chatWithAgent:hover{opacity:.9}.window__chatWithAgent--above{position:absolute;top:-40px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);border:1px solid #000002;background-color:#fff;color:#000;border-radius:2px;box-shadow:0 0 15px rgba(0,0,0,.1)}.window--bubble .chatMessage__chatBotRate .icon,.window--bubble .chatMessage__chatBotRateText,.window--bubble .chatMessage__questionList a,.window--circle .chatMessage__chatBotRate .icon,.window--circle .chatMessage__chatBotRateText,.window--circle .chatMessage__questionList a,.window--classic .window__chatAgentMessage .btn,.window__chatWithAgent--bottom{color:#000004}.window__chatWithAgent--bottom{position:absolute;bottom:0;left:15px;font-size:1.08em;padding-left:24px}.window--bubble .window__chatWithAgent--bottom{left:0}.window__chatWithAgent--bottom .icon{font-size:.87em;position:absolute;top:10px;left:0}.window--bubble .chatMessage__chatBotRate,.window--circle .chatMessage__chatBotRate{border:1px solid #000004}.window--bubble .chatMessage__chatBotRate:not(.chatMessage__chatBotRate--disabled):hover .icon,.window--circle .chatMessage__chatBotRate:not(.chatMessage__chatBotRate--disabled):hover .icon{color:#000004;opacity:.8}.chatMessage__chatBotRateLast{margin-right:0!important}.window--bubble .chatMessage__chatBotRateLast,.window--mobile .window--circle .chatMessage__chatBotRateLast,.window--mobile .window--classic .chatMessage__chatBotRateLast{margin-right:auto!important}.window--bubble .window__chatAgentMessage .btn,.window--circle .window__chatAgentMessage .btn{color:#000001;background:#fff;border-radius:20px}.window--bubble .window__chatWithAgent--above,.window--circle .window__chatWithAgent--above{border-radius:4px}.window--bubble .window__chatWithAgent--bottom,.window--circle .window__chatWithAgent--bottom{color:#000001}.window--bubble .chatMessage__chatBotRate{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;float:none;margin:10px auto 0;width:110px;padding:0 4px}.window--bubble .window__chatAgentMessage .btn{border-radius:8px}.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:#333}.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--bubble .chat-message--imgLoading,.window--circle .chat-message--imgLoading,.window--classic .chat-message--imgLoading{width:60px;height:60px;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}.pciImageWrapper{width:53px;height:34px;background:url(images/pci.svg) center no-repeat;background-size:53px 34px;border:0;position:absolute;bottom:45px;left:20px}.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--bubble .window__ssoLogin{-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-ms-flex-positive:0;flex-grow:0}.chatInputContainer{position:relative;z-index:99;-ms-flex-negative:0;flex-shrink:0;height:80px}.chatInputContainer--fadeInUp{-webkit-animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both;animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both}.window--ie .chatInputContainer--fadeInUp{-webkit-animation:none;animation:none}.chat-input__controlbox{height:100%}.window__chatInputControl{display:block;width:100%;height:100%;padding-top:0;padding-bottom:0;border:none;font-size:1em;color:#000;outline:0}.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;bottom:14px;right:20px;width:40px;height:40px;border:1px solid #ddd;padding:7px;border-radius:100%;top:50%;margin-top:-20px}.window__chatSender--active{border-color:#000002}.window__chatSender--active:hover{box-shadow:0 0 10px rgba(0,0,0,.15);cursor:pointer}.window--mobile .window__chatSender--active{box-shadow:none}.window__chatSenderSVG{margin-top:2px}.window__chatSenderSVGPath{fill-rule:evenodd;clip-rule:evenodd;fill:#bbb}.window__chatSender--active .window__chatSenderSVGPath{fill:#000001}.window__chatSender .icon-input-send{color:#bbb;font-size:1.33em;margin-top:3px;margin-right:3px}.window__chatSender--active .icon-input-send{color:#000001}.window--classic .chatInputContainer{background:#fff;height:auto}.window--classic .chatInputContainer--active .window__chatInputControl,.window--classic .window__chatInputControl:focus{border-top-color:#000002;box-shadow:0 0 60px rgba(0,0,0,.08);transition:all 292ms cubic-bezier(.785,.135,.15,.86)}.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.133em}.window--classic .chat-input__controlbox{border-top:1px solid #ddd;background:#fff}.window--classic .chatInputContainer--active .chat-input__controlbox{border-top-color:#000002}.window--classic .window__chatInputControl{border:none;background-color:transparent;padding:8px 75px 8px 10px;max-height:100px;min-height:70px;overflow-y:hidden;overflow-x:hidden;height:70px;line-height:inherit}.window--bubble .window__chatInputControl,.window--circle .window__chatInputControl{background-color:#fff;max-height:85px;line-height:21px;overflow-y:hidden;overflow-x:hidden}.window--circle .chatInputContainer{height:auto;margin-left:15px;margin-right:15px}.window--circle .window__chatInputControl{height:21px;border:none;padding:0}.window--circle .window__chatInput--Drag::before{border-radius:20px}.window--circle .chatInputContainer--active .chat-input__controlbox{border-color:#000001;box-shadow:0 0 30px rgba(0,0,0,.08);transition:all 292ms cubic-bezier(.785,.135,.15,.86)}.window--mobile .window--circle .chatInputContainer--active .footer__operation{-webkit-transform:none;-ms-transform:none;transform:none}.window--circle .chat-input__controlbox{position:relative;border:1px solid #ddd;border-radius:20px;padding:9px 20px;background:#fff}.window--bubble .chatInputContainer--active .chat-input__controlbox,.window--circle .chatInputContainer--active .chat-input__controlbox{overflow-x:hidden}.window--bubble .chatInputContainer{height:auto}.window--bubble .window__chatInputControl{height:21px;border:none;padding:0}.footer,.footer-text-single-line{height:30px}.window--bubble.window-rtl .window__chatInputControl{overflow-x:hidden}.window--bubble .window__chatInput--Drag::before{border-radius:8px}.window--bubble .chat-input__controlbox{position:relative;border:1px solid #ddd;border-radius:8px;padding:9px 15px;background:#fff}.window--bubble .chatInputContainer--active .chat-input__controlbox{border-color:#000001;box-shadow:0 0 30px rgba(0,0,0,.08);transition:all 292ms cubic-bezier(.785,.135,.15,.86)}.window--bubble .chatInputContainer--typed .footer__operation,.window--circle .chatInputContainer--typed .footer__operation{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}.window--bubble.window--rtl .chatInputContainer--typed .footer__operation,.window--circle.window--rtl .chatInputContainer--typed .footer__operation{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%)}.window--mobile .window--bubble .chatInputContainer--typed .footer__operation,.window--mobile .window--circle .chatInputContainer--typed .footer__operation{-webkit-transform:none;-ms-transform:none;transform:none}.window--bubble .chat-input__controlbox .bubble-box--show .bubble,.window--circle .chat-input__controlbox .bubble-box--show .bubble{position:fixed;bottom:74px;left:auto;right:10px;z-index:9}.window--bubble.window--embedded .chat-input__controlbox .bubble-box--show .bubble,.window--circle.window--embedded .chat-input__controlbox .bubble-box--show .bubble{bottom:104px}.window--bubble.window--rtl .chat-input__controlbox .bubble-box--show .bubble,.window--circle.window--rtl .chat-input__controlbox .bubble-box--show .bubble{left:40px}.window--bubble .chat-input__controlbox--disabled,.window--bubble .chat-input__controlbox--disabled .window__chatInputControl,.window--circle .chat-input__controlbox--disabled,.window--circle .chat-input__controlbox--disabled .window__chatInputControl{background:#ebebeb}.window--bubble .chat-input__controlbox--disabled,.window--circle .chat-input__controlbox--disabled{position:static}.footer{position:relative;-ms-flex-negative:0;flex-shrink:0;z-index:999;width:100%;line-height:30px;text-align:right;padding-left:15px;padding-right:15px;font-size:.8em}.window--bubble .footer{padding-left:0;padding-right:0}.footer__svg{position:relative;line-height:1}.footer__svg--disabled{opacity:.5}.footer__svgPath{fill:#000004;width:16px;height:16px}.footer__svgRatePath1{fill:none;stroke:#000004;stroke-miterlimit:10}.footer__svgRatePath2{fill:none}.footer__svg:not(.footer__svg--disabled) svg:hover{cursor:pointer}.footer__svg--disabled svg:hover{cursor:default}.invitation,a{cursor:pointer}.footer__svg:not(.footer__svg--disabled) svg:hover .footer__sendemail1,.footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathSendFile1,.footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathVideo1,.footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathVoice1,.footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgRatePath2{fill:rgba(255,255,255,.3)}.footer__svgPathSendFile1,.footer__svgPathVideo1{fill:none}.footer__svgPathSendFile2{fill:none;stroke:#000004;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}.footer__print3,.footer__print4,.footer__svgPathVideo2{fill:#000004}.window--bubble .footer__svgPathVideo2,.window--circle .footer__svgPathVideo2{fill:#fff}.footer__print1,.footer__svgPathVideo3{fill:none;stroke:#000004;stroke-miterlimit:10}.footer__print0,.footer__print2,.footer__svgPathVoice1{fill:none}.footer__svgPathVoice2{fill:none;stroke:#000004;stroke-miterlimit:10}.footer__svgPathVoice3{fill:#a3a3a3}.window--classic .footer__svgPathVoice3{fill:#000004}.footer__sendemail1{fill:none}.footer__sendemail2{fill:none;stroke:#000004;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}.window--classic .window__footer{color:#000004;background:#000001;-webkit-animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both;animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) both}.window--ie .window--classic .window__footer{-webkit-animation:none;animation:none}.window--classic .footer__svg{float:left;margin-right:10px;margin-top:7px;width:16px;height:16px}.window--classic .footer__operation{height:30px;float:left;-webkit-animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) .4s both;animation:fadeInUp 458ms cubic-bezier(.785,.135,.15,.86) .4s both}.window--ie .window--classic .footer__operation{-webkit-animation:none;animation:none}.window--bubble .footer,.window--circle .footer{color:rgba(0,0,0,.3)}.window--bubble .footer__print1,.window--bubble .footer__svgPathSendFile2,.window--bubble .footer__svgPathVideo3,.window--bubble .footer__svgPathVoice2,.window--bubble .footer__svgRatePath1,.window--circle .footer__print1,.window--circle .footer__svgPathSendFile2,.window--circle .footer__svgPathVideo3,.window--circle .footer__svgPathVoice2,.window--circle .footer__svgRatePath1{stroke:#a3a3a3}.window--bubble .footer__print0,.window--bubble .footer__print3,.window--bubble .footer__sendemail1,.window--circle .footer__print0,.window--circle .footer__print3,.window--circle .footer__sendemail1{fill:#a3a3a3}.window--bubble .footer__print1,.window--bubble .footer__print2,.window--bubble .footer__print4,.window--circle .footer__print1,.window--circle .footer__print2,.window--circle .footer__print4{fill:none}.window--bubble .footer__sendemail2,.window--bubble .footer__svgPathVoice3,.window--circle .footer__sendemail2,.window--circle .footer__svgPathVoice3{stroke:transparent}.window--bubble .footer__svgPathVideo1,.window--bubble .footer__svgPathVoice2,.window--bubble .footer__svgRatePath2,.window--circle .footer__svgPathVideo1,.window--circle .footer__svgPathVoice2,.window--circle .footer__svgRatePath2{fill:#a3a3a3}.window--bubble .footer__operation,.window--circle .footer__operation{position:absolute;right:0;top:12px;padding-right:10px;transition:-webkit-transform 292ms cubic-bezier(.785,.135,.15,.86);transition:transform 292ms cubic-bezier(.785,.135,.15,.86);transition:transform 292ms cubic-bezier(.785,.135,.15,.86),-webkit-transform 292ms cubic-bezier(.785,.135,.15,.86)}.window--bubble .footer__operation>ul,.window--circle .footer__operation>ul{background:#fff}.window--bubble .chat-input__controlbox--disabled .footer__operation>ul,.window--circle .chat-input__controlbox--disabled .footer__operation>ul{background:#ebebeb}.window--bubble.window--rtl .footer__operation,.window--circle.window--rtl .footer__operation{right:auto;left:0;padding-right:0;padding-left:15px}.window--bubble .footer__svg,.window--circle .footer__svg{float:left;margin-right:10px;width:16px;height:16px}.window--bubble .footer__svg:not(.footer__svg--disabled) svg:hover .footer__print0,.window--bubble .footer__svg:not(.footer__svg--disabled) svg:hover .footer__sendemail1,.window--bubble .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathVideo1,.window--bubble .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathVoice1,.window--bubble .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathVoice2,.window--bubble .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathVoice3,.window--bubble .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgRatePath2,.window--circle .footer__svg:not(.footer__svg--disabled) svg:hover .footer__print0,.window--circle .footer__svg:not(.footer__svg--disabled) svg:hover .footer__sendemail1,.window--circle .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathVideo1,.window--circle .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathVoice1,.window--circle .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathVoice2,.window--circle .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathVoice3,.window--circle .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgRatePath2{fill:#828282}.window--bubble .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathSendFile2,.window--bubble .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathVoice2,.window--bubble .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgRatePath1,.window--circle .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathSendFile2,.window--circle .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgPathVoice2,.window--circle .footer__svg:not(.footer__svg--disabled) svg:hover .footer__svgRatePath1{stroke:#828282}.poweredby a{color:#000004;text-decoration:none}.window--circle .poweredby a{color:#bbb}.window--bubble .poweredby a{color:#979797}.invitation{position:fixed;z-index:2147483637;right:30px;bottom:125px;width:250px;border:1px solid #ddd;background:#fff}.invitation--bubble{border-radius:8px}.invitation--classic{border-radius:4px}.invitation--circle{border-radius:20px}.invitation__name{font-size:1em;color:#000;font-weight:700;font-family:\"SourceSans Pro Bold\";padding:.947368rem 1.315789rem 0}.invitation__message{font-size:1em;line-height:18px;padding:0 1.315789rem;margin-bottom:1.315789rem;color:#666;max-height:180px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:10;-webkit-box-orient:vertical}.invitation__close{position:absolute;top:2px;right:5px;font-size:1.06em;color:#333;line-height:1;cursor:pointer}.invitation__type{height:35px;line-height:35px;padding:0 25px;background:#f0f0f0;color:#bbb;font-size:.93em}.invitation::after,.invitation::before{content:'';position:absolute;width:0;height:0}.invitation::before{right:20px;bottom:-22px;border:11px solid transparent;border-top-color:#ddd}.invitation::after{right:22px;bottom:-18px;border:9px solid transparent;border-top-color:#f0f0f0}@-webkit-keyframes invitation-show{0%{-webkit-transform:scale(0);transform:scale(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);-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);-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);-webkit-transform-origin:calc(100% - 29px) calc(100% + 18px);transform-origin:calc(100% - 29px) calc(100% + 18px)}}.invitation-show{-webkit-animation-name:invitation-show;animation-name:invitation-show;-webkit-animation-duration:375ms;animation-duration:375ms}@-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}}.invitation-showType{-webkit-animation-name:invitation-showType;animation-name:invitation-showType;-webkit-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:125ms;animation-delay:125ms}@-webkit-keyframes invitation-showmessage{0%{opacity:0}100%{opacity:1}}@keyframes invitation-showmessage{0%{opacity:0}100%{opacity:1}}.invitation-showmessage{-webkit-animation-name:invitation-showmessage;animation-name:invitation-showmessage;-webkit-animation-duration:167ms;animation-duration:167ms;-webkit-animation-delay:292ms;animation-delay:292ms;white-space:pre-wrap;word-break:break-word}.modal--classic{border-radius:4px}.modal--circle{border-radius:20px}.modal--bubble{border-radius:8px}.modal--mobile__mask{position:fixed;top:0;bottom:0;left:0;right:0;background:rgba(0,0,0,.3)}.modal--mobile{position:absolute;left:50%;top:50%;background:#fff;box-shadow:0 5px 10px rgba(0,0,0,.2);width:300px;-webkit-animation:showinvitation .4s forwards cubic-bezier(.785,.135,.15,.86);animation:showinvitation .4s forwards cubic-bezier(.785,.135,.15,.86)}@-webkit-keyframes showinvitation{0%{-webkit-transform:scale(0) translate(-50%,-50%);transform:scale(0) translate(-50%,-50%);-webkit-transform-origin:0 0;transform-origin:0 0}100%{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%);-webkit-transform-origin:0 0;transform-origin:0 0}}@keyframes showinvitation{0%{-webkit-transform:scale(0) translate(-50%,-50%);transform:scale(0) translate(-50%,-50%);-webkit-transform-origin:0 0;transform-origin:0 0}100%{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%);-webkit-transform-origin:0 0;transform-origin:0 0}}.modal__invitation-title{color:#fff;background:#4f4f4f;height:30px;line-height:30px;padding-left:15px;padding-right:15px;font-size:.93em;border-top-left-radius:2px;border-top-right-radius:2px}.modal__invitation-message{font-size:21px;color:#000;text-align:center;padding:24px 30px;font-family:SourceSans Pro Bold,Arial}.modal__invitation-operation{text-align:center;padding:0 30px 30px}.modal__invitation-operation .btn{margin-left:10px}.modal__invitation-operation .btn:first-child{margin-left:0}.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}.window--mobile .chatInputContainer{overflow:initial;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:5px 0 5px 15px}.window--mobile .chatInputContainer--withplus{padding-left:0}.window--mobile .chat-time{display:block}.window--mobile .footer__operation{position:absolute;bottom:70px;left:20px;top:auto;right:auto;padding-right:0;background-color:#fff;border:1px solid #ddd;box-shadow:0 0 15px rgba(0,0,0,.2);-webkit-transform-origin:0 160px;-ms-transform-origin:0 160px;transform-origin:0 160px}.window--mobile .window--classic .footer__operation{height:auto;border-radius:4px 4px 4px 0;z-index:2147483000;-webkit-animation:none;animation:none}.window--mobile .window--bubble .footer__operation--show,.window--mobile .window--circle .footer__operation--show,.window--mobile .window--classic .footer__operation--show{-webkit-animation:footer__operationScale 333ms cubic-bezier(.785,.135,.15,.86) both;animation:footer__operationScale 333ms cubic-bezier(.785,.135,.15,.86) both}@-webkit-keyframes footer__operationScale{0%{-webkit-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes footer__operationScale{0%{-webkit-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);transform:scale(1)}}.window--mobile .footer__operation::before{content:'';position:absolute;z-index:9;left:0;bottom:-14px;width:0;height:0;border:7px solid transparent;border-top-color:#fff;border-left-color:#fff}.window--mobile .footer__operation::after{content:'';position:absolute;z-index:8;left:-1px;bottom:-17px;width:0;height:0;border:8px solid transparent;border-top-color:#ddd;border-left-color:#ddd}.window--mobile .footer__operation .footer__svg{float:none;display:block;height:30px;line-height:30px;width:auto;margin-top:0;margin-right:0;padding-left:20px;padding-right:30px;color:#000}.window--circle .window__chatSenderSVGPath,.window--mobile .window__footer{display:none}.window--mobile .footer__operation .footer__svg .svg{float:left;margin-top:7px;margin-right:10px}.window--mobile .window--classic .footer__operation li:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.window--mobile .window--classic .footer__operation li:last-child{border-bottom-right-radius:4px}.window--mobile .window--circle .footer__operation li:first-child{border-top-left-radius:20px;border-top-right-radius:20px}.window--mobile .window--circle .footer__operation li:last-child{border-bottom-right-radius:20px}.window--mobile .window--bubble .footer__operation li:first-child{border-top-left-radius:8px;border-top-right-radius:8px}.window--mobile .window--bubble .footer__operation li:last-child{border-bottom-right-radius:8px}.footer__operation li:not(.footer__svg--disabled):focus,.window--mobile .footer__operation li:not(.footer__svg--disabled):active{background-color:#000002}.window--mobile{font-size:16px;background-color:rgba(0,0,0,.15);-webkit-backface-visibility:hidden}.window--mobileHorizontal .window--embedded,.window--mobileVertical .window--embedded{top:0;right:0;bottom:0;left:0;width:100%;height:100%}.window--mobileVertical .window--embedded.window--circle{top:45px;height:calc(100% - 45px)}.window--mobile .window--classic .chatInputContainer{background:#000001}.window--mobile .chat-input__controlbox{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding:7px 15px}.window--mobile .window--classic .chat-input__controlbox{padding:7px 10px;border-top:none;border-radius:4px}.window--mobile .window--classic .window__chatInputControl{padding:0;height:21px;line-height:21px;min-height:21px;box-shadow:none}.window--mobile .window__chatSender .icon-input-send{color:#000004;font-size:1.56em;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{position:static;margin-top:0;right:0;border:none;-webkit-transform:rotateY(180deg);transform:rotateY(180deg);bottom:5px;padding:0 5px;height:auto}.window--mobile .window__chatSenderSVGPath{fill:#000004}.window--mobile .footer__sendemail1,.window--mobile .footer__svgPathVideo1,.window--mobile .footer__svgPathVoice1,.window--mobile .footer__svgPathVoice3,.window--mobile .footer__svgRatePath2,.window--mobile .window--classic .footer__svgPathVoice3{fill:#bbb!important}.window--mobile .footer__svgPathSendFile2,.window--mobile .footer__svgPathVideo3,.window--mobile .footer__svgPathVoice2,.window--mobile .footer__svgRatePath1{stroke:#bbb!important}.window--mobile .footer__sendemail2,.window--mobile .footer__svgPathVoice3{stroke:transparent!important}.window--mobile .footer__operation li:active .footer__svgPathSendFile2,.window--mobile .footer__operation li:active .footer__svgPathVideo3,.window--mobile .footer__operation li:active .footer__svgPathVoice2,.window--mobile .footer__operation li:active .footer__svgRatePath1{stroke:#000001!important}.window--mobile .footer__operation li:active .footer__sendemail1,.window--mobile .footer__operation li:active .footer__svgPathVideo1,.window--mobile .footer__operation li:active .footer__svgPathVoice1,.window--mobile .footer__operation li:active .footer__svgPathVoice2,.window--mobile .footer__operation li:active .footer__svgPathVoice3,.window--mobile .footer__operation li:active .footer__svgRatePath2{fill:#000001!important}.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.33em;color:#fff}.window--mobile.window--mobileVertical .window__chatAgentMessage,.window--mobile.window--mobileVertical .window__chatVisitorMessage{-ms-flex-negative:1;flex-shrink:1}.window--mobile .window--classic .window__chatAgentMessage{max-width:calc(100% - 87px)}.window--mobileVertical .window--bubble.whole-window{top:0;height:calc(100% - 0px)}.window--mobile .window--circle .main-container{height:100%}.window--mobile .window--circle .chatInputContainer{background:#fff;margin:0;border-top:1px solid #ddd}.window--mobile .window--circle .chat-input__controlbox{border-radius:20px}.window--mobile .window--circle .window__chatInputControl{padding:0;height:21px;line-height:21px;min-height:21px}.window--mobile .window--circle .chatInputContainer:not(.chatInputContainer--active) .window__chatInputControl{white-space:nowrap}.window--mobile .window--bubble .window__chatSenderSVGPath,.window--mobile .window--circle .window__chatSenderSVGPath{display:block;fill:#ddd}.window--mobile .window--circle .window__chatOperationPlus .icon-plus{color:#bbb!important}.window--mobile .window--bubble .window__chatOperationPlus .icon-plus[active=true],.window--mobile .window--circle .window__chatOperationPlus .icon-plus[active=true]{color:#000001!important}.window--mobile .window--circle .footer__operation{border-radius:20px 20px 20px 0;z-index:2147483000}.window--mobile .window--bubble .footer__operation>ul,.window--mobile .window--circle .footer__operation>ul{background:0 0}.window--mobile .window--bubble .chatInputContainer{background:#fff;border-top:1px solid #ddd}.window--mobile.window--ipad .window--bubble .chatInputContainer{border-top:none}.window--mobile .window--bubble .chat-input__controlbox{border-radius:8px;padding:7px 10px}.window--mobile .bubble::before,.window--mobile .window__chatWithAgent--bottom{display:none}.window--mobile .window--bubble .window__chatOperationPlus .icon-plus{color:#bbb!important}.window--mobile .window--bubble .footer__operation{border-radius:8px 8px 8px 0;z-index:2147483000}.window--mobile .window--bubble.window--rtl .footer__operation{padding-left:0;left:15px}.window--mobile .window__chatSender--active .window__chatSenderSVGPath{fill:#000001}.window--mobile .window--classic .window__chatSender--active .window__chatSenderSVGPath{fill:#fff}.window--mobile .window_chatError{position:absolute;z-index:2147483000;width:calc(100% - 40px)}.window--mobileHorizontal .window--embedded.window--circle{top:40px;height:calc(100% - 40px)}.window--mobile .window--bubble .window__chat{-ms-flex-negative:1;flex-shrink:1;padding-left:10px;padding-right:16px}.window--mobile .chatMessage__chatBotRate{margin:10px auto 0;float:none}body,html,ol,ul{margin:0}.window--ie9.window--classic .header__agentInfo,.window--ie9.window--classic .header__avatar{float:left}.window--mobile .window--circle .chatMessage__chatBotRate{width:95px}.window--mobile .bubble-box{position:fixed;background:rgba(0,0,0,.3);top:0;bottom:0;left:0;right:0;height:100%;width:100%;z-index:999}.window--mobile .bubble-box--show .bubble{left:50%;top:50%;bottom:auto;-webkit-transform:scale(1) translate(-50%,-50%);-ms-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%);-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-animation:showBubble--mobile 333ms cubic-bezier(.785,.135,.15,.86) both;animation:showBubble--mobile 333ms cubic-bezier(.785,.135,.15,.86) both}.window--rtl .container-checkbox i,.window--rtl .controlIndicator{left:auto;right:0}@-webkit-keyframes showBubble--mobile{0%{-webkit-transform:scale(0) translate(-50%,-50%);transform:scale(0) translate(-50%,-50%)}100%{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}}@keyframes showBubble--mobile{0%{-webkit-transform:scale(0) translate(-50%,-50%);transform:scale(0) translate(-50%,-50%)}100%{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}}@media all and (-webkit-min-device-pixel-ratio:0){::-webkit-scrollbar{height:8px;width:8px}.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,.window__form{width:calc(100% - 4px)}.window--bubble .window__chat{padding-right:11px}.window--circle .window__chat,.window--classic .window__chat{padding-right:16px}.window__form{padding-right:36px}.window--bubble .window__form{padding-right:26px}::-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}}::-webkit-input-placeholder{color:#bbb}::-moz-placeholder{color:#bbb}:-ms-input-placeholder{color:#bbb}*{-webkit-overflow-scrolling:touch}.window--bubble.whole-window .main-container,.window--classic.whole-window .main-container,body{overflow:hidden}html{font-size:15px}body{font-family:\"SourceSans Pro\",Arial;line-height:1.42857143}h1,h2,h3{font-weight:400;font-family:\"SourceSans Pro Bold\"}.clearfix::after{content:\"\";display:block;clear:both}.main-container,.window--bubble{display:-webkit-box;display:-ms-flexbox;-ms-flex-direction:column;-webkit-box-orient:vertical;-webkit-box-direction:normal}.clear{clear:both}a{color:#000001;text-decoration:underline}a:active,a:focus,a:hover{text-decoration:underline;outline:0!important}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-frames7{-webkit-animation-duration:292ms;animation-duration:292ms}.animated-frames11{-webkit-animation-duration:458ms;animation-duration:458ms}.animated-frames18{-webkit-animation-duration:.75s;animation-duration:.75s}.animated-delayframes1{-webkit-animation-delay:42ms;animation-delay:42ms}.animated-delayframes2{-webkit-animation-delay:83ms;animation-delay:83ms}.animated-delayframes3{-webkit-animation-delay:125ms;animation-delay:125ms}.animated-delayFrames7{-webkit-animation-delay:292ms;animation-delay:292ms}.animated-delayFrames9{-webkit-animation-delay:375ms;animation-delay:375ms}.animated-delayFrames10{-webkit-animation-delay:417ms;animation-delay:417ms}.animated-delayFrames12{-webkit-animation-delay:.5s;animation-delay:.5s}.animated-delayFrames13{-webkit-animation-delay:542ms;animation-delay:542ms}.animated-delayFrames15{-webkit-animation-delay:625ms;animation-delay:625ms}.animated-delayFrames36{-webkit-animation-delay:1.5s;animation-delay:1.5s}.animated-delayFrames39{-webkit-animation-delay:1.625s;animation-delay:1.625s}.animated-delayFrames42{-webkit-animation-delay:1.75s;animation-delay:1.75s}.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}@-webkit-keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@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}}.window--minimized{-webkit-animation:window--minimized .5s forwards cubic-bezier(.785,.135,.15,.86);animation:window--minimized .5s forwards cubic-bezier(.785,.135,.15,.86)}@-webkit-keyframes window--minimized{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(100%);transform:translateY(100%)}}@keyframes window--minimized{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(100%);transform:translateY(100%)}}.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}.window--minimized .chat{-webkit-animation:none;animation:none;opacity:0;transition:opacity 208ms cubic-bezier(.785,.135,.15,.86)}.window--minimized .chatInputContainer,.window--minimized .footer{-webkit-animation:fadeoutdown 167ms cubic-bezier(.785,.135,.15,.86) both;animation:fadeoutdown 167ms cubic-bezier(.785,.135,.15,.86) both}@-webkit-keyframes fadeoutdown{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes fadeoutdown{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(100%);transform:translateY(100%)}}@-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:fixed;z-index:10;width:100%;height:100%;box-shadow:0 0 30px rgba(0,0,0,.15)}.window--embedded{right:30px;bottom:30px;width:calc(100% - 60px);height:calc(100% - 60px)}.window--bubble.window--embedded{height:calc(100% - 30px)}.window--bubble{display:flex;flex-direction:column;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.main-container{display:flex;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)}.window--classic{border-top-left-radius:2px;border-top-right-radius:2px}.window--circle,.window--circle .main-container{border-top-left-radius:20px;border-top-right-radius:20px}.window--circle{height:calc(100% - 45px);top:45px}.window--embedded.window--circle{height:calc(100% - 75px)}.window--bubble{position:absolute;background:0 0;box-shadow:none}.window--bubble:not(.window--embedded){padding-left:15px;padding-right:15px}.window--mobile .window--bubble:not(.window--embedded){padding-left:0;padding-right:0}.window--rtl .container-checkbox,.window--rtl .control{padding-left:0;padding-right:20px}.window--bubble .main-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-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 .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}@media (-webkit-min-device-pixel-ratio:0){.window--rtl .window__chat,.window--rtl .window__form{width:calc(100% - 12px);margin-left:10px;padding-right:40px}}.window--ie9.window--circle .window__form,.window--ie9.window--classic .window__form{height:calc(100% - 156px);padding-bottom:30px}.window--ie9 .chat-time{margin-top:15px}.window--ie9 .window__chatAgentMessage,.window--ie9 .window__chatVisitorMessage{max-width:calc(100% - 105px)}.window--ie9.window--circle .window__chatAgentMessage,.window--ie9.window--circle .window__chatVisitorMessage{max-width:calc(100% - 65px)}.window--ie9.window--bubble .window__chatAgentMessage .btn{max-width:100%}.window--ie9.chat-time{padding-top:10px}.window--ie9 .chatInputContainer{position:absolute;bottom:30px;width:100%}.window--ie9.window--bubble .chatInputContainer{position:relative;bottom:0}.window--ie9.window--circle .chatInputContainer{width:calc(100% - 30px)}.window--ie9 .window__chat{position:absolute;right:0}.window--ie9.window--bubble .window__chat{position:static;bottom:90px}.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.window--bubble .window__footer{position:static}.window--ie9 .multipleText{overflow:auto}.window--ie9.window--bubble .window__chatVisitorMessage .icon-bubble-content,.window--ie9.window--bubble .window__chatVisitorMessage .icon-bubble-line{display:none}.window--ie9.window--bubble .window__chatAgent{position:relative}.window--ie9.window--bubble .agentMessage__avatar{position:absolute;bottom:0}.window--ie9.window--bubble .window__chatAgentMessage{margin-left:50px}.window--ie9.window--bubble .window__chatSystemMessage{float:none}.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 .chatButton--maximizedAsChatting{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.window--ie9.window--classic .window__header--withBio{height:136px}.window--ie9.window--classic .window__header--noBio{height:126px}.window--ie9.window--circle .window__header--withBio{height:165px}.window--ie9.window--circle .window__header--noBio{height:115px}.window--ie9.window--classic .window__chat--withBio{max-height:calc(100% - 236px)}.window--ie9.window--classic .window__chat--noBio{max-height:calc(100% - 226px)}.window--ie9.window--circle .window__chat--withBio{max-height:calc(100% - 235px)}.window--ie9.window--circle .window__chat--noBio{max-height:calc(100% - 185px)}.window--ie9.window--bubble .main-container{overflow:auto;overflow-x:hidden}",zn='@font-face{font-family:icons;src:url({FONT_URL_PREFIX}/icons.eot?ac7fafc231cca3ee841672771fd812ae?#iefix) format("embedded-opentype"),url({FONT_URL_PREFIX}/icons.woff?ac7fafc231cca3ee841672771fd812ae) format("woff"),url({FONT_URL_PREFIX}/icons.ttf?ac7fafc231cca3ee841672771fd812ae) format("truetype"),url({FONT_URL_PREFIX}/icons.svg?ac7fafc231cca3ee841672771fd812ae#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-bubble-active:before{content:"\\f101"}.icon-bubble-content-copy:before{content:"\\f102"}.icon-bubble-content:before{content:"\\f103"}.icon-bubble-content1:before{content:"\\f104"}.icon-bubble-line-copy:before{content:"\\f105"}.icon-bubble-line:before{content:"\\f106"}.icon-bubble-line1:before{content:"\\f107"}.icon-bubble:before{content:"\\f108"}.icon-close:before{content:"\\f109"}.icon-drag:before{content:"\\f10a"}.icon-embedded:before{content:"\\f10b"}.icon-facebook:before{content:"\\f10c"}.icon-googleplus:before{content:"\\f10d"}.icon-helpful:before{content:"\\f10e"}.icon-input-send:before{content:"\\f10f"}.icon-kb-active:before{content:"\\f110"}.icon-kb:before{content:"\\f111"}.icon-media-active:before{content:"\\f112"}.icon-media:before{content:"\\f113"}.icon-minimize:before{content:"\\f114"}.icon-not-helpful:before{content:"\\f115"}.icon-plus:before{content:"\\f116"}.icon-popup:before{content:"\\f117"}.icon-rating-full:before{content:"\\f118"}.icon-rating-half:before{content:"\\f119"}.icon-sendfile:before{content:"\\f11a"}.icon-video:before{content:"\\f11b"}.icon-voice-active:before{content:"\\f11c"}.icon-voice:before{content:"\\f11d"}',jn="chatbotSendGreetingMessage",qn="email",Ln=function(e,t){ return"/ChatWindow.aspx?siteId="+e+"&planId="+t},Vn=function(e){return e?Object.keys(e).reduce(function(t,n){try{var i,o=new Function("return "+e[n]).call();return void 0===o?t:pn(t,(i={},i[n]=null===o?o:o.toString(),i))}catch(e){return t}},{}):null},Fn=function(){return(new Date).getTimezoneOffset()},Un=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection,Hn=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia,Gn=navigator.userAgent.indexOf(" Edge")>0,Yn=!!Un&&!!Hn&&!Gn,Qn=function(){return screen.width+"x"+screen.height},Jn=/(?:www\.|(?:https?|ftp|news|rtsp|mms):\/\/)[\w$%][\w_!~*'();?:@&=+$,%#-.\/]*[\w_!~*'();?:@&=+$%#-]\/?/gi,Xn=/^[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])?$/,Zn=function(e){return Xn.test(e)},$n=function(e){return e.replace(/(?:3[4|7]\d{2}\s{0,1}\d{6}\s{0,1}\d{1}|3[0|6|8]\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}|4\d{3}\s{0,1}\d{4}\s{0,1}\d(?:\d{3})?\s{0,1})(\d{4})/g,function(e,t){for(var n="",i=0;i=0;)i=i.concat(O(n.substring(0,o),function(e){return An(e)})),i.push(t),n=n.slice(o).replace(/\r\n|\r|\n/,""),o=n.search(/\r\n|\r|\n/);return i=i.concat(O(n,function(e){return An(e)}))},gi=["agentSendText","agentAddInvitationText","agentJoinChat","chatbotJoinChat","agentSendFile","agentSendImage","agentSendUrl","agentAcceptChat","agentRefuseChat","visitorNotRespond","agentEndChat","agentPromoteToUser","agentPromoteToContact","agentEndChat","agentTransferChatToDepartment","agentAcceptTransfer","agentRefuseTransfer","visitorNotRespondAndEndChat","agentVideoChatRequest","agentVideoChatCancelRequest","agentVideoChatAccept","agentVideoChatRefuse","agentVideoChatStop","systemVideoChatNoAnswer","systemVideoChatEnd","agentAudioChatRequest","agentAudioChatCancelRequest","agentAudioChatAccept","agentAudioChatRefuse","agentAudioChatStop","visitorAudioChatRequest","visitorAudioChatCancelRequest","visitorAudioChatAccept","visitorAudioChatRefuse","visitorAudioChatStop","visitorVideoChatRequest","visitorVideoChatCancelRequest","visitorVideoChatAccept","visitorVideoChatRefuse","visitorVideoChatStop","systemAudioChatNoAnswer","systemAudioChatEnd","agentRequestSecureForm"],wi=function(e){return gi.indexOf(e.type)>=0},vi=function(){return void 0===window.File},yi=["agentSendUrl","visitorAddTextMessage","agentSendText","agentAddInvitationText","autoInvMsg","agentTyping","visitorTyping","pendingVisitorIsTyping","agentSendImage","agentSendFile","visitorSendFile","visitorSendImage","agentSendImageStart","visitorRequestChat","systemPromoteOfflineMesage","systemStartChatbot","chatbotBadAnswer","chatbotHighConfidenceAnswer",jn,"chatbotPossibleAnswer","chatbotRequestQuestionGuid","visitorText","visitorImage","visitorFile","agentRequestSecureForm","systemIfSupportWebrtc","startChatAgain"],xi=function(e){return Yn&&("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)},_i=function(e){return yi.indexOf(e.type)<0},Ci=function(e,t,n){return[ai(t,n),ri(Dn,e)].join("")},ki=function(e){return e.reduce(function(e,t){var n,i=e;return"name"===t.type?i.name=t.value:t.type===qn?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:"comment"===t.type?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:i.custom?i.custom[t.id]=t.value:i.custom=(n={},n[t.id]=t.value,n),i},{})},Si=window.Comm100API||{},Ai=Si.site_id,Ti=function(e){return/^\d+$/.test(e)?+e:void 0}(Si.chatGroup),Ii=function(){return Si.chat_buttons},Ri=function(){return Ii().map(function(e){return e.code_plan}).filter(function(e){return e})},Pi=function(e){var t=Si.chat_buttons.find(function(t){return t.code_plan===e});if(t)return t.div_id;if(Si.dynamic){var n=Si.chat_buttons.find(function(e){return null==e.code_plan});return n&&n.div_id}},Mi=Si.main_code_plan,Oi="object"==("undefined"==typeof global?"undefined":Wt(global))&&global&&global.Object===Object&&global,Ei="object"==("undefined"==typeof self?"undefined":Wt(self))&&self&&self.Object===Object&&self,Ni=Oi||Ei||Function("return this")(),Wi=Ni.Symbol,Bi=Object.prototype,Di=Bi.hasOwnProperty,zi=Bi.toString,ji=Wi?Wi.toStringTag:void 0,qi=Object.prototype,Li=qi.toString,Vi="[object Null]",Fi="[object Undefined]",Ui=Wi?Wi.toStringTag:void 0,Hi=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object),Gi="[object Object]",Yi=Function.prototype,Qi=Object.prototype,Ji=Yi.toString,Xi=Qi.hasOwnProperty,Zi=Ji.call(Object);ln="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")();var $i=function(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}(ln),Ki={INIT:"@@redux/INIT"},eo=Object.assign||function(e){for(var t=1;t0||(go=bo,bo.forEach(function(e){return e()}))}return bo=[],go=bo,function(t,o,r){var a=e(t,o,r),s=wo()(a.dispatch);return a.subscribe(i),Dt({},a,{dispatch:s,subscribe:n})}},yo="page/showInvitation",xo="window/update-messages",_o="page/update-window-status",Co="app/ban",ko="window/endchat",So={banned:!1},Ao=(ro={},ro["app/ready"]=function(e){return Object.assign({},e,{isReady:!0})},ro[Co]=function(e){return Object.assign({},e,{banned:!0})},ro["app/switchServer"]=function(e,t){return Object.assign({},e,{server:t})},ro["app/setIsActive"]=function(e,t){return Object.assign({},e,{isActive:t})},ro["app/setIsOpenerExists"]=function(e,t){return Object.assign({},e,{isOpenerExists:t})},ro),To=un(So,Ao),Io="opening",Ro="open",Po="restoring",Mo="restored",Oo="minimized",Eo="minimizing",No="close",Wo=Object.freeze({opening:Io,open:Ro,restoring:Po,restored:Mo,minimized:Oo,minimizing:Eo,close:No}),Bo="popupImage",Do="embeddedWindow",zo="bubble",jo="mobile",qo={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",sendChatMessages:"sendChatMessages",getChatMessages:"getChatMessages",getChatQueue:"getChatQueue",setVisitorStatus:"setVisitorStatus",submitRating:"submitRating",emailTranscript:"emailTranscript",sendFile:"sendFile",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"},Lo=function(e,t){return{type:qo.uploadFileAction,action:e,file:t}},Vo=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments[2],i=arguments[3],o=arguments[4],r=arguments[5],a=arguments[6],s=arguments[7],c=s.firstVisitTime,d=s.visitTimes;return{type:qo.newVisitor,campaignId:e,visitorId:t||0,referrer:n,landingPage:i,timezone:o,screenResolution:r,ifSupportWebrtc:a,firstVisitTime:c||(new Date).getTime(),visitTimes:d||0}},Fo=function(e,t){return{type:qo.pageVisit,campaignId:e,page:t}},Uo=function(){return{type:qo.getConfig}},Ho=function(e,t){return{type:qo.setCustomVariables,customVariables:e,campaignId:t}},Go=function(e){return{type:qo.getIfOnline,campaignId:e}},Yo=function(e){return{type:qo.checkIfOnline,campaignId:e}},Qo=function(e){return{type:qo.checkAutoInvitation,campaignId:e}},Jo=function(e,t){return{type:qo.confirmAutoInvitation,campaignId:e,invitationId:t}},Xo=function(e){return{type:qo.checkManualInvitation,campaignId:e}},Zo=function(e,t,n){return{type:t?qo.refuseManualInvitation:qo.refuseAutoInvitation,campaignId:e,invitationId:t?void 0:n}},$o=function(e){return{type:qo.manualInvitationShowed,invitationId:e}},Ko=function(e){return{type:qo.getChatButton,campaignId:e}},er=function(e,t){return{type:qo.submitSSOInfo,info:e,campaignId:t}},tr=function(e,t){return{type:qo.submitPrechat,form:e,campaignId:t}},nr=function(){return{type:qo.prechatHeartbeat}},ir=function(){return{type:qo.offlineMessageHeartbeat}},or=function(){return{type:qo.enterOfflineMessage}},rr=function(e){return{type:qo.checkManuallyInvited,chatGuid:e}},ar=function(e,t,n){var i=t.attachment,o={type:qo.submitOfflineMessage,campaignId:e,form:Object.assign({},t,{attachment:void 0}),source:n};return i?Lo(o,i):o},sr=function(e){return Lo({type:qo.sendFile,formId:e.formId},e)},cr=function(e,t,n){return{type:qo.submitPostChat,chatId:e,form:t,campaignId:n}},dr=function(e,t){return{type:qo.submitRating,chatId:e,rating:t}},lr=function(e){return{type:qo.emailTranscript,email:e}},ur=function(e){return{type:qo.socialLogin,socialType:e.source,name:e.name,email:e.email,avatar:e.avatar,profileUrl:e.profile}},pr=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments[3],o=arguments[4];return{type:qo.requestChat,campaignId:e,source:t,isPrechatDone:n,isSupportWebrtc:Yn,ticketId:i,departmentId:o}},fr=function(){return{type:qo.closeWindow}},hr=function(e){return{type:qo.endChat,chatGuid:e}},mr=function(e,t){return{type:qo.getChatMessages,chatGuid:e,fromId:t}},br=function(e){return{type:qo.getChatQueue,chatGuid:e}},gr=function(e,t){return{type:qo.sendChatMessages,chatGuid:e,messages:t}},wr=function(e,t){return{type:qo.chatBotAnswerHelpful,ifHelpful:e,actionGuid:t}},vr=function(e){return{type:qo.chatBotSelectQuestion,question:e}},yr=function(){return{type:qo.getDepartments}},xr=function(){return{type:qo.getAgents}},_r=function(e){var t=e.filter(function(e){return!!e});return 0===t.length?null:1===t.length?t[0]:{type:qo.batchAction,actions:t}},Cr=function e(t,n){null!=n&&(n.type===qo.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))},kr=function(e,t){var n=null;return Cr(function(e){e.type===t&&(n=e)},e),n},Sr=function e(t,n){if(null==n)return null;var i=t(n);if(i.type===qo.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},Ar=function(e){return{type:qo.checkBan,visitorId:e}},Tr=function(){return{type:qo.systemProcessingHeartbeat}},Ir=function(){return{type:qo.restoreChat}},Rr=function(){return{type:qo.checkBBSCode}},Pr=function(){return{type:qo.checkDynamicCampaign}},Mr=function(){return{type:qo.getDynamicCampaign}},Or=function(){return{type:qo.pageHeartbeat}},Er=function(){return{type:qo.getChatWindowConfig}},Nr=function(){return{type:qo.getCustomVariables}},Wr={platform:"desktop",title:"",buttons:{},windowStatus:No,dynamicCampaign:!1,campaignId:0,chatGroup:0,invitation:null,visitor:{},skipPreChat:!1,width:0,height:0,orientation:"portrait"},Br=function(e,t,n,i){return pr(e,{type:t.isManual?"manualInvitation":"autoInvitation",invitationId:t.id,invitationType:t.type,page:{title:n,url:i}})},Dr=(ao={},ao["page/setButtonIsOnline"]=function(e,t){var n,i,o=t.campaignId,r=t.ifOnline;if(e.buttons[o]===r)return e;var a=e.isDynamicCampaign?(n={},n[o]=r,n):pn(e.buttons,(i={},i[o]=r,i));return pn(e,{buttons:a})},ao[yo]=function(e,t,n){var i=n.buttonType;if(t.type===Do){var o=t.windowStatus||Ro;return pn(e,{requestChatAction:Br(e.campaignId,t,e.title,e.url),windowStatus:"adaptive"===i&&o===Ro?Io:o})}return t.isManual&&t.type===zo?pn(e,{requestChatAction:Br(e.campaignId,t,e.title,e.url),windowStatus:Oo}):null==e.invitation?pn(e,{invitation:t}):e},ao["page/updateVisitor"]=function(e,t){var n=pn(e.visitor,t);return pn(e,{visitor:n})},ao["invitaton/refuse"]=function(e){return pn(e,{invitation:null})},ao["chatWindow/open"]=function(e,t,n){return pn(e,{windowStatus:"adaptive"===n?Io:Ro,invitation:null})},ao[_o]=function(e,t){return pn(e,{windowStatus:t,invitation:t===Ro?null:e.invitation})},ao["chatWindow/popOut"]=function(e){return pn(e,{windowStatus:No})},ao["invitaton/accept"]=function(e,t){var n=e.invitation;return n?pn(e,{invitation:null,requestChatAction:Br(t,n,e.title,e.url)}):e},ao["page/buttonClick"]=function(e,t){return pn(e,{invitation:null,requestChatAction:pr(t,{type:"button",page:{title:e.title,url:e.url}})})},ao["page/setSkipPreChat"]=function(e,t){return e.skipPreChat===t?e:pn(e,{skipPreChat:t})},ao["page/updateSize"]=function(e,t){return e.width===t.width&&e.height===t.height?e:pn(e,t)},ao["window/closeMinimizeBubble"]=function(e,t,n){return n?pn(e,{windowStatus:No}):e},ao["page/updateOrientation"]=function(e,t){return e.orientation===t?e:Object.assign({},e,{orientation:t})},ao["page/setCampaignId"]=function(e,t){return e.campaignId===t?e:Object.assign({},e,{campaignId:t})},ao),zr=un(Wr,Dr),jr="done",qr={entities:{},errors:{},fetchStatus:{}},Lr={agents:qr,messages:qr,buttons:qr,campaigns:qr,fields:qr,departments:qr},Vr=function(e,t){var n,i,o,r=e.entities,a=e.errors,s=e.fetchStatus,c=t.id,d=t.entity,l=t.error,u=t.fetchStatus;return{entities:pn(r,(n={},n[c]=pn(r[c],d),n)),errors:pn(a,(i={},i[c]=l,i)),fetchStatus:pn(s,(o={},o[c]=u,o))}},Fr=(so={},so["entities/button/visible"]=function(e,t){var n=t.isHidden,i=t.campaignId,o=e.buttons.entities[i];return o?o.isHidden===n?e:pn(e,{buttons:Vr(e.buttons,{id:i,entity:{isHidden:n}})}):e},so["entities/updateFields"]=function(e,t){var n=t.fields,i=t.type,o=t.campaignId,r=n.reduce(function(e,t){var n=e;return n.entities[t.id]=t,n.error[t.id]=null,n.fetchStatus[t.id]="done",n},{entities:Object.assign({},e.fields.entities),error:Object.assign({},e.fields.error),fetchStatus:Object.assign({},e.fields.fetchStatus)}),a=Object.assign({},e.campaigns.entities[o]);return a[i]=n.map(function(e){return e.id}),pn(e,{campaigns:Vr(e.campaigns,{id:o,entity:a,error:null,fetchStatus:"done"}),fields:r})},so["entities/updateButton"]=function(e,t){return pn(e,{buttons:Vr(e.buttons,t)})},so["entities/updateCampaign"]=function(e,t){if(null==t.entity)return pn(e,{campaigns:Vr(e.campaigns,t)});var n=["prechat","postchat","offline"],i=Array.prototype.concat.apply([],n.map(function(e){return t.entity[e]||[]})).map(function(e){return Object.assign({isErrorShowed:!1,isFocused:!1},e)}),o=t.entity?n.reduce(function(e,t){var n;return e[t]?pn(e,(n={},n[t]=e[t].map(function(e){return e.id}),n)):e},t.entity):null;return pn(e,{campaigns:Vr(e.campaigns,pn(t,{entity:o})),fields:i.reduce(function(e,t){return Vr(e,{id:t.id,entity:t,error:null,fetchStatus:jr})},e.fields)})},so["entities/updateAgent"]=function(e,t){return pn(e,{agents:Vr(e.agents,t)})},so["entities/updateDepartment"]=function(e,t){return pn(e,{departments:Vr(e.departments,t)})},so[yo]=function(e,t){var n=t.agent;return n?pn(e,{agents:Vr(e.agents,{id:n.id,entity:n,fetchStatus:jr})}):e},so["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=Object.assign({},i,{value:t.value,isErrorShowed:!0}),r=Object.assign({},e.fields,{entities:Object.assign({},e.fields.entities,(n={},n[t.id]=o,n))});return Object.assign({},e,{fields:r})},so["form/focus"]=function(e,t){var n,i=e.fields.entities[t.id];if(!i)return e;var o=Object.assign({},i,{isFocused:!0}),r=Object.assign({},e.fields.entities,(n={},n[t.id]=o,n)),a=Object.assign({},e.fields,{entities:r});return Object.assign({},e,{fields:a})},so["form/blur"]=function(e,t){var n,i=e.fields.entities[t.id],o=Object.assign({},i,{isErrorShowed:!0,isFocused:!1}),r=Object.assign({},e.fields.entities,(n={},n[t.id]=o,n)),a=Object.assign({},e.fields,{entities:r});return Object.assign({},e,{fields:a})},so["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]=Object.assign({},i,{isErrorShowed:!0,isFocused:!n}),n=!0,o},Object.assign({},e.fields.entities)),o=Object.assign({},e.fields,{entities:i});return Object.assign({},e,{fields:o})},so[xo]=function(e,t){return t.reduce(function(e,t){if("agentJoinChat"!==t.type&&"agentAcceptChat"!==t.type)return e;var n=t.content.agent;return Object.assign({},e,{agents:Vr(e.agents,{id:n.id,entity:n,error:null,fetchStatus:jr})})},e)},so["form/reset"]=ce,so[_o]=function(e,t){return t!==No?e:ce(e)},so["chatWindow/popOut"]=function(e){return ce(e)},so["window/closeMinimizeBubble"]=function(e,t,n){return n?ce(e):e},so),Ur=un(Lr,Fr),Hr="prelogin",Gr="prechat",Yr="chat",Qr="postchat",Jr="offline",Xr=Object.freeze({loading:"loading",login:Hr,ssoLogin:"ssoLogin",prechat:Gr,chat:Yr,postchat:Qr,offline:Jr}),Zr="waiting",$r="invited",Kr="chatting",ea="chatted",ta=Object.freeze({videoIncoming:"videoIncoming",notStart:"notStart",videoRequesting:"videoRequesting",videoChatting:"videoChatting",audioIncoming:"audioIncoming",audioChatting:"audioChatting",audioRequesting:"audioRequesting"}),na=Object.freeze({kb:"kb",media:"media",voice:"voice",bubble:"bubble"}),ia=function(e,t,n){return n+"_"+e+(t?"_"+t:"")},oa=function(e){for(var t=document.cookie,n=t.split("; "),i=0;i2&&void 0!==arguments[2]&&arguments[2];null!==t&&(document.cookie=e+"="+t+";path=/;"+(n?"secure=true;":"")+"expires=Sat, 01 Jan 10000 00:00:00 GMT")},sa=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];null!==t&&(document.cookie=e+"="+t+";path=/;"+(n?"secure=true;":""))},ca=function(e){var t=void 0;return function(){return void 0===t&&(t=e()),t}}(function(){var e="comm100test",t=window.sessionStorage;try{return t.setItem(e,"test"),t.removeItem(e),!1}catch(e){return e.code===DOMException.QUOTA_EXCEEDED_ERR&&0===t.length}}),da=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]}}},la=function(){return ca()?da("comm100LocalStorage"):window.localStorage}(),ua=function(){return ca()?da("comm100SessionStorage"):window.sessionStorage}(),pa=!1,fa=function(e){pa=e},ha=function(e){return isNaN(+e)||0==+e?null:Math.floor(+e)},ma=function(e){return ia(Ai,Ti,e?"Comm100_CC_Identity":"comm100standby_id")},ba=function(e){return ra(ma(e))},ga=function(e){return ia(Ai,Ti,e?"comm100_visitor":"comm100standby_visitor")},wa=function(e){return ha(oa(ga(e)))},va=function(e,t){(pa?sa:aa)(ga(t),e)},ya=function(){return ia(Ai,Ti,"comm100_guid2")},xa=function(){return oa(ya())},_a=function(e){e&&sa(ya(),e)},Ca=function(){return ia(Ai,Ti,"comm100_visitor")},ka=function(e){try{return JSON.parse(la.getItem(e))||{}}catch(e){return{}}},Sa=function(e){try{return JSON.parse(ua.getItem(e))||{}}catch(e){return{}}},Aa=function(){return ka(Ca())},Ta=function(e){return la.setItem(Ca(),JSON.stringify(Object.assign({},Aa(),e)))},Ia=function(){return ia(Ai,Ti,"comm100_chat")},Ra=function(e){var t=ka(Ia());return t.chatGuid===e?t:{}},Pa=function(e,t){var n=Ra(e);la.setItem(Ia(),JSON.stringify(n.chatGuid===e?Object.assign({},n,t):Object.assign({chatGuid:e},t)))},Ma=function(){return ia(Ai,Ti,"comm100_session")},Oa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xa(),t=ka(Ma());return t.visitorGuid===e?t:{}},Ea=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xa(),n=Oa(t);la.setItem(Ma(),JSON.stringify(n.visitorGuid===t?Object.assign({},n,e):Object.assign({visitorGuid:t},e)))},Na=function(){return ia(Ai,Ti,"comm100_page")},Wa=function(){return Sa(Na())},Ba=function(e){return ua.setItem(Na(),JSON.stringify(Object.assign({},Wa(),e)))},Da=function(){return ia(Ai,Ti,"comm100_session")},za=function(){return ia(Ai,Ti,"comm100standby_session")},ja=function(){ra(Da()),ra(za()),ba(!0),ba(!1)},qa=function(){var e="Comm100_MediaChat_"+Ai;try{return JSON.parse(la.getItem(e))}catch(e){return null}},La=function(e){try{return ua.getItem(e)}catch(e){return""}},Va=function(e){var t="Comm100_MediaChat_"+Ai;la.setItem(t,JSON.stringify({chatGuid:e,id:La(t)}))},Fa=function(e){var t="Comm100_MediaChat_"+Ai,n=qa();null===n||n.chatGuid===e&&n.id!==La(t)||la.removeItem(t)},Ua=function(){var e="Comm100_MediaChat_"+Ai;null!==qa()&&la.removeItem(e)},Ha=function(){if(void 0!==ua){var e="Comm100_MediaChat_"+Ai;ua.setItem(e,Date.now().toString())}},Ga=function(){return La("Comm100_MediaChat_"+Ai)},Ya=function(e){var t=qa();return!t||(t.chatGuid!==e?(Va(e),!0):t.id===Ga())},Qa=function(e,t){return e.concat(t)},Ja=function(e,t,n){for(var i=0;i0){if("autoInvMsg"===n[0].type)return n.map(function(e,t){return 0===t?Object.assign({},e,{type:"agentSendText",id:r.id}):e});var l=n.filter(function(e){return"agentTyping"!==e.type});return Qa(l,r)}if("chatbotSetAnswerIfHelpful"===r.type){var u=n.map(function(e){return"chatbotHighConfidenceAnswer"===e.type&&e.content.GUID===r.content.guid?Object.assign({},e,{disableRate:!0}):e});return Qa(u,r)}return Qa(n,r)}},Ka=function(e,t){return e.messages.filter(function(e){return e.type===t}).length>0},es=function(e){return function(t,n){var i=t.messages.concat({type:e,time:new Date,content:n.message||"",sender:{type:"visitor"}});return n.ifCardMasking&&(i=i.concat({type:"creditCardMasked",time:new Date,content:"",sender:{type:"visitor"}})),Object.assign({},t,{messages:i})}},ts=function(e){return function(t,n){return Object.assign({},t,{isUploading:!0,error:"",warning:"",messages:t.messages.concat({type:e,time:new Date,content:{fileName:n.name,percent:0,onCancel:void 0},sender:{type:"visitor"}})})}},ns=function(e,t){Ga()||Ha();var n=e.involvedAgents||[];return n.filter(function(e){return e===t}).length>0?pn(e,{chatStatus:Kr}):(n=(e.involvedAgents||[]).concat([t]),pn(e,{involvedAgents:n,chatStatus:Kr,isChatBot:!1}))},is=function(e){return pn(e,{isChatBot:!0,chatStatus:Kr})},os=function(e,t,n){var i=e.fields||{};return i[t]=n,{fields:i}},rs=function(e,t){var n=e.expandWindowItems;return n&&n.some(function(e){return e.id===t.id})?{}:(n?n.push(t):n=[t],{expandWindowItems:n,expandWindowSelectedTab:e.expandWindowSelectedTab||t.id})},as=function(e,t){var n=e.expandWindowItems;if(n){var i=-1;if(n.some(function(e,n){var o=e.id===t;return o&&(i=n),o}),i>-1){var o={};return 1===n.length?o.expandWindowSelectedTab=null:e.expandWindowSelectedTab===t&&(o.expandWindowSelectedTab=n.find(function(e){return e.id!==t}).id),o.expandWindowItems=n.slice(i,i),o}}return{}},ss=function(e,t,n){return t?rs(e,{id:n,isSystem:!0}):as(e,n)},cs=function(e,t){ return pn(e,Object.assign({},ss(e,"videoRequesting"===t.status||"videoIncoming"===t.status||"videoChatting"===t.status,"media"),ss(e,"audioRequesting"===t.status||"audioIncoming"===t.status||"audioChatting"===t.status,"voice"),{vChatStatus:t.status,audioVideoChatStartTime:t.startTime||0,audio_video_disabled:"notStart"!==t.status}))},ds=function(e){return pn(cs(e,{status:"notStart",startTime:0}),{audioVideoAgentId:0})},ls=function(e){if(!e)return e;Fa(e.chatGuid);var t=e.messages.filter(Xa);return pn(e,{chatStatus:ea,autoEjectTranscript:!0,error:"",warning:"",messages:t})},us=function(e,t){return Ya(e.chatGuid)?t():e},ps=function(e,t,n,i){var o,r=(o={},o.agentAcceptChat=function(e){return ns(e,t.content.agent.id)},o.agentJoinChat=function(e){return ns(e,t.content.agent.id)},o.agentRefuseChat=function(e){return pn(e,{chatStatus:ea})},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:"comment"===n&&e.fields.comment})?ls(t):pn(t,{chatStatus:ea,tab:Qr}):ls(t)},o.visitorRequestChat=function(e){return pn(e,{chatStatus:Zr})},o.chatbotJoinChat=function(e){return is(e)},o.visitorVideoChatRequest=function(e){return us(e,function(){return cs(e,{status:"videoRequesting"})})},o.visitorVideoChatAccept=function(e,t){return us(e,function(){return cs(e,{status:"videoChatting",startTime:t.time-e.timeDelay})})},o.visitorAudioChatRequest=function(e){return us(e,function(){return cs(e,{status:"audioRequesting"})})},o.visitorAudioChatAccept=function(e,t){return us(e,function(){return cs(e,{status:"audioChatting",startTime:t.time-e.timeDelay})})},o.agentVideoChatRequest=function(e,t){return"notStart"!==e.vChatStatus?e:us(e,function(){return pn(cs(e,{status:"videoIncoming"}),{audioVideoAgentId:t.sender.id})})},o.agentVideoChatAccept=function(e,t){return us(e,function(){return pn(cs(e,{status:"videoChatting",startTime:t.time-e.timeDelay}),{audioVideoAgentId:t.sender.id})})},o.agentAudioChatRequest=function(e,t){return"notStart"!==e.vChatStatus?e:us(e,function(){return pn(cs(e,{status:"audioIncoming"}),{audioVideoAgentId:t.sender.id})})},o.agentAudioChatAccept=function(e,t){return us(e,function(){return pn(cs(e,{status:"audioChatting",startTime:t.time-e.timeDelay}),{audioVideoAgentId:t.sender.id})})},o.agentVideoChatCancelRequest=ds,o.agentVideoChatRefuse=ds,o.agentVideoChatStop=ds,o.agentAudioChatStop=ds,o.agentAudioChatRefuse=ds,o.agentAudioChatCancelRequest=ds,o.systemAudioChatNoAnswer=ds,o.systemAudioChatEnd=ds,o.systemVideoChatNoAnswer=ds,o.systemVideoChatEnd=ds,o.visitorAudioChatCancelRequest=ds,o.visitorAudioChatRefuse=ds,o.visitorAudioChatStop=ds,o.visitorVideoChatCancelRequest=ds,o.visitorVideoChatRefuse=ds,o.visitorVideoChatStop=ds,o.agentTyping=function(e){return e.limitClockerCount>0?pn(e,{warning:"",limitClockerCount:0,stopLimitClocker:!0}):e},o),a=r[t.type],s=e;return a&&(s=a(e,t)),s.isFocused&&(s=Object.assign({},s,{maxReadId:Math.max(e.maxReadId,e.maxId)})),s},fs=function(e){return pn({fields:{name:"",email:"",phone:"",company:"",product:"",department:void 0,ticketId:void 0,custom:{}},forms:{prechat:"none",postchat:"none",offline:"none"},chatStatus:"none",messages:[],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},e)},hs=function(e,t){var n=t.isManual,i=n&&(t.type===zo||t.type===Do),o=t.chat;return fs({id:e,tab:Yr,chatStatus:$r,chatId:o&&o.id,chatGuid:o&&o.guid,messages:i?[]:[{id:-1,time:new Date,type:"autoInvMsg",sender:{id:t.agent?t.agent.id:0,type:"agent"},content:t.text}],involvedAgents:t.agent?[t.agent.id]:[]})},ms=(co={},co["chatWindow/open"]=function(e,t){return fs({id:t,tab:"loading"})},co["web/startChatAgain"]=function(e){return fs({id:e.id,tab:"loading"})},co[yo]=function(e,t,n){var i=n.campaignId;return e||(t.type===Do||t.type===zo&&t.isManual?hs(i,t):e)},co["sso/updateSSO"]=function(e,t){return pn(e,t)},co[xo]=function(e,t,n){var i=n.campaign,o=n.fields,r=t.find(function(e){return"visitorTyping"===e.type}),a=e.visitorTyping;r&&(a=!1);var s=t.find(function(e){return"visitorRequestChat"===e.type})&&e.messages.find(function(e){return"visitorRequestChat"===e.type}),c=t.find(function(e){return"systemPromoteOfflineMesage"===e.type})&&e.messages.find(function(e){return"systemPromoteOfflineMesage"===e.type}),d=t.filter(function(t){var n=(void 0===t.id||t.id>e.maxId)&&"visitorTyping"!==t.type;return(!n||!s||"visitorRequestChat"!==t.type)&&((!n||!c||"systemPromoteOfflineMesage"!==t.type)&&n)}),l=d.reduce($a(i.languages,e.timeDelay||0),e.messages);if(l!==e.messages){var u=l.filter(function(e){return"visitorImage"===e.type||"visitorFile"===e.type});if(u.length>0){l=l.filter(function(e){return"visitorImage"!==e.type&&"visitorFile"!==e.type}).concat(u)}return d.reduce(function(e,t){return ps(e,t,i,o)},Object.assign({},e,{messages:l,visitorTyping:a,maxId:Math.max(e.maxId,t[t.length-1].id)}))}return a!==e.visitorTyping?Object.assign({},e,{visitorTyping:a,maxId:Math.max(e.maxId,t[t.length-1].id)}):Dt({},e,{maxId:Math.max(e.maxId,t[t.length-1].id)})},co["window/sendText"]=function(e,t){var n=es("visitorText")(e,t);return Object.assign({},n,{visitorTyping:!1,draft:""})},co["window/sendImage"]=ts("visitorImage"),co["window/sendFile"]=ts("visitorFile"),co["chatinput/setVisitorIsTyping"]=function(e,t){var n=Object.assign({},e);return e.chatStatus!==Kr?n:e.chatStatus===Kr&&e.isChatBot?n:(n.visitorTyping=!0,n.draft=t.message,n)},co["window/update-upload"]=function(e,t){var n=!1,i=e.messages.map(function(e){return"visitorFile"===e.type||"visitorImage"===e.type?(n=!0,Object.assign({},e,{content:Object.assign({},e.content,{filename:t.name,percent:t.percent,onCancel:t.onCancel})})):e});return n?Object.assign({},e,{messages:i}):e},co["window/fail-file"]=function(e,t){var n=e.messages.filter(function(e){return"visitorFile"!==e.type&&"visitorImage"!==e.type}),i="";return"string"==typeof t?i=t:"object"===(void 0===t?"undefined":Wt(t))&&null!==t&&(i=t.message||""),e.chatStatus===ea&&(i=""),Object.assign({},e,{messages:n,error:i,isUploading:!1})},co["window/sucess-file"]=function(e){return Object.assign({},e,{error:"",isUploading:!1,fileUploadCount:e.fileUploadCount+1})},co["form/submit-start"]=function(e,t){var n;return Object.assign({},e,{forms:Object.assign({},e.forms,(n={},n[t]="pending",n)),error:"",warning:""})},co["form/submit-success"]=function(e,t,n){var i;return Object.assign({},e,{autoEjectTranscript:"postchat"===t,forms:Object.assign({},e.forms,(i={},i[t]="success",i)),messages:"postchat"!==t?e.messages:e.messages.concat({type:"postChatSuccess",content:n.eventRatingSubmitSuccess,sender:{type:"system"}})})},co["window/addSystemMessage"]=function(e,t){return pn(e,{messages:e.messages.concat([{type:"systemPrompt",sender:{type:"system"},content:t}])})},co["form/submit-fail"]=function(e,t){var n;return pn(e,{forms:pn(e.forms,(n={},n[t]="fail",n))})},co["form/update"]=function(e,t){var n=void 0;if(t.custom){var i=Object.assign({},e.fields.custom,t.custom);n=Object.assign({},e.fields,t,{custom:i})}else n=Object.assign({},e.fields,t);return Object.assign({},e,{fields:n})},co["form/fill-default"]=function(e,t){var n=e.fields.custom;t.custom&&(n=Object.assign({},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=Object.assign({},e.fields,t,{custom:n});return Object.keys(e.fields).forEach(function(t){"custom"!==t&&e.fields[t]&&(i[t]=e.fields[t])}),Object.assign({},e,{fields:i})},co["chatWindow/showTab"]=function(e,t,n){var i=pn(e,{tab:t});if(t===Jr&&n){var o=i.messages.filter(function(e){return"visitorAddTextMessage"===e.type}).map(function(e){return e.content}).join(",");i=Object.assign({},i,{fields:Object.assign({},i.fields,{content:o})})}return i},co["window/startWaiting"]=function(e){return pn(e,{chatStatus:Zr,allowWaitingSendMessage:e.isChatBot||e.chatStatus===$r})},co["window/removeForm"]=function(e,t){return pn(e,{messages:e.messages.map(function(e){return"agentRequestSecureForm"!==e.type?e:e.content.url.indexOf("otk="+t)>0?Object.assign({},e,{isHidden:!0}):e})})},co["window/startChatBot"]=function(e){return is(e)},co["window/toggle-error"]=function(e,t){return e&&e.error!==t?Object.assign({},e,{error:t}):e},co["window/toggle-warning"]=function(e,t){return e&&e.warning!==t?Object.assign({},e,{warning:t,stopLimitClocker:""===t||e.stopLimitClocker,limitClockerCount:""===t?0:e.limitClockerCount}):e},co[ko]=ls,co["window/updateChatIdentity"]=function(e,t){var n=0;return t.serverTime>0&&(n=Rn(t.serverTime)),pn(e,{chatId:t.chatId,chatGuid:t.chatGuid,timeDelay:n})},co["window/toggleFocus"]=function(e,t){return null==e?e:e.isFocused===t?e:pn(e,{isFocused:t,maxReadId:t?Math.max(e.maxId,e.maxReadId):e.maxReadId})},co[_o]=function(e,t){return t===No?null:t===Oo?pn(e,{isFocused:!1,maxReadId:Math.max(e.maxId,e.maxReadId)}):t===Ro||t===Mo?pn(e,{isFocused:!0,maxReadId:Math.max(e.maxId,e.maxReadId)}):e},co["window/contentScrollStatusUpdate"]=function(e,t){return pn(e,{ifHideBio:t})},co["web/chatBotAnswerHelpful"]=function(e,t){if(e.chatStatus===Kr&&e.isChatBot){var n=e.messages.map(function(e){return"chatbotHighConfidenceAnswer"===e.type&&e.content.GUID===t.actionGuid?Object.assign({},e,{disableRate:!0}):e});return Object.assign({},e,{messages:n})}return e},co["chatWindow/chatInputWarning"]=function(e,t,n){var i,o=(i={},i.maxLengh=function(){return n.promptInputLimit},i.emptyFile=function(){return"File must not be empty."},i.maxFileSize=function(){return n.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 n.promptSendFileCountLimit.replace("{fileCount}",t.params.fileCount)},i);return"limited"===t.type&&t.params.fromClocker&&e.stopLimitClocker?e:"limited"===t.type&&e.limitClockerCount>=10?pn(e,{warning:"",limitClockerCount:0,stopLimitClocker:!0}):o[t.type]?pn(e,{warning:o[t.type](),stopLimitClocker:"limited"!==t.type&&e.stopLimitClocker,limitClockerCount:"limited"===t.type?e.limitClockerCount+1:e.limitClockerCount}):e},co["web/fromChatbotToAgent"]=function(e){return pn(e,{chatWithAgentClicked:!0})},co["window/toggle-disable"]=function(e,t){return t===e.disabled?e:pn(e,{disabled:t})},co["chatWindow/popOut"]=function(){return null},co["window/updateQueue"]=function(e,t){return 0===t.position&&0===t.waitTime?e:Dt({},e,{queue:{position:t.position,waitTime:Math.ceil(t.waitTime/60)}})},co["window/updateVideoStatus"]=cs,co["footer/chatToolVideo"]=function(e,t){return pn(e,{showChatWindowInExpandwindow:e.showChatWindowInExpandwindow&&!t,maxReadId:e.showChatWindowInExpandwindow&&!t?Math.max(e.maxReadId,e.maxId):e.maxReadId,audio_video_disabled:!0,isFocused:e.showChatWindowInExpandwindow&&!t})},co["footer/chatToolAudio"]=function(e,t){return pn(e,{showChatWindowInExpandwindow:e.showChatWindowInExpandwindow&&!t,maxReadId:e.showChatWindowInExpandwindow&&!t?Math.max(e.maxReadId,e.maxId):e.maxReadId,audio_video_disabled:!0,isFocused:e.showChatWindowInExpandwindow&&!t})},co["footer/chatToolRating"]=function(e,t){var n=Object.assign({},e.fields,{rating:t.score,comment:t.comment});return Object.assign({},e,{fields:n})},co["window/sendChatMessages"]=function(e,t){var n=[];return t.forEach(function(t){("pendingAccept"!==t.type||Ka(e,"pendingAccept"))&&("pendingHangup"!==t.type||Ka(e,"pendingHangup"))&&("pendingGetSecureFormFailure"!==t.type||Ka(e,"pendingGetSecureFormFailure"))?"pendingHangup"!==t.type&&"pendingAccept"!==t.type&&"pendingGetSecureFormFailure"!==t.type&&n.push(t):n.push(t)}),pn(e,{messages:e.messages.concat(n)})},co["expandWindow/expandWidowTabSelect"]=function(e,t){var n={};return n.showChatWindowInExpandwindow="bubble"===t,n.isFocused=n.showChatWindowInExpandwindow,n.maxReadId=n.showChatWindowInExpandwindow?Math.max(e.maxReadId,e.maxId):e.maxReadId,n.expandWindowSelectedTab=t,pn(e,n)},co["expandWindow/toggleExtendedWindow"]=function(e,t){return t?e.expandWindowSelectedTab?e:e.expandWindowItems&&0!==e.expandWindowItems.length?pn(e,{expandWindowSelectedTab:e.expandWindowItems[0].id}):e:e.expandWindowSelectedTab?pn(e,{expandWindowSelectedTab:void 0}):e},co["window/hangupAudioVideoChat"]=function(e){return ds(e)},co["window/updateMaxReadId"]=function(e,t){return pn(e,{maxReadId:t})},co["window/updateWindowId"]=function(e,t){return pn(e,{id:t})},co["window/closeMinimizeBubble"]=function(e,t,n){return n?null:e},co["window/togglePopupBubble"]=function(e,t){return e?e.popupBubble===t?e:pn(e,{popupBubble:t,autoEjectTranscript:!1}):e},co["expandWindow/setWindowTabs"]=function(e,t){return pn(e,{expandWindowItems:t})},co["window/setFrequencyLimitState"]=function(e,t){return e.frequencyLimitState===t?e:pn(e,{frequencyLimitState:t})},co["web/emailTranscript"]=function(e,t){return pn(e,os(e,qn,t))},co["window/setId"]=function(e,t){return null==e?e:e.id===t?e:Object.assign({},e,{id:t})},co["window/remove-agent-is-typing"]=function(e){return Object.assign({},e,{messages:e.messages.filter(function(e){return"agentTyping"!==e.type})})},co["window/chatbotTimeout"]=function(e,t,n){if(null==e)return e;if(null==e.messages)return e;var i=e.messages.map(function(e){return"chatbotRequestQuestionGuid"===e.type&&e.content===t?Object.assign({},e,{timeout:!0,content:{GUID:e.content,Message:"Oops. I'm having trouble connecting to the server. ",TextChatWithAgent:n.buttonChatbotChatWithAgent},sender:{type:"chatbot"}}):e});return Object.assign({},e,{messages:i})},co["window/resetMaxId"]=function(e){var t=e.messages.length,n=e.messages.map(function(e,n){return Object.assign({},e,{id:n-t})});return Object.assign({},e,{maxId:-1,maxReadId:-1,messages:n})},co),bs=un(null,ms),gs={},ws=(lo={},lo["config/updateConfig"]=pn,lo),vs=un(gs,ws),ys="classic",xs="circle",_s=function(e){return"window--"+e},Cs=Object.freeze({classic:ys,circle:xs,bubble:"bubble",styleClassName:_s}),ks=Math.pow(2,0),Ss=Math.pow(2,1),As=Math.pow(2,2),Ts=Math.pow(2,3),Is=Math.pow(2,4),Rs=Math.pow(2,5),Ps=function(e){return e.app.isReady},Ms=function(e){return"main"===e.app.server},Os=function(e){return e.app.isPoppedOut},Es=function(e){return e.app.banned},Ns=function(e){return e.app.isActive},Ws=function(e){return!e.app.isActive},Bs=function(e){return e.app.isOpenerExists},Ds=function(e){return e.app.server},zs=function(e,t){return/^https?:/.test(t)?t:null==e.configuration?t:null==t?null:[Ms(e)?e.configuration.url:e.configuration.standbyUrl,t].join(/^\//.test(t)?"":"/")},js=function(e){return/^(https?:\/\/)?([^\/]*)/gi.exec(e)[2]},qs=function(e,t){if(/^https?:/.test(t))return t;if(null==e.configuration)return t;var n=Ms(e)?e.configuration.webrtcSignalingServiceUrl:e.configuration.standbyUrl;return[js(n),t].join(/^\//.test(t)?"":"/")},Ls=function(e){return e.configuration.standbyUrl},Vs=function(e){return e.configuration.features.department},Fs=function(e){return e.configuration.heartbeat.online},Us=function(e){return e.configuration.heartbeat.offline},Hs=function(e){return e.configuration.heartbeat.stopAfter},Gs=function(e){return e.configuration.facebookAppId},Ys=function(e){return e.configuration.googlePlusAppId},Qs=function(e){return e.configuration.attachmentMaxSize},Js=function(e){return e.configuration.attachmentMaxCount},Xs=function(e){return e.configuration.frequencyLimit},Zs=function(e){return e.configuration.isChinaIP},$s=function(e){return e.configuration.features.removePoweredby},Ks=function(e){return e.page.campaignId},ec=function(e){return e.window?e.window.id:e.page.campaignId},tc=function(e){return e.page.chatGroup},nc=function(e){return e.page.buttons},ic=function(e){return e.page.siteId},oc=function(e){return e.page.windowStatus},rc=function(e){return Object.keys(e.page.buttons)},ac=function(e){return e.page.visitor.guid},sc=function(e){return e.page&&{title:e.page.title,url:e.page.url}},cc=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.page.requestChatAction?Object.assign({},e.page.requestChatAction,{campaignId:t}):pr(t,{type:"button",page:sc(e)})},dc=function(e){var t=cc(e);return t&&t.source},lc=function(e){return(dc(e)||{}).type},uc=function(e){return(dc(e)||{}).invitationId},pc=function(e,t){return e.page.buttons[t]},fc=function(e){return"mobile"===e.page.platform||"ipad"===e.page.platform},hc=function(e){return"ipad"===e.page.platform},mc=function(e){return Object.keys(e.page.buttons).map(function(t){var n=e.entities.buttons.entities[t];if(!n)return null;var i=ic(e);return Object.assign({},n,{chatWindowLink:zs(e,Ln(i,t))})}).filter(function(e){return e})},bc=function(e,t){return e.isHideOffline&&!t[e.id]},gc=function(e){return e!==No&&e!==Io},wc=function(e,t){var n=e.type;return("float"===n||"adaptive"===n)&&gc(t)},vc=Yt(1)(function(e,t,n){return e.filter(function(e){return!bc(e,t)&&!wc(e,n)})}),yc=function(e){return mc(e).filter(function(e){return!e.isHidden})},xc=function(e){var t=yc(e),n=nc(e),i=oc(e);return vc(t,n,i)},_c=function(e){return e.page.skipPreChat},Cc=function(e){return e.page.height},kc=function(e){return e.page.width},Sc=function(e){return e.page.orientation},Ac=function(e){return e.page.isDynamicCampaign},Tc=function(e){return fn(e,"window")},Ic=function(e,t){return function(n){var i=Tc(n);return i?e(i,n):t}},Rc=Ic(function(e){return e.chatStatus},"none"),Pc=function(e){var t=e.window;return t.tab!==Yr&&t.tab!==Qr?null:t.chatStatus!==Kr&&t.chatStatus!==$r&&t.chatStatus!==ea?null:t.isChatBot?null:0===t.involvedAgents.length?null:e.entities.agents.entities[t.involvedAgents[0]]},Mc=function(e){var t=e.window;return t.tab===Yr||t.isChatBot&&t.tab===Qr?t.chatStatus!==Kr&&t.chatStatus!==Zr&&t.chatStatus!==ea?null:t.isChatBot?e.entities.campaigns.entities[t.id].chatBot:null:null},Oc=function(e){var t=Mc(e);return t?t.agentButton:""},Ec=Ic(function(e,t){if(!t.entities)return!1;if(!t.entities.campaigns)return!1;var n=t.entities.campaigns;return n.fetchStatus[e.id]===jr&&!!n.entities[e.id]},!1),Nc=function(e){return fn(e,"window.tab")},Wc=Ic(function(e){return e.expandWindowItems},[]),Bc=function(e){return fn(e,"window.id")},Dc=Ic(function(e,t){return t.entities.campaigns.entities[t.window.id]},null),zc=function(e){return e.entities.campaigns.entities[e.window.id].mainColor},jc=function(e){var t=e.entities.campaigns.entities[e.window.id].chat.texture;return t?"url("+t+")":null},qc=Ic(function(e){return e.ssoUrl},""),Lc=Ic(function(e){return e.showPrelogin},!1),Vc=Ic(function(e){return e.isChatBot},!1),Fc=function(e){var t=fn(e,"window");return!!t&&(t.isChatBot&&t.chatStatus===Kr&&!t.chatWithAgentClicked)},Uc=Yt(1)(function(e,t,n,i){return function(o){var r=t.entities[n];if("agent"===o.sender.type){var a=e.entities[o.sender.id];return Object.assign({},o,{sender:a||{name:r.languages.operatorDefaultName}})}if("chatbotRequestQuestionGuid"===o.type||"chatbot"===o.sender.type)return Object.assign({},o,{sender:{name:r.chatBot.name,avatar:r.chatBot.avatar}});if("visitorRequestChat"===o.type)return Object.assign({},o,{queuePosition:i.position,estimatedWaitTime:i.waitTime});if("agentJoinChat"===o.type||"agentEndChat"===o.type||"agentTransferChat"===o.type){var s=e.entities[o.sender.id];return Object.assign({},o,{sender:s||{name:r.languages.operatorDefaultName}})}return o}}),Hc=function(e){return function(t){return"creditCardMasked"!==t.type&&"pendingAccept"!==t.type&&"pendingAudioRequesting"!==t.type&&"pendingHangup"!==t.type&&"pendingVideoRequesting"!==t.type&&"pendingSubmitSecureForm"!==t.type&&"pendingCancelSecureForm"!==t.type&&"pendingGetSecureFormFailure"!==t.type&&"visitorTyping"!==t.type&&"pendingVisitorIsTyping"!==t.type&&(("systemPromoteOfflineMesage"!==t.type||e===Zr)&&(!!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"===Wt(t.content)&&Object.keys(t.content).length>0))))}},Gc=Yt(1)(function(e,t,n,i,o,r){return o.map(Uc(e,t,n,i)).filter(Hc(r))}),Yc=Ic(function(e,t){var n=e.messages,i=t.entities,o=i.agents,r=i.campaigns,a=e.id,s=e.queue,c=e.chatStatus;return Gc(o,r,a,s,n,c)}),Qc=Ic(function(e){return e.messages},[]),Jc=Ic(function(e){return e.queue},{}),Xc=Ic(function(e){return e.involvedAgents},[]),Zc=Ic(function(e){return e.audioVideoAgentId},0),$c=Ic(function(e){return e.chatGuid}),Kc=Ic(function(e){return e.chatId}),ed=Ic(function(e){return e.visitorTyping},!1),td=Ic(function(e){return e.draft},""),nd=Ic(function(e){return e.maxId},-1),id=Ic(function(e){return e.error}),od=Ic(function(e){return e.warning}),rd=Ic(function(e){return e.maxReadId},-1),ad=Ic(function(e,t){for(var n=Yc(t),i=e.maxReadId,o=0,r=n.length-1;r>=0;r-=1){var a=n[r];if(a.id<=i)break;if(void 0!==a.id&&wi(a)&&(o+=1)>=99)return 99}return o},0),sd=Ic(function(e,t){var n=Yc(t);if(!(ad(t)<=0))for(var i=n.length-1;i>=0;i-=1){var o=n[i];if(wi(o))return o}}),cd=function(e){var t=fn(e,"page.requestChatAction.source.page.url");return"https://www.comm100.com/powered-by/?customer="+(Sn(t)||"")},dd=function(e){return e.window&&e.window.messages&&e.window.messages.find(function(e){return"agentRefuseChat"===e.type})},ld=Ic(function(e,t){var n=Dc(t).style===ys,i=(As&Dc(t).chat.tools)===As,o=(Rs&Dc(t).chat.tools)===Rs;if(e.tab!==Yr)return!1;switch(e.chatStatus){case Kr:return!0;case Zr:return!!e.allowWaitingSendMessage&&!e.isChatBot;case ea:return(!n||fc(t))&&(i||o)&&!dd(t)&&!e.isChatBot;case $r:return!0;default:return!1}},!1),ud=Ic(function(e){if(e.tab!==Yr)return!1;switch(e.chatStatus){case Kr:return!0;case Zr:return!!e.allowWaitingSendMessage;case ea:return!1;case $r:default:return!0}},!1),pd=function(e){return e.window&&e.window.messages&&e.window.messages.find(function(e){return"visitorFile"===e.type})},fd=function(e){return e.window&&e.window.messages&&e.window.messages.find(function(e){return"visitorSetEmail"===e.type})},hd=function(e){var t=fn(e,"window.involvedAgents");return t&&t.length>0},md=Ic(function(e){return e.chatStatus===Kr},!1),bd=Ic(function(e){return e.chatStatus===$r},!1),gd=function(e){var t=Xc(e);if(0!==t.length){var n=t[0];return e.entities.agents.entities[n]}},wd=function(e){var t=Xc(e);if(0!==t.length){var n=Zc(e);if(n>0)return e.entities.agents.entities[n];if(t.length>1)return{avatar:zs(e,"/images/avatar.png"),name:""};var i=t[0];return e.entities.agents.entities[i]}},vd=function(e){var t=bd(e);if(md(e)||t){if(t){if("manualInvitation"!==e.page.requestChatAction.source.type)return;return gd(e)}var n=Mc(e);return n||gd(e)}},yd=function(e){var t=vd(e);return t?t.avatar:t},xd=function(e){var t=wd(e);return t?t.avatar:""},_d=function(e){var t=wd(e);return t?t.name:""},Cd=Ic(function(e){return e.chatStatus===Zr||e.chatStatus===Kr},!1),kd=Ic(function(e){return e.chatStatus===Kr&&e.isChatBot},!1),Sd=Ic(function(e){return e.chatStatus===Zr&&e.isChatBot},!1),Ad=Ic(function(e){return e.ifHideBio},!1),Td=Ic(function(e){return e.chatWithAgentClicked},!1),Id=Ic(function(e){return e.fileUploadCount},0),Rd=function(e,t){return fn(e,"window.fields."+t)},Pd=Ic(function(e){return e.disabled},!1),Md=function(e){var t=Dc(e);return t&&t.notification},Od=function(e){var t=e.window,n=fn(e,"page.windowStatus");return t&&t.tab===Yr&&(n===Ro||n===Mo)&&!!t.expandWindowSelectedTab},Ed=function(e){var t=Pc(e);return!!t&&t.isSupportWebrtc},Nd=function(e){return fn(e,"window.expandWindowItems")},Wd=Ic(function(e){return e.audio_video_disabled},!1),Bd=function(e){return fn(e,"window.showChatWindowInExpandwindow")},Dd=function(e){return fn(e,"window.expandWindowSelectedTab")},zd=function(e){return Dc(e).customCSS},jd=Ic(function(e){return e.vChatStatus},"notStart"),qd=Ic(function(e){return e.audioVideoChatStartTime},0),Ld=Ic(function(e){return e.isFocused},!1),Vd=Ic(function(e){return e.frequencyLimitState},!1),Fd=Ic(function(e){return e.autoEjectTranscript},!1),Ud=function(e){var t=Dc(e);return t&&t.isRTL},Hd=function(e){var t=Pc(e);return!(!t||!t.bio)&&(!Ic(function(e){return e.ifHideBio},!1)(e)&&Dc(e).header.showBio)},Gd=function(e,t){return fn(e,"entities.campaigns.entities."+t)},Yd=function(e,t){var n=fn(e,"entities.campaigns.entities."+t+".chat.tools");return void 0===n?0:n},Qd=function(e,t){return As&Yd(e,t)},Jd=function(e,t){return ks&Yd(e,t)&&e.window.chatStatus!==ea},Xd=function(e,t){return Ss&Yd(e,t)&&e.window.chatStatus!==ea},Zd=function(e,t){return Ts&Yd(e,t)&&e.window.chatStatus!==ea&&fn(e,"configuration.features.audioVideoChat")&&Yn},$d=function(e,t){return Is&Yd(e,t)&&e.window.chatStatus!==ea&&fn(e,"configuration.features.audioVideoChat")&&Yn},Kd=function(e,t){return Rs&Yd(e,t)&&!dd(e)&&!fc(e)},el=function(e,t){var n=Dc(e);if(n.postchat){return n.postchat.map(function(t){return e.entities.fields.entities[t]}).find(function(e){return e.type===t})}return null},tl=function(e){return el(e,"rating")},nl=function(e){return el(e,"comment")},il=function(e){return e&&Object.keys(e)||[]},ol=function(e,t){return e.entities.agents.entities[t]},rl=function(e){return il(e.entities.agents.entities)},al=function(e){return rl(e).length},sl=function(e){return rl(e).reduce(function(t,n){return t.concat([ol(e,n)])},[])},cl=function(e){var t=sl(e).map(function(e){return e.avatar}).filter(function(e){return e});return 0===t.length?null:1===t.length?Dc(e).style===xs?[zs(e,"/images/avatar-male.png"),t[0],zs(e,"/images/avatar-female.png")]:[t[0],zs(e,"/images/avatar-male.png"),zs(e,"/images/avatar-female.png")]:2===t.length?[].concat(t,[zs(e,"/images/avatar-male.png")]).filter(function(e){return e}):t.slice(0,3)},dl=function(e,t){return e.entities.buttons.entities[t]},ll=function(e,t){return dl(e,t).type},ul=function(e,t){var n=dl(e,t);return n&&n.customOffline},pl=function(e,t){return!!e.entities.buttons&&dl(e,t).isEmbeddedWindow},fl=function(e){return e.entities.departments.entities},hl=function(e,t){return dl(e,t).iframeStyle},ml=function(e,t){var n=Gd(e,t);if(n)return n.customJS},bl=Math.pow(2,0),gl=Math.pow(2,1),wl=Math.pow(2,2),vl=Yt(1)(function(e,t,n){var i={};return i.id=t.id,i.winType=n,i.isManual=t.isManual,i.type=zo,i.campaignId=e,i.message=t.text,i.textTypeHere=t.textTypeHere,i.messageCount=t.messageCount,t.agent&&(i.agentName=t.agent.name,i.avatar=t.agent.avatar),i.agent=t.agent,i}),yl=Yt(1)(function(e,t){var n={};return n.id=t.id,n.type=jo,n.campaignId=e,n.message=t.text,n.acceptText=t.acceptText,n.refuseText=t.refuseText,n.themeColor=t.themeColor,n.title=t.title,n.agent=t.agent,n}),xl=Yt(1)(function(e,t){var n={};if(n.id=t.id,n.type=Bo,n.image=t.image,n.message=t.text,n.fontSize=t.fontSize,n.color=t.color,n.themeColor=t.themeColor,n.fontFamily=t.fontFamily,n.ifModal=t.ifModal,t.fontStyle){var i=t.fontStyle;n.fontWeight=i&bl?"bold":"",n.fontStyle=i&gl?"italic":"",n.textDecoration=i&wl?"underline":""}return n.messageArea={left:t.textArea[0],top:t.textArea[1],width:t.textArea[2],height:t.textArea[3]},n.closeArea={left:t.closeArea[0],top:t.closeArea[1],width:t.closeArea[2],height:t.closeArea[3]},n.textAlign=t.textAlign,t.position&&(n.position=t.position),n.isManual=t.isManual,n.campaignId=e,n.agent=t.agent,n}),_l=function(e){return e.page&&e.page.invitation},Cl=Yt(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}})}),kl={custom:{}},Sl=function(e,t,n,i){return t.configuration.features[n]?e:e.filter(function(e){return t.entities.fields.entities[e].type!==i})},Al=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 r=o[i];return r=Sl(r,e,"department","department"),r=Sl(r,e,"ticket","ticket"),r.map(function(t){var n=e.entities.fields.entities[t],i="";if("department"===n.type){var r=e.entities.departments.entities;n=Object.assign({},n,{options:Cl(r)})}var a=e.window?e.window.fields:kl,s=void 0;if(s="name"===n.type?a.name:n.type===qn?a.email:"phone"===n.type?a.phone:"company"===n.type?a.company:"product"===n.type?a.product:"department"===n.type?a.department:"rating"===n.type?a.rating:"comment"===n.type?a.comment:"subject"===n.type?a.subject:"content"===n.type?a.content:"attachment"===n.type?a.attachment:"ticket"===n.type?a.ticketId:a.custom[n.label],s=null!=n.value?n.value:s,n.isRequired&&(!s||Array.isArray(s)&&0===s.length)&&(i=o.languages.promptRequired),n.type===qn&&s&&!Zn(s)&&(i=o.languages.promptInvalidEmail),"attachment"===n.type&&"undefined"!=typeof File&&s instanceof File){var c=Qs(e);s.size>Math.pow(1024,2)*c&&(i=o.languages.promptFileSizeExceed.replace("{fileSize}",c))}return Object.assign({},n,{value:s,error:n.customError||i})})}return[]},Tl=function(e,t){return e.window.forms[t]},Il=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]}):[]},Rl=function(e){var t={text:!0,textarea:!0,radio:!0,checkbox:!0,select:!0,"checkbox-list":!0,attachment:!0,rating:!0};return Il(e).filter(function(e){return t[e.type]})},Pl=function(e){var t=ec(e);if(Yd(e,t)<1)return!1;var n=e.window;return!(!n||n.isChatBot)&&("postchat"!==Nc(e)&&(n.chatStatus===Kr||n.chatStatus===ea))},Ml=function(e){return e.configuration.features.ga},Ol=function(e,t){return fn(e,"entities.campaigns.entities."+t+".style")},El=function(e){var t=Bc(e);return Ol(e,t)},Nl=function(e){return e.configuration.customVariables},Wl=function(e){return e.configuration.customVariableResult},Bl=function(e){return e.configuration.features.hideCreditCard},Dl=function(e){return e.configuration.features.showTypingContent},zl=function(e){return e.entities.campaigns.entities[e.window.id].languages},jl=function(e){return function(t,n){var i=zl(t),o=e[n];if(o)return i[o];process.env.NODE}},ql=jl((uo={},uo.prechat="greetingPreChatWindow",uo.postchat="greetingRating",uo.offline="greetingOfflineMessageWindow",uo)),Ll=function(e){return"horizontal"===e.entities.campaigns.entities[e.window.id].formStyle},Vl=jl((po={},po.prechat="buttonStartChat",po.postchat="buttonSubmit",po.offline="buttonSubmit",po)),Fl=function(e,t){if(!(t<=0)){return zl(e).embeddedWindowNewMessages.replace("{count}",t)}},Ul=function(e){return zl(e).writeReply},Hl=function(e){var t=Bc(e),n=Gd(e,t).mainColor;return si(n)},Gl=function(e){var t=e.entities.campaigns.entities[e.window.id];return!!t.socialLogin&&t.socialLogin.facebook},Yl=function(e){var t=e.entities.campaigns.entities[e.window.id];return!!t.socialLogin&&t.socialLogin.googlePlus},Ql=function(e){return e.entities.campaigns.entities[e.window.id].chat.showAvatar},Jl=function(e){var t=e.entities.campaigns.entities[e.window.id],n=t.header,i=n.showAvatar,o=n.type;return!!i||!(!Vc(e)||"banner"!==o)},Xl=function(e){return e.entities.campaigns.entities[e.window.id].sounds},Zl=function(e,t){var n=Xl(e);return n&&n[t]},$l=function(e){return e.configuration.standbyUrl+"/moderator.aspx?siteId="+ic(e)},Kl=function(e){var t=tc(e),n=ic(e),i=ac(e);return zs(e,["/visitor.ashx?",n?"siteId="+n:"",t?"&chatGroup="+t:"",i?"&visitorGuid="+i:""].join(""))},eu=function(e){return Ms(e)?e.page.visitor.id:e.page.visitor.standbyId},tu=function(e){return e.page.visitor.id},nu=function(e){return e.page.visitor.standbyId},iu=function(e){return"manualInvitation"===lc(e)&&Rc(e)===$r},ou=function(e){return ml(e,Ks(e))},ru=function(e){return Os(e)&&null==lc(e)},au=function(e){return Bs(e)&&Os(e)&&pl(e,ec(e))&&!ru(e)&&!On},su=function(e){return(e.entities.campaigns.entities[ec(e)]||{}).languages},cu=function(e,t){var n=su(e);return n&&n[t]},du=function(){return{type:Co}},lu=function(e){return{type:"app/switchServer",payload:e}},uu=function(){return{type:"app/ready"}},pu=function(){return{type:"app/setIsOpenerExists"}},fu=function(e){return{type:"app/setIsActive",payload:e}},hu=function(e,t){return{ type:"page/setButtonIsOnline",payload:{campaignId:e,ifOnline:t}}},mu=function(e){return{type:yo,payload:e}},bu=function(e){return{type:"page/updateVisitor",payload:e}},gu=function(){return{type:"invitaton/accept"}},wu=function(e){return{type:"page/buttonClick",payload:e}},vu=function(){return{type:"invitaton/refuse"}},yu=function(e){return{type:"chatWindow/open",payload:e}},xu=function(e){return{type:_o,payload:e}},_u=(P(xu,Io),P(xu,Po)),Cu=P(xu,Ro),ku=P(xu,Eo),Su=P(xu,Oo),Au=P(xu,No),Tu=P(xu,Mo),Iu=function(e){return{type:"page/setSkipPreChat",payload:e}},Ru=function(e){return{type:"page/updateSize",payload:e}},Pu=function(e){return{type:"page/updateOrientation",payload:e}},Mu=P(Pu,"landscape"),Ou=P(Pu,"portrait"),Eu=function(e){return{type:"page/setCampaignId",payload:e}},Nu=function(e){return{type:"config/updateConfig",payload:e}},Wu=function(e){return{type:"entities/updateCampaign",payload:e}},Bu=function(e){return{type:"entities/updateButton",payload:e}},Du=function(e,t){return{type:"entities/button/visible",payload:{isHidden:!e,campaignId:t}}},zu=function(e){return{type:"entities/updateAgent",payload:e}},ju=function(e){return{type:"entities/updateDepartment",payload:e}},qu=function(e,t,n){return{type:"entities/updateFields",payload:{type:e,fields:t,campaignId:n}}},Lu=function(e,t,n){return{type:"window/update-upload",payload:{name:e,percent:t,onCancel:n}}},Vu=function(){return{type:"window/sucess-file"}},Fu=function(e){return{type:"window/fail-file",payload:e}},Uu=function(e){return{type:"chatWindow/showTab",payload:e}},Hu=function(e,t){return{type:"sso/updateSSO",payload:{ssoUrl:e,showPrelogin:t}}},Gu=function(e){return{type:xo,payload:e}},Yu=function(e){return{type:"window/addSystemMessage",payload:e}},Qu=function(e,t){return{type:"window/sendText",payload:{message:e,ifCardMasking:t}}},Ju=function(e){return{type:"window/sendFile",payload:e}},Xu=function(){return{type:"window/startWaiting"}},Zu=function(){return{type:"window/startChatBot"}},$u=function(e){return{type:"window/removeForm",payload:e}},Ku=$u,ep=function(e){return{type:"window/toggle-warning",payload:e}},tp=function(e){return{type:"window/toggleFocus",payload:e}},np=P(ep,""),ip=function(e){return{type:"window/toggle-error",payload:e}},op=function(){return{type:ko}},rp=ip,ap=P(ip,""),sp=function(){return{type:"web/fromChatbotToAgent"}},cp=function(e){return{type:"web/chatBotSelectQuestion",payload:e}},dp=function(e,t){return{type:"web/chatBotAnswerHelpful",payload:{ifHelpful:e,actionGuid:t}}},lp=function(e,t,n){return{type:"window/updateChatIdentity",payload:{chatId:e,chatGuid:t,serverTime:n}}},up=function(e,t){return{type:"chatWindow/chatInputWarning",payload:{type:e,params:t}}},pp=function(e){return{type:"window/setFrequencyLimitState",payload:e}},fp=function(){return{type:"web/startChatAgain"}},hp=function(e){return{type:"window/contentScrollStatusUpdate",payload:e}},mp=function(e){return{type:"window/toggle-disable",payload:e}},bp=P(mp,!0),gp=(P(mp,!1),function(){return{type:"chatWindow/popOut"}}),wp=function(){return{type:"chatWindow/popIn"}},vp=function(e){return{type:"window/updateQueue",payload:e}},yp=function(e){return{type:"chatinput/setVisitorIsTyping",payload:{message:e}}},xp=function(e,t){return{type:"window/prepareP2pChat",payload:{localVideo:e,remoteVideo:t}}},_p=function(){return{type:"window/acceptAudioVideoChat"}},Cp=function(e){return{type:"expandWindow/expandWidowTabSelect",payload:e}},kp=function(e){return{type:"expandWindow/toggleExtendedWindow",payload:e}},Sp=function(e){return{type:"expandWindow/setWindowTabs",payload:e}},Ap=function(e){return{type:"window/updateMaxReadId",payload:e}},Tp=function(){return{type:"window/closeMinimizeBubble"}},Ip=function(e){return{type:"window/togglePopupBubble",payload:e}},Rp=function(){return{type:"window/closeSliently"}},Pp=function(e){return{type:"window/setId",payload:e}},Mp=function(){return{type:"window/remove-agent-is-typing"}},Op=function(){return{type:"window/mounted"}},Ep=function(e){return{type:"window/chatbotTimeout",payload:e}},Np=function(){return{type:"window/resetMaxId"}},Wp=function(){for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:ec(e.getState());return!!yc(e.getState()).find(function(e){return e.id===t})}},vf=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ec(e.getState());return nc(e.getState())[t]?"online":"offline"}},yf=function(e){return function(){return!!_c(e.getState())}},xf=function(e){return function(){return Od(e.getState())}},_f=function(e,t){return function(n){var i=n;return void 0===i&&(i=Ri()[0]),Al(t.getState(),e,i)}},Cf=function(e){return function(){return Wc(e.getState())}},kf=function(e){return{"livechat.siteId":mf(e),"livechat.campaignIds":Ri,"livechat.isDynamicCampaign":bf(e),"livechat.isMobile":gf(e),"livechat.button.isVisible":wf(e),"livechat.button.status":vf(e),"livechat.prechat.isSkip":yf(e),"livechat.prechat.fields":_f("prechat",e),"livechat.postChat.fields":_f("postchat",e),"livechat.offlineMessage.fields":_f("offline",e),"livechat.extendedWindow.isVisible":xf(e),"livechat.extendedWindow.tabs":Cf(e)}},Sf=function(e,t){return function(n,i){var o=i||Ri()[0];e.dispatch(qu(t,n,o))}},Af=function(e){var t=ff(e),n=t(Du);return{"livechat.customVariables":function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];ue(e,t.reduce(function(e,t){var n=e;return void 0===t.value?n:(n[t.name]=t.value.toString(),n)},{}),!1)},"livechat.button.isVisible":function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ec(e.getState());n(t,i)},"livechat.prechat.isSkip":t(Iu),"livechat.prechat.fields":Sf(e,"prechat"),"livechat.postChat.fields":Sf(e,"postchat"),"livechat.offlineMessage.fields":Sf(e,"offline"),"livechat.extendedWindow.isVisible":t(kp),"livechat.extendedWindow.tabs":t(Sp)}},Tf=function(e,t){return function(){return t.dispatch(Zf(e,0,Al(t.getState(),e,Bc(t.getState()))))}},If=function(e){var t=ff(e),n=t(ku),i=t(_u),o=t(Au),r=t(qp),a=function(e){return t(P(Df,e))},s=function(t){return function(n){var i=de(e.getState());i&&n===i.id&&t(ec(e.getState()))}},c=t(wu,yu);return{"livechat.button.click":function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ec(e.getState());return c(t)},"livechat.invitation.accept":s(t(gu,yu)),"livechat.invitation.refuse":s(t(vu)),"livechat.prechat.minimize":n,"livechat.chat.minimize":n,"livechat.postChat.minimize":n,"livechat.offlineMessage.minimize":n,"livechat.prechat.restore":i,"livechat.chat.restore":i,"livechat.postChat.restore":i,"livechat.offlineMessage.restore":i,"livechat.prechat.close":o,"livechat.chat.close":o,"livechat.postChat.close":o,"livechat.offlineMessage.close":o,"livechat.chat.endChat":r,"livechat.prechat.field.focus":a("prechat"),"livechat.postChat.field.focus":a("postchat"),"livechat.offlineMessage.field.focus":a("offline"),"livechat.prechat.submit":Tf("prechat",e),"livechat.postChat.submit":Tf("postchat",e),"livechat.offlineMessage.submit":Tf("offline",e),"livechat.extendedWindow.tabs.click":t(Cp)}},Rf={},Pf=function(){return Rf},Mf={},Of=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]:ec(e.getState());return r(n)}),hf("set_custom_variables",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return ue(e,t.reduce(function(e,t){var n=e;return n[t.name]=t.value,n},{}),!1)}),Si.setCustomVariables=Si.set_custom_variables;var a=e.getState(),s=e.subscribe(function(){if(!Ps(a)){var t=e.getState();Ps(t)&&(s(),N()),a=t}});return function(){delete Si.get,delete Si.set,delete Si.do,delete Si.render,delete Si.on,s()}},Bf=function(e,t,n){return{type:"form/update-value",payload:{id:t,value:n},meta:{formType:e}}},Df=function(e,t){return{type:"form/focus",payload:{id:t},meta:{formType:e}}},zf=function(e,t){return{type:"form/blur",payload:{id:t},meta:{formType:e}}},jf=function(e){return{type:"form/submit-start",payload:e,meta:{formType:e}}},qf=function(e){return{type:"form/submit-success",payload:e,meta:{formType:e}}},Lf=function(e){return{type:"form/submit-fail",payload:e,meta:{formType:e}}},Vf=function(e,t){return{type:"form/update",payload:e,meta:t}},Ff=function(e){return{type:"form/reset",meta:e}},Uf=function(e){return{type:"form/fill-default",payload:e}},Hf=function(e,t){return{type:"form/submit-social",payload:t,meta:{formType:e}}},Gf=function(e,t){return{type:"form/validate-all",payload:{ids:t},meta:{formType:e}}},Yf=function(e,t){return function(n,i,o){return function(r){return new Promise(function(a,s){var c=o.filter(function(e){return""!==e.error});if(c.length>0){var d=c.map(function(e){return e.id});return r(Gf(t,d)),void s(d)}var l=ki(o),u=Wa(),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),r(jf(t)),Of(n+".submit",l),r(e(fi(l),function(e){return new Promise(function(n){r(qf(t));var s=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},{});s=Object.assign({},l,{custom:c})}r(Vf(s,t)),setTimeout(function(){r("offline"===t?bp():Ff(t)),n(e),a()},i)})}))})}}},Qf=Yf(Lp,"prechat"),Jf=Yf(Vp,"postchat"),Xf=Yf(Fp,"offline"),Zf=function(e,t,n){return"prechat"===e?Qf("livechat.prechat",t,n):"postchat"===e?Jf("livechat.postChat",t,n):Xf("livechat.offlineMessage",t,n)},$f=function(){var e=Wa().popout;if(e){var t={};return e.ticketId&&(t.ticketId=e.ticketId),e.departmentId&&(t.department=e.departmentId),t}return{}},Kf=function(e){var t=e.dispatch,n=e.getState;return function(e){return function(i){if(!n())return e(i);if(i.type===Co&&eu(n())<=0&&Ta({isBanned:!0}),"page/updateVisitor"===i.type){var o=i.payload,r=o.id,a=o.guid,s=o.standbyId;r>0&&va(r,!0),s>0&&va(s,!1),a&&_a(a);if((r||s||0)<=0){var c=Aa(),d=c.firstVisitTime,l=c.visitTimes;Ta({firstVisitTime:d||(new Date).getTime(),visitTimes:(l||0)+1})}else Ta({firstVisitTime:void 0,visitTimes:void 0})}if("chatWindow/showTab"===i.type&&i.payload===Gr){var u=void 0,p=dl(n(),Bc(n())),f=p.routeDepartment;f&&(u={department:f});var h=Aa();u=Object.assign({},h?h.form:{},u,Os(n())?$f():{}),Object.keys(u).length>0&&e(Uf(u))}if("chatWindow/showTab"===i.type&&i.payload===Jr){var m=void 0,b=dl(n(),Bc(n())),g=b.routeDepartment;g&&(m={department:g}),Os(n())&&(m=Object.assign({},m,$f())),m&&e(Uf(m))}if(i.type===yo){var w=i.payload;if(w.isManual&&w.chat){var v=w.chat.guid,y=Ra(v),x=y.windowStatus,_=y.maxReadId;if(x){var C=e(Object.assign({},i,{payload:Object.assign({},i.payload,{windowStatus:x})}));return null!=_&&t(Ap(_)),C}}}var k=n(),S=Cd(k),A=e(i),T=n();if("form/update"===i.type&&"prechat"===i.meta){if(!Dc(T).isForgetPrechat){var I=Object.assign({},i.payload);delete I.department,delete I.ticketId,Ta({form:I})}}var R=Cd(T),P=$c(T);if(!S&&R){var M=oc(T);M!==Ro&&M!==Oo&&M!==Mo||Pa(P,{windowStatus:M})}if(i.type===_o){var O=i.payload===Oo||i.payload===Ro||i.payload===Mo,E=iu(T);(R||E)&&O&&Pa(P,{windowStatus:i.payload})}if("window/toggleFocus"===i.type||i.type===_o||i.type===xo||"window/resetMaxId"===i.type){var N=rd(k),W=rd(T);N!==W&&Pa(P,{maxReadId:W})}return A}}},eh=function(){function e(){var e=document.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.createEvent("Event");n.initEvent(t,!1,!0),e.dispatchEvent(n)}}}function t(){}function n(){var t=this;e.call(this);var n=a;Object.defineProperties(this,{close:{value:function(){var e=this;n===a&&(window.external.msSiteModeClearIconOverlay(),s.forEach(function(t){window.removeEventListener(t,e.close)}),this.dispatchEvent("click"),this.dispatchEvent("close"),n=null)}.bind(this)}}),this.close(),this.icon&&window.external.msSiteModeSetIconOverlay(c(this.icon),this.description||this.title),window.external.msSiteModeActivate(),this.dispatchEvent("show"),s.forEach(function(e){window.addEventListener(e,t.close)}),a+=1,n=a}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":Wt(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===r.indexOf(o))throw TypeError('Failed to construct "Notification": The provided value "'+o+'" is not a valid enum value of type NotificationDirection.');var a=new d(n,i);return a.body||Object.defineProperty(a,"body",{value:String(i.body||"")}),a.data||Object.defineProperty(a,"data",{value:i.data||null}),a.dir||Object.defineProperty(a,"dir",{value:o||r[0]}),a.icon||Object.defineProperty(a,"icon",{value:String(i.icon||"")}),a.lang||Object.defineProperty(a,"lang",{value:String(i.lang||"")}),a.requireInteraction||Object.defineProperty(a,"requireInteraction",{value:Boolean(i.requireInteraction)}),a.silent||Object.defineProperty(a,"silent",{value:Boolean(i.silent)}),a.tag||Object.defineProperty(a,"tag",{value:String(i.tag||"")}),a.title||Object.defineProperty(a,"title",{value:String(n)}),a.timestamp||Object.defineProperty(a,"timestamp",{value:(new Date).getTime()}),a}var o=["granted","default","denied","notsupported"],r=["auto","ltr","rtl"],a=-1,s=["click","scroll","focus"],c=function(e){var t=e.lastIndexOf(".");return(-1!==t?e.substr(0,t):e)+".ico"},d=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)})})}}),d.permission||Object.defineProperty(d,"permission",{enumerable:!0,get:function(){return d.permissionLevel&&d.permissionLevel()}}),Object.defineProperty(i,"permission",{enumerable:!0,get:function(){return d.permission}}),Object.defineProperty(i,"requestPermission",{enumerable:!0,value:function(){return new Promise(function(e,t){var n=d.requestPermission(function(t){e(t)});if(n)return"function"!=typeof n.then||"function"!=typeof n.catch?void t(n):void e(n)})}}),i}(),th=eh.requestPermission,nh=function(e,t){if("granted"===eh.permission){var n=new eh(window.location.host,{body:e,icon:t,tag:"comm100_notify"}),i=null;n.onclick=function(){window.focus(),n.close()},n.onshow=function(){i=setTimeout(function(){n.close(),i=null},5e3)},n.onclose=function(){i&&clearTimeout(i)}}},ih=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=""})}}}(),oh=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=void 0,o=void 0,r=void 0,a=null,s=0,c=!1,d=function(){s=!1===n.leading?0:Date.now(),a=null,r=e.apply(i,o),Tn(r)&&(c=!0,r.then(function(){c=!1},function(){c=!1})),i=null,o=null};return function(){if(c)return r;for(var l=arguments.length,u=Array(l),p=0;pt?(clearTimeout(a),a=null,s=f,r=e.apply(i,o),Tn(r)&&(c=!0,r.then(function(){c=!1},function(){c=!1})),o=null,i=null):a||!0!==n.trailing||(a=setTimeout(d,h)),r}}(ih.play,500),rh=ih.stop,ah=In(nh,50),sh=function(e){return function(t){return function(n){var i=e.getState();"chatWindow/popOut"===n.type&&rh(Zl(i,"video-request"));var o=t(n),r=e.getState();if(!Ps(r))return null;var a=Md(r),s=rd(i);if(n.type===ko&&Of("livechat.chat.end"),n.type===xo){var c=Rc(i),d=Rc(r);c!==d&&(d===Kr?Of("livechat.chat.start",Kc(r)):d===ea&&Of("livechat.chat.end")),n.payload.forEach(function(e){if(wi(e)&&e.id&&!(e.id<=s)&&(xi(e.type)&&rh(Zl(r,"video-request")),!Yn||"visitorAudioChatRequest"!==e.type&&"agentAudioChatRequest"!==e.type&&"visitorVideoChatRequest"!==e.type&&"agentVideoChatRequest"!==e.type?oh(xi(e.type)&&"visitorAudioChatAccept"!==e.type&&"visitorVideoChatAccept"!==e.type&&"agentAudioChatAccept"!==e.type&&"agentVideoChatAccept"!==e.type?Zl(r,"video-end"):Zl(r,"new-response")):oh(Zl(r,"video-request"),!0),"agentAcceptChat"!==e.type&&a)){var t="string"==typeof e.content?e.content:e.content.text,n=zs(r,"Images/logo60.png");ah(t,n)}})}if(a&&md(r)&&!md(i)&&th(),"page/setButtonIsOnline"===n.type){var l=n.payload.campaignId;if(pc(i,l)!==pc(r,l)){var u=dl(r,n.payload.campaignId),p=pc(r,l);Of(p?"livechat.button.online":"livechat.button.offline",u)}}if("window/updateQueue"===n.type){var f=Jc(i),h=Jc(r);h.position===f.position&&h.waitTime===f.waitTime||Of("livechat.chat.waitingQueue.update",h)}return o}}},ch=(ho={},ho.prechat=function(e){e(Uu(Gr))},ho.chat=function(e,t,n){var i=n.chatId,o=n.chatGuid,r=n.serverTime;Cd(t)||(e(lp(i,o,r)),e(Xu()),e(Uu(Yr)))},ho.chatbot=function(e,t,n){var i=n.chatId,o=n.chatGuid,r=n.serverTime;e(lp(i,o,r)),e(Zu()),e(Uu(Yr))},ho.offline=function(e){e(Uu(Jr))},ho.sso=function(e,t,n){e(Hu(n.url,n.showPrelogin)),e(n.showPrelogin?Uu(Hr):Uu("ssoLogin"))},ho),dh=function(e,t,n){if("chat"===n.next||"chatbot"===n.next){var i=n.chatId,o=n.chatGuid;e(lp(i,o))}e(hu(Bc(t),"offline"!==n.next)),(ch[n.next]||function(){})(e,t,n)},lh={},uh=function(e){return function(t){return t.forEach(function(t){return lh[t.type](e,t)})}},ph=4342338,fh="GET",hh=P(ge,fh),mh=P(ge,"POST"),bh=function(e,t,n,i){var o=new FormData;return o.append("file",t),o.append("json",JSON.stringify(n)),mh(e,o,i)},gh="{email}",wh="eventSendTranscript",vh="eventRatingSubmitSuccess",yh=qo,xh=function(e,t,n){var i=P(zs,t),o=ic(t),r=dl(t,n).lastUpdateTime,a=function(e){return pn(e,{sounds:e.sounds&&Object.keys(e.sounds).reduce(function(t,n){var o;return pn(t,(o={},o[n]=i(e.sounds[n]),o))},{}),chatBot:e.chatBot&&pn(e.chatBot,{avatar:i(e.chatBot.avatar)}),chat:e.chat&&pn(e.chat,{texture:i(e.chat.texture)}),header:e.header&&pn(e.header,{banner:e.header.banner&&i(e.header.banner),logo:e.header.logo&&i(e.header.logo)})})};return e(Wu({id:n,entity:null,fetchStatus:"fetching"})),hh(i("/campaign.ashx?siteId="+o+"&campaignId="+n+"&lastUpdateTime="+r)).then(function(t){var i=a(t.output);return e(Wu({id:n,entity:i,error:null,fetchStatus:jr})),i}).catch(function(t){throw e(Wu({id:n,entity:null,error:t.error.message,fetchStatus:"error"})),t})},_h=function(){};_h.thatReturns=ve,_h.thatReturnsFalse=ve(!1),_h.thatReturnsTrue=ve(!0),_h.thatReturnsNull=ve(null),_h.thatReturnsThis=function(){return this},_h.thatReturnsArgument=function(e){return e};var Ch=_h,kh=function(e){},Sh=ye,Ah="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Th=function(){function e(e,t,n,i,o,r){r!==Ah&&Sh(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=Ch,n.PropTypes=n,n},Ih=e(function(e){e.exports=Th()}),Rh=Ih.arrayOf,Ph=Ih.oneOfType,Mh=Ih.objectOf,Oh=Ih.string,Eh=Ih.bool,Nh=Ih.func,Wh=Ih.number,Bh=Ih.oneOf,Dh=Ih.element,zh=Ih.shape,jh=(Ih.checkPropTypes,Ih.instanceOf),qh=function(e){function t(){return Bt(this,t),qt(this,e.apply(this,arguments))}return zt(t,e),t.prototype.getChildContext=function(){return this.props.context},t.prototype.render=function(){return this.props.children[0]},t}(I),Lh=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,r=Vh(e[t],n),a=Vh(i,n);a instanceof Date&&r instanceof Date?o=JSON.stringify(a)!==JSON.stringify(r):a!==r&&(o=!0);return o})},Uh=function(e){var t=e.split(".");return 1===t.length?e:t},Hh=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(Uh),o=n.map(Uh);return function(t,n){var r=Fh(e,"props",i,t)||Fh(e,"state",o,n);return r}},Gh=function(e,t){var n=e.contentDocument;return n.open(),n.write(t),n.close(),n.getElementById("container")},Yh=function(e,t,n){var i=e.contentDocument.head,o=i.querySelector("style#"+t);o||(o=document.createElement("style"),o.id=t,i.appendChild(o)),o.innerHTML=n},Qh=function(e,t,n){var i=[].concat(t),o=n?[].concat(n):[];i.forEach(function(t,n){t&&t!==o[n]&&Yh(e,"id-"+n,i[n])})},Jh=function(e){-1!==navigator.userAgent.indexOf("MSIE 9")&&e.addEventListener("selectionchange",function(){var t=e.activeElement;if("TEXTAREA"===t.tagName||"INPUT"===t.tagName&&"text"===t.type){var n=e.createEvent("CustomEvent");n.initCustomEvent("input",!0,!0,{}),t.dispatchEvent(n)}})},Xh=function(e){function t(){return Bt(this,t),qt(this,e.apply(this,arguments))}return zt(t,e),t.prototype.componentDidMount=function(){var e=this;this.container=Gh(this.iframe,'
');var t=Lh(this,this.container),n=t.render,i=t.unmount,o=Hh(this,["style","innerCss","className"]);this.shouldComponentUpdate=function(t){var i=o(t);return i||n(t.children,function(){return t.callback&&t.callback(e.iframe)}),i},this.componentDidUpdate=function(t){n(e.props.children,function(){return e.props.callback&&e.props.callback(e.iframe)}),t.innerCss!==e.props.innerCss&&e.iframe&&Qh(e.iframe,e.props.innerCss,t.innerCss)},this.componentWillUnmount=i,n(this.props.children),Qh(this.iframe,this.props.innerCss),this.props.onMounted&&this.props.onMounted(this.iframe),this.props.callback&&this.props.callback(this.iframe),Jh(this.iframe.contentDocument)},t.prototype.render=function(){var e=this,t=this.props,i=(t.children,t.innerCss,jt(t,["children","innerCss"]));return n("iframe",Dt({allowFullScreen:"1"},i,{ref:function(t){e.iframe=t}}))},t}(I);Xh.propTypes={innerCss:Ph([Oh.isRequired,Rh(Oh).isRequired]).isRequired,children:Rh(Dh).isRequired,onMounted:Nh,callback:Nh};var Zh=function(e){var t=e.split(/\/|\\/);return t[t.length-1]},$h=void 0,Kh=function(e){var t=Date.now().toString();return n(Xh,{id:t,src:"about:blank",style:e.style,frameborder:0,scrolling:"no",innerCss:"body{margin:0;padding:0}",onMounted:function(e){$h=e.ownerDocument}},n("form",{id:"form",method:"post",encType:"multipart/form-data",encoding:"multipart/form-data"},n("input",{ref:function(t){e.onMounted&&e.onMounted(t)},type:"file",name:"file",onChange:function(n){e.onChange&&e.onChange({formId:t,name:Zh(n.target.value)})},onBlur:e.onBlur,onFocus:e.onFocus})))};Kh.propTypes={onMounted:Nh,onChange:Nh,onBlur:Nh,onFocus:Nh};var em,tm,nm,im=function(e,t){R(n(Kh,t),e)},om=qo,rm=0,am=[],sm={},cm={},dm=null,lm=function(e,t,n){if(null==t.type)throw new Error("action.type is required");return t.type===om.uploadFileAction?new Promise(function(i,o){(t.file.formId?xe:bh)(e+"&file=1",t.file,t.action,n).then(function(e){var n=e.output;n[0].error&&o({input:t.action,error:n[0].error}),i({input:t.action,output:n[0]})}).catch(function(e){if(e instanceof Error)throw e;o({input:t.action,error:e.error})})}):new Promise(function(n,i){null==dm&&(dm=di());var o=dm();am.push(Object.assign({},t,{id:o})),sm[o]=n,cm[o]=i,clearTimeout(rm),rm=setTimeout(function(){mh(e,am.splice(0,am.length)).then(function(e){var t=e.input,n=e.output;t.forEach(function(e,t){n[t].error?cm[e.id]({input:e,error:n[t].error}):sm[e.id]({input:e,output:n[t]}),delete sm[e.id],delete cm[e.id]})}).catch(function(e){if(e instanceof Error)throw e;var t=e.input,n=e.error;t.forEach(function(e){cm[e.id]({input:e,error:n}),delete sm[e.id],delete cm[e.id]})})},0)})},um=0,pm=new Date,fm=function(){return 0===um||!(um>=3||M(pm,2e4))},hm=function(){um+=1},mm=function(){return um},bm=function(e,t){return hh([e,"&action=4","&mainDisconnected="+(t?"1":"0"),"&visitorId="+mi].join(""))},gm=function(e){return hh(e+"&action=1").then(function(e){return"0"===e.output?"standby":"main"}).catch(function(){return"main"})},wm=function(e){return setInterval(function(){return bm(e,mm()>0)},6e4)},vm=qo,ym=function(e){var t=e.getState,n=function(){return new Promise(function(e){var n=setInterval(function(){return lm(Kl(t()),Tr()).then(function(t){t.output.payload&&(clearInterval(n),e(t))})},2e3)})},i=function(e,t){return pn(e,{output:Sr(function(e){return e.type===vm.requestChat?pn(e,t):e},e.output)})},o=function(e){return n().then(function(t){var n=t.output;return i(e,n)})};return function(e){var t=kr(e.output,vm.requestChat);return t&&"systemProcessing"===t.payload.next?o(e):e}},xm=function(e){var t=e.dispatch,n=e.getState;return function(e){throw 1004===e.error.code&&lm(Kl(n()),Ar(eu(n()))).catch(function(e){var n=e.error.code;throw 1024!==n&&1032!==n||t(du()),e}),e}},_m=function(e){var t=e.getState,n=e.dispatch;return function(e){var i=e.error.code;if(-1!==[314,1004,1036].indexOf(i))n(rp(cu(t(),"errorVisitorNotExist"))),n(fu(!1));else if(1024===i||1032===i)n(du());else if(7601===i)e.error.message&&n(rp(e.error.message));else if(4342339===i)n(rp("Oops.We're getting problems to the chatbot. Please refresh this page to chat with a live agent.")),n(fu(!1));else if(1037===i)n(rp(e.error.message)),n(fu(!1));else if(i!==ph){var o=cu(t(),"promptServerException");o&&n(rp(o.replace("{errorCode}",i)))}throw e}},Cm=qo,km=!1,Sm=function(e){return 1004===e||1036===e},Am=function(e){var t=e.getState;return function(e){return Ls(t())?(km&&kr(e.output,Cm.getChatMessages)&&(km=!1),e):e}},Tm=function(e,t){ var n=e.dispatch,i=e.getState,o=function(e){return gm($l(i())).then(function(o){if(o!==Ds(i()))return n(lu(o)),!Ms(i())&&kd(i())?Promise.reject({input:e.input,error:{code:4342339}}):(!Ms(i())&&Sd(i())&&n(Np()),Cd(i())?(km=!0,null):kr(e.input,Cm.getConfig)?t(e.input):n(Gp()).then(function(){return kr(e.input,Cm.sendFile)?Promise.reject({input:e.input,error:{code:ph}}):t(e.input)}));if(314===e.error.code)return null;throw e})};return function(e){if(!Ls(i()))throw e;oc(i())===No&&(km=!1);var t=e.error;if(Sm(t.code)&&km)return null;if(314===e.error.code)return o(e);if(t.code===ph){if(Ms(i())&&kr(e.input,Cm.getConfig))return o(e);if(hm(),bm($l(i()),!0),!fm())return o(e)}throw e}},Im=function(e){return[Ar(eu(e)),Vo(ec(e),eu(e),document.referrer,sc(e),Fn(),Qn(),Yn,Aa())]},Rm=function(e){var t=ec(e),n=ac(e),i=!Os(e)&&!Oa(ac(e)).isEmbeddedPoppedOut,o=Wl(e);return _r([].concat(n?[]:Im(e),[o&&Ho(o,t),0!==t||o?null:Pr(),Fo(t,sc(e)),Ko(t),Yo(t),i?Ir():null,Xo(t),Qo(t)]))},Pm=function(e,t){var n=cc(e,Ac(e)?0:t),i=n.source;return Object.assign({},n,{isPrechatDone:"manualInvitation"===i.type||"button"!==i.type&&n.invitationtype===Do})},Mm=function(e){var t=[];return al(e)<3&&t.push(xr()),Vs(e)&&t.push(yr()),t},Om=qo,Em=function(e,t,n,i){var o=e.getState,r=e.dispatch;return function(e){var a=e.input;if(1004===e.error.code&&!kr(a,Om.newVisitor)&&(kr(a,Om.pageVisit)||kr(a,Om.requestChat)))return r(fu(!0)),t(_r(Im(o()).concat(a.actions)),n,i);throw e}},Nm=function(e){return mr($c(e),nd(e))},Wm=Yt(1)(function(e,t){var n,i;if(null==e)return[];for(var o=[],r=(n={},n.audioIncoming="visitorAudioChatRefuse",n.audioChatting="visitorAudioChatStop",n.audioRequesting="visitorAudioChatCancelRequest",n.videoIncoming="visitorVideoChatRefuse",n.videoChatting="visitorVideoChatStop",n.videoRequesting="visitorVideoChatCancelRequest",n),a=(i={},i.visitorText="visitorAddTextMessage",i.creditCardMasked="visitorCreditCardMasked",i.pendingAudioRequesting="visitorAudioChatRequest",i.pendingVideoRequesting="visitorVideoChatRequest",i.pendingSubmitSecureForm="visitorSubmitSecureForm",i.pendingCancelSecureForm="visitorCancelSecureForm",i.pendingGetSecureFormFailure="visitorGetSecureFormFailure",i),s=e.length-1;s>=0;s-=1){var c=e[s],d=void 0;if("pendingAccept"===c.type||"pendingHangup"===c.type){var l=c.content;"pendingAccept"===c.type&&(d="audioIncoming"===l?"visitorAudioChatAccept":"visitorVideoChatAccept"),"pendingHangup"===c.type&&(d=r[l])}else d=a[c.type];d&&o.push(pn(c,{id:t+s+1,type:d}))}return o.reverse()}),Bm=function(e){var t=nd(e),n=$c(e),i=Qc(e),o=Wm(i,t),r=[].concat(o);if(ed(e)){var a=td(e);r.push({type:"visitorTyping",time:new Date,content:a,sender:{type:"visitor"},id:i.length+t+1})}return[0===r.length?null:gr(n,r),mr(n,t)]},Dm=(em={},em["chatWindow/open"]=function(e,t){var n=_c(t),i=void 0;if(n){var o=Al(t,"prechat",e);if(!o.some(function(e){return""!==e.error})){var r=Wa(),a=r.popout;a&&a.ticketId&&!Number.isNaN(+a.ticketId)&&(i.ticketId=+a.ticketId),a&&a.departmentId&&!Number.isNaN(+a.departmentId)&&(i.department=+a.departmentId),i=fi(ki(o))}}return _r([ru(t)?Rr():null,Er(),i?tr(i,e):null,Object.assign(Pm(t,e),i?{isPrechatDone:!0}:{}),Ac(t)?Mr():null,Nl(t)?Nr():null].concat(Mm(t),[mr(null,-1)]))},em["invitaton/refuse"]=function(e,t){var n=ec(t),i=_l(t);return Zo(n,i.isManual,i.id)},em["web/prechatHeartbeat"]=function(e,t){return Ws(t)?null:nr()},em["web/offlineHeartbeat"]=function(e,t){return Ws(t)?null:ir()},em["web/chatHeartbeat"]=function(e,t){if(Ws(t))return null;if(!Tc(t))return null;var n=Rc(t);if(n===$r){var i=lc(t);if("autoInvitation"===i)return Or();if("manualInvitation"===i)return _r([rr($c(t)),Nm(t)])}var o=[];return n===Zr&&o.push(br($c(t))),_r(o.concat(Bm(t)))},em[_o]=function(e,t){if(e!==No)return null;if(Ws(t))return null;var n=Nc(t),i=Rc(t),o=Bc(t);if(n===Gr||n===Jr)return fr();if(n===Yr){if(i===$r){var r=cc(t,o).source,a=r.type,s=r.invitationId;return Of("livechat.invitation.refuse",s),Zo(o,"manualInvitation"===a,s)}if(i===Zr)return _r([hr($c(t)),Nm(t)])}return null},em["form/submit-social"]=function(e,t){return _r([ur(e),pn(cc(t,Bc(t)),{isPrechatDone:!0})])},em["web/submitSSOInfo"]=function(e,t){return _r([er(e,Bc(t)),cc(t,Bc(t))])},em[yo]=function(e,t){return _r([e.isManual?$o(e.id):null].concat(Mm(t)))},em["web/skipLogin"]=function(e,t){var n=cc(t,Bc(t));return pn(n,{skipSSO:!0})},em["web/startChatAgain"]=function(e,t){return pr(Ac(t)?0:Bc(t),{type:"button",page:sc(t)})},em["web/fromChatbotToAgent"]=function(e,t){var n=Td(t);return kd(t)&&!n?Object.assign({},cc(t,Bc(t)),{isFromChatbot:!0}):null},em["web/submitRating"]=function(e,t){var n=Kc(t);return dr(n,e)},em["web/emailTranscript"]=function(e){return lr(e)},em["web/sendAction"]=function(e){return e},em["web/endChat"]=function(e,t){return _r([hr($c(t)),Nm(t)])},em["web/chatBotAnswerHelpful"]=function(e,t){return kd(t)?wr(e.ifHelpful,e.actionGuid):null},em["web/chatBotSelectQuestion"]=function(e,t){return kd(t)?vr(e):null},em["chatWindow/showTab"]=function(e){return e===Jr?or():null},em["web/updateCustomVariables"]=function(e,t){var n=Ac(t)?0:ec(t);return _r([Ho(e,n),Ac(t)?Mr():null,Yo(n),Qo(n)])},em["window/closeMinimizeBubble"]=function(e,t){return iu(t)?(Of("livechat.invitation.refuse"),Zo(Bc(t),!0)):null},em["web/getChatButton"]=function(e){return _r([Ko(e),Yo(e)])},em["web/sendPageVisit"]=function(e,t){return Rm(t)},em["web/getConfig"]=function(){return Uo()},em["web/getChatWindowConfig"]=function(){return Er()},em),zm=(tm={},tm["window/sendText"]=function(e,t){if(Rc(t)===$r){iu(t)?Of("livechat.invitation.accept"):Of("livechat.invitation.accept",uc(t));var n=cc(t,Bc(t));return _r([pn(n,{isPrechatDone:!0})].concat(Bm(t)))}return _r(Bm(t))},tm),jm=function(e){return function(t){if(t instanceof Error)throw t;return e(t)}},qm=function(e){var t=e.getState;return null==t()?function(e){return function(t){return e(t)}}:function(n){Ls(t())&&wm($l(t()));var i=function n(i,o){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return Promise.resolve(e)};return lm(Kl(t()),i,o).then(Am(e)).then(ym(e)).then(r).then(function(t){return we(e,t,n),t}).catch(jm(Tm(e,n))).catch(jm(Em(e,n,o,r))).catch(jm(_m(e))).catch(jm(xm(e)))},o=function(e,t,o){return i(t,null,o).catch(function(t){throw n(Lf(e)),n(rp(t.error.message)),t})};return function(e){var r=Dm[e.type];if(r){var a=r(e.payload,t());if(a){var s=i(a);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===_o&&e.payload===No&&Os(t()))return s}return n(e)}if("web/pageHeartbeat"===e.type)return Ws(t())?null:(i(Xo(ec(t()))),rc(t()).forEach(function(e){return i(Go(+e))}),null);if("window/sendFile"===e.type){var c=e.payload;if(!c)return null;if(pd(t()))return null;var d=Qs(t()),l=Id(t()),u=Js(t());return l>=u?(n(up("maxFileCount",{fileCount:u})),Promise.resolve()):c.size>d*Math.pow(2,20)?(n(up("maxFileSize",{fileSize:d})),Promise.resolve()):0===c.size?(n(up("emptyFile")),Promise.resolve()):(n(e),i(sr(c),function(e,t){return n(Lu(c.name,e,t))}).then(function(){return n(Vu())}).catch(jm(function(e){var t=e.error;return n(Fu(t))})).catch(function(e){return n(Fu({message:e.message}))}))}if("web/submitPrechat"===e.type){var p=e.payload,f=p.form,h=p.onSuccess,m=cc(t(),Bc(t())),b=pn(m,{ticketId:f.ticketId||m.ticketId,departmentId:null==f.department?m.departmentId:void 0,isPrechatDone:!0,skipSSO:!0});o("prechat",_r([tr(f,Bc(t())),b]),h)}else if("web/submitOfflineMessage"===e.type){var g=Bc(t()),w=e.payload,v=w.form,y=w.onSuccess,x=Kc(t()),_=pn(dc(t()),x&&{chatId:x});o("offline",ar(g,v,_),y)}else if("web/submitPostChat"===e.type){var C=Kc(t()),k=e.payload,S=k.form,A=k.onSuccess;o("postchat",cr(C,S,Bc(t())),A).then(function(){return n(Uu(Yr))})}var T=n(e),I=zm[e.type];if(I){var R=I(e.payload,t());R&&i(R)}return T}}},Lm=function(e){var t=e.isNewWindow,n=e.url,i=ci(n);t?window.open(i):window.location.href=i},Vm=function(e){var t=e.dispatch,n=e.getState;return function(e){return function(i){var o=n();if("chatWindow/open"===i.type&&!pc(o,i.payload)){var r=ul(o,i.payload);if(r)return Lm(r),null}if("chatWindow/showTab"===i.type&&i.payload===Jr){var a=Bc(o),s=ul(o,a);if(s)return Lm(s),t(Rp()),t(Bp()),null}return e(i)}}},Fm=(nm={},nm.loading="titleChatWindow",nm[Hr]="titlePreChatWindow",nm[Gr]="titlePreChatWindow",nm[Jr]="titleOfflineMessageWindow",nm[Yr]="titleChatWindow",nm[Qr]="titleChatWindow",nm.ssoLogin="titlePreChatWindow",nm),Um=function(e){null!=e&&(document.title=e)},Hm=function(){try{var e=document.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}},Gm=function(e,t){var n=hl(e,t);return n?Hm()||n:{width:380,height:600}},Ym=function(e,t){var n=ic(e),i=tc(e),o=sc(e),r=o.title,a=o.url,s=tu(e),c=nu(e),d=ac(e),l=uc(e),u=lc(e)||"button",p=zs(e,["chatWindow.aspx","?siteId="+n,i?"&chatGroup="+i:null,"&planId="+t,"#","&chatSource="+u,l?"&invitationId="+l:null,s?"&visitorId="+s:null,c?"&standbyVisitorId="+c:null,d?"&visitorGuid="+d:null,Ms(e)?null:"&isStandbyServer=1",r?"&title="+encodeURIComponent(r):null,a?"&url="+encodeURIComponent(a):null].join("")),f=Gm(e,t),h=f.width,m=f.height;return{win:window.open(p,"Comm100ChatWindow"+n,"width="+h+",height="+m+",left=200,top=100,status=no,toolbar=no,menubar=no,resizable=yes,location=no,titlebar=no"),url:p}},Qm=!1,Jm=function(){window.opener&&(window.opener=null),Qm=!0,window.close()},Xm=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 r=o.win,a=o.url;if(!n){n=_e(r,a);var s=n.subscribe(i(function(i){"popin"===i.type&&(s(),n=null,window.focus(),e(yu(i.payload)),e(Cu()),Ea({isEmbeddedPoppedOut:!1},ac(t())))}))}},r=function(e){n&&n.dispatch({type:"popin",payload:e})};return window.addEventListener("beforeunload",function(){var e=t();Os(e)&&pl(e,ec(e))&&!Qm&&r(ec(e))}),function(a){var s=t();if(!s)return e(a);if("app/ready"===a.type&&null==n&&au(s)){var c=sc(s).url||document.referrer;n=_e(window.opener,c);var d=n.subscribe(i(function(t){"removeOpener"===t.type&&(d(),window.opener=null,e(pu()))}))}if("chatWindow/showTab"===a.type&&Os(s)&&Um(cu(s,Fm[a.payload])),"window/mounted"===a.type&&Os(s)){var l=Nc(s);Um(cu(s,Fm[l]))}if("chatWindow/open"===a.type){var u=a.payload,p=Oa(ac(s))||{},f=p.isEmbeddedPoppedOut,h=pl(s,u);if(!Os(s)&&(f||!h)){var m=Ym(s,u);return f&&o(m),null}}if("chatWindow/popOut"===a.type){var b=Bc(s);!Os(s)&&pl(s,b)&&(o(Ym(s,b)),Ea({isEmbeddedPoppedOut:!0},ac(s)),n&&window.addEventListener("beforeunload",function(){n.dispatch({type:"removeOpener"})}))}if("chatWindow/popIn"===a.type&&Os(s))return r(Bc(s)),Jm(),null;if(("window/closeSliently"===a.type||a.type===_o&&a.payload===No)&&Os(s)){var g=e(a);return g&&g.catch?(Promise.race([g.catch(function(){}),bn(3e3)]).then(Jm),null):(Jm(),null)}return e(a)}}},Zm=!0,$m=!0,Km={disableLog:function(e){return"boolean"!=typeof e?new Error("Argument type: "+(void 0===e?"undefined":Wt(e))+". Please use a boolean."):(Zm=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":Wt(e))+". Please use a boolean."):($m=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))},log:function(){"undefined"==typeof window||Wt(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},shimCreateObjectURL:function(e){var t=e&&e.URL;if("object"===(void 0===e?"undefined":Wt(e))&&e.HTMLMediaElement&&"srcObject"in e.HTMLMediaElement.prototype){var n=t.createObjectURL.bind(t),i=t.revokeObjectURL.bind(t),o=new Map,r=0;t.createObjectURL=function(e){if("getTracks"in e){var t="polyblob:"+ ++r;return o.set(t,e),Km.deprecated("URL.createObjectURL(stream)","elem.srcObject = stream"),t}return n(e)},t.revokeObjectURL=function(e){i(e),o.delete(e)};var a=Object.getOwnPropertyDescriptor(e.HTMLMediaElement.prototype,"src");Object.defineProperty(e.HTMLMediaElement.prototype,"src",{get:function(){return a.get.apply(this)},set:function(e){return this.srcObject=o.get(e)||null,a.set.apply(this,[e])}});var s=e.HTMLMediaElement.prototype.setAttribute;e.HTMLMediaElement.prototype.setAttribute=function(){return 2===arguments.length&&"src"===(""+arguments[0]).toLowerCase()&&(this.srcObject=o.get(arguments[1])||null),s.apply(this,arguments)}}}},eb={log:Km.log,deprecated:Km.deprecated,disableLog:Km.disableLog,disableWarnings:Km.disableWarnings,extractVersion:Km.extractVersion,shimCreateObjectURL:Km.shimCreateObjectURL,detectBrowser:Km.detectBrowser.bind(Km)},tb=eb.log,nb=function(e){var t=eb.detectBrowser(e),n=e&&e.navigator,i=function(e){if("object"!==(void 0===e?"undefined":Wt(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"===Wt(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 r={};"number"==typeof i.ideal?(r[o("min",n)]=i.ideal,t.optional.push(r),r={},r[o("max",n)]=i.ideal,t.optional.push(r)):(r[o("",n)]=i.ideal,t.optional.push(r))}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((e=JSON.parse(JSON.stringify(e)))&&"object"===Wt(e.audio)){var r=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};e=JSON.parse(JSON.stringify(e)),r(e.audio,"autoGainControl","googAutoGainControl"),r(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=i(e.audio)}if(e&&"object"===Wt(e.video)){var a=e.video.facingMode;a=a&&("object"===(void 0===a?"undefined":Wt(a))?a:{ideal:a});var s=t.version<61;if(a&&("user"===a.exact||"environment"===a.exact||"user"===a.ideal||"environment"===a.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||s)){delete e.video.facingMode;var c;if("environment"===a.exact||"environment"===a.ideal?c=["back","rear"]:"user"!==a.exact&&"user"!==a.ideal||(c=["front"]),c)return n.mediaDevices.enumerateDevices().then(function(t){t=t.filter(function(e){return"videoinput"===e.kind});var n=t.find(function(e){return c.some(function(t){return-1!==e.label.toLowerCase().indexOf(t)})});return!n&&t.length&&-1!==c.indexOf("back")&&(n=t[t.length-1]),n&&(e.video.deviceId=a.exact?{exact:n.deviceId}:{ideal:n.deviceId}),e.video=i(e.video),tb("chrome: "+JSON.stringify(e)),o(e)})}e.video=i(e.video)}return tb("chrome: "+JSON.stringify(e)),o(e)},r=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}}},a=function(e,t,i){o(e,function(e){n.webkitGetUserMedia(e,t,function(e){i(r(e))})})};n.getUserMedia=a;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 c=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(e){return o(e,function(e){return c(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(r(e))})})}}else n.mediaDevices.getUserMedia=function(e){return s(e)};void 0===n.mediaDevices.addEventListener&&(n.mediaDevices.addEventListener=function(){tb("Dummy mediaDevices.addEventListener called.")}),void 0===n.mediaDevices.removeEventListener&&(n.mediaDevices.removeEventListener=function(){tb("Dummy mediaDevices.removeEventListener called.")})},ib=eb.log,ob={shimMediaStream:function(e){e.MediaStream=e.MediaStream||e.webkitMediaStream},shimOnTrack:function(e){if("object"===(void 0===e?"undefined":Wt(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 r=new Event("track");r.track=i.track,r.receiver=o,r.streams=[t.stream],n.dispatchEvent(r)}),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 r=new Event("track");r.track=i,r.receiver=o,r.streams=[t.stream],n.dispatchEvent(r)})},n.addEventListener("addstream",n._ontrackpoly)),t.apply(n,arguments)}}},shimGetSendersWithDtmf:function(e){if("object"===(void 0===e?"undefined":Wt(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,r=n.apply(o,arguments);return r||(r=t(o,e),o._senders.push(r)),r};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 r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;t._senders=t._senders||[],r.apply(t,[t._streams[e.id]||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":Wt(e))&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){var a=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){var e=this,t=a.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":Wt(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){if(!e.RTCPeerConnection.prototype.addTrack){var t=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this,n=t.apply(this);return e._reverseStreams=e._reverseStreams||{},n.map(function(t){return e._reverseStreams[t.id]})};var n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){var i=this;if(i._streams=i._streams||{},i._reverseStreams=i._reverseStreams||{},t.getTracks().forEach(function(e){if(i.getSenders().find(function(t){return t.track===e}))throw new DOMException("Track already exists.","InvalidAccessError")}),!i._reverseStreams[t.id]){var o=new e.MediaStream(t.getTracks());i._streams[t.id]=o,i._reverseStreams[o.id]=t,t=o}n.apply(i,[t])};var i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;t._streams=t._streams||{},t._reverseStreams=t._reverseStreams||{},i.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 r=i._streams[n.id];if(r)r.addTrack(t),i.dispatchEvent(new Event("negotiationneeded"));else{var a=new e.MediaStream([t]);i._streams[n.id]=a,i._reverseStreams[a.id]=n,i.addStream(a)}return i.getSenders().find(function(e){return e.track===t})},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(n):n.removeTrack(e.track),t.dispatchEvent(new Event("negotiationneeded")))}}},shimPeerConnection:function(e){var t=eb.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 a=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 c=function(e){r[1](s(a(e)))};return i.apply(this,[c,arguments[0]])}return new Promise(function(e,t){i.apply(o,[function(t){e(s(a(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"===Wt(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())}}},rb={shimMediaStream:ob.shimMediaStream,shimOnTrack:ob.shimOnTrack,shimAddTrackRemoveTrack:ob.shimAddTrackRemoveTrack,shimGetSendersWithDtmf:ob.shimGetSendersWithDtmf,shimSourceObject:ob.shimSourceObject,shimPeerConnection:ob.shimPeerConnection,shimGetUserMedia:nb},ab={};ab.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)},ab.localCName=ab.generateIdentifier(),ab.splitLines=function(e){return e.trim().split("\n").map(function(e){return e.trim()})},ab.splitSections=function(e){return e.split("\nm=").map(function(e,t){return(t>0?"m="+e:e).trim()+"\r\n"})},ab.matchPrefix=function(e,t){return ab.splitLines(e).filter(function(e){return 0===e.indexOf(t)})},ab.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]}},ab.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},ab.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},ab.getMid=function(e){var t=ab.matchPrefix(e,"a=mid:")[0];if(t)return t.substr(6)},ab.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1]}},ab.getDtlsParameters=function(e,t){return{role:"auto",fingerprints:ab.matchPrefix(e+t,"a=fingerprint:").map(ab.parseFingerprint)}},ab.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},ab.getIceParameters=function(e,t){var n=ab.splitLines(e);return n=n.concat(ab.splitLines(t)),{usernameFragment:n.filter(function(e){return 0===e.indexOf("a=ice-ufrag:")})[0].substr(12),password:n.filter(function(e){return 0===e.indexOf("a=ice-pwd:")})[0].substr(10)}},ab.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},ab.parseRtpParameters=function(e){for(var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=ab.splitLines(e),i=n[0].split(" "),o=3;o0?"9":"0",n+=" UDP/TLS/RTP/SAVPF ",n+=t.codecs.map(function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType}).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",t.codecs.forEach(function(e){n+=ab.writeRtpMap(e),n+=ab.writeFmtp(e),n+=ab.writeRtcpFb(e)});var i=0;return t.codecs.forEach(function(e){e.maxptime>i&&(i=e.maxptime)}),i>0&&(n+="a=maxptime:"+i+"\r\n"),n+="a=rtcp-mux\r\n",t.headerExtensions.forEach(function(e){n+=ab.writeExtmap(e)}),n},ab.parseRtpEncodingParameters=function(e){var t,n=[],i=ab.parseRtpParameters(e),o=-1!==i.fecMechanisms.indexOf("RED"),r=-1!==i.fecMechanisms.indexOf("ULPFEC"),a=ab.matchPrefix(e,"a=ssrc:").map(function(e){return ab.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute}),s=a.length>0&&a[0].ssrc,c=ab.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]===s&&(t=c[0][1]),i.codecs.forEach(function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var i={ssrc:s,codecPayloadType:parseInt(e.parameters.apt,10),rtx:{ssrc:t}};n.push(i),o&&(i=JSON.parse(JSON.stringify(i)),i.fec={ssrc:t,mechanism:r?"red+ulpfec":"red"},n.push(i))}}),0===n.length&&s&&n.push({ssrc:s});var d=ab.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substr(7),10):0===d[0].indexOf("b=AS:")?950*parseInt(d[0].substr(5),10)-16e3:void 0,n.forEach(function(e){e.maxBitrate=d})),n},ab.parseRtcpParameters=function(e){var t={},n=ab.matchPrefix(e,"a=ssrc:").map(function(e){return ab.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];n&&(t.cname=n.value,t.ssrc=n.ssrc);var i=ab.matchPrefix(e,"a=rtcp-rsize");t.reducedSize=i.length>0,t.compound=0===i.length;var o=ab.matchPrefix(e,"a=rtcp-mux");return t.mux=o.length>0,t},ab.parseMsid=function(e){var t,n=ab.matchPrefix(e,"a=msid:");if(1===n.length)return t=n[0].substr(7).split(" "),{stream:t[0],track:t[1]};var i=ab.matchPrefix(e,"a=ssrc:").map(function(e){return ab.parseSsrcMedia(e)}).filter(function(e){return"msid"===e.attribute});return i.length>0?(t=i[0].value.split(" "),{stream:t[0],track:t[1]}):void 0},ab.generateSessionId=function(){return Math.random().toString().substr(2,21)},ab.writeSessionBoilerplate=function(e,t){var n=void 0!==t?t:2;return"v=0\r\no=thisisadapterortc "+(e||ab.generateSessionId())+" "+n+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},ab.writeMediaSection=function(e,t,n,i){var o=ab.writeRtpDescription(e.kind,t);if(o+=ab.writeIceParameters(e.iceGatherer.getLocalParameters()),o+=ab.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":"active"),o+="a=mid:"+e.mid+"\r\n",e.direction?o+="a="+e.direction+"\r\n":e.rtpSender&&e.rtpReceiver?o+="a=sendrecv\r\n":e.rtpSender?o+="a=sendonly\r\n":e.rtpReceiver?o+="a=recvonly\r\n":o+="a=inactive\r\n",e.rtpSender){var r="msid:"+i.id+" "+e.rtpSender.track.id+"\r\n";o+="a="+r,o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+r,e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+r,o+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+ab.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+ab.localCName+"\r\n"),o},ab.getDirection=function(e,t){for(var n=ab.splitLines(e),i=0;i0,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,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)this.localStreams.push(e),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)}),this.localStreams.push(i)}this._maybeFireNegotiationNeeded()},n.prototype.removeStream=function(e){var t=this.localStreams.indexOf(e);t>-1&&(this.localStreams.splice(t,1),this._maybeFireNegotiationNeeded())},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,o=new e.RTCIceGatherer(i.iceOptions);return o.onlocalcandidate=function(e){var r=new Event("icecandidate");r.candidate={sdpMid:t,sdpMLineIndex:n};var a=e.candidate,s=!a||0===Object.keys(a).length;s?void 0===o.state&&(o.state="completed"):(a.component=1,r.candidate.candidate=cb.writeCandidate(a));var c=cb.splitSections(i.localDescription.sdp);c[r.candidate.sdpMLineIndex+1]+=s?"a=end-of-candidates\r\n":"a="+r.candidate.candidate+"\r\n",i.localDescription.sdp=c.join("");var d=i._pendingOffer?i._pendingOffer:i.transceivers,l=d.every(function(e){return e.iceGatherer&&"completed"===e.iceGatherer.state});switch(i.iceGatheringState){case"new":s||i._localIceCandidatesBuffer.push(r),s&&l&&i._localIceCandidatesBuffer.push(new Event("icecandidate"));break;case"gathering":i._emitBufferedCandidates(),s||(i.dispatchEvent(r),null!==i.onicecandidate&&i.onicecandidate(r)),l&&(i.dispatchEvent(new Event("icecandidate")),null!==i.onicecandidate&&i.onicecandidate(new Event("icecandidate")),i.iceGatheringState="complete",i._emitGatheringStateChange())}},o},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=Se(e.localCapabilities,e.remoteCapabilities);n&&e.rtpSender&&(o.encodings=e.sendEncodingParameters,o.rtcp={cname:cb.localCName,compound:e.rtcpParameters.compound},e.recvEncodingParameters.length&&(o.rtcp.ssrc=e.recvEncodingParameters[0].ssrc),e.rtpSender.send(o)),i&&e.rtpReceiver&&("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(t){var n=this;if(!Ae("setLocalDescription",t.type,this.signalingState)){var i=new Error("Can not set local "+t.type+" in state "+this.signalingState);return i.name="InvalidStateError",arguments.length>2&&"function"==typeof arguments[2]&&e.setTimeout(arguments[2],0,i),Promise.reject(i)}var o,r;if("offer"===t.type)this._pendingOffer&&(o=cb.splitSections(t.sdp),r=o.shift(),o.forEach(function(e,t){var i=cb.parseRtpParameters(e);n._pendingOffer[t].localCapabilities=i}),this.transceivers=this._pendingOffer,delete this._pendingOffer);else if("answer"===t.type){o=cb.splitSections(n.remoteDescription.sdp),r=o.shift();var a=cb.matchPrefix(r,"a=ice-lite").length>0;o.forEach(function(e,t){var i=n.transceivers[t],o=i.iceGatherer,s=i.iceTransport,c=i.dtlsTransport,d=i.localCapabilities,l=i.remoteCapabilities;if(!cb.isRejected(e)&&!i.isDatachannel){var u=cb.getIceParameters(e,r),p=cb.getDtlsParameters(e,r);a&&(p.role="server"),n.usingBundle&&0!==t||(s.start(o,u,a?"controlling":"controlled"),c.start(p));var f=Se(d,l);n._transceive(i,f.codecs.length>0,!1)}})}switch(this.localDescription={type:t.type,sdp:t.sdp},t.type){case"offer":this._updateSignalingState("have-local-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+t.type+'"')}var s=arguments.length>1&&"function"==typeof arguments[1];if(s){var c=arguments[1];e.setTimeout(function(){c(),"new"===n.iceGatheringState&&(n.iceGatheringState="gathering",n._emitGatheringStateChange()),n._emitBufferedCandidates()},0)}var d=Promise.resolve();return d.then(function(){s||("new"===n.iceGatheringState&&(n.iceGatheringState="gathering",n._emitGatheringStateChange()),e.setTimeout(n._emitBufferedCandidates.bind(n),500))}),d},n.prototype.setRemoteDescription=function(n){var i=this;if(!Ae("setRemoteDescription",n.type,this.signalingState)){var o=new Error("Can not set remote "+n.type+" in state "+this.signalingState);return o.name="InvalidStateError",arguments.length>2&&"function"==typeof arguments[2]&&e.setTimeout(arguments[2],0,o),Promise.reject(o)}var r={},a=[],s=cb.splitSections(n.sdp),c=s.shift(),d=cb.matchPrefix(c,"a=ice-lite").length>0,l=cb.matchPrefix(c,"a=group:BUNDLE ").length>0;this.usingBundle=l;var u=cb.matchPrefix(c,"a=ice-options:")[0];switch(this.canTrickleIceCandidates=!!u&&u.substr(14).split(" ").indexOf("trickle")>=0,s.forEach(function(o,s){var u=cb.splitLines(o),p=cb.getKind(o),f=cb.isRejected(o),h=u[0].substr(2).split(" ")[2],m=cb.getDirection(o,c),b=cb.parseMsid(o),g=cb.getMid(o)||cb.generateIdentifier();if("application"===p&&"DTLS/SCTP"===h)return void(i.transceivers[s]={mid:g,isDatachannel:!0});var w,v,y,x,_,C,k,S,A,T,I,R=cb.parseRtpParameters(o);f||(T=cb.getIceParameters(o,c),I=cb.getDtlsParameters(o,c),I.role="client"),k=cb.parseRtpEncodingParameters(o);var P=cb.parseRtcpParameters(o),M=cb.matchPrefix(o,"a=end-of-candidates",c).length>0,O=cb.matchPrefix(o,"a=candidate:").map(function(e){return cb.parseCandidate(e)}).filter(function(e){return"1"===e.component||1===e.component});("offer"===n.type||"answer"===n.type)&&!f&&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||f?"answer"!==n.type||f||(w=i.transceivers[s],v=w.iceGatherer,y=w.iceTransport,x=w.dtlsTransport,_=w.rtpReceiver,C=w.sendEncodingParameters,S=w.localCapabilities,i.transceivers[s].recvEncodingParameters=k,i.transceivers[s].remoteCapabilities=R,i.transceivers[s].rtcpParameters=P,l&&0!==s||((d||M)&&O.length&&y.setRemoteCandidates(O),y.start(v,T,"controlling"),x.start(I)),i._transceive(w,"sendrecv"===m||"recvonly"===m,"sendrecv"===m||"sendonly"===m),!_||"sendrecv"!==m&&"sendonly"!==m?delete w.rtpReceiver:(A=_.track,b?(r[b.stream]||(r[b.stream]=new e.MediaStream),r[b.stream].addTrack(A),a.push([A,_,r[b.stream]])):(r.default||(r.default=new e.MediaStream),r.default.addTrack(A),a.push([A,_,r.default])))):(w=i.transceivers[s]||i._createTransceiver(p),w.mid=g,w.iceGatherer||(w.iceGatherer=l&&s>0?i.transceivers[0].iceGatherer:i._createIceGatherer(g,s)),!M||!O.length||l&&0!==s||w.iceTransport.setRemoteCandidates(O),S=e.RTCRtpReceiver.getCapabilities(p),t<15019&&(S.codecs=S.codecs.filter(function(e){return"rtx"!==e.name})),C=[{ssrc:1001*(2*s+2)}],"sendrecv"!==m&&"sendonly"!==m||(_=new e.RTCRtpReceiver(w.dtlsTransport,p),A=_.track,b?(r[b.stream]||(r[b.stream]=new e.MediaStream,Object.defineProperty(r[b.stream],"id",{get:function(){return b.stream}})),Object.defineProperty(A,"id",{get:function(){return b.track}}),r[b.stream].addTrack(A),a.push([A,_,r[b.stream]])):(r.default||(r.default=new e.MediaStream),r.default.addTrack(A),a.push([A,_,r.default]))),w.localCapabilities=S,w.remoteCapabilities=R,w.rtpReceiver=_,w.rtcpParameters=P,w.sendEncodingParameters=C,w.recvEncodingParameters=k,i._transceive(i.transceivers[s],!1,"sendrecv"===m||"sendonly"===m))}),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(r).forEach(function(t){var n=r[t];if(n.getTracks().length){i.remoteStreams.push(n);var o=new Event("addstream");o.stream=n,i.dispatchEvent(o),null!==i.onaddstream&&e.setTimeout(function(){i.onaddstream(o)},0),a.forEach(function(t){var o=t[0],r=t[1];if(n.id===t[2].id){var a=new Event("track");a.track=o,a.receiver=r,a.streams=[n],i.dispatchEvent(a),null!==i.ontrack&&e.setTimeout(function(){i.ontrack(a)},0)}})}}),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),arguments.length>1&&"function"==typeof arguments[1]&&e.setTimeout(arguments[1],0),Promise.resolve()},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),null!==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),null!==t.onnegotiationneeded&&t.onnegotiationneeded(e)}},0))},n.prototype._updateConnectionState=function(){var e,t=this,n={new:0,closed:0,connecting:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(e){n[e.iceTransport.state]++,n[e.dtlsTransport.state]++}),n.connected+=n.completed,e="new",n.failed>0?e="failed":n.connecting>0||n.checking>0?e="connecting":n.disconnected>0?e="disconnected":n.new>0?e="new":(n.connected>0||n.completed>0)&&(e="connected"),e!==t.iceConnectionState){t.iceConnectionState=e;var i=new Event("iceconnectionstatechange");this.dispatchEvent(i),null!==this.oniceconnectionstatechange&&this.oniceconnectionstatechange(i)}},n.prototype.createOffer=function(){var n=this;if(this._pendingOffer)throw new Error("createOffer called while there is a pending offer.");var i;1===arguments.length&&"function"!=typeof arguments[0]?i=arguments[0]:3===arguments.length&&(i=arguments[2]);var o=this.transceivers.filter(function(e){return"audio"===e.kind}).length,r=this.transceivers.filter(function(e){return"video"===e.kind}).length;if(i){if(i.mandatory||i.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==i.offerToReceiveAudio&&(o=!0===i.offerToReceiveAudio?1:!1===i.offerToReceiveAudio?0:i.offerToReceiveAudio),void 0!==i.offerToReceiveVideo&&(r=!0===i.offerToReceiveVideo?1:!1===i.offerToReceiveVideo?0:i.offerToReceiveVideo)}for(this.transceivers.forEach(function(e){"audio"===e.kind?--o<0&&(e.wantReceive=!1):"video"===e.kind&&--r<0&&(e.wantReceive=!1)});o>0||r>0;)o>0&&(this._createTransceiver("audio"),o--),r>0&&(this._createTransceiver("video"),r--);var a=Ce(this.transceivers),s=cb.writeSessionBoilerplate(this._sdpSessionId);a.forEach(function(i,o){var r=i.track,s=i.kind,c=cb.generateIdentifier();i.mid=c,i.iceGatherer||(i.iceGatherer=n.usingBundle&&o>0?a[0].iceGatherer:n._createIceGatherer(c,o));var d=e.RTCRtpSender.getCapabilities(s);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 l=[{ssrc:1001*(2*o+1)}];r&&t>=15019&&"video"===s&&(l[0].rtx={ssrc:1001*(2*o+1)+1}),i.wantReceive&&(i.rtpReceiver=new e.RTCRtpReceiver(i.dtlsTransport,s)),i.localCapabilities=d,i.sendEncodingParameters=l}),"max-compat"!==this._config.bundlePolicy&&(s+="a=group:BUNDLE "+a.map(function(e){return e.mid}).join(" ")+"\r\n"),s+="a=ice-options:trickle\r\n",a.forEach(function(e,t){s+=cb.writeMediaSection(e,e.localCapabilities,"offer",e.stream),s+="a=rtcp-rsize\r\n"}),this._pendingOffer=a;var c=new e.RTCSessionDescription({type:"offer",sdp:s});return arguments.length&&"function"==typeof arguments[0]&&e.setTimeout(arguments[0],0,c),Promise.resolve(c)},n.prototype.createAnswer=function(){var n=cb.writeSessionBoilerplate(this._sdpSessionId);this.usingBundle&&(n+="a=group:BUNDLE "+this.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n"),this.transceivers.forEach(function(e,i){if(e.isDatachannel)return void(n+="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 o;"audio"===e.kind?o=e.stream.getAudioTracks()[0]:"video"===e.kind&&(o=e.stream.getVideoTracks()[0]),o&&t>=15019&&"video"===e.kind&&(e.sendEncodingParameters[0].rtx={ssrc:1001*(2*i+2)+1})}var r=Se(e.localCapabilities,e.remoteCapabilities);!r.codecs.filter(function(e){return"rtx"===e.name.toLowerCase()}).length&&e.sendEncodingParameters[0].rtx&&delete e.sendEncodingParameters[0].rtx,n+=cb.writeMediaSection(e,r,"answer",e.stream),e.rtcpParameters&&e.rtcpParameters.reducedSize&&(n+="a=rtcp-rsize\r\n")});var i=new e.RTCSessionDescription({type:"answer",sdp:n});return arguments.length&&"function"==typeof arguments[0]&&e.setTimeout(arguments[0],0,i),Promise.resolve(i)},n.prototype.addIceCandidate=function(t){if(t){var n=t.sdpMLineIndex;if(t.sdpMid)for(var i=0;i0?cb.parseCandidate(t.candidate):{};if("tcp"===r.protocol&&(0===r.port||9===r.port))return Promise.resolve();if(r.component&&"1"!==r.component&&1!==r.component)return Promise.resolve();o.iceTransport.addRemoteCandidate(r);var a=cb.splitSections(this.remoteDescription.sdp);a[n+1]+=(r.type?t.candidate.trim():"a=end-of-candidates")+"\r\n",this.remoteDescription.sdp=a.join("")}}else for(var s=0;s1&&"function"==typeof arguments[1]&&e.setTimeout(arguments[1],0),Promise.resolve()},n.prototype.getStats=function(){var t=[];this.transceivers.forEach(function(e){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(n){e[n]&&t.push(e[n].getStats())})});var n=arguments.length>1&&"function"==typeof arguments[1]&&arguments[1],i=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(o){var r=new Map;Promise.all(t).then(function(t){t.forEach(function(e){Object.keys(e).forEach(function(t){e[t].type=i(e[t]),r.set(t,e[t])})}),n&&e.setTimeout(n,0,r),o(r)})})},n},lb=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))})}},ub={shimGetUserMedia:lb,shimPeerConnection:function(e){var t=eb.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=db(e,t.version)},shimReplaceTrack:function(e){!e.RTCRtpSender||"replaceTrack"in e.RTCRtpSender.prototype||(e.RTCRtpSender.prototype.replaceTrack=e.RTCRtpSender.prototype.setTrack)}},pb=eb.log,fb=function(e){var t=eb.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}}},r=function(e,i,r){var a=function(e){if("object"!==(void 0===e?"undefined":Wt(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"===Wt(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&&(pb("spec: "+JSON.stringify(e)),e.audio&&(e.audio=a(e.audio)),e.video&&(e.video=a(e.video)),pb("ff37: "+JSON.stringify(e))),n.mozGetUserMedia(e,i,function(e){r(o(e))})},a=function(e){return new Promise(function(t,n){r(e,t,n)})};if(n.mediaDevices||(n.mediaDevices={getUserMedia:a,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 c=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(e){return c(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 d=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":Wt(e))&&"object"===Wt(e.audio)&&(e=JSON.parse(JSON.stringify(e)),d(e.audio,"autoGainControl","mozAutoGainControl"),d(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 d(e,"mozAutoGainControl","autoGainControl"),d(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":Wt(e))&&(e=JSON.parse(JSON.stringify(e)),d(e,"autoGainControl","mozAutoGainControl"),d(e,"noiseSuppression","mozNoiseSuppression")),p.apply(this,[e])}}}n.getUserMedia=function(e,i,o){if(t.version<44)return r(e,i,o);eb.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(i,o)}},hb={shimOnTrack:function(e){"object"!==(void 0===e?"undefined":Wt(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.streams=[e.stream],this.dispatchEvent(n)}.bind(this))}.bind(this))}})},shimSourceObject:function(e){"object"===(void 0===e?"undefined":Wt(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=eb.detectBrowser(e);if("object"===(void 0===e?"undefined":Wt(e))&&(e.RTCPeerConnection||e.mozRTCPeerConnection)){e.RTCPeerConnection||(e.RTCPeerConnection=function(n,i){if(t.version<38&&n&&n.iceServers){for(var o=[],r=0;r=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":Wt(e))&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype,n=t.createOffer,i=t.createAnswer,o=t.setLocalDescription,r=t.setRemoteDescription,a=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=r.apply(this,[e]);return n?(i.then(t,n),Promise.resolve()):i},t.setRemoteDescription=s,s=function(e,t,n){var i=a.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;o0},Sb=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(i){var o=t();if("footer/chatToolAudio"===i.type)return wb||(wb=new Me({chat:$c(o)})),wb.requirePermission(!1).then(function(){var t=vb("pendingAudioRequesting","");n(Xp([t])),e(i)}).catch(function(){}),null;if("footer/chatToolVideo"===i.type)return wb||(wb=new Me({chat:$c(o)})),wb.requirePermission(!0).then(function(){var t=vb("pendingVideoRequesting","");n(Xp([t])),e(i)}).catch(function(){}),null;"chatWindow/popOut"===i.type?xb():"chatWindow/popIn"===i.type&&(xb(),Ua());var r=e(i),a=t(),s=jd(a),c=jd(o);if("window/prepareP2pChat"===i.type)Va($c(a)),wb?(wb.setLocalVideo(i.payload.localVideo),wb.setRemoteVideo(i.payload.remoteVideo)):wb=new Me({chat:$c(a),localVideo:i.payload.localVideo,remoteVideo:i.payload.remoteVideo}),wb.onevent(function(e,t){if("error"===e)n(Zp());else if("start"===e){if(!wb)return;var i=wb.getRemoteVideo();i&&Ee(i,"mediaChatWindow__remoteVideo--loading")}else if("remoteStreamReceived"===e){if(!wb)return;var o=wb.getRemoteVideo();o&&Ne(o,"mediaChatWindow__remoteVideo--loading")}}),wb.requirePermission("videoRequesting"===s||"videoChatting"===s||"videoIncoming"===s).then(function(){if(("videoChatting"===s||"audioChatting"===s)&&(yb(qs(a,"/webrtcSignalingService/signaling.ashx")),"videoChatting"===s)){var e=wb.getRemoteVideo(),t=wb.getLocalVideo();try{t.play(),e.play()}catch(e){}}}).catch(function(){});else if(i.type===xo)wb&&i.payload.forEach(function(e){var t=Cb[e.type];t&&t(a)});else if("window/acceptAudioVideoChat"===i.type)wb&&wb.requirePermission("videoIncoming"===s).then(function(){var e=vb("pendingAccept",s);n(Xp([e]))}).catch(function(){});else if("window/hangupAudioVideoChat"===i.type&&(xb(),!kb(a,"pendingHangup"))){var d=vb("pendingHangup",c);n(Xp([d]))}return r}}},Ab=function(e,t){var n=In(function(){return t(Mp())},1e4,!1);return function(t){var i=t.type,o=t.sender,r=t.content,a=e();if("agentTyping"===i)n();else if("agentJoinChat"===i||"agentAcceptChat"===i||"agentAcceptTransfer"===i){var s=r.agent;Of("livechat.chat.agent.join",s)}else if("agentTransferChat"===i||"agentTransferChatToDepartment"===i){var c=ol(a,o.id);Of("livechat.chat.agent.transfer",c)}else if("agentEndChat"===i){var d=ol(a,o.id);Of("livechat.chat.agent.leave",d)}}},Tb=function(e){var t=e.getState;return function(e){var n=Ab(t,e);return function(t){var i=e(t);return t.type===xo&&t.payload.forEach(n),i}}},Ib=void 0;Ib=function(){for(var e=arguments.length,t=Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n},zb=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":Wt(t))&&"function"!=typeof t?e:t},jb=!1,qb=function(){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){Nb(this,n);var r=zb(this,e.call(this,i,o));return r[t]=i.store,r}return Bb(n,e),n.prototype.getChildContext=function(){var e;return e={},e[t]=this[t],e[i]=null,e},n.prototype.render=function(){return Rb.only(this.props.children)},n}(I);return o.prototype.componentWillReceiveProps=function(e){this[t]!==e.store&&ze()},o.childContextTypes=(e={},e[t]=Ob.isRequired,e[i]=Mb,e),o.displayName="Provider",o}(),Lb={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},Vb={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},Fb="function"==typeof Object.getOwnPropertySymbols,Ub=function(e,t,n){if("string"!=typeof t){var i=Object.getOwnPropertyNames(t);Fb&&(i=i.concat(Object.getOwnPropertySymbols(t)));for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=e.connectHOC,n=void 0===t?Ve:t,i=e.mapStateToPropsFactories,o=void 0===i?vg:i,r=e.mapDispatchToPropsFactories,a=void 0===r?wg:r,s=e.mergePropsFactories,c=void 0===s?yg:s,d=e.selectorFactory,l=void 0===d?ft:d;return function(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=r.pure,d=void 0===s||s,u=r.areStatesEqual,p=void 0===u?mt:u,f=r.areOwnPropsEqual,h=void 0===f?Ue:f,m=r.areStatePropsEqual,b=void 0===m?Ue:m,g=r.areMergedPropsEqual,w=void 0===g?Ue:g,v=Db(r,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),y=ht(e,o,"mapStateToProps"),x=ht(t,a,"mapDispatchToProps"),_=ht(i,c,"mergeProps");return n(l,Wb({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:y,initMapDispatchToProps:x,initMergeProps:_,pure:d,areStatesEqual:p,areOwnPropsEqual:h,areStatePropsEqual:b,areMergedPropsEqual:w},v))}}(),_g="Comm100 Live Chat",Cg=P(bt,"Chat"),kg=P(bt,"Pre-chat"),Sg=P(bt,"Offline-Message"),Ag=P(bt,"Invitation"),Tg=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return n.enableGa?i.update=i.update.bind(i):i.update=function(){},i.componentDidMount=i.update,i.componentDidUpdate=i.update,i.shouldComponentUpdate=Hh(i,["invitation","windowTab","chatStatus"]),i}return zt(t,e),t.prototype.update=function(){var e=this.props;if(e.invitation||e.chatStatus===$r)return void Ag();var t=this.props.windowTab;if(t===Yr){var n=this.props.guid;(Ra(n)||{}).gaChat||(Pa(n,{gaChat:!0}),Cg())}t===Gr&&kg(),t===Jr&&Sg()},t.prototype.render=function(){return n("div",null)},t}(I);Tg.propTypes={enableGa:Eh,windowTab:Oh,invitation:zh({}),guid:Oh,chatStatus:Oh};var Ig=gt(Tg),Rg=function(e){function t(){return Bt(this,t),qt(this,e.apply(this,arguments))}return zt(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.name,n=(e.children,jt(e,["name","children"])),i=document.createElement(t);Object.assign(i,n),document.head.appendChild(i)},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){return n("div",null)},t}(I);Rg.propTypes={name:Oh.isRequired};var Pg="render",Mg=function(e,t){return function(i){return function(o){function r(t,n){Bt(this,r);var i=qt(this,o.call(this,t,n)),a=n&&n[Pg]?n[Pg]():{};return i.replacer=a[e],i}return zt(r,o),r.prototype.componentDidMount=function(){if(this.useOrigin=!this.replacer,!this.useOrigin){var e=this.replacer(t?this.props[t]:void 0);if(!e)return void(this.useOrigin=!0);this.element.innerHTML="",this.element.appendChild(e)}},r.prototype.shouldComponentUpdate=function(){return this.useOrigin},r.prototype.render=function(){var e=this;return this.replacer?n("div",{ref:function(t){e.element=t}},n(i,this.props)):n(i,this.props)},r}(I)}},Og=function(e,t){return function(i){function o(){if(this.useOrigin=!this.replacer,!this.useOrigin){var e=this.replacer();if(!e)return void(this.useOrigin=!0);this.element.innerHTML="",this.element.appendChild(e)}}function r(e,t){var n=s[t];if(n)return e[n]}var a,s=(a={},a[Gr]="livechat.prechat."+e,a[Yr]="livechat.chat."+e,a[Qr]="livechat.postChat."+e,a[Jr]="livechat.offlineMessage."+e,a);return function(e){function a(t,n){Bt(this,a);var i=qt(this,e.call(this,t,n));i.apis=n&&n[Pg]?n[Pg]():{},i.replacer=r(i.apis,t.tab),i.useOrigin=!0;var s=o.bind(i);return i.componentDidMount=s,i.componentDidUpdate=function(e){e.tab!==i.props.tab&&s()},i}return zt(a,e),a.prototype.componentWillReceiveProps=function(e){e.tab!==this.props.tab&&(this.useOrigin||(this.element.innerHTML="",this.useOrigin=!0),this.replacer=r(this.apis,e.tab))},a.prototype.shouldComponentUpdate=function(){return this.useOrigin},a.prototype.render=function(){var e=this;return n("div",{ref:function(t){e.element=t},className:t},n(i,this.props))},a}(I)}},Eg=function(e){function t(){return Bt(this,t),qt(this,e.apply(this,arguments))}return zt(t,e),t.prototype.getChildContext=function(){var e;return e={},e[Pg]=this.props.getRender,e},t.prototype.render=function(){return this.props.children[0]},t}(I),Ng={border:"none"},Wg=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.shouldComponentUpdate=Hh(i,["online"]),i}return zt(t,e),t.prototype.componentDidMount=function(){this.props.onMounted(this.props.button.id),Of("livechat.button.show",this.props.button)},t.prototype.componentWillUnmount=function(){Of("livechat.button.hide",this.props.button)},t.prototype.render=function(){var e=this.props,t=e.online,i=e.button,o=e.onClick,r=e.onlineSrc,a=e.offlineSrc;return n("a",{href:i.chatWindowLink,onClick:o},n("img",{src:t?r:a,alt:"chat button",style:Ng}))},t}(I);Wg.propTypes={campaignId:Wh.isRequired,onlineSrc:Oh.isRequired,offlineSrc:Oh.isRequired,online:Eh.isRequired,siteId:Wh.isRequired,onClick:Nh.isRequired,onMounted:Nh.isRequired};var Bg=function(e){return function(t){return function(i){function o(){return Bt(this,o),qt(this,i.apply(this,arguments))}return zt(o,i),o.prototype.componentDidMount=function(){if(t){var i=Lh(this,t),o=i.render,r=i.unmount;this.shouldComponentUpdate=function(t){return o(n(e,t)),!1},o(n(e,this.props)),this.componentWillUnmount=r}},o.prototype.render=function(){return n("div",null)},o}(I)}},Dg=zh({type:Bh(["monitor"]).isRequired,id:Wh.isRequired,isHideOffline:Eh}).isRequired,zg=zh({type:Bh(["text"]).isRequired,text:Oh.isRequired,id:Wh.isRequired,isHideOffline:Eh}).isRequired,jg=zh({type:Bh(["image"]).isRequired,id:Wh.isRequired,isHideOffline:Eh,imageOnline:Oh.isRequired,imageOffline:Oh.isRequired}).isRequired,qg=zh({type:Bh(["topLeft","topMiddle","topRight","leftMiddle","rightMiddle","bottomLeft","bottomMiddle","bottomRight","centered"]).isRequired,xoffset:Ph([zh({px:Wh.isRequired}),zh({percent:Wh.isRequired})]),yoffset:Ph([zh({px:Wh.isRequired}),zh({percent:Wh.isRequired})])}).isRequired,Lg=zh({type:Bh(["float"]).isRequired,id:Wh.isRequired,isHideOffline:Eh,position:qg,mobilePosition:qg,imageOnline:Oh.isRequired,imageOffline:Oh.isRequired,mobileImageOnline:Oh.isRequired,mobileImageOffline:Oh.isRequired}).isRequired,Vg=zh({type:Bh(["float"]).isRequired,id:Wh.isRequired,isHideOffline:Eh,position:qg,imageOnline:Oh.isRequired,imageOffline:Oh.isRequired,mobileTextOnline:Oh.isRequired,mobileTextOffline:Oh.isRequired,mobileColor:Oh.isRequired,mobileBackgroundColor:Oh.isRequired}).isRequired,Fg=Ph([Lg,Vg]),Ug=zh({type:Bh(["adaptive"]).isRequired,id:Wh.isRequired,isHideOffline:Eh,color:Oh.isRequired}).isRequired,Hg=Mg("livechat.button","button"),Gg=function(e){return n(Wg,Dt({},e,{campaignId:e.button.id,onlineSrc:e.button.imageOnline,offlineSrc:e.button.imageOffline}))};Gg.propTypes={button:jg};var Yg=Bg(gt(Hg(Gg))),Qg=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.shouldComponentUpdate=Hh(i,["button.text"]),i}return zt(t,e),t.prototype.componentDidMount=function(){this.props.onMounted(this.props.button.id),Of("livechat.button.show",this.props.button)},t.prototype.componentWillUnmount=function(){Of("livechat.button.hide",this.props.button)},t.prototype.render=function(){var e=this.props,t=e.button,i=e.onClick;return n("a",{href:t.chatWindowLink,onClick:i},t.text)},t}(I);Qg.propTypes={button:zg,onMounted:Nh.isRequired,onClick:Nh.isRequired};var Jg=Bg(gt(Hg(Qg))),Xg=function(e){function t(){return Bt(this,t),qt(this,e.apply(this,arguments))}return zt(t,e),t.prototype.componentDidMount=function(){this.props.onMounted(this.props.button.id)},t.prototype.render=function(){return null},t}(I),Zg=Bg(Hg(Xg)),$g=function(e,t){return{position:"relative",display:"block",height:44,lineHeight:"44px",padding:"0 35px",borderRadius:"5px 5px 0 0",color:e,backgroundColor:t,boxShadow:"rgba(0,0,0,.2) 0 2px 25px",fontWeight:"bold",fontSize:20,textAlign:"center",textDecoration:"none",whiteSpace:"nowrap"}},Kg=function(e){function t(){return Bt(this,t),qt(this,e.apply(this,arguments))}return zt(t,e),t.prototype.componentDidMount=function(){this.props.onMounted(this.props.button.id),Of("livechat.button.show",this.props.button)},t.prototype.componentWillUnmount=function(){Of("livechat.button.hide",this.props.button)},t.prototype.render=function(){var e=this.props,t=e.onClick,i=e.online,o=e.button,r=o.chatWindowLink,a=i?o.mobileTextOnline:o.mobileTextOffline;return a?n("a",{href:r,onClick:t,style:$g(o.mobileColor,o.mobileBackgroundColor)},a):null},t}(I);Kg.propTypes={onClick:Nh.isRequired,onMounted:Nh.isRequired,online:Eh.isRequired,siteId:Wh.isRequired,button:Fg};var ew=Math.pow(2,31),tw=ew-6,nw=ew-5,iw=ew-4,ow=ew-2,rw=ew-1,aw=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.shouldComponentUpdate=Hh(i,["online"]),i}return zt(t,e),t.prototype.render=function(){var e=this.props.isMobile,t=void 0,i=void 0;if(e){var o=this.props.button;o.mobileImageOnline?(t=n(Wg,Dt({},this.props,{campaignId:o.id,onlineSrc:o.mobileImageOnline,offlineSrc:o.mobileImageOffline})),i=o.mobilePosition):(t=n(Kg,this.props),i={type:"bottomMiddle",yoffset:{px:0}})}else{var r=this.props.button;i=r.position,t=n(Wg,Dt({},this.props,{campaignId:r.id,onlineSrc:r.imageOnline,offlineSrc:r.imageOffline}))}return n("div",{style:ii(i,tw)},t)},t}(I);aw.propTypes={button:Fg,isMobile:Eh.isRequired};var sw=Bg(gt(Hg(aw))),cw=e(function(e){!function(){function t(){for(var e=[],i=0;i0&&n("div",{className:"chatButton--newMessage"},o)))},t}(I);uw.propTypes={windowStyle:Bh(["bubble",xs,ys]).isRequired,onClick:Nh.isRequired,href:Oh.isRequired,count:Wh,status:Bh(Object.keys(Wo).map(function(e){return Wo[e]})),first:Eh,avatar:Oh,online:Eh.isRequired,animated:Nh};var pw=function(e){function t(){Bt(this,t);var n=qt(this,e.call(this));return n.state={titleColor:"#fff"},n.ele=null,n}return zt(t,e),t.prototype.componentWillMount=function(){var e=wn(this.props.invitation.themeColor,.2),t=yn(this.props.invitation.themeColor);this.setState({titleColor:t?"#000":"#fff",buttonColor:e})},t.prototype.render=function(){var e=this,t=this.props.invitation;return n("div",{id:"Comm100-mobile-invitation",style:{position:"fixed",zIndex:nw,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)"}},n("div",{ref:function(t){e.ele=t},id:"Comm100-mobile-invitation-content",style:{position:"absolute",width:"88%",zIndex:iw,top:"50%",left:"50%",marginLeft:"0px",marginTop:"0px",boxSizing:"border-box",maxWidth:"380px",transform:"translate(-50%, -50%)"}},n("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"}},n("span",{style:{fontWeight:"bold",color:this.state.titleColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%",display:"block"}},t.title)),n("div",{style:{backgroundColor:"white",borderBottomLeftRadius:"5px",borderBottomRightRadius:"5px",borderWidth:"1px",borderColor:t.themeColor,borderStyle:"solid",width:"auto"}},n("span",{style:{padding:"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),n("div",{style:{margin:"0 auto",width:"260px",height:"65px"}},n("a",{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%"},onClick:function(){return e.props.onRefuse(t)}},t.refuseText),n("a",{style:{display:"block",width:"120px",height:"35px",fontSize:"14px",color:"#333",textAlign:"center",float:"left",borderRadius:"3px",lineHeight:"35px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%",backgroundColor:this.state.buttonColor},onClick:function(){e.props.onAccept(t)}},t.acceptText)))))},t}(I);pw.protoTypes={onAccept:Ih.func,onRefuse:Ih.func,invitation:Ih.shape({style:Ih.oneOf([Bo,zo]).isRequired,message:Ih.string.isRequired,ifModal:Ih.bool.isRequired,themeColor:Ih.string,acceptText:Ih.string,refuseText:Ih.string})};var fw=Mg("livechat.invitation.popupImage","invitation")(pw),hw={minimize:"minimize",popup:"popup",embedded:"embedded",close:"close",inputSend:"input-send",plus:"plus",bubble:"bubble",bubbleContent:"bubble-content",bubbleLine:"bubble-line",sendfile:"sendfile",kb:"icon-kb",kbActive:"icon-kb-active",media:"icon-media",mediaActive:"icon-media-active"},mw=function(e){function t(){Bt(this,t);var n=qt(this,e.call(this));return n.state={isHover:!1},n.updateHoverStatus=n.updateHoverStatus.bind(n),n.shouldComponentUpdate=Hh(n,["type","disabled","size","className","color","id","onClick"],["isHover"]),n}return zt(t,e),t.prototype.updateHoverStatus=function(e){this.setState({isHover:e})},t.prototype.render=function(){var e=this,t=this.props,i=t.type,o=t.color,r=t.size,a=t.className,s=t.hoverScale,c=t.disabled,d=t.hoverColor,l=jt(t,["type","color","size","className","hoverScale","disabled","hoverColor"]),u={large:"icon-large",small:"icon-small",larger:"icon-larger",smaller:"icon-smaller",normal:"icon-normal"}[r]||"",p=i.split("#"),f=p[0],h=p[1],m=cw("icon","icon-"+f,u,s&&"icon-hover",a),b=l.style||{};return d&&this.state.isHover?b.color=d:o?b.color=o:h&&(b.color="#"+h),"number"==typeof r&&(b.fontSize=r+"px"),c&&(b.color="#999"),n("i",Dt({},l,{style:b,className:m,onMouseOver:function(){return e.updateHoverStatus(!0)},onMouseOut:function(){return e.updateHoverStatus(!1)}}))},t}(I);mw.defaultProps={hoverScale:!1},mw.propTypes={type:Ih.oneOf(Object.keys(hw).map(function(e){return hw[e]})),color:Ih.string,disabled:Ih.bool,size:Ih.oneOfType([Ih.oneOf(["larger","large","normal","small","smaller"]),Ih.number]),hoverScale:Ih.bool,className:Ih.string,hoverColor:Ih.string},mw.types=hw;var bw=function(e){function t(n){Bt(this,t);var i=qt(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=Pn("shouldComponentUpdate")(Hh(i,["invitation.ifShow","invitation.message","invitation.agentName"])),i}return zt(t,e),t.prototype.componentDidMount=function(){var e=this;this.element.addEventListener("animationend",this.updateHeight,!1),this.props.onHeightChange&&(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.onHeightChange(0),this.timer&&(clearTimeout(this.timer),this.timer=null),this.cb&&(clearTimeout(this.cb),this.cb=null),this.element.removeEventListener("animationend",this.updateHeight)},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.invitation;return n("div",{style:{"z-index":iw},className:cw("invitation invitation-show","bubble"===t.winType?"invitation--bubble":"",t.winType===xs?"invitation--circle":"",t.winType===ys?"invitation--classic":""),onClick:function(){e.props.onAccept(t)},ref:function(t){e.element=t}},t.agentName&&n("div",{className:"invitation__name"},t.agentName),n("div",{className:"invitation__message"},t.message),n("div",{className:"invitation__close",onClick:function(n){hn(n),e.props.onRefuse(t)},ref:function(t){ e.refuse=t}},n(mw,{type:hw.close,size:12})),n("div",{className:"invitation__type animated invitation-showType"},t.textTypeHere))},t}(I);bw.protoTypes={onAccept:Ih.func,onRefuse:Ih.func,invitation:Ih.shape({ifShow:Ih.bool,style:Ih.oneOf([Bo,zo]).isRequired,message:Ih.string.isRequired,agentName:Ih.string,textTypeHere:Ih.string})};var gw,ww=function(e){function t(){Bt(this,t);var n=qt(this,e.call(this));return n.state={backgroundImageLoad:!1},n.isInvitationViewed=!1,n}return zt(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;return n("div",null,t.ifModal&&n("div",{style:{zIndex:nw,position:"fixed",top:0,bottom:0,left:0,right:0,background:"rgba(0, 0, 0, 0.3)",display:this.state.backgroundImageLoad?"":"none"}}),n("div",{style:Object.assign(ii(t.position,nw),{zIndex:iw,position:"fixed",background:"url(' "+t.image+"') no-repeat scroll 0% 0% transparent;",width:this.state.imgWidth,height:this.state.imgheight,cursor:"pointer",display:this.state.backgroundImageLoad?"":"none"})},n("img",{src:t.image,onClick:function(){e.props.onAccept(t)},id:"invitationAcceptImg",style:{visibility:"show",display:"inline"},alt:""}),n("div",{onClick:function(){e.props.onAccept(t)},style:{position:"absolute",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,overflow:"hidden",whiteSpace:"pre-wrap"}},t.message),n("div",{onClick:function(){e.props.onRefuse(t)},style:{position:"absolute",left:t.closeArea.left,top:t.closeArea.top,width:t.closeArea.width,height:t.closeArea.height,cursor:"pointer"}})))},t}(I),vw=Mg("livechat.invitation.popupImage","invitation")(ww),yw=(gw={},gw[jo]=fw,gw[zo]=bw,gw[Bo]=vw,gw),xw=function(e){var t=yw[e.invitation.type];return t?n(t,e):null},_w="*,::after,::before{box-sizing:border-box}html{margin:0;font-size:15px}body{margin:0;font-family:\"SourceSans Pro\",Arial;line-height:1.42857143;overflow:hidden}.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated-frames18{-webkit-animation-duration:.75s;animation-duration:.75s}.animated-delayFrames36{-webkit-animation-delay:1.5s;animation-delay:1.5s}.animated-delayFrames39{-webkit-animation-delay:1.625s;animation-delay:1.625s}.animated-delayFrames42{-webkit-animation-delay:1.75s;animation-delay:1.75s}.chatButtonMask{position:fixed;right:30px;bottom:30px;width:70px;height:70px;z-index:9}.chatButtonMask--hidden{display:none}.chatButton::after,.chatButton::before{display:block;content:''}.chatButtonMask--fullscreen{width:calc(100% - 60px);height:calc(100% - 60px);overflow:hidden}.chatButtonContainer--mobile.chatButtonMask--fullscreen,.window--mobile .chatButtonMask--fullscreen{width:100%;right:0;bottom:0}.chatButtonMask--circle.chatButtonMask--fullscreen{height:calc(100% - 75px)}.chatButtonMask--classic,.window--classic .chatButtonMask--fullscreen{border-radius:2px 2px 0 0}.chatButtonMask--circle,.window--circle .chatButtonMask--fullscreen{border-radius:20px 20px 0 0}.chatButtonMask--bubble,.window--bubble .chatButtonMask--fullscreen{border-radius:8px 8px 0 0}.chatButton,.chatButton::after,.chatButtonContainer{width:70px;height:70px;border-radius:100%}.chatButtonMask.chatButtonMask--top{width:70px;height:70px;-webkit-transform:translate3d(-315px,-485px,0) scale(.714,.714);transform:translate3d(-315px,-485px,0) scale(.714,.714);z-index:2147483638}.chatButtonMask.chatButtonMask--circle.chatButtonMask--top{-webkit-transform:translate3d(-137.5px,-475px,0) scale(1.214,1.214);transform:translate3d(-137.5px,-475px,0) scale(1.214,1.214)}.chatButtonContainer{position:fixed;bottom:30px;right:30px;z-index:2147483636}.chatButton,.chatButton::before{position:absolute;right:0;bottom:0}.chatButton{box-shadow:0 1px 6px rgba(0,0,0,.3)}.chatButton:hover{box-shadow:0 3px 10px rgba(0,0,0,.3);transition:box-shadow .4s cubic-bezier(.785,.135,.15,.86);cursor:pointer;will-change:transform}.chatButton--minimized.chatButton{box-shadow:none}.chatButton::before{top:0;left:0;border-radius:50%}.chatButton--ripple::before{-webkit-animation:at-ripple 16.417s linear 3.625s infinite;animation:at-ripple 16.417s linear 3.625s infinite}.chatButton--scaleAnimation{-webkit-animation:chatButton--scaleAnimated 3.5s both cubic-bezier(.785,.135,.15,.86);animation:chatButton--scaleAnimated 3.5s both cubic-bezier(.785,.135,.15,.86)}.chatButton--maximized{-webkit-animation:xAxis .5s forwards cubic-bezier(.02,.01,.21,1);animation:xAxis .5s forwards cubic-bezier(.02,.01,.21,1)}.chatButton--maximized::after{content:'';-webkit-animation:yAxis .5s forwards cubic-bezier(.545,.075,.72,.93);animation:yAxis .5s forwards cubic-bezier(.545,.075,.72,.93)}.chatButton--maximized .chatButton__dot,.chatButton--maximized .chatButton__svg-chat{display:none}.chatButton--minimized{-webkit-animation:xAxis-back .5s forwards cubic-bezier(.785,.135,.15,.86);animation:xAxis-back .5s forwards cubic-bezier(.785,.135,.15,.86)}.chatButton--minimized::after{content:'';position:relative;box-shadow:0 1px 6px rgba(0,0,0,.3);-webkit-animation:yAxis-back .5s forwards cubic-bezier(.02,.01,.21,1);animation:yAxis-back .5s forwards cubic-bezier(.02,.01,.21,1)}.chatButton__svg-chat{position:absolute;left:13px;top:15px;z-index:9}.chatButton__svg-chat-path{stroke-dasharray:120;stroke-dashoffset:120;fill:#fff}.chatButton--scaleAnimation .chatButton__svg-chat-path{-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:dash,fillIn;animation-name:dash,fillIn;-webkit-animation-duration:417ms,167ms;animation-duration:417ms,167ms;-webkit-animation-delay:625ms,1.042s;animation-delay:625ms,1.042s}@-webkit-keyframes dash{from{stroke-dashoffset:120}to{stroke-dashoffset:0}}@keyframes dash{from{stroke-dashoffset:120}to{stroke-dashoffset:0}}@-webkit-keyframes fillIn{from{fill-opacity:0}to{fill-opacity:1}}@keyframes fillIn{from{fill-opacity:0}to{fill-opacity:1}}.chatButton__dot{position:absolute;top:22px;left:22px;z-index:9}.dot__element{display:inline-block;width:6px;height:6px;margin-left:5px;border-radius:100%;position:relative}.chatButton--avatar::after,.chatButton--maximizedAsChatting::after,.chatButton--minimizedAsChatting::after{width:70px;height:70px;background-repeat:no-repeat;background-size:cover;border-radius:100%;content:''}.dot__element:first-child{margin-left:0}@-webkit-keyframes dot--animation{0%{opacity:0;-webkit-transform:translateY(-35px);transform:translateY(-35px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes dot--animation{0%{opacity:0;-webkit-transform:translateY(-35px);transform:translateY(-35px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.dot--animation{-webkit-animation-name:dot--animation;animation-name:dot--animation;-webkit-animation-delay:1.209s;animation-delay:1.209s}@-webkit-keyframes dot__element--animation{0%{top:-35px;opacity:0}100%,39%{top:0;opacity:1}67%{top:-8px;opacity:1}}@keyframes dot__element--animation{0%{top:-35px;opacity:0}100%,39%{top:0;opacity:1}67%{top:-8px;opacity:1}}.chatButton--scaleAnimation .dot__element--animation{-webkit-animation-name:dot__element--animation;animation-name:dot__element--animation}@-webkit-keyframes xAxis{100%{-webkit-transform:translateX(-170px);transform:translateX(-170px)}}@keyframes xAxis{100%{-webkit-transform:translateX(-170px);transform:translateX(-170px)}}@-webkit-keyframes yAxis{78%{-webkit-transform:translateY(-185px) translateZ(0) scale(8.97,8.97);transform:translateY(-185px) translateZ(0) scale(8.97,8.97);background-color:#fff}89%{-webkit-transform:translateY(-185px) translateZ(0) scale(10.235,10.235);transform:translateY(-185px) translateZ(0) scale(10.235,10.235);background-color:#fff;box-shadow:0 0 2px rgba(0,0,0,.2)}100%{-webkit-transform:translateY(-185px) translateZ(0) scale(11.5,11.5);transform:translateY(-185px) translateZ(0) scale(11.5,11.5);background-color:#fff;box-shadow:0 0 2px rgba(0,0,0,.2)}}@keyframes yAxis{78%{-webkit-transform:translateY(-185px) translateZ(0) scale(8.97,8.97);transform:translateY(-185px) translateZ(0) scale(8.97,8.97);background-color:#fff}89%{-webkit-transform:translateY(-185px) translateZ(0) scale(10.235,10.235);transform:translateY(-185px) translateZ(0) scale(10.235,10.235);background-color:#fff;box-shadow:0 0 2px rgba(0,0,0,.2)}100%{-webkit-transform:translateY(-185px) translateZ(0) scale(11.5,11.5);transform:translateY(-185px) translateZ(0) scale(11.5,11.5);background-color:#fff;box-shadow:0 0 2px rgba(0,0,0,.2)}}@-webkit-keyframes xAxis-back{0%{-webkit-transform:translateX(-170px);transform:translateX(-170px)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes xAxis-back{0%{-webkit-transform:translateX(-170px);transform:translateX(-170px)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes yAxis-back{0%{-webkit-transform:translateY(-185px) translateZ(0) scale(11.5,11.5);transform:translateY(-185px) translateZ(0) scale(11.5,11.5);background-color:#fff;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:10}11%{-webkit-transform:translateY(-185px) translateZ(0) scale(10.235,10.235);transform:translateY(-185px) translateZ(0) scale(10.235,10.235);background-color:#fff;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:10}22%{-webkit-transform:translateY(-185px) translateZ(0) scale(8.97,8.97);transform:translateY(-185px) translateZ(0) scale(8.97,8.97);background-color:#fff;box-shadow:none;z-index:10}99.99%{z-index:10}100%{z-index:8}}@keyframes yAxis-back{0%{-webkit-transform:translateY(-185px) translateZ(0) scale(11.5,11.5);transform:translateY(-185px) translateZ(0) scale(11.5,11.5);background-color:#fff;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:10}11%{-webkit-transform:translateY(-185px) translateZ(0) scale(10.235,10.235);transform:translateY(-185px) translateZ(0) scale(10.235,10.235);background-color:#fff;box-shadow:0 0 2px rgba(0,0,0,.2);z-index:10}22%{-webkit-transform:translateY(-185px) translateZ(0) scale(8.97,8.97);transform:translateY(-185px) translateZ(0) scale(8.97,8.97);background-color:#fff;box-shadow:none;z-index:10}99.99%{z-index:10}100%{z-index:8}}@-webkit-keyframes chatButton--scaleAnimated{0%{-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:0}7.04%{-webkit-transform:scale(2.5);transform:scale(2.5);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}11.26%{-webkit-transform:scale(2);transform:scale(2);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}15.48%{-webkit-transform:scale(2.15);transform:scale(2.15);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}21.12%,78.87%{-webkit-transform:scale(2);transform:scale(2);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}85.91%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}90.13%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}94.354%{-webkit-transform:scale(.97);transform:scale(.97);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}100%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}}@keyframes chatButton--scaleAnimated{0%{-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:0}7.04%{-webkit-transform:scale(2.5);transform:scale(2.5);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}11.26%{-webkit-transform:scale(2);transform:scale(2);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}15.48%{-webkit-transform:scale(2.15);transform:scale(2.15);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}21.12%,78.87%{-webkit-transform:scale(2);transform:scale(2);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}85.91%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}90.13%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}94.354%{-webkit-transform:scale(.97);transform:scale(.97);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}100%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}}.chatButton--maximizedAsChatting{-webkit-transform:scale(.714,.714);-ms-transform:scale(.714,.714);transform:scale(.714,.714);-webkit-animation:chatButton--maximizedAsChattingyAxis .5s cubic-bezier(.545,.075,.72,.93) 125ms both;animation:chatButton--maximizedAsChattingyAxis .5s cubic-bezier(.545,.075,.72,.93) 125ms both}.chatButtonMask--circle.chatButton--maximizedAsChatting{-webkit-transform:scale(1.214,1.214);-ms-transform:scale(1.214,1.214);transform:scale(1.214,1.214);-webkit-animation:chatButton--maximizedAsChattingyAxisCircle .5s cubic-bezier(.545,.075,.72,.93) 125ms both;animation:chatButton--maximizedAsChattingyAxisCircle .5s cubic-bezier(.545,.075,.72,.93) 125ms both}.chatButton--maximizedAsChatting .chatButton::before{-webkit-animation:none;animation:none}.chatButton--maximizedAsChatting::after{display:block;-webkit-animation:chatButton--maximizedAsChattingxAxis .5s cubic-bezier(.02,.01,.23,.76) 125ms both;animation:chatButton--maximizedAsChattingxAxis .5s cubic-bezier(.02,.01,.23,.76) 125ms both}.chatButtonMask--circle.chatButton--maximizedAsChatting::after{-webkit-animation:chatButton--maximizedAsChattingxAxisCircle .5s cubic-bezier(.02,.01,.23,.76) 125ms both;animation:chatButton--maximizedAsChattingxAxisCircle .5s cubic-bezier(.02,.01,.23,.76) 125ms both}.chatButton--maximizedAsChatting .chatButton--newMessage{display:none}.chatButton--avatar .chatButton,.chatButton--maximizedAsChatting .chatButton,.chatButton--minimizedAsChatting .chatButton{box-shadow:none}.chatButton--minimizedAsChatting{z-index:11;-webkit-animation:chatButton--minimizedAsChattingyAxis .5s cubic-bezier(.02,.01,.32,1.02) both;animation:chatButton--minimizedAsChattingyAxis .5s cubic-bezier(.02,.01,.32,1.02) both}.chatButtonMask--circle.chatButton--minimizedAsChatting{-webkit-animation:chatButton--minimizedAsChattingyAxisCircle .5s cubic-bezier(.02,.01,.32,1.02) both;animation:chatButton--minimizedAsChattingyAxisCircle .5s cubic-bezier(.02,.01,.32,1.02) both}.chatButton--minimizedAsChatting .chatButton::after,.chatButton--minimizedAsChatting .chatButton::before{-webkit-animation:none;animation:none}.chatButton--avatar::after,.chatButton--minimizedAsChatting::after{display:block;box-shadow:0 1px 6px rgba(0,0,0,.3);-webkit-animation:chatButton--minimizedAsChattingxAxis .5s cubic-bezier(.43,.17,.72,.93) both;animation:chatButton--minimizedAsChattingxAxis .5s cubic-bezier(.43,.17,.72,.93) both}.chatButton--avatar::after{-webkit-animation:none;animation:none}.chatButtonMask--circle.chatButton--minimizedAsChatting::after{-webkit-animation:chatButton--minimizedAsChattingxAxisCircle .5s cubic-bezier(.43,.17,.72,.93) both;animation:chatButton--minimizedAsChattingxAxisCircle .5s cubic-bezier(.43,.17,.72,.93) both}.chatButton--avatar .chatButton::after,.chatButton--maximizedAsChatting .chatButton::after,.chatButton--minimizedAsChatting .chatButton::after{background-color:transparent!important}.chatButton--avatar .chatButton,.chatButton--minimizedAsChatting .chatButton{z-index:1}.chatButton--avatar .chatButton .chatButton__dot,.chatButton--avatar .chatButton .chatButton__svg-chat,.chatButton--maximizedAsChatting .chatButton .chatButton__dot,.chatButton--maximizedAsChatting .chatButton .chatButton__svg-chat,.chatButton--minimizedAsChatting .chatButton .chatButton__dot,.chatButton--minimizedAsChatting .chatButton .chatButton__svg-chat{display:none}.chatButton--minimizedAsChatting .chatButton__agentAvatarImg{position:absolute;display:block;width:100%;height:100%;border-radius:100%}.chatButton--newMessage{z-index:9}@-webkit-keyframes newincoming{0%{-webkit-transform:scale(0);transform:scale(0)}75%{-webkit-transform:scale(1.2);transform:scale(1.2)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes at-ripple{0%{box-shadow:0 0 0 0 #dadada}100%,8.631%{box-shadow:0 0 0 25px rgba(218,218,218,0)}}@keyframes at-ripple{0%{box-shadow:0 0 0 0 #dadada}100%,8.631%{box-shadow:0 0 0 25px rgba(218,218,218,0)}}.at-ripple{-webkit-animation-name:at-ripple;animation-name:at-ripple}.invitation{position:fixed;z-index:2147483637;cursor:pointer;right:35px;bottom:125px;width:250px;padding-top:17px;border:1px solid #ddd;background:#fff}.invitation__message,.invitation__name{font-size:1em;padding:0 25px;overflow:hidden;text-overflow:ellipsis}.invitation--bubble{border-radius:8px}.invitation--bubble .invitation__type{border-radius:0 0 8px 8px}.invitation--classic{border-radius:4px}.invitation--classic .invitation__type{border-radius:0 0 4px 4px}.invitation--circle{border-radius:20px}.invitation--circle .invitation__type{border-radius:0 0 20px 20px}.invitation__name{color:#000;font-family:\"SourceSans Pro Bold\";max-width:100%;white-space:nowrap}.invitation__message{line-height:18px;margin-bottom:19px;color:#666;max-height:180px;display:-webkit-box;-webkit-line-clamp:10;-webkit-box-orient:vertical}.invitation__close{position:absolute;top:0;right:0;padding:5px 8px;font-size:1.33em;color:#333;line-height:1;cursor:pointer}.invitation__type{height:35px;line-height:35px;padding:0 25px;background:#f0f0f0;color:#bbb;font-size:.93em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.invitation::after,.invitation::before{content:'';position:absolute;width:0;height:0}.invitation::before{right:20px;bottom:-22px;border:11px solid transparent;border-top-color:#ddd}.invitation::after{right:22px;bottom:-18px;border:9px solid transparent;border-top-color:#f0f0f0}@-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)}}.invitation-show{-webkit-animation:invitation-show 375ms cubic-bezier(.785,.135,.15,.86) both;animation:invitation-show 375ms cubic-bezier(.785,.135,.15,.86) both}@-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}}.invitation-showType{-webkit-animation:invitation-showType .25s cubic-bezier(.785,.135,.15,.86) 125ms both;animation:invitation-showType .25s cubic-bezier(.785,.135,.15,.86) 125ms both}@-webkit-keyframes invitation-showmessage{0%{opacity:0}100%{opacity:1}}@keyframes invitation-showmessage{0%{opacity:0}100%{opacity:1}}.invitation-showmessage{-webkit-animation-name:invitation-showmessage;animation-name:invitation-showmessage;-webkit-animation-duration:167ms;animation-duration:167ms;-webkit-animation-delay:292ms;animation-delay:292ms;white-space:pre-wrap;word-break:break-word}.chatButton--newMessage{position:absolute;right:0;top:4px;width:16px;height:16px;line-height:16px;background:rgba(222,57,57,.9);border-radius:100%;color:#fff;text-align:center;font-size:.8em;-webkit-animation:newincoming .4s cubic-bezier(.785,.135,.15,.86) both;animation:newincoming .4s cubic-bezier(.785,.135,.15,.86) both}@keyframes newincoming{0%{-webkit-transform:scale(0);transform:scale(0)}75%{-webkit-transform:scale(1.2);transform:scale(1.2)}100%{-webkit-transform:scale(1);transform:scale(1)}}",Cw=3.625,kw=function(e,t,n,i){return{border:"none",width:e,height:t,position:"fixed",right:n,bottom:i,zIndex:tw}},Sw="chatButton",Aw="dot__element",Tw=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n)),o=Oa()||{},r=o.animated,a=n.online&&!r;return a&&Ea({animated:!0}),i.state={showAnimation:a,invHeight:0},i.style=[n.fontCSS,_w,".online ."+Sw+":after,.online ."+Aw+"{","background-color:"+n.button.color,"}",".online ."+Sw+":before{","animation:at-ripple 16.417s linear "+Cw+"s infinite","}",".offline ."+Sw+":after,.offline ."+Aw+"{","background-color:#bbb","}"].join(""),i}return zt(t,e),t.prototype.componentDidMount=function(){this.props.onMounted(this.props.button.id),Of("livechat.button.show",this.props.button);var e=document.querySelector("#"+this.props.button.divId+" iframe");e&&e.getBoundingClientRect()},t.prototype.componentWillUnmount=function(){Of("livechat.button.hide",this.props.button),this.timer||clearTimeout(this.timer)},t.prototype.render=function(){var e=this,t=this.state.showAnimation,i=t?200:122,o=i,r=this.props,a=r.button,s=r.onClick,c=r.onAnimated,d=r.windowStatus,l=r.messageCount,u=r.windowStyle,p=r.isMobile,f=this.props.bubbleInvitation,h=a.iframeStyle,m=h&&h.width,b=h&&h.height;d===Io?u===ys?(i=m||460,o=b||620):u===xs?(i=m||420,o=b||610):"bubble"===u&&(i=m||380,o="100%"):f&&!t&&(i=290,o=this.state.invHeight===1/0?"100%":this.state.invHeight+130);var g=this.props.button.chatWindowLink,w=0,v=0;if(d===Io&&a.iframeStyle){var y=a.iframeStyle;null!=y.right&&(w=y.right),null!=y.left&&(w=this.props.width-(y.left+y.width)),null!=y.bottom&&(v=y.bottom),null!=y.top&&(v=this.props.height-(y.top+y.height))}return n(Xh,{style:kw(i,o,w,v),innerCss:this.style},f&&d===No&&!t&&n(xw,{invitation:{winType:f.winType,ifShow:!0,id:f.id,type:f.type,message:f.message,agentName:f.agentName,textTypeHere:f.textTypeHere,campaignId:f.campaignId,isManual:f.isManual},onAccept:this.props.onAccept,onRefuse:this.props.onRefuse,onHeightChange:function(t){e.setState({invHeight:t})}}),n(uw,{isMobile:p,avatar:f&&f.avatar,ifRipple:!f&&this.props.online,"chatButton--ripple":!0,onClick:s,href:g,count:l,status:d,first:t,online:this.props.online,animated:function(){e.setState({showAnimation:!1})},onOpened:c,campaignId:a.id,windowStyle:a.windowStyle}))},t}(I);Tw.propTypes={online:Eh.isRequired,button:Ug,onClick:Nh.isRequired,onMounted:Nh.isRequired,onAnimated:Nh.isRequired,siteId:Wh.isRequired,windowStatus:Bh([No,Io]).isRequired,onAccept:Nh,onRefuse:Nh,bubbleInvitation:zh({ifShowInvitation:Eh,message:Oh,agentName:Oh,textTypeHere:Oh}),fontCSS:Oh,chatWindowLink:Oh};var Iw,Rw=Bg(gt(Hg(Tw))),Pw=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})},Mw=function(e){var t=function(t){function i(e){Bt(this,i);var n=qt(this,t.call(this,e));return n.timer=null,n.hOnline=[].concat(e.hOnline),n.setTimespan=n.setTimespan.bind(n),n.heartbeat=n.heartbeat.bind(n),n.tick=n.tick.bind(n),n.registerStop=n.registerStop.bind(n),n.clean=n.clean.bind(n),n.initial=n.initial.bind(n),n}return zt(i,t),i.prototype.componentDidMount=function(){this.props.hOnline&&this.initial()},i.prototype.componentDidUpdate=function(e){e.hOnline&&!this.props.hOnline&&this.clean(),!e.hOnline&&this.props.hOnline&&(this.hOnline=[].concat(this.props.hOnline),this.initial()),!Pw(e.hOnline,this.props.hOnline)&&e.hOnline&&this.props.hOnline&&(this.clean(),this.hOnline=[].concat(this.props.hOnline),this.initial())},i.prototype.componentWillUnmount=function(){this.clean()},i.prototype.setTimespan=function(){var e=this.hOnline.shift();e&&(this.duration=e.duration,this.timespanTimer=setTimeout(this.setTimespan,1e3*e.timespan))},i.prototype.initial=function(){this.setTimespan(),this.tick(),this.registerStop(),this.props.hDelay||this.props.hCallback(this.props)},i.prototype.heartbeat=function(){if(this.props.hCallback(this.props),!this.duration)return void(this.heartbeatTimer=null);this.tick()},i.prototype.tick=function(){var e=void 0!==this.props.hOffline?this.props.hOffline:this.duration;this.heartbeatTimer=setTimeout(this.heartbeat,1e3*e)},i.prototype.registerStop=function(){void 0!==this.props.hStop&&(this.stopTimer=setTimeout(this.clean,1e3*this.props.hStop))},i.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},i.prototype.render=function(){var t=this.props,i=(t.hOnline,t.hOffline,t.hCallback,t.hStop,jt(t,["hOnline","hOffline","hCallback","hStop"]));return n(e,i)},i}(I);return t.propTypes={hCallback:Nh,hOnline:Ph([zh({duration:Wh.isRequired,timespan:Wh.isRequired}),Rh(zh({duration:Wh.isRequired,timespan:Wh.isRequired}))]),hOffline:Wh,hStop:Wh,hDelay:Eh},gt(t)},Ow={},Ew=2,Nw=Yt(10)(function(e,t){return t(e)}),Ww=(Iw={},Iw.monitor=Zg,Iw.text=Jg,Iw.image=Yg,Iw.float=sw,Iw.adaptive=Rw,Iw),Bw=function(e){var t=e.divId;if("float"===e.type)if(void 0!==Ow[t])t=Ow[t];else{var n="comm100-float-button-"+Ew,i=document.createElement("div");i.id=n;var o=document.getElementById("comm100-container");o.appendChild(i),Ow[t]=n,t=n,Ew+=1}return Nw(document.getElementById(t),Ww[e.type])},Dw=function(e){function t(){return Bt(this,t),qt(this,e.apply(this,arguments))}return zt(t,e),t.prototype.componentDidMount=function(){this.props.onMounted()},t.prototype.render=function(){var e=this,t=this.props,i=t.bubbleInvitation,o=t.buttons,r=t.siteId,a=t.onClick,s=t.onEachMounted,c=t.status,d=t.windowStatus,l=t.width,u=t.height,p=t.isMobile,f=t.messageCount,h=t.onAccept,m=t.onRefuse,b=t.onAnimated,g=t.windowStyle;return n("div",null,o.map(function(t){var o=Bw(t),w=c[t.id];return n(o,{fontCSS:e.props.fontCSS,bubbleInvitation:i,messageCount:f,onAccept:h,onRefuse:m,online:w,button:t,siteId:r,onClick:function(n){n.preventDefault(),a(t,e.props.windowStatus)},onMounted:s,key:t.id,isMobile:p,windowStatus:d,onAnimated:b,windowStyle:g,width:l,height:u})}))},t}(I);Dw.propTypes={buttons:Rh(Ph([Dg,zg,jg,Fg,Ug])).isRequired,status:Mh(Eh).isRequired,onClick:Nh.isRequired,onAnimated:Nh.isRequired,onEachMounted:Nh.isRequired,siteId:Wh.isRequired,windowStatus:Bh([No,Oo,Eo,Ro,Io,Po,Mo]).isRequired,isMobile:Eh.isRequired,fontCSS:Oh};var zw=Mw(gt(Dw)),jw=function(e){return e!==No&&e!==Io},qw=function(){Array.prototype.slice.call(document.querySelectorAll(".comm100-powered-by")).forEach(function(e){e.parentNode.removeChild(e)})},Lw=function(e){var t=oc(e),n=nc(e),i=xc(e),o=le(e),r=jw(t)?void 0:Fs(e),a=o&&o.messageCount?o.messageCount:0,s=void 0;Object.keys(n).every(function(e){return!n[e]})&&(s=Us(e));var c=Hs(e);return{fontCSS:ai(Ms(e),P(zs,e)),buttons:i,status:n,windowStatus:t,messageCount:a,bubbleInvitation:o,siteId:ic(e),isMobile:fc(e),onMounted:qw,hOnline:r,hOffline:s,hStop:c,hDelay:!0,windowStyle:Ol(e,ec(e)),width:kc(e),height:Cc(e)}},Vw=function(e){return{onEachMounted:function(){e({type:"onMounted"})},onClick:function(t,n){n===No&&(e(wu(t.id)),e(yu(t.id)),Of("livechat.button.click",t))},onAccept:function(t){var n=t.campaignId,i=t.id;Of("livechat.invitation.accept",i),e(gu()),e(yu(n))},onRefuse:function(t){var n=t.id;Of("livechat.invitation.refuse",n),e(vu())},hCallback:function(){e(Bp())},onAnimated:function(){e(Cu())}}},Fw=xg(Lw,Vw)(zw),Uw=function(e){return{invitation:de(e)}},Hw=function(e){return{onAccept:function(t){Of("livechat.invitation.accept",t.id),e(gu()),e(yu(t.campaignId))},onRefuse:function(t){Of("livechat.invitation.refuse",t.id),e(vu())}}},Gw=xg(Uw,Hw)(xw),Yw=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));i.title=document.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=Hh(i,["message"]),i}return zt(t,e),t.prototype.componentWillUnmount=function(){this.timer&&this.resetTitle()},t.prototype.flashTitle=function(){var e=this;this.timer=setTimeout(function(){document.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(!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.title=this.title},t.prototype.render=function(){return""},t}(I),Qw=function(e){function t(n){Bt(this,t);var i=qt(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}return zt(t,e),t.prototype.startDrag=function(e){var t=e||window.event;mn(t),this.mouseStart.x=t.clientX,this.mouseStart.y=t.clientY,this.setState({isMouseDown:!0}),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.addEventListener("mousemove",this.doDrag),document.addEventListener("mouseup",this.stopDrag)},t.prototype.doDrag=function(e){var t=e||window.event;if(window.event||window.event.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,r=this.props.height-this.props.ifrHeight;n=n<0?0:n,i=i<0?0:i,n=n>o?o:n,i=i>r?r:i;var a=this.props.width-n-this.props.ifrWidth,s=this.props.height-i-this.props.ifrHeight;this.props.ifrPositionChanged(a,s)}else this.stopDrag()},t.prototype.stopDrag=function(){this.setState({isMouseDown:!1}),document.removeEventListener("mousemove",this.doDrag),document.removeEventListener("mouseup",this.stopDrag)},t.prototype.render=function(){var e=void 0;e=this.state.isMouseDown?this.props.bottom:this.props.bottom+this.props.ifrHeight-(this.props.barHeight+this.props.ifrOffsetTop);var t=void 0;return t=this.state.isMouseDown?this.props.right:this.props.right+this.props.ifrWidth-(this.props.barWidth+this.props.ifrOffsetLeft),n("div",{className:"movediv",onMouseDown:this.startDrag,style:{height:this.state.isMouseDown?this.props.ifrHeight:this.props.barHeight,width:this.state.isMouseDown?this.props.ifrWidth:this.props.barWidth,backgroundColor:"rgba(0,0,0,0)",bottom:e,right:t,position:"fixed",cursor:"move",zIndex:rw}})},t}(I);Qw.defaultProps={ifrOffsetLeft:30,ifrOffsetTop:30,barHeight:24,barWidth:315},Qw.protoTypes={ifrWidth:Ih.number,ifrHeight:Ih.number,ifrDefaultLeft:Ih.number,ifrDefaultTop:Ih.number,ifrOffsetLeft:Ih.number,ifrOffsetTop:Ih.number,barHeight:Ih.number,barWidth:Ih.number,ifrPositionChanged:Ih.func};var Jw=1,Xw=2,Zw=3,$w=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={ifIE9:!1},i.bodyDisableScroll=n.onMount,i.bodyEnableScroll=n.onUnmount,i.detectIfIE9=i.detectIfIE9.bind(i),i}return zt(t,e),t.prototype.componentWillMount=function(){this.detectIfIE9()},t.prototype.componentDidMount=function(){this.props.show?this.bodyDisableScroll():this.bodyEnableScroll()},t.prototype.componentDidUpdate=function(e){var t=this.props.show;e.show!==t&&(t?this.bodyDisableScroll():this.bodyEnableScroll())},t.prototype.componentWillUnmount=function(){this.bodyEnableScroll()}, t.prototype.detectIfIE9=function(){var e=window.navigator.userAgent;this.setState({ifIE9:e.toLowerCase().indexOf("msie 9.0")>=0})},t.prototype.render=function(){var e=this,t=this.props,i=t.windowStatus,o=t.isMobile,r=t.isRightToLeft,a=t.isPoppedOut,s=t.windowStyle,c=t.children,d=t.windowTab,l=t.chatStatus,u=t.env,p=t.isIPad,f=t.show,h=cw(i===Eo&&"window--minimized",d===Yr&&cw(l===Zr&&"animation--waiting",l===Kr&&"animation--chatting",l===ea&&"animation-chatted"));return n("div",{className:cw("embedded-window",o&&"window--mobile",p&&"window--ipad",o&&u===Xw&&"window--mobileVertical",o&&u===Jw&&"window--mobileHorizontal",On&&"window--ie"),ref:function(t){e.element=t},style:{display:f?"":"none"}},n("div",{id:"whole-window",className:cw("whole-window","window--animated",r?"window--rtl":"",a?"":"window--embedded",_s(s),h,this.state.ifIE9?"window--ie9":"")},n("div",{id:"main",className:"main-container"},c)))},t}(I);$w.propTypes={windowStatus:Ih.oneOf(Object.keys(Wo).map(function(e){return Wo[e]})).isRequired,isMobile:Ih.bool,title:Ih.string,isRightToLeft:Ih.bool,isPoppedOut:Ih.bool,windowStyle:Ih.oneOf(["bubble",xs,ys]).isRequired,children:Ih.element,windowTab:Ih.oneOf(Object.keys(Xr).map(function(e){return Xr[e]})).isRequired};var Kw={position:"fixed",width:"100%",height:"100%",overflow:"hidden",top:0,bottom:0,right:0,left:0,touchAction:"none"},ev={position:"fixed",top:0,right:0,bottom:0,left:0,backgroundColor:"rgba(0,0,0,0.15)",zIndex:ow},tv={display:"none"},nv=function(e,t,n){if(!n)return{right:0,bottom:0};var i=n.right||0,o=n.bottom||0;return void 0!==n.top&&(o=t-n.top-n.height),void 0!==n.left&&(i=e-n.left-n.width),{right:i,bottom:o}},iv=function(){},ov=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n)),o=nv(n.width,n.height,n.iframeStyle),r=o.right,a=o.bottom;i.state={showMessage:!0,invHeight:0,left:n.iframeStyle&&n.iframeStyle.left,top:n.iframeStyle&&n.iframeStyle.top,right:r,bottom:a},i.setWinSize=function(){},i.getWinStyle=function(){},i.getExWinStyle=function(){},i.getInnerCss=i.getInnerCss.bind(i),i.updateIframe=function(){return iv},i.shouldComponentUpdate=Hh(i,["windowStatus","windowTab","children","windowStyle","unread","lastMessage","avatar","title","seed","expandWindow","width","height"],["showMessage","invHeight","right","bottom"]);var s=n.onFocusToggle;return i.onBlur=P(s,!1),i.onFocus=function(){var e=i.props.windowStatus;e!==Ro&&e!==Mo||s(!0)},i.getChildren=i.getChildren.bind(i),i.getExWin=i.getExWin.bind(i),i.getDragBar=i.getDragBar.bind(i),i.getBubbleBar=i.getBubbleBar.bind(i),i.getMinIcon=i.getMinIcon.bind(i),i.onMount=i.onMount.bind(i),i.bodyEnableScroll=i.bodyEnableScroll.bind(i),i.bodyDisableScroll=i.bodyDisableScroll.bind(i),i}return zt(t,e),t.prototype.componentWillReceiveProps=function(e){var t=this.props;e.width===t.width&&e.height===t.height||null==this.state.top&&null==this.state.left||this.setState(nv(e.width,e.height,e.iframeStyle)),e.unread>t.unread&&this.setState({showMessage:!0}),e.isMinimized&&this.setState({bottom:0,right:0})},t.prototype.componentWillUnmount=function(){if(this.winIframe){var e=this.winIframe.contentWindow;e&&(e.removeEventListener("focus",this.onFocus),e.removeEventListener("blur",this.onBlur)),this.timer&&(clearTimeout(this.timer),this.timer=null),this.bodyEnableScroll()}},t.prototype.onMount=function(e){this.winIframe=e;var t=e.contentWindow;t.addEventListener("focus",this.onFocus),t.addEventListener("blur",this.onBlur),this.props.onMounted&&this.props.onMounted()},t.prototype.getInnerCss=function(){var e=this.props,t=[e.fontCSS,ri(Dn,e.mainColor),_w,".online .chatButton:after,.online .dot__element{","background-color:"+e.mainColor,"}",".offline .chatButton:after,.offline .dot__element{","background-color:#bbb","}",".main-container{background-image:"+(e.background||"#fff")+"}"].join(""),n="";return e.avatar&&(n=".chatButton--avatar:after,.chatButton--minimizedAsChatting:after,.chatButton--maximizedAsChatting:after{background-image:url("+e.avatar+")}"),[t,"@keyframes chatButton--minimizedAsChattingyAxis {0% {transform: scale(0.714, 0.714) translateY(-"+(this.winHeight-135)/.714+"px);}100% {transform: scale(1, 1) translateY(0);}}@keyframes chatButton--minimizedAsChattingxAxis {0% {transform: translateX(-"+(this.winWidth-145)/.714+"px);}100% {transform: translateX(0);}}@keyframes chatButton--minimizedAsChattingyAxisCircle {0% {transform: scale(1.214, 1.214) translateY(-"+(this.winHeight-105)/1.214+"px);}100% {transform: scale(1, 1) translateY(0);}}@keyframes chatButton--minimizedAsChattingxAxisCircle {0% {transform: translateX(-"+(this.winWidth/2-65)/1.214+"px);}100% {transform: translateX(0);}}@keyframes chatButton--maximizedAsChattingxAxis {0% {transform: translateX(0);}100% {transform: translateX(-"+(this.winWidth-145)/.714+"px);}}@keyframes chatButton--maximizedAsChattingyAxis {0% {transform: scale(1, 1) translateY(0);}100% {transform: scale(0.714, 0.714) translateY(-"+(this.winHeight-135)/.714+"px);}}@keyframes chatButton--maximizedAsChattingxAxisCircle {0% {transform: translateX(0);}100% {transform: translateX(-"+(this.winWidth/2-65)/1.214+"px);}}@keyframes chatButton--maximizedAsChattingyAxisCircle {0% {transform: scale(1, 1) translateY(0);}100% {transform: scale(1.214, 1.214) translateY(-"+(this.winHeight-30-35-35)/1.214+"px);}}",n,e.customCss]},t.prototype.getChildren=function(e){var t=this.props,i=t.windowStatus,o=t.isMobile,r=t.title,a=t.isRightToLeft,s=t.isPoppedOut,c=t.windowStyle,d=t.children,l=t.windowTab,u=t.chatStatus,p=t.isIPad,f=i===Eo,h=i===Ro,m=i===Mo;return n($w,{show:f||h||m,windowStatus:i,isMobile:o,title:r,isRightToLeft:a,isPoppedOut:s,windowStyle:c,windowTab:l,chatStatus:u,isIPad:p,env:e,onUnmount:this.bodyEnableScroll,onMount:this.bodyDisableScroll},d)},t.prototype.getExWin=function(e,t){var i=this.props,o=i.expandWindow,r=i.fontCSS,a=i.onFocusToggle,s=tv,c=void 0;return o&&(s=this.getExWinStyle(e,t),c=n(o,{ToogleChatWinFocused:a})),n(Xh,{key:"exWin",id:"extend_window_container",style:s,innerCss:[r,"@font-face{font-family:\"SourceSans Pro\";src:url(fonts/SourceSansPro-Regular.woff) format('woff'),url(fonts/SourceSansPro-Regular.ttf) format('truetype'),url(fonts/SourceSansPro-Regular.svg#SourceSans-Pro) format('svg')}@font-face{font-family:\"SourceSans Pro Italic\";src:url(fonts/SourceSansPro-It.woff) format('woff'),url(fonts/SourceSansPro-It.ttf) format('truetype'),url(fonts/SourceSansPro-It.svg#SourceSans-Pro-Italic) format('svg')}@font-face{font-family:\"SourceSans Pro Bold\";src:url(fonts/SourceSansPro-Semibold.woff) format('woff'),url(fonts/SourceSansPro-Semibold.ttf) format('truetype'),url(fonts/SourceSansPro-Semibold.svg#SourceSans-Pro-Semibold) format('svg')}@font-face{font-family:\"SourceSans Pro Light\";src:url(fonts/SourceSansPro-Light.woff) format('woff'),url(fonts/SourceSansPro-Light.ttf) format('truetype'),url(fonts/SourceSansPro-Light.svg#SourceSans-Pro-Light) format('svg')}html{margin:0;font-size:15px}*,::after,::before{box-sizing:border-box}body{margin:0;font-family:\"SourceSans Pro\",Arial;font-size:1em;line-height:1.42857143}.clearfix::after{content:\"\";display:block;clear:both}.expandWindow{position:absolute;width:100%;bottom:0;top:0;left:0;box-shadow:0 0 45px rgba(0,0,0,.2)}.expandWindow--embedded{width:calc(100% - 30px);bottom:30px;top:30px;left:30px}.expandWindow--circle{padding-right:20px;top:45px}.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;position:absolute;left:0;overflow:hidden}.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:100px;height:100px;background-color:#fff;border-radius:100%;border:none}.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.2em;color:#fff;padding:20px 0 15px}.mediaChatWindow__waiting{font-size:.93em;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:.93em;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:310px}.mediaChatWindow__button{width:55px;height:55px;border-radius:50%;font-size:2.33em;color:#fff;display:inline-block;margin:0 48px;line-height:55px;cursor:pointer;transition:opacity .3s}.mediaChatWindow__button svg{width:55px;height:55px}.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__button--accept{background:url(images/phone-accept.svg) center no-repeat}.mediaChatWindow__button--hangup{background:url(images/phone-refuse.svg) center no-repeat}.mediaChatWindow--audioChatting .mediaChatWindow__button--accept,.mediaChatWindow--audioIncoming .mediaChatWindow__textVideo,.mediaChatWindow--audioRequesting .mediaChatWindow__button--accept,.mediaChatWindow--audioRequesting .mediaChatWindow__textVideo,.mediaChatWindow--videoChatting .mediaChatWindow__button--accept,.mediaChatWindow--videoIncoming .mediaChatWindow__textAudio,.mediaChatWindow--videoRequesting .mediaChatWindow__button--accept,.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:20px 0;position:relative}.mediaChatWindow__chattingAgent{color:#fff;float:left}.mediaChatWindow__chatting .mediaChatWindow__agentName{font-size:1.2em;color:#fff}.mediaChatWindow--videoChatting .mediaChatWindow__chatting{display:-webkit-box;display:-ms-flexbox;display:flex}.mediaChatWindow--videoChatting .mediaChatWindow__chattingAgent{position:absolute;left:20px;top:25px;text-align:left}.mediaChatWindow--videoChatting .mediaChatWindow__buttons{position:absolute;bottom:25px;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:.93em;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--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:.93em;padding-right:10px}.mediaChatWindow--audioChatting video{display:none}.mediaChatWindow__remoteVideo:hover .mediaChatWindow__buttons{display:block}.mediaChatWindow__remoteVideo{width:100%;height:100%}.mediaChatWindow__localVideo{position:absolute;right:20px;top:25px;width:80px;border:1px solid #ddd}.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;right:30px;bottom:30px}.mediaChatWindowSwitch__element{float:left;width:85px;background:rgba(0,0,0,.3);color:#fff;height:35px;cursor:pointer;text-align:center}.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}.mediaChatWindowSwitch__messageCount{position:relative;left:5px;top:-7px;display:inline-block;width:auto;min-width:14px;height:14px;line-height:14px;font-size:.8em;background:#d34747;border-radius:14px}.mediaChatWindowSwitch__active{background:rgba(0,0,0,.6);cursor:default}.mediaChatWindowSwitch__element .icon{font-size:1.06em;margin-top:9px}.expandWindow--mobile{width:100%;top:0;left:0;bottom:35px}.expandWindow--mobile .mediaChatWindowSwitch{position:fixed;bottom:0;width:100%;right:0;display:-webkit-box;display:-ms-flexbox;display:flex}.expandWindow--mobile .mediaChatWindow{background:rgba(0,0,0,.7)}.expandWindow--mobile .mediaChatWindowSwitch__element{border-radius:0;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;background:rgba(0,0,0,.5)}.expandWindow--mobile .mediaChatWindowSwitch__active{background:rgba(0,0,0,.7)}@-webkit-keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,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}"]},c)},t.prototype.getDragBar=function(){var e=this,t=this.props,i=t.windowStyle,o=t.windowStatus,r=t.isPoppedOut,a=t.width,s=t.height,c=o===Ro||o===Mo,d="bubble"===i;if(!c||r||d)return null;var l=i===ys,u=30;return l||(u=45),n(Qw,{barWidth:this.winWidth-60-85,ifrOffsetTop:u,width:a,height:s,right:this.state.right,bottom:this.state.bottom,ifrWidth:this.winWidth,ifrHeight:this.winHeight,ifrPositionChanged:function(t,n){e.setState({bottom:n,right:t,left:null,top:null})}})},t.prototype.getBubbleBar=function(){var e=this,t=this.props,i=t.unread,o=t.windowStatus,r=t.lastMessage,a=t.writeReply,s=t.agentName,c=t.windowStyle,d=t.onCloseBubble,l=t.onMaximize,u=o===Oo,p=i>0;return this.state.showMessage&&u&&p?n(xw,{invitation:{winType:c,ifShow:!0,type:zo,message:r,textTypeHere:a,agentName:s},onAccept:l,onRefuse:function(){e.setState({showMessage:!1,invHeight:0}),d()},onHeightChange:function(t){e.setState({invHeight:t})}}):null},t.prototype.getMinIcon=function(){var e=this.props,t=e.windowStatus,i=e.windowStyle,o=e.avatar,r=e.unread,a=e.onMaximize,s=e.onMinimized,c=e.onOpened,d=e.isMobile,l=t===Oo,u=t===Eo,p=t===Po;return l||p||u?n(uw,{isMobile:d,windowStyle:i,avatar:o,onClick:a,count:l?r:void 0,status:t,onMinimized:s,onOpened:c,online:!0}):null},t.prototype.bodyDisableScroll=function(){if(this.props.isMobile){var e=document.body.style;this.style=Object.keys(Kw).reduce(function(t,n){var i=t;return i[n]=e[n],e[n]=Kw[n],i},{}),document.addEventListener("touchmove",mn)}},t.prototype.bodyEnableScroll=function(){var e=this;this.props.isMobile&&(Object.keys(this.style||{}).forEach(function(t){document.body.style[t]=e.style[t]}),document.removeEventListener("touchmove",mn))},t.prototype.render=function(){var e=this.props,t=e.windowStatus,i=e.isMobile,o=e.width,r=e.height,a=e.orientation,s=e.isIPad,c=e.title,d=e.isPoppedOut,l=Zw;i&&("landscape"===a&&(!s||o<760)?l=Jw:"portrait"===a&&(!s||r<760)&&(l=Xw)),this.setWinSize(l,s);var u=t===Oo,p=l!==Zw&&!u,f=this.getWinStyle(l,s);if(u){var h=this.state.invHeight;f=h?Dt({},f,{width:290,height:Math.min(h+130,r)}):Dt({},f,{width:130,height:130}),f.left="",f.top=""}var m=this.getInnerCss(),b=void 0;return p&&(b=ev),n("div",{style:b,onTouchMove:mn},this.getExWin(l,s),this.getDragBar(l),n(Xh,{key:"win",id:"chat_window_container",onMounted:this.onMount,style:f,innerCss:m,callback:this.updateIframe(l)},!d&&n(Yw,{message:c}),this.getChildren(l),this.getBubbleBar(),this.getMinIcon()))},t}(I);ov.propTypes={width:Ih.number.isRequired,height:Ih.number.isRequired,windowStatus:Ih.oneOf(Object.keys(Wo).map(function(e){return Wo[e]})).isRequired,isMobile:Ih.bool.isRequired,isIPad:Ih.bool.isRequired,lastMessage:Ih.string,agentName:Ih.string,avatar:Ih.string,writeReply:Ih.string.isRequired,onMounted:Ih.func,onMaximize:Ih.func.isRequired,onCloseBubble:Ih.func.isRequired,onOpened:Ih.func.isRequired,onMinimized:Ih.func.isRequired,mainColor:Ih.string.isRequired,background:Ih.string,fontCSS:Ih.string.isRequired};var rv=function(e,t){var n=e.contentDocument;if(!n)return 0;var i=n.querySelector("#main");if(!i)return 0;var o=n.querySelector(".footer__operation .bubble-box--show .bubble"),r=i.getBoundingClientRect().height+(t===Zw?30:0);if(o){var a=o.getBoundingClientRect(),s=a.height;r=Math.max(s+108+10,r)}return r},av=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));i.state=Dt({},i.state,{innerHeight:0}),i.updateIframe=Yt(1)(function(e){return function(t){var n=i.props.windowStatus;n!==Po&&n!==Eo||i.setState({innerHeight:1/0}),n!==Ro&&n!==Mo||(i.setState({innerHeight:rv(t,e)}),i.timer&&clearTimeout(i.timer),i.timer=setTimeout(function(){i.setState({innerHeight:rv(t,e)}),i.timer=null},460)),n===Oo&&i.setState({innerHeight:0})}});i.setWinSize=function(e){e===Zw&&(i.winWidth=380,i.winHeight=Math.min(i.props.height,i.state.innerHeight)),e===Jw&&(i.winWidth=Math.min(500,i.props.width),i.winHeight=Math.min(i.state.innerHeight,i.props.height)),e===Xw&&(i.winWidth=i.props.width,i.winHeight=Math.min(.9*i.props.height,i.state.innerHeight))},i.getWinStyle=function(e){var t=0,n=0,o=void 0,r=void 0;return e===Zw&&(t=i.state.bottom,n=i.state.right,o=i.state.left,r=i.state.top),{position:"fixed",border:0,zIndex:tw,top:r,left:o,bottom:t,right:n,width:i.winWidth,height:i.winHeight}},i.getExWinStyle=function(e,t){if(e===Zw&&!t)return{zIndex:ow,width:530,height:480,bottom:i.state.bottom,right:i.state.right+i.winWidth,background:"transparent",position:"fixed",border:0,maxWidth:500};var n=i.props.showChatWindowInExpandwindow;return{zIndex:ow,width:i.winWidth,height:n?35:i.winHeight,right:0,bottom:i.state.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 zt(t,e),t}(ov),sv=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.setWinSize=function(e){var t=i.props.iframeStyle,n=t&&t.width,o=t&&t.height;e===Zw&&(i.winWidth=n||420,i.winHeight=o||610),e===Jw&&(i.winWidth=Math.min(500,i.props.width),i.winHeight=i.props.height),e===Xw&&(i.winWidth=i.props.width,i.winHeight=Math.min(.9*i.props.height))},i.getWinStyle=function(){return{position:"fixed",border:0,zIndex:i.props.isMobile?tw:ow,top:i.state.top,left:i.state.left,bottom:i.state.bottom,right:i.state.right,width:i.winWidth,height:i.winHeight}},i.getExWinStyle=function(e,t){if(e===Zw){var n=i.winHeight;if(t){n=i.props.showChatWindowInExpandwindow?35:i.winHeight}return{zIndex:t?ow:tw,width:t?i.winWidth:530,height:n,bottom:i.state.bottom,right:t?i.state.right:i.winWidth+i.state.right-50,background:"transparent",position:"fixed",border:0}}var o=i.props.showChatWindowInExpandwindow;return{zIndex:ow,width:i.winWidth,height:o?35:i.winHeight,right:0,bottom:i.state.bottom,background:"transparent",position:"fixed",border:0}},i}return zt(t,e),t}(ov),cv=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.setWinSize=function(e){var t=i.props.iframeStyle,n=t&&t.width,o=t&&t.height;e===Zw&&(i.winWidth=n||460,i.winHeight=o||620),e===Jw&&(i.winWidth=Math.min(500,i.props.width),i.winHeight=i.props.height),e===Xw&&(i.winWidth=i.props.width,i.winHeight=Math.min(.9*i.props.height))},i.getWinStyle=function(){return{position:"fixed",border:0,zIndex:tw,top:i.state.top,left:i.state.left,bottom:i.state.bottom,right:i.state.right,width:i.winWidth,height:i.winHeight}},i.getExWinStyle=function(e,t){if(e===Zw){var n=i.winHeight;if(t){n=i.props.showChatWindowInExpandwindow?35:i.winHeight}return{zIndex:ow,width:t?i.winWidth:530,height:n,bottom:i.state.bottom,right:t?i.state.right:i.winWidth+i.state.right-30,background:"transparent",position:"fixed",border:0}}var o=i.props.showChatWindowInExpandwindow;return{zIndex:ow,width:i.winWidth,height:o?35:i.winHeight,right:0,bottom:i.state.bottom,background:"transparent",position:"fixed",border:0}},i}return zt(t,e),t}(ov),dv=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.setWinSize=function(e,t){i.winHeight="100%";var n=i.props,o="100%";if(i.winZIndex=tw,n.expandWindow&&e===Zw&&!t){var r=n.width;o=r>1e3?r-500:"50%"}i.winWidth=o,i.exWinHeight=n.showChatWindowInExpandwindow?35:i.winHeight},i.getExWinStyle=function(e,t){return{background:"transparent",position:"fixed",border:0,zIndex:ow,width:i.winWidth,height:i.exWinHeight,bottom:0,left:0,maxWidth:e!==Zw||t?"":500}},i.getWinStyle=function(){return{position:"fixed",border:0,zIndex:i.winZIndex,width:i.winWidth,height:i.winHeight,right:0,bottom:0}},i}return zt(t,e),t}(ov),lv=function(e,t){return e&&"bubble"!==t?dv:"bubble"===t?av:t===xs?sv:cv},uv=function(e){var t=e.windowStyle,i=e.isPoppedOut;return n(lv(i,t),e)},pv=Mw(uv),fv=function(e){function t(){Bt(this,t);var n=qt(this,e.call(this));return n.closeBubble=function(e){n.element&&n.element.contains(e.target)||e.target.id===n.props.iconId||e.target.parentNode.id===n.props.iconId||n.props.onClose&&n.props.onClose()},n}return zt(t,e),t.prototype.componentDidMount=function(){var e=this;this.element.ownerDocument.body.addEventListener("click",function(t){e.closeBubble(t)})},t.prototype.componentWillUnmount=function(){this.element.ownerDocument.body.removeEventListener("click",this.closeBubble)},t.prototype.render=function(){var e=this,t=this.props,i=t.id,o=t.showDirection,r=t.className,a=t.children,s=t.ifShow,c=t.onClose,d=t.ifHasClose,l=t.transformOrigin,u=t.arrowDownLeft,p=t.chatWindowStyle;return n("div",{id:"bubble_box_"+i,ref:function(t){e.element=t},className:"bubble-box "+(s?"bubble-box--show":"")+" "+r,onClick:c},n("div",{id:i,className:"bubble bubble-"+o,onClick:function(e){e.stopPropagation()},style:("bubble"===p||p===xs)&&{webkitTransformOrigin:l,msTransformOrigin:l,transformOrigin:l}},("bubble"===p||p===xs)&&"up"===o&&n("span",{className:"bubble__arrowDown",style:{left:u}}),d&&n("div",{className:"bubble-close"},n(mw,{type:hw.close,size:12,onClick:c,color:"#333"})),a))},t}(I);fv.defaultProps={id:"",showDirection:"down",className:"",ifShow:!1,ifHasClose:!1},fv.propTypes={id:Ih.string,iconId:Ih.string,showDirection:Ih.string,className:Ih.string,children:Ih.oneOfType([Ih.string,Ih.element]).isRequired,ifShow:Ih.bool,onClose:Ih.func,ifHasClose:Ih.bool,transformOrigin:Ih.string,arrowDownLeft:Ih.string,chatWindowStyle:Ih.oneOf(["bubble",xs,ys])};var hv=function(e,t,i,o,r,a,s,c){return t&&n("div",{id:e,className:cw("title-buttons__operation",s)},n(mw,{type:i,onClick:a,size:12,title:o}),c)},mv=function(e,t,i,o,r,a){return e&&n("div",{className:cw("title-buttons__operation","title-buttons__operation--text",i),style:r?{}:{borderLeft:"0px"}},n("a",{onClick:o},t),a)},bv=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={showEndChatConfirm:!1},i.onClickShowEndChatConfirm=i.onClickShowEndChatConfirm.bind(i),i.updateEndChatConfirmStatus=i.updateEndChatConfirmStatus.bind(i),i}return zt(t,e),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.updateEndChatConfirmStatus=function(e){this.setState({showEndChatConfirm:e})},t.prototype.render=function(){var e=this,t=this.props,i=t.controls||{},o=t.languages||{},r=n(fv,{ifShow:this.state.showEndChatConfirm,showDirection:"down",onClose:function(){return e.updateEndChatConfirmStatus(!1)}},n("div",{className:"bubble--desc"},o.promptStopChat),n("div",{className:"embedded-end-chatConfirmAction bubble__operation"},n("button",{id:"embedded-end-chatConfirmLeave",className:"btn btn-primary",onClick:function(t){t.stopPropagation(),e.updateEndChatConfirmStatus(!1),e.props.onEndChat(e.props.passEventArgs)}},o.buttonYes),n("button",{id:"embedded-end-chatConfirmCancel",className:"btn btn-grey",onClick:function(){e.updateEndChatConfirmStatus(!1)}},o.buttonNo)));return n("div",{className:"title-buttons window__operation"},hv("",i.hasMinimize,hw.minimize,o.embeddedWindowMinimize,t.ifViewHeader&&t.color,t.onMinimize),hv("embedded-popup",i.hasPopOut,hw.popup,o.embeddedWindowPopup,t.ifViewHeader&&t.color,function(){return t.onPopOut(t.passEventArgs)}),hv("",i.hasPopIn,hw.embedded,o.embeddedWindowPopin,t.ifViewHeader&&t.color,function(){return t.onPopIn(t.passEventArgs)}),hv("",i.hasClose,hw.close,o.buttonClose,t.ifViewHeader&&t.color,function(){t.onClose(t.passEventArgs)},"embedded-only btn-close"),hv("",i.hasEndChat,hw.close,o.buttonEndChat,t.ifViewHeader&&t.color,this.onClickShowEndChatConfirm,"btn-end-chat embedded-end-chat",r),mv(i.hasTextEndChat,o.buttonEndChat,"btn-end-chat",this.onClickShowEndChatConfirm,i.hasPopIn,r),mv(i.hasTextClose,o.buttonClose,null,function(){return t.onClose(t.passEventArgs)},i.hasPopIn))},t}(I),gv={},wv=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));i.state={};var o=n.src;return i.download=i.download.bind(i),i.download(o),i}return zt(t,e),t.prototype.componentWillReceiveProps=function(e){e.src!==this.props.src&&this.download(e.src)},t.prototype.shouldComponentUpdate=function(e,t){return this.props.src!==e.src||t.src!==this.state.src},t.prototype.download=function(e){var t=gv[e];0===e.indexOf("data:image")&&(t=e),t||(t=new Promise(function(t){var n=new Image;n.onload=function(){t(e)},n.onerror=function(){gv[e]=e,t(e)},n.src=e}),gv[e]=t),this.setState({src:t})},t.prototype.render=function(){var e=this,t=this.state.src,i=this.props;return t?"string"!=typeof t?(t.then(function(t){e.setState({src:t})}),null):n("img",Dt({},i,{alt:i.alt,src:t})):n("img",i)},t}(I),vv=Og("header.icons")(bv),yv=function(e){function t(){Bt(this,t);var n=qt(this,e.call(this));return n.state={showEndChatConfirm:!1,headerHeight:0},n.header=null,n.shuoldUpdateHeaderHeight=!1,n.shouldComponentUpdate=Hh(n,["passEventArgs","ifViewConfirmBubble","ifHideBio","ifViewHeaderBox","ifViewHeader","color","onMinimize","team","avatars","banner","avatar","name","title","bio","logo","tab","controls","languages","agent","windowDisabled"],["showEndChatConfirm","headerHeight"]),n.onMinimize=n.onMinimize.bind(n),n.onClose=n.onClose.bind(n),n.showAnimation=!0,n}return zt(t,e),t.prototype.componentWillReceiveProps=function(e){if(e.tab===Yr&&this.props.tab!==Yr&&(this.showAnimation=!0),e.windowStatus===Mo&&this.props.windowStatus===Po){var t=e.agent;this.showAnimation=!(t&&t.avatar)}var n=e.agent&&e.agent.bio,i=this.props.agent&&this.props.agent.bio;(e.ifHideBio!==this.props.ifHideBio||this.props.windowDisabled&&n!==i)&&(this.shuoldUpdateHeaderHeight=!0)},t.prototype.componentDidUpdate=function(){var e=this;window.navigator.userAgent.toLowerCase().indexOf("msie 9.0")>=0||this.header&&this.shuoldUpdateHeaderHeight&&(this.shuoldUpdateHeaderHeight=!1,this.props.agent&&this.props.agent.bio?this.props.ifHideBio?this.header.style.height=(this.props.chatWindowStyle===ys?80:130)+"px":this.props.windowDisabled?setTimeout(function(){e.header.style.height=e.header.scrollHeight+"px"},400):this.header.style.height=this.header.scrollHeight+"px":this.props.windowDisabled&&this.props.agent?this.header.style.height=(this.props.chatWindowStyle===ys?80:130)+"px":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,i=this.props,o=i.agent,r=i.windowStatus,a=r===Eo,s=this.showAnimation;return n("div",{className:"window__headerContainer",onTouchMove:mn},t.ifViewHeader&&n("div",{id:"branding",className:cw("window__header","window__header--noBio",s&&"window__header--fadeInDown"),ref:function(t){t&&(e.header=t)}},t.ifViewHeaderBox&&n("div",null,n("div",{className:"window__headerBox clearfix"},t.team&&n("div",{className:cw("header__teamName",!t.avatars&&"header__teamNameNoAvatar")},t.team),t.avatars&&n("div",{className:cw("header__teamAvatar",t.isAvatarGray&&"header__teamAvatar--gray")},t.avatars.map(function(e){}),t.avatars.map(function(e){return n(wv,{className:"header__teamAvatarImg",src:e,width:"50",height:"50",alt:""})})),t.banner&&n(wv,{className:"header__bannerImg",src:t.banner,alt:""}),o&&n("div",{className:cw("header__agent",t.logo?"header__agent--withlogo":"",o.bio&&t.ifHideBio?"header__agent--compact":"",s&&"header__agent--fadeInUp"),onClick:function(){t.ifHideBio&&e.props.onUpdateScrollStatus(!1)},onTouchEnd:function(){t.ifHideBio&&e.props.onUpdateScrollStatus(!1)}},o.avatar&&n("div",{id:"header-operator-avatar",className:cw("header__avatar",s&&"header__avatar--fadeInDown")},!a&&n(wv,{className:"header__avatarImage",src:o.avatar,alt:"",width:"50",height:"50"})),n("div",{className:cw("header__agentInfo",!o.avatar&&"header__agentInfoNoAvatar")},o.name&&n("div",{className:"direction-ltr header__agentName"},o.name),o.title&&n("div",{className:"direction-ltr header__agentTitle"},o.title),o.bio&&n("div",{className:"header__agentBio",style:{height:t.ifHideBio?"0":"auto"},dangerouslySetInnerHTML:{ __html:o.bio}}))),t.logo&&n("div",{className:"header__logo "+(o&&(o.avatar||o.name)?"header__logo--up":"")},n(wv,{id:"logo-image",className:"header__logoImg",src:t.logo,alt:""}))))),n("div",{className:"end-chat-top window__title"},n("span",{id:"embedded-window-title",className:"title-text embedded-only"}),n(vv,{tab:t.tab,controls:t.controls,languages:t.languages,passEventArgs:t.passEventArgs,ifViewConfirmBubble:t.ifViewConfirmBubble,onEndChat:t.onEndChat,ifViewHeader:t.ifViewHeader,color:t.color,onMinimize:this.onMinimize,onPopOut:t.onPopOut,onPopIn:t.onPopIn,onClose:this.onClose})))},t}(I);yv.protoTypes={onClose:Ih.func,onPopOut:Ih.func,onPopIn:Ih.func,onMinimize:Ih.func,controls:Ih.shape({hasMinimize:Ih.bool,hasPopIn:Ih.bool,hasPopOut:Ih.bool,hasEndChat:Ih.bool,hasClose:Ih.bool,hasTextEndChat:Ih.bool,hasTextClose:Ih.bool}).isRequired,team:Ih.oneOfType([Ih.string,Ih.bool]),banner:Ih.oneOfType([Ih.string,Ih.bool]),logo:Ih.oneOfType([Ih.string,Ih.bool]),avatars:Ih.oneOfType([Ih.arrayOf(Ih.string),Ih.bool]),isAvatarGray:Ih.bool,chatWindowStyle:Ih.oneOf(Object.keys(Cs).map(function(e){return Cs[e]})),ifViewConfirmBubble:Ih.bool,agent:Ih.oneOfType([Ih.shape({name:Ih.string.isRequired,title:Ih.oneOfType([Ih.string,Ih.bool]),avatar:Ih.oneOfType([Ih.string,Ih.bool]),bio:Ih.oneOfType([Ih.string,Ih.bool])}),Ih.bool]),languages:Ih.shape({}).isRequired,passEventArgs:Ih.shape({}),isViewBio:Ih.bool,tab:Ih.oneOf(Object.keys(Xr).map(function(e){return Xr[e]}))};var xv,_v=Og("header","window__headerVessel")(yv),Cv=(xv={},xv[Yr]="livechat.chat",xv[Gr]="livechat.prechat",xv[Qr]="livechat.postChat",xv[Jr]="livechat.offlineMessage",xv),kv=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)}},Sv=function(e,t){return{team:t.header.showTeam&&t.languages.teamName,avatars:t.header.showAvatars&&cl(e)}},Av=function(e,t,n){return{agent:kv(Pc(e)||Mc(e),t.header,n)}},Tv=function(e){return{banner:e.header.banner}},Iv=function(e,t){return{logo:t.header.logo}},Rv=function(e,t){return t.header.showAvatar||t.header.logo?{logo:t.header.logo,agent:Av(e,t).agent}:{ifViewHeaderBox:!1}},Pv=function(e,t,n){var i=Vc(t);return"agent"===e?Av(t,n,!1):i&&"banner"===e?Av(t,n,!0):"logo"===e?Rv(t,n):"banner"===e?Tv(n):{}},Mv=function(e,t,n){return"agent"===e?Sv(t,n):"logo"===e?Iv(0,n):"banner"===e?Tv(n):{}},Ov=function(e,t,n){if("bubble"===e)return{ifViewHeader:!1};var i=Tc(t),o=hd(t),r=n.header.type;return i.tab===Yr&&(o||i.isChatBot)&&(i.chatStatus===Kr||i.chatStatus===ea||i.chatStatus===$r&&"manualInvitation"===lc(t)||i.isChatBot)||i.tab===Qr?Pv(r,t,n):Mv(r,t,n)},Ev=function(e){var t=Nc(e),n=Rc(e),i=t===Yr&&n===Kr,o=Os(e),r=Ns(e);return{hasMinimize:!o,hasClose:!(r&&i||o),hasEndChat:r&&i&&!o,hasTextEndChat:r&&i&&o,hasTextClose:(!r||!i)&&o,hasPopOut:!o,hasPopIn:au(e)}},Nv=function(e){var t=Nc(e),n=Dc(e),i=Ol(e,n.id),o=oc(e);return Object.assign({tab:t,controls:Ev(e),windowDisabled:Pd(e),chatWindowStyle:i,isAvatarGray:t===Jr,ifViewConfirmBubble:t!==Qr,ifHideBio:Ad(e),isPopout:Os(e),languages:n.languages,ifViewHeader:!0,ifViewHeaderBox:!0,color:Hl(e),windowStatus:o},Ov(i,e,n))},Wv=function(e){return{onEndChat:function(){e(qp())},onClose:function(t){var n=Cv[t];n&&Of(n+".close"),e(Au())},onMinimize:function(t){var n=Cv[t];n&&Of(n+".minimize"),e(ku())},onPopIn:function(){e(wp())},onPopOut:function(){e(gp())},onUpdateScrollStatus:function(t){e(hp(t))}}},Bv=xg(Nv,Wv)(_v),Dv=function(e){return n("div",{className:"poweredby"},n("a",{rel:"noopener noreferrer",onClick:function(e){e.target.blur()},target:"_blank",href:e.poweredByUrl},"Powered by Comm100"))},zv=Og("footer.poweredby")(Dv),jv=function(e){return n("div",{className:"footer window__footer",style:e.style,onTouchMove:mn},e.showChatWithAgent&&n("div",{onClick:e.onChatWithAgentClick,className:"window__chatWithAgent window__chatWithAgent--bottom"},n("i",{className:"icon icon-bubble"}),e.chatWithAgentText),e.icons&&n(e.icons),e.poweredByUrl&&n(zv,e))};jv.protoTypes={poweredByUrl:Ih.string.isRequired,icons:Ih.func};var qv=Og("footer")(jv),Lv=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={isShow:n.isShow},i.timer=null,i.footerOperation=null,i.shouldComponentUpdate=Hh(i,["isShow","icons","windowDisabled"],["isShow"]),i}return zt(t,e),t.prototype.componentDidMount=function(){var e=this;this.timer=this.props.isShow&&setTimeout(function(){e.setState({isShow:!1})},333)},t.prototype.componentWillUnmount=function(){this.timer&&clearTimeout(this.timer)},t.prototype.render=function(){var e=this,t=this.props;return n("div",{ref:function(t){e.footerOperation=t},className:cw("footer__operation",this.state.isShow?"footer__operation--show":"")},n("ul",{className:"clearfix"},t.icons&&t.icons.map(function(e){return n(e.component,Object.assign(e.props,{onIconSelected:t.onIconSelected,windowDisabled:t.windowDisabled}))})))},t}(I);Lv.protoTypes={isShow:Ih.bool,onIconSelected:Ih.func,windowDisabled:Ih.bool,icons:Ih.arrayOf(Ih.shape({component:Ih.func.isRequired,props:Ih.shape({onClick:Ih.func,disable:Ih.bool,active:Ih.bool,color:Ih.string})}))};var Vv=Og("footer.toolbar")(Lv),Fv=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={rateVal:n.rateVal},i.clickChange=i.clickChange.bind(i),i}return zt(t,e),t.prototype.componentWillReceiveProps=function(e){this.setState({rateVal:e.rateVal})},t.prototype.clickChange=function(e){this.setState({rateVal:e}),this.props.rateChange(e)},t.prototype.render=function(){var e=this,t=[];return t=this.props.ifCanHalfRate?this.props.rateItems.map(function(t){return n("div",{id:"rateItem-"+t.id,key:t.id,role:"button",tabIndex:t.id,className:cw(e.state.rateVal>=t.value?"star animate":"star",e.state.starParentClicked&&e.state.rateVal>t.value-1&&e.state.rateVal<=t.value?"selected icon icon-rating-full isAnimated pulse":"selected icon icon-rating-full"),onClick:function(){e.starClickChange(t.value)}},n("span",{role:"button",tabIndex:t.id,className:cw("half icon icon-rating-half",e.state.rateVal>=t.value-.5&&"starColour"),"data-value":t.value-.5,onMouseOver:function(){return e.hoverChange(t.value-.5)},onMouseOut:1===t.value?function(){return e.hoverChange("0")}:function(){},onClick:function(){return e.clickChange(t.value-.5)}}),n("span",{role:"button",tabIndex:t.value,className:e.state.rateVal>=t.value?"full icon icon-rating-full starColour":"full icon icon-rating-full","data-value":t.value,onMouseOver:function(){return e.hoverChange(t.value)},onClick:function(){return e.clickChange(t.value)}}))}):this.props.rateItems.map(function(t){return n("div",{key:t.id,id:"rateItem-"+t.id,role:"button",tabIndex:t.id,className:cw("star selected icon icon-rating-full",e.state.rateVal>=t.value?"animate":"")},n("span",{role:"button",tabIndex:t.id,className:"full icon icon-rating-full","data-value":t.value,onClick:function(){return e.clickChange(t.value)},title:t.label}))}),n("div",{className:"rating","data-vote":"0",style:Object.assign({width:this.props.width,height:this.props.height},this.props.style),onFocus:this.props.onFocus,onBlur:this.props.onBlur},t,this.props.children)},t}(I);Fv.defaultProps={rateVal:0,rateItems:[{id:1,value:1,label:"Poor"},{id:2,value:2,label:"Fair"},{id:3,value:3,label:"Good"},{id:4,value:4,label:"VeryGood"},{id:5,value:5,label:"Excellent"}],ifCanHalfRate:!1,starBackgroundColor:"#c8c8c8",starColor:"#ffd051"},Fv.propTypes={rateVal:Ih.number,rateItems:Ih.arrayOf({id:Ih.number,value:Ih.number}),rateChange:Ih.func,ifCanHalfRate:Ih.bool,starBackgroundColor:Ih.string,starColor:Ih.string,width:Ih.string,height:Ih.string,onFocus:Ih.func,onBlur:Ih.func};var Uv=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.shouldComponentUpdate=Hh(i,["input.value","meta.touched","meta.invalid","focused","isDisabled"]),i}return zt(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,i=t.input,o=t.rows,r=t.cols,a=t.style,s=t.isDisabled,c=t.placeholder,d=t.maxLength,l=t.className,u=t.meta;return n("textarea",Dt({},i,{cols:r,rows:o,style:a,disabled:!!s&&"disabled",className:cw(l,"multipleText",u.touched&&u.invalid&&"error"),placeholder:c,maxLength:d,ref:function(t){e.element=t}}))},t}(I);Uv.propTypes={style:Ih.shape({}),rows:Ih.string,cols:Ih.string,isDisabled:Ih.bool,placeholder:Ih.string,className:Ih.string,maxLength:Ih.number,input:Ih.object.isRequired,meta:Ih.object.isRequired,focused:Ih.bool};var Hv={large:"btn-lg",small:"btn-sm"},Gv={primary:"btn-primary",default:"btn-default",gray:"btn-gray",noborder:"btn-noborder"},Yv=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.shouldComponentUpdate=Hh(i,["disabled","text","className","loading","size","icon","iconPosition","type","children"]),i}return zt(t,e),t.prototype.render=function(){var e=this.props,t=e.disabled,i=e.text,o=e.onClick,r=e.className,a=e.htmlType,s=e.loading,c=e.size,d=e.icon,l=e.iconPosition,u=e.type,p=e.children,f=jt(e,["disabled","text","onClick","className","htmlType","loading","size","icon","iconPosition","type","children"]),h=Hv[c]||"",m=Gv[u]||"btn-default",b=null;return s||d&&(b=d),n("button",Dt({},f,{className:cw("btn",t&&"disabled",h,m,r),disabled:!!t&&"disabled",onClick:t?void 0:o,type:a}),"right"!==l&&b,"right"!==l&&p,i&&n("span",null,i),"right"===l&&p,"right"===l&&b)},t}(I);Yv.propTypes={type:Ih.oneOf(["primary","default","gray","noborder"]),text:Ih.string,disabled:Ih.bool,onClick:Ih.func,className:Ih.string,iconPosition:Ih.oneOf(["left","right"]),icon:Ih.element,loading:Ih.bool,size:Ih.oneOf(["large","default","small"]),htmlType:Ih.oneOf(["submit","button","reset"]),children:Ih.oneOfType([Ih.arrayOf(Ih.element),Ih.element,Ih.string])},Yv.examples={DefaultExample:{description:"Loading Example",component:n(Yv,{text:"Click Me!",loading:!0,iconPosition:"right"})},GrayButton:{description:"Gray Button",component:n(Yv,{type:"gray",text:"Log In"})}};var Qv="bubbleline",Jv=function(e){function t(){Bt(this,t);var n=qt(this,e.call(this));return n.state={someKey:"someValue"},n}return zt(t,e),t.prototype.render=function(){var e=this.props,t=e.disabled,i=e.color,o=e.className,r=e.type,a=e.active,s=e.onClick,c=jt(e,["disabled","color","className","type","active","onClick"]),d=void 0;switch(r){case"rating":d=[n("path",{key:"svgRatePath1",className:"svgPath footer__svgRatePath1",d:"M11.9,14.7c-0.1,0-0.1,0-0.2,0l-3.7-1.8l-3.7,1.8c-0.2,0.1-0.3,0.1-0.4, 0c-0.1-0.1-0.2-0.3-0.2-0.4L4.3,10l-3-3.2C1.3,6.6,1.3,6.5,1.3,6.4c0.1-0.2,0.2-0.3, 0.4-0.3l4-0.8l2-3.8C7.7,1.3,7.8,1.3,8,1.3l0,0c0.2,0,0.3,0.1,0.4,0.3l2,3.8l4,0.8 c0.2,0,0.3,0.2,0.4,0.3c0.1,0.2,0,0.3-0.1,0.4l-2.8,3.1l0.5,4.3c0,0.2-0.1,0.3-0.2, 0.4C12.1,14.7,12,14.7,11.9,14.7L11.9,14.7z"}),n("path",{key:"svgRatePath2",className:"svgPath footer__svgRatePath2",d:"M11.9,14.7c-0.1,0-0.1,0-0.2,0l-3.7-1.8l-3.7,1.8c-0.2,0.1-0.3, 0.1-0.4,0c-0.1-0.1-0.2-0.3-0.2-0.4L4.3,10l-3-3.2C1.3,6.6,1.3,6.5,1.3,6.4c0.1-0.2, 0.2-0.3,0.4-0.3l4-0.8l2-3.8C7.7,1.3,7.8,1.3,8,1.3l0,0c0.2,0,0.3,0.1,0.4,0.3l2,3.8l4, 0.8c0.2,0,0.3,0.2,0.4,0.3c0.1,0.2,0,0.3-0.1,0.4l-2.8,3.1l0.5,4.3c0,0.2-0.1,0.3-0.2, 0.4C12.1,14.7,12,14.7,11.9,14.7L11.9,14.7z"})];break;case"sendfile":d=[n("path",{key:"svgPathSendFile1",className:"svgPath footer__svgPathSendFile1",d:"M8.4,5.1c0,0-2.8,3-3.1,3.3C5,8.7,4.9,9.1,5,9.4c0.1,0.4,0.9,1.2,1.1,1.3c0.6,0.4, 1,0,1.5-0.4s5.1-5.1,5.4-5.5s0.7-1.1,0.5-1.9c-0.1-0.5-1.3-2-2.1-2.2c-0.8-0.2-1.4,0-2.1, 0.6C8.6,1.8,2.8,8,2.4,8.4s-0.9,1-0.9,2s1,3.7,3.6,4.1c1,0.1,1.7-0.4,2-0.8c0.4-0.5, 4.6-4.8,4.6-4.8"}),n("path",{key:"svgPathSendFile2",className:"svgPath footer__svgPathSendFile2",d:"M8.4,5.1c0,0-2.8,3-3.1,3.3C5,8.7,4.9,9.1,5,9.4c0.1,0.4,0.9,1.2,1.1,1.3c0.6,0.4,1,0, 1.5-0.4s5.1-5.1,5.4-5.5s0.7-1.1,0.5-1.9c-0.1-0.5-1.3-2-2.1-2.2c-0.8-0.2-1.4,0-2.1,0.6C8.6, 1.8,2.8,8,2.4,8.4s-0.9,1-0.9,2s1,3.7,3.6,4.1c1,0.1,1.7-0.4, 2-0.8c0.4-0.5,4.6-4.8,4.6-4.8"})];break;case"videochat":d=[n("path",{key:"svgPathVideo1",className:"svgPath footer__svgPathVideo1",d:"M12.6,6.4h-0.8V4.2c0,0-0.1-0.9-0.9-0.9c0,0-8.7,0-9.4,0S0.5,3.7,0.5,4.5s0,7.3, 0,7.3s0.1,0.9,0.8,0.9h9.4c0,0,0.9-0.2,0.9-0.9v-1.5h0.9l2.8,2.4V4.2L12.6,6.4z"}),n("circle",{key:"svgPathVideo2",className:"svgPath footer__svgPathVideo2",cx:"2.5",cy:"5.5",r:"0.5"}),n("circle",{key:"svgPathVideo3",className:"svgPath footer__svgPathVideo2",cx:"4.5",cy:"5.5",r:"0.5"}),n("path",{key:"svgPathVideo4",className:"svgPath footer__svgPathVideo3",d:"M12.6,6.4h-0.8V4.2c0,0-0.1-0.9-0.9-0.9c0,0-8.7,0-9.4,0S0.5,3.7,0.5,4.5s0,7.3, 0,7.3s0.1,0.9,0.8,0.9h9.4c0,0,0.9-0.2,0.9-0.9v-1.5h0.9l2.8,2.4V4.2L12.6,6.4z"})];break;case"voicechat":d=[n("path",{key:"svgPathVoice1",className:"svgPath footer__svgPathVoice1",d:"M8,9.3c1.4,0,2.5-1.1,2.5-2.5V4.4C10.5,3,9.4,1.8,8,1.8S5.5,3,5.5,4.4v2.5C5.5, 8.1,6.6,9.3,8,9.3z"}),n("path",{key:"svgPathVoice2",className:"svgPath footer__svgPathVoice2",d:"M8,9.3c1.4,0,2.5-1.1,2.5-2.5V4.4C10.5,3,9.4,1.8,8,1.8S5.5,3,5.5,4.4v2.5C5.5, 8.1,6.6,9.3,8,9.3z"}),n("path",{key:"svgPathVoice3",className:"svgPath footer__svgPathVoice3",d:"M12.5,6.9c-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.5c0,0-0.5,0-0.5,0.5c0,3,1.3,4.2,4.1,4.6c0,0.3,0,2,0,2H4.7C4.3,14,4, 14,4,14.5S4.4,15,4.9,15h6.4c0.4,0,0.7,0,0.7-0.5S11.7,14,11.3,14H9c0,0,0-1.7,0-2 c2.8-0.5,4.1-1.4,4.1-4.3C13,7.6,13.3,6.9,12.5,6.9z"})];break;case"sendemail":d=[n("path",{key:"sendemail1",className:"svgPath footer__sendemail1",d:"M14.7,2c0.1,0,0.2,0.1,0.2,0.1c0.2,0.2,0.2,0.5,0,0.7L8.1,9.8C8,9.9,7.8,9.9,7.7, 9.9c-0.1,0-0.3,0-0.3-0.1L3.1,5.6C2.9,5.4,2.8,5,3,4.9c0.2-0.2,0.5-0.2,0.7,0l3.9, 3.9l6.6-6.6C14.3,2.1,14.4,2,14.6,2c0,0,0,0-0.1,0H1.6C0.7,2,0,2.7,0,3.5 v8.9C0,13.3,0.7,14,1.6,14h12.8c0.9,0,1.6-0.7,1.6-1.5V3.6C16,2.8,15.4,2.1,14.7,2z"}),n("path",{key:"sendemail2",className:"svgPath footer__sendemail2",d:"M15.5,7.2v5.4c0,0.5-0.4,1-1,1H1.5c-0.5,0-1-0.4-1-1V3.5c0-0.5,0.4-1, 1-1h13.1L7.7,9.4L3.4,5.2"})];break;case"checkbox":d=[n("path",{key:"checkbox1",className:"checkbox1",d:"M2,13.5c-0.8,0-1.5-0.7-1.5-1.5V2c0-0.8,0.7-1.5,1.5-1.5h10c0.8,0,1.5,0.7,1.5, 1.5v10c0,0.8-0.7,1.5-1.5,1.5H2z"}),n("path",{key:"checkbox2",className:"checkbox2",d:"M12,1c0.6,0,1,0.4,1,1v10c0,0.6-0.4,1-1,1H2c-0.5,0-1-0.4-1-1V2c0-0.6,0.5-1, 1-1H12M12,0H2C0.9,0,0,0.9,0,2v10c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9, 2-2V2C14,0.9,13.1,0,12,0L12,0z"}),n("path",{key:"checkbox3",className:"checkbox3",d:"M12,3c-0.2-0.3-0.6-0.3-0.9,0L5.8,8.8L4,7.2C3.8,7,3.4,6.9,3.1,7.1C2.8,7.4, 2.7,7.9,2.9,8.3L5,11.7c0.1,0.1,0.2,0.2,0.3,0.3c0.5,0.4,1.2,0.3, 1.6-0.3l0-0.1l5.2-7.8C12.3,3.6,12.2,3.2,12,3L12,3z"})];break;case"loading":d=[n("g",{transform:"translate(80,50)"},n("g",{transform:"rotate(0)"},n("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",transform:"scale(0.981667 0.981667)"},n("animateTransform",{attributeName:"transform",type:"scale",begin:"-0.875s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),n("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"-0.875s"})))),n("g",{transform:"translate(71.21320343559643,71.21320343559643)"},n("g",{transform:"rotate(45)"},n("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",transform:"scale(0.956667 0.956667)"},n("animateTransform",{attributeName:"transform",type:"scale",begin:"-0.75s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),n("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"-0.75s"})))),n("g",{transform:"translate(50,80)"},n("g",{transform:"rotate(90)"},n("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",transform:"scale(0.931667 0.931667)"},n("animateTransform",{attributeName:"transform",type:"scale",begin:"-0.625s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),n("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"-0.625s"})))),n("g",{transform:"translate(28.786796564403577,71.21320343559643)"},n("g",{transform:"rotate(135)"},n("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",transform:"scale(0.906667 0.906667)"},n("animateTransform",{attributeName:"transform",type:"scale",begin:"-0.5s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),n("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"-0.5s"})))),n("g",{transform:"translate(20,50.00000000000001)"},n("g",{transform:"rotate(180)"},n("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",ransform:"scale(0.881667 0.881667)"},n("animateTransform",{attributeName:"transform",type:"scale",begin:"-0.375s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),n("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"-0.375s"})))),n("g",{transform:"translate(28.78679656440357,28.786796564403577)"},n("g",{transform:"rotate(225)"},n("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",transform:"scale(0.856667 0.856667)"},n("animateTransform",{attributeName:"transform",type:"scale",begin:"-0.25s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),n("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"-0.25s"})))),n("g",{transform:"translate(49.99999999999999,20)"},n("g",{transform:"rotate(270)"},n("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",transform:"scale(0.831667 0.831667)"},n("animateTransform",{attributeName:"transform",type:"scale",begin:"-0.125s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),n("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"-0.125s"})))),n("g",{transform:"translate(71.21320343559643,28.78679656440357)"},n("g",{transform:"rotate(315)"},n("circle",{cx:"0",cy:"0",r:"10",className:"loading-circle",transform:"scale(0.806667 0.806667)"},n("animateTransform",{attributeName:"transform",type:"scale",begin:"0s",values:"0.8 0.8;1 1",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite"}),n("animate",{attributeName:"fill-opacity",keyTimes:"0;1",dur:"1s",repeatCount:"indefinite",values:"1;0",begin:"0s"}))))];break;case"accept":d=[n("circle",{cx:"27.5",cy:"27.5",r:"27.5",fill:"#5DC149"}),n("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"})];break;case"refuse":d=[n("circle",{cx:"27.5",cy:"27.5",r:"27.5",fill:"#D34747"}),n("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.9 c-3.6,1.9-0.6,7-0.6,7l0.7,1.4L19.8,30.3L19.8,30.3z",fill:"#ffffff"})];break;case"print":d=[n("path",{key:"print1",className:"svgPath footer__print0",d:"M14.6,3.5h-2.1V2c0-0.8-0.7-1.5-1.5-1.5H5C4.2,0.5,3.5,1.2,3.5, 2v1.5H1.4C0.8,3.5-0.1,4.3-0.1,5v7 c0,0.7,0.8,1.5,1.5,1.5l1.1,0V14c0,0.8,0.7,1.5, 1.5,1.5h8c0.8,0,1.5-0.7,1.5-1.5v-0.5l1.1,0c0.7,0,1.5-0.8,1.5-1.5V5 C16.1, 4.3,15.2,3.5,14.6,3.5z M4.5,2c0-0.3,0.2-0.5,0.5-0.5h6c0.3,0,0.5,0.2,0.5, 0.5v1.5h-7V2z M2.5,7C2.2,7,2,6.8,2,6.5 S2.2,6,2.5,6C2.8,6,3,6.2,3, 6.5S2.8,7,2.5,7z M12.5,14c0,0.3-0.2,0.5-0.5,0.5H4c-0.3,0-0.5-0.2-0.5-0.5c0, 0,0-4.5,0-4.8S3.6,9,4,9 c0,0,7.7,0,8,0s0.5,0.2,0.5,0.3S12.5,14,12.5,14z"}),n("path",{key:"print2",className:"svgPath footer__print1",d:"M14.6,13L13,13c0,0,0-3.6,0-3.8s-0.5-0.8-1-0.8s-7.5,0-8, 0S3,8.8,3,9.3S3,13,3,13l-1.6,0c-0.4,0-1-0.6-1-1V5 c0-0.4,0.6-1, 1-1H4h8h2.6c0.4,0,1,0.6,1,1v7C15.6,12.4,15,13,14.6,13L14.6,13z"}),n("path",{key:"print3",className:"svgPath footer__print2",d:"M12,9c-0.3,0-8,0-8,0C3.6,9,3.5,9,3.5,9.3s0,4.8, 0,4.8c0,0.3,0.2,0.5,0.5,0.5h8c0.3,0,0.5-0.2,0.5-0.5 c0, 0,0-4.5,0-4.7S12.3,9,12,9z"}),n("path",{key:"print4",className:"svgPath footer__print2",d:"M11.5,2c0-0.3-0.2-0.5-0.5-0.5H5C4.7,1.5,4.5,1.7,4.5,2v1.5h7V2z"}),n("circle",{key:"print5",className:"footer__print4",cx:"2.5",cy:"6.5",r:"0.5"}),n("path",{key:"print6",className:"svgPath footer__print3",d:"M10.5,13h-5C5.2,13,5,12.8,5,12.5C5,12.2,5.2,12,5.5,12h5c0.3,0,0.5, 0.2,0.5,0.5C11,12.8,10.8,13,10.5,13 L10.5,13z"}),n("path",{key:"print7",className:"svgPath footer__print3",d:"M10.5,11h-5C5.2,11,5,10.8,5,10.5C5,10.2,5.2,10,5.5,10h5c0.3, 0,0.5,0.2,0.5,0.5C11,10.8,10.8,11,10.5,11 L10.5,11z"}),n("path",{key:"print8",className:"svgPath footer__print1",d:"M4,4V2c0-0.6,0.4-1,1-1h6c0.6,0,1,0.4,1,1v2H4z"}),n("path",{key:"print9",className:"svgPath footer__print1",d:"M12,8.5c-0.5,0-7.5,0-8,0S3,8.8,3,9.3S3,14,3,14c0,0.6, 0.4,1,1,1h8c0.6,0,1-0.4,1-1c0,0,0-4.6,0-4.8 S12.5,8.5,12,8.5z"}),n("path",{key:"print10",className:"svgPath footer__print2",d:"M42.8,2c0-0.3-0.2-0.5-0.5-0.5h-6c-0.3,0-0.5,0.2-0.5,0.5v1.5h7V2z"})];break;case Qv:d=[n("path",{key:"bubbleline1",className:"svgPath bubbleline1",transform:"translate(0,1)",d:"M18.5,0v4c0.1,11.2-7.4,20-16.4,23c-2,0.6-1.7,0.5-0.6,0.5c3.6,0,7.7,0,17.5,0"})];break;case"bubblelineright":d=[n("rect",{className:"bubblelineright0",width:"3",height:"28"}),n("path",{key:"bubblelineright1",className:"svgPath bubblelineright1",transform:"translate(0,1)",d:"M2,27.5c9.8,0,14.3,0,17.9,0c1.1,0,1.4,0.1-0.6-0.5c-2.6-0.9-5-2.2-7.2-3.9C6.6, 18.8,2.8,12,2.9,4V0"})];break;case"bubblecontent":d=[n("path",{key:"bubblecontent1",className:"svgPath bubblecontent1",d:"M15.4,0v4.7c0,5.4-1.7,10.6-5,14.9C7.7,23.1,4.1, 25.9,0,27.7c0.8,0,5.8,0,16.4,0V0H15.4z"})]}return n("svg",Dt({version:"1.1",className:"svg "+(i?"svg-"+i:"")+" "+o+" "+(t?"disabled":"")+" "+(a?"active":""),onClick:t?void 0:s},c),d)},t}(I);Jv.defaultProps={disabled:!1,className:"",type:"",active:!1},Jv.propTypes={disabled:Ih.bool,color:Ih.string,className:Ih.string,type:Ih.string.isRequired,active:Ih.bool,onClick:Ih.func};var Xv=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={active:!1,score:n.ratingValue||0,comment:n.commentValue||"",transformOrigin:"",arrowDownLeft:"",ratingError:!1,commentError:!1},i.onSubmit=i.onSubmit.bind(i),i.onClick=i.onClick.bind(i),i.toggle=i.toggle.bind(i),i}return zt(t,e),t.prototype.componentDidUpdate=function(e,t){this.inputElement&&!t.active&&this.state.active&&this.inputElement.focus()},t.prototype.onSubmit=function(){this.checkRequired()&&(this.toggle(!1),this.props.onSubmit({score:this.state.score,comment:this.state.comment}),this.props.onIconSelected&&this.props.onIconSelected())},t.prototype.onClick=function(){this.state.active?this.toggle(!1):this.toggle(!0);var e=0,t=this.rating.getBoundingClientRect().left;this.props.chatWindowStyle!==xs&&"bubble"!==this.props.chatWindowStyle||(e=this.props.isRightToLeft?t-40+2:t-(document.querySelector("#chat_window_container").clientWidth-280-10)+2),this.setState({transformOrigin:e+"px calc(100% + 19px)",arrowDownLeft:e+"px"})},t.prototype.toggle=function(e){var t=this;this.state.active!==e&&(this.setState({active:e},function(){t.props.onToggle(e)}),!e&&this.props.onIconSelected&&this.props.onIconSelected())},t.prototype.checkIfEnter=function(){return this.state.comment.length>0||this.state.score>0},t.prototype.checkRequired=function(){var e=this.props,t=e.ratingField,n=e.commentField;return t&&t.isRequired&&this.setState({ratingError:0===this.state.score}),n&&n.isRequired&&this.setState({commentError:0===this.state.comment.length}),!this.state.ratingError&&!this.state.commentError},t.prototype.render=function(){var e=this,t=this.props,i=this.props,o=i.languages,r=i.ratingField,a=i.commentField,s=i.isMobile,c=i.chatWindowStyle;return r||a?n("li",{ref:function(t){e.rating=t},className:"footer__svg "+(t.disabled?"footer__svg--disabled":"")},n("div",{onClick:!s||this.state.active||t.windowDisabled?null:function(t){t.stopPropagation(),e.onClick(t)}},n("span",{title:o.buttonRating},n(Jv,{id:"iconRating",color:t.color,type:"rating",active:this.state.active,onClick:t.windowDisabled||s?null:this.onClick})),s&&o.buttonRating),n("div",{onClick:function(e){return e.stopPropagation()}},n(fv,{iconId:"iconRating",ifShow:this.state.active,showDirection:"up",ifHasClose:!0,onClose:function(){e.toggle(!1)},transformOrigin:this.state.transformOrigin,arrowDownLeft:this.state.arrowDownLeft,chatWindowStyle:c},n("div",{className:"bubble--title"},o.ratingTitle),r&&n(Fv,{style:this.state.ratingError?{border:"1px solid #d34747"}:null,rateVal:this.state.score,rateItems:r.options.map(function(e,t){return Object.assign({},e,{id:t+1})}),rateChange:function(t){return e.setState({score:t})}},r.isRequired&&n("span",{className:"bubble__required"},"*")),a&&n("div",{className:"bubble--textarea"},n(Uv,{input:{onInput:function(t){return e.setState({comment:t.target.value})},value:this.state.comment},ref:function(t){t&&(e.inputElement=t.element)},meta:{touched:!0,invalid:this.state.commentError},rows:3,cols:26,maxLength:2048,isDisabled:!1,placeholder:o.ratingCommentTitle}),a.isRequired&&n("span",{className:"bubble__required"},"*")),n("div",{className:"bubble__operation"},n(Yv,{type:"primary",text:o.buttonSubmit,onClick:this.onSubmit,disabled:!this.checkIfEnter()}))))):null},t}(I);Xv.protoTypes={isMobile:Ih.bool,disabled:Ih.bool,onToggle:Ih.func,onSubmit:Ih.func,color:Ih.string,languages:Ih.shape({}),commentField:Ih.shape({}),ratingField:Ih.shape({}).isRequired,chatWindowStyle:Ih.oneOf(["bubble",xs,ys])};var Zv=function(e){return{chatWindowStyle:Ol(e,ec(e)),isPoppedOut:Os(e),isRightToLeft:Ud(e),commentField:nl(e),ratingField:tl(e),ratingValue:Rd(e,"rating"),commentValue:Rd(e,"comment"),languages:Dc(e).languages}},$v=function(e){return{onSubmit:function(t){Of("livechat.chat.visitor.rate",t),e(zp(t)),e({type:"footer/chatToolRating",payload:t})},onToggle:function(t){e(Ip(t))}}},Kv=xg(Zv,$v)(Xv),ey=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={active:!1,file:null,disabled:!1},i.onFileChange=i.onFileChange.bind(i),i}return zt(t,e),t.prototype.onFileChange=function(e){var t=this;e&&(this.tempfile=e,this.setState({disabled:!0}),this.props.onSubmit(this.tempfile).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,i=this.props,o=i.languages,r=i.isMobile,a=vi(),s=this.state.disabled||t.disabled;return n("li",{title:o.buttonSendFile,className:"footer__svg "+(s?"footer__svg--disabled":""),onClick:function(){!r||t.windowDisabled||e.state.active||s||(e.file.click(),t.onIconSelected&&t.onIconSelected())}},n(Jv,{id:"iconSendFile",color:t.color,type:"sendfile",active:this.state.active,onClick:r||t.windowDisabled||this.state.active||s?null:function(n){n.stopPropagation(),t.onIconSelected&&t.onIconSelected(),e.file.click()}}),r&&o.buttonSendFile,!a&&n("input",{type:"file",style:{display:"none"},onChange:function(t){return e.onFileChange(t.target.files[0])},ref:function(t){t&&(e.file=t)}}),a&&n(Kh,{style:{display:"none"},onChange:function(t){return e.onFileChange(t)},onMounted:function(t){e.file=t}}))},t}(I);ey.protoTypes={onIconSelected:Ih.func,onSubmit:Ih.func,maxFileSize:Ih.number,color:Ih.string};var ty=function(e){return{color:"white",disabled:Vd(e)||pd(e)}},ny=function(e){return{onSubmit:function(t){return e(Ju(t))}}},iy=xg(ty,ny)(ey),oy=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.refCallback=i.refCallback.bind(i),i.shouldComponentUpdate=Hh(i,["input.value","meta.invalid","meta.touched","focused","isRequired","isDisabled","style"]),i.focus=i.focus.bind(i),i}return zt(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,t=e.isDisabled,i=(e.isRequired,e.placeholder),o=e.input,r=e.type,a=e.autoComplete,s=e.maxLength,c=e.className,d=e.meta,l=e.style,u=e.isReadOnly,p=e.animationEffect,f=jt(e,["isDisabled","isRequired","placeholder","input","type","autoComplete","maxLength","className","meta","style","isReadOnly","animationEffect"]),h=Object.assign({},l);return p?n("div",{className:"form__inputContainer"},n("input",Dt({},o,{readOnly:!!u&&"readOnly",disabled:!!t&&"disabled",className:cw("input","form__input","input--effect01",c,d&&d.touched&&d.invalid?"error":""),type:r,placeholder:i,autoComplete:a?"on":"off",maxLength:s,style:h,ref:this.refCallback},f)),n("span",{className:"input__focusBorder"},n("i",null))):n("input",Dt({},o,{readOnly:!!u&&"readOnly",disabled:!!t&&"disabled",className:cw(c,"input","form__input",d&&d.touched&&d.invalid&&"error"),style:h,type:r,placeholder:i,autoComplete:a?"on":"off",maxLength:s,ref:this.refCallback},f))},t}(I);oy.defaultProps={type:"text",autoComplete:!1},oy.propTypes={isReadOnly:Ih.bool,isDisabled:Ih.bool,placeholder:Ih.string,type:Ih.string,autoComplete:Ih.bool,className:Ih.string,maxLength:Ih.number,input:Ih.shape({value:Ih.string.isRequired}).isRequired,meta:Ih.shape({invalid:Ih.bool,touched:Ih.bool}).isRequired,isRequired:Ih.bool,focused:Ih.bool,animationEffect:Ih.string};var ry=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={active:!1,transformOrigin:"",arrowDownLeft:"",email:i.props.emailAddress,isLawful:!0},i.onSubmit=i.onSubmit.bind(i),i.onClick=i.onClick.bind(i),i.toggle=i.toggle.bind(i),i.CheckLegitimacy=i.CheckLegitimacy.bind(i),i.checkRequired=i.checkRequired.bind(i),i.emailFocus=i.emailFocus.bind(i),i}return zt(t,e),t.prototype.componentWillMount=function(){var e=this;this.props.isActive&&setTimeout(function(){e.toggle(!0),e.setStateLeftDistance()},458)},t.prototype.componentDidMount=function(){this.emailFocus()},t.prototype.componentWillReceiveProps=function(e){var t=this;e.isActive&&setTimeout(function(){t.toggle(!0),t.setStateLeftDistance()},458)},t.prototype.componentDidUpdate=function(e,t){this.inputElement&&!t.active&&this.state.active&&this.emailFocus()},t.prototype.onSubmit=function(){this.checkRequired()?(this.toggle(!1),this.setState({isLawful:!0}),this.props.onSubmit(this.state.email),this.props.onIconSelected&&this.props.onIconSelected()):this.setState({isLawful:!1})},t.prototype.onClick=function(){this.toggle(!this.state.active),this.setStateLeftDistance()},t.prototype.setStateLeftDistance=function(){var e=0,t=this.sendemail.getBoundingClientRect().left;this.props.chatWindowStyle!==xs&&"bubble"!==this.props.chatWindowStyle||(e=this.props.isRightToLeft?t-40+2:t-(document.querySelector("#chat_window_container").clientWidth-280-10)+2),this.setState({transformOrigin:e+"px calc(100% + 19px)",arrowDownLeft:e+"px"})},t.prototype.emailFocus=function(){var e=this;this.timer=setTimeout(function(){e.inputElement.focus()},333)},t.prototype.toggle=function(e){var t=this;this.state.active!==e&&(this.setState({active:e},function(){t.props.onToggle(e)}),!e&&this.props.onIconSelected&&this.props.onIconSelected())},t.prototype.checkRequired=function(){return Zn(this.state.email)},t.prototype.CheckLegitimacy=function(){return!!this.state.email},t.prototype.render=function(){var e=this,t=this.props,i=this.props,o=i.languages,r=i.isMobile,a=i.chatWindowStyle;return n("li",{ref:function(t){e.sendemail=t},className:"footer__svg "+(t.disabled?"footer__svg--disabled":"")},n("div",{id:"icon_container",onClick:!r||t.windowDisabled||this.state.active?null:function(t){t.stopPropagation(),e.onClick(t)}},n("span",{title:o.buttonTranscript},n(Jv,{ id:"iconSendEmail",color:t.color,type:"sendemail",active:this.state.active,onClick:t.windowDisabled||r?null:this.onClick})),r&&o.buttonTranscript),n("div",{onClick:function(e){return e.stopPropagation()}},n(fv,{id:"sendEmail",iconId:"iconSendEmail",ifShow:this.state.active,showDirection:"up",ifHasClose:!0,onClose:function(){e.toggle(!1)},chatWindowStyle:a,transformOrigin:this.state.transformOrigin,arrowDownLeft:this.state.arrowDownLeft},n("div",{className:"bubble--title"},o.promptEmail),n(oy,{ref:function(t){t&&(e.inputElement=t.element)},style:this.state.isLawful?null:{borderColor:"#ff0000"},input:{onInput:function(t){return e.setState({email:t.target.value})},value:this.state.email,onKeyDown:function(t){13===t.which&&e.checkRequired()&&(t.stopPropagation(),e.onSubmit())}},className:"footer-text-single-line",maxLength:128,isRequired:!0,meta:{touched:!0,invalid:this.state.showRequired}}),n("div",{className:"bubble__operation"},n(Yv,{type:"primary",text:o.buttonSend,onClick:function(){return e.onSubmit()},disabled:!this.CheckLegitimacy()})))))},t}(I);ry.protoTypes={disabled:Ih.bool,onSubmit:Ih.func,onIconStatusChange:Ih.func,languages:Ih.shape({}),chatWindowStyle:Ih.oneOf(["bubble",xs,ys])};var ay=function(e){var t=fd(e),n=dd(e),i=Fd(e),o=Rd(e,"email");return{chatWindowStyle:Ol(e,ec(e)),isPoppedOut:Os(e),isRightToLeft:Ud(e),isActive:i&&!t&&!n,disabled:!1,color:"white",emailAddress:o,languages:Dc(e).languages}},sy=function(e){return{onSubmit:function(t){Of("livechat.chat.visitor.setEmail",t),e(jp(t))},onToggle:function(t){e(Ip(t))}}},cy=xg(ay,sy)(ry),dy=function(e){return n("li",{title:e.languages.buttonAudioChat,className:"footer__svg "+(e.disabled?"footer__svg--disabled":""),onClick:function(){e.isMobile&&!e.windowDisabled&&!e.disabled&&e.onClick&&(e.onClick(),e.onIconSelected&&e.onIconSelected())}},n(Jv,{id:"iconAudioChat",color:e.color,type:"voicechat",active:e.active,onClick:function(t){t.stopPropagation(),e.isMobile||e.windowDisabled||e.disabled||!e.onClick||(e.onClick(),e.onIconSelected&&e.onIconSelected())}}),e.isMobile&&e.languages.buttonAudioChat)};dy.protoTypes={disabled:Ih.bool,active:Ih.bool,onClick:Ih.func,color:Ih.string};var ly=function(e){return{disabled:Wd(e)||Vd(e)||!Ed(e)}},uy=function(e){return{onClick:function(){e({type:"footer/chatToolAudio",payload:!0})}}},py=xg(ly,uy)(dy),fy=function(e){return n("li",{title:e.languages.buttonVideoChat,className:"footer__svg "+(e.disabled?"footer__svg--disabled":""),onClick:function(){e.isMobile&&!e.windowDisabled&&!e.disabled&&e.onClick&&(e.onClick(),e.onIconSelected&&e.onIconSelected())}},n(Jv,{id:"iconVideoChat",color:e.color,type:"videochat",active:e.active,onClick:function(t){t.stopPropagation(),e.isMobile||e.windowDisabled||e.disabled||!e.onClick||(e.onClick(),e.onIconSelected&&e.onIconSelected())}}),e.isMobile&&e.languages.buttonVideoChat)};fy.protoTypes={disabled:Ih.bool,active:Ih.bool,onIconStatusChange:Ih.func,onClick:Ih.func,color:Ih.string};var hy=function(e){return{disabled:Wd(e)||Vd(e)||!Ed(e)}},my=function(e){return{onClick:function(){e({type:"footer/chatToolVideo",payload:!0})}}},by=xg(hy,my)(fy),gy=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={active:!1},i.timer=null,i.printWindow=null,i.getPrintContent=i.getPrintContent.bind(i),i.getPrintElement=i.getPrintElement.bind(i),i.print=i.print.bind(i),i}return zt(t,e),t.prototype.getPrintContent=function(){var e=this;return n("div",{className:_s(this.props.windowStyle),ref:function(t){e.element=t}}," ",n(this.props.content,{isPrint:!0})," ")},t.prototype.getPrintElement=function(){var e=this;if(/Chrome/.test(navigator.userAgent)){if(!this.printWindow&&!this.timer){this.printWindow=window.open("about:blank","_blank","width=800\uff0c height=600, status=yes, toolbar=no, resizable=yes,location=no,tilebar=no");var t=this.printWindow.document.head,i=document.createElement("style");i.innerHTML=this.props.innerCss,t.appendChild(i),setTimeout(function(){e.printWindow.document.body.appendChild(e.element),e.print(e.printWindow)},0)}return n("div",{style:{display:"none"}},this.getPrintContent())}return n(Xh,{key:"printWin",id:"print_transcript_container",style:{width:0,height:0},callback:function(t){e.print(t.contentWindow)},innerCss:this.props.innerCss},this.getPrintContent())},t.prototype.print=function(e){var t=this;this.timer||(this.timer=setTimeout(function(){e.focus(),e.print(),e.close(),t.setState({active:!1}),t.timer=null,t.printWindow=null},200))},t.prototype.render=function(){var e=this,t=this.props,i=this.props,o=i.languages,r=i.isMobile,a=this.state.active;return n("li",{title:o.buttonPrint,className:"footer__svg "+(a?"footer__svg--disabled":""),onClick:!r||t.windowDisabled||this.state.active?null:function(){e.setState({active:!0}),t.onIconSelected&&t.onIconSelected()}},n(Jv,{id:"iconPrint",color:t.color,type:"print",active:this.state.active,onClick:r||t.windowDisabled?null:function(n){n.stopPropagation(),t.onIconSelected&&t.onIconSelected(),e.setState({active:!0})}}),r&&o.buttonPrint,this.state.active&&this.getPrintElement())},t}(I);gy.protoTypes={onIconSelected:Ih.func,onPrint:Ih.func,color:Ih.string};var wy=zh({type:Bh(["agentSendText","agentAddInvitationText",jn,"agentSendUrl","agentSendFile","agentSendImage","agentSendImageStart"]).isRequired,message:Bh([Oh,zh({name:Oh,url:Oh})]).isRequired,translated:Oh,ifShowName:Eh,sender:zh({name:Oh.isRequired,avatar:Oh}).isRequired,time:jh(Date)}).isRequired,vy=zh({type:Bh(["visitorText","visitorAddTextMessage","visitorSendFile","visitorSendImage"]).isRequired,message:Bh([Oh,zh({name:Oh,url:Oh})]).isRequired,translated:Oh,time:jh(Date)}).isRequired,yy=zh({type:Wh.isRequired,message:Bh([Oh,Dh,Rh(Dh)])}).isRequired,xy=(zh({type:Bh(["visitorFile","visitorImage"]).isRequired,fileName:Oh.isRequired,percent:Wh.isRequired,onCloseClick:Nh}).isRequired,zh({type:Bh(["chatbotBadAnswer"]).isRequired,message:zh({Message:Oh,TextChatWithAgent:Oh}).isRequired,sender:zh({name:Oh,avatar:Oh}).isRequired,time:jh(Date),onChatWithAgentClick:Nh}).isRequired),_y=zh({type:Bh(["chatbotRequestQuestionGuid"]).isRequired,message:Oh.isRequired,sender:zh({name:Oh,avatar:Oh}).isRequired,time:jh(Date)}).isRequired,Cy=zh({type:Bh(["chatbotPossibleAnswer"]).isRequired,message:zh({Message:Oh.isRequired,RelatedQuestion:Rh(zh({QuestionId:Wh,QuestionName:Oh}))}).isRequired,sender:zh({name:Oh,avatar:Oh}).isRequired,time:jh(Date),onRelatedQuestionClick:Nh}).isRequired,ky=zh({type:Bh(["chatbotHighConfidenceAnswer"]).isRequired,message:zh({GUID:Oh.isRequired,Answer:Oh.isRequired,TextRelatedQuestions:Oh,TextHelpful:Oh,TextNotHelpful:Oh,IfSystem:Eh,RelatedQuestion:Rh(zh({QuestionId:Wh,QuestionName:Oh}))}).isRequired,sender:zh({name:Oh,avatar:Oh}).isRequired,time:jh(Date),onRelatedQuestionClick:Nh,OnRateClick:Nh}).isRequired,Sy=function(e){function t(){return Bt(this,t),qt(this,e.apply(this,arguments))}return zt(t,e),t.prototype.componentDidMount=function(){this.props.scrollDown()},t.prototype.render=function(){var e=this.props;return n("div",{id:"visitorRequestChat"===e.type&&"system-queue-position",className:"chat-system-message window__chatSystemMessage",onAnimationEnd:e.scrollDown},"bubble"===e.windowStyle&&n("div",{className:"window__chatSystemMessageContent"},e.message),"bubble"!==e.windowStyle&&e.message,"bubble"===e.windowStyle&&[n(Jv,{type:Qv,className:"icon-bubble-line",viewBox:"0 0 19 28"})])},t}(I);Sy.propTypes=yy;var Ay=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={ifShowLoading:!1,mobileShowTime:!1},i.timer=null,i.timerMobileShowTime=null,i.onClick=i.onClick.bind(i),i}return zt(t,e),t.prototype.componentDidMount=function(){var e=this;"visitorText"===this.props.type&&(this.timer=setTimeout(function(){e.setState({ifShowLoading:!0}),e.timer=null},1e3)),this.props.scrollDown()},t.prototype.componentWillReceiveProps=function(e){"visitorText"!==e.type&&(this.timer&&clearTimeout(this.timer),this.setState({ifShowLoading:!1}))},t.prototype.componentWillUnmount=function(){this.timer&&clearTimeout(this.timer),this.timerMobileShowTime&&clearTimeout(this.timerMobileShowTime)},t.prototype.onClick=function(e){var t=this;e.stopPropagation(),this.props.isMobile&&(this.setState({mobileShowTime:!0}),this.timerMobileShowTime&&clearTimeout(this.timerMobileShowTime),this.timerMobileShowTime=setTimeout(function(){t.setState({mobileShowTime:!1}),t.timerMobileShowTime=null},2e3))},t.prototype.render=function(){var e=this.props,t=void 0,i=!1,o="";return"visitorText"===e.type?t=bi(e.message,n("br",null)):"visitorAddTextMessage"===e.type?e.translated?(t=bi(e.translated,n("br",null)),t.push(n("i",{className:"window__chatMessageOrignal window__chatMessageTranslatedTag"},"(",e.translatedTag,")")),t.push(n("i",{className:"window__chatMessageOrignal"},bi(e.message,n("br",null))," (",e.originalTag,")"))):t=bi(e.message,n("br",null)):"visitorSendImage"===e.type?(i=!0,o=/.*[.](gif)$/i.test(e.message.name)?e.message.url:e.message.url+"&maxWidth=200&maxHeight=200",t=n("a",{href:e.message.url,target:"_blank",rel:"noopener noreferrer"},n("img",{src:o,alt:e.message.name,style:{maxWidth:200,maxHeight:200},onLoad:e.scrollDown}))):"visitorSendFile"===e.type?/.*[.](jpg|gif|jpeg|png|bmp)$/i.test(e.message.name)?(i=!0,o=/.*[.](gif)$/i.test(e.message.name)?e.message.url:e.message.url+"&maxWidth=200&maxHeight=200",t=n("a",{href:e.message.url,target:"_blank",rel:"noopener noreferrer"},n("img",{src:o,alt:e.message.name,style:{maxWidth:200,maxHeight:200},onLoad:e.scrollDown}))):(i=!1,t=n("div",{className:"chat-visitor-message window__chatVisitorMessage--file"},n(mw,{type:hw.sendfile}),n("a",{href:e.message.url,target:"_blank",rel:"noopener noreferrer"},e.message.name))):"visitorFile"!==e.type&&"visitorImage"!==e.type||(t=[e.fileName],e.percent&&t.push(n("span",null,"(",e.percent,"%)")),e.onCloseClick&&t.push(n("i",{className:"icon icon-close",style:{color:"#a3a3a3",fontSize:12},onClick:function(t){t.preventDefault(),t.stopPropagation(),e.onCloseClick()}})),t.push(n("span",{className:"chat-message--loading"},n(Jv,{type:"loading",className:"svg--loading",viewBox:"0 0 100 100"})))),n("div",{className:"chat-visitor window__chatVisitor clearfix",onAnimationEnd:e.scrollDown},n("div",{onClick:this.props.isMobile?this.onClick:void 0,className:cw("chat-visitor-message","window__chatVisitorMessage",i&&"chat-message--img")},t,this.state.ifShowLoading&&n("span",{className:"chat-message--loading"},n(Jv,{type:"loading",className:"svg--loading",viewBox:"0 0 100 100"})),"bubble"===e.windowStyle&&[n(Jv,{type:"bubblelineright",className:"icon-bubble-line-right",viewBox:"0 0 19 28"})]),this.props.isMobile&&"visitorText"!==this.props.type&&e.time&&n("div",{style:{opacity:this.state.mobileShowTime?1:0},className:"chat-time chat__time"},_n(e.time)),!this.props.isMobile&&"visitorText"!==this.props.type&&e.time&&n("div",{className:"chat-time chat__time"},_n(e.time)),"visitorText"===this.props.type&&n("div",{style:{opacity:0},className:"chat-time chat__time"},_n(e.time)))},t}(I);Ay.propTypes=vy;var Ty=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={mobileShowTime:!1},i.timer=null,i.onClick=i.onClick.bind(i),i}return zt(t,e),t.prototype.componentDidMount=function(){this.props.scrollDown(),Of("livechat.chat.agent.input",this.props.sender,this.props.message)},t.prototype.componentWillUnmount=function(){this.timer&&clearTimeout(this.timer)},t.prototype.onClick=function(e){var t=this;e.stopPropagation(),this.props.isMobile&&(this.setState({mobileShowTime:!0}),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){t.setState({mobileShowTime:!1}),t.timer=null},2e3))},t.prototype.render=function(){var e=this.props,t=void 0,i=!1,o="";return"agentSendText"===e.type||"autoInvMsg"===e.type||"agentAddInvitationText"===e.type||e.type===jn?e.translated?(t=bi(e.translated,n("br",null)),t.push(n("i",{className:"window__chatMessageOrignal window__chatMessageTranslatedTag"},"(",e.translatedTag,")")),t.push(n("i",{className:"window__chatMessageOrignal"},bi(e.message,n("br",null))," (",e.originalTag,")"))):t=bi(e.message,n("br",null)):"agentSendUrl"===e.type?t=An(e.message):"agentSendImage"===e.type?(i=!0,o=/.*[.](gif)$/i.test(e.message.name)?e.message.url:e.message.url+"&maxWidth=200&maxHeight=200",t=n("a",{href:e.message.url,target:"_blank",rel:"noopener noreferrer"},n("img",{src:o,alt:e.message.name,style:{maxWidth:200,maxHeight:200},onLoad:e.scrollDown}))):"agentSendFile"===e.type&&(/.*[.](jpg|gif|jpeg|png|bmp)$/i.test(e.message.name)?(i=!0,o=e.message.url,t=n("a",{href:e.message.url,target:"_blank",rel:"noopener noreferrer"},n("img",{src:o,alt:e.message.name,style:{maxWidth:200,maxHeight:200},onLoad:e.scrollDown}))):(i=!1,t=n("div",{className:"chat-operator-message window__chatAgentMessage--file"},n("a",{href:e.message.url,target:"_blank",rel:"noopener noreferrer"},e.message.name)))),n("div",{className:"window__chatAgent clearfix",onAnimationEnd:e.scrollDown},e.ifShowAvatar&&e.sender.avatar&&n("div",{className:"agentMessage__avatar"},n(wv,{src:e.sender.avatar,alt:e.sender.name,className:"agentMessage__avatarImg"})),n("div",{onClick:this.props.isMobile?this.onClick:void 0,className:cw("chat-operator-message","window__chatAgentMessage",i&&"chat-message--img","agentSendImageStart"===e.type&&"chat-message--imgLoading",(!e.ifShowAvatar||!e.sender.avatar)&&"window__chatMessageNoAvatar")},!e.ifShowAvatar&&e.ifShowName&&e.sender.name&&n("div",{className:"chat-operator-name window__chatAgentName"},e.sender.name),"agentSendImageStart"===e.type&&n(Jv,{type:"loading",className:"svg--loading",viewBox:"0 0 100 100"}),t,"bubble"===e.windowStyle&&[n(Jv,{type:Qv,className:"icon-bubble-line",viewBox:"0 0 19 28"})]),this.props.isMobile&&n("div",{style:{opacity:this.state.mobileShowTime?1:0},className:"chat-time chat__time"},_n(e.time)),!this.props.isMobile&&n("div",{className:"chat-time chat__time"},_n(e.time)))},t}(I);Ty.propTypes=wy;var Iy=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={mobileShowTime:!1},i.timer=null,i.onClick=i.onClick.bind(i),i}return zt(t,e),t.prototype.componentDidMount=function(){this.props.scrollDown()},t.prototype.componentWillUnmount=function(){this.timer&&clearTimeout(this.timer)},t.prototype.onClick=function(e){var t=this;e.stopPropagation(),this.props.isMobile&&(this.setState({mobileShowTime:!0}),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){t.setState({mobileShowTime:!1}),t.timer=null},2e3))},t.prototype.render=function(){var e=this.props;return e.message&&(e.message.Message||e.message.TextChatWithAgent)?n("div",{className:"window__chatAgent clearfix",onAnimationEnd:e.scrollDown},e.ifShowAvatar&&e.sender.avatar&&n("div",{className:"agentMessage__avatar"},n(wv,{src:e.sender.avatar,alt:e.sender.name,className:"agentMessage__avatarImg"})),n("div",{onClick:this.props.isMobile?this.onClick:void 0,className:cw("chat-operator-message","window__chatAgentMessage",!e.ifShowAvatar&&"window__chatMessageNoAvatar")},!e.ifShowAvatar&&e.ifShowName&&e.sender.name&&n("div",{className:"chat-operator-name window__chatAgentName"},e.sender.name),e.message.Message&&n("div",null,e.message.Message),e.message.TextChatWithAgent&&n("a",{onClick:function(t){t.preventDefault(),t.stopPropagation(),e.onChatWithAgentClick()},className:"btn btn-primary"},e.message.TextChatWithAgent),"bubble"===e.windowStyle&&[n(Jv,{type:Qv,className:"icon-bubble-line",viewBox:"0 0 19 28"})]),this.props.isMobile&&n("div",{style:{opacity:this.state.mobileShowTime?1:0},className:"chat-time chat__time"},_n(e.time)),!this.props.isMobile&&n("div",{className:"chat-time chat__time"},_n(e.time))):null},t}(I);Iy.propTypes=xy;var Ry=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.timer=null,i}return zt(t,e),t.prototype.componentDidMount=function(){var e=this;this.timer=setTimeout(function(){e.props.onChatbotTimeout(e.props.message),e.timer=null},3e4),this.props.scrollDown()},t.prototype.componentWillUnmount=function(){this.timer&&clearTimeout(this.timer)},t.prototype.render=function(){var e=this.props;if(!e.message)return null;if(e.timeout){var t={type:"chatbotBadAnswer",message:e.message,sender:e.sender,time:e.time,onChatWithAgentClick:e.onChatWithAgentClick,ifShowName:e.ifShowName,ifShowAvatar:e.ifShowAvatar,windowStyle:e.windowStyle,isMobile:e.isMobile,scrollDown:e.scrollDown};return n(Iy,t)}return n("div",{className:"window__chatAgent clearfix",onAnimationEnd:e.scrollDown},e.ifShowAvatar&&e.sender.avatar&&n("div",{className:"agentMessage__avatar"},n(wv,{src:e.sender.avatar,alt:e.sender.name,className:"agentMessage__avatarImg"})),n("div",{className:cw("chat-operator-message","window__chatAgentMessage",!e.ifShowAvatar&&"window__chatMessageNoAvatar")},n("div",{className:"dot"},n("div",{className:cw("dot__element",!On&&"dot__element--loadingAnimation","animated-delayFrames7")}),n("div",{className:cw("dot__element",!On&&"dot__element--loadingAnimation","animated-delayFrames10")}),n("div",{className:cw("dot__element",!On&&"dot__element--loadingAnimation","animated-delayFrames13")})),"bubble"===e.windowStyle&&[n(Jv,{type:Qv,className:"icon-bubble-line",viewBox:"0 0 19 28"})]))},t}(I);Ry.protoTypes=_y;var Py=function(e){try{return JSON.parse(e).messages.map(function(e){if(void 0!==e.text)return n("div",{dangerouslySetInnerHTML:{__html:e.text||""}});if(e.attachment){if("image"===e.attachment.type){var t=e.attachment.payload.url;return n("a",{href:t,target:"_blank",rel:"noopener noreferrer"},n("img",{src:t,alt:"",style:{maxWidth:200,maxHeight:200}}))}if("file"===e.attachment.type)return n("div",{className:"chat-operator-message window__chatAgentMessage--file"},n("a",{href:e.attachment.payload.url,target:"_blank",rel:"noopener noreferrer"},"File"))}return null}).filter(function(e){return null!=e})}catch(t){return e}},My=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={mobileShowTime:!1,helpful:!1,notHelpful:!1},i.timer=null,i.onClick=i.onClick.bind(i),i}return zt(t,e),t.prototype.componentDidMount=function(){this.props.scrollDown()},t.prototype.componentWillUnmount=function(){this.timer&&clearTimeout(this.timer)},t.prototype.onClick=function(e){var t=this;e.stopPropagation(),this.props.isMobile&&(this.setState({mobileShowTime:!0}),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){t.setState({mobileShowTime:!1}),t.timer=null},2e3))},t.prototype.render=function(){var e=this,t=this.props;return n("div",{className:"window__chatAgent clearfix",onAnimationEnd:t.scrollDown},t.ifShowAvatar&&t.sender.avatar&&n("div",{className:"agentMessage__avatar"},n(wv,{src:t.sender.avatar,alt:t.sender.name,className:"agentMessage__avatarImg"})),n("div",{onClick:this.props.isMobile?this.onClick:void 0,className:cw("chat-operator-message","window__chatAgentMessage",!t.ifShowAvatar&&"window__chatMessageNoAvatar")},!t.ifShowAvatar&&t.ifShowName&&t.sender.name&&n("div",{className:"chat-operator-name window__chatAgentName"},t.sender.name),0===t.message.AnswerContentType&&n("div",{dangerouslySetInnerHTML:{__html:t.message.Answer}}),0!==t.message.AnswerContentType&&n("div",null,Py(t.message.Answer)),!t.message.IfSystem&&n("div",null,n("div",{className:cw("chatMessage__chatBotRate",t.disableRate&&"chatMessage__chatBotRate--disabled",this.state.helpful&&"chatMessage__chatBotRate--selected"),onClick:t.disableRate?void 0:function(n){n.preventDefault(),n.stopPropagation(),e.state.notHelpful||e.setState({helpful:!0}),t.OnRateClick(t.message.GUID,!0)}},n("i",{className:"icon icon-helpful"}),n("span",{className:"chatMessage__chatBotRateText"},t.message.TextHelpful)),n("div",{className:cw("chatMessage__chatBotRate","chatMessage__chatBotRateLast",t.disableRate&&"chatMessage__chatBotRate--disabled",this.state.notHelpful&&"chatMessage__chatBotRate--selected"),onClick:t.disableRate?void 0:function(n){n.preventDefault(),n.stopPropagation(),e.state.helpful||e.setState({notHelpful:!0}),t.OnRateClick(t.message.GUID,!1)}},n("i",{className:"icon icon-not-helpful"}),n("span",{className:"chatMessage__chatBotRateText"},t.message.TextNotHelpful))),t.message.RelatedQuestion&&t.message.RelatedQuestion.length>0&&n("div",null,n("div",{className:"chatMessage__chatBotRateSplitLine"}),n("div",null,t.message.TextRelatedQuestions),n("ul",{className:"chatMessage__questionList chatMessage__questionList--disc"},t.message.RelatedQuestion.map(function(e){return n("li",{key:e.QuestionId},n("a",{onClick:function(n){n.preventDefault(),n.stopPropagation(),t.onRelatedQuestionClick(e)}},e.QuestionName))}))),"bubble"===t.windowStyle&&[n(Jv,{type:Qv,className:"icon-bubble-line",viewBox:"0 0 19 28"})]),this.props.isMobile&&n("div",{style:{opacity:this.state.mobileShowTime?1:0},className:"chat-time chat__time"},_n(t.time)),!this.props.isMobile&&n("div",{className:"chat-time chat__time"},_n(t.time)))},t}(I);My.propTypes=ky;var Oy=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={mobileShowTime:!1},i.timer=null,i.onClick=i.onClick.bind(i),i}return zt(t,e),t.prototype.componentDidMount=function(){this.props.scrollDown()},t.prototype.componentWillUnmount=function(){this.timer&&clearTimeout(this.timer)},t.prototype.onClick=function(e){var t=this;e.stopPropagation(),this.props.isMobile&&(this.setState({mobileShowTime:!0}),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){t.setState({mobileShowTime:!1}),t.timer=null},2e3))},t.prototype.render=function(){var e=this.props;return n("div",{className:"window__chatAgent clearfix",onAnimationEnd:e.scrollDown},e.ifShowAvatar&&e.sender.avatar&&n("div",{className:"agentMessage__avatar"},n(wv,{src:e.sender.avatar,alt:e.sender.name,className:"agentMessage__avatarImg"})),n("div",{onClick:this.props.isMobile?this.onClick:void 0,className:cw("chat-operator-message","window__chatAgentMessage",!e.ifShowAvatar&&"window__chatMessageNoAvatar")},!e.ifShowAvatar&&e.ifShowName&&e.sender.name&&n("div",{className:"chat-operator-name window__chatAgentName"},e.sender.name),e.message.Message,n("ul",{className:"chatMessage__questionList"},e.message.RelatedQuestion.map(function(t){return n("li",{key:t.QuestionId},n("a",{onClick:function(n){n.preventDefault(),n.stopPropagation(),e.onRelatedQuestionClick(t)}},t.QuestionName))})),"bubble"===e.windowStyle&&[n(Jv,{type:Qv,className:"icon-bubble-line",viewBox:"0 0 19 28"})]),this.props.isMobile&&n("div",{style:{opacity:this.state.mobileShowTime?1:0},className:"chat-time chat__time"},_n(e.time)),!this.props.isMobile&&n("div",{className:"chat-time chat__time"},_n(e.time)))},t}(I);Oy.propTypes=Cy;var Ey=function(e){try{return JSON.parse(e)}catch(e){return}},Ny=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.eventListener=i.eventListener.bind(i),i}return zt(t,e),t.prototype.componentDidMount=function(){this.iframe&&this.iframe.contentWindow.parent.addEventListener("message",this.eventListener)},t.prototype.shouldComponentUpdate=function(e){return this.props.url!==e.url},t.prototype.componentWillUnmount=function(){this.iframe&&this.iframe.contentWindow&&this.iframe.contentWindow.parent&&this.iframe.contentWindow.parent.removeEventListener("message",this.eventListener)},t.prototype.eventListener=function(e){if(-1!==e.origin.toLowerCase().indexOf("comm100.com")&&e.data){var t=Ey(e.data);if(!t)return;this.props.handlerAction(t)}},t.prototype.render=function(){var e=this,t=[this.props.url,"target="+decodeURIComponent(this.props.targetUrl.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))].join("&");return n("iframe",{ref:function(t){e.iframe=t},frameBorder:0,scrolling:"no",src:t,style:{width:"100%",height:"100%"}})},t}(I);Ny.propTypes={handlerAction:Nh,url:Oh,targetUrl:Oh};var Wy=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.handlerAction=i.handlerAction.bind(i),i.state={status:"loading",height:0},i.token=kn(n.url,"otk"),i}return zt(t,e),t.prototype.handlerAction=function(e){if(e.token===this.token){var t=0;switch(e.type){case"get_failure":this.props.getSecureFormFailure();break;case"height":t=e.height;break;case"submit":this.props.submitSecureForm(this.token,e.name);break;case"cancel":this.props.cancelSecureForm(this.token)}this.setState({status:e.type,height:0===t?this.state.height:t})}},t.prototype.render=function(){var e=this.props;return e.isHidden?null:e.url?"close"===this.state.status||"cancel"===this.state.status?null:n("div",{key:this.token,className:"chat-operator window__chatAgent clearfix"},n("div",{className:"chat-operator-message window__chatAgentMessage window__chatMessageNoAvatar chat-message--imgLoading",style:{display:"loading"===this.state.status?"block":"none"}},n(Jv,{type:"loading",className:"svg--loading",viewBox:"0 0 100 100"}),"bubble"===e.windowStyle&&[n(Jv,{type:Qv,className:"icon-bubble-line",viewBox:"0 0 19 28"})]),n("div",{style:{position:"relative",width:"100%",height:this.state.height}},n(Ny,{handlerAction:this.handlerAction,url:e.url,targetUrl:e.targetUrl}))):null},t}(I);Wy.propTypes={getSecureFormFailure:Nh,submitSecureForm:Nh,cancelSecureForm:Nh,url:Oh,targetUrl:Oh,isHidden:Eh};var By=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={mobileShowTime:!1},i.timerMobileShowTime=null,i.onClick=i.onClick.bind(i),i}return zt(t,e),t.prototype.componentDidMount=function(){this.props.scrollDown()},t.prototype.componentWillUnmount=function(){this.timerMobileShowTime&&clearTimeout(this.timerMobileShowTime)},t.prototype.onClick=function(e){var t=this;e.stopPropagation(),this.props.isMobile&&(this.setState({mobileShowTime:!0}),this.timerMobileShowTime&&clearTimeout(this.timerMobileShowTime),this.timerMobileShowTime=setTimeout(function(){t.setState({mobileShowTime:!1}),t.timerMobileShowTime=null},2e3))},t.prototype.render=function(){var e=this.props;return this.state.timeout?null:n("div",{className:"window__chatAgent clearfix",onAnimationEnd:e.scrollDown},e.ifShowAvatar&&e.sender.avatar&&n("div",{className:"agentMessage__avatar"},n(wv,{src:e.sender.avatar,alt:e.sender.name,className:"agentMessage__avatarImg"})),n("div",{onClick:this.props.isMobile?this.onClick:void 0,className:cw("chat-operator-message","window__chatAgentMessage",(!e.ifShowAvatar||!e.sender.avatar)&&"window__chatMessageNoAvatar")},!e.ifShowAvatar&&e.ifShowName&&e.sender.name&&n("div",{className:"chat-operator-name window__chatAgentName"},e.sender.name),n("div",{className:"dot"},n("div",{className:"dot__element dot__element--loadingAnimation animated-delayFrames7"}),n("div",{className:"dot__element dot__element--loadingAnimation animated-delayFrames10"}),n("div",{className:"dot__element dot__element--loadingAnimation animated-delayFrames13"})),"bubble"===e.windowStyle&&[n(Jv,{type:Qv,className:"icon-bubble-line",viewBox:"0 0 19 28"})]),this.props.isMobile&&n("div",{style:{opacity:this.state.mobileShowTime?1:0},className:"chat-time chat__time"},_n(e.time)),!this.props.isMobile&&n("div",{className:"chat-time chat__time"},_n(e.time)))},t}(I);By.protoTypes=zh({message:Oh,time:jh(Date),ifShowName:Eh,sender:zh({name:Oh.isRequired,avatar:Oh}).isRequired,ifShowAvatar:Eh}).isRequired;var Dy=function(e,t,i){return e.content?"string"==typeof e.content&&e.content?n(Sy,{type:e.type,message:e.content,windowStyle:t,sender:e.sender,scrollDown:i}):"string"==typeof e.content.text&&e.content.text?n(Sy,{type:e.type,message:e.content.text,windowStyle:t,sender:e.sender,scrollDown:i}):null:null},zy=/{queuePosition}/gi,jy=/{estimatedWaitTime}/gi,qy=function(e,t,i){if(e.content){var o=e.content;return zy.test(o)&&void 0===e.queuePosition?null:jy.test(o)&&void 0===e.estimatedWaitTime?null:(o=o.replace(zy,e.queuePosition),o=o.replace(jy,e.estimatedWaitTime),n(Sy,{type:e.type,message:o,windowStyle:t,scrollDown:i}))}return null},Ly=function(e,t,i,o,r){var a=[];if(e.content){for(var s=e.content.split(/{linkText}/gi),c=0;c1,ifShowAvatar:r,windowStyle:a,isMobile:s,scrollDown:c}):null:n(Ty,{type:e.type,message:e.content,sender:e.sender,time:e.time,translated:e.translated,ifShowName:t>1,translatedTag:i,originalTag:o,ifShowAvatar:r,windowStyle:a,isMobile:s,scrollDown:c})},Hy=function(e,t,i,o,r,a,s,c,d,l,u){return"chatbotRequestQuestionGuid"===e.type?n(Ry,{type:e.type,message:e.content,sender:e.sender,time:e.time,timeout:e.timeout,ifShowName:s>1,ifShowAvatar:a,onChatbotTimeout:t,onChatWithAgentClick:i,windowStyle:c,chatWithAgentText:d,isMobile:l,scrollDown:u}):"chatbotBadAnswer"===e.type?n(Iy,{type:e.type,message:e.content,sender:e.sender,time:e.time,onChatWithAgentClick:i,ifShowName:s>1,ifShowAvatar:a,windowStyle:c,isMobile:l,scrollDown:u}):"chatbotHighConfidenceAnswer"===e.type?n(My,{type:e.type,message:e.content,sender:e.sender,time:e.time,onRelatedQuestionClick:o,OnRateClick:r,ifShowName:s>1,ifShowAvatar:a,disableRate:e.disableRate,windowStyle:c,isMobile:l,scrollDown:u}):"chatbotPossibleAnswer"===e.type?n(Oy,{type:e.type,message:e.content,sender:e.sender,time:e.time,onRelatedQuestionClick:o,ifShowName:s>1,ifShowAvatar:a,windowStyle:c,isMobile:l,scrollDown:u}):null},Gy=function(e,t){var i=t.involvedAgentsCount,o=t.gotoOfflineLinkText,r=t.translatedTag,a=t.originalTag,s=t.onChatWithAgentClick,c=t.onRelatedQuestionClick,d=t.OnRateClick,l=t.getSecureFormFailure,u=t.submitSecureForm,p=t.cancelSecureForm,f=t.onChatbotTimeout,h=t.onOfflineLinkClick,m=t.onStartChatAgainClick,b=t.chatStatus,g=t.scrollDown,w=t.ifShowAvatar,v=t.agentTypingText,y=t.windowStyle,x=t.chatWithAgentText,_=t.isMobile,C=t.isPrint;if("creditCardMasked"===e.type||"pendingAccept"===e.type||"pendingAudioRequesting"===e.type||"pendingHangup"===e.type||"pendingVideoRequesting"===e.type)return null;if(_i(e))return Dy(e,y,g);if("visitorRequestChat"===e.type)return qy(e,y,g);if(b===Zr&&"systemPromoteOfflineMesage"===e.type)return Ly(e,o,h,y,g);if("startChatAgain"===e.type)return Vy(e,m,y,g);if("visitorText"===e.type||"visitorFile"===e.type||"visitorImage"===e.type||"visitorAddTextMessage"===e.type||"visitorSendFile"===e.type||"visitorSendImage"===e.type)return Fy(e,r,a,y,_,g);if("agentSendText"===e.type||"agentAddInvitationText"===e.type||"autoInvMsg"===e.type||e.type===jn||"agentSendUrl"===e.type||"agentSendFile"===e.type||"agentSendImage"===e.type||"agentSendImageStart"===e.type)return Uy(e,i,r,a,w,y,_,g);if("chatbotRequestQuestionGuid"===e.type||"chatbotBadAnswer"===e.type||"chatbotHighConfidenceAnswer"===e.type||"chatbotPossibleAnswer"===e.type)return Hy(e,f,s,c,d,w,i,y,x,_,g);if("agentRequestSecureForm"===e.type){var k=[];return k.push(n(Sy,{type:e.type,message:e.content.text,windowStyle:y,sender:e.sender,scrollDown:g})),C||k.push(n(Wy,{isHidden:e.isHidden,url:e.content.url,targetUrl:window.location.href,getSecureFormFailure:l,submitSecureForm:u,cancelSecureForm:p,windowStyle:y,scrollDown:g})),k}return"agentTyping"!==e.type||C?null:n(By,{message:v,time:e.time,windowStyle:y,sender:e.sender,ifShowName:i>1,ifShowAvatar:w,isMobile:_,scrollDown:g})},Yy=function(e){var t=e.messages,i=jt(e,["messages"]);return n("div",null,t.map(function(e){return Gy.apply(void 0,[e].concat(i))}).filter(function(e){return null!==e}).reduce(function(e,t){return e.concat(t)},[]))};Yy.propTypes={messages:Rh(zh({type:Wh.isRequired,sender:zh({name:Oh,avatar:Oh}),time:Wh,translated:Oh,content:Ph([Oh,zh({})]),ifShowLoading:Eh,queuePosition:Wh, estimatedWaitTime:Wh})),involvedAgentsCount:Wh,onChatWithAgentClick:Nh,onRelatedQuestionClick:Nh,OnRateClick:Nh,getSecureFormFailure:Nh,submitSecureForm:Nh,cancelSecureForm:Nh,onOfflineLinkClick:Nh,onStartChatAgainClick:Nh,gotoOfflineLinkText:Oh,startChatAgainText:Oh,translatedTag:Oh,originalTag:Oh,ifShowAvatar:Eh,agentTypingText:Oh,windowStyle:Oh};var Qy=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.onScroll=i.onScroll.bind(i),i.scrollDown=In(i.scrollDown.bind(i),100),i.canUpdateHideBio=!0,i.state={},i}return zt(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.onMounted(),setTimeout(function(){e.element&&(e.hasAnimation=!0,vt(e.element,"window__chat--animation"))},625),window.onbeforeunload=function(){return Fa(e.props.chatGuid)}},t.prototype.shouldComponentUpdate=function(e){return this.props.messages!==e.messages||e.ifHideBio!==this.props.ifHideBio||e.height!==this.props.height||e.hasMobileExpandWindow!==this.props.hasMobileExpandWindow},t.prototype.componentDidUpdate=function(e){var t=this,n=e.ifHideBio;this.props.ifHideBio!==n&&(this.canUpdateHideBio=!1,setTimeout(function(){t.canUpdateHideBio=!0},625)),this.hasAnimation&&vt(this.element,"window__chat--animation")},t.prototype.componentWillUnmount=function(){window.onbeforeunload=null},t.prototype.onScroll=function(e){if(!(window.navigator.userAgent.toLowerCase().indexOf("msie 9.0")>=0)){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.scrollDown=function(){this.element&&(this.element.scrollTop=this.element.scrollHeight)},t.prototype.render=function(){var e=this,t=this.props,i=t.greeting,o=t.height,r=t.hasMobileExpandWindow,a=jt(t,["greeting","height","hasMobileExpandWindow"]),s=void 0;if("bubble"===a.windowStyle){var c=0;if(this.element){var d=this.element.nextSibling;d&&"chat-input"===d.id&&(c=d.getBoundingClientRect().height)}s=a.isMobile?.9*o-(c||48)-35:o-30-30-35-(c||41),a.isPopout&&!a.isMobile&&(s+=30)}a.isPrint&&(s="");var l=void 0;return l="
 
"!==i&&!!i,n("div",{ref:function(t){e.element=t},className:cw("chat window__chat window__chat--animation",a.ifShowBio?"window__chat--withBio":"window__chat--noBio"),onScroll:this.onScroll,style:{maxHeight:s,marginBottom:r?"35px":""}},l&&n("div",null,n("div",{className:"bubble"===a.windowStyle?"chat-system-message window__chatSystemMessage":"greeting-message window__formGreeting"},n("div",{className:"bubble"===a.windowStyle&&"window__chatSystemMessageContent",dangerouslySetInnerHTML:{__html:i}}),"bubble"===a.windowStyle&&[n(Jv,{type:Qv,className:"icon-bubble-line",viewBox:"0 0 19 28"})])),n(Yy,Dt({},a,{scrollDown:this.scrollDown})))},t}(I);Qy.propTypes={greeting:Oh,onErrorClose:Nh.isRequired,onWarningClose:Nh.isRequired,onMounted:Nh.isRequired,agents:Mh(zh({name:Oh.isRequired,avatar:Oh.isRequired})).isRequired,height:Wh.isRequired};var Jy=function(e,t){return{type:e,time:new Date,content:t,sender:{type:"visitor"}}},Xy=function(e){var t=Yc(e),n=Xc(e).length,i=!0;t.filter(function(e){return"chatbotJoinChat"===e.type}).length>0&&(n+=1,i=!1);var o=Os(e),r=Cc(e),a=fc(e),s=Bc(e),c=cu(e,"greetingChatWindow");return!c||"
 
"!==c&&"
"!==c&&"
"!==c||(c=""),{height:r,isPopout:o,isMobile:a,ifShowBio:Hd(e),hasMobileExpandWindow:Od(e)&&a,windowStyle:Ol(e,s),greeting:i?c||"":"",messages:t,involvedAgentsCount:n,gotoOfflineLinkText:cu(e,"eventLinkText")||"here",startChatAgainText:cu(e,"startChatAgain"),translatedTag:cu(e,"translation"),originalTag:cu(e,"original"),agentTypingText:cu(e,"eventOperatorIsTyping"),chatWithAgentText:cu(e,"buttonChatbotChatWithAgent"),chatStatus:Rc(e),ifShowAvatar:"bubble"===El(e)||Ql(e),chatGuid:$c(e),ifHideBio:Ad(e),onMounted:function(){Of("livechat.chat.display",s)}}},Zy=function(e){return{submitSecureForm:function(t,n){var i=Jy("pendingSubmitSecureForm",t+"\u2299"+n);e(Xp([i]))},cancelSecureForm:function(t){e(Ku(t));var n=Jy("pendingCancelSecureForm","");e(Xp([n]))},getSecureFormFailure:function(){var t=Jy("pendingGetSecureFormFailure","");e(Xp([t]))},onOfflineLinkClick:function(){e(Uu(Jr))},onChatWithAgentClick:function(){e(sp())},onRelatedQuestionClick:function(t){e(cp(t))},OnRateClick:function(t,n){e(dp(n,t))},onStartChatAgainClick:function(){e(fp())},onUpdateScrollStatus:function(t){e(hp(t))},onChatbotTimeout:function(t){e(Ep(t))}}},$y=xg(Xy,Zy)(Qy),Ky=function(e){return{color:"white",languages:Dc(e).languages,content:$y,windowStyle:El(e),innerCss:Ci(zc(e),Ms(e),P(zs,e))}},ex=xg(Ky,null)(gy),tx=function(e){var t=Nc(e);if(!Pl(e))return{tab:t};var n=Bc(e),i=fc(e),o=Gd(e,n),r=o.languages,a=Hl(e),s=Pd(e),c=[];return Jd(e,n)&&c.push(iy),Qd(e,n)&&!dd(e)&&c.push(cy),Xd(e,n)&&c.push(Kv),Zd(e,n)&&c.push(py),$d(e,n)&&c.push(by),Kd(e,n)&&c.push(ex),{windowDisabled:s,tab:t,icons:c.map(function(e){return{props:{color:a,languages:r,isMobile:i},component:e}})}},nx=xg(tx,null)(Vv),ix=function(e){var t=fc(e),n=t||$s(e)?null:cd(e),i=Nc(e);if(!Pl(e))return{tab:i,poweredByUrl:n,showChatWithAgent:Fc(e)&&"toolbarWithBubble"===Oc(e),chatWithAgentText:cu(e,"buttonChatbotChatWithAgent")};var o=Bc(e);return{tab:i,icons:Ol(e,o)!==ys||t?null:nx,poweredByUrl:n}},ox=function(e){return{onChatWithAgentClick:function(){e(sp())}}},rx=xg(ix,ox)(qv),ax=Ph([Oh.isRequired,Wh.isRequired]).isRequired,sx=function(e,t){return{field:zh(Object.assign({type:Bh([].concat(e)).isRequired,id:ax,value:Ph([Oh,Rh(Oh)]),label:Oh.isRequired,error:Oh,isRequired:Eh,isErrorShowed:Eh,isHidden:Eh,isFocused:Eh},t)).isRequired}},cx=sx(qn),dx=(sx("comment"),sx("subject"),sx("content"),sx("ticket")),lx=sx(["text","name","phone","company","subject","ticket"]),ux=sx(["textarea","comment","content"]),px=sx("checkbox"),fx=function(e){return sx(e,{options:Rh(zh({label:Oh.isRequired,value:Oh})).isRequired})},hx=sx("department",{options:Rh(zh({label:Oh.isRequired,value:Ph([Wh,Oh]),isOnline:Eh.isRequired})).isRequired,value:Ph([Oh,Wh,Rh(Oh)]).isRequired}),mx=fx("rating"),bx=fx(["select","product"]),gx=fx("checkbox-list"),wx=fx("radio"),vx={field:zh({type:Bh(["custom"]).isRequired,id:ax,element:Nh.isRequired}).isRequired},yx={field:zh({type:Bh(["attachment"]).isRequired,id:ax,value:Ph([jh(window.File),Oh])}).isRequired},xx={},_x=Yt(5)(function(e){return gn("iframe",{src:e,style:{display:"none"}},document.body).then(function(t){function n(e){var t=e.data,n=o(t);if(n&&xx[n.meta]){var i=xx[n.meta],r=i.reject,a=i.resolve;n.error?r(n.payload):a(n.payload)}}var i=_e(t.contentWindow,e),o=function(e){try{return JSON.parse(e)}catch(e){return}};return i.subscribe(n),i})}),Cx=function(e,t){return yt({type:"facebook-init",payload:e},t)},kx=function(e){return yt({type:"facebook-login"},e)},Sx=function(e,t){return yt({type:"google-init",payload:e},t)},Ax=function(e){return yt({type:"google-login"},e)},Tx=function(e,t){return function(i){function o(e){Bt(this,o);var t=qt(this,i.call(this,e));return t.state={status:"loading"},t}return zt(o,i),o.prototype.componentDidMount=function(){var t=this;e().then(function(){t.setState({status:"done"})},function(){t.setState({status:"error"})})},o.prototype.render=function(){return"loading"===this.state.status?n(Jv,{type:"loading",className:"svg--loading",viewBox:"0 0 100 100"}):"done"===this.state.status?n(t,this.props):null},o}(I)},Ix=function(e){return n("div",{className:"greeting-message window__formGreeting",id:e.prefix+"-greeting",dangerouslySetInnerHTML:{__html:e.greeting}})},Rx=Og("greeting")(Ix),Px=function(e){var t=e.isSubmitting,i=e.onClick,o=e.success,r=e.text,a=e.disabled,s=jt(e,["isSubmitting","onClick","success","text","disabled"]);return n("div",Dt({className:cw("buttonProgressContainer",t&&!o&&"buttonProgressContainerLoading",o&&"buttonProgressContainerSuccess")},s),n(Yv,{type:"primary",text:r,className:"buttonProgressBtnAnimated buttonProgressBtnDefaultSize",htmlType:"submit",onClick:i,disabled:a||t}),n("div",{className:"lds-css ng-scope"},n("div",{className:"lds-rolling"})),n("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"},n("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"})),n("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"},n("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"})))};Px.propTypes={success:Ih.bool.isRequired,isSubmitting:Ih.bool,text:Ih.string.isRequired,disabled:Ih.bool};var Mx=function(e){return n(Px,{onClick:e.onClick,isSubmitting:e.isSubmitting,success:e.success,text:e.text,disabled:e.disabled})},Ox=Og("submit")(Mx),Ex=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.shouldCOmponentUpdate=Hh(i,["input.value","isDisabled"]),i}return zt(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,i=!(!t.input.value&&!t.initialValue);return n("div",{className:cw("container-checkbox",t.isDisabled&&"disable",t.className),onClick:t.isDisabled?void 0:function(){t.input.onChange(!i,t.text,t.id)}},n("span",{className:"checkbox__text"},t.text),n("input",{id:"checkbox-"+t.id,type:"Checkbox",className:"checkbox",disabled:!!t.isDisabled&&"disabled",checked:i,onFocus:t.input.onFocus,onBlur:t.input.onBlur,ref:function(t){e.element=t}}),n("i",{className:i?"selected":"unselected"},n(Jv,{type:"checkbox"})))},t}(I);Ex.propTypes={input:Ih.shape({value:Ih.bool.isRequired,onChange:Ih.func.isRequired,onFocus:Ih.func.isRequired,onBlur:Ih.func.isRequired}).isRequired,initialValue:Ih.bool,onChange:Ih.func,text:Ih.string,className:Ih.string,isDisabled:Ih.bool,id:Ih.string,focused:Ih.bool},Ex.defaultProps={initialValue:!1};var Nx=["name",qn,"phone","company","product","department","rating","comment","subject","content","attachment"],Wx=function(e){return Nx.indexOf(e)>=0},Bx=function(e){var t=function(t){function i(e){Bt(this,i);var n=qt(this,t.call(this,e));return n.params={onChange:n.onChange.bind(n),onBlur:n.onBlur.bind(n),onFocus:n.onFocus.bind(n),siteId:e.siteId,style:e.style,isHorizontal:e.isHorizontal,disabled:e.disabled,languages:e.languages},n.shouldComponentUpdate=Hh(n,["field","disabled"]),n}return zt(i,t),i.prototype.componentWillReceiveProps=function(e){var t=this.params;t.disabled===e.disabled&&t.languages===e.languages||(this.params=Object.assign({},this.params,{disabled:e.disabled,languages:e.languages}))},i.prototype.onChange=function(e){this.props.onChange(this.props.field,e)},i.prototype.onBlur=function(){this.props.onBlur(this.props.field)},i.prototype.onFocus=function(){this.props.onFocus(this.props.field)},i.prototype.render=function(){var t=this.props.field,i=t.label,o=t.error,r=t.isErrorShowed,a=t.isHidden,s=t.isRequired,c=Wx(t.type);if(a)return null;var d="checkbox"===t.type&&!this.props.isHorizontal;return n("div",{className:cw("box-field",c&&"system-field")},n("div",{className:"field-name"},d?"":i,s&&n("span",{className:"field__requiredTag"},"*"),r&&o&&n("span",{className:"field__requiredMsg"},o)),e(t,this.params))},i}(I);return t.propTypes={field:Ph([px,gx,cx,wx,ux,lx].map(function(e){return zh(e.field)})),onChange:Nh.isRequired,onBlur:Nh.isRequired,onFocus:Nh.isRequired,siteId:Wh.isRequired,isHorizontal:Eh,style:Bh([ys,xs,"bubble"]).isRequired},gt(t)},Dx=function(e,t){var i=t.onChange,o=t.onBlur,r=t.onFocus,a=t.isHorizontal,s=t.disabled,c=e.value;if(Array.isArray(c)){var d=c.indexOf(e.label);c=d>=0?"true":"false",i(d>=0?"true":"false")}else c||(c="false",i("false"));return n(Ex,{input:{value:c&&"true"===c.toString(),onChange:function(e){i(e?"true":"false")},onFocus:r,onBlur:o},text:a?"":e.label,id:e.id,focused:e.isFocused,isDisabled:s})},zx=Bx(Dx);zx.propTypes=px;var jx=gt(zx),qx=function(){},Lx=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));i.Change=i.Change.bind(i),i.shouldComponentUpdate=Hh(i,["input.value","options"]);var o=i.validate.bind(i);return i.componentDidMount=o,i.componentDidUpdate=o,i}return zt(t,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||qx;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,i=t.className,o=t.options,r=t.align,a=t.focused,s=jt(t,["className","options","align","focused"]);return n("div",{className:cw("container-checkboxlist",i)},o.map(function(t,i){return n("div",{key:t.id,className:"horizontal"===r?"horizontal":"vertical"},n(Ex,Dt({},s,{focused:0===i&&a,id:t.id.toString(),text:t.text,input:{value:-1!==e.props.input.value.indexOf(t.id.toString()),onChange:e.Change,onBlur:e.props.input.onBlur,onFocus:e.props.input.onFocus}})))}))},t}(I);Lx.defaultProps={align:"vertical"},Lx.propTypes={input:Ih.shape({value:Ih.arrayOf(Ih.string).isRequired,onChange:Ih.func.isRequired,onFocus:Ih.func.isRequired,onBlur:Ih.func.isRequired}).isRequired,options:Ih.arrayOf(Ih.shape({text:Ih.string,id:Ih.number})).isRequired,className:Ih.string,align:Ih.string};var Vx=function(e,t){var i=t.onChange,o=t.onBlur,r=t.onFocus,a=t.disabled,s=e.value;return Array.isArray(s)||(s?(s=e.options.find(function(e){return e.value===s})?[s]:[],i(s)):s=[]),n(Lx,{input:{value:s,onChange:i,onFocus:r,onBlur:o},options:e.options.map(function(e){return{id:e.value,text:e.label}}),focused:e.isFocused,isDisabled:a})},Fx=Bx(Vx);Fx.propTypes=gx;var Ux=gt(Fx),Hx=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.onChange=i.onChange.bind(i),i}return zt(t,e),t.prototype.componentDidMount=function(){this.element=this.props.element(this.onChange),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.render=function(){var e=this;return n("div",{ref:function(t){e.container=t}})},t}(I);Hx.propTypes=vx;var Gx=gt(Hx),Yx=function(e,t){var i=t.onChange,o=t.onBlur,r=t.onFocus,a=t.style,s=t.disabled,c=e.value;return Array.isArray(c)&&(c=c.join(","),i(c)),n("div",{className:"field-control"},n(oy,{maxLength:64,type:"email",input:{value:e.value,onBlur:function(e){var t=e.target.value;t!==c&&i(t),o()},onFocus:r,disabled:s},meta:{invalid:!!e.error,touched:e.isErrorShowed},isRequired:e.isRequired,isDisabled:s,animationEffect:ys===a,focused:e.isFocused}))},Qx=Bx(Yx);Qx.propTypes=cx;var Jx=gt(Qx),Xx=function(e){function t(){Bt(this,t);var n=qt(this,e.call(this));return n.shouldComponentUpdate=Hh(n,["radioOption","selectedVal"]),n.id=Date.now(),n}return zt(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.first&&this.first.focus()},t.prototype.render=function(){var e=this;return n("div",{className:"clearfix"},this.props.radioOption.map(function(t,i){var o=e.id+"-"+i;return n("label",{key:t.id,className:cw("control","controlRadio",e.props.className),htmlFor:o},t.text,n("input",{type:"radio",name:e.props.name,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===i&&(e.first=t)}}),n("div",{className:"controlIndicator"}),t.component?t.component:"")}))},t}(I);Xx.propTypes={name:Ih.string.isRequired,radioOption:Ih.arrayOf(Ih.shape({text:Ih.string,value:Ih.string,checked:Ih.bool})).isRequired,selectedVal:Ih.string,handleChange:Ih.func.isRequired,onBlur:Ih.func.isRequired,onFocus:Ih.func.isReuqired,className:Ih.string,disabled:Ih.bool};var Zx=function(e,t){var i=t.onChange,o=t.onBlur,r=t.onFocus,a=t.disabled,s=e.value;return Array.isArray(s)&&(s=s.find(function(t){return e.options.some(function(e){return e.value===t})})||null,i(s)),n(Xx,{name:e.label,radioOption:e.options.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!==s&&i(t)},onBlur:o,onFocus:r,focused:e.isFocused,disabled:a})},$x=Bx(Zx);$x.propTypes=wx;var Kx=gt($x),e_=function(e,t){var i=t.onChange,o=t.onBlur,r=t.onFocus,a=t.disabled,s=e.value;return Array.isArray(s)&&(s=s.join(","),i(s)),n("div",{className:"field-control"},n(Uv,{input:{value:e.value,onBlur:function(e){var t=e.target.value;s!==t&&i(t),o()},onFocus:r},rows:2,meta:{touched:e.isErrorShowed,invalid:!!e.error},maxLength:2048,focused:e.isFocused,isDisabled:a}))},t_=Bx(e_);t_.propTypes=ux;var n_=gt(t_),i_=function(e){var t=function(t,i){var o=i.onChange,r=i.onBlur,a=i.onFocus,s=i.style,c=i.disabled,d=t.value;return Array.isArray(t.value)&&(d=d.join(","),o(d)),n("div",{className:"field-control"},n(oy,{maxLength:e,type:"text",input:{value:t.value,onBlur:function(e){var t=e.target.value;t!==d&&o(t),r()},onFocus:a},meta:{invalid:!!t.error,touched:t.isErrorShowed},isRequired:t.isRequired,animationEffect:s===ys,focused:t.isFocused,isDisabled:c}))},i=Bx(t);return i.propTypes=lx,gt(i)},o_=i_(128),r_=i_(64),a_=i_(32),s_=i_(64),c_=function(e,t){return e==t},d_=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.shouldComponentUpdate=Hh(i,["options","disabled","className","width","selectedValue"]),i.handleChange=i.handleChange.bind(i),i.validate=i.validate.bind(i),i}return zt(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!c_(t.value,e.props.selectedValue)})&&this.props.handleChange(this.props.options[0].value)},t.prototype.render=function(){var e=this,t=this.props,i=t.options,o=t.disabled,r=t.className,a=t.width,s=t.selectedValue,c=jt(t,["options","disabled","className","width","selectedValue"]);return n("div",{className:"select-box",style:{width:a+"px"}},n("select",Dt({disabled:o,onChange:this.handleChange,className:"select "+(void 0!==r?r:""),ref:function(t){e.element=t}},c),i.map(function(e){return n("option",{index:e.id,style:{color:e.themeColor},value:e.value,selected:c_(s,e.value)},e.text)})))},t}(I);d_.propTypes={options:Ih.arrayOf({id:Ih.number,value:Ih.string,themeColor:Ih.string}),selectedValue:Ih.string,handleChange:Ih.func.isRequired,disabled:Ih.bool,className:Ih.string,width:Ih.number,focused:Ih.bool};var l_=function(e,t){var i=t.onChange,o=t.onBlur,r=t.onFocus,a=t.disabled,s=t.languages,c=e.value;return Array.isArray(c)&&(c=c.find(function(t){return e.options.some(function(e){return e.value===t})})||"",i(c)),n(d_,{options:[{id:-1,text:s.dropdownListDefault,value:""}].concat(e.options.map(function(e,t){return{id:t,value:e.value,text:e.label}})),selectedValue:c,handleChange:i,onFocus:r,onBlur:o,focused:e.isFocused,disabled:a})},u_=Bx(l_);u_.propTypes=bx;var p_=gt(u_),f_=function(e,t){var i=t.onChange,o=t.onBlur,r=t.onFocus,a=t.disabled,s=t.languages,c=e.value;return Array.isArray(c)?(c=c.find(function(t){return e.options.some(function(e){return e.value==t})})||"",i(c)):-1===c&&(c=""),n(d_,{options:[{id:-1,text:s.fieldNoDepartment,value:""}].concat(e.options.map(function(e,t){return{id:t,value:e.value,text:e.label+" "+(e.isOnline?s.fieldDepartmentStatusOnline:s.fieldDepartmentStatusOffline),themeColor:e.isOnline?"green":"red"}})),selectedValue:c,handleChange:i,onFocus:r,onBlur:o,focused:e.isFocused,disabled:a})},h_=Bx(f_);h_.propTypes=hx;var m_=gt(h_),b_=function(e,t){var i=t.onChange,o=t.onBlur,r=t.onFocus,a=t.disabled,s=e.value;return Array.isArray(s)&&(s=s.find(function(t){return e.options.some(function(e){return+e.value==+t})})||0,i(s)),n(Fv,{rateVal:+s,rateItems:e.options.map(function(e){return{id:e.id,value:e.value,label:e.label}}),rateChange:i,onBlur:o,onFocus:r,disabled:a})},g_=Bx(b_);g_.propTypes=mx;var w_=gt(g_),v_=function(e,t){var i=t.onChange,o=t.onBlur,r=t.onFocus,a=t.siteId,s=t.style,c=t.disabled,d=e.value;return Array.isArray(d)&&(d=d[0],i(d)),n("div",{className:"fieldControl__Ticket"},n("div",{className:"form__ticketPrefix"},"S"+a+"-T"),n("div",{className:"field-control"},n(oy,{maxLength:256,type:"text",input:{value:d,onBlur:function(e){var t=e.target.value;t!==d&&i(t),o()},onFocus:r},meta:{invalid:!!e.error,touched:e.isErrorShowed},isDisabled:c,isRequired:e.isRequired,animationEffect:ys===s,focused:e.isFocused,className:En&&"form__input--ie10"})))},y_=Bx(v_);y_.propTypes=dx;var x_=gt(y_),__=function(e,t){var i=t.onChange,o=t.onBlur,r=t.onFocus,a=t.disabled;return n("input",{type:"file",onChange:function(e){i(e.target.files[0])},onBlur:o,onFocus:r,disabled:a})},C_=function(e){function t(){return Bt(this,t),qt(this,e.apply(this,arguments))}return zt(t,e),t.prototype.componentDidMount=function(){im(this.div,this.props)},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){var e=this;return n("div",{ref:function(t){e.div=t}})},t}(I),k_=function(e,t,i,o){return n(C_,{onChange:t,onBlur:i,onFocus:o})},S_=vi()?k_:__,A_=Bx(S_);A_.propTypes=yx;var T_,I_=gt(A_),R_=(T_={},T_.name=r_,T_[qn]=Jx,T_.phone=a_,T_.company=s_,T_.product=p_,T_.department=m_,T_.rating=w_,T_.comment=n_,T_.content=n_,T_.subject=o_,T_.ticket=x_,T_.checkbox=jx,T_["checkbox-list"]=Ux,T_.custom=Gx,T_.radio=Kx,T_.select=p_,T_.textarea=n_,T_.text=o_,T_.attachment=I_,T_),P_=function(e){var t=e.fields,i=e.siteId,o=e.onChange,r=e.onBlur,a=e.onFocus,s=e.style,c=e.isHorizontal,d=e.disabled,l=e.languages;return n("div",{className:"field-table form-style-hor"},t.map(function(e){return n(R_[e.type],{siteId:i,field:e,onChange:o,onBlur:r,onFocus:a,style:s,isHorizontal:c,disabled:d,languages:l})}))},M_=Og("form")(P_),O_=["name",qn,"company","phone","comment","content","subject","text","textarea"],E_=Yt(1)(function(e,t,i,o,r,a){if(!e&&!t)return null;var s=void 0,c=void 0,d=i+"&key="+r;if(e){var l=Tx(P(Cx,e,d),mw);s=n(l,{type:"facebook",id:"fb-login",onClick:function(){return kx(d).then(o)}})}else s=null;if(t){var u=Tx(P(Sx,t,d),mw);c=n(u,{type:"googleplus",id:"gp-login",onClick:function(){return Ax(d).then(o)}})}else c=null;return Og("social")(function(){return n("div",{id:"social-logins",className:"prechatForm__login"},n("span",{className:"float-left lang-sign-in-with system LanguagePreChatSocialMediaSignInWith prechatForm__signinwith"},a.preChatSocialMediaSignInWith),n("span",{id:"social-login-icons",className:"float-left box-icons prechatForm__social"},s,c),n("div",{className:"clear"}),n("div",{className:"box-hor-or"},n("span",{className:"LanguagePreChatSocialMediaOr hor-or prechatForm__divide"},a.preChatSocialMediaOr)))})}),N_=function(e,t){var n=e.facebookAppId,i=e.googleClientId,o=e.iframeSrc,r=e.onLogin,a=e.languages;return E_(n,i,o,r,t,a)},W_=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={animated:!1,isAnimationEnd:!1},i.onSubmit=i.onSubmit.bind(i),i.social=null,i.key=+new Date,i.social=N_(n,i.key),i.onAnimated=i.onAnimated.bind(i),i.onAnimationEnd=i.onAnimationEnd.bind(i),i}return zt(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.onMounted(),setTimeout(function(){e.element.scrollTop=0},0),On&&this.onAnimationEnd(),this.animation.addEventListener("animationend",this.onAnimationEnd,!1);var t=this.props.fields,n=t.findIndex(function(e){return O_.indexOf(e.type)>=0});n<0||this.props.isMobile||(this.props.onFocus(t[n]),this.animation.addEventListener("animationend",this.onAnimated,!1))},t.prototype.componentWillReceiveProps=function(e){this.social=N_(e,this.key)},t.prototype.componentWillUnmount=function(){this.animation&&(this.animation.removeEventListener("animationend",this.onAnimated),this.animation.removeEventListener("animationend",this.onAnimationEnd))},t.prototype.onAnimated=function(){this.setState({animated:!0})},t.prototype.onAnimationEnd=function(){this.setState({isAnimationEnd:!0})},t.prototype.onSubmit=function(){var e=this;setTimeout(function(){e.props.onSubmit(e.props.fields)},0)},t.prototype.render=function(){var e=this,t=this.props,i=t.prefix,o=t.greeting,r=t.fields,a=t.submitStatus,s=t.onChange,c=t.onBlur,d=t.onFocus,l=t.isHorizontal,u=t.buttonText,p=t.siteId,f=t.style,h=t.error,m=t.windowStyle,b=t.disabled,g=t.tab,w=t.height,v=t.isPopout,y=t.languages,x=t.isMobile,_=void 0;return"bubble"===m&&(_=w-30-30-35,v&&!x&&(_+=30)),"bubble"===m?n("div",{className:"window__formContainer window__formContainer--bubble",style:{maxHeight:_,overflowY:this.state.isAnimationEnd?"auto":"hidden"},ref:function(t){e.element=t}},n("div",{className:cw("form window__form",!this.state.animated&&"window__form--animation"),id:i+"-window",ref:function(t){e.animation=t}},h&&n("div",{className:"window__formError"},h),o&&n(Rx,{prefix:i,greeting:o,tab:g}),this.social&&n(this.social,{tab:g}),n("div",{id:i+"-fields",className:cw("form-fields",l&&"form-fields--horizonal")},n(M_,{tab:g,fields:r,siteId:p,onChange:s,onBlur:c,onFocus:d,style:f,isHorizontal:l,disabled:b,languages:y})),n("div",{className:"form-bottom form__submitContainer"},n(Ox,{tab:g,onClick:this.onSubmit,isSubmitting:"pending"===a,success:"success"===a,text:u,disabled:b})),"bubble"===m&&[n(Jv,{type:Qv,className:"icon-bubble-line",viewBox:"0 0 19 28"})])):n("div",{className:cw("form window__form",!this.state.animated&&"window__form--animation"),id:i+"-window",style:{maxHeight:_},ref:function(t){e.element=t,e.animation=t}},h&&n("div",{className:"window__formError"},h),o&&n(Rx,{prefix:i,greeting:o,tab:g}),this.social&&n(this.social,{tab:g}),n("div",{id:i+"-fields",className:cw("form-fields",l&&"form-fields--horizonal")},n(M_,{tab:g,fields:r,siteId:p,onChange:s,onBlur:c,onFocus:d,style:f,isHorizontal:l,disabled:b,languages:y})),n("div",{className:"form-bottom form__submitContainer"},n(Ox,{tab:g,onClick:this.onSubmit,isSubmitting:"pending"===a,success:"success"===a,text:u,disabled:b})),"bubble"===m&&[n(Jv,{type:Qv,className:"icon-bubble-line",viewBox:"0 0 19 28"})])},t}(I);W_.propTypes={fields:Rh(Ph([lx,cx,ux,mx,px,bx,gx,wx,vx,yx].map(function(e){return zh(e.field)}))).isRequired,onChange:Nh.isRequired,onBlur:Nh.isRequired,onFocus:Nh.isRequired,onSubmit:Nh.isRequired,onLogin:Nh,submitStatus:Bh(["pending","success","fail","none"]).isRequired,facebookAppId:Oh,googleClientId:Oh,iframeSrc:Oh.isRequired,prefix:Oh.isRequired,greeting:Oh,isHorizontal:Eh.isRequired,buttonText:Oh.isRequired,siteId:Wh.isRequired,style:Bh([ys,xs,"bubble"]).isRequired,error:Oh.isRequired,disabled:Eh.isRequired,onMounted:Nh.isRequired,isMobile:Eh.isRequired};var B_=gt(W_),D_=function(e){var t="";return"prechat"===e?t="livechat.prechat":"postchat"===e?t="livechat.postChat":"offline"===e&&(t="livechat.offlineMessage"),xg(function(n){var i="prechat"===e,o=Zs(n),r=i&&Gl(n),a=i&&Yl(n),s=r&&!o?Gs(n):void 0,c=a&&!o?Ys(n):void 0,d=void 0;"prechat"===e?d=Gr:"postchat"===e?d=Qr:"offline"===e&&(d=Jr);var l=Os(n),u=Cc(n),p=Bc(n),f=Al(n,e,p),h=Pd(n);"offline"===e&&0===f.length&&(h=!0);var m=su(n);return{height:u,isPopout:l,tab:d,fields:f,prefix:e,facebookAppId:s,googleClientId:c,iframeSrc:zs(n,"/iframe.html?origin="+location.origin),submitStatus:Tl(n,e),greeting:ql(n,e),isHorizontal:Ll(n),buttonText:Vl(n,e),hCallback:void 0,siteId:ic(n),style:El(n),error:id(n),windowStyle:Ol(n,p),disabled:h,isMobile:fc(n),languages:m,onMounted:function(){Of(t+".display",p)}}},function(n){return{onChange:function(i,o){n(Bf(e,i.id,o)),Of(t+".field.change",Object.assign({},i,{value:o}))},onBlur:function(i){n(zf(e,i.id)),Of(t+".field.blur",Object.assign({},i,{isFocused:!1}))},onFocus:function(i){n(Df(e,i.id)),Of(t+".field.focus",Object.assign({},i,{isFocused:!0}))},onLogin:function(t){n(Hf(e,t))},onSubmit:function(t){return n(Zf(e,1500,t))}}})(B_)},z_=D_("prechat"),j_=D_("postchat"),q_=D_("offline"),L_=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.state={animated:!1},i}return zt(t,e),t.prototype.render=function(){var e=this,t=this.props;return n("div",{id:"prelogin-window",className:cw("ssologin window__form",!this.state.animated&&"window__form--animation","window__ssologin"),onAnimationEnd:function(){e.setState({animated:!0})}},t.errorMsg&&n("div",{className:"error ssologin__error window__ssologinError"},t.errorMsg),n("div",{id:"prelogin-login-greeing",className:"LanguagePromptIfLogin ssologin__greeting window__ssologinGreeting"},t.promptIfLogin),n("div",{className:"form-bottom window__ssologinForm"},n("input",{id:"sso-login",type:"button",className:"btn btn-primary LanguageButtonLoginAsUser window__ssologinOperation",value:t.buttonLogin,style:{width:115},onClick:t.onLoginClick}),n("input",{id:"chat-as-visitor",type:"button",className:"btn btn-primary LanguageButtonChatAsVisitor window__ssologinOperation",value:t.buttonNotNow,style:{width:115},onClick:t.onNotNowClick})),"bubble"===t.windowStyle&&[n(Jv,{type:Qv,className:"icon-bubble-line",viewBox:"0 0 19 28"})])},t}(I);L_.propTypes={promptIfLogin:Oh,buttonLogin:Oh,buttonNotNow:Oh,errorMsg:Oh,onLoginClick:Nh,onNotNowClick:Nh};var V_=function(e){return{windowStyle:Ol(e,ec(e)),errorMsg:id(e),promptIfLogin:cu(e,"promptIfLogin"),buttonLogin:cu(e,"buttonLoginAsUser"),buttonNotNow:cu(e,"buttonChatAsVisitor")}},F_=function(e,t){var n=t.dispatch;return Dt({},e,{onNotNowClick:function(){n(Hp()),n(Wp())},onLoginClick:function(){n(Uu("ssoLogin"))}})},U_=xg(V_,null,F_)(L_),H_=function(e){try{return JSON.parse(e)}catch(e){return}},G_=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.eventListener=i.eventListener.bind(i),i.state={reload:0},i}return zt(t,e),t.prototype.componentDidMount=function(){this.iframe&&this.iframe.contentWindow.parent.addEventListener("message",this.eventListener)},t.prototype.componentWillUnmount=function(){this.iframe&&this.iframe.contentWindow.parent.removeEventListener("message",this.eventListener)},t.prototype.eventListener=function(e){if(-1!==e.origin.toLowerCase().indexOf("comm100.com")&&e.data){var t=H_(e.data);if(!t)return;"sso-login"===t.type&&(t.payload&&"object"===Wt(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,i=this.props.targetUrl.match(/^[^:]+:\/\/[^\/]+/)[0],o=t.url+encodeURIComponent("?target="+i),r=o+"&color=ffffff&r="+this.state.reload;return n("div",{className:"window__ssoLogin"},n("iframe",{ref:function(t){e.iframe=t},frameBorder:0,src:r,style:{display:"block",width:"100%",height:"100%",minHeight:456,backgroundColor:"#fff"}}))},t}(I);G_.propTypes={handleSSOInfo:Nh,url:Oh,ifShowPreLogin:Eh,targetUrl:Oh};var Y_=function(e){return{url:qc(e),ifShowPreLogin:Lc(e),targetUrl:window.location.href,departments:fl(e),preChatFields:Il(e)}},Q_=function(e,t){var n=t.dispatch;return Dt({},e,{handleSSOInfo:function(t){n(Up(t));var i={};Object.keys(t).forEach(function(n){if("fields"===n)i.custom={},t[n].forEach(function(t){ e.preChatFields.filter(function(e){return e.label===t.name&&"checkbox-list"===e.type}).length>0?i.custom[t.name]=t.value.split("\u2299"):i.custom[t.name]=t.value});else if("department"===n){var o=Object.keys(e.departments).filter(function(n){return e.departments[n].name===t.department});o.length>0?i[n]=Number(o[0]):i[n]=""}else"ssoId"===n&&"userId"===n&&"variables"===n||(i[n]=t[n])}),n(Vf(i))},gotoPreLogin:function(){n(Uu(Hr))}})},J_=xg(Y_,null,Q_)(G_),X_=void 0,Z_=void 0,$_=[],K_="visitorMsgRestritUnlockTimeKey2",eC="visitorMsgSentTimeKey",tC="penaltyFactorKey",nC=1,iC=null,oC=void 0,rC=[],aC=null,sC={},cC=void 0,dC=function(e){var t=Ra(Z_).frequencyLimit;return null==t?"":t[e]},lC=function(e,t){return sC[K_]=dC(K_),sC[eC]=dC(eC),sC[tC]=dC(tC),sC[e]=t,sC},uC=function(){var e=(new Date).getTime(),t=dC(eC);if(void 0!==t&&null!==t&&""!==t){var n=!1;t.split(":").forEach(function(t){var i=new Date(+t);e-i<=1e3*X_.penalty&&($_.push(+t),rC.push(setTimeout(Pt,1e3*X_.penalty-(e-i))),n=!0)}),n&&Ct()}var i=xt();if(i&&e=s.scrollHeight?"hidden":"auto",s.style.height="auto",s.style.height=s.scrollHeight+"px",a&&(r.scrollTop=r.scrollHeight)}},t.prototype.componentWillUnmount=function(){if(this.inputElement){var e=this.inputElement.ownerDocument;e.removeEventListener("dragOver",this.onDragOver),e.removeEventListener("dragLeave",this.onDragLeave),e.removeEventListener("drop",this.onDrop)}},t.prototype.onFocus=function(){this.setState({textareaFocused:!0}),this.props.onFocus()},t.prototype.onBlur=function(){this.setState({textareaFocused:!1}),this.props.onBlur()},t.prototype.onAnimationEnd=function(){this.setState({isAnimationEnd:!0})},t.prototype.trySend=function(){if(!this.state.draft.match(/^\s*$/)){if(this.state.draft.length>1e4)return void this.props.onError("maxLengh");if(hC().isLimited)return void this.props.onError("limited",{seconds:mC()});var e=this.props.isCreditCardMasking?$n(this.state.draft):this.state.draft;this.props.onSend(e,e!==this.state.draft),this.setState({draft:""}),this.inputElement.value="",this.props.isMobile||this.inputElement.focus()}},t.prototype.trySendFile=function(e){if(hC().isLimited)return void this.props.onError("limited",{seconds:mC()});this.props.isSendingFile||this.props.onSendFile(e)},t.prototype.update=function(e){if(this.state.draft!==e){var t="";this.props.isShowTypingContent&&(t=e,t.length>500&&(t=t.substr(0,500)+"..."),this.props.isCreditCardMasking&&(t=$n(t))),this.props.onVisitorIsTyping(t),this.setState({draft:e})}},t.prototype.render=function(){var e=this,t=this.props,i=t.onWarningClose,o=t.onErrorClose,r=t.error,a=t.warning,s=function(e,t){return n("span",{className:"window_chatErrorClose"},n(mw,{type:hw.close,size:12,onClick:e,color:t}))};return n("div",{id:"chat-input",ref:function(t){e.container=t},style:this.props.hasMobileExpandWindow?{bottom:"35px"}:null,className:cw("window__chatInput","chatInputContainer",this.state.isAnimationEnd?"":"chatInputContainer--fadeInUp",this.props.mobileFootIcons?"chatInputContainer--withplus":"",""!==this.state.draft||this.state.textareaFocused?"chatInputContainer--active":"",""!==this.state.draft?"chatInputContainer--typed":"",this.state.isDragged&&!this.props.isSendingFile?"window__chatInput--Drag icon icon-drag":""),onTouchMove:mn},this.props.ifShowChatWithAgent&&n("div",{onClick:this.props.onChatWithAgentClick,className:"window__chatWithAgent window__chatWithAgent--above"},this.props.chatWithAgentText),this.props.mobileFootIcons&&n(this.props.mobileFootIcons),n("div",{className:"chat-input__controlbox "+(this.props.isDisabled?"chat-input__controlbox--disabled":"")},n(bC,{refCb:function(t){e.inputElement=t},isMobile:this.props.isMobile,value:this.state.draft,isDisabled:this.props.isDisabled,placeHolder:this.props.placeHolder,onFocus:this.onFocus,onBlur:this.onBlur,update:this.update,onSend:this.trySend}),this.props.footIcons&&n(this.props.footIcons)),(this.props.isClassic||this.props.isMobile)&&n("label",{htmlFor:"chat-input-control",className:cw("window__chatSender",""===this.state.draft?"":"window__chatSender--active"),onClick:this.trySend},n(mw,{type:hw.inputSend})),a&&n("div",{className:"window_chatError window_chatError--mitigate"},a,s(i,"#ee8835")),r&&n("div",{className:"window_chatError window_chatError--urgency"},r,s(o,"#de3939")))},t}(I);gC.defaultProps={onSend:function(){},onError:function(e){},onSendFile:function(){},isDisabled:!0,isCreditCardMasking:!0,onFocus:function(){},onBlur:function(){},rows:1,placeHolder:"placeholder",isDragEnabled:!1,draft:"",fileUploadURL:"www.baidu.com",limitConfig:{repeat:2,penalty:3,count:6,duration:7},chatGUID:1,footIcons:null,mobileFootIcons:null},gC.propTypes={onSend:Ih.func,onSendFile:Ih.func,onError:Ih.func,onFocus:Ih.func,onBlur:Ih.func,placeHolder:Ih.string,isDragEnabled:Ih.bool,draft:Ih.string,isCreditCardMasking:Ih.bool,isDisabled:Ih.bool,limits:{frequency:{repeat:Ih.number,penalty:Ih.number,count:Ih.number,duration:Ih.number},fileSize:Ih.number},chatGUID:Ih.number,footIcons:Ih.func,mobileFootIcons:Ih.func,frequencyLimitClocker:Ih.func,frequencyLimitState:Ih.func,ifShowChatWithAgent:Ih.bool,onChatWithAgentClick:Ih.func,chatWithAgentText:Ih.string,error:Ih.string,warning:Ih.string};var wC=function(e){function t(){Bt(this,t);var n=qt(this,e.call(this));return n.state={active:!1},n.onIconSelected=n.onIconSelected.bind(n),n.toggle=n.toggle.bind(n),n.closeChatOperationPlusBox=function(e){n.element&&n.element.contains(e.target)||n.toggle(!1)},n}return zt(t,e),t.prototype.componentWillMount=function(){var e=this;this.props.isActive&&setTimeout(function(){e.toggle(!0)},0)},t.prototype.componentDidMount=function(){var e=this;this.element.ownerDocument.body.addEventListener("click",function(t){e.closeChatOperationPlusBox(t)})},t.prototype.componentWillReceiveProps=function(e){var t=this;e.isActive&&setTimeout(function(){t.toggle(!0)},0)},t.prototype.componentWillUnmount=function(){this.element.ownerDocument.body.removeEventListener("click",this.closeBubble)},t.prototype.onIconSelected=function(){this.toggle(!1)},t.prototype.toggle=function(e){this.state.active!==e&&this.setState({active:e})},t.prototype.render=function(){var e=this,t=this.props;return t.icons?n("div",{className:"window__chatOperationPlusBox",ref:function(t){e.element=t}},n("div",{className:"window__chatOperationPlus"},n(mw,{disabled:!1,color:t.color,className:t.className,type:hw.plus,active:this.state.active,onClick:function(){e.toggle(!e.state.active)}})),this.state.active&&t.icons&&n(t.icons,{isMobile:!0,isShow:!0,onIconSelected:this.onIconSelected})):null},t}(I);wC.protoTypes={icons:Ih.func,color:Ih.string,className:Ih.string};var vC=function(e){if(!Pl(e))return{};var t=Bc(e),n=Gd(e,t),i=n.mainColor,o=fd(e),r=dd(e),a=Fd(e),s=si(i);return{icons:nx,isActive:a&&!o&&!r,color:s,isMobile:!0}},yC=xg(vC,null)(wC),xC=function(e){var t=Dc(e),n=Bc(e),i=!pd(e)&&Jd(e,t.id)&&e.window.chatStatus===Kr,o=Ol(e,n),r=Pl(e),a=o===ys,s=fc(e),c=s||a||!r?null:nx,d=s&&r?yC:null,l=Od(e)&&s,u=Oc(e),p=("aboveInput"===u||"toolbarWithBubble"===u&&s)&&kd(e);return{isMobile:s,isClassic:a,hasMobileExpandWindow:l,chatWindowType:t.style,placeHolder:t.languages.promptPressEnterToSend,isCreditCardMasking:Bl(e),isShowTypingContent:Dl(e),isDragEnabled:i,isDisabled:!ud(e),chatGUID:$c(e),limits:{fileSize:Qs(e)*Math.pow(2,20),frequency:Xs(e)},footIcons:c,mobileFootIcons:d,ifShowChatWithAgent:p,chatWithAgentText:cu(e,"buttonChatbotChatWithAgent"),error:id(e),warning:od(e),chatStatus:Rc(e),isSendingFile:pd(e)}},_C=function(e){return{onSend:function(t,n){Of("livechat.chat.visitor.input",t),e(Qu(t,n))},onSendFile:function(t){return e(Ju(t))},onError:function(t,n){e(up(t,n))},frequencyLimitClocker:function(t){e(t<=0?np():up("limited",{seconds:t,fromClocker:!0}))},frequencyLimitState:function(t){e(pp(t))},onVisitorIsTyping:function(t){e(yp(t))},onChatWithAgentClick:function(){e(sp())},onWarningClose:function(){e(np())},onErrorClose:function(){e(ap())}}},CC=xg(xC,_C)(gC),kC=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return i.tabs={},i}return zt(t,e),t.prototype.componentDidMount=function(){var e=this;if(this.props.isPoppedOut){var t=Wa(),n=t.popout;n&&n.isLarged||(window.resizeTo(window.outerWidth+500,window.outerHeight),Ba({popout:Dt({},n,{isLarged:!0})}))}this.props.components.forEach(function(t){var n=t.key,i=t.callback;if(i){e.tabs[n].appendChild(i())}}),this.props.ToogleChatWinFocused&&this.props.ToogleChatWinFocused(!1),Of("livechat.extendedWindow.show"),Of("livechat.extendedWindow.tabs.switch",this.props.selectedTab)},t.prototype.componentDidUpdate=function(e){this.props.selectedTab!==e.selectedTab&&Of("livechat.extendedWindow.tabs.switch",this.props.selectedTab)},t.prototype.componentWillUnmount=function(){if(this.props.isPoppedOut){window.resizeTo(window.outerWidth-500,window.outerHeight);var e=Wa(),t=e.popout;Ba({popout:Dt({},t,{isLarged:!1})})}this.props.ToogleChatWinFocused&&this.props.ToogleChatWinFocused(!0),Of("livechat.extendedWindow.hide")},t.prototype.render=function(){var e=this,t=this.props;return n("div",{className:cw("expandWindow",!t.isPoppedOut&&"expandWindow--embedded",t.isMobile?"expandWindow--mobile":"slideInRight",t.windowStyle===xs?"expandWindow--circle":""),ref:function(t){e.expandWindow=t}},n("div",null,t.components.map(function(t){var i=t.content,o=t.key;return n("div",null,n("div",{id:o,style:{display:o===e.props.selectedTab?"":"none"},ref:function(t){e.tabs[o]=t}},i&&n(i)))})),n("div",{className:"mediaChatWindowSwitch"},t.components&&t.components.length>1&&t.components.map(function(i){var o=i.key,r=i.isSystem,a=i.iconImg;return n("div",{className:cw("mediaChatWindowSwitch__element",o===e.props.selectedTab?"mediaChatWindowSwitch__active":""),onClick:function(){e.props.onTabSelect(o)}},r&&n(mw,{type:o+(o===e.props.selectedTab?"-active":"")}),!r&&n("span",null," ",n("img",{alt:"",src:a})," "),"bubble"===o&&t.unread>0&&n("span",{className:"mediaChatWindowSwitch__messageCount"},t.unread))})))},t}(I);kC.protoTypes={components:Ih.arrayOf(Ih.objectOf(Ih.shape({content:Ih.func.isRequired,key:Ih.oneOf([].concat(na))}))).isRequired,selectedTab:Ih.string,onTabSelect:Ih.func,ToogleChatWinFocused:Ih.func,windowStyle:Ih.oneOf([].concat(Cs)),isPoppedOut:Ih.bool.isRequired};var SC=function(e){return n("div",null,n("div",{className:"mediaChatWindow__agentImg"},n(wv,{src:e.avatar,alt:e.name,className:"mediaChatWindow__avatarImg"})),n("div",{className:"mediaChatWindow__agentName"},e.name))};SC.propTypes=zh({avatar:Oh.isRequired,name:Oh.isRequired}).isRequired;var AC,TC=function(e){return"audioIncoming"===e||"videoIncoming"===e},IC=function(e){return"videoChatting"===e||"videoIncoming"===e||"videoRequesting"===e},RC=function(e){return"audioChatting"===e||"audioIncoming"===e||"audioRequesting"===e},PC=function(e){return"audioChatting"===e||"videoChatting"===e},MC=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),r=parseInt(i%86400/3600,10),a=parseInt(i%86400%3600/60,10),s=parseInt(i%86400%3600%60,10);return(o>0?o+".":"")+(r>=10?r+":":r<10&&r>0?"0"+r+":":0===r&&o>0?"00":"")+(a<10?"0"+a+":":a+":")+(s<10?"0"+s:s)},OC=(AC={},AC.audioChatting="mediaChatWindow--audioChatting",AC.audioIncoming="mediaChatWindow--audioIncoming",AC.audioRequesting="mediaChatWindow--audioRequesting",AC.videoChatting="mediaChatWindow--videoChatting",AC.videoIncoming="mediaChatWindow--videoIncoming",AC.videoRequesting="mediaChatWindow--videoRequesting",AC),EC=function(e){function t(n){Bt(this,t);var i=qt(this,e.call(this,n));return PC(n.audioVideoChatStatus)?i.state={timespan:MC((new Date).getTime(),n.audioVideoChatStartTime)}:i.state={timespan:""},i}return zt(t,e),t.prototype.componentWillMount=function(){this.startClock()},t.prototype.componentDidMount=function(){this.props.onMounted(this.localVideo,this.remoteVideo)},t.prototype.componentWillUnmount=function(){clearInterval(this.clock)},t.prototype.startClock=function(){var e=this;this.clock=setInterval(function(){return e.setState({timespan:MC((new Date).getTime(),e.props.audioVideoChatStartTime)})},1e3)},t.prototype.render=function(){var e=this,t=this.props,i=IC(t.audioVideoChatStatus),o=RC(t.audioVideoChatStatus),r=PC(t.audioVideoChatStatus),a=this.state.timespan,s=TC(t.audioVideoChatStatus),c=o?t.audioChatText:t.videoChatText;return n("div",{id:"media-chat-window",className:cw("mediaChatWindow",OC[t.audioVideoChatStatus])},n("div",{className:"mediaChatWindow__requesting",style:{display:r?"none":"block"}},n(SC,{name:t.name,avatar:t.avatar}),n("div",{className:"mediaChatWindow__waiting"},n("div",{className:o?"mediaChatWindow__textAudio":"mediaChatWindow__textVideo"},n("span",{className:cw("mediaChatWindow__iconfont icon",o&&"icon-voice",i&&"icon-video")}),n("div",{className:"mediaChatWindow__chatTypeText"},c)),n("div",{className:"mediaChatWindow__waitingAni"},n("span",null,"."),n("span",null,"."),n("span",null,"."))),n("div",{className:"mediaChatWindow__buttons"},s&&n("div",{className:"mediaChatWindow__button",onClick:t.onAcceptClick},n(Jv,{type:"accept",viewBox:"0 0 55 55"})),n("div",{className:"mediaChatWindow__button",onClick:t.onRefuseClick},n(Jv,{type:"refuse",viewBox:"0 0 55 55"})))),n("div",{className:"mediaChatWindow__chatting",style:{display:r?"flex":"none"}},n("div",{className:"mediaChatWindow__chattingAgent"},n(SC,{name:t.name,avatar:t.avatar}),n("div",{className:"mediaChatWindow__chattingTime"},n("span",{className:cw("mediaChatWindow__iconfont icon",o&&"icon-voice",i&&"icon-video")}),n("div",{className:"mediaChatWindow__chatTypeText"},c),n("div",{className:"mediaChatWindow__chattingDuration"},a))),n("div",{style:{display:i?"block":"none",width:"100%"}},n("video",{ref:function(t){e.localVideo=t},id:"localVideo",className:"mediaChatWindow__localVideo"}),n("video",{ref:function(t){e.remoteVideo=t},id:"remoteVideo",className:"mediaChatWindow__remoteVideo"}),n(Jv,{className:"mediaChatWindow__loading",type:"loading",viewBox:"0 0 110 110"})),n("div",{className:"mediaChatWindow__buttons"},n("div",{className:"mediaChatWindow__button",onClick:t.onRefuseClick},n(Jv,{type:"refuse",viewBox:"0 0 55 55"})))))},t}(I);EC.protoTypes=zh({name:Oh,avatar:Oh,videoChatText:Oh,audioChatText:Oh,onAcceptClick:Nh,onRefuseClick:Nh,audioVideoChatStartTime:jh(Date),audioVideoChatStatus:Bh(Object.keys(ta).map(function(e){return ta[e]}))}).isRequired;var NC=function(e){return{name:_d(e),avatar:xd(e),audioVideoChatStartTime:qd(e),audioVideoChatStatus:jd(e),videoChatText:cu(e,"videoChatCalling"),audioChatText:cu(e,"audioChatCalling")}},WC=function(e){return{onAcceptClick:function(){e(_p())},onRefuseClick:function(){e(Zp())},onMounted:function(t,n){e(xp(t,n))}}},BC=xg(NC,WC)(EC),DC=function(e){return n("div",{style:{backgroundColor:"#ccc",display:"flex",position:"absolute",height:"100%",width:"100%"}},n("div",null," I am kb, ^^ "),n("div",null,e.text))};DC.protoTypes={text:Ih.string};var zC,jC,qC=function(){return{text:"hello, how may I help you?"}},LC=xg(qC,null)(DC),VC=function(e){var t,n=(t={},t.media=BC,t.voice=BC,t.kb=LC,t),i=fc(e),o=ad(e),r=ec(e),a=Ol(e,r),s=Dd(e),c=Nd(e),d=Os(e),l=[];return c&&c.forEach(function(e){e.isSystem?l.push({content:n[e.id],key:e.id,isSystem:e.isSystem}):l.push({callback:e.content,key:e.id,isSystem:e.isSystem,iconImg:e.icon})}),i&&l.push({key:"bubble",isSystem:!0}),{components:l,isMobile:i,unread:o,windowStyle:a,selectedTab:s,isPoppedOut:d}},FC=function(e){return{onTabSelect:function(t){e(Cp(t))}}},UC=xg(VC,FC)(kC),HC=function(e){function t(){Bt(this,t);var n=qt(this,e.call(this));return n.state={showIcon:!1,animated:!1},n}return zt(t,e),t.prototype.componentDidMount=function(){var e=this;this.timer=setTimeout(function(){return e.setState({showIcon:!0})},200)},t.prototype.componentWillUnmount=function(){clearTimeout(this.timer)},t.prototype.render=function(){var e=this,t=this.props;return n("div",{className:cw("window__form",this.state.animated&&"window__form--animation"),onAnimationEnd:function(){e.setState({animated:!0})}},t.errorMessage&&n("div",{className:"window__formError"},t.errorMessage),this.state.showIcon&&!t.errorMessage&&n(Jv,{type:"loading",className:"svg--loadingChat",viewBox:"0 0 100 100"}))},t}(I),GC=xg(function(e){return{errorMessage:id(e)}})(HC),YC=(zC={},zC[Gr]=z_,zC[Qr]=j_,zC[Jr]=q_,zC[Yr]=$y,zC[Hr]=U_,zC.ssoLogin=J_,zC.loading=GC,zC),QC=(jC={},jC[Gr]={timespan:0,duration:20},jC[Qr]={timespan:0,duration:20},jC[Jr]={timespan:0,duration:20},jC[Yr]={timespan:0,duration:2},jC[Hr]=null,jC.ssoLogin=null,jC.loading=null,jC),JC=function(e){var t=Nc(e),i=YC[t],o=void 0,r=oc(e),a=r===Oo;o="ssoLogin"===t?[n(i)]:[n(Bv,null),n(i),!a&&ld(e)&&n(CC,null),!a&&n(rx,null)];var s=Rc(e)===Kr,c=El(e),d=od(e),l=id(e),u=ad(e),p=sd(e),f=void 0,h=yd(e),m=void 0;p&&(f=p.content,"string"!=typeof f&&f&&(f=f.text||f.name),_i(p)||(m=p.sender.name));var b=Jl(e)&&"bubble"!==c,g=Fl(e,u),w=Ul(e),v=QC[t],y=zd(e),x=0,_=Od(e),C=_?UC:null;"bubble"===c&&(x=Math.random());var k=kc(e),S=Cc(e),A=ec(e),T=hl(e,A),I=Ud(e),R=Sc(e);return{isPoppedOut:Os(e),fontCSS:ai(Ms(e),P(zs,e)),mainColor:zc(e),background:jc(e),isFocused:Ld(e),children:o,windowTab:t,windowStatus:r,windowStyle:c,warning:d,error:l,isMobile:fc(e),isIPad:hc(e),showChatWindowInExpandwindow:Bd(e),unread:u,lastMessage:f,avatar:b?h:void 0,agentName:m,title:s?g:void 0,seed:x,hOnline:v,writeReply:w,ifShowExpandWindow:_,expandWindow:C,customCss:y,width:k,height:S,isRightToLeft:I,iframeStyle:T,orientation:R}},XC=function(e){return{dispatch:e,onMounted:function(){e(Op())},onMinimized:function(){e(Su())},onOpened:function(){e(Tu())},onErrorClose:function(){e(ap())},onWarningClose:function(){e(np())},onFocusToggle:function(t){e(tp(t))},onCloseBubble:function(){e(Tp())}}},ZC=function(){},$C=function(e,t){var n=e.windowTab,i=t.dispatch,o=ZC,r=void 0;return n===Yr?(o=function(){return i(Dp())},r="livechat.chat.restore"):n===Gr?(o=function(){return i(Yp())},r="livechat.prechat.restore"):n===Qr?(o=function(){return i(Dp())},r="livechat.postChat.restore"):n===Jr&&(o=function(){return i(Qp())},r="livechat.offlineMessage.restore"),Object.assign({},e,t,{hCallback:o,onMaximize:function(){r&&Of(r),i(_u())}})},KC=xg(JC,XC,$C)(pv),ek=function(e){var t=Ps(e);return t?{isReady:t,enableGa:Ml(e),tab:Nc(e),invitation:de(e),guid:$c(e),ban:Es(e),isCampaignReady:Ec(e),windowStatus:oc(e),isPoppedOut:Os(e),customJs:ou(e),font:zs(e,"/fonts/SourceSansPro-Regular.woff"),chatStatus:Rc(e)}:{isReady:t}},tk=xg(ek)(function(e){var t=e.isReady,i=e.windowStatus,o=e.tab,r=e.enableGa,a=e.customJs,s=e.font,c=e.chatStatus,d=e.invitation,l=e.guid,u=e.ban,p=e.isCampaignReady,f=e.isPoppedOut;if(!t)return null;if(u)return null;var h=d&&(d.type===jo||d.type===Bo),m=i!==No;return n("div",null,a&&n(Rg,{key:"js",textContent:a,name:"script",type:"text/javascript"}),n(Rg,{key:"font",name:"link",rel:"prefetch",href:s,as:"font",crossOrigin:"anonymous"}),n(Ig,{enableGa:r,windowTab:o,invitation:d,guid:l,chatStatus:c}),!f&&n(Fw,null),h&&n(Gw,null),p&&m&&n(KC,null))}),nk=function(e){var t=e.store;return n(Eg,{getRender:Pf},n(qb,{store:t},n(tk,null)))},ik=document.getElementById("comm100-container"),ok=ik||document.createElement("div");ik||(ok.id="comm100-container",document.body.appendChild(ok));var rk=function(e){return R(n(nk,{store:e}),ok),function(){ok.innerHTML=""}},ak=function(e){var t=function(){return{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}},n=function(e){return e&&e.indexOf("landscape")>=0},i=function(){var e=window.screen,t=e.msOrientation||e.mozOrientation||e.orientation,i=void 0===t?"undefined":Wt(t);return"undefined"===i?"orientation"in window&&90===Math.abs(window.orientation):n("string"===i?t:t.type)},o=function(){var n=e.getState(),i=kc(n),o=Cc(n),r=t();r.width===i&&r.height===o||e.dispatch(Ru(r))},r=function(){i()?e.dispatch(Mu()):e.dispatch(Ou())};window.addEventListener("resize",o),window.addEventListener("orientationchange",r),o(),r();var a=void 0;return Nn&&(a=setInterval(o,1e3)),function(){window.removeEventListener("resize",o),window.removeEventListener("orientationchange",r),a&&clearInterval(a)}},sk=[rk,pf,Wf,ak],ck=function(e){if(e){var t=e.standbyVisitorId,n=e.visitorId,i=e.visitorGuid;if(i)return{id:n,standbyId:t,guid:i}}return{id:wa(!0),standbyId:wa(!1),guid:xa()}},dk=function(e){e.id>0&&va(e.id,!0),e.standbyId>0&&va(e.standbyId,!1),e.guid&&_a(e.guid)},lk=function(e){if(e){return{title:e.title,url:e.url}}return oi()},uk=function(e){return e&&e.isStandbyServer?"standby":"main"},pk=function(e){return e?pr(e.planId,{type:e.chatSource,page:lk(e),invitationId:e.invitationId},!1,e.ticketId,e.departmentId):null},fk=function(e){var t=e.siteId,n=e.chatGroup,i=e.mainCampaignId,o=e.campaignIds,r=e.isDynamicCampaign,a=e.serverUrl;ja();var s=Si.popout,c=pk(s),d=lk(s),l=ui(s),u=ck(s);dk(u);var p=uk(s),f=We({app:{isReady:!1,isActive:!0,server:p,isPoppedOut:!!s,isOpenerExists:!!window.opener,banned:Aa().isBanned},page:Dt({siteId:t,isDynamicCampaign:r,campaignId:r?0:i,buttons:o.reduce(function(e,t){var n;return Object.assign({},e,(n={},n[t]=!1,n))},{}),platform:li(),chatGroup:n,visitor:u,windowStatus:No,requestChatAction:c},d),configuration:Dt({},a,{customVariableResult:l})});return Et(f),f.dispatch(Kp()),f};window.comm100main=function(e){return function(t,n){Si.loaded||(Si.chat_buttons=Si.chat_buttons||[],Si.loaded=!0,window.Comm100API=Si,E(Si.chat_buttons),window.comm100store=e({siteId:Ai,chatGroup:Ti,mainCampaignId:Mi,campaignIds:Ri(),isDynamicCampaign:!!Si.dynamic,serverUrl:{url:t,standbyUrl:n}}))}}(fk)}(); //# sourceMappingURL=http://127.0.0.1:4001/chatserver/js/newlivechat.js.map window.comm100main('https://chatserver.comm100.com')