{"version":3,"sources":["webpack:///./src/domain/composables/use-form.js","webpack:///./src/components/common/field-renderer/field-event-bus.js","webpack:///./src/components/common/field-renderer/mixins/init-validation.js","webpack:///./src/components/common/field-renderer/fields/country.vue?522c","webpack:///./src/components/common/app-form.vue?8809","webpack:///./src/components/common/field-renderer/settings/other.vue?baab","webpack:///./node_modules/lodash/now.js","webpack:///./src/components/common/field-renderer/mixins/update-value.js","webpack:///./node_modules/lodash/debounce.js","webpack:///./src/components/common/field-renderer/fields/location.vue?6075","webpack:///./src/components/common/field-renderer/settings/copy.vue?53d5","webpack:///./src/components/common/app-form.vue","webpack:///./src/components/common/field-renderer/index.vue","webpack:///./src/components/common/field-renderer/fields/checkbox.vue","webpack:///src/components/common/field-renderer/fields/checkbox.vue","webpack:///./src/components/common/field-renderer/fields/checkbox.vue?e9ab","webpack:///./src/components/common/field-renderer/fields/checkbox.vue?a7d6","webpack:///./src/components/common/field-renderer/fields/data-time.vue","webpack:///src/components/common/field-renderer/fields/data-time.vue","webpack:///./src/components/common/field-renderer/fields/data-time.vue?6146","webpack:///./src/components/common/field-renderer/fields/data-time.vue?027e","webpack:///./src/components/common/field-renderer/fields/file.vue","webpack:///src/components/common/field-renderer/fields/file.vue","webpack:///./src/components/common/field-renderer/fields/file.vue?0c37","webpack:///./src/components/common/field-renderer/fields/file.vue?0125","webpack:///./src/components/common/field-renderer/fields/select.vue","webpack:///src/components/common/field-renderer/fields/select.vue","webpack:///./src/components/common/field-renderer/fields/select.vue?443e","webpack:///./src/components/common/field-renderer/fields/select.vue?08bc","webpack:///./src/components/common/field-renderer/fields/multi-select.vue","webpack:///src/components/common/field-renderer/fields/multi-select.vue","webpack:///./src/components/common/field-renderer/fields/multi-select.vue?827f","webpack:///./src/components/common/field-renderer/fields/multi-select.vue?0d71","webpack:///./src/components/common/field-renderer/fields/phone.vue","webpack:///src/components/common/field-renderer/fields/phone.vue","webpack:///./src/components/common/field-renderer/fields/phone.vue?ef29","webpack:///./src/components/common/field-renderer/fields/phone.vue?9458","webpack:///./src/components/common/field-renderer/fields/radio.vue","webpack:///src/components/common/field-renderer/fields/radio.vue","webpack:///./src/components/common/field-renderer/fields/radio.vue?5767","webpack:///./src/components/common/field-renderer/fields/radio.vue?fd4f","webpack:///./src/components/common/field-renderer/fields/string.vue","webpack:///src/components/common/field-renderer/fields/string.vue","webpack:///./src/components/common/field-renderer/fields/string.vue?86ea","webpack:///./src/components/common/field-renderer/fields/string.vue?46ad","webpack:///./src/components/common/field-renderer/fields/text.vue","webpack:///src/components/common/field-renderer/fields/text.vue","webpack:///./src/components/common/field-renderer/fields/text.vue?8674","webpack:///./src/components/common/field-renderer/fields/text.vue?0c14","webpack:///./src/components/common/field-renderer/fields/location.vue","webpack:///src/components/common/field-renderer/fields/location.vue","webpack:///./src/components/common/field-renderer/fields/location.vue?7230","webpack:///./src/components/common/field-renderer/fields/location.vue?131f","webpack:///./src/components/common/field-renderer/fields/country.vue","webpack:///./src/domain/services/countries-service.js","webpack:///./src/domain/composables/use-countries.js","webpack:///src/components/common/field-renderer/fields/country.vue","webpack:///./src/components/common/field-renderer/fields/country.vue?aa75","webpack:///./src/components/common/field-renderer/fields/country.vue?40c5","webpack:///src/components/common/field-renderer/index.vue","webpack:///./src/components/common/field-renderer/index.vue?9472","webpack:///./src/components/common/field-renderer/index.vue?de2e","webpack:///./src/components/common/field-renderer/settings/other.vue","webpack:///src/components/common/field-renderer/settings/other.vue","webpack:///./src/components/common/field-renderer/settings/other.vue?1a3e","webpack:///./src/components/common/field-renderer/settings/other.vue?2f2e","webpack:///./src/components/common/field-renderer/settings/copy.vue","webpack:///src/components/common/field-renderer/settings/copy.vue","webpack:///./src/components/common/field-renderer/settings/copy.vue?c542","webpack:///./src/components/common/field-renderer/settings/copy.vue?0f07","webpack:///./node_modules/nanoid/url-alphabet/index.js","webpack:///./node_modules/nanoid/index.browser.js","webpack:///src/components/common/app-form.vue","webpack:///./src/components/common/app-form.vue?5876","webpack:///./src/components/common/app-form.vue?9cc1","webpack:///./src/components/common/field-renderer/fields/checkbox.vue?4dab"],"names":["useForm","async","getFormData","formId","api","getExistingApiInstance","data","form","getOne","include","join","updateRegistrationData","registrationId","map","item","value","formRecord","updateRegistration","createRegistrationData","eventId","userId","createRegistration","FieldEventBus","Vue","MAX_DAYS_IN_MONTH","MAX_MONTHS","methods","setupValidation","id","type","formLink","required","this","field","requireRule","message","$tr","maxLengthStringRule","validator","rule","_callback","length","dateRule","day","month","split","pattern","typeRulesList","rules","$emit","forEach","typeRule","mounted","root","now","Date","module","exports","updateValue","isObject","toNumber","FUNC_ERROR_TEXT","nativeMax","Math","max","nativeMin","min","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","undefined","apply","leadingEdge","setTimeout","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","clearTimeout","flush","debounced","isInvoking","arguments","render","_vm","_c","_self","staticStyle","isFormLoading","disabled","attrs","staticClass","ref","formModel","validateFormRules","_l","groupsWithFields","group","key","name","_v","_s","_e","fields","class","settings","col","showLabel","help","isFieldNeedDisable","getCountryId","model","callback","$$v","$set","trim","expression","other","on","$event","editOther","hideOther","copy","copyField","removeCopied","fieldsWithoutGroup","_t","submit","staticRenderFns","preparedField","JSON","stringify","countryId","updateValueLocation","values","fieldValue","mixins","props","default","component","directives","rawName","placeholder","realValue","watch","beforeUpload","extensions","removeFile","uploadInProcess","components","UploadList","files","computed","file","catch","beforeMount","defaultValue","dynamicMask","phoneNumber","BASE_NUMBER_MASK","get","set","setPhoneMask","number","throttledMethod","initialLabel","remoteValues","remoteValue","city","region","response","items","country_id","lang","valueId","parseValue","countries","country","COUNTRIES_CODE","getFormattedCountries","reduce","find","c","filter","title","i","iso","useCountries","getCountries","locale","provider","gh","vk","code","console","Checkbox","DataTime","File","Select","MultiSelect","Phone","Radio","StringInput","TextInput","LocationField","CountryField","sortFieldValues","vList","sort","otherShow","isValueInOptions","immediate","handler","copied","nanoid","size","crypto","getRandomValues","Uint8Array","byte","toString","toUpperCase","FieldRenderer","OtherSettings","CopySettings","getValuesFunction","clearForm","groups","disabledFields","entityId","f","linkedLocationFieldsDisabledMap","deep","v","isEmpty","localStorage","beforeUnmount","initModel","fieldId","initModelFromLocalStorage","exposeCopies","rootId","getLinkedCountryField","prepareForm","acc"],"mappings":"gIAAA,kDAEe,SAASA,IACtBC,eAAeC,EAAYC,GACzB,MAAMC,EAAMC,kBAEN,KAAEC,SAAeF,EAAIG,KAAKC,OAAOL,EAAQ,CAC7CM,QAAS,CAAC,gBAAiB,SAAU,YAAYC,KAAK,OAExD,OAAOJ,EAGTL,eAAeU,EAAuB,GAA0B,IAA1B,KAAEJ,EAAI,eAAEK,GAAgB,EAC5D,MAAMR,EAAMC,iBAEZE,EAAOA,EAAKM,IAAKC,IACR,IACFA,EACHC,MAA6B,kBAAfD,EAAKC,MAAqBD,EAAKC,OAAS,KAAOD,EAAKC,eAGhEX,EAAIY,WAAWC,mBAAmBL,EAAgB,CAAEL,SAG5DN,eAAeiB,EAAuB,GAA2B,IAA3B,KAAEX,EAAI,QAAEY,EAAO,OAAEC,GAAQ,EAC7D,MAAMhB,EAAMC,uBACND,EAAIY,WAAWK,mBAAmB,CAAEd,OAAMY,UAASC,WAG3D,MAAO,CACLlB,cACAgB,yBACAP,4B,oCChCJ,kDACO,MAAMW,EAAgB,IAAIC,c,oCCDjC,gBAGA,MAAMC,EAAoB,GACpBC,EAAa,GAEJ,QACbC,QAAS,CACPC,kBACE,MAAM,GACJC,EAAE,KACFC,EACAC,UAAU,SAAEC,IACVC,KAAKC,MAEHC,EAAc,CAClBH,WACAI,QAASH,KAAKI,IAAI,4BAIdC,EAAsB,CAC1BC,UAAUC,EAAMxB,EAAOyB,GACrB,OAAKzB,GAIEA,EAAM0B,QAAU,KAEzBN,QAASH,KAAKI,IAAI,wCAGdM,EAAW,CACfJ,UAAUC,EAA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,aACA,YACA,EACAnH,YACA,uBACA,mBACAyO,8BACA5B,WAGA,wCAEA,2BACA,yBAGA,OAFA,0BAEA,GAEA,sBACA,+CACA,+BACA,sBAEA7F,eACA,eAAA/B,GAAA,GACA,GAAAjF,GAAA,EAEA,oCAEAiH,eACA,eAAAhC,GAAA,GACA,GAAAjF,GAAA,EAEA,0CACA,sBAEA0O,yBACA,wBACAZ,qDAGAzH,sBACA,0BACA,2CAEA,2BAEAC,gBACA,uBACA,OAEA,8BACA,OAGA,sCAEA,MACA,OAGA,6BAEA,kBAMAqI,eACA,mDACA,yBAEA,KAEA,CACA,mCAEA,MAEA,OADAC,QAAAN,UAAAnP,UACA,EAGA,wBACAsC,gBAEA,4BACAA,0BAbAmN,QAAAN,UAAAnP,UAiBA,UACA,OCnYiW,MCQ7V,I,UAAY,eACd,GACAwF,EACA6C,GACA,EACA,KACA,KACA,OAIa,U,2CCnBf","file":"js/profile~registration~request.ae6b67da.js","sourcesContent":["import { getExistingApiInstance } from '@/api'\n\nexport default function useForm() {\n async function getFormData(formId) {\n const api = getExistingApiInstance()\n\n const { data } = await api.form.getOne(formId, {\n include: ['fields.values', 'groups', 'register'].join(','),\n })\n return data\n }\n\n async function updateRegistrationData({ form, registrationId }) {\n const api = getExistingApiInstance()\n // String to null\n form = form.map((item) => {\n return {\n ...item,\n value: typeof item.value === 'string' ? item.value || null : item.value,\n }\n })\n await api.formRecord.updateRegistration(registrationId, { form })\n }\n\n async function createRegistrationData({ form, eventId, userId }) {\n const api = getExistingApiInstance()\n await api.formRecord.createRegistration({ form, eventId, userId })\n }\n\n return {\n getFormData,\n createRegistrationData,\n updateRegistrationData,\n }\n}\n","import Vue from 'vue'\nexport const FieldEventBus = new Vue()\n","import { FieldEventBus } from '../field-event-bus'\n// todo: давно нуждается в переосмыслении и рефакторинге, как и весь field-renderer\n\nconst MAX_DAYS_IN_MONTH = 31\nconst MAX_MONTHS = 12\n\nexport default {\n methods: {\n setupValidation() {\n const {\n id,\n type,\n formLink: { required },\n } = this.field\n\n const requireRule = {\n required,\n message: this.$tr('initValidation.required'),\n // trigger: 'blur'\n }\n\n const maxLengthStringRule = {\n validator(rule, value, _callback) {\n if (!value) {\n return true\n } // обязательность проверяется другим правилом\n\n return value.length <= 255\n },\n message: this.$tr('errors.fields.string.notValidLength'),\n }\n\n const dateRule = {\n validator(rule, value, _callback) {\n if (!value) {\n return true\n } // обязательность проверяется другим правилом\n\n const [day, month] = value.split('-')\n return +day <= MAX_DAYS_IN_MONTH && +month <= MAX_MONTHS\n },\n message: this.$tr('initValidation.wrongDateFormat'),\n pattern: /^\\d{2}-\\d{2}-\\d{4}$/,\n }\n\n /**\n * @type {Array<{ type: string, rules: Array}>}\n */\n const typeRulesList = [\n { type: 'string', rules: [maxLengthStringRule] },\n { type: 'datatime', rules: [dateRule] },\n ]\n\n FieldEventBus.$emit('initValidation', { id, rule: requireRule })\n\n typeRulesList.forEach((typeRule) => {\n if (type === typeRule.type) {\n typeRule.rules.forEach((rule) => {\n FieldEventBus.$emit('initValidation', { id, rule })\n })\n }\n })\n },\n },\n mounted() {\n this.setupValidation()\n },\n}\n","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./country.vue?vue&type=style&index=0&id=054450cc&prod&lang=css&\"","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-form.vue?vue&type=style&index=0&id=5d288006&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!./other.vue?vue&type=style&index=0&id=3ba6e199&prod&lang=scss&\"","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","export default {\n methods: {\n updateValue(value) {\n this.$emit('input', value)\n },\n },\n}\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./location.vue?vue&type=style&index=0&id=1b0d9172&prod&lang=css&\"","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!./copy.vue?vue&type=style&index=0&id=206f13ba&prod&lang=scss&\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticStyle:{\"position\":\"relative\",\"min-height\":\"350px\"}},[(!_vm.isFormLoading && !_vm.disabled)?_c('div',{staticClass:\"registration-form\"},[_c('Form',{ref:\"form\",attrs:{\"model\":_vm.formModel,\"rules\":_vm.validateFormRules}},[_vm._l((_vm.groupsWithFields),function(group){return _c('div',{key:group.id,staticClass:\"registration-form-group\"},[(group.name)?_c('h3',{staticClass:\"registration-form-group__title\"},[_vm._v(\" \"+_vm._s(group.name)+\" \")]):_vm._e(),_c('div',{staticClass:\"row\"},_vm._l((group.fields),function(field){return _c('FormItem',{key:field.id,class:`col-lg-${field.formLink.settings.col} col-sm-6 col-12`,attrs:{\"prop\":field.id,\"label\":field.formLink.showLabel ? field.name : ' ',\"tip\":field.help}},[_c('FieldRenderer',{attrs:{\"field\":field,\"disabled\":_vm.isFieldNeedDisable(field),\"country-id\":_vm.getCountryId(field)},model:{value:(_vm.formModel[field.id]),callback:function ($$v) {_vm.$set(_vm.formModel, field.id, (typeof $$v === 'string'? $$v.trim(): $$v))},expression:\"formModel[field.id]\"}}),(field.formLink.other)?_c('OtherSettings',{attrs:{\"field\":field},on:{\"editOther\":function($event){return _vm.editOther(field, $event)},\"hideOther\":function($event){return _vm.hideOther(field, $event)}},model:{value:(_vm.formModel[field.id]),callback:function ($$v) {_vm.$set(_vm.formModel, field.id, (typeof $$v === 'string'? $$v.trim(): $$v))},expression:\"formModel[field.id]\"}}):_vm._e(),(field.formLink.copy)?_c('CopySettings',{attrs:{\"field\":field},on:{\"copyField\":function($event){return _vm.copyField(field)},\"removeCopied\":function($event){return _vm.removeCopied(field)}}}):_vm._e()],1)}),1)])}),(_vm.fieldsWithoutGroup.length > 0)?_c('div',{staticClass:\"registration-form-group\"},[_c('div',{staticClass:\"row\"},_vm._l((_vm.fieldsWithoutGroup),function(field){return _c('FormItem',{key:field.id,class:`col-lg-${field.formLink.settings.col} col-sm-6 col-12`,attrs:{\"prop\":field.id,\"label\":field.formLink.showLabel ? field.name : ' ',\"tip\":field.help}},[_c('FieldRenderer',{attrs:{\"field\":field,\"disabled\":_vm.isFieldNeedDisable(field),\"country-id\":_vm.getCountryId(field)},model:{value:(_vm.formModel[field.id]),callback:function ($$v) {_vm.$set(_vm.formModel, field.id, (typeof $$v === 'string'? $$v.trim(): $$v))},expression:\"formModel[field.id]\"}}),(field.formLink.other)?_c('OtherSettings',{attrs:{\"field\":field},on:{\"editOther\":function($event){return _vm.editOther(field, $event)},\"hideOther\":function($event){return _vm.hideOther(field, $event)}},model:{value:(_vm.formModel[field.id]),callback:function ($$v) {_vm.$set(_vm.formModel, field.id, (typeof $$v === 'string'? $$v.trim(): $$v))},expression:\"formModel[field.id]\"}}):_vm._e(),(field.formLink.copy)?_c('CopySettings',{attrs:{\"field\":field},on:{\"copyField\":function($event){return _vm.copyField(field)},\"removeCopied\":function($event){return _vm.removeCopied(field)}}}):_vm._e()],1)}),1)]):_vm._e()],2),_vm._t(\"submit\",null,{\"submit\":_vm.submit})],2):_c('Spin',{attrs:{\"fix\":\"\"}})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[(_vm.field.type === 'checkbox')?_c('Checkbox',{attrs:{\"value\":_vm.value,\"field\":_vm.preparedField,\"disabled\":_vm.disabled},on:{\"input\":_vm.updateValue}}):_vm._e(),(_vm.field.type === 'datatime')?_c('DataTime',{attrs:{\"value\":_vm.value,\"field\":_vm.preparedField,\"disabled\":_vm.disabled},on:{\"input\":_vm.updateValue}}):_vm._e(),(_vm.field.type === 'file')?_c('File',{attrs:{\"value\":_vm.value,\"field\":_vm.preparedField,\"disabled\":_vm.disabled},on:{\"input\":_vm.updateValue}}):_vm._e(),(_vm.field.type === 'select')?_c('Select',{attrs:{\"value\":_vm.value,\"field\":_vm.preparedField,\"disabled\":_vm.disabled},on:{\"input\":_vm.updateValue}}):_vm._e(),(_vm.field.type === 'multiselect')?_c('MultiSelect',{attrs:{\"value\":_vm.value,\"field\":_vm.preparedField,\"disabled\":_vm.disabled},on:{\"input\":_vm.updateValue}}):_vm._e(),(_vm.field.type === 'phone')?_c('Phone',{attrs:{\"value\":_vm.value,\"field\":_vm.preparedField,\"disabled\":_vm.disabled},on:{\"input\":_vm.updateValue}}):_vm._e(),(_vm.field.type === 'radio')?_c('Radio',{attrs:{\"value\":_vm.value,\"field\":_vm.preparedField,\"disabled\":_vm.disabled},on:{\"input\":_vm.updateValue}}):_vm._e(),(_vm.field.type === 'string')?_c('StringInput',{attrs:{\"value\":_vm.value,\"field\":_vm.preparedField,\"disabled\":_vm.disabled},on:{\"input\":_vm.updateValue}}):_vm._e(),(_vm.field.type === 'text')?_c('TextInput',{attrs:{\"value\":_vm.value,\"field\":_vm.preparedField,\"disabled\":_vm.disabled},on:{\"input\":_vm.updateValue}}):_vm._e(),(_vm.field.type === 'location')?_c('LocationField',{attrs:{\"value\":_vm.value ? JSON.stringify(_vm.value) : '',\"field\":_vm.preparedField,\"disabled\":_vm.disabled,\"country-id\":_vm.countryId},on:{\"input\":_vm.updateValueLocation}}):_vm._e(),(_vm.field.type === 'country')?_c('CountryField',{attrs:{\"value\":_vm.value ? JSON.stringify(_vm.value) : '',\"field\":_vm.preparedField,\"disabled\":_vm.disabled},on:{\"input\":_vm.updateValueLocation}}):_vm._e()],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('CheckboxGroup',{attrs:{\"value\":_vm.value,\"disabled\":_vm.disabled},on:{\"input\":_vm.updateValue}},_vm._l((_vm.field.values),function(fieldValue){return _c('Checkbox',{key:fieldValue.id,class:{ 'checkbox-required': fieldValue.required },attrs:{\"label\":fieldValue.value}},[_vm._v(\" \"+_vm._s(fieldValue.value)+\" \")])}),1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <CheckboxGroup :value=\"value\" :disabled=\"disabled\" @input=\"updateValue\">\n <Checkbox\n v-for=\"fieldValue in field.values\"\n :key=\"fieldValue.id\"\n :label=\"fieldValue.value\"\n :class=\"{ 'checkbox-required': fieldValue.required }\"\n >\n {{ fieldValue.value }}\n </Checkbox>\n </CheckboxGroup>\n</template>\n\n<script>\nimport InitValidation from '../mixins/init-validation'\nimport UpdateValue from '../mixins/update-value'\n\nexport default {\n mixins: [UpdateValue, InitValidation],\n props: {\n value: {\n type: Array,\n default: () => [],\n },\n field: {\n type: Object,\n default: () => ({}),\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n}\n</script>\n\n<style>\n.checkbox-required:after {\n content: '*';\n display: inline-block;\n margin-left: 4px;\n line-height: 1;\n font-family: SimSun;\n font-size: 14px;\n color: #fb4e4e;\n position: absolute;\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!./checkbox.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!./checkbox.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./checkbox.vue?vue&type=template&id=600b8266&\"\nimport script from \"./checkbox.vue?vue&type=script&lang=js&\"\nexport * from \"./checkbox.vue?vue&type=script&lang=js&\"\nimport style0 from \"./checkbox.vue?vue&type=style&index=0&id=600b8266&prod&lang=css&\"\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","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('Input',{directives:[{name:\"mask\",rawName:\"v-mask\",value:('##-##-####'),expression:\"'##-##-####'\"}],attrs:{\"disabled\":_vm.disabled,\"placeholder\":_vm.field.placeholder,\"type\":\"text\"},model:{value:(_vm.realValue),callback:function ($$v) {_vm.realValue=$$v},expression:\"realValue\"}})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <Input\n v-model=\"realValue\"\n v-mask=\"'##-##-####'\"\n :disabled=\"disabled\"\n :placeholder=\"field.placeholder\"\n type=\"text\"\n />\n</template>\n\n<script>\nimport InitValidation from '../mixins/init-validation'\nimport UpdateValue from '../mixins/update-value'\n\nexport default {\n mixins: [InitValidation, UpdateValue],\n props: {\n value: {\n type: [String, Number, null],\n default: '',\n },\n field: {\n type: Object,\n default: () => ({}),\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n data() {\n return {\n realValue: '',\n }\n },\n watch: {\n // Перенес таким образом для того чтобы использовать\n // v-model с v-mask вместо не v-bind:value и v-on:input\n // v-model рекомендуют использовать в доке v-mask https://www.npmjs.com/package/v-mask#rocket-usage\n value(v) {\n this.realValue = v\n },\n realValue(value) {\n this.$emit('input', value)\n },\n },\n mounted() {\n this.realValue = this.value\n },\n}\n</script>\n\n<style></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!./data-time.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!./data-time.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./data-time.vue?vue&type=template&id=0f05796c&\"\nimport script from \"./data-time.vue?vue&type=script&lang=js&\"\nexport * from \"./data-time.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 null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('Upload',{attrs:{\"value\":_vm.value,\"show-upload-list\":false,\"before-upload\":_vm.beforeUpload,\"format\":_vm.extensions,\"action\":''}}),_c('UploadList',{attrs:{\"files\":_vm.value},on:{\"on-file-remove\":_vm.removeFile}}),(_vm.uploadInProcess)?_c('Spin',{attrs:{\"size\":\"large\",\"fix\":\"\"}}):_vm._e()],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div>\n <Upload\n :value=\"value\"\n :show-upload-list=\"false\"\n :before-upload=\"beforeUpload\"\n :format=\"extensions\"\n :action=\"''\"\n />\n <UploadList :files=\"value\" @on-file-remove=\"removeFile\"></UploadList>\n <Spin v-if=\"uploadInProcess\" size=\"large\" fix></Spin>\n </div>\n</template>\n\n<script>\nimport InitValidation from '../mixins/init-validation'\nimport UpdateValue from '../mixins/update-value'\n\nimport UploadList from '@/assets/vendor/view-design/src/components/upload/upload-list'\nimport { getExistingApiInstance } from '@/api'\n\nexport default {\n components: { UploadList },\n mixins: [UpdateValue, InitValidation],\n props: {\n value: {\n type: Array,\n default: () => [],\n },\n field: {\n type: Object,\n default: () => ({}),\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n data() {\n return {\n files: [],\n uploadInProcess: false,\n }\n },\n computed: {\n extensions() {\n const { extensions } = this.field.formLink\n if (extensions) {\n return extensions.split(',').map((e) => e.trim())\n }\n\n return []\n },\n },\n methods: {\n async beforeUpload(file) {\n if (this.extensions.length > 0) {\n const ext = file.name.split('.')[1]\n\n if (this.extensions.includes(ext)) {\n const uploadedFile = await this.uploadFile(file)\n if (uploadedFile) {\n this.$emit('input', [...this.value, uploadedFile])\n }\n }\n }\n\n if (this.extensions.length === 0) {\n const uploadedFile = await this.uploadFile(file)\n if (uploadedFile) {\n this.$emit('input', [...this.value, uploadedFile])\n }\n }\n },\n async uploadFile(file) {\n const data = new FormData()\n data.append('file', file)\n\n this.uploadInProcess = true\n const res = await getExistingApiInstance()\n .file.upload(data)\n .catch((e) => {\n this.uploadInProcess = false\n throw new Error(e)\n })\n this.uploadInProcess = false\n\n return res.data\n },\n async removeFile(file) {\n const { id } = file\n const purgedFiles = this.value.filter((f) => +f.id !== +id)\n\n this.uploadInProcess = true\n await getExistingApiInstance()\n .file.delete(id)\n .catch((e) => {\n if (e.status === 404) {\n this.$emit('input', purgedFiles)\n this.uploadInProcess = false\n } else {\n this.uploadInProcess = false\n throw new Error(e)\n }\n })\n this.uploadInProcess = false\n\n this.$emit('input', purgedFiles)\n },\n },\n}\n</script>\n\n<style></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!./file.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!./file.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./file.vue?vue&type=template&id=a7ec3d04&\"\nimport script from \"./file.vue?vue&type=script&lang=js&\"\nexport * from \"./file.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 null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('Select',{attrs:{\"value\":_vm.value,\"disabled\":_vm.disabled,\"placeholder\":_vm.field.placeholder,\"clearable\":\"\",\"filterable\":\"\"},on:{\"input\":_vm.updateValue}},_vm._l((_vm.field.values),function(fieldValue){return _c('Option',{key:fieldValue.id,attrs:{\"value\":fieldValue.value}},[_vm._v(\" \"+_vm._s(fieldValue.value)+\" \")])}),1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <Select\n :value=\"value\"\n :disabled=\"disabled\"\n :placeholder=\"field.placeholder\"\n clearable\n filterable\n @input=\"updateValue\"\n >\n <Option\n v-for=\"fieldValue in field.values\"\n :key=\"fieldValue.id\"\n :value=\"fieldValue.value\"\n >\n {{ fieldValue.value }}\n </Option>\n </Select>\n</template>\n\n<script>\nimport InitValidation from '../mixins/init-validation'\nimport UpdateValue from '../mixins/update-value'\n\nexport default {\n mixins: [UpdateValue, InitValidation],\n props: {\n value: {\n type: String,\n default: '',\n },\n field: {\n type: Object,\n default: () => ({}),\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n beforeMount() {\n this.defaultValue()\n },\n methods: {\n defaultValue() {\n if (!this.value) {\n this.field.values?.forEach((i) => {\n if (i.default) this.updateValue(i.value)\n })\n }\n },\n },\n}\n</script>\n\n<style></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!./select.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!./select.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./select.vue?vue&type=template&id=4d77f69d&\"\nimport script from \"./select.vue?vue&type=script&lang=js&\"\nexport * from \"./select.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 null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('Select',{attrs:{\"value\":_vm.value,\"disabled\":_vm.disabled,\"placeholder\":_vm.field.placeholder,\"multiple\":\"\"},on:{\"input\":_vm.updateValue}},_vm._l((_vm.field.values),function(fieldValue){return _c('Option',{key:fieldValue.id,attrs:{\"value\":fieldValue.value}},[_vm._v(\" \"+_vm._s(fieldValue.value)+\" \")])}),1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <Select\n :value=\"value\"\n :disabled=\"disabled\"\n :placeholder=\"field.placeholder\"\n multiple\n @input=\"updateValue\"\n >\n <Option\n v-for=\"fieldValue in field.values\"\n :key=\"fieldValue.id\"\n :value=\"fieldValue.value\"\n >\n {{ fieldValue.value }}\n </Option>\n </Select>\n</template>\n\n<script>\nimport InitValidation from '../mixins/init-validation'\nimport UpdateValue from '../mixins/update-value'\n\nexport default {\n mixins: [UpdateValue, InitValidation],\n props: {\n value: {\n type: Array,\n default: () => [],\n },\n field: {\n type: Object,\n default: () => ({}),\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n beforeMount() {\n this.defaultValue()\n },\n\n methods: {\n defaultValue() {\n if (!this.value?.length) {\n this.field.values.forEach((i) => {\n if (i.default) this.updateValue([i.value])\n })\n }\n },\n },\n}\n</script>\n\n<style></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!./multi-select.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!./multi-select.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./multi-select.vue?vue&type=template&id=309d51be&\"\nimport script from \"./multi-select.vue?vue&type=script&lang=js&\"\nexport * from \"./multi-select.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 null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('Input',{directives:[{name:\"mask\",rawName:\"v-mask\",value:(_vm.dynamicMask),expression:\"dynamicMask\"}],attrs:{\"disabled\":_vm.disabled,\"placeholder\":_vm.field.placeholder,\"type\":\"tel\",\"clearable\":\"\"},model:{value:(_vm.phoneNumber),callback:function ($$v) {_vm.phoneNumber=$$v},expression:\"phoneNumber\"}})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <Input\n v-model=\"phoneNumber\"\n v-mask=\"dynamicMask\"\n :disabled=\"disabled\"\n :placeholder=\"field.placeholder\"\n type=\"tel\"\n clearable\n />\n</template>\n\n<script>\nimport InitValidation from '../mixins/init-validation'\n\nconst BASE_NUMBER_MASK = '################'\n\nexport default {\n mixins: [InitValidation],\n props: {\n value: {\n type: [Number, String],\n default: '',\n },\n field: {\n type: Object,\n default: () => ({}),\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n data() {\n return {\n dynamicMask: null,\n }\n },\n computed: {\n phoneNumber: {\n get() {\n return this.value\n },\n set(number) {\n this.setPhoneMask(number)\n },\n },\n },\n\n methods: {\n setPhoneMask(number) {\n this.dynamicMask = BASE_NUMBER_MASK\n\n if (number.charAt(0) === '8') {\n this.dynamicMask = '8 (###)-###-##-##'\n this.$emit('input', number)\n return\n }\n\n if (\n number.charAt(0) === '7' ||\n number.slice(0, 2) === '+7' ||\n number.slice(0, 3) === '+ 7'\n ) {\n this.dynamicMask = '+ # (###)-###-##-##'\n this.$emit('input', number)\n return\n }\n\n if (number.charAt(0) === '+') {\n this.dynamicMask = `+${BASE_NUMBER_MASK}`\n this.$emit('input', number)\n return\n }\n\n // Если стерли значение\n if (number === '') {\n this.dynamicMask = null\n this.$emit('input', '')\n return\n }\n\n // Если любое другое число\n if (!isNaN(number)) {\n this.dynamicMask = `+${BASE_NUMBER_MASK}`\n this.$emit('input', number)\n return\n }\n\n this.$emit('input', number)\n },\n },\n}\n</script>\n\n<style></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!./phone.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!./phone.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./phone.vue?vue&type=template&id=659fcde4&\"\nimport script from \"./phone.vue?vue&type=script&lang=js&\"\nexport * from \"./phone.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 null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('RadioGroup',{attrs:{\"value\":_vm.value,\"disabled\":_vm.disabled},on:{\"input\":_vm.updateValue}},_vm._l((_vm.field.values),function(fieldValue){return _c('Radio',{key:fieldValue.id,attrs:{\"label\":fieldValue.value}},[_vm._v(\" \"+_vm._s(fieldValue.value)+\" \")])}),1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <RadioGroup :value=\"value\" :disabled=\"disabled\" @input=\"updateValue\">\n <Radio\n v-for=\"fieldValue in field.values\"\n :key=\"fieldValue.id\"\n :label=\"fieldValue.value\"\n >\n {{ fieldValue.value }}\n </Radio>\n </RadioGroup>\n</template>\n\n<script>\nimport InitValidation from '../mixins/init-validation'\nimport UpdateValue from '../mixins/update-value'\n\nexport default {\n mixins: [UpdateValue, InitValidation],\n props: {\n value: {\n type: String,\n default: '',\n },\n field: {\n type: Object,\n default: () => ({}),\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n}\n</script>\n\n<style></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!./radio.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!./radio.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./radio.vue?vue&type=template&id=27e75f5a&\"\nimport script from \"./radio.vue?vue&type=script&lang=js&\"\nexport * from \"./radio.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 null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('Input',{attrs:{\"value\":_vm.value,\"disabled\":_vm.disabled,\"placeholder\":_vm.field.placeholder,\"clearable\":\"\"},on:{\"input\":_vm.updateValue}})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <Input\n :value=\"value\"\n :disabled=\"disabled\"\n :placeholder=\"field.placeholder\"\n clearable\n @input=\"updateValue\"\n />\n</template>\n\n<script>\nimport InitValidation from '../mixins/init-validation'\nimport UpdateValue from '../mixins/update-value'\n\nexport default {\n mixins: [UpdateValue, InitValidation],\n props: {\n value: {\n type: String,\n default: '',\n },\n field: {\n type: Object,\n default: () => ({}),\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n}\n</script>\n\n<style></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!./string.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!./string.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./string.vue?vue&type=template&id=5fa22bd1&\"\nimport script from \"./string.vue?vue&type=script&lang=js&\"\nexport * from \"./string.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 null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('Input',{attrs:{\"value\":_vm.value,\"disabled\":_vm.disabled,\"placeholder\":_vm.field.placeholder,\"type\":\"textarea\",\"autosize\":\"\"},on:{\"input\":_vm.updateValue}})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <Input\n :value=\"value\"\n :disabled=\"disabled\"\n :placeholder=\"field.placeholder\"\n type=\"textarea\"\n autosize\n @input=\"updateValue\"\n />\n</template>\n\n<script>\nimport InitValidation from '../mixins/init-validation'\nimport UpdateValue from '../mixins/update-value'\n\nexport default {\n mixins: [UpdateValue, InitValidation],\n props: {\n value: {\n type: String,\n default: '',\n },\n field: {\n type: Object,\n default: () => ({}),\n },\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n}\n</script>\n\n<style></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!./text.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!./text.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./text.vue?vue&type=template&id=624ec87e&\"\nimport script from \"./text.vue?vue&type=script&lang=js&\"\nexport * from \"./text.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 null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('Select',{attrs:{\"value\":_vm.value,\"disabled\":_vm.disabled,\"placeholder\":_vm.field.placeholder,\"remote-method\":_vm.throttledMethod,\"label\":_vm.initialLabel,\"filterable\":\"\",\"clearable\":\"\",\"remote\":\"\"},on:{\"input\":_vm.updateValue}},_vm._l((_vm.remoteValues),function(remoteValue){return _c('Option',{key:remoteValue.id,attrs:{\"value\":JSON.stringify(remoteValue),\"label\":remoteValue.city}},[_c('div',{staticClass:\"location-city\"},[_vm._v(\" \"+_vm._s(remoteValue.city)+\" \")]),_c('div',{staticClass:\"location-region\"},[_vm._v(\" \"+_vm._s(remoteValue.region)+\" \")])])}),1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <Select\n :value=\"value\"\n :disabled=\"disabled\"\n :placeholder=\"field.placeholder\"\n :remote-method=\"throttledMethod\"\n :label=\"initialLabel\"\n filterable\n clearable\n remote\n @input=\"updateValue\"\n >\n <Option\n v-for=\"remoteValue in remoteValues\"\n :key=\"remoteValue.id\"\n :value=\"JSON.stringify(remoteValue)\"\n :label=\"remoteValue.city\"\n >\n <div class=\"location-city\">\n {{ remoteValue.city }}\n </div>\n <div class=\"location-region\">\n {{ remoteValue.region }}\n </div>\n </Option>\n </Select>\n</template>\n\n<script>\nimport debounce from 'lodash/debounce'\nimport InitValidation from '../mixins/init-validation'\nimport UpdateValue from '../mixins/update-value'\nimport { getExistingApiInstance } from '@/api'\n\nexport default {\n mixins: [UpdateValue, InitValidation],\n props: {\n value: { type: String, default: '' },\n field: { type: Object, default: () => ({}) },\n disabled: { type: Boolean, default: false },\n countryId: { type: Object, default: () => ({}) },\n },\n data() {\n return {\n remoteValues: [],\n }\n },\n computed: {\n throttledMethod() {\n const DELAY = 500\n return debounce(this.remoteMethod, DELAY)\n },\n initialLabel() {\n try {\n return this.value ? JSON.parse(this.value).city : ''\n } catch {\n return ''\n }\n },\n },\n watch: {\n countryId(val, oldVal) {\n this.updateValue('')\n this.remoteValues = []\n },\n },\n methods: {\n async remoteMethod(query) {\n if (!query && query.length < 3) {\n return\n }\n\n if (\n !this.field.formLink.provider ||\n this.field.formLink.provider === 'vk'\n ) {\n const {\n data: {\n response: { items },\n },\n } = await getExistingApiInstance().vk.getCities(query, {\n country_id: this.countryId.id !== 1 ? this.countryId.id : undefined,\n lang: this.$i18n.locale,\n })\n\n this.remoteValues = items.map((i) => ({\n id: i.id,\n city: i.title,\n region: i.region,\n }))\n } else {\n const {\n data: { result: items },\n } = await getExistingApiInstance().gh.getCities({\n 'filter[name]': query,\n 'filter[countryIso]': this.countryId.iso,\n 'locale[lang]': this.$i18n.locale,\n })\n\n this.remoteValues = items.map((i) => ({\n id: i.id,\n city: i.name,\n region: i.area,\n }))\n }\n },\n },\n}\n</script>\n\n<style>\n.location-city {\n font-weight: bold;\n}\n.location-region {\n opacity: 0.8;\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!./location.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!./location.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./location.vue?vue&type=template&id=1b0d9172&\"\nimport script from \"./location.vue?vue&type=script&lang=js&\"\nexport * from \"./location.vue?vue&type=script&lang=js&\"\nimport style0 from \"./location.vue?vue&type=style&index=0&id=1b0d9172&prod&lang=css&\"\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","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('Select',{attrs:{\"value\":_vm.valueId,\"disabled\":_vm.disabled,\"placeholder\":_vm.field.placeholder,\"label\":_vm.initialLabel,\"filterable\":\"\",\"clearable\":\"\"},on:{\"input\":_vm.parseValue}},_vm._l((_vm.countries),function(remoteValue){return _c('Option',{key:remoteValue.id,attrs:{\"value\":remoteValue.id,\"label\":remoteValue.country}},[_vm._v(\" \"+_vm._s(remoteValue.country)+\" \")])}),1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export const COUNTRIES_CODE =\n 'AU,AT,AZ,AX,AL,DZ,UM,VI,AS,AI,AO,AD,AQ,AG,AR,AM,AW,AF,BS,BD,BB,BH,BZ,BY,BE,BJ,BM,BG,BO,BA,BW,BR,IO,VG,BN,BF,BI,VU,VA,GB,HU,VE,TL,VN,GA,HT,GY,GP,GT,GN,GW,DE,GI,HN,HK,GD,GL,GR,GE,GU,DK,CD,DJ,DM,DO,EU,EG,ZM,EH,ZW,IL,IN,ID,JO,IQ,IR,IE,IS,ES,IT,YE,KP,CV,KZ,KY,KH,CM,CA,QA,KE,CY,KG,KI,CN,CC,CO,KM,CR,CI,CU,KW,LA,LV,LS,LR,LB,LY,LT,LI,LU,MU,MR,MG,YT,MO,MK,MW,MY,ML,MV,MT,MA,MQ,MH,MX,MZ,MD,MC,MN,MS,MM,NA,NR,NP,NE,NG,AN,NL,NI,NU,NC,NZ,NO,AE,OM,CX,CK,HM,PK,PW,PS,PA,PG,PY,PE,PN,PL,PT,PR,CG,RE,RU,RW,RO,US,SV,WS,SM,ST,SA,SZ,SJ,MP,SC,SN,VC,KN,LC,PM,RS,CS,SG,SY,SK,SI,SB,SO,SD,SR,SL,SU,TJ,TH,TW,TZ,TG,TK,TO,TT,TV,TN,TM,TR,UG,UZ,UA,UY,FO,FM,FJ,PH,FI,FK,FR,GF,PF,TF,HR,CF,TD,ME,CZ,CL,CH,SE,LK,EC,GQ,ER,EE,ET,ZA,KR,GS,JM,JP,BV,NF,SH,TC,WF'\n\nexport default function getFormattedCountries(countries) {\n return countries\n .reduce((countries, country) => {\n if (countries.find((c) => c?.id === country?.id)) {\n return (\n countries.filter((c) => c.title !== '') ||\n countries.filter((c) => c.name !== '')\n )\n }\n\n return [...countries, country]\n }, [])\n .map((i) => ({\n id: i.id,\n iso: i.iso,\n country: i.title || i.name,\n }))\n}\n","import { getExistingApiInstance } from '@/api'\nimport { COUNTRIES_CODE } from '@/domain/services/countries-service'\n\nexport default function useCountries() {\n async function getCountries(locale, provider) {\n const api = getExistingApiInstance()\n\n if (provider === 'gh') {\n const {\n data: { result: items },\n } = await api.gh.getCountries({\n 'locale[lang]': locale,\n })\n return items\n }\n\n const {\n data: {\n response: { items },\n },\n } = await api.vk.getCountries({\n lang: locale,\n code: COUNTRIES_CODE,\n })\n return items\n }\n\n return {\n getCountries,\n }\n}\n","<template>\n <Select\n :value=\"valueId\"\n :disabled=\"disabled\"\n :placeholder=\"field.placeholder\"\n :label=\"initialLabel\"\n filterable\n clearable\n @input=\"parseValue\"\n >\n <Option\n v-for=\"remoteValue in countries\"\n :key=\"remoteValue.id\"\n :value=\"remoteValue.id\"\n :label=\"remoteValue.country\"\n >\n {{ remoteValue.country }}\n </Option>\n </Select>\n</template>\n\n<script>\nimport InitValidation from '../mixins/init-validation'\nimport UpdateValue from '../mixins/update-value'\nimport useCountries from '@/domain/composables/use-countries'\nimport getFormattedCountries from '@/domain/services/countries-service'\n\nexport default {\n mixins: [UpdateValue, InitValidation],\n props: {\n value: { type: String, default: '' },\n field: { type: Object, default: () => ({}) },\n disabled: { type: Boolean, default: false },\n },\n data() {\n return {\n countries: [],\n }\n },\n computed: {\n initialLabel() {\n try {\n return this.value ? JSON.parse(this.value).country : ''\n } catch {\n return ''\n }\n },\n valueId() {\n try {\n return this.value ? JSON.parse(this.value).id : ''\n } catch {\n return ''\n }\n },\n },\n mounted() {\n this.remoteMethod()\n },\n methods: {\n async remoteMethod() {\n try {\n const countries = await useCountries().getCountries(\n this.$i18n.locale,\n this.field.formLink.provider,\n )\n this.countries = getFormattedCountries(countries)\n } catch (e) {\n console.error(e)\n }\n },\n parseValue(valId) {\n const value = this.countries.find((country) => country.id === valId) || {}\n this.updateValue(JSON.stringify(value))\n },\n },\n}\n</script>\n\n<style>\n.location-city {\n font-weight: bold;\n}\n.location-region {\n opacity: 0.8;\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!./country.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!./country.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./country.vue?vue&type=template&id=054450cc&\"\nimport script from \"./country.vue?vue&type=script&lang=js&\"\nexport * from \"./country.vue?vue&type=script&lang=js&\"\nimport style0 from \"./country.vue?vue&type=style&index=0&id=054450cc&prod&lang=css&\"\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>\n <Checkbox\n v-if=\"field.type === 'checkbox'\"\n :value=\"value\"\n :field=\"preparedField\"\n :disabled=\"disabled\"\n @input=\"updateValue\"\n />\n\n <DataTime\n v-if=\"field.type === 'datatime'\"\n :value=\"value\"\n :field=\"preparedField\"\n :disabled=\"disabled\"\n @input=\"updateValue\"\n />\n\n <File\n v-if=\"field.type === 'file'\"\n :value=\"value\"\n :field=\"preparedField\"\n :disabled=\"disabled\"\n @input=\"updateValue\"\n />\n\n <Select\n v-if=\"field.type === 'select'\"\n :value=\"value\"\n :field=\"preparedField\"\n :disabled=\"disabled\"\n @input=\"updateValue\"\n />\n\n <MultiSelect\n v-if=\"field.type === 'multiselect'\"\n :value=\"value\"\n :field=\"preparedField\"\n :disabled=\"disabled\"\n @input=\"updateValue\"\n />\n\n <Phone\n v-if=\"field.type === 'phone'\"\n :value=\"value\"\n :field=\"preparedField\"\n :disabled=\"disabled\"\n @input=\"updateValue\"\n />\n\n <Radio\n v-if=\"field.type === 'radio'\"\n :value=\"value\"\n :field=\"preparedField\"\n :disabled=\"disabled\"\n @input=\"updateValue\"\n />\n\n <StringInput\n v-if=\"field.type === 'string'\"\n :value=\"value\"\n :field=\"preparedField\"\n :disabled=\"disabled\"\n @input=\"updateValue\"\n />\n\n <TextInput\n v-if=\"field.type === 'text'\"\n :value=\"value\"\n :field=\"preparedField\"\n :disabled=\"disabled\"\n @input=\"updateValue\"\n />\n\n <LocationField\n v-if=\"field.type === 'location'\"\n :value=\"value ? JSON.stringify(value) : ''\"\n :field=\"preparedField\"\n :disabled=\"disabled\"\n :country-id=\"countryId\"\n @input=\"updateValueLocation\"\n />\n\n <CountryField\n v-if=\"field.type === 'country'\"\n :value=\"value ? JSON.stringify(value) : ''\"\n :field=\"preparedField\"\n :disabled=\"disabled\"\n @input=\"updateValueLocation\"\n />\n </div>\n</template>\n\n<script>\nimport UpdateValue from './mixins/update-value'\n\nimport Checkbox from './fields/checkbox.vue'\nimport DataTime from './fields/data-time.vue'\nimport File from './fields/file.vue'\nimport Select from './fields/select.vue'\nimport MultiSelect from './fields/multi-select.vue'\nimport Phone from './fields/phone.vue'\nimport Radio from './fields/radio.vue'\nimport StringInput from './fields/string.vue'\nimport TextInput from './fields/text.vue'\nimport LocationField from './fields/location.vue'\nimport CountryField from './fields/country.vue'\n\nexport default {\n components: {\n Checkbox,\n DataTime,\n File,\n Select,\n MultiSelect,\n Phone,\n Radio,\n StringInput,\n TextInput,\n LocationField,\n CountryField,\n },\n mixins: [UpdateValue],\n // eslint-disable-next-line\n props: ['value', 'field', 'disabled', 'countryId'],\n computed: {\n preparedField() {\n // Сортируем опции если они есть\n return { ...this.field, values: this.sortFieldValues(this.field.values) }\n },\n },\n methods: {\n updateValueLocation(val) {\n if (val) {\n this.$emit('input', JSON.parse(val))\n } else {\n this.$emit('input', '')\n }\n },\n sortFieldValues(values) {\n if (values && Array.isArray(values)) {\n const vList = [...values]\n vList.sort(({ sort: a }, { sort: b }) => +a - +b)\n return vList\n }\n return values\n },\n },\n}\n</script>\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!./index.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!./index.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=17d62d15&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.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 null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"form-settings-field\"},[(!_vm.otherShow)?_c('div',{staticClass:\"form-settings-field__setting\",on:{\"click\":_vm.editOther}},[_c('feather',{attrs:{\"type\":\"edit\",\"size\":\"16\",\"stroke\":\"var(--s-black-color-80)\"}}),_c('span',{staticClass:\"s-btn\"},[_vm._v(\" \"+_vm._s(_vm.$tr('fieldSettings.other'))+\" \")])],1):_c('div',{staticClass:\"form-settings-field__other\"},[_c('Input',{attrs:{\"value\":_vm.value,\"size\":\"default\"},on:{\"input\":_vm.updateValue}})],1),(_vm.otherShow)?_c('div',{staticClass:\"form-settings-field__remove\",on:{\"click\":_vm.hideOther}},[_c('feather',{attrs:{\"type\":\"x\",\"size\":\"16\",\"stroke\":\"var(--s-black-color-80)\"}})],1):_vm._e()])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"form-settings-field\">\n <div\n v-if=\"!otherShow\"\n class=\"form-settings-field__setting\"\n @click=\"editOther\"\n >\n <feather type=\"edit\" size=\"16\" stroke=\"var(--s-black-color-80)\" />\n <span class=\"s-btn\">\n {{ $tr('fieldSettings.other') }}\n </span>\n </div>\n <div v-else class=\"form-settings-field__other\">\n <Input :value=\"value\" size=\"default\" @input=\"updateValue\" />\n </div>\n\n <div\n v-if=\"otherShow\"\n class=\"form-settings-field__remove\"\n @click=\"hideOther\"\n >\n <feather type=\"x\" size=\"16\" stroke=\"var(--s-black-color-80)\" />\n </div>\n </div>\n</template>\n\n<script>\nimport UpdateValue from '@/components/common/field-renderer/mixins/update-value'\n\nexport default {\n mixins: [UpdateValue],\n props: {\n value: undefined,\n field: {\n type: Object,\n default: () => ({}),\n },\n },\n data() {\n return {\n otherShow: false,\n }\n },\n computed: {\n options() {\n if (this.field.values) {\n return this.field.values.map((v) => v.value)\n }\n\n return []\n },\n isValueInOptions() {\n return this.options.includes(this.value)\n },\n },\n watch: {\n value: {\n immediate: true,\n handler(v) {\n if (v && !this.isValueInOptions) {\n this.editOther()\n }\n },\n },\n },\n methods: {\n editOther() {\n this.otherShow = true\n this.$emit('editOther', { disabled: true })\n },\n hideOther() {\n this.otherShow = false\n this.$emit('hideOther', { disabled: false })\n },\n },\n}\n</script>\n\n<style lang=\"scss\">\n@import '~@/styles/blocks/form-settings-fields.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!./other.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!./other.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./other.vue?vue&type=template&id=3ba6e199&\"\nimport script from \"./other.vue?vue&type=script&lang=js&\"\nexport * from \"./other.vue?vue&type=script&lang=js&\"\nimport style0 from \"./other.vue?vue&type=style&index=0&id=3ba6e199&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","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"form-settings-field\"},[_c('div',{staticClass:\"form-settings-field__setting\",on:{\"click\":function($event){return _vm.$emit('copyField')}}},[_c('feather',{attrs:{\"type\":\"copy\",\"size\":\"16\",\"stroke\":\"var(--s-black-color-80)\"}}),_c('span',{staticClass:\"s-btn\"},[_vm._v(\" \"+_vm._s(_vm.$tr('fieldSettings.copy'))+\" \")])],1),(_vm.field.copied)?_c('div',{staticClass:\"form-settings-field__remove\",on:{\"click\":function($event){return _vm.$emit('removeCopied')}}},[_c('feather',{attrs:{\"type\":\"trash\",\"size\":\"16\",\"stroke\":\"var(--s-black-color-80)\"}})],1):_vm._e()])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <div class=\"form-settings-field\">\n <div class=\"form-settings-field__setting\" @click=\"$emit('copyField')\">\n <feather type=\"copy\" size=\"16\" stroke=\"var(--s-black-color-80)\" />\n <span class=\"s-btn\">\n {{ $tr('fieldSettings.copy') }}\n </span>\n </div>\n <div\n v-if=\"field.copied\"\n class=\"form-settings-field__remove\"\n @click=\"$emit('removeCopied')\"\n >\n <feather type=\"trash\" size=\"16\" stroke=\"var(--s-black-color-80)\" />\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n props: {\n field: {\n type: Object,\n default: () => ({}),\n },\n },\n}\n</script>\n<style lang=\"scss\">\n@import '~@/styles/blocks/form-settings-fields.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!./copy.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!./copy.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./copy.vue?vue&type=template&id=206f13ba&\"\nimport script from \"./copy.vue?vue&type=script&lang=js&\"\nexport * from \"./copy.vue?vue&type=script&lang=js&\"\nimport style0 from \"./copy.vue?vue&type=style&index=0&id=206f13ba&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","let urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\nexport { urlAlphabet }\n","import { urlAlphabet } from './url-alphabet/index.js'\nlet random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nlet customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1\n let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length === size) return id\n }\n }\n }\n}\nlet customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size, random)\nlet nanoid = (size = 21) =>\n crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {\n byte &= 63\n if (byte < 36) {\n id += byte.toString(36)\n } else if (byte < 62) {\n id += (byte - 26).toString(36).toUpperCase()\n } else if (byte > 62) {\n id += '-'\n } else {\n id += '_'\n }\n return id\n }, '')\nexport { nanoid, customAlphabet, customRandom, urlAlphabet, random }\n","<template>\n <div style=\"position: relative; min-height: 350px\">\n <div v-if=\"!isFormLoading && !disabled\" class=\"registration-form\">\n <Form ref=\"form\" :model=\"formModel\" :rules=\"validateFormRules\">\n <div\n v-for=\"group in groupsWithFields\"\n :key=\"group.id\"\n class=\"registration-form-group\"\n >\n <h3 v-if=\"group.name\" class=\"registration-form-group__title\">\n {{ group.name }}\n </h3>\n <div class=\"row\">\n <FormItem\n v-for=\"field in group.fields\"\n :key=\"field.id\"\n :prop=\"field.id\"\n :label=\"field.formLink.showLabel ? field.name : ' '\"\n :class=\"`col-lg-${field.formLink.settings.col} col-sm-6 col-12`\"\n :tip=\"field.help\"\n >\n <FieldRenderer\n v-model.trim=\"formModel[field.id]\"\n :field=\"field\"\n :disabled=\"isFieldNeedDisable(field)\"\n :country-id=\"getCountryId(field)\"\n />\n\n <OtherSettings\n v-if=\"field.formLink.other\"\n v-model.trim=\"formModel[field.id]\"\n :field=\"field\"\n @editOther=\"editOther(field, $event)\"\n @hideOther=\"hideOther(field, $event)\"\n />\n\n <CopySettings\n v-if=\"field.formLink.copy\"\n :field=\"field\"\n @copyField=\"copyField(field)\"\n @removeCopied=\"removeCopied(field)\"\n />\n </FormItem>\n </div>\n </div>\n <div\n v-if=\"fieldsWithoutGroup.length > 0\"\n class=\"registration-form-group\"\n >\n <div class=\"row\">\n <FormItem\n v-for=\"field in fieldsWithoutGroup\"\n :key=\"field.id\"\n :prop=\"field.id\"\n :label=\"field.formLink.showLabel ? field.name : ' '\"\n :class=\"`col-lg-${field.formLink.settings.col} col-sm-6 col-12`\"\n :tip=\"field.help\"\n >\n <FieldRenderer\n v-model.trim=\"formModel[field.id]\"\n :field=\"field\"\n :disabled=\"isFieldNeedDisable(field)\"\n :country-id=\"getCountryId(field)\"\n />\n\n <OtherSettings\n v-if=\"field.formLink.other\"\n v-model.trim=\"formModel[field.id]\"\n :field=\"field\"\n @editOther=\"editOther(field, $event)\"\n @hideOther=\"hideOther(field, $event)\"\n />\n\n <CopySettings\n v-if=\"field.formLink.copy\"\n :field=\"field\"\n @copyField=\"copyField(field)\"\n @removeCopied=\"removeCopied(field)\"\n />\n </FormItem>\n </div>\n </div>\n </Form>\n <slot name=\"submit\" :submit=\"submit\"></slot>\n </div>\n <Spin v-else fix></Spin>\n </div>\n</template>\n\n<script>\nimport FieldRenderer from '@/components/common/field-renderer/index'\n\nimport OtherSettings from '@/components/common/field-renderer/settings/other'\nimport CopySettings from '@/components/common/field-renderer/settings/copy'\nimport { FieldEventBus } from '@/components/common/field-renderer/field-event-bus'\nimport { nanoid } from 'nanoid'\nimport useForm from '@/domain/composables/use-form'\nimport { DateTime } from '@/plugins/luxon'\nimport { camelize } from '@/utils'\nimport { isEmpty, reject } from 'rambda'\n\nexport default {\n components: {\n FieldRenderer,\n OtherSettings,\n CopySettings,\n },\n\n props: {\n formId: { type: [Number, null], default: null },\n getValuesFunction: { type: [Function, null], default: null },\n disabled: { type: Boolean, default: false },\n clearForm: { type: Boolean, default: false },\n },\n\n data() {\n return {\n formModel: {},\n fields: [],\n groups: [],\n validateFormRules: {},\n disabledFields: {},\n isFormLoading: false,\n entityId: null, // если форма апдейтится, то там будет айди\n }\n },\n\n computed: {\n userId() {\n return this.$store.state.auth.userId\n },\n groupsWithFields() {\n if (this.groups) {\n return this.groups.map((group) => {\n const fields = this.fields.filter(\n (f) => +f.formLink.groupId === +group.id,\n )\n\n return { ...group, fields }\n })\n }\n\n return []\n },\n fieldsWithoutGroup() {\n if (this.fields) {\n return this.fields.filter((f) => f.formLink.groupId === null)\n }\n\n return []\n },\n linkedLocationFieldsDisabledMap() {\n const locationFieldsWithLinks = this.fields.filter(\n (f) =>\n f.type === 'location' &&\n f.formLink &&\n f.formLink.dependentFormFieldId,\n )\n if (!locationFieldsWithLinks.length) {\n return {}\n }\n\n return locationFieldsWithLinks.reduce((acc, curr) => {\n const linkedCountryField = this.getLinkedCountryField(curr)\n\n const isCountryFieldHasValue = !!this.formModel[linkedCountryField.id]\n\n return { [curr.id]: !isCountryFieldHasValue }\n }, {})\n },\n },\n\n watch: {\n formId() {\n this.initForm()\n },\n formModel: {\n deep: true,\n handler(value) {\n const data = this.prepareForm(value).filter((v) =>\n v.value ? (Array.isArray(v.value) ? !!v.value.length : true) : false,\n )\n isEmpty(data)\n ? localStorage.removeItem(`form_${this.userId}_${this.formId}`)\n : localStorage.setItem(\n `form_${this.userId}_${this.formId}`,\n JSON.stringify(data),\n )\n },\n },\n },\n\n async created() {\n await this.initForm()\n },\n\n beforeUnmount() {\n FieldEventBus.$off('initValidation')\n },\n methods: {\n async initForm() {\n if (process.env.NODE_ENV === 'development') {\n // как же я люблю наш field-renderer :)\n console.warn(\n '[AppForm]: Внимание: HMR в этом компоненте отваливает инициализацию валидации, обновляйте страницу!',\n )\n }\n FieldEventBus.$on('initValidation', ({ id, rule }) => {\n if (!this.validateFormRules[id]) {\n // специально теряю реактивность (а то required валидация сразу отрабатывает и отображает ошибку)\n // именно это ломает hmr, но при этом так нужно для работы field-renderer\n // (причина не установлена, но какие то танцы с async-validator)\n // из-за этого и теряется hmr\n this.validateFormRules[id] = []\n }\n this.validateFormRules[id].push(rule)\n })\n\n await this.getForm()\n },\n async submit() {\n if (this.$refs.form) {\n const isValid = await this.$refs.form.validate()\n if (isValid) {\n const form = this.prepareForm(this.formModel)\n this.$emit('submit', {\n form: camelize(form),\n entityId: this.entityId,\n })\n if (this.clearForm) this.$nextTick(() => (this.formModel = {}))\n } else {\n this.$Message.error(this.$tr('errors.formError'))\n console.error('Форма невалидна')\n }\n }\n },\n async getForm() {\n const { getFormData } = useForm()\n this.isFormLoading = true\n const [formData, fieldValues] = await Promise.all([\n getFormData(this.formId),\n this.getValuesFunction ? this.getValuesFunction() : null,\n ]).finally(() => (this.isFormLoading = false))\n this.fields = formData.fields\n this.groups = formData.groups\n\n this.$emit('fields', this.fields)\n\n if (fieldValues) {\n const [{ entityId }] = fieldValues\n this.entityId = entityId\n this.initModel(fieldValues)\n } else {\n this.initModelFromLocalStorage()\n }\n },\n initModel(fieldValues) {\n // тут происходит магия вне хогвартса, перенесено из старого паблика без изменений\n this.fields.forEach((f) => {\n const valueField = fieldValues.find(({ fieldId }) => +fieldId === +f.id)\n\n if (!valueField) {\n return\n }\n\n const { value } = valueField\n const { type } = f\n const copyTypes = ['text', 'string', 'select']\n const isValueArray = Array.isArray(value)\n\n if (copyTypes.includes(type) && isValueArray) {\n this.exposeCopies(f, value)\n return\n }\n\n if (value !== null) {\n this.$set(this.formModel, f.id, value)\n }\n })\n },\n initModelFromLocalStorage() {\n const data = JSON.parse(\n localStorage.getItem(`form_${this.userId}_${this.formId}`),\n )\n if (data && !isEmpty(data)) this.initModel(data)\n },\n exposeCopies(field, value) {\n const [firstValue] = value.splice(0, 1)\n this.$set(this.formModel, field.id, firstValue)\n\n value.forEach((val) => {\n const { id } = this.copyField(field)\n this.$set(this.formModel, id, val)\n })\n },\n copyField(field) {\n const newField = {\n ...field,\n id: field.copied\n ? `${field.rootId}__${nanoid()}`\n : `${field.id}__${nanoid()}`,\n rootId: field.copied ? field.rootId : field.id,\n copied: true,\n }\n\n const index = this.fields.findIndex((f) => f.id === field.id)\n\n const left = this.fields.slice(0, index + 1)\n const right = this.fields.slice(index + 1)\n this.fields = [...left, newField, ...right]\n\n return newField\n },\n async removeCopied(field) {\n this.fields = this.fields.filter((f) => f.id !== field.id)\n this.formModel[field.id] = ''\n delete this.formModel[field.id]\n },\n editOther(field, payload) {\n const { disabled } = payload\n const { id } = field\n\n this.$set(this.disabledFields, id, disabled)\n },\n hideOther(field, payload) {\n const { disabled } = payload\n const { id } = field\n\n this.$set(this.disabledFields, id, disabled)\n delete this.formModel[field.id]\n },\n getLinkedCountryField(field) {\n return this.fields.find(\n (f) => f.formLink.id === field.formLink.dependentFormFieldId,\n )\n },\n isFieldNeedDisable(field) {\n if (field.type === 'location') {\n return this.linkedLocationFieldsDisabledMap[field.id]\n }\n return this.disabledFields[field.id]\n },\n getCountryId(field) {\n if (field.type !== 'location') {\n return\n }\n if (this.isFieldNeedDisable(field)) {\n return\n }\n\n const linkedCountryField = this.getLinkedCountryField(field)\n\n if (!linkedCountryField) {\n return\n }\n\n const countryFieldValue = this.formModel[linkedCountryField.id]\n\n if (!countryFieldValue) {\n return\n }\n\n return countryFieldValue\n },\n prepareForm(rawModel) {\n return Object.entries(rawModel).reduce((acc, [fieldId, value]) => {\n const [id, copy] = fieldId.split('__')\n\n if (!copy) {\n acc.push({ fieldId, value })\n } else {\n const root = acc.find((root) => +root.fieldId === +id)\n\n if (!root) {\n acc.push({ fieldId: id, value })\n return acc\n }\n\n if (Array.isArray(root.value)) {\n root.value.push(value)\n }\n if (typeof root.value === 'string') {\n root.value = [root.value, value]\n }\n }\n\n return acc\n }, [])\n },\n },\n}\n</script>\n\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!./app-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-form.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./app-form.vue?vue&type=template&id=5d288006&\"\nimport script from \"./app-form.vue?vue&type=script&lang=js&\"\nexport * from \"./app-form.vue?vue&type=script&lang=js&\"\nimport style0 from \"./app-form.vue?vue&type=style&index=0&id=5d288006&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","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./checkbox.vue?vue&type=style&index=0&id=600b8266&prod&lang=css&\""],"sourceRoot":""}