This commit is contained in:
Eduard Kuzmenko 2023-01-16 21:27:55 +04:00
parent 258057b3d7
commit 9c5497a9a7
62 changed files with 69 additions and 69 deletions

4
.env
View File

@ -1,5 +1,5 @@
API_ID=1025907
API_HASH=452b0359b988148995f22ff0f4229750
VERSION=1.7.0
VERSION_FULL=1.7.0 (284)
BUILD=284
VERSION_FULL=1.7.0 (285)
BUILD=285

View File

@ -1,2 +1,2 @@
"use strict";(this.webpackChunktweb=this.webpackChunktweb||[]).push([[231],{3231:(t,e,a)=>{a.r(e),a.d(e,{default:()=>u});var n=a(279),i=a(4159),o=a(236),r=a(3512),h=a(4874);let d;const s=new h.Z("page-signImport",!0,(()=>{var t,e,h,u;(0,n.y)(s.pageEl.firstElementChild,!0),t=void 0,e=void 0,u=function*(){const{dcId:t,token:e,tgAddr:n}=d;let h;try{r.Z.managers.apiManager.setBaseDcId(t);const n=yield r.Z.managers.apiManager.invokeApi("auth.importWebTokenAuthorization",{api_id:i.Z.id,api_hash:i.Z.hash,web_auth_token:e},{dcId:t,ignoreErrors:!0});"auth.authorization"===n._&&(r.Z.managers.apiManager.setUser(n.user),h=a.e(781).then(a.bind(a,5436)))}catch(t){switch(t.type){case"SESSION_PASSWORD_NEEDED":t.handled=!0,h=a.e(774).then(a.bind(a,9437));break;default:{console.error("authorization import error:",t);const e=o.h.authState._;"authStateSignIn"===e?h=a.e(641).then(a.bind(a,810)):"authStateSignQr"===e&&(h=a.e(776).then(a.bind(a,9709)));break}}}location.hash=(null==n?void 0:n.trim())?"#?tgaddr="+encodeURIComponent(n):"",h&&h.then((t=>t.default.mount()))},new((h=void 0)||(h=Promise))((function(a,n){function i(t){try{r(u.next(t))}catch(t){n(t)}}function o(t){try{r(u.throw(t))}catch(t){n(t)}}function r(t){var e;t.done?a(t.value):(e=t.value,e instanceof h?e:new h((function(t){t(e)}))).then(i,o)}r((u=u.apply(t,e||[])).next())}))}),(t=>{d=t,r.Z.managers.appStateManager.pushToState("authState",{_:"authStateSignImport",data:d})})),u=s}}]);
//# sourceMappingURL=231.5e6e69655f5a8e66e2de.chunk.js.map
"use strict";(this.webpackChunktweb=this.webpackChunktweb||[]).push([[231],{3231:(t,e,a)=>{a.r(e),a.d(e,{default:()=>u});var n=a(279),i=a(4159),o=a(236),r=a(3512),h=a(4874);let d;const s=new h.Z("page-signImport",!0,(()=>{var t,e,h,u;(0,n.y)(s.pageEl.firstElementChild,!0),t=void 0,e=void 0,u=function*(){const{dcId:t,token:e,tgAddr:n}=d;let h;try{r.Z.managers.apiManager.setBaseDcId(t);const n=yield r.Z.managers.apiManager.invokeApi("auth.importWebTokenAuthorization",{api_id:i.Z.id,api_hash:i.Z.hash,web_auth_token:e},{dcId:t,ignoreErrors:!0});"auth.authorization"===n._&&(r.Z.managers.apiManager.setUser(n.user),h=a.e(781).then(a.bind(a,5436)))}catch(t){switch(t.type){case"SESSION_PASSWORD_NEEDED":t.handled=!0,h=a.e(442).then(a.bind(a,9437));break;default:{console.error("authorization import error:",t);const e=o.h.authState._;"authStateSignIn"===e?h=a.e(641).then(a.bind(a,810)):"authStateSignQr"===e&&(h=a.e(776).then(a.bind(a,9709)));break}}}location.hash=(null==n?void 0:n.trim())?"#?tgaddr="+encodeURIComponent(n):"",h&&h.then((t=>t.default.mount()))},new((h=void 0)||(h=Promise))((function(a,n){function i(t){try{r(u.next(t))}catch(t){n(t)}}function o(t){try{r(u.throw(t))}catch(t){n(t)}}function r(t){var e;t.done?a(t.value):(e=t.value,e instanceof h?e:new h((function(t){t(e)}))).then(i,o)}r((u=u.apply(t,e||[])).next())}))}),(t=>{d=t,r.Z.managers.appStateManager.pushToState("authState",{_:"authStateSignImport",data:d})})),u=s}}]);
//# sourceMappingURL=231.1462b405fc6da56ba47b.chunk.js.map

View File

