telegram-tt/dist/4.cb49db0cd6ca3907af90.js
2021-04-09 14:17:49 +03:00

1 line
26 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{102:function(e,t,n){"use strict";var r=n(0),a=n(7),o=n(9),c=n(8),l=n(42);let i,u;async function s(){return i||(i=n.e(7).then(n.bind(null,302)),u=(await i).default),i}setTimeout(s,5e3);t.a=Object(r.h)(({className:e,id:t,animationData:n,play:i,playSegment:d,speed:f,noLoop:m,size:h,quality:b,isLowPriority:v,onLoad:p})=>{const[g,E]=Object(r.r)(),j=Object(r.q)(null),O=Object(r.q)(!1),y=Object(r.q)(!1),w=Object(r.q)();w.current=i;const k=Object(r.q)();k.current=d,Object(r.n)(()=>{if(g||!n)return;const e=()=>{if(!j.current)return;const e=new u(t,j.current,n,{noLoop:m,size:h,quality:b,isLowPriority:v},p);f&&e.setSpeed(f),E(e)};u?e():s().then(()=>{Object(o.b)(()=>{j.current&&e()})})},[g,n,t,v,m,p,b,h,f]),Object(r.n)(()=>()=>{g&&g.destroy()},[g]);const N=Object(r.m)((e=!1)=>{g&&(w.current||k.current)&&(k.current?g.playSegment(k.current):e?g.goToAndPlay(0):g.play())},[g]),C=Object(r.m)(()=>{g&&g.pause()},[g]),L=Object(r.m)(()=>{y.current=!0,g&&(O.current||(O.current=g.isPlaying()),C())},[g,C]),A=Object(r.m)(()=>{O.current&&N(),O.current=!1,y.current=!1},[N]),M=Object(r.m)(()=>{Object(o.b)(A)},[A]);var P,T;Object(r.n)(()=>{g&&(i||d?y.current?O.current=!0:N(m):y.current?O.current=!1:C())},[g,i,d,m,N,C]),Object(l.a)(L,A),P=L,T=M,Object(r.n)(()=>(document.hasFocus()||P(),window.addEventListener("blur",P),window.addEventListener("focus",T),()=>{window.removeEventListener("focus",T),window.removeEventListener("blur",P)}),[P,T]);const S=Object(c.a)("AnimatedSticker",e,a.d&&i&&"is-playing"),x=h?`width: ${h}px; height: ${h}px;`:void 0;return r.a.createElement("div",{ref:j,className:S,style:x})})},111:function(e,t,n){"use strict";var r=n(0),a=n(55);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)}},113:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),a=n(47);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)}},117:function(e,t,n){"use strict";var r=n(0),a=n(8),o=n(1),c=n(14),l=n(90),i=n(30),u=n(95),s=n(16);n(138);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,v]=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.l&&console.error(e)}}(e):async function(){return m||(m=Promise.all([n.e(5),n.e(8)]).then(n.bind(null,298)),f=(await m).default),m}().then(()=>v(!0)))},[e,b]);const p=Object(l.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(i.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:p("CropImage")},r.a.createElement("i",{className:"icon-check"})))});n(139);t.a=Object(r.h)(({title:e="Change your profile picture",disabled:t,currentAvatarBlobUrl:n,onChange:o})=>{const[c,l]=Object(r.r)(),[i,u]=Object(r.r)(n);Object(r.n)(()=>{u(n)},[n]);const s=Object(a.a)(i&&"filled",t&&"disabled");return r.a.createElement("div",{className:"AvatarEditable"},r.a.createElement("label",{className:s,role:"button",tabIndex:0,title:e},r.a.createElement("input",{type:"file",onChange:function(e){const t=e.target;t&&t.files&&t.files[0]&&(l(t.files[0]),t.value="")},accept:"image/png, image/jpeg"}),r.a.createElement("i",{className:"icon-camera-add"}),i&&r.a.createElement("img",{src:i,alt:"Avatar"})),r.a.createElement(b,{file:c,onClose:function(){l(void 0)},onChange:function(e){l(void 0),o(e),i&&URL.revokeObjectURL(i),u(URL.createObjectURL(e))}}))})},122:function(e,t,n){},135:function(e,t,n){"use strict";var r=n(0),a=n(1),o=n(7),c=n(113),l=n(102);n(122);const i=[0,50],u=[0,20],s=[20,0],d=o.f?a.db:a.cb;t.a=Object(r.h)(({isPasswordVisible:e,isBig:t})=>{const[n,o]=Object(r.r)(),[f,m]=Object(r.r)(),[h,b]=Object(r.r)(!1),[v,p]=Object(r.r)(!1);Object(r.n)(()=>{n?setTimeout(()=>p(!0),2e3):Object(c.a)("MonkeyClose").then(o)},[n]),Object(r.n)(()=>{f||Object(c.a)("MonkeyPeek").then(m)},[f]);const g=Object(r.m)(()=>b(!0),[]);return r.a.createElement("div",{id:"monkey",className:t?"big":""},!h&&r.a.createElement("div",{className:"monkey-preview"}),n&&r.a.createElement(l.a,{id:"closeMonkey",size:t?a.nb:d,className:v?"hidden":"shown",animationData:n,playSegment:i,noLoop:!0,onLoad:g}),f&&r.a.createElement(l.a,{id:"peekMonkey",size:t?a.nb:d,className:v?"shown":"hidden",animationData:f,playSegment:e?u:s,noLoop:!0}))})},136:function(e,t,n){"use strict";var r=n(0),a=n(1),o=n(7),c=n(8),l=n(30);const i=o.f?550:400;t.a=Object(r.h)(({isLoading:e=!1,isPasswordVisible:t,error:n,hint:u,placeholder:s="Password",submitLabel:d="Next",clearError:f,onChangePasswordVisibility:m,onInputChange:h,onSubmit:b})=>{const v=Object(r.q)(null),[p,g]=Object(r.r)(""),[E,j]=Object(r.r)(!1);return Object(r.n)(()=>{o.k||setTimeout(()=>{v.current.focus()},i)},[]),r.a.createElement("form",{action:"",onSubmit:function(t){t.preventDefault(),e||E&&b(p)},autoComplete:"off"},r.a.createElement("div",{className:Object(c.a)("input-group password-input",p&&"touched",n&&"error")},r.a.createElement("input",{ref:v,className:"form-control",type:t?"text":"password",id:"sign-in-password",value:p||"",autoComplete:"current-password",onChange:function(e){n&&f();const{target:t}=e;g(t.value),j(t.value.length>=a.O),h&&h(t.value)}}),r.a.createElement("label",null,n||u||s),r.a.createElement("div",{className:"toggle-password",onClick:function(){m(!t)},role:"button",tabIndex:0,title:"Toggle password visibility"},r.a.createElement("i",{className:t?"icon-eye":"icon-eye-closed"}))),E&&r.a.createElement(l.a,{type:"submit",ripple:!0,isLoading:e},d))})},137:function(e,t,n){},138:function(e,t,n){},139:function(e,t,n){},89:function(e,t,n){"use strict";n.r(t),n.d(t,"AuthCode",(function(){return h})),n.d(t,"AuthPassword",(function(){return p})),n.d(t,"AuthRegister",(function(){return j})),n.d(t,"AuthQrCode",(function(){return N}));var r=n(0),a=n(2),o=n(7),c=n(3),l=n(38),i=n(16),u=n(1),s=n(113),d=n(102);n(122);const f=o.f?u.db:u.cb;var m=Object(r.h)(({code:e,codeLength:t,trackingDirection:n,isTracking:a,isBig:o})=>{const[c,l]=Object(r.r)(),[i,m]=Object(r.r)(),[h,b]=Object(r.r)(!1),v=165/t;Object(r.n)(()=>{c||Object(s.a)("MonkeyIdle").then(l)},[c]),Object(r.n)(()=>{i||Object(s.a)("MonkeyTracking").then(m)},[i]);const p=Object(r.m)(()=>b(!0),[]);return r.a.createElement("div",{id:"monkey",className:o?"big":""},!h&&r.a.createElement("div",{className:"monkey-preview"}),c&&r.a.createElement(d.a,{id:"idleMonkey",size:o?u.nb:f,className:a?"hidden":void 0,animationData:c,play:!a,onLoad:p}),i&&r.a.createElement(d.a,{id:"trackingMonkey",size:o?u.nb:f,className:a?"shown":"hidden",animationData:i,playSegment:a?function(){const r=e&&e.length>1||n<0?15+v*(e.length-1):0,a=e.length===t?180:15+v*e.length;return n<1?[a,r]:[r,a]}():void 0,speed:2,noLoop:!0}))});var h=Object(r.h)(Object(a.h)(e=>Object(c.l)(e,["authPhoneNumber","authIsCodeViaApp","authIsLoading","authError"]),(e,t)=>Object(c.l)(t,["setAuthCode","returnToAuthPhoneNumber","clearAuthError"]))(({authPhoneNumber:e,authIsCodeViaApp:t,authIsLoading:n,authError:a,setAuthCode:c,returnToAuthPhoneNumber:u,clearAuthError:s})=>{const d=Object(r.q)(null),[f,h]=Object(r.r)(""),[b,v]=Object(r.r)(!1),[p,g]=Object(r.r)(1);Object(r.n)(()=>{o.k||d.current.focus()},[]);const E=Object(r.m)(e=>{a&&s();const{currentTarget:t}=e;t.value=t.value.replace(/[^\d]+/,"").substr(0,5),t.value!==f&&(h(t.value),b?t.value.length||v(!1):v(!0),f&&f.length>t.value.length?g(-1):g(1),5===t.value.length&&c({code:t.value}))},[a,s,f,b,c]);return r.a.createElement("div",{id:"auth-code-form",className:"custom-scroll"},r.a.createElement("div",{className:"auth-form"},r.a.createElement(m,{code:f,codeLength:5,isTracking:b,trackingDirection:p}),r.a.createElement("h2",null,e,r.a.createElement("div",{className:"auth-number-edit",onClick:()=>u(),role:"button",tabIndex:0,title:"Sign In with another phone number"},r.a.createElement("i",{className:"icon-edit"}))),r.a.createElement("p",{className:"note"},t?r.a.createElement(r.a.Fragment,null,"We have sent the code to the Telegram app",r.a.createElement("br",null),"on your other device."):r.a.createElement(r.a.Fragment,null,"We have sent you an SMS",r.a.createElement("br",null),"with the code.")),r.a.createElement(l.a,{ref:d,id:"sign-in-code",label:"Code",onInput:E,value:f,error:a,autoComplete:"one-time-code",inputMode:"decimal"}),n&&r.a.createElement(i.a,null)))})),b=n(135),v=n(136);var p=Object(r.h)(Object(a.h)(e=>Object(c.l)(e,["authIsLoading","authError","authHint"]),(e,t)=>Object(c.l)(t,["setAuthPassword","clearAuthError"]))(({authIsLoading:e,authError:t,authHint:n,setAuthPassword:a,clearAuthError:o})=>{const[c,l]=Object(r.r)(!1),i=Object(r.m)(e=>{l(e)},[]),u=Object(r.m)(e=>{a({password:e})},[a]);return r.a.createElement("div",{id:"auth-password-form",className:"custom-scroll"},r.a.createElement("div",{className:"auth-form"},r.a.createElement(b.a,{isPasswordVisible:c}),r.a.createElement("h2",null,"Enter Your Password"),r.a.createElement("p",{className:"note"},"Your account is protected with",r.a.createElement("br",null),"an additional password."),r.a.createElement(v.a,{clearError:o,error:t,hint:n,isLoading:e,isPasswordVisible:c,onChangePasswordVisibility:i,onSubmit:u})))})),g=n(30),E=n(117);var j=Object(r.h)(Object(a.h)(e=>Object(c.l)(e,["authIsLoading","authError"]),(e,t)=>Object(c.l)(t,["signUp","clearAuthError","uploadProfilePhoto"]))(({authIsLoading:e,authError:t,signUp:n,clearAuthError:a,uploadProfilePhoto:o})=>{const[c,i]=Object(r.r)(!1),[u,s]=Object(r.r)(),[d,f]=Object(r.r)(""),[m,h]=Object(r.r)("");return r.a.createElement("div",{id:"auth-registration-form",className:"custom-scroll"},r.a.createElement("div",{className:"auth-form"},r.a.createElement("form",{action:"",method:"post",onSubmit:function(e){e.preventDefault(),n({firstName:d,lastName:m}),u&&o({file:u})}},r.a.createElement(E.a,{onChange:s}),r.a.createElement("h2",null,"Your Name"),r.a.createElement("p",{className:"note"},"Enter your name and add",r.a.createElement("br",null),"a profile picture."),r.a.createElement(l.a,{id:"registration-first-name",label:"Name",onChange:function(e){t&&a();const{target:n}=e;f(n.value),i(n.value.length>0)},value:d,error:t,autoComplete:"given-name"}),r.a.createElement(l.a,{id:"registration-last-name",label:"Last Name (optional)",onChange:function(e){const{target:t}=e;h(t.value)},value:m,autoComplete:"family-name"}),c&&r.a.createElement(g.a,{type:"submit",ripple:!0,isLoading:e},"Start Messaging"))))}));let O=null;class y{}y.render=function(e,t){O(e,t)},self.QrCreator=y,function(e){function t(t,n,r,a){var o={},c=e(r,n);c.u(t),c.J(),a=a||0;var l=c.h(),i=c.h()+2*a;return o.text=t,o.level=n,o.version=r,o.O=i,o.a=function(e,t){return t-=a,!(0>(e-=a)||e>=l||0>t||t>=l)&&c.a(e,t)},o}function n(e,t,n,r,a,o,c,l,i,u){function s(t,n,r,a,c,l,i){t?(e.lineTo(n+l,r+i),e.arcTo(n,r,a,c,o)):e.lineTo(n,r)}c?e.moveTo(t+o,n):e.moveTo(t,n),s(l,r,n,r,a,-o,0),s(i,r,a,t,a,0,-o),s(u,t,a,t,n,o,0),s(c,t,n,r,n,0,o)}function r(e,t,n,r,a,o,c,l,i,u){function s(t,n,r,a){e.moveTo(t+r,n),e.lineTo(t,n),e.lineTo(t,n+a),e.arcTo(t,n,t+r,n,o)}c&&s(t,n,o,o),l&&s(r,n,-o,o),i&&s(r,a,-o,-o),u&&s(t,a,o,-o)}function a(e,a){e:{var o=a.text,c=a.v,l=a.N,i=a.K,u=a.P;for(l=Math.max(1,l||1),i=Math.min(40,i||40);l<=i;l+=1)try{var s=t(o,c,l,u);break e}catch(e){}s=void 0}if(!s)return null;for(o=e.getContext("2d"),a.background&&(o.fillStyle=a.background,o.fillRect(a.left,a.top,a.size,a.size)),c=s.O,i=a.size/c,o.beginPath(),u=0;u<c;u+=1)for(l=0;l<c;l+=1){var d=o,f=a.left+l*i,m=a.top+u*i,h=u,b=l,v=s.a,p=f+i,g=m+i,E=h-1,j=h+1,O=b-1,y=b+1,w=Math.floor(Math.min(.5,Math.max(0,a.R))*i),k=v(h,b),N=v(E,O),C=v(E,b);E=v(E,y);var L=v(h,y);y=v(j,y),b=v(j,b),j=v(j,O),h=v(h,O),f=Math.round(f),m=Math.round(m),p=Math.round(p),g=Math.round(g),k?n(d,f,m,p,g,w,!C&&!h,!C&&!L,!b&&!L,!b&&!h):r(d,f,m,p,g,w,C&&h&&N,C&&L&&E,b&&L&&y,b&&h&&j)}return function(e,t){var n=t.fill;if("string"==typeof n)e.fillStyle=n;else{var r=n.type,a=n.colorStops;if(n=n.position.map(e=>Math.round(e*t.size)),"linear-gradient"===r)var o=e.createLinearGradient.apply(e,n);else{if("radial-gradient"!==r)throw Error("Unsupported fill");o=e.createRadialGradient.apply(e,n)}a.forEach(([e,t])=>{o.addColorStop(e,t)}),e.fillStyle=o}}(o,a),o.fill(),e}var o={minVersion:1,maxVersion:40,ecLevel:"L",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:.5,quiet:0};O=function(e,t){var n={};Object.assign(n,o,e),n.N=n.minVersion,n.K=n.maxVersion,n.v=n.ecLevel,n.left=n.left,n.top=n.top,n.size=n.size,n.fill=n.fill,n.background=n.background,n.text=n.text,n.R=n.radius,n.P=n.quiet,t instanceof HTMLCanvasElement?(t.width===n.size&&t.height===n.size||(t.width=n.size,t.height=n.size),t.getContext("2d").clearRect(0,0,t.width,t.height),a(t,n)):((e=document.createElement("canvas")).width=n.size,e.height=n.size,n=a(e,n),t.appendChild(n))}}(function(){function e(a,c){function l(e,t){for(var n=-1;7>=n;n+=1)if(!(-1>=e+n||d<=e+n))for(var r=-1;7>=r;r+=1)-1>=t+r||d<=t+r||(s[e+n][t+r]=0<=n&&6>=n&&(0==r||6==r)||0<=r&&6>=r&&(0==n||6==n)||2<=n&&4>=n&&2<=r&&4>=r)}function i(e,n){for(var c=d=4*a+17,i=Array(c),h=0;h<c;h+=1){i[h]=Array(c);for(var b=0;b<c;b+=1)i[h][b]=null}for(s=i,l(0,0),l(d-7,0),l(0,d-7),c=r.G(a),i=0;i<c.length;i+=1)for(h=0;h<c.length;h+=1){b=c[i];var v=c[h];if(null==s[b][v])for(var p=-2;2>=p;p+=1)for(var g=-2;2>=g;g+=1)s[b+p][v+g]=-2==p||2==p||-2==g||2==g||0==p&&0==g}for(c=8;c<d-8;c+=1)null==s[c][6]&&(s[c][6]=0==c%2);for(c=8;c<d-8;c+=1)null==s[6][c]&&(s[6][c]=0==c%2);for(c=r.w(u<<3|n),i=0;15>i;i+=1)h=!e&&1==(c>>i&1),s[6>i?i:8>i?i+1:d-15+i][8]=h,s[8][8>i?d-i-1:9>i?15-i:14-i]=h;if(s[d-8][8]=!e,7<=a){for(c=r.A(a),i=0;18>i;i+=1)h=!e&&1==(c>>i&1),s[Math.floor(i/3)][i%3+d-8-3]=h;for(i=0;18>i;i+=1)h=!e&&1==(c>>i&1),s[i%3+d-8-3][Math.floor(i/3)]=h}if(null==f){for(e=o.I(a,u),c=function(){var e=[],t=0,n={B:function(){return e},c:function(t){return 1==(e[Math.floor(t/8)]>>>7-t%8&1)},put:function(e,t){for(var r=0;r<t;r+=1)n.m(1==(e>>>t-r-1&1))},f:function(){return t},m:function(n){var r=Math.floor(t/8);e.length<=r&&e.push(0),n&&(e[r]|=128>>>t%8),t+=1}};return n}(),i=0;i<m.length;i+=1)h=m[i],c.put(4,4),c.put(h.b(),r.f(4,a)),h.write(c);for(i=h=0;i<e.length;i+=1)h+=e[i].j;if(c.f()>8*h)throw Error("code length overflow. ("+c.f()+">"+8*h+")");for(c.f()+4<=8*h&&c.put(0,4);0!=c.f()%8;)c.m(!1);for(;!(c.f()>=8*h)&&(c.put(236,8),!(c.f()>=8*h));)c.put(17,8);var E=0;for(h=i=0,b=Array(e.length),v=Array(e.length),p=0;p<e.length;p+=1){var j=e[p].j,O=e[p].o-j;for(i=Math.max(i,j),h=Math.max(h,O),b[p]=Array(j),g=0;g<b[p].length;g+=1)b[p][g]=255&c.B()[g+E];for(E+=j,g=r.C(O),j=t(b[p],g.b()-1).l(g),v[p]=Array(g.b()-1),g=0;g<v[p].length;g+=1)O=g+j.b()-v[p].length,v[p][g]=0<=O?j.c(O):0}for(g=c=0;g<e.length;g+=1)c+=e[g].o;for(c=Array(c),g=E=0;g<i;g+=1)for(p=0;p<e.length;p+=1)g<b[p].length&&(c[E]=b[p][g],E+=1);for(g=0;g<h;g+=1)for(p=0;p<e.length;p+=1)g<v[p].length&&(c[E]=v[p][g],E+=1);f=c}for(e=f,c=-1,i=d-1,h=7,b=0,n=r.F(n),v=d-1;0<v;v-=2)for(6==v&&--v;;){for(p=0;2>p;p+=1)null==s[i][v-p]&&(g=!1,b<e.length&&(g=1==(e[b]>>>h&1)),n(i,v-p)&&(g=!g),s[i][v-p]=g,-1==--h&&(b+=1,h=7));if(0>(i+=c)||d<=i){i-=c,c=-c;break}}}var u=n[c],s=null,d=0,f=null,m=[],h={u:function(t){t=function(t){var n=e.s(t);return{S:function(){return 4},b:function(){return n.length},write:function(e){for(var t=0;t<n.length;t+=1)e.put(n[t],8)}}}(t),m.push(t),f=null},a:function(e,t){if(0>e||d<=e||0>t||d<=t)throw Error(e+","+t);return s[e][t]},h:function(){return d},J:function(){for(var e=0,t=0,n=0;8>n;n+=1){i(!0,n);var a=r.D(h);(0==n||e>a)&&(e=a,t=n)}i(!1,t)}};return h}function t(e,n){if(void 0===e.length)throw Error(e.length+"/"+n);var r=function(){for(var t=0;t<e.length&&0==e[t];)t+=1;for(var r=Array(e.length-t+n),a=0;a<e.length-t;a+=1)r[a]=e[a+t];return r}(),o={c:function(e){return r[e]},b:function(){return r.length},multiply:function(e){for(var n=Array(o.b()+e.b()-1),r=0;r<o.b();r+=1)for(var c=0;c<e.b();c+=1)n[r+c]^=a.i(a.g(o.c(r))+a.g(e.c(c)));return t(n,0)},l:function(e){if(0>o.b()-e.b())return o;for(var n=a.g(o.c(0))-a.g(e.c(0)),r=Array(o.b()),c=0;c<o.b();c+=1)r[c]=o.c(c);for(c=0;c<e.b();c+=1)r[c]^=a.i(a.g(e.c(c))+n);return t(r,0).l(e)}};return o}e.s=function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);128>r?t.push(r):2048>r?t.push(192|r>>6,128|63&r):55296>r||57344<=r?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return t};var n={L:1,M:0,Q:3,H:2},r=function(){function e(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t}var n=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]];return{w:function(t){for(var n=t<<10;0<=e(n)-e(1335);)n^=1335<<e(n)-e(1335);return 21522^(t<<10|n)},A:function(t){for(var n=t<<12;0<=e(n)-e(7973);)n^=7973<<e(n)-e(7973);return t<<12|n},G:function(e){return n[e-1]},F:function(e){switch(e){case 0:return function(e,t){return 0==(e+t)%2};case 1:return function(e){return 0==e%2};case 2:return function(e,t){return 0==t%3};case 3:return function(e,t){return 0==(e+t)%3};case 4:return function(e,t){return 0==(Math.floor(e/2)+Math.floor(t/3))%2};case 5:return function(e,t){return 0==e*t%2+e*t%3};case 6:return function(e,t){return 0==(e*t%2+e*t%3)%2};case 7:return function(e,t){return 0==(e*t%3+(e+t)%2)%2};default:throw Error("bad maskPattern:"+e)}},C:function(e){for(var n=t([1],0),r=0;r<e;r+=1)n=n.multiply(t([1,a.i(r)],0));return n},f:function(e,t){if(4!=e||1>t||40<t)throw Error("mode: "+e+"; type: "+t);return 10>t?8:16},D:function(e){for(var t=e.h(),n=0,r=0;r<t;r+=1)for(var a=0;a<t;a+=1){for(var o=0,c=e.a(r,a),l=-1;1>=l;l+=1)if(!(0>r+l||t<=r+l))for(var i=-1;1>=i;i+=1)0>a+i||t<=a+i||(0!=l||0!=i)&&c==e.a(r+l,a+i)&&(o+=1);5<o&&(n+=3+o-5)}for(r=0;r<t-1;r+=1)for(a=0;a<t-1;a+=1)o=0,e.a(r,a)&&(o+=1),e.a(r+1,a)&&(o+=1),e.a(r,a+1)&&(o+=1),e.a(r+1,a+1)&&(o+=1),(0==o||4==o)&&(n+=3);for(r=0;r<t;r+=1)for(a=0;a<t-6;a+=1)e.a(r,a)&&!e.a(r,a+1)&&e.a(r,a+2)&&e.a(r,a+3)&&e.a(r,a+4)&&!e.a(r,a+5)&&e.a(r,a+6)&&(n+=40);for(a=0;a<t;a+=1)for(r=0;r<t-6;r+=1)e.a(r,a)&&!e.a(r+1,a)&&e.a(r+2,a)&&e.a(r+3,a)&&e.a(r+4,a)&&!e.a(r+5,a)&&e.a(r+6,a)&&(n+=40);for(a=o=0;a<t;a+=1)for(r=0;r<t;r+=1)e.a(r,a)&&(o+=1);return n+Math.abs(100*o/t/t-50)/5*10}}}(),a=function(){for(var e=Array(256),t=Array(256),n=0;8>n;n+=1)e[n]=1<<n;for(n=8;256>n;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;255>n;n+=1)t[e[n]]=n;return{g:function(e){if(1>e)throw Error("glog("+e+")");return t[e]},i:function(t){for(;0>t;)t+=255;for(;256<=t;)t-=255;return e[t]}}}(),o=function(){function e(e,r){switch(r){case n.L:return t[4*(e-1)];case n.M:return t[4*(e-1)+1];case n.Q:return t[4*(e-1)+2];case n.H:return t[4*(e-1)+3]}}var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];return{I:function(t,n){var r=e(t,n);if(void 0===r)throw Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+n);t=r.length/3,n=[];for(var a=0;a<t;a+=1)for(var o=r[3*a],c=r[3*a+1],l=r[3*a+2],i=0;i<o;i+=1){var u=l,s={};s.o=c,s.j=u,n.push(s)}return n}}}();return e}());var w=QrCreator,k=n(8);var N=Object(r.h)(Object(a.h)(e=>Object(c.l)(e,["connectionState","authQrCode"]),(e,t)=>Object(c.l)(t,["returnToAuthPhoneNumber"]))(({connectionState:e,authQrCode:t,returnToAuthPhoneNumber:n})=>{const a=Object(r.q)(null);return Object(r.n)(()=>{if(!t||"connectionStateReady"!==e)return;const n=a.current;n.innerHTML="",n.classList.remove("pre-animate"),w.render({text:"tg://login?token="+t.token,radius:.5,ecLevel:"M",fill:"#4E96D4",size:280},n)},[e,t]),r.a.createElement("div",{id:"auth-qr-form",className:"custom-scroll"},r.a.createElement("div",{className:"auth-form"},r.a.createElement("div",{className:Object(k.a)("qr-container",t&&"pre-animate"),ref:a},!t&&r.a.createElement(i.a,null)),r.a.createElement("h3",null," Log in to Telegram by QR Code"),r.a.createElement("ol",null,r.a.createElement("li",null,r.a.createElement("span",null,"Open Telegram on your phone")),r.a.createElement("li",null,r.a.createElement("span",null,"Go to ",r.a.createElement("b",null,"Settings")," > ",r.a.createElement("b",null,"Devices")," > ",r.a.createElement("b",null,"Scan QR"))),r.a.createElement("li",null,r.a.createElement("span",null,"Point your phone at this screen to confirm login"))),r.a.createElement(g.a,{isText:!0,onClick:n},"Log in by phone number")))}))},90:function(e,t,n){"use strict";var r=n(0),a=n(10),o=n(29);t.a=()=>{const e=Object(o.a)();return Object(r.n)(()=>a.a(e),[e]),a.b}},95:function(e,t,n){"use strict";var r=n(0),a=n(49);var o=n(8),c=n(42),l=n(27),i=n(51),u=n(90),s=n(30),d=n(111);n(137);t.a=e=>{const{title:t,className:n,isOpen:f,header:m,hasCloseButton:h,noBackdrop:b,children:v,onClose:p,onCloseAnimationEnd:g,onEnter:E}=e,{shouldRender:j,transitionClassNames:O}=Object(l.a)(f,g),y=Object(r.q)(null);Object(r.n)(()=>f?Object(a.a)({onEsc:p,onEnter:E}):void 0,[f,p,E]),Object(r.n)(()=>f&&y.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 r=n.findIndex(e=>e.isSameNode(document.activeElement));let a=0;r>=0&&(a=t.shiftKey?r>0?r-1:n.length-1:r<n.length-1?r+1:0),n[a].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}(y.current):void 0,[f]),Object(i.a)(([e])=>(document.body.classList.toggle("has-open-dialog",f),(f||!f&&void 0!==e)&&Object(c.b)(200),()=>{document.body.classList.remove("has-open-dialog")}),[f]);const w=Object(u.a)();if(!j)return;const k=Object(o.a)("Modal",n,O,b&&"transparent-backdrop");return r.a.createElement(d.a,null,r.a.createElement("div",{ref:y,className:k,tabIndex:-1,role:"dialog"},r.a.createElement("div",{className:"modal-container"},r.a.createElement("div",{className:"modal-backdrop",onClick:p}),r.a.createElement("div",{className:"modal-dialog"},m||(t?r.a.createElement("div",{className:"modal-header"},h&&r.a.createElement(s.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:w("Close"),onClick:p},r.a.createElement("i",{className:"icon-close"})),r.a.createElement("div",{className:"modal-title"},t)):void 0),r.a.createElement("div",{className:"modal-content custom-scroll"},v)))))}}}]);