![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/vreg/node_modules/.cache/nuxt/dist/server/pages/pa/ |
{"version":3,"file":"pages/pa/step-3.js","sources":["webpack:///./components/Forms/AddressConfirmation.vue?3709","webpack:///./components/Forms/AddressConfirmation.vue?3196","webpack:///./components/Forms/AddressConfirmation.vue?9d25","webpack:///./components/Forms/AddressConfirmation.vue?efdb","webpack:///./components/Forms/AddressConfirmation.vue","webpack:///./components/Forms/AddressConfirmation.vue?646c","webpack:///./components/Forms/AddressConfirmation.vue?c545","webpack:///./pages/pa/step-3.vue?a2ef","webpack:///./pages/pa/step-3.vue","webpack:///./pages/pa/step-3.vue?63af","webpack:///./pages/pa/step-3.vue?8bff","webpack:///./components/Forms/InputField.vue?b99a","webpack:///./components/Forms/InputField.vue","webpack:///./components/Forms/InputField.vue?b7d9","webpack:///./components/Forms/InputField.vue?be57","webpack:///./components/Forms/InputField.vue?bf7d","webpack:///./components/Forms/FormErrorMsg.vue?9f25","webpack:///./mixins/forms.js","webpack:///./components/Forms/FormErrorMsg.vue?497a","webpack:///./components/Forms/FormErrorMsg.vue","webpack:///./components/Forms/FormErrorMsg.vue?5544","webpack:///./components/Forms/FormErrorMsg.vue?6e2b","webpack:///./components/Forms/InputField.vue?db84","webpack:///./components/Forms/InputField.vue?fbac","webpack:///./components/Forms/FormErrorMsg.vue?6c28","webpack:///./components/Forms/FormErrorMsg.vue?d1be","webpack:///./components/Forms/VregSuggesstions/v-reg-vue-simple-suggest.vue?29b1","webpack:///./components/Forms/VregSelect.vue?359b","webpack:///./components/Forms/VregSelect.vue","webpack:///./components/Forms/VregSelect.vue?3476","webpack:///./components/Forms/VregSelect.vue?daa6","webpack:///./components/Forms/VregSuggesstions/v-reg-vue-simple-suggest.vue?d4c4","webpack:///./components/Forms/VregSuggesstions/v-reg-vue-simple-suggest.vue?41a5","webpack:///./components/Forms/VregSuggesstions/v-reg-vue-simple-suggest.vue?f66b","webpack:///./components/Forms/VregSuggesstions/misc.js","webpack:///./components/Forms/VregSuggesstions/v-reg-vue-simple-suggest.vue","webpack:///./components/Forms/VregSuggesstions/v-reg-vue-simple-suggest.vue?b11c","webpack:///./components/Forms/VregSuggesstions/v-reg-vue-simple-suggest.vue?73de","webpack:///./components/Forms/Address.vue?5ea3","webpack:///./components/Forms/Address.vue","webpack:///./components/Forms/Address.vue?3fed","webpack:///./components/Forms/Address.vue?4775"],"sourcesContent":["// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--3-oneOf-1-2!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AddressConfirmation.vue?vue&type=style&index=0&lang=css&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add CSS to SSR context\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesServer.js\").default\nmodule.exports.__inject__ = function (context) {\n add(\"2341ac4f\", content, true, context)\n};","export * from \"-!../../node_modules/vue-style-loader/index.js??ref--3-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--3-oneOf-1-2!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AddressConfirmation.vue?vue&type=style&index=0&lang=css&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"#address-confirmation-modal .next-step-button{padding:6px;width:150px}#address-confirmation-modal .modal-footer{justify-content:space-between!important}legend{all:unset!important}[dir=ltr] fieldset{margin-left:2px}[dir=ltr] fieldset,[dir=rtl] fieldset{margin-right:2px}[dir=rtl] fieldset{margin-left:2px}fieldset{display:block;padding:12px 32px 16px 18px;border-width:1px;border-style:groove;border-radius:3px;border-color:rgba(108,117,125,.3)!important}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-modal',{attrs:{\"id\":_vm.modalId,\"hide-footer\":\"\",\"hide-header\":\"\",\"modal-class\":\"address-confirm-modal\",\"visible\":\"\",\"no-close-on-backdrop\":\"\"}},[_c('h1',[_vm._v(\"Address confirmation\")]),_vm._v(\" \"),(_vm.ready)?[_c('h4',[_vm._v(\"USPS adjusted the address entered\")]),_vm._v(\" \"),_c('p',{staticClass:\"desc\"},[_vm._v(\"Please verify and select the address for this order, then click ”Continue”. If you still need to\\n modify the address click \\\"Back\\\"\")]),_vm._v(\" \"),_c('h5',{staticClass:\"text-danger text-center\",domProps:{\"innerHTML\":_vm._s(_vm.addressAnalyzeMessage)}}),_vm._v(\" \"),_c('h6',[_vm._v(\"Address entered\")]),_vm._v(\" \"),_c('label',{staticClass:\"step-radio-label\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selectedAddress),expression:\"selectedAddress\"}],staticClass:\"radio-input\",attrs:{\"type\":\"radio\",\"name\":\"addressConfirmation\",\"value\":\"original_address\"},domProps:{\"checked\":_vm._q(_vm.selectedAddress,\"original_address\")},on:{\"change\":function($event){_vm.selectedAddress=\"original_address\"}}}),_vm._v(\" \"),_c('div',{staticClass:\"step-radio-box\"},[_c('div',{staticClass:\"outer\"},[_c('div',{staticClass:\"inner\"})]),_vm._v(\" \"),_c('p',[_c('span',{staticClass:\"user-name\"},[_vm._v(_vm._s(_vm.customerFullName))]),_vm._v(\" \"),_c('br'),_vm._v(\"\\n \"+_vm._s(_vm.clonedOriginalAddress.street)+\"\\n \"),(_vm.clonedOriginalAddress.address_2)?_c('br'):_vm._e(),_vm._v(\"\\n \"+_vm._s(_vm.clonedOriginalAddress.address_2)+\"\\n \"),_c('br'),_vm._v(\"\\n \"+_vm._s(_vm.clonedOriginalAddress.city)+\",\\n \"+_vm._s(_vm.clonedOriginalAddress.state_code)+\"\\n \"+_vm._s(_vm.clonedOriginalAddress.zip)+\"\\n \")])])]),_vm._v(\" \"),_c('h6',[_vm._v(\"Suggestion\")]),_vm._v(\" \"),_c('label',{staticClass:\"step-radio-label\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selectedAddress),expression:\"selectedAddress\"}],staticClass:\"radio-input\",attrs:{\"type\":\"radio\",\"name\":\"addressConfirmation\",\"value\":\"new_address\"},domProps:{\"checked\":_vm._q(_vm.selectedAddress,\"new_address\")},on:{\"change\":function($event){_vm.selectedAddress=\"new_address\"}}}),_vm._v(\" \"),_c('div',{staticClass:\"step-radio-box\"},[_c('div',{staticClass:\"outer\"},[_c('div',{staticClass:\"inner\"})]),_vm._v(\" \"),_c('p',[_c('span',{staticClass:\"user-name\"},[_vm._v(_vm._s(_vm.customerFullName))]),_vm._v(\" \"),_c('br'),_vm._v(\"\\n \"+_vm._s(_vm.newAddress.street)+\"\\n \"),(_vm.clonedOriginalAddress.address_2)?_c('br'):_vm._e(),_vm._v(\"\\n \"+_vm._s(_vm.newAddress.address_2)+\"\\n \"),_c('br'),_vm._v(\"\\n \"+_vm._s(_vm.newAddress.city)+\",\\n \"+_vm._s(_vm.newAddress.state_code)+\"\\n \"+_vm._s(_vm.newAddress.zip)+\" - \"+_vm._s(_vm.newAddress.plus_4_code || '')+\"\\n \")])])])]:[_c('h5',{staticClass:\"text-center\"},[_vm._v(\"\\n Verifying Address ...\\n \")])],_vm._v(\" \"),_c('div',{staticClass:\"form-button-wrapper\"},[_c('a',{staticClass:\"btn-return\",attrs:{\"href\":\"#\"},on:{\"click\":function($event){$event.preventDefault();return _vm.close.apply(null, arguments)}}},[_c('svg',{attrs:{\"width\":\"6\",\"height\":\"10\",\"viewBox\":\"0 0 6 10\",\"fill\":\"none\",\"xmlns\":\"http://www.w3.org/2000/svg\"}},[_c('path',{attrs:{\"d\":\"M5 9L1 5L5 1\",\"stroke\":\"#182D40\",\"stroke-width\":\"1.2\",\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\"}})]),_vm._v(\"\\n Back\\n \")]),_vm._v(\" \"),(_vm.ready)?_c('button',{staticClass:\"btn btn-form-green\",attrs:{\"type\":\"submit\"},on:{\"click\":function($event){$event.preventDefault();return _vm.continueClicked.apply(null, arguments)}}},[_vm._v(\"\\n Continue\\n \"),_c('svg',{attrs:{\"width\":\"7\",\"height\":\"13\",\"viewBox\":\"0 0 7 13\",\"fill\":\"none\",\"xmlns\":\"http://www.w3.org/2000/svg\"}},[_c('path',{attrs:{\"d\":\"M1 1.5L6 6.5L1 11.5\",\"stroke\":\"white\",\"stroke-width\":\"1.2\",\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\"}})])]):_vm._e()])],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\nexport default {\n name: \"AddressConfirmation\",\n props: {\n originalAddress: {\n required: true,\n type: Object\n }\n },\n data() {\n return {\n newAddress: {},\n usedAddress: {},\n clonedOriginalAddress: {},\n selectedAddress: 'original_address',\n modalId: 'address-confirmation-modal',\n ready: false,\n showAddressConfirmationSuggestions: false,\n addressAnalyzeMessage: ''\n }\n },\n mounted() {\n this.callAPI();\n },\n methods: {\n\n close() {\n this.$bvModal.hide(this.modalId)\n this.ready = false;\n this.$emit('close-address-confirmation-modal');\n },\n continueClicked() {\n this.$emit('goNext');\n this.$bvModal.hide(this.modalId);\n },\n callAPI() {\n this.newAddress = this.$copyObject(this.originalAddress);\n this.clonedOriginalAddress = this.$copyObject(this.originalAddress);\n\n const SmartyStreetsSDK = require(\"smartystreets-javascript-sdk\");\n const SmartyStreetsCore = SmartyStreetsSDK.core;\n const Lookup = SmartyStreetsSDK.usStreet.Lookup;\n\n\n let lookup = new Lookup();\n lookup.maxCandidates = 10;\n lookup.street = this.clonedOriginalAddress.street;\n lookup.secondary = this.clonedOriginalAddress.address_2;\n lookup.city = this.clonedOriginalAddress.city;\n lookup.state = this.clonedOriginalAddress.state_code;\n lookup.zipCode = this.clonedOriginalAddress.zip;\n lookup.match = \"invalid\";\n\n let key = process.env.SMARTY_WEBSITE_KEY,\n hostname = process.env.app_domain;\n let credentials = new SmartyStreetsCore.SharedCredentials(key, hostname);\n\n\n let clientBuilder = new SmartyStreetsCore.ClientBuilder(credentials)\n .withBaseUrl(\"https://us-street.api.smartystreets.com/street-address\");\n\n let client = clientBuilder.buildUsStreetApiClient();\n\n return client.send(lookup)\n .then(response => {\n let component = response.lookups[0].result[0].components;\n\n if (Array.isArray(component)) {\n component = _.first(component);\n }\n\n this.newAddress = this.getNewFormattedAddress(this.$copyObject(component));\n\n let newAddressToCompare = this.$copyObject(this.newAddress);\n\n delete newAddressToCompare['plus_4_code'];\n\n let haveSameData = this.$haveSameData(this.clonedOriginalAddress, newAddressToCompare);\n\n this.analyzeNewAddressResponse(response.lookups[0].result[0].analysis);\n\n this.showAddressConfirmationSuggestions = haveSameData === false || (haveSameData === true && this.newAddress.plus_4_code);\n\n this.ready = true;\n this.$bvModal.show(this.modalId);\n\n }).catch(console.log);\n },\n analyzeNewAddressResponse(analysis) {\n let dpvMatchCode = analysis.dpvMatchCode,\n noStat = analysis.noStat,\n dpvFootnotes = analysis.dpvFootnotes;\n\n this.addressAnalyzeMessage = '';\n\n switch (dpvMatchCode) {\n case 'Y':\n if (noStat === 'N') {\n // this.addressAnalyzeMessage = 'The Address is deliverable!';\n } else {\n this.addressAnalyzeMessage = 'The Address is not deliverable!';\n }\n break;\n case 'N':\n this.addressAnalyzeMessage = \"Address is not present in the USPS data, Please verify that is correct\";\n break;\n case 'S':\n this.addressAnalyzeMessage = \"The main address is present in the USPS data, but the submitted secondary information (apartment, suite, etc.) was not recognized.\";\n break;\n case 'D':\n this.addressAnalyzeMessage = \"The main address is present in the USPS data, but it is missing secondary information (apartment, suite, etc.).\";\n break;\n default:\n this.addressAnalyzeMessage = \"The address is not present in the USPS database,Please verify that is correct\";\n }\n\n switch (dpvFootnotes) {\n case 'AAM3':\n this.addressAnalyzeMessage += `<br> ZIP, state, city, and street name match, but the primary number is invalid.`\n break;\n case 'AAN1':\n this.addressAnalyzeMessage += `<br> ZIP, state, city, street name, and primary number match, but there is secondary information such as apartment or suite that would be helpful.`;\n break;\n }\n\n },\n getFormattedStreet(address) {\n let street = ''\n if (address.primaryNumber) {\n street += ' ' + address.primaryNumber;\n }\n if (address.streetPredirection) {\n street += ' ' + address.streetPredirection;\n }\n if (address.streetName) {\n street += ' ' + address.streetName;\n }\n if (address.streetSuffix) {\n street += ' ' + address.streetSuffix;\n }\n\n return street.trim();\n },\n getFormattedAddress2(address) {\n let address2 = ''\n\n if (address.secondaryDesignator) {\n address2 += ' ' + address.secondaryDesignator;\n }\n\n if (address.secondaryNumber) {\n address2 += ' ' + address.secondaryNumber;\n }\n\n return address2.trim();\n },\n getNewFormattedAddress(address) {\n return {\n 'street': this.getFormattedStreet(address),\n 'address_2': this.getFormattedAddress2(address),\n 'city': address.cityName || '',\n 'state_code': address.state || '',\n 'zip': address.zipCode | '',\n country_code: 'US',\n plus_4_code: address.plus4Code\n }\n }\n },\n computed: {\n customerFullName() {\n let {first_name, last_name} = this.$store.state.step1Form;\n\n return `${first_name} ${last_name}`;\n }\n },\n watch: {\n selectedAddress(selectedAddress) {\n switch (selectedAddress) {\n case 'new_address':\n this.usedAddress = this.newAddress;\n break;\n case 'original_address':\n this.usedAddress = this.$copyObject(this.clonedOriginalAddress);\n break;\n }\n\n\n this.$emit('setSelectedAddress', this.usedAddress)\n }\n }\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AddressConfirmation.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AddressConfirmation.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./AddressConfirmation.vue?vue&type=template&id=3ee1ffde&\"\nimport script from \"./AddressConfirmation.vue?vue&type=script&lang=js&\"\nexport * from \"./AddressConfirmation.vue?vue&type=script&lang=js&\"\nfunction injectStyles (context) {\n \n var style0 = require(\"./AddressConfirmation.vue?vue&type=style&index=0&lang=css&\")\nif (style0.__inject__) style0.__inject__(context)\n\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 injectStyles,\n null,\n \"34180cee\"\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_vm._ssrNode(\"<h1 data-v-0cea7e76>Registered vehicle owner</h1> <p class=\\\"description\\\" data-v-0cea7e76>Enter the registered owner's vehicle information</p> \"),_c('ValidationObserver',{ref:\"form\",scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar invalid = ref.invalid;\nreturn [_c('form',{ref:\"screenShotSection\",attrs:{\"action\":\"\"}},[_c('label',[_vm._v(\"Is your mailing address different from your residential address?\")]),_vm._v(\" \"),_c('div',{staticClass:\"billing-radio-option mb-3\",staticStyle:{\"white-space\":\"nowrap\"}},[_c('label',{staticClass:\"step-radio-label w-50 selected\",staticStyle:{\"display\":\"inline-block\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form.different_mailing_address),expression:\"form.different_mailing_address\"}],staticClass:\"radio-input\",attrs:{\"type\":\"radio\",\"name\":\"billingOption\"},domProps:{\"value\":true,\"checked\":_vm._q(_vm.form.different_mailing_address,true)},on:{\"change\":function($event){return _vm.$set(_vm.form, \"different_mailing_address\", true)}}}),_vm._v(\" \"),_c('div',{staticClass:\"step-radio-box\"},[_c('div',{staticClass:\"outer\"},[_c('div',{staticClass:\"inner\"})]),_vm._v(\" \"),_c('p',[_vm._v(\"Yes\")])])]),_vm._v(\" \"),_c('label',{staticClass:\"step-radio-label bring-up w-50\",staticStyle:{\"display\":\"inline-block\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form.different_mailing_address),expression:\"form.different_mailing_address\"}],staticClass:\"radio-input\",attrs:{\"type\":\"radio\",\"name\":\"billingOption\"},domProps:{\"value\":false,\"checked\":_vm._q(_vm.form.different_mailing_address,false)},on:{\"change\":function($event){return _vm.$set(_vm.form, \"different_mailing_address\", false)}}}),_vm._v(\" \"),_c('div',{staticClass:\"step-radio-box\"},[_c('div',{staticClass:\"outer\"},[_c('div',{staticClass:\"inner\"})]),_vm._v(\" \"),_c('p',[_vm._v(\"No\")])])])]),_vm._v(\" \"),_c('transition',{attrs:{\"name\":\"fade\"}},[(_vm.form.different_mailing_address)?_c('Address',{attrs:{\"form\":_vm.form,\"address-field\":\"mailing_address\"}}):_vm._e()],1),_vm._v(\" \"),_c('h3',[_vm._v(\"\\n Terms of Purchase\\n \"),_c('br'),_vm._v(\" \"),_c('small',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.isIPVisible),expression:\"isIPVisible\"}],staticClass:\"text-danger\"},[_vm._v(\"IP \"+_vm._s(_vm.ip_address)+\"\\n \"+_vm._s(_vm.$moment().format('MM/DD/YYYY h:mm:ss a')))])]),_vm._v(\" \"),_c('p',{staticClass:\"terms-desc\"},[_vm._v(\"This information will assist law enforcement in ensuring they use appropriate\\n communication.\")]),_vm._v(\" \"),_c('input-field',{attrs:{\"form\":_vm.form,\"field\":\"agree\",\"rules\":\"required\"}},[_c('label',{staticClass:\"checkbox-input-wrapper\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form.agree),expression:\"form.agree\"}],staticClass:\"c-input\",attrs:{\"type\":\"checkbox\",\"name\":\"agree\"},domProps:{\"checked\":Array.isArray(_vm.form.agree)?_vm._i(_vm.form.agree,null)>-1:(_vm.form.agree)},on:{\"change\":function($event){var $$a=_vm.form.agree,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.form, \"agree\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.form, \"agree\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.form, \"agree\", $$c)}}}}),_vm._v(\" \"),_c('div',{staticClass:\"checkbox-inner\"},[_c('div',{staticClass:\"outer\"},[_c('div',{staticClass:\"inner\"},[_c('svg',{attrs:{\"width\":\"12\",\"height\":\"8\",\"viewBox\":\"0 0 13 9\",\"fill\":\"none\",\"xmlns\":\"http://www.w3.org/2000/svg\"}},[_c('path',{attrs:{\"d\":\"M11.2252 1.90835L5.60358 7.53001C5.21306 7.92053 4.57989 7.92053 4.18937 7.53001L1.32944 4.67008\",\"stroke\":\"white\",\"stroke-width\":\"2\",\"stroke-linecap\":\"round\"}})])])]),_vm._v(\" \"),_c('p',[_vm._v(\"By checking this box and electronically signing your name below:\")])])])]),_vm._v(\" \"),_c('div',{staticClass:\"terms-content-wrapper\"},[_c('p',[_c('span',[_vm._v(\"1.\")]),_vm._v(\"You acknowledge that you have read and agree to our \"),_c('a',{attrs:{\"href\":\"#\"}},[_vm._v(\"Terms & Conditions\")]),_vm._v(\", \"),_c('a',{attrs:{\"href\":\"#\"}},[_vm._v(\"Refund Policy\")]),_vm._v(\" and \"),_c('a',{attrs:{\"href\":\"#\"}},[_vm._v(\"Privacy Policy\")])]),_vm._v(\" \"),_c('p',[_c('span',[_vm._v(\"2.\")]),_vm._v(\"You affirm that you are the record holder for this vehicle and that all information you have\\n provided is true and accurate.\")]),_vm._v(\" \"),_c('p',[_c('span',[_vm._v(\"3.\")]),_vm._v(\"By checking this box, you also acknowledge that this website is privately owned and\\n independently operated, having no affiliation with any state or federal agency. \")]),_vm._v(\" \"),_c('p',[_c('span',[_vm._v(\"4.\")]),_vm._v(\"You hereby appoint this site as your agent and expressly authorize its personnel to access\\n and\\n contact the FLHSMV online vehicle services portal and process your registration on your behalf for a fee\\n that\\n includes features and benefits exclusive to this site. \")]),_vm._v(\" \"),_c('p',[_c('span',[_vm._v(\"5.\")]),_vm._v(\"You also authorize this website to retain your information for future renewals.\")])]),_vm._v(\" \"),_c('h5',[_vm._v(\"Electronic Signature\")]),_vm._v(\" \"),_c('input-field',{attrs:{\"form\":_vm.form,\"field\":\"electronic_signature\",\"rules\":\"required\"}},[_c('div',{staticClass:\"demo-e-signature-outer\"},[_c('VueSignaturePad',{ref:\"signaturePad\",attrs:{\"name\":\"electronic_signature\",\"id\":\"electronic_signature\",\"width\":\"100%\",\"height\":\"150px\",\"options\":{ onBegin : _vm.onBeginSignature, onEnd : _vm.onEndSignature }}}),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form.electronic_signature),expression:\"form.electronic_signature\"}],attrs:{\"type\":\"hidden\",\"name\":\"electronic_signature\"},domProps:{\"value\":(_vm.form.electronic_signature)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.form, \"electronic_signature\", $event.target.value)}}})],1)]),_vm._v(\" \"),_c('button',{staticClass:\"btn-clear-signature\",attrs:{\"type\":\"button\"},on:{\"click\":function($event){$event.preventDefault();return _vm.clearElectronicSignature.apply(null, arguments)}}},[_vm._v(\"\\n Clear signature\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"form-button-wrapper\"},[_c('nuxt-link',{staticClass:\"btn-return\",attrs:{\"to\":\"/pa/step-2\"}},[_c('svg',{attrs:{\"width\":\"6\",\"height\":\"10\",\"viewBox\":\"0 0 6 10\",\"fill\":\"none\",\"xmlns\":\"http://www.w3.org/2000/svg\"}},[_c('path',{attrs:{\"d\":\"M5 9L1 5L5 1\",\"stroke\":\"#182D40\",\"stroke-width\":\"1.2\",\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\"}})]),_vm._v(\"\\n Return to information\\n \")]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-form-green\",attrs:{\"type\":\"submit\",\"disabled\":!_vm.form.isReady},on:{\"click\":function($event){$event.preventDefault();return _vm.frontendFormSubmitHandler.apply(null, arguments)}}},[(!_vm.form.isReady)?_c('b-spinner',{staticClass:\"mr-1\",attrs:{\"small\":\"\"}}):_vm._e(),_vm._v(\"\\n\\n Continue\\n \"),_c('svg',{attrs:{\"width\":\"7\",\"height\":\"13\",\"viewBox\":\"0 0 7 13\",\"fill\":\"none\",\"xmlns\":\"http://www.w3.org/2000/svg\"}},[_c('path',{attrs:{\"d\":\"M1 1.5L6 6.5L1 11.5\",\"stroke\":\"white\",\"stroke-width\":\"1.2\",\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\"}})])],1)],1),_vm._v(\" \"),_c('FormErrorMsg',{attrs:{\"msg\":_vm.formErrorMsg}})],1)]}}])}),_vm._ssrNode(\" \"),(_vm.showAddressConfirmationModal)?_c('address-confirmation',{attrs:{\"original-address\":_vm.form.mailing_address},on:{\"goNext\":_vm.goNext,\"close-address-confirmation-modal\":function($event){_vm.showAddressConfirmationModal=false},\"setSelectedAddress\":_vm.setSelectedAddress}}):_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\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//\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//\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport forms from '@/mixins/forms'\nimport Address from \"@/components/Forms/Address\";\nimport AddressConfirmation from \"@/components/Forms/AddressConfirmation\";\n\nexport default {\n name: \"step-3\",\n middleware({store: {state}, redirect, route: {path}}) {\n if (Object.keys(state.step2Form).length === 0) {\n return redirect('/pa/step-1');\n }\n },\n components: {\n AddressConfirmation, Address\n },\n mixins: [forms],\n data() {\n let state = this.$store.state,\n step1Form = this.$copyObject(state.step1Form),\n step2Form = this.$copyObject(state.step2Form),\n step3Form = this.$copyObject(state.step3Form),\n ipAddress = state.ipAddress,\n mailingAddress = step3Form.mailing_address,\n differentMailingAddress = step3Form.different_mailing_address,\n residentialAddress = step2Form.residential_address;\n\n\n return {\n showAddressConfirmationModal: false,\n ip_address: ipAddress,\n ipVisible: false,\n resident_address: residentialAddress,\n form: this.$form({\n different_mailing_address: differentMailingAddress || false,\n order_id: this.$store.state.orderId,\n signature_sc: '',\n deaf_or_hard_of_hearing: step3Form.deaf_or_hard_of_hearing || false,\n electronic_signature: step3Form.electronic_signature || '',\n agree: step3Form.agree,\n mailing_address: mailingAddress || this.$copyObject(residentialAddress),\n ...step1Form,\n ...step2Form,\n }, {\n resetOnSuccess: false\n })\n\n }\n },\n mounted() {\n let step3Form = this.$store.state.step3Form;\n\n if (step3Form.electronic_signature) {\n this.$refs.signaturePad.fromDataURL(step3Form.electronic_signature);\n }\n\n },\n methods: {\n setSelectedAddress(selectedAddress) {\n this.form.mailing_address = this.$copyObject(selectedAddress);\n },\n async submit() {\n\n try {\n this.form.isReady = false;\n\n this.saveElectronicSignature();\n await this.screenshot();\n\n if (this.$haveSameData(this.resident_address, this.form.mailing_address) === false && this.form.different_mailing_address) {\n this.addressConfirmation()\n } else {\n this.goNext();\n }\n } catch (e) {\n this.form.isReady = true;\n }\n\n\n },\n addressConfirmation() {\n this.showAddressConfirmationModal = true;\n },\n goNext() {\n this.$store.commit('SET_STEP3_FORM', this.form.data());\n\n this.form.post(`orders/store`)\n .then(response => {\n this.$store.commit('SET_ORDER_ID', response.data.id);\n this.storeSavedSession('step-3', '/pa/verify', this.form.data());\n });\n }\n },\n computed: {\n isIPVisible() {\n return this.ipVisible;\n }\n },\n watch: {\n 'form.different_mailing_address'() {\n this.form.mailing_address = this.$copyObject(this.resident_address);\n },\n 'form.agree'() {\n if (!this.form.agree) {\n this.form.agree = null;\n }\n }\n }\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-3.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-3.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./step-3.vue?vue&type=template&id=0cea7e76&scoped=true&\"\nimport script from \"./step-3.vue?vue&type=script&lang=js&\"\nexport * from \"./step-3.vue?vue&type=script&lang=js&\"\nfunction injectStyles (context) {\n \n \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 injectStyles,\n \"0cea7e76\",\n \"24fdebbc\"\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ValidationProvider',{attrs:{\"rules\":_vm.rules,\"name\":_vm.vName || _vm.field},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('div',{staticClass:\"form-group with-animation\",class:_vm.formGroupClasses},[_vm._t(\"default\",function(){return [_c('p',{staticClass:\"placeholder-text\",class:{'required':_vm.isRequired}},[_vm._v(_vm._s(_vm.placeholder))]),_vm._v(\" \"),((_vm.type)==='checkbox')?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form[_vm.field]),expression:\"form[field]\"}],staticClass:\"form-control\",class:{'with-border':_vm.addWithBorderClass},attrs:{\"disabled\":_vm.$attrs['disabled'],\"name\":_vm.vName || _vm.field,\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.form[_vm.field])?_vm._i(_vm.form[_vm.field],null)>-1:(_vm.form[_vm.field])},on:{\"change\":function($event){var $$a=_vm.form[_vm.field],$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.form, _vm.field, $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.form, _vm.field, $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.form, _vm.field, $$c)}}}}):((_vm.type)==='radio')?_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form[_vm.field]),expression:\"form[field]\"}],staticClass:\"form-control\",class:{'with-border':_vm.addWithBorderClass},attrs:{\"disabled\":_vm.$attrs['disabled'],\"name\":_vm.vName || _vm.field,\"type\":\"radio\"},domProps:{\"checked\":_vm._q(_vm.form[_vm.field],null)},on:{\"change\":function($event){return _vm.$set(_vm.form, _vm.field, null)}}}):_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form[_vm.field]),expression:\"form[field]\"}],staticClass:\"form-control\",class:{'with-border':_vm.addWithBorderClass},attrs:{\"disabled\":_vm.$attrs['disabled'],\"name\":_vm.vName || _vm.field,\"type\":_vm.type},domProps:{\"value\":(_vm.form[_vm.field])},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.form, _vm.field, $event.target.value)}}})]}),_vm._v(\" \"),_vm._l((_vm.$getFormInputErrors(errors,_vm.field,_vm.form)),function(err){return (!_vm.errorMsgsOutOfWrapper)?_c('span',{staticClass:\"validation-err-msg\",domProps:{\"innerHTML\":_vm._s(err)}}):_vm._e()})],2),_vm._v(\" \"),_vm._l((_vm.$getFormInputErrors(errors,_vm.field,_vm.form)),function(err){return (_vm.errorMsgsOutOfWrapper)?_c('span',{staticClass:\"validation-err-msg\",domProps:{\"innerHTML\":_vm._s(err)}}):_vm._e()})]}}],null,true)})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\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\nexport default {\n name: \"input-field\",\n props: {\n vName: {\n required: false,\n },\n type: {\n required: false,\n default: 'text'\n },\n rules: {\n required: false,\n type: String,\n default: ''\n },\n formGroupClass: {\n require: false,\n default: ''\n },\n form: {\n required: true\n },\n field: {\n required: true,\n type: String\n },\n placeholder: {\n required: false,\n default: ''\n },\n errorMsgsOutOfWrapper: {\n required: false,\n default: false\n }\n },\n data() {\n return {\n addWithBorderClass: false,\n formGroupClasses: []\n }\n },\n mounted() {\n\n this.formGroupClass.split(' ').forEach(c => {\n if (c.trim()) {\n this.formGroupClasses.push({[c]: true});\n }\n });\n\n this.focusOnInputIfValue();\n\n },\n methods: {\n focusOnInputIfValue() {\n\n if (!this.fieldValue) {\n return;\n }\n\n let hasFocusedClass = this.formGroupClasses.find(c => {\n if (c['focused']) {\n return c;\n }\n });\n\n if (hasFocusedClass) {\n return;\n }\n\n this.formGroupClasses.push({\n 'focused': true\n });\n },\n\n },\n computed: {\n isRequired() {\n return this.rules.indexOf('required') >= 0;\n },\n fieldValue() {\n return this.field.split('.').reduce((o, f) => o[f], this.form);\n }\n },\n watch: {\n fieldValue() {\n this.focusOnInputIfValue();\n }\n }\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InputField.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InputField.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./InputField.vue?vue&type=template&id=7fbd73e8&scoped=true&\"\nimport script from \"./InputField.vue?vue&type=script&lang=js&\"\nexport * from \"./InputField.vue?vue&type=script&lang=js&\"\nfunction injectStyles (context) {\n \n var style0 = require(\"./InputField.vue?vue&type=style&index=0&id=7fbd73e8&scoped=true&lang=css&\")\nif (style0.__inject__) style0.__inject__(context)\n\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 injectStyles,\n \"7fbd73e8\",\n \"4951dfc0\"\n \n)\n\nexport default component.exports","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--3-oneOf-1-2!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InputField.vue?vue&type=style&index=0&id=7fbd73e8&scoped=true&lang=css&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add CSS to SSR context\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesServer.js\").default\nmodule.exports.__inject__ = function (context) {\n add(\"f5598fc8\", content, true, context)\n};","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--3-oneOf-1-2!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FormErrorMsg.vue?vue&type=style&index=0&id=4c656529&scoped=true&lang=css&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add CSS to SSR context\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesServer.js\").default\nmodule.exports.__inject__ = function (context) {\n add(\"3e06b350\", content, true, context)\n};","import InputField from \"@/components/Forms/InputField\";\nimport FormErrorMsg from \"@/components/Forms/FormErrorMsg\";\nimport {toPng} from 'html-to-image';\n\nexport default {\n components: {\n InputField, FormErrorMsg\n },\n data() {\n return {\n formErrorMsg: ''\n }\n },\n methods: {\n frontendFormSubmitHandler() {\n\n if (!this.$refs.form) {\n return this.submit();\n }\n\n this.$refs.form.validate().then(success => {\n //submit the form if not errors occurs\n if (success) {\n return this.submit();\n }\n\n let firstErrorFieldName = this.getFirstFieldErrorName();\n\n //focus on the input if found!\n if (firstErrorFieldName) {\n this.focusOnElement(firstErrorFieldName);\n }\n\n });\n\n },\n getFirstFieldErrorName() {\n let errorsKeys = Object.keys(this.$refs.form.errors),\n firstErrorFieldName;\n\n while (errorsKeys.length) {\n firstErrorFieldName = errorsKeys.shift();\n\n if (this.$refs.form.errors[firstErrorFieldName].length) {\n return firstErrorFieldName;\n }\n }\n },\n focusOnElement(fieldName) {\n let [el] = document.getElementsByName(fieldName);\n\n //try with id\n if (!el) {\n el = document.getElementById(fieldName);\n }\n\n el.scrollIntoView({behavior: 'smooth'});\n el.focus();\n },\n catchError(err) {\n if (err.response) {\n this.form.onFail(err.response.data.data);\n this.formErrorMsg = err.response.data.message;\n } else {\n this.formErrorMsg = err.message;\n }\n },\n storeSavedSession(step, redirectTo, payload) {\n let storedOrderId = this.$store.state.orderId;\n\n if (storedOrderId) {\n\n this.$axios.post(`orders/${storedOrderId}/${step}/store-saved-session`, {\n payload: payload\n });\n\n }\n\n if (redirectTo) {\n this.$router.push({path: redirectTo});\n }\n\n },\n saveElectronicSignature() {\n const {isEmpty, data} = this.$refs.signaturePad.saveSignature();\n\n if (isEmpty) {\n this.form.electronic_signature = '';\n } else {\n this.form.electronic_signature = data;\n }\n },\n clearElectronicSignature() {\n this.$refs.signaturePad.clearSignature();\n this.saveElectronicSignature();\n },\n async htmlToPNG() {\n const el = this.$refs.screenShotSection;\n this.form.signature_sc = await toPng(el);\n },\n async screenshot() {\n await this.htmlToPNG();\n this.ipVisible = false;\n },\n onBeginSignature() {\n },\n onEndSignature() {\n this.saveElectronicSignature();\n },\n }\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.errorMsg)?_c('p',{staticClass:\"form-error-msg\",domProps:{\"innerHTML\":_vm._s(_vm.errorMsg)}},[]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\n//\n//\n//\n\nexport default {\n name: \"FormErrorMsg\",\n props: {\n msg: {\n type: String\n }\n },\n data() {\n return {\n errorMsg: ''\n }\n },\n mounted() {\n this.setFormErrorMsg(this.msg);\n },\n methods: {\n setFormErrorMsg(msg) {\n this.errorMsg = msg;\n }\n },\n beforeMount() {\n this.$eventBus.$on('setFormErrorMsg', this.setFormErrorMsg)\n },\n watch: {\n msg() {\n this.setFormErrorMsg(this.msg);\n }\n }\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FormErrorMsg.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FormErrorMsg.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./FormErrorMsg.vue?vue&type=template&id=4c656529&scoped=true&\"\nimport script from \"./FormErrorMsg.vue?vue&type=script&lang=js&\"\nexport * from \"./FormErrorMsg.vue?vue&type=script&lang=js&\"\nfunction injectStyles (context) {\n \n var style0 = require(\"./FormErrorMsg.vue?vue&type=style&index=0&id=4c656529&scoped=true&lang=css&\")\nif (style0.__inject__) style0.__inject__(context)\n\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 injectStyles,\n \"4c656529\",\n \"1910dda6\"\n \n)\n\nexport default component.exports","export * from \"-!../../node_modules/vue-style-loader/index.js??ref--3-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--3-oneOf-1-2!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./InputField.vue?vue&type=style&index=0&id=7fbd73e8&scoped=true&lang=css&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".form-control[data-v-7fbd73e8]:disabled{background-color:unset!important}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","export * from \"-!../../node_modules/vue-style-loader/index.js??ref--3-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--3-oneOf-1-2!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FormErrorMsg.vue?vue&type=style&index=0&id=4c656529&scoped=true&lang=css&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".form-error-msg[data-v-4c656529]{text-align:right;margin-top:10px;color:red;font-weight:700}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--3-oneOf-1-2!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./v-reg-vue-simple-suggest.vue?vue&type=style&index=0&lang=css&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add CSS to SSR context\nvar add = require(\"!../../../node_modules/vue-style-loader/lib/addStylesServer.js\").default\nmodule.exports.__inject__ = function (context) {\n add(\"0611e616\", content, true, context)\n};","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ValidationProvider',{attrs:{\"rules\":\"required\",\"name\":_vm.vName || _vm.field},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.fieldValue),expression:\"fieldValue\"}],staticClass:\"vehicle-type-input hidden-input\",attrs:{\"type\":\"hidden\"},domProps:{\"value\":(_vm.fieldValue)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.fieldValue=$event.target.value}}}),_vm._v(\" \"),_c('div',{staticClass:\"vehicle-type-wrapper medium-height\",class:{'opened mh-50':_vm.headerOpened},attrs:{\"id\":_vm.vName}},[_c('div',{staticClass:\"vehicle-type-wrapper-menu\"},[_c('div',{staticClass:\"vehicle-type-header\",class:{'open':_vm.headerOpened,'selected':!!_vm.selectedValue},on:{\"click\":function($event){$event.preventDefault();return _vm.selectHeaderClicked.apply(null, arguments)}}},[_c('p',{staticClass:\"vehicle-type-title\",class:{'required':_vm.required},domProps:{\"innerHTML\":_vm._s(_vm.headerText)}}),_vm._v(\" \"),_c('h5',{staticClass:\"vehicle-type-name\",domProps:{\"innerHTML\":_vm._s(_vm.displayableName)}}),_vm._v(\" \"),_c('svg',{staticClass:\"arrow\",attrs:{\"width\":\"10\",\"height\":\"7\",\"viewBox\":\"0 0 10 7\",\"fill\":\"none\",\"xmlns\":\"http://www.w3.org/2000/svg\"}},[_c('path',{attrs:{\"d\":\"M6.20003 6.56466C5.80005 7.04961 5.0571 7.04961 4.65712 6.56466L1.21085 2.38628C0.672897 1.73404 1.13684 0.749999 1.98231 0.749999L8.87484 0.75C9.72031 0.75 10.1843 1.73404 9.6463 2.38628L6.20003 6.56466Z\",\"fill\":\"#182D40\"}})])]),_vm._v(\" \"),_c('div',{staticClass:\"vehicle-type-options\",class:_vm.headerOpened ? 'd-block':'d-none'},_vm._l((_vm.options),function(option,index){return _c('div',{key:((option[_vm.usedValueKey]) + \"_\" + index),staticClass:\"vehicle-type-row\",on:{\"click\":function($event){$event.preventDefault();return _vm.optionClicked(option)}}},[_c('h6',[_vm._v(_vm._s(option.label))]),_vm._v(\" \"),(option.tooltip)?_c('p',{staticClass:\"small-text\",domProps:{\"innerHTML\":_vm._s(option.tooltip)}}):_vm._e()])}),0)]),_vm._v(\" \"),_vm._t(\"extra-field\")],2),_vm._v(\" \"),_vm._l((_vm.$getFormInputErrors(errors,_vm.field,_vm.form)),function(err){return _c('span',{staticClass:\"validation-err-msg\",domProps:{\"innerHTML\":_vm._s(err)}})})]}}],null,true)})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n name: \"VregSelect\",\n props: {\n vName: {\n required: false\n },\n required: {\n type: Boolean,\n default: false\n },\n fieldValue: {\n required: false\n },\n options: {\n required: true\n },\n headerText: {\n required: false,\n default: 'Select'\n },\n field: {},\n form: {\n default: () => {\n return {}\n }\n },\n usedValueKey: {\n required: false,\n default: 'value'\n }\n },\n data() {\n return {\n headerOpened: false,\n selectedValue: '',\n displayableName: ''\n }\n },\n mounted() {\n this.setSelectedValue();\n },\n methods: {\n setSelectedValue() {\n\n this.selectedValue = this.fieldValue || '';\n if (this.selectedValue) {\n this.setSelectedOption();\n }\n\n },\n setSelectedOption() {\n let option = this.options\n .find(option => option[this.usedValueKey].toLowerCase() === this.selectedValue.toLowerCase());\n\n if (option) {\n this.setSelectedValueAndDisplayableName(option);\n }\n\n },\n selectHeaderClicked() {\n this.headerOpened = !this.headerOpened;\n },\n optionClicked(option) {\n this.setSelectedValueAndDisplayableName(option);\n this.headerOpened = false;\n },\n\n setSelectedValueAndDisplayableName(option) {\n this.selectedValue = option[this.usedValueKey];\n this.displayableName = option.label;\n }\n },\n\n watch: {\n fieldValue() {\n if (this.fieldValue) {\n this.setSelectedValue();\n }\n },\n selectedValue: {\n handler() {\n\n this.$emit('value-selected', this.selectedValue);\n },\n immediate: true\n }\n }\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VregSelect.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VregSelect.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./VregSelect.vue?vue&type=template&id=5bb083e6&scoped=true&\"\nimport script from \"./VregSelect.vue?vue&type=script&lang=js&\"\nexport * from \"./VregSelect.vue?vue&type=script&lang=js&\"\nfunction injectStyles (context) {\n \n \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 injectStyles,\n \"5bb083e6\",\n \"bb0edb2c\"\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/vue-style-loader/index.js??ref--3-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--3-oneOf-1-2!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./v-reg-vue-simple-suggest.vue?vue&type=style&index=0&lang=css&\"","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(false);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".vue-simple-suggest>ul{list-style:none;margin:0;padding:0}.vue-simple-suggest.designed{position:relative}.vue-simple-suggest.designed,.vue-simple-suggest.designed *{box-sizing:border-box}.vue-simple-suggest.designed .input-wrapper input{display:block;width:100%;border:1px solid #cde;border-radius:3px;color:#000;background:#fff;outline:none;transition:all .1s;transition-delay:.05s}.vue-simple-suggest.designed.focus .input-wrapper input{border:1px solid #aaa}.vue-simple-suggest.designed .suggestions{position:absolute;left:0;right:0;top:100%;top:calc(100% + 5px);border-radius:3px;border:1px solid #aaa;background-color:#fff;opacity:1;z-index:1000;max-height:344px;overflow-y:scroll}.vue-simple-suggest.designed .suggestions .suggest-item{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vue-simple-suggest.designed .suggestions .misc-item,.vue-simple-suggest.designed .suggestions .suggest-item{padding:5px 10px}.vue-simple-suggest.designed .suggestions .suggest-item.hover{background-color:#2874d5!important;color:#fff!important}.vue-simple-suggest.designed .suggestions .suggest-item.selected{background-color:#2832d5;color:#fff}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"vue-simple-suggest\",class:[_vm.styles.vueSimpleSuggest, { designed: !_vm.destyled, focus: _vm.isInFocus }],on:{\"keydown\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"tab\",9,$event.key,\"Tab\")){ return null; }_vm.isTabbed = true}}},[_c('ValidationProvider',{attrs:{\"rules\":_vm.rules,\"name\":_vm.vName || _vm.field},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('div',{ref:\"inputSlot\",staticClass:\"input-wrapper form-group with-animation\",class:[_vm.styles.inputWrapper,{'focused':_vm.addFocusedClass}],attrs:{\"role\":\"combobox\",\"aria-haspopup\":\"listbox\",\"aria-owns\":_vm.listId,\"aria-expanded\":!!_vm.listShown && !_vm.removeList ? 'true' : 'false'}},[_c('p',{staticClass:\"placeholder-text\",class:{'required':_vm.isRequired}},[_vm._v(_vm._s(_vm.placeholderText))]),_vm._v(\" \"),_vm._t(\"default\",function(){return [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.text),expression:\"text\"}],staticClass:\"default-input form-control v-reg-select-input\",class:_vm.styles.defaultInput,attrs:{\"name\":_vm.vName || _vm.field},domProps:{\"value\":(_vm.text)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.text=$event.target.value}}})]}),_vm._v(\" \"),_vm._l((_vm.$getFormInputErrors(errors,_vm.field)),function(err){return _c('span',{staticClass:\"validation-err-msg\",domProps:{\"innerHTML\":_vm._s(err)}})})],2)]}}],null,true)}),_vm._ssrNode(\" \"),_c('transition',{attrs:{\"name\":\"vue-simple-suggest\"}},[(!!_vm.listShown && !_vm.removeList)?_c('ul',{staticClass:\"suggestions\",class:_vm.styles.suggestions,attrs:{\"id\":_vm.listId,\"role\":\"listbox\",\"aria-labelledby\":_vm.listId}},[(!!this.$scopedSlots['misc-item-above'])?_c('li',[_vm._t(\"misc-item-above\",null,{\"suggestions\":_vm.suggestions,\"query\":_vm.text})],2):_vm._e(),_vm._v(\" \"),_vm._l((_vm.suggestions),function(suggestion,index){return _c('li',{key:_vm.getId(suggestion, index),staticClass:\"suggest-item\",class:[\n _vm.styles.suggestItem,{\n selected: _vm.isSelected(suggestion),\n hover: _vm.isHovered(suggestion)\n }],attrs:{\"role\":\"option\",\"aria-selected\":(_vm.isHovered(suggestion) || _vm.isSelected(suggestion)) ? 'true' : 'false',\"id\":_vm.getId(suggestion, index)},on:{\"mouseenter\":function($event){return _vm.hover(suggestion, $event.target)},\"mouseleave\":function($event){return _vm.hover(undefined)},\"click\":function($event){return _vm.suggestionClick(suggestion, $event)}}},[_vm._t(\"suggestion-item\",function(){return [_c('span',[_vm._v(_vm._s(_vm.displayProperty(suggestion)))])]},{\"autocomplete\":function () { return _vm.autocompleteText(suggestion); },\"suggestion\":suggestion,\"query\":_vm.text})],2)}),_vm._v(\" \"),(!!this.$scopedSlots['misc-item-below'])?_c('li',[_vm._t(\"misc-item-below\",null,{\"suggestions\":_vm.suggestions,\"query\":_vm.text})],2):_vm._e()],2):_vm._e()])],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export const defaultControls = {\n selectionUp: [38],\n selectionDown: [40],\n select: [13],\n hideList: [27],\n showList: [40],\n autocomplete: [32, 13]\n}\n\nexport const modes = {\n input: String,\n select: Object,\n}\n\nexport function fromPath(obj, path) {\n return path.split('.').reduce((o, i) => (o === Object(o) ? o[i] : o), obj)\n}\n\nexport function hasKeyCode(arr, event) {\n return hasKeyCodeByCode(arr, event.keyCode)\n}\n\nexport function hasKeyCodeByCode(arr, keyCode) {\n if (arr.length <= 0) return false\n\n const has = arr => arr.some(code => code === keyCode)\n if (Array.isArray(arr[0])) {\n return arr.some(array => has(array))\n } else {\n return has(arr)\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport {\n defaultControls,\n modes,\n fromPath,\n hasKeyCodeByCode,\n hasKeyCode\n} from './misc'\n\nexport default {\n name: 'vue-simple-suggest',\n inheritAttrs: false,\n model: {\n prop: 'value',\n event: 'input'\n },\n props: {\n vName: {\n required: false\n },\n field: {},\n rules: {},\n placeholderText: {},\n useRandomUnique: {\n type: Boolean,\n default: true\n },\n styles: {\n type: Object,\n default: () => ({})\n },\n controls: {\n type: Object,\n default: () => defaultControls\n },\n minLength: {\n type: Number,\n default: 1\n },\n maxSuggestions: {\n type: Number,\n default: 10\n },\n displayAttribute: {\n type: String,\n default: 'title'\n },\n valueAttribute: {\n type: String,\n default: 'id'\n },\n list: {\n type: [Function, Array],\n default: () => []\n },\n removeList: {\n type: Boolean,\n default: false\n },\n destyled: {\n type: Boolean,\n default: false\n },\n filterByQuery: {\n type: Boolean,\n default: false\n },\n filter: {\n type: Function,\n default(el, value) {\n return value ? ~this.displayProperty(el).toLowerCase().indexOf(value.toLowerCase()) : true\n }\n },\n debounce: {\n type: Number,\n default: 0\n },\n nullableSelect: {\n type: Boolean,\n default: false\n },\n value: {},\n mode: {\n type: String,\n default: 'input',\n validator: value => !!~Object.keys(modes).indexOf(value.toLowerCase())\n },\n preventHide: {\n type: Boolean,\n default: false\n }\n },\n // Handle run-time mode changes (now working):\n watch: {\n mode: {\n handler(current, old) {\n this.constructor.options.model.event = current\n\n // Can be null if the component is root\n this.$parent && this.$parent.$forceUpdate()\n\n this.$nextTick(() => {\n if (current === 'input') {\n this.$emit('input', this.text)\n } else {\n this.$emit('select', this.selected)\n }\n })\n },\n immediate: true\n },\n value: {\n handler(current) {\n\n if (typeof current !== 'string') {\n current = this.displayProperty(current)\n }\n\n // this.updateTextOutside(current)\n },\n immediate: true\n },\n isInFocus() {\n this.focusOnInputIfValue();\n }\n },\n //\n data() {\n return {\n addFocusedClass: false,\n selected: null,\n hovered: null,\n suggestions: [],\n listShown: false,\n inputElement: null,\n canSend: true,\n timeoutInstance: null,\n text: this.value,\n isPlainSuggestion: false,\n isClicking: false,\n isInFocus: false,\n isFalseFocus: false,\n isTabbed: false,\n controlScheme: {},\n listId: `${this._uid}-suggestions`\n }\n },\n computed: {\n isRequired() {\n return this.rules.indexOf('required') >= 0;\n },\n listIsRequest() {\n return typeof this.list === 'function'\n },\n inputIsComponent() {\n return (this.$slots.default && this.$slots.default.length > 0) && !!this.$slots.default[0].componentInstance\n },\n input() {\n return this.inputIsComponent ? this.$slots.default[0].componentInstance : this.inputElement\n },\n on() {\n return this.inputIsComponent ? '$on' : 'addEventListener'\n },\n off() {\n return this.inputIsComponent ? '$off' : 'removeEventListener'\n },\n hoveredIndex() {\n for (let i = 0; i < this.suggestions.length; i++) {\n const el = this.suggestions[i];\n if (this.hovered && (this.valueProperty(this.hovered) == this.valueProperty(el))) {\n return i;\n }\n }\n return -1;\n },\n textLength() {\n return (this.text && this.text.length) || (this.inputElement.value.length) || 0\n },\n isSelectedUpToDate() {\n return !!this.selected && this.displayProperty(this.selected) === this.text\n }\n },\n created() {\n this.controlScheme = Object.assign({}, defaultControls, this.controls)\n },\n async mounted() {\n await this.$slots.default;\n\n this.$nextTick(() => {\n this.inputElement = this.$refs['inputSlot'].querySelector('input')\n\n if (this.inputElement) {\n this.setInputAriaAttributes()\n this.prepareEventHandlers(true)\n } else {\n console.error('No input element found')\n }\n\n this.focusOnInputIfValue();\n })\n },\n beforeDestroy() {\n this.prepareEventHandlers(false)\n },\n methods: {\n focusOnInputIfValue() {\n if (this.isInFocus) {\n return this.addFocusedClass = true;\n }\n\n if (this.value || this.text) {\n return this.addFocusedClass = true;\n }\n\n return this.addFocusedClass = false;\n },\n\n isEqual(suggestion, item) {\n return item && (this.valueProperty(suggestion) == this.valueProperty(item))\n },\n isSelected(suggestion) {\n return this.isEqual(suggestion, this.selected)\n },\n isHovered(suggestion) {\n return this.isEqual(suggestion, this.hovered)\n },\n setInputAriaAttributes() {\n this.inputElement.setAttribute('aria-activedescendant', '')\n this.inputElement.setAttribute('aria-autocomplete', 'list')\n this.inputElement.setAttribute('aria-controls', this.listId)\n },\n prepareEventHandlers(enable) {\n const binder = this[enable ? 'on' : 'off']\n const keyEventsList = {\n click: this.showSuggestions,\n keydown: this.onKeyDown,\n keyup: this.onListKeyUp\n }\n const eventsList = Object.assign({\n blur: this.onBlur,\n focus: this.onFocus,\n input: this.onInput,\n }, keyEventsList)\n\n for (const event in eventsList) {\n this.input[binder](event, eventsList[event])\n }\n\n const listenerBinder = enable ? 'addEventListener' : 'removeEventListener'\n\n for (const event in keyEventsList) {\n this.inputElement[listenerBinder](event, keyEventsList[event])\n }\n },\n isScopedSlotEmpty(slot) {\n if (slot) {\n const vNode = slot(this)\n return !(Array.isArray(vNode) || (vNode && (vNode.tag || vNode.context || vNode.text || vNode.children)))\n }\n\n return true\n },\n miscSlotsAreEmpty() {\n const slots = ['misc-item-above', 'misc-item-below'].map(s => this.$scopedSlots[s])\n\n if (slots.every(s => !!s)) {\n return slots.every(this.isScopedSlotEmpty.bind(this))\n }\n\n const slot = slots.find(s => !!s)\n\n return this.isScopedSlotEmpty.call(this, slot)\n },\n getPropertyByAttribute(obj, attr) {\n return this.isPlainSuggestion ? obj : typeof obj !== undefined ? fromPath(obj, attr) : obj\n },\n displayProperty(obj) {\n if (this.isPlainSuggestion) {\n return obj\n }\n\n let display = this.getPropertyByAttribute(obj, this.displayAttribute);\n\n if (typeof display === 'undefined') {\n display = JSON.stringify(obj)\n\n if (process && ~process.env.NODE_ENV.indexOf('dev')) {\n console.warn('[vue-simple-suggest]: Please, provide `display-attribute` as a key or a dotted path for a property from your object.')\n }\n }\n\n return String(display || '')\n },\n valueProperty(obj) {\n if (this.isPlainSuggestion || this.useRandomUnique) {\n return obj\n }\n\n const value = this.getPropertyByAttribute(obj, this.valueAttribute);\n\n if (typeof value === 'undefined') {\n console.error(\n `[vue-simple-suggest]: Please, check if you passed 'value-attribute' (default is 'id') and 'display-attribute' (default is 'title') props correctly.\n Your list objects should always contain a unique identifier.`\n )\n }\n\n return value\n },\n\n autocompleteText(suggestion) {\n this.setText(this.displayProperty(suggestion));\n },\n setText(text) {\n this.$nextTick(() => {\n this.inputElement.value = text\n this.text = text\n this.$emit('input', text)\n })\n },\n select(item) {\n if (this.selected !== item || (this.nullableSelect && !item)) {\n this.selected = item\n this.$emit('select', item)\n\n if (item) {\n this.autocompleteText(item)\n }\n }\n\n this.hover(null)\n },\n hover(item, elem) {\n const elemId = !!item ? this.getId(item, this.hoveredIndex) : ''\n\n this.inputElement.setAttribute('aria-activedescendant', elemId)\n\n if (item && (item !== this.hovered)) {\n this.$emit('hover', item, elem)\n }\n\n this.hovered = item\n },\n hideList() {\n if (this.listShown) {\n this.listShown = false\n this.hover(null)\n this.$emit('hide-list')\n }\n },\n showList() {\n if (!this.listShown) {\n if (this.textLength >= this.minLength\n && ((this.suggestions.length > 0) || !this.miscSlotsAreEmpty())\n ) {\n this.listShown = true\n this.$emit('show-list')\n }\n }\n },\n async showSuggestions() {\n if (this.suggestions.length === 0 && this.minLength <= this.textLength) {\n // try show misc slots while researching\n this.showList()\n await this.research()\n }\n\n this.showList()\n },\n onShowList(e) {\n if (hasKeyCode(this.controlScheme.showList, e)) {\n this.showSuggestions()\n }\n },\n moveSelection(e) {\n if (!this.listShown || !this.suggestions.length) return\n if (hasKeyCode([this.controlScheme.selectionUp, this.controlScheme.selectionDown], e)) {\n e.preventDefault()\n\n const isMovingDown = hasKeyCode(this.controlScheme.selectionDown, e)\n const direction = isMovingDown * 2 - 1\n const listEdge = isMovingDown ? 0 : this.suggestions.length - 1\n const hoversBetweenEdges = isMovingDown ? this.hoveredIndex < this.suggestions.length - 1 : this.hoveredIndex > 0\n\n let item = null\n\n if (!this.hovered) {\n item = this.selected || this.suggestions[listEdge]\n } else if (hoversBetweenEdges) {\n item = this.suggestions[this.hoveredIndex + direction]\n } else /* if hovers on edge */ {\n item = this.suggestions[listEdge]\n }\n this.hover(item)\n }\n },\n onKeyDown(e) {\n const select = this.controlScheme.select,\n hideList = this.controlScheme.hideList\n\n // prevent form submit on keydown if Enter key registered in the keyup list\n if (e.key === 'Enter' && this.listShown && hasKeyCodeByCode([select, hideList], 13)) {\n e.preventDefault()\n }\n\n if (e.key === 'Tab' && this.hovered) {\n this.select(this.hovered)\n }\n\n this.onShowList(e)\n this.moveSelection(e);\n this.onAutocomplete(e);\n },\n onListKeyUp(e) {\n const select = this.controlScheme.select,\n hideList = this.controlScheme.hideList\n\n if (this.listShown && hasKeyCode([select, hideList], e)) {\n e.preventDefault()\n if (hasKeyCode(select, e)) {\n this.select(this.hovered)\n }\n\n this.hideList()\n }\n },\n onAutocomplete(e) {\n if (hasKeyCode(this.controlScheme.autocomplete, e)\n && (e.ctrlKey || e.shiftKey)\n && (this.suggestions.length > 0 && this.suggestions[0])\n && (this.listShown)\n ) {\n e.preventDefault()\n this.hover(this.suggestions[0])\n this.autocompleteText(this.suggestions[0])\n }\n },\n suggestionClick(suggestion, e) {\n this.$emit('suggestion-click', suggestion, e)\n this.select(suggestion)\n\n if (!this.preventHide) this.hideList()\n\n if (this.isClicking) {\n setTimeout(() => {\n this.inputElement.focus()\n\n /// Ensure, that all needed flags are off before finishing the click.\n this.isClicking = false\n }, 0)\n }\n },\n onBlur(e) {\n if (this.isInFocus) {\n\n /// Clicking starts here, because input's blur occurs before the suggestionClick\n /// and exactly when the user clicks the mouse button or taps the screen.\n this.isClicking = this.hovered && !this.isTabbed\n\n if (!this.isClicking) {\n this.isInFocus = false\n this.hideList()\n\n this.$emit('blur', e)\n } else if (e && e.isTrusted && !this.isTabbed) {\n this.isFalseFocus = true\n }\n } else {\n this.inputElement.blur()\n console.error(\n `This should never happen!\n If you encountered this error, please make sure that your input component emits 'focus' events properly.\n For more info see https://github.com/KazanExpress/vue-simple-suggest#custom-input.\n\n If your 'vue-simple-suggest' setup does not include a custom input component - please,\n report to https://github.com/KazanExpress/vue-simple-suggest/issues/new`\n )\n }\n\n this.isTabbed = false\n },\n onFocus(e) {\n this.isInFocus = true\n\n // Only emit, if it was a native input focus\n if (e && !this.isFalseFocus) {\n this.$emit('focus', e)\n }\n\n // Show list only if the item has not been clicked (isFalseFocus indicates that click was made earlier)\n if (!this.isClicking && !this.isFalseFocus) {\n this.showSuggestions()\n }\n\n this.isFalseFocus = false\n },\n onInput(inputEvent) {\n const value = !inputEvent.target ? inputEvent : inputEvent.target.value\n\n this.updateTextOutside(value)\n this.$emit('input', value)\n },\n updateTextOutside(value) {\n\n //to determined get new list or keep same list.\n // if (this.text === value) {\n // return\n // }\n\n this.text = value\n if (this.hovered) this.hover(null)\n\n if (this.text.length < this.minLength) {\n this.hideList()\n return;\n }\n\n if (this.debounce) {\n clearTimeout(this.timeoutInstance)\n this.timeoutInstance = setTimeout(this.research, this.debounce)\n } else {\n this.research()\n }\n },\n async research() {\n try {\n\n\n if (this.canSend) {\n this.canSend = false\n // @TODO: fix when promises will be cancelable (never :D)\n let textBeforeRequest = this.text\n let newList = await this.getSuggestions(this.text)\n\n if (textBeforeRequest === this.text) {\n this.$set(this, 'suggestions', newList)\n }\n }\n } catch (e) {\n this.clearSuggestions()\n throw e\n } finally {\n this.canSend = true;\n\n if ((this.suggestions.length === 0) && this.miscSlotsAreEmpty()) {\n this.hideList()\n } else if (this.isInFocus) {\n this.showList()\n }\n\n return this.suggestions\n }\n },\n async getSuggestions(value) {\n value = value || '';\n\n if (value.length < this.minLength) {\n return []\n }\n\n this.selected = null\n\n // Start request if can\n if (this.listIsRequest) {\n this.$emit('request-start', value)\n }\n\n let nextIsPlainSuggestion = false\n let result = []\n try {\n if (this.listIsRequest) {\n result = (await this.list(value)) || []\n } else {\n result = this.list\n }\n\n // IFF the result is not an array (just in case!) - make it an array\n if (!Array.isArray(result)) {\n result = [result]\n }\n\n nextIsPlainSuggestion = (typeof result[0] !== 'object' && typeof result[0] !== 'undefined') || Array.isArray(result[0])\n\n if (this.filterByQuery) {\n result = result.filter((el) => this.filter(el, value))\n }\n\n if (this.listIsRequest) {\n this.$emit('request-done', result)\n }\n } catch (e) {\n if (this.listIsRequest) {\n this.$emit('request-failed', e)\n } else {\n throw e\n }\n } finally {\n if (this.maxSuggestions) {\n result.splice(this.maxSuggestions)\n }\n\n this.isPlainSuggestion = nextIsPlainSuggestion\n return result\n }\n },\n clearSuggestions() {\n this.suggestions.splice(0)\n },\n getId(value, i) {\n let id;\n\n if (this.useRandomUnique || this.this.isPlainSuggestion) {\n id = i;\n } else {\n id = this.valueProperty(value) || i;\n }\n\n return `${this.listId}-suggestion-${id}`\n }\n }\n}\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./v-reg-vue-simple-suggest.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--2-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./v-reg-vue-simple-suggest.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./v-reg-vue-simple-suggest.vue?vue&type=template&id=0d2d8e89&\"\nimport script from \"./v-reg-vue-simple-suggest.vue?vue&type=script&lang=js&\"\nexport * from \"./v-reg-vue-simple-suggest.vue?vue&type=script&lang=js&\"\nfunction injectStyles (context) {\n \n var style0 = require(\"./v-reg-vue-simple-suggest.vue?vue&type=style&index=0&lang=css&\")\nif (style0.__inject__) style0.__inject__(context)\n\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 injectStyles,\n null,\n \"65999c95\"\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('v-reg-vue-simple-suggest',{ref:\"address\",attrs:{\"mode\":\"input\",\"placeholder-text\":\"Address\",\"display-attribute\":\"streetLine\",\"filterByQuery\":true,\"field\":(_vm.addressField + \".street\"),\"rules\":\"required\",\"list\":_vm.getSuggestionList},on:{\"suggestion-click\":_vm.suggestionClicked},scopedSlots:_vm._u([{key:\"suggestion-item\",fn:function(ref){\nvar suggestion = ref.suggestion;\nvar query = ref.query;\nreturn _c('div',{},[_c('div',{domProps:{\"innerHTML\":_vm._s(_vm.buildAddress(suggestion))}})])}}]),model:{value:(_vm.form[_vm.addressField].street),callback:function ($$v) {_vm.$set(_vm.form[_vm.addressField], \"street\", $$v)},expression:\"form[addressField].street\"}}),_vm._ssrNode(\" \"),_c('input-field',{attrs:{\"form\":_vm.form,\"field\":(_vm.addressField + \".address_2\")}},[_c('p',{staticClass:\"placeholder-text\"},[_vm._v(\"Apartment, suite, etc. (optional)\")]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form[_vm.addressField].address_2),expression:\"form[addressField].address_2\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"name\":(_vm.addressField + \".address_2\")},domProps:{\"value\":(_vm.form[_vm.addressField].address_2)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.form[_vm.addressField], \"address_2\", $event.target.value)}}})]),_vm._ssrNode(\" \"),_c('input-field',{attrs:{\"form\":_vm.form,\"field\":(_vm.addressField + \".city\"),\"rules\":\"required\"}},[_c('p',{staticClass:\"placeholder-text required\"},[_vm._v(\"City\")]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form[_vm.addressField].city),expression:\"form[addressField].city\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"name\":(_vm.addressField + \".city\")},domProps:{\"value\":(_vm.form[_vm.addressField].city)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.form[_vm.addressField], \"city\", $event.target.value)}}})]),_vm._ssrNode(\" \"),_vm._ssrNode(\"<div class=\\\"v-form-row\\\" data-v-32eee166>\",\"</div>\",[_vm._ssrNode(\"<div class=\\\"v-form-col\\\" data-v-32eee166>\",\"</div>\",[(_vm.states)?_c('vreg-select',{attrs:{\"required\":\"\",\"form\":_vm.form,\"fieldValue\":_vm.form[_vm.addressField].state_code,\"options\":_vm.states,\"header-text\":\"State\",\"field\":(_vm.addressField + \".state_code\")},on:{\"value-selected\":function (v){ return _vm.form[_vm.addressField].state_code=v; }}}):_vm._e()],1),_vm._ssrNode(\" \"),_vm._ssrNode(\"<div class=\\\"v-form-col\\\" data-v-32eee166>\",\"</div>\",[_c('input-field',{attrs:{\"form\":_vm.form,\"field\":(_vm.addressField + \".zip\"),\"rules\":\"required|length:5\"}},[_c('p',{staticClass:\"placeholder-text required\"},[_vm._v(\"Zip code\")]),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.form[_vm.addressField].zip),expression:\"form[addressField].zip\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"name\":(_vm.addressField + \".zip\")},domProps:{\"value\":(_vm.form[_vm.addressField].zip)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.form[_vm.addressField], \"zip\", $event.target.value)}}})])],1)],2)],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","//\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//\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\nimport inputField from \"@/components/Forms/InputField\";\nimport VRegVueSimpleSuggest from \"@/components/Forms/VregSuggesstions/v-reg-vue-simple-suggest\";\nimport VregSelect from \"@/components/Forms/VregSelect\";\nimport states from \"@/data/states.json\"\n\nexport default {\n name: \"Address\",\n components: {VregSelect, VRegVueSimpleSuggest, inputField},\n props: {\n addressField: {\n required: true\n },\n form: {\n required: true\n }\n },\n data() {\n return {\n selectedSearchItem: null,\n states\n }\n },\n mounted() {\n this.watchZipcodeField();\n },\n methods: {\n watchZipcodeField() {\n this.$watch(`form.${this.addressField}.zip`, (zipCode) => {\n if (this.form[this.addressField].zip.length > 5) {\n this.form[this.addressField].zip = this.form[this.addressField].zip.substr(0, 5);\n }\n });\n },\n async suggestionClicked(suggestion) {\n\n if (suggestion.entries > 1) {\n return this.handleSuggestionEntries(suggestion);\n }\n\n this.selectedSearchItem = suggestion;\n this.form[this.addressField].street = suggestion.text;\n this.setAddressFields(this.form[this.addressField]);\n },\n async handleSuggestionEntries(suggestion) {\n let query = suggestion.streetLine,\n lookup = new this.$addressLookup(query);\n lookup.selected = this.buildAddress(suggestion, true);\n\n return await this.$addressLookupClient.send(lookup)\n .then(suggestions => {\n let vregSuggestComponent = this.$refs.address;\n\n this.$set(vregSuggestComponent, 'suggestions', suggestions.result);\n vregSuggestComponent.showList();\n }).catch(console.log);\n },\n setAddressFields(addressFieldObject) {\n addressFieldObject.street = this.selectedSearchItem.streetLine;\n addressFieldObject.address_2 = this.selectedSearchItem.secondary;\n addressFieldObject.city = this.selectedSearchItem.city;\n addressFieldObject.state_code = this.selectedSearchItem.state;\n addressFieldObject.zip = this.selectedSearchItem.zipcode;\n },\n async getSuggestionList(query) {\n\n if (query.trim().length <= 3) {\n return [];\n }\n\n let lookup = new this.$addressLookup(query);\n\n return await this.$addressLookupClient.send(lookup)\n .then(suggestions => {\n return suggestions.result;\n }).catch(console.log);\n },\n buildAddress(suggestion, onlyEntries) {\n let whiteSpace = \"\",\n secondary = suggestion.secondary;\n\n if (suggestion.secondary) {\n\n if (suggestion.entries > 1) {\n if (onlyEntries) {\n secondary += ` (${suggestion.entries})`;\n } else {\n secondary += ` ( ${suggestion.entries} more entries)`;\n }\n }\n\n whiteSpace = \" \";\n }\n\n return suggestion.streetLine + whiteSpace + secondary + \" \" + suggestion.city + \", \" + suggestion.state + \" \" + suggestion.zipcode;\n }\n }\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Address.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Address.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Address.vue?vue&type=template&id=32eee166&scoped=true&\"\nimport script from \"./Address.vue?vue&type=script&lang=js&\"\nexport * from \"./Address.vue?vue&type=script&lang=js&\"\nfunction injectStyles (context) {\n \n \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 injectStyles,\n \"32eee166\",\n \"7817d498\"\n \n)\n\nexport default component.exports"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AAAA;AAAA;AAAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACNA;AACA;AACA;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAkGA;;ACtLA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;ACtIA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;AC5BA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AAAA;AAAA;AAAA;AAAA;AAsBA;AAOA;AAuBA;;;;;;;;;;ACpDA;AACA;AACA;;;;;ACFA;AACA;AACA;AACA;AAEA;;ACLA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AAAA;AAAA;AAAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;AAAA;AAAA;AAAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;AChDA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AAAA;AAAA;AAAA;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACRA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AA4FA;AAMA;AAoBA;AAQA;AAgLA;AA4DA;AAsCA;AA+CA;AAQA;AACA;AAcA;AACA;AACA;AACA;AACA;AAUA;AAKA;AAeA;AACA;AACA;AAEA;AAsBA;AAgCA;AAcA;;AC1oBA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;AC1DA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""}