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EAAM,GAAGiB,OAAO+J,SAASuG,WAAWpR,EAAAA,EAAgBC,4BAA4BL,KAKhFyR,EAAe,CAACC,WAAY,CAAC,GAE/BH,EACFI,QAAQJ,aAAaE,EAAc,KAAMxR,GAEzC0R,QAAQC,UAAUH,EAAc,KAAMxR,EAE1C,GAGF","sources":["webpack://agra/./app/javascript/local/api/local-points.js","webpack://agra/./app/javascript/local/store/helpers.js","webpack://agra/./app/javascript/local/store/actions.js","webpack://agra/./app/javascript/local/store/mutations.js","webpack://agra/./app/javascript/local/store/getters.js","webpack://agra/./app/javascript/local/store/state.js","webpack://agra/./app/javascript/local/store/index.js","webpack://agra/./app/javascript/local/url-keys.js","webpack://agra/./app/javascript/helpers/filter-url.js","webpack://agra/./app/javascript/local/filter-keys.js","webpack://agra/./node_modules/url-search-params-polyfill/index.js","webpack://agra/./app/javascript/api/routing.js"],"sourcesContent":["import filterUrlHelper from '../../helpers/filter-url'\nimport ajax from '../../helpers/ajax'\nimport i18n from '../../phoenix/translations'\n\nconst LocalPointsService = {\n listPoints({options}) {\n const url = `${this.listPointsPath()}${filterUrlHelper.currentStateUrlParamsString(options)}`\n\n return new Promise((resolve, reject) => {\n ajax.get({\n url,\n successHandler: (response) => {\n resolve(response)\n },\n errorHandler: (err) => {\n reject(err)\n }\n })\n })\n },\n\n listPointsPath() {\n return '/api/local/points.json'\n },\n\n listDetailedLocations({options}) {\n const url = `${this.listDetailedLocationsPath()}${filterUrlHelper.currentStateUrlParamsString(options)}`\n\n const params = {}\n if (window.Agra.Configuration.locationSearchBias.country) {\n params.user_country = window.Agra.Configuration.locationSearchBias.country\n }\n\n return new Promise((resolve, reject) => {\n ajax.get({\n url,\n params,\n headers: {\n 'Accept-Language': i18n.locale()\n },\n successHandler: (response) => {\n resolve(response)\n },\n errorHandler: (err) => {\n reject(err)\n }\n })\n })\n },\n\n listDetailedLocationsPath() {\n return '/api/local.json'\n },\n\n getLocationDetails({locations}) {\n return new Promise((resolve, reject) => {\n ajax.post({\n url: this.locationItemsPath(),\n data: {\n identifiers: locations\n },\n successHandler: (response) => {\n resolve(response)\n },\n errorHandler: (err) => {\n reject(err)\n }\n })\n })\n },\n\n locationItemsPath() {\n return '/api/local/items'\n }\n}\n\nexport default LocalPointsService\n","// Transform our filter and pagination state into the format expected by filterUrlHelper\n\n// Filters for the URL of a data request by the page,\n// which includes the filters explicitly included in the page URL but\n// also those not in the page URL that should be included in the data request URLs.\nfunction dataUrlFilterOptions(state) {\n const defaultFilters = {}\n // Check existing filters on the page, add default filters if page filter isn't present for the filter key\n const filterKeys = state.filters.map(f => f.type)\n const filtersToAdd = Object.entries(defaultFilters).filter(([k]) => !filterKeys.includes(k)).map(([k, v]) => ({\n type: k,\n value: v\n }))\n return {\n filters: [...state.filters, ...filtersToAdd],\n pagination: {currentPage: state.pagination.page},\n otherSearchParams: {\n search_strategy: state.searchStrategy\n }\n }\n}\n\n// Filters for the URL of the `points` data requested by the page. We never filter this by the searched-for location\n// so users are able to pan the map. We do filter it to see different types of objects or by other properties of the events.\nfunction pointsUrlOptions(state) {\n return {\n filters: state.filters.filter(f => f.type!=='location')\n }\n}\n\nexport { pointsUrlOptions, dataUrlFilterOptions }\n","import LocalPointsService from '../api/local-points'\nimport RoutingService from '../../api/routing'\nimport {\n FILTER_KEY_EVENT_TYPES,\n FILTER_KEY_INCLUDE_VIRTUAL,\n FILTER_KEY_LABELS,\n FILTER_KEY_LOCATION,\n FILTER_KEY_REGIONS,\n FILTER_KEY_START_DATE_RANGE,\n FILTER_KEY_TYPES,\n FILTER_KEY_UPCOMING_ONLY,\n FILTER_KEY_PARTNERSHIP\n} from '../filter-keys'\nimport {dataUrlFilterOptions, pointsUrlOptions} from './helpers'\n\nexport default {\n getPoints({commit, state}) {\n LocalPointsService.listPoints({\n options: pointsUrlOptions(state)\n }).then(points => {\n const pointsWithKey = points.map(point => {\n point.key = `${point.type}${point.id}`\n return point\n })\n commit('setPoints', pointsWithKey)\n\n if (!this.state.pointsInitiallyLoaded) {\n commit('setPointsInitiallyLoaded')\n }\n })\n\n },\n\n getDetailedLocations({commit, state, getters}) {\n commit('setIsLoadingList', true)\n LocalPointsService.listDetailedLocations({\n options: dataUrlFilterOptions(state)\n }).then(resp => {\n commit('setDetailedLocations', resp.data)\n commit('setPaginationCounts', resp.meta)\n commit('setSearchedLocation', resp.meta.filter.searchedLocation)\n\n // If the current page is now beyond the total number of pages of results,\n // go back to page 1, replacing the current URL to avoid back-button weirdness.\n if (state.pagination.totalPages < state.pagination.page) {\n commit('setPage', 1)\n RoutingService.addHistoryItem(getters.pageUrlFilterOptions, true)\n this.dispatch('getDetailedLocations')\n }\n\n commit('setIsLoadingList', false)\n })\n },\n\n getLocationDetails({state}, points) {\n LocalPointsService.getLocationDetails({\n locations: points\n }).then(response => {\n state.locationDetailsLookup[JSON.stringify(points)] = response.data\n })\n },\n\n loadDataFromUrl({dispatch}) {\n dispatch('getDetailedLocations')\n },\n\n applyEventTypeFilter(context, eventTypes) {\n applyFilter.bind(this)(context, FILTER_KEY_EVENT_TYPES, eventTypes, eventTypes.length > 0)\n },\n\n applyStartDateFilter(context, startDateRange) {\n applyFilter.bind(this)(context, FILTER_KEY_START_DATE_RANGE, startDateRange, !!startDateRange)\n },\n\n applyIncludeVirtualFilter(context, includeVirtual) {\n applyFilter.bind(this)(context, FILTER_KEY_INCLUDE_VIRTUAL, includeVirtual, includeVirtual !== 'all')\n },\n\n applyLabelFilter(context, labels) {\n applyFilter.bind(this)(context, FILTER_KEY_LABELS, labels, labels.length > 0)\n },\n\n applyLocationFilter({state, dispatch, getters}, query) {\n // Remove any existing filter\n state.filters = state.filters.filter(f => f.type !== FILTER_KEY_LOCATION)\n\n // Add a location filter if a query is present\n if (query) {\n state.filters.push({type: FILTER_KEY_LOCATION, value: query})\n }\n\n // Reset to page 1\n this.commit('setPage', 1)\n\n // Update the URL\n RoutingService.addHistoryItem(getters.pageUrlFilterOptions)\n\n // Fetch updated locations data\n dispatch('getDetailedLocations')\n },\n\n applyRegionFilter(context, regions) {\n applyFilter.bind(this)(context, FILTER_KEY_REGIONS, regions, regions.length > 0)\n },\n\n applyTypeFilter(context, types) {\n applyFilter.bind(this)(context, FILTER_KEY_TYPES, types, types !== null)\n },\n\n applyUpcomingOnlyFilter(context, upcomingOnly) {\n applyFilter.bind(this)(context, FILTER_KEY_UPCOMING_ONLY, upcomingOnly, !upcomingOnly)\n },\n\n applyPartnershipFilter(context, partnershipId) {\n applyFilter.bind(this)(context, FILTER_KEY_PARTNERSHIP, partnershipId, true)\n },\n\n paginate({dispatch, getters}, page) {\n this.commit('setPage', page)\n RoutingService.addHistoryItem(getters.pageUrlFilterOptions)\n dispatch('getDetailedLocations')\n }\n}\n\nfunction applyFilter({state, dispatch, getters}, filterKey, filterValue, shouldAddFilter) {\n // Remove any existing filter\n state.filters = state.filters.filter(f => f.type !== filterKey)\n\n // Add filter if appropriate\n if (shouldAddFilter) {\n state.filters.push({type: filterKey, value: filterValue})\n }\n\n // Reset to page 1\n this.commit('setPage', 1)\n\n // Update the URL\n RoutingService.addHistoryItem(getters.pageUrlFilterOptions)\n\n // Fetch updated locations and points data\n dispatch('getDetailedLocations')\n dispatch('getPoints')\n}\n","import filterUrlHelper from '../../helpers/filter-url'\n\nexport default {\n setPoints(state, points) {\n state.points = points\n },\n setDetailedLocations(state, detailedLocations) {\n state.detailedLocations = detailedLocations\n },\n setPage(state, page) {\n state.pagination.page = page\n },\n setPaginationCounts(state, meta) {\n state.pagination.perPage = meta.perPage\n state.pagination.totalCount = meta.count\n state.pagination.totalPages = meta.totalPages\n },\n setPointsInitiallyLoaded(state) {\n state.pointsInitiallyLoaded = true\n },\n setIsLoadingList(state, isLoading) {\n state.isLoadingList = isLoading\n },\n\n setOptionsFromUrlAndFilters(state, filters) {\n const urlState = filterUrlHelper.currentStateFromUrl()\n if (urlState) {\n state.pagination.page = urlState.pagination.currentPage || 1\n }\n\n state.filters = [\n ...filters,\n ...(urlState ? urlState.filters : [])\n ]\n },\n\n setUrlFilterKeys(state, keys) {\n state.urlFilterKeys = keys\n },\n\n setAdditionalUrlKeysIncludedInItemPageUrls(state, keys) {\n state.additionalUrlKeysIncludedInItemPageUrls = keys\n },\n\n setAdditionalParamsIncludedInEventUrls(state, params) {\n state.additionalParamsIncludedInEventUrls = params\n },\n\n setEventCreationAllowed(state, eventCreationAllowed) {\n state.eventCreationAllowed = eventCreationAllowed\n },\n\n setGroupCreationAllowed(state, groupCreationAllowed) {\n state.groupCreationAllowed = groupCreationAllowed\n },\n\n setEventCreationRequiresSearchedLocation(state, eventCreationRequiresSearchedLocation) {\n state.eventCreationRequiresSearchedLocation = eventCreationRequiresSearchedLocation\n },\n\n setForceCreateEventButtonHidden(state, forceCreateEventButtonHidden) {\n state.forceCreateEventButtonHidden = forceCreateEventButtonHidden\n },\n\n setFilterOptions(state, filterOptions) {\n state.filterOptions = filterOptions\n },\n\n setMultipleEventsPerConstituncyAllowed(state, multipleEventsPerConstituencyAllowed) {\n state.multipleEventsPerConstituencyAllowed = multipleEventsPerConstituencyAllowed\n },\n\n setSearchedLocation(state, searchedLocation) {\n state.searchedLocation = searchedLocation\n },\n\n setSearchStrategy(state, searchStrategy) {\n state.searchStrategy = searchStrategy\n }\n}\n","import { TRACKING_URL_PARAMS } from '../url-keys'\nimport { FILTER_KEY_CALENDARS, FILTER_KEY_LOCATION, FILTER_KEY_PARTNERSHIP } from '../filter-keys'\nimport { urlParamsWithNamespace } from '@/helpers/url-params'\n\nexport default {\n // Q: Can we use a Map instead, so the keys can be objects instead of this stringification stuff?\n // A: No, because Vue reactivity does not work for Maps\n detailsForIds: (state) => (points) => {\n if (state.locationDetailsLookup[JSON.stringify(points)]) {\n return state.locationDetailsLookup[JSON.stringify(points)]\n }\n },\n\n newEventPath: (state, getters) => {\n if (getters.calendarSlug) {\n if (state.searchedLocation) {\n const {latitude, longitude} = state.searchedLocation\n const queryParams = urlParamsWithNamespace({latitude, longitude}, 'searched_location')\n const queryString = new URLSearchParams(queryParams).toString()\n return `/calendars/${getters.calendarSlug}/events/start?${queryString}`\n } else {\n return `/calendars/${getters.calendarSlug}/events/start`\n }\n } else if (getters.partnershipSlug) {\n return `/partnerships/${getters.partnershipSlug}/events/new`\n } else {\n return '/events/new'\n }\n },\n\n newGroupPath: (state, getters) => {\n if (state.searchedLocation) {\n const {latitude, longitude} = state.searchedLocation\n const query = getters.searchedLocationQuery\n const queryParams = urlParamsWithNamespace({latitude, longitude, query}, 'location')\n queryParams.user_country = window.Agra.Configuration.locationSearchBias.country\n const queryString = new URLSearchParams(queryParams).toString()\n return `/groups/new?${queryString}`\n } else {\n return '/groups/new'\n }\n },\n\n calendarSlug: (state) => {\n const calendarFilter = state.filters.filter(f => FILTER_KEY_CALENDARS === f.type)\n // if there is one calendar being filtered by, we know the calendar slug.\n return calendarFilter.length === 1 ? calendarFilter[0].value[0] : null\n },\n\n geoJsonPoints: (state) => {\n return {\n type: 'FeatureCollection',\n features: state.points.map(p => ({\n type: 'Feature',\n properties: {\n id: p.id,\n type: p.type,\n key: p.key,\n icon: 'circle'\n },\n geometry: {\n type: 'Point',\n coordinates: [p.lon, p.lat]\n }\n }))\n }\n },\n\n otherSearchParams(_state, getters) {\n const searchParams = new URLSearchParams(window.location.search)\n const otherSearchParams = {}\n getters.urlKeysIncludedInItemPageUrls.forEach(k => {\n if (searchParams.get(k)) {\n otherSearchParams[k] = searchParams.get(k)\n }\n })\n return otherSearchParams\n },\n\n // Filters for the URL of the page.\n // Don't include filters that are not explicitly configured to be included in the URL.\n pageUrlFilterOptions(state, getters) {\n return {\n filters: state.filters.filter(f => state.urlFilterKeys.includes(f.type)),\n otherSearchParams: getters.otherSearchParams,\n pagination: {currentPage: state.pagination.page}\n }\n },\n\n partnershipSlug: (state) => {\n const partnershipFilter = state.filters.filter(f => FILTER_KEY_PARTNERSHIP === f.type)\n // if there is a partnership being filtered by, return its slug\n return partnershipFilter.length === 1 ? partnershipFilter[0].value : null\n },\n\n searchedLocationQuery: (state) => {\n const locationFilter = state.filters.filter(f => FILTER_KEY_LOCATION === f.type)\n return locationFilter.length === 1 ? locationFilter[0].value : null\n },\n\n showNewEventButton: (state) => {\n if (state.forceCreateEventButtonHidden) {\n return false\n }\n\n if (!state.eventCreationAllowed) {\n return false\n } else {\n if (state.eventCreationRequiresSearchedLocation) {\n return !!state.searchedLocation\n } else {\n return true\n }\n }\n },\n\n urlKeysIncludedInItemPageUrls: (state) => {\n return [ ...TRACKING_URL_PARAMS, ...state.additionalUrlKeysIncludedInItemPageUrls]\n }\n}\n","export default {\n isLoadingList: false,\n\n points: [],\n pointsInitiallyLoaded: false,\n\n detailedLocations: null,\n locationDetailsLookup: {},\n\n filters: [],\n filterOptions: {},\n searchedLocation: null,\n otherSearchParams: [],\n\n pagination: {page: 1, perPage: 0, totalCount: 0, totalPages: 1},\n\n urlFilterKeys: [],\n\n additionalUrlKeysIncludedInItemPageUrls: [],\n additionalParamsIncludedInEventUrls: {},\n eventCreationAllowed: null,\n eventCreationRequiresSearchedLocation: false,\n forceCreateEventButtonHidden: false,\n groupCreationAllowed: null,\n searchStrategy: null\n}\n","import { createStore } from 'vuex'\n\nimport actions from './actions'\nimport mutations from './mutations'\nimport getters from './getters'\nimport state from './state'\n\nexport default function buildStore() {\n return createStore({\n state,\n getters,\n mutations,\n actions\n })\n}\n","// tracking URL param for the ActionKit CRM\nexport const URL_KEY_AKID = 'akid'\n// tracking URL param for the Action Network CRM\nexport const URL_KEY_EMAIL_REFERRER = 'email_referrer'\n// Agra uses this to pass partner hints to event creation.\nexport const URL_KEY_PARTNER = 'partner'\nexport const URL_KEY_SOURCE = 'source'\n// generic UTM codes\nexport const URL_KEY_UTM_CAMPAIGN = 'utm_campaign'\nexport const URL_KEY_UTM_CONTENT = 'utm_content'\nexport const URL_KEY_UTM_MEDIUM = 'utm_medium'\nexport const URL_KEY_UTM_SOURCE = 'utm_source'\nexport const URL_KEY_UTM_TERM = 'utm_term'\n// tracking URL param for the EveryAction CRM\nexport const URL_KEY_SOURCE_ID = 'sourceid'\n\nexport const TRACKING_URL_PARAMS = [URL_KEY_AKID, URL_KEY_EMAIL_REFERRER, URL_KEY_SOURCE,\n URL_KEY_SOURCE_ID, URL_KEY_UTM_CAMPAIGN, URL_KEY_UTM_CONTENT,\n URL_KEY_UTM_MEDIUM, URL_KEY_UTM_SOURCE,\n URL_KEY_UTM_TERM]\n","import 'url-search-params-polyfill'\n\nconst FilterUrl = {\n // Creates a query parameter string based on options\n currentStateUrlParamsString(options) {\n const searchParams = this.currentStateUrlParams(options)\n\n // Return either the query string with a ? on the front, or an empty string.\n if (searchParams.toString() !== '') {\n return `?${searchParams.toString()}`\n } else {\n return ''\n }\n },\n\n currentStateUrlParamsHash(options) {\n const searchParams = this.currentStateUrlParams(options)\n\n return Object.fromEntries(searchParams)\n },\n\n currentStateUrlParams(options) {\n let searchParams = new URLSearchParams('')\n\n if (options.presetFilter !== undefined && options.presetFilter !== null) {\n searchParams.append('filter', options.presetFilter)\n } else if (options.filters !== undefined) {\n // options.filters, if present, is expected to be formatted like\n // [{type: 'country', value: 'FR'}, {type: 'category', value: 'environment'}]\n for (let filter of options.filters) {\n let serializedValue = null\n if (typeof filter.value === 'string' || typeof filter.value === 'number') {\n serializedValue = filter.value\n } else {\n serializedValue = JSON.stringify(filter.value)\n }\n\n searchParams.append(`filter[${filter.type}]`, serializedValue)\n }\n }\n\n // options.sortParams, if present, is expected to be formatted like\n // {column: 'created_at', direction: 'desc'}\n if (options.sortParams !== undefined) {\n if (options.sortParams.column) {\n searchParams.append('sort', options.sortParams.column)\n }\n if (options.sortParams.direction) {\n searchParams.append('direction', options.sortParams.direction)\n }\n }\n\n // options.pagination, if present, is expected to be formatted like\n // {currentPage: 1}\n if (options.pagination !== undefined) {\n if (options.pagination.currentPage > 0) {\n searchParams.append('page', options.pagination.currentPage.toString())\n }\n }\n\n // options.otherSearchParams, if present is expected to be formatted like\n // { akid: 'x', utm_source: 'a' }\n if (options.otherSearchParams) {\n Object.entries(options.otherSearchParams).forEach(([k, v]) => {\n searchParams.append(k, v)\n })\n }\n\n return searchParams\n },\n\n currentStateFromUrl() {\n let state = { sortParams: {}, pagination: {}, filters: [] }\n let query = new URLSearchParams(location.search)\n\n for (let item of query) {\n if (item[0] === 'sort') {\n state.sortParams.column = item[1]\n }\n else if (item[0] === 'direction') {\n state.sortParams.direction = item[1]\n }\n else if (item[0] === 'page') {\n state.pagination.currentPage = parseInt(item[1])\n }\n else if (item[0].startsWith('filter[')) {\n let filterType = item[0].match(/^filter\\[(.*)\\]$/)[1]\n\n let parsedValue = null\n if (item[1].startsWith('{') || item[1].startsWith('[') || item[1].startsWith('\"') ||\n item[1] === 'true' || item[1] === 'false') {\n parsedValue = JSON.parse(item[1])\n } else {\n parsedValue = item[1]\n }\n\n state.filters.push({type: filterType, value: parsedValue})\n }\n else if (item[0] === 'filter') {\n state.presetFilter = item[1]\n }\n }\n\n return state\n }\n}\n\nexport default FilterUrl\n","export const FILTER_KEY_TYPES = 'types'\nexport const FILTER_KEY_CALENDARS = 'calendars'\nexport const FILTER_KEY_START_DATE_RANGE = 'start_date_range'\nexport const FILTER_KEY_GEOGRAPHY_SLUGS = 'geography_slugs'\nexport const FILTER_KEY_EVENT_TYPES = 'event_types'\nexport const FILTER_KEY_INCLUDE_VIRTUAL = 'include_virtual_events'\nexport const FILTER_KEY_LABELS = 'labels'\nexport const FILTER_KEY_LOCATION = 'location'\nexport const FILTER_KEY_REGIONS = 'regions'\nexport const FILTER_KEY_BOUNDARY_BOX = 'boundary_box'\nexport const FILTER_KEY_UPCOMING_ONLY = 'upcoming_only'\nexport const FILTER_KEY_PARTNERSHIP = 'partnership'\n","/**!\n * url-search-params-polyfill\n *\n * @author Jerry Bendy (https://github.com/jerrybendy)\n * @licence MIT\n */\n(function(self) {\n 'use strict';\n\n var nativeURLSearchParams = (function() {\n // #41 Fix issue in RN\n try {\n if (self.URLSearchParams && (new self.URLSearchParams('foo=bar')).get('foo') === 'bar') {\n return self.URLSearchParams;\n }\n } catch (e) {}\n return null;\n })(),\n isSupportObjectConstructor = nativeURLSearchParams && (new nativeURLSearchParams({a: 1})).toString() === 'a=1',\n // There is a bug in safari 10.1 (and earlier) that incorrectly decodes `%2B` as an empty space and not a plus.\n decodesPlusesCorrectly = nativeURLSearchParams && (new nativeURLSearchParams('s=%2B').get('s') === '+'),\n isSupportSize = nativeURLSearchParams && 'size' in nativeURLSearchParams.prototype,\n __URLSearchParams__ = \"__URLSearchParams__\",\n // Fix bug in Edge which cannot encode ' &' correctly\n encodesAmpersandsCorrectly = nativeURLSearchParams ? (function() {\n var ampersandTest = new nativeURLSearchParams();\n ampersandTest.append('s', ' &');\n return ampersandTest.toString() === 's=+%26';\n })() : true,\n prototype = URLSearchParamsPolyfill.prototype,\n iterable = !!(self.Symbol && self.Symbol.iterator);\n\n if (nativeURLSearchParams && isSupportObjectConstructor && decodesPlusesCorrectly && encodesAmpersandsCorrectly && isSupportSize) {\n return;\n }\n\n\n /**\n * Make a URLSearchParams instance\n *\n * @param {object|string|URLSearchParams} search\n * @constructor\n */\n function URLSearchParamsPolyfill(search) {\n search = search || \"\";\n\n // support construct object with another URLSearchParams instance\n if (search instanceof URLSearchParams || search instanceof URLSearchParamsPolyfill) {\n search = search.toString();\n }\n this [__URLSearchParams__] = parseToDict(search);\n }\n\n\n /**\n * Appends a specified key/value pair as a new search parameter.\n *\n * @param {string} name\n * @param {string} value\n */\n prototype.append = function(name, value) {\n appendTo(this [__URLSearchParams__], name, value);\n };\n\n /**\n * Deletes the given search parameter, and its associated value,\n * from the list of all search parameters.\n *\n * @param {string} name\n */\n prototype['delete'] = function(name) {\n delete this [__URLSearchParams__] [name];\n };\n\n /**\n * Returns the first value associated to the given search parameter.\n *\n * @param {string} name\n * @returns {string|null}\n */\n prototype.get = function(name) {\n var dict = this [__URLSearchParams__];\n return this.has(name) ? dict[name][0] : null;\n };\n\n /**\n * Returns all the values association with a given search parameter.\n *\n * @param {string} name\n * @returns {Array}\n */\n prototype.getAll = function(name) {\n var dict = this [__URLSearchParams__];\n return this.has(name) ? dict [name].slice(0) : [];\n };\n\n /**\n * Returns a Boolean indicating if such a search parameter exists.\n *\n * @param {string} name\n * @returns {boolean}\n */\n prototype.has = function(name) {\n return hasOwnProperty(this [__URLSearchParams__], name);\n };\n\n /**\n * Sets the value associated to a given search parameter to\n * the given value. If there were several values, delete the\n * others.\n *\n * @param {string} name\n * @param {string} value\n */\n prototype.set = function set(name, value) {\n this [__URLSearchParams__][name] = ['' + value];\n };\n\n /**\n * Returns a string containg a query string suitable for use in a URL.\n *\n * @returns {string}\n */\n prototype.toString = function() {\n var dict = this[__URLSearchParams__], query = [], i, key, name, value;\n for (key in dict) {\n name = encode(key);\n for (i = 0, value = dict[key]; i < value.length; i++) {\n query.push(name + '=' + encode(value[i]));\n }\n }\n return query.join('&');\n };\n\n // There is a bug in Safari 10.1 and `Proxy`ing it is not enough.\n var useProxy = self.Proxy && nativeURLSearchParams && (!decodesPlusesCorrectly || !encodesAmpersandsCorrectly || !isSupportObjectConstructor || !isSupportSize);\n var propValue;\n if (useProxy) {\n // Safari 10.0 doesn't support Proxy, so it won't extend URLSearchParams on safari 10.0\n propValue = new Proxy(nativeURLSearchParams, {\n construct: function (target, args) {\n return new target((new URLSearchParamsPolyfill(args[0]).toString()));\n }\n })\n // Chrome <=60 .toString() on a function proxy got error \"Function.prototype.toString is not generic\"\n propValue.toString = Function.prototype.toString.bind(URLSearchParamsPolyfill);\n } else {\n propValue = URLSearchParamsPolyfill;\n }\n\n /*\n * Apply polyfill to global object and append other prototype into it\n */\n Object.defineProperty(self, 'URLSearchParams', {\n value: propValue\n });\n\n var USPProto = self.URLSearchParams.prototype;\n\n USPProto.polyfill = true;\n\n // Fix #54, `toString.call(new URLSearchParams)` will return correct value when Proxy not used\n if (!useProxy && self.Symbol) {\n USPProto[self.Symbol.toStringTag] = 'URLSearchParams';\n }\n\n /**\n *\n * @param {function} callback\n * @param {object} thisArg\n */\n if (!('forEach' in USPProto)) {\n USPProto.forEach = function(callback, thisArg) {\n var dict = parseToDict(this.toString());\n Object.getOwnPropertyNames(dict).forEach(function(name) {\n dict[name].forEach(function(value) {\n callback.call(thisArg, value, name, this);\n }, this);\n }, this);\n };\n }\n\n /**\n * Sort all name-value pairs\n */\n if (!('sort' in USPProto)) {\n USPProto.sort = function() {\n var dict = parseToDict(this.toString()), keys = [], k, i, j;\n for (k in dict) {\n keys.push(k);\n }\n keys.sort();\n\n for (i = 0; i < keys.length; i++) {\n this['delete'](keys[i]);\n }\n for (i = 0; i < keys.length; i++) {\n var key = keys[i], values = dict[key];\n for (j = 0; j < values.length; j++) {\n this.append(key, values[j]);\n }\n }\n };\n }\n\n /**\n * Returns an iterator allowing to go through all keys of\n * the key/value pairs contained in this object.\n *\n * @returns {function}\n */\n if (!('keys' in USPProto)) {\n USPProto.keys = function() {\n var items = [];\n this.forEach(function(item, name) {\n items.push(name);\n });\n return makeIterator(items);\n };\n }\n\n /**\n * Returns an iterator allowing to go through all values of\n * the key/value pairs contained in this object.\n *\n * @returns {function}\n */\n if (!('values' in USPProto)) {\n USPProto.values = function() {\n var items = [];\n this.forEach(function(item) {\n items.push(item);\n });\n return makeIterator(items);\n };\n }\n\n /**\n * Returns an iterator allowing to go through all key/value\n * pairs contained in this object.\n *\n * @returns {function}\n */\n if (!('entries' in USPProto)) {\n USPProto.entries = function() {\n var items = [];\n this.forEach(function(item, name) {\n items.push([name, item]);\n });\n return makeIterator(items);\n };\n }\n\n if (iterable) {\n USPProto[self.Symbol.iterator] = USPProto[self.Symbol.iterator] || USPProto.entries;\n }\n\n if (!('size' in USPProto)) {\n Object.defineProperty(USPProto, 'size', {\n get: function () {\n var dict = parseToDict(this.toString())\n if (USPProto === this) {\n throw new TypeError('Illegal invocation at URLSearchParams.invokeGetter')\n }\n return Object.keys(dict).reduce(function (prev, cur) {\n return prev + dict[cur].length;\n }, 0);\n }\n });\n }\n\n function encode(str) {\n var replace = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'\\(\\)~]|%20|%00/g, function(match) {\n return replace[match];\n });\n }\n\n function decode(str) {\n return str\n .replace(/[ +]/g, '%20')\n .replace(/(%[a-f0-9]{2})+/ig, function(match) {\n return decodeURIComponent(match);\n });\n }\n\n function makeIterator(arr) {\n var iterator = {\n next: function() {\n var value = arr.shift();\n return {done: value === undefined, value: value};\n }\n };\n\n if (iterable) {\n iterator[self.Symbol.iterator] = function() {\n return iterator;\n };\n }\n\n return iterator;\n }\n\n function parseToDict(search) {\n var dict = {};\n\n if (typeof search === \"object\") {\n // if `search` is an array, treat it as a sequence\n if (isArray(search)) {\n for (var i = 0; i < search.length; i++) {\n var item = search[i];\n if (isArray(item) && item.length === 2) {\n appendTo(dict, item[0], item[1]);\n } else {\n throw new TypeError(\"Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements\");\n }\n }\n\n } else {\n for (var key in search) {\n if (search.hasOwnProperty(key)) {\n appendTo(dict, key, search[key]);\n }\n }\n }\n\n } else {\n // remove first '?'\n if (search.indexOf(\"?\") === 0) {\n search = search.slice(1);\n }\n\n var pairs = search.split(\"&\");\n for (var j = 0; j < pairs.length; j++) {\n var value = pairs [j],\n index = value.indexOf('=');\n\n if (-1 < index) {\n appendTo(dict, decode(value.slice(0, index)), decode(value.slice(index + 1)));\n\n } else {\n if (value) {\n appendTo(dict, decode(value), '');\n }\n }\n }\n }\n\n return dict;\n }\n\n function appendTo(dict, name, value) {\n var val = typeof value === 'string' ? value : (\n value !== null && value !== undefined && typeof value.toString === 'function' ? value.toString() : JSON.stringify(value)\n );\n\n // #47 Prevent using `hasOwnProperty` as a property name\n if (hasOwnProperty(dict, name)) {\n dict[name].push(val);\n } else {\n dict[name] = [val];\n }\n }\n\n function isArray(val) {\n return !!val && '[object Array]' === Object.prototype.toString.call(val);\n }\n\n function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n }\n\n})(typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : this));\n","import filterUrlHelper from '../helpers/filter-url'\n\nconst RoutingService = {\n addHistoryItem(options, replaceState=false) {\n const url = `${window.location.pathname}${filterUrlHelper.currentStateUrlParamsString(options)}`\n\n // Including `turbolinks: {}` in the state object causes turbolinks to handle this history item\n // when the Back button is used. This ensures that everything gets properly loaded when moving\n // between pages using the Back button.\n const historyState = {turbolinks: {}}\n\n if (replaceState) {\n history.replaceState(historyState, null, url)\n } else {\n history.pushState(historyState, null, url)\n }\n }\n}\n\nexport default RoutingService\n"],"names":["listPoints","options","url","this","listPointsPath","filterUrlHelper","currentStateUrlParamsString","Promise","resolve","reject","ajax","get","successHandler","response","errorHandler","err","listDetailedLocations","listDetailedLocationsPath","params","window","Agra","Configuration","locationSearchBias","country","user_country","headers","i18n","locale","getLocationDetails","locations","post","locationItemsPath","data","identifiers","dataUrlFilterOptions","state","filterKeys","filters","map","f","type","filtersToAdd","Object","entries","filter","k","includes","v","value","pagination","currentPage","page","otherSearchParams","search_strategy","searchStrategy","pointsUrlOptions","getPoints","commit","LocalPointsService","then","points","pointsWithKey","point","key","id","pointsInitiallyLoaded","getDetailedLocations","getters","resp","meta","searchedLocation","totalPages","RoutingService","addHistoryItem","pageUrlFilterOptions","dispatch","locationDetailsLookup","JSON","stringify","loadDataFromUrl","applyEventTypeFilter","context","eventTypes","applyFilter","bind","FILTER_KEY_EVENT_TYPES","length","applyStartDateFilter","startDateRange","FILTER_KEY_START_DATE_RANGE","applyIncludeVirtualFilter","includeVirtual","FILTER_KEY_INCLUDE_VIRTUAL","applyLabelFilter","labels","FILTER_KEY_LABELS","applyLocationFilter","query","FILTER_KEY_LOCATION","push","applyRegionFilter","regions","FILTER_KEY_REGIONS","applyTypeFilter","types","FILTER_KEY_TYPES","applyUpcomingOnlyFilter","upcomingOnly","FILTER_KEY_UPCOMING_ONLY","applyPartnershipFilter","partnershipId","FILTER_KEY_PARTNERSHIP","paginate","filterKey","filterValue","shouldAddFilter","setPoints","setDetailedLocations","detailedLocations","setPage","setPaginationCounts","perPage","totalCount","count","setPointsInitiallyLoaded","setIsLoadingList","isLoading","isLoadingList","setOptionsFromUrlAndFilters","urlState","currentStateFromUrl","setUrlFilterKeys","keys","urlFilterKeys","setAdditionalUrlKeysIncludedInItemPageUrls","additionalUrlKeysIncludedInItemPageUrls","setAdditionalParamsIncludedInEventUrls","additionalParamsIncludedInEventUrls","setEventCreationAllowed","eventCreationAllowed","setGroupCreationAllowed","groupCreationAllowed","setEventCreationRequiresSearchedLocation","eventCreationRequiresSearchedLocation","setForceCreateEventButtonHidden","forceCreateEventButtonHidden","setFilterOptions","filterOptions","setMultipleEventsPerConstituncyAllowed","multipleEventsPerConstituencyAllowed","setSearchedLocation","setSearchStrategy","detailsForIds","newEventPath","calendarSlug","latitude","longitude","queryParams","urlParamsWithNamespace","queryString","URLSearchParams","toString","partnershipSlug","newGroupPath","searchedLocationQuery","calendarFilter","FILTER_KEY_CALENDARS","geoJsonPoints","features","p","properties","icon","geometry","coordinates","lon","lat","_state","searchParams","location","search","urlKeysIncludedInItemPageUrls","forEach","partnershipFilter","locationFilter","showNewEventButton","TRACKING_URL_PARAMS","buildStore","createStore","mutations","actions","URL_KEY_PARTNER","FilterUrl","currentStateUrlParams","currentStateUrlParamsHash","fromEntries","undefined","presetFilter","append","serializedValue","sortParams","column","direction","item","parseInt","startsWith","filterType","match","parsedValue","parse","FILTER_KEY_GEOGRAPHY_SLUGS","FILTER_KEY_BOUNDARY_BOX","self","ampersandTest","nativeURLSearchParams","e","isSupportObjectConstructor","a","decodesPlusesCorrectly","isSupportSize","prototype","__URLSearchParams__","encodesAmpersandsCorrectly","URLSearchParamsPolyfill","iterable","Symbol","iterator","name","appendTo","dict","has","getAll","slice","hasOwnProperty","set","i","encode","join","propValue","useProxy","Proxy","construct","target","args","Function","defineProperty","USPProto","polyfill","toStringTag","callback","thisArg","parseToDict","getOwnPropertyNames","call","sort","j","values","items","makeIterator","TypeError","reduce","prev","cur","str","replace","encodeURIComponent","decode","decodeURIComponent","arr","next","shift","done","isArray","indexOf","pairs","split","index","val","obj","prop","g","replaceState","pathname","historyState","turbolinks","history","pushState"],"sourceRoot":""}