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9C,iDAAAA,EAAAA,OAAa,mBACjB,EACA+C,gBAAe,SAACF,OACZ7C,iDAAAA,EAAAA,OAAa,kBAAmB6C,MACpC,EACAG,6BAA4B,SAACH,OACzB7C,iDAAAA,EAAAA,OAAa,+BAAgC6C,MACjD,EACAI,cAAa,SAACJ,OACV7C,iDAAAA,EAAAA,OAAa,gBAAiB6C,MAClC,EACAK,eAAc,WACVlD,iDAAAA,EAAAA,OAAa,iBACjB,EACAmD,gBAAe,SAACN,OACZ7C,iDAAAA,EAAAA,OAAa,kBAAmB6C,MACpC,EACAO,iBAAgB,WACZpD,iDAAAA,EAAAA,OAAa,mBACjB,EACAqD,cAAa,SAACC,aAAcC,cACxBvD,iDAAAA,EAAAA,OAAa,gBAAiB,CAACsD,aAAcC,cACjD,E","sources":["webpack://hm/./wwwroot/js/components/card/card-action.js","webpack://hm/./wwwroot/js/components/login.js","webpack://hm/./wwwroot/js/shared/globalize/globalize-formatters.js","webpack://hm/./wwwroot/js/store/advert-actions.js"],"sourcesContent":["import axios from 'axios';\nimport {globalActions} from '../../store/global-actions';\nimport {advertActions} from '../../store/advert-actions';\nimport utils from '../../shared/utils';\nimport {formValidationMixin} from '../mixins/component-mixins';\nimport {defineRule, Field, Form} from 'vee-validate';\nimport {max, min} from '@vee-validate/rules';\n\ndefineRule('min', min);\ndefineRule('max', max);\n\nconst buttonCardActionTemplateName = '#button-card-action';\nconst primaryTextAction = '#primary-text-action';\n\nconst cardActionBase = {\n props: {\n modelValue: {},\n buttonClass: {},\n isEngageAction: {},\n isMobile: {\n type: Boolean,\n required: false,\n },\n },\n data() {\n return Object.assign(this.modelValue, {isMobileDevice: this.isMobile});\n },\n emits: ['set-primary', 'change'],\n methods: {\n setPrimary() {\n this.$emit('set-primary', this.modelValue);\n },\n change() {\n this.modelValue.state = this.state;\n this.$emit('change', this.modelValue);\n },\n },\n};\n\nconst buttonCardAction = {\n extends: cardActionBase,\n template: buttonCardActionTemplateName,\n};\n\nconst stateCardActionMixin = {\n data() {\n return {state: this.modelValue.state};\n },\n computed: {\n currentState() {\n return this.state;\n },\n },\n methods: {\n sendChangeStateRequest() {\n return axios.post(this.url)\n .then((result) => {\n this.state = result.data;\n this.change();\n })\n .catch((result) => globalActions.handleAjaxErrors(result.response));\n },\n\n changeState() {\n this.sendChangeStateRequest();\n },\n },\n};\n\nconst primaryTextActionBase = {\n extends: cardActionBase,\n template: primaryTextAction,\n mixins: [formValidationMixin],\n components: {\n ValidationField: Field,\n VeeValidationFormContext: Form,\n },\n props: {\n forceFocus: {},\n },\n data() {\n return {\n uniqueId: utils.genUid(),\n validationExpression: null,\n message: null,\n showErrors: false,\n };\n },\n computed: {\n validationModel() {\n return this.message || {};\n },\n },\n watch: {\n forceFocus(value) {\n if (value) {\n this.focusTextarea();\n }\n },\n },\n methods: {\n focusTextarea() {\n this.$refs.textarea.focus();\n },\n clearTextarea() {\n this.$refs.textarea.clear();\n },\n },\n};\n\nfunction initCardActionComponents(app) {\n app.component('card-action', {\n extends: cardActionBase,\n template: '#card-action',\n });\n\n app.component('state-card-action', {\n extends: cardActionBase,\n template: '#state-card-action',\n mixins: [stateCardActionMixin],\n });\n\n app.component('visibility-card-action', {\n extends: cardActionBase,\n template: '#state-card-action',\n mixins: [stateCardActionMixin],\n methods: {\n changeState() {\n if (this.state === false) {\n this.sendChangeStateRequest();\n } else {\n advertActions.openHideModal(() => {\n this.sendChangeStateRequest();\n this.state = false;\n this.change();\n });\n }\n },\n },\n });\n\n app.component('fullscreen-card-action', {\n extends: buttonCardAction,\n props: {\n isAdvert: {\n type: Boolean,\n default: true,\n },\n },\n methods: {\n onActionClick() {\n globalActions.openFullscreenModal(this.url, this.isAdvert);\n },\n },\n });\n\n app.component('share-card-action', {\n extends: cardActionBase,\n template: '#share-card-action',\n });\n\n app.component('message-card-action', {\n extends: buttonCardAction,\n template: buttonCardActionTemplateName,\n methods: {\n onActionClick() {\n this.setPrimary();\n },\n },\n });\n\n app.component('rate-card-action', {\n extends: cardActionBase,\n template: '#rate-card-action',\n });\n\n app.component('message-primary-action', {\n extends: primaryTextActionBase,\n template: primaryTextAction,\n methods: {\n async onSubmit(message) {\n const chat = window.chat;\n if (chat) {\n chat.onConversationOpening = async (convId) => {\n chat.currentMessage = message;\n await chat.sendMessage(convId, false, false);\n chat.currentConversation = null;\n chat.onConversationOpening = async () => {\n };\n };\n\n await chat.initiateConversation(this.targetId, this.targetType);\n this.clearTextarea();\n }\n },\n },\n });\n\n app.component('comment-primary-action', {\n extends: primaryTextActionBase,\n template: primaryTextAction,\n data() {\n return {\n validationExpression: `min: 3, max: 500`,\n };\n },\n methods: {\n async onSubmit(message) {\n const validator = this.$refs.validator;\n const result = await validator.validate();\n if (!result.valid) {\n this.showErrors = true;\n return;\n }\n\n try {\n await axios.post(this.url, {body: message, targetId: this.targetId, commentType: this.targetType});\n if (this.successHeader && this.successMessage) {\n globalActions.openInfoModal(this.successHeader, this.successMessage);\n this.clearTextarea();\n }\n } catch (err) {\n console.error(err);\n globalActions.handleAjaxErrors(err);\n }\n },\n },\n });\n\n app.component('link-card-action', {\n extends: buttonCardAction,\n template: buttonCardActionTemplateName,\n methods: {\n onActionClick() {\n window.location = this.url;\n },\n },\n });\n\n app.component('post-card-action', {\n extends: buttonCardAction,\n template: buttonCardActionTemplateName,\n methods: {\n onActionClick() {\n axios.post(this.url, this.data)\n .then((response) => {\n window.location = `${response.data}`;\n })\n .catch((result) => globalActions.handleAjaxErrors(result.response));\n },\n },\n });\n\n app.component('dealcompleted-card-action', {\n extends: buttonCardAction,\n template: buttonCardActionTemplateName,\n methods: {\n onActionClick() {\n if (this.modelValue.isSale) {\n advertActions.openSoldModal(this.modelValue);\n } else {\n advertActions.openRentedModal(this.modelValue);\n }\n },\n },\n });\n\n app.component('copyas-card-action', {\n extends: cardActionBase,\n template: '#copyas-card-action',\n methods: {\n onActionClick() {\n advertActions.openCopyAsModal(this.modelValue);\n },\n },\n });\n\n app.component('delete-card-action', {\n extends: buttonCardAction,\n template: buttonCardActionTemplateName,\n methods: {\n onActionClick() {\n if (this.modelValue.hasActiveOrders) {\n advertActions.openConfirmAdvertDeleteModal(this.modelValue);\n } else {\n advertActions.openDeleteModal(this.modelValue);\n }\n },\n },\n });\n\n app.component('raiserelevance-card-action', {\n extends: buttonCardAction,\n template: buttonCardActionTemplateName,\n methods: {\n onActionClick() {\n axios.post(this.modelValue.url)\n .then(() => {\n this.$root.showUpdatedModal = true;\n this.$root.createOrderUrl = this.modelValue.createOrderUrl;\n })\n .catch((result) => globalActions.handleAjaxErrors(result.response));\n },\n },\n });\n}\n\nexport default initCardActionComponents;\n","import {nextTick} from 'vue';\nimport shared from '../shared';\nimport {modal} from './modals/modals';\nimport _u from '../shared/utils';\nimport {store} from '../store/global-store';\nimport {formValidationMixin} from './mixins/component-mixins';\nimport {defineRule, Field, Form} from 'vee-validate';\nimport {min, regex, required} from '@vee-validate/rules';\nimport axios from 'axios';\n\ndefineRule('required', required);\ndefineRule('regex', regex);\ndefineRule('min', min);\n\nconst loginControl = {\n data() {\n return {\n loginMode: false,\n returnUrl: null,\n registrationTrigger: null,\n rememberMe: true,\n invitationId: null,\n password: null,\n isAgent: false,\n referencedUserEmail: null,\n enteredEmail: null,\n // true when login in modal\n // false for static pages - Login and Register\n isNeedToUpdateReturnUrl: true,\n isValidationVisible: false,\n submitting: false,\n authErrors: null,\n };\n },\n components: {\n VeeValidationFormContext: Form,\n ValidationField: Field,\n },\n computed: {\n validationModel() {\n return this.referencedUserEmail || {};\n },\n authErrorKeys() {\n return Object.keys(this.authErrors);\n },\n errorVisibility() {\n return this.authErrors;\n },\n userEmail() {\n return this.referencedUserEmail ? this.referencedUserEmail : this.enteredEmail;\n },\n },\n methods: {\n startFormSubmit() {\n this.submitting = true;\n },\n\n stopFormSubmit() {\n this.submitting = false;\n },\n\n switchMode() {\n this.loginMode = !this.loginMode;\n this.isValidationVisible = false;\n this.clearErrorState();\n },\n showValidation() {\n this.isValidationVisible = true;\n },\n beforeSubmit() {\n this.startFormSubmit();\n this.showValidation();\n },\n async _validate() {\n const validator = this.$refs.validator;\n const result = await validator.validate();\n\n return result.valid;\n },\n async submitForm() {\n this.beforeSubmit();\n\n if (await this._validate()) {\n this.clearErrorState();\n this._updateReturnUrl(this.$refs.form);\n this._deleteReferencedUserData();\n await this.sendDataAction();\n } else {\n this._handleSubmitError();\n this.stopFormSubmit();\n }\n },\n clearErrorState() {\n this.authErrors = null;\n },\n\n getFormRequestConfig() {\n const loginAntiforgeryTokenIndex = 7;\n const antiforgeryToken = this.$refs.form[loginAntiforgeryTokenIndex]?._value;\n return _u.createFormRequestConfig(antiforgeryToken);\n },\n async sendDataAction() {\n const requestConfig = this.getFormRequestConfig();\n const authForm = this.$refs.form;\n\n try {\n const response = await axios.post(authForm.action, authForm, requestConfig);\n\n this.handleSuccessResult(response);\n } catch (error) {\n this.handleErrorResult(error);\n }\n\n this.afterRequestSendingActions();\n },\n handleSuccessResult(response) {\n this.stopFormSubmit();\n if (response && response.status === 200) {\n if (response.data?.redirectUrl) {\n const currentUrl = window.location.href.replace(window.location.origin, '');\n\n if (currentUrl === response.data?.redirectUrl) {\n window.location.reload();\n } else {\n window.location.href = response.data?.redirectUrl;\n }\n }\n }\n },\n handleErrorResult(error) {\n this.stopFormSubmit();\n this.authErrors = error.response?.data?.errors;\n\n if (error.response.data?.email) {\n this.enteredEmail = error.response.data?.email;\n }\n },\n afterRequestSendingActions() {\n },\n async forceSubmitForm() {\n await this.sendDataAction();\n },\n submitSocialForm(formId) {\n const form = this.$refs[formId];\n if (form) {\n this.startFormSubmit(true);\n this._updateReturnUrl(form);\n this._deleteReferencedUserData();\n\n form.submit();\n }\n },\n _subscribeModeSwitch() {\n store.subscribe((mutation) => {\n if (mutation.type === 'loginModeSwitch') {\n this.switchMode();\n }\n });\n },\n _setReferencedUserData() {\n nextTick(() => {\n this.invitationId = localStorage.getItem('invitationId');\n this.referencedUserEmail = localStorage.getItem('referencedUserEmail');\n });\n },\n _deleteReferencedUserData() {\n localStorage.removeItem('invitationId');\n localStorage.removeItem('referencedUserEmail');\n },\n _updateReturnUrl(form) {\n if (this.isNeedToUpdateReturnUrl) {\n const currentUrl = _u.getCurrentUrl();\n const homeUrl = '/';\n\n if (!this.returnUrl && !form.action.includes(currentUrl)) {\n this.returnUrl = currentUrl;\n }\n\n // form action always includes / (slash)onCompleteCode\n // so if currentUrl is home url we should also assign it to returnUrl\n if (!this.returnUrl && currentUrl === homeUrl) {\n this.returnUrl = currentUrl;\n }\n\n if (this.returnUrl && !form.action.includes('returnUrl')) {\n form.action = _u.addQueryParamForUrl(form.action, 'returnUrl', this.returnUrl);\n }\n }\n },\n _subscribeChangePreselectRegistrationReasonStore() {\n store.subscribe((mutation) => {\n if (mutation.type === 'changePreselectRegistrationReason' && mutation.payload) {\n this.registrationTrigger = mutation.payload;\n }\n });\n },\n _handleSubmitError() {\n\n },\n },\n mounted() {\n this._subscribeModeSwitch();\n this._subscribeChangePreselectRegistrationReasonStore();\n this._setReferencedUserData();\n if (this.authErrors) {\n this.showValidation();\n }\n },\n};\n\nfunction initLoginComponents(app) {\n app.component('login-modal', {\n mixins: [modal, formValidationMixin, loginControl],\n template: '#login-modal',\n computed: {\n loginModalOpened: {\n get() {\n return store.state.shared.loginModalOpened;\n },\n set(value) {\n if (value === false) {\n store.commit('closeLoginModal');\n }\n },\n },\n },\n methods: {\n close() {\n this.loginModalOpened = false;\n },\n },\n });\n\n return {shared, loginControl};\n}\n\nexport {\n initLoginComponents,\n loginControl,\n};\n","import Globalize from 'globalize';\n\nconst currencyShortFormatter = (currency) => Globalize.currencyFormatter(currency, {\n compact: 'short',\n minimumFractionDigits: 0,\n maximumFractionDigits: 1,\n});\n\nconst currencyMediumFormatter = (currency) => Globalize.currencyFormatter(currency, {\n compact: 'short',\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n});\n\nconst currencyRoundFormatter = (currency) => Globalize.currencyFormatter(currency, {\n round: 'round',\n maximumFractionDigits: 0,\n});\n\nconst currencyLongFormatter = (currency) => Globalize.currencyFormatter(currency);\n\nconst numberShortFormatter = (locale) => Globalize(locale).numberFormatter({\n compact: 'short',\n minimumSignificantDigits: 3,\n maximumSignificantDigits: 3,\n});\n\nconst numberShortRoundFormatter = (locale) => Globalize(locale).numberFormatter({\n compact: 'short',\n minimumSignificantDigits: 1,\n maximumSignificantDigits: 3,\n});\n\nconst numberLongFormatter = (locale) => Globalize(locale).numberFormatter({\n minimumSignificantDigits: 1,\n maximumSignificantDigits: 3,\n});\n\nexport {currencyShortFormatter, currencyMediumFormatter, currencyLongFormatter, currencyRoundFormatter, numberShortFormatter, numberShortRoundFormatter, numberLongFormatter};\n","import {store} from '../store/global-store';\n\nexport const advertActions = {\n openCopyAsModal(model) {\n store.commit('openCopyAsModal', model);\n },\n closeCopyAsModal() {\n store.commit('closeCopyAsModal');\n },\n openDeleteModal(model) {\n store.commit('openDeleteModal', model);\n },\n openConfirmAdvertDeleteModal(model) {\n store.commit('openConfirmAdvertDeleteModal', model);\n },\n openSoldModal(model) {\n store.commit('openSoldModal', model);\n },\n closeSoldModal() {\n store.commit('closeSoldModal');\n },\n openRentedModal(model) {\n store.commit('openRentedModal', model);\n },\n closeRentedModal() {\n store.commit('closeRentedModal');\n },\n openHideModal(acceptAction, cancelAction) {\n store.commit('openHideModal', {acceptAction, cancelAction});\n },\n};\n"],"names":["defineRule","min","max","cardActionBase","props","modelValue","buttonClass","isEngageAction","isMobile","type","Boolean","required","data","Object","assign","this","isMobileDevice","emits","methods","setPrimary","$emit","change","state","formValidationMixin","Field","Form","regex","loginControl","loginMode","returnUrl","registrationTrigger","rememberMe","invitationId","password","isAgent","referencedUserEmail","enteredEmail","isNeedToUpdateReturnUrl","isValidationVisible","submitting","authErrors","components","VeeValidationFormContext","ValidationField","computed","validationModel","authErrorKeys","keys","errorVisibility","userEmail","startFormSubmit","stopFormSubmit","switchMode","clearErrorState","showValidation","beforeSubmit","_validate","_this","_asyncToGenerator","regeneratorRuntime","mark","_callee","validator","result","wrap","_context","prev","next","$refs","validate","sent","abrupt","valid","stop","submitForm","_this2","_callee2","_context2","_updateReturnUrl","form","_deleteReferencedUserData","sendDataAction","_handleSubmitError","getFormRequestConfig","antiforgeryToken","_value","_u","_this3","_callee3","requestConfig","authForm","response","_context3","axios","action","handleSuccessResult","t0","handleErrorResult","afterRequestSendingActions","status","redirectUrl","window","location","href","replace","origin","reload","error","errors","email","forceSubmitForm","_this4","_callee4","_context4","submitSocialForm","formId","submit","_subscribeModeSwitch","_this5","store","mutation","_setReferencedUserData","_this6","nextTick","localStorage","getItem","removeItem","currentUrl","includes","_subscribeChangePreselectRegistrationReasonStore","_this7","payload","mounted","initLoginComponents","app","component","mixins","modal","template","loginModalOpened","get","set","value","close","shared","currencyShortFormatter","currency","Globalize","compact","minimumFractionDigits","maximumFractionDigits","currencyMediumFormatter","currencyRoundFormatter","round","currencyLongFormatter","numberShortFormatter","locale","numberFormatter","minimumSignificantDigits","maximumSignificantDigits","numberShortRoundFormatter","numberLongFormatter","advertActions","openCopyAsModal","model","closeCopyAsModal","openDeleteModal","openConfirmAdvertDeleteModal","openSoldModal","closeSoldModal","openRentedModal","closeRentedModal","openHideModal","acceptAction","cancelAction"],"sourceRoot":""}