B Thibault 8 gadi atpakaļ
vecāks
revīzija
9ab2eef985
5 mainītis faili ar 126 papildinājumiem un 110 dzēšanām
  1. 1 0
      cli/resources.js
  2. 17 1
      cli/roomInfo.js
  3. 4 7
      cli/ui.js
  4. 102 102
      srv/public/mimouchat.min.js
  5. 2 0
      srv/public/style.css

+ 1 - 0
cli/resources.js

@@ -110,6 +110,7 @@ var R = {
                 pinCount: "roominfo-pincount",
                 pinList: "roominfo-pinlist",
                 pinItem: "roominfo-pinlist-item",
+                unpin: "roominfo-unpin",
                 author: "roominfo-author",
                 phone: "roominfo-phone",
                 type: {

+ 17 - 1
cli/roomInfo.js

@@ -61,6 +61,15 @@ var roomInfo = (function() {
     section.appendChild(userCount);
     section.appendChild(userList);
 
+    var removePin = function() {
+        if (currentChan.pins)
+            for (var i =0, nbPins = currentChan.pins.length; i < nbPins; i++)
+                if (currentChan.pins[i].id === this.dataset["msgId"]) {
+                    unpinMsg(currentChan, currentChan.pins[i]);
+                    break;
+                }
+    }
+
     var updateCommon = function() {
         headerContent.textContent = currentChan.name;
         if (currentChan.pins) {
@@ -69,9 +78,16 @@ var roomInfo = (function() {
             pinList.classList.remove(R.klass.hidden);
             var pinFrag = document.createDocumentFragment();
             currentChan.pins.forEach(function(uiMsg) {
-                var li = document.createElement("li");
+                var li = document.createElement("li"),
+                    unpinButton = document.createElement("a");
+
+                unpinButton.href = "javascript:void(0)";
+                unpinButton.dataset["msgId"] = uiMsg.id;
+                unpinButton.addEventListener("click", removePin);
+                unpinButton.className = R.klass.button +' ' +R.klass.chatList.roomInfo.unpin;
                 li.className = R.klass.chatList.roomInfo.pinItem;
                 li.appendChild(uiMsg.getDom());
+                li.appendChild(unpinButton);
                 pinFrag.appendChild(li);
             });
             pinList.textContent = '';

+ 4 - 7
cli/ui.js

@@ -555,6 +555,8 @@ document.addEventListener('DOMContentLoaded', function() {
 
     document.addEventListener("mouseover", function(e) {
         var t = e.target;
+        if (roomInfo.isParentOf(t))
+            return;
         while (t && t !== this) {
             if (t.nodeName === 'A') {
                 var href = t.href,
@@ -563,16 +565,14 @@ document.addEventListener('DOMContentLoaded', function() {
                     href = href.substr(sepPosition +1);
                     var channelCtx = DATA.context.getChannelContext(href);
                     if (channelCtx) {
-                        if (!roomInfo.isParentOf(t))
-                            roomInfo.populate(channelCtx, channelCtx.getChatContext().channels[href]).show(t);
+                        roomInfo.populate(channelCtx, channelCtx.getChatContext().channels[href]).show(t);
                         return;
                     }
                     channelCtx = DATA.context.getUserContext(href);
                     if (channelCtx) {
                         var room = channelCtx.getChatContext().users[href].privateRoom;
                         if (room) {
-                            if (!roomInfo.isParentOf(t))
-                                roomInfo.populate(channelCtx, room).show(t);
+                            roomInfo.populate(channelCtx, room).show(t);
                             return;
                         }
                     }
@@ -583,9 +583,6 @@ document.addEventListener('DOMContentLoaded', function() {
         }
         roomInfo.hide();
     });
-    document.addEventListener("mouseleave", function() {
-        roomInfo.hide();
-    });
 
     document.getElementById(R.id.currentRoom.starButton).addEventListener("click", function(e) {
         e.preventDefault();

+ 102 - 102
srv/public/mimouchat.min.js

@@ -1,126 +1,126 @@
 "use strict";(function(){
 var p;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.a=a.desc;this.name=a.name;this.type=a.type;this.usage=a.usage;this.U=a.category}function ca(){this.a={};this.B=[];this.version=0}
-ca.prototype.update=function(a,b){a.emoji_use&&(this.a=JSON.parse(a.emoji_use));a.highlight_words?this.B=(a.highlight_words||"").split(",").filter(function(a){return""!==a.trim()}):a.highlights&&(this.B=a.highlights);this.version=Math.max(this.version,b)};function da(){this.a=null;this.l={};this.j={};this.self=null;this.b={version:0,data:{}};this.h={version:0,data:{}};this.u={};this.Y={};this.o=0}function fa(a,b){return b.pv?new u(b.id,a.j[b.user]):new v(b.id)}
-function ga(a,b,c){var d=d||"";b.team&&(a.a||(a.a=new aa(b.team.id)),a.a.update(b.team,c));if(b.users)for(var e=0,f=b.users.length;e<f;e++){var g=a.j[d+b.users[e].id];g||(g=a.j[d+b.users[e].id]=new ha(b.users[e].id));g.update(b.users[e],c)}if(b.channels)for(e=0,f=b.channels.length;e<f;e++)(g=a.l[d+b.channels[e].id])||(g=a.l[d+b.channels[e].id]=fa(a,b.channels[e])),g.update(b.channels[e],a,c,d);b.emojis&&(a.b.data=b.emojis,a.b.version=c);if(void 0!==b.commands){a.h.data={};for(e in b.commands)a.h.data[e]=
+ca.prototype.update=function(a,b){a.emoji_use&&(this.a=JSON.parse(a.emoji_use));a.highlight_words?this.B=(a.highlight_words||"").split(",").filter(function(a){return""!==a.trim()}):a.highlights&&(this.B=a.highlights);this.version=Math.max(this.version,b)};function da(){this.a=null;this.l={};this.j={};this.self=null;this.b={version:0,data:{}};this.h={version:0,data:{}};this.u={};this.Y={};this.o=0}function ea(a,b){return b.pv?new t(b.id,a.j[b.user]):new v(b.id)}
+function ga(a,b,c){var d=d||"";b.team&&(a.a||(a.a=new aa(b.team.id)),a.a.update(b.team,c));if(b.users)for(var e=0,f=b.users.length;e<f;e++){var g=a.j[d+b.users[e].id];g||(g=a.j[d+b.users[e].id]=new ha(b.users[e].id));g.update(b.users[e],c)}if(b.channels)for(e=0,f=b.channels.length;e<f;e++)(g=a.l[d+b.channels[e].id])||(g=a.l[d+b.channels[e].id]=ea(a,b.channels[e])),g.update(b.channels[e],a,c,d);b.emojis&&(a.b.data=b.emojis,a.b.version=c);if(void 0!==b.commands){a.h.data={};for(e in b.commands)a.h.data[e]=
 new ba(b.commands[e]);a.h.version=c}b.self&&(a.self=a.j[d+b.self.id]||null,a.self.R||(a.self.R=new ca),b.self.prefs&&a.self.R.update(b.self.prefs,c));b.capacities&&(a.Y={},b.capacities.forEach(function(a){this.Y[a]=!0},a));a.o=Math.max(a.o,c)}"undefined"!==typeof module&&(module.H.vb=da,module.H.wb=aa,module.H.yb=ba);function v(a){this.id=a;this.A=!1;this.C=0;this.j={};this.version=0}
-v.prototype.update=function(a,b,c,d){d=d||"";void 0!==a.name&&(this.name=a.name);void 0!==a.is_archived&&(this.da=a.is_archived);void 0!==a.is_member&&(this.$=a.is_member);void 0!==a.last_read&&(this.C=Math.max(parseFloat(a.last_read),this.C));void 0!==a.last_msg&&(this.P=parseFloat(a.last_msg));void 0!==a.is_private&&(this.b=a.is_private);void 0!==a.pins&&(this.h=a.pins);this.A=!!a.is_starred;if(a.members&&(this.j={},a.members))for(var e=0,f=a.members.length;e<f;e++){var g=b.j[d+a.members[e]];this.j[g.id]=
-g;g.l[this.id]=this}a.topic&&(this.la=a.topic.value,this.I=b.j[d+a.topic.creator],this.ca=a.topic.last_set);a.purpose&&(this.ia=a.purpose.value,this.o=b.j[d+a.purpose.creator],this.ba=a.purpose.last_set);this.version=Math.max(this.version,c)};function ia(a,b){var c=ja;return{name:c.fa(b,a.name),ob:c.fa(b,Object.values(a.j),function(a){return a?a.getName():null}),la:c.fa(b,a.la),ia:c.fa(b,a.ia)}}function u(a,b){v.call(this,a);this.a=b;this.name=b.getName();this.b=!0;b.V=this}u.prototype=Object.create(v.prototype);
-u.prototype.constructor=u;"undefined"!==typeof module&&(module.H.Eb=v,module.H.Db=u);function y(a,b){this.L=a.user;this.username=a.username;this.id=a.id||a.ts;this.m=parseFloat(a.ts);this.text="";this.s=[];this.A=a.is_starred||!1;this.h=this.F=!1;this.D={};this.version=b;this.update(a,b)}function z(a,b){y.call(this,a,b)}function B(a,b){y.call(this,a,b)}
-y.prototype.update=function(a,b){if(a){if(this.text=a.text||"",a.attachments&&(this.s=a.attachments),this.A=!!a.is_starred,this.F=void 0===a.edited?!1:a.edited,this.h=!!a.removed,a.reactions){var c={};a.reactions.forEach(function(a){c[a.name]=[];a.users.forEach(function(b){c[a.name].push(b)})});this.D=c}}else this.h=!0;this.version=b};function C(a,b,c,d,e){this.id="string"===typeof a?a:a.id;this.a=[];this.h=c;this.fb=0;this.o=b;d&&ka(this,d,e)}
+v.prototype.update=function(a,b,c,d){d=d||"";void 0!==a.name&&(this.name=a.name);void 0!==a.is_archived&&(this.da=a.is_archived);void 0!==a.is_member&&(this.$=a.is_member);void 0!==a.last_read&&(this.C=Math.max(parseFloat(a.last_read),this.C));void 0!==a.last_msg&&(this.P=parseFloat(a.last_msg));void 0!==a.is_private&&(this.h=a.is_private);void 0!==a.pins&&(this.b=a.pins);this.A=!!a.is_starred;if(a.members&&(this.j={},a.members))for(var e=0,f=a.members.length;e<f;e++){var g=b.j[d+a.members[e]];this.j[g.id]=
+g;g.l[this.id]=this}a.topic&&(this.la=a.topic.value,this.I=b.j[d+a.topic.creator],this.ca=a.topic.last_set);a.purpose&&(this.ia=a.purpose.value,this.o=b.j[d+a.purpose.creator],this.ba=a.purpose.last_set);this.version=Math.max(this.version,c)};function ia(a,b){var c=ja;return{name:c.fa(b,a.name),ob:c.fa(b,Object.values(a.j),function(a){return a?a.getName():null}),la:c.fa(b,a.la),ia:c.fa(b,a.ia)}}function t(a,b){v.call(this,a);this.a=b;this.name=b.getName();this.h=!0;b.V=this}t.prototype=Object.create(v.prototype);
+t.prototype.constructor=t;"undefined"!==typeof module&&(module.H.Eb=v,module.H.Db=t);function y(a,b){this.L=a.user;this.username=a.username;this.id=a.id||a.ts;this.m=parseFloat(a.ts);this.text="";this.s=[];this.A=a.is_starred||!1;this.h=this.F=!1;this.D={};this.version=b;this.update(a,b)}function z(a,b){y.call(this,a,b)}function B(a,b){y.call(this,a,b)}
+y.prototype.update=function(a,b){if(a){if(this.text=a.text||"",a.attachments&&(this.s=a.attachments),this.A=!!a.is_starred,this.F=void 0===a.edited?!1:a.edited,this.h=!!a.removed,a.reactions){var c={};a.reactions.forEach(function(a){c[a.name]=[];a.users.forEach(function(b){c[a.name].push(b)})});this.D=c}}else this.h=!0;this.version=b};function C(a,b,c,d,e){this.id="string"===typeof a?a:a.id;this.a=[];this.h=c;this.eb=0;this.o=b;d&&ka(this,d,e)}
 function ka(a,b,c){var d=0;b.forEach(function(a){d=Math.max(this.push(a,c),d)}.bind(a));la(a);return d}C.prototype.b=function(a,b){return!0===a.isMeMessage?new z(a,b):!0===a.isNotice?new B(a,b):new y(a,b)};
 C.prototype.push=function(a,b){for(var c,d=!1,e,f=0,g=this.a.length;f<g;f++)if(c=this.a[f],c.id===a.id){e=c.update(a,b);d=!0;break}d||(c=this.b(a,b),this.a.push(c),e=c.m);for(;this.a.length>this.o;)this.a.shift();if(this.h)for(a=0;a<this.a.length;a++)this.a[a].version<b-this.h&&this.a.splice(a--,1);return e||0};function ma(a){return a.a[a.a.length-1]}function na(a,b){for(var c=0,d=a.a.length;c<d;c++)if(a.a[c].id==b)return a.a[c];return null}function la(a){a.a.sort(function(a,c){return a.m-c.m})}
 z.prototype=Object.create(y.prototype);z.prototype.constructor=z;B.prototype=Object.create(y.prototype);B.prototype.constructor=B;"undefined"!==typeof module&&(module.H={Ab:y,zb:z,Cb:B,Fb:C});function ha(a){this.id=a;this.l={};this.V=this.R=null;this.version=0}
-ha.prototype.update=function(a,b){void 0!==a.name&&(this.name=a.name);void 0!==a.deleted&&(this.Oa=a.deleted);void 0!==a.status&&(this.status=a.status);void 0!==a.goal&&(this.kb=a.goal);void 0!==a.phone&&(this.qb=a.phone);void 0!==a.first_name&&(this.Qa=a.first_name);void 0!==a.last_name&&(this.Va=a.last_name);void 0!==a.real_name&&(this.cb=a.real_name);void 0!==a.isPresent&&(this.wa=a.isPresent);a.isBot&&(this.mb=a.isBot);this.version=Math.max(this.version,b)};
-ha.prototype.getName=function(){return this.name||this.cb||this.Qa||this.Va};"undefined"!==typeof module&&(module.H.xb=ha);function oa(){this.a=[]}oa.prototype.push=function(a){this.a.push(a)};function pa(a,b){for(var c=0,d=a.a.length;c<d;c++)if(b===qa(a.a[c]))return a.a[c];return null}function ra(a,b){for(var c=0,d=a.a.length;c<d;c++){var e=a.a[c],f;for(f in e.l)if(!0===b(e.l[f],f))return}}function sa(a){for(var b=E.context,c=0,d=b.a.length;c<d&&!0!==a(b.a[c]);c++);}function F(a,b){for(var c=0,d=a.a.length;c<d;c++)if(a.a[c].l[b])return a.a[c];return null}
-function ta(a){for(var b=E.context,c=0,d=b.a.length;c<d;c++){var e=b.a[c].l[a];if(e)return e}return null}function ua(a){for(var b=E.context,c=[],d=0,e=b.a.length;d<e;d++){var f=b.a[d].l,g;for(g in f)a&&!a(f[g],b.a[d],g)||c.push(g)}return c}function H(a){for(var b=E.context,c=0,d=b.a.length;c<d;c++){var e=b.a[c].j[a];if(e)return e}return null}"undefined"!==typeof module&&(module.H.Bb=oa);var ja=function(){function a(b,c,d){if(Array.isArray(c)){for(var e=0,f=0,g=c.length;f<g;f++){var h=a(b,c[f],d);if(1===h)return 1;e=Math.max(h,e)}return e}return(c=d?d(c):c)&&void 0!==b&&null!==b?b.length?-1===c.indexOf(b)?0:b.length/c.length:1:0}return{fa:a}}();"undefined"!==typeof module&&(module.H.Gb=ja);var I={},K,va=[];function wa(){if(!c){for(var a=0,b=navigator.languages.length;a<b;a++)if(I.hasOwnProperty(navigator.languages[a])){var c=navigator.languages[a];break}c||(c="en")}K=I[c];console.log("Loading language pack: "+c);if(K.c)for(var d in K.c)if(c=document.getElementById(d))c.textContent=K.c[d];va.forEach(function(a){a()})};I.fr={ub:"Utilisateur inconnu",tb:"Channel inconnu",Xa:"Nouveau message",message:"Message",Wa:"Reseau",Ya:"(visible seulement par vous)",A:"Favoris",l:"Discutions",bb:"Discutions priv\u00e9es",eb:"Partage sa position GPS",ok:"Ok",Pa:"Annuler",N: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()?"hier, "+a.toLocaleTimeString():
+ha.prototype.update=function(a,b){void 0!==a.name&&(this.name=a.name);void 0!==a.deleted&&(this.Na=a.deleted);void 0!==a.status&&(this.status=a.status);void 0!==a.goal&&(this.jb=a.goal);void 0!==a.phone&&(this.qb=a.phone);void 0!==a.first_name&&(this.Pa=a.first_name);void 0!==a.last_name&&(this.Ua=a.last_name);void 0!==a.real_name&&(this.bb=a.real_name);void 0!==a.isPresent&&(this.va=a.isPresent);a.isBot&&(this.lb=a.isBot);this.version=Math.max(this.version,b)};
+ha.prototype.getName=function(){return this.name||this.bb||this.Pa||this.Ua};"undefined"!==typeof module&&(module.H.xb=ha);function oa(){this.a=[]}oa.prototype.push=function(a){this.a.push(a)};function pa(a,b){for(var c=0,d=a.a.length;c<d;c++)if(b===qa(a.a[c]))return a.a[c];return null}function ra(a,b){for(var c=0,d=a.a.length;c<d;c++){var e=a.a[c],f;for(f in e.l)if(!0===b(e.l[f],f))return}}function sa(a){for(var b=F.context,c=0,d=b.a.length;c<d&&!0!==a(b.a[c]);c++);}function G(a,b){for(var c=0,d=a.a.length;c<d;c++)if(a.a[c].l[b])return a.a[c];return null}
+function ta(a){for(var b=F.context,c=0,d=b.a.length;c<d;c++){var e=b.a[c].l[a];if(e)return e}return null}function ua(a){for(var b=F.context,c=[],d=0,e=b.a.length;d<e;d++){var f=b.a[d].l,g;for(g in f)a&&!a(f[g],b.a[d],g)||c.push(g)}return c}function I(a){for(var b=F.context,c=0,d=b.a.length;c<d;c++){var e=b.a[c].j[a];if(e)return e}return null}"undefined"!==typeof module&&(module.H.Bb=oa);var ja=function(){function a(b,c,d){if(Array.isArray(c)){for(var e=0,f=0,g=c.length;f<g;f++){var h=a(b,c[f],d);if(1===h)return 1;e=Math.max(h,e)}return e}return(c=d?d(c):c)&&void 0!==b&&null!==b?b.length?-1===c.indexOf(b)?0:b.length/c.length:1:0}return{fa:a}}();"undefined"!==typeof module&&(module.H.Gb=ja);var J={},L,va=[];function wa(){if(!c){for(var a=0,b=navigator.languages.length;a<b;a++)if(J.hasOwnProperty(navigator.languages[a])){var c=navigator.languages[a];break}c||(c="en")}L=J[c];console.log("Loading language pack: "+c);if(L.c)for(var d in L.c)if(c=document.getElementById(d))c.textContent=L.c[d];va.forEach(function(a){a()})};J.fr={ub:"Utilisateur inconnu",tb:"Channel inconnu",Wa:"Nouveau message",message:"Message",Va:"Reseau",Xa:"(visible seulement par vous)",A:"Favoris",l:"Discutions",ab:"Discutions priv\u00e9es",cb:"Partage sa position GPS",ok:"Ok",Oa:"Annuler",N: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()?"hier, "+a.toLocaleTimeString():
 a.toLocaleString()},ta:function(a,b){return a+"/"+b},c:{fileUploadCancel:"Annuler",neterror:"Impossible de se connecter au chat !",ctxMenuSettings:"Configuration",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"}};I.fr.Za=function(a){return 0===a?"Pas de message \u00e9pingl\u00e9":a+(1===a?" message \u00e9pingl\u00e9":" messages \u00e9pingl\u00e9s")};I.fr.F=function(a){return"(edit&eacute; "+I.fr.N(a)+")"};I.fr.za=function(a,b){return"par "+a.getName()+" le "+I.fr.N(b)};I.en={ub:"Unknown member",tb:"Unknown channel",Xa:"New message",message:"Message",Wa:"Network",Ya:"(only visible to you)",A:"Starred",l:"Channels",bb:"Direct messages",eb:"Share your GPS location",ok:"Ok",Pa:"Cancel",N: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()},
+"settings-serviceAddConfirm":"Suivant"}};J.fr.Ya=function(a){return 0===a?"Pas de message \u00e9pingl\u00e9":a+(1===a?" message \u00e9pingl\u00e9":" messages \u00e9pingl\u00e9s")};J.fr.F=function(a){return"(edit&eacute; "+J.fr.N(a)+")"};J.fr.ya=function(a,b){return"par "+a.getName()+" le "+J.fr.N(b)};J.en={ub:"Unknown member",tb:"Unknown channel",Wa:"New message",message:"Message",Va:"Network",Xa:"(only visible to you)",A:"Starred",l:"Channels",ab:"Direct messages",cb:"Share your GPS location",ok:"Ok",Oa:"Cancel",N: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()},
 ta:function(a,b){return a+"/"+b},c:{fileUploadCancel:"Cancel",neterror:"Cannot connect to chat !",ctxMenuSettings:"Settings",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"}};I.en.Za=function(a){return 0===a?"No pinned messages":a+(1===a?" pinned message":" pinned messages")};I.en.F=function(a){return"(edited "+I.en.N(a)+")"};I.en.za=function(a,b){return"by "+a.getName()+" on "+I.en.N(b)};var xa=function(){function a(a){this.text="";this.g=a}function b(b,c,d){this.X=c;this.f=null;this.i=[];this.a=d||"";this.oa="<"===this.a;this.xa="*"===this.a;this.na="_"===this.a;this.pa="~"===this.a||"-"===this.a;this.h=">"===this.a||"&gt;"===this.a;this.I=":"===this.a;this.Aa="`"===this.a;this.La="```"===this.a;this.Ba="\n"===this.a;this.ma=void 0!==d&&-1!==n.B.indexOf(d);this.g=b;this.qa=null;this.b=this.Ba||this.ma?c+d.length-1:!1;this.ma&&(this.f=new a(this),this.i.push(this.f),this.f.text=d)}
-function c(a){return"A"<=a&&"Z">=a||"a"<=a&&"z">=a||"0"<=a&&"9">=a||-1!=="\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".indexOf(a)}function d(a){a=a||l;for(var c=0,e=a.i.length;c<e;c++){var m=
-a.i[c];if(m instanceof b)if(m.b){if(m=d(m))return m}else return m}return null}function e(a,c){a.g instanceof b&&(a.g.i.splice(a.g.i.indexOf(a)+(c?1:0)),a.g.f=a.g.i[a.g.i.length-1],e(a.g,!0))}function f(a){return a}function g(a){return{link:a,text:a,Sa:!1}}var h,l,n={B:[],Z:f,ka:f,ha:g};b.prototype.Da=function(){return this.xa&&!!this.b||this.g instanceof b&&this.g.Da()};b.prototype.Ga=function(){return this.na&&!!this.b||this.g instanceof b&&this.g.Ga()};b.prototype.Ha=function(){return this.pa&&
-!!this.b||this.g instanceof b&&this.g.Ha()};b.prototype.ca=function(){return this.I&&!!this.b||this.g instanceof b&&this.g.ca()};b.prototype.Fa=function(){return this.ma&&!!this.b||this.g instanceof b&&this.g.Fa()};b.prototype.Ea=function(){return this.Aa&&!!this.b||this.g instanceof b&&this.g.Ea()};b.prototype.ba=function(){return this.La&&!!this.b||this.g instanceof b&&this.g.ba()};b.prototype.Ia=function(){for(var a=0,c=this.i.length;a<c;a++)if(this.i[a]instanceof b&&(!this.i[a].b||this.i[a].Ia()))return!0;
-return!1};b.prototype.Ja=function(a){if("<"===this.a&&">"===h[a])return!0;var b=c(h[a-1]);if(!this.h&&h.substr(a,this.a.length)===this.a){if(!b&&(this.xa||this.na||this.pa))return!1;if(this.f&&this.Ia())return this.f.Ma();if(this.gb())return!0}return"\n"===h[a]&&this.h?!0:!1};b.prototype.gb=function(){for(var a=this;a;){for(var c=0,d=a.i.length;c<d;c++)if(a.i[c]instanceof b||a.i[c].text.length)return!0;a=a.qa}return!1};b.prototype.Ma=function(){var a=new b(this.g,this.X,this.a);a.qa=this;this.f&&
-this.f instanceof b&&(a.f=this.f.Ma(),a.i=[a.f]);return a};b.prototype.hb=function(a){return this.I&&(" "===h[a]||"\t"===h[a])||(this.I||this.oa||this.xa||this.na||this.pa||this.Aa)&&"\n"===h[a]?!1:!0};b.prototype.ib=function(b){if(this.Aa||this.I||this.La||this.oa)return null;if(!this.f||this.f.b||this.f instanceof a){var d=c(h[b-1]),e=c(h[b+1]);if("```"===h.substr(b,3))return"```";var f=l.va();if(void 0===f||f){if("&gt;"===h.substr(b,4))return"&gt;";if(">"===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=n.B.length;d<e;d++)if(f=n.B[d],h.substr(b,f.length)===f)return f}return null};a.prototype.va=function(){if(""!==this.text.trim())return!1};b.prototype.va=function(){for(var a=this.i.length-1;0<=a;a--){var b=this.i[a].va();if(void 0!==b)return b}if(this.Ba||
-this.h)return!0};a.prototype.o=function(a){this.text+=h[a];return 1};b.prototype.o=function(c){var d=this.f&&!this.f.b&&this.f.Ja?this.f.Ja(c):null;if(d){var e=this.f.a.length;this.f.Ca(c);d instanceof b&&(this.f=d,this.i.push(d));return e}if(!this.f||this.f.b||this.f instanceof a||this.f.hb(c)){if(d=this.ib(c))return this.f=new b(this,c,d),this.i.push(this.f),this.f.a.length;if(!this.f||this.f.b)this.f=new a(this),this.i.push(this.f);return this.f.o(c)}d=this.f.X+1;l.$(this.f.X);this.f=new a(this);
-this.f.o(d-1);this.i.pop();this.i.push(this.f);return d-c};b.prototype.Ca=function(a){for(var b=this;b;)b.b=a,b=b.qa};b.prototype.$=function(a){this.b&&this.b>=a&&(this.b=!1);this.i.forEach(function(c){c instanceof b&&c.$(a)})};a.prototype.innerHTML=function(){if(this.g.ca()){for(var a=this.g;a&&!a.I;)a=a.g;if(a){var a=a.a+this.text+a.a,b=n.Z(a);return b?b:a}return(a=n.Z(this.text))?a:this.text}if(this.g.ba()){if("undefined"!==typeof hljs)try{return a=this.text.match(/^\w+/),hljs.configure({useBR:!0,
-tabReplace:"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"}),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(q){console.error(q)}return this.text.replace(/\n/g,"<br/>")}return n.ka(this.text)};a.prototype.outerHTML=function(){var a="span",b=[],c="";if(this.g.ba()){a="pre";b.push("codeblock");var d=this.innerHTML()}else this.g.Ea()?(b.push("code"),d=this.innerHTML()):(this.g.oa&&(d=n.ha(this.text))?
-(a="a",c=' href="'+d.link+'"',d.Sa||(c+=' target="_blank"'),d=n.ka(d.text)):d=this.innerHTML(),this.g.Da()&&b.push("bold"),this.g.Ga()&&b.push("italic"),this.g.Ha()&&b.push("strike"),this.g.ca()&&b.push("emoji"),this.g.Fa()&&b.push("highlight"));return"<"+a+c+(b.length?' class="'+b.join(" ")+'"':"")+">"+d+"</"+a+">"};b.prototype.outerHTML=function(){var a="";this.h&&(a+='<span class="quote">');this.Ba&&(a+="<br/>");this.i.forEach(function(b){a+=b.outerHTML()});this.h&&(a+="</span>");return a};b.prototype.Ka=
-function(a){this.h&&!this.b&&this.Ca(a);this.i.forEach(function(c){c instanceof b&&c.Ka(a)})};return function(c,k){k||(k={});n.B=k.B||[];n.Z=k.Z||f;n.ka=k.ka||f;n.ha=k.ha||g;h=c;l=new b(this,0);k=0;c=h.length;do{for(;k<c;)k+=l.o(k);l.Ka(h.length);if(k=d()){e(k,!1);l.$(k.X);var m=new a(k.g);m.o(k.X);k.g.i.push(m);k.g.f=m;k=k.X+1}else k=void 0}while(void 0!==k);return l.outerHTML()}}();"undefined"!==typeof module&&(module.H.w=xa);function ya(a,b){this.h=a;this.content=b;this.c=za(this);this.b=Aa(this);this.a=[];this.o=[]}
+"settings-serviceAddConfirm":"Next"}};J.en.Ya=function(a){return 0===a?"No pinned messages":a+(1===a?" pinned message":" pinned messages")};J.en.F=function(a){return"(edited "+J.en.N(a)+")"};J.en.ya=function(a,b){return"by "+a.getName()+" on "+J.en.N(b)};var xa=function(){function a(a){this.text="";this.g=a}function b(b,c,d){this.X=c;this.f=null;this.i=[];this.a=d||"";this.oa="<"===this.a;this.wa="*"===this.a;this.na="_"===this.a;this.pa="~"===this.a||"-"===this.a;this.h=">"===this.a||"&gt;"===this.a;this.I=":"===this.a;this.za="`"===this.a;this.Ka="```"===this.a;this.Aa="\n"===this.a;this.ma=void 0!==d&&-1!==n.B.indexOf(d);this.g=b;this.qa=null;this.b=this.Aa||this.ma?c+d.length-1:!1;this.ma&&(this.f=new a(this),this.i.push(this.f),this.f.text=d)}
+function c(a){return"A"<=a&&"Z">=a||"a"<=a&&"z">=a||"0"<=a&&"9">=a||-1!=="\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".indexOf(a)}function d(a){a=a||k;for(var c=0,e=a.i.length;c<e;c++){var m=
+a.i[c];if(m instanceof b)if(m.b){if(m=d(m))return m}else return m}return null}function e(a,c){a.g instanceof b&&(a.g.i.splice(a.g.i.indexOf(a)+(c?1:0)),a.g.f=a.g.i[a.g.i.length-1],e(a.g,!0))}function f(a){return a}function g(a){return{link:a,text:a,Sa:!1}}var h,k,n={B:[],Z:f,ka:f,ha:g};b.prototype.Ca=function(){return this.wa&&!!this.b||this.g instanceof b&&this.g.Ca()};b.prototype.Fa=function(){return this.na&&!!this.b||this.g instanceof b&&this.g.Fa()};b.prototype.Ga=function(){return this.pa&&
+!!this.b||this.g instanceof b&&this.g.Ga()};b.prototype.ca=function(){return this.I&&!!this.b||this.g instanceof b&&this.g.ca()};b.prototype.Ea=function(){return this.ma&&!!this.b||this.g instanceof b&&this.g.Ea()};b.prototype.Da=function(){return this.za&&!!this.b||this.g instanceof b&&this.g.Da()};b.prototype.ba=function(){return this.Ka&&!!this.b||this.g instanceof b&&this.g.ba()};b.prototype.Ha=function(){for(var a=0,c=this.i.length;a<c;a++)if(this.i[a]instanceof b&&(!this.i[a].b||this.i[a].Ha()))return!0;
+return!1};b.prototype.Ia=function(a){if("<"===this.a&&">"===h[a])return!0;var b=c(h[a-1]);if(!this.h&&h.substr(a,this.a.length)===this.a){if(!b&&(this.wa||this.na||this.pa))return!1;if(this.f&&this.Ha())return this.f.La();if(this.fb())return!0}return"\n"===h[a]&&this.h?!0:!1};b.prototype.fb=function(){for(var a=this;a;){for(var c=0,d=a.i.length;c<d;c++)if(a.i[c]instanceof b||a.i[c].text.length)return!0;a=a.qa}return!1};b.prototype.La=function(){var a=new b(this.g,this.X,this.a);a.qa=this;this.f&&
+this.f instanceof b&&(a.f=this.f.La(),a.i=[a.f]);return a};b.prototype.gb=function(a){return this.I&&(" "===h[a]||"\t"===h[a])||(this.I||this.oa||this.wa||this.na||this.pa||this.za)&&"\n"===h[a]?!1:!0};b.prototype.hb=function(b){if(this.za||this.I||this.Ka||this.oa)return null;if(!this.f||this.f.b||this.f instanceof a){var d=c(h[b-1]),e=c(h[b+1]);if("```"===h.substr(b,3))return"```";var f=k.ua();if(void 0===f||f){if("&gt;"===h.substr(b,4))return"&gt;";if(">"===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=n.B.length;d<e;d++)if(f=n.B[d],h.substr(b,f.length)===f)return f}return null};a.prototype.ua=function(){if(""!==this.text.trim())return!1};b.prototype.ua=function(){for(var a=this.i.length-1;0<=a;a--){var b=this.i[a].ua();if(void 0!==b)return b}if(this.Aa||
+this.h)return!0};a.prototype.o=function(a){this.text+=h[a];return 1};b.prototype.o=function(c){var d=this.f&&!this.f.b&&this.f.Ia?this.f.Ia(c):null;if(d){var e=this.f.a.length;this.f.Ba(c);d instanceof b&&(this.f=d,this.i.push(d));return e}if(!this.f||this.f.b||this.f instanceof a||this.f.gb(c)){if(d=this.hb(c))return this.f=new b(this,c,d),this.i.push(this.f),this.f.a.length;if(!this.f||this.f.b)this.f=new a(this),this.i.push(this.f);return this.f.o(c)}d=this.f.X+1;k.$(this.f.X);this.f=new a(this);
+this.f.o(d-1);this.i.pop();this.i.push(this.f);return d-c};b.prototype.Ba=function(a){for(var b=this;b;)b.b=a,b=b.qa};b.prototype.$=function(a){this.b&&this.b>=a&&(this.b=!1);this.i.forEach(function(c){c instanceof b&&c.$(a)})};a.prototype.innerHTML=function(){if(this.g.ca()){for(var a=this.g;a&&!a.I;)a=a.g;if(a){var a=a.a+this.text+a.a,b=n.Z(a);return b?b:a}return(a=n.Z(this.text))?a:this.text}if(this.g.ba()){if("undefined"!==typeof hljs)try{return a=this.text.match(/^\w+/),hljs.configure({useBR:!0,
+tabReplace:"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"}),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(q){console.error(q)}return this.text.replace(/\n/g,"<br/>")}return n.ka(this.text)};a.prototype.outerHTML=function(){var a="span",b=[],c="";if(this.g.ba()){a="pre";b.push("codeblock");var d=this.innerHTML()}else this.g.Da()?(b.push("code"),d=this.innerHTML()):(this.g.oa&&(d=n.ha(this.text))?
+(a="a",c=' href="'+d.link+'"',d.Sa||(c+=' target="_blank"'),d=n.ka(d.text)):d=this.innerHTML(),this.g.Ca()&&b.push("bold"),this.g.Fa()&&b.push("italic"),this.g.Ga()&&b.push("strike"),this.g.ca()&&b.push("emoji"),this.g.Ea()&&b.push("highlight"));return"<"+a+c+(b.length?' class="'+b.join(" ")+'"':"")+">"+d+"</"+a+">"};b.prototype.outerHTML=function(){var a="";this.h&&(a+='<span class="quote">');this.Aa&&(a+="<br/>");this.i.forEach(function(b){a+=b.outerHTML()});this.h&&(a+="</span>");return a};b.prototype.Ja=
+function(a){this.h&&!this.b&&this.Ba(a);this.i.forEach(function(c){c instanceof b&&c.Ja(a)})};return function(c,l){l||(l={});n.B=l.B||[];n.Z=l.Z||f;n.ka=l.ka||f;n.ha=l.ha||g;h=c;k=new b(this,0);l=0;c=h.length;do{for(;l<c;)l+=k.o(l);k.Ja(h.length);if(l=d()){e(l,!1);k.$(l.X);var m=new a(l.g);m.o(l.X);l.g.i.push(m);l.g.f=m;l=l.X+1}else l=void 0}while(void 0!==l);return k.outerHTML()}}();"undefined"!==typeof module&&(module.H.w=xa);function ya(a,b){this.h=a;this.content=b;this.c=za(this);this.b=Aa(this);this.a=[];this.o=[]}
 function za(a){var b=document.createElement("div"),c=document.createElement("header"),d=document.createElement("span"),e=document.createElement("span"),f=document.createElement("div"),g=document.createElement("footer");b.a=document.createElement("span");b.b=document.createElement("span");d.textContent=a.h;"string"==typeof a.content?f.innerHTML=a.content:f.appendChild(a.content);c.className=Ba;d.className=Ca;e.className=Da;e.textContent="x";c.appendChild(d);c.appendChild(e);b.appendChild(c);f.className=
-Ea;b.appendChild(f);b.b.className=Fa;b.b.textContent=K.Pa;b.b.addEventListener("click",function(){Ga(a,!1)});e.addEventListener("click",function(){Ga(a,!1)});b.a.addEventListener("click",function(){Ga(a,!0)});g.appendChild(b.b);b.a.className=Fa;b.a.textContent=K.ok;g.appendChild(b.a);g.className=Ha+" "+Ia;b.appendChild(g);b.className=Ja;return b}function Ga(a,b){(b?a.a:a.o).forEach(function(a){a()});a.close()}
+Ea;b.appendChild(f);b.b.className=Fa;b.b.textContent=L.Oa;b.b.addEventListener("click",function(){Ga(a,!1)});e.addEventListener("click",function(){Ga(a,!1)});b.a.addEventListener("click",function(){Ga(a,!0)});g.appendChild(b.b);b.a.className=Fa;b.a.textContent=L.ok;g.appendChild(b.a);g.className=Ha+" "+Ia;b.appendChild(g);b.className=Ja;return b}function Ga(a,b){(b?a.a:a.o).forEach(function(a){a()});a.close()}
 function Aa(a){var b=document.createElement("div");b.className=Ka;b.addEventListener("click",function(){Ga(this,!1)}.bind(a));return b}function La(a,b,c){a.c.a.textContent=b;a.c.b.textContent=c;return a}ya.prototype.ja=function(a){a=a||document.body;a.appendChild(this.b);a.appendChild(this.c);return this};ya.prototype.close=function(){this.c.remove();this.b.remove();return this};function Ma(a,b){a.a.push(b);return a};var Fa="button",Ha="button-container",Ja="dialog",Ka="dialog-overlay",Ba="dialog-title",Ca="dialog-title-label",Da="dialog-title-close",Ea="dialog-body",Ia="dialog-footer";var Na=[],Oa=0;
-function Pa(){var a=document.createDocumentFragment(),b=ua(function(a){return!a.da&&!1!==a.$}),c=[],d=[],e=[],f=[],g={};b.sort(function(a,b){if(a[0]!==b[0])return a[0]-b[0];var c=F(E.context,a),d=F(E.context,b);a=c.l[a];b=d.l[b];return a.name===b.name?(g[a.id]=K.ta(c.a.name,a.name),g[b.id]=K.ta(d.a.name,b.name),c.a.name.localeCompare(d.a.name)):a.name.localeCompare(b.name)});b.forEach(function(a){a=ta(a);if(a instanceof u){var b;if(b=!a.a.Oa){var h=g[a.id];b=document.createElement("li");var m=document.createElement("a");
-b.id="room_"+a.id;m.href="#"+a.id;b.className="chat-context-room chat-ims presence-indicator";m.textContent=h||a.a.getName();b.appendChild(Qa());b.appendChild(m);a.a.wa||b.classList.add("presence-away");L===a&&b.classList.add("selected");a.P>a.C&&(b.classList.add("unread"),b.classList.add("unreadHi"));b=h=b}b&&(a.A?c.push(h):f.push(h))}else if(h=g[a.id],b=document.createElement("li"),m=document.createElement("a"),b.id="room_"+a.id,m.href="#"+a.id,a.b?(b.className="chat-context-room chat-group",b.dataset.count=
-Object.keys(a.j||{}).length):b.className="chat-context-room chat-channel",L===a&&b.classList.add("selected"),m.textContent=h||a.name,b.appendChild(Qa()),b.appendChild(m),a.P>a.C&&(b.classList.add("unread"),0<=M.indexOf(a)&&b.classList.add("unreadHi")),h=b)a.A?c.push(h):a.b?e.push(h):d.push(h)});c.length&&a.appendChild(Ra(K.A));c.forEach(function(b){a.appendChild(b)});d.length&&a.appendChild(Ra(K.l));d.forEach(function(b){a.appendChild(b)});e.forEach(function(b){a.appendChild(b)});f.length&&a.appendChild(Ra(K.bb));
-f.forEach(function(b){a.appendChild(b)});document.getElementById("chanList").textContent="";document.getElementById("chanList").appendChild(a);Sa.apply(document.getElementById("chanSearch"));Ta();O();P&&Ua(P.a.id,P.j,function(a){document.getElementById("chatCtx").style.backgroundImage="url("+a+")"})}
+function Pa(){var a=document.createDocumentFragment(),b=ua(function(a){return!a.da&&!1!==a.$}),c=[],d=[],e=[],f=[],g={};b.sort(function(a,b){if(a[0]!==b[0])return a[0]-b[0];var c=G(F.context,a),d=G(F.context,b);a=c.l[a];b=d.l[b];return a.name===b.name?(g[a.id]=L.ta(c.a.name,a.name),g[b.id]=L.ta(d.a.name,b.name),c.a.name.localeCompare(d.a.name)):a.name.localeCompare(b.name)});b.forEach(function(a){a=ta(a);if(a instanceof t){var b;if(b=!a.a.Na){var h=g[a.id];b=document.createElement("li");var m=document.createElement("a");
+b.id="room_"+a.id;m.href="#"+a.id;b.className="chat-context-room chat-ims presence-indicator";m.textContent=h||a.a.getName();b.appendChild(Qa());b.appendChild(m);a.a.va||b.classList.add("presence-away");M===a&&b.classList.add("selected");a.P>a.C&&(b.classList.add("unread"),b.classList.add("unreadHi"));b=h=b}b&&(a.A?c.push(h):f.push(h))}else if(h=g[a.id],b=document.createElement("li"),m=document.createElement("a"),b.id="room_"+a.id,m.href="#"+a.id,a.h?(b.className="chat-context-room chat-group",b.dataset.count=
+Object.keys(a.j||{}).length):b.className="chat-context-room chat-channel",M===a&&b.classList.add("selected"),m.textContent=h||a.name,b.appendChild(Qa()),b.appendChild(m),a.P>a.C&&(b.classList.add("unread"),0<=N.indexOf(a)&&b.classList.add("unreadHi")),h=b)a.A?c.push(h):a.h?e.push(h):d.push(h)});c.length&&a.appendChild(Ra(L.A));c.forEach(function(b){a.appendChild(b)});d.length&&a.appendChild(Ra(L.l));d.forEach(function(b){a.appendChild(b)});e.forEach(function(b){a.appendChild(b)});f.length&&a.appendChild(Ra(L.ab));
+f.forEach(function(b){a.appendChild(b)});document.getElementById("chanList").textContent="";document.getElementById("chanList").appendChild(a);Sa.apply(document.getElementById("chanSearch"));Ta();P();Q&&Ua(Q.a.id,Q.j,function(a){document.getElementById("chatCtx").style.backgroundImage="url("+a+")"})}
 function Va(){sa(function(a){var b=a.u,c;for(c in a.self.l)if(!a.self.l[c].da){var d=document.getElementById("room_"+c);b[c]?d.classList.add("chat-context-typing"):d.classList.remove("chat-context-typing")}for(var e in a.j)(c=a.j[e].V)&&!c.da&&(d=document.getElementById("room_"+c.id))&&(b[c.id]?d.classList.add("chat-context-typing"):d.classList.remove("chat-context-typing"))});Wa()}
-function Wa(){var a;document.getElementById("whoistyping").textContent="";if(P&&L&&(a=P.u[L.id])){var b=document.createDocumentFragment(),c=!1,d;for(d in a)(a=H(d))?b.appendChild(Xa(a)):c=!0;c&&(E.b=0);document.getElementById("whoistyping").appendChild(b)}}function Ya(a){a?document.body.classList.remove("no-network"):document.body.classList.add("no-network");O()}
-function Za(){var a=L.name||(L.a?L.a.getName():void 0);if(!a){console.error("No name provided for ",L);var a=[],b;for(b in L.j)a.push(L.j[b].getName());a=a.join(", ")}document.getElementById("currentRoomTitle").textContent=a;Q();S();document.getElementById("fileUploadContainer").classList.add("hidden");$a();T&&(T=null,U());V&&(V=null,U());O();Wa()}
+function Wa(){var a;document.getElementById("whoistyping").textContent="";if(Q&&M&&(a=Q.u[M.id])){var b=document.createDocumentFragment(),c=!1,d;for(d in a)(a=I(d))?b.appendChild(Xa(a)):c=!0;c&&(F.b=0);document.getElementById("whoistyping").appendChild(b)}}function Ya(a){a?document.body.classList.remove("no-network"):document.body.classList.add("no-network");P()}
+function Za(){var a=M.name||(M.a?M.a.getName():void 0);if(!a){console.error("No name provided for ",M);var a=[],b;for(b in M.j)a.push(M.j[b].getName());a=a.join(", ")}document.getElementById("currentRoomTitle").textContent=a;R();S();document.getElementById("fileUploadContainer").classList.add("hidden");$a();T&&(T=null,U());V&&(V=null,U());P();Wa()}
 function U(){if(T){document.body.classList.add("replyingTo");var a=document.getElementById("replyToContainer"),b=document.createElement("a");b.addEventListener("click",function(){T=null;U()});b.className="replyto-close";b.textContent="x";a.textContent="";a.appendChild(b);a.appendChild(T.M())}else document.body.classList.remove("replyingTo"),document.getElementById("replyToContainer").textContent="";S()}
 function ab(){if(V){document.body.classList.add("replyingTo");var a=document.getElementById("replyToContainer"),b=document.createElement("a");b.addEventListener("click",function(){V=null;ab()});b.className="replyto-close";b.textContent="x";a.textContent="";a.appendChild(b);a.appendChild(V.M());document.getElementById("msgInput").value=V.text}else document.body.classList.remove("replyingTo"),document.getElementById("replyToContainer").textContent="";S()}
-window.toggleReaction=function(a,b,c){var d=E.a[a],e,f;(d=E.a[a])&&(e=na(d,b))&&(f=F(E.context,a))&&(e.D[c]&&-1!==e.D[c].indexOf(f.self.id)?(d=new XMLHttpRequest,d.open("DELETE","api/reaction?room="+a+"&msg="+b+"&reaction="+encodeURIComponent(c),!0),d.send(null)):bb(a,b,c))};
-function cb(a){a:{var b={};if(P)for(var c=P;!b[a];){if(c=c.b.data[a])if("alias:"==c.substr(0,6))b[a]=!0,a=c.substr(6);else{a=document.createElement("span");a.className="emoji-custom emoji";a.style.backgroundImage="url('"+c+"')";break a}break}}"string"===typeof a&&"makeEmoji"in window&&(a=window.makeEmoji(a));return"string"===typeof a?null:a}function db(a,b){document.getElementById("linkFavicon").href=a||b?"favicon.png?h="+a+"&m="+b:"favicon_ok.png"}
-function O(){var a=M.length,b="";if(W)b="!"+K.Wa+" - Mimouchat",document.getElementById("linkFavicon").href="favicon_err.png";else if(a)b="(!"+a+")",db(a,a);else{var c=0;ra(E.context,function(a){a.P>a.C&&c++});c&&(b="("+c+")");db(0,c)}!b.length&&L&&(b=L.name);document.title=b.length?b:"Mimouchat"}
-function eb(){if("Notification"in window)if("granted"===Notification.permission){var a=Date.now();if(Oa+3E4<a){var b=new Notification(K.Xa);Oa=a;setTimeout(function(){b.close()},5E3)}}else"denied"!==Notification.permission&&Notification.requestPermission()}
-function Q(){var a=document.createDocumentFragment(),b=L.id,c=null,d=0,e=null,f;L.A?document.getElementById("chatSystemContainer").classList.add("starred"):document.getElementById("chatSystemContainer").classList.remove("starred");Na=[];E.a[b]&&E.a[b].a.forEach(function(b){if(b.h)b.W();else{var g=b.J(),l=!1;c&&c.L===b.L&&b.L?30>Math.abs(d-b.m)&&!(b instanceof z)?e.classList.add("chatmsg-same-ts"):d=b.m:(d=b.m,l=!0);(!c||c.m<=L.C)&&b.m>L.C?g.classList.add("chatmsg-first-unread"):g.classList.remove("chatmsg-first-unread");
-if(b instanceof z)e=c=null,d=0,a.appendChild(g),f=null;else{if(l||!f){var l=H(b.L),n=b.username,m=document.createElement("div"),k=document.createElement("div"),q=document.createElement("a"),t=document.createElement("img");m.ea=document.createElement("span");m.ea.className="chatmsg-author-img-wrapper";t.className="chatmsg-author-img";q.className="chatmsg-author-name";q.href="#"+l.id;l?(q.textContent=l.getName(),t.src="api/avatar?user="+l.id):(q.textContent=n||"?",t.src="");m.ea.appendChild(t);k.appendChild(m.ea);
-k.appendChild(q);k.className="chatmsg-author";m.className="chatmsg-authorGroup";m.appendChild(k);m.content=document.createElement("div");m.content.className="chatmsg-author-messages";m.appendChild(m.content);f=m;Na.push(f);a.appendChild(f)}c=b;e=g;f.content.appendChild(g)}}});b=document.getElementById("chatWindow");b.textContent="";b.appendChild(a);b.scrollTop=b.scrollHeight-b.clientHeight;fb();window.hasFocus&&$a()}
-function gb(a,b){if(a.classList.contains("chatmsg-hover-reply"))V&&(V=null,ab()),T!==b&&(T=b,U());else if(a.classList.contains("chatmsg-hover-reaction")){var c=L.id,d=b.id;hb.ja(document.body,P,function(a){a&&bb(c,d,a)})}else a.classList.contains("chatmsg-hover-edit")?(T&&(T=null,U()),V!==b&&(V=b,ab())):a.classList.contains("chatmsg-hover-star")?b.A?ib(b):jb(b):a.classList.contains("chatmsg-hover-pin")?b.pinned?kb(b):lb(b):a.classList.contains("chatmsg-hover-remove")&&(T&&(T=null,U()),V&&(V=null,
+window.toggleReaction=function(a,b,c){var d=F.a[a],e,f;(d=F.a[a])&&(e=na(d,b))&&(f=G(F.context,a))&&(e.D[c]&&-1!==e.D[c].indexOf(f.self.id)?(d=new XMLHttpRequest,d.open("DELETE","api/reaction?room="+a+"&msg="+b+"&reaction="+encodeURIComponent(c),!0),d.send(null)):bb(a,b,c))};
+function cb(a){a:{var b={};if(Q)for(var c=Q;!b[a];){if(c=c.b.data[a])if("alias:"==c.substr(0,6))b[a]=!0,a=c.substr(6);else{a=document.createElement("span");a.className="emoji-custom emoji";a.style.backgroundImage="url('"+c+"')";break a}break}}"string"===typeof a&&"makeEmoji"in window&&(a=window.makeEmoji(a));return"string"===typeof a?null:a}function db(a,b){document.getElementById("linkFavicon").href=a||b?"favicon.png?h="+a+"&m="+b:"favicon_ok.png"}
+function P(){var a=N.length,b="";if(W)b="!"+L.Va+" - Mimouchat",document.getElementById("linkFavicon").href="favicon_err.png";else if(a)b="(!"+a+")",db(a,a);else{var c=0;ra(F.context,function(a){a.P>a.C&&c++});c&&(b="("+c+")");db(0,c)}!b.length&&M&&(b=M.name);document.title=b.length?b:"Mimouchat"}
+function eb(){if("Notification"in window)if("granted"===Notification.permission){var a=Date.now();if(Oa+3E4<a){var b=new Notification(L.Wa);Oa=a;setTimeout(function(){b.close()},5E3)}}else"denied"!==Notification.permission&&Notification.requestPermission()}
+function R(){var a=document.createDocumentFragment(),b=M.id,c=null,d=0,e=null,f;M.A?document.getElementById("chatSystemContainer").classList.add("starred"):document.getElementById("chatSystemContainer").classList.remove("starred");Na=[];F.a[b]&&F.a[b].a.forEach(function(b){if(b.h)b.W();else{var g=b.J(),k=!1;c&&c.L===b.L&&b.L?30>Math.abs(d-b.m)&&!(b instanceof z)?e.classList.add("chatmsg-same-ts"):d=b.m:(d=b.m,k=!0);(!c||c.m<=M.C)&&b.m>M.C?g.classList.add("chatmsg-first-unread"):g.classList.remove("chatmsg-first-unread");
+if(b instanceof z)e=c=null,d=0,a.appendChild(g),f=null;else{if(k||!f){var k=I(b.L),n=b.username,m=document.createElement("div"),l=document.createElement("div"),q=document.createElement("a"),u=document.createElement("img");m.ea=document.createElement("span");m.ea.className="chatmsg-author-img-wrapper";u.className="chatmsg-author-img";q.className="chatmsg-author-name";q.href="#"+k.id;k?(q.textContent=k.getName(),u.src="api/avatar?user="+k.id):(q.textContent=n||"?",u.src="");m.ea.appendChild(u);l.appendChild(m.ea);
+l.appendChild(q);l.className="chatmsg-author";m.className="chatmsg-authorGroup";m.appendChild(l);m.content=document.createElement("div");m.content.className="chatmsg-author-messages";m.appendChild(m.content);f=m;Na.push(f);a.appendChild(f)}c=b;e=g;f.content.appendChild(g)}}});b=document.getElementById("chatWindow");b.textContent="";b.appendChild(a);b.scrollTop=b.scrollHeight-b.clientHeight;fb();window.hasFocus&&$a()}
+function gb(a,b){if(a.classList.contains("chatmsg-hover-reply"))V&&(V=null,ab()),T!==b&&(T=b,U());else if(a.classList.contains("chatmsg-hover-reaction")){var c=M.id,d=b.id;hb.ja(document.body,Q,function(a){a&&bb(c,d,a)})}else a.classList.contains("chatmsg-hover-edit")?(T&&(T=null,U()),V!==b&&(V=b,ab())):a.classList.contains("chatmsg-hover-star")?b.A?ib(b):jb(b):a.classList.contains("chatmsg-hover-pin")?b.pinned?kb(M,b):lb(b):a.classList.contains("chatmsg-hover-remove")&&(T&&(T=null,U()),V&&(V=null,
 ab()),mb(b))}
-function nb(a){function b(a,b){for(b=b||a.target;b!==a.currentTarget&&b;){if(b.id&&b.classList.contains("chatmsg-item"))return b.id;b=b.parentElement}}for(var c=a.target;c!==a.currentTarget&&c&&!c.classList.contains("chatmsg-hover");){var d;if(c.parentElement&&c.classList.contains("chatmsg-attachment-actions-item")){var e=c.dataset.attachmentIndex,f=c.dataset.actionIndex;if((d=b(a,c))&&void 0!==e&&void 0!==f){d=d.substr(d.lastIndexOf("_")+1);(a=na(E.a[L.id],d))&&a.s[e]&&a.s[e].actions&&a.s[e].actions[f]&&
-ob(a,a.s[e],a.s[e].actions[f]);break}}if(c.parentElement&&c.parentElement.classList.contains("chatmsg-hover")){if(d=b(a,c))d=d.substr(d.lastIndexOf("_")+1),(a=na(E.a[L.id],d))&&gb(c,a);break}c=c.parentElement}}
-function ob(a,b,c){function d(){var d={actions:[c],attachment_id:b.id,callback_id:b.callback_id,channel_id:e,is_ephemeral:a instanceof B,message_ts:a.id},g=new XMLHttpRequest;g.open("POST","api/attachmentAction?serviceId="+a.L);g.send(JSON.stringify(d))}var e=L.id;c.confirm?Ma(La(new ya(c.confirm.title,c.confirm.text),c.confirm.ok_text,c.confirm.dismiss_text),d).ja():d()}function S(){document.getElementById("msgInput").focus()}
+function nb(a){function b(a,b){for(b=b||a.target;b!==a.currentTarget&&b;){if(b.id&&b.classList.contains("chatmsg-item"))return b.id;b=b.parentElement}}for(var c=a.target;c!==a.currentTarget&&c&&!c.classList.contains("chatmsg-hover");){var d;if(c.parentElement&&c.classList.contains("chatmsg-attachment-actions-item")){var e=c.dataset.attachmentIndex,f=c.dataset.actionIndex;if((d=b(a,c))&&void 0!==e&&void 0!==f){d=d.substr(d.lastIndexOf("_")+1);(a=na(F.a[M.id],d))&&a.s[e]&&a.s[e].actions&&a.s[e].actions[f]&&
+ob(a,a.s[e],a.s[e].actions[f]);break}}if(c.parentElement&&c.parentElement.classList.contains("chatmsg-hover")){if(d=b(a,c))d=d.substr(d.lastIndexOf("_")+1),(a=na(F.a[M.id],d))&&gb(c,a);break}c=c.parentElement}}
+function ob(a,b,c){function d(){var d={actions:[c],attachment_id:b.id,callback_id:b.callback_id,channel_id:e,is_ephemeral:a instanceof B,message_ts:a.id},g=new XMLHttpRequest;g.open("POST","api/attachmentAction?serviceId="+a.L);g.send(JSON.stringify(d))}var e=M.id;c.confirm?Ma(La(new ya(c.confirm.title,c.confirm.text),c.confirm.ok_text,c.confirm.dismiss_text),d).ja():d()}function S(){document.getElementById("msgInput").focus()}
 function fb(){var a=document.getElementById("chatWindow").getBoundingClientRect().top;Na.forEach(function(b){var c=b.ea,d=c.clientHeight;b=b.getBoundingClientRect();c.style.top=Math.max(0,Math.min(a-b.top,b.height-d-d/2))+"px"})}
-document.addEventListener("DOMContentLoaded",function(){wa();pb();var a=document.getElementById("chanSearch");a.addEventListener("input",Sa);a.addEventListener("blur",Sa);document.getElementById("chatWindow").addEventListener("click",nb);window.addEventListener("hashchange",function(){document.location.hash&&"#"===document.location.hash[0]&&Ta()});document.addEventListener("mouseover",function(a){for(a=a.target;a&&a!==this;){if("A"===a.nodeName){var b=a.href,c=b.indexOf("#");if(0<=c){b=b.substr(c+
-1);if(c=F(E.context,b)){X.Ta(a)||X.$a(c,c.l[b]).show(a);console.log("out");return}a:{for(var c=E.context,f=0,g=c.a.length;f<g;f++)if(c.a[f].j[b]){c=c.a[f];break a}c=null}if(c&&(b=c.j[b].V)){X.Ta(a)||X.$a(c,b).show(a);console.log("out");return}}break}a=a.parentElement}X.ua()});document.addEventListener("mouseleave",function(){X.ua()});document.getElementById("currentRoomStar").addEventListener("click",function(a){a.preventDefault();L&&(L.A?(a=new XMLHttpRequest,a.open("POST","api/unstarChannel?room="+
-L.id,!0)):(a=new XMLHttpRequest,a.open("POST","api/starChannel?room="+L.id,!0)),a.send(null));return!1});document.getElementById("fileUploadCancel").addEventListener("click",function(a){a.preventDefault();document.getElementById("fileUploadError").classList.add("hidden");document.getElementById("fileUploadContainer").classList.add("hidden");document.getElementById("fileUploadInput").value="";return!1});document.getElementById("ctxMenuSettings").addEventListener("click",function(a){a.preventDefault();
-qb.display()});document.getElementById("fileUploadForm").addEventListener("submit",function(a){a.preventDefault();a=document.getElementById("fileUploadInput");var b=a.value;b&&(b=b.substr(b.lastIndexOf("\\")+1),rb(b,a.files[0],function(a){var b=document.getElementById("fileUploadError");a?(b.textContent=a,b.classList.remove("hidden")):(b.classList.add("hidden"),document.getElementById("fileUploadInput").value="",document.getElementById("fileUploadContainer").classList.add("hidden"))}));return!1});
-document.getElementById("attachFile").addEventListener("click",function(a){a.preventDefault();L&&document.getElementById("fileUploadContainer").classList.remove("hidden");return!1});document.getElementById("msgForm").addEventListener("submit",function(a){a.preventDefault();a=document.getElementById("msgInput");L&&a.value&&sb(a.value)&&(a.value="",T&&(T=null,U()),V&&(V=null,U()),document.getElementById("slashList").textContent="");S();return!1});window.addEventListener("blur",function(){window.hasFocus=
-!1});window.addEventListener("focus",function(){window.hasFocus=!0;Oa=0;L&&$a();S()});document.getElementById("chatWindow").addEventListener("scroll",fb);var b=0;document.getElementById("msgInput").addEventListener("input",function(){if(L){var a=Date.now();b+3E3<a&&(P.self.wa||L instanceof u)&&(tb(),b=a);var a=[],d=this.value;if("/"===this.value[0]){var e=d.indexOf(" "),f=-1!==e,e=-1===e?d.length:e,d=d.substr(0,e);if(f){var g=ub.Ra(d);g&&a.push(g)}else a=ub.jb(d);var g=P?P.h.data:{};for(l in g){var h=
-g[l];(!f&&h.name.substr(0,e)===d||f&&h.name===d)&&a.push(h)}}a.sort(function(a,b){return a.U.localeCompare(b.U)||a.name.localeCompare(b.name)});var l=document.getElementById("slashList");var e=document.createDocumentFragment();l.textContent="";f=0;for(d=a.length;f<d;f++){g=a[f];if(n!==g.U){var n=g.U;e.appendChild(vb(g.U))}e.appendChild(wb(g))}l.appendChild(e)}});window.hasFocus=!0;(function(){var a=document.getElementById("emojiButton");if("makeEmoji"in window){var b=window.makeEmoji("smile");b?a.innerHTML=
-"<span class='emoji-small'>"+b.outerHTML+"</span>":a.style.backgroundImage='url("smile.svg")';(b=window.makeEmoji("paperclip"))?document.getElementById("attachFile").innerHTML="<span class='emoji-small'>"+b.outerHTML+"</span>":document.getElementById("attachFile").style.backgroundImage='url("public/paperclip.svg")';a.addEventListener("click",function(){P&&hb.ja(document.body,P,function(a){a&&(document.getElementById("msgInput").value+=":"+a+":");S()})})}else a.classList.add("hidden")})();xb()});var qb=function(){function a(a){c&&(document.getElementById("settings").classList.remove("display-"+c),document.getElementById("setting-menu-"+c).classList.remove("selected"),document.getElementById("settings-serviceAddSection").classList.add("hidden"));document.getElementById("settings").classList.add("display-"+a);document.getElementById("setting-menu-"+a).classList.add("selected");c=a}var b=!1,c=null,d={S:"services",display:"display",Hb:"privacy"};document.getElementById("settingMenuItems").addEventListener("click",
+document.addEventListener("DOMContentLoaded",function(){wa();pb();var a=document.getElementById("chanSearch");a.addEventListener("input",Sa);a.addEventListener("blur",Sa);document.getElementById("chatWindow").addEventListener("click",nb);window.addEventListener("hashchange",function(){document.location.hash&&"#"===document.location.hash[0]&&Ta()});document.addEventListener("mouseover",function(a){a=a.target;if(!X.mb(a)){for(;a&&a!==this;){if("A"===a.nodeName){var b=a.href,c=b.indexOf("#");if(0<=c){b=
+b.substr(c+1);if(c=G(F.context,b)){X.Za(c,c.l[b]).show(a);return}a:{for(var c=F.context,f=0,g=c.a.length;f<g;f++)if(c.a[f].j[b]){c=c.a[f];break a}c=null}if(c&&(b=c.j[b].V)){X.Za(c,b).show(a);return}}break}a=a.parentElement}X.Ra()}});document.getElementById("currentRoomStar").addEventListener("click",function(a){a.preventDefault();M&&(M.A?(a=new XMLHttpRequest,a.open("POST","api/unstarChannel?room="+M.id,!0)):(a=new XMLHttpRequest,a.open("POST","api/starChannel?room="+M.id,!0)),a.send(null));return!1});
+document.getElementById("fileUploadCancel").addEventListener("click",function(a){a.preventDefault();document.getElementById("fileUploadError").classList.add("hidden");document.getElementById("fileUploadContainer").classList.add("hidden");document.getElementById("fileUploadInput").value="";return!1});document.getElementById("ctxMenuSettings").addEventListener("click",function(a){a.preventDefault();qb.display()});document.getElementById("fileUploadForm").addEventListener("submit",function(a){a.preventDefault();
+a=document.getElementById("fileUploadInput");var b=a.value;b&&(b=b.substr(b.lastIndexOf("\\")+1),rb(b,a.files[0],function(a){var b=document.getElementById("fileUploadError");a?(b.textContent=a,b.classList.remove("hidden")):(b.classList.add("hidden"),document.getElementById("fileUploadInput").value="",document.getElementById("fileUploadContainer").classList.add("hidden"))}));return!1});document.getElementById("attachFile").addEventListener("click",function(a){a.preventDefault();M&&document.getElementById("fileUploadContainer").classList.remove("hidden");
+return!1});document.getElementById("msgForm").addEventListener("submit",function(a){a.preventDefault();a=document.getElementById("msgInput");M&&a.value&&sb(a.value)&&(a.value="",T&&(T=null,U()),V&&(V=null,U()),document.getElementById("slashList").textContent="");S();return!1});window.addEventListener("blur",function(){window.hasFocus=!1});window.addEventListener("focus",function(){window.hasFocus=!0;Oa=0;M&&$a();S()});document.getElementById("chatWindow").addEventListener("scroll",fb);var b=0;document.getElementById("msgInput").addEventListener("input",
+function(){if(M){var a=Date.now();b+3E3<a&&(Q.self.va||M instanceof t)&&(tb(),b=a);var a=[],d=this.value;if("/"===this.value[0]){var e=d.indexOf(" "),f=-1!==e,e=-1===e?d.length:e,d=d.substr(0,e);if(f){var g=ub.Qa(d);g&&a.push(g)}else a=ub.ib(d);var g=Q?Q.h.data:{};for(k in g){var h=g[k];(!f&&h.name.substr(0,e)===d||f&&h.name===d)&&a.push(h)}}a.sort(function(a,b){return a.U.localeCompare(b.U)||a.name.localeCompare(b.name)});var k=document.getElementById("slashList");var e=document.createDocumentFragment();
+k.textContent="";f=0;for(d=a.length;f<d;f++){g=a[f];if(n!==g.U){var n=g.U;e.appendChild(vb(g.U))}e.appendChild(wb(g))}k.appendChild(e)}});window.hasFocus=!0;(function(){var a=document.getElementById("emojiButton");if("makeEmoji"in window){var b=window.makeEmoji("smile");b?a.innerHTML="<span class='emoji-small'>"+b.outerHTML+"</span>":a.style.backgroundImage='url("smile.svg")';(b=window.makeEmoji("paperclip"))?document.getElementById("attachFile").innerHTML="<span class='emoji-small'>"+b.outerHTML+
+"</span>":document.getElementById("attachFile").style.backgroundImage='url("public/paperclip.svg")';a.addEventListener("click",function(){Q&&hb.ja(document.body,Q,function(a){a&&(document.getElementById("msgInput").value+=":"+a+":");S()})})}else a.classList.add("hidden")})();xb()});var qb=function(){function a(a){c&&(document.getElementById("settings").classList.remove("display-"+c),document.getElementById("setting-menu-"+c).classList.remove("selected"),document.getElementById("settings-serviceAddSection").classList.add("hidden"));document.getElementById("settings").classList.add("display-"+a);document.getElementById("setting-menu-"+a).classList.add("selected");c=a}var b=!1,c=null,d={S:"services",display:"display",Hb:"privacy"};document.getElementById("settingMenuItems").addEventListener("click",
 function(b){for(var c=b.target;b.currentTarget!==c&&c;c=c.parentNode)if(c.dataset&&c.dataset.target)for(var e in d)if(d[e]===c.dataset.target){a(d[e]);return}});document.getElementById("settings-serviceAddButton").addEventListener("click",function(a){a.preventDefault();document.getElementById("settings-serviceAddSection").classList.remove("hidden");return!1});document.getElementById("settings-serviceAddConfirm").addEventListener("click",function(a){a.preventDefault();document.location.href=document.getElementById("settings-serviceAddServiceList").value;
 return!1});return{display:function(c){b||(document.getElementById("settings").classList.remove("hidden"),b=!0);a(c||d.S);return this},sb:function(){return this},pb:d}}();function yb(a){if(void 0!==a.latitude&&void 0!==a.longitude&&-90<=a.latitude&&90>=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.O=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"})},d=document.createElement("canvas"),e=document.createElement("canvas");
-d.height=d.width=e.height=e.width=300;var f=d.getContext("2d"),g=e.getContext("2d"),h=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)))},l=function(a,d,e,l){g.fillStyle="#808080";g.fillRect(0,0,300,300);f.fillStyle="#808080";f.fillRect(0,0,300,300);var m=Math.pow(2,a),k=(e+180)/360*m,n=(1-Math.log(Math.tan(d*Math.PI/180)+1/Math.cos(d*Math.PI/180))/Math.PI)/2*m,q=Math.floor(k),G=Math.floor(n),
-ea=l?100*l/h(180/Math.PI*Math.atan(.5*(Math.exp(Math.PI-2*Math.PI*G/m)-Math.exp(-(Math.PI-2*Math.PI*G/m)))),q/m*360-180,(q+1)/m*360-180):0;d=b;for(e=0;3>e;e++)for(l=0;3>l;l++)c(a,q+e-1,G+l-1,{lb:e,nb:l,fb:d}).then(function(a){if(a.fb===b){g.drawImage(a.O,100*a.lb,100*a.nb,100,100);a=k-q;var c=n-G;a=100*a+100;c=100*c+100;f.putImageData(g.getImageData(0,0,300,300),0,0);void 0!==ea&&(f.beginPath(),f.arc(a,c,Math.max(ea,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===ea||25<ea)f.strokeStyle="rgba(244, 146, 66, 1)",f.beginPath(),f.moveTo(a-5,c-5),f.lineTo(a+5,c+5),f.stroke(),f.moveTo(a+5,c-5),f.lineTo(a-5,c+5),f.stroke()}})},n,m=function(c){c=Math.max(4,Math.min(19,c));n!==c&&(b++,n=c,l(n,Number(a.latitude),Number(a.longitude),Number(a.accuracy)))};m(12);var e=document.createElement("div"),k=document.createElement("div"),q=document.createElement("button"),t=document.createElement("button");e.className=
-"OSM-wrapper";d.className="OSM-canvas";k.className="OSM-controls";t.className="OSM-controls-zoomMin";q.className="OSM-controls-zoomPlus";t.addEventListener("click",function(){m(n-1)});q.addEventListener("click",function(){m(n+1)});k.appendChild(t);k.appendChild(q);e.appendChild(d);e.appendChild(k);return e}};function Qa(){var a=document.createElement("span"),b=document.createElement("span"),c=document.createElement("span"),d=document.createElement("span");a.className="typing-container";b.className="typing-dot1";c.className="typing-dot2";d.className="typing-dot3";b.textContent=c.textContent=d.textContent=".";a.appendChild(b);a.appendChild(c);a.appendChild(d);return a}var Ra=function(){var a={};return function(b){var c=a[b];c||(c=a[b]=document.createElement("header"),c.textContent=b);return c}}();
-function zb(a){var b=a.b,c=document.createElement("div"),d=document.createElement("div");c.aa=document.createElement("ul");c.s=document.createElement("ul");c.D=document.createElement("ul");c.m=document.createElement("div");c.ya=document.createElement("div");c.sa=document.createElement("span");c.id=b+"_"+a.id;c.className="chatmsg-item";c.m.className="chatmsg-ts";c.ya.className="chatmsg-msg";c.sa.className="chatmsg-author-name";var b=c.aa,e=a.context.Y;a:{for(var f=E.context,g=0,h=f.a.length;g<h;g++)if(f.a[g].self.id===
+d.height=d.width=e.height=e.width=300;var f=d.getContext("2d"),g=e.getContext("2d"),h=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)))},k=function(a,d,e,k){g.fillStyle="#808080";g.fillRect(0,0,300,300);f.fillStyle="#808080";f.fillRect(0,0,300,300);var m=Math.pow(2,a),l=(e+180)/360*m,D=(1-Math.log(Math.tan(d*Math.PI/180)+1/Math.cos(d*Math.PI/180))/Math.PI)/2*m,n=Math.floor(l),E=Math.floor(D),
+fa=k?100*k/h(180/Math.PI*Math.atan(.5*(Math.exp(Math.PI-2*Math.PI*E/m)-Math.exp(-(Math.PI-2*Math.PI*E/m)))),n/m*360-180,(n+1)/m*360-180):0;d=b;for(e=0;3>e;e++)for(k=0;3>k;k++)c(a,n+e-1,E+k-1,{kb:e,nb:k,eb:d}).then(function(a){if(a.eb===b){g.drawImage(a.O,100*a.kb,100*a.nb,100,100);a=l-n;var c=D-E;a=100*a+100;c=100*c+100;f.putImageData(g.getImageData(0,0,300,300),0,0);void 0!==fa&&(f.beginPath(),f.arc(a,c,Math.max(fa,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===fa||25<fa)f.strokeStyle="rgba(244, 146, 66, 1)",f.beginPath(),f.moveTo(a-5,c-5),f.lineTo(a+5,c+5),f.stroke(),f.moveTo(a+5,c-5),f.lineTo(a-5,c+5),f.stroke()}})},n,m=function(c){c=Math.max(4,Math.min(19,c));n!==c&&(b++,n=c,k(n,Number(a.latitude),Number(a.longitude),Number(a.accuracy)))};m(12);var e=document.createElement("div"),l=document.createElement("div"),q=document.createElement("button"),u=document.createElement("button");e.className=
+"OSM-wrapper";d.className="OSM-canvas";l.className="OSM-controls";u.className="OSM-controls-zoomMin";q.className="OSM-controls-zoomPlus";u.addEventListener("click",function(){m(n-1)});q.addEventListener("click",function(){m(n+1)});l.appendChild(u);l.appendChild(q);e.appendChild(d);e.appendChild(l);return e}};function Qa(){var a=document.createElement("span"),b=document.createElement("span"),c=document.createElement("span"),d=document.createElement("span");a.className="typing-container";b.className="typing-dot1";c.className="typing-dot2";d.className="typing-dot3";b.textContent=c.textContent=d.textContent=".";a.appendChild(b);a.appendChild(c);a.appendChild(d);return a}var Ra=function(){var a={};return function(b){var c=a[b];c||(c=a[b]=document.createElement("header"),c.textContent=b);return c}}();
+function zb(a){var b=a.b,c=document.createElement("div"),d=document.createElement("div");c.aa=document.createElement("ul");c.s=document.createElement("ul");c.D=document.createElement("ul");c.m=document.createElement("div");c.xa=document.createElement("div");c.sa=document.createElement("span");c.id=b+"_"+a.id;c.className="chatmsg-item";c.m.className="chatmsg-ts";c.xa.className="chatmsg-msg";c.sa.className="chatmsg-author-name";var b=c.aa,e=a.context.Y;a:{for(var f=F.context,g=0,h=f.a.length;g<h;g++)if(f.a[g].self.id===
 a.L){a=!0;break a}a=!1}e.replyToMsg&&(f=document.createElement("li"),f.className="chatmsg-hover-reply",f.style.backgroundImage='url("repl.svg")',b.appendChild(f));e.reactMsg&&(f=document.createElement("li"),f.className="chatmsg-hover-reaction",f.style.backgroundImage='url("smile.svg")',b.appendChild(f));if(a&&e.editMsg||e.editOtherMsg)f=document.createElement("li"),f.className="chatmsg-hover-edit",f.style.backgroundImage='url("edit.svg")',b.appendChild(f);e.starMsg&&(b.ga=document.createElement("li"),
-b.ga.className="chatmsg-hover-star",b.appendChild(b.ga));e.pinMsg&&(f=document.createElement("li"),f.className="chatmsg-hover-pin",b.appendChild(f),f.style.backgroundImage='url("pin.svg")');if(a&&e.removeMsg||e.moderate)e=document.createElement("li"),e.className="chatmsg-hover-remove",e.style.backgroundImage='url("remove.svg")',b.appendChild(e);c.aa.className="chatmsg-hover";d.appendChild(c.sa);d.appendChild(c.ya);d.appendChild(c.m);d.appendChild(c.s);c.F=document.createElement("div");c.F.className=
+b.ga.className="chatmsg-hover-star",b.appendChild(b.ga));e.pinMsg&&(f=document.createElement("li"),f.className="chatmsg-hover-pin",b.appendChild(f),f.style.backgroundImage='url("pin.svg")');if(a&&e.removeMsg||e.moderate)e=document.createElement("li"),e.className="chatmsg-hover-remove",e.style.backgroundImage='url("remove.svg")',b.appendChild(e);c.aa.className="chatmsg-hover";d.appendChild(c.sa);d.appendChild(c.xa);d.appendChild(c.m);d.appendChild(c.s);c.F=document.createElement("div");c.F.className=
 "chatmsg-edited";d.appendChild(c.F);d.appendChild(c.D);d.className="chatmsg-content";c.s.className="chatmsg-attachments";c.D.className="chatmsg-reactions";c.appendChild(d);c.appendChild(c.aa);return c}function Ab(a){var b={good:"#2fa44f",warning:"#de9e31",danger:"#d50200"};if(a){if("#"===a[0])return a;if(b[a])return b[a]}return"#e3e4e6"}
-function Bb(a,b,c){var d=document.createElement("li"),e=document.createElement("div"),f=document.createElement("div"),g=document.createElement("a"),h=document.createElement("div"),l=document.createElement("img"),n=document.createElement("a"),m=document.createElement("div"),k=document.createElement("div"),q=document.createElement("div"),t=document.createElement("img"),w=document.createElement("div");d.className="chatmsg-attachment";e.style.borderColor=Ab(b.color||"");e.className="chatmsg-attachment-block";
-f.className="chatmsg-attachment-pretext";b.pretext?f.innerHTML=a.w(b.pretext):f.classList.add("hidden");g.target="_blank";b.title?(g.innerHTML=a.w(b.title),b.title_link&&(g.href=b.title_link),g.className="chatmsg-attachment-title"):g.className="hidden chatmsg-attachment-title";n.target="_blank";h.className="chatmsg-author";b.author_name&&(n.innerHTML=a.w(b.author_name),n.href=b.author_link||"",n.className="chatmsg-author-name",l.className="chatmsg-author-img",b.author_icon&&(l.src=b.author_icon,h.appendChild(l)),
-h.appendChild(n));q.className="chatmsg-attachment-thumb";b.thumb_url?(l=document.createElement("img"),l.src=b.thumb_url,q.appendChild(l),e.classList.add("has-thumb"),b.video_html&&(q.dataset.video=b.video_html)):q.classList.add("hidden");m.className="chatmsg-attachment-content";l=a.w(b.text||"");k.className="chatmsg-attachment-text";l&&""!=l?k.innerHTML=l:k.classList.add("hidden");m.appendChild(q);m.appendChild(k);b.geo&&(k=yb(b.geo))&&m.appendChild(k);t.className="chatmsg-attachment-img";b.image_url?
-t.src=b.image_url:t.classList.add("hidden");w.className="chatmsg-attachment-footer";b.footer&&(k=document.createElement("span"),k.className="chatmsg-attachment-footer-text",k.innerHTML=a.w(b.footer),b.footer_icon&&(q=document.createElement("img"),q.src=b.footer_icon,q.className="chatmsg-attachment-footer-icon",w.appendChild(q)),w.appendChild(k));b.ts&&(k=document.createElement("span"),k.className="chatmsg-ts",k.innerHTML=K.N(b.ts),w.appendChild(k));e.appendChild(g);e.appendChild(h);e.appendChild(m);
-e.appendChild(t);if(b.fields&&b.fields.length){var x=document.createElement("ul");e.appendChild(x);x.className="chatmsg-attachment-fields";b.fields.forEach(function(b){var c=b.title||"",d=b.value||"";b=!!b["short"];var e=document.createElement("li"),f=document.createElement("div"),g=document.createElement("div");e.className="field";b||e.classList.add("field-long");f.className="field-title";f.textContent=c;g.className="field-text";g.innerHTML=a.w(d);e.appendChild(f);e.appendChild(g);e&&x.appendChild(e)})}if(b.actions&&
-b.actions.length)for(g=document.createElement("ul"),g.className="chatmsg-attachment-actions "+Ha,e.appendChild(g),h=0,m=b.actions.length;h<m;h++)(t=b.actions[h])&&(t=Cb(c,h,t))&&g.appendChild(t);e.appendChild(w);d.appendChild(f);d.appendChild(e);return d}
+function Bb(a,b,c){var d=document.createElement("li"),e=document.createElement("div"),f=document.createElement("div"),g=document.createElement("a"),h=document.createElement("div"),k=document.createElement("img"),n=document.createElement("a"),m=document.createElement("div"),l=document.createElement("div"),q=document.createElement("div"),u=document.createElement("img"),x=document.createElement("div");d.className="chatmsg-attachment";e.style.borderColor=Ab(b.color||"");e.className="chatmsg-attachment-block";
+f.className="chatmsg-attachment-pretext";b.pretext?f.innerHTML=a.w(b.pretext):f.classList.add("hidden");g.target="_blank";b.title?(g.innerHTML=a.w(b.title),b.title_link&&(g.href=b.title_link),g.className="chatmsg-attachment-title"):g.className="hidden chatmsg-attachment-title";n.target="_blank";h.className="chatmsg-author";b.author_name&&(n.innerHTML=a.w(b.author_name),n.href=b.author_link||"",n.className="chatmsg-author-name",k.className="chatmsg-author-img",b.author_icon&&(k.src=b.author_icon,h.appendChild(k)),
+h.appendChild(n));q.className="chatmsg-attachment-thumb";b.thumb_url?(k=document.createElement("img"),k.src=b.thumb_url,q.appendChild(k),e.classList.add("has-thumb"),b.video_html&&(q.dataset.video=b.video_html)):q.classList.add("hidden");m.className="chatmsg-attachment-content";k=a.w(b.text||"");l.className="chatmsg-attachment-text";k&&""!=k?l.innerHTML=k:l.classList.add("hidden");m.appendChild(q);m.appendChild(l);b.geo&&(l=yb(b.geo))&&m.appendChild(l);u.className="chatmsg-attachment-img";b.image_url?
+u.src=b.image_url:u.classList.add("hidden");x.className="chatmsg-attachment-footer";b.footer&&(l=document.createElement("span"),l.className="chatmsg-attachment-footer-text",l.innerHTML=a.w(b.footer),b.footer_icon&&(q=document.createElement("img"),q.src=b.footer_icon,q.className="chatmsg-attachment-footer-icon",x.appendChild(q)),x.appendChild(l));b.ts&&(l=document.createElement("span"),l.className="chatmsg-ts",l.innerHTML=L.N(b.ts),x.appendChild(l));e.appendChild(g);e.appendChild(h);e.appendChild(m);
+e.appendChild(u);if(b.fields&&b.fields.length){var w=document.createElement("ul");e.appendChild(w);w.className="chatmsg-attachment-fields";b.fields.forEach(function(b){var c=b.title||"",d=b.value||"";b=!!b["short"];var e=document.createElement("li"),f=document.createElement("div"),g=document.createElement("div");e.className="field";b||e.classList.add("field-long");f.className="field-title";f.textContent=c;g.className="field-text";g.innerHTML=a.w(d);e.appendChild(f);e.appendChild(g);e&&w.appendChild(e)})}if(b.actions&&
+b.actions.length)for(g=document.createElement("ul"),g.className="chatmsg-attachment-actions "+Ha,e.appendChild(g),h=0,m=b.actions.length;h<m;h++)(u=b.actions[h])&&(u=Cb(c,h,u))&&g.appendChild(u);e.appendChild(x);d.appendChild(f);d.appendChild(e);return d}
 function Cb(a,b,c){var d=document.createElement("li"),e=Ab(c.style);d.textContent=c.text;e!==Ab()&&(d.style.color=e);d.style.borderColor=e;d.dataset.attachmentIndex=a;d.dataset.actionIndex=b;d.className="chatmsg-attachment-actions-item "+Fa;return d}function Xa(a){var b=document.createElement("li"),c=document.createElement("span");c.textContent=a.getName();b.appendChild(Qa());b.appendChild(c);return b}
 function vb(a){var b=document.createElement("lh");b.textContent=a;b.className="chat-command-header";return b}
-function wb(a){var b=document.createElement("li"),c=document.createElement("span"),d=document.createElement("span"),e=document.createElement("span");c.textContent=a.name;d.textContent=a.usage;e.textContent=a.a;b.appendChild(c);b.appendChild(d);b.appendChild(e);b.className="chat-command-item";c.className="chat-command-name";d.className="chat-command-usage";e.className="chat-command-desc";return b};var hb=function(){function a(a,b){for(a=a.target;a!==n&&a&&"LI"!==a.nodeName;)a=a.parentElement;a&&"LI"===a.nodeName&&a.id&&"emojibar-"===a.id.substr(0,9)?b(a.id.substr(9)):b(null)}function b(){x={};k.textContent="";window.emojiProviderHeader&&(k.appendChild(h(window.emojiProviderHeader)),q.textContent="",k.appendChild(q));k.appendChild(h("emojicustom.png"));k.appendChild(t)}function c(){if(!d())return!1;D&&D(null);return!0}function d(){return n.parentElement?(n.parentElement.removeChild(m),n.parentElement.removeChild(n),
-!0):!1}function e(a){var b=0;a=void 0===a?w.value:a;if(l()){var c=0,d=window.searchEmojis(a),e=f(d,N?N.self.R.a:[]),m;for(h in x)x[h].visible&&(x[h].visible=!1,q.removeChild(x[h].c));var h=0;for(m=e.length;h<m;h++){var k=e[h].name,r=x[k];if(!r){var r=x,G=k;var n=k;var k=window.makeEmoji(d[k]),R=document.createElement("span");R.appendChild(k);R.className="emoji-medium";n=g(n,R);r=r[G]=n}r.visible||(r.visible=!0,q.appendChild(r.c));c++}b+=c}h=b;c=0;for(D in A)A[D].visible&&(A[D].visible=!1,t.removeChild(A[D].c));
-if(N){d=f(N.b.data,N?N.self.R.a:[]);var D=0;for(b=d.length;D<b;D++)G=d[D].name,""!==a&&G.substr(0,a.length)!==a||"alias:"===N.b.data[G].substr(0,6)||(e=A[G],e||(e=A,r=m=G,G=N.b.data[G],n=document.createElement("span"),k=document.createElement("span"),n.className="emoji emoji-custom",n.style.backgroundImage='url("'+G+'")',k.appendChild(n),k.className="emoji-medium",r=g(r,k),e=e[m]=r),e.visible||(e.visible=!0,t.appendChild(e.c)),c++);D=c}else D=0;return h+D}function f(a,b){var c=[],d;for(d in a){var e=
-{name:d,ab:0,count:0};if(a[d].names)for(var f=0,g=a[d].names.length;f<g;f++)e.count+=b[a[d].names[f]]||0;c.push(e)}return c=c.sort(function(a,b){var c=b.count-a.count;return c?c:a.ab-b.ab})}function g(a,b){var c=document.createElement("li");c.appendChild(b);c.className="emojibar-list-item";c.id="emojibar-"+a;return{visible:!1,c:c}}function h(a){var b=document.createElement("img"),c=document.createElement("div");b.src=a;c.appendChild(b);c.className="emojibar-header";return c}function l(){return"searchEmojis"in
-window}var n=document.createElement("div"),m=document.createElement("div"),k=document.createElement("div"),q=document.createElement("ul"),t=document.createElement("ul"),w=document.createElement("input"),x={},A={},J=document.createElement("div"),r=document.createElement("span"),R=document.createElement("span"),D,N;m.addEventListener("click",function(a){var b=n.getBoundingClientRect();(a.screenY<b.top||a.screenY>b.bottom||a.screenX<b.left||a.screenX>b.right)&&c()});m.className="emojibar-overlay";n.className=
-"emojibar";k.className="emojibar-emojis";q.className=t.className="emojibar-list";w.className="emojibar-search";J.className="emojibar-detail";r.className="emojibar-detail-img";R.className="emojibar-detail-name";J.appendChild(r);J.appendChild(R);b();n.appendChild(k);n.appendChild(J);n.appendChild(w);w.addEventListener("keyup",function(){e()});n.addEventListener("mousemove",function(b){a(b,function(a){var b=a?x[a]||A[a]:null;b?(r.innerHTML=b.c.outerHTML,R.textContent=":"+a+":"):(r.textContent="",R.textContent=
-"")})});n.addEventListener("click",function(b){a(b,function(a){a&&d()&&D&&D(a)})});return{isSupported:l,ja:function(a,b,c){return l()?(N=b,D=c,a.appendChild(m),a.appendChild(n),w.value="",e(),w.focus(),!0):!1},search:e,close:c,reset:function(){b();e()}}}();var E,M=[];function Db(){da.call(this)}Db.prototype=Object.create(da.prototype);Db.prototype.constructor=Db;function qa(a){return a.a?a.a.id:null}function Eb(){this.b=0;this.context=new oa;this.a={}}
-Eb.prototype.update=function(a){var b=Date.now();a.v&&(this.b=a.v);if(a["static"])for(l in a["static"]){var c=pa(this.context,l);c||(c=new Db,this.context.push(c));var d={};a["static"][l].channels&&a["static"][l].channels.forEach(function(a){a.pins&&(d[a.id]=a.pins,a.pins=void 0)});ga(c,a["static"][l],b);for(var e in d){var f=[],g=this.a[e];g||(g=this.a[e]=new Y(e,250,null,b));d[e].forEach(function(a){f.push(g.b(a,b))});c.l[e].h=f}}ra(this.context,function(a){a.P===a.C&&(a=M.indexOf(a),-1!==a&&M.splice(a,
-1))});if(a.live){for(l in a.live)(c=this.a[l])?ka(c,a.live[l],b):c=this.a[l]=new Y(l,250,a.live[l],b);for(var h in a.live){var l=F(this.context,h);(c=l.l[h])?(this.a[h].a.length&&(c.P=Math.max(c.P,ma(this.a[h]).m)),c.da||(Fb(l,c,a.live[h]),L&&a.live[L.id]&&Q())):E.b=0}}a["static"]&&Pa();var n=!1;a.typing&&this.context.a.forEach(function(c){var d=n,e=a.typing,f=!1;if(c.u)for(var g in c.u)e[g]||(delete c.u[g],f=!0);if(e)for(g in e)if(c.l[g]){c.u[g]||(c.u[g]={});for(var h in e[g])c.u[g][h]||(f=!0),c.u[g][h]=
-b}n=d|f},this);(a["static"]||n)&&Va();a.config&&(Gb=new Hb(a.config),Ib()&&qb.sb(!1).display(qb.pb.S),Jb());if(P&&L&&a["static"]&&a["static"][P.a.id]&&a["static"][P.a.id].channels&&a["static"][P.a.id].channels)for(h=a["static"][P.a.id].channels,l=0,c=h.length;l<c;l++)if(h[l].id===L.id){Q();break}};
+function wb(a){var b=document.createElement("li"),c=document.createElement("span"),d=document.createElement("span"),e=document.createElement("span");c.textContent=a.name;d.textContent=a.usage;e.textContent=a.a;b.appendChild(c);b.appendChild(d);b.appendChild(e);b.className="chat-command-item";c.className="chat-command-name";d.className="chat-command-usage";e.className="chat-command-desc";return b};var hb=function(){function a(a,b){for(a=a.target;a!==n&&a&&"LI"!==a.nodeName;)a=a.parentElement;a&&"LI"===a.nodeName&&a.id&&"emojibar-"===a.id.substr(0,9)?b(a.id.substr(9)):b(null)}function b(){w={};l.textContent="";window.emojiProviderHeader&&(l.appendChild(h(window.emojiProviderHeader)),q.textContent="",l.appendChild(q));l.appendChild(h("emojicustom.png"));l.appendChild(u)}function c(){if(!d())return!1;D&&D(null);return!0}function d(){return n.parentElement?(n.parentElement.removeChild(m),n.parentElement.removeChild(n),
+!0):!1}function e(a){var b=0;a=void 0===a?x.value:a;if(k()){var c=0,d=window.searchEmojis(a),e=f(d,O?O.self.R.a:[]),h;for(m in w)w[m].visible&&(w[m].visible=!1,q.removeChild(w[m].c));var m=0;for(h=e.length;m<h;m++){var l=e[m].name,E=w[l];if(!E){var E=w,n=l;var D=l;var l=window.makeEmoji(d[l]),H=document.createElement("span");H.appendChild(l);H.className="emoji-medium";D=g(D,H);E=E[n]=D}E.visible||(E.visible=!0,q.appendChild(E.c));c++}b+=c}m=b;c=0;for(r in A)A[r].visible&&(A[r].visible=!1,u.removeChild(A[r].c));
+if(O){d=f(O.b.data,O?O.self.R.a:[]);var r=0;for(b=d.length;r<b;r++)n=d[r].name,""!==a&&n.substr(0,a.length)!==a||"alias:"===O.b.data[n].substr(0,6)||(e=A[n],e||(e=A,E=h=n,n=O.b.data[n],D=document.createElement("span"),l=document.createElement("span"),D.className="emoji emoji-custom",D.style.backgroundImage='url("'+n+'")',l.appendChild(D),l.className="emoji-medium",E=g(E,l),e=e[h]=E),e.visible||(e.visible=!0,u.appendChild(e.c)),c++);r=c}else r=0;return m+r}function f(a,b){var c=[],d;for(d in a){var e=
+{name:d,$a:0,count:0};if(a[d].names)for(var f=0,g=a[d].names.length;f<g;f++)e.count+=b[a[d].names[f]]||0;c.push(e)}return c=c.sort(function(a,b){var c=b.count-a.count;return c?c:a.$a-b.$a})}function g(a,b){var c=document.createElement("li");c.appendChild(b);c.className="emojibar-list-item";c.id="emojibar-"+a;return{visible:!1,c:c}}function h(a){var b=document.createElement("img"),c=document.createElement("div");b.src=a;c.appendChild(b);c.className="emojibar-header";return c}function k(){return"searchEmojis"in
+window}var n=document.createElement("div"),m=document.createElement("div"),l=document.createElement("div"),q=document.createElement("ul"),u=document.createElement("ul"),x=document.createElement("input"),w={},A={},K=document.createElement("div"),H=document.createElement("span"),r=document.createElement("span"),D,O;m.addEventListener("click",function(a){var b=n.getBoundingClientRect();(a.screenY<b.top||a.screenY>b.bottom||a.screenX<b.left||a.screenX>b.right)&&c()});m.className="emojibar-overlay";n.className=
+"emojibar";l.className="emojibar-emojis";q.className=u.className="emojibar-list";x.className="emojibar-search";K.className="emojibar-detail";H.className="emojibar-detail-img";r.className="emojibar-detail-name";K.appendChild(H);K.appendChild(r);b();n.appendChild(l);n.appendChild(K);n.appendChild(x);x.addEventListener("keyup",function(){e()});n.addEventListener("mousemove",function(b){a(b,function(a){var b=a?w[a]||A[a]:null;b?(H.innerHTML=b.c.outerHTML,r.textContent=":"+a+":"):(H.textContent="",r.textContent=
+"")})});n.addEventListener("click",function(b){a(b,function(a){a&&d()&&D&&D(a)})});return{isSupported:k,ja:function(a,b,c){return k()?(O=b,D=c,a.appendChild(m),a.appendChild(n),x.value="",e(),x.focus(),!0):!1},search:e,close:c,reset:function(){b();e()}}}();var F,N=[];function Db(){da.call(this)}Db.prototype=Object.create(da.prototype);Db.prototype.constructor=Db;function qa(a){return a.a?a.a.id:null}function Eb(){this.b=0;this.context=new oa;this.a={}}
+Eb.prototype.update=function(a){var b=Date.now();a.v&&(this.b=a.v);if(a["static"])for(k in a["static"]){var c=pa(this.context,k);c||(c=new Db,this.context.push(c));var d={};a["static"][k].channels&&a["static"][k].channels.forEach(function(a){a.pins&&(d[a.id]=a.pins,a.pins=void 0)});ga(c,a["static"][k],b);for(var e in d){var f=[],g=this.a[e];g||(g=this.a[e]=new Y(e,250,null,b));d[e].forEach(function(a){f.push(g.b(a,b))});c.l[e].b=f}}ra(this.context,function(a){a.P===a.C&&(a=N.indexOf(a),-1!==a&&N.splice(a,
+1))});if(a.live){for(k in a.live)(c=this.a[k])?ka(c,a.live[k],b):c=this.a[k]=new Y(k,250,a.live[k],b);for(var h in a.live){var k=G(this.context,h);(c=k.l[h])?(this.a[h].a.length&&(c.P=Math.max(c.P,ma(this.a[h]).m)),c.da||(Fb(k,c,a.live[h]),M&&a.live[M.id]&&R())):F.b=0}}a["static"]&&Pa();var n=!1;a.typing&&this.context.a.forEach(function(c){var d=n,e=a.typing,f=!1;if(c.u)for(var g in c.u)e[g]||(delete c.u[g],f=!0);if(e)for(g in e)if(c.l[g]){c.u[g]||(c.u[g]={});for(var h in e[g])c.u[g][h]||(f=!0),c.u[g][h]=
+b}n=d|f},this);(a["static"]||n)&&Va();a.config&&(Gb=new Hb(a.config),Ib()&&qb.sb(!1).display(qb.pb.S),Jb());if(Q&&M&&a["static"]&&a["static"][Q.a.id]&&a["static"][Q.a.id].channels&&a["static"][Q.a.id].channels)for(h=a["static"][Q.a.id].channels,k=0,c=h.length;k<c;k++)if(h[k].id===M.id){R();break}};
 setInterval(function(){var a=!1,b=Date.now();sa(function(c){var d=!1,e;for(e in c.u){var f=!0,g;for(g in c.u[e])c.u[e][g]+3E3<b?(delete c.u[e][g],d=!0):f=!1;f&&(delete c.u[e],d=!0)}d&&(a=!0)});a&&Va()},1E3);
-function Fb(a,b,c){if(b!==L||!window.hasFocus){var d=new RegExp("<@"+a.self.id),e=!1,f=!1,g=!1;c.forEach(function(c){if(!(parseFloat(c.ts)<=b.C)){f=!0;var h;if(!(h=b instanceof u)&&(h=c.text)&&!(h=c.text.match(d)))a:{h=a.self.R.B;for(var n=0,m=h.length;n<m;n++)if(-1!==c.text.indexOf(h[n])){h=!0;break a}h=!1}h&&(-1===M.indexOf(b)&&(g=!0,M.push(b)),e=!0)}});if(f){O();if(c=document.getElementById("room_"+b.id))c.classList.add("unread"),e&&c.classList.add("unreadHi");g&&!window.hasFocus&&eb()}}}
-function $a(){var a=L,b=M.indexOf(a);if(a.P>a.C){var c=E.a[a.id];if(c&&(c=c.a[c.a.length-1])){var d=new XMLHttpRequest;d.open("POST","api/markread?room="+a.id+"&id="+c.id+"&ts="+c.m,!0);d.send(null);a.C=c.m}}0<=b&&(M.splice(b,1),O());a=document.getElementById("room_"+a.id);a.classList.remove("unread");a.classList.remove("unreadHi")}E=new Eb;var Ua=function(){function a(a,c){c.sort(function(){return Math.random()-.5});for(var d=0,e=20;e<n-40;e+=k)for(var f=0;f+k<=m;f+=k)g(a,c[d],e,f),d++,d===c.length&&(c.sort(b),d=0)}function b(a,b){return a.O?b.O?Math.random()-.5:-1:1}function c(a,b){for(var e=0,f=a.length;e<f;e++)if(void 0===a[e].O){d(a[e].src,function(d){a[e].O=d;c(a,b)});return}var g=[];a.forEach(function(a){a.O&&g.push(a.O)});b(g)}function d(a,b){var c=new XMLHttpRequest;c.responseType="blob";c.onreadystatechange=function(){if(4===
-c.readyState)if(c.response){var a=new Image;a.onload=function(){var c=document.createElement("canvas");c.height=c.width=w;c=c.getContext("2d");c.drawImage(a,0,0,w,w);var c=c.getImageData(0,0,w,w),d=0,e;for(e=0;e<c.width*c.height*4;e+=4)c.data[e]=c.data[e+1]=c.data[e+2]=(c.data[e]+c.data[e+1]+c.data[e+2])/3,c.data[e+3]=50,d+=c.data[e];if(50>d/(c.height*c.width))for(e=0;e<c.width*c.height*4;e+=4)c.data[e]=c.data[e+1]=c.data[e+2]=255-c.data[e];b(c)};a.onerror=function(){b(null)};a.src=window.URL.createObjectURL(c.response)}else b(null)};
-c.open("GET",a,!0);c.send(null)}function e(){var a=l.createLinearGradient(0,0,0,m);a.addColorStop(0,"#4D394B");a.addColorStop(1,"#201820");l.fillStyle=a;l.fillRect(0,0,n,m);return l.getImageData(0,0,n,m)}function f(a,b){for(var c=(a.height-b.height)/2,d=0;d<b.height;d++)for(var e=0;e<b.width;e++){var f=b.data[4*(d*b.width+e)]/255,g=4*((d+c)*a.width+e+c);a.data[g]*=f;a.data[g+1]*=f;a.data[g+2]*=f}return a}function g(a,b,c,d){var e=Math.floor(d);a=[a.data[e*n*4+0],a.data[e*n*4+1],a.data[e*n*4+2]];l.fillStyle=
-"#"+(1.1*a[0]<<16|1.1*a[1]<<8|1.1*a[2]).toString(16);l.beginPath();l.moveTo(c+k/2,d+q);l.lineTo(c-q+k,d+k/2);l.lineTo(c+k/2,d-q+k);l.lineTo(c+q,d+k/2);l.closePath();l.fill();l.putImageData(f(l.getImageData(c+q,d+q,t,t),b),c+q,d+q)}var h=document.createElement("canvas"),l=h.getContext("2d"),n=h.width=250,m=h.height=290,k=(n-40)/3,q=.1*k,t=Math.floor(k-2*q),w=.5*t,x={},A={},J={};return function(b,d,f){if(x[b])f(x[b]);else if(J[b])A[b]?A[b].push(f):A[b]=[f];else{var g=e(),k=[];J[b]=!0;A[b]?A[b].push(f):
-A[b]=[f];for(var l in d)d[l].Oa||d[l].mb||k.push({src:"api/avatar?user="+d[l].id});c(k,function(c){a(g,c);x[b]=h.toDataURL();A[b].forEach(function(a){a(x[b])})})}}}();var W=0,L=null,P=null,T=null,V=null;function pb(){var a=new XMLHttpRequest;a.timeout=6E4;a.onreadystatechange=function(){if(4===a.readyState){var b=document.createElement("script"),c=document.createElement("link");b.innerHTML=a.response;b.language="text/javascript";c.href="hljs-androidstudio.css";c.rel="stylesheet";document.head.appendChild(c);document.body.appendChild(b)}};a.open("GET","highlight.pack.js",!0);a.send(null)}
-function Kb(){var a=L,b=new XMLHttpRequest;b.open("GET","api/hist?room="+a.id,!0);b.onreadystatechange=function(){if(4===b.readyState&&b.response){var c=b.response;try{c=JSON.parse(c)}catch(e){}var d=E.a[a.id];d?d=!!ka(d,c,Date.now()):(E.a[a.id]=new Y(a,100,c,Date.now()),d=!0);d&&(Fb(F(E.context,a.id),a,c),a===L&&Q())}};b.send(null)}
-function Lb(a){var b=new XMLHttpRequest;b.timeout=6E4;b.onreadystatechange=function(){if(4===b.readyState)if(b.status){var c=null,d=2===Math.floor(b.status/100);if(d){W&&(W=0,Ya(!0));c=b.response;try{c=JSON.parse(c)}catch(e){c=null}}else W?(W+=Math.floor((W||5)/2),W=Math.min(60,W)):(W=5,Ya(!1));a(d,c)}else W&&(W=0,Ya(!0)),Lb(a)};b.open("GET","api?v="+E.b,!0);b.send(null)}function tb(){var a=new XMLHttpRequest;a.open("POST","api/typing?room="+L.id,!0);a.send(null)}
-function Mb(a,b){a?(b&&E.update(b),xb()):setTimeout(xb,1E3*W)}function xb(){Lb(Mb)}
-function Nb(a){L&&(document.getElementById("room_"+L.id).classList.remove("selected"),document.getElementById("chatSystemContainer").classList.add("no-room-selected"));document.getElementById("room_"+a.id).classList.add("selected");document.body.classList.remove("no-room-selected");L=a;P=F(E.context,a.id);Za();X.ua();Ua(P.a.id,P.j,function(a){document.getElementById("chatCtx").style.backgroundImage="url("+a+")"});(!E.a[L.id]||100>E.a[L.id].a.length)&&Kb();document.getElementById("chatSystemContainer").classList.remove("no-room-selected")}
-function Ta(){var a=document.location.hash.substr(1),b=ta(a);b&&b!==L?Nb(b):(a=H(a))&&a.V&&Nb(a.V)}function rb(a,b,c){var d=L;new FileReader;var e=new FormData,f=new XMLHttpRequest;e.append("file",b);e.append("filename",a);f.onreadystatechange=function(){4===f.readyState&&(204===f.status?c(null):c(f.statusText))};f.open("POST","api/file?room="+d.id);f.send(e)}
-function Ob(a,b,c){var d=new XMLHttpRequest;b="api/msg?room="+a.id+"&text="+encodeURIComponent(b);c&&(b+="&attachments="+encodeURIComponent(JSON.stringify([{fallback:c.text,author_name:H(c.L).getName(),text:c.text,footer:a.b?K.message:a.name,ts:c.m}])));d.open("POST",b,!0);d.send(null)}
-function sb(a){if(V){var b=new XMLHttpRequest;b.open("PUT","api/msg?room="+L.id+"&ts="+V.id+"&text="+encodeURIComponent(a),!0);b.send(null);return!0}if("/"===a[0]){var c=a.indexOf(" "),b=a.substr(0,-1===c?void 0:c);a=-1===c?"":a.substr(c);var c=P,d=ub.Ra(b);return d?(d.exec(c,L,a.trim()),!0):c&&(b=c.h.data[b])?(c=new XMLHttpRequest,c.open("POST","api/cmd?room="+L.id+"&cmd="+encodeURIComponent(b.name.substr(1))+"&args="+encodeURIComponent(a.trim()),!0),c.send(null),!0):!1}Ob(L,a,T);return!0}
-function mb(a){var b=new XMLHttpRequest;b.open("DELETE","api/msg?room="+L.id+"&ts="+a.id,!0);b.send(null)}function lb(a){var b=new XMLHttpRequest;b.open("POST","api/pinMsg?room="+L.id+"&msgId="+a.id,!0);b.send(null)}function jb(a){var b=new XMLHttpRequest;b.open("POST","api/starMsg?room="+L.id+"&msgId="+a.id,!0);b.send(null)}function kb(a){var b=new XMLHttpRequest;b.open("DELETE","api/pinMsg?room="+L.id+"&msgId="+a.id,!0);b.send(null)}
-function ib(a){var b=new XMLHttpRequest;b.open("DELETE","api/starMsg?room="+L.id+"&msgId="+a.id,!0);b.send(null)}function bb(a,b,c){var d=new XMLHttpRequest;d.open("POST","api/reaction?room="+a+"&msg="+b+"&reaction="+encodeURIComponent(c),!0);d.send(null)}
-function Sa(){var a={},b=[],c=this.value;ra(E.context,function(b){a[b.id]=ia(b,c)});for(var d in a){var e=document.getElementById("room_"+d);e&&(a[d].name+a[d].ob+a[d].la+a[d].ia?(e.classList.remove("hidden"),b.push(d)):e.classList.add("hidden"))}};var Pb={emojione_v2_3:{Ua:"emojione_v2.3.sprites.js",Na:"emojione_v2.3.sprites.css",name:"Emojione v2.3"},emojione_v3:{Ua:"emojione_v3.sprites.js",Na:"emojione_v3.sprites.css",name:"Emojione v3"}},Qb=Pb.emojione_v2_3,Rb;
-function Sb(a){if(Rb!==a){console.log("Loading emoji pack "+a.name);var b=new XMLHttpRequest;b.timeout=6E4;b.onreadystatechange=function(){if(4===b.readyState){var c=document.createElement("script"),d=document.createElement("link");c.innerHTML=b.response;c.language="text/javascript";d.href=a.Na;d.rel="stylesheet";document.head.appendChild(d);document.body.appendChild(c);for(var e in E.a)Tb(E.a[e]);L&&Q();hb.reset()}};b.open("GET",a.Ua,!0);b.send(null);Rb=a}}
-function Jb(){a:{var a=Gb;for(var b in a.S){var c=a.S[b].emojiProvider;if(c&&Pb[c]){a=c;break a}}a=void 0}Sb(a&&Pb[a]?Pb[a]:Qb)};var X=function(){function a(){b();if(r instanceof u)d.style.backgroundImage="url(api/avatar?size=l&user="+r.a.id+")",h.textContent=(r.a.cb||(r.a.Qa||"")+" "+r.a.Va).trim(),e.classList.add("presence-indicator"),r.a.wa?e.classList.remove("presence-away"):e.classList.add("presence-away"),g.classList.remove("hidden"),n.classList.remove("hidden"),n.textContent=r.a.qb||"",k.textContent=r.a.kb||"",m.classList.remove("hidden"),c.classList.remove("roominfo-channel"),c.classList.add("roominfo-user");else{var a=
-J;a.Y.topic?(g.classList.remove("hidden"),h.textContent=r.la||"",l.textContent=r.I?K.za(r.I,r.ca):""):g.classList.add("hidden");a.Y.purpose?(m.classList.remove("hidden"),k.textContent=r.ia||"",q.textContent=r.o?K.za(r.o,r.ba):""):m.classList.add("hidden");d.style.backgroundImage="";e.classList.remove("presence-indicator");c.classList.add("roominfo-channel");c.classList.remove("roominfo-user")}}function b(){e.textContent=r.name;if(r.h){t.textContent=K.Za(r.h.length);t.classList.remove("hidden");w.classList.remove("hidden");
-var a=document.createDocumentFragment();r.h.forEach(function(b){var c=document.createElement("li");c.className="roominfo-pinlist-item";c.appendChild(b.J());a.appendChild(c)});w.textContent="";w.appendChild(a)}else t.classList.add("hidden"),w.classList.add("hidden")}var c=document.createElement("div"),d=document.createElement("header"),e=document.createElement("h3"),f=document.createElement("div"),g=document.createElement("div"),h=document.createElement("span"),l=document.createElement("span"),n=document.createElement("div"),
-m=document.createElement("div"),k=document.createElement("span"),q=document.createElement("span"),t=document.createElement("div"),w=document.createElement("ul"),x=document.createElement("div"),A=document.createElement("ul"),J,r;c.className="chat-context-roominfo";d.className="roominfo-title";g.className="roominfo-topic";m.className="roominfo-purpose";n.className="roominfo-phone";t.className="roominfo-pincount";w.className="roominfo-pinlist";x.className="roominfo-usercount";A.className="roominfo-userlist";
-q.className=l.className="roominfo-author";d.appendChild(e);c.appendChild(d);c.appendChild(f);g.appendChild(h);g.appendChild(l);m.appendChild(k);m.appendChild(q);f.appendChild(g);f.appendChild(n);f.appendChild(m);f.appendChild(t);f.appendChild(w);f.appendChild(x);f.appendChild(A);return{$a:function(b,c){J=b;r=c;a();return this},update:function(){a();return this},show:function(a){a.appendChild(c);c.classList.remove("hidden");return this},ua:function(){c.classList.add("hidden");return this},Ta:function(a){for(;a;){if(a===
-c)return!0;a=a.parentNode}return!1}}}();function Y(a,b,c,d){C.call(this,a,b,0,c,d)}Y.prototype=Object.create(C.prototype);Y.prototype.constructor=Y;Y.prototype.b=function(a,b){return!0===a.isMeMessage?new Ub(this.id,a,b):!0===a.isNotice?new Vb(this.id,a,b):new Wb(this.id,a,b)};function Tb(a){a.a.forEach(function(a){a.G()})}
-var Z=function(){function a(a,d){return xa(d,{B:a.context.self.R.B,Z:function(a){":"===a[0]&&":"===a[a.length-1]&&(a=a.substr(1,a.length-2));if(a=cb(a)){var b=document.createElement("span");b.className="emoji-small";b.appendChild(a);return b.outerHTML}return null},ha:function(c){return b(a,c)}})}function b(a,b){var c=b.indexOf("|");if(-1===c)var d=b;else{d=b.substr(0,c);var g=b.substr(c+1)}if("@"===d[0])if(d=qa(a.context)+"|"+d.substr(1),g=H(d))a=!0,d="#"+g.V.id,g="@"+g.getName();else return null;
-else if("#"===d[0])if(d=qa(a.context)+"|"+d.substr(1),g=ta(d))a=!0,d="#"+d,g="#"+g.name;else return null;else{if(!d.match(/^(https?|mailto):\/\//i))return null;a=!1}return{link:d,text:g||d,Sa:a}}return{G:function(a){a.T=!0;return a},W:function(a){a.c&&a.c.parentElement&&(a.c.remove(),delete a.c);return a},J:function(a){a.c?a.T&&(a.T=!1,a.K()):a.ra().K();return a.c},K:function(b){var c=H(b.L);b.c.m.innerHTML=K.N(b.m);b.c.ya.innerHTML=a(b,b.text);b.c.sa.textContent=c?c.getName():b.username||"?";for(var c=
-document.createDocumentFragment(),e=0,f=b.s.length;e<f;e++){var g=b.s[e];g&&(g=Bb(b,g,e))&&c.appendChild(g)}b.c.s.textContent="";b.c.s.appendChild(c);c=b.b;e=document.createDocumentFragment();if(b.D)for(var h in b.D){var f=c,g=b.id,l=h,n=b.D[h],m=cb(l);if(m){for(var k=document.createElement("li"),q=document.createElement("a"),t=document.createElement("span"),w=document.createElement("span"),x=[],A=0,J=n.length;A<J;A++){var r=H(n[A]);r&&x.push(r.getName())}x.sort();w.textContent=x.join(", ");t.appendChild(m);
-t.className="emoji-small";q.href="javascript:toggleReaction('"+f+"', '"+g+"', '"+l+"')";q.appendChild(t);q.appendChild(w);k.className="chatmsg-reaction-item";k.appendChild(q);f=k}else console.warn("Reaction id not found: "+l),f=null;f&&e.appendChild(f)}b.c.D.textContent="";b.c.D.appendChild(e);b.c.aa.ga&&(b.c.aa.ga.style.backgroundImage=b.A?'url("star_full.png")':'url("star_empty.png")');b.F&&(b.c.F.innerHTML=K.F(b.F),b.c.classList.add("edited"));return b},M:function(a){return a.c.cloneNode(!0)},
-w:function(b,d){return a(b,d)}}}();function Ub(a,b,c){y.call(this,b,c);this.context=F(E.context,a);this.b=a;this.c=Z.c;this.T=Z.T}Ub.prototype=Object.create(z.prototype);p=Ub.prototype;p.constructor=Ub;p.G=function(){return Z.G(this)};p.w=function(a){return Z.w(this,a)};p.W=function(){return Z.W(this)};p.J=function(){return Z.J(this)};p.ra=function(){this.c=zb(this);this.c.classList.add("chatmsg-me_message");return this};p.M=function(){return Z.M(this)};p.K=function(){Z.K(this);return this};
-p.update=function(a,b){z.prototype.update.call(this,a,b);this.G()};function Wb(a,b,c){y.call(this,b,c);this.context=F(E.context,a);this.b=a;this.c=Z.c;this.T=Z.T}Wb.prototype=Object.create(y.prototype);p=Wb.prototype;p.constructor=Wb;p.G=function(){return Z.G(this)};p.w=function(a){return Z.w(this,a)};p.W=function(){return Z.W(this)};p.J=function(){return Z.J(this)};p.ra=function(){this.c=zb(this);return this};p.M=function(){return Z.M(this)};p.K=function(){Z.K(this);return this};
+function Fb(a,b,c){if(b!==M||!window.hasFocus){var d=new RegExp("<@"+a.self.id),e=!1,f=!1,g=!1;c.forEach(function(c){if(!(parseFloat(c.ts)<=b.C)){f=!0;var k;if(!(k=b instanceof t)&&(k=c.text)&&!(k=c.text.match(d)))a:{k=a.self.R.B;for(var h=0,m=k.length;h<m;h++)if(-1!==c.text.indexOf(k[h])){k=!0;break a}k=!1}k&&(-1===N.indexOf(b)&&(g=!0,N.push(b)),e=!0)}});if(f){P();if(c=document.getElementById("room_"+b.id))c.classList.add("unread"),e&&c.classList.add("unreadHi");g&&!window.hasFocus&&eb()}}}
+function $a(){var a=M,b=N.indexOf(a);if(a.P>a.C){var c=F.a[a.id];if(c&&(c=c.a[c.a.length-1])){var d=new XMLHttpRequest;d.open("POST","api/markread?room="+a.id+"&id="+c.id+"&ts="+c.m,!0);d.send(null);a.C=c.m}}0<=b&&(N.splice(b,1),P());a=document.getElementById("room_"+a.id);a.classList.remove("unread");a.classList.remove("unreadHi")}F=new Eb;var Ua=function(){function a(a,c){c.sort(function(){return Math.random()-.5});for(var d=0,e=20;e<n-40;e+=l)for(var f=0;f+l<=m;f+=l)g(a,c[d],e,f),d++,d===c.length&&(c.sort(b),d=0)}function b(a,b){return a.O?b.O?Math.random()-.5:-1:1}function c(a,b){for(var e=0,f=a.length;e<f;e++)if(void 0===a[e].O){d(a[e].src,function(d){a[e].O=d;c(a,b)});return}var g=[];a.forEach(function(a){a.O&&g.push(a.O)});b(g)}function d(a,b){var c=new XMLHttpRequest;c.responseType="blob";c.onreadystatechange=function(){if(4===
+c.readyState)if(c.response){var a=new Image;a.onload=function(){var c=document.createElement("canvas");c.height=c.width=x;c=c.getContext("2d");c.drawImage(a,0,0,x,x);var c=c.getImageData(0,0,x,x),d=0,e;for(e=0;e<c.width*c.height*4;e+=4)c.data[e]=c.data[e+1]=c.data[e+2]=(c.data[e]+c.data[e+1]+c.data[e+2])/3,c.data[e+3]=50,d+=c.data[e];if(50>d/(c.height*c.width))for(e=0;e<c.width*c.height*4;e+=4)c.data[e]=c.data[e+1]=c.data[e+2]=255-c.data[e];b(c)};a.onerror=function(){b(null)};a.src=window.URL.createObjectURL(c.response)}else b(null)};
+c.open("GET",a,!0);c.send(null)}function e(){var a=k.createLinearGradient(0,0,0,m);a.addColorStop(0,"#4D394B");a.addColorStop(1,"#201820");k.fillStyle=a;k.fillRect(0,0,n,m);return k.getImageData(0,0,n,m)}function f(a,b){for(var c=(a.height-b.height)/2,d=0;d<b.height;d++)for(var e=0;e<b.width;e++){var f=b.data[4*(d*b.width+e)]/255,g=4*((d+c)*a.width+e+c);a.data[g]*=f;a.data[g+1]*=f;a.data[g+2]*=f}return a}function g(a,b,c,d){var e=Math.floor(d);a=[a.data[e*n*4+0],a.data[e*n*4+1],a.data[e*n*4+2]];k.fillStyle=
+"#"+(1.1*a[0]<<16|1.1*a[1]<<8|1.1*a[2]).toString(16);k.beginPath();k.moveTo(c+l/2,d+q);k.lineTo(c-q+l,d+l/2);k.lineTo(c+l/2,d-q+l);k.lineTo(c+q,d+l/2);k.closePath();k.fill();k.putImageData(f(k.getImageData(c+q,d+q,u,u),b),c+q,d+q)}var h=document.createElement("canvas"),k=h.getContext("2d"),n=h.width=250,m=h.height=290,l=(n-40)/3,q=.1*l,u=Math.floor(l-2*q),x=.5*u,w={},A={},K={};return function(b,d,f){if(w[b])f(w[b]);else if(K[b])A[b]?A[b].push(f):A[b]=[f];else{var g=e(),k=[];K[b]=!0;A[b]?A[b].push(f):
+A[b]=[f];for(var l in d)d[l].Na||d[l].lb||k.push({src:"api/avatar?user="+d[l].id});c(k,function(c){a(g,c);w[b]=h.toDataURL();A[b].forEach(function(a){a(w[b])})})}}}();var W=0,M=null,Q=null,T=null,V=null;function pb(){var a=new XMLHttpRequest;a.timeout=6E4;a.onreadystatechange=function(){if(4===a.readyState){var b=document.createElement("script"),c=document.createElement("link");b.innerHTML=a.response;b.language="text/javascript";c.href="hljs-androidstudio.css";c.rel="stylesheet";document.head.appendChild(c);document.body.appendChild(b)}};a.open("GET","highlight.pack.js",!0);a.send(null)}
+function Kb(){var a=M,b=new XMLHttpRequest;b.open("GET","api/hist?room="+a.id,!0);b.onreadystatechange=function(){if(4===b.readyState&&b.response){var c=b.response;try{c=JSON.parse(c)}catch(e){}var d=F.a[a.id];d?d=!!ka(d,c,Date.now()):(F.a[a.id]=new Y(a,100,c,Date.now()),d=!0);d&&(Fb(G(F.context,a.id),a,c),a===M&&R())}};b.send(null)}
+function Lb(a){var b=new XMLHttpRequest;b.timeout=6E4;b.onreadystatechange=function(){if(4===b.readyState)if(b.status){var c=null,d=2===Math.floor(b.status/100);if(d){W&&(W=0,Ya(!0));c=b.response;try{c=JSON.parse(c)}catch(e){c=null}}else W?(W+=Math.floor((W||5)/2),W=Math.min(60,W)):(W=5,Ya(!1));a(d,c)}else W&&(W=0,Ya(!0)),Lb(a)};b.open("GET","api?v="+F.b,!0);b.send(null)}function tb(){var a=new XMLHttpRequest;a.open("POST","api/typing?room="+M.id,!0);a.send(null)}
+function Mb(a,b){a?(b&&F.update(b),xb()):setTimeout(xb,1E3*W)}function xb(){Lb(Mb)}
+function Nb(a){M&&(document.getElementById("room_"+M.id).classList.remove("selected"),document.getElementById("chatSystemContainer").classList.add("no-room-selected"));document.getElementById("room_"+a.id).classList.add("selected");document.body.classList.remove("no-room-selected");M=a;Q=G(F.context,a.id);Za();X.Ra();Ua(Q.a.id,Q.j,function(a){document.getElementById("chatCtx").style.backgroundImage="url("+a+")"});(!F.a[M.id]||100>F.a[M.id].a.length)&&Kb();document.getElementById("chatSystemContainer").classList.remove("no-room-selected")}
+function Ta(){var a=document.location.hash.substr(1),b=ta(a);b&&b!==M?Nb(b):(a=I(a))&&a.V&&Nb(a.V)}function rb(a,b,c){var d=M;new FileReader;var e=new FormData,f=new XMLHttpRequest;e.append("file",b);e.append("filename",a);f.onreadystatechange=function(){4===f.readyState&&(204===f.status?c(null):c(f.statusText))};f.open("POST","api/file?room="+d.id);f.send(e)}
+function Ob(a,b,c){var d=new XMLHttpRequest;b="api/msg?room="+a.id+"&text="+encodeURIComponent(b);c&&(b+="&attachments="+encodeURIComponent(JSON.stringify([{fallback:c.text,author_name:I(c.L).getName(),text:c.text,footer:a.h?L.message:a.name,ts:c.m}])));d.open("POST",b,!0);d.send(null)}
+function sb(a){if(V){var b=new XMLHttpRequest;b.open("PUT","api/msg?room="+M.id+"&ts="+V.id+"&text="+encodeURIComponent(a),!0);b.send(null);return!0}if("/"===a[0]){var c=a.indexOf(" "),b=a.substr(0,-1===c?void 0:c);a=-1===c?"":a.substr(c);var c=Q,d=ub.Qa(b);return d?(d.exec(c,M,a.trim()),!0):c&&(b=c.h.data[b])?(c=new XMLHttpRequest,c.open("POST","api/cmd?room="+M.id+"&cmd="+encodeURIComponent(b.name.substr(1))+"&args="+encodeURIComponent(a.trim()),!0),c.send(null),!0):!1}Ob(M,a,T);return!0}
+function mb(a){var b=new XMLHttpRequest;b.open("DELETE","api/msg?room="+M.id+"&ts="+a.id,!0);b.send(null)}function lb(a){var b=new XMLHttpRequest;b.open("POST","api/pinMsg?room="+M.id+"&msgId="+a.id,!0);b.send(null)}function jb(a){var b=new XMLHttpRequest;b.open("POST","api/starMsg?room="+M.id+"&msgId="+a.id,!0);b.send(null)}function kb(a,b){var c=new XMLHttpRequest;c.open("DELETE","api/pinMsg?room="+a.id+"&msgId="+b.id,!0);c.send(null)}
+function ib(a){var b=new XMLHttpRequest;b.open("DELETE","api/starMsg?room="+M.id+"&msgId="+a.id,!0);b.send(null)}function bb(a,b,c){var d=new XMLHttpRequest;d.open("POST","api/reaction?room="+a+"&msg="+b+"&reaction="+encodeURIComponent(c),!0);d.send(null)}
+function Sa(){var a={},b=[],c=this.value;ra(F.context,function(b){a[b.id]=ia(b,c)});for(var d in a){var e=document.getElementById("room_"+d);e&&(a[d].name+a[d].ob+a[d].la+a[d].ia?(e.classList.remove("hidden"),b.push(d)):e.classList.add("hidden"))}};var Pb={emojione_v2_3:{Ta:"emojione_v2.3.sprites.js",Ma:"emojione_v2.3.sprites.css",name:"Emojione v2.3"},emojione_v3:{Ta:"emojione_v3.sprites.js",Ma:"emojione_v3.sprites.css",name:"Emojione v3"}},Qb=Pb.emojione_v2_3,Rb;
+function Sb(a){if(Rb!==a){console.log("Loading emoji pack "+a.name);var b=new XMLHttpRequest;b.timeout=6E4;b.onreadystatechange=function(){if(4===b.readyState){var c=document.createElement("script"),d=document.createElement("link");c.innerHTML=b.response;c.language="text/javascript";d.href=a.Ma;d.rel="stylesheet";document.head.appendChild(d);document.body.appendChild(c);for(var e in F.a)Tb(F.a[e]);M&&R();hb.reset()}};b.open("GET",a.Ta,!0);b.send(null);Rb=a}}
+function Jb(){a:{var a=Gb;for(var b in a.S){var c=a.S[b].emojiProvider;if(c&&Pb[c]){a=c;break a}}a=void 0}Sb(a&&Pb[a]?Pb[a]:Qb)};var X=function(){function a(){b();if(r instanceof t)e.style.backgroundImage="url(api/avatar?size=l&user="+r.a.id+")",k.textContent=(r.a.bb||(r.a.Pa||"")+" "+r.a.Ua).trim(),f.classList.add("presence-indicator"),r.a.va?f.classList.remove("presence-away"):f.classList.add("presence-away"),h.classList.remove("hidden"),m.classList.remove("hidden"),m.textContent=r.a.qb||"",q.textContent=r.a.jb||"",l.classList.remove("hidden"),d.classList.remove("roominfo-channel"),d.classList.add("roominfo-user");else{var a=
+H;a.Y.topic?(h.classList.remove("hidden"),k.textContent=r.la||"",n.textContent=r.I?L.ya(r.I,r.ca):""):h.classList.add("hidden");a.Y.purpose?(l.classList.remove("hidden"),q.textContent=r.ia||"",u.textContent=r.o?L.ya(r.o,r.ba):""):l.classList.add("hidden");e.style.backgroundImage="";f.classList.remove("presence-indicator");d.classList.add("roominfo-channel");d.classList.remove("roominfo-user")}}function b(){f.textContent=r.name;if(r.b){x.textContent=L.Ya(r.b.length);x.classList.remove("hidden");w.classList.remove("hidden");
+var a=document.createDocumentFragment();r.b.forEach(function(b){var d=document.createElement("li"),e=document.createElement("a");e.href="javascript:void(0)";e.dataset.msgId=b.id;e.addEventListener("click",c);e.className=Fa+" roominfo-unpin";d.className="roominfo-pinlist-item";d.appendChild(b.J());d.appendChild(e);a.appendChild(d)});w.textContent="";w.appendChild(a)}else x.classList.add("hidden"),w.classList.add("hidden")}function c(){if(r.b)for(var a=0,b=r.b.length;a<b;a++)if(r.b[a].id===this.dataset.msgId){kb(r,
+r.b[a]);break}}var d=document.createElement("div"),e=document.createElement("header"),f=document.createElement("h3"),g=document.createElement("div"),h=document.createElement("div"),k=document.createElement("span"),n=document.createElement("span"),m=document.createElement("div"),l=document.createElement("div"),q=document.createElement("span"),u=document.createElement("span"),x=document.createElement("div"),w=document.createElement("ul"),A=document.createElement("div"),K=document.createElement("ul"),
+H,r;d.className="chat-context-roominfo";e.className="roominfo-title";h.className="roominfo-topic";l.className="roominfo-purpose";m.className="roominfo-phone";x.className="roominfo-pincount";w.className="roominfo-pinlist";A.className="roominfo-usercount";K.className="roominfo-userlist";u.className=n.className="roominfo-author";e.appendChild(f);d.appendChild(e);d.appendChild(g);h.appendChild(k);h.appendChild(n);l.appendChild(q);l.appendChild(u);g.appendChild(h);g.appendChild(m);g.appendChild(l);g.appendChild(x);
+g.appendChild(w);g.appendChild(A);g.appendChild(K);return{Za:function(b,c){H=b;r=c;a();return this},update:function(){a();return this},show:function(a){a.appendChild(d);d.classList.remove("hidden");return this},Ra:function(){d.classList.add("hidden");return this},mb:function(a){for(;a;){if(a===d)return!0;a=a.parentNode}return!1}}}();function Y(a,b,c,d){C.call(this,a,b,0,c,d)}Y.prototype=Object.create(C.prototype);Y.prototype.constructor=Y;Y.prototype.b=function(a,b){return!0===a.isMeMessage?new Ub(this.id,a,b):!0===a.isNotice?new Vb(this.id,a,b):new Wb(this.id,a,b)};function Tb(a){a.a.forEach(function(a){a.G()})}
+var Z=function(){function a(a,d){return xa(d,{B:a.context.self.R.B,Z:function(a){":"===a[0]&&":"===a[a.length-1]&&(a=a.substr(1,a.length-2));if(a=cb(a)){var b=document.createElement("span");b.className="emoji-small";b.appendChild(a);return b.outerHTML}return null},ha:function(c){return b(a,c)}})}function b(a,b){var c=b.indexOf("|");if(-1===c)var d=b;else{d=b.substr(0,c);var g=b.substr(c+1)}if("@"===d[0])if(d=qa(a.context)+"|"+d.substr(1),g=I(d))a=!0,d="#"+g.V.id,g="@"+g.getName();else return null;
+else if("#"===d[0])if(d=qa(a.context)+"|"+d.substr(1),g=ta(d))a=!0,d="#"+d,g="#"+g.name;else return null;else{if(!d.match(/^(https?|mailto):\/\//i))return null;a=!1}return{link:d,text:g||d,Sa:a}}return{G:function(a){a.T=!0;return a},W:function(a){a.c&&a.c.parentElement&&(a.c.remove(),delete a.c);return a},J:function(a){a.c?a.T&&(a.T=!1,a.K()):a.ra().K();return a.c},K:function(b){var c=I(b.L);b.c.m.innerHTML=L.N(b.m);b.c.xa.innerHTML=a(b,b.text);b.c.sa.textContent=c?c.getName():b.username||"?";for(var c=
+document.createDocumentFragment(),e=0,f=b.s.length;e<f;e++){var g=b.s[e];g&&(g=Bb(b,g,e))&&c.appendChild(g)}b.c.s.textContent="";b.c.s.appendChild(c);c=b.b;e=document.createDocumentFragment();if(b.D)for(var h in b.D){var f=c,g=b.id,k=h,n=b.D[h],m=cb(k);if(m){for(var l=document.createElement("li"),q=document.createElement("a"),u=document.createElement("span"),x=document.createElement("span"),w=[],A=0,K=n.length;A<K;A++){var H=I(n[A]);H&&w.push(H.getName())}w.sort();x.textContent=w.join(", ");u.appendChild(m);
+u.className="emoji-small";q.href="javascript:toggleReaction('"+f+"', '"+g+"', '"+k+"')";q.appendChild(u);q.appendChild(x);l.className="chatmsg-reaction-item";l.appendChild(q);f=l}else console.warn("Reaction id not found: "+k),f=null;f&&e.appendChild(f)}b.c.D.textContent="";b.c.D.appendChild(e);b.c.aa.ga&&(b.c.aa.ga.style.backgroundImage=b.A?'url("star_full.png")':'url("star_empty.png")');b.F&&(b.c.F.innerHTML=L.F(b.F),b.c.classList.add("edited"));return b},M:function(a){return a.c.cloneNode(!0)},
+w:function(b,d){return a(b,d)}}}();function Ub(a,b,c){y.call(this,b,c);this.context=G(F.context,a);this.b=a;this.c=Z.c;this.T=Z.T}Ub.prototype=Object.create(z.prototype);p=Ub.prototype;p.constructor=Ub;p.G=function(){return Z.G(this)};p.w=function(a){return Z.w(this,a)};p.W=function(){return Z.W(this)};p.J=function(){return Z.J(this)};p.ra=function(){this.c=zb(this);this.c.classList.add("chatmsg-me_message");return this};p.M=function(){return Z.M(this)};p.K=function(){Z.K(this);return this};
+p.update=function(a,b){z.prototype.update.call(this,a,b);this.G()};function Wb(a,b,c){y.call(this,b,c);this.context=G(F.context,a);this.b=a;this.c=Z.c;this.T=Z.T}Wb.prototype=Object.create(y.prototype);p=Wb.prototype;p.constructor=Wb;p.G=function(){return Z.G(this)};p.w=function(a){return Z.w(this,a)};p.W=function(){return Z.W(this)};p.J=function(){return Z.J(this)};p.ra=function(){this.c=zb(this);return this};p.M=function(){return Z.M(this)};p.K=function(){Z.K(this);return this};
 p.update=function(a,b){y.prototype.update.call(this,a,b);this.G();if(a=this.text.match(/^<?https:\/\/www\.openstreetmap\.org\/\?mlat=(-?[0-9\.]+)(&amp;|&)mlon=(-?[0-9\.]+)(&amp;|&)macc=([0-9\.]+)[^\s]*/))this.text=this.text.substr(0,a.index)+this.text.substr(a.index+a[0].length).trim(),this.s.unshift({color:"#008000",text:a[0],footer:"Open Street Map",footer_icon:"https://www.openstreetmap.org/assets/favicon-32x32-36d06d8a01933075bc7093c9631cffd02d49b03b659f767340f256bb6839d990.png",geo:{latitude:a[1],
-longitude:a[3],accuracy:a[5]}})};function Vb(a,b,c){y.call(this,b,c);this.context=F(E.context,a);this.b=a;this.a=null;this.T=!0}Vb.prototype=Object.create(B.prototype);p=Vb.prototype;p.constructor=Vb;p.G=function(){return Z.G(this)};p.w=function(a){return Z.w(this,a)};p.W=function(){this.a&&this.a.parentElement&&(this.a.remove(),delete this.a);this.c&&delete this.c;return this};p.J=function(){Z.J(this);return this.a};p.M=function(){return this.a.cloneNode(!0)};
-p.ra=function(){this.c=zb(this);this.a=document.createElement("span");this.c.classList.add("chatmsg-notice");this.a.className="chatmsg-notice";this.a.textContent=K.Ya;this.a.appendChild(this.c);return this};p.K=function(){Z.K(this);return this};p.update=function(a,b){B.prototype.update.call(this,a,b);this.G()};function Ib(){var a=Gb.S,b;for(b in a)if(a.hasOwnProperty(b))return!1;return!0};var Gb;function Hb(a){this.S={};for(var b=0,c=a.length;b<c;b++)if(null===a[b].service&&null===a[b].device){var d=void 0,e=JSON.parse(a[b].config);if(e.services)for(d in e.services)this.S[d]=e.services[d]}};var ub=function(){var a=[];return{Ra:function(b){for(var c=0,d=a.length;c<d;c++)if(-1!==a[c].names.indexOf(b))return a[c];return null},jb:function(b){var c=[];a.forEach(function(a){for(var d=0,f=a.names.length;d<f;d++)if(a.names[d].substr(0,b.length)===b){c.push(a);break}});return c},rb:function(b){b.U="client";b.exec=b.exec.bind(b);a.push(b)}}}();function Xb(){return new Promise(function(a,b){"geolocation"in window.navigator?navigator.geolocation.getCurrentPosition(function(c){c?a(c):b("denied")}):b("geolocation not available")})}
-va.push(function(){ub.rb({name:"/sherlock",names:["/sherlock","/sharelock"],usage:"",description:K.eb,exec:function(a,b){Xb().then(function(a){var c=a.coords.latitude,e=a.coords.longitude;Ob(b,"https://www.openstreetmap.org/?mlat="+c+"&mlon="+e+"&macc="+a.coords.accuracy+"#map=17/"+c+"/"+e)}).catch(function(a){console.error("Error: ",a)})}})});
+longitude:a[3],accuracy:a[5]}})};function Vb(a,b,c){y.call(this,b,c);this.context=G(F.context,a);this.b=a;this.a=null;this.T=!0}Vb.prototype=Object.create(B.prototype);p=Vb.prototype;p.constructor=Vb;p.G=function(){return Z.G(this)};p.w=function(a){return Z.w(this,a)};p.W=function(){this.a&&this.a.parentElement&&(this.a.remove(),delete this.a);this.c&&delete this.c;return this};p.J=function(){Z.J(this);return this.a};p.M=function(){return this.a.cloneNode(!0)};
+p.ra=function(){this.c=zb(this);this.a=document.createElement("span");this.c.classList.add("chatmsg-notice");this.a.className="chatmsg-notice";this.a.textContent=L.Xa;this.a.appendChild(this.c);return this};p.K=function(){Z.K(this);return this};p.update=function(a,b){B.prototype.update.call(this,a,b);this.G()};function Ib(){var a=Gb.S,b;for(b in a)if(a.hasOwnProperty(b))return!1;return!0};var Gb;function Hb(a){this.S={};for(var b=0,c=a.length;b<c;b++)if(null===a[b].service&&null===a[b].device){var d=void 0,e=JSON.parse(a[b].config);if(e.services)for(d in e.services)this.S[d]=e.services[d]}};var ub=function(){var a=[];return{Qa:function(b){for(var c=0,d=a.length;c<d;c++)if(-1!==a[c].names.indexOf(b))return a[c];return null},ib:function(b){var c=[];a.forEach(function(a){for(var d=0,f=a.names.length;d<f;d++)if(a.names[d].substr(0,b.length)===b){c.push(a);break}});return c},rb:function(b){b.U="client";b.exec=b.exec.bind(b);a.push(b)}}}();function Xb(){return new Promise(function(a,b){"geolocation"in window.navigator?navigator.geolocation.getCurrentPosition(function(c){c?a(c):b("denied")}):b("geolocation not available")})}
+va.push(function(){ub.rb({name:"/sherlock",names:["/sherlock","/sharelock"],usage:"",description:L.cb,exec:function(a,b){Xb().then(function(a){var c=a.coords.latitude,e=a.coords.longitude;Ob(b,"https://www.openstreetmap.org/?mlat="+c+"&mlon="+e+"&macc="+a.coords.accuracy+"#map=17/"+c+"/"+e)}).catch(function(a){console.error("Error: ",a)})}})});
 })();

+ 2 - 0
srv/public/style.css

@@ -56,6 +56,8 @@ button, .button { border: 1px solid black; border-radius: 3px; background: rgb(2
 .roominfo-user .roominfo-author, .roominfo-user .roominfo-usercount, .roominfo-user .roominfo-userlist { display: none; }
 .roominfo-pinlist { list-style: none; }
 .roominfo-pinlist-item:not(:first-child) { margin-top: 15px; }
+.roominfo-pinlist-item { position: relative; }
+.roominfo-pinlist-item .roominfo-unpin { position: absolute; top: 0; right: 0; height: 1.25em; width: 1.25em; background-image: url("pin.svg"); background-size: contain; background-repeat: no-repeat; background-position: center center; }
 
 @media screen and (max-width: 635px) {
     .chat-context-roominfo { position: static; width: 100%; display: block; color: white; }