<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["switchProfilePin"],{"11a0":function(t,e,i){"use strict";i.r(e);var r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("Popup",{attrs:{width:t.width,margin:t.margin,radiusType:t.radiusType,closePopupEvent:t.closePopup}},[i("div",{staticClass:"profile-switch",attrs:{slot:"component"},slot:"component"},[t.isSetNewPin?t._e():i("p",{staticClass:"profile-switch-pin-title"},[t._v(t._s(t.$t("Please Verify before you create Profile")))]),t.isSetNewPin?i("p",{staticClass:"profile-switch-pin-title"},[t._v(" "+t._s(t.$t("Please Setup a profile pin for this profile to proceed"))+" ")]):t._e(),t.isSetNewPin?i("div",{staticClass:"profile-details"},[i("h3",{staticClass:"profile-details-title"},[t._v(t._s(t.$t("Profile")))]),i("p",{staticClass:"profile-details-name"},[t._v(t._s(t.profile.profilename))])]):t._e(),i("div",{staticClass:"profile-switch-pin"},[i("form",{on:{submit:function(e){return e.preventDefault(),t.submitVerifyOrSetProfile(e)}}},[i("div",{staticClass:"form-group"},[t.formError?i("div",{staticClass:"error-container"},[i("p",{staticClass:"error"},[t._v(t._s(t.formError))])]):t._e(),i("div",{staticClass:"form-control profile-switch-pin-box"},[i("label",[t._v(t._s(t.$t("Enter PIN")))]),i("div",{staticClass:"profile-switch-pin-box-inputs",attrs:{dir:"ltr",id:"pininputs"}},t._l(t.numberOfOtpBlocks,(function(e,r){return i("input",{directives:[{name:"model",rawName:"v-model",value:t.userPin[e-1],expression:"userPin[item - 1]"}],key:r,staticClass:"pin",attrs:{type:"text",maxlength:"1",inputmode:"numeric"},domProps:{value:t.userPin[e-1]},on:{input:[function(i){i.target.composing||t.$set(t.userPin,e-1,i.target.value)},t.grabPin]}})})),0)]),t.isSetNewPin?i("div",{staticClass:"profile-details-dob"},[i("h3",{staticClass:"profile-details-title"},[t._v(t._s(t.$t("Please Enter Date to birth for your main profile")))]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.dateOfBirth,expression:"dateOfBirth"}],staticClass:"profileDate",attrs:{type:"text",id:"addProfileDatePicker",placeholder:""+t.datePlaceholder,onfocus:"(this.type='date')",max:t.maxDateLimit},domProps:{value:t.dateOfBirth},on:{input:function(e){e.target.composing||(t.dateOfBirth=e.target.value)}}})]):t._e()]),i("div",[i("button",{staticClass:"button-primary",class:["z01x1wPo"===t.providerUniqueId?"primary-nammaflix-button":"primary-net5-button"]},[t._v(" "+t._s(t.$t("Submit"))+" ")])])])]),i("br"),t.isLoading?i("div",[i("Loading")],1):t._e()])])},o=[],n=i("5530"),s=(i("99af"),i("159b"),i("d3b7"),i("3ca3"),i("ddb0"),i("e5cf")),a=i("1ee7"),l=i("2f62"),c=(i("0d1c"),i("5b16"),i("9bf5")),u=i("1232"),p=i("102c"),f={props:{closePopupEvent:{type:Function},profile:{type:Object},isSetNewPin:{type:Boolean}},data:function(){return{width:"30%",margin:"15% auto",radiusType:"full",userPin:[],profilePin:null,formError:null,providerUniqueId:a["f"],numberOfOtpBlocks:4,isLoading:!1,dateOfBirth:null,datePlaceholder:this.$t("date of birth"),maxDateLimit:null}},watch:{formError:function(){var t=this;setTimeout((function(){t.formError=null}),2e3)}},mounted:function(){this.setupPin(),this.setMaxDateForDatePicker()},methods:Object(n["a"])(Object(n["a"])(Object(n["a"])({},Object(l["b"])(["switchProfile","updateSubscriber","parentalControlStatus"])),Object(l["d"])(["setProfileid"])),{},{setupPin:function(){var t=this;setTimeout((function(){t.getId=document.getElementById("pininputs"),t.pinFunctionality(t.getId)}),1e3)},setMaxDateForDatePicker:function(){var t=new Date,e=t.getFullYear()-18,i=t.getMonth()+1;this.maxDateLimit="".concat(e,"-").concat(i&lt;10?"0"+i:i,"-").concat(t.getDate()&lt;10?"0"+t.getDate():t.getDate())},grabPin:function(){if(this.userPin.length&gt;3){var t="";this.userPin.forEach((function(e){t+=e})),this.profilePin=t}},submitVerifyOrSetProfile:function(){var t=this;if(this.isLoading=!0,!this.profilePin||this.profilePin&amp;&amp;this.profilePin.length&lt;this.numberOfOtpBlocks)return this.formError=this.$t("Please enter the Pin"),void(this.isLoading=!1);if(this.isSetNewPin&amp;&amp;!this.dateOfBirth)return this.formError=this.$t("Please enter the Date of Birth"),void(this.isLoading=!1);if(this.isSetNewPin){var e={profileid:this.profile.profileid,profilepin:this.profilePin,dob:this.dateOfBirth};this.updateSubscriber(e).then((function(e){if(e.data.success){t.closePopup(),t.setLocalProfileData();var i=t.getCurrentLanguageUrlBase();t.$router.push({name:"addProfile",params:{lang:i}})}else t.userPin=[],t.profilePin="",Object(c["g"])(t.$t(e.data.reason))})).catch((function(t){console.log("Error in Edit Profile -&gt; ",t)}))}else{var i={profileid:this.profile.profileid,pin:{profilepin:this.profilePin}};this.switchProfile(i).then((function(e){if(e.data.reason)t.userPin=[],t.profilePin="",Object(c["g"])(t.$t(e.data.reason)),t.isLoading=!1;else{t.isLoading=!1,localStorage.setItem("sessionToken",e.data.success),localStorage.setItem("refreshtoken",e.data.refreshtoken);try{Object(p["a"])(Object(u["a"])(e.data.success).expiresIn),localStorage.setItem("refresh-token-expire",Object(u["a"])(e.data.success).expiresIn),Object(p["b"])(),t.parentalControlStatus().then((function(t){t.reason||t.data.isenabled&amp;&amp;localStorage.setItem("parentalControlEnabled",t.data.isenabled)}))}catch(o){}localStorage.setItem("currentProfileId",i.profileid),localStorage.setItem("subscriberProfileDetails",JSON.stringify(t.profile)),t.setProfileid(i.profileid);var r=t.getCurrentLanguageUrlBase();t.$router.push({name:"addProfile",params:{lang:r}})}})).catch((function(e){t.isLoading=!1}))}},setLocalProfileData:function(){var t=localStorage.getItem("subscriberProfileDetails");t&amp;&amp;(t=JSON.parse(t),t.profilepin="ENABLED",localStorage.setItem("subscriberProfileDetails",JSON.stringify(t)))},validateOtp:function(t){return this.formError=null,!!t||(this.formError="Please enter pin",!1)},closePopup:function(){console.log("CLOSE POPUP"),this.$emit("closeProfilePinPopup")}}),components:{Popup:function(){return i.e("Popup").then(i.bind(null,"a8ba"))},Loading:function(){return i.e("Loading").then(i.bind(null,"a218"))}},mixins:[s["a"]]},d=f,h=(i("59d2"),i("0c7c")),m=Object(h["a"])(d,r,o,!1,null,"6eb8e8ad",null);e["default"]=m.exports},"18ed":function(t,e,i){"use strict";i("7a90")},"44e8":function(t,e,i){"use strict";i.r(e);var r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("Popup",{attrs:{width:t.width,margin:t.margin,radiusType:t.radiusType,closePopupEvent:t.closePopup}},[i("div",{staticClass:"profile-switch",attrs:{slot:"component"},slot:"component"},[i("p",{staticClass:"profile-switch-pin-title"},[t._v(t._s(t.$t("Enter PIN To Switch Profile")))]),i("div",{staticClass:"profile-switch-pin"},[i("form",{on:{submit:function(e){return e.preventDefault(),t.submitSwitchProfile(e)}}},[i("div",{staticClass:"form-group"},[t.formError?i("div",{staticClass:"error-container"},[i("p",{staticClass:"error"},[t._v(t._s(t.formError))])]):t._e(),i("div",{staticClass:"form-control profile-switch-pin-box"},[i("label",[t._v(t._s(t.$t("Enter PIN")))]),i("div",{staticClass:"profile-switch-pin-box-inputs",attrs:{dir:"ltr",id:"pininputs"}},t._l(t.numberOfOtpBlocks,(function(e,r){return i("input",{directives:[{name:"model",rawName:"v-model",value:t.userPin[e-1],expression:"userPin[item - 1]"}],key:r,staticClass:"pin",attrs:{type:"password",maxlength:"1"},domProps:{value:t.userPin[e-1]},on:{input:[function(i){i.target.composing||t.$set(t.userPin,e-1,i.target.value)},t.grabPin]}})})),0)])]),i("p",{staticClass:"forgot-pin",on:{click:t.onForgotPin}},[t._v(t._s(t.$t("Forgot PIN?")))]),i("div",[i("button",{staticClass:"button-primary",class:["z01x1wPo"===t.providerUniqueId?"primary-nammaflix-button":"primary-net5-button"]},[t._v(" "+t._s(t.$t("submit_profile"))+" ")])])])]),i("br"),t.isLoading?i("div",[i("Loading")],1):t._e()])])},o=[],n=i("5530"),s=(i("159b"),i("d3b7"),i("3ca3"),i("ddb0"),i("e5cf")),a=i("1ee7"),l=i("2f62"),c=i("0c12"),u=(i("0d1c"),i("5b16"),i("9bf5")),p=i("1232"),f=i("102c"),d={props:{closePopupEvent:{type:Function},profile:{type:Object}},data:function(){return{width:"30%",margin:"15% auto",radiusType:"full",userPin:[],profilePin:null,formError:null,providerUniqueId:a["f"],numberOfOtpBlocks:4,isLoading:!1}},watch:{formError:function(){var t=this;setTimeout((function(){t.formError=null}),2e3)}},computed:Object(n["a"])({},Object(l["c"])(["getPlanDeeplinkPath","subscriberid","getPairingFlag","subscriptionList"])),mounted:function(){this.setupPin()},methods:Object(n["a"])(Object(n["a"])(Object(n["a"])({},Object(l["b"])(["switchProfile","fcmMessagingSubscribeToTopic","parentalControlStatus"])),Object(l["d"])(["setProfileid","setKidsMode"])),{},{setupPin:function(){var t=this;setTimeout((function(){t.getId=document.getElementById("pininputs"),t.pinFunctionality(t.getId)}),1e3)},onForgotPin:function(){this.$emit("onForgotPin",this.profile)},grabPin:function(){if(this.userPin.length&gt;3){var t="";this.userPin.forEach((function(e){t+=e})),this.profilePin=t}},submitSwitchProfile:function(){var t=this;if(this.isLoading=!0,!this.profilePin||this.profilePin&amp;&amp;this.profilePin.length&lt;this.numberOfOtpBlocks)return this.formError=this.$t("Please enter the Pin"),void(this.isLoading=!1);var e={profileid:this.profile.profileid,pin:{profilepin:this.profilePin}};this.switchProfile(e).then((function(i){if(i.data.reason)t.userPin=[],t.profilePin="",Object(u["g"])(t.$t(i.data.reason),t.$t("DISMISS")),t.isLoading=!1;else{t.isLoading=!1,localStorage.setItem("sessionToken",i.data.success),localStorage.setItem("refreshtoken",i.data.refreshtoken);try{Object(f["a"])(Object(p["a"])(i.data.success).expiresIn),localStorage.setItem("refresh-token-expire",Object(p["a"])(i.data.success).expiresIn),Object(f["b"])(),t.parentalControlStatus().then((function(t){t.reason||t.data.isenabled&amp;&amp;localStorage.setItem("parentalControlEnabled",t.data.isenabled)}))}catch(s){}localStorage.setItem("currentProfileId",e.profileid),localStorage.setItem("currentProfileIdAdminCheck",e.profileid),localStorage.setItem("subscriberProfileDetails",JSON.stringify(t.profile)),localStorage.setItem("isKidsMode","YES"===t.profile.kidsmode),t.setProfileid(e.profileid);var r="NO"!==e.kidsmode;t.setKidsMode(r);var o=t.getCurrentLanguageUrlBase(),n=window.PROVIDER_SETUP_CONFIG.defaultLanguage;o==n&amp;&amp;(o=null),t.getPairingFlag?t.$router.push({name:"loginWithPinView"}):(!window.selectedPlanInfomationRouting||t.subscriptionList&amp;&amp;t.subscriptionList.length&gt;0?t.$router.push({path:window.storeAfterLoginPath?window.storeAfterLoginPath:o?"/"+o:"/"}):(t.$router.push({name:"Home",params:{lang:o}}),c["a"].$emit("open-home-rzp-modal",window.selectedPlanInfomationRouting),window.selectedPlanInfomationRouting=""),window.storeAfterLoginPath="")}})).catch((function(e){t.isLoading=!1}))},validateOtp:function(t){return this.formError=null,!!t||(this.formError="Please enter pin",!1)},closePopup:function(){console.log("CLOSE POPUP"),this.$emit("closeProfilePinPopup")}}),components:{Popup:function(){return i.e("Popup").then(i.bind(null,"a8ba"))},Loading:function(){return i.e("Loading").then(i.bind(null,"a218"))}},mixins:[s["a"]]},h=d,m=(i("18ed"),i("0c7c")),P=Object(m["a"])(h,r,o,!1,null,"3350dcdb",null);e["default"]=P.exports},"59d2":function(t,e,i){"use strict";i("f374")},"7a90":function(t,e,i){},f374:function(t,e,i){}}]);
//# sourceMappingURL=switchProfilePin.fd9eab02.js.map</pre></body></html>