2 lines
24 KiB
JavaScript
2 lines
24 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),l=n(48670),s=n(2155),a=n(46752),c=n(32340),d=n(6202),u=n(70692),m=n(59107),f=n(39415),h=n(57080),p=n(25190);const v=(0,a.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:E,isSavedMessages:P,withVideo:b,loopIndefinitely:y,lastSyncTime:I,noPersonalPhoto:L,onClick:x}=e;const k=(0,o.sO)(null),M=(0,o.sO)(0),N=Z&&(0,l.NB)(Z),T=Z&&(0,l.pK)(Z.id),S=g?.isForum;let B,A;const O=b&&C?.isVideo,D="jumbo"===n;P||N||(Z&&!L?B=(0,l.RT)(Z,D?"big":void 0):g?B=(0,l.RT)(g,D?"big":void 0):C&&(B=`photo${C.id}?size=m`,C.isVideo&&b&&(A=`videoAvatar${C.id}?size=u`)));const $=(0,d.Z)(B,!1,r.IU.BlobUrl,I),R=(0,d.Z)(A,!O,r.IU.BlobUrl,I),U=Boolean($||R),F=Boolean(R&&O),X=(0,u.Z)(U),H=!P&&Z&&w&&(0,l.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;R&&(y||(M.current+=1,M.current>=3&&(t.style.display="none")))})),Y=(0,m.Z)();let _;const q=Z?(0,l.Js)(Z):g?(0,l.U)(Y,g):E;if(P)_=o.ZP.createElement("i",{className:(0,a.Z)(v.icon,"icon","icon-avatar-saved-messages"),role:"img","aria-label":q});else if(N)_=o.ZP.createElement("i",{className:(0,a.Z)(v.icon,"icon","icon-avatar-deleted-account"),role:"img","aria-label":q});else if(T)_=o.ZP.createElement("i",{className:(0,a.Z)(v.icon,"icon","icon-reply-filled"),role:"img","aria-label":q});else if(U)_=o.ZP.createElement(o.ZP.Fragment,null,o.ZP.createElement("img",{src:$,className:(0,a.Z)(v.media,"avatar-media",X,R&&"poster"),alt:q,decoding:"async"}),F&&o.ZP.createElement(h.Z,{canPlay:!0,src:R,className:(0,a.Z)(v.media,"avatar-media","poster"),muted:!0,loop:y,autoPlay:!0,disablePictureInPicture:!0,playsInline:!0,onEnded:K}));else if(Z){const e=(0,l.Js)(Z);_=e?(0,s.Xv)(e,2):void 0}else if(g){const e=(0,l.U)(Y,g);_=e&&(0,s.Xv)(e,(0,l.YC)(g.id)?2:1)}else E&&(_=(0,s.Xv)(E,2));const V=(0,a.Z)(`Avatar size-${n}`,t,`color-bg-${(0,l.Rs)(Z||g)}`,P&&"saved-messages",N&&"deleted-account",T&&"replies-bot-account",S&&"forum",j,x&&"interactive",!P&&!$&&"no-photo"),z=Boolean(P||$),{handleClick:G,handleMouseDown:W}=(0,f.m)((e=>{x&&x(e,z)})),Q=(Z||g)&&(Z||g).id;return o.ZP.createElement("div",{ref:k,className:V,"data-test-sender-id":i.Cgt?Q:void 0,"aria-label":"string"==typeof _?q:void 0,onClick:G,onMouseDown:W},"string"==typeof _?(0,c.Z)(_,["jumbo"===n?"hq_emoji":"emoji"]):_)}))},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),l=n(48670),s=n(46752),a=n(59107);const c={__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:c});var u=n(50685),m=n(96459),f=n(4863);const h="ysHMmXALnn0fgFRc7Bn7",p=(0,o.X$)((e=>{let{className:t,peer:n,noVerified:c,noFake:p,withEmojiStatus:v,emojiStatusSize:g,isSavedMessages:Z,noLoopLimit:C,onEmojiStatusClick:w,observeIntersection:E}=e;const P=(0,a.Z)(),b=(0,l.YC)(n.id),y=b?(0,l.Js)(n):(0,l.U)(P,n),I=b&&n.emojiStatus,L=b&&n.isPremium;return Z?o.ZP.createElement("div",{className:(0,s.Z)("title",h,t)},o.ZP.createElement("h3",null,P("SavedMessages"))):o.ZP.createElement("div",{className:(0,s.Z)("title",h,t)},o.ZP.createElement("h3",{dir:"auto",className:"fullName"},(0,i.Z)(y||"")),!c&&n.isVerified&&o.ZP.createElement(d,null),!p&&n.fakeType&&o.ZP.createElement(u.Z,{fakeType:n.fakeType}),v&&I&&o.ZP.createElement(m.Z,{documentId:I.documentId,size:g,loopLimit:C?void 0:r.y3O,observeIntersectionForLoading:E,onClick:w}),v&&!I&&L&&o.ZP.createElement(f.Z,null))}))},4863:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(60748),r=n(26926),i=n(46752);const l={__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>'},s={},a=(0,o.X$)((e=>{let{withGradient:t,big:n,className:a,onClick:c}=e;const d=(0,o.Ye)((()=>t?function(){const e=(0,r.Z)(s);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>`}}():l),[t]);return o.ZP.createElement("i",{onClick:c,className:(0,i.Z)("PremiumIcon",a,t&&"gradient",c&&"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),l=n(48670),s=n(32340),a=n(59107),c=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,l.Vl)(r):void 0}}))((e=>{let{isOpen:t,chat:n,userId:i,contactName:l,onClose:d}=e;const{deleteChatMember:u}=(0,r.Sv)(),m=(0,a.Z)(),f=(0,o.I4)((()=>{u({chatId:n.id,userId:i}),d()}),[n,u,d,i]);if(n&&i)return o.ZP.createElement(c.Z,{isOpen:t,onClose:d,title:m("GroupRemoved.Remove"),textParts:(0,s.Z)(m("PeerInfo.Confirm.RemovePeer",l)),confirmLabel:m("lng_box_remove"),confirmHandler:f,confirmIsDestructive:!0})})))},17551:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(60748),r=n(59107),i=n(72313),l=n(13103),s=n(231);const a=(0,o.X$)((e=>{let{isOpen:t,onClose:n,onCloseAnimationEnd:a,title:c,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]),E=(0,i.Z)(C,t,w,".Button");return o.ZP.createElement(l.Z,{className:"confirm",title:c||Z("Telegram"),header:d,isOpen:t,onClose:n,onCloseAnimationEnd:a},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:E},o.ZP.createElement(s.Z,{className:"confirm-dialog-button",isText:!0,onClick:h,color:p?"danger":"primary"},f),o.ZP.createElement(s.Z,{className:"confirm-dialog-button",isText:!0,onClick:n},Z("Cancel"))))}))},41151:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(60748),r=n(46752),i=n(59107),l=n(231);const s=e=>{let{isShown:t,className:n,color:s="primary",ariaLabel:a,disabled:c,onClick:d,children:u}=e;const m=(0,i.Z)(),f=(0,r.Z)("FloatingActionButton",t&&"revealed",n);return o.ZP.createElement(l.Z,{className:f,color:s,round:!0,disabled:c,onClick:t&&!c?d:void 0,ariaLabel:a,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),l=n(69118),s=n(87675),a=n(863),c=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:E=!1,noScrollRestoreOnTop:P=!1,noFastList:b,cacheBuster:y,beforeChildren:I,children:L,onLoadMore:x,onScroll:k,onKeyDown:M,onDragOver:N,onDragLeave:T}=e,S=(0,o.sO)(null);t&&(S=t);const B=(0,o.sO)({}),[A,O]=(0,o.Ye)((()=>x?[(0,l.Ds)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];x({direction:i.Uq.Backwards,noScroll:e})}),1e3,!0,!1),(0,l.Ds)((()=>{x({direction:i.Uq.Forwards})}),1e3,!0,!1)]:[]),[x,p]);(0,o.d4)((()=>{if(!A)return;if(g>0&&(!p||p.length<g))return void A(!0);const{scrollHeight:e,clientHeight:t}=S.current;t&&e<=t&&A()}),[p,A,g]),(0,o.bt)((()=>{(0,r.lT)((()=>{const e=S.current,t=B.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||E)return;const{scrollTop:o}=e;return P&&0===o?void 0:()=>{(0,s.Z)(e,n),t.isScrollTopJustUpdated=!0}}))}),[p,v,E,P,y,C]);const D=(0,d.Z)((e=>{if(O&&A){const{isScrollTopJustUpdated:e,currentAnchor:t,currentAnchorTop:n}=B.current,o=B.current.listItemElements;if(e)return void(B.current.isScrollTopJustUpdated=!1);const r=o.length,i=S.current,{scrollTop:l,scrollHeight:s,offsetHeight:a}=i,c=l<=(r?o[0].offsetTop:0)+Z,d=(r?o[r-1].offsetTop+o[r-1].offsetHeight:s)-(l+a)<=Z;let u=!1;if(c){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&&(B.current.currentAnchor=e,B.current.currentAnchorTop=o,u=!0,O())}}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&&(B.current.currentAnchor=e,B.current.currentAnchorTop=o,u=!0,A())}}if(!u)if(t?.offsetParent)B.current.currentAnchorTop=t.getBoundingClientRect().top;else{const e=o[0];e&&(B.current.currentAnchor=e,B.current.currentAnchorTop=e.getBoundingClientRect().top)}}k&&k(e)}));return o.ZP.createElement("div",{ref:S,className:h,onScroll:D,teactFastList:!b&&!C,onKeyDown:M,onDragOver:N,onDragLeave:T,style:n},I,C&&p?.length?o.ZP.createElement("div",{teactFastList:!b,style:(0,c.Z)("position: relative",a.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),l=n(46752),s=n(25190),a=n(17240),c=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:E,rightElement:P,className:b,style:y,children:I,disabled:L,allowDisabledClick:x,ripple:k,narrow:M,inactive:N,focus:T,destructive:S,multiline:B,isStatic:A,contextActions:O,withPortalForMenu:D,href:$,onMouseDown:R,onClick:U,onContextMenu:F,clickArg:X,onSecondaryIconClick:H,onDragEnter:J}=e,j=(0,o.sO)(null);t&&(j=t);const[K,Y,_]=(0,d.Z)(),{isContextMenuOpen:q,contextMenuPosition:V,handleBeforeContextMenu:z,handleContextMenu:G,handleContextMenuClose:W,handleContextMenuHide:Q}=(0,a.Z)(j,!O),ee=(0,s.Z)((()=>j.current)),te=(0,s.Z)((()=>j.current.closest(".custom-scroll"))),ne=(0,s.Z)((()=>(D?document.querySelector("#portals"):j.current).querySelector(".ListItem-context-menu .bubble"))),oe=(0,s.Z)((()=>({withPortal:D}))),{positionX:re,positionY:ie,transformOriginX:le,transformOriginY:se,style:ae}=(0,c.Z)(V,ee,te,ne,oe),ce=(0,s.Z)((e=>{e.ctrlKey||e.metaKey||e.shiftKey||e.button!==i.tc.Main||e.preventDefault()})),de=(0,s.Z)((e=>{if((!L||x)&&U){if($){if((e.ctrlKey||e.metaKey||e.shiftKey)&&e.button===i.tc.Main||e.button===i.tc.Auxiliary)return;e.preventDefault()}U(e,X),i.$b&&!k&&(Y(),(0,r.i$)(_))}})),{handleClick:ue,handleMouseDown:me}=(0,m.m)((e=>{L&&!x||0!==e.button||!H&&!O||(e.stopPropagation(),H?H(e):G(e))})),fe=(0,s.Z)((e=>{N||i.$b||(!O||e.button!==i.tc.Secondary&&U||z(e),e.button===i.tc.Main&&(U?de(e):G(e)))})),he=(0,u.Z)(),pe=(0,l.Z)("ListItem",b,!A&&"no-selection",k&&"has-ripple",M&&"narrow",L&&"disabled",x&&"click-allowed",N&&"inactive",V&&"has-menu-open",T&&"focus",S&&"destructive",B&&"multiline",A&&"is-static"),ve=$?"a":"div";return o.ZP.createElement("div",{ref:j,className:pe,dir:he.isRtl?"rtl":void 0,style:y,onMouseDown:R,onDragEnter:J},o.ZP.createElement(ve,{className:(0,l.Z)("ListItem-button",K&&"active",w),role:A?void 0:"button",href:$,ref:n,tabIndex:A?void 0:0,onClick:!N&&i.$b?de:ce,onMouseDown:fe,onContextMenu:F||(!N&&O?G:void 0)},C,Z&&o.ZP.createElement("i",{className:`icon icon-${Z}`}),B&&o.ZP.createElement("div",{className:"multiline-item"},I),!B&&I,!L&&!N&&k&&o.ZP.createElement(f.Z,null),E&&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-${E}`})),P),O&&void 0!==V&&o.ZP.createElement(h.Z,{isOpen:q,transformOriginX:le,transformOriginY:se,positionX:re,positionY:ie,style:ae,className:"ListItem-context-menu",autoClose:!0,onClose:W,onCloseAnimationEnd:Q,withPortal:D},O.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)})}},13103:(e,t,n)=>{n.d(t,{Z:()=>p});var o=n(60748),r=n(517),i=n(46752),l=n(98069),s=n(18674),a=n(25190),c=n(31212),d=n(72645),u=n(59107),m=n(46590),f=n(231),h=n(62898);const p=e=>{let{dialogRef:t,title:n,className:p,isOpen:v,isSlim:g,header:Z,hasCloseButton:C,noBackdrop:w,noBackdropClose:E,children:P,style:b,onClose:y,onCloseAnimationEnd:I,onEnter:L,shouldSkipHistoryAnimations:x}=e;const{shouldRender:k,transitionClassNames:M}=(0,c.Z)(v,I,x,void 0,x),N=(0,o.sO)(null);(0,o.d4)((()=>{if(v)return(0,l.l_)(),l.In}),[v]);const T=(0,a.Z)((e=>!!L&&(e.preventDefault(),L(),!0)));(0,o.d4)((()=>v?(0,r.Z)({onEsc:y,onEnter:T}):void 0),[v,y,T]),(0,o.d4)((()=>v&&N.current?function(e){function t(t){if("Tab"!==t.key)return;t.preventDefault(),t.stopPropagation();const n=Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!n.length)return;const o=n.findIndex((e=>e.isSameNode(document.activeElement)));let r=0;o>=0&&(r=t.shiftKey?o>0?o-1:n.length-1:o<n.length-1?o+1:0),n[r].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}(N.current):void 0),[v]),(0,m.Z)({isActive:v,onBack:y}),(0,d.Z)((e=>{let[t]=e;return document.body.classList.toggle("has-open-dialog",Boolean(v)),(v||!v&&void 0!==t)&&(0,s.YW)(200),()=>{document.body.classList.remove("has-open-dialog")}}),[v]);const S=(0,u.Z)();if(!k)return;const B=(0,i.Z)("Modal",p,M,w&&"transparent-backdrop",g&&"slim");return o.ZP.createElement(h.Z,null,o.ZP.createElement("div",{ref:N,className:B,tabIndex:-1,role:"dialog"},o.ZP.createElement("div",{className:"modal-container"},o.ZP.createElement("div",{className:"modal-backdrop",onClick:E?void 0:y}),o.ZP.createElement("div",{className:"modal-dialog",ref:t},Z||(n?o.ZP.createElement("div",{className:"modal-header"},C&&o.ZP.createElement(f.Z,{round:!0,color:"translucent",size:"smaller",ariaLabel:S("Close"),onClick:y},o.ZP.createElement("i",{className:"icon icon-close"})),o.ZP.createElement("div",{className:"modal-title"},n)):void 0),o.ZP.createElement("div",{className:"modal-content custom-scroll",style:b},P)))))}},42431:(e,t,n)=>{n.d(t,{$5:()=>s,Bj:()=>l,GU:()=>a,Ht:()=>c,LU:()=>m,fu:()=>u,mU:()=>d});var o=n(14342),r=n(48670),i=n(86087);function l(e,t){const n=(0,o.x6)(e,t);if(n&&n.groupCallId)return s(e,n.groupCallId)}function s(e,t){return e.groupCalls.byId[t]}function a(e,t,n){return s(e,t)?.participants[n]}function c(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 s(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:()=>l});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 l=(0,o.wV)(e),{limits:s}=i,a=null!==(n=s[t]?.[l?1:0])&&void 0!==n?n:r.prK[t][l?1:0];return"dialogFilters"===t?a+1:a}function l(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:()=>c});var o=n(60748),r=n(31664),i=n(57710),l=n(863),s=n(25190);function a(e){e.stopImmediatePropagation(),e.preventDefault(),e.stopPropagation()}const c=(e,t,n,c)=>{const[d,u]=(0,o.eJ)(!1),[m,f]=(0,o.eJ)(void 0),[h,p]=(0,o.eJ)(void 0),v=(0,s.Z)((e=>{t||2!==e.button||(0,i.WM)((()=>{(0,r.D_)(e.target,"no-selection")}))})),g=(0,s.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,s.Z)((()=>{u(!1)})),C=(0,s.Z)((()=>{f(void 0)}));return(0,o.d4)((()=>{if(t||!l.$b||c)return;const o=e.current;if(!o)return;let r;const i=()=>{r&&(clearTimeout(r),r=void 0)},s=e=>{t||(i(),r=window.setTimeout((()=>(e=>{i();const{clientX:t,clientY:r,target:s}=e.touches[0];m||n&&s.matches("a[href]")||(o.addEventListener("touchend",(e=>{l.cj&&l.fl&&setTimeout((()=>{o.removeEventListener("mousedown",a,{capture:!0}),o.removeEventListener("click",a,{capture:!0})}),100),a(e)}),{once:!0,capture:!0}),l.fl&&l.cj&&(o.addEventListener("mousedown",a,{once:!0,capture:!0}),o.addEventListener("click",a,{once:!0,capture:!0})),u(!0),f({x:t,y:r}))})(e)),200))};return o.addEventListener("touchstart",s,{passive:!0}),o.addEventListener("touchcancel",i,!0),o.addEventListener("touchend",i,!0),o.addEventListener("touchmove",i,{passive:!0}),()=>{i(),o.removeEventListener("touchstart",s),o.removeEventListener("touchcancel",i,!0),o.removeEventListener("touchend",i,!0),o.removeEventListener("touchmove",i)}}),[m,t,c,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),l=n(25190),s=n(65326),a=n(87204);function c(e,t,n,o){const{length:i}=e,l=o?e.indexOf(o):0,s=t===r.Uq.Forwards?l:l+1||i,a=Math.max(0,s-n),c=s+n-1,d=e.slice(Math.max(0,a),c+1);let u,m;switch(t){case r.Uq.Forwards:u=s>=0,m=a>=0;break;case r.Uq.Backwards:u=s<i,m=c<=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}=c(t,r.Uq.Forwards,d,t[0]);m.current={viewportIds:e,isOnTop:n}}const f=(0,s.Z)();n&&(u.current={});const h=(0,a.Z)(t),p=(0,a.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,l=o&&t.includes(o)?o:t[0],{offsetId:s=l,direction:a=r.Uq.Forwards}=u.current||{},{newViewportIds:f,newIsOnTop:h}=c(t,a,d,s);u.current={},e&&(0,i.et)(e,f)||(m.current={viewportIds:f,isOnTop:h})}const v=(0,l.Z)((n=>{let{direction:o,noScroll:l}=n;const{viewportIds:s}=m.current||{},a=s?o===r.Uq.Backwards?s[s.length-1]:s[0]:void 0;if(!t)return void(e&&e({offsetId:a}));const{newViewportIds:h,areSomeLocal:p,areAllLocal:v,newIsOnTop:g}=c(t,o,d,a);!p||s&&(0,i.et)(s,h)||(m.current={viewportIds:h,isOnTop:g},f()),!v&&e&&(l||(u.current={...u.current,direction:o,offsetId:a}),e({offsetId:a}))}));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])}},72645:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(60748);const r=(e,t,n)=>{const r=(0,o.sO)();return(0,o.bt)((()=>{const n=r.current;return r.current=t,e(n||[])}),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,l){const[s,a]=(0,o.eJ)("right"),[c,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:s,y:c}=e;const u=s,f=c,p=i(),g=n(),{extraPaddingX:C=0,extraTopPadding:E=0,marginSides:P=0,extraMarginTop:b=0,menuElMinWidth:y=0,shouldAvoidNegativePosition:I=!1,withPortal:L=!1,isDense:x=!1}=l?.()||{},k=p?parseInt(getComputedStyle(p).marginTop,10)+b:void 0,{offsetWidth:M,offsetHeight:N}=p||{offsetWidth:0,offsetHeight:0},T=p?{width:Math.max(M,y),height:N+k}:r,S=g?g.getBoundingClientRect():r;let B,A;x||s+T.width+C<S.width+S.left?(s+=3,B="left"):s-T.width-S.left>0?(B="right",s-=3):(B="left",s=16),a(B),P&&"right"===B&&s+C+P>=S.width+S.left&&(s-=P),P&&"left"===B&&(s+C+P+T.width>=S.width+S.left?s-=P:s-P<=0&&(s+=P)),x||c+T.height<S.height+S.top?A="top":(A="bottom",c-T.height<S.top+E&&(c=S.top+S.height)),d(A);const O=o.getBoundingClientRect(),D=L?O.top:0,$=L?O.left:0,R=Math.min(s-O.left,S.width-T.width-16);let U=("left"===B?L||I?Math.max(16,R):R:s-O.left)+$,F=c-O.top+D;x&&(U=Math.min(U,S.width-T.width-16),F=Math.min(F,S.height-T.height-16));const X=y?Math.max(0,(y-M)/2):0;U-X<0&&I&&(U=X+16);const H=S.height-12-(k||0);v(H<T.height),w(`max-height: ${H}px;`),Z(`left: ${U}px; top: ${F}px`);const J=u+$-O.left-U,j=f+D-O.top-F-(k||0);m("left"===B?J:T.width+J),h("bottom"===A?T.height+j:j)}),[e,i,n,t,l]),{positionX:s,positionY:c,transformOriginX:u,transformOriginY:f,style:g,menuStyle:C,withScroll:p}}},98069:(e,t,n)=>{n.d(t,{In:()=>i,l_:()=>r,wT:()=>l});let o=0;function r(){o+=1}function i(){o-=1}function l(){return o>0}},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.0e04104c3763787a2f9d.js.map
|