1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5819],{45819:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});var a=r(68019),l=r(2050),n=r(10707);function s({address:e,latitude:t=23.1291,longitude:l=113.2644,zoom:o=15,markerTitle:c="Our Location"}){let i=(0,n.useRef)(null),u=(0,n.useRef)(null),d=(0,n.useRef)(!1),[f,m]=(0,n.useState)({lat:t,lng:l}),[h,p]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(!d.current&&!i.current&&u.current&&!u.current._leaflet_id)return d.current=!0,(async()=>{try{let t=(await r.e(474).then(r.t.bind(r,53484,23))).default;if(i.current||!u.current){d.current=!1;return}delete t.Icon.Default.prototype._getIconUrl,t.Icon.Default.mergeOptions({iconRetinaUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/images/marker-icon-2x.png",iconUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/images/marker-icon.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/images/marker-shadow.png"});let a=t.map(u.current,{center:[f.lat,f.lng],zoom:o,scrollWheelZoom:!1});t.tileLayer("https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>'}).addTo(a),t.marker([f.lat,f.lng]).addTo(a).bindPopup(`<div class="text-center"><strong>${c}</strong>${e?`<p class="text-sm text-gray-600 mt-1">${e}</p>`:""}</div>`),i.current=a,p(!0)}catch(e){console.error("å°å¾åå§å失败:",e)}finally{d.current=!1}})(),()=>{i.current&&(i.current.remove(),i.current=null),d.current=!1}},[]),(0,n.useEffect)(()=>{i.current&&h&&i.current.setView([f.lat,f.lng],o)},[f,o,h]),(0,n.useEffect)(()=>{if(e){let t=new AbortController,r=setTimeout(()=>t.abort(),5e3);return fetch(`https://nominatim.openstreetmap.org/search?format=json&q=${encodeURIComponent(e)}`,{signal:t.signal}).then(e=>e.json()).then(e=>{e&&e.length>0&&m({lat:parseFloat(e[0].lat),lng:parseFloat(e[0].lon)})}).catch(e=>{"AbortError"!==e.name&&console.warn("å°çç¼ç 失败ï¼ä½¿ç¨é»è®¤åæ :",e.message)}).finally(()=>clearTimeout(r)),()=>{clearTimeout(r),t.abort()}}},[e]),(0,a.jsxs)("div",{className:"rounded-lg overflow-hidden h-96 shadow-lg",children:[(0,a.jsx)("link",{rel:"stylesheet",href:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.css"}),(0,a.jsx)("div",{ref:u,style:{height:"100%",width:"100%"}})]})}let o=(0,l.default)(()=>Promise.resolve(s),{ssr:!1,loading:()=>(0,a.jsx)("div",{className:"bg-gray-200 rounded-lg h-96 flex items-center justify-center",children:(0,a.jsx)("div",{className:"text-gray-500",children:"Loading map..."})})})}}]);
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.