2 lines
17 KiB
JavaScript
2 lines
17 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[213],{2578:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(84051),o=r(39351),s=r(20021);const i=(0,n.ph)(({fakeType:e})=>{const t=(0,o.A)();return(0,s.Y)("span",{className:"FakeIcon",children:t("fake"===e?"FakeMessage":"ScamMessage")})})},9718:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(96454);const o=(e,t)=>{n.pz&&(e.style.overflow="hidden"),void 0!==t&&(e.scrollTop=t),n.pz&&(e.style.overflow="")}},10722:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(84051),o=r(61433),s=r(66644),i=r(96454),a=r(17712);function c(e){e.stopImmediatePropagation(),e.preventDefault(),e.stopPropagation()}const u=(e,t,r,u,d,l)=>{const[p,f]=(0,n.J0)(!1),[m,y]=(0,n.J0)(void 0),[v,g]=(0,n.J0)(void 0),h=(0,a.A)(e=>{t||2!==e.button||(0,s.RK)(()=>{(0,o.YM)(e.target,"no-selection")})}),I=(0,a.A)(e=>{(0,s.RK)(()=>{(0,o.HW)(e.target,"no-selection")}),t||r&&e.target.matches("a[href]")||(e.preventDefault(),e.stopPropagation(),m||(f(!0),y({x:e.clientX,y:e.clientY}),g(e.target)))}),T=(0,a.A)(()=>{f(!1)}),A=(0,a.A)(()=>{y(void 0)});return(0,n.vJ)(()=>{if(t||!i.TF||u||d&&!d())return;const n=e.current;if(!n)return;let o;const s=()=>{o&&(clearTimeout(o),o=void 0)},a=e=>{t||(l&&e.stopPropagation(),s(),o=window.setTimeout(()=>(e=>{s();const{clientX:t,clientY:n,target:o}=e.touches[0];m||r&&o.matches("a[href]")||(document.addEventListener("touchend",e=>{i.pz&&i._7&&setTimeout(()=>{document.removeEventListener("mousedown",c,{capture:!0}),document.removeEventListener("click",c,{capture:!0})},100),c(e)},{once:!0,capture:!0}),i._7&&i.pz&&(document.addEventListener("mousedown",c,{once:!0,capture:!0}),document.addEventListener("click",c,{once:!0,capture:!0})),f(!0),y({x:t,y:n}))})(e),200))};return n.addEventListener("touchstart",a,{passive:!0}),n.addEventListener("touchcancel",s,!0),n.addEventListener("touchend",s,!0),n.addEventListener("touchmove",s,{passive:!0}),()=>{s(),n.removeEventListener("touchstart",a),n.removeEventListener("touchcancel",s,!0),n.removeEventListener("touchend",s,!0),n.removeEventListener("touchmove",s)}},[m,t,u,e,r,d,l]),{isContextMenuOpen:p,contextMenuAnchor:m,contextMenuTarget:v,handleBeforeContextMenu:h,handleContextMenu:I,handleContextMenuClose:T,handleContextMenuHide:A}}},14680:(e,t,r)=>{r.d(t,{FD:()=>o,ZJ:()=>i,wb:()=>s});let n=0;function o(){n+=1}function s(){n-=1}function i(){return n>0}},29441:(e,t,r)=>{function n(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 n=r.findIndex(e=>e.isSameNode(document.activeElement));let o=0;n>=0&&(o=t.shiftKey?n>0?n-1:r.length-1:n<r.length-1?n+1:0),r[o].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}r.d(t,{A:()=>n})},32587:(e,t,r)=>{r.d(t,{A:()=>s});const n=[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],o=[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,r,s,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 u=e.getImageData(t,r,s,i),d=u.data;let l,p,f,m,y,v,g,h,I,T,A,S,w=s-1,b=i-1,C=a+1,N=[],k=[],P=[],O=n[a],B=o[a],K=[],M=[];for(;c-- >0;){for(S=A=0,y=0;y<i;y++){for(l=d[S]*C,p=d[S+1]*C,f=d[S+2]*C,v=1;v<=a;v++)g=S+((v>w?w:v)<<2),l+=d[g++],p+=d[g++],f+=d[g++];for(m=0;m<s;m++)N[A]=l,k[A]=p,P[A]=f,0==y&&(K[m]=((g=m+C)<w?g:w)<<2,M[m]=(g=m-a)>0?g<<2:0),h=S+K[m],I=S+M[m],l+=d[h++]-d[I++],p+=d[h++]-d[I++],f+=d[h++]-d[I++],A++;S+=s<<2}for(m=0;m<s;m++){for(T=m,l=N[T]*C,p=k[T]*C,f=P[T]*C,v=1;v<=a;v++)T+=v>b?0:s,l+=N[T],p+=k[T],f+=P[T];for(A=m<<2,y=0;y<i;y++)d[A]=l*O>>>B,d[A+1]=p*O>>>B,d[A+2]=f*O>>>B,0==m&&(K[y]=((g=y+C)<b?g:b)*s,M[y]=(g=y-a)>0?g*s:0),h=m+K[y],I=m+M[y],l+=N[h]-N[I],p+=k[h]-k[I],f+=P[h]-P[I],A+=s<<2}}e.putImageData(u,t,r)}},34431:(e,t,r)=>{r.d(t,{A:()=>S});var n=r(84051),o=r(13439),s=r(31481),i=r(90709),a=r(70636),c=r(87357),u=r(85982),d=r(83868),l=r(4961),p=r(39351),f=r(17712),m=r(59030),y=r(41036),v=r(87412),g=r(2578),h=r(95773),I=r(9267),T=r(20021);const A=()=>(0,T.FD)("svg",{className:"VerifiedIcon",viewBox:"0 0 24 24",children:[(0,T.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,T.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)"})]}),S=(0,n.ph)(({className:e,style:t,peer:r,noVerified:S,noFake:w,withEmojiStatus:b,emojiStatusSize:C,isSavedMessages:N,isSavedDialog:k,noLoopLimit:P,canCopyTitle:O,iconElement:B,isMonoforum:K,monoforumBadgeClassName:M,withStatusTextColor:D,onEmojiStatusClick:F,observeIntersection:L})=>{const{showNotification:U}=(0,o.ko)(),x=(0,m.A)(),E=(0,p.A)(),V="id"in r?r:void 0,z="isCustomPeer"in r?r:void 0,G=V&&(0,a.mO)(V),Y=V&&(G?(0,i.Yg)(V):(0,i.Js)(x,V)),j=G&&V.isPremium||z?.isPremium,J=b&&!N,W=V?.emojiStatus||(z?.emojiStatusId?{type:"regular",documentId:z.emojiStatusId}:void 0),$=(0,f.A)(e=>{Y&&O&&((0,d.A)(e),(0,u.eM)(Y),U({message:(G?"User":"Chat")+" name was copied"}))}),H=(0,n.Kr)(()=>z?(0,l.A)(z.title||x(z.titleKey)):N?x(k?"MyNotes":"SavedMessages"):(0,i.Qe)(V.id)?x("AnonymousForward"):(0,i.kE)(V.id)?x("RepliesTitle"):(0,i.Rl)(V.id)?x("VerifyCodesNotifications"):void 0,[z,k,N,x,V]),R=V?.botVerificationIconId;return(0,T.FD)("div",{className:(0,c.A)("title","QljEeKI5",e),style:t,children:[R&&(0,T.Y)(v.A,{documentId:R,size:C,loopLimit:P?void 0:s.J$1,observeIntersectionForLoading:L}),(0,T.Y)("h3",{dir:"auto",role:"button",className:(0,c.A)("fullName","AS54Cntu",O&&"vr53L_9p"),onClick:$,children:H||(0,l.A)(Y||"")}),!B&&r&&(0,T.FD)(T.FK,{children:[!S&&r?.isVerified&&(0,T.Y)(A,{}),!w&&r?.fakeType&&(0,T.Y)(g.A,{fakeType:r.fakeType}),J&&W&&(0,T.Y)(y.Ay,{className:"KBZgFSv7",slideClassName:"xmVxyvNy",activeKey:Number(W.documentId),name:"slideFade",direction:-1,shouldCleanup:!0,children:(0,T.Y)(h.A,{withSparkles:"collectible"===W.type,sparklesClassName:"statusSparkles",sparklesColor:"collectible"!==W.type||D?void 0:W.textColor,children:(0,T.Y)(v.A,{className:(0,c.A)("no-selection",!D&&"z1sLOAjr"),documentId:W.documentId,size:C,loopLimit:P?void 0:s.J$1,observeIntersectionForLoading:L,onClick:F})})}),J&&!W&&j&&(0,T.Y)(I.A,{}),K&&(0,T.Y)("div",{className:(0,c.A)("Sdwfc851",M),children:E("MonoforumBadge")})]}),B]})})},37859:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(84051);const o=(e,t,r)=>{const o=(0,n.li)();return(0,n.Nf)(()=>{const r=o.current;return o.current=t,e(r||[])},t,r)}},86046:(e,t,r)=>{r.d(t,{D5:()=>m,HT:()=>c,M6:()=>f,MA:()=>u,Pc:()=>d,ZF:()=>p,hk:()=>l,j6:()=>y,jA:()=>a});var n=r(31481),o=r(5930),s=r(17142),i=r(91048);function a(e,t){if("slug"===t.type)return t;if("stargiftResale"===t.type){const{slug:r,peerId:n}=t,o=(0,i.PVB)(e,n);if(!o)return;return{type:"stargiftResale",slug:r,peer:o,currency:t.currency}}if("stargift"===t.type){const{peerId:r,shouldHideName:n,giftId:o,message:s,shouldUpgrade:a}=t,c=(0,i.PVB)(e,r);if(!c)return;return{type:"stargift",peer:c,shouldHideName:n,giftId:o,message:s,shouldUpgrade:a}}if("starsgift"===t.type){const{userId:r,stars:n,amount:o,currency:s}=t,a=(0,i.mBe)(e,r);if(!a)return;return{type:"stars",purpose:{type:"starsgift",user:a,stars:n,amount:o,currency:s}}}if("stars"===t.type){const{stars:r,amount:n,currency:o,spendPurposePeerId:s}=t;return{type:"stars",purpose:{type:"stars",stars:r,amount:n,currency:o,spendPurposePeer:s?(0,i.PVB)(e,s):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:n,message:o}=t,s=(0,i.mBe)(e,n);if(!s)return;return{type:"premiumGiftStars",months:r,message:o,user:s}}if("giftcode"===t.type){const{userIds:r,boostChannelId:n,amount:o,currency:s,option:a,message:c}=t;return{type:"giveaway",option:a,purpose:{type:"giftcode",amount:o,currency:s,users:r.map(t=>(0,i.mBe)(e,t)).filter(Boolean),boostChannel:n?(0,i.hds)(e,n):void 0,message:c}}}if("starsgiveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:o,currency:s,untilDate:a,areWinnersVisible:c,countries:u,isOnlyForNewSubscribers:d,prizeDescription:l,stars:p,users:f}=t,m=(0,i.hds)(e,r);if(!m)return;const y=n?.map(t=>(0,i.hds)(e,t)).filter(Boolean);return{type:"starsgiveaway",purpose:{type:"starsgiveaway",amount:o,currency:s,chat:m,additionalChannels:y,untilDate:a,areWinnersVisible:c,countries:u,isOnlyForNewSubscribers:d,prizeDescription:l,stars:p,users:f}}}if("giveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:o,currency:s,option:a,untilDate:c,areWinnersVisible:u,countries:d,isOnlyForNewSubscribers:l,prizeDescription:p}=t,f=(0,i.hds)(e,r);if(!f)return;const m=n?.map(t=>(0,i.hds)(e,t)).filter(Boolean);return{type:"giveaway",option:a,purpose:{type:"giveaway",amount:o,currency:s,chat:f,additionalChannels:m,untilDate:c,areWinnersVisible:u,countries:d,isOnlyForNewSubscribers:l,prizeDescription:p}}}if("stargiftUpgrade"===t.type){const{inputSavedGift:r,shouldKeepOriginalDetails:n}=t,o=c(e,r);if(!o)return;return{type:"stargiftUpgrade",inputSavedGift:o,shouldKeepOriginalDetails:n}}if("stargiftTransfer"===t.type){const{inputSavedGift:r,recipientId:n}=t,o=c(e,r),s=(0,i.PVB)(e,n);if(!o||!s)return;return{type:"stargiftTransfer",inputSavedGift:o,recipient:s}}if("stargiftDropOriginalDetails"===t.type){const{inputSavedGift:r}=t,n=c(e,r);if(!n)return;return{type:"stargiftDropOriginalDetails",inputSavedGift:n}}if("stargiftPrepaidUpgrade"===t.type){const{peerId:r,hash:n}=t,o=(0,i.PVB)(e,r);if(!o)return;return{type:"stargiftPrepaidUpgrade",peer:o,hash:n}}if("stargiftAuctionBid"===t.type){const{giftId:r,bidAmount:n,peerId:o,message:s,shouldHideName:a,isUpdateBid:c}=t;return{type:"stargiftAuctionBid",giftId:r,bidAmount:n,peer:o?(0,i.PVB)(e,o):void 0,message:s,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 u(e){return"peer"!==e.peer.type||Boolean(e.isPostsSearch)}function d(e){const{peer:t}=e,r=e.amount.currency===n.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 l(e,t){if(t.currency===n.OUy){const r=t.amount+t.nanos/1e9;return r<0?`- ${e.number(Math.abs(r))}`:`+ ${e.number(r)}`}if(t.currency===n.ykW){const r=(0,s.wD)(t.amount),n=Math.abs(r);return r<0?`- ${e.preciseNumber(n)}`:`+ ${e.preciseNumber(n)}`}}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:o}=t;return{id:r,amount:{currency:n.OUy,amount:o,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:o}=t;return{id:r,amount:{currency:n.ykW,amount:o},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:o,boostPeerId:s}=t;return{id:r,amount:{currency:n.OUy,amount:o,nanos:0},peer:{type:"peer",id:s},date:e.date,giveawayPostId:e.id}}function y(e,t){return(0,o.A)(e,t)}},91034:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(84051);function o(e){return function(t){const r=(0,n.li)(t);return t.ignoreFreeze?e(t):(t.isOpen?r.current=t:r.current={...r.current,isOpen:!1},e(r.current))}}},95773:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(84051),o=r(87357),s=r(95807),i=r(85118);var a=r(20021);const c=(0,n.ph)(({children:e,ref:t,className:r,style:c,withSparkles:u,sparklesClassName:d,sparklesColor:l,glowColor:p,onClick:f})=>{let m=(0,n.li)();return t&&(m=t),(0,a.FD)("div",{ref:m,className:(0,o.A)("Z9JWyzAs",r),style:(0,s.A)(p&&`--glow-color: ${p}`,c),onClick:f,children:[u&&(0,a.Y)(i.A,{preset:"button",className:(0,o.A)("fQBp2vKr",d),style:(0,s.A)(l&&`color: ${l}`)}),e]})})},96374:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(84051),o=r(89925),s=r(87894),i=r(30857),a=r(17712),c=r(73767);function u(e,t,r,n){const{length:s}=e,i=n?e.indexOf(n):0,a=t===o.TN.Forwards?i:i+1||s,c=Math.max(0,a-r),u=a+r-1,d=e.slice(Math.max(0,c),u+1);let l,p;switch(t){case o.TN.Forwards:l=a>=0,p=c>=0;break;case o.TN.Backwards:l=a<s,p=u<=s-1}return{newViewportIds:d,areSomeLocal:l,areAllLocal:p,newIsOnTop:d[0]===e[0],fromOffset:c}}const d=(e,t,r=!1,d=30)=>{const l=(0,n.li)(),p=(0,n.li)();if(!p.current&&t&&!r){const{newViewportIds:e,newIsOnTop:r,fromOffset:n}=u(t,o.TN.Forwards,d,t[0]);p.current={viewportIds:e,isOnTop:r,offset:n}}const f=(0,i.A)();r&&(l.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||{},n=e&&!r?e[Math.round(e.length/2)]:void 0,i=n&&t.includes(n)?n:t[0],{offsetId:a=i,direction:c=o.TN.Forwards}=l.current||{},{newViewportIds:f,newIsOnTop:m,fromOffset:y}=u(t,c,d,a);l.current={},e&&(0,s.k)(e,f)||(p.current={viewportIds:f,isOnTop:m,offset:y})}const v=(0,a.A)(({direction:r,noScroll:n})=>{const{viewportIds:i}=p.current||{},a=i?r===o.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:v,fromOffset:g}=u(t,r,d,a);!m||i&&(0,s.k)(i,c)||(p.current={viewportIds:c,isOnTop:v,offset:g},f()),!y&&e&&(n||(l.current={...l.current,direction:r,offsetId:a}),e({offsetId:a}))});return r?[t]:[p.current?.viewportIds,v,p.current?.offset]}}}]);
|
|
//# sourceMappingURL=213.bc65b934ec16aaa48756.js.map
|