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J,EAAI8B,GAAI9B,EAAIlF,qBAAqBwH,EAAQ,IAAI,SAASpH,EAAOqH,GAAQ,OAAOtC,EAAG,MAAM,CAACO,IAAI+B,EAAOnC,YAAY,yBAAyB,CAACJ,EAAIY,GAAG,2BAA2BZ,EAAIa,GAAG,GAAG3F,EAAOE,KAAKoH,MAAM,GAAI,MAAMtH,EAAOE,KAAKoH,OAAO,QAAQtH,EAAOM,MAAMgH,MAAM,GAAI,MAAMtH,EAAOM,MAAMgH,OAAO,MAAM,2BAA2B,IAAG,IAAIvC,EAAG,OAAO,CAACD,EAAIY,GAAGZ,EAAIa,GAAGb,EAAIc,GAAG,eAAe,EAAE,IAAG,KAAKd,EAAIW,OAAOX,EAAIW,MAAM,KAAKX,EAAIY,GAAG,KAAKX,EAAG,UAAU,CAACwB,IAAI,OAAOpB,MAAM,CAAC,OAASL,EAAItH,UAAU,KAAOsH,EAAIlH,KAAK,cAAc,UAAU,QAAUkH,EAAIvG,aAAauG,EAAI8B,GAAI9B,EAAa,WAAE,SAAS/B,EAAMqE,GAAO,OAAOrC,EAAG,aAAa,CAACO,IAAI8B,EAAMjC,MAAM,CAAC,SAAW,CAAC1H,IAAI8J,WAAWxE,EAAgB,UAAIrF,IAAI6J,WAAWxE,EAAiB,YAAI,WAAY,EAAK,WAAY,EAAM,MAAQA,EAAY,KAAE,KAAO+B,EAAInH,WAAWsI,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOpB,EAAIhC,eAAeC,EAAM,IAAI,IAAG,IAAI,IACl/J,EACIyE,EAAkB,E","sources":["webpack:///./resources/area/web/default/js/components/physical-store/StoreLocator.vue?be70","webpack:///./resources/area/web/default/js/components/physical-store/StoreLocator.vue","webpack:///./resources/area/web/default/js/components/physical-store/StoreLocator.vue?abfd","webpack:///./resources/area/web/default/js/components/physical-store/StoreLocator.vue?3d44"],"sourcesContent":["\nimport {Component, Vue, Prop} from 'vue-property-decorator';\nimport {required} from 'vee-validate/dist/rules';\nimport {ValidationProvider, ValidationObserver, extend} from 'vee-validate';\nimport * as VueGoogleMaps from 'gmap-vue';\n\nextend('required', required);\n\n@Component({\n name: 'physical-store-store-locator',\n components: {\n ValidationProvider,\n ValidationObserver\n }\n})\n\nexport default class extends Vue {\n $refs!: {\n gmap: VueGoogleMaps.Map;\n mapsInput: HTMLInputElement;\n };\n\n @Prop() readonly stores: Array<object>;\n @Prop() readonly countries: object;\n @Prop({default: ''}) readonly appointmentUrl: string;\n @Prop({default: null}) readonly country: null | string;\n\n private showSearchOverlay: boolean = true;\n\n private mapCenter: object = {lat: 52.132633, lng: 5.291266};\n private svgMarker: string = \"data:image/svg+xml,%0A%3Csvg width='24px' height='24px' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='Group'%3E%3Cpolygon id='Path' points='0 0 24 0 24 24 0 24'%3E%3C/polygon%3E%3Cpath d='M12,2.25 C16.1421356,2.25 19.5,5.60786438 19.5,9.75 C19.5,16.5 12,21.75 12,21.75 C12,21.75 4.5,16.5 4.5,9.75 C4.5,5.60786438 7.85786438,2.25 12,2.25 Z M12,6.75 C10.3431458,6.75 9,8.09314575 9,9.75 C9,11.4068542 10.3431458,12.75 12,12.75 C13.6568542,12.75 15,11.4068542 15,9.75 C15,8.09314575 13.6568542,6.75 12,6.75 Z' id='Combined-Shape' fill='%23000000'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E\";\n private zoom: number = 8;\n\n private selectedCountry: null | string = null;\n private searchQuery: string = '';\n private showSearchResults: boolean = false;\n private loading: boolean = false;\n private searchResultError: null | string = null;\n private selectedStoreId: null | number = null;\n private activeStore: object | null = null;\n\n private storeList: Array<object> = [];\n private nearestStoreList: Array<object> = [];\n private daysOfTheWeek: Array<string> = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];\n\n private mapOptions: object = {\n zoomControl: true,\n mapTypeControl: false,\n scaleControl: false,\n streetViewControl: false,\n rotateControl: false,\n fullscreenControl: false,\n disableDefaultUi: true\n };\n\n private infoOptions: object = {\n content: '',\n pixelOffset: {\n width: 0,\n height: -35\n }\n };\n private currentMidx: null | number = null;\n private infoWindowPos: object | null = null;\n\n private mounted(): void {\n this.selectedCountry = this.country;\n this.setMapCenter();\n }\n\n private created(): void {\n this.storeList = this.stores;\n }\n\n private formatOpeningHours(): { [key: number]: { open: string; close: string }[] } {\n const organizedPeriods: { [key: number]: { open: string; close: string }[] } = {};\n this.activeStore['opening_hours'].periods.forEach(period => {\n let {day} = period.open;\n const {time: openTime} = period.open;\n const {time: closeTime} = period.close;\n if (day === 0) {\n day = 7;\n }\n if ( ! organizedPeriods[day]) {\n organizedPeriods[day] = [];\n }\n organizedPeriods[day].push({open: openTime, close: closeTime});\n });\n\n return organizedPeriods;\n }\n\n private getUserLocation(): void {\n this.loading = true;\n this.searchResultError = null;\n\n const successCallback = (position) => {\n this.searchStores(position);\n };\n\n const errorCallback = (error) => {\n this.searchResultError = \"We couldn't retrieve your location, please try again or use the search function.\";\n this.loading = false;\n console.log(error);\n };\n\n navigator.geolocation.getCurrentPosition(successCallback, errorCallback);\n }\n\n private appointmentClick(): void {\n this.addDataLayerEvent('click', 'start_appointment', this.activeStore['name'], this.activeStore['sf_id']);\n }\n\n private storeViewClick(): void {\n this.addDataLayerEvent('click', 'store_page_click', this.activeStore['name'], this.activeStore['sf_id']);\n }\n\n private addDataLayerEvent(type: string, event: string, storeName: string, storeId: string): void {\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n 'event': event,\n 'type': type,\n 'store': storeName,\n 'store_id': storeId,\n });\n }\n\n private setMapCenter(): void {\n this.$refs.gmap.$mapPromise.then(() => {\n const geocoder = new google.maps.Geocoder();\n const _this = this;\n\n geocoder.geocode({'address': this.selectedCountry}, function (results, status) {\n if (status == google.maps.GeocoderStatus.OK) {\n _this.$refs.gmap.panTo(results[0].geometry.location);\n _this.$refs.gmap.fitBounds(results[0].geometry.viewport);\n\n _this.currentMidx = null;\n }\n });\n });\n }\n\n private closeInformationWindow(): void {\n this.selectedStoreId = null;\n this.activeStore = null;\n this.setMapCenter();\n }\n\n private setActiveStore(store: object): void {\n this.selectedStoreId = store['entity_id'] || null;\n this.activeStore = store;\n\n this.$refs.gmap.$mapPromise.then((map) => {\n const geocoder = new google.maps.Geocoder();\n const _this = this;\n\n const currentPosition = `${store['latitude']}, ${store['longitude']}`;\n\n geocoder.geocode({'address': currentPosition}, function (results, status) {\n if (status == google.maps.GeocoderStatus.OK) {\n _this.$refs.gmap.panTo(results[0].geometry.location);\n _this.$refs.gmap.fitBounds(results[0].geometry.viewport);\n map.setZoom(11);\n\n _this.currentMidx = null;\n }\n });\n });\n\n this.addDataLayerEvent('click', 'maps_info_click', store['name'], store['sf_id']);\n }\n\n private searchStores(position: GeolocationPosition = null): void {\n this.loading = true;\n this.searchResultError = null;\n this.nearestStoreList = [];\n\n this.$refs.gmap.$mapPromise.then(() => {\n const geocoder = new google.maps.Geocoder();\n const _this = this;\n\n let currentPosition = '';\n if (position) {\n currentPosition = `${position.coords.latitude.toString()}, ${position.coords.longitude.toString()}`;\n }\n\n geocoder.geocode({'address': this.searchQuery || currentPosition}, function (results, status) {\n if (status == google.maps.GeocoderStatus.OK) {\n if (position) {\n _this.searchQuery = results[0].formatted_address;\n _this.$refs.mapsInput.parentElement.classList.add('--placeholder');\n }\n\n _this.$solarClient.post('/api/physical-store/nearestStores', {\n lat: results[0].geometry.location.lat(),\n lng: results[0].geometry.location.lng(),\n limit: 5,\n max_distance: 50\n }).then((response) => {\n _this.nearestStoreList = response.data;\n _this.selectedCountry = results[0]['formatted_address'];\n _this.setMapCenter();\n\n if (_this.nearestStoreList.length === 0) {\n _this.searchResultError = 'No stores were found near the specified address.';\n }\n }).catch((error) => {\n _this.searchResultError = 'Something went wrong while searching for stores. Try again later.';\n }).finally(() => {\n _this.loading = false;\n _this.showSearchResults = true;\n _this.setActiveStore(_this.nearestStoreList[0]);\n });\n\n _this.currentMidx = null;\n } else {\n _this.searchResultError = 'Something went wrong while searching for stores. Try again later.';\n _this.loading = false;\n _this.showSearchResults = true;\n }\n });\n });\n }\n}\n","import { render, staticRenderFns } from \"./StoreLocator.vue?vue&type=template&id=05ca5c44&\"\nimport script from \"./StoreLocator.vue?vue&type=script&lang=ts&\"\nexport * from \"./StoreLocator.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../../../../../node_modules/ts-loader/index.js??clonedRuleSet-6.use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./StoreLocator.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../../../node_modules/ts-loader/index.js??clonedRuleSet-6.use[0]!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./StoreLocator.vue?vue&type=script&lang=ts&\"","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"store-locator__container\"},[_c('div',{staticClass:\"--container\"},[_c('div',{staticClass:\"search__wrapper\"},[_c('div',{staticClass:\"--search\"},[_c('ValidationObserver',{staticClass:\"search__container\",attrs:{\"tag\":\"div\"},scopedSlots:_vm._u([{key:\"default\",fn:function({ handleSubmit }){return [(_vm.loading)?_c('div',{staticClass:\"--loading\"},[_c('div',{staticClass:\"--spinner --small\"})]):_vm._e(),_vm._v(\" \"),_c('h3',[_vm._v(_vm._s(_vm.$t('Find a store near you.')))]),_vm._v(\" \"),_c('form',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.showSearchOverlay),expression:\"showSearchOverlay\"}],staticClass:\"search__form\",attrs:{\"enctype\":\"application/x-www-form-urlencoded\"},on:{\"submit\":function($event){$event.preventDefault();$event.stopPropagation();return handleSubmit(_vm.searchStores)}}},[_c('button',{on:{\"click\":function($event){$event.preventDefault();$event.stopPropagation();return _vm.getUserLocation()}}},[_vm._v(_vm._s(_vm.$t('Use my location')))]),_vm._v(\" \"),_c('div',[_c('ValidationProvider',{staticClass:\"input__holder\",attrs:{\"name\":_vm.$t('Zip code or municipality'),\"rules\":\"required\",\"skip-if-empty\":false,\"autocomplete\":\"off\",\"slim\":\"\"},scopedSlots:_vm._u([{key:\"default\",fn:function({ errors, classes }){return [_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.searchQuery),expression:\"searchQuery\"}],ref:\"mapsInput\",attrs:{\"id\":\"search-input\",\"type\":\"text\",\"placeholder\":_vm.$t('Zip code or municipality'),\"disabled\":_vm.loading,\"data-placeholder\":\"\"},domProps:{\"value\":(_vm.searchQuery)},on:{\"input\":function($event){if($event.target.composing)return;_vm.searchQuery=$event.target.value}}}),_vm._v(\" \"),(errors.length)?_c('span',{staticClass:\"--error\"},[_vm._v(_vm._s(errors[0]))]):_vm._e()]}}],null,true)}),_vm._v(\" \"),_c('button',{staticClass:\"--button --small\",class:{ '--btn-loading': _vm.loading },attrs:{\"type\":\"submit\",\"disabled\":_vm.loading}},[_vm._v(_vm._s(_vm.$t('Search'))+\"\\n \")])],1)]),_vm._v(\" \"),(_vm.nearestStoreList.length > 0)?_c('div',{staticClass:\"nearest-store__container\"},_vm._l((_vm.nearestStoreList),function(nearestStore){return _c('button',{class:{'--active': nearestStore['entity_id'] === _vm.activeStore?.entity_id},on:{\"click\":function($event){return _vm.setActiveStore(nearestStore)}}},[_vm._v(\"\\n \"+_vm._s(nearestStore['name'])+\"\\n \"+_vm._s(nearestStore['city'])+\"\\n \")])}),0):_c('div',{staticClass:\"--info\"},[_vm._t(\"content\"),_vm._v(\" \"),_c('a',{staticClass:\"--button --dot --small\",attrs:{\"href\":_vm.appointmentUrl},on:{\"click\":function($event){return _vm.appointmentClick()}}},[_vm._v(_vm._s(_vm.$t('Plan an appointment')))])],2)]}}])}),_vm._v(\" \"),(_vm.activeStore)?_c('div',{staticClass:\"active__store\"},[_c('button',{staticClass:\"--button\",on:{\"click\":function($event){return _vm.closeInformationWindow()}}}),_vm._v(\" \"),_c('div',{staticClass:\"store__info\"},[_c('h4',[_vm._v(_vm._s(_vm.activeStore['name']))]),_vm._v(\" \"),_c('address',[_c('p',[_vm._v(_vm._s(_vm.activeStore['street'])+\" \"+_vm._s(_vm.activeStore['housenumber']))]),_vm._v(\" \"),_c('p',[_vm._v(_vm._s(_vm.activeStore['postalcode'])+\", \"+_vm._s(_vm.activeStore['city']))])]),_vm._v(\" \"),(_vm.activeStore['phone'])?_c('a',{staticClass:\"--tel\",attrs:{\"href\":`tel:${_vm.activeStore['phone']}`}},[_vm._v(_vm._s(_vm.activeStore['phone']))]):_vm._e(),_vm._v(\" \"),_c('a',{staticClass:\"--email\",attrs:{\"href\":`mailto:${_vm.activeStore['email']}`}},[_vm._v(_vm._s(_vm.activeStore['email']))]),_vm._v(\" \"),_c('a',{staticClass:\"--button --small\",attrs:{\"href\":_vm.activeStore['url']},on:{\"click\":function($event){return _vm.storeViewClick()}}},[_vm._v(_vm._s(_vm.$t('View store')))])]),_vm._v(\" \"),(_vm.activeStore.opening_hours && Object.keys(_vm.activeStore.opening_hours || {}).length)?_c('div',{staticClass:\"store__opening-hours\"},[_c('span',[_vm._v(_vm._s(_vm.$t('Opening hours'))+\":\")]),_vm._v(\" \"),_c('ul',_vm._l((_vm.daysOfTheWeek),function(day,index){return _c('li',{key:index},[_c('span',[_vm._v(_vm._s(_vm.$t(day)))]),_vm._v(\" \"),(_vm.formatOpeningHours()[index + 1])?[_c('div',{staticClass:\"opening-hours__period-container\"},_vm._l((_vm.formatOpeningHours()[index + 1]),function(period,pIndex){return _c('div',{key:pIndex,staticClass:\"opening-hours__period\"},[_vm._v(\"\\n \"+_vm._s(`${period.open.slice(0, -2)}:${period.open.slice(-2)} - ${period.close.slice(0, -2)}:${period.close.slice(-2)}`)+\"\\n \")])}),0)]:_c('span',[_vm._v(_vm._s(_vm.$t('Closed')))])],2)}),0)]):_vm._e()]):_vm._e()],1)]),_vm._v(\" \"),_c('GmapMap',{ref:\"gmap\",attrs:{\"center\":_vm.mapCenter,\"zoom\":_vm.zoom,\"map-type-id\":\"terrain\",\"options\":_vm.mapOptions}},_vm._l((_vm.storeList),function(store,index){return _c('GmapMarker',{key:index,attrs:{\"position\":{lat:parseFloat(store['latitude']), lng:parseFloat(store['longitude'])},\"clickable\":true,\"draggable\":false,\"title\":store['name'],\"icon\":_vm.svgMarker},on:{\"click\":function($event){return _vm.setActiveStore(store)}}})}),1)],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }"],"names":["extend","required","Vue","showSearchOverlay","mapCenter","lat","lng","svgMarker","zoom","selectedCountry","searchQuery","showSearchResults","loading","searchResultError","selectedStoreId","activeStore","storeList","nearestStoreList","daysOfTheWeek","mapOptions","zoomControl","mapTypeControl","scaleControl","streetViewControl","rotateControl","fullscreenControl","disableDefaultUi","infoOptions","content","pixelOffset","width","height","currentMidx","infoWindowPos","mounted","this","country","setMapCenter","created","stores","formatOpeningHours","organizedPeriods","periods","forEach","period","day","open","time","openTime","closeTime","close","push","getUserLocation","navigator","geolocation","getCurrentPosition","position","searchStores","error","console","log","appointmentClick","addDataLayerEvent","storeViewClick","type","event","storeName","storeId","window","dataLayer","$refs","gmap","$mapPromise","then","geocoder","google","maps","Geocoder","_this","geocode","results","status","GeocoderStatus","OK","panTo","geometry","location","fitBounds","viewport","closeInformationWindow","setActiveStore","store","map","currentPosition","setZoom","coords","latitude","toString","longitude","formatted_address","mapsInput","parentElement","classList","add","$solarClient","post","limit","max_distance","response","data","length","catch","finally","Prop","Array","default","Component","name","components","ValidationProvider","ValidationObserver","render","_vm","_c","_self","_setupProxy","staticClass","attrs","scopedSlots","_u","key","fn","handleSubmit","_e","_v","_s","$t","directives","rawName","value","expression","on","$event","preventDefault","stopPropagation","errors","classes","ref","domProps","target","composing","class","_l","nearestStore","entity_id","_t","appointmentUrl","opening_hours","Object","keys","index","pIndex","slice","parseFloat","staticRenderFns"],"sourceRoot":""}