mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-02 17:48:34 +01:00
2 lines
94 KiB
JavaScript
2 lines
94 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],Array(98).concat([function(e,t,n){"use strict";var a=n(11),r=n(35),c=n(107);t.a=()=>{const e=Object(r.a)();return Object(c.a)(()=>a.a(e),[e]),a.b}},function(e,t,n){"use strict";var a=n(0),r=n(7),c=n(8),s=n(139),i=n(167),o=n(39),l=n(49),u=n(38);n(201);t.a=e=>{const{ref:t,icon:n,className:d,style:m,children:h,disabled:b,ripple:f,narrow:p,inactive:g,focus:O,destructive:v,multiline:j,isStatic:E,contextActions:y,onClick:T}=e;let N=Object(a.q)(null);t&&(N=t);const{isContextMenuOpen:C,contextMenuPosition:M,handleBeforeContextMenu:w,handleContextMenu:S,handleContextMenuClose:L,handleContextMenuHide:I}=Object(s.a)(N,!y),A=Object(a.m)(()=>N.current,[]),k=Object(a.m)(()=>N.current.closest(".custom-scroll"),[]),x=Object(a.m)(()=>N.current.querySelector(".ListItem-context-menu .bubble"),[]),{positionX:D,positionY:_,style:R}=Object(i.a)(M,A,k,x),P=Object(a.m)(e=>{!b&&T&&T(e)},[b,T]),F=Object(a.m)(e=>{g||r.l||(!y||2!==e.button&&T||w(e),0===e.button&&(T?P(e):S(e)))},[g,y,T,w,S,P]),U=Object(c.a)("ListItem",d,!E&&"no-selection",f&&"has-ripple",p&&"narrow",b&&"disabled",g&&"inactive",M&&"has-menu-open",O&&"focus",v&&"destructive",j&&"multiline",E&&"is-static");return a.a.createElement("div",{ref:N,className:U,style:m},a.a.createElement("div",{className:"ListItem-button",role:"button",tabIndex:0,onClick:!g&&r.l?P:void 0,onMouseDown:F,onContextMenu:!g&&y?S:void 0},n&&a.a.createElement("i",{className:"icon-"+n}),j&&a.a.createElement("div",{className:"multiline-item"},h),!j&&h,!b&&!g&&f&&a.a.createElement(o.a,null)),y&&void 0!==M&&a.a.createElement(l.a,{isOpen:C,positionX:D,positionY:_,style:R,className:"ListItem-context-menu",autoClose:!0,onClose:L,onCloseAnimationEnd:I},y.map(e=>a.a.createElement(u.a,{key:e.title,icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler},e.title))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}));var a=n(0),r=n(9),c=n(45);function s({rootRef:e,throttleMs:t,debounceMs:n,shouldSkipFirst:s,margin:i,threshold:o,isDisabled:l},u){const d=Object(a.q)(),m=Object(a.q)(),h=Object(a.q)(),b=Object(a.q)();m.current=u;const f=Object(a.m)(()=>{h.current=!0},[]),p=Object(a.m)(()=>{h.current=!1,b.current&&(b.current(),b.current=void 0)},[]);Object(c.a)(f,p),Object(a.n)(()=>{if(!l)return()=>{d.current&&(d.current.observer.disconnect(),d.current.callbacks.clear(),d.current=void 0)}},[l]);return{observe:Object(a.m)((a,c)=>{d.current||function(){const a=new Map,c=new Map,l=()=>{const e=Array.from(c.values());e.forEach(t=>{const n=a.get(t.target);n&&n(t,e)}),m.current&&m.current(e),c.clear()},u=t?r.g:n?r.a:void 0,f=u?u(l,t||n,!s):l,p=new IntersectionObserver(e=>{e.forEach(e=>{c.set(e.target,e)}),h.current?b.current=()=>{f()}:f()},{root:e.current,rootMargin:i?i+"px":void 0,threshold:o});d.current={observer:p,callbacks:a}}();const l=d.current;return l.observer.observe(a),c&&l.callbacks.set(a,c),()=>{c&&l.callbacks.delete(a),l.observer.unobserve(a)}},[l]),freeze:f,unfreeze:p}}function i(e,t,n){Object(a.n)(()=>t?t(e.current,n):void 0,[])}function o(e,t,n){const[r,c]=Object(a.r)(!t);return i(e,t,e=>{c(e.isIntersecting),n&&n(e)}),r}},function(e,t,n){"use strict";var a=n(0),r=n(5),c=n(50),s=n(35);t.a=(e,t=!1,n=r.ApiMediaFormat.BlobUrl,i,o)=>{const l=e?c.c(e):void 0,u=Object(s.a)();return Object(a.n)(()=>{if(!t&&e&&!l){const t=Date.now();c.b(e,n).then(()=>{const e=Date.now()-t;!o||e>=o?u():setTimeout(u,o-e)})}},[t,e,l,n,i,u,o]),l}},function(e,t,n){"use strict";var a=n(0),r=n(2),c=n(19),s=n(6),i=n(4),o=n(22),l=n(3),u=n(98),d=n(105),m=n(127),h=n(150);t.a=Object(a.h)(Object(r.h)((e,{userId:t,forceShowSelf:n})=>{const{lastSyncTime:a}=e,r=Object(s.Db)(e,t);return{lastSyncTime:a,user:r,isSavedMessages:!n&&r&&r.isSelf,areMessagesLoaded:Boolean(Object(s.m)(e,t))}},(e,t)=>Object(l.l)(t,["loadFullUser","openMediaViewer"]))(({typingStatus:e,avatarSize:t="medium",status:n,withMediaViewer:r,withUsername:s,withFullInfo:l,withUpdatingStatus:b,noStatusOrTyping:f,user:p,isSavedMessages:g,areMessag
|
||
|
//# sourceMappingURL=0.dae5cd682a93c91f9260.js.map
|