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A,CAVlDX,GAAG,uBACH1E,IAAI,mBACHlH,MAAOyH,EAAA8C,cACP,yBAAuB,EACvB5H,OAtCvCoF,EAAAA,EAAAA,IAsC8CN,EAAA2C,yBACPtJ,QAASkG,EAAAvF,oBACVjB,KAAK,QACJ8E,OAAMmC,EAAAwD,qBACNvF,QAAO+B,EAAA0D,SACPxF,QAAO8B,EAAAiD,YACP8B,eAAe/E,EAAAoD,gCAAAA,KAAAA,EAAAA,CAAAA,QAAAA,QAAAA,UAAAA,SAAAA,UAAAA,UAAAA,mBAAAA,EAAAA,KAAAA,EAAAA,IA5CtDlD,EAAAA,EAAAA,OA6CqCF,EAAA6C,qBAAkB,WAA3CmC,EAAAA,EAAAA,IAAoFC,EAAA,CA7ChG9J,IAAA,EA6C0D+J,OAAQlF,EAAAgD,4BAAAA,KAAAA,EAAAA,CAAAA,aA7ClE/B,EAAAA,EAAAA,IAAA,cAAAA,EAAAA,EAAAA,IAAA,4BAAAf,EAAAA,EAAAA,QAmDI2E,EAAAA,EAAAA,IAA+DM,EAAA,CAA/C,mBAAkBvF,EAAA7G,KAAO6B,SAAU8E,EAAA9E,UAAAA,KAAAA,EAAAA,CAAAA,mBAAAA,cAAAA,GC5CqB,CAAC,YAAY,oB","sources":["webpack://agra/./app/javascript/api/maps-service.js","webpack://agra/./app/javascript/helpers/extract-google-map-address-component.js","webpack://agra/./app/javascript/helpers/assign-location-values.js","webpack://agra/./app/javascript/mixins/geocode-location.js","webpack://agra/./app/javascript/components/inputs/custom-gmap-autocomplete.vue","webpack://agra/./app/javascript/components/inputs/custom-gmap-autocomplete.vue?f50b","webpack://agra/./app/javascript/components/inputs/locations/hidden-fields.vue","webpack://agra/./app/javascript/components/inputs/locations/hidden-fields.vue?b424","webpack://agra/./app/javascript/components/inputs/national-local-location-selector.vue","webpack://agra/./app/javascript/components/inputs/national-local-location-selector.vue?7f76"],"sourcesContent":["import ajax from '@/helpers/ajax'\nimport { htmlLang } from '@/i18n/translations'\nimport { importWithRetry } from '@/utils/component-loader'\n\nlet service = null\n\nif (window.Agra.Configuration.stubGoogleMaps) {\n // In scenarios, we mock out Google Maps calls with our own stub data.\n service = {\n stubbedService: null,\n\n async loadStubbedService() {\n const module = await importWithRetry(() => import(/* webpackMode: \"lazy\" */ './stubbed-maps-service'))\n this.stubbedService = module.default\n },\n\n autocomplete(params) {\n return this.loadStubbedService().then(() => {\n return this.stubbedService.autocomplete(params)\n })\n },\n\n geocode(params) {\n return this.loadStubbedService().then(() => {\n return this.stubbedService.geocode(params)\n })\n },\n\n findPlace(params) {\n return this.loadStubbedService().then(() => {\n return this.stubbedService.findPlace(params)\n })\n },\n\n getPlaceDetails(params) {\n return this.loadStubbedService().then(() => {\n return this.stubbedService.getPlaceDetails(params)\n })\n }\n }\n} else {\n const MapsService = {\n autocomplete({ input, bounds, countries }) {\n const tokyoHost = window.Agra.Configuration.tokyoUrlBase\n\n const center = window.Agra.Configuration.locationSearchBias.center\n const urlParams = new URLSearchParams({\n query: input,\n bounds: bounds ? JSON.stringify(bounds) : '',\n center: center ? JSON.stringify(center) : '',\n countries: countries ? JSON.stringify(countries) : '',\n locale: htmlLang()\n })\n\n const url = `${tokyoHost}/maps/places/autocomplete?${urlParams.toString()}`\n\n // Return a promise; callers should use it with .then to get the data\n return new Promise((resolve, reject) => {\n ajax.get({\n url,\n camelCaseResponse: false,\n successHandler: (resp) => {\n resolve(resp)\n },\n errorHandler: (err) => {\n reject(err)\n }\n })\n })\n },\n\n geocode({ address, bounds, country }) {\n const tokyoHost = window.Agra.Configuration.tokyoUrlBase\n\n const urlParams = new URLSearchParams({\n query: address,\n bounds: bounds ? JSON.stringify(bounds) : '',\n country: country || '',\n locale: htmlLang()\n })\n\n const url = `${tokyoHost}/maps/geocode?${urlParams.toString()}`\n\n // Return a promise; callers should use it with .then to get the data\n return new Promise((resolve, reject) => {\n ajax.get({\n url,\n camelCaseResponse: false,\n successHandler: (resp) => {\n resolve(resp)\n },\n errorHandler: (err) => {\n reject(err)\n }\n })\n })\n },\n\n findPlace({ query, bounds }) {\n const tokyoHost = window.Agra.Configuration.tokyoUrlBase\n\n const center = window.Agra.Configuration.locationSearchBias.center\n const urlParams = new URLSearchParams({\n query,\n bounds: bounds ? JSON.stringify(bounds) : '',\n center: center ? JSON.stringify(center) : '',\n locale: htmlLang()\n })\n\n const url = `${tokyoHost}/maps/places/search?${urlParams.toString()}`\n\n // Return a promise; callers should use it with .then to get the data\n return new Promise((resolve, reject) => {\n ajax.get({\n url,\n camelCaseResponse: false,\n successHandler: (resp) => {\n resolve(resp)\n },\n errorHandler: (err) => {\n reject(err)\n }\n })\n })\n },\n\n getPlaceDetails({ placeId }) {\n const tokyoHost = window.Agra.Configuration.tokyoUrlBase\n const encodedPlaceId = encodeURIComponent(placeId)\n\n const urlParams = new URLSearchParams({\n locale: htmlLang()\n })\n\n const url = `${tokyoHost}/maps/places/${encodedPlaceId}/details?${urlParams.toString()}`\n\n // Return a promise; callers should use it with .then to get the data\n return new Promise((resolve, reject) => {\n ajax.get({\n url,\n camelCaseResponse: false,\n successHandler: (resp) => {\n resolve(resp)\n },\n errorHandler: (err) => {\n reject(err)\n }\n })\n })\n }\n }\n\n service = MapsService\n}\n\nexport default service\n","// Iterates over Google Map API's result for geocoded place and returns the\n// value of the component with name matching the fields argument.\n// If multiple components match the fields, the value from the last one is returned.\n// Arguments:\n// components: google.maps.places.PlaceResult Google Map API object\n// fields: this can either be\n// - the name of a single component being searched\n// - an array with multiple possible component names. The value of the last component found that matches\n// any of the items in the array will be returned\n// longName: a boolean indicating if long_name or short_name of the component should be returned\nexport default function(components, fields, longName) {\n let componentValue = null\n\n components.forEach((component) => {\n component.types.forEach((componentType) => {\n let included = false\n\n if (Array.isArray(fields)) {\n included = fields.includes(componentType)\n } else {\n included = componentType === fields\n }\n\n if (included) {\n componentValue = longName ? component.long_name : component.short_name\n }\n })\n })\n\n return componentValue\n}\n","import extractGoogleMapAddressComponent from './extract-google-map-address-component'\n\nexport default function(obj, place, { keepExistingFieldValues = false, excludeVenue = false}) {\n const assignValue = (locationProperty, value, override) => {\n if (!keepExistingFieldValues || override) {\n obj[locationProperty] = value\n }\n }\n\n assignValue('query', place.formatted_address, true)\n assignValue('street_number', extractGoogleMapAddressComponent(place.address_components, 'street_number', true))\n assignValue('street', extractGoogleMapAddressComponent(place.address_components, 'route', true))\n assignValue('postal_code', extractGoogleMapAddressComponent(place.address_components, 'postal_code', true))\n assignValue('country', extractGoogleMapAddressComponent(place.address_components, 'country', false), !obj['country'])\n assignValue('locality', extractGoogleMapAddressComponent(place.address_components, ['locality', 'postal_town'], true))\n assignValue('region', extractGoogleMapAddressComponent(place.address_components, ['administrative_area_level_1', 'administrative_area_level_2'], false))\n\n assignValue('latitude', place.coordinates.latitude, true)\n assignValue('longitude', place.coordinates.longitude, true)\n\n if (!excludeVenue) {\n assignValue('venue', place.name)\n }\n\n return obj\n}\n","import assignLocationValues from '../helpers/assign-location-values'\nimport MapsService from '@/api/maps-service'\n\nexport default {\n data() {\n return {\n geocodeFinished: false,\n geocodeSucceeded: null\n }\n },\n\n computed: {\n commonLocationOptions() {\n let options = {}\n\n if (this.boundaryBox && this.boundaryBox.min_latitude && this.boundaryBox.max_latitude) {\n options.bounds = {south: this.boundaryBox.min_latitude,\n west: this.boundaryBox.min_longitude,\n north: this.boundaryBox.max_latitude,\n east: this.boundaryBox.max_longitude}\n }\n\n return options\n },\n\n geocoderOptions() {\n let options = this.commonLocationOptions\n\n // the geocoder only supports a single country\n if (this.country !== null && this.country !== '' && !Array.isArray(this.country)) {\n options.country = this.country\n }\n\n return options\n },\n\n autocompleteOptions() {\n let options = this.commonLocationOptions\n\n // the autocomplete component supports an array of countries\n if (this.country !== null && this.country !== '') {\n options.countries = Array.isArray(this.country) ? this.country : [this.country]\n }\n\n return options\n },\n\n showValidationError() {\n return this.geocodeFinished && !this.geocodeSucceeded\n }\n },\n\n methods: {\n geocodeLocation(postGeocode) {\n // start with the options we always pass to the geocoder\n const geocoderRequest = Object.assign({}, this.geocoderOptions)\n\n // set the address to be whatever the user typed in the field.\n geocoderRequest['address'] = this.currentQuery\n\n MapsService.geocode(geocoderRequest).then((results) => {\n if (results.length > 0) {\n this.geocodeSucceeded = true\n this.location = assignLocationValues(this.location, results[0], {keepExistingFieldValues: false, excludeVenue: this.excludeVenueField})\n\n // If we're using the venue field, use user's query as venue if it's not returned by Google Maps API\n if (!this.excludeVenueField && (!this.location.venue || this.location.venue === '')) {\n this.location.venue = this.currentQuery\n } else {\n this.currentQuery = this.location.query\n }\n } else {\n this.geocodeSucceeded = false\n }\n\n this.geocodeFinished = true\n\n postGeocode()\n })\n },\n\n autocompletePlaceChanged(place) {\n if ('coordinates' in place) {\n this.location = assignLocationValues({}, place, {keepExistingFieldValues: false, excludeVenue: this.excludeVenueField})\n this.changeAttribute() // Components including the mixin must implement this method\n }\n }\n }\n}\n","<template>\n <div class=\"autocomplete-wrapper\">\n <input v-bind=\"$attrs\" ref=\"autocomplete\" autocomplete=\"off\" :value=\"query\" type=\"text\"\n :placeholder=\"inputPlaceholder\"\n @keydown=\"onKeyDown\" @blur=\"onBlur\" @focus=\"onFocus\" @input=\"onInput\">\n <ul v-if=\"displayOptions\" class=\"autocomplete-options\">\n <!-- Q: Why are we watching both @mousedown and @click on this element? Isn't @click enough?\n A: In some cases, as soon as mousedown occurs, the input \"blur\" fires and removes the <li>\n before the mouseup/click fires. This used to cause bugs where the selected option\n would not be used. Watching @mousedown fixes this issue. We continue to watch @click\n as well just in case @mousedown is not fired in some touchscreen contexts.\n In testing, triggering selectedOption on both events did not cause problems. -->\n <li v-for=\"autocompleteOption in autocompleteOptions\" :key=\"autocompleteOption.placeId\"\n :class=\"['autocomplete-option', {selected: optionIsFocused(autocompleteOption)}]\"\n @mousedown=\"selectedOption(autocompleteOption)\" @click=\"selectedOption(autocompleteOption)\">\n <span class=\"main-matching-term\">{{ autocompleteOption.mainMatchingTerm }}</span>\n <span class=\"secondary-matching-terms\">{{ autocompleteOption.secondaryMatchingTerm }}</span>\n </li>\n\n <li class=\"autocomplete-option-attribution\">\n <img src=\"../../images/powered_by_google_on_white_hdpi.png\">\n </li>\n </ul>\n </div>\n</template>\n\n<script>\nimport debounce from 'lodash/debounce'\nimport { inject, nextTick } from 'vue'\nimport MapsService from '@/api/maps-service'\n\nexport default {\n // Avoid automatically inheriting the parent's attributes so they're only set explicitly\n // to the autocomplete input via v-bind.\n inheritAttrs: false,\n\n props: {\n allowEnterManuallyOption: {\n type: Boolean,\n required: false,\n default: false\n },\n\n inputPlaceholder: {\n type: String,\n required: false,\n default() {\n return inject('i18n').t('components.custom_gmap_autocomplete.enter_a_location')\n }\n },\n\n options: {\n type: Object,\n required: false,\n default: () => ({})\n },\n\n selectFirstOnEnter: {\n type: Boolean,\n default: true\n },\n\n value: {\n type: String,\n required: false\n }\n },\n\n emits: ['blur', 'enter-manually-selected', 'focus', 'input', 'place-changed'],\n\n data() {\n return {\n autocompleteOptions: [],\n autofocusing: false,\n query: this.value,\n focusedOption: null\n }\n },\n\n computed: {\n displayOptions() {\n return this.autocompleteOptions.length > 0\n },\n\n enterManuallyMainTerm() {\n return this.i18n.t('components.custom_gmap_autocomplete.enter_manually_option_main_text', { user_query: this.query })\n }\n },\n\n methods: {\n clearAutocompleteOptions() {\n this.focusedOption = null\n this.autocompleteOptions = []\n },\n\n clearQuery() {\n this.query = null\n },\n\n focus() {\n this.autofocusing = true\n this.$refs.autocomplete.focus()\n\n nextTick(() => {\n this.autofocusing = false\n })\n },\n\n focusNextOption() {\n if (this.autocompleteOptions.length === 0) return\n\n if (!this.focusedOption) {\n this.focusedOption = this.autocompleteOptions[0]\n return\n }\n\n const focusedOptionIndex = this.autocompleteOptions.indexOf(this.focusedOption)\n if (focusedOptionIndex === this.autocompleteOptions.length - 1) {\n this.focusedOption = null\n } else {\n this.focusedOption = this.autocompleteOptions[focusedOptionIndex + 1]\n }\n },\n\n focusPreviousOption() {\n if (this.autocompleteOptions.length === 0) return\n\n if (!this.focusedOption) {\n this.focusedOption = this.autocompleteOptions[this.autocompleteOptions.length - 1]\n return\n }\n\n const focusedOptionIndex = this.autocompleteOptions.indexOf(this.focusedOption)\n if (focusedOptionIndex === this.autocompleteOptions[0]) {\n this.focusedOption = null\n } else {\n this.focusedOption = this.autocompleteOptions[focusedOptionIndex - 1]\n }\n },\n\n lookUpPlaces() {\n if (this.query.length === 0) {\n // Input is empty. Clear the suggestion list and don't bother making an API call.\n this.clearAutocompleteOptions()\n } else {\n // Make an API call to get suggestions\n const getPlacePredictionOptions = {\n input: this.query,\n ...this.options\n }\n\n const predictionsForQuery = this.query\n MapsService.autocomplete(getPlacePredictionOptions).then((predictions) => {\n // Ignore the predictions response if the query that was used is different from the current. This can happen\n // when the API response comes in a different order than the requests, most likely during scenarios run when\n // there are multiple requests made in rapid succession.\n if (this.query !== predictionsForQuery) {\n return\n }\n\n this.autocompleteOptions = predictions.map((prediction) => {\n return {\n description: prediction.description,\n mainMatchingTerm: prediction.terms[0].value,\n secondaryMatchingTerm: this.secondaryMatchingTermsForDisplay(prediction.terms),\n placeId: prediction.place_id\n }\n })\n\n if (this.allowEnterManuallyOption) {\n this.autocompleteOptions.push({\n isManualInput: true,\n mainMatchingTerm: this.enterManuallyMainTerm,\n secondaryMatchingTerm: this.i18n.t('components.custom_gmap_autocomplete.enter_manually_option_subtitle')\n })\n }\n })\n }\n },\n\n onBlur(payload) {\n // The `blur` event is sent before the `click` event on the option. So if we removed from the DOM the\n // autocomplete option element, the click would never be sent. At the same time, the input can lose focus\n // in different ways, but the only one that we care is the click on one of the autocomplete options.\n // For this reason, we insert a small delay before closing the autocomplete options, allowing the\n // `click` event to be send.\n setTimeout(() => {\n this.clearAutocompleteOptions()\n }, 500)\n\n this.$emit('blur', payload)\n },\n\n onFocus(payload) {\n if (!this.autofocusing) {\n if (this.query) {\n this.lookUpPlaces()\n }\n\n this.$emit('focus', payload)\n }\n },\n\n onInput(e) {\n this.query = e.target.value\n this.$emit('input', this.query)\n\n this.debouncedLookUpPlaces()\n },\n\n debouncedLookUpPlaces: debounce(function() { this.lookUpPlaces() }, 200),\n\n onKeyDown(e) {\n const SPECIAL_KEYS = ['ArrowDown', 'ArrowUp', 'Enter']\n\n if (!SPECIAL_KEYS.includes(e.code)) return\n\n switch (e.code) {\n case 'ArrowDown':\n e.preventDefault()\n this.focusNextOption()\n break\n\n case 'ArrowUp':\n e.preventDefault()\n this.focusPreviousOption()\n break\n\n case 'Enter':\n if (this.focusedOption) {\n e.preventDefault()\n this.selectedOption(this.focusedOption)\n } else if (this.selectFirstOnEnter && this.autocompleteOptions.length > 0) {\n e.preventDefault()\n this.selectedOption(this.autocompleteOptions[0])\n }\n break\n }\n },\n\n optionIsFocused(autocompleteOption) {\n return this.focusedOption && autocompleteOption.placeId === this.focusedOption.placeId\n },\n\n secondaryMatchingTermsForDisplay(terms) {\n return terms.slice(1).map((term) => term.value ).join(', ')\n },\n\n selectedEnterManuallyOption() {\n this.$emit('enter-manually-selected', this.query)\n },\n\n selectedOption(option) {\n if (option.isManualInput) {\n this.selectedEnterManuallyOption()\n return\n }\n\n MapsService.getPlaceDetails({ placeId: option.placeId }).then((result) => {\n this.$emit('place-changed', result)\n })\n\n this.query = option.description\n this.clearAutocompleteOptions()\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@use \"~friendship_styles/colors\" as colors;\n\n .autocomplete-wrapper {\n position: relative;\n }\n\n .autocomplete-options {\n list-style: none;\n border: solid 1px colors.$separator-gray;\n border-radius: 6px;\n box-shadow: 0 2px 7px 0 rgba(0, 0, 0, 0.15);\n padding: 0;\n\n position: absolute;\n z-index: 1000;\n background-color: white;\n width: 100%;\n }\n\n .autocomplete-option {\n border-bottom: solid 1px colors.$separator-gray;\n padding: {\n left: 20px;\n top: 14px;\n bottom: 16px;\n }\n\n &:hover, &.selected {\n background-color: #f7f7f7;\n }\n\n .main-matching-term, .secondary-matching-terms {\n display: block;\n }\n\n .main-matching-term {\n font-size: 16px;\n font-weight: normal;\n }\n\n .secondary-matching-terms {\n font-size: 14px;\n color: #666666;\n }\n }\n\n .autocomplete-option-attribution {\n text-align: right;\n padding: 10px 20px 10px 20px;\n\n img {\n height: 18px;\n }\n }\n</style>\n","import { render } from \"./custom-gmap-autocomplete.vue?vue&type=template&id=1517509f&scoped=true\"\nimport script from \"./custom-gmap-autocomplete.vue?vue&type=script&lang=js\"\nexport * from \"./custom-gmap-autocomplete.vue?vue&type=script&lang=js\"\n\nimport \"./custom-gmap-autocomplete.vue?vue&type=style&index=0&id=1517509f&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-1517509f\"]])\n\nexport default __exports__","<template>\n <div>\n <input v-for=\"locationField in locationFields\" :key=\"locationField\" :value=\"location[locationField]\" type=\"hidden\" :name=\"getFullFieldName(locationField)\">\n </div>\n</template>\n\n<script>\nimport difference from 'lodash/difference'\n\nexport default {\n props: {\n location: {\n type: Object,\n required: false\n },\n fieldGroupName: {\n type: String,\n required: false,\n default: 'location'\n }\n },\n\n computed: {\n locationFields() {\n return this.filteredLocationFields(this.location)\n }\n },\n\n methods: {\n getFullFieldName(name) {\n return `${this.fieldGroupName}[${name}]`\n },\n\n filteredLocationFields(location) {\n if (!location) {\n return []\n }\n\n const excludedFields = ['extra_location_info', 'boundary_box', 'errors']\n return difference(Object.keys(location), excludedFields)\n }\n }\n}\n\n</script>\n","import { render } from \"./hidden-fields.vue?vue&type=template&id=69464e85\"\nimport script from \"./hidden-fields.vue?vue&type=script&lang=js\"\nexport * from \"./hidden-fields.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","<template>\n <div>\n <label v-if=\"label\" class=\"col-form-label\">\n {{ label }}\n </label>\n\n <div class=\"form-check d-flex align-items-baseline\">\n <div class=\"radio-input-wrapper\">\n <input id=\"radio-national\" ref=\"radioNational\" v-model=\"locationKind\" type=\"radio\" class=\"form-check-input\"\n :name=\"locationKindFieldName\" value=\"national\" @change=\"locationKindChanged\">\n </div>\n <label class=\"form-check-label\" for=\"radio-national\">\n <div class=\"form-check-content\">\n {{ nationalOptionLabel }}\n </div>\n <p v-if=\"nationalOptionHint\" class=\"form-check-content text-muted mb-0\">\n {{ nationalOptionHint }}\n </p>\n </label>\n </div>\n <div class=\"form-check d-flex align-items-baseline\">\n <div class=\"radio-input-wrapper\">\n <input id=\"radio-local\" v-model=\"locationKind\" type=\"radio\" class=\"form-check-input\"\n :name=\"locationKindFieldName\" value=\"local\" @change=\"locationKindChanged\">\n </div>\n <label class=\"local-option form-check-label flex-grow-1\" for=\"radio-local\">\n <div class=\"form-check-content\">\n <div v-if=\"showLocalOptionLabel\">\n {{ localOptionLabel }}\n </div>\n <p v-if=\"localOptionHint\" class=\"text-muted\">\n {{ localOptionHint }}\n </p>\n <template v-if=\"showLocationField\">\n <custom-gmap-autocomplete id=\"location-query-field\"\n ref=\"gmapAutocomplete\"\n :value=\"locationQuery\"\n :select-first-on-enter=\"true\"\n :class=\"gmapAutocompleteClasses\"\n :options=\"autocompleteOptions\"\n name=\"query\"\n @blur=\"locationQueryBlurred\"\n @focus=\"setLocal\"\n @input=\"updateQuery\"\n @place-changed=\"handleAutocompletePlaceChanged\" />\n <validation-errors v-if=\"hasValidationError\" :errors=\"validationErrorsForDisplay\" />\n </template>\n </div>\n </label>\n </div>\n\n <hidden-fields :field-group-name=\"name\" :location=\"location\" />\n </div>\n</template>\n\n<script>\nimport CustomGmapAutocomplete from './custom-gmap-autocomplete'\nimport GeocodeLocation from '../../mixins/geocode-location'\nimport HiddenFields from './locations/hidden-fields'\nimport { inject } from 'vue'\nimport isPresent from '../../helpers/is-present'\nimport ValidationErrors from './validation-errors'\n\nexport default {\n components: { CustomGmapAutocomplete, HiddenFields, ValidationErrors },\n\n mixins: [ GeocodeLocation ],\n\n props: {\n value: {\n type: Object,\n required: false\n },\n validationErrors: {\n type: [Object, Array],\n required: false,\n default: () => ({})\n },\n label: {\n type: String,\n required: false\n },\n locationKindFieldName: {\n type: String,\n required: false,\n default: 'location_kind'\n },\n nationalOptionHint: {\n type: String,\n required: false\n },\n nationalOptionLabel: {\n type: String,\n required: false,\n default() { return inject('i18n').t('member.petitions.national_campaign') }\n },\n localOptionHint: {\n type: String,\n required: false\n },\n localOptionLabel: {\n type: String,\n required: false,\n default: null\n },\n name: {\n type: String,\n required: false,\n default: 'location'\n }\n },\n\n emits: ['changed', 'location-kind-changed'],\n\n data() {\n return {\n // Used for serialization of geocoding when there is one from input being blurred and one from clicking autocomplete option\n blurGeocodingPromise: null,\n\n // Used by the GeocodeLocation mixin, setting to true avoids including the venue field in the location object\n excludeVenueField: true,\n\n locationKind: this.value === null ? 'national' : 'local',\n location: Object.assign({}, this.value), // Clone object received as prop to avoid updating from this child component\n currentQuery: null,\n showLocalOptionLabel: this.localOptionLabel && this.localOptionLabel.length\n }\n },\n\n computed: {\n boundaryBox() {\n return this.agraConfiguration.locationSearchBias.boundaryBox\n },\n\n country() {\n return this.agraConfiguration.organisationCountry\n },\n\n gmapAutocompleteClasses() {\n let attr = 'form-control query-input'\n if (this.hasValidationError) {\n attr = `${attr} is-invalid`\n }\n if (this.showLocalOptionLabel) {\n attr = `${attr} mt-4`\n }\n return attr\n },\n\n hasValidationError() {\n return this.validationErrors &&\n ((Array.isArray(this.validationErrors) && this.validationErrors.length > 0) ||\n (this.validationErrors.query && this.validationErrors.query.length > 0))\n },\n\n locationQuery() {\n // If there is a location loaded already, for eg from inititalLocation use its query. Otherwise, use\n // whatever the user has typed into the field\n if (this.currentQuery) {\n return this.currentQuery\n } else if (this.location && this.location.query ) {\n return this.location.query\n } else {\n return ''\n }\n },\n\n showLocationField() {\n return (this.locationKind === 'local') || !this.showLocalOptionLabel\n },\n\n validationErrorsForDisplay() {\n if (Array.isArray(this.validationErrors)) {\n return this.validationErrors\n } else {\n return this.validationErrors.query\n }\n }\n },\n\n methods: {\n changeAttribute() {\n this.updateQuery(this.location.query, true)\n this.$emit('changed', this.location)\n },\n\n focus() {\n if (this.locationKind === 'national') {\n this.$refs.radioNational.focus()\n } else {\n this.$refs.gmapAutocomplete.focus()\n }\n },\n\n handleAutocompletePlaceChanged: async function(place) {\n if (this.blurGeocodingPromise) {\n await this.blurGeocodingPromise\n this.blurGeocodingPromise = null\n }\n this.autocompletePlaceChanged(place)\n },\n\n locationKindChanged() {\n if (this.locationKind === 'national') {\n this.resetLocation()\n }\n\n this.$emit('location-kind-changed', this.locationKind)\n },\n\n locationQueryBlurred() {\n // Automatically geocode the location if the user entered something on the query input but\n // didn't select an option from the autocomplete results\n if (isPresent(this.currentQuery) && (!this.location || !this.location.latitude)) {\n this.blurGeocodingPromise = new Promise((resolve) => {\n this.geocodeLocation(() => {\n if (this.geocodeSucceeded) {\n this.$emit('changed', this.location)\n }\n resolve(true)\n })\n })\n }\n\n },\n\n setLocal() {\n this.locationKind = 'local'\n this.$emit('location-kind-changed', this.locationKind)\n },\n\n setNational() {\n this.locationKind = 'national'\n this.currentQuery = null\n this.resetLocation()\n this.$emit('location-kind-changed', this.locationKind)\n },\n\n updateQuery(newQuery, skipLocationReset) {\n if (!skipLocationReset) {\n // Reset the location to ensure the location is geocoded again on blur.\n // We explicitly skip the reset when setting the query after the user\n // chose an option from the Autocomplete results\n this.resetLocation()\n }\n\n this.currentQuery = newQuery\n },\n\n resetLocation() {\n this.location.query = null\n this.location.street_number = null\n this.location.street = null\n this.location.postal_code = null\n this.location.country = null\n this.location.locality = null\n this.location.region = null\n this.location.latitude = null\n this.location.longitude = null\n\n this.$emit('changed', null)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.form-check {\n margin-bottom: 1rem;\n}\n</style>\n","import { render } from \"./national-local-location-selector.vue?vue&type=template&id=3d54a3a4&scoped=true\"\nimport script from \"./national-local-location-selector.vue?vue&type=script&lang=js\"\nexport * from \"./national-local-location-selector.vue?vue&type=script&lang=js\"\n\nimport \"./national-local-location-selector.vue?vue&type=style&index=0&id=3d54a3a4&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-3d54a3a4\"]])\n\nexport default __exports__"],"names":["service","window","Agra","Configuration","stubGoogleMaps","stubbedService","loadStubbedService","module","importWithRetry","this","default","autocomplete","params","then","geocode","findPlace","getPlaceDetails","input","bounds","countries","tokyoHost","tokyoUrlBase","center","locationSearchBias","url","URLSearchParams","query","JSON","stringify","locale","htmlLang","toString","Promise","resolve","reject","ajax","get","camelCaseResponse","successHandler","resp","errorHandler","err","address","country","placeId","encodeURIComponent","components","fields","longName","componentValue","forEach","component","types","componentType","included","Array","isArray","includes","long_name","short_name","obj","place","keepExistingFieldValues","excludeVenue","assignValue","locationProperty","value","override","formatted_address","extractGoogleMapAddressComponent","address_components","coordinates","latitude","longitude","name","data","geocodeFinished","geocodeSucceeded","computed","commonLocationOptions","options","boundaryBox","min_latitude","max_latitude","south","west","min_longitude","north","east","max_longitude","geocoderOptions","autocompleteOptions","showValidationError","methods","geocodeLocation","postGeocode","geocoderRequest","Object","assign","currentQuery","MapsService","results","length","location","assignLocationValues","excludeVenueField","venue","autocompletePlaceChanged","changeAttribute","class","key","inheritAttrs","props","allowEnterManuallyOption","type","Boolean","required","inputPlaceholder","String","inject","t","selectFirstOnEnter","emits","autofocusing","focusedOption","displayOptions","enterManuallyMainTerm","i18n","user_query","clearAutocompleteOptions","clearQuery","focus","$refs","nextTick","focusNextOption","focusedOptionIndex","indexOf","focusPreviousOption","lookUpPlaces","getPlacePredictionOptions","predictionsForQuery","predictions","map","prediction","description","mainMatchingTerm","terms","secondaryMatchingTerm","secondaryMatchingTermsForDisplay","place_id","push","isManualInput","onBlur","payload","setTimeout","$emit","onFocus","onInput","e","target","debouncedLookUpPlaces","debounce","onKeyDown","code","preventDefault","selectedOption","optionIsFocused","autocompleteOption","slice","term","join","selectedEnterManuallyOption","option","result","_createElementBlock","_hoisted_1","_createElementVNode","_mergeProps","_ctx","$attrs","ref","$data","placeholder","$props","onKeydown","_cache","args","$options","_hoisted_2","_createTextVNode","_hoisted_3","_Fragment","_renderList","_normalizeClass","selected","onMousedown","$event","onClick","_hoisted_5","_toDisplayString","_hoisted_6","_hoisted_4","src","_imports_0","_createCommentVNode","fieldGroupName","locationFields","filteredLocationFields","getFullFieldName","difference","keys","locationField","for","CustomGmapAutocomplete","HiddenFields","ValidationErrors","mixins","GeocodeLocation","validationErrors","label","locationKindFieldName","nationalOptionHint","nationalOptionLabel","localOptionHint","localOptionLabel","blurGeocodingPromise","locationKind","showLocalOptionLabel","agraConfiguration","organisationCountry","gmapAutocompleteClasses","attr","hasValidationError","locationQuery","showLocationField","validationErrorsForDisplay","updateQuery","radioNational","gmapAutocomplete","handleAutocompletePlaceChanged","async","locationKindChanged","resetLocation","locationQueryBlurred","isPresent","setLocal","setNational","newQuery","skipLocationReset","street_number","street","postal_code","locality","region","id","onChange","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_createVNode","_component_custom_gmap_autocomplete","onPlaceChanged","_createBlock","_component_validation_errors","errors","_component_hidden_fields"],"sourceRoot":""}