{"version":3,"file":"storeLocator.min.js","sources":["storeLocator.min.js"],"sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar processInclude = __webpack_require__(3);\n\n\t$(document).ready(function () {\n\t processInclude(__webpack_require__(186));\n\t});\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\tmodule.exports = function (include) {\n\t if (typeof include === 'function') {\n\t include();\n\t } else if ((typeof include === 'undefined' ? 'undefined' : _typeof(include)) === 'object') {\n\t Object.keys(include).forEach(function (key) {\n\t if (typeof include[key] === 'function') {\n\t include[key]();\n\t }\n\t });\n\t }\n\t};\n\n/***/ }),\n\n/***/ 93:\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\t/**\n\t * create the opening hours template, based on the information available\n\t * @param {Array} openingHours - an array (usually with a length of 7), which rapresent the days of the week\n\t *\n\t * @return {html} the template populated with opening hours data\n\t */\n\n\tfunction buildCollectionPointHoursTemplate(openingHours) {\n\t var $hoursTemplate = $('#clickCollectHoursTemplate').children().clone(),\n\t $daytemplate,\n\t dayOfWeek,\n\t result = $(document.createElement(\"p\"));\n\n\t for (var i = 0; i < openingHours.length; i++) {\n\t dayOfWeek = openingHours[i];\n\t $daytemplate = $hoursTemplate.clone();\n\t $daytemplate.find('.js-day').html(dayOfWeek.day + ':');\n\t // Combine all hours into a single string, separated by commas\n\t var combinedHours = dayOfWeek.hours.join(', ');\n\t $daytemplate.find('.js-hour').html(combinedHours);\n\n\t // Append the modified day template to the result\n\t $daytemplate.appendTo(result);\n\t }\n\t return result;\n\t}\n\n\t/**\n\t * Set store address\n\t * @param {template} template Template\n\t * @param {Object} store Store data object\n\t * @param {Object} $address1 Store address1\n\t * @param {Object} $address2 Store address2\n\t */\n\tfunction fillStoreAddress(template, store, $address1, $address2) {\n\t // For Bata IT, MY: Store address is splitted in two lines\n\t if ($address2.length) {\n\t if (store.a2) {\n\t // store has address 2\n\t $address1.html(store.a1 + '
');\n\t $address2.html(store.a2 + '
');\n\t } else {\n\t $address1.html(store.a1 + '
');\n\t $address2.html('');\n\t }\n\t // For the other sites: Both addresses (if address2 exists) are displayed in one line\n\t } else {\n\t $address1.html(store.a2 ? store.a1 + ' ' + store.a2 + '
' : store.a1 + '
');\n\t }\n\t}\n\n\t/**\n\t * Show COD allowed/disallowed message on each store's frontend\n\t * @param {template} template Template\n\t * @param {Object} store Store data object\n\t */\n\tfunction showPickupPointCODAllowed(store, template) {\n\t var codNotAvailableMsg = store.codAllowed === false ? $('#storeListResults').attr('data-cod-not-allowed-message') : \"\";\n\t template.content.querySelector('.js-store-details-number').setAttribute('data-cod-allowed', store.codAllowed);\n\t template.content.querySelector('.js-cod-allowed').textContent = codNotAvailableMsg;\n\n\t var codAllowedString = store.codAllowed ? 'true' : 'false';\n\t template.content.querySelector('.js-goto-store').setAttribute('data-codallowed', codAllowedString);\n\t}\n\n\t/**\n\t * create the StoreLocator Tiles for Stores List view\n\t * @param {Object} store - a store object\n\t * @param {Element} template - the template to populate with stores's data\n\t * @param {Boolean} isClickAndCollect - true if it is the pin for clickAndCollect template\n\t * @param {Boolean} isFilterByStoreBrands - true if filtered by brand\n\t * @param {String} controllerURL - the controller to call if the user clicks on the pin\n\t * @param {Boolean} hideStoreDetailsButton - true if it is needed to hide the button to reach the store details\n\t * @return {String} the template populated with stores's data\n\t */\n\t// eslint-disable-next-line complexity\n\tfunction buildStoreMarkerPin(store, template, isClickAndCollect, isFilterByStoreBrands, controllerURL, hideStoreDetailsButton) {\n\t var storeID = store.ID,\n\t storeDetailUrl = controllerURL ? controllerURL + '?storeID=' + store.ID + '&distance=' + store.dist + '&distanceUnit=' + store.dUnit : '',\n\t storePhone = store.phone,\n\t type,\n\t typeDV,\n\t brand,\n\t brandDV;\n\n\t // set\n\t var $storeInfo = template.find('.js-storeId');\n\t $storeInfo.data('store-id', storeID);\n\n\t if (store.brand === 'f') {\n\t brand = 'flagship';\n\t brandDV = 'Flagship store';\n\t } else {\n\t brand = store.brand;\n\t brandDV = store.brandDV;\n\t }\n\t $storeInfo.data('storebrand', brand);\n\n\t if (store.type === 'o') {\n\t type = 'original';\n\t typeDV = 'Original store';\n\t } else {\n\t type = store.type;\n\t typeDV = store.typeDV;\n\t }\n\t $storeInfo.attr('type', type);\n\n\t var $storeNameSection = template.find('.js-storeName'),\n\t $phoneContainer = template.find('.js-phoneContainer'),\n\t $phone = $phoneContainer.find('.js-storePhone'),\n\t $storePCode = template.find('.js-postalCode'),\n\n\t // zipCodePublic is only for pickup points in CZ, it has to be setted in the shipping address, but it has not to be displayed\n\t zipCodeForShipping = store.pCodePublic,\n\t openingHours = store.hours,\n\t $address1 = template.find('.js-storeAddress'),\n\t $address2 = template.find('.js-storeAddress2');\n\t $storeNameSection.attr('href', storeDetailUrl);\n\t $storeNameSection.html(store.name);\n\t var distance = store.dist && store.dist !== 'null' ? store.dist + ' ' + store.dUnit : '';\n\t template.find('.js-storeDistance').html(distance);\n\n\t fillStoreAddress(template, store, $address1, $address2);\n\n\t template.find('.js-storeCity').html(store.city ? store.city + ',' : '');\n\t template.find('.js-storeStateCode').html(store.sCode ? store.sCode + ',' : '');\n\t template.find('.js-storeDistrict').html(store.district ? store.district + ',' : '');\n\t template.find('.js-storeSubdistrict').html(store.subdistrict ? store.subdistrict + ',' : '');\n\t $storePCode.html(store.pCode);\n\t $storePCode.attr('data-public-postal-code', zipCodeForShipping || '');\n\t if ($phone.length > 0) {\n\t if (storePhone && storePhone.trim() !== '') {\n\t $phoneContainer.removeClass('d-none');\n\t $phone.html(storePhone);\n\t $phone.attr('href', 'tel:' + storePhone);\n\t } else {\n\t // if a store doesn't have a phone, also the phone icon will be hidden\n\t $phoneContainer.addClass('d-none');\n\t }\n\t }\n\t // for Click & Collect the hours is a string field in the DB, for Pickup Points is an array of days\n\t if (typeof openingHours === 'string' || !openingHours) {\n\t template.find('.js-storeHours').html(unescape(openingHours || ''));\n\t } else {\n\t var hoursTemplate = buildCollectionPointHoursTemplate(openingHours);\n\t template.find('.js-storeHours').html(hoursTemplate);\n\t }\n\t if (!store.hours) {\n\t template.find('.cc-icon-hours').addClass('d-none');\n\t } else {\n\t template.find('.cc-icon-hours').removeClass('d-none');\n\t }\n\t if (hideStoreDetailsButton) {\n\t template.find('.storeDetails').addClass('d-none');\n\t }\n\t if (isClickAndCollect) {\n\t template.find('.js-storeDetails').removeAttr('href');\n\t var tileTemplateID = $('#queryStoreParam').data('template-tile');\n\t var url = document.querySelector('#' + tileTemplateID).content.querySelector('.js-select-clickcollect-store').getAttribute('data-url');\n\t var $storeInfoButton = template.find('.storeInfoButton');\n\t $storeInfoButton.addClass('js-select-clickcollect-store');\n\t $storeInfoButton.attr('data-url', url);\n\t $storeInfoButton.attr('data-storeid', storeID);\n\t $storeInfoButton.attr('data-title', store.name);\n\t template.find('.js-storelocator-message').remove();\n\t } else {\n\t if (isFilterByStoreBrands === true) {\n\t template.find('.js-storeTypeDisplayValue').html(brandDV);\n\t } else {\n\t template.find('.js-storeTypeDisplayValue').html(typeDV);\n\t }\n\t template.find('.js-storeDetails').attr('href', storeDetailUrl);\n\n\t // Remove the click & collect exclusive element since they are not meant to be in the storelocator\n\t template.find('.js-clickAndCollect-message').remove();\n\t }\n\t var storePinHtml = template.clone();\n\t var storePin = {\n\t name: store.name,\n\t latitude: store.lat,\n\t longitude: store.long,\n\t type: type,\n\t storeBrand: brand,\n\t infoWindowHtml: storePinHtml.html()\n\t };\n\t return storePin;\n\t}\n\n\t/**\n\t * create the StoreLocator Pin for Store\n\t * @param {Object} store - a store object\n\t * @param {Element} template - the template to populate with stores's data\n\t * @return {String} the template populated with stores's data\n\t */\n\tfunction buildStoreCard(store, template, isFilterByStoreBrands, controllerURL) {\n\t var storePhone = store.phone,\n\t storeDetailUrl = controllerURL + '?storeID=' + store.ID + '&distance=' + store.dist + '&distanceUnit=' + store.dUnit,\n\t storeID = store.ID,\n\t type,\n\t typeDV,\n\t brand,\n\t brandDV;\n\t // set\n\t template.find('.js-store-details-number').attr('object', JSON.stringify(store));\n\t template.find('.js-storeContainer').attr('id', storeID);\n\t var $phone = template.find('.js-storePhone'),\n\t $storePCode = template.find('.js-postalCode'),\n\n\t // pCodePublic is only for pickup points in CZ, it has to be setted in the shipping address, but it has not to be displayed\n\t zipCodeForShipping = store.pCodePublic;\n\t template.find('.js-storeId').data('store-id', storeID);\n\n\t if (store.brand === 'f') {\n\t brand = 'flagship';\n\t brandDV = 'Flagship store';\n\t } else {\n\t brand = store.brand;\n\t brandDV = store.brandDV;\n\t }\n\t template.find('.js-storeId').attr('storebrand', brand);\n\n\t if (store.type === 'o') {\n\t type = 'original';\n\t typeDV = 'Original store';\n\t } else {\n\t type = store.type;\n\t typeDV = store.typeDV;\n\t }\n\t template.find('.js-storeId').attr('type', type);\n\t var $storeNameSection = template.find('.js-storeName');\n\t $storeNameSection.attr('href', storeDetailUrl);\n\t $storeNameSection.html(store.name);\n\t if (isFilterByStoreBrands === true) {\n\t template.find('.js-storeTypeDisplayValue').html(brandDV);\n\t } else {\n\t template.find('.js-storeTypeDisplayValue').html(typeDV);\n\t }\n\t if (store.dist && store.dist !== 'null') {\n\t template.find('.js-storeDistance').html(store.dist + ' ' + store.dUnit);\n\t }\n\n\t var $address1 = template.find('.js-storeAddress');\n\t var $address2 = template.find('.js-storeAddress2');\n\t fillStoreAddress(template, store, $address1, $address2);\n\n\t template.find('.js-storeCity').html(store.city ? store.city + ',' : '');\n\t template.find('.js-storeStateCode').html(store.sCode ? store.sCode + ',' : '');\n\t template.find('.js-storeDistrict').html(store.district ? store.district + ',' : '');\n\t template.find('.js-storeSubdistrict').html(store.subdistrict ? store.subdistrict + ',' : '');\n\t $storePCode.html(store.pCode);\n\t $storePCode.attr('data-public-postal-code', zipCodeForShipping || '');\n\t if (storePhone && storePhone.length > 0) {\n\t $phone.html(storePhone);\n\t $phone.attr('href', 'tel:' + storePhone);\n\t $phone.removeClass('d-none');\n\t } else {\n\t $phone.addClass('d-none');\n\t }\n\t template.find('.js-storeHours').html(unescape(store.hours ? store.hours : ''));\n\t var storeTemplate = template.clone();\n\n\t return storeTemplate[0].outerHTML;\n\t}\n\n\t/**\n\t * Create pin and stores tile from Stores-Find response data\n\t * @param {Object} data - the response from Stores-FindStores\n\t * @return {Object} pins and store list templates\n\t */\n\tfunction showStoresResults(data, isFilterByStoreBrands) {\n\t var stores = data.stores,\n\t pins = [],\n\t storeList = '',\n\t markerTemplate = $($('#storeMarkerTemplate')[0].content.children[0]),\n\t listTemplate = $($('#storeTileTemplate')[0].content.children[0]),\n\t controllerURL = data.controllerURL;\n\t stores.forEach(function (store) {\n\t pins.push(buildStoreMarkerPin(store, markerTemplate, false, isFilterByStoreBrands, controllerURL));\n\t storeList += buildStoreCard(store, listTemplate, isFilterByStoreBrands, controllerURL);\n\t });\n\t return {\n\t pins: pins,\n\t storeList: storeList\n\t };\n\t}\n\n\t/**\n\t * Create a store tile from a collection point when the \"select\" button in checkout is selected\n\t * @param {Object} pickupPoint - the collection point object\n\t * @param {template} template -the template which will populated using the pickup point data\n\t */\n\tfunction buildPickupPointCard(pickupPoint, template) {\n\t var $storePCode = template.find('.js-postalCode'),\n\t $city = template.find('.js-storeCity'),\n\t $distanceContainer = template.find('.js-storeDistanceContainer'),\n\t $storeNameSection = template.find('.js-storeName'),\n\t $storeAddress = template.find('.js-storeAddress'),\n\t $storeAddress2 = template.find('.js-storeAddress2'),\n\n\t // Only some collections points have stateCode (InPost for IT)\n\t $stateCode = template.find('.js-storeStateCode'),\n\n\t // zipCodePublic is only for pickup points in CZ, it has to be setted in the shipping address, but it has not to be displayed\n\t zipCodeForShipping = pickupPoint.pCodePublic,\n\t openingHours = pickupPoint.hours;\n\n\t $storeNameSection.html(pickupPoint.name);\n\t if (pickupPoint.dist && pickupPoint.dist !== 'null') {\n\t $distanceContainer.removeClass('d-none');\n\t $distanceContainer.find('.js-storeDistance').html(pickupPoint.dist + ' ' + pickupPoint.dUnit);\n\t } else {\n\t $distanceContainer.addClass('d-none');\n\t }\n\t // only some pickup points have the id, check useParcelShopCode attribute inside the shipping method\n\t template.attr('data-store-id', pickupPoint.ID);\n\t template.attr('data-companyname', pickupPoint.name);\n\t template.attr('data-cod-allowed', pickupPoint.codAllowed);\n\n\t // Grabbing the codAllowed value of the closest \"store\" selected and setting it in the selected Card.\n\t var codAllowed = template.attr('data-cod-allowed');\n\t $('#selectedStore').attr('data-cod-allowed', codAllowed);\n\t // Value that passes the codAllowed into the backend\n\t $('.js-selected-store-container').attr('data-cod-allowed', codAllowed);\n\n\t // Address2 is not present in pickup points\n\t // It is added for future implementation\n\t fillStoreAddress(template, pickupPoint, $storeAddress, $storeAddress2);\n\n\t $city.html(pickupPoint.city ? pickupPoint.city + ',' : '');\n\t $city.attr('data-city', pickupPoint.city);\n\t $storePCode.html(pickupPoint.pCode);\n\t $storePCode.attr('data-public-postal-code', zipCodeForShipping || '');\n\t if ($stateCode.length) {\n\t $stateCode.html(pickupPoint.sCode || '');\n\t }\n\t if (typeof openingHours === 'string' || !openingHours) {\n\t template.find('.js-storeHours').html(unescape(openingHours || ''));\n\t } else {\n\t var hoursTemplate = buildCollectionPointHoursTemplate(openingHours, template.find('.js-storeHours'));\n\t template.find('.js-storeHours').html(hoursTemplate);\n\t }\n\t var pickupPointTemplate = template.clone();\n\t var result = pickupPointTemplate[0].outerHTML;\n\n\t return result;\n\t}\n\n\tmodule.exports = {\n\t buildCollectionPointHoursTemplate: buildCollectionPointHoursTemplate,\n\t buildPickupPointCard: buildPickupPointCard,\n\t showPickupPointCODAllowed: showPickupPointCODAllowed,\n\t buildStoreMarkerPin: buildStoreMarkerPin,\n\t showStoresResults: showStoresResults,\n\t fillStoreAddress: fillStoreAddress\n\t};\n\n/***/ }),\n\n/***/ 94:\n/***/ (function(module, exports) {\n\n\t'use strict';\n\n\t// This file is used in storelocator, find in store, click & collect (+ collection point) page in order to manage the user position, wich is used to calculate the distances\n\n\tvar userPositionData = {\n\t userGeolocation: null,\n\t userAddress: null\n\t};\n\n\tvar lastAvailableGeolocationKey = 'lastAvailableGeolocation';\n\n\tfunction getUserPositionIfAvailable(callback) {\n\t var coords = {\n\t lat: null,\n\t lng: null,\n\t isDefaultCenterLocation: false\n\t };\n\t var success = function success(position) {\n\t coords.lat = position.coords.latitude;\n\t coords.lng = position.coords.longitude;\n\t callback(coords);\n\t };\n\t if (navigator.permissions) {\n\t navigator.permissions.query({ name: 'geolocation' }).then(function (result) {\n\t if (result.state === 'granted') {\n\t navigator.geolocation.getCurrentPosition(success);\n\t }\n\t });\n\t } else {\n\t callback(JSON.parse(localStorage.getItem(lastAvailableGeolocationKey)));\n\t }\n\t}\n\n\t/**\n\t * @description set the user's position, based on the type of it\n\t * @param {string} lat - the latitude to set\n\t * @param {string} long - the longitude to set\n\t * @param {string} type - 'userAddress' to set the user's Address, 'userGeolocation' to set user's geolocation position\n\t */\n\tfunction setUserPosition(lat, long, type) {\n\t if (lat && long) {\n\t userPositionData[type] = {\n\t lat: lat,\n\t long: long\n\t };\n\t }\n\t // if a browser does not support navigator permission -> save coords to localStorage\n\t if (type === 'userGeolocation' && !navigator.permissions && lat && long) {\n\t var coords = {\n\t lat: lat,\n\t lng: long,\n\t isDefaultCenterLocation: false\n\t };\n\t localStorage.setItem(lastAvailableGeolocationKey, JSON.stringify(coords));\n\t }\n\t}\n\n\t/**\n\t * @description get the user position, if available\n\t * @param {boolean} isGeolocationSearch - true if user's address needs to be retrieved, false only for geolocation position\n\t * @return {Object.lat} the user's latitude if available\n\t * @return {Object.long} the user's longitude if available\n\t */\n\tfunction getUserPosition(isGeolocationSearch) {\n\t var result = {\n\t lat: null,\n\t long: null\n\t };\n\t if (isGeolocationSearch && userPositionData.userAddress) {\n\t result.lat = userPositionData.userAddress.lat;\n\t result.long = userPositionData.userAddress.long;\n\t }\n\t if (userPositionData.userGeolocation) {\n\t result.lat = userPositionData.userGeolocation.lat;\n\t result.long = userPositionData.userGeolocation.long;\n\t }\n\t return result;\n\t}\n\n\tmodule.exports = {\n\t setUserPosition: setUserPosition,\n\t getUserPosition: getUserPosition,\n\t getUserPositionIfAvailable: getUserPositionIfAvailable\n\t};\n\n/***/ }),\n\n/***/ 186:\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* globals google */\n\t'use strict';\n\n\tvar storelocatorTemplateHelper = __webpack_require__(93),\n\t userPositionHelper = __webpack_require__(94);\n\n\tvar autocomplete = void 0;\n\tvar markers = [];\n\tvar map,\n\t markerCluster,\n\t numberStoreToShow,\n\t storePins = [];\n\n\t/**\n\t * delete all the markers actually loaded on map\n\t */\n\tfunction deleteMarkers() {\n\t for (var i = 0; i < markers.length; i++) {\n\t markers[i].setMap(null);\n\t }\n\t markers = [];\n\t}\n\n\tvar isFilterByStoreBrands = $('.map-canvas').data('storelogic') === 'brands';\n\tvar isFilterByStoreTypes = $('.map-canvas').data('storelogic') === 'types';\n\n\t/**\n\t * update all the card and marker of Stores actually loaded on page\n\t */\n\tfunction updateStores() {\n\t var $storeButton = $('#button-map');\n\t var $loadMoreStoresButton = $('#button-loadStores');\n\t var mapCanvas = $('.map-canvas');\n\t var mapdiv = storePins;\n\t //Contains shop types if type logic is selected or shop brands if brand logic is selected\n\t var storetypes = mapCanvas.data('storetypes');\n\n\t // logic to control if there is at least one store type/brand selected in the checkbox group\n\t var isAtLeastOneStoreTypeSelected = false;\n\t for (var i = 0; i < storetypes.length; i++) {\n\t if ($('#' + storetypes[i] + '-type').prop('checked')) {\n\t isAtLeastOneStoreTypeSelected = true;\n\t break;\n\t }\n\t }\n\n\t var isAtLeastOneMarkerVisible = false;\n\n\t if (markerCluster) {\n\t markerCluster.clearMarkers();\n\t }\n\t if (markers.length > 0) {\n\t deleteMarkers();\n\t }\n\t if ($storeButton.hasClass(\"active\")) {\n\t var infowindow = new google.maps.InfoWindow();\n\t var bounds = new google.maps.LatLngBounds();\n\n\t Object.keys(mapdiv).forEach(function (key) {\n\t var item = mapdiv[key];\n\t var storeLocation;\n\t if (item.latitude && item.longitude) {\n\t storeLocation = new google.maps.LatLng(item.latitude, item.longitude);\n\t }\n\t var marker;\n\n\t // check if store has type selected in case of type logic\n\t var isTypeSelected = isFilterByStoreTypes && $('#' + item.type + '-type').prop('checked');\n\t // check if store has all selected brands in case of brand logic\n\t var isBrandSelected = isFilterByStoreBrands && $('#' + item.storeBrand + '-type').prop('checked');\n\n\t if (storeLocation && (isTypeSelected || isBrandSelected)) {\n\t var markerImageKey = isBrandSelected ? item.storeBrand : item.type;\n\t marker = new google.maps.Marker({\n\t position: storeLocation,\n\t title: item.name,\n\t icon: mapCanvas.data('markerimagepath')[markerImageKey]\n\t });\n\t marker.addListener('click', function () {\n\t infowindow.setOptions({\n\t content: item.infoWindowHtml\n\t });\n\t infowindow.open(map, marker);\n\t });\n\t // Create a minimum bound based on a set of storeLocations\n\t bounds.extend(marker.position);\n\t isAtLeastOneMarkerVisible = true;\n\n\t markers.push(marker);\n\t }\n\t });\n\n\t // if no store type selected go to default map center\n\t // else center map based on found stores\n\t if (!isAtLeastOneStoreTypeSelected || !isAtLeastOneMarkerVisible) {\n\t var defaultLat = parseFloat(mapCanvas.attr('defaultlat'));\n\t var defaultLong = parseFloat(mapCanvas.attr('defaultlong'));\n\t map.setCenter({\n\t lat: defaultLat,\n\t lng: defaultLong\n\t });\n\t } else {\n\t // eslint-disable-next-line no-undef\n\t markerCluster = new MarkerClusterer(map, markers, {\n\t imagePath: mapCanvas.attr('clusterimagepath')\n\t });\n\t // Fit the all the store marks in the center of a minimum bounds when any store has been found.\n\t if (mapdiv && mapdiv.length !== 0) {\n\t map.fitBounds(bounds);\n\t }\n\t }\n\t } else {\n\t $('.cc-store-list-card').each(function () {\n\t var child = $(this).find('.store-details')[0];\n\t var type = $(child).attr('type');\n\t var storeBrand = $(child).attr('storebrand');\n\n\t // check if store has type selected in case of type logic\n\t var isTypeSelected = isFilterByStoreTypes && $('#' + type + '-type').prop('checked');\n\t // check if store has all selected brands in case of brand logic\n\t var isBrandSelected = isFilterByStoreBrands && $('#' + storeBrand + '-type').prop('checked');\n\n\t if (isTypeSelected || isBrandSelected) {\n\t $(this).removeClass(\"d-none\");\n\t } else {\n\t $(this).addClass(\"d-none\");\n\t }\n\t });\n\t //display 8 stores\n\t numberStoreToShow = 8;\n\t var numberStoresDisplayed = 0;\n\t var isDisplayed = false;\n\t $('.cc-store-list-card').each(function () {\n\t isDisplayed = !$(this).hasClass(\"d-none\");\n\t if (isDisplayed) {\n\t numberStoresDisplayed++;\n\t if (numberStoresDisplayed <= 8) {\n\t $(this).removeClass(\"d-none\");\n\t } else {\n\t $(this).addClass(\"d-none\");\n\t }\n\t }\n\t });\n\t if (!isAtLeastOneStoreTypeSelected || numberStoresDisplayed <= 8) {\n\t $loadMoreStoresButton.addClass(\"d-none\");\n\t } else {\n\t $loadMoreStoresButton.removeClass(\"d-none\");\n\t }\n\t }\n\t}\n\n\t/**\n\t * Render label under the query form\n\t*/\n\tfunction updateStoresResultsLabel(numberOfStores) {\n\t var $result = $('.result-stores-number');\n\t var $error = $('.result-stores-number-error');\n\t var queryParam = $('#queryStoreParam')[0].value;\n\t if (queryParam !== \"\") {\n\t var displayMessage = String($result.data('message'));\n\t displayMessage = displayMessage.replace(\"{0}\", numberOfStores);\n\t displayMessage = displayMessage.replace(\"{1}\", \"\\\"\" + queryParam.toUpperCase() + \"\\\"\");\n\t $result.removeClass('d-none');\n\t $error.addClass('d-none');\n\t $result.html(displayMessage);\n\t } else {\n\t $error.removeClass('d-none');\n\t $result.addClass('d-none');\n\t }\n\t}\n\n\t/**\n\t * Render label under the query form in case of 0 stores were found by query\n\t * @param {boolean} NeedToBeDisplayed - specify if the label needs to be displayed or not\n\t */\n\tfunction showErrorLabel(NeedToBeDisplayed) {\n\t var $queryError = $('#errorQuery');\n\t var $errorLabel = $('.result-stores-number-error');\n\t var queryParam = $('#queryStoreParam')[0].value;\n\t if (NeedToBeDisplayed) {\n\t $errorLabel.removeClass('d-none');\n\t $queryError[0].textContent = queryParam;\n\t } else {\n\t $errorLabel.addClass('d-none');\n\t }\n\t}\n\n\t/**\n\t * Uses google maps api to render a map\n\t */\n\tfunction maps() {\n\t var mapCanvas = $('.map-canvas');\n\t var defaultLat = mapCanvas.attr('defaultlat');\n\t var defaultLong = mapCanvas.attr('defaultlong');\n\t var defaultZoom = parseInt(mapCanvas.attr('defaultzoom'));\n\n\t var latlng = new google.maps.LatLng(defaultLat, defaultLong);\n\t var mapOptions = {\n\t scrollwheel: false,\n\t zoom: defaultZoom,\n\t center: latlng,\n\t zoomControl: true,\n\t fullscreenControl: false,\n\t streetViewControl: false,\n\t mapTypeControl: false,\n\t styles: [{\n\t featureType: 'all',\n\t elementType: 'all',\n\t stylers: [{\n\t saturation: -100\n\t }]\n\t }]\n\t };\n\n\t map = new google.maps.Map($('.map-canvas')[0], mapOptions);\n\t}\n\n\t/**\n\t * Display 8 more stores\n\t */\n\tfunction loadMoreStores() {\n\t numberStoreToShow = numberStoreToShow + 8;\n\t var numberStoresResult = 0;\n\t var numberStoresDisplayed = 0;\n\t var $loadMoreStoresButton = $('#button-loadStores');\n\n\t $('.cc-store-list-card').each(function () {\n\t var child = $(this).find('.store-details')[0];\n\t var itemTypeValue = $(child).attr('type');\n\t var storeBrand = $(child).attr('storebrand');\n\n\t // check if store has type selected in case of type logic\n\t var isTypeSelected = isFilterByStoreTypes && $('#' + itemTypeValue + '-type').prop('checked');\n\t // check if store has all selected brands in case of brand logic\n\t var isBrandSelected = isFilterByStoreBrands && $('#' + storeBrand + '-type').prop('checked');\n\t var itShouldBeDisplayed = isTypeSelected || isBrandSelected;\n\n\t if (itShouldBeDisplayed) {\n\t numberStoresResult++;\n\t }\n\t //display the store only if it has a eligible brand or type (and the number of stores already displayed is < that the number expected)\n\t if (numberStoresResult <= numberStoreToShow && itShouldBeDisplayed) {\n\t $(this).removeClass(\"d-none\");\n\t numberStoresDisplayed++;\n\t } else {\n\t $(this).addClass(\"d-none\");\n\t }\n\t });\n\t if (numberStoresDisplayed === numberStoresResult) {\n\t $loadMoreStoresButton.addClass(\"d-none\");\n\t } else {\n\t $loadMoreStoresButton.removeClass(\"d-none\");\n\t }\n\t}\n\n\t/**\n\t * Renders the results of the search and updates the map\n\t * @param {Object} data - Response from the server\n\t */\n\tfunction updateStoresResults(data) {\n\t var $resultsDiv = $('.results');\n\t var $mapDiv = $('.map-canvas');\n\t var hasResults = data.stores.length > 0;\n\t var storeResult = storelocatorTemplateHelper.showStoresResults(data, isFilterByStoreBrands);\n\n\t //update the pins data\n\t storePins = storeResult.pins;\n\n\t $resultsDiv.empty().data('has-results', hasResults).data('radius', data.radius).data('search-key', data.searchKey);\n\n\t //create the new store list\n\t $resultsDiv.html(storeResult.storeList);\n\n\t if ($mapDiv.data('has-google-api')) {\n\t updateStores();\n\t }\n\t}\n\n\t/**\n\t * Renders the results of the search and updates the map without update the result label\n\t * @param {string} lat - latitude to use in the query\n\t * @param {string} long - longitude to use in the query\n\t * @param {string} radius - optional, specify the radius to use in the query\n\t */\n\tfunction initSearch(lat, long, radius) {\n\t var $form = $('#queryStoreParam');\n\t var url = $form.attr('action');\n\t var userPosition = userPositionHelper.getUserPosition(true);\n\t var payload = {\n\t lat: lat,\n\t long: long,\n\t radius: radius,\n\t userPositionLat: userPosition.lat,\n\t userPositionLong: userPosition.long\n\t };\n\n\t $.ajax({\n\t url: url,\n\t type: $form.attr('method'),\n\t data: payload,\n\t dataType: 'json',\n\t success: function success(data) {\n\t updateStoresResults(data);\n\t $('.result-stores-number').addClass('d-none');\n\t showErrorLabel(false);\n\t }\n\t });\n\t}\n\n\t/**\n\t * Makes the suggestion box visible only if the user has inserted at least 2 characters into the input field\n\t */\n\tfunction noSuggestionBox() {\n\t $('#queryStoreParam').on('input change focus keydown keyup', function (e) {\n\t if ($('#queryStoreParam')[0].value.length < 2) {\n\t //block the normal behavior every time except if the user has pressed the \"enter\" key\n\t if (e.which !== 13 || e.type === 'keydown') {\n\t //stop scrolling the previous results if the user press the arrows keys\n\t if ($('.pac-item').length > 0 && (e.which === 40 || e.which === 38)) {\n\t e.preventDefault();\n\t }\n\t e.stopImmediatePropagation();\n\t }\n\t $('.pac-container').addClass('d-none');\n\t } else {\n\t var $googleSuggestion = $('.pac-container');\n\t $googleSuggestion.removeClass('pac-logo');\n\t $googleSuggestion.removeClass('d-none');\n\t }\n\t });\n\t}\n\n\tfunction defaultLandingSearch() {\n\t var mapCanvas = $('.map-canvas');\n\t var defaultLat = mapCanvas.attr('defaultlat'),\n\t defaultLong = mapCanvas.attr('defaultlong'),\n\t radius = mapCanvas.attr('defaultradius');\n\t initSearch(defaultLat, defaultLong, radius);\n\t}\n\n\t/**\n\t * Renders the results of the search and updates the map\n\t * @param {string} lat - latitude to use in the query\n\t * @param {string} long - longitude to use in the query\n\t * @param {string} radius - optional, specify the radius to use in the query\n\t */\n\tvar getSuggestionUser = function getSuggestionUser(predictions) {\n\t if (predictions) {\n\t var geocoder = new google.maps.Geocoder();\n\t geocoder.geocode({ placeId: predictions[0].place_id }, function (results) {\n\t var lat = results[0].geometry.location.lat(),\n\t long = results[0].geometry.location.lng();\n\t userPositionHelper.setUserPosition(lat, long, 'userAddress');\n\t var mapCanvas = $('.map-canvas');\n\t var radius = mapCanvas.attr('defaultradius');\n\t initSearch(lat, long, radius);\n\t });\n\t } else {\n\t //no address suggestion available for user's address go with the default search\n\t defaultLandingSearch();\n\t }\n\t};\n\n\t/**\n\t * Check if the user has an address, otherwise search all stores in the country\n\t */\n\tfunction getOtherAddress() {\n\t var userAddr = document.getElementById('user_addr').value;\n\t if (userAddr !== \"null\") {\n\t var service = new google.maps.places.AutocompleteService();\n\t var geocodeRestriction = $('#queryStoreParam').attr('geocoderestriction');\n\t service.getPlacePredictions({\n\t input: userAddr,\n\t componentRestrictions: {\n\t country: geocodeRestriction\n\t }\n\t }, getSuggestionUser);\n\t } else {\n\t var mapCanvas = $('.map-canvas');\n\t var lat = mapCanvas.attr('defaultlat'),\n\t long = mapCanvas.attr('defaultlong'),\n\t radius = mapCanvas.attr('defaultradius');\n\t initSearch(lat, long, radius);\n\n\t $('.welcomephrase').removeClass('d-none');\n\t }\n\t}\n\n\t/**\n\t* Ask the user if he wants to use his position to execute a search in his proximity\n\t*/\n\tfunction geolocationInit() {\n\t // Init listener on input field\n\t noSuggestionBox();\n\t if (navigator.geolocation) {\n\t navigator.geolocation.getCurrentPosition(function (position) {\n\t var lat = position.coords.latitude,\n\t long = position.coords.longitude;\n\t userPositionHelper.setUserPosition(lat, long, 'userGeolocation');\n\t defaultLandingSearch();\n\n\t map.setCenter({\n\t lat: lat,\n\t lng: long\n\t });\n\t }, getOtherAddress);\n\t }\n\t}\n\n\t/**\n\t * Renders the results of the search, updates the map and the results label\n\t * @param {string} lat - latitude to use in the query\n\t * @param {string} long - longitude to use in the query\n\t * @param {string} radius - optional, specify the radius to use in the query\n\t */\n\tfunction searchStore(lat, long, radius, options) {\n\t $('.welcomephrase').addClass('d-none');\n\t var $form = $('#queryStoreParam'),\n\t zoom = parseInt($('.map-canvas').attr('defaultzoom')),\n\t url = $form.attr('action');\n\n\t var userPosition = userPositionHelper.getUserPosition(options.isGeoLocationSearch);\n\n\t var payload = {\n\t lat: lat,\n\t long: long,\n\t radius: radius,\n\t userPositionLat: userPosition.lat || lat,\n\t userPositionLong: userPosition.long || long\n\t };\n\n\t $.ajax({\n\t url: url,\n\t type: $form.attr('method'),\n\t data: payload,\n\t dataType: 'json',\n\t success: function success(data) {\n\t updateStoresResults(data);\n\t if ($('.js-storelocator-setcenter').data('storelocator-setcenter') === true) {\n\t map.setCenter({\n\t lat: lat,\n\t lng: long\n\t });\n\t map.setZoom(zoom);\n\t }\n\t if (data.hasNoResult) {\n\t updateStoresResultsLabel(0);\n\t showErrorLabel(true);\n\t } else {\n\t updateStoresResultsLabel(data.stores.length);\n\t showErrorLabel(false);\n\t }\n\t }\n\t });\n\t}\n\n\t/**\n\t * Dafault search for storelocator\n\t*/\n\tfunction defaultSearch() {\n\t var mapCanvas = $('.map-canvas');\n\t var lat = mapCanvas.attr('defaultlat'),\n\t long = mapCanvas.attr('defaultlong'),\n\t radius = mapCanvas.attr('defaultradius');\n\t searchStore(lat, long, radius, { isGeoLocationSearch: true });\n\t}\n\n\t/**\n\t * Get coordinates from the suggestion of google and execute a search\n\t */\n\tfunction fillInAddress() {\n\t var place = autocomplete.getPlace();\n\t if (place.geometry) {\n\t var lat = place.geometry.location.lat();\n\t var long = place.geometry.location.lng();\n\t searchStore(lat, long, false, {});\n\t }\n\t}\n\n\t/**\n\t * Renders the results of the search and updates the map\n\t * @param {Object} predictions - the predictions from Google Maps service\n\t */\n\tvar getSuggestion = function getSuggestion(predictions) {\n\t if (predictions) {\n\t var geocoder = new google.maps.Geocoder();\n\t geocoder.geocode({ placeId: predictions[0].place_id }, function (results) {\n\n\t var lat = results[0].geometry.location.lat(),\n\t long = results[0].geometry.location.lng();\n\t searchStore(lat, long, false, {});\n\t });\n\t } else {\n\t //no suggestion available for the query param, search stores by default lat and long, then show error messages\n\t var mapCanvas = $('.map-canvas');\n\t var lat = mapCanvas.attr('defaultlat'),\n\t long = mapCanvas.attr('defaultlong'),\n\t radius = mapCanvas.attr('defaultradius');\n\t searchStore(lat, long, radius, { isGeoLocationSearch: true });\n\t }\n\t};\n\n\tfunction changeMapVisualization() {\n\n\t var $storeButton = $('#button-map');\n\t var $listButton = $('#button-list');\n\t var $storeList = $('#storeList');\n\t var $storeMap = $('#storeMap');\n\t var $loadMoreStoresButton = $('#button-loadStores');\n\n\t $listButton.removeClass(\"active\");\n\t $storeButton.addClass(\"active\");\n\t $storeList.addClass(\"d-none\");\n\t $storeMap.removeClass(\"d-none\");\n\t $loadMoreStoresButton.addClass(\"d-none\");\n\n\t updateStores();\n\t}\n\n\tfunction changeListVisualization() {\n\n\t var $storeButton = $('#button-map');\n\t var $listButton = $('#button-list');\n\t var $storeList = $('#storeList');\n\t var $storeMap = $('#storeMap');\n\t var $loadMoreStoresButton = $('#button-loadStores');\n\n\t $storeButton.removeClass(\"active\");\n\t $listButton.addClass(\"active\");\n\t $storeMap.addClass(\"d-none\");\n\t $storeList.removeClass(\"d-none\");\n\t $loadMoreStoresButton.removeClass(\"d-none\");\n\n\t updateStores();\n\t}\n\n\tmodule.exports = {\n\t init: function init() {\n\t geolocationInit();\n\t if ($('.map-canvas').data('has-google-api')) {\n\t maps();\n\t }\n\t if (!$('.results').data('has-results')) {\n\t $('.store-locator-no-results').show();\n\t }\n\t },\n\n\t updateStoreType: function updateStoreType() {\n\t $('body').on('change', '.checkboxTypeStore', function () {\n\t updateStores();\n\t });\n\t },\n\n\t initAutocomplete: function initAutocomplete() {\n\t $(document).ready(function () {\n\t var geocodeRestriction = $('#queryStoreParam').attr('geocoderestriction');\n\t var placeTypes = $('#queryStoreParam').attr('data-place-types');\n\t autocomplete = new google.maps.places.Autocomplete(document.getElementById('queryStoreParam'), {\n\t types: placeTypes !== \"\" ? placeTypes.split(',') : [],\n\t componentRestrictions: {\n\t country: geocodeRestriction\n\t }\n\t });\n\t autocomplete.addListener(\"place_changed\", fillInAddress);\n\t });\n\t },\n\n\t watchMap: function watchMap() {\n\t $('#button-map').click(function () {\n\t changeMapVisualization();\n\t });\n\t },\n\n\t watchList: function watchList() {\n\t $('#button-list').click(function () {\n\t changeListVisualization();\n\t });\n\t },\n\n\t loadMoreStoresButton: function loadMoreStoresButton() {\n\t $('#button-loadStores').click(function () {\n\t loadMoreStores();\n\t });\n\t },\n\n\t geolocalizationButton: function geolocalizationButton() {\n\t $('#storeLocationButton').click(function () {\n\t defaultLandingSearch();\n\t });\n\t },\n\n\t searchButton: function searchButton() {\n\t $('#searchStore').click(function () {\n\t var queryParam = $('#queryStoreParam')[0].value;\n\t if (queryParam !== \"\") {\n\t var geocodeRestriction = $('#queryStoreParam').attr('geocoderestriction');\n\t var placeTypes = $('#queryStoreParam').attr('data-place-types');\n\t var service = new google.maps.places.AutocompleteService();\n\t var options = {\n\t input: queryParam,\n\t types: placeTypes !== \"\" ? placeTypes.split(',') : [],\n\t componentRestrictions: {\n\t country: geocodeRestriction\n\t }\n\t };\n\t service.getPlacePredictions(options, getSuggestion);\n\t $('.welcomephrase').addClass('d-none');\n\t $('.result-stores-number').removeClass('d-none');\n\t } else {\n\t defaultSearch();\n\t $('.welcomephrase').removeClass('d-none');\n\t $('.result-stores-number').addClass('d-none');\n\t }\n\t });\n\t },\n\n\t enterKey: function enterKey() {\n\t $('#queryStoreParam').keyup(function (e) {\n\t //which = 13 -> enter key pressed\n\t if (e.which === 13) {\n\t $('#searchStore').trigger('click');\n\t }\n\t });\n\t }\n\t};\n\n/***/ })\n\n/******/ });"],"names":["modules","installedModules","__webpack_require__","moduleId","module","exports","id","loaded","call","m","c","p","0","processInclude","$","document","ready","3","_typeof","Symbol","iterator","obj","constructor","prototype","include","Object","keys","forEach","key","93","buildCollectionPointHoursTemplate","openingHours","$daytemplate","$hoursTemplate","children","clone","result","createElement","i","length","dayOfWeek","find","html","day","combinedHours","hours","join","appendTo","fillStoreAddress","template","store","$address1","$address2","a2","a1","buildStoreMarkerPin","isClickAndCollect","isFilterByStoreBrands","controllerURL","hideStoreDetailsButton","type","typeDV","brand","brandDV","storeID","ID","storeDetailUrl","dist","dUnit","storePhone","phone","$storeInfo","$storeNameSection","data","attr","$phoneContainer","$phone","$storePCode","zipCodeForShipping","pCodePublic","distance","name","storePinHtml","city","sCode","district","subdistrict","pCode","trim","removeClass","addClass","hoursTemplate","unescape","removeAttr","tileTemplateID","url","querySelector","content","getAttribute","$storeInfoButton","remove","latitude","lat","longitude","long","storeBrand","infoWindowHtml","buildPickupPointCard","pickupPoint","$city","$distanceContainer","$storeAddress","$storeAddress2","$stateCode","codAllowed","outerHTML","showPickupPointCODAllowed","codNotAvailableMsg","codAllowedString","setAttribute","textContent","showStoresResults","stores","pins","storeList","markerTemplate","listTemplate","push","JSON","stringify","94","userPositionData","userGeolocation","userAddress","lastAvailableGeolocationKey","setUserPosition","navigator","permissions","localStorage","setItem","lng","isDefaultCenterLocation","getUserPosition","isGeolocationSearch","getUserPositionIfAvailable","callback","success","position","coords","query","then","state","geolocation","getCurrentPosition","parse","getItem","186","map","markerCluster","numberStoreToShow","storelocatorTemplateHelper","userPositionHelper","autocomplete","markers","storePins","isFilterByStoreTypes","updateStores","$storeButton","$loadMoreStoresButton","mapCanvas","mapdiv","storetypes","isAtLeastOneStoreTypeSelected","prop","infowindow","bounds","defaultLong","numberStoresDisplayed","isAtLeastOneMarkerVisible","clearMarkers","setMap","hasClass","google","maps","InfoWindow","LatLngBounds","storeLocation","marker","item","isTypeSelected","LatLng","isBrandSelected","markerImageKey","Marker","title","icon","addListener","setOptions","open","extend","MarkerClusterer","imagePath","fitBounds","defaultLat","parseFloat","setCenter","each","child","this","updateStoresResultsLabel","numberOfStores","displayMessage","$result","$error","queryParam","value","String","replace","toUpperCase","showErrorLabel","NeedToBeDisplayed","$queryError","$errorLabel","updateStoresResults","$resultsDiv","$mapDiv","hasResults","storeResult","empty","radius","searchKey","initSearch","$form","userPosition","payload","userPositionLat","userPositionLong","ajax","dataType","defaultLandingSearch","getSuggestionUser","predictions","Geocoder","geocode","placeId","place_id","results","geometry","location","getOtherAddress","geocodeRestriction","userAddr","getElementById","service","places","AutocompleteService","getPlacePredictions","input","componentRestrictions","country","geolocationInit","on","e","which","preventDefault","stopImmediatePropagation","$googleSuggestion","searchStore","options","zoom","parseInt","isGeoLocationSearch","setZoom","hasNoResult","fillInAddress","place","getPlace","getSuggestion","init","mapOptions","scrollwheel","center","zoomControl","fullscreenControl","streetViewControl","mapTypeControl","styles","featureType","elementType","stylers","saturation","Map","show","updateStoreType","initAutocomplete","placeTypes","Autocomplete","types","split","watchMap","click","$listButton","$storeList","$storeMap","watchList","loadMoreStoresButton","numberStoresResult","itemTypeValue","itShouldBeDisplayed","geolocalizationButton","searchButton","enterKey","keyup","trigger"],"mappings":"AAAS,CAAA,SAAUA,GAET,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,IAIIC,EAJJ,OAAGH,EAAiBE,KAIhBC,EAASH,EAAiBE,GAAY,CACzCE,QAAS,GACTC,GAAIH,EACJI,OAAQ,CAAA,CACT,EAGAP,EAAQG,GAAUK,KAAKJ,EAAOC,QAASD,EAAQA,EAAOC,QAASH,CAAmB,EAGlFE,EAAOG,OAAS,CAAA,EAGTH,IAhB4BC,OAiBpC,CAIAH,EAAoBO,EAAIT,EAGxBE,EAAoBQ,EAAIT,EAGxBC,EAAoBS,EAAI,GAGjBT,EAAoB,CAAC,CAC5B,EAEA,CAEJU,EACA,SAAUR,EAAQC,EAASH,GAIhC,IAAIW,EAAiBX,EAAoB,CAAC,EAE1CY,EAA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