{"version":3,"sources":["webpack:///./src/views/public/Contact.vue?f2f0","webpack:///./src/apis/ContactApi.ts","webpack:///./src/models/contact/ContactSupportRequestModel.ts","webpack:///./src/views/public/Contact.vue","webpack:///./src/views/public/Contact.vue?62a1","webpack:///./src/views/public/Contact.vue?dcbf","webpack:///../../../src/components/VTextarea/VTextarea.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","staticClass","_v","ref","givenNameRules","model","value","callback","$$v","givenName","expression","surnameRules","surname","emailRules","emailAddress","messageRules","message","processing","on","sendClick","_l","e","index","key","_s","_e","staticRenderFns","request","httpClient","CashTamerHttpClient","postAsync","handleApiError","CashTamerApiBase","trim","length","isFormValid","resetProcessingValues","api","contactSupportAsync","resetFormValidation","$store","commit","handleProcessingErrorAsync","form","$refs","contactForm","validate","resetValidation","ViewBase","name","component","VAlert","VBtn","VCard","VCardText","VCardTitle","VCol","VContainer","VForm","VRow","VTextField","VTextarea","baseMixins","props","autoGrow","noResize","rowHeight","type","Number","default","validator","v","isNaN","parseFloat","rows","parseInt","computed","classes","noResizeHandle","watch","lazyValue","$nextTick","mounted","setTimeout","methods","calculateInputHeight","input","height","minHeight","Math","genInput","onInput","onKeyDown","isFocused"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,cAAc,CAACA,EAAG,QAAQ,CAACE,MAAM,CAAC,QAAU,WAAW,CAACF,EAAG,QAAQ,CAACE,MAAM,CAAC,KAAO,KAAK,GAAK,KAAK,GAAK,IAAI,GAAK,MAAM,CAACF,EAAG,SAAS,CAACA,EAAG,eAAe,CAACG,YAAY,2BAA2B,CAACP,EAAIQ,GAAG,gBAAgBJ,EAAG,cAAc,CAACG,YAAY,oBAAoB,CAACH,EAAG,SAAS,CAACK,IAAI,cAAcF,YAAY,QAAQ,CAACH,EAAG,eAAe,CAACG,YAAY,OAAOD,MAAM,C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E,WAAW9E,KANrC,WASlB2F,EAAA,aAAqBG,KAAA,SAArB,OAEFC,SAZO,WAaL,IAAMJ,EAAQ,qCAAd,MAMA,OAJAA,EAAA,sBACOA,EAAA,WAAP,KACAA,EAAA,gBAA0B3F,KAA1B,KAEA,GAEFgG,QArBO,SAqBA,GACL,4CACAhG,KAAA,UAAiBA,KAAjB,wBAEFiG,UAzBO,SAyBE,GAIHjG,KAAKkG,WAAT,KAAsBxE,EAAA,SACpBA,EAAA,kBAGF1B,KAAA","file":"js/chunk-0fa6a7ce.098afe9b.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',[_c('v-row',{attrs:{\"justify\":\"center\"}},[_c('v-col',{attrs:{\"cols\":\"12\",\"xs\":\"12\",\"sm\":\"9\",\"md\":\"6\"}},[_c('v-card',[_c('v-card-title',{staticClass:\"headline justify-center\"},[_vm._v(\"CONTACT US\")]),_c('v-card-text',{staticClass:\"mt-4 black--text\"},[_c('v-form',{ref:\"contactForm\",staticClass:\"px-3\"},[_c('v-text-field',{staticClass:\"mb-3\",attrs:{\"label\":\"First Name\",\"maxlength\":\"50\",\"autofocus\":\"\",\"prepend-icon\":\"mdi-face-man\",\"rules\":[_vm.givenNameRules]},model:{value:(_vm.givenName),callback:function ($$v) {_vm.givenName=$$v},expression:\"givenName\"}}),_c('v-text-field',{staticClass:\"mb-3\",attrs:{\"label\":\"Last Name\",\"maxlength\":\"50\",\"prepend-icon\":\"mdi-face-man-outline\",\"rules\":[_vm.surnameRules]},model:{value:(_vm.surname),callback:function ($$v) {_vm.surname=$$v},expression:\"surname\"}}),_c('v-text-field',{staticClass:\"mb-3\",attrs:{\"label\":\"Email Address\",\"maxlength\":\"320\",\"type\":\"email\",\"prepend-icon\":\"mdi-email\",\"rules\":[_vm.emailRules]},model:{value:(_vm.emailAddress),callback:function ($$v) {_vm.emailAddress=$$v},expression:\"emailAddress\"}}),_c('v-textarea',{staticClass:\"mb-3\",attrs:{\"label\":\"Message\",\"maxlength\":\"256\",\"prepend-icon\":\"mdi-clipboard-text\",\"rules\":[_vm.messageRules]},model:{value:(_vm.message),callback:function ($$v) {_vm.message=$$v},expression:\"message\"}}),_c('div',{staticClass:\"text-center\"},[_c('v-btn',{staticClass:\"primary\",attrs:{\"loading\":_vm.processing},on:{\"click\":_vm.sendClick}},[_vm._v(\"SEND\")])],1),(_vm.processingError)?_c('div',{staticClass:\"text-center mt-4\"},_vm._l((_vm.processingErrors),function(e,index){return _c('div',{key:index},[_c('v-alert',{attrs:{\"value\":true,\"type\":\"error\",\"outlined\":\"\"}},[_vm._v(_vm._s(e))])],1)}),0):_vm._e()],1)],1)],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import CashTamerHttpClient from './CashTamerHttpClient';\r\nimport CashTamerApiBase from './CashTamerApiBase';\r\nimport ContactSupportRequestModel from '@/models/contact/ContactSupportRequestModel';\r\n\r\nexport default class ContactApi extends CashTamerApiBase {\r\n public async contactSupportAsync(request: ContactSupportRequestModel): Promise {\r\n\r\n try {\r\n const httpClient = new CashTamerHttpClient();\r\n\r\n await httpClient.postAsync('contact/support', request);\r\n }\r\n catch ( err ) {\r\n return this.handleApiError(err);\r\n }\r\n }\r\n}\r\n","\r\nexport default class ContactSupportRequestModel {\r\n public givenName: string = '';\r\n public surname: string = '';\r\n public emailAddress: string = '';\r\n public message: string = '';\r\n}\r\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport {Component, Vue} from 'vue-property-decorator';\r\nimport ViewBase from '@/views/ViewBase';\r\nimport ContactApi from '@/apis/ContactApi';\r\nimport ContactSupportRequestModel from '@/models/contact/ContactSupportRequestModel';\r\n\r\n@Component({\r\n name: 'Contact',\r\n },\r\n)\r\nexport default class Contact extends ViewBase {\r\n public givenName: string = '';\r\n public surname: string = '';\r\n public emailAddress: string = '';\r\n public message: string = '';\r\n\r\n public givenNameRules(value: string): any {\r\n if ( value.trim().length === 0)\r\n {\r\n return 'A first name is required.';\r\n }\r\n\r\n return true;\r\n }\r\n\r\n public surnameRules(value: string): any {\r\n if ( value.trim().length === 0)\r\n {\r\n return 'A last name is required.';\r\n }\r\n\r\n return true;\r\n }\r\n\r\n public emailRules(value: string ): any {\r\n if ( value.trim().length === 0)\r\n {\r\n return 'An email address is required.';\r\n }\r\n else if ( value.length < 5)\r\n {\r\n return 'Minimum email address length is 5 characters.';\r\n }\r\n\r\n return true;\r\n }\r\n\r\n public messageRules(value: string): any {\r\n if ( value.trim().length === 0)\r\n {\r\n return 'A message is required.';\r\n }\r\n\r\n return true;\r\n }\r\n\r\n public async sendClick() {\r\n\r\n if ( this.isFormValid() ) {\r\n try {\r\n this.resetProcessingValues();\r\n\r\n const request = new ContactSupportRequestModel();\r\n request.givenName = this.givenName;\r\n request.surname = this.surname;\r\n request.emailAddress = this.emailAddress;\r\n request.message = this.message;\r\n\r\n const api = new ContactApi();\r\n const response = await api.contactSupportAsync(request);\r\n\r\n this.givenName = '';\r\n this.surname = '';\r\n this.emailAddress = '';\r\n this.message = '';\r\n this.resetFormValidation();\r\n this.$store.commit('mutateSnackbarText', 'Thank you for contacting CashTamer.com.');\r\n this.$store.commit('mutateShowSnackbar', true);\r\n }\r\n catch ( err ) {\r\n await this.handleProcessingErrorAsync(err);\r\n }\r\n finally {\r\n this.processing = false;\r\n }\r\n }\r\n }\r\n\r\n private isFormValid(): boolean {\r\n const form: any = this.$refs.contactForm;\r\n\r\n return form.validate();\r\n }\r\n\r\n private resetFormValidation() {\r\n const form: any = this.$refs.contactForm;\r\n\r\n form.resetValidation();\r\n }\r\n\r\n}\r\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/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Contact.vue?vue&type=script&lang=ts&\"; 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/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Contact.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Contact.vue?vue&type=template&id=46325622&\"\nimport script from \"./Contact.vue?vue&type=script&lang=ts&\"\nexport * from \"./Contact.vue?vue&type=script&lang=ts&\"\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\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VAlert } from 'vuetify/lib/components/VAlert';\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VForm } from 'vuetify/lib/components/VForm';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\nimport { VTextarea } from 'vuetify/lib/components/VTextarea';\ninstallComponents(component, {VAlert,VBtn,VCard,VCardText,VCardTitle,VCol,VContainer,VForm,VRow,VTextField,VTextarea})\n","// Styles\nimport './VTextarea.sass'\n\n// Extensions\nimport VTextField from '../VTextField/VTextField'\n\n// Utilities\nimport mixins from '../../util/mixins'\n\n// Types\nimport Vue from 'vue'\n\ninterface options extends Vue {\n $refs: {\n input: HTMLTextAreaElement\n }\n}\n\nconst baseMixins = mixins\n>(\n VTextField\n)\n\n/* @vue/component */\nexport default baseMixins.extend({\n name: 'v-textarea',\n\n props: {\n autoGrow: Boolean,\n noResize: Boolean,\n rowHeight: {\n type: [Number, String],\n default: 24,\n validator: (v: any) => !isNaN(parseFloat(v)),\n },\n rows: {\n type: [Number, String],\n default: 5,\n validator: (v: any) => !isNaN(parseInt(v, 10)),\n },\n },\n\n computed: {\n classes (): object {\n return {\n 'v-textarea': true,\n 'v-textarea--auto-grow': this.autoGrow,\n 'v-textarea--no-resize': this.noResizeHandle,\n ...VTextField.options.computed.classes.call(this),\n }\n },\n noResizeHandle (): boolean {\n return this.noResize || this.autoGrow\n },\n },\n\n watch: {\n lazyValue () {\n this.autoGrow && this.$nextTick(this.calculateInputHeight)\n },\n rowHeight () {\n this.autoGrow && this.$nextTick(this.calculateInputHeight)\n },\n },\n\n mounted () {\n setTimeout(() => {\n this.autoGrow && this.calculateInputHeight()\n }, 0)\n },\n\n methods: {\n calculateInputHeight () {\n const input = this.$refs.input\n if (!input) return\n\n input.style.height = '0'\n const height = input.scrollHeight\n const minHeight = parseInt(this.rows, 10) * parseFloat(this.rowHeight)\n // This has to be done ASAP, waiting for Vue\n // to update the DOM causes ugly layout jumping\n input.style.height = Math.max(minHeight, height) + 'px'\n },\n genInput () {\n const input = VTextField.options.methods.genInput.call(this)\n\n input.tag = 'textarea'\n delete input.data!.attrs!.type\n input.data!.attrs!.rows = this.rows\n\n return input\n },\n onInput (e: Event) {\n VTextField.options.methods.onInput.call(this, e)\n this.autoGrow && this.calculateInputHeight()\n },\n onKeyDown (e: KeyboardEvent) {\n // Prevents closing of a\n // dialog when pressing\n // enter\n if (this.isFocused && e.keyCode === 13) {\n e.stopPropagation()\n }\n\n this.$emit('keydown', e)\n },\n },\n})\n"],"sourceRoot":""}