2 lines
24 KiB
JavaScript
2 lines
24 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[1006],{4523:(e,t,i)=>{i.d(t,{A:()=>Ye});var n=i(84051),o=i(13439),s=i(23174),r=i(89925),a=i(31481),c=i(90709),l=i(26129),d=i(29807),u=i(96454),h=i(87357),m=i(60343),f=i(41512),g=i(54464),p=i(43874),A=i(10722),v=i(49746),I=i(37661),C=i(5912),b=i(17712),F=i(14622),y=i(21511),N=i(48196),Y=i(79519),k=i(96773),P=i(76023),S=i(21849),G=i(50805),x=i(20021);const T=15*P.$,w=(0,n.ph)((({action:e,onClick:t,observeIntersection:i})=>(0,x.Y)(S.A,{className:G.A.channelPhoto,photo:e.photo,loopIndefinitely:!0,withVideo:!0,observeIntersection:i,onClick:t,size:T})));var U=i(18501),B=i(39351),D=i(85118),M=i(82855);const R=(0,n.ph)((0,o.EK)(((e,{action:t})=>({sticker:"giftPremium"===t.type?(0,d.t0O)(e,t.months):(0,d.WLj)(e,t.stars),canPlayAnimatedEmojis:(0,d.BWX)(e)})))((({action:e,sticker:t,canPlayAnimatedEmojis:i,onClick:o,observeIntersectionForLoading:s,observeIntersectionForPlaying:r})=>{const a=(0,n.li)(),c=(0,B.A)(),l="giftPremium"===e.type?e.message:void 0;return(0,x.FD)("div",{className:G.A.contentBox,tabIndex:0,role:"button",onClick:o,children:[(0,x.Y)("div",{ref:a,className:G.A.stickerWrapper,style:"width: 150px; height: 150px",children:t&&(0,x.Y)(M.A,{containerRef:a,sticker:t,size:150,observeIntersectionForLoading:s,observeIntersectionForPlaying:r,noLoad:!i})}),(0,x.FD)("div",{className:G.A.info,children:[(0,x.Y)("h3",{className:G.A.title,children:"giftPremium"===e.type?c("ActionGiftPremiumTitle",{months:e.months},{pluralValue:e.months}):c("ActionGiftStarsTitle",{amount:e.stars},{pluralValue:e.stars})}),(0,x.FD)("div",{children:[l&&(0,U.fd)(l),!l&&c("giftPremium"===e.type?"ActionGiftPremiumText":"ActionGiftStarsText")]})]}),(0,x.FD)("div",{className:G.A.actionButton,children:[(0,x.Y)(D.A,{preset:"button"}),c("ActionViewButton")]})]})})));var L=i(70636),V=i(4262);const E=(0,n.ph)((0,o.EK)(((e,{action:t})=>({sticker:"giftCode"===t.type?(0,d.t0O)(e,t.months):(0,d.WLj)(e,t.stars),canPlayAnimatedEmojis:(0,d.BWX)(e),channel:(0,d.hds)(e,t.boostPeerId)})))((({action:e,sticker:t,canPlayAnimatedEmojis:i,channel:o,onClick:s,observeIntersectionForLoading:r,observeIntersectionForPlaying:a})=>{const c=(0,n.li)(),l=(0,B.A)(),d=(0,n.Kr)((()=>{const e=o&&(0,L.F9)(l,o),t=l("ActionFallbackChannel");return(0,V.Nm)(o?.id,e||t)}),[o,l]);return(0,x.FD)("div",{className:G.A.contentBox,tabIndex:0,role:"button",onClick:s,children:[(0,x.Y)("div",{ref:c,className:G.A.stickerWrapper,style:"width: 150px; height: 150px",children:t&&(0,x.Y)(M.A,{containerRef:c,sticker:t,size:150,observeIntersectionForLoading:r,observeIntersectionForPlaying:a,noLoad:!i})}),(0,x.FD)("div",{children:[(0,x.Y)("h3",{className:G.A.title,children:l("ActionGiveawayResultTitle")}),(0,x.FD)("div",{children:["giftCode"===e.type&&l(e.isViaGiveaway?"ActionGiveawayResultPremiumText":"ActionGiftCodePremiumText",{months:e.months,channel:d},{withNodes:!0,withMarkdown:!0,pluralValue:e.months,renderTextFilters:["br"]}),"prizeStars"===e.type&&l("ActionGiveawayResultStarsText",{amount:e.stars,channel:d},{withNodes:!0,withMarkdown:!0,pluralValue:e.stars,renderTextFilters:["br"]})]})]}),(0,x.FD)("div",{className:G.A.actionButton,children:[(0,x.Y)(D.A,{preset:"button"}),l("giftCode"===e.type?"ActionOpenGiftButton":"ActionViewButton")]})]})})));var z=i(48775),J=i(80140),K=i(14242),j=i(66833),O=i(87094),q=i(87049);const W=(0,n.ph)((0,o.EK)(((e,{message:t,action:i})=>{const n=(0,d.mBe)(e,e.currentUserId),o=(0,d.BWX)(e),s=(0,d.Y7C)(e,t),r=i.fromId?(0,d.PVB)(e,i.fromId):void 0,a=t.isOutgoing?(0,d.PVB)(e,t.chatId):n;return{canPlayAnimatedEmojis:o,sender:r||s,recipient:(i.peerId?(0,d.PVB)(e,i.peerId):void 0)||a,starGiftMaxConvertPeriod:e.appConfig?.starGiftMaxConvertPeriod}}))((({action:e,message:t,canPlayAnimatedEmojis:i,sender:o,recipient:s,starGiftMaxConvertPeriod:r,onClick:a,observeIntersectionForLoading:l,observeIntersectionForPlaying:d})=>{const u=(0,n.li)(),m=(0,n.li)(),f=(0,B.A)(),{isOutgoing:g}=t,p=(0,j.yQ)(e.gift),A=g?s:o,v=A&&(0,L.vj)(A)&&(0,c.WX)(A),I=(0,O.A)(u,"background-color",!e.gift.availabilityTotal),C=f("ActionFallbackSomeone"),b=A&&(0,L.F9)(f,A),F=o?.id===s?.id,y=(0,n.Kr)((()=>{const i=(0,V.Nm)(A?.id,b||C),n=void 0!==e.starsToConvert?(0,z.K)(f,e.starsToConvert):void 0;return e.isUpgraded?f("ActionStarGiftUpgraded"):e.alreadyPaidUpgradeStars?(0,V.AD)(f,"ActionStarGiftUpgradeText",!g||F,{peer:i}):e.isConverted?(0,V.AD)(f,"ActionStarGiftConvertedText",!g||F,{peer:i,amount:n}):r&&(0,J.Fm)()<t.date+r?(0,V.AD)(f,"ActionStarGiftConvertText",!g||F,{peer:i,amount:n}):v?f("ActionStarGiftChannelText",{amount:n},{withNodes:!0}):(0,V.AD)(f,"ActionStarGiftNoConvertText",!g||F,{peer:i})}),[e,C,v,g,f,t.date,A?.id,b,r,F]);return(0,x.FD)("div",{ref:u,className:(0,h.A)(G.A.contentBox,G.A.starGift),tabIndex:0,role:"button",onClick:a,children:[(0,x.Y)("div",{ref:m,className:G.A.stickerWrapper,style:"width: 120px; height: 120px",children:p&&(0,x.Y)(M.A,{containerRef:m,sticker:p,size:120,observeIntersectionForLoading:l,observeIntersectionForPlaying:d,noLoad:!i})}),Boolean(e.gift.availabilityTotal)&&(0,x.Y)(q.A,{color:I||"blue",text:f("ActionStarGiftLimitedRibbon",{total:(0,K.Vw)(f,e.gift.availabilityTotal)})}),(0,x.FD)("div",{className:G.A.info,children:[(0,x.Y)("h3",{className:G.A.title,children:F?f("ActionStarGiftSelf"):f(g?"ActionStarGiftTo":"ActionStarGiftFrom",{peer:(0,V.Nm)(A?.id,b||C)},{withNodes:!0})}),(0,x.FD)("div",{className:G.A.subtitle,children:[e.message&&(0,U.fd)(e.message),!e.message&&y]})]}),(0,x.FD)("div",{className:G.A.actionButton,children:[(0,x.Y)(D.A,{preset:"button"}),!e.alreadyPaidUpgradeStars||e.isUpgraded||g?f("ActionViewButton"):f("ActionStarGiftUnpack")]})]})})));var H=i(95807),$=i(92108),Q=i(40558);const X=(0,n.ph)((0,o.EK)(((e,{message:t,action:i})=>{const n=(0,d.mBe)(e,e.currentUserId),o=(0,d.BWX)(e),s=(0,d.Y7C)(e,t),r=i.fromId?(0,d.PVB)(e,i.fromId):void 0,a=t.isOutgoing?(0,d.PVB)(e,t.chatId):n;return{canPlayAnimatedEmojis:o,sender:r||s,recipient:(i.peerId?(0,d.PVB)(e,i.peerId):void 0)||a}}))((({action:e,message:t,canPlayAnimatedEmojis:i,sender:o,recipient:s,onClick:r,observeIntersectionForLoading:a,observeIntersectionForPlaying:c})=>{const l=(0,n.li)(),d=(0,B.A)(),{isOutgoing:u}=t,m=(0,j.yQ)(e.gift),f=(0,j.uc)(e.gift),g=f.model,p=f.pattern,A=f.backdrop,v=[A.centerColor,A.edgeColor],I=`${A.patternColor.slice(0,7)}55`,C=(0,n.Kr)((()=>[[d("ActionStarGiftUniqueModel"),g.name],[d("ActionStarGiftUniqueBackdrop"),A.name],[d("ActionStarGiftUniqueSymbol"),p.name]]),[d,g,p,A]),b=!u||e.isUpgrade,F=b&&!e.isUpgrade?o:s,y=d("ActionFallbackSomeone"),N=F&&(0,L.F9)(d,F),Y=o?.id===s?.id;return(0,x.FD)("div",{className:(0,h.A)(G.A.contentBox,G.A.starGift,G.A.uniqueGift),tabIndex:0,role:"button",onClick:r,children:[(0,x.Y)("div",{className:G.A.uniqueBackgroundWrapper,children:(0,x.Y)(Q.A,{className:G.A.uniqueBackground,backgroundColors:v,patternColor:A.patternColor,patternIcon:p.sticker,clearBottomSector:!0})}),(0,x.Y)("div",{ref:l,className:G.A.stickerWrapper,style:"width: 120px; height: 120px",children:m&&(0,x.Y)(M.A,{containerRef:l,sticker:m,size:120,observeIntersectionForLoading:a,observeIntersectionForPlaying:c,noLoad:!i})}),(0,x.Y)(q.A,{color:I,text:d("ActionStarGiftUniqueRibbon")}),(0,x.FD)("div",{className:G.A.info,children:[(0,x.Y)("h3",{className:G.A.title,children:Y?d("ActionStarGiftSelf"):d(b?"ActionStarGiftFrom":"ActionStarGiftTo",{peer:(0,V.Nm)(F?.id,N||y)},{withNodes:!0})}),(0,x.Y)("div",{className:G.A.subtitle,style:`color: ${A.textColor}`,children:d("GiftUnique",{title:e.gift.title,number:e.gift.number})}),(0,x.Y)($.A,{data:C,style:`color: ${A.textColor}`,valueClassName:G.A.uniqueValue})]}),(0,x.FD)("div",{className:G.A.actionButton,style:(0,H.A)(I&&`background-color: ${I}`),children:[(0,x.Y)(D.A,{preset:"button"}),d("ActionViewButton")]})]})})));var Z=i(87679),_=i(62587),ee=i(94189),te=i(68584);const ie=(0,n.ph)((0,o.EK)(((e,{message:t})=>({peer:(0,d.PVB)(e,t.chatId)})))((({message:e,action:t,peer:i,observeIntersection:a})=>{const{openMediaViewer:l,uploadProfilePhoto:d,showNotification:u}=(0,o.ko)(),{isOutgoing:h}=e,m=t.photo,f=(0,B.A)(),[g,p]=(0,n.J0)(),[A,v,C]=(0,I.A)(!1),F=(0,_.A)((0,c.rI)(m,"full")),y=(0,_.A)((0,c.Pg)(m)),N=m.isVideo,Y=(0,n.Kr)((()=>{const e=i&&(0,L.F9)(f,i)||f("ActionFallbackUser"),t=(0,V.Nm)(i?.id,e);return f(h?"ActionSuggestedPhotoYou":"ActionSuggestedPhoto",{user:t},{withNodes:!0})}),[f,h,i]),k=(0,b.A)((()=>{u({title:f("ActionSuggestedPhotoUpdatedTitle"),message:f("ActionSuggestedPhotoUpdatedDescription"),action:{action:"openSettingsScreen",payload:{screen:r.VS.Main}},actionText:f("Open")})})),P=(0,b.A)((e=>{p(void 0),d({file:e}),k()})),T=(0,b.A)((()=>{p(void 0)})),w=(0,b.A)((async()=>{if(!y)return;C(),k();const e=await(0,Z.sZ)(y);d({file:new File([e],"avatar.mp4"),isVideo:!0,videoTs:m.videoSizes?.find((e=>void 0!==e.videoStartTs))?.videoStartTs})}));return(0,x.FD)("div",{className:G.A.contentBox,tabIndex:0,role:"button",onClick:async()=>{!h&&F?N?v():p(await(0,Z.sZ)(F)):l({chatId:e.chatId,messageId:e.id,threadId:s.l3,origin:r.TQ.SuggestedAvatar})},children:[(0,x.Y)(S.A,{className:G.A.suggestedAvatar,photo:t.photo,loopIndefinitely:!0,withVideo:!0,observeIntersection:a,size:"jumbo"}),(0,x.Y)("div",{className:G.A.suggestedText,children:Y}),(0,x.Y)("div",{className:G.A.actionButton,children:f("ActionSuggestedPhotoButton")}),(0,x.Y)(te.A,{file:g,onClose:T,onChange:P}),(0,x.Y)(ee.A,{isOpen:A,title:f("ActionSuggestedVideoTitle"),confirmHandler:w,onClose:C,text:f("ActionSuggestedVideoText")})]})})));var ne=i(99515),oe=i(43581),se=i(14737),re=i(48894);var ae=i(36838),ce=i(59030),le=i(18276),de=i(64493),ue=i(55158);const he="d8axZxyN",me="glDpC2av",fe="gqCs9fSo",ge="gnYhwnvf",pe="HWgwnKui",Ae="BTNQ4KBH",ve="Xl9MVMTn",Ie="Qizai7yv";function Ce({channel:e}){const{openChat:t}=(0,o.ko)(),i=function(e,t="#00000000"){const[i,o]=(0,n.J0)(t),r=(0,_.A)((0,c.cP)(e),!1,s.qZ.BlobUrl);return(0,n.vJ)((()=>{(async()=>{if(!r)return;const e=await(0,re.rX)(r);o(`#${(0,re.v2)(e)}`)})()}),[r]),i}(e,"#3C3C4399"),r=(0,B.A)();return(0,x.FD)("div",{className:me,onClick:()=>t({id:e.id}),children:[(0,x.Y)(S.A,{className:fe,size:"large",peer:e},e.id),(0,x.FD)("div",{style:`background: ${i}`,className:ge,children:[(0,x.Y)(le.A,{name:"user-filled",className:he}),(0,x.Y)("span",{className:pe,children:(0,K.Vw)(r,e?.membersCount||0)})]}),(0,x.Y)("span",{className:Ae,children:e.title})]})}function be({channel:e,chatId:t,channelsCount:i,isCurrentUserPremium:n}){const{openPremiumModal:s,openChatWithInfo:r}=(0,o.ko)(),a=(0,ce.A)();return(0,x.FD)("div",{className:(0,h.A)(me,"MBChXyXk"),onClick:()=>{n?r({id:t,shouldReplaceHistory:!0,profileTab:"similarChannels",forceScrollProfileTab:!0}):s()},children:[(0,x.Y)(S.A,{className:fe,size:"large",peer:e},e.id),(0,x.Y)("div",{className:ve,children:(0,x.Y)("div",{className:Ie})}),(0,x.Y)("div",{className:(0,h.A)(ve,"JxSmtOFi"),children:(0,x.Y)("div",{className:Ie})}),(0,x.FD)("div",{className:ge,children:[(0,x.Y)("span",{className:pe,children:`+${i}`}),!n&&(0,x.Y)(le.A,{name:"lock-badge",className:he})]}),(0,x.Y)("span",{className:Ae,children:a("MoreSimilar")})]})}const Fe=(0,n.ph)((0,o.EK)(((e,{chatId:t})=>{const{similarChannelIds:i,isExpanded:n,count:o}=(0,d.dg4)(e,t)||{},s=(0,d.g29)(e),r=(0,d.AWZ)(e,t);return{similarChannelIds:i,isExpanded:n,count:o,isCurrentUserPremium:s,channelJoinInfo:r?.joinInfo}}))((({chatId:e,similarChannelIds:t,isExpanded:i,count:s,isCurrentUserPremium:r,channelJoinInfo:a})=>{const{toggleChannelRecommendations:c,loadChannelRecommendations:l}=(0,o.ko)(),u=(0,ce.A)(),[m,f,g]=(0,I.A)(!1),[p,A,v]=(0,I.A)(!1),C=(0,n.li)(),F=(0,n.li)(!1),y=(0,n.Kr)((()=>{if(!t)return;const e=(0,o.mS)();return t.map((t=>(0,d.hds)(e,t))).filter(Boolean)}),[t]),[N,Y]=(0,n.J0)(!1),k=(0,n.Kr)((()=>y?.slice(0,10)),[y]),P=Boolean(k?.length),S=Boolean(!N&&(i||p||m)&&P);(0,ae.A)(C,!S,!0),(0,n.vJ)((()=>{t||l({chatId:e})}),[e,t]),(0,se.A)((()=>Y(!1)),2e3),(0,n.vJ)((()=>{if(N&&y&&i){const e=setTimeout((()=>{Y(!1)}),300);return()=>clearTimeout(e)}}),[y,i,N]),(0,n.vJ)((()=>{i?(f(),v(),Y(!t),F.current||setTimeout((()=>{C.current?.scrollIntoView({behavior:"smooth"})}),150)):(g(),A())}),[i,t]);const G=(0,b.A)((()=>{c({chatId:e})}));if((0,n.vJ)((()=>{a?.joinedDate&&!i&&(0,J.Fm)()-a.joinedDate<=10&&(G(),F.current=!0)}),[a,i]),S||N)return(0,x.FD)("div",{className:(0,h.A)("V3RHiOJR"),children:[N&&(0,x.Y)(ue.A,{className:"xKVZv7KE"}),S&&(0,x.FD)("div",{className:(0,h.A)(m&&"eb8rX09E",p&&"XR6_qLCc"),children:[(0,x.Y)("div",{className:"tfG_BSDt",children:(0,x.Y)("svg",{width:"19",height:"7",viewBox:"0 0 19 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,x.Y)("path",{className:"HVbeGv4t","fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 7C16.8992 7 13.59 3.88897 11.5003 1.67424C10.7648 0.894688 10.397 0.50491 10.0434 0.385149C9.70568 0.270811 9.4225 0.270474 9.08456 0.38401C8.73059 0.50293 8.36133 0.892443 7.62279 1.67147C5.52303 3.88637 2.18302 7 0 7L19 7Z",fill:"white"})})}),(0,x.FD)("div",{className:"njAC8dR9",children:[(0,x.FD)("div",{className:"s7QOi22Q",children:[(0,x.Y)("span",{className:"JstcOhAN",children:u("SimilarChannels")}),(0,x.Y)(de.A,{className:"meewH7t_",color:"translucent",onClick:G,children:(0,x.Y)(le.A,{name:"close"})})]}),(0,x.Y)("div",{ref:C,className:(0,h.A)("h4gWlNen","no-scrollbar"),children:k?.map(((t,i)=>9===i?(0,x.Y)(be,{channel:t,chatId:e,channelsCount:s-10+1,isCurrentUserPremium:r}):(0,x.Y)(Ce,{channel:t})))})]})]})]})}))),ye=new Set(["pinMessage","chatEditPhoto","chatDeletePhoto","unsupported"]),Ne=new Set(["giftCode","prizeStars","suggestProfilePhoto"]),Ye=(0,n.ph)((0,o.EK)(((e,{message:t,threadId:i})=>{const n=(0,d.nTw)(e),{themes:o}=e.settings,r=(0,d.hds)(e,t.chatId),a=(0,d.Y7C)(e,t),c=r?.isForum&&i!==s.l3,{replyToMsgId:u,replyToPeerId:h}=(0,l.Q)(t)||{},m=u?(0,d.O5q)(e,h||t.chatId,u):void 0,f=!!i&&(0,d.nJv)(e,t,i),{direction:g,noHighlight:p,isResizingContainer:A,scrollTargetPosition:v}=f&&n.focusedMessage||{},I=(0,d.g29)(e),C=r?.unreadReactions?.includes(t.id),b=(0,d.trm)(e);return{sender:a,currentUserId:e.currentUserId,isCurrentUserPremium:I,isFocused:f,focusDirection:g,noFocusHighlight:p,isInsideTopic:c,replyMessage:m,isInSelectMode:(0,d.rTV)(e),patternColor:o[(0,d.SJA)(e)]?.patternColor,hasUnreadReaction:C,isResizingContainer:A,scrollTargetPosition:v,isAccountFrozen:b}}))((({message:e,threadId:t,sender:i,currentUserId:s,appearanceOrder:d,isJustAdded:P,isLastInList:S,memoFirstUnreadIdRef:T,getIsMessageListReady:U,isInsideTopic:B,isFocused:D,focusDirection:M,noFocusHighlight:L,replyMessage:V,patternColor:z,isCurrentUserPremium:J,isInSelectMode:K,hasUnreadReaction:j,isResizingContainer:O,scrollTargetPosition:q,onIntersectPinnedMessage:H,observeIntersectionForBottom:$,observeIntersectionForLoading:Q,observeIntersectionForPlaying:Z,isAccountFrozen:_})=>{const{requestConfetti:ee,openMediaViewer:te,getReceipt:se,checkGiftCode:re,openPrizeStarsTransactionFromGiveaway:ae,openPremiumModal:ce,openStarsTransactionFromGift:le,openGiftInfoModalFromMessage:de,toggleChannelRecommendations:ue,animateUnreadReaction:he,markMentionsRead:me}=(0,o.ko)(),fe=(0,n.li)(),{id:ge,chatId:pe}=e,Ae=e.content.action,ve=(0,m.iL)(ge),Ie=Ne.has(Ae.type),Ce=ye.has(Ae.type),be=u.uH&&!Ce,Ye=(0,l.Q)(e),{replyToMsgId:ke,replyToPeerId:Pe}=Ye||{},Se=Boolean(e.areReactionsPossible&&e?.reactions?.results?.length),Ge=B&&"topicCreate"===Ae.type,{isTouchScreen:xe}=(0,p.Ay)();(0,C.mv)(fe,Ge?void 0:$),(0,F.A)(fe,!Ge&&S&&"channelJoined"!==Ae.type),(0,v.A)(Pe||pe,ke,V,ge),(0,Y.A)({elementRef:fe,chatId:pe,isFocused:D,focusDirection:M,noFocusHighlight:L,isResizingContainer:O,isJustAdded:P,scrollTargetPosition:q}),(0,n._W)((()=>{e.isPinned&&H?.({viewportPinnedIdsToRemove:[e.id]})}));const{isContextMenuOpen:Te,contextMenuAnchor:we,handleBeforeContextMenu:Ue,handleContextMenu:Be,handleContextMenuClose:De,handleContextMenuHide:Me}=(0,A.A)(fe,xe&&K||_,!u.cp,u.Ni,U),Re=void 0!==we,Le=d<=0,[Ve,Ee]=(0,I.A)(Le);(0,n.vJ)((()=>{Le||setTimeout(Ee,d*a.zq7)}),[d,Ee,Le]);const{ref:ze}=(0,y.A)({isOpen:Ve,noOpenTransition:Le,noCloseTransition:!0,className:!1,ref:fe});(0,n.vJ)((()=>{const t=fe.current;t&&(0,f.Y)(t)&&(j&&he({messageIds:[ge]}),e.hasUnreadMention&&me({chatId:pe,messageIds:[ge]}))}),[j,pe,ge,he,e.hasUnreadMention]),(0,n.vJ)((()=>{"giftPremium"===Ae.type&&(T?.current&&ge>=T.current||ve)&&ee({})}),[Ae.type,ge,ve,T]);const Je=(0,N.A)(be?z:void 0),Ke=(0,b.A)((()=>{switch(Ae.type){case"paymentSent":case"paymentRefunded":se({chatId:e.chatId,messageId:e.id});break;case"chatEditPhoto":te({chatId:e.chatId,messageId:e.id,threadId:t,origin:r.TQ.ChannelAvatar});break;case"giftCode":re({slug:Ae.slug,message:{chatId:e.chatId,messageId:e.id}});break;case"prizeStars":ae({chatId:e.chatId,messageId:e.id});break;case"giftPremium":ce({isGift:!0,fromUserId:i?.id,toUserId:i&&i.id===s?pe:s,monthsAmount:Ae.months});break;case"giftStars":le({chatId:e.chatId,messageId:e.id});break;case"starGift":case"starGiftUnique":de({chatId:e.chatId,messageId:e.id});break;case"channelJoined":ue({chatId:pe})}})),je=(0,n.Kr)((()=>{switch(Ae.type){case"chatEditPhoto":if(!Ae.photo)return;return(0,x.Y)(w,{action:Ae,observeIntersection:Q,onClick:Ke});case"suggestProfilePhoto":return(0,x.Y)(ie,{message:e,action:Ae,observeIntersection:Q});case"prizeStars":case"giftCode":return(0,x.Y)(E,{action:Ae,observeIntersectionForLoading:Q,observeIntersectionForPlaying:Z,onClick:Ke});case"giftPremium":case"giftStars":return(0,x.Y)(R,{action:Ae,observeIntersectionForLoading:Q,observeIntersectionForPlaying:Z,onClick:Ke});case"starGift":return(0,x.Y)(W,{action:Ae,message:e,observeIntersectionForLoading:Q,observeIntersectionForPlaying:Z,onClick:Ke});case"starGiftUnique":return(0,x.Y)(X,{action:Ae,message:e,observeIntersectionForLoading:Q,observeIntersectionForPlaying:Z,onClick:Ke});case"channelJoined":return(0,x.Y)(Fe,{chatId:e.chatId});default:return}}),[Ae,Q,e,Z]);if(!(B&&"topicCreate"===Ae.type||"phoneCall"===Ae.type))return(0,x.FD)("div",{ref:ze,id:(0,c.GZ)(ge),className:(0,h.A)("ActionMessage","message-list-item",G.A.root,Ce&&G.A.singleLine,be&&G.A.fluidMultiline,je&&G.A.hasFullContent,D&&!L&&"focused",Re&&"has-menu-open",S&&"last-in-list"),"data-message-id":e.id,"data-is-pinned":e.isPinned||void 0,"data-has-unread-mention":e.hasUnreadMention||void 0,"data-has-unread-reaction":j||void 0,onMouseDown:e=>{(0,g.l)(e),Ue(e)},onContextMenu:Be,children:[!Ie&&(0,x.FD)(x.FK,{children:[be&&(0,x.Y)("div",{className:G.A.inlineWrapper,children:(0,x.Y)("span",{className:G.A.fluidBackground,style:Je,children:(0,x.Y)(k.A,{message:e,isInsideTopic:B})})}),(0,x.Y)("div",{className:G.A.inlineWrapper,children:(0,x.Y)("span",{className:G.A.textContent,onClick:Ke,children:(0,x.Y)(k.A,{message:e,isInsideTopic:B})})})]}),je,we&&(0,x.Y)(ne.A,{isOpen:Te,anchor:we,message:e,messageListType:"thread",className:G.A.contextContainer,onClose:De,onCloseAnimationEnd:Me}),Se&&(0,x.Y)(oe.A,{isOutside:!0,message:e,threadId:t,observeIntersection:Z,isCurrentUserPremium:J,isAccountFrozen:_})]})})))},25404:(e,t,i)=>{i.d(t,{A:()=>f});var n=i(84051),o=i(13439),s=i(31481),r=i(85982),a=i(17663),c=i(80140),l=i(39351),d=i(17712),u=i(59030),h=i(24433),m=i(20021);const f=(0,n.ph)((({peerId:e,canManage:t,gift:i,currentUserEmojiStatus:f,collectibleEmojiStatuses:g})=>{const{showNotification:p,openChatWithDraft:A,openGiftTransferModal:v,openGiftResalePriceComposerModal:I,openGiftStatusInfoModal:C,setEmojiStatus:b,toggleSavedGiftPinned:F,changeGiftVisibility:y,updateStarGiftPrice:N,closeGiftInfoModal:Y}=(0,o.ko)(),k=(0,l.A)(),P=(0,u.A)(),S=i&&"gift"in i,G=S?i:void 0,x=S?i.gift:i,T="starGiftUnique"===x?.type?x.slug:void 0,w=(0,n.Kr)((()=>{if(T)return`${s.jsp}nft/${T}`}),[T]),U=(0,n.Kr)((()=>{if(T)return g?.find((e=>"collectible"===e.type&&e.slug===T))}),[T,g]),B="collectible"===f?.type?f.slug:void 0,D=x&&"starGiftUnique"===x.type,M=D&&B===x.slug,R=U&&!M,L=D?x.resellPriceInStars:void 0,V=t&&G&&!G.isUnsaved&&D,E=(0,d.A)((()=>{const{inputGift:e,isUnsaved:t}=G;y({gift:e,shouldUnsave:!t})})),z=(0,d.A)((()=>{w&&((0,r.eM)(w),p({message:k("LinkCopied")}))})),J=(0,d.A)((()=>{w&&A({text:{text:w}})})),K=(0,d.A)((()=>{G&&"starGiftUnique"===G?.gift.type&&(G.canTransferAt&&G.canTransferAt>(0,c.Fm)()?p({message:{key:"NotificationGiftCanTransferAt",variables:{date:(0,a.U)(P,1e3*G.canTransferAt)}}}):v({gift:G}))})),j=(0,d.A)((()=>{G&&(G.canResellAt&&G.canResellAt>(0,c.Fm)()?p({message:{key:"NotificationGiftCanResellAt",variables:{date:(0,a.U)(P,1e3*G.canResellAt)}}}):I({peerId:e,gift:G}))})),O=(0,d.A)((()=>{G&&"starGiftUnique"===G.gift.type&&G.inputGift&&(Y(),N({gift:G.inputGift,price:0}),p({icon:"unlist-outline",message:{key:"NotificationGiftIsUnlist",variables:{gift:k("GiftUnique",{title:G.gift.title,number:G.gift.number})}}}))})),q=(0,d.A)((()=>{"starGiftUnique"===x?.type&&U&&C({emojiStatus:U})})),W=(0,d.A)((()=>{M&&b({emojiStatus:{type:"regular",documentId:s.zNY}})})),H=(0,d.A)((()=>{F({peerId:e,gift:G})}));return(0,m.FD)(m.FK,{children:[V&&(0,m.Y)(h.A,{icon:G.isPinned?"unpin":"pin",onClick:H,children:k(G.isPinned?"ChatListUnpinFromTop":"ChatListPinToTop")}),(0,m.Y)(h.A,{icon:"link-badge",onClick:z,children:k("CopyLink")}),(0,m.Y)(h.A,{icon:"forward",onClick:J,children:k("Share")}),t&&D&&(0,m.Y)(h.A,{icon:"diamond",onClick:K,children:k("GiftInfoTransfer")}),t&&D&&!L&&(0,m.Y)(h.A,{icon:"sell-outline",onClick:j,children:k("Sell")}),t&&D&&Boolean(L)&&(0,m.Y)(h.A,{icon:"unlist-outline",onClick:O,children:k("GiftInfoUnlist")}),t&&G&&(0,m.Y)(h.A,{icon:G.isUnsaved?"eye-outline":"eye-crossed-outline",onClick:E,children:k(G.isUnsaved?"GiftActionShow":"GiftActionHide")}),R&&(0,m.Y)(h.A,{icon:"crown-wear-outline",onClick:q,children:k("GiftInfoWear")}),M&&(0,m.Y)(h.A,{icon:"crown-take-off-outline",onClick:W,children:k("GiftInfoTakeOff")})]})}))},48196:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(84051),o=i(31481),s=i(28470),r=i(20021);const a=new Map;class c{referenceCount=0;constructor(e){this.color=e,this.filterId=`fluid-background-filter-${e.slice(1)}`,(0,s.z)((0,r.FD)("filter",{"color-interpolation-filters":"sRGB",xmlns:o.jNX,children:[(0,r.Y)("feGaussianBlur",{in:"SourceAlpha",stdDeviation:"4",result:"blur"}),(0,r.Y)("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 30 -15",result:"goo"}),(0,r.Y)("feComposite",{in:"SourceAlpha",in2:"goo",operator:"over",result:"outline"}),(0,r.Y)("feFlood",{"flood-color":e,result:"color"}),(0,r.Y)("feComposite",{in:"color",in2:"outline",operator:"in"})]}),this.filterId)}getFilterId(){return this.referenceCount+=1,this.filterId}removeReference(){this.referenceCount-=1,0===this.referenceCount&&(0,s.e)(this.filterId)}isUsed(){return this.referenceCount>0}}function l(e,t){if((0,n.vJ)((()=>{if(e)return()=>{const t=a.get(e);t&&(t.removeReference(),t.isUsed()||a.delete(t.color))}}),[e]),!e)return;if(a.has(e))return d(a.get(e).getFilterId(),t);const i=new c(e);return a.set(e,i),d(i.getFilterId(),t)}function d(e,t){return t?`url(#${e})`:`filter: url(#${e});`}},87049:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(84051),o=i(13439),s=i(29807),r=i(87357),a=i(14745);const c={root:"AmQSvxpZ",text:"pQW7dcwr"};var l=i(20021);const d={red:[["#FF5B54","#ED1C26"],["#653633","#532224"]],blue:[["#6ED2FF","#34A4FC"],["#344F5A","#152E42"]],purple:[["#E367D7","#757BF6"],["#E367D7","#757BF6"]],green:[["#52D553","#4BB121"],["#52D553","#4BB121"]]},u=new Set(Object.keys(d)),h=(0,n.ph)((0,o.EK)((e=>({theme:(0,s.SJA)(e)})))((({text:e,color:t,className:i,theme:n})=>{const o=`svg-${(0,a.A)()}`,s=u.has(t)?t:void 0,h="dark"===n,m=Array.isArray(t)?t:s?d[s][h?1:0]:void 0,f=m?m[0]:t,g=m?m[1]:t;return(0,l.FD)("div",{className:(0,r.A)(c.root,i),children:[(0,l.FD)("svg",{className:c.ribbon,width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",children:[(0,l.Y)("path",{d:"M52.4851 26.4853L29.5145 3.51472C27.2641 1.26428 24.2119 0 21.0293 0H2.82824C1.04643 0 0.154103 2.15429 1.41403 3.41422L52.5856 54.5858C53.8455 55.8457 55.9998 54.9534 55.9998 53.1716V34.9706C55.9998 31.788 54.7355 28.7357 52.4851 26.4853Z",fill:`url(#${o})`}),(0,l.Y)("defs",{children:(0,l.FD)("linearGradient",{id:o,x1:"27.9998",y1:"1",x2:"27.9998",y2:"55",gradientUnits:"userSpaceOnUse",children:[(0,l.Y)("stop",{"stop-color":f}),(0,l.Y)("stop",{offset:"1","stop-color":g})]})})]}),(0,l.Y)("div",{className:c.text,children:e})]})})))},92108:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(84051),o=i(87357);var s=i(20021);const r=(0,n.ph)((({data:e,style:t,className:i,valueClassName:n,keyClassName:r})=>(0,s.Y)("div",{className:(0,o.A)("cKr8J5k_",i),style:t,children:e.map((([e,t])=>(0,s.FD)(s.FK,{children:[(0,s.Y)("div",{className:(0,o.A)("c9RLLvfs",r),children:e}),(0,s.Y)("div",{className:(0,o.A)("QEuGpzIc",n),children:t})]})))})))}}]);
|
|
//# sourceMappingURL=1006.f35597132364f7a057f6.js.map
|