1"use strict";(self.webpackChunkLiveHelperChat=self.webpackChunkLiveHelperChat||[]).push([[249],{9249:function(e,t,n){n.d(t,{nodeJSChat:function(){return p}});var r=n(467),a=n(3029),s=n(9530),i=n(4756),c=n.n(i),o=n(7912);function u(e){var t,n,r,a=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);a--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new l(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function l(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return l=function(e){this.s=e,this.n=e.next},l.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new l(e)}var h=function(){return(0,s.A)(function e(){(0,a.A)(this,e),this.params={},this.attributes=null,this.chatEvents=null},[{key:"setParams",value:(e=(0,r.A)(c().mark(function e(t,a,s){var i,l,h,p,v,d,f,_,m,b,k,w,x,I,y,g,P;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return g=function(){return(g=(0,r.A)(c().mark(function e(){var t,n,r,o,l,h,v,m,b,k,w;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=null==f,n=!1,r=null,f=p.subscribe("uo_"+i),1!=t){e.next=15;break}try{"embed"!=a.mode&&!a.widgetStatus.value&&p.transmitPublish("uo_"+i,{op:"ws_isopen",clientId:f.client.clientId}),null!==a.lhc_var&&(p.transmitPublish("uo_"+i,{clientId:f.client.clientId,op:"check_vars",init:!1,lhc_var:a.lhc_var}),a.eventEmitter.addListener("jsVarsUpdated",function(){!1===_&&!1===a.ignoreVars&&p.transmitPublish("uo_"+i,{clientId:f.client.clientId,op:"current_vars",init:!1,lhc_var:a.lhc_var}),_=!1})),"embed"!=a.mode&&a.widgetStatus.subscribe(function(e){if(1==n)return clearTimeout(r),void(r=setTimeout(function(){n=!1},1e3));p.transmitPublish("uo_"+i,{op:"wstatus",status:e,clientId:f.client.clientId})},!0),a.eventEmitter.addListener("chatStarted",function(e,t){"popup"===t&&!0!==a.kcw||p.transmitPublish("uo_"+i,{op:"chat_started",data:e,clientId:f.client.clientId})})}catch(e){console.log(e)}e.prev=1,o=!1,l=!1,e.prev=2,v=u(f);case 3:return e.next=4,v.next();case 4:if(!(o=!(m=e.sent).done)){e.next=6;break}if("check_message"==(b=m.value).op)a.eventEmitter.emitEvent("checkMessageOperator");else if("is_online"==b.op)p.transmitPublish("ous_"+d,{op:"vi_online",status:!0,vid:i});else if("chat_started"==b.op)try{null===a.userSession.id&&b.data.id&&f.client.clientId!=b.clientId&&s.sendChildEvent("reopenNotification",[{id:b.data.id,hash:b.data.hash}])}catch(e){console.log(e)}else if("ws_isopen"==b.op)try{"embed"!=a.mode&&a.widgetStatus.value&&f.client.clientId!=b.clientId&&p.transmitPublish("uo_"+i,{op:"wstatus",status:!0})}catch(e){console.log(e)}else if("wstatus"==b.op)try{"embed"!=a.mode&&b.status!=a.widgetStatus.value&&f.client.clientId!=b.clientId&&(n=!0,a.widgetStatus.next(b.status))}catch(e){console.log(e)}else if("current_vars"==b.op||"check_vars"==b.op)try{if(f.client.clientId!=b.clientId){if(b.lhc_var&&null!==a.lhc_var){for(k in _=!0,a.ignoreVars=!0,b.lhc_var)void 0!==a.lhc_var[k]&&""!==a.lhc_var[k]&&!1!==b.init||""===b.lhc_var[k]||a.lhc_var[k]===b.lhc_var[k]||(a.lhc_var[k]=b.lhc_var[k]);a.ignoreVars=!1}"check_vars"==b.op&&null!==a.lhc_var&&p.transmitPublish("uo_"+i,{clientId:f.client.clientId,op:"current_vars",init:!0,lhc_var:a.lhc_var})}}catch(e){console.log(e)}case 5:o=!1,e.next=3;break;case 6:e.next=8;break;case 7:e.prev=7,w=e.catch(2),l=!0,h=w;case 8:if(e.prev=8,e.prev=9,!o||null==v.return){e.next=10;break}return e.next=10,v.return();case 10:if(e.prev=10,!l){e.next=11;break}throw h;case 11:return e.finish(10);case 12:return e.finish(8);case 13:e.next=15;break;case 14:e.prev=14,e.catch(1);case 15:case"end":return e.stop()}},e,null,[[1,14],[2,7,8,13],[9,,10,12]])}))).apply(this,arguments)},y=function(){return g.apply(this,arguments)}
1,I=function(){o.q.makeRequest(a.LHC_API.args.lhc_base_url+a.lang+"nodejshelper/tokenvisitor",{params:{ts:(new Date).getTime()}},function(){var e=(0,r.A)(c().mark(function e(t){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=t.instance_id,e.next=1,Promise.all([p.invoke("login",{hash:t.hash,chanelName:v,instance_id:t.instance_id}),p.listener("authenticate").once()]);case 1:y();case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}())},this.params=t,this.attributes=a,this.chatEvents=s,i=this.attributes.userSession.getVID(),l={protocolVersion:1,hostname:t.hostname,path:t.path,disconnectOnUnload:!1,authTokenName:"socketCluster.authToken_vi"},""!=t.port&&(l.port=parseInt(t.port)),1==t.secure&&(l.secure=!0),h=n(5923),p=h.create(l),v="uo_"+i,d=this.attributes.instance_id,f=null,_=!1,e.next=1,p.listener("connect").once();case 1:e.sent.isAuthenticated?(y(),a.LHC_API.args.check_messages=!1):I(),e.prev=2,m=!1,b=!1,e.prev=3,w=u(p.listener("deauthenticate"));case 4:return e.next=5,w.next();case 5:if(!(m=!(x=e.sent).done)){e.next=7;break}x.value,I();case 6:m=!1,e.next=4;break;case 7:e.next=9;break;case 8:e.prev=8,P=e.catch(3),b=!0,k=P;case 9:if(e.prev=9,e.prev=10,!m||null==w.return){e.next=11;break}return e.next=11,w.return();case 11:if(e.prev=11,!b){e.next=12;break}throw k;case 12:return e.finish(11);case 13:return e.finish(9);case 14:e.next=16;break;case 15:e.prev=15,e.catch(2);case 16:case"end":return e.stop()}},e,this,[[2,15],[3,8,9,14],[10,,11,13]])})),function(t,n,r){return e.apply(this,arguments)})}]);var e}(),p=new h}}]); 2//# sourceMappingURL=60d432b85ac4515249d3.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.