1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2156],{72156:function(e,r,t){t.r(r),t.d(r,{LocationMap:function(){return c}});var n=t(57437),o=t(2265),l=t(60759),a=t.n(l),u=t(49393);t(35046),t(26057);var i=t(46561);function c(e){let{initialCenter:r,initialZoom:t,selectedLocation:l=null,minZoomForSelect:c=14,onMapHandleReady:s,onMapClick:m,showLocateControl:d=!0,onViewChange:g,interactive:p=!0,showBasemapToggle:f=!1,initialBasemap:h="map",draggableMarker:v=!0,onBasemapChange:y}=e,b=(0,o.useRef)(null),x=(0,o.useRef)(null),w=(0,o.useRef)(null),k=(0,o.useRef)(null),z=(0,o.useRef)(null),R=(0,o.useRef)(null),Z=(0,o.useRef)(h),L=(0,o.useRef)(m),S=(0,o.useRef)(s),T=(0,o.useRef)(g),C=(0,o.useRef)(y),E=(0,o.useRef)(c),N=(0,o.useRef)(p),U=(0,o.useRef)(v),[A,M]=(0,o.useState)(h);L.current=m,S.current=s,T.current=g,C.current=y,E.current=c,N.current=p,U.current=v,(0,o.useEffect)(()=>{var e;if(!b.current||x.current)return;let n=a().map(b.current,{zoomControl:!1,touchZoom:!0,doubleClickZoom:!0,scrollWheelZoom:!0,boxZoom:!0,keyboard:!0,dragging:!0,minZoom:3,maxZoom:19}).setView(r,t);if(a().control.zoom({position:"topright"}).addTo(n),d){let e=new u.CO({position:"topright",flyTo:!0,setView:"once",initialZoomLevel:16,locateOptions:{enableHighAccuracy:!1,timeout:25e3,maximumAge:12e4}});e.addTo(n),w.current=e}let o=a().tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:19,attribution:'\xa9 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),l=a().tileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",{maxZoom:19,attribution:'Tiles \xa9 <a href="https://www.esri.com/">Esri</a> â Source: Esri, Maxar, Earthstar Geographics, and the GIS User Community'});z.current=o,R.current=l;let i=Z.current;"satellite"===i?l.addTo(n):o.addTo(n),Z.current=i,n.on("click",e=>{if(!N.current)return;let r=L.current;if(!r)return;let t=n.getZoom(),o=E.current;if(null!=o&&t<o){a().popup({className:"min-zoom-popup"}).setLatLng(e.latlng).setContent('<p class="min-zoom-popup-title">Zoom in for best accuracy</p><p class="min-zoom-popup-hint">Required: zoom level '.concat(o,"+ (you're at ").concat(t,"). Use + or scroll to zoom in, then tap the map again.</p>")).openOn(n);return}r(e.latlng.lat,e.latlng.lng,t)}),x.current=n,n.invalidateSize();let c=null,s=()=>{let e=T.current;if(!e)return;let r=n.getCenter(),t=n.getZoom();e(r.lat,r.lng,t)},m=()=>{c&&clearTimeout(c),c=setTimeout(s,400)};n.on("moveend",m),n.on("zoomend",m);let g=e=>"".concat(e.getSouth(),",").concat(e.getWest(),",").concat(e.getNorth(),",").concat(e.getEast());return null===(e=S.current)||void 0===e||e.call(S,{flyTo(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16,n=x.current;n&&(n.invalidateSize(),n.flyTo([e,r],t,{duration:.6}))},setView(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:14,n=x.current;n&&(n.invalidateSize(),n.setView([e,r],t,{animate:!0,duration:.4}))},locateUser(e){var r,t;let n=x.current;if(!n){null==e||null===(r=e.onError)||void 0===r||r.call(e,{code:3,message:"Map not ready."});return}n.invalidateSize();let o=null!==(t=null==e?void 0:e.maxZoom)&&void 0!==t?t:16,l=null==e?void 0:e.onFound,a=null==e?void 0:e.onError;n.once("locationfound",e=>{null==l||l(e.latlng.lat,e.latlng.lng)}),a&&n.once("locationerror",e=>{var r;return a({code:e.code,message:null!==(r=e.message)&&void 0!==r?r:"Location error"})}),n.locate({setView:!0,maxZoom:o,enableHighAccuracy:!1,timeout:25e3,maximumAge:12e4})},getBounds(){let e=x.current;return e?g(e.getBounds()):null},getZoom(){let e=x.current;return e?e.getZoom():t}}
1),()=>{var e;c&&clearTimeout(c),n.off("moveend",m),n.off("zoomend",m),w.current&&(n.removeControl(w.current),w.current=null),k.current&&(n.removeLayer(k.current),k.current=null),z.current=null,R.current=null,n.remove(),x.current=null,null===(e=S.current)||void 0===e||e.call(S,null)}},[r[0],r[1],t,d]),(0,o.useEffect)(()=>{let e=x.current;if(e){if(k.current&&(e.removeLayer(k.current),k.current=null),l){let[r,t]=l,n=p&&v&&!!m,o=a().marker([r,t],{draggable:n,autoPan:n,icon:a().icon({iconUrl:"".concat(i.z,"-red.png"),iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34]})});n&&o.on("dragend",()=>{var e,r;let t=o.getLatLng(),n=null===(e=x.current)||void 0===e?void 0:e.getZoom();null===(r=L.current)||void 0===r||r.call(L,t.lat,t.lng,n)}),o.addTo(e),k.current=o}return()=>{k.current&&(e.removeLayer(k.current),k.current=null)}}},[l,p,v,m]);let I=e=>{var r;let t=x.current,n=z.current,o=R.current;t&&n&&o&&e!==Z.current&&("satellite"===e?(t.removeLayer(n),o.addTo(t)):(t.removeLayer(o),n.addTo(t)),Z.current=e,M(e),null===(r=C.current)||void 0===r||r.call(C,e),t.invalidateSize())};return(0,n.jsxs)("div",{className:"relative w-full h-full min-h-0",children:[f?(0,n.jsxs)("div",{className:"absolute top-2 left-2 z-[500] flex rounded-lg overflow-hidden border border-gray-300 dark:border-gray-600 shadow-md bg-white dark:bg-gray-800",role:"group","aria-label":"Map layer",children:[(0,n.jsx)("button",{type:"button",onClick:()=>I("map"),className:"px-3 py-2 text-sm font-medium touch-manipulation ".concat("map"===A?"bg-primary text-white":"bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700"),style:{minHeight:"40px"},"aria-pressed":"map"===A,children:"Map"}),(0,n.jsx)("button",{type:"button",onClick:()=>I("satellite"),className:"px-3 py-2 text-sm font-medium touch-manipulation border-l border-gray-300 dark:border-gray-600 ".concat("satellite"===A?"bg-primary text-white":"bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700"),style:{minHeight:"40px"},"aria-pressed":"satellite"===A,children:"Satellite"})]}):null,(0,n.jsx)("div",{ref:b,className:"map-container w-full h-full rounded-lg min-h-0",style:{minHeight:200}})]})}delete a().Icon.Default.prototype._getIconUrl,a().Icon.Default.mergeOptions(i.b)},46561:function(e,r,t){t.d(r,{b:function(){return n},z:function(){return o}});let n={iconRetinaUrl:"/assets/map/leaflet/marker-icon-2x.png",iconUrl:"/assets/map/leaflet/marker-icon.png",shadowUrl:"/assets/map/leaflet/marker-shadow.png"},o="/assets/map/markers/marker-icon"}}]);
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.