telegram-tt/dist/280.b62be11f67ec535a60df.js
Alexander Zinchuk 9f25cf857e [Build]
2021-08-19 10:06:45 +03:00

2 lines
100 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[280],{7854:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(4050),a=n(6137),s=n(4399),o=n(3657),i=n(6202),c=n(8835),l=n(706),d=n(7799);const u={large:160,medium:128,small:104},m=({sticker:e,size:t="medium",observeIntersection:n,lastSyncTime:m,forceLoadPreview:h})=>{const f=(0,r.sO)(null),[v,p]=(0,l.Z)(),g=`sticker${e.id}`,Z=(0,o.Op)(f,n),E=e.thumbnail&&e.thumbnail.dataUri,y=(0,i.Z)(`${g}?size=m`,!Z&&!h,a.IU.BlobUrl,m),{transitionClassNames:P}=(0,c.Z)(y,"slow"),C=(0,i.Z)(g,!Z,a.IU.Lottie,m),b=Boolean(C),[w,N]=(0,r.eJ)(String(Math.random())),k=(0,r.I4)((()=>{N(String(Math.random()))}),[]),I=u[t],T=`width: ${I}px; height: ${I}px;`;return r.ZP.createElement("div",{ref:f,className:"AnimatedEmoji media-inner",style:T,onClick:k},!v&&E&&r.ZP.createElement("img",{src:E,className:e.id===s.wB?"like-sticker-thumb":void 0,alt:""}),!v&&y&&r.ZP.createElement("img",{src:y,className:P,alt:""}),b&&r.ZP.createElement(d.Z,{key:g,id:g,animationData:C,size:I,quality:1,play:Z&&w,noLoop:!0,onLoad:p}))}},7799:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),a=n(9118),s=n(6752),o=n(8674),i=n(5332);let c,l;async function d(){return c||(c=n.e(941).then(n.bind(n,7941)),l=(await c).default),c}setTimeout(d,5e3);const u=(0,r.X$)((({className:e,id:t,animationData:n,play:c,playSegment:u,speed:m,noLoop:h,size:f,quality:v,isLowPriority:p,onLoad:g})=>{const[Z,E]=(0,r.eJ)(),y=(0,r.sO)(null),P=(0,r.sO)(!1),C=(0,r.sO)(!1),b=(0,r.sO)();b.current=c;const w=(0,r.sO)();w.current=u,(0,r.d4)((()=>{if(Z||!n)return;const e=()=>{if(!y.current)return;const e=new l(t,y.current,n,{noLoop:h,size:f,quality:v,isLowPriority:p},g);m&&e.setSpeed(m),E(e)};l?e():d().then((()=>{(0,a.T2)((()=>{y.current&&e()}))}))}),[Z,n,t,p,h,g,v,f,m]),(0,r.d4)((()=>()=>{Z&&Z.destroy()}),[Z]);const N=(0,r.I4)(((e=!1)=>{Z&&(b.current||w.current)&&(w.current?Z.playSegment(w.current):e?Z.goToAndPlay(0):Z.play())}),[Z]),k=(0,r.I4)((()=>{Z&&Z.pause()}),[Z]),I=(0,r.I4)((()=>{C.current=!0,Z&&(P.current||(P.current=Z.isPlaying()),k())}),[Z,k]),T=(0,r.I4)((()=>{P.current&&N(),P.current=!1,C.current=!1}),[N]),L=(0,r.I4)((()=>{(0,a.T2)(T)}),[T]);(0,r.d4)((()=>{Z&&(c||u?C.current?P.current=!0:N(h):C.current?P.current=!1:k())}),[Z,c,u,h,N,k]),(0,o.ZP)(I,T),(0,i.Z)(I,L);const x=(0,s.Z)("AnimatedSticker",e),M=f?`width: ${f}px; height: ${f}px;`:void 0;return r.ZP.createElement("div",{ref:y,className:x,style:M})}))},4752:(e,t,n)=>{n.d(t,{Z:()=>P});var r=n(4050),a=n(7361),s=n(790),o=n(2858),i=n(6752),c=n(2340),l=n(2761),d=n(1212),u=n(2019),m=n(3186),h=n(2619),f=n(9107),v=n(231),p=n(9196),g=n(8033);const Z=a.wB?20:25,E=a.wB?50:75;function y(e,t,{handleStartSeek:n,handleSeek:a,handleStopSeek:s}){return r.ZP.createElement("div",{className:"seekline no-selection",onMouseDown:n,onMouseMove:a,onMouseUp:s},r.ZP.createElement("span",{className:"seekline-buffered-progress"},r.ZP.createElement("i",{style:`transform: translateX(${100*t}%)`})),r.ZP.createElement("span",{className:"seekline-play-progress"},r.ZP.createElement("i",{style:`transform: translateX(${100*e}%)`})),r.ZP.createElement("span",{className:"seekline-thumb"},r.ZP.createElement("i",{style:`transform: translateX(${100*e}%)`})))}const P=(0,r.X$)((({theme:e,message:t,senderTitle:n,uploadProgress:P,target:C,date:b,lastSyncTime:w,className:N,isSelectable:k,isSelected:I,onPlay:T,onReadMedia:L,onCancelUpload:x,onDateClick:M})=>{const{content:{audio:S,voice:$},isMediaUnread:F}=t,O=Boolean($),A=(0,r.sO)(!1),D=(0,f.Z)(),[R,U]=(0,r.eJ)(!1),B=w,{mediaData:V,downloadProgress:X}=(0,l.Z)((0,o.Ti)(t,"inline"),!B,(0,o.kG)(t,"inline")),{isBuffered:H,bufferedProgress:K,bufferingHandlers:j,checkBuffering:z}=(0,u.Z)(),{isPlaying:q,playProgress:J,playPause:Y,setCurrentTime:W,duration:_}=(0,m.Z)((0,o.Tp)(t),(0,o.XV)(t),V,j,z,R,(function(){U(!0),T(t.id,t.chatId)}),(0,o.CI)(t));(0,r.d4)((()=>{U(q)}),[q]);const{isDownloadStarted:G,downloadProgress:Q,handleDownloadClick:ee}=(0,h.Z)((0,o.Ti)(t,"download"),(0,o.I3)(t)),te=R&&!H,{isUploading:ne,isTransferring:re,transferProgress:ae}=(0,o.Sc)(t,G?Q:P||X,te||G),{shouldRender:se,transitionClassNames:oe}=(0,d.Z)(re),ie=(0,r.I4)((()=>{ne?x&&x():(q||T(t.id,t.chatId),U(!R),Y())}),[q,ne,t.id,t.chatId,x,T,Y,R]);(0,r.d4)((()=>{q&&L&&F&&L()}),[q,F,L]);const ce=(0,r.I4)((e=>{if(A.current){const t=e.currentTarget.closest(".seekline,.waveform");if(t){const{width:n,left:r}=t.getBoundingClientRect();W(_*((e.clientX-r)/n))}}}),[_,W]),le=(0,r.I4)((e=>{A.current=!0,ce(e)}),[ce]),de=(0,r.I4)((()=>{A.current=!1}),[]),ue=(0,r.I4)((()=>{M(t.id,t.chatId)}),[M,t.id,t.chatId]),me={handleStartSeek:le,handleSeek:ce,handleStopSeek:de},he=(0,o.B4)(t),fe=(0,r.Ye)((()=>$&&function(e,t=0,n=!1,{handleStartSeek:a,handleSeek:s,handleStopSeek:o},i){const{waveform:c,duration:l}=e;if(!c)return;const d="dark"===i?"#494B75":"#CBCBCB",u="dark"===i?"#C0BBED":"#B0DEA6",m="dark"===i?"#868DF5":"#54a3e6",h="dark"===i?"#FFFFFF":"#53ad53",f=Math.min(l/30,1),v=Math.round(Z+(E-Z)*f),p=function(e){const t=8*e.length,n=Math.floor(t/5);if(!n)return[];const r=Array(n),a=e;for(let e=0,t=n-1;e!==t;++e){const t=Math.floor(5*e/8),n=Math.floor(5*e%8),s=a[t]+(a[t+1]<<8);r[e]=s>>n&31}const s=Math.floor(5*(n-1)/8),o=Math.floor(5*(n-1)%8),i=a[s]+(a[s+1]<<8);return r[n-1]=i>>o&31,r}(new Uint8Array(c)),{data:g,peak:y}=function(e,t){let n=0;const r=new Array(t),a=e.length/t,s=e[0],o=e[e.length-1];for(let d=0;d<t;d++){var i,c,l;const t=Math.floor(d*a),u=((null!==(i=e[t-1])&&void 0!==i?i:s)+(null!==(c=e[t])&&void 0!==c?c:s)+(null!==(l=e[t+1])&&void 0!==l?l:o))/3;r[d]=u,n<u&&(n=u)}return{data:r,peak:n}}(p,v),{src:P,width:C,height:b}=function(e,t,{peak:n,fillStyle:r,progressFillStyle:a}){const s=4*e.length,o=document.createElement("canvas");o.width=2*s,o.height=46,o.style.width=`${s}px`,o.style.height="23px";const i=o.getContext("2d");return i.scale(2,2),e.forEach(((s,o)=>{i.globalAlpha=o/e.length>=t?.5:1,i.fillStyle=t>o/e.length?a:r;const c=Math.max(2,s/Math.max(1,n)*23);!function(e,t,n,r,a,s){2<2*s&&(s=1),a<2*s&&(s=a/2),e.beginPath(),e.moveTo(t+s,n),e.arcTo(t+2,n,t+2,n-a,s),e.arcTo(t+2,n-a,t,n-a,s),e.arcTo(t,n-a,t,n,s),e.arcTo(t,n,t+2,n,s),e.closePath()}(i,4*o,23,0,c,1),i.fill()})),{src:o.toDataURL(),width:s,height:23}}(g,t,{peak:y,fillStyle:n?u:d,progressFillStyle:n?h:m});return r.ZP.createElement("img",{src:P,alt:"",width:C,height:b,className:"waveform",draggable:!1,onMouseDown:a,onMouseMove:s,onMouseUp:o})}($,J,he,{handleStartSeek:le,handleSeek:ce,handleStopSeek:de},e)),[$,J,he,le,ce,de,e]),ve=(0,i.Z)("Audio media-inner",N,he&&!C&&"own",C&&"bigger",I&&"audio-is-selected"),pe=["toggle-play"];te?pe.push("loading"):q?pe.push("pause"):q||pe.push("play");const ge=q||J>0&&J<1,Ze=(0,i.Z)("content",ge&&"with-seekline");return r.ZP.createElement("div",{className:ve,dir:D.isRtl?"rtl":void 0},k&&r.ZP.createElement("div",{className:"message-select-control"},I&&r.ZP.createElement("i",{className:"icon-select"})),r.ZP.createElement(v.Z,{round:!0,ripple:!a.wB,size:C?"smaller":"tiny",className:pe.join(" "),ariaLabel:q?"Pause audio":"Play audio",onClick:ie,isRtl:D.isRtl},r.ZP.createElement("i",{className:"icon-play"}),r.ZP.createElement("i",{className:"icon-pause"})),se&&r.ZP.createElement("div",{className:(0,i.Z)("media-loading",oe,te&&"interactive")},r.ZP.createElement(p.Z,{progress:ae,transparent:!0,size:C?"m":"s",onClick:te?ie:void 0,noCross:!te})),S&&r.ZP.createElement(v.Z,{round:!0,size:"tiny",className:"download-button",ariaLabel:G?"Cancel download":"Download",onClick:ee},r.ZP.createElement("i",{className:G?"icon-close":"icon-arrow-down"})),"searchResult"===C&&r.ZP.createElement(r.ZP.Fragment,null,r.ZP.createElement("div",{className:Ze},r.ZP.createElement("div",{className:"content-row"},r.ZP.createElement("p",{className:"title",dir:"auto"},(0,c.Z)(function(){if(O)return n||"Voice";const{title:e,fileName:t}=S;return e||t}())),r.ZP.createElement("div",{className:"message-date"},b&&r.ZP.createElement(g.Z,{className:"date",onClick:ue},(0,s.VX)(D,1e3*b)))),ge&&y(J,K,me),!ge&&r.ZP.createElement("p",{className:"duration",dir:"auto"},J>0?`${(0,s.k9)(_*J)} / `:void 0,function(){if(O)return(0,s.k9)($.duration);const{performer:e}=S;return r.ZP.createElement(r.ZP.Fragment,null,e&&(0,c.Z)(e),e&&n&&r.ZP.createElement("span",null,"•"),n&&(0,c.Z)(n))}()))),"searchResult"!==C&&S&&function(e,t,n,a,o,i,l,d){const{title:u,performer:m,duration:h,fileName:f}=t,v=n||a>0&&a<1;return r.ZP.createElement("div",{className:"content"},r.ZP.createElement("p",{className:"title",dir:"auto"},(0,c.Z)(u||f)),v&&y(a,o,i),!v&&r.ZP.createElement("div",{className:"meta",dir:"auto"},r.ZP.createElement("span",{className:"performer"},(0,c.Z)(m||"Unknown")),l&&r.ZP.createElement(r.ZP.Fragment,null," ","•"," ",r.ZP.createElement(g.Z,{className:"date",onClick:d},(0,s.ZK)(e,1e3*l)))),r.ZP.createElement("p",{className:"duration",dir:"auto"},a>0?`${(0,s.k9)(h*a)} / `:void 0,(0,s.k9)(h)))}(D,S,q,J,K,me,b,M?ue:void 0),"searchResult"!==C&&$&&function(e,t,n){return r.ZP.createElement("div",{className:"content"},t,r.ZP.createElement("p",{className:"voice-duration",dir:"auto"},(0,s.k9)(e.duration),n&&r.ZP.createElement("span",null,"•")))}($,fe,F))}))},172:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(4050),a=n(6137),s=n(3716),o=n(2858),i=n(2155),c=n(6752),l=n(2340),d=n(6202),u=n(8835),m=n(9107);const h=(0,r.X$)((({className:e,size:t="large",chat:n,user:h,text:f,withOnlineStatus:v,isSavedMessages:p,lastSyncTime:g,onClick:Z})=>{const E=h&&(0,o.NB)(h);let y;p||E||(h?y=(0,o.RT)(h):n&&(y=(0,o.RT)(n)));const P=(0,d.Z)(y,!1,a.IU.DataUri,g),{shouldRenderFullMedia:C,transitionClassNames:b}=(0,u.Z)(P,"slow"),w=(0,m.Z)();let N="";if(p)N=r.ZP.createElement("i",{className:"icon-avatar-saved-messages"});else if(E)N=r.ZP.createElement("i",{className:"icon-avatar-deleted-account"});else if(C)N=r.ZP.createElement("img",{src:P,className:`${b} avatar-media`,alt:"",decoding:"async"});else if(h){const e=(0,o.Js)(h);N=e?(0,i.Xv)(e,2):void 0}else if(n){const e=(0,o.U)(w,n);N=e&&(0,i.Xv)(e,(0,o.YA)(n.id)?2:1)}else f&&(N=(0,i.Xv)(f,2));const k=!p&&h&&(0,o.kM)(h),I=(0,c.Z)(`Avatar size-${t}`,e,`color-bg-${(0,o.Rs)(h||n)}`,p&&"saved-messages",E&&"deleted-account",v&&k&&"online",Z&&"interactive",!p&&!C&&"no-photo"),T=(0,r.I4)((e=>{Z&&Z(e,p||C)}),[Z,p,C]),L=(h||n)&&(h||n).id;return r.ZP.createElement("div",{className:I,onClick:T,"data-test-sender-id":s.Cg?L:void 0},"string"==typeof N?(0,l.Z)(N,["jumbo"===t?"hq_emoji":"emoji"]):N)}))},329:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(4050),a=n(5116),s=n(8085),o=n(2858),i=n(782),c=n(9107),l=n(2340),d=n(172),u=n(3103),m=n(231);const h=(0,r.X$)((0,a.c$)(((e,{chat:t})=>{const n=(0,o.YA)(t.id),r=(0,s.FM)(e,t.id),a=n&&(0,s.dy)(e,(0,o.zX)(t)),i=a&&(0,o.cS)(a)&&!t.isSupport,c=n&&!r&&!i,l=n?(0,o.Vl)((0,s.dy)(e,(0,o.zX)(t))):void 0;return{isPrivateChat:n,isChatWithSelf:r,isBot:i,isChannel:(0,o.eA)(t),isBasicGroup:(0,o.G9)(t),isSuperGroup:(0,o.ZV)(t),currentUserId:e.currentUserId,canDeleteForAll:c,contactName:l}}),((e,t)=>(0,i.ei)(t,["leaveChannel","deleteHistory","deleteChannel","deleteChatUser","blockContact"])))((({isOpen:e,chat:t,isChannel:n,isPrivateChat:a,isChatWithSelf:s,isBot:i,isBasicGroup:h,isSuperGroup:f,currentUserId:v,canDeleteForAll:p,contactName:g,onClose:Z,onCloseAnimationEnd:E,leaveChannel:y,deleteHistory:P,deleteChannel:C,deleteChatUser:b,blockContact:w})=>{const N=(0,c.Z)(),k=(0,o.U)(N,t),I=(0,r.I4)((()=>{P({chatId:t.id,shouldDeleteForAll:!0}),Z()}),[P,t.id,Z]),T=(0,r.I4)((()=>{P({chatId:t.id,shouldDeleteForAll:!0}),w({contactId:t.id,accessHash:t.accessHash}),Z()}),[P,t.id,t.accessHash,w,Z]),L=(0,r.I4)((()=>{a?P({chatId:t.id,shouldDeleteForAll:!1}):h?(b({chatId:t.id,userId:v}),P({chatId:t.id,shouldDeleteForAll:!1})):!n&&!f||t.isCreator?(n||f)&&t.isCreator&&C({chatId:t.id}):y({chatId:t.id}),Z()}),[a,h,n,f,v,t.isCreator,t.id,Z,P,b,y,C]);return r.ZP.createElement(u.Z,{isOpen:e,className:"DeleteChatModal",header:r.ZP.createElement("div",{className:"modal-header",dir:N.isRtl?"rtl":void 0},r.ZP.createElement(d.Z,{size:"tiny",chat:t,isSavedMessages:s}),r.ZP.createElement("h3",{className:"modal-title"},N(n&&!t.isCreator?"LeaveChannel":n&&t.isCreator?"ChannelDelete":h||f?"Group.LeaveGroup":"DeleteChatUser"))),onClose:Z,onCloseAnimationEnd:E},n&&t.isCreator?r.ZP.createElement("p",null,(0,l.Z)(N("ChatList.DeleteAndLeaveGroupConfirmation",k),["simple_markdown"])):n&&!t.isCreator||h||f?r.ZP.createElement("p",null,(0,l.Z)(N("ChannelLeaveAlertWithName",k),["simple_markdown"])):r.ZP.createElement("p",null,(0,l.Z)(N("ChatList.DeleteChatConfirmation",g),["simple_markdown"])),i&&r.ZP.createElement(m.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:T},N("DeleteAndStop")),p&&r.ZP.createElement(m.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:I},g?(0,l.Z)(N("ChatList.DeleteForEveryone",g)):N("DeleteForAll")),r.ZP.createElement(m.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:L},N(n&&!t.isCreator?"LeaveChannel":n&&t.isCreator?"Chat.Input.Delete":h||f?"Group.LeaveGroup":p?"ChatList.DeleteForCurrentUser":"Delete")),r.ZP.createElement(m.Z,{className:"confirm-dialog-button",isText:!0,onClick:Z},N("Cancel")))})))},2535:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),a=n(5376),s=n(2858),o=n(3657),i=n(2761),c=n(6202),l=n(6562),d=n(7002);const u=(0,r.X$)((({message:e,observeIntersection:t,smaller:n,uploadProgress:u,withDate:m,datetime:h,className:f,sender:v,isSelected:p,isSelectable:g,onCancelUpload:Z,onMediaClick:E,onDateClick:y})=>{const P=(0,r.sO)(null),C=e.content.document,b=(0,a.K2)(C)||"",{fileName:w,size:N,timestamp:k}=C,I=E&&Boolean(C.mediaType),T=(0,o.Op)(P,t),[L,x]=(0,r.eJ)(!1),{mediaData:M,downloadProgress:S}=(0,i.Z)((0,s.Ti)(e,"download"),!L,void 0,void 0,void 0,!0),{isUploading:$,isTransferring:F,transferProgress:O}=(0,s.Sc)(e,u||S,L),A=(0,a.v6)(C),D=A?(0,s.DH)(e):void 0,R=A?C.previewBlobUrl:void 0,U=(0,c.Z)((0,s.Ti)(e,"pictogram"),!T),B=(0,r.I4)((()=>{I?E():$?Z&&Z():x((e=>!e))}),[I,$,Z,E]),V=(0,r.I4)((()=>{y(e.id,e.chatId)}),[y,e.id,e.chatId]);return(0,r.d4)((()=>{L&&M&&((0,l.Z)(M,w),x(!1))}),[w,M,L]),r.ZP.createElement(d.Z,{ref:P,name:w,extension:b,size:N,timestamp:m?h||k:void 0,thumbnailDataUri:D,previewData:R||U,smaller:n,isTransferring:F,isUploading:$,transferProgress:O,className:f,sender:v,isSelectable:g,isSelected:p,actionIcon:I?(0,s.hC)(e)?"icon-play":"icon-eye":"icon-download",onClick:B,onDateClick:y?V:void 0})}))},7002:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(4050),a=n(1212),s=n(8835),o=n(6752),i=n(790),c=n(5376),l=n(4399),d=n(2340),u=n(9107),m=n(9196),h=n(8033);const f=(0,r.X$)((({ref:e,name:t,size:n,extension:f="",timestamp:v,sender:p,thumbnailDataUri:g,previewData:Z,className:E,smaller:y,isTransferring:P,isUploading:C,isSelectable:b,isSelected:w,transferProgress:N,actionIcon:k,onClick:I,onDateClick:T})=>{const L=(0,u.Z)();let x=(0,r.sO)(null);e&&(x=e);const{shouldRender:M,transitionClassNames:S}=(0,a.Z)(P,void 0,!0),$=(0,c.Oh)(f),F=(0,c.yW)(n),{shouldRenderThumb:O,shouldRenderFullMedia:A,transitionClassNames:D}=(0,s.Z)(Z,"slow"),{width:R,height:U}=(0,l.lE)(y),B=(0,o.Z)("File",E,y&&"smaller",I&&!C&&"interactive",w&&"file-is-selected");return r.ZP.createElement("div",{ref:x,className:B,dir:L.isRtl?"rtl":void 0},b&&r.ZP.createElement("div",{className:"message-select-control"},w&&r.ZP.createElement("i",{className:"icon-select"})),r.ZP.createElement("div",{className:"file-icon-container",onClick:C?void 0:I},g||Z?r.ZP.createElement("div",{className:"file-preview media-inner"},O&&r.ZP.createElement("img",{src:g,width:R,height:U,className:"thumbnail",alt:""}),A&&r.ZP.createElement("img",{src:Z,className:`full-media ${D}`,width:R,height:U,alt:""})):r.ZP.createElement("div",{className:`file-icon ${$}`},f.length<=4&&r.ZP.createElement("span",{className:"file-ext",dir:"auto"},f)),M&&r.ZP.createElement("div",{className:(0,o.Z)("file-progress",$,S)},r.ZP.createElement(m.Z,{progress:N,size:y?"s":"m",onClick:C?I:void 0})),I&&r.ZP.createElement("i",{className:(0,o.Z)("action-icon",k||"icon-download",M&&"hidden")})),r.ZP.createElement("div",{className:"file-info"},r.ZP.createElement("div",{className:"file-title",dir:"auto"},(0,d.Z)(t)),r.ZP.createElement("div",{className:"file-subtitle",dir:"auto"},r.ZP.createElement("span",null,P&&N?`${Math.round(100*N)}%`:F),p&&r.ZP.createElement("span",{className:"file-sender"},(0,d.Z)(p)),!p&&v&&r.ZP.createElement(r.ZP.Fragment,null," ",r.ZP.createElement(h.Z,{onClick:T},(0,i.ZK)(L,1e3*v))))),p&&v&&r.ZP.createElement(h.Z,{onClick:T},(0,i.VX)(L,1e3*v)))}))},8799:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(4050),a=n(5116),s=n(1713),o=n(2858),i=n(8085),c=n(2340),l=n(782),d=n(9107),u=n(172),m=n(9411),h=n(8729);const f=(0,r.X$)((0,a.c$)(((e,{chatId:t})=>{const{lastSyncTime:n}=e,r=(0,i.Z1)(e,t);return{lastSyncTime:n,chat:r,onlineCount:r?(0,i.YK)(e,r):void 0,areMessagesLoaded:Boolean((0,i.Zw)(e,t))}}),((e,t)=>(0,l.ei)(t,["loadFullChat","openMediaViewer"])))((({typingStatus:e,avatarSize:t="medium",withMediaViewer:n,withUsername:a,withFullInfo:i,withUpdatingStatus:l,withChatType:f,noRtl:v,chat:p,onlineCount:g,areMessagesLoaded:Z,lastSyncTime:E,loadFullChat:y,openMediaViewer:P})=>{const C=p&&(0,o.ZV)(p),{id:b,isMin:w,isRestricted:N}=p||{};(0,r.d4)((()=>{b&&!w&&i&&E&&y({chatId:b})}),[b,w,E,i,y,C]);const k=(0,r.I4)(((e,n)=>{p&&n&&(e.stopPropagation(),P({avatarOwnerId:p.id,origin:"jumbo"===t?s.bZ.ProfileAvatar:s.bZ.MiddleHeaderAvatar}))}),[p,t,P]),I=(0,d.Z)();if(p)return r.ZP.createElement("div",{className:"ChatInfo",dir:!v&&I.isRtl?"rtl":void 0},r.ZP.createElement(u.Z,{key:p.id,size:t,chat:p,onClick:n?k:void 0}),r.ZP.createElement("div",{className:"info"},r.ZP.createElement("div",{className:"title"},r.ZP.createElement("h3",{dir:"auto"},(0,c.Z)((0,o.U)(I,p))),p.isVerified&&r.ZP.createElement(m.Z,null)),function(){if(l&&!Z&&!N)return r.ZP.createElement("span",{className:"status",dir:"auto"},I("Updating"));if(!p)return;if(e)return r.ZP.createElement(h.Z,{typingStatus:e});if(f)return r.ZP.createElement("div",{className:"status",dir:"auto"},I((0,o.l6)(p)));const t=a?p.username:void 0,n=function(e,t){const n=e((0,o.l6)(t)),{membersCount:r}=t;return t.isRestricted?"Channel"===n?"channel is inaccessible":"group is inaccessible":r?e("Channel"===n?"Subscribers":"Members",r,"i"):n}(I,p),s=g?`, ${I("OnlineCount",g,"i")}`:void 0;return r.ZP.createElement("div",{className:"status"},t&&r.ZP.createElement("span",{className:"handle"},t),r.ZP.createElement("span",{className:"group-status"},n),s&&r.ZP.createElement("span",{className:"online-status"},s))}()))})))},6844:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4050),a=n(790),s=n(9107),o=n(8018);const i=(0,r.X$)((({message:e,outgoingStatus:t})=>{const n=(0,s.Z)();return r.ZP.createElement("div",{className:"LastMessageMeta"},t&&r.ZP.createElement(o.Z,{status:t}),r.ZP.createElement("span",{className:"time"},(0,a.VX)(n,1e3*e.date)))}))},3709:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(4050),a=n(790),s=n(2858),o=n(6202),i=n(8835);const c=(0,r.X$)((({message:e,idPrefix:t="shared-media",onClick:n})=>{const c=(0,r.I4)((()=>{n(e.id,e.chatId)}),[e.id,e.chatId,n]),l=(0,s.DH)(e),d=(0,o.Z)((0,s.Ti)(e,"pictogram")),{shouldRenderThumb:u,shouldRenderFullMedia:m,transitionClassNames:h}=(0,i.Z)(d,"slow"),f=(0,s.b7)(e);return r.ZP.createElement("div",{id:`${t}${e.id}`,className:"Media scroll-item",onClick:n?c:void 0},u&&r.ZP.createElement("img",{src:l,alt:""}),m&&r.ZP.createElement("img",{src:d,className:`${h} full-media`,alt:""}),f&&r.ZP.createElement("span",{className:"video-duration"},f.isGif?"GIF":(0,a.k9)(f.duration)))}))},8018:(e,t,n)=>{n.d(t,{Z:()=>o});var r,a=n(4050),s=n(2255);!function(e){e[e.failed=0]="failed",e[e.pending=1]="pending",e[e.succeeded=2]="succeeded",e[e.read=3]="read"}(r||(r={}));const o=(0,a.X$)((({status:e})=>a.ZP.createElement("div",{className:"MessageOutgoingStatus"},a.ZP.createElement(s.Z,{name:"reveal",activeKey:r[e]},(()=>a.ZP.createElement("i",{className:`icon-message-${e}`}))))))},7262:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(4050),a=n(6752),s=n(1212),o=n(2340),i=n(9107);const c=(0,r.X$)((({text:e="Nothing found.",description:t})=>{const n=(0,i.Z)(),{transitionClassNames:c}=(0,s.Z)(!0);return r.ZP.createElement("div",{className:(0,a.Z)("NothingFound",c,t&&"with-description")},e,t&&r.ZP.createElement("p",{className:"description"},(0,o.Z)(n(t),["br"])))}))},1820:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(4050),a=n(2858),s=n(1273),o=n(4605),i=n(7687),c=n(1876),l=n(6058),d=n(8799),u=n(9187),m=n(7407),h=n(9107),f=n(4288);const v=(0,r.X$)((({itemIds:e,selectedIds:t,filterValue:n,filterPlaceholder:v,notFoundText:p,searchInputId:g,isLoading:Z,noScrollRestore:E,onSelectedIdsChange:y,onFilterChange:P,onLoadMore:C})=>{const b=(0,r.sO)(null),w=t.length>10;(0,r.d4)((()=>{setTimeout((()=>{requestAnimationFrame((()=>{b.current.focus()}))}),500)}),[]);const N=(0,r.I4)((e=>{const n=[...t];n.includes(e)?n.splice(n.indexOf(e),1):n.push(e),y(n),P("")}),[t,y,P]),k=(0,r.I4)((e=>{const{value:t}=e.currentTarget;P(t)}),[P]),[I,T]=(0,m.Z)(C,e,Boolean(n)),L=(0,h.Z)();return r.ZP.createElement("div",{className:"Picker"},r.ZP.createElement("div",{className:"picker-header custom-scroll",dir:L.isRtl?"rtl":void 0},t.map(((e,n)=>r.ZP.createElement(u.Z,{chatOrUserId:e,isMinimized:w&&n<t.length-5,canClose:!0,onClick:N,clickArg:e}))),r.ZP.createElement(i.Z,{id:g,ref:b,value:n,onChange:k,placeholder:v||L("SelectChat")})),I&&I.length?r.ZP.createElement(s.Z,{className:"picker-list custom-scroll",items:I,onLoadMore:T,noScrollRestore:E},I.map((e=>r.ZP.createElement(c.Z,{key:e,className:"chat-item-clickable picker-list-item",onClick:()=>N(e),ripple:!0},r.ZP.createElement(o.Z,{label:"",checked:t.includes(e)}),(0,a.YA)(e)?r.ZP.createElement(l.Z,{userId:e}):r.ZP.createElement(d.Z,{chatId:e}))))):Z||!I||I.length?r.ZP.createElement(f.Z,null):r.ZP.createElement("p",{className:"no-results"},p||"Sorry, nothing found."))}))},9187:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),a=n(5116),s=n(8085),o=n(2858),i=n(2340),c=n(6752),l=n(9107),d=n(172);const u=(0,r.X$)((0,a.c$)(((e,{chatOrUserId:t})=>t?{chat:t?(0,s.Z1)(e,t):void 0,user:(0,o.YA)(t)?(0,s.dy)(e,t):void 0}:{}))((({icon:e,title:t,isMinimized:n,canClose:a,onClick:s,clickArg:u,chat:m,user:h,className:f})=>{const v=(0,l.Z)();let p,g;if(e&&t)p=r.ZP.createElement("div",{className:"item-icon"},r.ZP.createElement("i",{className:`icon-${e}`})),g=t;else if(m||h){p=r.ZP.createElement(d.Z,{chat:m,user:h,size:"small",isSavedMessages:h&&h.isSelf});const e=!m||h&&!h.isSelf?(0,o.Vl)(h):(0,o.U)(v,m,h);g=e?(0,i.Z)(e):void 0}const Z=(0,c.Z)("PickerSelectedItem",f,n&&"minimized",a&&"closeable");return r.ZP.createElement("div",{className:Z,onClick:()=>s(u),title:n?g:void 0,dir:v.isRtl?"rtl":void 0},p,!n&&r.ZP.createElement("div",{className:"item-name",dir:"auto"},g),a&&r.ZP.createElement("div",{className:"item-remove"},r.ZP.createElement("i",{className:"icon-close"})))})))},6058:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(4050),a=n(5116),s=n(1713),o=n(8085),i=n(2858),c=n(2340),l=n(782),d=n(9107),u=n(172),m=n(9411),h=n(8729);const f=(0,r.X$)((0,a.c$)(((e,{userId:t,forceShowSelf:n})=>{const{lastSyncTime:r,serverTimeOffset:a}=e,s=(0,o.dy)(e,t);return{lastSyncTime:r,user:s,isSavedMessages:!n&&s&&s.isSelf,areMessagesLoaded:Boolean((0,o.Zw)(e,t)),serverTimeOffset:a}}),((e,t)=>(0,l.ei)(t,["loadFullUser","openMediaViewer"])))((({typingStatus:e,avatarSize:t="medium",status:n,withMediaViewer:a,withUsername:o,withFullInfo:l,withUpdatingStatus:f,noStatusOrTyping:v,noRtl:p,user:g,isSavedMessages:Z,areMessagesLoaded:E,lastSyncTime:y,loadFullUser:P,openMediaViewer:C,serverTimeOffset:b})=>{const{id:w}=g||{},N=(0,i.Js)(g);(0,r.d4)((()=>{l&&y&&w&&P({userId:w})}),[w,P,y,l]);const k=(0,r.I4)(((e,n)=>{g&&n&&(e.stopPropagation(),C({avatarOwnerId:g.id,origin:"jumbo"===t?s.bZ.ProfileAvatar:s.bZ.MiddleHeaderAvatar}))}),[g,t,C]),I=(0,d.Z)();if(g)return r.ZP.createElement("div",{className:"ChatInfo",dir:!p&&I.isRtl?"rtl":void 0},r.ZP.createElement(u.Z,{key:g.id,size:t,user:g,isSavedMessages:Z,onClick:a?k:void 0}),r.ZP.createElement("div",{className:"info"},Z?r.ZP.createElement("div",{className:"title"},r.ZP.createElement("h3",null,I("SavedMessages"))):r.ZP.createElement("div",{className:"title"},r.ZP.createElement("h3",{dir:"auto"},N&&(0,c.Z)(N)),g&&g.isVerified&&r.ZP.createElement(m.Z,null)),(n||!Z&&!v)&&(n?r.ZP.createElement("span",{className:"status",dir:"auto"},n):f&&!E?r.ZP.createElement("span",{className:"status",dir:"auto"},I("Updating")):g?e?r.ZP.createElement(h.Z,{typingStatus:e}):r.ZP.createElement("div",{className:"status "+((0,i.kM)(g)?"online":"")},o&&g.username&&r.ZP.createElement("span",{className:"handle"},g.username),r.ZP.createElement("span",{className:"user-status",dir:"auto"},(0,i.Tq)(I,g,b))):void 0)))})))},3547:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(4050),a=n(6137),s=n(3657),o=n(6202),i=n(8835),c=n(706),l=n(6752),d=n(7799),u=n(231);const m=(0,r.X$)((({sticker:e,size:t,observeIntersection:n,noAnimate:m,title:h,className:f,onClick:v,clickArg:p,onUnfaveClick:g})=>{const Z=(0,r.sO)(null),E=`sticker${e.id}`,y=`sticker-button-${e.id}`,P=(0,s.Op)(Z,n),C=e.thumbnail?e.thumbnail.dataUri:void 0,b=(0,o.Z)(`${E}?size=m`,!P,a.IU.BlobUrl),w=P&&!m,N=(0,o.Z)(e.isAnimated&&E,!w,a.IU.Lottie),[k,I,T]=(0,c.Z)(Boolean(N)),L=k&&w,{shouldRenderThumb:x,shouldRenderFullMedia:M,transitionClassNames:S}=(0,i.Z)(b||L,"slow");(0,r.d4)((()=>{w||T()}),[T,w]);const $=(0,l.Z)("StickerButton",e.isAnimated&&"animated",y,f),F=x&&C?`background-image: url('${C}');`:"";return r.ZP.createElement("div",{ref:Z,className:$,title:h||e&&e.emoji,style:F,"data-sticker-id":e.id,onClick:function(){v&&v(p)}},M&&!L&&r.ZP.createElement("img",{src:b,className:S}),w&&N&&r.ZP.createElement(d.Z,{id:E,animationData:N,play:!0,size:t,isLowPriority:!0,onLoad:I}),g&&r.ZP.createElement(u.Z,{className:"sticker-unfave-button",color:"dark",round:!0,onClick:function(t){t.stopPropagation(),t.preventDefault(),g(e)}},r.ZP.createElement("i",{className:"icon-close"})))}))},4851:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(9203),s=n(8778);const o=(0,r.X$)((e=>{const{isOpen:t}=e,n=(0,s.Z)(a.gl.Extra,"StickerSetModal",!t);return n?r.ZP.createElement(n,e):void 0}))},8729:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(4050),a=n(5116),s=n(8085),o=n(2858),i=n(2340),c=n(9107);const l=(0,r.X$)((0,a.c$)(((e,{typingStatus:t})=>t.userId?{typingUser:(0,s.dy)(e,t.userId)}:{}))((({typingStatus:e,typingUser:t})=>{const n=(0,c.Z)(),a=t&&!t.isSelf&&(0,o.Vl)(t);return r.ZP.createElement("p",{className:"typing-status",dir:n.isRtl?"rtl":"auto"},a&&r.ZP.createElement("span",{className:"sender-name",dir:"auto"},(0,i.Z)(a)),n(e.action).replace("{user}","").trim(),r.ZP.createElement("span",{className:"ellipsis"}))})))},9411:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(4050);const a=()=>r.ZP.createElement("span",{className:"VerifiedIcon"})},5418:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(4050),a=n(2858),s=n(6752),o=n(8035),i=n(2340),c=n(790),l=n(9107),d=n(3709),u=n(8033),m=n(88);const h=(0,r.X$)((({message:e,senderTitle:t,onMessageClick:n})=>{const h=(0,l.Z)();let f=(0,a.s1)(e);if(!f){const t=(0,a.T7)(e);if(t){const{url:n,domain:r}=t,s=(0,a.MK)(h,e);f={siteName:r.replace(/^www./,""),url:n.includes("://")?n:n.includes("@")?`mailto:${n}`:`http://${n}`,description:s!==n?s:void 0}}}const v=(0,r.I4)((()=>{n(e.id,e.chatId)}),[n,e.id,e.chatId]);if(!f)return;const{siteName:p,url:g,displayUrl:Z,title:E,description:y,photo:P,video:C}=f,b=!t&&(0,o.Z)(y,170),w=(0,s.Z)("WebLink scroll-item",!P&&!C&&"without-media");return r.ZP.createElement("div",{className:w,"data-initial":(p||Z)[0],dir:h.isRtl?"rtl":void 0},P&&r.ZP.createElement(d.Z,{message:e}),r.ZP.createElement("div",{className:"content"},r.ZP.createElement(u.Z,{isRtl:h.isRtl,className:"site-title",onClick:v},(0,i.Z)(E||p||Z)),b&&r.ZP.createElement(u.Z,{isRtl:h.isRtl,className:"site-description",onClick:v},(0,i.Z)(b)),r.ZP.createElement(m.Z,{url:g,className:"site-name",text:"",isRtl:h.isRtl},g.replace("mailto:","")||Z),t&&r.ZP.createElement("div",{className:"sender-name"},(0,i.Z)(t))),t&&r.ZP.createElement("div",{className:"message-date"},r.ZP.createElement(u.Z,{className:"date",onClick:v,isRtl:h.isRtl},(0,c.VX)(h,1e3*e.date))))}))},4399:(e,t,n)=>{n.d(t,{L6:()=>i,Gw:()=>c,vw:()=>l,vY:()=>d,wB:()=>u,kc:()=>p,fM:()=>Z,Eh:()=>E,GC:()=>y,W7:()=>P,lE:()=>C,Wr:()=>b,PA:()=>w,jg:()=>N});var r=n(3716),a=n(7361),s=n(3858),o=n(2858);const i="(max-height: 640px)",c=parseInt(getComputedStyle(document.documentElement).fontSize,10),l=200,d={width:640,height:640},u="1258816259753933",m={width:100,height:100};let h,f,v;function p(e,t,n,r){const o=t||n?1.625:0;return(function(e,t){const n=e?30:29;if(!a.wB)return n;const{width:r}=s.Z.get();return h||(h=Math.min(30,r/c-4.5)),f||(f=Math.min(29,r/c-7)),v||(v=Math.min(29,r/c-4.5)),e?h:t?v:f}(e,r)-o)*c}function g({width:e,height:t,fromOwnMessage:n,isForwarded:r,isWebPagePhoto:a,isGif:s,noAvatars:o}){const i=t/e;return N(p(n,r,a,o),function(e,t){return e&&t&&t>=.75&&t<=1.25?20*c:27*c}(s,i),e,t)}function Z(e,t){const n=window.matchMedia(i),{width:r,height:a}=s.Z.get();let o=t&&n.matches?10:8.25;return e&&(o=n.matches?10:15),{width:r,height:a-o*c}}function E(e,t,n,r,a){const{width:s,height:i}=(0,o.HV)(e)||m;return g({width:s,height:i,fromOwnMessage:t,isForwarded:n,isWebPagePhoto:r,noAvatars:a})}function y(e,t,n,r){const{width:a,height:s}=(0,o.jC)(e)||m;return g({width:a,height:s,fromOwnMessage:t,isForwarded:n,isGif:e.isGif,noAvatars:r})}function P(){return{width:2*c,height:2*c}}function C(e){return e?{width:3*c,height:3*c}:{width:3.375*c,height:3.375*c}}function b(e){const{width:t}=e;let{height:n}=e;e.id===u&&(n=t);const s=n&&t&&n/t,o=c*(a.wB?r.w7:r.K7),i=s?o*s:o;return s&&i>o?{width:Math.round(o/s),height:o}:{width:o,height:i}}function w({width:e,height:t},n,r=!1){const{width:a,height:s}=Z(n,r);return N(a,s,e,t)}function N(e,t,n,r){const a=r/n,s=Math.min(n,e);return Math.round(s*a)>t?{width:Math.round(t/a),height:t}:{width:s,height:Math.round(s*a)}}},935:(e,t,n)=>{n.d(t,{X:()=>d,H:()=>h});var r=n(4050),a=n(5116),s=n(6137),o=n(2858),i=n(2340),c=n(7373),l=n(88);function d(e,t,n){const r=e.content.text;if(!r||!r.text){const t=(0,o.UD)(e);return t?[t]:void 0}const{text:a,entities:s}=r;return h(a,s,t,n)}function u(e,t,n,r){const{offset:a,length:s}=e,o=new Set([t]);if(r.has(t))return;const i=[];return n.filter(((e,n)=>n>t&&e.offset>=a&&e.offset<a+s)).map((e=>u(e,n.indexOf(e),n,r))).filter(Boolean).forEach((e=>{let t=!1;e.organizedIndexes.forEach((e=>{t||o.has(e)||(t=!0),o.add(e)})),t&&i.push(e)})),{entity:e,organizedIndexes:o,nestedEntities:i}}function m(e){const t=new Set,n=[];return e.forEach(((r,a)=>{if(t.has(a))return;const s=u(r,a,e,t);s&&(s.organizedIndexes.forEach((e=>{t.add(e)})),n.push(s))})),n}function h(e,t,n,a,o){if(!t||!t.length)return f(e,n,a,o);const d=[];let u=!1;const h=m(t);function Z(t,d,m,h){const E=[],{entity:y,nestedEntities:P}=m,{offset:C,length:b,type:w}=y;let N=e.substring(t,C);const k=N.length;N&&(u&&N.length>0&&"\n"===N[0]&&(N=N.substr(1),u=!1),N&&E.push(...f(N,n,a,o)));const I=t+k,T=I+b;let L=e.substring(C,C+b);const x=[];if(u&&L.length>0&&"\n"===L[0]&&(L=L.substr(1),u=!1),w===s.Vv.Pre&&(u=!0),P.length){let e=I;P.forEach(((t,n)=>{const{renderResult:r,entityEndIndex:a}=Z(e,T,t,n===P.length-1);x.push(...r),e=a}))}const M=o?function(e,t,n){const r="string"==typeof t&&t,a=n.length?n.join(""):(0,i.Z)(t,["escape_html","emoji_html","br_html"]).join("");if(!r)return a;switch(e.type){case s.Vv.Bold:return`<b>${a}</b>`;case s.Vv.Italic:return`<i>${a}</i>`;case s.Vv.Underline:return`<u>${a}</u>`;case s.Vv.Code:return`<code class="text-entity-code">${a}</code>`;case s.Vv.Pre:return`\`\`\`<br/>${a}<br/>\`\`\``;case s.Vv.Strike:return`<del>${a}</del>`;case s.Vv.MentionName:return`<a\n class="text-entity-link"\n data-entity-type="${s.Vv.MentionName}"\n data-user-id="${e.userId}"\n contenteditable="false"\n dir="auto"\n >${a}</a>`;case s.Vv.Url:case s.Vv.TextUrl:return`<a\n class="text-entity-link"\n href=${v(r,e)}\n data-entity-type="${e.type}"\n dir="auto"\n >${a}</a>`;default:return a}}(y,L,x):function(e,t,n){const a="string"==typeof t&&t,o=n.length?n:t;if(!a)return f(o);switch(e.type){case s.Vv.Bold:return r.ZP.createElement("strong",null,f(o));case s.Vv.Blockquote:return r.ZP.createElement("blockquote",null,f(o));case s.Vv.BotCommand:return r.ZP.createElement("a",{onClick:p,className:"text-entity-link",dir:"auto"},f(o));case s.Vv.Hashtag:case s.Vv.Cashtag:return r.ZP.createElement("a",{onClick:g,className:"text-entity-link",dir:"auto"},f(o));case s.Vv.Code:return r.ZP.createElement("code",{className:"text-entity-code"},f(o));case s.Vv.Email:return r.ZP.createElement("a",{href:`mailto:${a}`,target:"_blank",rel:"noopener noreferrer",className:"text-entity-link",dir:"auto"},f(o));case s.Vv.Italic:return r.ZP.createElement("em",null,f(o));case s.Vv.MentionName:return r.ZP.createElement(c.Z,{userId:e.userId},f(o));case s.Vv.Mention:return r.ZP.createElement(c.Z,{username:a},f(o));case s.Vv.Phone:return r.ZP.createElement("a",{href:`tel:${a}`,className:"text-entity-link",dir:"auto"},f(o));case s.Vv.Pre:return r.ZP.createElement("pre",{className:"text-entity-pre"},f(o));case s.Vv.Strike:return r.ZP.createElement("del",null,f(o));case s.Vv.TextUrl:case s.Vv.Url:return r.ZP.createElement(l.Z,{url:v(a,e),text:a},f(o));case s.Vv.Underline:return r.ZP.createElement("ins",null,f(o));default:return f(o)}}(y,L,x);if(Array.isArray(M)?E.push(...M):E.push(M),h&&T<d){let t=e.substring(T,d);u&&t.length>0&&"\n"===t[0]&&(t=t.substring(1)),t&&E.push(...f(t,n,a,o))}return{renderResult:E,entityEndIndex:T}}let E=0;return h.forEach(((t,n)=>{const{renderResult:r,entityEndIndex:a}=Z(E,e.length,t,n===h.length-1);d.push(...r),E=a})),d}function f(e,t,n,r){if(Array.isArray(e)){const a=[];return e.forEach((e=>{a.push(...f(e,t,n,r))})),a}if(r)return(0,i.Z)(e,["escape_html","emoji_html","br_html"]);const a=n?"hq_emoji":"emoji";return t?(0,i.Z)(e,[a,"br","highlight"],{highlight:t}):(0,i.Z)(e,[a,"br"])}function v(e,t){const{type:n,url:r}=t;return n===s.Vv.TextUrl&&r?r:e}function p(e){(0,a.uC)().sendBotCommand({command:e.currentTarget.innerText})}function g(e){(0,a.uC)().setLocalTextSearchQuery({query:e.currentTarget.innerText}),(0,a.uC)().searchTextMessagesLocal()}},9359:(e,t,n)=>{n.d(t,{Z:()=>B});var r=n(4050),a=n(5116),s=n(3716),o=n(7361),i=n(7204),c=n(782),l=n(2858),d=n(8085),u=n(7407);let m;!function(e){e[e.Move=0]="Move",e[e.Opacity=1]="Opacity",e[e.None=2]="None"}(m||(m={}));var h=n(1273),f=n(4288),v=n(9107),p=n(6137),g=n(2864),Z=n(2340),E=n(9118),y=n(6752),P=n(5790),C=n(1470),b=n(706),w=n(6202),N=n(172),k=n(9411),I=n(8729),T=n(6844),L=n(329),x=n(1876),M=n(2155),S=n(126);const $=(0,r.X$)((({chat:e,isPinned:t,isMuted:n})=>{const a=Boolean(e.unreadCount||e.hasUnreadMark||t),s=(0,y.Z)("Badge",n&&"muted",t&&"pinned",Boolean(e.unreadCount||e.hasUnreadMark)&&"unread");function o(){return e.unreadCount?e.unreadMentionsCount?r.ZP.createElement("div",{className:"Badge-wrapper"},r.ZP.createElement("div",{className:"Badge mention"},r.ZP.createElement("i",{className:"icon-mention"})),r.ZP.createElement("div",{className:s},(0,M.bi)(e.unreadCount))):r.ZP.createElement("div",{className:s},(0,M.bi)(e.unreadCount)):e.hasUnreadMark?r.ZP.createElement("div",{className:s}):t?r.ZP.createElement("div",{className:s},r.ZP.createElement("i",{className:"icon-pinned-chat"})):void 0}return r.ZP.createElement(S.Z,{isCustom:!0,className:"Badge-transition",isOpen:a},o)})),F=(0,r.X$)((0,a.c$)(((e,{chatId:t})=>{const n=(0,d.Z1)(e,t);if(!n||!n.lastMessage)return{};const{senderId:r,replyToMessageId:a,isOutgoing:s}=n.lastMessage,o=r?(0,d.dy)(e,r):void 0,i=(0,l.N5)(n.lastMessage),c=i&&a?(0,d.hj)(e,n.id,a):void 0,{targetUserIds:u,targetChatId:m}=i||{},h=(0,l.zX)(n),{byId:f}=e.users,{chatId:v,threadId:g,type:Z}=(0,d.Bt)(e)||{},E=t===v&&g===p._f;return{chat:n,isMuted:(0,l.i4)(n,(0,d.dZ)(e),(0,d.NJ)(e)),lastMessageSender:o,actionTargetUserIds:u,actionTargetChatId:m,actionTargetMessage:c,draft:(0,d.Ms)(e,t,p._f),animationLevel:e.settings.byKey.animationLevel,isSelected:E,canScrollDown:E&&"thread"===Z,lastSyncTime:e.lastSyncTime,...s&&{lastMessageOutgoingStatus:(0,d.dT)(e,n.lastMessage)},...h&&{privateChatUser:(0,d.dy)(e,h)},...u&&{usersById:f}}}),((e,t)=>(0,c.ei)(t,["openChat","focusLastMessage"])))((({style:e,chatId:t,folderId:n,orderDiff:a,animationType:i,isPinned:c,chat:d,isMuted:u,privateChatUser:h,actionTargetUserIds:f,usersById:p,lastMessageSender:M,lastMessageOutgoingStatus:S,actionTargetMessage:F,actionTargetChatId:O,draft:A,animationLevel:D,isSelected:R,canScrollDown:U,lastSyncTime:B,openChat:V,focusLastMessage:X})=>{const H=(0,r.sO)(null),[K,j,z]=(0,b.Z)(),[q,J,Y]=(0,b.Z)(),{lastMessage:W,typingStatus:_}=d||{},G=W&&(0,l.Lo)(W);(0,P.Z)(t,G?W.replyToMessageId:void 0,F);const Q=W&&!(0,l.bf)(W)?(0,l.DH)(W):void 0,ee=(0,w.Z)(W?(0,l.Ti)(W,"micro"):void 0),te=Boolean(W&&(0,l.Y5)(W)),ne=(0,r.Ye)((()=>f?f.map((e=>p&&p[e])).filter(Boolean):void 0),[f,p]);(0,r.bt)((()=>{const e=H.current;if(0!==D&&e){if(i===m.Opacity)e.style.opacity="0",(0,E.T2)((()=>{e.classList.add("animate-opacity"),e.style.opacity="1"}));else{if(i!==m.Move)return;e.style.transform=`translate3d(0, ${100*-a}%, 0)`,(0,E.T2)((()=>{e.classList.add("animate-transform"),e.style.transform=""}))}setTimeout((()=>{(0,E.T2)((()=>{e.classList.remove("animate-opacity","animate-transform"),e.style.opacity="",e.style.transform=""}))}),200+s.fK)}}),[D,a,i]);const re=(0,r.I4)((()=>{V({id:t,shouldReplaceHistory:!0}),R&&U&&X()}),[R,U,V,t,X]),ae=(0,C.Z)({chat:d,privateChatUser:h,handleDelete:function(){J(),j()},folderId:n,isPinned:c,isMuted:u}),se=(0,v.Z)();if(!d)return;const oe=(0,y.Z)("Chat chat-item-clickable",(0,l.YA)(t)?"private":"group",R&&"selected");return r.ZP.createElement(x.Z,{ref:H,className:oe,style:e,ripple:!o.wB,contextActions:ae,onClick:re},r.ZP.createElement("div",{className:"status"},r.ZP.createElement(N.Z,{chat:d,user:h,withOnlineStatus:!0,isSavedMessages:h&&h.isSelf,lastSyncTime:B})),r.ZP.createElement("div",{className:"info"},r.ZP.createElement("div",{className:"title"},r.ZP.createElement("h3",null,(0,Z.Z)((0,l.U)(se,d,h))),d.isVerified&&r.ZP.createElement(k.Z,null),u&&r.ZP.createElement("i",{className:"icon-muted-chat"}),d.lastMessage&&r.ZP.createElement(T.Z,{message:d.lastMessage,outgoingStatus:S})),r.ZP.createElement("div",{className:"subtitle"},function(){if(_&&W&&_.timestamp>1e3*W.date)return r.ZP.createElement(I.Z,{typingStatus:_});if(A&&A.text.length)return r.ZP.createElement("p",{className:"last-message",dir:se.isRtl?"auto":"ltr"},r.ZP.createElement("span",{className:"draft"},se("Draft")),(0,Z.Z)(A.text));if(!W)return;if(G){const e=d&&((0,l.eA)(d)||W.senderId===W.chatId)?d:M;return r.ZP.createElement("p",{className:"last-message",dir:se.isRtl?"auto":"ltr"},(0,Z.Z)((0,g.D)(se,W,e,ne,F,O,{asPlain:!0})))}const e=(0,l.zF)(se,t,M);return r.ZP.createElement("p",{className:"last-message",dir:se.isRtl?"auto":"ltr"},e&&r.ZP.createElement(r.ZP.Fragment,null,r.ZP.createElement("span",{className:"sender-name"},(0,Z.Z)(e)),r.ZP.createElement("span",{className:"colon"},":")),function(e,t,n,a){return n?r.ZP.createElement("span",{className:"media-preview"},r.ZP.createElement("img",{src:n,alt:"",className:a?"round":void 0}),(0,l.b7)(t)&&r.ZP.createElement("i",{className:"icon-play"}),(0,Z.Z)((0,l.MK)(e,t,!0))):(0,Z.Z)((0,l.MK)(e,t))}(se,W,ee||Q,te))}(),r.ZP.createElement($,{chat:d,isPinned:c,isMuted:u}))),q&&r.ZP.createElement(L.Z,{isOpen:K,onClose:z,onCloseAnimationEnd:Y,chat:d}))})));var O=n(1713),A=n(231),D=n(7854);const R=(0,r.X$)((0,a.c$)(((e,{folderId:t,folderType:n})=>({chatFolder:t&&"folder"===n?(0,d.Mw)(e,t):void 0,animatedEmoji:(0,d.zB)(e,"📂")})))((({chatFolder:e,animatedEmoji:t,foldersDispatch:n,onScreenSelect:a})=>{const s=(0,v.Z)(),i=(0,r.I4)((()=>{n({type:"editFolder",payload:e}),a(O.MT.FoldersEditFolderFromChatList)}),[e,n,a]);return r.ZP.createElement("div",{className:"EmptyFolder"},r.ZP.createElement("div",{className:"sticker"},t&&r.ZP.createElement(D.Z,{sticker:t})),r.ZP.createElement("h3",{className:"title",dir:"auto"},s("FilterNoChatsToDisplay")),r.ZP.createElement("p",{className:"description",dir:"auto"},s(e?"ChatList.EmptyChatListFilterText":"Chat.EmptyChat")),e&&n&&a&&r.ZP.createElement(A.Z,{ripple:!o.wB,fluid:!0,pill:!0,onClick:i,size:"smaller",isRtl:s.isRtl},r.ZP.createElement("i",{className:"icon-settings"}),s("ChatList.EmptyChatListEditFilter")))})));var U;!function(e){e.all="active",e.archived="archived"}(U||(U={}));const B=(0,r.X$)((0,a.c$)(((e,{folderType:t,folderId:n})=>{const{chats:{listIds:r,byId:a,orderedPinnedIds:s},users:{byId:o},lastSyncTime:i}=e,c="folder"!==t?U[t]:void 0,l=n?(0,d.Mw)(e,n):void 0;return{chatsById:a,usersById:o,lastSyncTime:i,notifySettings:(0,d.dZ)(e),notifyExceptions:(0,d.NJ)(e),...c?{listIds:r[c],orderedPinnedIds:s[c]}:{chatFolder:l}}}),((e,t)=>(0,c.ei)(t,["loadMoreChats","preloadTopChatMessages","openChat","openNextChat"])))((({folderType:e,folderId:t,isActive:n,chatFolder:a,chatsById:d,usersById:v,listIds:p,orderedPinnedIds:g,lastSyncTime:Z,foldersDispatch:E,notifySettings:y,notifyExceptions:P,onScreenSelect:C,loadMoreChats:b,preloadTopChatMessages:w,openChat:N,openNextChat:k})=>{const[I,T]=(0,r.Ye)((()=>"folder"===e&&a?(0,l.P4)(d,v,a,y,P):[p,g]),[e,a,d,v,y,P,p,g]),[L,x]=(0,r.Ye)((()=>{if(!I||"folder"===e&&!a)return[];const t=(0,l.O)(d,I,T,e),n=[...t.pinnedChats,...t.otherChats],r=n.map((({id:e})=>e));return[n.reduce(((e,t,n)=>(e[t.id]=n,e)),{}),r]}),[I,T,e,a,d]),M=(0,i.Z)(L),S=(0,r.Ye)((()=>L&&M?(0,c.Q8)(L,((e,t)=>e-(void 0!==M[t]?M[t]:1/0))):{}),[L,M]),$=(0,r.I4)((()=>{b({listType:"archived"===e?"archived":"active"})}),[b,e]),[O,A]=(0,u.Z)(Z?$:void 0,x,void 0,s.t_,"all"===e&&!s.NM),D=O&&(0,l.O)(d,O,T,e);(0,r.d4)((()=>{Z&&"all"===e&&w()}),[Z,e,w]);const U=function(e){const t=(0,r.I4)((t=>e[t]<0),[e]),n=(0,r.I4)((t=>e[t]>0),[e]),a=Object.keys(e).map(Number),s=a.filter(t).length,o=a.filter(n).length;return(0,r.I4)((r=>{const a=e[r];return 0===a?m.None:a===1/0||a===-1/0||t(r)&&s<=o||n(r)&&o<s?m.Opacity:m.Move}),[n,t,o,s,e])}(S);return(0,r.d4)((()=>{const e=e=>{if(n&&x){if(o.fl&&(o.jm&&e.metaKey||!o.jm&&e.ctrlKey)&&e.code.startsWith("Digit")){const[,t]=e.code.match(/Digit(\d)/)||[];if(!t)return;const n=Number(t)-1;if(n>x.length-1)return;N({id:x[n],shouldReplaceHistory:!0})}if(e.altKey){const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:void 0;if(!t)return;e.preventDefault(),k({targetIndexDelta:t,orderedIds:x})}}};return document.addEventListener("keydown",e,!1),()=>{document.removeEventListener("keydown",e,!1)}})),r.ZP.createElement(h.Z,{className:"chat-list custom-scroll",items:O,onLoadMore:A,preloadBackwards:s.t_,noFastList:!0,noScrollRestore:!0},O&&O.length&&D?function(){const e=x.indexOf(O[0]),n=e+D.pinnedChats.length;return r.ZP.createElement("div",{className:"scroll-container",style:o.wZ?`height: ${x.length*s.rS}px`:void 0,teactFastList:!0},D.pinnedChats.map((({id:n},a)=>r.ZP.createElement(F,{key:n,teactOrderKey:a,chatId:n,isPinned:!0,folderId:t,animationType:U(n),orderDiff:S[n],style:`top: ${(e+a)*s.rS}px;`}))),D.otherChats.map(((e,a)=>r.ZP.createElement(F,{key:e.id,teactOrderKey:(0,l.OE)(e),chatId:e.id,folderId:t,animationType:U(e.id),orderDiff:S[e.id],style:`top: ${(n+a)*s.rS}px;`}))))}():O&&!O.length?r.ZP.createElement(R,{folderId:t,folderType:e,foldersDispatch:E,onScreenSelect:C}):r.ZP.createElement(f.Z,{key:"loading"}))})))},2420:(e,t,n)=>{n.d(t,{t:()=>d,Z:()=>u});var r=n(4050),a=n(1212),s=n(6752),o=n(3989),i=n(7204),c=n(706);const l=(0,r.X$)((({isQuick:e,onFileSelect:t})=>{const[n,a,o]=(0,c.Z)(),i=(0,s.Z)("DropTarget",n&&"hovered");return r.ZP.createElement("div",{className:i,onDrop:t,onDragEnter:()=>{a()},onDragLeave:e=>{const{relatedTarget:t}=e;t&&e.stopPropagation(),o()}},r.ZP.createElement("div",{className:"target-content"},r.ZP.createElement("div",{className:"icon icon-"+(e?"photo":"document")}),r.ZP.createElement("div",{className:"title"},"Drop files here to send them"),r.ZP.createElement("div",{className:"description"},e?"in a quick way":"without compression")))}));let d;!function(e){e.None="none",e.Document="document",e.QuickFile="quick_file"}(d||(d={}));const u=(0,r.X$)((({isOpen:e,withQuick:t,onHide:n,onFileSelect:c})=>{const d=(0,r.sO)(null),u=(0,i.Z)(t),{shouldRender:m,transitionClassNames:h}=(0,a.Z)(e);(0,r.d4)((()=>e?(0,o.Z)(n):void 0),[e,n]);const f=(0,r.I4)((e=>{const{dataTransfer:t}=e;t.files&&t.files.length>0&&(n(),c(Array.from(t.files),!1))}),[c,n]),v=(0,r.I4)((e=>{const{dataTransfer:t}=e;t.files&&t.files.length>0&&(n(),c(Array.from(t.files),!0))}),[c,n]),p=(0,r.I4)((e=>{e.stopPropagation();const{target:t,relatedTarget:r}=e;t.matches(".DropTarget, .DropArea")&&!r&&(d.current=window.setTimeout((()=>{n()}),150))}),[n]);if(!m)return;const g=(0,s.Z)("DropArea",h);return r.ZP.createElement("div",{className:g,onDragLeave:p,onDragOver:()=>{d.current&&window.clearTimeout(d.current)},onDrop:n},r.ZP.createElement(l,{onFileSelect:f}),(t||u)&&r.ZP.createElement(l,{onFileSelect:v,isQuick:!0}))}))},9830:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(9203),s=n(8778);const o=(0,r.X$)((e=>{const{isOpen:t}=e,n=(0,s.Z)(a.gl.Extra,"EmojiTooltip",!t);return n?r.ZP.createElement(n,e):void 0}))},3616:(e,t,n)=>{n.d(t,{Z:()=>P});var r=n(4050),a=n(5116),s=n(3716),o=n(8085),i=n(9118),c=n(5723),l=n(6752),d=n(782),u=n(7361),m=n(517),h=n(2645),f=n(706),v=n(4784),p=n(6391),g=n(9107),Z=n(2340),E=n(3283);const y=u.wB?256:416,P=(0,r.X$)((0,a.c$)((e=>{const{chatId:t,threadId:n}=(0,o.Bt)(e)||{},{messageSendKeyCombo:r}=e.settings.byKey;return{currentChatId:t,messageSendKeyCombo:r,replyingToId:t&&n?(0,o.Yy)(e,t,n):void 0,noTabCapture:e.isPollModalOpen||e.payment.isPaymentModalOpen}}),((e,t)=>(0,d.ei)(t,["editLastMessage","replyToNextMessage"])))((({id:e,isAttachmentModalInput:t,editableInputId:n,html:a,placeholder:o,forcedPlaceholder:d,shouldSetFocus:P,shouldSuppressFocus:C,shouldSuppressTextFormatter:b,onUpdate:w,onSuppressedFocus:N,onSend:k,currentChatId:I,replyingToId:T,noTabCapture:L,messageSendKeyCombo:x,editLastMessage:M,replyToNextMessage:S})=>{const $=(0,r.sO)(null),F=(0,r.sO)(null),O=(0,g.Z)(),A=(0,r.sO)(!1),[D,R,U]=(0,f.Z)(),[B,V]=(0,r.eJ)(),[X,H]=(0,r.eJ)();(0,r.d4)((()=>{t&&q(!1)}),[t]),(0,h.Z)((([e])=>{a!==$.current.innerHTML&&($.current.innerHTML=a),a!==F.current.innerHTML&&(F.current.innerHTML=a),void 0!==e&&e!==a&&q(!a.length)}),[a]);const K=(0,r.I4)((()=>{$.current.closest(".from, .to")?setTimeout(K,350):(0,c.Z)($.current)}),[]),j=(0,r.I4)((()=>{U(),function(){const e=window.getSelection();e&&(e.removeAllRanges?e.removeAllRanges():e.empty&&e.empty())}()}),[U]);function z(){if(u.cj)return;const e=window.getSelection();if(!e||!e.rangeCount||A.current)return void U();const t=e.getRangeAt(0),r=t.toString().trim();if(b||!(0,p.R)(t,n||s.R2)||!r||(0,v.Z)(r)||!t.START_TO_END)return void U();const a=t.getBoundingClientRect(),o=$.current.getBoundingClientRect();let i=a.left+a.width/2-o.left;i<90?i=90:i>o.width-90&&(i=o.width-90),V({x:i,y:a.top-o.top}),H(t),R()}function q(e=!1){const t=$.current,n=F.current,r=Number(t.style.height.replace("px","")),a=Math.min(n.scrollHeight,y);if(a===r)return;const s=Math.round(50*Math.log(Math.abs(a-r))),o=()=>{t.style.height=`${a}px`,t.style.transitionDuration=`${s}ms`,t.classList.toggle("overflown",n.scrollHeight>y)};e?requestAnimationFrame(o):o()}(0,r.d4)((()=>{u.$b||K()}),[I,K,T,P]),(0,r.d4)((()=>{if(L)return;const e=(0,i.Ds)((e=>{"Tab"===e.key&&(e.preventDefault(),requestAnimationFrame(K))}),2e3,!0,!1);return(0,m.Z)({onTab:e})}),[K,L]),(0,r.d4)((()=>{const e=$.current;function t(){e.blur()}return C&&e.addEventListener("focus",t),()=>{e.removeEventListener("focus",t)}}),[C]);const J=(0,l.Z)("form-control custom-scroll",a.length>0&&"touched",C&&"focus-disabled");return r.ZP.createElement("div",{id:e,onClick:C?N:void 0,dir:O.isRtl?"rtl":void 0},r.ZP.createElement("div",{ref:$,id:n||s.R2,className:J,contentEditable:!0,dir:"auto",onClick:K,onChange:function(e){const{innerHTML:t,textContent:n}=e.currentTarget;if(w("<br>"===t?"":t),!(u.$b||n&&n.length)){const e=window.getSelection();e&&($.current.blur(),e.removeAllRanges(),(0,c.Z)($.current,!0))}},onKeyDown:function(e){if(e.metaKey&&!a.length){const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:void 0;if(t)return e.preventDefault(),void S({targetIndexDelta:t})}"Enter"!==e.key||e.shiftKey?"ArrowUp"!==e.key||a.length||e.metaKey?e.target.addEventListener("keyup",(function t(){z(),e.target.removeEventListener("keyup",t)})):(e.preventDefault(),M()):u.cj||u.wZ||!("enter"===x&&!e.shiftKey||"ctrl-enter"===x&&(e.ctrlKey||e.metaKey))||(e.preventDefault(),U(),k())},onMouseDown:function(e){2===e.button?!0!==A.current&&(A.current=!0,document.addEventListener("mousedown",(function e(){setTimeout((()=>{A.current=!1}),100),window.removeEventListener("mouseup",e)})),document.addEventListener("keydown",(function e(t){"Esc"!==t.key&&"Escape"!==t.key||(setTimeout((()=>{A.current=!1}),100),window.removeEventListener("keydown",e))}))):e.target.addEventListener("mouseup",(function t(){z(),e.target.removeEventListener("mouseup",t)}))},onContextMenu:function(e){u.wZ&&(e.preventDefault(),e.stopPropagation())},onTouchCancel:function(){u.wZ&&z()}}),r.ZP.createElement("div",{ref:F,className:(0,l.Z)(J,"clone"),dir:"auto"}),!d&&r.ZP.createElement("span",{className:"placeholder-text",dir:"auto"},o),r.ZP.createElement(E.Z,{isOpen:D,anchorPosition:B,selectedRange:X,onClose:j}),d&&r.ZP.createElement("span",{className:"forced-placeholder"},(0,Z.Z)(d)))})))},3283:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(4050),a=n(3716),s=n(6752),o=n(3989),i=n(1212),c=n(8758),l=n(706),d=n(9107),u=n(231);const m={B:"bold",STRONG:"bold",I:"italic",EM:"italic",U:"underline",DEL:"strikethrough",CODE:"monospace"},h=document.createElement("div"),f=(0,r.X$)((({isOpen:e,anchorPosition:t,selectedRange:n,onClose:f})=>{const v=(0,r.sO)(null),p=(0,r.sO)(null),{shouldRender:g,transitionClassNames:Z}=(0,i.Z)(e),[E,y,P]=(0,l.Z)(),[C,b]=(0,r.eJ)(""),[w,N]=(0,r.eJ)(!1),[k,I]=(0,r.eJ)(),[T,L]=(0,r.eJ)({});(0,r.d4)((()=>e?(0,o.Z)(f):void 0),[e,f]),(0,c.Z)(e,v,f),(0,r.d4)((()=>{E?p.current.focus():(b(""),N(!1))}),[E]),(0,r.d4)((()=>{g||(P(),L({}),I(void 0))}),[P,g]),(0,r.d4)((()=>{if(!e||!n)return;const t={};let{parentElement:r}=n.commonAncestorContainer;for(;r&&r.id!==a.R2;){const e=m[r.tagName];e&&(t[e]=!0),r=r.parentElement}L(t)}),[e,n,y]);const x=(0,r.I4)((()=>{if(n)return h.innerText=n.toString(),h.innerHTML}),[n]),M=(0,r.I4)((()=>{if(n)return n.commonAncestorContainer.parentElement}),[n]);function S(){const e=p.current;if(!e)return;const{offsetWidth:t,scrollWidth:n,scrollLeft:r}=e;if(n<=t)return void I(void 0);let a="";r<n-t&&(a="mask-right"),r>0&&(a+=" mask-left"),I(a)}function $(e){if(T[e])return"active";if("monospace"===e||"strikethrough"===e){if(Object.keys(T).some((t=>t!==e&&!!T[t])))return"disabled"}else if(T.monospace||T.strikethrough)return"disabled"}const F=(0,r.I4)((()=>{L((e=>(document.execCommand(e.bold?"removeFormat":"bold"),Object.keys(e).forEach((t=>{"italic"!==t&&"underline"!==t||!e[t]||document.execCommand(t)})),{...e,bold:!e.bold})))}),[]),O=(0,r.I4)((()=>{document.execCommand("italic"),L((e=>({...e,italic:!e.italic})))}),[]),A=(0,r.I4)((()=>{document.execCommand("underline"),L((e=>({...e,underline:!e.underline})))}),[]),D=(0,r.I4)((()=>{if(T.strikethrough){const e=M();if(!n||!e||"DEL"!==e.tagName||!e.textContent)return;return e.replaceWith(e.textContent),void L((e=>({...e,strikethrough:!1})))}const e=x();document.execCommand("insertHTML",!1,`<del>${e}</del>`),f()}),[M,x,f,n,T.strikethrough]),R=(0,r.I4)((()=>{if(T.monospace){const e=M();if(!n||!e||"CODE"!==e.tagName||!e.textContent)return;return e.replaceWith(e.textContent),void L((e=>({...e,monospace:!1})))}const e=x();document.execCommand("insertHTML",!1,`<code class="text-entity-code" dir="auto">${e}</code>`),f()}),[M,x,f,n,T.monospace]);function U(){const e=encodeURI(C.includes("://")?C:`http://${C}`);if(w){const t=M();if(!t||"A"!==t.tagName)return;return t.href=e,void f()}const t=x();!function(){if(!n)return;const e=window.getSelection();e&&(e.removeAllRanges(),e.addRange(n))}(),document.execCommand("insertHTML",!1,`<a href=${e} class="text-entity-link" dir="auto">${t}</a>`),f()}const B=(0,r.I4)((e=>{const t={KeyK:y,KeyB:F,KeyU:A,KeyI:O,KeyM:R,KeyS:D}[e.code];!e.altKey&&(e.ctrlKey||e.metaKey)&&t&&(e.preventDefault(),e.stopPropagation(),t())}),[F,O,A,R,D,y]);(0,r.d4)((()=>(e&&document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B))),[e,B]);const V=(0,d.Z)();if(!g)return;const X=(0,s.Z)("TextFormatter",Z,E&&"link-control-shown"),H=(0,s.Z)("TextFormatter-link-url-confirm",!!C.length&&"shown"),K=t?`left: ${t.x}px; top: ${t.y}px;--text-formatter-left: ${t.x}px;`:"";return r.ZP.createElement("div",{ref:v,className:X,style:K,onKeyDown:function(e){"Enter"===e.key&&E&&(U(),e.preventDefault())}},r.ZP.createElement("div",{className:"TextFormatter-buttons"},r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:"Bold text",className:$("bold"),onClick:F},r.ZP.createElement("i",{className:"icon-bold"})),r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:"Italic text",className:$("italic"),onClick:O},r.ZP.createElement("i",{className:"icon-italic"})),r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:"Underlined text",className:$("underline"),onClick:A},r.ZP.createElement("i",{className:"icon-underlined"})),r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:"Strikethrough text",className:$("strikethrough"),onClick:D},r.ZP.createElement("i",{className:"icon-strikethrough"})),r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:"Monospace text",className:$("monospace"),onClick:R},r.ZP.createElement("i",{className:"icon-monospace"})),r.ZP.createElement("div",{className:"TextFormatter-divider"}),r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:V("TextFormat.AddLinkTitle"),onClick:y},r.ZP.createElement("i",{className:"icon-link"}))),r.ZP.createElement("div",{className:"TextFormatter-link-control"},r.ZP.createElement("div",{className:"TextFormatter-buttons"},r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:V("Cancel"),onClick:P},r.ZP.createElement("i",{className:"icon-arrow-left"})),r.ZP.createElement("div",{className:"TextFormatter-divider"}),r.ZP.createElement("div",{className:(0,s.Z)("TextFormatter-link-url-input-wrapper",k)},r.ZP.createElement("input",{ref:p,className:"TextFormatter-link-url-input",type:"text",value:C,placeholder:"Enter URL...",autoComplete:"off",inputMode:"url",dir:"auto",onChange:function(e){b(e.target.value),S()},onScroll:S})),r.ZP.createElement("div",{className:H},r.ZP.createElement("div",{className:"TextFormatter-divider"}),r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:V("Save"),className:"color-primary",onClick:U},r.ZP.createElement("i",{className:"icon-check"}))))))}))},6980:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(6137),a=n(7361);const s={B:r.Vv.Bold,STRONG:r.Vv.Bold,I:r.Vv.Italic,EM:r.Vv.Italic,U:r.Vv.Underline,S:r.Vv.Strike,STRIKE:r.Vv.Strike,DEL:r.Vv.Strike,CODE:r.Vv.Code,PRE:r.Vv.Pre,BLOCKQUOTE:r.Vv.Blockquote};function o(e){const t=document.createElement("div");t.innerHTML=function(e){let t=e.slice(0);return a.op||(t=t.replace(/<img[^>]+alt="([^"]+)"[^>]*>/gm,"$1")),t=t.replace(/<\/?span([^>]*)?>/g,""),t=t.replace(/&nbsp;/g," "),t=t.replace(/<div><br([^>]*)?><\/div>/g,"\n"),t=t.replace(/<br([^>]*)?>/g,"\n"),t=t.replace(/<\/div>(\s*)<div>/g,"\n"),t=t.replace(/<div>/g,"\n"),t=t.replace(/<\/div>/g,""),t=t.replace(/^`{3}(.*[\n\r][^]*?^)`{3}/gm,"<pre>$1</pre>"),t=t.replace(/[`]{3}([^`]+)[`]{3}/g,"<pre>$1</pre>"),t=t.replace(/[`]{1}([^`\n]+)[`]{1}/g,"<code>$1</code>"),t=t.replace(/[*]{2}([^*\n]+)[*]{2}/g,"<b>$1</b>"),t=t.replace(/[_]{2}([^*\n]+)[_]{2}/g,"<i>$1</i>"),t=t.replace(/[~]{2}([^~\n]+)[~]{2}/g,"<s>$1</s>"),t}(e);const n=t.innerText.trim().replace(/\u200b+/g,"").slice(0,4096);let o=0,i=0;const c=[];function l(e){const{index:t,entity:a}=function(e,t,n){const a=function(e){if(s[e.nodeName])return s[e.nodeName];if("A"===e.nodeName){const t=e;return t.dataset.entityType===r.Vv.MentionName?r.Vv.MentionName:t.dataset.entityType===r.Vv.Url?r.Vv.Url:t.href.startsWith("mailto:")?r.Vv.Email:t.href.startsWith("tel:")?r.Vv.Phone:t.href!==t.textContent?r.Vv.TextUrl:r.Vv.Url}return"SPAN"===e.nodeName?e.dataset.entityType:void 0}(e);if(!a||!e.textContent)return{index:n,entity:void 0};const o=t.indexOf(e.textContent,n),i=o>=0?o:n,c=t.substring(0,i).length,{length:l}=t.substring(i,i+e.textContent.length);let d,u;return a===r.Vv.TextUrl&&(d=e.href),a===r.Vv.MentionName&&(u=Number(e.dataset.userId)),{index:i,entity:{type:a,offset:c,length:l,...d&&{url:d},...u&&{userId:u}}}}(e,n,o);a?(o=t,c.push(a)):e.textContent&&(o+=e.textContent.length),e.hasChildNodes()&&i<=3&&(i+=1,Array.from(e.childNodes).forEach(l))}return Array.from(t.childNodes).forEach((e=>{i=1,l(e)})),{text:n,entities:c.length?c:void 0}}},6391:(e,t,n)=>{function r(e,t){const{commonAncestorContainer:n}=e;let r=n,a=1;for(;r&&r.id!==t&&a<5;)r=r.parentElement,a++;return Boolean(r&&r.id===t)}n.d(t,{R:()=>r})},8353:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(4050),a=n(3716),s=n(735),o=n(4284),i=n(5723),c=n(782),l=n(706);let d,u,m,h;const f=/(<br>|<br\s?\/>)/g,v=/&nbsp;/g,p=/(<div>|<\/div>)/gi;try{h=new RegExp("(^|\\s):[-+_:\\p{L}\\p{N}]*$","gui")}catch(e){h=new RegExp("(^|\\s):[-+_:\\d\\wа-яё]*$","gi")}function g(e,t,g,Z=a.R2,E,y,P,C=!1){const[b,w,N]=(0,l.Z)(),[k,I]=(0,r.eJ)(),[T,L]=(0,r.eJ)(),[x,M]=(0,r.eJ)({}),[S,$]=(0,r.eJ)(),[F,O]=(0,r.eJ)({}),[A,D]=(0,r.eJ)(!1),[R,U]=(0,r.eJ)(s.D),B=(0,r.Ye)((()=>k&&g.length?Object.values((0,c.q0)(k,g)):[]),[k,g]);(0,r.d4)((()=>{if(C)return;const e=()=>{I(m.emojis)};m?e():async function(){return d||(d=n.e(501).then(n.t.bind(n,7501,19)),u=(await d).default,m=(0,o.N)(u)),d}().then(e)}),[C]),(0,r.d4)((()=>{if(!k||C)return;const e=Object.values(k),t=(0,c.ee)(e,"native"),n=y?(0,c.Q8)(y,(e=>Object.values((0,c.q0)(t,e)))):{},r=P?(0,c.Q8)(P,(e=>Object.values((0,c.q0)(t,e)))):{};M({...n,...r}),L([...Object.keys(n),...Object.keys(r)]);const a=e.reduce(((e,t)=>(t.names.forEach((n=>{e[n]||(e[n]=[]),e[n].push(t)})),e)),{});O(a),$(Object.keys(a))}),[C,y,k,P]),(0,r.d4)((()=>{if(!(e&&t&&k&&T&&T.length))return void N();const n=t.includes(":")&&function(e){const t=e.replace(v," ").replace(f,"\n").replace(/\n$/i,"").replace(p,"").match(h);return t?t[0].trim():void 0}(t);if(!n)return U(s.D),void N();const r=n.length>2&&n.endsWith(":"),a=n.substr(1,r?n.length-2:void 0);let o=[];if(D(r),a){if(a.length>=2){const e=T.filter((e=>e.startsWith(a))).sort();o=o.concat((0,c.xH)(Object.values((0,c.q0)(x,e))));const t=S.filter((e=>e.startsWith(a)));o=o.concat((0,c.xH)(Object.values((0,c.q0)(F,t)))),o=(0,c.Tw)(o)}}else o=B;o.length?(r||w(),U(o.slice(0,36))):N()}),[k,x,T,F,S,t,e,w,B,N,D]);const V=(0,r.I4)(((e,n)=>{const r=t.lastIndexOf(":",n?t.lastIndexOf(":")-1:void 0);if(-1!==r){E(`${t.substr(0,r)}${e}`);const n=document.getElementById(Z);requestAnimationFrame((()=>{(0,i.Z)(n,!0)}))}N()}),[t,Z,E,N]);return(0,r.d4)((()=>{b&&A&&R.length&&V(R[0].native,!0)}),[R,V,b,A]),{isEmojiTooltipOpen:b,closeEmojiTooltip:N,filteredEmojis:R,insertEmoji:V}}},2365:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(4050),a=n(6137),s=n(3716),o=n(2858),i=n(5765);function c(e,t){const n=t.username.toLowerCase(),r=(0,o.Js)(t),a=r&&r.toLowerCase(),s=e.toLowerCase();return n.startsWith(s)||a&&(0,i.Z)(a,s)}var l=n(5723),d=n(706),u=n(782);const m=(0,n(9118).P2)((e=>e()),500,!0),h=/(<br>|<br\s?\/>)/g,f=/&nbsp;/g,v=/(<div>|<\/div>)/gi;let p;try{p=new RegExp("(^|\\s)@[-_\\p{L}\\p{M}\\p{N}]*$","gui")}catch(e){p=new RegExp("(^|\\s)@[-_\\d\\wа-яё]*$","gi")}function g(e,t,n,i=s.R2,g,Z,E,y){const[P,C,b]=(0,d.Z)(),[w,N]=(0,r.eJ)(""),[k,I]=(0,r.eJ)(),T=(0,r.Ye)((()=>(Z||[]).map((e=>y&&y[e])).filter(Boolean)),[Z,y]),L=(0,r.I4)(((e,t)=>{(g||Z)&&y?m((()=>{const n=(t?T:[]).filter((t=>!e||c(e,t))),r=(g||[]).map((({userId:e})=>y[e])).filter((t=>!(!t||t.id===E)&&(!e||c(e,t))));I((0,u.Tw)(n.concat(r)))})):I(void 0)}),[E,g,Z,T,y]);(0,r.d4)((()=>{if(!e||!t.length)return void b();const n=t.includes("@")&&function(e){const t=e.replace(f," ").replace(h,"\n").replace(v,"").replace(/\n$/i,"").match(p);return t?t[0].trim():void 0}(t);if(n){const e=n?n.substr(1):"";N(e),L(e,function(e){return e.startsWith("@")}(t))}else b()}),[e,t,L,C,b]),(0,r.d4)((()=>{k&&k.length?C():b()}),[C,b,k]);const x=(0,r.I4)(((e,r=!1)=>{if(!e.username&&!(0,o.Vl)(e))return;const s=e.username?`@${e.username}`:`<a\n class="text-entity-link"\n data-entity-type="${a.Vv.MentionName}"\n data-user-id="${e.id}"\n contenteditable="false"\n dir="auto"\n >${(0,o.Vl)(e)}</a>`,c=t.lastIndexOf("@");if(-1!==c){n(`${t.substr(0,c)}${s}&nbsp;`);const e=document.getElementById(i);requestAnimationFrame((()=>{(0,l.Z)(e,r)}))}b()}),[t,i,n,b]);return{isMentionTooltipOpen:P,mentionFilter:w,closeMentionTooltip:b,insertMention:x,mentionFilteredUsers:k}}},7891:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(9290),s=n(5326);function o(e,t){const n=void 0===t,o=(0,r.sO)(n),i=(0,r.sO)(),c=(0,s.Z)();return(0,a.Z)((()=>{n||(o.current=!1,i.current&&(clearTimeout(i.current),i.current=void 0))}),e),(0,r.d4)((()=>{if(n||o.current)return;const e=()=>{o.current=!0,c()};t>0?i.current=window.setTimeout(e,t):e()}),e),o.current}},7551:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4050),a=n(9107),s=n(3103),o=n(231);const i=(0,r.X$)((({isOpen:e,onClose:t,onCloseAnimationEnd:n,title:i,header:c,text:l,textParts:d,confirmLabel:u="Confirm",confirmHandler:m,confirmIsDestructive:h,isButtonsInOneRow:f})=>{const v=(0,a.Z)();return r.ZP.createElement(s.Z,{className:"confirm",title:i,header:c,isOpen:e,onClose:t,onCloseAnimationEnd:n,onEnter:m},l&&l.split("\\n").map((e=>r.ZP.createElement("p",null,e))),d,r.ZP.createElement("div",{className:f?"dialog-buttons mt-2":""},r.ZP.createElement(o.Z,{className:"confirm-dialog-button",isText:!0,onClick:m,color:h?"danger":"primary"},u),r.ZP.createElement(o.Z,{className:"confirm-dialog-button",isText:!0,onClick:t},v("Cancel"))))}))},1151:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(6752),s=n(231);const o=({isShown:e,className:t,color:n="primary",ariaLabel:o,disabled:i,onClick:c,children:l})=>{const d=(0,a.Z)("FloatingActionButton",e&&"revealed",t);return r.ZP.createElement(s.Z,{className:d,color:n,round:!0,disabled:i,onClick:e&&!i?c:void 0,ariaLabel:o,tabIndex:-1},l)}},1273:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(1713),a=n(4050),s=n(9118),o=n(7675);const i=({ref:e,className:t,onLoadMore:n,onScroll:i,onKeyDown:c,items:l,itemSelector:d=".ListItem",preloadBackwards:u=20,sensitiveArea:m=800,noScrollRestore:h=!1,noScrollRestoreOnTop:f=!1,noFastList:v,cacheBuster:p,children:g})=>{let Z=(0,a.sO)(null);e&&(Z=e);const E=(0,a.sO)({}),[y,P]=(0,a.Ye)((()=>n?[(0,s.Ds)(((e=!1)=>{n({direction:r.Uq.Backwards,noScroll:e})}),1e3,!0,!1),(0,s.Ds)((()=>{n({direction:r.Uq.Forwards})}),1e3,!0,!1)]:[]),[n,l]);(0,a.d4)((()=>{if(!y)return;if(u>0&&(!l||l.length<u))return void y(!0);const{scrollHeight:e,clientHeight:t}=Z.current;t&&e<=t&&y()}),[l,y,u]),(0,a.bt)((()=>{const e=Z.current,t=E.current;let n;if(t.listItemElements=e.querySelectorAll(d),t.currentAnchor&&Array.from(t.listItemElements).includes(t.currentAnchor)){const{scrollTop:r}=e;n=r+(t.currentAnchor.getBoundingClientRect().top-t.currentAnchorTop)}else{const e=t.listItemElements[0];e&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}h||f&&0===e.scrollTop||((0,o.Z)(e,n),t.isScrollTopJustUpdated=!0)}),[l,d,h,f,p]);const C=(0,a.I4)((e=>{if(P&&y){const{isScrollTopJustUpdated:e,currentAnchor:t,currentAnchorTop:n}=E.current,r=E.current.listItemElements;if(e)return void(E.current.isScrollTopJustUpdated=!1);const a=r.length,s=Z.current,{scrollTop:i,scrollHeight:c,offsetHeight:l}=s,d=i<=(a?r[0].offsetTop:0)+m,u=(a?r[a-1].offsetTop+r[a-1].offsetHeight:c)-(i+l)<=m;let h=!1;if(d){const e=r[0];if(e){const r=e.getBoundingClientRect().top,a=t&&t.offsetParent&&t!==e?t.getBoundingClientRect().top:r;t&&void 0!==n&&a>n&&(E.current.currentAnchor=e,E.current.currentAnchorTop=r,h=!0,(0,o.Z)(s),P())}}if(u){const e=r[a-1];if(e){const r=e.getBoundingClientRect().top,a=t&&t.offsetParent&&t!==e?t.getBoundingClientRect().top:r;t&&void 0!==n&&a<n&&(E.current.currentAnchor=e,E.current.currentAnchorTop=r,h=!0,(0,o.Z)(s),y())}}if(!h)if(t&&t.offsetParent)E.current.currentAnchorTop=t.getBoundingClientRect().top;else{const e=r[0];e&&(E.current.currentAnchor=e,E.current.currentAnchorTop=e.getBoundingClientRect().top)}}i&&i(e)}),[y,P,i,m]);return a.ZP.createElement("div",{ref:Z,className:t,onScroll:C,teactFastList:!v,onKeyDown:c},g)}},1876:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(4050),a=n(7361),s=n(9118),o=n(6752),i=n(7240),c=n(3394),l=n(706),d=n(9107),u=n(8512),m=n(2328),h=n(8964);const f=e=>{const{ref:t,buttonRef:n,icon:f,className:v,style:p,children:g,disabled:Z,ripple:E,narrow:y,inactive:P,focus:C,destructive:b,multiline:w,isStatic:N,contextActions:k,onClick:I}=e;let T=(0,r.sO)(null);t&&(T=t);const[L,x,M]=(0,l.Z)(),{isContextMenuOpen:S,contextMenuPosition:$,handleBeforeContextMenu:F,handleContextMenu:O,handleContextMenuClose:A,handleContextMenuHide:D}=(0,i.Z)(T,!k),R=(0,r.I4)((()=>T.current),[]),U=(0,r.I4)((()=>T.current.closest(".custom-scroll")),[]),B=(0,r.I4)((()=>T.current.querySelector(".ListItem-context-menu .bubble")),[]),{positionX:V,positionY:X,style:H}=(0,c.Z)($,R,U,B),K=(0,r.I4)((e=>{!Z&&I&&(I(e),a.$b&&!E&&(x(),(0,s.T2)(M)))}),[Z,x,I,E,M]),j=(0,r.I4)((e=>{P||a.$b||(!k||2!==e.button&&I||F(e),0===e.button&&(I?K(e):O(e)))}),[P,k,I,F,O,K]),z=(0,d.Z)(),q=(0,o.Z)("ListItem",v,!N&&"no-selection",E&&"has-ripple",y&&"narrow",Z&&"disabled",P&&"inactive",$&&"has-menu-open",C&&"focus",b&&"destructive",w&&"multiline",N&&"is-static");return r.ZP.createElement("div",{ref:T,className:q,dir:z.isRtl?"rtl":void 0,style:p},r.ZP.createElement("div",{className:(0,o.Z)("ListItem-button",L&&"active"),role:"button",ref:n,tabIndex:0,onClick:!P&&a.$b?K:void 0,onMouseDown:j,onContextMenu:!P&&k?O:void 0},f&&r.ZP.createElement("i",{className:`icon-${f}`}),w&&r.ZP.createElement("div",{className:"multiline-item"},g),!w&&g,!Z&&!P&&E&&r.ZP.createElement(u.Z,null)),k&&void 0!==$&&r.ZP.createElement(m.Z,{isOpen:S,positionX:V,positionY:X,style:H,className:"ListItem-context-menu",autoClose:!0,onClose:A,onCloseAnimationEnd:D},k.map((e=>r.ZP.createElement(h.Z,{key:e.title,icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler},e.title)))))}},3103:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(4050),a=n(517),s=n(6752),o=n(8674),i=n(1212),c=n(274),l=n(9107),d=n(6590),u=n(231),m=n(2898);const h=({title:e,className:t,isOpen:n,header:h,hasCloseButton:f,noBackdrop:v,children:p,onClose:g,onCloseAnimationEnd:Z,onEnter:E,shouldSkipHistoryAnimations:y})=>{const{shouldRender:P,transitionClassNames:C}=(0,i.Z)(n,Z,y,void 0,y),b=(0,r.sO)(null);(0,r.d4)((()=>n?(0,a.Z)({onEsc:g,onEnter:E}):void 0),[n,g,E]),(0,r.d4)((()=>n&&b.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 r=n.findIndex((e=>e.isSameNode(document.activeElement)));let a=0;r>=0&&(a=t.shiftKey?r>0?r-1:n.length-1:r<n.length-1?r+1:0),n[a].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}(b.current):void 0),[n]);const{forceClose:w}=(0,d.ZP)(n,g);(0,r.d4)((()=>()=>{n&&w()}),[]),(0,c.Z)((([e])=>(document.body.classList.toggle("has-open-dialog",n),(n||!n&&void 0!==e)&&(0,o.YW)(200),()=>{document.body.classList.remove("has-open-dialog")})),[n]);const N=(0,l.Z)();if(!P)return;const k=(0,s.Z)("Modal",t,C,v&&"transparent-backdrop");return r.ZP.createElement(m.Z,null,r.ZP.createElement("div",{ref:b,className:k,tabIndex:-1,role:"dialog"},r.ZP.createElement("div",{className:"modal-container"},r.ZP.createElement("div",{className:"modal-backdrop",onClick:g}),r.ZP.createElement("div",{className:"modal-dialog"},h||(e?r.ZP.createElement("div",{className:"modal-header"},f&&r.ZP.createElement(u.Z,{round:!0,color:"translucent",size:"smaller",ariaLabel:N("Close"),onClick:g},r.ZP.createElement("i",{className:"icon-close"})),r.ZP.createElement("div",{className:"modal-title"},e)):void 0),r.ZP.createElement("div",{className:"modal-content custom-scroll"},p)))))}},6937:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(4050),a=n(3716),s=n(1212),o=n(6752),i=n(3989),c=n(2898);const l=(0,r.X$)((({message:e,duration:t=3e3,containerId:n,onDismiss:l})=>{const[d,u]=(0,r.eJ)(!0),m=(0,r.sO)(null),{transitionClassNames:h}=(0,s.Z)(d),f=(0,r.I4)((()=>{u(!1),setTimeout(l,150+a.fK)}),[l]);(0,r.d4)((()=>d?(0,i.Z)(f):void 0),[d,f]),(0,r.d4)((()=>(m.current=window.setTimeout(f,t),()=>{m.current&&(clearTimeout(m.current),m.current=void 0)})),[t,f]);const v=(0,r.I4)((()=>{m.current&&(clearTimeout(m.current),m.current=void 0)}),[]),p=(0,r.I4)((()=>{m.current=window.setTimeout(f,t)}),[t,f]);return r.ZP.createElement(c.Z,{className:"Notification-container",containerId:n},r.ZP.createElement("div",{className:(0,o.Z)("Notification",h),onClick:f,onMouseEnter:v,onMouseLeave:p},r.ZP.createElement("div",{className:"content"},e)))}))},2898:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(4050),a=n(2916);const s=({containerId:e,className:t,children:n})=>{const s=(0,r.sO)();return s.current||(s.current=document.createElement("div")),(0,r.bt)((()=>{const n=document.querySelector(e||"#portals");if(!n)return;const r=s.current;return t&&r.classList.add(t),n.appendChild(r),()=>{a.Z.render(void 0,r),n.removeChild(r)}}),[t,e]),a.Z.render(n,s.current)}},9196:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(6752);const s={s:22,m:25,l:28,xl:20},o=(0,r.X$)((({progress:e=0,size:t="l",square:n,transparent:o,noCross:i,onClick:c})=>{const l=s[t],d=l-4,u=l-1,m=2*d*Math.PI,h=(0,r.sO)(null);(0,r.d4)((()=>{if(!h.current)return;const t=h.current.firstElementChild,n=m-Math.min(Math.max(.05,e),1)*m;t?t.firstElementChild.setAttribute("stroke-dashoffset",n.toString()):h.current.innerHTML=`<svg\n viewBox="0 0 ${2*u} ${2*u}"\n height="${2*u}"\n width="${2*u}"\n >\n <circle\n stroke="white"\n fill="transparent"\n stroke-width=2\n stroke-dasharray="${m} ${m}"}\n stroke-dashoffset="${n}"\n stroke-linecap="round"\n r=${d}\n cx=${u}\n cy=${u}\n />\n </svg>`}),[h,m,u,d,e]);const f=(0,a.Z)(`ProgressSpinner size-${t}`,o&&"transparent",n&&"square",i&&"no-cross");return r.ZP.createElement("div",{ref:h,className:f,onClick:c})}))},4434:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(4050),a=n(6752),s=n(9107),o=n(9204);const i=(0,r.X$)((({id:e,label:t,subLabel:n,value:i,name:c,checked:l,disabled:d,hidden:u,isLoading:m,onChange:h})=>{const f=(0,s.Z)(),v=(0,a.Z)("Radio",d&&"disabled",u&&"hidden-widget",m&&"loading");return r.ZP.createElement("label",{className:v,dir:f.isRtl?"rtl":void 0},r.ZP.createElement("input",{type:"radio",name:c,value:i,id:e,checked:l,onChange:h,disabled:d||u}),r.ZP.createElement("div",{className:"Radio-main"},r.ZP.createElement("span",{className:"label",dir:f.isRtl?"auto":void 0},t),n&&r.ZP.createElement("span",{className:"subLabel",dir:f.isRtl?"auto":void 0},n)),m&&r.ZP.createElement(o.Z,null))})),c=(0,r.X$)((({id:e,name:t,options:n,selected:a,disabled:s,loadingOption:o,onChange:c})=>{const l=(0,r.I4)((e=>{const{value:t}=e.currentTarget;c(t)}),[c]);return r.ZP.createElement("div",{id:e,className:"radio-group"},n.map((e=>r.ZP.createElement(i,{name:t,label:e.label,subLabel:e.subLabel,value:e.value,checked:e.value===a,hidden:e.hidden,disabled:s,isLoading:o?o===e.value:void 0,onChange:l}))))}))},9589:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(4050),a=n(6752),s=n(706),o=n(9107),i=n(4288),c=n(231);const l=(0,r.X$)((({ref:e,children:t,parentContainerClassName:n,value:l,inputId:d,className:u,focused:m,isLoading:h,placeholder:f,disabled:v,autoComplete:p,canClose:g,onChange:Z,onReset:E,onFocus:y,onBlur:P})=>{let C=(0,r.sO)(null);e&&(C=e);const[b,w,N]=(0,s.Z)(m);(0,r.d4)((()=>{C.current&&(m?C.current.focus():C.current.blur())}),[m,f]);const k=(0,o.Z)(),I=(0,r.I4)((e=>{if("ArrowDown"===e.key||"Enter"===e.key){const e=document.querySelector(`.${n} .ListItem-button`);e&&e.focus()}}),[n]);return r.ZP.createElement("div",{className:(0,a.Z)("SearchInput",u,b&&"has-focus"),dir:k.isRtl?"rtl":void 0},t,r.ZP.createElement("input",{ref:C,id:d,type:"text",dir:"auto",placeholder:f||k("Search"),className:"form-control",value:l,disabled:v,autoComplete:p,onChange:function(e){const{currentTarget:t}=e;Z(t.value)},onFocus:function(){w(),y&&y()},onBlur:function(){N(),P&&P()},onKeyDown:I}),r.ZP.createElement("i",{className:"icon-search"}),h&&r.ZP.createElement(i.Z,null),!h&&(l||g)&&E&&r.ZP.createElement(c.Z,{round:!0,size:"tiny",color:"translucent",onClick:E},r.ZP.createElement("span",{className:"icon-close"})))}))},126:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4050),a=n(1212),s=n(7204),o=n(6752);const i=({isOpen:e,isCustom:t,id:n,className:i,onClick:c,children:l})=>{const{shouldRender:d,transitionClassNames:u}=(0,a.Z)(e,void 0,void 0,!t&&void 0),m=(0,s.Z)(e),h=(0,s.Z)(l),f=(0,r.sO)();return m&&!e&&(f.current=h),d&&r.ZP.createElement("div",{id:n,className:(0,o.Z)(i,u),onClick:c},e?l():f.current())}},3133:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),a=n(1367),s=n(7204),o=n(8781),i=n(9107),c=n(6752),l=n(2340);const d=(0,r.X$)((({className:e,title:t,active:n,badgeCount:a,isBadgeActive:s,previousActiveTab:o,onClick:i,clickArg:d})=>{const u=(0,r.sO)(null);return(0,r.bt)((()=>{if(!n||void 0===o)return;const e=u.current,t=e.querySelector("i"),r=e.parentElement.children[o];if(!r)return;const a=r.querySelector("i");a.classList.remove("animate"),t.classList.remove("animate");const s=a.parentElement.offsetLeft-t.parentElement.offsetLeft,i=a.clientWidth/t.clientWidth;t.style.transform=`translate3d(${s}px, 0, 0) scale3d(${i}, 1, 1)`,requestAnimationFrame((()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{t.classList.add("animate"),t.style.transform="none"}))}))}))}),[n,o]),r.ZP.createElement("button",{type:"button",className:(0,c.Z)("Tab",e,n&&"active"),onClick:()=>i(d),ref:u},r.ZP.createElement("span",null,(0,l.Z)(t),!!a&&r.ZP.createElement("span",{className:(0,c.Z)("badge",s&&"active")},a),r.ZP.createElement("i",null)))})),u=(0,r.X$)((({tabs:e,activeTab:t,big:n,onSwitchTab:c})=>{const l=(0,r.sO)(null),u=(0,s.Z)(t);(0,o.Z)(l.current),(0,r.d4)((()=>{const e=l.current;if(e.scrollWidth<=e.offsetWidth)return;const t=e.querySelector(".Tab.active");if(t){const n=t.offsetLeft-e.offsetWidth/2+t.offsetWidth/2;if(Math.abs(n-e.scrollLeft)<16)return;(0,a.Z)(e,n)}}),[t]);const m=(0,i.Z)();return r.ZP.createElement("div",{className:"TabList no-selection no-scrollbar "+(n?"big":""),ref:l,dir:m.isRtl?"rtl":void 0},e.map(((e,n)=>r.ZP.createElement(d,{key:e.title,title:m(e.title),active:n===t,badgeCount:e.badgeCount,isBadgeActive:e.isBadgeActive,previousActiveTab:u,onClick:c,clickArg:n}))))}))},2255:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),a=n(5116),s=n(5326),o=n(7204),i=n(6752),c=n(8674),l=n(1279);const d=Symbol("CLEANED_UP"),u=({ref:e,activeKey:t,name:n,direction:u="auto",renderCount:m,shouldRestoreHeight:h,shouldCleanup:f,cleanupExceptionKey:v,id:p,className:g,onStart:Z,onStop:E,children:y})=>{const{animationLevel:P}=(0,a.Rd)().settings.byKey,C=(0,r.sO)();let b=(0,r.sO)(null);e&&(b=e);const w=(0,r.sO)({}),N=(0,o.Z)(t),k=(0,s.Z)(),I=void 0!==N&&t!==N;!m&&I&&(w.current={[N]:w.current[N]}),w.current[t]=y,(0,r.bt)((()=>{function e(){!f||void 0!==v&&v===N||(w.current={[N]:d},k())}const r=b.current,a=r.children;if(1===a.length&&!I)return void a[0].classList.add("active");const s=Array.from(r.childNodes);if(!I||!s.length)return;const o=-1===u||"auto"===u&&N>t||"inverse"===u&&N<t;r.classList.remove("animating"),r.classList.toggle("backwards",o);const i=Object.keys(w.current).map(Number),p=m?N:i.indexOf(N),g=m?t:i.indexOf(t);if("none"===n||0===P)return s.forEach(((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("from","through","to"),e.classList.toggle("active",t===g))})),void e();let y;s.forEach(((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("active"),e.classList.toggle("from",t===p),e.classList.toggle("through",t>p&&t<g||t<p&&t>g),e.classList.toggle("to",t===g))})),P>0&&(y=(0,c.YW)()),requestAnimationFrame((()=>{function a(){requestAnimationFrame((()=>{if(t===C.current){if(r.classList.remove("animating","backwards"),s.forEach(((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("from","through","to"),e.classList.toggle("active",t===g))})),h){const e=r.querySelector(".active");e&&(e.style.height="auto",r.style.height=`${e.clientHeight}px`)}y&&y(),e(),E&&E()}}))}r.classList.add("animating"),Z&&Z();const i="mv-slide"===n?s[g]&&s[g].firstChild:"reveal"===n&&o?s[p]:s[g];C.current=t,P>0&&i?(0,l.f)(i,a):a()}))}),[t,N,I,u,n,Z,E,m,h,f,v,P,k]),(0,r.bt)((()=>{if(h){const e=b.current,t=e.querySelector(".active")||e.querySelector(".from");t&&(t.style.height="auto",e.style.height=`${t.clientHeight}px`,e.style.flexBasis=`${t.clientHeight}px`)}}),[h,y]);const T=w.current,L=Object.keys(m?new Array(m).fill(void 0):T).map(Number).map((e=>{const n=T[e];return"function"==typeof n?r.ZP.createElement("div",{key:e},n(e===t,e===N,t)):void 0})),x=(0,i.Z)("Transition",g,n);return r.ZP.createElement("div",{ref:b,id:p,className:x},L)}},3455:(e,t,n)=>{n.d(t,{fi:()=>s,Yy:()=>o,vb:()=>l,ZP:()=>h});var r=n(1090),a=n(782);const s=[{icon:"user",title:"FilterContacts",key:"contacts"},{icon:"non-contacts",title:"FilterNonContacts",key:"nonContacts"},{icon:"group",title:"FilterGroups",key:"groups"},{icon:"channel",title:"FilterChannels",key:"channels"},{icon:"bots",title:"FilterBots",key:"bots"}],o=[{icon:"mute",title:"FilterMuted",key:"excludeMuted"},{icon:"archive",title:"FilterArchived",key:"excludeArchived"},{icon:"readchats",title:"FilterRead",key:"excludeRead"}],i=["includedChatIds","bots","channels","groups","contacts","nonContacts"],c=["excludedChatIds","excludeArchived","excludeMuted","excludeRead"];function l(e,t,n){let r=[],s=[];if("included"===t){const{includedChatIds:t,...o}=n?e.includeFilters||{}:(0,a.ei)(e.folder,i);r=t||[],s=Object.keys(o).filter((e=>Boolean(o[e])))}else{const{excludedChatIds:t,...o}=n?e.excludeFilters||{}:(0,a.ei)(e.folder,c);r=t||[],s=Object.keys(o).filter((e=>Boolean(o[e])))}return{selectedChatIds:r,selectedChatTypes:s}}function d(e){if(e){const{includedChatIds:t,...n}=e;if(Object.values(n).filter(Boolean).length>1||t&&t.length)return"";if(n.bots)return"Bots";if(n.groups)return"Groups";if(n.channels)return"Channels";if(n.contacts)return"Contacts";if(n.nonContacts)return"Non-Contacts"}return""}const u={mode:"create",chatFilter:"",folder:{title:"",includedChatIds:[],excludedChatIds:[]}},m=(e,t)=>{switch(t.type){case"setTitle":return{...e,folder:{...e.folder,title:t.payload},isTouched:!0};case"editIncludeFilters":return{...e,includeFilters:(0,a.ei)(e.folder,i)};case"editExcludeFilters":return{...e,excludeFilters:(0,a.ei)(e.folder,c)};case"setIncludeFilters":return{...e,includeFilters:t.payload,chatFilter:""};case"setExcludeFilters":return{...e,excludeFilters:t.payload,chatFilter:""};case"saveFilters":return e.includeFilters?{...e,folder:{...(0,a.CE)(e.folder,i),title:e.folder.title?e.folder.title:d(e.includeFilters),...e.includeFilters},includeFilters:void 0,chatFilter:"",isTouched:!0}:e.excludeFilters?{...e,folder:{...(0,a.CE)(e.folder,c),...e.excludeFilters},excludeFilters:void 0,chatFilter:"",isTouched:!0}:e;case"editFolder":{const{id:e,description:n,...r}=t.payload;return{mode:"edit",folderId:e,folder:r,chatFilter:""}}case"setChatFilter":return{...e,chatFilter:t.payload};case"setIsLoading":return{...e,isLoading:t.payload};case"setError":return{...e,error:t.payload};case"reset":return u;default:return e}},h=()=>(0,r.Z)(m,u)},3186:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(4050),a=n(396),s=n(274),o=n(5266),i=n(9290);const c=(e,t,n,c,l,d=!1,u,m=!1)=>{const h=(0,r.sO)(null),[f,v]=(0,r.eJ)(!1);let p=f;const[g,Z]=(0,r.eJ)(0);(0,i.Z)((()=>{h.current=(0,a.z)(e,((e,n)=>{switch(e){case"onPlay":v(!0);break;case"onPause":v(!1);break;case"onTimeUpdate":{const{proxy:e}=h.current,n=e.duration&&Number.isFinite(e.duration)?e.duration:t;Z(e.currentTime/n);break}}c&&c[e]&&c[e](n)}),u);const{proxy:n}=h.current;f||n.paused||(v(!0),p=!0),l&&l(n)}),[e]);const{play:E,pause:y,setCurrentTime:P,proxy:C,destroy:b}=h.current,w=C.duration&&Number.isFinite(C.duration)?C.duration:t;(0,r.d4)((()=>{w&&!(0,o.z)(C)&&Z(C.currentTime/w)}),[w,g,C]),(0,r.d4)((()=>()=>{b(m)}),[b,m]),(0,s.Z)((([e,t])=>{e===d&&n===t||C.src&&C.paused||d&&n&&!f&&E(n)}),[d,n,f,E,C.src,C.paused]);const N=(0,r.I4)((()=>{f?y():n&&E(n)}),[n,y,E,f]);return{isPlaying:p,playProgress:g,playPause:N,setCurrentTime:P,audioProxy:C,duration:w}}},5332:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(4050);function a(e,t){(0,r.d4)((()=>(e&&!document.hasFocus()&&e(),e&&window.addEventListener("blur",e),t&&window.addEventListener("focus",t),()=>{t&&window.removeEventListener("focus",t),e&&window.removeEventListener("blur",e)})),[e,t])}},2937:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(4050),a=n(6264),s=n(9290),o=n(1394),i=n(5326);const c=new Map;function l(e){const t=(0,r.sO)();let n=!1;(0,s.Z)((()=>{if(n=!0,t.current=void 0,!e)return;const r=new Image;if(r.src=e,!r.width)return;const s=(0,o.ao)(r);(0,a.Z)(s.getContext("2d"),0,0,s.width,s.height,2,2),t.current=s.toDataURL()}),[e]);const l=function(e,t=!1,n){const s=(0,r.sO)(e?c.get(e):void 0),l=(0,r.sO)(),d=(0,i.Z)();return l.current&&t&&(clearTimeout(l.current),l.current=void 0),(0,r.d4)((()=>{if(!e||s.current||t)return;const r=new Image;r.onload=()=>{const t=(0,o.ao)(r);(0,a.Z)(t.getContext("2d"),0,0,t.width,t.height,2,2);const n=t.toDataURL();s.current=n,d(),c.size>=1e3&&c.clear(),c.set(e,n)},n?l.current=window.setTimeout((()=>{r.src=e}),n):r.src=e}),[e,n,d,t]),s.current}(e||void 0,Boolean(t.current));return t.current||!n&&l||e||void 0}},2019:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(9118),s=n(5266);const o=(e=!1)=>{const[t,n]=(0,r.eJ)(!e),[o,i]=(0,r.eJ)(0),c=(0,r.Ye)((()=>(0,a.Ds)(n,200,!1,!0)),[]),l=(0,r.I4)((e=>{const t=e.currentTarget;(0,s.z)(t)||(t.buffered.length&&i(t.buffered.end(0)/t.duration),c(t.readyState>=3||t.currentTime>0))}),[c]);return{isBuffered:t,bufferedProgress:o,bufferingHandlers:{onLoadedData:l,onPlaying:l,onLoadStart:l,onPause:l,onTimeUpdate:l,onProgress:l},checkBuffering(e){c(e.readyState>=3)}}}},5866:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4050),a=n(6264),s=n(5326),o=n(7361);function i(e,t=!1,n){const i=(0,r.sO)(null),c=(0,s.Z)();return(0,r.d4)((()=>{const r=i.current;if(!e||!r||t)return;const s=new Image,c=()=>{r.width=s.width,r.height=s.height;const e=r.getContext("2d",{alpha:!1});o.vX&&(e.filter="blur(2px)"),e.drawImage(s,-4,-4,r.width+8,r.height+8),o.vX||(0,a.Z)(e,0,0,r.width,r.height,2,2)};s.onload=()=>{n?requestAnimationFrame(c):c()},s.src=e}),[i,e,c,t,n]),i}},1470:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4050),a=n(5116),s=n(2858),o=n(9107);const i=({chat:e,privateChatUser:t,handleDelete:n,folderId:i,isPinned:c,isMuted:l})=>{const d=(0,o.Z)(),{toggleChatPinned:u,updateChatMutedState:m,toggleChatArchived:h,toggleChatUnread:f}=(0,a.uC)();return(0,r.Ye)((()=>{if(!e)return;const r=t&&t.isSelf,a=e.unreadCount||e.hasUnreadMark?{title:d("MarkAsRead"),icon:"readchats",handler:()=>f({id:e.id})}:{title:d("MarkAsUnread"),icon:"unread",handler:()=>f({id:e.id})},o=c?{title:d("UnpinFromTop"),icon:"unpin",handler:()=>u({id:e.id,folderId:i})}:{title:d("PinToTop"),icon:"pin",handler:()=>u({id:e.id,folderId:i})},v=l?{title:d("ChatList.Unmute"),icon:"unmute",handler:()=>m({chatId:e.id,isMuted:!1})}:{title:d("ChatList.Mute"),icon:"mute",handler:()=>m({chatId:e.id,isMuted:!0})},p=(0,s.pE)(e)?{title:d("Unarchive"),icon:"unarchive",handler:()=>h({id:e.id})}:{title:d("Archive"),icon:"archive",handler:()=>h({id:e.id})};return[a,o,...r?[]:[v,p],{title:(0,s.YA)(e.id)?d("Delete"):d((0,s.cc)(e)?"DeleteChat":(0,s.eA)(e)?"LeaveChannel":"Group.LeaveGroup"),icon:"delete",destructive:!0,handler:n}]}),[e,t,d,c,n,f,u,i,m,h,l])}},7240:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(7361);let s=0;const o=(e,t,n,o)=>{const[i,c]=(0,r.eJ)(!1),[l,d]=(0,r.eJ)(void 0),u=(0,r.I4)((e=>{t||2!==e.button||document.body.classList.add("no-selection")}),[t]),m=(0,r.I4)((e=>{document.body.classList.remove("no-selection"),t||n&&e.target.matches("a.text-entity-link[href]")||(e.preventDefault(),l||(document.body.classList.remove("no-selection"),0===s&&document.body.classList.add("has-context-menu"),s++,c(!0),d({x:e.clientX,y:e.clientY})))}),[t,n,l]),h=(0,r.I4)((()=>{c(!1)}),[]),f=(0,r.I4)((()=>{d(void 0),document.body.classList.remove("no-selection"),setTimeout((()=>{s--,0===s&&document.body.classList.remove("has-context-menu")}),200)}),[]);return(0,r.d4)((()=>{if(t||!a.$b||o)return;const r=e.current;if(!r)return;let s;const i=()=>{s&&(clearTimeout(s),s=void 0)},u=e=>{t||a.wB&&window.document.body.classList.contains("enable-symbol-menu-transforms")||(i(),s=window.setTimeout((()=>(e=>{i();const{clientX:t,clientY:a,target:s}=e.touches[0];l||n&&s.matches("a.text-entity-link[href]")||(r.addEventListener("touchend",(function e(t){r.removeEventListener("touchend",e,!0),t.stopImmediatePropagation(),t.preventDefault(),t.stopPropagation()}),!0),document.body.classList.add("no-selection"),c(!0),d({x:t,y:a}))})(e)),200))};return r.addEventListener("touchstart",u,{passive:!0}),r.addEventListener("touchcancel",i,!0),r.addEventListener("touchend",i,!0),r.addEventListener("touchmove",i,{passive:!0}),()=>{i(),r.removeEventListener("touchstart",u),r.removeEventListener("touchcancel",i,!0),r.removeEventListener("touchend",i,!0),r.removeEventListener("touchmove",i)}}),[l,t,o,e,n]),{isContextMenuOpen:i,contextMenuPosition:l,handleBeforeContextMenu:u,handleContextMenu:m,handleContextMenuClose:h,handleContextMenuHide:f}}},3394:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(4050);const a=(e,t,n,a,s=0,o=0)=>{const[i,c]=(0,r.eJ)("right"),[l,d]=(0,r.eJ)("bottom"),[u,m]=(0,r.eJ)("");return(0,r.d4)((()=>{const r=t();if(!e||!r)return;let{x:i,y:l}=e;const u={width:0,left:0,height:0,top:0},h=a(),f=n(),v=r.getBoundingClientRect(),p=h?{width:h.offsetWidth,height:h.offsetHeight}:u,g=f?f.getBoundingClientRect():u;let Z;i+p.width+s<g.width+g.left?(i+=3,Z="left"):i-p.width>0?(Z="right",i-=3):(Z="left",i=16),c(Z),l+p.height<g.height+g.top?d("top"):(d("bottom"),l-p.height<g.top+o&&(l=g.top+o+p.height));const E="left"===Z?Math.min(i-v.left,g.width-p.width-16):Math.max(i-v.left,p.width+16);m(`left: ${E}px; top: ${l-v.top}px;`)}),[e,s,o,a,n,t]),{positionX:i,positionY:l,style:u}}},8360:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(7204);function a(e,t=!1,n=!1){const a=(0,r.Z)(e,t);return n||null!=e?e:a}},5790:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(5116),s=n(9118);const o=(e,t,n,o)=>{const{loadMessage:i}=(0,a.uC)(),c=(0,r.Ye)((()=>{const n=(0,s.P2)(i,500,!0);return()=>{n({chatId:e,messageId:t,replyOriginForId:o})}}),[i,e,t,o]);(0,r.d4)((()=>{t&&!n&&c()}))}},8781:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(4050);const a=(e,t)=>{(0,r.d4)((()=>{if(e)return e.addEventListener("wheel",t,{passive:!0}),()=>{e.removeEventListener("wheel",t)};function t(t){t.deltaX||(e.scrollLeft+=t.deltaY/4)}}),[e,t])}},7407:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(4050),a=n(1713),s=n(782),o=n(5326),i=n(7204);const c=(e,t,n=!1,c=30,d=!1)=>{const u=(0,r.sO)(),m=(0,r.sO)((()=>{if(!t||u.current)return;const{newViewportIds:e}=l(t,t[0],a.Uq.Forwards,c);return e})()),h=(0,o.Z)(),f=(0,i.Z)(t),v=(0,i.Z)(n);if(t&&!n&&(t!==f||n!==v)){const{offsetId:e=t[0],direction:n=a.Uq.Forwards}=u.current||{},{newViewportIds:r}=l(t,e,n,c);m.current&&(0,s.et)(m.current,r)||(m.current=r)}(0,r.d4)((()=>{if(t&&!n&&e&&d){const t=m.current;e({offsetId:t[t.length-1]})}}),[t,n,e,d]);const p=(0,r.I4)((({direction:n,noScroll:r})=>{const o=m.current,i=o?n===a.Uq.Backwards?o[o.length-1]:o[0]:void 0;if(!t)return void(e&&e({offsetId:i}));r||(u.current={...u.current,direction:n,offsetId:i});const{newViewportIds:d,areSomeLocal:f,areAllLocal:v}=l(t,i,n,c);!f||o&&(0,s.et)(o,d)||(m.current=d,h()),!v&&e&&e({offsetId:i})}),[t,c,e,h]);return n?[t]:[m.current,p]};function l(e,t=0,n,r){const{length:s}=e,o=e.indexOf(t),i=n===a.Uq.Forwards?o:o+1||s,c=Math.max(0,i-r),l=i+r-1,d=e.slice(Math.max(0,c),l+1);let u,m;switch(n){case a.Uq.Forwards:u=i>0,m=c>=0;break;case a.Uq.Backwards:u=i<s,m=l<=s-1}return{newViewportIds:d,areSomeLocal:u,areAllLocal:m}}},3657:(e,t,n)=>{n.d(t,{S1:()=>o,_N:()=>i,Op:()=>c});var r=n(4050),a=n(9118),s=n(8674);function o({rootRef:e,throttleMs:t,debounceMs:n,shouldSkipFirst:o,margin:i,threshold:c,isDisabled:l},d){const u=(0,r.sO)(),m=(0,r.sO)(),h=(0,r.sO)(0),f=(0,r.sO)();m.current=d;const v=(0,r.I4)((()=>{h.current++}),[]),p=(0,r.I4)((()=>{h.current&&(h.current--,!h.current&&f.current&&(f.current(),f.current=void 0))}),[]);return(0,s.ZP)(v,p),(0,r.d4)((()=>{if(!l)return()=>{u.current&&(u.current.observer.disconnect(),u.current.callbacks.clear(),u.current=void 0)}}),[l]),{observe:(0,r.I4)(((r,s)=>{u.current||function(){const r=new Map,s=new Map,l=()=>{const e=Array.from(s.values());e.forEach((t=>{const n=r.get(t.target);n&&n(t,e)})),m.current&&m.current(e),s.clear()},d=t?a.P2:n?a.Ds:void 0,v=d?d(l,t||n,!o):l,p=new IntersectionObserver((e=>{e.forEach((e=>{s.set(e.target,e)})),h.current?f.current=()=>{v()}:v()}),{root:e.current,rootMargin:i?`${i}px`:void 0,threshold:c});u.current={observer:p,callbacks:r}}();const l=u.current;return l.observer.observe(r),s&&l.callbacks.set(r,s),()=>{s&&l.callbacks.delete(r),l.observer.unobserve(r)}}),[l]),freeze:v,unfreeze:p}}function i(e,t,n){(0,r.d4)((()=>t?t(e.current,n):void 0),[])}function c(e,t,n){const[a,s]=(0,r.eJ)(!t);return i(e,t,(e=>{s(e.isIntersecting),n&&n(e)})),a}},2645:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(4050),a=n(7204);const s=(e,t,n)=>{const s=(0,a.Z)(t);return(0,r.bt)((()=>e(s||[])),t,n)}},6202:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4050),a=n(6137),s=n(647),o=n(5326);const i=(e,t=!1,n=a.IU.BlobUrl,i,c)=>{const l=e?s.UV(e):void 0,d=(0,o.Z)();return(0,r.d4)((()=>{if(!t&&e&&!l){const t=Date.now();s.he(e,n).then((()=>{const e=Date.now()-t;!c||e>=c?d():setTimeout(d,c-e)}))}}),[t,e,l,n,i,d,c]),l}},2619:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(2761),s=n(6562);function o(e,t){const[n,o]=(0,r.eJ)(!1),{mediaData:i,downloadProgress:c}=(0,a.Z)(e,!n);(0,r.d4)((()=>{n&&i&&((0,s.Z)(i,t),o(!1))}),[t,i,n]),(0,r.d4)((()=>{o(!1)}),[e]);const l=(0,r.I4)((e=>{e.stopPropagation(),o((e=>!e))}),[]);return{isDownloadStarted:n,downloadProgress:c,handleDownloadClick:l}}},2761:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(4050),a=n(7361),s=n(6137),o=n(9118),i=n(647),c=n(5326);const l=(e,t=!1,n=s.IU.BlobUrl,l,d,u=!1)=>{const m=e?i.UV(e):void 0,h=n===s.IU.Stream||a.I_&&n===s.IU.Progressive,f=(0,c.Z)(),[v,p]=(0,r.eJ)(m&&!h?1:0),g=(0,r.sO)(),Z=(0,r.Ye)((()=>(0,o.P2)((e=>{(!d||Date.now()-g.current>d)&&p(e)}),500,!0)),[d]);return(0,r.d4)((()=>{!t&&e&&(m?h&&setTimeout((()=>{p(.75)}),1500):(p(0),g.current&&i.cC(Z),g.current=Date.now(),i.he(e,n,u,Z).then((()=>{const e=Date.now()-g.current;g.current=void 0,!d||e>=d?f():setTimeout(f,d-e)}))))}),[t,e,m,n,l,f,h,d,Z,u]),(0,r.d4)((()=>{t&&g.current&&(i.cC(Z),p(0))}),[Z,t]),{mediaData:m,downloadProgress:v}}},6503:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(7361);let s;function o(e,t,n=250,o=!1){const i=(0,r.sO)(!1);return(0,r.d4)((()=>{s&&(clearTimeout(s),s=void 0),!e||a.$b||o||(s=window.setTimeout((()=>{i.current||t()}),2*n))}),[o,e,n,t]),[(0,r.I4)((()=>{i.current=!0}),[]),(0,r.I4)((()=>{i.current=!1,s&&(clearTimeout(s),s=void 0),s=window.setTimeout((()=>{i.current||t()}),n)}),[n,t])]}},2678:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4050),a=n(7204),s=n(5326),o=n(9290);function i(e,t){const n=(0,a.Z)(e,!0),i=(0,r.sO)(),c=(0,s.Z)(),l=null!=e,d=null!=n;return l&&i.current&&(clearTimeout(i.current),i.current=void 0),(0,o.Z)((()=>{t&&!l&&d&&!i.current&&(i.current=window.setTimeout((()=>{i.current=void 0,c()}),t))}),[e]),i.current&&t&&!l?n:e}},1090:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(4050);function a(e,t){const n=(0,r.sO)(e),[a,s]=(0,r.eJ)(t);return[a,(0,r.I4)((e=>{s((t=>n.current(t,e)))}),[])]}},8835:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(1212);const s={fast:200,slow:350},o=(e,t="fast",n=!1)=>{const o=Boolean(e),i=!(0,r.sO)(o).current&&!n,[c,l]=(0,r.eJ)(!o),{shouldRender:d,transitionClassNames:u}=(0,a.Z)(o,void 0,!i,t);return(0,r.d4)((()=>{d&&(i?setTimeout((()=>{l(!1)}),s[t]):l(!1))}),[i,d,t]),{shouldRenderThumb:c,shouldRenderFullMedia:d,transitionClassNames:u}}},6898:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(4050),a=n(9118);function s(e,t){(0,r.d4)((()=>{const t=e.current;return()=>{t&&(0,a.T2)((()=>{t.pause(),t.src="",t.load()}))}}),t)}},6264:(e,t,n)=>{n.d(t,{Z:()=>s});const r=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1],a=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18];function s(e,t,n,s,o,i,c){if(Number.isNaN(i)||i<1)return;i|=0,Number.isNaN(c)&&(c=1),(c|=0)>3&&(c=3),c<1&&(c=1);const l=e.getImageData(t,n,s,o),d=l.data;let u,m,h,f,v,p,g,Z,E,y,P,C,b=s-1,w=o-1,N=i+1,k=[],I=[],T=[],L=r[i],x=a[i],M=[],S=[];for(;c-- >0;){for(C=P=0,v=0;v<o;v++){for(u=d[C]*N,m=d[C+1]*N,h=d[C+2]*N,p=1;p<=i;p++)g=C+((p>b?b:p)<<2),u+=d[g++],m+=d[g++],h+=d[g++];for(f=0;f<s;f++)k[P]=u,I[P]=m,T[P]=h,0==v&&(M[f]=((g=f+N)<b?g:b)<<2,S[f]=(g=f-i)>0?g<<2:0),Z=C+M[f],E=C+S[f],u+=d[Z++]-d[E++],m+=d[Z++]-d[E++],h+=d[Z++]-d[E++],P++;C+=s<<2}for(f=0;f<s;f++){for(y=f,u=k[y]*N,m=I[y]*N,h=T[y]*N,p=1;p<=i;p++)y+=p>w?0:s,u+=k[y],m+=I[y],h+=T[y];for(P=f<<2,v=0;v<o;v++)d[P]=u*L>>>x,d[P+1]=m*L>>>x,d[P+2]=h*L>>>x,0==f&&(M[v]=((g=v+N)<w?g:w)*s,S[v]=(g=v-i)>0?g*s:0),Z=f+M[v],E=f+S[v],u+=k[Z]-k[E],m+=I[Z]-I[E],h+=T[Z]-T[E],P+=s<<2}}e.putImageData(l,t,n)}},396:(e,t,n)=>{n.d(t,{E:()=>u,z:()=>m});var r=n(7361),a=n(4753),s=n(5266),o=n(5116),i=n(2858);const c=new Map;let l,d=[];function u(){const e=l&&c.get(l);e&&e.audio.pause()}function m(e,t,n){c.has(e)||(c.set(e,function(e,t){const n=new Audio;function r(t){return r=>{c.has(e)&&((0,s.z)(n)||c.get(e).handlers.forEach((e=>{e(t,r)})))}}return n.addEventListener("timeupdate",r("onTimeUpdate")),n.addEventListener("play",r("onPlay")),n.addEventListener("pause",r("onPause")),n.addEventListener("loadstart",r("onLoadStart")),n.addEventListener("loadeddata",r("onLoadedData")),n.addEventListener("playing",r("onPlaying")),n.addEventListener("ended",(()=>{if((0,s.z)(n))return;const t=d[d.indexOf(e)+1];if(!t)return;if(!c.has(t))return void(0,o.uC)().openAudioPlayer((0,i.Ak)(t));const r=c.get(t);r.onForcePlay&&r.onForcePlay(),l=t,r.audio.src&&(0,a.Z)(r.audio)})),{audio:n,proxy:new Proxy(n,{get:(e,t)=>e[t]}),handlers:[],onForcePlay:t}}(e,n)),d.includes(e)||d.push(e));const{audio:u,proxy:m,handlers:h}=c.get(e);return h.push(t),{play(t){l&&l!==e&&c.get(l).audio.pause(),l=e,u.src||(u.src=t,u.preload="auto",t.includes("/progressive/")&&r.s$&&(0,s.B)(u)),(0,a.Z)(u)},pause(){l===e&&u.pause()},setCurrentTime(t){l===e&&(u.currentTime=t)},proxy:m,destroy(n=!1){const r=c.get(e);r&&(r.handlers=r.handlers.filter((e=>e!==t)),r.handlers.length||(r.audio.pause(),c.delete(e),n&&(d=d.filter((t=>t!==e))),e===l&&(l=void 0)))}}}},1174:(e,t,n)=>{let r;function a(e,t){let n,a,s=!1;function o(e){t.excludedClosestSelector&&(e.target.matches(t.excludedClosestSelector)||e.target.closest(t.excludedClosestSelector))||(n=e,"mousedown"===e.type?(document.addEventListener("mousemove",c),document.addEventListener("mouseup",i)):"touchstart"===e.type&&(document.addEventListener("touchmove",c),document.addEventListener("touchend",i),document.addEventListener("touchcancel",i),"touches"in e&&(void 0===e.pageX&&(e.pageX=e.touches[0].pageX),void 0===e.pageY&&(e.pageY=e.touches[0].pageY))),document.body.classList.add("no-selection"),t.withCursor&&document.body.classList.add("cursor-grabbing"),t.onCapture&&t.onCapture(e))}function i(e){n&&(t.withCursor&&document.body.classList.remove("cursor-grabbing"),document.body.classList.remove("no-selection"),document.removeEventListener("mouseup",i),document.removeEventListener("mousemove",c),document.removeEventListener("touchcancel",i),document.removeEventListener("touchend",i),document.removeEventListener("touchmove",c),n=void 0,s?t.onRelease&&t.onRelease(e):!t.onClick||"button"in e&&0!==e.button||t.onClick(e)),s=!1,a=void 0}function c(e){if(n){"touchmove"===e.type&&"touches"in e&&(void 0===e.pageX&&(e.pageX=e.touches[0].pageX),void 0===e.pageY&&(e.pageY=e.touches[0].pageY));const o=e.pageX-n.pageX,i=e.pageY-n.pageY;(Math.abs(o)>=15||Math.abs(i)>=15)&&(s=!0),t.onDrag&&(e.preventDefault(),t.onDrag(e,n,{dragOffsetX:o,dragOffsetY:i})),t.onSwipe&&function(e,n,s){if(!a){const e=Math.abs(n),t=Math.abs(s);if(n&&s&&Math.max(e,t)/Math.min(e,t)<2)return;e>=50?a="x":t>=50&&(a="y")}!function(e,t,n,a,s){"x"===t?s(e,n<0?r.Left:r.Right):"y"===t&&s(e,a<0?r.Up:r.Down)}(e,a,n,s,t.onSwipe)}(e,o,i)}}return e.addEventListener("mousedown",o),e.addEventListener("touchstart",o,{passive:!0}),()=>{e.removeEventListener("mousedown",o),e.removeEventListener("touchstart",o)}}n.d(t,{e:()=>r,s:()=>a}),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Left=2]="Left",e[e.Right=3]="Right"}(r||(r={}))},4319:(e,t,n)=>{n.d(t,{yl:()=>a,TE:()=>o,VP:()=>i});var r=n(3716);const a=navigator.clipboard&&window.ClipboardItem,s=document.createElement("textarea");s.setAttribute("readonly",""),s.tabIndex=-1,s.className="visually-hidden";const o=e=>{s.value=e,document.body.appendChild(s);const t=document.getSelection();if(t){const e=t.rangeCount>0&&t.getRangeAt(0);s.select(),document.execCommand("copy"),e&&(t.removeAllRanges(),t.addRange(e))}document.body.removeChild(s)},i=e=>{if(!e)return;const t=document.createElement("canvas"),n=t.getContext("2d"),r=new Image;r.onload=e=>{if(n&&e.currentTarget){const r=e.currentTarget;t.width=r.width,t.height=r.height,n.drawImage(r,0,0,r.width,r.height),t.toBlob(c,"image/png",1)}},r.src=e};async function c(e){if(e&&a)try{await navigator.clipboard.write([new window.ClipboardItem({[e.type]:e})])}catch(e){r.eM&&console.error(e)}}},1279:(e,t,n)=>{function r(e,t,n){s("transitionend",e,t,n)}function a(e,t,n){s("animationend",e,t,n)}function s(e,t,n,r){let a=!1;t.addEventListener(e,(function s(o){a||o.target!==o.currentTarget||r&&(o instanceof TransitionEvent&&o.propertyName===r||o instanceof AnimationEvent&&o.animationName===r)||(a=!0,t.removeEventListener(e,s),setTimeout((()=>{n()}),50))}))}n.d(t,{L:()=>r,f:()=>a})},3570:(e,t,n)=>{function r(e,t){return t-Math.floor(t/e)*e}n.d(t,{Z:()=>r})},6562:(e,t,n)=>{function r(e,t){const n=document.createElement("a");n.href=e,n.download=t,n.click()}n.d(t,{Z:()=>r})},539:(e,t,n)=>{n.d(t,{Z:()=>l,N:()=>d});var r=n(5116),a=n(1713),s=n(3716),o=n(8674),i=n(9933);let c=!1;function l(e,t,n,o=0,i=s.V$,c,l,d){const m=function(e,t,n=s.V$,r){const{offsetTop:o}=t,{scrollTop:i}=e;if(void 0===r){const t=o-e.scrollTop;if(t<-n)return i+(t+n);if(t>n)return i+(t-n)}else{if(r===a.fo.Up)return o+n;if(r===a.fo.Down)return Math.max(0,o-n)}return i}(e,t,i,c);c!==a.fo.Static?((0,r.Rd)().settings.byKey.animationLevel===s.oB&&(l=0),u(e,t,m,n,o,l,d)):u(e,t,m,n,o,0)}function d(){return c}function u(e,t,n,r,a=0,l,d){const{offsetTop:u,offsetHeight:f}=t,{scrollTop:v,offsetHeight:p,scrollHeight:g}=e,Z=d&&e.dataset.normalHeight?Number(e.dataset.normalHeight):p;let E;switch(v!==n&&(e.scrollTop=n),r){case"start":E=u-a-n;break;case"end":E=u+f+a-(n+Z);break;case"nearest":case"center":case"centerOrTop":E=f<Z?u+f/2-(n+Z/2):u-a-n}if(E<0){const e=-n;E=Math.max(E,e)}else if(E>0){const e=g-(n+Z);E=Math.min(E,e)}if(0===E)return;const y=n+E;if(0===l)return void(e.scrollTop=y);c=!0;const P=Math.abs(E),C=P<s.xn?h:m,b=l||s.bK+P/s.V$*(s.ck-s.bK),w=Date.now(),N=(0,o.YW)();(0,i.c)((()=>{const t=Math.min((Date.now()-w)/b,1),n=E*(1-C(t));return e.scrollTop=Math.round(y-n),c=t<1,c||N(),c}))}function m(e){return 1-(1-e)**5}function h(e){return 1-(1-e)**3.5}},1367:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(5116),a=n(3716),s=n(7361),o=n(9933);function i(e,t,n=300){(0,r.Rd)().settings.byKey.animationLevel===a.oB&&(n=0),s.cj?function(e,t,n){const{scrollLeft:r,offsetWidth:a,scrollWidth:s}=e;let i=t-r;if(i<0){const e=-r;i=Math.max(i,e)}else if(i>0){const e=s-(r+a);i=Math.min(i,e)}if(0===i)return;const c=r+i;if(0===n)return void(e.scrollLeft=c);const l=Date.now();(0,o.j)((()=>{const t=Math.min((Date.now()-l)/n,1),r=i*(1-function(e){return 1-(1-e)**3.5}(t));return e.scrollLeft=Math.round(c-r),t<1}))}(e,t,n):e.scrollTo({left:t,...n&&{behavior:"smooth"}})}},5723:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(7361);function a(e,t){if(!t&&e===document.activeElement)return;const n=window.getSelection(),a=document.createRange(),s=e.lastChild||e;r.$b||s&&s.nodeValue?(a.selectNodeContents(s),a.collapse(!1),n.removeAllRanges(),n.addRange(a)):e.focus()}},5266:(e,t,n)=>{function r(e){e.dataset.patchedForSafari||(e.addEventListener("play",(()=>{const t=e.currentTime;e.addEventListener("progress",(function n(){e.buffered.length&&(e.dataset.patchForSafariInProgress="true",e.currentTime=e.duration-1,e.addEventListener("progress",(()=>{delete e.dataset.patchForSafariInProgress,e.currentTime=t,e.paused&&e.play()}),{once:!0}),e.removeEventListener("progress",n))}))}),{once:!0}),e.dataset.patchedForSafari="true")}function a(e){return Boolean(e.dataset.patchForSafariInProgress)}n.d(t,{B:()=>r,z:()=>a})},7675:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(7361);const a=(e,t)=>{r.cj&&(e.style.overflow="hidden"),void 0!==t&&(e.scrollTop=t),r.cj&&(e.style.overflow="")}},4753:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(3716);const a=e=>{e.play().catch((e=>{r.eM&&console.warn(e)}))}}}]);
//# sourceMappingURL=280.b62be11f67ec535a60df.js.map