telegram-tt/dist/2.487a7f249be37000c313.js

1 line
236 KiB
JavaScript
Raw Normal View History

2021-04-13 23:31:54 +02:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],Array(90).concat([function(e,t,a){"use strict";a.r(t),a.d(t,"MediaViewer",(function(){return he})),a.d(t,"ForwardPicker",(function(){return ye})),a.d(t,"Errors",(function(){return Se})),a.d(t,"Notifications",(function(){return we})),a.d(t,"CalendarModal",(function(){return Le})),a.d(t,"DeleteMessageModal",(function(){return Ae})),a.d(t,"PinMessageModal",(function(){return Te})),a.d(t,"UnpinAllMessagesModal",(function(){return Be})),a.d(t,"MessageSelectToolbar",(function(){return Ue})),a.d(t,"LeftSearch",(function(){return kt})),a.d(t,"Settings",(function(){return rn})),a.d(t,"ContactList",(function(){return ln})),a.d(t,"NewChat",(function(){return hn})),a.d(t,"NewChatStep1",(function(){return mn})),a.d(t,"NewChatStep2",(function(){return dn})),a.d(t,"ArchivedChats",(function(){return pn})),a.d(t,"ContextMenuContainer",(function(){return In})),a.d(t,"StickerSetModal",(function(){return wn})),a.d(t,"HeaderMenuContainer",(function(){return Mn})),a.d(t,"MobileSearch",(function(){return An})),a.d(t,"AttachmentModal",(function(){return qn})),a.d(t,"PollModal",(function(){return Hn})),a.d(t,"SymbolMenu",(function(){return pc})),a.d(t,"AttachMenu",(function(){return gc})),a.d(t,"MentionMenu",(function(){return zn})),a.d(t,"EmojiTooltip",(function(){return Ec})),a.d(t,"BotKeyboardMenu",(function(){return vc})),a.d(t,"CustomSendMenu",(function(){return Oc})),a.d(t,"DropArea",(function(){return fc.b})),a.d(t,"TextFormatter",(function(){return jc.a})),a.d(t,"RightSearch",(function(){return yc})),a.d(t,"StickerSearch",(function(){return Sc})),a.d(t,"GifSearch",(function(){return Ic})),a.d(t,"Statistics",(function(){return Lc})),a.d(t,"PollResults",(function(){return Tc})),a.d(t,"Management",(function(){return Zc})),a.d(t,"PaymentModal",(function(){return fr})),a.d(t,"ReceiptModal",(function(){return yr}));var n=a(0),c=a(2),r=a(5),s=a(18),l=a(1),o=a(7),i=a(103),m=a(6),d=a(4),u=a(3),h=a(127),b=a(42),p=a(165),g=a(29),E=a(97),v=a(112),O=a(168),f=a(106),j=a(135),C=a(14);var y=a(38),k=a(43),N=a(134),S=a(49);function I(e,t,a,n){const{mediaEl:c}=L(t,n);if(!c)return;const{width:r}=S.a.get();let o,m=!1;if(n){const{photo:e,video:t,webPage:a}=Object(d.v)(n);m=Boolean(t),o=t?Object(d.bb)(t):Object(d.R)(e||a.photo)}else o=i.a;const{width:u,height:h}=Object(i.j)(e,m),{width:b,height:p}=Object(i.e)(u,h,o.width,o.height),g=(r-b)/2,E=function(e){const t=window.matchMedia(i.b);let a=4.125;e&&(a+=t.matches?.875:3.375);return a*i.c}(e)+(h-p)/2;let{top:v,left:O,width:f,height:j}=c.getBoundingClientRect();if([s.h.SharedMedia,s.h.Album,s.h.ScheduledAlbum,s.h.SearchResult].includes(t)){const e=function(e,t,a,n,c,r){if(e===t){const s=Math.max(c,r)*(e/t);n-=(s-c)/2,a-=(s-r)/2,c=s,r=s}else if(e>t){const a=c;n-=((c=r*(e/t))-a)/2}else if(t>e){const n=r;a-=((r=c*(t/e))-n)/2}return{top:a,left:n,width:c,height:r}}(b,p,v,O,f,j);v=e.top,O=e.left,f=e.width,j=e.height}const C=O+f/2-(g+b/2),y=v+j/2-(E+p/2),k=f/b,N=j/p,I=P(a||c);F(I,{top:E+"px",left:g+"px",width:b+"px",height:p+"px",transform:`translate3d(${C}px, ${y}px, 0) scale(${k}, ${N})`}),A(I,t),document.body.classList.add("ghost-animating"),requestAnimationFrame(()=>{document.body.appendChild(I),requestAnimationFrame(()=>{I.style.transform="",function(e){e.firstChild.style.objectFit="default",e.classList.remove("rounded-corners","circle")}(I),setTimeout(()=>{requestAnimationFrame(()=>{document.body.removeChild(I),document.body.classList.remove("ghost-animating")})},200+l.c)})})}function w(e,t,a){const{container:n,mediaEl:c}=L(e,a);if(!c)return;const r=document.getElementById("MediaViewer").querySelector(".active .media-viewer-content img, .active .media-viewer-content video");if(!r||!c)return;const{top:o,left:i,width:m,height:d}=r.getBoundingClientRect(),{top:u,left:h,width:b,height:p}=c.getBoundingClientRect();let g=u;if(!function(e){if("none"===e.style.display)return!1;const t=e.getBoundingClientRect(),{height:a}=S.a.get();return t.top<=a&&t.top+t.height>=0}(n)){const{height:e}=S.a.get();g=u<o?-p:e}const E=i+m/2-(h+b/2),v=o+d/2-(g+p/2);let O=m/b,f=d/p;const