1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,690929,e=>{"use strict";var t=e.i(26863),a=e.i(122525),r=e.i(73084);e.s(["Toggle",0,({text:e,onChange:s,value:o=!1,disabled:l=!1,className:i="",size:n="md"})=>{let c=(0,a.useId)();return(0,t.jsxs)("label",{htmlFor:c,className:(0,r.cn)("inline-flex relative items-center cursor-pointer",i),children:[(0,t.jsx)("input",{type:"checkbox",id:c,className:"sr-only peer",disabled:l,checked:o,onChange:e=>s?.(e.target.checked)}),(0,t.jsx)("div",{className:(0,r.cn)("peer-focus:outline-none grow-0 shrink-0 relative after:grow-0 after:shrink-0 peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-zinc-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-zinc-300 after:border after:rounded-full after:transition-all dark:border-zinc-600 peer-checked:bg-blue-600 dark:peer-checked:bg-blue-600","sm"===n?"w-9 h-5 after:h-4 after:w-4":"w-11 h-6 after:h-5 after:w-5",l?"opacity-50 cursor-not-allowed border border-zinc-300":"cursor-pointer bg-zinc-200")}),(0,t.jsx)("span",{className:(0,r.cn)("text-zinc-900 dark:text-zinc-300","sm"===n?"ml-2 text-xs":"font-medium ml-3 text-sm"),children:e})]})}])},7787,e=>{"use strict";let t=(0,e.i(498180).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["default",0,t])},561801,e=>{"use strict";var t=e.i(7787);e.s(["ExternalLinkIcon",()=>t.default])},609209,e=>{"use strict";let t=(0,e.i(498180).default)("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);e.s(["default",0,t])},678772,e=>{"use strict";var t=e.i(609209);e.s(["LoaderIcon",()=>t.default])},729999,e=>{"use strict";var t=e.i(26863),a=e.i(122525),r=e.i(838704),s=e.i(581949),o=e.i(3258);let l=e=>[60-Math.floor(((Array.isArray(e)?Number(e[0]):e.lat())+90)/3),Math.floor(((Array.isArray(e)?Number(e[1]):e.lng())/2+90)/3)];var i=e.i(782584),n=e.i(939217),c=e.i(437197),d=e.i(932554),m=e.i(713752),u=e.i(143280),h=e.i(690929),p=e.i(509239),f=e.i(948375),g=e.i(706387),x=e.i(196505),y=e.i(415850),b=e.i(61463),w=e.i(746234),k=e.i(83089);let v=({map:e,setOpen:r})=>{let[o,l]=(0,a.useState)(!1),[i,n]=(0,a.useState)(!1),[c,d]=(0,a.useState)(""),m=async()=>{if(e){l(!0);try{let t=await (0,w.requestLocation)(),a=[t.coords.longitude-.003,t.coords.latitude];e.flyTo({center:a,zoom:15})}catch(e){console.error("Error getting location:",e)}l(!1)}},u=async()=>{try{n(!0);let t=e.getBounds(),{data:a}=await s.default.get("https://nominatim.openstreetmap.org/search",{params:{q:c,format:"jsonv2",limit:1,viewbox:`${t.getWest()},${t.getNorth()},${t.getEast()},${t.getSouth()}`}});if(!a.length)throw Error("No results found");let o=a[0];if((0,k.default)(`Navigating to ${o.display_name}`),o.boundingbox){let[t,a,r,s]=o.boundingbox,l=new y.default.LngLatBounds([s,t],[r,a]);e.fitBounds(l,{padding:50})}else{let t=[o.lon,o.lat];e.flyTo({center:t,zoom:15})}d(""),r(!1)}catch(e){console.error("Error navigating to address:",e),alert(`Failed to navigate to the address. 2 3${e.message}`)}finally{n(!1)}},h=async()=>{let t=e.getCenter(),a=new URL(window.location.href);a.searchParams.has("map")&&a.searchParams.delete("map");let r=a.toString();r+=r.includes("?")?"&":"?",r+=`map=${t.lat.toFixed(5)},${t.lng.toFixed(5)},${e.getZoom().toFixed(1)}`;try{await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([r],{type:"text/plain"}),"text/html":new Blob([`<a href="${r}">Street Art Cities map</a>`],{type:"text/html"})})]),k.default.success("Copied to clipboard")}catch(e){try{await navigator.clipboard.writeText(r),k.default.success("Copied to clipboard")}catch(e){k.default.error(`Failed to copy link to clipboard: ${e.message}`)}}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-start gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-800",children:"Navigate"}),(0,t.jsxs)("button",{onClick:m,className:"text-xs font-medium text-red-500 hover:text-red-700 transition inline-flex items-center gap-1",children:[(0,t.jsx)(g.NavigationIcon,{className:"size-3"}),o?"Locating...":"My location"]})]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{type:"text",className:"w-full rounded-md border-gray-200 text-sm h-10 p-1 px-9",disabled:i,placeholder:"Go to an address...",value:c,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off","data-1p-ignore":!0,onChange:e=>d(e.target.value),onKeyDown:e=>{"Enter"!==e.key||c.length<=0||u()}}),(0,t.jsx)(x.SearchIcon,{className:"absolute left-3 top-1/2 -translate-y-1/2 size-4 text-gray-500 pointer-events-none"}),c.length>0&&!i&&(0,t.jsx)(b.default,{onClick:()=>u(),className:"absolute right-1 top-1 bottom-1 h-auto",size:"small",children:"Go"})]}),(0,t.jsx)("button",{className:"text-xs text-gray-800 underline hover:text-black transition",onClick:h,children:"Copy map link"})]})},j=({filters:e,setFilters:r,placement:s,map:o})=>{let[l,i]=(0,a.useState)(!1);(0,c.useHotkeys)("f",()=>i(!l),[l]),(0,c.useHotkeys)("Escape",()=>l&&i(!1),[l]);let g=["top-right"===s&&"right-5 top-21","left-bottom"===s&&"left-5 bottom-5","absolute-top"===s&&"top-5 right-5"].filter(
3Boolean).join(" ");return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:`absolute ${g} z-10 font-sans`,children:(0,t.jsx)(f.default,{text:"Show filters (f)",placement:"bottom",asChild:!0,children:(0,t.jsx)("button",{onClick:()=>i(!0),title:"Show filters",className:(0,p.cn)("w-10 h-10 flex items-center justify-center transition-all p-3 rounded-full shadow-lg shadow-black/3","bg-white hover:bg-gray-100 text-gray-600 hover:text-gray-800",l?"opacity-0 pointer-events-none":"block"),children:(0,t.jsx)(m.MoreHorizontalIcon,{className:"w-4 h-4"})})})}),(0,t.jsxs)("div",{className:(0,p.cn)("absolute z-10 font-sans bg-white transition-all","overflow-hidden max-w-96 w-[calc(100%-2.5rem)] block rounded-2xl",g,!l&&"top-right"===s&&"-translate-y-4 translate-x-4",!l&&"bottom-left"===s&&"translate-y-4 -translate-x-4",l?"opacity-100":"opacity-0 pointer-events-none"),children:[(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsx)("button",{className:"float-right",onClick:()=>i(!1),title:"Close",children:(0,t.jsx)(u.XIcon,{className:"size-4 text-gray-400 hover:text-gray-800 transition"})}),(0,t.jsx)(v,{map:o,setOpen:i}),(0,t.jsx)("div",{className:"text-sm font-medium text-gray-800 mb-2 mt-6",children:"Show on map"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:["Places","Active artworks","Historical artworks"].map(a=>(0,t.jsx)(h.Toggle,{text:a,size:"sm",value:e.types.includes(a),onChange:e=>{e?r(e=>({...e,types:[...e.types,a]})):r(e=>({...e,types:e.types.filter(e=>e!==a)}))},className:"w-full"},a))}),e.types.includes("Places")&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"text-sm font-medium text-gray-800 mb-2 mt-6",children:"Options"}),(0,t.jsx)(h.Toggle,{text:"Show places more prominently",size:"sm",value:e.showPlacesProminently,onChange:e=>r(t=>({...t,showPlacesProminently:e})),className:"w-full"})]})]}),(0,t.jsxs)("div",{className:"text-xs leading-relaxed text-gray-800 p-4 border-t border-gray-100 flex gap-1",children:[(0,t.jsx)("div",{children:(0,t.jsx)(d.MapIcon,{className:"w-3 h-3 inline-block mt-[-3px] text-gray-700"})}),(0,t.jsxs)("div",{className:"flex-1",children:["Powered by"," ",(0,t.jsx)("a",{href:"https://openstreetmap.org",target:"_blank",children:"OpenStreetMap"}),", ",(0,t.jsx)("a",{href:"https://nominatim.org",target:"_blank",children:"Nominatim"})," ","and"," ",(0,t.jsx)("a",{href:"https://maplibre.org/",target:"_blank",children:"MapLibre"}),"."," ",(0,t.jsx)(n.default,{href:"/about/platform",className:"underline",target:"_parent",children:"Learn more"}),"."]})]})]})]})};var N=e.i(860421),S=e.i(561801),C=e.i(678772),z=e.i(490030),M=e.i(979077),$=e.i(633578);let P=({marker:e,onClose:r})=>{let[s,o]=(0,a.useState)(!1),[l,i]=(0,a.useState)(""),n=`https://${$.DOMAIN}/data/markers/${e?.id}.json`,{data:d}=(0,N.default)(e&&n,M.default.get);return(0,c.useHotkeys)("Escape",()=>e&&r(),[e]),(0,a.useEffect)(()=>{e?(l||i(window?.location?.pathname),window?.history.replaceState(null,e.title,`/markers/${e?.id}`),o(document.body.classList.contains("hide-homepage-sidebar")),document.body.classList.add("hide-homepage-sidebar")):(window?.history.replaceState(null,"Street Art Cities",l),s||document.body.classList.remove("hide-homepage-sidebar"))},[e]),(0,t.jsxs)("div",{className:(0,p.cn)("fixed top-20 bottom-4 inset-x-4 sm:left-auto overflow-y-auto transition-all sm:w-150","sm:rounded-2xl z-50 bg-white",!e&&"translate-x-96 opacity-0 pointer-events-none"),children:[(0,t.jsx)("a",{href:`/markers/${e?.id}`,className:(0,p.cn)("absolute top-3 right-14 transition","w-8 h-8 flex items-center justify-center transition-all rounded-full shadow-lg z-10","bg-white hover:bg-gray-100 text-gray-600 hover:text-gray-800"),title:"View marker page",children:(0,t.jsx)(S.ExternalLinkIcon,{className:"size-4"})}),(0,t.jsx)("button",{className:(0,p.cn)("absolute top-3 right-3 transition","w-8 h-8 flex items-center justify-center transition-all rounded-full shadow-lg z-10","bg-white hover:bg-gray-100 text-gray-600 hover:text-gray-800"),onClick:r,title:"Close",children:(0,t.jsx)(u.XIcon,{className:"size-4"})}),d?.data?(0,t.jsx)("div",{className:"h-full overflow-y-auto p-6",children:(0,t.jsx)(z.default,{marker:d?.data},"content")}):(0,t.jsx)("div",{className:"flex h-full items-center justify-center p-12",children:(0,t.jsx)(C.LoaderIcon,{className:"animate-spin size-5 text-gray-400"})})]})},L=(0,o.create)(()=>({visibleMarkers:null})),I=e=>L.setState({visibleMarkers:e}),A=()=>L.setState({visibleMarkers:null}),E=(0,a.memo)(({minimal:e=!1,centerPoint:o,style:n,className:c,id:d,inline:m,showPlaces:u=!0,globalRouter:h=!1,shouldRequestLocation:f=!1,useInlineArtworkView:g=!1,optionsPlacement:x="top-right",zoom:y=10,cityId:b})=>{let[k,v]=(0,a.useState)(null),[N,S]=(0,a.useState)({}),[C,z]=(0,a.useState)(!1),[M,I]=(0,a.useState)(null),[A,E]=(0,a.useState)({types:["Active artworks",u&&"Places"].filter(
3Boolean),showPlacesProminently:!1}),B=(0,a.useRef)({}),F=(0,r.useRouter)(),O=(0,a.useRef)(null),{visibleMarkers:T}=L(),R=async e=>{if(!N[e]&&!B.current[e]){B.current[e]=!0;try{let{data:{items:t}}=await s.default.get(`https://${$.DOMAIN}/data/zones/${e}/markers.json`);S(a=>({...a,[e]:t}))}catch(t){S(t=>({...t,[e]:[]}))}}},q=(0,a.useMemo)(()=>Object.values(N).reduce((e,t)=>(e.push(...Object.entries(t).map(([e,t])=>e.indexOf("_")>=0||!t.location||0===t.location.lat&&0===t.location.lng||T&&!T.includes(t.id.toString())||b&&t.siteId!==b||"status"in t&&"artwork"===t.type&&("active"===t.status||"inProgress"===t.status)&&!A.types.includes("Active artworks")||"status"in t&&"artwork"===t.type&&"removed"===t.status&&!A.types.includes("Historical artworks")||"artwork"!==t.type&&!A.types.includes("Places")||"artwork"!==t.type&&"removed"===t.status||!t.marker||t.marker.indexOf("images/marker-placeholder.png")>0?null:{id:t.id.toString(),type:t.type,onClick:()=>m&&F&&!h?F.push(`/cities/${t.siteId}/markers/${t.id}`):g?I(t):void window.open(`https://${$.DOMAIN}/markers/${t.id}`),title:t.title,location:t.location,marker:t.marker}).filter(Boolean)),e),[]),[N,A,T,b]);(0,a.useEffect)(()=>{if(!k)return;let e=(e=>
3{let t=l(e?.getSouthWest()||[0,0]),a=l(e?.getNorthEast()||e?.getSouthWest()||[0,0]),r=a[0],s=t[1],o=t[0],i=a[1],n=[];for(;r<=o;){let e=s;for(;e<=i;)n.push(100*r+e),e++;r++}return n})(k),t=e.length>50;z(t),t||(e=>{for(let t of e)R(t).then()})(e)},[k,d]);let Z=async e=>{if(!f)return;let t=new URLSearchParams(window.location.search).get("map");if(t){let[a,r,s]=t.split(",").map(Number);e.setCenter([r,a]),e.setZoom(s);return}try{console.log("Requesting location");let t=await (0,w.requestLocation)({cached:!0}),a=[t.coords.longitude-.1,t.coords.latitude];e.flyTo({center:a,zoom:10})}catch(e){}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Map,{id:d,zoom:y,style:n,centerPoint:o,className:c,minimal:e,mapRef:e=>O.current=e,onBoundsChanged:e=>v(e),onBeforeLoad:e=>{let t=new URLSearchParams(window.location.search).get("map");if(t){let[a,r,s]=t.split(",").map(Number);e.setCenter([r,a]),e.setZoom(s),setTimeout(()=>{e.setCenter([r,a]),e.setZoom(s)},100)}},onLoad:Z,markers:q,showPlacesProminently:A.showPlacesProminently,noRecenter:!0}),g&&(0,t.jsx)(P,{marker:M,onClose:()=>I(null)}),C&&(0,t.jsx)("div",{className:(0,p.cn)("hidden sm:block absolute z-10 font-sans bg-gray-800/90 p-3 px-5 rounded-full text-xs text-white","absolute-top"===x&&"top-4 right-17","top-right"===x&&"top-21 right-17","bottom-left"===x&&"bottom-4 left-17"),children:"Zoom in to see artworks"}),!e&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(j,{filters:A,setFilters:E,placement:x,map:O.current},"filters")})]})});e.s(["ZonedMapVisibleMarkersSetter",0,({markerIds:e})=>((0,a.useEffect)(()=>(I(e),()=>A()),[e]),null),"default",0,E,"resetZonedMapVisibleMarkers",0,A,"setZonedMapVisibleMarkers",0,I],729999)}]);
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.