1"use strict";(self["webpackChunkweb_tv_vue"]=self["webpackChunkweb_tv_vue"]||[]).push([[787],{6264:function(e,t,s){s.r(t),s.d(t,{default:function(){return v}});s(62010);var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"md-layout md-alignment-center-center",attrs:{id:"signup-view"}},[t("div",{staticClass:"md-layout md-alignment-center-top",attrs:{id:"signup-container"}},[t("md-steppers",{attrs:{id:"signup-steps","md-active-step":e.activeStep,"md-linear":"","md-vertical":e.isMobile},on:{"update:mdActiveStep":function(t){e.activeStep=t},"update:md-active-step":function(t){e.activeStep=t}}},[t("md-step",{attrs:{id:"email","md-label":"Enter Your Email","md-done":e.done.email,"md-error":e.emailExists?"Email Already in Use":e.emailErrorText},on:{"update:mdDone":function(t){return e.$set(e.done,"email",t)},"update:md-done":function(t){return e.$set(e.done,"email",t)}}},[t("ValidationObserver",{ref:"signupEmail",scopedSlots:e._u([{key:"default",fn:function(s){return[t("div",{staticClass:"step-container md-layout md-alignment-center-center"},[t("form",{staticClass:"signup-step-form",on:{submit:function(t){return t.preventDefault(),s.handleSubmit(e.onSubmitEmail)}}},[t("ValidationProvider",{staticClass:"md-layout-item md-size-100",attrs:{mode:"aggressive",debounce:500,name:"email",rules:"required|email"},scopedSlots:e._u([{key:"default",fn:function(s){var i=s.errors;return[t("md-field",{class:{"md-invalid":i.length||e.emailExists}},[t("label",[e._v("Email")]),t("md-input",{attrs:{name:"email",type:"email",required:""},model:{value:e.email,callback:function(t){e.email=t},expression:"email"}}),t("span",{staticClass:"md-helper-text"},[e._v("You'll be using this email to log in")]),t("span",{staticClass:"md-error"},[e._v(e._s(i[0]||(e.emailExists?"Email Already in Use":void 0)))])],1)]}}],null,!0)}),e._l(e.settings.signupFields,(function(s){return t("div",{key:s.id,attrs:{id:"custom-signup-fields"}},[t("ValidationProvider",{staticClass:"md-layout-item md-size-100",attrs:{mode:"aggressive",name:s.label,rules:e.getFieldRules(s)},scopedSlots:e._u([{key:"default",fn:function(i){var n=i.errors;return[s.attributes.before&&"hidden"!==s.type?t("div",{staticClass:"md-field field-info",domProps:{innerHTML:e._s(s.attributes.before)}}):e._e(),"hidden"===s.type?t("input",{attrs:{type:"hidden",name:s.name}}):t("md-field",{class:{"md-invalid":n.length}},[t("label",[e._v(e._s(s.label))]),"input"===s.element?t("md-input",{attrs:{placeholder:"date"===s.type?s.label:"",name:s.name,type:s.type,maxlength:s.attributes.maxlength,minlength:s.attributes.minlength,min:s.attributes.min,max:s.attributes.max,required:s.required},model:{value:e.customFields[s.id],callback:function(t){e.$set(e.customFields,s.id,t)},expression:"customFields[field.id]"}}):e._e(),"select"===s.element?t("md-select",{attrs:{name:s.name},model:{value:e.customFields[s.id],callback:function(t){e.$set(e.customFields,s.id,t)},expression:"customFields[field.id]"}}
1,e._l(s.options,(function(s){return t("md-option",{key:s.value,attrs:{value:s.value}},[e._v(" "+e._s(s.text)+" ")])})),1):e._e(),"textarea"===s.element?t("md-textarea",{attrs:{name:s.name,maxlength:s.attributes.maxlength,minlength:s.attributes.minlength,required:s.required},model:{value:e.customFields[s.id],callback:function(t){e.$set(e.customFields,s.id,t)},expression:"customFields[field.id]"}}):e._e(),t("span",{staticClass:"md-error"},[e._v(e._s(n[0]))])],1),s.attributes.after&&"hidden"!==s.type?t("div",{staticClass:"md-field field-info",domProps:{innerHTML:e._s(s.attributes.after)}}):e._e()]}}],null,!0)})],1)})),t("div",{staticClass:"submit-container"},[t("div",{staticClass:"spinner md-layout md-alignment-center-center"},[t("md-progress-spinner",{directives:[{name:"show",rawName:"v-show",value:e.sending,expression:"sending"}],attrs:{"md-mode":"indeterminate"}})],1),t("md-button",{directives:[{name:"show",rawName:"v-show",value:!e.sending,expression:"!sending"}],staticClass:"submit-button md-raised md-primary",attrs:{disabled:e.sending||s.invalid||e.authed,type:"submit"}},[e._v("Continue ")])],1),e.showLoginLink?t("div",{staticClass:"already-have-an-account-link"},[e._v(" Already have an account?"),t("br"),e.authed?e._e():t("router-link",{staticClass:"md-button md-primary md-theme-default",attrs:{to:"/login"}},[e._v("Login")])],1):e._e()],2)])]}}])})],1),t("md-step",{attrs:{id:"password","md-label":"Create a Password","md-done":e.done.password,"md-error":!e.passwordErrorText?"":" "},on:{"update:mdDone":function(t){return e.$set(e.done,"password",t)},"update:md-done":function(t){return e.$set(e.done,"password",t)}}},[t("ValidationObserver",{ref:"signupPassword",scopedSlots:e._u([{key:"default",fn:function(s){return[t("div",{staticClass:"step-container md-layout md-alignment-center-center"},[t("form",{staticClass:"signup-step-form",on:{submit:function(t){return t.preventDefault(),s.handleSubmit(e.onSubmitPassword)}}},[t("ValidationProvider",{staticClass:"md-layout-item md-size-100",attrs:{mode:"aggressive",debounce:500,name:"Password",rules:"required|min:8|password"},scopedSlots:e._u([{key:"default",fn:function(s){var i=s.errors,n=s.touched;return[t("md-field",{class:{"md-invalid":(i.length||e.passwordErrorText)&&n}},[t("label",[e._v("Password")]),t("md-input",{attrs:{name:"password",type:"password",required:""},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}}),t("span",{staticClass:"md-error"},[e._v(e._s(i[0]||e.passwordErrorText))])],1)]}}],null,!0)}),t("PasswordRater",{staticClass:"password-rater",attrs:{password:e.password,"user-inputs":e.userInputs}}),t("div",{staticClass:"submit-container"},[t("div",{staticClass:"spinner md-layout md-alignment-center-center"},[t("md-progress-spinner",{directives:[{name:"show",rawName:"v-show",value:e.sending,expression:"sending"}],attrs:{"md-mode":"indeterminate"}})],1),t("md-button",{directives:[{name:"show",rawName:"v-show",value:!e.sending,expression:"!sending"}],staticClass:"submit-button md-raised md-primary",attrs:{disabled:e.sending||s.invalid||e.authed,type:"submit"}},[e._v("Continue ")])],1)],1)])]}}])})],1),e.settings.hasSubscriptions?t("md-step",{attrs:{id:"subscription","md-label":e.subStepTitle,"md-done":e.done.subscription},on:{"update:mdDone":function(t){return e.$set(e.done,"subscription",t)},"update:md-done":function(t){return e.$set(e.done,"subscription",t)}}},[e.authed?t("subscribe-form",{attrs:{id:"subscribe-step-form",selected:e.subscription},on:{loaded:e.onSubFormLoaded,finished:e.onSubscriptionFinished}}):e._e()],1):e._e()],1),"password"===e.activeStep?t("div",{staticClass:"captcha-terms md-caption"},[e._v(" This site is protected by reCAPTCHA and the Google "),t("a",{attrs:{href:"https://policies.google.com/privacy"}},[e._v("Privacy Policy")]),e._v(" and "),t("a",{attrs:{href:"https://policies.google.com/terms"}},[e._v("Terms of Service")]),e._v(" apply. ")]):e._e()],1)])},n=[],r=s(9217),a=s(24634),o=(s(44114),s(26099),s(47764),s(62953),s(15261)),d=function(){return Promise.resolve().then(s.bind(s,24744))},u=function(){return s.e(263).then(s.bind(s,43623))},l={name:"SignupView",components:{ValidationProvider:o.LW,ValidationObserver:o.Ce,SubscribeForm:d,PasswordRater:u},props:{redirect:{type:String,default:"/"},subscription:{type:String,default:""}},data:function(){return{activeStep:"email",email:"",password:"",sending:!1,emailExists:!1,passwordErrorText:"",emailErrorText:"",showLoginLink:!1,done:{email:!1,password:!1,subscription:!1},settings:{},customFields:{},subIsPreselected:!1,authed:!1}},computed:{isMobile:function(){return"xs"===this.$mq||"sm"===this.$mq},userInputs:function(){return[this.email]},subStepTitle:function(){var e,t;return this.subIsPreselected?"Payment Info":null!==(e=null===(t=this.settings.subscribeOptions)||void 0===t?void 0:t.chooseSubscriptionTabText)&&void 0!==e?e:"Choose Your Subscription"}},watch:{email:function(e,t){t!=this.email&&(this.emailExists=!1)},subscription:{handler:function(e){this.subIsPreselected=!!e},immediate:!0}},created:function(){var e=this;return(0,a.A)((0,r.A)().m((function t(){var s;return(0,r.A)().w((function(t){while(1)switch(t.n){case 0:return e.authed=e.$gideo.authed,t.n=1,e.$appSettings;case 1:e.settings=t.v,e.settingsLoaded=!0,s=function(){e.authed=e.$gideo.authed,e.showLoginLink=!1},e.$gideo.bus.$on("logged-in",s),e.$gideo.bus.$on("logged-out",s);case 2:return t.a(2)}}),t)})))()},methods:{onSubmitEmail:function(){var e=this;return(0,a.A)((0,r.A)().m((function t(){var s,i;return(0,r.A)().w((function(t){while(1)switch(t.n){case 0:return e.sending=!0,e.emailErrorText="",e.passwordErrorText="",t.p=1,t.n=2,e.$gideo.checkSignupFields(e.email,e.customFields);case 2:e.emailExists=!1,e.done.email=!0,e.activeStep="password",t.n=4;break;case 3:t.p=3,i=t.v,409===(null===(s=i.response)||void 0===s?void 0:s.status)?(e.emailExists=!0,e.showLoginLink=!0):e.emailErrorText=i.userMessage||"There was an unknown issue while trying to create your account";case 4:e.sending=!1;case 5:return t.a(2)}}),t,null,[[1,3]])}
1)))()},onSubmitPassword:function(){var e=this;return(0,a.A)((0,r.A)().m((function t(){var s,i;return(0,r.A)().w((function(t){while(1)switch(t.n){case 0:return e.sending=!0,e.passwordErrorText="",e.emailErrorText="",t.p=1,t.n=2,e.$recaptchaLoaded();case 2:return t.n=3,e.$recaptcha("signup");case 3:return s=t.v,t.n=4,e.$gideo.createUser(e.email,e.password,e.customFields,s);case 4:e.done.password=!0,e.settings.hasSubscriptions?e.activeStep="subscription":e.$router.push(e.redirect),t.n=6;break;case 5:t.p=5,i=t.v,i.field&&"password"!==i.field?(e.emailErrorText=i.userMessage||"There was an unknown issue while trying to create your account",e.activeStep="email",e.done.email=!1):e.passwordErrorText=i.userMessage||"There was an unknown issue while trying to create your account";case 6:e.sending=!1;case 7:return t.a(2)}}),t,null,[[1,5]])})))()},getFieldRules:function(e){var t="";return e.required&&(t+="required|"),"text"===e.type?(e.attributes.maxlength&&(t+="max:".concat(e.attributes.maxlength,"|")),e.attributes.minlength&&(t+="min:".concat(e.attributes.minlength,"|"))):"date"===e.type?(t+="date:YYYY-MM-DD|",e.attributes.min&&(t+="datemin:".concat(e.attributes.min,"|")),e.attributes.max&&(t+="datemax:".concat(e.attributes.max))):"number"===e.type?(t+="double|","undefined"!==typeof e.attributes.min&&(t+="min_value:".concat(e.attributes.min,"|")),"undefined"!==typeof e.attributes.max&&(t+="max_value:".concat(e.attributes.max))):"tel"===e.type&&(t+="tel|"),t},onSubFormLoaded:function(e){var t=e.isPreselected;this.subIsPreselected=t},onSubscriptionFinished:function(){this.done.subscription=!0,this.$router.push(this.redirect)}}},c=l,m=s(81656),p=(0,m.A)(c,i,n,!1,null,"402b773c",null),v=p.exports},16342:function(e,t,s){s.r(t),s.d(t,{default:function(){return m}});s(44114);var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"md-layout md-alignment-center-center",attrs:{id:"delete-user-account-view"}},[e.showDone?t("div",{attrs:{id:"delete-account-done"}},[t("md-empty-state",{staticClass:"body-icon md-success",attrs:{"md-icon":"check_circle_outline","md-label":"Your data has been deleted!","md-description":"All of your personal data has been deleted. If you want to watch in the future then you will need to signup again."}},[t("md-button",{staticClass:"md-primary md-raised",on:{click:function(t){return e.$router.push("/")}}},[e._v("Ok")])],1)],1):e.sure?e.reallySure?t("div",{attrs:{id:"delete-account-confirm"}},[t("md-card",{staticClass:"md-layout-item md-size-100 md-alignment-center-center md-gutter"},[t("md-card-header",[t("div",{staticClass:"md-title"},[e._v(" Enter your"),e.authed?e._e():t("span",[e._v(" username and")]),e._v(" password to delete your data ")]),t("div",{class:{error:!0,hidden:!e.errorMessage}},[e._v(" "+e._s(e.errorMessage)+" ")])]),t("md-card-content",[t("ValidationObserver",{ref:"deleteAccountObserver",scopedSlots:e._u([{key:"default",fn:function(s){return[t("form",{on:{submit:function(t){return t.preventDefault(),s.handleSubmit(e.onSubmit)}}},[t("div",{staticClass:"spinner md-layout md-alignment-center-center"},[t("md-progress-spinner",{directives:[{name:"show",rawName:"v-show",value:e.sending,expression:"sending"}],attrs:{"md-mode":"indeterminate"}})],1),t("div",{staticClass:"fields",class:{hidden:e.sending}},[e.authed?e._e():t("ValidationProvider",{staticClass:"md-layout-item md-size-100",attrs:{name:"Username",rules:"required"},scopedSlots:e._u([{key:"default",fn:function(s){var i=s.errors;return[t("md-field",{class:{"md-invalid":i.length}},[t("label",[e._v("Username")]),t("md-input",{ref:"username",attrs:{type:"text",required:""},model:{value:e.formValues.username,callback:function(t){e.$set(e.formValues,"username",t)},expression:"formValues.username"}}),t("span",{staticClass:"md-error"},[e._v(e._s(i[0]))])],1)]}}],null,!0)}),t("ValidationProvider",{staticClass:"md-layout-item md-size-100",attrs:{mode:"aggressive",vid:"password",name:"Password",rules:"required"},scopedSlots:e._u([{key:"default",fn:function(s){var i=s.errors;return[t("md-field",{class:{"md-invalid":i.length}},[t("label",[e._v("Password")]),t("md-input",{attrs:{type:"password",required:""},model:{value:e.formValues.password,callback:function(t){e.$set(e.formValues,"password",t)},expression:"formValues.password"}}),t("span",{staticClass:"md-error"},[e._v(e._s(i[0]))])],1)]}}],null,!0)})],1),t("md-card-actions",[t("md-button",{staticClass:"md-error md-raised",attrs:{type:"submit",disabled:e.sending||s.invalid}},[e._v("Delete my data!")])],1)],1)]}}])})],1)],1)],1):t("div",{attrs:{id:"delete-account-really-sure"}},[t("md-empty-state",{staticClass:"body-icon md-error",attrs:{"md-icon":"error","md-label":"Really? Are you REALLY sure you want to DELETE your data?","md-description":"This is your last chance! You will no longer be able to watch videos and will lose your current subscription if you have one!"}},[t("md-button",{staticClass:"md-error md-raised",on:{click:function(t){e.reallySure=!0}}},[e._v("Yes I'm Really Sure")]),t("md-button",{staticClass:"md-raised",on:{click:function(t){return e.$router.push("/")}}},[e._v("No, I changed my mind")])],1)],1):t("div",{attrs:{id:"delete-account-sure"}},[t("md-empty-state",{staticClass:"body-icon md-error",attrs:{"md-icon":"error","md-label":"Are you sure you want to delete your data?","md-description":"You will no longer be able to watch videos and will lose your current subscription if you have one!"}},[t("md-button",{staticClass:"md-error md-raised",on:{click:function(t){e.sure=!0}}},[e._v("Yes I'm Sure")]),t("md-button",{staticClass:"md-raised",on:{click:function(t){return e.$router.push("/")}}},[e._v("No, I changed my mind")])],1)],1)])},n=[],r=s(9217),a=s(24634),o=s(15261),d={name:"DeleteUserAccount",components:{ValidationProvider:o.LW,ValidationObserver:o.Ce},data:function(){return{authed:!1,showDone:!1,sure:!1,reallySure:!1,sending:!1,errorMessage:void 0,formValues:{username:void 0,password:void 0}}},created:function(){var e=this;return(0,a.A)((0,r.A)().m((function t(){var s;return(0,r.A)().w((function(t){while(1)switch(t.n){case 0:e.authed=e.$gideo.authed,s=function(){e.authed!==e.$gideo.authed&&(e.authed=e.$gideo.authed)},e.$gideo.bus.$on("logged-in",s),e.$gideo.bus.$on("logged-out",s);case 1:return t.a(2)}}),t)})))()},mounted:function(){this.resetForm()},methods:{resetForm:function(){var e=this;this.formValues={username:void 0,password:void 0},this.errorMessage=void 0,this.sending=!1,this.sure=!1,this.reallySure=!1,this.showDone=!1,this.$nextTick((function(){e.$refs.deleteAccountObserver&&e.$refs.deleteAccountObserver.reset()}))},onSubmit:function(){var e=this;return(0,a.A)((0,r.A)().m((function t(){var s;return(0,r.A)().w((function(t){while(1)switch(t.n){case 0:return e.sending=!0,e.errorMessage=void 0,t.p=1,t.n=2,e.$gideo.deleteUserAccount(e.formValues);case 2:e.showDone=!0,t.n=4;break;case 3:t.p=3,s=t.v,e.errorMessage=s.userMessage||s.message;case 4:return t.p=4,e.sending=!1,t.f(4);case 5:return t.a(2)}}),t,null,[[1,3,4,5]])})))()}}},u=d,l=s(81656),c=(0,l.A)(u,i,n,!1,null,"d1dd0a7a",null),m=c.exports},24551:function(e,t,s){s.r(t),s.d(t,{default:function(){return m}});var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"md-layout md-alignment-center-center",attrs:{id:"subscribe-view"}},[t("div",{attrs:{id:"subscribe-container"}},[t("subscribe-form",{attrs:{id:"subscribe-step-form",selected:e.subscription,title:e.title},on:{loaded:e.onLoaded,finished:e.onSubscriptionFinished}})],1)])},n=[],r=s(9217),a=s(24634),o=(s(44114),s(24744)),d={name:"SubscribeView",components:{SubscribeForm:o["default"]},props:{redirect:{type:String,default:"/"},subscription:{type:String,default:""}},data:function(){return{settings:{},title:"",authed:!1}},created:function(){var e=this;return(0,a.A)((0,r.A)().m((function t(){var s;return(0,r.A)().w((function(t){while(1)switch(t.n){case 0:return e.authed=e.$gideo.authed,t.n=1,e.$appSettings;case 1:e.settings=t.v,s=function(){e.authed=e.$gideo.authed},e.$gideo.bus.$on("logged-in",s),e.$gideo.bus.$on("logged-out",s);case 2:return t.a(2)}}),t)})))()},methods:{onSubscriptionFinished:function(){this.$router.push(this.redirect)},onLoaded:function(e){var t,s,i=e.isPreselected;i?this.title="Payment Info":this.title=null!==(t=null===(s=this.settings.subscribeOptions)||void 0===s?void 0:s.chooseSubscriptionTabText)&&void 0!==t?t:"Choose Your Subscription"}}},u=d,l=s(81656),c=(0,l.A)(u,i,n,!1,null,"8a8b7cde",null),m=c.exports}}]); 2//# sourceMappingURL=signup-legacy.c885a68c.js.map
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.