"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[2239],{70172:(e,t,n)=>{n.d(t,{Z:()=>Z});var o=n(60748),r=n(33555),l=n(6137),i=n(83716),c=n(863),s=n(18010),a=n(2155),d=n(46752),u=n(32340),m=n(6202),f=n(70692),p=n(59107),v=n(3657),g=n(57080);const h=(0,d.y)("Avatar");h.media=h("media"),h.icon=h("icon");const Z=(0,o.X$)((e=>{let{className:t,size:n="large",chat:Z,user:I,photo:C,userStatus:P,text:b,isSavedMessages:E,withVideo:y,noLoop:w,loopIndefinitely:A,lastSyncTime:B,forceVideo:N,animationLevel:T,noPersonalPhoto:k,observeIntersection:S,onClick:U}=e;const{loadFullUser:L}=(0,r.Sv)(),R=(0,o.sO)(null),O=(0,o.sO)(0),x=I&&(0,s.NB)(I),D=I&&(0,s.pK)(I.id),F=Z?.isForum;let V,q;const $=y&&!c.as&&T===i.zy8&&I?.isPremium&&I?.hasVideoAvatar,H=I?.fullInfo?.personalPhoto||I?.fullInfo?.profilePhoto||I?.fullInfo?.fallbackPhoto,j=H?.isVideo,K=(0,v.Op)(R,$&&j?S:void 0),M=K&&($||N&&C?.isVideo),_="jumbo"===n;E||x||(I&&!k?V=(0,s.RT)(I,_?"big":void 0):Z?V=(0,s.RT)(Z,_?"big":void 0):C&&(V=`photo${C.id}?size=m`,C.isVideo&&y&&(q=`videoAvatar${C.id}?size=u`)),j&&(q=(0,s.RT)(I,void 0,"video")));const z=(0,m.Z)(V,!1,l.IU.BlobUrl,B),X=(0,m.Z)(q,!M,l.IU.BlobUrl,B),J=Boolean(z||X),G=Boolean(K&&X&&M),Y=(0,f.Z)(J),W=!E&&I&&P&&(0,s.kM)(I,P),Q=(0,f.Z)(W),ee=(0,o.Ye)((()=>Q.split(" ").map((e=>"shown"===e?"online":`online-${e}`)).join(" ")),[Q]),te=(0,o.I4)((e=>{const t=e.currentTarget;X&&(A||(O.current+=1,(O.current>=3||w)&&(t.style.display="none")))}),[A,w,X]),ne=I?.id;(0,o.d4)((()=>{ne&&$&&!H&&L({userId:ne})}),[L,H,ne,$]);const oe=(0,p.Z)();let re;const le=I?(0,s.Js)(I):Z?(0,s.U)(oe,Z):b;if(E)re=o.ZP.createElement("i",{className:(0,d.Z)(h.icon,"icon-avatar-saved-messages"),role:"img","aria-label":le});else if(x)re=o.ZP.createElement("i",{className:(0,d.Z)(h.icon,"icon-avatar-deleted-account"),role:"img","aria-label":le});else if(D)re=o.ZP.createElement("i",{className:(0,d.Z)(h.icon,"icon-reply-filled"),role:"img","aria-label":le});else if(J)re=o.ZP.createElement(o.ZP.Fragment,null,o.ZP.createElement("img",{src:z,className:(0,d.Z)(h.media,"avatar-media",Y,X&&"poster"),alt:le,decoding:"async"}),G&&o.ZP.createElement(g.Z,{canPlay:!0,src:X,className:(0,d.Z)(h.media,"avatar-media","poster"),muted:!0,loop:A,autoPlay:!0,disablePictureInPicture:!0,playsInline:!0,onEnded:te}));else if(I){const e=(0,s.Js)(I);re=e?(0,a.Xv)(e,2):void 0}else if(Z){const e=(0,s.U)(oe,Z);re=e&&(0,a.Xv)(e,(0,s.YC)(Z.id)?2:1)}else b&&(re=(0,a.Xv)(b,2));const ie=(0,d.Z)(`Avatar size-${n}`,t,`color-bg-${(0,s.Rs)(I||Z)}`,E&&"saved-messages",x&&"deleted-account",D&&"replies-bot-account",F&&"forum",ee,U&&"interactive",!E&&!z&&"no-photo"),ce=Boolean(E||z),se=(0,o.I4)((e=>{U&&U(e,ce)}),[U,ce]),ae=(I||Z)&&(I||Z).id;return o.ZP.createElement("div",{ref:R,className:ie,onClick:se,"data-test-sender-id":i.Cgt?ae:void 0,"aria-label":"string"==typeof re?le:void 0},"string"==typeof re?(0,u.Z)(re,["jumbo"===n?"hq_emoji":"emoji"]):re)}))},22275:(e,t,n)=>{n.d(t,{Z:()=>d});var o=n(60748),r=n(33555),l=n(11192),i=n(18010),c=n(32340),s=n(59107),a=n(17551);const d=(0,o.X$)((0,r.c$)(((e,t)=>{let{userId:n}=t;const o=(0,l.jr)(e),r=n&&(0,l.dy)(e,n);return{chat:o,contactName:r?(0,i.Vl)(r):void 0}}))((e=>{let{isOpen:t,chat:n,userId:l,contactName:i,onClose:d}=e;const{deleteChatMember:u}=(0,r.Sv)(),m=(0,s.Z)(),f=(0,o.I4)((()=>{u({chatId:n.id,userId:l}),d()}),[n,u,d,l]);if(n&&l)return o.ZP.createElement(a.Z,{isOpen:t,onClose:d,title:m("GroupRemoved.Remove"),textParts:(0,c.Z)(m("PeerInfo.Confirm.RemovePeer",i)),confirmLabel:m("lng_box_remove"),confirmHandler:f,confirmIsDestructive:!0})})))},17551:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(60748),r=n(59107),l=n(72313),i=n(13103),c=n(231);const s=(0,o.X$)((e=>{let{isOpen:t,onClose:n,onCloseAnimationEnd:s,title:a,header:d,text:u,textParts:m,confirmLabel:f="Confirm",confirmHandler:p,confirmIsDestructive:v,areButtonsInColumn:g,children:h}=e;const Z=(0,r.Z)(),I=(0,o.sO)(null),C=(0,o.I4)((e=>{-1===e&&p()}),[p]),P=(0,l.Z)(I,t,C,".Button");return o.ZP.createElement(i.Z,{className:"confirm",title:a||Z("Telegram"),header:d,isOpen:t,onClose:n,onCloseAnimationEnd:s},u&&u.split("\\n").map((e=>o.ZP.createElement("p",null,e))),m||h,o.ZP.createElement("div",{className:g?"dialog-buttons-column":"dialog-buttons mt-2",ref:I,onKeyDown:P},o.ZP.createElement(c.Z,{className:"confirm-dialog-button",isText:!0,onClick:p,color:v?"danger":"primary"},f),o.ZP.createElement(c.Z,{className:"confirm-dialog-button",isText:!0,onClick:n},Z("Cancel"))))}))},21273:(e,t,n)=>{n.d(t,{Z:()=>m});var o=n(91713),r=n(60748),l=n(69118),i=n(87675),c=n(863),s=n(80036);const a=".ListItem",d=20,u=800,m=e=>{let{ref:t,className:n,items:m,itemSelector:f=a,preloadBackwards:p=d,sensitiveArea:v=u,withAbsolutePositioning:g,maxHeight:h,noScrollRestore:Z=!1,noScrollRestoreOnTop:I=!1,noFastList:C,cacheBuster:P,beforeChildren:b,children:E,onLoadMore:y,onScroll:w,onKeyDown:A,onDragOver:B,onDragLeave:N}=e,T=(0,r.sO)(null);t&&(T=t);const k=(0,r.sO)({}),[S,U]=(0,r.Ye)((()=>y?[(0,l.Ds)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];y({direction:o.Uq.Backwards,noScroll:e})}),1e3,!0,!1),(0,l.Ds)((()=>{y({direction:o.Uq.Forwards})}),1e3,!0,!1)]:[]),[y,m]);(0,r.d4)((()=>{if(!S)return;if(p>0&&(!m||m.length
{const e=T.current,t=k.current;let n;if(t.listItemElements=e.querySelectorAll(f),t.currentAnchor&&Array.from(t.listItemElements).includes(t.currentAnchor)){const{scrollTop:o}=e;n=o+(t.currentAnchor.getBoundingClientRect().top-t.currentAnchorTop)}else{const e=t.listItemElements[0];e&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}g||Z||I&&0===e.scrollTop||((0,i.Z)(e,n),t.isScrollTopJustUpdated=!0)}),[m,f,Z,I,P,g]);const L=(0,r.I4)((e=>{if(U&&S){const{isScrollTopJustUpdated:e,currentAnchor:t,currentAnchorTop:n}=k.current,o=k.current.listItemElements;if(e)return void(k.current.isScrollTopJustUpdated=!1);const r=o.length,l=T.current,{scrollTop:i,scrollHeight:c,offsetHeight:s}=l,a=i<=(r?o[0].offsetTop:0)+v,d=(r?o[r-1].offsetTop+o[r-1].offsetHeight:c)-(i+s)<=v;let u=!1;if(a){const e=o[0];if(e){const o=e.getBoundingClientRect().top,r=t?.offsetParent&&t!==e?t.getBoundingClientRect().top:o;t&&void 0!==n&&r>n&&(k.current.currentAnchor=e,k.current.currentAnchorTop=o,u=!0,U())}}if(d){const e=o[r-1];if(e){const o=e.getBoundingClientRect().top,r=t?.offsetParent&&t!==e?t.getBoundingClientRect().top:o;t&&void 0!==n&&r