From dcf985b3afc9cd6a23cdb5a76a263c2c48f80e8d Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 13 Feb 2015 12:46:54 +0300 Subject: [PATCH 01/12] Fixed URL regexp Closes #690 --- app/js/services.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/js/services.js b/app/js/services.js index 378ae342..8d3489eb 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -3552,7 +3552,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) // port number "(?::\\d{2,5})?" + // resource path - "(?:/[^\\s\\.\"\']*)?"; + "(?:/(?:\\S*[^\s.;,(){}<>\"'])?)?"; var regExp = new RegExp('(^|\\s)((?:https?://)?telegram\\.me/|@)([a-zA-Z\\d_]{5,32})|(' + urlRegex + ')|(\\n)|(' + emojiUtf.join('|') + ')|(^|\\s)(#[' + regexAlphaNumericChars + ']{2,20})', 'i'); From a101ce05adbed1795410d3cf9dcc4d8ccff0504b Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 13 Feb 2015 13:05:00 +0300 Subject: [PATCH 02/12] Added unread split for idle tab Closes #666 --- app/js/controllers.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/app/js/controllers.js b/app/js/controllers.js index c6ab1b83..01394586 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -952,10 +952,6 @@ angular.module('myApp.controllers', ['myApp.i18n']) } if (pos > -1) { history = $scope.peerHistories[pos]; - // if (pos) { - // $scope.peerHistories.splice(pos, 1); - // $scope.peerHistories.unshift(history); - // } return history; } history = {peerID: peerID, messages: []}; @@ -1389,7 +1385,8 @@ angular.module('myApp.controllers', ['myApp.i18n']) } // console.log('append', addedMessage); // console.trace(); - history.messages.push(AppMessagesManager.wrapForHistory(addedMessage.messageID)); + var historyMessage = AppMessagesManager.wrapForHistory(addedMessage.messageID); + history.messages.push(historyMessage); if (AppMessagesManager.regroupWrappedHistory(history.messages, -3)) { $scope.$broadcast('messages_regroup'); } @@ -1402,8 +1399,16 @@ angular.module('myApp.controllers', ['myApp.i18n']) $scope.$broadcast('messages_unread_after'); } - // console.log('append check', $rootScope.idle.isIDLE, addedMessage.peerID, $scope.curDialog.peerID); - if (!$rootScope.idle.isIDLE) { + // console.log('append check', $rootScope.idle.isIDLE, addedMessage.peerID, $scope.curDialog.peerID, historyMessage, history.messages[history.messages.length - 2]); + if ($rootScope.idle.isIDLE) { + if (historyMessage.unread && + !historyMessage.out && + !(history.messages[history.messages.length - 2] || {}).unread) { + + $scope.historyUnreadAfter = historyMessage.id; + $scope.$broadcast('messages_unread_after'); + } + } else { $timeout(function () { AppMessagesManager.readHistory($scope.curDialog.inputPeer); }); From 264c14c9f45849054121aebd9f51db7ae1c3409b Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 13 Feb 2015 14:54:53 +0300 Subject: [PATCH 03/12] Improved emoji regex Faster match emojis in big messages --- app/js/services.js | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/app/js/services.js b/app/js/services.js index 8d3489eb..e52b5b9c 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -3495,15 +3495,15 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) .service('RichTextProcessor', function ($sce, $sanitize) { - var emojiUtf = [], - emojiMap = {}, + var emojiMap = {}, emojiData = Config.Emoji, emojiIconSize = 18, emojiSupported = navigator.userAgent.search(/OS X|iPhone|iPad|iOS|Android/i) != -1, emojiCode; + var emojiRegex = '\\u0023\\u20E3|\\u00a9|\\u00ae|\\u203c|\\u2049|\\u2139|[\\u2194-\\u2199]|\\u21a9|\\u21aa|\\u231a|\\u231b|\\u23e9|[\\u23ea-\\u23ec]|\\u23f0|\\u24c2|\\u25aa|\\u25ab|\\u25b6|\\u2611|\\u2614|\\u26fd|\\u2705|\\u2709|[\\u2795-\\u2797]|\\u27a1|\\u27b0|\\u27bf|\\u2934|\\u2935|[\\u2b05-\\u2b07]|\\u2b1b|\\u2b1c|\\u2b50|\\u2b55|\\u3030|\\u303d|\\u3297|\\u3299|[\\uE000-\\uF8FF\\u270A-\\u2764\\u2122\\u25C0\\u25FB-\\u25FE\\u2615\\u263a\\u2648-\\u2653\\u2660-\\u2668\\u267B\\u267F\\u2693\\u261d\\u26A0-\\u26FA\\u2708\\u2702\\u2601\\u260E]|[\\u2600\\u26C4\\u26BE\\u23F3\\u2764]|\\uD83D[\\uDC00-\\uDFFF]|\\uD83C[\\uDDE8-\\uDDFA\uDDEC]\\uD83C[\\uDDEA-\\uDDFA\uDDE7]|[0-9]\\u20e3|\\uD83C[\\uDC00-\\uDFFF]'; + for (emojiCode in emojiData) { - emojiUtf.push(emojiData[emojiCode][0]); emojiMap[emojiData[emojiCode][0]] = emojiCode; } @@ -3554,7 +3554,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) // resource path "(?:/(?:\\S*[^\s.;,(){}<>\"'])?)?"; - var regExp = new RegExp('(^|\\s)((?:https?://)?telegram\\.me/|@)([a-zA-Z\\d_]{5,32})|(' + urlRegex + ')|(\\n)|(' + emojiUtf.join('|') + ')|(^|\\s)(#[' + regexAlphaNumericChars + ']{2,20})', 'i'); + var regExp = new RegExp('(^|\\s)((?:https?://)?telegram\\.me/|@)([a-zA-Z\\d_]{5,32})|(' + urlRegex + ')|(\\n)|(' + emojiRegex + ')|(^|\\s)(#[' + regexAlphaNumericChars + ']{2,20})', 'i'); var emailRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; var youtubeRegex = /^(?:https?:\/\/)?(?:www\.)?youtu(?:|\.be|be\.com|\.b)(?:\/v\/|\/watch\\?v=|e\/|(?:\/\??#)?\/watch(?:.+)v=)(.{11})(?:\&[^\s]*)?/; @@ -3593,8 +3593,6 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) options = options || {}; - text = text.replace(/\ufe0f/g, '', text); - var match, raw = text, html = [], @@ -3603,6 +3601,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) emojiTitle, emojiCoords; + // var start = tsNow(); + while ((match = raw.match(regExp))) { html.push(encodeEntities(raw.substr(0, match.index))); @@ -3700,11 +3700,17 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) html.push(encodeEntities(raw)); + // var timeDiff = tsNow() - start; + // if (timeDiff > 1) { + // console.log(dT(), 'wrap text', text.length, timeDiff); + // } + text = $sanitize(html.join('')); // console.log(3, text, html); if (emojiFound) { + text = text.replace(/\ufe0f/g, '', text); text = text.replace(//g, ''); } @@ -3887,6 +3893,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) var langNotificationsPluralize = _.pluralize('page_title_pluralize_notifications'); var titleBackup = document.title, + titleChanged = false, titlePromise; var prevFavicon; @@ -3897,6 +3904,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) if (!Config.Navigator.mobile) { $interval.cancel(titlePromise); if (!newVal) { + titleChanged = false; document.title = titleBackup; setFavicon(); } else { @@ -3905,9 +3913,13 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) titlePromise = $interval(function () { var time = tsNow(); if (!notificationsCount || time % 2000 > 1000) { - document.title = titleBackup; - setFavicon(); + if (titleChanged) { + titleChanged = false; + document.title = titleBackup; + setFavicon(); + } } else { + titleChanged = true; document.title = langNotificationsPluralize(notificationsCount); setFavicon('favicon_unread.ico'); } From a87ae200557312bb90eade8f1aeefd7b4b2f9524 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 13 Feb 2015 14:56:34 +0300 Subject: [PATCH 04/12] Fixed enter Closes #691 --- app/js/message_composer.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/js/message_composer.js b/app/js/message_composer.js index ff7ec906..9afa2252 100644 --- a/app/js/message_composer.js +++ b/app/js/message_composer.js @@ -501,6 +501,7 @@ MessageComposer.prototype.onKeyEvent = function (e) { } if (e.type == 'keydown') { + var checkSubmit = !this.autocompleteShown; if (this.autocompleteShown) { if (e.keyCode == 38 || e.keyCode == 40) { // UP / DOWN var next = e.keyCode == 40; @@ -524,18 +525,19 @@ MessageComposer.prototype.onKeyEvent = function (e) { } if (e.keyCode == 13) { // ENTER - var currentSelected = $(this.autoCompleteEl).find('.composer_emoji_option_active') || - $(this.autoCompleteEl).childNodes[0].find('a'); + var currentSelected = $(this.autoCompleteEl).find('.composer_emoji_option_active')/* || + $(this.autoCompleteEl).childNodes[0].find('a')*/; var code = currentSelected.attr('data-code'); if (code) { this.onEmojiSelected(code, true); EmojiHelper.pushPopularEmoji(code); + return cancelEvent(e); } - return cancelEvent(e); + checkSubmit = true; } } - else if (e.keyCode == 13) { + if (checkSubmit && e.keyCode == 13) { var submit = false; var sendOnEnter = true; if (this.getSendOnEnter && !this.getSendOnEnter()) { From 9830340ef86d910af9f799689d18d0a5f8b48612 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 13 Feb 2015 15:16:03 +0300 Subject: [PATCH 05/12] Fixed file paste in IE --- app/js/directives.js | 6 +++--- app/js/message_composer.js | 9 +++++++-- app/js/services.js | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/js/directives.js b/app/js/directives.js index 3ec69b13..264989bd 100755 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -1119,7 +1119,7 @@ angular.module('myApp.directives', ['myApp.filters']) return sendOnEnter; }, onMessageSubmit: onMessageSubmit, - onFilesPaste: onFilesPaste + onFilePaste: onFilePaste }); var richTextarea = composer.richTextareaEl[0]; @@ -1223,9 +1223,9 @@ angular.module('myApp.directives', ['myApp.filters']) }); } - function onFilesPaste (blobs) { + function onFilePaste (blob) { ErrorService.confirm({type: 'FILE_CLIPBOARD_PASTE'}).then(function () { - $scope.draftMessage.files = blobs; + $scope.draftMessage.files = [blob]; $scope.draftMessage.isMedia = true; }); }; diff --git a/app/js/message_composer.js b/app/js/message_composer.js index 9afa2252..b03b97c9 100644 --- a/app/js/message_composer.js +++ b/app/js/message_composer.js @@ -438,6 +438,7 @@ function MessageComposer (textarea, options) { this.onTyping = options.onTyping; this.onMessageSubmit = options.onMessageSubmit; this.getSendOnEnter = options.getSendOnEnter; + this.onFilePaste = options.onFilePaste; } MessageComposer.prototype.setUpInput = function () { @@ -673,7 +674,11 @@ MessageComposer.prototype.onRichPaste = function (e) { } } - var text = (e.originalEvent || e).clipboardData.getData('text/plain'); + try { + var text = cData.getData('text/plain'); + } catch (e) { + return true; + } setZeroTimeout(this.onChange.bind(this), 0); if (text.length) { document.execCommand('insertText', false, text); @@ -692,7 +697,7 @@ MessageComposer.prototype.onRichPasteNode = function (e) { var blob = dataUrlToBlob(src); this.onFilePaste(blob); setZeroTimeout(function () { - element.parentNode.removeChild(element); + element.parentNode.replaceChild(document.createTextNode('   '), element); }) } else if (src && !src.match(/img\/blank\.gif/)) { diff --git a/app/js/services.js b/app/js/services.js index e52b5b9c..acfe68fb 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -3710,7 +3710,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) // console.log(3, text, html); if (emojiFound) { - text = text.replace(/\ufe0f/g, '', text); + text = text.replace(/\ufe0f|️/g, '', text); text = text.replace(//g, ''); } From 5637238358987758d351ffc3ef1e4556b5770bcb Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 13 Feb 2015 15:56:18 +0300 Subject: [PATCH 06/12] Fixed peer photo jumps --- app/js/directives.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/js/directives.js b/app/js/directives.js index 264989bd..3a007c70 100755 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -2344,6 +2344,8 @@ angular.module('myApp.directives', ['myApp.filters']) } var updatePeerPhoto = function () { + var curJump = ++jump; + peerPhoto = peer.photo && angular.copy(peer.photo.photo_small); var hasPhoto = peerPhoto !== undefined; @@ -2362,7 +2364,6 @@ angular.module('myApp.directives', ['myApp.filters']) if (hasPhoto) { - var curJump = ++jump; MtpApiFileManager.downloadSmallFile(peer.photo.photo_small).then(function (blob) { if (curJump != jump) { From 2aed661086a65147c3a793555cc3583642ee4dd3 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 13 Feb 2015 17:12:07 +0300 Subject: [PATCH 07/12] Improved mobile experience --- app/css/mobile.css | 10 ++-- app/js/directives.js | 8 +++- app/js/message_composer.js | 95 ++++++++++++++++++++++++-------------- 3 files changed, 74 insertions(+), 39 deletions(-) diff --git a/app/css/mobile.css b/app/css/mobile.css index 1e84e566..a444c245 100644 --- a/app/css/mobile.css +++ b/app/css/mobile.css @@ -1165,13 +1165,17 @@ a.mobile_modal_action .tg_checkbox_label { .composer_emoji_tooltip { - margin-left: 10px; - margin-top: -175px; + margin-left: 6px; + margin-top: -170px; width: 262px; + z-index: 10000; } -.composer_emoji_tooltip .composer_emoji_tooltip_content { +.composer_emoji_tooltip .composer_emoji_tooltip_content_wrap { height: 106px; } +.composer_emoji_tooltip_tabs { + margin-bottom: 3px; +} .composer_emoji_tooltip .composer_emoji_tooltip_content .composer_emoji_btn { padding: 5px; } diff --git a/app/js/directives.js b/app/js/directives.js index 3a007c70..f9763bf4 100755 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -1204,7 +1204,9 @@ angular.module('myApp.directives', ['myApp.filters']) composer.setValue($scope.draftMessage.text || ''); updateHeight(); } - composer.focus(); + if (!Config.Navigator.touch) { + composer.focus(); + } }); var sendAwaiting = false; @@ -1214,7 +1216,9 @@ angular.module('myApp.directives', ['myApp.filters']) }); $scope.$on('ui_message_send', function () { sendAwaiting = false; - focusField(); + if (!Config.Navigator.touch) { + focusField(); + } }); function focusField () { diff --git a/app/js/message_composer.js b/app/js/message_composer.js index b03b97c9..7d80fc0a 100644 --- a/app/js/message_composer.js +++ b/app/js/message_composer.js @@ -139,26 +139,30 @@ function EmojiTooltip (btnEl, options) { this.onStickerSelected = options.onStickerSelected; this.getStickers = options.getStickers; - $(this.btnEl).on('mouseenter mouseleave', function (e) { - self.isOverBtn = e.type == 'mouseenter'; - self.createTooltip(); + if (!Config.Navigator.touch) { + $(this.btnEl).on('mouseenter mouseleave', function (e) { + self.isOverBtn = e.type == 'mouseenter'; + self.createTooltip(); - if (self.isOverBtn) { - self.onMouseEnter(true); - } else { - self.onMouseLeave(true); - } - }); + if (self.isOverBtn) { + self.onMouseEnter(true); + } else { + self.onMouseLeave(true); + } + }); + } $(this.btnEl).on('mousedown', function (e) { if (!self.shown) { clearTimeout(self.showTimeout); delete self.showTimeout; + self.createTooltip(); self.show(); } else { clearTimeout(self.hideTimeout); delete self.hideTimeout; self.hide(); } + return cancelEvent(e); }); } @@ -202,20 +206,23 @@ EmojiTooltip.prototype.createTooltip = function () { this.settingsEl = $('.composer_emoji_tooltip_settings', this.tooltip); angular.forEach(['recent', 'smile', 'flower', 'bell', 'car', 'grid', 'stickers'], function (tabName, tabIndex) { - $('') + var tab = $('') .on('mousedown', function (e) { self.selectTab(tabIndex); return cancelEvent(e); }) - .on('mouseenter mouseleave', function (e) { + .appendTo(self.tabsEl); + + if (!Config.Navigator.touch) { + tab.on('mouseenter mouseleave', function (e) { clearTimeout(self.selectTabTimeout); if (e.type == 'mouseenter') { self.selectTabTimeout = setTimeout(function () { self.selectTab(tabIndex); }, 300); } - }) - .appendTo(self.tabsEl); + }); + } }); if (!Config.Mobile) { @@ -238,20 +245,27 @@ EmojiTooltip.prototype.createTooltip = function () { if (self.onStickerSelected) { self.onStickerSelected(sticker); } + if (Config.Mobile) { + self.hide(); + } } return cancelEvent(e); }); - this.tooltipEl.on('mouseenter mouseleave', function (e) { - if (e.type == 'mouseenter') { - self.onMouseEnter(); - } else { - self.onMouseLeave(); - } - }); + if (!Config.Navigator.touch) { + this.tooltipEl.on('mouseenter mouseleave', function (e) { + if (e.type == 'mouseenter') { + self.onMouseEnter(); + } else { + self.onMouseLeave(); + } + }); + } this.selectTab(0); + $(window).on('resize', this.updatePosition.bind(this)); + return true; } @@ -473,19 +487,7 @@ MessageComposer.prototype.onKeyEvent = function (e) { if (e.type == 'keyup') { this.checkAutocomplete(); - if (this.onTyping) { - var now = tsNow(); - if (now - this.lastTyping > 5000) { - var length = (this.richTextareaEl ? this.richTextareaEl[0].textContent : this.textareaEl[0].value).length; - - if (length != this.lastLength) { - this.lastTyping = now; - this.lastLength = length; - this.onTyping(); - } - } - } - + var length = false; if (this.richTextareaEl) { clearTimeout(this.updateValueTO); var now = tsNow(); @@ -496,10 +498,30 @@ MessageComposer.prototype.onKeyEvent = function (e) { this.onChange(); } else { - this.updateValueTO = setTimeout(this.onChange.bind(this), 1000); + length = this.richTextareaEl[0].textContent.length; + if (this.wasEmpty != !length) { + this.wasEmpty = !this.wasEmpty; + this.onChange(); + } else { + this.updateValueTO = setTimeout(this.onChange.bind(this), 1000); + } } } + if (this.onTyping) { + var now = tsNow(); + if (now - this.lastTyping > 5000) { + if (length === false) { + length = (this.richTextareaEl ? this.richTextareaEl[0].textContent : this.textareaEl[0].value).length; + } + + if (length != this.lastLength) { + this.lastTyping = now; + this.lastLength = length; + this.onTyping(); + } + } + } } if (e.type == 'keydown') { var checkSubmit = !this.autocompleteShown; @@ -597,6 +619,9 @@ MessageComposer.prototype.restoreSelection = function () { MessageComposer.prototype.checkAutocomplete = function () { + if (Config.Mobile) { + return false; + } var pos, value; if (this.richTextareaEl) { var textarea = this.richTextareaEl[0]; @@ -815,6 +840,8 @@ MessageComposer.prototype.setValue = function (text) { if (this.richTextareaEl) { this.richTextareaEl.html(this.getRichHtml(text)); this.lastLength = text.length; + this.wasEmpty = !text.length; + this.onKeyEvent({type: 'keyup'}); } else { this.textareaEl.val(text); } From f2ce971d0b295b5c9b532c6fcf20a24294430ab9 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 13 Feb 2015 19:03:26 +0300 Subject: [PATCH 08/12] Correctly display single fwd sticker --- app/js/services.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/js/services.js b/app/js/services.js index acfe68fb..f176ba28 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -1967,6 +1967,15 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) } } + if (curMessage.fwd_from_id && + curMessage.media && + curMessage.media.document && + curMessage.media.document.sticker && + (curMessage.from_id != (prevMessage || {}).from_id || !(prevMessage || {}).fwd_from_id)) { + delete curMessage.fwd_from_id; + curMessage._ = 'message'; + } + if (prevMessage && curMessage.from_id == prevMessage.from_id && !prevMessage.fwd_from_id == !curMessage.fwd_from_id && From 6aabc78bf25a8851c47a1459dd4c27ab9e241160 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 13 Feb 2015 19:13:03 +0300 Subject: [PATCH 09/12] Fixed shortcuts for emoji recent --- app/js/message_composer.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/js/message_composer.js b/app/js/message_composer.js index 7d80fc0a..6573edf7 100644 --- a/app/js/message_composer.js +++ b/app/js/message_composer.js @@ -53,11 +53,13 @@ if (Array.isArray(shortcut)) { shortcut = shortcut[0]; } - if (shortcut.charAt(0) == ':') { - shortcut = shortcut.substr(1, shortcut.length - 2); - } - if (code = shortcuts[shortcut]) { - result.push({code: code, rate: 1}); + if (shortcut && typeof shortcut !== 'string') { + if (shortcut.charAt(0) == ':') { + shortcut = shortcut.substr(1, shortcut.length - 2); + } + if (code = shortcuts[shortcut]) { + result.push({code: code, rate: 1}); + } } } callback(result); From 942421321bdd805502bf46d4dadbb1d1b0df7558 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Fri, 13 Feb 2015 19:37:11 +0300 Subject: [PATCH 10/12] fixed typeof bug --- app/js/message_composer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/js/message_composer.js b/app/js/message_composer.js index 6573edf7..f7e716df 100644 --- a/app/js/message_composer.js +++ b/app/js/message_composer.js @@ -53,7 +53,7 @@ if (Array.isArray(shortcut)) { shortcut = shortcut[0]; } - if (shortcut && typeof shortcut !== 'string') { + if (shortcut && typeof shortcut === 'string') { if (shortcut.charAt(0) == ':') { shortcut = shortcut.substr(1, shortcut.length - 2); } From bc07a7602f60a69c954c2a6ce333fe27b954b83f Mon Sep 17 00:00:00 2001 From: Artem Fitiskin Date: Sat, 14 Feb 2015 02:22:17 +0300 Subject: [PATCH 11/12] Improved url parsing. Fix #457 --- app/js/lib/config.js | 13 +---- app/js/services.js | 113 ++++++++++++++++++++++++++++++--------- webogram.sublime-project | 4 +- 3 files changed, 91 insertions(+), 39 deletions(-) diff --git a/app/js/lib/config.js b/app/js/lib/config.js index fb953e52..2b569b79 100644 --- a/app/js/lib/config.js +++ b/app/js/lib/config.js @@ -82,8 +82,8 @@ Config.Schema = Config.Schema || {}; Config.Schema.MTProto = {"constructors":[{"id":"481674261","predicate":"vector","params":[],"type":"Vector t"},{"id":"85337187","predicate":"resPQ","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"pq","type":"bytes"},{"name":"server_public_key_fingerprints","type":"Vector"}],"type":"ResPQ"},{"id":"-2083955988","predicate":"p_q_inner_data","params":[{"name":"pq","type":"bytes"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce","type":"int256"}],"type":"P_Q_inner_data"},{"id":"2043348061","predicate":"server_DH_params_fail","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash","type":"int128"}],"type":"Server_DH_Params"},{"id":"-790100132","predicate":"server_DH_params_ok","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"encrypted_answer","type":"bytes"}],"type":"Server_DH_Params"},{"id":"-1249309254","predicate":"server_DH_inner_data","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"g","type":"int"},{"name":"dh_prime","type":"bytes"},{"name":"g_a","type":"bytes"},{"name":"server_time","type":"int"}],"type":"Server_DH_inner_data"},{"id":"1715713620","predicate":"client_DH_inner_data","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"retry_id","type":"long"},{"name":"g_b","type":"bytes"}],"type":"Client_DH_Inner_Data"},{"id":"1003222836","predicate":"dh_gen_ok","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash1","type":"int128"}],"type":"Set_client_DH_params_answer"},{"id":"1188831161","predicate":"dh_gen_retry","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash2","type":"int128"}],"type":"Set_client_DH_params_answer"},{"id":"-1499615742","predicate":"dh_gen_fail","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash3","type":"int128"}],"type":"Set_client_DH_params_answer"},{"id":"-212046591","predicate":"rpc_result","params":[{"name":"req_msg_id","type":"long"},{"name":"result","type":"Object"}],"type":"RpcResult"},{"id":"558156313","predicate":"rpc_error","params":[{"name":"error_code","type":"int"},{"name":"error_message","type":"string"}],"type":"RpcError"},{"id":"1579864942","predicate":"rpc_answer_unknown","params":[],"type":"RpcDropAnswer"},{"id":"-847714938","predicate":"rpc_answer_dropped_running","params":[],"type":"RpcDropAnswer"},{"id":"-1539647305","predicate":"rpc_answer_dropped","params":[{"name":"msg_id","type":"long"},{"name":"seq_no","type":"int"},{"name":"bytes","type":"int"}],"type":"RpcDropAnswer"},{"id":"155834844","predicate":"future_salt","params":[{"name":"valid_since","type":"int"},{"name":"valid_until","type":"int"},{"name":"salt","type":"long"}],"type":"FutureSalt"},{"id":"-1370486635","predicate":"future_salts","params":[{"name":"req_msg_id","type":"long"},{"name":"now","type":"int"},{"name":"salts","type":"vector"}],"type":"FutureSalts"},{"id":"880243653","predicate":"pong","params":[{"name":"msg_id","type":"long"},{"name":"ping_id","type":"long"}],"type":"Pong"},{"id":"-501201412","predicate":"destroy_session_ok","params":[{"name":"session_id","type":"long"}],"type":"DestroySessionRes"},{"id":"1658015945","predicate":"destroy_session_none","params":[{"name":"session_id","type":"long"}],"type":"DestroySessionRes"},{"id":"-1631450872","predicate":"new_session_created","params":[{"name":"first_msg_id","type":"long"},{"name":"unique_id","type":"long"},{"name":"server_salt","type":"long"}],"type":"NewSession"},{"id":"1945237724","predicate":"msg_container","params":[{"name":"messages","type":"vector<%Message>"}],"type":"MessageContainer"},{"id":"1538843921","predicate":"message","params":[{"name":"msg_id","type":"long"},{"name":"seqno","type":"int"},{"name":"bytes","type":"int"},{"name":"body","type":"Object"}],"type":"Message"},{"id":"-530561358","predicate":"msg_copy","params":[{"name":"orig_message","type":"Message"}],"type":"MessageCopy"},{"id":"812830625","predicate":"gzip_packed","params":[{"name":"packed_data","type":"bytes"}],"type":"Object"},{"id":"1658238041","predicate":"msgs_ack","params":[{"name":"msg_ids","type":"Vector"}],"type":"MsgsAck"},{"id":"-1477445615","predicate":"bad_msg_notification","params":[{"name":"bad_msg_id","type":"long"},{"name":"bad_msg_seqno","type":"int"},{"name":"error_code","type":"int"}],"type":"BadMsgNotification"},{"id":"-307542917","predicate":"bad_server_salt","params":[{"name":"bad_msg_id","type":"long"},{"name":"bad_msg_seqno","type":"int"},{"name":"error_code","type":"int"},{"name":"new_server_salt","type":"long"}],"type":"BadMsgNotification"},{"id":"2105940488","predicate":"msg_resend_req","params":[{"name":"msg_ids","type":"Vector"}],"type":"MsgResendReq"},{"id":"-630588590","predicate":"msgs_state_req","params":[{"name":"msg_ids","type":"Vector"}],"type":"MsgsStateReq"},{"id":"81704317","predicate":"msgs_state_info","params":[{"name":"req_msg_id","type":"long"},{"name":"info","type":"bytes"}],"type":"MsgsStateInfo"},{"id":"-1933520591","predicate":"msgs_all_info","params":[{"name":"msg_ids","type":"Vector"},{"name":"info","type":"bytes"}],"type":"MsgsAllInfo"},{"id":"661470918","predicate":"msg_detailed_info","params":[{"name":"msg_id","type":"long"},{"name":"answer_msg_id","type":"long"},{"name":"bytes","type":"int"},{"name":"status","type":"int"}],"type":"MsgDetailedInfo"},{"id":"-2137147681","predicate":"msg_new_detailed_info","params":[{"name":"answer_msg_id","type":"long"},{"name":"bytes","type":"int"},{"name":"status","type":"int"}],"type":"MsgDetailedInfo"}],"methods":[{"id":"1615239032","method":"req_pq","params":[{"name":"nonce","type":"int128"}],"type":"ResPQ"},{"id":"-686627650","method":"req_DH_params","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"public_key_fingerprint","type":"long"},{"name":"encrypted_data","type":"bytes"}],"type":"Server_DH_Params"},{"id":"-184262881","method":"set_client_DH_params","params":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"encrypted_data","type":"bytes"}],"type":"Set_client_DH_params_answer"},{"id":"1491380032","method":"rpc_drop_answer","params":[{"name":"req_msg_id","type":"long"}],"type":"RpcDropAnswer"},{"id":"-1188971260","method":"get_future_salts","params":[{"name":"num","type":"int"}],"type":"FutureSalts"},{"id":"2059302892","method":"ping","params":[{"name":"ping_id","type":"long"}],"type":"Pong"},{"id":"-213746804","method":"ping_delay_disconnect","params":[{"name":"ping_id","type":"long"},{"name":"disconnect_delay","type":"int"}],"type":"Pong"},{"id":"-414113498","method":"destroy_session","params":[{"name":"session_id","type":"long"}],"type":"DestroySessionRes"},{"id":"-1835453025","method":"http_wait","params":[{"name":"max_delay","type":"int"},{"name":"wait_after","type":"int"},{"name":"max_wait","type":"int"}],"type":"HttpWait"}]}; - - +// From https://github.com/stephenmathieson/node-tlds/blob/master/index.js +Config.TLD = ["abogado","ac","academy","accountants","active","actor","ad","adult","ae","aero","af","ag","agency","ai","airforce","al","allfinanz","alsace","am","amsterdam","an","android","ao","apartments","aq","aquarelle","ar","archi","army","arpa","as","asia","associates","at","attorney","au","auction","audio","autos","aw","ax","axa","az","ba","band","bank","bar","barclaycard","barclays","bargains","bayern","bb","bd","be","beer","berlin","best","bf","bg","bh","bi","bid","bike","bingo","bio","biz","bj","black","blackfriday","bloomberg","blue","bm","bmw","bn","bnpparibas","bo","boo","boutique","br","brussels","bs","bt","budapest","build","builders","business","buzz","bv","bw","by","bz","bzh","ca","cab","cal","camera","camp","cancerresearch","canon","capetown","capital","caravan","cards","care","career","careers","cartier","casa","cash","cat","catering","cc","cd","center","ceo","cern","cf","cg","ch","channel","chat","cheap","christmas","chrome","church","ci","citic","city","ck","cl","claims","cleaning","click","clinic","clothing","club","cm","cn","co","coach","codes","coffee","college","cologne","com","community","company","computer","condos","construction","consulting","contractors","cooking","cool","coop","country","cr","credit","creditcard","cricket","crs","cruises","cu","cuisinella","cv","cw","cx","cy","cymru","cz","dabur","dad","dance","dating","day","dclk","de","deals","degree","delivery","democrat","dental","dentist","desi","design","dev","diamonds","diet","digital","direct","directory","discount","dj","dk","dm","dnp","do","docs","domains","doosan","durban","dvag","dz","eat","ec","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","equipment","er","es","esq","estate","et","eu","eurovision","eus","events","everbank","exchange","expert","exposed","fail","farm","fashion","feedback","fi","finance","financial","firmdale","fish","fishing","fit","fitness","fj","fk","flights","florist","flowers","flsmidth","fly","fm","fo","foo","forsale","foundation","fr","frl","frogans","fund","furniture","futbol","ga","gal","gallery","garden","gb","gbiz","gd","ge","gent","gf","gg","ggee","gh","gi","gift","gifts","gives","gl","glass","gle","global","globo","gm","gmail","gmo","gmx","gn","goog","google","gop","gov","gp","gq","gr","graphics","gratis","green","gripe","gs","gt","gu","guide","guitars","guru","gw","gy","hamburg","hangout","haus","healthcare","help","here","hermes","hiphop","hiv","hk","hm","hn","holdings","holiday","homes","horse","host","hosting","house","how","hr","ht","hu","ibm","id","ie","ifm","il","im","immo","immobilien","in","industries","info","ing","ink","institute","insure","int","international","investments","io","iq","ir","irish","is","it","iwc","jcb","je","jetzt","jm","jo","jobs","joburg","jp","juegos","kaufen","kddi","ke","kg","kh","ki","kim","kitchen","kiwi","km","kn","koeln","kp","kr","krd","kred","kw","ky","kyoto","kz","la","lacaixa","land","lat","latrobe","lawyer","lb","lc","lds","lease","legal","lgbt","li","lidl","life","lighting","limited","limo","link","lk","loans","london","lotte","lotto","lr","ls","lt","ltda","lu","luxe","luxury","lv","ly","ma","madrid","maison","management","mango","market","marketing","marriott","mc","md","me","media","meet","melbourne","meme","memorial","menu","mg","mh","miami","mil","mini","mk","ml","mm","mn","mo","mobi","moda","moe","monash","money","mormon","mortgage","moscow","motorcycles","mov","mp","mq","mr","ms","mt","mu","museum","mv","mw","mx","my","mz","na","nagoya","name","navy","nc","ne","net","network","neustar","new","nexus","nf","ng","ngo","nhk","ni","nico","ninja","nl","no","np","nr","nra","nrw","ntt","nu","nyc","nz","okinawa","om","one","ong","onl","ooo","org","organic","osaka","otsuka","ovh","pa","paris","partners","parts","party","pe","pf","pg","ph","pharmacy","photo","photography","photos","physio","pics","pictures","pink","pizza","pk","pl","place","plumbing","pm","pn","pohl","poker","porn","post","pr","praxi","press","pro","prod","productions","prof","properties","property","ps","pt","pub","pw","py","qa","qpon","quebec","re","realtor","recipes","red","rehab","reise","reisen","reit","ren","rentals","repair","report","republican","rest","restaurant","reviews","rich","rio","rip","ro","rocks","rodeo","rs","rsvp","ru","ruhr","rw","ryukyu","sa","saarland","sale","samsung","sarl","saxo","sb","sc","sca","scb","schmidt","schule","schwarz","science","scot","sd","se","services","sew","sexy","sg","sh","shiksha","shoes","shriram","si","singles","sj","sk","sky","sl","sm","sn","so","social","software","sohu","solar","solutions","soy","space","spiegel","sr","st","style","su","supplies","supply","support","surf","surgery","suzuki","sv","sx","sy","sydney","systems","sz","taipei","tatar","tattoo","tax","tc","td","technology","tel","temasek","tennis","tf","tg","th","tienda","tips","tires","tirol","tj","tk","tl","tm","tn","to","today","tokyo","tools","top","toshiba","town","toys","tp","tr","trade","training","travel","trust","tt","tui","tv","tw","tz","ua","ug","uk","university","uno","uol","us","uy","uz","va","vacations","vc","ve","vegas","ventures","versicherung","vet","vg","vi","viajes","video","villas","vision","vlaanderen","vn","vodka","vote","voting","voto","voyage","vu","wales","wang","watch","webcam","website","wed","wedding","wf","whoswho","wien","wiki","williamhill","wme","work","works","world","ws","wtc","wtf","佛山","集团","在线","한국","ভারত","八卦","موقع","公益","公司","移动","我爱你","москва","қаз","онлайн","сайт","срб","淡马锡","орг","삼성","சிங்கப்பூர்","商标","商店","商城","дети","мкд","中文网","中信","中国","中國","谷歌","భారత్","ලංකා","ભારત","भारत","网店","संगठन","网络","укр","香港","台湾","台灣","手机","мон","الجزائر","عمان","ایران","امارات","بازار","الاردن","بھارت","المغرب","السعودية","مليسيا","شبكة","გე","机构","组织机构","ไทย","سورية","рус","рф","تونس","みんな","グーグル","世界","ਭਾਰਤ","网址","游戏","vermögensberater","vermögensberatung","企业","مصر","قطر","广东","இலங்கை","இந்தியா","新加坡","فلسطين","政务","xxx","xyz","yachts","yandex","ye","yoga","yokohama","youtube","yt","za","zip","zm","zone","zuerich","zw"]; Config.Schema.API = {"constructors":[{"id":"-1132882121","predicate":"boolFalse","params":[],"type":"Bool"},{"id":"-1720552011","predicate":"boolTrue","params":[],"type":"Bool"},{"id":"481674261","predicate":"vector","params":[],"type":"Vector t"},{"id":"-994444869","predicate":"error","params":[{"name":"code","type":"int"},{"name":"text","type":"string"}],"type":"Error"},{"id":"1450380236","predicate":"null","params":[],"type":"Null"},{"id":"2134579434","predicate":"inputPeerEmpty","params":[],"type":"InputPeer"},{"id":"2107670217","predicate":"inputPeerSelf","params":[],"type":"InputPeer"},{"id":"270785512","predicate":"inputPeerContact","params":[{"name":"user_id","type":"int"}],"type":"InputPeer"},{"id":"-1690012891","predicate":"inputPeerForeign","params":[{"name":"user_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputPeer"},{"id":"396093539","predicate":"inputPeerChat","params":[{"name":"chat_id","type":"int"}],"type":"InputPeer"},{"id":"-1182234929","predicate":"inputUserEmpty","params":[],"type":"InputUser"},{"id":"-138301121","predicate":"inputUserSelf","params":[],"type":"InputUser"},{"id":"-2031530139","predicate":"inputUserContact","params":[{"name":"user_id","type":"int"}],"type":"InputUser"},{"id":"1700689151","predicate":"inputUserForeign","params":[{"name":"user_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputUser"},{"id":"-208488460","predicate":"inputPhoneContact","params":[{"name":"client_id","type":"long"},{"name":"phone","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"}],"type":"InputContact"},{"id":"-181407105","predicate":"inputFile","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"name","type":"string"},{"name":"md5_checksum","type":"string"}],"type":"InputFile"},{"id":"-1771768449","predicate":"inputMediaEmpty","params":[],"type":"InputMedia"},{"id":"767900285","predicate":"inputMediaUploadedPhoto","params":[{"name":"file","type":"InputFile"}],"type":"InputMedia"},{"id":"-1893027092","predicate":"inputMediaPhoto","params":[{"name":"id","type":"InputPhoto"}],"type":"InputMedia"},{"id":"-104578748","predicate":"inputMediaGeoPoint","params":[{"name":"geo_point","type":"InputGeoPoint"}],"type":"InputMedia"},{"id":"-1494984313","predicate":"inputMediaContact","params":[{"name":"phone_number","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"}],"type":"InputMedia"},{"id":"322623222","predicate":"inputMediaUploadedVideo","params":[{"name":"file","type":"InputFile"},{"name":"duration","type":"int"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"mime_type","type":"string"}],"type":"InputMedia"},{"id":"-1726817601","predicate":"inputMediaUploadedThumbVideo","params":[{"name":"file","type":"InputFile"},{"name":"thumb","type":"InputFile"},{"name":"duration","type":"int"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"mime_type","type":"string"}],"type":"InputMedia"},{"id":"2130852582","predicate":"inputMediaVideo","params":[{"name":"id","type":"InputVideo"}],"type":"InputMedia"},{"id":"480546647","predicate":"inputChatPhotoEmpty","params":[],"type":"InputChatPhoto"},{"id":"-1809496270","predicate":"inputChatUploadedPhoto","params":[{"name":"file","type":"InputFile"},{"name":"crop","type":"InputPhotoCrop"}],"type":"InputChatPhoto"},{"id":"-1293828344","predicate":"inputChatPhoto","params":[{"name":"id","type":"InputPhoto"},{"name":"crop","type":"InputPhotoCrop"}],"type":"InputChatPhoto"},{"id":"-457104426","predicate":"inputGeoPointEmpty","params":[],"type":"InputGeoPoint"},{"id":"-206066487","predicate":"inputGeoPoint","params":[{"name":"lat","type":"double"},{"name":"long","type":"double"}],"type":"InputGeoPoint"},{"id":"483901197","predicate":"inputPhotoEmpty","params":[],"type":"InputPhoto"},{"id":"-74070332","predicate":"inputPhoto","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputPhoto"},{"id":"1426648181","predicate":"inputVideoEmpty","params":[],"type":"InputVideo"},{"id":"-296249774","predicate":"inputVideo","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputVideo"},{"id":"342061462","predicate":"inputFileLocation","params":[{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"},{"name":"secret","type":"long"}],"type":"InputFileLocation"},{"id":"1023632620","predicate":"inputVideoFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputFileLocation"},{"id":"-1377390588","predicate":"inputPhotoCropAuto","params":[],"type":"InputPhotoCrop"},{"id":"-644787419","predicate":"inputPhotoCrop","params":[{"name":"crop_left","type":"double"},{"name":"crop_top","type":"double"},{"name":"crop_width","type":"double"}],"type":"InputPhotoCrop"},{"id":"1996904104","predicate":"inputAppEvent","params":[{"name":"time","type":"double"},{"name":"type","type":"string"},{"name":"peer","type":"long"},{"name":"data","type":"string"}],"type":"InputAppEvent"},{"id":"-1649296275","predicate":"peerUser","params":[{"name":"user_id","type":"int"}],"type":"Peer"},{"id":"-1160714821","predicate":"peerChat","params":[{"name":"chat_id","type":"int"}],"type":"Peer"},{"id":"-1432995067","predicate":"storage.fileUnknown","params":[],"type":"storage.FileType"},{"id":"8322574","predicate":"storage.fileJpeg","params":[],"type":"storage.FileType"},{"id":"-891180321","predicate":"storage.fileGif","params":[],"type":"storage.FileType"},{"id":"172975040","predicate":"storage.filePng","params":[],"type":"storage.FileType"},{"id":"-1373745011","predicate":"storage.filePdf","params":[],"type":"storage.FileType"},{"id":"1384777335","predicate":"storage.fileMp3","params":[],"type":"storage.FileType"},{"id":"1258941372","predicate":"storage.fileMov","params":[],"type":"storage.FileType"},{"id":"1086091090","predicate":"storage.filePartial","params":[],"type":"storage.FileType"},{"id":"-1278304028","predicate":"storage.fileMp4","params":[],"type":"storage.FileType"},{"id":"276907596","predicate":"storage.fileWebp","params":[],"type":"storage.FileType"},{"id":"2086234950","predicate":"fileLocationUnavailable","params":[{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"},{"name":"secret","type":"long"}],"type":"FileLocation"},{"id":"1406570614","predicate":"fileLocation","params":[{"name":"dc_id","type":"int"},{"name":"volume_id","type":"long"},{"name":"local_id","type":"int"},{"name":"secret","type":"long"}],"type":"FileLocation"},{"id":"537022650","predicate":"userEmpty","params":[{"name":"id","type":"int"}],"type":"User"},{"id":"1879553105","predicate":"userSelf","params":[{"name":"id","type":"int"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"username","type":"string"},{"name":"phone","type":"string"},{"name":"photo","type":"UserProfilePhoto"},{"name":"status","type":"UserStatus"},{"name":"inactive","type":"Bool"}],"type":"User"},{"id":"-894214632","predicate":"userContact","params":[{"name":"id","type":"int"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"username","type":"string"},{"name":"access_hash","type":"long"},{"name":"phone","type":"string"},{"name":"photo","type":"UserProfilePhoto"},{"name":"status","type":"UserStatus"}],"type":"User"},{"id":"-640891665","predicate":"userRequest","params":[{"name":"id","type":"int"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"username","type":"string"},{"name":"access_hash","type":"long"},{"name":"phone","type":"string"},{"name":"photo","type":"UserProfilePhoto"},{"name":"status","type":"UserStatus"}],"type":"User"},{"id":"123533224","predicate":"userForeign","params":[{"name":"id","type":"int"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"username","type":"string"},{"name":"access_hash","type":"long"},{"name":"photo","type":"UserProfilePhoto"},{"name":"status","type":"UserStatus"}],"type":"User"},{"id":"-704549510","predicate":"userDeleted","params":[{"name":"id","type":"int"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"username","type":"string"}],"type":"User"},{"id":"1326562017","predicate":"userProfilePhotoEmpty","params":[],"type":"UserProfilePhoto"},{"id":"-715532088","predicate":"userProfilePhoto","params":[{"name":"photo_id","type":"long"},{"name":"photo_small","type":"FileLocation"},{"name":"photo_big","type":"FileLocation"}],"type":"UserProfilePhoto"},{"id":"164646985","predicate":"userStatusEmpty","params":[],"type":"UserStatus"},{"id":"-306628279","predicate":"userStatusOnline","params":[{"name":"expires","type":"int"}],"type":"UserStatus"},{"id":"9203775","predicate":"userStatusOffline","params":[{"name":"was_online","type":"int"}],"type":"UserStatus"},{"id":"-1683826688","predicate":"chatEmpty","params":[{"name":"id","type":"int"}],"type":"Chat"},{"id":"1855757255","predicate":"chat","params":[{"name":"id","type":"int"},{"name":"title","type":"string"},{"name":"photo","type":"ChatPhoto"},{"name":"participants_count","type":"int"},{"name":"date","type":"int"},{"name":"left","type":"Bool"},{"name":"version","type":"int"}],"type":"Chat"},{"id":"-83047359","predicate":"chatForbidden","params":[{"name":"id","type":"int"},{"name":"title","type":"string"},{"name":"date","type":"int"}],"type":"Chat"},{"id":"1661886910","predicate":"chatFull","params":[{"name":"id","type":"int"},{"name":"participants","type":"ChatParticipants"},{"name":"chat_photo","type":"Photo"},{"name":"notify_settings","type":"PeerNotifySettings"}],"type":"ChatFull"},{"id":"-925415106","predicate":"chatParticipant","params":[{"name":"user_id","type":"int"},{"name":"inviter_id","type":"int"},{"name":"date","type":"int"}],"type":"ChatParticipant"},{"id":"265468810","predicate":"chatParticipantsForbidden","params":[{"name":"chat_id","type":"int"}],"type":"ChatParticipants"},{"id":"2017571861","predicate":"chatParticipants","params":[{"name":"chat_id","type":"int"},{"name":"admin_id","type":"int"},{"name":"participants","type":"Vector"},{"name":"version","type":"int"}],"type":"ChatParticipants"},{"id":"935395612","predicate":"chatPhotoEmpty","params":[],"type":"ChatPhoto"},{"id":"1632839530","predicate":"chatPhoto","params":[{"name":"photo_small","type":"FileLocation"},{"name":"photo_big","type":"FileLocation"}],"type":"ChatPhoto"},{"id":"-2082087340","predicate":"messageEmpty","params":[{"name":"id","type":"int"}],"type":"Message"},{"id":"1450613171","predicate":"message","params":[{"name":"flags","type":"int"},{"name":"id","type":"int"},{"name":"from_id","type":"int"},{"name":"to_id","type":"Peer"},{"name":"date","type":"int"},{"name":"message","type":"string"},{"name":"media","type":"MessageMedia"}],"type":"Message"},{"id":"-1553471722","predicate":"messageForwarded","params":[{"name":"flags","type":"int"},{"name":"id","type":"int"},{"name":"fwd_from_id","type":"int"},{"name":"fwd_date","type":"int"},{"name":"from_id","type":"int"},{"name":"to_id","type":"Peer"},{"name":"date","type":"int"},{"name":"message","type":"string"},{"name":"media","type":"MessageMedia"}],"type":"Message"},{"id":"495384334","predicate":"messageService","params":[{"name":"flags","type":"int"},{"name":"id","type":"int"},{"name":"from_id","type":"int"},{"name":"to_id","type":"Peer"},{"name":"date","type":"int"},{"name":"action","type":"MessageAction"}],"type":"Message"},{"id":"1038967584","predicate":"messageMediaEmpty","params":[],"type":"MessageMedia"},{"id":"-926655958","predicate":"messageMediaPhoto","params":[{"name":"photo","type":"Photo"}],"type":"MessageMedia"},{"id":"-1563278704","predicate":"messageMediaVideo","params":[{"name":"video","type":"Video"}],"type":"MessageMedia"},{"id":"1457575028","predicate":"messageMediaGeo","params":[{"name":"geo","type":"GeoPoint"}],"type":"MessageMedia"},{"id":"1585262393","predicate":"messageMediaContact","params":[{"name":"phone_number","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"user_id","type":"int"}],"type":"MessageMedia"},{"id":"694364726","predicate":"messageMediaUnsupported","params":[{"name":"bytes","type":"bytes"}],"type":"MessageMedia"},{"id":"-1230047312","predicate":"messageActionEmpty","params":[],"type":"MessageAction"},{"id":"-1503425638","predicate":"messageActionChatCreate","params":[{"name":"title","type":"string"},{"name":"users","type":"Vector"}],"type":"MessageAction"},{"id":"-1247687078","predicate":"messageActionChatEditTitle","params":[{"name":"title","type":"string"}],"type":"MessageAction"},{"id":"2144015272","predicate":"messageActionChatEditPhoto","params":[{"name":"photo","type":"Photo"}],"type":"MessageAction"},{"id":"-1780220945","predicate":"messageActionChatDeletePhoto","params":[],"type":"MessageAction"},{"id":"1581055051","predicate":"messageActionChatAddUser","params":[{"name":"user_id","type":"int"}],"type":"MessageAction"},{"id":"-1297179892","predicate":"messageActionChatDeleteUser","params":[{"name":"user_id","type":"int"}],"type":"MessageAction"},{"id":"-1422222932","predicate":"dialog","params":[{"name":"peer","type":"Peer"},{"name":"top_message","type":"int"},{"name":"unread_count","type":"int"},{"name":"notify_settings","type":"PeerNotifySettings"}],"type":"Dialog"},{"id":"590459437","predicate":"photoEmpty","params":[{"name":"id","type":"long"}],"type":"Photo"},{"id":"582313809","predicate":"photo","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"user_id","type":"int"},{"name":"date","type":"int"},{"name":"caption","type":"string"},{"name":"geo","type":"GeoPoint"},{"name":"sizes","type":"Vector"}],"type":"Photo"},{"id":"236446268","predicate":"photoSizeEmpty","params":[{"name":"type","type":"string"}],"type":"PhotoSize"},{"id":"2009052699","predicate":"photoSize","params":[{"name":"type","type":"string"},{"name":"location","type":"FileLocation"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"size","type":"int"}],"type":"PhotoSize"},{"id":"-374917894","predicate":"photoCachedSize","params":[{"name":"type","type":"string"},{"name":"location","type":"FileLocation"},{"name":"w","type":"int"},{"name":"h","type":"int"},{"name":"bytes","type":"bytes"}],"type":"PhotoSize"},{"id":"-1056548696","predicate":"videoEmpty","params":[{"name":"id","type":"long"}],"type":"Video"},{"id":"948937617","predicate":"video","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"user_id","type":"int"},{"name":"date","type":"int"},{"name":"caption","type":"string"},{"name":"duration","type":"int"},{"name":"mime_type","type":"string"},{"name":"size","type":"int"},{"name":"thumb","type":"PhotoSize"},{"name":"dc_id","type":"int"},{"name":"w","type":"int"},{"name":"h","type":"int"}],"type":"Video"},{"id":"286776671","predicate":"geoPointEmpty","params":[],"type":"GeoPoint"},{"id":"541710092","predicate":"geoPoint","params":[{"name":"long","type":"double"},{"name":"lat","type":"double"}],"type":"GeoPoint"},{"id":"-486486981","predicate":"auth.checkedPhone","params":[{"name":"phone_registered","type":"Bool"},{"name":"phone_invited","type":"Bool"}],"type":"auth.CheckedPhone"},{"id":"-269659687","predicate":"auth.sentCode","params":[{"name":"phone_registered","type":"Bool"},{"name":"phone_code_hash","type":"string"},{"name":"send_call_timeout","type":"int"},{"name":"is_password","type":"Bool"}],"type":"auth.SentCode"},{"id":"-155815004","predicate":"auth.authorization","params":[{"name":"expires","type":"int"},{"name":"user","type":"User"}],"type":"auth.Authorization"},{"id":"-543777747","predicate":"auth.exportedAuthorization","params":[{"name":"id","type":"int"},{"name":"bytes","type":"bytes"}],"type":"auth.ExportedAuthorization"},{"id":"-1195615476","predicate":"inputNotifyPeer","params":[{"name":"peer","type":"InputPeer"}],"type":"InputNotifyPeer"},{"id":"423314455","predicate":"inputNotifyUsers","params":[],"type":"InputNotifyPeer"},{"id":"1251338318","predicate":"inputNotifyChats","params":[],"type":"InputNotifyPeer"},{"id":"-1540769658","predicate":"inputNotifyAll","params":[],"type":"InputNotifyPeer"},{"id":"-265263912","predicate":"inputPeerNotifyEventsEmpty","params":[],"type":"InputPeerNotifyEvents"},{"id":"-395694988","predicate":"inputPeerNotifyEventsAll","params":[],"type":"InputPeerNotifyEvents"},{"id":"1185074840","predicate":"inputPeerNotifySettings","params":[{"name":"mute_until","type":"int"},{"name":"sound","type":"string"},{"name":"show_previews","type":"Bool"},{"name":"events_mask","type":"int"}],"type":"InputPeerNotifySettings"},{"id":"-1378534221","predicate":"peerNotifyEventsEmpty","params":[],"type":"PeerNotifyEvents"},{"id":"1830677896","predicate":"peerNotifyEventsAll","params":[],"type":"PeerNotifyEvents"},{"id":"1889961234","predicate":"peerNotifySettingsEmpty","params":[],"type":"PeerNotifySettings"},{"id":"-1923214866","predicate":"peerNotifySettings","params":[{"name":"mute_until","type":"int"},{"name":"sound","type":"string"},{"name":"show_previews","type":"Bool"},{"name":"events_mask","type":"int"}],"type":"PeerNotifySettings"},{"id":"-860866985","predicate":"wallPaper","params":[{"name":"id","type":"int"},{"name":"title","type":"string"},{"name":"sizes","type":"Vector"},{"name":"color","type":"int"}],"type":"WallPaper"},{"id":"1997575642","predicate":"userFull","params":[{"name":"user","type":"User"},{"name":"link","type":"contacts.Link"},{"name":"profile_photo","type":"Photo"},{"name":"notify_settings","type":"PeerNotifySettings"},{"name":"blocked","type":"Bool"},{"name":"real_first_name","type":"string"},{"name":"real_last_name","type":"string"}],"type":"UserFull"},{"id":"-116274796","predicate":"contact","params":[{"name":"user_id","type":"int"},{"name":"mutual","type":"Bool"}],"type":"Contact"},{"id":"-805141448","predicate":"importedContact","params":[{"name":"user_id","type":"int"},{"name":"client_id","type":"long"}],"type":"ImportedContact"},{"id":"1444661369","predicate":"contactBlocked","params":[{"name":"user_id","type":"int"},{"name":"date","type":"int"}],"type":"ContactBlocked"},{"id":"1038193057","predicate":"contactSuggested","params":[{"name":"user_id","type":"int"},{"name":"mutual_contacts","type":"int"}],"type":"ContactSuggested"},{"id":"-748155807","predicate":"contactStatus","params":[{"name":"user_id","type":"int"},{"name":"status","type":"UserStatus"}],"type":"ContactStatus"},{"id":"909233996","predicate":"chatLocated","params":[{"name":"chat_id","type":"int"},{"name":"distance","type":"int"}],"type":"ChatLocated"},{"id":"322183672","predicate":"contacts.foreignLinkUnknown","params":[],"type":"contacts.ForeignLink"},{"id":"-1484775609","predicate":"contacts.foreignLinkRequested","params":[{"name":"has_phone","type":"Bool"}],"type":"contacts.ForeignLink"},{"id":"468356321","predicate":"contacts.foreignLinkMutual","params":[],"type":"contacts.ForeignLink"},{"id":"-768992160","predicate":"contacts.myLinkEmpty","params":[],"type":"contacts.MyLink"},{"id":"1818882030","predicate":"contacts.myLinkRequested","params":[{"name":"contact","type":"Bool"}],"type":"contacts.MyLink"},{"id":"-1035932711","predicate":"contacts.myLinkContact","params":[],"type":"contacts.MyLink"},{"id":"-322001931","predicate":"contacts.link","params":[{"name":"my_link","type":"contacts.MyLink"},{"name":"foreign_link","type":"contacts.ForeignLink"},{"name":"user","type":"User"}],"type":"contacts.Link"},{"id":"-1219778094","predicate":"contacts.contactsNotModified","params":[],"type":"contacts.Contacts"},{"id":"1871416498","predicate":"contacts.contacts","params":[{"name":"contacts","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Contacts"},{"id":"-1387117803","predicate":"contacts.importedContacts","params":[{"name":"imported","type":"Vector"},{"name":"retry_contacts","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.ImportedContacts"},{"id":"471043349","predicate":"contacts.blocked","params":[{"name":"blocked","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Blocked"},{"id":"-1878523231","predicate":"contacts.blockedSlice","params":[{"name":"count","type":"int"},{"name":"blocked","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Blocked"},{"id":"1447681221","predicate":"contacts.suggested","params":[{"name":"results","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Suggested"},{"id":"364538944","predicate":"messages.dialogs","params":[{"name":"dialogs","type":"Vector"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Dialogs"},{"id":"1910543603","predicate":"messages.dialogsSlice","params":[{"name":"count","type":"int"},{"name":"dialogs","type":"Vector"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Dialogs"},{"id":"-1938715001","predicate":"messages.messages","params":[{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Messages"},{"id":"189033187","predicate":"messages.messagesSlice","params":[{"name":"count","type":"int"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Messages"},{"id":"1062078024","predicate":"messages.messageEmpty","params":[],"type":"messages.Message"},{"id":"-7289833","predicate":"messages.message","params":[{"name":"message","type":"Message"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Message"},{"id":"-1768654661","predicate":"messages.statedMessages","params":[{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"},{"name":"pts","type":"int"},{"name":"seq","type":"int"}],"type":"messages.StatedMessages"},{"id":"-797251802","predicate":"messages.statedMessage","params":[{"name":"message","type":"Message"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"},{"name":"pts","type":"int"},{"name":"seq","type":"int"}],"type":"messages.StatedMessage"},{"id":"-772484260","predicate":"messages.sentMessage","params":[{"name":"id","type":"int"},{"name":"date","type":"int"},{"name":"pts","type":"int"},{"name":"seq","type":"int"}],"type":"messages.SentMessage"},{"id":"-2125411368","predicate":"messages.chats","params":[{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.Chats"},{"id":"-438840932","predicate":"messages.chatFull","params":[{"name":"full_chat","type":"ChatFull"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"messages.ChatFull"},{"id":"-1210173710","predicate":"messages.affectedHistory","params":[{"name":"pts","type":"int"},{"name":"seq","type":"int"},{"name":"offset","type":"int"}],"type":"messages.AffectedHistory"},{"id":"1474492012","predicate":"inputMessagesFilterEmpty","params":[],"type":"MessagesFilter"},{"id":"-1777752804","predicate":"inputMessagesFilterPhotos","params":[],"type":"MessagesFilter"},{"id":"-1614803355","predicate":"inputMessagesFilterVideo","params":[],"type":"MessagesFilter"},{"id":"1458172132","predicate":"inputMessagesFilterPhotoVideo","params":[],"type":"MessagesFilter"},{"id":"-648121413","predicate":"inputMessagesFilterPhotoVideoDocuments","params":[],"type":"MessagesFilter"},{"id":"-1629621880","predicate":"inputMessagesFilterDocument","params":[],"type":"MessagesFilter"},{"id":"-808946398","predicate":"inputMessagesFilterAudio","params":[],"type":"MessagesFilter"},{"id":"20626867","predicate":"updateNewMessage","params":[{"name":"message","type":"Message"},{"name":"pts","type":"int"}],"type":"Update"},{"id":"1318109142","predicate":"updateMessageID","params":[{"name":"id","type":"int"},{"name":"random_id","type":"long"}],"type":"Update"},{"id":"-966484431","predicate":"updateReadMessages","params":[{"name":"messages","type":"Vector"},{"name":"pts","type":"int"}],"type":"Update"},{"id":"-1456734682","predicate":"updateDeleteMessages","params":[{"name":"messages","type":"Vector"},{"name":"pts","type":"int"}],"type":"Update"},{"id":"1548249383","predicate":"updateUserTyping","params":[{"name":"user_id","type":"int"},{"name":"action","type":"SendMessageAction"}],"type":"Update"},{"id":"-1704596961","predicate":"updateChatUserTyping","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"int"},{"name":"action","type":"SendMessageAction"}],"type":"Update"},{"id":"125178264","predicate":"updateChatParticipants","params":[{"name":"participants","type":"ChatParticipants"}],"type":"Update"},{"id":"469489699","predicate":"updateUserStatus","params":[{"name":"user_id","type":"int"},{"name":"status","type":"UserStatus"}],"type":"Update"},{"id":"-1489818765","predicate":"updateUserName","params":[{"name":"user_id","type":"int"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"},{"name":"username","type":"string"}],"type":"Update"},{"id":"-1791935732","predicate":"updateUserPhoto","params":[{"name":"user_id","type":"int"},{"name":"date","type":"int"},{"name":"photo","type":"UserProfilePhoto"},{"name":"previous","type":"Bool"}],"type":"Update"},{"id":"628472761","predicate":"updateContactRegistered","params":[{"name":"user_id","type":"int"},{"name":"date","type":"int"}],"type":"Update"},{"id":"1369737882","predicate":"updateContactLink","params":[{"name":"user_id","type":"int"},{"name":"my_link","type":"contacts.MyLink"},{"name":"foreign_link","type":"contacts.ForeignLink"}],"type":"Update"},{"id":"-1895411046","predicate":"updateNewAuthorization","params":[{"name":"auth_key_id","type":"long"},{"name":"date","type":"int"},{"name":"device","type":"string"},{"name":"location","type":"string"}],"type":"Update"},{"id":"-1519637954","predicate":"updates.state","params":[{"name":"pts","type":"int"},{"name":"qts","type":"int"},{"name":"date","type":"int"},{"name":"seq","type":"int"},{"name":"unread_count","type":"int"}],"type":"updates.State"},{"id":"1567990072","predicate":"updates.differenceEmpty","params":[{"name":"date","type":"int"},{"name":"seq","type":"int"}],"type":"updates.Difference"},{"id":"16030880","predicate":"updates.difference","params":[{"name":"new_messages","type":"Vector"},{"name":"new_encrypted_messages","type":"Vector"},{"name":"other_updates","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"},{"name":"state","type":"updates.State"}],"type":"updates.Difference"},{"id":"-1459938943","predicate":"updates.differenceSlice","params":[{"name":"new_messages","type":"Vector"},{"name":"new_encrypted_messages","type":"Vector"},{"name":"other_updates","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"},{"name":"intermediate_state","type":"updates.State"}],"type":"updates.Difference"},{"id":"-484987010","predicate":"updatesTooLong","params":[],"type":"Updates"},{"id":"-738961532","predicate":"updateShortMessage","params":[{"name":"id","type":"int"},{"name":"from_id","type":"int"},{"name":"message","type":"string"},{"name":"pts","type":"int"},{"name":"date","type":"int"},{"name":"seq","type":"int"}],"type":"Updates"},{"id":"724548942","predicate":"updateShortChatMessage","params":[{"name":"id","type":"int"},{"name":"from_id","type":"int"},{"name":"chat_id","type":"int"},{"name":"message","type":"string"},{"name":"pts","type":"int"},{"name":"date","type":"int"},{"name":"seq","type":"int"}],"type":"Updates"},{"id":"2027216577","predicate":"updateShort","params":[{"name":"update","type":"Update"},{"name":"date","type":"int"}],"type":"Updates"},{"id":"1918567619","predicate":"updatesCombined","params":[{"name":"updates","type":"Vector"},{"name":"users","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"date","type":"int"},{"name":"seq_start","type":"int"},{"name":"seq","type":"int"}],"type":"Updates"},{"id":"1957577280","predicate":"updates","params":[{"name":"updates","type":"Vector"},{"name":"users","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"date","type":"int"},{"name":"seq","type":"int"}],"type":"Updates"},{"id":"-1916114267","predicate":"photos.photos","params":[{"name":"photos","type":"Vector"},{"name":"users","type":"Vector"}],"type":"photos.Photos"},{"id":"352657236","predicate":"photos.photosSlice","params":[{"name":"count","type":"int"},{"name":"photos","type":"Vector"},{"name":"users","type":"Vector"}],"type":"photos.Photos"},{"id":"539045032","predicate":"photos.photo","params":[{"name":"photo","type":"Photo"},{"name":"users","type":"Vector"}],"type":"photos.Photo"},{"id":"157948117","predicate":"upload.file","params":[{"name":"type","type":"storage.FileType"},{"name":"mtime","type":"int"},{"name":"bytes","type":"bytes"}],"type":"upload.File"},{"id":"784507964","predicate":"dcOption","params":[{"name":"id","type":"int"},{"name":"hostname","type":"string"},{"name":"ip_address","type":"string"},{"name":"port","type":"int"}],"type":"DcOption"},{"id":"777313652","predicate":"config","params":[{"name":"date","type":"int"},{"name":"test_mode","type":"Bool"},{"name":"this_dc","type":"int"},{"name":"dc_options","type":"Vector"},{"name":"chat_size_max","type":"int"},{"name":"broadcast_size_max","type":"int"}],"type":"Config"},{"id":"-1910892683","predicate":"nearestDc","params":[{"name":"country","type":"string"},{"name":"this_dc","type":"int"},{"name":"nearest_dc","type":"int"}],"type":"NearestDc"},{"id":"-1987579119","predicate":"help.appUpdate","params":[{"name":"id","type":"int"},{"name":"critical","type":"Bool"},{"name":"url","type":"string"},{"name":"text","type":"string"}],"type":"help.AppUpdate"},{"id":"-1000708810","predicate":"help.noAppUpdate","params":[],"type":"help.AppUpdate"},{"id":"415997816","predicate":"help.inviteText","params":[{"name":"message","type":"string"}],"type":"help.InviteText"},{"id":"1047852486","predicate":"messages.statedMessagesLinks","params":[{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"},{"name":"links","type":"Vector"},{"name":"pts","type":"int"},{"name":"seq","type":"int"}],"type":"messages.StatedMessages"},{"id":"-1448138623","predicate":"messages.statedMessageLink","params":[{"name":"message","type":"Message"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"},{"name":"links","type":"Vector"},{"name":"pts","type":"int"},{"name":"seq","type":"int"}],"type":"messages.StatedMessage"},{"id":"-371504577","predicate":"messages.sentMessageLink","params":[{"name":"id","type":"int"},{"name":"date","type":"int"},{"name":"pts","type":"int"},{"name":"seq","type":"int"},{"name":"links","type":"Vector"}],"type":"messages.SentMessage"},{"id":"1960072954","predicate":"inputGeoChat","params":[{"name":"chat_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputGeoChat"},{"id":"1301143240","predicate":"inputNotifyGeoChatPeer","params":[{"name":"peer","type":"InputGeoChat"}],"type":"InputNotifyPeer"},{"id":"1978329690","predicate":"geoChat","params":[{"name":"id","type":"int"},{"name":"access_hash","type":"long"},{"name":"title","type":"string"},{"name":"address","type":"string"},{"name":"venue","type":"string"},{"name":"geo","type":"GeoPoint"},{"name":"photo","type":"ChatPhoto"},{"name":"participants_count","type":"int"},{"name":"date","type":"int"},{"name":"checked_in","type":"Bool"},{"name":"version","type":"int"}],"type":"Chat"},{"id":"1613830811","predicate":"geoChatMessageEmpty","params":[{"name":"chat_id","type":"int"},{"name":"id","type":"int"}],"type":"GeoChatMessage"},{"id":"1158019297","predicate":"geoChatMessage","params":[{"name":"chat_id","type":"int"},{"name":"id","type":"int"},{"name":"from_id","type":"int"},{"name":"date","type":"int"},{"name":"message","type":"string"},{"name":"media","type":"MessageMedia"}],"type":"GeoChatMessage"},{"id":"-749755826","predicate":"geoChatMessageService","params":[{"name":"chat_id","type":"int"},{"name":"id","type":"int"},{"name":"from_id","type":"int"},{"name":"date","type":"int"},{"name":"action","type":"MessageAction"}],"type":"GeoChatMessage"},{"id":"397498251","predicate":"geochats.statedMessage","params":[{"name":"message","type":"GeoChatMessage"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"},{"name":"seq","type":"int"}],"type":"geochats.StatedMessage"},{"id":"1224651367","predicate":"geochats.located","params":[{"name":"results","type":"Vector"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"geochats.Located"},{"id":"-783127119","predicate":"geochats.messages","params":[{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"geochats.Messages"},{"id":"-1135057944","predicate":"geochats.messagesSlice","params":[{"name":"count","type":"int"},{"name":"messages","type":"Vector"},{"name":"chats","type":"Vector"},{"name":"users","type":"Vector"}],"type":"geochats.Messages"},{"id":"1862504124","predicate":"messageActionGeoChatCreate","params":[{"name":"title","type":"string"},{"name":"address","type":"string"}],"type":"MessageAction"},{"id":"209540062","predicate":"messageActionGeoChatCheckin","params":[],"type":"MessageAction"},{"id":"1516823543","predicate":"updateNewGeoChatMessage","params":[{"name":"message","type":"GeoChatMessage"}],"type":"Update"},{"id":"1662091044","predicate":"wallPaperSolid","params":[{"name":"id","type":"int"},{"name":"title","type":"string"},{"name":"bg_color","type":"int"},{"name":"color","type":"int"}],"type":"WallPaper"},{"id":"314359194","predicate":"updateNewEncryptedMessage","params":[{"name":"message","type":"EncryptedMessage"},{"name":"qts","type":"int"}],"type":"Update"},{"id":"386986326","predicate":"updateEncryptedChatTyping","params":[{"name":"chat_id","type":"int"}],"type":"Update"},{"id":"-1264392051","predicate":"updateEncryption","params":[{"name":"chat","type":"EncryptedChat"},{"name":"date","type":"int"}],"type":"Update"},{"id":"956179895","predicate":"updateEncryptedMessagesRead","params":[{"name":"chat_id","type":"int"},{"name":"max_date","type":"int"},{"name":"date","type":"int"}],"type":"Update"},{"id":"-1417756512","predicate":"encryptedChatEmpty","params":[{"name":"id","type":"int"}],"type":"EncryptedChat"},{"id":"1006044124","predicate":"encryptedChatWaiting","params":[{"name":"id","type":"int"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"}],"type":"EncryptedChat"},{"id":"-931638658","predicate":"encryptedChatRequested","params":[{"name":"id","type":"int"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"},{"name":"g_a","type":"bytes"}],"type":"EncryptedChat"},{"id":"-94974410","predicate":"encryptedChat","params":[{"name":"id","type":"int"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"admin_id","type":"int"},{"name":"participant_id","type":"int"},{"name":"g_a_or_b","type":"bytes"},{"name":"key_fingerprint","type":"long"}],"type":"EncryptedChat"},{"id":"332848423","predicate":"encryptedChatDiscarded","params":[{"name":"id","type":"int"}],"type":"EncryptedChat"},{"id":"-247351839","predicate":"inputEncryptedChat","params":[{"name":"chat_id","type":"int"},{"name":"access_hash","type":"long"}],"type":"InputEncryptedChat"},{"id":"-1038136962","predicate":"encryptedFileEmpty","params":[],"type":"EncryptedFile"},{"id":"1248893260","predicate":"encryptedFile","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"size","type":"int"},{"name":"dc_id","type":"int"},{"name":"key_fingerprint","type":"int"}],"type":"EncryptedFile"},{"id":"406307684","predicate":"inputEncryptedFileEmpty","params":[],"type":"InputEncryptedFile"},{"id":"1690108678","predicate":"inputEncryptedFileUploaded","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"md5_checksum","type":"string"},{"name":"key_fingerprint","type":"int"}],"type":"InputEncryptedFile"},{"id":"1511503333","predicate":"inputEncryptedFile","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputEncryptedFile"},{"id":"-182231723","predicate":"inputEncryptedFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputFileLocation"},{"id":"-317144808","predicate":"encryptedMessage","params":[{"name":"random_id","type":"long"},{"name":"chat_id","type":"int"},{"name":"date","type":"int"},{"name":"bytes","type":"bytes"},{"name":"file","type":"EncryptedFile"}],"type":"EncryptedMessage"},{"id":"594758406","predicate":"encryptedMessageService","params":[{"name":"random_id","type":"long"},{"name":"chat_id","type":"int"},{"name":"date","type":"int"},{"name":"bytes","type":"bytes"}],"type":"EncryptedMessage"},{"id":"-1058912715","predicate":"messages.dhConfigNotModified","params":[{"name":"random","type":"bytes"}],"type":"messages.DhConfig"},{"id":"740433629","predicate":"messages.dhConfig","params":[{"name":"g","type":"int"},{"name":"p","type":"bytes"},{"name":"version","type":"int"},{"name":"random","type":"bytes"}],"type":"messages.DhConfig"},{"id":"1443858741","predicate":"messages.sentEncryptedMessage","params":[{"name":"date","type":"int"}],"type":"messages.SentEncryptedMessage"},{"id":"-1802240206","predicate":"messages.sentEncryptedFile","params":[{"name":"date","type":"int"},{"name":"file","type":"EncryptedFile"}],"type":"messages.SentEncryptedMessage"},{"id":"-95482955","predicate":"inputFileBig","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"name","type":"string"}],"type":"InputFile"},{"id":"767652808","predicate":"inputEncryptedFileBigUploaded","params":[{"name":"id","type":"long"},{"name":"parts","type":"int"},{"name":"key_fingerprint","type":"int"}],"type":"InputEncryptedFile"},{"id":"974056226","predicate":"updateChatParticipantAdd","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"int"},{"name":"inviter_id","type":"int"},{"name":"version","type":"int"}],"type":"Update"},{"id":"1851755554","predicate":"updateChatParticipantDelete","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"int"},{"name":"version","type":"int"}],"type":"Update"},{"id":"-1906403213","predicate":"updateDcOptions","params":[{"name":"dc_options","type":"Vector"}],"type":"Update"},{"id":"1313442987","predicate":"inputMediaUploadedAudio","params":[{"name":"file","type":"InputFile"},{"name":"duration","type":"int"},{"name":"mime_type","type":"string"}],"type":"InputMedia"},{"id":"-1986820223","predicate":"inputMediaAudio","params":[{"name":"id","type":"InputAudio"}],"type":"InputMedia"},{"id":"-1610888","predicate":"inputMediaUploadedDocument","params":[{"name":"file","type":"InputFile"},{"name":"mime_type","type":"string"},{"name":"attributes","type":"Vector"}],"type":"InputMedia"},{"id":"1095242886","predicate":"inputMediaUploadedThumbDocument","params":[{"name":"file","type":"InputFile"},{"name":"thumb","type":"InputFile"},{"name":"mime_type","type":"string"},{"name":"attributes","type":"Vector"}],"type":"InputMedia"},{"id":"-779818943","predicate":"inputMediaDocument","params":[{"name":"id","type":"InputDocument"}],"type":"InputMedia"},{"id":"802824708","predicate":"messageMediaDocument","params":[{"name":"document","type":"Document"}],"type":"MessageMedia"},{"id":"-961117440","predicate":"messageMediaAudio","params":[{"name":"audio","type":"Audio"}],"type":"MessageMedia"},{"id":"-648356732","predicate":"inputAudioEmpty","params":[],"type":"InputAudio"},{"id":"2010398975","predicate":"inputAudio","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputAudio"},{"id":"1928391342","predicate":"inputDocumentEmpty","params":[],"type":"InputDocument"},{"id":"410618194","predicate":"inputDocument","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputDocument"},{"id":"1960591437","predicate":"inputAudioFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputFileLocation"},{"id":"1313188841","predicate":"inputDocumentFileLocation","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"}],"type":"InputFileLocation"},{"id":"1483311320","predicate":"audioEmpty","params":[{"name":"id","type":"long"}],"type":"Audio"},{"id":"-945003370","predicate":"audio","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"user_id","type":"int"},{"name":"date","type":"int"},{"name":"duration","type":"int"},{"name":"mime_type","type":"string"},{"name":"size","type":"int"},{"name":"dc_id","type":"int"}],"type":"Audio"},{"id":"922273905","predicate":"documentEmpty","params":[{"name":"id","type":"long"}],"type":"Document"},{"id":"-106717361","predicate":"document","params":[{"name":"id","type":"long"},{"name":"access_hash","type":"long"},{"name":"date","type":"int"},{"name":"mime_type","type":"string"},{"name":"size","type":"int"},{"name":"thumb","type":"PhotoSize"},{"name":"dc_id","type":"int"},{"name":"attributes","type":"Vector"}],"type":"Document"},{"id":"398898678","predicate":"help.support","params":[{"name":"phone_number","type":"string"},{"name":"user","type":"User"}],"type":"help.Support"},{"id":"-1613493288","predicate":"notifyPeer","params":[{"name":"peer","type":"Peer"}],"type":"NotifyPeer"},{"id":"-1261946036","predicate":"notifyUsers","params":[],"type":"NotifyPeer"},{"id":"-1073230141","predicate":"notifyChats","params":[],"type":"NotifyPeer"},{"id":"1959820384","predicate":"notifyAll","params":[],"type":"NotifyPeer"},{"id":"-2131957734","predicate":"updateUserBlocked","params":[{"name":"user_id","type":"int"},{"name":"blocked","type":"Bool"}],"type":"Update"},{"id":"-1094555409","predicate":"updateNotifySettings","params":[{"name":"peer","type":"NotifyPeer"},{"name":"notify_settings","type":"PeerNotifySettings"}],"type":"Update"},{"id":"-484053553","predicate":"auth.sentAppCode","params":[{"name":"phone_registered","type":"Bool"},{"name":"phone_code_hash","type":"string"},{"name":"send_call_timeout","type":"int"},{"name":"is_password","type":"Bool"}],"type":"auth.SentCode"},{"id":"381645902","predicate":"sendMessageTypingAction","params":[],"type":"SendMessageAction"},{"id":"-44119819","predicate":"sendMessageCancelAction","params":[],"type":"SendMessageAction"},{"id":"-1584933265","predicate":"sendMessageRecordVideoAction","params":[],"type":"SendMessageAction"},{"id":"-1845219337","predicate":"sendMessageUploadVideoAction","params":[],"type":"SendMessageAction"},{"id":"-718310409","predicate":"sendMessageRecordAudioAction","params":[],"type":"SendMessageAction"},{"id":"-424899985","predicate":"sendMessageUploadAudioAction","params":[],"type":"SendMessageAction"},{"id":"-1727382502","predicate":"sendMessageUploadPhotoAction","params":[],"type":"SendMessageAction"},{"id":"-1884362354","predicate":"sendMessageUploadDocumentAction","params":[],"type":"SendMessageAction"},{"id":"393186209","predicate":"sendMessageGeoLocationAction","params":[],"type":"SendMessageAction"},{"id":"1653390447","predicate":"sendMessageChooseContactAction","params":[],"type":"SendMessageAction"},{"id":"-360210539","predicate":"contactFound","params":[{"name":"user_id","type":"int"}],"type":"ContactFound"},{"id":"90570766","predicate":"contacts.found","params":[{"name":"results","type":"Vector"},{"name":"users","type":"Vector"}],"type":"contacts.Found"},{"id":"942527460","predicate":"updateServiceNotification","params":[{"name":"type","type":"string"},{"name":"message","type":"string"},{"name":"media","type":"MessageMedia"},{"name":"popup","type":"Bool"}],"type":"Update"},{"id":"-496024847","predicate":"userStatusRecently","params":[],"type":"UserStatus"},{"id":"129960444","predicate":"userStatusLastWeek","params":[],"type":"UserStatus"},{"id":"2011940674","predicate":"userStatusLastMonth","params":[],"type":"UserStatus"},{"id":"-298113238","predicate":"updatePrivacy","params":[{"name":"key","type":"PrivacyKey"},{"name":"rules","type":"Vector"}],"type":"Update"},{"id":"1335282456","predicate":"inputPrivacyKeyStatusTimestamp","params":[],"type":"InputPrivacyKey"},{"id":"-1137792208","predicate":"privacyKeyStatusTimestamp","params":[],"type":"PrivacyKey"},{"id":"218751099","predicate":"inputPrivacyValueAllowContacts","params":[],"type":"InputPrivacyRule"},{"id":"407582158","predicate":"inputPrivacyValueAllowAll","params":[],"type":"InputPrivacyRule"},{"id":"320652927","predicate":"inputPrivacyValueAllowUsers","params":[{"name":"users","type":"Vector"}],"type":"InputPrivacyRule"},{"id":"195371015","predicate":"inputPrivacyValueDisallowContacts","params":[],"type":"InputPrivacyRule"},{"id":"-697604407","predicate":"inputPrivacyValueDisallowAll","params":[],"type":"InputPrivacyRule"},{"id":"-1877932953","predicate":"inputPrivacyValueDisallowUsers","params":[{"name":"users","type":"Vector"}],"type":"InputPrivacyRule"},{"id":"-123988","predicate":"privacyValueAllowContacts","params":[],"type":"PrivacyRule"},{"id":"1698855810","predicate":"privacyValueAllowAll","params":[],"type":"PrivacyRule"},{"id":"1297858060","predicate":"privacyValueAllowUsers","params":[{"name":"users","type":"Vector"}],"type":"PrivacyRule"},{"id":"-125240806","predicate":"privacyValueDisallowContacts","params":[],"type":"PrivacyRule"},{"id":"-1955338397","predicate":"privacyValueDisallowAll","params":[],"type":"PrivacyRule"},{"id":"209668535","predicate":"privacyValueDisallowUsers","params":[{"name":"users","type":"Vector"}],"type":"PrivacyRule"},{"id":"1430961007","predicate":"account.privacyRules","params":[{"name":"rules","type":"Vector"},{"name":"users","type":"Vector"}],"type":"account.PrivacyRules"},{"id":"-1194283041","predicate":"accountDaysTTL","params":[{"name":"days","type":"int"}],"type":"AccountDaysTTL"},{"id":"-1527411636","predicate":"account.sentChangePhoneCode","params":[{"name":"phone_code_hash","type":"string"},{"name":"send_call_timeout","type":"int"}],"type":"account.SentChangePhoneCode"},{"id":"314130811","predicate":"updateUserPhone","params":[{"name":"user_id","type":"int"},{"name":"phone","type":"string"}],"type":"Update"},{"id":"1467017129","predicate":"account.noPassword","params":[{"name":"new_salt","type":"bytes"}],"type":"account.Password"},{"id":"1939758962","predicate":"account.password","params":[{"name":"current_salt","type":"bytes"},{"name":"new_salt","type":"bytes"},{"name":"hint","type":"string"}],"type":"account.Password"},{"id":"1815593308","predicate":"documentAttributeImageSize","params":[{"name":"w","type":"int"},{"name":"h","type":"int"}],"type":"DocumentAttribute"},{"id":"297109817","predicate":"documentAttributeAnimated","params":[],"type":"DocumentAttribute"},{"id":"-83208409","predicate":"documentAttributeSticker","params":[],"type":"DocumentAttribute"},{"id":"1494273227","predicate":"documentAttributeVideo","params":[{"name":"duration","type":"int"},{"name":"w","type":"int"},{"name":"h","type":"int"}],"type":"DocumentAttribute"},{"id":"85215461","predicate":"documentAttributeAudio","params":[{"name":"duration","type":"int"}],"type":"DocumentAttribute"},{"id":"358154344","predicate":"documentAttributeFilename","params":[{"name":"file_name","type":"string"}],"type":"DocumentAttribute"},{"id":"-244016606","predicate":"messages.stickersNotModified","params":[],"type":"messages.Stickers"},{"id":"-1970352846","predicate":"messages.stickers","params":[{"name":"hash","type":"string"},{"name":"stickers","type":"Vector"}],"type":"messages.Stickers"},{"id":"313694676","predicate":"stickerPack","params":[{"name":"emoticon","type":"string"},{"name":"documents","type":"Vector"}],"type":"StickerPack"},{"id":"-395967805","predicate":"messages.allStickersNotModified","params":[],"type":"messages.AllStickers"},{"id":"-588304126","predicate":"messages.allStickers","params":[{"name":"hash","type":"string"},{"name":"packs","type":"Vector"},{"name":"documents","type":"Vector"}],"type":"messages.AllStickers"}],"methods":[{"id":"-878758099","method":"invokeAfterMsg","params":[{"name":"msg_id","type":"long"},{"name":"query","type":"!X"}],"type":"X"},{"id":"1036301552","method":"invokeAfterMsgs","params":[{"name":"msg_ids","type":"Vector"},{"name":"query","type":"!X"}],"type":"X"},{"id":"1877286395","method":"auth.checkPhone","params":[{"name":"phone_number","type":"string"}],"type":"auth.CheckedPhone"},{"id":"1988976461","method":"auth.sendCode","params":[{"name":"phone_number","type":"string"},{"name":"sms_type","type":"int"},{"name":"api_id","type":"int"},{"name":"api_hash","type":"string"},{"name":"lang_code","type":"string"}],"type":"auth.SentCode"},{"id":"63247716","method":"auth.sendCall","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"}],"type":"Bool"},{"id":"453408308","method":"auth.signUp","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"},{"name":"phone_code","type":"string"},{"name":"first_name","type":"string"},{"name":"last_name","type":"string"}],"type":"auth.Authorization"},{"id":"-1126886015","method":"auth.signIn","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"},{"name":"phone_code","type":"string"}],"type":"auth.Authorization"},{"id":"1461180992","method":"auth.logOut","params":[],"type":"Bool"},{"id":"-1616179942","method":"auth.resetAuthorizations","params":[],"type":"Bool"},{"id":"1998331287","method":"auth.sendInvites","params":[{"name":"phone_numbers","type":"Vector"},{"name":"message","type":"string"}],"type":"Bool"},{"id":"-440401971","method":"auth.exportAuthorization","params":[{"name":"dc_id","type":"int"}],"type":"auth.ExportedAuthorization"},{"id":"-470837741","method":"auth.importAuthorization","params":[{"name":"id","type":"int"},{"name":"bytes","type":"bytes"}],"type":"auth.Authorization"},{"id":"-841733627","method":"auth.bindTempAuthKey","params":[{"name":"perm_auth_key_id","type":"long"},{"name":"nonce","type":"long"},{"name":"expires_at","type":"int"},{"name":"encrypted_message","type":"bytes"}],"type":"Bool"},{"id":"1147957548","method":"account.registerDevice","params":[{"name":"token_type","type":"int"},{"name":"token","type":"string"},{"name":"device_model","type":"string"},{"name":"system_version","type":"string"},{"name":"app_version","type":"string"},{"name":"app_sandbox","type":"Bool"},{"name":"lang_code","type":"string"}],"type":"Bool"},{"id":"1707432768","method":"account.unregisterDevice","params":[{"name":"token_type","type":"int"},{"name":"token","type":"string"}],"type":"Bool"},{"id":"-2067899501","method":"account.updateNotifySettings","params":[{"name":"peer","type":"InputNotifyPeer"},{"name":"settings","type":"InputPeerNotifySettings"}],"type":"Bool"},{"id":"313765169","method":"account.getNotifySettings","params":[{"name":"peer","type":"InputNotifyPeer"}],"type":"PeerNotifySettings"},{"id":"-612493497","method":"account.resetNotifySettings","params":[],"type":"Bool"},{"id":"-259486360","method":"account.updateProfile","params":[{"name":"first_name","type":"string"},{"name":"last_name","type":"string"}],"type":"User"},{"id":"1713919532","method":"account.updateStatus","params":[{"name":"offline","type":"Bool"}],"type":"Bool"},{"id":"-1068696894","method":"account.getWallPapers","params":[],"type":"Vector"},{"id":"227648840","method":"users.getUsers","params":[{"name":"id","type":"Vector"}],"type":"Vector"},{"id":"-902781519","method":"users.getFullUser","params":[{"name":"id","type":"InputUser"}],"type":"UserFull"},{"id":"-995929106","method":"contacts.getStatuses","params":[],"type":"Vector"},{"id":"583445000","method":"contacts.getContacts","params":[{"name":"hash","type":"string"}],"type":"contacts.Contacts"},{"id":"-634342611","method":"contacts.importContacts","params":[{"name":"contacts","type":"Vector"},{"name":"replace","type":"Bool"}],"type":"contacts.ImportedContacts"},{"id":"-847825880","method":"contacts.getSuggested","params":[{"name":"limit","type":"int"}],"type":"contacts.Suggested"},{"id":"-1902823612","method":"contacts.deleteContact","params":[{"name":"id","type":"InputUser"}],"type":"contacts.Link"},{"id":"1504393374","method":"contacts.deleteContacts","params":[{"name":"id","type":"Vector"}],"type":"Bool"},{"id":"858475004","method":"contacts.block","params":[{"name":"id","type":"InputUser"}],"type":"Bool"},{"id":"-448724803","method":"contacts.unblock","params":[{"name":"id","type":"InputUser"}],"type":"Bool"},{"id":"-176409329","method":"contacts.getBlocked","params":[{"name":"offset","type":"int"},{"name":"limit","type":"int"}],"type":"contacts.Blocked"},{"id":"-2065352905","method":"contacts.exportCard","params":[],"type":"Vector"},{"id":"1340184318","method":"contacts.importCard","params":[{"name":"export_card","type":"Vector"}],"type":"User"},{"id":"1109588596","method":"messages.getMessages","params":[{"name":"id","type":"Vector"}],"type":"messages.Messages"},{"id":"-321970698","method":"messages.getDialogs","params":[{"name":"offset","type":"int"},{"name":"max_id","type":"int"},{"name":"limit","type":"int"}],"type":"messages.Dialogs"},{"id":"-1834885329","method":"messages.getHistory","params":[{"name":"peer","type":"InputPeer"},{"name":"offset","type":"int"},{"name":"max_id","type":"int"},{"name":"limit","type":"int"}],"type":"messages.Messages"},{"id":"132772523","method":"messages.search","params":[{"name":"peer","type":"InputPeer"},{"name":"q","type":"string"},{"name":"filter","type":"MessagesFilter"},{"name":"min_date","type":"int"},{"name":"max_date","type":"int"},{"name":"offset","type":"int"},{"name":"max_id","type":"int"},{"name":"limit","type":"int"}],"type":"messages.Messages"},{"id":"-287800122","method":"messages.readHistory","params":[{"name":"peer","type":"InputPeer"},{"name":"max_id","type":"int"},{"name":"offset","type":"int"},{"name":"read_contents","type":"Bool"}],"type":"messages.AffectedHistory"},{"id":"-185009311","method":"messages.deleteHistory","params":[{"name":"peer","type":"InputPeer"},{"name":"offset","type":"int"}],"type":"messages.AffectedHistory"},{"id":"351460618","method":"messages.deleteMessages","params":[{"name":"id","type":"Vector"}],"type":"Vector"},{"id":"682347368","method":"messages.receivedMessages","params":[{"name":"max_id","type":"int"}],"type":"Vector"},{"id":"-1551737264","method":"messages.setTyping","params":[{"name":"peer","type":"InputPeer"},{"name":"action","type":"SendMessageAction"}],"type":"Bool"},{"id":"1289620139","method":"messages.sendMessage","params":[{"name":"peer","type":"InputPeer"},{"name":"message","type":"string"},{"name":"random_id","type":"long"}],"type":"messages.SentMessage"},{"id":"-1547149962","method":"messages.sendMedia","params":[{"name":"peer","type":"InputPeer"},{"name":"media","type":"InputMedia"},{"name":"random_id","type":"long"}],"type":"messages.StatedMessage"},{"id":"1363988751","method":"messages.forwardMessages","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"Vector"}],"type":"messages.StatedMessages"},{"id":"1013621127","method":"messages.getChats","params":[{"name":"id","type":"Vector"}],"type":"messages.Chats"},{"id":"998448230","method":"messages.getFullChat","params":[{"name":"chat_id","type":"int"}],"type":"messages.ChatFull"},{"id":"-1262720843","method":"messages.editChatTitle","params":[{"name":"chat_id","type":"int"},{"name":"title","type":"string"}],"type":"messages.StatedMessage"},{"id":"-662601187","method":"messages.editChatPhoto","params":[{"name":"chat_id","type":"int"},{"name":"photo","type":"InputChatPhoto"}],"type":"messages.StatedMessage"},{"id":"787082910","method":"messages.addChatUser","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"InputUser"},{"name":"fwd_limit","type":"int"}],"type":"messages.StatedMessage"},{"id":"-1010447069","method":"messages.deleteChatUser","params":[{"name":"chat_id","type":"int"},{"name":"user_id","type":"InputUser"}],"type":"messages.StatedMessage"},{"id":"1100847854","method":"messages.createChat","params":[{"name":"users","type":"Vector"},{"name":"title","type":"string"}],"type":"messages.StatedMessage"},{"id":"-304838614","method":"updates.getState","params":[],"type":"updates.State"},{"id":"168039573","method":"updates.getDifference","params":[{"name":"pts","type":"int"},{"name":"date","type":"int"},{"name":"qts","type":"int"}],"type":"updates.Difference"},{"id":"-285902432","method":"photos.updateProfilePhoto","params":[{"name":"id","type":"InputPhoto"},{"name":"crop","type":"InputPhotoCrop"}],"type":"UserProfilePhoto"},{"id":"-720397176","method":"photos.uploadProfilePhoto","params":[{"name":"file","type":"InputFile"},{"name":"caption","type":"string"},{"name":"geo_point","type":"InputGeoPoint"},{"name":"crop","type":"InputPhotoCrop"}],"type":"photos.Photo"},{"id":"-2016444625","method":"photos.deletePhotos","params":[{"name":"id","type":"Vector"}],"type":"Vector"},{"id":"-1291540959","method":"upload.saveFilePart","params":[{"name":"file_id","type":"long"},{"name":"file_part","type":"int"},{"name":"bytes","type":"bytes"}],"type":"Bool"},{"id":"-475607115","method":"upload.getFile","params":[{"name":"location","type":"InputFileLocation"},{"name":"offset","type":"int"},{"name":"limit","type":"int"}],"type":"upload.File"},{"id":"-990308245","method":"help.getConfig","params":[],"type":"Config"},{"id":"531836966","method":"help.getNearestDc","params":[],"type":"NearestDc"},{"id":"-938300290","method":"help.getAppUpdate","params":[{"name":"device_model","type":"string"},{"name":"system_version","type":"string"},{"name":"app_version","type":"string"},{"name":"lang_code","type":"string"}],"type":"help.AppUpdate"},{"id":"1862465352","method":"help.saveAppLog","params":[{"name":"events","type":"Vector"}],"type":"Bool"},{"id":"-1532407418","method":"help.getInviteText","params":[{"name":"lang_code","type":"string"}],"type":"help.InviteText"},{"id":"-1209117380","method":"photos.getUserPhotos","params":[{"name":"user_id","type":"InputUser"},{"name":"offset","type":"int"},{"name":"max_id","type":"int"},{"name":"limit","type":"int"}],"type":"photos.Photos"},{"id":"66319602","method":"messages.forwardMessage","params":[{"name":"peer","type":"InputPeer"},{"name":"id","type":"int"},{"name":"random_id","type":"long"}],"type":"messages.StatedMessage"},{"id":"1102776690","method":"messages.sendBroadcast","params":[{"name":"contacts","type":"Vector"},{"name":"message","type":"string"},{"name":"media","type":"InputMedia"}],"type":"messages.StatedMessages"},{"id":"2132356495","method":"geochats.getLocated","params":[{"name":"geo_point","type":"InputGeoPoint"},{"name":"radius","type":"int"},{"name":"limit","type":"int"}],"type":"geochats.Located"},{"id":"-515735953","method":"geochats.getRecents","params":[{"name":"offset","type":"int"},{"name":"limit","type":"int"}],"type":"geochats.Messages"},{"id":"1437853947","method":"geochats.checkin","params":[{"name":"peer","type":"InputGeoChat"}],"type":"geochats.StatedMessage"},{"id":"1730338159","method":"geochats.getFullChat","params":[{"name":"peer","type":"InputGeoChat"}],"type":"messages.ChatFull"},{"id":"1284383347","method":"geochats.editChatTitle","params":[{"name":"peer","type":"InputGeoChat"},{"name":"title","type":"string"},{"name":"address","type":"string"}],"type":"geochats.StatedMessage"},{"id":"903355029","method":"geochats.editChatPhoto","params":[{"name":"peer","type":"InputGeoChat"},{"name":"photo","type":"InputChatPhoto"}],"type":"geochats.StatedMessage"},{"id":"-808598451","method":"geochats.search","params":[{"name":"peer","type":"InputGeoChat"},{"name":"q","type":"string"},{"name":"filter","type":"MessagesFilter"},{"name":"min_date","type":"int"},{"name":"max_date","type":"int"},{"name":"offset","type":"int"},{"name":"max_id","type":"int"},{"name":"limit","type":"int"}],"type":"geochats.Messages"},{"id":"-1254131096","method":"geochats.getHistory","params":[{"name":"peer","type":"InputGeoChat"},{"name":"offset","type":"int"},{"name":"max_id","type":"int"},{"name":"limit","type":"int"}],"type":"geochats.Messages"},{"id":"146319145","method":"geochats.setTyping","params":[{"name":"peer","type":"InputGeoChat"},{"name":"typing","type":"Bool"}],"type":"Bool"},{"id":"102432836","method":"geochats.sendMessage","params":[{"name":"peer","type":"InputGeoChat"},{"name":"message","type":"string"},{"name":"random_id","type":"long"}],"type":"geochats.StatedMessage"},{"id":"-1192173825","method":"geochats.sendMedia","params":[{"name":"peer","type":"InputGeoChat"},{"name":"media","type":"InputMedia"},{"name":"random_id","type":"long"}],"type":"geochats.StatedMessage"},{"id":"235482646","method":"geochats.createGeoChat","params":[{"name":"title","type":"string"},{"name":"geo_point","type":"InputGeoPoint"},{"name":"address","type":"string"},{"name":"venue","type":"string"}],"type":"geochats.StatedMessage"},{"id":"651135312","method":"messages.getDhConfig","params":[{"name":"version","type":"int"},{"name":"random_length","type":"int"}],"type":"messages.DhConfig"},{"id":"-162681021","method":"messages.requestEncryption","params":[{"name":"user_id","type":"InputUser"},{"name":"random_id","type":"int"},{"name":"g_a","type":"bytes"}],"type":"EncryptedChat"},{"id":"1035731989","method":"messages.acceptEncryption","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"g_b","type":"bytes"},{"name":"key_fingerprint","type":"long"}],"type":"EncryptedChat"},{"id":"-304536635","method":"messages.discardEncryption","params":[{"name":"chat_id","type":"int"}],"type":"Bool"},{"id":"2031374829","method":"messages.setEncryptedTyping","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"typing","type":"Bool"}],"type":"Bool"},{"id":"2135648522","method":"messages.readEncryptedHistory","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"max_date","type":"int"}],"type":"Bool"},{"id":"-1451792525","method":"messages.sendEncrypted","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"random_id","type":"long"},{"name":"data","type":"bytes"}],"type":"messages.SentEncryptedMessage"},{"id":"-1701831834","method":"messages.sendEncryptedFile","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"random_id","type":"long"},{"name":"data","type":"bytes"},{"name":"file","type":"InputEncryptedFile"}],"type":"messages.SentEncryptedMessage"},{"id":"852769188","method":"messages.sendEncryptedService","params":[{"name":"peer","type":"InputEncryptedChat"},{"name":"random_id","type":"long"},{"name":"data","type":"bytes"}],"type":"messages.SentEncryptedMessage"},{"id":"1436924774","method":"messages.receivedQueue","params":[{"name":"max_qts","type":"int"}],"type":"Vector"},{"id":"-562337987","method":"upload.saveBigFilePart","params":[{"name":"file_id","type":"long"},{"name":"file_part","type":"int"},{"name":"file_total_parts","type":"int"},{"name":"bytes","type":"bytes"}],"type":"Bool"},{"id":"1769565673","method":"initConnection","params":[{"name":"api_id","type":"int"},{"name":"device_model","type":"string"},{"name":"system_version","type":"string"},{"name":"app_version","type":"string"},{"name":"lang_code","type":"string"},{"name":"query","type":"!X"}],"type":"X"},{"id":"-1663104819","method":"help.getSupport","params":[],"type":"help.Support"},{"id":"229241832","method":"auth.sendSms","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"}],"type":"Bool"},{"id":"894131138","method":"messages.readMessageContents","params":[{"name":"id","type":"Vector"}],"type":"Vector"},{"id":"655677548","method":"account.checkUsername","params":[{"name":"username","type":"string"}],"type":"Bool"},{"id":"1040964988","method":"account.updateUsername","params":[{"name":"username","type":"string"}],"type":"User"},{"id":"301470424","method":"contacts.search","params":[{"name":"q","type":"string"},{"name":"limit","type":"int"}],"type":"contacts.Found"},{"id":"-623130288","method":"account.getPrivacy","params":[{"name":"key","type":"InputPrivacyKey"}],"type":"account.PrivacyRules"},{"id":"-906486552","method":"account.setPrivacy","params":[{"name":"key","type":"InputPrivacyKey"},{"name":"rules","type":"Vector"}],"type":"account.PrivacyRules"},{"id":"1099779595","method":"account.deleteAccount","params":[{"name":"reason","type":"string"}],"type":"Bool"},{"id":"150761757","method":"account.getAccountTTL","params":[],"type":"AccountDaysTTL"},{"id":"608323678","method":"account.setAccountTTL","params":[{"name":"ttl","type":"AccountDaysTTL"}],"type":"Bool"},{"id":"-627372787","method":"invokeWithLayer","params":[{"name":"layer","type":"int"},{"name":"query","type":"!X"}],"type":"X"},{"id":"200282908","method":"contacts.resolveUsername","params":[{"name":"username","type":"string"}],"type":"User"},{"id":"-1543001868","method":"account.sendChangePhoneCode","params":[{"name":"phone_number","type":"string"}],"type":"account.SentChangePhoneCode"},{"id":"1891839707","method":"account.changePhone","params":[{"name":"phone_number","type":"string"},{"name":"phone_code_hash","type":"string"},{"name":"phone_code","type":"string"}],"type":"User"},{"id":"1418342645","method":"account.getPassword","params":[],"type":"account.Password"},{"id":"-584430193","method":"account.setPassword","params":[{"name":"current_password_hash","type":"bytes"},{"name":"new_salt","type":"bytes"},{"name":"new_password_hash","type":"bytes"},{"name":"hint","type":"string"}],"type":"Bool"},{"id":"174260510","method":"auth.checkPassword","params":[{"name":"password_hash","type":"bytes"}],"type":"auth.Authorization"},{"id":"-1373446075","method":"messages.getStickers","params":[{"name":"emoticon","type":"string"},{"name":"hash","type":"string"}],"type":"messages.Stickers"},{"id":"-1438922648","method":"messages.getAllStickers","params":[{"name":"hash","type":"string"}],"type":"messages.AllStickers"}]}; @@ -93,24 +93,15 @@ Config.Emoji = {"00a9":["\u00A9",["copyright"]],"00ae":["\u00AE",["registered"]] Config.EmojiCategories = [[ "1f604", "1f603", "1f600", "1f60a", "263a", "1f609", "1f60d","1f618", "1f61a", "1f617", "1f619", "1f61c", "1f61d", "1f61b","1f633", "1f601", "1f614", "1f60c", "1f612", "1f61e", "1f623","1f622", "1f602", "1f62d", "1f62a", "1f625", "1f630", "1f605","1f613", "1f629", "1f62b", "1f628", "1f631", "1f620", "1f621","1f624", "1f616", "1f606", "1f60b", "1f637", "1f60e", "1f634","1f635", "1f632", "1f61f", "1f626", "1f627", "1f608", "1f47f","1f62e", "1f62c", "1f610", "1f615", "1f62f", "1f636", "1f607","1f60f", "1f611", "1f472", "1f473", "1f46e", "1f477", "1f482","1f476", "1f466", "1f467", "1f468", "1f469", "1f474", "1f475","1f471", "1f47c", "1f478", "1f63a", "1f638", "1f63b", "1f63d","1f63c", "1f640", "1f63f", "1f639", "1f63e", "1f479", "1f47a","1f648", "1f649", "1f64a", "1f480", "1f47d", "1f4a9", "1f525","2728", "1f31f", "1f4ab", "1f4a5", "1f4a2", "1f4a6", "1f4a7","1f4a4", "1f4a8", "1f442", "1f440", "1f443", "1f445", "1f444","1f44d", "1f44e", "1f44c", "1f44a", "270a", "270c", "1f44b","270b", "1f450", "1f446", "1f447", "1f449", "1f448", "1f64c","1f64f", "261d", "1f44f", "1f4aa", "1f6b6", "1f3c3", "1f483","1f46b", "1f46a", "1f46c", "1f46d", "1f48f", "1f491", "1f46f","1f646", "1f645", "1f481", "1f64b", "1f486", "1f487", "1f485","1f470", "1f64e", "1f64d", "1f647", "1f3a9", "1f451", "1f452","1f45f", "1f45e", "1f461", "1f460", "1f462", "1f455", "1f454","1f45a", "1f457", "1f3bd", "1f456", "1f458", "1f459", "1f4bc","1f45c", "1f45d", "1f45b", "1f453", "1f380", "1f302", "1f484","1f49b", "1f499", "1f49c", "1f49a", "2764", "1f494", "1f497","1f493", "1f495", "1f496", "1f49e", "1f498", "1f48c", "1f48b","1f48d", "1f48e", "1f464", "1f465", "1f4ac", "1f463", "1f4ad" ],[ "1f436", "1f43a", "1f431", "1f42d", "1f439", "1f430", "1f438","1f42f", "1f428", "1f43b", "1f437", "1f43d", "1f42e", "1f417","1f435", "1f412", "1f434", "1f411", "1f418", "1f43c", "1f427","1f426", "1f424", "1f425", "1f423", "1f414", "1f40d", "1f422","1f41b", "1f41d", "1f41c", "1f41e", "1f40c", "1f419", "1f41a","1f420", "1f41f", "1f42c", "1f433", "1f40b", "1f404", "1f40f","1f400", "1f403", "1f405", "1f407", "1f409", "1f40e", "1f410","1f413", "1f415", "1f416", "1f401", "1f402", "1f432", "1f421","1f40a", "1f42b", "1f42a", "1f406", "1f408", "1f429", "1f43e","1f490", "1f338", "1f337", "1f340", "1f339", "1f33b", "1f33a","1f341", "1f343", "1f342", "1f33f", "1f33e", "1f344", "1f335","1f334", "1f332", "1f333", "1f330", "1f331", "1f33c", "1f310","1f31e", "1f31d", "1f31a", "1f311", "1f312", "1f313", "1f314","1f315", "1f316", "1f317", "1f318", "1f31c", "1f31b", "1f319","1f30d", "1f30e", "1f30f", "1f30b", "1f30c", "1f320", "2b50","2600", "26c5", "2601", "26a1", "2614", "2744", "26c4", "1f300","1f301", "1f308", "1f30a" ],[ "1f38d", "1f49d", "1f38e", "1f392", "1f393", "1f38f", "1f386","1f387", "1f390", "1f391", "1f383", "1f47b", "1f385", "1f384","1f381", "1f38b", "1f389", "1f38a", "1f388", "1f38c", "1f52e","1f3a5", "1f4f7", "1f4f9", "1f4fc", "1f4bf", "1f4c0", "1f4bd","1f4be", "1f4bb", "1f4f1", "260e", "1f4de", "1f4df", "1f4e0","1f4e1", "1f4fa", "1f4fb", "1f50a", "1f509", "1f508", "1f507","1f514", "1f515", "1f4e3", "1f4e2", "23f3", "231b", "23f0","231a", "1f513", "1f512", "1f50f", "1f510", "1f511", "1f50e","1f4a1", "1f526", "1f506", "1f505", "1f50c", "1f50b", "1f50d", "1f6c0", "1f6c1", "1f6bf", "1f6bd", "1f527", "1f529", "1f528", "1f6aa","1f6ac", "1f4a3", "1f52b", "1f52a", "1f48a", "1f489", "1f4b0","1f4b4", "1f4b5", "1f4b7", "1f4b6", "1f4b3", "1f4b8", "1f4f2","1f4e7", "1f4e5", "1f4e4", "2709", "1f4e9", "1f4e8", "1f4ef","1f4eb", "1f4ea", "1f4ec", "1f4ed", "1f4ee", "1f4e6", "1f4dd","1f4c4", "1f4c3", "1f4d1", "1f4ca", "1f4c8", "1f4c9", "1f4dc","1f4cb", "1f4c5", "1f4c6", "1f4c7", "1f4c1", "1f4c2", "2702","1f4cc", "1f4ce", "2712", "270f", "1f4cf", "1f4d0", "1f4d5","1f4d7", "1f4d8", "1f4d9", "1f4d3", "1f4d4", "1f4d2", "1f4da","1f4d6", "1f516", "1f4db", "1f52c", "1f52d", "1f4f0", "1f3a8","1f3ac", "1f3a4", "1f3a7", "1f3bc", "1f3b5", "1f3b6", "1f3b9","1f3bb", "1f3ba", "1f3b7", "1f3b8", "1f47e", "1f3ae", "1f0cf","1f3b4", "1f004", "1f3b2", "1f3af", "1f3c8", "1f3c0", "26bd","26be", "1f3be", "1f3b1", "1f3c9", "1f3b3", "26f3", "1f6b5","1f6b4", "1f3c1", "1f3c7", "1f3c6", "1f3bf", "1f3c2", "1f3ca","1f3c4", "1f3a3", "2615", "1f375", "1f376", "1f37c", "1f37a","1f37b", "1f378", "1f379", "1f377", "1f374", "1f355", "1f354","1f35f", "1f357", "1f356", "1f35d", "1f35b", "1f364", "1f371","1f363", "1f365", "1f359", "1f358", "1f35a", "1f35c", "1f372","1f362", "1f361", "1f373", "1f35e", "1f369", "1f36e", "1f366","1f368", "1f367", "1f382", "1f370", "1f36a", "1f36b", "1f36c","1f36d", "1f36f", "1f34e", "1f34f", "1f34a", "1f34b", "1f352","1f347", "1f349", "1f353", "1f351", "1f348", "1f34c", "1f350","1f34d", "1f360", "1f346", "1f345", "1f33d" ],[ "1f3e0", "1f3e1", "1f3eb", "1f3e2", "1f3e3", "1f3e5", "1f3e6","1f3ea", "1f3e9", "1f3e8", "1f492", "26ea", "1f3ec", "1f3e4","1f307", "1f306", "1f3ef", "1f3f0", "26fa", "1f3ed", "1f5fc","1f5fe", "1f5fb", "1f304", "1f305", "1f303", "1f5fd", "1f309","1f3a0", "1f3a1", "26f2", "1f3a2", "1f6a2", "26f5", "1f6a4","1f6a3", "2693", "1f680", "2708", "1f4ba", "1f681", "1f682","1f68a", "1f689", "1f69e", "1f686", "1f684", "1f685", "1f688","1f687", "1f69d", "1f683", "1f68b", "1f68e", "1f68c", "1f68d","1f699", "1f698", "1f697", "1f695", "1f696", "1f69b", "1f69a","1f6a8", "1f693", "1f694", "1f692", "1f691", "1f690", "1f6b2","1f6a1", "1f69f", "1f6a0", "1f69c", "1f488", "1f68f", "1f3ab","1f6a6", "1f6a5", "26a0", "1f6a7", "1f530", "26fd", "1f3ee","1f3b0", "2668", "1f5ff", "1f3aa", "1f3ad", "1f4cd", "1f6a9","1f1ef-1f1f5", "1f1f0-1f1f7", "1f1e9-1f1ea", "1f1e8-1f1f3", "1f1fa-1f1f8", "1f1eb-1f1f7", "1f1ea-1f1f8","1f1ee-1f1f9", "1f1f7-1f1fa", "1f1ec-1f1e7" ],[ "0031", "0032", "0033", "0034", "0035", "0036", "0037","0038", "0039", "0030", "1f51f", "1f522", "0023", "1f523","2b06", "2b07", "2b05", "27a1", "1f520", "1f521", "1f524","2197", "2196", "2198", "2199", "2194", "2195", "1f504","25c0", "25b6", "1f53c", "1f53d", "21a9", "21aa", "2139","23ea", "23e9", "23eb", "23ec", "2935", "2934", "1f197","1f500", "1f501", "1f502", "1f195", "1f199", "1f192", "1f193","1f196", "1f4f6", "1f3a6", "1f201", "1f22f", "1f233", "1f235", "1f234", "1f232", "1f250", "1f239", "1f23a", "1f236","1f21a", "1f6bb", "1f6b9", "1f6ba", "1f6bc", "1f6be", "1f6b0","1f6ae", "1f17f", "267f", "1f6ad", "1f237", "1f238", "1f202", "24c2", "1f6c2", "1f6c4", "1f6c5", "1f6c3", "1f251", "3299", "3297", "1f191", "1f198", "1f194","1f6ab", "1f51e", "1f4f5", "1f6af", "1f6b1", "1f6b3", "1f6b7","1f6b8", "26d4", "2733", "2747", "274e", "2705", "2734","1f49f", "1f19a", "1f4f3", "1f4f4", "1f170", "1f171", "1f18e","1f17e", "1f4a0", "27bf", "267b", "2648", "2649", "264a","264b", "264c", "264d", "264e", "264f", "2650", "2651","2652", "2653", "26ce", "1f52f", "1f3e7", "1f4b9", "1f4b2","1f4b1", "00a9", "00ae", "2122", "274c", "203c", "2049", "2757", "2753", "2755", "2754", "2b55", "1f51d","1f51a", "1f519", "1f51b", "1f51c", "1f503", "1f55b", "1f567", "1f550","1f55c", "1f551", "1f55d", "1f552", "1f55e", "1f553", "1f55f","1f554", "1f560", "1f555", "1f556", "1f557", "1f558", "1f559","1f55a", "1f561", "1f562", "1f563", "1f564", "1f565", "1f566","2716", "2795", "2796", "2797", "2660", "2665", "2663","2666", "1f4ae", "1f4af", "2714", "2611", "1f518", "1f517", "27b0", "3030", "303d", "1f531", "25fc", "25fb", "25fe","25fd", "25aa", "25ab", "1f53a", "1f532", "1f533","26ab","26aa", "1f534", "1f535","1f53b", "2b1c", "2b1b", "1f536", "1f537", "1f538","1f539" ]]; - - Config.EmojiCategorySpritesheetDimens = [[7, 27], [4, 29], [7, 33], [3, 34], [7,34]]; - // From https://raw.githubusercontent.com/FGRibreau/latenize/master/latinize_map.js - Config.LatinizeMap = {'Á': 'A','Ă': 'A','Ắ': 'A','Ặ': 'A','Ằ': 'A','Ẳ': 'A','Ẵ': 'A','Ǎ': 'A','Â': 'A','Ấ': 'A','Ậ': 'A','Ầ': 'A','Ẩ': 'A','Ẫ': 'A','Ä': 'A','Ǟ': 'A','Ȧ': 'A','Ǡ': 'A','Ạ': 'A','Ȁ': 'A','À': 'A','Ả': 'A','Ȃ': 'A','Ā': 'A','Ą': 'A','Å': 'A','Ǻ': 'A','Ḁ': 'A','Ⱥ': 'A','Ã': 'A','Ꜳ': 'AA','Æ': 'AE','Ǽ': 'AE','Ǣ': 'AE','Ꜵ': 'AO','Ꜷ': 'AU','Ꜹ': 'AV','Ꜻ': 'AV','Ꜽ': 'AY','Ḃ': 'B','Ḅ': 'B','Ɓ': 'B','Ḇ': 'B','Ƀ': 'B','Ƃ': 'B','Ć': 'C','Č': 'C','Ç': 'C','Ḉ': 'C','Ĉ': 'C','Ċ': 'C','Ƈ': 'C','Ȼ': 'C','Ď': 'D','Ḑ': 'D','Ḓ': 'D','Ḋ': 'D','Ḍ': 'D','Ɗ': 'D','Ḏ': 'D','Dz': 'D','Dž': 'D','Đ': 'D','Ƌ': 'D','DZ': 'DZ','DŽ': 'DZ','É': 'E','Ĕ': 'E','Ě': 'E','Ȩ': 'E','Ḝ': 'E','Ê': 'E','Ế': 'E','Ệ': 'E','Ề': 'E','Ể': 'E','Ễ': 'E','Ḙ': 'E','Ë': 'E','Ė': 'E','Ẹ': 'E','Ȅ': 'E','È': 'E','Ẻ': 'E','Ȇ': 'E','Ē': 'E','Ḗ': 'E','Ḕ': 'E','Ę': 'E','Ɇ': 'E','Ẽ': 'E','Ḛ': 'E','Ꝫ': 'ET','Ḟ': 'F','Ƒ': 'F','Ǵ': 'G','Ğ': 'G','Ǧ': 'G','Ģ': 'G','Ĝ': 'G','Ġ': 'G','Ɠ': 'G','Ḡ': 'G','Ǥ': 'G','Ḫ': 'H','Ȟ': 'H','Ḩ': 'H','Ĥ': 'H','Ⱨ': 'H','Ḧ': 'H','Ḣ': 'H','Ḥ': 'H','Ħ': 'H','Í': 'I','Ĭ': 'I','Ǐ': 'I','Î': 'I','Ï': 'I','Ḯ': 'I','İ': 'I','Ị': 'I','Ȉ': 'I','Ì': 'I','Ỉ': 'I','Ȋ': 'I','Ī': 'I','Į': 'I','Ɨ': 'I','Ĩ': 'I','Ḭ': 'I','Ꝺ': 'D','Ꝼ': 'F','Ᵹ': 'G','Ꞃ': 'R','Ꞅ': 'S','Ꞇ': 'T','Ꝭ': 'IS','Ĵ': 'J','Ɉ': 'J','Ḱ': 'K','Ǩ': 'K','Ķ': 'K','Ⱪ': 'K','Ꝃ': 'K','Ḳ': 'K','Ƙ': 'K','Ḵ': 'K','Ꝁ': 'K','Ꝅ': 'K','Ĺ': 'L','Ƚ': 'L','Ľ': 'L','Ļ': 'L','Ḽ': 'L','Ḷ': 'L','Ḹ': 'L','Ⱡ': 'L','Ꝉ': 'L','Ḻ': 'L','Ŀ': 'L','Ɫ': 'L','Lj': 'L','Ł': 'L','LJ': 'LJ','Ḿ': 'M','Ṁ': 'M','Ṃ': 'M','Ɱ': 'M','Ń': 'N','Ň': 'N','Ņ': 'N','Ṋ': 'N','Ṅ': 'N','Ṇ': 'N','Ǹ': 'N','Ɲ': 'N','Ṉ': 'N','Ƞ': 'N','Nj': 'N','Ñ': 'N','NJ': 'NJ','Ó': 'O','Ŏ': 'O','Ǒ': 'O','Ô': 'O','Ố': 'O','Ộ': 'O','Ồ': 'O','Ổ': 'O','Ỗ': 'O','Ö': 'O','Ȫ': 'O','Ȯ': 'O','Ȱ': 'O','Ọ': 'O','Ő': 'O','Ȍ': 'O','Ò': 'O','Ỏ': 'O','Ơ': 'O','Ớ': 'O','Ợ': 'O','Ờ': 'O','Ở': 'O','Ỡ': 'O','Ȏ': 'O','Ꝋ': 'O','Ꝍ': 'O','Ō': 'O','Ṓ': 'O','Ṑ': 'O','Ɵ': 'O','Ǫ': 'O','Ǭ': 'O','Ø': 'O','Ǿ': 'O','Õ': 'O','Ṍ': 'O','Ṏ': 'O','Ȭ': 'O','Ƣ': 'OI','Ꝏ': 'OO','Ɛ': 'E','Ɔ': 'O','Ȣ': 'OU','Ṕ': 'P','Ṗ': 'P','Ꝓ': 'P','Ƥ': 'P','Ꝕ': 'P','Ᵽ': 'P','Ꝑ': 'P','Ꝙ': 'Q','Ꝗ': 'Q','Ŕ': 'R','Ř': 'R','Ŗ': 'R','Ṙ': 'R','Ṛ': 'R','Ṝ': 'R','Ȑ': 'R','Ȓ': 'R','Ṟ': 'R','Ɍ': 'R','Ɽ': 'R','Ꜿ': 'C','Ǝ': 'E','Ś': 'S','Ṥ': 'S','Š': 'S','Ṧ': 'S','Ş': 'S','Ŝ': 'S','Ș': 'S','Ṡ': 'S','Ṣ': 'S','Ṩ': 'S','ẞ': 'SS','Ť': 'T','Ţ': 'T','Ṱ': 'T','Ț': 'T','Ⱦ': 'T','Ṫ': 'T','Ṭ': 'T','Ƭ': 'T','Ṯ': 'T','Ʈ': 'T','Ŧ': 'T','Ɐ': 'A','Ꞁ': 'L','Ɯ': 'M','Ʌ': 'V','Ꜩ': 'TZ','Ú': 'U','Ŭ': 'U','Ǔ': 'U','Û': 'U','Ṷ': 'U','Ü': 'U','Ǘ': 'U','Ǚ': 'U','Ǜ': 'U','Ǖ': 'U','Ṳ': 'U','Ụ': 'U','Ű': 'U','Ȕ': 'U','Ù': 'U','Ủ': 'U','Ư': 'U','Ứ': 'U','Ự': 'U','Ừ': 'U','Ử': 'U','Ữ': 'U','Ȗ': 'U','Ū': 'U','Ṻ': 'U','Ų': 'U','Ů': 'U','Ũ': 'U','Ṹ': 'U','Ṵ': 'U','Ꝟ': 'V','Ṿ': 'V','Ʋ': 'V','Ṽ': 'V','Ꝡ': 'VY','Ẃ': 'W','Ŵ': 'W','Ẅ': 'W','Ẇ': 'W','Ẉ': 'W','Ẁ': 'W','Ⱳ': 'W','Ẍ': 'X','Ẋ': 'X','Ý': 'Y','Ŷ': 'Y','Ÿ': 'Y','Ẏ': 'Y','Ỵ': 'Y','Ỳ': 'Y','Ƴ': 'Y','Ỷ': 'Y','Ỿ': 'Y','Ȳ': 'Y','Ɏ': 'Y','Ỹ': 'Y','Ź': 'Z','Ž': 'Z','Ẑ': 'Z','Ⱬ': 'Z','Ż': 'Z','Ẓ': 'Z','Ȥ': 'Z','Ẕ': 'Z','Ƶ': 'Z','IJ': 'IJ','Œ': 'OE','ᴀ': 'A','ᴁ': 'AE','ʙ': 'B','ᴃ': 'B','ᴄ': 'C','ᴅ': 'D','ᴇ': 'E','ꜰ': 'F','ɢ': 'G','ʛ': 'G','ʜ': 'H','ɪ': 'I','ʁ': 'R','ᴊ': 'J','ᴋ': 'K','ʟ': 'L','ᴌ': 'L','ᴍ': 'M','ɴ': 'N','ᴏ': 'O','ɶ': 'OE','ᴐ': 'O','ᴕ': 'OU','ᴘ': 'P','ʀ': 'R','ᴎ': 'N','ᴙ': 'R','ꜱ': 'S','ᴛ': 'T','ⱻ': 'E','ᴚ': 'R','ᴜ': 'U','ᴠ': 'V','ᴡ': 'W','ʏ': 'Y','ᴢ': 'Z','á': 'a','ă': 'a','ắ': 'a','ặ': 'a','ằ': 'a','ẳ': 'a','ẵ': 'a','ǎ': 'a','â': 'a','ấ': 'a','ậ': 'a','ầ': 'a','ẩ': 'a','ẫ': 'a','ä': 'a','ǟ': 'a','ȧ': 'a','ǡ': 'a','ạ': 'a','ȁ': 'a','à': 'a','ả': 'a','ȃ': 'a','ā': 'a','ą': 'a','ᶏ': 'a','ẚ': 'a','å': 'a','ǻ': 'a','ḁ': 'a','ⱥ': 'a','ã': 'a','ꜳ': 'aa','æ': 'ae','ǽ': 'ae','ǣ': 'ae','ꜵ': 'ao','ꜷ': 'au','ꜹ': 'av','ꜻ': 'av','ꜽ': 'ay','ḃ': 'b','ḅ': 'b','ɓ': 'b','ḇ': 'b','ᵬ': 'b','ᶀ': 'b','ƀ': 'b','ƃ': 'b','ɵ': 'o','ć': 'c','č': 'c','ç': 'c','ḉ': 'c','ĉ': 'c','ɕ': 'c','ċ': 'c','ƈ': 'c','ȼ': 'c','ď': 'd','ḑ': 'd','ḓ': 'd','ȡ': 'd','ḋ': 'd','ḍ': 'd','ɗ': 'd','ᶑ': 'd','ḏ': 'd','ᵭ': 'd','ᶁ': 'd','đ': 'd','ɖ': 'd','ƌ': 'd','ı': 'i','ȷ': 'j','ɟ': 'j','ʄ': 'j','dz': 'dz','dž': 'dz','é': 'e','ĕ': 'e','ě': 'e','ȩ': 'e','ḝ': 'e','ê': 'e','ế': 'e','ệ': 'e','ề': 'e','ể': 'e','ễ': 'e','ḙ': 'e','ë': 'e','ė': 'e','ẹ': 'e','ȅ': 'e','è': 'e','ẻ': 'e','ȇ': 'e','ē': 'e','ḗ': 'e','ḕ': 'e','ⱸ': 'e','ę': 'e','ᶒ': 'e','ɇ': 'e','ẽ': 'e','ḛ': 'e','ꝫ': 'et','ḟ': 'f','ƒ': 'f','ᵮ': 'f','ᶂ': 'f','ǵ': 'g','ğ': 'g','ǧ': 'g','ģ': 'g','ĝ': 'g','ġ': 'g','ɠ': 'g','ḡ': 'g','ᶃ': 'g','ǥ': 'g','ḫ': 'h','ȟ': 'h','ḩ': 'h','ĥ': 'h','ⱨ': 'h','ḧ': 'h','ḣ': 'h','ḥ': 'h','ɦ': 'h','ẖ': 'h','ħ': 'h','ƕ': 'hv','í': 'i','ĭ': 'i','ǐ': 'i','î': 'i','ï': 'i','ḯ': 'i','ị': 'i','ȉ': 'i','ì': 'i','ỉ': 'i','ȋ': 'i','ī': 'i','į': 'i','ᶖ': 'i','ɨ': 'i','ĩ': 'i','ḭ': 'i','ꝺ': 'd','ꝼ': 'f','ᵹ': 'g','ꞃ': 'r','ꞅ': 's','ꞇ': 't','ꝭ': 'is','ǰ': 'j','ĵ': 'j','ʝ': 'j','ɉ': 'j','ḱ': 'k','ǩ': 'k','ķ': 'k','ⱪ': 'k','ꝃ': 'k','ḳ': 'k','ƙ': 'k','ḵ': 'k','ᶄ': 'k','ꝁ': 'k','ꝅ': 'k','ĺ': 'l','ƚ': 'l','ɬ': 'l','ľ': 'l','ļ': 'l','ḽ': 'l','ȴ': 'l','ḷ': 'l','ḹ': 'l','ⱡ': 'l','ꝉ': 'l','ḻ': 'l','ŀ': 'l','ɫ': 'l','ᶅ': 'l','ɭ': 'l','ł': 'l','lj': 'lj','ſ': 's','ẜ': 's','ẛ': 's','ẝ': 's','ḿ': 'm','ṁ': 'm','ṃ': 'm','ɱ': 'm','ᵯ': 'm','ᶆ': 'm','ń': 'n','ň': 'n','ņ': 'n','ṋ': 'n','ȵ': 'n','ṅ': 'n','ṇ': 'n','ǹ': 'n','ɲ': 'n','ṉ': 'n','ƞ': 'n','ᵰ': 'n','ᶇ': 'n','ɳ': 'n','ñ': 'n','nj': 'nj','ó': 'o','ŏ': 'o','ǒ': 'o','ô': 'o','ố': 'o','ộ': 'o','ồ': 'o','ổ': 'o','ỗ': 'o','ö': 'o','ȫ': 'o','ȯ': 'o','ȱ': 'o','ọ': 'o','ő': 'o','ȍ': 'o','ò': 'o','ỏ': 'o','ơ': 'o','ớ': 'o','ợ': 'o','ờ': 'o','ở': 'o','ỡ': 'o','ȏ': 'o','ꝋ': 'o','ꝍ': 'o','ⱺ': 'o','ō': 'o','ṓ': 'o','ṑ': 'o','ǫ': 'o','ǭ': 'o','ø': 'o','ǿ': 'o','õ': 'o','ṍ': 'o','ṏ': 'o','ȭ': 'o','ƣ': 'oi','ꝏ': 'oo','ɛ': 'e','ᶓ': 'e','ɔ': 'o','ᶗ': 'o','ȣ': 'ou','ṕ': 'p','ṗ': 'p','ꝓ': 'p','ƥ': 'p','ᵱ': 'p','ᶈ': 'p','ꝕ': 'p','ᵽ': 'p','ꝑ': 'p','ꝙ': 'q','ʠ': 'q','ɋ': 'q','ꝗ': 'q','ŕ': 'r','ř': 'r','ŗ': 'r','ṙ': 'r','ṛ': 'r','ṝ': 'r','ȑ': 'r','ɾ': 'r','ᵳ': 'r','ȓ': 'r','ṟ': 'r','ɼ': 'r','ᵲ': 'r','ᶉ': 'r','ɍ': 'r','ɽ': 'r','ↄ': 'c','ꜿ': 'c','ɘ': 'e','ɿ': 'r','ś': 's','ṥ': 's','š': 's','ṧ': 's','ş': 's','ŝ': 's','ș': 's','ṡ': 's','ṣ': 's','ṩ': 's','ʂ': 's','ᵴ': 's','ᶊ': 's','ȿ': 's','ɡ': 'g','ß': 'ss','ᴑ': 'o','ᴓ': 'o','ᴝ': 'u','ť': 't','ţ': 't','ṱ': 't','ț': 't','ȶ': 't','ẗ': 't','ⱦ': 't','ṫ': 't','ṭ': 't','ƭ': 't','ṯ': 't','ᵵ': 't','ƫ': 't','ʈ': 't','ŧ': 't','ᵺ': 'th','ɐ': 'a','ᴂ': 'ae','ǝ': 'e','ᵷ': 'g','ɥ': 'h','ʮ': 'h','ʯ': 'h','ᴉ': 'i','ʞ': 'k','ꞁ': 'l','ɯ': 'm','ɰ': 'm','ᴔ': 'oe','ɹ': 'r','ɻ': 'r','ɺ': 'r','ⱹ': 'r','ʇ': 't','ʌ': 'v','ʍ': 'w','ʎ': 'y','ꜩ': 'tz','ú': 'u','ŭ': 'u','ǔ': 'u','û': 'u','ṷ': 'u','ü': 'u','ǘ': 'u','ǚ': 'u','ǜ': 'u','ǖ': 'u','ṳ': 'u','ụ': 'u','ű': 'u','ȕ': 'u','ù': 'u','ủ': 'u','ư': 'u','ứ': 'u','ự': 'u','ừ': 'u','ử': 'u','ữ': 'u','ȗ': 'u','ū': 'u','ṻ': 'u','ų': 'u','ᶙ': 'u','ů': 'u','ũ': 'u','ṹ': 'u','ṵ': 'u','ᵫ': 'ue','ꝸ': 'um','ⱴ': 'v','ꝟ': 'v','ṿ': 'v','ʋ': 'v','ᶌ': 'v','ⱱ': 'v','ṽ': 'v','ꝡ': 'vy','ẃ': 'w','ŵ': 'w','ẅ': 'w','ẇ': 'w','ẉ': 'w','ẁ': 'w','ⱳ': 'w','ẘ': 'w','ẍ': 'x','ẋ': 'x','ᶍ': 'x','ý': 'y','ŷ': 'y','ÿ': 'y','ẏ': 'y','ỵ': 'y','ỳ': 'y','ƴ': 'y','ỷ': 'y','ỿ': 'y','ȳ': 'y','ẙ': 'y','ɏ': 'y','ỹ': 'y','ź': 'z','ž': 'z','ẑ': 'z','ʑ': 'z','ⱬ': 'z','ż': 'z','ẓ': 'z','ȥ': 'z','ẕ': 'z','ᵶ': 'z','ᶎ': 'z','ʐ': 'z','ƶ': 'z','ɀ': 'z','ff': 'ff','ffi': 'ffi','ffl': 'ffl','fi': 'fi','fl': 'fl','ij': 'ij','œ': 'oe','st': 'st','ₐ': 'a','ₑ': 'e','ᵢ': 'i','ⱼ': 'j','ₒ': 'o','ᵣ': 'r','ᵤ': 'u','ᵥ': 'v','ₓ': 'x','Ё': 'YO', 'Й': 'I', 'Ц': 'TS', 'У': 'U', 'К': 'K', 'Е': 'E', 'Н': 'N', 'Г': 'G', 'Ш': 'SH', 'Щ': 'SCH', 'З': 'Z', 'Х': 'H', 'Ъ': '', 'ё': 'yo', 'й': 'i', 'ц': 'ts', 'у': 'u', 'к': 'k', 'е': 'e', 'н': 'n', 'г': 'g', 'ш': 'sh', 'щ': 'sch', 'з': 'z', 'х': 'h', 'ъ': '', 'Ф': 'F', 'Ы': 'I', 'В': 'V', 'А': 'A', 'П': 'P', 'Р': 'R', 'О': 'O', 'Л': 'L', 'Д': 'D', 'Ж': 'ZH', 'Э': 'E', 'ф': 'f', 'ы': 'i', 'в': 'v', 'а': 'a', 'п': 'p', 'р': 'r', 'о': 'o', 'л': 'l', 'д': 'd', 'ж': 'zh', 'э': 'e', 'Я': 'Ya', 'Ч': 'CH', 'С': 'S', 'М': 'M', 'И': 'I', 'Т': 'T', 'Ь': '', 'Б': 'B', 'Ю': 'YU', 'я': 'ya', 'ч': 'ch', 'с': 's', 'м': 'm', 'и': 'i', 'т': 't', 'ь': '', 'б': 'b', 'ю': 'yu'}; - Config.CountryCodes = [["AB","country_select_modal_country_ab","+7 840","+7 940","+995 44"],["AF","country_select_modal_country_af","+93"],["AX","country_select_modal_country_ax","+358 18"],["AL","country_select_modal_country_al","+355"],["DZ","country_select_modal_country_dz","+213"],["AS","country_select_modal_country_as","+1 684"],["AD","country_select_modal_country_ad","+376"],["AO","country_select_modal_country_ao","+244"],["AI","country_select_modal_country_ai","+1 264"],["AG","country_select_modal_country_ag","+1 268"],["AR","country_select_modal_country_ar","+54"],["AM","country_select_modal_country_am","+374"],["AW","country_select_modal_country_aw","+297"],["SH","country_select_modal_country_sh_ac","+247"],["AU","country_select_modal_country_au","+61"],["AU","country_select_modal_country_au_et","+672"],["AT","country_select_modal_country_at","+43"],["AZ","country_select_modal_country_az","+994"],["BS","country_select_modal_country_bs","+1 242"],["BH","country_select_modal_country_bh","+973"],["BD","country_select_modal_country_bd","+880"],["BB","country_select_modal_country_bb","+1 246"],["AG","country_select_modal_country_ag_bar","+1 268"],["BY","country_select_modal_country_by","+375"],["BE","country_select_modal_country_be","+32"],["BZ","country_select_modal_country_bz","+501"],["BJ","country_select_modal_country_bj","+229"],["BM","country_select_modal_country_bm","+1 441"],["BT","country_select_modal_country_bt","+975"],["BO","country_select_modal_country_bo","+591"],["BQ","country_select_modal_country_bq","+599 7"],["BA","country_select_modal_country_ba","+387"],["BW","country_select_modal_country_bw","+267"],["BR","country_select_modal_country_br","+55"],["IO","country_select_modal_country_io","+246"],["VG","country_select_modal_country_vg","+1 284"],["BN","country_select_modal_country_bn","+673"],["BG","country_select_modal_country_bg","+359"],["BF","country_select_modal_country_bf","+226"],["MY","country_select_modal_country_mm","+95"],["BI","country_select_modal_country_bi","+257"],["KH","country_select_modal_country_kh","+855"],["CM","country_select_modal_country_cm","+237"],["CA","country_select_modal_country_ca","+1"],["CV","country_select_modal_country_cv","+238"],["KY","country_select_modal_country_ky","+1 345"],["CF","country_select_modal_country_cf","+236"],["TD","country_select_modal_country_td","+235"],["CL","country_select_modal_country_cl","+56"],["CN","country_select_modal_country_cn","+86"],["CX","country_select_modal_country_cx","+61"],["CC","country_select_modal_country_cc","+61"],["CO","country_select_modal_country_co","+57"],["KM","country_select_modal_country_km","+269"],["CG","country_select_modal_country_cg","+242"],["CD","country_select_modal_country_cd","+243"],["CK","country_select_modal_country_ck","+682"],["CR","country_select_modal_country_cr","+506"],["CI","country_select_modal_country_ci","+225"],["HR","country_select_modal_country_hr","+385"],["CU","country_select_modal_country_cu","+53"],["CW","country_select_modal_country_cw","+599 9"],["CY","country_select_modal_country_cy","+357"],["CZ","country_select_modal_country_cz","+420"],["DK","country_select_modal_country_dk","+45"],["DG","country_select_modal_country_dg","+246"],["DJ","country_select_modal_country_dj","+253"],["DM","country_select_modal_country_dm","+1 767"],["DO","country_select_modal_country_do","+1 809","+1 829","+1 849"],["TL","country_select_modal_country_tl","+670"],["EC","country_select_modal_country_ec","+593"],["EG","country_select_modal_country_eg","+20"],["SV","country_select_modal_country_sv","+503"],["GQ","country_select_modal_country_gq","+240"],["ER","country_select_modal_country_er","+291"],["EE","country_select_modal_country_ee","+372"],["ET","country_select_modal_country_et","+251"],["FK","country_select_modal_country_fk","+500"],["FO","country_select_modal_country_fo","+298"],["FJ","country_select_modal_country_fj","+679"],["FI","country_select_modal_country_fi","+358"],["FR","country_select_modal_country_fr","+33"],["GF","country_select_modal_country_gf","+594"],["PF","country_select_modal_country_pf","+689"],["GA","country_select_modal_country_ga","+241"],["GM","country_select_modal_country_gm","+220"],["GE","country_select_modal_country_ge","+995"],["DE","country_select_modal_country_de","+49"],["GH","country_select_modal_country_gh","+233"],["GI","country_select_modal_country_gi","+350"],["GR","country_select_modal_country_gr","+30"],["GL","country_select_modal_country_gl","+299"],["GD","country_select_modal_country_gd","+1 473"],["GP","country_select_modal_country_gp","+590"],["GU","country_select_modal_country_gu","+1 671"],["GT","country_select_modal_country_gt","+502"],["GG","country_select_modal_country_gg","+44"],["GN","country_select_modal_country_gn","+224"],["GW","country_select_modal_country_gw","+245"],["GY","country_select_modal_country_gy","+592"],["HT","country_select_modal_country_ht","+509"],["HN","country_select_modal_country_hn","+504"],["HK","country_select_modal_country_hk","+852"],["HU","country_select_modal_country_hu","+36"],["IS","country_select_modal_country_is","+354"],["IN","country_select_modal_country_in","+91"],["ID","country_select_modal_country_id","+62"],["IR","country_select_modal_country_ir","+98"],["IQ","country_select_modal_country_iq","+964"],["IE","country_select_modal_country_ie","+353"],["IL","country_select_modal_country_il","+972"],["IT","country_select_modal_country_it","+39"],["JM","country_select_modal_country_jm","+1 876"],["SJ","country_select_modal_country_sj","+47 79"],["JP","country_select_modal_country_jp","+81"],["JE","country_select_modal_country_je","+44"],["JO","country_select_modal_country_jo","+962"],["KZ","country_select_modal_country_kz","+7 6","+7 7"],["KE","country_select_modal_country_ke","+254"],["KI","country_select_modal_country_ki","+686"],["KP","country_select_modal_country_kp","+850"],["KR","country_select_modal_country_kr","+82"],["KW","country_select_modal_country_kw","+965"],["KG","country_select_modal_country_kg","+996"],["LA","country_select_modal_country_la","+856"],["LV","country_select_modal_country_lv","+371"],["LB","country_select_modal_country_lb","+961"],["LS","country_select_modal_country_ls","+266"],["LR","country_select_modal_country_lr","+231"],["LY","country_select_modal_country_ly","+218"],["LI","country_select_modal_country_li","+423"],["LT","country_select_modal_country_lt","+370"],["LU","country_select_modal_country_lu","+352"],["MO","country_select_modal_country_mo","+853"],["MK","country_select_modal_country_mk","+389"],["MG","country_select_modal_country_mg","+261"],["MW","country_select_modal_country_mw","+265"],["MY","country_select_modal_country_my","+60"],["MV","country_select_modal_country_mv","+960"],["ML","country_select_modal_country_ml","+223"],["MT","country_select_modal_country_mt","+356"],["MH","country_select_modal_country_mh","+692"],["MQ","country_select_modal_country_mq","+596"],["MR","country_select_modal_country_mr","+222"],["MU","country_select_modal_country_mu","+230"],["YT","country_select_modal_country_yt","+262"],["MX","country_select_modal_country_mx","+52"],["FM","country_select_modal_country_fm","+691"],["MD","country_select_modal_country_md","+373"],["MC","country_select_modal_country_mc","+377"],["MN","country_select_modal_country_mn","+976"],["ME","country_select_modal_country_me","+382"],["MS","country_select_modal_country_ms","+1 664"],["MA","country_select_modal_country_ma","+212"],["MZ","country_select_modal_country_mz","+258"],["NA","country_select_modal_country_na","+264"],["NR","country_select_modal_country_nr","+674"],["NP","country_select_modal_country_np","+977"],["NL","country_select_modal_country_nl","+31"],["NC","country_select_modal_country_nc","+687"],["NZ","country_select_modal_country_nz","+64"],["NI","country_select_modal_country_ni","+505"],["NE","country_select_modal_country_ne","+227"],["NG","country_select_modal_country_ng","+234"],["NU","country_select_modal_country_nu","+683"],["NF","country_select_modal_country_nf","+672"],["MP","country_select_modal_country_mp","+1 670"],["NO","country_select_modal_country_no","+47"],["OM","country_select_modal_country_om","+968"],["PK","country_select_modal_country_pk","+92"],["PW","country_select_modal_country_pw","+680"],["PS","country_select_modal_country_ps","+970"],["PA","country_select_modal_country_pa","+507"],["PG","country_select_modal_country_pg","+675"],["PY","country_select_modal_country_py","+595"],["PE","country_select_modal_country_pe","+51"],["PH","country_select_modal_country_ph","+63"],["PN","country_select_modal_country_pn","+64"],["PL","country_select_modal_country_pl","+48"],["PT","country_select_modal_country_pt","+351"],["PR","country_select_modal_country_pr","+1 787","+1 939"],["QA","country_select_modal_country_qa","+974"],["RE","country_select_modal_country_re","+262"],["RO","country_select_modal_country_ro","+40"],["RU","country_select_modal_country_ru","+7"],["RW","country_select_modal_country_rw","+250"],["BL","country_select_modal_country_bl","+590"],["SH","country_select_modal_country_sh","+290"],["KN","country_select_modal_country_kn","+1 869"],["LC","country_select_modal_country_lc","+1 758"],["MF","country_select_modal_country_mf","+590"],["PM","country_select_modal_country_pm","+508"],["VC","country_select_modal_country_vc","+1 784"],["WS","country_select_modal_country_ws","+685"],["SM","country_select_modal_country_sm","+378"],["ST","country_select_modal_country_st","+239"],["SA","country_select_modal_country_sa","+966"],["SN","country_select_modal_country_sn","+221"],["RS","country_select_modal_country_rs","+381"],["SC","country_select_modal_country_sc","+248"],["SL","country_select_modal_country_sl","+232"],["SG","country_select_modal_country_sg","+65"],["BQ","country_select_modal_country_nl_bq3","+599 3"],["SX","country_select_modal_country_sx","+1 721"],["SK","country_select_modal_country_sk","+421"],["SI","country_select_modal_country_si","+386"],["SB","country_select_modal_country_sb","+677"],["SO","country_select_modal_country_so","+252"],["ZA","country_select_modal_country_za","+27"],["GS","country_select_modal_country_gs","+500"],[false,"country_select_modal_country_ge_so","+995 34"],["SS","country_select_modal_country_ss","+211"],["ES","country_select_modal_country_es","+34"],["LK","country_select_modal_country_lk","+94"],["SD","country_select_modal_country_sd","+249"],["SR","country_select_modal_country_sr","+597"],["SJ","country_select_modal_country_sj_no","+47 79"],["SZ","country_select_modal_country_sz","+268"],["SE","country_select_modal_country_se","+46"],["CH","country_select_modal_country_ch","+41"],["SY","country_select_modal_country_sy","+963"],["TW","country_select_modal_country_tw","+886"],["TJ","country_select_modal_country_tj","+992"],["TZ","country_select_modal_country_tz","+255"],["TH","country_select_modal_country_th","+66"],["TG","country_select_modal_country_tg","+228"],["TK","country_select_modal_country_tk","+690"],["TO","country_select_modal_country_to","+676"],["TT","country_select_modal_country_tt","+1 868"],["TN","country_select_modal_country_tn","+216"],["TR","country_select_modal_country_tr","+90"],["TM","country_select_modal_country_tm","+993"],["TC","country_select_modal_country_tc","+1 649"],["TV","country_select_modal_country_tv","+688"],["UG","country_select_modal_country_ug","+256"],["UA","country_select_modal_country_ua","+380"],["AE","country_select_modal_country_ae","+971"],["UK","country_select_modal_country_uk","+44"],["US","country_select_modal_country_us","+1"],["UY","country_select_modal_country_uy","+598"],["VI","country_select_modal_country_vi","+1 340"],["UZ","country_select_modal_country_uz","+998"],["VU","country_select_modal_country_vu","+678"],["VE","country_select_modal_country_ve","+58"],["VA","country_select_modal_country_va","+39 06 698","+379"],["VN","country_select_modal_country_vn","+84"],["WF","country_select_modal_country_wf","+681"],["YE","country_select_modal_country_ye","+967"],["ZM","country_select_modal_country_zm","+260"],[false,"country_select_modal_country_tz_uk","+255"],["ZW","country_select_modal_country_zw","+263"]]; Config.LangCountries = {"es": "ES", "ru": "RU", "en": "US", "de": "DE", "it": "IT", "nl": "NL", "fr": "FR", "ca": "ES", "es-419": "MX", "ar": "SA", "he": "IL", "tr": "TR", "id": "ID", "pl": "PL"}; - - - - // ConfigStorage (function (window) { var keyPrefix = ''; diff --git a/app/js/services.js b/app/js/services.js index f176ba28..1f08cb82 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -3544,11 +3544,12 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) var regexAlphaNumericChars = "0-9\.\_" + regexAlphaChars; - // Regular Expression for URL validation by Diego Perini + // Based on Regular Expression for URL validation by Diego Perini var urlRegex = "((?:https?|ftp)://|mailto:)?" + // user:pass authentication "(?:\\S+(?::\\S*)?@)?" + "(?:" + + // sindresorhus/ip-regex "(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}" + "|" + // host name @@ -3556,12 +3557,12 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) // domain name "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*" + // TLD identifier - "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,24}))" + + "(?:\\.([a-z\\u00a1-\\uffff]{2,24}))" + ")" + // port number "(?::\\d{2,5})?" + // resource path - "(?:/(?:\\S*[^\s.;,(){}<>\"'])?)?"; + "(?:/(?:\\S*[^\\s.;,(\\[\\]{}<>\"'])?)?"; var regExp = new RegExp('(^|\\s)((?:https?://)?telegram\\.me/|@)([a-zA-Z\\d_]{5,32})|(' + urlRegex + ')|(\\n)|(' + emojiRegex + ')|(^|\\s)(#[' + regexAlphaNumericChars + ']{2,20})', 'i'); @@ -3643,33 +3644,62 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) '' ); } else { - var url = (match[5] ? '' : 'http://') + match[4]; - html.push( - '', - encodeEntities(match[4]), - '' - ); - if (options.extractUrlEmbed && - !options.extractedUrlEmbed) { - options.extractedUrlEmbed = findExternalEmbed(url); + var url = false, + protocol = match[5], + tld = match[6], + excluded = '', + test = ''; + + if (tld) { + if (Config.TLD.indexOf(tld.toLowerCase()) !== -1) { + protocol = protocol || 'http://'; + } + + if (protocol) { + test = checkBrackets(match[4]); + + if (test.length !== match[4].length) { + excluded = match[4].substring(test.length); + match[4] = test; + } + + url = (match[5] ? '' : protocol) + match[4]; + } + } else { + url = (match[5] ? '' : 'http://') + match[4]; + } + + if (url) { + html.push( + '', + encodeEntities(match[4]), + '', + excluded + ); + + if (options.extractUrlEmbed && + !options.extractedUrlEmbed) { + options.extractedUrlEmbed = findExternalEmbed(url); + } + } else { + html.push(encodeEntities(match[0])); } } } else { html.push(encodeEntities(match[0])); } - } - else if (match[6]) { // New line + else if (match[7]) { // New line if (!options.noLinebreaks) { html.push('
'); } else { html.push(' '); } } - else if (match[7]) { - if ((emojiCode = emojiMap[match[7]]) && + else if (match[8]) { + if ((emojiCode = emojiMap[match[8]]) && (emojiCoords = getEmojiSpritesheetCoords(emojiCode))) { emojiTitle = encodeEntities(emojiData[emojiCode][1][0]); @@ -3686,21 +3716,21 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) ':', emojiTitle, ':
' ); } else { - html.push(encodeEntities(match[7])); + html.push(encodeEntities(match[8])); } } - else if (match[9]) { + else if (match[10]) { if (!options.noLinks) { html.push( '', - encodeEntities(match[9]), + encodeEntities(match[10]), '' ); } else { html.push( - encodeEntities(match[9]) + encodeEntities(match[10]) ); } } @@ -3727,7 +3757,38 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) return $sce.trustAs('html', text); } - function findExternalEmbed (url) { + function checkBrackets(url) { + var urlLength = url.length, + urlOpenBrackets = url.split('(').length - 1, + urlCloseBrackets = url.split(')').length - 1; + + if (url.charAt(urlLength - 1) === ')') { + if (urlOpenBrackets > urlCloseBrackets) { + for (var j = urlLength - 1; j >= 0; j--) { + if (url.charAt(j) !== ')') { + break; + } else { + url = url.substring(0, j); + } + } + } else if (urlOpenBrackets < urlCloseBrackets) { + while (urlCloseBrackets - urlOpenBrackets) { + var lastCharIndex = url.length - 1; + + if (url.charAt(lastCharIndex) === ')') { + url = url.substring(0, lastCharIndex); + urlCloseBrackets--; + } else { + break; + } + } + } + } + + return url; + } + + function findExternalEmbed(url) { var embedUrlMatches, result; @@ -3788,8 +3849,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) while ((match = raw.match(regExp))) { text.push(raw.substr(0, match.index)); - if (match[6]) { - if ((emojiCode = emojiMap[match[6]]) && + if (match[7]) { + if ((emojiCode = emojiMap[match[7]]) && (emojiTitle = emojiData[emojiCode][1][0])) { text.push(':' + emojiTitle + ':'); } else { diff --git a/webogram.sublime-project b/webogram.sublime-project index 87cf2142..8948bf1e 100644 --- a/webogram.sublime-project +++ b/webogram.sublime-project @@ -4,8 +4,8 @@ { "follow_symlinks": true, "path": ".", - "folder_exclude_patterns": ["*dist", "node_modules", "releases"], - "file_exclude_patterns": ["*.zip", "templates.js"] + "folder_exclude_patterns": ["*dist", "node_modules", "releases"], + "file_exclude_patterns": ["*.zip", "templates.js"] } ] } From 6db82b8951c368064dc5b64c770f1ba73d566569 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Sat, 14 Feb 2015 21:24:05 +0300 Subject: [PATCH 12/12] URL parser improvements Added punny encoded domains support Simplified brackets checks --- app/js/services.js | 46 ++++++++++++++-------------------------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/app/js/services.js b/app/js/services.js index 1f08cb82..0160e2e9 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -3557,7 +3557,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) // domain name "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*" + // TLD identifier - "(?:\\.([a-z\\u00a1-\\uffff]{2,24}))" + + "(?:\\.(xn--[0-9a-z]{2,16}|[a-z\\u00a1-\\uffff]{2,24}))" + ")" + // port number "(?::\\d{2,5})?" + @@ -3647,25 +3647,24 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) var url = false, protocol = match[5], tld = match[6], - excluded = '', - test = ''; + excluded = ''; if (tld) { - if (Config.TLD.indexOf(tld.toLowerCase()) !== -1) { - protocol = protocol || 'http://'; + if (!protocol && (tld.substr(0, 4) === 'xn--' || Config.TLD.indexOf(tld.toLowerCase()) !== -1)) { + protocol = 'http://'; } if (protocol) { - test = checkBrackets(match[4]); + var balanced = checkBrackets(match[4]); - if (test.length !== match[4].length) { - excluded = match[4].substring(test.length); - match[4] = test; + if (balanced.length !== match[4].length) { + excluded = match[4].substring(balanced.length); + match[4] = balanced; } url = (match[5] ? '' : protocol) + match[4]; } - } else { + } else { // IP address url = (match[5] ? '' : 'http://') + match[4]; } @@ -3762,29 +3761,12 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) urlOpenBrackets = url.split('(').length - 1, urlCloseBrackets = url.split(')').length - 1; - if (url.charAt(urlLength - 1) === ')') { - if (urlOpenBrackets > urlCloseBrackets) { - for (var j = urlLength - 1; j >= 0; j--) { - if (url.charAt(j) !== ')') { - break; - } else { - url = url.substring(0, j); - } - } - } else if (urlOpenBrackets < urlCloseBrackets) { - while (urlCloseBrackets - urlOpenBrackets) { - var lastCharIndex = url.length - 1; - - if (url.charAt(lastCharIndex) === ')') { - url = url.substring(0, lastCharIndex); - urlCloseBrackets--; - } else { - break; - } - } - } + while (urlCloseBrackets > urlOpenBrackets && + url.charAt(urlLength - 1) === ')') { + url = url.substr(0, urlLength - 1); + urlCloseBrackets--; + urlLength--; } - return url; }