{"version":3,"file":"default/js/google.js","sources":["webpack://rws/./dependencies/storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/components/keyboardAccessibility.js","webpack://rws/./dependencies/storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.js","webpack://rws/./cartridges/app_rws/cartridge/client/default/js/services/geolocation.js","webpack://rws/./cartridges/app_rws/cartridge/client/default/js/services/google.js","webpack://rws/./cartridges/app_rws/cartridge/client/default/js/storeLocator.js","webpack://rws/./cartridges/app_rws/cartridge/client/default/js/storeLocator/storeLocator.js","webpack://rws/./cartridges/app_rws/cartridge/client/default/js/storeLocator/storeLocatorMap.js","webpack://rws/./cartridges/app_rws/cartridge/client/default/js/util/matchBreakpoints.js","webpack://rws/./cartridges/app_rws/cartridge/client/default/js/util/urlUtils.js","webpack://rws/./cartridges/app_rws/cartridge/client/default/js/google.js"],"sourcesContent":["'use strict';\n\n// Customization: Added Enter key (13)\n\nmodule.exports = function (selector, keyFunctions, preFunction) {\n $(selector).on('keydown', function (e) {\n var key = e.which;\n var supportedKeyCodes = [37, 38, 39, 40, 27, 13];\n if (supportedKeyCodes.indexOf(key) >= 0) {\n e.preventDefault();\n }\n var returnedScope = preFunction.call(this);\n if (keyFunctions[key]) {\n keyFunctions[key].call(this, returnedScope);\n }\n });\n};\n","'use strict';\n\nmodule.exports = function (include) {\n if (typeof include === 'function') {\n include();\n } else if (typeof include === 'object') {\n Object.keys(include).forEach(function (key) {\n if (typeof include[key] === 'function') {\n include[key]();\n }\n });\n }\n};\n","'use strict';\n\nclass GeolocationModel {\n constructor() {\n this.latitude = '';\n this.longitude = '';\n this.locationText = 'Use My location';\n this.error = false;\n this.errorMessage = '';\n }\n\n /**\n * Sets the geolocation data.\n * @param {Object} position - The position object from the geolocation API.\n */\n setGeolocation(position) {\n this.latitude = position.coords.latitude;\n this.longitude = position.coords.longitude;\n this.locationText = 'Using your location';\n this.error = false;\n }\n\n /**\n * Sets the error information based on the error code.\n * @param {Object} error - The error object from the geolocation API.\n */\n setError(error) {\n this.error = true;\n switch (error.code) {\n case error.PERMISSION_DENIED:\n this.locationText = 'User denied geolocation.
Change settings in your browser.';\n break;\n case error.POSITION_UNAVAILABLE:\n this.errorMessage = 'Geolocation information is unavailable. Please try again.';\n break;\n case error.TIMEOUT:\n this.errorMessage = 'Location request has timed out. Please try again.';\n break;\n case error.UNKNOWN_ERROR:\n this.errorMessage = 'Unknown error occurred. Please try again.';\n break;\n }\n }\n\n setNotSupported() {\n this.error = true;\n this.locationText = 'Geolocation is not supported by this browser.';\n }\n}\n\n/**\n * Retrieves the current geolocation coordinates of the user's device.\n * @returns {Promise}\n * A promise that resolves with an instance of `GeolocationModel` containing the geolocation data or error information.\n */\nfunction getGeolocation() {\n return new Promise((resolve) => {\n const geolocationModel = new GeolocationModel();\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n (position) => {\n geolocationModel.setGeolocation(position);\n resolve(geolocationModel);\n },\n (error) => {\n geolocationModel.setError(error);\n resolve(geolocationModel);\n }\n );\n } else {\n geolocationModel.setNotSupported();\n resolve(geolocationModel);\n }\n });\n}\n\nmodule.exports = {\n GeolocationModel: GeolocationModel,\n getGeolocation: getGeolocation\n};\n","/* global google */\n'use strict';\n\n// This sample uses the Places Autocomplete widget to:\n// 1. Help the user select a place\n// 2. Retrieve the address components associated with that place\n// 3. Populate the form fields with those address components.\n// This sample requires the Places library, Maps JavaScript API.\n// Include the libraries=places parameter when you first load the API.\n// For example: