{"version":3,"sources":["webpack:///./src/pages/profile.vue?afb3","webpack:///./src/components/common/app-user-ticket.vue?bb62","webpack:///./src/pages/profile.vue","webpack:///./src/components/common/app-profile-user-form.vue","webpack:///src/components/common/app-profile-user-form.vue","webpack:///./src/components/common/app-profile-user-form.vue?7abf","webpack:///./src/components/common/app-profile-user-form.vue?dac7","webpack:///./src/components/common/app-user-ticket.vue","webpack:///src/components/common/app-user-ticket.vue","webpack:///./src/components/common/app-user-ticket.vue?a676","webpack:///./src/components/common/app-user-ticket.vue?8de1","webpack:///src/pages/profile.vue","webpack:///./src/pages/profile.vue?ee39","webpack:///./src/pages/profile.vue?7502"],"names":["render","_vm","this","_c","_self","isReady","staticClass","userData","emailValidate","_e","attrs","_v","_s","$tr","on","$event","preventDefault","validateEmail","apply","arguments","userTicket","registrationCode","event","formLink","formId","getFieldValues","updateProfile","scopedSlots","_u","key","fn","submit","formSubmit","isLoading","staticRenderFns","ref","userModel","validateUserRules","suffixLockEmail","isEmailLocked","model","value","email","callback","$$v","$set","expression","updateEmail","isPasswordLocked","suffixLockPassword","oldPassword","newPassword","newPasswordRepeat","updatePassword","data","cb","required","message","trigger","type","min","validator","computed","user","methods","id","console","userId","password","resetUserForm","component","props","default","components","AppProfileUserForm","AppForm","AppContentItems","AppUserTicket","contentItems","paramsLegalAgreement","filter","mounted","getRegistrationCode","getUserTicket","form","entityId","updateRegistrationData","registrationId","getUser","window","domainId","currentEventId","agreement","path","query"],"mappings":"2GAAA,W,oCCAA,W,oECAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAQF,EAAII,QAASF,EAAG,MAAM,CAACG,YAAY,gBAAgB,CAACH,EAAG,MAAM,CAACG,YAAY,0CAA0C,CAAGL,EAAIM,SAASC,cAAiaP,EAAIQ,KAAtZN,EAAG,QAAQ,CAACG,YAAY,cAAcI,MAAM,CAAC,KAAO,YAAY,CAACP,EAAG,MAAM,CAACA,EAAG,MAAM,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gFCwDA,GACfmB,YACAC,qBACAC,eACAC,uBACAC,iBAEAvB,OACA,OACArB,aACA5B,WACA+B,WACAM,4CACA0B,YACAjB,eACAC,sBAEA0B,kBACA1D,gBACAC,oBACA0D,sBACAC,QAAAb,yCAIAL,aACA,gBACAxC,sBACAf,+BAGA,sBACA,sBACA,iBAEA0E,UACA,qBACA,2BACA,4BACA,4BAIAjB,SACA,4BACA,0BAAAkB,GAAA,iBACA,8BACA,8BACA,6BAGA,sBACA,sCACA,8BACA,cAAAC,GAAA,iBACA,IACA,qBACA,mCACA,SACAjB,mBAGA,uBACA,sCACA,8BACA,eAAAzC,GAAA,iBAEA,eACA,UAEA,gCAAA2D,WAAAC,GAAA,EACA,IACA,kBACA,6BAAAC,GAAA,uBACA,GAAAC,iBAAAH,SAGA,cAAAI,GAAA,iBACA,yCACA,2CAEA,uDACAC,qBACA,SACAvB,iBACA,QACA,oBAIA,sBACA,MAAAD,MAAA,cACA,+CAEA,cAAAhD,GAAA,uBAEA,OACA,yDAEA,uBACA,yCACA,8CACA,8CACAyE,EACAC,EACA,mBAEA,0BACA,2CACA,2BAEA,aACA,OAEA,oBACA,eACAC,yBAEA,4BAEA,GACA,mBACAC,aACAC,OACAF,mBCvMiV,ICQ7U,G,UAAY,eACd,EACA5F,EACAkC,GACA,EACA,KACA,KACA,OAIa,e","file":"js/profile.2b408ec0.js","sourcesContent":["export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../node_modules/style-resources-loader/lib/index.js??ref--9-oneOf-1-4!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./profile.vue?vue&type=style&index=0&id=7400d8bf&prod&lang=scss&\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/style-resources-loader/lib/index.js??ref--9-oneOf-1-4!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-user-ticket.vue?vue&type=style&index=0&id=00987f59&prod&lang=scss&\"","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.isReady)?_c('div',{staticClass:\"registration\"},[_c('div',{staticClass:\"s-card registration__registration-form\"},[(!_vm.userData.emailValidate)?_c('Alert',{staticClass:\"text-center\",attrs:{\"type\":\"warning\"}},[_c('div',[_c('div',{staticClass:\"mb-1\"},[_vm._v(\" \"+_vm._s(_vm.$tr('profile.alerts.emailNotConfirmed'))+\" \")]),_c('a',{staticClass:\"ivu-alert-warning ivu-alert-message\",on:{\"click\":function($event){$event.preventDefault();return _vm.validateEmail.apply(null, arguments)}}},[_vm._v(\" \"+_vm._s(_vm.$tr('profile.alerts.resend'))+\" \")])])]):_vm._e(),_c('h3',{staticClass:\"registration-form-group__title\"},[_vm._v(\" \"+_vm._s(_vm.$tr('profile.heading'))+\" \")]),(_vm.userTicket)?_c('AppUserTicket',{staticClass:\"registration-form-group__user-ticket\",attrs:{\"user-ticket\":_vm.userTicket}}):_vm._e(),(_vm.registrationCode)?_c('h4',{staticClass:\"registration__code\"},[_vm._v(\" Персональный код регистрации\"),_c('br'),_c('span',[_vm._v(_vm._s(_vm.registrationCode))])]):_vm._e(),_c('AppProfileUserForm'),_c('AppForm',{attrs:{\"form-id\":_vm.event.formLink.formId,\"get-values-function\":_vm.getFieldValues},on:{\"submit\":_vm.updateProfile},scopedSlots:_vm._u([{key:\"submit\",fn:function({ submit: formSubmit }){return [_c('Portal',{attrs:{\"to\":\"profile-submit\"}},[_c('Button',{staticClass:\"registration-footer__submit\",attrs:{\"type\":\"primary\",\"size\":\"large\",\"disabled\":_vm.isLoading},on:{\"click\":formSubmit}},[_vm._v(\" \"+_vm._s(_vm.$tr('profile.submit'))+\" \")])],1)]}}],null,false,2517480716)})],1),_c('div',{staticClass:\"registration__registration-footer\"},[_c('div',{staticClass:\"row registration-footer\"},[_c('div',{staticClass:\"col-sm-12 col-lg-4 registration-footer__submit-wrapper\"},[_c('PortalTarget',{attrs:{\"name\":\"profile-submit\"}})],1),_c('div',{staticClass:\"col-sm-12 col-lg-8\"},[_c('AppContentItems',{staticClass:\"registration-footer__content-items\"})],1)])])]):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('Form',{ref:\"userForm\",attrs:{\"model\":_vm.userModel,\"rules\":_vm.validateUserRules}},[_c('div',{staticClass:\"registration-form-group registration-form-group--divider\"},[_c('div',{staticClass:\"row\"},[_c('FormItem',{staticClass:\"col-12 col-md-6 col-lg-4\",attrs:{\"prop\":\"email\",\"label\":\"Email\"}},[_c('Input',{attrs:{\"suffix\":_vm.suffixLockEmail,\"disabled\":_vm.isEmailLocked},on:{\"suffixClick\":function($event){_vm.isEmailLocked = !_vm.isEmailLocked}},model:{value:(_vm.userModel.email),callback:function ($$v) {_vm.$set(_vm.userModel, \"email\", $$v)},expression:\"userModel.email\"}})],1),(!_vm.isEmailLocked)?_c('FormItem',{staticClass:\"col-12 col-md-6 col-lg-4\"},[_c('Button',{staticClass:\"ivu-btn-primary-light\",attrs:{\"disabled\":_vm.isLoading,\"long\":\"\"},on:{\"click\":_vm.updateEmail}},[_vm._v(\" \"+_vm._s(_vm.$tr('profile.saveEmail'))+\" \")])],1):_vm._e()],1),_c('div',{staticClass:\"row\"},[_c('FormItem',{staticClass:\"col-12 col-md-6 col-lg-4\",attrs:{\"label\":_vm.$tr('profile.password.label'),\"prop\":\"oldPassword\"}},[_c('Input',{attrs:{\"disabled\":_vm.isPasswordLocked,\"suffix\":_vm.suffixLockPassword,\"placeholder\":\"******\",\"type\":\"password\"},on:{\"suffixClick\":function($event){_vm.isPasswordLocked = !_vm.isPasswordLocked}},model:{value:(_vm.userModel.oldPassword),callback:function ($$v) {_vm.$set(_vm.userModel, \"oldPassword\", $$v)},expression:\"userModel.oldPassword\"}})],1)],1),_c('div',{staticClass:\"row\"},[(!_vm.isPasswordLocked)?[_c('FormItem',{staticClass:\"col-12 col-md-6 col-lg-4\",attrs:{\"label\":_vm.$tr('profile.password.newPasswordLabel'),\"prop\":\"newPassword\"}},[_c('Input',{attrs:{\"type\":\"password\"},model:{value:(_vm.userModel.newPassword),callback:function ($$v) {_vm.$set(_vm.userModel, \"newPassword\", $$v)},expression:\"userModel.newPassword\"}})],1),_c('FormItem',{staticClass:\"col-12 col-md-6 col-lg-4\",attrs:{\"label\":_vm.$tr('profile.password.repeatNewPasswordLabel'),\"prop\":\"newPasswordRepeat\"}},[_c('Input',{attrs:{\"type\":\"password\"},model:{value:(_vm.userModel.newPasswordRepeat),callback:function ($$v) {_vm.$set(_vm.userModel, \"newPasswordRepeat\", $$v)},expression:\"userModel.newPasswordRepeat\"}})],1),_c('FormItem',{staticClass:\"col-12 col-md-6 col-lg-4\",attrs:{\"label\":\"\"}},[_c('Button',{attrs:{\"disabled\":_vm.isLoading,\"type\":\"primary\",\"long\":\"\"},on:{\"click\":_vm.updatePassword}},[_vm._v(\" \"+_vm._s(_vm.$tr('profile.password.savePassword'))+\" \")])],1)]:_vm._e()],2)])])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div>\n    <Form ref=\"userForm\" :model=\"userModel\" :rules=\"validateUserRules\">\n      <div class=\"registration-form-group registration-form-group--divider\">\n        <div class=\"row\">\n          <FormItem class=\"col-12 col-md-6 col-lg-4\" prop=\"email\" label=\"Email\">\n            <Input\n              v-model=\"userModel.email\"\n              :suffix=\"suffixLockEmail\"\n              :disabled=\"isEmailLocked\"\n              @suffixClick=\"isEmailLocked = !isEmailLocked\"\n            />\n          </FormItem>\n\n          <FormItem v-if=\"!isEmailLocked\" class=\"col-12 col-md-6 col-lg-4\">\n            <Button\n              :disabled=\"isLoading\"\n              class=\"ivu-btn-primary-light\"\n              long\n              @click=\"updateEmail\"\n            >\n              {{ $tr('profile.saveEmail') }}\n            </Button>\n          </FormItem>\n        </div>\n        <div class=\"row\">\n          <FormItem\n            :label=\"$tr('profile.password.label')\"\n            class=\"col-12 col-md-6 col-lg-4\"\n            prop=\"oldPassword\"\n          >\n            <Input\n              v-model=\"userModel.oldPassword\"\n              :disabled=\"isPasswordLocked\"\n              :suffix=\"suffixLockPassword\"\n              placeholder=\"******\"\n              type=\"password\"\n              @suffixClick=\"isPasswordLocked = !isPasswordLocked\"\n            />\n          </FormItem>\n        </div>\n        <div class=\"row\">\n          <template v-if=\"!isPasswordLocked\">\n            <FormItem\n              :label=\"$tr('profile.password.newPasswordLabel')\"\n              class=\"col-12 col-md-6 col-lg-4\"\n              prop=\"newPassword\"\n            >\n              <Input v-model=\"userModel.newPassword\" type=\"password\" />\n            </FormItem>\n            <FormItem\n              :label=\"$tr('profile.password.repeatNewPasswordLabel')\"\n              class=\"col-12 col-md-6 col-lg-4\"\n              prop=\"newPasswordRepeat\"\n            >\n              <Input v-model=\"userModel.newPasswordRepeat\" type=\"password\" />\n            </FormItem>\n            <FormItem class=\"col-12 col-md-6 col-lg-4\" label=\"\">\n              <Button\n                :disabled=\"isLoading\"\n                type=\"primary\"\n                long\n                @click=\"updatePassword\"\n              >\n                {{ $tr('profile.password.savePassword') }}\n              </Button>\n            </FormItem>\n          </template>\n        </div>\n      </div>\n    </Form>\n  </div>\n</template>\n\n<script>\nimport { mapState } from 'vuex'\nimport useUser from '@/domain/composables/use-user'\n\nexport default {\n  data() {\n    const repeatEqual = (rule, value, cb) => {\n      if (value !== this.userModel.newPassword) {\n        cb(new Error(this.$tr('resetPassword.passwordConfirm.ruleDiff')))\n      } else {\n        cb()\n      }\n    }\n\n    return {\n      userModel: {\n        email: this.$store.getters['auth/email'],\n        oldPassword: '',\n        newPassword: '',\n        newPasswordRepeat: '',\n      },\n      isLoading: false,\n      validateUserRules: {\n        email: [\n          {\n            required: true,\n            message: this.$tr('initValidation.required'),\n            trigger: 'blur',\n          },\n          { type: 'email' },\n        ],\n        oldPassword: [\n          {\n            required: true,\n            message: this.$tr('initValidation.required'),\n            trigger: 'blur',\n          },\n          { min: 6, message: this.$tr('auth.password.errorLength') },\n        ],\n        newPassword: [\n          {\n            required: true,\n            message: this.$tr('initValidation.required'),\n            trigger: 'blur',\n          },\n          { min: 6, message: this.$tr('auth.password.errorLength') },\n        ],\n        newPasswordRepeat: [\n          {\n            required: true,\n            message: this.$tr('initValidation.required'),\n            trigger: 'blur',\n          },\n          { min: 6, message: this.$tr('auth.password.errorLength') },\n          { validator: repeatEqual },\n        ],\n      },\n      isPasswordLocked: true,\n      isEmailLocked: true,\n    }\n  },\n  computed: {\n    ...mapState({ user: (state) => state.auth.userData }),\n    suffixLockPassword() {\n      return this.isPasswordLocked ? 'lock' : 'unlock'\n    },\n    suffixLockEmail() {\n      return this.isEmailLocked ? 'lock' : 'unlock'\n    },\n  },\n  methods: {\n    updateEmail() {\n      this.$refs.userForm.validateField('email', async (errors, isValid) => {\n        if (isValid) {\n          const { email } = this.userModel\n\n          const { id: userId } = this.user\n          const { updateEmail } = useUser()\n\n          this.isLoading = true\n\n          try {\n            const user = await updateEmail(userId, email)\n            this.$store.commit('auth/SET_USER_DATA', user)\n            this.$Message.success(this.$tr('profile.emailChange'))\n          } catch (e) {\n            this.userModel.email = this.user.email\n            if (e.status === 422) {\n              this.$Message.warning(this.$tr('auth.emailAlreadyExisted'))\n            } else {\n              console.error(e)\n            }\n          } finally {\n            this.resetUserForm()\n            this.isLoading = false\n          }\n        }\n      })\n    },\n    async updatePassword() {\n      const isUserModelValid = await this.$refs.userForm.validate()\n\n      if (isUserModelValid) {\n        const { newPassword: password, oldPassword } = this.userModel\n        const { id: userId } = this.user\n        const { updatePassword } = useUser()\n\n        this.isLoading = true\n        try {\n          await updatePassword({ userId, password, oldPassword })\n          this.$Message.success(this.$tr('profile.password.change'))\n        } catch {\n          this.$Message.error(this.$tr('auth.authError'))\n        } finally {\n          this.isLoading = false\n          this.resetUserForm()\n        }\n      }\n    },\n    resetUserForm() {\n      this.isPasswordLocked = true\n      this.isEmailLocked = true\n    },\n  },\n}\n</script>\n\n<style scoped></style>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-profile-user-form.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-profile-user-form.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./app-profile-user-form.vue?vue&type=template&id=4be7b864&scoped=true&\"\nimport script from \"./app-profile-user-form.vue?vue&type=script&lang=js&\"\nexport * from \"./app-profile-user-form.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  \"4be7b864\",\n  null\n  \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"user-ticket\"},[_c('div',{staticClass:\"user-ticket__title\"},[_vm._v(_vm._s(_vm.$tr('profile.userTicket.text')))]),_c('div',{staticClass:\"user-ticket__number\"},[_vm._v(_vm._s(_vm.userTicket))])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div class=\"user-ticket\">\n    <div class=\"user-ticket__title\">{{ $tr('profile.userTicket.text') }}</div>\n    <div class=\"user-ticket__number\">{{ userTicket }}</div>\n  </div>\n</template>\n<script>\nexport default {\n  props: {\n    userTicket: { type: String, default: '' },\n  },\n  data() {\n    return {}\n  },\n}\n</script>\n<style lang=\"scss\">\n.user-ticket {\n  padding: 11px 20px 11px 24px;\n  display: inline-flex;\n  flex-direction: column;\n  max-width: 252px;\n  background: var(--s-success-color-light);\n  color: var(--s-success-color-darker);\n  border-radius: 5px;\n  &__title {\n    font-size: 14px;\n    line-height: 22px;\n  }\n  &__number {\n    font-weight: 500;\n    font-size: 26px;\n    line-height: 32px;\n    word-break: break-all;\n    letter-spacing: 0.2px;\n  }\n}\n</style>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-user-ticket.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./app-user-ticket.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./app-user-ticket.vue?vue&type=template&id=00987f59&\"\nimport script from \"./app-user-ticket.vue?vue&type=script&lang=js&\"\nexport * from \"./app-user-ticket.vue?vue&type=script&lang=js&\"\nimport style0 from \"./app-user-ticket.vue?vue&type=style&index=0&id=00987f59&prod&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","<template>\n  <div v-if=\"isReady\" class=\"registration\">\n    <div class=\"s-card registration__registration-form\">\n      <Alert v-if=\"!userData.emailValidate\" type=\"warning\" class=\"text-center\">\n        <div>\n          <div class=\"mb-1\">\n            {{ $tr('profile.alerts.emailNotConfirmed') }}\n          </div>\n          <a\n            class=\"ivu-alert-warning ivu-alert-message\"\n            @click.prevent=\"validateEmail\"\n          >\n            {{ $tr('profile.alerts.resend') }}\n          </a>\n        </div>\n      </Alert>\n      <h3 class=\"registration-form-group__title\">\n        {{ $tr('profile.heading') }}\n      </h3>\n      <AppUserTicket\n        v-if=\"userTicket\"\n        class=\"registration-form-group__user-ticket\"\n        :user-ticket=\"userTicket\"\n      />\n      <h4 v-if=\"registrationCode\" class=\"registration__code\">\n        Персональный код регистрации<br />\n        <span>{{ registrationCode }}</span>\n      </h4>\n      <AppProfileUserForm />\n      <AppForm\n        :form-id=\"event.formLink.formId\"\n        :get-values-function=\"getFieldValues\"\n        @submit=\"updateProfile\"\n      >\n        <template #submit=\"{ submit: formSubmit }\">\n          <Portal to=\"profile-submit\">\n            <Button\n              type=\"primary\"\n              size=\"large\"\n              :disabled=\"isLoading\"\n              class=\"registration-footer__submit\"\n              @click=\"formSubmit\"\n            >\n              {{ $tr('profile.submit') }}\n            </Button>\n          </Portal>\n        </template>\n      </AppForm>\n    </div>\n    <div class=\"registration__registration-footer\">\n      <div class=\"row registration-footer\">\n        <div class=\"col-sm-12 col-lg-4 registration-footer__submit-wrapper\">\n          <PortalTarget name=\"profile-submit\"></PortalTarget>\n        </div>\n        <div class=\"col-sm-12 col-lg-8\">\n          <AppContentItems class=\"registration-footer__content-items\" />\n        </div>\n      </div>\n    </div>\n  </div>\n</template>\n\n<script>\nimport { mapState } from 'vuex'\nimport AppProfileUserForm from '@/components/common/app-profile-user-form'\nimport AppUserTicket from '@/components/common/app-user-ticket'\n\nimport AppForm from '@/components/common/app-form'\nimport AppContentItems from '@/components/common/app-content-items'\nimport useRegistration from '@/domain/composables/use-registration'\nimport useDomainContent from '@/domain/composables/use-domain-content'\nimport useLegalAgreement from '@/domain/composables/use-legal-agreement'\nimport useUser from '@/domain/composables/use-user'\nimport useForm from '@/domain/composables/use-form'\n\nexport default {\n  components: {\n    AppProfileUserForm,\n    AppForm,\n    AppContentItems,\n    AppUserTicket,\n  },\n  data() {\n    return {\n      isLoading: false,\n      isReady: false,\n      userModel: {\n        email: this.$store.state.auth.userData.email,\n        password: '',\n        newPassword: '',\n        newPasswordRepeat: '',\n      },\n      contentItems: null,\n      userTicket: null,\n      registrationCode: '',\n      paramsLegalAgreement: {\n        filter: { userId: this.$store.state.auth.userId },\n      },\n    }\n  },\n  computed: {\n    ...mapState({\n      event: (state) => state.event.data,\n      userData: (state) => state.auth.userData,\n    }),\n  },\n  async created() {\n    await this.checkAgreement()\n    this.isReady = true\n  },\n  mounted() {\n    this.getUserTicket()\n    this.getRegistrationCode()\n    if (!this.event.formLink.formId) {\n      this.$toLocalePath('/404')\n    }\n  },\n\n  methods: {\n    async getRegistrationCode() {\n      const { getRegistrationCode } = useRegistration()\n      this.registrationCode = await getRegistrationCode(\n        this.$store.state.auth.userId,\n        this.$route.params.eventId\n      )\n    },\n    async getUserTicket() {\n      const userId = this.$store.state.auth.userId\n      const eventId = this.$route.params.eventId\n      const { getUserTicket } = useRegistration()\n      try {\n        const userTicket = await getUserTicket(userId, eventId)\n        if (userTicket && userTicket.length > 0) this.userTicket = userTicket\n      } catch (e) {\n        console.error(e)\n      }\n    },\n    async getFieldValues() {\n      const userId = this.$store.state.auth.userId\n      const eventId = this.$route.params.eventId\n      const { getFieldValues } = useRegistration()\n\n      const regValues = await getFieldValues(userId, eventId)\n      return regValues\n    },\n    async updateProfile({ form, entityId }) {\n      try {\n        this.isLoading = true\n        const { updateRegistrationData } = useForm()\n        await updateRegistrationData({ registrationId: entityId, form })\n\n        // todo: это использование vuex как кеша, так быть не должно (антипаттерн)\n        const { getUser } = useUser()\n        const user = await getUser(this.$store.state.auth.userId)\n        this.$store.commit('auth/SET_USER_DATA', user)\n\n        this.$Message.success(this.$tr('profile.succesAlert'))\n        window.scrollTo(0, 0) //todo: smooth-scrolling\n      } catch (e) {\n        console.error(e)\n      } finally {\n        this.isLoading = false\n      }\n    },\n\n    async validateEmail() {\n      const { id: userId } = this.userData\n      const eventId = this.$store.getters['event/currentEventId']\n\n      const { validateEmail } = useUser()\n\n      await validateEmail(userId, eventId)\n      this.$Message.success(this.$tr('profile.emailConfirm'))\n    },\n    async checkAgreement() {\n      const domainId = this.$store.state.domain.data.id\n      const currentEventId = this.$store.getters['event/currentEventId']\n      const contentItems = await useDomainContent().getAgreementItemList(\n        domainId,\n        currentEventId,\n        this.$i18n.locale\n      )\n      const requiredAgreements = contentItems.filter((item) => item.required)\n      const userAgreements = await useLegalAgreement().getLegalAgreement(\n        this.paramsLegalAgreement\n      )\n      if (!contentItems.length) {\n        return\n      }\n      const allAgreementsApproved = requiredAgreements.every((required) => {\n        const userAgreement = userAgreements.find(\n          (agreement) => +agreement.contentId === +required.id\n        )\n        return userAgreement && userAgreement.approved === true\n      })\n      if (!allAgreementsApproved) {\n        this.$router.push({\n          path: `/user`,\n          query: {\n            agreement: true,\n          },\n        })\n      }\n    },\n  },\n}\n</script>\n<style lang=\"scss\">\n@import '~@/styles/blocks/registration.scss';\n</style>\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./profile.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./profile.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./profile.vue?vue&type=template&id=7400d8bf&\"\nimport script from \"./profile.vue?vue&type=script&lang=js&\"\nexport * from \"./profile.vue?vue&type=script&lang=js&\"\nimport style0 from \"./profile.vue?vue&type=style&index=0&id=7400d8bf&prod&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}