mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-13 09:37:29 +01:00
2 lines
260 KiB
JavaScript
2 lines
260 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],Array(104).concat([function(e,t,a){"use strict";a.r(t),a.d(t,"MediaViewer",(function(){return me})),a.d(t,"ForwardPicker",(function(){return Ce})),a.d(t,"Dialogs",(function(){return Ne})),a.d(t,"Notifications",(function(){return Se})),a.d(t,"SafeLinkModal",(function(){return Me})),a.d(t,"HistoryCalendar",(function(){return Re})),a.d(t,"CalendarModal",(function(){return Te})),a.d(t,"DeleteMessageModal",(function(){return De})),a.d(t,"PinMessageModal",(function(){return Be})),a.d(t,"UnpinAllMessagesModal",(function(){return xe})),a.d(t,"MessageSelectToolbar",(function(){return He})),a.d(t,"LeftSearch",(function(){return It})),a.d(t,"Settings",(function(){return En})),a.d(t,"ContactList",(function(){return jn})),a.d(t,"NewChat",(function(){return wn})),a.d(t,"NewChatStep1",(function(){return yn})),a.d(t,"NewChatStep2",(function(){return kn})),a.d(t,"ArchivedChats",(function(){return In})),a.d(t,"ContextMenuContainer",(function(){return Gn})),a.d(t,"StickerSetModal",(function(){return qn})),a.d(t,"HeaderMenuContainer",(function(){return _n})),a.d(t,"MobileSearch",(function(){return Vn})),a.d(t,"AttachmentModal",(function(){return sc})),a.d(t,"PollModal",(function(){return oc})),a.d(t,"SymbolMenu",(function(){return Ac})),a.d(t,"AttachMenu",(function(){return Lc})),a.d(t,"MentionTooltip",(function(){return nc})),a.d(t,"StickerTooltip",(function(){return Tc})),a.d(t,"BotKeyboardMenu",(function(){return Rc})),a.d(t,"CustomSendMenu",(function(){return Dc})),a.d(t,"DropArea",(function(){return Bc.b})),a.d(t,"TextFormatter",(function(){return xc.a})),a.d(t,"EmojiTooltip",(function(){return Gc})),a.d(t,"InlineBotTooltip",(function(){return Wc})),a.d(t,"RightSearch",(function(){return Yc})),a.d(t,"StickerSearch",(function(){return Jc})),a.d(t,"GifSearch",(function(){return es})),a.d(t,"PollResults",(function(){return as})),a.d(t,"Management",(function(){return vs})),a.d(t,"PaymentModal",(function(){return zs})),a.d(t,"ReceiptModal",(function(){return $s}));var n=a(0),c=a(2),s=a(6),r=a(13),o=a(1),l=a(5),i=a(55),d=a(116),m=a(7),u=a(4),b=a(3),h=a(134),g=a(48),p=a(179),v=a(29),O=a(108),E=a(121),f=a(194),j=a(28),C=a(51),y=a(147);function k(e,t,a,n,c,s){const{mediaEl:l}=P(t,s);if(!l)return;const{width:m}=i.a.get(),{width:u,height:b}=Object(d.l)(e,c),{width:h,height:g}=Object(d.f)(u,b,n.width,n.height),p=(m-h)/2,v=function(e){const t=window.matchMedia(d.c);let a=4.125;e&&(a+=t.matches?.875:3.375);return a*d.d}(e)+(b-g)/2;let{top:O,left:E,width:f,height:j}=l.getBoundingClientRect();if([r.h.SharedMedia,r.h.Album,r.h.ScheduledAlbum,r.h.SearchResult].includes(t)){const e=function(e,t,a,n,c,s){if(e===t){const r=Math.max(c,s)*(e/t);n-=(r-c)/2,a-=(r-s)/2,c=r,s=r}else if(e>t){const a=c;n-=((c=s*(e/t))-a)/2}else if(t>e){const n=s;a-=((s=c*(t/e))-n)/2}return{top:a,left:n,width:c,height:s}}(h,g,O,E,f,j);O=e.top,E=e.left,f=e.width,j=e.height}const C=E+f/2-(p+h/2),y=O+j/2-(v+g/2),k=f/h,N=j/g,S=w(a||l);I(S,{top:v+"px",left:p+"px",width:h+"px",height:g+"px",transform:`translate3d(${C}px, ${y}px, 0) scale(${k}, ${N})`}),M(S,t),document.body.classList.add("ghost-animating"),requestAnimationFrame(()=>{document.body.appendChild(S),requestAnimationFrame(()=>{S.style.transform="",function(e){e.firstChild.style.objectFit="default",e.classList.remove("rounded-corners","circle")}(S),setTimeout(()=>{requestAnimationFrame(()=>{document.body.contains(S)&&document.body.removeChild(S),document.body.classList.remove("ghost-animating")})},200+o.c)})})}function N(e,t,a){const{container:n,mediaEl:c}=P(e,a);if(!c)return;const s=document.getElementById("MediaViewer").querySelector(".active .media-viewer-content img, .active .media-viewer-content video");if(!s||!c)return;const{top:l,left:d,width:m,height:u}=s.getBoundingClientRect(),{top:b,left:h,width:g,height:p}=c.getBoundingClientRect();let v=b;if(!function(e){if("none"===e.style.display)return!1;const t=e.getBoundingClientRect(),{height:a}=i.a.get();return t.top<=a&&t.top+t.height>=0}(n)){const{height:e}=i.a.get();v=b<l?-p:e}const O=d+m/2-(h+g/2),E=l+u/2-(v+p/2);le
|
||
|
//# sourceMappingURL=3.3a4485e9a79beb1e5853.js.map
|