1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[315],{9304:function(e,t,r){r.r(t);var a=r(7437),n=r(2265),s=r(5068),i=r(1396),l=r.n(i),o=r(2167),c=r(7870),d=r(7157),u=r(8920),h=r(2583);let p={type:"tween",duration:.72,ease:[.25,.1,.25,1]},f={type:"tween",duration:.24,ease:[.25,.1,.25,1]};t.default=()=>{let e=(0,n.useRef)(null),[t,r]=(0,n.useState)(!1),[i,m]=(0,n.useState)(null),[x,g]=(0,n.useState)([]),[y,b]=(0,n.useState)(!0),v={"Andhra Pradesh":[79.74,15.9129],"Arunachal Pradesh":[94.7278,28.218],Assam:[92.9376,26.2006],Bihar:[85.2799,25.0961],Chhattisgarh:[82.1409,21.2787],Goa:[74.124,15.2993],Gujarat:[71.1924,22.2587],Haryana:[76.0856,29.455],"Jammu and Kashmir":[75.3412,33.7782],"Himachal Pradesh":[77.5711,32.1048],Jharkhand:[85.2799,23.6102],Karnataka:[76.1307,14],Kerala:[76.2711,10.8505],"Madhya Pradesh":[78.6569,22.9734],Maharashtra:[75.7139,19.7515],Manipur:[93.9063,24.6637],Meghalaya:[91.3662,25.467],Mizoram:[92.9376,23.1645],Nagaland:[94.5624,26.1584],Odisha:[85.0985,20.9517],Punjab:[75.3412,31.1471],Rajasthan:[73.4326,27.0238],Sikkim:[88.5122,27.532],"Tamil Nadu":[78.6569,11.1271],Telangana:[79.0193,18.1124],Tripura:[91.7314,23.9408],"Uttar Pradesh":[80.9462,27.5969],Uttarakhand:[79.0193,30.0668],"West Bengal":[87.855,22.9868],"New Delhi":[77.1025,28.7041],Delhi:[77.1025,28.7041],Mumbai:[72.8777,19.076],Pune:[73.8567,18.5204],Chandigarh:[76.7794,30.7333],Ladakh:[77.58,34.15],Orissa:[85.0985,20.9517],Uttrakhand:[79.0193,30.0668]},transformProjectData=async e=>{let t=e.reduce((e,t)=>{var r;let a=(null===(r=t.location.split(",")[1])||void 0===r?void 0:r.trim())||t.location.split(",")[0].trim();return e[a]||(e[a]=[]),e[a].push(t),e},{}),r=await Promise.all(Object.entries(t).map(async(e,t)=>{let[r,a]=e;return{id:t+1,name:r,coordinates:v[r]||[0,0],sites:a.map(e=>{var t;return{id:e.id,name:e.name,location:e.location,category:e.category,coverImg:e.coverImg||(null===(t=e.imagesSrc)||void 0===t?void 0:t[0])||null,slug:e.slug}})}}));return r};return(0,n.useEffect)(()=>{let fetchData=async()=>{b(!0);let e=await transformProjectData(d);g(e),b(!1)};fetchData()},[]),(0,n.useEffect)(()=>{if(!e.current||0===x.length)return;let t=s.Ys(e.current);return t.selectAll("*").remove(),s.AVB("/india.json").then(e=>{let a=x.filter(e=>0!==e.coordinates[0]||0!==e.coordinates[1]),n=s.mw4().fitExtent([[36,26],[764,570]],e),[i,l]=n.translate();n.scale(1.55*n.scale()).translate([400+(i-400)*1.55,300+(l-300)*1.55]);let o=s.l49().projection(n);t.selectAll("path").data(e.features).enter().append("path").attr("d",o).attr("fill","none").attr("stroke","white").attr("stroke-width",.9);let c=t.selectAll("g.state-group").data(a).enter().append("g").attr("class","state-group");c.append("circle").attr("cx",e=>n(e.coordinates)[0]).attr("cy",e=>n(e.coordinates)[1]).attr("r",7).attr("fill","#e95243").attr("class","state-dot");let d=c.append("g").attr("class","label-group").style("opacity",0);d.append("rect").attr("class","text-background").attr("x",e=>n(e.coordinates)[0]+14).attr("y",e=>n(e.coordinates)[1]-10).attr("width",0).attr("height",22).attr("fill","black").attr("opacity",.7).attr("rx",3),d.append("text").attr("class","state-name").attr("x",e=>n(e.coordinates)[0]+18).attr("y",e=>n(e.coordinates)[1]+5).attr("fill","white").attr("font-size","18px").text(e=>e.name),d.append("text").attr("class","badge-count").attr("fill","#ff4136").attr("font-size","12px").attr("font-weight","bold").text(e=>e.sites.length),d.each(function(e){let t=s.Ys(this).select(".state-name"),r=s.Ys(this).select(".badge-count"),a=s.Ys(this).select(".text-background"),n=t.node().getComputedTextLength();r.attr("x",parseFloat(t.attr("x"))+n+8).attr("y",t.attr("y"));let i=n+r.node().getComputedTextLength()+16;a.attr("width",i)}),function setupPulseAnimation(){t.selectAll(".state-dot").filter(function(){return!s.Ys(this.parentNode).classed("hovered")}).transition().duration(1e3).attr("r",8).transition().duration(1e3).attr("r",6).on("end",setupPulseAnimation)}(),c.on("mouseenter",function(e,t){s.Ys(this).classed("hovered",!0),s.Ys(this).select(".state-dot").interrupt().transition().duration(300).attr("r",10).attr("fill","#ff6b63");let r=s.Ys(this).select(".label-group");r.transition().duration(300).style("opacity",1),r.select(".state-name").transition().duration(300).attr("font-size","16px");let a=r.select(".state-name"),n=r.select(".badge-count"),i=r.select(".text-background");setTimeout(()=>{if(a.node()){let e=a.node().getComputedTextLength();n.attr("x",parseFloat(a.attr("x"))+e+10);let t=e+n.node().getComputedTextLength()+20;i.transition().duration(150).attr("width",t).attr("height",30)}},150),s.Ys(this).style("cursor","pointer")}).on("mouseleave",function(){s.Ys(this).classed("hovered",!1),s.Ys(this).select(".state-dot").transition().duration(300).attr("r",6).attr("fill","#e95243");let e=s.Ys(this).select(".label-group");e.transition().duration(300).style("opacity",0),e.select(".state-name").transition().duration(300).attr("font-size","12px"),e.select(".text-background").transition().duration(300).attr("height",22),s.Ys(this).style("cursor","default")}),c.on("click",(e,t)=>{m(t),r(!0)})}),()=>{t.selectAll(".state-dot").interrupt()}},[x]),(0,a.jsx)("div",{className:"relative w-full h-full bg-[#28282B]/30",children:y?(0,a.jsxs)("div",{className:"absolute bg-[#28282B]/30 inset-0 flex items-center justify-center",children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-white"}),(0,a.jsx)("p",{className:"text-white ml-4",children:"Loading map data..."})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("svg",{ref:e,width:"100%",height:"100%",viewBox:"0 0 800 600",children:(0,a.jsx)("style",{children:"\n .badge-count {\n fill: #ff4136;\n font-weight: bold;\n }\n .state-group {\n cursor: pointer;\n }\n .text-background {\n rx: 3px;\n ry: 3px;\n }\n "})}),(0,a.jsx)(o.M,{children:t&&i&&(0,a.jsx)(c.E.div,{"data-project-drawer-backdrop":!0,
1className:"fixed inset-0 z-50",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:f,style:{backgroundColor:"rgba(0, 0, 0, 0.35)",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)",willChange:"opacity"},onMouseDown:e=>{e.target===e.currentTarget&&r(!1)},children:(0,a.jsxs)(c.E.div,{"data-project-drawer":!0,role:"dialog","aria-modal":"true","aria-label":"".concat(i.name," projects"),className:"absolute right-0 top-16 bottom-0 bg-[#0e0e0e] border-l border-zinc-800 w-full max-w-md flex flex-col shadow-2xl",initial:{x:"100%"},animate:{x:"0%"},exit:{x:"100%"},transition:p,style:{willChange:"transform",backfaceVisibility:"hidden"},children:[(0,a.jsxs)("div",{className:"px-7 pt-8 pb-6 border-b border-zinc-800 flex items-start justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[10px] tracking-[0.35em] uppercase text-zinc-500 font-hg mb-2",children:"Projects in"}),(0,a.jsx)("h2",{className:"text-white font-hg font-light text-xl tracking-[0.05em] uppercase",children:i.name}),(0,a.jsxs)("p",{className:"text-[10px] tracking-[0.2em] text-accent/60 font-hg mt-1",children:[i.sites.length," ",1===i.sites.length?"project":"projects"]})]}),(0,a.jsx)("button",{onClick:()=>r(!1),className:"text-zinc-500 hover:text-zinc-300 transition-colors duration-200 mt-1",children:(0,a.jsx)(u.q5L,{size:16})})]}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto px-7 py-4",children:i.sites.map(e=>(0,a.jsxs)(l(),{href:"/projects/".concat(e.slug),className:"group flex items-center gap-4 border-t border-zinc-800 py-4 hover:border-accent/30 transition-colors duration-300 first:border-t-0",children:[e.coverImg&&(0,a.jsx)("div",{className:"flex-shrink-0 w-14 h-10 overflow-hidden bg-zinc-900",children:(0,a.jsx)("img",{...(0,h.d5)(e.coverImg,"projectThumb",{sizes:"56px"}),alt:e.name,loading:"lazy",decoding:"async",className:"w-full h-full object-cover opacity-70 group-hover:opacity-100 transition-opacity duration-300",onError:e=>{e.currentTarget.parentElement.style.display="none"}})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-xs text-zinc-200 font-hg font-light uppercase tracking-[0.05em] leading-snug group-hover:text-white transition-colors duration-300",children:e.name}),(0,a.jsx)("p",{className:"text-[10px] text-zinc-400 font-hg mt-1 leading-snug",children:[e.location,e.category].filter(Boolean).join(" \xb7 ")})]}),(0,a.jsx)(u.Rgz,{size:13,className:"text-zinc-700 group-hover:text-accent group-hover:translate-x-1 transition-all duration-300 flex-shrink-0"})]},e.id))})]})})})]})})}},2167:function(e,t,r){r.d(t,{M:function(){return AnimatePresence}});var a=r(2265),n=r(538);function useIsMounted(){let e=(0,a.useRef)(!1);return(0,n.L)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var s=r(2363),i=r(8243),l=r(961);let PopChildMeasure=class PopChildMeasure extends a.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}};function PopChild({children:e,isPresent:t}){let r=(0,a.useId)(),n=(0,a.useRef)(null),s=(0,a.useRef)({width:0,height:0,top:0,left:0});return(0,a.useInsertionEffect)(()=>{let{width:e,height:a,top:i,left:l}=s.current;if(t||!n.current||!e||!a)return;n.current.dataset.motionPopId=r;let o=document.createElement("style");return document.head.appendChild(o),o.sheet&&o.sheet.insertRule(` 2 [data-motion-pop-id="${r}"] { 3 position: absolute !important; 4 width: ${e}px !important; 5 height: ${a}px !important; 6 top: ${i}px !important; 7 left: ${l}px !important; 8 } 9 `),()=>{document.head.removeChild(o)}},[t]),a.createElement(PopChildMeasure,{isPresent:t,childRef:n,sizeRef:s},a.cloneElement(e,{ref:n}))}let PresenceChild=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:o,mode:c})=>{let d=(0,l.h)(newChildrenMap),u=(0,a.useId)(),h=(0,a.useMemo)(()=>({id:u,initial:t,isPresent:r,custom:s,onExitComplete:e=>
9{for(let t of(d.set(e,!0),d.values()))if(!t)return;n&&n()},register:e=>(d.set(e,!1),()=>d.delete(e))}),o?void 0:[r]);return(0,a.useMemo)(()=>{d.forEach((e,t)=>d.set(t,!1))},[r]),a.useEffect(()=>{r||d.size||!n||n()},[r]),"popLayout"===c&&(e=a.createElement(PopChild,{isPresent:r},e)),a.createElement(i.O.Provider,{value:h},e)};function newChildrenMap(){return new Map}var o=r(781),c=r(6567);let getChildKey=e=>e.key||"",AnimatePresence=({children:e,custom:t,initial:r=!0,onExitComplete:i,exitBeforeEnter:l,presenceAffectsLayout:d=!0,mode:u="sync"})=>{var h;(0,c.k)(!l,"Replace exitBeforeEnter with mode='wait'");let p=(0,a.useContext)(o.p).forceRender||function(){let e=useIsMounted(),[t,r]=(0,a.useState)(0),n=(0,a.useCallback)(()=>{e.current&&r(t+1)},[t]),i=(0,a.useCallback)(()=>s.Wi.postRender(n),[n]);return[i,t]}()[0],f=useIsMounted(),m=function(e){let t=[];return a.Children.forEach(e,e=>{(0,a.isValidElement)(e)&&t.push(e)}),t}(e),x=m,g=(0,a.useRef)(new Map).current,y=(0,a.useRef)(x),b=(0,a.useRef)(new Map).current,v=(0,a.useRef)(!0);if((0,n.L)(()=>{v.current=!1,function(e,t){e.forEach(e=>{let r=getChildKey(e);t.set(r,e)})}(m,b),y.current=x}),h=()=>{v.current=!0,b.clear(),g.clear()},(0,a.useEffect)(()=>()=>h(),[]),v.current)return a.createElement(a.Fragment,null,x.map(e=>a.createElement(PresenceChild,{key:getChildKey(e),isPresent:!0,initial:!!r&&void 0,presenceAffectsLayout:d,mode:u},e)));x=[...x];let w=y.current.map(getChildKey),j=m.map(getChildKey),k=w.length;for(let e=0;e<k;e++){let t=w[e];-1!==j.indexOf(t)||g.has(t)||g.set(t,void 0)}return"wait"===u&&g.size&&(x=[]),g.forEach((e,r)=>{if(-1!==j.indexOf(r))return;let n=b.get(r);if(!n)return;let s=w.indexOf(r),l=e;l||(l=a.createElement(PresenceChild,{key:getChildKey(n),isPresent:!1,onExitComplete:()=>{b.delete(r),g.delete(r);let e=y.current.findIndex(e=>e.key===r);if(y.current.splice(e,1),!g.size){if(y.current=m,!1===f.current)return;p(),i&&i()}},custom:t,presenceAffectsLayout:d,mode:u},n),g.set(r,l)),x.splice(s,0,l)}),x=x.map(e=>{let t=e.key;return g.has(t)?e:a.createElement(PresenceChild,{key:getChildKey(e),isPresent:!0,presenceAffectsLayout:d,mode:u},e)}),a.createElement(a.Fragment,null,g.size?x:x.map(e=>(0,a.cloneElement)(e)))}}}]);
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.