1/*! @version pwa-studio: 0.0.1, @magento/venia-ui: ~11.3.0, @magento/upward-security-headers: ~1.0.14, @magento/pwa-theme-venia: ~2.4.0, @magento/pwa-buildpack: ~11.4.3, @magento/peregrine: ~14.2.1, @magento/pagebuilder: ~9.2.1, @magento/eslint-config: ~1.5.0, @magento/babel-preset-peregrine: ~1.2.3, @apollo/client: ~3.5.0 */ 2(window.webpackJsonp=window.webpackJsonp||[]).push([[77],{"+fQW":function(t,e,n){t.exports=n.p+"storeSelect-iZ3.png"},DU7E:function(t,e,n){t.exports=n.p+"storeNotSelect-nBV.png"},"x+Ak":function(t,e,n){"use strict" 3n.r(e) 4var o=n("J4zp"),l=n.n(o),a=n("q1tI"),c=n.n(a),i=n("DrT9"),r=n("Fvk+"),u=n("zAJy"),f=n("DU7E"),s=n.n(f),g=n("+fQW"),p=n.n(g),v=Object(u.a)(),d=(new r.a).getItem("store_view_code")||"en_US",k={lat:22.3193,lng:114.1694},b=function StoreMarkers(t){var e=t.activeMarker,n=t.locationList,o=t.onMarkerClick 5return Object(i.g)()?n.map(function(t){var n=t.key===e 6return c.a.createElement(i.f,{key:t.key,position:t.location,icon:{url:n?p.a:s.a,scaledSize:new google.maps.Size(n?44:40,n?50:46)},onClick:function onClick(){return o(t)},zIndex:n?1e3:1})}):null},m=function MapController(t){var e=t.currentPick,n=t.locationList,o=Object(i.g)(),l=Object(a.useRef)(!1) 7return Object(a.useEffect)(function(){if(e&&o){var t,l=n.find(function(t){return t.id===e}) 8if(l&&0!==(null===(t=l.location)||void 0===t?void 0:t.lat)){var a=l.location,c={lat:a.lat,lng:a.lng} 9try{"function"==typeof o.panTo&&(o.panTo(c),o.setZoom(15))}catch(t){}}}},[e,n,o]),Object(a.useEffect)(function(){if(!l.current&&!e&&o&&n&&n.length>0){var t,a=null===(t=n[0])||void 0===t?void 0:t.location 10if(a&&a.lat&&a.lng&&0!==a.lat)try{"function"==typeof o.panTo&&(o.panTo({lat:a.lat,lng:a.lng}),l.current=!0)}catch(t){}}},[e,n,o]),null} 11e.default=function StoreGooleMap(t){var e=t.locationList,n=t.pickLocation,o=t.currentPick,r=Object(a.useState)(null),u=l()(r,2),f=u[0],s=u[1],g=Object(a.useState)(!1),p=l()(g,2),j=(p[0],p[1]),O=Object(a.useState)(null),E=l()(O,2),y=E[0],C=E[1],S=Object(a.useState)({lat:0,lng:0}),w=l()(S,2),h=(w[0],w[1]),z=Object(a.useRef)(!1) 12Object(a.useEffect)(function(){if(!z.current&&e&&e.length>0){var t,n=null===(t=e[0])||void 0===t?void 0:t.location 13if(null!=n&&n.lat&&null!=n&&n.lng){var o={lat:n.lat,lng:n.lng} 14s(o),z.current=!0}}},[e]),Object(a.useEffect)(function(){if(o){var t,n=e.find(function(t){return t.id===o}) 15if(n&&0!==(null===(t=n.location)||void 0===t?void 0:t.lat)){var l=n.location,a=l.lat,c=l.lng 16h({lat:a,lng:c}),C(o),j(!0)}}else C(null),j(!1)},[o,e]) 17return Object(a.useEffect)(function(){null===y&&j(!1)},[y]),c.a.createElement("div",{id:"map",className:"map-container",style:{height:"100%"}},c.a.createElement(i.a,{apiKey:v,language:"zh_HK"==d?"zh-HK":"en"},c.a.createElement(i.e,{defaultZoom:10,defaultCenter:f||k,options:{draggable:!0,zoomControl:!0,gestureHandling:"auto",fullscreenControl:!0,mapTypeControl:!1,streetViewControl:!1}},c.a.createElement(m,{currentPick:o,locationList:e}),c.a.createElement(b,{activeMarker:y,locationList:e||[],onMarkerClick:function onMarkerClick(t){C(t.key),j(!0),h({lat:t.location.lat,lng:t.location.lng}),n(t)}}))))}}}])
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.