@ -1 +1 @@
{"version":3,"file":"231.5e6e69655f5a8e66e2de.chunk.js","mappings":"6KAaA,IAAIA,EAEJ,MAwCMC,EAAO,IAAI,IAAK,mBAAmB,GAAM,K,aAC7C,OAAaA,EAAKC,OAAOC,mBAAmB,G,OAzCb,E,OAAA,E,EAAA,YAC/B,MAAM,KAACC,EAAI,MAAEC,EAAK,OAAEC,GAAUN,EAC9B,IAAIO,EACJ,IACE,oCAA0CH,GAC1C,MAAMI,QAAsB,kCAAwC,mCAAoC,CACtGC,OAAQ,OACRC,SAAU,SACVC,eAAgBN,GACf,CAACD,OAAMQ,cAAc,IAED,uBAApBJ,EAAcK,IACf,gCAAsCL,EAAcM,MACpDP,EAAiB,8B,CAGnB,MAAMQ,GACN,OAAQA,EAAiBC,MACvB,IAAK,0BACFD,EAAiBE,SAAU,EAC5BV,EAAiB,8BACjB,MAGF,QAAS,CACPW,QAAQC,MAAM,8BAA+BJ,GAC7C,MAAMK,EAAe,gBACD,oBAAjBA,EAAoCb,EAAiB,6BAC/B,oBAAjBa,IAAoCb,EAAiB,+BAC7D,K,GAKNc,SAASC,MAAOhB,aAAM,EAANA,EAAQiB,QAAS,YAAcC,mBAAmBlB,GAAU,GACzEC,GACDA,EAAekB,MAAMC,GAAMA,EAAEC,QAAQC,SAEzC,E,YAtCiC,K,iQA0Cf,IACdC,IACF7B,EAAO6B,EACP,yCAA+C,YAAa,CAAChB,EAAG,sBAAuBb,QAAM,IAG/F,G","sources":["webpack://tweb/./src/pages/pageSignImport.ts"],"sourcesContent":["/*\n * https://github.com/morethanwords/tweb\n * Copyright (C) 2019-2021 Eduard Kuzmenko\n * https://github.com/morethanwords/tweb/blob/master/LICENSE\n */\n\nimport {putPreloader} from '../components/putPreloader';\nimport App from '../config/app';\nimport {STATE_INIT} from '../config/state';\nimport rootScope from '../lib/rootScope';\nimport {AuthState} from '../types';\nimport Page from './page';\n\nlet data: AuthState.signImport['data'];\n\nconst importWebToken = async() => {\n const {dcId, token, tgAddr} = data;\n let mountPageAfter: Promise<{default: Page}>;\n try {\n rootScope.managers.apiManager.setBaseDcId(dcId);\n const authorization = await rootScope.managers.apiManager.invokeApi('auth.importWebTokenAuthorization', {\n api_id: App.id,\n api_hash: App.hash,\n web_auth_token: token\n }, {dcId, ignoreErrors: true});\n\n if(authorization._ === 'auth.authorization') {\n rootScope.managers.apiManager.setUser(authorization.user);\n mountPageAfter = import('./pageIm');\n // return;\n }\n } catch(err) {\n switch((err as ApiError).type) {\n case 'SESSION_PASSWORD_NEEDED': {\n (err as ApiError).handled = true;\n mountPageAfter = import('./pagePassword');\n break;\n }\n\n default: {\n console.error('authorization import error:', err);\n const defaultState = STATE_INIT.authState._;\n if(defaultState === 'authStateSignIn') mountPageAfter = import('./pageSignIn');\n else if(defaultState === 'authStateSignQr') mountPageAfter = import('./pageSignQR');\n break;\n }\n }\n }\n\n location.hash = tgAddr?.trim() ? '#?tgaddr=' + encodeURIComponent(tgAddr) : '';\n if(mountPageAfter) {\n mountPageAfter.then((m) => m.default.mount());\n }\n};\n\nconst page = new Page('page-signImport', true, () => {\n putPreloader(page.pageEl.firstElementChild, true);\n importWebToken();\n}, (_data: typeof data) => {\n data = _data;\n rootScope.managers.appStateManager.pushToState('authState', {_: 'authStateSignImport', data});\n});\n\nexport default page;\n"],"names":["data","page","pageEl","firstElementChild","dcId","token","tgAddr","mountPageAfter","authorization","api_id","api_hash","web_auth_token","ignoreErrors","_","user","err","type","handled","console","error","defaultState","location","hash","trim","encodeURIComponent","then","m","default","mount","_data"],"sourceRoot":""}
{"version":3,"file":"231.1462b405fc6da56ba47b.chunk.js","mappings":"6KAaA,IAAIA,EAEJ,MAwCMC,EAAO,IAAI,IAAK,mBAAmB,GAAM,K,aAC7C,OAAaA,EAAKC,OAAOC,mBAAmB,G,OAzCb,E,OAAA,E,EAAA,YAC/B,MAAM,KAACC,EAAI,MAAEC,EAAK,OAAEC,GAAUN,EAC9B,IAAIO,EACJ,IACE,oCAA0CH,GAC1C,MAAMI,QAAsB,kCAAwC,mCAAoC,CACtGC,OAAQ,OACRC,SAAU,SACVC,eAAgBN,GACf,CAACD,OAAMQ,cAAc,IAED,uBAApBJ,EAAcK,IACf,gCAAsCL,EAAcM,MACpDP,EAAiB,8B,CAGnB,MAAMQ,GACN,OAAQA,EAAiBC,MACvB,IAAK,0BACFD,EAAiBE,SAAU,EAC5BV,EAAiB,8BACjB,MAGF,QAAS,CACPW,QAAQC,MAAM,8BAA+BJ,GAC7C,MAAMK,EAAe,gBACD,oBAAjBA,EAAoCb,EAAiB,6BAC/B,oBAAjBa,IAAoCb,EAAiB,+BAC7D,K,GAKNc,SAASC,MAAOhB,aAAM,EAANA,EAAQiB,QAAS,YAAcC,mBAAmBlB,GAAU,GACzEC,GACDA,EAAekB,MAAMC,GAAMA,EAAEC,QAAQC,SAEzC,E,YAtCiC,K,iQA0Cf,IACdC,IACF7B,EAAO6B,EACP,yCAA+C,YAAa,CAAChB,EAAG,sBAAuBb,QAAM,IAG/F,G","sources":["webpack://tweb/./src/pages/pageSignImport.ts"],"sourcesContent":["/*\n * https://github.com/morethanwords/tweb\n * Copyright (C) 2019-2021 Eduard Kuzmenko\n * https://github.com/morethanwords/tweb/blob/master/LICENSE\n */\n\nimport {putPreloader} from '../components/putPreloader';\nimport App from '../config/app';\nimport {STATE_INIT} from '../config/state';\nimport rootScope from '../lib/rootScope';\nimport {AuthState} from '../types';\nimport Page from './page';\n\nlet data: AuthState.signImport['data'];\n\nconst importWebToken = async() => {\n const {dcId, token, tgAddr} = data;\n let mountPageAfter: Promise<{default: Page}>;\n try {\n rootScope.managers.apiManager.setBaseDcId(dcId);\n const authorization = await rootScope.managers.apiManager.invokeApi('auth.importWebTokenAuthorization', {\n api_id: App.id,\n api_hash: App.hash,\n web_auth_token: token\n }, {dcId, ignoreErrors: true});\n\n if(authorization._ === 'auth.authorization') {\n rootScope.managers.apiManager.setUser(authorization.user);\n mountPageAfter = import('./pageIm');\n // return;\n }\n } catch(err) {\n switch((err as ApiError).type) {\n case 'SESSION_PASSWORD_NEEDED': {\n (err as ApiError).handled = true;\n mountPageAfter = import('./pagePassword');\n break;\n }\n\n default: {\n console.error('authorization import error:', err);\n const defaultState = STATE_INIT.authState._;\n if(defaultState === 'authStateSignIn') mountPageAfter = import('./pageSignIn');\n else if(defaultState === 'authStateSignQr') mountPageAfter = import('./pageSignQR');\n break;\n }\n }\n }\n\n location.hash = tgAddr?.trim() ? '#?tgaddr=' + encodeURIComponent(tgAddr) : '';\n if(mountPageAfter) {\n mountPageAfter.then((m) => m.default.mount());\n }\n};\n\nconst page = new Page('page-signImport', true, () => {\n putPreloader(page.pageEl.firstElementChild, true);\n importWebToken();\n}, (_data: typeof data) => {\n data = _data;\n rootScope.managers.appStateManager.pushToState('authState', {_: 'authStateSignImport', data});\n});\n\nexport default page;\n"],"names":["data","page","pageEl","firstElementChild","dcId","token","tgAddr","mountPageAfter","authorization","api_id","api_hash","web_auth_token","ignoreErrors","_","user","err","type","handled","console","error","defaultState","location","hash","trim","encodeURIComponent","then","m","default","mount","_data"],"sourceRoot":""}

