mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-27 04:45:08 +01:00
2 lines
13 KiB
JavaScript
2 lines
13 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[888],{7799:(e,t,n)=>{n.d(t,{Z:()=>u});var o=n(4050),r=n(9118),c=n(6752),s=n(8674),l=n(5332);let i,a;async function d(){return i||(i=n.e(941).then(n.bind(n,7941)),a=(await i).default),i}setTimeout(d,3e3);const u=(0,o.X$)((e=>{let{className:t,id:n,animationData:i,play:u,playSegment:p,speed:m,noLoop:f,size:g,quality:h,isLowPriority:v,color:Z,forceOnHeavyAnimation:w,onLoad:b,onEnded:y}=e;const[E,k]=(0,o.eJ)(),C=(0,o.sO)(null),P=(0,o.sO)(!1),x=(0,o.sO)(!1),A=(0,o.sO)(!0),T=(0,o.sO)();T.current=u;const I=(0,o.sO)();I.current=p,(0,o.d4)((()=>{if(E||!i)return;const e=()=>{if(!C.current)return;const e=new a(n,C.current,i,{noLoop:f,size:g,quality:h,isLowPriority:v},b,Z,y);m&&e.setSpeed(m),k(e)};a?e():d().then((()=>{(0,r.T2)((()=>{C.current&&e()}))}))}),[Z,E,i,n,v,f,b,h,g,m,y]),(0,o.d4)((()=>{E&&E.setColor(Z)}),[Z,E]),(0,o.d4)((()=>()=>{E&&E.destroy()}),[E]);const N=(0,o.I4)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];E&&(T.current||I.current)&&(I.current?E.playSegment(I.current):e?E.goToAndPlay(0):E.play())}),[E]),S=(0,o.I4)((()=>{E&&E.pause()}),[E]),L=(0,o.I4)((()=>{x.current=!0,E&&(P.current||(P.current=E.isPlaying()),S())}),[E,S]),O=(0,o.I4)((()=>{P.current&&N(),P.current=!1,x.current=!1}),[N]),B=(0,o.I4)((()=>{(0,r.T2)(O)}),[O]);(0,o.d4)((()=>{E&&(u||p?x.current?P.current=!0:N(f):x.current?P.current=!1:S())}),[E,u,p,f,N,S]),(0,o.d4)((()=>{E&&(A.current?A.current=!1:i&&(E.changeData(i),N()))}),[N,E,i]),(0,s.ZP)(L,O,w),(0,l.Z)(L,B);const F=(0,c.Z)("AnimatedSticker",t),M=g?`width: ${g}px; height: ${g}px;`:void 0;return o.ZP.createElement("div",{ref:C,className:F,style:M})}))},172:(e,t,n)=>{n.d(t,{Z:()=>f});var o=n(4050),r=n(6137),c=n(3716),s=n(5806),l=n(2155),i=n(6752),a=n(2340),d=n(6202),u=n(1212),p=n(9107);const m=(0,i.y)("Avatar");m.img=m("img"),m.icon=m("icon");const f=(0,o.X$)((e=>{let{className:t,size:n="large",chat:f,user:g,photo:h,userStatus:v,text:Z,isSavedMessages:w,lastSyncTime:b,onClick:y}=e;const E=g&&(0,s.NB)(g),k=g&&(0,s.pK)(g.id);let C;w||E||(g?C=(0,s.RT)(g):f?C=(0,s.RT)(f):h&&(C=`photo${h.id}?size=m`));const P=(0,d.Z)(C,!1,r.IU.BlobUrl,b),x=Boolean(P),{transitionClassNames:A}=(0,u.Z)(x,void 0,x,"slow"),T=(0,p.Z)();let I="";if(w)I=o.ZP.createElement("i",{className:(0,i.Z)(m.icon,"icon-avatar-saved-messages")});else if(E)I=o.ZP.createElement("i",{className:(0,i.Z)(m.icon,"icon-avatar-deleted-account")});else if(k)I=o.ZP.createElement("i",{className:(0,i.Z)(m.icon,"icon-reply-filled")});else if(P)I=o.ZP.createElement("img",{src:P,className:(0,i.Z)(m.img,"avatar-media",A),alt:"",decoding:"async"});else if(g){const e=(0,s.Js)(g);I=e?(0,l.Xv)(e,2):void 0}else if(f){const e=(0,s.U)(T,f);I=e&&(0,l.Xv)(e,(0,s.YC)(f.id)?2:1)}else Z&&(I=(0,l.Xv)(Z,2));const N=!w&&g&&v&&(0,s.kM)(g,v),S=(0,i.Z)(`Avatar size-${n}`,t,`color-bg-${(0,s.Rs)(g||f)}`,w&&"saved-messages",E&&"deleted-account",k&&"replies-bot-account",N&&"online",y&&"interactive",!w&&!P&&"no-photo"),L=Boolean(w||P),O=(0,o.I4)((e=>{y&&y(e,L)}),[y,L]),B=(g||f)&&(g||f).id;return o.ZP.createElement("div",{className:S,onClick:O,"data-test-sender-id":c.Cg?B:void 0},"string"==typeof I?(0,a.Z)(I,["jumbo"===n?"hq_emoji":"emoji"]):I)}))},7324:(e,t,n)=>{n.d(t,{Z:()=>s,x:()=>c});var o=n(6137),r=n(647);const c={MonkeyIdle:n(8760),MonkeyTracking:n(6917),MonkeyClose:n(6257),MonkeyPeek:n(7785),FoldersAll:n(9356),FoldersNew:n(5485),DiscussionGroups:n(6978),CameraFlip:n(5665),HandFilled:n(2456),HandOutline:n(5667),Speaker:n(8763),VoiceAllowTalk:n(401),VoiceMini:n(5106),VoiceMuted:n(487),VoiceOutlined:n(5740),Peach:n(3677),Eggplant:n(5435),Cumshot:n(1879),JoinRequest:n(5095),Invite:n(7879)};function s(e){const t=c[e].replace(window.location.origin,"");return r.he(`file${t}`,o.IU.Lottie)}},7551:(e,t,n)=>{n.d(t,{Z:()=>i});var o=n(4050),r=n(9107),c=n(2313),s=n(3103),l=n(231);const i=(0,o.X$)((e=>{let{isOpen:t,onClose:n,onCloseAnimationEnd:i,title:a,header:d,text:u,textParts:p,confirmLabel:m="Confirm",confirmHandler:f,confirmIsDestructive:g,isButtonsInOneRow:h,children:v}=e;const Z=(0,r.Z)(),w=(0,o.sO)(null),b=(0,o.I4)((e=>{-1===e&&f()}),[f]),y=(0,c.Z)(w,t,b,".Button");return o.ZP.createElement(s.Z,{className:"confirm",title:a,header:d,isOpen:t,onClose:n,onCloseAnimationEnd:i},u&&u.split("\\n").map((e=>o.ZP.createElement("p",null,e))),p||v,o.ZP.createElement("div",{className:h?"dialog-buttons mt-2":"",ref:w,onKeyDown:y},o.ZP.createElement(l.Z,{className:"confirm-dialog-button",isText:!0,onClick:f,color:g?"danger":"primary"},m),o.ZP.createElement(l.Z,{className:"confirm-dialog-button",isText:!0,onClick:n},Z("Cancel"))))}))},1273:(e,t,n)=>{n.d(t,{Z:()=>u});var o=n(1713),r=n(4050),c=n(9118),s=n(7675),l=n(7361);const i=".ListItem",a=20,d=800,u=e=>{let{ref:t,className:n,onLoadMore:u,onScroll:p,onKeyDown:m,items:f,itemSelector:g=i,preloadBackwards:h=a,sensitiveArea:v=d,withAbsolutePositioning:Z,maxHeight:w,noScrollRestore:b=!1,noScrollRestoreOnTop:y=!1,noFastList:E,cacheBuster:k,children:C}=e,P=(0,r.sO)(null);t&&(P=t);const x=(0,r.sO)({}),[A,T]=(0,r.Ye)((()=>u?[(0,c.Ds)((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];u({direction:o.Uq.Backwards,noScroll:e})}),1e3,!0,!1),(0,c.Ds)((()=>{u({direction:o.Uq.Forwards})}),1e3,!0,!1)]:[]),[u,f]);(0,r.d4)((()=>{if(!A)return;if(h>0&&(!f||f.length<h))return void A(!0);const{scrollHeight:e,clientHeight:t}=P.current;t&&e<=t&&A()}),[f,A,h]),(0,r.bt)((()=>{const e=P.current,t=x.current;let n;if(t.listItemElements=e.querySelectorAll(g),t.currentAnchor&&Array.from(t.listItemElements).includes(t.currentAnchor)){const{scrollTop:o}=e;n=o+(t.currentAnchor.getBoundingClientRect().top-t.currentAnchorTop)}else{const e=t.listItemElements[0];e&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}Z||b||y&&0===e.scrollTop||((0,s.Z)(e,n),t.isScrollTopJustUpdated=!0)}),[f,g,b,y,k,Z]);const I=(0,r.I4)((e=>{if(T&&A){const{isScrollTopJustUpdated:e,currentAnchor:t,currentAnchorTop:n}=x.current,o=x.current.listItemElements;if(e)return void(x.current.isScrollTopJustUpdated=!1);const r=o.length,c=P.current,{scrollTop:s,scrollHeight:l,offsetHeight:i}=c,a=s<=(r?o[0].offsetTop:0)+v,d=(r?o[r-1].offsetTop+o[r-1].offsetHeight:l)-(s+i)<=v;let u=!1;if(a){const e=o[0];if(e){const o=e.getBoundingClientRect().top,r=null!=t&&t.offsetParent&&t!==e?t.getBoundingClientRect().top:o;t&&void 0!==n&&r>n&&(x.current.currentAnchor=e,x.current.currentAnchorTop=o,u=!0,T())}}if(d){const e=o[r-1];if(e){const o=e.getBoundingClientRect().top,r=null!=t&&t.offsetParent&&t!==e?t.getBoundingClientRect().top:o;t&&void 0!==n&&r<n&&(x.current.currentAnchor=e,x.current.currentAnchorTop=o,u=!0,A())}}if(!u)if(null!=t&&t.offsetParent)x.current.currentAnchorTop=t.getBoundingClientRect().top;else{const e=o[0];e&&(x.current.currentAnchor=e,x.current.currentAnchorTop=e.getBoundingClientRect().top)}}p&&p(e)}),[A,T,p,v]);return r.ZP.createElement("div",{ref:P,className:n,onScroll:I,teactFastList:!E&&!Z,onKeyDown:m},Z&&null!=f&&f.length?r.ZP.createElement("div",{teactFastList:!E,style:`position: relative;${l.wZ?` height: ${w}px;`:void 0}`},C):C)}},3103:(e,t,n)=>{n.d(t,{Z:()=>m});var o=n(4050),r=n(517),c=n(6752),s=n(8674),l=n(1212),i=n(274),a=n(9107),d=n(6590),u=n(231),p=n(2898);const m=e=>{let{dialogRef:t,title:n,className:m,isOpen:f,header:g,hasCloseButton:h,noBackdrop:v,children:Z,onClose:w,onCloseAnimationEnd:b,onEnter:y,shouldSkipHistoryAnimations:E}=e;const{shouldRender:k,transitionClassNames:C}=(0,l.Z)(f,b,E,void 0,E),P=(0,o.sO)(null);(0,o.d4)((()=>f?(0,r.Z)({onEsc:w,onEnter:y}):void 0),[f,w,y]),(0,o.d4)((()=>f&&P.current?function(e){function t(t){if("Tab"!==t.key)return;t.preventDefault(),t.stopPropagation();const n=Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!n.length)return;const o=n.findIndex((e=>e.isSameNode(document.activeElement)));let r=0;o>=0&&(r=t.shiftKey?o>0?o-1:n.length-1:o<n.length-1?o+1:0),n[r].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}(P.current):void 0),[f]);const{forceClose:x}=(0,d.ZP)(f,w);(0,o.d4)((()=>()=>{f&&x()}),[]),(0,i.Z)((e=>{let[t]=e;return document.body.classList.toggle("has-open-dialog",f),(f||!f&&void 0!==t)&&(0,s.YW)(200),()=>{document.body.classList.remove("has-open-dialog")}}),[f]);const A=(0,a.Z)();if(!k)return;const T=(0,c.Z)("Modal",m,C,v&&"transparent-backdrop");return o.ZP.createElement(p.Z,null,o.ZP.createElement("div",{ref:P,className:T,tabIndex:-1,role:"dialog"},o.ZP.createElement("div",{className:"modal-container"},o.ZP.createElement("div",{className:"modal-backdrop",onClick:w}),o.ZP.createElement("div",{className:"modal-dialog",ref:t},g||(n?o.ZP.createElement("div",{className:"modal-header"},h&&o.ZP.createElement(u.Z,{round:!0,color:"translucent",size:"smaller",ariaLabel:A("Close"),onClick:w},o.ZP.createElement("i",{className:"icon-close"})),o.ZP.createElement("div",{className:"modal-title"},n)):void 0),o.ZP.createElement("div",{className:"modal-content custom-scroll"},Z)))))}},2898:(e,t,n)=>{n.d(t,{Z:()=>c});var o=n(4050),r=n(2916);const c=e=>{let{containerId:t,className:n,children:c}=e;const s=(0,o.sO)();return s.current||(s.current=document.createElement("div")),(0,o.bt)((()=>{const e=document.querySelector(t||"#portals");if(!e)return;const o=s.current;return n&&o.classList.add(n),e.appendChild(o),()=>{r.Z.render(void 0,o),e.removeChild(o)}}),[n,t]),r.Z.render(c,s.current)}},5332:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(4050);function r(e,t){(0,o.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])}},8360:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(7204);function r(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=(0,o.Z)(e,t);return n||null!=e?e:r}},7407:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(4050),r=n(1713),c=n(782),s=n(5326),l=n(7204);function i(e,t,n,o){const{length:c}=e,s=o?e.indexOf(o):0,l=t===r.Uq.Forwards?s:s+1||c,i=Math.max(0,l-n),a=l+n-1,d=e.slice(Math.max(0,i),a+1);let u,p;switch(t){case r.Uq.Forwards:u=l>0,p=i>=0;break;case r.Uq.Backwards:u=l<c,p=a<=c-1}return{newViewportIds:d,areSomeLocal:u,areAllLocal:p}}const a=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30;const d=(0,o.sO)(),u=(0,o.sO)((()=>{if(!t||d.current)return;const{newViewportIds:e}=i(t,r.Uq.Forwards,a,t[0]);return e})()),p=(0,s.Z)();n&&(d.current={});const m=(0,l.Z)(t),f=(0,l.Z)(n);if(t&&!n&&(t!==m||n!==f)){const{offsetId:e=t[0],direction:n=r.Uq.Forwards}=d.current||{},{newViewportIds:o}=i(t,n,a,e);u.current&&(0,c.et)(u.current,o)||(u.current=o)}const g=(0,o.I4)((n=>{let{direction:o,noScroll:s}=n;const l=u.current,m=l?o===r.Uq.Backwards?l[l.length-1]:l[0]:void 0;if(!t)return void(e&&e({offsetId:m}));s||(d.current={...d.current,direction:o,offsetId:m});const{newViewportIds:f,areSomeLocal:g,areAllLocal:h}=i(t,o,a,m);!g||l&&(0,c.et)(l,f)||(u.current=f,p()),!h&&e&&e({offsetId:m})}),[t,a,e,p]);return n?[t]:[u.current,g]}},6202:(e,t,n)=>{n.d(t,{Z:()=>l});var o=n(4050),r=n(6137),c=n(647),s=n(5326);const l=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.IU.BlobUrl,l=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;const a=e?c.UV(e):void 0,d=(0,s.Z)();return(0,o.d4)((()=>{if(!t&&e&&!a){const t=Date.now();c.he(e,n).then((()=>{const e=Date.now()-t;!i||e>=i?d():setTimeout(d,i-e)}))}}),[t,e,a,n,l,d,i]),a}},2972:(e,t,n)=>{function o(e){e.offsetWidth}n.d(t,{Z:()=>o})},7675:(e,t,n)=>{n.d(t,{Z:()=>s,z:()=>c});var o=n(7361),r=n(2972);function c(e){e.style.display="none",(0,r.Z)(e),e.style.display=""}const s=(e,t)=>{o.cj&&(e.style.overflow="hidden"),void 0!==t&&(e.scrollTop=t),o.cj&&(e.style.overflow="")}},4753:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(3716);const r=e=>{e.play().catch((t=>{o.eM&&console.warn(t,e)}))}},1879:(e,t,n)=>{e.exports=n.p+"Cumshot.7a17984a6b80787dab34..tgs"},5435:(e,t,n)=>{e.exports=n.p+"Eggplant.7693d877087b802d04be..tgs"},3677:(e,t,n)=>{e.exports=n.p+"Peach.a289b2c54c563f11208f..tgs"},5665:(e,t,n)=>{e.exports=n.p+"CameraFlip.1a9fe44cf01fcb22347d..tgs"},2456:(e,t,n)=>{e.exports=n.p+"HandFilled.f87939d160f1dc288586..tgs"},5667:(e,t,n)=>{e.exports=n.p+"HandOutline.f9831751ba60df30c484..tgs"},8763:(e,t,n)=>{e.exports=n.p+"Speaker.04bb3743412b41ff83c5..tgs"},401:(e,t,n)=>{e.exports=n.p+"VoiceAllowTalk.a9cc7c39ec438973ddc9..tgs"},5106:(e,t,n)=>{e.exports=n.p+"VoiceMini.bf00ffdf69625c579569..tgs"},487:(e,t,n)=>{e.exports=n.p+"VoiceMuted.a4b4ec6bfd7c6c5fb275..tgs"},5740:(e,t,n)=>{e.exports=n.p+"VoiceOutlined.91b394ab3562cdfad6bc..tgs"},7879:(e,t,n)=>{e.exports=n.p+"Invite.4502ec3aa4249d6e6723..tgs"},5095:(e,t,n)=>{e.exports=n.p+"Requests.af9f19772695a8898810..tgs"},6257:(e,t,n)=>{e.exports=n.p+"TwoFactorSetupMonkeyClose.604c4c833d322b7e6c3e..tgs"},8760:(e,t,n)=>{e.exports=n.p+"TwoFactorSetupMonkeyIdle.dea4a492c144df84ddab..tgs"},7785:(e,t,n)=>{e.exports=n.p+"TwoFactorSetupMonkeyPeek.1905436b042520363d7e..tgs"},6917:(e,t,n)=>{e.exports=n.p+"TwoFactorSetupMonkeyTracking.eb5a7a6f166fb7589c12..tgs"},6978:(e,t,n)=>{e.exports=n.p+"DiscussionGroupsDucks.9ea453d1be9d1b0ee77a..tgs"},9356:(e,t,n)=>{e.exports=n.p+"FoldersAll.3f9f9e243d19f0fbf9aa..tgs"},5485:(e,t,n)=>{e.exports=n.p+"FoldersNew.9a40d71c0c8be70f5bd1..tgs"}}]);
|
|
//# sourceMappingURL=888.3bcf93fb3c92294b2737.js.map
|