(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-86c2967a"],{"0b83":function(t,e,a){"use strict";a("8ae2")},"36ec":function(t,e,a){},5077:function(t,e,a){"use strict";var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"loading-screen"},[e("div",[e("Loading"),t.message?e("div",{staticClass:"loading-screen__message"},[t._v("\n      "+t._s(t.message)+"\n    ")]):t._e()],1)])},r=[],s=a("730d"),o={props:{message:{type:String,default:""}},components:{Loading:s["a"]}},n=o,c=(a("8d73"),a("2877")),l=Object(c["a"])(n,i,r,!1,null,null,null);e["a"]=l.exports},7748:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("LayoutUiPlans",{staticClass:"bg-white",attrs:{hero:!1}},[e("section",{staticClass:"ui-layout__bg-white pb-5"},[e("NewBreadcrumb",{attrs:{links:t.links}}),!t.isReferActive&&t.copyBanner?e("section",{staticClass:"bannerNew__container position-relative"},[e("div",{staticClass:"bannerNew",domProps:{innerHTML:t._s(t.copyBanner)}})]):t._e(),e("div",{staticClass:"container packages"},[e("PackageMacros"),e("PackageDetail",{attrs:{active:t.activeComponent,showTrialPackages:!0,type:"a"},on:{selectProduct:t.selectProduct}})],1),t._e(),e("PackageCoverage"),e("PackageInfo",{attrs:{countryId:t.countryId}}),e("PackageFaqs",{attrs:{countryId:t.countryId}}),e("PackageCta"),t.loading?e("ScreenLoading"):t._e()],1),e("section",{directives:[{name:"show",rawName:"v-show",value:t.countryId,expression:"countryId"}],staticClass:"whatsapp",on:{click:function(e){return t.goWhatsapp()}}},[e("p",[e("span",[t._v(" ¿Tienes preguntas?")]),t._v("Contacta un asesor")]),e("svg",{attrs:{width:"45",height:"45",viewBox:"0 0 45 45",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[e("circle",{attrs:{cx:"22.5",cy:"22.5",r:"22.5",fill:"#20A34D"}}),e("g",{attrs:{"clip-path":"url(#clip0_1911_144586)"}},[e("path",{attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M37.5863 21.2934C37.5914 23.2007 37.2193 25.0901 36.4912 26.853C35.7631 28.6158 34.6935 30.2172 33.3439 31.5649C31.9944 32.9126 30.3916 33.9801 28.6277 34.7058C26.8639 35.4315 24.974 35.8012 23.0667 35.7934C20.6098 35.7989 18.1909 35.1874 16.0317 34.0151L8 36.5555L10.6186 28.7388C9.24345 26.4985 8.51314 23.9221 8.50809 21.2934C8.64605 17.5322 10.2372 13.9711 12.9469 11.3589C15.6566 8.74679 19.2737 7.28725 23.0374 7.28725C26.8011 7.28725 30.4182 8.74679 33.1279 11.3589C35.8376 13.9711 37.4288 17.5322 37.5667 21.2934H37.5863ZM23.0667 9.15795C21.4679 9.15281 19.8838 9.46262 18.4047 10.0697C16.9257 10.6768 15.5807 11.5692 14.4466 12.6961C13.3124 13.823 12.4113 15.1623 11.7948 16.6374C11.1782 18.1125 10.8582 19.6946 10.8531 21.2934C10.8515 23.8455 11.6664 26.3312 13.1786 28.3871L11.6543 32.9012L16.3443 31.3965C17.9226 32.4588 19.7282 33.1357 21.6159 33.3729C23.5035 33.6101 25.4204 33.4009 27.2125 32.7621C29.0045 32.1233 30.6216 31.0728 31.9335 29.6951C33.2455 28.3174 34.2158 26.651 34.7663 24.8299C35.3168 23.0088 35.4321 21.0839 35.103 19.2101C34.7739 17.3363 34.0096 15.5659 32.8715 14.0414C31.7334 12.5169 30.2533 11.2808 28.5504 10.4326C26.8474 9.58446 24.9692 9.14785 23.0667 9.15795ZM30.3949 24.6155C30.3949 24.4592 30.0627 24.3615 29.7109 24.1856C29.3592 24.0097 27.6004 23.1694 27.2878 23.0522C26.9751 22.9349 26.721 22.8763 26.4865 23.228C26.252 23.5798 25.5681 24.3615 25.3531 24.6155C25.1382 24.8695 24.9427 24.8695 24.591 24.6155C23.5363 24.2051 22.5635 23.6095 21.7183 22.8567C20.9561 22.1378 20.2983 21.3155 19.7642 20.414C19.6902 20.2971 19.6652 20.1558 19.6944 20.0205C19.7236 19.8853 19.8048 19.7669 19.9205 19.691C20.0964 19.5346 20.2918 19.2806 20.4677 19.0852C20.6106 18.8993 20.7288 18.6957 20.8194 18.4794C20.8674 18.3856 20.8925 18.2818 20.8925 18.1765C20.8925 18.0712 20.8674 17.9673 20.8194 17.8736C20.8194 17.6977 20.0182 15.9194 19.7055 15.2354C19.3929 14.5515 19.1193 14.571 18.9043 14.571C18.709 14.5608 18.5134 14.5608 18.3181 14.571C17.9382 14.6101 17.5782 14.7595 17.2824 15.0009C16.8772 15.3765 16.5562 15.8336 16.3406 16.3423C16.1251 16.8509 16.0198 17.3995 16.0317 17.9518C16.147 19.2848 16.6496 20.5551 17.4778 21.6061C18.9669 23.9233 21.0804 25.7727 23.5748 26.941C27.19 28.3675 27.19 27.8985 27.8545 27.8204C28.3495 27.7283 28.8195 27.5327 29.2337 27.2465C29.6479 26.9603 29.997 26.5898 30.2581 26.1593C30.4929 25.6321 30.5611 25.0457 30.4535 24.4787L30.3949 24.6155Z",fill:"#EFF0EF"}})]),e("defs",[e("clipPath",{attrs:{id:"clip0_1911_144586"}},[e("rect",{attrs:{width:"30",height:"30",fill:"white",transform:"translate(8 7)"}})])])])]),e("Footer")],1)},r=[],s=(a("8e6e"),a("20d6"),a("75fc")),o=(a("ac6a"),a("456d"),a("6762"),a("2fdb"),a("7f7f"),a("6b54"),a("bd86")),n=(a("c5f6"),a("96cf"),a("3b8d")),c=a("dd24"),l=a("bc3a"),u=a.n(l),d=a("2f62"),p=a("c894"),m=a("9ce6"),g=a("6232"),h=a("272c"),f=a("f358"),v=a("a78e"),_=a.n(v),y=a("9803"),C=a("f226"),b=a("9ade"),k=a("18f0"),P=a("8187"),w=a("b4a0"),x=a("f90a"),O=function(){var t=this,e=t._self._c;return e("div",{staticClass:"section-maps"},[e("div",{staticClass:"section-maps__title"},[t._v("\n    Zona cobertura\n  ")]),e("div",{staticClass:"section-maps__description"},[t._v("\n    Si tu dirección aparece sombreada de verde pertenece a nuestra zona de\n    cobertura.\n  ")]),e("div",{staticClass:"container mt-2 mb-4"},[e("div",{staticClass:"row justify-content-center align-items-center"},[e("div",{staticClass:"col-md-2 col-12 mt-2 mb-2 section-maps__city"},[t._v("\n        Elige tu ciudad:\n      ")]),"peru"===t.country?e("div",{staticClass:"col-md-2 col-5 mt-2 mb-2"},[e("div",{staticClass:"card-check-board"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.city,expression:"city"}],attrs:{type:"radio",value:"piura"},domProps:{checked:t._q(t.city,"piura")},on:{click:function(e){return t.getMaps("piura")},change:function(e){t.city="piura"}}}),t._m(0)])]):t._e(),"peru"===t.country?e("div",{staticClass:"col-md-2 col-5 mt-2 mb-2"},[e("div",{staticClass:"card-check-board"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.city,expression:"city"}],attrs:{type:"radio",value:"lima"},domProps:{checked:t._q(t.city,"lima")},on:{click:function(e){return t.getMaps("lima")},change:function(e){t.city="lima"}}}),t._m(1)])]):t._e(),"mexico"===t.country?e("div",{staticClass:"col-md-2 col-6 mt-2 mb-2"},[e("div",{staticClass:"card-check-board"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.city,expression:"city"}],attrs:{type:"radio",value:"cdmx"},domProps:{checked:t._q(t.city,"cdmx")},on:{click:function(e){return t.getMaps("cdmx")},change:function(e){t.city="cdmx"}}}),t._m(2)])]):t._e(),"mexico"===t.country?e("div",{staticClass:"col-md-2 col-6 mt-2 mb-2"},[e("div",{staticClass:"card-check-board"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.city,expression:"city"}],attrs:{type:"radio",value:"guadalajara"},domProps:{checked:t._q(t.city,"guadalajara")},on:{click:function(e){return t.getMaps("guadalajara")},change:function(e){t.city="guadalajara"}}}),t._m(3)])]):t._e(),"mexico"===t.country?e("div",{staticClass:"col-md-2 col-6 mt-2 mb-2"},[e("div",{staticClass:"card-check-board"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.city,expression:"city"}],attrs:{type:"radio",value:"monterrey"},domProps:{checked:t._q(t.city,"monterrey")},on:{click:function(e){return t.getMaps("monterrey")},change:function(e){t.city="monterrey"}}}),t._m(4)])]):t._e(),"colombia"===t.country?e("div",{staticClass:"col-md-2 col-6 mt-2 mb-2"},[e("div",{staticClass:"card-check-board"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.city,expression:"city"}],attrs:{type:"radio",value:"bogota"},domProps:{checked:t._q(t.city,"bogota")},on:{click:function(e){return t.getMaps("bogota")},change:function(e){t.city="bogota"}}}),t._m(5)])]):t._e()])]),e("div",{staticClass:"page-maps"},[e("div",{staticClass:"form-map"},[e("div",{staticClass:"form-map__main"},[e("div",{staticClass:"form-map__options form-map__geo",on:{click:t.getGeolocation}},[e("img",{attrs:{src:"/images/returniconos/pin.svg",alt:"flag",width:"28"}})]),e("GmapAutocomplete",{staticClass:"form-map__input",attrs:{id:"autocomplete",placeholder:"Buscar"},on:{place_changed:t.changeAutoComplete,click:function(e){t.showMenu=!1}}}),e("div",{staticClass:"form-map__options form-map__action"},["peru"===t.country?e("img",{attrs:{src:"/images/icons/peru.svg",alt:"flag"}}):"mexico"===t.country?e("img",{attrs:{src:"/images/icons/mexico.svg",alt:"flag"}}):"colombia"===t.country?e("img",{attrs:{src:"/images/colombia/flag-square.jpg",alt:"flag"}}):t._e()])],1),t.showInfo?e("div",{staticClass:"alert__cobertura"},[e("div",[t._v("\n          ¡LLegamos a tu dirección! 🎉\n        ")])]):t._e(),t.showMenu?e("div",{staticClass:"form-map__menu"},[e("label",{staticClass:"color-light"},[t._v("Seleccionar país")]),e("ul",{staticClass:"list-locations"},[e("li",[e("nuxt-link",{attrs:{to:"/peru/cobertura/?d=lima"}},[e("img",{attrs:{src:"/images/flags/peru.svg",alt:"flag Perú"}}),e("span",[t._v("Lima - Perú")])])],1),e("li",[e("nuxt-link",{attrs:{to:"/peru/cobertura/?d=piura"}},[e("img",{attrs:{src:"/images/flags/peru.svg",alt:"flag Perú"}}),e("span",[t._v("Piura - Perú")])])],1),e("li",[e("nuxt-link",{attrs:{to:"/mexico/cobertura/?=cdmx"}},[e("img",{attrs:{src:"/images/flags/mexico.svg",alt:"flag Perú"}}),e("span",[t._v("CDMX - México")])])],1),e("li",[e("nuxt-link",{attrs:{to:"/mexico/cobertura/?d=guadalajara"}},[e("img",{attrs:{src:"/images/flags/mexico.svg",alt:"flag Perú"}}),e("span",[t._v("Guadalajara - México")])])],1),e("li",[e("nuxt-link",{attrs:{to:"/mexico/cobertura/?d=monterrey"}},[e("img",{attrs:{src:"/images/flags/mexico.svg",alt:"flag Perú"}}),e("span",[t._v("Monterrey - México")])])],1)])]):t._e()]),e("div",{on:{click:function(e){t.showMenu=!1}}},[e("GmapMap",{ref:"map",staticClass:"content-maps",attrs:{zoom:t.mapZoom,center:t.centerMap,options:t.mapSetting}},[t.showMarker?e("GmapMarker",{attrs:{position:t.pointer,icon:t.iconSetting}}):t._e(),t._l(t.districts,(function(a,i){return e("GmapPolygon",{key:i,attrs:{paths:t.setBranchOffice(a),options:t.polygonSetting}})}))],2)],1)])])},S=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-check-board__box"},[e("div",{staticClass:"card-check-board__border"}),e("div",{staticClass:"mt-2"}),e("div",{staticClass:"card-check-board__head"},[t._v("\n              Piura\n            ")]),e("div",{staticClass:"mt-2"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-check-board__box"},[e("div",{staticClass:"card-check-board__border"}),e("div",{staticClass:"mt-2"}),e("div",{staticClass:"card-check-board__head"},[t._v("\n              Lima\n            ")]),e("div",{staticClass:"mt-2"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-check-board__box"},[e("div",{staticClass:"card-check-board__border"}),e("div",{staticClass:"mt-2"}),e("div",{staticClass:"card-check-board__head"},[t._v("\n              CDMX\n            ")]),e("div",{staticClass:"mt-2"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-check-board__box"},[e("div",{staticClass:"card-check-board__border"}),e("div",{staticClass:"mt-2"}),e("div",{staticClass:"card-check-board__head"},[t._v("\n              Guadalajara\n            ")]),e("div",{staticClass:"mt-2"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-check-board__box"},[e("div",{staticClass:"card-check-board__border"}),e("div",{staticClass:"mt-2"}),e("div",{staticClass:"card-check-board__head"},[t._v("\n              Monterrey\n            ")]),e("div",{staticClass:"mt-2"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-check-board__box"},[e("div",{staticClass:"card-check-board__border"}),e("div",{staticClass:"mt-2"}),e("div",{staticClass:"card-check-board__head"},[t._v("\n              Bogotá\n            ")]),e("div",{staticClass:"mt-2"})])}],j={props:[],data:function(){return{mapSetting:{gestureHandling:"greedy",mapTypeControlOptions:{mapTypeIds:[]},streetViewControl:!1,scaleControl:!0,fullscreenControl:!1,scrollwheel:!0,zoomControlOptions:{position:6}},polygonSetting:{strokeColor:"#56b57c",strokeOpacity:.8,strokeWeight:2,fillColor:"#56b57c",fillOpacity:.25},mapMarker:{lat:0,lng:0},showInfo:!1,showMarker:!1,mapZoom:16,showMenu:!1,districts:[],centerMap:{},country:"peru",city:"lima"}},watchQuery:!0,computed:{pointer:function(){return{lat:this.mapMarker.lat,lng:this.mapMarker.lng}},iconSetting:function(){var t={width:34,height:50,f:"px",b:"px"};return{url:"/images/icons/maps/pin.png",size:t,scaledSize:t}}},created:function(){},mounted:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.searchCoverage();case 2:this.getMaps();case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{searchCoverage:function(){var t=Number(localStorage.getItem("country_id")),e=0===t||t>=4?1:t;switch(e){case 1:this.country="peru",this.city="lima";break;case 2:this.country="mexico",this.city="cmdx";break;case 3:this.country="colombia",this.city="bogota";break;default:this.country="peru",this.city="lima"}},getMaps:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(e){var a,i,r,s,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,a=[],i={lng:-77.062282,lat:-12.065393},r=12,console.log("this.country",this.country),t.next=7,u.a.get("".concat("https://api.backend.manzanaverde.la/api/v1/","/polygons/").concat(this.country));case 7:s=t.sent,o=s.data,o.forEach((function(t){a.push(t.districts)})),"colombia"===this.country?"bogota"===e?(i={lng:-74.072128,lat:4.711014},r=14):i={lng:-74.072128,lat:4.711014}:"peru"===this.country?"piura"===e?(i={lng:-80.6448882,lat:-5.18028839},r=14):(i={lng:-77.062282,lat:-12.065393},0===this.city.length&&(this.city="lima")):"guadalajara"===e?(i={lng:-103.4054536,lat:20.6737777},r=12):"monterrey"===e?(i={lng:-100.4431818,lat:25.6487281},r=12):(i={lng:-99.1610938,lat:19.3998036},0===this.city.length&&(this.city="cdmx")),this.districts=a,this.centerMap=i,this.mapZoom=r,t.next=19;break;case 16:t.prev=16,t.t0=t["catch"](0),console.log(t.t0);case 19:case"end":return t.stop()}}),t,this,[[0,16]])})));function e(e){return t.apply(this,arguments)}return e}(),toggleMenu:function(){this.showMenu=!this.showMenu},changeAutoComplete:function(t){this.showInfo=!1,t.formatted_address.toUpperCase().includes(this.city.toUpperCase())&&(this.centerMap.lat=t.geometry.location.lat(),this.centerMap.lng=t.geometry.location.lng(),this.mapMarker.lat=t.geometry.location.lat(),this.mapMarker.lng=t.geometry.location.lng(),this.mapZoom=17,this.showMarker=!0,this.showInfo=!0)},getGeolocation:function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(this.showPosition)},showPosition:function(t){var e=t.coords;this.mapZoom=17,this.centerMap.lat=Number(e.latitude),this.centerMap.lng=Number(e.longitude),this.mapMarker.lat=Number(e.latitude),this.mapMarker.lng=Number(e.longitude)},setBranchOffice:function(t){var e=[];return t.forEach((function(t){t.polygons.forEach((function(t){var a=JSON.parse(t.polygon),i=[];a[0].forEach((function(t){i.push({lat:t[1],lng:t[0]})})),e.push(i)}))})),e}}},M=j,A=(a("f7c5"),a("2877")),I=Object(A["a"])(M,O,S,!1,null,"5ead73dd",null),T=I.exports,N=a("5077");function E(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function R(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?E(Object(a),!0).forEach((function(e){Object(o["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):E(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var L={components:{LayoutUiPlans:c["a"],WidgetCouponAlternative:p["a"],NewBreadcrumb:y["a"],Footer:C["a"],PackageDetail:b["a"],PackageFaqs:k["a"],PackageInfo:P["a"],PackageCta:w["a"],PackageMacros:x["a"],ScreenLoading:N["a"],PackageCoverage:T},data:function(){return{couponActive:!1,modalLevels:!1,couponM:"",newUser:!0,isNewUser:!0,alertNoti:!1,realCalories:0,mealPlanId:null,branchOfficeId:null,countryId:1,objective:"",promo:{},links:[{link:"Elegir plan",active:!0},{link:"Datos de pago",active:!1},{link:"Pedir con la app",active:!1}],activeComponent:"CompB",packages:{caloric_information:{protein:0}},productsToBuy:[],isReferActive:!1,copyDefault:"<div class='d-flex justify-content-center'><span class='d-none d-md-block'>Pide hoy recibe al día siguiente hábil.</span><strong> &nbsp;¡Todos los planes con 5% de descuento!</strong> </div><small>*Válido para compras de paquetes a partir de almuerzos o cenas.</small>",loading:!0}},watch:{coupon:function(){null!=this.promotion&&(this.goTop(),"package_essential"==this.promotion.package?this.activeComponent="CompB":this.activeComponent="CompA")}},created:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){var e,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.getMealPlanCalculated();case 2:if(e=Number(localStorage.getItem("country_id")),!(0===e||e>=4)){t.next=8;break}return t.next=6,this.getCountryForIp();case 6:t.next=9;break;case 8:this.countryId=e;case 9:localStorage.setItem("plan_id",this.mealPlanId),this.eventPackageNewUser({packages:this.packages}),null===this.directCart&&this.setDirectCart(),a={amount:0,subtotal:0,discount:0,delivery:0,items:0,type:"",package:"",products:[]},this.SET_PLAN_DATA(a);case 14:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),mounted:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:this.scroll&&window.scroll(0,1750),document.getElementById("refer")&&(this.isReferActive=!0);case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),destroyed:function(){},mixins:[m["a"],h["a"],g["a"],f["a"]],computed:R(R(R(R(R(R(R(R({},Object(d["c"])("user",["getProfile"])),Object(d["c"])("marketing",["getPromo"])),Object(d["c"])("minimalAmount",["getMinimalAmount"])),Object(d["e"])("newPlan",["promotion","usePoints","validatingPoints","discountPoints","isCuponActive","dataCoupon","coupon","applyCoupon"])),Object(d["c"])("newPlan",["getProductsGift","getDiscountCoupon","getNameCoupon","getDiscountCouponMonto"])),Object(d["e"])("cart",["products","productsTryal","incentives","productSelected","scroll","directCart"])),Object(d["c"])("cart",["getProducts","getIncentives","getAmountNew","getCountProdAlternate","getProductsTryal","getDirectCart"])),{},{getTextCoupon:function(){if(null!=this.promotion){var t=this.promotion.additionals.map((function(t){return" (".concat(t.quantity,") ").concat(t.name)})).toString();return["a","mm","ea","ba","c"].includes(this.promotion.abbr)?"".concat(t,"."):this.promotion.type_quantity>0?"".concat(this.promotion.type_message,", ").concat(t,"."):"".concat(t,".")}return""},copyBanner:function(){return this.promotion?'Cupón activado tienes <strong class="text-uppercase">'.concat(this.getTextCoupon,"</strong> "):null},checkCoupon:function(){if(this.promotion)return"CompB"==this.activeComponent&&"package_essential"==this.promotion.package||"CompA"==this.activeComponent&&"package_trial"==this.promotion.package},textValidCoupon:function(){return this.promotion?"package_essential"==this.promotion.package?"Válido para Planes Esenciales":"package_trial"==this.promotion.package?"Válido para Planes de Prueba":null:null}}),methods:R(R(R(R(R(R({},Object(d["b"])("user",["GET_OPTIONS_CUSTOMER","GET_DATA_USER","UPDATE_DATA_USER"])),Object(d["d"])("newPlan",["SET_PLAN_DATA","CLEAR_PROMOTION_VALUES","SET_PACKAGES"])),Object(d["d"])("marketing",["setCookieCampaign"])),Object(d["b"])("cart",["GET_PRODUCTS_ALTERNATE","GET_PRODUCTS_TRYAL_ALTERNATE"])),Object(d["d"])("cart",["SET_PRODUCT_CART","SET_SCROLL"])),{},{selectProduct:function(t){this.eventPlanAddPackage(t.id);var e=(this.checkCoupon&&t.discount,t.planPrice);if(this.SET_PLAN_DATA({amount:e,subtotal:e,discount:0,delivery:0,package_discount:t.discount>0,price_package:t.planPrice,price_package_original:t.planPrice,topupAmount:t.topupAmount,type:t.type,package:t.title,imageUrl:t.imageUrl,packageId:t.id}),Object.keys(this.getProfile).length>0&&this.getProfile.hasOwnProperty("user_id"))try{this.$router.push("/upselling-resume")}catch(a){throw new Error("Problem handling something: ".concat(a,"."))}else this.$router.push("/registrate-alternate")},logSession:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,u.a.post("/session/active");case 2:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),goTop:function(){window.scroll(0,0)},goBack:function(){this.$router.go(-1)},getMealPlanCalculated:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){var e,a,i,r,o,n,c,l,d,p,m,g,h,f,v,y,C,b,k,P,w;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e=new URL(window.location.href),!this.getProfile.hasOwnProperty("firstname")){t.next=12;break}return a={gender:this.getProfile.gender,height:this.getProfile.height,weight:this.getProfile.weight,birthday:this.getProfile.birthday,lifeStyle:this.getProfile.lifestyle_label,intensity:"suave",dailyExcersices:this.getProfile.hours,hoursDay:this.getProfile.hours,training:this.getProfile.training,objective:this.getProfile.objetive,branchOfficeId:this.getProfile.branch_office_id},t.next=5,u.a.get("v1/packages/meals",{params:a});case 5:i=t.sent,this.packages=i.data.payload.results,this.loading=!1,this.SET_PACKAGES(i.data.payload.results),this.realCalories=i.data.payload.results.ideal_calories,t.next=61;break;case 12:if(!e.searchParams.get("lifeStyle")||!e.searchParams.get("objetives")){t.next=60;break}if(r=JSON.parse(e.searchParams.get("country")),localStorage.setItem("country_id",r),o=JSON.parse(e.searchParams.get("lifeStyle")),n=JSON.parse(e.searchParams.get("objetives")),c=JSON.parse(e.searchParams.get("ajsAnIonymusId")),l=JSON.parse(e.searchParams.get("ajsUserId")),d=JSON.parse(e.searchParams.get("ajsUserTraits")),this.promo.nameCupon=e.searchParams.get("utm_term"),this.promo.value=e.searchParams.get("utm_term"),this.promo.title=e.searchParams.get("message_refer"),this.promo.description="*Válido para compras de paquetes de almuerzos o cenas.",localStorage.setItem("data_life_style",JSON.stringify(o)),localStorage.setItem("data_objetive",JSON.stringify(n)),localStorage.setItem("ajs_anonymous_id",JSON.stringify(c)),localStorage.setItem("ajs_user_id",JSON.stringify(l)),localStorage.setItem("ajs_user_traits",JSON.stringify(d)),_.a.set("ajs_user_id",JSON.stringify(l),{expires:3}),_.a.set("ajs_anonymous_id",JSON.stringify(c),{expires:3}),p=JSON.parse(localStorage.getItem("data_life_style")),m=JSON.parse(localStorage.getItem("data_objetive")),!p||!m){t.next=58;break}return this.branchOfficeId=p.branch_office_id,g={gender:m.gender,height:p.height,weight:p.weight,birthday:m.birthday,lifeStyle:p.lifeStyle,intensity:p.intensity,dailyExcersices:p.dailyExcersices,hoursDay:p.hoursDay,training:p.training,objective:m.objective,branchOfficeId:p.branch_office_id},t.next=38,u.a.post("register/calculate-meal-plan",g);case 38:return h=t.sent,t.next=41,u.a.get("v1/packages/meals",{params:g});case 41:return f=t.sent,this.realCalories=f.data.payload.results.ideal_calories,this.mealPlanId=h.data.meal_plan.id,this.objective=m.objective,localStorage.setItem("real_calories",this.realCalories),t.next=48,u.a.get("3.0/web/wallet-packages",{params:g});case 48:v=t.sent,y=v.data,C=y.data.attributes,b=C.trial,k=C.essentials,k=this.moveToMiddle(k),b=this.moveToMiddle(b),P=f.data.payload.results.caloric_information,w={package_trial:Object(s["a"])(b),package_essential:Object(s["a"])(k),ideal_calories:this.realCalories,caloric_information:{real_calories:this.realCalories,carbohydrate:P.carbohydrate,protein:P.protein,fat:P.fat,plan_recommended:P.plan_recommended}},this.packages=w,this.SET_PACKAGES(w),this.loading=!1;case 58:t.next=61;break;case 60:this.$router.push("/dashboard");case 61:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),moveToMiddle:function(t){var e=Object(s["a"])(t),a=e.findIndex((function(t){return t.highlighted}));if(-1!==a){var i=e.splice(a,1)[0],r=Math.floor(e.length/2);e.splice(r,0,i)}return e},clearCoupon:function(){this.CLEAR_PROMOTION_VALUES(),this.couponActive=!1},getCountryForIp:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){var e,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,u.a.get("/get-country");case 2:e=t.sent,a=e.data.id_country,a>=1||a<=3?(localStorage.setItem("country_id",a),this.countryId=a):(this.countryId=1,localStorage.setItem("country_id",1));case 5:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),goWhatsapp:function(){var t="https://api.whatsapp.com/send?phone=",e={1:"17863219084",2:"17863213798",3:"17863218569"},a=e[this.countryId],i="¡Hola!%20Me%20gustaría%20conocer%20más%20detalles%20del%20servicio%20de%20Manzana%20Verde",r="".concat(t).concat(a,"&text=").concat(i);return window.open(r,"_blank"),""}})},D=L,U=(a("0b83"),Object(A["a"])(D,i,r,!1,null,null,null));e["default"]=U.exports},"8ae2":function(t,e,a){},"8d73":function(t,e,a){"use strict";a("d9ec")},d9ec:function(t,e,a){},f7c5:function(t,e,a){"use strict";a("36ec")}}]);