1"use strict";(self.webpackChunkwm_mi_bait_web=self.webpackChunkwm_mi_bait_web||[]).push([[902],{2182(D,p,a){a.d(p,{V:()=>x});var l=a(2615),h=a(979),s=a(7343),v=a(3664);let x=(()=>{var m;class u{constructor(){this.featureFlagService=(0,l.WQX)(s.y)}transform(o,g){if(!o?.length)return[];if(!(this.featureFlagService.featureFlagsAccess()["prominent-recharge"]??1))return g?[]:o;const{featured:f,normal:E}=(0,h.F)(o);return g?f:E}static#e=m=()=>(this.\u0275fac=function(g){return new(g||u)},this.\u0275pipe=v.EJ8({name:"filterFeatured",type:u,pure:!0}))}return m(),u})()},3902(D,p,a){a.d(p,{ESIM_ROUTES:()=>h});const h=[{path:"",component:a(2852).w,data:{title:"E-SIM | Bait",description:"Adquiere y activa tu E-SIM de Bait en l\xednea, sin salir de casa. Conoce nuestros paquetes de interney recarga tambi\xe9n en l\xednea."}}]},2852(D,p,a){a.d(p,{w:()=>S});var l=a(2408),h=a(885),s=a(2615),v=a(2498),x=a(5558),m=a(9303),u=a(2516),R=a(8107),o=a(2200),g=a(913),M=a(7343),f=a(8846),E=a(6853),y=a(3031),I=a(9366),O=a(6862),C=a(5312),b=a(2182),e=a(3664);function B(n,_){if(1&n){const i=e.RV6();e.j41(0,"app-card-recharge",13),e.bIt("click",function(){const r=s.eBV(i).$implicit,c=e.XpG(3);return s.Njj(c.showModal(r))})("keydown.enter",function(r){return s.eBV(i),s.Njj(r.preventDefault())}),e.k0s()}if(2&n){const i=_.$implicit;e.Y8G("disabledRecharge",!0)("dataCard",i)}}function w(n,_){if(1&n&&(e.j41(0,"section",12),e.DNE(1,B,1,2,"app-card-recharge",8),e.nI1(2,"filterFeatured"),e.k0s()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("ngForOf",e.i5U(2,1,i.rechargesBait,!0))}}function j(n,_){if(1&n){const i=e.RV6();e.j41(0,"app-card-recharge",13),e.bIt("click",function(){const r=s.eBV(i).$implicit,c=e.XpG(2);return s.Njj(c.showModal(r))})("keydown.enter",function(r){return s.eBV(i),s.Njj(r.preventDefault())}),e.k0s()}if(2&n){const i=_.$implicit;e.Y8G("disabledRecharge",!0)("dataCard",i)}}function F(n,_){if(1&n&&(e.j41(0,"div")(1,"div",3)(2,"div")(3,"h2",4),e.EFF(4,"Adquiere tu E-SIM"),e.k0s(),e.nrm(5,"div",5),e.k0s()(),e.DNE(6,w,3,4,"section",6),e.nI1(7,"filterFeatured"),e.j41(8,"section",7),e.DNE(9,j,1,2,"app-card-recharge",8),e.nI1(10,"filterFeatured"),e.k0s(),e.j41(11,"div",9)(12,"p",10),e.EFF(13,"Al dar clic en una de nuestras ofertas est\xe1 aceptando nuestro "),e.j41(14,"a",11),e.EFF(15,"aviso de privacidad"),e.k0s()()()()),2&n){let i;const t=e.XpG();e.R7$(6),e.Y8G("ngIf",null==(i=e.i5U(7,2,t.rechargesBait,!0))?null:i.length),e.R7$(3),e.Y8G("ngForOf",e.i5U(10,5,t.rechargesBait,!1))}}function A(n,_){if(1&n){const i=e.RV6();e.j41(0,"div",23)(1,"app-card-recharge",24),e.bIt("actionToshow",function(r){s.eBV(i);const c=e.XpG(3);return s.Njj(c.showModal(r))})("keydown.enter",function(r){return s.eBV(i),s.Njj(r.preventDefault())}),e.k0s()()}if(2&n){const i=_.$implicit;e.R7$(),e.Y8G("disabledRecharge",!0)("dataCard",i)("showDropDown",!1)}}function W(n,_){if(1&n&&(e.j41(0,"section",22),e.DNE(1,A,2,3,"div",20),e.nI1(2,"filterFeatured"),e.k0s()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("ngForOf",e.i5U(2,1,i.rechargesBait,!0))}}function U(n,_){if(1&n){const i=e.RV6();e.j41(0,"div",23)(1,"app-card-recharge",24),e.bIt("actionToshow",function(r){s.eBV(i);const c=e.XpG(2);return s.Njj(c.showModal(r))})("keydown.enter",function(r){return s.eBV(i),s.Njj(r.preventDefault())}),e.k0s()()}if(2&n){const i=_.$implicit;e.R7$(),e.Y8G("disabledRecharge",!0)("dataCard",i)("showDropDown",!1)}}function k(n,_){if(1&n&&(e.j41(0,"div")(1,"div",14)(2,"h2",15),e.EFF(3,"Adquiere tu E-SIM"),e.k0s(),e.j41(4,"div",16),e.nrm(5,"p",17),e.k0s()(),e.DNE(6,W,3,4,"section",18),e.nI1(7,"filterFeatured"),e.j41(8,"section",19),e.DNE(9,U,2,3,"div",20),e.nI1(10,"filterFeatured"),e.k0s(),e.j41(11,"p",21),e.EFF(12,"Al dar clic en una de nuestras ofertas est\xe1 aceptando nuestro "),e.j41(13,"a",11),e.EFF(14,"aviso de privacidad"),e.k0s()()()),2&n){let i;const t=e.XpG();e.R7$(6),e.Y8G("ngIf",null==(i=e.i5U(7,2,t.rechargesBait,!0))?null:i.length),e.R7$(3),e.Y8G("ngForOf",e.i5U(10,5,t.rechargesBait,!1))}}let S=(()=>{var n;class _{constructor(){this.banner=E.xY.banner,this.bannerMobile=E.xY.bannerMobile,this.tagginExcecute=!1,this.isTrackingInProgress=!1,this.campania={campaign:"",content:"",medium:"",source:"",modulo:""},this._router=(0,s.WQX)(l.Ix),this._route=(0,s.WQX)(l.nX),this._alert=(0,s.WQX)(m.u),this._modal=(0,s.WQX)(g.t),this._pixel=(0,s.WQX)(y.a),this._gtm=(0,s.WQX)(f.AR),this._breakpoint=(0,s.WQX)(h.Q),this._recharge=(0,s.WQX)(I.A),this._captacion=(0,s.WQX)(u.C),this._featureFlag=(0,s.WQX)(M.y),this._breakpoint.observe(["(min-width: 1024px)"]).subscribe(t=>{this.isMobile=!!t.matches})}ngOnInit(){this.getRechargesEsim(),this.validateView(),this.reExcecuteTag(),!this.tagginExcecute&&this.submitJourney("vistaseccion","e-sim")}ngOnChanges(t){t.tagginExcecute?.currentValue&&this.executeTagViewEsim()}ngOnDestroy(){this.queryParamsSub?.unsubscribe()}pushTag(t){this._gtm.pushTag({ecommerce:null}),this._gtm.pushTag(t)}reExcecuteTag(){!this.tagginExcecute&&this._router.url.includes("/e-sim")&&this.gtmPixel()}executeTagViewEsim(){/^\/cambiate-a-bait(\?section=sim)?$/.test(this._router.url)||this.gtmPixel()}gtmPixel(){if(!this.rechargesBait)return;const t=this._pixel.gTMView("view_item_list",this.rechargesBait,"eSIM","Visualizaci\xf3n de opciones");this.pushTag(t),this._pixel.setData(t),this._pixel.sendToMathTag("view_item_list")}
1getRechargesEsim(){this._recharge.rechargesESim.length?this.setRechargesData(this._recharge.rechargesESim):this._recharge.getRecharegeEsimOnSale().subscribe(({recharges:t})=>{this.setRechargesData(t),this.executeTagViewEsim()})}setRechargesData(t){this._recharge.pageRecharges=t,this._recharge.getRechargesByRoute("e-sim","e-sim"),this.rechargesBait=this._recharge.pageRecharges,this.initQueryParamsListener()}initQueryParamsListener(){this.queryParamsSub||(this.queryParamsSub=this._route.queryParams.subscribe(t=>{const r=t.oferta,c=t.section,T=this._router.url.includes("e-sim");if(r&&("esim"===c||"adquiere-tu-esim"===c||T)){const d=t.offeringId?this._recharge.getRechargeByOfferingId(t.offeringId,"esim",+r,t.offeringName):this._recharge.getRechargeByPrice(+r,this.rechargesBait);d&&!this.isTrackingInProgress&&this.showModal(d)}}))}validateView(){this._featureFlag.featureFlagEnabled("e-sim")||this._router.navigate(["/home"])}showModal(t){this._modal.setRecharge(t),this.isTrackingInProgress=!0,this._router.navigate([],{relativeTo:this._route,queryParams:{oferta:t.price,offeringId:t.offerId},queryParamsHandling:"merge",replaceUrl:!0}).then(()=>{this.executeTrackCampaing(t)})}executeTrackCampaing(t){const r=this._route.snapshot.queryParams;if("esim"!==r.section&&!this._router.url.includes("/e-sim"))return void(this.isTrackingInProgress=!1);this.campania={source:r.utm_source||"",medium:r.utm_medium||"",campaign:r.utm_campaign||"",content:r.utm_content||"",modulo:r.utm_term||""};const d=[{field:"campania",value:this.campania.campaign},{field:"contenido",value:this.campania.content},{field:"medio",value:this.campania.medium},{field:"fuente",value:this.campania.source},{field:"modulo",value:this.campania.modulo},{field:"oferta",value:t.offerId}].filter(P=>P.value&&""!==P.value.toString().trim());d.length>0?this.processJourneySequentially(d):this.isTrackingInProgress=!1}processJourneySequentially(t){if(0===t.length)return void(this.isTrackingInProgress=!1);const r=t.shift();r&&this.submitJourney(r.field,r.value).add(()=>{this.processJourneySequentially(t)})}submitJourney(t,r){return this._captacion.uuidESim?this._captacion.journeyEsim(this._captacion.uuidESim,t,r).subscribe():this._captacion.getGuessEsim().pipe((0,v.L)(3),(0,x.n)(()=>this._captacion.journeyEsim(this._captacion.uuidESim,t,r))).subscribe({error:()=>this.handleError()})}handleError(){this.isTrackingInProgress=!1,this._alert.showAlert({message:"Hubo un error al obtener la informaci\xf3n.",type:O.B.error,onAccept:()=>window.location.reload()})}submitJourney$(t,r){return this._captacion.journeyEsim(this._captacion.uuidESim,t,r)}static#e=n=()=>(this.\u0275fac=function(r){return new(r||_)},this.\u0275cmp=e.VBU({type:_,selectors:[["app-esim"]],inputs:{tagginExcecute:"tagginExcecute"},features:[e.Jv_([{provide:"googleTagManagerId",useValue:C.c.tagManagerID.general},f.AR]),e.OA$],decls:4,vars:4,consts:[[4,"ngIf"],["alt","",1,"hidden","sm:block","w-full",3,"src"],["alt","",1,"sm:hidden",3,"src"],[1,"flex","justify-center","pt-10"],[1,"text-center","text-[34px]","px-6"],[1,"w-full","border-b-[7px]","border-[#E9C144]","rounded-full"],["class","flex wrapper flex-wrap justify-center content-center gap-y-6 gap-12 3xl:gap-x-16 mb-6",4,"ngIf"],[1,"flex","wrapper","flex-wrap","justify-center","content-center","gap-y-6","gap-12","3xl:gap-x-16"],["class","mt-6 w-80",3,"disabledRecharge","dataCard","click","keydown.enter",4,"ngFor","ngForOf"],[1,"mb-24","mt-6"],[1,"text-gray-500","text-center","text-xs"],["target","_blank","href","https://bit.ly/3Y1omwk",1,"text-gray-500","text-xs","text-line","underline"],[1,"flex","wrapper","flex-wrap","justify-center","content-center","gap-y-6","gap-12","3xl:gap-x-16","mb-6"],[1,"mt-6","w-80",3,"click","keydown.enter","disabledRecharge","dataCard"],[1,"mb-10","mt-8"],[1,"text-center","font-semibold","text-[24px]"],[1,"flex","content-center","justify-center"],[1,"w-[260px]","border-b-2","border-primary"],["class","flex flex-wrap gap-y-6 gap-28 3xl:gap-x-16 justify-center mt-10 mb-6",4,"ngIf"],[1,"flex","flex-wrap","gap-y-6","gap-28","3xl:gap-x-16","justify-center","mt-10","mb-28"],["class","cursor-pointer",4,"ngFor","ngForOf"],[1,"wrapper","text-gray-500","text-center","text-xs"],[1,"flex","flex-wrap","gap-y-6","gap-28","3xl:gap-x-16","justify-center","mt-10","mb-6"],[1,"curs
1or-pointer"],[1,"mt-6",3,"actionToshow","keydown.enter","disabledRecharge","dataCard","showDropDown"]],template:function(r,c){1&r&&(e.DNE(0,F,16,8,"div",0)(1,k,15,8,"div",0),e.nrm(2,"img",1)(3,"img",2)),2&r&&(e.Y8G("ngIf",c.isMobile),e.R7$(),e.Y8G("ngIf",!c.isMobile),e.R7$(),e.Y8G("src",c.banner,e.B4B),e.R7$(),e.Y8G("src",c.bannerMobile,e.B4B))},dependencies:[o.MD,o.Sq,o.bT,R.D,b.V],encapsulation:2}))}return n(),_})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.