{"version":3,"sources":["webpack:///./src/pages/registration/user.vue","webpack:///./src/components/common/app-registration-user-form.vue","webpack:///src/components/common/app-registration-user-form.vue","webpack:///./src/components/common/app-registration-user-form.vue?4a09","webpack:///./src/components/common/app-registration-user-form.vue?ff75","webpack:///./src/domain/services/user-service.js","webpack:///src/pages/registration/user.vue","webpack:///./src/pages/registration/user.vue?be51","webpack:///./src/pages/registration/user.vue?7f81","webpack:///./src/domain/composables/use-auth.js","webpack:///./src/domain/services/login-service/strategies/auth-auth-strategy.js","webpack:///./src/pages/registration/user.vue?bd6b","webpack:///./src/domain/services/event-date-service.js","webpack:///./src/components/common/app-registration-user-form.vue?1391","webpack:///./src/domain/services/login-service/strategies/user-login-strategy.js"],"names":["render","_vm","this","_c","_self","staticClass","on","$event","type","indexOf","_k","keyCode","key","handleUserCreate","apply","arguments","attrs","localePath","path","_v","_s","$tr","model","value","userModel","callback","$$v","expression","isLoading","staticRenderFns","ref","validateUserRules","email","$set","password","passwordRepeat","prop","event","props","form","default","eventData","data","cb","isValid","required","message","trigger","min","max","validator","watch","immediate","deep","component","UserService","authGroupId","store","getters","payload","toLowerCase","user","useUser","registerUser","components","AppRegistrationUserForm","DirectionLeftIcon","AppContentItems","isDataSent","computed","methods","useAuth","async","authenticate","api","getExistingApiInstance","LogicError","isError","e","AuthAuthStrategy","UserLoginStrategy","constructor","super","gtm","GtmPlugin","gtmOptions","isLoginError","userData","Error","translateI18N","trackEvent","authService","AuthService","setAuthData","token","id","MIN_DATE","DateTime","fromSeconds","MAX_DATE","EventDateService","_event","getData","getMinDate","registrationStartedAt","getMaxDate","registrationEndedAt","EventService","isEventOccasion","eventOccasion","startedAt","endedAt","dateStr","date","fromISO","invalid","locale","start","end","entity","months","divider","formatDateWithDivider","year","startYear","month","startMonth","day","startDay","endYear","endMonth","endDay","monthToStr","state","formatDate","status","before","during","after","onGoing","TIME_STATUSES","ENDED","WILL_START","eventDateServise","execute","AbstractMethod","args","translateFn","registrationTimeStatus","IN_PROGRESS","_throwUnavailableRegistrationAlert","startRegistrationTime","endRegistrationTime","getMessageWithOneDate","getAlertMessageWithDivider"],"mappings":"6GAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,eAAeC,GAAG,CAAC,SAAW,SAASC,GAAQ,OAAIA,EAAOC,KAAKC,QAAQ,QAAQR,EAAIS,GAAGH,EAAOI,QAAQ,QAAQ,GAAGJ,EAAOK,IAAI,SAAgB,KAAYX,EAAIY,iBAAiBC,MAAM,KAAMC,cAAc,CAACZ,EAAG,MAAM,CAACE,YAAY,4BAA4B,CAACF,EAAG,MAAM,CAACE,YAAY,wBAAwB,CAACF,EAAG,MAAM,CAACE,YAAY,eAAe,CAACF,EAAG,cAAc,CAACE,YAAY,iDAAiDW,MAAM,CAAC,GAAKf,EAAIgB,WAAW,CAAEC,KAAM,aAAc,CAACf,EAAG,OAAO,CAACE,YAAY,0BAA0B,CAACF,EAAG,sBAAsB,GAAGA,EAAG,OAAO,CAACE,YAAY,0CAA0C,CAACJ,EAAIkB,GAAG,IAAIlB,EAAImB,GAAGnB,EAAIoB,IAAI,sBAAsB,UAAU,OAAOlB,EAAG,KAAK,CAACE,YAAY,mCAAmC,CAACJ,EAAIkB,GAAG,IAAIlB,EAAImB,GAAGnB,EAAIoB,IAAI,uBAAuB,OAAOlB,EAAG,MAAM,CAACE,YAAY,4DAA4D,CAACF,EAAG,0BAA0B,CAACmB,MAAM,CAACC,MAAOtB,EAAIuB,UAAWC,SAAS,SAAUC,GAAMzB,EAAIuB,UAAUE,GAAKC,WAAW,gBAAgB,GAAGxB,EAAG,MAAM,CAACE,YAAY,qCAAqC,CAACF,EAAG,MAAM,CAACE,YAAY,2BAA2B,CAACF,EAAG,MAAM,CAACE,YAAY,0DAA0D,CAACF,EAAG,SAAS,CAACE,YAAY,8BAA8BW,MAAM,CAAC,SAAWf,EAAI2B,UAAU,KAAO,UAAU,K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OAAiBqD,sBAAsBrC,EAAQC,GAC/D,MAAM,IAAI7B,MAAM1C,GAGlB,MAAMsE,EAAS,CACbG,OAAQrH,KAAKuF,cAAc,0BAC3B+B,OAAQtH,KAAKuF,cAAc,UAC3BgC,QAASvH,KAAKuF,cAAc,8BAGxB8C,EAASnC,OAAiBsD,2BAC9BtC,EACAC,EACAC,GAEF,MAAM,IAAI9B,MAAM+C,EAAOzF","file":"js/user.3fc3a43d.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"registration\",on:{\"keypress\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;return _vm.handleUserCreate.apply(null, arguments)}}},[_c('div',{staticClass:\"auth__header auth-header\"},[_c('div',{staticClass:\"auth-header__actions\"},[_c('div',{staticClass:\"header-back\"},[_c('router-link',{staticClass:\"header-back__content s-card s-card--no-padding\",attrs:{\"to\":_vm.localePath({ path: '/login' })}},[_c('span',{staticClass:\"header-back__back-icon\"},[_c('DirectionLeftIcon')],1),_c('span',{staticClass:\"header-back__text s-subtitle-secondary\"},[_vm._v(\" \"+_vm._s(_vm.$tr('registration.auth'))+\" \")])])],1)])]),_c('h1',{staticClass:\"registration__title auth__title\"},[_vm._v(\" \"+_vm._s(_vm.$tr('registration.title'))+\" \")]),_c('div',{staticClass:\"s-card registration__registration-form registration-form\"},[_c('AppRegistrationUserForm',{model:{value:(_vm.userModel),callback:function ($$v) {_vm.userModel=$$v},expression:\"userModel\"}})],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('Button',{staticClass:\"registration-footer__submit\",attrs:{\"disabled\":_vm.isLoading,\"type\":\"primary\",\"size\":\"large\"},on:{\"click\":_vm.handleUserCreate}},[_vm._v(\" \"+_vm._s(_vm.$tr('registration.next'))+\" \")])],1),_c('div',{staticClass:\"col-sm-12 col-lg-8\"},[_c('AppContentItems',{staticClass:\"registration-footer__content-items\"})],1)])])])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"registration-form\"},[_c('Form',{ref:\"userForm\",attrs:{\"model\":_vm.userModel,\"rules\":_vm.validateUserRules}},[_c('div',{staticClass:\"registration-form-group\"},[_c('h3',{staticClass:\"registration-form-group__title\"},[_vm._v(\" \"+_vm._s(_vm.$tr('registration.profileTitle'))+\" \")]),_c('div',{staticClass:\"row\"},[_c('FormItem',{staticClass:\"col-12 col-md-6 col-lg-4\",attrs:{\"label\":_vm.$tr('registration.email'),\"prop\":\"email\"}},[_c('Input',{attrs:{\"disabled\":\"\"},model:{value:(_vm.userModel.email),callback:function ($$v) {_vm.$set(_vm.userModel, \"email\", $$v)},expression:\"userModel.email\"}})],1),_c('FormItem',{staticClass:\"col-12 col-md-6 col-lg-4\",attrs:{\"label\":_vm.$tr('registration.passwordTitle'),\"prop\":\"password\"}},[_c('Input',{attrs:{\"placeholder\":_vm.$tr('registration.passwordPh'),\"type\":\"password\"},model:{value:(_vm.userModel.password),callback:function ($$v) {_vm.$set(_vm.userModel, \"password\", $$v)},expression:\"userModel.password\"}})],1),_c('FormItem',{staticClass:\"col-12 col-md-6 col-lg-4\",attrs:{\"label\":_vm.$tr('registration.repeatPasswordTitle'),\"prop\":\"passwordRepeat\"}},[_c('Input',{attrs:{\"placeholder\":_vm.$tr('registration.passwordPh'),\"type\":\"password\"},model:{value:(_vm.userModel.passwordRepeat),callback:function ($$v) {_vm.$set(_vm.userModel, \"passwordRepeat\", $$v)},expression:\"userModel.passwordRepeat\"}})],1)],1)])])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n \n \n \n {{ $tr('registration.profileTitle') }}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n\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-registration-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-registration-user-form.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./app-registration-user-form.vue?vue&type=template&id=d8ecd396&\"\nimport script from \"./app-registration-user-form.vue?vue&type=script&lang=js&\"\nexport * from \"./app-registration-user-form.vue?vue&type=script&lang=js&\"\nimport style0 from \"./app-registration-user-form.vue?vue&type=style&index=0&id=d8ecd396&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","import useUser from '@/domain/composables/use-user'\nimport store from '@/store'\n\nexport default class UserService {\n static async createUser(email, password) {\n const authGroupId = store.getters['domain/currentAuthGroupId']\n const payload = {\n email: email.toLowerCase(),\n password,\n authGroupId,\n }\n\n const user = await useUser().registerUser(payload)\n\n return user\n }\n}\n","\n \n \n \n \n \n \n \n \n \n {{ $tr('registration.auth') }}\n \n \n \n \n \n \n {{ $tr('registration.title') }}\n \n \n \n \n \n \n\n\n\n\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!./user.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!./user.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./user.vue?vue&type=template&id=7448a226&\"\nimport script from \"./user.vue?vue&type=script&lang=js&\"\nexport * from \"./user.vue?vue&type=script&lang=js&\"\nimport style0 from \"./user.vue?vue&type=style&index=0&id=7448a226&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","import { getExistingApiInstance } from '@/api'\nimport LogicError from '@/domain/errors/logic-error'\n\nexport default function useAuth() {\n /**\n * Аутентификация по логину и паролю\n * @returns {Promise<{data: {roles: Array, token: string, id: number}, isError: boolean}>}\n */\n async function authenticate(email, password, authGroupId) {\n const api = getExistingApiInstance()\n\n if (!authGroupId) {\n throw new LogicError('Не найден id группы авторизации')\n }\n\n const payload = {\n authGroupId,\n email,\n password,\n }\n\n let isError = false\n let data = {}\n try {\n ({ data } = await api.user.authenticate(payload))\n } catch (e) {\n isError = true\n }\n\n return {\n data,\n isError,\n }\n }\n\n return {\n authenticate,\n }\n}\n","import UserLoginStrategy from '@/domain/services/login-service/strategies/user-login-strategy'\nimport useAuth from '@/domain/composables/use-auth'\nimport store from '@/store'\nimport AuthService from '@/domain/services/auth-service'\nimport { GtmPlugin } from '@gtm-support/vue2-gtm'\nimport gtmOptions from '@/plugins/gtm'\n\n/**\n * authenticate then authorize\n */\nexport default class AuthAuthStrategy extends UserLoginStrategy {\n constructor(event, user) {\n super(event, user)\n this.gtm = new GtmPlugin(gtmOptions)\n }\n\n async execute() {\n const { authenticate } = useAuth()\n\n const { data, isError: isLoginError } = await authenticate(\n this.userData.email,\n this.userData.password,\n store.getters['domain/currentAuthGroupId'],\n )\n\n if (isLoginError) {\n throw new Error(this.translateI18N('auth.authError'))\n }\n\n this.gtm.trackEvent({ event: 'event-auth' })\n\n const authService = new AuthService()\n await authService.setAuthData(data.token, data.id)\n }\n}\n","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!./user.vue?vue&type=style&index=0&id=7448a226&prod&lang=scss&\"","import EventService from '@/domain/services/event-service'\nimport { DateTime } from '@/plugins/luxon'\nimport { monthToStr, formatDate, TIME_STATUSES } from '@/utils'\n\nconst MIN_DATE = DateTime.fromSeconds(0)\nconst MAX_DATE = DateTime.fromSeconds(2177280000) // 2038 12 30\n\nexport default class EventDateService {\n static MIN_DATE = MIN_DATE\n static MAX_DATE = MAX_DATE\n constructor(event) {\n this._event = event\n }\n\n getData() {\n return this._event\n }\n\n /**\n * @returns {DateTime}\n */\n get startRegistrationTime() {\n return EventDateService.getMinDate(this._event.registrationStartedAt)\n }\n\n /**\n * @returns {DateTime}\n */\n get endRegistrationTime() {\n return EventDateService.getMaxDate(this._event.registrationEndedAt)\n }\n\n /**\n * @returns {DateTime}\n */\n get startEventTime() {\n if (!EventService.isEventOccasion(this._event)) {\n return EventDateService.MIN_DATE\n }\n return EventDateService.getMinDate(this._event.eventOccasion.startedAt)\n }\n\n /**\n * @returns {DateTime}\n */\n get endEventTime() {\n if (!EventService.isEventOccasion(this._event)) {\n return EventDateService.MAX_DATE\n }\n return EventDateService.getMaxDate(this._event.eventOccasion.endedAt)\n }\n\n static getMinDate(dateStr) {\n const date = DateTime.fromISO(dateStr)\n if (date.invalid) {\n return EventDateService.MIN_DATE\n }\n return date\n }\n\n static getMaxDate(dateStr) {\n const date = DateTime.fromISO(dateStr)\n if (date.invalid) {\n return EventDateService.MAX_DATE\n }\n return date\n }\n\n /**\n * функция возвращает две даты через символ, отправленный в поле \"locale.divider\" - по умолчанию черточка:\n * @param locale\n * @param start\n * @param end\n */\n static getAlertMessageWithDivider(locale, start, end) {\n if ((!start) instanceof DateTime || (!end) instanceof DateTime) {\n throw new Error(\n 'Неверный тип даты, передаваемый в функцию getEntityStatus!',\n )\n }\n\n const { entity = '', months = [], divider = '-' } = locale\n\n const formatDateWithDivider = (start, end) => {\n const { year: startYear, month: startMonth, day: startDay } = start\n const { year: endYear, month: endMonth, day: endDay } = end\n\n // отбрасываем одинаковые года и месяцы\n if (\n endDay === startDay &&\n startMonth === endMonth &&\n startYear === endYear\n ) {\n return `${startDay} ${monthToStr(startMonth, months)} ${startYear}`\n } else if (startMonth === +endMonth && startYear === endYear) {\n return `${startDay} ${divider} ${endDay} ${monthToStr(\n startMonth,\n months,\n )} ${startYear}`\n } else if (startYear === endYear) {\n return `${startDay} ${monthToStr(\n startMonth,\n months,\n )} ${divider} ${endDay} ${monthToStr(endMonth, months)} ${startYear}`\n }\n return `${startDay} ${monthToStr(\n startMonth,\n months,\n )} ${startYear} ${divider} ${endDay} ${monthToStr(\n endMonth,\n months,\n )} ${endYear}`\n }\n\n return {\n message: `${entity} ${formatDateWithDivider(start, end)}`,\n state: 'info',\n }\n }\n\n static getMessageWithOneDate(locale, date) {\n if (!locale.entity) {\n return formatDate(date, locale.months)\n }\n return `${locale.entity} ${formatDate(date, locale.months)}`\n }\n\n static getEntityStatusAlert = (locale, start, end, status) => {\n if ((!start) instanceof DateTime || (!end) instanceof DateTime) {\n throw new Error(\n 'Неверный тип даты, передаваемый в функцию getEntityStatus!',\n )\n }\n\n const {\n entity = '',\n before = '',\n during = '',\n after = '',\n months = [''],\n onGoing = '',\n } = locale\n\n if (status === TIME_STATUSES.ENDED) {\n return {\n message: `${entity} ${after} ${formatDate(end, months)}`,\n state: 'after',\n }\n }\n\n if (status === TIME_STATUSES.WILL_START) {\n return {\n message: `${entity} ${before} ${formatDate(start, months)}`,\n state: 'before',\n }\n }\n\n if (end === EventDateService.MAX_DATE) {\n // \"Регистрация идет\" (без даты)\n return {\n message: `${entity} ${onGoing}`,\n state: 'during',\n }\n }\n\n return {\n message: `${entity} ${during} ${formatDate(end, months)}`,\n state: 'during',\n }\n }\n}\n","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-registration-user-form.vue?vue&type=style&index=0&id=d8ecd396&prod&lang=scss&\"","import EventDateService from '@/domain/services/event-date-service'\nimport { AbstractMethod } from '@/utils/oop-helpers'\nimport { translateFn } from '@/plugins/i18n'\nimport { TIME_STATUSES } from '@/utils'\n\nexport default class UserLoginStrategy {\n constructor(event, user) {\n this.userData = user\n this.eventDateServise = new EventDateService(event)\n this.eventData = event\n }\n execute() {\n new AbstractMethod()\n }\n\n translateI18N(key, ...args) {\n return translateFn(key, ...args)\n }\n\n async _registrationUnavailableGuard() {\n if (this.eventData.registrationTimeStatus !== TIME_STATUSES.IN_PROGRESS) {\n this._throwUnavailableRegistrationAlert()\n }\n }\n\n _throwUnavailableRegistrationAlert() {\n const start = this.eventDateServise.startRegistrationTime\n const end = this.eventDateServise.endRegistrationTime\n\n // регистрация может быть недоступна, если дата начала регистрации не указана,\n // а дата окончания уже наступила\n if (this.eventData.registrationTimeStatus === TIME_STATUSES.ENDED) {\n throw new Error(this.translateI18N('alertTime.error.ended'))\n }\n // регистрация может быть недоступна, если дата окончания регистрации не указана,\n // а дата начала еще не наступила\n if (this.eventData.registrationTimeStatus === TIME_STATUSES.WILL_START) {\n const locale = {\n entity: this.translateI18N('alertTime.error.willStart'),\n months: this.translateI18N('months'),\n }\n const message = EventDateService.getMessageWithOneDate(locale, start)\n throw new Error(message)\n }\n\n const locale = {\n entity: this.translateI18N('auth.regDateError.text'),\n months: this.translateI18N('months'),\n divider: this.translateI18N('auth.regDateError.divider'),\n }\n\n const status = EventDateService.getAlertMessageWithDivider(\n locale,\n start,\n end,\n )\n throw new Error(status.message)\n }\n}\n"],"sourceRoot":""}