View File

@ -1,2 +1,2 @@
"use strict";(this.webpackChunktweb=this.webpackChunktweb||[]).push([[392],{6392:(e,t,n)=>{n.r(t),n.d(t,{default:()=>w});var a=n(4755),o=n(4874),r=n(810),s=n(3083),l=n(4489),i=n(2325),u=n(144),h=n(5565),d=n(3512),c=n(1447),p=n(2521),m=n(2738);let E,g,_,b,C=null,v=null,y=null;const f=()=>{setTimeout((()=>{null==_||_.remove(),null==b||b.remove()}),300)},S=new o.Z("page-authCode",!0,(()=>{S.pageEl.querySelector(".input-wrapper").append(g.container);const e=S.pageEl.querySelector(".phone-edit");(0,m.fc)(e,(()=>r.default.mount()))}),(e=>{if(C=e,v){E.value="";const e=document.createEvent("HTMLEvents");e.initEvent("input",!1,!0),E.dispatchEvent(e)}else v=S.pageEl.getElementsByClassName("phone")[0],y=S.pageEl.getElementsByClassName("sent-type")[0];const t=C.type.length;let o,r;g||(g=new l.Z({label:"Code",name:(0,u.a)(),length:t,onFill:e=>{(e=>{E.setAttribute("disabled","true");const t={phone_number:C.phone_number,phone_code_hash:C.phone_code_hash,phone_code:e};d.Z.managers.apiManager.invokeApi("auth.signIn",t,{ignoreErrors:!0}).then((e=>{switch(e._){case"auth.authorization":d.Z.managers.apiManager.setUser(e.user),n.e(781).then(n.bind(n,5436)).then((e=>{e.default.mount()})),f();break;case"auth.authorizationSignUpRequired":n.e(813).then(n.bind(n,8339)).then((e=>{e.default.mount({phone_number:C.phone_number,phone_code_hash:C.phone_code_hash})})),f()}})).catch((e=>{return t=void 0,a=void 0,r=function*(){let t=!1;switch(e.type){case"SESSION_PASSWORD_NEEDED":t=!0,e.handled=!0,yield(yield n.e(774).then(n.bind(n,9437))).default.mount(),setTimeout((()=>{E.value=""}),300);break;case"PHONE_CODE_EXPIRED":E.classList.add("error"),(0,h.Z)(g.label,(0,i.ag)("PHONE_CODE_EXPIRED"));break;case"PHONE_CODE_EMPTY":case"PHONE_CODE_INVALID":E.classList.add("error"),(0,h.Z)(g.label,(0,i.ag)("PHONE_CODE_INVALID"));break;default:g.label.innerText=e.type}t||g.select(),E.removeAttribute("disabled")},new((o=void 0)||(o=Promise))((function(e,n){function s(e){try{i(r.next(e))}catch(e){n(e)}}function l(e){try{i(r.throw(e))}catch(e){n(e)}}function i(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(s,l)}i((r=r.apply(t,a||[])).next())}));var t,a,o,r}))})(e)}}),E=g.input),g.options.length=t,v.innerText=C.phone_number;const m=C.type;switch(m._){case"auth.sentCodeTypeSms":o="Login.Code.SentSms";break;case"auth.sentCodeTypeApp":o="Login.Code.SentInApp";break;case"auth.sentCodeTypeCall":o="Login.Code.SentCall";break;case"auth.sentCodeTypeFragmentSms":o="PhoneNumber.Code.Fragment.Info";const e=document.createElement("a");(0,p.Z)(e),e.href=m.url,r=[e];break;default:o="Login.Code.SentUnknown",r=[m._]}return(0,h.Z)(y,(0,i.ag)(o,r)),d.Z.managers.appStateManager.pushToState("authState",{_:"authStateAuthCode",sentCode:e}),(()=>{const e=S.pageEl.querySelector(".auth-image"),t=a.Z.isMobile?100:166;if("auth.sentCodeTypeFragmentSms"===C.type._){e.firstElementChild&&(null==_||_.remove(),_=void 0,e.replaceChildren());const n=document.createElement("div");return n.classList.add("media-sticker-wrapper"),e.append(n),c.Z.loadAnimationAsAsset({container:n,loop:!0,autoplay:!0,width:t,height:t},"jolly_roger").then((e=>(b=e,c.Z.waitForFirstFrame(e)))).then((()=>{}))}return e.firstElementChild&&(null==b||b.remove(),b=void 0,e.replaceChildren()),_=new s.Z(g,t),e.append(_.container),_.load()})()}),(()=>{E.focus()})),w=S}}]);
//# sourceMappingURL=392.9ac50c1a23f6d7e7e235.chunk.js.map
"use strict";(this.webpackChunktweb=this.webpackChunktweb||[]).push([[392],{6392:(e,t,n)=>{n.r(t),n.d(t,{default:()=>w});var a=n(4755),o=n(4874),r=n(810),s=n(3083),l=n(4489),i=n(2325),u=n(144),h=n(5565),d=n(3512),c=n(1447),p=n(2521),m=n(2738);let E,g,_,b,C=null,v=null,y=null;const f=()=>{setTimeout((()=>{null==_||_.remove(),null==b||b.remove()}),300)},S=new o.Z("page-authCode",!0,(()=>{S.pageEl.querySelector(".input-wrapper").append(g.container);const e=S.pageEl.querySelector(".phone-edit");(0,m.fc)(e,(()=>r.default.mount()))}),(e=>{if(C=e,v){E.value="";const e=document.createEvent("HTMLEvents");e.initEvent("input",!1,!0),E.dispatchEvent(e)}else v=S.pageEl.getElementsByClassName("phone")[0],y=S.pageEl.getElementsByClassName("sent-type")[0];const t=C.type.length;let o,r;g||(g=new l.Z({label:"Code",name:(0,u.a)(),length:t,onFill:e=>{(e=>{E.setAttribute("disabled","true");const t={phone_number:C.phone_number,phone_code_hash:C.phone_code_hash,phone_code:e};d.Z.managers.apiManager.invokeApi("auth.signIn",t,{ignoreErrors:!0}).then((e=>{switch(e._){case"auth.authorization":d.Z.managers.apiManager.setUser(e.user),n.e(781).then(n.bind(n,5436)).then((e=>{e.default.mount()})),f();break;case"auth.authorizationSignUpRequired":n.e(813).then(n.bind(n,8339)).then((e=>{e.default.mount({phone_number:C.phone_number,phone_code_hash:C.phone_code_hash})})),f()}})).catch((e=>{return t=void 0,a=void 0,r=function*(){let t=!1;switch(e.type){case"SESSION_PASSWORD_NEEDED":t=!0,e.handled=!0,yield(yield n.e(442).then(n.bind(n,9437))).default.mount(),setTimeout((()=>{E.value=""}),300);break;case"PHONE_CODE_EXPIRED":E.classList.add("error"),(0,h.Z)(g.label,(0,i.ag)("PHONE_CODE_EXPIRED"));break;case"PHONE_CODE_EMPTY":case"PHONE_CODE_INVALID":E.classList.add("error"),(0,h.Z)(g.label,(0,i.ag)("PHONE_CODE_INVALID"));break;default:g.label.innerText=e.type}t||g.select(),E.removeAttribute("disabled")},new((o=void 0)||(o=Promise))((function(e,n){function s(e){try{i(r.next(e))}catch(e){n(e)}}function l(e){try{i(r.throw(e))}catch(e){n(e)}}function i(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(s,l)}i((r=r.apply(t,a||[])).next())}));var t,a,o,r}))})(e)}}),E=g.input),g.options.length=t,v.innerText=C.phone_number;const m=C.type;switch(m._){case"auth.sentCodeTypeSms":o="Login.Code.SentSms";break;case"auth.sentCodeTypeApp":o="Login.Code.SentInApp";break;case"auth.sentCodeTypeCall":o="Login.Code.SentCall";break;case"auth.sentCodeTypeFragmentSms":o="PhoneNumber.Code.Fragment.Info";const e=document.createElement("a");(0,p.Z)(e),e.href=m.url,r=[e];break;default:o="Login.Code.SentUnknown",r=[m._]}return(0,h.Z)(y,(0,i.ag)(o,r)),d.Z.managers.appStateManager.pushToState("authState",{_:"authStateAuthCode",sentCode:e}),(()=>{const e=S.pageEl.querySelector(".auth-image"),t=a.Z.isMobile?100:166;if("auth.sentCodeTypeFragmentSms"===C.type._){e.firstElementChild&&(null==_||_.remove(),_=void 0,e.replaceChildren());const n=document.createElement("div");return n.classList.add("media-sticker-wrapper"),e.append(n),c.Z.loadAnimationAsAsset({container:n,loop:!0,autoplay:!0,width:t,height:t},"jolly_roger").then((e=>(b=e,c.Z.waitForFirstFrame(e)))).then((()=>{}))}return e.firstElementChild&&(null==b||b.remove(),b=void 0,e.replaceChildren()),_=new s.Z(g,t),e.append(_.container),_.load()})()}),(()=>{E.focus()})),w=S}}]);
//# sourceMappingURL=392.198d4679664c1bf4c989.chunk.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
"use strict";(this.webpackChunktweb=this.webpackChunktweb||[]).push([[442,774],{2582:(e,t,a)=>{a.d(t,{Z:()=>s});var n=a(2325);class s{constructor(e){this.element=document.body.querySelector("."+e.className),this.container=document.createElement("div"),this.container.className="container center-align",this.imageDiv=document.createElement("div"),this.imageDiv.className="auth-image",this.title=document.createElement("h4"),e.titleLangKey&&this.title.append((0,n.ag)(e.titleLangKey)),this.subtitle=document.createElement("p"),this.subtitle.className="subtitle",e.subtitleLangKey&&this.subtitle.append((0,n.ag)(e.subtitleLangKey)),this.container.append(this.imageDiv,this.title,this.subtitle),e.withInputWrapper&&(this.inputWrapper=document.createElement("div"),this.inputWrapper.className="input-wrapper",this.container.append(this.inputWrapper)),this.element.append(this.container)}}},9437:(e,t,a)=>{a.r(t),a.d(t,{default:()=>v});var n=a(279),s=a(4755),i=a(4874),r=a(4494),l=a(6830),o=a(4425),p=a(2325),c=a(2582),u=a(3910),d=a(2738),h=a(2614),m=a(5565),g=a(1656),b=a(8115),w=a(3512);let y;const v=new i.Z("page-password",!0,(()=>{const e=new c.Z({className:"page-password",withInputWrapper:!0,titleLangKey:"Login.Password.Title",subtitleLangKey:"Login.Password.Subtitle"}),t=(0,r.Z)("btn-primary btn-color-primary"),i=new p.ZP.IntlElement({key:"Login.Next"});t.append(i.element);const v=new l.Z({label:"LoginPassword",name:"password"});let L;y=v.input,e.inputWrapper.append(v.container,t);const Z=()=>(L||(L=window.setInterval(Z,1e4)),w.Z.managers.passwordManager.getState().then((e=>{k=e,k.hint?(0,m.Z)(v.label,(0,h.Z)((0,b.Z)(k.hint))):v.setLabel()})));let k;const S=e=>{if(e&&(0,u.Z)(e),!y.value.length)return void y.classList.add("error");const s=(0,g.Z)([y,t],!0),r=y.value;i.update({key:"PleaseWait"});const l=(0,n.y)(t);v.setValueSilently(""+Math.random()),v.setValueSilently(r),w.Z.managers.passwordManager.check(r,k).then((e=>{"auth.authorization"===e._?(clearInterval(L),a.e(781).then(a.bind(a,5436)).then((e=>{e.default.mount()})),E&&E.remove()):(t.removeAttribute("disabled"),i.update({key:e._}),l.remove())})).catch((e=>{s(),v.input.classList.add("error"),e.type,i.update({key:"PASSWORD_HASH_INVALID"}),y.select(),l.remove(),Z()}))};(0,d.fc)(t,S),y.addEventListener("keypress",(function(e){if(this.classList.remove("error"),i.update({key:"Login.Next"}),"Enter"===e.key)return S()}));const N=s.Z.isMobile?100:166,E=new o.Z(v,N);return e.imageDiv.append(E.container),Promise.all([E.load(),Z()])}),null,(()=>{y.focus(),w.Z.managers.appStateManager.pushToState("authState",{_:"authStatePassword"})}))}}]);
//# sourceMappingURL=442.1e72b0379788f57ec42a.chunk.js.map
"use strict";(this.webpackChunktweb=this.webpackChunktweb||[]).push([[437,442],{2582:(e,t,a)=>{a.d(t,{Z:()=>s});var n=a(2325);class s{constructor(e){this.element=document.body.querySelector("."+e.className),this.container=document.createElement("div"),this.container.className="container center-align",this.imageDiv=document.createElement("div"),this.imageDiv.className="auth-image",this.title=document.createElement("h4"),e.titleLangKey&&this.title.append((0,n.ag)(e.titleLangKey)),this.subtitle=document.createElement("p"),this.subtitle.className="subtitle",e.subtitleLangKey&&this.subtitle.append((0,n.ag)(e.subtitleLangKey)),this.container.append(this.imageDiv,this.title,this.subtitle),e.withInputWrapper&&(this.inputWrapper=document.createElement("div"),this.inputWrapper.className="input-wrapper",this.container.append(this.inputWrapper)),this.element.append(this.container)}}},9437:(e,t,a)=>{a.r(t),a.d(t,{default:()=>v});var n=a(279),s=a(4755),i=a(4874),r=a(4494),l=a(6830),o=a(4425),p=a(2325),c=a(2582),u=a(3910),d=a(2738),h=a(2614),m=a(5565),g=a(1656),b=a(8115),w=a(3512);let y;const v=new i.Z("page-password",!0,(()=>{const e=new c.Z({className:"page-password",withInputWrapper:!0,titleLangKey:"Login.Password.Title",subtitleLangKey:"Login.Password.Subtitle"}),t=(0,r.Z)("btn-primary btn-color-primary"),i=new p.ZP.IntlElement({key:"Login.Next"});t.append(i.element);const v=new l.Z({label:"LoginPassword",name:"password"});let L;y=v.input,e.inputWrapper.append(v.container,t);const Z=()=>(L||(L=window.setInterval(Z,1e4)),w.Z.managers.passwordManager.getState().then((e=>{k=e,k.hint?(0,m.Z)(v.label,(0,h.Z)((0,b.Z)(k.hint))):v.setLabel()})));let k;const S=e=>{if(e&&(0,u.Z)(e),!y.value.length)return void y.classList.add("error");const s=(0,g.Z)([y,t],!0),r=y.value;i.update({key:"PleaseWait"});const l=(0,n.y)(t);v.setValueSilently(""+Math.random()),v.setValueSilently(r),w.Z.managers.passwordManager.check(r,k).then((e=>{"auth.authorization"===e._?(clearInterval(L),a.e(781).then(a.bind(a,5436)).then((e=>{e.default.mount()})),E&&E.remove()):(t.removeAttribute("disabled"),i.update({key:e._}),l.remove())})).catch((e=>{s(),v.input.classList.add("error"),e.type,i.update({key:"PASSWORD_HASH_INVALID"}),y.select(),l.remove(),Z()}))};(0,d.fc)(t,S),y.addEventListener("keypress",(function(e){if(this.classList.remove("error"),i.update({key:"Login.Next"}),"Enter"===e.key)return S()}));const N=s.Z.isMobile?100:166,E=new o.Z(v,N);return e.imageDiv.append(E.container),Promise.all([E.load(),Z()])}),null,(()=>{y.focus(),w.Z.managers.appStateManager.pushToState("authState",{_:"authStatePassword"})}))}}]);
//# sourceMappingURL=437.d40e517d52e5dcf3b754.chunk.js.map

