telegram-tt/dist/4.413c0f1376b6d9916861.js

2 lines
27 KiB
JavaScript
Raw Normal View History

2021-04-26 14:48:23 +02:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{102:function(e,t,n){"use strict";var r=n(37);t.a=(e,t)=>{const n=Object(r.a)(t);n&&!t.some((e,t)=>e!==n[t])||e(n||[])}},106:function(e,t,n){"use strict";var r=n(0),a=n(7),o=n(9),c=n(8),i=n(43),l=n(125);let u,s;async function d(){return u||(u=n.e(7).then(n.bind(null,180)),s=(await u).default),u}setTimeout(d,5e3);t.a=Object(r.h)(({className:e,id:t,animationData:n,play:u,playSegment:f,speed:m,noLoop:h,size:b,quality:p,isLowPriority:v,onLoad:g})=>{const[E,j]=Object(r.r)(),O=Object(r.q)(null),y=Object(r.q)(!1),w=Object(r.q)(!1),k=Object(r.q)();k.current=u;const N=Object(r.q)();N.current=f,Object(r.n)(()=>{if(E||!n)return;const e=()=>{if(!O.current)return;const e=new s(t,O.current,n,{noLoop:h,size:b,quality:p,isLowPriority:v},g);m&&e.setSpeed(m),j(e)};s?e():d().then(()=>{Object(o.b)(()=>{O.current&&e()})})},[E,n,t,v,h,g,p,b,m]),Object(r.n)(()=>()=>{E&&E.destroy()},[E]);const C=Object(r.m)((e=!1)=>{E&&(k.current||N.current)&&(N.current?E.playSegment(N.current):e?E.goToAndPlay(0):E.play())},[E]),L=Object(r.m)(()=>{E&&E.pause()},[E]),A=Object(r.m)(()=>{w.current=!0,E&&(y.current||(y.current=E.isPlaying()),L())},[E,L]),M=Object(r.m)(()=>{y.current&&C(),y.current=!1,w.current=!1},[C]),P=Object(r.m)(()=>{Object(o.b)(M)},[M]);Object(r.n)(()=>{E&&(u||f?w.current?y.current=!0:C(h):w.current?y.current=!1:L())},[E,u,f,h,C,L]),Object(i.a)(A,M),Object(l.a)(A,P);const T=Object(c.a)("AnimatedSticker",e,a.d&&u&&"is-playing"),S=b?`width: ${b}px; height: ${b}px;`:void 0;return r.a.createElement("div",{ref:O,className:T,style:S})})},114:function(e,t,n){"use strict";var r=n(0),a=n(57);t.a=({containerId:e,className:t,children:n})=>{const o=Object(r.q)(document.createElement("div"));return Object(r.o)(()=>{const n=document.querySelector(e||"#portals");if(!n)return;const r=o.current;return t&&r.classList.add(t),n.appendChild(r),()=>{a.a.render(void 0,r),n.removeChild(r)}},[t,e]),a.a.render(n,o.current)}},116:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),a=n(48);const o={MonkeyIdle:n.p+"TwoFactorSetupMonkeyIdle.dea4a492c144df84ddab778dc8a3f0cd.tgs",MonkeyTracking:n.p+"TwoFactorSetupMonkeyTracking.eb5a7a6f166fb7589c12e6248561fb58.tgs",MonkeyClose:n.p+"TwoFactorSetupMonkeyClose.604c4c833d322b7e6c3ea19bef058241.tgs",MonkeyPeek:n.p+"TwoFactorSetupMonkeyPeek.1905436b042520363d7e59f5d7f903ab.tgs",FoldersAll:n.p+"FoldersAll.3f9f9e243d19f0fbf9aaaff11cbd4572.tgs",FoldersNew:n.p+"FoldersNew.9a40d71c0c8be70f5bd14ff2d7bc1593.tgs",DiscussionGroups:n.p+"DiscussionGroupsDucks.9ea453d1be9d1b0ee77a992f8e587485.tgs"};function c(e){const t=o[e].replace(window.location.origin,"");return a.b("file"+t,r.ApiMediaFormat.Lottie)}},120:function(e,t,n){"use strict";var r=n(0),a=n(8),o=n(1),c=n(14),i=n(93),l=n(31),u=n(98),s=n(16);n(141);const d={type:"blob",quality:.8,format:"jpeg",circle:!1};let f,m,h;var b=Object(r.h)(({file:e,onChange:t,onClose:a})=>{const[b,p]=Object(r.r)(!1);Object(r.n)(()=>{e&&(b?async function(e){try{const t=document.getElementById("avatar-crop");if(!t)return;const{offsetWidth:n,offsetHeight:r}=t;h=new f(t,{enableZoom:!0,boundary:{width:n,height:r},viewport:{width:n-16,height:r-16,type:"circle"}});const a=await Object(c.a)(e);await h.bind({url:a})}catch(e){o.o&&console.error(e)}}(e):async function(){return m||(m=Promise.all([n.e(5),n.e(8)]).then(n.bind(null,303)),f=(await m).default),m}().then(()=>p(!0)))},[e,b]);const v=Object(i.a)();return r.a.createElement(u.a,{isOpen:Boolean(e),onClose:a,title:"Drag to reposition",className:"CropModal",hasCloseButton:!0},b?r.a.createElement("div",{id:"avatar-crop"}):r.a.createElement(s.a,null),r.a.createElement(l.a,{className:"confirm-button",round:!0,color:"primary",onClick:async function(){if(!h)return;const e=await h.result(d),n="string"==typeof e?e:Object(c.b)(e,"avatar.jpg");t(n)},ariaLabel:v("CropImage")},r.a.createElement("i",{className:"icon-check"})))});n(142);t.a=Object(r.h)(({title:e="Change your profile picture",disabled:t,currentAvatarBlobUrl:n,onChange:o})=>{const[c,i]=Object(r.r)(),[l,u]=Object(r.r)(n);Object(r.n)(()=
//# sourceMappingURL=4.413c0f1376b6d9916861.js.map