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zB,EAAA1B,QAAA0B,EAAA1B,UAAAmD,IAAM,iBAC/CvB,EAAAA,EAAAA,IAMM,MANNmB,EAMM,WALJnB,EAAAA,EAAAA,IACsC,SAD9BwB,GAAI1B,EAAAf,QAHlB,sBAAAsC,EAAA,KAAAA,EAAA,GAAAI,GAGoC3B,EAAAzB,MAAKoD,GAAE5E,KAAK,OAAO2C,OAHvDkC,EAAAA,EAAAA,IAAA,CAG6D,eAAc,EAAW5B,EAAAlB,aAAY,KAAQf,KAAK,QACjG8D,YAAa7B,EAAAd,iBAAAA,KAAAA,GAJ3BiB,GAAA,OAGoCH,EAAAzB,SAAK,aAHzC6B,EAAAA,EAAAA,QAKMF,EAAAA,EAAAA,IAEM,aADJ4B,EAAAA,EAAAA,IAA6B9B,EAAA+B,OAAA,wBAAA5D,GAAA,cCCuC,CAAC,YAAY,oB","sources":["webpack://agra/./app/javascript/location-search/geoip-country-mixin.js","webpack://agra/./app/javascript/location-search/location-search-mixin.js","webpack://agra/./app/javascript/location-search/search-bar-mixin.js","webpack://agra/./node_modules/vue-loader/dist/exportHelper.js","webpack://agra/./app/javascript/components/inputs/locations/location-search.vue","webpack://agra/./app/javascript/components/inputs/locations/location-search.vue?a578","webpack://agra/./app/javascript/local/search-bar.vue","webpack://agra/./app/javascript/local/search-bar.vue?ac78"],"sourcesContent":["export default {\n computed: {\n geoipEnabled() {\n return !!this.geoipHostname\n },\n\n geoipHostname() {\n return this.agraConfiguration.geoipHostname\n }\n },\n\n created() {\n // Kick off the geoip call that will set agraConfiguration.locationSearchBias.country, which\n // we'll want to pass along with location search requests.\n // Q: What happens if this isn't done by the time the user makes a search request?\n // A: That's fine, it's not a big deal, their search just won't have the country biasing on it.\n if (this.geoipEnabled) {\n this.setLocationSearchBiasCountryFromGeoip()\n }\n },\n\n methods: {\n fetchGeoipInformation() {\n return new Promise((resolve) => {\n // Q: Why not use our ajax helper?\n // A: It runs into a CORS issue trying to make this external request\n fetch(`https://${this.geoipHostname}/geoip`).then((resp) => {\n resp.json().then((jsonResponse) => {\n resolve(jsonResponse)\n })\n })\n })\n },\n\n setLocationSearchBiasCountryFromGeoip() {\n if (!this.agraConfiguration.locationSearchBias.country) {\n this.fetchGeoipInformation().then((jsonResponse) => {\n const countryCode = jsonResponse.country_code.toUpperCase()\n this.agraConfiguration.locationSearchBias.country = countryCode\n })\n }\n }\n }\n}\n","import GeoipCountryMixin from '@/location-search/geoip-country-mixin'\nimport { nextTick } from 'vue'\n\nexport const locationSearchMixin = {\n mixins: [ GeoipCountryMixin ],\n\n props: {\n customPlaceholderText: {\n type: String,\n required: false\n },\n customSearchButtonText: {\n type: String,\n required: false\n },\n distanceHint: {\n type: String,\n required: false,\n default: ''\n },\n extraParameters: {\n type: Object,\n required: false,\n default: () => ({})\n },\n initialLocationQuery: {\n type: String,\n required: false,\n default: ''\n },\n lookupUrl: {\n type: String,\n required: true\n }\n },\n\n data() {\n return {\n searchQuery: this.initialLocationQuery\n }\n },\n\n computed: {\n extraParameterPairs() {\n return Object.entries(this.extraParameters).map(e => ({name: e[0], value: e[1]}))\n },\n\n searchBiasCountry() {\n return this.agraConfiguration.locationSearchBias.country\n },\n\n searchButtonText() {\n if (this.customSearchButtonText !== undefined) {\n return this.customSearchButtonText\n } else {\n return this.i18n.t('buttons.lookup')\n }\n }\n },\n\n methods: {\n search(query) {\n this.searchQuery = query\n nextTick(() => {\n this.$refs.form.submit()\n })\n }\n }\n}\n","export const searchBarMixin = {\n props: {\n initialQuery: {\n type: String,\n default: ''\n },\n inputClass: {\n type: String,\n default: ''\n },\n customPlaceholderText: {\n type: String,\n required: false\n },\n variant: {\n type: String,\n default: 'inputGroup'\n }\n },\n\n emits: ['search'],\n\n data() {\n return {\n inputId: 'location-search-query-input',\n query: this.initialQuery\n }\n },\n\n computed: {\n placeholderText() {\n if (this.customPlaceholderText !== undefined) {\n return this.customPlaceholderText\n } else {\n return this.i18n.t('public.local_search.search_label')\n }\n }\n },\n\n methods: {\n search() {\n this.$emit('search', this.query)\n }\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// runtime helper for setting properties on components\n// in a tree-shakable way\nexports.default = (sfc, props) => {\n const target = sfc.__vccOpts || sfc;\n for (const [key, val] of props) {\n target[key] = val;\n }\n return target;\n};\n","<template>\n <form ref=\"form\" :action=\"lookupUrl\" method=\"GET\">\n <input type=\"hidden\" name=\"location_query\" :value=\"searchQuery\">\n <input v-for=\"extraParam in extraParameterPairs\" :key=\"extraParam.name\" type=\"hidden\" :name=\"extraParam.name\" :value=\"extraParam.value\">\n <input v-if=\"searchBiasCountry\" type=\"hidden\" name=\"user_country\" :value=\"searchBiasCountry\">\n <search-bar :initial-query=\"initialLocationQuery\" :custom-placeholder-text=\"customPlaceholderText\" @search=\"search\">\n <template #search-button>\n <button type=\"submit\" class=\"btn btn-lg btn-dark search-button\" :title=\"searchButtonText\">\n {{ searchButtonText }}\n </button>\n </template>\n </search-bar>\n <div v-if=\"distanceHint\" class=\"text-start mt-1\">\n <span class=\"small-text\">\n {{ distanceHint }}\n </span>\n </div>\n </form>\n</template>\n\n<script>\nimport SearchBar from '@/local/search-bar'\nimport { locationSearchMixin } from '@/location-search/location-search-mixin'\n\nexport default {\n components: { SearchBar },\n\n mixins: [ locationSearchMixin ]\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.search-button {\n border-radius: 0 4px 4px 0;\n}\n</style>\n","import { render } from \"./location-search.vue?vue&type=template&id=3af2ee0f&scoped=true\"\nimport script from \"./location-search.vue?vue&type=script&lang=js\"\nexport * from \"./location-search.vue?vue&type=script&lang=js\"\n\nimport \"./location-search.vue?vue&type=style&index=0&id=3af2ee0f&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-3af2ee0f\"]])\n\nexport default __exports__","<template>\n <form class=\"search-form\" @submit.prevent=\"search\">\n <div class=\"input-group\">\n <input :id=\"inputId\" v-model=\"query\" type=\"text\" class=\"form-control\" :class=\"{[inputClass]: true}\" name=\"query\"\n :placeholder=\"placeholderText\">\n <div>\n <slot name=\"search-button\" />\n </div>\n </div>\n </form>\n</template>\n\n<script>\nimport { searchBarMixin } from '../location-search/search-bar-mixin'\nexport default {\n mixins: [ searchBarMixin ]\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.search-form {\n background-color: transparent;\n}\n\n.input-group {\n display: flex;\n width: 100%;\n\n input {\n flex: 1;\n }\n\n .form-control, ::v-deep(.btn) {\n height: 50px;\n z-index: unset;\n }\n}\n</style>\n","import { render } from \"./search-bar.vue?vue&type=template&id=33abc7c2&scoped=true\"\nimport script from \"./search-bar.vue?vue&type=script&lang=js\"\nexport * from \"./search-bar.vue?vue&type=script&lang=js\"\n\nimport \"./search-bar.vue?vue&type=style&index=0&id=33abc7c2&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-33abc7c2\"]])\n\nexport default __exports__"],"names":["computed","geoipEnabled","this","geoipHostname","agraConfiguration","created","setLocationSearchBiasCountryFromGeoip","methods","fetchGeoipInformation","Promise","resolve","fetch","then","resp","json","jsonResponse","locationSearchBias","country","countryCode","country_code","toUpperCase","locationSearchMixin","mixins","GeoipCountryMixin","props","customPlaceholderText","type","String","required","customSearchButtonText","distanceHint","default","extraParameters","Object","initialLocationQuery","lookupUrl","data","searchQuery","extraParameterPairs","entries","map","e","name","value","searchBiasCountry","searchButtonText","undefined","i18n","t","search","query","nextTick","$refs","form","submit","searchBarMixin","initialQuery","inputClass","variant","emits","inputId","placeholderText","$emit","exports","sfc","target","__vccOpts","key","val","class","components","SearchBar","_createElementBlock","ref","action","_ctx","method","_createElementVNode","_hoisted_2","_createTextVNode","_Fragment","_renderList","extraParam","_hoisted_3","_hoisted_4","_createCommentVNode","_createVNode","_component_search_bar","onSearch","_withCtx","title","_hoisted_5","_","_hoisted_6","_hoisted_7","_toDisplayString","_hoisted_1","onSubmit","_cache","_withModifiers","args","id","$event","_normalizeClass","placeholder","_renderSlot","$slots"],"sourceRoot":""}