View File

@ -1,2 +1,2 @@
"use strict";(this.webpackChunktweb=this.webpackChunktweb||[]).push([[774,442],{2582:(e,t,a)=>{a.d(t,{Z:()=>s});var n=a(2325);class s{constructor(e){this.element=document.body.querySelector("."+e.className),this.container=document.createElement("div"),this.container.className="container center-align",this.imageDiv=document.createElement("div"),this.imageDiv.className="auth-image",this.title=document.createElement("h4"),e.titleLangKey&&this.title.append((0,n.ag)(e.titleLangKey)),this.subtitle=document.createElement("p"),this.subtitle.className="subtitle",e.subtitleLangKey&&this.subtitle.append((0,n.ag)(e.subtitleLangKey)),this.container.append(this.imageDiv,this.title,this.subtitle),e.withInputWrapper&&(this.inputWrapper=document.createElement("div"),this.inputWrapper.className="input-wrapper",this.container.append(this.inputWrapper)),this.element.append(this.container)}}},9437:(e,t,a)=>{a.r(t),a.d(t,{default:()=>v});var n=a(279),s=a(4755),i=a(4874),r=a(4494),l=a(6830),o=a(4425),p=a(2325),c=a(2582),u=a(3910),d=a(2738),h=a(2614),m=a(5565),g=a(1656),b=a(8115),w=a(3512);let y;const v=new i.Z("page-password",!0,(()=>{const e=new c.Z({className:"page-password",withInputWrapper:!0,titleLangKey:"Login.Password.Title",subtitleLangKey:"Login.Password.Subtitle"}),t=(0,r.Z)("btn-primary btn-color-primary"),i=new p.ZP.IntlElement({key:"Login.Next"});t.append(i.element);const v=new l.Z({label:"LoginPassword",name:"password"});let L;y=v.input,e.inputWrapper.append(v.container,t);const Z=()=>(L||(L=window.setInterval(Z,1e4)),w.Z.managers.passwordManager.getState().then((e=>{k=e,k.hint?(0,m.Z)(v.label,(0,h.Z)((0,b.Z)(k.hint))):v.setLabel()})));let k;const S=e=>{if(e&&(0,u.Z)(e),!y.value.length)return void y.classList.add("error");const s=(0,g.Z)([y,t],!0),r=y.value;i.update({key:"PleaseWait"});const l=(0,n.y)(t);v.setValueSilently(""+Math.random()),v.setValueSilently(r),w.Z.managers.passwordManager.check(r,k).then((e=>{"auth.authorization"===e._?(clearInterval(L),a.e(781).then(a.bind(a,5436)).then((e=>{e.default.mount()})),E&&E.remove()):(t.removeAttribute("disabled"),i.update({key:e._}),l.remove())})).catch((e=>{s(),v.input.classList.add("error"),e.type,i.update({key:"PASSWORD_HASH_INVALID"}),y.select(),l.remove(),Z()}))};(0,d.fc)(t,S),y.addEventListener("keypress",(function(e){if(this.classList.remove("error"),i.update({key:"Login.Next"}),"Enter"===e.key)return S()}));const N=s.Z.isMobile?100:166,E=new o.Z(v,N);return e.imageDiv.append(E.container),Promise.all([E.load(),Z()])}),null,(()=>{y.focus(),w.Z.managers.appStateManager.pushToState("authState",{_:"authStatePassword"})}))}}]);
//# sourceMappingURL=774.b7800d1ffa41840e6620.chunk.js.map
"use strict";(this.webpackChunktweb=this.webpackChunktweb||[]).push([[442,437],{2582:(e,t,a)=>{a.d(t,{Z:()=>s});var n=a(2325);class s{constructor(e){this.element=document.body.querySelector("."+e.className),this.container=document.createElement("div"),this.container.className="container center-align",this.imageDiv=document.createElement("div"),this.imageDiv.className="auth-image",this.title=document.createElement("h4"),e.titleLangKey&&this.title.append((0,n.ag)(e.titleLangKey)),this.subtitle=document.createElement("p"),this.subtitle.className="subtitle",e.subtitleLangKey&&this.subtitle.append((0,n.ag)(e.subtitleLangKey)),this.container.append(this.imageDiv,this.title,this.subtitle),e.withInputWrapper&&(this.inputWrapper=document.createElement("div"),this.inputWrapper.className="input-wrapper",this.container.append(this.inputWrapper)),this.element.append(this.container)}}},9437:(e,t,a)=>{a.r(t),a.d(t,{default:()=>v});var n=a(279),s=a(4755),i=a(4874),r=a(4494),l=a(6830),o=a(4425),p=a(2325),c=a(2582),u=a(3910),d=a(2738),h=a(2614),m=a(5565),g=a(1656),b=a(8115),w=a(3512);let y;const v=new i.Z("page-password",!0,(()=>{const e=new c.Z({className:"page-password",withInputWrapper:!0,titleLangKey:"Login.Password.Title",subtitleLangKey:"Login.Password.Subtitle"}),t=(0,r.Z)("btn-primary btn-color-primary"),i=new p.ZP.IntlElement({key:"Login.Next"});t.append(i.element);const v=new l.Z({label:"LoginPassword",name:"password"});let L;y=v.input,e.inputWrapper.append(v.container,t);const Z=()=>(L||(L=window.setInterval(Z,1e4)),w.Z.managers.passwordManager.getState().then((e=>{k=e,k.hint?(0,m.Z)(v.label,(0,h.Z)((0,b.Z)(k.hint))):v.setLabel()})));let k;const S=e=>{if(e&&(0,u.Z)(e),!y.value.length)return void y.classList.add("error");const s=(0,g.Z)([y,t],!0),r=y.value;i.update({key:"PleaseWait"});const l=(0,n.y)(t);v.setValueSilently(""+Math.random()),v.setValueSilently(r),w.Z.managers.passwordManager.check(r,k).then((e=>{"auth.authorization"===e._?(clearInterval(L),a.e(781).then(a.bind(a,5436)).then((e=>{e.default.mount()})),E&&E.remove()):(t.removeAttribute("disabled"),i.update({key:e._}),l.remove())})).catch((e=>{s(),v.input.classList.add("error"),e.type,i.update({key:"PASSWORD_HASH_INVALID"}),y.select(),l.remove(),Z()}))};(0,d.fc)(t,S),y.addEventListener("keypress",(function(e){if(this.classList.remove("error"),i.update({key:"Login.Next"}),"Enter"===e.key)return S()}));const N=s.Z.isMobile?100:166,E=new o.Z(v,N);return e.imageDiv.append(E.container),Promise.all([E.load(),Z()])}),null,(()=>{y.focus(),w.Z.managers.appStateManager.pushToState("authState",{_:"authStatePassword"})}))}}]);
//# sourceMappingURL=442.645fe71c30545d9700d2.chunk.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
(()=>{"use strict";(()=>{if("undefined"!=typeof __webpack_require__){var e=__webpack_require__.u,t=__webpack_require__.e,r={},i={};__webpack_require__.u=function(t){return e(t)+(r.hasOwnProperty(t)?"?"+r[t]:"")},__webpack_require__.e=function(n){return t(n).catch((function(t){var a=i.hasOwnProperty(n)?i[n]:999999;if(a<1){var o=e(n);throw t.message="Loading chunk "+n+" failed after 999999 retries.\n("+o+")",t.request=o,t}return new Promise((function(e){setTimeout((function(){var t=Date.now();r[n]=t,i[n]=a-1,e(__webpack_require__.e(n))}),3e3)}))}))}}})();const e="undefined"!=typeof window?window:self,t=navigator?navigator.userAgent:null,r=(navigator.userAgent.search(/OS X|iPhone|iPad|iOS/i),navigator.userAgent.toLowerCase().indexOf("android"),/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),(/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&e.MSStream,!!("safari"in e)||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome"))));let i;if(navigator.userAgent.toLowerCase().indexOf("firefox"),navigator.maxTouchPoints>0&&navigator.userAgent.search(/iOS|iPhone OS|Android|BlackBerry|BB10|Series ?[64]0|J2ME|MIDP|opera mini|opera mobi|mobi.+Gecko|Windows Phone/i),r)try{i=+navigator.userAgent.match(/Version\/(.+?) /)[1]>=14}catch(e){i=!1}else i=!0;const n=i,a="undefined"!=typeof ImageBitmap;const o=[[[16219713,13335381],[16757049,16168585],[16765248,16764327],[16768889,16768965]],[[16219713,10771e3],[16757049,14653547],[16765248,15577475],[16768889,16040864]],[[16219713,7354903],[16757049,11233085],[16765248,12812110],[16768889,14194279]],[[16219713,4858889],[16757049,8207886],[16765248,9852201],[16768889,11100983]],[[16219713,2101002],[16757049,4270372],[16765248,5848375],[16768889,6505791]]],s=e=>Math.round(255*Math.min(Math.max(e,0),1));importScripts("rlottie-wasm.js");const h=self.Module;class d{constructor(e,t,r,i){this.reqId=e,this.width=t,this.height=r,this.raw=i}init(e,t){if(!this.dead){this.fps=Math.max(1,Math.min(60,t||60));try{this.handle=c.Api.init(),this.stringOnWasmHeap=allocate(intArrayFromString(e),"i8",0),this.frameCount=c.Api.loadFromData(this.handle,this.stringOnWasmHeap),c.Api.resize(this.handle,this.width,this.height),m(["loaded",this.reqId,this.frameCount,this.fps]),!this.raw&&a&&(this.imageData=new ImageData(this.width,this.height))}catch(e){console.error("init RLottieItem error:",e),m(["error",this.reqId,e])}}}render(e,t){if(!this.dead&&void 0!==this.handle&&!(this.frameCount<e||e<0))try{c.Api.render(this.handle,e);const r=c.Api.buffer(this.handle),i=h.HEAPU8.subarray(r,r+this.width*this.height*4);this.imageData?(this.imageData.data.set(i),createImageBitmap(this.imageData).then((t=>{m(["frame",this.reqId,e,t],[t])}))):(t?t.set(i):t=new Uint8ClampedArray(i),m(["frame",this.reqId,e,t],[t.buffer]))}catch(e){console.error("Render error:",e),this.dead=!0,m(["error",this.reqId,e])}}destroy(){this.dead=!0,void 0!==this.handle&&c.Api.destroy(this.handle)}}const c=new class{constructor(){this.Api={}}initApi(){this.Api={init:h.cwrap("lottie_init","",[]),destroy:h.cwrap("lottie_destroy","",["number"]),resize:h.cwrap("lottie_resize","",["number","number","number"]),buffer:h.cwrap("lottie_buffer","number",["number"]),render:h.cwrap("lottie_render","",["number","number"]),loadFromData:h.cwrap("lottie_load_from_data","number",["number","number"])}}init(){this.initApi(),m(["ready"])}};h.onRuntimeInitialized=function(){c.init()};const u={},f={loadFromData:function(e,t,r,i,n,a){const h=u[e]=new d(e,r,i,a);(function(e){return function(e,t){return new Promise((t=>{const r=new FileReader;r.addEventListener("loadend",(e=>{t(e.target.result)})),r.readAsText(e)}))}(e)})(t).then((t=>{try{if("number"==typeof n&&n>=1&&n<=5){const e=JSON.parse(t);(function(e,t){const r=o[Math.max(t-1,0)],i=e=>{switch(e.ty){case"st":case"fl":(e=>{const t=e.c.k,i=s(t[2])|s(t[1])<<8|s(t[0])<<16,n=r.find((e=>e[0]===i));n&&(t[0]=(n[1]>>16&255)/255,t[1]=(n[1]>>8&255)/255,t[2]=(255&n[1])/255)})(e)}e.hasOwnProperty("it")&&n(e.it)},n=e=>{for(const t of e)i(t)};try{for(const t of e.layers)if(t.shapes)for(const e of t.shapes)e.it?n(e.it):i(e)}catch(r){console.warn("cant apply replacements",r,e,t)}})(e,n),t=JSON.stringify(e)}const e=t.match(/"fr":\s*?(\d+?),/),r=+(null==e?void 0:e[1])||60;h.init(t,r)}catch(r){console.error("Invalid file for sticker:",t),m(["error",e,r])}}))},destroy:function(e){const t=u[e];t&&(t.destroy(),delete u[e])},renderFrame:function(e,t,r){u[e].render(t,r)}};function m(e,t){postMessage({queryMethodListener:e.shift(),queryMethodArguments:e},n?t:void 0)}onmessage=function(e){f[e.data.queryMethod].apply(f,e.data.queryMethodArguments)}})();
//# sourceMappingURL=508.de8eae8b380731cb09e3.chunk.js.map
//# sourceMappingURL=508.dfee8ce6a6ad2606ca95.chunk.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
"use strict";(this.webpackChunktweb=this.webpackChunktweb||[]).push([[810],{810:(e,t,n)=>{n.r(t),n.d(t,{default:()=>N});var a=n(279),i=n(4874),o=n(9807),r=n(4494),s=n(5432),c=n(4159),d=n(2325),l=n(1447),u=n(1405),h=n(9709),g=n(9638),p=n(3910),v=n(2738),y=n(5565),m=n(1656),Z=n(7487),b=n(2398),k=n(7922),L=n(3512),f=n(709),_=n(3855),S=n(5431);let w,x=null;const E=new i.Z("page-sign",!0,(()=>{const e=document.createElement("div");let t,i;e.classList.add("input-wrapper");const u=new S.Z({onCountryChange:(e,n)=>{t=e,i=n,n&&(N.value=N.lastValue="+"+n.country_code,setTimeout((()=>{C.focus(),(0,b.Z)(C,!0)}),0))}}),N=new f.Z({onInput:e=>{l.Z.loadLottieWorkers();const{country:n,code:a}=e||{},o=n?n.name||n.default_name:"";o===u.value||t&&n&&a&&(t===n||i.country_code===a.country_code)||u.override(n,a,o),n||N.value.length-1>1?x.style.visibility="":x.style.visibility="hidden"}}),C=N.input;C.addEventListener("keypress",(e=>{if(!x.style.visibility&&"Enter"===e.key)return T()}));const P=new o.Z({text:"Login.KeepSigned",name:"keepSession",withRipple:!0,checked:!0});P.input.addEventListener("change",(()=>{const e=P.checked;L.Z.managers.appStateManager.pushToState("keepSigned",e),_.Z.toggleStorages(e,!0)})),_.Z.getState().then((e=>{k.Z.isAvailable()?P.checked=e.keepSigned:(P.checked=!1,P.label.classList.add("checkbox-disabled"))})),x=(0,r.Z)("btn-primary btn-color-primary",{text:"Login.Next"}),x.style.visibility="hidden";const T=e=>{e&&(0,p.Z)(e);const t=(0,m.Z)([x,w],!0);(0,y.Z)(x,(0,d.ag)("PleaseWait")),(0,a.y)(x);const i=N.value;L.Z.managers.apiManager.invokeApi("auth.sendCode",{phone_number:i,api_id:c.Z.id,api_hash:c.Z.hash,settings:{_:"codeSettings"}}).then((e=>{n.e(392).then(n.bind(n,6392)).then((t=>t.default.mount(Object.assign(e,{phone_number:i}))))})).catch((e=>{t(),"PHONE_NUMBER_INVALID"===e.type?(N.setError(),(0,y.Z)(N.label,(0,d.ag)("Login.PhoneLabelInvalid")),C.classList.add("error"),(0,y.Z)(x,(0,d.ag)("Login.Next"))):(console.error("auth.sendCode error:",e),x.innerText=e.type)}))};(0,v.fc)(x,T),w=(0,r.Z)("btn-primary btn-secondary btn-primary-transparent primary",{text:"Login.QR.Login"}),w.addEventListener("click",(()=>{h.default.mount()})),e.append(u.container,N.container,P.label,x,w);const I=document.createElement("h4");I.classList.add("text-center"),(0,d.$d)(I,"Login.Title");const M=document.createElement("div");M.classList.add("subtitle","text-center"),(0,d.$d)(M,"Login.StartText"),E.pageEl.querySelector(".container").append(I,M,e),s.Z||setTimeout((()=>{C.focus()}),0),(0,g.Z)(e),L.Z.managers.apiManager.invokeApi("help.getNearestDc").then((e=>{var t;const n=k.Z.getFromCache("langPack");n&&!(null===(t=n.countries)||void 0===t?void 0:t.hash)&&d.ZP.getLangPack(n.lang_code).then((()=>{N.simulateInputEvent()}));const a=new Set([1,2,3,4,5]),i=[e.this_dc];let o;return e.nearest_dc!==e.this_dc&&(o=L.Z.managers.apiManager.getNetworkerVoid(e.nearest_dc).then((()=>{i.push(e.nearest_dc)}))),(o||Promise.resolve()).then((()=>{i.forEach((e=>{a.delete(e)}));const e=[...a],t=()=>{return n=void 0,a=void 0,o=function*(){const n=e.shift();if(!n)return;const a=`dc${n}_auth_key`;if(yield Z.Z.get(a))return t();setTimeout((()=>{L.Z.managers.apiManager.getNetworkerVoid(n).finally(t)}),3e3)},new((i=void 0)||(i=Promise))((function(e,t){function r(e){try{c(o.next(e))}catch(e){t(e)}}function s(e){try{c(o.throw(e))}catch(e){t(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(r,s)}c((o=o.apply(n,a||[])).next())}));var n,a,i,o};t()})),e})).then((e=>{u.value.length||N.value.length||u.selectCountryByIso2(e.country)}))}),(()=>{x&&((0,y.Z)(x,(0,d.ag)("Login.Next")),(0,u.Z)(x,void 0,void 0,!0),x.removeAttribute("disabled")),w&&w.removeAttribute("disabled"),L.Z.managers.appStateManager.pushToState("authState",{_:"authStateSignIn"})})),N=E}}]);
//# sourceMappingURL=810.f272bad8a3948af5c8d0.chunk.js.map
//# sourceMappingURL=810.5010920d57436287604f.chunk.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
1.7.0 (284)
1.7.0 (285)