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EAAAA,aAAajB,EAAiC,CAAE,YAAa,eAC7D/B,GACC,WAIbE,GACA,CAEJ,IC1KA,MAAM+C,EAAc,EAEpB,O","sources":["webpack://beliefnet-frontend/./src/services/contactus.service.ts","webpack://beliefnet-frontend/./src/components/emails/ContactUs.vue?cf3c","webpack://beliefnet-frontend/./src/components/emails/ContactUs.vue"],"sourcesContent":["import { ContactUs } from '../common/models/contactus/contact-us.model';\nimport { AdvertiseWithUs } from '../common/models/contactus/advertise-with-us.model';\nimport { FetchService } from './fetch.service';\nimport { VueLogger } from 'vue-logger-plugin/dist/types/logger';\n\nconst endpointBase = 'https://www.beliefnet.com/about-us';\n\nexport class ContactUsService {\n private logger: VueLogger;\n private fetchService: FetchService | undefined;\n\n constructor(logger: VueLogger, fetchService: FetchService | undefined) {\n this.logger = logger;\n this.fetchService = fetchService\n }\n \n /**\n * Advertise with us form\n * @param advertiseWithUs advertisement information to send over\n */\n async advertiseWithUs(advertiseWithUs: AdvertiseWithUs): Promise<boolean> {\n const formData = 'name=' + advertiseWithUs.name + '&title=' + advertiseWithUs.title + '&phoneNumber=' + advertiseWithUs.phoneNumber + '&company=' + advertiseWithUs.company + '&emailAddress=' + advertiseWithUs.emailAddress + '&message=' + advertiseWithUs.message + '&g-recaptcha-response=' + advertiseWithUs.gRecaptchaResponse;\n\n return new Promise((resolve) => {\n if (this.fetchService) {\n this.fetchService.post(\n `${endpointBase}/advertise-with-us.aspx`,\n formData,\n 'application/x-www-form-urlencoded'\n ).then(response => {\n resolve(response.ok);\n }); \n } else {\n resolve(false);\n }\n });\n }\n\n /**\n * Contact us form submission\n * @param contactUs contact information to send over\n */\n async contactUs(contactUs: ContactUs): Promise<boolean> {\n const formData = 'emailAddress=' + contactUs.emailAddress + '&message=' + contactUs.message + '&reason=' + contactUs.reason + '&g-recaptcha-response=' + contactUs.gRecaptchaResponse;\n\n return new Promise((resolve) => {\n if (this.fetchService) {\n this.fetchService.post(\n `${endpointBase}/about-beliefnet.aspx`,\n formData,\n 'application/x-www-form-urlencoded'\n ).then(response => {\n resolve(response.ok);\n });\n } else { \n resolve(false);\n }\n });\n }\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, isRef as _isRef, vModelText as _vModelText, withDirectives as _withDirectives, vModelSelect as _vModelSelect, resolveComponent as _resolveComponent, createVNode as _createVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"row stripe stripe-prime-1\" }\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"img\", {\n src: \"/~/media/Images/Components/contact-us/clouds-bg.jpg\",\n alt: \"About Beliefnet\",\n class: \"stripe-bg\"\n}, null, -1)\nconst _hoisted_3 = { class: \"container grecaptchaForm\" }\nconst _hoisted_4 = { class: \"col-sm-12 text-center over-dark contact-form-wrapper\" }\nconst _hoisted_5 = { key: 0 }\nconst _hoisted_6 = { key: 1 }\nconst _hoisted_7 = /*#__PURE__*/_createElementVNode(\"h2\", {\n class: \"over-dark\",\n style: {\"z-index\":\"1\"}\n}, \"We would love to hear from you!\", -1)\nconst _hoisted_8 = /*#__PURE__*/_createElementVNode(\"p\", { style: {\"z-index\":\"1\"} }, \" To help your email get to the correct person, please complete the contact form below. You can also write to Beliefnet at the address below. \", -1)\nconst _hoisted_9 = /*#__PURE__*/_createElementVNode(\"button\", {\n type: \"button\",\n class: \"close\",\n \"data-dismiss\": \"alert\"\n}, \"×\", -1)\nconst _hoisted_10 = { class: \"col-sm-6 form-group\" }\nconst _hoisted_11 = { class: \"col-sm-6 form-group\" }\nconst _hoisted_12 = /*#__PURE__*/_createElementVNode(\"option\", { disabled: \"\" }, \"Area of interest\", -1)\nconst _hoisted_13 = /*#__PURE__*/_createElementVNode(\"option\", null, \"Advertising\", -1)\nconst _hoisted_14 = /*#__PURE__*/_createElementVNode(\"option\", null, \"Media kits\", -1)\nconst _hoisted_15 = /*#__PURE__*/_createElementVNode(\"option\", null, \"Press Inquiry\", -1)\nconst _hoisted_16 = /*#__PURE__*/_createElementVNode(\"option\", null, \"Editorial submissions\", -1)\nconst _hoisted_17 = /*#__PURE__*/_createElementVNode(\"option\", null, \"Newsletters\", -1)\nconst _hoisted_18 = /*#__PURE__*/_createElementVNode(\"option\", null, \"Other\", -1)\nconst _hoisted_19 = [\n _hoisted_12,\n _hoisted_13,\n _hoisted_14,\n _hoisted_15,\n _hoisted_16,\n _hoisted_17,\n _hoisted_18\n]\nconst _hoisted_20 = { class: \"form-group col-xs-12\" }\nconst _hoisted_21 = /*#__PURE__*/_createElementVNode(\"input\", {\n type: \"submit\",\n class: \"btn-lg btn-accent-2\",\n value: \"get started!\"\n}, null, -1)\nconst _hoisted_22 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"arrow down\" }, null, -1)\n\nimport { ref, inject } from 'vue';\nimport { useLogger } from 'vue-logger-plugin';\nimport { useField, useForm } from 'vee-validate';\nimport { ContactUs } from '../../common/models/contactus/contact-us.model';\nimport { ContactUsService } from '../../services/contactus.service';\nimport { FetchService } from '../../services/fetch.service';\nimport useValidators from '../../composables/validators.composable';\n\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ContactUs',\n setup(__props) {\n\nconst logger = useLogger();\n\n// inject our locationservice\nconst fetchService: FetchService | undefined = inject('FetchService');\n// instantiate instance of ContactUs Service\nconst contactUsService = new ContactUsService(logger, fetchService);\n\n// get validators\nconst { isRequired, isEmail, isOneOf } = useValidators();\n// generate validation schema\nconst validationSchema = {\n emailAddress: (value: string) => isRequired(value, 'Email address is required') && isEmail(value),\n message: (value: string) => isRequired(value, 'Message is required'),\n reason: (value:string) => isRequired(value, 'Reason is required') && isOneOf(value, ['Advertising', 'Media kits', 'Press Inquiry', 'Editorial submissions', 'Newsletters', 'Other'])\n};\n\n// Form Configuration\nconst { handleSubmit, errors } = useForm({ validationSchema });\n\n// Field Configurations\nconst { value: emailAddress } = useField('emailAddress');\nconst { value: message } = useField('message');\nconst { value: reason } = useField('reason');\n// select the initial reason\nreason.value = 'Advertising';\n\nconst submittedContactInfo = ref(false);\n\nconst onSubmit = handleSubmit(async (values) => {\n const contactUsForm: ContactUs = {\n emailAddress: values.emailAddress,\n message: values.message,\n reason: values.reason,\n gRecaptchaResponse: window.grecaptcha.getResponse()\n };\n\n if (contactUsService.contactUs(contactUsForm)) {\n submittedContactInfo.value = true;\n } else {\n logger.error('Could not submit form data');\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n const _component_rad_google_recaptcha = _resolveComponent(\"rad-google-recaptcha\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _hoisted_2,\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n (submittedContactInfo.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, \"Thank you for your feedback!\"))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n _hoisted_7,\n _hoisted_8,\n _createElementVNode(\"form\", {\n onSubmit: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_unref(onSubmit) && _unref(onSubmit)(...args))),\n class: \"col-md-10 col-md-offset-1 col-sm-12 add-most-padding contact-form\"\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(errors), (error) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"alert alert-danger\",\n role: \"alert\",\n key: error\n }, [\n _hoisted_9,\n _createTextVNode(\" \" + _toDisplayString(error), 1)\n ]))\n }), 128)),\n _createElementVNode(\"div\", _hoisted_10, [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"email\",\n name: \"emailAddress\",\n class: \"form-control\",\n placeholder: \"Your email address\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(emailAddress) ? (emailAddress).value = $event : null))\n }, null, 512), [\n [_vModelText, _unref(emailAddress)]\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_11, [\n _withDirectives(_createElementVNode(\"select\", {\n class: \"form-control\",\n name: \"reason\",\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(reason) ? (reason).value = $event : null))\n }, _hoisted_19, 512), [\n [_vModelSelect, _unref(reason)]\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_20, [\n _withDirectives(_createElementVNode(\"textarea\", {\n class: \"form-control\",\n name: \"message\",\n placeholder: \"Your message\",\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => (_isRef(message) ? (message).value = $event : null))\n }, null, 512), [\n [_vModelText, _unref(message)]\n ])\n ]),\n _createVNode(_component_rad_google_recaptcha, { \"unique-id\": \"contact-us\" }),\n _hoisted_21\n ], 32)\n ]))\n ])\n ]),\n _hoisted_22\n ]))\n}\n}\n\n})","import script from \"./ContactUs.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./ContactUs.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__"],"names":["endpointBase","ContactUsService","constructor","logger","fetchService","this","advertiseWithUs","formData","name","title","phoneNumber","company","emailAddress","message","gRecaptchaResponse","Promise","resolve","post","then","response","ok","contactUs","reason","_hoisted_1","class","_hoisted_2","_createElementVNode","src","alt","_hoisted_3","_hoisted_4","_hoisted_5","key","_hoisted_6","_hoisted_7","style","_hoisted_8","_hoisted_9","type","_hoisted_10","_hoisted_11","_hoisted_12","disabled","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","value","_hoisted_22","_defineComponent","__name","setup","__props","useLogger","inject","contactUsService","isRequired","isEmail","isOneOf","useValidators","validationSchema","handleSubmit","errors","useForm","useField","submittedContactInfo","ref","onSubmit","values","__awaiter","contactUsForm","window","grecaptcha","getResponse","error","_ctx","_cache","_component_rad_google_recaptcha","_resolveComponent","_openBlock","_createElementBlock","args","_unref","_Fragment","_renderList","role","_createTextVNode","_toDisplayString","_withDirectives","placeholder","$event","_isRef","_vModelText","_vModelSelect","_createVNode","__exports__"],"sourceRoot":""}