HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/pwa.sports-crowd.com/www/2309.82658db9a6cbbcfd.js
"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[2309,5553,7934,315],{55553:(D,R,s)=>{s.d(R,{h:()=>a});var v=s(77897),o=s(56610),u=s(41683),E=s(13721),_=s(22882),m=s(37222),t=s(36594),i=s(2978);let a=(()=>{class p{static#t=this.\u0275fac=function(S){return new(S||p)};static#e=this.\u0275mod=i.$C({type:p});static#s=this.\u0275inj=i.G2t({imports:[o.MD,v.bv,E.h,u.Y,_.h.forChild(),m.YN,t.rJ]})}return p})()},54690:(D,R,s)=>{s.r(R),s.d(R,{LoginPageModule:()=>W});var v=s(56610),o=s(77897),u=s(37222),E=s(22882),_=s(36075),m=s(73308),t=s(2978),i=s(29885),a=s(57291),p=s(44796),f=s(96168),T=s(54171),S=s(45588),M=s(83254),O=s(31379);function P(n,L){1&n&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(1),t.JRh(t.bMT(2,1,"EMAIL_REQUIRED")))}function y(n,L){if(1&n&&(t.j41(0,"div",20),t.DNE(1,P,3,3,"div",21),t.k0s()),2&n){const e=t.XpG(),l=t.sdS(13);t.R7$(1),t.Y8G("ngIf",e.statusInvalidEmail||l.errors.required)}}function b(n,L){1&n&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(1),t.JRh(t.bMT(2,1,"PASSWORD_REQUIRED")))}function x(n,L){if(1&n&&(t.j41(0,"div",20),t.DNE(1,b,3,3,"div",21),t.k0s()),2&n){const e=t.XpG(),l=t.sdS(19);t.R7$(1),t.Y8G("ngIf",e.statusInvalidPassword||l.errors.required)}}const A=[{path:"",component:(()=>{class n{constructor(e,l,c,d,r,g,U,I,C,B,w){this.navCtrl=e,this.userProvider=l,this.translateService=c,this.storage=d,this.auth=r,this.alertCtrl=g,this.platform=U,this.sucursalProvider=I,this.utilsService=C,this.lealService=B,this.analyticsService=w,this.statusInvalidEmail=!1,this.statusInvalidPassword=!1,this.translateService.get(["WELCOME_TITLE","UNAUTHORIZES_USER_LOGIN","UNREGISTERED_USER_LOGIN","EMAIL","REMEMBER_PASSWORD","TEXT_REMEMBER_PASSWORD","TEXT_CANCEL_SELECT","BUTTON_SEND","ERROR_PASSWORD_RESET"]).subscribe(h=>{this.toastMessageText={welcomeUser:h.WELCOME_TITLE,UnauthorizedUser:h.UNAUTHORIZES_USER_LOGIN,UnregisteredUser:h.UNREGISTERED_USER_LOGIN,email:h.EMAIL,titleRememberPassword:h.REMEMBER_PASSWORD,textRememberPassword:h.TEXT_REMEMBER_PASSWORD,textCancel:h.TEXT_CANCEL_SELECT,textSend:h.BUTTON_SEND,textErrorPasswordReset:h.ERROR_PASSWORD_RESET}})}ngOnInit(){}doLogin(e){var l=this;this.analyticsService.logEvent("Login Click",this.utilsService.categoryWelcome),e.controls.email.valid?e.controls.password.valid?this.utilsService.presentLoading(this.translateService.instant("all.loading")).then(()=>{this.storage.get("infoHost").then(c=>{c&&this.userProvider.loginAuthMain(e.value.email,c.name_database).subscribe(d=>{"success"==d.status?this.auth.getAccessToken(e.value.email,e.value.password).then(r=>{if(null!=r.m)return this.utilsService.presentToast(3e3,"warning","top",r.m),void this.utilsService.dismissLoading();this.storage.set("token",{access_token:r.access_token,token_refresh:r.refresh_token}),this.userProvider.sessionTime=(new Date).getTime(),this.userProvider.infoUser(e.value.email,e.value.password,r.access_token).then(g=>{"success"==g.status&&(this.userProvider.savePlayerOnesignal(),this.utilsService._HAS_LOGGED_IN=!0,this.storage.set("HAS_LOGGED_IN",!0),this.utilsService.dismissLoading(),this.storage.get("sucursalSelected").then(function(){var U=(0,m.A)(function*(I){I?(yield l.sucursalProvider.updateSucursalUser(I.id,r.access_token)).subscribe(()=>{l.continueRoute(g)},C=>{console.log(C)}):l.continueRoute(g)});return function(I){return U.apply(this,arguments)}}()))},g=>{this.utilsService.dismissLoading(),console.log("error getInfoUser login",g)}).catch(g=>{this.utilsService.dismissLoading(),console.log("error ",g)})}).catch(r=>{401===r.status&&"Unauthorized"===r.statusText&&this.utilsService.presentToast(4e3,"warning","top",this.toastMessageText.UnauthorizedUser),this.utilsService.dismissLoading(),console.log("doLogin error: ",r)}):"user_not_exists"==d.status&&(this.utilsService.presentToast(4e3,"warning","top",this.toastMessageText.UnregisteredUser),this.utilsService.dismissLoading())})})}):this.statusInvalidPassword=!0:this.statusInvalidEmail=!0}continueRoute(e){this.navCtrl.navigateRoot("/app/tabs/home"),this.utilsService.presentToast(3e3,"tertiary","top",this.toastMessageText.welcomeUser+e.user.first_name)}rememberPassword(){var e=this;return(0,m.A)(function*(){e.analyticsService.logEvent("Remember Password Click",e.utilsService.categoryWelcome),yield(yield e.alertCtrl.create({header:e.toastMessageText.titleRememberPassword,message:e.toastMessageText.textRememberPassword,inputs:[{name:"email",type:"email",placeholder:e.toastMessageText.email}],buttons:[{text:e.toastMessageText.textCancel,role:"cancel",cssClass:"secondary",handler:()=>{}},{text:e.toastMessageText.textSend,handler:c=>{if(!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(c.email).toLowerCase()))return e.utilsService.presentToast(4e3,"danger","top","Por favor, ingresa"+(""==c.email?" datos en el campo":" un correo v\xe1lido")),!1;e.utilsService.presentLoading(e.translateService.instant("all.loading")).then(()=>{e.userProvider.rememberPassword(c.email).subscribe(r=>{r.success?(e.utilsService.presentToast(5e3,"success","top",r.data.message),e.utilsService.dismissLoading()):(e.utilsService.presentToast(4e3,"danger","top",r.error),e.utilsService.dismissLoading())},r=>{e.utilsService.dismissLoading(),console.log("error rememberPassword",r)})})}}]})).present()})()}static#t=this.\u0275fac=function(l){return new(l||n)(t.rXU(o.q9),t.rXU(i.D),t.rXU(E.c$),t.rXU(a.n),t.rXU(p.u),t.rXU(o.hG),t.rXU(o.OD),t.rXU(f.g),t.rXU(T.T),t.rXU(S.k),t.rXU(M.c))};static#e=this.\u0275cmp=t.VBU({type:n,selectors:[["page-login"]],decls:36,vars:23,consts:[[1,"ion-no-border"],["slot","start","defaultHref","/welcome"],[1,"ion-text-center"],["scroll-y","false",1,"ion-padding"],["src","../../assets/img/login.png","alt","image_login",1,"imageLogin"],[1,"ion-margin-top",3,"ngSubmit"],["formLogin","ngForm"],["lines","none"],[1,"ion-margin-top"],["type","email","ngModel","","name","email","required","",1,"ion-text-center",3,"placeholder"],["email","ngModel"],["class","ion-text-center inputRequired",4,"ngIf"],["type","password","ngModel","","required","","name","password",1,"ion-text-center",3,"placeholder"],["password","ngModel"],["type","submit","color","primary","size","large","shape","round","expand","block",1,"ion-margin-top","bold"],[1,"ion-text-center","ion-margin-vertical","item-signup","containerRecover"],["color","primary",2,"cursor","pointer","font-weight","bold",3,"click"],["lines","none",1,"ion-text-center","ion-margin-vertical","item-signup"],["routerLink","/signup"],["routerLink","/signup","color","primary"],[1,"ion-text-center","inputRequired"],[4,"ngIf"]],template:function(l,c){if(1&l){const d=t.RV6();t.j41(0,"ion-header",0)(1,"ion-toolbar"),t.nrm(2,"ion-back-button",1),t.j41(3,"ion-title",2),t.EFF(4),t.nI1(5,"translate"),t.k0s()()(),t.j41(6,"ion-content",3),t.nrm(7,"img",4),t.j41(8,"form",5,6),t.bIt("ngSubmit",function(){t.eBV(d);const g=t.sdS(9);return t.Njj(c.doLogin(g))}),t.j41(10,"ion-list",7)(11,"ion-item",8),t.nrm(12,"ion-input",9,10),t.nI1(14,"translate"),t.k0s(),t.DNE(15,y,2,1,"div",11),t.j41(16,"ion-item",8)(17,"app-show-hide-password"),t.nrm(18,"ion-input",12,13),t.nI1(20,"translate"),t.k0s()(),t.DNE(21,x,2,1,"div",11),t.j41(22,"ion-button",14),t.EFF(23),t.nI1(24,"translate"),t.k0s()()(),t.j41(25,"ion-list",15)(26,"ion-label",16),t.bIt("click",function(){return c.rememberPassword()}),t.EFF(27),t.nI1(28,"translate"),t.k0s()(),t.j41(29,"ion-list",17)(30,"ion-label",18),t.EFF(31),t.nI1(32,"translate"),t.k0s(),t.j41(33,"ion-label",19),t.EFF(34),t.nI1(35,"translate"),t.k0s()()()}if(2&l){const d=t.sdS(13),r=t.sdS(19);t.R7$(4),t.JRh(t.bMT(5,9,"LOGIN_TITLE")),t.R7$(8),t.FS9("placeholder",t.bMT(14,11,"EMAIL")),t.R7$(3),t.Y8G("ngIf",d.invalid&&(d.dirty||d.touched)||c.statusInvalidEmail&&d.invalid),t.R7$(3),t.FS9("placeholder",t.bMT(20,13,"PASSWORD")),t.R7$(3),t.Y8G("ngIf",r.invalid&&(r.dirty||r.touched)||c.statusInvalidPassword&&r.invalid),t.R7$(2),t.SpI(" ",t.bMT(24,15,"LOGIN_BUTTON"),""),t.R7$(4),t.SpI(" ",t.bMT(28,17,"REMEMBER_PASSWORD"),""),t.R7$(4),t.JRh(t.bMT(32,19,"NO_ACCOUNT")),t.R7$(3),t.JRh(t.bMT(35,21,"SIGNUP"))}},dependencies:[v.bT,o.el,o.Jm,o.W9,o.eU,o.$w,o.uz,o.he,o.nf,o.BC,o.ai,o.Gw,o.tY,o.N7,_.Wk,u.qT,u.BC,u.cb,u.YS,u.vS,u.cV,O.a,E.D9],styles:[".imageLogin[_ngcontent-%COMP%]{display:block!important;margin:0 auto!important;width:90%!important}ion-content[_ngcontent-%COMP%]{--background: no-repeat center center fixed cover !important;background-size:100%!important;background-position:fixed!important}ion-list[_ngcontent-%COMP%]{background-color:transparent}ion-item[_ngcontent-%COMP%]{--background: transparent}.item-signup[_ngcontent-%COMP%]{display:flex;flex-flow:column;margin:0}.containerRecover[_ngcontent-%COMP%]{font-size:large;border-bottom:1px solid lightgrey;margin:15px 0;padding:15px 0}.bold[_ngcontent-%COMP%]{font-weight:700}"]})}return n})()}];let N=(()=>{class n{static#t=this.\u0275fac=function(l){return new(l||n)};static#e=this.\u0275mod=t.$C({type:n});static#s=this.\u0275inj=t.G2t({imports:[_.iI.forChild(A),_.iI]})}return n})();var G=s(55553);let W=(()=>{class n{static#t=this.\u0275fac=function(l){return new(l||n)};static#e=this.\u0275mod=t.$C({type:n});static#s=this.\u0275inj=t.G2t({imports:[v.MD,o.bv,E.h.forChild(),N,u.YN,G.h]})}return n})()},45588:(D,R,s)=>{s.d(R,{k:()=>_});var v=s(73308),o=s(2978),u=s(3366),E=s(57291);let _=(()=>{class m{constructor(i,a){this.api=i,this.storage=a}userValidation(i){var a=this;this.storage.get("token").then(function(){var p=(0,v.A)(function*(f){f&&(yield a.login(f.access_token)).subscribe(function(){var T=(0,v.A)(function*(S){S.r&&!i.coin_uid&&i.document&&(yield a.register(f.access_token,{})).subscribe(function(){var M=(0,v.A)(function*(O){O.uid?(i.coin_uid=O.uid,a.storage.set("infoUser",i)):(yield a.update(f.access_token)).subscribe(P=>{P.uid&&(i.coin_uid=P.uid,a.storage.set("infoUser",i))},P=>{console.log("Error update leal",P)})});return function(O){return M.apply(this,arguments)}}(),M=>{console.log("Error register leal",M)})});return function(S){return T.apply(this,arguments)}}(),T=>{console.log("Error login leal",T)})});return function(f){return p.apply(this,arguments)}}())}login(i){return this.api.post("leal/login",{},i)}coins(i,a){return this.api.get(`leal/coins/${a}`,i)}register(i,a){return this.api.post("leal/user/register",a,i)}update(i){return this.api.get("leal/user/update",i)}generateOTP(i,a){return this.api.post("leal/payment/generateOTP",a,i)}generateOrderPaymentCoins(i,a){return this.api.post("leal/payment/generateOrderPaymentCoins",a,i)}static#t=this.\u0275fac=function(a){return new(a||m)(o.KVO(u.G),o.KVO(E.n))};static#e=this.\u0275prov=o.jDH({token:m,factory:m.\u0275fac,providedIn:"root"})}return m})()}}]);