2 lines
22 KiB
JavaScript
2 lines
22 KiB
JavaScript
"use strict";(self.webpackChunkmontana_messenger=self.webpackChunkmontana_messenger||[]).push([[4727],{21849(e,t,r){r.d(t,{A:()=>k,R:()=>T});var o=r(84051),s=r(13439),n=r(23174),i=r(31481),a=r(90709),c=r(70636),d=r(87357),l=r(95807),u=r(48899),p=r(14242),f=r(76023),m=r(4961),y=r(11217),h=r(17712),g=r(62587),v=r(37960),I=r(59030),S=r(39996),b=r(65843),A=r(88554),w=r(18276),C=r(20021);const T={micro:f.$,mini:1.5*f.$,tiny:2*f.$,small:2.125*f.$,medium:2.75*f.$,large:3.375*f.$,giant:5.625*f.$,jumbo:7.5*f.$},P=(0,d.x)("Avatar");P.media=P("media"),P.icon=P("icon");const k=(0,o.ph)(({className:e,style:t,size:r="large",peer:f,photo:k,webPhoto:N,previewUrl:M,text:B,isSavedMessages:F,isSavedDialog:D,withVideo:K,withStory:O,forPremiumPromo:U,withStoryGap:x,withStorySolid:$,storyColors:V,forceFriendStorySolid:z,forceUnreadStorySolid:G,storyViewerOrigin:Y,storyViewerMode:E="single-peer",loopIndefinitely:L,noPersonalPhoto:j,asMessageBubble:W,storyCircleStyle:R,onClick:J,onContextMenu:Q,onMouseMove:Z})=>{const{openStoryViewer:_}=(0,s.ko)(),q=(0,o.li)(),H=(0,o.li)(0),X=f&&"isCustomPeer"in f,ee=f&&!X?f:void 0,te=ee&&(0,c.mO)(ee)?ee:void 0,re=ee&&(0,c.vj)(ee)?ee:void 0,oe=te&&(0,a.PL)(te),se=ee&&(0,a.kE)(ee.id),ne=ee&&(0,a.Qe)(ee.id),ie=re?.isForum,ae=(0,a.Zg)(f,!0),ce=void 0!==ae?(0,S.yp)(ae):void 0,de=O&&"disabled"!==E&&ee?.hasStories;let le,ue;const pe="number"==typeof r?r:T[r],fe=K&&k?.isVideo,me=pe>=T.jumbo;F||oe||(te&&!j||re?le=(0,a.cP)(f,me?"big":void 0):k?(le=`photo${k.id}?size=m`,k.isVideo&&K&&(ue=(0,a.Pg)(k))):N&&(le=(0,a.cy)(N)));const ye=(0,o.Kr)(()=>X?f.avatarIcon:F?D?"my-notes":"avatar-saved-messages":oe?"avatar-deleted-account":se?"reply-filled":ne?"author-hidden":void 0,[X,F,oe,se,ne,f,D]),he=(0,g.A)(le,!1,n.qZ.BlobUrl),ge=(0,g.A)(ue,!fe,n.qZ.BlobUrl),ve=he||M,Ie=Boolean(ve||ge),Se=Boolean(ge&&fe),{ref:be}=(0,v.A)({hasMediaData:Ie}),Ae=(0,h.A)(e=>{const t=e.currentTarget;ge&&(L||(H.current+=1,H.current>=3&&(t.style.display="none")))}),we=(0,I.A)();let Ce;const Te=te?(0,a.Yg)(te):re?(0,a.Js)(we,re):B;if(ye)Ce=(0,C.Y)(w.A,{name:ye,className:P.icon,role:"img",ariaLabel:Te});else if(Ie)Ce=(0,C.FD)(C.FK,{children:[(0,C.Y)("img",{ref:be,src:ve,className:(0,d.A)(P.media,"avatar-media",ge&&"poster"),alt:Te,decoding:"async",draggable:!1}),Se&&(0,C.Y)(b.A,{canPlay:!0,src:ge,className:(0,d.A)(P.media,"avatar-media","poster"),muted:!0,loop:L,autoPlay:!0,disablePictureInPicture:!0,playsInline:!0,draggable:!1,onEnded:Ae})]});else if(te){const e=(0,a.Yg)(te);Ce=e?(0,p.Qh)(e,2):void 0}else if(re){const e=(0,a.Js)(we,re);Ce=e&&(0,p.Qh)(e,(0,u.L8)(re.id)?2:1)}else if(X){const e=f.title||we(f.titleKey);Ce=e&&(0,p.Qh)(e,1)}else B&&(Ce=(0,p.Qh)(B,2));const Pe=X&&f.isAvatarSquare||ie&&!((O||$)&&ee?.hasStories),ke=X&&f.withPremiumGradient,Ne=X&&f.customPeerAvatarColor,Me=(0,d.A)("Avatar",e,"string"==typeof r&&`size-${r}`,ce,!f&&B&&"hidden-user",F&&"saved-messages",ne&&"anonymous-forwards",oe&&"deleted-account",se&&"replies-bot-account",ke&&"premium-gradient-bg",Pe&&"forum",W&&"message-bubble",(k||N)&&"force-fit",(O&&ee?.hasStories||U)&&"with-story-circle",$&&ee?.hasStories&&"with-story-solid",$&&z&&"close-friend",$&&(ee?.hasUnreadStories||G)&&"has-unread-story",(J||de)&&"interactive",!F&&!ve&&"no-photo"),Be=(0,l.A)(`--_size: ${pe}px;`,Ne&&`--color-user: ${Ne}`,t),Fe=Boolean(F||ve),{handleClick:De,handleMouseDown:Ke}=(0,y.Q)(e=>{if(de)return e.stopPropagation(),void _({peerId:ee.id,isSinglePeer:"single-peer"===E,origin:Y});J&&J(e,Fe)});return(0,C.FD)("div",{ref:q,className:Me,id:ee?.id&&O?(0,a.kR)(ee.id):void 0,"data-peer-id":ee?.id,"data-test-sender-id":i.W75?ee?.id:void 0,"aria-label":"string"==typeof Ce?Te:void 0,style:Be,onClick:De,onContextMenu:Q,onMouseDown:Ke,onMouseMove:Z,children:[(0,C.Y)("div",{className:"inner",children:"string"==typeof Ce?(0,C.Y)("span",{className:"letters",children:(0,m.A)(Ce,[me?"hq_emoji":"emoji"])}):Ce}),O&&ee?.hasStories&&(0,C.Y)(A.A,{peerId:ee.id,size:pe,withExtraGap:x,colors:V,style:R})]})})},88554(e,t,r){r.d(t,{$:()=>b,A:()=>S});var o=r(84051),s=r(13439),n=r(11597),i=r(87357),a=r(95807),c=r(76023),d=r(38691),l=r(20021);const u=["#34C578","#3CA3F3"],p=["#C9EB38","#09C167"],f=.125*c.$,m=.25*c.$,y=4*c.$,h=Math.PI/4,g=2*Math.PI*.1,v=h-g/2,I=h+g/2,S=(0,o.ph)((0,s.EK)((e,{peerId:t})=>{const r=(0,n._bp)(e,t),o=(0,n.SJA)(e);return{peerStories:r?.byId,storyIds:r?.orderedIds,lastReadId:r?.lastReadId,appTheme:o}})(function({size:e,className:t,peerStories:r,storyIds:s,lastReadId:n,withExtraGap:h,appTheme:g,colors:v,style:I}){const S=(0,o.li)(),A=(0,d.A)(),w=e>y,C=w?m:f,T=e+C+(w?.25*c.$:0),P=(0,o.Kr)(()=>(s||[]).reduce((e,t)=>(e.total+=1,n&&t<=n&&(e.read+=1),e),{total:0,read:0}),[n,s]),k=(0,o.Kr)(()=>!(!r||!s?.length)&&s.some(e=>{const t=r[e];if(!t||!("isForCloseFriends"in t))return!1;const o=n&&t.id<=n;return t.isForCloseFriends&&!o}),[n,r,s]);if((0,o.Nf)(()=>{S.current&&b({canvas:S.current,size:T,strokeWidth:C,segmentsCount:P.total,colorStops:v||(k?p:u),readSegmentsCount:P.read,withExtraGap:h,readSegmentColor:"dark"===g?"#737373":"#C4C9CC",dpr:A})},[g,k,T,P.read,P.total,h,A,v,e,C]),P.total)return(0,l.Y)("canvas",{ref:S,className:(0,i.A)("story-circle",t),style:(0,a.A)(`max-width: ${T}px`,`max-height: ${T}px`,I)})}));function b({canvas:e,size:t,strokeWidth:r=f,colorStops:o,segmentsCount:s,readSegmentsCount:n=0,withExtraGap:i=!1,readSegmentColor:a,dpr:c}){s>45&&(n=Math.round(n*(45/s)),s=45);const d=c,l=c,u=e.getContext("2d");if(!u)return;const p=t*d,m=r*l;e.width=p,e.height=p;const y=p/2,h=(p-m)/2,g=2*Math.PI/s,S=2*Math.PI*.02,b=u.createLinearGradient(0,0,Math.ceil(p*Math.cos(Math.PI/2)),Math.ceil(p*Math.sin(Math.PI/2)));1===o.length?(b.addColorStop(0,o[0]),b.addColorStop(1,o[0])):o.forEach((e,t)=>{b.addColorStop(t/(o.length-1),e)}),u.lineCap="round",u.clearRect(0,0,p,p),Array.from({length:s}).forEach((e,t)=>{const r=t<n;let o=t*g-Math.PI/2+S/2,c=o+g-(s>1?S:0);if(u.strokeStyle=r?a:b,u.lineWidth=m*(r?.5:1),i){if(o>=v&&c<=I)return;o<v&&c>I?(u.beginPath(),u.arc(y,y,h,I,c),u.stroke(),c=v):o<v&&c>v?c=v:o<I&&c>I&&(o=I)}u.beginPath(),u.arc(y,y,h,o,c),u.stroke()})}},2578(e,t,r){r.d(t,{A:()=>i});var o=r(84051),s=r(39351),n=r(20021);const i=(0,o.ph)(({fakeType:e})=>{const t=(0,s.A)();return(0,n.Y)("span",{className:"FakeIcon",children:t("fake"===e?"FakeMessage":"ScamMessage")})})},34431(e,t,r){r.d(t,{A:()=>w});var o=r(84051),s=r(13439),n=r(31481),i=r(90709),a=r(70636),c=r(87357),d=r(95807),l=r(85982),u=r(83868),p=r(4961),f=r(39351),m=r(17712),y=r(59030),h=r(41036),g=r(87412),v=r(2578),I=r(95773),S=r(9267),b=r(20021);const A=()=>(0,b.FD)("svg",{className:"VerifiedIcon",viewBox:"0 0 24 24",children:[(0,b.Y)("path",{d:"M12.3 2.9c.1.1.2.1.3.2.7.6 1.3 1.1 2 1.7.3.2.6.4.9.4.9.1 1.7.2 2.6.2.5 0 .6.1.7.7.1.9.1 1.8.2 2.6 0 .4.2.7.4 1 .6.7 1.1 1.3 1.7 2 .3.4.3.5 0 .8-.5.6-1.1 1.3-1.6 1.9-.3.3-.5.7-.5 1.2-.1.8-.2 1.7-.2 2.5 0 .4-.2.5-.6.6-.8 0-1.6.1-2.5.2-.5 0-1 .2-1.4.5-.6.5-1.3 1.1-1.9 1.6-.3.3-.5.3-.8 0-.7-.6-1.4-1.2-2-1.8-.3-.2-.6-.4-.9-.4-.9-.1-1.8-.2-2.7-.2-.4 0-.5-.2-.6-.5 0-.9-.1-1.7-.2-2.6 0-.4-.2-.8-.4-1.1-.6-.6-1.1-1.3-1.6-2-.4-.4-.3-.5 0-1 .6-.6 1.1-1.3 1.7-1.9.3-.3.4-.6.4-1 0-.8.1-1.6.2-2.5 0-.5.1-.6.6-.6.9-.1 1.7-.1 2.6-.2.4 0 .7-.2 1-.4.7-.6 1.4-1.2 2.1-1.7.1-.2.3-.3.5-.2z",style:"fill: var(--color-fill)"}),(0,b.Y)("path",{d:"M16.4 10.1l-.2.2-5.4 5.4c-.1.1-.2.2-.4 0l-2.6-2.6c-.2-.2-.1-.3 0-.4.2-.2.5-.6.7-.6.3 0 .5.4.7.6l1.1 1.1c.2.2.3.2.5 0l4.3-4.3c.2-.2.4-.3.6 0 .1.2.3.3.4.5.2 0 .3.1.3.1z",style:"fill: var(--color-checkmark)"})]}),w=(0,o.ph)(({className:e,style:t,peer:r,noVerified:w,noFake:C,withEmojiStatus:T,emojiStatusSize:P,isSavedMessages:k,isSavedDialog:N,noLoopLimit:M,canCopyTitle:B,iconElement:F,isMonoforum:D,monoforumBadgeClassName:K,withStatusTextColor:O,onEmojiStatusClick:U,observeIntersection:x})=>{const{showNotification:$}=(0,s.ko)(),V=(0,y.A)(),z=(0,f.A)(),G="id"in r?r:void 0,Y="isCustomPeer"in r?r:void 0,E=G&&(0,a.mO)(G),L=G&&(E?(0,i.Yg)(G):(0,i.Js)(V,G)),j=E&&G.isPremium||Y?.isPremium,W=T&&!k,R=G?.emojiStatus||(Y?.emojiStatusId?{type:"regular",documentId:Y.emojiStatusId}:void 0),J=(0,m.A)(e=>{L&&B&&((0,u.A)(e),(0,l.eM)(L),$({message:(E?"User":"Chat")+" name was copied"}))}),Q=(0,o.Kr)(()=>Y?(0,p.A)(Y.title||V(Y.titleKey)):k?V(N?"MyNotes":"SavedMessages"):(0,i.Qe)(G.id)?V("AnonymousForward"):(0,i.kE)(G.id)?V("RepliesTitle"):(0,i.Rl)(G.id)?V("VerifyCodesNotifications"):void 0,[Y,N,k,V,G]),Z=k||N?void 0:G?.botVerificationIconId;return(0,b.FD)("div",{className:(0,c.A)("title","QljEeKI5",e),style:(0,d.A)(P?`--_status-size: ${P}px`:void 0,t),children:[Z&&(0,b.Y)(g.A,{documentId:Z,size:P,loopLimit:M?void 0:n.J$1,observeIntersectionForLoading:x}),(0,b.Y)("h3",{dir:"auto",role:"button",className:(0,c.A)("fullName","AS54Cntu",B&&"vr53L_9p"),onClick:J,children:Q||(0,p.A)(L||"")}),!F&&r&&(0,b.FD)(b.FK,{children:[!w&&r?.isVerified&&(0,b.Y)(A,{}),!C&&r?.fakeType&&(0,b.Y)(v.A,{fakeType:r.fakeType}),W&&R&&(0,b.Y)(h.Ay,{className:"KBZgFSv7",slideClassName:"xmVxyvNy",activeKey:Number(R.documentId),name:"slideFade",direction:-1,shouldCleanup:!0,children:(0,b.Y)(I.A,{withSparkles:"collectible"===R.type,sparklesClassName:"statusSparkles",sparklesColor:"collectible"!==R.type||O?void 0:R.textColor,children:(0,b.Y)(g.A,{className:(0,c.A)("no-selection",!O&&"z1sLOAjr"),documentId:R.documentId,size:P,loopLimit:M?void 0:n.J$1,observeIntersectionForLoading:x,onClick:U})})}),W&&!R&&j&&(0,b.Y)(S.A,{}),D&&(0,b.Y)("div",{className:(0,c.A)("Sdwfc851",K),children:z("MonoforumBadge")})]}),F]})})},95773(e,t,r){r.d(t,{A:()=>c});var o=r(84051),s=r(87357),n=r(95807),i=r(85118);var a=r(20021);const c=(0,o.ph)(({children:e,ref:t,className:r,style:c,withSparkles:d,sparklesClassName:l,sparklesColor:u,glowColor:p,onClick:f})=>{let m=(0,o.li)();return t&&(m=t),(0,a.FD)("div",{ref:m,className:(0,s.A)("Z9JWyzAs",r),style:(0,n.A)(p&&`--glow-color: ${p}`,c),onClick:f,children:[d&&(0,a.Y)(i.A,{preset:"button",className:(0,s.A)("fQBp2vKr",l),style:(0,n.A)(u&&`color: ${u}`)}),e]})})},86046(e,t,r){r.d(t,{D5:()=>m,HT:()=>c,M6:()=>f,MA:()=>d,Pc:()=>l,ZF:()=>p,hk:()=>u,j6:()=>y,jA:()=>a});var o=r(31481),s=r(27102),n=r(17142),i=r(11597);function a(e,t){if("slug"===t.type)return t;if("stargiftResale"===t.type){const{slug:r,peerId:o}=t,s=(0,i.PVB)(e,o);if(!s)return;return{type:"stargiftResale",slug:r,peer:s,currency:t.currency}}if("stargift"===t.type){const{peerId:r,shouldHideName:o,giftId:s,message:n,shouldUpgrade:a}=t,c=(0,i.PVB)(e,r);if(!c)return;return{type:"stargift",peer:c,shouldHideName:o,giftId:s,message:n,shouldUpgrade:a}}if("starsgift"===t.type){const{userId:r,stars:o,amount:s,currency:n}=t,a=(0,i.mBe)(e,r);if(!a)return;return{type:"stars",purpose:{type:"starsgift",user:a,stars:o,amount:s,currency:n}}}if("stars"===t.type){const{stars:r,amount:o,currency:s,spendPurposePeerId:n}=t;return{type:"stars",purpose:{type:"stars",stars:r,amount:o,currency:s,spendPurposePeer:n?(0,i.PVB)(e,n):void 0}}}if("chatInviteSubscription"===t.type){const{hash:e}=t;return{type:"chatInviteSubscription",hash:e}}if("message"===t.type){const r=(0,i.hds)(e,t.chatId);if(!r)return;return{type:"message",chat:r,messageId:t.messageId}}if("premiumGiftStars"===t.type){const{months:r,userId:o,message:s}=t,n=(0,i.mBe)(e,o);if(!n)return;return{type:"premiumGiftStars",months:r,message:s,user:n}}if("giftcode"===t.type){const{userIds:r,boostChannelId:o,amount:s,currency:n,option:a,message:c}=t;return{type:"giveaway",option:a,purpose:{type:"giftcode",amount:s,currency:n,users:r.map(t=>(0,i.mBe)(e,t)).filter(Boolean),boostChannel:o?(0,i.hds)(e,o):void 0,message:c}}}if("starsgiveaway"===t.type){const{chatId:r,additionalChannelIds:o,amount:s,currency:n,untilDate:a,areWinnersVisible:c,countries:d,isOnlyForNewSubscribers:l,prizeDescription:u,stars:p,users:f}=t,m=(0,i.hds)(e,r);if(!m)return;const y=o?.map(t=>(0,i.hds)(e,t)).filter(Boolean);return{type:"starsgiveaway",purpose:{type:"starsgiveaway",amount:s,currency:n,chat:m,additionalChannels:y,untilDate:a,areWinnersVisible:c,countries:d,isOnlyForNewSubscribers:l,prizeDescription:u,stars:p,users:f}}}if("giveaway"===t.type){const{chatId:r,additionalChannelIds:o,amount:s,currency:n,option:a,untilDate:c,areWinnersVisible:d,countries:l,isOnlyForNewSubscribers:u,prizeDescription:p}=t,f=(0,i.hds)(e,r);if(!f)return;const m=o?.map(t=>(0,i.hds)(e,t)).filter(Boolean);return{type:"giveaway",option:a,purpose:{type:"giveaway",amount:s,currency:n,chat:f,additionalChannels:m,untilDate:c,areWinnersVisible:d,countries:l,isOnlyForNewSubscribers:u,prizeDescription:p}}}if("stargiftUpgrade"===t.type){const{inputSavedGift:r,shouldKeepOriginalDetails:o}=t,s=c(e,r);if(!s)return;return{type:"stargiftUpgrade",inputSavedGift:s,shouldKeepOriginalDetails:o}}if("stargiftTransfer"===t.type){const{inputSavedGift:r,recipientId:o}=t,s=c(e,r),n=(0,i.PVB)(e,o);if(!s||!n)return;return{type:"stargiftTransfer",inputSavedGift:s,recipient:n}}if("stargiftDropOriginalDetails"===t.type){const{inputSavedGift:r}=t,o=c(e,r);if(!o)return;return{type:"stargiftDropOriginalDetails",inputSavedGift:o}}if("stargiftPrepaidUpgrade"===t.type){const{peerId:r,hash:o}=t,s=(0,i.PVB)(e,r);if(!s)return;return{type:"stargiftPrepaidUpgrade",peer:s,hash:o}}if("stargiftAuctionBid"===t.type){const{giftId:r,bidAmount:o,peerId:s,message:n,shouldHideName:a,isUpdateBid:c}=t;return{type:"stargiftAuctionBid",giftId:r,bidAmount:o,peer:s?(0,i.PVB)(e,s):void 0,message:n,shouldHideName:a,isUpdateBid:c}}}function c(e,t){if("user"===t.type)return t;if("chat"===t.type){const r=(0,i.hds)(e,t.chatId);if(!r)return;return{type:"chat",chat:r,savedId:t.savedId}}}function d(e){return"peer"!==e.peer.type||Boolean(e.isPostsSearch)}function l(e){const{peer:t}=e,r=e.amount.currency===o.ykW;return e.isPostsSearch?{avatarIcon:"search",isCustomPeer:!0,title:"",peerColorId:5}:"appStore"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.AppleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.AppleTopUp.Subtitle",peerColorId:5}:"playMarket"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.GoogleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.GoogleTopUp.Subtitle",peerColorId:3}:"fragment"===t.type?r?{avatarIcon:"fragment",isCustomPeer:!0,titleKey:"Stars.Gift.Received.Title",subtitleKey:"Stars.Intro.Transaction.Gift.UnknownUser",customPeerAvatarColor:"#000000"}:{avatarIcon:"fragment",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.FragmentTopUp.Title",subtitleKey:"Stars.Intro.Transaction.FragmentTopUp.Subtitle",customPeerAvatarColor:"#000000"}:"premiumBot"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Title",subtitleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Subtitle",peerColorId:1,withPremiumGradient:!0}:"ads"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramAds.Title",subtitleKey:"Stars.Intro.Transaction.TelegramAds.Subtitle",peerColorId:2}:"api"===t.type?{avatarIcon:"bots",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramBotApi.Title",subtitleKey:"Stars.Intro.Transaction.TelegramBotApi.Subtitle",peerColorId:4}:{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.Unsupported.Title",subtitleKey:"Stars.Intro.Transaction.Unsupported.Title",peerColorId:0}}function u(e,t){if(t.currency===o.OUy){const r=t.amount+t.nanos/1e9;return r<0?`- ${e.number(Math.abs(r))}`:`+ ${e.number(r)}`}if(t.currency===o.ykW){const r=(0,n.wD)(t.amount),o=Math.abs(r);return r<0?`- ${e.preciseNumber(o)}`:`+ ${e.preciseNumber(o)}`}}function p(e,t){return e.number(t.amount+t.nanos/1e9)}function f(e){const{action:t}=e.content;if("giftStars"===t?.type){const{transactionId:r,stars:s}=t;return{id:r,amount:{currency:o.OUy,amount:s,nanos:0},peer:{type:"peer",id:e.isOutgoing?e.chatId:e.senderId||e.chatId},date:e.date,isGift:!0,isMyGift:e.isOutgoing||void 0}}if("giftTon"===t?.type){const{transactionId:r,cryptoAmount:s}=t;return{id:r,amount:{currency:o.ykW,amount:s},peer:{type:"fragment"},date:e.date,isGift:!0,isMyGift:e.isOutgoing||void 0}}}function m(e){const{action:t}=e.content;if("prizeStars"!==t?.type)return;const{transactionId:r,stars:s,boostPeerId:n}=t;return{id:r,amount:{currency:o.OUy,amount:s,nanos:0},peer:{type:"peer",id:n},date:e.date,giveawayPostId:e.id}}function y(e,t){return(0,s.Lz)(e,t)}},72730(e,t,r){r.d(t,{A:()=>a});var o=r(84051),s=r(46536);const n=".Modal.with-balance-bar",i=(0,s.h)();function a(e,t){const[r,s]=(0,o.J0)(!0);return(0,o.vJ)(()=>{if(!t)return;const r=()=>{s(function(e){if(!e)return!0;const t=e.closest(n);if(!t)return!0;const r=document.querySelectorAll(n);if(r.length<=1)return!0;let o,s=-1/0;return r.forEach(e=>{const t=parseInt(getComputedStyle(e).zIndex,10)||0;t>=s&&(s=t,o=e)}),t===o}(e.current))};r();const o=i.addCallback(r);return i.runCallbacks(),()=>{o(),i.runCallbacks()}},[t,e]),r}},14(e,t,r){r.d(t,{A:()=>s});var o=r(73767);function s(e,t=!1,r=!1){const s=(0,o.A)(e,t);return r||null!=e?e:s}},11217(e,t,r){r.d(t,{Q:()=>n});var o=r(96454),s=r(17712);function n(e){const t=(0,s.A)(t=>{"mousedown"===t.type&&t.button!==o.w3.Main||e(t)});return o.TF?{handleClick:e?t:void 0}:{handleMouseDown:e?t:void 0}}},1455(e,t,r){r.d(t,{A:()=>s});var o=r(84051);function s(e,t,r){const s=(0,o.li)(e);if(t){if(r?.length){const t={};for(const o of r)t[o]=e[o];s.current={...s.current,...t}}}else s.current=e;return s.current}},96374(e,t,r){r.d(t,{A:()=>l});var o=r(84051),s=r(89925),n=r(87894),i=r(30857),a=r(17712),c=r(73767);function d(e,t,r,o){const{length:n}=e,i=o?e.indexOf(o):0,a=t===s.TN.Forwards?i:i+1||n,c=Math.max(0,a-r),d=a+r-1,l=e.slice(Math.max(0,c),d+1);let u,p;switch(t){case s.TN.Forwards:u=a>=0,p=c>=0;break;case s.TN.Backwards:u=a<n,p=d<=n-1}return{newViewportIds:l,areSomeLocal:u,areAllLocal:p,newIsOnTop:l[0]===e[0],fromOffset:c}}const l=(e,t,r=!1,l=30)=>{const u=(0,o.li)(),p=(0,o.li)();if(!p.current&&t&&!r){const{newViewportIds:e,newIsOnTop:r,fromOffset:o}=d(t,s.TN.Forwards,l,t[0]);p.current={viewportIds:e,isOnTop:r,offset:o}}const f=(0,i.A)();r&&(u.current={});const m=(0,c.A)(t),y=(0,c.A)(r);if(!t||r||t===m&&r===y)t||(p.current=void 0);else{const{viewportIds:e,isOnTop:r}=p.current||{},o=e&&!r?e[Math.round(e.length/2)]:void 0,i=o&&t.includes(o)?o:t[0],{offsetId:a=i,direction:c=s.TN.Forwards}=u.current||{},{newViewportIds:f,newIsOnTop:m,fromOffset:y}=d(t,c,l,a);u.current={},e&&(0,n.k)(e,f)||(p.current={viewportIds:f,isOnTop:m,offset:y})}const h=(0,a.A)(({direction:r,noScroll:o})=>{const{viewportIds:i}=p.current||{},a=i?r===s.TN.Backwards?i[i.length-1]:i[0]:void 0;if(!t)return void(e&&e({offsetId:a}));const{newViewportIds:c,areSomeLocal:m,areAllLocal:y,newIsOnTop:h,fromOffset:g}=d(t,r,l,a);!m||i&&(0,n.k)(i,c)||(p.current={viewportIds:c,isOnTop:h,offset:g},f()),!y&&e&&(o||(u.current={...u.current,direction:r,offsetId:a}),e({offsetId:a}))});return r?[t]:[p.current?.viewportIds,h,p.current?.offset]}},37859(e,t,r){r.d(t,{A:()=>s});var o=r(84051);const s=(e,t,r)=>{const s=(0,o.li)();return(0,o.Nf)(()=>{const r=s.current;return s.current=t,e(r||[])},t,r)}},14680(e,t,r){r.d(t,{FD:()=>s,ZJ:()=>i,wb:()=>n});let o=0;function s(){o+=1}function n(){o-=1}function i(){return o>0}},9718(e,t,r){r.d(t,{A:()=>s});var o=r(96454);const s=(e,t)=>{o.pz&&(e.style.overflow="hidden"),void 0!==t&&(e.scrollTop=t),o.pz&&(e.style.overflow="")}},29441(e,t,r){function o(e){function t(t){if("Tab"!==t.key)return;t.preventDefault(),t.stopPropagation();const r=Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!r.length)return;const o=r.findIndex(e=>e.isSameNode(document.activeElement));let s=0;o>=0&&(s=t.shiftKey?o>0?o-1:r.length-1:o<r.length-1?o+1:0),r[s].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}r.d(t,{A:()=>o})},32587(e,t,r){r.d(t,{A:()=>n});const o=[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],s=[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 n(e,t,r,n,i,a,c){if(Number.isNaN(a)||a<1)return;a|=0,Number.isNaN(c)&&(c=1),(c|=0)>3&&(c=3),c<1&&(c=1);const d=e.getImageData(t,r,n,i),l=d.data;let u,p,f,m,y,h,g,v,I,S,b,A,w=n-1,C=i-1,T=a+1,P=[],k=[],N=[],M=o[a],B=s[a],F=[],D=[];for(;c-- >0;){for(A=b=0,y=0;y<i;y++){for(u=l[A]*T,p=l[A+1]*T,f=l[A+2]*T,h=1;h<=a;h++)g=A+((h>w?w:h)<<2),u+=l[g++],p+=l[g++],f+=l[g++];for(m=0;m<n;m++)P[b]=u,k[b]=p,N[b]=f,0==y&&(F[m]=((g=m+T)<w?g:w)<<2,D[m]=(g=m-a)>0?g<<2:0),v=A+F[m],I=A+D[m],u+=l[v++]-l[I++],p+=l[v++]-l[I++],f+=l[v++]-l[I++],b++;A+=n<<2}for(m=0;m<n;m++){for(S=m,u=P[S]*T,p=k[S]*T,f=N[S]*T,h=1;h<=a;h++)S+=h>C?0:n,u+=P[S],p+=k[S],f+=N[S];for(b=m<<2,y=0;y<i;y++)l[b]=u*M>>>B,l[b+1]=p*M>>>B,l[b+2]=f*M>>>B,0==m&&(F[y]=((g=y+T)<C?g:C)*n,D[y]=(g=y-a)>0?g*n:0),v=m+F[y],I=m+D[y],u+=P[v]-P[I],p+=k[v]-k[I],f+=N[v]-N[I],b+=n<<2}}e.putImageData(d,t,r)}}}]);
|
|
//# sourceMappingURL=4727.10afb0dd0f48497abf33.js.map
|