"use strict";(function(){ var q;function aa(a){this.id=a;this.version=0}aa.prototype.update=function(a,b){void 0!==a.name&&(this.name=a.name);this.version=Math.max(this.version,b)};function ba(a){this.zb=a.desc;this.name=a.name;this.type=a.type;this.usage=a.usage;this.Z=a.category}function ca(){this.a={};this.G=[];this.version=0} ca.prototype.update=function(a,b){a.emoji_use&&(this.a=JSON.parse(a.emoji_use));a.highlight_words?this.G=(a.highlight_words||"").split(",").filter(function(a){return""!==a.trim()}):a.highlights&&(this.G=a.highlights);this.version=Math.max(this.version,b)};function da(){this.a=null;this.m={};this.l={};this.self=null;this.b={version:0,data:{}};this.j={version:0,data:{}};this.A={};this.Y={};this.s=0}function ea(a,b){return b.pv?new r(b.id,a.l[b.user]):new u(b.id)} function fa(a,b,c){var e=e||"";b.team&&(a.a||(a.a=new aa(b.team.id)),a.a.update(b.team,c));if(b.users)for(var d=0,f=b.users.length;dthis.j;)this.i.shift();if(this.b)for(a=0;ab.getTime()?a.toLocaleTimeString():a.getTime()>c.getTime()?"hier, "+ a.toLocaleTimeString():a.toLocaleString()},fb:function(a){var b=new Date,c=new Date;a=new Date(a);b.setHours(0,0,0,0);c.setTime(b.getTime());c.setDate(c.getDate()-1);return a.getTime()>b.getTime()?"aujourd'hui":a.getTime()>c.getTime()?"hier":a.toLocaleDateString()},Ga:function(a,b){return a+"/"+b},c:{fileUploadCancel:"Annuler",neterror:"Impossible de se connecter au chat !",ctxMenuSettings:"Configuration",ctxMenuLogout:"D\u00e9connexion",settingTitle:"Configuration","setting-menu-services":"Services", "settings-services-title":"Services","setting-menu-display":"Affichage","settings-display-title":"Affichage","setting-menu-privacy":"Vie priv\u00e9e","settings-privacy-title":"Vie priv\u00e9e",settingCommit:"Appliquer","settings-serviceAddButton":"Ajouter un service","settings-serviceListEmpty":"Vous n'avez pas encore ajout\u00e9 de service. Ajouter un service pour continuer.","settings-serviceAddConfirm":"Suivant","settings-displayEmojiProviderLbl":"Gestionnaire d'emojis","settings-displayDisplayAvatarLbl":"Afficher les avatars", "settings-displayColorfulNamesLbl":"Afficher les nomes en couleur","settings-displayScrollAvatarsLbl":"Faire d\u00e9filer les avatars lors de la lecture","settings-displayAttachmentContentLbl":"Afficher les pieces jointes ?","settings-displayAttachmentContent-never":"Jamais","settings-displayAttachmentContent-always":"Toujours","settings-displayAttachmentContent-notimg":"Si elles ne contiennent pas d'images"}}; H.fr.mb=function(a){return 0===a?"Pas de message \u00e9pingl\u00e9":a+(1===a?" message \u00e9pingl\u00e9":" messages \u00e9pingl\u00e9s")};H.fr.sb=function(a){return 0===a?"Pas de chatteur":a+(1===a?" chatteur":" chatteurs")};H.fr.I=function(a){return"(edité "+H.fr.U(a)+")"};H.fr.Na=function(a,b){return"par "+a.getName()+" le "+H.fr.U(b)};H.en={Qb:"Unknown member",Pb:"Unknown channel",Ja:"New message",message:"Message",kb:"Network",lb:"(only visible to you)",D:"Starred",m:"Channels",sa:"Members",pb:"Direct messages",rb:"Share your GPS location",ok:"Ok",cb:"Cancel",U:function(a){"string"!==typeof a&&(a=parseFloat(a));var b=new Date,c=new Date;a=new Date(a);b.setHours(0,0,0,0);c.setTime(b.getTime());c.setDate(c.getDate()-1);return a.getTime()>b.getTime()?a.toLocaleTimeString():a.getTime()>c.getTime()?"yesterday, "+a.toLocaleTimeString(): a.toLocaleString()},fb:function(a){var b=new Date,c=new Date;a=new Date(a);b.setHours(0,0,0,0);c.setTime(b.getTime());c.setDate(c.getDate()-1);return a.getTime()>b.getTime()?"today":a.getTime()>c.getTime()?"yesterday":a.toLocaleDateString()},Ga:function(a,b){return a+"/"+b},c:{fileUploadCancel:"Cancel",neterror:"Cannot connect to chat !",ctxMenuSettings:"Settings",ctxMenuLogout:"Logout",settingTitle:"Settings","setting-menu-services":"Services","settings-services-title":"Services","setting-menu-display":"Display", "settings-display-title":"Display","setting-menu-privacy":"Privacy","settings-privacy-title":"Privacy",settingCommit:"Apply","settings-serviceAddButton":"Add a service","settings-serviceListEmpty":"You don't have any service yet. Please add a service to continue.","settings-serviceAddConfirm":"Next","settings-displayEmojiProviderLbl":"Emoji provider","settings-displayDisplayAvatarLbl":"Display avatars","settings-displayColorfulNamesLbl":"Colorful names","settings-displayScrollAvatarsLbl":"Scroll avatars", "settings-displayAttachmentContentLbl":"Automaticcaly unwrap attachments ?","settings-displayAttachmentContent-never":"Never","settings-displayAttachmentContent-always":"Always","settings-displayAttachmentContent-notimg":"If they don't contain image"}};H.en.mb=function(a){return 0===a?"No pinned messages":a+(1===a?" pinned message":" pinned messages")};H.en.sb=function(a){return 0===a?"No users in this room":a+(1===a?" user":" users")};H.en.I=function(a){return"(edited "+H.en.U(a)+")"}; H.en.Na=function(a,b){return"by "+a.getName()+" on "+H.en.U(b)};var Aa=function(){function a(a){this.text="";this.h=a}function b(b,c,d){this.aa=c;this.g=null;this.o=[];this.a=d||"";this.Ca="<"===this.a;this.La="*"===this.a;this.Ba="_"===this.a;this.Da="~"===this.a||"-"===this.a;this.j=">"===this.a||">"===this.a;this.w=":"===this.a;this.Oa="`"===this.a;this.Za="```"===this.a;this.Pa="\n"===this.a;this.Aa=void 0!==d&&-1!==p.G.indexOf(d);this.h=b;this.Ea=null;this.b=this.Pa||this.Aa?c+d.length-1:!1;this.Aa&&(this.g=new a(this),this.o.push(this.g),this.g.text= d)}function c(a){return/[A-Za-z0-9\u00e0\u00e8\u00ec\u00f2\u00f9\u00c0\u00c8\u00cc\u00d2\u00d9\u00e1\u00e9\u00ed\u00f3\u00fa\u00fd\u00c1\u00c9\u00cd\u00d3\u00da\u00dd\u00e2\u00ea\u00ee\u00f4\u00fb\u00c2\u00ca\u00ce\u00d4\u00db\u00e3\u00f1\u00f5\u00c3\u00d1\u00d5\u00e4\u00eb\u00ef\u00f6\u00fc\u00ff\u00c4\u00cb\u00cf\u00d6\u00dc\u0178\u00e7\u00c7\u00df\u00d8\u00f8\u00c5\u00e5\u00c6\u00e6\u0153+]/.test(a)}function e(a){a=a||m;for(var c=0,d=a.o.length;c"===h[a])return!0;var b=c(h[a-1]);if(!this.j&&h.substr(a,this.a.length)===this.a){if(!b&&(this.La||this.Ba||this.Da))return!1;if(this.g&&this.Wa())return this.g.$a();if(this.ub())return!0}return"\n"===h[a]&&this.j?!0:!1};b.prototype.ub=function(){for(var a=this;a;){for(var c=0,d=a.o.length;c"===h[b])return h[b]}if("`"===h[b]&&!d|| "\n"===h[b]||!(-1===["*","~","-","_"].indexOf(h[b])||!e&&void 0!==h[b+1]&&-1==="*~-_<&".split("").indexOf(h[b+1])||d&&void 0!==h[b-1]&&-1==="*~-_<&".split("").indexOf(h[b-1]))||-1!==[":"].indexOf(h[b])&&e||-1!==["<"].indexOf(h[b]))return h[b];d=0;for(e=p.G.length;d=a&&(this.b=!1);this.o.forEach(function(c){c instanceof b&&c.da(a)})};a.prototype.innerHTML=function(){if(this.h.ga()){for(var a=this.h;a&&!a.w;)a=a.h;if(a){var a=a.a+this.text+a.a,b=p.$(a);return b?b:a}return(a=p.$(this.text))?a:this.text}if(this.h.fa()){if("undefined"!==typeof hljs)try{return a=this.text.match(/^\w+/),hljs.configure({useBR:!0, tabReplace:"      "}),a&&hljs.getLanguage(a[0])?hljs.fixMarkup(hljs.highlight(a[0],this.text.substr(a[0].length)).value):hljs.fixMarkup(hljs.highlightAuto(this.text).value)}catch(v){console.error(v)}return this.text.replace(/\n/g,"
")}return p.ya(this.text)};a.prototype.outerHTML=function(){var a="span",b=[],c="";if(this.h.fa()){a="pre";b.push("codeblock");var d=this.innerHTML()}else this.h.Sa()?(b.push("code"),d=this.innerHTML()):(this.h.Ca&&(d=p.ra(this.text))? (a="a",c=' href="'+d.link+'"',d.style&&(c+=' style="'+d.style+'"'),d.hb||(c+=' target="_blank"'),d.ab&&d.ab.forEach(function(a){b.push(a)}),d=p.ya(d.text)):d=this.innerHTML(),this.h.Ra()&&b.push("bold"),this.h.Ua()&&b.push("italic"),this.h.Va()&&b.push("strike"),this.h.ga()&&b.push("emoji"),this.h.Ta()&&b.push("highlight"));return"<"+a+c+(b.length?' class="'+b.join(" ")+'"':"")+">"+d+""};b.prototype.outerHTML=function(){var a="";this.j&&(a+='');this.Pa&&(a+="
");this.o.forEach(function(b){a+= b.outerHTML()});this.j&&(a+="
");return a};b.prototype.Ya=function(a){this.j&&!this.b&&this.Qa(a);this.o.forEach(function(c){c instanceof b&&c.Ya(a)})};return function(c,n){n||(n={});p.G=n.G||[];p.$=n.$||g;p.ya=n.ya||f;p.ra=n.ra||k;h=c;m=new b(this,0);n=0;c=h.length;do{for(;n=b.length&&k[h].name.substr(0,b.length)===b&&e.push(k[h])}else if("@"===d[f])for(h in k=D instanceof r?Q.l:D.l,b=d.substr(f+1, g-f-1),k){var m=k[h].getName();m.length>=b.length&&m.substr(0,b.length)===b&&e.push(k[h])}else if(":"===d[f]&&window.searchEmojis){b=d.substr(f+1,g-f-1);m=window.searchEmojis(b);for(k in m){var m=window.makeEmoji(k,!1),p=document.createElement("span");p.appendChild(m);p.className="emoji-small";e.push({name:":"+k+":",Ha:p,ua:eb.name})}for(h in Q.b.data)h.length>=b.length&&h.substr(0,b.length)===b&&(k=document.createElement("span"),k.className="emoji-small",k.appendChild(fb(h)),e.push({name:":"+h+":", Ha:k,ua:"custom"}))}e.length&&(c.dataset.cursor=JSON.stringify([f,g]))}}if(!e.length&&"/"===d[0]){h=d.indexOf(" ");f=-1!==h;h=-1===h?d.length:h;b=d.substr(0,h);f?(a=gb.gb(b))&&e.push(a):(e=gb.Ab(b),c.dataset.cursor=JSON.stringify([0,a.selectionEnd]));a=Q?Q.j.data:{};for(var l in a)d=a[l],(!f&&d.name.substr(0,h)===b||f&&d.name===b)&&e.push(d);e.sort(function(a,b){return a.Z.localeCompare(b.Z)||a.name.localeCompare(b.name)})}c.textContent="";if(e.length){l=document.createDocumentFragment();h=0;for(a= e.length;ha.rows&&a.scrollHeight>a.clientHeight;)a.rows++} function mb(){var a=0,b=document.getElementById("msgInput");b.addEventListener("input",function(){if(D){var b=Date.now();a+3E3a.C&&c++});c&&(b="("+c+")");Fb(0,c)}!b.length&&D&&(b=D.name);b=b.length?b:"Mimouchat";document.title=b;Gb(b)} function Hb(){if("Notification"in window)if("granted"===Notification.permission){var a=Date.now();if(ob+3E4a.scrollHeight-a.scrollTop-a.clientHeight)return 0;if(e=T.some(function(a){for(var d=0,e=a.content.children.length;db)return c=k.id,!0}}))if(a=oa(c))return a.f}function Kb(a){C.a[D.id]&&C.a[D.id].i.some(function(b){if(b.f>=a)return b.J().scrollIntoView(),!0})} function Bb(){function a(){for(;T[d].content.children[f];)T[d].content.children[f].remove();T[d].i.splice(f);T[d].i.length?d++:(T[d].remove(),T[d]=null);e=null}function b(a,b){var c=a.J();if(e){var g=e.J();6E4>Math.abs(e.f-a.f)?g.classList.add("chatmsg-same-ts"):g.classList.remove("chatmsg-same-ts")}(!e||e.f<=D.C)&&a.f>D.C?c.classList.add("chatmsg-first-unread"):c.classList.remove("chatmsg-first-unread");b?T[d].content.replaceChild(b,c):f>=T[d].i.length?(T[d].content.appendChild(c),T[d].i.push(a.id)): (T[d].content.insertBefore(c,T[d].content.children[f]),T[d].i.splice(f,0,a.id));T[d].f=T[d].f?a.f:Math.min(T[d].f,a.f);++f;e=a}var c=document.getElementById("chatWindow"),e=null,d=0,f=0;D.D?document.getElementById("chatSystemContainer").classList.add("starred"):document.getElementById("chatSystemContainer").classList.remove("starred");var g=Jb(c);C.a[D.id]&&C.a[D.id].i.forEach(function(g){if(T[d]){if(Ib(T[d],g)){if(T[d].i[f]===g.id){var k=T[d].content.children[f];g.b?(k.remove(),T[d].i.splice(f,1)): g.T?b(g,k):++f}else g.b||b(g);return}if(g.b)return;if(g.f=a.latitude&&-180<=a.longitude&&180>=a.longitude){var b=0,c=function(a,b,c,d){return new Promise(function(e,f){var g=new Image;g.addEventListener("load",function(){d.V=g;e(d)});g.addEventListener("error",function(){console.warn("Error loading tile ",{zoom:a,x:b,y:c});f(g)});g.crossOrigin="anonymous";g.src="https://c.tile.openstreetmap.org/"+a+"/"+b+"/"+c+".png"})},e=document.createElement("canvas"),d=document.createElement("canvas"); e.height=e.width=d.height=d.width=300;var f=e.getContext("2d"),g=d.getContext("2d"),k=function(a,b,c){a=a*Math.PI/180;b=b*Math.PI/180;c=c*Math.PI/180;return Math.abs(6371E3*Math.acos(Math.pow(Math.sin(a),2)+Math.pow(Math.cos(a),2)*Math.cos(c-b)))},h=function(a,d,e,h){g.fillStyle="#808080";g.fillRect(0,0,300,300);f.fillStyle="#808080";f.fillRect(0,0,300,300);var p=Math.pow(2,a),n=(e+180)/360*p,m=(1-Math.log(Math.tan(d*Math.PI/180)+1/Math.cos(d*Math.PI/180))/Math.PI)/2*p,l=Math.floor(n),L=Math.floor(m), ya=h?100*h/k(180/Math.PI*Math.atan(.5*(Math.exp(Math.PI-2*Math.PI*L/p)-Math.exp(-(Math.PI-2*Math.PI*L/p)))),l/p*360-180,(l+1)/p*360-180):0;d=b;for(e=0;3>e;e++)for(h=0;3>h;h++)c(a,l+e-1,L+h-1,{Eb:e,Hb:h,tb:d}).then(function(a){if(a.tb===b){g.drawImage(a.V,100*a.Eb,100*a.Hb,100,100);a=n-l;var c=m-L;a=100*a+100;c=100*c+100;f.putImageData(g.getImageData(0,0,300,300),0,0);void 0!==ya&&(f.beginPath(),f.arc(a,c,Math.max(ya,10),0,2*Math.PI,!1),f.lineWidth=2,f.fillStyle="rgba(244, 146, 66, 0.4)",f.strokeStyle= "rgba(244, 146, 66, 0.8)",f.stroke(),f.fill());if(void 0===ya||25b.bottom||a.screenXb.right)&& c()});p.className="emojibar-overlay";m.className="emojibar";l.className="emojibar-emojis";n.className=v.className="emojibar-list";B.className="emojibar-search";M.className="emojibar-detail";I.className="emojibar-detail-img";F.className="emojibar-detail-name";M.appendChild(I);M.appendChild(F);b();m.appendChild(l);m.appendChild(M);m.appendChild(B);B.addEventListener("keyup",function(){d()});m.addEventListener("mousemove",function(b){a(b,function(a){var b=a?z[a]||A[a]:null;b?(I.innerHTML=b.c.outerHTML, F.textContent=":"+a+":"):(I.textContent="",F.textContent="")})});m.addEventListener("click",function(b){a(b,function(a){a&&e()&&t&&t(a)})});return{isSupported:h,wa:function(a,b,c){return h()?(J=b,t=c,a.appendChild(p),a.appendChild(m),B.value="",d(),B.focus(),!0):!1},search:d,close:c,reset:function(){b();d()}}}();var C,V=[];function oc(){da.call(this)}oc.prototype=Object.create(da.prototype);oc.prototype.constructor=oc;function sa(a){return a.a?a.a.id:null}function pc(){this.b=0;this.context=new qa;this.a={}} pc.prototype.update=function(a){var b=Date.now();a.v&&(this.b=a.v);if(a["static"])for(h in a["static"]){var c=ra(this.context,h);c||(c=new oc,this.context.push(c));var e={};a["static"][h].channels&&a["static"][h].channels.forEach(function(a){a.pins&&(e[a.id]=a.pins,a.pins=void 0)});fa(c,a["static"][h],b);for(var d in e){var f=[],g=this.a[d];g||(g=this.a[d]=new Y(d,250,null,b));e[d].forEach(function(a){f.push(g.a(a,b))});c.m[d].b=f}}ta(this.context,function(a){a.F===a.C&&(a=V.indexOf(a),-1!==a&&V.splice(a, 1))});if(a.live){for(h in a.live)(c=this.a[h])?la(c,a.live[h],b):c=this.a[h]=new Y(h,250,a.live[h],b);for(var k in a.live){var h=E(this.context,k);(c=h.m[k])?(this.a[k].i.length&&ha(c,na(this.a[k]).f,b),c.la||(qc(h,c,a.live[k]),D&&a.live[D.id]&&Bb())):C.b=0}}a["static"]&&pb();var m=!1;a.typing&&this.context.a.forEach(function(c){var d=m,e=a.typing,f=!1;if(c.A)for(var g in c.A)e&&!e[g]&&(delete c.A[g],f=!0);if(e)for(g in e)if(c.m[g]){c.A[g]||(c.A[g]={});for(var h in e[g])c.A[g][h]||(f=!0),c.A[g][h]= b}m=d|f},this);(a["static"]||m)&&vb();a.config&&(N=new rc(a.config),dc());if(Q&&D&&a["static"]&&a["static"][Q.a.id]&&a["static"][Q.a.id].channels&&a["static"][Q.a.id].channels)for(k=a["static"][Q.a.id].channels,h=0,c=k.length;ha.C){var c=C.a[a.id];c&&(c=na(c))&&(P("POST","api/markread?room="+encodeURIComponent(a.id)+"&id="+c.id+"&ts="+c.f).a(),a.C=c.f)}0<=b&&(V.splice(b,1),zb());a=document.getElementById("room_"+a.id);a.classList.remove("unread");a.classList.remove("unreadHi")}function sc(){for(var a in C.a)tc(C.a[a]);D&&Bb()}C=new pc;var ub=function(){function a(a,c){c.sort(function(){return Math.random()-.5});for(var d=0,e=20;ec/(a.height*a.width))for(d=0;dC.a[D.id].i.length)&&vc();document.getElementById("chatSystemContainer").classList.remove("no-room-selected");document.getElementById("chatCtx").classList.remove("opened")}function tb(){var a=document.location.hash.substr(1),b=va(a);return b&&b!==D?(Ac(b),!0):(a=G(a))&&a.S?(Ac(a.S),!0):!1}function Yb(a){P("POST","api/starChannel?room="+encodeURIComponent(a.id)).a()}function Xb(a){P("POST","api/unstarChannel?room="+encodeURIComponent(a.id)).a()} function ac(a,b,c){var e=D;new FileReader;var d=new FormData;d.append("file",b);d.append("filename",a);Ha(Ga(P("POST","api/file?room="+encodeURIComponent(e.id)),function(){c(null)}),function(a,b){c(b)}).a(d)} function jb(a,b,c,e){b="api/msg?room="+encodeURIComponent(a.id)+"&text="+encodeURIComponent(b);e&&(b+="&attachments="+encodeURIComponent(JSON.stringify([{fallback:e.text,author_name:G(e.O).getName(),text:e.text,footer:a.j?K.message:a.name,ts:e.f}])));uc.remove();Ga(P("POST",b).j("json"),function(a,b,e){e&&void 0!==e.pendingId&&(c.ta=e.pendingId)}).a()}function Pb(a,b){P("DELETE","api/pinMsg?room="+encodeURIComponent(a.id)+"&msgId="+b.id).a()} function Eb(a,b,c){P("POST","api/reaction?room="+encodeURIComponent(a)+"&msg="+b+"&reaction="+encodeURIComponent(c)).a()}function Zb(){P("POST","api/logout").a();document.cookie="sessID=;Path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.location.reload();Ma()&&__native.logout()} function sb(){var a={},b=[],c=this.value;ta(C.context,function(b){a[b.id]=ia(b,c)});for(var e in a){var d=document.getElementById("room_"+e);d&&(a[e].name+a[e].sa+a[e].za+a[e].va?(d.classList.remove("hidden"),b.push(e)):d.classList.add("hidden"))}};var ec={noemoji:{qa:"noemoji.js",ca:null,name:"None"},emojione_v2_3:{qa:"emojione_v2.3.sprites.js",ca:"emojione_v2.3.sprites.css",name:"Emojione v2.3"},emojione_v3:{qa:"emojione_v3.sprites.js",ca:"emojione_v3.sprites.css",name:"Emojione v3"},"emojione_v4.5":{qa:"emojione_v4.5.sprites.js",ca:"emojione_v4.5.sprites.css",name:"Emojione v4.5"}},Bc=ec.emojione_v2_3,eb; function Cc(a){eb!==a&&(console.log("Loading emoji pack "+a.name),Ga(P(a.qa),function(b,c,e){b=document.createElement("script");b.innerHTML=e;b.language="text/javascript";document.body.appendChild(b);a.ca&&(e=document.createElement("link"),e.href=a.ca,e.rel="stylesheet",document.head.appendChild(e));e=document.getElementById("emojiButton");sc();Ob.reset();"makeEmoji"in window?(e.style.backgroundImage='url("smile.svg")',e.classList.remove("hidden")):e.classList.add("hidden")}).s(6E4).a(),eb=a)} function wc(){var a=N.w;Cc(a&&ec[a]?ec[a]:Bc)};var Wb=function(){function a(){c();t instanceof r?(f.style.backgroundImage="url(api/avatar?size=l&user="+encodeURIComponent(t.a.id)+")",m.textContent=(t.a.qb||(t.a.eb||"")+" "+t.a.ib).trim(),g.classList.add("presence-indicator"),t.a.R?g.classList.remove("presence-away"):g.classList.add("presence-away"),h.classList.remove("hidden"),l.classList.remove("hidden"),l.textContent=t.a.Lb||"",v.textContent=t.a.Bb||"",n.classList.remove("hidden"),d.classList.remove("roominfo-channel"),d.classList.add("roominfo-user")): b()}function b(){var a=F;a.Y.topic?(h.classList.remove("hidden"),m.textContent=t.za||"",p.textContent=t.w?K.Na(t.w,t.ga):""):h.classList.add("hidden");a.Y.purpose?(n.classList.remove("hidden"),v.textContent=t.va||"",B.textContent=t.s?K.Na(t.s,t.fa):""):n.classList.add("hidden");f.style.backgroundImage="";g.classList.remove("presence-indicator");M.textContent=K.sb(t.l?Object.keys(t.l).length:0);a=[];if(t.l)for(var b in t.l)a.push(t.l[b]);a.sort(function(a,b){return a.R&&!b.R?-1:b.R&&!a.R?1:a.getName().localeCompare(b.getName())}); var c=document.createDocumentFragment();a.forEach(function(a){var b=document.createElement("li"),d=document.createElement("a");d.href="#"+a.id;d.textContent=a.getName();b.appendChild(d);b.classList.add("presence-indicator");a.R||b.classList.add("presence-away");c.appendChild(b)});I.textContent="";I.appendChild(c);d.classList.add("roominfo-channel");d.classList.remove("roominfo-user")}function c(){g.textContent=t.name;if(t.b){z.textContent=K.mb(t.b.length);z.classList.remove("hidden");A.classList.remove("hidden"); var a=document.createDocumentFragment();t.b.forEach(function(b){var c=document.createElement("li"),d=document.createElement("a");d.href="javascript:void(0)";d.dataset.msgId=b.id;d.addEventListener("click",e);d.className=Ua+" roominfo-unpin";c.className="roominfo-pinlist-item";c.appendChild(b.P());c.appendChild(d);a.appendChild(c)});A.textContent="";A.appendChild(a)}else z.classList.add("hidden"),A.classList.add("hidden")}function e(){if(t.b)for(var a=0,b=t.b.length;a'"]);!0===a.s||(b[".chatmsg-authorGroup .chatmsg-item .chatmsg-link-user, .chatsystem-content a.chatmsg-author-name, .chatmsg-author-name"]=["background-color: transparent !important;"]);for(var e in b)c+=e+"{",b[e].forEach(function(a){c+=a+";"}),c+="}";return c}N=new rc([]);function Gc(){}Gc.prototype.close=function(){};function Hc(a,b){Gc.apply(this);this.Ma=Ic++;this.xb=a;this.port=b}Hc.prototype=Object.create(Gc);Hc.prototype.constructor=Hc;Hc.prototype.connect=function(){return new Promise(function(){__native.TCPConnect(this.Ma,this.xb,this.port)})};Hc.prototype.write=function(a){__native.TCPWrite(this.Ma,a)};Hc.prototype.close=function(){__native.TCPClose(this.Ma)};var Ic=0;var La=function(){var a={},b=0;return{jb:function(c,e){var d=b++;e&&(c.yb=e);a[""+d]=c;return d},Jb:function(){var b=""+Array.prototype.shift.call(arguments);a[b]&&(a[b].apply(a[b].yb,arguments),delete a[b])}}}();window.__CALLBACK={onResult:La.Jb};function Ma(){return!!("__native"in window)};window.displayMenu=function(){document.getElementById("chatCtx").classList.add("opened")};window.hideMenu=function(){document.getElementById("chatCtx").classList.remove("opened")};window.toggleMenu=function(){Ub()};window.setChannelFavorite=function(a,b){var c=va(a);c?b?Yb(c):Xb(c):console.error("Channel "+a+" not found")};window.onApplicationPaused=function(){window.hasFocus=!1};window.onApplicationResumed=function(){window.hasFocus=!0};var gb=function(){var a=[];return{gb:function(b){for(var c=0,e=a.length;c