2 lines
22 KiB
JavaScript
2 lines
22 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[3735],{70172:(e,t,n)=>{n.d(t,{Z:()=>g});var o=n(60748),r=n(6137),i=n(83716),s=n(48670),l=n(2155),c=n(46752),a=n(32340),d=n(6202),u=n(70692),m=n(59107),f=n(39415),h=n(57080),p=n(25190);const v=(0,c.y)("Avatar");v.media=v("media"),v.icon=v("icon");const g=(0,o.X$)((e=>{let{className:t,size:n="large",chat:g,user:Z,photo:C,userStatus:w,text:I,isSavedMessages:P,withVideo:E,loopIndefinitely:b,lastSyncTime:y,noPersonalPhoto:L,onClick:M}=e;const x=(0,o.sO)(null),k=(0,o.sO)(0),T=Z&&(0,s.NB)(Z),S=Z&&(0,s.pK)(Z.id),N=g?.isForum;let O,B;const A=E&&C?.isVideo,D="jumbo"===n;P||T||(Z&&!L?O=(0,s.RT)(Z,D?"big":void 0):g?O=(0,s.RT)(g,D?"big":void 0):C&&(O=`photo${C.id}?size=m`,C.isVideo&&E&&(B=`videoAvatar${C.id}?size=u`)));const $=(0,d.Z)(O,!1,r.IU.BlobUrl,y),U=(0,d.Z)(B,!A,r.IU.BlobUrl,y),R=Boolean($||U),F=Boolean(U&&A),X=(0,u.Z)(R),H=!P&&Z&&w&&(0,s.kM)(Z,w),J=(0,u.Z)(H),j=(0,o.Ye)((()=>J.split(" ").map((e=>"shown"===e?"online":`online-${e}`)).join(" ")),[J]),K=(0,p.Z)((e=>{const t=e.currentTarget;U&&(b||(k.current+=1,k.current>=3&&(t.style.display="none")))})),Y=(0,m.Z)();let q;const V=Z?(0,s.Js)(Z):g?(0,s.U)(Y,g):I;if(P)q=o.ZP.createElement("i",{className:(0,c.Z)(v.icon,"icon","icon-avatar-saved-messages"),role:"img","aria-label":V});else if(T)q=o.ZP.createElement("i",{className:(0,c.Z)(v.icon,"icon","icon-avatar-deleted-account"),role:"img","aria-label":V});else if(S)q=o.ZP.createElement("i",{className:(0,c.Z)(v.icon,"icon","icon-reply-filled"),role:"img","aria-label":V});else if(R)q=o.ZP.createElement(o.ZP.Fragment,null,o.ZP.createElement("img",{src:$,className:(0,c.Z)(v.media,"avatar-media",X,U&&"poster"),alt:V,decoding:"async"}),F&&o.ZP.createElement(h.Z,{canPlay:!0,src:U,className:(0,c.Z)(v.media,"avatar-media","poster"),muted:!0,loop:b,autoPlay:!0,disablePictureInPicture:!0,playsInline:!0,onEnded:K}));else if(Z){const e=(0,s.Js)(Z);q=e?(0,l.Xv)(e,2):void 0}else if(g){const e=(0,s.U)(Y,g);q=e&&(0,l.Xv)(e,(0,s.YC)(g.id)?2:1)}else I&&(q=(0,l.Xv)(I,2));const _=(0,c.Z)(`Avatar size-${n}`,t,`color-bg-${(0,s.Rs)(Z||g)}`,P&&"saved-messages",T&&"deleted-account",S&&"replies-bot-account",N&&"forum",j,M&&"interactive",!P&&!$&&"no-photo"),z=Boolean(P||$),{handleClick:G,handleMouseDown:W}=(0,f.m)((e=>{M&&M(e,z)})),Q=(Z||g)&&(Z||g).id;return o.ZP.createElement("div",{ref:x,className:_,"data-test-sender-id":i.Cgt?Q:void 0,"aria-label":"string"==typeof q?V:void 0,onClick:G,onMouseDown:W},"string"==typeof q?(0,a.Z)(q,["jumbo"===n?"hq_emoji":"emoji"]):q)}))},50685:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n(60748),r=n(59107);const i=(0,o.X$)((e=>{let{fakeType:t}=e;const n=(0,r.Z)();return o.ZP.createElement("span",{className:"FakeIcon"},n("fake"===t?"FakeMessage":"ScamMessage"))}))},2153:(e,t,n)=>{n.d(t,{Z:()=>p});var o=n(60748),r=n(83716),i=n(32340),s=n(48670),l=n(46752),c=n(59107);const a={__html:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.3 2.9c.1.1.2.1.3.2.7.6 1.3 1.1 2 1.7.3.2.6.4.9.4.9.1 1.7.2 2.6.2.5 0 .6.1.7.7.1.9.1 1.8.2 2.6 0 .4.2.7.4 1 .6.7 1.1 1.3 1.7 2 .3.4.3.5 0 .8-.5.6-1.1 1.3-1.6 1.9-.3.3-.5.7-.5 1.2-.1.8-.2 1.7-.2 2.5 0 .4-.2.5-.6.6-.8 0-1.6.1-2.5.2-.5 0-1 .2-1.4.5-.6.5-1.3 1.1-1.9 1.6-.3.3-.5.3-.8 0-.7-.6-1.4-1.2-2-1.8-.3-.2-.6-.4-.9-.4-.9-.1-1.8-.2-2.7-.2-.4 0-.5-.2-.6-.5 0-.9-.1-1.7-.2-2.6 0-.4-.2-.8-.4-1.1-.6-.6-1.1-1.3-1.6-2-.4-.4-.3-.5 0-1 .6-.6 1.1-1.3 1.7-1.9.3-.3.4-.6.4-1 0-.8.1-1.6.2-2.5 0-.5.1-.6.6-.6.9-.1 1.7-.1 2.6-.2.4 0 .7-.2 1-.4.7-.6 1.4-1.2 2.1-1.7.1-.2.3-.3.5-.2z" style="fill: var(--color-fill)"/><path class="lol" d="M16.4 10.1l-.2.2-5.4 5.4c-.1.1-.2.2-.4 0l-2.6-2.6c-.2-.2-.1-.3 0-.4.2-.2.5-.6.7-.6.3 0 .5.4.7.6l1.1 1.1c.2.2.3.2.5 0l4.3-4.3c.2-.2.4-.3.6 0 .1.2.3.3.4.5.2 0 .3.1.3.1z" style="fill: var(--color-checkmark)"/></svg>'},d=()=>o.ZP.createElement("span",{className:"VerifiedIcon",dangerouslySetInnerHTML:a});var u=n(50685),m=n(96459),f=n(4863);const h="ysHMmXALnn0fgFRc7Bn7",p=(0,o.X$)((e=>{let{className:t,peer:n,noVerified:a,noFake:p,withEmojiStatus:v,emojiStatusSize:g,isSavedMessages:Z,noLoopLimit:C,onEmojiStatusClick:w,observeIntersection:I}=e;const P=(0,c.Z)(),E=(0,s.YC)(n.id),b=E?(0,s.Js)(n):(0,s.U)(P,n),y=E&&n.emojiStatus,L=E&&n.isPremium;return Z?o.ZP.createElement("div",{className:(0,l.Z)("title",h,t)},o.ZP.createElement("h3",null,P("SavedMessages"))):o.ZP.createElement("div",{className:(0,l.Z)("title",h,t)},o.ZP.createElement("h3",{dir:"auto",className:"fullName"},(0,i.Z)(b||"")),!a&&n.isVerified&&o.ZP.createElement(d,null),!p&&n.fakeType&&o.ZP.createElement(u.Z,{fakeType:n.fakeType}),v&&y&&o.ZP.createElement(m.Z,{documentId:y.documentId,size:g,loopLimit:C?void 0:r.y3O,observeIntersectionForLoading:I,onClick:w}),v&&!y&&L&&o.ZP.createElement(f.Z,null))}))},4863:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n(60748),r=n(26926),i=n(46752);const s={__html:'<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.63869 12.1902L3.50621 14.1092C3.18049 14.3087 2.75468 14.2064 2.55515 13.8807C2.45769 13.7216 2.42864 13.5299 2.47457 13.3491L2.95948 11.4405C3.13452 10.7515 3.60599 10.1756 4.24682 9.86791L7.6642 8.22716C7.82352 8.15067 7.89067 7.95951 7.81418 7.80019C7.75223 7.67116 7.61214 7.59896 7.47111 7.62338L3.66713 8.28194C2.89387 8.41581 2.1009 8.20228 1.49941 7.69823L0.297703 6.69116C0.00493565 6.44581 -0.0335059 6.00958 0.211842 5.71682C0.33117 5.57442 0.502766 5.48602 0.687982 5.47153L4.35956 5.18419C4.61895 5.16389 4.845 4.99974 4.94458 4.75937L6.36101 1.3402C6.5072 0.987302 6.91179 0.819734 7.26469 0.965925C7.43413 1.03612 7.56876 1.17075 7.63896 1.3402L9.05539 4.75937C9.15496 4.99974 9.38101 5.16389 9.6404 5.18419L13.3322 5.47311C13.713 5.50291 13.9975 5.83578 13.9677 6.2166C13.9534 6.39979 13.8667 6.56975 13.7269 6.68896L10.9114 9.08928C10.7131 9.25826 10.6267 9.52425 10.6876 9.77748L11.5532 13.3733C11.6426 13.7447 11.414 14.1182 11.0427 14.2076C10.8642 14.2506 10.676 14.2208 10.5195 14.1249L7.36128 12.1902C7.13956 12.0544 6.8604 12.0544 6.63869 12.1902Z" fill="var(--color-fill)"/></svg>'},l={},c=(0,o.X$)((e=>{let{withGradient:t,big:n,className:c,onClick:a}=e;const d=(0,o.Ye)((()=>t?function(){const e=(0,r.Z)(l);return{__html:`<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="${e}" x1="3" y1="63.5001" x2="84.1475" y2="-1.32262" gradientUnits="userSpaceOnUse"><stop stop-color="#6B93FF"/><stop offset="0.439058" stop-color="#976FFF"/><stop offset="1" stop-color="#E46ACE"/></linearGradient></defs><path fill-rule="evenodd" clip-rule="evenodd" d="M6.63869 12.1902L3.50621 14.1092C3.18049 14.3087 2.75468 14.2064 2.55515 13.8807C2.45769 13.7216 2.42864 13.5299 2.47457 13.3491L2.95948 11.4405C3.13452 10.7515 3.60599 10.1756 4.24682 9.86791L7.6642 8.22716C7.82352 8.15067 7.89067 7.95951 7.81418 7.80019C7.75223 7.67116 7.61214 7.59896 7.47111 7.62338L3.66713 8.28194C2.89387 8.41581 2.1009 8.20228 1.49941 7.69823L0.297703 6.69116C0.00493565 6.44581 -0.0335059 6.00958 0.211842 5.71682C0.33117 5.57442 0.502766 5.48602 0.687982 5.47153L4.35956 5.18419C4.61895 5.16389 4.845 4.99974 4.94458 4.75937L6.36101 1.3402C6.5072 0.987302 6.91179 0.819734 7.26469 0.965925C7.43413 1.03612 7.56876 1.17075 7.63896 1.3402L9.05539 4.75937C9.15496 4.99974 9.38101 5.16389 9.6404 5.18419L13.3322 5.47311C13.713 5.50291 13.9975 5.83578 13.9677 6.2166C13.9534 6.39979 13.8667 6.56975 13.7269 6.68896L10.9114 9.08928C10.7131 9.25826 10.6267 9.52425 10.6876 9.77748L11.5532 13.3733C11.6426 13.7447 11.414 14.1182 11.0427 14.2076C10.8642 14.2506 10.676 14.2208 10.5195 14.1249L7.36128 12.1902C7.13956 12.0544 6.8604 12.0544 6.63869 12.1902Z" fill="url(#${e})"/></svg>`}}():s),[t]);return o.ZP.createElement("i",{onClick:a,className:(0,i.Z)("PremiumIcon",c,t&&"gradient",a&&"clickable",n&&"big"),dangerouslySetInnerHTML:d,title:"Premium"})}))},22275:(e,t,n)=>{n.d(t,{Z:()=>d});var o=n(60748),r=n(33555),i=n(11192),s=n(48670),l=n(32340),c=n(59107),a=n(17551);const d=(0,o.X$)((0,r.c$)(((e,t)=>{let{userId:n}=t;const o=(0,i.jr)(e),r=n&&(0,i.dy)(e,n);return{chat:o,contactName:r?(0,s.Vl)(r):void 0}}))((e=>{let{isOpen:t,chat:n,userId:i,contactName:s,onClose:d}=e;const{deleteChatMember:u}=(0,r.Sv)(),m=(0,c.Z)(),f=(0,o.I4)((()=>{u({chatId:n.id,userId:i}),d()}),[n,u,d,i]);if(n&&i)return o.ZP.createElement(a.Z,{isOpen:t,onClose:d,title:m("GroupRemoved.Remove"),textParts:(0,l.Z)(m("PeerInfo.Confirm.RemovePeer",s)),confirmLabel:m("lng_box_remove"),confirmHandler:f,confirmIsDestructive:!0})})))},17551:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n(60748),r=n(59107),i=n(72313),s=n(13103),l=n(231);const c=(0,o.X$)((e=>{let{isOpen:t,onClose:n,onCloseAnimationEnd:c,title:a,header:d,text:u,textParts:m,confirmLabel:f="Confirm",confirmHandler:h,confirmIsDestructive:p,areButtonsInColumn:v,children:g}=e;const Z=(0,r.Z)(),C=(0,o.sO)(null),w=(0,o.I4)((e=>{-1===e&&h()}),[h]),I=(0,i.Z)(C,t,w,".Button");return o.ZP.createElement(s.Z,{className:"confirm",title:a||Z("Telegram"),header:d,isOpen:t,onClose:n,onCloseAnimationEnd:c},u&&u.split("\\n").map((e=>o.ZP.createElement("p",null,e))),m||g,o.ZP.createElement("div",{className:v?"dialog-buttons-column":"dialog-buttons mt-2",ref:C,onKeyDown:I},o.ZP.createElement(l.Z,{className:"confirm-dialog-button",isText:!0,onClick:h,color:p?"danger":"primary"},f),o.ZP.createElement(l.Z,{className:"confirm-dialog-button",isText:!0,onClick:n},Z("Cancel"))))}))},41151:(e,t,n)=>{n.d(t,{Z:()=>l});var o=n(60748),r=n(46752),i=n(59107),s=n(231);const l=e=>{let{isShown:t,className:n,color:l="primary",ariaLabel:c,disabled:a,onClick:d,children:u}=e;const m=(0,i.Z)(),f=(0,r.Z)("FloatingActionButton",t&&"revealed",n);return o.ZP.createElement(s.Z,{className:f,color:l,round:!0,disabled:a,onClick:t&&!a?d:void 0,ariaLabel:c,tabIndex:-1,isRtl:m.isRtl},u)}},21273:(e,t,n)=>{n.d(t,{Z:()=>h});var o=n(60748),r=n(57710),i=n(91713),s=n(69118),l=n(87675),c=n(863),a=n(80036),d=n(25190);const u=".ListItem",m=20,f=800,h=e=>{let{ref:t,style:n,className:h,items:p,itemSelector:v=u,preloadBackwards:g=m,sensitiveArea:Z=f,withAbsolutePositioning:C,maxHeight:w,noScrollRestore:I=!1,noScrollRestoreOnTop:P=!1,noFastList:E,cacheBuster:b,beforeChildren:y,children:L,onLoadMore:M,onScroll:x,onKeyDown:k,onDragOver:T,onDragLeave:S}=e,N=(0,o.sO)(null);t&&(N=t);const O=(0,o.sO)({}),[B,A]=(0,o.Ye)((()=>M?[(0,s.Ds)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];M({direction:i.Uq.Backwards,noScroll:e})}),1e3,!0,!1),(0,s.Ds)((()=>{M({direction:i.Uq.Forwards})}),1e3,!0,!1)]:[]),[M,p]);(0,o.d4)((()=>{if(!B)return;if(g>0&&(!p||p.length<g))return void B(!0);const{scrollHeight:e,clientHeight:t}=N.current;t&&e<=t&&B()}),[p,B,g]),(0,o.bt)((()=>{(0,r.lT)((()=>{const e=N.current,t=O.current;let n;if(t.listItemElements=e.querySelectorAll(v),t.currentAnchor&&Array.from(t.listItemElements).includes(t.currentAnchor)){const{scrollTop:o}=e,r=t.currentAnchor.getBoundingClientRect().top;n=o+(r-t.currentAnchorTop)}else{const e=t.listItemElements[0];e&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}if(C||I)return;const{scrollTop:o}=e;return P&&0===o?void 0:()=>{(0,l.Z)(e,n),t.isScrollTopJustUpdated=!0}}))}),[p,v,I,P,b,C]);const D=(0,d.Z)((e=>{if(A&&B){const{isScrollTopJustUpdated:e,currentAnchor:t,currentAnchorTop:n}=O.current,o=O.current.listItemElements;if(e)return void(O.current.isScrollTopJustUpdated=!1);const r=o.length,i=N.current,{scrollTop:s,scrollHeight:l,offsetHeight:c}=i,a=s<=(r?o[0].offsetTop:0)+Z,d=(r?o[r-1].offsetTop+o[r-1].offsetHeight:l)-(s+c)<=Z;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&&(O.current.currentAnchor=e,O.current.currentAnchorTop=o,u=!0,A())}}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<n&&(O.current.currentAnchor=e,O.current.currentAnchorTop=o,u=!0,B())}}if(!u)if(t?.offsetParent)O.current.currentAnchorTop=t.getBoundingClientRect().top;else{const e=o[0];e&&(O.current.currentAnchor=e,O.current.currentAnchorTop=e.getBoundingClientRect().top)}}x&&x(e)}));return o.ZP.createElement("div",{ref:N,className:h,onScroll:D,teactFastList:!E&&!C,onKeyDown:k,onDragOver:T,onDragLeave:S,style:n},y,C&&p?.length?o.ZP.createElement("div",{teactFastList:!E,style:(0,a.Z)("position: relative",c.wZ&&`height: ${w}px`)},L):L)}},31876:(e,t,n)=>{n.d(t,{Z:()=>Z});var o=n(60748),r=n(57710),i=n(863),s=n(46752),l=n(25190),c=n(17240),a=n(12644),d=n(60706),u=n(59107),m=n(39415),f=n(68512),h=n(52328),p=n(58964),v=n(66902),g=n(231);const Z=e=>{let{ref:t,buttonRef:n,icon:Z,leftElement:C,buttonClassName:w,secondaryIcon:I,rightElement:P,className:E,style:b,children:y,disabled:L,allowDisabledClick:M,ripple:x,narrow:k,inactive:T,focus:S,destructive:N,multiline:O,isStatic:B,contextActions:A,withPortalForMenu:D,href:$,onMouseDown:U,onClick:R,onContextMenu:F,clickArg:X,onSecondaryIconClick:H,onDragEnter:J}=e,j=(0,o.sO)(null);t&&(j=t);const[K,Y,q]=(0,d.Z)(),{isContextMenuOpen:V,contextMenuPosition:_,handleBeforeContextMenu:z,handleContextMenu:G,handleContextMenuClose:W,handleContextMenuHide:Q}=(0,c.Z)(j,!A),ee=(0,l.Z)((()=>j.current)),te=(0,l.Z)((()=>j.current.closest(".custom-scroll"))),ne=(0,l.Z)((()=>(D?document.querySelector("#portals"):j.current).querySelector(".ListItem-context-menu .bubble"))),oe=(0,l.Z)((()=>({withPortal:D}))),{positionX:re,positionY:ie,transformOriginX:se,transformOriginY:le,style:ce}=(0,a.Z)(_,ee,te,ne,oe),ae=(0,l.Z)((e=>{e.ctrlKey||e.metaKey||e.shiftKey||e.button!==i.tc.Main||e.preventDefault()})),de=(0,l.Z)((e=>{if((!L||M)&&R){if($){if((e.ctrlKey||e.metaKey||e.shiftKey)&&e.button===i.tc.Main||e.button===i.tc.Auxiliary)return;e.preventDefault()}R(e,X),i.$b&&!x&&(Y(),(0,r.i$)(q))}})),{handleClick:ue,handleMouseDown:me}=(0,m.m)((e=>{L&&!M||0!==e.button||!H&&!A||(e.stopPropagation(),H?H(e):G(e))})),fe=(0,l.Z)((e=>{T||i.$b||(!A||e.button!==i.tc.Secondary&&R||z(e),e.button===i.tc.Main&&(R?de(e):G(e)))})),he=(0,u.Z)(),pe=(0,s.Z)("ListItem",E,!B&&"no-selection",x&&"has-ripple",k&&"narrow",L&&"disabled",M&&"click-allowed",T&&"inactive",_&&"has-menu-open",S&&"focus",N&&"destructive",O&&"multiline",B&&"is-static"),ve=$?"a":"div";return o.ZP.createElement("div",{ref:j,className:pe,dir:he.isRtl?"rtl":void 0,style:b,onMouseDown:U,onDragEnter:J},o.ZP.createElement(ve,{className:(0,s.Z)("ListItem-button",K&&"active",w),role:B?void 0:"button",href:$,ref:n,tabIndex:B?void 0:0,onClick:!T&&i.$b?de:ae,onMouseDown:fe,onContextMenu:F||(!T&&A?G:void 0)},C,Z&&o.ZP.createElement("i",{className:`icon icon-${Z}`}),O&&o.ZP.createElement("div",{className:"multiline-item"},y),!O&&y,!L&&!T&&x&&o.ZP.createElement(f.Z,null),I&&o.ZP.createElement(g.Z,{className:"secondary-icon",round:!0,color:"translucent",size:"smaller",onClick:ue,onMouseDown:me},o.ZP.createElement("i",{className:`icon icon-${I}`})),P),A&&void 0!==_&&o.ZP.createElement(h.Z,{isOpen:V,transformOriginX:se,transformOriginY:le,positionX:re,positionY:ie,style:ce,className:"ListItem-context-menu",autoClose:!0,onClose:W,onCloseAnimationEnd:Q,withPortal:D},A.map((e=>"isSeparator"in e?o.ZP.createElement(v.Z,{key:e.key||"separator"}):o.ZP.createElement(p.Z,{key:e.title,icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler},e.title)))))}},66902:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n(60748),r=n(46752);const i=e=>{let{className:t}=e;return o.ZP.createElement("div",{className:(0,r.Z)("GC8g9Q16IaK76g6rcU78",t)})}},42431:(e,t,n)=>{n.d(t,{$5:()=>l,Bj:()=>s,GU:()=>c,Ht:()=>a,LU:()=>m,fu:()=>u,mU:()=>d});var o=n(14342),r=n(48670),i=n(86087);function s(e,t){const n=(0,o.x6)(e,t);if(n&&n.groupCallId)return l(e,n.groupCallId)}function l(e,t){return e.groupCalls.byId[t]}function c(e,t,n){return l(e,t)?.participants[n]}function a(e){const t=d(e)?.chatId;if(!t)return!1;const n=(0,o.Z1)(e,t);return!!n&&((0,r.G9)(n)&&n.isCreator||Boolean(n.adminRights?.manageCall))}function d(e){const{groupCalls:{activeGroupCallId:t}}=e;if(t)return l(e,t)}function u(e){const{phoneCall:t,currentUserId:n}=e;if(!t||!t.participantId||!t.adminId)return;const o=t.adminId===n?t.participantId:t.adminId;return(0,i.dy)(e,o)}function m(e){const t=d(e);if(!t||!t.chatId)return!1;const n=(0,o.Z1)(e,t.chatId);if(!n)return!1;if(Boolean((0,r.WS)(n)))return!0;const i=(0,o.x6)(e,n.id)?.inviteLink;return Boolean(i)}},9211:(e,t,n)=>{n.d(t,{M:()=>i,P:()=>s});var o=n(86087),r=n(83716);function i(e,t){var n;const{appConfig:i}=e;if(!i)return r.prK[t][0];const s=(0,o.wV)(e),{limits:l}=i,c=null!==(n=l[t]?.[s?1:0])&&void 0!==n?n:r.prK[t][s?1:0];return"dialogFilters"===t?c+1:c}function s(e,t){const{appConfig:n}=e;if(!n)return r.prK[t][1];const{limits:o}=n;return o[t][1]}},17240:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(60748),r=n(31664),i=n(57710),s=n(863),l=n(25190);function c(e){e.stopImmediatePropagation(),e.preventDefault(),e.stopPropagation()}const a=(e,t,n,a)=>{const[d,u]=(0,o.eJ)(!1),[m,f]=(0,o.eJ)(void 0),[h,p]=(0,o.eJ)(void 0),v=(0,l.Z)((e=>{t||2!==e.button||(0,i.WM)((()=>{(0,r.D_)(e.target,"no-selection")}))})),g=(0,l.Z)((e=>{(0,i.WM)((()=>{(0,r.mC)(e.target,"no-selection")})),t||n&&e.target.matches("a[href]")||(e.preventDefault(),m||(u(!0),f({x:e.clientX,y:e.clientY}),p(e.target)))})),Z=(0,l.Z)((()=>{u(!1)})),C=(0,l.Z)((()=>{f(void 0)}));return(0,o.d4)((()=>{if(t||!s.$b||a)return;const o=e.current;if(!o)return;let r;const i=()=>{r&&(clearTimeout(r),r=void 0)},l=e=>{t||(i(),r=window.setTimeout((()=>(e=>{i();const{clientX:t,clientY:r,target:l}=e.touches[0];m||n&&l.matches("a[href]")||(o.addEventListener("touchend",(e=>{s.cj&&s.fl&&setTimeout((()=>{o.removeEventListener("mousedown",c,{capture:!0}),o.removeEventListener("click",c,{capture:!0})}),100),c(e)}),{once:!0,capture:!0}),s.fl&&s.cj&&(o.addEventListener("mousedown",c,{once:!0,capture:!0}),o.addEventListener("click",c,{once:!0,capture:!0})),u(!0),f({x:t,y:r}))})(e)),200))};return o.addEventListener("touchstart",l,{passive:!0}),o.addEventListener("touchcancel",i,!0),o.addEventListener("touchend",i,!0),o.addEventListener("touchmove",i,{passive:!0}),()=>{i(),o.removeEventListener("touchstart",l),o.removeEventListener("touchcancel",i,!0),o.removeEventListener("touchend",i,!0),o.removeEventListener("touchmove",i)}}),[m,t,a,e,n]),{isContextMenuOpen:d,contextMenuPosition:m,contextMenuTarget:h,handleBeforeContextMenu:v,handleContextMenu:g,handleContextMenuClose:Z,handleContextMenuHide:C}}},39415:(e,t,n)=>{n.d(t,{m:()=>r});var o=n(863);function r(e){const t=e?t=>{"mousedown"===t.type&&t.button!==o.tc.Main||e(t)}:void 0;return o.$b?{handleClick:t}:{handleMouseDown:t}}},27407:(e,t,n)=>{n.d(t,{Z:()=>d});var o=n(60748),r=n(91713),i=n(60782),s=n(25190),l=n(65326),c=n(87204);function a(e,t,n,o){const{length:i}=e,s=o?e.indexOf(o):0,l=t===r.Uq.Forwards?s:s+1||i,c=Math.max(0,l-n),a=l+n-1,d=e.slice(Math.max(0,c),a+1);let u,m;switch(t){case r.Uq.Forwards:u=l>=0,m=c>=0;break;case r.Uq.Backwards:u=l<i,m=a<=i-1}return{newViewportIds:d,areSomeLocal:u,areAllLocal:m,newIsOnTop:d[0]===e[0]}}const d=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30;const u=(0,o.sO)(),m=(0,o.sO)();if(!m.current&&t&&!n){const{newViewportIds:e,newIsOnTop:n}=a(t,r.Uq.Forwards,d,t[0]);m.current={viewportIds:e,isOnTop:n}}const f=(0,l.Z)();n&&(u.current={});const h=(0,c.Z)(t),p=(0,c.Z)(n);if(!t||n||t===h&&n===p)t||(m.current=void 0);else{const{viewportIds:e,isOnTop:n}=m.current||{},o=e&&!n?e[Math.round(e.length/2)]:void 0,s=o&&t.includes(o)?o:t[0],{offsetId:l=s,direction:c=r.Uq.Forwards}=u.current||{},{newViewportIds:f,newIsOnTop:h}=a(t,c,d,l);u.current={},e&&(0,i.et)(e,f)||(m.current={viewportIds:f,isOnTop:h})}const v=(0,s.Z)((n=>{let{direction:o,noScroll:s}=n;const{viewportIds:l}=m.current||{},c=l?o===r.Uq.Backwards?l[l.length-1]:l[0]:void 0;if(!t)return void(e&&e({offsetId:c}));const{newViewportIds:h,areSomeLocal:p,areAllLocal:v,newIsOnTop:g}=a(t,o,d,c);!p||l&&(0,i.et)(l,h)||(m.current={viewportIds:h,isOnTop:g},f()),!v&&e&&(s||(u.current={...u.current,direction:o,offsetId:c}),e({offsetId:c}))}));return n?[t]:[m.current?.viewportIds,v]}},62357:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(60748);const r=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=(0,o.sO)(e);(0,o.bt)((()=>{r.current=e}),[e]),(0,o.d4)((()=>{if(void 0===t)return;const e=setInterval((()=>r.current()),t);return n||r.current(),()=>clearInterval(e)}),[t,n])}},12644:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n(60748);const r={width:0,left:0,height:0,top:0};function i(e,t,n,i,s){const[l,c]=(0,o.eJ)("right"),[a,d]=(0,o.eJ)("bottom"),[u,m]=(0,o.eJ)(),[f,h]=(0,o.eJ)(),[p,v]=(0,o.eJ)(!1),[g,Z]=(0,o.eJ)(""),[C,w]=(0,o.eJ)("opacity: 0;");return(0,o.d4)((()=>{const o=t();if(!e||!o)return;let{x:l,y:a}=e;const u=l,f=a,p=i(),g=n(),{extraPaddingX:C=0,extraTopPadding:I=0,marginSides:P=0,extraMarginTop:E=0,menuElMinWidth:b=0,shouldAvoidNegativePosition:y=!1,withPortal:L=!1,isDense:M=!1}=s?.()||{},x=p?parseInt(getComputedStyle(p).marginTop,10)+E:void 0,{offsetWidth:k,offsetHeight:T}=p||{offsetWidth:0,offsetHeight:0},S=p?{width:Math.max(k,b),height:T+x}:r,N=g?g.getBoundingClientRect():r;let O,B;M||l+S.width+C<N.width+N.left?(l+=3,O="left"):l-S.width-N.left>0?(O="right",l-=3):(O="left",l=16),c(O),P&&"right"===O&&l+C+P>=N.width+N.left&&(l-=P),P&&"left"===O&&(l+C+P+S.width>=N.width+N.left?l-=P:l-P<=0&&(l+=P)),M||a+S.height<N.height+N.top?B="top":(B="bottom",a-S.height<N.top+I&&(a=N.top+N.height)),d(B);const A=o.getBoundingClientRect(),D=L?A.top:0,$=L?A.left:0,U=Math.min(l-A.left,N.width-S.width-16);let R=("left"===O?L||y?Math.max(16,U):U:l-A.left)+$,F=a-A.top+D;M&&(R=Math.min(R,N.width-S.width-16),F=Math.min(F,N.height-S.height-16));const X=b?Math.max(0,(b-k)/2):0;R-X<0&&y&&(R=X+16);const H=N.height-12-(x||0);v(H<S.height),w(`max-height: ${H}px;`),Z(`left: ${R}px; top: ${F}px`);const J=u+$-A.left-R,j=f+D-A.top-F-(x||0);m("left"===O?J:S.width+J),h("bottom"===B?S.height+j:j)}),[e,i,n,t,s]),{positionX:l,positionY:a,transformOriginX:u,transformOriginY:f,style:g,menuStyle:C,withScroll:p}}},87675:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(863);const r=(e,t)=>{o.cj&&(e.style.overflow="hidden"),void 0!==t&&(e.scrollTop=t),o.cj&&(e.style.overflow="")}}}]);
|
|
//# sourceMappingURL=3735.c370118370972c120ad1.js.map
|